-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor ProductTabVulnerabilitiesView to remove duplication #95
Signed-off-by: tdruez <tdruez@nexb.com>
- Loading branch information
Showing
6 changed files
with
81 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{% load humanize %} | ||
<div class="row align-items-end"> | ||
<div class="col mb-3"> | ||
<ul class="nav nav-pills"> | ||
<li class="nav-item"> | ||
<form id="tab-{{ tab_id }}-search-form" class="mt-md-0 me-sm-2"> | ||
<input style="width: 250px;" type="text" class="form-control form-control-sm" id="tab-{{ tab_id }}-search-input" name="{{ tab_id }}-q" placeholder="Search {{ tab_id }}" aria-label="Search" autocomplete="off" value="{{ search_query|escape }}"> | ||
</form> | ||
</li> | ||
<li class="nav-item"> | ||
<div class="h6 mt-2 mb-0 smaller"> | ||
{% if page_obj.paginator.count != total_count %} | ||
{{ page_obj.paginator.count|intcomma }} of | ||
<a href="#" hx-get="{{ request.path }}?all=true#{{ tab_id }}" hx-target="{{ tab_id_html }}"> | ||
{{ total_count }} results | ||
</a> | ||
{% else %} | ||
{{ page_obj.paginator.count|intcomma }} results | ||
{% endif %} | ||
</div> | ||
</li> | ||
</ul> | ||
<div class="mt-1"> | ||
{% include 'includes/filters_breadcrumbs.html' with filterset=filterset fragment=tab_id only %} | ||
</div> | ||
</div> | ||
<div class="col-auto"> | ||
{% include 'pagination/object_list_pagination.html' with hx_target=tab_id_html %} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 3 additions & 29 deletions
32
product_portfolio/templates/product_portfolio/tabs/tab_vulnerabilities.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters