facebook and youtube url added

This commit is contained in:
Arvind Tiwari 2018-02-08 21:26:28 +05:30
parent c9e2413c4e
commit a3fa4b138f
3 changed files with 28 additions and 8 deletions

View file

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2018-02-06 19:17 # Generated by Django 1.9.4 on 2018-02-08 15:49
from __future__ import unicode_literals from __future__ import unicode_literals
from django.db import migrations, models from django.db import migrations, models
@ -9,8 +9,8 @@ import django.db.models.deletion
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('cms', '0014_auto_20160404_1908'),
('ungleich_page', '0017_auto_20171219_1856'), ('ungleich_page', '0017_auto_20171219_1856'),
('cms', '0014_auto_20160404_1908'),
] ]
operations = [ operations = [
@ -19,12 +19,10 @@ class Migration(migrations.Migration):
fields=[ fields=[
('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE,
parent_link=True, primary_key=True, serialize=False, to='cms.CMSPlugin')), parent_link=True, primary_key=True, serialize=False, to='cms.CMSPlugin')),
('copyright', models.CharField( ('copyright_label', models.CharField(blank=True, default='',
blank=True, default='', max_length=100, help_text='Name of the company alongside the copyright year', max_length=100)),
help_text='Name of the company alongside the copyright year')),
('link_text', models.CharField( ('link_text', models.CharField(
blank=True, max_length=100, null=True, blank=True, help_text='Text for the link on the right part of footer', max_length=100, null=True)),
help_text='Text for the link on the right part of footer')),
('link_url', models.URLField(blank=True, ('link_url', models.URLField(blank=True,
help_text='Url to the link in footer', null=True)), help_text='Url to the link in footer', null=True)),
('twitter_url', models.URLField( ('twitter_url', models.URLField(
@ -33,6 +31,10 @@ class Migration(migrations.Migration):
blank=True, help_text='If empty, linkedin btn will not be visible', null=True)), blank=True, help_text='If empty, linkedin btn will not be visible', null=True)),
('github_url', models.URLField( ('github_url', models.URLField(
blank=True, help_text='If empty, github btn will not be visible', null=True)), blank=True, help_text='If empty, github btn will not be visible', null=True)),
('facebook_url', models.URLField(
blank=True, help_text='If empty, facebook btn will not be visible', null=True)),
('youtube_url', models.URLField(
blank=True, help_text='If empty, youtube btn will not be visible', null=True)),
], ],
options={ options={
'abstract': False, 'abstract': False,

View file

@ -225,7 +225,7 @@ class UngleichHTMLOnly(CMSPlugin):
class UngleichFooter(CMSPlugin): class UngleichFooter(CMSPlugin):
copyright = models.CharField( copyright_label = models.CharField(
max_length=100, default='', blank=True, max_length=100, default='', blank=True,
help_text='Name of the company alongside the copyright year' help_text='Name of the company alongside the copyright year'
) )
@ -249,3 +249,11 @@ class UngleichFooter(CMSPlugin):
blank=True, null=True, blank=True, null=True,
help_text='If empty, github btn will not be visible' help_text='If empty, github btn will not be visible'
) )
facebook_url = models.URLField(
blank=True, null=True,
help_text='If empty, facebook btn will not be visible'
)
youtube_url = models.URLField(
blank=True, null=True,
help_text='If empty, youtube btn will not be visible'
)

View file

@ -21,6 +21,16 @@
<a href="{{instance.linkedin_url}}"><i class="fa fa-linkedin"></i></a> <a href="{{instance.linkedin_url}}"><i class="fa fa-linkedin"></i></a>
</li> </li>
{% endif %} {% endif %}
{% if instance.facebook_url %}
<li>
<a href="{{instance.facebook_url}}"><i class="fa fa-facebook"></i></a>
</li>
{% endif %}
{% if instance.youtube_url %}
<li>
<a href="{{instance.youtube_url}}"><i class="fa fa-youtube-play"></i></a>
</li>
{% endif %}
</ul> </ul>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">