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>
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>
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 ) %]
20 <a href="/cgi-bin/koha/serials/subscription-add.pl?op=modify&subscriptionid=[% subscriptionid | uri %]">Edit subscription</a>
24 [% IF ( CAN_user_serials_create_subscription ) %]
26 <a href="/cgi-bin/koha/serials/subscription-add.pl?op=dup&subscriptionid=[% subscriptionid | uri %]">Edit as new (duplicate)</a>
30 [% IF CAN_user_editcatalogue_edit_catalogue %]
32 <a id="editbiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber | uri %]">Edit record</a>
36 [% IF serialsadditems && CAN_user_editcatalogue_edit_items %]
38 <a id="edititems" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblionumber | uri %]">Edit items</a>
42 [% IF ( CAN_user_serials_delete_subscription ) %]
44 <a href="#" id="deletesub">Delete subscription</a>
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>
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 %]&serstatus=1,3"><i class="fa fa-inbox"></i> Receive</a></div>
59 [% UNLESS cannotedit %]
61 <div class="btn-group"><a id="reopen" class="btn btn-default" href="#"><i class="fa fa-repeat"></i> Reopen</a></div>
63 <div class="btn-group"><a id="close" class="btn btn-default" href="#"><i class="fa fa-times-circle"></i> Close</a></div>
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>
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>
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 %]
83 <a data-commentid="[% c.id | html %]" data-resourceid="[% mana_id | html %]" href="#">[% c.message | html %] ([% c.nb | html %])</a>
86 <li role="separator" class="divider"></li>
88 <li><a data-commentid="other" data-resourceid="[% mana_id | html %]" href="#">New comment</a></li>
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>
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>
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">×</span></button>
109 <h4 class="modal-title" id="mana_submit_comment">Please enter a new comment (max 35 characters)</h4>
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>
118 <div class="modal-footer">
119 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
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">×</span></button>
131 <h4 id="mana_share_modal_label">Share [% bibliotitle | html %] to Mana</h4>
133 <div class="modal-body">
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>
139 [% IF ( languages_loop ) %]
140 [% UNLESS ( one_language_enabled ) %]
143 <li><span class="label">Frequency: </span>
144 [% frequency.description | html %]
146 <li><span class="label">Number pattern: </span>
147 [% numberpattern.label | html %]
152 <form method="get" id="mana_share_form" action="/cgi-bin/koha/serials/subscription-detail.pl" class="validated" >
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 %])
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 %])
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 %]
187 [% languages_loo.rfc4646_subtag | html %]
191 <option value="[% languages_loo.rfc4646_subtag | html %]">
192 [% IF ( languages_loo.native_description ) %]
193 [% languages_loo.native_description | html %]
195 [% languages_loo.rfc4646_subtag | html %]
204 <input type="hidden" id="op" name="op" value="share"/>
205 <input type="hidden" id="subscriptionid" name="subscriptionid" value="[% subscriptionid | html %]"/>
208 </div> <!-- /.rows -->
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>
216 </div> <!-- /.modal-content -->
217 </div> <!-- /.modal-dialog -->
218 </div> <!-- /#mana-share-modal -->