From cb212407fc2de14544ee5892589f87ab18c4d91e Mon Sep 17 00:00:00 2001 From: daiao <35855898@qq.com> Date: Thu, 21 Mar 2019 16:44:50 +0800 Subject: [PATCH 1/3] 1 --- app/controllers/managements_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 4d249508..a509ea5b 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -4060,7 +4060,7 @@ end def shixun_feedback_xls shixun_ids xls_report = StringIO.new book = Spreadsheet::Workbook.new - sheet1 = book.create_worksheet :name => "报名列表" + sheet1 = book.create_worksheet :name => "实训反馈" blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10 sheet1.row(0).default_format = blue count_row = 1 From 03ff87527916609972c89677397079b6a27f6069 Mon Sep 17 00:00:00 2001 From: daiao <35855898@qq.com> Date: Thu, 21 Mar 2019 17:03:09 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E5=8F=8D=E9=A6=88?= =?UTF-8?q?=E5=AF=BC=E5=87=BAexcel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/managements_controller.rb | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index a509ea5b..6d58fa8a 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -4065,23 +4065,25 @@ end sheet1.row(0).default_format = blue count_row = 1 shixuns = Shixun.where(:id => shixun_ids).includes(discusses: [:user]) - sheet1.row(0).concat(["序号", "实训ID", "实训名称","评论数", "评论内容", "关卡", "评论者", "评论者职业", + sheet1.row(0).concat(["序号", "实训ID", "实训名称", "实训作者", "作者单位", "评论数", "评论内容", "关卡", "评论者", "评论者职业", "评论者单位", "评论时间", "社区导师是否已回复"]) shixuns.each_with_index do |shixun, i| discusses = shixun.discusses.where("user_id != ?", 1) sheet1[count_row, 0] = i + 1 sheet1[count_row, 1] = shixun.identifier sheet1[count_row, 2] = shixun.name - sheet1[count_row, 3] = discusses.count + sheet1[count_row, 3] = shixun.owner.show_real_name + sheet1[count_row, 4] = shixun.owner.school_name + sheet1[count_row, 5] = discusses.count discusses.each_with_index do |discuss, j| user = discuss.user - sheet1[count_row, 4] = discuss.content.gsub(//, "【图片评论】").gsub(/!\[\].+\)/, "【图片评论】") - sheet1[count_row, 5] = "第#{discuss.position}关" - sheet1[count_row, 6] = user.show_real_name - sheet1[count_row, 7] = user.identity - sheet1[count_row, 8] = user.school_name - sheet1[count_row, 9] = format_time discuss.created_at - sheet1[count_row, 10] = discuss.children.pluck(:user_id).include?(1) ? "是" : "否" + sheet1[count_row, 6] = discuss.content.gsub(//, "【图片评论】").gsub(/!\[\].+\)/, "【图片评论】") + sheet1[count_row, 7] = "第#{discuss.position}关" + sheet1[count_row, 8] = user.show_real_name + sheet1[count_row, 9] = user.identity + sheet1[count_row, 10] = user.school_name + sheet1[count_row, 11] = format_time discuss.created_at + sheet1[count_row, 12] = discuss.children.pluck(:user_id).include?(1) ? "是" : "否" count_row += 1 end #count_row += 1 From 2b691900b3147596e8d1f68d0c30d758e037212a Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 21 Mar 2019 17:48:04 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=9C=AA=E7=99=BB=E5=BD=95=E5=AF=BC?= =?UTF-8?q?=E8=88=AA=E6=A0=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_logined_header.html.erb | 2 +- app/views/layouts/_unlogin_header.html.erb | 34 +++++----------------- 2 files changed, 9 insertions(+), 27 deletions(-) diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb index 41fdfc64..6e239e5d 100644 --- a/app/views/layouts/_logined_header.html.erb +++ b/app/views/layouts/_logined_header.html.erb @@ -5,7 +5,7 @@
  • "><%= link_to "实训课程", subjects_path %>
  • "><%= link_to "翻转课堂", courses_path %>
  • -
  • "><%= link_to "开发社区", shixuns_path %>
  • +
  • "><%= link_to "开发社区", shixuns_path %>
  • <% careers = Career.published.order("created_at asc") %> <% if careers.present? %> diff --git a/app/views/layouts/_unlogin_header.html.erb b/app/views/layouts/_unlogin_header.html.erb index fb1e901e..d970fffc 100644 --- a/app/views/layouts/_unlogin_header.html.erb +++ b/app/views/layouts/_unlogin_header.html.erb @@ -3,16 +3,14 @@
      -
    • <%= link_to "实训课程", subjects_path %>
    • -
    • <%= link_to "翻转课堂", courses_path %>
    • +
    • "><%= link_to "实训课程", subjects_path %>
    • +
    • "><%= link_to "翻转课堂", courses_path %>
    • + +
    • "><%= link_to "开发社区", shixuns_path %>
    • -
    • - <%= link_to "开发社区", shixuns_path %> - -
    • <% careers = Career.published.order("created_at asc") %> <% if careers.present? %> -
    • +
    • " style="cursor: auto;">

      职业路径

        <% careers.each do |career| %> @@ -21,8 +19,8 @@
    • <% end %> -
    • <%= link_to "竞赛", competitions_path %>
    • -
    • <%= link_to "问答", forums_path %>
    • +
    • "><%= link_to "竞赛", competitions_path %>
    • +
    • "><%= link_to "问答", forums_path %>