aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2014-01-30 17:15:40 +0100
committerJulien Lancelot <julien.lancelot@sonarsource.com>2014-01-30 17:15:49 +0100
commitbd60c5a1bc2f389991e796245795bd11fc4e5104 (patch)
tree45b316bcf7248993ef9e1e725aa0cc0e55692ad5 /sonar-server
parent6bf95f66f31b5b183c21656d33725a05011124f3 (diff)
downloadsonarqube-bd60c5a1bc2f389991e796245795bd11fc4e5104.tar.gz
sonarqube-bd60c5a1bc2f389991e796245795bd11fc4e5104.zip
SONAR-4920 A dashboard should never have an un-configured widget
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget.html.erb21
1 files changed, 10 insertions, 11 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget.html.erb
index 38b348df389..b706fd19076 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget.html.erb
@@ -4,8 +4,17 @@
default_layout=(widget.java_definition.getWidgetLayout().name()=='DEFAULT')
%>
-<% if !widget_body %>
+<% if !widget.configured %>
+<div class="block">
+ <div class="widget">
+ <span class="empty_widget">
+ <a class="note" href="<%= url_for(dashboard_action(:configure)) -%>"><%= message('dashboard.please_configure_the_widget_x', :params => widget.java_definition.getTitle()) -%></a>
+ </span>
+ <div class="clear"></div>
+ </div>
+</div>
+<% elsif !widget_body %>
<div class="block">
<% if default_layout %>
<div class="widget">
@@ -34,16 +43,6 @@
<div style="clear: both;"></div>
</div>
</div>
-<% elsif !widget.configured %>
- <div class="block" id="block_<%= widget.id -%>">
- <div class="<%= h widget.key -%>" style="height:100%;">
- <div class="widget">
- <a href="<%= url_for(dashboard_action(:configure)) -%>"><%= message('dashboard.please_configure_the_widget_x', :params => widget.java_definition.getTitle()) -%></a>
- </div>
-
- <div style="clear: both;"></div>
- </div>
- </div>
<% end %>
<% restore_global_resource %>