diff --git a/journal/templates/mark_history.html b/journal/templates/mark_history.html index cde59817..c92540f9 100644 --- a/journal/templates/mark_history.html +++ b/journal/templates/mark_history.html @@ -24,28 +24,41 @@ - {% if mark.logs %} - {% endif %}
@@ -61,7 +74,7 @@ }) - - {% include "_footer.html" %} - - diff --git a/journal/urls.py b/journal/urls.py index 55f26547..d3464d45 100644 --- a/journal/urls.py +++ b/journal/urls.py @@ -24,9 +24,7 @@ urlpatterns = [ path("comment/", comment, name="comment"), path("mark_log//", mark_log, name="mark_log"), path("mark_history/", mark_history, name="mark_history"), - path( - "mark_history/edit/", mark_history_edit, name="mark_history_edit" - ), + path("mark_history/edit/", mark_history, name="mark_history_edit"), path( "add_to_collection/", add_to_collection, name="add_to_collection" ), diff --git a/journal/views.py b/journal/views.py index 6be88971..82038e3d 100644 --- a/journal/views.py +++ b/journal/views.py @@ -278,6 +278,10 @@ def mark_log(request, item_uuid, log_id): def mark_history(request, item_uuid): item = get_object_or_404(Item, uid=get_uuid_or_404(item_uuid)) mark = Mark(request.user, item) + editing = False + if request.path.startswith("/mark_history/edit/"): + editing = True + if request.method == "GET": return render( request, @@ -285,21 +289,7 @@ def mark_history(request, item_uuid): { "item": item, "mark": mark, - }, - ) - - -@login_required -def mark_history_edit(request, item_uuid): - item = get_object_or_404(Item, uid=get_uuid_or_404(item_uuid)) - mark = Mark(request.user, item) - if request.method == "GET": - return render( - request, - "mark_history_edit.html", - { - "item": item, - "mark": mark, + "editing": editing, }, )