Reverts r3366.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3367 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
cfe4d0e7db
commit
ea51dcf911
|
@ -57,13 +57,13 @@ class IssuesController < ApplicationController
|
||||||
sort_update({'id' => "#{Issue.table_name}.id"}.merge(@query.available_columns.inject({}) {|h, c| h[c.name.to_s] = c.sortable; h}))
|
sort_update({'id' => "#{Issue.table_name}.id"}.merge(@query.available_columns.inject({}) {|h, c| h[c.name.to_s] = c.sortable; h}))
|
||||||
|
|
||||||
if @query.valid?
|
if @query.valid?
|
||||||
limit = case params[:format]
|
limit = per_page_option
|
||||||
when 'csv', 'pdf'
|
respond_to do |format|
|
||||||
Setting.issues_export_limit.to_i
|
format.html { }
|
||||||
when 'atom'
|
format.xml { }
|
||||||
Setting.feeds_limit.to_i
|
format.atom { limit = Setting.feeds_limit.to_i }
|
||||||
else
|
format.csv { limit = Setting.issues_export_limit.to_i }
|
||||||
per_page_option
|
format.pdf { limit = Setting.issues_export_limit.to_i }
|
||||||
end
|
end
|
||||||
|
|
||||||
@issue_count = @query.issue_count
|
@issue_count = @query.issue_count
|
||||||
|
@ -157,12 +157,10 @@ class IssuesController < ApplicationController
|
||||||
call_hook(:controller_issues_new_before_save, { :params => params, :issue => @issue })
|
call_hook(:controller_issues_new_before_save, { :params => params, :issue => @issue })
|
||||||
if @issue.save
|
if @issue.save
|
||||||
attach_files(@issue, params[:attachments])
|
attach_files(@issue, params[:attachments])
|
||||||
|
flash[:notice] = l(:notice_successful_create)
|
||||||
call_hook(:controller_issues_new_after_save, { :params => params, :issue => @issue})
|
call_hook(:controller_issues_new_after_save, { :params => params, :issue => @issue})
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {
|
format.html {
|
||||||
# Displays a link to the newly created issue in the flash message
|
|
||||||
link = @template.link_to("##{@issue.id}", {:controller => 'issues', :action => 'show', :id => @issue})
|
|
||||||
flash[:notice] = l(:notice_issue_created, :value => link)
|
|
||||||
redirect_to(params[:continue] ? { :action => 'new', :tracker_id => @issue.tracker } :
|
redirect_to(params[:continue] ? { :action => 'new', :tracker_id => @issue.tracker } :
|
||||||
{ :action => 'show', :id => @issue })
|
{ :action => 'show', :id => @issue })
|
||||||
}
|
}
|
||||||
|
@ -175,7 +173,7 @@ class IssuesController < ApplicationController
|
||||||
format.xml { render(:xml => @issue.errors, :status => :unprocessable_entity); return }
|
format.xml { render(:xml => @issue.errors, :status => :unprocessable_entity); return }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@priorities = IssuePriority.all
|
@priorities = IssuePriority.all
|
||||||
render :layout => !request.xhr?
|
render :layout => !request.xhr?
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue