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

View File

@ -202,6 +202,7 @@ class Item(MPTTModel, SlideMixin):
list_of_speakers = self.get_list_of_speakers( list_of_speakers = self.get_list_of_speakers(
old_speakers_count=config['agenda_show_last_speakers']) old_speakers_count=config['agenda_show_last_speakers'])
data = {'title': self.get_title(), data = {'title': self.get_title(),
'item': self,
'template': 'projector/agenda_list_of_speaker.html', 'template': 'projector/agenda_list_of_speaker.html',
'list_of_speakers': list_of_speakers} 'list_of_speakers': list_of_speakers}
elif self.related_sid: 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( list_of_speakers = slide.get_list_of_speakers(
old_speakers_count=config['agenda_show_last_speakers'], old_speakers_count=config['agenda_show_last_speakers'],
coming_speakers_count=5) 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 render_to_string('agenda/overlay_speaker_projector.html', context)
return Overlay(name, get_widget_html, get_projector_html) 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; 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 { div#complete_list_of_speakers li {
list-style-type: none; list-style-type: none;
} }
div#complete_list_of_speakers li { div#complete_list_of_speakers li {
line-height: 30px; line-height: 30px;
} }
#coming_speakers span.ui-icon { #coming_speakers span.ui-icon {
position: absolute; position: absolute;
margin-left: -15px; margin-left: -15px;

View File

