some progress on the place_hold page; ou selector improvements, etc
authorsenator <lebbeous@esilibrary.com>
Thu, 10 Feb 2011 18:15:19 +0000 (13:15 -0500)
committersenator <lebbeous@esilibrary.com>
Thu, 10 Feb 2011 18:15:19 +0000 (13:15 -0500)
Open-ILS/web/css/skin/default/opac/style.css
Open-ILS/web/templates/default/opac/home.tt2
Open-ILS/web/templates/default/opac/parts/advanced/search.tt2
Open-ILS/web/templates/default/opac/parts/libselect.tt2 [deleted file]
Open-ILS/web/templates/default/opac/parts/org_selector.tt2 [new file with mode: 0644]
Open-ILS/web/templates/default/opac/parts/place_hold.tt2
Open-ILS/web/templates/default/opac/parts/searchbar.tt2

index 1dc5d31..b3a8bbc 100644 (file)
@@ -518,12 +518,8 @@ div.select-wrapper:hover {
        border-bottom: 1px solid black;
 }
 
-#main-content {
-    /* on devcatalog: width: 974px; margin:auto; padding-left:0px; */
-       width: 694px;
-       margin: auto;
-       padding-left: 17px;
-}
+#main-content-home { width: 694px; margin: auto; padding-left: 17px; }
+#main-content { width: 974px; margin:auto; padding-left: 0px; }
 
 #main-content .login_boxes {
        border: 1px solid #dedede;
index f6c4ea5..be26963 100644 (file)
@@ -6,7 +6,7 @@
         [% INCLUDE "default/opac/parts/searchbar.tt2" %]
     </div>
     <div id="content-wrapper">
-        <div id="main-content">
+        <div id="main-content-home">
             <div class="common-full-pad"></div>
             [% INCLUDE "default/opac/parts/homesearch.tt2" %]
             <div class="common-full-pad"></div>        
index 44fb6b3..f0beef9 100644 (file)
     <tr>
         <td align='center'>
             [% l("Search Library") %]<br /><br />
-            [% INCLUDE "default/opac/parts/libselect.tt2" %]
+            <span id='depth_selector_span'>
+                [% PROCESS "default/opac/parts/org_selector.tt2";
+                    PROCESS build_org_selector name='loc' value=loc %]
+            </span>
+            <span id='lib_selector_span'>
+                <a id='lib_selector_link' class='classic_link'
+                    href='#'>[% l("Choose a library to search") %]</a>
+            </span>
             <br /><br />
             <span>[% l("Limit to Available") %]</span>
             <input type='checkbox' id='opac.result.limit2avail'/>
diff --git a/Open-ILS/web/templates/default/opac/parts/libselect.tt2 b/Open-ILS/web/templates/default/opac/parts/libselect.tt2
deleted file mode 100644 (file)
index 59cdfa6..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-[%  # XXX TODO probably put this BLOCK somewhere else so it can be used widely.
-    # Org Unit Selector Widget :
-    #   PROCESS build_org_selector id='selector-id' name='selector-name'
-    BLOCK build_org_selector;
-        first_run = 0;
-        IF !org_unit;
-            org_unit = ctx.aou_tree;
-            first_run = 1;
-%]
-    <select id='[% id %]' name='[% name %]'>
-    [% END %]
-        <option value='[% org_unit.id %]' [% IF org_unit.id == value %] selected='selected' [% END %]>
-            [%
-                pad = org_unit.ou_type.depth * 2;
-                FOR idx IN [0..pad]; '&nbsp;'; END;
-                org_unit.name;
-            %]
-        </option>
-        [% FOR child IN org_unit.children; PROCESS build_org_selector org_unit = child; END %]
-    [% IF first_run %]
-    </select>
-    [% END %]
-[% END %]
-
-<!-- ****************** libselect.xml ***************************** -->
-    <span id='depth_selector_span'>
-        [% PROCESS build_org_selector name='loc' value=loc %]
-    </span>
-    <span id='lib_selector_span'>
-        <a id='lib_selector_link' class='classic_link'
-            href='#'>[% l("Choose a library to search") %]</a>
-    </span>
-<!-- ****************** end: libselect.xml ***************************** -->
diff --git a/Open-ILS/web/templates/default/opac/parts/org_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/org_selector.tt2
new file mode 100644 (file)
index 0000000..aa99e91
--- /dev/null
@@ -0,0 +1,23 @@
+[%
+    BLOCK build_org_selector_options; %]
+        <option value='[% walker.id %]' [% IF walker.id == value %] selected='selected' [% END %]>
+            [%
+                pad = walker.ou_type.depth * 2;
+                FOR idx IN [0..pad]; '&nbsp;'; END;
+                walker.name;
+            %]
+        </option>
+        [%  FOR child IN walker.children;
+            PROCESS build_org_selector_options walker=child value=value;
+        END;
+    END;
+
+    # XXX TODO probably put this BLOCK somewhere else so it can be used widely.
+    # Org Unit Selector Widget :
+    #   PROCESS build_org_selector id='selector-id' name='selector-name'
+    BLOCK build_org_selector;
+%]
+    <select id='[% id %]' name='[% name %]'>
+    [% PROCESS build_org_selector_options walker=(org_unit || ctx.aou_tree) value=value %]
+    </select>
+[%  END %]
index 7fc9f31..45f43b1 100644 (file)
@@ -1,3 +1,8 @@
+[%  USE CGI;
+    PROCESS "default/opac/parts/marc_misc.tt2";
+    attrs = {marc_xml => ctx.marc_xml};
+    PROCESS get_marc_attrs args=attrs;
+%]
 <div>
     <div id='xulholds_box' class='hide_me canvas' style='margin-top: 6px;'>
         <center>
                             <input type='text' id='xul_recipient_barcode' />
                         </td>
                         <td>
-                            <input type='submit' value='[% l("Submit") %]' id='xul_recipient_barcode_submit' />
+                            <input type='submit' value='[% l("Submit") %]'
+                                id='xul_recipient_barcode_submit' />
                         </td>
                         <td>
                             <input type='submit' value='[% l("Cancel") %]' />
                         </td>
                         <td>
-                            <input type='submit' value='[% l("Place hold for my account") %]' id='xul_recipient_me' />
+                            <input type='submit'
+                                value='[% l("Place hold for my account") %]'
+                                id='xul_recipient_me' />
                         </td>
                     </tr>
                 </tbody>
         <b>[% l("Checking for possibility of hold fulfillment...") %]</b>
     </div>
     <div id='holds_box' class='canvas' style='margin-top: 6px;'>
-        <br/>
-        <h1>Place Hold</h1>
-        <p>
-        You would like to place a hold on
-        <strong>&quot;<span id="holds_title"></span>&quot;</strong>
-        to be picked up at
-        <strong>&quot;<span id="holds_pickup_lib"></span>&quot;</strong>.<br />
-        If this is correct, press <strong>SUBMIT</strong>.</p>
-        <p>
-            If you would like to change the library pick up location, select
-            from the &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-            <select style="width:200px;" id="holds_org_selector"></select><br />
-            Location dropdown menu.
-        </p>
-        <p>If you use the Traveling Library Center (TLC) and ABC Express
-            services, please select "Outreach" to have the item delivered
-            during your scheduled visit.</p>
-        <a href="#" id="holds_submit"><img
-            alt="Submit" src="[% ctx.media_prefix %]/images/btnSubmit.png" /></a>
-        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-        <a href="#" id="holds_cancel"><img
-            alt="Cancel" src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
+        <form method="POST">
+            <br/>
+            <input type="hidden" name="hold_target"
+                value="[% CGI.param('hold_target') | html %]" />
+            <input type="hidden" name="hold_type"
+                value="[% CGI.param('hold_type') | html %]" />
+            <input type="hidden" name="redirect_to"
+                value="[% CGI.param('redirect_to') | html %]" />
+            <h1>Place Hold</h1>
+            <p>
+                You would like to place a hold on
+                <strong><q>[% attrs.title %]</q></strong>
+                to be picked up at
+                <strong>
+                    <q>[% ctx.find_aou(ctx.default_pickup_lib).name %].</q>
+                </strong><br />
+                If this is correct, press <strong>SUBMIT</strong>.
+            </p>
+            <p>
+                If you would like to change the library pick up location, select
+                from the &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                [% PROCESS "default/opac/parts/org_selector.tt2";
+                    PROCESS build_org_selector name='pickup_lib' value=ctx.default_pickup_lib %]<br />
+                Location dropdown menu.
+            </p>
+            <p>If you use the Traveling Library Center (TLC) and ABC Express
+                services, please select "Outreach" to have the item delivered
+                during your scheduled visit.</p>
+            <input type="image" name="submit" value="submit" title="Submit"
+                alt="Submit" src="[% ctx.media_prefix %]/images/btnSubmit.png" />
+            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+            <a href="javascript:history.go(-1);" id="holds_cancel"><img
+                alt="Cancel" src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
+        </form>
         <br /><br />
         <p>* If you need your item today, and it is checked in at your
             library, please place your hold and then call your library to set it
                     <td class='holds_cell'>[% l("Contact email address") %]:</td>
                     <td class='holds_cell' id='holds_email'> 
                         <span class='hide_me' id='holds.no_email'>
