Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion qiita_pet/templates/sitebase.html
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ <h6>
<a href="#" data-toggle="dropdown" class="dropdown-toggle">Downloads<b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="{% raw qiita_config.portal_dir %}/release/download/public">
<a type="button" data-toggle="modal" data-target=".qiita_pet_dwnld_confirm">
Public BIOM and metadata files
<small>
<br/><b>MD5:</b> {{public_md5}}
Expand All @@ -570,6 +570,33 @@ <h6>
</div>
</div> <!--/.main nav-bar -->

<div class="modal fade qiita_pet_dwnld_confirm" tabindex="-1" role="dialog" aria-labelledby="Confirm download">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">File really big.</h4>
</div>
<div class="modal-body">
<p>The file you're trying to download is really big. Would you like to proceed?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">No</button>
<button type="button" class="btn btn-success" id="qiita_dwnld_accept">Yes</button>
</div>
<!-- href="{% raw qiita_config.portal_dir %}/release/download/public" -->
</div>
</div>
</div>

<script type="text/javascript">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this piece of javascript be moved up with the rest of the JavaScript in this page? Thanks!

$('#qiita_dwnld_accept').click(function(e){
e.preventDefault();
$('.qiita_pet_dwnld_confirm').modal('hide');
window.location.href = '{% raw qiita_config.portal_dir %}/release/download/public';
});
</script>


{% if message != '' %}
{% if level not in {'danger', 'success', 'info', 'warning'} %}
Expand Down
15 changes: 0 additions & 15 deletions qiita_pet/test/test_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,21 +161,6 @@ def test_download_study(self):
response = self.get('/download_study_bioms/1')
self.assertEqual(response.code, 200)
exp = (
'- 1256812 /protected/processed_data/1_study_1001_closed_'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why has this being deleted? I'd to fix this recently by adding this, so I'm surprised now that it needs to be removed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those lines had a conflict between the master and dev branches, which I fixed by deleting them. BTW the tests are passing.

'reference_otu_table.biom processed_data/1_study_1001_closed_'
'reference_otu_table.biom\n'
'- 36615 /protected/templates/1_prep_1_qiime_[0-9]*-'
'[0-9]*.txt mapping_files/4_mapping_file.txt\n'
'- 1256812 /protected/processed_data/'
'1_study_1001_closed_reference_otu_table.biom processed_data/'
'1_study_1001_closed_reference_otu_table.biom\n'
'- 36615 /protected/templates/1_prep_1_qiime_[0-9]*-'
'[0-9]*.txt mapping_files/5_mapping_file.txt\n'
'- 1256812 /protected/processed_data/'
'1_study_1001_closed_reference_otu_table_Silva.biom processed_data'
'/1_study_1001_closed_reference_otu_table_Silva.biom\n'
'- 36615 /protected/templates/1_prep_1_qiime_[0-9]*-'
'[0-9]*.txt mapping_files/6_mapping_file.txt\n'
'- [0-9]* /protected/BIOM/{0}/otu_table.biom '
'BIOM/{0}/otu_table.biom\n'
'- 1 /protected/BIOM/{0}/sortmerna_picked_otus/seqs_otus.log '
Expand Down