@@ -, +, @@ date --- .../intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt | 9 ++++++++- virtualshelves/shelves.pl | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -182,7 +182,14 @@ [% END %] - Date added + + Date added + [% IF sortfield == 'dateadded' %] + [% direction %] sort + [% ELSE %] + + [% END %] + Call number [% IF sortfield == 'itemcallnumber' %] --- a/virtualshelves/shelves.pl +++ a/virtualshelves/shelves.pl @@ -233,7 +233,7 @@ if ( $op eq 'view' ) { if ( $shelf ) { if ( $shelf->can_be_viewed( $loggedinuser ) ) { my $sortfield = $query->param('sortfield') || $shelf->sortfield || 'title'; # Passed in sorting overrides default sorting - $sortfield = 'title' unless grep {/^$sortfield$/}qw( title author copyrightdate itemcallnumber ); + $sortfield = 'title' unless grep {/^$sortfield$/}qw( title author copyrightdate itemcallnumber dateadded ); my $direction = $query->param('direction') || 'asc'; $direction = 'asc' if $direction ne 'asc' and $direction ne 'desc'; my ( $rows, $page ); --