Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
This commit is contained in:
commit
62a7d56c97
|
@ -653,12 +653,12 @@ class ProjectsController < ApplicationController
|
||||||
def update
|
def update
|
||||||
@project.safe_attributes = params[:project]
|
@project.safe_attributes = params[:project]
|
||||||
@project.organization_id = params[:organization_id]
|
@project.organization_id = params[:organization_id]
|
||||||
params[:project][:is_public] ? @project.is_public = 1 : @project.is_public = 0
|
params[:project][:is_public] == "on" ? @project.is_public = 1 : @project.is_public = 0
|
||||||
params[:project][:hidden_repo] ? @project.hidden_repo = 1 : @project.hidden_repo = 0
|
params[:project][:hidden_repo] == "on" ? @project.hidden_repo = 1 : @project.hidden_repo = 0
|
||||||
# 更新公开私有时同步gitlab公开私有
|
# 更新公开私有时同步gitlab公开私有
|
||||||
if !@project.gpid.nil? && @project.is_public != (params[:project][:is_public] == "on" ? true : false)
|
if !@project.gpid.nil? && @project.is_public != (params[:project][:is_public] == "on" ? 1 : 0)
|
||||||
g = Gitlab.client
|
g = Gitlab.client
|
||||||
params[:project][:is_public] ? g.edit_project(@project.gpid, 20, params[:branch]) : g.edit_project(@project.gpid, 0, params[:branch])
|
params[:project][:is_public] == "on" ? g.edit_project(@project.gpid, 20, params[:branch]) : g.edit_project(@project.gpid, 0, params[:branch])
|
||||||
end
|
end
|
||||||
# end
|
# end
|
||||||
if validate_parent_id && @project.save
|
if validate_parent_id && @project.save
|
||||||
|
|
|
@ -21,7 +21,13 @@
|
||||||
<li class="analysis-result-version fl fontBlue2" title="分支名"><%= qa.branch %></li>
|
<li class="analysis-result-version fl fontBlue2" title="分支名"><%= qa.branch %></li>
|
||||||
<li class="analysis-result-loc fl fontBlue2" title="语言"><%= qa.language %></li>
|
<li class="analysis-result-loc fl fontBlue2" title="语言"><%= qa.language %></li>
|
||||||
<li class="analysis-result-debt fl fontBlue2" title="时间"><%= qa.path %></li>
|
<li class="analysis-result-debt fl fontBlue2" title="时间"><%= qa.path %></li>
|
||||||
<li class="analysis-result-time fl fontBlue2" title="编辑"><%=link_to "编辑", edit_project_quality_analysi_path(qa, :project_id => @project.id), :remote => true %></li>
|
<% if User.current.try(:login) == qa.author_login %>
|
||||||
|
<li class="analysis-result-time fl" title="编辑">
|
||||||
|
<%=link_to "编辑", edit_project_quality_analysi_path(qa, :project_id => @project.id), :remote => true, :class => "fontBlue2" %>
|
||||||
|
</li>
|
||||||
|
<% else %>
|
||||||
|
<li class="analysis-result-time fl" style="color: #888" title="编辑">编辑</li>
|
||||||
|
<% end %>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<a href="<%= @zip_path %>" class="btn_zipdown fr" onclick="">ZIP下载</a>
|
<a href="<%= @zip_path %>" class="btn_zipdown fr" onclick="">ZIP下载</a>
|
||||||
<%# if is_project_manager?(User.current, @project.id) && QualityAnalysis.where(:project_id => @project.id).first.nil? %>
|
<%# if is_project_manager?(User.current, @project.id) && QualityAnalysis.where(:project_id => @project.id).first.nil? %>
|
||||||
<%# if User.current.member_of?(@project) %>
|
<%# if User.current.member_of?(@project) %>
|
||||||
<% if quality_analysis(User.current.try(:login), @repository.id).nil? && is_project_manager?(User.current.id, @project.id) && @project.is_public? %>
|
<% if quality_analysis(User.current.try(:login), @repository.id).nil? && User.current.member_of?(@project) && @project.is_public? %>
|
||||||
<%= link_to "质量分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch ), :remote => true, :class => "btn_zipdown fr" %>
|
<%= link_to "质量分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch ), :remote => true, :class => "btn_zipdown fr" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%# end %>
|
<%# end %>
|
||||||
|
|
Loading…
Reference in New Issue