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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b8a664fe7d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
550f3e2999
commit
9071cbc252
|
|
@ -90,11 +90,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">
|
||||
|
|
@ -112,22 +114,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 %]
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue