123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- {% extends "cranefly/layout.html" %}
- {% load i18n %}
- {% load url from future %}
- {% import "cranefly/macros.html" as macros with context %}
- {% block title %}{{ macros.page_title(title=(_("Post #%(post)s Votes") % {'post': post.pk}),parent=thread.name) }}{% endblock %}
- {% block breadcrumb %}{{ super() }} <span class="divider">/</span></li>
- {% for parent in parents %}
- <li><a href="{{ parent.type|url(forum=parent.pk, slug=parent.slug) }}">{{ parent.name }}</a> <span class="divider">/</span></li>
- {% endfor %}
- <li><a href="{% url 'thread' thread=thread.pk, slug=thread.slug %}">{{ thread.name }}</a> <span class="divider">/</span></li>
- <li class="active">{% trans post=post.pk %}Post #{{ post }} Votes{% endtrans %}
- {%- endblock %}
- {% block content %}
- <div class="page-header">
- <ul class="breadcrumb">
- {{ self.breadcrumb() }}</li>
- </ul>
- <h1>{% trans post=post.pk %}Post #{{ post }} Votes{% endtrans %} <small>{{ thread.name }}</small></h1>
- <ul class="unstyled thread-info">
- <li><i class="icon-time"></i> <a href="{% url 'thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}">{{ post.date|reltimesince }}</a></li>
- <li><i class="icon-user"></i> {% if post.user %}<a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
- <li><i class="icon-thumbs-up"></i> {{ post.upvotes - post.downvotes }}</li>
- </ul>
- </div>
- <h2>{% trans %}Upvotes{% endtrans %} <small>{% trans count=upvotes|length, votes=upvotes|length|intcomma -%}
- One upvote
- {%- pluralize -%}
- {{ votes }} upvotes
- {%- endtrans %}</small></h2>
- {% if upvotes %}
- <table class="table table-striped table-users list-tiny">
- <thead>
- <tr>
- <th colspan="4">{% trans %}Votes List{% endtrans %}</th>
- </tr>
- </thead>
- <tbody>
- {% for row in upvotes|batch(4, '') %}
- <tr>
- {% for vote in row %}
- <td class="span3">
- {% if vote %}
- {{ vote_details(vote) }}
- {% else %}
-
- {% endif %}
- </td>
- {% endfor %}
- </tr>
- {% endfor %}
- </tbody>
- </table>
- {% else %}
- <p class="lead">{% trans %}Nobody has upvoted this post.{% endtrans %}</p>
- {% endif %}
- <hr>
- <h2>{% trans %}Downvotes{% endtrans %} <small>{% trans count=downvotes|length, votes=downvotes|length|intcomma -%}
- One downvote
- {%- pluralize -%}
- {{ votes }} downvotes
- {%- endtrans %}</small></h2>
- {% if downvotes %}
- <table class="table table-striped table-users list-tiny">
- <thead>
- <tr>
- <th colspan="4">{% trans %}Votes List{% endtrans %}</th>
- </tr>
- </thead>
- <tbody>
- {% for row in downvotes|batch(4, '') %}
- <tr>
- {% for vote in row %}
- <td class="span3">
- {% if vote %}
- {{ vote_details(vote) }}
- {% else %}
-
- {% endif %}
- </td>
- {% endfor %}
- </tr>
- {% endfor %}
- </tbody>
- </table>
- {% else %}
- <p class="lead">{% trans %}Nobody has downvoted this post.{% endtrans %}</p>
- {% endif %}
- {% endblock %}
- {% macro vote_details(vote) %}
- <div>{% if vote.user_id %}<a href="{% url 'user' user=vote.user_id, username=vote.user_slug %}">{{ vote.user_name }}</a>{% else %}<em><strong>{{ vote.user_name }}</strong></em>{% endif %}</div>
- <div class="muted{% if acl.users.can_see_users_trails() %} tooltip-top{% endif %}"{% if acl.users.can_see_users_trails() %} title="{{ vote.agent }}"{% endif %}>{{ vote.date|reldate }}{% if acl.users.can_see_users_trails() %}, {{ vote.ip }}{% endif %}</div>
- {% endmacro %}
|