|
|
|
@ -2562,7 +2562,13 @@ class UsersController < ApplicationController
|
|
|
|
|
|
|
|
|
|
# 用户访问自己主页的"我管理的"列表,且是第一页才显示新建入口
|
|
|
|
|
page = params[:page] ? params[:page].to_i : 1
|
|
|
|
|
|
|
|
|
|
# 学生身份没有课堂的新建入口
|
|
|
|
|
if @user.user_extensions.try(:identity) == 1
|
|
|
|
|
@new_icon = @user == User.current && ['a_shixun', 'a_project', 'a_path'].include?(@type) && page == 1
|
|
|
|
|
else
|
|
|
|
|
@new_icon = @user == User.current && ['a_course', 'a_shixun', 'a_project', 'a_path'].include?(@type) && page == 1
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# 用户进自己主页的全部列表时有个新建入口,加一个"new",view层的第一页需要shift,这样翻页就没问题啦
|
|
|
|
|
@objects = @objects.to_a
|
|
|
|
|