@@ -, +, @@ --- C4/Auth.pm | 1 + installer/data/mysql/sysprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 7 +++++++ .../prog/en/modules/admin/preferences/opac.pref | 7 +++++++ koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc | 1 + 5 files changed, 17 insertions(+), 0 deletions(-) --- a/C4/Auth.pm +++ a/C4/Auth.pm @@ -424,6 +424,7 @@ sub get_template_and_user { OpacHighlightedWords => C4::Context->preference("OpacHighlightedWords"), OPACItemHolds => C4::Context->preference("OPACItemHolds"), OPACShelfBrowser => "". C4::Context->preference("OPACShelfBrowser"), + OpacShowRecentComments => C4::Context->preference("OpacShowRecentComments"), OPACURLOpenInNewWindow => "" . C4::Context->preference("OPACURLOpenInNewWindow"), OPACUserCSS => "". C4::Context->preference("OPACUserCSS"), OPACViewOthersSuggestions => "" . C4::Context->preference("OPACViewOthersSuggestions"), --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -318,3 +318,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('BasketConfirmations', '1', 'When closing or reopening a basket,', 'always ask for confirmation.|do not ask for confirmation.', 'Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('MARCAuthorityControlField008', '|| aca||aabn | a|a d', NULL, NULL, 'Textarea'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpenLibraryCovers',0,'If ON Openlibrary book covers will be show',NULL,'YesNo'); +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo'); --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -4446,6 +4446,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion($DBversion); } +$DBversion = "3.05.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo');"); + print "Upgrade to $DBversion done (Add syspref OpacShowRecentComments. When the preference is turned on a link to recent comments will appear in the OPAC masthead. )\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -86,6 +86,13 @@ OPAC: no: "Don't show" - the name of the patron that has an item checked out on item detail pages on the OPAC. - + - pref: OpacShowRecentComments + default: 0 + choices: + yes: Show + no: "Don't show" + - a link to recent comments in the OPAC masthead. + - - pref: OpacHighlightedWords choices: yes: Highlight --- a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc +++ a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc @@ -112,6 +112,7 @@ Advanced Search [% IF ( OpacBrowser ) %] | Browse by Hierarchy[% END %] [% IF ( OpacAuthorities ) %] | Browse by author or subject[% END %] +[% IF ( OpacShowRecentComments ) %] | Recent Comments[% END %] [% IF ( TagsEnabled ) %] | Tag Cloud[% END %] [% IF ( OpacCloud ) %] | Subject Cloud[% END %] [% IF ( OpacTopissue ) %] | Most Popular[% END %] --