This commit is contained in:
nwb 2014-07-18 09:21:21 +08:00
commit 28543e3288
11 changed files with 1213 additions and 1202 deletions

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
<% @nav_dispaly_project_label = 1 %>
<% #@nav_dispaly_project_label = 1 %>
<!DOCTYPE html>
<html lang="en">
<head>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2231,4 +2231,3 @@ ul.messages-for-user-reply li {
.footer_text_link{
margin: 0px 5px;
}
/*gcm*/