From 62032649f05610f7570b68f6ac6c30baa59fab8b Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Fri, 1 Nov 2024 13:48:28 +0000 Subject: [PATCH] views: Don't show chevron if user can't change sort order We prevent users changing the column that sorting is done on when allowing users to change the order of patches in a bundle. However, we still show a chevron and clicking the link will appear to do something. This is confusing/misleading. Remove the chevron and the link in this situation. Signed-off-by: Stephen Finucane --- .../patchwork/partials/patch-list.html | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/patchwork/templates/patchwork/partials/patch-list.html b/patchwork/templates/patchwork/partials/patch-list.html index a882cd9d..efefce91 100644 --- a/patchwork/templates/patchwork/partials/patch-list.html +++ b/patchwork/templates/patchwork/partials/patch-list.html @@ -69,6 +69,7 @@ $(document).ready(function() { {% endif %} +{% if not order.editable %} {% if order.name == "name" %} @@ -77,11 +78,10 @@ $(document).ready(function() { Patch {% else %} -{% if not order.editable %} Patch +{% endif %} {% else %} Patch -{% endif %} {% endif %} @@ -98,6 +98,7 @@ $(document).ready(function() { +{% if not order.editable %} {% if order.name == "date" %} @@ -106,15 +107,15 @@ $(document).ready(function() { Date {% else %} -{% if not order.editable %} Date +{% endif %} {% else %} Date -{% endif %} {% endif %} +{% if not order.editable %} {% if order.name == "submitter" %} @@ -123,17 +124,17 @@ $(document).ready(function() { Submitter {% else %} -{% if not order.editable %} Submitter +{% endif %} {% else %} Submitter -{% endif %} {% endif %} +{% if not order.editable %} {% if order.name == "delegate" %} @@ -142,15 +143,15 @@ $(document).ready(function() { Delegate {% else %} -{% if not order.editable %} Delegate +{% endif %} {% else %} Delegate -{% endif %} {% endif %} +{% if not order.editable %} {% if order.name == "state" %} @@ -159,11 +160,10 @@ $(document).ready(function() { State {% else %} -{% if not order.editable %} State +{% endif %} {% else %} State -{% endif %} {% endif %} -- 2.47.3