diff --git a/opentech/apply/funds/templates/funds/submissions.html b/opentech/apply/funds/templates/funds/submissions.html index 0e8cab60a03244d7c70b6be112490bc6367222d9..6c9d4af28674db314d01bf61dd7dccbc7e1d3119 100644 --- a/opentech/apply/funds/templates/funds/submissions.html +++ b/opentech/apply/funds/templates/funds/submissions.html @@ -11,6 +11,7 @@ <h5>Track and explore recent submissions</h5> </div> {% endblock %} + {% include "funds/includes/search.html" %} </div> </div> @@ -23,7 +24,6 @@ <a href="#" class="js-open-feed link link--open-feed"> <h4 class="heading heading--no-margin heading--activity-feed">Activity Feed</h4> </a> -| {% include "funds/includes/activity-feed.html" %} {% endblock %} diff --git a/opentech/apply/funds/views.py b/opentech/apply/funds/views.py index f21e1b74a14bedf5584a8a2e06d245961bafed80..043ae8c9fc573a9bc86984a39938fd9571cac2e2 100644 --- a/opentech/apply/funds/views.py +++ b/opentech/apply/funds/views.py @@ -87,27 +87,26 @@ class SubmissionsByRound(BaseAdminSubmissionsTable): @method_decorator(staff_required, name='dispatch') -class SubmissionSearchView(SingleTableMixin, FilterView): +class SubmissionSearchView(BaseAdminSubmissionsTable): template_name = 'funds/submissions_search.html' - table_class = AdminSubmissionsTable filterset_class = SubmissionFilterAndSearch - def get_queryset(self): - return self.filterset_class._meta.model.objects.current().for_table(self.request.user) - def get_context_data(self, **kwargs): + kwargs = super().get_context_data(**kwargs,) + search_term = self.request.GET.get('query') # We have more data than just 'query' active_filters = len(self.filterset.data) > 1 - return super().get_context_data( + kwargs.update( search_term=search_term, active_filters=active_filters, - **kwargs, ) + return kwargs + @method_decorator(staff_required, name='dispatch') class ProgressSubmissionView(DelegatedViewMixin, UpdateView):