|
@@ -1,7 +1,7 @@
|
|
{% load wagtailcore_tags %}
|
|
{% load wagtailcore_tags %}
|
|
|
|
|
|
<a href="{{self.downloadable_file.url}}" download="{{self.downloadable_file.url}}"
|
|
<a href="{{self.downloadable_file.url}}" download="{{self.downloadable_file.url}}"
|
|
- {% if settings.coderedcms.AnalyticsSettings.ga_track_button_clicks and not format == 'amp' %}
|
|
|
|
|
|
+ {% if settings.coderedcms.AnalyticsSettings.ga_track_button_clicks %}
|
|
data-ga-event-category='{{self.settings.ga_tracking_event_category|default:"Download"}}'
|
|
data-ga-event-category='{{self.settings.ga_tracking_event_category|default:"Download"}}'
|
|
data-ga-event-label='{{self.settings.ga_tracking_event_label|default:self.button_title}}'
|
|
data-ga-event-label='{{self.settings.ga_tracking_event_label|default:self.button_title}}'
|
|
{% endif %}
|
|
{% endif %}
|
|
@@ -15,10 +15,10 @@
|
|
{% endif %}
|
|
{% endif %}
|
|
</a>
|
|
</a>
|
|
|
|
|
|
-{% if self.automatic_download and not format == 'amp' %}
|
|
|
|
|
|
+{% if self.automatic_download %}
|
|
<script>
|
|
<script>
|
|
$(document).ready(function(){
|
|
$(document).ready(function(){
|
|
window.open("{{self.downloadable_file.url}}", '_blank');
|
|
window.open("{{self.downloadable_file.url}}", '_blank');
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|
|
-{% endif %}
|
|
|
|
|
|
+{% endif %}
|