c05a98b216b4a097abf6099591b740711c6ee050
[working/Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / share / admin-page / admin-page.component.html
1 <ng-template #successStrTmpl i18n>{{idlClassDef.label}} Update Succeeded</ng-template>
2 <eg-string #successString [template]="successStrTmpl"></eg-string>
3
4 <ng-template #updateFailedStrTmpl i18n>Update of {{idlClassDef.label}} failed</ng-template>
5 <eg-string #updateFailedString [template]="updateFailedStrTmpl"></eg-string>
6
7 <ng-template #deleteFailedStrTmpl i18n>Delete of {{idlClassDef.label}} failed or was not allowed</ng-template>
8 <eg-string #deleteFailedString [template]="deleteFailedStrTmpl"></eg-string>
9
10 <ng-template #deleteSuccessStrTmpl i18n>{{idlClassDef.label}} Successfully Deleted</ng-template>
11 <eg-string #deleteSuccessString [template]="deleteSuccessStrTmpl"></eg-string>
12
13 <ng-template #createStrTmpl i18n>{{idlClassDef.label}} Succeessfully Created</ng-template>
14 <eg-string #createString [template]="createStrTmpl"></eg-string>
15
16 <ng-template #createErrStrTmpl i18n>Failed to create new {{idlClassDef.label}}</ng-template>
17 <eg-string #createErrString [template]="createErrStrTmpl"></eg-string>
18
19 <ng-container *ngIf="orgField">
20   <eg-org-family-select
21     [limitPerms]="viewPerms" 
22     [selectedOrgId]="contextOrg.id()"
23     [(ngModel)]="searchOrgs"
24     (ngModelChange)="grid.reload()">
25   </eg-org-family-select>
26   <hr/>
27 </ng-container>
28
29 <!-- idlObject and fieldName applied programmatically -->
30 <eg-translate #translator></eg-translate>
31
32 <ng-container *ngIf="helpTemplate">
33   <ng-container *ngTemplateOutlet="helpTemplate"></ng-container>
34 </ng-container>
35
36 <ng-template #configFieldLink let-row="row" let-col="col">
37   <a i18n-title title="Link To {{col.label}}"
38     [attr.href]="configFieldLinkUrl(row, col)">{{configLinkLabel(row, col)}}</a>
39 </ng-template>
40
41 <eg-grid #grid idlClass="{{idlClass}}" [dataSource]="dataSource" hideFields="{{hideGridFields}}"
42     [sortable]="true" persistKey="{{persistKey}}">
43   <eg-grid-toolbar-button [disabled]="!canCreate" 
44     label="New {{idlClassDef.label}}" i18n-label (onClick)="createNew()">
45   </eg-grid-toolbar-button>
46   <eg-grid-toolbar-button [disabled]="translatableFields.length == 0" 
47     label="Apply Translations" i18n-label (onClick)="translate()">
48   </eg-grid-toolbar-button>
49   <eg-grid-toolbar-action label="Edit Selected" i18n-label (onClick)="editSelected($event)">
50   </eg-grid-toolbar-action>
51   <eg-grid-toolbar-action label="Delete Selected" i18n-label (onClick)="deleteSelected($event)">
52   </eg-grid-toolbar-action>
53   <ng-container *ngFor="let cf of configFields">
54     <eg-grid-column name="{{cf.name}}" [cellTemplate]="configFieldLink">
55     </eg-grid-column>
56   </ng-container>
57 </eg-grid>
58
59 <eg-fm-record-editor #editDialog idlClass="{{idlClass}}" 
60     [fieldOptions]="fieldOptions" [defaultNewRecord]="defaultNewRecord"
61     [preloadLinkedValues]="true" readonlyFields="{{readonlyFields}}">
62 </eg-fm-record-editor>
63
64