|
|
@ -23,15 +23,17 @@ class ProjectsController < ApplicationController
|
|
|
|
menu_item l(:label_sort_by_active), :only => :index
|
|
|
|
menu_item l(:label_sort_by_active), :only => :index
|
|
|
|
menu_item l(:label_sort_by_influence), :only => :index
|
|
|
|
menu_item l(:label_sort_by_influence), :only => :index
|
|
|
|
#by huang
|
|
|
|
#by huang
|
|
|
|
# menu_item :files, :only => :files
|
|
|
|
# layout 'base_course'
|
|
|
|
# menu_tiem :news, :only => :news
|
|
|
|
# menu_item l(:label_homework), :only => homework
|
|
|
|
|
|
|
|
# menu_item l(:label_course_file), :only => files
|
|
|
|
|
|
|
|
# menu_item l(:label_settings), :only => settings
|
|
|
|
|
|
|
|
|
|
|
|
before_filter :find_project, :except => [ :index, :search,:list, :new, :create, :copy, :statistics, :new_join]
|
|
|
|
before_filter :find_project, :except => [ :index, :search,:list, :new, :create, :copy, :statistics, :new_join]
|
|
|
|
before_filter :authorize, :except => [:new_join, :new_homework, :homework, :statistics, :search, :watcherlist, :index, :list, :new, :create, :copy, :archive, :unarchive, :destroy, :member, :focus, :file, :statistics, :feedback]
|
|
|
|
before_filter :authorize, :except => [:new_join, :new_homework, :homework, :statistics, :search, :watcherlist, :index, :list, :new, :create, :copy, :archive, :unarchive, :destroy, :member, :focus, :file, :statistics, :feedback]
|
|
|
|
before_filter :authorize_global, :only => [:new, :create]
|
|
|
|
before_filter :authorize_global, :only => [:new, :create]
|
|
|
|
before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy ]
|
|
|
|
before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy ]
|
|
|
|
#by young
|
|
|
|
#by young
|
|
|
|
before_filter :member, :file, :statistics, :watcherlist
|
|
|
|
before_filter :file, :statistics, :watcherlist
|
|
|
|
#
|
|
|
|
#
|
|
|
|
accept_rss_auth :index
|
|
|
|
accept_rss_auth :index
|
|
|
|
accept_api_auth :index, :show, :create, :update, :destroy
|
|
|
|
accept_api_auth :index, :show, :create, :update, :destroy
|
|
|
@ -249,6 +251,7 @@ class ProjectsController < ApplicationController
|
|
|
|
@bids = @bids.offset(@offset).limit(limit).all.reverse
|
|
|
|
@bids = @bids.offset(@offset).limit(limit).all.reverse
|
|
|
|
end
|
|
|
|
end
|
|
|
|
render :layout => 'base_courses'
|
|
|
|
render :layout => 'base_courses'
|
|
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def new_homework
|
|
|
|
def new_homework
|
|
|
@ -497,8 +500,17 @@ class ProjectsController < ApplicationController
|
|
|
|
|
|
|
|
|
|
|
|
#by young
|
|
|
|
#by young
|
|
|
|
def member
|
|
|
|
def member
|
|
|
|
|
|
|
|
if @project.project_type == 1
|
|
|
|
|
|
|
|
render :layout => 'base_courses'
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# def news
|
|
|
|
|
|
|
|
# if @project.project_type == 1
|
|
|
|
|
|
|
|
# render :layout => 'base_courses'
|
|
|
|
|
|
|
|
# end
|
|
|
|
|
|
|
|
# end
|
|
|
|
|
|
|
|
|
|
|
|
def file
|
|
|
|
def file
|
|
|
|
# @course_tag = params[:course]
|
|
|
|
# @course_tag = params[:course]
|
|
|
|
# if @course_tag == '1'
|
|
|
|
# if @course_tag == '1'
|
|
|
|