Bug 20756: OPAC "Share list" button should be styled with an icon
authorOwen Leonard <oleonard@myacpl.org>
Mon, 14 May 2018 15:07:42 +0000 (15:07 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 8 Jun 2018 13:48:12 +0000 (09:48 -0400)
This patch adds a new "share" icon to the sprite image used to style
controls in the OPAC. The "share list" links now have a "sharelist"
class which is used to style the links with the new icon.

Also changed: Fixed the page structure markup of opac-shareshelf.tt.

To test you must have the OpacAllowSharingPrivateLists system preference
enabled.

 - Log in to the OPAC and go to Lists -> Your lists.
 - Create one or more private lists if necessary.
 - In the table of your lists there should be a "Share" link with the
   new icon.
 - View one of these lists and confirm that the "Share" link at the top
   of the table of list items.
 - Click through to the share list page and confirm that the page looks
   correct.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt
koha-tmpl/opac-tmpl/bootstrap/images/sprite.png
koha-tmpl/opac-tmpl/bootstrap/less/opac.less

index d97a675..6b0fc07 100644 (file)
@@ -13,6 +13,7 @@
         [% IF ( loggedinusername ) %]
             <li><a href="/cgi-bin/koha/opac-user.pl">[% USER_INFO.title %] [% USER_INFO.firstname %] [% USER_INFO.surname %]</a> <span class="divider">&rsaquo;</span></li>
         [% END %]
+        <li><a href="/cgi-bin/koha/opac-shelves.pl">Lists</a> <span class="divider">&rsaquo;</span></li>
         <li>Share a list</li>
     </ul> <!-- / .breadcrumb -->
 
                 </div>
             [% END %]
 
+            <div class="span10">
+                <div id="shareshelf" class="maincontent">
+
 [%# This section contains the essential code for error messages and three operations: invite, confirm_invite and accept. %]
     <h2>Share a list with another patron</h2>
-    <div class="span10">
-        <div id="shareshelf" class="maincontent">
 
     [% IF errcode %]
         [% IF errcode==1 && op %]<div class="alert">The operation [% op | html %] is not supported.</div>[% END %]
index ca35bc4..c122ae2 100644 (file)
                                             <input type="submit" class="deleteshelf" value="Delete list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"/>
                                         </form>
                                         [% IF category == PRIVATE && Koha.Preference('OpacAllowSharingPrivateLists') %]
-                                            <a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% shelf.shelfnumber | html %]" class="">Share list</a>
+                                            <a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% shelf.shelfnumber | html %]" class="sharelist">Share list</a>
                                         [% END %]
                                     [% ELSIF category == PRIVATE # not manageshelf and private means shared %]
                                         <form action="/cgi-bin/koha/opac-shelves.pl" method="post" class="form-inline">
                                                         </form>
                                                     [% END %]
                                                     [% IF s.is_private AND s.can_be_managed( loggedinusernumber ) AND Koha.Preference('OpacAllowSharingPrivateLists') %]
-                                                        <a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% s.shelfnumber |html %]" class="">Share</a>
+                                                        <a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% s.shelfnumber |html %]" class="sharelist">Share</a>
                                                     [% END %]
                                                     [% IF s.is_shared_with( loggedinusernumber ) %]
                                                         <form action="opac-shelves.pl" method="post" class="form-inline">
index a6037a9..cea1c3c 100644 (file)
Binary files a/koha-tmpl/opac-tmpl/bootstrap/images/sprite.png and b/koha-tmpl/opac-tmpl/bootstrap/images/sprite.png differ
index 3cbfdb8..88b350a 100644 (file)
@@ -1338,6 +1338,7 @@ a.deleteshelf.disabled,
 a.detail,
 a.download,
 a.editshelf,
+a.sharelist,
 a.empty,
 a.hide,
 a.highlight_toggle,
@@ -1407,6 +1408,12 @@ a.editshelf {
     text-decoration : none;
 }
 
+a.sharelist {
+    background-position : 2px -1148px; /* List share */
+    padding-left : 26px;
+    text-decoration : none;
+}
+
 a.empty {
     background-position : 2px -598px; /* Trash */
     text-decoration : none;
@@ -1505,7 +1512,7 @@ input.hold {
 
 input.editshelf {
     background-color: transparent;
-    background-position : 2px -736px; /* List edit */
+    background-position : 2px -734px; /* List edit */
     border : 0;
     color : #006699;
     cursor : pointer;
@@ -1532,7 +1539,7 @@ input.editshelf {
 
 .deleteshelf {
     background-color: transparent;
-    background-position : 2px -690px; /* Delete */
+    background-position : 2px -687px; /* Delete */
     border : 0;
     color : #006699;
     cursor : pointer;