From 45e97ea2788a252233ccf986bd4529abb5149fe0 Mon Sep 17 00:00:00 2001 From: jdcaballerov Date: Mon, 14 Dec 2020 13:27:06 -0500 Subject: [PATCH] Reverse test condition to avoid redirects with change details --- archivebox/themes/admin/base.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/archivebox/themes/admin/base.html b/archivebox/themes/admin/base.html index 5b83cc7a..00dfec45 100644 --- a/archivebox/themes/admin/base.html +++ b/archivebox/themes/admin/base.html @@ -202,12 +202,16 @@ function setPreferredSnapshotView(view){ urlPath = window.location.pathname; - if((view==="Grid") && urlPath != "{% url 'admin:grid' %}"){ + if((view==="Grid") && urlPath == "{% url 'admin:core_snapshot_changelist' %}"){ selectSnapshotGridView(); } - else if((view==="List") && urlPath != "{% url 'admin:core_snapshot_changelist' %}"){ + + {% comment %} + else if((view==="List") && urlPath == "{% url 'admin:grid' %}"){ selectSnapshotListView(); - } + + } + {% endcomment %} }; function setupSnapshotViews() {