This commit is contained in:
huang 2016-05-20 15:28:09 +08:00
parent b1e0618742
commit dddd7e0ea2
2 changed files with 3 additions and 1 deletions

View File

@ -362,6 +362,8 @@ update
# project_path_cut = RepositoriesHelper::PROJECT_PATH_CUT
# ip = RepositoriesHelper::REPO_IP_ADDRESS
gitlab_address = Redmine::Configuration['gitlab_address']
# REDO:需优化,仅测试用
@zip_path = gitlab_address.to_s + "/api/v3/projects/" + @project.gpid.to_s + "/repository/archive?&private_token=YTyCv4978MXmdL2B9C62"
if @repository.type.to_s == "Repository::Gitlab"
@repos_url = gitlab_address.to_s+"/"+@project.owner.to_s+"/"+@repository.identifier+"."+"git"
else

View File

@ -1,7 +1,7 @@
<%= call_hook(:view_repositories_show_contextual, {:repository => @repository, :project => @project}) %>
<div class="project_r_h">
<div class="fl"><h2 class="project_h2_repository"><%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %></h2></div>
<!--<a href="javascript:void(0);" class="btn_zipdown fr" onclick="">ZIP下载</a>-->
<a href="<%= @zip_path %>" class="btn_zipdown fr" onclick="">ZIP下载</a>
</div>
<div class="repository_con" style="line-height:1.9;">