PINES OPAC Customization: Make Lists Prettier
authorTerran McCanna <tmccanna@georgialibraries.org>
Fri, 11 Dec 2020 23:06:04 +0000 (18:06 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Sat, 19 Nov 2022 19:55:56 +0000 (14:55 -0500)
Note that more work should be done on master to make lists more
user-friendly, but this will be fine for us now.

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Open-ILS/src/templates-bootstrap/opac/myopac/lists.tt2

index 3232125..fd356c7 100755 (executable)
@@ -69,6 +69,7 @@
     <h3>[% l("... from basket") %]</h3>
     [% INCLUDE "opac/parts/anon_list.tt2" %]
     [% ELSE %]
+    <h3>[% l("My Saved Lists") %]</h3>
     [% INCLUDE "opac/parts/anon_list.tt2" %]
     </div>
 
     <h3>[% l('Saved Lists') %]</h3>
    
 
-        [% IF !ctx.bookbags.size %]
-        <div class="container pb-2 mt-2 pt-2">
-                <h4>[% l("You don't have any lists yet") %]</h4>
-                <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {}) %]'>[% l('Create a list with the form above') %]</a>
-  
-        [% ELSE %]
+    [% IF ctx.bookbags.size %]
+    <div class="header_middle">
+        <span class="sr-only">[% l('Saved Lists') %]</span>
         [% IF limit < ctx.bookbag_count; %]
         <span class='float-left' style='padding-left: 10px;'>
             [%- IF offset > 0 -%]
 
     <div id='acct_lists_prime'>
         [% FOR bbag IN ctx.bookbags %]
-        <div class="container border-bottom pb-2">
-            <div class="row mt-2">
-                    [% baseurl = ctx.opac_root _ '/myopac/lists';
-                    IF bbag.id != CGI.param("bbid");
-                        url = mkurl(baseurl,{bbid => bbag.id, item_page => 1},['edit_notes','sort']);
-                        ltitle = l("Show items in list");
-                    ELSE;
-                        url = mkurl(baseurl, {}, ['bbid', 'edit_notes', 'sort']);
-                        ltitle = l("Hide items in list");
-                    END %]
-                    <h4 class="bookbag-name"><a title="[% ltitle %]" href="[% url %]">[% bbag.name | html %]</a>[% IF bbag.pub == 't'; %]
-                    <a target='_blank' href='/opac/extras/feed/bookbag/rss2-full/[% bbag.id %]' aria-label="RSS Feed">
-                    <i class="fas fa-rss-square" aria-hidden="true"></i></a>
-                    [% END %]</h4>
-            </div>
-            <div class="row bookbag-description">
-                     [% bbag.description | html %]
-            </div>
-            <div class="row">
-                <div class="col-9">
-                    [% IF ctx.add_rec %]
-                    <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update', {}, 1) %]" method="post">
-                    <div class="bookbag-controls">
-                        <input type="hidden" name="action" value="add_rec" />
-                        <input type="hidden" name="list" value="[% bbag.id %]" />
-                        <input type="hidden" name="add_rec" value="[% ctx.add_rec %]" />
-                        [% IF ctx.where_from %]
-                        <input type="hidden" name="where_from" value="[% ctx.where_from %]" />
-                        [% END %]
-                        <button class="fixed btn btn-success btn-sm m-1" type="submit" ><i class="fas fa-plus-square" aria-hidden="true"></i> [% l('Add to this list') %]</button>
-                    </div>
-                    </form>
+        <div>
+         <table class="table" style="border:3px solid #8DC641;"><tr>
+            <td class="listTitleText">
+                [% baseurl = ctx.opac_root _ '/myopac/lists';
+                IF bbag.id != CGI.param("bbid");
+                    url = mkurl(baseurl,{bbid => bbag.id, item_page => 1},['edit_notes','sort']);
+                    ltitle = l("Show items in list");
+                ELSE;
+                    url = mkurl(baseurl, {}, ['bbid', 'edit_notes', 'sort']);
+                    ltitle = l("Hide items in list");
+                END %]
+                <h4 class="bookbag-name"><a title="[% ltitle %]" href="[% url %]">[% bbag.name | html %]</a>[% IF bbag.pub == 't'; %]
+                <a target='_blank' href='/opac/extras/feed/bookbag/rss2-full/[% bbag.id %]' aria-label="RSS Feed">
+                <i class="fas fa-rss-square" aria-hidden="true"></i></a>
+                [% END %]</h4>
+                [% IF bbag.description %]<div class="bookbag-description" style="padding-left: 20px;">[% bbag.description | html %]</div>[% END %]
+             </td>
+            </tr>
+            <tr>
+            <td>
+            [% IF ctx.add_rec %]
+            <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update', {}, 1) %]" method="post">
+                <div class="bookbag-controls">
+                    <input type="hidden" name="action" value="add_rec" />
+                    <input type="hidden" name="list" value="[% bbag.id %]" />
+                    <input type="hidden" name="add_rec" value="[% ctx.add_rec %]" />
+                    [% IF ctx.where_from %]
+                    <input type="hidden" name="where_from" value="[% ctx.where_from %]" />
                     [% END %]
 
             <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post">
         [% IF CGI.param("bbid") == bbag.id %]
 
         <div>
-        <h5 class="text-center my-2">List Items</h5>
+        <h5 class="sr-only">List Items</h5>
         <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post" >
         <input type="hidden" name="list" value="[% bbag.id %]" />
         <input type="hidden" name="sort" value="[% CGI.param('sort') | uri %]" />
-        <div>
+
+        <div style="border:1px solid #8DC641;margin: -17px 0px 30px 0px;">
         [% IF bbag.items.size %]
-            <div class="my-2">
-                <button name="action" class="btn btn-action btn-sm" type="submit" value="place_hold" id="place_hold">[% l('Place hold') %]</button>
-                <button name="action" class="btn btn-action btn-sm" type="submit" value="print">[% l('Print title details') %]</button>
-                <button name="action" class="btn btn-action btn-sm" type="submit" value="email">[% l('Email title details') %]</button>
-                <button name="action" class="btn btn-action btn-sm" type="submit" value="del_item">[% l('Remove from list') %]</button>
+            <div class="my-2" style="padding-left:30px;">
+                [% l('Select at least one item from your list below to use these actions:') %]<br/>
+                <button name="action" class="btn btn-action" type="submit" value="place_hold" id="place_hold">[% l('Place hold') %]</button>
+                <button name="action" class="btn btn-action" type="submit" value="print">[% l('Print title details') %]</button>
+                <button name="action" class="btn btn-action" type="submit" value="email">[% l('Email title details') %]</button>
+                <button name="action" class="btn btn-action" type="submit" value="del_item">[% l('Remove from list') %]</button>
             </div>
         [% END %]
 
 
 
 
-
         [% IF ctx.bb_page_count > 1; %]
             <div class="header_middle" style="padding-top:7px;">
-                <div class="bbag-navigate-list">[% l('Navigate Selected List ') %]</div>
-                <div class="bbag-navigate-list-pages">
+                <div class="bbag-navigate-list sr-only">[% l('Navigate Selected List ') %]</div>
+                <div class="bbag-navigate-list-pages" style="width:100%;text-align:center;">
                     [%- IF item_page > 1 -%]
                         <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
                             item_page => item_page - 1