summaryrefslogtreecommitdiff
path: root/django-simple-history/simple_history/templates
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2016-01-17 18:09:26 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2016-01-17 18:09:26 +0100
commitf384337ef0d9d2e40d09204f18c4a486e925132c (patch)
tree434a8a1ee961aa3adf79b35fe42ac41f075b50ef /django-simple-history/simple_history/templates
parentad4a7e6015c26fef5bbad4783d638a138e687bdb (diff)
downloadIshtar-f384337ef0d9d2e40d09204f18c4a486e925132c.tar.bz2
Ishtar-f384337ef0d9d2e40d09204f18c4a486e925132c.zip
Include django-simple-history - fix install script
Diffstat (limited to 'django-simple-history/simple_history/templates')
-rw-r--r--django-simple-history/simple_history/templates/simple_history/object_history.html38
-rw-r--r--django-simple-history/simple_history/templates/simple_history/object_history_form.html24
2 files changed, 62 insertions, 0 deletions
diff --git a/django-simple-history/simple_history/templates/simple_history/object_history.html b/django-simple-history/simple_history/templates/simple_history/object_history.html
new file mode 100644
index 000000000..d14338232
--- /dev/null
+++ b/django-simple-history/simple_history/templates/simple_history/object_history.html
@@ -0,0 +1,38 @@
+{% extends "admin/object_history.html" %}
+{% load i18n %}
+
+
+{% block content %}
+ <div id="content-main">
+
+ <p>{% blocktrans %}Choose a date from the list below to revert to a previous version of this object.{% endblocktrans %}</p>
+
+ <div class="module">
+ {% if action_list %}
+ <table id="change-history">
+ <thead>
+ <tr>
+ <th scope="col">{% trans 'Object' %}</th>
+ <th scope="col">{% trans 'Date/time' %}</th>
+ <th scope="col">{% trans 'Comment' %}</th>
+ <th scope="col">{% trans 'Changed by' %}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for action in action_list %}
+ <tr>
+ <td><a href="{{ action.revert_url }}">{{ action.history_object }}</a></td>
+ <td>{{ action.history_date }}</td>
+ <td>{{ action.get_history_type_display }}</td>
+ <td><a href="{% url admin:auth_user_change action.history_user_id %}">{{ action.history_user }}</a></td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ {% else %}
+ <p>{% trans "This object doesn't have a change history." %}</p>
+ {% endif %}
+ </div>
+ </div>
+{% endblock %}
+
diff --git a/django-simple-history/simple_history/templates/simple_history/object_history_form.html b/django-simple-history/simple_history/templates/simple_history/object_history_form.html
new file mode 100644
index 000000000..fdc8f1a87
--- /dev/null
+++ b/django-simple-history/simple_history/templates/simple_history/object_history_form.html
@@ -0,0 +1,24 @@
+{% extends "admin/change_form.html" %}
+{% load i18n %}
+
+{% block breadcrumbs %}
+ <div class="breadcrumbs">
+ <a href="{% url admin:index %}">{% trans "Home" %}</a> &rsaquo;
+ <a href="{% url admin:app_list app_label %}">{{app_label|capfirst|escape}}</a> &rsaquo;
+ <a href="{{changelist_url}}">{{opts.verbose_name_plural|capfirst}}</a> &rsaquo;
+ <a href="{{change_url}}">{{original|truncatewords:"18"}}</a> &rsaquo;
+ <a href="../">{% trans "History" %}</a> &rsaquo;
+ {% blocktrans with original_opts.verbose_name as verbose_name %}Revert {{verbose_name}}{% endblocktrans %}
+ </div>
+{% endblock %}
+
+{% comment %}Hack to remove "Save as New" and "Save and Continue" buttons {% endcomment %}
+{% block content %}
+ {% with 1 as is_popup %}
+ {{block.super}}
+ {% endwith %}
+{% endblock %}
+
+{% block form_top %}
+ <p>{% blocktrans %}Press the save button below to revert to this version of the object.{% endblocktrans %}</p>
+{% endblock %}