Skip to content

Commit

Permalink
fix in keyword filter, added author to spatialcoverage filter
Browse files Browse the repository at this point in the history
  • Loading branch information
csae8092 committed Jul 20, 2021
1 parent 66c0c20 commit 9720704
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions archiv/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ class SpatialCoverageListFilter(django_filters.FilterSet):
url="archiv-ac:stelle-autocomplete",
)
)
stelle__text__autor = django_filters.ModelMultipleChoiceFilter(
queryset=Autor.objects.all(),
help_text="Related Authors",
label="Author",
widget=autocomplete.Select2Multiple(
url="archiv-ac:autor-autocomplete",
)
)

class Meta:
model = SpatialCoverage
Expand Down
1 change: 1 addition & 0 deletions archiv/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def __init__(self, *args, **kwargs):
'id',
'key_word',
'stelle',
'stelle__text__autor',
css_id="basic_search_fields"
),
)
Expand Down
1 change: 1 addition & 0 deletions archiv/templates/archiv/keyword_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -279,4 +279,5 @@ <h4>{{ error_msg|safe }}</h4>

</script>
<script src="{% static 'archiv/js/set-form-attributes.js' %}"></script>
<script src="{% static 'archiv/js/filter-for-blank-fields.js' %}"></script>
{% endblock scripts2 %}

0 comments on commit 9720704

Please sign in to comment.