From 0eab38faaed0eb7fc15fc8d8ca21dbdf264d45f0 Mon Sep 17 00:00:00 2001 From: daiao <35855898@qq.com> Date: Thu, 21 Mar 2019 00:23:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 21 --------------------- app/helpers/ec_major_schools_helper.rb | 20 ++++++++++++++++++++ app/views/ec_years/create.js.erb | 4 ++-- 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index b2464067..3d980718 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -596,27 +596,6 @@ module ApplicationHelper GameCode.create(:game_id => game_id, :path => path) if game_code.blank? 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 # return true diff --git a/app/helpers/ec_major_schools_helper.rb b/app/helpers/ec_major_schools_helper.rb index e7f4ccfc..4f39913a 100644 --- a/app/helpers/ec_major_schools_helper.rb +++ b/app/helpers/ec_major_schools_helper.rb @@ -1,2 +1,22 @@ 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 diff --git a/app/views/ec_years/create.js.erb b/app/views/ec_years/create.js.erb index 11bfea12..8322a289 100644 --- a/app/views/ec_years/create.js.erb +++ b/app/views/ec_years/create.js.erb @@ -1,7 +1,7 @@ <% if @status.to_i == -1 %> notice_box("该界别已经存在,请勿重复创建") <% 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 %> \ No newline at end of file