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 [% USE link_url = url('/cgi-bin/koha/opac-illrequests.pl', whole.value.other) %]
66 <a href="[% link_url _ '&stage=copyrightclearance' | $raw %]"
67 class="btn btn-sm btn-default"><i class="fa fa-check"></i> Yes</a>
68 <a href="/cgi-bin/koha/opac-illrequests.pl"
69 class="btn btn-sm btn-default"><i class="fa fa-times"></i> No</a>
72 [% INCLUDE messages %]
74 <form method="post" id="illrequestcreate-form" novalidate="novalidate">
75 <fieldset class="rows">
76 <label for="backend">Provider:</label>
77 <select name="backend">
78 [% FOREACH backend IN backends %]
79 <option value="[% backend | html %]">[% backend | html %]</option>
83 <fieldset class="action">
84 <input type="hidden" name="method" value="create" />
85 <input type="submit" name="create_select_backend" value="Next" />
89 [% PROCESS $whole.opac_template %]
92 [% ELSIF method == 'list' %]
93 <h2>Interlibrary loan requests</h2>
94 [% INCLUDE messages %]
96 <div id="illrequests-create-button" class="dropdown btn-group">
97 [% IF backends.size > 1 %]
98 <button class="btn btn-default dropdown-toggle" type="button" id="ill-backend-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
99 <i class="fa fa-plus"></i> Create a new request <span class="caret"></span>
101 <ul id="backend-dropdown-options" class="dropdown-menu nojs" aria-labelledby="ill-backend-dropdown">
102 [% FOREACH backend IN backends %]
103 <li><a href="/cgi-bin/koha/opac-illrequests.pl?method=create&backend=[% backend | uri %]">[% backend | html %]</a></li>
107 <a id="ill-new" class="btn btn-default" href="/cgi-bin/koha/opac-illrequests.pl?method=create&backend=[% backends.0 | html %]">
108 <i class="fa fa-plus"></i> Create a new request
113 <table id="illrequestlist" class="table table-bordered table-striped">
119 <th>Requested from</th>
120 <th>Request type</th>
122 <th class="title-string">Request placed</th>
123 <th class="title-string">Last updated</th>
128 [% FOREACH request IN requests %]
129 [% status = request.status | html %]
130 [% type = request.get_type %]
132 <td>[% request.id | html %]</td>
134 [% IF request.metadata.Author %][% request.metadata.Author | html %][% ELSE %]<span>N/A</span>[% END %]
137 [% IF request.metadata.Title %][% request.metadata.Title | html %][% ELSE %]<span>N/A</span>[% END %]
139 <td>[% request.backend | html %]</td>
141 [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
143 <td>[% request.status_alias ? request.statusalias.lib_opac : request.capabilities.$status.name | html %]</td>
144 <td><span title="[% request.placed | html %]">[% request.placed | $KohaDates %]</span></td>
145 <td><span title="[% request.updated | html %]">[% request.updated | $KohaDates %]</span></td>
147 <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>
153 [% ELSIF method == 'view' %]
154 <h2>View interlibrary loan request</h2>
155 [% INCLUDE messages %]
156 [% status = request.status %]
157 <form method="post" action="?method=update" id="illrequestupdate-form" novalidate="novalidate">
158 <fieldset class="rows">
159 <legend id="library_legend">Details from library</legend>
161 [% type = request.get_type %]
163 <label for="request_id">Request ID:</label>
164 [% request.id | html %]
167 <label for="backend">Requested from:</label>
168 [% request.backend | html %]
170 [% IF request.biblio_id %]
172 <label for="biblio">Requested item:</label>
173 <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% request.biblio_id | uri %]">Click here to view</a>
177 <label for="branchcode">Collection library:</label>
178 [% Branches.GetName(request.branchcode) | html %]
181 <label for="status">Status:</label>
182 [% request.status_alias ? request.statusalias.lib_opac : request.capabilities.$status.name | html %]
185 <label for="medium">Request type:</label>
186 [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
189 <label for="placed">Request placed:</label>
190 [% request.placed | $KohaDates %]
193 <label for="updated">Last updated:</label>
194 [% request.updated | $KohaDates %]
197 <label for="notesopac">Notes:</label>
198 [% IF !request.completed %]
199 <textarea name="notesopac" rows="5" cols="50">[% request.notesopac | html %]</textarea>
201 [% request.notesopac | html %]
207 <legend id="backend_legend">Details from [% request.backend | html %]</legend>
208 [% FOREACH meta IN request.metadata %]
209 <div class="requestattr-[% meta.key | html %]">
210 <span class="label">[% meta.key | html %]:</span>
211 [% IF meta.value %][% meta.value | html %][% ELSE %]<span>N/A</span>[% END %]
215 <fieldset class="action illrequest-actions">
216 <input type="hidden" name="illrequest_id" value="[% request.illrequest_id | html %]" />
217 <input type="hidden" name="method" value="update" />
218 [% IF !request.completed %]
219 [% IF request.status == "NEW" %]
220 <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>
222 <input type="submit" class="update-illrequest btn btn-default" value="Submit modifications" />
224 <span class="cancel"><a href="/cgi-bin/koha/opac-illrequests.pl">Cancel</a></span>
228 </div> <!-- / .maincontent -->
230 </div> <!-- / .span10/12 -->
231 </div> <!-- / .row-fluid -->
232 </div> <!-- / .container-fluid -->
233 </div> <!-- / .main -->
235 [% INCLUDE 'opac-bottom.inc' %]
237 [% BLOCK jsinclude %]
238 [% INCLUDE 'datatables.inc' %]
241 $("#illrequestlist").dataTable($.extend(true, {}, dataTablesDefaults, {
243 { "targets": [ -1 ], "sortable": false, "searchable": false },
244 { "type": "title-string", "targets" : [ "title-string" ] }
246 "order": [[ 3, "desc" ]],
249 $("#backend-dropdown-options").removeClass("nojs");
253 [% PROCESS backend_jsinclude %]