]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4502 Change "No lines match your filter criteria." message on Issues tab
authorJulien Lancelot <julien.lancelot@gmail.com>
Tue, 16 Jul 2013 18:17:13 +0000 (20:17 +0200)
committerJulien Lancelot <julien.lancelot@gmail.com>
Tue, 16 Jul 2013 18:17:13 +0000 (20:17 +0200)
plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties
sonar-server/src/main/webapp/WEB-INF/app/views/issues/_list.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/issues/_search_ajax.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/resource/_index.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/shared/_no_issues.html.erb [new file with mode: 0644]
sonar-server/src/main/webapp/WEB-INF/app/views/shared/_source_display.erb

index ad50bb9ca07c174c367baa979065995c10e48571..1d065fbd5da80185904c5844488f10d4ed43cb87 100644 (file)
@@ -539,6 +539,7 @@ issue_filter.criteria.status=Status
 issue_filter.max_results_reached=Only the first {0} issues matching the search criteria have been retrieved. Add some additional criteria to get fewer results to be able to sort this list.
 issue_filter.widget.max_results_reached=Only the first {0} issues matching the search criteria have been retrieved.
 issue_filter.no_result=No matching issues found.
+issue_filter.no_result.help=Status of the related issues may have changed since the last analysis.
 issue_filter.save_filter=Save Filter
 issue_filter.edit_filter=Edit Filter
 issue_filter.copy_filter=Copy Filter
index 5140bb349b8c7e35d80805d09768a6fd79a87da2..1eec5217a22a15554cab315aba8621935fe443b5 100644 (file)
 <%
    else
 %>
-  <p style="padding: 5px;"><%= message('issue_filter.no_result') -%></p>
+  <p class="notes" style="padding: 5px;"><%= message('issue_filter.no_result') -%></p>
 <%
    end
 %>
index c8bfae9ab89b2e06906216eb48da0b2e3e1852a8..eb1c6bf3e58a713015ad59a30810b6b6fd2bc112 100644 (file)
@@ -1,4 +1,10 @@
 <div class="issues-content">
-  <%= render :partial => 'operations_ajax' -%>
-  <%= render :partial => 'list' -%>
+  <%
+     if @issues_result.issues && !@issues_result.issues.empty?
+  %>
+    <%= render :partial => 'operations_ajax' -%>
+    <%= render :partial => 'list' -%>
+  <% else %>
+    <%= render :partial => 'shared/no_issues' -%>
+  <% end %>
 </div>
index f72c402b88a0d072efe6b8af8f1f17926913aa57..eea1aa3371fc9d7665bdbcc371ba7f92028f6560 100644 (file)
@@ -22,6 +22,7 @@
                                                                    :expanded => @expanded, \
                                                                    :display_violations => @display_violations, \
                                                                    :display_issues => @display_issues, \
+                                                                   :has_global_issues => @global_issues && @global_issues.size>0, \
                                                                    :resource => @resource, \
                                                                    :snapshot => @snapshot, \
                                                                    :review_screens_by_vid => @review_screens_by_vid, \
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/shared/_no_issues.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/shared/_no_issues.html.erb
new file mode 100644 (file)
index 0000000..046be07
--- /dev/null
@@ -0,0 +1,4 @@
+<div style="margin-bottom: auto;" class="notes">
+  <div style="float: left;"><%= message('issue_filter.no_result') -%></div>
+  <div style="cursor: help;"><%= image_tag 'help.png', :title => h(message('issue_filter.no_result.help')) -%></div>
+</div>
\ No newline at end of file
index 43ab11dd10c581280d150abd931f987237093087..e48fcafaa355be961f4920eedb81d62be37b42a3 100644 (file)
 </table>
 
 <% if filtered && !has_displayed_lines %>
-  <p style="padding: 10px"><%= message('no_lines_match_your_filter_criteria') -%></p>
+  <% if display_issues && !has_global_issues %>
+    <%= render :partial => 'shared/no_issues' -%>
+  <% elsif display_coverage  %>
+    <p style="padding: 10px"><%= message('no_lines_match_your_filter_criteria') -%></p>
+  <% end %>
 <% end %>