@@ -, +, @@ --- C4/Biblio.pm | 28 +++++++++++++++++++++++----- 1 files changed, 23 insertions(+), 5 deletions(-) --- a/C4/Biblio.pm +++ a/C4/Biblio.pm @@ -1163,6 +1163,7 @@ sub GetCOinSBiblio { my $isbn = ''; my $issn = ''; my $publisher = ''; + my $pages = ''; my $titletype = 'b'; # For the purposes of generating COinS metadata, LDR/06-07 can be @@ -1251,14 +1252,31 @@ sub GetCOinSBiblio { $title = "&rft." . $titletype . "title=" . $record->subfield( '245', 'a' ); $subtitle = $record->subfield( '245', 'b' ) || ''; $title .= $subtitle; - $pubyear = $record->subfield( '260', 'c' ) || ''; - $publisher = $record->subfield( '260', 'b' ) || ''; - $isbn = $record->subfield( '020', 'a' ) || ''; - $issn = $record->subfield( '022', 'a' ) || ''; + if ($titletype eq 'a') { + $pubyear = substr $record->field('008')->data(), 7, 4; + $isbn = $record->subfield( '773', 'z' ) || ''; + $issn = $record->subfield( '773', 'x' ) || ''; +# if ($mtx eq 'journal') { + $title .= "&rft.title=" . (($record->subfield( '773', 't' ) || $record->subfield( '773', 'a'))); +# } else { +# $title .= "&rft.btitle=" . (($record->subfield( '773', 't' ) || $record->subfield( '773', 'a')) || ''); +# } + foreach my $rel ($record->subfield( '773', 'g' )) { + if ($pages) { + $pages .= ', '; + } + $pages .= $rel; + } + } else { + $pubyear = $record->subfield( '260', 'c' ) || ''; + $publisher = $record->subfield( '260', 'b' ) || ''; + $isbn = $record->subfield( '020', 'a' ) || ''; + $issn = $record->subfield( '022', 'a' ) || ''; + } } my $coins_value = -"ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3A$mtx$genre$title&rft.isbn=$isbn&rft.issn=$issn&rft.aulast=$aulast&rft.aufirst=$aufirst$oauthors&rft.pub=$publisher&rft.date=$pubyear"; +"ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3A$mtx$genre$title&rft.isbn=$isbn&rft.issn=$issn&rft.aulast=$aulast&rft.aufirst=$aufirst$oauthors&rft.pub=$publisher&rft.date=$pubyear&rft.pages=$pages"; $coins_value =~ s/(\ |&[^a])/\+/g; #&rft.au=&rft.btitle=&rft.date=&rft.pages=&rft.isbn=&rft.aucorp=&rft.place=&rft.pub=&rft.edition=&rft.series=&rft.genre=" --