View | Details | Raw Unified | Return to bug 12561
Collapse All | Expand All

(-)a/C4/UsageStats.pm (-1 lines)
Lines 230-236 sub BuildReport { Link Here
230
        COinSinOPACResults
230
        COinSinOPACResults
231
        DisplayOPACiconsXSLT
231
        DisplayOPACiconsXSLT
232
        hidelostitems
232
        hidelostitems
233
        HighlightOwnItemsOnOPAC
234
        OpacAddMastheadLibraryPulldown
233
        OpacAddMastheadLibraryPulldown
235
        OPACDisplay856uAsImage
234
        OPACDisplay856uAsImage
236
        OpacHighlightedWords
235
        OpacHighlightedWords
(-)a/installer/data/mysql/atomicupdate/bug_12561.perl (+7 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
4
    $dbh->do( q{ DELETE FROM systempreferences WHERE variable IN ('HighlightOwnItemsOnOPAC', 'HighlightOwnItemsOnOPACWhich')} );
5
6
    NewVersion( $DBversion, 12561, "Remove system preferences HighlightOwnItemsOnOPAC and HighlightOwnItemsOnOPACWhich");
7
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-11 lines)
Lines 42-58 OPAC: Link Here
42
                  0: Disable
42
                  0: Disable
43
            - "Koha OPAC as public. Private OPAC requires authentication before accessing the OPAC. "
43
            - "Koha OPAC as public. Private OPAC requires authentication before accessing the OPAC. "
44
            - '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.'
44
            - '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.'
45
        -
46
            - pref: HighlightOwnItemsOnOPAC
47
              choices:
48
                  1: Emphasize
49
                  0: "Don't emphasize"
50
            - "results from the "
51
            - pref: HighlightOwnItemsOnOPACWhich
52
              choices:
53
                  PatronBranch: "patron's home library"
54
                  OpacURLBranch: "OPAC's library via the URL"
55
            - " by moving the results to the front and increasing the size or highlighting the rows for those results (non-XSLT only)."
56
        -
45
        -
57
            - "Show star-ratings on"
46
            - "Show star-ratings on"
58
            - pref: OpacStarRatings
47
            - pref: OpacStarRatings
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-5 / +1 lines)
Lines 107-117 Link Here
107
    [% END %]
107
    [% END %]
108
108
109
    [% IF ( AmazonCoverImages  || LocalCoverImages || AdlibrisEnabled || IntranetCoce || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
109
    [% IF ( AmazonCoverImages  || LocalCoverImages || AdlibrisEnabled || IntranetCoce || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
110
        [% IF ( XSLTDetailsDisplay ) %]
110
        <div id="catalogue_detail_biblio" class="col-xs-9">
111
            <div id="catalogue_detail_biblio" class="col-xs-9">
112
        [% ELSE %]
113
            <div id="catalogue_detail_biblio" class="col-xs-9">
114
        [% END %]
115
    [% ELSE %]
111
    [% ELSE %]
116
        <div id="catalogue_detail_biblio" class="col-xs-12">
112
        <div id="catalogue_detail_biblio" class="col-xs-12">
117
    [% END %]
113
    [% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-5 / +1 lines)
Lines 1263-1273 Link Here
1263
        </thead>
1263
        </thead>
1264
        <tbody>
1264
        <tbody>
1265
            [% FOREACH ITEM_RESULT IN items %]
1265
            [% FOREACH ITEM_RESULT IN items %]
1266
                [% IF ITEM_RESULT.this_branch %]
1266
                <tr vocab="http://schema.org/" typeof="Offer">
1267
                  <tr class="highlight-row-detail" vocab="http://schema.org/" typeof="Offer">
1268
                [% ELSE %]
1269
                  <tr vocab="http://schema.org/" typeof="Offer">
1270
                [% END %]
1271
1267
1272
                [% IF Koha.Preference('OPACLocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %]
1268
                [% IF Koha.Preference('OPACLocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %]
1273
                    <td class="cover">
1269
                    <td class="cover">
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt (-6 / +1 lines)
Lines 501-512 Link Here
501
                                                            [% IF ( SEARCH_RESULT.available_items_loop.size() ) %]
501
                                                            [% IF ( SEARCH_RESULT.available_items_loop.size() ) %]
502
                                                                <span class="available"><strong>Items available:</strong>
502
                                                                <span class="available"><strong>Items available:</strong>
503
                                                                    [% FOREACH available_items_loo IN SEARCH_RESULT.available_items_loop %]
503
                                                                    [% FOREACH available_items_loo IN SEARCH_RESULT.available_items_loop %]
504
                                                                        [% IF available_items_loo.this_branch %]
504
                                                                        <span>
505
                                                                            <span class="highlight-row-results">
506
                                                                        [% ELSE %]
507
                                                                            <span>
508
                                                                        [% END %]
509
510
                                                                        [% IF ( singleBranchMode ) %]
505
                                                                        [% IF ( singleBranchMode ) %]
511
                                                                            <span class="shelvingloc">[% available_items_loo.location | html %]</span>
506
                                                                            <span class="shelvingloc">[% available_items_loo.location | html %]</span>
512
                                                                        [% ELSE %]
507
                                                                        [% ELSE %]
(-)a/opac/opac-detail.pl (-34 lines)
Lines 558-597 if ($hideitems) { Link Here
558
    @items = @all_items;
558
    @items = @all_items;
559
}
559
}
560
560
561
my $branch = '';
562
if (C4::Context->userenv){
563
    $branch = C4::Context->userenv->{branch};
564
}
565
if ( C4::Context->preference('HighlightOwnItemsOnOPAC') ) {
566
    if (
567
        ( ( C4::Context->preference('HighlightOwnItemsOnOPACWhich') eq 'PatronBranch' ) && $branch )
568
        ||
569
        C4::Context->preference('HighlightOwnItemsOnOPACWhich') eq 'OpacURLBranch'
570
    ) {
571
        my $branchcode;
572
        if ( C4::Context->preference('HighlightOwnItemsOnOPACWhich') eq 'PatronBranch' ) {
573
            $branchcode = $branch;
574
        }
575
        elsif (  C4::Context->preference('HighlightOwnItemsOnOPACWhich') eq 'OpacURLBranch' ) {
576
            $branchcode = $ENV{'BRANCHCODE'};
577
        }
578
579
        my @our_items;
580
        my @other_items;
581
582
        foreach my $item ( @items ) {
583
           if ( $item->{branchcode} eq $branchcode ) {
584
               $item->{'this_branch'} = 1;
585
               push( @our_items, $item );
586
           } else {
587
               push( @other_items, $item );
588
           }
589
        }
590
591
        @items = ( @our_items, @other_items );
592
    }
593
}
594
595
my $dat = &GetBiblioData($biblionumber);
561
my $dat = &GetBiblioData($biblionumber);
596
my $HideMARC = $record_processor->filters->[0]->should_hide_marc(
562
my $HideMARC = $record_processor->filters->[0]->should_hide_marc(
597
    {
563
    {
(-)a/opac/opac-search.pl (-35 lines)
Lines 834-874 for (my $i=0;$i<@servers;$i++) { Link Here
834
            }
834
            }
835
            $template->param(results_per_page =>  $results_per_page);
835
            $template->param(results_per_page =>  $results_per_page);
836
            my $hide = ($hidingrules) ? 1 : 0;
836
            my $hide = ($hidingrules) ? 1 : 0;
837
            my $branch = '';
838
            if (C4::Context->userenv){
839
                $branch = C4::Context->userenv->{branch};
840
            }
841
            if ( C4::Context->preference('HighlightOwnItemsOnOPAC') ) {
842
                if (
843
                    ( ( C4::Context->preference('HighlightOwnItemsOnOPACWhich') eq 'PatronBranch' ) && $branch )
844
                    ||
845
                    C4::Context->preference('HighlightOwnItemsOnOPACWhich') eq 'OpacURLBranch'
846
                ) {
847
                    my $branchcode;
848
                    if ( C4::Context->preference('HighlightOwnItemsOnOPACWhich') eq 'PatronBranch' ) {
849
                        $branchcode = $branch;
850
                    }
851
                    elsif (  C4::Context->preference('HighlightOwnItemsOnOPACWhich') eq 'OpacURLBranch' ) {
852
                        $branchcode = $ENV{'BRANCHCODE'};
853
                    }
854
855
                    foreach my $res ( @newresults ) {
856
                        my @new_loop;
857
                        my @top_loop;
858
                        my @old_loop = @{$res->{'available_items_loop'}};
859
                        foreach my $item ( @old_loop ) {
860
                            if ( $item->{'branchcode'} eq $branchcode ) {
861
                                $item->{'this_branch'} = 1;
862
                                push( @top_loop, $item );
863
                            } else {
864
                                push( @new_loop, $item );
865
                            }
866
                        }
867
                        my @complete_loop = ( @top_loop, @new_loop );
868
                        $res->{'available_items_loop'} = \@complete_loop;
869
                    }
870
                }
871
            }
872
837
873
            $template->param(
838
            $template->param(
874
                SEARCH_RESULTS => \@newresults,
839
                SEARCH_RESULTS => \@newresults,
(-)a/t/db_dependent/UsageStats.t (-2 lines)
Lines 491-497 sub mocking_systempreferences_to_a_set_value { Link Here
491
        COinSinOPACResults
491
        COinSinOPACResults
492
        DisplayOPACiconsXSLT
492
        DisplayOPACiconsXSLT
493
        hidelostitems
493
        hidelostitems
494
        HighlightOwnItemsOnOPAC
495
        OpacAddMastheadLibraryPulldown
494
        OpacAddMastheadLibraryPulldown
496
        OPACDisplay856uAsImage
495
        OPACDisplay856uAsImage
497
        OpacHighlightedWords
496
        OpacHighlightedWords
498
- 

Return to bug 12561