Skip to content

Commit

Permalink
Merge pull request #65 from wildfish/fix/personal_data_admin_style
Browse files Browse the repository at this point in the history
Fixed issue with Admin styling affecting newer versions of Django
  • Loading branch information
jamesoutterside authored Apr 28, 2022
2 parents d4942b6 + f025a0a commit 58177f6
Showing 1 changed file with 66 additions and 65 deletions.
131 changes: 66 additions & 65 deletions gdpr_assist/templates/gdpr_assist/admin/pd_change_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,81 +38,82 @@
{% block content %}
<div id="content-main">
<div id="changelist" class="module filtered">
<div class="changelist-form-container">
<div id="toolbar">
<div class="search">
<form action="." method="POST">
{% csrf_token %}
{{ form.term }}
<input type="submit" value="Search">
</form>
</div>
</div>

<form action="." method="POST">
{% csrf_token %}
<input type="hidden" name="{{ form.term.name }}" value="{{ form.term.value }}">

<div id="toolbar">
<div class="search">
<form action="." method="POST">
{% csrf_token %}
{{ form.term }}
<input type="submit" value="Search">
</form>
{% for group in results %}
{% if forloop.first %}
<div class="actions">
<label>{{ form.action.label }}{{ form.action }} {{ form.action.errors }}</label>
<button type="submit" class="button" title="{% trans "Run the selected action" %}">{% trans "Go" %}</button>
</div>
</div>

<form action="." method="POST">
{% csrf_token %}
<input type="hidden" name="{{ form.term.name }}" value="{{ form.term.value }}">
<table>
<thead>
<tr>
<th scope="col" class="action-checkbox-column">
<div class="text"><span><input id="action-toggle" type="checkbox"></span></div>
<div class="clear"></div>
</th>

<th scope="col">
<div class="text">Select all</div>
</th>
</tr>
</thead>

{% for group in results %}
{% if forloop.first %}
<div class="actions">
<label>{{ form.action.label }}{{ form.action }} {{ form.action.errors }}</label>
<button type="submit" class="button" title="{% trans "Run the selected action" %}">{% trans "Go" %}</button>
</div>
<tbody>
{% endif %}

<table>
<thead>
<tr>
<th scope="col" class="action-checkbox-column">
<div class="text"><span><input id="action-toggle" type="checkbox"></span></div>
<div class="clear"></div>
</th>

<th scope="col">
<div class="text">Select all</div>
</th>
</tr>
</thead>

<tbody>
{% endif %}

<tr>
<td colspan="2" class="group-head">
<h2>{{ group.app_label.title }}: {{ group.model_name.title }}</h2>
</td>
</tr>

{% if not group.model.check_can_anonymise %}
<tr>
<td colspan="2">
{% url group.url_change_name as obj_change_url %}
These records will not be anonymised, they can be exported or if you wish to delete them
please do so via their <a href="{{ obj_change_url }}">admin page</a>.
<td colspan="2" class="group-head">
<h2>{{ group.app_label.title }}: {{ group.model_name.title }}</h2>
</td>
</tr>
{% endif %}
{% for obj in group.results %}
<tr class="row1">
<td class="action-checkbox">
<input name="obj_pk" value="{{ group.content_type.pk }}-{{ obj.pk }}" class="action-select" type="checkbox">
</td>
<td class="field-username">
{% url group.url_name obj.pk as obj_url %}
{% if obj_url %}<a href="{{ obj_url }}">{% endif %}{{ obj }}{% if obj_url %}</a>{% endif %}
</td>
</tr>
{% endfor %}

{% if forloop.last %}
</tbody>
</table>
{% endif %}
{% empty %}
<p>No results found.</p>
{% endfor %}

{% if not group.model.check_can_anonymise %}
<tr>
<td colspan="2">
{% url group.url_change_name as obj_change_url %}
These records will not be anonymised, they can be exported or if you wish to delete them
please do so via their <a href="{{ obj_change_url }}">admin page</a>.
</td>
</tr>
{% endif %}
{% for obj in group.results %}
<tr class="row1">
<td class="action-checkbox">
<input name="obj_pk" value="{{ group.content_type.pk }}-{{ obj.pk }}" class="action-select" type="checkbox">
</td>
<td class="field-username">
{% url group.url_name obj.pk as obj_url %}
{% if obj_url %}<a href="{{ obj_url }}">{% endif %}{{ obj }}{% if obj_url %}</a>{% endif %}
</td>
</tr>
{% endfor %}

{% if forloop.last %}
</tbody>
</table>
{% endif %}
{% empty %}
<p>No results found.</p>
{% endfor %}

</form>
</div>
</div>
</div>

Expand Down

0 comments on commit 58177f6

Please sign in to comment.