]> git.parisson.com Git - mezzo.git/commitdiff
Factorizing share buttons
authorPhilippe Barbosa <contact@philippebarbosa.com>
Mon, 4 Apr 2016 15:56:24 +0000 (17:56 +0200)
committerPhilippe Barbosa <contact@philippebarbosa.com>
Mon, 4 Apr 2016 15:56:24 +0000 (17:56 +0200)
app/templates/agenda/event_detail.html
app/templates/includes/share_buttons.html [new file with mode: 0644]

index d267aae3107abde111cc3ac31598e7099ed60c1f..767ea5f95596fc80f72c5cee8267b104694cc09a 100644 (file)
 
 {% block event_detail_sharebuttons %}
 {% set_short_url_for event %}
-<div class="share__button">
-    <a class="btn btn-facebook" target="_blank" href="http://facebook.com/sharer.php?u={{ request.build_absolute_uri }}&amp;t={{ event.title|urlencode }}">{% trans "Share on Facebook" %}</a>
-    <a class="btn btn-twitter" target="_blank" href="http://twitter.com/home?status={{ event.short_url|urlencode }}%20{{ event.title|urlencode }}">{% trans "Share on Twitter" %}</a>
-</div>
+    {% include "includes/share_buttons.html" %}
 {% endblock %}
 
 {% if event.location %}
diff --git a/app/templates/includes/share_buttons.html b/app/templates/includes/share_buttons.html
new file mode 100644 (file)
index 0000000..7f4c441
--- /dev/null
@@ -0,0 +1,8 @@
+{% load i18n %}
+
+<div class="share__button">
+    <a class="btn btn-facebook" target="_blank" href="http://facebook.com/sharer.php?u={{ request.build_absolute_uri }}&amp;t={{ event.title|urlencode }}">{% trans "Share on Facebook" %}</a>
+    <a class="btn btn-twitter" target="_blank" href="http://twitter.com/home?status={{ event.short_url|urlencode }}%20{{ event.title|urlencode }}">{% trans "Share on Twitter" %}</a>
+    <a class="btn btn-email" target="_blank" href="mailto:?subject=SUBJECT TEXT HERE&amp;body=TEXT HERE URL">{% trans "Share by email" %}</a>
+    <a class="btn btn-print" href="javascript:window.print()">{% trans "Print this page" %}</a>
+</div>
\ No newline at end of file