From 00675b11e60ad9a568aba775ab3e56bf6abd0ba0 Mon Sep 17 00:00:00 2001
From: Hanne Moa <hanne.moa@uninett.no>
Date: Tue, 25 Oct 2016 14:18:58 +0200
Subject: [PATCH] Load clipboard-support, if turned on

Note that the flag in the context must be named 'clipboard',
not 'clipboard.js'. This is because the dot is an illegal symbol in
variable names in twig.
---
 templates/base.twig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/templates/base.twig b/templates/base.twig
index bdce5e018..c97e51c7d 100644
--- a/templates/base.twig
+++ b/templates/base.twig
@@ -28,5 +28,8 @@
 
     <!-- postload javascript -->
     <script type="text/javascript" src="/{{ baseurlpath }}resources/script.js"></script>
+    {% if clipboard %}
+    <script type="text/javascript" src="/{{ baseurlpath }}resources/clipboard.min.js"></script>
+    {% endif %}
     {% block postload %}{% endblock %}
 </body></html>
-- 
GitLab