oduwsdl / hypercane

A toolkit for developing algorithms that sample mementos from a web archive collection.

Home Page:https://oduwsdl.github.io/hypercane

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Replace Hypercane GUI's Download button

shawnmjones opened this issue · comments

Wooey has a confusing setup with respect to Downloads. We should replace the Download button with something that allows the user to download the file generated by the given action.

We can force a download rather than a browser render by adding the download attribute to an a tag. I'm not sure how to do this to a button, but I think the buttons in Wooey are largely decorative rather than true button tags.

The download button in the template is here:

<div class="btn-group status-completed-toggle">
<a href="{{ job_info.archives.0.url }}" role="button" class="btn btn-primary">
<span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span> {% trans "Download" %}
</a>
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<span class="caret"></span>
<span class="sr-only">{% trans "Toggle Dropdown" %}</span>
</button>
<ul class="dropdown-menu" role="menu">
{% for archive in job_info.archives %}
<li><a href="{{ archive.url }}"><span class="glyphicon glyphicon-compressed"></span> {% if archive.url|endswith:"zip" %}.zip{% else %}.tar.gz{% endif %}</a></li>
{% endfor %}
</ul>
</div>

The download file represented should match the action that was invoked. Note how the dropdown does not match in the case of synthesize.

image

There is no output option specific to filter either.

image


There is no file to download for order.

image

The issue with "order" was fixed as part of #43.

The issue with filter has been fixed.

From a review at Monday's meeting, there is still an issue with the Download button for the report action.

This is fixed now. I think there was an environment issue.

image