From 35a80427595f6c6130efca5ec04d5da0e89a504b Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Wed, 25 Nov 2015 21:31:08 +0100 Subject: [PATCH] Assignments template improvements - list view with quickview - ngDialog for create/update view - candidates - polls --- openslides/agenda/static/js/agenda/site.js | 1 - .../static/templates/agenda/item-list.html | 2 +- .../migrations/0002_auto_20151126_2153.py | 24 + openslides/assignments/models.py | 25 +- openslides/assignments/projector.py | 4 +- openslides/assignments/serializers.py | 10 +- .../assignments/static/js/assignments/base.js | 11 +- .../assignments/static/js/assignments/site.js | 458 ++++++++++++++++-- .../assignments/assignment-detail.html | 94 +++- .../assignments/assignment-form.html | 36 +- .../assignments/assignment-list.html | 137 ++++-- .../assignments/assignmentpoll-form.html | 12 + openslides/assignments/views.py | 6 +- openslides/core/static/js/core/site.js | 2 +- 14 files changed, 680 insertions(+), 142 deletions(-) create mode 100644 openslides/assignments/migrations/0002_auto_20151126_2153.py create mode 100644 openslides/assignments/static/templates/assignments/assignmentpoll-form.html diff --git a/openslides/agenda/static/js/agenda/site.js b/openslides/agenda/static/js/agenda/site.js index 621461d58..7f0bc7e96 100644 --- a/openslides/agenda/static/js/agenda/site.js +++ b/openslides/agenda/static/js/agenda/site.js @@ -161,7 +161,6 @@ angular.module('OpenSlidesApp.agenda.site', ['OpenSlidesApp.agenda']) } $scope.alert = { type: 'danger', msg: message, show: true }; }); -; }; // delete related item $scope.deleteRelatedItem = function (item) { diff --git a/openslides/agenda/static/templates/agenda/item-list.html b/openslides/agenda/static/templates/agenda/item-list.html index 1f306636a..e7bb4de2c 100644 --- a/openslides/agenda/static/templates/agenda/item-list.html +++ b/openslides/agenda/static/templates/agenda/item-list.html @@ -1,7 +1,7 @@

Agenda

-Agenda Item: {{ assignment.agenda_item }} -

Description

{{ assignment.description }}

Candidates

- + {{ related_user.user.get_full_name() }} + + + +
+ + {{alert.msg}} + +
+ + + {{ $select.selected.get_full_name() }} + + +
+
+
+ + + + + +
+

+ + +

Election result

- + + + + +
+ + + + Ballot paper + + + + + + Delete + +
+
+
+ User#{{ option.candidate_id }} +
+
+ {{ vote.value}}: {{ vote.weight}} +
+
+
+
+ Valid votes: {{ poll.votesvalid }}
+ Invalid votes: {{ poll.votesinvalid }}
+ Votes cast: {{ poll.votescast }} +
+
+
diff --git a/openslides/assignments/static/templates/assignments/assignment-form.html b/openslides/assignments/static/templates/assignments/assignment-form.html index 75e6b7e75..f704d678a 100644 --- a/openslides/assignments/static/templates/assignments/assignment-form.html +++ b/openslides/assignments/static/templates/assignments/assignment-form.html @@ -1,31 +1,13 @@

Edit election

New election

- - -
-
- - -
-
- -