Skip to content
GitLab
Projets Groupes Extraits de code
  • /
  • Aide
    • Aide
    • Support
    • Forum de la communauté
    • Proposer une rétroaction
    • Contribuer à GitLab
  • Connexion
  • M memopol
  • Informations du projet
    • Informations du projet
    • Activité
    • Étiquettes
    • Membres
  • Dépôt
    • Dépôt
    • Fichiers
    • Commits
    • Branches
    • Étiquettes
    • Contributeurs
    • Graphe
    • Comparer
  • Tickets 32
    • Tickets 32
    • Liste
    • Tableaux
    • Service d’assistance
    • Jalons
  • Demandes de fusion 6
    • Demandes de fusion 6
  • Intégration et livraison continues
    • Intégration et livraison continues
    • Pipelines
    • Tâches
    • Planifications
  • Déploiements
    • Déploiements
    • Environnements
    • Versions
  • Supervision
    • Supervision
    • Incidents
  • Analytique
    • Analytique
    • Chaînes de valeur
    • Intégration et livraison continues
    • Dépôt
  • Wiki
    • Wiki
  • Extraits de code
    • Extraits de code
  • Activité
  • Graphe
  • Créer un nouveau ticket
  • Tâches
  • Commits
  • Tableaux des tickets
Masquer la barre latérale
  • La Quadrature du NetLa Quadrature du Net
  • Political MemoryPolitical Memory
  • memopol
  • Demandes de fusion
  • !92

Add filters for representatives

  • Examiner les modifications

  • Télécharger
  • Correctifs formatés en courriel
  • Diff brut
Fusionnée njoyard a demandé de fusionner filter-representatives-22d27829 vers master juin 16, 2016
  • Vue d’ensemble 4
  • Commits 14
  • Pipelines 0
  • Modifications 48

Created by: njoyard

This PR adds a filter form that uses django-filters on the representative list with the following criteria:

  • search: identical to the previously existing search box, searches representatives by name
  • chamber: static drop down list to filter by chamber
  • country: static drop down list to filter by country
  • group: autocompleted drop down to filter by all kinds of groups (except chamber and country) : party, committee, delegation, ...

The group URLs (like /legislature/representatives/committee/European Parliament/Committee on Defense whatever) are now 301-redirected to an URL with querystring parameters in order to pre-fill the filter form.

TODO:

  • fix select2 style to match the rest of the form
  • ensure the filter form always submits to the root representative list url instead of the current page url (not really needed but just in case)
  • add a checkbox to choose active/inactive meps postponed until we have an easy way to turn options/selects into a nice bootstrap button group
  • add something more obvious when there are no results
  • add a media block to the root template to allow page templates to add to it not needed, we have a head block already
  • change the way groups are displayed in the ac (add abbreviation, make group type more obvious) doesn't seem possible currently with select2
  • add filter tests
  • check duplicate meps issue again
  • fix missing querystring in page links

Preview:

preview

Assigné
Assigner à
Relecteurs
Demander une revue de code à
Suivi du temps
Branche Source : filter-representatives-22d27829