123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- {% extends "sora/profiles/profile.html" %}
- {% load i18n %}
- {% load humanize %}
- {% load url from future %}
- {% import "_forms.html" as form_theme with context %}
- {% import "sora/macros.html" as macros with context %}
- {% block title %}{{ macros.page_title(_('Follows'), profile.username) }}{% endblock %}
- {% block tab %}
- <h2>{% trans username=profile.username %}Who {{ username }} Follows{% endtrans %} <small>{% if items_total -%}
- {% trans count=items_total, total=items_total|intcomma, username=profile.username -%}
- {{ username }} follows one member
- {%- pluralize -%}
- {{ username }} follows {{ total }} members
- {%- endtrans %}
- {%- else -%}
- {% trans username=profile.username %}{{ username }} follows nobody{% endtrans %}
- {%- endif %}</small></h2>
- {% if items_total %}
- <div class="list-nav">
- {{ pager() }}
- </div>
- <table class="table table-striped table-users">
- <thead>
- <tr>
- <th colspan="4">{% trans count=items_total, total=items_total|intcomma, username=profile.username -%}
- {{ username }} follows one member
- {%- pluralize -%}
- {{ username }} follows {{ total }} members
- {%- endtrans %}</th>
- </tr>
- </thead>
- <tbody>
- {% for row in items|batch(4, '') %}
- <tr>
- {% for user in row %}
- <td class="span3">
- {% if user %}
- <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>
- {% else %}
-
- {% endif %}
- </td>
- {% endfor %}
- </tr>
- {% endfor %}
- </tbody>
- </table>
- <div class="list-nav">
- {{ pager() }}
- </div>
- {% else %}
- <p class="lead">{% trans username=profile.username %}{{ username }} follows nobody{% endtrans %}</p>
- {% endif %}
- {% endblock %}
- {% macro pager() -%}
- <ul class="pager pull-left">
- {%- 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 -%}
- {%- 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 -%}
- <li class="count">
- {%- trans current_page=pagination['page'], pages=pagination['total'] -%}
- Page {{ current_page }} of {{ pages }}
- {%- endtrans -%}
- </li>
- </ul>
- {%- endmacro %}
|