Bugzilla – Attachment 99391 Details for
Bug 24706
Toolbar not rendered correctly when a list is empty
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24706: Fix ergonomic issue on the list view if empty
Bug-24706-Fix-ergonomic-issue-on-the-list-view-if-.patch (text/plain), 6.16 KB, created by
PTFS Europe Sandboxes
on 2020-02-21 16:00:27 UTC
(
hide
)
Description:
Bug 24706: Fix ergonomic issue on the list view if empty
Filename:
MIME Type:
Creator:
PTFS Europe Sandboxes
Created:
2020-02-21 16:00:27 UTC
Size:
6.16 KB
patch
obsolete
>From fd2f686b375f9f66c3e59ff38b3e7ac18119ea54 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >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 <sally.healey@cheshiresharedservices.gov.uk> >--- > .../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 @@ > <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 | html %]' /> >+ <input type='hidden' name='category' value='[% shelf.category | html %]' /> > <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> > <button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o"></i> Edit list</button> > </form> >@@ -184,7 +184,7 @@ > <form method="post" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline"> > <input type="hidden" name="op" value="delete" /> > <input type="hidden" name="referer" value="list" /> >- <input type='hidden' name='category' value='[% category | html %]' /> >+ <input type='hidden' name='category' value='[% shelf.category | html %]' /> > <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> > <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> >@@ -492,22 +492,22 @@ > [% 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-fw 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="category" value="[% shelf.category | html %]" /> > <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-pencil-square-o"></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);"/> >+ <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]"/> >+ <input type="hidden" name="category" value="[% shelf.category | html %]" /> >+ <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> > [% END %] > </div> <!-- / .list-actions --> >@@ -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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24706
:
99387
|
99391
|
99465