Bug 13629: SingleBranchMode removes both library and availability search from advanced search

This patch modifies the OPAC advanced search form so that it is possible
to limit searches to available items even if there is only one library.

To test, apply the patch and go to the advanced search page in the OPAC.

 - With only one library configured: There should be a section labeled
   "Availability" with just the "only available" checkbox.

 - With multiple libraries: The section should be labeled "Location and
   availability" and should have the library dropdown and the
   availability checkbox.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Owen Leonard 2019-04-04 18:27:28 +00:00 committed by Nick Clemens
parent edf173e6ef
commit 7acb5394e1

View file

@ -209,7 +209,20 @@
[%# Following on one line for translatability %] [%# Following on one line for translatability %]
[% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('location').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.grep('location').size > 0 and expanded_options ) ) %] [% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('location').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.grep('location').size > 0 and expanded_options ) ) %]
[% UNLESS ( singleBranchMode ) %] [% IF ( singleBranchMode ) %]
<div class="span3">
<!-- AVAILABILITY LIMITS -->
<div id="location">
<fieldset>
<legend>Availability: </legend>
<div style="margin-top:.4em">
<label for="available-items"><input type="checkbox" id="available-items" name="limit" value="available" /> Only items currently available for loan or reference</label>
</div>
</fieldset>
</div> <!-- / #location -->
<!-- /AVAILABILITY LIMITS -->
</div> <!-- / .span3 -->
[% ELSE %]
<div class="span3"> <div class="span3">
<!-- AVAILABILITY LIMITS --> <!-- AVAILABILITY LIMITS -->
<div id="location"> <div id="location">
@ -243,7 +256,7 @@
</div> <!-- / #location --> </div> <!-- / #location -->
<!-- /AVAILABILITY LIMITS --> <!-- /AVAILABILITY LIMITS -->
</div> <!-- / .span3 --> </div> <!-- / .span3 -->
[% END # / UNLESS singleBranchMode %] [% END # / IF singleBranchMode %]
[% END %] [% END %]
[%# Following on one line for translatability %] [%# Following on one line for translatability %]