diff --git a/openslides/assignment/templates/assignment/overview.html b/openslides/assignment/templates/assignment/overview.html index 282b1b2b2..4e58d6a67 100644 --- a/openslides/assignment/templates/assignment/overview.html +++ b/openslides/assignment/templates/assignment/overview.html @@ -1,9 +1,18 @@ {% extends "base.html" %} {% load i18n %} +{% load staticfiles %} {% block title %}{{ block.super }} – {% trans "Elections" %}{% endblock %} +{% block header %} + +{% endblock %} + +{% block javascript %} + + +{% endblock %} {% block content %}

{% trans "Elections" %} @@ -17,37 +26,30 @@

-
- {% trans "Filter" %}: - -
- - {{ assignments|length }} - {% blocktrans count counter=assignments|length %}election{% plural %}elections{% endblocktrans %} - - +
+ - - - + + + + {% for assignment in assignments %} - - + - {% empty %} - - - {% endfor %}
{% trans "Election" %}{% trans "Candidates" %}{% trans "Status" %}{% trans "Election" %}{% trans "Candidates" %}{% trans "Status" %} {% trans "Actions" %}
{{ assignment }} - {% blocktrans with posts=assignment.posts context "Number of searched candidates for an election"%}posts: {{ posts }}{% endblocktrans %} + + + {% trans "Posts" context "Number of searched candidates for an election" %}: + {{ assignment.posts }} + {% if assignment.status != 'fin' %} - | {% blocktrans with candidates=assignment.get_participants|length %}candidates: {{ candidates }}{% endblocktrans %} + | {% trans "Candidates" %}: {{ assignment.get_participants|length }} {% endif %} - | {% blocktrans with elected=assignment.elected|length %}elected: {{ elected }}{% endblocktrans %} + + | {% trans "Elected" %}: {{ assignment.elected|length }} {{ assignment.get_status_display }}{{ assignment.get_status_display }} {% if perms.projector.can_manage_projector %} @@ -69,10 +71,6 @@
{% trans "No assignments available." %}
{% endblock %} diff --git a/openslides/assignment/views.py b/openslides/assignment/views.py index 0dbeec68c..298df161b 100644 --- a/openslides/assignment/views.py +++ b/openslides/assignment/views.py @@ -42,19 +42,7 @@ from openslides.assignment.forms import AssignmentForm, AssignmentRunForm @permission_required('assignment.can_see_assignment') @template('assignment/overview.html') def get_overview(request): - query = Assignment.objects - if 'status' in request.GET and '---' not in request.GET['status']: - query = query.filter(status__iexact=request.GET['status']) - try: - sort = request.GET['sort'] - if sort in ['name', 'status']: - query = query.order_by(sort) - except KeyError: - pass - if 'reverse' in request.GET: - query = query.reverse() - - assignments = query.all() + assignments = Assignment.objects.all() return { 'assignments': assignments, } diff --git a/openslides/mediafile/templates/mediafile/mediafile_form.html b/openslides/mediafile/templates/mediafile/mediafile_form.html index f709153d3..712382713 100644 --- a/openslides/mediafile/templates/mediafile/mediafile_form.html +++ b/openslides/mediafile/templates/mediafile/mediafile_form.html @@ -5,18 +5,18 @@ {% block title %} {{ block.super }} – {% if mediafile %} - {% trans "Edit media" %} + {% trans "Edit file" %} {% else %} - {% trans "New media" %} + {% trans "New file" %} {% endif %} {% endblock %} {% block content %}

{% if mediafile %} - {% trans "Edit media" %} + {% trans "Edit file" %} {% else %} - {% trans "New media" %} + {% trans "New file" %} {% endif %} {% trans "Back to overview" %} diff --git a/openslides/mediafile/templates/mediafile/mediafile_list.html b/openslides/mediafile/templates/mediafile/mediafile_list.html index 543801d87..fbbf4e685 100644 --- a/openslides/mediafile/templates/mediafile/mediafile_list.html +++ b/openslides/mediafile/templates/mediafile/mediafile_list.html @@ -3,13 +3,13 @@ {% load i18n %} {% load tags %} -{% block title %}{{ block.super }} – {% trans 'Media' %}{% endblock %} +{% block title %}{{ block.super }} – {% trans 'Files' %}{% endblock %} {% block content %} -

{% trans 'Media' %} +

{% trans 'Files' %} {% if perms.mediafile.can_upload %} - {% trans "New" %} + {% trans "New" %} {% endif %}

