118 lines
4.7 KiB
HTML
118 lines
4.7 KiB
HTML
{% extends 'staff.html' %}
|
|
|
|
{% load bootstrap3 i18n %}
|
|
|
|
{% block speakerstab %} class="active"{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<h1>{% trans "Speakers" %}</h1>
|
|
|
|
<a class="btn btn-primary" role="button" data-toggle="collapse" href="#filter" aria-expanded="{{ show_filters|yesno:"true,false" }}" aria-controles="filter">{% trans "Show filtering options…" %}</a>
|
|
|
|
<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-6">
|
|
{% bootstrap_field filter_form.transport layout="horizontal" %}
|
|
{% bootstrap_field filter_form.transport_booked layout="horizontal" %}
|
|
{% bootstrap_field filter_form.sound layout="horizontal" %}
|
|
</div>
|
|
<div class="col-md-6">
|
|
{% bootstrap_field filter_form.accommodation layout="horizontal" %}
|
|
{% bootstrap_field filter_form.accommodation_booked layout="horizontal" %}
|
|
{% bootstrap_field filter_form.status layout="horizontal" %}
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
{% bootstrap_field filter_form.topic layout="horizontal" %}
|
|
</div>
|
|
<div class="col-md-6">
|
|
{% bootstrap_field filter_form.track layout="horizontal" %}
|
|
</div>
|
|
</div>
|
|
<input type="submit" class="btn btn-success" value="{% trans "Filter" %}">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<table class="table table-bordered table-hover">
|
|
<caption>{% trans "Total:" %} {{ speaker_list|length }} {% trans "speaker" %}{{ speaker_list|length|pluralize }}
|
|
</caption>
|
|
<thead>
|
|
<tr>
|
|
<th class="text-center">{% trans "Username" %}</th>
|
|
<th class="text-center">{% trans "Fullname" %}</th>
|
|
<th class="text-center">{% trans "Talk count" %}</th>
|
|
<th class="text-center">{% blocktrans context "table column title" %}Need transport?{% endblocktrans %}</th>
|
|
<th class="text-center">{% blocktrans context "table column title" %}Need accommodation?{% endblocktrans %}</th>
|
|
<th class="text-center">{% trans "Need sound?" %}</th>
|
|
<th class="text-center"></th>
|
|
</tr>
|
|
</thead>
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="7">{% trans "Contact:" %} <a href="{{ contact_link }}">{% trans "link" %}</a></td>
|
|
</tr>
|
|
</tfoot>
|
|
{% for speaker in speaker_list %}
|
|
{% if forloop.first %}
|
|
<tbody>
|
|
{% endif %}
|
|
<tr>
|
|
<td><a href="{% url 'show-participant' username=speaker.user.username %}">{{ speaker.user.username }}</a></td>
|
|
<td>{{ speaker.user.get_full_name }}</td>
|
|
<td class="text-right">{{ speaker.not_refused_talk_set.count }}{% if speaker.pending_talk_set.count %} ({{ speaker.pending_talk_set.count }} pending){% endif %}</td>
|
|
{% if speaker.need_transport %}
|
|
<td class="{% if speaker.transport_booked %}success{% else %}warning{% endif %}">
|
|
{% for transport in speaker.transport.all %}
|
|
{% if not forloop.first %}, {% endif %}
|
|
{{ transport }}
|
|
{% empty %}
|
|
Yes
|
|
{% endfor %}
|
|
</td>
|
|
{% elif speaker.need_transport is None %}
|
|
<td>?</td>
|
|
{% else %}
|
|
<td>No</td>
|
|
{% endif %}
|
|
<td{% if speaker.accommodation is not None and speaker.accommodation != speaker.ACCOMMODATION_NO %} class="{% if speaker.accommodation_booked %}success{% else %}warning{% endif %}"{% endif %}>
|
|
{% if speaker.accommodation is None %}
|
|
?
|
|
{% else %}
|
|
{{ speaker.get_accommodation_display }}
|
|
{% endif %}
|
|
</td>
|
|
{% if speaker.sound %}
|
|
<td class="warning">Yes</td>
|
|
{% else %}
|
|
<td>No</td>
|
|
{% endif %}
|
|
<td>
|
|
<a class="btn btn-{% if speaker.conversation.messages.last.author == speaker.user %}primary{% else %}default{% endif %}" href="{% url 'user-conversation' speaker.user.username %}">{% trans "Contact" %}</a>
|
|
</td>
|
|
</tr>
|
|
{% if forloop.last %}
|
|
</tbody>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</table>
|
|
|
|
{% endblock %}
|
|
|
|
{% block js_end %}
|
|
<script type="text/javascript">
|
|
jQuery(document).ready(function($) {
|
|
var anchor = window.location.hash.replace("#", "");
|
|
if (anchor == "filter") {
|
|
$("#filter").collapse('show');
|
|
}
|
|
});
|
|
</script>
|
|
{% endblock %}
|