.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
{% if request.user.is_authenticated %}
|
||||
<div class="floating-header">
|
||||
<a href="{% url 'atlas:collection_update' pk=collection.pk %}" title="Edit the Collection">Edit</a>
|
||||
<a href="{% url 'atlas:collection_delete' pk=collection.pk %}" title="Delete the Collection">Delete</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<h2>{{collection.name}}
|
||||
|
||||
@@ -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/<int:pk>/update", views.CaseCollectionUpdate.as_view(), name="collection_update"),
|
||||
path("collection/<int:pk>", views.collection_detail_view, name="collection_detail_view"),
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user