Updated template and some minor fixed for list of speakers. Updated projector slide.
This commit is contained in:
parent
fa95119936
commit
1a416e5726
@ -63,7 +63,7 @@ class ItemOrderForm(CssClassMixin, forms.Form):
|
|||||||
class AppendSpeakerForm(CssClassMixin, forms.Form):
|
class AppendSpeakerForm(CssClassMixin, forms.Form):
|
||||||
speaker = PersonFormField(
|
speaker = PersonFormField(
|
||||||
widget=forms.Select(attrs={'class': 'medium-input'}),
|
widget=forms.Select(attrs={'class': 'medium-input'}),
|
||||||
label=ugettext_lazy("Set a person to the speaker list."))
|
label=ugettext_lazy("Add participant"))
|
||||||
|
|
||||||
def __init__(self, item, *args, **kwargs):
|
def __init__(self, item, *args, **kwargs):
|
||||||
self.item = item
|
self.item = item
|
||||||
@ -73,6 +73,6 @@ class AppendSpeakerForm(CssClassMixin, forms.Form):
|
|||||||
speaker = self.cleaned_data['speaker']
|
speaker = self.cleaned_data['speaker']
|
||||||
if Speaker.objects.filter(person=speaker, item=self.item, time=None).exists():
|
if Speaker.objects.filter(person=speaker, item=self.item, time=None).exists():
|
||||||
raise forms.ValidationError(ugettext_lazy(
|
raise forms.ValidationError(ugettext_lazy(
|
||||||
'%s is allready on the list of speakers.'
|
'%s is already on the list of speakers.'
|
||||||
% speaker))
|
% unicode(speaker)))
|
||||||
return speaker
|
return speaker
|
||||||
|
@ -34,15 +34,6 @@ function hideClosedSlides(hide) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleOldSpeakers() {
|
|
||||||
$('#show_old_speakers').toggle();
|
|
||||||
$('#old_speakers').toggle();
|
|
||||||
}
|
|
||||||
|
|
||||||
$('.toggle_old_speakers > a').click(function() {
|
|
||||||
toggleOldSpeakers();
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#speaker_list_changed_form').submit(function() {
|
$('#speaker_list_changed_form').submit(function() {
|
||||||
$('#sort_order').val($('#list_of_speakers').sortable("toArray"));
|
$('#sort_order').val($('#list_of_speakers').sortable("toArray"));
|
||||||
});
|
});
|
||||||
@ -95,9 +86,6 @@ $(function() {
|
|||||||
//# $('#hide_closed_items').attr('checked', true);
|
//# $('#hide_closed_items').attr('checked', true);
|
||||||
//# }
|
//# }
|
||||||
|
|
||||||
// List of Speakers
|
|
||||||
toggleOldSpeakers();
|
|
||||||
|
|
||||||
$('#list_of_speakers').sortable({axis: "y", containment: "parent", update: function(event, ui) {
|
$('#list_of_speakers').sortable({axis: "y", containment: "parent", update: function(event, ui) {
|
||||||
$('#speaker_list_changed_form').show();
|
$('#speaker_list_changed_form').show();
|
||||||
}});
|
}});
|
||||||
|
@ -21,3 +21,7 @@ table#agendatime td {
|
|||||||
padding: 3px;
|
padding: 3px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#list_of_speakers li {
|
||||||
|
line-height: 30px;
|
||||||
|
}
|
||||||
|
@ -6,6 +6,10 @@
|
|||||||
|
|
||||||
{% block title %}{{ block.super }} – {{ item.title }}{% endblock %}
|
{% block title %}{{ block.super }} – {{ item.title }}{% endblock %}
|
||||||
|
|
||||||
|
{% block header %}
|
||||||
|
<link type="text/css" rel="stylesheet" media="all" href="{% static 'styles/agenda.css' %}" />
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block javascript %}
|
{% block javascript %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
{% comment %} TODO: import the sortable-plugin in our custom jquery-file {% endcomment %}
|
{% comment %} TODO: import the sortable-plugin in our custom jquery-file {% endcomment %}
|
||||||
@ -19,23 +23,25 @@
|
|||||||
<small class="pull-right">
|
<small class="pull-right">
|
||||||
<div class="btn-toolbar">
|
<div class="btn-toolbar">
|
||||||
<a href="{% url 'item_overview' %}" class="btn btn-mini"><i class="icon-chevron-left"></i> {% trans "Back to overview" %}</a>
|
<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">
|
<div class="btn-group">
|
||||||
<a data-toggle="dropdown" href="#" class="btn btn-mini dropdown-toggle">
|
<a data-toggle="dropdown" href="#" class="btn btn-mini dropdown-toggle">
|
||||||
{% trans 'More actions' %}
|
{% trans 'More actions' %}
|
||||||
<span class="caret"></span>
|
<span class="caret"></span>
|
||||||
</a>
|
</a>
|
||||||
{% if perms.agenda.can_manage_agenda %}
|
|
||||||
<ul class="dropdown-menu pull-right">
|
<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_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>
|
<li><a href="{% url 'item_delete' item.id %}"><i class="icon-remove"></i> {% trans 'Delete item' %}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% if perms.projector.can_manage_projector %}
|
{% if perms.projector.can_manage_projector %}
|
||||||
<a href="{% url 'projector_activate_slide' item.sid %}" class="activate_link btn btn-mini {% if item.active %}btn-primary{% endif %}" rel="tooltip" data-original-title="{% trans 'Show' %}">
|
<a href="{% url 'projector_activate_slide' item.sid %}"
|
||||||
<i class="icon icon-facetime-video {% if item.active %}icon-white{% endif %}"></i>
|
class="activate_link btn btn-mini {% if item.active and not show_list %}btn-primary{% endif %}"
|
||||||
</a>
|
rel="tooltip" data-original-title="{% trans 'Show' %}">
|
||||||
{% endif %}
|
<i class="icon icon-facetime-video {% if item.active and not show_list %}icon-white{% endif %}"></i>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</small>
|
</small>
|
||||||
</h1>
|
</h1>
|
||||||
@ -43,90 +49,128 @@
|
|||||||
|
|
||||||
{% if perms.agenda.can_manage_agenda %}
|
{% if perms.agenda.can_manage_agenda %}
|
||||||
{% if item.comment %}
|
{% if item.comment %}
|
||||||
<h2>{% trans "Comment" %}</h2>
|
<h3>{% trans "Comment" %}</h3>
|
||||||
<p>{{ item.comment|linebreaks }}</p>
|
<p>{{ item.comment|linebreaks }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{# List of Speakers #}
|
{# List of Speakers #}
|
||||||
<h2>{% trans "Speaker List" %}{% if item.speaker_list_closed %}({% trans 'Closed' %}){% endif %}</h2>
|
<h3>{% trans "List of speakers" %} {% if item.speaker_list_closed %}<span class="label label-important">{% trans 'closed' %}</span>{% endif %}</h3>
|
||||||
|
<p>
|
||||||
{% if item.speaker_list_closed %}
|
{% if perms.agenda.can_manage_agenda %}
|
||||||
<a href="{% url 'agenda_speaker_open' item.pk %}">{% trans 'Open list of speakers' %}</a>
|
{% if item.speaker_list_closed %}
|
||||||
{% else %}
|
<a href="{% url 'agenda_speaker_open' item.pk %}" class="btn btn-mini btn-danger">{% trans 'Open list' %}</a>
|
||||||
<a href="{% url 'agenda_speaker_close' item.pk %}">{% trans 'Close list of speakers' %}</a>
|
{% else %}
|
||||||
|
<a href="{% url 'agenda_speaker_close' item.pk %}" class="btn btn-mini btn-danger">{% trans 'Close list' %}</a>
|
||||||
|
{% endif %}
|
||||||
{% 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>
|
||||||
|
|
||||||
<p><a href="{% url 'projector_activate_slide' item.sid 'show_list_of_speakers' %}">Show list of speakers</a></p>
|
{% endif %}
|
||||||
|
</p>
|
||||||
|
|
||||||
{% if old_speakers %}
|
{% if old_speakers %}
|
||||||
<div id="show_old_speakers" style="display:none" class="toggle_old_speakers">
|
<div class="well">
|
||||||
<a href="#">{% trans "Show old speakers" %}</a>
|
<b>{% trans "Last speakers:" %}</b>
|
||||||
{% if last_speaker %}
|
<div class="btn-group" data-toggle="buttons-checkbox">
|
||||||
<p>{% trans "Last speaker:" %} <a href="{% model_url last_speaker %}">{{ last_speaker }}</a></p>
|
<button type="button" class="btn btn-mini" data-toggle="collapse" data-target="#all_speakers">
|
||||||
{% endif %}
|
{% trans "Show all speakers" %}
|
||||||
</div>
|
</button>
|
||||||
|
</div>
|
||||||
<div id="old_speakers" class="toggle_old_speakers">
|
<br>
|
||||||
<a href="#">{% trans "Hide old speakers" %}</a>
|
<div id="all_speakers" class="collapse out">
|
||||||
<ol>
|
|
||||||
{% for speaker in old_speakers %}
|
{% for speaker in old_speakers %}
|
||||||
<li>
|
{% if not forloop.last %}
|
||||||
{{ speaker.time }}
|
<small>{{forloop.counter}}.
|
||||||
<a href="{% model_url speaker %}">{{ speaker }}</a>
|
[{{ speaker.time }}h]
|
||||||
<a href="{% model_url speaker 'delete' %}" title="{% trans 'Delete' %}" class="btn btn-mini">
|
<a href="{% model_url speaker %}">{{ speaker }}</a>
|
||||||
|
{% if perms.agenda.can_manage_agenda %}
|
||||||
|
<a href="{% model_url speaker 'delete' %}" title="{% trans 'Delete' %}" class="btn btn-mini">
|
||||||
|
<i class="icon-remove"></i>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
</small><br>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% if old_speakers %}
|
||||||
|
{% with last=old_speakers|last %}
|
||||||
|
<small>{{ old_speakers|length }}.
|
||||||
|
[{{ last.time }}h]
|
||||||
|
<a href="{% model_url last %}">{{ last }}</a>
|
||||||
|
{% if perms.agenda.can_manage_agenda %}
|
||||||
|
<a href="{% model_url last 'delete' %}" title="{% trans 'Delete' %}" class="btn btn-mini">
|
||||||
<i class="icon-remove"></i>
|
<i class="icon-remove"></i>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
{% endif %}
|
||||||
{% endfor %}
|
</small>
|
||||||
</ol>
|
{% endwith %}
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if perms.agenda.can_manage_agenda %}
|
{% if perms.agenda.can_manage_agenda %}
|
||||||
<form id="speaker_list_changed_form" action="{% url 'agenda_speaker_change_order' item.pk %}" method="post" style="display:none" class="alert alert-warning">{% csrf_token %}
|
<form id="speaker_list_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>
|
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||||
<p>{% trans "Do you want to save the changed order of speakers?" %}</p>
|
<p>{% trans "Do you want to save the changed order of speakers?" %}</p>
|
||||||
<input id="sort_order" name="sort_order" type="hidden"></hidden>
|
<input id="sort_order" name="sort_order" type="hidden"></hidden>
|
||||||
<p>
|
<p>
|
||||||
<button class="btn" type="submit">{% trans 'Yes' %}</button>
|
<button class="btn" type="submit">{% trans 'Yes' %}</button>
|
||||||
<a href="{% url 'item_view' item.pk %}" class="btn">{% trans 'No' %}</a>
|
<a href="{% url 'item_view' item.pk %}" class="btn">{% trans 'No' %}</a>
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if speakers %}
|
|
||||||
|
<div class="well">
|
||||||
|
<b>{% trans "Next speakers:" %}</b>
|
||||||
<ol {% if perms.agenda.can_manage_agenda %}id="list_of_speakers"{% endif %}>
|
<ol {% if perms.agenda.can_manage_agenda %}id="list_of_speakers"{% endif %}>
|
||||||
{% for speaker in speakers %}
|
{% for speaker in speakers %}
|
||||||
<li id="speaker_{{ speaker.pk }}">
|
<li id="speaker_{{ speaker.pk }}">
|
||||||
<a href="{% model_url speaker %}">{{ speaker }}</a>
|
<a href="{% model_url speaker %}">{{ speaker }}</a>
|
||||||
<a href="{% url 'agenda_speaker_speak' item.pk speaker.person.person_id %}">speak</a>
|
{% if perms.agenda.can_manage_agenda %}
|
||||||
<a href="{% model_url speaker 'delete' %}" title="{% trans 'Delete' %}" class="btn btn-mini">
|
<a href="{% url 'agenda_speaker_speak' item.pk speaker.person.person_id %}" class="btn btn-mini"><i class="icon-bell"></i> Finished speech</a>
|
||||||
<i class="icon-remove"></i>
|
<a href="{% model_url speaker 'delete' %}" title="{% trans 'Delete' %}" class="btn btn-mini">
|
||||||
</a>
|
<i class="icon-remove"></i>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
|
{% empty %}
|
||||||
|
<i>{% trans "The list of speakers is empty." %}</i>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ol>
|
</ol>
|
||||||
{% else %}
|
|
||||||
<p>{% trans 'The list of speakers is empty' %}</p>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
<p>
|
||||||
|
{% if is_speaker %}
|
||||||
|
<a href="{% url 'agenda_speaker_delete' object.id %}" class="btn">{% trans "Remove me from the list" %}</a>
|
||||||
|
{% elif not object.speaker_list_closed %}
|
||||||
|
<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 %}
|
||||||
|
|
||||||
{% if is_speaker %}
|
</div>
|
||||||
<a href="{% url 'agenda_speaker_delete' object.id %}">{% trans "Remove me vom speakers list." %}</a>
|
|
||||||
{% elif not object.speaker_list_closed %}
|
|
||||||
<a href="{% url 'agenda_speaker_append' object.id %}">{% trans "Put me on speakers list." %}</a>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if perms.can_manage_agenda %}
|
|
||||||
<form action="" method="post">{% csrf_token %}
|
|
||||||
{{ form.as_p }}
|
|
||||||
<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 %}
|
|
||||||
</form>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
{% block scrollcontent %}
|
{% block scrollcontent %}
|
||||||
{% if speakers %}
|
{% if speakers %}
|
||||||
<ol>
|
<ol id="list_of_speakers">
|
||||||
{% for speaker in speakers %}
|
{% for speaker in speakers %}
|
||||||
<li>{{ speaker }}</li>
|
<li>{{ speaker }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -129,17 +129,13 @@ class AgendaItemView(SingleObjectMixin, FormView):
|
|||||||
self.object = self.get_object()
|
self.object = self.get_object()
|
||||||
speakers = Speaker.objects.filter(time=None, item=self.object.pk).order_by('weight')
|
speakers = Speaker.objects.filter(time=None, item=self.object.pk).order_by('weight')
|
||||||
old_speakers = list(Speaker.objects.exclude(time=None).order_by('time'))
|
old_speakers = list(Speaker.objects.exclude(time=None).order_by('time'))
|
||||||
try:
|
|
||||||
last_speaker = old_speakers[-1]
|
|
||||||
except IndexError:
|
|
||||||
last_speaker = None
|
|
||||||
kwargs.update({
|
kwargs.update({
|
||||||
'object': self.object,
|
'object': self.object,
|
||||||
'speakers': speakers,
|
'speakers': speakers,
|
||||||
'old_speakers': old_speakers,
|
'old_speakers': old_speakers,
|
||||||
'last_speaker': last_speaker,
|
|
||||||
'is_speaker': Speaker.objects.filter(
|
'is_speaker': Speaker.objects.filter(
|
||||||
time=None, person=self.request.user, item=self.object).exists(),
|
time=None, person=self.request.user, item=self.object).exists(),
|
||||||
|
'show_list': config['presentation_argument'] == 'show_list_of_speakers',
|
||||||
})
|
})
|
||||||
return super(AgendaItemView, self).get_context_data(**kwargs)
|
return super(AgendaItemView, self).get_context_data(**kwargs)
|
||||||
|
|
||||||
|
@ -146,7 +146,12 @@ body{
|
|||||||
color: #9FA9B7;
|
color: #9FA9B7;
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
}
|
}
|
||||||
|
/* list of speakers */
|
||||||
|
#list_of_speakers li
|
||||||
|
{
|
||||||
|
font-size: 130%;
|
||||||
|
line-height: 160%;
|
||||||
|
}
|
||||||
|
|
||||||
/* Table */
|
/* Table */
|
||||||
table {
|
table {
|
||||||
|
Loading…
Reference in New Issue
Block a user