@ -6,8 +6,15 @@
<div class="manage"> <div class="manage">
<span style="width: 1px; white-space: nowrap;"> <span style="width: 1px; white-space: nowrap;">
{% if perms.projector.can_manage_projector %} {% 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' %}"> <a href="{% url 'projector_activate_slide' node.sid %}"
<i class="icon-facetime-video {% if node.active %}icon-white{% endif %}"></i> 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> </a>
{% endif %} {% endif %}
{% if perms.agenda.can_manage_agenda %} {% if perms.agenda.can_manage_agenda %}

View File

@ -1,54 +1,16 @@
{% load i18n %} {% load i18n %}
{% load tags %} {% 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"> <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 %} {% if list_of_speakers %}
<ul> <ul id="list_of_speakers">
{% for speaker_dict in list_of_speakers %} {% for speaker_dict in list_of_speakers %}
<li> <li class="{{speaker_dict.type}}"> {# old_speaker, actual_speaker, coming_speaker #}
{% if speaker_dict.type == 'actual_speaker' %} {% if speaker_dict.type == 'coming_speaker' %}
<span class="number"></span><strong> {{ speaker_dict.prefix }}.
{% else %}
<span class="number">{{ speaker_dict.prefix }}</span>
{% endif %}
<span class="name">{{ speaker_dict.speaker }}</span>
{% if speaker_dict.type == 'actual_speaker' %}
</strong>
{% endif %} {% endif %}
{{ speaker_dict.speaker }}
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>

View File

@ -96,7 +96,9 @@
<td class="manage"> <td class="manage">
{% if perms.projector.can_manage_projector %} {% if perms.projector.can_manage_projector %}
<span> <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> <i class="icon-facetime-video {% if active_sid == 'agenda' %}icon-white{% endif %}"></i>
</a> </a>
</span> </span>

View File

@ -1,6 +1,11 @@
{% load i18n %} {% load i18n %}
{% load tags %} {% load tags %}
<div>
<a href="{% url 'agenda_current_list_of_speakers' %}" class="btn">{% trans 'Put me on the current list of speakers' %}</a> <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>
</div> <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> <span class="caret"></span>
</a> </a>
<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-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> <li><a href="{% url 'item_delete' item.id %}"><i class="icon-remove"></i> {% trans 'Delete item' %}</a></li>
</ul> </ul>
{% endif %} {% endif %}
@ -67,7 +67,7 @@
<a href="{% url 'projector_activate_slide' item.sid 'show_list_of_speakers' %}" <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 %}" 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' %}"> 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' %} {% trans 'Show list' %}
</a> </a>
{% endif %} {% endif %}
@ -96,7 +96,7 @@
</button> </button>
</div> </div>
{% elif speaker_dict.type == 'actual_speaker' %} {% elif speaker_dict.type == 'actual_speaker' %}
<b>{% trans 'Actual speaker' %}:</b> <b>{% trans 'Current speaker' %}:</b>
{% else %} {% else %}
<b>{% trans "Next speakers" %}:</b> <b>{% trans "Next speakers" %}:</b>
{% endif %} {% endif %}
@ -113,14 +113,14 @@
<span {% if perms.agenda.can_manage_agenda %}class="ui-icon ui-icon-arrowthick-2-n-s"{% endif %}></span> <span {% if perms.agenda.can_manage_agenda %}class="ui-icon ui-icon-arrowthick-2-n-s"{% endif %}></span>
{{ speaker_dict.prefix }}. {{ speaker_dict.prefix }}.
{% else %} {% 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 %} {% endif %}
<a href="{% model_url speaker_dict.speaker %}">{{ speaker_dict.speaker }}</a> <a href="{% model_url speaker_dict.speaker %}">{{ speaker_dict.speaker }}</a>
{% if perms.agenda.can_manage_agenda %} {% if perms.agenda.can_manage_agenda %}
{% if speaker_dict.type == 'actual_speaker' %} {% 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' %} {% 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 %} {% endif %}
<a href="{% model_url speaker_dict.speaker 'delete' %}" title="{% trans 'Delete' %}" class="btn btn-mini"> <a href="{% model_url speaker_dict.speaker 'delete' %}" title="{% trans 'Delete' %}" class="btn btn-mini">
<i class="icon-remove"></i> <i class="icon-remove"></i>

View File

@ -51,4 +51,3 @@
<li>{% trans 'No items available.' %}</li> <li>{% trans 'No items available.' %}</li>
{% endfor %} {% endfor %}
</ul> </ul>

View File

@ -7,40 +7,27 @@
{% block content %} {% block content %}
<h1>{{ title }}</h1> <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 %} {% endblock %}
{% block scrollcontent %} {% block scrollcontent %}
<style type="text/css"> <p>
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>
{% if list_of_speakers %} {% if list_of_speakers %}
<ul id="list_of_speakers"> <ul id="list_of_speakers">
{% for speaker_dict in list_of_speakers %} {% for speaker_dict in list_of_speakers %}
<li> <li class="{{speaker_dict.type}}"> {#o ld_speaker, actual_speaker, coming_speaker #}
{% if speaker_dict.type == 'actual_speaker' %} {% if speaker_dict.type == 'coming_speaker' %}
<span class="number"></span><strong> {{ speaker_dict.prefix }}.
{% else %}
<span class="number">{{ speaker_dict.prefix }} </span>
{% endif %}
<span class="name">{{ speaker_dict.speaker }}</span>
{% if speaker_dict.type == 'actual_speaker' %}
</strong>
{% endif %} {% endif %}
{{ speaker_dict.speaker }}
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
{% else %} {% else %}
<i>{% trans 'The list of speakers is empty.' %}</i> <i>{% trans 'The list of speakers is empty.' %}</i>
{% endif %} {% endif %}
</p>
{% endblock %} {% endblock %}

View File

@ -60,7 +60,7 @@ urlpatterns = patterns(
name='print_agenda', name='print_agenda',
), ),
# Speaker List # List of speakers
url(r'^(?P<pk>\d+)/speaker/$', url(r'^(?P<pk>\d+)/speaker/$',
SpeakerAppendView.as_view(), SpeakerAppendView.as_view(),
name='agenda_speaker_append', name='agenda_speaker_append',
@ -101,8 +101,14 @@ urlpatterns = patterns(
name='agenda_speaker_change_order', 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/$', url(r'^list_of_speakers/$',
CurrentListOfSpeakersView.as_view(), CurrentListOfSpeakersView.as_view(),
name='agenda_current_list_of_speakers', 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.contrib import messages
from django.db import transaction from django.db import transaction
from django.db.models import Model from django.db.models import Model
from django.template import RequestContext
from django.utils.translation import ugettext as _, ugettext_lazy from django.utils.translation import ugettext as _, ugettext_lazy
from django.views.generic.detail import SingleObjectMixin from django.views.generic.detail import SingleObjectMixin
@ -81,7 +82,8 @@ class Overview(TemplateView):
'active_sid': get_active_slide(only_sid=True), 'active_sid': get_active_slide(only_sid=True),
'duration': duration, 'duration': duration,
'start': start, 'start': start,
'end': end}) 'end': end,
'show_list': config['presentation_argument'] == 'show_list_of_speakers'})
return context return context
@transaction.commit_manually @transaction.commit_manually
@ -436,6 +438,8 @@ class CurrentListOfSpeakersView(RedirectView):
""" """
Redirect to the current list of speakers and set the request.user on it. Redirect to the current list of speakers and set the request.user on it.
""" """
set_speaker = False
def get_item(self): def get_item(self):
""" """
Returns the current Item, or None, if the current Slide is not an Agenda Item. Returns the current Item, or None, if the current Slide is not an Agenda Item.
@ -467,6 +471,7 @@ class CurrentListOfSpeakersView(RedirectView):
'Please choose the agenda item manually from the agenda.')) 'Please choose the agenda item manually from the agenda.'))
return reverse('dashboard') return reverse('dashboard')
if self.set_speaker:
if item.speaker_list_closed: if item.speaker_list_closed:
messages.error(request, _('The list of speakers is closed.')) messages.error(request, _('The list of speakers is closed.'))
return reverse('dashboard') return reverse('dashboard')
@ -476,8 +481,6 @@ class CurrentListOfSpeakersView(RedirectView):
Speaker.objects.add(self.request.user, item) Speaker.objects.add(self.request.user, item)
except OpenSlidesError: except OpenSlidesError:
messages.error(request, _('You are already on the list of speakers.')) messages.error(request, _('You are already on the list of speakers.'))
else:
messages.success(request, _('You are now on the list of speakers.'))
else: 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.'))
@ -519,7 +522,7 @@ def get_widgets(request):
Widget( Widget(
name='append_to_list_of_speakers', name='append_to_list_of_speakers',
display_name=_('To the current list of speakers'), display_name=_('List of speakers'),
template='agenda/speaker_widget.html', template='agenda/speaker_widget.html',
context={}, context=RequestContext(request, {}),
permission_required='agenda.can_be_speaker')] 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 " "There is no list of speakers for the current slide. Please choose the agenda "
"item manually from the agenda." "item manually from the agenda."
msgstr "" 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." "Tagesordnungseintrag manuell von der Tagesordnung."
#: agenda/views.py:451 #: agenda/views.py:451

