From 85deee6276cb4d818fb6cbf87f20de4f40d82fdc Mon Sep 17 00:00:00 2001 From: miss <994230062@qq.com> Date: Fri, 22 Sep 2017 19:09:22 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=AD=A6=E5=91=98=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=97=A0=E6=95=B0=E6=8D=AE=E6=9D=BF=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/shixuns/_statistics_student_list.html.erb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/views/shixuns/_statistics_student_list.html.erb b/app/views/shixuns/_statistics_student_list.html.erb index f1e1c3073..5b79f7747 100644 --- a/app/views/shixuns/_statistics_student_list.html.erb +++ b/app/views/shixuns/_statistics_student_list.html.erb @@ -1,6 +1,11 @@ +<% if @statistics.blank? %> +
+ <%= render :partial => "welcome/no_data" %> +
+<% else %>
@@ -48,4 +53,5 @@
  - \ No newline at end of file + +<% end %> \ No newline at end of file From 87dee8cd9d49ade08d76896c3b3a6d4c09b12554 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 22 Sep 2017 19:16:22 +0800 Subject: [PATCH 2/5] cursor --- app/views/courses/show.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/courses/show.html.erb b/app/views/courses/show.html.erb index 21b61ec95..529ef165b 100644 --- a/app/views/courses/show.html.erb +++ b/app/views/courses/show.html.erb @@ -13,12 +13,12 @@
  • <%= link_to '成员管理', members_course_path(@course),:class => "color-orange03" %> <% apply_count = CourseMessage.where(:course_id => @course.id,:course_message_type => 'JoinCourseRequest', :status => 0).count %> <% if apply_count > 0 %> - <%= apply_count %> + <%= apply_count %> <% end %>
  • <%= link_to '+ 发布普通作业'.html_safe, new_homework_common_path(:course => @course.id, :homework_type => 1),:class => "color-orange03" %>
  • <%= link_to '+ 发布实训作业'.html_safe, shixuns_homework_common_index_path(:course => @course.id),:class => "color-orange03", :remote => true %>
  • -
  • + 发布资源
  • +
  • + 发布资源
  • <% course_board = @course.boards.where("parent_id is NULL").first %>
  • <%= link_to '+ 发布帖子'.html_safe, new_board_message_path(:board_id => course_board.id),:class => "color-orange03" %>
  • From 00eba5cc70b9c5bc02a087cb8351926f17b40c04 Mon Sep 17 00:00:00 2001 From: XuCheng642 <287102909@qq.com> Date: Fri, 22 Sep 2017 19:31:07 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=8D=95=E4=BD=8D=E9=83=A8=E9=97=A8?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=88=9B=E5=BB=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/managements_controller.rb | 4 ++++ app/views/managements/_create_department.html.erb | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 6ea3e5d55..8326deba5 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -383,6 +383,10 @@ end # 新增 def create_departments + dep = Department.order("created_at desc").first + @latest_school = School.find(dep.try(:school_id)).try(:name) + @school_id = dep.try(:school_id) + respond_to do |format| format.js end diff --git a/app/views/managements/_create_department.html.erb b/app/views/managements/_create_department.html.erb index 785689032..4cd6664bd 100644 --- a/app/views/managements/_create_department.html.erb +++ b/app/views/managements/_create_department.html.erb @@ -4,15 +4,16 @@
    - 单位全称: - + 单位全称: + +
    请选择单位
    - 子单位名称: + 子单位名称:
    请输入子单位名称
    From 60739117c4e850761ffcf5204b90cf0f3cbda1b6 Mon Sep 17 00:00:00 2001 From: XuCheng642 <287102909@qq.com> Date: Fri, 22 Sep 2017 19:34:22 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20170918014832_update_course_lists.rb | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 db/migrate/20170918014832_update_course_lists.rb diff --git a/db/migrate/20170918014832_update_course_lists.rb b/db/migrate/20170918014832_update_course_lists.rb new file mode 100644 index 000000000..2b66f795a --- /dev/null +++ b/db/migrate/20170918014832_update_course_lists.rb @@ -0,0 +1,8 @@ +class UpdateCourseLists < ActiveRecord::Migration + def up + CourseList.where("user_id is null").update_all(:user_id => 1) + end + + def down + end +end From a249e74526d49edbb0479e139d06ac4255374d4a Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 22 Sep 2017 19:51:03 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E5=AD=97=E4=BD=93=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/challenge.rb | 2 +- public/stylesheets/css/edu-common.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/challenge.rb b/app/models/challenge.rb index 1e389f070..980711d59 100644 --- a/app/models/challenge.rb +++ b/app/models/challenge.rb @@ -44,7 +44,7 @@ class Challenge < ActiveRecord::Base def choose_score score = 0 self.challenge_chooses.each do |choose| - score += choose.score + score += choose.score.to_i end return score end diff --git a/public/stylesheets/css/edu-common.css b/public/stylesheets/css/edu-common.css index f7f4f00e3..e79899e4b 100644 --- a/public/stylesheets/css/edu-common.css +++ b/public/stylesheets/css/edu-common.css @@ -279,7 +279,7 @@ a:hover.edu-filter-cir-grey,a.edu-filter-cir-grey.active{ border:1px solid #3498 .edu-pop-table tr td{border-bottom:1px solid #eee;} .edu-pop-table.table-line tr td,.edu-pop-table.table-line tr th{ border-right:1px solid #eee;} .edu-pop-table.table-line tr td:last-child,.edu-pop-table.table-line tr th:last-child{border-right:none;} -.edu-pop-table tr td .alink-name{color: #666666!important;} +.edu-pop-table tr td .alink-name{color: #333!important;} .edu-pop-table tr td .alink-name:hover{color: #FF7500!important;} .edu-pop-table tr td .alink-operate{color: #cccccc!important;} .edu-pop-table tr td .alink-operate:hover{color: #FF7500!important;}