diff --git a/atlas/templates/atlas/collection_detail_view.html b/atlas/templates/atlas/collection_detail_view.html index 37d8f668..d5d406c3 100644 --- a/atlas/templates/atlas/collection_detail_view.html +++ b/atlas/templates/atlas/collection_detail_view.html @@ -4,6 +4,7 @@ {% if request.user.is_authenticated %}
Edit + Delete
{% endif %}

{{collection.name}} diff --git a/atlas/urls.py b/atlas/urls.py index 15ce88bb..66436597 100755 --- a/atlas/urls.py +++ b/atlas/urls.py @@ -14,6 +14,7 @@ urlpatterns = [ path("author/", views.author_list, name="author_list"), path("case/", views.CaseView.as_view(), name="case_view"), path("collection/", views.collection_index_view, name="collection_index_view"), + path("collection/delete", views.CaseCollectionDelete.as_view, name="collection_delete"), path("collection/create", views.CaseCollectionCreate.as_view(), name="collection_create"), path("collection//update", views.CaseCollectionUpdate.as_view(), name="collection_update"), path("collection/", views.collection_detail_view, name="collection_detail_view"), diff --git a/atlas/views.py b/atlas/views.py index b549424e..b6a36e6b 100755 --- a/atlas/views.py +++ b/atlas/views.py @@ -299,6 +299,10 @@ class SeriesDelete(RevisionMixin, AuthorOrCheckerRequiredMixin, DeleteView): template_name = "confirm_delete.html" success_url = reverse_lazy("atlas:series_view") +class CaseCollectionDelete(RevisionMixin, AuthorOrCheckerRequiredMixin, DeleteView): + model = CaseCollection + template_name = "confirm_delete.html" + success_url = reverse_lazy("atlas:collection_index_view") class ConditionDelete(RevisionMixin, AuthorOrCheckerRequiredMixin, DeleteView): model = Condition