warnings.html 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. {% extends "cranefly/profiles/profile.html" %}
  2. {% import "cranefly/macros.html" as macros with context %}
  3. {% block title %}{{ macros.page_title(_('Warnings'), profile.username) }}{% endblock %}
  4. {% block tab %}
  5. <h2>{% if items_total -%}
  6. {%- trans count=items_total, total=items_total|intcomma, username=profile.username -%}
  7. {{ username }} received one warning
  8. {%- pluralize -%}
  9. {{ username }} received {{ total }} warnings
  10. {%- endtrans -%}
  11. {%- else -%}
  12. {% trans username=profile.username %}{{ username }} received no warnings{% endtrans %}
  13. {%- endif %}</h2>
  14. {% if warning_level %}
  15. <div class="warning-level">
  16. EVULZ!
  17. </div>
  18. {% else %}
  19. <div class="warning-level">
  20. NOPE!
  21. </div>
  22. {% endif %}
  23. {% if items_total %}
  24. <div class="content-list user-warnings">
  25. {% for item in items %}
  26. {{ item.reason }}
  27. <hr>
  28. {% endfor %}
  29. {{ pager() }}
  30. </div>
  31. {% endif %}
  32. {% endblock %}
  33. {% macro pager() -%}
  34. {% if pagination['total'] > 1 %}
  35. <div class="pagination">
  36. <ul>
  37. <li class="count">{{ macros.pager_label(pagination) }}</li>
  38. {%- if pagination['prev'] > 1 %}<li><a href="{{ url('user_warnings', user=profile.id, username=profile.username_slug) }}" class="tooltip-top" title="{% trans %}Lastest Warnings{% endtrans %}"><i class="icon-chevron-left"></i> {% trans %}Latest{% endtrans %}</a></li>{% endif -%}
  39. {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{{ url('user_warnings', user=profile.id, username=profile.username_slug, page=pagination['prev']) }}{% else %}{{ url('user_warnings', user=profile.id, username=profile.username_slug) }}{% endif %}" class="tooltip-top" title="{% trans %}Newer Warnings{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
  40. {%- if pagination['next'] > 0 %}<li><a href="{{ url('user_warnings', user=profile.id, username=profile.username_slug, page=pagination['next']) }}" class="tooltip-top" title="{% trans %}Older Warnings{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
  41. </ul>
  42. </div>
  43. {% endif %}
  44. {%- endmacro %}