Newer
Older
gitbucket_jkp / src / main / twirl / admin / plugins.scala.html
@Naoki Takezoe Naoki Takezoe on 14 Jun 2014 1020 bytes (refs #32)Add deleting installed plugins
@(plugins: List[plugin.Plugin])(implicit context: app.Context)
@import context._
@import view.helpers._
@html.main("Plugins"){
  @menu("plugins"){
    <form action="@path/admin/plugins/_delete" method="POST" validate="true">
      <table class="table table-bordered">
        <tr>
          <th>ID</th>
          <th>Provider</th>
          <th>Description</th>
        </tr>
        @plugins.zipWithIndex.map { case (plugin, i) =>
          <tr>
            <td>
              <input type="checkbox" name="pluginId[@i]" value="@plugin.id"/>
              @plugin.id
            </td>
            <td><a href="@plugin.url">@plugin.author</a></td>
            <td>@plugin.description</td>
          </tr>
        }
      </table>
      <input type="submit" id="delete-plugins" class="btn btn-danger" value="Uninstall selected plugins"/>
    </form>
  }
}
<script>
$(function(){
  $('#delete-plugins').click(function(){
    return confirm('Selected plugin will be removed permanently. Are you sure?');
  });
});
</script>