From dd0756ba297d8ad67f659c498f8232f3f1001272 Mon Sep 17 00:00:00 2001
From: HanseGucker <hansegucker@gmail.com>
Date: Wed, 19 Sep 2018 19:59:23 +0200
Subject: [PATCH] Add print button

---
 .../timetable/templates/timetable/substitution.html | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/schoolapps/timetable/templates/timetable/substitution.html b/schoolapps/timetable/templates/timetable/substitution.html
index e166d606e..46c946c1b 100755
--- a/schoolapps/timetable/templates/timetable/substitution.html
+++ b/schoolapps/timetable/templates/timetable/substitution.html
@@ -3,7 +3,6 @@
 <script type="text/javascript">
     function updateDatepicker() {
         $("#date").val(formatDate(activeDate));
-
     }
 
     function update() {
@@ -28,6 +27,11 @@
         $("#date-before").click(onDateBeforeClick);
         $("#date-next").click(onDateNextClick);
 
+        // Print the site
+        $("#print").click(function () {
+            window.print();
+        });
+
         update();
     })
 </script>
@@ -52,6 +56,13 @@
                 </a>
             </div>
         </div>
+        <div class="col l4 xl6">
+        </div>
+        <div class="col s12 m6 l4 xl3 right align-right">
+            <a class="waves-effect waves-teal btn-flat btn-flat-medium right" id="print">
+                <i class="material-icons center">print</i>
+            </a>
+        </div>
     </div>
 
     <p class="flow-text">
-- 
GitLab