Bug 37883: Add ability to filter search results location column by logged in location
To test:
1. Apply patch, restart_all, and regenerate CSS ( https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface ) I also recommend clearing your browser cache.
2. Do a catalog search and notice the 'Show local items only' button above the "Location" column.
3. Click it to show information ( in that column ) that is only related to the branch you are currently logged in at.
4. In the same result set have some items that are checked out, withdrawn, lost, damaged, and notforlaon.
5. Play more with the search results and ensure everything is accurate.
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 580484e2da)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
parent
78f09d87bb
commit
fe97075e4b
|
|
@ -200,6 +200,9 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
|
|||
|
||||
my $lang = C4::Languages::getlanguage($cgi);
|
||||
|
||||
my $userenv_branch = C4::Context->userenv->{'branch'} || '';
|
||||
$template->param( userbranch => $userenv_branch );
|
||||
|
||||
if ( C4::Context->preference("marcflavour") eq "UNIMARC" ) {
|
||||
$template->param( 'UNIMARC' => 1 );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2038,6 +2038,14 @@ li {
|
|||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.all {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.branch_specific {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
#searchresults,
|
||||
|
|
|
|||
|
|
@ -773,12 +773,15 @@
|
|||
[% ELSE %]
|
||||
, <span>None available</span>
|
||||
[% END %]
|
||||
</span>
|
||||
[% ELSE %]
|
||||
[% tnx('{count} item', '{count} items', SEARCH_RESULT.items_count, {count = SEARCH_RESULT.items_count}) | html %][% IF ( SEARCH_RESULT.availablecount ) %]
|
||||
, [% SEARCH_RESULT.availablecount | html %] <span>available:</span>
|
||||
[% ELSE %]
|
||||
, <span>None available</span>
|
||||
</div>
|
||||
[% IF SEARCH_RESULT.branchtotalcount > 0 %]
|
||||
<div class="branch_specific">
|
||||
[% tnx('{count} item', '{count} items', SEARCH_RESULT.branchtotalcount, {count = SEARCH_RESULT.branchtotalcount}) | html %][% IF ( SEARCH_RESULT.branchavailablecount ) %]
|
||||
, [% SEARCH_RESULT.branchavailablecount | html %] <span>available:</span>
|
||||
[% ELSE %]
|
||||
, <span>None available</span>
|
||||
[% END %]
|
||||
</div>
|
||||
[% END %]
|
||||
[% END %]
|
||||
</div>
|
||||
|
|
@ -875,7 +878,7 @@
|
|||
[% END %]
|
||||
</ul>
|
||||
[% ELSE %]
|
||||
<span class="unavailable">No items</span>
|
||||
<span class="unavailable all">No items</span>
|
||||
[% END %]
|
||||
[% END # /IF ( SEARCH_RESULT.items_count ) %]
|
||||
[% IF SEARCH_RESULT.branchtotalcount == 0 && Koha.Preference('FilterSearchResultsByLoggedInBranch') %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue