--
Ticket URL: <https://code.djangoproject.com/ticket/16380>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* has_patch: 0 => 1
* needs_tests: => 0
* easy: 0 => 1
* needs_docs: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/16380#comment:1>
* needs_better_patch: 0 => 1
* needs_docs: 0 => 1
* needs_tests: 0 => 1
* easy: 1 => 0
* stage: Unreviewed => Accepted
Comment:
While this is an interesting idea, this needs an actual example and tests.
--
Ticket URL: <https://code.djangoproject.com/ticket/16380#comment:2>
Comment (by hvdklauw):
Example admin/filter.html
{{{
{% load i18n %}
<h3>{% blocktrans with title as filter_title %} By {{ filter_title }} {%
endblocktrans %}</h3>
{% if spec.field.related and choices|length > 5 %}
<select class="filter_choice">
{% for choice in choices %}
<option value="{{ choice.query_string|iriencode }}"{% if
choice.selected %} selected='selected'{% endif %}>{{ choice.display|safe
}}</option>
{% endfor %}
</select>
{% else %}
<ul>
{% for choice in choices %}
<li{% if choice.selected %} class="selected"{% endif %}>
<a href="{{ choice.query_string|iriencode }}">{{ choice.display
}}</a></li>
{% endfor %}
</ul>
{% endif %}
}}}
And this little bit of javascript somewhere on document.ready:
{{{
$(".filter_choice").change(function() {
location.href = $(this).val();
});
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/16380#comment:3>
Comment (by jezdez):
Nice! Let's put something like that in the docs.
--
Ticket URL: <https://code.djangoproject.com/ticket/16380#comment:4>
* cc: bruno@… (added)
Comment:
This ticket could be closed, `admin_list_filter` is now (in v1.6 at least)
a `simple_tag` that uses the spec's template AND pass the spec to the
template (cf
https://github.com/django/django/blob/master/django/contrib/admin/templatetags/admin_list.py
line 409).
--
Ticket URL: <https://code.djangoproject.com/ticket/16380#comment:6>
* status: new => closed
* resolution: => fixed
Comment:
Hi,
Thanks for digging up these old out-of-date tickets
FYI, you don't need special permmissions to close a ticket here and you
can do so yourself.
Putting the commit id in the comment when you close a ticket will help us
double check.
In this case, this issue appears to have been fixed in
4dbeb4bca4638ff851a2f4844d262dbe1652f7b5.
Thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/16380#comment:7>
Comment (by bruno@…):
@bmispelon: ok will do next time.
--
Ticket URL: <https://code.djangoproject.com/ticket/16380#comment:8>