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. <h2>{% trans username=profile.username %}Who {{ username }} follows{% endtrans %}{% if items_total %} <small>
  10. {%- trans count=items_total, total=items_total|intcomma, username=profile.username -%}
  11. {{ username }} follows one member
  12. {%- pluralize -%}
  13. {{ username }} follows {{ total }} members
  14. {%- endtrans -%}</small>{%- endif %}</h2>
  15. {% if items_total %}
  16. <div class="list-nav">
  17. {{ pager() }}
  18. </div>
  19. <table class="table table-striped table-users">
  20. <thead>
  21. <tr>
  22. <th colspan="4">{% trans count=items_total, total=items_total|intcomma, username=profile.username -%}
  23. {{ username }} follows one member
  24. {%- pluralize -%}
  25. {{ username }} follows {{ total }} members
  26. {%- endtrans %}</th>
  27. </tr>
  28. </thead>
  29. <tbody>
  30. {% for row in items|batch(4, '') %}
  31. <tr>
  32. {% for user in row %}
  33. <td class="span3">
  34. {% if user %}
  35. <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>
  36. {% else %}
  37. &nbsp;
  38. {% endif %}
  39. </td>
  40. {% endfor %}
  41. </tr>
  42. {% endfor %}
  43. </tbody>
  44. </table>
  45. <div class="list-nav">
  46. {{ pager() }}
  47. </div>
  48. {% else %}
  49. <<<<<<< HEAD
  50. <p class="lead">{% trans username=profile.username %}{{ username }} follows nobody at this time{% endtrans %}</p>
  51. =======
  52. <p class="lead">{% trans username=profile.username %}{{ username }} follows nobody at this time{% endtrans %}</p>
  53. >>>>>>> 28e12a6695789c8465b62ee3c14f027a7fec05a3
  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 %}