ceb9cbc001a0acd03a52aa80dd7ef5b4119693da
[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 || gridFilters">
20   <div class="row">
21     <div class="col-lg-6">
22       <ng-container *ngIf="orgField">
23         <eg-org-family-select
24           [limitPerms]="viewPerms" 
25           [selectedOrgId]="contextOrg.id()"
26           [(ngModel)]="searchOrgs"
27           (ngModelChange)="grid.reload()">
28         </eg-org-family-select>
29       </ng-container>
30     </div>
31     <div class="col-lg-6 d-flex">
32       <div class="flex-1"></div><!-- push right -->
33       <ng-container *ngIf="gridFilters">
34         <span i18n>Filters Applied: {{gridFilters | json}}</span>
35         <a class="pl-2 font-italic" 
36           [attr.href]="clearGridFiltersUrl()" i18n>Clear Filters</a>
37       </ng-container>
38     </div>
39   </div>
40   <hr/>
41 </ng-container>
42
43 <!-- idlObject and fieldName applied programmatically -->
44 <eg-translate #translator></eg-translate>
45
46 <ng-container *ngIf="helpTemplate">
47   <ng-container *ngTemplateOutlet="helpTemplate"></ng-container>
48 </ng-container>
49
50 <ng-template #configFieldLink let-row="row" let-col="col">
51   <a i18n-title title="Link To {{col.label}}"
52     [attr.href]="configFieldLinkUrl(row, col)">{{configLinkLabel(row, col)}}</a>
53 </ng-template>
54
55 <eg-grid #grid idlClass="{{idlClass}}" [dataSource]="dataSource" hideFields="{{hideGridFields}}"
56     [sortable]="true" persistKey="{{persistKey}}">
57   <eg-grid-toolbar-button [disabled]="!canCreate" 
58     label="New {{idlClassDef.label}}" i18n-label (onClick)="createNew()">
59   </eg-grid-toolbar-button>
60   <eg-grid-toolbar-button [disabled]="translatableFields.length == 0" 
61     label="Apply Translations" i18n-label (onClick)="translate()">
62   </eg-grid-toolbar-button>
63   <eg-grid-toolbar-action label="Edit Selected" i18n-label (onClick)="editSelected($event)">
64   </eg-grid-toolbar-action>
65   <eg-grid-toolbar-action label="Delete Selected" i18n-label (onClick)="deleteSelected($event)">
66   </eg-grid-toolbar-action>
67   <ng-container *ngFor="let cf of configFields">
68     <eg-grid-column name="{{cf.name}}" [cellTemplate]="configFieldLink">
69     </eg-grid-column>
70   </ng-container>
71 </eg-grid>
72
73 <eg-fm-record-editor #editDialog idlClass="{{idlClass}}" 
74     [fieldOptions]="fieldOptions" [defaultNewRecord]="defaultNewRecord"
75     [preloadLinkedValues]="true" readonlyFields="{{readonlyFields}}">
76 </eg-fm-record-editor>
77
78