diff --git a/app/views/quality_analysis/_result_list.html.erb b/app/views/quality_analysis/_result_list.html.erb index 114c054a3..4008bf6e5 100644 --- a/app/views/quality_analysis/_result_list.html.erb +++ b/app/views/quality_analysis/_result_list.html.erb @@ -2,38 +2,15 @@

分析结果

- - - - - + <% @results.each do |result| %> + + <% end %> -
\ No newline at end of file + diff --git a/app/views/quality_analysis/index.html.erb b/app/views/quality_analysis/index.html.erb index e8fd5f8e2..9b06e6483 100644 --- a/app/views/quality_analysis/index.html.erb +++ b/app/views/quality_analysis/index.html.erb @@ -1,9 +1,5 @@ <% if @name_flag %> - <%= @results.each do |result| %> -

- <%=link_to result["k"], project_quality_analysis_path(:resource_id => result["id"]) %> -

- <% end %> + <%= render :partial => "result_list" %> <% else %> <%= render "show" %> <% end %> diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index d3ffdb5b9..c639bcb6e 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -5,7 +5,7 @@ <% if is_project_manager?(User.current, @project.id) && QualityAnalysis.where(:project_id => @project.id).first.nil? %> <%= link_to "质量分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier), :remote => true, :class => "btn_zipdown fr" %> <% else %> - <%= link_to "质量分析", project_quality_analysis_path(:project_id => @project.id), :remote => true, :class => "btn_zipdown fr" %> + <%= link_to "质量分析", project_quality_analysis_path(:project_id => @project.id), :class => "btn_zipdown fr" %> <% end %>
diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index 0774fa892..0d1c4fe85 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -1267,4 +1267,15 @@ a.pages-big{ width:50px;} .contribute-list-problem {width:170px; vertical-align:middle; text-align:center;} .contribute-list-rate {width:228px; vertical-align:middle; text-align:center;} .contribute-list-height {height:80px;} -.contribute-list-line-height {line-height:80px;} \ No newline at end of file +.contribute-list-line-height {line-height:80px;} + +/*20160623分析结果*/ +.analysis-result-list {padding:5px;} +.analysis-result-list:nth-of-type(odd){background:#fff;}/*奇数行*/ +.analysis-result-list:nth-of-type(even){background:#f5f5f5;}/*偶数行*/ +.analysis-result-name {width:200px; cursor:pointer;} +.analysis-result-version {width:90px; text-align:right; cursor:pointer;} +.analysis-result-loc {width:60px; text-align:right; cursor:pointer;} +.analysis-result-debt {width:160px; text-align:right; cursor:pointer;} +.analysis-result-time {width:150px; text-align:right; cursor:pointer;} +.analysis-name-icon {background:url(../images/code-analysis-icon.png) -2px -148px no-repeat; width:16px; height:16px; display:inline-block; vertical-align:middle;} \ No newline at end of file