server/admin/static/views/claim-list.html

62 lines
2.7 KiB
HTML
Raw Normal View History

2018-01-17 00:21:32 +00:00
<h2>
Tâches et réclammations ({{ claims.length }})
<button ng-click="show('new')" class="float-right btn btn-sm btn-primary" style="margin-right: 10px"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Ajouter une tâche</button>
<small style="height: 0px;">
<div class="checkbox float-right"><label><input type="checkbox" ng-model="showOnlyUnassigned"> Non assignée</label></div>
<div class="checkbox float-right"><label><input type="checkbox" ng-model="showOnlyMines" ng-show="whoami"> Que mes tâches</label></div>
<div class="checkbox float-right"><label><input type="checkbox" ng-model="showClosed"> Tâches closes</label></div>
</small>
</h2>
<p><input type="search" class="form-control" placeholder="Search" ng-model="query" autofocus></p>
<table class="table table-hover table-bordered table-striped table-sm">
<thead class="thead-dark">
<tr>
<th ng-repeat="field in fields" ng-click="chOrder(field)">
{{ field }}
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="claim in claims | filter: query | orderBy:order" ng-click="show(claim.id)" ng-class="{'bg-info': claim.priority == 'medium', 'bg-warning': claim.priority == 'high', 'bg-danger': claim.priority == 'critical'}" ng-if="(showClosed || (claim.state != 'closed' && claim.state != 'invalid')) && (!showOnlyMines || claim.id_assignee == whoami) && (!showOnlyUnassigned || !claim.id_assignee)">
<td ng-repeat="field in fields">
{{ claim[field] }}
</td>
</tr>
</tbody>
</table>
<hr>
<div ng-controller="AssigneesListController">
<h2>
Assignables à
<button ng-click="newAssignee()" class="float-right btn btn-sm btn-primary" style="margin-right: 10px"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Ajouter une personne</button>
</h2>
<table class="table table-hover table-bordered table-striped table-sm">
<thead class="thead-dark">
<tr>
<th>ID</th>
<th>Nom</th>
<th></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="a in assignees" ng-click="edit(a)">
<td>
{{ a.id }}
</td>
<td>
<span ng-if="a.id && !a.edit">{{ a.name }}</span>
<input type="text" class="form-control form-control-sm" ng-model="a.name" ng-if="!a.id || a.edit">
</td>
<td style="width: 10%;">
<button class="btn btn-sm btn-info" ng-if="a.id" ng-click="setMyAId(a.id)" ng-class="{'disabled': whoami == a.id}"><span class="glyphicon glyphicon-user"></span></button>
<button class="btn btn-sm btn-danger" ng-if="a.id && !a.edit" ng-click="removeAssignee(a)"><span class="glyphicon glyphicon-remove"></span></button>
<button class="btn btn-sm btn-success" ng-if="!a.id || a.edit" ng-click="updateAssignee(a)"><span class="glyphicon glyphicon-ok"></span></button>
</td>
</tr>
</tbody>
</table>
</div>