Koha/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt
Kyle M Hall a8942c2884 Revert bug 13618 - "Prevent XSS in the Staff Client and the OPAC" due to performance issues
Revert "DBRev to make notes of the XSS patches and the new important dependency."

This reverts commit e140603a59.

Revert "Bug 13618: Specific for branches.opac_info"

This reverts commit 06e4a50f00.

Revert "Bug 13618: (follow-up) Specific for other prefs"

This reverts commit d6475a111f.

Revert "Bug 13618: Fix for debarredcomment and patron messages"

This reverts commit dd98c9df92.

Revert "Bug 13618: Do not display html tags in patron's notices"

This reverts commit a065b243fe.

Revert "Bug 13618: Do not display   and html tags in item fields content"

This reverts commit baeeaffbf8.

Revert "Bug 13618: Fix for system preference description"

This reverts commit a967a09261.

Revert "Bug 13618: Remove html filters for newly pushed code"

This reverts commit 0e98662b10.

Revert "Bug 13618: (follow-up) add missing lines for opac-shelves"

This reverts commit fc2fb605e5.

Revert "Bug 13618: (follow-up) Specific for ColumnsSettings"

This reverts commit bc308fdd9c.

Revert "Bug 13618: Fix for edit biblios and items"

This reverts commit 811c4e8402.

Revert "Bug 13618: followup to remove tabs"

This reverts commit ca8e8c397c.

Revert "Bug 13618: Fix last occurrences recently introduced to master"

This reverts commit bb417b256b.

Revert "Bug 13618: Fix for news"

This reverts commit ae5b98020a.

Revert "Bug 13618: Fix escape on sending baskets or shelves by email"

This reverts commit a7731ffe25.

Revert "Bug 13618: Specific for XSLTBloc"

This reverts commit 11fa38dc29.

Revert "Bug 13618: Specific for Salutation on editing a patron"

This reverts commit 36c07ad6d3.

Revert "Bug 13618: Specific for other prefs"

This reverts commit e6ea281a3b.

Revert "Bug 13618 - memberentrygen.tt errors Not a GLOB reference"

This reverts commit 7824874557.

Revert "Bug 13618: Specific for ColumnsSettings"

This reverts commit 1834da3da3.

Revert "Bug 13618: Specific for IntranetUser* and OPACUser* prefs"

This reverts commit 21ae62b253.

Revert "Bug 13618: Fix error 'Not a GLOB reference'"

This reverts commit 602bdbab4c.

Revert "Bug 13618: Specific for the ISBD view"

This reverts commit d254362435.

Revert "Bug 13618: Specific for pagination_bar"

This reverts commit 8837a8ae68.

Revert "Bug 13618: Specific places where we don't need to escape variables - intra"

This reverts commit 00eff140b3.

Revert "Bug 13618: Remove html filters at the intranet"

This reverts commit 7db851ff03.

Revert "Bug 13618: Specific places where we don't need to escape variables"

This reverts commit 49a3738b8d.

Revert "Bug 13618: Remove html filters at the OPAC"

This reverts commit cedaa0e23e.

Revert "Bug 13618: Use Template::Stash::AutoEscaping to use the html filter"

This reverts commit 01b38d3b13.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2016-02-11 19:39:53 +00:00

205 lines
7.6 KiB
Text

