4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Your Interlibrary loan requests</title>[% INCLUDE 'doc-head-close.inc' %]
6 [% BLOCK cssinclude %][% END %]
8 [% INCLUDE 'bodytag.inc' bodyid='opac-illrequests' bodyclass='scrollto' %]
10 [% IF message == "1" %]
11 <div class="alert alert-success" role="alert">Request updated</div>
12 [% ELSIF message == "2" %]
13 <div class="alert alert-success" role="alert">Request placed</div>
16 [% INCLUDE 'masthead.inc' %]
18 <ul class="breadcrumb noprint">
19 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
20 [% IF ( logged_in_user ) %]
21 <li><a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a> <span class="divider">›</span></li>
24 [% IF method != 'list' %]
25 <li><a href="/cgi-bin/koha/opac-illrequests.pl">Interlibrary loan requests</a> <span class="divider">›</span></li>
26 [% IF method == 'create' %]
27 <li>New Interlibrary loan request</li>
28 [% ELSIF method == 'view' %]
29 <li>View Interlibrary loan request</li>
32 <li>Interlibrary loan requests</li>
35 </ul> <!-- / .breadcrumb -->
37 <div class="container-fluid">
38 <div class="row-fluid">
39 [% IF ( OpacNav||loggedinusername ) && !print %]
42 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
47 [% IF ( OpacNav||loggedinusername ) %]
52 [% IF !backends_available %]
53 <div class="alert">ILL module configuration problem. Contact your administrator.</div>
55 <div id="illrequests" class="maincontent">
56 [% IF method == 'create' %]
57 <h2>New Interlibrary loan request</h2>
58 [% IF stage == 'copyrightclearance' %]
59 [% INCLUDE messages %]
62 [% Koha.Preference('ILLModuleCopyrightClearance') | $raw %]
64 <a href="?method=create&stage=copyrightclearance&backend=[% whole.value.backend | html %]"
65 class="btn btn-sm btn-default"><i class="fa fa-check"></i> Yes</a>
66 <a href="/cgi-bin/koha/opac-illrequests.pl"
67 class="btn btn-sm btn-default"><i class="fa fa-times"></i> No</a>
70 [% INCLUDE messages %]
72 <form method="post" id="illrequestcreate-form" novalidate="novalidate">
73 <fieldset class="rows">
74 <label for="backend">Provider:</label>
75 <select name="backend">
76 [% FOREACH backend IN backends %]
77 <option value="[% backend | html %]">[% backend | html %]</option>
81 <fieldset class="action">
82 <input type="hidden" name="method" value="create">
83 <input type="submit" name="create_select_backend" value="Next">
87 [% PROCESS $whole.opac_template %]
90 [% ELSIF method == 'list' %]
91 <h2>Interlibrary loan requests</h2>
92 [% INCLUDE messages %]
94 <div id="illrequests-create-button" class="dropdown btn-group">
95 [% IF backends.size > 1 %]
96 <button class="btn btn-default dropdown-toggle" type="button" id="ill-backend-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
97 <i class="fa fa-plus"></i> Create a new request <span class="caret"></span>
99 <ul id="backend-dropdown-options" class="dropdown-menu nojs" aria-labelledby="ill-backend-dropdown">
100 [% FOREACH backend IN backends %]
101 <li><a href="/cgi-bin/koha/opac-illrequests.pl?method=create&backend=[% backend | html %]">[% backend | html %]</a></li>
105 <a id="ill-new" class="btn btn-default" href="/cgi-bin/koha/opac-illrequests.pl?method=create&backend=[% backends.0 | html %]">
106 <i class="fa fa-plus"></i> Create a new request
111 <table id="illrequestlist" class="table table-bordered table-striped">
117 <th>Requested from</th>
118 <th>Request type</th>
120 <th>Request placed</th>
121 <th>Last updated</th>
126 [% FOREACH request IN requests %]
127 [% status = request.status | html %]
129 <td>[% request.id | html %]</td>
131 [% IF request.metadata.Author %][% request.metadata.Author | html %][% ELSE %]<span>N/A</span>[% END %]
134 [% IF request.metadata.Title %][% request.metadata.Title | html %][% ELSE %]<span>N/A</span>[% END %]
136 <td>[% request.backend | html %]</td>
137 <td>[% request.medium | html %]</td>
138 <td>[% request.capabilities.$status.name | html %]</td>
139 <td>[% request.placed | html %]</td>
140 <td>[% request.updated | html %]</td>
142 <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>
148 [% ELSIF method == 'view' %]
149 <h2>View Interlibrary loan request</h2>
150 [% INCLUDE messages %]
151 [% status = request.status | html %]
152 <form method="post" action="?method=update" id="illrequestupdate-form" novalidate="novalidate">
153 <fieldset class="rows">
154 <legend id="library_legend">Details from library</legend>
157 <label for="request_id">Request ID:</label>
158 [% request.id | html %]
161 <label for="backend">Requested from:</label>
162 [% request.backend | html %]
164 [% IF request.biblio_id %]
166 <label for="biblio">Requested item:</label>
167 <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% request.biblio_id | html %]">Click here to view</a>
171 <label for="branchcode">Collection library:</label>
172 [% Branches.GetName(request.branchcode) | html %]
175 <label for="status">Status:</label>
176 [% request.capabilities.$status.name | html %]
179 <label for="medium">Request type:</label>
180 [% request.medium | html %]
183 <label for="placed">Request placed:</label>
184 [% request.placed | html %]
187 <label for="updated">Last updated:</label>
188 [% request.updated | html %]
191 <label for="notesopac">Notes:</label>
192 [% IF !request.completed %]
193 <textarea name="notesopac" rows="5" cols="50">[% request.notesopac | html %]</textarea>
195 [% request.notesopac | html %]
201 <legend id="backend_legend">Details from [% request.backend | html %]</legend>
202 [% FOREACH meta IN request.metadata %]
203 <div class="requestattr-[% meta.key | html %]">
204 <span class="label">[% meta.key | html %]:</span>
205 [% IF meta.value %][% meta.value | html %][% ELSE %]<span>N/A</span>[% END %]
209 <fieldset class="action illrequest-actions">
210 <input type="hidden" name="illrequest_id" value="[% request.illrequest_id | html %]">
211 <input type="hidden" name="method" value="update">
212 [% IF !request.completed %]
213 [% IF request.status == "NEW" %]
214 <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>
216 <input type="submit" class="update-illrequest btn btn-default" value="Submit modifications">
218 <span class="cancel"><a href="/cgi-bin/koha/opac-illrequests.pl">Cancel</a></span>
222 </div> <!-- / .maincontent -->
224 </div> <!-- / .span10/12 -->
225 </div> <!-- / .row-fluid -->
226 </div> <!-- / .container-fluid -->
227 </div> <!-- / .main -->
229 [% INCLUDE 'opac-bottom.inc' %]
231 [% BLOCK jsinclude %]
232 [% INCLUDE 'datatables.inc' %]
235 $("#illrequestlist").dataTable($.extend(true, {}, dataTablesDefaults, {
237 { "targets": [ -1 ], "sortable": false, "searchable": false }
239 "order": [[ 3, "desc" ]],
242 $("#backend-dropdown-options").removeClass("nojs");
246 [% PROCESS backend_jsinclude %]