解决实训任务验证问题 用户名后添加导师
This commit is contained in:
parent
8d41cecf72
commit
f459609c81
|
@ -21,13 +21,14 @@
|
||||||
class ProjectsController < ApplicationController
|
class ProjectsController < ApplicationController
|
||||||
layout 'base_projects'
|
layout 'base_projects'
|
||||||
before_filter :authorize1, :only => [:show]
|
before_filter :authorize1, :only => [:show]
|
||||||
menu_item :overview, :only => :show
|
# menu_item :overview, :only => :show
|
||||||
menu_item :roadmap, :only => :roadmap
|
# menu_item :roadmap, :only => :roadmap
|
||||||
menu_item :settings, :only => :settings
|
# menu_item :settings, :only => :settings
|
||||||
menu_item :homework, :only => [:homework, :new_homework]
|
# menu_item :homework, :only => [:homework, :new_homework]
|
||||||
menu_item :feedback, :only => :feedback
|
# menu_item :feedback, :only => :feedback
|
||||||
menu_item :share, :only => :share
|
# 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,
|
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]
|
: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]
|
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 :require_admin, :only => [ :copy, :unarchive, :destroy, :calendar]
|
||||||
before_filter :file
|
before_filter :file
|
||||||
|
|
||||||
skip_before_filter :check_if_login_required, only: [:training_task_status]
|
|
||||||
|
|
||||||
# 除非项目内人员,不可查看成员, TODO: 完了写报表里去
|
# 除非项目内人员,不可查看成员, TODO: 完了写报表里去
|
||||||
# before_filter :memberAccess, only: :member
|
# before_filter :memberAccess, only: :member
|
||||||
|
|
|
@ -10,7 +10,11 @@
|
||||||
<div class="pro_new_top clear mb10">
|
<div class="pro_new_top clear mb10">
|
||||||
<div class="fl pro_new_name ml15 clear">
|
<div class="fl pro_new_name ml15 clear">
|
||||||
<% unless @project.is_public? %><span class="icons_newpro_lock fl "></span><% end %>
|
<% unless @project.is_public? %><span class="icons_newpro_lock fl "></span><% end %>
|
||||||
|
<% if @project.is_training_project? %>
|
||||||
|
<%=link_to "#{@project.owner.try(:show_name)}导师<span class='ml5 mr5'>/</span>".html_safe, user_path(@project.owner), :class => "pro_new_username" %>
|
||||||
|
<% else %>
|
||||||
<%=link_to "#{@project.owner.try(:show_name)}<span class='ml5 mr5'>/</span>".html_safe, user_path(@project.owner), :class => "pro_new_username" %>
|
<%=link_to "#{@project.owner.try(:show_name)}<span class='ml5 mr5'>/</span>".html_safe, user_path(@project.owner), :class => "pro_new_username" %>
|
||||||
|
<% end %>
|
||||||
<%=link_to @project.name, project_path(@project), :class => "pro_new_username break_word" %>
|
<%=link_to @project.name, project_path(@project), :class => "pro_new_username break_word" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue