diff --git a/.gitignore b/.gitignore
index bb4b68554..1b56839ee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,39 +1,39 @@
-*.swp
-/.project
-/.idea
-/.bundle
-*.swp
-/config/database.yml
-/config/configuration.yml
-/config/additional_environment.rb
-/config/oneapm.yml
-/config/environments/production.rb
-
-
-/files/*
-/log/*
-/public/tmp/*
-/tmp/*
-/public/cache/*
-/config/newrelic.yml
-/public/images/avatars/*
-/db/schema.rb
-/Gemfile.lock
-/lib/plugins/acts_as_versioned/test/debug.log
-.rbenv-gemsets
-.DS_Store
-public/api_doc/
-/.metadata
-vendor/cache
-/files
-/public/images/avatars
-/public/files
-/tags
-/config/initializers/gitlab_config.rb
-1234567
-public/javascripts/wechat/node_modules/
-.ruby-version
-.access_token
-tmux*.log
-config/wechat.yml
-config/oneapm.yml
+*.swp
+/.project
+/.idea/*
+/.bundle
+*.swp
+/config/database.yml
+/config/configuration.yml
+/config/additional_environment.rb
+/config/oneapm.yml
+/config/environments/production.rb
+
+
+/files/*
+/log/*
+/public/tmp/*
+/tmp/*
+/public/cache/*
+/config/newrelic.yml
+/public/images/avatars/*
+/db/schema.rb
+/Gemfile.lock
+/lib/plugins/acts_as_versioned/test/debug.log
+.rbenv-gemsets
+.DS_Store
+public/api_doc/
+/.metadata
+vendor/cache
+/files
+/public/images/avatars
+/public/files
+/tags
+/config/initializers/gitlab_config.rb
+1234567
+public/javascripts/wechat/node_modules/
+.ruby-version
+.access_token
+tmux*.log
+config/wechat.yml
+config/oneapm.yml
diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb
index a04216052..afcf13d41 100644
--- a/app/controllers/managements_controller.rb
+++ b/app/controllers/managements_controller.rb
@@ -18,6 +18,21 @@ class ManagementsController < ApplicationController
end
def unit
+ end
+ def classroom
+
+ end
+ def classroom_classment
+
+ end
+ def class_shixuns
+
+ end
+ def class_publish_shixuns
+
+ end
+ def class_shixun_authorization
+
end
# 0 全部;1 活动的; 2 已注册; 3 锁定
def users
@@ -51,7 +66,7 @@ class ManagementsController < ApplicationController
end
def shixuns
- @menu_type = 3
+ @menu_type = 3
sx_status = params[:status].blank? ? [0, 1, 2, 3] : params[:status].to_i # 搜索实训的状态
keyword = params[:keyword].blank? ? "u_name" : params[:keyword] # 根据姓名/实训名搜索
search = params[:search] # 搜索的字
@@ -83,73 +98,73 @@ class ManagementsController < ApplicationController
end
end
- # 已发布的实训
- def publish_shixuns
- @menu_type = 3
- @sx_order = params[:sx_order].blank? ? "desc" : params[:sx_order] # 排序
- search = params[:search] # 搜索字
- keyword = params[:keyword].blank? ? "u_name" : params[:keyword] # 根据姓名/实训名搜索
- close = params[:close] # 关闭实训,参数是实训的Id
- unless close.blank?
- Shixun.find(close).update_attribute(:status, 3)
- end
- if "u_name" == keyword
- # 如果用户搜索为空,不用遍历user表,直接查找所有实训, 有搜索时才查找user
- if search.blank?
- @shixuns = Shixun.where(:status => 2).order("created_at #{@sx_order}")
- else
- user_id = User.where("concat(lastname, firstname) like '%#{search}%'")
- @shixuns = Shixun.where(:user_id => user_id, :status => 2).order("created_at #{@sx_order}")
- end
- else
- @shixuns = Shixun.where("name like '%#{search}%'").where(:status => 2).order("created_at #{@sx_order}")
- end
- @shixuns_count = @shixuns.count
- limit = 20
- @shixuns_pages = Paginator.new @shixuns_count, limit, params['page'] || 1
- @offset ||= @shixuns_pages.offset
- @shixuns = paginateHelper @shixuns, limit
-
- respond_to do |format|
- format.js
- format.html
- end
- end
-
- # 已关闭的实训
- def close_shixuns
- @menu_type = 3
- @sx_order = params[:sx_order].blank? ? "desc" : params[:sx_order] # 排序
- search = params[:search] # 搜索字
- keyword = params[:keyword].blank? ? "u_name" : params[:keyword] # 根据姓名/实训名搜索
- reopen = params[:reopen] # 从新开启实训,参数是实训的Id
-
- unless reopen.blank?
- Shixun.find(reopen).update_attribute(:status, 2)
- end
- if "u_name" == keyword
- # 如果用户搜索为空,不用遍历user表,直接查找所有实训, 有搜索时才查找user
- if search.blank?
- @shixuns = Shixun.where(:status => 3).order("updated_at #{@sx_order}")
- else
- user_id = User.where("concat(lastname, firstname) like '%#{search}%'")
- @shixuns = Shixun.where(:user_id => user_id, :status => 3).order("updated_at #{@sx_order}")
- end
- else
- @shixuns = Shixun.where("name like '%#{search}%'").where(:status => 3).order("updated_at #{@sx_order}")
- end
- @shixuns_count = @shixuns.count
- limit = 20
- @shixuns_pages = Paginator.new @shixuns_count, limit, params['page'] || 1
- @offset ||= @shixuns_pages.offset
- @shixuns = paginateHelper @shixuns, limit
-
- respond_to do |format|
- format.js
- format.html
- end
- end
-
+ # 已发布的实训
+ def publish_shixuns
+ @menu_type = 3
+ @sx_order = params[:sx_order].blank? ? "desc" : params[:sx_order] # 排序
+ search = params[:search] # 搜索字
+ keyword = params[:keyword].blank? ? "u_name" : params[:keyword] # 根据姓名/实训名搜索
+ close = params[:close] # 关闭实训,参数是实训的Id
+ unless close.blank?
+ Shixun.find(close).update_attribute(:status, 3)
+ end
+ if "u_name" == keyword
+ # 如果用户搜索为空,不用遍历user表,直接查找所有实训, 有搜索时才查找user
+ if search.blank?
+ @shixuns = Shixun.where(:status => 2).order("created_at #{@sx_order}")
+ else
+ user_id = User.where("concat(lastname, firstname) like '%#{search}%'")
+ @shixuns = Shixun.where(:user_id => user_id, :status => 2).order("created_at #{@sx_order}")
+ end
+ else
+ @shixuns = Shixun.where("name like '%#{search}%'").where(:status => 2).order("created_at #{@sx_order}")
+ end
+ @shixuns_count = @shixuns.count
+ limit = 20
+ @shixuns_pages = Paginator.new @shixuns_count, limit, params['page'] || 1
+ @offset ||= @shixuns_pages.offset
+ @shixuns = paginateHelper @shixuns, limit
+
+ respond_to do |format|
+ format.js
+ format.html
+ end
+ end
+
+ # 已关闭的实训
+ def close_shixuns
+ @menu_type = 3
+ @sx_order = params[:sx_order].blank? ? "desc" : params[:sx_order] # 排序
+ search = params[:search] # 搜索字
+ keyword = params[:keyword].blank? ? "u_name" : params[:keyword] # 根据姓名/实训名搜索
+ reopen = params[:reopen] # 从新开启实训,参数是实训的Id
+
+ unless reopen.blank?
+ Shixun.find(reopen).update_attribute(:status, 2)
+ end
+ if "u_name" == keyword
+ # 如果用户搜索为空,不用遍历user表,直接查找所有实训, 有搜索时才查找user
+ if search.blank?
+ @shixuns = Shixun.where(:status => 3).order("updated_at #{@sx_order}")
+ else
+ user_id = User.where("concat(lastname, firstname) like '%#{search}%'")
+ @shixuns = Shixun.where(:user_id => user_id, :status => 3).order("updated_at #{@sx_order}")
+ end
+ else
+ @shixuns = Shixun.where("name like '%#{search}%'").where(:status => 3).order("updated_at #{@sx_order}")
+ end
+ @shixuns_count = @shixuns.count
+ limit = 20
+ @shixuns_pages = Paginator.new @shixuns_count, limit, params['page'] || 1
+ @offset ||= @shixuns_pages.offset
+ @shixuns = paginateHelper @shixuns, limit
+
+ respond_to do |format|
+ format.js
+ format.html
+ end
+ end
+
def users_trial
@menu_type = 6
@users = User.where(:status => 1).order("created_on desc").all
diff --git a/app/views/layouts/base_management.html.erb b/app/views/layouts/base_management.html.erb
index ffdf4ef1e..a4f42abc7 100644
--- a/app/views/layouts/base_management.html.erb
+++ b/app/views/layouts/base_management.html.erb
@@ -21,22 +21,37 @@
+
+ 胡莎莎 > 班级列表
+
主页
- 课堂+
- 课堂+
+
+ <%= link_to "课程列表", classroom_managements_path %>
+ <%= link_to "班级列表", classroom_classment_managements_path %>
+
+
+
+
竞赛+
单位
- <%= link_to "单位列表", departments_managements_path, :class => "edu-admin-nav-a" %>
- <%= link_to "单位部门列表",departments_part_managements_path %>
+ <%= link_to "单位列表", departments_part_managements_path, :class => "edu-admin-nav-a" %>
+ <%= link_to "单位部门列表", departments_managements_path%>
工程认证+
diff --git a/app/views/managements/class_publish_shixuns.html.erb b/app/views/managements/class_publish_shixuns.html.erb
new file mode 100644
index 000000000..7f66a1597
--- /dev/null
+++ b/app/views/managements/class_publish_shixuns.html.erb
@@ -0,0 +1,55 @@
+
+
+ 选择单位
+
+
+
+
+
+ 创建者姓名搜索
+ 班级名称搜索
+
+
+
搜索
+
清除
+
+
+
+
+ ID
+ 课程实训名称
+ 单位
+ 创建者
+ 发布时间
+
+
+
+
+ 1
+ C语言课程实训
+ 国防科技大学
+ 黄井泉
+ 2015-03-02 11:38
+
+
+ 2
+ C语言课程实训
+ 国防科技大学
+ 黄井泉
+ 2015-03-02 11:38
+
+
+ 2
+ C语言课程实训
+ 国防科技大学
+ 黄井泉
+ 2015-03-02 11:38
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/managements/class_shixun_authorization.html.erb b/app/views/managements/class_shixun_authorization.html.erb
new file mode 100644
index 000000000..5879b0be6
--- /dev/null
+++ b/app/views/managements/class_shixun_authorization.html.erb
@@ -0,0 +1,140 @@
+
+
+
+
+
+
+ <%= link_to "待审批", {:controller => "managements", :action => "shixun_authorization", :type => 0}, :class => "tab_type", :remote => true %>
+
+
+ <%= link_to "已审批", {:controller => "managements", :action => "shixun_authorization", :type => [1, 2]}, :class => "tab_type", :remote => true %>
+
+
+
+
+
+
+
+
+ <%= link_to "全部", shixun_authorization_managements_path(:type => [1, 2]), :class => "edu-filter-cir-grey mr5 active", :id => "shixun_all_authentication", :remote => true %>
+ <%= link_to "同意", shixun_authorization_managements_path(:type => 1), :class => "edu-filter-cir-grey mr5", :id => "shixun_agree_authentication", :remote => true %>
+ <%= link_to "拒绝", shixun_authorization_managements_path(:type => 2), :class => "edu-filter-cir-grey mr5", :id => "shixun_reject_authentication", :remote => true %>
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/managements/class_shixuns.html.erb b/app/views/managements/class_shixuns.html.erb
new file mode 100644
index 000000000..5189eb078
--- /dev/null
+++ b/app/views/managements/class_shixuns.html.erb
@@ -0,0 +1,79 @@
+
+
+ 全部状态
+ 编辑中
+ 待审核
+ 已发布
+
+
+
+ 选择单位
+
+
+
+
+
+ 创建者姓名搜索
+ 班级名称搜索
+
+
+
搜索
+
清除
+
+
+
+
+ ID
+ 课程实训名称
+ 阶段
+ 实训
+ 状态
+ 单位
+ 创建者
+ 创建时间
+ 操作
+
+
+
+
+ 1
+ C语言课程实训
+ 5
+ 8
+ 编辑中
+ 国防科技大学
+ 黄井泉
+ 2015-03-02 11:38
+ 删除
+
+
+ 2
+ C语言课程实训
+ 5
+ 8
+ 编辑中
+ 国防科技大学
+ 黄井泉
+ 2015-03-02 11:38
+ 删除
+
+
+ 3
+ C语言课程实训
+ 5
+ 8
+ 编辑中
+ 国防科技大学
+ 黄井泉
+ 2015-03-02 11:38
+ 删除
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/managements/classroom.html.erb b/app/views/managements/classroom.html.erb
new file mode 100644
index 000000000..17e0d65bc
--- /dev/null
+++ b/app/views/managements/classroom.html.erb
@@ -0,0 +1,93 @@
+
+
+ 专业层级
+ 专科
+ 本科
+ 研究生
+
+
+ 学科门类
+ 工学
+ 理学
+ 装备制造类
+ 公共管理与服务类
+
+
+ 一级学科
+ 公共事业类
+ 计算机类
+ 船舶与海洋工程装备类
+
+
+ 专业名称
+ 软件工程
+ 公共管理
+ 计算机科学与应用
+ 船舶与海洋工程专业
+
+
+ 选择创建单位
+
+
+
+
+
+
+ 创建者姓名搜索
+ 课程名称搜索
+
+
+
+ 只看模板
+
+
+
搜索
+
清除
+
+
+
diff --git a/app/views/managements/classroom_classment.erb b/app/views/managements/classroom_classment.erb
new file mode 100644
index 000000000..b15a193b1
--- /dev/null
+++ b/app/views/managements/classroom_classment.erb
@@ -0,0 +1,116 @@
+
+
+ 全部状态
+ 正在进行
+ 已结束
+
+
+ 选择创建者单位
+
+
+
+
+
+ 创建者姓名搜索
+ 班级名称搜索
+
+
+
搜索
+
清除
+
+
+ 只看首页显示
+
+
+
diff --git a/app/views/managements/depart.html.erb b/app/views/managements/depart.html.erb
index c40d2ba34..92de87c37 100644
--- a/app/views/managements/depart.html.erb
+++ b/app/views/managements/depart.html.erb
@@ -32,35 +32,46 @@
+
- 序号
- 部门名称
- 单位名称
- 创建于
-
+ 序号
+ 部门名称
+ 单位名称
+ 创建于
+
-
- 1
- 计算机学院
- 中国科学近代物理研究所
- 2018-02-02 10:02
- 修改
-
-
- 1
- 计算机学院
- 中国科学近代物理研究所
- 2018-02-02 10:02
- 修改
+
+
+
+ 1
+ 计算机学院
+ 中国科学近代物理研究所
+ 2018-02-02 10:02
+ 批准 删除 修改
+
+
+ 1
+ 计算机学院
+ 中国科学近代物理研究所
+ 2018-02-02 10:02
+ 批准 删除 修改
+
+
+ 1
+ 计算机学院
+ 中国科学近代物理研究所
+ 2018-02-02 10:02
+ 批准 删除 修改
+
+
+ 1
+ 计算机学院
+ 中国科学近代物理研究所
+ 2018-02-02 10:02
+ 批准 删除 修改
+
-
-
- 1
- 计算机学院
- 中国科学近代物理研究所
- 2018-02-02 10:02
- 修改
-
+
\ No newline at end of file
diff --git a/app/views/managements/unit.html.erb b/app/views/managements/unit.html.erb
index 7c13594d3..589f9cd0b 100644
--- a/app/views/managements/unit.html.erb
+++ b/app/views/managements/unit.html.erb
@@ -34,51 +34,47 @@
+
- 序号
- 单位名称
- 地区
- 详细地址
- 申请者
- 创建于
-
-
-
- 1
- 山西省云城市临猗县白沙空间省会花园小区178号
- 山西省运城市
- 山西省云城市临猗县白沙空间省会花园小区178号
- 胡莎莎
- 2018-02-02 10:02
- 修改
-
-
- 1
- 山西省云城市临猗县白沙空间省会花园小区178号
- 山西省运城市
- 山西省云城市临猗县白沙空间省会花园小区178号
- 胡莎莎
- 2018-02-02 10:02
- 修改
-
-
- 1
- 山西省云城市临猗县白的空间省会花园小区178号
- 山西省运城市
- 山西省云城市临猗县的空间省会花园小区178号
- 胡莎莎
- 2018-02-02 10:02
- 修改
-
-
- 1
- 山西省云城市临猗县白沙空间省会花园小区178号
- 山西省运城市
- 山西省云城市临猗县的空间省会花园小区178号
- 胡莎莎
- 2018-02-02 10:02
- 修改
+ 序号
+ 单位名称
+ 地区
+ 详细地址
+ 申请者
+ 创建于
+
+
+
+
+ 1
+ 山西省云城市临猗县白沙空间省会花园小区178号
+ 山西省运城市
+ 山西省云城市临猗县的空间省会花园小区178号
+ 胡莎莎
+ 2018-02-02 10:02
+ 批准 删除 修改
+
+
+ 1
+ 山西省云城市临猗县白沙空间省会花园小区178号
+ 山西省运城市
+ 山西省云城市临猗县的空间省会花园小区178号
+ 胡莎莎
+ 2018-02-02 10:02
+ 批准 删除 修改
+
+
+ 1
+ 山西省云城市临猗县白沙空间省会花园小区178号
+ 山西省运城市
+ 山西省云城市临猗县的空间省会花园小区178号
+ 胡莎莎
+ 2018-02-02 10:02
+ 批准 删除 修改
+
+
+