Fix Download button showing when not logged in

This commit is contained in:
2017-09-17 19:00:11 +02:00
parent 7d48c02fa3
commit 4e153413d9

View File

@@ -36,7 +36,7 @@
span Public span Public
| {% endif %} | {% endif %}
| {% if node.file %} | {% if node.file and node.file.link %}
li.download li.download
| {% if node.properties.content_type == 'video' %} | {% if node.properties.content_type == 'video' %}
| {% if node.file_variations %} | {% if node.file_variations %}
@@ -63,6 +63,7 @@
| {% endfor %} | {% endfor %}
| {% endif %} | {% endif %}
| {% else %} | {% else %}
li.download
a( a(
title="Download {{ node.properties.content_type | undertitle }}", title="Download {{ node.properties.content_type | undertitle }}",
href="{{ node.file.link }}", href="{{ node.file.link }}",
@@ -73,6 +74,7 @@
| {% endif %} | {% endif %}
| {% else %} | {% else %}
li.download
a.btn( a.btn(
title="Login to download {{ node.properties.content_type | undertitle }}", title="Login to download {{ node.properties.content_type | undertitle }}",
href="{{ url_for('users.login') }}") href="{{ url_for('users.login') }}")