From b2c44937fa2b74fc263227e2ed72e5cb8cab7f49 Mon Sep 17 00:00:00 2001 From: Dave Hall Date: Mon, 7 Sep 2015 09:59:10 +0100 Subject: [PATCH 1/2] Changed django-reversion templates to work with django-reversion>=1.9.3 --- suit/templates/reversion/recover_form.html | 7 +++++++ suit/templates/reversion/revision_form.html | 10 +++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/suit/templates/reversion/recover_form.html b/suit/templates/reversion/recover_form.html index cc6e0ec4..42e7a07e 100644 --- a/suit/templates/reversion/recover_form.html +++ b/suit/templates/reversion/recover_form.html @@ -18,6 +18,13 @@ {% endblock %} +{% block object-tools %}{% endblock %} + + {% block form_top %}
{% blocktrans %}Press the save button below to recover this version of the object.{% endblocktrans %}
{% endblock %} + + +{% block submit_buttons_top %}{% with is_popup=1 %}{{block.super}}{% endwith %}{% endblock %} +{% block submit_buttons_bottom %}{% with is_popup=1 %}{{block.super}}{% endwith %}{% endblock %} diff --git a/suit/templates/reversion/revision_form.html b/suit/templates/reversion/revision_form.html index ecaba8b3..87d5befc 100644 --- a/suit/templates/reversion/revision_form.html +++ b/suit/templates/reversion/revision_form.html @@ -20,13 +20,13 @@ {% endblock %} -{% block content %} -{% with 1 as is_popup %} -{{block.super}} -{% endwith %} -{% endblock %} +{% block object-tools %}{% endblock %} {% block form_top %}
{% blocktrans %}Press the save button below to revert to this version of the object.{% endblocktrans %}
{% endblock %} + + +{% block submit_buttons_top %}{% with is_popup=1 %}{{block.super}}{% endwith %}{% endblock %} +{% block submit_buttons_bottom %}{% with is_popup=1 %}{{block.super}}{% endwith %}{% endblock %} From 087df22566af714de0f84693c02b129227423eb5 Mon Sep 17 00:00:00 2001 From: Dave Hall Date: Wed, 9 Sep 2015 10:34:59 +0100 Subject: [PATCH 2/2] Updating breadcrumb URLs for django-reversion 1.9.3 compatibility --- suit/templates/reversion/change_list.html | 4 ++-- suit/templates/reversion/recover_form.html | 6 +++--- suit/templates/reversion/recover_list.html | 4 ++-- suit/templates/reversion/revision_form.html | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/suit/templates/reversion/change_list.html b/suit/templates/reversion/change_list.html index 3c52938a..ec9c4ca2 100644 --- a/suit/templates/reversion/change_list.html +++ b/suit/templates/reversion/change_list.html @@ -1,9 +1,9 @@ {% extends "admin/change_list.html" %} -{% load i18n %} +{% load i18n admin_urls %} {% block object-tools-items %} {% if not is_popup %} - +   {% blocktrans with cl.opts.verbose_name_plural|escape as name %}Recover deleted {{ name }}{% endblocktrans %} {% endif %} diff --git a/suit/templates/reversion/recover_form.html b/suit/templates/reversion/recover_form.html index 42e7a07e..8c551366 100644 --- a/suit/templates/reversion/recover_form.html +++ b/suit/templates/reversion/recover_form.html @@ -1,6 +1,6 @@ {% extends "reversion/revision_form.html" %} {% load url from suit_compat %} -{% load i18n %} +{% load i18n admin_urls %} {% block breadcrumbs %} @@ -9,9 +9,9 @@ »
  • {{ app_label|capfirst|escape }} »
  • -
  • {{opts.verbose_name_plural|capfirst}} +
  • {{opts.verbose_name_plural|capfirst}} »
  • -
  • {% blocktrans with opts.verbose_name_plural as name %}Recover deleted {{name}}{% endblocktrans %} +
  • {% blocktrans with opts.verbose_name_plural as name %}Recover deleted {{name}}{% endblocktrans %} »
  • {{title}}
  • diff --git a/suit/templates/reversion/recover_list.html b/suit/templates/reversion/recover_list.html index 78fbc9d8..3cdd4cc2 100644 --- a/suit/templates/reversion/recover_list.html +++ b/suit/templates/reversion/recover_list.html @@ -1,6 +1,6 @@ {% extends "admin/base_site.html" %} {% load url from suit_compat %} -{% load i18n %} +{% load i18n admin_url %} {% block breadcrumbs %} @@ -9,7 +9,7 @@ »
  • {{ app_label|capfirst|escape }} »
  • -
  • {{opts.verbose_name_plural|capfirst}} +
  • {{opts.verbose_name_plural|capfirst}} »
  • {% blocktrans with opts.verbose_name_plural|escape as name %}Recover deleted {{name}}{% endblocktrans %}
  • diff --git a/suit/templates/reversion/revision_form.html b/suit/templates/reversion/revision_form.html index 87d5befc..8084db60 100644 --- a/suit/templates/reversion/revision_form.html +++ b/suit/templates/reversion/revision_form.html @@ -1,6 +1,6 @@ {% extends "admin/change_form.html" %} {% load url from suit_compat %} -{% load i18n %} +{% load i18n admin_urls %} {% block breadcrumbs %} @@ -9,11 +9,11 @@ »
  • {{ app_label|capfirst|escape }} »
  • -
  • {{opts.verbose_name_plural|capfirst}} +
  • {{opts.verbose_name_plural|capfirst}} »
  • -
  • {{original|truncatewords:"18"}} +
  • {{original|truncatewords:"18"}} »
  • -
  • {% trans "History" %} +
  • {% trans "History" %} »
  • {% blocktrans with opts.verbose_name as verbose_name %}Revert {{verbose_name}}{% endblocktrans %}