From bc8b33840bb2dc4ede4090bebd35e1a75e265929 Mon Sep 17 00:00:00 2001 From: Alessandro Palmeira + Diego Araújo Date: Thu, 22 Nov 2012 17:09:36 -0200 Subject: [PATCH] [Mezuro] Refactored Project Controller --- plugins/mezuro/controllers/profile/mezuro_plugin_project_controller.rb | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/plugins/mezuro/controllers/profile/mezuro_plugin_project_controller.rb b/plugins/mezuro/controllers/profile/mezuro_plugin_project_controller.rb index 20b17e8..fe20a89 100644 --- a/plugins/mezuro/controllers/profile/mezuro_plugin_project_controller.rb +++ b/plugins/mezuro/controllers/profile/mezuro_plugin_project_controller.rb @@ -2,35 +2,34 @@ class MezuroPluginProjectController < MezuroPluginProfileController append_view_path File.join(File.dirname(__FILE__) + '/../../views') - def project_state + def processing_state @content = profile.articles.find(params[:id]) - project = @content.project + processing = @content.processing if project_content_has_errors? redirect_to_error_page(@content.errors[:base]) else - state = project.kalibro_error.nil? ? project.state : "ERROR" - render :text => state + render :text => processing.state end end - def project_error + def processing_error @content = profile.articles.find(params[:id]) - @project = @content.project + @processing = @content.processing if project_content_has_errors? redirect_to_error_page(@content.errors[:base]) else - render :partial => 'project_error' + render :partial => 'processing_error' end end - def project_result + def processing @content = profile.articles.find(params[:id]) date = params[:date] - @project_result = date.nil? ? @content.project_result : @content.project_result_with_date(date) + @processing = date.nil? ? @content.processing : @content.processing_with_date(date) if project_content_has_errors? redirect_to_error_page(@content.errors[:base]) else - render :partial => 'project_result' + render :partial => 'processing' end end -- libgit2 0.21.2