From a3fa4b138f63aeeb908afc40c532b156e6e91738 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Thu, 8 Feb 2018 21:26:28 +0530 Subject: [PATCH] facebook and youtube url added --- ungleich_page/migrations/0018_ungleichfooter.py | 16 +++++++++------- ungleich_page/models.py | 10 +++++++++- .../ungleich_page/ungleich/_footer.html | 10 ++++++++++ 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/ungleich_page/migrations/0018_ungleichfooter.py b/ungleich_page/migrations/0018_ungleichfooter.py index ea7d28ba..37c33003 100644 --- a/ungleich_page/migrations/0018_ungleichfooter.py +++ b/ungleich_page/migrations/0018_ungleichfooter.py @@ -1,5 +1,5 @@ # -*- 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 django.db import migrations, models @@ -9,8 +9,8 @@ import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ - ('cms', '0014_auto_20160404_1908'), ('ungleich_page', '0017_auto_20171219_1856'), + ('cms', '0014_auto_20160404_1908'), ] operations = [ @@ -19,12 +19,10 @@ class Migration(migrations.Migration): fields=[ ('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')), - ('copyright', models.CharField( - blank=True, default='', max_length=100, - help_text='Name of the company alongside the copyright year')), + ('copyright_label', models.CharField(blank=True, default='', + help_text='Name of the company alongside the copyright year', max_length=100)), ('link_text', models.CharField( - blank=True, max_length=100, null=True, - help_text='Text for the link on the right part of footer')), + blank=True, help_text='Text for the link on the right part of footer', max_length=100, null=True)), ('link_url', models.URLField(blank=True, help_text='Url to the link in footer', null=True)), ('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)), ('github_url', models.URLField( 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={ 'abstract': False, diff --git a/ungleich_page/models.py b/ungleich_page/models.py index e20a2c17..cdfcdfc0 100644 --- a/ungleich_page/models.py +++ b/ungleich_page/models.py @@ -225,7 +225,7 @@ class UngleichHTMLOnly(CMSPlugin): class UngleichFooter(CMSPlugin): - copyright = models.CharField( + copyright_label = models.CharField( max_length=100, default='', blank=True, help_text='Name of the company alongside the copyright year' ) @@ -249,3 +249,11 @@ class UngleichFooter(CMSPlugin): blank=True, null=True, 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' + ) diff --git a/ungleich_page/templates/ungleich_page/ungleich/_footer.html b/ungleich_page/templates/ungleich_page/ungleich/_footer.html index 7d7ffd19..06acb163 100644 --- a/ungleich_page/templates/ungleich_page/ungleich/_footer.html +++ b/ungleich_page/templates/ungleich_page/ungleich/_footer.html @@ -21,6 +21,16 @@ {% endif %} + {% if instance.facebook_url %} +
  • + +
  • + {% endif %} + {% if instance.youtube_url %} +
  • + +
  • + {% endif %}