Include date hierarchy in quick removal links (#218)
* Include date hierarchy in quick removal links * use date field name in removal link * reduce diff * tweak some details * start adding tests * use mock without spec :( it's not easy to instantiate ChangeList, and speccing from the class means that many attributes are not recognized * more tests * more tests * more checks for generated URLs * better tags and tests * compat for tox 4
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
<div class="changelist-filter-clear"><a href="{{ removal_link }}">
|
||||
{{ date_label|capfirst }}: <span>{{ date_value|date:date_format|capfirst }}</span> ✖
|
||||
</a></div>
|
||||
@@ -1,6 +1,5 @@
|
||||
{% load admin_interface_tags %}
|
||||
{% if spec.lookup_val or spec.value %}
|
||||
<div class="changelist-filter-clear"><a href="{% admin_interface_clear_filter_qs cl spec %}">
|
||||
{{ title|capfirst }}: <span>{{ selected_value }}</span> ✖
|
||||
<div class="changelist-filter-clear"><a href="{{ removal_link }}">
|
||||
{{ title|capfirst }}: <span>{{ selected_value }}</span> ✖
|
||||
</a></div>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user