From 7ffc5aa48c1ff4d0cbc8ca4d102d953d6c7785bb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Olivier=20Larchev=C3=AAque?= Date: Tue, 12 Jul 2011 13:10:36 -0400 Subject: [PATCH] #1497 --- buildout.cfg | 3 +++ project/rh/lib.py | 2 ++ project/rh/templates/admin/rh/change_list.html | 9 +++++++++ project/settings.py | 1 + 4 files changed, 15 insertions(+) create mode 100644 project/rh/templates/admin/rh/change_list.html diff --git a/buildout.cfg b/buildout.cfg index 55d7aaa..4ff5fbb 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -10,6 +10,7 @@ find-links = http://pypi.auf.org/simple/auf.recipe.django/ http://pypi.auf.org/simple/auf.django.workflow/ http://pypi.auf.org/simple/auf.django.admingroup/ http://pypi.auf.org/simple/auf.django.metadata/ + http://pypi.auf.org/django-alphafilter/ eggs = django @@ -24,6 +25,7 @@ eggs = simplejson django-ajax-selects auf.django.metadata + django-alphafilter # LA PROD ne dispose que de reportlab 2.1, incompatible avec # les versions de pisa assez évoluées pour un bon rendu. @@ -41,6 +43,7 @@ auf.django.auth = 0.5.5dev django-reversion = 1.3.3 auf.django.workflow = 0.14dev django-ajax-selects = 1.1.4 +django-alphafilter = 0.5.2auf2 #reportlab = 2.5 #html5lib = 0.90 #pyPDF = 1.13 diff --git a/project/rh/lib.py b/project/rh/lib.py index 6aeb7bf..edfe401 100644 --- a/project/rh/lib.py +++ b/project/rh/lib.py @@ -221,6 +221,8 @@ class DossierCommentaireAdmin(admin.ModelAdmin): class EmployeAdmin(AUFMetadataAdminMixin, admin.ModelAdmin): + alphabet_filter = 'nom' + DEFAULT_ALPHABET = u'ABCDEFGHIJKLMNOPQRSTUVWXYZ' search_fields = ('id', 'nom', 'prenom', 'nom_affichage', ) inlines = (AyantDroitInline, DossierROInline, diff --git a/project/rh/templates/admin/rh/change_list.html b/project/rh/templates/admin/rh/change_list.html new file mode 100644 index 0000000..333da8d --- /dev/null +++ b/project/rh/templates/admin/rh/change_list.html @@ -0,0 +1,9 @@ +{% extends "alphafilter/change_list.html" %} + +{% block extrastyle %} +{{block.super}} + +{% endblock %} + diff --git a/project/settings.py b/project/settings.py index 26aa069..7d9916e 100644 --- a/project/settings.py +++ b/project/settings.py @@ -70,6 +70,7 @@ INSTALLED_APPS = ( 'project.rh_v1', 'project.dae', 'project.budget', + 'alphafilter', ) TEMPLATE_CONTEXT_PROCESSORS = ( -- 1.7.10.4