File tree Expand file tree Collapse file tree
templates/product_portfolio/tabs Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 {% endif %}
1010</ div >
1111
12- {% if page_obj.object_list %}
13- < table class ="table table-hover ">
12+ < table class ="table table-hover ">
1413 < thead class ="table-light ">
1514 < tr >
1615 < th style ="width: 38% "> {% trans "Package" %}</ th >
9392 {% endfor %}
9493 </ tbody >
9594 </ table >
96- {% if page_obj.paginator.num_pages > 1 %}
97- {% include 'pagination/object_list_pagination.html' with hx_target=tab_id_html %}
98- {% endif %}
99- {% else %}
100- < div class ="text-center py-5 ">
101- < i class ="fa-solid fa-circle-check text-success fs-2 "> </ i >
102- < div class ="mt-2 fw-semibold "> {% trans "No pending triage actions" %}</ div >
103- < div class ="text-body-secondary small mt-1 ">
104- {% trans "All packages are within acceptable risk parameters." %}
105- </ div >
106- </ div >
95+ {% if page_obj.paginator.num_pages > 1 %}
96+ {% include 'pagination/object_list_pagination.html' with hx_target=tab_id_html %}
10797{% endif %}
Original file line number Diff line number Diff line change @@ -676,11 +676,17 @@ def tab_triage(self):
676676 TriageRecord .objects .filter (product_package__product = product ).primary_actions ().count ()
677677 )
678678
679- badge_class = "bg-primary-subtle text-primary-emphasis"
680- if triage_count > 0 :
681- badge_class = "bg-warning-subtle text-warning-emphasis"
679+ if triage_count == 0 :
680+ label = 'Triage <span class="badge bg-secondary">0</span>'
681+ return {
682+ "label" : mark_safe (label ),
683+ "fields" : [],
684+ "disabled" : True ,
685+ "tooltip" : "No pending triage actions for this product" ,
686+ }
682687
683- label = f'Triage <span class="badge { badge_class } ">{ triage_count } </span>'
688+ badge = f'<span class="badge bg-primary-subtle text-primary-emphasis">{ triage_count } </span>'
689+ label = f"Triage { badge } "
684690
685691 tab_view_url = product .get_url ("tab_triage" )
686692 if full_query_string := self .request .META ["QUERY_STRING" ]:
You can’t perform that action at this time.
0 commit comments