Open External Links in new window (#5674)

* Update clip_link.html

* Update item_base.html

* Add new_window to all external links
This commit is contained in:
Kenneth Lorthioir 2023-10-07 00:41:33 -04:00 committed by GitHub
parent a779aa3a99
commit e76fa11e63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 9 additions and 9 deletions

View File

@ -106,7 +106,7 @@
<tr>
<td><span class='fas fa-link'></span></td>
<td>{% trans "External Link" %}</td>
<td>{% include 'clip_link.html' with link=build.link %}</td>
<td>{% include 'clip_link.html' with link=build.link new_window=True %}</td>
</tr>
{% endif %}
{% if build.issued_by %}

View File

@ -105,7 +105,7 @@ src="{% static 'img/blank_image.png' %}"
<tr>
<td><span class='fas fa-link'></span></td>
<td>{% trans "External Link" %}</td>
<td>{% include 'clip_link.html' with link=part.link %}</td>
<td>{% include 'clip_link.html' with link=part.link new_window=True %}</td>
</tr>
{% endif %}
</table>

View File

@ -193,7 +193,7 @@ src="{% static 'img/blank_image.png' %}"
<tr>
<td><span class='fas fa-link'></span></td>
<td>{% trans "External Link" %}</td>
<td>{% include 'clip_link.html' with link=part.link %}</td>
<td>{% include 'clip_link.html' with link=part.link new_window=True %}</td>
</tr>
{% endif %}
</table>

View File

@ -165,7 +165,7 @@ src="{% static 'img/blank_image.png' %}"
<tr>
<td><span class='fas fa-link'></span></td>
<td>{% trans "External Link" %}</td>
<td>{% include 'clip_link.html' with link=order.link %}</td>
<td>{% include 'clip_link.html' with link=order.link new_window=True %}</td>
</tr>
{% endif %}
<tr>

View File

@ -144,7 +144,7 @@ src="{% static 'img/blank_image.png' %}"
<tr>
<td><span class='fas fa-link'></span></td>
<td>{% trans "External Link" %}</td>
<td>{% include 'clip_link.html' with link=order.link %}</td>
<td>{% include 'clip_link.html' with link=order.link new_window=True %}</td>
</tr>
{% endif %}
<tr>

View File

@ -179,7 +179,7 @@ src="{% static 'img/blank_image.png' %}"
<tr>
<td><span class='fas fa-link'></span></td>
<td>{% trans "External Link" %}</td>
<td>{% include 'clip_link.html' with link=order.link %}</td>
<td>{% include 'clip_link.html' with link=order.link new_window=True new_window=True %}</td>
</tr>
{% endif %}
<tr>

View File

@ -383,7 +383,7 @@
<tr>
<td><span class='fas fa-link'></span></td>
<td>{% trans "External Link" %}</td>
<td>{% include 'clip_link.html' with link=part.link %}</td>
<td>{% include 'clip_link.html' with link=part.link new_window=True %}</td>
</tr>
{% endif %}
{% if part.responsible %}

View File

@ -199,7 +199,7 @@
<tr>
<td><span class='fas fa-link'></span>
<td>{% trans "External Link" %}</td>
<td>{% include 'clip_link.html' with link=item.link %}</td>
<td>{% include 'clip_link.html' with link=item.link new_window=True %}</td>
</tr>
{% endif %}
{% if item.supplier_part.manufacturer_part %}

View File

@ -1,5 +1,5 @@
{% load i18n %}
{% if link %}
<a href="{{ link }}">{{ link }}</a>{% include 'clip.html' %}
<a href="{{ link }}" {% if new_window %}target="_blank" rel="noopener"{% endif %}>{{ link }}</a>{% include 'clip.html' %}
{% endif %}