Show spreadsheet before template if there’s errors

It’s easier to work out what the errors are in your file if you can
see the big red error message right next to the contents of your file.

When users get errors they tend to go back and forth between the error
message and the view of the file, not the message and the template
preview.
This commit is contained in:
Chris Hill-Scott
2017-05-19 08:16:41 +01:00
parent eb7b8631b6
commit cc2e0fd1cb

View File

@@ -150,7 +150,9 @@
{% endif %}
{{ template|string }}
{% if not errors %}
{{ template|string }}
{% endif %}
<div class="bottom-gutter-3-2">
{% if errors %}
@@ -234,4 +236,9 @@
</p>
{% endif %}
{% if errors %}
<h2 class="heading-medium">Preview of {{ template.name }}</h2>
{{ template|string }}
{% endif %}
{% endblock %}