integrate tiptap text editor

This commit is contained in:
bkfox
2024-04-30 18:29:34 +02:00
parent 55123c386d
commit 93fba2d46d
21 changed files with 327 additions and 149 deletions

View File

@ -2,24 +2,24 @@
{% block user-actions-container %}
{% if user.is_authenticated %}
{{ object.get_status_display }}
{{ object.get_status_display|capfirst }}
{% if object.pub_date %}
({{ object.pub_date|date:"d/m/Y H:i" }})
{% endif %}
{% endif %}
{% if user.is_authenticated and can_edit %}
{% if user.is_authenticated %}
{% with request.resolver_match.view_name as view_name %}
 
{% if "-edit" in view_name %}
{% if request.path != object.get_absolute_url %}
<a href="{% url view_name|detail_view page.slug %}" target="_self" title="{% translate 'View' %} {{ page }}">
<span class="icon">
<i class="fa-regular fa-eye"></i>
</span>
<span>{% translate 'View' %} </span>
</a>
{% else %}
{% elif can_edit %}
<a href="{% url view_name|edit_view page.pk %}" target="_self" title="{% translate 'Edit' %} {{ page }}">
<span class="icon">
<i class="fa-solid fa-pencil"></i>