2017-03-27 13:29:32 +02:00
|
|
|
{% load handletags %}
|
2017-03-28 02:05:30 +02:00
|
|
|
<table class="table table-hover">
|
2017-03-27 13:29:32 +02:00
|
|
|
{% for field in object|getFields:user %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ field.0 }}</td>
|
2017-03-28 01:56:10 +02:00
|
|
|
<td>{% if field.1.through %}{{ field.1.all|linkObjects|default:"-" }}{% else %}{{ field.1|tryLinkHandle|default:"-" }}{% endif %}</td>
|
2017-03-27 13:29:32 +02:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
{% if object|userCanEdit:user %}
|
|
|
|
<tr>
|
|
|
|
<td>Actions</td>
|
2017-03-31 03:26:10 +02:00
|
|
|
{% with object.getAppName|add:":"|add:object.getClassName|lower|add:"-edit" as editView %}
|
|
|
|
{% with object.getAppName|add:":"|add:object.getClassName|lower|add:"-delete" as deleteView %}
|
2017-04-15 16:59:37 +02:00
|
|
|
<td>
|
|
|
|
<a href="{% url editView object.getPK %}"><span class="glyphicon glyphicon-pencil"></span></a>
|
|
|
|
<a href="{% url deleteView object.getPK %}"><span class="glyphicon glyphicon-trash"></span></a>
|
|
|
|
</td>
|
2017-03-27 13:29:32 +02:00
|
|
|
{% endwith %}
|
|
|
|
{% endwith %}
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
|
|
|
</table>
|