View | Details | Raw Unified | Return to bug 23075
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/share_content.tt (-79 / +78 lines)
Lines 47-142 Link Here
47
                <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>
47
                <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>
48
48
49
                [% IF mana_url && !bad_url %]
49
                [% IF mana_url && !bad_url %]
50
                [% IF (mana_url) %]
50
                    [% IF (mana_url) %]
51
                    <p>Your Mana KB server is currently: <strong>[% mana_url | url %]</strong></p>
51
                        <p>Your Mana KB server is currently: <strong>[% mana_url | url %]</strong></p>
52
                [% END %]
52
                    [% END %]
53
54
                <form id="mana_preference" method="post" class="clearfix">
55
                    <fieldset class="rows">
56
                        <ol>
57
                            <li>
58
                                <label for="mana">Use Mana KB for sharing content: </label>
59
                                <select name="mana" id="mana">
60
                                    [% IF Koha.Preference('Mana') == 0 %]
61
                                        <option value="0" selected="selected">No</option>
62
                                    [% ELSE %]
63
                                        <option value="0">No</option>
64
                                    [% END %]
65
66
                                    [% IF Koha.Preference('Mana') == 1 %]
67
                                        <option value="1" selected="selected">Yes</option>
68
                                    [% ELSE %]
69
                                        <option value="1">Yes</option>
70
                                    [% END %]
71
                                    [% IF Koha.Preference('Mana') == 2 %]
72
                                        <option value="2" selected="selected">No, let me think about it</option>
73
                                    [% ELSE %]
74
                                        <option value="2">No, let me think about it</option>
75
                                    [% END %]
76
                                </select>
77
                                <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>
78
                            </li>
79
                            <li>
80
                                <label for="autosharewithmana">Auto subscription sharing: </label>
81
                                [% IF Koha.Preference('AutoShareWithMana').grep('subscription').size == 0 %]
82
                                    <input id="autosharewithmana" type="checkbox" name="autosharewithmana">
83
                                [% ELSE %]
84
                                    <input id="autosharewithmana" type="checkbox" name="autosharewithmana" checked="checked">
85
                                [% END %]
86
                                <div class="hint">If checked, new subscriptions you create will be automatically shared with Mana KB.</div>
87
                            </li>
88
                        </ol>
89
                        <fieldset class="action">
90
                            <input type="hidden" name="op" value="save" />
91
                            <input type="submit" value="Save" />
92
                        </fieldset>
93
                    </fieldset>
94
                </form>
95
96
                [% UNLESS Koha.Preference('ManaToken') %]
97
                    <h3>Configure Mana KB</h3>
98
53
99
                    <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>
54
                    <form id="mana_preference" method="post" class="clearfix">
100
                [% END %]
101
102
                [% IF Koha.Preference('ManaToken') %]
103
                    <form id="mana_token" method="post" class="clearfix">
104
                        <fieldset class="rows">
55
                        <fieldset class="rows">
105
                        <legend>Mana KB token</legend>
106
                            <ol>
56
                            <ol>
107
                                <li>
57
                                <li>
108
                                    <label for="token">Mana token: </label>
58
                                    <label for="mana">Use Mana KB for sharing content: </label>
109
                                    <input type="text" id="token" name="token" value="[% Koha.Preference('ManaToken') | html %]" size="50" disabled="disabled" />
59
                                    <select name="mana" id="mana">
110
                                    <div class="hint">Your unique security token used for authentication on Mana KB service (anti spam).</div>
60
                                        [% IF Koha.Preference('Mana') == 0 %]
111
                                </li>
61
                                            <option value="0" selected="selected">No</option>
112
                            </ol>
62
                                        [% ELSE %]
113
                            <fieldset class="action">
63
                                            <option value="0">No</option>
114
                                <input type="hidden" name="op" value="reset" />
64
                                        [% END %]
115
                                <input type="submit" value="Reset your token" />
65
116
                            </fieldset>
66
                                        [% IF Koha.Preference('Mana') == 1 %]
117
                        </fieldset>
67
                                            <option value="1" selected="selected">Yes</option>
118
                    </form>
