nakedobjects.spa
Version:
Single Page Application client for a Naked Objects application.
27 lines • 1.51 kB
HTML
<ng-container *ngIf="collection">
<div class="list">
<header class="header">
<div class="title">{{title}}</div>
<nof-action-bar [actions]="actionHolders"></nof-action-bar>
<div class="messages">{{message}}</div>
</header>
<div class="details" *ngIf="size === 0">{{description}}</div>
<ng-container *ngIf="size > 0">
<nof-action-list *ngIf="showActions()" [menuHolder]="collection"></nof-action-list>
<nof-dialog [parent]="collection" [selectedDialogId]="selectedDialogId"></nof-dialog>
<div class="summary">
<div class="details">{{description}}</div>
<div *ngIf="state === 'list'" class="icon table" (click)="doTable()" title="View as Table" alt="View as Table"></div>
<div *ngIf="state === 'table'" class="icon list" (click)="doList()" title="View as List" alt="View as List"></div>
</div>
<table>
<thead>
<tr nof-header [collection]="collection" [state]="currentState"></tr>
</thead>
<tbody *ngIf="state === 'list' || hasTableData()">
<tr *ngFor="let item of items; let i = index" nof-row [item]="item" [row]="i" [withCheckbox]="!disableActions()" [isTable]="state === 'table'"></tr>
</tbody>
</table>
</ng-container>
</div>
</ng-container>