Closed saemideluxe closed 2 years ago
Done as in this PR #110
Moved from Test to Development because I got some comments from @saemideluxe to adjust the BrowseView's search.
I have almost completed the default search box for BrowseView. However, I still encounter a problem distinguishing between the general search input box one and one that might appear in other places (like a navigation bar).
We can technically apply this solution though it might look ugly in practice. Or maybe we should temporarily remove the default value based on the GET queries.
Okay for now
For the person browse overview we use a special SearchBackendConfig. This is good and should not change. However, the bread.views.BrowseView actually supports filtering via a URL parameter ("q" by default). This is currently not used anywhere.
We need to add support so that any browse view can have a simple default search.
BrowseView.get_queryset
has the filtering via djangoql implemented, this should be reused. We need to implement a configuration parameter so that a default SearchBackendConfig can be used for any viewAn example use case would be the report browse view. Right now there is no way to search for the name of a report. After this is implemented, the report view should have a search-bar (via SearchConfigBackend) which allows to search by name. The browse view for reports should only need a small additional parameter to enable that search bar.
Important: This functionality should not use the
resultcontainerid
ofbread.layout.components.search.Search
but work via URL-queries and page reloads. It might be a bit challenging to implement this so that both ways work.