Follow-up fix for Bug 5760 - Add the jquery table sorter to reading record
- Removing option to show 50 items/show all from script and template - Adding parser to exclude articles in title sort (en only, see Bug 5766) - Setting default sort to 'date due descending' as it was previously Signed-off-by: Nicole Engard <nengard@bywatersolutions.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
parent
761fa37297
commit
3e26abc9cd
3 changed files with 19 additions and 39 deletions
|
@ -304,7 +304,7 @@ tr.onissue td {
|
||||||
background-color: #FFFFCC;
|
background-color: #FFFFCC;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.highlight.onissue td {
|
tr.odd.onissue td {
|
||||||
background-color: #FFFFE1;
|
background-color: #FFFFE1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,16 @@
|
||||||
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
|
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
|
||||||
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.pager.js"></script>
|
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.pager.js"></script>
|
||||||
<script type="text/javascript" id="js">$(document).ready(function() {
|
<script type="text/javascript" id="js">$(document).ready(function() {
|
||||||
|
$.tablesorter.addParser({
|
||||||
|
id: 'articles',
|
||||||
|
is: function(s) {return false; },
|
||||||
|
format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); },
|
||||||
|
type: 'text'
|
||||||
|
});
|
||||||
|
$.tablesorter.defaults.widgets = ['zebra'];
|
||||||
$("#table_readingrec").tablesorter({
|
$("#table_readingrec").tablesorter({
|
||||||
sortList: [[1,0]],
|
sortList: [[8,1]],
|
||||||
|
headers: { 1: { sorter: 'articles' }}
|
||||||
}).tablesorterPager({container: $("#pagertable_readingrec"),positionFixed: false,size: 20});
|
}).tablesorterPager({container: $("#pagertable_readingrec"),positionFixed: false,size: 20});
|
||||||
}); </script>
|
}); </script>
|
||||||
</head>
|
</head>
|
||||||
|
@ -23,9 +31,7 @@
|
||||||
<!-- TMPL_INCLUDE NAME="circ-toolbar.inc" -->
|
<!-- TMPL_INCLUDE NAME="circ-toolbar.inc" -->
|
||||||
<h1>Reading Record</h1>
|
<h1>Reading Record</h1>
|
||||||
<form action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" /></form>
|
<form action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" /></form>
|
||||||
<p><!-- TMPL_IF NAME="showfulllink" -->Showing All Items |
|
|
||||||
<a href="readingrec.pl?borrowernumber=<!-- TMPL_VAR name="borrowernumber" -->&limit=50">Show Last 50 Items Only</a> <!-- TMPL_ELSE --> Showing Last 50 Items |
|
|
||||||
<a href="readingrec.pl?borrowernumber=<!-- TMPL_VAR name="borrowernumber" -->&limit=full">Show All Items</a><!-- /TMPL_IF --></p>
|
|
||||||
<span id="pagertable_readingrec" class="pager">
|
<span id="pagertable_readingrec" class="pager">
|
||||||
<form class="formpager"> <strong>page(s)</strong> :
|
<form class="formpager"> <strong>page(s)</strong> :
|
||||||
<img src="<!-- TMPL_VAR name="interface" -->/prog/img/first.png" class="first"/>
|
<img src="<!-- TMPL_VAR name="interface" -->/prog/img/first.png" class="first"/>
|
||||||
|
@ -46,39 +52,23 @@
|
||||||
</span>
|
</span>
|
||||||
<table id="table_readingrec">
|
<table id="table_readingrec">
|
||||||
<thead>
|
<thead>
|
||||||
<th>
|
<th>Date</th>
|
||||||
<a href="readingrec.pl?borrowernumber=<!-- TMPL_VAR name="borrowernumber" -->&order=issuestimestamp&limit=<!-- TMPL_VAR name="limit" -->">Date</a>
|
<th>Title</th>
|
||||||
</th>
|
<th>Author</th>
|
||||||
<th>
|
|
||||||
<a href="readingrec.pl?borrowernumber=<!-- TMPL_VAR name="borrowernumber" -->&order=title&limit=<!-- TMPL_VAR name="limit" -->">Title</a>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<a href="readingrec.pl?borrowernumber=<!-- TMPL_VAR name="borrowernumber" -->&order=author&limit=<!-- TMPL_VAR name="limit" -->">Author</a>
|
|
||||||
</th>
|
|
||||||
<th>Call No.</th>
|
<th>Call No.</th>
|
||||||
<th>Barcode</th>
|
<th>Barcode</th>
|
||||||
<th>Number of Renewals</th>
|
<th>Number of Renewals</th>
|
||||||
<th>Checked out on</th>
|
<th>Checked out on</th>
|
||||||
<th>Checked out from</th>
|
<th>Checked out from</th>
|
||||||
<th>Date Due</th>
|
<th>Date Due</th>
|
||||||
<th>
|
<th>Return Date</th>
|
||||||
<a href="readingrec.pl?borrowernumber=<!-- TMPL_VAR name="borrowernumber" -->&order=returndate%20DESC&limit=<!-- TMPL_VAR name="limit" -->">Return Date</a>
|
|
||||||
</th>
|
|
||||||
</thead>
|
</thead>
|
||||||
<!-- TMPL_LOOP name="loop_reading" -->
|
<!-- TMPL_LOOP name="loop_reading" -->
|
||||||
<!-- TMPL_UNLESS NAME="__odd__" -->
|
|
||||||
<!-- TMPL_IF NAME="returndate" --><tr class="highlight"><!-- TMPL_ELSE --><tr class="highlight onissue"><!-- /TMPL_IF -->
|
|
||||||
<!-- TMPL_ELSE -->
|
|
||||||
<!-- TMPL_IF NAME="returndate" --><tr><!-- TMPL_ELSE --><tr class="onissue"><!-- /TMPL_IF -->
|
<!-- TMPL_IF NAME="returndate" --><tr><!-- TMPL_ELSE --><tr class="onissue"><!-- /TMPL_IF -->
|
||||||
<!-- /TMPL_UNLESS -->
|
|
||||||
<td>
|
<td>
|
||||||
<!-- TMPL_VAR name="issuestimestamp" -->
|
<!-- TMPL_VAR name="issuestimestamp" -->
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR name="title" escape="html" --></a></td>
|
||||||
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">
|
|
||||||
<!-- TMPL_VAR name="title" escape="html" -->
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td><!-- TMPL_VAR name="author" --></td>
|
<td><!-- TMPL_VAR name="author" --></td>
|
||||||
|
|
||||||
|
|
|
@ -50,21 +50,11 @@ if ($input->param('borrowernumber')) {
|
||||||
$data = GetMember(borrowernumber => $borrowernumber);
|
$data = GetMember(borrowernumber => $borrowernumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
my $order=$input->param('order') || 'date_due desc';
|
my $order = 'date_due desc';
|
||||||
my $limit=$input->param('limit');
|
my $limit = 0;
|
||||||
|
|
||||||
if ($limit){
|
|
||||||
if ($limit eq 'full'){
|
|
||||||
$limit=0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$limit=50;
|
|
||||||
}
|
|
||||||
my ( $issues ) = GetAllIssues($borrowernumber,$order,$limit);
|
my ( $issues ) = GetAllIssues($borrowernumber,$order,$limit);
|
||||||
|
|
||||||
my ($template, $loggedinuser, $cookie)
|
my ($template, $loggedinuser, $cookie)= get_template_and_user({template_name => "members/readingrec.tmpl",
|
||||||
= get_template_and_user({template_name => "members/readingrec.tmpl",
|
|
||||||
query => $input,
|
query => $input,
|
||||||
type => "intranet",
|
type => "intranet",
|
||||||
authnotrequired => 0,
|
authnotrequired => 0,
|
||||||
|
|
Loading…
Reference in a new issue