From dd3d172b81abaf3ef5bc793acda556a51de2f48f Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Wed, 10 Mar 2010 22:25:47 +0100 Subject: [PATCH] MT2502 : Reports Editor's 200$b to biblio's 210$c within unimarc_field_210c plugin Signed-off-by: Henri-Damien LAURENT Signed-off-by: Galen Charlton --- cataloguing/value_builder/unimarc_field_210c.pl | 9 ++++++++- .../cataloguing/value_builder/unimarc_field_210c.tmpl | 8 ++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/cataloguing/value_builder/unimarc_field_210c.pl b/cataloguing/value_builder/unimarc_field_210c.pl index d33c0efbf1..3228dc3283 100755 --- a/cataloguing/value_builder/unimarc_field_210c.pl +++ b/cataloguing/value_builder/unimarc_field_210c.pl @@ -134,7 +134,14 @@ my ($input) = @_; my ($results,$total) = SearchAuthorities( \@tags,\@and_or, \@excluding, \@operator, \@value, $startfrom*$resultsperpage, $resultsperpage,$authtypecode, $orderby); - + + # Getting the $b if it exists + foreach my $_ (@$results) { + if ($_->{reported_tag} =~ m/^\$b/) { + $_->{to_report} = substr($_->{reported_tag}, 2); + } + } + ($template, $loggedinuser, $cookie) = get_template_and_user({template_name => "cataloguing/value_builder/unimarc_field_210c.tmpl", query => $query, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c.tmpl index 4488828b38..bde1feb5d2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c.tmpl @@ -72,7 +72,9 @@ times - ')">choose//images/arrow.gif" width="32" hspace="0" vspace="0" border="0"> + + ')">choose//images/arrow.gif" width="32" hspace="0" vspace="0" border="0"> + @@ -91,12 +93,10 @@ function report(summary) { - var regexp= /--\s*(.*)/; - var result=summary.match(regexp); var doc = opener.document; var field = doc.getElementById(''); - field.value = result[1]; + field.value = summary; self.close(); } -- 2.39.5