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,12 +23,12 @@
|
|||||||
<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>
|
||||||
@ -32,8 +36,10 @@
|
|||||||
{% 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 %}"
|
||||||
|
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>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
@ -43,43 +49,69 @@
|
|||||||
|
|
||||||
{% 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 perms.agenda.can_manage_agenda %}
|
||||||
{% if item.speaker_list_closed %}
|
{% if item.speaker_list_closed %}
|
||||||
<a href="{% url 'agenda_speaker_open' item.pk %}">{% trans 'Open list of speakers' %}</a>
|
<a href="{% url 'agenda_speaker_open' item.pk %}" class="btn btn-mini btn-danger">{% trans 'Open list' %}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{% url 'agenda_speaker_close' item.pk %}">{% trans 'Close list of speakers' %}</a>
|
<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" %}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<br>
|
||||||
<div id="old_speakers" class="toggle_old_speakers">
|
<div id="all_speakers" class="collapse out">
|
||||||
<a href="#">{% trans "Hide old speakers" %}</a>
|
|
||||||
<ol>
|
|
||||||
{% for speaker in old_speakers %}
|
{% for speaker in old_speakers %}
|
||||||
<li>
|
{% if not forloop.last %}
|
||||||
{{ speaker.time }}
|
<small>{{forloop.counter}}.
|
||||||
|
[{{ speaker.time }}h]
|
||||||
<a href="{% model_url speaker %}">{{ speaker }}</a>
|
<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">
|
<a href="{% model_url speaker 'delete' %}" title="{% trans 'Delete' %}" class="btn btn-mini">
|
||||||
<i class="icon-remove"></i>
|
<i class="icon-remove"></i>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
{% endif %}
|
||||||
|
</small><br>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ol>
|
</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>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
</small>
|
||||||
|
{% endwith %}
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
@ -95,38 +127,50 @@
|
|||||||
</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="{% url 'agenda_speaker_speak' item.pk speaker.person.person_id %}" class="btn btn-mini"><i class="icon-bell"></i> Finished speech</a>
|
||||||
<a href="{% model_url speaker 'delete' %}" title="{% trans 'Delete' %}" class="btn btn-mini">
|
<a href="{% model_url speaker 'delete' %}" title="{% trans 'Delete' %}" class="btn btn-mini">
|
||||||
<i class="icon-remove"></i>
|
<i class="icon-remove"></i>
|
||||||
</a>
|
</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 %}
|
{% if is_speaker %}
|
||||||
<a href="{% url 'agenda_speaker_delete' object.id %}">{% trans "Remove me vom speakers list." %}</a>
|
<a href="{% url 'agenda_speaker_delete' object.id %}" class="btn">{% trans "Remove me from the list" %}</a>
|
||||||
{% elif not object.speaker_list_closed %}
|
{% elif not object.speaker_list_closed %}
|
||||||
<a href="{% url 'agenda_speaker_append' object.id %}">{% trans "Put me on speakers list." %}</a>
|
<a href="{% url 'agenda_speaker_append' object.id %}" class="btn">{% trans "Put me on the list" %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</p>
|
||||||
|
|
||||||
{% if perms.can_manage_agenda %}
|
{% if perms.can_manage_agenda %}
|
||||||
<form action="" method="post">{% csrf_token %}
|
<form action="" method="post">{% csrf_token %}
|
||||||
{{ form.as_p }}
|
{% 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>
|
<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 %}
|
{% 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>
|
<a href="{% url 'user_new' %}" class="btn" title="{% trans 'Add new participant' %}"><i class="icon-add-user"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if field.errors %}
|
||||||
|
<span class="help-inline">{{ field.errors }}</span>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
</div>
|
||||||
{% 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