From 47ecf39e75d7545ddc8165020b2350349a6866db Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Wed, 5 Aug 2009 10:07:36 +0200 Subject: [PATCH] (bug #3497) show publication year, or copyrightdate This change the shelf view in opac, to show publication year, in the column "Year"(that was previously copyrightdate), and is there is no publication year, show copyright date. Signed-off-by: Galen Charlton --- C4/VirtualShelves.pm | 4 ++-- C4/VirtualShelves/Page.pm | 8 ++++---- .../prog/en/modules/opac-shelves.tmpl | 18 ++++++++++++------ 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm index 31dcdb76b5..76786e9bfd 100644 --- a/C4/VirtualShelves.pm +++ b/C4/VirtualShelves.pm @@ -266,8 +266,8 @@ sub GetShelfContents ($;$$$) { ($sortfield) = $sth2->fetchrow_array; } my $query = - " SELECT vc.biblionumber, vc.shelfnumber, vc.dateadded, - biblio.*, biblioitems.itemtype, itemtypes.* + " SELECT vc.biblionumber, vc.shelfnumber, vc.dateadded, itemtypes.*, + biblio.*, biblioitems.itemtype, biblioitems.publicationyear FROM virtualshelfcontents vc LEFT JOIN biblio ON vc.biblionumber = biblio.biblionumber LEFT JOIN biblioitems ON biblio.biblionumber = biblioitems.biblionumber diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm index 999692cfce..2c44dafa33 100644 --- a/C4/VirtualShelves/Page.pm +++ b/C4/VirtualShelves/Page.pm @@ -171,13 +171,13 @@ SWITCH: { if ( ShelfPossibleAction( $loggedinuser, $shelfnumber, 'view' ) ) { my $items; my $authorsort; - my $copyrightsort; + my $yearsort; my $sortfield = ($query->param('sortfield') ? $query->param('sortfield') : 'title'); if ($sortfield eq 'author') { $authorsort = 'author'; } - if ($sortfield eq 'copyrightdate'){ - $copyrightsort = 'copyrightdate'; + if ($sortfield eq 'year'){ + $yearsort = 'year'; } ($items, $totitems) = GetShelfContents($shelfnumber, $shelflimit, $shelfoffset); for my $this_item (@$items) { @@ -198,7 +198,7 @@ SWITCH: { shelfnumber => $shelfnumber, viewshelf => $shelfnumber, authorsort => $authorsort, - copyrightsort => $copyrightsort, + yearsort => $yearsort, manageshelf => $manageshelf, itemsloop => $items, ); 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 b0e1b732ff..5458799a8e 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl @@ -85,7 +85,7 @@ $(function() { sortList: [[2,0]], - + sortList: [[3,1]], sortList: [[1,0]], @@ -94,7 +94,7 @@ $(function() { sortList: [[1,0]], - + sortList: [[2,1]], sortList: [[0,0]], @@ -222,7 +222,7 @@ $(function() { Item Type Title Author - Copyright + Year @@ -256,7 +256,13 @@ $(function() {
_status" class="tagstatus results_summary" style="display:none">Tag status here.
- + + + + + + + @@ -296,7 +302,7 @@ $(function() {
  • @@ -486,7 +492,7 @@ $(function() {
  • -- 2.39.5