From: miker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Thu, 21 Apr 2011 00:09:55 +0000 (+0000)
Subject: add marginal support for surfacing CN affixes in supercat and slimpac CN browse
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f69e07fea68f2ad33e43c92c92991b4653b0e0b7;p=evergreen%2Fbjwebb.git

add marginal support for surfacing CN affixes in supercat and slimpac CN browse

git-svn-id: svn://svn.open-ils.org/ILS/trunk@20266 dcc99617-32d9-48b4-a31d-7c20da2025e4
---

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
index 180c12315..329935bd3 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
@@ -51,6 +51,8 @@ $browse_types{call_number}{xml} = sub {
         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/&/&amp;/go;
@@ -58,6 +60,18 @@ $browse_types{call_number}{xml} = sub {
         $cn_label =~ s/</&lt;/go;
         $cn_label =~ s/>/&gt;/go;
 
+        $cn_prefix =~ s/\n//gos;
+        $cn_prefix =~ s/&/&amp;/go;
+        $cn_prefix =~ s/'/&apos;/go;
+        $cn_prefix =~ s/</&lt;/go;
+        $cn_prefix =~ s/>/&gt;/go;
+
+        $cn_suffix =~ s/\n//gos;
+        $cn_suffix =~ s/&/&amp;/go;
+        $cn_suffix =~ s/'/&apos;/go;
+        $cn_suffix =~ s/</&lt;/go;
+        $cn_suffix =~ s/>/&gt;/go;
+
         (my $ou_class = $cn->owning_lib->class_name) =~ s/::/-/gso;
         $ou_class =~ s/Fieldmapper-//gso;
 
@@ -72,7 +86,7 @@ $browse_types{call_number}{xml} = sub {
 
         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);
diff --git a/Open-ILS/xsl/CNBrowse2HTML.xsl b/Open-ILS/xsl/CNBrowse2HTML.xsl
index b0f0fb3f8..ac971a1b2 100644
--- a/Open-ILS/xsl/CNBrowse2HTML.xsl
+++ b/Open-ILS/xsl/CNBrowse2HTML.xsl
@@ -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>