# Warning: text inside the INSTALLED_ADDONS tags is auto-generated. Manual changes will be overwritten.
@@ -16,11 +18,148 @@ INSTALLED_ADDONS = [
]
import aldryn_addons.settings
-aldryn_addons.settings.load(locals())
+aldryn_addons.settings.load(locals())
# all django settings can be altered here
INSTALLED_APPS.extend([
- # add your project specific apps here
+ 'project',
+ 'fontawesome',
+ 'haystack',
+ 'aldryn_search',
+ 'spurl',
+ 'image_cropping',
+])
+
+MIDDLEWARE_CLASSES.extend([
+ # add your own middlewares here
])
+
+TEMPLATES[0]['OPTIONS']['context_processors'] += [
+ 'project.context_processors.search_form',
+]
+
+THUMBNAIL_PROCESSORS = ('image_cropping.thumbnail_processors.crop_corners',) + THUMBNAIL_PROCESSORS
+
+MAILCHIMP_USERNAME = 'developer@baker-street.ch'
+MAILCHIMP_API_KEY = '3dfe69aed0e309452384b4c6b25ad616-us17'
+MAILCHIMP_LIST_ID = '31720924bf'
+
+# ALDRYN_SEARCH_DEFAULT_LANGUAGE = 'de'
+ALDRYN_SEARCH_INDEX_BASE_CLASS = 'project.search.SearchIndex'
+
+HAYSTACK_CUSTOM_HIGHLIGHTER = 'project.search.Highlighter'
+HAYSTACK_DEFAULT_OPERATOR = 'OR'
+HAYSTACK_CONNECTIONS = {
+ 'default': {
+ 'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
+ 'PATH': os.path.join(BASE_DIR, 'whoosh', 'index', 'de'),
+ },
+}
+
+HAYSTACK_ROUTERS = ['aldryn_search.router.LanguageRouter', ]
+
+CMS_TEMPLATE_INHERITANCE = False
+
+CMS_TEMPLATES = (
+ ('project/content.html', 'Content'),
+ ('project/list.html', 'Liste'),
+ ('project/contact.html', 'Kontakt'),
+ ('project/timetable.html', 'Zeitplan'),
+)
+
+CMS_PLACEHOLDER_CONF = {
+ None: {
+ 'plugins': ['SectionPlugin'],
+ },
+ 'contact': {
+ 'plugins': ['SectionTextPlugin', 'JourneyCalculatorPlugin'],
+ },
+ 'timetable': {
+ 'plugins': ['TimetablePlugin'],
+ },
+ 'social_media': {
+ 'plugins': ['SocialMediaListPlugin'],
+ },
+}
+
+CMS_PLUGIN_CACHE = False
+
+CKEDITOR_SETTINGS.update({
+ 'autoParagraph': False,
+ 'format_tags': 'p',
+ 'contentsCss': ['/static/css/main.css'],
+ 'forcePasteAsPlainText': True,
+ 'bodyId': 'admin_editor',
+ 'enterMode': 2,
+ 'shiftEnterMode': 2,
+ 'forceEnterMode': True,
+ 'toolbarLocation': 'bottom',
+ 'removePlugins': 'contextmenu,liststyle,tabletools',
+ 'keystrokes': [
+ [1114188, None], # Link
+ [2228345, None],
+ [3342457, None],
+ ],
+ 'bodyClass': 'section__text',
+ 'toolbar_CMS': [
+ ['Undo', 'Redo', '-', 'Bold', 'Italic', 'Underline', '-', 'RemoveFormat', '-', 'cmsplugins']
+ ],
+})
+
+CKEDITOR_SETTINGS_BASE = copy.deepcopy(CKEDITOR_SETTINGS)
+CKEDITOR_SETTINGS_BASE.update({
+ 'autoGrow_onStartup': True,
+ 'autoGrow_minHeight': 100,
+ 'autoGrow_maxHeight': 650,
+ 'extraPlugins': 'autogrow',
+ 'bodyClass': '',
+})
+
+CKEDITOR_SETTINGS_INPUT = copy.deepcopy(CKEDITOR_SETTINGS_BASE)
+CKEDITOR_SETTINGS_INPUT.update({
+ 'keystrokes': [
+ [1114188, None], # Link
+ [1114178, None], # Bold
+ [1114185, None], # Italic
+ [1114197, None], # Unterline
+ [2228345, None],
+ [3342457, None],
+ ],
+ 'toolbar_HTMLField': [
+ ['Undo', 'Redo'],
+ ],
+ 'bodyClass': 'section__text',
+ 'height': 100,
+})
+
+CKEDITOR_SETTINGS_SECTION_TITLE = copy.deepcopy(CKEDITOR_SETTINGS_INPUT)
+CKEDITOR_SETTINGS_SECTION_TITLE['bodyClass'] = 'h2'
+
+CKEDITOR_SETTINGS_SLIDER_TITLE = copy.deepcopy(CKEDITOR_SETTINGS_INPUT)
+CKEDITOR_SETTINGS_SLIDER_TITLE['bodyClass'] = 'slider__text__item__title'
+
+CKEDITOR_SETTINGS_SLIDER_TEXT = copy.deepcopy(CKEDITOR_SETTINGS_INPUT)
+CKEDITOR_SETTINGS_SLIDER_TEXT['bodyClass'] = 'slider__text__item__text'
+
+CKEDITOR_SETTINGS_TEXT_SLIDER_TEXT = copy.deepcopy(CKEDITOR_SETTINGS_INPUT)
+CKEDITOR_SETTINGS_TEXT_SLIDER_TEXT['bodyClass'] = 'text_slider__text'
+
+CKEDITOR_SETTINGS_QUOTE_CONTENT = copy.deepcopy(CKEDITOR_SETTINGS_INPUT)
+CKEDITOR_SETTINGS_QUOTE_CONTENT['bodyClass'] = 'quote__content'
+
+CKEDITOR_SETTINGS_QUOTE_SOURCE = copy.deepcopy(CKEDITOR_SETTINGS_INPUT)
+CKEDITOR_SETTINGS_QUOTE_SOURCE['bodyClass'] = 'quote__source'
+
+CKEDITOR_SETTINGS_HIGHLIGHT_LIST_ITEM_TITLE = copy.deepcopy(CKEDITOR_SETTINGS_INPUT)
+CKEDITOR_SETTINGS_HIGHLIGHT_LIST_ITEM_TITLE['bodyClass'] = 'highlight_list__item__title'
+
+CKEDITOR_SETTINGS_HIGHLIGHT_LIST_ITEM_TEXT = copy.deepcopy(CKEDITOR_SETTINGS_INPUT)
+CKEDITOR_SETTINGS_HIGHLIGHT_LIST_ITEM_TEXT['bodyClass'] = 'highlight_list__item__text'
+
+CKEDITOR_SETTINGS_TIMETABLE_ITEM_TITLE = copy.deepcopy(CKEDITOR_SETTINGS_INPUT)
+CKEDITOR_SETTINGS_TIMETABLE_ITEM_TITLE['bodyClass'] = 'h2 timetable__item__title'
+
+CKEDITOR_SETTINGS_TIMETABLE_ITEM_TEXT = copy.deepcopy(CKEDITOR_SETTINGS_INPUT)
+CKEDITOR_SETTINGS_TIMETABLE_ITEM_TEXT['bodyClass'] = 'section__text timetable__item__text'
diff --git a/src/project/admin.py b/src/project/admin.py
index 40a96af..3269617 100644
--- a/src/project/admin.py
+++ b/src/project/admin.py
@@ -1 +1,75 @@
# -*- coding: utf-8 -*-
+from django.contrib import admin
+from cms.extensions import PageExtensionAdmin
+from parler.admin import TranslatableAdmin
+from django.contrib.admin.models import LogEntry, DELETION
+from django.utils.html import escape
+from django.core.urlresolvers import reverse
+
+from project.models import ImageExtension, SliderItemQualification
+
+
+@admin.register(ImageExtension)
+class ImageExtensionAdmin(PageExtensionAdmin):
+ pass
+
+
+@admin.register(SliderItemQualification)
+class SliderItemQualificationAdmin(TranslatableAdmin):
+ pass
+
+
+# https://djangosnippets.org/snippets/2484/
+@admin.register(LogEntry)
+class LogEntryAdmin(admin.ModelAdmin):
+ date_hierarchy = 'action_time'
+
+ readonly_fields = LogEntry._meta.get_all_field_names()
+
+ list_filter = [
+ 'user',
+ 'content_type',
+ 'action_flag'
+ ]
+
+ search_fields = [
+ 'object_repr',
+ 'change_message'
+ ]
+
+ list_display = [
+ 'action_time',
+ 'user',
+ 'content_type',
+ 'object_link',
+ 'action_flag',
+ 'change_message',
+ ]
+
+ def has_add_permission(self, request):
+ return False
+
+ def has_change_permission(self, request, obj=None):
+ return request.user.is_superuser and request.method != 'POST'
+
+ def has_delete_permission(self, request, obj=None):
+ return False
+
+ def object_link(self, obj):
+ if obj.action_flag == DELETION:
+ link = escape(obj.object_repr)
+ else:
+ ct = obj.content_type
+ link = u'%s' % (
+ reverse('admin:%s_%s_change' % (ct.app_label, ct.model), args=[obj.object_id]),
+ escape(obj.object_repr),
+ )
+ return link
+
+ object_link.allow_tags = True
+ object_link.admin_order_field = 'object_repr'
+ object_link.short_description = u'object'
+
+ def queryset(self, request):
+ return super(LogEntryAdmin, self).queryset(request) \
+ .prefetch_related('content_type')
diff --git a/src/project/cms_plugins.py b/src/project/cms_plugins.py
new file mode 100644
index 0000000..30b805d
--- /dev/null
+++ b/src/project/cms_plugins.py
@@ -0,0 +1,304 @@
+# -*- coding: utf-8 -*-
+from aldryn_forms.cms_plugins import FormPlugin as _FormPlugin
+from cms.models.pluginmodel import CMSPlugin
+from cms.plugin_base import CMSPluginBase
+from cms.plugin_pool import plugin_pool
+from django.conf import settings
+from djangocms_picture.cms_plugins import PicturePlugin as _PicturePlugin
+from djangocms_text_ckeditor.cms_plugins import TextPlugin as _TextPlugin
+from django.contrib import admin
+from mailchimp3 import MailChimp
+
+from project.forms import NewsletterSubscriptionForm
+from project.models import Section, Quote, SliderItem, SectionText, Video, DownloadSection, DownloadSectionFolder, \
+ TextSliderItem, HighlightListItem, ReferenceListItem, SocialMediaList, SocialMediaListItem, Timetable, \
+ TimetableItem, Partner, HighlightList, Image, TitleListItem, TitleList
+
+
+@plugin_pool.register_plugin
+class SectionPlugin(CMSPluginBase):
+ model = Section
+ module = 'Content'
+ name = 'Section'
+ render_template = 'project/plugins/content/section.html'
+ allow_children = True
+ child_classes = ['QuotePlugin', 'SliderPlugin', 'SpacerPlugin', 'SectionTitlePlugin', 'TitleListPlugin',
+ 'SectionTextPlugin', 'VideoPlugin', 'DownloadSectionPlugin', 'TextSliderPlugin',
+ 'HighlightListPlugin', 'ReferenceListPlugin', 'FormPlugin', 'PicturePlugin', 'SubPageListPlugin',
+ 'PartnerPlugin', 'NewsletterSubscriptionPlugin', 'NewsletterArchivePlugin',
+ 'SocialMediaListPlugin']
+
+
+@plugin_pool.register_plugin
+class SectionTitlePlugin(CMSPluginBase):
+ model = CMSPlugin
+ module = 'Content'
+ name = 'Section Title'
+ render_template = 'project/plugins/content/section_title.html'
+
+
+plugin_pool.unregister_plugin(_TextPlugin)
+
+
+@plugin_pool.register_plugin
+class TextPlugin(_TextPlugin):
+ child_classes = ['LinkPlugin']
+
+
+@plugin_pool.register_plugin
+class SectionTextPlugin(CMSPluginBase):
+ model = SectionText
+ module = 'Content'
+ name = 'Section Text'
+ render_template = 'project/plugins/content/section_text.html'
+ allow_children = True
+ child_classes = ['TextPlugin']
+
+
+@plugin_pool.register_plugin
+class VideoPlugin(CMSPluginBase):
+ model = Video
+ module = 'Content'
+ name = 'Video'
+ render_template = 'project/plugins/content/video.html'
+
+
+@plugin_pool.register_plugin
+class SliderPlugin(CMSPluginBase):
+ model = CMSPlugin
+ module = 'Content'
+ name = 'Slider'
+ render_template = 'project/plugins/content/slider.html'
+ allow_children = True
+ child_classes = ['SliderItemPlugin']
+
+
+@plugin_pool.register_plugin
+class SliderItemPlugin(CMSPluginBase):
+ model = SliderItem
+ module = 'Slider'
+ name = 'Slider Item'
+ render_template = 'project/plugins/content/slider_item.html'
+ filter_horizontal = ['qualifications']
+
+
+@plugin_pool.register_plugin
+class QuotePlugin(CMSPluginBase):
+ model = Quote
+ module = 'Content'
+ name = 'Quote'
+ render_template = 'project/plugins/content/quote.html'
+
+
+class DownloadSectionFolderInlineAdmin(admin.TabularInline):
+ model = DownloadSectionFolder
+ extra = 0
+
+
+@plugin_pool.register_plugin
+class DownloadSectionPlugin(CMSPluginBase):
+ model = DownloadSection
+ module = 'Content'
+ name = 'Download Section'
+ render_template = 'project/plugins/content/download_section.html'
+ inlines = [DownloadSectionFolderInlineAdmin]
+
+
+@plugin_pool.register_plugin
+class SpacerPlugin(CMSPluginBase):
+ model = CMSPlugin
+ module = 'Content'
+ name = 'Spacer'
+ render_template = 'project/plugins/content/spacer.html'
+
+
+@plugin_pool.register_plugin
+class TextSliderPlugin(CMSPluginBase):
+ model = CMSPlugin
+ module = 'Content'
+ name = 'Text Slider'
+ render_template = 'project/plugins/content/text_slider.html'
+ allow_children = True
+ child_classes = ['TextSliderItemPlugin']
+
+
+@plugin_pool.register_plugin
+class TextSliderItemPlugin(CMSPluginBase):
+ model = TextSliderItem
+ module = 'Slider'
+ name = 'Text Slider Item'
+ render_template = 'project/plugins/content/text_slider_item.html'
+
+
+@plugin_pool.register_plugin
+class HighlightListPlugin(CMSPluginBase):
+ model = HighlightList
+ module = 'Content'
+ name = 'Highlight List'
+ render_template = 'project/plugins/content/highlight_list.html'
+ allow_children = True
+ child_classes = ['HighlightListItemPlugin', 'SectionTitlePlugin']
+
+
+@plugin_pool.register_plugin
+class HighlightListItemPlugin(CMSPluginBase):
+ model = HighlightListItem
+ module = 'Slider'
+ name = 'Highlight List Item'
+ render_template = 'project/plugins/content/highlight_list_item.html'
+
+
+@plugin_pool.register_plugin
+class ReferenceListPlugin(CMSPluginBase):
+ model = CMSPlugin
+ module = 'Content'
+ name = 'Reference List'
+ render_template = 'project/plugins/content/reference_list.html'
+ allow_children = True
+ child_classes = ['ReferenceListItemPlugin']
+
+
+@plugin_pool.register_plugin
+class ReferenceListItemPlugin(CMSPluginBase):
+ model = ReferenceListItem
+ module = 'Slider'
+ name = 'Highlight List Item'
+ render_template = 'project/plugins/content/reference_list_item.html'
+
+
+plugin_pool.unregister_plugin(_PicturePlugin)
+
+
+@plugin_pool.register_plugin
+class PicturePlugin(_PicturePlugin):
+ module = 'Content'
+ name = 'Image'
+ model = Image
+
+ fieldsets = [
+ (None, {
+ 'fields': (
+ 'picture',
+ 'cropping',
+ ('width', 'height'),
+ 'caption_text',
+ )
+ }),
+ ]
+
+
+plugin_pool.unregister_plugin(_FormPlugin)
+
+
+@plugin_pool.register_plugin
+class FormPlugin(_FormPlugin):
+ module = 'Content'
+ name = 'Form'
+ child_classes = ['TextField', 'TextAreaField', 'EmailField', 'SubmitButton']
+
+
+class SocialMediaListItemInlineAdmin(admin.TabularInline):
+ model = SocialMediaListItem
+ extra = 0
+
+
+@plugin_pool.register_plugin
+class SocialMediaListPlugin(CMSPluginBase):
+ model = SocialMediaList
+ module = 'Content'
+ name = 'Social Media List'
+ render_template = 'project/plugins/social/social_media_list.html'
+ inlines = [SocialMediaListItemInlineAdmin]
+
+
+@plugin_pool.register_plugin
+class JourneyCalculatorPlugin(CMSPluginBase):
+ module = 'Content'
+ name = 'Anfahrtszeit Rechner'
+ render_template = 'project/plugins/contact/journey_calculator.html'
+ allow_children = True
+ child_classes = ['TextPlugin']
+
+
+@plugin_pool.register_plugin
+class TimetablePlugin(CMSPluginBase):
+ model = Timetable
+ module = 'Timetable'
+ name = 'Timetable'
+ render_template = 'project/plugins/timetable/timetable.html'
+ allow_children = True
+ child_classes = ['TimetableItemPlugin']
+
+
+@plugin_pool.register_plugin
+class TimetableItemPlugin(CMSPluginBase):
+ model = TimetableItem
+ module = 'Timetable'
+ name = 'Timetable Item'
+ render_template = 'project/plugins/timetable/timetable_item.html'
+
+
+@plugin_pool.register_plugin
+class SubPageListPlugin(CMSPluginBase):
+ model = CMSPlugin
+ module = 'Content'
+ name = 'Subpage List'
+ render_template = 'project/plugins/content/subpage_list.html'
+
+
+@plugin_pool.register_plugin
+class PartnerPlugin(CMSPluginBase):
+ model = Partner
+ module = 'Content'
+ name = 'Partner'
+ render_template = 'project/plugins/content/partner.html'
+
+
+@plugin_pool.register_plugin
+class NewsletterSubscriptionPlugin(CMSPluginBase):
+ module = 'Content'
+ name = 'Newsletter Subscription'
+ render_template = 'project/newsletter/subscription_form.html'
+
+ def render(self, context, instance, placeholder):
+ context = super(NewsletterSubscriptionPlugin, self).render(context, instance, placeholder)
+ context['form'] = NewsletterSubscriptionForm
+ return context
+
+
+@plugin_pool.register_plugin
+class NewsletterArchivePlugin(CMSPluginBase):
+ module = 'Content'
+ name = 'Newsletter Archive'
+ render_template = 'project/newsletter/archive.html'
+
+ def render(self, context, instance, placeholder):
+ context = super(NewsletterArchivePlugin, self).render(context, instance, placeholder)
+ client = MailChimp(settings.MAILCHIMP_USERNAME, settings.MAILCHIMP_API_KEY)
+
+ campaigns = []
+ for raw_campaign in client.campaigns.all(get_all=True)['campaigns']:
+ if raw_campaign['status'] == 'sent':
+ campaign = {
+ 'title': raw_campaign['settings']['title'],
+ 'text': raw_campaign['settings']['subject_line'],
+ 'url': raw_campaign['archive_url'],
+ }
+ campaigns.append(campaign)
+
+ context['campaigns'] = campaigns
+ return context
+
+
+class TitleListItemInlineAdmin(admin.TabularInline):
+ model = TitleListItem
+ extra = 0
+
+
+@plugin_pool.register_plugin
+class TitleListPlugin(CMSPluginBase):
+ model = TitleList
+ module = 'Content'
+ name = 'Title List'
+ render_template = 'project/plugins/content/title_list.html'
+ inlines = [TitleListItemInlineAdmin]
diff --git a/src/project/cms_toolbars.py b/src/project/cms_toolbars.py
new file mode 100644
index 0000000..f93ea65
--- /dev/null
+++ b/src/project/cms_toolbars.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+from cms.toolbar_pool import toolbar_pool
+from cms.extensions.toolbar import ExtensionToolbar
+from django.utils.translation import ugettext_lazy as _
+
+from project.models import ImageExtension
+
+
+@toolbar_pool.register
+class ImageExtensionToolbar(ExtensionToolbar):
+ model = ImageExtension
+
+ def populate(self):
+ current_page_menu = self._setup_extension_toolbar()
+
+ if current_page_menu:
+ page_extension, url = self.get_page_extension_admin()
+ if url:
+ current_page_menu.add_modal_item('Seiten-Bild', url=url, disabled=not self.toolbar.edit_mode,
+ position=0)
diff --git a/src/project/context_processors.py b/src/project/context_processors.py
new file mode 100644
index 0000000..21280d0
--- /dev/null
+++ b/src/project/context_processors.py
@@ -0,0 +1,5 @@
+from haystack.forms import ModelSearchForm
+
+
+def search_form(request):
+ return {'search_form': ModelSearchForm}
diff --git a/src/project/forms.py b/src/project/forms.py
new file mode 100644
index 0000000..caa008e
--- /dev/null
+++ b/src/project/forms.py
@@ -0,0 +1,49 @@
+# -*- coding: utf-8 -*-
+from django.utils.translation import ugettext_lazy as _, get_language
+from django import forms
+from django.conf import settings
+from mailchimp3 import MailChimp
+
+client = MailChimp(settings.MAILCHIMP_USERNAME, settings.MAILCHIMP_API_KEY)
+field_names = [_('First Name'), _('Last Name')]
+
+
+class NewsletterSubscriptionForm(forms.Form):
+ email = forms.EmailField(max_length=254, label=_('E-Mail'),
+ widget=forms.TextInput(attrs={'placeholder': _('E-Mail')}))
+
+ def __init__(self, *args, **kwargs):
+ super(NewsletterSubscriptionForm, self).__init__(*args, **kwargs)
+ merge_fields = client.lists.merge_fields.all(list_id=settings.MAILCHIMP_LIST_ID, get_all=True)
+ for field in merge_fields['merge_fields']:
+ if field['type'] == 'text':
+ self.fields[field['tag']] = forms.CharField(
+ label=field['name'], required=field['required'],
+ widget=forms.TextInput(
+ attrs={'placeholder': _(field['name'])}
+ )
+ )
+
+ def clean(self):
+ cleaned_data = super(NewsletterSubscriptionForm, self).clean()
+ if not self._errors:
+ merge_data = cleaned_data.copy()
+ merge_data.pop('email')
+
+ try:
+ client.lists.members.create(settings.MAILCHIMP_LIST_ID, {
+ 'email_address': cleaned_data['email'],
+ 'language': get_language(),
+ 'status': 'subscribed',
+ 'merge_fields': merge_data,
+ })
+ except Exception as err:
+ json_err = err.response.json()
+ if json_err['title'] == 'Member Exists':
+ raise forms.ValidationError(
+ _('Diese E-Mail-Adresse wurde bereits registriert.')
+ )
+ else:
+ raise forms.ValidationError(
+ _('Leider ist ein Fehler aufgetreten, bitte versuchen sie es später nochmals.')
+ )
diff --git a/src/project/migrations/0001_initial.py b/src/project/migrations/0001_initial.py
new file mode 100644
index 0000000..153c69e
--- /dev/null
+++ b/src/project/migrations/0001_initial.py
@@ -0,0 +1,297 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.13 on 2018-02-06 01:53
+from __future__ import unicode_literals
+
+from django.conf import settings
+from django.db import migrations, models
+import django.db.models.deletion
+import djangocms_text_ckeditor.fields
+import filer.fields.folder
+import filer.fields.image
+import fontawesome.fields
+import parler.models
+
+
+class Migration(migrations.Migration):
+
+ initial = True
+
+ dependencies = [
+ ('cms', '0018_pagenode'),
+ migrations.swappable_dependency(settings.FILER_IMAGE_MODEL),
+ ('filer', '0007_auto_20161016_1055'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='DownloadSection',
+ fields=[
+ ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='project_downloadsection', serialize=False, to='cms.CMSPlugin')),
+ ],
+ options={
+ 'verbose_name': 'Download Section',
+ 'verbose_name_plural': 'Download Sections',
+ 'abstract': False,
+ },
+ bases=('cms.cmsplugin',),
+ ),
+ migrations.CreateModel(
+ name='DownloadSectionFolder',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('ordering', models.IntegerField(default=5, verbose_name='Sortierung')),
+ ('download_section', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='folders', to='project.DownloadSection', verbose_name='Download Section')),
+ ('folder', filer.fields.folder.FilerFolderField(on_delete=django.db.models.deletion.CASCADE, to='filer.Folder', verbose_name='Ordner')),
+ ],
+ options={
+ 'ordering': ['ordering'],
+ },
+ ),
+ migrations.CreateModel(
+ name='HighlightList',
+ fields=[
+ ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='project_highlightlist', serialize=False, to='cms.CMSPlugin')),
+ ('full_width', models.BooleanField(default=False, verbose_name='Volle Breite')),
+ ],
+ options={
+ 'verbose_name': 'Highlight List',
+ 'verbose_name_plural': 'Highlight Lists',
+ 'abstract': False,
+ },
+ bases=('cms.cmsplugin',),
+ ),
+ migrations.CreateModel(
+ name='HighlightListItem',
+ fields=[
+ ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='project_highlightlistitem', serialize=False, to='cms.CMSPlugin')),
+ ('icon', fontawesome.fields.IconField(blank=True, max_length=60, null=True, verbose_name='Icon')),
+ ('animated_icon', models.CharField(blank=True, choices=[('strength', 'Stärken'), ('learning', 'Lernen'), ('creativity', 'Kreativität'), ('curiosity', 'Neugierde'), ('education', 'Bildung'), ('happiness', 'Glücklichkeit')], max_length=256, null=True, verbose_name='Animiertes Icon')),
+ ('title', djangocms_text_ckeditor.fields.HTMLField(verbose_name='Titel')),
+ ('text', djangocms_text_ckeditor.fields.HTMLField(verbose_name='Text')),
+ ],
+ options={
+ 'verbose_name': 'Highlight List Item',
+ 'verbose_name_plural': 'Highlight List Items',
+ 'abstract': False,
+ },
+ bases=('cms.cmsplugin',),
+ ),
+ migrations.CreateModel(
+ name='ImageExtension',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('extended_object', models.OneToOneField(editable=False, on_delete=django.db.models.deletion.CASCADE, to='cms.Page')),
+ ('image', filer.fields.image.FilerImageField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.FILER_IMAGE_MODEL, verbose_name='Bild')),
+ ('public_extension', models.OneToOneField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='draft_extension', to='project.ImageExtension')),
+ ],
+ options={
+ 'abstract': False,
+ },
+ ),
+ migrations.CreateModel(
+ name='Partner',
+ fields=[
+ ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='project_partner', serialize=False, to='cms.CMSPlugin')),
+ ('name', djangocms_text_ckeditor.fields.HTMLField(verbose_name='Titel')),
+ ('text', djangocms_text_ckeditor.fields.HTMLField(blank=True, null=True, verbose_name='Text')),
+ ('url', models.URLField(blank=True, null=True, verbose_name='URL')),
+ ('logo', filer.fields.image.FilerImageField(on_delete=django.db.models.deletion.CASCADE, to=settings.FILER_IMAGE_MODEL, verbose_name='Bild')),
+ ],
+ options={
+ 'verbose_name': 'Slider Item',
+ 'verbose_name_plural': 'Slider Items',
+ 'abstract': False,
+ },
+ bases=('cms.cmsplugin',),
+ ),
+ migrations.CreateModel(
+ name='Quote',
+ fields=[
+ ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='project_quote', serialize=False, to='cms.CMSPlugin')),
+ ('content', djangocms_text_ckeditor.fields.HTMLField(verbose_name='Inhalt')),
+ ('source', djangocms_text_ckeditor.fields.HTMLField(verbose_name='Quelle')),
+ ('image', filer.fields.image.FilerImageField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.FILER_IMAGE_MODEL, verbose_name='Bild')),
+ ],
+ options={
+ 'verbose_name': 'Quote',
+ 'verbose_name_plural': 'Quotes',
+ 'abstract': False,
+ },
+ bases=('cms.cmsplugin',),
+ ),
+ migrations.CreateModel(
+ name='ReferenceListItem',
+ fields=[
+ ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='project_referencelistitem', serialize=False, to='cms.CMSPlugin')),
+ ('vimeo_id', models.IntegerField(help_text='e.g. https://vimeo.com/131766159', verbose_name='Vimeo ID')),
+ ('thumbnail', filer.fields.image.FilerImageField(on_delete=django.db.models.deletion.CASCADE, to=settings.FILER_IMAGE_MODEL, verbose_name='Vorschaubild')),
+ ],
+ options={
+ 'verbose_name': 'Reference List Item',
+ 'verbose_name_plural': 'Reference List Items',
+ 'abstract': False,
+ },
+ bases=('cms.cmsplugin',),
+ ),
+ migrations.CreateModel(
+ name='Section',
+ fields=[
+ ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='project_section', serialize=False, to='cms.CMSPlugin')),
+ ('title', djangocms_text_ckeditor.fields.HTMLField(verbose_name='Titel')),
+ ],
+ options={
+ 'verbose_name': 'Section',
+ 'verbose_name_plural': 'Sections',
+ 'abstract': False,
+ },
+ bases=('cms.cmsplugin',),
+ ),
+ migrations.CreateModel(
+ name='SectionText',
+ fields=[
+ ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='project_sectiontext', serialize=False, to='cms.CMSPlugin')),
+ ('columns', models.BooleanField(default=False, verbose_name='Spalten')),
+ ],
+ options={
+ 'verbose_name': 'Section Text',
+ 'verbose_name_plural': 'Section Texts',
+ 'abstract': False,
+ },
+ bases=('cms.cmsplugin',),
+ ),
+ migrations.CreateModel(
+ name='SliderItem',
+ fields=[
+ ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='project_slideritem', serialize=False, to='cms.CMSPlugin')),
+ ('title', djangocms_text_ckeditor.fields.HTMLField(verbose_name='Titel')),
+ ('subline', djangocms_text_ckeditor.fields.HTMLField(blank=True, null=True, verbose_name='Untertitel')),
+ ('text', djangocms_text_ckeditor.fields.HTMLField(blank=True, null=True, verbose_name='Text')),
+ ('email', models.EmailField(blank=True, max_length=254, null=True, verbose_name='E-Mail')),
+ ('image', filer.fields.image.FilerImageField(on_delete=django.db.models.deletion.CASCADE, to=settings.FILER_IMAGE_MODEL, verbose_name='Bild')),
+ ],
+ options={
+ 'verbose_name': 'Slider Item',
+ 'verbose_name_plural': 'Slider Items',
+ 'abstract': False,
+ },
+ bases=('cms.cmsplugin',),
+ ),
+ migrations.CreateModel(
+ name='SliderItemQualification',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('ordering', models.IntegerField(default=5, verbose_name='Sortierung')),
+ ],
+ options={
+ 'ordering': ['ordering'],
+ },
+ bases=(parler.models.TranslatableModelMixin, models.Model),
+ ),
+ migrations.CreateModel(
+ name='SliderItemQualificationTranslation',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')),
+ ('name', models.CharField(max_length=256, verbose_name='name')),
+ ('master', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='project.SliderItemQualification')),
+ ],
+ options={
+ 'db_table': 'project_slideritemqualification_translation',
+ 'default_permissions': (),
+ 'managed': True,
+ 'verbose_name': 'slider item qualification Translation',
+ 'db_tablespace': '',
+ },
+ ),
+ migrations.CreateModel(
+ name='SocialMediaList',
+ fields=[
+ ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='project_socialmedialist', serialize=False, to='cms.CMSPlugin')),
+ ],
+ options={
+ 'verbose_name': 'Social Media List',
+ 'verbose_name_plural': 'Social Media Lists',
+ 'abstract': False,
+ },
+ bases=('cms.cmsplugin',),
+ ),
+ migrations.CreateModel(
+ name='SocialMediaListItem',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('icon', fontawesome.fields.IconField(blank=True, max_length=60, verbose_name='Icon')),
+ ('url', models.URLField(verbose_name='URL')),
+ ('ordering', models.IntegerField(default=5, verbose_name='Sortierung')),
+ ('social_media_list', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='social_media_list_items', to='project.SocialMediaList', verbose_name='Social Media List')),
+ ],
+ options={
+ 'ordering': ['ordering'],
+ },
+ ),
+ migrations.CreateModel(
+ name='TextSliderItem',
+ fields=[
+ ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='project_textslideritem', serialize=False, to='cms.CMSPlugin')),
+ ('text', djangocms_text_ckeditor.fields.HTMLField(verbose_name='Text')),
+ ],
+ options={
+ 'verbose_name': 'Text Slider Item',
+ 'verbose_name_plural': 'Text Slider Items',
+ 'abstract': False,
+ },
+ bases=('cms.cmsplugin',),
+ ),
+ migrations.CreateModel(
+ name='Timetable',
+ fields=[
+ ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='project_timetable', serialize=False, to='cms.CMSPlugin')),
+ ('introduction', djangocms_text_ckeditor.fields.HTMLField(verbose_name='Einleitung')),
+ ('start_image', filer.fields.image.FilerImageField(on_delete=django.db.models.deletion.CASCADE, to=settings.FILER_IMAGE_MODEL, verbose_name='Startbild')),
+ ],
+ options={
+ 'verbose_name': 'Timetable',
+ 'verbose_name_plural': 'Timetables',
+ 'abstract': False,
+ },
+ bases=('cms.cmsplugin',),
+ ),
+ migrations.CreateModel(
+ name='TimetableItem',
+ fields=[
+ ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='project_timetableitem', serialize=False, to='cms.CMSPlugin')),
+ ('time', models.TimeField(verbose_name='Zeit')),
+ ('title', djangocms_text_ckeditor.fields.HTMLField(verbose_name='Titel')),
+ ('text', djangocms_text_ckeditor.fields.HTMLField(verbose_name='Text')),
+ ('image', filer.fields.image.FilerImageField(on_delete=django.db.models.deletion.CASCADE, to=settings.FILER_IMAGE_MODEL, verbose_name='Bild')),
+ ],
+ options={
+ 'verbose_name': 'Timetable Item',
+ 'verbose_name_plural': 'Timetables Items',
+ 'abstract': False,
+ },
+ bases=('cms.cmsplugin',),
+ ),
+ migrations.CreateModel(
+ name='Video',
+ fields=[
+ ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='project_video', serialize=False, to='cms.CMSPlugin')),
+ ('vimeo_id', models.IntegerField(help_text='e.g. https://vimeo.com/131766159', verbose_name='Vimeo ID')),
+ ('thumbnail', filer.fields.image.FilerImageField(on_delete=django.db.models.deletion.CASCADE, to=settings.FILER_IMAGE_MODEL, verbose_name='Vorschaubild')),
+ ],
+ options={
+ 'verbose_name': 'Video',
+ 'verbose_name_plural': 'Videos',
+ 'abstract': False,
+ },
+ bases=('cms.cmsplugin',),
+ ),
+ migrations.AddField(
+ model_name='slideritem',
+ name='qualifications',
+ field=models.ManyToManyField(blank=True, null=True, to='project.SliderItemQualification', verbose_name='Qualifikationen'),
+ ),
+ migrations.AlterUniqueTogether(
+ name='slideritemqualificationtranslation',
+ unique_together=set([('language_code', 'master')]),
+ ),
+ ]
diff --git a/src/project/migrations/0002_auto_20180214_1315.py b/src/project/migrations/0002_auto_20180214_1315.py
new file mode 100644
index 0000000..ce7f3e9
--- /dev/null
+++ b/src/project/migrations/0002_auto_20180214_1315.py
@@ -0,0 +1,132 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.13 on 2018-02-14 13:15
+from __future__ import unicode_literals
+
+import cms.models.fields
+from django.conf import settings
+from django.db import migrations, models
+import django.db.models.deletion
+import djangocms_attributes_field.fields
+import image_cropping.fields
+import project.utils
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ migrations.swappable_dependency(settings.FILER_IMAGE_MODEL),
+ ('cms', '0018_pagenode'),
+ ('filer', '0007_auto_20161016_1055'),
+ ('project', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Image',
+ fields=[
+ ('template', models.CharField(choices=[('default', 'Default')], default='default', max_length=255, verbose_name='Template')),
+ ('external_picture', models.URLField(blank=True, help_text='If provided, overrides the embedded image. Certain options such as cropping are not applicable to external images.', max_length=255, verbose_name='External image')),
+ ('width', models.PositiveIntegerField(blank=True, help_text='The image width as number in pixels. Example: "720" and not "720px".', null=True, verbose_name='Width')),
+ ('height', models.PositiveIntegerField(blank=True, help_text='The image height as number in pixels. Example: "720" and not "720px".', null=True, verbose_name='Height')),
+ ('alignment', models.CharField(blank=True, choices=[('left', 'Align left'), ('right', 'Align right'), ('center', 'Align center')], help_text='Aligns the image according to the selected option.', max_length=255, verbose_name='Alignment')),
+ ('caption_text', models.TextField(blank=True, help_text='Provide a description, attribution, copyright or other information.', verbose_name='Caption text')),
+ ('attributes', djangocms_attributes_field.fields.AttributesField(blank=True, default=dict, verbose_name='Attributes')),
+ ('link_url', models.URLField(blank=True, help_text='Wraps the image in a link to an external URL.', max_length=2040, verbose_name='External URL')),
+ ('link_target', models.CharField(blank=True, choices=[('_blank', 'Open in new window'), ('_self', 'Open in same window'), ('_parent', 'Delegate to parent'), ('_top', 'Delegate to top')], max_length=255, verbose_name='Link target')),
+ ('link_attributes', djangocms_attributes_field.fields.AttributesField(blank=True, default=dict, verbose_name='Link attributes')),
+ ('use_automatic_scaling', models.BooleanField(default=True, help_text='Uses the placeholder dimenstions to automatically calculate the size.', verbose_name='Automatic scaling')),
+ ('use_no_cropping', models.BooleanField(default=False, help_text='Outputs the raw image without cropping.', verbose_name='Use original image')),
+ ('use_crop', models.BooleanField(default=False, help_text='Crops the image according to the thumbnail settings provided in the template.', verbose_name='Crop image')),
+ ('use_upscale', models.BooleanField(default=False, help_text='Upscales the image to the size of the thumbnail settings in the template.', verbose_name='Upscale image')),
+ ('cmsplugin_ptr', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='project_image', serialize=False, to='cms.CMSPlugin')),
+ ('cropping', image_cropping.fields.ImageRatioField('picture', '1000x1000', adapt_rotation=False, allow_fullsize=False, free_crop=True, help_text=None, hide_image_field=False, size_warning=False, verbose_name='cropping')),
+ ('link_page', cms.models.fields.PageField(blank=True, help_text='Wraps the image in a link to an internal (page) URL.', null=True, on_delete=django.db.models.deletion.CASCADE, to='cms.Page', verbose_name='Internal URL')),
+ ('picture', project.utils.CroppableFilerImageField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.FILER_IMAGE_MODEL, verbose_name='Bild')),
+ ('thumbnail_options', models.ForeignKey(blank=True, help_text='Overrides width, height, and crop; scales up to the provided preset dimensions.', null=True, on_delete=django.db.models.deletion.CASCADE, to='filer.ThumbnailOption', verbose_name='Thumbnail options')),
+ ],
+ options={
+ 'abstract': False,
+ },
+ bases=('cms.cmsplugin',),
+ ),
+ migrations.AddField(
+ model_name='imageextension',
+ name='cropping',
+ field=image_cropping.fields.ImageRatioField('image', '1000x1000', adapt_rotation=False, allow_fullsize=False, free_crop=True, help_text=None, hide_image_field=False, size_warning=False, verbose_name='cropping'),
+ ),
+ migrations.AddField(
+ model_name='partner',
+ name='cropping',
+ field=image_cropping.fields.ImageRatioField('logo', '1000x1000', adapt_rotation=False, allow_fullsize=False, free_crop=True, help_text=None, hide_image_field=False, size_warning=False, verbose_name='cropping'),
+ ),
+ migrations.AddField(
+ model_name='quote',
+ name='cropping',
+ field=image_cropping.fields.ImageRatioField('image', '1000x1000', adapt_rotation=False, allow_fullsize=False, free_crop=True, help_text=None, hide_image_field=False, size_warning=False, verbose_name='cropping'),
+ ),
+ migrations.AddField(
+ model_name='referencelistitem',
+ name='cropping',
+ field=image_cropping.fields.ImageRatioField('thumbnail', '1000x1000', adapt_rotation=False, allow_fullsize=False, free_crop=True, help_text=None, hide_image_field=False, size_warning=False, verbose_name='cropping'),
+ ),
+ migrations.AddField(
+ model_name='slideritem',
+ name='cropping',
+ field=image_cropping.fields.ImageRatioField('image', '1000x1000', adapt_rotation=False, allow_fullsize=False, free_crop=True, help_text=None, hide_image_field=False, size_warning=False, verbose_name='cropping'),
+ ),
+ migrations.AddField(
+ model_name='timetable',
+ name='cropping',
+ field=image_cropping.fields.ImageRatioField('start_image', '1000x1000', adapt_rotation=False, allow_fullsize=False, free_crop=True, help_text=None, hide_image_field=False, size_warning=False, verbose_name='cropping'),
+ ),
+ migrations.AddField(
+ model_name='timetableitem',
+ name='cropping',
+ field=image_cropping.fields.ImageRatioField('image', '1000x1000', adapt_rotation=False, allow_fullsize=False, free_crop=True, help_text=None, hide_image_field=False, size_warning=False, verbose_name='cropping'),
+ ),
+ migrations.AddField(
+ model_name='video',
+ name='cropping',
+ field=image_cropping.fields.ImageRatioField('thumbnail', '1000x1000', adapt_rotation=False, allow_fullsize=False, free_crop=True, help_text=None, hide_image_field=False, size_warning=False, verbose_name='cropping'),
+ ),
+ migrations.AlterField(
+ model_name='imageextension',
+ name='image',
+ field=project.utils.CroppableFilerImageField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.FILER_IMAGE_MODEL, verbose_name='Bild'),
+ ),
+ migrations.AlterField(
+ model_name='partner',
+ name='logo',
+ field=project.utils.CroppableFilerImageField(on_delete=django.db.models.deletion.CASCADE, to=settings.FILER_IMAGE_MODEL, verbose_name='Bild'),
+ ),
+ migrations.AlterField(
+ model_name='quote',
+ name='image',
+ field=project.utils.CroppableFilerImageField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.FILER_IMAGE_MODEL, verbose_name='Bild'),
+ ),
+ migrations.AlterField(
+ model_name='referencelistitem',
+ name='thumbnail',
+ field=project.utils.CroppableFilerImageField(on_delete=django.db.models.deletion.CASCADE, to=settings.FILER_IMAGE_MODEL, verbose_name='Vorschaubild'),
+ ),
+ migrations.AlterField(
+ model_name='slideritem',
+ name='image',
+ field=project.utils.CroppableFilerImageField(on_delete=django.db.models.deletion.CASCADE, to=settings.FILER_IMAGE_MODEL, verbose_name='Bild'),
+ ),
+ migrations.AlterField(
+ model_name='timetable',
+ name='start_image',
+ field=project.utils.CroppableFilerImageField(on_delete=django.db.models.deletion.CASCADE, to=settings.FILER_IMAGE_MODEL, verbose_name='Startbild'),
+ ),
+ migrations.AlterField(
+ model_name='timetableitem',
+ name='image',
+ field=project.utils.CroppableFilerImageField(on_delete=django.db.models.deletion.CASCADE, to=settings.FILER_IMAGE_MODEL, verbose_name='Bild'),
+ ),
+ migrations.AlterField(
+ model_name='video',
+ name='thumbnail',
+ field=project.utils.CroppableFilerImageField(on_delete=django.db.models.deletion.CASCADE, to=settings.FILER_IMAGE_MODEL, verbose_name='Vorschaubild'),
+ ),
+ ]
diff --git a/src/project/migrations/0003_titlelist_titlelistitem.py b/src/project/migrations/0003_titlelist_titlelistitem.py
new file mode 100644
index 0000000..9df4493
--- /dev/null
+++ b/src/project/migrations/0003_titlelist_titlelistitem.py
@@ -0,0 +1,42 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.13 on 2018-02-14 13:48
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('cms', '0018_pagenode'),
+ ('project', '0002_auto_20180214_1315'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='TitleList',
+ fields=[
+ ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='project_titlelist', serialize=False, to='cms.CMSPlugin')),
+ ],
+ options={
+ 'verbose_name_plural': 'Title Lists',
+ 'abstract': False,
+ 'verbose_name': 'Title List',
+ },
+ bases=('cms.cmsplugin',),
+ ),
+ migrations.CreateModel(
+ name='TitleListItem',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('title', models.CharField(blank=True, max_length=256, null=True, verbose_name='Title')),
+ ('text', models.TextField(verbose_name='Text')),
+ ('ordering', models.IntegerField(default=5, verbose_name='Sortierung')),
+ ('title_list', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='title_list_items', to='project.TitleList', verbose_name='Title List')),
+ ],
+ options={
+ 'ordering': ['ordering'],
+ },
+ ),
+ ]
diff --git a/bin/.aldryn-folder b/src/project/migrations/__init__.py
similarity index 100%
rename from bin/.aldryn-folder
rename to src/project/migrations/__init__.py
diff --git a/src/project/models.py b/src/project/models.py
index 40a96af..a6d66ce 100644
--- a/src/project/models.py
+++ b/src/project/models.py
@@ -1 +1,287 @@
# -*- coding: utf-8 -*-
+from cms.models.pluginmodel import CMSPlugin
+from django.db import models
+from itertools import chain
+from djangocms_picture.models import AbstractPicture
+from djangocms_text_ckeditor.fields import HTMLField
+from filer.fields.folder import FilerFolderField
+from cms.extensions import PageExtension
+from cms.extensions.extension_pool import extension_pool
+from fontawesome.fields import IconField
+from parler.models import TranslatableModel, TranslatedFields
+from project.utils import CroppableFilerImageField
+from image_cropping import ImageRatioField
+from project.utils import AbstractClassWithoutFieldsNamed as without
+
+
+class ImageExtension(PageExtension):
+ image = CroppableFilerImageField(verbose_name='Bild', null=True, blank=True)
+ cropping = ImageRatioField('image', '1000x1000', free_crop=True)
+
+
+extension_pool.register(ImageExtension)
+
+
+class Section(CMSPlugin):
+ title = HTMLField(verbose_name='Titel', configuration='CKEDITOR_SETTINGS_SECTION_TITLE')
+
+ class Meta(CMSPlugin.Meta):
+ verbose_name = 'Section'
+ verbose_name_plural = 'Sections'
+
+ def __str__(self):
+ return self.title
+
+
+class SectionText(CMSPlugin):
+ columns = models.BooleanField(verbose_name='Spalten', default=False)
+
+ class Meta(CMSPlugin.Meta):
+ verbose_name = 'Section Text'
+ verbose_name_plural = 'Section Texts'
+
+
+class Video(CMSPlugin):
+ vimeo_id = models.IntegerField(verbose_name='Vimeo ID', help_text='e.g. https://vimeo.com/131766159')
+ thumbnail = CroppableFilerImageField(verbose_name='Vorschaubild')
+ cropping = ImageRatioField('thumbnail', '1000x1000', free_crop=True)
+
+ class Meta(CMSPlugin.Meta):
+ verbose_name = 'Video'
+ verbose_name_plural = 'Videos'
+
+ def __str__(self):
+ return str(self.vimeo_id)
+
+
+class SliderItemQualification(TranslatableModel):
+ translations = TranslatedFields(
+ name=models.CharField('name', max_length=256)
+ )
+ ordering = models.IntegerField(verbose_name='Sortierung', default=5)
+
+ class Meta:
+ ordering = ['ordering']
+
+ def __str__(self):
+ return self.name
+
+
+class SliderItem(CMSPlugin):
+ image = CroppableFilerImageField(verbose_name='Bild')
+ cropping = ImageRatioField('image', '1000x1000', free_crop=True)
+ title = HTMLField(verbose_name='Titel', configuration='CKEDITOR_SETTINGS_SLIDER_TITLE')
+ subline = HTMLField(verbose_name='Untertitel', configuration='CKEDITOR_SETTINGS_SLIDER_TEXT', blank=True, null=True)
+ text = HTMLField(verbose_name='Text', configuration='CKEDITOR_SETTINGS_SLIDER_TEXT', blank=True, null=True)
+ qualifications = models.ManyToManyField(SliderItemQualification, verbose_name='Qualifikationen', blank=True,
+ null=True)
+ email = models.EmailField(verbose_name='E-Mail', blank=True, null=True)
+
+ class Meta(CMSPlugin.Meta):
+ verbose_name = 'Slider Item'
+ verbose_name_plural = 'Slider Items'
+
+ def __str__(self):
+ return self.title
+
+ def copy_relations(self, oldinstance):
+ self.qualifications = oldinstance.qualifications.all()
+
+
+class TextSliderItem(CMSPlugin):
+ text = HTMLField(verbose_name='Text', configuration='CKEDITOR_SETTINGS_TEXT_SLIDER_TEXT')
+
+ class Meta(CMSPlugin.Meta):
+ verbose_name = 'Text Slider Item'
+ verbose_name_plural = 'Text Slider Items'
+
+ def __str__(self):
+ return self.text
+
+
+class Quote(CMSPlugin):
+ content = HTMLField(verbose_name='Inhalt', configuration='CKEDITOR_SETTINGS_QUOTE_CONTENT')
+ source = HTMLField(verbose_name='Quelle', configuration='CKEDITOR_SETTINGS_QUOTE_SOURCE')
+ image = CroppableFilerImageField(verbose_name='Bild', null=True, blank=True)
+ cropping = ImageRatioField('image', '1000x1000', free_crop=True)
+
+ class Meta(CMSPlugin.Meta):
+ verbose_name = 'Quote'
+ verbose_name_plural = 'Quotes'
+
+ def __str__(self):
+ return self.content
+
+
+class DownloadSection(CMSPlugin):
+ class Meta(CMSPlugin.Meta):
+ verbose_name = 'Download Section'
+ verbose_name_plural = 'Download Sections'
+
+ def copy_relations(self, oldinstance):
+ self.folders.all().delete()
+
+ for folder in oldinstance.folders.all():
+ folder.pk = None
+ folder.download_section = self
+ folder.save()
+
+ @property
+ def items(self):
+ items = []
+ for folder in self.folders.all():
+ items = chain(items, folder.folder.files)
+ return list(items)
+
+
+class DownloadSectionFolder(models.Model):
+ download_section = models.ForeignKey(DownloadSection, verbose_name='Download Section', related_name='folders')
+ folder = FilerFolderField(verbose_name='Ordner')
+ ordering = models.IntegerField(verbose_name='Sortierung', default=5)
+
+ class Meta:
+ ordering = ['ordering']
+
+
+class HighlightList(CMSPlugin):
+ full_width = models.BooleanField(verbose_name='Volle Breite', default=False)
+
+ class Meta(CMSPlugin.Meta):
+ verbose_name = 'Highlight List'
+ verbose_name_plural = 'Highlight Lists'
+
+
+ANIMATED_ICON_CHOICES = (
+ ('strength', 'Stärken'),
+ ('learning', 'Lernen'),
+ ('creativity', 'Kreativität'),
+ ('curiosity', 'Neugierde'),
+ ('education', 'Bildung'),
+ ('happiness', 'Glücklichkeit'),
+)
+
+
+class HighlightListItem(CMSPlugin):
+ icon = IconField(verbose_name='Icon', null=True, blank=True)
+ animated_icon = models.CharField(verbose_name='Animiertes Icon', max_length=256, choices=ANIMATED_ICON_CHOICES,
+ null=True, blank=True)
+ title = HTMLField(verbose_name='Titel', configuration='CKEDITOR_SETTINGS_HIGHLIGHT_LIST_ITEM_TITLE')
+ text = HTMLField(verbose_name='Text', configuration='CKEDITOR_SETTINGS_HIGHLIGHT_LIST_ITEM_TEXT')
+
+ class Meta(CMSPlugin.Meta):
+ verbose_name = 'Highlight List Item'
+ verbose_name_plural = 'Highlight List Items'
+
+ def __str__(self):
+ return self.title
+
+
+class ReferenceListItem(CMSPlugin):
+ vimeo_id = models.IntegerField(verbose_name='Vimeo ID', help_text='e.g. https://vimeo.com/131766159')
+ thumbnail = CroppableFilerImageField(verbose_name='Vorschaubild')
+ cropping = ImageRatioField('thumbnail', '1000x1000', free_crop=True)
+
+ class Meta(CMSPlugin.Meta):
+ verbose_name = 'Reference List Item'
+ verbose_name_plural = 'Reference List Items'
+
+ def __str__(self):
+ return str(self.vimeo_id)
+
+
+class SocialMediaList(CMSPlugin):
+ class Meta(CMSPlugin.Meta):
+ verbose_name = 'Social Media List'
+ verbose_name_plural = 'Social Media Lists'
+
+ def copy_relations(self, oldinstance):
+ self.social_media_list_items.all().delete()
+
+ for social_media_list_item in oldinstance.social_media_list_items.all():
+ social_media_list_item.pk = None
+ social_media_list_item.social_media_list = self
+ social_media_list_item.save()
+
+
+class SocialMediaListItem(models.Model):
+ social_media_list = models.ForeignKey(SocialMediaList, verbose_name='Social Media List',
+ related_name='social_media_list_items')
+ icon = IconField(verbose_name='Icon')
+ url = models.URLField(verbose_name='URL')
+ ordering = models.IntegerField(verbose_name='Sortierung', default=5)
+
+ class Meta:
+ ordering = ['ordering']
+
+
+class Timetable(CMSPlugin):
+ start_image = CroppableFilerImageField(verbose_name='Startbild')
+ cropping = ImageRatioField('start_image', '1000x1000', free_crop=True)
+ introduction = HTMLField(verbose_name='Einleitung', configuration='CKEDITOR_SETTINGS_INPUT')
+
+ class Meta(CMSPlugin.Meta):
+ verbose_name = 'Timetable'
+ verbose_name_plural = 'Timetables'
+
+ def __str__(self):
+ return self.introduction
+
+
+class TimetableItem(CMSPlugin):
+ time = models.TimeField(verbose_name='Zeit')
+ image = CroppableFilerImageField(verbose_name='Bild')
+ cropping = ImageRatioField('image', '1000x1000', free_crop=True)
+ title = HTMLField(verbose_name='Titel', configuration='CKEDITOR_SETTINGS_TIMETABLE_ITEM_TITLE')
+ text = HTMLField(verbose_name='Text', configuration='CKEDITOR_SETTINGS_TIMETABLE_ITEM_TEXT')
+
+ class Meta(CMSPlugin.Meta):
+ verbose_name = 'Timetable Item'
+ verbose_name_plural = 'Timetables Items'
+
+ def __str__(self):
+ return '%s | %s' % (self.time, self.title)
+
+
+class Partner(CMSPlugin):
+ logo = CroppableFilerImageField(verbose_name='Bild')
+ cropping = ImageRatioField('logo', '1000x1000', free_crop=True)
+ name = HTMLField(verbose_name='Titel', configuration='CKEDITOR_SETTINGS_SLIDER_TITLE')
+ text = HTMLField(verbose_name='Text', configuration='CKEDITOR_SETTINGS_SLIDER_TEXT', blank=True, null=True)
+ url = models.URLField(verbose_name='URL', blank=True, null=True)
+
+ class Meta(CMSPlugin.Meta):
+ verbose_name = 'Slider Item'
+ verbose_name_plural = 'Slider Items'
+
+ def __str__(self):
+ return self.name
+
+
+class Image(without(AbstractPicture, 'picture')):
+ picture = CroppableFilerImageField(verbose_name='Bild', blank=True, null=True, on_delete=models.SET_NULL,
+ related_name='+')
+ cropping = ImageRatioField('picture', '1000x1000', free_crop=True)
+
+
+class TitleList(CMSPlugin):
+ class Meta(CMSPlugin.Meta):
+ verbose_name = 'Title List'
+ verbose_name_plural = 'Title Lists'
+
+ def copy_relations(self, oldinstance):
+ self.title_list_items.all().delete()
+
+ for title_list_item in oldinstance.title_list_items.all():
+ title_list_item.pk = None
+ title_list_item.title_list = self
+ title_list_item.save()
+
+
+class TitleListItem(models.Model):
+ title_list = models.ForeignKey(TitleList, verbose_name='Title List', related_name='title_list_items')
+ title = models.CharField(verbose_name='Title', max_length=256, null=True, blank=True)
+ text = models.TextField(verbose_name='Text')
+ ordering = models.IntegerField(verbose_name='Sortierung', default=5)
+
+ class Meta:
+ ordering = ['ordering']
diff --git a/src/project/search.py b/src/project/search.py
new file mode 100644
index 0000000..8168588
--- /dev/null
+++ b/src/project/search.py
@@ -0,0 +1,17 @@
+# -*- coding: utf-8 -*-
+from aldryn_search.base import AldrynIndexBase
+from haystack import indexes
+from haystack.utils.highlighting import Highlighter as _Highlighter
+
+
+class SearchIndex(AldrynIndexBase):
+ text = indexes.NgramField(document=True, use_template=False)
+
+
+class Highlighter(_Highlighter):
+ def render_html(self, highlight_locations=None, start_offset=None, end_offset=None):
+ return super(Highlighter, self).render_html(
+ highlight_locations=highlight_locations,
+ start_offset=max(0, start_offset - 20),
+ end_offset=end_offset + 20
+ )
diff --git a/src/project/templates/404.html b/src/project/templates/404.html
old mode 100644
new mode 100755
index b8b4dd8..ba9de39
--- a/src/project/templates/404.html
+++ b/src/project/templates/404.html
@@ -1,6 +1,19 @@
-{% extends 'main.html' %}
-{% load i18n %}
+{% extends 'project/content.html' %}
+{% load i18n cms_tags %}
-{% block content %}
- Error 404
+{% block title %}{% trans 'Seite nicht gefunden' %}{% endblock %}
+
+{% block content_intro %}
+ {% trans 'Seite nicht gefunden' as error %}
+ {% include 'project/includes/content_intro.html' with content_title=error %}
+{% endblock %}
+
+{% block content_main %}
+
+ {% trans 'Die Seite wurde leider nicht gefunden.' %}
+
+ {% trans 'Zurück zur Startseite' %}
+ {% trans 'Zur Suche' %}
+ {% trans 'Nehmen Sie mit uns Kontakt auf' %}
+
{% endblock %}
\ No newline at end of file
diff --git a/src/project/templates/500.html b/src/project/templates/500.html
old mode 100644
new mode 100755
index 3f2abe1..28584b9
--- a/src/project/templates/500.html
+++ b/src/project/templates/500.html
@@ -1,6 +1,20 @@
-{% extends 'main.html' %}
-{% load i18n %}
+{% extends 'project/content.html' %}
+{% load i18n cms_tags %}
-{% block content %}
- Error 500
+{% block title %}{% trans 'Ein Fehler ist aufgetreten' %}{% endblock %}
+
+{% block content_intro %}
+ {% trans 'Ein Fehler ist aufgetreten' as error %}
+ {% include 'project/includes/content_intro.html' with content_title=error %}
+{% endblock %}
+
+{% block content_main %}
+
+ {% trans 'Beim Aufrufen der Seite ist ein Fehler aufgetreten.' %}
+
+ {% trans 'Seite neu laden' %}
+ {% trans 'Zurück zur Startseite' %}
+ {% trans 'Zur Suche' %}
+ {% trans 'Nehmen Sie mit uns Kontakt auf' %}
+
{% endblock %}
\ No newline at end of file
diff --git a/src/project/templates/main.html b/src/project/templates/main.html
index 016b866..ddbe8e3 100644
--- a/src/project/templates/main.html
+++ b/src/project/templates/main.html
@@ -1,33 +1,82 @@
-{% load static i18n cms_tags sekizai_tags %}
-
-
-
-
- {% block title %}{% page_attribute page_title %}{% endblock %}
-
-
-
- {% block extra_meta %}
- {% endblock %}
-
-
-
- {% render_block "css" %}
- {{ ALDRYN_SNAKE.render_head }}
-
-
- {% cms_toolbar %}
-
- {% block content %}
- {% placeholder 'content' %}
- {% endblock %}
-
-
-
-
- {% block extra_body %}{% endblock %}
-
- {% render_block "js" %}
- {{ ALDRYN_SNAKE.render_tail }}
-
+{% load static i18n cms_tags sekizai_tags fontawesome %}
+
+
+
+
+ {% block title %}{% page_attribute page_title %}{% endblock %} | Tagesschule Elementa Zug
+
+
+
+ {% block extra_meta %}
+ {% endblock %}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {% fontawesome_stylesheet %}
+ {% render_block "css" %}
+ {{ ALDRYN_SNAKE.render_head }}
+
+
+{% cms_toolbar %}
+
+
+
+
+
+
+
+ {% include 'project/includes/navigation.html' %}
+
+
+
+ {% include 'project/includes/search_form.html' %}
+
+
+
+
+
+ {% block content %}
+ {% placeholder 'content' %}
+ {% endblock %}
+
+
+
+
+
+{% block extra_body %}{% endblock %}
+
+{% render_block "js" %}
+{{ ALDRYN_SNAKE.render_tail }}
+
diff --git a/src/project/templates/project/assets/arrow-down.svg b/src/project/templates/project/assets/arrow-down.svg
new file mode 100644
index 0000000..8d7faf7
--- /dev/null
+++ b/src/project/templates/project/assets/arrow-down.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/src/project/templates/project/assets/arrow-left.svg b/src/project/templates/project/assets/arrow-left.svg
new file mode 100644
index 0000000..e0246d0
--- /dev/null
+++ b/src/project/templates/project/assets/arrow-left.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/src/project/templates/project/assets/arrow-right-long.svg b/src/project/templates/project/assets/arrow-right-long.svg
new file mode 100644
index 0000000..8d5ca60
--- /dev/null
+++ b/src/project/templates/project/assets/arrow-right-long.svg
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/src/project/templates/project/assets/arrow-right.svg b/src/project/templates/project/assets/arrow-right.svg
new file mode 100644
index 0000000..d5f2d17
--- /dev/null
+++ b/src/project/templates/project/assets/arrow-right.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/src/project/templates/project/assets/clock.svg b/src/project/templates/project/assets/clock.svg
new file mode 100644
index 0000000..dd61e3c
--- /dev/null
+++ b/src/project/templates/project/assets/clock.svg
@@ -0,0 +1,127 @@
+
\ No newline at end of file
diff --git a/src/project/templates/project/assets/close.svg b/src/project/templates/project/assets/close.svg
new file mode 100644
index 0000000..c414147
--- /dev/null
+++ b/src/project/templates/project/assets/close.svg
@@ -0,0 +1,7 @@
+
\ No newline at end of file
diff --git a/src/project/templates/project/assets/download.svg b/src/project/templates/project/assets/download.svg
new file mode 100644
index 0000000..9b71762
--- /dev/null
+++ b/src/project/templates/project/assets/download.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/src/project/templates/project/assets/mail.svg b/src/project/templates/project/assets/mail.svg
new file mode 100644
index 0000000..f1229f7
--- /dev/null
+++ b/src/project/templates/project/assets/mail.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/src/project/templates/project/assets/menu.svg b/src/project/templates/project/assets/menu.svg
new file mode 100644
index 0000000..0523dac
--- /dev/null
+++ b/src/project/templates/project/assets/menu.svg
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/src/project/templates/project/assets/play.svg b/src/project/templates/project/assets/play.svg
new file mode 100644
index 0000000..46498ee
--- /dev/null
+++ b/src/project/templates/project/assets/play.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/src/project/templates/project/assets/search.svg b/src/project/templates/project/assets/search.svg
new file mode 100644
index 0000000..ebfce32
--- /dev/null
+++ b/src/project/templates/project/assets/search.svg
@@ -0,0 +1,7 @@
+
\ No newline at end of file
diff --git a/src/project/templates/project/contact.html b/src/project/templates/project/contact.html
new file mode 100644
index 0000000..035dbf9
--- /dev/null
+++ b/src/project/templates/project/contact.html
@@ -0,0 +1,24 @@
+{% extends 'main.html' %}
+{% load i18n cms_tags thumbnail %}
+
+{% block content %}
+
+{% endblock %}
+
+{% block extra_body %}
+
+{% endblock %}
\ No newline at end of file
diff --git a/src/project/templates/project/content.html b/src/project/templates/project/content.html
index 97af09a..98b8496 100644
--- a/src/project/templates/project/content.html
+++ b/src/project/templates/project/content.html
@@ -1,5 +1,31 @@
{% extends 'main.html' %}
-{% load i18n %}
+{% load i18n cms_tags %}
{% block content %}
+
+ {% block content_intro %}
+ {% include 'project/includes/content_intro.html' %}
+ {% endblock %}
+
+
+
+
+
+ {% block content_main %}
+ {% placeholder 'content' %}
+ {% endblock %}
+
+
+
+
+
{% endblock %}
\ No newline at end of file
diff --git a/src/project/templates/project/includes/content_intro.html b/src/project/templates/project/includes/content_intro.html
new file mode 100644
index 0000000..a2990d8
--- /dev/null
+++ b/src/project/templates/project/includes/content_intro.html
@@ -0,0 +1,16 @@
+{% load i18n cms_tags thumbnail %}
+
+
+
+ {% if content_title %}
+ {{ content_title }}
+ {% else %}
+ {% page_attribute page_title %}
+ {% endif %}
+
+ {% if request.current_page.imageextension.image %}
+ {% thumbnail request.current_page.imageextension.image 1600x800 box=request.current_page.imageextension.cropping crop detail as thumb %}
+
+ {% endif %}
+
\ No newline at end of file
diff --git a/src/project/templates/project/includes/navigation.html b/src/project/templates/project/includes/navigation.html
new file mode 100644
index 0000000..1b24a4b
--- /dev/null
+++ b/src/project/templates/project/includes/navigation.html
@@ -0,0 +1,25 @@
+{% load i18n cms_tags menu_tags %}
+
+
+
+
+ {% show_menu 0 1 100 1 %}
+
+
+
+
+
+
+ {% for lang in LANGUAGES %}
+ -
+ {{ lang.0 }}
+
+ {% endfor %}
+
+
+ {% static_placeholder 'social_media' %}
+
\ No newline at end of file
diff --git a/src/project/templates/project/includes/page_item.html b/src/project/templates/project/includes/page_item.html
new file mode 100644
index 0000000..626003a
--- /dev/null
+++ b/src/project/templates/project/includes/page_item.html
@@ -0,0 +1,40 @@
+{% load i18n highlight thumbnail cms_tags %}
+
+{% if not search and not title and not text %}
+ {% page_attribute 'page_title' page as title %}
+ {% page_attribute 'meta_description' page as text %}
+{% endif %}
+
+
+
+
+ {% if image %}
+ {% thumbnail image 1000x600 box=cropping crop detail as thumb %}
+
+ {% endif %}
+
{% if search %}{{ page.title }}{% else %}{{ title }}{% endif %}
+
+
+ {% if subpage %}
+
{% if search %}{{ page.title }}{% else %}{{ title }}{% endif %}
+ {% else %}
+
{% if search %}{{ page.title }}{% else %}{{ title }}{% endif %}
+ {% endif %}
+
+ {% if search %}
+
{% highlight page.text with request.GET.q %}
+ {% else %}
+
{{ text }}
+ {% endif %}
+
+
+
+ {% include 'project/assets/arrow-right-long.svg' %}
+ {% trans 'Mehr' %}
+
+
+
+
+
\ No newline at end of file
diff --git a/src/project/templates/project/includes/pagination.html b/src/project/templates/project/includes/pagination.html
new file mode 100644
index 0000000..942b4f7
--- /dev/null
+++ b/src/project/templates/project/includes/pagination.html
@@ -0,0 +1,29 @@
+{% load i18n spurl %}
+
+{% if page_obj.has_other_pages %}
+
+
+ {% with from=page_obj.start_index until=page_obj.end_index count=page_obj.paginator.count %}
+
{% blocktrans %}{{ from }} – {{ until }} of {{ count }} {{ obj_string }} are displayed{% endblocktrans %}
+ {% endwith %}
+
+ {% if page_obj.has_previous %}
+ - « {% trans "previous" %}
+ {% endif %}
+ {% for page_num in page_obj.page_range %}
+ {% if page_num %}
+ {% if page_obj.number == page_num %}
+ - {{ page_num }}
+ {% else %}
+ - {{ page_num }}
+ {% endif %}
+ {% else %}
+ - ...
+ {% endif %}
+ {% endfor %}
+ {% if page_obj.has_next %}
+ - {% trans "next" %} »
+ {% endif %}
+
+
+{% endif %}
\ No newline at end of file
diff --git a/src/project/templates/project/includes/search_form.html b/src/project/templates/project/includes/search_form.html
new file mode 100644
index 0000000..0da837e
--- /dev/null
+++ b/src/project/templates/project/includes/search_form.html
@@ -0,0 +1,55 @@
+{% load i18n cms_tags %}
+
+
+ {% url 'search' as search_url %}
+ {% with request.get_full_path as current_url %}
+
+ {% endwith %}
+
+
+
+
+
+
+
+
+ {% if page_obj.object_list|length > 0 %}
+ {% blocktrans with amount=page_obj.object_list|length q=search_form.q.value %}
+ {{ amount }} Resultate für «{{ q }}»:
+ {% endblocktrans %}
+ {% else %}
+
+ {% blocktrans with q=search_form.q.value %}
+ Leider wurden keine Resultate mit dem Begriff «{{ q }}» gefunden.
+ Sie erreichen uns auch über andere Kanäle:
+ {% endblocktrans %}
+ {% trans 'Zum Kontakt' %}
+
+ {% endif %}
+
+
+ {% for page in page_obj.object_list %}
+ {% include "project/includes/page_item.html" with search=True image=page.object.page.imageextension.image cropping=page.object.page.imageextension.cropping %}
+ {% endfor %}
+
+ {# {% include "project/includes/pagination.html" with obj_string=_('results') %}#}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/project/templates/project/list.html b/src/project/templates/project/list.html
new file mode 100644
index 0000000..055070b
--- /dev/null
+++ b/src/project/templates/project/list.html
@@ -0,0 +1,21 @@
+{% extends 'main.html' %}
+{% load i18n cms_tags thumbnail %}
+
+{% block content %}
+
+ {% include 'project/includes/content_intro.html' %}
+
+
+
+
+ {% for page in request.current_page.get_child_pages %}
+ {% if page.get_public_url %}
+ {% include "project/includes/page_item.html" with image=page.imageextension.image cropping=page.imageextension.cropping index=forloop.counter0 %}
+ {% endif %}
+ {% endfor %}
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/src/project/templates/project/newsletter/archive.html b/src/project/templates/project/newsletter/archive.html
new file mode 100644
index 0000000..96647d7
--- /dev/null
+++ b/src/project/templates/project/newsletter/archive.html
@@ -0,0 +1,7 @@
+
+
+ {% for campaign in campaigns %}
+ {% include "project/includes/page_item.html" with title=campaign.title text=campaign.text url=campaign.url target='_blank' image=False index=forloop.counter0 subpage=True %}
+ {% endfor %}
+
+
\ No newline at end of file
diff --git a/src/project/templates/project/newsletter/subscription.html b/src/project/templates/project/newsletter/subscription.html
new file mode 100644
index 0000000..1d23543
--- /dev/null
+++ b/src/project/templates/project/newsletter/subscription.html
@@ -0,0 +1,5 @@
+{% extends 'project/content.html' %}
+
+{% block content_main %}
+ {% include 'project/newsletter/subscription_form.html' %}
+{% endblock %}
\ No newline at end of file
diff --git a/src/project/templates/project/newsletter/subscription_form.html b/src/project/templates/project/newsletter/subscription_form.html
new file mode 100644
index 0000000..148c3be
--- /dev/null
+++ b/src/project/templates/project/newsletter/subscription_form.html
@@ -0,0 +1,48 @@
+{% load i18n %}
+
+
\ No newline at end of file
diff --git a/src/project/templates/project/plugins/contact/journey_calculator.html b/src/project/templates/project/plugins/contact/journey_calculator.html
new file mode 100644
index 0000000..9d28b76
--- /dev/null
+++ b/src/project/templates/project/plugins/contact/journey_calculator.html
@@ -0,0 +1,16 @@
+{% load i18n cms_tags %}
+
+
+
+ {% for plugin in instance.child_plugin_instances %}
+ {% render_plugin plugin %}
+ {% endfor %}
+
+
+
+ {% trans 'Bitte wählen Sie einen der vorgeschlagenen Orte aus.' %}
+
+
\ No newline at end of file
diff --git a/src/project/templates/project/plugins/content/download_section.html b/src/project/templates/project/plugins/content/download_section.html
new file mode 100644
index 0000000..ed43385
--- /dev/null
+++ b/src/project/templates/project/plugins/content/download_section.html
@@ -0,0 +1,18 @@
+
\ No newline at end of file
diff --git a/src/project/templates/project/plugins/content/highlight_list.html b/src/project/templates/project/plugins/content/highlight_list.html
new file mode 100644
index 0000000..f3f7709
--- /dev/null
+++ b/src/project/templates/project/plugins/content/highlight_list.html
@@ -0,0 +1,15 @@
+{% load cms_tags %}
+
+
+
+ {% for plugin in instance.child_plugin_instances %}
+ {% if plugin.plugin_type == 'HighlightListItemPlugin' %}
+
+ {% render_plugin plugin %}
+
+ {% else %}
+ {% render_plugin plugin %}
+ {% endif %}
+ {% endfor %}
+
+
\ No newline at end of file
diff --git a/src/project/templates/project/plugins/content/highlight_list_item.html b/src/project/templates/project/plugins/content/highlight_list_item.html
new file mode 100644
index 0000000..7a5f6a7
--- /dev/null
+++ b/src/project/templates/project/plugins/content/highlight_list_item.html
@@ -0,0 +1,14 @@
+{% load fontawesome %}
+
+
+
+ {% if instance.animated_icon %}
+
+
+ {% else %}
+ {% fontawesome_icon instance.icon large=True %}
+ {% endif %}
+
+
{{ instance.title }}
+
{{ instance.text }}
+
\ No newline at end of file
diff --git a/src/project/templates/project/plugins/content/partner.html b/src/project/templates/project/plugins/content/partner.html
new file mode 100644
index 0000000..c1e44f7
--- /dev/null
+++ b/src/project/templates/project/plugins/content/partner.html
@@ -0,0 +1,16 @@
+{% load thumbnail %}
+
+
\ No newline at end of file
diff --git a/src/project/templates/project/plugins/content/quote.html b/src/project/templates/project/plugins/content/quote.html
new file mode 100644
index 0000000..1fe38c3
--- /dev/null
+++ b/src/project/templates/project/plugins/content/quote.html
@@ -0,0 +1,17 @@
+{% load thumbnail %}
+
+
+
{{ instance.content }}
+ {% if instance.image %}
+
+
+ {% thumbnail instance.image 460x576 box=instance.cropping crop detail as thumb %}
+

+
+
{{ instance.source }}
+
+ {% else %}
+
{{ instance.source }}
+ {% endif %}
+
\ No newline at end of file
diff --git a/src/project/templates/project/plugins/content/reference_list.html b/src/project/templates/project/plugins/content/reference_list.html
new file mode 100644
index 0000000..7b1fddc
--- /dev/null
+++ b/src/project/templates/project/plugins/content/reference_list.html
@@ -0,0 +1,26 @@
+{% load cms_tags %}
+
+
+
+
+ {% for plugin in instance.child_plugin_instances %}
+
+ {% render_plugin plugin %}
+
+ {% endfor %}
+
+ {% include 'project/plugins/content/reference_list_item.html' %}
+
+
+
+
+
+ {% for plugin in instance.child_plugin_instances %}
+
+ {% include 'project/plugins/content/video.html' with instance=plugin %}
+
+ {% endfor %}
+
+
+
\ No newline at end of file
diff --git a/src/project/templates/project/plugins/content/reference_list_item.html b/src/project/templates/project/plugins/content/reference_list_item.html
new file mode 100644
index 0000000..2b23675
--- /dev/null
+++ b/src/project/templates/project/plugins/content/reference_list_item.html
@@ -0,0 +1,17 @@
+{% load i18n thumbnail %}
+
+
+
+ {% if instance.thumbnail %}
+ {% thumbnail instance.thumbnail 460x576 box=instance.cropping crop detail as thumb %}
+

+ {% endif %}
+
+ {% if instance.vimeo_id %}
+
+ {% include 'project/assets/play.svg' %}
+ {% trans 'Video Abspielen' %}
+
+ {% endif %}
+
\ No newline at end of file
diff --git a/src/project/templates/project/plugins/content/section.html b/src/project/templates/project/plugins/content/section.html
new file mode 100644
index 0000000..c6f3618
--- /dev/null
+++ b/src/project/templates/project/plugins/content/section.html
@@ -0,0 +1,8 @@
+{% load cms_tags %}
+
+
+
{{ instance.title }}
+ {% for plugin in instance.child_plugin_instances %}
+ {% render_plugin plugin %}
+ {% endfor %}
+
\ No newline at end of file
diff --git a/src/project/templates/project/plugins/content/section_text.html b/src/project/templates/project/plugins/content/section_text.html
new file mode 100644
index 0000000..ada5bf9
--- /dev/null
+++ b/src/project/templates/project/plugins/content/section_text.html
@@ -0,0 +1,7 @@
+{% load cms_tags %}
+
+
+ {% for plugin in instance.child_plugin_instances %}
+ {% render_plugin plugin %}
+ {% endfor %}
+
\ No newline at end of file
diff --git a/src/project/templates/project/plugins/content/section_title.html b/src/project/templates/project/plugins/content/section_title.html
new file mode 100644
index 0000000..ac73b12
--- /dev/null
+++ b/src/project/templates/project/plugins/content/section_title.html
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/src/project/templates/project/plugins/content/slider.html b/src/project/templates/project/plugins/content/slider.html
new file mode 100644
index 0000000..dd59e28
--- /dev/null
+++ b/src/project/templates/project/plugins/content/slider.html
@@ -0,0 +1,36 @@
+{% load cms_tags i18n thumbnail %}
+
+
\ No newline at end of file
diff --git a/src/project/templates/project/plugins/content/slider_item.html b/src/project/templates/project/plugins/content/slider_item.html
new file mode 100644
index 0000000..f63c7cc
--- /dev/null
+++ b/src/project/templates/project/plugins/content/slider_item.html
@@ -0,0 +1,24 @@
+{% load i18n %}
+
+
+
{{ instance.title }}
+ {% if instance.subline %}
+
{{ instance.subline }}
+ {% endif %}
+ {% if instance.text %}
+
{{ instance.text }}
+ {% endif %}
+ {% if instance.qualifications.count > 0 %}
+
{% trans 'Qualifikationen' %}:
+
+ {% for qualification in instance.qualifications.all %}
+ - {{ qualification.name }}
+ {% endfor %}
+
+ {% endif %}
+ {% if instance.email %}
+
+ {% include 'project/assets/mail.svg' %}
+
+ {% endif %}
+
\ No newline at end of file
diff --git a/src/project/templates/project/plugins/content/spacer.html b/src/project/templates/project/plugins/content/spacer.html
new file mode 100644
index 0000000..aeece22
--- /dev/null
+++ b/src/project/templates/project/plugins/content/spacer.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/project/templates/project/plugins/content/subpage_list.html b/src/project/templates/project/plugins/content/subpage_list.html
new file mode 100644
index 0000000..df113fc
--- /dev/null
+++ b/src/project/templates/project/plugins/content/subpage_list.html
@@ -0,0 +1,9 @@
+
+
+ {% for page in request.current_page.get_child_pages %}
+ {% if page.get_public_url %}
+ {% include "project/includes/page_item.html" with image=page.imageextension.image cropping=page.imageextension.cropping index=forloop.counter0 subpage=True %}
+ {% endif %}
+ {% endfor %}
+
+
\ No newline at end of file
diff --git a/src/project/templates/project/plugins/content/text_slider.html b/src/project/templates/project/plugins/content/text_slider.html
new file mode 100644
index 0000000..f6459fb
--- /dev/null
+++ b/src/project/templates/project/plugins/content/text_slider.html
@@ -0,0 +1,24 @@
+{% load cms_tags i18n %}
+
+
\ No newline at end of file
diff --git a/src/project/templates/project/plugins/content/text_slider_item.html b/src/project/templates/project/plugins/content/text_slider_item.html
new file mode 100644
index 0000000..ea9e5a2
--- /dev/null
+++ b/src/project/templates/project/plugins/content/text_slider_item.html
@@ -0,0 +1,3 @@
+
+ {{ instance.text }}
+
\ No newline at end of file
diff --git a/src/project/templates/project/plugins/content/title_list.html b/src/project/templates/project/plugins/content/title_list.html
new file mode 100644
index 0000000..3cff5cf
--- /dev/null
+++ b/src/project/templates/project/plugins/content/title_list.html
@@ -0,0 +1,10 @@
+{% load fontawesome %}
+
+
+ {% for item in instance.title_list_items.all %}
+ -
+ {{ item.title }}
+ {{ item.text }}
+
+ {% endfor %}
+
\ No newline at end of file
diff --git a/src/project/templates/project/plugins/content/video.html b/src/project/templates/project/plugins/content/video.html
new file mode 100644
index 0000000..bf68058
--- /dev/null
+++ b/src/project/templates/project/plugins/content/video.html
@@ -0,0 +1,14 @@
+{% load i18n thumbnail %}
+
+
\ No newline at end of file
diff --git a/src/project/templates/project/plugins/social/social_media_list.html b/src/project/templates/project/plugins/social/social_media_list.html
new file mode 100644
index 0000000..68470f4
--- /dev/null
+++ b/src/project/templates/project/plugins/social/social_media_list.html
@@ -0,0 +1,11 @@
+{% load fontawesome %}
+
+
\ No newline at end of file
diff --git a/src/project/templates/project/plugins/timetable/timetable.html b/src/project/templates/project/plugins/timetable/timetable.html
new file mode 100644
index 0000000..2ae4519
--- /dev/null
+++ b/src/project/templates/project/plugins/timetable/timetable.html
@@ -0,0 +1,59 @@
+{% load i18n cms_tags thumbnail %}
+
+
\ No newline at end of file
diff --git a/src/project/templates/project/plugins/timetable/timetable_item.html b/src/project/templates/project/plugins/timetable/timetable_item.html
new file mode 100644
index 0000000..fc53c9d
--- /dev/null
+++ b/src/project/templates/project/plugins/timetable/timetable_item.html
@@ -0,0 +1,17 @@
+{% load thumbnail %}
+
+
+
+
+
+
+
{{ instance.text }}
+
+
+
\ No newline at end of file
diff --git a/src/project/templates/project/search.html b/src/project/templates/project/search.html
new file mode 100644
index 0000000..a459c9b
--- /dev/null
+++ b/src/project/templates/project/search.html
@@ -0,0 +1,13 @@
+{% extends 'main.html' %}
+{% load i18n %}
+
+{% block body_class %}_search search_open {% if search_form.q.value %}search_results{% endif %}{% endblock %}
+
+{% block title %}{% trans 'Suche' %}{% endblock %}
+
+{% block extra_meta %}
+
+{% endblock %}
+
+{% block content %}
+{% endblock %}
\ No newline at end of file
diff --git a/src/project/templates/project/timetable.html b/src/project/templates/project/timetable.html
new file mode 100644
index 0000000..94754cd
--- /dev/null
+++ b/src/project/templates/project/timetable.html
@@ -0,0 +1,6 @@
+{% extends 'main.html' %}
+{% load i18n cms_tags %}
+
+{% block content %}
+ {% placeholder 'timetable' %}
+{% endblock %}
\ No newline at end of file
diff --git a/src/project/urls.py b/src/project/urls.py
index 40a96af..e4bbac6 100644
--- a/src/project/urls.py
+++ b/src/project/urls.py
@@ -1 +1,14 @@
# -*- coding: utf-8 -*-
+from django.conf.urls import url
+from django.utils.translation import ugettext_lazy as _
+from django.views.generic.base import TemplateView
+
+from project.views import SearchView, NewsletterSubscriptionView
+
+urlpatterns = [
+ url(_(r'^suche/'), SearchView.as_view(), kwargs={'search': True}, name='search'),
+ url(r'^newsletter/subscription/$', NewsletterSubscriptionView.as_view(), name='newsletter_subscription'),
+ url(r'^newsletter/subscription/success/$',
+ TemplateView.as_view(template_name='project/newsletter/subscription.html'), kwargs={'success': True},
+ name='newsletter_subscription_success'),
+]
diff --git a/src/project/utils.py b/src/project/utils.py
new file mode 100644
index 0000000..3221396
--- /dev/null
+++ b/src/project/utils.py
@@ -0,0 +1,49 @@
+# -*- coding: utf-8 -*-
+from filer.fields.image import AdminImageWidget, AdminImageFormField, FilerImageField
+from filer.models import File
+
+
+# https://stackoverflow.com/questions/27033485/how-to-crop-an-image-selected-with-django-filer-in-django-admin
+class CroppableImageWidget(AdminImageWidget):
+ def render(self, name, value, attrs=None):
+ if value:
+ file_obj = File.objects.get(pk=value)
+ attrs = attrs or {}
+ attrs.update({
+ 'class': 'crop-thumb',
+ 'data-thumbnail-url':
+ file_obj.thumbnails['admin_sidebar_preview'],
+ 'data-field-name': name,
+ 'data-org-width': file_obj.width,
+ 'data-org-height': file_obj.height,
+ })
+
+ return super().render(name, value, attrs)
+
+ class Media:
+ js = [
+ 'filer/js/addons/popup_handling.js',
+ 'cms/js/libs/jquery.min.js',
+ 'image_cropping/js/jquery.Jcrop.min.js',
+ 'image_cropping/image_cropping.js',
+ ]
+ css = {'all': ('image_cropping/css/jquery.Jcrop.min.css', 'image_cropping/css/admin_fix.css')}
+
+
+class CroppableFormField(AdminImageFormField):
+ widget = CroppableImageWidget
+
+
+class CroppableFilerImageField(FilerImageField):
+ default_form_class = CroppableFormField
+
+
+# https://gist.github.com/specialunderwear/9d917ddacf3547b646ba
+def AbstractClassWithoutFieldsNamed(cls, *excl):
+ if cls._meta.abstract:
+ remove_fields = [f for f in cls._meta.local_fields if f.name in excl]
+ for f in remove_fields:
+ cls._meta.local_fields.remove(f)
+ return cls
+ else:
+ raise Exception("Not an abstract model")
diff --git a/src/project/views.py b/src/project/views.py
index 40a96af..82c8f8e 100644
--- a/src/project/views.py
+++ b/src/project/views.py
@@ -1 +1,23 @@
# -*- coding: utf-8 -*-
+from aldryn_search.views import AldrynSearchView
+from django.core.urlresolvers import reverse_lazy
+from django.views.generic.edit import FormView
+
+from project.forms import NewsletterSubscriptionForm
+
+
+class SearchView(AldrynSearchView):
+ template_name = 'project/search.html'
+
+ def get_context_data(self, **kwargs):
+ context = super(SearchView, self).get_context_data(**kwargs)
+ search_form = context['form']
+ context['search_form'] = search_form
+ del context['form']
+ return context
+
+
+class NewsletterSubscriptionView(FormView):
+ template_name = 'project/newsletter/subscription.html'
+ form_class = NewsletterSubscriptionForm
+ success_url = reverse_lazy('newsletter_subscription_success')
diff --git a/static/djangocms_text_ckeditor/ckeditor/CHANGES.md b/static/djangocms_text_ckeditor/ckeditor/CHANGES.md
index 0803614..ff58654 100644
--- a/static/djangocms_text_ckeditor/ckeditor/CHANGES.md
+++ b/static/djangocms_text_ckeditor/ckeditor/CHANGES.md
@@ -1,145 +1,6 @@
CKEditor 4 Changelog
====================
-## CKEditor 4.7.3
-
-New Features:
-
-* [#568](https://github.com/ckeditor/ckeditor-dev/issues/568): Added possibility to adjust nested editables' filters using the [`CKEDITOR.filter.disallowedContent`](https://docs.ckeditor.com/#!/api/CKEDITOR.filter-property-disallowedContent) property.
-
-Fixed Issues:
-
-* [#554](https://github.com/ckeditor/ckeditor-dev/issues/554): Fixed: [`change`](https://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-change) event not fired when typing the first character after pasting into the editor. Thanks to [Daniel Miller](https://github.com/millerdev)!
-* [#566](https://github.com/ckeditor/ckeditor-dev/issues/566): Fixed: The CSS `border` shorthand property with zero width (`border: 0px solid #000;`) causes the table to have the border attribute set to 1.
-* [#779](https://github.com/ckeditor/ckeditor-dev/issues/779): Fixed: The [Remove Format](https://ckeditor.com/addon/removeformat) plugin removes elements with language definition inserted by the [Language](https://ckeditor.com/addon/language) plugin.
-* [#423](https://github.com/ckeditor/ckeditor-dev/issues/423): Fixed: The [Paste from Word](https://ckeditor.com/addon/pastefromword) plugin pastes paragraphs into the editor even if [`CKEDITOR.config.enterMode`](https://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-enterMode) is set to `CKEDITOR.ENTER_BR`.
-* [#719](https://github.com/ckeditor/ckeditor-dev/issues/719): Fixed: Image inserted using the [Enhanced Image](https://ckeditor.com/addon/image2) plugin can be resized when the editor is in [read-only mode](https://docs.ckeditor.com/#!/guide/dev_readonly).
-* [#577](https://github.com/ckeditor/ckeditor-dev/issues/577): Fixed: The "Delete Columns" command provided by the [Table Tools](https://ckeditor.com/addon/tabletools) plugin throws an error when trying to delete columns.
-* [#867](https://github.com/ckeditor/ckeditor-dev/issues/867): Fixed: Typing into a selected table throws an error.
-* [#817](https://github.com/ckeditor/ckeditor-dev/issues/817): Fixed: The [Save](https://ckeditor.com/addon/save) plugin does not work in [Source Mode](https://ckeditor.com/addon/sourcearea).
-
-Other Changes:
-
-* Updated the [WebSpellChecker](http://ckeditor.com/addon/wsc) plugin:
- * [#40](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/40): Fixed: IE10 throws an error when spell checking is started.
-* [#800](https://github.com/ckeditor/ckeditor-dev/issues/800): Added the [`CKEDITOR.dom.selection.isCollapsed`](https://docs.ckeditor.com/#!/api/CKEDITOR.dom.selection-method-isCollapsed) method which is a simpler way to check if the selection is collapsed.
-* [#830](https://github.com/ckeditor/ckeditor-dev/issues/830): Added an option to define which dialog tab should be shown by default when creating [`CKEDITOR.dialogCommand`](https://docs.ckeditor.com/#!/api/CKEDITOR.dialogCommand).
-
-## CKEditor 4.7.2
-
-New Features:
-
-* [#455](https://github.com/ckeditor/ckeditor-dev/issues/455): Added [Advanced Content Filter](https://docs.ckeditor.com/#!/guide/dev_acf) integration with the [Justify](http://ckeditor.com/addon/justify) plugin.
-
-Fixed Issues:
-
-* [#663](https://github.com/ckeditor/ckeditor-dev/issues/663): [Chrome] Fixed: Clicking the scrollbar throws an `Uncaught TypeError: element.is is not a function` error.
-* [#694](https://github.com/ckeditor/ckeditor-dev/pull/694): Refactoring in the [Table Selection](http://ckeditor.com/addon/tableselection) plugin:
- * [#520](https://github.com/ckeditor/ckeditor-dev/issues/520): Fixed: Widgets cannot be properly pasted into a table cell.
- * [#460](https://github.com/ckeditor/ckeditor-dev/issues/460): Fixed: Editor gone after pasting into an editor within a table.
-* [#579](https://github.com/ckeditor/ckeditor-dev/issues/579): Fixed: Internal `cke_table-faked-selection-table` class is visible in the Stylesheet Classes field of the [Table Properties](http://ckeditor.com/addon/table) dialog.
-* [#545](https://github.com/ckeditor/ckeditor-dev/issues/545): [Edge] Fixed: Error thrown when pressing the [Select All](https://ckeditor.com/addon/selectall) button in [Source Mode](http://ckeditor.com/addon/sourcearea).
-* [#582](https://github.com/ckeditor/ckeditor-dev/issues/582): Fixed: Double slash in the path to stylesheet needed by the [Table Selection](http://ckeditor.com/addon/tableselection) plugin. Thanks to [Marius Dumitru Florea](https://github.com/mflorea)!
-* [#491](https://github.com/ckeditor/ckeditor-dev/issues/491): Fixed: Unnecessary dependency on the [Editor Toolbar](http://ckeditor.com/addon/toolbar) plugin inside the [Notification](http://ckeditor.com/addon/notification) plugin.
-* [#646](https://github.com/ckeditor/ckeditor-dev/issues/646): Fixed: Error thrown into the browser console after opening the [Styles Combo](http://ckeditor.com/addon/stylescombo) plugin menu in the editor without any selection.
-* [#501](https://github.com/ckeditor/ckeditor-dev/issues/501): Fixed: Double click does not open the dialog for modifying anchors inserted via the [Link](http://ckeditor.com/addon/link) plugin.
-* [#9780](https://dev.ckeditor.com/ticket/9780): [IE8-9] Fixed: Clicking inside an empty [read-only](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-readOnly) editor throws an error.
-* [#16820](https://dev.ckeditor.com/ticket/16820): [IE10] Fixed: Clicking below a single horizontal rule throws an error.
-* [#426](https://github.com/ckeditor/ckeditor-dev/issues/426): Fixed: The [`range.cloneContents`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.range-method-cloneContents) method selects the whole element when the selection starts at the beginning of that element.
-* [#644](https://github.com/ckeditor/ckeditor-dev/issues/644): Fixed: The [`range.extractContents`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.range-method-extractContents) method returns an incorrect result when multiple nodes are selected.
-* [#684](https://github.com/ckeditor/ckeditor-dev/issues/684): Fixed: The [`elementPath.contains`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.elementPath-method-contains) method incorrectly excludes the last element instead of root when the `fromTop` parameter is set to `true`.
-
-Other Changes:
-
-* Updated the [SCAYT](http://ckeditor.com/addon/scayt) (Spell Check As You Type) plugin:
- * [#148](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/148): Fixed: SCAYT leaves underlined word after the CKEditor Replace dialog corrects it.
-* [#751](https://github.com/ckeditor/ckeditor-dev/issues/751): Added the [`CKEDITOR.dom.nodeList.toArray`](https://docs.ckeditor.com/#!/api/CKEDITOR.dom.nodeList-method-toArray) method which returns an array representation of a [node list](https://docs.ckeditor.com/#!/api/CKEDITOR.dom.nodeList).
-
-## CKEditor 4.7.1
-
-New Features:
-
-* Added a new Mexican Spanish localization. Thanks to [David Alexandro Rodriguez](https://www.transifex.com/user/profile/darsco16/)!
-* [#413](https://github.com/ckeditor/ckeditor-dev/issues/413): Added Paste as Plain Text keyboard shortcut to the [Accessibility Help](http://ckeditor.com/addon/a11yhelp) instructions.
-
-Fixed Issues:
-
-* [#515](https://github.com/ckeditor/ckeditor-dev/issues/515): [Chrome] Fixed: Mouse actions on CKEditor scrollbar throw an exception when the [Table Selection](http://ckeditor.com/addon/tableselection) plugin is loaded.
-* [#493](https://github.com/ckeditor/ckeditor-dev/issues/493): Fixed: Selection started from a nested table causes an error in the browser while scrolling down.
-* [#415](https://github.com/ckeditor/ckeditor-dev/issues/415): [Firefox] Fixed: Enter key breaks the table structure when pressed in a table selection.
-* [#457](https://github.com/ckeditor/ckeditor-dev/issues/457): Fixed: Error thrown when deleting content from the editor with no selection.
-* [#478](https://github.com/ckeditor/ckeditor-dev/issues/478): [Chrome] Fixed: Error thrown by the [Enter Key](http://ckeditor.com/addon/enterkey) plugin when pressing Enter with no selection.
-* [#424](https://github.com/ckeditor/ckeditor-dev/issues/424): Fixed: Error thrown by [Tab Key Handling](http://ckeditor.com/addon/tab) and [Indent List](http://ckeditor.com/addon/indentlist) plugins when pressing Tab with no selection in inline editor.
-* [#476](https://github.com/ckeditor/ckeditor-dev/issues/476): Fixed: Anchors inserted with the [Link](http://ckeditor.com/addon/link) plugin on collapsed selection cannot be edited.
-* [#417](https://github.com/ckeditor/ckeditor-dev/issues/417): Fixed: The [Table Resize](http://ckeditor.com/addon/tableresize) plugin throws an error when used with a table with only header or footer rows.
-* [#523](https://github.com/ckeditor/ckeditor-dev/issues/523): Fixed: The [`editor.getCommandKeystroke`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-getCommandKeystroke) method does not obtain the correct keystroke.
-* [#534](https://github.com/ckeditor/ckeditor-dev/issues/534): [IE] Fixed: [Paste from Word](http://ckeditor.com/addon/pastefromword) does not work in Quirks Mode.
-* [#450](https://github.com/ckeditor/ckeditor-dev/issues/450): Fixed: [`CKEDITOR.filter`](http://docs.ckeditor.com/#!/api/CKEDITOR.filter) incorrectly transforms the `margin` CSS property.
-
-## CKEditor 4.7
-
-**Important Notes:**
-
-* [#13793](http://dev.ckeditor.com/ticket/13793): The [`embed_provider`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-embed_provider) configuration option for the [Media Embed](http://ckeditor.com/addon/embed) and [Semantic Media Embed](http://ckeditor.com/addon/embedsemantic) plugins is no longer preset by default.
-* The [UI Color](http://ckeditor.com/addon/uicolor) plugin now uses a custom color picker instead of the `YUI 2.7.0` library which has some known vulnerabilities (it's a security precaution, there was no security issue in CKEditor due to the way it was used).
-
-New Features:
-
-* [#16755](http://dev.ckeditor.com/ticket/16755): Added the [Table Selection](http://ckeditor.com/addon/tableselection) plugin that lets you select and manipulate an arbitrary rectangular table fragment (a few cells, a row or a column).
-* [#16961](http://dev.ckeditor.com/ticket/16961): Added support for pasting from Microsoft Excel.
-* [#13381](http://dev.ckeditor.com/ticket/13381): Dynamic code evaluation call in [`CKEDITOR.template`](http://docs.ckeditor.com/#!/api/CKEDITOR.template) removed. CKEditor can now be used without the `unsafe-eval` Content Security Policy. Thanks to [Caridy Patiño](http://caridy.name)!
-* [#16971](http://dev.ckeditor.com/ticket/16971): Added support for color in the `background` property containing also other styles for table cells in the [Table Tools](http://ckeditor.com/addon/tabletools) plugin.
-* [#16847](http://dev.ckeditor.com/ticket/16847): Added support for parsing and inlining any formatting created using the Microsoft Word style system to the [Paste from Word](http://ckeditor.com/addon/pastefromword) plugin.
-* [#16818](http://dev.ckeditor.com/ticket/16818): Added table cell height parsing in the [Paste from Word](http://ckeditor.com/addon/pastefromword) plugin.
-* [#16850](http://dev.ckeditor.com/ticket/16850): Added a new [`config.enableContextMenu`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-enableContextMenu) configuration option for enabling and disabling the [context menu](http://ckeditor.com/addon/contextmenu).
-* [#16937](http://dev.ckeditor.com/ticket/16937): The `command` parameter in [CKEDITOR.editor.getCommandKeystroke](http://docs.ckeditor.dev/#!/api/CKEDITOR.editor-method-getCommandKeystroke) now also accepts a command name as an argument.
-* [#17010](http://dev.ckeditor.com/ticket/17010): The [`CKEDITOR.dom.range.shrink`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.range-method-shrink) method now allows for skipping bogus `
` elements.
-
-Fixed Issues:
-
-* [#16935](http://dev.ckeditor.com/ticket/16935): [Chrome] Fixed: Blurring the editor in [Source Mode](http://ckeditor.com/addon/sourcearea) throws an error.
-* [#16825](http://dev.ckeditor.com/ticket/16825): [Chrome] Fixed: Error thrown when destroying a focused inline editor.
-* [#16857](http://dev.ckeditor.com/ticket/16857): Fixed: Ctrl+Shift+V blocked by [Copy Formatting](http://ckeditor.com/addon/copyformatting).
-* [#16845](https://dev.ckeditor.com/ticket/16845): [IE] Fixed: Cursor jumps to the top of the scrolled editor after focusing it when the [Copy Formatting](http://ckeditor.com/addon/copyformatting) plugin is enabled.
-* [#16786](http://dev.ckeditor.com/ticket/16786): Fixed: Added missing translations for the [Copy Formatting](http://ckeditor.com/addon/copyformatting) plugin.
-* [#14714](http://dev.ckeditor.com/ticket/14714): [WebKit/Blink] Fixed: Exception thrown on refocusing a blurred inline editor.
-* [#16913](http://dev.ckeditor.com/ticket/16913): [Firefox, IE] Fixed: [Paste as Plain Text](http://ckeditor.com/addon/pastetext) keystroke does not work.
-* [#16968](http://dev.ckeditor.com/ticket/16968): Fixed: [Safari] [Paste as Plain Text](http://ckeditor.com/addon/pastetext) is not handled by the editor.
-* [#16912](http://dev.ckeditor.com/ticket/16912): Fixed: Exception thrown when a single image is pasted using [Paste from Word](http://ckeditor.com/addon/pastefromword).
-* [#16821](http://dev.ckeditor.com/ticket/16821): Fixed: Extraneous `` elements with `height` style stacked when [pasting from Word](http://ckeditor.com/addon/pastefromword).
-* [#16866](http://dev.ckeditor.com/ticket/16866): [IE, Edge] Fixed: Whitespaces not preserved when [pasting from Word](http://ckeditor.com/addon/pastefromword).
-* [#16860](http://dev.ckeditor.com/ticket/16860): Fixed: Paragraphs which only look like lists incorrectly transformed into them when [pasting from Word](http://ckeditor.com/addon/pastefromword).
-* [#16817](http://dev.ckeditor.com/ticket/16817): Fixed: When [pasting from Word](http://ckeditor.com/addon/pastefromword), paragraphs are transformed into lists with some corrupted data.
-* [#16833](http://dev.ckeditor.com/ticket/16833): [IE11] Fixed: Malformed list with headers [pasted from Word](http://ckeditor.com/addon/pastefromword).
-* [#16826](http://dev.ckeditor.com/ticket/16826): [IE] Fixed: Superfluous paragraphs within lists [pasted from Word](http://ckeditor.com/addon/pastefromword).
-* [#12465](http://dev.ckeditor.com/ticket/12465): Fixed: Cannot change the state of checkboxes or radio buttons if the properties dialog was invoked with a double-click.
-* [#13062](http://dev.ckeditor.com/ticket/13062): Fixed: Impossible to unlink when the caret is at the edge of the link.
-* [#13585](http://dev.ckeditor.com/ticket/13585): Fixed: Error when wrapping two adjacent `` elements with a `
`.
-* [#16811](http://dev.ckeditor.com/ticket/16811): Fixed: Table alignment is not preserved by the [Paste from Word](http://ckeditor.com/addon/pastefromword) plugin.
-* [#16810](http://dev.ckeditor.com/ticket/16810): Fixed: Vertical align in tables is not supported by the [Paste from Word](http://ckeditor.com/addon/pastefromword) plugin.
-* [#11956](http://dev.ckeditor.com/ticket/11956): [Blink, IE] Fixed: [Link](http://ckeditor.com/addon/link) dialog does not open on a double click on the second word of the link with a background color or other styles.
-* [#10472](http://dev.ckeditor.com/ticket/10472): Fixed: Unable to use [Table Resize](http://ckeditor.com/addon/tableresize) on table header and footer.
-* [#14762](http://dev.ckeditor.com/ticket/14762): Fixed: Hovering over an empty table (without rows or cells) throws an error when the [Table Resize](http://ckeditor.com/addon/tableresize) plugin is active.
-* [#16777](https://dev.ckeditor.com/ticket/16777): [Edge] Fixed: The [Clipboard](http://ckeditor.com/addon/clipboard) plugin does not allow to drop widgets into the editor.
-* [#14894](https://dev.ckeditor.com/ticket/14894): [Chrome] Fixed: The editor scrolls to the top after focusing or when a dialog is opened.
-* [#14769](https://dev.ckeditor.com/ticket/14769): Fixed: URLs with '-' in host are not detected by the [Auto Link](http://ckeditor.com/addon/autolink) plugin.
-* [#16804](https://dev.ckeditor.com/ticket/16804): Fixed: Focus is not on the first menu item when the user opens a context menu or a drop-down list from the editor toolbar.
-* [#14407](https://dev.ckeditor.com/ticket/14407): [IE] Fixed: Non-editable widgets can be edited.
-* [#16927](https://dev.ckeditor.com/ticket/16927): Fixed: An error thrown if a bundle containing the [Color Button](http://ckeditor.com/addon/colorbutton) plugin is run in ES5 strict mode. Thanks to [Igor Rubinovich](https://github.com/IgorRubinovich)!
-* [#16920](http://dev.ckeditor.com/ticket/16920): Fixed: Several plugins not using the [Dialog](http://ckeditor.com/addon/dialog) plugin as a direct dependency.
-* [PR#336](https://github.com/ckeditor/ckeditor-dev/pull/336): Fixed: Typo in [`CKEDITOR.getCss`](http://docs.ckeditor.com/#!/api/CKEDITOR-method-getCss) API documentation. Thanks to [knusperpixel](https://github.com/knusperpixel)!
-* [#17027](http://dev.ckeditor.com/ticket/17027): Fixed: Command event data should be initialized as an empty object.
-* Fixed the behavior of HTML parser when parsing `src`/`srcdoc` attributes of the `
{% comment %}
# https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img
diff --git a/templates/djangocms_snippet/.aldryn-folder b/templates/djangocms_snippet/.aldryn-folder
deleted file mode 100644
index e69de29..0000000
diff --git a/templates/djangocms_snippet/admin/.aldryn-folder b/templates/djangocms_snippet/admin/.aldryn-folder
deleted file mode 100644
index e69de29..0000000
diff --git a/templates/djangocms_snippet/admin/change_form.html b/templates/djangocms_snippet/admin/change_form.html
deleted file mode 100644
index 0eebd0e..0000000
--- a/templates/djangocms_snippet/admin/change_form.html
+++ /dev/null
@@ -1,37 +0,0 @@
-{% extends "admin/change_form.html" %}
-{% load static %}
-
-{% block object-tools %}
-{{ block.super }}
-
-
-
-{% endblock %}
diff --git a/templates/djangocms_snippet/snippet.html b/templates/djangocms_snippet/snippet.html
deleted file mode 100644
index 288480d..0000000
--- a/templates/djangocms_snippet/snippet.html
+++ /dev/null
@@ -1 +0,0 @@
-{{ content|safe }}
diff --git a/templates/djangocms_style/default/.aldryn-folder b/templates/djangocms_style/default/.aldryn-folder
deleted file mode 100644
index e69de29..0000000
diff --git a/templates/djangocms_style/default/style.html b/templates/djangocms_style/default/style.html
deleted file mode 100644
index b6abc2c..0000000
--- a/templates/djangocms_style/default/style.html
+++ /dev/null
@@ -1,18 +0,0 @@
-{% load cms_tags %}<{{ instance.tag_type }} {% spaceless %}
- {% endspaceless %}{% if instance.id_name %} id="{{ instance.id_name }}"{% endif %}{% spaceless %}
- {% endspaceless %}{% if instance.class_name or instance.additional_classes %}class="{% spaceless %}
- {{ instance.class_name }}
- {{ instance.get_additional_classes }}
- {% endspaceless %}"{% endif %}{% spaceless %}
- {% endspaceless %}{% if inline_styles %} style="{{ inline_styles }}"{% endif %}{{ instance.attributes_str }}>{% for plugin in instance.child_plugin_instances %}{% render_plugin plugin %}{% endfor %}{{ instance.tag_type }}>{% comment %}
- # The formatting of this file is very specific to remove unnecessary whitespaces
- # Available variables:
- {{ instance.label }}
- {{ instance.tag_type }}
- {{ instance.class_name }}
- {{ instance.additional_classes }} or {{ instance.get_additional_classes }}
- {{ instance.id_name }}
- {{ instance.attributes_str }}
- {{ instance.padding_top|right|bottom|left }} or {{ inline_styles }}
- {{ instance.margin_top|right|bottom|left }} oe {{ inline_styles }}
-{% endcomment %}
\ No newline at end of file
diff --git a/templates/djangocms_video/default/.aldryn-folder b/templates/djangocms_video/default/.aldryn-folder
deleted file mode 100644
index e69de29..0000000
diff --git a/templates/djangocms_video/default/source.html b/templates/djangocms_video/default/source.html
deleted file mode 100644
index 6034c00..0000000
--- a/templates/djangocms_video/default/source.html
+++ /dev/null
@@ -1,17 +0,0 @@
-{% load i18n cms_tags %}
-
-{% if not disabled %}
- {% with instance.source_file.extension as ext %}
-
- {% endwith %}
-{% endif %}
-
-{% comment %}
- # https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video
- # https://github.com/divio/django-filer/blob/master/filer/models/filemodels.py
- {{ instance.source_file }}
- # Available variables:
- {{ instance.text_title }}
- {{ instance.text_description }}
- {{ instance.attributes_str }}
-{% endcomment %}
diff --git a/templates/djangocms_video/default/track.html b/templates/djangocms_video/default/track.html
deleted file mode 100644
index 239a799..0000000
--- a/templates/djangocms_video/default/track.html
+++ /dev/null
@@ -1,18 +0,0 @@
-{% if not disabled %}
-