dev_haigong
daiao 6 years ago
parent 40c19ae0d5
commit d8763cf284

@ -596,6 +596,27 @@ module ApplicationHelper
GameCode.create(:game_id => game_id, :path => path) if game_code.blank? GameCode.create(:game_id => game_id, :path => path) if game_code.blank?
end end
def total_graduation_count year
g_count = EcGraduationSubitem.where(:ec_graduation_requirement_id => year.ec_graduation_requirements).count
g_count == 0 ? "--" : g_count
# 36
end
def sigle_graduation_count
'--'
# 30
end
def total_graduation_course_count ec_year
ec_year.ec_courses.count == 0 ? '--' : ec_year.ec_courses.count
# 64
end
def sigle_graduation_course_count
'--'
# 60
end
# 判断用户是否认证 # 判断用户是否认证
def check_authentication def check_authentication
# return true # return true

@ -1,22 +1,2 @@
module EcMajorSchoolsHelper module EcMajorSchoolsHelper
def total_graduation_count year
g_count = EcGraduationSubitem.where(:ec_graduation_requirement_id => year.ec_graduation_requirements).count
g_count == 0 ? "--" : g_count
# 36
end
def sigle_graduation_count
'--'
# 30
end
def total_graduation_course_count ec_year
ec_year.ec_courses.count == 0 ? '--' : ec_year.ec_courses.count
# 64
end
def sigle_graduation_course_count
'--'
# 60
end
end end

@ -2,5 +2,6 @@
notice_box("该界别已经存在,请勿重复创建") notice_box("该界别已经存在,请勿重复创建")
<% else %> <% else %>
//window.location.reload(); //window.location.reload();
console.log("##########<%= @years.count %>")
$("#year_list").html('<%= j(render :partial => "ec_major_schools/year_list") %>') $("#year_list").html('<%= j(render :partial => "ec_major_schools/year_list") %>')
<% end %> <% end %>
Loading…
Cancel
Save