Bug 34598: Improve handling of not found ILL request
[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">
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     </div>
37 [% END %]