From 698b7da7bb4984e2646aa62d6df7bb9068c52059 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 25 Jun 2010 12:55:24 -0400 Subject: [PATCH] Fix for Bug 3683 - 'Sort by' column in list interface is not translatable --- C4/VirtualShelves/Page.pm | 7 +++++++ .../prog/en/modules/virtualshelves/shelves.tmpl | 4 ++-- .../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 f76047d..73ca42d 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 3f7b387..62ee69a 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 1063eec..bb2078a 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 -- 1.7.0.4