MT4491 : limitation by library group
- the group list was not displayed in OPAC (even if everything else was here
- the group limit was not working due to a missing ()
author=jean et group=droit" resulted in:
author=jean and branch=b1 or branch=b2 or branch=b3
that is wrong (executed from left to right)
the fix add () to have :
author=jean and (branch=b1 or branch=b2 or branch=b3)
that is OK
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
@limits = split("\0",$params->{'limit'}) if $params->{'limit'};
if($params->{'multibranchlimit'}) {
-push @limits, join(" or ", map { "branch: $_ "} @{GetBranchesInCategory($params->{'multibranchlimit'})}) ;
+ push @limits, '('.join( " or ", map { "branch: $_ " } @{ GetBranchesInCategory( $params->{'multibranchlimit'} ) } ).')';
}
my $available;
<!--/TMPL_IF-->
<!-- /TMPL_LOOP -->
</select>
-
+ <!-- TMPL_IF NAME="searchdomainloop" -->
+ <p>OR</p> <!-- should addjs to grey out group pulldown if a library is selected. -->
+ <label for="categoryloop">Groups of Libraries</label><select name="multibranchlimit" id="categoryloop">
+ <option value=""> -- none -- </option>
+ <!-- TMPL_LOOP NAME="searchdomainloop" -->
+ <option value="<!-- TMPL_VAR NAME="categorycode" -->"><!-- TMPL_VAR NAME="categoryname" --></option>
+ <!-- /TMPL_LOOP -->
+ </select>
+ <!-- /TMPL_IF -->
<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>
<!-- /TMPL_UNLESS -->
@limits = split("\0",$params->{'limit'}) if $params->{'limit'};
if($params->{'multibranchlimit'}) {
-push @limits, join(" or ", map { "branch: $_ "} @{GetBranchesInCategory($params->{'multibranchlimit'})}) ;
+ push @limits, '('.join( " or ", map { "branch: $_ " } @{ GetBranchesInCategory( $params->{'multibranchlimit'} ) } ).')';
}
my $available;