From e19c7ac2275fbcba3279006f6cdfe1004a538940 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=A4fer?= Date: Fri, 11 Feb 2011 09:01:36 +0100 Subject: [PATCH 1/3] Add an RSS autodiscovery tag to wiki pages. #168 Contributed by Yuki Sonoda. --- app/views/wiki/show.rhtml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/views/wiki/show.rhtml b/app/views/wiki/show.rhtml index 9b2f2de2..057895f5 100644 --- a/app/views/wiki/show.rhtml +++ b/app/views/wiki/show.rhtml @@ -52,6 +52,9 @@ <% content_for :header_tags do %> <%= stylesheet_link_tag 'scm' %> + <%= auto_discovery_link_tag(:atom, :format => :atom, + :controller => 'projects', :action => 'activity', :project_id => @project, + :year => nil, :month => nil, :show_wiki_pages => 1, :key => User.current.rss_key) %> <% end %> <% content_for :sidebar do %> From 9726157e3fbf926461a5122e0f766ec0d4389029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=A4fer?= Date: Fri, 11 Feb 2011 09:21:08 +0100 Subject: [PATCH 2/3] Fix Atom links on the wiki show page. #168 This fixes the autodiscovery link provided in the precedent commit and adds the link to the "other formats" section. --- app/views/wiki/show.rhtml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/views/wiki/show.rhtml b/app/views/wiki/show.rhtml index 057895f5..c17dd482 100644 --- a/app/views/wiki/show.rhtml +++ b/app/views/wiki/show.rhtml @@ -46,15 +46,14 @@ <% end %> <% other_formats_links do |f| %> - <%= f.link_to 'HTML', :url => {:id => @page.title, :version => @content.version} %> - <%= f.link_to 'TXT', :url => {:id => @page.title, :version => @content.version} %> + <%= f.link_to 'Atom', :url => {:controller => 'activities', :action => 'index', :id => @project, :show_wiki_edits => 1, :key => User.current.rss_key} %> + <%= f.link_to 'HTML', :url => {:id => @page.title, :version => @content.version} %> + <%= f.link_to 'TXT', :url => {:id => @page.title, :version => @content.version} %> <% end if User.current.allowed_to?(:export_wiki_pages, @project) %> <% content_for :header_tags do %> <%= stylesheet_link_tag 'scm' %> - <%= auto_discovery_link_tag(:atom, :format => :atom, - :controller => 'projects', :action => 'activity', :project_id => @project, - :year => nil, :month => nil, :show_wiki_pages => 1, :key => User.current.rss_key) %> + <%= auto_discovery_link_tag(:atom, :controller => 'activities', :action => 'index', :id => @project, :show_wiki_edits => 1, :format => 'atom', :key => User.current.rss_key) %> <% end %> <% content_for :sidebar do %> From 05e6e910988396413aa5be66b37261dd2d274a79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=A4fer?= Date: Fri, 11 Feb 2011 09:27:03 +0100 Subject: [PATCH 3/3] Fis Atom links on wiki index pages. --- app/views/wiki/date_index.html.erb | 4 ++-- app/views/wiki/index.html.erb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/wiki/date_index.html.erb b/app/views/wiki/date_index.html.erb index 65af6084..a0327cf4 100644 --- a/app/views/wiki/date_index.html.erb +++ b/app/views/wiki/date_index.html.erb @@ -23,11 +23,11 @@ <% unless @pages.empty? %> <% other_formats_links do |f| %> - <%= f.link_to 'Atom', :url => {:controller => 'activities', :action => 'show', :id => @project, :show_wiki_edits => 1, :key => User.current.rss_key} %> + <%= f.link_to 'Atom', :url => {:controller => 'activities', :action => 'index', :id => @project, :show_wiki_edits => 1, :key => User.current.rss_key} %> <%= f.link_to('HTML', :url => {:action => 'export'}) if User.current.allowed_to?(:export_wiki_pages, @project) %> <% end %> <% end %> <% content_for :header_tags do %> -<%= auto_discovery_link_tag(:atom, :controller => 'activities', :action => 'show', :id => @project, :show_wiki_edits => 1, :format => 'atom', :key => User.current.rss_key) %> +<%= auto_discovery_link_tag(:atom, :controller => 'activities', :action => 'index', :id => @project, :show_wiki_edits => 1, :format => 'atom', :key => User.current.rss_key) %> <% end %> diff --git a/app/views/wiki/index.html.erb b/app/views/wiki/index.html.erb index 7e7155fd..e85f83b9 100644 --- a/app/views/wiki/index.html.erb +++ b/app/views/wiki/index.html.erb @@ -16,11 +16,11 @@ <% unless @pages.empty? %> <% other_formats_links do |f| %> - <%= f.link_to 'Atom', :url => {:controller => 'activities', :action => 'show', :id => @project, :show_wiki_edits => 1, :key => User.current.rss_key} %> + <%= f.link_to 'Atom', :url => {:controller => 'activities', :action => 'index', :id => @project, :show_wiki_edits => 1, :key => User.current.rss_key} %> <%= f.link_to('HTML', :url => {:action => 'export'}) if User.current.allowed_to?(:export_wiki_pages, @project) %> <% end %> <% end %> <% content_for :header_tags do %> -<%= auto_discovery_link_tag(:atom, :controller => 'activities', :action => 'show', :id => @project, :show_wiki_edits => 1, :format => 'atom', :key => User.current.rss_key) %> +<%= auto_discovery_link_tag(:atom, :controller => 'activities', :action => 'index', :id => @project, :show_wiki_edits => 1, :format => 'atom', :key => User.current.rss_key) %> <% end %>