Bugzilla – Attachment 48658 Details for
Bug 14377
Indicate that a record is suppressed in staff client
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14377 [QA Followup] - Use true value description for authorised value
Bug-14377-QA-Followup---Use-true-value-description.patch (text/plain), 4.06 KB, created by
Jonathan Druart
on 2016-03-04 09:41:03 UTC
(
hide
)
Description:
Bug 14377 [QA Followup] - Use true value description for authorised value
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-03-04 09:41:03 UTC
Size:
4.06 KB
patch
obsolete
>From 1cb13ae3bb9eebc5e171716de829ee45a3db5d3d Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 10 Dec 2015 12:30:00 +0000 >Subject: [PATCH] Bug 14377 [QA Followup] - Use true value description for > authorised value > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/XSLT.pm | 19 +++++++++++++++++-- > .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 3 ++- > .../prog/en/xslt/MARC21slim2intranetResults.xsl | 3 ++- > 3 files changed, 21 insertions(+), 4 deletions(-) > >diff --git a/C4/XSLT.pm b/C4/XSLT.pm >index 5622e5f..2b83279 100644 >--- a/C4/XSLT.pm >+++ b/C4/XSLT.pm >@@ -86,8 +86,8 @@ sub transformMARCXML4XSLT { > $value = GetAuthorisedValueDesc( $tag, $letter, $value, '', $tagslib ) > if $av->{ $tag }->{ $letter }; > push( @new_subfields, $letter, $value ); >- } >- $field ->replace_with( MARC::Field->new( >+ } >+ $field->replace_with( MARC::Field->new( > $tag, > $field->indicator(1), > $field->indicator(2), >@@ -220,6 +220,21 @@ sub XSLTParse4Display { > $sysxml .= "<syspref name=\"singleBranchMode\">$singleBranchMode</syspref>\n"; > > $sysxml .= "</sysprefs>\n"; >+ >+ ## Non-syspref variables that need to be computed >+ $sysxml .= "<OtherVars>"; >+ >+ # Fetch the authorised value description for 942$n ( supressed in opac ) for the value '1' >+ # if 942$n is not mapped, the return value will be '1' which means even if the field is not >+ # mapped in the framework, we will still get the correct value to compare against >+ my $frameworkcode = GetFrameworkCode($biblionumber) || ''; >+ my $tagslib = &GetMarcStructure(1,$frameworkcode); >+ my $value = GetAuthorisedValueDesc( '942', 'n', '1', '', $tagslib ); >+ $sysxml .= "<OtherVar name=\"Field942_1_True_Value\">$value</OtherVar>"; >+ >+ $sysxml .= "</OtherVars>\n"; >+ ## End non-syspref variables that need to be computed >+ > $xmlrecord =~ s/\<\/record\>/$itemsxml$sysxml\<\/record\>/; > if ($fixamps) { # We need to correct the HTML entities that Zebra outputs > $xmlrecord =~ s/\&amp;/\&/g; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index d1293aa..6a46267 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -91,7 +91,8 @@ > </xsl:variable> > > <!-- Indicate if record is suppressed in OPAC --> >- <xsl:if test="marc:datafield[@tag=942][marc:subfield[@code='n'] = '1']"> >+ <xsl:variable name="Field942_1_True_Value" select="marc:OtherVars/marc:OtherVar[@name='Field942_1_True_Value']"/> >+ <xsl:if test="marc:datafield[@tag=942][marc:subfield[@code='n'] = $Field942_1_True_Value]"> > <span class="results_summary suppressed_opac"><xsl:value-of select="concat('#',marc:datafield[@tag=999]/marc:subfield[@code='c'])"/> - Suppressed in OPAC</span> > </xsl:if> > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >index 2019142..e3513c1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >@@ -282,7 +282,8 @@ > </xsl:variable> > > <!-- Indicate if record is suppressed in OPAC --> >- <xsl:if test="marc:datafield[@tag=942][marc:subfield[@code='n'] = '1']"> >+ <xsl:variable name="Field942_1_True_Value" select="marc:OtherVars/marc:OtherVar[@name='Field942_1_True_Value']"/> >+ <xsl:if test="marc:datafield[@tag=942][marc:subfield[@code='n'] = $Field942_1_True_Value]"> > <span class="results_summary suppressed_opac"><xsl:value-of select="concat('#',marc:datafield[@tag=999]/marc:subfield[@code='c'])"/> - Suppressed in OPAC</span> > </xsl:if> > >-- >2.7.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14377
:
42424
|
42436
|
42709
|
43026
|
45564
|
45565
|
45566
|
45568
|
46900
|
46993
|
48657
|
48658
|
48659
|
48660
|
48661
|
49718
|
49719
|
49720
|
49721
|
49722
|
50360
|
50361
|
50720
|
50721
|
50839
|
50842
|
50843
|
50844
|
50881
|
50882
|
50883
|
50884
|
50885
|
50987