header btn target accepts id, navbar optional lang dropdown
This commit is contained in:
parent
b3742ed3f7
commit
b252211a69
6 changed files with 60 additions and 11 deletions
|
|
@ -132,6 +132,10 @@ class DCLNavbarPluginModel(CMSPlugin):
|
|||
related_name="dcl_navbar_logo_dark",
|
||||
)
|
||||
logo_url = models.URLField(max_length=300, null=True, blank=True)
|
||||
language_dropdown = models.BooleanField(
|
||||
default=True,
|
||||
help_text='Select to include the language selection dropdown.'
|
||||
)
|
||||
|
||||
def get_logo_dark(self):
|
||||
# used only if atleast one logo exists
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.9.4 on 2018-03-19 20:46
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('datacenterlight', '0013_dclnavbarpluginmodel'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='dclnavbarpluginmodel',
|
||||
name='language_dropdown',
|
||||
field=models.BooleanField(default=True, help_text='Select to include the language selection dropdown.'),
|
||||
),
|
||||
]
|
||||
|
|
@ -27,13 +27,15 @@
|
|||
{% render_plugin plugin %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
<li>
|
||||
{% if LANGUAGE_CODE == 'en-us'%}
|
||||
<a class="on-hover-border" href="{% change_lang 'de' %}">Deutsch <i class="fa fa-globe" aria-hidden="true"></i></a>
|
||||
{% else %}
|
||||
<a class="on-hover-border" href="{% change_lang 'en-us' %}">English <i class="fa fa-globe" aria-hidden="true"></i></a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% if instance.language_dropdown %}
|
||||
<li>
|
||||
{% if LANGUAGE_CODE == 'en-us'%}
|
||||
<a class="on-hover-border" href="{% change_lang 'de' %}">Deutsch <i class="fa fa-globe" aria-hidden="true"></i></a>
|
||||
{% else %}
|
||||
<a class="on-hover-border" href="{% change_lang 'en-us' %}">English <i class="fa fa-globe" aria-hidden="true"></i></a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if not request.user.is_authenticated %}
|
||||
<li>
|
||||
<a href="{% url 'hosting:login' %}">{% trans "Login" %} <span class="fa fa-sign-in"></span></a>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue