diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 4e03e071c..5370d2512 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -21,13 +21,14 @@ class ProjectsController < ApplicationController layout 'base_projects' before_filter :authorize1, :only => [:show] - menu_item :overview, :only => :show - menu_item :roadmap, :only => :roadmap - menu_item :settings, :only => :settings - menu_item :homework, :only => [:homework, :new_homework] - menu_item :feedback, :only => :feedback - menu_item :share, :only => :share - + # menu_item :overview, :only => :show + # menu_item :roadmap, :only => :roadmap + # menu_item :settings, :only => :settings + # menu_item :homework, :only => [:homework, :new_homework] + # menu_item :feedback, :only => :feedback + # menu_item :share, :only => :share + skip_before_filter :verify_authenticity_token, :only => [:training_task_status] + skip_before_filter :check_if_login_required, :only => [:training_task_status] before_filter :find_project, :except => [ :index, :search,:list, :new, :create, :copy, :statistics, :new_join, :course, :enterprise_course, :course_enterprise, :view_homework_attaches,:join_project, :project_home, :training_execute, :training_task_status] before_filter :authorize, :only => [:show, :settings, :edit, :sort_project_members, :update, :modules, :close, :reopen,:view_homework_attaches,:course] @@ -35,7 +36,6 @@ class ProjectsController < ApplicationController before_filter :require_admin, :only => [ :copy, :unarchive, :destroy, :calendar] before_filter :file - skip_before_filter :check_if_login_required, only: [:training_task_status] # 除非项目内人员,不可查看成员, TODO: 完了写报表里去 # before_filter :memberAccess, only: :member diff --git a/app/views/layouts/_base_project_top.html.erb b/app/views/layouts/_base_project_top.html.erb index 18733a326..4e1433905 100644 --- a/app/views/layouts/_base_project_top.html.erb +++ b/app/views/layouts/_base_project_top.html.erb @@ -10,7 +10,11 @@
<% unless @project.is_public? %><% end %> - <%=link_to "#{@project.owner.try(:show_name)}/".html_safe, user_path(@project.owner), :class => "pro_new_username" %> + <% if @project.is_training_project? %> + <%=link_to "#{@project.owner.try(:show_name)}导师/".html_safe, user_path(@project.owner), :class => "pro_new_username" %> + <% else %> + <%=link_to "#{@project.owner.try(:show_name)}/".html_safe, user_path(@project.owner), :class => "pro_new_username" %> + <% end %> <%=link_to @project.name, project_path(@project), :class => "pro_new_username break_word" %>