Bug 12561: Remove HighlightOwnItemsOnOPAC and HighlightOwnItemsOnOPACWhich
This is the only remaining non-XSLT only feature. We should remove the non-XSLT views that have been deprecated for a while now, and remove this feature. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
395678474b
commit
24103412bc
9 changed files with 10 additions and 99 deletions
|
@ -275,7 +275,6 @@ sub _shared_preferences {
|
|||
COinSinOPACResults
|
||||
DisplayOPACiconsXSLT
|
||||
hidelostitems
|
||||
HighlightOwnItemsOnOPAC
|
||||
OpacAddMastheadLibraryPulldown
|
||||
OPACDisplay856uAsImage
|
||||
OpacHighlightedWords
|
||||
|
|
7
installer/data/mysql/atomicupdate/bug_12561.perl
Normal file
7
installer/data/mysql/atomicupdate/bug_12561.perl
Normal file
|
@ -0,0 +1,7 @@
|
|||
$DBversion = 'XXX'; # will be replaced by the RM
|
||||
if( CheckVersion( $DBversion ) ) {
|
||||
|
||||
$dbh->do( q{ DELETE FROM systempreferences WHERE variable IN ('HighlightOwnItemsOnOPAC', 'HighlightOwnItemsOnOPACWhich')} );
|
||||
|
||||
NewVersion( $DBversion, 12561, "Remove system preferences HighlightOwnItemsOnOPAC and HighlightOwnItemsOnOPACWhich");
|
||||
}
|
|
@ -234,8 +234,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
|
|||
('hidelostitems','0','','If ON, disables display of\"lost\" items in OPAC.','YesNo'),
|
||||
('HidePatronName','0','','If this is switched on, patron\'s cardnumber will be shown instead of their name on the holds and catalog screens','YesNo'),
|
||||
('hide_marc','0',NULL,'If ON, disables display of MARC fields, subfield codes & indicators (still shows data)','YesNo'),
|
||||
('HighlightOwnItemsOnOPAC','0','','If on, and a patron is logged into the OPAC, items from their home library will be emphasized and shown first in search results and item details.','YesNo'),
|
||||
('HighlightOwnItemsOnOPACWhich','PatronBranch','PatronBranch|OpacURLBranch','Decides which branch\'s items to emphasize. If PatronBranch, emphasize the logged in user\'s library\'s items. If OpacURLBranch, highlight the items of the Apache var BRANCHCODE defined in Koha\'s Apache configuration file.','Choice'),
|
||||
('HoldFeeMode','not_always','any_time_is_placed|not_always|any_time_is_collected','Set the hold fee mode','Choice'),
|
||||
('HoldsAutoFill','0',NULL,'If on, librarian will not be asked if hold should be filled, it will be filled automatically','YesNo'),
|
||||
('HoldsAutoFillPrintSlip','0',NULL,'If on, hold slip print dialog will be displayed automatically','YesNo'),
|
||||
|
|
|
@ -42,17 +42,6 @@ OPAC:
|
|||
0: Disable
|
||||
- "Koha OPAC as public. Private OPAC requires authentication before accessing the OPAC. "
|
||||
- 'Note: This does not affect the public API, see the <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=RESTPublicAnonymousRequests">RESTPublicAnonymousRequests</a> to control the API.'
|
||||
-
|
||||
- pref: HighlightOwnItemsOnOPAC
|
||||
choices:
|
||||
1: Emphasize
|
||||
0: "Don't emphasize"
|
||||
- "results from the "
|
||||
- pref: HighlightOwnItemsOnOPACWhich
|
||||
choices:
|
||||
PatronBranch: "patron's home library"
|
||||
OpacURLBranch: "OPAC's library via the URL"
|
||||
- " by moving the results to the front and increasing the size or highlighting the rows for those results (non-XSLT only)."
|
||||
-
|
||||
- "Show star-ratings on"
|
||||
- pref: OpacStarRatings
|
||||
|
|
|
@ -107,11 +107,7 @@
|
|||
[% END %]
|
||||
|
||||
[% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled || IntranetCoce || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
|
||||
[% IF ( XSLTDetailsDisplay ) %]
|
||||
<div id="catalogue_detail_biblio" class="col-xs-9">
|
||||
[% ELSE %]
|
||||
<div id="catalogue_detail_biblio" class="col-xs-9">
|
||||
[% END %]
|
||||
<div id="catalogue_detail_biblio" class="col-xs-9">
|
||||
[% ELSE %]
|
||||
<div id="catalogue_detail_biblio" class="col-xs-12">
|
||||
[% END %]
|
||||
|
|
|
@ -1269,11 +1269,7 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
[% FOREACH ITEM_RESULT IN items %]
|
||||
[% IF ITEM_RESULT.this_branch %]
|
||||
<tr class="highlight-row-detail" vocab="http://schema.org/" typeof="Offer">
|
||||
[% ELSE %]
|
||||
<tr vocab="http://schema.org/" typeof="Offer">
|
||||
[% END %]
|
||||
<tr vocab="http://schema.org/" typeof="Offer">
|
||||
|
||||
[% IF Koha.Preference('OPACLocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %]
|
||||
<td class="cover">
|
||||
|
|
|
@ -503,12 +503,7 @@
|
|||
[% IF ( SEARCH_RESULT.available_items_loop.size() ) %]
|
||||
<span class="available"><strong>Items available:</strong>
|
||||
[% FOREACH available_items_loo IN SEARCH_RESULT.available_items_loop %]
|
||||
[% IF available_items_loo.this_branch %]
|
||||
<span class="highlight-row-results">
|
||||
[% ELSE %]
|
||||
<span>
|
||||
[% END %]
|
||||
|
||||
<span>
|
||||
[% IF ( singleBranchMode ) %]
|
||||
<span class="shelvingloc">[% available_items_loo.location | html %]</span>
|
||||
[% ELSE %]
|
||||
|
|
|
@ -578,40 +578,6 @@ if ($hideitems) {
|
|||
@items = @all_items;
|
||||
}
|
||||
|
||||
my $branch = '';
|
||||
if (C4::Context->userenv){
|
||||
$branch = C4::Context->userenv->{branch};
|
||||
}
|
||||
if ( C4::Context->preference('HighlightOwnItemsOnOPAC') ) {
|
||||
if (
|
||||
( ( C4::Context->preference('HighlightOwnItemsOnOPACWhich') eq 'PatronBranch' ) && $branch )
|
||||
||
|
||||
C4::Context->preference('HighlightOwnItemsOnOPACWhich') eq 'OpacURLBranch'
|
||||
) {
|
||||
my $branchcode;
|
||||
if ( C4::Context->preference('HighlightOwnItemsOnOPACWhich') eq 'PatronBranch' ) {
|
||||
$branchcode = $branch;
|
||||
}
|
||||
elsif ( C4::Context->preference('HighlightOwnItemsOnOPACWhich') eq 'OpacURLBranch' ) {
|
||||
$branchcode = $ENV{'BRANCHCODE'};
|
||||
}
|
||||
|
||||
my @our_items;
|
||||
my @other_items;
|
||||
|
||||
foreach my $item ( @items ) {
|
||||
if ( $item->{branchcode} eq $branchcode ) {
|
||||
$item->{'this_branch'} = 1;
|
||||
push( @our_items, $item );
|
||||
} else {
|
||||
push( @other_items, $item );
|
||||
}
|
||||
}
|
||||
|
||||
@items = ( @our_items, @other_items );
|
||||
}
|
||||
}
|
||||
|
||||
my $dat = &GetBiblioData($biblionumber);
|
||||
my $HideMARC = $record_processor->filters->[0]->should_hide_marc(
|
||||
{
|
||||
|
|
|
@ -833,41 +833,6 @@ for (my $i=0;$i<@servers;$i++) {
|
|||
}
|
||||
$template->param(results_per_page => $results_per_page);
|
||||
my $hide = ($hidingrules) ? 1 : 0;
|
||||
my $branch = '';
|
||||
if (C4::Context->userenv){
|
||||
$branch = C4::Context->userenv->{branch};
|
||||
}
|
||||
if ( C4::Context->preference('HighlightOwnItemsOnOPAC') ) {
|
||||
if (
|
||||
( ( C4::Context->preference('HighlightOwnItemsOnOPACWhich') eq 'PatronBranch' ) && $branch )
|
||||
||
|
||||
C4::Context->preference('HighlightOwnItemsOnOPACWhich') eq 'OpacURLBranch'
|
||||
) {
|
||||
my $branchcode;
|
||||
if ( C4::Context->preference('HighlightOwnItemsOnOPACWhich') eq 'PatronBranch' ) {
|
||||
$branchcode = $branch;
|
||||
}
|
||||
elsif ( C4::Context->preference('HighlightOwnItemsOnOPACWhich') eq 'OpacURLBranch' ) {
|
||||
$branchcode = $ENV{'BRANCHCODE'};
|
||||
}
|
||||
|
||||
foreach my $res ( @newresults ) {
|
||||
my @new_loop;
|
||||
my @top_loop;
|
||||
my @old_loop = @{$res->{'available_items_loop'}};
|
||||
foreach my $item ( @old_loop ) {
|
||||
if ( $item->{'branchcode'} eq $branchcode ) {
|
||||
$item->{'this_branch'} = 1;
|
||||
push( @top_loop, $item );
|
||||
} else {
|
||||
push( @new_loop, $item );
|
||||
}
|
||||
}
|
||||
my @complete_loop = ( @top_loop, @new_loop );
|
||||
$res->{'available_items_loop'} = \@complete_loop;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$template->param(
|
||||
SEARCH_RESULTS => \@newresults,
|
||||
|
|
Loading…
Reference in a new issue