From ffc4e52114bf8da5754c40fbaa0c13c619521db2 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Mon, 25 Nov 2019 19:15:27 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=A8=A1=E5=BC=8F=E5=8F=82?=
=?UTF-8?q?=E6=95=B0=E5=A2=9E=E5=8A=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../shixun_feedback_messages_controller.rb | 6 +++++
app/views/admins/shared/_sidebar.html.erb | 6 +++++
.../shixun_feedback_messages/index.html.erb | 14 +++++++++++
.../shared/_list.html.erb | 24 +++++++++++++++++++
app/views/hacks/edit.json.jbuilder | 2 +-
config/routes.rb | 1 +
6 files changed, 52 insertions(+), 1 deletion(-)
create mode 100644 app/controllers/admins/shixun_feedback_messages_controller.rb
create mode 100644 app/views/admins/shixun_feedback_messages/index.html.erb
create mode 100644 app/views/admins/shixun_feedback_messages/shared/_list.html.erb
diff --git a/app/controllers/admins/shixun_feedback_messages_controller.rb b/app/controllers/admins/shixun_feedback_messages_controller.rb
new file mode 100644
index 000000000..c7e6a9586
--- /dev/null
+++ b/app/controllers/admins/shixun_feedback_messages_controller.rb
@@ -0,0 +1,6 @@
+class Admins::ShixunFeedbackMessagesController < Admins::BaseController
+
+ def index
+
+ end
+end
\ No newline at end of file
diff --git a/app/views/admins/shared/_sidebar.html.erb b/app/views/admins/shared/_sidebar.html.erb
index f78b52ac7..7b1f5db7a 100644
--- a/app/views/admins/shared/_sidebar.html.erb
+++ b/app/views/admins/shared/_sidebar.html.erb
@@ -65,6 +65,12 @@
<% end %>
+
+ <%= sidebar_item_group('#comments-submenu', '消息', icon: 'comments') do %>
+ <%= sidebar_item(admins_shixun_feedback_messages_path, '实训反馈', icon: 'comment', controller: 'admins-shixun_feedback_messages') %>
+ <% end %>
+
+
<%= sidebar_item_group('#major-identification-submenu', '工程认证', icon: 'anchor') do %>
<%= sidebar_item(admins_major_informations_path, '本科专业目录', icon: 'outdent', controller: 'admins-major_informations') %>
diff --git a/app/views/admins/shixun_feedback_messages/index.html.erb b/app/views/admins/shixun_feedback_messages/index.html.erb
new file mode 100644
index 000000000..02e696cd3
--- /dev/null
+++ b/app/views/admins/shixun_feedback_messages/index.html.erb
@@ -0,0 +1,14 @@
+<% define_admin_breadcrumbs do %>
+ <% add_admin_breadcrumb('实训反馈', admins_shixun_feedback_messages_path) %>
+<% end %>
+
+
+ <%= form_tag(admins_shixun_feedback_messages_path, method: :get, class: 'form-inline search-form', remote: true) do %>
+ <%= text_field_tag(:keyword, params[:keyword], class: 'form-control col-md-4 ml-3', placeholder: '输入实训名称关键字进行搜索') %>
+ <%= submit_tag('搜索', class: 'btn btn-primary ml-3', 'data-disable-with': '搜索中...') %>
+ <% end %>
+
+
+
+ <%= render(partial: 'admins/shixun_feedback_messages/shared/list', locals: {}) %>
+
\ No newline at end of file
diff --git a/app/views/admins/shixun_feedback_messages/shared/_list.html.erb b/app/views/admins/shixun_feedback_messages/shared/_list.html.erb
new file mode 100644
index 000000000..65b9e0035
--- /dev/null
+++ b/app/views/admins/shixun_feedback_messages/shared/_list.html.erb
@@ -0,0 +1,24 @@
+
+
+
+ ID |
+ 标识 |
+ 实训名称 |
+ 实训老师 |
+ 完成 |
+ 经验值 |
+ 学员姓名 |
+ 学员单位 |
+ 11 |
+
+
+
+ <% if true %>
+
+ <% else %>
+ <%= render 'admins/shared/no_data_for_table' %>
+ <% end %>
+
+
+
+<%#= render partial: 'admins/shared/paginate', locals: { objects: myshixuns } %>
\ No newline at end of file
diff --git a/app/views/hacks/edit.json.jbuilder b/app/views/hacks/edit.json.jbuilder
index 95124666f..efbf424b6 100644
--- a/app/views/hacks/edit.json.jbuilder
+++ b/app/views/hacks/edit.json.jbuilder
@@ -1,5 +1,5 @@
# 编程内容
-json.(@hack, :name, :description, :language, :code)
+json.(@hack, :name, :description, :language, :difficult, :category, :time_limit)
# 代码
json.language @hack.language
diff --git a/config/routes.rb b/config/routes.rb
index 86bac4533..0f31c6d48 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1039,6 +1039,7 @@ Rails.application.routes.draw do
end
resources :shixuns, only: [:index,:destroy]
resources :shixun_settings, only: [:index,:update]
+ resources :shixun_feedback_messages, only: [:index]
resources :department_applies,only: [:index,:destroy] do
collection do
post :merge