remove useless code block
This commit is contained in:
parent
9996386fe4
commit
239a1484ae
|
@ -491,7 +491,6 @@ class ProjectsController < ApplicationController
|
||||||
@trackers = Tracker.sorted.all
|
@trackers = Tracker.sorted.all
|
||||||
@project = Project.new
|
@project = Project.new
|
||||||
@project.safe_attributes = params[:project]
|
@project.safe_attributes = params[:project]
|
||||||
logger.error "=======================================================#{params[:project].class}"
|
|
||||||
##add by huang
|
##add by huang
|
||||||
@course=Course.new
|
@course=Course.new
|
||||||
@course.safe_attributes = params[:course]
|
@course.safe_attributes = params[:course]
|
||||||
|
|
|
@ -64,12 +64,11 @@ module CoursesHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def findCourseTime project
|
def findCourseTime project
|
||||||
#logger.error "=============================#{l(:date)[:formats][:long] } "
|
|
||||||
date_format = l(:zh_date)[:formats][:default]
|
|
||||||
@course = Course.find_by_extra(@project.identifier)
|
|
||||||
str = ""
|
str = ""
|
||||||
begin
|
begin
|
||||||
unless @course.nil?
|
@course = Course.find_by_extra(@project.identifier)
|
||||||
|
date_format = l(:zh_date)[:formats][:default]
|
||||||
|
if @course
|
||||||
str = DateTime.parse(@course.setup_time.to_s).strftime("#{date_format}").to_s unless @course.setup_time.blank?
|
str = DateTime.parse(@course.setup_time.to_s).strftime("#{date_format}").to_s unless @course.setup_time.blank?
|
||||||
str << '-' unless @course.setup_time.blank?
|
str << '-' unless @course.setup_time.blank?
|
||||||
str << DateTime.parse(@course.endup_time.to_s).strftime("#{date_format}").to_s unless @course.endup_time.blank?
|
str << DateTime.parse(@course.endup_time.to_s).strftime("#{date_format}").to_s unless @course.endup_time.blank?
|
||||||
|
|
Loading…
Reference in New Issue