Add ability to delete collections
This commit is contained in:
17
app/templates/collections/delete.html
Normal file
17
app/templates/collections/delete.html
Normal file
@@ -0,0 +1,17 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
{{ _('Delete collection "%(title)s" by %(author)s', title=collection.title, author=collection.author.username) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form method="POST" action="" class="card box_grey">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||
<h3 class="card-header">{{ self.title() }}</h3>
|
||||
<div class="card-body">
|
||||
<p>{{ _("Deleting is permanent") }}</p>
|
||||
<a class="btn btn-secondary mr-3" href="{{ collection.get_url('collections.create_edit') }}">{{ _("Cancel") }}</a>
|
||||
<input type="submit" value="{{ _('Delete') }}" class="btn btn-danger" />
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -28,6 +28,9 @@
|
||||
</form>
|
||||
{% endif %}
|
||||
{% if collection.check_perm(current_user, "EDIT_COLLECTION") %}
|
||||
<a class="btn btn-danger ml-2" href="{{ collection.get_url('collections.delete') }}">
|
||||
{{ _("Delete") }}
|
||||
</a>
|
||||
<a class="btn btn-primary ml-2" href="{{ collection.get_url('collections.create_edit') }}">
|
||||
{{ _("Edit") }}
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user