diff --git a/chicago/feeds.py b/chicago/feeds.py
index 1308b8b..1ca69f2 100644
--- a/chicago/feeds.py
+++ b/chicago/feeds.py
@@ -16,11 +16,12 @@ class FacetedSearchFeed(Feed):
description_template = "feeds/search_item_description.html"
bill_model = Bill
- all_results = None
+ results = None
sqs = (
SearchQuerySet()
.facet("bill_type")
- .facet("sponsorships", sort="index")
+ .facet("topics")
+ .facet("sponsorships")
.facet("controlling_body")
.facet("inferred_status")
)
@@ -30,9 +31,9 @@ def url_with_querystring(self, path, **kwargs):
return path + "?" + urllib.parse.urlencode(kwargs)
def get_object(self, request):
- self.queryDict = request.GET
+ self.query = request.GET.urlencode()
- all_results = SearchQuerySet().all()
+ results = self.sqs
facets = None
if "selected_facets" in request.GET:
@@ -40,19 +41,13 @@ def get_object(self, request):
if "q" in request.GET:
self.query = request.GET["q"]
- results = all_results.filter(content=self.query)
-
- if facets:
- for facet in facets:
- (facet_name, facet_value) = facet.split(":")
- facet_name = facet_name.rsplit("_exact")[0]
- results = results.narrow("%s:%s" % (facet_name, facet_value))
- elif facets:
+ results = results.filter(content=self.query)
+
+ if facets:
for facet in facets:
- (facet_name, facet_value) = facet.split(":")
- facet_name = facet_name.rsplit("_exact")[0]
- results = all_results.narrow("%s:%s" % (facet_name, facet_value))
+ results = results.narrow(facet)
+ self.results = results
return results.order_by("-last_action_date")
def title(self, obj):
@@ -63,7 +58,6 @@ def title(self, obj):
+ self.query.capitalize()
+ "'"
)
- # XXX: create a nice title based on all search parameters
else:
title = settings.SITE_META["site_name"] + ": Filtered Search"
@@ -85,8 +79,8 @@ def item_pubdate(self, bill):
def description(self, obj):
return "Bills returned from search"
- def items(self, query):
- l_items = query[:20]
+ def items(self, results):
+ l_items = results[:20]
pks = [i.pk for i in l_items]
bills = self.bill_model.objects.filter(pk__in=pks).order_by("-last_action_date")
return bills
diff --git a/chicago/templates/committee.html b/chicago/templates/committee.html
index c12d7cc..d6a121e 100644
--- a/chicago/templates/committee.html
+++ b/chicago/templates/committee.html
@@ -23,7 +23,7 @@
Committee Members ({{ committee.all_member
{% if committee.recent_events %}
- Committee {{ CITY_VOCAB.EVENTS }}
+ Committee meetings
RSS feed for committee events
diff --git a/chicago/templates/compare_council_members.html b/chicago/templates/compare_council_members.html
index 71e3091..59c3dab 100644
--- a/chicago/templates/compare_council_members.html
+++ b/chicago/templates/compare_council_members.html
@@ -1,15 +1,15 @@
{% extends "base_with_margins.html" %}
{% load static extras %}
-{% block title %}Compare {{CITY_VOCAB.COUNCIL_MEMBERS}}{% endblock %}
+{% block title %}Compare Alders{% endblock %}
{% block content %}
-
Compare {{ CITY_VOCAB.COUNCIL_MEMBERS }}
+
Compare Alders
-
On February 28, 2023, Chicago will hold a municipal election for Mayor, City Clerk, Treasurer and all 50 City Council Seats. See who is retiring and who is running for re-election and compare their attendance and legislative accomplishments.
+
Compare Alders on their tenure, attendance and legislative accomplishments.
Not sure who your Alder is? Look them up by your address >
@@ -19,8 +19,8 @@
Compare {{ CITY_VOCAB.COUNCIL_MEMBERS }}
- {{ CITY_VOCAB.COUNCIL_MEMBER }}
- {{CITY_VOCAB.MUNICIPAL_DISTRICT}}
+ Alder
+ Ward
Years in office
Non-routine bills sponsored
Attendance (this session)
diff --git a/chicago/templates/event.html b/chicago/templates/event.html
index 201b9be..b959fa3 100644
--- a/chicago/templates/event.html
+++ b/chicago/templates/event.html
@@ -4,7 +4,7 @@
{% block content %}
- {{ CITY_VOCAB.EVENTS }}
+ Meetings
{%if event.status == 'cancelled'%}CANCELLED: {% endif %}{{event.name}}
{{event.description}}
diff --git a/chicago/templates/events.html b/chicago/templates/events.html
index 6094171..b0003b6 100644
--- a/chicago/templates/events.html
+++ b/chicago/templates/events.html
@@ -59,7 +59,7 @@
-
What are these {{ CITY_VOCAB.EVENTS | lower}}?
+
What are these meetings?
There are two types of meetings: committee meetings and full city council meetings.
diff --git a/chicago/templates/legislation.html b/chicago/templates/legislation.html
index 67b6cc8..0ccd3d4 100644
--- a/chicago/templates/legislation.html
+++ b/chicago/templates/legislation.html
@@ -61,7 +61,7 @@
Sponsors
{% endif %}
- {{CITY_VOCAB.MUNICIPAL_DISTRICT}}
+ Ward
diff --git a/chicago/templates/partials/committee_person_table.html b/chicago/templates/partials/committee_person_table.html
index 61c832c..8b51705 100644
--- a/chicago/templates/partials/committee_person_table.html
+++ b/chicago/templates/partials/committee_person_table.html
@@ -6,7 +6,7 @@
Committee Member
- {{CITY_VOCAB.MUNICIPAL_DISTRICT}}
+ Ward
Role
diff --git a/chicago/templates/partials/component_upcoming_events.html b/chicago/templates/partials/component_upcoming_events.html
index 0d37f98..88c7c3e 100644
--- a/chicago/templates/partials/component_upcoming_events.html
+++ b/chicago/templates/partials/component_upcoming_events.html
@@ -37,7 +37,7 @@
{% endfor %}
- View All Upcoming {{ CITY_VOCAB.EVENTS }}
+ View All Upcoming Meetings
{% endif %}
diff --git a/chicago/templates/partials/council_member_table.html b/chicago/templates/partials/council_member_table.html
index c46fc53..f047f08 100644
--- a/chicago/templates/partials/council_member_table.html
+++ b/chicago/templates/partials/council_member_table.html
@@ -5,12 +5,8 @@
-
- {{ CITY_VOCAB.COUNCIL_MEMBER }}
-
-
- {{CITY_VOCAB.MUNICIPAL_DISTRICT}}
-
+ Alder
+ Ward
diff --git a/chicago/templates/search/search.html b/chicago/templates/search/search.html
index 7f8fc5d..e332371 100644
--- a/chicago/templates/search/search.html
+++ b/chicago/templates/search/search.html
@@ -2,333 +2,326 @@
{% load extras %}
{% load highlight %}
{% block title %}
- {% if request.GET.q %}
- Search results for '{{ request.GET.q }}'
- {% else %}
- Search Legislation
- {% endif %}
+ {% if request.GET.q %}
+ Search results for '{{ request.GET.q }}'
+ {% else %}
+ Search Legislation
+ {% endif %}
{% endblock %}
{% block content %}
-
-
-
- {% include 'partials/search_header.html' %}
-
-
-
+
+
+
+ {% include 'partials/search_header.html' %}
-
-
+
+
-
- {% with facet_name='sponsorships' facet_label='Sponsor' item_list=facets.fields.sponsorships selected_list=selected_facets.sponsorships %}
- {% include 'partials/search_filter.html' %}
- {% endwith %}
+ {% if selected_facets %}
+
+
+
+ Clear all filters
+
+
+ {% endif %}
+
+ {% with facet_name='inferred_status' facet_label='Status' item_list=facets.fields.inferred_status selected_list=selected_facets.inferred_status %}
+ {% include 'partials/search_filter.html' %}
+ {% endwith %}
-
- {% if facets.fields.legislative_session %}
-
- {% if facets.fields.legislative_session|length > 1 %}
- {% with facet_name='legislative_session' facet_label='Legislative Session' item_list=facets.fields.legislative_session selected_list=selected_facets.legislative_session %}
- {% include 'partials/search_filter.html' %}
- {% endwith %}
+
+ {% with facet_name='bill_type' facet_label='Legislation Type' item_list=facets.fields.bill_type selected_list=selected_facets.bill_type %}
+ {% include 'partials/search_filter.html' %}
+ {% endwith %}
- {% endif %}
- {% endif %}
+
+ {% if facets.fields.topics %}
+ {% with facet_name='topics' facet_label='Topic' item_list=facets.fields.topics selected_list=selected_facets.topics %}
+ {% include 'partials/search_filter.html' %}
+ {% endwith %}
+ {% endif %}
-
-
+
+ {% with facet_name='controlling_body' facet_label='Controlling Body' item_list=facets.fields.controlling_body selected_list=selected_facets.controlling_body %}
+ {% include 'partials/search_filter.html' %}
+ {% endwith %}
-
-
-
-
- Order by:
-
- {% with sort_name='date' order_name='desc' %}
- {% include 'partials/order_by_filter.html' %}
- {% endwith %}
-
- {% with sort_name='title' order_name='asc' %}
- {% include 'partials/order_by_filter.html' %}
- {% endwith %}
-
-
- {% if 'sort_by=relevance' in request.get_full_path or 'order_by=' not in request.get_full_path and 'q=' in request.get_full_path %}
-
- Relevance
-
- {% else %}
-
- Relevance
-
- {% endif %}
-
- {% if 'sort_by' in request.get_full_path %}
-
- Remove
-
-
-
-
- {% endif %}
-
-
-
-
-
- {% if query or selected_facets %}
-
-
-
- {{ paginator.count }} legislation result{{ paginator.count|pluralize }}
- {% if query %}for '{{ request.GET.q }}'{% endif %}
-
-
- {% if query and selected_facets %}
- RSS feed for this search
- {% elif selected_facets %}
- RSS feed for this search
- {% else %}
- RSS feed of all Chicago legislation
- {% endif %}
-
-
-
-
- {% endif %}
- {% for result in object_list %}
+
+ {% with facet_name='sponsorships' facet_label='Sponsor' item_list=facets.fields.sponsorships selected_list=selected_facets.sponsorships %}
+ {% include 'partials/search_filter.html' %}
+ {% endwith %}
-
- {% with r=result %}
- {% include 'partials/search_result.html' %}
- {% endwith %}
+
+ {% if facets.fields.legislative_session %}
+
+ {% if facets.fields.legislative_session|length > 1 %}
+ {% with facet_name='legislative_session' facet_label='Legislative Session' item_list=facets.fields.legislative_session selected_list=selected_facets.legislative_session %}
+ {% include 'partials/search_filter.html' %}
+ {% endwith %}
- {% include 'partials/tags.html' %}
+ {% endif %}
+ {% endif %}
- {% empty %}
- {% include 'partials/empty_search_message.html' %}
- {% endfor %}
-
+
+
- {% if page_obj.has_previous or page_obj.has_next %}
-
-
-
-
-
-
+
+
+
+
+ Order by:
+
+ {% with sort_name='date' order_name='desc' %}
+ {% include 'partials/order_by_filter.html' %}
+ {% endwith %}
+
+ {% with sort_name='title' order_name='asc' %}
+ {% include 'partials/order_by_filter.html' %}
+ {% endwith %}
+
+
+ {% if 'sort_by=relevance' in request.get_full_path or 'order_by=' not in request.get_full_path and 'q=' in request.get_full_path %}
+
+ Relevance
+
+ {% else %}
+
+ Relevance
+
+ {% endif %}
+
+ {% if 'sort_by' in request.get_full_path %}
+
+ Remove
+
+
+
+
+ {% endif %}
+
+
+
+
+
+ {% if query or selected_facets %}
+
+
+
+ {{ paginator.count }} legislation result{{ paginator.count|pluralize }}
+ {% if query %}for '{{ request.GET.q }}'{% endif %}
+
+
+ RSS feed for this search
+
+
+
- {% endif %}
+ {% endif %}
+
+ {% for result in object_list %}
+
+
+
+ {% with r=result %}
+ {% include 'partials/search_result.html' %}
+ {% endwith %}
+
+
+ {% include 'partials/tags.html' %}
+
+
+ {% empty %}
+ {% include 'partials/empty_search_message.html' %}
+ {% endfor %}
+
+
+
+ {% if page_obj.has_previous or page_obj.has_next %}
+
+ {% endif %}
{% endblock %}
{% block extra_js %}
- {{ selected_facets|json_script:"selected-facets" }}
-
+ else {
+ $('#search_message').html(alertMsg);
+ }
+ }
+ )});
+
-
+ });
+
{% endblock %}