fixing "opac" format for supercat and unapi
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 22 May 2006 21:35:47 +0000 (21:35 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 22 May 2006 21:35:47 +0000 (21:35 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@4349 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
Open-ILS/web/opac/skin/default/js/rdetail.js
Open-ILS/web/opac/skin/default/js/result_common.js
Open-ILS/web/opac/skin/default/xml/header.xml
Open-ILS/web/opac/skin/default/xml/result/result_table.xml
Open-ILS/xsl/ATOM2XHTML.xsl
Open-ILS/xsl/MARC21slim2HTMLCard.xsl

index f1cd3d7..b523ba3 100644 (file)
@@ -170,9 +170,9 @@ sub unapi {
        }
 
        if ($format eq 'opac') {
-               print "Location: /opac/en-US/skin/default/xml/rresult.xml?m=$id\n\n"
+               print "Location: $root/../../en-US/skin/default/xml/rresult.xml?m=$id\n\n"
                        if ($type eq 'metarecord');
-               print "Location: /opac/en-US/skin/default/xml/rdetail.xml?r=$id\n\n"
+               print "Location: $root/../../en-US/skin/default/xml/rdetail.xml?r=$id\n\n"
                        if ($type eq 'record');
                return 302;
        } elsif ($format =~ /^html/o) {
@@ -310,9 +310,9 @@ sub supercat {
        }
 
        if ($format eq 'opac') {
-               print "Location: $base/../../en-US/skin/default/xml/rresult.xml?m=$id\n\n"
+               print "Location: $root/../../en-US/skin/default/xml/rresult.xml?m=$id\n\n"
                        if ($type eq 'metarecord');
-               print "Location: $base/../../en-US/skin/default/xml/rdetail.xml?r=$id\n\n"
+               print "Location: $root/../../en-US/skin/default/xml/rdetail.xml?r=$id\n\n"
                        if ($type eq 'record');
                return 302;
        } elsif ($format =~ /^html/o) {
@@ -384,10 +384,10 @@ sub bookbag_feed {
 
        my $bucket_tag = "tag:$host,$year:record_bucket/$id";
        if ($type eq 'opac') {
-               print "Location: /opac/en-US/skin/default/xml/rresult.xml?rt=list&" .
+               print "Location: $root/../../en-US/skin/default/xml/rresult.xml?rt=list&" .
                        join('&', map { "rl=" . $_->target_biblio_record_entry } @{ $bucket->items }) .
                        "\n\n";
-               return Apache2::Const::OK;
+               return 302;
        }
 
        my $feed = create_record_feed(
@@ -452,10 +452,10 @@ sub changes_feed {
        my $list = $supercat->request("open-ils.supercat.$rtype.record.$axis.recent", $date, $limit)->gather(1);
 
        if ($type eq 'opac') {
-               print "Location: /opac/en-US/skin/default/xml/rresult.xml?rt=list&" .
+               print "Location: $root/../../en-US/skin/default/xml/rresult.xml?rt=list&" .
                        join('&', map { "rl=" . $_ } @$list) .
                        "\n\n";
-               return Apache2::Const::OK;
+               return 302;
        }
 
        my $feed = create_record_feed( $type, $list, $unapi);
index 81c7de3..0b7bf4e 100644 (file)
@@ -59,9 +59,8 @@ function buildunAPISpan (span, type, id) {
         var cgi = new CGI();
         var d = new Date();
 
-        addCSSClass(span,'unapi-uri');
+        addCSSClass(span,'unapi-id');
 
-        span.appendChild(text('unAPI'));
         span.setAttribute(
                 'title',
                 'tag:' + cgi.server_name + ',' +
@@ -77,13 +76,12 @@ function rdetailViewMarc(r,id) {
 
        var d = new Date();
 
-       var div = elem('div', { "class" : 'hide_me' });
-       var span = div.appendChild( elem('span') );
+       var span = div.appendChild( elem('abbr') );
 
        buildunAPISpan( span, 'biblio-record_entry', record.doc_id() );
 
        /* add the unapi span inside a hidden div */
-       $('rdetail_view_marc_box').insertBefore(div, $('rdetail_view_marc_box').firstChild);
+       $('rdetail_view_marc_box').insertBefore(span, $('rdetail_view_marc_box').firstChild);
 }
 
 
index f72916e..e37a3a4 100644 (file)
@@ -304,9 +304,8 @@ function buildunAPISpan (span, type, id) {
        var cgi = new CGI();
        var d = new Date();
 
-       addCSSClass(span,'unapi-uri');
+       addCSSClass(span,'unapi-id');
 
-       span.appendChild(text('unAPI'));
        span.setAttribute(
                'title',
                'tag:' + cgi.server_name + ',' +
index 5aa7d35..b7db99e 100644 (file)
@@ -4,7 +4,7 @@
        <!--#include virtual="common/css_common.xml"-->
 
        <title>&<!--#echo var="OILS_TITLE"-->;</title>
-       <link rel="meta" type="application/xml" title="unAPI" href="../../../../extras/unapi"/>
+       <link rel="meta" type="application/xml" title="unAPI" href="/opac/extras/unapi"/>
 
        <!--#if expr="$slimpac!='true'"-->
                <!--#include virtual="common/js_common.xml"-->
index 0e84f83..83515fe 100644 (file)
@@ -41,9 +41,9 @@
                                                                                <!-- Title goes here -->
                                                                        </a>
                                                                        <!-- Empty span used for creating unAPI links -->
-                                                                       <span name="unapi" class="unapi-uri hide_me">
+                                                                       <abbr name="unapi" class="unapi-id">
                                                                                <!-- unAPI URI goes here -->
-                                                                       </span>
+                                                                       </abbr>
                                                                </td>
 
                                                                <!-- Copy this td for each copy count appended -->
index 3364e0a..564543f 100644 (file)
@@ -132,7 +132,7 @@ To-do list:
                                <xsl:for-each select="atom:link[@rel='unapi' and string-length(@href)&gt;0]">
                                        <link rel="meta" title="unAPI" type="application/xml">
                                                <xsl:attribute name='href'>
-                                                       <xsl:value-of select="./@href"/>
+                                                       <xsl:value-of select="@href"/>
                                                </xsl:attribute>
                                        </link>
                                </xsl:for-each>
@@ -379,8 +379,8 @@ To-do list:
                <!-- item url -->
                <xsl:if test="string-length($url)&gt;0">
                        <dd class="url">
-                               <span class="unapi-uri">
-                                       <xsl:for-each select="atom:link[@rel='unapi-uri']">
+                               <abbr class="unapi-id">
+                                       <xsl:for-each select="atom:link[@rel='unapi-id']">
                                                <xsl:attribute name="title">
                                                        <xsl:value-of select="@href" />
                                                </xsl:attribute>
@@ -393,7 +393,7 @@ To-do list:
                                                        <xsl:value-of select="substring-after($url, 'http://')" />
                                                </xsl:otherwise>
                                        </xsl:choose>
-                               </span>
+                               </abbr>
                        </dd>
                </xsl:if>
        </xsl:template>
index fc28d8b..4bcb087 100755 (executable)
@@ -85,7 +85,7 @@
   <xsl:template match="marc:subfield" mode="link">
     <xsl:if test="@code='u'">
       <span class="link">
-        <a class="url" href="{.}"/>
+        <a class="url" href="{.}"><xsl:value-of select="../marc:subfield[@code='y']"/></a>
       </span>
     </xsl:if>
   </xsl:template>