From 31d9011ebb05b942143e03d94ec283acc8ef4fa9 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 25 Jun 2010 12:59:15 -0400 Subject: [PATCH] Fix for Bug 3683 - 'Sort by' column in list interface is not translatable Signed-off-by: Galen Charlton --- C4/VirtualShelves/Page.pm | 7 +++++++ .../prog/en/modules/virtualshelves/shelves.tmpl | 4 ++-- koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl | 6 ++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm index f76047de05..73ca42db8f 100644 --- a/C4/VirtualShelves/Page.pm +++ b/C4/VirtualShelves/Page.pm @@ -302,6 +302,13 @@ sub shelfpage ($$$$$) { my $category = $shelflist->{$element}->{'category'}; my $owner = $shelflist->{$element}->{'owner'}; my $canmanage = ShelfPossibleAction( $loggedinuser, $element, 'manage' ); + my $sortfield = $shelflist->{$element}->{'sortfield'}; + if ( $sortfield eq 'author' ) { + $shelflist->{$element}->{"authorsort"} = 'author'; + } + if ( $sortfield eq 'year' ) { + $shelflist->{$element}->{"yearsort"} = 'year'; + } $shelflist->{$element}->{"viewcategory$category"} = 1; $shelflist->{$element}->{manageshelf} = $canmanage; if ( $owner eq $loggedinuser or $canmanage ) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl index 3f7b387682..62ee69afb6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl @@ -347,7 +347,7 @@ function placeHold () { display=privateshelves&viewshelf="> item(s) - + AuthorYearTitle Private Public Open @@ -398,7 +398,7 @@ function placeHold () { "> item(s) - + AuthorYearTitle Private Public Open diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl index 1063eecb50..bb2078a0d8 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl @@ -376,7 +376,8 @@ $(function() { &sortfield="> item(s) - + AuthorYearTitle + Private Public @@ -444,7 +445,8 @@ $(function() { &sortfield="> item(s) - + AuthorYearTitle + Private Public -- 2.39.5