@@ -, +, @@ with HTML (add system preference) --- ...4-add_UseWYSIWYGinSystemPreferences_syspref.sql | 1 + installer/data/mysql/sysprefs.sql | 1 + .../prog/en/modules/admin/preferences.tt | 13 ++++++++----- .../en/modules/admin/preferences/circulation.pref | 2 +- .../prog/en/modules/admin/preferences/opac.pref | 22 +++++++++++----------- .../en/modules/admin/preferences/staff_client.pref | 8 +++++++- .../prog/en/modules/admin/systempreferences.tt | 22 +++++++++++++--------- 7 files changed, 42 insertions(+), 27 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_11584-add_UseWYSIWYGinSystemPreferences_syspref.sql --- a/installer/data/mysql/atomicupdate/bug_11584-add_UseWYSIWYGinSystemPreferences_syspref.sql +++ a/installer/data/mysql/atomicupdate/bug_11584-add_UseWYSIWYGinSystemPreferences_syspref.sql @@ -0,0 +1, @@ +INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'); --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -468,6 +468,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('UseKohaPlugins','0','','Enable or disable the ability to use Koha Plugins.','YesNo'), ('UseQueryParser','0',NULL,'If enabled, try to use QueryParser for queries.','YesNo'), ('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'), +('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'), ('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'), ('viewLabeledMARC','0','','Allow display of labeled MARC view of bibiographic records','YesNo'), ('viewMARC','1','','Allow display of MARC view of bibiographic records','YesNo'), --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt @@ -1,3 +1,4 @@ +[% USE Koha %] [% INCLUDE 'doc-head-open.inc' %] Koha › Administration › System preferences [% INCLUDE 'doc-head-close.inc' %] @@ -134,11 +135,13 @@ - [% ELSIF ( CHUNK.type_textarea ) %] - - - [% ELSIF ( CHUNK.type_htmlarea ) %] - + [% ELSIF ( CHUNK.type_textarea ) || ( CHUNK.type_htmlarea )%] + [% IF ( CHUNK.type_htmlarea ) && ( Koha.Preference('UseWYSIWYGinSystemPreferences') ) %] + + [% ELSE %] + + + [% END %] [% ELSIF ( CHUNK.type_languages ) %]
[% FOREACH language IN CHUNK.languages %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -663,7 +663,7 @@ Circulation: - - "Include the following HTML in the Help page of the web-based self checkout system:" - pref: SelfCheckHelpMessage - type: textarea + type: htmlarea class: code - - pref: AutoSelfCheckAllowed --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -203,32 +203,32 @@ OPAC: - - "Show the following HTML in its own column on the main page of the OPAC:" - pref: OpacMainUserBlock - type: textarea + type: htmlarea class: code - - "Show the following HTML on the left hand column of the main page and patron account on the OPAC (generally navigation links):" - pref: OpacNav - type: textarea + type: htmlarea class: code - - "Show the following HTML in the right hand column of the main page under the main login form:" - pref: OpacNavRight - type: textarea + type: htmlarea class: code - - "Show the following HTML on the left hand column of the main page and patron account on the OPAC, after OpacNav, and before patron account links if available:" - pref: OpacNavBottom - type: textarea + type: htmlarea class: code - - "Include the following HTML in the header of all pages in the OPAC:" - pref: opacheader - type: textarea + type: htmlarea class: code - - "Include the following HTML in the footer of all pages in the OPAC:" - pref: opaccredits - type: textarea + type: htmlarea class: code - - 'Include a "More Searches" box on the detail pages of items on the OPAC, with the following HTML (leave blank to disable):' @@ -240,7 +240,7 @@ OPAC: - 'Include a "Links" column on the "my summary" and "my reading history" tabs when a user is logged in to the OPAC, with the following HTML (leave blank to disable):' - '
Note: The placeholders {BIBLIONUMBER}, {TITLE}, {ISBN} and {AUTHOR} will be replaced with information from the displayed record.' - pref: OPACMySummaryHTML - type: textarea + type: htmlarea class: code - - "Note to display on the patron summary page. This note only appears if the patron is logged in:" @@ -249,7 +249,7 @@ OPAC: - - "Include the following HTML under the facets in OPAC search results:" - pref: OPACResultsSidebar - type: textarea + type: htmlarea class: code - - pref: OpacAddMastheadLibraryPulldown @@ -261,7 +261,7 @@ OPAC: - 'Display this HTML when no results are found for a search in the OPAC:' - '
Note: You can insert placeholders {QUERY_KW} that will be replaced with the keywords of the query.' - pref: OPACNoResultsFound - type: textarea + type: htmlarea class: code - - 'Display the URI in the 856u field as an image on: ' @@ -310,7 +310,7 @@ OPAC: - - "Show the following HTML on the OPAC login form when a patron is not logged in:" - pref: NoLoginInstructions - type: textarea + type: htmlarea class: code - - "Replace the search box at the top of OPAC pages with the following HTML:" @@ -667,7 +667,7 @@ OPAC: - - "Display the following additional instructions for patrons who self register via the OPAC ( HTML is allowed ):" - pref: PatronSelfRegistrationAdditionalInstructions - type: textarea + type: htmlarea class: html Advanced Search Options: - --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref @@ -38,7 +38,7 @@ Staff Client: - - "Show the following HTML in its own column on the main page of the staff client:" - pref: IntranetmainUserblock - type: textarea + type: htmlarea class: code - - "Show the following HTML to the left of the More menu at the top of each page on the staff client (should be a list of links or blank):" @@ -128,3 +128,9 @@ Staff Client: yes: Enable no: Disable - item selection in record detail page. + - + - pref: UseWYSIWYGinSystemPreferences + choices: + yes: Show + no: "Don't show" + - WYSIWYG editor when editing certain HTML system preferences. --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tt @@ -1,3 +1,4 @@ +[% USE Koha %] [% INCLUDE 'doc-head-open.inc' %] Koha › Administration › [% IF ( add_form ) %] System preferences › [% IF ( modify ) %]Modify system preference '[% searchfield %]'[% ELSE %]Add a system preference[% END %][% END %][% IF ( add_validate ) %] System preferences › Data added[% END %] [% IF ( delete_confirm ) %] System preferences › [% searchfield %] › Confirm deletion of parameter '[% searchfield %]'[% END %][% IF ( delete_confirmed ) %] System preferences › Parameter deleted[% END %][% IF ( else ) %]System preferences[% END %] @@ -110,10 +111,12 @@ [% ELSIF ( type_upload ) %] - [% ELSIF ( type_htmlarea ) %] - - [% ELSIF ( type_textarea ) %] + [% ELSIF ( type_textarea || type_htmlarea ) %] + [% IF ( type_htmlarea ) && ( Koha.Preference('UseWYSIWYGinSystemPreferences') ) %] + + [% ELSE %] + [% END %] [% ELSIF ( type_choice ) %] [% END %] - [% IF ( loo.type_textarea ) %] - - - [% END %] - [% IF ( loo.type_htmlarea ) %] - + [% IF ( loo.type_textarea ) || ( loo.type_htmlarea ) %] + [% IF ( loo.type_htmlarea ) && ( Koha.Preference('UseWYSIWYGinSystemPreferences') ) %] + + [% ELSE %] + + + [% END %] [% END %] [% IF ( loo.type_choice ) %]