PonyConf/cfp/templates/cfp/staff/participant_list.html

109 lines
4.1 KiB
HTML

{% extends 'cfp/staff/base.html' %}
{% load bootstrap3 i18n %}
{% block speakerstab %} class="active"{% endblock %}
{% block content %}
{% if pending_email %}
<div class="alert alert-warning">
<span class="glyphicon glyphicon-exclamation-sign"></span>
{% url 'speaker-email' as email_url %}
{% blocktrans %}You have a pending e-mail. To continue its edition, click <a href="{{ email_url }}">here</a>.{% endblocktrans %}
</div>
{% endif %}
<h1>{% trans "Speakers" %}</h1>
<p>
<a class="btn btn-primary" role="button" data-toggle="collapse" href="#filter" aria-expanded="{{ show_filters|yesno:"true,false" }}" aria-controles="filter">
{% bootstrap_icon "filter" %}&nbsp;{% trans "Show filtering options…" %}
</a>
<a class="btn btn-success" role="button" href="{% url 'participant-add' %}">
{% bootstrap_icon "plus" %}&nbsp;{% trans "Add a speaker" %}
</a>
</p>
<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.category layout="horizontal" %}
{% bootstrap_field filter_form.accepted layout="horizontal" %}
{% bootstrap_field filter_form.confirmed 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>
<form method="post">
<table class="table table-bordered table-hover">
<caption>
{% trans "Total:" %} {{ participant_list|length }} {% trans "speaker" %}{{ participant_list|length|pluralize }}
</caption>
<thead>
<tr>
<th></th>
<th class="text-center">{% trans "Name" %}</th>
<th class="text-center">{% trans "Talk count" %}</th>
{% comment %}<th class="text-center"></th>{% endcomment %}
</tr>
</thead>
<tfoot>
<tr>
<td colspan="7">
<a href="{{ contact_link }}">{% trans "contact by email" %}</a>
|
<a href="{{ csv_link }}">{% trans "download as csv" %}</a>
</td>
</tr>
</tfoot>
{% for participant in participant_list %}
{% if forloop.first %}
<tbody>
{% endif %}
<tr>
<td><input type="checkbox" name="speakers" value="{{ participant.pk }}"></td>
<td>
<a href="{% url 'participant-details' participant.pk %}">{{ participant }}</a>
{% if participant.vip %}<span class="badge pull-right">VIP</span>{% endif %}
</td>
<td>
<span class="text-success">{% blocktrans count accepted=participant.accepted_talk_count %}accepted: {{ accepted }}{% plural %}accepted: {{ accepted }}{% endblocktrans %}</span>
<span class="text-warning">{% blocktrans count pending=participant.pending_talk_count %}pending: {{ pending }}{% plural %}pending: {{ pending }}{% endblocktrans %}</span>
<span class="text-danger">{% blocktrans count refused=participant.refused_talk_count %}refused: {{ refused }}{% plural %}refused: {{ refused }}{% endblocktrans %}</span>
<span class="text-danger">{% blocktrans count canceled=participant.canceled_talk_count %}canceled: {{ canceled }}{% plural %}canceled: {{ canceled }}{% endblocktrans %}</span>
</td>
</tr>
{% if forloop.last %}
</tbody>
{% endif %}
{% endfor %}
</table>
<div id="filter">
<div class="well">
<h4>{% trans "For selected speakers:" %}</h4>
{% csrf_token %}
{% bootstrap_form_errors action_form %}
{% bootstrap_form action_form exclude="speakers" %}
{% buttons %}
<button type="submit" class="btn btn-primary">{% trans "Apply" %}</button>
{% endbuttons %}
</div>
</div>
</form>
{% endblock %}