Skip to content

Commit

Permalink
changes order for tablet and publication filters (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
csae8092 authored Nov 20, 2024
1 parent 07c61b0 commit 9aaaffd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
13 changes: 10 additions & 3 deletions archiv/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,17 @@ def custom_filtering(self, queryset, name, value):
url="archiv-ac:bibliography-autocomplete",
),
)
publication_name = django_filters.CharFilter(
publication_name = (
django_filters.CharFilter(
lookup_expr="icontains",
help_text=Tablet._meta.get_field("publication_name").help_text,
label=Tablet._meta.get_field("publication_name").verbose_name,
),
)
text_number = django_filters.CharFilter(
lookup_expr="icontains",
help_text=Tablet._meta.get_field("publication_name").help_text,
label=Tablet._meta.get_field("publication_name").verbose_name,
help_text=Tablet._meta.get_field("text_number").help_text,
label=Tablet._meta.get_field("text_number").verbose_name,
)
period = django_filters.CharFilter(
lookup_expr="icontains",
Expand Down
6 changes: 3 additions & 3 deletions archiv/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ def __init__(self, *args, **kwargs):
"author",
"publication_year",
"title",
"short_title",
css_id="basic_search_fields",
),
BS5Accordion(
AccordionGroup(
"Advanced search",
"short_title",
"volume_nr",
"pages",
"journal",
Expand Down Expand Up @@ -188,6 +188,8 @@ def __init__(self, *args, **kwargs):
self.layout = Layout(
Fieldset(
"",
"publication_name",
"text_number",
"museum_id",
"cdli_no",
css_id="basic_search_fields",
Expand All @@ -204,8 +206,6 @@ def __init__(self, *args, **kwargs):
"transliteration",
"archiv",
"mentioned_in_pub",
"publication_name",
"text_number",
"period",
"day",
"month",
Expand Down

0 comments on commit 9aaaffd

Please sign in to comment.