版本库删除功能

This commit is contained in:
huang 2016-10-19 10:09:38 +08:00
parent 72ce5a51ed
commit e3ef502be2
1 changed files with 8 additions and 1 deletions

View File

@ -704,9 +704,16 @@ class ProjectsController < ApplicationController
def archive
if request.post?
unless @project.archive
if @project.archive
# 删除版本库信息
g = Gitlab.client
g.delete(@project.gpid)
else
flash[:error] = l(:error_can_not_archive_project)
end
unless @project.archive
end
end
if params[:type] == "project"
redirect_to user_path(User.current)