mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-21 18:25:58 +02:00
Merge pull request #867 from cisagov/rjm/839-django-admin-staff-column-missing
839 - Fix missing column in django admin for Staff users
This commit is contained in:
commit
798f021e98
1 changed files with 67 additions and 45 deletions
|
@ -17,53 +17,45 @@ Load our custom filters to extract info from the django generated markup.
|
|||
<thead>
|
||||
<tr>
|
||||
|
||||
{# .gov - hardcode the select all checkbox #}
|
||||
<th scope="col" class="action-checkbox-column" title="Toggle all">
|
||||
<div class="text">
|
||||
<span>
|
||||
<input type="checkbox" name="_selected_action" id="action-toggle">
|
||||
<label for="action-toggle" class="usa-sr-only">Toggle all</label>
|
||||
</span>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</th>
|
||||
{# .gov - don't let django generate the select all checkbox #}
|
||||
{% for header in result_headers|slice:"1:" %}
|
||||
{% if results.0.form %}
|
||||
{# .gov - hardcode the select all checkbox #}
|
||||
<th scope="col" class="action-checkbox-column" title="Toggle all">
|
||||
<div class="text">
|
||||
<span>
|
||||
<input type="checkbox" name="_selected_action" id="action-toggle">
|
||||
<label for="action-toggle" class="usa-sr-only">Toggle all</label>
|
||||
</span>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</th>
|
||||
{# .gov - don't let django generate the select all checkbox #}
|
||||
{% for header in result_headers|slice:"1:" %}
|
||||
<th scope="col"{{ header.class_attrib }}>
|
||||
{% if header.sortable %}
|
||||
{% if header.sort_priority > 0 %}
|
||||
<div class="sortoptions">
|
||||
<a class="sortremove" href="{{ header.url_remove }}" title="{% translate "Remove from sorting" %}"></a>
|
||||
{% if num_sorted_fields > 1 %}<span class="sortpriority" title="{% blocktranslate with priority_number=header.sort_priority %}Sorting priority: {{ priority_number }}{% endblocktranslate %}">{{ header.sort_priority }}</span>{% endif %}
|
||||
<a href="{{ header.url_toggle }}" class="toggle {% if header.ascending %}ascending{% else %}descending{% endif %}" title="{% translate "Toggle sorting" %}"></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<div class="text">{% if header.sortable %}<a href="{{ header.url_primary }}">{{ header.text|capfirst }}</a>{% else %}<span>{{ header.text|capfirst }}</span>{% endif %}</div>
|
||||
<div class="clear"></div>
|
||||
</th>{% endfor %}
|
||||
|
||||
<th scope="col"{{ header.class_attrib }}>
|
||||
{% if header.sortable %}
|
||||
{% if header.sort_priority > 0 %}
|
||||
<div class="sortoptions">
|
||||
<a class="sortremove" href="{{ header.url_remove }}" title="{% translate "Remove from sorting" %}"></a>
|
||||
{% if num_sorted_fields > 1 %}<span class="sortpriority" title="{% blocktranslate with priority_number=header.sort_priority %}Sorting priority: {{ priority_number }}{% endblocktranslate %}">{{ header.sort_priority }}</span>{% endif %}
|
||||
<a href="{{ header.url_toggle }}" class="toggle {% if header.ascending %}ascending{% else %}descending{% endif %}" title="{% translate "Toggle sorting" %}"></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<div class="text">{% if header.sortable %}<a href="{{ header.url_primary }}">{{ header.text|capfirst }}</a>{% else %}<span>{{ header.text|capfirst }}</span>{% endif %}</div>
|
||||
<div class="clear"></div>
|
||||
</th>{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% comment %}
|
||||
.gov - hardcode the row checkboxes using the custom filters to extract
|
||||
the value attribute's value, and a label based on the anchor elements's
|
||||
text. Then edit the for loop to keep django from generating the row select
|
||||
checkboxes.
|
||||
{% endcomment %}
|
||||
|
||||
{% comment %}
|
||||
{% for result in results %}
|
||||
{% if result.form.non_field_errors %}
|
||||
<tr><td colspan="{{ result|length }}">{{ result.form.non_field_errors }}</td></tr>
|
||||
{% endif %}
|
||||
<tr>{% for item in result %}{{ item }}{% endfor %}</tr>
|
||||
{% endfor %}
|
||||
{% endcomment %}
|
||||
|
||||
{% comment %}
|
||||
.gov - hardcode the row checkboxes using the custom filters to extract
|
||||
the value attribute's value, and a label based on the anchor elements's
|
||||
text. Then edit the for loop to keep django from generating the row select
|
||||
checkboxes.
|
||||
{% endcomment %}
|
||||
{% for result in results %}
|
||||
{% for result in results %}
|
||||
{% if result.form.non_field_errors %}
|
||||
<tr><td colspan="{{ result|length }}">{{ result.form.non_field_errors }}</td></tr>
|
||||
{% endif %}
|
||||
|
@ -82,7 +74,37 @@ checkboxes.
|
|||
{{ item }}
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
{% else %} {# results doesn't have a form as its first element #}
|
||||
|
||||
{% for header in result_headers %}
|
||||
<th scope="col"{{ header.class_attrib }}>
|
||||
{% if header.sortable %}
|
||||
{% if header.sort_priority > 0 %}
|
||||
<div class="sortoptions">
|
||||
<a class="sortremove" href="{{ header.url_remove }}" title="{% translate "Remove from sorting" %}"></a>
|
||||
{% if num_sorted_fields > 1 %}<span class="sortpriority" title="{% blocktranslate with priority_number=header.sort_priority %}Sorting priority: {{ priority_number }}{% endblocktranslate %}">{{ header.sort_priority }}</span>{% endif %}
|
||||
<a href="{{ header.url_toggle }}" class="toggle {% if header.ascending %}ascending{% else %}descending{% endif %}" title="{% translate "Toggle sorting" %}"></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<div class="text">{% if header.sortable %}<a href="{{ header.url_primary }}">{{ header.text|capfirst }}</a>{% else %}<span>{{ header.text|capfirst }}</span>{% endif %}</div>
|
||||
<div class="clear"></div>
|
||||
</th>{% endfor %}
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% for result in results %}
|
||||
{% if result.form.non_field_errors %}
|
||||
<tr><td colspan="{{ result|length }}">{{ result.form.non_field_errors }}</td></tr>
|
||||
{% endif %}
|
||||
<tr>{% for item in result %}{{ item }}{% endfor %}</tr>
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue