Skip to content

Commit

Permalink
improved bill views and breadcrumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
longhotsummer committed Nov 21, 2024
1 parent e7b6466 commit 2011be3
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
18 changes: 18 additions & 0 deletions peachjam/templates/peachjam/bill_detail.html
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
{% extends 'peachjam/layouts/document_detail.html' %}
{% load i18n %}
{% block breadcrumbs %}
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="{% url 'home_page' %}">{% trans 'Home' %}</a>
</li>
<li class="breadcrumb-item">
<a href="{% url 'bill_list' %}">{% trans 'Bills' %}</a>
</li>
{% if document.locality %}
<li class="breadcrumb-item">
<a href="{% url 'place_bill_list' document.locality.place_code %}">{{ document.locality.name }}</a>
</li>
{% endif %}
</ol>
</nav>
{% endblock %}
1 change: 0 additions & 1 deletion peachjam/templates/peachjam/place_bill_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<li class="breadcrumb-item">
<a href="{% url 'bill_list' %}">{% trans 'Bills' %}</a>
</li>
<li class="breadcrumb-item active" aria-current="page">{{ place.name }}</li>
</ol>
</nav>
</div>
Expand Down
12 changes: 12 additions & 0 deletions peachjam/views/bills.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ def get_base_queryset(self, *args, **kwargs):
qs = qs.filter(jurisdiction=juri, locality=None)
return qs

def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)

context["doc_table_show_doc_type"] = False
context["doc_table_show_court"] = False
context["doc_table_show_author"] = False
context["doc_table_show_jurisdiction"] = False

del context["facet_data"]["natures"]

return context


class PlaceBillListView(BillListView):
template_name = "peachjam/place_bill_list.html"
Expand Down

0 comments on commit 2011be3

Please sign in to comment.