show changeset object edit_url for applied changesets too
This commit is contained in:
parent
8a35e72148
commit
7bdbd7a376
2 changed files with 2 additions and 2 deletions
|
@ -86,7 +86,7 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">
|
<th colspan="2">
|
||||||
{% if obj.edit_url and active %}
|
{% if obj.edit_url %}
|
||||||
<a class="btn btn-default btn-xs pull-right" data-force-next-zoom href="{{ obj.edit_url }}">
|
<a class="btn btn-default btn-xs pull-right" data-force-next-zoom href="{{ obj.edit_url }}">
|
||||||
{% trans 'Edit' %}
|
{% trans 'Edit' %}
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -223,7 +223,7 @@ def changeset_detail(request, pk):
|
||||||
prev_values = changeset.changes.prev.get(changed_object.obj).values
|
prev_values = changeset.changes.prev.get(changed_object.obj).values
|
||||||
|
|
||||||
edit_url = None
|
edit_url = None
|
||||||
if not changed_object.deleted:
|
if not changed_object.deleted and (active or changeset.state == "applied"):
|
||||||
# todo: only if it's active
|
# todo: only if it's active
|
||||||
reverse_kwargs = {'pk': changed_object.obj.id}
|
reverse_kwargs = {'pk': changed_object.obj.id}
|
||||||
if "space" in prev_values:
|
if "space" in prev_values:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue