]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/staff/circ/patron/index.tt2
5cb8a29e1ff06afc2b49575e76fd7d8118c8d1c1
[Evergreen.git] / Open-ILS / src / templates / staff / circ / patron / index.tt2
1 [%
2   WRAPPER "staff/base.tt2";
3   ctx.page_title = l("Patron"); 
4   ctx.page_app = "egPatronApp";
5   ctx.page_ctrl = "PatronCtrl";
6 %]
7
8 [% BLOCK APP_JS %]
9 <script src="[% ctx.media_prefix %]/js/ui/default/staff/services/grid.js"></script>
10 <script src="[% ctx.media_prefix %]/js/ui/default/staff/services/ui.js"></script>
11 <script src="[% ctx.media_prefix %]/js/ui/default/staff/services/user.js"></script>
12 <script src="[% ctx.media_prefix %]/js/ui/default/staff/services/eframe.js"></script>
13 <script src="[% ctx.media_prefix %]/js/ui/default/staff/services/date.js"></script>
14 <script src="[% ctx.media_prefix %]/js/ui/default/staff/services/user-bucket.js"></script>
15 <script src="[% ctx.media_prefix %]/js/ui/default/staff/circ/services/patrons.js"></script>
16 <script src="[% ctx.media_prefix %]/js/ui/default/staff/circ/services/billing.js"></script>
17 <script src="[% ctx.media_prefix %]/js/ui/default/staff/circ/services/circ.js"></script>
18 [% INCLUDE 'staff/circ/share/circ_strings.tt2' %]
19 <script src="[% ctx.media_prefix %]/js/ui/default/staff/circ/services/holds.js"></script>
20 [% INCLUDE 'staff/circ/share/hold_strings.tt2' %]
21 <script src="[% ctx.media_prefix %]/js/ui/default/staff/cat/services/record.js"></script>
22 <script src="[% ctx.media_prefix %]/js/ui/default/staff/services/patron_search.js"></script>
23 <script src="[% ctx.media_prefix %]/js/ui/default/staff/circ/patron/app.js"></script>
24 <script src="[% ctx.media_prefix %]/js/ui/default/staff/circ/patron/regctl.js"></script>
25
26 <!-- load the rest on demand? -->
27
28 <script src="[% ctx.media_prefix %]/js/ui/default/staff/circ/patron/checkout.js"></script>
29 <script src="[% ctx.media_prefix %]/js/ui/default/staff/circ/patron/items_out.js"></script>
30 <script src="[% ctx.media_prefix %]/js/ui/default/staff/circ/patron/holds.js"></script>
31 <script src="[% ctx.media_prefix %]/js/ui/default/staff/circ/patron/bills.js"></script>
32
33 <!-- TODO: APP_JS should really be called APP_ADDONS or some such.
34     It just means "load these things, too, and load them last" -->
35 <link rel="stylesheet" href="[% ctx.base_path %]/staff/css/circ.css" />
36
37 <script>
38 angular.module('egCoreMod').run(['egStrings', function(s) {
39   s.ANNOTATE_PAYMENT_MSG = "[% l('Please annotate this payment') %]";
40   s.CONFIRM_ADJUST_TO_ZERO = 
41     "[% |l('{{xactIds}}') -%]Are you sure you would like to adjust to zero the balance on bills [_1]?[% END %]";
42   s.CONFIRM_VOID_BILLINGS = 
43     "[% l('Are you sure you would like to void $[_1] for these line-item billings? [_2]','{{amount|number:2}}','{{billIds}}') %]";
44   s.CONFIRM_REFUND_PAYMENT = 
45     "[% |l('{{xactIds}}') -%]Are you sure you would like to refund excess payment on bills [_1]?  This action will simply put the amount in the Payment Pending column as a negative value.  You must still select Apply Payment!  Certain types of payments may not be refunded.  The refund may be applied to checked transactions that follow the refunded transaction.[% END %]";
46   s.EDIT_BILL_PAY_NOTE = "[% l('Enter new note for #[_1]:','{{ids}}') %]";
47   s.GROUP_ADD_USER = "[% l('Enter the patron barcode') %]";
48   s.RENEW_ITEMS = "[% l('Renew Items?') %]";
49   s.RENEW_ALL_ITEMS = "[% l('Renew All Items?') %]";
50   s.CHECK_IN_CONFIRM = "[% l('Check In Items?') %]";
51   s.REG_INVALID_FIELDS = 
52     "[% l('Please enter valid values for all required fields.') %]"
53   s.PAYMENT_WARN_AMOUNT = "[% l('Are you sure you want to apply a payment of $[_1]?', '{{payment_amount}}') %]";
54   s.PAYMENT_WARN_AMOUNT_TITLE = "[% l('Verify Payment Amount') %]";
55   s.PAYMENT_OVER_MAX = "[% l('Payments over $[_1] are denied by policy.', '{{max_amount}}') %]";
56   s.PATRON_NOTE_DELETE_CONFIRM_TITLE = "[% l('Delete Note?') %]";
57   s.PATRON_NOTE_DELETE_CONFIRM = "[% l('Delete the note titled \"[_1]\" created on [_2]?', '{{note_title}}', '{{create_date | date}}') %]";
58   s.PATRON_PURGE_CONFIRM_TITLE = "[% l('Completely Purge Patron Account?') %]";
59   s.PATRON_PURGE_CONFIRM = "[% l('Completely OBLITERATE this patron account, including bills, payments, bookbags, etc? This is IRREVERSIBLE.') %]";
60   s.PATRON_PURGE_LAST_CHANCE = "[% l('Last chance, are you sure you want to completely delete this account?') %]";
61   s.PATRON_PURGE_STAFF_PROMPT = "[% l('The account you are attempting to delete has STAFF_LOGIN privileges. Please enter the barcode for a destination account to receive miscellaneous staff artifacts (reports, etc.) from the account to be deleted.') %]";
62   s.PATRON_PURGE_STAFF_BAD_BARCODE = "[% l('Could not retrieve a destination account with the barcode provided. Aborting the purge...') %]";
63   s.PATRON_PURGE_OVERRIDE_PROMPT = "[% l('The account has open transactions (circulations and/or unpaid bills). Purge anyway?') %]";
64   s.PATRON_EDIT_COLLISION = "[% l('Patron record was modified by another user while you were editing it. Your changes were not saved; please reapply them.') %]";
65   s.OPT_IN_DIALOG_TITLE = "[% l('Verify Permission to Share Personal Information') %]";
66   s.OPT_IN_DIALOG = "[% l('Does patron [_1], [_2] from [_3] ([_4]) consent to having their personal information shared with your library?', '{{family_name}}', '{{first_given_name}}', '{{org_name}}', '{{org_shortname}}') %]";
67   s.BUCKET_ADD_SUCCESS = "[% l('Successfully added [_1] users to bucket [_2].', '{{count}}', '{{name}}') %]";
68   s.BUCKET_ADD_FAIL = "[% l('Failed to add [_1] users to bucket [_2].', '{{count}}', '{{name}}') %]";
69 }]);
70 </script>
71
72 <!-- add room for the fixed navigation elements -->
73 <style ng-if="is_patron_edit">
74   #top-content-container { padding-top: 120px; }
75 </style>
76 <style ng-if="!is_patron_edit">
77   #top-content-container { padding-top: 80px; }
78 </style>
79
80 [% END %]
81
82 <div class="row" id="patron-fixed-tabs">
83   <div class="col-md-3 patron-name-header">
84     <div ng-show="patron()">
85       <h4 title="{{patron().id()}}">
86         <div class="flex-row">
87           <div class="flex-cell"
88           ng-class="{'patron-summary-alert' : hasAlerts()}">
89             [% l('[_1], [_2] [_3]', 
90                 '{{patron().family_name()}}',
91                 '{{patron().first_given_name()}}',
92                 '{{patron().second_given_name()}}') %]
93           </div>
94
95           <p ng-show="patron().notes().length > 0"><a class='patron-summary-has-notes' href="./circ/patron/{{patron().id()}}/notes"><span class="label label-warning">Notes &nbsp;{{patron().notes().length}}</span></a></p>
96           <div ng-show="tab != 'search'">
97             <a href ng-click="toggle_expand_summary()"
98               title="[% l('Collapse Patron Summary Display') %]"
99               ng-hide="collapse_summary()">
100               <span class="glyphicon glyphicon-resize-small"></span>
101             </a>
102             <a href ng-click="toggle_expand_summary()"
103               title="[% l('Expand Patron Summary Display') %]"
104               ng-show="collapse_summary()">
105               <span class="glyphicon glyphicon-resize-full"></span>
106             </a>
107           </div>
108         </div>
109       </h4>
110     </div>
111   </div>
112
113   <div class="col-md-9">
114     <ul class="nav nav-pills nav-pills-like-tabs">
115       <li ng-class="{active : tab == 'checkout', disabled : !patron()}">
116         <a a-disabled="!patron()" href="./circ/patron/{{patron().id()}}/checkout">[% l('Check Out') %]</a>
117       </li>
118       <li ng-class="{active : tab == 'items_out', disabled : !patron()}">
119         <a a-disabled="!patron()" href="./circ/patron/{{patron().id()}}/items_out">
120           [% l('Items Out') %] 
121           <span ng-if="patron()"><!-- lack of space / newline below intentional -->
122           (<span ng-class="{'patron-summary-alert-small' : patron_stats().checkouts.overdue}">{{patron_stats().checkouts.total_out}}</span>)
123           </span>
124         </a>
125       </li>
126       <li ng-class="{active : tab == 'holds', disabled : !patron()}">
127         <a a-disabled="!patron()" href="./circ/patron/{{patron().id()}}/holds">
128           [% l('Holds') %]
129           <span ng-if="patron()">
130             (<span>{{patron_stats().holds.ready}} / {{patron_stats().holds.total}}</span>)
131           </span>
132         </a>
133       </li>
134       <li ng-class="{active : tab == 'bills', disabled : !patron()}">
135         <a a-disabled="!patron()" href="./circ/patron/{{patron().id()}}/bills">
136           [% l('Bills') %]
137           <span ng-if="patron()">
138             (<span ng-class="{'patron-summary-alert-small' : patron_stats().fines.balance_owed}">{{patron_stats().fines.balance_owed | currency}}</span>)
139           </span>
140         </a>
141       </li>
142       <li ng-class="{active : tab == 'messages', disabled : !patron()}">
143         <a a-disabled="!patron()" href="./circ/patron/{{patron().id()}}/messages">[% l('Messages') %]</a>
144       </li>
145       <li ng-class="{active : tab == 'edit', disabled : !patron()}">
146         <a href="./circ/patron/{{patron().id()}}/edit">[% l('Edit') %]</a>
147       </li>
148       <li uib-dropdown ng-class="{active : tab == 'other', disabled : !patron()}">
149         <a a-disabled="!patron()" href uib-dropdown-toggle>
150             [% l('Other') %]
151             <b class="caret"></b>
152         </a>
153         <ul uib-dropdown-menu>
154           <li>
155             <a href="./circ/patron/{{patron().id()}}/alerts">
156               [% l('Display Alert and Messages') %]
157             </a>
158           </li>
159           <li>
160             <a href="./circ/patron/{{patron().id()}}/notes">
161               [% l('Notes') %]
162             </a>
163           </li>
164           <li>
165             <a href="./circ/patron/{{patron().id()}}/triggered_events">
166               [% l('Triggered Events / Notifications') %]
167             </a>
168           </li>
169           <li>
170             <a href="./circ/patron/{{patron().id()}}/message_center">
171               [% l('Message Center') %]
172             </a>
173           </li>
174           <li>
175             <a href="./circ/patron/{{patron().id()}}/stat_cats">
176               [% l('Statistical Categories') %]
177             </a>
178           </li>
179           <li>
180             <a href="./circ/patron/{{patron().id()}}/surveys">
181               [% l('Surveys') %]
182             </a>
183           </li>
184           <li>
185             <a href="./circ/patron/{{patron().id()}}/group">
186               [% l('Group Member Details') %]
187             </a>
188           </li>
189           <li>
190             <a href="./circ/patron/{{patron().id()}}/edit_perms">
191               [% l('User Permission Editor') %]
192             </a>
193           </li>
194           <li>
195             <a href="./circ/patron/{{patron().id()}}/credentials">
196               [% l('Test Password') %]
197             </a>
198           </li>
199           <li>
200             <a href="./booking/legacy/booking/reservation?patron_barcode={{patron().card().barcode()}}" target="_top">
201               [% l('Booking: Create or Cancel Reservations') %]
202             </a>
203           </li>
204           <li>
205             <a href="./booking/legacy/booking/pickup?patron_barcode={{patron().card().barcode()}}" target="_top">
206               [% l('Booking: Pick Up Reservations') %]
207             </a>
208           </li>
209           <li>
210             <a href="./booking/legacy/booking/return?patron_barcode={{patron().card().barcode()}}" target="_top">
211               [% l('Booking: Return Reservations') %]
212             </a>
213           </li>
214           <li>
215             <a href ng-click="purge_account()" a-disabled="patron().super_user() == 't' || patron().id() == auth_user_id">
216               [% l('Completely Purge Account') %]
217             </a>
218           </li>
219        </ul>
220       </li>
221       <li ng-class="{active : tab == 'search'}" class="pull-right">
222         <a href="./circ/patron/search">[% l('Patron Search') %]</a>
223       </li>
224     </ul>
225     <div class="flex-row patron-reg-actions-bar" ng-if="is_patron_edit()">
226       [% INCLUDE 'staff/circ/patron/reg_actions.tt2' %]
227     </div>
228
229   </div><!-- col -->
230 </div><!-- row -->
231
232 <div class="row">
233   <div class="col-md-3" ng-hide="collapse_summary()">
234     [% INCLUDE 'staff/circ/patron/t_summary.tt2' %]
235   </div>
236   <div ng-class="{'col-md-12' : collapse_summary(),'col-md-9' : !collapse_summary()}">
237     <div class="tab-content">
238       <div class="tab-pane active">
239         <div ng-view></div>
240       </div>
241     </div>
242   </div><!-- col -->
243 </div><!-- row -->
244
245 [% END %]