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

{% block content %}

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

<div class="heading"><h2>Re-Opened Questions</h2></div>

{% if reopened_questions %}

{% for question in reopened_questions %}

    <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">{{question.question_opened.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_opened.count_answers}}</div>
        </div>
        <div class="views">
            <div class="mini-counts">{{question.question_opened.calculate_viewers}}</div>
        </div>
    </div>
    <div class="summary">
        <h3><a href="{{question.question_opened.get_absolute_url}}" target="_blank" class="question-hyperlink">{{question.question_opened.title|truncatechars:20}}</a></h3>
        {% for tag in question.question_opened.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_opened.post_owner.profile.get_absolute_url}}">{{question.question_opened.post_owner}}</a>
                </span>
                    <div title="{{question.question_opened.post_owner}}">
                        <a href="{{question.question_opened.post_owner.profile.get_absolute_url}}"><img src="{% if question.question_opened.post_owner.profile.profile_photo %} {{question.question_opened.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_opened.post_owner|calculate_reputation}}</span>
                                {% if question.question_opened.post_owner|calculateGoldBadges %}
                                <span title="{{question.question_opened.post_owner|calculateGoldBadges}} gold badges" aria-hidden="true">
                                    <span class="badge1"></span>
                                    <span class="badgecount">{{question.question_opened.post_owner|calculateGoldBadges}}</span>
                                </span>
                                <span class="v-visible-sr">{{question.question_opened.post_owner|calculateGoldBadges}} gold badges</span>
                                {% endif %}
                                {% if question.question_opened.post_owner|calculatSilvereBadges %}

                                <span title="{{question.question_opened.post_owner|calculatSilvereBadges}} silver badges" aria-hidden="true">
                                    <span class="badge2"></span>
                                    <span class="badgecount">{{question.question_opened.post_owner|calculatSilvereBadges}}</span>
                                </span>
                                <span class="v-visible-sr">{{question.question_opened.post_owner|calculatSilvereBadges}} silver badges</span>
                                {% endif %}
                                {% if question.question_opened.post_owner|calculateBronzeBadges %}
                                <span title="{{question.question_opened.post_owner|calculateBronzeBadges}} bronze badges" aria-hidden="true">
                                    <span class="badge3"></span>
                                    <span class="badgecount">{{question.question_opened.post_owner|calculateBronzeBadges}}</span>
                                </span>
                                <span class="v-visible-sr">{{question.question_opened.post_owner|calculateBronzeBadges}} bronze badges</span>
                                {% endif %}
                            </div>
                <span title="2021-10-22 19:29:26Z" class="relativetime">
                    <b>Asked</b> - {{question.question_opened.date}}
                </span>
                <br>
                <span title="2021-10-22 19:29:26Z" class="relativetime">
                    <b>Closed</b> - {{question.date}}
                </span>
                <br>
        </div>
    </div>
</div>

{% endfor %}


{% else %}

<b class="no-post">No Posts</b>


{% endif %}

{% endblock content %}