forked from enviPath/enviPy
Download Pathway Functionality (#38)
Co-authored-by: Tim Lorsbach <tim@lorsba.ch> Reviewed-on: enviPath/enviPy#38
This commit is contained in:
35
templates/modals/objects/download_pathway_modal.html
Normal file
35
templates/modals/objects/download_pathway_modal.html
Normal file
@ -0,0 +1,35 @@
|
||||
{% load static %}
|
||||
<!-- Download Pathway -->
|
||||
<div id="download_pathway_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Download Pathway</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
By clicking on Download the Pathway will be converted into a CSV and directly downloaded.
|
||||
<form id="download-pathway-modal-form" accept-charset="UTF-8" action="{{ pathway.url }}"
|
||||
data-remote="true" method="GET">
|
||||
<input type="hidden" name="download" value="true"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="download-pathway-modal-submit">Download</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
$('#download-pathway-modal-submit').click(function (e) {
|
||||
e.preventDefault();
|
||||
$('#download-pathway-modal-form').submit();
|
||||
});
|
||||
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user