Add comments display to versioning history (because why not).

Maybe in future we could have a box people can type in before they save changes to an event... But that's a separate project
This commit is contained in:
David Taylor
2016-04-05 11:50:34 +01:00
parent 33ce4b622d
commit ca6cddb392
4 changed files with 11 additions and 1 deletions

View File

@@ -62,7 +62,8 @@ class AssociateAdmin(reversion.VersionAdmin):
for event in events: for event in events:
masterObject.event_set.add(event) masterObject.event_set.add(event)
obj.delete() obj.delete()
reversion.set_comment('Merging Objects')
self.message_user(request, "Objects successfully merged.") self.message_user(request, "Objects successfully merged.")
return return
else: # Present the confirmation screen else: # Present the confirmation screen

View File

@@ -40,6 +40,9 @@
{% endif %} {% endif %}
{% include 'RIGS/object_button.html' with object=version.new %} {% include 'RIGS/object_button.html' with object=version.new %}
{% if version.revision.comment %}
({{ version.revision.comment }})
{% endif %}
</small> </small>
</p> </p>

View File

@@ -59,6 +59,7 @@
<td>Version ID</td> <td>Version ID</td>
<td>User</td> <td>User</td>
<td>Changes</td> <td>Changes</td>
<td>Comment</td>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -75,6 +76,7 @@
{% else %} {% else %}
{% include 'RIGS/version_changes.html' %} {% include 'RIGS/version_changes.html' %}
{% endif %} </td> {% endif %} </td>
<td>{{ version.revision.comment }}</td>
</tr> </tr>
{% endfor %} {% endfor %}

View File

@@ -35,6 +35,7 @@
<td>Version ID</td> <td>Version ID</td>
<td>User</td> <td>User</td>
<td>Changes</td> <td>Changes</td>
<td>Comment</td>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -51,6 +52,9 @@
{% include 'RIGS/version_changes.html' %} {% include 'RIGS/version_changes.html' %}
{% endif %} {% endif %}
</td> </td>
<td>
{{ version.revision.comment }}
</td>
</tr> </tr>
{% endif %} {% endif %}
{% endfor %} {% endfor %}