[Rt-commit] [svn] r819 - in RTx-Atom: . html/Atom/0.3
html/Atom/0.3/Elements html/Atom/0.3/NoAuth
autrijus at pallas.eruditorum.org
autrijus at pallas.eruditorum.org
Mon May 3 13:01:55 EDT 2004
Author: autrijus
Date: Mon May 3 13:01:55 2004
New Revision: 819
Removed:
RTx-Atom/html/Atom/0.3/NoAuth/index.css
Modified:
RTx-Atom/ (props changed)
RTx-Atom/html/Atom/0.3/Elements/Link
RTx-Atom/html/Atom/0.3/NoAuth/feed.css
RTx-Atom/html/Atom/0.3/dhandler
RTx-Atom/html/Atom/0.3/index
Log:
----------------------------------------------------------------------
r4427 at not: autrijus | 2004-05-03T16:17:43.889951Z
* The main page is now a valid Atom feed.
----------------------------------------------------------------------
Modified: RTx-Atom/html/Atom/0.3/Elements/Link
==============================================================================
--- RTx-Atom/html/Atom/0.3/Elements/Link (original)
+++ RTx-Atom/html/Atom/0.3/Elements/Link Mon May 3 13:01:55 2004
@@ -1,6 +1,6 @@
%# Make a HTML link and an Atom link
<link rel="<% $Relation %>" type="<% $Type %>" href="<% $URI %>" title="<% $Title %>" />
-<a accesskey="<% $accesskey %>" class="<% $class %>" rel="<% $Relation %>" type="<% $Type %>" href="<% $URI %>" title="<% $Title %>" xmlns="http://www.w3.org/1999/xhtml"><% loc($TextMap{$Relation}) || $Title %></a>
+<a accesskey="<% $accesskey %>" class="<% $class %>" rel="<% $Relation %>" type="<% $Type %>" href="<% $URI %>" title="<% $Title %>" xmlns="http://www.w3.org/1999/xhtml"><% loc($Class) || loc($TextMap{$Relation}) || $Title %></a>
<%INIT>
my %TextMap = (
'alternate' => 'HTML', # loc
@@ -8,7 +8,7 @@
'service.feed' => 'Index', # loc
'service.edit' => 'Edit', # loc
);
-my $class = lc($TextMap{$Relation} || 'nav');
+my $class = lc($Class || $TextMap{$Relation} || 'nav');
my %KeyMap = (
'alternate' => 'h',
'next' => 'n',
@@ -28,4 +28,5 @@
$URI => "#"
$Title => ""
$IsEntry => 0
+$Class => ""
</%ARGS>
Modified: RTx-Atom/html/Atom/0.3/NoAuth/feed.css
==============================================================================
--- RTx-Atom/html/Atom/0.3/NoAuth/feed.css (original)
+++ RTx-Atom/html/Atom/0.3/NoAuth/feed.css Mon May 3 13:01:55 2004
@@ -62,6 +62,10 @@
background-color: #cccccc;
}
+a.top {
+ background-color: #cccccc;
+}
+
a.edit {
background-color: #cccc66;
color: #000033;
Modified: RTx-Atom/html/Atom/0.3/dhandler
==============================================================================
--- RTx-Atom/html/Atom/0.3/dhandler (original)
+++ RTx-Atom/html/Atom/0.3/dhandler Mon May 3 13:01:55 2004
@@ -174,6 +174,8 @@
last;
}
+my $BaseURI = "$RT::WebPath/Atom/0.3";
+
if (!$class and $type) {
$map = $m->comp('Elements/Introspect', Want => 'RecordToCollection');
@@ -182,12 +184,11 @@
my $new_type = $map->{$key};
$new_type =~ s/::/-/g;
$path =~ s{([^/]*)}{$new_type};
- $r->header_out(Location => $path);
+ $r->header_out(Location => "$BaseURI$path");
return $m->comp('Elements/Error', Status => 301);
}
}
-my $BaseURI = "$RT::WebPath/Atom/0.3";
$ARGS{Path} = $path;
$ARGS{BaseURI} = $BaseURI;
$ARGS{Link} = "$BaseURI/Elements/Link";
Modified: RTx-Atom/html/Atom/0.3/index
==============================================================================
--- RTx-Atom/html/Atom/0.3/index (original)
+++ RTx-Atom/html/Atom/0.3/index Mon May 3 13:01:55 2004
@@ -1,21 +1,26 @@
%# Put service links to all actions and objects here
<?xml version="1.0" encoding="utf-8"?>
-<?xml-stylesheet type="text/css" href="<% $BaseURI %>/NoAuth/index.css"?>
-<entry xmlns="http://purl.org/atom/ns#">
+<?xml-stylesheet type="text/css" href="<% $BaseURI %>/NoAuth/feed.css"?>
+<feed version="0.3" xmlns="http://purl.org/atom/ns#">
<title><&|/l&>Homepage</&></title>
<author>
<name><% $RT::Organization %></name>
<url><% $RT::WebURL %></url>
</author>
- <id><% $RT::SystemUser->UserObj->URI %></id>
+ <modified><% $Now->W3CDTF %></modified>
<& $Link, Type => 'text/html', URI => $RT::WebURL, Title => loc("Homepage") &>
% foreach my $type (@{$m->comp('Elements/Introspect', Want => 'TopLevelCollections')}) {
- <& $Link, Relation => 'service.feed', URI => "$BaseURI/$type", Title => loc($type), IsEntry => 1 &>
- <& $Link, Relation => 'service.post', URI => "$BaseURI/$type!add", Title => loc("Create") . ": " . loc($type) &>
+ <entry>
+ <title><% loc($type) %></title>
+ <& $Link, Class => "Index", URI => "$BaseURI/$type", Title => loc($type), IsEntry => 1 &>
+ <& $Link, Relation => 'service.post', URI => "$BaseURI/$type!add", Title => loc("Create") . ": " . loc($type) &>
+ <id><% $RT::SystemUser->UserObj->URI %>/<% $type %></id>
+ <issued><% $RT::SystemUser->UserObj->CreatedObj->W3CDTF %></issued>
+ <modified><% $Now->W3CDTF %></modified>
+ </entry>
% }
- <issued><% $RT::SystemUser->UserObj->CreatedObj->W3CDTF %></issued>
- <modified><% $Now->W3CDTF %></modified>
-</entry>
+ <info></info>
+</feed>
<%ARGS>
$Path
$BaseURI
More information about the Rt-commit
mailing list