Tidy up RSS links a bit.

This commit is contained in:
Tom Hughes 2008-04-23 17:39:09 +00:00
parent 840a402031
commit 5bc80823ec
3 changed files with 9 additions and 3 deletions

View file

@ -2,4 +2,8 @@ module ApplicationHelper
def htmlize(text)
return sanitize(auto_link(simple_format(text), :urls))
end
def rss_link_to(*args)
return link_to(image_tag("RSS.gif", :size => "16x16", :border => 0), Hash[*args], { :class => "rsssmall" });
end
end

View file

@ -28,5 +28,5 @@
<br />
<%= link_to(image_tag("RSS.gif", :size => "16x16", :border => 0), :action => 'rss') %>
<%= auto_discovery_link_tag(:atom, :action => 'rss') %>
<%= rss_link_to :action => 'rss' %>
<%= auto_discovery_link_tag :atom, :action => 'rss' %>

View file

@ -1,7 +1,9 @@
<h1><%= h(@title) %></h1>
<%= auto_discovery_link_tag :atom, :action => 'georss', :display_name => @display_name, :tag => @tag %>
<p>
<span class="rsssmall"><a href="<%= url_for :action => 'georss', :display_name => @display_name, :tag => @tag %>"><img src="/images/RSS.gif" border="0" alt="RSS" /></a></span>
<%= rss_link_to :action => 'georss', :display_name => @display_name, :tag => @tag %>
<% if @user.nil? or @display_name.nil? or @user.display_name != @display_name %>
| <%= link_to 'See just your traces, or upload a trace', :action => 'mine' %>
<% end %>