admin: improve claim interface
This commit is contained in:
parent
8463993581
commit
d25462177e
@ -16,7 +16,7 @@
|
|||||||
</small>
|
</small>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<p><input type="search" class="form-control" placeholder="Search" ng-model="query" autofocus></p>
|
<p><input type="search" class="form-control form-control-sm" placeholder="Search" ng-model="query" autofocus></p>
|
||||||
<table class="table table-hover table-bordered table-striped table-sm">
|
<table class="table table-hover table-bordered table-striped table-sm">
|
||||||
<thead class="thead-dark">
|
<thead class="thead-dark">
|
||||||
<tr>
|
<tr>
|
||||||
@ -26,7 +26,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<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)">
|
<tr ng-repeat="claim in claims | filter: query | orderBy:order" ng-click="show(claim.id)" ng-class="{'table-info': claim.priority == 'medium', 'table-warning': claim.priority == 'high', 'table-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">
|
<td ng-repeat="field in fields">
|
||||||
<span ng-if="field != 'id_assignee' && field != 'id_team'">
|
<span ng-if="field != 'id_assignee' && field != 'id_team'">
|
||||||
{{ claim[field] }}
|
{{ claim[field] }}
|
||||||
|
@ -1,22 +1,23 @@
|
|||||||
<h2>Tâche</h2>
|
<h2>Tâche</h2>
|
||||||
|
|
||||||
<form ng-submit="saveClaim()">
|
<form ng-submit="saveClaim()" class="row">
|
||||||
|
<div class="col-lg-7">
|
||||||
|
|
||||||
<div class="form-group row" ng-repeat="field in fields">
|
<div class="form-group row" ng-repeat="field in fields">
|
||||||
<label for="{{ field }}" class="col-sm-2 col-form-label text-right">{{ namedFields[field] }}</label>
|
<label for="{{ field }}" class="col-sm-2 col-form-label col-form-label-sm text-right">{{ namedFields[field] }}</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input type="text" class="form-control" id="{{ field }}" ng-model="claim[field]" ng-if="field != 'state' && field != 'priority' && field != 'creation' && field != 'id_team' && field != 'id_assignee' && field != 'description'">
|
<input type="text" class="form-control form-control-sm" id="{{ field }}" ng-model="claim[field]" ng-if="field != 'state' && field != 'priority' && field != 'creation' && field != 'id_team' && field != 'id_assignee' && field != 'description'">
|
||||||
<input type="datetime" class="form-control" id="{{ field }}" ng-model="claim[field]" ng-if="field == 'creation' && claim.id">
|
<input type="datetime" class="form-control form-control-sm" id="{{ field }}" ng-model="claim[field]" ng-if="field == 'creation' && claim.id">
|
||||||
<select class="custom-select" id="{{ field }}" ng-model="claim[field]" ng-options="k as v for (k, v) in states" ng-if="field == 'state'"></select>
|
<select class="custom-select custom-select-sm" id="{{ field }}" ng-model="claim[field]" ng-options="k as v for (k, v) in states" ng-if="field == 'state'"></select>
|
||||||
<select class="custom-select" id="{{ field }}" ng-model="claim[field]" ng-options="k as v for (k, v) in priorities" ng-if="field == 'priority'"><option value="medium">Par défaut</option></select>
|
<select class="custom-select custom-select-sm" id="{{ field }}" ng-model="claim[field]" ng-options="k as v for (k, v) in priorities" ng-if="field == 'priority'"><option value="medium">Par défaut</option></select>
|
||||||
<select class="custom-select" id="{{ field }}" ng-model="claim[field]" ng-options="k as t.name for (k, t) in teams" ng-if="field == 'id_team' && !claim.id" autofocus><option></option></select>
|
<select class="custom-select custom-select-sm" id="{{ field }}" ng-model="claim[field]" ng-options="k as t.name for (k, t) in teams" ng-if="field == 'id_team' && !claim.id"><option></option></select>
|
||||||
<select class="custom-select" id="{{ field }}" ng-model="claim[field]" ng-options="k as t.name for (k, t) in teams" ng-if="field == 'id_team' && claim.id"><option></option></select>
|
<select class="custom-select custom-select-sm" id="{{ field }}" ng-model="claim[field]" ng-options="k as t.name for (k, t) in teams" ng-if="field == 'id_team' && claim.id"><option></option></select>
|
||||||
<select class="custom-select" id="{{ field }}" ng-model="claim[field]" ng-options="a.id as a.name for a in assignees" ng-if="field == 'id_assignee'"><option></option></select> <button type="button" class="btn" ng-if="field == 'id_assignee' && whoami" ng-class="{'disabled': whoami == claim[field]}" ng-click="assignToMe()">Me l'assigner</button>
|
<div class="input-group" ng-if="field == 'id_assignee'">
|
||||||
|
<select class="custom-select custom-select-sm" id="{{ field }}" ng-model="claim[field]" ng-options="a.id as a.name for a in assignees"><option></option></select>
|
||||||
|
<div class="input-group-append" ng-if="whoami">
|
||||||
|
<button type="button" class="btn btn-sm" ng-class="{'disabled': whoami == claim[field]}" ng-click="assignToMe()">Me l'assigner</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row" ng-show="whoami">
|
|
||||||
<label for="ndescription" class="col-sm-2 col-form-label text-right">Ajouter commentaire</label>
|
|
||||||
<div class="col-sm-10">
|
|
||||||
<textarea class="form-control" id="ndescription" ng-model="ndescription" autofocus></textarea>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-right" ng-show="claim.id">
|
<div class="text-right" ng-show="claim.id">
|
||||||
@ -26,11 +27,19 @@
|
|||||||
<div class="text-right" ng-show="!claim.id">
|
<div class="text-right" ng-show="!claim.id">
|
||||||
<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Ajouter la tâche</button>
|
<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Ajouter la tâche</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
|
||||||
|
|
||||||
<hr>
|
</div>
|
||||||
|
|
||||||
<div ng-repeat="description in claim.descriptions" class="alert text-light" ng-class="{'alert-dark': '' + description.id_assignee != whoami, 'alert-info': '' + description.id_assignee == whoami}">
|
<div class="col-lg-5">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<textarea class="form-control form-control-sm" placeholder="Ajouter un commentaire" rows="1" id="ndescription" ng-model="ndescription" autofocus></textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div ng-repeat="description in claim.descriptions | orderBy:'id':true" class="alert text-light" ng-class="{'alert-info': '' + description.id_assignee != whoami, 'alert-dark': '' + description.id_assignee == whoami}">
|
||||||
<strong>Par <em ng-if="!description.id_assignee">anonymous</em> <span ng-repeat="assignee in assignees" ng-if="assignee.id == description.id_assignee">{{ assignee.name }}</span> le {{ description.date | date:"mediumTime" }} :</strong>
|
<strong>Par <em ng-if="!description.id_assignee">anonymous</em> <span ng-repeat="assignee in assignees" ng-if="assignee.id == description.id_assignee">{{ assignee.name }}</span> le {{ description.date | date:"mediumTime" }} :</strong>
|
||||||
{{ description.content }}
|
{{ description.content }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
Loading…
Reference in New Issue
Block a user