[open-ils-commits] r20266 - in trunk/Open-ILS: src/perlmods/lib/OpenILS/WWW xsl (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Apr 20 20:09:56 EDT 2011
Author: miker
Date: 2011-04-20 20:09:55 -0400 (Wed, 20 Apr 2011)
New Revision: 20266
Modified:
trunk/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
trunk/Open-ILS/xsl/CNBrowse2HTML.xsl
Log:
add marginal support for surfacing CN affixes in supercat and slimpac CN browse
Modified: trunk/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm 2011-04-20 20:32:12 UTC (rev 20265)
+++ trunk/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm 2011-04-21 00:09:55 UTC (rev 20266)
@@ -51,6 +51,8 @@
my $cn_tag = "tag:open-ils.org,$year:$cn_class/".$cn->id;
my $cn_lib = $cn->owning_lib->shortname;
my $cn_label = $cn->label;
+ my $cn_prefix = $cn->prefix->label;
+ my $cn_suffix = $cn->suffix->label;
$cn_label =~ s/\n//gos;
$cn_label =~ s/&/&/go;
@@ -58,6 +60,18 @@
$cn_label =~ s/</</go;
$cn_label =~ s/>/>/go;
+ $cn_prefix =~ s/\n//gos;
+ $cn_prefix =~ s/&/&/go;
+ $cn_prefix =~ s/'/'/go;
+ $cn_prefix =~ s/</</go;
+ $cn_prefix =~ s/>/>/go;
+
+ $cn_suffix =~ s/\n//gos;
+ $cn_suffix =~ s/&/&/go;
+ $cn_suffix =~ s/'/'/go;
+ $cn_suffix =~ s/</</go;
+ $cn_suffix =~ s/>/>/go;
+
(my $ou_class = $cn->owning_lib->class_name) =~ s/::/-/gso;
$ou_class =~ s/Fieldmapper-//gso;
@@ -72,7 +86,7 @@
my $rec_tag = "tag:open-ils.org,$year:$rec_class/".$cn->record->id.'/'.$cn->owning_lib->shortname;
- $content .= "<volume id='$cn_tag' lib='$cn_lib' label='$cn_label'>\n";
+ $content .= "<volume id='$cn_tag' lib='$cn_lib' prefix='$cn_prefix' label='$cn_label' suffix='$cn_suffix'>\n";
$content .= "<owning_lib xmlns='http://open-ils.org/spec/actors/v1' id='$ou_tag' name='$ou_name'/>\n";
my $r_doc = $parser->parse_string($cn->record->marc);
Modified: trunk/Open-ILS/xsl/CNBrowse2HTML.xsl
===================================================================
--- trunk/Open-ILS/xsl/CNBrowse2HTML.xsl 2011-04-20 20:32:12 UTC (rev 20265)
+++ trunk/Open-ILS/xsl/CNBrowse2HTML.xsl 2011-04-21 00:09:55 UTC (rev 20266)
@@ -56,7 +56,9 @@
<div style="border:solid #999999 1px;">
<span>
<dl>
+ <xsl:value-of select="@prefix"/>
<xsl:value-of select="@label"/>
+ <xsl:value-of select="@suffix"/>
<dd><xsl:apply-templates select="marc:record"/></dd>
<dd><xsl:value-of select="act:owning_lib/@name"/></dd>
</dl>
More information about the open-ils-commits
mailing list