#247 summary of items for the projector
This commit is contained in:
parent
00eb365b91
commit
ff19e6d2c8
@ -68,8 +68,16 @@ class Item(MPTTModel, SlideMixin):
|
|||||||
"""
|
"""
|
||||||
Return a map with all Data for the Slide
|
Return a map with all Data for the Slide
|
||||||
"""
|
"""
|
||||||
if self.releated_sid:
|
if config['presentation_argument'] == 'summary':
|
||||||
return self.get_releated_slide().slide()
|
print 'soweit schonmal'
|
||||||
|
data = {
|
||||||
|
'title': self.get_title(),
|
||||||
|
'items': self.get_children(),
|
||||||
|
'template': 'projector/AgendaSummary.html',
|
||||||
|
}
|
||||||
|
elif self.releated_sid:
|
||||||
|
data = self.get_releated_slide().slide()
|
||||||
|
else:
|
||||||
data = {
|
data = {
|
||||||
'item': self,
|
'item': self,
|
||||||
'title': self.get_title(),
|
'title': self.get_title(),
|
||||||
|
@ -39,6 +39,9 @@
|
|||||||
{% if perms.agenda.can_manage_agenda %}
|
{% if perms.agenda.can_manage_agenda %}
|
||||||
<a href="{% model_url item 'edit' %}"><img src="{% static 'images/icons/edit.png' %}" title="{% trans 'Edit item' %}"></a>
|
<a href="{% model_url item 'edit' %}"><img src="{% static 'images/icons/edit.png' %}" title="{% trans 'Edit item' %}"></a>
|
||||||
<a href="{% model_url item 'delete' %}"><img src="{% static 'images/icons/delete.png' %}" title="{% trans 'Delete item' %}"></a>
|
<a href="{% model_url item 'delete' %}"><img src="{% static 'images/icons/delete.png' %}" title="{% trans 'Delete item' %}"></a>
|
||||||
|
{% if not item.is_leaf_node %}
|
||||||
|
<a class="activate_link" href="{% url projector_activate_slide item.sid 'summary' %}"><img src="{% static 'images/icons/view-list-tree.png' %}" title="{% trans 'Activate summary for this item' %}"></a>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>{%trans "Agenda" %}</h1>
|
<h1>{% if title %}{{ title }}{% else %}{% trans "Agenda" %}{% endif %}</h1>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block scrollcontent %}
|
{% block scrollcontent %}
|
||||||
|
@ -68,8 +68,9 @@ def get_active_slide(only_sid=False):
|
|||||||
return get_slide_from_sid(sid)
|
return get_slide_from_sid(sid)
|
||||||
|
|
||||||
|
|
||||||
def set_active_slide(sid):
|
def set_active_slide(sid, argument=None):
|
||||||
config["presentation"] = sid
|
config["presentation"] = sid
|
||||||
|
config['presentation_argument'] = argument
|
||||||
|
|
||||||
|
|
||||||
def register_slidemodel(model, model_name=None, control_template=None, weight=0):
|
def register_slidemodel(model, model_name=None, control_template=None, weight=0):
|
||||||
@ -115,7 +116,6 @@ def projector_message_set(message, sid=None):
|
|||||||
overlay = ProjectorOverlay.objects.get(def_name='Message')
|
overlay = ProjectorOverlay.objects.get(def_name='Message')
|
||||||
except ProjectorOverlay.DoesNotExist:
|
except ProjectorOverlay.DoesNotExist:
|
||||||
overlay = ProjectorOverlay(def_name='Message', active=True)
|
overlay = ProjectorOverlay(def_name='Message', active=True)
|
||||||
print "hier mal ein ", sid
|
|
||||||
overlay.sid=sid
|
overlay.sid=sid
|
||||||
overlay.save()
|
overlay.save()
|
||||||
|
|
||||||
|
@ -43,10 +43,9 @@ urlpatterns = patterns('projector.views',
|
|||||||
name='projector_activate_slide',
|
name='projector_activate_slide',
|
||||||
),
|
),
|
||||||
|
|
||||||
url(r'^activate/(?P<sid>[^/]*)/summary/$',
|
url(r'^activate/(?P<sid>[^/]*)/(?P<argument>[^/]*)/$',
|
||||||
ActivateView.as_view(),
|
ActivateView.as_view(),
|
||||||
{'summary': True},
|
name='projector_activate_slide',
|
||||||
name='projector_activate_summary',
|
|
||||||
),
|
),
|
||||||
|
|
||||||
url(r'^new/$',
|
url(r'^new/$',
|
||||||
|
@ -99,6 +99,9 @@ class ActivateView(RedirectView):
|
|||||||
allow_ajax = True
|
allow_ajax = True
|
||||||
|
|
||||||
def pre_redirect(self, request, *args, **kwargs):
|
def pre_redirect(self, request, *args, **kwargs):
|
||||||
|
try:
|
||||||
|
set_active_slide(kwargs['sid'], kwargs['argument'])
|
||||||
|
except KeyError:
|
||||||
set_active_slide(kwargs['sid'])
|
set_active_slide(kwargs['sid'])
|
||||||
config['up'] = 0
|
config['up'] = 0
|
||||||
config['bigger'] = 100
|
config['bigger'] = 100
|
||||||
@ -164,7 +167,6 @@ class Projector(TemplateView, AjaxMixin):
|
|||||||
else:
|
else:
|
||||||
data = get_slide_from_sid(sid)
|
data = get_slide_from_sid(sid)
|
||||||
ajax = 'off'
|
ajax = 'off'
|
||||||
print data
|
|
||||||
|
|
||||||
if data is None:
|
if data is None:
|
||||||
data = {
|
data = {
|
||||||
|
Loading…
Reference in New Issue
Block a user