解决实训任务验证问题 用户名后添加导师

This commit is contained in:
huang 2017-02-25 11:08:37 +08:00
parent 8d41cecf72
commit f459609c81
2 changed files with 13 additions and 9 deletions

View File

@ -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

View File

@ -10,7 +10,11 @@
<div class="pro_new_top clear mb10">
<div class="fl pro_new_name ml15 clear">
<% unless @project.is_public? %><span class="icons_newpro_lock fl "></span><% end %>
<%=link_to "#{@project.owner.try(:show_name)}<span class='ml5 mr5'>/</span>".html_safe, user_path(@project.owner), :class => "pro_new_username" %>
<% 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" %>
<% end %>
<%=link_to @project.name, project_path(@project), :class => "pro_new_username break_word" %>
</div>