-
-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix] Fixed JS of history pages on config app #681
Fixes #681
- Loading branch information
Showing
3 changed files
with
51 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
openwisp_controller/config/templates/reversion/config/revision_form.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{% extends "admin/config/change_form.html" %} | ||
{% load i18n admin_urls %} | ||
|
||
{% comment %} | ||
The default "reversion/templates/reversion/recover_form.html" template extends | ||
"admin/change_form.html". Since, the "config" app uses a custom "change_form.html", | ||
we need to create a custom recovery form which extends that. | ||
The following content is taken as-is from "reversion/templates/reversion/recover_form.html" | ||
{% endcomment %} | ||
{% block breadcrumbs %} | ||
<div class="breadcrumbs"> | ||
<a href="{% url 'admin:index' %}">{% trans "Home" %}</a> › | ||
<a href="{% url 'admin:app_list' opts.app_label %}">{{opts.app_config.verbose_name}}</a> › | ||
<a href="{% url opts|admin_urlname:'changelist' %}">{{opts.verbose_name_plural|capfirst}}</a> › | ||
<a href="{% url opts|admin_urlname:'change' object_id %}">{{original|truncatewords:"18"}}</a> › | ||
<a href="{% url opts|admin_urlname:'history' object_id %}">{% trans "History" %}</a> › | ||
{% blocktrans with opts.verbose_name as verbose_name %}Revert {{verbose_name}}{% endblocktrans %} | ||
</div> | ||
{% endblock %} | ||
|
||
|
||
{% block object-tools %}{% endblock %} | ||
|
||
|
||
{% block form_top %} | ||
<p>{% blocktrans %}Press the save button below to revert to this version of the object.{% endblocktrans %}</p> | ||
{% 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 %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters