Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
28543e3288
|
@ -39,7 +39,7 @@ class Course < ActiveRecord::Base
|
|||
validates_format_of :name,:with =>/^[a-zA-Z0-9_\u4e00-\u9fa5]+$/
|
||||
|
||||
before_save :self_validate
|
||||
after_save :create_board_sync
|
||||
after_create :create_board_sync
|
||||
before_destroy :delete_all_members
|
||||
|
||||
safe_attributes 'extra',
|
||||
|
|
|
@ -127,7 +127,7 @@ class Project < ActiveRecord::Base
|
|||
after_save :update_position_under_parent, :if => Proc.new {|project| project.name_changed?}
|
||||
after_save :update_inherited_members, :if => Proc.new {|project| project.inherit_members_changed?}
|
||||
# 创建project之后默认创建一个board,之后的board去掉了board的概念
|
||||
after_save :create_board_sync
|
||||
after_create :create_board_sync
|
||||
before_destroy :delete_all_members
|
||||
def remove_references_before_destroy
|
||||
return if self.id.nil?
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
<ul class="course_sub_menu">
|
||||
<% User.current.courses.each do |course| %>
|
||||
<% if !course_endTime_timeout?(course) %>
|
||||
<li><%= link_to course.name.truncate(10, omission: '...'), course_path(course) %></li>
|
||||
<li><%= link_to course.name.truncate(10, omission: '...'), {:controller => 'courses',:action => 'show',id:course.id} %></li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
@ -54,7 +54,7 @@
|
|||
<li id="project_loggedas_li"><%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain} %>
|
||||
<ul class="project_sub_menu">
|
||||
<% User.current.projects.each do |project| %>
|
||||
<li><%= link_to project.name.truncate(10, omission: '...'), project_path(project) %></li>
|
||||
<li><%= link_to project.name.truncate(10, omission: '...'), {:controller => 'projects', :action => 'show',id: project.id } %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<% @nav_dispaly_project_label = 1 %>
|
||||
<% #@nav_dispaly_project_label = 1 %>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
|
|
@ -45,6 +45,8 @@ class AttachmentsControllerTest < ActionController::TestCase
|
|||
role.save
|
||||
}
|
||||
User.current = nil
|
||||
@request.session[:ctime] = Time.now.to_i
|
||||
@request.session[:atime] = Time.now.to_i
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -41,6 +41,8 @@ class CodeReviewControllerTest < ActionController::TestCase
|
|||
role.permissions << :view_code_review
|
||||
role.save
|
||||
}
|
||||
@request.session[:ctime] = Time.now.to_i
|
||||
@request.session[:atime] = Time.now.to_i
|
||||
end
|
||||
|
||||
context "index" do
|
||||
|
|
|
@ -42,6 +42,8 @@ class CodeReviewSettingsControllerTest < ActionController::TestCase
|
|||
role.permissions << :view_code_review
|
||||
role.save
|
||||
}
|
||||
@request.session[:ctime] = Time.now.to_i
|
||||
@request.session[:atime] = Time.now.to_i
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -62,6 +62,8 @@ class IssuesControllerTest < ActionController::TestCase
|
|||
role.permissions << :view_code_review
|
||||
role.save
|
||||
}
|
||||
@request.session[:ctime] = Time.now.to_i
|
||||
@request.session[:atime] = Time.now.to_i
|
||||
end
|
||||
|
||||
def test_show
|
||||
|
|
|
@ -26,6 +26,8 @@ class ProjectsControllerTest < ActionController::TestCase
|
|||
@controller = ProjectsController.new
|
||||
@request = ActionController::TestRequest.new
|
||||
@response = ActionController::TestResponse.new
|
||||
@request.session[:ctime] = Time.now.to_i
|
||||
@request.session[:atime] = Time.now.to_i
|
||||
end
|
||||
|
||||
context "#settings" do
|
||||
|
|
|
@ -52,6 +52,8 @@ class RepositoriesControllerTest < ActionController::TestCase
|
|||
role.permissions << :browse_repository
|
||||
role.save
|
||||
}
|
||||
@request.session[:ctime] = Time.now.to_i
|
||||
@request.session[:atime] = Time.now.to_i
|
||||
end
|
||||
|
||||
def test_revision
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue