Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paginated legislation listing #1901

Merged
merged 50 commits into from
Jul 18, 2024
Merged
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
e800fc0
adds paginated legislation listing
actlikewill Jul 9, 2024
754a0b4
adds children dropdown
actlikewill Jul 12, 2024
dadf2d8
changes liiweb legislation template
actlikewill Jul 12, 2024
2a07642
uses htmx for facets
actlikewill Jul 12, 2024
2ade5bc
bring legislation features into base _document_table
longhotsummer Jul 15, 2024
8ecb05a
caret and collapse for children
longhotsummer Jul 15, 2024
05520ad
grouping
longhotsummer Jul 15, 2024
6ef34ca
Merge pull request #1904 from laws-africa/doc-table
actlikewill Jul 15, 2024
5bacb67
common grouping mechanism for courts
longhotsummer Jul 15, 2024
df6219b
fix latest_expression_only for legislation view
longhotsummer Jul 15, 2024
8440f35
htmx included in app.ts
longhotsummer Jul 15, 2024
1816f3d
Merge pull request #1905 from laws-africa/grouping
longhotsummer Jul 15, 2024
6c6cbb2
sorting for document filter table
longhotsummer Jul 15, 2024
2dc98f2
doc-table sorting
longhotsummer Jul 15, 2024
1bf4be9
sort is possible with alphabet filter
longhotsummer Jul 15, 2024
77c1872
adds facet values
actlikewill Jul 15, 2024
c5a42e5
Merge branch 'listing' into sort
longhotsummer Jul 15, 2024
0751fbd
sorting
longhotsummer Jul 15, 2024
10e9e4e
fix tests
longhotsummer Jul 16, 2024
749fbba
Merge pull request #1906 from laws-africa/sort
longhotsummer Jul 16, 2024
b5b36e2
adds _document_table_form; updates court facets
actlikewill Jul 16, 2024
d54de55
fix filtering; don't duplicate form; progress bar
longhotsummer Jul 16, 2024
a9a96c3
unify document listing layouts; search beside doc count
longhotsummer Jul 16, 2024
765405c
intcomma for doc counts
longhotsummer Jul 16, 2024
c278969
default sorting
longhotsummer Jul 16, 2024
8c4a8d5
fix sorting bug
longhotsummer Jul 16, 2024
0cb5a7a
Merge pull request #1907 from laws-africa/tweaks
longhotsummer Jul 16, 2024
dbe13b6
make help_link easier to set
longhotsummer Jul 16, 2024
acfaa66
adds facet clear
actlikewill Jul 16, 2024
c3fdd81
set default sort
longhotsummer Jul 16, 2024
ac648da
spacing on mobile
longhotsummer Jul 16, 2024
a9c4c14
make offcanvas filters work
longhotsummer Jul 16, 2024
f8f4881
move filters back and forth
longhotsummer Jul 16, 2024
6790de6
adds support for taxonomies
actlikewill Jul 16, 2024
3f6b421
Merge pull request #1908 from laws-africa/offcanvas
longhotsummer Jul 16, 2024
114c767
fixes heading template
actlikewill Jul 16, 2024
eafdb8b
adds distinct for judges and attorneys filters
actlikewill Jul 16, 2024
f487acb
lawlibrary legislation notice
longhotsummer Jul 16, 2024
5120661
prefetch labels
longhotsummer Jul 16, 2024
162445d
simplify prefetch for legislation
longhotsummer Jul 16, 2024
d055402
uses get_queryset method to calculate facets
actlikewill Jul 16, 2024
6917286
adds get variant queryset
actlikewill Jul 16, 2024
a07a22a
adds repealed legislation warning
actlikewill Jul 17, 2024
97cd21e
prefetch labels
longhotsummer Jul 17, 2024
19eabff
fix ES-based listing views
longhotsummer Jul 17, 2024
81dd89d
extracted strings for translation
longhotsummer Jul 17, 2024
ccd6c7b
adds doc index facets; clear all button
actlikewill Jul 17, 2024
3a6b266
hide filter controls in pocketlaw
longhotsummer Jul 17, 2024
5463a38
guard against htmx race conditions
longhotsummer Jul 18, 2024
1b11d49
translation
longhotsummer Jul 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions peachjam/views/generic_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def add_facets(self, context):
natures = list(
doc_n
for doc_n in self.form.filter_queryset(
self.get_base_queryset(), exclude="natures"
self.get_queryset(), exclude="natures"
actlikewill marked this conversation as resolved.
Show resolved Hide resolved
)
.order_by()
.values_list("nature__name", flat=True)
Expand All @@ -153,7 +153,7 @@ def add_facets(self, context):
authors = list(
a
for a in self.form.filter_queryset(
self.get_base_queryset(), exclude="authors"
self.get_queryset(), exclude="authors"
)
.order_by()
.values_list("authors__name", flat=True)
Expand All @@ -162,13 +162,13 @@ def add_facets(self, context):
)

years = list(
self.form.filter_queryset(self.get_base_queryset(), exclude="years")
self.form.filter_queryset(self.get_queryset(), exclude="years")
.order_by()
.values_list("date__year", flat=True)
.distinct()
)
taxonomies = list(
self.form.filter_queryset(self.get_base_queryset(), exclude="taxonomies")
self.form.filter_queryset(self.get_queryset(), exclude="taxonomies")
.filter(taxonomies__topic__isnull=False)
.order_by()
.values_list("taxonomies__topic__name", flat=True)
Expand Down
Loading