[Rt-commit] [svn] r802 - in rt: . branches/rt-3.3/html/REST/2.0/Elements branches/rt-3.3/html/REST/2.0/NoAuth branches/rt-3.3/html/REST/2.0/Search

autrijus at pallas.eruditorum.org autrijus at pallas.eruditorum.org
Sun May 2 09:14:03 EDT 2004


Author: autrijus
Date: Sun May  2 09:14:02 2004
New Revision: 802

Modified:
   rt/   (props changed)
   rt/branches/rt-3.3/html/REST/2.0/Elements/Link
   rt/branches/rt-3.3/html/REST/2.0/NoAuth/feed.css
   rt/branches/rt-3.3/html/REST/2.0/NoAuth/index.css
   rt/branches/rt-3.3/html/REST/2.0/Search/index
Log:
 ----------------------------------------------------------------------
 r4375 at not:  autrijus | 2004-05-02T13:13:38.884936Z
 
 * use ->URI correctly.
 * use <a xmlns="...html..."> so things can correct render in nongecko browsers.
 ----------------------------------------------------------------------


Modified: rt/branches/rt-3.3/html/REST/2.0/Elements/Link
==============================================================================
--- rt/branches/rt-3.3/html/REST/2.0/Elements/Link	(original)
+++ rt/branches/rt-3.3/html/REST/2.0/Elements/Link	Sun May  2 09:14:02 2004
@@ -1,6 +1,15 @@
 %# Make a HTML link and an Atom link
 <link rel="<% $Relation %>" type="<% $Type %>" href="<% $URI %>" title="<% $Title %>" />
-<html:link class="html" rel="<% $Relation %>" type="<% $Type %>" href="<% $URI %>" title="<% $Title %>" />
+<a class="<% $class %>" rel="<% $Relation %>" type="<% $Type %>" href="<% $URI %>" title="<% $Title %>" xmlns="http://www.w3.org/1999/xhtml"><% loc($TextMap{$Relation}) || $Title %></a>
+<%INIT>
+my %TextMap = (
+    'alternate'	    => 'HTML',	# loc
+    'service.post'  => 'Post',	# loc
+    'service.feed'  => 'Index',	# loc
+    'service.edit'  => 'Edit',	# loc
+);
+my $class = lc($TextMap{$Relation} || 'nav');
+</%INIT>
 <%ARGS>
 $Relation => "alternate"
 $Type => "application/x.atom+xml"

Modified: rt/branches/rt-3.3/html/REST/2.0/NoAuth/feed.css
==============================================================================
--- rt/branches/rt-3.3/html/REST/2.0/NoAuth/feed.css	(original)
+++ rt/branches/rt-3.3/html/REST/2.0/NoAuth/feed.css	Sun May  2 09:14:02 2004
@@ -26,73 +26,46 @@
   display:block;
 }
 
