{% block title %}{{ _("Delete %s") % file.filename }}{% end block %}
-{% block content %}
- <div class="row justify-content-center my-5">
- <div class="col col-md-6">
- <div class="card card-body">
- <h5 class=" mb-4">{{ _("Delete %s") % file.filename }}</h5>
+{% block container %}
+ <section class="section">
+ <div class="container">
+ <div class="columns is-centered">
+ <div class="column is-half">
+ <h1 class="title">
+ {{ _("Delete File") }}
+ </h1>
+ <h4 class="subtitle">{{ file.filename }}</h4>
- <p>
- {{ _("Do you really want to delete %(filename)s in %(path)s?") % { "filename" : file.filename, "path" : file.path } }}
- </p>
+ <div class="block has-text-danger">
+ <form action="" method="POST">
+ {% raw xsrf_form_html() %}
- <form action="" method="POST">
- {% raw xsrf_form_html() %}
+ <div class="field">
+ <p>
+ {{ _("Do you really want to delete %(filename)s in %(path)s?") % { "filename" : file.filename, "path" : file.path } }}
+ </p>
+ </div>
- <div class="d-grid">
- <button type="submit" class="btn btn-primary">
- {{ _("Delete") }}
- </button>
+ <div class="field">
+ <div class="control">
+ <button class="button is-danger is-fullwidth">
+ {{ _("Delete File") }}
+ </button>
+ </div>
+ </div>
+ </form>
</div>
- </form>
+ </div>
</div>
</div>
- </div>
+ </section>
{% end block %}
with self.db.transaction():
file.delete(self.current_user)
- self.redirect("%s/_files" % file.path)
+ self.redirect("/docs%s/_files" % file.path)
class SearchHandler(base.BaseHandler):