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 | html %]"
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 | html %]">[% 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 %]
130 <td>[% request.id | html %]</td>
132 [% IF request.metadata.Author %][% request.metadata.Author | html %][% ELSE %]<span>N/A</span>[% END %]
135 [% IF request.metadata.Title %][% request.metadata.Title | html %][% ELSE %]<span>N/A</span>[% END %]
137 <td>[% request.backend | html %]</td>
138 <td>[% request.medium | html %]</td>
139 <td>[% request.capabilities.$status.name | html %]</td>
140 <td><span title="[% request.placed | html %]">[% request.placed | $KohaDates %]</span></td>
141 <td><span title="[% request.updated | html %]">[% request.updated | $KohaDates %]</span></td>
143 <a href="/cgi-bin/koha/opac-illrequests.pl?method=view&illrequest_id=[% request.id | html %]" class="btn btn-default btn-small pull-right">View</a>
149 [% ELSIF method == 'view' %]
150 <h2>View interlibrary loan request</h2>
151 [% INCLUDE messages %]
152 [% status = request.status | html %]
153 <form method="post" action="?method=update" id="illrequestupdate-form" novalidate="novalidate">
154 <fieldset class="rows">
155 <legend id="library_legend">Details from library</legend>
158 <label for="request_id">Request ID:</label>
159 [% request.id | html %]
162 <label for="backend">Requested from:</label>
163 [% request.backend | html %]
165 [% IF request.biblio_id %]
167 <label for="biblio">Requested item:</label>
168 <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% request.biblio_id | html %]">Click here to view</a>
172 <label for="branchcode">Collection library:</label>
173 [% Branches.GetName(request.branchcode) | html %]
176 <label for="status">Status:</label>
177 [% request.capabilities.$status.name | html %]
180 <label for="medium">Request type:</label>
181 [% request.medium | html %]
184 <label for="placed">Request placed:</label>
185 [% request.placed | $KohaDates %]
188 <label for="updated">Last updated:</label>
189 [% request.updated | $KohaDates %]
192 <label for="notesopac">Notes:</label>
193 [% IF !request.completed %]
194 <textarea name="notesopac" rows="5" cols="50">[% request.notesopac | html %]</textarea>
196 [% request.notesopac | html %]
202 <legend id="backend_legend">Details from [% request.backend | html %]</legend>
203 [% FOREACH meta IN request.metadata %]
204 <div class="requestattr-[% meta.key | html %]">
205 <span class="label">[% meta.key | html %]:</span>
206 [% IF meta.value %][% meta.value | html %][% ELSE %]<span>N/A</span>[% END %]
210 <fieldset class="action illrequest-actions">
211 <input type="hidden" name="illrequest_id" value="[% request.illrequest_id | html %]" />
212 <input type="hidden" name="method" value="update" />
213 [% IF !request.completed %]
214 [% IF request.status == "NEW" %]
215 <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>
217 <input type="submit" class="update-illrequest btn btn-default" value="Submit modifications" />
219 <span class="cancel"><a href="/cgi-bin/koha/opac-illrequests.pl">Cancel</a></span>
223 </div> <!-- / .maincontent -->
225 </div> <!-- / .span10/12 -->
226 </div> <!-- / .row-fluid -->
227 </div> <!-- / .container-fluid -->
228 </div> <!-- / .main -->
230 [% INCLUDE 'opac-bottom.inc' %]
232 [% BLOCK jsinclude %]
233 [% INCLUDE 'datatables.inc' %]
236 $("#illrequestlist").dataTable($.extend(true, {}, dataTablesDefaults, {
238 { "targets": [ -1 ], "sortable": false, "searchable": false },
239 { "type": "title-string", "targets" : [ "title-string" ] }
241 "order": [[ 3, "desc" ]],
244 $("#backend-dropdown-options").removeClass("nojs");
248 [% PROCESS backend_jsinclude %]