From 81a47772f5a336024d84c7e7a04ea25fe64d28da Mon Sep 17 00:00:00 2001 From: Alex Arnaud Date: Wed, 23 Jan 2019 10:20:06 +0100 Subject: [PATCH] Bug 17047: Add a third option for Mana system preference This adds the "No, let me think about it" option. It is the default option. If the Mana system preference is set to "No, let me think about it", the user is warned on the admin home page that he has not decided yet to use or not Mana knowlegde base. --- installer/data/mysql/atomicupdate/mana_02-add_Mana_syspref.sql | 2 +- installer/data/mysql/sysprefs.sql | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt | 8 +++++++- .../prog/en/modules/admin/preferences/web_services.pref | 1 + koha-tmpl/intranet-tmpl/prog/en/modules/admin/share_content.tt | 5 +++++ .../intranet-tmpl/prog/en/modules/serials/subscription-add.tt | 3 +-- 6 files changed, 16 insertions(+), 5 deletions(-) diff --git a/installer/data/mysql/atomicupdate/mana_02-add_Mana_syspref.sql b/installer/data/mysql/atomicupdate/mana_02-add_Mana_syspref.sql index 2a3c273..9373076 100644 --- a/installer/data/mysql/atomicupdate/mana_02-add_Mana_syspref.sql +++ b/installer/data/mysql/atomicupdate/mana_02-add_Mana_syspref.sql @@ -1,2 +1,2 @@ INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES -('Mana','1',NULL,'request to Mana Webservice. Mana centralize common information between other Koha to facilitate the creation of new subscriptions, vendors, report queries etc... You can search, share, import and comment the content of Mana.','YesNo'); +('Mana','2',NULL,'request to Mana Webservice. Mana centralize common information between other Koha to facilitate the creation of new subscriptions, vendors, report queries etc... You can search, share, import and comment the content of Mana.','YesNo'); diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index bc012d3..e67970a 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -275,7 +275,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('LocalHoldsPriorityItemControl', 'holdingbranch', 'holdingbranch|homebranch', 'decides if the feature operates using the item''s home or holding library.', 'Choice'), ('LocalHoldsPriorityPatronControl', 'PickupLibrary', 'HomeLibrary|PickupLibrary', 'decides if the feature operates using the library set as the patron''s home library, or the library set as the pickup library for the given hold.', 'Choice'), ('makePreviousSerialAvailable','0','','make previous serial automatically available when collecting a new serial. Please note that the item-level_itypes syspref must be set to specific item.','YesNo'), -('Mana','1',NULL,'request to Mana Webservice. Mana centralize common information between other Koha to facilitate the creation of new subscriptions, vendors, report queries etc... You can search, share, import and comment the content of Mana.','YesNo'), +('Mana','2',NULL,'request to Mana Webservice. Mana centralize common information between other Koha to facilitate the creation of new subscriptions, vendors, report queries etc... You can search, share, import and comment the content of Mana.','YesNo'), ('ManInvInNoissuesCharge','1',NULL,'MANUAL_INV charges block checkouts (added to noissuescharge).','YesNo'), ('MARCAuthorityControlField008','|| aca||aabn | a|a d',NULL,'Define the contents of MARC21 authority control field 008 position 06-39','Textarea'), ('MarcFieldDocURL', NULL, NULL, 'URL used for MARC field documentation. Following substitutions are available: {MARC} = marc flavour, eg. "MARC21" or "UNIMARC". {FIELD} = field number, eg. "000" or "048". {LANG} = user language, eg. "en" or "fi-FI"', 'free'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt index 2cc41d5..fb44379 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt @@ -22,7 +22,13 @@ here.

- [% END %] + [% END %] + [% IF ( Koha.Preference('Mana') == 2 ) %] +
+

You haven't decided if you want to activate Mana Knowlede Base, please let us know by clicking

+
Here
+
+ [% END %]

Koha administration

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref index f9aa27b..898fafa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref @@ -65,6 +65,7 @@ Web services: choices: yes: Enable no: Disable + 2: No, let me think about it - request to Mana Webservice. Mana centralize commun information between other Koha to facilitate the creation of new subscriptions, vendors, report queries etc... You can search, share, import and comment the content of Mana. The informations shared with Mana KB are shared under the CC-0 license. More infos about CC-0 license on https://creativecommons.org/choose/zero/ - - "Security token used to authenticate on mana:" diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/share_content.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/share_content.tt index 5c4ec62..f99cb2b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/share_content.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/share_content.tt @@ -63,6 +63,11 @@ Well done! You successfully created your Mana KB account. Check your mailbox and [% ELSE %] [% END %] + [% IF Koha.Preference('Mana') == 2 %] + + [% ELSE %] + + [% END %]
Enable Mana allow you to search, import and comment content from Mana server, and, to share your own.
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt index e194a6c..beb8d59 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt @@ -220,7 +220,6 @@ width: 300px; /* not enough for IE7 apparently */ here

[% END %] -
@@ -528,7 +527,7 @@ width: 300px; /* not enough for IE7 apparently */ [% FOREACH field IN dont_export_field_loop %] tags.push("[% field.fieldid | html %]"); [% END %] - var mana_enabled = [% IF (Koha.Preference('Mana') && mana_url) %]1[% ELSE %]0[% END %]; + var mana_enabled = [% IF (Koha.Preference('Mana') == 1 && mana_url) %]1[% ELSE %]0[% END %]; var MSG_LINK_TO_VENDOR = _("If you wish to claim late or missing issues you must link this subscription to a vendor. Click OK to ignore or Cancel to return and enter a vendor"); var MSG_LINK_BIBLIO = _("You must choose or create a bibliographic record"); var MSG_REQUIRED_SUB_LENGTH = _("You must choose a subscription length or an end date."); -- 2.7.4