kpac : holds, misc
authorBill Erickson <berick@esilibrary.com>
Mon, 30 Jan 2012 19:46:30 +0000 (14:46 -0500)
committerMike Rylander <mrylander@gmail.com>
Mon, 30 Jul 2012 19:03:19 +0000 (15:03 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/examples/kpac.xml
Open-ILS/src/templates/kpac/checkout.tt2
Open-ILS/src/templates/kpac/parts/base.tt2
Open-ILS/src/templates/kpac/parts/help_popups.tt2 [new file with mode: 0644]

index 6e8ff49..6672bff 100644 (file)
@@ -31,9 +31,9 @@
             <cell name="Clarinet" img="category.png" type="link">http://en.wikipedia.org/wiki/Clarinet</cell>
         </page>
         <page id="11" columns="3" name="Current Events" img="category.png">
-            <cell name="Entertainment"  img="category.png" type="search">su:entertainment sort('pubdate')#descending</cell>
-            <cell name="Politics"       img="category.png" type="search">su:politics sort('pubdate')#descending</cell>
-            <cell name="Economy"        img="category.png" type="search">su:economy sort('pubdate')#descending</cell>
+            <cell name="Entertainment"  img="category.png" type="search">su:entertainment sort(pubdate)#descending</cell>
+            <cell name="Politics"       img="category.png" type="search">su:politics sort(pubdate)#descending</cell>
+            <cell name="Economy"        img="category.png" type="search">su:economy sort(pubdate)#descending</cell>
         </page>
         <page id="12" columns="3" name="Programming" img="category.png">
         </page>
index 7050494..d392168 100644 (file)
     [% INCLUDE 'kpac/parts/record_row.tt2' rec_id=ctx.bre_id%]
 </div>
           
-          <div class="checkout_options">
-            <table cellpadding="0" cellspacing="0" border="0"><tr><td valign="top" class="left_brain_cell">
-              <div class="left_brain">
+<div class="checkout_options">
+    <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+            <td valign="top" class="left_brain_cell">
+                <div class="left_brain">
 
- <!-- ************************************* all help popups should go here **************************************** -->
-       <div class="popup_wrapper">
-         <div class="popup_wrapper_inner" id="card_help">
-           <table cellpadding="0" cellspacing="0" border="0">
-             <tr>
-               <td class="popup_tl"><div class="clear">&nbsp;</div></td>
-               <td class="popup_tm"><div class="clear">&nbsp;</div></td>
-               <td class="popup_tr"><div class="clear">&nbsp;</div></td>
-             </tr>
-             <tr>
-               <td class="popup_lm"><div class="clear">&nbsp;</div></td>
-               <td class="popup_mid"><div class="popup_content"><img src="[% ctx.media_prefix %]/images/kpac/library_card.png" alt="library card" /></div></td>
-               <td class="popup_rm"><div class="clear">&nbsp;</div></td>
-             </tr>
-             <tr>
-               <td class="popup_bl"><div class="clear">&nbsp;</div></td>
-               <td class="popup_bm"><div class="clear">&nbsp;</div></td>
-               <td class="popup_br"><div class="clear">&nbsp;</div></td>
-             </tr>
-             <tr><td colspan="3" align="center" valign="top"><img class="popup_arrow_bm" src="[% ctx.media_prefix %]/images/kpac/popup_arrow_bm.png" /></td></tr>
-           </table>
-         </div>
-       </div>
-       
-       <div class="popup_wrapper">
-         <div class="popup_wrapper_inner" id="test_popup">
-           <table cellpadding="0" cellspacing="0" border="0">
-             <tr>
-               <td class="popup_tl"><div class="clear">&nbsp;</div></td>
-               <td class="popup_tm"><div class="clear">&nbsp;</div></td>
-               <td class="popup_tr"><div class="clear">&nbsp;</div></td>
-             </tr>
-             <tr>
-               <td class="popup_lm"><div class="clear">&nbsp;</div></td>
-               <td class="popup_mid"><div class="popup_content"><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam <a href="javascript:alert('hi');">nonummy</a> nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit</p></div></td>
-               <td class="popup_rm"><div class="clear">&nbsp;</div></td>
-             </tr>
-             <tr>
-               <td class="popup_bl"><div class="clear">&nbsp;</div></td>
-               <td class="popup_bm"><div class="clear">&nbsp;</div></td>
-               <td class="popup_br"><div class="clear">&nbsp;</div></td>
-             </tr>
-             <tr><td colspan="3" align="center" valign="top"><img class="popup_arrow_bm" src="[% ctx.media_prefix %]/images/kpac/popup_arrow_bm.png" /></td></tr>
-           </table>
-         </div>
-       </div>
-<!-- ********************************************** end popups *************************************************** -->
-  
-              
-              
-              
-                <div class="top_side">
-                  <h2>get it!</h2>
-                  <p>If you would like to request this item, please enter the following information and click<br />Submit below:</p>
-                </div>
-                <div class="checkout_box">
-                  <div class="box1_top">&nbsp;</div>
-                  <div class="box_inside">
-                    <p>Library Card Number without spaces:</p>
-                    <div class="input_box"><input type="text" class="text_box" style="color:#aaa;" value=" Enter Numbers... " onfocus="if(this.value==' Enter Numbers... '){this.value='';this.style.color='#424242';}" onblur="if(this.value==''){this.value=' Enter Numbers... '; this.style.color='#aaa';}" /></div>
-                    <a class="help_btn" href="javascript:;" onclick="helpPopup('card_help', this, event);"><img src="[% ctx.media_prefix %]/images/kpac/question_mark.png" alt="pin number help" /></a>
-                    <div class="clear">&nbsp;</div>
-                    <div class="hr">&nbsp;</div>
-                    <p>Pin Number:</p>
-                    <div class="input_box"><input type="password" class="text_box" style="color:#aaa;" value=" Enter Numbers... " onfocus="if(this.value==' Enter Numbers... '){this.value='';this.style.color='#424242';}" onblur="if(this.value==''){this.value=' Enter Numbers... '; this.style.color='#aaa';}" /></div>
-                    <a class="help_btn" href="javascript:;" onclick="helpPopup('test_popup', this, event);"><img src="[% ctx.media_prefix %]/images/kpac/question_mark.png" alt="pin number help" /></a>
-                    <div class="clear">&nbsp;</div>
-                    <div class="hr">&nbsp;</div>
-                    <p>Choose a Pickup Library:</p>
-                    <div class="pickup_lib"><select name="library"><option>Fairwood</option></select></div>
-                  </div>
-                </div>
-                <div class="submit_btn">
-                  <a href="javascript:;"><img src="[% ctx.media_prefix %]/images/kpac/review_submit_btn.png" alt="submit" /></a>
-                </div>
-              </div>
-            </td><td valign="top">
-              <div class="right_brain">
-                <div class="top_side">
-                  <h2>save it!</h2>
-                  <p>If you would like to save this item to a list to be requested later, please choose a location and click<br />Submit below.</p>
-                </div>
-                <div class="checkout_box">
-                  <div class="box1_top">&nbsp;</div>
-                  <div class="box_inside">
-                    <p>Choose a Pickup Library:</p>
-                    <div class="pickup_lib"><select name="library"><option>Fairwood</option></select></div>
-                    <div class="hr">&nbsp;</div>
-                    <div><a href="javascript:;">View all KCLS libraries</a></div>
-                  </div>
+                    [% WRAPPER 'kpac/parts/help_popups.tt2' popup_id='card_help' %]
+                        <img src="[% ctx.media_prefix %]/images/kpac/library_card.png" alt="[% l('library card') %]" /></div></td>
+                    [% END %]
+                    [% WRAPPER 'kpac/parts/help_popups.tt2' popup_id='password_help' %]
+                        <p>[% l('Enter your password') %]</p>
+                    [% END %]
+
+                    <div class="top_side">
+                        <h2>get it!</h2>
+                        <p>[% |l %]If you would like to request this item, please enter the following information and click<br />Submit below:[% END %]</p>
+                    </div>
+                    <div class="checkout_box">
+                        <div class="box1_top">&nbsp;</div>
+                        <div class="box_inside">
+
+                            [% IF !ctx.user %]
+                                [% seed = l(' Enter Numbers... ') %]
+                                <p>[% l('Library Card Number without spaces:') %]</p>
+                                <div class="input_box">
+                                    <input type="text" class="text_box" style="color:#aaa;" value="[% seed %]" 
+                                        onfocus="if(this.value=='[% seed %]'){this.value='';this.style.color='#424242';}" 
+                                        onblur="if(this.value==''){this.value='[% seed %]'; this.style.color='#aaa';}" />
+                                </div>
+                                <a class="help_btn" href="javascript:;" 
+                                    onclick="helpPopup('card_help', this, event);"><img 
+                                    src="[% ctx.media_prefix %]/images/kpac/question_mark.png" alt="pin number help" /></a>
+                                <div class="clear">&nbsp;</div>
+                                <div class="hr">&nbsp;</div>
+
+                                <p>[% l('Password') %]</p>
+                                <div class="input_box">
+                                    <input type="password" class="text_box" style="color:#aaa;" value="[% seed %]" 
+                                        onfocus="if(this.value=='[% seed %]'){this.value='';this.style.color='#424242';}" 
+                                        onblur="if(this.value==''){this.value='[% seed %]'; this.style.color='#aaa';}" />
+
+                                <a class="help_btn" href="javascript:;" 
+                                    onclick="helpPopup('password_help', this, event);"><img 
+                                    src="[% ctx.media_prefix %]/images/kpac/question_mark.png" alt="[% l('password help') %]" /></a>
+
+                                <div class="clear">&nbsp;</div>
+                                <div class="hr">&nbsp;</div>
+                            [% END %]
+
+                            <p>[% l('Choose a Pickup Library:') %]</p>
+                            <div class="pickup_lib">
+                                [%  def_lib = ctx.default_pickup_lib || ctx.physical_loc;
+                                    PROCESS "opac/parts/org_selector.tt2";
+                                    PROCESS build_org_selector name='pickup_lib' 
+                                    value=def_lib id='pickup_lib' can_have_vols_only=1 %]
+                            </div>
+                        </div>
+                    </div>
+                    <div class="submit_btn">
+                        <a href="javascript:;"><img src="[% ctx.media_prefix %]/images/kpac/review_submit_btn.png" alt="submit" /></a>
+                    </div>
                 </div>
-                <div class="submit_btn">
-                  <a href="javascript:;"><img src="[% ctx.media_prefix %]/images/kpac/review_submit_btn.png" alt="submit" /></a>
+            </td>
+
+            <!-- TODO -->
+            <td valign="top">
+                <div class="right_brain">
+                    <div class="top_side">
+                        <h2>save it!</h2>
+                        <p>If you would like to save this item to a list to be requested later, please choose a location and click<br />Submit below.</p>
+                    </div>
+                    <div class="checkout_box">
+                        <div class="box1_top">&nbsp;</div>
+                        <div class="box_inside">
+                            <p>Choose a Pickup Library:</p>
+                            <div class="pickup_lib"><select name="library"><option>Fairwood</option></select></div>
+                            <div class="hr">&nbsp;</div>
+                            <div><a href="javascript:;">View all KCLS libraries</a></div>
+                        </div>
+                    </div>
+                    <div class="submit_btn">
+                        <a href="javascript:;"><img src="[% ctx.media_prefix %]/images/kpac/review_submit_btn.png" alt="submit" /></a>
+                    </div>
                 </div>
-              </div>
-            </td></tr></table>
-          </div>
-          
-          <div class="sub_navigation2 checkout">
-            <table cellpadding="0" cellspacing="0" border="0" width="100%"><tr>
-              <td><a href="javascript:;"><img src="[% ctx.media_prefix %]/images/kpac/cancel_back_btn.png" /></a></td>
-              <td width="100%" class="nav_mid_bg">&nbsp;</td>
-            </tr></table>
-          </div>
-             
+            </td>
+        </tr>
+    </table>
+</div>
+
+<div class="sub_navigation2 checkout">
+    <table cellpadding="0" cellspacing="0" border="0" width="100%">
+        <tr>
+            [%  # in the absence of a sane referer, return to the detail page
+                url = ctx.kpac_root _ (ctx.referer.match('search_results') ? '/search_results' : '/detailed/' _ ctx.bre_id) %]
+            <td><a href="[% mkurl(url) %]"><img src="[% ctx.media_prefix %]/images/kpac/cancel_back_btn.png" /></a></td>
+            <td width="100%" class="nav_mid_bg">&nbsp;</td>
+        </tr>
+    </table>
+</div>
+         
 [% END %]
index e3d122a..ae3f6b2 100644 (file)
@@ -14,6 +14,6 @@
             <div class="main_wrapper"> [% content %] </div>
             [% INCLUDE 'kpac/parts/footer.tt2' %]
         </div>
-        <script type="text/javascript" src="js/functions.js"></script>
+        <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/kpac/functions.js"></script>
     </body>
 </html>
diff --git a/Open-ILS/src/templates/kpac/parts/help_popups.tt2 b/Open-ILS/src/templates/kpac/parts/help_popups.tt2
new file mode 100644 (file)
index 0000000..5399fb9
--- /dev/null
@@ -0,0 +1,26 @@
+<div class="popup_wrapper">
+    <div class="popup_wrapper_inner" id="[% popup_id %]">
+        <table cellpadding="0" cellspacing="0" border="0">
+            <tr>
+                <td class="popup_tl"><div class="clear">&nbsp;</div></td>
+                <td class="popup_tm"><div class="clear">&nbsp;</div></td>
+                <td class="popup_tr"><div class="clear">&nbsp;</div></td>
+            </tr>
+            <tr>
+                <td class="popup_lm"><div class="clear">&nbsp;</div></td>
+                <td class="popup_mid"><div class="popup_content">[% content %]</td>
+                <td class="popup_rm"><div class="clear">&nbsp;</div></td>
+            </tr>
+            <tr>
+                <td class="popup_bl"><div class="clear">&nbsp;</div></td>
+                <td class="popup_bm"><div class="clear">&nbsp;</div></td>
+                <td class="popup_br"><div class="clear">&nbsp;</div></td>
+            </tr>
+            <tr>
+                <td colspan="3" align="center" valign="top">
+                    <img class="popup_arrow_bm" src="[% ctx.media_prefix %]/images/kpac/popup_arrow_bm.png" />
+                </td>
+            </tr>
+        </table>
+    </div>
+</div>