diff --git a/openslides/motion/models.py b/openslides/motion/models.py index 010b1a855..0adc1cd51 100644 --- a/openslides/motion/models.py +++ b/openslides/motion/models.py @@ -49,9 +49,9 @@ class Motion(SlideMixin, models.Model): related_name="active_version") """Points to a specific version. - Used be the permitted-version-system to deside witch version is the active - Version. Could also be used to only choose a specific version as a default - version. Like the Sighted versions on Wikipedia. + Used be the permitted-version-system to deside which version is the active + version. Could also be used to only choose a specific version as a default + version. Like the sighted versions on Wikipedia. """ state = models.ForeignKey('State', null=True) # TODO: Check whether null=True is necessary. @@ -574,7 +574,7 @@ class Category(models.Model): name = models.CharField(max_length=255, verbose_name=ugettext_lazy("Category name")) """Name of the category.""" - prefix = models.CharField(blank=True, max_length=32, verbose_name=ugettext_lazy("Category prefix")) + prefix = models.CharField(blank=True, max_length=32, verbose_name=ugettext_lazy("Prefix")) """Prefix of the category. Used to build the identifier of a motion. @@ -589,6 +589,8 @@ class Category(models.Model): if link == 'delete': return reverse('motion_category_delete', args=[str(self.id)]) + class Meta: + ordering = ['prefix'] ## class Comment(models.Model): ## motion_version = models.ForeignKey(MotionVersion) diff --git a/openslides/motion/static/styles/motion.css b/openslides/motion/static/styles/motion.css new file mode 100644 index 000000000..951f94309 --- /dev/null +++ b/openslides/motion/static/styles/motion.css @@ -0,0 +1,41 @@ +/** + * OpenSlides motion style + * + * :copyright: 2013 by OpenSlides team, see AUTHORS. + * :license: GNU GPL, see LICENSE for more details. + */ + +/* motion version diff table */ +table.diff, .diff_row { + font-size: 12px; + width: 100%; + border: 0px; +} +table.diff[rules][rules="groups"] > colgroup, table[rules][rules="groups"] > tfoot, table[rules][rules="groups"] > thead, table[rules][rules="groups"] > tbody { + border: none; +} +table.diff td { + padding: 0 !important; + border: none; +} +.diff_header { + background-color:#e0e0e0; +} +td.diff_header { + text-align:right; + display: none; +} +.diff_next { + background-color:#c0c0c0; + display: none; +} +.diff_add { + background-color:#aaffaa; +} +.diff_chg { + background-color:#ffff77; +} +.diff_sub { + background-color:#ffaaaa; +} + diff --git a/openslides/motion/templates/motion/category_form.html b/openslides/motion/templates/motion/category_form.html index 5114c9a0a..421b3a019 100644 --- a/openslides/motion/templates/motion/category_form.html +++ b/openslides/motion/templates/motion/category_form.html @@ -5,7 +5,7 @@ {% block title %} {{ block.super }} – - {% if motion %} + {% if category %} {% trans "Edit category" %} {% else %} {% trans "New category" %} @@ -14,7 +14,7 @@ {% block content %}
{% include "formbuttons_saveapply.html" %} - + {% trans 'Cancel' %}
diff --git a/openslides/motion/templates/motion/category_list.html b/openslides/motion/templates/motion/category_list.html index 175cf2854..41e9f821d 100644 --- a/openslides/motion/templates/motion/category_list.html +++ b/openslides/motion/templates/motion/category_list.html @@ -6,11 +6,40 @@ {% block title %}{{ block.super }} – {% trans "Motions" %}{% endblock %} {% block content %} -{% trans "Prefix" %} | +{% trans "Category name" %} | +{% trans "Actions" %} | +
---|---|---|
{{ category.prefix }} | +{{ category }} | ++ + + + + + + + | +
{% trans "No categories available." %} | +
{% trans "Version" %} {{ version_rev1.version_number }} + {% trans "created: " %} {{ version_rev1.creation_time }} + {{ version_rev1.title }}+ |
+ {% trans "Version" %} {{ version_rev2.version_number }} + {% trans "created: " %} {{ version_rev1.creation_time }} + {{ version_rev2.title }}+ |
+||
{{ diff_text|safe }} | + {% else %} +{{ version_rev1.text }} | +{{ version_rev2.text }} | + {% endif %} +|
{% trans "Reason" %}: | |||
{{ diff_reason|safe }} | + {% else %} +{{ version_rev1.reason }} | +{{ version_rev2.reason }} | + {% endif %} +