Merge pull request #650 from emanuelschuetze/template-improvements

Template improvements
This commit is contained in:
Oskar Hahn 2013-05-14 14:31:53 -07:00
commit cefd509ae4
31 changed files with 238 additions and 218 deletions

View File

@ -15,13 +15,14 @@
{% trans 'I submitted the following motions:' %}
{% for motion in submitted_motions %}
<li>
<a href="{% model_url motion %}">{{ motion }}</a>
({% trans 'motion' %}
{% if motion.identifier %}
{{ motion.identifier }})
{% else %}
<i>[{% trans 'no number' %}]</i>)
{% endif %}
<a href="{% model_url motion %}">
{% if motion.identifier %}
[#{{ motion.identifier }}]
{% else %}
[---]
{% endif %}
{{ motion }}
</a>
</li>
{% empty %}
<li><i>{% trans 'None' %}</i></li>
@ -34,13 +35,14 @@
{% trans 'I support the following motions:' %}
{% for motion in supported_motions %}
<li>
<a href="{% model_url motion %}">{{ motion }}</a>
({% trans 'motion' %}
{% if motion.identifier %}
{{ motion.identifier }})
{% else %}
<i>[{% trans 'no number' %}]</i>)
{% endif %}
<a href="{% model_url motion %}">
{% if motion.identifier %}
[#{{ motion.identifier }}]
{% else %}
[---]
{% endif %}
{{ motion }}
</a>
</li>
{% empty %}
<li><i>{% trans 'None' %}</i></li>

View File

@ -202,6 +202,7 @@ class Item(MPTTModel, SlideMixin):
list_of_speakers = self.get_list_of_speakers(
old_speakers_count=config['agenda_show_last_speakers'])
data = {'title': self.get_title(),
'item': self,
'template': 'projector/agenda_list_of_speaker.html',
'list_of_speakers': list_of_speakers}
elif self.related_sid:

View File

@ -93,7 +93,10 @@ def agenda_list_of_speakers(sender, **kwargs):
list_of_speakers = slide.get_list_of_speakers(
old_speakers_count=config['agenda_show_last_speakers'],
coming_speakers_count=5)
context = {'list_of_speakers': list_of_speakers}
context = {
'list_of_speakers': list_of_speakers,
'closed': slide.speaker_list_closed,
}
return render_to_string('agenda/overlay_speaker_projector.html', context)
return Overlay(name, get_widget_html, get_projector_html)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -22,14 +22,61 @@ table#agendatime td {
white-space: nowrap;
}
/*** List of speakers ***/
/* List of speakers - projector slide */
ul#list_of_speakers {
list-style-type: none;
padding: 0;
}
#list_of_speakers li {
font-size: 130%;
line-height: 150%;
}
#list_of_speakers .old_speaker {
color: #9FA9B7;
}
#list_of_speakers .actual_speaker {
font-weight: bold;
margin-bottom: 0.5em;
}
/* List of speakers - overlay */
#overlay_list_of_speaker_box {
position: fixed;
bottom: 0;
right: 0;
border-radius: 0.4em;
border: 0.1em solid #777777;
background-color: #cccccc;
opacity: 0.9;
padding: 1em;
margin: 1em;
z-index: 2;
width: 45%;
min-width: 200px;
}
#overlay_list_of_speaker_box h3 {
margin: 5px;
}
#overlay_list_of_speaker_box ul {
margin: 5px;
}
#overlay_list_of_speaker_box li {
font-size: 120%;
line-height: 120%;
}
#overlay_list_of_speaker_box .old_speaker {
color: #777777;
}
#overlay_list_of_speaker_box .actual_speaker {
margin-bottom: 0em;
}
/* List of speakers - agenda item view */
div#complete_list_of_speakers li {
list-style-type: none;
}
div#complete_list_of_speakers li {
line-height: 30px;
}
#coming_speakers span.ui-icon {
position: absolute;
margin-left: -15px;

View File

