Add edit button on page website view

This commit is contained in:
bkfox
2022-02-18 16:09:40 +01:00
parent 2e070ab2c3
commit 893f441ddd
3 changed files with 33 additions and 1 deletions

View File

@ -56,6 +56,10 @@ Usefull context:
{% endfor %}
{% endblock %}
</div>
<div class="navbar-end">
{% block top-nav-tools %}
{% endblock %}
</div>
</div>
</div>
</nav>

View File

@ -1,5 +1,5 @@
{% extends "aircox/basepage_detail.html" %}
{% load static i18n humanize honeypot %}
{% load static i18n humanize honeypot aircox %}
{% comment %}
Base template used to display a Page
@ -14,6 +14,18 @@ Context:
{% endif %}
{% endblock %}
{% block top-nav-tools %}
{% has_perm page "change" as can_edit %}
{% if can_edit %}
<a class="navbar-item" href="{{ page|admin_url:'change' }}">
<span class="icon is-small">
<i class="fa fa-pen"></i>
</span>&nbsp;
<span>{% trans "Edit" %}</span>
</a>
{% endif %}
{% endblock %}
{% block main %}
{{ block.super }}