nakedobjects.spa
Version:
Single Page Application client for a Naked Objects application.
39 lines (34 loc) • 1.57 kB
HTML
<div class="name">{{title}}:</div>
<ng-container *ngIf="propertyType === 'ref'">
<ng-container [ngSwitch]="propertyRefType">
<div *ngSwitchCase="null"></div>
<div *ngSwitchCase="'notNavigable'">
<div class="value">{{formattedValue}}</div>
</div>
<div *ngSwitchDefault class="reference" [ngClass]="color" nofClick (leftClick)="doClick()"
(rightClick)="doClick(true)" dnd-draggable [dragEnabled]="true" [dragData]="property" tabindex="0">
{{formattedValue}}
</div>
</ng-container>
</ng-container>
<ng-container *ngIf="propertyType === 'scalar'">
<ng-container [ngSwitch]="propertyReturnType">
<ng-container *ngSwitchCase="'string'">
<nof-attachment-property *ngIf="isBlob" [attachment]="attachment"></nof-attachment-property>
<ng-container *ngIf="!isBlob">
<div *ngIf="!isMultiline" class="value">
{{formattedValue}}
</div>
<div *ngIf="isMultiline" class="value multiline" [ngStyle]="{height : multilineHeight}">
<pre>{{formattedValue}}</pre>
</div>
</ng-container>
</ng-container>
<ng-container *ngSwitchCase="'boolean'">
<input type="checkbox" [checked]="value" disabled="disabled" />
</ng-container>
<ng-container *ngSwitchDefault>
<div class="value">{{formattedValue}}</div>
</ng-container>
</ng-container>
</ng-container>