File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed
templates/patchwork/partials Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -288,6 +288,18 @@ table.patch-meta tr th, table.patch-meta tr td {
288288 text-decoration : underline;
289289}
290290
291+ .patchinterest {
292+ display : inline-block;
293+ border-radius : 7px ;
294+ min-width : 0.9em ;
295+ padding : 0 2px ;
296+ text-align : center;
297+ }
298+
299+ .patchinterest .exists {
300+ background-color : # 82ca9d ;
301+ }
302+
291303.patchlistchecks {
292304 display : inline-block;
293305 border-radius : 7px ;
Original file line number Diff line number Diff line change 8080 < span title ="Success / Warning / Fail "> S/W/F</ span >
8181 </ th >
8282
83+ < th >
84+ < span title ="Declared review interest "> Review Interest</ span >
85+ </ th >
86+
8387 < th >
8488{% if not order.editable %}
8589{% if order.name == "date" %}
182186 </ td >
183187 < td id ="patch-tags:{{patch.id}} " class ="text-nowrap "> {{ patch|patch_tags }}</ td >
184188 < td id ="patch-checks:{{patch.id}} " class ="text-nowrap "> {{ patch|patch_checks }}</ td >
189+ < td id ="patch-interest:{{patch.id}} " class ="text-nowrap "> {{ patch|patch_interest }}</ td >
185190 < td id ="patch-date:{{patch.id}} " class ="text-nowrap "> {{ patch.date|date:"Y-m-d" }}</ td >
186191 < td id ="patch-submitter:{{patch.id}} "> {{ patch.submitter|personify:project }}</ td >
187192 < td id ="patch-delegate:{{patch.id}} "> {{ patch.delegate.username }}</ td >
Original file line number Diff line number Diff line change @@ -75,3 +75,18 @@ def patch_commit_display(patch):
7575 return mark_safe (
7676 '<a href="%s">%s</a>' % (escape (fmt .format (commit )), escape (commit ))
7777 )
78+
79+
80+ @register .filter (name = 'patch_interest' )
81+ def patch_interest (patch ):
82+ reviews = patch .planning_to_review .count ()
83+ review_title = (
84+ f'has { reviews } interested reviewers'
85+ if reviews > 0
86+ else 'no interested reviewers'
87+ )
88+ review_class = 'exists' if reviews > 0 else ''
89+ return mark_safe (
90+ '<span class="patchinterest %s" title="%s">%s</span>'
91+ % (review_class , review_title , reviews if reviews > 0 else '-' )
92+ )
You can’t perform that action at this time.
0 commit comments