@ -6,8 +6,15 @@
<div class="manage">
<span style="width: 1px; white-space: nowrap;">
{% if perms.projector.can_manage_projector %}
<a href="{% url 'projector_activate_slide' node.sid %}" class="activate_link btn {% if node.active %}btn-primary{% endif %} btn-mini" title="{% trans 'Show' %}">
<i class="icon-facetime-video {% if node.active %}icon-white{% endif %}"></i>
<a href="{% url 'projector_activate_slide' node.sid %}"
class="activate_link btn {% if node.active and not show_list %}btn-primary{% endif %} btn-mini"
rel="tooltip" data-original-title="{% trans 'Show agenda item' %}">
<i class="icon-facetime-video {% if node.active and not show_list %}icon-white{% endif %}"></i>
</a>
<a href="{% url 'projector_activate_slide' node.sid 'show_list_of_speakers' %}"
class="activate_link btn btn-mini {% if node.active and show_list %}btn-primary{% endif %}"
rel="tooltip" data-original-title="{% trans 'Show list of speakers' %}">
<i class="icon icon-bell {% if node.active and show_list %}icon-white{% endif %}"></i>
</a>
{% endif %}
{% if perms.agenda.can_manage_agenda %}

View File

@ -1,57 +1,19 @@
{% load i18n %}
{% load tags %}
<style type="text/css">
#overlay_list_of_speaker_box {
position: fixed;
bottom: 0;
right: 0;
border-radius: 0.4em;
border: 0.1em solid #777777;
background-color: #cccccc;
opacity: 0.9;
padding: 0 .5em;
margin: 1em;
z-index: 2;
width: 30%;
min-width: 200px;
}
#overlay_list_of_speaker_box h3 {
margin: 5px;
}
#overlay_list_of_speaker_box ul {
list-style-type: None;
padding-left: 0;
margin: 5px;
}
#overlay_list_of_speaker_box li {
margin-bottom: 1px;
}
#overlay_list_of_speaker_box li span.number {
display: block;
float: left;
width: 1.3em;
}
</style>
<div id="overlay_list_of_speaker_box">
<h3>{% trans 'List of speakers' %}:</h3>
<h3>{% trans "List of speakers" %} {% if closed %}(<span class="closed">{% trans 'closed' %}</span>){% endif %}</h3>
{% if list_of_speakers %}
<ul>
<ul id="list_of_speakers">
{% for speaker_dict in list_of_speakers %}
<li>
{% if speaker_dict.type == 'actual_speaker' %}
<span class="number"></span><strong>
{% else %}
<span class="number">{{ speaker_dict.prefix }}</span>
{% endif %}
<span class="name">{{ speaker_dict.speaker }}</span>
{% if speaker_dict.type == 'actual_speaker' %}
</strong>
<li class="{{speaker_dict.type}}"> {# old_speaker, actual_speaker, coming_speaker #}
{% if speaker_dict.type == 'coming_speaker' %}
{{ speaker_dict.prefix }}.
{% endif %}
{{ speaker_dict.speaker }}
</li>
{% endfor %}
</ul>
</ul>
{% else %}
<i>{% trans 'The list of speakers is empty.' %}</i>
{% endif %}

View File

@ -96,7 +96,9 @@
<td class="manage">
{% if perms.projector.can_manage_projector %}
<span>
<a href="{% url 'projector_activate_slide' 'agenda' %}" class="activate_link btn {% if active_sid == 'agenda' %}btn-primary{% endif %} btn-mini" title="{% trans 'Show' %}">
<a href="{% url 'projector_activate_slide' 'agenda' %}"
class="activate_link btn {% if active_sid == 'agenda' %}btn-primary{% endif %} btn-mini"
rel="tooltip" data-original-title="{% trans 'Show agenda' %}">
<i class="icon-facetime-video {% if active_sid == 'agenda' %}icon-white{% endif %}"></i>
</a>
</span>

View File

@ -1,6 +1,11 @@
{% load i18n %}
{% load tags %}
<div>
<a href="{% url 'agenda_current_list_of_speakers' %}" class="btn">{% trans 'Put me on the current list of speakers' %}</a>
</div>
<p><a href="{% url 'agenda_add_to_current_list_of_speakers' %}" class="btn"><i class="icon icon-speaker"></i> {% trans 'Put me on the current list of speakers' %}</a></p>
<p><a href="{% url 'agenda_current_list_of_speakers' %}" class="btn"><i class="icon icon-bell"></i> {% trans 'Go to current list of speakers' %}</a></p>
{% if perms.agenda.can_manage_agenda %}
<hr>
<a href="{% url 'agenda_current_list_of_speakers' %}" class="btn btn-mini"><i class="icon icon-bell"></i> {% trans 'Next speaker' %}</a>
{% endif %}

View File

@ -29,7 +29,7 @@
<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_edit' item.id %}"><i class="icon-pencil"></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 %}
@ -67,7 +67,7 @@
<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>
<i class="icon icon-bell {% if item.active and show_list %}icon-white{% endif %}"></i>
{% trans 'Show list' %}
</a>
{% endif %}
@ -96,7 +96,7 @@
</button>
</div>
{% elif speaker_dict.type == 'actual_speaker' %}
<b>{% trans 'Actual speaker' %}:</b>
<b>{% trans 'Current speaker' %}:</b>
{% else %}
<b>{% trans "Next speakers" %}:</b>
{% endif %}
@ -113,14 +113,14 @@
<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 %}]
<small class="grey">[{{ speaker_dict.speaker.begin_time }}{% if speaker_dict.type == 'old_speaker' %} {{ speaker_dict.speaker.end_time }}{% endif %}]</small>
{% 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>
<a href="{% url 'agenda_speaker_end_speach' item.pk %}" class="btn btn-mini btn-danger"><i class="icon-bell icon-white"></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>
<a href="{% url 'agenda_speaker_speak' item.pk speaker_dict.speaker.person.person_id %}" class="btn btn-mini"><i class="icon-bell"></i> {% trans "Begin speach" %}</a>
{% endif %}
<a href="{% model_url speaker_dict.speaker 'delete' %}" title="{% trans 'Delete' %}" class="btn btn-mini">
<i class="icon-remove"></i>

View File

@ -19,7 +19,7 @@
{% for item in items %}
<li class="{% if item.active %}activeline{% endif %}">
<a href="{% url 'projector_activate_slide' item.sid %}"
class="activate_link btn {% if item.active and not summary and not speakers %}btn-primary{% endif %} btn-mini"
class="activate_link btn {% if item.active and not summary and not speakers %}btn-primary{% endif %} btn-mini"
rel="tooltip" data-original-title="{% trans 'Show' %}">
<i class="icon-facetime-video {% if item.active and not summary and not speakers %}icon-white{% endif %}"></i>
</a>&nbsp;
@ -51,4 +51,3 @@
<li>{% trans 'No items available.' %}</li>
{% endfor %}
</ul>

View File

@ -7,40 +7,27 @@
{% block content %}
<h1>{{ title }}</h1>
<h2 style="margin-top: -15px;">{% trans 'List of speakers' %}</h2>
<h2 style="margin-top: -10px;">
{% trans 'List of speakers' %}
{% if item.speaker_list_closed %}(<span class="closed">{% trans 'closed' %}</span>){% endif %}
</h2>
{% endblock %}
{% block scrollcontent %}
<style type="text/css">
ul#list_of_speakers {
list-style-type: None;
}
#overlay_list_of_speaker_box li {
margin-bottom: 1px;
}
#overlay_list_of_speaker_box li span.number {
display: block;
float: left;
width: 1.3em;
}
</style>
<p>
{% if list_of_speakers %}
<ul id="list_of_speakers">
{% for speaker_dict in list_of_speakers %}
<li>
{% if speaker_dict.type == 'actual_speaker' %}
<span class="number"></span><strong>
{% else %}
<span class="number">{{ speaker_dict.prefix }} </span>
{% endif %}
<span class="name">{{ speaker_dict.speaker }}</span>
{% if speaker_dict.type == 'actual_speaker' %}
</strong>
<li class="{{speaker_dict.type}}"> {#o ld_speaker, actual_speaker, coming_speaker #}
{% if speaker_dict.type == 'coming_speaker' %}
{{ speaker_dict.prefix }}.
{% endif %}
{{ speaker_dict.speaker }}
</li>
{% endfor %}
</ul>
{% else %}
<i>{% trans 'The list of speakers is empty.' %}</i>
{% endif %}
</p>
{% endblock %}

View File

@ -60,7 +60,7 @@ urlpatterns = patterns(
name='print_agenda',
),
# Speaker List
# List of speakers
url(r'^(?P<pk>\d+)/speaker/$',
SpeakerAppendView.as_view(),
name='agenda_speaker_append',
@ -101,8 +101,14 @@ urlpatterns = patterns(
name='agenda_speaker_change_order',
),
url(r'^list_of_speakers/add/$',
CurrentListOfSpeakersView.as_view(set_speaker=True),
name='agenda_add_to_current_list_of_speakers',
),
url(r'^list_of_speakers/$',
CurrentListOfSpeakersView.as_view(),
name='agenda_current_list_of_speakers',
),
)

View File

@ -18,6 +18,7 @@ from django.core.urlresolvers import reverse
from django.contrib import messages
from django.db import transaction
from django.db.models import Model
from django.template import RequestContext
from django.utils.translation import ugettext as _, ugettext_lazy
from django.views.generic.detail import SingleObjectMixin
@ -81,7 +82,8 @@ class Overview(TemplateView):
'active_sid': get_active_slide(only_sid=True),
'duration': duration,
'start': start,
'end': end})
'end': end,
'show_list': config['presentation_argument'] == 'show_list_of_speakers'})
return context
@transaction.commit_manually
@ -436,6 +438,8 @@ class CurrentListOfSpeakersView(RedirectView):
"""
Redirect to the current list of speakers and set the request.user on it.
"""
set_speaker = False
def get_item(self):
"""
Returns the current Item, or None, if the current Slide is not an Agenda Item.
@ -467,19 +471,18 @@ class CurrentListOfSpeakersView(RedirectView):
'Please choose the agenda item manually from the agenda.'))
return reverse('dashboard')
if item.speaker_list_closed:
messages.error(request, _('The list of speakers is closed.'))
return reverse('dashboard')
if self.set_speaker:
if item.speaker_list_closed:
messages.error(request, _('The list of speakers is closed.'))
return reverse('dashboard')
if self.request.user.has_perm('agenda.can_be_speaker'):
try:
Speaker.objects.add(self.request.user, item)
except OpenSlidesError:
messages.error(request, _('You are already on the list of speakers.'))
if self.request.user.has_perm('agenda.can_be_speaker'):
try:
Speaker.objects.add(self.request.user, item)
except OpenSlidesError:
messages.error(request, _('You are already on the list of speakers.'))
else:
messages.success(request, _('You are now on the list of speakers.'))
else:
messages.error(request, _('You can not put yourself on the list of speakers.'))
messages.error(request, _('You can not put yourself on the list of speakers.'))
if not self.request.user.has_perm('agenda.can_see_agenda'):
return reverse('dashboard')
@ -519,7 +522,7 @@ def get_widgets(request):
Widget(
name='append_to_list_of_speakers',
display_name=_('To the current list of speakers'),
display_name=_('List of speakers'),
template='agenda/speaker_widget.html',
context={},
context=RequestContext(request, {}),
permission_required='agenda.can_be_speaker')]

View File

@ -217,7 +217,7 @@ msgid ""
"There is no list of speakers for the current slide. Please choose the agenda "
"item manually from the agenda."
msgstr ""
"Es existiert keine Rednerliste für die aktuelle Folie. Bitte wähle den "
"Es existiert keine Rednerliste für die aktuelle Folie. Bitte wählen Sie den "
"Tagesordnungseintrag manuell von der Tagesordnung."
#: agenda/views.py:451

View File

@ -145,9 +145,11 @@
<!-- Log -->
{% if perms.motion.can_manage_motion %}
<div class="btn-group" data-toggle="buttons-checkbox">
<button type="button" class="btn" data-toggle="collapse" data-target="#log">
{% trans "Show log" %}
</button>
</div>
<div id="log" class="collapse out">
<ul class="unstyled">
{% for message in motion.log_messages.all %}
@ -188,10 +190,6 @@
<span class="label label-info">{{ motion.state }}</span>
<br>
{% endif %}
{% for note in motion.notes %}
{{ note }}
{% if not forloop.last %}<br>{% endif %}
{% endfor %}
<!-- Vote results -->
<h5>{% trans "Vote results" %}:</h5>

View File

@ -22,6 +22,8 @@
</small>
</h1>
{% comment %}
TODO: remove this filter and add client side filtering with DataTables
<form action="{{ request.url }}" name="filter" method="get" class="form-inline">
{% if min_supporters > 0 %}
<label class="checkbox">
@ -46,6 +48,8 @@
<option value="rev" {% if 'rev' in request.GET.statusvalue %}selected{% endif %}>{% trans "Needs Review" %}</option>
</select>
</form>
{% endcomment %}
<small><i>{{ motion_list|length }}
{% blocktrans count counter=motion_list|length context "number of motions"%}motion{% plural %}motions{% endblocktrans %}
</i></small>
@ -53,11 +57,11 @@
<tr>
<th><a href="?sort=number{% if 'number' in request.GET.sort and 'reverse' not in request.GET %}&reverse{%endif%}">{% trans "#" %}</a></th>
<th><a href="?sort=title{% if 'title' in request.GET.sort and 'reverse' not in request.GET %}&reverse{%endif%}">{% trans "Motion title" %}</a></th>
<th>{% trans 'Category' %}</th>
<th class="optional">{% trans 'Category' %}</th>
{% if min_supporters > 0 %}
<th class="optional"><a href="?sort=supporter{% if 'supporter' in request.GET.sort and 'reverse' not in request.GET %}&reverse{%endif%}">{% trans "Number of supporters" %}</a></th>
{% endif %}
<th><a href="?sort=status{% if 'status' in request.GET.sort and 'reverse' not in request.GET %}&reverse{%endif%}">{% trans "Status" %}</a></th>
<th class="optional"><a href="?sort=status{% if 'status' in request.GET.sort and 'reverse' not in request.GET %}&reverse{%endif%}">{% trans "Status" %}</a></th>
<th class="optional"><a href="?sort=submitter{% if 'submitter' in request.GET.sort and 'reverse' not in request.GET %}&reverse{%endif%}">{% trans "Submitter" %}</a></th>
<th class="optional"><a href="?sort=time{% if 'time' in request.GET.sort and 'reverse' not in request.GET %}&reverse{%endif%}">{% trans "Creation Time" %}<a></th>
<th class="mini_width">{% trans "Actions" %}</th>
@ -66,11 +70,11 @@
<tr class="{% if motion.active %}activeline{% endif %}">
<td>{{ motion.identifier|default:'' }}</td>
<td><a href="{% model_url motion %}">{{ motion.title }}</a></td>
<td>{% if motion.category %}{{ motion.category }}{% else %}<i>{% trans 'No category' %}</i>{% endif %}</td>
<td class="optional">{% if motion.category %}{{ motion.category }}{% else %}<i>{% trans 'No category' %}</i>{% endif %}</td>
{% if min_supporters > 0 %}
<td class="optional">{# motion.count_supporters #}</td>
{% endif %}
<td><span class="label label-info">{{ motion.state }}</span></td>
<td class="optional"><span class="label label-info">{% trans motion.state.name %}</span></td>
<td class="optional">
{% for submitter in motion.submitter.all %}
{{ submitter.person }}{% if not forloop.last %}, {% endif %}

View File

@ -31,7 +31,7 @@
</p>
<form action="" method="post" class="small-form">{% csrf_token %}
{{ pre_form }}
<span id="poll_id" style="display:none">{{ object.pk }}</span>
<span id="poll_id" style="display:none">{{ poll.pk }}</span>
<table class="table table-striped table-bordered" style="width: auto;">
<tr>
<th>{% trans "Option" %}</th>

View File

@ -13,18 +13,17 @@
<a href="{% url 'projctor_preview_slide' motion.sid %}" title="{% trans 'Preview' %}" class="btn btn-mini right">
<i class="icon-search"></i>
</a>
<a href="{% model_url motion 'view' %}">
{{ motion.public_version.title }}
<a href="{% model_url motion %}">
{% if motion.identifier %}
[#{{ motion.identifier }}]
{% else %}
[---]
{% endif %}
{{ motion }}
</a>
({% trans "motion" %}
{% if motion.identifier %}
{{ motion.identifier }})
{% else %}
<i>[{% trans "no number" %}]</i>)
{% endif %}
</li>
{% empty %}
<li>{% trans 'No motion available.' %}</li>
<li>{% trans 'No motions available.' %}</li>
{% endfor %}
</ul>

View File

@ -8,52 +8,45 @@
{% block content %}
<div id="sidebar">
<div class="box">
<!-- Status -->
<p><b>{% trans "Status" %}:</b><br>
{% if motion.status != "pub" %}
{% if motion.status == "acc" %}
<img src="{% static 'img/voting-yes.png' %}">
{% endif %}
{% if motion.status == "rej" %}
<img src="{% static 'img/voting-no.png' %}">
{% endif %}
{% trans motion.status %}
{% else %}
{% for note in motion.notes %}
{{ note }}
{% endfor %}
{% endif %}
{% trans motion.state.name %}
</p>
<!-- poll results -->
{% with motion.polls as polls %}
{% if polls.exists and polls.0.has_votes %}
<p><b>{% trans "Poll result" %}:</b>
{% for poll in polls %}
{% if poll.has_votes %}
{% if polls|length > 1 %}
<p>{{forloop.counter}}. {% trans "Vote" %}:</p>
{% for poll in polls %}
{% if poll.has_votes %}
{% if polls|length > 1 %}
<p>{{forloop.counter}}. {% trans "Vote" %}:</p>
{% endif %}
{% with poll.get_options.0 as option %}
<div class="results">
<img src="{% static 'img/voting-yes.png' %}" title="{% trans 'Yes' %}"> {{ option.Yes }} <br>
<img src="{% static 'img/voting-no.png' %}" title="{% trans 'No' %}"> {{ option.No }} <br>
<img src="{% static 'img/voting-abstention.png' %}" title="{% trans 'Abstention' %}"> {{ option.Abstain }}<br>
<img src="{% static 'img/voting-invalid.png' %}" title="{% trans 'Invalid' %}"> {{ poll.print_votesinvalid }}<br>
<hr>
<img src="{% static 'img/voting-total.png' %}" title="{% trans 'Votes cast' %}"> {{ poll.print_votescast }}
</div>
{% endwith %}
{% else %}
{% if poll|length == 1 %}
<i>{% trans "No poll results available." %}</i>
{% endif %}
{% endif %}
{% with poll.get_options.0 as option %}
<div class="results">
<img src="{% static 'img/voting-yes.png' %}" title="{% trans 'Yes' %}"> {{ option.Yes }} <br>
<img src="{% static 'img/voting-no.png' %}" title="{% trans 'No' %}"> {{ option.No }} <br>
<img src="{% static 'img/voting-abstention.png' %}" title="{% trans 'Abstention' %}"> {{ option.Abstain }}<br>
<img src="{% static 'img/voting-invalid.png' %}" title="{% trans 'Invalid' %}"> {{ poll.print_votesinvalid }}<br>
<hr>
<img src="{% static 'img/voting-total.png' %}" title="{% trans 'Votes cast' %}"> {{ poll.print_votescast }}
</div>
{% endwith %}
{% else %}
{% if poll|length == 1 %}
<i>{% trans "No poll results available." %}</i>
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
</p>
{% endif %}
{% endwith %}
<!-- Submitter -->
<p><b>{% trans "Submitter" %}:</b><br>
{{ motion.submitter.person }}
{% for submitter in motion.submitter.all %}
{{ submitter.person }}{% if not forloop.last %},<br> {% endif %}
{% endfor %}
</p>
</div>
</div>
@ -62,20 +55,23 @@
{% if motion.identifier %}
{% trans "Motion No." %} {{ motion.identifier }}
{% else %}
{% trans "Motion" %} <i>[{% trans "no number" %}]</i>
{% trans "Motion" %} [---]
{% endif %}
<small>
{% if motion.last_version.version_number > 1 %}({% trans 'Version' %} {{ motion.active_version.version_number }}){% endif %}
</small>
</h1>
<b>{{ motion.title }}</b>
<b>{{ motion.active_version.title }}</b>
<hr>
{% endblock %}
{% block scrollcontent %}
<p>
<div class="text">{{ motion.public_version.text|linebreaks }}</div>
{% if motion.public_version.reason %}
<div class="text">{{ motion.active_version.text|safe }}</div>
{% if motion.active_version.reason %}
<br>
<div class="reason"><p><b>{% trans "Reason" %}:</b></p>
{{ motion.public_version.reason|linebreaks }}</div>
{{ motion.active_version.reason|safe }}</div>
{% endif %}
</p>
{% endblock %}

View File

@ -1,30 +1,7 @@
/**
* OpenSlides participants functions
*
* :copyright: 2011, 2012 by OpenSlides team, see AUTHORS.
* :copyright: 2013 by OpenSlides team, see AUTHORS.
* :license: GNU GPL, see LICENSE for more details.
*/
$(function() {
// change participant status (on/off)
$('.status_link').click(function(event) {
event.preventDefault();
var link = $(this);
$.ajax({
type: 'GET',
url: $(this).attr('href'),
dataType: 'json',
success: function(data) {
if (data.active) {
newclass = 'icon-on';
link.addClass('btn-success');
} else {
newclass = 'icon-off';
link.removeClass('btn-success');
}
link.children('i').removeClass('icon-off icon-on').addClass(newclass);
link.attr('href', data.link);
}
});
});
});

View File

@ -11,9 +11,6 @@
{% endblock %}
{% block javascript %}
{% if perms.participant.can_manage_participant %}
<script type="text/javascript" src="{% static 'javascript/participant.js' %}"></script>
{% endif %}
<script src="{% static 'javascript/jquery.dataTables.min.js' %}" type="text/javascript"></script>
<script src="{% static 'javascript/dataTables.bootstrap.js' %}" type="text/javascript"></script>
{% endblock %}
@ -96,7 +93,7 @@
<td class="optional">
{% for group in user.groups.all %}
{% if group.name != 'Registered' %}
{{ group}}
{% trans group.name %}
{% if not forloop.last %}<br>{% endif %}
{% endif %}
{% endfor %}

View File

@ -27,9 +27,9 @@ function presentation_reload() {
// content font-size
$('#content').animate({'font-size': data.bigger + '%'}, 200);
$('#content #sidebar').css({'font-size': '18px'}, 0);
$('#scrollcontent').animate({'font-size': data.bigger + '%'}, 200);
$('#scrollcontent').animate({'font-size': data.bigger + '%'}, 100);
// content position
$('#scrollcontent').animate({'margin-top': data.up + 'em'}, 200);
$('#scrollcontent').animate({'margin-top': data.up + 'em'}, 100);
// overlays
$('#overlays div').remove();
$.each(data['overlays'], function (index, overlay){

View File

@ -146,14 +146,7 @@ body{
color: #9FA9B7;
list-style-type: none;
}
.list_of_speakers li {
font-size: 130%;
line-height: 160%;
}
.last_speakers li {
color: #9FA9B7;
list-style: none;
}
/* Table */
table {

View File

@ -9,7 +9,7 @@
<a href="{% url 'projctor_preview_welcomepage' %}" title="{% trans 'Preview' %}" class="btn btn-mini right">
<i class="icon-search"></i>
</a>
{% trans 'Welcome Page' %}
{% get_config 'welcome_title' %}
</li>
</ul>
<hr>

View File

@ -20,8 +20,8 @@
<a href="{% url 'projector_select_widgets' %}" class="btn btn-mini" rel="tooltip" data-original-title="{% trans 'Manage widgets' %}"><i class="icon-th-large"></i> {% trans 'Widgets' %}</a>
</small>
</h1>
<div class="column" id="col1">
<div class="row-fluid">
<div class="span6 column" id="col1">
{% for name, widget in widgets.items %}
{% if widget.default_column == 1 %}
<div class="widget" id="widget_{{ widget.get_name }}">
@ -37,7 +37,7 @@
{% endfor %}
</div> <!-- end column-->
<div class="column" id="col2">
<div class="span6 column" id="col2">
{% for name, widget in widgets.items %}
{% if widget.default_column == 2 %}
<div class="widget" id="widget_{{ widget.get_name }}">
@ -51,4 +51,5 @@
{% endif %}
{% endfor %}
</div> <!-- end column -->
</div>
{% endblock %}

View File

@ -215,10 +215,10 @@ class ProjectorEdit(RedirectView):
elif direction == 'smaller':
config['bigger'] = int(config['bigger']) - 20
elif direction == 'down':
config['up'] = int(config['up']) - 10
config['up'] = int(config['up']) - 5
elif direction == 'up':
if config['up'] < 0:
config['up'] = int(config['up']) + 10
config['up'] = int(config['up']) + 5
elif direction == 'clean':
config['up'] = 0 # TODO: Use default value from the signal instead of fix value here
config['bigger'] = 100 # TODO: Use default value from the signal instead of fix value here

File diff suppressed because one or more lines are too long

View File

@ -17,7 +17,7 @@ $(function () {
}, 1000);
}
});
// activate an element to show it on projector
// activate an element to show it on projector
$('.activate_link').click(function(event) {
event.preventDefault();
var link = $(this);
@ -44,6 +44,27 @@ $(function () {
}
});
});
// change status of an object (on/off)
$('.status_link').click(function(event) {
event.preventDefault();
var link = $(this);
$.ajax({
type: 'GET',
url: $(this).attr('href'),
dataType: 'json',
success: function(data) {
if (data.active) {
newclass = 'icon-on';
link.addClass('btn-success');
} else {
newclass = 'icon-off';
link.removeClass('btn-success');
}
link.children('i').removeClass('icon-off icon-on').addClass(newclass);
link.attr('href', data.link);
}
});
});
});

View File

@ -133,6 +133,11 @@ tr.total td {
content: ":";
}
/** Colors **/
.grey {
color: grey;
}
/** Forms **/
input, textarea {
width: 320px;
@ -350,6 +355,10 @@ legend + .control-group {
background-image: url("../img/glyphicons_054_clock.png");
background-position: 0;
}
.icon-speaker {
background-image: url("../img/glyphicons_300_microphone.png");
background-position: 0;
}
/** Responsive **/

View File

@ -97,6 +97,7 @@ class AjaxMixin(object):
class ExtraContextMixin(object):
def get_context_data(self, **kwargs):
context = super(ExtraContextMixin, self).get_context_data(**kwargs)
context.setdefault('extra_javascript', [])
template_manipulation.send(
sender=self.__class__, request=self.request, context=context)
return context