<script type="text/javascript">
  function showPlugin(key) {
    if ($j('#detail-' + key).is(':visible')) {
      $j('#detail-' + key).hide();
    } else {
      $j('#detail-' + key).show();
    }
    return false;
  }
</script>

<% if @uninstalls.size > 0 %>
<form action="<%= ApplicationController.root_context -%>/updatecenter/cancel_uninstalls" method="post" class="warning">
<p>SonarQube needs to be restarted in order to uninstall the following plugins: <ul>
  <% @uninstalls.each do |uninstall| %>
    <li><%= uninstall -%></li>
  <% end %>
  </ul>
  <input type="submit" value="Cancel uninstalls" id="cancel-uninstall"/>
</p>
</form>
<% end %>

<% if @downloads.size > 0 %>
<form action="<%= ApplicationController.root_context -%>/updatecenter/cancel_downloads" method="post" class="warning">
<p>SonarQube needs to be restarted in order to install the following plugins: <ul>
  <% @downloads.each do |download| %>
    <li><%= download -%></li>
  <% end %>
  </ul>
  <input type="submit" value="Cancel pending installations" id="cancel-pending-installations"/>
</p>
</form>
<% end %>
