You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enable/ disable revert using only a settings attribute (#632)
* show revert text / buttons based on value of revert_disabled.
* add tests for revert disabled functionality
* add SIMPLE_HISTORY_REVERT_DISABLED as attr to control visibility of Revert button.
* capture --tag from args
* correct variable name to revert_disabled
* update docs
* CHANGES.rst
* remove unused test tags
* fix minor formatting issues in templates
* fix, only show text if revert is NOT disabled
* use random file name in tests (uuid)
{% blocktrans with original_opts.verbose_name as verbose_name %}Revert {{verbose_name}}{% endblocktrans %}
12
+
{% if revert_disabled %}{% blocktrans with original_opts.verbose_name as verbose_name %}View {{verbose_name}}{% endblocktrans %}{% else %}{% blocktrans with original_opts.verbose_name as verbose_name %}Revert {{verbose_name}}{% endblocktrans %}{% endif %}
13
13
</div>
14
14
{% endblock %}
15
15
@@ -18,5 +18,5 @@
18
18
{% endblock %}
19
19
20
20
{% block form_top %}
21
-
<p>{% blocktrans %}Press the 'Revert' button below to revert to this version of the object.{% endblocktrans %}{% if change_history %}{% blocktrans %}Or press the 'Change History' button to edit the history.{% endblocktrans %}{% endif %}</p>
21
+
<p>{% if not revert_disabled %}{% blocktrans %}Press the 'Revert' button below to revert to this version of the object.{% endblocktrans %}{% endif %}{% if change_history %}{% blocktrans %}Press the 'Change History' button below to edit the history.{% endblocktrans %}{% endif %}</p>
0 commit comments