Move add button. Reindent.

This commit is contained in:
Alexis Lahouze 2015-08-19 17:40:48 +02:00
parent 2884ce78aa
commit 281eebbd62
1 changed files with 88 additions and 87 deletions

View File

@ -16,101 +16,102 @@
-->
<!-- 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>
<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>
<td colspan="5">
<button class="btn btn-success btn-success"
ng-click="addAccount()">Ajouter</button>
</td>
</tr>
<!-- 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>
<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.current)">
{{ account.current }}
</span>
</td>
<td>
<span ng-class="valueClass(account, account.pointed)">
{{ account.pointed }}
</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>
<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="!account.id">
<div class="btn-group">
<!-- Save account. -->
<button type="submit" class="btn btn-xs btn-success"
ng-if="rowform.$visible">
<span class="fa fa-floppy-o"></span>
</button>
<td>
<form editable-form name="rowform"
onbeforesave="saveAccount($data, $index)" shown="!account.id">
<div class="btn-group">
<!-- Save account. -->
<button type="submit" class="btn btn-xs btn-success"
ng-if="rowform.$visible">
<span class="fa fa-floppy-o"></span>
</button>
<!-- Cancel account edition. -->
<button type="button" class="btn btn-xs btn-default"
ng-if="rowform.$visible"
ng-click="cancelEdit(rowform, account, $index)">
<span class="fa fa-times"></span>
</button>
<!-- Cancel account edition. -->
<button type="button" class="btn btn-xs btn-default"
ng-if="rowform.$visible"
ng-click="cancelEdit(rowform, account, $index)">
<span class="fa fa-times"></span>
</button>
<!-- Edit account. -->
<button type="button" class="btn btn-xs btn-success"
ng-show="!rowform.$visible"
ng-click="rowform.$show()">
<span class="fa fa-pencil-square-o"></span>
</button>
<!-- Edit account. -->
<button type="button" class="btn btn-xs btn-success"
ng-show="!rowform.$visible"
ng-click="rowform.$show()">
<span class="fa fa-pencil-square-o"></span>
</button>
<!-- Delete account, with confirm. -->
<button type="button" class="btn btn-xs btn-default"
ng-if="account.id"
ng-click="deleteAccount(account, $index)">
<span class="fa fa-trash-o"></span>
</button>
<!-- Delete account, with confirm. -->
<button type="button" class="btn btn-xs btn-default"
ng-if="account.id"
ng-click="deleteAccount(account, $index)">
<span class="fa fa-trash-o"></span>
</button>
<!-- Open account scheduler. -->
<a class="btn btn-xs btn-default"
ng-if="!isNew(account)"
href="account/{{ account.id }}/scheduler">
<span class="fa fa-clock-o"></span>
</a>
</div>
</form>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Open account scheduler. -->
<a class="btn btn-xs btn-default"
ng-if="!isNew(account)"
href="account/{{ account.id }}/scheduler">
<span class="fa fa-clock-o"></span>
</a>
</div>
</form>
</td>
</tr>
</tbody>
</table>
</div>