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]+$/
|
validates_format_of :name,:with =>/^[a-zA-Z0-9_\u4e00-\u9fa5]+$/
|
||||||
|
|
||||||
before_save :self_validate
|
before_save :self_validate
|
||||||
after_save :create_board_sync
|
after_create :create_board_sync
|
||||||
before_destroy :delete_all_members
|
before_destroy :delete_all_members
|
||||||
|
|
||||||
safe_attributes 'extra',
|
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_position_under_parent, :if => Proc.new {|project| project.name_changed?}
|
||||||
after_save :update_inherited_members, :if => Proc.new {|project| project.inherit_members_changed?}
|
after_save :update_inherited_members, :if => Proc.new {|project| project.inherit_members_changed?}
|
||||||
# 创建project之后默认创建一个board,之后的board去掉了board的概念
|
# 创建project之后默认创建一个board,之后的board去掉了board的概念
|
||||||
after_save :create_board_sync
|
after_create :create_board_sync
|
||||||
before_destroy :delete_all_members
|
before_destroy :delete_all_members
|
||||||
def remove_references_before_destroy
|
def remove_references_before_destroy
|
||||||
return if self.id.nil?
|
return if self.id.nil?
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
<ul class="course_sub_menu">
|
<ul class="course_sub_menu">
|
||||||
<% User.current.courses.each do |course| %>
|
<% User.current.courses.each do |course| %>
|
||||||
<% if !course_endTime_timeout?(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 %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</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} %>
|
<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">
|
<ul class="project_sub_menu">
|
||||||
<% User.current.projects.each do |project| %>
|
<% 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 %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<% @nav_dispaly_project_label = 1 %>
|
<% #@nav_dispaly_project_label = 1 %>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
|
|
@ -45,6 +45,8 @@ class AttachmentsControllerTest < ActionController::TestCase
|
||||||
role.save
|
role.save
|
||||||
}
|
}
|
||||||
User.current = nil
|
User.current = nil
|
||||||
|
@request.session[:ctime] = Time.now.to_i
|
||||||
|
@request.session[:atime] = Time.now.to_i
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,8 @@ class CodeReviewControllerTest < ActionController::TestCase
|
||||||
role.permissions << :view_code_review
|
role.permissions << :view_code_review
|
||||||
role.save
|
role.save
|
||||||
}
|
}
|
||||||
|
@request.session[:ctime] = Time.now.to_i
|
||||||
|
@request.session[:atime] = Time.now.to_i
|
||||||
end
|
end
|
||||||
|
|
||||||
context "index" do
|
context "index" do
|
||||||
|
|
|
@ -42,6 +42,8 @@ class CodeReviewSettingsControllerTest < ActionController::TestCase
|
||||||
role.permissions << :view_code_review
|
role.permissions << :view_code_review
|
||||||
role.save
|
role.save
|
||||||
}
|
}
|
||||||
|
@request.session[:ctime] = Time.now.to_i
|
||||||
|
@request.session[:atime] = Time.now.to_i
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -62,6 +62,8 @@ class IssuesControllerTest < ActionController::TestCase
|
||||||
role.permissions << :view_code_review
|
role.permissions << :view_code_review
|
||||||
role.save
|
role.save
|
||||||
}
|
}
|
||||||
|
@request.session[:ctime] = Time.now.to_i
|
||||||
|
@request.session[:atime] = Time.now.to_i
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_show
|
def test_show
|
||||||
|
|
|
@ -26,6 +26,8 @@ class ProjectsControllerTest < ActionController::TestCase
|
||||||
@controller = ProjectsController.new
|
@controller = ProjectsController.new
|
||||||
@request = ActionController::TestRequest.new
|
@request = ActionController::TestRequest.new
|
||||||
@response = ActionController::TestResponse.new
|
@response = ActionController::TestResponse.new
|
||||||
|
@request.session[:ctime] = Time.now.to_i
|
||||||
|
@request.session[:atime] = Time.now.to_i
|
||||||
end
|
end
|
||||||
|
|
||||||
context "#settings" do
|
context "#settings" do
|
||||||
|
|
|
@ -52,6 +52,8 @@ class RepositoriesControllerTest < ActionController::TestCase
|
||||||
role.permissions << :browse_repository
|
role.permissions << :browse_repository
|
||||||
role.save
|
role.save
|
||||||
}
|
}
|
||||||
|
@request.session[:ctime] = Time.now.to_i
|
||||||
|
@request.session[:atime] = Time.now.to_i
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_revision
|
def test_revision
|
||||||
|
|
|
@ -2231,4 +2231,3 @@ ul.messages-for-user-reply li {
|
||||||
.footer_text_link{
|
.footer_text_link{
|
||||||
margin: 0px 5px;
|
margin: 0px 5px;
|
||||||
}
|
}
|
||||||
/*gcm*/
|
|
Loading…
Reference in New Issue