{% extends 'profile/base.html' %}
{% load humanize %}
{% load qa_tags %}
{% load static %}

{% block content %}

<link href="{% static 'css/tools.css' %}" type="text/css" media="all" rel="stylesheet" />


<div class="heading"><h2>Pending Close Vote Questions</h2></div>

{% if pnding_close_votes %}

{% for question in pnding_close_votes %}

    <div class="question-summary narrow" id="question-summary-{{question.id}}">
        <div class="w48">&nbsp;</div>
        <div class="question-counts cp">
            <div class="votes">
                <div class="mini-counts"><a href="{% url 'review:reviewClosedQuestions' question.id %}" class="padding">Vote</a></div>
            </div>
            <div class="votes">
                <div class="mini-counts">{{question.question_to_closed.calculate_UpVote_DownVote}}</div>
            </div>
        <div class="status {% if question.is_answer_accepted %}is_answer_accepted{% endif %}" title="one of the answers was accepted as the correct answer">
            <div class="mini-counts">{{question.question_to_closed.count_answers}}</div>
        </div>
        <div class="views">
            <div class="mini-counts">{{question.question_to_closed.calculate_viewers}}</div>
        </div>
    </div>
    <div class="summary">
        <h3><a href="{{question.question_to_closed.get_absolute_url}}" target="_blank" class="question-hyperlink">{{question.question_to_closed.title|truncatechars:20}}</a></h3>
        {{question.question_to_closed.body|truncatechars:40}}
        <br>
        {% for tag in question.question_to_closed.tags.all %}
        <div class="tags t-python t-django t-django-models t-django-views t-django-queryset">
            <a href="{% url 'tagbadge:taggedItemsFrom_All' tag.id %}" class="post-tag" title="show questions tagged &#39;{{tag}}&#39;" rel="tag">{{tag}}</a> 
            {% endfor %}
        </div>
        <div class="started">
                <span class="answered">
                    <b>Asked by</b> - <a href="{{question.question_to_closed.post_owner.profile.get_absolute_url}}">{{question.question_to_closed.post_owner}}</a>
                </span>
                    <div title="{{question.question_to_closed.post_owner}}">
                        <a href="{{question.question_to_closed.post_owner.profile.get_absolute_url}}"><img src="{% if question.question_to_closed.post_owner.profile.profile_photo %} {{question.question_to_closed.post_owner.profile.profile_photo.url}}{% endif %}" alt="" width="24" height="24" class="bar-sm"></a>
                    </div>
                           <div class="-flair">
                                <span class="reputation-score" title="reputation score " dir="ltr">{{question.question_to_closed.post_owner|calculate_reputation}}</span>
                                {% if question.question_to_closed.post_owner|calculateGoldBadges %}
                                <span title="{{question.question_to_closed.post_owner|calculateGoldBadges}} gold badges" aria-hidden="true">
                                    <span class="badge1"></span>
                                    <span class="badgecount">{{question.question_to_closed.post_owner|calculateGoldBadges}}</span>
                                </span>
                                <span class="v-visible-sr">{{question.question_to_closed.post_owner|calculateGoldBadges}} gold badges</span>
                                {% endif %}
                                {% if question.question_to_closed.post_owner|calculatSilvereBadges %}

                                <span title="{{question.question_to_closed.post_owner|calculatSilvereBadges}} silver badges" aria-hidden="true">
                                    <span class="badge2"></span>
                                    <span class="badgecount">{{question.question_to_closed.post_owner|calculatSilvereBadges}}</span>
                                </span>
                                <span class="v-visible-sr">{{question.question_to_closed.post_owner|calculatSilvereBadges}} silver badges</span>
                                {% endif %}
                                {% if question.question_to_closed.post_owner|calculateBronzeBadges %}
                                <span title="{{question.question_to_closed.post_owner|calculateBronzeBadges}} bronze badges" aria-hidden="true">
                                    <span class="badge3"></span>
                                    <span class="badgecount">{{question.question_to_closed.post_owner|calculateBronzeBadges}}</span>
                                </span>
                                <span class="v-visible-sr">{{question.question_to_closed.post_owner|calculateBronzeBadges}} bronze badges</span>
                                {% endif %}
                            </div>
                <b>Votes To Close</b>
                <b style="color: red;">{{question.get_close_votes}}</b>
                <br>
                <hr>
                <b>Votes to Stay Open</b>
                <b style="color: red;">{{question.get_lveopen_votes}}</b>
        </div>
    </div>
</div>



{% endfor %}

{% else %}

<b class="no-post">No Pending Votes</b>

{% endif %}

{% endblock content %}