From 625e45cb4fa72e593fb3f76685802c75e9a89925 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 21 Feb 2020 15:43:06 +0100 Subject: [PATCH] Bug 24706: Fix ergonomic issue on the list view if empty If the list is empty, the toolbar does not render correctly. Buttons are displayed instead of links, also the "Sort" is displayed when it should not Test plan: - Create a new list, do not add items - Notice that the toolbar now renders correctly - Use the different link to create/edit/delete - Confirm that the sort link is not displayed - Add a new item - Confirm that the toolbar is looking the same as before Signed-off-by: Sally Signed-off-by: Katrin Fischer --- .../opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 26 ++++++++++++---------- 1 file changed, 14 insertions(+), 12 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 63b9a7128e..dd99fa2788 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt @@ -176,7 +176,7 @@
- +
@@ -184,7 +184,7 @@
- +
@@ -492,22 +492,22 @@ [% ELSE %]
- New list + New list [% IF can_manage_shelf %] |
- + - +
- - - + + +
[% END %]
@@ -956,11 +956,13 @@ $(function() { stickyClass: "floating" }); - sortMenu( $("#sorting-form") ); + [% IF itemsloop %] + sortMenu( $("#sorting-form") ); - $("#sortfield").on("change", function(){ - $('#sorting-form').submit(); - }); + $("#sortfield").on("change", function(){ + $('#sorting-form').submit(); + }); + [% END %] }); // document.ready -- 2.11.0