删除项目后依旧能fork项目功能
This commit is contained in:
parent
ddbef73270
commit
065cd95714
|
@ -805,6 +805,7 @@ class ProjectsController < ApplicationController
|
|||
repoisitory = Repository.where(:project_id => @project.id, :type => GITLABTYPE).first
|
||||
repoisitory.delete
|
||||
@project.update_column(:gpid, nil)
|
||||
@project.update_column(:forked_from_project_id, nil)
|
||||
else
|
||||
flash[:error] = l(:error_can_not_archive_project)
|
||||
end
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
<% if Member.where(:user_id => User.current.id, :project_id => @project.id).first.try(:roles).to_s.include?("Manager") %>
|
||||
<%= link_to(l(:button_delete_project), { :controller => 'projects', :action => 'archive', :id => @project, :status => params[:status], :type =>"project" },
|
||||
:data => {:confirm => l(:text_delete_project_are_you_sure)}, :method => :post, :class => "sy_btn_grey mr5 fl ml15") unless @project.archived? %>
|
||||
<p class="fl c_grey">(友情提示:删除该项目后如果您想恢复该项目,请联系系统管理员!)</p>
|
||||
<p class="fl c_grey">(友情提示:删除操作会彻底删除项目的所有信息,一旦删除不能恢复!)</p>
|
||||
<% end %>
|
||||
<a href="javascript:void(0)" class="sy_btn_blue mr15 fr" onclick="submit_edit_project(<%= @project.id %>);" >保存</a>
|
||||
</li>
|
||||
|
|
Loading…
Reference in New Issue