From dc863cc3b91ac776922628cca5c93b7a8fa9cef5 Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Mon, 23 Apr 2012 22:07:52 +0200 Subject: [PATCH] Added custom slides portlet. --- openslides/projector/models.py | 2 +- .../static/javascript/projector-control.js | 1 + .../templates/projector/control.html | 26 ++++++++++++++++++- .../projector/templates/projector/new.html | 4 +-- openslides/projector/urls.py | 2 +- openslides/static/styles/base.css | 2 +- 6 files changed, 31 insertions(+), 6 deletions(-) diff --git a/openslides/projector/models.py b/openslides/projector/models.py index cd6334516..c3e25840f 100644 --- a/openslides/projector/models.py +++ b/openslides/projector/models.py @@ -16,7 +16,7 @@ class ProjectorSlide(models.Model, SlideMixin): title = models.CharField(max_length=100, verbose_name=_("Title")) text = models.TextField(null=True, blank=True, verbose_name=_("Text")) - weight = models.IntegerField(default=0, verbose_name=_("Weight")) + #weight = models.IntegerField(default=0, verbose_name=_("Weight")) def slide(self): return { diff --git a/openslides/projector/static/javascript/projector-control.js b/openslides/projector/static/javascript/projector-control.js index 3948cb97b..ad4ceac32 100644 --- a/openslides/projector/static/javascript/projector-control.js +++ b/openslides/projector/static/javascript/projector-control.js @@ -11,6 +11,7 @@ $(function() { success: function(data) { $('.activate_link').removeClass('active'); $('li').removeClass('activeline'); + $('div').removeClass('activeline'); link.addClass('active'); link.parent().addClass('activeline'); }, diff --git a/openslides/projector/templates/projector/control.html b/openslides/projector/templates/projector/control.html index f685e4a40..c0eac9a3d 100644 --- a/openslides/projector/templates/projector/control.html +++ b/openslides/projector/templates/projector/control.html @@ -64,7 +64,7 @@ {% if category != 'projector' %}
{% with category_big=category|capfirst %} -
{% trans category_big %}
+
{% trans category_big %}
{% endwith %}
{% for slides in group %} @@ -143,5 +143,29 @@
+ + + {% for category, group in categories.items %} + {% if category == 'projector' %} +
+
{% trans "Custom slides" %}
+
+ {% for slides in group %} + {% if slides.control_template %} + {% include slides.control_template %} + {% endif %} + {% if not forloop.last %} +
+ {% endif %} + {% endfor %} + + + +
+
+ {% endif %} + {% endfor %} {% endblock %} diff --git a/openslides/projector/templates/projector/new.html b/openslides/projector/templates/projector/new.html index 607a4bc31..927839d2c 100644 --- a/openslides/projector/templates/projector/new.html +++ b/openslides/projector/templates/projector/new.html @@ -3,10 +3,10 @@ {% load tags %} {% load i18n %} -{% block title %}{{ block.super }} – {%trans "New Slide" %}{% endblock %} +{% block title %}{{ block.super }} – {%trans "New custom slide" %}{% endblock %} {% block content %} -

{% trans 'New Slide' %}

+

{% trans 'New custom slide' %}

{% csrf_token %} {{ form.as_p }}