@@ -42,7 +42,7 @@ {% empty %} - {% trans 'No media available.' %} + {% trans 'No files available.' %} {% endfor %} diff --git a/openslides/mediafile/views.py b/openslides/mediafile/views.py index 39eac6cf4..6f80b4da6 100644 --- a/openslides/mediafile/views.py +++ b/openslides/mediafile/views.py @@ -98,7 +98,7 @@ def register_tab(request): """ selected = request.path.startswith('/mediafile/') return Tab( - title=_('Media'), + title=_('Files'), app='mediafile', # TODO: Rename this to icon='mediafile' later stylefile='styles/mediafile.css', url=reverse('mediafile_list'), diff --git a/openslides/motion/templates/motion/motion_detail.html b/openslides/motion/templates/motion/motion_detail.html index 4488741f1..ac1546352 100644 --- a/openslides/motion/templates/motion/motion_detail.html +++ b/openslides/motion/templates/motion/motion_detail.html @@ -170,7 +170,7 @@ {% endfor %} - {% if min_supporters > 0 %} + {% if 'motion_min_supporters'|get_config > 0 %}
{% trans "Supporters" %}: *
{% if not motion.supporters %} - @@ -187,7 +187,7 @@
{% trans "Status" %}:
{% if motion.state_id != "pub" %} {# TODO: trans motion.state #} - {{ motion.state }} + {% trans motion.state.name %}
{% endif %} @@ -220,6 +220,8 @@ {% endif %} {% endif %} + {% empty %} + - {% endfor %} {% if allowed_actions.create_poll %} @@ -234,15 +236,23 @@ {% if motion.category %} {{ motion.category }} {% else %} - {% trans 'No category' %} + - {% endif %} -
{% trans "Creation Time" %}:
- {# TODO: use creation time of _first_ version #} +
+ {% with versions=motion.versions.all %} + {% if versions|length > 1 %} + {% trans "Last changes (of this version)" %}: + {% else %} + {% trans "Last changes" %}: + {% endif %} + {% endwith %} +
{{ motion.version.creation_time }} + {# TODO: Check this button #} {% if allowed_actions.wit and user in motion.submitters %}

@@ -251,7 +261,7 @@ {% endif %} - {% if perms.motion.can_support_motion and min_supporters > 0 %} + {% if perms.motion.can_support_motion and 'motion_min_supporters'|get_config > 0 %} {% if allowed_actions.unsupport %}

@@ -267,9 +277,9 @@ {% endif %} - {% if min_supporters > 0 %} + {% if 'motion_min_supporters'|get_config > 0 %}

- * {% trans "minimum required supporters" %}: {{ min_supporters }} + * {% trans "minimum required supporters" %}: {{ 'motion_min_supporters'|get_config }} {% endif %} @@ -279,13 +289,13 @@

{% trans "Manage motion" %}


{% trans "For administration only:" %}
- + {% trans 'Reset state' %} diff --git a/openslides/motion/templates/motion/motion_diff.html b/openslides/motion/templates/motion/motion_diff.html index 9a4397da0..a390596fc 100644 --- a/openslides/motion/templates/motion/motion_diff.html +++ b/openslides/motion/templates/motion/motion_diff.html @@ -34,11 +34,11 @@ diff --git a/openslides/motion/templates/motion/motion_list.html b/openslides/motion/templates/motion/motion_list.html index 4b7828c06..36d8d57b1 100644 --- a/openslides/motion/templates/motion/motion_list.html +++ b/openslides/motion/templates/motion/motion_list.html @@ -2,9 +2,19 @@ {% load tags %} {% load i18n %} +{% load staticfiles %} {% block title %}{{ block.super }} – {% trans "Motions" %}{% endblock %} +{% block header %} + +{% endblock %} + +{% block javascript %} + + +{% endblock %} + {% block content %}

{% trans "Motions" %} @@ -22,66 +32,45 @@

-{% comment %} - TODO: remove this filter and add client side filtering with DataTables - - {% if min_supporters > 0 %} - - {% endif %} - - - - -{% endcomment %} - - {{ motion_list|length }} - {% blocktrans count counter=motion_list|length context "number of motions"%}motion{% plural %}motions{% endblocktrans %} - -
{% trans "Version" %} {{ version_rev1.version_number }}
- {% trans "created" %}: {{ version_rev1.creation_time }}
+ {% trans "Last changes" %}: {{ version_rev1.creation_time }}

{{ version_rev1.title }}

{% trans "Version" %} {{ version_rev2.version_number }}
- {% trans "created" %}: {{ version_rev1.creation_time }}
+ {% trans "Last changes" %}: {{ version_rev1.creation_time }}

{{ version_rev2.title }}

+
+ - - + + - {% if min_supporters > 0 %} - + + + {% if 'motion_min_supporters'|get_config > 0 %} + {% endif %} - - - + + {% for motion in motion_list %} - + - - {% if min_supporters > 0 %} - - {% endif %} - + + - {# TODO: user creation_time of _first_ version #} - + {% if 'motion_min_supporters'|get_config > 0 %} + {% with supporters=motion.supporters|length %} + + {% endwith %} + {% endif %} + - {% empty %} - - - {% endfor %}
{% trans "#" %}{% trans "Motion title" %}{% trans "#" %}{% trans "Motion title" %} {% trans 'Category' %}{% trans "Number of supporters" %}{% trans "Status" %}{% trans "Submitter" %}{% trans "Supporters" %}{% trans "Status" %}{% trans "Submitter" %}{% trans "Creation Time" %}{% trans "Last changes" %} {% trans "Actions" %}
{{ motion.identifier|default:'' }}{{ motion.identifier|default:'' }} {{ motion.title }}{% if motion.category %}{{ motion.category }}{% else %}{% trans 'No category' %}{% endif %}{# motion.count_supporters #}{% trans motion.state.name %}{% if motion.category %}{{ motion.category }}{% else %}-{% endif %}{% trans motion.state.name %} {% for submitter in motion.submitter.all %} {{ submitter.person }}{% if not forloop.last %}, {% endif %} {% endfor %} {{ motion.version.creation_time }} + {% if supporters >= 'motion_min_supporters'|get_config %} + {{ supporters }} + {% endif %} + {% if supporters < 'motion_min_supporters'|get_config %} + {{ supporters }} + {% endif %} + {{ motion.last_version.creation_time }} {% if perms.projector.can_manage_projector %} @@ -103,10 +92,6 @@
{% trans "No motions available." %}
{% endblock %} diff --git a/openslides/motion/views.py b/openslides/motion/views.py index d6bbcf8d3..a79f4cb40 100644 --- a/openslides/motion/views.py +++ b/openslides/motion/views.py @@ -79,7 +79,6 @@ class MotionDetailView(GetVersionMixin, DetailView): """ context = super(MotionDetailView, self).get_context_data(**kwargs) context['allowed_actions'] = self.object.get_allowed_actions(self.request.user) - context['min_supporters'] = int(config['motion_min_supporters']) return context motion_detail = MotionDetailView.as_view() diff --git a/openslides/participant/templates/participant/overview.html b/openslides/participant/templates/participant/overview.html index 8d292b742..f82fd836f 100644 --- a/openslides/participant/templates/participant/overview.html +++ b/openslides/participant/templates/participant/overview.html @@ -52,7 +52,7 @@

