From 682a5eea5a709bf3bb3c0e2e39b4a8b75a7879f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Sch=C3=BCtze?= Date: Sun, 13 May 2018 16:14:28 +0200 Subject: [PATCH] Minor template improvements and fixes - Fix back-to-motion-block-link in item detail view. - Show projector name in window title. - Fix sorting for motion blocks and categories in motion list view. - Fix missing permission check for editing motion block. - Improved style of rejected CR in motionn detail view. --- .../agenda/static/templates/agenda/item-detail.html | 2 +- openslides/core/static/css/_helper.scss | 2 +- openslides/core/static/js/core/projector.js | 11 ++++++++++- .../core/static/templates/projector-container.html | 4 ++-- openslides/motions/static/js/motions/site.js | 2 +- .../static/templates/motions/motion-block-detail.html | 1 + .../templates/motions/motion-detail/view-diff.html | 4 ++-- .../motions/static/templates/motions/motion-list.html | 8 ++++---- 8 files changed, 22 insertions(+), 12 deletions(-) diff --git a/openslides/agenda/static/templates/agenda/item-detail.html b/openslides/agenda/static/templates/agenda/item-detail.html index 86b3e6ac1..de3f43d5e 100644 --- a/openslides/agenda/static/templates/agenda/item-detail.html +++ b/openslides/agenda/static/templates/agenda/item-detail.html @@ -5,7 +5,7 @@ Agenda - + {{ item.getContentResource().verboseName | translate }} diff --git a/openslides/core/static/css/_helper.scss b/openslides/core/static/css/_helper.scss index 61a5a41dd..bfdb7328c 100644 --- a/openslides/core/static/css/_helper.scss +++ b/openslides/core/static/css/_helper.scss @@ -224,7 +224,7 @@ tr.selected td { } .grey { - color: #9a9898; + color: gray; } .info { diff --git a/openslides/core/static/js/core/projector.js b/openslides/core/static/js/core/projector.js index 71b59baa7..4dd98042b 100644 --- a/openslides/core/static/js/core/projector.js +++ b/openslides/core/static/js/core/projector.js @@ -82,11 +82,20 @@ angular.module('OpenSlidesApp.core.projector', ['OpenSlidesApp.core']) '$scope', 'Languages', 'Config', + 'Projector', 'ProjectorID', 'Fonts', - function ($scope, Languages, Config, ProjectorID, Fonts) { + function ($scope, Languages, Config, Projector, ProjectorID, Fonts) { // for the dynamic title $scope.projectorId = ProjectorID(); + $scope.$watch(function () { + return Projector.lastModified($scope.projectorId); + }, function () { + var projector = Projector.get($scope.projectorId); + if (projector) { + $scope.projectorName = projector.name; + } + }); $scope.$watch(function () { return Config.lastModified('projector_language'); diff --git a/openslides/core/static/templates/projector-container.html b/openslides/core/static/templates/projector-container.html index 1b83c8532..4c58e9777 100644 --- a/openslides/core/static/templates/projector-container.html +++ b/openslides/core/static/templates/projector-container.html @@ -3,8 +3,8 @@ -OpenSlides – Projector -OpenSlides – {{ 'Projector' | translate }} {{ projectorId }} +Projector – OpenSlides +{{ 'Projector' | translate }} {{ projectorName }} – OpenSlides diff --git a/openslides/motions/static/js/motions/site.js b/openslides/motions/static/js/motions/site.js index 0748bea47..9418b8ecd 100644 --- a/openslides/motions/static/js/motions/site.js +++ b/openslides/motions/static/js/motions/site.js @@ -1237,7 +1237,7 @@ angular.module('OpenSlidesApp.motions.site', [ display_name: gettext('Title')}, {name: 'submitters[0].get_short_name()', display_name: gettext('Submitters')}, - {name: 'category.name', + {name: 'category.' + Config.get('motions_export_category_sorting').value, display_name: gettext('Category')}, {name: 'motionBlock.title', display_name: gettext('Motion block')}, diff --git a/openslides/motions/static/templates/motions/motion-block-detail.html b/openslides/motions/static/templates/motions/motion-block-detail.html index 4804a45b3..2a8c119e2 100644 --- a/openslides/motions/static/templates/motions/motion-block-detail.html +++ b/openslides/motions/static/templates/motions/motion-block-detail.html @@ -15,6 +15,7 @@ diff --git a/openslides/motions/static/templates/motions/motion-detail/view-diff.html b/openslides/motions/static/templates/motions/motion-detail/view-diff.html index f1242cb67..55add67d1 100644 --- a/openslides/motions/static/templates/motions/motion-detail/view-diff.html +++ b/openslides/motions/static/templates/motions/motion-detail/view-diff.html @@ -35,7 +35,7 @@
- Rejected + Rejected:
@@ -81,7 +81,7 @@
- Rejected + Rejected: