make public bookbag name's links to the public view of the bookbag; minor tidying
authorberick <berick@esilibrary.com>
Fri, 8 Apr 2011 20:34:42 +0000 (16:34 -0400)
committerberick <berick@esilibrary.com>
Fri, 8 Apr 2011 20:34:42 +0000 (16:34 -0400)
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
Open-ILS/web/templates/default/opac/myopac/lists.tt2

index ad8ec8f..18ed515 100644 (file)
@@ -181,7 +181,7 @@ sub load_common {
     $ctx->{full_path} = $ctx->{base_path} . $self->cgi->path_info;
     $ctx->{unparsed_uri} = $self->apache->unparsed_uri;
     $ctx->{opac_root} = $ctx->{base_path} . "/opac"; # absolute base url
-    $ctx->{is_staff} = ($self->apache->headers_in->get('User-Agent') =~ 'oils_xulrunner');
+    $ctx->{is_staff} = ($self->apache->headers_in->get('User-Agent') =~ /oils_xulrunner/);
 
     # capture some commonly accessed pages
     $ctx->{home_page} = 'http://' . $self->apache->hostname . $self->ctx->{opac_root} . "/home";
index 31144e2..ba8d556 100644 (file)
@@ -3,6 +3,7 @@
     WRAPPER "default/opac/parts/myopac/base.tt2";
     myopac_page = "lists"  %]
 <div id='myopac_bookbag_div' style="padding:5px;">
+
     <!-- <div class="header_middle">
         <span id="acct_holds_header" style="float:left;">[% l('My Lists') %]</span>
         <span style="float:right;"><a class="hide_me" href="#">[% l('Export List') %]</a></span>
         </div>
     </div> -->
     <div id="temp_wrapper">
-<!-- new list creation -->
-<form action="[% ctx.opac_root %]/myopac/list/update" method="POST" id="create_form">
-    <h2>[% l('Create new list') %]</h2><a name="createnewlist"></a>
-<table cellpadding="0" border="0" id="list_create_table">
-    <tr>
-        <td>
-            <label for="list_create_name">[% l('Enter the name of the new list:') %]</label>
-            <input id="list_create_name" type="text" name="name" />
-            <input type="hidden" name="action" value="create" />
-        </td>
-        <td>
-            <label for="list_create_shared">[% l('Share this list?') %]</label>
-            <select name="shared" id="list_create_shared">
-                <option value="0">[% l('No') %]
-                <option value="1">[% l('Yes') %]
-            </select>
-            <a href="javascript:void(0);" onclick="alert(document.getElementById('bb_publish_text').innerHTML);"><img alt="[% l('Sharing Help') %]"
-                src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
-        </td>
-        <td class="list-create-table-buttons">
-            <input type="image" alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png"/>
-            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-            <a href="javascript:void(0);"
-                onclick="document.getElementById('create_form').reset(); return false"><img
-                alt="[% l('Cancel') %]"
-                src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
-        </td>
-    </tr>
-</table>
-            </form>
-        [% INCLUDE "default/opac/parts/anon_list.tt2" %]
-        [% IF ctx.bookbags.size %]
-        <div id='acct_lists_prime'>
-            [% FOR bbag IN ctx.bookbags %]
-            <div id='acct_list_template'>
-                <div style="width:100%">
-                    <form action="[% ctx.opac_root %]/myopac/list/update"
-                        method="POST">
-                        <div class="bookbag-share">
-                            <input type="hidden" name="list" value="[% bbag.id %]" />
-                            [% IF bbag.pub != 't' %]
-                            <input type="hidden" name="action" value="show" />
-                            <input type="submit" value="[% l('Share') %]" />
-                            [% ELSE %]
-                            <input type="hidden" name="action" value="hide" />
-                            <input type="submit" value="[% l('Hide') %]" />
-                            [% END %]
-                        </div>
-                    </form>
-                    <form action="[% ctx.opac_root %]/myopac/list/update"
-                        method="POST">
-                        <div class="bookbag-controls">
-                            <input type="hidden" name="list" value="[% bbag.id %]" />
-                            <input type="hidden" name="action" value="delete" />
-                            <input type="submit" value="[% l('Delete List') %]" />
-                        </div>
-                    </form>
-                    <div class="bookbag-controls"><big><strong>[% bbag.name %]</strong></big></div>
-                    <div class="bookbag-controls">
-                        [% IF bbag.pub == 't'; %]
-                        <a target='_blank' href='/opac/extras/feed/bookbag/rss2-full/[% bbag.id %]'><img
-                            alt="[% l('RSS Feed') %]" border="0"
-                            src="[% ctx.media_prefix %]/images/small-rss.png"/></a>
+
+
+    <!-- new list creation -->
+    <form action="[% ctx.opac_root %]/myopac/list/update" method="POST" id="create_form">
+        <h2>[% l('Create new list') %]</h2><a name="createnewlist"></a>
+        <table cellpadding="0" border="0" id="list_create_table">
+            <tr>
+                <td>
+                    <label for="list_create_name">[% l('Enter the name of the new list:') %]</label>
+                    <input id="list_create_name" type="text" name="name" />
+                    <input type="hidden" name="action" value="create" />
+                </td>
+                <td>
+                    <label for="list_create_shared">[% l('Share this list?') %]</label>
+                    <select name="shared" id="list_create_shared">
+                        <option value="0">[% l('No') %]
+                        <option value="1">[% l('Yes') %]
+                    </select>
+                    <a href="javascript:void(0);" onclick="alert(document.getElementById('bb_publish_text').innerHTML);"><img alt="[% l('Sharing Help') %]"
+                        src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
+                </td>
+                <td class="list-create-table-buttons">
+                    <input type="image" alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png"/>
+                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                    <a href="javascript:void(0);"
+                        onclick="document.getElementById('create_form').reset(); return false"><img
+                        alt="[% l('Cancel') %]"
+                        src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
+                </td>
+            </tr>
+        </table>
+    </form>
+
+    [% INCLUDE "default/opac/parts/anon_list.tt2" %]
+    [% IF ctx.bookbags.size %]
+    <div id='acct_lists_prime'>
+        [% FOR bbag IN ctx.bookbags %]
+        <div id='acct_list_template'>
+            <div style="width:100%">
+                <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
+                    <div class="bookbag-share">
+                        <input type="hidden" name="list" value="[% bbag.id %]" />
+                        [% IF bbag.pub != 't' %]
+                        <input type="hidden" name="action" value="show" />
+                        <input type="submit" value="[% l('Share') %]" />
+                        [% ELSE %]
+                        <input type="hidden" name="action" value="hide" />
+                        <input type="submit" value="[% l('Hide') %]" />
                         [% END %]
                     </div>
-                    <div class="clear-both pad-bottom-five"></div>
-                </div>
+                </form>
                 <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
-                <input type="hidden" name="list" value="[% bbag.id %]" />
-                <table cellpadding='0' cellspacing='0' border='0'>
-                    <thead id="acct_list_header">
-                        <tr>
-                            <td width="1%" style="padding-left: 10px;">
-                            <input type="checkbox" onclick="
-                                var inputs=document.getElementsByTagName('input'); 
-                                for (i = 0; i < inputs.length; i++) { 
-                                    if (inputs[i].name == 'del_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %]) 
-                                        inputs[i].checked = this.checked;}"/>
-
-                            </td>
-                            <td width="49%" style="padding-left: 5px;">[% l('Title') %]</td>
-                            <td width="49%">[% l('Author(s)') %]</td>
-                            <td width="1%" class="nowrap">
-                                <select class="opac-auto-179" name="action">
-                                    <option>[% l('-- Actions for this list --') %]</option>
-                                    <!-- XXX not ready yet<option value="hold">[% l('Place Hold') %]</option> -->
-                                    <option value="del_item">[% l('Remove Items') %]</option>
-                                </select>
-                                <input type="submit" value="[% l('Go') %]" />
-                            </td>
-                        </tr>
-                    </thead>
-                    <tbody>
-                        [% UNLESS bbag.items.size %]
-                        <tr><td colspan="4" class="opac-auto-171 opac-auto-097">
-                            [% l("This list contains no items.") %]
-                        </td></tr>
-                        [% END %]
-                        [% FOR item IN bbag.items;
-                            rec_id = item.target_biblio_record_entry;
-                            attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
-                            PROCESS get_marc_attrs args=attrs %]
-                        <tr>
-                            <td class="opac-auto-097b" style="padding-left: 10px;"><input type="checkbox" name="del_item" value="[% item.id %]" bbag='[% bbag.id %]'/></td>
-                            <td class="opac-auto-097b" style="padding-left: 5px;">[% attrs.title %]</td>
-                            <td class="opac-auto-097b">[% attrs.author %]</td>
-                        </tr>
-                        [% END %]
-                    </tbody>
-                </table>
+                    <div class="bookbag-controls">
+                        <input type="hidden" name="list" value="[% bbag.id %]" />
+                        <input type="hidden" name="action" value="delete" />
+                        <input type="submit" value="[% l('Delete List') %]" />
+                    </div>
                 </form>
-                <br /><br />
+                <div class="bookbag-controls">
+                    <big><strong>
+                    [% IF bbag.pub == 't' %]
+                        [% url = 'http://' _ ctx.hostname _ '/opac/extras/feed/bookbag/html-full/' _ bbag.id %]
+                        <a target='_blank' href='[% url %]'>[% bbag.name %]</a>
+                    [% ELSE %]
+                    [% bbag.name %]
+                    [% END %]
+                    </strong></big>
+                </div>
+                <div class="bookbag-controls">
+                    [% IF bbag.pub == 't'; %]
+                    <a target='_blank' href='/opac/extras/feed/bookbag/rss2-full/[% bbag.id %]'><img
+                        alt="[% l('RSS Feed') %]" border="0"
+                        src="[% ctx.media_prefix %]/images/small-rss.png"/></a>
+                    [% END %]
+                </div>
+                <div class="clear-both pad-bottom-five"></div>
             </div>
-            [% END %]
+            <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
+            <input type="hidden" name="list" value="[% bbag.id %]" />
+            <table cellpadding='0' cellspacing='0' border='0'>
+                <thead id="acct_list_header">
+                    <tr>
+                        <td width="1%" style="padding-left: 10px;">
+                        <input type="checkbox" onclick="
+                            var inputs=document.getElementsByTagName('input'); 
+                            for (i = 0; i < inputs.length; i++) { 
+                                if (inputs[i].name == 'del_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %]) 
+                                    inputs[i].checked = this.checked;}"/>
+
+                        </td>
+                        <td width="49%" style="padding-left: 5px;">[% l('Title') %]</td>
+                        <td width="49%">[% l('Author(s)') %]</td>
+                        <td width="1%" class="nowrap">
+                            <select class="opac-auto-179" name="action">
+                                <option>[% l('-- Actions for this list --') %]</option>
+                                <!-- XXX not ready yet<option value="hold">[% l('Place Hold') %]</option> -->
+                                <option value="del_item">[% l('Remove Items') %]</option>
+                            </select>
+                            <input type="submit" value="[% l('Go') %]" />
+                        </td>
+                    </tr>
+                </thead>
+                <tbody>
+                    [% UNLESS bbag.items.size %]
+                    <tr><td colspan="4" class="opac-auto-171 opac-auto-097">
+                        [% l("This list contains no items.") %]
+                    </td></tr>
+                    [% END %]
+                    [% FOR item IN bbag.items;
+                        rec_id = item.target_biblio_record_entry;
+                        attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
+                        PROCESS get_marc_attrs args=attrs %]
+                    <tr>
+                        <td class="opac-auto-097b" style="padding-left: 10px;"><input type="checkbox" name="del_item" value="[% item.id %]" bbag='[% bbag.id %]'/></td>
+                        <td class="opac-auto-097b" style="padding-left: 5px;">[% attrs.title %]</td>
+                        <td class="opac-auto-097b">[% attrs.author %]</td>
+                    </tr>
+                    [% END %]
+                </tbody>
+            </table>
+            </form>
+            <br /><br />
         </div>
         [% END %]
     </div>
+    [% END %]
+
     <div id='myopac_delete_bookbag_warn' class='hide_me'>
         [% l("This will remove the selected bookbag and all items contained within the bookbag.  Are you sure you wish to continue?") %]
     </div>
     <div style='width: 99%; text-align: center'>
         <b id='myopac_bookbag_items_name'> </b>
     </div>
-    <span id='bb_publish_text' class='hide_me'>[% l("Sharing a Bookbag means that the contents of the Bookbag will be visible to others.  To see the public view of a shared Bookbag, click the \"View\" link in the \"Shared\" column of the Bookbag list at the top of this page.") %]</span>
+    <span id='bb_publish_text' class='hide_me'>
+[% |l %]Sharing a Bookbag means that the contents 
+of the Bookbag will be visible to others.  
+To see the public view of a shared Bookbag, 
+click on the Bookbag's name in the Bookbag list.[% END %]
+    </span>
     <span id='myopac_remove_bb_item_confirm' class='hide_me'>
         [% l("Are you sure you wish to remove this bookbag item?") %]
     </span>
     <span class='hide_me' id='bb_update_success'>
         [% l("Bookbag successfully updated") %]
     </span>
+
 </div>
 [% END %]