Merge pull request #2847 from FinnStutzenstein/Issue2844

Group order and hide internal items filter
This commit is contained in:
Emanuel Schütze 2017-01-14 11:39:51 +01:00 committed by GitHub
commit 8c4b38f018
3 changed files with 7 additions and 9 deletions

View File

@ -161,6 +161,7 @@ angular.module('OpenSlidesApp.agenda.site', [
displayName: gettext('Internal items'),
choiceYes: gettext('Internal items'),
choiceNo: gettext('No internal items'),
permission: 'agenda.can_see_hidden_items',
},
};
}

View File

@ -155,7 +155,8 @@
<translate>Filter</translate>
</span>
<!-- boolean Filters -->
<span ng-repeat="(name, booleanFilter) in filter.booleanFilters" uib-dropdown>
<span ng-repeat="(name, booleanFilter) in filter.booleanFilters"
ng-if="!booleanFilter.permission || operator.hasPerms(booleanFilter.permission)" uib-dropdown>
<span class="pointer" id="dropdown{{ name }}" uib-dropdown-toggle
ng-class="{'bold': booleanFilter.value !== undefined, 'disabled': isSelectMode}"
ng-disabled="isSelectMode">
@ -321,11 +322,6 @@
<span ng-if="item.comment">{{ item.comment }}</span>
</span>
</div>
<div os-perms="!agenda.can_manage">
<span ng-if="item.comment">
<i class="fa fa-info-circle"></i> {{ item.comment }}
</span>
</div>
</div>
</small>
</div>

View File

@ -1206,6 +1206,7 @@ angular.module('OpenSlidesApp.users.site', [
.controller('GroupListCtrl', [
'$scope',
'$http',
'$filter',
'operator',
'Group',
'permissions',
@ -1217,14 +1218,14 @@ angular.module('OpenSlidesApp.users.site', [
'User',
'ngDialog',
'OpenSlidesPlugins',
function($scope, $http, operator, Group, permissions, gettext, Agenda, Assignment, Mediafile,
Motion, User, ngDialog, OpenSlidesPlugins) {
function($scope, $http, $filter, operator, Group, permissions, gettext, Agenda,
Assignment, Mediafile, Motion, User, ngDialog, OpenSlidesPlugins) {
$scope.permissions = permissions;
$scope.$watch(function() {
return Group.lastModified();
}, function() {
$scope.groups = Group.getAll();
$scope.groups = $filter('orderBy')(Group.getAll(), 'id');
// find all groups with the 2 dangerous permissions
var groups_danger = [];