diff --git a/nested_admin/templates/nesting/admin/inlines/grappelli_stacked.html b/nested_admin/templates/nesting/admin/inlines/grappelli_stacked.html index c17da5c..c50b05c 100644 --- a/nested_admin/templates/nesting/admin/inlines/grappelli_stacked.html +++ b/nested_admin/templates/nesting/admin/inlines/grappelli_stacked.html @@ -86,6 +86,7 @@

@@ -98,6 +99,7 @@

{{ inline_admin_formset.opts.verbose_name }} #{{ f + {% if inline_admin_formset.has_add_permission %} + {% endif %}

{% endwith %}{# ends with inline_admin_formset.opts as inline_opts #} diff --git a/nested_admin/templates/nesting/admin/inlines/polymorphic_grappelli_stacked.html b/nested_admin/templates/nesting/admin/inlines/polymorphic_grappelli_stacked.html index f7416bc..34d5d1b 100644 --- a/nested_admin/templates/nesting/admin/inlines/polymorphic_grappelli_stacked.html +++ b/nested_admin/templates/nesting/admin/inlines/polymorphic_grappelli_stacked.html @@ -83,6 +83,7 @@

+ {% endif %} {% ifinlineclasses %}{% endifinlineclasses %} {% endwith %}{# ends with inline_admin_formset.opts as inline_opts #} diff --git a/nested_admin/templates/nesting/admin/inlines/stacked.html b/nested_admin/templates/nesting/admin/inlines/stacked.html index 907809e..5315033 100644 --- a/nested_admin/templates/nesting/admin/inlines/stacked.html +++ b/nested_admin/templates/nesting/admin/inlines/stacked.html @@ -29,7 +29,7 @@

data-is-initial="{% if inline_admin_form.pk_field.field.value %}true{% else %}false{% endif %}" {% endif %} id="{{ inline_admin_formset.formset.prefix }}-{% if forloop.last and inline_admin_formset.has_add_permission %}empty{% elif not forloop.last %}{{ inline_admin_form.form|form_index }}{% endif %}"> - +

{{ inline_admin_formset.opts.verbose_name|capfirst }}: {% if inline_admin_form.original %}{{ inline_admin_form.original }}{% if inline_admin_form.model_admin.show_change_link and inline_admin_form.model_admin.has_registered_model %} {% if inline_admin_formset.has_change_permission %}{% trans "Change" %}{% else %}{% trans "View" %}{% endif %}{% endif %} {% else %}#{{ forloop.counter }}{% endif %} @@ -66,11 +66,13 @@

{% blocktrans with inline_admin_formset.opts.verbose_name|strip_parent_name:inline_opts.verbose_name|title as verbose_name %}Add another {{ verbose_name }}{% endblocktrans %} + {% endif %} {% ifinlineclasses %}{% endifinlineclasses %} {% endwith %}{# ends with inline_admin_formset.opts as inline_opts #}