Moved ProjectsController#list_news to NewsController#index.
Removed FeedsController, issues and news feeds are now handled by issues and news controllers. git-svn-id: http://redmine.rubyforge.org/svn/trunk@888 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
8509cf80f0
commit
ad68a82be1
17 files changed
+61
-326
No files matched your search
@@ -1,28 +0,0 @@
|
||||
xml.instruct!
|
||||
xml.rss "version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/" do
|
||||
xml.channel do
|
||||
xml.title @title
|
||||
xml.link url_for(:controller => 'welcome', :only_path => false)
|
||||
xml.pubDate CGI.rfc1123_date(@journals.first ? @journals.first.created_on : Time.now)
|
||||
xml.description l(:label_changes_details)
|
||||
@journals.each do |journal|
|
||||
issue = journal.issue
|
||||
xml.item do
|
||||
xml.title "#{issue.project.name} - #{issue.tracker.name} ##{issue.id}: #{issue.subject}"
|
||||
url = url_for(:controller => 'issues' , :action => 'show', :id => issue, :only_path => false)
|
||||
xml.link url
|
||||
xml.description do
|
||||
xml.text! h(journal.notes)
|
||||
xml.text! "<ul>"
|
||||
journal.details.each do |detail|
|
||||
xml.text! "<li>" + show_detail(detail, false) + "</li>"
|
||||
end
|
||||
xml.text! "</ul>"
|
||||
end
|
||||
xml.pubDate CGI.rfc1123_date(journal.created_on)
|
||||
xml.guid url
|
||||
xml.author h(journal.user.name)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,28 +0,0 @@
|
||||
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.id url_for(:controller => 'welcome', :only_path => false)
|
||||
xml.updated CGI.rfc1123_date(@journals.first.created_on) if @journals.any?
|
||||
xml.author { xml.name "#{Setting.app_title}" }
|
||||
@journals.each do |journal|
|
||||
issue = journal.issue
|
||||
xml.entry do
|
||||
xml.title "#{issue.project.name} - #{issue.tracker.name} ##{issue.id}: #{issue.subject}"
|
||||
xml.link "rel" => "alternate", "href" => url_for(:controller => 'issues' , :action => 'show', :id => issue, :only_path => false)
|
||||
xml.id url_for(:controller => 'issues' , :action => 'show', :id => issue, :only_path => false)
|
||||
xml.updated CGI.rfc1123_date(journal.created_on)
|
||||
xml.author { xml.name journal.user.name }
|
||||
xml.summary journal.notes
|
||||
xml.content "type" => "html" do
|
||||
xml.text! journal.notes if journal.notes
|
||||
xml.text! "<ul>"
|
||||
journal.details.each do |detail|
|
||||
xml.text! "<li>" + show_detail(detail, false) + "</li>"
|
||||
end
|
||||
xml.text! "</ul>"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,20 +0,0 @@
|
||||
xml.instruct!
|
||||
xml.rss "version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/" do
|
||||
xml.channel do
|
||||
xml.title @title
|
||||
xml.link url_for(:controller => 'welcome', :only_path => false)
|
||||
xml.pubDate CGI.rfc1123_date(@issues.first ? @issues.first.created_on : Time.now)
|
||||
xml.description l(:label_reported_issues)
|
||||
@issues.each do |issue|
|
||||
xml.item do
|
||||
xml.title "#{issue.project.name} - #{issue.tracker.name} ##{issue.id}: #{issue.subject}"
|
||||
url = url_for(:controller => 'issues' , :action => 'show', :id => issue, :only_path => false)
|
||||
xml.link url
|
||||
xml.description h(issue.description)
|
||||
xml.pubDate CGI.rfc1123_date(issue.created_on)
|
||||
xml.guid url
|
||||
xml.author h(issue.author.name)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,22 +0,0 @@
|
||||
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 => 'issues', :format => 'atom', :only_path => false)
|
||||
xml.link "rel" => "alternate", "href" => url_for(:controller => 'welcome', :only_path => false)
|
||||
xml.id url_for(:controller => 'welcome', :only_path => false)
|
||||
xml.updated CGI.rfc1123_date(@issues.first.updated_on) if @issues.any?
|
||||
xml.author { xml.name "#{Setting.app_title}" }
|
||||
@issues.each do |issue|
|
||||
xml.entry do
|
||||
xml.title "#{issue.project.name} - #{issue.tracker.name} ##{issue.id}: #{issue.subject}"
|
||||
xml.link "rel" => "alternate", "href" => url_for(:controller => 'issues' , :action => 'show', :id => issue, :only_path => false)
|
||||
xml.id url_for(:controller => 'issues' , :action => 'show', :id => issue, :only_path => false)
|
||||
xml.updated CGI.rfc1123_date(issue.updated_on)
|
||||
xml.author { xml.name issue.author.name }
|
||||
xml.summary issue.description
|
||||
xml.content "type" => "html" do
|
||||
xml.text! issue.description
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,20 +0,0 @@
|
||||
xml.instruct!
|
||||
xml.rss "version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/" do
|
||||
xml.channel do
|
||||
xml.title "#{Setting.app_title}: #{l(:label_news_latest)}"
|
||||
xml.link url_for(:controller => 'welcome', :only_path => false)
|
||||
xml.pubDate CGI.rfc1123_date(@news.first ? @news.first.created_on : Time.now)
|
||||
xml.description l(:label_news_latest)
|
||||
@news.each do |news|
|
||||
xml.item do
|
||||
xml.title "#{news.project.name}: #{news.title}"
|
||||
news_url = url_for(:controller => 'news' , :action => 'show', :id => news, :only_path => false)
|
||||
xml.link news_url
|
||||
xml.description h(news.summary)
|
||||
xml.pubDate CGI.rfc1123_date(news.created_on)
|
||||
xml.guid news_url
|
||||
xml.author h(news.author.name)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,22 +0,0 @@
|
||||
xml.instruct!
|
||||
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
|
||||
xml.title "#{Setting.app_title}: #{l(:label_news_latest)}"
|
||||
xml.link "rel" => "self", "href" => url_for(:controller => 'feeds', :action => 'news', :format => 'atom', :only_path => false)
|
||||
xml.link "rel" => "alternate", "href" => url_for(:controller => 'welcome', :only_path => false)
|
||||
xml.id url_for(:controller => 'welcome', :only_path => false)
|
||||
xml.updated CGI.rfc1123_date(@news.first.created_on) if @news.any?
|
||||
xml.author { xml.name "#{Setting.app_title}" }
|
||||
@news.each do |news|
|
||||
xml.entry do
|
||||
xml.title news.title
|
||||
xml.link "rel" => "alternate", "href" => url_for(:controller => 'news' , :action => 'show', :id => news, :only_path => false)
|
||||
xml.id url_for(:controller => 'news' , :action => 'show', :id => news, :only_path => false)
|
||||
xml.updated CGI.rfc1123_date(news.created_on)
|
||||
xml.author { xml.name news.author.name }
|
||||
xml.summary h(news.summary)
|
||||
xml.content "type" => "html" do
|
||||
xml.text! news.description
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,17 +1,17 @@
|
||||
<div class="contextual">
|
||||
<%= link_to_if_authorized l(:label_news_new),
|
||||
<%= link_to_if_authorized(l(:label_news_new),
|
||||
{:controller => 'projects', :action => 'add_news', :id => @project},
|
||||
:class => 'icon icon-add',
|
||||
:onclick => 'Element.show("add-news"); return false;' %>
|
||||
:onclick => 'Element.show("add-news"); return false;') if @project %>
|
||||
</div>
|
||||
|
||||
<div id="add-news" style="display:none;">
|
||||
<h2><%=l(:label_news_new)%></h2>
|
||||
<% labelled_tabular_form_for :news, @news, :url => { :action => "add_news", :id => @project } do |f| %>
|
||||
<% labelled_tabular_form_for :news, @news, :url => { :controller => 'projects', :action => "add_news", :id => @project } do |f| %>
|
||||
<%= render :partial => 'news/form', :locals => { :f => f } %>
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-news")' %>
|
||||
<% end %>
|
||||
<% end if @project %>
|
||||
</div>
|
||||
|
||||
<h2><%=l(:label_news_plural)%></h2>
|
||||
@@ -20,7 +20,8 @@
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% else %>
|
||||
<% @newss.each do |news| %>
|
||||
<h3><%= link_to h(news.title), :controller => 'news', :action => 'show', :id => news %>
|
||||
<h3><%= link_to(h(news.project.name), :controller => 'projects', :action => 'show', :id => news.project) + ': ' unless news.project == @project %>
|
||||
<%= link_to h(news.title), :controller => 'news', :action => 'show', :id => news %>
|
||||
<%= "(#{news.comments_count} #{lwr(:label_comment, news.comments_count).downcase})" if news.comments_count > 0 %></h3>
|
||||
<p class="author"><%= authoring news.created_on, news.author %></p>
|
||||
<%= textilizable(news.description) %>
|
||||
@@ -46,11 +46,11 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if @news.any? && authorize_for('projects', 'list_news') %>
|
||||
<% if @news.any? && authorize_for('news', 'index') %>
|
||||
<div class="box">
|
||||
<h3><%=l(:label_news_latest)%></h3>
|
||||
<%= render :partial => 'news/news', :collection => @news %>
|
||||
<p><%= link_to l(:label_news_view_all), :controller => 'projects', :action => 'list_news', :id => @project %></p>
|
||||
<p><%= link_to l(:label_news_view_all), :controller => 'news', :action => 'index', :project_id => @project %></p>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -2,10 +2,13 @@
|
||||
|
||||
<div class="splitcontentleft">
|
||||
<%= textilizable Setting.welcome_text %>
|
||||
<% if @news.any? %>
|
||||
<div class="box">
|
||||
<h3><%=l(:label_news_latest)%></h3>
|
||||
<%= render :partial => 'news/news', :collection => @news %>
|
||||
</div>
|
||||
<%= link_to l(:label_issue_view_all), :controller => 'news' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="splitcontentright">
|
||||
|
||||
Reference in new issue
Block a user