Bug 22889: Fix typos librairies and libaries
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / serials-toolbar.inc
blob07642840ff527d01547f3da5eb0311143de455c1
1 [% INCLUDE 'blocking_errors.inc' %]
2 [% IF subscriptionid and ( CAN_user_serials_edit_subscription || CAN_user_serials_create_subscription || CAN_user_serials_receive_serials ) %]
4     <div id="toolbar" class="btn-toolbar">
5         [% IF CAN_user_serials_create_subscription %]
6             [% IF biblionumber_for_new_subscription %]
7                 <div class="btn-group"><a id="newsubscription" class="btn btn-default" href="/cgi-bin/koha/serials/subscription-add.pl?biblionumber_for_new_subscription=[% biblionumber_for_new_subscription | html %]"><i class="fa fa-plus"></i> New subscription</a></div>
8             [% ELSE %]
9                 <div class="btn-group"><a id="newsubscription" class="btn btn-default" href="/cgi-bin/koha/serials/subscription-add.pl"><i class="fa fa-plus"></i> New subscription</a></div>
10             [% END %]
11         [% END %]
13         [% IF ( CAN_user_serials_edit_subscription || CAN_user_serials_create_subscription || CAN_user_serials_delete_subscription ) %]
14             [% UNLESS ( cannotedit ) %]
15                 <div class="btn-group">
16                     <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-pencil"></i> Edit <span class="caret"></span></button>
17                         <ul class="dropdown-menu">
18                             [% IF ( CAN_user_serials_edit_subscription ) %]
19                                 <li>
20                                     <a href="/cgi-bin/koha/serials/subscription-add.pl?op=modify&amp;subscriptionid=[% subscriptionid | uri %]">Edit subscription</a>
21                                 </li>
22                             [% END %]
24                             [% IF ( CAN_user_serials_create_subscription ) %]
25                                 <li>
26                                     <a href="/cgi-bin/koha/serials/subscription-add.pl?op=dup&amp;subscriptionid=[% subscriptionid | uri %]">Edit as new (duplicate)</a>
27                                 </li>
28                             [% END %]
30                             [% IF CAN_user_editcatalogue_edit_catalogue %]
31                                 <li>
32                                     <a id="editbiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber | uri %]">Edit record</a>
33                                 </li>
34                             [% END %]
36                             [% IF serialsadditems && CAN_user_editcatalogue_edit_items %]
37                                 <li>
38                                     <a id="edititems" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblionumber | uri %]">Edit items</a>
39                                 </li>
40                             [% END %]
42                             [% IF ( CAN_user_serials_delete_subscription ) %]
43                                 <li>
44                                     <a href="#" id="deletesub">Delete subscription</a>
45                                 </li>
46                             [% END %]
47                         </ul>
48                 </div>
49             [% END %]
50         [% END %]
52         [% IF not cannotedit or CAN_user_serials_receive_serials %]
53             [% IF CAN_user_serials_renew_subscription and not closed %]
54                 <div class="btn-group"><a id="renew" class="btn btn-default" href="#"><i class="fa fa-refresh"></i> Renew</a></div>
55             [% END %]
56             [% IF CAN_user_serials_receive_serials and not closed %]
57                 <div class="btn-group"><a id="receive" class="btn btn-default" href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscriptionid | html %]&amp;serstatus=1,3"><i class="fa fa-inbox"></i> Receive</a></div>
58             [% END %]
59             [% UNLESS cannotedit %]
60                 [% IF closed %]
61                     <div class="btn-group"><a id="reopen" class="btn btn-default" href="#"><i class="fa fa-repeat"></i> Reopen</a></div>
62                 [% ELSE %]
63                     <div class="btn-group"><a id="close" class="btn btn-default" href="#"><i class="fa fa-times-circle"></i> Close</a></div>
64                 [% END %]
65             [% END %]
66         [% END %]
68         [% IF Koha.Preference('Mana') == 1 and Koha.Preference('AutoShareWithMana').grep('subscription').size == 0 %]
69             [% IF one_language_enabled==0 or mana_id %]
70                 <div class="btn-group"><a data-toggle="modal" data-toggle="tooltip" title="Share the subscription with other libraries. Your email address will be associated to your sharing." data-target="#mana_share_modal" class="btn btn-default"><i class="fa fa-share-alt"></i> Share</a></div>
71             [% ELSE %]
72                 <div class="btn-group" id="mana-subscription-share" data-toggle="tooltip" title="Share the subscription with other libraries. Your email address will be associated to your sharing."><a class="btn btn-default"><i class="fa fa-share-alt"></i> Share</a></div>
73             [% END %]
74         [% END %]
76         [% IF ( mana_id && Koha.Preference('Mana') == 1 ) %]
77             <div class="btn-group">
78                 <button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"> Report mistake <span class="caret"></span></button>
79                 <ul class="dropdown-menu mana-actions">
80                     [% IF ( mana_comments ) %]
81                         [% FOREACH c IN mana_comments %]
82                             <li>
83                                 <a data-commentid="[% c.id | html %]" data-resourceid="[% mana_id | html %]" href="#">[% c.message | html %] ([% c.nb | html %])</a>
84                             </li>
85                         [% END %]
86                         <li role="separator" class="divider"></li>
87                     [% END %]
88                     <li><a data-commentid="other" data-resourceid="[% mana_id | html %]" href="#">New comment</a></li>
89                 </ul>
90             </div>
91         [% END %]
92     </div>
93 [% ELSIF CAN_user_serials_create_subscription %]
94     <div id="toolbar" class="btn-toolbar">
95         [% IF ( biblionumber_for_new_subscription ) %]
96             <div class="btn-group"><a id="newsubscription" class="btn btn-default" href="/cgi-bin/koha/serials/subscription-add.pl?biblionumber_for_new_subscription=[% biblionumber_for_new_subscription | html %]"><i class="fa fa-plus"></i> New subscription</a></div>
97         [% ELSE %]
98             <div class="btn-group"><a id="newsubscription" class="btn btn-default" href="/cgi-bin/koha/serials/subscription-add.pl"><i class="fa fa-plus"></i> New subscription</a></div>
99         [% END %]
100     </div>
101 [% END %]
103 <div class="modal" id="mana-comment-box" tabindex="-1" role="dialog" aria-labelledby="mana_submit_comment">
104     <div class="modal-dialog" role="document">
105         <div class="modal-content">
106             <form id="mana_comment_form" action="/cgi-bin/koha/serials/subscription-detail.pl" method="get">
107                 <div class="modal-header">
108                     <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
109                     <h4 class="modal-title" id="mana_submit_comment">Please enter a new comment (max 35 characters)</h4>
110                 </div>
111                 <div class="modal-body">
112                     <input type="hidden" id="mana-resource" value="subscription" />
113                     <input type="hidden" id="mana-resource-id" value="[% mana_id | html %]" />
114                     <input type="text" maxlength="35" size="35" id="mana-comment" required="required" />
115                     <button id="mana-send-comment">Submit</button>
116                     <a href="#" class="cancel" id="mana-comment-close">Cancel</a>
117                 </div>
118                 <div class="modal-footer">
119                     <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
120                 </div>
121             </form>
122         </div> <!-- /.modal-content -->
123     </div> <!-- /.modal-dialog -->
124 </div> <!-- /#mana-comment-box -->
126 <div id="mana_share_modal" class="modal" tabindex="-1" role="dialog" aria-labelledby="mana_share_modal_label">
127     <div class="modal-dialog" role="document">
128         <div class="modal-content">
129             <div class="modal-header">
130                 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
131                 <h4 id="mana_share_modal_label">Share [% bibliotitle | html %] to Mana</h4>
132             </div>
133             <div class="modal-body">
134                 [% IF (mana_id) %]
135                     <div class="alert">
136                         <p>Your subscription is already linked with a Mana subscription model. Share it if you have made modifications, otherwise it will do nothing.</p>
137                     </div>
138                 [% END %]
139                 [% IF ( languages_loop ) %]
140                     [% UNLESS ( one_language_enabled ) %]
141                         <div class="rows">
142                             <ol>
143                                 <li><span class="label">Frequency: </span>
144                                         [% frequency.description | html %]
145                                 </li>
146                                 <li><span class="label">Number pattern: </span>
147                                     [% numberpattern.label | html %]
148                                 </li>
149                             </ol>
150                         </div>
151                         <div class="rows">
152                             <form method="get" id="mana_share_form" action="/cgi-bin/koha/serials/subscription-detail.pl" class="validated" >
153                                 <fieldset>
154                                     <label for="mana_language">Language:</label>
155                                     <select id="mana_language" name="mana_language">
156                                         [% FOREACH languages_loo IN languages_loop %]
157                                             [% IF ( languages_loo.group_enabled ) %]
158                                                 [% IF ( languages_loo.plural ) %]
159                                                     [% FOREACH sublanguages_loo IN languages_loo.sublanguages_loop %]
160                                                         [% IF ( sublanguages_loo.enabled ) %]
161                                                             [% IF ( sublanguages_loo.sublanguage_current ) %]
162                                                                 <option value="[% languages_loo.rfc4646_subtag | html %]" selected>
163                                                                     [% sublanguages_loo.native_description | html %]
164                                                                     [% sublanguages_loo.script_description | html %]
165                                                                     [% sublanguages_loo.region_description | html %]
166                                                                     [% sublanguages_loo.variant_description | html %]
167                                                                     ([% sublanguages_loo.rfc4646_subtag | html %])
168                                                                 </option>
169                                                             [% ELSE %]
170                                                                 <option value="[% languages_loo.rfc4646_subtag | html %]">
171                                                                     [% sublanguages_loo.native_description | html %]
172                                                                     [% sublanguages_loo.script_description | html %]
173                                                                     [% sublanguages_loo.region_description | html %]
174                                                                     [% sublanguages_loo.variant_description | html %]
175                                                                     ([% sublanguages_loo.rfc4646_subtag | html %])
176                                                                 </option>
177                                                             [% END %]
178                                                         [% END %]
179                                                     [% END %]
180                                                 [% ELSE %]
181                                                     [% IF ( languages_loo.group_enabled ) %]
182                                                         [% IF ( languages_loo.current ) %]
183                                                             <option value="[% languages_loo.rfc4646_subtag | html %]" selected>
184                                                                 [% IF ( languages_loo.native_description ) %]
185                                                                     [% languages_loo.native_description | html %]
186                                                                 [% ELSE %]
187                                                                     [% languages_loo.rfc4646_subtag | html %]
188                                                                 [% END %]
189                                                             </option>
190                                                         [% ELSE %]
191                                                             <option value="[% languages_loo.rfc4646_subtag | html %]">
192                                                                 [% IF ( languages_loo.native_description ) %]
193                                                                     [% languages_loo.native_description | html %]
194                                                                 [% ELSE %]
195                                                                     [% languages_loo.rfc4646_subtag | html %]
196                                                                 [% END %]
197                                                             </option>
198                                                         [% END %]
199                                                     [% END %]
200                                                 [% END %]
201                                             [% END %]
202                                         [% END %]
203                                     </select>
204                                     <input type="hidden" id="op" name="op" value="share"/>
205                                     <input type="hidden" id="subscriptionid" name="subscriptionid" value="[% subscriptionid | html %]"/>
206                                 </fieldset>
207                             </form>
208                         </div> <!-- /.rows -->
209                     [% END %]
210                 [% END %]
211             </div> <!-- /.modal-body -->
212             <div class="modal-footer">
213                 <button type="submit" form="mana_share_form" class="btn btn-default">Share</button>
214                 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Cancel</button>
215             </div>
216         </div> <!-- /.modal-content -->
217     </div> <!-- /.modal-dialog -->
218 </div> <!-- /#mana-share-modal -->