Koha/koha-tmpl/intranet-tmpl/prog/en/modules/admin/share_content.tt
Owen Leonard 622581e5bf
Bug 32769: Standardize structure around action fieldsets in administration
This patch updates administration templates so that fieldsets with the
"action" class are placed outside the form's main fieldset.

To test, apply the patch and check the following pages to confirm that
the forms look correct:

- Administration
   -> Keyboard shortcuts
   -> Audio alerts
   -> Share content with Mana KB
      - When the ManaToken system preference is empty, the page should
        have two forms with updated fieldsets: the form with the "Use
        Mana KB..." field and a "Configure Mana KB" form.
      - With a ManaToken defined the second form should be one labeled
        "Mana KB token."
   -> Budgets
      - Click on a budget which has existing funds.
      - In the page toolbar click Planning -> Plan by libraries.
      - Check the forms in the sidebar.
   -> System preferences ->  OverDriveAuthName
      - Follow the link to "OverDrive library authnames table" and check
        the form on that page.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-02-09 10:21:24 -03:00

178 lines
9.3 KiB
Text

[% USE raw %]
[% USE Asset %]
[% SET footerjs = 1 %]
[% USE Koha %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Share content with Mana KB &rsaquo; Administration &rsaquo; Koha</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="admin_share_content" class="admin">
[% WRAPPER 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
[% END %]
[% WRAPPER 'sub-header.inc' %]
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
<ol>
<li>
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
</li>
<li>
<a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
</li>
<li>
<a href="#" aria-current="page">
Share content with Mana KB
</a>
</li>
</ol>
</nav>
[% END %]
<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="dialog alert" role="alert">
[% result.msg | html %]
</div>
[% END %]
[% IF result.code == 201 %]
<div class="dialog message" role="alert">
You successfully created your Mana KB account. Check your mailbox and follow instructions.
</div>
[% END %]
[% UNLESS (mana_url) %]
<div class="dialog alert" role="alert">
Mana configuration is currently empty. This feature will not work. Please contact your site administrator.
</div>
[% ELSIF (bad_url) %]
<div class="dialog alert" role="alert">
Cannot detect mana server at <strong>[% mana_url | url %]</strong>, please ask an administrator to check your configuration.
</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 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 KB on the <a href="https://wiki.koha-community.org/wiki/Mana_central_database">official Mana KB documentation</a>.</p>
[% IF mana_url && !bad_url %]
[% IF (mana_url) %]
<p>Your Mana KB server is currently: <strong>[% mana_url | url %]</strong></p>
[% END %]
<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" id="mana">
[% IF Koha.Preference('Mana') == 0 %]
<option value="0" selected="selected">No</option>
[% ELSE %]
<option value="0">No</option>
[% END %]
[% IF Koha.Preference('Mana') == 1 %]
<option value="1" selected="selected">Yes</option>
[% ELSE %]
<option value="1">Yes</option>
[% END %]
[% IF Koha.Preference('Mana') == 2 %]
<option value="2" selected="selected">No, let me think about it</option>
[% ELSE %]
<option value="2">No, let me think about it</option>
[% END %]
</select>
<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 subscription sharing: </label>
[% IF Koha.Preference('AutoShareWithMana').grep('subscription').size == 0 %]
<input id="autosharewithmana" type="checkbox" name="autosharewithmana">
[% ELSE %]
<input id="autosharewithmana" type="checkbox" name="autosharewithmana" checked="checked">
[% END %]
<span class="hint">If checked, new subscriptions you create will be automatically shared with Mana KB.</span>
</li>
</ol>
</fieldset>
<fieldset class="action">
<input type="hidden" name="op" value="save" />
<input type="submit" class="btn btn-primary" value="Save" />
</fieldset>
</form>
[% UNLESS Koha.Preference('ManaToken') %]
<h3>Configure Mana KB</h3>
<p>Once you have enabled Mana it must be configured. Type your name, and email address and submit. This will send an 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" class="clearfix">
<fieldset class="rows">
<legend>Mana KB token</legend>
<ol>
<li>
<label for="token">Mana token: </label>
<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>
</ol>
</fieldset>
<fieldset class="action">
<input type="hidden" name="op" value="reset" />
<input type="submit" class="btn btn-primary" value="Reset your token" />
</fieldset>
</form>
[% ELSE %]
<form id="mana_request" method="post" class="clearfix">
<fieldset class="rows" id="mana_subscription">
<ol>
<li>
<label for="name">Your name: </label>
<input id="name" type="text" name="name" />
<div class="hint">Enter a personal or organization name.</div>
</li>
<li>
<label for="email">Email: </label>
<input id="email" type="text" name="email" size="45" required="required" />
</li>
</ol>
</fieldset>
<fieldset class="action">
<input type="hidden" name="op" value="send" />
<input type="submit" class="btn btn-primary" value="Send to Mana KB" />
</fieldset>
</form>
[% END %]
[% END # /IF mana_url && !bad_url %]
</div>
</div> <!-- /.col-sm-10.col-sm-push-2 -->
<div class="col-sm-2 col-sm-pull-10">
<aside>
[% INCLUDE 'admin-menu.inc' %]
</aside>
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
</div> <!-- /.row -->
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/admin-menu.js") | $raw %]
<script>
$(document).ready(function() {
$('#mana_token').submit(function() {
return confirm( _("This will delete the Mana KB token from Koha. Do you want to continue?") );
});
});
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]