fork弹出新页面,解决间接性500问题
This commit is contained in:
parent
99be187d54
commit
84d7049add
|
@ -406,6 +406,7 @@ class ProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
flash.now[:error] = html if !html.to_s.blank?
|
flash.now[:error] = html if !html.to_s.blank?
|
||||||
end
|
end
|
||||||
|
# for:设置默认分支
|
||||||
scm = params[:repository_scm] || (Redmine::Scm::Base.all & Setting.enabled_scm).first
|
scm = params[:repository_scm] || (Redmine::Scm::Base.all & Setting.enabled_scm).first
|
||||||
@repository = Repository.factory(scm)
|
@repository = Repository.factory(scm)
|
||||||
@repository.is_default = @project.repository.nil?
|
@repository.is_default = @project.repository.nil?
|
||||||
|
|
|
@ -140,7 +140,7 @@ class RepositoriesController < ApplicationController
|
||||||
attrs = {:parent_id => project.parent_id}.reject {|k,v| v.nil?}
|
attrs = {:parent_id => project.parent_id}.reject {|k,v| v.nil?}
|
||||||
redirect_to new_project_url(attrs, :course => '0')
|
redirect_to new_project_url(attrs, :course => '0')
|
||||||
else
|
else
|
||||||
redirect_to settings_project_url(project)
|
redirect_to project_path(project)
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
format.api { render :action => 'show', :status => :created, :location => url_for(:controller => 'projects', :action => 'show', :id => project.id) }
|
format.api { render :action => 'show', :status => :created, :location => url_for(:controller => 'projects', :action => 'show', :id => project.id) }
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<div class="fl mt5 ml15"><a href="javascript:void(0);" class="vl_btn fb" onclick="zip()"><span class="vl_zip"></span>ZIP</a> </div>
|
<div class="fl mt5 ml15"><a href="javascript:void(0);" class="vl_btn fb" onclick="zip()"><span class="vl_zip"></span>ZIP</a> </div>
|
||||||
<%# 针对公开项目:用户必须创建了项目,否则用户无法同步 %>
|
<%# 针对公开项目:用户必须创建了项目,否则用户无法同步 %>
|
||||||
<% if User.current.id != @project.user_id %>
|
<% if User.current.id != @project.user_id %>
|
||||||
<div class="fr mt5"><%= link_to "<span class='vl_fork'></span>".html_safe+"Fork", {:controller => 'repositories', :action => 'forked'}, :class=>"vl_btn", :confirm=>"平台将为您创建一个新的同名项目和版本库,请问是否继续?" %>
|
<div class="fr mt5"><%= link_to "<span class='vl_fork'></span>".html_safe+"Fork", {:controller => 'repositories', :action => 'forked'}, :class=>"vl_btn", :target => "_blank", :confirm=>"平台将为您创建一个新的同名项目和版本库,请问是否继续?" %>
|
||||||
<span href="javascript:void(0);" class="vl_btn_2 fb"><%= @project.forked_count.to_i %></span>
|
<span href="javascript:void(0);" class="vl_btn_2 fb"><%= @project.forked_count.to_i %></span>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in New Issue