Bugzilla – Attachment 5692 Details for
Bug 4473
Recent comments view for the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Follow-up fix
0001-Follow-up-fix-for-Bug-4473-Recent-comments-view-for-.patch (text/plain), 5.35 KB, created by
Owen Leonard
on 2011-10-04 14:25:14 UTC
(
hide
)
Description:
Follow-up fix
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2011-10-04 14:25:14 UTC
Size:
5.35 KB
patch
obsolete
>From 048b8aa7d347883865dc91c3a1f4c939bd84c352 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 4 Oct 2011 10:20:52 -0400 >Subject: [PATCH] Follow-up fix for Bug 4473 - Recent comments view for the OPAC >Content-Type: text/plain; charset="utf-8" > >This follow-up adds a system preference which controls display >of a link to recent comments in the OPAC masthead alongside >"Advanced search," "Tag cloud," etc. >--- > 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(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 7211769..3690f5e 100644 >--- a/C4/Auth.pm >+++ b/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"), >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 79d4893..27bef9a 100755 >--- a/installer/data/mysql/sysprefs.sql >+++ b/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'); >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 6b88c29..ebb6cb3 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/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 > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >index 8bbf692..deb7cbb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >+++ b/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 >diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc >index 2510a7f..07268a2 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc >+++ b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc >@@ -112,6 +112,7 @@ > <a href="/cgi-bin/koha/opac-search.pl">Advanced Search</a> > [% IF ( OpacBrowser ) %]<span class="pipe"> | </span><a href="/cgi-bin/koha/opac-browser.pl">Browse by Hierarchy</a>[% END %] > [% IF ( OpacAuthorities ) %]<span class="pipe"> | </span><a href="/cgi-bin/koha/opac-authorities-home.pl">Browse by author or subject</a>[% END %] >+[% IF ( OpacShowRecentComments ) %]<span class="pipe"> | </span><a href="/cgi-bin/koha/opac-showreviews.pl">Recent Comments</a>[% END %] > [% IF ( TagsEnabled ) %]<span class="pipe"> | </span><a href="/cgi-bin/koha/opac-tags.pl">Tag Cloud</a>[% END %] > [% IF ( OpacCloud ) %]<span class="pipe"> | </span><a href="/cgi-bin/koha/opac-tags_subject.pl">Subject Cloud</a>[% END %] > [% IF ( OpacTopissue ) %]<span class="pipe"> | </span><a href="/cgi-bin/koha/opac-topissues.pl">Most Popular</a>[% END %] >-- >1.7.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 4473
:
2606
|
2608
|
2817
|
5692
|
5696