]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
Highlight patches with Acked/Reviewed/Tested tags
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 20 Jul 2015 09:30:59 +0000 (11:30 +0200)
committerStephen Finucane <stephen.finucane@intel.com>
Fri, 16 Oct 2015 22:20:43 +0000 (23:20 +0100)
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 <thomas.petazzoni@free-electrons.com>
Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
patchwork/templatetags/patch.py

index 496dcfcc46e2b775d3646525cf30158a8cc8ceb5..3b2815860fb81be81620466cd5c068285416b60a 100644 (file)
@@ -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('<span title="%s">%s</span>' % (
         ' / '.join(titles),
         ' '.join(counts)))