From 9b83e8fbc3f32f5853b00dd8f26da0abedd32ea2 Mon Sep 17 00:00:00 2001
From: ArtOfCode- <hello@artofcode.co.uk>
Date: Tue, 12 May 2020 14:39:07 +0100
Subject: [PATCH] Add chat links

---
 app/views/layouts/_sidebar.html.erb | 14 ++++++++++++++
 db/seeds/site_settings.yml          |  7 +++++++
 2 files changed, 21 insertions(+)

diff --git a/app/views/layouts/_sidebar.html.erb b/app/views/layouts/_sidebar.html.erb
index 935899a1e..5ddcf1b4c 100644
--- a/app/views/layouts/_sidebar.html.erb
+++ b/app/views/layouts/_sidebar.html.erb
@@ -59,4 +59,18 @@
       </p>
     </div>
   </div>
+
+  <% chat = SiteSetting['ChatLink'] %>
+  <% if chat.present? %>
+    <div class="widget has-margin-4">
+      <div class="widget--header">
+        Chat
+      </div>
+      <div class="widget--body">
+        <p>
+          <%= link_to 'Join us in chat!', chat %>
+        </p>
+      </div>
+    </div>
+  <% end %>
 </div>
\ No newline at end of file
diff --git a/db/seeds/site_settings.yml b/db/seeds/site_settings.yml
index 9e6a61aa6..eeddd795c 100644
--- a/db/seeds/site_settings.yml
+++ b/db/seeds/site_settings.yml
@@ -235,3 +235,10 @@
   category: Integrations
   description: >
     Site ID for this community in your Matomo analytics instance.
+
+- name: ChatLink
+  value: ~
+  value_type: string
+  category: Integrations
+  description: >
+    Link to your chat platform of choice.
-- 
GitLab