|
|
@ -5,7 +5,7 @@ class SubjectsController < ApplicationController
|
|
|
|
before_action :find_subject, except: [:index, :create, :new, :append_to_stage]
|
|
|
|
before_action :find_subject, except: [:index, :create, :new, :append_to_stage]
|
|
|
|
before_action :allowed, only: [:update, :edit, :destroy, :publish, :cancel_publish, :cancel_has_publish,
|
|
|
|
before_action :allowed, only: [:update, :edit, :destroy, :publish, :cancel_publish, :cancel_has_publish,
|
|
|
|
:search_members, :add_subject_members, :statistics, :shixun_report, :school_report,
|
|
|
|
:search_members, :add_subject_members, :statistics, :shixun_report, :school_report,
|
|
|
|
:up_member_position, :down_member_position]
|
|
|
|
:up_member_position, :down_member_position, :update_team_title]
|
|
|
|
|
|
|
|
|
|
|
|
include ApplicationHelper
|
|
|
|
include ApplicationHelper
|
|
|
|
include SubjectsHelper
|
|
|
|
include SubjectsHelper
|
|
|
@ -264,6 +264,12 @@ class SubjectsController < ApplicationController
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def update_team_title
|
|
|
|
|
|
|
|
tip_exception("team_title参数不能为空") if params[:team_title].blank?
|
|
|
|
|
|
|
|
@subject.update_attributes!(team_title: params[:team_title])
|
|
|
|
|
|
|
|
normal_status("更新成功")
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def search_members
|
|
|
|
def search_members
|
|
|
|
tip_exception("搜索内容不能为空") unless params[:search]
|
|
|
|
tip_exception("搜索内容不能为空") unless params[:search]
|
|
|
|
page = params[:page] || 1
|
|
|
|
page = params[:page] || 1
|
|
|
|