Permalink
Browse files

only showing export chart link if phantomjs is configured

  • Loading branch information...
1 parent a5a36c4 commit a32edd1a1b023cea9fd0f81ac3d615680986490d @gka gka committed Dec 18, 2012
Showing with 20 additions and 12 deletions.
  1. +11 −7 config.template.yaml
  2. +9 −5 templates/chart-publish.twig
View
@@ -4,29 +4,33 @@
domain: datawrapper.de
chart_domain: c.datawrapper.de
-# show debug message?
+## show debug message?
debug: true
-# some default values
+## some default values
default_theme: default
default_vis: bar-chart
-# thumbnail sizes [width, height]
+## thumbnail sizes [width, height]
thumbnails:
s: [150, 150]
m: [260, 170]
-# email address for admin
+## email address for admin
admin_email: hello@datawrapper.de
log_email: debug@datawrapper.de
-# analytics
+## analytics module
analytics:
type: Piwik
config:
url: piwik.datawrapper.de # without http:// and trailing slash
idSite: 5
-# uncomment this if your Datawrapper is locked behind HTTP Authentication
-# http_auth: username:password
+## uncomment this if your Datawrapper is locked behind HTTP Authentication
+# http_auth: username:password
+
+## uncomment to enable chart exporting
+# phantomjs:
+# path: /path/to/phantomjs
@@ -174,15 +174,19 @@ p.lead {
<p class="lead">{%trans "Other things to do" %}</p>
+ {% if exportStaticImage %}
<p>
<a role="button" href="#export">
<i class="icon-print"></i>&nbsp;&nbsp;{% trans "Export to static image for printing" %}
</a>
-
</p>
+ {% endif %}
-
- <p><a class="submit duplicate" role="button"><i class="icon-plus"></i>&nbsp;&nbsp;{% trans "Duplicate this chart" %}</a></p>
+ <p>
+ <a class="submit duplicate" role="button">
+ <i class="icon-plus"></i>&nbsp;&nbsp;{% trans "Duplicate this chart" %}
+ </a>
+ </p>
<p class="lead">{% trans "Show in Gallery" %}</p>
@@ -373,8 +377,8 @@ $(function() {
</div>
</div>
</div>
- <p>{% trans "The exported chart will be send to your email address once it has been created. This will take approximately %n minutes." %}</p>
-
+ <p>{{ "The exported chart will be send to your email address once it has been created. This will take approximately %n minute(s)." | trans | replace({'%n': estExportTime }) }}</p>
+
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">{% trans "Cancel" %}</button>

0 comments on commit a32edd1

Please sign in to comment.