From: Brandon King Date: Tue, 28 Apr 2009 21:53:14 +0000 (+0000) Subject: Including reversion templates for ease of use... probably a bad idea. From version... X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=2eb543ef0a23a6146a17b279dc19fa5c470650b4 Including reversion templates for ease of use... probably a bad idea. From version 1.1.1 --- diff --git a/templates/reversion/change_list.html b/templates/reversion/change_list.html new file mode 100644 index 0000000..b5c708b --- /dev/null +++ b/templates/reversion/change_list.html @@ -0,0 +1,14 @@ +{% extends "admin/change_list.html" %} +{% load i18n %} + + +{% block object-tools %} + +{% endblock %} \ No newline at end of file diff --git a/templates/reversion/object_history.html b/templates/reversion/object_history.html new file mode 100644 index 0000000..2550012 --- /dev/null +++ b/templates/reversion/object_history.html @@ -0,0 +1,35 @@ +{% extends "admin/object_history.html" %} +{% load i18n %} + + +{% block content %} +
+ +

{% blocktrans %}Choose a date from the list below to revert to a previous version of this object.{% endblocktrans %}

+ +
+ {% if action_list %} + + + + + + + + + + {% for action in action_list %} + + + + + + {% endfor %} + +
{% trans 'Date/time' %}{% trans 'User' %}{% trans 'Comment' %}
{{action.revision.date_created|date:_("DATETIME_FORMAT")}}{{action.revision.user.username}}{% if action.revision.user.first_name %} ({{action.revision.user.first_name}} {{action.revision.user.last_name}}){% endif %}{{action.revision.comment|default:""}}
+ {% else %} +

{% trans "This object doesn't have a change history. It probably wasn't added via this admin site." %}

+ {% endif %} +
+
+{% endblock %} \ No newline at end of file diff --git a/templates/reversion/recover_form.html b/templates/reversion/recover_form.html new file mode 100644 index 0000000..548ea30 --- /dev/null +++ b/templates/reversion/recover_form.html @@ -0,0 +1,25 @@ +{% extends "reversion/revision_form.html" %} +{% load i18n %} + + +{% block extrahead %} + {{block.super.super.super}} + + {{media}} +{% endblock %} + + +{% block breadcrumbs %} + +{% endblock %} + + +{% block form_top %} +

{% blocktrans %}Press the save button below to recover this version of the object.{% endblocktrans %}

+{% endblock %} \ No newline at end of file diff --git a/templates/reversion/recover_list.html b/templates/reversion/recover_list.html new file mode 100644 index 0000000..640f620 --- /dev/null +++ b/templates/reversion/recover_list.html @@ -0,0 +1,39 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} +
+

{% blocktrans %}Choose a date from the list below to recover a deleted version of an object.{% endblocktrans %}

+
+ {% if deleted %} + + + + + + + + + {% for deletion in deleted %} + + + + + {% endfor %} + +
{% trans 'Date/time' %}{{opts.verbose_name|capfirst}}
{{deletion.revision.date_created|date:_("DATETIME_FORMAT")}}{{deletion.object_repr}}
+ {% else %} +

{% trans "There are no deleted objects to recover." %}

+ {% endif %} +
+
+{% endblock %} \ No newline at end of file diff --git a/templates/reversion/revision_form.html b/templates/reversion/revision_form.html new file mode 100644 index 0000000..f6afca7 --- /dev/null +++ b/templates/reversion/revision_form.html @@ -0,0 +1,33 @@ +{% extends "admin/change_form.html" %} +{% load i18n %} + + +{% block extrahead %} + {{block.super.super}} + + {{media}} +{% endblock %} + + +{% block breadcrumbs %} + +{% endblock %} + + +{% block content %} + {% with 1 as is_popup %} + {{block.super}} + {% endwith %} +{% endblock %} + + +{% block form_top %} +

{% blocktrans %}Press the save button below to revert to this version of the object.{% endblocktrans %}

+{% endblock %} \ No newline at end of file