+[% USE raw %]
[% USE Koha %]
+[% USE KohaDates %]
[% USE Branches %]
[% INCLUDE 'doc-head-open.inc' %]
-<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Your Interlibrary loan requests</title>[% INCLUDE 'doc-head-close.inc' %]
+<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Your interlibrary loan requests</title>[% INCLUDE 'doc-head-close.inc' %]
[% BLOCK cssinclude %][% END %]
</head>
[% INCLUDE 'bodytag.inc' bodyid='opac-illrequests' bodyclass='scrollto' %]
[% IF method != 'list' %]
<li><a href="/cgi-bin/koha/opac-illrequests.pl">Interlibrary loan requests</a> <span class="divider">›</span></li>
[% IF method == 'create' %]
- <li>New Interlibrary loan request</li>
+ <li>New interlibrary loan request</li>
[% ELSIF method == 'view' %]
- <li>View Interlibrary loan request</li>
+ <li>View interlibrary loan request</li>
[% END %]
[% ELSE %]
<li>Interlibrary loan requests</li>
[% ELSE %]
<div id="illrequests" class="maincontent">
[% IF method == 'create' %]
- <h2>New Interlibrary loan request</h2>
+ <h2>New interlibrary loan request</h2>
[% IF stage == 'copyrightclearance' %]
[% INCLUDE messages %]
<div>
<p>
- [% Koha.Preference('ILLModuleCopyrightClearance') %]
+ [% Koha.Preference('ILLModuleCopyrightClearance') | $raw %]
</p>
- <a href="?method=create&stage=copyrightclearance&backend=[% whole.value.backend %]"
+ <a href="?method=create&stage=copyrightclearance&backend=[% whole.value.backend | uri %]"
class="btn btn-sm btn-default"><i class="fa fa-check"></i> Yes</a>
<a href="/cgi-bin/koha/opac-illrequests.pl"
class="btn btn-sm btn-default"><i class="fa fa-times"></i> No</a>
<label for="backend">Provider:</label>
<select name="backend">
[% FOREACH backend IN backends %]
- <option value="[% backend %]">[% backend %]</option>
+ <option value="[% backend | html %]">[% backend | html %]</option>
[% END %]
</select>
</fieldset>
<fieldset class="action">
- <input type="hidden" name="method" value="create">
- <input type="submit" name="create_select_backend" value="Next">
+ <input type="hidden" name="method" value="create" />
+ <input type="submit" name="create_select_backend" value="Next" />
</fieldset>
</form>
[% ELSE %]
</button>
<ul id="backend-dropdown-options" class="dropdown-menu nojs" aria-labelledby="ill-backend-dropdown">
[% FOREACH backend IN backends %]
- <li><a href="/cgi-bin/koha/opac-illrequests.pl?method=create&backend=[% backend %]">[% backend %]</a></li>
+ <li><a href="/cgi-bin/koha/opac-illrequests.pl?method=create&backend=[% backend | uri %]">[% backend | html %]</a></li>
[% END %]
</ul>
[% ELSE %]
- <a id="ill-new" class="btn btn-default" href="/cgi-bin/koha/opac-illrequests.pl?method=create&backend=[% backends.0 %]">
+ <a id="ill-new" class="btn btn-default" href="/cgi-bin/koha/opac-illrequests.pl?method=create&backend=[% backends.0 | html %]">
<i class="fa fa-plus"></i> Create a new request
</a>
[% END %]
<table id="illrequestlist" class="table table-bordered table-striped">
<thead>
<tr>
+ <th>Request ID</th>
<th>Author</th>
<th>Title</th>
<th>Requested from</th>
<th>Request type</th>
<th>Status</th>
- <th>Request placed</th>
- <th>Last updated</th>
+ <th class="title-string">Request placed</th>
+ <th class="title-string">Last updated</th>
<th></th>
</tr>
</thead>
<tbody>
[% FOREACH request IN requests %]
- [% status = request.status %]
+ [% status = request.status | html %]
+ [% type = request.get_type %]
<tr>
- <td>[% request.metadata.Author || 'N/A' %]</td>
- <td>[% request.metadata.Title || 'N/A' %]</td>
- <td>[% request.backend %]</td>
- <td>[% request.medium %]</td>
- <td>[% request.capabilities.$status.name %]</td>
- <td>[% request.placed %]</td>
- <td>[% request.updated %]</td>
+ <td>[% request.id | html %]</td>
<td>
- <a href="/cgi-bin/koha/opac-illrequests.pl?method=view&illrequest_id=[% request.id %]" class="btn btn-default btn-small pull-right">View</a>
+ [% IF request.metadata.Author %][% request.metadata.Author | html %][% ELSE %]<span>N/A</span>[% END %]
+ </td>
+ <td>
+ [% IF request.metadata.Title %][% request.metadata.Title | html %][% ELSE %]<span>N/A</span>[% END %]
+ </td>
+ <td>[% request.backend | html %]</td>
+ <td>
+ [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
+ </td>
+ <td>[% request.capabilities.$status.name | html %]</td>
+ <td><span title="[% request.placed | html %]">[% request.placed | $KohaDates %]</span></td>
+ <td><span title="[% request.updated | html %]">[% request.updated | $KohaDates %]</span></td>
+ <td>
+ <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>
</td>
</tr>
[% END %]
</tbody>
</table>
[% ELSIF method == 'view' %]
- <h2>View Interlibrary loan request</h2>
+ <h2>View interlibrary loan request</h2>
[% INCLUDE messages %]
[% status = request.status %]
<form method="post" action="?method=update" id="illrequestupdate-form" novalidate="novalidate">
<fieldset class="rows">
<legend id="library_legend">Details from library</legend>
<ol>
+ [% type = request.get_type %]
+ <li>
+ <label for="request_id">Request ID:</label>
+ [% request.id | html %]
+ </li>
<li>
<label for="backend">Requested from:</label>
- [% request.backend %]
+ [% request.backend | html %]
</li>
[% IF request.biblio_id %]
<li>
<label for="biblio">Requested item:</label>
- <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% request.biblio_id %]">Click here to view</a>
+ <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% request.biblio_id | uri %]">Click here to view</a>
</li>
[% END %]
<li>
<label for="branchcode">Collection library:</label>
- [% Branches.GetName(request.branchcode) %]
+ [% Branches.GetName(request.branchcode) | html %]
</li>
<li>
<label for="status">Status:</label>
- [% request.capabilities.$status.name %]
+ [% request.capabilities.$status.name | html %]
</li>
<li>
<label for="medium">Request type:</label>
- [% request.medium %]
+ [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
</li>
<li>
<label for="placed">Request placed:</label>
- [% request.placed %]
+ [% request.placed | $KohaDates %]
</li>
<li>
<label for="updated">Last updated:</label>
- [% request.updated %]
+ [% request.updated | $KohaDates %]
</li>
<li>
<label for="notesopac">Notes:</label>
</ol>
</fieldset>
<div class="rows">
- <legend id="backend_legend">Details from [% request.backend %]</legend>
+ <legend id="backend_legend">Details from [% request.backend | html %]</legend>
[% FOREACH meta IN request.metadata %]
- <div class="requestattr-[% meta.key %]">
- <span class="label">[% meta.key %]:</span>
- [% meta.value || 'N/A' %]
+ <div class="requestattr-[% meta.key | html %]">
+ <span class="label">[% meta.key | html %]:</span>
+ [% IF meta.value %][% meta.value | html %][% ELSE %]<span>N/A</span>[% END %]
</div>
[% END %]
</div>
<fieldset class="action illrequest-actions">
- <input type="hidden" name="illrequest_id" value="[% request.illrequest_id %]">
- <input type="hidden" name="method" value="update">
+ <input type="hidden" name="illrequest_id" value="[% request.illrequest_id | html %]" />
+ <input type="hidden" name="method" value="update" />
[% IF !request.completed %]
[% IF request.status == "NEW" %]
- <a class="cancel-illrequest btn btn-danger" href="/cgi-bin/koha/opac-illrequests.pl?method=cancreq&illrequest_id=[% request.illrequest_id %]">Request cancellation</a>
+ <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>
[% END %]
- <input type="submit" class="update-illrequest btn btn-default" value="Submit modifications">
+ <input type="submit" class="update-illrequest btn btn-default" value="Submit modifications" />
[% END %]
<span class="cancel"><a href="/cgi-bin/koha/opac-illrequests.pl">Cancel</a></span>
</fieldset>
//<![CDATA[
$("#illrequestlist").dataTable($.extend(true, {}, dataTablesDefaults, {
"columnDefs": [
- { "targets": [ -1 ], "sortable": false, "searchable": false }
+ { "targets": [ -1 ], "sortable": false, "searchable": false },
+ { "type": "title-string", "targets" : [ "title-string" ] }
],
"order": [[ 3, "desc" ]],
"deferRender": true