Bugzilla – Attachment 2273 Details for
Bug 3683
'Sort by' column in list interface is not translatable (opac-shelves)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed fix
0001-Fix-for-Bug-3683-Sort-by-column-in-list-interface-is.patch (text/plain), 5.17 KB, created by
Owen Leonard
on 2010-06-25 16:59:49 UTC
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2010-06-25 16:59:49 UTC
Size:
5.17 KB
patch
obsolete
>From 698b7da7bb4984e2646aa62d6df7bb9068c52059 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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 () { > <!-- TMPL_IF NAME="toggle" --><tr class="highlight"><!--TMPL_ELSE--><tr><!-- /TMPL_IF --> > <td><a href="shelves.pl?<!-- TMPL_IF NAME="showprivateshelves" -->display=privateshelves&<!-- /TMPL_IF -->viewshelf=<!-- TMPL_VAR NAME="shelf" -->"><!-- TMPL_VAR NAME="shelfname" ESCAPE="html" --></a></td> > <td><!-- TMPL_VAR NAME="count" --> item(s)</td> >- <td><!-- TMPL_VAR NAME="sortfield" --></td> >+ <td><!-- TMPL_IF NAME="authorsort" -->Author<!-- TMPL_ELSIF NAME="yearsort" -->Year<!-- TMPL_ELSE -->Title<!-- /TMPL_IF --></td> > <td><!-- TMPL_IF NAME="viewcategory1" -->Private<!-- /TMPL_IF --> > <!-- TMPL_IF NAME="viewcategory2" -->Public<!-- /TMPL_IF --> > <!-- TMPL_IF NAME="viewcategory3" -->Open<!-- /TMPL_IF --> >@@ -398,7 +398,7 @@ function placeHold () { > <!-- TMPL_IF NAME="toggle" --><tr class="highlight"><!--TMPL_ELSE--><tr><!-- /TMPL_IF --> > <td><a href="shelves.pl?viewshelf=<!-- TMPL_VAR NAME="shelf" -->"><!-- TMPL_VAR NAME="shelfname" ESCAPE="html" --></a></td> > <td><!-- TMPL_VAR NAME="count" --> item(s)</td> >- <td><!-- TMPL_VAR NAME="sortfield" --></td> >+ <td><!-- TMPL_IF NAME="authorsort" -->Author<!-- TMPL_ELSIF NAME="yearsort" -->Year<!-- TMPL_ELSE -->Title<!-- /TMPL_IF --></td> > <td><!-- TMPL_IF NAME="viewcategory1" -->Private<!-- /TMPL_IF --> > <!-- TMPL_IF NAME="viewcategory2" -->Public<!-- /TMPL_IF --> > <!-- TMPL_IF NAME="viewcategory3" -->Open<!-- /TMPL_IF --> >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() { > <!-- /TMPL_UNLESS --> > <td><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves&viewshelf=<!-- TMPL_VAR NAME="shelf" -->&sortfield=<!-- TMPL_VAR NAME="sortfield" -->"><!-- TMPL_VAR NAME="shelfname" ESCAPE="html" --></a></td> > <td><!-- TMPL_VAR NAME="count" --> item(s)</td> >- <td><!-- TMPL_VAR NAME="sortfield" --></td> >+ <td><!-- TMPL_IF NAME="authorsort" -->Author<!-- TMPL_ELSIF NAME="yearsort" -->Year<!-- TMPL_ELSE -->Title<!-- /TMPL_IF --> >+ </td> > <td> > <!-- TMPL_IF NAME="viewcategory1" -->Private<!-- /TMPL_IF --> > <!-- TMPL_IF NAME="viewcategory2" -->Public<!-- /TMPL_IF --> >@@ -444,7 +445,8 @@ $(function() { > <!-- /TMPL_UNLESS --> > <td><a href="/cgi-bin/koha/opac-shelves.pl?viewshelf=<!-- TMPL_VAR NAME="shelf" -->&sortfield=<!-- TMPL_VAR NAME="sortfield" -->"><!-- TMPL_VAR NAME="shelfname" ESCAPE="html" --></a></td> > <td><!-- TMPL_VAR NAME="count" --> item(s)</td> >- <td><!-- TMPL_VAR NAME="sortfield" --></td> >+ <td><!-- TMPL_IF NAME="authorsort" -->Author<!-- TMPL_ELSIF NAME="yearsort" -->Year<!-- TMPL_ELSE -->Title<!-- /TMPL_IF --> >+ </td> > <td> > <!-- TMPL_IF NAME="viewcategory1" -->Private<!-- /TMPL_IF --> > <!-- TMPL_IF NAME="viewcategory2" -->Public<!-- /TMPL_IF --> >-- >1.7.0.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 3683
:
1514
|
2198
| 2273