Skip to content

Commit

Permalink
Merge pull request #168 from dtws/rdiscrowd-483-misaligned-export-dat…
Browse files Browse the repository at this point in the history
…a-fix

Rdiscrowd 483 misaligned export data fix
  • Loading branch information
dtws authored and fiorda committed Feb 2, 2018
2 parents f3f6ce0 + e4ebd73 commit 5b71fab
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions templates/projects/export.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,57 @@
<div class="col-md-12 text-center">
<h3>{{_('Export in CSV format')}}</h3>
</div>
<div class="col-md-6">
<div class="col-md-4">
{% if n_tasks != 0 %}
{{ render_project_card_option(project, upload_method, title=_('Tasks'), explanation=_('Export tasks in CSV format'), link=url_for('project.export_to', short_name=project.short_name, type='task', format='csv'), link_action_text=_('Export'), download=True, nofollow=True)}}
{{ render_project_card_option(project, upload_method, title=_('Tasks'), explanation=_('Export tasks in CSV format'), link=url_for('project.export_to', short_name=project.short_name, type='task', format='csv', expanded='False'), link_action_text=_('Export'), download=True, nofollow=True)}}
{% else %}
{{ render_project_card_option(project, upload_method, title=_('Tasks'), explanation=_('Export tasks in CSV format'), link="#", link_action_text=_('Export'), download=True, nofollow=True, link_class="disabled")}}
{% endif %}
</div>
<div class="col-md-6">
<div class="col-md-4">
{% if n_task_runs != 0 %}

{{ render_project_card_option(project, upload_method, title=_('Task Runs'), explanation=_('Export task runs in CSV format'), link=url_for('project.export_to', short_name=project.short_name, type='task_run', format='csv'), link_action_text=_('Export'), download=True, nofollow=True)}}
{{ render_project_card_option(project, upload_method, title=_('Task Runs'), explanation=_('Export task runs in CSV format'), link=url_for('project.export_to', short_name=project.short_name, type='task_run', format='csv', expanded='False'), link_action_text=_('Export'), download=True, nofollow=True)}}
{% else %}
{{ render_project_card_option(project, upload_method, title=_('Task Runs'), explanation=_('Export task runs in CSV format'), link="#", link_action_text=_('Export'), download=True, nofollow=True, link_class="disabled")}}
{% endif %}
</div>
<div class="col-md-4">
{% if n_task_runs != 0 %}

{{ render_project_card_option(project, upload_method, title=_('Task Runs with Metadata'), explanation=_('Export task runs with metadata in CSV format'), link=url_for('project.export_to', short_name=project.short_name, type='task_run', format='csv', expanded='True'), link_action_text=_('Export'), download=True, nofollow=True)}}
{% else %}
{{ render_project_card_option(project, upload_method, title=_('Task Runs with Metadata'), explanation=_('Export task runs with metadata in CSV format'), link="#", link_action_text=_('Export'), download=True, nofollow=True, link_class="disabled")}}
{% endif %}
</div>
</div>
<div id="json" class="row">
<div class="col-md-12 text-center">
<h3>{{_('Export in JSON format')}}</h3>
</div>
<div class="col-md-6">
<div class="col-md-4">
{% if n_tasks != 0 %}
{{ render_project_card_option(project, upload_method, title=_('Tasks'), explanation=_('Export tasks in JSON format'), link=url_for('project.export_to', short_name=project.short_name, type='task', format='json'), link_action_text=_('Export'), download=True, nofollow=True)}}
{{ render_project_card_option(project, upload_method, title=_('Tasks'), explanation=_('Export tasks in JSON format'), link=url_for('project.export_to', short_name=project.short_name, type='task', format='json', expanded='False'), link_action_text=_('Export'), download=True, nofollow=True)}}
{% else %}
{{ render_project_card_option(project, upload_method, title=_('Tasks'), explanation=_('Export tasks in JSON format'), link="#", link_action_text=_('Export'), download=True, nofollow=True, link_class="disabled")}}
{% endif %}
</div>
<div class="col-md-6">
<div class="col-md-4">
{% if n_task_runs != 0 %}

{{ render_project_card_option(project, upload_method, title=_('Task Runs'), explanation=_('Export task runs in JSON format'), link=url_for('project.export_to', short_name=project.short_name, type='task_run', format='json'), link_action_text=_('Export'), download=True, nofollow=True)}}
{{ render_project_card_option(project, upload_method, title=_('Task Runs'), explanation=_('Export task runs in JSON format'), link=url_for('project.export_to', short_name=project.short_name, type='task_run', format='json', expanded='False'), link_action_text=_('Export'), download=True, nofollow=True)}}
{% else %}
{{ render_project_card_option(project, upload_method, title=_('Task Runs'), explanation=_('Export task runs in JSON format'), link="#", link_action_text=_('Export'), download=True, nofollow=True, link_class="disabled")}}
{% endif %}
</div>
<div class="col-md-4">
{% if n_task_runs != 0 %}

{{ render_project_card_option(project, upload_method, title=_('Task Runs with Metadata'), explanation=_('Export task runs with metadata in JSON format'), link=url_for('project.export_to', short_name=project.short_name, type='task_run', format='json', expanded='True'), link_action_text=_('Export'), download=True, nofollow=True)}}
{% else %}
{{ render_project_card_option(project, upload_method, title=_('Task Runs with Metadata'), explanation=_('Export task runs with metadata in JSON format'), link="#", link_action_text=_('Export'), download=True, nofollow=True, link_class="disabled")}}
{% endif %}
</div>

</div>
{% endif %}
Expand Down

0 comments on commit 5b71fab

Please sign in to comment.