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>
139 <td>[% type || '<span>N/A</span>' | html %]</td>
140 <td>[% request.capabilities.$status.name | html %]</td>
141 <td><span title="[% request.placed | html %]">[% request.placed | $KohaDates %]</span></td>
142 <td><span title="[% request.updated | html %]">[% request.updated | $KohaDates %]</span></td>
144 <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>
150 [% ELSIF method == 'view' %]
151 <h2>View interlibrary loan request</h2>
152 [% INCLUDE messages %]
153 [% status = request.status %]
154 <form method="post" action="?method=update" id="illrequestupdate-form" novalidate="novalidate">
155 <fieldset class="rows">
156 <legend id="library_legend">Details from library</legend>
158 [% type = request.get_type %]
160 <label for="request_id">Request ID:</label>
161 [% request.id | html %]
164 <label for="backend">Requested from:</label>
165 [% request.backend | html %]
167 [% IF request.biblio_id %]
169 <label for="biblio">Requested item:</label>
170 <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% request.biblio_id | uri %]">Click here to view</a>
174 <label for="branchcode">Collection library:</label>
175 [% Branches.GetName(request.branchcode) | html %]
178 <label for="status">Status:</label>
179 [% request.capabilities.$status.name | html %]
182 <label for="medium">Request type:</label>
183 [% type || '<span>N/A</span>' | html %]
186 <label for="placed">Request placed:</label>
187 [% request.placed | $KohaDates %]
190 <label for="updated">Last updated:</label>
191 [% request.updated | $KohaDates %]
194 <label for="notesopac">Notes:</label>
195 [% IF !request.completed %]
196 <textarea name="notesopac" rows="5" cols="50">[% request.notesopac | html %]</textarea>
198 [% request.notesopac | html %]
204 <legend id="backend_legend">Details from [% request.backend | html %]</legend>
205 [% FOREACH meta IN request.metadata %]
206 <div class="requestattr-[% meta.key | html %]">
207 <span class="label">[% meta.key | html %]:</span>
208 [% IF meta.value %][% meta.value | html %][% ELSE %]<span>N/A</span>[% END %]
212 <fieldset class="action illrequest-actions">
213 <input type="hidden" name="illrequest_id" value="[% request.illrequest_id | html %]" />
214 <input type="hidden" name="method" value="update" />
215 [% IF !request.completed %]
216 [% IF request.status == "NEW" %]
217 <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>
219 <input type="submit" class="update-illrequest btn btn-default" value="Submit modifications" />
221 <span class="cancel"><a href="/cgi-bin/koha/opac-illrequests.pl">Cancel</a></span>
225 </div> <!-- / .maincontent -->
227 </div> <!-- / .span10/12 -->
228 </div> <!-- / .row-fluid -->
229 </div> <!-- / .container-fluid -->
230 </div> <!-- / .main -->
232 [% INCLUDE 'opac-bottom.inc' %]
234 [% BLOCK jsinclude %]
235 [% INCLUDE 'datatables.inc' %]
238 $("#illrequestlist").dataTable($.extend(true, {}, dataTablesDefaults, {
240 { "targets": [ -1 ], "sortable": false, "searchable": false },
241 { "type": "title-string", "targets" : [ "title-string" ] }
243 "order": [[ 3, "desc" ]],
246 $("#backend-dropdown-options").removeClass("nojs");
250 [% PROCESS backend_jsinclude %]