manager: fix base template and breadcrumb (#85941)

This commit is contained in:
Lauréline Guérin 2024-01-22 16:47:09 +01:00 committed by Lauréline Guérin
parent a36369ae1c
commit 068e5fe467
2 changed files with 20 additions and 2 deletions

View File

@ -1,6 +1,15 @@
{% extends "chrono/manager_home.html" %}
{% extends "chrono/manager_category_list.html" %}
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
{% if object.pk %}
<a href="{% url 'chrono-manager-category-edit' pk=object.pk %}">{{ object.label }}</a>
{% else %}
<a href="{% url 'chrono-manager-category-add' %}">{% trans "New Category" %}</a>
{% endif %}
{% endblock %}
{% block appbar %}
{% if object.id %}
<h2>{% trans "Edit Category" %}</h2>

View File

@ -1,6 +1,15 @@
{% extends "chrono/manager_home.html" %}
{% extends "chrono/manager_resource_list.html" %}
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
{% if object.pk %}
<a href="{% url 'chrono-manager-resource-edit' pk=object.pk %}">{{ object.label }}</a>
{% else %}
<a href="{% url 'chrono-manager-resource-add' %}">{% trans "New Resource" %}</a>
{% endif %}
{% endblock %}
{% block appbar %}
{% if object.id %}
<h2>{% trans "Edit Resource" %}</h2>