]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/eg2/src/app/staff/admin/server/org-addr.component.html
lp1863252 toward geosort
[Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / admin / server / org-addr.component.html
1
2 <ngb-tabset #addressTabs *ngIf="orgUnit" (tabChange)="tabChanged($event)">
3   <ng-container *ngFor="let type of addrTypes()">
4     <b>type = {{type}}</b>
5
6     <ngb-tab *ngIf="addr(type)"
7       i18n-title id="{{type}}"
8       title="{{type === 'billing_address' ? 'Physical Address' : 
9         (type === 'holds_address' ? 'Holds Address' : 
10         (type === 'mailing_address' ? 'Mailing Address' : 'ILL Address'))}}">
11
12       <ng-template ngbTabContent>
13         <eg-fm-record-editor idlClass="aoa" readonlyFields="org_unit" 
14           [mode]="addr(type).isnew() ? 'create': 'update'" 
15           [hideBanner]="true" displayMode="inline" hiddenFields="id"
16           (recordSaved)="addrSaved($event)" 
17           [record]="addr(type)"
18           fieldOrder="address_type,street1,street2,city,county,state,country,post_code,san,valid"
19           >
20           <eg-fm-record-editor-action i18n-label label="Get Coordinates"
21             (actionClick)="getCoordinates($event)">
22           </eg-fm-record-editor-action>
23           <eg-fm-record-editor-action i18n-label label="Delete" *ngIf="!addr(type).isnew()"
24             (actionClick)="deleteAddress($event)" buttonCss="btn-warning">
25           </eg-fm-record-editor-action>
26         </eg-fm-record-editor>
27
28         <ng-container *ngIf="sharedAddress(addr(type).id())">
29           <div class="alert alert-info">
30             <span i18n>This address is used for multiple address types.</span>
31             <button (click)="cloneAddress(type)" 
32               class="btn btn-light ml-3" i18n>Clone As New Address</button>
33           </div>
34         </ng-container>
35       </ng-template>
36     </ngb-tab>
37   </ng-container>
38 </ngb-tabset>
39