Bugzilla – Attachment 77535 Details for
Bug 19039
Results of virtual shelves (lists) not sortable by date added
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19039: Results of virtual shelves (lists) not sortable by date
Bug-19039-Results-of-virtual-shelves-lists-not-sor.patch (text/plain), 3.23 KB, created by
Owen Leonard
on 2018-08-07 14:26:30 UTC
(
hide
)
Description:
Bug 19039: Results of virtual shelves (lists) not sortable by date
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2018-08-07 14:26:30 UTC
Size:
3.23 KB
patch
obsolete
>From bbbd66a1892b46381a6ead3f4ebc69b4c7795f9d Mon Sep 17 00:00:00 2001 >From: Maryse Simard <maryse.simard@inlibro.com> >Date: Tue, 12 Jun 2018 13:42:23 -0400 >Subject: [PATCH] Bug 19039: Results of virtual shelves (lists) not sortable by > date >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >In the staff client, when viewing the content of a list, it can be sorted by 'title', 'author' or 'call number' but not by 'date added'. > >Test plan: >1) In the staff client, view a list containing several items >2) Notice that you can't sort by 'date added' >3) Apply the patch >4) Repeat step 1 >5) The list can now be sorted by 'date added' > >Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au> > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > .../intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt | 9 ++++++++- > virtualshelves/shelves.pl | 2 +- > 2 files changed, 9 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >index 35a70ff..760e6b9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >@@ -182,7 +182,14 @@ > <img src="[% interface %]/[% theme %]/img/ascdesc.gif" alt="" /> > [% END %] > </th> >- <th>Date added</th> >+ <th> >+ <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber %]&sortfield=dateadded&direction=[% IF sortfield != 'dateadded' %]asc[% ELSE %][% new_direction %][% END %]">Date added</a> >+ [% IF sortfield == 'dateadded' %] >+ <img src="[% interface %]/[% theme %]/img/[% direction %].gif" alt="[% direction %] sort" /> >+ [% ELSE %] >+ <img src="[% interface %]/[% theme %]/img/ascdesc.gif" alt="" /> >+ [% END %] >+ </th> > <th> > <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber %]&sortfield=itemcallnumber&direction=[% IF sortfield != 'itemcallnumber' %]asc[% ELSE %][% new_direction %][% END %]">Call number</a> > [% IF sortfield == 'itemcallnumber' %] >diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl >index 192580f..bc54559 100755 >--- a/virtualshelves/shelves.pl >+++ b/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 ); >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19039
:
76313
|
76663
|
77319
|
77535
|
77536
|
77669
|
77670