templates/edit-link: use fontawesome icons

This commit is contained in:
Chris Tactic 2024-03-14 08:54:51 +01:00
parent 306eb20257
commit f8401c76e3

View File

@ -4,15 +4,17 @@
{% if user.is_authenticated and can_edit %}
{% with request.resolver_match.view_name as view_name %}
 
{% if view_name in 'program-edit,bla' %}
{% if view_name in 'page-edit,program-edit,episode-edit' %}
<!--
<a href="{% url 'program-detail' page.slug %}" target="_self">
<span title="{% translate 'View' %} {{ page }}">{% translate 'View' %} 👁 </span>
<span title="{% translate 'View' %} {{ page }}">{% translate 'View' %} </span>
<i class="fa-regular fa-eye"></i>
</a>
-->
{% else %}
<a href="{% url view_name|edit_view page.pk %}" target="_self">
<span title="{% translate 'Edit' %} {{ page }}">{% translate 'Edit' %} 🖉 </span>
<span title="{% translate 'Edit' %} {{ page }}">{% translate 'Edit' %} </span>
<i class="fa-solid fa-pencil"></i>
</a>
{% endif %}
{% endwith %}