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

(-)a/C4/UsageStats.pm (-1 / +1 lines)
Lines 261-267 sub BuildReport { Link Here
261
        opacuserlogin
261
        opacuserlogin
262
        QuoteOfTheDay
262
        QuoteOfTheDay
263
        RequestOnOpac
263
        RequestOnOpac
264
        reviewson
264
        OPACComments
265
        ShowReviewer
265
        ShowReviewer
266
        ShowReviewerPhoto
266
        ShowReviewerPhoto
267
        SocialNetworks
267
        SocialNetworks
(-)a/installer/data/mysql/atomicupdate/bug_27487-add_syspref.perl (+5 lines)
Line 0 Link Here
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{UPDATE systempreferences SET variable="OPACComments" WHERE variable="reviewson" });
4
    NewVersion( $DBversion, 27847, "Rename 'reviewson' to 'OPACComments");
5
}
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 / +1 lines)
Lines 570-576 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
570
('ReturnBeforeExpiry','0',NULL,'If ON, checkout will be prevented if returndate is after patron card expiry','YesNo'),
570
('ReturnBeforeExpiry','0',NULL,'If ON, checkout will be prevented if returndate is after patron card expiry','YesNo'),
571
('ReturnLog','1',NULL,'If ON, enables the circulation (returns) log','YesNo'),
571
('ReturnLog','1',NULL,'If ON, enables the circulation (returns) log','YesNo'),
572
('ReturnpathDefault','',NULL,'Use this email address as return path or bounce address for undeliverable emails','Free'),
572
('ReturnpathDefault','',NULL,'Use this email address as return path or bounce address for undeliverable emails','Free'),
573
('reviewson','1','','If ON, enables patron reviews of bibliographic records in the OPAC','YesNo'),
573
('OPACComments','1','','If ON, enables patron reviews of bibliographic records in the OPAC','YesNo'),
574
('RisExportAdditionalFields',  '', NULL ,  'Define additional RIS tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.',  'textarea'),
574
('RisExportAdditionalFields',  '', NULL ,  'Define additional RIS tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.',  'textarea'),
575
('RoundFinesAtPayment','0', NULL,'If enabled any fines with fractions of a cent will be rounded to the nearest cent when payments are coll    ected. e.g. 1.004 will be paid off by a 1.00 payment','YesNo'),
575
('RoundFinesAtPayment','0', NULL,'If enabled any fines with fractions of a cent will be rounded to the nearest cent when payments are coll    ected. e.g. 1.004 will be paid off by a 1.00 payment','YesNo'),
576
('RoutingListAddReserves','0','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'),
576
('RoutingListAddReserves','0','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-1 / +1 lines)
Lines 445-451 OPAC: Link Here
445
                  no: "Don't allow"
445
                  no: "Don't allow"
446
            - patrons to make purchase suggestions on the OPAC.
446
            - patrons to make purchase suggestions on the OPAC.
447
        -
447
        -
448
            - pref: reviewson
448
            - pref: OPACComments
449
              choices:
449
              choices:
450
                  yes: Allow
450
                  yes: Allow
451
                  no: "Don't allow"
451
                  no: "Don't allow"
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc (-1 / +1 lines)
Lines 310-316 Link Here
310
                            <a href="/cgi-bin/koha/opac-authorities-home.pl">Authority search</a>
310
                            <a href="/cgi-bin/koha/opac-authorities-home.pl">Authority search</a>
311
                        </li>
311
                        </li>
312
                    [% END %]
312
                    [% END %]
313
                    [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'reviewson' ) == 1 ) && ( Koha.Preference( 'OpacShowRecentComments' ) == 1 ) ) %]
313
                    [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACComments' ) == 1 ) && ( Koha.Preference( 'OpacShowRecentComments' ) == 1 ) ) %]
314
                        <li class="nav-item">
314
                        <li class="nav-item">
315
                            <a href="/cgi-bin/koha/opac-showreviews.pl">Recent comments</a>
315
                            <a href="/cgi-bin/koha/opac-showreviews.pl">Recent comments</a>
316
                        </li>
316
                        </li>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-3 / +3 lines)
Lines 561-567 Link Here
561
                            </li>
561
                            </li>
562
                        [% END %]
562
                        [% END %]
563
563
564
                        [% IF Koha.Preference( 'reviewson' ) == 1 %]
564
                        [% IF Koha.Preference( 'OPACComments' ) == 1 %]
565
                            <li id="tab_comments"><a href="#comments">Comments[% ' ( ' _ (reviews.size || 0) _ ' )' | html %]</a></li>
565
                            <li id="tab_comments"><a href="#comments">Comments[% ' ( ' _ (reviews.size || 0) _ ' )' | html %]</a></li>
566
                        [% END %]
566
                        [% END %]
567
567
Lines 881-887 Link Here
881
                        </div>
881
                        </div>
882
                    [% END # / IF LibraryThingForLibrariesID && LibraryThingForLibrariesTabbedView %]
882
                    [% END # / IF LibraryThingForLibrariesID && LibraryThingForLibrariesTabbedView %]
883
883
884
                    [% IF Koha.Preference( 'reviewson' ) == 1 %]
884
                    [% IF Koha.Preference( 'OPACComments' ) == 1 %]
885
                        <div id="comments">
885
                        <div id="comments">
886
                            <div id="newcomment"></div>
886
                            <div id="newcomment"></div>
887
                                [% IF ( reviews ) %]
887
                                [% IF ( reviews ) %]
Lines 954-960 Link Here
954
                                    </div>
954
                                    </div>
955
                                [% END # / IF loggedinusername %]
955
                                [% END # / IF loggedinusername %]
956
                            </div> <!-- / #comments -->
956
                            </div> <!-- / #comments -->
957
                        [% END # / IF reviewson %]
957
                        [% END # / IF OPACComments %]
958
958
959
                        [% IF ( OPACFRBRizeEditions && XISBNS ) %]
959
                        [% IF ( OPACFRBRizeEditions && XISBNS ) %]
960
                            <div id="editions">
960
                            <div id="editions">
(-)a/opac/opac-detail.pl (-1 / +1 lines)
Lines 900-906 my $coins = eval { $biblio->get_coins }; Link Here
900
$template->param( ocoins => $coins );
900
$template->param( ocoins => $coins );
901
901
902
my ( $loggedincommenter, $reviews );
902
my ( $loggedincommenter, $reviews );
903
if ( C4::Context->preference('reviewson') ) {
903
if ( C4::Context->preference('OPACComments') ) {
904
    $reviews = Koha::Reviews->search(
904
    $reviews = Koha::Reviews->search(
905
        {
905
        {
906
            biblionumber => $biblionumber,
906
            biblionumber => $biblionumber,
(-)a/t/db_dependent/UsageStats.t (-2 / +1 lines)
Lines 522-528 sub mocking_systempreferences_to_a_set_value { Link Here
522
        opacuserlogin
522
        opacuserlogin
523
        QuoteOfTheDay
523
        QuoteOfTheDay
524
        RequestOnOpac
524
        RequestOnOpac
525
        reviewson
525
        OPACComments
526
        ShowReviewer
526
        ShowReviewer
527
        ShowReviewerPhoto
527
        ShowReviewerPhoto
528
        SocialNetworks
528
        SocialNetworks
529
- 

Return to bug 27487