File tree Expand file tree Collapse file tree
templates/component_catalog
product_portfolio/templates/product_portfolio/tabs Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ < div title ="{{ package.download_url }} "{% if not package.filename %} class ="text-truncate "{% endif %} >
2+ {% if package.download_url %}
3+ < a href ="{{ package.download_url }} ">
4+ {% if display_icons %}
5+ < i class ="fa-solid fa-download me-1 "> </ i >
6+ {% endif %}
7+ {% if package.filename %}
8+ {{ package.filename }}
9+ {% else %}
10+ {{ package.download_url|truncatechars:40 }}
11+ {% endif %}
12+ </ a >
13+ {% elif package.filename %}
14+ {% if display_icons %}
15+ < i class ="fa-solid fa-file me-1 "> </ i >
16+ {% endif %}
17+ {{ package.filename }}
18+ {% endif %}
19+ </ div >
Original file line number Diff line number Diff line change 5757 < td >
5858 {{ object.primary_language }}
5959 </ td >
60- < td title ="{{ object.download_url }} "{% if not object.filename %} class ="text-truncate "{% endif %} >
61- {% if object.download_url %}
62- < a href ="{{ object.download_url }} ">
63- {% if object.filename %}{{ object.filename }}{% else %}{{ object.download_url }}{% endif %}
64- </ a >
65- {% endif %}
60+ < td >
61+ {% include 'component_catalog/includes/package_filename_as_link.html' with package=object %}
6662 </ td >
6763 < td >
6864 {% with components=object.component_set.all %}
Original file line number Diff line number Diff line change @@ -1194,20 +1194,20 @@ def test_package_list_view_download_column(self):
11941194 response = self .client .get (reverse ("component_catalog:package_list" ))
11951195
11961196 expected = f"""
1197- <td title="{ self .package1 .download_url } ">
1197+ <div title="{ self .package1 .download_url } ">
11981198 <a href="{ self .package1 .download_url } ">
11991199 { self .package1 .filename }
12001200 </a>
1201- </td >
1201+ </div >
12021202 """
12031203 self .assertContains (response , expected , html = True )
12041204
12051205 expected = f"""
1206- <td title="{ self .package2 .download_url } " class="text-truncate">
1206+ <div title="{ self .package2 .download_url } " class="text-truncate">
12071207 <a href="{ self .package2 .download_url } ">
12081208 { self .package2 .download_url }
12091209 </a>
1210- </td >
1210+ </div >
12111211 """
12121212 self .assertContains (response , expected , html = True )
12131213
Original file line number Diff line number Diff line change 115115 < i class ="fas fa-user me-2 "> </ i > {{ relation.component.owner.get_absolute_link }}{{ relation.owner }}
116116 </ div >
117117 {% endif %}
118+ {% if relation.package %}
119+ {% include 'component_catalog/includes/package_filename_as_link.html' with package=relation.package display_icons=True %}
120+ {% endif %}
118121 </ td >
119122 < td >
120123 {% if relation.purpose %}
You can’t perform that action at this time.
0 commit comments