salvi/templates/circles/list.jinja2

65 lines
2.3 KiB
Django/Jinja
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "base.html" %}
{% block title %}Circles {{ app_name }}{% endblock %}
{% block content %}
<p>Showing: <strong>{{ cat }}</strong></p>
<fieldset>
<legend>Show by:</legend>
<p><strong>Type</strong>:
{% set typ_list = [
'INTJ', 'INTP', 'INFJ', 'INFP', 'ENTJ', 'ENTP',
'ENFJ', 'ENFP', 'ISTJ', 'ISTP', 'ISFJ', 'ISFP',
'ESTJ', 'ESTP', 'ESFJ', 'ESFP'] %}
{% for t in typ_list %}
<a href="/circles/{{ t.lower() }}">{{ t }}</a> ·
{% endfor %}
</p>
<p><strong>Status</strong>:
{% set typ_list = ['Green', 'Yellow', 'Orange', 'Red'] %}
{% for t in typ_list %}
<a href="/circles/{{ t.lower() }}">{{ t }}</a> ·
{% endfor %}
</p>
<p><strong>Area</strong>:
{% for t in range(1, 13) %}
<a href="/circles/area-{{ t }}">{{ t }}</a> ·
{% endfor %}
<a href="/circles/no-area">Unassigned</a>
</p>
<p><a href="/circles/stats">Stats</a> · <a href="/circles/new">Add new</a>.</p>
</div>
{% if count > people.count() %}
<p>Showing <strong>{{ people.count() }}</strong> people of <strong>{{ count }}</strong> total.</p>
{% if count > pageno * 50 %}
<p><a href="?page={{ pageno + 1 }}" rel="nofollow">Next page</a>{% if pageno > 1 %} · <a href="?page={{ pageno - 1 }}" rel="nofollow">Prev page</a>{% endif %}</p>
{% elif pageno > 1 %}
<a href="?page={{ pageno - 1 }}" rel="nofollow">Prev page</a></p>
{% endif %}
{% else %}
<p><strong>{{ count }}</strong> people.</p>
{% endif %}
<ul class="circles-list">
{% for p in people %}
<li class="circles-{{ 'red' if p.status == -1 else 'green' if p.status == 2 else 'yellow' if p.status == 1 else 'orange' }}">
<span class="circles-li-code">{{ p.code }}</span>
<span>{{ p.display_name }} {{ p.type }} {% if p.area %}Area {{ p.area }}{% else %}No area{% endif %} (<a href="/circles/edit/{{ p.code }}">edit</a>)</span>
</li>
{% endfor %}
</ul>
{% if count > people.count() %}
<p>Showing <strong>{{ people.count() }}</strong> people of <strong>{{ count }}</strong> total.</p>
{% if count > pageno * 50 %}
<p><a href="?page={{ pageno + 1 }}" rel="nofollow">Next page</a>{% if pageno > 1 %} · <a href="?page={{ pageno - 1 }}" rel="nofollow">Prev page</a>{% endif %}</p>
{% elif pageno > 1 %}
<a href="?page={{ pageno - 1 }}" rel="nofollow">Prev page</a></p>
{% endif %}
{% else %}
<p><strong>{{ count }}</strong> people.</p>
{% endif %}
{% endblock %}