From 974489aaf7f5c1539c0e5117fb97b97f3fc1a619 Mon Sep 17 00:00:00 2001 From: miker Date: Thu, 9 Mar 2006 20:21:55 +0000 Subject: [PATCH] updating opensearch output to contain proper unAPI stuff git-svn-id: svn://svn.open-ils.org/ILS/trunk@3300 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm | 11 ++++- .../src/perlmods/OpenILS/WWW/SuperCat/Feed.pm | 2 + Open-ILS/web/opac/extras/os.css | 5 ++ Open-ILS/xsl/ATOM2XHTML.xsl | 48 ++++++++++++++++--- 4 files changed, 58 insertions(+), 8 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm index 783a7fd4a9..73ed6db2e4 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm @@ -516,7 +516,7 @@ sub opensearch_feed { ); $feed->root($root); - $feed->title("$class search results for [$terms] at ".$org_unit->[0]->name); + $feed->title("Search results for [$class => $terms] at ".$org_unit->[0]->name); $feed->creator($host); $feed->update_ts(gmtime_ISO8601()); @@ -553,6 +553,12 @@ sub opensearch_feed { 'application/opensearch+xml' ) if ($offset); + $feed->link( + unapi => + $unapi => + 'application/xml' + ); + $feed->link( self => $base . $path => @@ -611,6 +617,7 @@ sub create_record_feed { $node->link(alternate => $feed->unapi . "?uri=$item_tag&format=opac" => 'application/xml'); $node->link(opac => $feed->unapi . "?uri=$item_tag&format=opac"); $node->link(unapi => $feed->unapi . "?uri=$item_tag"); + $node->link('unapi-uri' => $item_tag); } return $feed; @@ -618,7 +625,7 @@ sub create_record_feed { sub entityize { my $stuff = NFC(shift()); - $stuff =~ s/&(?!#.{2,4};|amp;)/&/gso; + #$stuff =~ s/&(?!#.{2,4};|amp;)/&/gso; $stuff =~ s/([\x{0080}-\x{fffd}])/sprintf('&#x%X;',ord($1))/sgoe; return $stuff; } diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm index 280b21cd23..f9946115f7 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm @@ -181,6 +181,7 @@ sub link { my $type = shift; my $id = shift; my $mime = shift || "application/$type+xml"; + my $title = shift; $type = 'self' if ($type eq 'atom'); @@ -191,6 +192,7 @@ sub link { undef, { rel => $type, href => $id, + title => $title, type => $mime, } ); diff --git a/Open-ILS/web/opac/extras/os.css b/Open-ILS/web/opac/extras/os.css index 6246b370bb..d5883c7aa8 100644 --- a/Open-ILS/web/opac/extras/os.css +++ b/Open-ILS/web/opac/extras/os.css @@ -2,6 +2,11 @@ body { font-family: Arial, Helvetica, Sans-serif; font-size: 0.9em; } +p.nav { + text-align: center; + border-top: solid lightgray 1px; + border-bottom: solid lightgray 1px; +} h1 { font-size: 1.5em; } diff --git a/Open-ILS/xsl/ATOM2XHTML.xsl b/Open-ILS/xsl/ATOM2XHTML.xsl index 494f0cea11..fd6a58b461 100644 --- a/Open-ILS/xsl/ATOM2XHTML.xsl +++ b/Open-ILS/xsl/ATOM2XHTML.xsl @@ -115,6 +115,7 @@ To-do list: + <xsl:value-of select="$title" /> @@ -127,6 +128,15 @@ To-do list: + + + + + + + + + @@ -174,7 +184,7 @@ To-do list: -

+

-
- - - - + + + + + + + + + + + + + + +
-- 2.43.2