Motions template improvements.

- Added quickedit form for motion list.
This commit is contained in:
Emanuel Schuetze 2015-10-13 21:28:14 +02:00
parent ce52dde13a
commit 798126551b
2 changed files with 39 additions and 24 deletions

View File

@ -5,7 +5,13 @@
<span ng-if="motion.versions.length > 1" >| Version {{ motion.active_version }}</span> <span ng-if="motion.versions.length > 1" >| Version {{ motion.active_version }}</span>
</small> </small>
</h1> </h1>
{{ motion.tags }}
<span ng-repeat="tag in motion.tags">
<span class="label label-default">
{{ tag.name }}
</span>
&nbsp;
</span>
{{ motion.agenda_item }} {{ motion.agenda_item }}

View File

@ -21,19 +21,14 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="selectSubmitter" translate>Submitter</label> <label for="selectSubmitter" translate>Submitter</label>
<select multiple size="3" ng-options="user.id as user.get_short_name() for user in users" <ui-select multiple ng-model="motion.submitters_id" name="selectSubmitter">
ng-model="motion.submitters_id" class="form-control" name="selectSubmitter" required> <ui-select-match placeholder="{{ 'Select or search a submitter...' | translate }}">
</select> {{ $item.get_full_name() }}
<!-- TODO: use modern ui-select component with more information per user
<ui-select multipe ng-model="motion.submitter" theme="bootstrap" name="selectSubmitter">
<ui-select-match placeholder="{{ 'Select or search a participant...' | translate }}">
{{ $select.selected.get_short_name() }}
</ui-select-match> </ui-select-match>
<ui-select-choices repeat="user.id as user in users | filter: $select.search"> <ui-select-choices repeat="user.id as user in users | filter: $select.search">
<div ng-bind-html="user.get_short_name() | highlight: $select.search"></div> <div ng-bind-html="user.get_full_name() | highlight: $select.search"></div>
<small ng-bind-html="user.structure_level | highlight: $select.search"></small>
</ui-select-choices> </ui-select-choices>
</ui-select>--> </ui-select>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="inputName" translate>Title</label> <label for="inputName" translate>Title</label>
@ -55,34 +50,48 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="selectTags" translate>Tags</label> <label for="selectTags" translate>Tags</label>
<select multiple ng-options="tag.id as tag.name for tag in tags" <ui-select multiple ng-model="motion.tags_id">
ng-model="motion.tags_id" class="form-control" name="selectTags"> <ui-select-match placeholder="{{ 'Select or search a tag...' | translate }}">
</select> {{ $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> </div>
<div class="form-group"> <div class="form-group">
<label for="selectAttachments" translate>Attachments</label> <label for="selectAttachments" translate>Attachments</label>
<ui-select multiple ng-model="motion.attachments_id">
<ui-select-match placeholder="{{ 'Select or search an attachment...' | translate }}">
{{ $item.name }}
</ui-select-match>
<ui-select-choices repeat="file.id as file in mediafiles | filter: $select.search">
{{ file.title }}
</ui-select-choices>
</ui-select>
<select ng-options="file.id as file.title for file in mediafiles" <select ng-options="file.id as file.title for file in mediafiles"
ng-model="motion.attachments_id" class="form-control" name="selectAttachments"> ng-model="motion.attachments_id" class="form-control" name="selectAttachments">
</select> </select>
</div> </div>
<!-- TODO: show only if supporters is enabled --> <!-- show supporters if enabled -->
<div class="form-group"> <div class="form-group" ng-if="config('motions_min_supporters') > 0">
<label for="selectSupporter" translate>Supporters</label> <label for="selectSupporter" translate>Supporters</label>
<ui-select multiple ng-model="motion.supporters_id" theme="bootstrap" name="selectSupporter"> <ui-select multiple ng-model="motion.supporters_id">
<ui-select-match placeholder="{{ 'Select or search a participant...' | translate }}"> <ui-select-match placeholder="{{ 'Select or search a supporter...' | translate }}">
{{ $select.selected.get_short_name() }} {{ $item.get_full_name() }}
</ui-select-match> </ui-select-match>
<ui-select-choices repeat="user.id as user in users | filter: $select.search"> <ui-select-choices repeat="user.id as user in users | filter: $select.search">
<div ng-bind-html="user.get_short_name() | highlight: $select.search"></div> <div ng-bind-html="user.get_full_name() | highlight: $select.search"></div>
<small ng-bind-html="user.structure_level | highlight: $select.search"></small>
</ui-select-choices> </ui-select-choices>
</ui-select> </ui-select>
</div> </div>
<!-- TODO: preselect default workflow --> <!-- TODO: preselect default workflow
does not work: ng-init="motion.workflow = config('motions_workflow')"-->
<div class="form-group"> <div class="form-group">
<label for="selectWorkflow" translate>Workflow</label> <label for="selectWorkflow" translate>Workflow</label>
<select ng-options="workflow.id as workflow.name for workflow in workflows" <select ng-options="workflow.id as workflow.name for workflow in workflows"
ng-model="motion.workflow" class="form-control" name="selectWorkflow"> ng-model="motion.workflow"
class="form-control" name="selectWorkflow">
</select> </select>
</div> </div>