aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2012-05-09 19:00:52 +0200
committerDavid Gageot <david@gageot.net>2012-05-09 19:00:52 +0200
commita61b2f3023f9f3680bf55439a804a127d328eb3f (patch)
tree0b678fc24bdd14f8ebdba34aafbfade9503135d1
parenta1e65c46f1c224b8962c1bc3371609f1b2774733 (diff)
downloadsonarqube-a61b2f3023f9f3680bf55439a804a127d328eb3f.tar.gz
sonarqube-a61b2f3023f9f3680bf55439a804a127d328eb3f.zip
SONAR-1927 Cannot unfollow all dashboards
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/admin_dashboards/_list.html.erb4
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_list.html.erb2
2 files changed, 4 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/admin_dashboards/_list.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/admin_dashboards/_list.html.erb
index cd5ab83550c..1fd1227ee48 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/admin_dashboards/_list.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/admin_dashboards/_list.html.erb
@@ -31,7 +31,9 @@
<% end %>
</td>
<td class="thin nowrap right">
- <%= link_to 'Remove from defaults', {:action => 'remove', :id => active.id}, {:confirm => 'Are you sure to remove it from default dashboards ?', :method => :post, :id => "remove-#{u active.name}", :class => 'link-action'} %>
+ <% if active_dashboards.size() > 1 %>
+ <%= link_to 'Remove from defaults', {:action => 'remove', :id => active.id}, {:confirm => 'Are you sure to remove it from default dashboards ?', :method => :post, :id => "remove-#{u active.name}", :class => 'link-action'} %>
+ <% end %>
</td>
</tr>
<% end %>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_list.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_list.html.erb
index fb872eb4d50..ce3fe14c330 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_list.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_list.html.erb
@@ -50,7 +50,7 @@
|
<%= link_to message('delete'), {:action => 'delete', :id => active.dashboard_id, :resource => params[:resource]}, :method => :post,
:confirm => message('dashboard.do_you_want_to_delete_dashboard'), :id => "delete-#{u active.name}", :class => 'link-action' %>
- <% else %>
+ <% elsif active_dashboards.size() > 1 %>
<%= link_to message('unfollow'), {:action => 'unfollow', :id => active.dashboard_id, :resource => params[:resource]}, :method => :post,
:id => "unfollow-#{u active.name}", :class => 'link-action' %>
<% end %>