add ability to disabled minidashboard
diff --git a/planetstack/core/context_processors.py b/planetstack/core/context_processors.py
new file mode 100644
index 0000000..839316f
--- /dev/null
+++ b/planetstack/core/context_processors.py
@@ -0,0 +1,6 @@
+from django.conf import settings
+
+print dir(settings)
+
+def planetstack(request):
+ return {"DISABLE_MINIDASHBOARD": settings.DISABLE_MINIDASHBOARD}
diff --git a/planetstack/planetstack/settings.py b/planetstack/planetstack/settings.py
index 63af805..1f01e96 100644
--- a/planetstack/planetstack/settings.py
+++ b/planetstack/planetstack/settings.py
@@ -154,6 +154,7 @@
# Added for django-suit form
TEMPLATE_CONTEXT_PROCESSORS = TCP + (
'django.core.context_processors.request',
+ 'core.context_processors.planetstack',
)
# Django Suit configuration example
@@ -249,3 +250,5 @@
}
BIGQUERY_TABLE = getattr(config, "bigquery_table", "demoevents")
+
+DISABLE_MINIDASHBOARD = getattr(config, "gui_disable_minidashboard", False)
diff --git a/planetstack/templates/admin/newminidashboard.html b/planetstack/templates/admin/newminidashboard.html
index 5baa126..de70feb 100644
--- a/planetstack/templates/admin/newminidashboard.html
+++ b/planetstack/templates/admin/newminidashboard.html
@@ -1,3 +1,5 @@
+{% if not DISABLE_MINIDASHBOARD %}
+
<div id="newMiniDashboard">
<div class="hide" id="selectedMainNav">{{ opts.verbose_name_plural|capfirst }}</div>
<div class="hide" id="currentOriginalNode">{{ original|truncatewords:"18" }}</div>
@@ -66,3 +68,4 @@
</script>
+{% endif %}