2015-08-18 16:03:55 +02:00

107 lines
3.8 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: -->
<!-- Row with entry table -->
<div>
<div class="row">
<div class="col-md-3 col-md-offset-1">
<button class="btn btn-success" ng-click="addAccount()">Ajouter</button>
</div>
</div>
<div class="row">
<table class="table table-striped table-condensed table-hover">
<!-- Head of the table containing column headers and size -->
<thead>
<tr>
<th class="">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>
<!-- Body of the table containing the entries -->
<tbody>
<tr id="{{ account.id }}" class="form-inline" ng-class="rowClass(account)" ng-repeat="account in accounts">
<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 }}/entries">{{ account.name }}</a>
</span>
</td>
<td>
<span ng-class="valueClass(account, account.current)">
{{ account.current }}
</span>
</td>
<td>
<span ng-class="valueClass(account, account.pointed)">
{{ account.pointed }}
</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 }}
</span>
</td>
<td>
<form editable-form name="rowform" onbeforesave="saveAccount($data, $index)" shown="inserted == account">
<div class="btn-group">
<button type="submit" class="btn btn-xs btn-success"
ng-if="rowform.$visible">
<span class="fa fa-floppy-o"></span>
</button>
<button class="btn btn-xs btn-default"
ng-if="rowform.$visible && inserted == account"
ng-click="accounts.splice(0,1)">
<span class="fa fa-times"></span>
</button>
<button class="btn btn-xs btn-default"
ng-if="rowform.$visible && inserted != account" ng-click="rowform.$cancel()">
<span class="fa fa-times"></span>
</button>
<button type="button" ng-show="!rowform.$visible"
class="btn btn-xs btn-success" ng-click="rowform.$show()">
<span class="fa fa-pencil-square-o"></span>
</button>
<a ng-if="!isNew(account)" class="btn btn-xs btn-default" href="account/{{ account.id }}/scheduler">
<span class="fa fa-clock-o"></span>
</a>
</div>
</form>
</td>
</tr>
</tbody>
</table>
</div>
</div>