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

add download button to filter list UIs #895

Merged
merged 8 commits into from Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion hawc/apps/animal/templates/animal/endpoint_list.html
Expand Up @@ -3,7 +3,14 @@
{% load bs4 %}

{% block content %}
<h2>Assessment endpoints ({{page_obj.paginator.count}} found)</h2>
<div class="d-flex mb-2">
<h2 class="mb-0">Assessment endpoints ({{page_obj.paginator.count}} found)</h2>
{% if feature_flags.ENABLE_FILTER_DOWNLOADS and page_obj.paginator.count > 0 %}
{% actions %}
<a class="dropdown-item" href="#"><i class="fa fa-fw fa-download mr-1"></i>Download (xlsx)</a>
{% endactions %}
{% endif %}
</div>
{% include 'common/inline_filter_form.html' %}
<table id="mainTbl" class="table table-sm table-striped">
{% bs4_colgroup '12,14,15,24,7,7,7,7,7' %}
Expand Down
9 changes: 8 additions & 1 deletion hawc/apps/eco/templates/eco/result_list.html
Expand Up @@ -3,7 +3,14 @@
{% load bs4 split %}

{% block content %}
<h2>Results ({{page_obj.paginator.count}} found)</h2>
<div class="d-flex mb-2">
<h2 class="mb-0">Results ({{page_obj.paginator.count}} found)</h2>
{% if feature_flags.ENABLE_FILTER_DOWNLOADS and page_obj.paginator.count > 0 %}
{% actions %}
<a class="dropdown-item" href="#"><i class="fa fa-fw fa-download mr-1"></i>Download (xlsx)</a>
{% endactions %}
{% endif %}
</div>
{% include 'common/inline_filter_form.html' %}
<table class="table table-sm table-striped">
{% bs4_colgroup '15,10,10,10,15,15,10,15' %}
Expand Down
9 changes: 8 additions & 1 deletion hawc/apps/epi/templates/epi/outcome_list.html
Expand Up @@ -3,7 +3,14 @@
{% load bs4 %}

{% block content %}
<h2>Outcomes ({{page_obj.paginator.count}} found)</h2>
<div class="d-flex mb-2">
<h2 class="mb-0">Outcomes ({{page_obj.paginator.count}} found)</h2>
{% if feature_flags.ENABLE_FILTER_DOWNLOADS and page_obj.paginator.count > 0 %}
{% actions %}
<a class="dropdown-item" href="#"><i class="fa fa-fw fa-download mr-1"></i>Download (xlsx)</a>
{% endactions %}
{% endif %}
</div>
{% include 'common/inline_filter_form.html' %}
<table id="mainTbl" class="table table-sm table-striped">
{% bs4_colgroup '17,20,17,18,14,14' %}
Expand Down
9 changes: 8 additions & 1 deletion hawc/apps/epimeta/templates/epimeta/metaresult_list.html
Expand Up @@ -3,7 +3,14 @@
{% load bs4 %}

{% block content %}
<h2>Meta-analysis/pooled results ({{page_obj.paginator.count}} found)</h2>
<div class="d-flex mb-2">
<h2 class="mb-0">Meta-analysis/pooled results ({{page_obj.paginator.count}} found)</h2>
{% if feature_flags.ENABLE_FILTER_DOWNLOADS and page_obj.paginator.count > 0 %}
{% actions %}
<a class="dropdown-item" href="#"><i class="fa fa-fw fa-download mr-1"></i>Download (xlsx)</a>
{% endactions %}
{% endif %}
</div>
{% include 'common/inline_filter_form.html' %}
<table id="mainTbl" class="table table-sm table-striped">
{% bs4_colgroup '13,17,19,14,13,12,12' %}
Expand Down
9 changes: 8 additions & 1 deletion hawc/apps/epiv2/templates/epiv2/outcome_list.html
Expand Up @@ -3,7 +3,14 @@
{% load bs4 %}

{% block content %}
<h2>Outcomes ({{page_obj.paginator.count}} found)</h2>
<div class="d-flex mb-2">
<h2 class="mb-0">Outcomes ({{page_obj.paginator.count}} found)</h2>
{% if feature_flags.ENABLE_FILTER_DOWNLOADS and page_obj.paginator.count > 0 %}
{% actions %}
<a class="dropdown-item" href="#"><i class="fa fa-fw fa-download mr-1"></i>Download (xlsx)</a>
{% endactions %}
{% endif %}
</div>
{% include 'common/inline_filter_form.html' %}
<table class="table table-sm table-striped">
{% bs4_colgroup '25,25,25,25' %}
Expand Down
9 changes: 8 additions & 1 deletion hawc/apps/invitro/templates/invitro/ivendpoint_list.html
Expand Up @@ -3,7 +3,14 @@
{% load bs4 %}

{% block content %}
<h2><i>In vitro</i> endpoints ({{page_obj.paginator.count}} found)</h2>
<div class="d-flex mb-2">
<h2 class="mb-0"><i>In vitro</i> endpoints ({{page_obj.paginator.count}} found)</h2>
{% if feature_flags.ENABLE_FILTER_DOWNLOADS and page_obj.paginator.count > 0 %}
{% actions %}
<a class="dropdown-item" href="#"><i class="fa fa-fw fa-download mr-1"></i>Download (xlsx)</a>
{% endactions %}
{% endif %}
</div>
{% include 'common/inline_filter_form.html' %}
<table id="mainTbl" class="table table-sm table-striped">
{% bs4_colgroup '10,13,12,20,16,13,8,8' %}
Expand Down
11 changes: 10 additions & 1 deletion hawc/apps/lit/templates/lit/reference_search.html
@@ -1,7 +1,16 @@
{% extends 'assessment-rooted.html' %}

{% load bs4 %}

{% block content %}
<h2>References ({{page_obj.paginator.count}} found)</h2>
<div class="d-flex mb-2">
<h2 class="mb-0">References ({{page_obj.paginator.count}} found)</h2>
{% if feature_flags.ENABLE_FILTER_DOWNLOADS and page_obj.paginator.count > 0 %}
{% actions %}
<a class="dropdown-item" href="#"><i class="fa fa-fw fa-download mr-1"></i>Download (xlsx)</a>
{% endactions %}
{% endif %}
</div>
{% include 'common/inline_filter_form.html' %}
<div id="main"></div>
{% include 'includes/paginator.html' with plural_object_name='references' %}
Expand Down
2 changes: 0 additions & 2 deletions hawc/apps/lit/views.py
Expand Up @@ -652,8 +652,6 @@ def get_filterset_form_kwargs(self):
},
)

paginate_by = 50

def get_queryset(self):
return (
super()
Expand Down
1 change: 1 addition & 0 deletions hawc/constants.py
Expand Up @@ -17,6 +17,7 @@ class FeatureFlags(BaseModel):
ANONYMOUS_ACCOUNT_CREATION: bool = True
ENABLE_BMDS_33 = False
ENABLE_PLOTLY_VISUAL: bool = False
ENABLE_FILTER_DOWNLOADS: bool = False
ENABLE_UDF: bool = False

@classmethod
Expand Down