Externalize operation list template.

This commit is contained in:
Alexis Lahouze 2018-06-14 11:54:35 +02:00
parent d2e8a3f7ef
commit 296c89ce20
2 changed files with 47 additions and 46 deletions

View File

@ -0,0 +1,46 @@
<!-- vim: set tw=80 ts=2 sw=2 sts=2 : -->
<div>
<div class="row">
<div class="col-md-8">
<balance-chart [account]="account"></balance-chart>
</div>
<div class="col-md-4">
<category-chart></category-chart>
</div>
</div>
<div class="row">
<table class="table table-striped table-condensed table-hover">
<thead>
<tr>
<th>#</th>
<th>Date d'op.</th>
<th>Libell&eacute; de l'op&eacute;ration</th>
<th>Montant</th>
<th>Solde</th>
<th>Cat&eacute;gorie</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="6">
<a class="btn btn-success"
[routerLink]="['new']">
Ajouter
</a>
</td>
</tr>
<tr [operation-row]="operation"
[account]="account"
(needsReload)="loadData()"
*ngFor="let operation of operations">
</tr>
</tbody>
</table>
</div>
</div>

View File

@ -16,52 +16,7 @@ import { OperationService } from './operation.service';
@Component({ @Component({
selector: 'operation-list', selector: 'operation-list',
template: ` templateUrl: './operationList.component.html'
<div>
<div class="row">
<div class="col-md-8">
<balance-chart [account]="account"></balance-chart>
</div>
<div class="col-md-4">
<category-chart></category-chart>
</div>
</div>
<div class="row">
<table class="table table-striped table-condensed table-hover">
<thead>
<tr>
<th>#</th>
<th>Date d'op.</th>
<th>Libell&eacute; de l'op&eacute;ration</th>
<th>Montant</th>
<th>Solde</th>
<th>Cat&eacute;gorie</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="6">
<a class="btn btn-success"
[routerLink]="['new']">
Ajouter
</a>
</td>
</tr>
<tr [operation-row]="operation"
[account]="account"
(needsReload)="loadData()"
*ngFor="let operation of operations">
</tr>
</tbody>
</table>
</div>
</div>
`
}) })
export class OperationListComponent implements OnInit { export class OperationListComponent implements OnInit {
private account: Account; private account: Account;