summaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-03-05 08:25:22 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-03-05 08:25:22 +0000
commit942091f9e844f673240d75c27f4c6d2167a664e1 (patch)
tree1f27b4f8c26722b66f95dae8adeeeb40ed7513fa /app/views
parent8ea2ecb983c2a48c1a8ec5bb680f711829a91e0c (diff)
downloadredmine-942091f9e844f673240d75c27f4c6d2167a664e1.tar.gz
redmine-942091f9e844f673240d75c27f4c6d2167a664e1.zip
Display links to Atom feeds (closes #496, #750).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1185 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r--app/views/issues/_list.rhtml2
-rw-r--r--app/views/issues/changes.rxml8
-rw-r--r--app/views/issues/index.rhtml12
-rw-r--r--app/views/issues/show.rhtml13
-rw-r--r--app/views/news/index.rhtml5
-rw-r--r--app/views/projects/activity.rhtml9
-rw-r--r--app/views/projects/gantt.rhtml9
-rw-r--r--app/views/timelog/details.rhtml9
-rw-r--r--app/views/wiki/show.rhtml9
-rw-r--r--app/views/wiki/special_date_index.rhtml13
-rw-r--r--app/views/wiki/special_page_index.rhtml13
11 files changed, 64 insertions, 38 deletions
diff --git a/app/views/issues/_list.rhtml b/app/views/issues/_list.rhtml
index 343f7173d..91390ac67 100644
--- a/app/views/issues/_list.rhtml
+++ b/app/views/issues/_list.rhtml
@@ -11,7 +11,7 @@
<tbody>
<% issues.each do |issue| -%>
<tr id="issue-<%= issue.id %>" class="issue hascontextmenu <%= cycle('odd', 'even') %> <%= "status-#{issue.status.position} priority-#{issue.priority.position}" %>">
- <td class="checkbox"><%= check_box_tag("ids[]", issue.id, false) %></td>
+ <td class="checkbox"><%= check_box_tag("ids[]", issue.id, false, :id => nil) %></td>
<td><%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %></td>
<% query.columns.each do |column| %><%= content_tag 'td', column_content(column, issue), :class => column.name %><% end %>
</tr>
diff --git a/app/views/issues/changes.rxml b/app/views/issues/changes.rxml
index f1aa5d206..239d2d6a3 100644
--- a/app/views/issues/changes.rxml
+++ b/app/views/issues/changes.rxml
@@ -1,12 +1,12 @@
xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
xml.title @title
- xml.link "rel" => "self", "href" => url_for(:controller => 'feeds', :action => 'history', :format => 'atom', :only_path => false)
- xml.link "rel" => "alternate", "href" => url_for(:controller => 'welcome', :only_path => false)
+ xml.link "rel" => "self", "href" => url_for(:format => 'atom', :key => User.current.rss_key, :only_path => false)
+ xml.link "rel" => "alternate", "href" => home_url(:only_path => false)
xml.id url_for(:controller => 'welcome', :only_path => false)
- xml.updated((@changes.first ? @changes.first.event_datetime : Time.now).xmlschema)
+ xml.updated((@journals.first ? @journals.first.event_datetime : Time.now).xmlschema)
xml.author { xml.name "#{Setting.app_title}" }
- @changes.each do |change|
+ @journals.each do |change|
issue = change.issue
xml.entry do
xml.title "#{issue.project.name} - #{issue.tracker.name} ##{issue.id}: #{issue.subject}"
diff --git a/app/views/issues/index.rhtml b/app/views/issues/index.rhtml
index 4d1f4f176..d3408fa99 100644
--- a/app/views/issues/index.rhtml
+++ b/app/views/issues/index.rhtml
@@ -41,12 +41,14 @@
<p class="nodata"><%= l(:label_no_data) %></p>
<% else %>
<%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %>
-<div class="contextual">
-<%= l(:label_export_to) %>
-<%= link_to 'CSV', {:format => 'csv'}, :class => 'icon icon-csv' %>,
-<%= link_to 'PDF', {:format => 'pdf'}, :class => 'icon icon-pdf' %>
-</div>
<p class="pagination"><%= pagination_links_full @issue_pages, @issue_count %></p>
+
+<p class="other-formats">
+<%= l(:label_export_to) %>
+<span><%= link_to 'Atom', {:format => 'atom', :key => User.current.rss_key}, :class => 'feed' %></span>
+<span><%= link_to 'CSV', {:format => 'csv'}, :class => 'csv' %></span>
+<span><%= link_to 'PDF', {:format => 'pdf'}, :class => 'pdf' %></span>
+</p>
<% end %>
<% end %>
diff --git a/app/views/issues/show.rhtml b/app/views/issues/show.rhtml
index e3999bd8e..c5efe4f25 100644
--- a/app/views/issues/show.rhtml
+++ b/app/views/issues/show.rhtml
@@ -95,13 +95,18 @@ end %>
</div>
<% end %>
-<div class="contextual">
-<%= l(:label_export_to) %><%= link_to 'PDF', {:format => 'pdf'}, :class => 'icon icon-pdf' %>
-</div>
-&nbsp;
+<p class="other-formats">
+<%= l(:label_export_to) %>
+<span><%= link_to 'Atom', {:format => 'atom', :key => User.current.rss_key}, :class => 'feed' %></span>
+<span><%= link_to 'PDF', {:format => 'pdf'}, :class => 'pdf' %></span>
+</p>
<% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>
<% content_for :sidebar do %>
<%= render :partial => 'issues/sidebar' %>
<% end %>
+
+<% content_for :header_tags do %>
+ <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@issue.project} - #{@issue.tracker} ##{@issue.id}: #{@issue.subject}") %>
+<% end %>
diff --git a/app/views/news/index.rhtml b/app/views/news/index.rhtml
index 369eaf1b1..87db8a5f7 100644
--- a/app/views/news/index.rhtml
+++ b/app/views/news/index.rhtml
@@ -39,6 +39,11 @@
<% end %>
<p class="pagination"><%= pagination_links_full @news_pages %></p>
+<p class="other-formats">
+<%= l(:label_export_to) %>
+<span><%= link_to 'Atom', {:format => 'atom', :key => User.current.rss_key}, :class => 'feed' %></span>
+</p>
+
<% content_for :header_tags do %>
<%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %>
<% end %>
diff --git a/app/views/projects/activity.rhtml b/app/views/projects/activity.rhtml
index dce333f61..aca08fd6f 100644
--- a/app/views/projects/activity.rhtml
+++ b/app/views/projects/activity.rhtml
@@ -27,12 +27,15 @@
<% next_params = params.clone.update :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1) %>
<%= link_to_remote ((@month==12 ? "#{month_name(1)} #{@year+1}" : "#{month_name(@month+1)}") + ' &#187;'),
{:update => "content", :url => next_params}, {:href => url_for(next_params)} %>
-&nbsp;
</div>
-<br />
+&nbsp;
+<p class="other-formats">
+ <%= l(:label_export_to) %>
+ <%= link_to 'Atom', params.merge(:format => :atom, :key => User.current.rss_key).delete_if{|k,v|k=="commit"}, :class => 'feed' %>
+</p>
<% content_for :header_tags do %>
-<%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :year => nil, :month => nil, :key => User.current.rss_key})) %>
+<%= auto_discovery_link_tag(:atom, params.merge(:format => 'atom', :year => nil, :month => nil, :key => User.current.rss_key).delete_if{|k,v|k=="commit"}) %>
<% end %>
<% content_for :sidebar do %>
diff --git a/app/views/projects/gantt.rhtml b/app/views/projects/gantt.rhtml
index 2979bce2b..05bd4b9bc 100644
--- a/app/views/projects/gantt.rhtml
+++ b/app/views/projects/gantt.rhtml
@@ -223,10 +223,11 @@ if Date.today >= @date_from and Date.today <= @date_to %>
</tr>
</table>
-<div class="contextual"><%= l(:label_export_to) %>
-<%= link_to 'PDF', {:zoom => @zoom, :year => @year_from, :month => @month_from, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects], :format => 'pdf'}, :class => 'icon icon-pdf' %>
-<%= link_to 'PNG', {:zoom => @zoom, :year => @year_from, :month => @month_from, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects], :format => 'png'}, :class => 'icon icon-image' if respond_to?('gantt_image') %>
-</div>
+<p class="other-formats">
+<%= l(:label_export_to) %>
+<span><%= link_to 'PDF', {:zoom => @zoom, :year => @year_from, :month => @month_from, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects], :format => 'pdf'}, :class => 'pdf' %></span>
+<%= content_tag('span', link_to('PNG', {:zoom => @zoom, :year => @year_from, :month => @month_from, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects], :format => 'png'}, :class => 'image')) if respond_to?('gantt_image') %>
+</p>
<% content_for :sidebar do %>
<h3><%= l(:label_gantt) %></h3>
diff --git a/app/views/timelog/details.rhtml b/app/views/timelog/details.rhtml
index 802090b7a..cba1597d1 100644
--- a/app/views/timelog/details.rhtml
+++ b/app/views/timelog/details.rhtml
@@ -37,11 +37,12 @@
<% unless @entries.empty? %>
<%= render :partial => 'list', :locals => { :entries => @entries }%>
-<div class="contextual">
- <%= l(:label_export_to) %>
- <%= link_to 'CSV', params.merge(:format => 'csv'), :class => 'icon icon-csv' %>
-</div>
<p class="pagination"><%= pagination_links_full @entry_pages, @entry_count %></p>
+
+<p class="other-formats">
+<%= l(:label_export_to) %>
+<span><%= link_to 'CSV', params.merge(:format => 'csv'), :class => 'csv' %></span>
+</p>
<% end %>
<% content_for :header_tags do %>
diff --git a/app/views/wiki/show.rhtml b/app/views/wiki/show.rhtml
index 77d82884f..e4413d090 100644
--- a/app/views/wiki/show.rhtml
+++ b/app/views/wiki/show.rhtml
@@ -36,12 +36,11 @@
<% end %>
<% end %>
-<div class="contextual">
+<p class="other-formats">
<%= l(:label_export_to) %>
-<%= link_to 'HTML', {:page => @page.title, :export => 'html', :version => @content.version}, :class => 'icon icon-html' %>,
-<%= link_to 'TXT', {:page => @page.title, :export => 'txt', :version => @content.version}, :class => 'icon icon-txt' %>
-</div>
-&nbsp;
+<span><%= link_to 'HTML', {:page => @page.title, :export => 'html', :version => @content.version}, :class => 'html' %></span>
+<span><%= link_to 'TXT', {:page => @page.title, :export => 'txt', :version => @content.version}, :class => 'text' %></span>
+</p>
<% content_for :header_tags do %>
<%= stylesheet_link_tag 'scm' %>
diff --git a/app/views/wiki/special_date_index.rhtml b/app/views/wiki/special_date_index.rhtml
index ac68f809e..6717ebc85 100644
--- a/app/views/wiki/special_date_index.rhtml
+++ b/app/views/wiki/special_date_index.rhtml
@@ -17,9 +17,14 @@
<%= render :partial => 'sidebar' %>
<% end %>
-<div class="contextual">
<% unless @pages.empty? %>
-<%= l(:label_export_to) %> <%= link_to 'HTML', {:action => 'special', :page => 'export'}, :class => 'icon icon-html' %>
+<p class="other-formats">
+<%= l(:label_export_to) %>
+<span><%= link_to 'Atom', {:controller => 'projects', :action => 'activity', :id => @project, :show_wiki_pages => 1, :format => 'atom', :key => User.current.rss_key}, :class => 'feed' %></span>
+<span><%= link_to 'HTML', {:action => 'special', :page => 'export'}, :class => 'html' %></span>
+</p>
+<% end %>
+
+<% content_for :header_tags do %>
+<%= auto_discovery_link_tag(:atom, :controller => 'projects', :action => 'activity', :id => @project, :show_wiki_pages => 1, :format => 'atom', :key => User.current.rss_key) %>
<% end %>
-</div>
-&nbsp;
diff --git a/app/views/wiki/special_page_index.rhtml b/app/views/wiki/special_page_index.rhtml
index db6629de8..f21cc3423 100644
--- a/app/views/wiki/special_page_index.rhtml
+++ b/app/views/wiki/special_page_index.rhtml
@@ -14,9 +14,14 @@
<%= render :partial => 'sidebar' %>
<% end %>
-<div class="contextual">
<% unless @pages.empty? %>
-<%= l(:label_export_to) %> <%= link_to 'HTML', {:action => 'special', :page => 'export'}, :class => 'icon icon-html' %>
+<p class="other-formats">
+<%= l(:label_export_to) %>
+<span><%= link_to 'Atom', {:controller => 'projects', :action => 'activity', :id => @project, :show_wiki_pages => 1, :format => 'atom', :key => User.current.rss_key}, :class => 'feed' %></span>
+<span><%= link_to 'HTML', {:action => 'special', :page => 'export'} %></span>
+</p>
+<% end %>
+
+<% content_for :header_tags do %>
+<%= auto_discovery_link_tag(:atom, :controller => 'projects', :action => 'activity', :id => @project, :show_wiki_pages => 1, :format => 'atom', :key => User.current.rss_key) %>
<% end %>
-</div>
-&nbsp;