PonyConf/proposals/templates/proposals/talk_list.html

106 lines
4.0 KiB
HTML
Raw Normal View History

2016-06-07 20:59:13 +00:00
{% extends 'base.html' %}
2016-09-18 00:00:46 +00:00
{% load bootstrap3 i18n %}
2016-06-07 20:59:13 +00:00
{% block talktab %} class="active"{% endblock %}
{% block content %}
2016-09-18 00:00:46 +00:00
<h1>{% trans "Talks" %}</h1>
2016-09-18 16:43:32 +00:00
<a class="btn btn-primary" role="button" data-toggle="collapse" href="#filter" aria-expanded="{{ show_filters|yesno:"true,false" }}" aria-controls="filter">{% trans "Show filtering options…" %}</a>
2016-09-18 00:00:46 +00:00
<br /><br />
<div class="collapse{{ show_filters|yesno:" in," }}" id="filter">
<div class="well">
<form class="form-horizontal" method="get">
<div class="row">
<div class="col-md-4 col-xs-6">
2016-09-18 15:15:10 +00:00
{% bootstrap_field filter_form.status layout="horizontal" %}
2016-09-21 22:53:09 +00:00
{% bootstrap_field filter_form.kind layout="horizontal" %}
{% bootstrap_field filter_form.vote layout="horizontal" %}
{% bootstrap_field filter_form.room layout="horizontal" %}
{% bootstrap_field filter_form.scheduled layout="horizontal" %}
2016-09-18 00:00:46 +00:00
</div>
<div class="col-md-4 col-xs-6">
2016-09-18 15:15:10 +00:00
{% bootstrap_field filter_form.topic layout="horizontal" %}
2016-09-18 00:00:46 +00:00
</div>
2016-09-21 22:53:09 +00:00
<div class="col-md-4 col-xs-6">
{% bootstrap_field filter_form.track layout="horizontal" %}
</div>
2016-09-18 00:00:46 +00:00
</div>
2016-09-18 16:43:32 +00:00
<input type="submit" class="btn btn-success" value="{% trans "Filter" %}">
2016-09-18 00:00:46 +00:00
</form>
</div>
</div>
<table class="table table-bordered table-hover">
<thead>
<tr>
2016-09-18 15:15:10 +00:00
<th class="text-center">{% trans "Title" %} <a href="?{{ sort_urls.title }}"><span class="glyphicon glyphicon-{{ sort_glyphicons.title }} pull-right"></span></a></th>
<th class="text-center">{% trans "Intervention kind" %} <a href="?{{ sort_urls.kind }}"><span class="glyphicon glyphicon-{{ sort_glyphicons.kind }} pull-right"></span></a></th>
<th class="text-center">{% trans "Speakers" %}</th>
<th class="text-center">{% trans "Topics" %}</th>
2016-09-21 22:53:09 +00:00
<th class="text-center">{% trans "Track" %}</th>
2016-09-18 15:15:10 +00:00
<th class="text-center">{% trans "Status" %} <a href="?{{ sort_urls.status }}"><span class="glyphicon glyphicon-{{ sort_glyphicons.status }} pull-right"></span></a></th>
2016-09-18 00:00:46 +00:00
</tr>
</thead>
{% for talk in talk_list %}
{% if forloop.first %}
<tbody>
{% endif %}
2016-09-21 22:53:09 +00:00
<tr class="clickable-row {{ talk.accepted|yesno:"success,danger,warning" }}" data-href="{% url 'show-talk' talk.slug %}">
<td>{{ talk.title }}</td>
<td>{{ talk.event }}</td>
<td>
2016-09-18 00:00:46 +00:00
{% for speaker in talk.speakers.all %}
2016-10-09 14:15:11 +00:00
{{ speaker.profile }}
2016-09-18 00:00:46 +00:00
{% if forloop.revcounter == 2 %} {% trans "and" %} {% elif not forloop.last %}, {% endif %}
{% empty %}
{% endfor %}
</td>
2016-09-21 22:53:09 +00:00
<td>
2016-09-18 00:00:46 +00:00
{% for topic in talk.topics.all %}
2016-09-28 19:35:53 +00:00
<span class="badge">{{ topic }}</span>
2016-09-18 00:00:46 +00:00
{% endfor %}
</td>
2016-09-21 22:53:09 +00:00
<td>{{ talk.track|default:"" }}</td>
<td>
2016-09-18 00:00:46 +00:00
{% if talk.accepted == True %}
{% trans "Accepted" %}
{% elif talk.accepted == False %}
{% trans "Declined" %}
{% else %}
2016-09-21 20:43:34 +00:00
{% blocktrans with score=talk.score|floatformat:1 %}Pending, score: {{ score }}{% endblocktrans %}
2016-09-18 00:00:46 +00:00
{% endif %}
</td>
</tr>
{% if forloop.last%}
</tbody>
{% endif %}
{% endfor %}
<tfoot>
<tr>
<th colspan="5">{% trans "Total:" %} {{ talk_list|length }} {% trans "talk" %}{{ talk_list|length|pluralize }}</th>
</tr>
</tfoot>
</table>
{% endblock %}
2016-06-07 20:59:13 +00:00
2016-09-18 00:00:46 +00:00
{% block js_end %}
<script type="text/javascript">
jQuery(document).ready(function($) {
$(".clickable-row").click(function() {
window.location = $(this).data("href");
});
2016-06-07 20:59:13 +00:00
2016-09-18 00:00:46 +00:00
var anchor = window.location.hash.replace("#", "");
if (anchor == "filter") {
$("#filter").collapse('show');
}
});
</script>
2016-06-07 20:59:13 +00:00
{% endblock %}