aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/main/webapp
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@gmail.com>2013-07-16 20:17:13 +0200
committerJulien Lancelot <julien.lancelot@gmail.com>2013-07-16 20:17:13 +0200
commitc4bf89f4064b51442efe4c0264835b4cef264af7 (patch)
tree778b28ffa0ad5555dc1b2e49b8ef6cbb401a032a /sonar-server/src/main/webapp
parent116ae0ab65d88b776c091a6ccee13578b4e3314c (diff)
downloadsonarqube-c4bf89f4064b51442efe4c0264835b4cef264af7.tar.gz
sonarqube-c4bf89f4064b51442efe4c0264835b4cef264af7.zip
SONAR-4502 Change "No lines match your filter criteria." message on Issues tab
Diffstat (limited to 'sonar-server/src/main/webapp')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/issues/_list.html.erb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/issues/_search_ajax.html.erb10
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/resource/_index.html.erb1
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/shared/_no_issues.html.erb4
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/shared/_source_display.erb6
5 files changed, 19 insertions, 4 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/issues/_list.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/issues/_list.html.erb
index 5140bb349b8..1eec5217a22 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/issues/_list.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/issues/_list.html.erb
@@ -103,7 +103,7 @@
<%
else
%>
- <p style="padding: 5px;"><%= message('issue_filter.no_result') -%></p>
+ <p class="notes" style="padding: 5px;"><%= message('issue_filter.no_result') -%></p>
<%
end
%>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/issues/_search_ajax.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/issues/_search_ajax.html.erb
index c8bfae9ab89..eb1c6bf3e58 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/issues/_search_ajax.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/issues/_search_ajax.html.erb
@@ -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>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_index.html.erb
index f72c402b88a..eea1aa3371f 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_index.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_index.html.erb
@@ -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
index 00000000000..046be07f3c4
--- /dev/null
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/shared/_no_issues.html.erb
@@ -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
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/shared/_source_display.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/shared/_source_display.erb
index 43ab11dd10c..e48fcafaa35 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/shared/_source_display.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/shared/_source_display.erb
@@ -119,7 +119,11 @@
</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 %>