diff --git a/mockup/assets/libs b/mockup/assets/libs
deleted file mode 120000
index 2ce3479..0000000
--- a/mockup/assets/libs
+++ /dev/null
@@ -1 +0,0 @@
-../../../static/libs
\ No newline at end of file
diff --git a/mockup/images b/mockup/images
deleted file mode 120000
index 5e67573..0000000
--- a/mockup/images
+++ /dev/null
@@ -1 +0,0 @@
-../images
\ No newline at end of file
diff --git a/publichealth/static/images/banner_0.jpg b/mockup/images/banner_0.jpg
similarity index 100%
rename from publichealth/static/images/banner_0.jpg
rename to mockup/images/banner_0.jpg
diff --git a/publichealth/static/images/banner_1.jpg b/mockup/images/banner_1.jpg
similarity index 100%
rename from publichealth/static/images/banner_1.jpg
rename to mockup/images/banner_1.jpg
diff --git a/publichealth/static/images/banner_2.jpg b/mockup/images/banner_2.jpg
similarity index 100%
rename from publichealth/static/images/banner_2.jpg
rename to mockup/images/banner_2.jpg
diff --git a/publichealth/static/images/banner_3.jpg b/mockup/images/banner_3.jpg
similarity index 100%
rename from publichealth/static/images/banner_3.jpg
rename to mockup/images/banner_3.jpg
diff --git a/publichealth/static/images/banner_4.jpg b/mockup/images/banner_4.jpg
similarity index 100%
rename from publichealth/static/images/banner_4.jpg
rename to mockup/images/banner_4.jpg
diff --git a/publichealth/static/images/ipad.jpg b/mockup/images/ipad.jpg
similarity index 100%
rename from publichealth/static/images/ipad.jpg
rename to mockup/images/ipad.jpg
diff --git a/publichealth/static/images/konf.jpg b/mockup/images/konf.jpg
similarity index 100%
rename from publichealth/static/images/konf.jpg
rename to mockup/images/konf.jpg
diff --git a/publichealth/static/images/lit.jpg b/mockup/images/lit.jpg
similarity index 100%
rename from publichealth/static/images/lit.jpg
rename to mockup/images/lit.jpg
diff --git a/publichealth/static/images/news_1.jpg b/mockup/images/news_1.jpg
similarity index 100%
rename from publichealth/static/images/news_1.jpg
rename to mockup/images/news_1.jpg
diff --git a/publichealth/static/images/public-health-bg.png b/mockup/images/public-health-bg.png
similarity index 100%
rename from publichealth/static/images/public-health-bg.png
rename to mockup/images/public-health-bg.png
diff --git a/publichealth/static/images/public-health-logo.png b/mockup/images/public-health-logo.png
similarity index 100%
rename from publichealth/static/images/public-health-logo.png
rename to mockup/images/public-health-logo.png
diff --git a/publichealth/static/images/steth.jpg b/mockup/images/steth.jpg
similarity index 100%
rename from publichealth/static/images/steth.jpg
rename to mockup/images/steth.jpg
diff --git a/publichealth/static/images/thumb_news_1.jpg b/mockup/images/thumb_news_1.jpg
similarity index 100%
rename from publichealth/static/images/thumb_news_1.jpg
rename to mockup/images/thumb_news_1.jpg
diff --git a/publichealth/static/images/thumb_news_2.jpg b/mockup/images/thumb_news_2.jpg
similarity index 100%
rename from publichealth/static/images/thumb_news_2.jpg
rename to mockup/images/thumb_news_2.jpg
diff --git a/publichealth/home/migrations/0016_socialcontact.py b/publichealth/home/migrations/0016_socialcontact.py
new file mode 100644
index 0000000..ff5a64c
--- /dev/null
+++ b/publichealth/home/migrations/0016_socialcontact.py
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.7 on 2017-05-05 08:43
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('home', '0015_dataletssettings'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='SocialContact',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('network', models.CharField(choices=[('twitter', 'Twitter'), ('facebook', 'Facebook')], default='twitter', max_length=16)),
+ ('profile', models.CharField(default='', help_text='Name of the account, e.g. @myaccount', max_length=255)),
+ ],
+ ),
+ ]
diff --git a/publichealth/home/models/snippets.py b/publichealth/home/models/snippets.py
index f9f1255..f8b261b 100644
--- a/publichealth/home/models/snippets.py
+++ b/publichealth/home/models/snippets.py
@@ -11,8 +11,44 @@ from wagtail.wagtailadmin.edit_handlers import FieldPanel
from ..util import TranslatedField
+# List of supported social networks
+SOCIAL_NETWORK_SUPPORTED = (
+ ('twitter', 'Twitter'),
+ ('facebook', 'Facebook'),
+)
+
+@register_snippet
+class SocialContact(models.Model):
+ """
+ Adds contact options through social networks
+ """
+ network = models.CharField(max_length=16, default="twitter",
+ choices=SOCIAL_NETWORK_SUPPORTED)
+ profile = models.CharField(max_length=255, default="",
+ help_text="Name of the account, e.g. @myaccount, or full URL")
+ panels = [
+ FieldPanel('network'),
+ FieldPanel('profile'),
+ ]
+ social_networks = dict(SOCIAL_NETWORK_SUPPORTED)
+ def network_title(self):
+ return self.social_networks[self.network]
+ def network_url(self):
+ if '://' in self.profile:
+ return self.profile
+ if self.network == 'twitter':
+ return "https://twitter.com/%s" % self.profile
+ elif self.network == 'facebook':
+ return "https://facebook.com/%s" % self.profile
+ return "#"
+ def __str__(self):
+ return "%s" % self.network
+
@register_snippet
class Contact(models.Model):
+ """
+ Defines contact options for the organisation, usually shown in footer
+ """
title = models.CharField(max_length=255, default="")
title_fr = models.CharField(max_length=255, default="")
trans_title = TranslatedField(
diff --git a/publichealth/home/templates/tags/contact_info.html b/publichealth/home/templates/tags/contact_info.html
index dbecca3..48af078 100644
--- a/publichealth/home/templates/tags/contact_info.html
+++ b/publichealth/home/templates/tags/contact_info.html
@@ -6,3 +6,11 @@
{{ contact.email }}
{{ contact.www_domain }}