]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/web/templates/default/opac/myopac/main.tt2
Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen...
[working/Evergreen.git] / Open-ILS / web / templates / default / opac / myopac / main.tt2
1 [%  PROCESS "default/opac/parts/header.tt2";
2     PROCESS "default/opac/parts/misc_util.tt2";
3     WRAPPER "default/opac/parts/base.tt2" +
4         "default/opac/parts/myopac/base.tt2";
5     myopac_page = "main";
6     show_payments = (CGI.param('expand') == 'payments');
7 %]
8
9 <div id='myopac_summary_div' style="padding:0px;">
10
11     <div style="width:742px;float:left;">
12         <div class="header_middle">[% l('Account Summary') %]</div>
13     </div>
14
15     <!-- fines summary along the right of the page -->
16     <div id="myopac_sum_fines">
17         <div style="position:absolute;">
18             <div style="position:relative;top:-15px;left:-23px;">
19                 <img src="[% ctx.media_prefix %]/images/acct_sum_fines_tl.png" />
20             </div>
21         </div>
22         <div style="position:absolute;">
23             <div style="position:relative;top:-15px;left:172px;">
24                 <img src="[% ctx.media_prefix %]/images/acct_sum_fines_tr.png" />
25             </div>
26         </div>
27         <div style="position:absolute;">
28             <div style="position:relative;top:161px;left:-23px;">
29                 <img src="[% ctx.media_prefix %]/images/acct_sum_fines_bl.png" />
30             </div>
31         </div>
32         <div style="position:absolute;">
33             <div style="position:relative;top:161px;left:172px;">
34                 <img src="[% ctx.media_prefix %]/images/acct_sum_fines_br.png" />
35             </div>
36         </div>
37         [% l('Fines:') %]
38         <span id="myopac_sum_fines_bal" class='[% ctx.user_stats.fines.balance_owed ? "red" : ""%]'>
39             [% money(ctx.user_stats.fines.balance_owed) %]
40         </span><br />
41         <a class="hide_me" href="#" id="pay_fines_btn1"><img
42             alt="[% l('Pay Fines') %]"
43             onmouseover="this.src='[% ctx.media_prefix %]/images/pay-fines-btn-hover.png';"
44             onmouseout="this.src='[% ctx.media_prefix %]/images/pay-fines-btn.png';"
45             src="[% ctx.media_prefix %]/images/pay-fines-btn.png"
46             style="position:relative;top:5px;" /></a>
47     </div>
48
49
50     <div style="width:662px;">
51         <div style="float:left;">
52             <div style="padding:10px 0px;" id="myopac_sum_name"></div>
53             <div class="acct_sum_row">
54                 <table width="100%" cellspacing="0" cellpadding="0">
55                     <tr>
56                         <td>[% l("Items Currently Checked out ([_1])", ctx.user_stats.checkouts.total_out) %]</td>
57                         <td align="right">
58                             <a href="[% ctx.opac_root %]/myopac/circs">[% l("View All") %]</a>
59                         </td>
60                     </tr>
61                 </table>
62             </div>
63             <div class="acct_sum_row">
64                 <table width="100%" cellspacing="0" cellpadding="0">
65                     <tr>
66                         <td>[% l('Items Currently on Hold ([_1])', ctx.user_stats.holds.total) %]</td>
67                         <td align="right">
68                             <a href="[% ctx.opac_root %]/myopac/holds">[% l('View All') %]</a>
69                         </td>
70                     </tr>
71                 </table>
72             </div>
73             <div class="acct_sum_row">
74                 <table width="100%" cellspacing="0" cellpadding="0">
75                     <tr>
76                         <td>[% l('Items ready for pickup ([_1])', ctx.user_stats.holds.ready) %]</td>
77                         <td align="right">
78                             <a href="[% ctx.opac_root %]/myopac/holds?available=1">[% l('View All') %]</a>
79                         </td>
80                     </tr>
81                 </table>
82             </div>
83
84             <!-- this is here to allow for hiding open transactions, but that 
85             also hides payments history, which we don't want.  perhaps this 
86             can be left out entirely
87             <div class="acct_sum_row" id="myopac_sum_fines_slim">
88                 <table width="100%" cellspacing="0" cellpadding="0">
89                     <tr>
90                         <td>[% l('Fees &amp; Fines') %]</td>
91                         <td align="right">
92                             <a href="#">Show Overdue Materials</a>
93                         </td>
94                     </tr>
95                 </table>
96             </div>
97             -->
98             
99         </div>
100     </div>
101     <div class="clear-both"></div>
102
103     <div id='fines_payments_wrapper'>
104         <div id='acct_fines_tabs'>
105             [% IF show_payments %]
106             <a href='main'><img src='[% ctx.media_prefix %]/images/acct_fines_off.jpg'/></a>
107             <a href=''><img src='[% ctx.media_prefix %]/images/acct_payments_on.jpg'/></a>
108             [% ELSE %]
109             <a href=''><img src='[% ctx.media_prefix %]/images/acct_fines_on.jpg'/></a>
110             <a href='?expand=payments'><img src='[% ctx.media_prefix %]/images/acct_payments_off.jpg'/></a>
111             [% END %]
112         </div>
113     </div>
114
115 [% IF !show_payments %]
116     [% IF ctx.fines.circulation.size > 0 %]
117     <div id='myopac_circ_trans_div'>
118         <table width='100%' class='data_grid'>
119             <thead>
120                 <tr>
121                     <td colspan='10' style='padding: 6px'>
122                         <strong>[% l("Fines") %]</strong>
123                     </td>
124                 </tr>
125                 <tr>
126                     <td>[% l("Title") %]</td>
127                     <td>[% l("Author") %]</td>
128                     <td>[% l("Checkout Date") %]</td>
129                     <td>[% l("Due Date") %]</td>
130                     <td>[% l("Date Returned") %]</td>
131                     <td>[% l("Balance Owed") %]</td>
132                     <!-- TODO: hidden until pay-fines is implemented
133                     <td nowrap="nowrap" style="white-space:nowrap;">
134                         <input id="pay_fines_box1" checked="checked"
135                             type="checkbox" title="[% l('Click to (un)select all fines') %]" />
136                         <label for="pay_fines_box1">[% l('Pay Fines') %]</label>
137                     </td>
138                     -->
139                 </tr>
140             </thead>
141             <tbody id='myopac_circ_trans_tbody'>
142                 [% FOR f IN ctx.fines.circulation;
143                     attrs = {marc_xml => f.marc_xml};
144                     PROCESS get_marc_attrs args=attrs %]
145                 <tr id='myopac_circ_trans_row'>
146                     <td>
147                         <a href="[% ctx.opac_root %]/record/[% f.xact.circulation.target_copy.call_number.record.id %]">[% attrs.title %]</a>
148                     </td>
149                     <td>
150                         <a href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
151                     </td>
152                     <td name='myopac_circ_trans_start'>
153                         [% date.format(
154                             ctx.parse_datetime(
155                                 f.xact.circulation.xact_start
156                             ), DATE_FORMAT
157                         ) %]
158                     </td>
159                     <td name='myopac_circ_trans_due'>
160                         [% date.format(
161                             ctx.parse_datetime(
162                                 f.xact.circulation.due_date
163                             ), DATE_FORMAT
164                         ) %]
165                     </td>
166                     <td name='myopac_circ_trans_finished'>
167                         [%  IF f.xact.circulation.checkin_time;
168                                 date.format(
169                                     ctx.parse_datetime(
170                                         f.xact.circulation.checkin_time
171                                     ), DATE_FORMAT
172                                 );
173                             ELSE %]
174                             <!-- XXX TODO fines aren't really accruing
175                                 if circ has hit maxfines. more clarity
176                                 here? -->
177                             <span class="red">[% l('(fines accruing)') %]</span>
178                         [%  END %]
179                     </td>
180                     <td>
181                         <strong class="red">
182                             [% money(f.xact.balance_owed) %]
183                         </strong>
184                     </td>
185                     <!-- TODO: hidden until pay-fines is implemented
186                     <td>
187                         <input type="checkbox" name="selector" title="[% l('Pay this fine') %]" />
188                     </td>
189                     -->
190                 </tr>
191                 [% END %]
192             </tbody>
193         </table>
194     </div>
195     [% END %]
196
197     [% IF ctx.fines.grocery.size > 0 %]
198     <!-- Table for all non-circulation transactions -->
199     <div id='myopac_trans_div'>
200         <br/>
201         <hr class='opac-auto-013'  color="#dcdbdb" />
202         <br/>
203         <table width='100%' class='data_grid data_grid_center'
204             id='myopac_trans_table'>
205             <thead>
206                 <tr>
207                     <td colspan='8' style='padding: 6px'>
208                         <b>[% l("Other Fees") %]</b>
209                     </td>
210                 </tr>
211                 <tr>
212                     <td width='16%'>[% l("Transaction Start Time") %]</td>
213                     <td width='16%'>[% l("Last Payment Time") %]</td>
214                     <td width='16%'>[% l("Initial Amount Owed") %]</td>
215                     <td width='16%'>[% l("Total Amount Paid") %]</td>
216                     <td width='16%'>[% l("Balance Owed") %]</td>
217                     <td width='16%'>[% l("Billing Type") %]</td>
218                     <!-- TODO: hidden until pay-fines is implemented
219                     <td width='4%' align="center" nowrap="nowrap"
220                         style="white-space:nowrap;">
221                         <input id="pay_fines_box2" checked="checked"
222                             type="checkbox"
223                             title="[% l('Click to (un)select all fines') %]" />
224                         <label for="pay_fines_box2">[% l("Pay Fines") %]</label>
225                     </td>
226                     -->
227                 </tr>
228             </thead>
229             <tbody id='myopac_trans_tbody'>
230                 [% FOR f IN ctx.fines.grocery %]
231                 <tr id='myopac_trans_row'>
232                     <td>[% date.format(
233                             ctx.parse_datetime(f.xact.xact_start),
234                             DATE_FORMAT
235                     ) %]</td>
236                     <td>
237                         [%  IF f.xact.last_payment_ts;
238                                 date.format(
239                                     ctx.parse_datetime(
240                                         f.xact.last_payment_ts
241                                     ), DATE_FORMAT
242                                 );
243                             END %]
244                     </td>
245                     <td>[% money(f.xact.total_owed) %]</td>
246                     <td>[% money(f.xact.total_paid) %]</td>
247                     <td class="red">
248                         <strong>
249                             [% money(f.xact.balance_owed) %]
250                         </strong>
251                     </td>
252                     <td>[% f.xact.last_billing_type %]</td>
253                     <!-- TODO: hidden until pay-fines is implemented
254                     <td>
255                         <input type="checkbox" name='selector' title='[% l("Pay this fine") %]'/>
256                     </td>
257                     -->
258                 </tr>
259                 [% END %]
260             </tbody>
261         </table>
262     </div>
263     [% END %]
264
265     <!-- TODO: hidden until pay-fines is implemented
266     <a href="#"><img alt="[% l('Pay Fines') %]"
267         onmouseover="this.src='[% ctx.media_prefix %]/images/pay-fines-btn-hover.png';"
268         src="[% ctx.media_prefix %]/images/pay-fines-btn.png"
269         style="position:relative;top:5px;" /></a>
270     <br/>
271     -->
272
273 [% ELSE %] <!-- show payments -->
274     <div>
275         <table id='myopac_payments_table' width='100%' class='data_grid'>
276             <thead><tr>
277                 <th>[% l('Payment Date') %]</th>
278                 <th>[% l('Payment For') %]</th>
279                 <th>[% l('Amount') %]</th>
280                 <th>[% l('Receipt') %]</th> 
281             </tr></thead>
282             <tbody>
283                 [% FOR payment IN ctx.payments %]
284                 <tr>
285                     <td>[% date.format(ctx.parse_datetime(payment.mp.payment_ts), DATE_FORMAT) %]</td>
286                     <td>[% (payment.xact_type == 'grocery') ? payment.last_billing_type : payment.title %]</td>
287                     <td>[% money(payment.mp.amount) %]</td>
288                     <td>
289                         [%# post to print/email form... %]
290                         <a href=''>[% l('Print') %]</a> / <a href=''>[% l('Email') %]</a>
291                     </td>
292                 </tr>
293                 [% END %]
294             </tbody>
295         </table>
296     </div>
297 [% END %] 
298
299
300     <!-- TODO: move payment form to its own page -->
301
302     <div id="pay_fines_now" class="hide_me">
303         <table id='oils-selfck-cc-payment-table'>
304             <tbody>
305                 <tr>
306                     <td><div style="width:129px;"></div></td>
307                     <td><div style="width:195px;"></div></td>
308                     <td><div style="width:324px;"></div></td>
309                 </tr>
310                 <tr>
311                     <td colspan='2'><strong>Billing Information</strong></td>
312                     <td rowspan='13' valign='top'>
313                         Selected fines you are paying for:
314                         <table cellpadding="0" cellspacing="5" border="0">
315                             <thead>
316                                 <tr>
317                                     <td>
318                                         <strong>Name</strong>
319                                     </td>
320                                     <td>
321                                         <strong>Amount</strong>
322                                     </td>
323                                 </tr>
324                             </thead>
325                             <tbody id="selectedFines">
326                             </tbody>
327                         </table>
328                         <br />
329                         <div id='oils-selfck-cc-payment-summary'>
330                             Total amount to pay:
331                             <strong>$<span></span></strong>
332                         </div>
333                         <br />
334                         Click <strong>Cancel</strong> to go back and (un)select
335                         other fines.
336                     </td>
337                 </tr>
338                 <tr>
339                     <td>First Name</td>
340                     <td><input jsId='oilsSelfckCCFName' /></td>
341                 </tr>
342                 <tr>
343                     <td>Last Name</td>
344                     <td><input jsId='oilsSelfckCCLName' /></td>
345                 </tr>
346                 <tr>
347                     <td>Street Address</td>
348                     <td><input jsId='oilsSelfckCCStreet' /></td>
349                 </tr>
350                 <tr>
351                     <td>City</td>
352                     <td><input jsId='oilsSelfckCCCity' /></td>
353                 </tr>
354                 <tr>
355                     <td>State or Province</td>
356                     <td><input jsId='oilsSelfckCCState' /></td>
357                 </tr>
358                 <tr>
359                     <td>ZIP or Postal Code</td>
360                     <td><input jsId='oilsSelfckCCZip' /></td>
361                 </tr>
362                 <tr>
363                   <td colspan='2'><strong>Credit Card Information</strong></td>
364                 </tr>
365                 <!-- Technically not needed since card type is derived from the CC number
366                 <tr>
367                     <td>Type of Card</td>
368                     <td>
369                         <select jsId='oilsSelfckCCType' required='true'>
370                             <option value='VISA'>VISA</option>
371                             <option value='MasterCard'>MasterCard</option>
372                             <option value='American Express'>American Express</option>
373                         </select>
374                     </td>
375                 </tr>
376                 -->
377                 <tr>
378                     <td>Credit Card #</td>
379                     <td><input jsId='oilsSelfckCCNumber' /></td>
380                 </tr>
381                 <tr>
382                     <td>
383                         <div style="position:absolute;">
384                             <div style="position:relative;left:80px;">
385                                 <a href="#"><img
386                                     src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
387                             </div>
388                         </div>
389                         Security Code
390                     </td>
391                     <td>
392                         <input jsId='oilsSelfckCCCVV' />
393                     </td>
394                 </tr>
395                 <tr>
396                     <td>Exipration Month</td>
397                     <td>
398                         <select jsId='oilsSelfckCCMonth'>
399                             <option value='01' selected='selected'>January</option>
400                             <option value='02'>February</option>
401                             <option value='03'>March</option>
402                             <option value='04'>April</option>
403                             <option value='05'>May</option>
404                             <option value='06'>June</option>
405                             <option value='07'>July</option>
406                             <option value='08'>August</option>
407                             <option value='09'>September</option>
408                             <option value='10'>October</option>
409                             <option value='11'>November</option>
410                             <option value='12'>December</option>
411                         </select>
412                     </td>
413                 </tr>
414                 <tr>
415                     <td>Expiration Year</td>
416                     <td>
417                       <select jsId='oilsSelfckCCYear'>
418                         <option value='2011'>2011</option>
419                         <option value='2012'>2012</option>
420                         <option value='2013'>2013</option>
421                         <option value='2014'>2014</option>
422                         <option value='2015'>2015</option>
423                         <option value='2016'>2016</option>
424                         <option value='2017'>2017</option>
425                         <option value='2018'>2018</option>
426                         <option value='2019'>2019</option>
427                       </select>
428                     </td>
429                 </tr>
430                 <tr class="hide_me">
431                     <td>Edit Billing Address</td>
432                     <td>
433                         <input jsId='oilsSelfckEditDetails'/>
434                     </td>
435                 </tr>
436                 <tr>
437                     <td colspan='2' align="center">
438                         <button jsId='oilsSelfckCCSubmit'>
439                             Submit Payment
440                         </button>
441                         <button>
442                             Cancel
443                         </button>
444                     </td>
445                 </tr>
446                 <tr>
447                     <td colspan="3">
448                         <br />
449                         Important! You must have a printed receipt to be
450                         eligible for a refund on lost items (regulations allow
451                         for no exceptions).
452                         <br />
453                         <strong>
454                             To ensure your necessary receipt information is
455                             not lost, enter your email address above and a
456                             receipt will be emailed to you. Otherwise, make
457                             certain you have a printed receipt in hand before
458                             closing the payment receipt screen.
459                         </strong>
460                         <br />
461                         Refunds are not available for parts and pieces, overdue
462                         fines, or items that do not display a specific title in
463                         My Account. For a full list of refundable and
464                         non-refundable items, visit
465                         <a href="http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm">http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm</a><br /><br />
466                         This site uses VeriSign SSL encryption to ensure your
467                         privacy.
468                     </td>
469                 </tr>
470             </tbody>
471         </table>
472     </div>
473 </div>
474 [% END %]