887f7c097fef50f5551c1871d852ad9056e44916
[working/Evergreen.git] /
1 <eg-title i18n-prefix prefix="Circulation Policy Configuration"></eg-title>
2 <eg-staff-banner bannerText="Circulation Policy Configuration" i18n-bannerText>
3 </eg-staff-banner>
4
5 <eg-string #successString i18n-text text="Circulation Policy Update Succeeded"></eg-string>
6 <eg-string #createString i18n-text text="Circulation Policy Creation Succeeded"></eg-string>
7
8 <eg-grid #grid idlClass="ccmm"
9   [dataSource]="dataSource"
10   [sortable]="true"
11   persistKey="admin.config.circ_matrix_matchpoint"
12   (onRowActivate)="editSelected([$event])"
13   [showFields]='"is_renewal,active,org_unit,copy_circ_lib,copy_owning_lib,user_home_ou"'>
14   <eg-grid-toolbar-button 
15     label="New Circ Matrix Matchpoint" i18n-label (onClick)="createNew()">
16   </eg-grid-toolbar-button>
17   <eg-grid-toolbar-action
18     label="Edit Selected" i18n-label
19     (onClick)="editSelected($event)"
20     [disableOnRows]="notOneSelectedRow">
21   </eg-grid-toolbar-action>
22 </eg-grid>
23
24 <eg-circ-matrix-matchpoint-dialog #matchpointDialog
25   (recordCanceled)="clearLinkedCircLimitSets()"
26   (recordError)="clearLinkedCircLimitSets()">
27   <div #limitSets [ngStyle]="{marginBottom:'10px'}">
28     <ng-container>
29       <eg-linked-circ-limit-sets
30         #circLimitSets
31         (outputLinkedLimitSet)="setLimitSets($event)">
32       </eg-linked-circ-limit-sets>
33     </ng-container>
34   </div>
35
36   <ng-template #active let-idPrefix="idPrefix" let-field="field" let-record="record">
37     <div class="col-lg-9">
38       <input
39         class="form-check-input"
40         type="checkbox"
41         name="{{field.name}}"
42         id="{{idPrefix}}-{{field.name}}"
43         [disabled]="field.readOnly"
44         [ngModel]="record[field.name]()"
45         (ngModelChange)="record[field.name]($event)"/>
46     </div>
47     <div class="row" [ngStyle]="{
48       width:'150%',
49       backgroundColor:'black',
50       marginLeft:'-43%',
51       marginTop:'6%',
52       marginBottom:'-1%',
53       opacity:'90%',
54       fontSize:'18px',
55       textAlign:'center'}">
56       <div [ngStyle]="{width:'100%', color:'white'}">Circulation Policies</div>
57     </div>
58   </ng-template>
59
60   <ng-template #item_age let-idPrefix="idPrefix" let-field="field" let-record="record">
61     <div class="col-lg-9">
62       <input
63         class="form-control"
64         id="{{idPrefix}}-{{field.name}}" name="{{field.name}}"
65         type="text"
66         placeholder="{{field.label}}..." i18n-placeholder
67         [required]="field.isRequired()"
68         [ngModel]="record[field.name]()"
69         (ngModelChange)="record[field.name]($event)"/>
70     </div>
71     <div class="row" [ngStyle]="{
72       width:'150%',
73       backgroundColor:'black',
74       marginLeft:'-43%',
75       marginTop:'3%',
76       marginBottom:'-1%',
77       opacity:'90%',
78       fontSize:'18px',
79       textAlign:'center',
80       paddingTop:'3.5%',
81       paddingBottom:'5.5%',
82       paddingLeft:'3.5%',
83       paddingRight:'3.5%'}">
84       <div [ngStyle]="{width:'100%', color:'white'}">Circulation Policy Effects</div>
85     </div>
86   </ng-template>
87
88   <eg-fm-record-editor #editDialog
89     idlClass="ccmm"
90     [preloadLinkedValues]="true"
91     readonlyFields="name"
92     displayMode="inline"
93     fieldOrder="id,active,grp,org_unit,copy_circ_lib,copy_owning_lib,user_home_ou,is_renewal,juvenile_flag,circ_modifier,copy_location,marc_type,marc_form,marc_bib_level,marc_vr_format,ref_flag,usr_age_lower_bound,usr_age_upper_bound,item_age,circulate,duration_rule,renewals,hard_due_date,recurring_fine_rule,grace_period,max_fine_rule,available_copy_hold_ratio,total_copy_hold_ratio,script_test,description"
94     requiredFields="active,grp,org_unit"
95     (recordSaved)="configureLimitSets($event); clearLinkedCircLimitSets(); closeDialog()"
96     [fieldOptions]="{active:{customTemplate:{template:active}}, item_age:{customTemplate:{template:item_age}}}">
97   </eg-fm-record-editor>
98 </eg-circ-matrix-matchpoint-dialog>