- +
@@ -125,10 +125,6 @@ {% endif %} - {% empty %} - - - {% endfor %}
{% trans "Present" %}
{% trans "No participants available." %}
diff --git a/openslides/static/javascript/dataTables.bootstrap.js b/openslides/static/javascript/dataTables.bootstrap.js index 3abf0447c..84bbdebe8 100644 --- a/openslides/static/javascript/dataTables.bootstrap.js +++ b/openslides/static/javascript/dataTables.bootstrap.js @@ -10,22 +10,24 @@ /* Table initialisation */ $(document).ready(function() { - $('#dataTableParticipants').dataTable( { + $('#dataTable').dataTable( { "aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]], "aoColumnDefs": [ { "bSortable": false, "aTargets": [ -1 ] } ], "oLanguage": { - "sLengthMenu": gettext("_MENU_ participants per page"), + "sLengthMenu": gettext("_MENU_ entries per page"), "sSearch": gettext("Search:"), - "sInfo": gettext("Showing _START_ to _END_ of _TOTAL_ participants"), + "sInfo": gettext("Showing _START_ to _END_ of _TOTAL_ entries"), "sInfoEmpty": gettext("Showing 0 participants"), "sInfoFiltered": gettext("(filtered from _MAX_ total entries)"), "sZeroRecords": gettext("No matching records found"), - "sFirst": gettext("First"), - "sLast": gettext("Last"), - "sNext": gettext("Next"), - "sPrevious": gettext("Previous"), + "oPaginate": { + "sFirst": gettext("First"), + "sLast": gettext("Last"), + "sNext": gettext("Next"), + "sPrevious": gettext("Previous"), + } } } ); } ); diff --git a/openslides/static/styles/base.css b/openslides/static/styles/base.css index 6a1913f22..8430031f3 100644 --- a/openslides/static/styles/base.css +++ b/openslides/static/styles/base.css @@ -289,7 +289,7 @@ legend + .control-group { background-position: -168px 0; } .icon-config { - background-position: -360px -144px; + background-position: -432px 0px; } .icon-welcome { background-position: 0 -24px;