Skip to content

Commit

Permalink
Move the declared_dependency help text to the view #138
Browse files Browse the repository at this point in the history
Signed-off-by: tdruez <[email protected]>
  • Loading branch information
tdruez committed Jul 26, 2024
1 parent 32ebfc5 commit e6c4248
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,18 @@
</div>

<table class="table table-bordered table-hover table-md text-break">
{% include 'includes/object_list_table_header.html' %}
<thead>
<tr>
<th style="min-width: 125px">
<th style="min-width: 250px">
<span class="help_text" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ help_texts.for_package }}">
{% trans 'For package' %}
</span>
<div class="float-end">
{{ filter_dependency.form.for_package }}
</div>
</th>
<th style="min-width: 105px">
<th style="min-width: 250px">
<span class="help_text" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ help_texts.resolved_to_package }}">
{% trans 'Resolved to package' %}
</span>
Expand All @@ -53,7 +54,7 @@
</div>
</th>
<th>
<span class="help_text" data-bs-toggle="tooltip" data-bs-placement="top" title="A dependency as stated in a project manifest or lockfile, which may be required or optional, and may be associated with specific version ranges.">
<span class="help_text" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ help_texts.declared_dependency }}">
{% trans 'Declared dependency' %}
</span>
</th>
Expand Down Expand Up @@ -130,7 +131,7 @@
{% if dependency.package_url %}
{{ dependency.package_url }}
<a href="{% url 'global_search' %}?q={{ dependency.package_url }}" target="_blank">
<i class="fa-solid fa-magnifying-glass"></i>
<i class="fa-solid fa-magnifying-glass smaller"></i>
</a>
{% endif %}
</td>
Expand Down
4 changes: 4 additions & 0 deletions product_portfolio/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,10 @@ def get_context_data(self, **kwargs):
for field in ProductDependency._meta.get_fields()
if hasattr(field, "help_text")
}
help_texts["declared_dependency"] = (
"A dependency as stated in a project manifest or lockfile, which may be "
"required or optional, and may be associated with specific version ranges."
)

context_data.update(
{
Expand Down

0 comments on commit e6c4248

Please sign in to comment.