<td>
<%= plugin.getDescription() %>
<div id="detail-<%= plugin.getKey() -%>" style="display:none">
+ <table class="spaced width100">
<% if plugin.getLicense() %>
- <p>
- License: <%= h(plugin.getLicense()) %>
- </p>
+ <tr>
+ <td class="thin nowrap">License: </td><td><%= h(plugin.getLicense()) %></td>
+ </tr>
<% end %>
<% if plugin.getOrganization() %>
- <p>
- By: <%= link_to_if plugin.getOrganizationUrl(), plugin.getOrganization(), plugin.getOrganizationUrl(), :class=>'external' %>
- </p>
+ <tr>
+ <td class="thin nowrap">Author: </td><td><%= link_to_if plugin.getOrganizationUrl(), plugin.getOrganization(), plugin.getOrganizationUrl(), :class=>'external' %></td>
+ </tr>
<% end %>
<% if plugin.getHomepageUrl() || plugin.getIssueTrackerUrl() %>
- <p>
- <% if plugin.getHomepageUrl() %>
- <%= link_to 'Plugin details', plugin.getHomepageUrl(), :class=>'external' %> |
- <% end %>
- <% if plugin.getIssueTrackerUrl() %>
- <%= link_to "Issue Tracker", plugin.getIssueTrackerUrl(), :class=>'external' %>
- <% end %>
- </p>
+ <tr>
+ <td class="thin nowrap">Links: </td>
+ <td>
+ <%= link_to 'Homepage', plugin.getHomepageUrl(), :class=>'external' if plugin.getHomepageUrl() -%>
+ <%= link_to "Issue Tracker", plugin.getIssueTrackerUrl(), :class=>'external' if plugin.getIssueTrackerUrl() -%>
+ </td>
+ </tr>
+ <% end %>
<%
- end
if update.isCompatible()
%>
- <p>
- Version: <%= update.getRelease().getVersion() -%>
- </p>
- <div>
+ <tr>
+ <% date=release_date(update.getRelease().getDate()) %>
+ <td class="thin nowrap">Version: </td>
+ <td><%= update.getRelease().getVersion() -%> <%= "(#{date})" if date -%></td>
+ </tr>
+ <tr>
+ <td colspan="2">
<% if plugin.getTermsConditionsUrl() %>
<input type="checkbox" id="tc-<%= plugin.getKey() -%>"></input> I accept the <%= link_to 'Terms and Conditions', plugin.getTermsConditionsUrl(), :class => 'external' %>
<% end %>
<form method="post" action="<%= ApplicationController.root_context -%>/updatecenter/install?from=available&key=<%= plugin.getKey() -%>&version=<%= update.getRelease().getVersion() -%>" style="display: inline-block" id="install-<%= plugin.getKey() -%>">
<input type="submit" value="Install" onClick="return installPlugin('<%= plugin.getKey() -%>')" id="submit-<%= plugin.getKey() -%>"></input>
</form>
- </div>
+ </td>
+ </tr>
<% elsif update.requiresSonarUpgrade
%>
- <p>
- Version: <%= update.getRelease().getVersion() -%> (not compatible, needs Sonar upgrade)
- </p>
+ <tr>
+ <td class="thin nowrap">Last version: </td>
+ <td><%= update.getRelease().getVersion() -%> (<%= image_tag 'warning.png' -%> Not compatible, requires Sonar upgrade)</td>
+ </tr>
<%
end
%>
+ </table>
</div>
</td>
</tr>
- <ul class="tabs">
+ <script>
+function upgradePlugin(key) {
+ var button=$('upgrade-submit-' + key);
+ button.disable();
+ button.writeAttribute('value', 'Upgrading');
+ return true;
+}
+</script>
+
+<ul class="tabs">
<li>
<a href="<%= url_for :action => 'index' -%>">Installed</a>
</li>
<tbody>
<% if @updates_by_plugin.empty? %>
<tr class="even">
- <td colspan="2">No updates</td>
+ <td colspan="2">All of your plugins are up to date.</td>
</tr>
<% end %>
<% @updates_by_plugin.keys.each do |plugin|
<td><%= link_to 'Release Notes', release.getChangelogUrl(), :class => 'external' if release.getChangelogUrl() %></td>
<td>
<% if update.isIncompatible() %>
- <%= image_tag 'warning.png' -%> Not compatible
+ <%= image_tag 'warning.png' -%> Incompatible
<% elsif update.requiresSonarUpgrade %>
- <%= image_tag 'warning.png' -%> Not compatible, requires to upgrade system
+ <%= image_tag 'warning.png' -%> Incompatible, requires to upgrade system
<% end %>
</td>
</tr>
<%
end
%>
+ <% if @last_compatible[plugin.getKey()] %>
<tr class="<%= css -%>">
- <td> </td>
- <td colspan="5">
- <form method="post" action="<%= ApplicationController.root_context -%>/updatecenter/install?from=updates&key=<%= plugin.getKey() -%>&version=<%= @last_compatible[plugin.getKey()] -%>" style="display: inline-block">
- <input type="submit" value="Upgrade to <%= @last_compatible[plugin.getKey()] -%>"></input>
- </form>
- </td>
- </tr>
+ <td> </td>
+ <td colspan="5">
+ <form method="post" id="upgrade-form-<%= plugin.getKey() -%>" action="<%= ApplicationController.root_context -%>/updatecenter/install?from=updates&key=<%= plugin.getKey() -%>&version=<%= @last_compatible[plugin.getKey()] -%>" style="display: inline-block">
+ <input type="submit" id="upgrade-submit-<%= plugin.getKey() -%>" value="Upgrade to <%= @last_compatible[plugin.getKey()] -%>" onClick="return upgradePlugin('<%= plugin.getKey() -%>')"></input>
+ </form>
+ </td>
+ </tr>
+ <% end %>
<%
end
%>
<td> </td>
<td colspan="3">
<% if update.isIncompatible() %>
- <%= image_tag 'warning.png' -%> Not compatible plugins must be uninstalled before upgrading system:
+ <%= image_tag 'warning.png' -%> Incompatible plugins must be uninstalled before upgrading system:
<%= update.getIncompatiblePlugins().map{|plugin| plugin.getName()}.sort.join(',') -%>
<% end %>
<% if update.requiresPluginUpgrades() %>