Hide the instructions for formatting a CSV

> On the send pages, we have a call to action in the middle of the
> page with lots of words and placeholder buttony looking things
> above and below it....
>
> You'll also see this every time you use this page, even though you
> probably get it after a single use.
>
> So let's wrap it up under a usefully titled (?) help link that
> expands to reveal all the things.

This commit implements the above.

It also rewords the messaging to talk about various spreadsheet formats,
not just CSV.
This commit is contained in:
Chris Hill-Scott
2016-05-17 09:18:23 +01:00
parent e20ce561e9
commit c6ab4d2c94
2 changed files with 43 additions and 34 deletions

View File

@@ -61,11 +61,11 @@ a {
} }
> .grid-row { > .grid-row {
.heading-large { .heading-large {
margin-top: $gutter; margin-top: $gutter;
} }
} }
} }
@@ -104,7 +104,7 @@ td {
#footer { #footer {
.footer-categories { .footer-categories {
@extend %site-width-container; @extend %site-width-container;
&-wrapper { &-wrapper {
@@ -148,3 +148,8 @@ a[rel='external'] {
} }
} }
details summary {
text-decoration: underline;
margin-bottom: $gutter-half;
}

View File

@@ -35,44 +35,48 @@
<div class="page-footer bottom-gutter"> <div class="page-footer bottom-gutter">
{{file_upload( {{file_upload(
form.file, form.file,
button_text='Upload a .csv file', button_text='Upload a file of recipients',
alternate_link=url_for(".send_test", service_id=current_service.id, template_id=template.id), alternate_link=url_for(".send_test", service_id=current_service.id, template_id=template.id),
alternate_link_text='send yourself a test' alternate_link_text='send yourself a test'
)}} )}}
</div> </div>
<h2 class="heading-medium" style="margin: 45px 0 15px 0"> <details>
Example file <summary>How to format your file</summary>
</h2>
{% call(item, row_number) list_table( <ul class="list list-bullet">
example, <li>
caption="Example", put one recipient per row
caption_visible=False, </li>
field_headings=['1'] + [ <li>
'<span class="placeholder">{}</span>'.format(recipient_column)|safe save or export your data as a
] + template.placeholders_as_markup|list <acronym title="Comma Separated Values">CSV</acronym>,
) %} <acronym title="Comma Separated Values">TSV</acronym>,
{{ index_field(row_number) }} Open Document Spreadsheet (.ods)
{% for column in item %} or Microsoft Excel (.xls, .xlsx, .xlsm) file
{{ text_field(column) }} </li>
{% endfor %} </ul>
{% endcall %}
<p class="table-show-more-link"> <h2 class="heading-small">
<a href="{{ url_for('.get_example_csv', service_id=current_service.id, template_id=template.id) }}">Download this example</a> Example file
</p> </h2>
<h2 class="heading-medium"> {% call(item, row_number) list_table(
Formatting example,
</h2> caption="Example",
<ul class="list list-bullet"> caption_visible=False,
<li> field_headings=['1'] + [
put one recipient per row '<span class="placeholder">{}</span>'.format(recipient_column)|safe
</li> ] + template.placeholders_as_markup|list
<li> ) %}
save or export your data as a .csv (comma separated values) file {{ index_field(row_number) }}
</li> {% for column in item %}
</ul> {{ text_field(column) }}
{% endfor %}
{% endcall %}
<p class="table-show-more-link">
<a href="{{ url_for('.get_example_csv', service_id=current_service.id, template_id=template.id) }}">Download this example</a>
</p>
</details>
{% endblock %} {% endblock %}