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