From 6a1d07a01cd2d22d3d2ceea2c13f3ecfe2649c79 Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Thu, 28 May 2009 15:12:51 +0200 Subject: [PATCH][HEAD] (bug #3267) show items.uri in opac and intranet Content-Type: text/plain; charset="utf-8" This add a column in normal view, with a link to items.uri URL if it exists. --- catalogue/detail.pl | 3 ++- .../prog/en/modules/catalogue/detail.tmpl | 4 ++++ .../opac-tmpl/prog/en/modules/opac-detail.tmpl | 2 ++ opac/opac-detail.pl | 3 ++- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 1f5a291..00667a5 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -147,7 +147,7 @@ foreach my $item (@items) { $item->{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) ); my $ccode = $item->{'ccode'}; $item->{'ccode'} = $collections->{$ccode} if ( defined( $ccode ) && defined($collections) && exists( $collections->{$ccode} ) ); - foreach (qw(ccode enumchron copynumber)) { + foreach (qw(ccode enumchron copynumber uri)) { $itemfields{$_} = 1 if ( $item->{$_} ); } @@ -193,6 +193,7 @@ $template->param( subtitle => $subtitle, itemdata_ccode => $itemfields{ccode}, itemdata_enumchron => $itemfields{enumchron}, + itemdata_uri => $itemfields{uri}, itemdata_copynumber => $itemfields{copynumber}, volinfo => $itemfields{enumchron} || $dat->{'serial'} , ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl index a117f47..2402ddd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl @@ -172,6 +172,7 @@ function verify_images() { Last seen Barcode Publication Details + URL Copy No. @@ -273,6 +274,9 @@ function verify_images() { () + + "> + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl index 6ac830d..6623758 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl @@ -330,6 +330,7 @@ Collection Call Number Vol Info + URL Copy Serial Data @@ -344,6 +345,7 @@ (&shelfbrowse_itemnumber=#shelfbrowser">Browse Shelf) + "> diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index d260f60..ccc980a 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -156,7 +156,7 @@ for my $itm (@items) { $itm->{'imageurl'} = getitemtypeimagelocation( 'opac', $itemtypes->{ $itm->{itype} }->{'imageurl'} ); $itm->{'description'} = $itemtypes->{ $itm->{itype} }->{'description'}; } - foreach (qw(ccode enumchron copynumber itemnotes)) { + foreach (qw(ccode enumchron copynumber itemnotes uri)) { $itemfields{$_} = 1 if ($itm->{$_}); } @@ -203,6 +203,7 @@ my $subtitle = C4::Biblio::get_koha_field_from_marc('bibliosubtitle', 's RequestOnOpac => C4::Context->preference("RequestOnOpac"), itemdata_ccode => $itemfields{ccode}, itemdata_enumchron => $itemfields{enumchron}, + itemdata_uri => $itemfields{uri}, itemdata_copynumber => $itemfields{copynumber}, itemdata_itemnotes => $itemfields{itemnotes}, authorised_value_images => $biblio_authorised_value_images, -- 1.6.0.4