parent
5b2202de75
commit
777e3f6fad
|
@ -1,6 +1,6 @@
|
||||||
#added by baiyu
|
#added by baiyu
|
||||||
class GitUsageController < ApplicationController
|
class GitUsageController < ApplicationController
|
||||||
layout "project_base"
|
layout "base_projects"
|
||||||
def ch_usage
|
def ch_usage
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
class IssueCategoriesController < ApplicationController
|
class IssueCategoriesController < ApplicationController
|
||||||
layout "project_base"
|
layout "base_projects"
|
||||||
menu_item :settings
|
menu_item :settings
|
||||||
model_object IssueCategory
|
model_object IssueCategory
|
||||||
before_filter :find_model_object, :except => [:index, :new, :create]
|
before_filter :find_model_object, :except => [:index, :new, :create]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class OrganizationController < ApplicationController
|
class OrganizationController < ApplicationController
|
||||||
layout 'project_base'
|
layout 'base_projects'
|
||||||
before_filter :require_admin, :except => [:index]
|
before_filter :require_admin, :except => [:index]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -438,9 +438,9 @@ class ProjectsController < ApplicationController
|
||||||
case params[:role]
|
case params[:role]
|
||||||
when '1'
|
when '1'
|
||||||
@subPage_title = l :label_teacher_list
|
@subPage_title = l :label_teacher_list
|
||||||
@members = searchTeacherAndAssistant(@project)
|
@members = searchTeacherAndAssistant(@project)
|
||||||
when '2'
|
when '2'
|
||||||
@subPage_title = l :label_student_list
|
@subPage_title = l :label_student_list
|
||||||
@members = searchStudent(@project)
|
@members = searchStudent(@project)
|
||||||
else
|
else
|
||||||
@subPage_title = ''
|
@subPage_title = ''
|
||||||
|
@ -578,7 +578,7 @@ class ProjectsController < ApplicationController
|
||||||
format.api { render_api_ok }
|
format.api { render_api_ok }
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
render :layout => "project_base"
|
render :layout => "base_projects"
|
||||||
end
|
end
|
||||||
# hide project in layout
|
# hide project in layout
|
||||||
@project = nil
|
@project = nil
|
||||||
|
@ -586,7 +586,7 @@ class ProjectsController < ApplicationController
|
||||||
|
|
||||||
def show_projects_score
|
def show_projects_score
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { render :layout => "project_base"}
|
format.html { render :layout => "base_projects"}
|
||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -674,10 +674,10 @@ class ProjectsController < ApplicationController
|
||||||
private
|
private
|
||||||
|
|
||||||
def memberAccess
|
def memberAccess
|
||||||
# 是课程,则判断当前用户是否参加了课程
|
# 如果是私有项目,项目成员不对外公开,公开项目成员列表对外公开。
|
||||||
# return 0 if @project.project_type == Project::ProjectType_project
|
unless @project.is_public?
|
||||||
# currentUser = User.current
|
render_403 unless User.current.member_of?(@project)
|
||||||
render_403 unless User.current.member_of?(@project)
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def toggleCourse
|
def toggleCourse
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
class CodeReviewController < ApplicationController
|
class CodeReviewController < ApplicationController
|
||||||
layout "project_base"
|
layout "base_projects"
|
||||||
unloadable
|
unloadable
|
||||||
before_filter :find_project, :authorize, :find_user, :find_setting, :find_repository
|
before_filter :find_project, :authorize, :find_user, :find_setting, :find_repository
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue