2015-07-20 12:59:26 +02:00

118 lines
4.0 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 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 class=form-inline">
<td>
<input type="text" class="form-control" ng-model="newAccount.name" />
</td>
<td></td>
<td></td>
<td>
<input type="text" class="form-control"
ng-model="newAccount.authorized_overdraft" />
</td>
<td>
<div class="btn-group">
<button class="btn btn-xs btn-success"
ng-click="createAccount(newAccount)">
<span class="fa fa-plus"></span>
</button>
<button class="btn btn-xs btn-default"
ng-click="resetAccount(newAccount)">
<span class="fa fa-times"></span>
</button>
</div>
</td>
</tr>
<tr id="account_{{account.id}}" class="form-inline" ng-if="!account.editing" ng-repeat-start="account in accounts">
<td><a href="account/{{ account.id }}/entries">{{ account.name }}</a></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>{{ account.authorized_overdraft }}</td>
<td>
<div class="btn-group">
<button class="btn btn-xs btn-success"
ng-click="editAccount(account)">
<span class="fa fa-pencil-square-o"></span>
</button>
<button class="btn btn-xs btn-default"
ng-click="deleteAccount(account)">
<span class="fa fa-trash"></span>
</button>
<a class="btn btn-xs btn-default"
href="account/{{ account.id }}/scheduler">
<span class="fa fa-clock-o"></span>
</a>
</div>
</td>
</tr>
<tr id="account_{{account.id}}" class="form-inline" ng-if="account.editing" ng-repeat-end>
<td>
<input type="text" class="form-control" ng-model="account.name" />
</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>
<input type="text" class="form-control"
ng-model="account.authorized_overdraft" />
</td>
<td>
<div class="btn-group">
<button class="btn btn-xs btn-success"
ng-click="saveAccount(account)">
<span class="fa fa-floppy-o"></span>
</button>
<button class="btn btn-xs btn-default"
ng-click="cancelEditAccount(account)">
<span class="fa fa-times"></span>
</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>