This commit is contained in:
Ross
2022-03-29 22:38:13 +01:00
parent 7704132897
commit ef6cfe12e6
3 changed files with 6 additions and 0 deletions
@@ -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}}
+1
View File
@@ -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"),
+4
View File
@@ -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