From a6e130d9f53cb759db4290441b87c876d92b9b94 Mon Sep 17 00:00:00 2001
From: Godin
Date: Wed, 27 Oct 2010 17:33:21 +0000
Subject: [PATCH] SONAR-1886: Uninstall a plugin
---
.../controllers/updatecenter_controller.rb | 5 ++++
.../app/views/updatecenter/_common.html.erb | 10 --------
...ownloads.html.erb => _operations.html.erb} | 24 ++++++++++++++++---
.../views/updatecenter/_uninstalls.html.erb | 10 --------
.../app/views/updatecenter/available.html.erb | 2 +-
.../app/views/updatecenter/index.html.erb | 3 +--
.../app/views/updatecenter/updates.html.erb | 3 ++-
7 files changed, 30 insertions(+), 27 deletions(-)
delete mode 100644 sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_common.html.erb
rename sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/{_downloads.html.erb => _operations.html.erb} (51%)
delete mode 100644 sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_uninstalls.html.erb
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/updatecenter_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/updatecenter_controller.rb
index a1be366c155..b330dcebdde 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/updatecenter_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/updatecenter_controller.rb
@@ -26,11 +26,14 @@ class UpdatecenterController < ApplicationController
def index
@uninstalls=java_facade.getPluginUninstalls()
+ @downloads=java_facade.getPluginDownloads()
+
@user_plugins=Plugin.user_plugins
@core_plugins=Plugin.core_plugins
end
def updates
+ @uninstalls=java_facade.getPluginUninstalls()
@downloads=java_facade.getPluginDownloads()
@center=nil
@@ -46,7 +49,9 @@ class UpdatecenterController < ApplicationController
end
def available
+ @uninstalls=java_facade.getPluginUninstalls()
@downloads=java_facade.getPluginDownloads()
+
@center=nil
@updates_by_category={}
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_common.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_common.html.erb
deleted file mode 100644
index c6784e025dc..00000000000
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_common.html.erb
+++ /dev/null
@@ -1,10 +0,0 @@
-
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_downloads.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_operations.html.erb
similarity index 51%
rename from sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_downloads.html.erb
rename to sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_operations.html.erb
index ee23bea2b3c..58772dbcec9 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_downloads.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_operations.html.erb
@@ -1,6 +1,13 @@
-<%= render :partial => 'updatecenter/common' %>
-
-
+<% if @uninstalls.size > 0 %>
+
+
+<% end %>
+
<% if @downloads.size > 0 %>
-<% end %>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/available.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/available.html.erb
index c508cf887ae..126e83db43d 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/available.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/available.html.erb
@@ -11,7 +11,7 @@
-<%= render :partial => 'updatecenter/downloads' -%>
+<%= render :partial => 'updatecenter/operations' -%>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/index.html.erb
index 555b604b415..3ce11dbb104 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/index.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/index.html.erb
@@ -12,8 +12,7 @@
-<%= render :partial => 'updatecenter/uninstalls' -%>
-<%= render :partial => 'updatecenter/common' -%>
+<%= render :partial => 'updatecenter/operations' -%>
User-installed plugins
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/updates.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/updates.html.erb
index fa8d744adbe..9cdc7ea0796 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/updates.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/updates.html.erb
@@ -10,7 +10,8 @@
-<%= render :partial => 'updatecenter/downloads' -%>
+
+<%= render :partial => 'updatecenter/operations' -%>
<% if @center %>