fix changeset.html (changed_objects!)
This commit is contained in:
parent
9d5811bc15
commit
8ea300c1a6
2 changed files with 9 additions and 9 deletions
|
@ -15,26 +15,26 @@
|
|||
</p>
|
||||
{% bootstrap_messages %}
|
||||
|
||||
{% for group in grouped_changes %}
|
||||
{% for obj in changed_objects %}
|
||||
<table class="table table-condensed table-h-bordered change-group">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3">
|
||||
{% if group.edit_url %}
|
||||
<a class="btn btn-default btn-xs pull-right" data-force-next-zoom href="{{ group.edit_url }}">
|
||||
{% if obj.edit_url %}
|
||||
<a class="btn btn-default btn-xs pull-right" data-force-next-zoom href="{{ obj.edit_url }}">
|
||||
{% trans 'Edit' %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if group.obj_title %}
|
||||
{{ group.obj_title }} <small>({{ group.obj }})</small>
|
||||
{% if obj.title %}
|
||||
{{ obj.title }} <small>({{ obj.desc }})</small>
|
||||
{% else %}
|
||||
{{ group.obj }}
|
||||
{{ obj.desc }}
|
||||
{% endif %}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for change in group.changes %}
|
||||
{% for change in obj.changes %}
|
||||
<tr>
|
||||
<td class="text-{{ change.class }}"><i class="glyphicon glyphicon-{{ change.icon }}"></i></td>
|
||||
<td{% if change.discarded %} class="text-muted"{% endif %}>
|
||||
|
|
|
@ -71,8 +71,8 @@ def changeset_detail(request, pk):
|
|||
changed_object_data = {
|
||||
'model': obj.__class__,
|
||||
'model_title': obj.__class__._meta.verbose_name,
|
||||
'obj': obj_desc,
|
||||
'obj_title': obj.title if obj.titles else None,
|
||||
'desc': obj_desc,
|
||||
'title': obj.title if obj.titles else None,
|
||||
'changes': changes,
|
||||
'edit_url': edit_url,
|
||||
'order': changed_object.created,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue