Template improvements.
Improved agenda and participants overview.
This commit is contained in:
parent
d615c63eb1
commit
e5e7e1bcce
@ -51,15 +51,15 @@ def setup_agenda_config_page(sender, **kwargs):
|
||||
validators=[validate_start_time, ],
|
||||
widget=forms.DateTimeInput(format='%d.%m.%Y %H:%M'),
|
||||
required=False,
|
||||
label=_('Begin of event'),
|
||||
help_text=_('Input format: DD.MM.YYYY HH:MM')))
|
||||
label=ugettext_lazy('Begin of event'),
|
||||
help_text=ugettext_lazy('Input format: DD.MM.YYYY HH:MM')))
|
||||
|
||||
agenda_show_last_speakers = ConfigVariable(
|
||||
name='agenda_show_last_speakers',
|
||||
default_value=1,
|
||||
form_field=forms.IntegerField(
|
||||
min_value=0,
|
||||
label=_('Number of last speakers to be shown on the projector')))
|
||||
label=ugettext_lazy('Number of last speakers to be shown on the projector')))
|
||||
|
||||
extra_stylefiles = ['styles/timepicker.css', 'styles/jquery-ui/jquery-ui.custom.min.css']
|
||||
extra_javascript = ['javascript/jquery-ui.custom.min.js',
|
||||
|
@ -37,6 +37,9 @@ ol.agenda_list {
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 );
|
||||
overflow: auto;
|
||||
}
|
||||
.agenda_list li > div.activeline {
|
||||
background: #bed4de !important;
|
||||
}
|
||||
.agenda_list.sortable li > div {
|
||||
cursor: move;
|
||||
}
|
||||
@ -52,13 +55,14 @@ ol.agenda_list {
|
||||
|
||||
.agenda_list .openclose { width: 40px; float: left; min-height: 1px; }
|
||||
.agenda_list .duration { width: 92px; float: right; min-height: 1px; padding-left: 5px; }
|
||||
.agenda_list .manage { width: 150px; float: right; min-height: 1px; padding-left: 5px; }
|
||||
.agenda_list .manage { width: 200px; float: right; min-height: 1px; padding-left: 5px; }
|
||||
.agenda_list .title { float: left; }
|
||||
.agenda_list .optional { float: left; }
|
||||
.agenda_list .opener_closer { float: left; margin-right: 10px; }
|
||||
.agenda_list .opener_closer { float: left; margin-right: 10px; margin-left:-6px;}
|
||||
.agenda_list .opener_closer .btn { padding: 0 2px; }
|
||||
.agenda_list .optional { float: right; width: 208px; padding-left: 8px;}
|
||||
|
||||
#menu-overview .manage { width: 150px; }
|
||||
#menu-overview .manage { width: 200px; }
|
||||
#menu-overview .duration { width: 75px; }
|
||||
#menu-overview .optional { width: 200px; }
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
{% load i18n %}
|
||||
{% load tags %}
|
||||
|
||||
<div>
|
||||
<div class="{% if node.active %}activeline{% endif %}">
|
||||
{% if perms.agenda.can_manage_agenda or perms.projector.can_manage_projector %}
|
||||
<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 and not show_list %}btn-primary{% endif %} btn-mini"
|
||||
class="activate_link btn {% if node.active and not show_list and not summary %}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>
|
||||
<i class="icon-facetime-video {% if node.active and not show_list and not summary %}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 %}"
|
||||
@ -18,15 +18,22 @@
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.agenda.can_manage_agenda %}
|
||||
<a href="{% model_url node 'edit' %}" title="{% trans 'Edit' %}" class="btn btn-mini">
|
||||
<a href="{% model_url node 'edit' %}" rel="tooltip" data-original-title="{% trans 'Edit' %}" class="btn btn-mini">
|
||||
<i class="icon-pencil"></i>
|
||||
</a>
|
||||
<a href="{% model_url node 'delete' %}" title="{% trans 'Delete' %}" class="btn btn-mini">
|
||||
<a href="{% model_url node 'delete' %}" rel="tooltip" data-original-title="{% trans 'Delete' %}" class="btn btn-mini">
|
||||
<i class="icon-remove"></i>
|
||||
</a>
|
||||
<a href="{% if node.closed %}{% url 'item_open' node.id %}{% else %}{% url 'item_close' node.id %}{% endif %}"
|
||||
class="close_link btn btn-mini {% if node.closed %}btn-success{% endif %} tooltip-left"
|
||||
rel="tooltip" data-original-title="{% trans 'Change status (open/closed)' %}">
|
||||
<i class="{% if node.closed %}icon-checked-new{% else %}icon-unchecked-new{% endif %}"></i>
|
||||
</a>
|
||||
{% if not node.is_leaf_node %}
|
||||
<a href="{% url 'projector_activate_slide' node.sid 'summary' %}" class="activate_link btn btn-mini" title="{% trans 'Show summary for this item' %}">
|
||||
<i class="icon-summary"></i>
|
||||
<a href="{% url 'projector_activate_slide' node.sid 'summary' %}"
|
||||
class="activate_link btn btn-mini {% if node.active and summary %}btn-primary{% endif %}"
|
||||
title="{% trans 'Show summary for this item' %}">
|
||||
<i class="icon-summary {% if node.active and summary %}icon-white{% endif %}"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
@ -37,36 +44,36 @@
|
||||
{% if perms.agenda.can_see_orga_items %}
|
||||
<div class="duration">
|
||||
{% if node.duration %}
|
||||
{{ node.duration }}h {% if start and end %}<a {% if node.tooltip %}rel="tooltip" data-original-title="{% trans 'End' %}: {{ node.tooltip|date:"DATETIME_FORMAT" }}"{% endif %}><i class="icon-clock"></i></a>{% endif %}
|
||||
{{ node.duration }}h
|
||||
{% if start and end %}
|
||||
<a rel="tooltip" data-original-title="{% trans 'End' %}:
|
||||
{{ end|date:"DATETIME_FORMAT" }}"><i class="icon-clock"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.agenda.can_manage_agenda %}
|
||||
<div class="optional">
|
||||
{{ node.comment|first_line }}
|
||||
{% if node.comment %}
|
||||
{{ node.comment|first_line }}
|
||||
<a class="btn btn-mini" rel="popover" data-content="{{ node.comment|linebreaks }}">
|
||||
<i class="icon icon-search"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="opener_closer">
|
||||
<a href="#" class="opener btn btn-mini"><span class="icon-plus"></span></a>
|
||||
<a href="#" class="closer btn btn-mini"><span class="icon-minus"></span></a>
|
||||
</div>
|
||||
|
||||
<div class="openclose">
|
||||
{% if perms.agenda.can_manage_agenda %}
|
||||
<a href="{% if node.closed %}{% url 'item_open' node.id %}{% else %}{% url 'item_close' node.id %}{% endif %}"
|
||||
class="close_link btn btn-mini {% if node.closed %}btn-success{% endif %}" title="{% trans 'Change status (open/closed)' %}">
|
||||
<i class="{% if node.closed %}icon-checked-new{% else %}icon-unchecked-new{% endif %}"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<span class="close_link">
|
||||
<i class="{% if node.closed %}icon-checked-new{% else %}icon-unchecked-new{% endif %}"></i>
|
||||
</span>
|
||||
{% endif %}
|
||||
<a class="opener btn btn-mini" rel="tooltip" data-original-title="{% trans 'Expand items' %}"><span class="icon-plus"></span></a>
|
||||
<a class="closer btn btn-mini" rel="tooltip" data-original-title="{% trans 'Collapse items' %}"><span class="icon-minus"></span></a>
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
<a class="closed" rel="tooltip" data-original-title="{% trans 'Item closed' %}">
|
||||
<i class="{% if node.closed %}icon-checked-new{% endif %}"></i>
|
||||
</a>
|
||||
{% with form=node.weight_form %}
|
||||
{{ form.weight }}
|
||||
{{ form.self }}
|
||||
|
@ -83,6 +83,7 @@ class Overview(TemplateView):
|
||||
'duration': duration,
|
||||
'start': start,
|
||||
'end': end,
|
||||
'summary': config['presentation_argument'] == 'summary',
|
||||
'show_list': config['presentation_argument'] == 'show_list_of_speakers'})
|
||||
return context
|
||||
|
||||
|
@ -46,8 +46,7 @@
|
||||
<tr>
|
||||
<th>{% trans "Present" %}</th>
|
||||
<th class="optional">{% trans "Title" %}</th>
|
||||
<th>{% trans "First Name" %}</th>
|
||||
<th>{% trans "Last Name" %}</th>
|
||||
<th>{% trans "Name" %}</th>
|
||||
<th class="optional">{% trans "Structure level" %}</th>
|
||||
<th class="optional">{% trans "Group" %}</th>
|
||||
<th class="optional">{% trans "Committee" %}</th>
|
||||
@ -76,8 +75,13 @@
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="optional">{{ user.title }}</td>
|
||||
<td><a href="{% url 'user_view' user.id %}">{{ user.first_name }}</a></td>
|
||||
<td><a href="{% url 'user_view' user.id %}">{{ user.last_name }}</a></td>
|
||||
<td>
|
||||
{% if 'participant_sort_users_by_first_name'|get_config %}
|
||||
<a href="{% url 'user_view' user.id %}">{{ user.first_name }} {{ user.last_name }}</a>
|
||||
{% else %}
|
||||
<a href="{% url 'user_view' user.id %}">{{ user.last_name }}, {{ user.first_name }}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="optional">{{ user.structure_level }}</td>
|
||||
<td class="optional">
|
||||
{% for group in user.groups.all %}
|
||||
@ -89,7 +93,13 @@
|
||||
</td>
|
||||
<td class="optional">{{ user.committee }}</td>
|
||||
{% if perms.participant.can_manage_participant %}
|
||||
<td class="optional">{{ user.comment|first_line }}</td>
|
||||
<td class="optional">
|
||||
{% if user.comment %}
|
||||
<a class="btn btn-mini" rel="popover" data-content="{{ user.comment|linebreaks }}">
|
||||
<i class="icon icon-search"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="optional">
|
||||
{% if user.last_login > user.date_joined %}
|
||||
{{ user.last_login }}
|
||||
|
@ -29,14 +29,19 @@ $(function () {
|
||||
success: function(data) {
|
||||
$('.activate_link').removeClass('btn-primary');
|
||||
$('.activate_link i').removeClass('icon-white');
|
||||
$('tr').removeClass('activeline');
|
||||
$('div').removeClass('activeline');
|
||||
$('li').removeClass('activeline');
|
||||
// is table line
|
||||
if ( link.parent().parent().parent().is("tr") ) {
|
||||
$('tr').removeClass('activeline');
|
||||
link.parent().parent().parent().addClass('activeline');
|
||||
}
|
||||
// is sortable list (agenda)
|
||||
if ( link.parent().parent().parent().is("div") ) {
|
||||
link.parent().parent().parent().addClass('activeline');
|
||||
}
|
||||
// is widget list item
|
||||
if ( link.parent().is("li") ) {
|
||||
$('li').removeClass('activeline');
|
||||
link.parent().addClass('activeline');
|
||||
}
|
||||
link.addClass('btn-primary');
|
||||
@ -165,6 +170,13 @@ $(document).ready(function(){
|
||||
$('.tooltip-bottom').tooltip({
|
||||
placement: 'bottom'
|
||||
});
|
||||
//Popover
|
||||
$(this).popover({
|
||||
selector: "a[rel=popover]",
|
||||
placement: 'bottom',
|
||||
html: true
|
||||
});
|
||||
|
||||
// Resize menu and content container
|
||||
function iconmenu(){
|
||||
$('.leftmenu').removeClass('span2').addClass('lefticon').addClass('span1');
|
||||
|
@ -39,8 +39,8 @@ def first_line(text):
|
||||
lines = text.split('\n')
|
||||
except AttributeError:
|
||||
return ''
|
||||
if len(lines) > 1 or len(lines[0]) > 40:
|
||||
if len(lines) > 1 or len(lines[0]) > 30:
|
||||
s = "%s ..."
|
||||
else:
|
||||
s = "%s"
|
||||
return s % lines[0][:40]
|
||||
return s % lines[0][:30]
|
||||
|
Loading…
Reference in New Issue
Block a user