Bug 17047: add a dedicated page for Mana setup
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / share_content.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% SET footerjs = 1 %]
4 [% USE Koha %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha &rsaquo; Administration &rsaquo; Koha usage statistics</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 </head>
9
10 <body id="admin_usage_statistics" class="admin">
11 [% INCLUDE 'header.inc' %]
12 [% INCLUDE 'cat-search.inc' %]
13
14 <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>
15
16 <div class="main container-fluid">
17     <div class="row">
18         <div class="col-sm-10 col-sm-push-2">
19             <div class="col-sm-6">
20                 [% IF result.code != 201 && result.msg %]
21                     <div class="alert alert-danger" role="alert">
22                         [% result.msg | html %]
23                     </div>
24                 [% END %]
25
26                 [% IF result.code == 201  %]
27                     <div class="dialog message" role="alert">
28 Well done! You successfully created your Mana KB account. Check your mailbox and follow instructions.
29                     </div>
30                 [% END %]
31
32                 [% UNLESS (mana_url) %]
33                     <div class="alert alert-danger" role="alert">
34                         Mana config is currently empty, this feature will not work. Please contact your site administartor.
35                     </div>
36                 [% END %]
37
38                 <h1>Share content with the Koha community using Mana KB</h1>
39                 <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>
40
41                 <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>
42
43                 <p>Learn more about Mana on the <a href="https://wiki.koha-community.org/wiki/Mana_central_database">official documentation</a>.</p>
44
45                 [% IF (mana_url) %]
46                 <p> Your Mana KB server is currently: <strong>[% mana_url | url %]</strong></p>
47                 [% END %]
48
49                 <form id="mana_preference" method="post">
50                     <fieldset class="rows">
51                         <ol>
52                             <li>
53                                 <label for="mana">Use Mana KB for sharing content: </label>
54                                 <select name="mana">
55                                     [% IF Koha.Preference('Mana') == 0 %]
56                                         <option value="0" selected="selected">No</option>
57                                     [% ELSE %]
58                                         <option value="0"">No</option>
59                                     [% END %]
60
61                                     [% IF Koha.Preference('Mana') == 1 %]
62                                         <option value="1" selected="selected">Yes</option>
63                                     [% ELSE %]
64                                         <option value="1">Yes</option>
65                                     [% END %]
66                                 </select>
67                                 <div class="hint">Enable Mana allow you to search, import and comment content from Mana server, and, to share your own.</div>
68                             </li>
69                             <li>
70                                 <label for="autosharewithmana">Auto subscriptions sharing: </label>
71                                 [% IF Koha.Preference('AutoShareWithMana').grep('subscription').size == 0 %]
72                                     <input type="checkbox" name="autosharewithmana">
73                                 [% ELSE %]
74                                     <input type="checkbox" name="autosharewithmana" checked="checked">
75                                 [% END %]
76                                 <div class="hint">If checked, new subscriptions you created yourself will be automatically shared with Mana KB.</div>
77                             </li>
78                             <li>
79                                 <input type="hidden" name="op" value="save">
80                                 <input type="submit" value="Save">
81                             </li>
82                         </ol>
83                     </fieldset>
84                 </form>
85
86                 [% UNLESS Koha.Preference('ManaToken') %]
87                     <h3>Configure Mana KB</h3>
88                     <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>
89                 [% END %]
90
91                 [% IF Koha.Preference('ManaToken') %]
92                     <form id="mana_token" method="post">
93                         <fieldset class="rows" id="mana_token">
94                         <legend>Mana KB token</legend>
95                             <ol>
96                                 <li>
97                                     <label for="token">Mana token: </label>
98                                     <input type="text" name="token" value="[% Koha.Preference('ManaToken') | html %]" size="50" disabled="disabled">
99                                     <div class="hint">Your unique security token used for authentication on Mana KB service (anti spam).</div>
100                                 </li>
101                                 <li>
102                                     <input type="hidden" name="op" value="reset">
103                                     <input type="submit" value="Reset your token">
104                                 </li>
105                             </ol>
106                         </fieldset>
107                     </form>
108                 [% ELSE %]
109                     <form id="mana_request" method="post">
110                         <fieldset class="rows" id="mana_subscription">
111                             <ol>
112                                 <li>
113                                     <label for="firstname">First name: </label>
114                                     <input type="text" name="firstname">
115                                 </li>
116                                 <li>
117                                     <label for="lastname">Last name: </label>
118                                     <input type="text" name="lastname">
119                                 </li>
120                                 <li>
121                                     <label for="email">Email: </label>
122                                     <input type="text" name="email" size="45" required="required">
123                                 </li>
124                                 <li>
125                                     <input type="hidden" name="op" value="send">
126                                     <input type="submit" value="Send to Mana KB">
127                                 </li>
128                             </ol>
129                         </fieldset>
130                     </form>
131                 [% END %]
132             </div>
133         </div> <!-- /.col-sm-10.col-sm-push-2 -->
134
135         <div class="col-sm-2 col-sm-pull-10">
136             <aside>
137                 [% INCLUDE 'admin-menu.inc' %]
138             </aside>
139         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
140      </div> <!-- /.row -->
141
142 [% MACRO jsinclude BLOCK %]
143     [% Asset.js("js/admin-menu.js") | $raw %]
144     <script>
145         $(document).ready(function() {
146             $('#mana_token').submit(function() {
147                 return confirm("This will delete the Mana token from Koha. Do you want to continue?");
148             });
149         });
150     </script>
151 [% END %]
152 [% INCLUDE 'intranet-bottom.inc' %]