fixing and improving templates
This commit is contained in:
parent
374d7a97cb
commit
75dd322721
|
@ -12,7 +12,7 @@
|
|||
{% endfor %}
|
||||
<i>in</i>
|
||||
{% for topic in talk.topics.all %}
|
||||
{{ topic.get_link }}
|
||||
<a href="{% url 'list-talks-by-topic' topic.slug %}">{{ topic }}</a>
|
||||
{% if forloop.revcounter == 2 %} and {% elif not forloop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
</li>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
<ul>
|
||||
{% for topic in talk.topics.all %}
|
||||
<li>{{ topic.get_link }}</li>
|
||||
<li><a href="{% url 'list-talks-by-topic' topic.slug %}">{{ topic }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
|
|
|
@ -14,6 +14,23 @@
|
|||
|
||||
<h1>{{ topic }}</h1>
|
||||
|
||||
{% if request.user.is_superuser %}
|
||||
<a href="{% url 'edit-talk' topic.slug %}">edit</a><br />
|
||||
{% endif %}
|
||||
<a href="{% url 'list-talks-by-topic' topic.slug %}">{{ topic.talks.count }} talk{{ topic.talks.count|pluralize }}</a><br />
|
||||
|
||||
Reviewers:
|
||||
<ul>
|
||||
{% for reviewer in topic.reviewers.all %}
|
||||
<li>
|
||||
{{ reviewer }}
|
||||
{% if request|orga %} - <a href="{% url 'remove-reviewer' topic.slug reviewer.user.username %}">remove</a>{% endif %}
|
||||
</li>
|
||||
{% empty %}
|
||||
<li><i>No reviewers.</i></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% if request|orga %}
|
||||
<form class="form-inline" method="post" action="{% url 'add-reviewer' topic.slug %}" role="form" id="add-reviewer-form">
|
||||
{% csrf_token %}
|
||||
|
@ -28,16 +45,6 @@
|
|||
</form>
|
||||
{% endif %}
|
||||
|
||||
<ul>
|
||||
{% for reviewer in topic.reviewers.all %}
|
||||
<li>
|
||||
{{ reviewer }}
|
||||
{% if request|orga %} - <a href="{% url 'remove-reviewer' topic.slug reviewer.user.username %}">remove</a>{% endif %}
|
||||
</li>
|
||||
{% empty %}
|
||||
<li><i>No reviewers.</i></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -11,13 +11,14 @@
|
|||
<ul>
|
||||
{% for topic in topic_list %}
|
||||
<li>
|
||||
{{ topic }}:
|
||||
{% if request|staff %}
|
||||
{{ topic }}:
|
||||
<a href="{{ topic.get_absolute_url }}">{{ topic.reviewers.count }} reviewer{{ topic.reviewers.count|pluralize }}</a>
|
||||
and
|
||||
{% comment %}{% if topic.reviewers.exists %} ({% for reviewer in topic.reviewers.all %} {{ reviewer.get_link }} {% if not forloop.last %}, {% endif %}{% endfor %}) {% endif %}{% endcomment %}
|
||||
<a href="{% url 'list-talks-by-topic' topic.slug %}">{{ topic.talks.count }} talk{{ topic.talks.count|pluralize }}</a>
|
||||
{% else %}
|
||||
<a href="{% url 'list-talks-by-topic' topic.slug %}">{{ topic }}</a>
|
||||
{% endif %}
|
||||
<a href="{% url 'list-talks-by-topic' topic.slug %}">{{ topic.talks.count }} talk{{ topic.talks.count|pluralize }}</a>.
|
||||
{% if request.user.is_superuser %} - <a href="{% url 'edit-topic' topic.slug %}">edit</a>{% endif %}
|
||||
</li>
|
||||
{% empty %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user