68
                                        [% ELSE %]
119
                [% ELSE %]
69
                                            <option value="1">Yes</option>
120
                    <form id="mana_request" method="post" class="clearfix">
70
                                        [% END %]
121
                        <fieldset class="rows" id="mana_subscription">
71
                                        [% IF Koha.Preference('Mana') == 2 %]
122
                            <ol>
72
                                            <option value="2" selected="selected">No, let me think about it</option>
123
                                <li>
73
                                        [% ELSE %]
124
                                    <label for="name">Your name: </label>
74
                                            <option value="2">No, let me think about it</option>
125
                                    <input id="name" type="text" name="name" />
75
                                        [% END %]
126
                                    <div class="hint">Enter a personal or organization name.</div>
76
                                    </select>
77
                                    <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>
127
                                </li>
78
                                </li>
128
                                <li>
79
                                <li>
129
                                    <label for="email">Email: </label>
80
                                    <label for="autosharewithmana">Auto subscription sharing: </label>
130
                                    <input id="email" type="text" name="email" size="45" required="required" />
81
                                    [% IF Koha.Preference('AutoShareWithMana').grep('subscription').size == 0 %]
82
                                        <input id="autosharewithmana" type="checkbox" name="autosharewithmana">
83
                                    [% ELSE %]
84
                                        <input id="autosharewithmana" type="checkbox" name="autosharewithmana" checked="checked">
85
                                    [% END %]
86
                                    <div class="hint">If checked, new subscriptions you create will be automatically shared with Mana KB.</div>
131
                                </li>
87
                                </li>
132
                            </ol>
88
                            </ol>
133
                            <fieldset class="action">
89
                            <fieldset class="action">
134
                                <input type="hidden" name="op" value="send" />
90
                                <input type="hidden" name="op" value="save" />
135
                                <input type="submit" value="Send to Mana KB" />
91
                                <input type="submit" value="Save" />
136
                            </fieldset>
92
                            </fieldset>
137
                        </fieldset>
93
                        </fieldset>
138
                    </form>
94
                    </form>
139
                [% END %]
95
96
                    [% UNLESS Koha.Preference('ManaToken') %]
97
                        <h3>Configure Mana KB</h3>
98
99
                        <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>
100
                    [% END %]
101
102
                    [% IF Koha.Preference('ManaToken') %]
103
                        <form id="mana_token" method="post" class="clearfix">
104
                            <fieldset class="rows">
105
                            <legend>Mana KB token</legend>
106
                                <ol>
107
                                    <li>
108
                                        <label for="token">Mana token: </label>
109
                                        <input type="text" id="token" name="token" value="[% Koha.Preference('ManaToken') | html %]" size="50" disabled="disabled" />
110
                                        <div class="hint">Your unique security token used for authentication on Mana KB service (anti spam).</div>
111
                                    </li>
112
                                </ol>
113
                                <fieldset class="action">
114
                                    <input type="hidden" name="op" value="reset" />
115
                                    <input type="submit" value="Reset your token" />
116
                                </fieldset>
117
                            </fieldset>
118
                        </form>
119
                    [% ELSE %]
120
                        <form id="mana_request" method="post" class="clearfix">
121
                            <fieldset class="rows" id="mana_subscription">
122
                                <ol>
123
                                    <li>
124
                                        <label for="name">Your name: </label>
125
                                        <input id="name" type="text" name="name" />
126
                                        <div class="hint">Enter a personal or organization name.</div>
127
                                    </li>
128
                                    <li>
129
                                        <label for="email">Email: </label>
130
                                        <input id="email" type="text" name="email" size="45" required="required" />
131
                                    </li>
132
                                </ol>
133
                                <fieldset class="action">
134
                                    <input type="hidden" name="op" value="send" />
135
                                    <input type="submit" value="Send to Mana KB" />
136
                                </fieldset>
137
                            </fieldset>
138
                        </form>
139
                    [% END %]
140
                [% END # /IF mana_url && !bad_url %]
140
                [% END # /IF mana_url && !bad_url %]
141
            </div>
141
            </div>
142
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
142
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
143
- 

Return to bug 23075