Bugzilla – Attachment 120729 Details for
Bug 28229
Hide clubs from place a hold screen if no clubs exist
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28229: Only show clubs on request.tt if clubs exist
Bug-28229-Only-show-clubs-on-requesttt-if-clubs-ex.patch (text/plain), 5.15 KB, created by
Katrin Fischer
on 2021-05-09 10:27:11 UTC
(
hide
)
Description:
Bug 28229: Only show clubs on request.tt if clubs exist
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2021-05-09 10:27:11 UTC
Size:
5.15 KB
patch
obsolete
>From 4230f77a180c03738ad988be746b93044dd3882e Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 5 May 2021 21:27:25 +0000 >Subject: [PATCH] Bug 28229: Only show clubs on request.tt if clubs exist > >1. Have no existing clubs >2. Apply patch >3. Go to request.tt and you will not see the club tab or any mention of clubs >4. Create at least 1 club >5. Go back to request.tt and now see the tab for clubs >6. Make sure you can place holds as an individual with and without clubs. >7. Make sure you can place holds for clubs. >8. rejoice and sign-off > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../prog/en/modules/reserve/request.tt | 36 ++++++++++++---------- > reserve/request.pl | 6 +++- > 2 files changed, 25 insertions(+), 17 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index 1a397b07ef..486597371b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -113,11 +113,13 @@ > </div> > [% END %] > <fieldset class="brief"> >- <label>Search patrons or clubs</label> >+ <label>Search patrons[% IF clubcount %] or clubs[% END %]</label> > <div id="circ_holds_select" class="toptabs"> > <ul> > <li><a href="#holds_patronsearch_pane">Patrons</a></li> >+ [% IF clubcount %] > <li><a href="#holds_clubsearch_pane">Clubs</a></li> >+ [% END %] > </ul> > <div id="holds_patronsearch_pane"> > <form id="holds_patronsearch" action="request.pl?biblionumbers=[% biblionumbers | html %]" method="post"> >@@ -135,22 +137,24 @@ > [% INCLUDE 'circ-patron-search-results.inc' destination = "holds" %] > [% END %] > </div> >- <div id="holds_clubsearch_pane"> >- <form id="holds_clubsearch" action="request.pl?biblionumber=[% biblionumber | html %]" method="post"> >- <div class="hint">Enter club ID or partial name:</div> >- <input type="text" size="40" id="club" class="focus" name="findclub" autocomplete="off" /> >- <input type="submit" value="Search" /> >- [% IF multi_hold %] >- <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> >- [% ELSE %] >- <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> >- [% END %] >+ [% IF clubcount %] >+ <div id="holds_clubsearch_pane"> >+ <form id="holds_clubsearch" action="request.pl?biblionumber=[% biblionumber | html %]" method="post"> >+ <div class="hint">Enter club ID or partial name:</div> >+ <input type="text" size="40" id="club" class="focus" name="findclub" autocomplete="off" /> >+ <input type="submit" value="Search" /> >+ [% IF multi_hold %] >+ <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> >+ [% ELSE %] >+ <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> >+ [% END %] > >- </form> <!-- /#holds_patronsearch --> >- [% IF clubs %] >- [% INCLUDE 'clubs-table.inc' destination = "holds" %] >- [% END %] >- </div> >+ </form> <!-- /#holds_patronsearch --> >+ [% IF clubs %] >+ [% INCLUDE 'clubs-table.inc' destination = "holds" %] >+ [% END %] >+ </div> >+ [% END %] > </div> > </fieldset> > [% ELSIF club %] >diff --git a/reserve/request.pl b/reserve/request.pl >index 49d8a2fa26..98ffd64d24 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -168,8 +168,12 @@ if ( $biblionumbers ) { > push @biblionumbers, $input->multi_param('biblionumber'); > } > >+my $clubcount = Koha::Clubs->search->count; > my $multi_hold = @biblionumbers > 1; >-$template->param(multi_hold => $multi_hold); >+$template->param( >+ multi_hold => $multi_hold, >+ clubcount => $clubcount, >+); > > # If we have the borrowernumber because we've performed an action, then we > # don't want to try to place another reserve. >-- >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 28229
:
120573
|
120681
|
120682
|
120715
| 120729 |
120730
|
120762