diff --git a/app/controllers/colleges_controller.rb b/app/controllers/colleges_controller.rb
index c814d957..2505a3bf 100644
--- a/app/controllers/colleges_controller.rb
+++ b/app/controllers/colleges_controller.rb
@@ -254,7 +254,10 @@ class CollegesController < ApplicationController
def manager_auth
# unless (User.current.admin? || DepartmentMember.where(:user_id => User.current.id, :department_id => @department.id).first.present?)
- unless (User.current.admin? || DepartmentMember.where(:user_id => User.current.id, :department_id => @department.id).first.present? || (User.current.user_extensions.try(:school_id) == @department.school_id && User.current.user_extensions.try(:identity) == 0))
+ unless (User.current.admin? ||
+ DepartmentMember.where(:user_id => User.current.id, :department_id => @department.id).first.present? ||
+ (User.current.user_extensions.try(:school_id) == @department.school_id && User.current.user_extensions.try(:identity) == 0) ||
+ (@department.school.try(:customer_id) && User.current.try(:partner).try(:customer_ids) && User.current.try(:partner).try(:customer_ids).include?(@department.school.try(:customer_id))))
render_403
end
end
diff --git a/app/controllers/cooperates_controller.rb b/app/controllers/cooperates_controller.rb
index aecbb293..12467a36 100644
--- a/app/controllers/cooperates_controller.rb
+++ b/app/controllers/cooperates_controller.rb
@@ -1,6 +1,36 @@
class CooperatesController < ApplicationController
+ before_filter :require_login
+ before_filter :find_partner, only: [:partner_list]
+ before_filter :is_admin, only: [:partner_list]
- def show
+ def partner_list
+ search = params[:search]
+ @schools = School.where(customer_id: @partner.customer_ids)
+ @all_count = @schools.size
+ unless search.blank?
+ @schools = @schools.where("name like ?", "%#{search}%")
+ end
+ @search_count = @schools.size
+ @schools = paginateHelper @schools, 15
+ @schools = @schools.includes(:courses, users: :user_extensions)
+
+ respond_to do |format|
+ format.js
+ format.html{render :layout => "base_edu"}
+ end
+ end
+
+ def find_partner
+ @partner = Partner.find_by_id(params[:id])
+ render_404 if @partner.nil?
+ rescue ActiveRecord::RecordNotFound
+ render_404
+ end
+
+ def is_admin
+ unless User.current.admin? || (User.current.partner.present? && User.current.partner == @partner)
+ render_403
+ end
end
end
diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb
index 3881dd3d..514d5c5a 100644
--- a/app/controllers/managements_controller.rb
+++ b/app/controllers/managements_controller.rb
@@ -796,12 +796,22 @@ class ManagementsController < ApplicationController
@menu_type = 8
@sub_type = 2
@search = params[:search]
+ @beginTime = params[:beginTime]
+ @endTime = params[:endTime]
if @search.present?
shixun_ids = Shixun.where("name like ?", "%#{params[:search]}%").pluck(:id)
@discusses = Discuss.where(:dis_type => "Shixun", :dis_id => shixun_ids).reorder("created_at desc")
else
@discusses = Discuss.where(:dis_type => "Shixun").reorder("created_at desc")
end
+
+ if params[:beginTime] && params[:beginTime].strip != ""
+ @discusses = @discusses.where("created_at >= '#{Time.parse(params[:beginTime])}'")
+ end
+ if params[:endTime] && params[:endTime].strip != ""
+ @discusses = @discusses.where("created_at <= '#{Time.parse(params[:endTime])}'")
+ end
+
@all_discusses = @discusses
@discusses_count = @discusses.count
@limit = 20
@@ -1175,6 +1185,137 @@ end
end
end
+ def partners
+ @menu_type = 6
+ @sub_type = 3
+ if params[:search].blank?
+ @partners = Partner.includes(:school).order("partners.created_at desc")
+ else
+ @partners = Partner.where("name like ? ", "%#{params[:search]}%").includes(:school).order("partners.created_at desc")
+ end
+
+ @current_partner = nil
+ if params[:partner]
+ @current_partner = @partners.find params[:partner]
+ else
+ @current_partner = @partners[0] if @partners.size > 0
+ end
+
+ respond_to do |format|
+ format.js
+ format.html
+ end
+ end
+
+ def get_partner
+ @partner = Partner.find partner
+
+ end
+
+ # 添加客户
+ def customers_list
+ @search = params[:search]
+ @province = params[:province]
+ partner_id = params[:partner_id]
+ @partner = Partner.find partner_id
+ @customers = @partner.customers
+ if @customers.present?
+ @schools = School.where("(partner_id != ? or partner_id is NULL) and customer_id is NULL", @partner.id)
+ else
+ @schools = School.where("customer_id is null and (partner_id != ? or partner_id is NULL)", @partner.id)
+ end
+ if params[:search]
+ @schools = @schools.where("name like ?", "%#{@search}%")
+ end
+
+ if params[:province] && params[:province] != '0'
+ @schools = @schools.where("province like ?", "%#{@province}%")
+ end
+ @limit = 10
+ @page = params[:page] || 1
+ @schools_count = @schools.count
+
+ @total_pages = (@schools_count / 10.0).ceil
+ @schools = paginateHelper @schools, @limit
+ respond_to do |format|
+ format.js
+ format.json {
+ render json: @schools
+ }
+ end
+ end
+
+ def add_customers
+ school_ids = params[:school_ids]
+ if school_ids.length > 0
+ school_ids.each do |s|
+ school = School.where("id = ?",s).first
+ if school.present?
+ customer = Customer.new(partner_id: params[:partner_id])
+ customer.save!
+ school.update_attributes(:customer_id => customer.id)
+ end
+ end
+ render :json => {status: 1, message: "创建成功!"}
+ end
+ end
+
+ def delete_customers
+ if params[:customer]
+ customer = Customer.where(id: params[:customer]).first
+ @current_partner = customer.partner
+ customer.school.update_attributes(:customer_id => nil)
+ customer.destroy
+ end
+ end
+
+ def all_partners
+ @search = params[:search]
+ @province = params[:province]
+ @schools = School.where("partner_id IS NULL")
+
+ if params[:search]
+ @schools = @schools.where("name like ?", "%#{@search}%")
+ end
+
+ if params[:province] && params[:province] != '0'
+ @schools = @schools.where("province like ?", "%#{@province}%")
+ end
+
+ @limit = 10
+ @page = params[:page] || 1
+ @schools_count = @schools.count
+
+ @total_pages = (@schools_count / 10.0).ceil
+ @schools = paginateHelper @schools, @limit
+ respond_to do |format|
+ format.js
+ format.json {
+ render json: @schools
+ }
+ end
+ end
+
+
+ def add_partner
+ school_ids = params[:school_ids]
+ if school_ids.length > 0
+ school_ids.each do |s|
+ school = School.where("id = ?",s).first
+ if school.present? && school.partner_id.nil?
+ partner = Partner.new(name: school.name)
+ partner.save
+ school.update_attributes(:partner_id => partner.id)
+ end
+ end
+ end
+ render :json => {status: 1, message: "创建成功!"}
+ end
+
+
+
+
+
# 删除部门管理员
def delete_depart_member
DepartmentMember.where(:department_id => params[:depart], :user_id => params[:user_id]).destroy_all
@@ -1202,8 +1343,55 @@ end
@department.department_members << DepartmentMember.new(:user_id => member)
end
end
+ redirect_to partners_managments_path
+
+ # respond_to do |format|
+ # format.html {render :layout => "base_edu"}
+ # format.js
+ # end
+
+ end
+
+ # 添加合作伙伴管理员- 弹框
+ def add_partner_member_box
+ @partner = Partner.where(:id => params[:partner]).first
+ @members =
+ if params[:search]
+ User.where("LOWER(concat(lastname, firstname, nickname, mail)) LIKE '%#{params[:search]}%' AND partner_id is NULL")
+ else
+ User.where(:certification => 1, :partner_id => nil )
+ end
+ @total_pages = (@members.count / 10.0).ceil
+ @members = paginateHelper @members, 10
+ respond_to do |format|
+ format.js
+ format.json {
+ render json: member_json_data(@members)
+ }
+ end
end
+ # 合作伙伴添加管理员
+ def add_partner_member
+ if params[:partner] && params[:partner_member]
+ @partner = Partner.find_by_id params[:partner]
+ params[:partner_member].each do |member|
+ user = User.find_by_id member
+ user.update_attributes(partner_id: @partner.id) if !@partner.nil? && !user.nil?
+ end
+ end
+ end
+
+ # 合作伙伴删除管理员
+ def delete_partner_member
+ if params[:partner] && params[:partner_member]
+ @partner = Partner.find_by_id params[:partner]
+ user = User.find_by_id params[:partner_member]
+ user.update_attributes(partner_id: nil) if !@partner.nil? && !user.nil?
+ end
+ end
+
+
# check 部门 identifier是否重复
def check_depart_identifier
logger.info("###############{params}")
@@ -4082,7 +4270,8 @@ end
sheet1[count_row, 5] = discusses.count
discusses.each_with_index do |discuss, j|
user = discuss.user
- sheet1[count_row, 6] = discuss.content.gsub(//, "【图片评论】").gsub(/!\[\].+\)/, "【图片评论】")
+ content = discuss.content.gsub(//, "【图片评论】").gsub(/!\[\].+\)/, "【图片评论】")
+ sheet1[count_row, 6] = strip_html content
sheet1[count_row, 7] = "第#{discuss.position}关"
sheet1[count_row, 8] = user.show_real_name
sheet1[count_row, 9] = user.identity
@@ -4221,4 +4410,19 @@ end
book.write xls_report
xls_report.string
end
+
+ def member_json_data mmebers
+ mmebers.map do |member|
+ real_name = member.show_real_name
+ identity = member.identity
+ school_name = member.school_name
+ user_phone = member.phone || ""
+ member.attributes.dup.except("login", "hashed_password", "salt", "status", "mail", "experience", "grade",
+ "authentication", "professional_certification").merge({real_name: real_name,
+ identity: identity,
+ school_name: school_name,
+ user_phone: user_phone})
+ end
+ end
+
end
diff --git a/app/controllers/partners_controller.rb b/app/controllers/partners_controller.rb
new file mode 100644
index 00000000..214948cf
--- /dev/null
+++ b/app/controllers/partners_controller.rb
@@ -0,0 +1,29 @@
+class PartnersController < ApplicationController
+ layout 'base_management'
+
+ def index
+ @menu_type = 6
+ @sub_type = 3
+
+ @partners = Partner.includes(:school)
+ end
+
+ def new
+
+ end
+
+ def edit
+
+ end
+
+ def create
+
+ end
+
+ def destroy
+
+ end
+
+ private
+
+end
diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb
index 78fb4a63..367b3e99 100644
--- a/app/controllers/poll_controller.rb
+++ b/app/controllers/poll_controller.rb
@@ -9,6 +9,7 @@ class PollController < ApplicationController
before_filter :require_login, :only => [:student_poll_list, :show]
include PollHelper
include ApplicationHelper
+
def index
if @course.is_public == 0 && !(User.current.member_of_course?(@course)||User.current.admin?)
render_403
@@ -18,13 +19,13 @@ class PollController < ApplicationController
if @is_teacher
polls = @course.polls.order("IF(ISNULL(publish_time),0,1), publish_time DESC, created_at DESC")
- elsif User.current.member_of_course?(@course)
+ elsif User.current.member_of_course?(@course) # 课堂成员显示为发布的和已发布的
member = @course.members.where(:user_id => User.current.id).first
if member.try(:course_group_id).to_i == 0
polls = @course.polls.where("publish_time <= '#{Time.now}' and unified_setting = 1").order("IF(ISNULL(publish_time),0,1),publish_time DESC, created_at DESC")
- else
+ else # 已分班的成员
not_poll_ids = @course.poll_group_settings.where("course_group_id = #{member.try(:course_group_id)} and (publish_time > '#{Time.now}' or publish_time is null)")
- not_poll_ids = not_poll_ids.blank? ? "(-1)" : "(" + not_poll_ids.map(&:poll_id).join(",") + ")"
+ not_poll_ids = not_poll_ids.blank? ? "(-1)" : "(" + not_poll_ids.map(&:poll_id).join(",") + ")" # 已分班,但是成员不再
polls = @course.polls.where("publish_time <= '#{Time.now}' and id not in #{not_poll_ids}").order("IF(ISNULL(publish_time),0,1),publish_time DESC, created_at DESC")
end
else
@@ -414,7 +415,6 @@ class PollController < ApplicationController
def update_poll_question
@poll_question = PollQuestion.find params[:poll_question]
@poll = @poll_question.poll
- @poll_question.is_necessary = params[:is_necessary] == "1" ? 1 : 0
@poll_question.question_title = params[:question_title].nil? || params[:question_title].empty? ? l(:label_enter_single_title) : params[:question_title]
@poll_question.max_choices = params[:max_choices].to_i || 0
@poll_question.min_choices = params[:min_choices].to_i || 0
diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb
index 83ec54f8..b2761b60 100644
--- a/app/controllers/shixuns_controller.rb
+++ b/app/controllers/shixuns_controller.rb
@@ -324,9 +324,15 @@ class ShixunsController < ApplicationController
@search_name = "#{sub.name} / #{tag.name}"
end
shixun_id = ShixunTagRepertoire.where(:tag_repertoire_id => tag).map(&:shixun_id)
- @shixuns = Shixun.select([:id, :name, :user_id, :challenges_count, :visits, :status, :myshixuns_count, :trainee, :use_scope, :identifier, :image_text, :averge_star]).where(:id => shixun_id, :hidden => 0).includes(:challenges, :schools, :shixun_members, :users).order("status = 2 desc, publish_time asc")
+ @shixuns = Shixun.select([:id, :name, :user_id, :challenges_count, :visits, :status, :myshixuns_count,
+ :trainee, :use_scope, :identifier, :image_text, :averge_star])
+ .where(:id => shixun_id, :hidden => 0).where("status != -1")
+ .includes(:challenges, :schools, :shixun_members, :users).order("status = 2 desc, publish_time asc")
else
- @shixuns = Shixun.select([:id, :name, :user_id, :challenges_count, :visits, :status, :myshixuns_count, :trainee, :use_scope, :identifier, :image_text, :averge_star]).where(:hidden => 0).includes(:challenges, :schools, :shixun_members, :users).order("status = 2 desc, publish_time asc")
+ @shixuns = Shixun.select([:id, :name, :user_id, :challenges_count, :visits, :status, :myshixuns_count,
+ :trainee, :use_scope, :identifier, :image_text, :averge_star])
+ .where("status != ? and hidden = ?", -1, 0).includes(:challenges, :schools, :shixun_members, :users)
+ .order("status = 2 desc, publish_time asc")
end
# # 依据tag和语言推荐实训,如果tag不够,则依据语言推荐;语言不够,则取系统的三个
# @recommend_shixuns = Shixun.find_by_sql("select challenge_id from challenge_tags where name like
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 39bae842..707ff571 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -708,6 +708,8 @@ module ApplicationHelper
when 6
if sub_type == 1
link_to('单位列表', departments_part_managements_path()) + "#{grandchild_type[:next_type] == 1 ? " > #{grandchild_type[:school].name}" : ""}"
+ elsif sub_type == 3
+ "合作伙伴"
else
"单位部门列表"
end
diff --git a/app/helpers/poll_helper.rb b/app/helpers/poll_helper.rb
index 411fc3c3..1ac26aa6 100644
--- a/app/helpers/poll_helper.rb
+++ b/app/helpers/poll_helper.rb
@@ -20,11 +20,11 @@
module PollHelper
def un_commit_num poll
course = poll.course
- member = course.members.where(:user_id => User.current.id).first
- poll_users = poll.poll_users
- student_count = course.student.count
+ member = course.members.where(:user_id => User.current.id).first ## 当前用户是否为课堂成员
+ poll_users = poll.poll_users # 问卷的全部用户,包含已回答的/为回答,但是浏览的
+ student_count = course.student.count # 课堂的学生数
if member.present? && member.teacher_course_groups.count > 0
- group_students = course.members.where(:course_group_id => member.teacher_course_groups.pluck(:course_group_id)).map(&:user_id)
+ group_students = course.members.where(:course_group_id => member.teacher_course_groups.pluck(:course_group_id)).map(&:user_id) ## 统计当前用户所在班级的全部学生
student_count = group_students.size
poll_users = poll_users.where(:user_id => group_students)
end
diff --git a/app/models/customer.rb b/app/models/customer.rb
new file mode 100644
index 00000000..673acd20
--- /dev/null
+++ b/app/models/customer.rb
@@ -0,0 +1,6 @@
+class Customer < ActiveRecord::Base
+ default_scope :order => 'customers.created_at desc'
+ belongs_to :partner
+ has_one :school
+ has_many :users
+end
diff --git a/app/models/message.rb b/app/models/message.rb
index 6fb9bb59..63a7ce5f 100644
--- a/app/models/message.rb
+++ b/app/models/message.rb
@@ -53,6 +53,7 @@ class Message < ActiveRecord::Base
has_many :tidings, :as => :container , :dependent => :destroy
belongs_to :reply, :class_name => 'Message', :foreign_key => 'reply_id'
+ has_one :message_detail, :dependent => :destroy
#转发表
has_many :forwards, :as => :from, :dependent => :destroy
@@ -117,6 +118,10 @@ class Message < ActiveRecord::Base
self.content
end
+ def content
+ self.message_detail.try(:content)
+ end
+
def topic?
parent_id.nil?
end
diff --git a/app/models/partner.rb b/app/models/partner.rb
new file mode 100644
index 00000000..217bc1a7
--- /dev/null
+++ b/app/models/partner.rb
@@ -0,0 +1,8 @@
+class Partner < ActiveRecord::Base
+ # attr_accessible :name, :active
+ attr_accessor :active
+
+ has_one :school
+ has_many :customers
+ has_many :users
+end
diff --git a/app/models/school.rb b/app/models/school.rb
index 2a33acac..62e27987 100644
--- a/app/models/school.rb
+++ b/app/models/school.rb
@@ -3,7 +3,8 @@
class School < ActiveRecord::Base
attr_accessible :name, :province, :pinyin, :city, :address, :logo_link,
:auto_users_trial, :shool_code, :authorization_time,
- :identifier, :is_online, :video_desc, :video_name,:course_link, :course_name
+ :identifier, :is_online, :video_desc, :video_name,:course_link,
+ :course_name, :partner_id, :customer_id
has_many :courses
has_many :departments, :dependent => :destroy
has_many :shixun_schools, :dependent => :destroy
@@ -15,6 +16,9 @@ class School < ActiveRecord::Base
has_many :ec_majors, :through => :ec_major_schools
has_many :ec_major_schools, :dependent => :destroy
+ belongs_to :partner
+ belongs_to :customer
+
# banner图片信息
has_many :school_images, :dependent => :destroy
@@ -26,4 +30,40 @@ class School < ActiveRecord::Base
def to_s
self.name.to_s
end
+
+ def teacher_count
+ User.find_by_sql("SELECT COUNT(users.`id`) AS teacher_count FROM users LEFT JOIN user_extensions ON
+ users.id=user_extensions.user_id WHERE user_extensions.`school_id` = #{self.id} AND
+ user_extensions.`identity` = 0").first.try(:teacher_count)
+ end
+
+ def student_count
+ User.find_by_sql("SELECT COUNT(users.`id`) AS student_count FROM users LEFT JOIN user_extensions ON
+ users.id=user_extensions.user_id WHERE user_extensions.`school_id` = #{self.id} AND
+ user_extensions.`identity` = 1").first.try(:student_count)
+ end
+
+ def course_count
+ Course.find_by_sql("SELECT COUNT(courses.`id`) AS course_count FROM courses LEFT JOIN user_extensions ON
+ courses.tea_id=user_extensions.user_id WHERE user_extensions.`school_id` = #{self.id} AND
+ courses.id != 1309").first.try(:course_count)
+ end
+
+ def shixun_count
+ Shixun.find_by_sql("select count(s.id) as shixun_count from users u right join shixuns s on u.id=s.user_id and
+ s.status in (2, 3) inner join user_extensions ue on u.id=ue.user_id and
+ ue.school_id=#{self.id}").first.try(:shixun_count)
+ end
+
+ def shixun_report_count
+ StudentWork.find_by_sql("SELECT count(*) as sw_count FROM `student_works` where user_id in
+ (SELECT users.id FROM users RIGHT JOIN user_extensions ON users.id=user_extensions.user_id
+ WHERE user_extensions.`school_id`=#{self.id}) and work_status between 1 and 2 and
+ myshixun_id !=0").first.try(:sw_count)
+ end
+
+ def statistic_url
+ dep = departments.where("identifier is not null").first
+ url = dep.present? ? "/colleges/#{dep.identifier}/statistics" : ""
+ end
end
diff --git a/app/models/user.rb b/app/models/user.rb
index 31c58f26..752ea113 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -160,6 +160,7 @@ class User < Principal
## added by xianbo for delete
# has_many :biding_projects, :dependent => :destroy
belongs_to :softapplication, :foreign_key => 'id', :dependent => :destroy
+ belongs_to :partner
##ended by xianbo
#####fq
diff --git a/app/views/managements/_users_list.html.erb b/app/views/cooperates/_partner_item.html.erb
similarity index 54%
rename from app/views/managements/_users_list.html.erb
rename to app/views/cooperates/_partner_item.html.erb
index 993c6db3..a094c452 100644
--- a/app/views/managements/_users_list.html.erb
+++ b/app/views/cooperates/_partner_item.html.erb
@@ -9,29 +9,26 @@
使用详情
+ <% @schools.each_with_index do |school, index| %>
-
- 1
- 国防科技大学
- 22
-
- 33
-
-
- 44
-
-
- 55
-
-
- 66
-
+ <%= index + 1 %>
+ <%= school.name %>
+ <%= school.teacher_count %>
+ <%= school.student_count %>
+ <%= school.course_count %>
+ <%= school.shixun_count %>
+ <%= school.shixun_report_count %>
- 查看
+ <% if school.statistic_url != "" %>
+ 查看
+ <% else %>
+ --
+ <% end %>
-
-
+ <% end %>
+
diff --git a/app/views/cooperates/partner_list.html.erb b/app/views/cooperates/partner_list.html.erb
new file mode 100644
index 00000000..06cc0910
--- /dev/null
+++ b/app/views/cooperates/partner_list.html.erb
@@ -0,0 +1,42 @@
+
+
+
+
+
+ <%= @obj_count %>
+ 个检索结果(<%= @all_count %> 单位)
+
+
+
+
+
+ <%= render :partial => "partner_item" %>
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/cooperates/partner_list.js.erb b/app/views/cooperates/partner_list.js.erb
new file mode 100644
index 00000000..7b44c9df
--- /dev/null
+++ b/app/views/cooperates/partner_list.js.erb
@@ -0,0 +1,2 @@
+$("#partner_school_list").html("<%= j(render :partial => "partner_item") %>");
+$("#search_partner_count").html("<%= @obj_count %>");
\ No newline at end of file
diff --git a/app/views/courses/index.js.erb b/app/views/courses/index.js.erb
index 7ed24fff..f211e3ae 100644
--- a/app/views/courses/index.js.erb
+++ b/app/views/courses/index.js.erb
@@ -1 +1 @@
-$("#intelligence_course_list").html("<%= j(render :partial => "courses/courseList") %>");
\ No newline at end of file
+$("#intelligence_course_list").html("<%= j(render :partial => "courses/courseList") %>");
diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb
index 9c8f4a8d..0cfd2916 100644
--- a/app/views/layouts/_logined_header.html.erb
+++ b/app/views/layouts/_logined_header.html.erb
@@ -52,10 +52,11 @@
- <%= link_to '我的课堂', user_path(User.current) %>
- <%= link_to '我的实训', user_path(User.current, :type => 'a_shixun') %>
- <%= link_to '我的实训课程', user_path(User.current, :type => 'a_path') %>
+ <% if User.current.partner.present? %>
+ - <%= link_to '客户管理', partner_list_cooperate_path(User.current.partner) %>
+ <% end %>
- <%= link_to '我的项目', user_path(User.current, :type => 'a_project') %>
- - 客户管理
-
<% if User.current.department_members.count > 0 %>
- <%= link_to '学院统计', statistics_college_path(User.current.department_members.first.try(:department)) %>
<% end %>
diff --git a/app/views/layouts/base_management.html.erb b/app/views/layouts/base_management.html.erb
index c6e87870..65c444c1 100644
--- a/app/views/layouts/base_management.html.erb
+++ b/app/views/layouts/base_management.html.erb
@@ -13,6 +13,10 @@
<%= javascript_include_tag "edu/application",'edu/base_edu','edu/account', 'baiduTemplate', 'jquery.datetimepicker.js', "edu/management", 'educoder/edu_application' %>
<%= call_hook :view_layouts_base_html_head %>
<%= yield :header_tags -%>
+
+
@@ -71,6 +75,7 @@
- <%= link_to "单位列表", departments_part_managements_path, :class => "edu-admin-nav-a" %>
- <%= link_to "单位部门列表", departments_managements_path %>
+ - <%= link_to "合作伙伴", partners_managements_path %>