]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/kpac/getit.tt2
LP2061136 - Stamping 1405 DB upgrade script
[Evergreen.git] / Open-ILS / src / templates / kpac / getit.tt2
1 [%  
2     PROCESS "opac/parts/header.tt2";
3     PROCESS "opac/parts/misc_util.tt2"; # MARC 
4     WRAPPER "kpac/parts/subpage.tt2";
5     attrs = {marc_xml => ctx.marc_xml};
6     INCLUDE get_marc_attrs args=attrs;
7     ctx.page_title = attrs.title | html 
8 %]
9
10 <div id="search_results_parent">
11     [% INCLUDE 'kpac/parts/record_row.tt2' rec_id=ctx.bre_id %]
12 </div>
13           
14 <div class="checkout_options">
15     <table cellpadding="0" cellspacing="0" border="0">
16         <tr>
17             <td valign="top" class="left_brain_cell">
18                 <div class="left_brain">
19
20                     [% WRAPPER 'kpac/parts/help_popups.tt2' popup_id='card_help' %]
21                         <img src="[% ctx.media_prefix %]/images/kpac/library_card.png[% ctx.cache_key %]" alt="[% l('library card') %]" /></div></td>
22                     [% END %]
23                     [% WRAPPER 'kpac/parts/help_popups.tt2' popup_id='password_help' %]
24                         <p>[% l('Enter your password') %]</p>
25                     [% END %]
26
27                     <div class="top_side">
28                         <h2>[% l('get it!') %]</h2>
29                         <p>[% l('If you would like to place a hold on this item, please enter the ' _
30                             'following information and click Submit below:') %]</p>
31                     </div>
32
33                     <form method='POST'><!-- login + place hold form -->
34
35                         <div class="checkout_box">
36                             <div class="box1_top">&nbsp;</div>
37                             <div class="box_inside">
38
39                                 [% IF !ctx.user %]
40                                     [% seed = l(' Enter Numbers... ') %]
41                                     <p>[% l('Library Card Number without spaces:') %]</p>
42                                     <div class="input_box">
43                                         <input name="username" type="text" class="text_box" style="color:#aaa;" placeholder="[% seed %]" />
44                                     </div>
45                                     <a class="help_btn" href="javascript:;" 
46                                         onclick="helpPopup('card_help', this, event);"><img 
47                                         src="[% ctx.media_prefix %]/images/kpac/question_mark.png[% ctx.cache_key %]" alt="[% l('pin number help') %]" /></a>
48
49                                     <div class="clear">&nbsp;</div>
50                                     <div class="hr">&nbsp;</div>
51
52                                     <p>[% l('Password') %]</p>
53                                     <div class="input_box">
54                                         <input name="password" type="password" class="text_box" style="color:#aaa;" value="[% seed %]" 
55                                             onfocus="if(this.value=='[% seed %]'){this.value='';this.style.color='#424242';}" 
56                                             onblur="if(this.value==''){this.value='[% seed %]'; this.style.color='#aaa';}" />
57                                     </div>
58
59                                     <a class="help_btn" href="javascript:;" 
60                                         onclick="helpPopup('password_help', this, event);"><img 
61                                         src="[% ctx.media_prefix %]/images/kpac/question_mark.png[% ctx.cache_key %]" alt="[% l('password help') %]" /></a>
62
63                                     <input type="hidden" name='pickup_lib' value='0' id='pickup_lib'>
64                                     
65                                     <div class="clear">&nbsp;</div>
66                                     <div class="hr">&nbsp;</div>
67
68                                 [% ELSE %]
69
70                                 <p>[% l('Choose a Pickup Library:') %]</p>
71                                 <div class="pickup_lib">
72                                     [%  def_lib = ctx.default_pickup_lib || ctx.physical_loc;
73                                         PROCESS "opac/parts/org_selector.tt2";
74                                         INCLUDE build_org_selector name='pickup_lib' 
75                                         value=def_lib id='pickup_lib' can_have_vols_only=1 hold_pickup_lib=1 %]
76
77                                  <!-- HIDDEN FIELDS FOR DEFAULT NOTIFICATION PREFERENCES -->
78                                  [%- IF ctx.notify_method -%]
79                                      [%- IF ctx.notify_method == '' OR ctx.notify_method == 'phone:email' -%]
80                                          [%- SET ctx.notify_method = 'email|phone' -%]
81                                      [%- END -%]
82                                  [%- ELSE -%]
83                                      [%- SET ctx.notify_method = 'email|phone' -%]
84                                  [%- END -%]
85                                  
86                                  [%- IF ctx.user.email -%]
87                                       [% ctx.notify_method.search('email') ? 
88                                      '<input type="hidden" id="email_notify" name="email_notify" value="t"/>' : '' %]
89                                  [%- END -%]
90
91                                  [%- IF allow_phone_notifications == 'true' -%]
92                                      [% IF ctx.default_phone %]
93                                             [% phone_value = ctx.default_phone %]
94                                      [% ELSE %]
95                                             [% phone_value= ctx.user.day_phone %]
96                                      [% END %]
97                                      
98                                      [% ctx.notify_method.search('phone') ? 
99                                          '<input type="hidden" id="phone_notify_checkbox" name="phone_notify_checkbox" value="t"/>
100                                          <input type="hidden" name="phone_notify" value="' _ phone_value _ '"/>' : '' %]
101                                  [%- END -%]
102
103                                 [% IF ctx.get_org_setting(ctx.search_ou, 'sms.enable') == 1 %]
104                                        [% setting_notify = 'opac.default_sms_notify';
105                                           setting_carrier = 'opac.default_sms_carrier'; %]
106                                        [% ctx.notify_method.search('sms') ?
107                                             '<input type="hidden" id="sms_notify_checkbox" name="sms_notify_checkbox" value="t" />
108                                              <input type="hidden" id="sms_carrier" name="sms_carrier" value="' _ ctx.user_setting_map.$setting_carrier _ '" />
109                                              <input type="hidden" id="sms_notify" name="sms_notify" value="' _ ctx.user_setting_map.$setting_notify _ '" />' : '' %]
110                                  [% END %]                               
111
112                                 </div>
113                                 [% END %]
114                             </div>
115                         </div>
116                         <div class="submit_btn">
117                             <input type='hidden' name='action' value='hold'/>
118                             <input type='image' src="[% ctx.media_prefix %]/images/kpac/review_submit_btn.png[% ctx.cache_key %]" alt="[% l('Submit') %]"/>
119                         </div>
120                     </form>
121                 </div>
122             </td>
123
124             <td valign="top">
125                 <div class="right_brain">
126                     <div class="top_side">
127                         <h2>[% l('save it!') %]</h2>
128                         <p>[% l('If you would like to save this item to a list to be requested later, click Submit below.') %]</p>
129                         [% IF ctx.user AND ctx.bookbags AND ctx.bookbags.size > 0 %]
130                         <br/>
131                         <p>
132                             [% l('You may also save this item to a list you have already created by selecting one of your lists below.') %]
133                         </p>
134                         [% END %]
135                     </div>
136                     <form method='POST'>
137                         <input type='hidden' name='action' value='save'/>
138                         [% IF ctx.user AND ctx.bookbags AND ctx.bookbags.size > 0 %]
139                             <div class="checkout_box">
140                                 <div class="box1_top">&nbsp;</div>
141                                 <div class="box_inside">
142                                     <p>[% l('Add to one of your lists?') %]</p>
143                                     <select name='bookbag'>
144                                         <option value='' selected='selected'>[% l('-- Temporary List --') %]</option>
145                                         [% FOR bbag IN ctx.bookbags %]
146                                             <option value="[% bbag.id %]">[% bbag.name | html %]</option>
147                                         [% END %]
148                                     </select>
149                                 </div>
150                             </div>
151                         [% END %]
152                         <div class="submit_btn">
153                             <input type='image' src="[% ctx.media_prefix %]/images/kpac/review_submit_btn.png[% ctx.cache_key %]" alt="[% l('Submit') %]" />
154                         </div>
155                     </div>
156                 </div>
157             </td>
158         </tr>
159     </table>
160 </div>
161
162 <div class="sub_navigation2 checkout">
163     <table cellpadding="0" cellspacing="0" border="0" width="100%">
164         <tr>
165             [%  # in the absence of a sane referer, return to the detail page
166                 url = ctx.kpac_root _ (ctx.referer.match('results') ? '/results' : '/record/' _ ctx.bre_id) %]
167             <td><a href="[% mkurl(url) %]"><img src="[% ctx.media_prefix %]/images/kpac/cancel_back_btn.png[% ctx.cache_key %]" /></a></td>
168             <td width="100%" class="nav_mid_bg">&nbsp;</td>
169         </tr>
170     </table>
171 </div>
172          
173 [% END %]