follows.html 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. {% extends "sora/profiles/profile.html" %}
  2. {% load i18n %}
  3. {% load humanize %}
  4. {% load url from future %}
  5. {% import "_forms.html" as form_theme with context %}
  6. {% import "sora/macros.html" as macros with context %}
  7. {% block title %}{{ macros.page_title(_('Follows'), profile.username) }}{% endblock %}
  8. {% block tab %}
  9. <<<<<<< HEAD
  10. <h2>{% trans username=profile.username %}Who {{ username }} Follows{% endtrans %}{% if items_total %} <small>
  11. =======
  12. <h2>{% trans username=profile.username %}Who {{ username }} follows{% endtrans %}{% if items_total %} <small>
  13. >>>>>>> Fixes in new templates.
  14. {%- trans count=items_total, total=items_total|intcomma, username=profile.username -%}
  15. {{ username }} follows one member
  16. {%- pluralize -%}
  17. {{ username }} follows {{ total }} members
  18. {%- endtrans -%}</small>{%- endif %}</h2>
  19. {% if items_total %}
  20. <div class="list-nav">
  21. {{ pager() }}
  22. </div>
  23. <table class="table table-striped table-users">
  24. <thead>
  25. <tr>
  26. <th colspan="4">{% trans count=items_total, total=items_total|intcomma, username=profile.username -%}
  27. {{ username }} follows one member
  28. {%- pluralize -%}
  29. {{ username }} follows {{ total }} members
  30. {%- endtrans %}</th>
  31. </tr>
  32. </thead>
  33. <tbody>
  34. {% for row in items|batch(4, '') %}
  35. <tr>
  36. {% for user in row %}
  37. <td class="span3">
  38. {% if user %}
  39. <a href="{% url 'user' username=user.username_slug, user=user.pk %}"><img src="{{ user.get_avatar(42) }}" class="avatar" alt=""> <strong>{{ user.username }}</strong>{% if user.title or (in_search and user.get_title()) %} <span class="muted">{% if in_search%}{{ _(user.get_title()) }}{% else %}{{ _(user.title) }}{% endif %}</span>{% endif %}</a>
  40. {% else %}
  41. &nbsp;
  42. {% endif %}
  43. </td>
  44. {% endfor %}
  45. </tr>
  46. {% endfor %}
  47. </tbody>
  48. </table>
  49. <div class="list-nav">
  50. {{ pager() }}
  51. </div>
  52. {% else %}
  53. <p class="lead">{% trans username=profile.username %}{{ username }} follows nobody at this time{% endtrans %}</p>
  54. {% endif %}
  55. {% endblock %}
  56. {% macro pager() -%}
  57. <ul class="pager pull-left">
  58. {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{% url 'user_follows' user=profile.id, username=profile.username_slug, page=pagination['prev'] %}{% else %}{% url 'user_follows' user=profile.id, username=profile.username_slug %}{% endif %}" class="tooltip-top" title="{% trans %}Previous Page{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
  59. {%- if pagination['next'] > 0 %}<li><a href="{% url 'user_follows' user=profile.id, username=profile.username_slug, page=pagination['next'] %}" class="tooltip-top" title="{% trans %}Next Page{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
  60. <li class="count">
  61. {%- trans current_page=pagination['page'], pages=pagination['total'] -%}
  62. Page {{ current_page }} of {{ pages }}
  63. {%- endtrans -%}
  64. </li>
  65. </ul>
  66. {%- endmacro %}