From 8bf782c75f21aaad878643c1ce63724f679cace1 Mon Sep 17 00:00:00 2001 From: Martin Persson Date: Thu, 21 May 2015 17:32:12 +0200 Subject: [PATCH] [Signed-off] Bug 14247: Add system preference for news display MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds a new system preference named 'NewsAuthorDisplay' under the 'Tools' category. This allows global control of whether the name and title of the user authoring a news posting is shown in the OPAC, staff interface, both or none. Depends on patch for bug 14246. Sponsored-by: Halland County Library Preference appears and behaves as expected. Signed-off-by: Marc VĂ©ron --- installer/data/mysql/atomicupdate/add_news_prefs.pl | 11 +++++++++++ .../prog/en/modules/admin/preferences/tools.pref | 10 ++++++++++ 2 files changed, 21 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/add_news_prefs.pl diff --git a/installer/data/mysql/atomicupdate/add_news_prefs.pl b/installer/data/mysql/atomicupdate/add_news_prefs.pl new file mode 100644 index 0000000..b6abe51 --- /dev/null +++ b/installer/data/mysql/atomicupdate/add_news_prefs.pl @@ -0,0 +1,11 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use C4::Context; + +my $dbh = C4::Context->dbh; +$dbh->do("INSERT IGNORE INTO systempreferences (variable,type,options,value,explanation) VALUES('NewsAuthorDisplay','Choice','none|opac|staff|both','none','Display the author name for news items.')"); + +print "Upgrade done (Adding author display options for news into systempreferences).\n" diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/tools.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/tools.pref index 636a9f6..5a3ddce 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/tools.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/tools.pref @@ -11,3 +11,13 @@ Tools: - pref: ImageLimit class: Integer - images. + News: + - + - "Show the author for news items:" + - pref: NewsAuthorDisplay + choices: + none: "Not at all" + opac: "OPAC only" + staff: "Staff client only" + both: "Both OPAC and staff client" + - -- 1.7.10.4