Show/hide internal items in agenda sort view.

This commit is contained in:
Emanuel Schütze 2017-02-01 23:24:36 +01:00
parent e7ee8fbc07
commit 3ca254c88e
3 changed files with 23 additions and 4 deletions

View File

@ -572,6 +572,7 @@ angular.module('OpenSlidesApp.agenda.site', [
}, function () {
$scope.items = AgendaTree.getTree(Agenda.getAll());
});
$scope.showInternalItems = true;
// save parent and weight of moved agenda item (and all items on same level)
$scope.treeOptions = {

View File

@ -10,24 +10,33 @@
</div>
</div>
<div class="details">
<div class="details agenda-sort">
<p translate>Drag and drop items to change the order of the agenda. Your modification will be saved immediately.</p>
<p>
<button class="btn btn-default btn-sm" ng-click="showInternalItems=!showInternalItems">
<translate ng-if="showInternalItems">Hide internal items</translate>
<translate ng-if="!showInternalItems">Show internal items</translate>
</button>
<div ui-tree="treeOptions" id="tree-root">
<ol ui-tree-nodes ng-model="items">
<li ng-repeat="item in items" ui-tree-node ng-include="'nodes_renderer.html'">
</ol>
</div>
<p class="spacer">* <translate>Internal item</translate</p>
</div>
<!-- Nested node template -->
<script type="text/ng-template" id="nodes_renderer.html">
<div ui-tree-handle>
<span ng-if="item.item.is_hidden">*</span>
<div ui-tree-handle ng-if="!item.item.is_hidden">
{{ item.item.getListViewTitle() }}
</div>
<div ui-tree-handle ng-if="item.item.is_hidden && showInternalItems" class="internal">
<i class="fa fa-ban"></i> &nbsp;
{{ item.item.getListViewTitle() }}
</div>
<ol ui-tree-nodes="" ng-model="item.children">
<li ng-repeat="item in item.children" ui-tree-node ng-include="'nodes_renderer.html'">
</ol>

View File

@ -1128,6 +1128,15 @@ img {
width: 120px;
}
/** Agenda sort view **/
.agenda-sort .internal {
padding: 7px;
opacity: 0.6;
}
.agenda-sort .angular-ui-tree-node {
min-height: 0;
}
/** Footer **/
#footer {
float: left;