View File

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

View File

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

View File

@ -31,7 +31,7 @@
</p> </p>
<form action="" method="post" class="small-form">{% csrf_token %} <form action="" method="post" class="small-form">{% csrf_token %}
{{ pre_form }} {{ 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;"> <table class="table table-striped table-bordered" style="width: auto;">
<tr> <tr>
<th>{% trans "Option" %}</th> <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"> <a href="{% url 'projctor_preview_slide' motion.sid %}" title="{% trans 'Preview' %}" class="btn btn-mini right">
<i class="icon-search"></i> <i class="icon-search"></i>
</a> </a>
<a href="{% model_url motion 'view' %}"> <a href="{% model_url motion %}">
{{ motion.public_version.title }}
</a>
({% trans "motion" %}
{% if motion.identifier %} {% if motion.identifier %}
{{ motion.identifier }}) [#{{ motion.identifier }}]
{% else %} {% else %}
<i>[{% trans "no number" %}]</i>) [---]
{% endif %} {% endif %}
{{ motion }}
</a>
</li> </li>
{% empty %} {% empty %}
<li>{% trans 'No motion available.' %}</li> <li>{% trans 'No motions available.' %}</li>
{% endfor %} {% endfor %}
</ul> </ul>

View File

@ -8,22 +8,12 @@
{% block content %} {% block content %}
<div id="sidebar"> <div id="sidebar">
<div class="box"> <div class="box">
<!-- Status -->
<p><b>{% trans "Status" %}:</b><br> <p><b>{% trans "Status" %}:</b><br>
{% if motion.status != "pub" %} {% trans motion.state.name %}
{% 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 %}
</p> </p>
<!-- poll results -->
{% with motion.polls as polls %} {% with motion.polls as polls %}
{% if polls.exists and polls.0.has_votes %} {% if polls.exists and polls.0.has_votes %}
<p><b>{% trans "Poll result" %}:</b> <p><b>{% trans "Poll result" %}:</b>
@ -52,8 +42,11 @@
{% endif %} {% endif %}
{% endwith %} {% endwith %}
<!-- Submitter -->
<p><b>{% trans "Submitter" %}:</b><br> <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> </p>
</div> </div>
</div> </div>
@ -62,20 +55,23 @@
{% if motion.identifier %} {% if motion.identifier %}
{% trans "Motion No." %} {{ motion.identifier }} {% trans "Motion No." %} {{ motion.identifier }}
{% else %} {% else %}
{% trans "Motion" %} <i>[{% trans "no number" %}]</i> {% trans "Motion" %} [---]
{% endif %} {% endif %}
<small>
{% if motion.last_version.version_number > 1 %}({% trans 'Version' %} {{ motion.active_version.version_number }}){% endif %}
</small>
</h1> </h1>
<b>{{ motion.title }}</b> <b>{{ motion.active_version.title }}</b>
<hr> <hr>
{% endblock %} {% endblock %}
{% block scrollcontent %} {% block scrollcontent %}
<p> <p>
<div class="text">{{ motion.public_version.text|linebreaks }}</div> <div class="text">{{ motion.active_version.text|safe }}</div>
{% if motion.public_version.reason %} {% if motion.active_version.reason %}
<br> <br>
<div class="reason"><p><b>{% trans "Reason" %}:</b></p> <div class="reason"><p><b>{% trans "Reason" %}:</b></p>
{{ motion.public_version.reason|linebreaks }}</div> {{ motion.active_version.reason|safe }}</div>
{% endif %} {% endif %}
</p> </p>
{% endblock %} {% endblock %}

View File

@ -1,30 +1,7 @@
/** /**
* OpenSlides participants functions * 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. * :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 %} {% endblock %}
{% block javascript %} {% 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/jquery.dataTables.min.js' %}" type="text/javascript"></script>
<script src="{% static 'javascript/dataTables.bootstrap.js' %}" type="text/javascript"></script> <script src="{% static 'javascript/dataTables.bootstrap.js' %}" type="text/javascript"></script>
{% endblock %} {% endblock %}
@ -96,7 +93,7 @@
<td class="optional"> <td class="optional">
{% for group in user.groups.all %} {% for group in user.groups.all %}
{% if group.name != 'Registered' %} {% if group.name != 'Registered' %}
{{ group}} {% trans group.name %}
{% if not forloop.last %}<br>{% endif %} {% if not forloop.last %}<br>{% endif %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}

View File

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

View File

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

View File

@ -9,7 +9,7 @@
<a href="{% url 'projctor_preview_welcomepage' %}" title="{% trans 'Preview' %}" class="btn btn-mini right"> <a href="{% url 'projctor_preview_welcomepage' %}" title="{% trans 'Preview' %}" class="btn btn-mini right">
<i class="icon-search"></i> <i class="icon-search"></i>
</a> </a>
{% trans 'Welcome Page' %} {% get_config 'welcome_title' %}
</li> </li>
</ul> </ul>
<hr> <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> <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> </small>
</h1> </h1>
<div class="row-fluid">
<div class="column" id="col1"> <div class="span6 column" id="col1">
{% for name, widget in widgets.items %} {% for name, widget in widgets.items %}
{% if widget.default_column == 1 %} {% if widget.default_column == 1 %}
<div class="widget" id="widget_{{ widget.get_name }}"> <div class="widget" id="widget_{{ widget.get_name }}">
@ -37,7 +37,7 @@
{% endfor %} {% endfor %}
</div> <!-- end column--> </div> <!-- end column-->
<div class="column" id="col2"> <div class="span6 column" id="col2">
{% for name, widget in widgets.items %} {% for name, widget in widgets.items %}
{% if widget.default_column == 2 %} {% if widget.default_column == 2 %}
<div class="widget" id="widget_{{ widget.get_name }}"> <div class="widget" id="widget_{{ widget.get_name }}">
@ -51,4 +51,5 @@
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</div> <!-- end column --> </div> <!-- end column -->
</div>
{% endblock %} {% endblock %}

View File

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

@ -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: ":"; content: ":";
} }
/** Colors **/
.grey {
color: grey;
}
/** Forms **/ /** Forms **/
input, textarea { input, textarea {
width: 320px; width: 320px;
@ -350,6 +355,10 @@ legend + .control-group {
background-image: url("../img/glyphicons_054_clock.png"); background-image: url("../img/glyphicons_054_clock.png");
background-position: 0; background-position: 0;
} }
.icon-speaker {
background-image: url("../img/glyphicons_300_microphone.png");
background-position: 0;
}
/** Responsive **/ /** Responsive **/

View File

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