Bugzilla – Attachment 102302 Details for
Bug 25033
Counts of suggestions are confusing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25033: Move branchfilter to top of page
Bug-25033-Move-branchfilter-to-top-of-page.patch (text/plain), 3.71 KB, created by
Owen Leonard
on 2020-04-02 15:28:27 UTC
(
hide
)
Description:
Bug 25033: Move branchfilter to top of page
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2020-04-02 15:28:27 UTC
Size:
3.71 KB
patch
obsolete
>From 5ded5413e459d3b80b11644318e2a2f92f3c5223 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 1 Apr 2020 13:39:13 +0000 >Subject: [PATCH] Bug 25033: Move branchfilter to top of page > >There is confusion becase it is not obvious when the suggestions page is being limited to a branch > >Moving the branch filter to the top of the page makes it easier to see > >To test: >1 - Apply patch >2 - From mainpage or acqui-home note the link to suggestions takes you to suggestions limited to current branch >3 - Change the dropdown >4 - Note the page refreshes and loads the correct suggestions > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > .../prog/en/modules/suggestion/suggestion.tt | 26 ++++++++++++++-------- > 1 file changed, 17 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >index a430fd5d04..3f45645010 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -495,6 +495,16 @@ > > <h1>Suggestions management</h1> > >+<label for="branchcode">Viewing suggestions for library:</label> >+<select name="branchcode" id="branchcode"> >+ <option value="">Any</option> >+ [% IF branchfilter %] >+ [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %] >+ [% ELSE %] >+ [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %] >+ [% END %] >+</select> >+ > > [% FOR m IN messages %] > <div class="dialog [% m.type | html %]"> >@@ -734,6 +744,7 @@ > <aside> > > <form name="suggestionfilter" action="suggestion.pl" method="get"> >+ <input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> > <fieldset class="brief"><ol style="display:block;"><li><label for="displayby">Organize by: </label> > <select name="displayby" id="displayby" style="width:auto;"> > [% IF ( displayby == "STATUS" ) %] >@@ -863,15 +874,6 @@ > [% FOREACH budgetsloo IN budgetsloop %] > [% IF ( budgetsloo.selected ) %]<option value="[% budgetsloo.budget_id | html %]" selected="selected">[% budgetsloo.budget_name | html %]</option>[% ELSE %]<option value="[% budgetsloo.budget_id | html %]">[% budgetsloo.budget_name | html %]</option>[% END %] > [% END %] >- </select></li> >- <li><label for="branchcode">Library:</label> >- <select name="branchcode" id="branchcode"> >- <option value="__ANY__">Any</option> >- [% IF branchfilter %] >- [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %] >- [% ELSE %] >- [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %] >- [% END %] > </select></li><li><input type="submit" value="Go" /></li></ol> > </fieldset> > </form> >@@ -975,6 +977,12 @@ > [% END %] > [% END %] > >+ $("#branchcode").on('change',function(){ >+ let branchcode = $(this).val(); >+ if( branchcode == '' ){ branchcode = "__ANY__" } >+ $('input[name="branchcode"]').val( branchcode ); >+ $('form[name="suggestionfilter"]').submit(); >+ }); > $(".checkall").click(function(e){ > e.preventDefault(); > $(this).parents('form').checkCheckboxes(); >-- >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 25033
:
102225
|
102226
|
102227
|
102228
|
102282
|
102283
|
102284
|
102285
|
102299
|
102300
|
102301
|
102302
|
102922
|
104091
|
104092
|
104093
|
104160
|
104161
|
104162
|
104357
|
104940
|
107831
|
108948
|
108949
|
108950
|
108951
|
108952
|
108953
|
108954
|
108984