diff options
author | Johan Sørensen <johan@johansorensen.com> | 2009-12-10 10:10:26 +0100 |
---|---|---|
committer | Johan Sørensen <johan@johansorensen.com> | 2009-12-10 10:10:26 +0100 |
commit | 886df9f8292d1bedaef3de58fe27caa2e5ad7911 (patch) | |
tree | 3d9f309135c4037eaaaf253578f6c281b9e93dee | |
parent | 3ec243101fbe2cdd8e811e221c0ae8302166fd10 (diff) | |
download | gitorious-mainline-outdated-886df9f8292d1bedaef3de58fe27caa2e5ad7911.zip gitorious-mainline-outdated-886df9f8292d1bedaef3de58fe27caa2e5ad7911.tar.gz gitorious-mainline-outdated-886df9f8292d1bedaef3de58fe27caa2e5ad7911.tar.bz2 |
Make sure the user newsfeed atom feed uses the .atom extension and name the feeds
-rw-r--r-- | app/controllers/users_controller.rb | 1 | ||||
-rw-r--r-- | app/views/layouts/_common_head.html.erb | 5 | ||||
-rw-r--r-- | app/views/users/show.html.erb | 7 |
3 files changed, 9 insertions, 4 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 1eec396..0764626 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -54,6 +54,7 @@ class UsersController < ApplicationController @favorites = @user.watched_objects @atom_auto_discovery_url = feed_user_path(@user, :format => :atom) + @atom_auto_discovery_title = "Public activity feed" respond_to do |format| format.html { } diff --git a/app/views/layouts/_common_head.html.erb b/app/views/layouts/_common_head.html.erb index a2cac56..143be5d 100644 --- a/app/views/layouts/_common_head.html.erb +++ b/app/views/layouts/_common_head.html.erb @@ -21,7 +21,8 @@ <title><%= @page_title ? @page_title + " - " : "" -%><%= current_site.title -%></title> <%= stylesheet_link_tag "base" -%> <%= include_javascripts -%> -<% if @atom_auto_discovery_url -%> - <%= auto_discovery_link_tag(:atom, @atom_auto_discovery_url) -%> +<% if @atom_auto_discovery_url -%> + <%= auto_discovery_link_tag(:atom, @atom_auto_discovery_url, + :title => @atom_auto_discovery_title) -%> <% end -%> <%= yield :extra_head -%> diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index f407380..70340ab 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -26,7 +26,10 @@ <%= breadcrumbs_from(@user) -%> <%- content_for(:extra_head) do -%> - <%= auto_discovery_link_tag(:atom, watchlist_user_path(@user), :title => "#{h(@user.title)}'s newsfeed") -%> + <% if is_current_user?(@user) -%> + <%= auto_discovery_link_tag(:atom, watchlist_user_path(@user, :format => :atom), + :title => "Your Newsfeed") -%> + <% end -%> <% end -%> <div class="with_divider"> @@ -125,7 +128,7 @@ <ul class="embedded_message_list"> <% @messages.each do |message| %> <li> - <%= link_to(h(message.title), message, + <%= link_to(h(message.title), message, :title => truncate(h(message.body), :length => 25), :class => message.aasm_state_for_user(@user)) %> <span class="meta"> |