diff --git a/suit/templates/admin/edit_inline/stacked.html b/suit/templates/admin/edit_inline/stacked.html index 36f68d5f..13e1ac4b 100644 --- a/suit/templates/admin/edit_inline/stacked.html +++ b/suit/templates/admin/edit_inline/stacked.html @@ -1,11 +1,17 @@ -{% load i18n admin_static %} +{% load i18n admin_static admin_urls suit_tags %} +{% suit_django_version as django_version %}

{{ inline_admin_formset.opts.verbose_name_plural|capfirst }}

{{ inline_admin_formset.formset.management_form }} {{ inline_admin_formset.formset.non_form_errors }} {% for inline_admin_form in inline_admin_formset %}
-

{{ inline_admin_formset.opts.verbose_name|title }}: {% if inline_admin_form.original %}{{ inline_admin_form.original }}{% else %}{% if not forloop.first and forloop.last %}#{{ forloop.counter }}{% endif %}{% endif %} +

{{ inline_admin_formset.opts.verbose_name|title }}: {% if inline_admin_form.original %} + {% if django_version > 1.7 and inline_admin_form.model_admin.show_change_link and inline_admin_form.model_admin.has_registered_model %} {{ inline_admin_form.original }} + {% else %} + {{ inline_admin_form.original }} + {% endif %} + {% else %}{% if not forloop.first and forloop.last %}#{{ forloop.counter }}{% endif %}{% endif %} {% if inline_admin_form.show_url %}{% trans "View on site" %}{% endif %} {% if inline_admin_formset.formset.can_delete and inline_admin_form.original %}{{ inline_admin_form.deletion_field.field }} {{ inline_admin_form.deletion_field.label_tag }}{% endif %}

diff --git a/suit/templates/admin/edit_inline/tabular.html b/suit/templates/admin/edit_inline/tabular.html index 5b2e93ee..0eeaabc7 100644 --- a/suit/templates/admin/edit_inline/tabular.html +++ b/suit/templates/admin/edit_inline/tabular.html @@ -1,4 +1,5 @@ -{% load i18n admin_static admin_modify %} +{% load i18n admin_static admin_modify suit_tags admin_urls %} +{% suit_django_version as django_version %}