Improve talk detail display

This commit is contained in:
numahell 2016-10-18 23:41:26 +02:00
parent af507c500c
commit f53a6ed7ce
1 changed files with 44 additions and 32 deletions

View File

@ -12,14 +12,47 @@
<a class="btn btn-success" href="{% url 'edit-talk' talk.slug %}">{% trans "Edit" %}</a><br />
{% endif %}
<h3>{% trans "Format:" %}</h3>
<p><a href="{{ talk.event.get_absolute_url }}">{{ talk.event }}</a></p>
<h3>{% trans "Abstract:" %}</h3>
<p>{% if talk.abstract %}{{ talk.abstract }}{% else %}<i>{% trans "No abstract provided." %}</i>{% endif %}</p>
{% if moderate_perm %}
<dl class="dl-horizontal">
<dt>{% trans "Format:" %}</dt>
<dd><a href="{{ talk.event.get_absolute_url }}">{{ talk.event }}</a></dd>
<dt>{% trans "Topics:" %}</dt>
{% for topic in talk.topics.all %}
<dd><a href="{{ topic.get_absolute_url }}">{{ topic }}</a></dd>
{% if not forloop.last %}, {% endif %}
{% empty %}
<dd><i>{% trans "No topics." %}</i></dd>
{% endfor %}
<dt>{% trans "Track:" %}</dt>
<dd>{% if talk.track %}
<a href="{{ talk.track.get_absolute_url }}">{{ talk.track }}</a>
{% else %}
<em>{% trans "No assigned yet." %}</em>
{% endif %}</dd>
<dt>Horaire</dt>
<dd>{% if talk.start_date %}
<span class="date">{{ talk.start_date|date:"l d b" }}</span>,
<span class="time">{{ talk.start_date|date:"H:i" }} &ndash;
{{ talk.slot.end|date:"H:i" }}</span>
{% else %}<em>{% trans "not defined" %}</em>
{% endif %}
</dd>
<dt>Salle</dt>
<dd>{% if talk.room %}
<span class="label label-info">{{ talk.room }}</span>
{% else %}<em>{% trans "not defined" %}</em>
{% endif %}
</dd>
</dl>
{% endif %}
<h3>{% trans "Description:" %}</h3>
<p>{% if talk.description %}{{ talk.description|linebreaksbr }}{% else %}<i>{% trans "No description provided." %}</i>{% endif %}</p>
@ -34,31 +67,18 @@
<i>{% trans "No speakers." %}</i>
{% endfor %}
<h3>{% trans "Topics:" %}</h3>
{% for topic in talk.topics.all %}
{% if forloop.first %}<ul>{% endif %}
<li><a href="{{ topic.get_absolute_url }}">{{ topic }}</a></li>
{% if forloop.last %}</ul>{% endif %}
{% empty %}
<i>{% trans "No topics." %}</i>
{% endfor %}
{% if moderate_perm %}
{% if not talk.track %}
<h3>{% trans "Track:" %}</h3>
{% if talk.track %}
<p><a href="{{ talk.track.get_absolute_url }}">{{ talk.track }}</a></p>
{% else %}
<p><em>{% trans "No assigned yet." %}</em></p>
{% for topic in talk.topics.distinct %}
<p><em>{% trans "No assigned yet." %}</em></p>
{% for topic in talk.topics.distinct %}
{% if forloop.first %}<p>{% endif %}
{% if topic.track %}
<a class="btn btn-primary" href="{% url 'assign-talk-to-track' talk.slug topic.track.slug %}">{% trans "Assign to" %} {{ topic.track }}</a>
{% endif %}
{% if forloop.last %}</p>{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{% endif %}
@ -69,19 +89,11 @@
{% if moderate_perm %}
<h2>{% trans "Informations" %}</h2>
<ul>
<li><b>{% trans "Date and hour:" %}</b> {% if talk.start_date %}{{ talk.start_date }} {% else %}<i>{% trans "not defined" %}</i>{% endif %}</li>
<li><b>{% trans "Duration:" %}</b> {% if talk.estimated_duration %}{{ talk.estimated_duration }} min{% else %}<i>{% trans "not defined" %}</i>{% endif %}</li>
<li><b>{% trans "Room:" %}</b> {% if talk.room %}{{ talk.room }}{% else %}<i>{% trans "not defined" %}</i>{% endif %}</li>
</ul>
<h2>{% trans "Moderation" %}</h2>
<h3>{% trans "Status:" %}</h3>
{{ talk.accepted|yesno:"Accepted,Declined,Pending decision" }}<br />
<span class="label label-{{ talk.accepted|yesno:"success,danger,warning" }}">{{ talk.accepted|yesno:"Accepted,Declined,Pending decision" }}</span><br />
{% if talk.accepted == None %}
<h3>{% trans "Vote:" %}</h3>