From 7fd7d7ca445f76b9b0648d25b11ccdf3bc4aaba9 Mon Sep 17 00:00:00 2001
From: Owen Leonard <oleonard@myacpl.org>
Date: Sun, 15 Dec 2019 13:16:20 +0000
Subject: [PATCH] Bug 24247: Button fixes for OPAC lists pages
This patch makes minor markup changes to the OPAC lists page so that
link and form controls are styled consistently.
To test you should have virtualshelves and OpacAllowSharingPrivateLists
enabled.
- Apply the patch and log in to the OPAC.
- Create a new private list.
- When you view the list of your private lists, the "Share" link should
have a Font Awesome icon.
- View the contents of your list. The "Share" link in the list toolbar
should have the same icon. The "New list" link should have a + icon.
Signed-off-by: Michal Denar <black23@gmail.com>
---
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt
index 8ae4401d7b..3140ce9a8e 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt
@@ -189,7 +189,7 @@
<button type="submit" class="btn btn-link remove deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"><i class="fa fa-fw fa-remove"></i> Delete list</button>
</form>
[% IF category == PRIVATE && Koha.Preference('OpacAllowSharingPrivateLists') %]
- <a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% shelf.shelfnumber | uri %]" class="btn btn-link sharelist"><i class="fa fa-fw fa-share"></i> Share list</a>
+ <a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% shelf.shelfnumber | uri %]" class="btn btn-link sharelist"><i class="fa fa-fw fa-share-alt"></i> 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">
@@ -529,22 +529,21 @@
[% ELSE %]
<div id="toolbar" class="toolbar clearfix">
<div class="list-actions">
- <a class="newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form">New list</a> <span class="sep"></span>
+ <a class="btn btn-link newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form"><i class="fa fa-plus"></i> New list</a>
[% IF can_manage_shelf %]
- <span class="sep">|</span>
<form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline">
<input type="hidden" name="op" value="edit_form" />
<input type="hidden" name="referer" value="view" />
<input type="hidden" name="category" value="category" />
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
- <input type="submit" class="editshelf" value="Edit list" />
+ <button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-edit"></i> Edit list</button>
</form>
<form method="post" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline">
<input type="hidden" name="op" value="delete" />
<input type="hidden" name="shelfnumber" value="[% shelfnumber | html %]"/>
<input type="hidden" name="category" value="category" />
- <input type="submit" class="deleteshelf" value="Delete list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"/>
+ <button type="submit" class="btn btn-link deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"><i class="fa fa-fw fa-remove"></i> Delete list</button>
</form>
[% END %]
</div> <!-- / .list-actions -->
@@ -733,7 +732,7 @@
</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 | uri %]" class="sharelist">Share</a>
+ <a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% s.shelfnumber | uri %]" class="btn btn-link sharelist"><i class="fa fa-fw fa-share-alt"></i> Share</a>
[% END %]
[% IF s.is_shared_with( loggedinusernumber ) %]
<form action="opac-shelves.pl" method="post" class="form-inline">
@@ -741,7 +740,7 @@
<input type="hidden" name="referer" value="list" />
<input type='hidden' name='category' value='[% category | html %]' />
<input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
- <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_REMOVE_SHARE);" value="Remove share" />
+ <button type="submit" class="btn btn-link deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_REMOVE_SHARE);"><i class="fa fa-fw fa-remove"></i> Remove share</button>
</form>
[% END %]
</td>
--
2.11.0