Merge branch 'rep_quality' into develop
This commit is contained in:
commit
36e1217f49
|
@ -2172,7 +2172,7 @@ module ApplicationHelper
|
||||||
candown = User.current.member_of_org?(org) || (attachment.is_public == 1) || attachment.get_status_by_attach(User.current.id) == 2
|
candown = User.current.member_of_org?(org) || (attachment.is_public == 1) || attachment.get_status_by_attach(User.current.id) == 2
|
||||||
elsif attachment.container.is_a?(OrgDocumentComment)
|
elsif attachment.container.is_a?(OrgDocumentComment)
|
||||||
org = attachment.container.organization
|
org = attachment.container.organization
|
||||||
candown = User.current.member_of_org?(org) || (org.is_public && attachment.is_public == 1)
|
candown = org.allow_guest_download || User.current.member_of_org?(org) || (org.is_public && attachment.is_public == 1)
|
||||||
elsif (attachment.container.has_attribute?(:board) || attachment.container.has_attribute?(:board_id)) && attachment.container.board &&
|
elsif (attachment.container.has_attribute?(:board) || attachment.container.has_attribute?(:board_id)) && attachment.container.board &&
|
||||||
attachment.container.board.course
|
attachment.container.board.course
|
||||||
course = attachment.container.board.course
|
course = attachment.container.board.course
|
||||||
|
|
|
@ -3,7 +3,7 @@ module QualityAnalysisHelper
|
||||||
|
|
||||||
def sonar_time sonar_name
|
def sonar_time sonar_name
|
||||||
sonar = open(@sonar_address + "/api/resources/index?resource=#{sonar_name}&depth=0").read
|
sonar = open(@sonar_address + "/api/resources/index?resource=#{sonar_name}&depth=0").read
|
||||||
sonar =JSON.parse(sonar).first
|
sonar =JSON.parse(sonar).first['date']
|
||||||
end
|
end
|
||||||
|
|
||||||
def sqale_rating_status val
|
def sqale_rating_status val
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<li class="analysis-result-version fl fontBlue2 hidden" title="<%= qa.branch %>"><%= qa.branch %></li>
|
<li class="analysis-result-version fl fontBlue2 hidden" title="<%= qa.branch %>"><%= qa.branch %></li>
|
||||||
<li class="analysis-result-loc fl fontBlue2 hidden" title="<%= qa.language %>"><%= qa.language %></li>
|
<li class="analysis-result-loc fl fontBlue2 hidden" title="<%= qa.language %>"><%= qa.language %></li>
|
||||||
<li class="analysis-result-debt fl fontBlue2 hidden" title="<%= qa.path %>"><%= qa.path %></li>
|
<li class="analysis-result-debt fl fontBlue2 hidden" title="<%= qa.path %>"><%= qa.path %></li>
|
||||||
<li class="analysis-result-time fl fontBlue2 hidden" title="<%= qa.updated_at %>"><%= format_time(sonar_time(qa)) %></li>
|
<li class="analysis-result-time fl fontBlue2 hidden" title="<%= sonar_time(qa.sonar_name).blank? ? qa.created_at : sonar_time(qa.sonar_name) %>"><%= format_time(sonar_time(qa.sonar_name).blank? ? qa.created_at : sonar_time(qa.sonar_name)) %></li>
|
||||||
<% if User.current.try(:login) == qa.author_login || User.current.admin? || is_project_manager?(User.current.id, @project.id) %>
|
<% if User.current.try(:login) == qa.author_login || User.current.admin? || is_project_manager?(User.current.id, @project.id) %>
|
||||||
<li class="analysis-result-edit fl fontBlue2 hidden" title="<%= qa.path %>">
|
<li class="analysis-result-edit fl fontBlue2 hidden" title="<%= qa.path %>">
|
||||||
<%=link_to "编辑", edit_project_quality_analysi_path(qa, :project_id => @project.id), :remote => true, :class => "fontBlue2" %><span style="color: #888"> / </span>
|
<%=link_to "编辑", edit_project_quality_analysi_path(qa, :project_id => @project.id), :remote => true, :class => "fontBlue2" %><span style="color: #888"> / </span>
|
||||||
|
|
Loading…
Reference in New Issue