make branding configurable in xos_config
diff --git a/xos/core/context_processors.py b/xos/core/context_processors.py
index 5933352..d9e7d85 100644
--- a/xos/core/context_processors.py
+++ b/xos/core/context_processors.py
@@ -11,4 +11,6 @@
"allowNewUsers": allowNewUsers} )
return {"DISABLE_MINIDASHBOARD": settings.DISABLE_MINIDASHBOARD,
+ "XOS_BRANDING_NAME": settings.XOS_BRANDING_NAME,
+ "XOS_BRANDING_CSS": settings.XOS_BRANDING_CSS,
"sites": allSites}
diff --git a/xos/templates/admin/base.html b/xos/templates/admin/base.html
index 8327522..74699c5 100644
--- a/xos/templates/admin/base.html
+++ b/xos/templates/admin/base.html
@@ -6,6 +6,9 @@
<link rel="stylesheet" type="text/css" href="{% static 'suit/bootstrap/css/bootstrap.min.css' %}" media="all"/>
<link rel="stylesheet" type="text/css" href="{% static 'suit/css/suit.css' %}" media="all">
<link rel="stylesheet" type="text/css" href="{% static 'xos.css' %}" media="all">
+ {% if XOS_BRANDING_CSS %}
+ <link rel="stylesheet" type="text/css" href="{{ XOS_BRANDING_CSS }}">
+ {% endif %}
{% block extrastyle %}{% endblock %}
{% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% static "admin/css/rtl.css" %}{% endblock %}"/>{% endif %}
<script type="text/javascript">window.__admin_media_prefix__ = "{% filter escapejs %}{% static "admin/" %}{% endfilter %}";</script>
diff --git a/xos/templates/admin/base_site.html b/xos/templates/admin/base_site.html
index 9a23a04..29c757c 100644
--- a/xos/templates/admin/base_site.html
+++ b/xos/templates/admin/base_site.html
@@ -47,7 +47,7 @@
{# Footer branding name (center) #}
{% block footer_branding %}
-OpenCloud
+{{ XOS_BRANDING_NAME }}
{% endblock %}
diff --git a/xos/templates/admin/dashboard/dashboard_base.html b/xos/templates/admin/dashboard/dashboard_base.html
index 976362f..1f54938 100644
--- a/xos/templates/admin/dashboard/dashboard_base.html
+++ b/xos/templates/admin/dashboard/dashboard_base.html
@@ -6,6 +6,9 @@
<link rel="stylesheet" type="text/css" href="{% static 'suit/css/suit.css' %}" media="all">
<link rel="stylesheet" type="text/css" href="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.0/css/jquery.dataTables_themeroller.css">
<link rel="stylesheet" type="text/css" href="{% static 'xos.css' %}" media="all">
+{% if XOS_BRANDING_CSS %}
+ <link rel="stylesheet" type="text/css" href="{{ XOS_BRANDING_CSS }}">
+{% endif %}
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js"></script>
diff --git a/xos/templates/admin/login.html b/xos/templates/admin/login.html
index 85ae8b3..da44628 100644
--- a/xos/templates/admin/login.html
+++ b/xos/templates/admin/login.html
@@ -4,6 +4,9 @@
{% block extrastyle %}{{ block.super }}
<link rel="stylesheet" type="text/css" href="/static/suit/bootstrap/css/bootstrap.min.css" media="all"/>
<link rel="stylesheet" type="text/css" href="{% static "xos.css" %}" />
+{% if XOS_BRANDING_CSS %}
+ <link rel="stylesheet" type="text/css" href="{{ XOS_BRANDING_CSS }}">
+{% endif %}
<script src="{% static 'suit/js/jquery-1.9.1.min.js' %}"></script>
<script src="http://code.jquery.com/ui/1.11.0/jquery-ui.js"></script>
{% endblock %}
diff --git a/xos/xos/settings.py b/xos/xos/settings.py
index 2a7faa3..b8a4e56 100644
--- a/xos/xos/settings.py
+++ b/xos/xos/settings.py
@@ -172,7 +172,7 @@
# Django Suit configuration example
SUIT_CONFIG = {
# header
- 'ADMIN_NAME': 'OpenCloud',
+ 'ADMIN_NAME': getattr(config, "gui_branding_name", "OpenCloud"),
# 'HEADER_DATE_FORMAT': 'l, j. F Y',
# 'HEADER_TIME_FORMAT': 'H:i',
@@ -265,6 +265,9 @@
BIGQUERY_TABLE = getattr(config, "bigquery_table", "demoevents")
+XOS_BRANDING_NAME = getattr(config, "gui_branding_name", "OpenCloud")
+XOS_BRANDING_CSS = getattr(config, "gui_branding_css", None)
+
DISABLE_MINIDASHBOARD = getattr(config, "gui_disable_minidashboard", False)
ENCRYPTED_FIELDS_KEYDIR = XOS_DIR + '/private_keys'
ENCRYPTED_FIELD_MODE = 'ENCRYPT'
diff --git a/xos/xos_config b/xos/xos_config
index eaae50e..dba4a2e 100644
--- a/xos/xos_config
+++ b/xos/xos_config
@@ -37,3 +37,8 @@
images_directory=/opt/xos/images
dependency_graph=/opt/xos/model-deps
logfile=/var/log/xos_backend.log
+
+[gui]
+disable_minidashboard=True
+#branding_name=CORD
+#branding_css=/static/cord.css