Bug 30719: ILL Batches
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / ill-toolbar.inc
1 [% INCLUDE 'blocking_errors.inc' %]
2 [% USE Koha %]
3 [% IF Koha.Preference('ILLModule') && CAN_user_ill %]
4     <div id="toolbar" class="btn-toolbar ill-toolbar">
5         [% IF backends_available %]
6           [% IF backends.size > 1 %]
7             <div class="dropdown btn-group">
8                 <button class="btn btn-default dropdown-toggle" type="button" id="ill-backend-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
9                     <i class="fa fa-plus"></i> New ILL request <span class="caret"></span>
10                 </button>
11                 <ul class="dropdown-menu" aria-labelledby="ill-backend-dropdown">
12                     [% FOREACH backend IN backends %]
13                         <li><a href="/cgi-bin/koha/ill/ill-requests.pl?method=create&amp;backend=[% backend | uri %]">[% backend | html %]</a></li>
14                     [% END %]
15                 </ul>
16             </div>
17           [% ELSE %]
18             <a id="ill-new" class="btn btn-default" href="/cgi-bin/koha/ill/ill-requests.pl?method=create&amp;backend=[% backends.0 | html %]">
19                 <i class="fa fa-plus"></i> New ILL request
20             </a>
21           [% END %]
22         [% ELSE %]
23             <a id="ill-new" class="btn btn-default disabled" href="">
24                 <i class="fa fa-plus"></i> New ILL request
25             </a>
26         [% END %]
27         [% IF query_type == 'illlist' %]
28             <a id="ill-list" class="btn btn-sm btn-default btn-group" href="/cgi-bin/koha/ill/ill-requests.pl">
29                 <i class="fa fa-list"></i> Refresh
30             </a>
31         [% ELSE %]
32             <a id="ill-list" class="btn btn-sm btn-default btn-group" href="/cgi-bin/koha/ill/ill-requests.pl">
33                 <i class="fa fa-list"></i> List requests
34             </a>
35         [% END %]
36         [% IF have_batch.size > 0 && metadata_enrichment_services %]
37         <div id="ill-batch">
38             <div class="dropdown btn-group">
39                 <button class="btn btn-default dropdown-toggle" type="button" id="ill-batch-backend-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
40                     <i class="fa fa-plus"></i> New ILL batch request <span class="caret"></span>
41                 </button>
42                 <ul class="dropdown-menu" aria-labelledby="ill-batch-backend-dropdown">
43                     [% FOREACH backend IN have_batch %]
44                         <li><a href="#" role="button" onclick="window.openBatchModal(null, '[% backend | html %]')">[% backend | html %]</a></li>
45                     [% END %]
46                 </ul>
47             </div>
48             <a class="btn btn-default" type="button" href="/cgi-bin/koha/ill/ill-requests.pl?method=batch_list" %]">
49                 <i class="fa fa-tasks"></i> Batch requests</span>
50             </a>
51         </div>
52         [% END %]
53     </div>
54 [% END %]