From 3b6e5d448b62f89e65ab762d9b4d2ba959169690 Mon Sep 17 00:00:00 2001 From: PCoder Date: Tue, 24 Dec 2019 09:06:17 +0530 Subject: [PATCH 1/6] Add show non transparent navbar always option --- datacenterlight/cms_models.py | 5 +++++ ...odel_show_non_transparent_navbar_always.py | 20 +++++++++++++++++++ .../templates/datacenterlight/cms/navbar.html | 2 +- .../datacenterlight/includes/_navbar.html | 2 +- 4 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 datacenterlight/migrations/0030_dclnavbarpluginmodel_show_non_transparent_navbar_always.py diff --git a/datacenterlight/cms_models.py b/datacenterlight/cms_models.py index 2d1a98b5..d1c5c259 100644 --- a/datacenterlight/cms_models.py +++ b/datacenterlight/cms_models.py @@ -184,6 +184,11 @@ class DCLNavbarPluginModel(CMSPlugin): default=True, help_text='Uncheck this if you do not want to show login/dashboard.' ) + show_non_transparent_navbar_always = models.BooleanField( + default=False, + help_text='Check this if you want to show non transparent navbar only.' + '(Useful when we want to setup a simple page)' + ) def get_logo_dark(self): # used only if atleast one logo exists diff --git a/datacenterlight/migrations/0030_dclnavbarpluginmodel_show_non_transparent_navbar_always.py b/datacenterlight/migrations/0030_dclnavbarpluginmodel_show_non_transparent_navbar_always.py new file mode 100644 index 00000000..f3e3ec09 --- /dev/null +++ b/datacenterlight/migrations/0030_dclnavbarpluginmodel_show_non_transparent_navbar_always.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2019-12-24 03:34 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('datacenterlight', '0029_auto_20190420_1022'), + ] + + operations = [ + migrations.AddField( + model_name='dclnavbarpluginmodel', + name='show_non_transparent_navbar_always', + field=models.BooleanField(default=False, help_text='Check this if you want to show non transparent navbar only.(Useful when we want to setup a simple page)'), + ), + ] diff --git a/datacenterlight/templates/datacenterlight/cms/navbar.html b/datacenterlight/templates/datacenterlight/cms/navbar.html index 886a5009..8000ec54 100644 --- a/datacenterlight/templates/datacenterlight/cms/navbar.html +++ b/datacenterlight/templates/datacenterlight/cms/navbar.html @@ -1,7 +1,7 @@ {% load static i18n custom_tags cms_tags %} {% get_current_language as LANGUAGE_CODE %} -