From 87393b85299efeb2f08c0b07600fcbfe24639f5f Mon Sep 17 00:00:00 2001
From: Adarnof
Date: Tue, 5 Jan 2016 23:56:27 +0000
Subject: [PATCH] Variable forum/killboard/media urls on index #140 - only
rendered if set, otherwise link removed
---
alliance_auth/settings.py.example | 9 +++++++++
stock/templates/public/index.html | 33 ++++++++++++++++++++-----------
util/context_processors.py | 2 ++
3 files changed, 32 insertions(+), 12 deletions(-)
diff --git a/alliance_auth/settings.py.example b/alliance_auth/settings.py.example
index 3d77e872..7d402b56 100755
--- a/alliance_auth/settings.py.example
+++ b/alliance_auth/settings.py.example
@@ -188,6 +188,15 @@ EMAIL_HOST_USER = os.environ.get('AA_EMAIL_HOST_USER', '')
EMAIL_HOST_PASSWORD = os.environ.get('AA_EMAIL_HOST_PASSWORD', '')
EMAIL_USE_TLS = 'True' == os.environ.get('AA_EMAIL_USE_TLS', 'True')
+####################
+# Front Page Links
+####################
+# KILLBOARD_URL - URL for your killboard. Blank to hide link
+# MEDIA_URL - URL for your media page (youtube etc). Blank to hide link
+####################
+KILLBOARD_URL = os.environ.get('AA_KILLBOARD_URL', DOMAIN + '/killboard')
+MEDIA_URL = os.environ.get('AA_MEDIA_URL', '')
+
#########################
# Default Group Settings
#########################
diff --git a/stock/templates/public/index.html b/stock/templates/public/index.html
index 76821d67..039b7523 100644
--- a/stock/templates/public/index.html
+++ b/stock/templates/public/index.html
@@ -52,18 +52,27 @@
-
-
-
-
-
-
-
-
-
-
-
-
+ {% if FORUM_URL %}
+
+
+
+
+
+ {% endif %}
+ {% if KILLBOARD_URL %}
+
+
+
+
+
+ {% endif %}
+ {% if MEDIA_URL %}
+
+
+
+
+
+ {% endif %}