Skip to content
This repository has been archived by the owner on Apr 5, 2019. It is now read-only.

Commit

Permalink
Merge pull request #72 from pitzer/google_sheets_export
Browse files Browse the repository at this point in the history
Google Sheets export for form data
  • Loading branch information
jnm committed Aug 24, 2015
2 parents 7523e65 + 0e28c2f commit 8847f0c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 13 additions & 3 deletions templates/export_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ <h1>{{ export_type_name|upper }} {% blocktrans %}Exports{% endblocktrans %}</h1>
<span style='float:middle;'>
<div>
<input type="submit" class="btn btn-primary" value="{% trans 'New Export' %}" />
{% if export_type == 'xls' or export_type == 'csv' %}
{% if export_type == 'xls' or export_type == 'csv' or export_type == 'gsheets' %}
<a href="#advanced-export-modal" role="button" class="btn" data-toggle="modal">{% trans "Advanced Export" %}</a>
{% endif %}
</div>
Expand Down Expand Up @@ -61,9 +61,19 @@ <h3>{% trans "Advanced Export" %}</h3>
<option value="/" selected>/ ({% trans "Slash" %})</option>
</select>
<label class="checkbox">
<input type="checkbox" name="options[dont_split_select_multiples]" value="yes" />
{% trans "DONT split select multiple choice answers into separate columns" %}
<input type="checkbox" name="options[split_select_multiples]" />
{% trans "Split select multiple choice answers into separate columns" %}
</label>
{% if export_type == 'gsheets' %}
<label class="checkbox">
<input type="checkbox" name="options[flatten_repeated_fields]" />
{% trans "Flatten repeated groups into a single worksheet." %}
</label>
<label class="checkbox">
<input type="checkbox" name="options[export_xlsform]" />
{% trans "Export the XLSForm along with the survey data." %}
</label>
{% endif %}
</div>
{% endif %}
<div class="modal-footer">
Expand Down
2 changes: 1 addition & 1 deletion templates/show.html
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ <h2 class="dashboard__group-label">
<a href="{% url "onadata.apps.viewer.views.export_list" content_user.username xform.id_string 'xls' %}" class="download__drop-button">XLS</a>
<a href="{% url "onadata.apps.viewer.views.export_list" content_user.username xform.id_string 'csv' %}" class="download__drop-button">CSV</a>
<a href="{% url "onadata.apps.viewer.views.export_list" content_user.username xform.id_string 'zip' %}" class="download__drop-button">ZIP</a>
<!-- <a href="{% url "onadata.apps.viewer.views.export_list" content_user.username xform.id_string 'gdoc' %}" class="download__drop-button">GDOCS</a> -->
<a href="{% url "onadata.apps.viewer.views.export_list" content_user.username xform.id_string 'gsheets' %}" class="download__drop-button">Google Sheets</a>
<a href="{% url "onadata.apps.viewer.views.export_list" content_user.username xform.id_string 'kml'%}" class="download__drop-button">KML</a>
<a href="{% url "onadata.apps.logger.views.download_excel_analyser" content_user.username xform.id_string %}" class="download__drop-button">Excel Analyser</a>
<!-- a href="{% url "onadata.apps.viewer.views.export_list" content_user.username xform.id_string 'sav_zip' %}" class="download__drop-button">SAV ZIP</a> -->
Expand Down

0 comments on commit 8847f0c

Please sign in to comment.