MT 2037 : Update ISBD
This commit is contained in:
parent
079b5e0efd
commit
790b7cc1b9
5 changed files with 33 additions and 5 deletions
|
@ -766,6 +766,7 @@ Return the ISBD view which can be included in opac and intranet
|
|||
|
||||
sub GetISBDView {
|
||||
my $biblionumber = shift;
|
||||
my $template = shift;
|
||||
my $record = GetMarcBiblio($biblionumber);
|
||||
my $itemtype = &GetFrameworkCode($biblionumber);
|
||||
my ($holdingbrtagf,$holdingbrtagsubf) = &GetMarcFromKohaField("items.holdingbranch",$itemtype);
|
||||
|
@ -809,7 +810,7 @@ sub GetISBDView {
|
|||
my $tagsubf = $tag . $subfvalue;
|
||||
$calculated =~
|
||||
s/\{(.?.?.?.?)$tagsubf(.*?)\}/$1$subfieldvalue$2\{$1$tagsubf$2\}/g;
|
||||
$calculated =~s#/cgi-bin/koha/[^/]+/([^.]*.pl\?.*)$#opac-$1#g;
|
||||
if ($template eq "opac") { $calculated =~s#/cgi-bin/koha/[^/]+/([^.]*.pl\?.*)$#opac-$1#g; }
|
||||
|
||||
# field builded, store the result
|
||||
if ( $calculated && !$hasputtextbefore )
|
||||
|
@ -850,7 +851,7 @@ sub GetISBDView {
|
|||
|
||||
$calculated =~
|
||||
s/\{(.?.?.?.?)$tagsubf(.*?)\}/$1$subfieldvalue$2\{$1$tagsubf$2\}/g;
|
||||
$calculated =~s#/cgi-bin/koha/[^/]+/([^.]*.pl\?.*)$#opac-$1#g;
|
||||
if ($template eq "opac") { $calculated =~s#/cgi-bin/koha/[^/]+/([^.]*.pl\?.*)$#opac-$1#g; }
|
||||
}
|
||||
|
||||
# field builded, store the result
|
||||
|
|
|
@ -68,7 +68,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
|||
|
||||
# my @blocs = split /\@/,$ISBD;
|
||||
# my @fields = $record->fields();
|
||||
my $res = GetISBDView($biblionumber);
|
||||
my $res = GetISBDView($biblionumber, "intranet");
|
||||
|
||||
# count of item linked with biblio
|
||||
my $itemcount = GetItemsCount($biblionumber);
|
||||
|
|
|
@ -3103,6 +3103,33 @@ $dbh->do("
|
|||
SetVersion ($DBversion);
|
||||
}
|
||||
|
||||
$DBversion = "3.01.00.120";
|
||||
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
|
||||
$dbh->do(<<'ISBDUPDATE');
|
||||
UPDATE `koha`.`systempreferences` SET `value` = '#200|<p> |<b>{200a}</b>{. 200c}{ = 200d}{ : 200e}{. 200h}{. 200i}{ / 200f}{ ; 200g }|
|
||||
#205|. - |{205a}{ / 205f}|
|
||||
#210|. - |{ 210a }{ : 210c }{, 210d}|
|
||||
|
||||
#461|. - Extrait de : |<a href="/cgi-bin/koha/catalogue/search.pl?q=pqf=@attr 1=/record/datafield[@tag=461]/subfield[@code=t] "{461t}""> <img border="0" src="/opac-tmpl/prog/images/filefind.png" alt="chercher" height="15" title="Chercher sur {461t}"></a>{461t}{, 461x }{ ; 461v}{, 461h}{, 461p}|
|
||||
|
||||
#461||{ 461c}|
|
||||
|
||||
#215|. - |{215a}{ : 215c}{ ; 215d}{ + 215e}|
|
||||
|
||||
#225| - | (<a href="/cgi-bin/koha/catalogue/search.pl?q=pqf=@attr 1=/record/datafield[@tag=225]/subfield[@code=a] "{225a}""> <img border="0" src="/opac-tmpl/prog/images/filefind.png" alt="recherche cat" height="15" title="Chercher sur {225a}"></a>{225a}{ = 225d}{ : 225e}{. 225h}{. 225i}{ / 225f}{, 225x}{ ; 225v}) |
|
||||
|
||||
#200|||</p>
|
||||
|
||||
#010|<p>|ISBN {010a}{ (010b)}. - |</p>
|
||||
|
||||
#300|<p>|{300a}|</p>
|
||||
|
||||
#320|<p[...]'
|
||||
ISBDUPDATE
|
||||
|
||||
print "Upgrade to $DBversion done (isbd updated)\n";
|
||||
SetVersion ($DBversion);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
use strict;
|
||||
|
||||
sub kohaversion {
|
||||
our $VERSION = '3.01.00.119';
|
||||
our $VERSION = '3.01.00.120';
|
||||
# version needs to be set this way
|
||||
# so that it can be picked up by Makefile.PL
|
||||
# during install
|
||||
|
|
|
@ -122,7 +122,7 @@ $template->param(
|
|||
|
||||
# my @blocs = split /\@/,$ISBD;
|
||||
# my @fields = $record->fields();
|
||||
my $res = GetISBDView($biblionumber);
|
||||
my $res = GetISBDView($biblionumber, "opac");
|
||||
|
||||
my $reviews = getreviews( $biblionumber, 1 );
|
||||
foreach ( @$reviews ) {
|
||||
|
|
Loading…
Reference in a new issue