diff options
author | zsloan | 2020-04-01 16:13:41 -0500 |
---|---|---|
committer | zsloan | 2020-04-01 16:13:41 -0500 |
commit | 61786e5e95f500c774943adac3dce99907d2c4a4 (patch) | |
tree | 2a0d7c227082a7af1d57d9f606d13a8cf8b1fdfa | |
parent | bba892fc0ec1ecba21d5a6ba54392c247cbc2518 (diff) | |
download | genenetwork2-61786e5e95f500c774943adac3dce99907d2c4a4.tar.gz |
Forgot to rearrange search result page buttons in previous commit, plus fixed an issue where .csv was missing from some filenames
-rw-r--r-- | wqflask/wqflask/templates/correlation_page.html | 2 | ||||
-rw-r--r-- | wqflask/wqflask/templates/search_result_page.html | 16 | ||||
-rw-r--r-- | wqflask/wqflask/views.py | 2 |
3 files changed, 11 insertions, 9 deletions
diff --git a/wqflask/wqflask/templates/correlation_page.html b/wqflask/wqflask/templates/correlation_page.html index 829c5c29..9a259c2d 100644 --- a/wqflask/wqflask/templates/correlation_page.html +++ b/wqflask/wqflask/templates/correlation_page.html @@ -78,7 +78,7 @@ <button class="btn btn-default" id="add" disabled><span class="glyphicon glyphicon-plus-sign"></span> Add</button> <input type="hidden" name="database_name" id="database_name" value="None"> <input type="hidden" name="export_data" id="export_data" value=""> - <input type="hidden" name="file_name" id="file_name" value="{{ this_trait.name }}_{{ dataset.name }}_correlation.csv"> + <input type="hidden" name="file_name" id="file_name" value="{{ this_trait.name }}_{{ dataset.name }}_correlation"> <button class="btn btn-default" id="export_traits">Download CSV</button> <input type="text" id="searchbox" class="form-control" style="width: 200px; display: inline;" placeholder="Search Table For ..."> <input type="text" id="select_top" class="form-control" style="width: 200px; display: inline;" placeholder="Select Top ..."> diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html index 6fc19be1..22d8de50 100644 --- a/wqflask/wqflask/templates/search_result_page.html +++ b/wqflask/wqflask/templates/search_result_page.html @@ -112,12 +112,6 @@ <div> <br /> - <button class="btn btn-default" id="select_all"><span class="glyphicon glyphicon-ok"></span> Select</button> - <button class="btn btn-default" id="deselect_all"><span class="glyphicon glyphicon-remove"></span> Deselect</button> - <button class="btn btn-default" id="invert"><span class="glyphicon glyphicon-resize-vertical"></span> Invert</button> - <button class="btn btn-default" id="add" disabled><span class="glyphicon glyphicon-plus-sign"></span> Add</button> - <input type="text" id="searchbox" class="form-control" style="width: 200px; display: inline;" placeholder="Search This Table For ..."> - <input type="text" id="select_top" class="form-control" style="width: 200px; display: inline;" placeholder="Select Top ..."> <form id="export_form" method="POST" action="/export_traits_csv" style="display: inline;"> <input type="hidden" name="headers" id="headers" value="{% for field in header_fields %}{{ field }},{% endfor %}"> <input type="hidden" name="search_string" id="search_string" value="{{ original_search_string }}"> @@ -128,10 +122,18 @@ <input type="hidden" name="accession_id" id="accession_id" value="{{ dataset.accession_id }}"> {% endif %} <input type="hidden" name="export_data" id="export_data" value=""> - <button class="btn btn-default" id="export_traits">Download</button> + <button class="btn btn-default" id="select_all"><span class="glyphicon glyphicon-ok"></span> Select</button> + <button class="btn btn-default" id="add" disabled><span class="glyphicon glyphicon-plus-sign"></span> Add</button> + <button class="btn btn-default" id="export_traits">Download CSV</button> + <input type="text" id="searchbox" class="form-control" style="width: 200px; display: inline;" placeholder="Search This Table For ..."> + <input type="text" id="select_top" class="form-control" style="width: 200px; display: inline;" placeholder="Select Top ..."> + <button class="btn btn-default" id="deselect_all"><span class="glyphicon glyphicon-remove"></span> Deselect</button> </form> <br /> <br /> + <div style="margin-bottom: 5px;"> + <b>Show/Hide Columns:</b> + </div> <div id="table_container"> <table class="table-hover table-striped cell-border" id='trait_table' style="float: left;"> <tbody> diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index c4a1b85c..0fbe370d 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -381,7 +381,7 @@ def export_traits_csv(): return Response(csv_data, mimetype='text/csv', - headers={"Content-Disposition":"attachment;filename=" + file_name}) + headers={"Content-Disposition":"attachment;filename=" + file_name + ".csv"}) @app.route('/export_perm_data', methods=('POST',)) def export_perm_data(): |