12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- {% extends "cranefly/profiles/profile.html" %}
- {% load i18n %}
- {% load humanize %}
- {% load url from future %}
- {% import "_forms.html" as form_theme with context %}
- {% import "cranefly/macros.html" as macros with context %}
- {% block title %}{{ macros.page_title(_('Followers'), profile.username) }}{% endblock %}
- {% block tab %}
- <h2>{% if items_total %}
- {%- trans count=items_total, total=items_total|intcomma, username=profile.username -%}
- {{ username }} is followed by one member
- {%- pluralize -%}
- {{ username }} is followed by {{ total }} members
- {%- endtrans -%}
- {%- else -%}
- {% trans username=profile.username %}{{ username }} has no followers{% endtrans %}
- {%- endif %}</h2>
- {% if items_total %}
- <div class="user-list user-followers">
- <table class="table table-striped">
- <thead>
- <tr>
- <th colspan="4">{% trans username=profile.username %}Users that are following {{ username }}{% endtrans %}</th>
- </tr>
- </thead>
- <tbody>
- {% for row in items|batch(4, '') %}
- <tr>
- {% for user in row %}
- <td class="span3 user-cell">
- {% if user %}
- <a href="{% url 'user' username=user.username_slug, user=user.pk %}" class="user-avatar"><img src="{{ user.get_avatar(42) }}" alt=""></a>
- <p class="user-details">
- <a href="{% url 'user' username=user.username_slug, user=user.pk %}">{{ user.username }}</a>
- {% if user.title or user.get_title() %}<span class="user-info">{% if user.get_title() %}{{ _(user.get_title()) }}{% else %}{{ _(user.title) }}{% endif %}</span>{% endif %}
- </p>
- {% else %}
-
- {% endif %}
- </td>
- {% endfor %}
- </tr>
- {% endfor %}
- </tbody>
- </table>
- {{ pager() }}
- </div>
- {% endif %}
- {% endblock %}
- {% macro pager() -%}
- {% if pagination['total'] > 1 %}
- <div class="pagination">
- <ul>
- <li class="count">{{ macros.pager_label(pagination) }}</li>
- {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{% url 'user_followers' user=profile.id, username=profile.username_slug, page=pagination['prev'] %}{% else %}{% url 'user_followers' 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_followers' 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 -%}
- </ul>
- </div>
- {% endif %}
- {%- endmacro %}
|