OpenSlides/openslides/agenda/templates/agenda/view.html
2013-05-11 13:53:43 +02:00

163 lines
7.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "base.html" %}
{% load i18n %}
{% load tags %}
{% load staticfiles %}
{% block title %}{{ block.super }} {{ item.title }}{% endblock %}
{% block header %}
<link type="text/css" rel="stylesheet" media="all" href="{% static 'styles/agenda.css' %}" />
<link rel="stylesheet" href="{% static 'styles/jquery-ui/jquery-ui.custom.min.css' %}" />
{% endblock %}
{% block javascript %}
<script type="text/javascript" src="{% static 'javascript/jquery-ui.custom.min.js' %}"></script>
<script type="text/javascript" src="{% static 'javascript/agenda.js' %}"></script>
{% endblock %}
{% block content %}
<h1>
{{ item }}
<small class="pull-right">
<div class="btn-toolbar">
<a href="{% url 'item_overview' %}" class="btn btn-mini"><i class="icon-chevron-left"></i> {% trans "Back to overview" %}</a>
{% if perms.agenda.can_manage_agenda %}
<div class="btn-group">
<a data-toggle="dropdown" href="#" class="btn btn-mini dropdown-toggle">
{% trans 'More actions' %}
<span class="caret"></span>
</a>
<ul class="dropdown-menu pull-right">
<li><a href="{% url 'item_edit' item.id %}"><i class="icon-edit"></i> {% trans 'Edit item' %}</a></li>
<li><a href="{% url 'item_delete' item.id %}"><i class="icon-remove"></i> {% trans 'Delete item' %}</a></li>
</ul>
{% endif %}
</div>
{% if perms.projector.can_manage_projector %}
<a href="{% url 'projector_activate_slide' item.sid %}"
class="activate_link btn btn-mini {% if item.active and not show_list %}btn-primary{% endif %}"
rel="tooltip" data-original-title="{% trans 'Show' %}">
<i class="icon icon-facetime-video {% if item.active and not show_list %}icon-white{% endif %}"></i>
</a>
{% endif %}
</div>
</small>
</h1>
<p>{{ item.text|safe|linebreaks }}</p>
{% if perms.agenda.can_manage_agenda %}
{% if item.comment %}
<h3>{% trans "Comment" %}</h3>
<p>{{ item.comment|linebreaks }}</p>
{% endif %}
{% endif %}
{# List of Speakers #}
<h3>{% trans "List of speakers" %} {% if item.speaker_list_closed %}<span class="label label-important">{% trans 'closed' %}</span>{% endif %}</h3>
<p>
{% if perms.agenda.can_manage_agenda %}
{% if item.speaker_list_closed %}
<a href="{% url 'agenda_speaker_reopen' item.pk %}" class="btn btn-mini btn-danger">{% trans 'Open list' %}</a>
{% else %}
<a href="{% url 'agenda_speaker_close' item.pk %}" class="btn btn-mini btn-danger">{% trans 'Close list' %}</a>
{% endif %}
{% endif %}
{% if perms.projector.can_manage_projector %}
<a href="{% url 'projector_activate_slide' item.sid 'show_list_of_speakers' %}"
class="activate_link btn btn-mini {% if item.active and show_list %}btn-primary{% endif %}"
rel="tooltip" data-original-title="{% trans 'Show list of speakers' %}">
<i class="icon icon-facetime-video {% if item.active and show_list %}icon-white{% endif %}"></i>
{% trans 'Show list' %}
</a>
{% endif %}
</p>
{% if perms.agenda.can_manage_agenda %}
<form id="coming_speakers_changed_form" action="{% url 'agenda_speaker_change_order' item.pk %}" method="post" style="display:none" class="alert alert-warning">{% csrf_token %}
<button type="button" class="close" data-dismiss="alert">×</button>
<p>{% trans "Do you want to save the changed order of speakers?" %}</p>
<input id="sort_order" name="sort_order" type="hidden"></hidden>
<p>
<button class="btn" type="submit">{% trans 'Yes' %}</button>
<a href="{% url 'item_view' item.pk %}" class="btn">{% trans 'No' %}</a>
</p>
</form>
{% endif %}
<div id="complete_list_of_speakers" class="well">
{% for speaker_dict in list_of_speakers %}
{% if speaker_dict.first_in_group %}
{% if speaker_dict.type == 'old_speaker' %}
<b>{% trans "Last speakers" %}:</b>
<div class="btn-group" data-toggle="buttons-checkbox">
<button type="button" class="btn btn-mini" data-toggle="collapse" data-target="#old_speakers">
{% trans "Show all speakers" %}
</button>
</div>
{% elif speaker_dict.type == 'actual_speaker' %}
<b>{% trans 'Actual speaker' %}:</b>
{% else %}
<b>{% trans "Next speakers" %}:</b>
{% endif %}
<ul
{% if speaker_dict.type == 'old_speaker' %}
id="old_speakers" class="collapse out"
{% elif speaker_dict.type == 'coming_speaker' %}
id="coming_speakers"
{% endif %}
>
{% endif %}
<li id="speaker_{{ speaker_dict.speaker.pk }}">
{% if speaker_dict.type == 'coming_speaker' %}
<span {% if perms.agenda.can_manage_agenda %}class="ui-icon ui-icon-arrowthick-2-n-s"{% endif %}></span>
{{ speaker_dict.prefix }}.
{% else %}
[{{ speaker_dict.speaker.begin_time }}{% if speaker_dict.type == 'old_speaker' %} {{ speaker_dict.speaker.end_time }}{% endif %}]
{% endif %}
<a href="{% model_url speaker_dict.speaker %}">{{ speaker_dict.speaker }}</a>
{% if perms.agenda.can_manage_agenda %}
{% if speaker_dict.type == 'actual_speaker' %}
<a href="{% url 'agenda_speaker_end_speach' item.pk %}" class="btn btn-mini"><i class="icon-bell"></i> {% trans 'End speach' %}</a>
{% elif speaker_dict.type == 'coming_speaker' %}
<a href="{% url 'agenda_speaker_speak' item.pk speaker_dict.speaker.person.person_id %}" class="btn btn-mini"><i class="icon-bell"></i> {% trans "Next speaker" %}</a>
{% endif %}
<a href="{% model_url speaker_dict.speaker 'delete' %}" title="{% trans 'Delete' %}" class="btn btn-mini">
<i class="icon-remove"></i>
</a>
{% endif %}
</li>
{% if speaker_dict.last_in_group %}
</ul>
{% endif %}
{% endfor %}
<p>
{% if is_on_the_list_of_speakers %}
<a href="{% url 'agenda_speaker_delete' object.id %}" class="btn">{% trans "Remove me from the list" %}</a>
{% elif not object.speaker_list_closed and perms.agenda.can_be_speaker %}
<a href="{% url 'agenda_speaker_append' object.id %}" class="btn">{% trans "Put me on the list" %}</a>
{% endif %}
</p>
{% if perms.can_manage_agenda %}
<form action="" method="post">{% csrf_token %}
{% for field in form %}
<label>{{ field.label }}:</label>
<div class="control-group input-append {% if field.errors %}error{% endif %}">
{{ field }}
<button class="btn btn-primary" type="submit" title="{% trans 'Apply' %}"><i class="icon-ok icon-white"></i></button>
{% if perms.participant.can_see_participant and perms.participant.can_manage_participant %}
<a href="{% url 'user_new' %}" class="btn" title="{% trans 'Add new participant' %}"><i class="icon-add-user"></i></a>
{% endif %}
{% if field.errors %}
<span class="help-inline">{{ field.errors }}</span>
{% endif %}
</div>
{% endfor %}
</form>
{% endif %}
</div>
{% endblock %}