Bugzilla – Attachment 62692 Details for
Bug 18472
Add system preferences to manage online help system
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18472: Some architectural changes...
Bug-18472-Some-architectural-changes.patch (text/plain), 9.13 KB, created by
Marc Véron
on 2017-04-25 16:45:25 UTC
(
hide
)
Description:
Bug 18472: Some architectural changes...
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2017-04-25 16:45:25 UTC
Size:
9.13 KB
patch
obsolete
>From 44e31c6ec8a5e20008801d369ab2aeb11ef81883 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Mon, 24 Apr 2017 22:01:42 +0200 >Subject: [PATCH] Bug 18472: Some architectural changes... > >--- > ...18472-Add_system_preference_CustomOnlineHelpStaff.perl | 5 +++-- > installer/data/mysql/sysprefs.sql | 3 ++- > koha-tmpl/intranet-tmpl/prog/en/includes/header.inc | 8 +++++--- > koha-tmpl/intranet-tmpl/prog/en/includes/help-bottom.inc | 8 ++++---- > .../prog/en/modules/admin/preferences/admin.pref | 15 +++++++++++++++ > .../prog/en/modules/admin/preferences/staff_client.pref | 7 ------- > koha-tmpl/intranet-tmpl/prog/en/modules/help/mainpage.tt | 3 ++- > 7 files changed, 31 insertions(+), 18 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_18472-Add_system_preference_CustomOnlineHelpStaff.perl b/installer/data/mysql/atomicupdate/bug_18472-Add_system_preference_CustomOnlineHelpStaff.perl >index 0f0d803..ce31d2d 100644 >--- a/installer/data/mysql/atomicupdate/bug_18472-Add_system_preference_CustomOnlineHelpStaff.perl >+++ b/installer/data/mysql/atomicupdate/bug_18472-Add_system_preference_CustomOnlineHelpStaff.perl >@@ -1,7 +1,8 @@ > $DBversion = 'XXX'; # will be replaced by the RM > if( CheckVersion( $DBversion ) ) { > # you can use $dbh here like: >- $dbh->do("INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('CustomOnlineHelpStaff', 'filebased', 'none|filebased', 'Select custom online help system for staff client.', 'Choice')" ); >+ $dbh->do("INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('HelpSystem', 'filebased', 'filebased', 'Select online help system.', 'multiple')" ); >+ $dbh->do("INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('EnableEditingFilebasedHelp', '1', '', 'Enable editing of file based Koha help.', 'yesno')" ); > > # or perform some test and warn > # if( !column_exists( 'biblio', 'biblionumber' ) ) { >@@ -10,5 +11,5 @@ if( CheckVersion( $DBversion ) ) { > > # Always end with this (adjust the bug info) > SetVersion( $DBversion ); >- print "Upgrade to $DBversion done (Bug XXXXX - description)\n"; >+ print "Upgrade to $DBversion done (Bug 18472 - Add system preference CustomOnlineHelpStaff to hide / select custom online help system)\n"; > } >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index ef65580..be140f5 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -114,7 +114,8 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('CronjobLog','0',NULL,'If ON, log information from cron jobs.','YesNo'), > ('CumulativeRestrictionPeriods',0,NULL,'Cumulate the restriction periods instead of keeping the highest','YesNo'), > ('CurrencyFormat','US','US|FR|CH','Determines the display format of currencies. eg: \'36000\' is displayed as \'360 000,00\' in \'FR\' or \'360,000.00\' in \'US\'.','Choice'), >-('CustomOnlineHelpStaff', 'filebased', 'none|filebased', 'Select custom online help system for staff client.', 'Choice'), >+('HelpSystem', 'filebased', 'filebased', 'Select online help system.', 'multiple'), >+("INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('EnableEditingFilebasedHelp', '1', '', 'Enable editing of file based Koha help.', 'yesno')" ), > ('dateformat','us','metric|us|iso|dmydot','Define global date format (us mm/dd/yyyy, metric dd/mm/yyy, ISO yyyy-mm-dd, dmydot dd.mm.yyyy)','Choice'), > ('DebugLevel','2','0|1|2','Define the level of debugging information sent to the browser when errors are encountered (set to 0 in production). 0=none, 1=some, 2=most','Choice'), > ('decreaseLoanHighHolds',NULL,'','Decreases the loan period for items with number of holds above the threshold specified in decreaseLoanHighHoldsValue','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >index 2c88c6c..48a1cb6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >@@ -97,9 +97,11 @@ > </li> > </ul> > </li> >- <li> >- <a class="toplinks" href="/cgi-bin/koha/help.pl" id="helper">Help</a> >- </li> >+ [% IF Koha.Preference('HelpSystem') == 'filebased' %] >+ <li> >+ <a class="toplinks" href="/cgi-bin/koha/help.pl" id="helper">Help</a> >+ </li> >+ [% END %] > [% ELSE %] > <li class="loggedout"> > <span> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/help-bottom.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/help-bottom.inc >index 7424b80..0ed2086 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/help-bottom.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/help-bottom.inc >@@ -1,8 +1,8 @@ > <form action="/cgi-bin/koha/edithelp.pl" method="post"> >- <fieldset class="action"><input type="button" class="close" value="Close help window" /> >- <input type="hidden" name="type" value="modify" /> >- <input type="hidden" name="referer" value="[% referer %]" /> >- [% IF Koha.Preference('CustomOnlineHelpStaff') == 'filebased' %] >+ <fieldset class="action"><input type="button" class="close" value="Close help window" /> >+ [% IF (Koha.Preference('HelpSystem') == 'filebased') && (Koha.Preference('EnableEditingFilebasedHelp') ) %] >+ <input type="hidden" name="type" value="modify" /> >+ <input type="hidden" name="referer" value="[% referer %]" /> > <input type="submit" class="submit" value="Edit help" /></fieldset> > [% END %] > </form> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >index ab8cfa5..c0c4526 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >@@ -413,3 +413,18 @@ Administration: > choices: > Zebra: Zebra > Elasticsearch: Elasticsearch >+ Help system: >+ - >+ - "Select online help system: " >+ - pref: HelpSystem >+ default: filebased >+ multiple: >+ filebased: "File based (staff client)" >+ - >+ - "Enable editing of file based Koha help: " >+ - pref: EnableEditingFilebasedHelp >+ default: 1 >+ choices: >+ yes: "Yes" >+ no: "No" >+ - "Used together with 'File based (staff client)' selection in preference 'HelpSystem' >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref >index f1c0bb1..e7da2e8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref >@@ -150,13 +150,6 @@ Staff Client: > no: "Don't enable" > - audio alerts for events defined in the audio alerts section of administration. > - >- - "Custom online help system for staff client: " >- - pref: CustomOnlineHelpStaff >- default: filebased >- choices: >- none: "None" >- filebased: "File based" >- - > - pref: IntranetCatalogSearchPulldown > choices: > yes: Show >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/mainpage.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/mainpage.tt >index 840c138..86ab4b7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/mainpage.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/mainpage.tt >@@ -18,7 +18,7 @@ > <li><a href="http://koha-community.org/get-involved/irc/">Chat with Koha users and developers</a></li> > </ul> > >-[% IF Koha.Preference('CustomOnlineHelpStaff') == 'filebased' %] >+[% IF ( Koha.Preference('HelpSystem') == 'filebased' ) %] > <h2>Can I edit the online help?</h2> > > <p>You can edit the online help through the Koha Staff Client by clicking the "Edit Help" button. This feature has been designed so that library workflow and policies can be documented within Koha.</p> >@@ -26,6 +26,7 @@ > <p><strong>IMPORTANT:</strong> Your online help will be overwritten by the new Help when there is an upgrade. If you want to keep a copy of your online help, you should instruct your System Administrator to upgrade the Online Help directory in the Koha file tree.</p> > > <p>The online help directory is: <pre>[% themelang %]/modules/help</pre></p> >+ <p><strong>Note:</strong> Files in help directory must be writeable to make this feature work. Additionally, system preference 'EnableEditingFilebasedHelp' must be set to 'Yes'.</p> > [% END %] > > <p><strong>See the full documentation for Koha in the <a href="http://manual.koha-community.org/[% helpVersion %]/en/">manual</a> (online).</strong></p> >-- >2.1.4
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 18472
:
62525
|
62556
|
62647
|
62692
|
62693
|
62717
|
62864
|
62866
|
62896
|
62897
|
62950
|
66851
|
68744