(bug #3267) show items.uri in opac and intranet

This add a column in normal view, with a link to items.uri URL if it exists.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
This commit is contained in:
Nahuel ANGELINETTI 2009-06-25 14:08:22 +02:00 committed by Henri-Damien LAURENT
parent 48ebc4c532
commit 014618cc43
4 changed files with 10 additions and 2 deletions

View File

@ -128,7 +128,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->{$_} );
}
@ -174,6 +174,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'} ,
);

View File

@ -170,6 +170,7 @@ function verify_images() {
<th>Last seen</th>
<th>Barcode</th>
<!-- TMPL_IF NAME="volinfo" --><th>Publication Details</th><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="itemdata_uri" --><th>URL</th><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="itemdata_copynumber" --><th>Copy No.</th><!-- /TMPL_IF -->
</tr>
<!-- TMPL_LOOP NAME="itemloop" -->
@ -271,6 +272,9 @@ function verify_images() {
<!-- /TMPL_IF -->
<!-- TMPL_VAR NAME="serialseq" --><!-- TMPL_IF NAME="publisheddate" --> (<!-- TMPL_VAR NAME="publisheddate" -->)<!-- /TMPL_IF -->
</td><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="itemdata_uri" -->
<td class="uri"><a href="<!-- TMPL_VAR NAME="uri" -->"><!-- TMPL_VAR NAME="uri" --></a></td>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="itemdata_copynumber" -->
<td class="copynumber"><!-- TMPL_VAR NAME="copynumber" --></td>
<!-- /TMPL_IF -->

View File

@ -248,6 +248,7 @@
<!-- TMPL_IF NAME="itemdata_ccode" --><th>Collection</th><!-- /TMPL_IF -->
<th>Call Number</th>
<!-- TMPL_IF NAME="itemdata_enumchron" --><th>Vol Info</th><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="itemdata_uri" --><th>URL</th><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="itemdata_copynumber" --><th>Copy</th><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="serial" -->
<th>Serial Data</th>
@ -262,6 +263,7 @@
<!-- TMPL_IF NAME="itemdata_ccode" --><td><!-- TMPL_VAR NAME="ccode" --></td><!-- /TMPL_IF -->
<td><!-- TMPL_IF NAME="itemcallnumber" --> <!-- TMPL_VAR NAME="itemcallnumber" --><!-- /TMPL_IF --> <!-- TMPL_IF NAME="OPACShelfBrowser" -->(<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;shelfbrowse_itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->#shelfbrowser">Browse Shelf</a>)<!-- /TMPL_IF --></td>
<!-- TMPL_IF NAME="itemdata_enumchron" --><td><!-- TMPL_VAR NAME="enumchron" --></td><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="itemdata_uri" --><td><a href="<!-- TMPL_VAR NAME="uri" -->"><!-- TMPL_VAR NAME="uri" --></a></td><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="itemdata_copynumber" --><td><!-- TMPL_VAR NAME="copynumber" --></td><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="serial" --><td><!-- TMPL_VAR NAME="serialseq" --> </td>
<td><!-- TMPL_VAR NAME="publisheddate" --> </td><!-- /TMPL_IF -->

View File

@ -143,7 +143,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->{$_});
}
@ -190,6 +190,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,