Browse Source

Bug 22196: Clean up Mana KB administration template

This patch makes language changes to the Mana KB administration
template, and corresponding language changes to the Web Services
preference file.

Some markup errors have been fixed:

 - Correct title and breadcrumbs, copied and pasted from another
   template
 - Add ids to form fields to match their label "for" attributes
 - Make <input>s self-closing
 - Correct class names on alert dialogs
 - Wrap text in JavaScript with _() to make it translatable

Also changed: Some language revisions to the Mana dialogs on the
Administration home page.

To test, apply the patch and go to Administration -> Share content with
Mana KB.

Test the process for enabling and configuring Mana KB. Check that
forms work correctly and that the language of instructions and labels
reads well.

Go to Administration -> System preferences -> Web services, and confirm
that the language changes to the Mana KB preference look good.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
19.05.x
Owen Leonard 5 years ago
committed by Nick Clemens
parent
commit
d0a8d0e55a
  1. 13
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt
  2. 11
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref
  3. 81
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/share_content.tt

13
koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt

@ -15,18 +15,17 @@
<div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
[% IF ( Koha.Preference('Mana') == 1) && !mana_url %]
<div class="dialog message">
<p><center>The Mana Knowledge Base feature is enabled but not configured.</center></p>
<h4>The Mana Knowledge Base feature is enabled but not configured.</h4>
<p>This feature allows you to retrieve and share data (subscription patterns and reports) with other Koha libaries.</p>
<p>
Ask your system administrator to configure this feature, or remove this note by disabling the 'Mana' system preference
<a href=/cgi-bin/koha/admin/share_content.pl>here.</a>
Ask your system administrator to configure this feature, or remove this note by <a href=/cgi-bin/koha/admin/share_content.pl>disabling the 'Mana' system preference</a>.
</p>
</div>
[% END %]
[% IF ( Koha.Preference('Mana') == 2 ) %]
<div class="dialog alert">
<p><center> You haven't decided if you want to activate Mana Knowlede Base, please let us know by clicking<center></p>
<a href=/cgi-bin/koha/admin/share_content.pl><center>Here</center></a>
<div class="dialog message">
<h4>Share content with Mana KB?</h4>
<p> You haven't decided if you want to activate Mana Knowledge Base. <a href=/cgi-bin/koha/admin/share_content.pl>Change your Mana KB settings</a>.</p>
</div>
[% END %]
<h1>Koha administration</h1>
@ -203,7 +202,7 @@
<dd>Share with the Koha community the usage statistics of your Koha installation.</dd>
[% END %]
[% IF ( CAN_user_parameters ) %]
<dt><a href="/cgi-bin/koha/admin/share_content.pl">Using Mana-KB</a></dt>
<dt><a href="/cgi-bin/koha/admin/share_content.pl">Share content with Mana KB</a></dt>
<dd>Share content (subscriptions, reports) with Koha communty</dd>
[% END %]
</dl>

11
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref

@ -73,20 +73,21 @@ Web services:
- pref: ILS-DI:AuthorizedIPs
class: Text
- to use the ILS-DI services (when enabled). Separate the IP addresses with commas and without spaces. Leave the field blank to allow any IP address.
Mana:
Mana KB:
-
- pref: Mana
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/
2: No, let me think about
- submissions to Mana KB. Mana centralizes information between other Koha installations to facilitate the creation of new subscriptions, vendors, reports, etc. You can search, share, import, and comment on the content of Mana. The information shared with Mana KB is shared under the <a href="https://creativecommons.org/choose/zero/">CC-0 license</a>
-
- "Security token used to authenticate on mana:"
- "Security token used to authenticate on Mana KB:"
- pref: ManaToken
class: Text
- Get a security token on the <a href="/cgi-bin/koha/admin/share_content.pl">Mana KB administration page</a>.
-
- 'Fields automatically shared with mana'
- 'Fields automatically shared with Mana KB'
- pref: AutoShareWithMana
multiple:
subscription: Subscriptions

81
koha-tmpl/intranet-tmpl/prog/en/modules/admin/share_content.tt

