Log
* adds modal_generic.html template for generic usage * adds M2M field log to BaseObject * adds show log button to controls.html * adds logging on adding related objects * adds render log table using generic modal * adds tooltip to missing values in detail views * adds/updates translations
This commit is contained in:
33
templates/log.html
Normal file
33
templates/log.html
Normal file
@@ -0,0 +1,33 @@
|
||||
{% load i18n %}
|
||||
<div class="table-container scroll-300">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
{% trans 'Timestamp' %}
|
||||
</th>
|
||||
<th scope="col">
|
||||
{% trans 'Action' %}
|
||||
</th>
|
||||
<th scope="col">
|
||||
{% trans 'User' %}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for entry in log %}
|
||||
<tr>
|
||||
<td>
|
||||
{{entry.timestamp}}
|
||||
</td>
|
||||
<td>
|
||||
{{ entry.action_humanize}}
|
||||
</td>
|
||||
<td>
|
||||
{{entry.user}}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
17
templates/modal/modal_generic.html
Normal file
17
templates/modal/modal_generic.html
Normal file
@@ -0,0 +1,17 @@
|
||||
{% load i18n l10n %}
|
||||
{% comment %}
|
||||
A generic modal template which is derived from modal_form.html on django-bootstrap-modal-forms package
|
||||
https://pypi.org/project/django-bootstrap-modal-forms/
|
||||
{% endcomment %}
|
||||
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{{ modal_title }}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
{% include modal_body_template %}
|
||||
</div>
|
||||
Reference in New Issue
Block a user