From e13da7b7f05d1fc12d6315d99f945c91d4ae6353 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 20 Jul 2015 11:30:59 +0200 Subject: [PATCH] Highlight patches with Acked/Reviewed/Tested tags A little while ago, accounting of the number of Acked-by, Reviewed-by and Tested-by tags was added to patchwork. The count of such tags per patch is shown in the "A / R / T" column. However, since the values are shown for all patches regardless of whether they are zero or not, it makes it not very easy to spot the patches that have at least one Acked-by, Tested-by or Reviewed-by tag. Therefore, this patch proposes to replace a count of "0" by a "-". So patches with no tags will have "- - -" in their A/R/T column, and patches with some tags may get "1 - 1" for example. Signed-off-by: Thomas Petazzoni Reviewed-by: Stephen Finucane --- patchwork/templatetags/patch.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/patchwork/templatetags/patch.py b/patchwork/templatetags/patch.py index 496dcfcc..3b281586 100644 --- a/patchwork/templatetags/patch.py +++ b/patchwork/templatetags/patch.py @@ -30,7 +30,10 @@ def patch_tags(patch): for tag in patch.project.tags: count = getattr(patch, tag.attr_name) titles.append('%d %s' % (count, tag.name)) - counts.append(str(count)) + if count == 0: + counts.append("-") + else: + counts.append(str(count)) return mark_safe('%s' % ( ' / '.join(titles), ' '.join(counts))) -- 2.47.3