]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/web/templates/default/opac/myopac/main.tt2
a99cc2d1cbe8ab6ecac073db1811435a8f9f135a
[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/myopac/main_base.tt2";
4     myopac_page = "main";
5     myopac_main_page = "main";
6 %]
7
8     [% IF ctx.fines.circulation.size > 0 %]
9     <div id='myopac_circ_trans_div'>
10         <table width='100%' class='data_grid'>
11             <thead>
12                 <tr>
13                     <td colspan='10' style='padding: 6px'>
14                         <strong>[% l("Fines") %]</strong>
15                     </td>
16                 </tr>
17                 <tr>
18                     <td>[% l("Title") %]</td>
19                     <td>[% l("Author") %]</td>
20                     <td>[% l("Checkout Date") %]</td>
21                     <td>[% l("Due Date") %]</td>
22                     <td>[% l("Date Returned") %]</td>
23                     <td>[% l("Balance Owed") %]</td>
24                     <!-- TODO: hidden until pay-fines is implemented
25                     <td nowrap="nowrap" style="white-space:nowrap;">
26                         <input id="pay_fines_box1" checked="checked"
27                             type="checkbox" title="[% l('Click to (un)select all fines') %]" />
28                         <label for="pay_fines_box1">[% l('Pay Fines') %]</label>
29                     </td>
30                     -->
31                 </tr>
32             </thead>
33             <tbody id='myopac_circ_trans_tbody'>
34                 [% FOR f IN ctx.fines.circulation;
35                     attrs = {marc_xml => f.marc_xml};
36                     IF f.marc_xml;
37                         PROCESS get_marc_attrs args=attrs;
38                     ELSIF f.xact.reservation;
39                         attrs.title = f.xact.reservation.target_resource_type.name;
40                     END %]
41                 <tr id='myopac_circ_trans_row'>
42                     <td>
43                         <a href="[% ctx.opac_root %]/record/[% f.xact.circulation.target_copy.call_number.record.id %]">[% attrs.title %]</a>
44                     </td>
45                     <td>
46                         <a href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
47                     </td>
48                     <td name='myopac_circ_trans_start'>
49                         [% ts = f.xact.circulation.xact_start || f.xact.reservation.start_time || 0;
50                         IF ts;
51                             date.format(ctx.parse_datetime(ts), DATE_FORMAT);
52                         END %]
53                     </td>
54                     <td name='myopac_circ_trans_due'>
55                         [% ts = f.xact.circulation.due_date || f.xact.reservation.end_time || 0;
56                         IF ts;
57                             date.format(ctx.parse_datetime(ts), DATE_FORMAT);
58                         END %]
59                     </td>
60                     <td name='myopac_circ_trans_finished'>
61                         [%  ts = f.xact.circulation.checkin_time || f.xact.reservation.return_time || 0;
62                             IF ts;
63                                 date.format(ctx.parse_datetime(ts), DATE_FORMAT);
64                             ELSE %]
65                             <!-- XXX TODO fines aren't really accruing
66                                 if circ has hit maxfines. more clarity
67                                 here? -->
68                             <span class="red">[% l('(fines accruing)') %]</span>
69                         [%  END %]
70                     </td>
71                     <td>
72                         <strong class="red">
73                             [% money(f.xact.balance_owed) %]
74                         </strong>
75                     </td>
76                     <!-- TODO: hidden until pay-fines is implemented
77                     <td>
78                         <input type="checkbox" name="selector" title="[% l('Pay this fine') %]" />
79                     </td>
80                     -->
81                 </tr>
82                 [% END %]
83             </tbody>
84         </table>
85     </div>
86     [% END %]
87
88     [% IF ctx.fines.grocery.size > 0 %]
89     <!-- Table for all non-circulation transactions -->
90     <div id='myopac_trans_div'>
91         <br/>
92         <hr class='opac-auto-013'  color="#dcdbdb" />
93         <br/>
94         <table width='100%' class='data_grid data_grid_center'
95             id='myopac_trans_table'>
96             <thead>
97                 <tr>
98                     <td colspan='8' style='padding: 6px'>
99                         <b>[% l("Other Fees") %]</b>
100                     </td>
101                 </tr>
102                 <tr>
103                     <td width='16%'>[% l("Transaction Start Time") %]</td>
104                     <td width='16%'>[% l("Last Payment Time") %]</td>
105                     <td width='16%'>[% l("Initial Amount Owed") %]</td>
106                     <td width='16%'>[% l("Total Amount Paid") %]</td>
107                     <td width='16%'>[% l("Balance Owed") %]</td>
108                     <td width='16%'>[% l("Billing Type") %]</td>
109                     <!-- TODO: hidden until pay-fines is implemented
110                     <td width='4%' align="center" nowrap="nowrap"
111                         style="white-space:nowrap;">
112                         <input id="pay_fines_box2" checked="checked"
113                             type="checkbox"
114                             title="[% l('Click to (un)select all fines') %]" />
115                         <label for="pay_fines_box2">[% l("Pay Fines") %]</label>
116                     </td>
117                     -->
118                 </tr>
119             </thead>
120             <tbody id='myopac_trans_tbody'>
121                 [% FOR f IN ctx.fines.grocery %]
122                 <tr id='myopac_trans_row'>
123                     <td>[% date.format(
124                             ctx.parse_datetime(f.xact.xact_start),
125                             DATE_FORMAT
126                     ) %]</td>
127                     <td>
128                         [%  IF f.xact.last_payment_ts;
129                                 date.format(
130                                     ctx.parse_datetime(
131                                         f.xact.last_payment_ts
132                                     ), DATE_FORMAT
133                                 );
134                             END %]
135                     </td>
136                     <td>[% money(f.xact.total_owed) %]</td>
137                     <td>[% money(f.xact.total_paid) %]</td>
138                     <td class="red">
139                         <strong>
140                             [% money(f.xact.balance_owed) %]
141                         </strong>
142                     </td>
143                     <td>[% f.xact.last_billing_type %]</td>
144                     <!-- TODO: hidden until pay-fines is implemented
145                     <td>
146                         <input type="checkbox" name='selector' title='[% l("Pay this fine") %]'/>
147                     </td>
148                     -->
149                 </tr>
150                 [% END %]
151             </tbody>
152         </table>
153     </div>
154     [% END %]
155
156 <!-- TODO: move payment form to its own page -->
157
158 <div id="pay_fines_now" class="hide_me">
159     <table id='oils-selfck-cc-payment-table'>
160         <tbody>
161             <tr>
162                 <td><div style="width:129px;"></div></td>
163                 <td><div style="width:195px;"></div></td>
164                 <td><div style="width:324px;"></div></td>
165             </tr>
166             <tr>
167                 <td colspan='2'><strong>Billing Information</strong></td>
168                 <td rowspan='13' valign='top'>
169                     Selected fines you are paying for:
170                     <table cellpadding="0" cellspacing="5" border="0">
171                         <thead>
172                             <tr>
173                                 <td>
174                                     <strong>Name</strong>
175                                 </td>
176                                 <td>
177                                     <strong>Amount</strong>
178                                 </td>
179                             </tr>
180                         </thead>
181                         <tbody id="selectedFines">
182                         </tbody>
183                     </table>
184                     <br />
185                     <div id='oils-selfck-cc-payment-summary'>
186                         Total amount to pay:
187                         <strong>$<span></span></strong>
188                     </div>
189                     <br />
190                     Click <strong>Cancel</strong> to go back and (un)select
191                     other fines.
192                 </td>
193             </tr>
194             <tr>
195                 <td>First Name</td>
196                 <td><input jsId='oilsSelfckCCFName' /></td>
197             </tr>
198             <tr>
199                 <td>Last Name</td>
200                 <td><input jsId='oilsSelfckCCLName' /></td>
201             </tr>
202             <tr>
203                 <td>Street Address</td>
204                 <td><input jsId='oilsSelfckCCStreet' /></td>
205             </tr>
206             <tr>
207                 <td>City</td>
208                 <td><input jsId='oilsSelfckCCCity' /></td>
209             </tr>
210             <tr>
211                 <td>State or Province</td>
212                 <td><input jsId='oilsSelfckCCState' /></td>
213             </tr>
214             <tr>
215                 <td>ZIP or Postal Code</td>
216                 <td><input jsId='oilsSelfckCCZip' /></td>
217             </tr>
218             <tr>
219               <td colspan='2'><strong>Credit Card Information</strong></td>
220             </tr>
221             <!-- Technically not needed since card type is derived from the CC number
222             <tr>
223                 <td>Type of Card</td>
224                 <td>
225                     <select jsId='oilsSelfckCCType' required='true'>
226                         <option value='VISA'>VISA</option>
227                         <option value='MasterCard'>MasterCard</option>
228                         <option value='American Express'>American Express</option>
229                     </select>
230                 </td>
231             </tr>
232             -->
233             <tr>
234                 <td>Credit Card #</td>
235                 <td><input jsId='oilsSelfckCCNumber' /></td>
236             </tr>
237             <tr>
238                 <td>
239                     <div style="position:absolute;">
240                         <div style="position:relative;left:80px;">
241                             <a href="#"><img
242                                 src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
243                         </div>
244                     </div>
245                     Security Code
246                 </td>
247                 <td>
248                     <input jsId='oilsSelfckCCCVV' />
249                 </td>
250             </tr>
251             <tr>
252                 <td>Exipration Month</td>
253                 <td>
254                     <select jsId='oilsSelfckCCMonth'>
255                         <option value='01' selected='selected'>January</option>
256                         <option value='02'>February</option>
257                         <option value='03'>March</option>
258                         <option value='04'>April</option>
259                         <option value='05'>May</option>
260                         <option value='06'>June</option>
261                         <option value='07'>July</option>
262                         <option value='08'>August</option>
263                         <option value='09'>September</option>
264                         <option value='10'>October</option>
265                         <option value='11'>November</option>
266                         <option value='12'>December</option>
267                     </select>
268                 </td>
269             </tr>
270             <tr>
271                 <td>Expiration Year</td>
272                 <td>
273                   <select jsId='oilsSelfckCCYear'>
274                     <option value='2011'>2011</option>
275                     <option value='2012'>2012</option>
276                     <option value='2013'>2013</option>
277                     <option value='2014'>2014</option>
278                     <option value='2015'>2015</option>
279                     <option value='2016'>2016</option>
280                     <option value='2017'>2017</option>
281                     <option value='2018'>2018</option>
282                     <option value='2019'>2019</option>
283                   </select>
284                 </td>
285             </tr>
286             <tr class="hide_me">
287                 <td>Edit Billing Address</td>
288                 <td>
289                     <input jsId='oilsSelfckEditDetails'/>
290                 </td>
291             </tr>
292             <tr>
293                 <td colspan='2' align="center">
294                     <button jsId='oilsSelfckCCSubmit'>
295                         Submit Payment
296                     </button>
297                     <button>
298                         Cancel
299                     </button>
300                 </td>
301             </tr>
302             <tr>
303                 <td colspan="3">
304                     <br />
305                     Important! You must have a printed receipt to be
306                     eligible for a refund on lost items (regulations allow
307                     for no exceptions).
308                     <br />
309                     <strong>
310                         To ensure your necessary receipt information is
311                         not lost, enter your email address above and a
312                         receipt will be emailed to you. Otherwise, make
313                         certain you have a printed receipt in hand before
314                         closing the payment receipt screen.
315                     </strong>
316                     <br />
317                     Refunds are not available for parts and pieces, overdue
318                     fines, or items that do not display a specific title in
319                     My Account. For a full list of refundable and
320                     non-refundable items, visit
321                     <a href="http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm">http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm</a><br /><br />
322                     This site uses VeriSign SSL encryption to ensure your
323                     privacy.
324                 </td>
325             </tr>
326         </tbody>
327     </table>
328 </div>
329 [% END %]