Revert "LP1904036 Ang Patron UI updating non-menu links"
authorBill Erickson <berickxx@gmail.com>
Thu, 6 Oct 2022 17:14:07 +0000 (13:14 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 28 Oct 2022 00:13:43 +0000 (20:13 -0400)
This reverts commit 26fe8cf5bb70f26138a740962dc3d8e2eb028bd2.

Signed-off-by: Jane Sandberg <js7389@princeton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
25 files changed:
Open-ILS/src/eg2/src/app/staff/booking/reservations-grid.component.ts
Open-ILS/src/eg2/src/app/staff/catalog/catalog.component.html
Open-ILS/src/eg2/src/app/staff/catalog/result/record.component.html
Open-ILS/src/eg2/src/app/staff/share/holdings/mark-damaged-dialog.component.html
Open-ILS/src/eg2/src/app/staff/share/holds/detail.component.html
Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.html
Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.ts
Open-ILS/src/templates/staff/admin/local/circ/neg_balance_users.tt2
Open-ILS/src/templates/staff/cat/bucket/batch_hold/t_pending.tt2
Open-ILS/src/templates/staff/cat/bucket/batch_hold/t_view.tt2
Open-ILS/src/templates/staff/cat/bucket/share/t_bucket_info.tt2
Open-ILS/src/templates/staff/cat/item/t_circ_list_pane.tt2
Open-ILS/src/templates/staff/cat/item/t_circs_pane.tt2
Open-ILS/src/templates/staff/cat/item/t_holds_pane.tt2
Open-ILS/src/templates/staff/cat/item/t_list.tt2
Open-ILS/src/templates/staff/circ/checkin/t_checkin.tt2
Open-ILS/src/templates/staff/circ/curbside/t_arrived_manager.tt2
Open-ILS/src/templates/staff/circ/curbside/t_delivered_manager.tt2
Open-ILS/src/templates/staff/circ/curbside/t_staged_manager.tt2
Open-ILS/src/templates/staff/circ/curbside/t_to_be_staged_manager.tt2
Open-ILS/src/templates/staff/circ/holds/t_pull_list.tt2
Open-ILS/src/templates/staff/circ/patron/bucket/t_pending.tt2
Open-ILS/src/templates/staff/circ/patron/bucket/t_view.tt2
Open-ILS/src/templates/staff/circ/share/t_event_override_dialog.tt2
Open-ILS/src/templates/staff/t_splash.tt2

index 92b23b8..8344ee5 100644 (file)
@@ -1,5 +1,4 @@
 import {Component, EventEmitter, Input, Output, OnChanges, OnInit, ViewChild} from '@angular/core';
-import {Location} from '@angular/common';
 import {Router} from '@angular/router';
 import {Observable, from, of} from 'rxjs';
 import {tap, switchMap, mergeMap} from 'rxjs/operators';
@@ -76,7 +75,6 @@ export class ReservationsGridComponent implements OnChanges, OnInit {
     returnNotAppropriate: (rows: IdlObject[]) => boolean;
 
     constructor(
-        private ngLocation: Location,
         private auth: AuthService,
         private format: FormatService,
         private pcrud: PcrudService,
@@ -173,11 +171,7 @@ export class ReservationsGridComponent implements OnChanges, OnInit {
 
         this.viewPatronRecord = (reservations: IdlObject[]) => {
             const patronIds = reservations.map(reservation => reservation.usr().id());
-            window.open(
-                this.ngLocation.prepareExternalUrl(
-                    '/staff/circ/patron/' + patronIds[0] + '/checkout'
-                )
-            );
+            window.open('/eg/staff/circ/patron/' + patronIds[0] + '/checkout');
         };
 
         this.noSelectedRows = (rows: IdlObject[]) => (rows.length === 0);
index 7de0b03..17c7ffb 100644 (file)
@@ -6,7 +6,7 @@
     <div class="col-lg-10 offset-lg-1 d-flex justify-content-center">
       <span class="mt-2" i18n>
         Placing hold for patron 
-        <a routerLink="/staff/circ/patron/{{holdForUser().id()}}/holds">
+        <a href="/eg/staff/circ/patron/{{holdForUser().id()}}/holds">
           {{holdForUser().pref_family_name() || holdForUser().family_name()}}, 
           {{holdForUser().pref_first_given_name() || holdForUser().first_given_name()}}
         </a>.
index 09f258c..bc6ec77 100644 (file)
               Created {{summary.record.create_date() | date:'shortDate'}} by
               <!-- creator if fleshed after the initial data set is loaded -->
               <a *ngIf="summary.record.creator().usrname" target="_self"
-                routerLink="/staff/circ/patron/{{summary.record.creator().id()}}/checkout">
+                href="/eg/staff/circ/patron/{{summary.record.creator().id()}}/checkout">
                   {{summary.record.creator().usrname()}}
               </a>
               <!-- add a spacer pending data to reduce page shuffle -->
             <div class="float-right small-text-1" i18n>
               Edited {{summary.record.edit_date() | date:'shortDate'}} by
               <a *ngIf="summary.record.editor().usrname" target="_self"
-                routerLink="/staff/circ/patron/{{summary.record.editor().id()}}/checkout">
+                href="/eg/staff/circ/patron/{{summary.record.editor().id()}}/checkout">
                   {{summary.record.editor().usrname()}}
               </a>
               <span *ngIf="!summary.record.editor().usrname"> ... </span>
index 9510b4f..07e5c52 100644 (file)
@@ -32,7 +32,7 @@
         <ul class="list-group list-group-flush">
           <li class="list-group-item" i18n>
             Item was last checked out by patron
-            <a routerLink="/staff/circ/patron/{{chargeResponse.circ.usr().id()}}/checkout">
+            <a href="/eg/staff/circ/patron/{{chargeResponse.circ.usr().id()}}/checkout">
               {{chargeResponse.circ.usr().family_name()}},
               {{chargeResponse.circ.usr().first_given_name()}} 
               ({{chargeResponse.circ.usr().usrname()}})
index 0b3b50f..4315e28 100644 (file)
   <div class="well-row">
     <div class="well-label" i18n>Patron Name</div>
     <div class="well-value">
-      <a routerLink="/staff/circ/patron/{{hold.usr_id}}/checkout">
+      <a href="/eg/staff/circ/patron/{{hold.usr_id}}/checkout">
         {{hold.usr_display_name}}
       </a>
     </div>
     <!-- force consistent width -->
     <div class="well-label" i18n>Patron Barcode</div>
     <div class="well-value">
-      <a routerLink="/staff/circ/patron/{{hold.usr_id}}/checkout">
+      <a href="/eg/staff/circ/patron/{{hold.usr_id}}/checkout">
         {{hold.ucard_barcode}}
       </a>
     </div>
index 97a6ced..d30526d 100644 (file)
         datatype="timestamp" [datePlusTime]="true"></eg-grid-column>
 
       <ng-template #userBarcodeTmpl let-hold="row">
-        <a routerLink="/staff/circ/patron/{{hold.usr_id}}/checkout" target="_blank">
+        <a href="/eg/staff/circ/patron/{{hold.usr_id}}/checkout" target="_blank">
           {{hold.ucard_barcode}}
         </a>
       </ng-template>
index 8221b1d..2df39ad 100644 (file)
@@ -478,11 +478,9 @@ export class HoldsGridComponent implements OnInit {
     showPatron(rows: any[]) {
         const usrIds = Array.from(new Set( rows.map(r => r.usr_id).filter( usr_id => Boolean(usr_id)) ));
         usrIds.forEach( usrId => {
-            window.open(
-                this.ngLocation.prepareExternalUrl(
-                   '/staff/circ/patron/' + usrId + '/checkout'
-                )
-            );
+            const url =
+                '/eg/staff/circ/patron/' + usrId + '/checkout';
+            window.open(url, '_blank');
         });
     }
 
index 49d790f..b7af3cb 100644 (file)
@@ -41,7 +41,7 @@
     label="[% l('Retrieve Patron') %]"></eg-grid-action>
   <eg-grid-field label="[% l('Barred') %]" path='usr.barred'></eg-grid-field>
   <eg-grid-field label="[% l('Barcode') %]" path="usr.card.barcode">
-    <a href="/eg2/staff/circ/patron/{{item.usr.id()}}/checkout/">
+    <a href="./circ/patron/{{item.usr.id()}}/checkout/" target="_blank">
       {{item.usr.card().barcode()}}
     </a>
   </eg-grid-field>
index 8b42568..5e441d6 100644 (file)
@@ -50,7 +50,7 @@
   <eg-grid-field label="[% l('First Name') %]" path="first_given_name" visible></eg-grid-field>
   <eg-grid-field label="[% l('Last Name') %]" path="family_name" visible></eg-grid-field>
   <eg-grid-field label="[% l('Barcode') %]"      path='card.barcode' visible>
-    <a href="/eg2/staff/circ/patron/{{item['id']}}/holds">
+    <a target="_self" href="[% ctx.base_path %]/staff/circ/patron/{{item['id']}}/holds">
       {{item['card.barcode']}}
     </a>
   </eg-grid-field>
index 953c1ca..45c0c4b 100644 (file)
@@ -21,7 +21,7 @@
   <eg-grid-field label="[% l('First Name') %]" path="first_given_name" visible></eg-grid-field>
   <eg-grid-field label="[% l('Last Name') %]" path="family_name" visible></eg-grid-field>
   <eg-grid-field label="[% l('Barcode') %]"      path='card.barcode' visible>
-    <a href="/eg2/staff/circ/patron/{{item['id']}}/holds">
+    <a target="_self" href="[% ctx.base_path %]/staff/circ/patron/{{item['id']}}/holds">
       {{item['card.barcode']}}
     </a>
   </eg-grid-field>
index 5935349..333f8ee 100644 (file)
@@ -9,7 +9,7 @@
   <span> / [% l('Created {{bucket().create_time() | date:egDateAndTimeFormat}}') %]</span>
   <span ng-show="bucket()._owner_name"> / 
     {{bucket()._owner_name}} 
-    <a href="/eg2/staff/circ/patron/{{bucket().owner()}}/checkout">
+    <a target="_self" href="./circ/patron/{{bucket().owner()}}/checkout">
       ({{bucket()._owner_ident}})
     </a>
     @ {{bucket()._owner_ou}}
index ec68062..036f3fe 100644 (file)
@@ -22,8 +22,8 @@
 <div class="row" ng-show="!isMaxCircHistoryZero" ng-repeat="circ in circ_list">
   <div class="flex-row">
     <div class="flex-cell well">
-      <a ng-if="circ.usr()"
-        href="/eg2/staff/circ/patron/{{circ.usr().id()}}/checkout">
+      <a ng-if="circ.usr()" target="_self"
+        href="./circ/patron/{{circ.usr().id()}}/checkout">
         [% l('[_1], [_2] [_3] : [_4]', 
           '{{circ.usr().family_name()}}'
           '{{circ.usr().first_given_name()}}'
@@ -65,7 +65,7 @@
     <div class="flex-cell">[% l('Check Out Staff') %]</div>
     <div class="flex-cell well">
       <a ng-if="circ.circ_staff()" target="_blank"
-        href="/eg2/staff/circ/patron/{{circ.circ_staff().id()}}/checkout">
+        href="./circ/patron/{{circ.circ_staff().id()}}/checkout">
           {{circ.circ_staff().usrname()}}
       </a>
     </div>
index 412aec3..2eb548d 100644 (file)
@@ -13,8 +13,8 @@
   <div class="flex-row">
     <div class="flex-cell">[% l('Patron') %]</div>
     <div class="flex-cell well">
-      <a href="/eg2/staff/circ/patron/{{prev_circ_usr.id()}}/checkout" 
-        ng-if="prev_circ_usr">
+      <a href="./circ/patron/{{prev_circ_usr.id()}}/checkout" 
+        ng-if="prev_circ_usr" target="_self">
         [% l('[_1], [_2] [_3] : [_4]', 
         '{{prev_circ_usr.family_name()}}'
         '{{prev_circ_usr.first_given_name()}}'
   <div class="flex-row">
     <div class="flex-cell">[% l('Patron') %]</div>
     <div class="flex-cell well">
-      <a href="/eg2/staff/circ/patron/{{circ.usr().id()}}/checkout" 
-        ng-if="circ.usr()">
+      <a href="./circ/patron/{{circ.usr().id()}}/checkout" 
+        ng-if="circ.usr()" target="_self">
         [% l('[_1], [_2] [_3] : [_4]', 
           '{{circ.usr().family_name()}}'
           '{{circ.usr().first_given_name()}}'
index 77ab2f1..bb26920 100644 (file)
@@ -12,8 +12,8 @@
   <div class="flex-row">
     <div class="flex-cell">[% l('Patron') %]</div>
     <div class="flex-cell well">
-      <a href="/eg2/staff/circ/patron/{{hold.usr().id()}}/checkout" 
-        ng-if="hold">
+      <a href="./circ/patron/{{hold.usr().id()}}/checkout" 
+        ng-if="hold" target="_self">
         [% l('[_1], [_2] [_3] : [_4]', 
           '{{hold.usr().family_name()}}'
           '{{hold.usr().first_given_name()}}'
@@ -25,8 +25,8 @@
   <div class="flex-row">
     <div class="flex-cell">[% l('Requestor') %]</div>
     <div class="flex-cell well">
-      <a href="/eg2/staff/circ/patron/{{hold.requestor().id()}}/checkout" 
-        ng-if="hold">
+      <a href="./circ/patron/{{hold.requestor().id()}}/checkout" 
+        ng-if="hold" target="_self">
         [% l('[_1], [_2] [_3] : [_4]', 
           '{{hold.requestor().family_name()}}'
           '{{hold.requestor().first_given_name()}}'
index e01d4ba..4431a3b 100644 (file)
 
   <eg-grid-field label="[% l('Created By') %]"
     path="creator" hidden>
-    <a href="/eg2/staff/circ/patron/{{item['creator.id']}}/checkout">
+    <a target="_blank" href="[% ctx.base_path %]/staff/circ/patron/{{item['creator.id']}}/checkout">
       {{item['creator.usrname']}} <span ng-show="item['creator.id']" class="glyphicon glyphicon-new-window"></span>
     </a>
   </eg-grid-field>
index 0bdf0be..0606ce7 100644 (file)
     <span class="pad-horiz alert alert-danger">{{fine_total | currency}}</span>
     <span ng-if="billable_barcode">
       <!-- note: this forces a new tab -->
-      <a href='/eg2/staff/circ/patron/{{billable_user_id}}/bills'>
+      <a href='./circ/patron/{{billable_user_id}}/bills' target='_blank'>
         <span>[% l('Transaction for [_1] billed:', '{{billable_barcode}}') %]</span>
       </a>
       <span class="pad-horiz alert alert-danger">{{billable_amount | currency}}</span>
index d06f92a..0690e73 100644 (file)
@@ -14,7 +14,7 @@
 
     <eg-grid-field label="[% l('Pickup Date/Time') %]" path="slot.slot" datatype="timestamp"></eg-grid-field>
     <eg-grid-field label="[% l('Patron') %]" path="slot.patron" compiled handlers="gridCellHandlers">
-      <a href="/eg2/staff/circ/patron/{{item.slot.patron().id()}}/holds" target="_blank">
+      <a href="./circ/patron/{{item.slot.patron().id()}}/holds" target="_blank">
         {{item.slot.patron().family_name()}} / {{item.slot.patron().card().barcode()}}
         <span class="glyphicon glyphicon-new-window"></span>
       </a>
index adbc93e..5b2efa2 100644 (file)
@@ -14,7 +14,7 @@
 
     <eg-grid-field label="[% l('Delivery Date/Time') %]" path="slot.delivered" datatype="timestamp"></eg-grid-field>
     <eg-grid-field label="[% l('Patron') %]" path="slot.patron" compiled>
-      <a href="/eg2/staff/circ/patron/{{item.slot.patron().id()}}/items_out" target="_blank">
+      <a href="./circ/patron/{{item.slot.patron().id()}}/items_out" target="_blank">
         {{item.slot.patron().family_name()}} / {{item.slot.patron().card().barcode()}}
         <span class="glyphicon glyphicon-new-window"></span>
       </a>
index 96fe669..1615553 100644 (file)
@@ -14,7 +14,7 @@
 
     <eg-grid-field label="[% l('Pickup Date/Time') %]" path="slot.slot" datatype="timestamp"></eg-grid-field>
     <eg-grid-field label="[% l('Patron') %]" path="slot.patron" compiled handlers="gridCellHandlers">
-      <a href="/eg2/staff/circ/patron/{{item.slot.patron().id()}}/holds" target="_blank">
+      <a href="./circ/patron/{{item.slot.patron().id()}}/holds" target="_blank">
         {{item.slot.patron().family_name()}} / {{item.slot.patron().card().barcode()}}
         <span class="glyphicon glyphicon-new-window"></span>
       </a>
index 6f6a433..096c5b7 100644 (file)
@@ -14,7 +14,7 @@
 
     <eg-grid-field label="[% l('Pickup Date/Time') %]" path="slot.slot" datatype="timestamp"></eg-grid-field>
     <eg-grid-field label="[% l('Patron') %]" path="slot.patron" compiled handlers="gridCellHandlers">
-      <a href="/eg2/staff/circ/patron/{{item.slot.patron().id()}}/holds" target="_blank">
+      <a href="./circ/patron/{{item.slot.patron().id()}}/holds" target="_blank">
         {{item.slot.patron().family_name()}} / {{item.slot.patron().card().barcode()}}
         <span class="glyphicon glyphicon-new-window"></span>
       </a>
index 912f7a4..3a56286 100644 (file)
   <eg-grid-field name="patron_id" path="usr.id" hidden required></eg-grid-field>
   <eg-grid-field name="patron_barcode" path="usr.card.barcode" 
     hidden label="[% l('Patron Barcode') %]">
-    <a href="/eg2/staff/circ/patron/{{item.patron_id}}/holds">
+    <a href="./circ/patron/{{item.patron_id}}/holds" target="_self">
       {{item.patron_barcode}}
     </a>
   </eg-grid-field>
index 56a2663..d19e231 100644 (file)
@@ -48,7 +48,7 @@
 
   <eg-grid-field label="[% l('Barcode') %]"
     path="card.barcode" visible>
-    <a href="/eg2/staff/circ/patron/{{item.id}}/edit">
+    <a target="_self" href="[% ctx.base_path %]/staff/circ/patron/{{item.id}}/edit">
       {{item['card.barcode']}}
     </a>
   </eg-grid-field>
index de002d6..22241fc 100644 (file)
@@ -48,7 +48,7 @@ progress {
 
   <eg-grid-field label="[% l('Barcode') %]"
     path="card.barcode" visible>
-    <a href="/eg2/staff/circ/patron/{{item.id}}/edit">
+    <a target="_self" href="[% ctx.base_path %]/staff/circ/patron/{{item.id}}/edit">
       {{item['card.barcode']}}
     </a>
   </eg-grid-field>
index 80489d9..f3f1317 100644 (file)
@@ -17,7 +17,7 @@
           <div ng-if="copy_barcode" class="strong-text-2">{{copy_barcode}}</div>
           {{evt.desc}}
           <div ng-if="evt.textcode == 'ITEM_ON_HOLDS_SHELF'">
-            <a target="_blank" href="/eg2/staff/circ/patron/{{patronID}}/checkout">{{patronName}}</a>.
+            <a target="_blank" href="[% ctx.base_path %]/staff/circ/patron/{{patronID}}/checkout">{{patronName}}</a>.
             <div>
               <label><input type="checkbox" ng-model="formdata.clearHold"/>
                 [% l('Cancel this hold upon checkout?') %]</label>
index 2556078..598f9ff 100644 (file)
@@ -15,7 +15,7 @@
         </div>
         <div class="panel-body">
           <div>
-            <a href="/eg2/staff/circ/patron/bcsearch">
+            <a target="_self" href="./circ/patron/bcsearch">
               <img src="[% ctx.media_prefix %]/images/portal/forward.png" alt="" role="presentation"/>
               [% l('Check Out Items') %]
             </a>
@@ -27,7 +27,7 @@
             </a>
           </div>
           <div>
-            <a href="/eg2/staff/circ/patron/search">
+            <a target="_self" href="./circ/patron/search">
               <img src="[% ctx.media_prefix %]/images/portal/retreivepatron.png" alt="" role="presentation"/>
               [% l('Search For Patron By Name') %]
             </a>