2015-11-29 22:25:01 +01:00
|
|
|
<div class="header">
|
|
|
|
<div class="title">
|
|
|
|
<div class="submenu">
|
|
|
|
<a ng-click="newDialog()" os-perms="motions.can_create" class="btn btn-primary btn-sm">
|
|
|
|
<i class="fa fa-plus fa-lg"></i>
|
|
|
|
<translate>New</translate>
|
|
|
|
</a>
|
|
|
|
<a ui-sref="motions.category.list" os-perms="motions.can_manage" class="btn btn-default btn-sm">
|
|
|
|
<i class="fa fa-sitemap fa-lg"></i>
|
|
|
|
<translate>Categories</translate>
|
|
|
|
</a>
|
|
|
|
<a ui-sref="core.tag.list" os-perms="core.can_manage_tags" class="btn btn-default btn-sm">
|
|
|
|
<i class="fa fa-tags fa-lg"></i>
|
|
|
|
<translate>Tags</translate>
|
|
|
|
</a>
|
2015-11-28 19:59:58 +01:00
|
|
|
<a ui-sref="motions.motion.import" os-perms="motions.can_manage" class="btn btn-default btn-sm">
|
|
|
|
<i class="fa fa-download fa-lg"></i>
|
|
|
|
<translate>Import</translate>
|
|
|
|
</a>
|
2015-11-29 22:25:01 +01:00
|
|
|
<a ui-sref="motions_pdf" target="_blank" class="btn btn-default btn-sm">
|
|
|
|
<i class="fa fa-file-pdf-o fa-lg"></i>
|
|
|
|
<translate>PDF</translate>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<h1 translate>Motions</h1>
|
|
|
|
</div>
|
2015-03-09 15:40:54 +01:00
|
|
|
</div>
|
|
|
|
|
2015-11-29 22:25:01 +01:00
|
|
|
<div class="details">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-6">
|
2015-10-15 17:25:40 +02:00
|
|
|
<!-- delete mode -->
|
2015-11-29 22:25:01 +01:00
|
|
|
<button os-perms-lite="motions.can_manage" class="btn btn-default"
|
|
|
|
ng-click="isDeleteMode = !isDeleteMode; uncheckAll()">
|
|
|
|
<i class="fa fa-check-square-o"></i>
|
2015-12-11 20:04:05 +01:00
|
|
|
<translate>Select ...</translate>
|
2015-11-29 22:25:01 +01:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-6">
|
|
|
|
<div class="form-inline text-right">
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="input-group">
|
|
|
|
<div class="input-group-addon"><i class="fa fa-search"></i></div>
|
|
|
|
<input type="text" os-focus-me ng-model="filter.search" class="form-control"
|
|
|
|
placeholder="{{ 'Search' | translate}}">
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-12-11 19:50:50 +01:00
|
|
|
<button class="btn btn-default" ng-click="isFilterOpen = !isFilterOpen">
|
2015-11-29 22:25:01 +01:00
|
|
|
<i class="fa fa-filter"></i>
|
2015-12-11 20:04:05 +01:00
|
|
|
<translate>Filter ...</translate>
|
2015-11-29 22:25:01 +01:00
|
|
|
</button>
|
2015-10-15 17:25:40 +02:00
|
|
|
</div>
|
2015-11-29 22:25:01 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-12-11 19:50:50 +01:00
|
|
|
<div uib-collapse="!isFilterOpen" class="row spacer">
|
2015-11-29 22:25:01 +01:00
|
|
|
<div class="col-sm-6 text-right"></div>
|
|
|
|
<div class="col-sm-6 text-right">
|
2015-11-03 21:38:53 +01:00
|
|
|
<!-- state filter -->
|
|
|
|
<select ng-model="stateFilter" class="form-control" id="stateFilter">
|
|
|
|
<option value="" translate>--- Select state ---</option>
|
|
|
|
<option ng-repeat="state in states" value="{{ state.id }}">{{ state.name }}</option>
|
|
|
|
</select>
|
2015-11-29 22:25:01 +01:00
|
|
|
</div>
|
2015-03-09 15:40:54 +01:00
|
|
|
</div>
|
2015-11-29 22:25:01 +01:00
|
|
|
<div uib-collapse="!isDeleteMode" class="row spacer">
|
|
|
|
<div class="col-sm-12 text-left">
|
|
|
|
<!-- delete button -->
|
|
|
|
<a ng-show="isDeleteMode"
|
2015-11-28 19:59:58 +01:00
|
|
|
os-perms="motions.can_manage" ng-click="deleteMultiple()"
|
2015-11-29 22:25:01 +01:00
|
|
|
class="btn btn-primary">
|
|
|
|
<i class="fa fa-trash fa-lg"></i>
|
2015-11-28 19:59:58 +01:00
|
|
|
<translate>Delete selected motions</translate>
|
2015-11-29 22:25:01 +01:00
|
|
|
</a>
|
2015-11-03 21:38:53 +01:00
|
|
|
</div>
|
2015-03-09 15:40:54 +01:00
|
|
|
</div>
|
|
|
|
|
2015-12-04 12:25:39 +01:00
|
|
|
<div class="spacer-top-lg italic">
|
2015-12-01 13:45:54 +01:00
|
|
|
{{ motions.length }} {{ "motions" | translate }}<span ng-if="(motions|filter:{selected:true}).length > 0">,
|
2015-11-29 22:25:01 +01:00
|
|
|
{{(motions|filter:{selected:true}).length}} {{ "selected" | translate }}</span>
|
2015-12-04 12:25:39 +01:00
|
|
|
</div>
|
2015-11-29 22:25:01 +01:00
|
|
|
<table class="table table-striped table-bordered table-hover">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<!-- projector column -->
|
|
|
|
<th ng-show="!isDeleteMode" os-perms="core.can_manage_projector" class="firstColumn">
|
|
|
|
<!-- delete selection column -->
|
|
|
|
<th ng-show="isDeleteMode" os-perms-lite="motions.can_manage" class="firstColumn deleteColumn">
|
|
|
|
<input type="checkbox" ng-model="selectedAll" ng-change="checkAll()">
|
|
|
|
<th ng-click="toggleSort('identifier')" class="sortable minimum">
|
|
|
|
<translate>Identifier</translate>
|
|
|
|
<i class="pull-right fa" ng-show="sortColumn === 'identifier' && header.sortable != false"
|
|
|
|
ng-class="reverse ? 'fa-sort-desc' : 'fa-sort-asc'">
|
|
|
|
</i>
|
|
|
|
<th ng-click="toggleSort('getTitle()')" class="sortable">
|
|
|
|
<translate>Title</translate>
|
|
|
|
<i class="pull-right fa" ng-show="sortColumn === 'getTitle()' && header.sortable != false"
|
|
|
|
ng-class="reverse ? 'fa-sort-desc' : 'fa-sort-asc'">
|
|
|
|
</i>
|
|
|
|
<th ng-click="toggleSort('submitters')" class="sortable optional">
|
|
|
|
<translate>Submitters</translate>
|
|
|
|
<i class="pull-right fa" ng-show="sortColumn === 'submitters' && header.sortable != false"
|
|
|
|
ng-class="reverse ? 'fa-sort-desc' : 'fa-sort-asc'">
|
|
|
|
</i>
|
|
|
|
<th ng-click="toggleSort('category')" class="sortable optional">
|
|
|
|
<translate>Category</translate>
|
|
|
|
<i class="pull-right fa" ng-show="sortColumn === 'category' && header.sortable != false"
|
|
|
|
ng-class="reverse ? 'fa-sort-desc' : 'fa-sort-asc'">
|
|
|
|
</i>
|
|
|
|
<th ng-click="toggleSort('state.name')" class="sortable optional">
|
|
|
|
<translate>State</translate>
|
|
|
|
<i class="pull-right fa" ng-show="sortColumn === 'state.name' && header.sortable != false"
|
|
|
|
ng-class="reverse ? 'fa-sort-desc' : 'fa-sort-asc'">
|
|
|
|
</i>
|
|
|
|
<tbody>
|
|
|
|
<tr ng-repeat="motion in motions | filter: filter.search | filter: {state_id: stateFilter} |
|
|
|
|
orderBy: sortColumn:reverse"
|
|
|
|
class="animate-item"
|
|
|
|
ng-class="{ 'activeline': motion.isProjected(), 'selected': motion.selected }">
|
|
|
|
<!-- projector column -->
|
|
|
|
<td ng-show="!isDeleteMode" os-perms-lite="core.can_manage_projector">
|
|
|
|
<a class="btn btn-default btn-sm"
|
|
|
|
ng-class="{ 'btn-primary': motion.isProjected() }"
|
|
|
|
ng-click="motion.project()"
|
|
|
|
title="{{ 'Project motion' | translate }}">
|
|
|
|
<i class="fa fa-video-camera"></i>
|
|
|
|
</a>
|
|
|
|
<!-- delete selection column -->
|
|
|
|
<td ng-show="isDeleteMode" os-perms="motions.can_manage" class="deleteColumn">
|
|
|
|
<input type="checkbox" ng-model="motion.selected">
|
|
|
|
<!-- motion data colums -->
|
|
|
|
<td ng-if="!motion.quickEdit">{{ motion.identifier }}
|
|
|
|
<td ng-if="!motion.quickEdit" ng-mouseover="motion.hover=true" ng-mouseleave="motion.hover=false">
|
|
|
|
<strong><a ui-sref="motions.motion.detail({id: motion.id})">{{ motion.getTitle() }}</a></strong>
|
|
|
|
<div ng-if="motion.isAllowed('update')" class="hoverActions" ng-class="{'hiddenDiv': !motion.hover}">
|
|
|
|
<span ng-if="motion.isAllowed('update')">
|
|
|
|
<a href="" ng-click="editDialog(motion)" translate>Edit</a>
|
|
|
|
</span>
|
|
|
|
<span ng-if="motion.isAllowed('quickedit')">
|
|
|
|
| <a href="" ng-click="motion.quickEdit=true" translate>QuickEdit</a> |
|
|
|
|
</span>
|
|
|
|
<span ng-if="motion.isAllowed('delete')">
|
|
|
|
<!-- TODO: translate confirm message -->
|
|
|
|
<a href="" class="text-danger"
|
|
|
|
ng-bootbox-confirm="Are you sure you want to delete <b>{{ motion.getTitle() }}</b>?"
|
|
|
|
ng-bootbox-confirm-action="delete(motion)" translate>Delete</a>
|
|
|
|
</span>
|
2015-10-15 17:25:40 +02:00
|
|
|
</div>
|
2015-11-29 22:25:01 +01:00
|
|
|
<td ng-if="!motion.quickEdit" class="optional">
|
|
|
|
<div ng-repeat="submitter in motion.submitters">
|
|
|
|
{{ submitter.get_full_name() }}<br>
|
2015-10-15 17:25:40 +02:00
|
|
|
</div>
|
2015-11-29 22:25:01 +01:00
|
|
|
<td ng-if="!motion.quickEdit" class="optional">
|
|
|
|
{{ motion.category.name }}
|
|
|
|
<td ng-if="!motion.quickEdit" class="optional">
|
|
|
|
<span class="label" ng-class="'label-'+motion.state.css_class">
|
|
|
|
{{ motion.state.name | translate }}
|
|
|
|
</span>
|
|
|
|
<!-- quickEdit columns -->
|
|
|
|
<td ng-if="motion.quickEdit && motion.isAllowed('quickedit')" colspan="5">
|
2015-11-28 19:59:58 +01:00
|
|
|
<h4>{{ motion.getTitle() }} <span class="text-muted">– <translate>QuickEdit</translate></span></h4>
|
2015-11-29 22:25:01 +01:00
|
|
|
<alert ng-show="alert.show" type="{{ alert.type }}" ng-click="alert={}" close="alert={}">
|
|
|
|
{{alert.msg}}
|
|
|
|
</alert>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-6">
|
|
|
|
<label for="inputIdentifier" translate>Identifier</label>
|
|
|
|
<input type="text" ng-model="motion.identifier" class="form-control input-sm"
|
|
|
|
name="inputIdentifier">
|
|
|
|
</div>
|
|
|
|
<div class="col-xs-6">
|
|
|
|
<label for="selectCategory" translate>Category</label>
|
|
|
|
<select ng-options="category.id as category.name for category in categories"
|
|
|
|
ng-model="motion.category_id" class="form-control" name="selectCategory">
|
|
|
|
</select>
|
|
|
|
</div>
|
2015-10-15 17:25:40 +02:00
|
|
|
</div>
|
2015-11-29 22:25:01 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-6">
|
|
|
|
<label for="selectSubmitter" translate>Submitters</label>
|
|
|
|
<ui-select multiple ng-model="motion.submitters_id" name="selectSubmitter">
|
2015-12-11 20:04:05 +01:00
|
|
|
<ui-select-match placeholder="{{ 'Select or search a submitter ...' | translate }}">
|
2015-10-15 17:25:40 +02:00
|
|
|
{{ $item.get_full_name() }}
|
|
|
|
</ui-select-match>
|
|
|
|
<ui-select-choices repeat="user.id as user in users | filter: $select.search">
|
|
|
|
<div ng-bind-html="user.get_full_name() | highlight: $select.search"></div>
|
|
|
|
</ui-select-choices>
|
|
|
|
</ui-select>
|
|
|
|
</div>
|
2015-11-29 22:25:01 +01:00
|
|
|
<div class="col-xs-6">
|
|
|
|
<label for="selectTags" translate>Tags</label>
|
|
|
|
<ui-select multiple ng-model="motion.tags_id">
|
2015-12-11 20:04:05 +01:00
|
|
|
<ui-select-match placeholder="{{ 'Select or search a tag ...' | translate }}">
|
2015-11-29 22:25:01 +01:00
|
|
|
{{ $item.name }}
|
|
|
|
</ui-select-match>
|
|
|
|
<ui-select-choices repeat="tag.id as tag in tags | filter: $select.search">
|
|
|
|
{{ tag.name }}
|
|
|
|
</ui-select-choices>
|
|
|
|
</ui-select>
|
|
|
|
</div>
|
2015-10-15 17:25:40 +02:00
|
|
|
</div>
|
2015-11-29 22:25:01 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-6">
|
|
|
|
<div ng-if="config('motions_min_supporters') > 0">
|
|
|
|
<label for="selectSubmitter" translate>Supporters</label>
|
|
|
|
<ui-select multiple ng-model="motion.supporters_id">
|
2015-12-11 20:04:05 +01:00
|
|
|
<ui-select-match placeholder="{{ 'Select or search a supporter ...' | translate }}">
|
2015-11-29 22:25:01 +01:00
|
|
|
{{ $item.get_full_name() }}
|
|
|
|
</ui-select-match>
|
|
|
|
<ui-select-choices repeat="user.id as user in users | filter: $select.search">
|
|
|
|
<div ng-bind-html="user.get_full_name() | highlight: $select.search"></div>
|
|
|
|
</ui-select-choices>
|
|
|
|
</ui-select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="spacer">
|
|
|
|
<button ng-click="motion.quickEdit=false" class="btn btn-default pull-left" translate>
|
|
|
|
Cancel
|
|
|
|
</button>
|
|
|
|
<button ng-if="motion.isAllowed('update')" ng-click="save(motion)" class="btn btn-primary" translate>
|
|
|
|
Update
|
|
|
|
</button>
|
|
|
|
<a ng-if="motion.isAllowed('update')" ui-sref="motions.motion.detail.update({id: motion.id })"
|
2015-12-11 20:04:05 +01:00
|
|
|
class="pull-right" translate>Edit motion ...</a>
|
2015-11-29 22:25:01 +01:00
|
|
|
</div>
|
|
|
|
</table>
|
|
|
|
</div>
|