Skip to content

Commit

Permalink
Add breadcrumbs to the intermediate form
Browse files Browse the repository at this point in the history
  • Loading branch information
pauk-slon authored Oct 8, 2023
2 parents a5a1cc8 + 9cf7d83 commit e34c0bc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions admin_form_action/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def _wrapper(
'action': action_method.__name__,
'action_submit_parameter': _ACTION_SUBMIT_PARAMETER,
'description': description,
'opts': model_admin.model._meta,
}
)

Expand Down
14 changes: 10 additions & 4 deletions admin_form_action/templates/admin_form_action/input_form.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
{% extends "admin/base_site.html" %}
{% load i18n static %}
{% load admin_urls i18n static %}
{% block extrastyle %}
{{ block.super }}
<link rel="stylesheet"
type="text/css"
href="{% static "admin/css/forms.css" %}">
{% endblock %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
&rsaquo; <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
&rsaquo; <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>
&rsaquo; {{ description|capfirst }}
</div>
{% endblock %}
{% block content %}
<div id="content-main">
<h1>{{ description|capfirst }}</h1>
Expand All @@ -21,9 +29,7 @@ <h1>{{ description|capfirst }}</h1>
class="default" />
</p>
</form>
<fieldset class="module aligned">
<h2>{% trans "The objects to perform the action for" %}:</h2>
<ul>{{ items|unordered_list }}</ul>
</fieldset>
<ul>{{ items|unordered_list }}</ul>
</div>
{% endblock %}

0 comments on commit e34c0bc

Please sign in to comment.