-                           ([% l("Patron has no configured email address)" %])<br/>
+                           ([% l("Patron has no configured email address") %])<br/>
                            ([% l("See") %] <a class='classic_link' id='holds.no_email.my_account'>[% l("My Account") %]</a> [% l("for setting your email address") %])
                         </span>
                         <span class='hide_me' id='holds.no_email.xul'>
         </span>
     </div>
     <div id="anonListTable" class="hide_me" style="margin-top: 6px;">
-    <select id="holdsCacheSel" class="hide_me"></select><br />
-    <a href="#">Place hold on selected</a><br />
-    <a href="#">Remove selected</a>
-    
-    <table id="temp_list_holds" cellpadding='0' cellspacing='0' border='0'
-        style="margin-top:10px;">
-        <tr>
-            <td width="1%" style="padding-left:10px;">
-                <input type='checkbox' title='Select All'
-                    id='anon_selector' />
-            </td>
-            <td width="1%">
-            </td>
-            <td width="98%" style="padding-left:40px;">
-                <strong>Title</strong>
-            </td>
-        </tr>
-    </table>
-    <table width='100%' style="margin-left:7px;margin-bottom:10px;">
-        <thead>
-            <tr><td width='20'></td><td width='30'></td><td></td></tr>
-        </thead>
-        <tbody id="anonListParent">
-            <tr id="anonListTemp">
-              <td><input type='checkbox' name='anon_selector' /></td>
-              <td name="curr_row"></td>
-              <td name="title"></td>
+        <select id="holdsCacheSel" class="hide_me"></select><br />
+        <a href="#">Place hold on selected</a><br />
+        <a href="#">Remove selected</a>
+        
+        <table id="temp_list_holds" cellpadding='0' cellspacing='0' border='0'
+            style="margin-top:10px;">
+            <tr>
+                <td width="1%" style="padding-left:10px;">
+                    <input type='checkbox' title='Select All'
+                        id='anon_selector' />
+                </td>
+                <td width="1%">
+                </td>
+                <td width="98%" style="padding-left:40px;">
+                    <strong>Title</strong>
+                </td>
             </tr>
-        </tbody>
-    </table>
-    <a href="#">Back to search results</a>
+        </table>
+        <table width='100%' style="margin-left:7px;margin-bottom:10px;">
+            <thead>
+                <tr><td width='20'></td><td width='30'></td><td></td></tr>
+            </thead>
+            <tbody id="anonListParent">
+                <tr id="anonListTemp">
+                  <td><input type='checkbox' name='anon_selector' /></td>
+                  <td name="curr_row"></td>
+                  <td name="title"></td>
+                </tr>
+            </tbody>
+        </table>
+        <a href="#">Back to search results</a>
     </div>
 
     <span class='hide_me' id='format_words'>
     <span id='hold_failed_patron_barred' class='hide_me'>[% l("PATRON BARRED. Please see any notes in the \"Staff Notes\" section of your \"My Account\" page or contact your local library.") %]</span>
     <span id='invalid_hold' class='hide_me'>[% l("This hold is no longer valid. It's likely that the target for the hold was deleted from the system.  Please cancel this hold and place a new one.") %]</span>
     <span id='holds_invalid_recipient' class='hide_me'>[% l("The patron barcode entered as the hold recipient is invalid.") %]</span>
-
 </div>
index 50ae309..0a469eb 100644 (file)
@@ -1,3 +1,4 @@
+[% PROCESS "default/opac/parts/org_selector.tt2" %]
 <div id="search-box">    
     <form action="[% skin_root %]results" method="GET">
     <table cellpadding="0" cellspacing="10" border="0">
@@ -16,7 +17,7 @@
             <td>
                 <div id="search_box_wrapper">
                     <input type="text" id="search_box" name="query"
-                        value="[% query || l("Search Keyword") %]"
+                        value="[% query || l("Search Keyword") | html %]"
                         onfocus="if (this.value=='[% l("Search Keyword") %]'){this.value='';this.style.color='#000';}"
                         onblur="if (this.value==''){this.value='[% l("Search Keyword") %]';this.style.color='#999';}" />
                     <input name='page' type='hidden' value="0" />
                 [% INCLUDE "default/opac/parts/format_selector.tt2" %]
             </td>
             <td>
-                [% INCLUDE "default/opac/parts/libselect.tt2" %]
+                <span id='depth_selector_span'>
+                    [% PROCESS build_org_selector name='loc' value=loc %]
+                </span>
+                <span id='lib_selector_span'>
+                    <a id='lib_selector_link' class='classic_link'
+                        href='#'>[% l("Choose a library to search") %]</a>
+                </span>
             </td>
         </tr>
     </table>