From c6ff268feda9c580c7e4705c0afafca5be1f28aa Mon Sep 17 00:00:00 2001
From: David Schmitz <schmitz@lrz.de>
Date: Mon, 14 Aug 2023 14:07:41 +0000
Subject: [PATCH] BRANDING: extent with possibility to override short product
 name in error page etc.

---
 flowspy/settings.py.dist                              | 1 +
 templates/500.html                                    | 3 ++-
 templates/base.html                                   | 2 +-
 templates/django_registration/activation_complete.txt | 2 +-
 templates/flowspy/route_details.html                  | 2 +-
 5 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/flowspy/settings.py.dist b/flowspy/settings.py.dist
index 84c981e5..8f9f5144 100644
--- a/flowspy/settings.py.dist
+++ b/flowspy/settings.py.dist
@@ -255,6 +255,7 @@ BRANDING = {
     'favicon': 'favicon.ico',
     'contact_support': 'GÉANT OC at <a href=\'mailto:support@oc.geant.net\'>support@oc.geant.net</a> or +44 1223 733033.',
     'product_name' : 'Firewall-On-Demand',
+    'product_name_short' : 'FoD',
 }
 
 SETTINGS_EXPORT = [
diff --git a/templates/500.html b/templates/500.html
index d3ca5880..fdc9d1db 100644
--- a/templates/500.html
+++ b/templates/500.html
@@ -2,7 +2,8 @@
 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
 
 
-<title>GEANT's FoD</title>
+<!--<title>GEANT's FoD</title>-->
+<title>{{ settings.BRANDING.name }}'s {{ settings.BRANDING.product_name_short|default:'FoD' }}</title>
 <meta http-equiv="Pragma" content="no-cache">
 <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
 
diff --git a/templates/base.html b/templates/base.html
index 16576cd9..70a11e02 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -6,7 +6,7 @@
 <head>
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <title>{{ settings.BRANDING.name }} FoD :: {% block title %}{% endblock %}</title>
+    <title>{{ settings.BRANDING.name }} {{ settings.BRANDING.product_name_short|default:'FoD' }} :: {% block title %}{% endblock %}</title>
 	<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
 	<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
 	<link REL="SHORTCUT ICON" HREF="{% get_static_prefix %}/{{ settings.BRANDING.favicon }}">
diff --git a/templates/django_registration/activation_complete.txt b/templates/django_registration/activation_complete.txt
index dbd905fe..a0264478 100644
--- a/templates/django_registration/activation_complete.txt
+++ b/templates/django_registration/activation_complete.txt
@@ -1,6 +1,6 @@
 Your account with username {{ user.username }} has been activated.
 
-You may login to FoD using the following URL:
+You may login to {{ settings.BRANDING.product_name_short|default:'FoD' }} using the following URL:
 
 http://{{ site.domain }}{% url 'login' %}
 
diff --git a/templates/flowspy/route_details.html b/templates/flowspy/route_details.html
index 17f7e303..f8a0450e 100644
--- a/templates/flowspy/route_details.html
+++ b/templates/flowspy/route_details.html
@@ -84,7 +84,7 @@ function myreloadPage() {
                {% endif %}
              </div>
              {% endif %}
-	     <br> FoD Rule Id: {{ route.id }}
+	     <br> {{ settings.BRANDING.product_name_short|default:'FoD' }} Rule Id: {{ route.id }}
         </div>
         <div>
             <h2>Statistics</h2>
-- 
GitLab