Skip to content

Commit

Permalink
Make mapped csvs downloadable for processor from the UI
Browse files Browse the repository at this point in the history
  • Loading branch information
sal-uva committed Aug 28, 2024
1 parent 8652ba2 commit 2ab9e86
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 2 additions & 0 deletions webtool/static/css/dataset-page.css
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ article.result > section:first-child {
}

.child-wrapper .button-wrap.processor-result-indicator a {
display: inline-block;
color: inherit;
}

Expand All @@ -340,6 +341,7 @@ article.result > section:first-child {
}

.child-wrapper .button-wrap .byline {
cursor: default;
font-size: 0.8em;
}

Expand Down
9 changes: 3 additions & 6 deletions webtool/templates/components/result-child.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,23 @@

<div class="button-object">

{% if item.is_finished() and not is_filtered %}<a href="{{ url_for('get_result', query_file=item.result_file) }}">{% endif %}
<span class="headline">
{% if item.is_finished() and not is_filtered %}<a href="{{ url_for('get_result', query_file=item.result_file) }}">{% endif %}
{% if item.is_finished() and is_filtered and "copied_to" in item.parameters %}<a href="{{ url_for('show_result', key=item.parameters.copied_to) }}">{% endif %}
{% if is_filtered %}
<i class="fa fa-filter" aria-hidden="true"></i> <span class="sr-only">Filter</span>
{% elif item.is_finished() and item.num_rows > 0 %}
<i class="fa fa-download" aria-hidden="true"></i> <span class="sr-only">Download</span> {{ processors[item.type].extension if item.type in processors else "" }}, {{ item.get_results_path()|filesize_short }}
{% if item.get_own_processor().map_item and item.get_extension() != "csv" %}<a href="{{ url_for('get_mapped_result', key=item.key) }}"><i class="fa fa-download" aria-hidden="true"></i> <span class="sr-only">Download</span> csv</a>
{% endif %}
<a href="{{ url_for('get_result', query_file=item.result_file) }}"><i class="fa fa-download" aria-hidden="true"></i> <span class="sr-only">Download</span> {{ processors[item.type].extension if item.type in processors else "" }}, {{ item.get_results_path()|filesize_short }}</a>
{% elif item.is_finished() %}
<i class="fa fa-skull" aria-hidden="true"></i>
{% elif "queued" in item.status|lower %}
<i class="fa fa-hourglass-half" aria-hidden="true"></i>
{% else %}
<i class="fa fa-spin fa-sync-alt" aria-hidden="true"></i>
{% endif %}
{% if item.is_finished() and ("copied_to" in item.parameters or not is_filtered) %}</a>{% endif %}
</span>
<span class="byline">
{% if item.is_finished() and not is_filtered %}<a href="{{ url_for('get_result', query_file=item.result_file) }}">{% endif %}
{% if item.is_finished() and is_filtered and "copied_to" in item.parameters %}<a href="{{ url_for('show_result', key=item.parameters.copied_to) }}">{% endif %}
{% if item.is_finished() and item.num_rows >= 0 %}
{% if is_filtered and "copied_to" in item.parameters %}
Expand All @@ -52,7 +50,6 @@
</span>
<span class="queue-notice"></span>

{% if item.is_finished() and not is_filtered %}</a>{% endif %}
</div>
</div>

Expand Down

0 comments on commit 2ab9e86

Please sign in to comment.