ProjectsController#add_news moved to NewsController#new.

Preview added when adding/editing a news (#590).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1111 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-02-03 14:38:04 +00:00
parent b124501a4e
commit 1ecef3a95a
9 changed files with 82 additions and 27 deletions
-13
View File
@@ -259,19 +259,6 @@ class ProjectsController < ApplicationController
render :layout => false if request.xhr?
end
# Add a news to @project
def add_news
@news = News.new(:project => @project, :author => User.current)
if request.post?
@news.attributes = params[:news]
if @news.save
flash[:notice] = l(:notice_successful_create)
Mailer.deliver_news_added(@news) if Setting.notified_events.include?('news_added')
redirect_to :controller => 'news', :action => 'index', :project_id => @project
end
end
end
def add_file
if request.post?
@version = @project.versions.find_by_id(params[:version_id])