120 lines
5.9 KiB
HTML
120 lines
5.9 KiB
HTML
|
|
||
|
|
||
|
<div class="editor-container container">
|
||
|
|
||
|
<div [ngClass]="{true:'visible', false:'invisible'}[tableVisible]">
|
||
|
<table class="table table-striped" [mfData]="tableData | serviceTableFilter : filterQuery" #mf="mfDataTable" [mfRowsOnPage]="rowsOnPage" [(mfSortBy)]="sortBy" [(mfSortOrder)]="sortOrder">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th colspan="1">
|
||
|
<input class="form-control" [(ngModel)]="filterQuery" placeholder='Filter'/>
|
||
|
</th>
|
||
|
<th>
|
||
|
<button class="btn btn-default" (click)="refreshTable($event)">
|
||
|
<span class="glyphicon glyphicon-refresh"></span>
|
||
|
</button>
|
||
|
</th>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<th [ngClass]="{true:'visible', false:'invisible'}[showIDs]"><mfDefaultSorter by="id">ID</mfDefaultSorter></th>
|
||
|
<th><mfDefaultSorter by="label">Label</mfDefaultSorter></th>
|
||
|
<th><mfDefaultSorter by="abbreviation">Abbreviation</mfDefaultSorter></th>
|
||
|
<th><mfDefaultSorter by="reference">Reference</mfDefaultSorter></th>
|
||
|
<th><mfDefaultSorter by="uri">Uri</mfDefaultSorter></th>
|
||
|
<th><mfDefaultSorter by="definition">Definition</mfDefaultSorter></th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
<tr class="grayout-empty-table" *ngIf="!mf.data[0]" [contextMenu]="basicMenu" [contextMenuSubject]="service"> <td colspan="5">No elements</td></tr>
|
||
|
<tr *ngFor="let service of mf.data" class="hover" [contextMenu]="basicMenu" [contextMenuSubject]="service">
|
||
|
<td [ngClass]="{true:'visible', false:'invisible'}[showIDs]">{{service?.id}}</td>
|
||
|
<td>{{service?.label}}</td>
|
||
|
<td>{{service?.abbreviation}}</td>
|
||
|
<td>{{service?.reference}}</td>
|
||
|
<td>{{service?.uri}}</td>
|
||
|
<td>{{service?.definition}}</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
<tfoot>
|
||
|
<tr>
|
||
|
<td colspan="5">
|
||
|
<mfBootstrapPaginator [rowsOnPageSet]="[10,20,40]"></mfBootstrapPaginator>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tfoot>
|
||
|
</table>
|
||
|
</div>
|
||
|
|
||
|
<!-- this is the dmp editor -->
|
||
|
<div [ngClass]="{true:'visible', false:'invisible'}[editorVisible]">
|
||
|
|
||
|
<div> <!-- form container -->
|
||
|
<div style="display:block;">
|
||
|
<button (click)="switchToTable()" class="btn btn-lg btn-success pull-right" style="max-width:120px;">
|
||
|
<span class="glyphicon glyphicon-arrow-left"></span> Go back
|
||
|
</button>
|
||
|
</div>
|
||
|
<form [formGroup]="serviceEditorForm" novalidate style="display:block;">
|
||
|
<div class="form-group" [ngClass]="{null:'invisible'}[editingService?.id]">
|
||
|
<label class="center-block">ID: {{editingService?.id}}
|
||
|
<input class="form-control invisible" formControlName="id" [ngModel]="editingService?.id">
|
||
|
</label>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="center-block">Label:
|
||
|
<input class="form-control" formControlName="label" [ngModel]="editingService?.label" (ngModelChange)="editingService.label=$event">
|
||
|
</label>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="center-block">Abbreviation:
|
||
|
<input class="form-control" formControlName="abbreviation" [ngModel]="editingService?.abbreviation" (ngModelChange)="editingService.abbreviation=$event">
|
||
|
</label>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="center-block">Reference:
|
||
|
<input class="form-control" formControlName="reference" [ngModel]="editingService?.reference" (ngModelChange)="editingService.reference$event">
|
||
|
</label>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="center-block">Uri:
|
||
|
<input class="form-control" formControlName="uri" [ngModel]="editingService?.uri" (ngModelChange)="editingService.uri$event">
|
||
|
</label>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="center-block">Definition:
|
||
|
<input class="form-control" formControlName="definition" [ngModel]="editingService?.definition" (ngModelChange)="editingService.definition$event">
|
||
|
</label>
|
||
|
</div>
|
||
|
<div class="form-group" style="width:540px;">
|
||
|
<button style="float:right;" type="submit" (click)="save($event, $data, $form)"class="btn btn-success">Save</button>
|
||
|
</div>
|
||
|
</form>
|
||
|
<p>Form value: {{ serviceEditorForm.value | json }}</p>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
<context-menu>
|
||
|
<ng-template contextMenuItem [subMenu]="manage">
|
||
|
<span></span>Manage Services
|
||
|
</ng-template>
|
||
|
<context-menu #manage>
|
||
|
<ng-template contextMenuItem (execute)="newService($event?.item)">
|
||
|
<span class="glyphicon glyphicon-plus"></span>Create service
|
||
|
</ng-template>
|
||
|
<ng-template contextMenuItem (execute)="editService($event?.item?.id)">
|
||
|
<span class="glyphicon glyphicon-pencil"></span>Edit this service
|
||
|
</ng-template>
|
||
|
<ng-template contextMenuItem (execute)="delete($event?.item?.id)">
|
||
|
<span class="glyphicon glyphicon-trash red"></span> Delete this
|
||
|
</ng-template>
|
||
|
</context-menu>
|
||
|
<ng-template contextMenuItem>
|
||
|
<span></span>Show full tree connections
|
||
|
</ng-template>
|
||
|
</context-menu>
|
||
|
|