Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed django-reversion templates to work with django-reversion>=1.9.3 #424

Merged
merged 2 commits into from
Sep 28, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions suit/templates/reversion/change_list.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{% extends "admin/change_list.html" %}
{% load i18n %}
{% load i18n admin_urls %}

{% block object-tools-items %}
{% if not is_popup %}
<a href="{{ recoverlist_url }}" class="recoverlink btn">
<a href="{% url opts|admin_urlname:'recoverlist' %}" class="recoverlink btn">
<i class="icon-repeat"></i>&nbsp;
{% blocktrans with cl.opts.verbose_name_plural|escape as name %}Recover deleted {{ name }}{% endblocktrans %}</a>
{% endif %}
Expand Down
13 changes: 10 additions & 3 deletions suit/templates/reversion/recover_form.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "reversion/revision_form.html" %}
{% load url from suit_compat %}
{% load i18n %}
{% load i18n admin_urls %}


{% block breadcrumbs %}
Expand All @@ -9,15 +9,22 @@
<span class="divider">&raquo;</span></li>
<li><a href="{% url 'admin:app_list' app_label %}">{{ app_label|capfirst|escape }}</a>
<span class="divider">&raquo;</span></li>
<li><a href="{{changelist_url}}">{{opts.verbose_name_plural|capfirst}}</a>
<li><a href="{% url opts|admin_urlname:'changelist' %}">{{opts.verbose_name_plural|capfirst}}</a>
<span class="divider">&raquo;</span></li>
<li><a href="{{recoverlist_url}}">{% blocktrans with opts.verbose_name_plural as name %}Recover deleted {{name}}{% endblocktrans %}</a>
<li><a href="{% url opts|admin_urlname:'recoverlist' %}">{% blocktrans with opts.verbose_name_plural as name %}Recover deleted {{name}}{% endblocktrans %}</a>
<span class="divider">&raquo;</span></li>
<li class="active">{{title}}</li>
</ul>
{% endblock %}


{% block object-tools %}{% endblock %}


{% block form_top %}
<div class="alert alert-info">{% blocktrans %}Press the save button below to recover this version of the object.{% endblocktrans %}</div>
{% 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 %}
4 changes: 2 additions & 2 deletions suit/templates/reversion/recover_list.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "admin/base_site.html" %}
{% load url from suit_compat %}
{% load i18n %}
{% load i18n admin_url %}


{% block breadcrumbs %}
Expand All @@ -9,7 +9,7 @@
<span class="divider">&raquo;</span></li>
<li><a href="{% url 'admin:app_list' app_label %}">{{ app_label|capfirst|escape }}</a>
<span class="divider">&raquo;</span></li>
<li><a href="{{changelist_url}}">{{opts.verbose_name_plural|capfirst}}</a>
<li><a href="{% url opts|admin_urlname:'changelist' %}">{{opts.verbose_name_plural|capfirst}}</a>
<span class="divider">&raquo;</span></li>
<li class="active">{% blocktrans with opts.verbose_name_plural|escape as name %}Recover deleted {{name}}{% endblocktrans %}</li>
</ul>
Expand Down
18 changes: 9 additions & 9 deletions suit/templates/reversion/revision_form.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "admin/change_form.html" %}
{% load url from suit_compat %}
{% load i18n %}
{% load i18n admin_urls %}


{% block breadcrumbs %}
Expand All @@ -9,24 +9,24 @@
<span class="divider">&raquo;</span></li>
<li><a href="{% url 'admin:app_list' app_label %}">{{ app_label|capfirst|escape }}</a>
<span class="divider">&raquo;</span></li>
<li><a href="{{changelist_url}}">{{opts.verbose_name_plural|capfirst}}</a>
<li><a href="{% url opts|admin_urlname:'changelist' %}">{{opts.verbose_name_plural|capfirst}}</a>
<span class="divider">&raquo;</span></li>
<li><a href="{{change_url}}">{{original|truncatewords:"18"}}</a>
<li><a href="{% url opts|admin_urlname:'change' object_id %}">{{original|truncatewords:"18"}}</a>
<span class="divider">&raquo;</span></li>
<li><a href="../">{% trans "History" %}</a>
<li><a href="{% url opts|admin_urlname:'history' object_id %}">{% trans "History" %}</a>
<span class="divider">&raquo;</span></li>
<li class="active">{% blocktrans with opts.verbose_name as verbose_name %}Revert {{verbose_name}}{% endblocktrans %}</li>
</ul>
{% endblock %}


{% block content %}
{% with 1 as is_popup %}
{{block.super}}
{% endwith %}
{% endblock %}
{% block object-tools %}{% endblock %}


{% block form_top %}
<div class="alert alert-info">{% blocktrans %}Press the save button below to revert to this version of the object.{% endblocktrans %}</div>
{% 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 %}