@ -3,59 +3,59 @@
[% SET footerjs = 1 %]
[% USE Koha %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Administration &rsaquo; Koha usage statistics</title>
<title>Koha &rsaquo; Administration &rsaquo; Share content with Mana KB</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="admin_usage_statistics" class="admin">
<body id="admin_share_content" class="admin">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; Usage statistics</div>
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; Share content with Mana KB</div>
<div class="main container-fluid">
<div class="row">
<div class="col-sm-10 col-sm-push-2">
<div class="col-sm-6">
[% IF result.code != 201 && result.msg %]
<div class="alert alert-danger" role="alert">
<div class="dialog alert" role="alert">
[% result.msg | html %]
</div>
[% END %]
[% IF result.code == 201 %]
<div class="dialog message" role="alert">
Well done! You successfully created your Mana KB account. Check your mailbox and follow instructions.
You successfully created your Mana KB account. Check your mailbox and follow instructions.
</div>
[% END %]
[% UNLESS (mana_url) %]
<div class="alert alert-danger" role="alert">
Mana config is currently empty, this feature will not work. Please contact your site administartor.
<div class="dialog alert" role="alert">
Mana configuration is currently empty. This feature will not work. Please contact your site administartor.
</div>
[% END %]
<h1>Share content with the Koha community using Mana KB</h1>
<p>Mana-kb is a global knowledge base for library-centric data. It has been designed initially to interact with Koha, the Open Source ILS, but can be used by any other software.</p>
<p>Mana KB is a global knowledge base for library-centric data. It has been designed initially to interact with Koha, the Open Source ILS, but can be used by any other software.</p>
<p>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 <a href="https://creativecommons.org/choose/zero/">here</a>.</p>
<p>Mana centralizes information between other Koha installations to facilitate the creation of new subscriptions, vendors, reports, etc. You can search, share, import, and comment on the content of Mana. The information shared with Mana KB is shared under the <a href="https://creativecommons.org/choose/zero/">CC-0 license</a>.
<p>Learn more about Mana on the <a href="https://wiki.koha-community.org/wiki/Mana_central_database">official documentation</a>.</p>
<p>Learn more about Mana KB on the <a href="https://wiki.koha-community.org/wiki/Mana_central_database">official Mana KB documentation</a>.</p>
[% IF (mana_url) %]
<p> Your Mana KB server is currently: <strong>[% mana_url | url %]</strong></p>
<p> Your Mana KB server is currently: <strong>[% mana_url | url %]</strong></p>
[% END %]
<form id="mana_preference" method="post">
<form id="mana_preference" method="post" class="clearfix">
<fieldset class="rows">
<ol>
<li>
<label for="mana">Use Mana KB for sharing content: </label>
<select name="mana">
<select name="mana" id="mana">
[% IF Koha.Preference('Mana') == 0 %]
<option value="0" selected="selected">No</option>
[% ELSE %]
<option value="0"">No</option>
<option value="0">No</option>
[% END %]
[% IF Koha.Preference('Mana') == 1 %]
@ -69,68 +69,69 @@ Well done! You successfully created your Mana KB account. Check your mailbox and
<option value="2">No, let me think about it</option>
[% END %]
</select>
<div class="hint">Enable Mana allow you to search, import and comment content from Mana server, and, to share your own.</div>
<div class="hint">Enable Mana KB in order to search, import, and comment on content from the Mana KB server, and to share your own.</div>
</li>
<li>
<label for="autosharewithmana">Auto subscriptions sharing: </label>
<label for="autosharewithmana">Auto subscription sharing: </label>
[% IF Koha.Preference('AutoShareWithMana').grep('subscription').size == 0 %]
<input type="checkbox" name="autosharewithmana">
<input id="autosharewithmana" type="checkbox" name="autosharewithmana">
[% ELSE %]
<input type="checkbox" name="autosharewithmana" checked="checked">
<input id="autosharewithmana" type="checkbox" name="autosharewithmana" checked="checked">
[% END %]
<div class="hint">If checked, new subscriptions you created yourself will be automatically shared with Mana KB.</div>
</li>
<li>
<input type="hidden" name="op" value="save">
<input type="submit" value="Save">
<div class="hint">If checked, new subscriptions you create will be automatically shared with Mana KB.</div>
</li>
</ol>
<fieldset class="action">
<input type="hidden" name="op" value="save" />
<input type="submit" value="Save" />
</fieldset>
</fieldset>
</form>
[% UNLESS Koha.Preference('ManaToken') %]
<h3>Configure Mana KB</h3>
<p>Once you have enabled Mana, let's start to set it up. Type your first name, last name, email address and click on send. This will send a account creation request to Mana KB that will respond back with a Mana token (a crypted id that uniquely identify your Koha). This token will automatically be saved in your database. Just after that, you will receive an email. Read it and follow the instructions.</p>
<p>Once you have enabled Mana it must be configured. Type your first name, last name, and email address and submit. This will send a account creation request to Mana KB that will respond back with a Mana KB token (an encrypted ID that uniquely identifies your Koha installation). This token will automatically be saved in your database. After that you will receive an email. Read it and follow the instructions.</p>
[% END %]
[% IF Koha.Preference('ManaToken') %]
<form id="mana_token" method="post">
<fieldset class="rows" id="mana_token">
<form id="mana_token" method="post" class="clearfix">
<fieldset class="rows">
<legend>Mana KB token</legend>
<ol>
<li>
<label for="token">Mana token: </label>
<input type="text" name="token" value="[% Koha.Preference('ManaToken') | html %]" size="50" disabled="disabled">
<input type="text" id="token" name="token" value="[% Koha.Preference('ManaToken') | html %]" size="50" disabled="disabled" />
<div class="hint">Your unique security token used for authentication on Mana KB service (anti spam).</div>
</li>
<li>
<input type="hidden" name="op" value="reset">
<input type="submit" value="Reset your token">
</li>
</ol>
<fieldset class="action">
<input type="hidden" name="op" value="reset" />
<input type="submit" value="Reset your token" />
</fieldset>
</fieldset>
</form>
[% ELSE %]
<form id="mana_request" method="post">
<form id="mana_request" method="post" class="clearfix">
<fieldset class="rows" id="mana_subscription">
<ol>
<li>
<label for="firstname">First name: </label>
<input type="text" name="firstname">
<input id="firstname" type="text" name="firstname" />
</li>
<li>
<label for="lastname">Last name: </label>
<input type="text" name="lastname">
<input id="lastname" type="text" name="lastname" />
</li>
<li>
<label for="email">Email: </label>
<input type="text" name="email" size="45" required="required">
</li>
<li>
<input type="hidden" name="op" value="send">
<input type="submit" value="Send to Mana KB">
<input id="email" type="text" name="email" size="45" required="required" />
</li>
</ol>
<fieldset class="action">
<input type="hidden" name="op" value="send" />
<input type="submit" value="Send to Mana KB" />
</fieldset>
</fieldset>
</form>
[% END %]
@ -149,7 +150,7 @@ Well done! You successfully created your Mana KB account. Check your mailbox and
<script>
$(document).ready(function() {
$('#mana_token').submit(function() {
return confirm("This will delete the Mana token from Koha. Do you want to continue?");
return confirm( _("This will delete the Mana KB token from Koha. Do you want to continue?") );
});
});
</script>

Loading…
Cancel
Save