[% USE KohaDates %]
[% USE AuthorisedValues %]
[%- USE Branches -%]
[%- USE ItemTypes -%]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Circulation &rsaquo; Holds to pull</title>
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'calendar.inc' %]
<!-- Plugin datatables -->
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
[% INCLUDE 'datatables.inc' %]
<script type="text/JavaScript">
//<![CDATA[
$(document).ready(function() {
var holdst = $("#holdst").dataTable($.extend(true, {}, dataTablesDefaults, {
"aoColumnDefs": [
{ "sType": "anti-the", "aTargets" : [ "anti-the" ] },
{ "sType": "title-string", "aTargets" : [ "title-string" ] },
{ "sType": "string", "aTargets": [ "string-sort" ] } //Target columns that use <br> separators and pull-down menus.
],
"sPaginationType": "full_numbers"
}));
holdst.fnAddFilters("filter");
[%# add separateData function to cleanse jQuery select lists by breaking apart strings glued with BR tags and then de-duplicating any repeated library codes %]
function separateData ( ColumnData ){
var cD = ColumnData;
var new_array = new Array();
for ( j=0 ; j<cD.length ; j++ ) {
var split_array = cD[j].split(/<br>/gi);
for ( k=0 ; k<split_array.length ; k++ ){
var check_array = $.inArray(split_array[k], new_array);
if (check_array == -1) {
new_array.push(split_array[k]);
}
}
}
new_array.sort();
return new_array;
}
[%# add SeparateData function into createSelect function, so that it does the createSelect on clean data %]
function createSelect( data ) {
data = separateData(data);
var r='<select style="width:99%"><option value="">' + _("None") + '</option>', i, len=data.length;
for ( i=0 ; i<len ; i++ ) {
r += '<option value="'+data[i]+'">'+data[i]+'</option>';
}
return r+'</select>';
}
$("#homebranchfilter").each( function () {
$(this).html( createSelect( holdst.fnGetColumnData(4) ) );
$('select', this).change( function () {
var filter_value = $(this).val();
if(filter_value){
filter_value = "(^|>)"+filter_value+"($|<)";
}
holdst.fnFilter( filter_value, 4, true );
} );
} );
$("#itypefilter").each( function () {
$(this).html( createSelect( holdst.fnGetColumnData(8) ) );
$('select', this).change( function () {
holdst.fnFilter( $(this).val(), 8 );
} );
} );
$("#locationfilter").each( function () {
$(this).html( createSelect( holdst.fnGetColumnData(9) ) );
$('select', this).change( function () {
holdst.fnFilter( $(this).val(), 9 );
} );
} );
});
//]]>
</script>
</head>
<body id="circ_pendingreserves" class="circ">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'circ-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> &rsaquo; Holds to pull</div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<h2>Holds to pull[% IF ( run_report ) %] placed between [% from | $KohaDates %] and [% to | $KohaDates %][% END %]</h2>
[% IF ( run_report ) %]
<h3>Reported on [% todaysdate | $KohaDates %]</h3>
<p>The following holds have not been filled. Please retrieve them and check them in.</p>
<div class="searchresults">
[% IF ( reserveloop ) %]
<table id="holdst">
<thead>
<tr>
<th>Pull this many items</th>
<th>Items available</th>
<th>Patrons with holds</th>
<th class="anti-the">Title</th>
<th class="string-sort">Libraries</th>
<th>Available call numbers</th>
<th>Available copy numbers</th>
<th>Available enumeration</th>
<th class="string-sort">Available itypes</th>
<th class="string-sort">Available locations</th>
<th class="title-string">Earliest hold date</th>
</tr>
</thead>
<tbody>
[% FOREACH reserveloo IN reserveloop %]
<tr>
[% IF ( reserveloo.borrowernumber ) %]
<td><p><b>[% reserveloo.pullcount %]</b></p></td>
<td>[% reserveloo.count %]</td>
<td>[% reserveloo.rcount %]</td>
<td>
<p>
[% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %]
[% reserveloo.title |html %]</a></p>
[% IF ( reserveloo.author ) %]<p> by [% reserveloo.author %]</p>[% END %]
</td>
[% ELSE %]
<td>"</td>
<td>"</td>
<td>"</td>
<td>"</td>
[% END %]
<td>
[% FOREACH holdingbranch IN reserveloo.holdingbranches %]
[% Branches.GetName ( holdingbranch ) %]<br>
[% END %]
</td>
<td><p>[% reserveloo.itemcallnumber %]</p></td>
<td><p>[% reserveloo.copyno %]</p></td>
<td><p>[% reserveloo.enumchron %]</p></td>
<td>
[% FOREACH itype IN reserveloo.itypes %]
[% ItemTypes.GetDescription( itype ) %]
[% END %]
</td>
<td>
[% FOREACH loc IN reserveloo.locations %]
[% AuthorisedValues.GetByCode('LOC', loc) %]<br>
[% END %]
</td>
<td>
<span title="[% reserveloo.reservedate %]">[% reserveloo.reservedate | $KohaDates %] in [% Branches.GetName ( reserveloo.branch ) %]</span>
[% IF ( reserveloo.statusw ) %]<p>Waiting</p>[% END %][% IF ( reserveloo.statusf ) %]<p>Fulfilled</p>[% END %]
</td>
</tr>
[% END %]
</tbody>
<tfoot>
<tr>
<td><input type="text" class="filter" data-column_num="0" placeholder="Pull this many items" style="width:95%"/></td>
<td><input type="text" class="filter" data-column_num="1" placeholder="Items available" style="width:95%"/></td>
<td><input type="text" class="filter" data-column_num="2" placeholder="Patron holds" style="width:95%"/></td>
<td><input type="text" class="filter" data-column_num="3" placeholder="Title" style="width:95%"/></td>
<td id="homebranchfilter"></td>
<td><input type="text" class="filter" data-column_num="5" placeholder="Call number" style="width:95%"/></td>
<td><input type="text" class="filter" data-column_num="6" placeholder="Available copy" style="width:95%"/></td>
<td><input type="text" class="filter" data-column_num="7" placeholder="Available enumeration" style="width:95%"/></td>
<td id="itypefilter"></td>
<td id="locationfilter"></td>
<td></td>
</tr>
</tfoot>
</table>
[% ELSE %]
<b>No items found.</b>
[% END %]
</div>
[% END %]
</div>
</div>
<div class="yui-b">
<div id="filters">
<form action="/cgi-bin/koha/circ/pendingreserves.pl" method="post" >
<fieldset class="brief">
<h4>Refine results</h4>
<ol>
<li>
<label for="from">
Start date:
</label>
<input type="text" size="10" id="from" name="from" value="[% from | $KohaDates %]" class="datepickerfrom" />
</li>
<li><label for="to">
End date:
</label>
<input type="text" size="10" id="to" name="to" value="[% to | $KohaDates %]" class="datepickerto" />
</li>
</ol>
<p><i>(Inclusive, default is [% HoldsToPullStartDate %] days ago to [% IF ( HoldsToPullEndDate ) %][% HoldsToPullEndDate %] days ahead[% ELSE %]today[% END %], set other date ranges as needed. )</i></p>
<fieldset class="action"><input type="submit" name="run_report" value="Submit" class="submit"/></fieldset>
</fieldset>
</form>
</div>
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]