-feed>link.html:before {
-    content: attr(title)
+a {
+  text-decoration: none;
 }
 
-feed>link.html {
-  padding: 5px;
-  border:solid 1px #dddddd;
-  font-size: 90%;
-}
-
-feed>link.html[rel="alternate"] {
-  text-align: left;
-  border: none;
-  padding: 0px;
+a:hover {
+  text-decoration: underline;
 }
 
-link.html[rel="alternate"]:before {
-  content: "HTML";
-  background-color: #003366;
-  color: #ccccff;
+a {
   padding: 1px 5px 1px 5px;
   font-size: xx-small;
+  color: #000000;
 }
 
-feed>link.html[rel="service.post"] {
-  text-align: left;
-  border: none;
-  padding: 0px;
+a.nav {
+  font-size:80%;
+  padding: 5px;
+  border:solid 1px #dddddd;
+  font-size: 90%;
+  color: #0000ff;
 }
 
-link.html[rel="service.post"]:before {
-  content: "Post";
-  font-weight: bold;
-  background-color: #66ee66;
-  color: #000000;
-  padding: 1px 5px 1px 5px;
-  font-size: xx-small;
+a.html {
+  background-color: #003366;
+  color: #ccccff;
 }
 
-feed>link.html[rel="service.feed"] {
-  text-align: left;
-  border: none;
-  padding: 0px;
+a.post {
+  background-color: #66ee66;
+  font-weight: bold;
 }
 
-link.html[rel="service.feed"]:before {
-  content: "Index";
+a.index {
   background-color: #cccccc;
-  color: #000000;
-  padding: 1px 5px 1px 5px;
-  font-size: xx-small;
-}
-
-feed>link.html[rel="service.edit"] {
-  display: block;
-  text-align: left;
-  border: none;
-  padding: 0px;
 }
 
-link.html[rel="service.edit"]:before {
-  content: "Edit";
-  font-weight: bold;
+a.edit {
   background-color: #cccc66;
   color: #000033;
-  padding: 1px 5px 1px 5px;
-  font-size: xx-small;
+  font-weight: bold;
 }
 
 entry title {
@@ -136,11 +109,6 @@
   
 }
 
-entry link {
-  color:#aaaaaa;
-  font-size:80%;
-}
-
 issued,modified,created,name,id {
   color:#999999;
   font-size:80%;

Modified: rt/branches/rt-3.3/html/REST/2.0/NoAuth/index.css
==============================================================================
--- rt/branches/rt-3.3/html/REST/2.0/NoAuth/index.css	(original)
+++ rt/branches/rt-3.3/html/REST/2.0/NoAuth/index.css	Sun May  2 09:14:02 2004
@@ -1,15 +1,10 @@
-<& feed.css &>
+ at import url(feed.css);
 
 feed {
   display:block;
   text-align:left;
 }
 
-feed>link.html[rel="alternate"] {
-  display:block;
-  text-align:center;
-}
-
 link[rel="service.feed"] {
   text-align:left;
   border-top:dotted 1px #999999;
@@ -26,8 +21,3 @@
   text-align:left;
   font-weight:bold;
 }
-
-link.html[rel="service.feed"] {
-  display:inline;
-}
-

Modified: rt/branches/rt-3.3/html/REST/2.0/Search/index
==============================================================================
--- rt/branches/rt-3.3/html/REST/2.0/Search/index	(original)
+++ rt/branches/rt-3.3/html/REST/2.0/Search/index	Sun May  2 09:14:02 2004
@@ -1,10 +1,7 @@
 %# Search, aka FeedURI
 <?xml version="1.0" encoding="utf-8"?>
 <?xml-stylesheet type="text/css" href="<% $BaseURI %>/NoAuth/feed.css"?>
-<feed version="0.3"
-  xmlns="http://purl.org/atom/ns#"
-  xmlns:html="http://www.w3.org/1999/xhtml"
->
+<feed version="0.3" xmlns="http://purl.org/atom/ns#">
   <title><&|/l&>Query</&>: <% loc($Type) %></title>
   <author>
     <name><% $RT::Organization %></name>
@@ -14,7 +11,6 @@
     <&|/l, $page, int(($TotalFound-1)/$rows)+1&>Page [_1] of [_2]</&>
     (<&|/l, $TotalFound&>[_1] Total</&>)
   </tagline>
-  <id>rt-fsck.com://<% $RT::rtname %>/<% $Path %></id>
   <& $Link, Relation => "service.feed", URI => $BaseURI, Title => loc("Homepage") &>
   <& $Link, Relation => "service.post", URI => "$FeedURI.new", Title => loc("Create"). ": ". loc($Type) &>
 %# XXX - The URI below is incorrect; should point to collection URL
@@ -28,10 +24,10 @@
     <modified><% $entry->{LastUpdated} %></modified>
     <issued><% $entry->{Created} %></issued>
     <created><% $entry->{Created} %></created>
-    <id>rt-fsck.com://<% $RT::rtname %>/<% $Path %>/<% $entry->{Id} %></id>
+    <id><% $entry->{URI} %></id>
     <& $Link, Relation => "service.edit", URI => "$FeedURI/$entry->{Id}", Title => loc("Edit"). ": $entry->{Name}" &>
-% if ($entry->{URI}) {
-    <& $Link, Type => 'text/html', URI => "$RT::WebURL$entry->{URI}", Title => $entry->{Name} &>
+% if ($entry->{HTML_URL}) {
+    <& $Link, Type => 'text/html', URI => "$RT::WebURL$entry->{HTML_URL}", Title => $entry->{Name} &>
 % }
   </entry>
 % }
@@ -66,16 +62,16 @@
 
 while (my $entry = $List->Next) {
     my %entry = map { $_ => eval { $entry->$_ } || '' }
-	qw(Id Name Description);
+	qw(Id Name Description URI);
     $entry{Created} = eval { $entry->CreatedObj->W3CDTF }
 	|| eval { $entry->PrincipalObj->CreatedObj->W3CDTF };
     $entry{LastUpdated} = eval { $entry->LastUpdatedObj->W3CDTF }
 	|| eval { $entry->PrincipalObj->LastUpdatedObj->W3CDTF };
 
     if ($URI{$Type}) {
-	$entry{URI} = $URI{$Type} . $entry{Id};
+	$entry{HTML_URI} = $URI{$Type} . $entry{Id};
 	if (my $queue = eval { $entry->Queue } ) {
-	    $entry{URI} =~ s/Global/Queues/;
+	    $entry{HTML_URI} =~ s/Global/Queues/;
 	    $entry{Params} .= "&Queue=$queue";
 	}
     }


More information about the Rt-commit mailing list