5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Your interlibrary loan requests</title>[% INCLUDE 'doc-head-close.inc' %]
7 [% BLOCK cssinclude %][% END %]
9 [% INCLUDE 'bodytag.inc' bodyid='opac-illrequests' bodyclass='scrollto' %]
11 [% IF message == "1" %]
12 <div class="alert alert-success" role="alert">Request updated</div>
13 [% ELSIF message == "2" %]
14 <div class="alert alert-success" role="alert">Request placed</div>
17 [% INCLUDE 'masthead.inc' %]
19 <ul class="breadcrumb noprint">
20 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
21 [% IF ( logged_in_user ) %]
22 <li><a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a> <span class="divider">›</span></li>
25 [% IF method != 'list' %]
26 <li><a href="/cgi-bin/koha/opac-illrequests.pl">Interlibrary loan requests</a> <span class="divider">›</span></li>
27 [% IF method == 'create' %]
28 <li>New interlibrary loan request</li>
29 [% ELSIF method == 'view' %]
30 <li>View interlibrary loan request</li>
33 <li>Interlibrary loan requests</li>
36 </ul> <!-- / .breadcrumb -->
38 <div class="container-fluid">
39 <div class="row-fluid">
40 [% IF ( OpacNav||loggedinusername ) && !print %]
43 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
48 [% IF ( OpacNav||loggedinusername ) %]
53 [% IF !backends_available %]
54 <div class="alert">ILL module configuration problem. Contact your administrator.</div>
56 <div id="illrequests" class="maincontent">
57 [% IF method == 'create' %]
58 <h2>New interlibrary loan request</h2>
59 [% IF stage == 'copyrightclearance' %]
60 [% INCLUDE messages %]
63 [% Koha.Preference('ILLModuleCopyrightClearance') | $raw %]
65 <a href="?method=create&stage=copyrightclearance&backend=[% whole.value.backend | uri %]"
66 class="btn btn-sm btn-default"><i class="fa fa-check"></i> Yes</a>
67 <a href="/cgi-bin/koha/opac-illrequests.pl"
68 class="btn btn-sm btn-default"><i class="fa fa-times"></i> No</a>
71 [% INCLUDE messages %]
73 <form method="post" id="illrequestcreate-form" novalidate="novalidate">
74 <fieldset class="rows">
75 <label for="backend">Provider:</label>
76 <select name="backend">
77 [% FOREACH backend IN backends %]
78 <option value="[% backend | html %]">[% backend | html %]</option>
82 <fieldset class="action">
83 <input type="hidden" name="method" value="create" />
84 <input type="submit" name="create_select_backend" value="Next" />
88 [% PROCESS $whole.opac_template %]
91 [% ELSIF method == 'list' %]
92 <h2>Interlibrary loan requests</h2>
93 [% INCLUDE messages %]
95 <div id="illrequests-create-button" class="dropdown btn-group">
96 [% IF backends.size > 1 %]
97 <button class="btn btn-default dropdown-toggle" type="button" id="ill-backend-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
98 <i class="fa fa-plus"></i> Create a new request <span class="caret"></span>
100 <ul id="backend-dropdown-options" class="dropdown-menu nojs" aria-labelledby="ill-backend-dropdown">
101 [% FOREACH backend IN backends %]
102 <li><a href="/cgi-bin/koha/opac-illrequests.pl?method=create&backend=[% backend | uri %]">[% backend | html %]</a></li>
106 <a id="ill-new" class="btn btn-default" href="/cgi-bin/koha/opac-illrequests.pl?method=create&backend=[% backends.0 | html %]">
107 <i class="fa fa-plus"></i> Create a new request
112 <table id="illrequestlist" class="table table-bordered table-striped">
118 <th>Requested from</th>
119 <th>Request type</th>
121 <th class="title-string">Request placed</th>
122 <th class="title-string">Last updated</th>
127 [% FOREACH request IN requests %]
128 [% status = request.status | html %]
129 [% type = request.get_type %]
131 <td>[% request.id | html %]</td>
133 [% IF request.metadata.Author %][% request.metadata.Author | html %][% ELSE %]<span>N/A</span>[% END %]
136 [% IF request.metadata.Title %][% request.metadata.Title | html %][% ELSE %]<span>N/A</span>[% END %]
138 <td>[% request.backend | html %]</td>
140 [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
142 <td>[% request.status_alias ? request.statusalias.lib_opac : request.capabilities.$status.name | html %]</td>
143 <td><span title="[% request.placed | html %]">[% request.placed | $KohaDates %]</span></td>
144 <td><span title="[% request.updated | html %]">[% request.updated | $KohaDates %]</span></td>
146 <a href="/cgi-bin/koha/opac-illrequests.pl?method=view&illrequest_id=[% request.id | uri %]" class="btn btn-default btn-small pull-right">View</a>
152 [% ELSIF method == 'view' %]
153 <h2>View interlibrary loan request</h2>
154 [% INCLUDE messages %]
155 [% status = request.status %]
156 <form method="post" action="?method=update" id="illrequestupdate-form" novalidate="novalidate">
157 <fieldset class="rows">
158 <legend id="library_legend">Details from library</legend>
160 [% type = request.get_type %]
162 <label for="request_id">Request ID:</label>
163 [% request.id | html %]
166 <label for="backend">Requested from:</label>
167 [% request.backend | html %]
169 [% IF request.biblio_id %]
171 <label for="biblio">Requested item:</label>
172 <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% request.biblio_id | uri %]">Click here to view</a>
176 <label for="branchcode">Collection library:</label>
177 [% Branches.GetName(request.branchcode) | html %]
180 <label for="status">Status:</label>
181 [% request.status_alias ? request.statusalias.lib_opac : request.capabilities.$status.name | html %]
184 <label for="medium">Request type:</label>
185 [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
188 <label for="placed">Request placed:</label>
189 [% request.placed | $KohaDates %]
192 <label for="updated">Last updated:</label>
193 [% request.updated | $KohaDates %]
196 <label for="notesopac">Notes:</label>
197 [% IF !request.completed %]
198 <textarea name="notesopac" rows="5" cols="50">[% request.notesopac | html %]</textarea>
200 [% request.notesopac | html %]
206 <legend id="backend_legend">Details from [% request.backend | html %]</legend>
207 [% FOREACH meta IN request.metadata %]
208 <div class="requestattr-[% meta.key | html %]">
209 <span class="label">[% meta.key | html %]:</span>
210 [% IF meta.value %][% meta.value | html %][% ELSE %]<span>N/A</span>[% END %]
214 <fieldset class="action illrequest-actions">
215 <input type="hidden" name="illrequest_id" value="[% request.illrequest_id | html %]" />
216 <input type="hidden" name="method" value="update" />
217 [% IF !request.completed %]
218 [% IF request.status == "NEW" %]
219 <a class="cancel-illrequest btn btn-danger" href="/cgi-bin/koha/opac-illrequests.pl?method=cancreq&illrequest_id=[% request.illrequest_id | html %]">Request cancellation</a>
221 <input type="submit" class="update-illrequest btn btn-default" value="Submit modifications" />
223 <span class="cancel"><a href="/cgi-bin/koha/opac-illrequests.pl">Cancel</a></span>
227 </div> <!-- / .maincontent -->
229 </div> <!-- / .span10/12 -->
230 </div> <!-- / .row-fluid -->
231 </div> <!-- / .container-fluid -->
232 </div> <!-- / .main -->
234 [% INCLUDE 'opac-bottom.inc' %]
236 [% BLOCK jsinclude %]
237 [% INCLUDE 'datatables.inc' %]
240 $("#illrequestlist").dataTable($.extend(true, {}, dataTablesDefaults, {
242 { "targets": [ -1 ], "sortable": false, "searchable": false },
243 { "type": "title-string", "targets" : [ "title-string" ] }
245 "order": [[ 3, "desc" ]],
248 $("#backend-dropdown-options").removeClass("nojs");
252 [% PROCESS backend_jsinclude %]