115 lines
3.9 KiB
HTML
115 lines
3.9 KiB
HTML
<!--
|
|
This file is part of Accountant.
|
|
|
|
Accountant is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU Affero General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
Accountant is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU Affero General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
along with Accountant. If not, see <http://www.gnu.org/licenses/>.
|
|
-->
|
|
<!-- vim: set tw=80 ts=2 sw=2 sts=2: -->
|
|
<div class="row">
|
|
<table class="table table-striped table-condensed table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>Nom du compte</th>
|
|
<th class="col-md-1">Solde courant</th>
|
|
<th class="col-md-1">Solde pointé</th>
|
|
<th class="col-md-1">Découvert autorisé</th>
|
|
<th class="col-md-1">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<tr>
|
|
<td colspan="5">
|
|
<button class="btn btn-success btn-success"
|
|
ng-click="add()">Ajouter</button>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr id="{{ account.id }}"
|
|
class="form-inline" ng-class="rowClass(account)"
|
|
ng-repeat="account in accounts | orderBy:'name'" ng-init="account.getSolds()">
|
|
<td>
|
|
<span editable-text="account.name"
|
|
e-placeholder="Nom du compte"
|
|
e-style="width: 100%"
|
|
e-name="name" e-form="rowform" e-required>
|
|
<a href="#/account/{{ account.id }}/operations">{{ account.name }}</a>
|
|
</span>
|
|
</td>
|
|
|
|
<td>
|
|
<span ng-class="valueClass(account, account.solds.current)">
|
|
{{ account.solds.current | currency : "€" }}
|
|
</span>
|
|
</td>
|
|
|
|
<td>
|
|
<span ng-class="valueClass(account, account.solds.pointed)">
|
|
{{ account.solds.pointed | currency : "€" }}
|
|
</span>
|
|
</td>
|
|
|
|
<td>
|
|
<span editable-number="account.authorized_overdraft"
|
|
e-max="0"
|
|
e-style="width: 100%"
|
|
e-name="authorized_overdraft" e-form="rowform">
|
|
{{ account.authorized_overdraft | currency : "€" }}
|
|
</span>
|
|
</td>
|
|
|
|
<td>
|
|
<form editable-form name="rowform"
|
|
onaftersave="save(account)" shown="!account.id">
|
|
<div class="btn-group btn-group-xs">
|
|
<!-- Edit account. -->
|
|
<button type="button" class="btn btn-success"
|
|
ng-if="!rowform.$visible"
|
|
ng-click="rowform.$show()">
|
|
<span class="fa fa-pencil-square-o"></span>
|
|
</button>
|
|
|
|
<!-- Save account. -->
|
|
<button type="submit" class="btn btn-success"
|
|
ng-if="rowform.$visible">
|
|
<span class="fa fa-floppy-o"></span>
|
|
</button>
|
|
|
|
<!-- Cancel account edition. -->
|
|
<button type="button" class="btn btn-default"
|
|
ng-if="rowform.$visible"
|
|
ng-click="cancelEdit(rowform, account, $index)">
|
|
<span class="fa fa-times"></span>
|
|
</button>
|
|
|
|
<!-- Delete account, with confirm. -->
|
|
<button type="button" class="btn btn-default"
|
|
ng-if="account.id"
|
|
ng-click="delete(account, $index)">
|
|
<span class="fa fa-trash-o"></span>
|
|
</button>
|
|
|
|
<!-- Open account scheduler. -->
|
|
<a class="btn btn-default"
|
|
ng-if="account.id"
|
|
href="#/account/{{ account.id }}/scheduler">
|
|
<span class="fa fa-clock-o"></span>
|
|
</a>
|
|
</div>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|