CivicStack / civicstack

A repository for open source civic tools from many countries and organizations
Other
37 stars 6 forks source link

Add prefilters. Closes #36 #60

Closed jfresco closed 8 years ago

jfresco commented 8 years ago

We are adding featured categories as described in #36. As we don't know which categories will have, I added some examples.

The lib/homepage/prefilters.js maps the category groups with the filters them applies. The lib/homepage/template.jade template renders the category buttons, and the view automatically maps the button clicks applying the prefilter information within the homepage filter.

So, If you need to add a new prefilters, just modify the prefilters.js by adding a map between the prefilter name and the filter it applies, and add the proper button in the template.jade.

Don't forget translations!