From: Guillaume Pellerin
Date: Tue, 4 Apr 2017 15:21:42 +0000 (+0200)
Subject: Complete package refactoring to make mezzanine-organization a standalone module
X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=c899d2cc76766d7521e04f343c944aa463065339;p=mezzo.git
Complete package refactoring to make mezzanine-organization a standalone module
---
diff --git a/.bowerrc b/.bowerrc
deleted file mode 100644
index 52474432..00000000
--- a/.bowerrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "directory" : "app/themes/base/static/vendors"
-}
diff --git a/.gitmodules b/.gitmodules
index 0500f447..28ac9302 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -4,6 +4,3 @@
[submodule "lib/mezzanine"]
path = lib/mezzanine
url = https://github.com/yomguy/mezzanine.git
-[submodule "var"]
- path = var
- url = git+ssh://git@git.forge.ircam.fr/manifeste-2017-data.git
diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index dacda1e1..00000000
--- a/Dockerfile
+++ /dev/null
@@ -1,45 +0,0 @@
-FROM python:3
-
-ENV PYTHONUNBUFFERED 1
-
-RUN mkdir /srv/app
-RUN mkdir /srv/lib
-WORKDIR /srv
-
-RUN apt-get update && apt-get install -y apt-transport-https
-COPY etc/apt/sources.list /etc/apt/
-COPY requirements-debian.txt /srv
-RUN apt-get update && \
- DEBIAN_PACKAGES=$(egrep -v "^\s*(#|$)" /srv/requirements-debian.txt) && \
- apt-get install -y --force-yes $DEBIAN_PACKAGES && \
- echo fr_FR.UTF-8 UTF-8 >> /etc/locale.gen && \
- locale-gen && \
- apt-get clean
-
-ENV LANG fr_FR.UTF-8
-ENV LANGUAGE fr_FR:fr
-ENV LC_ALL fr_FR.UTF-8
-
-COPY package.json /srv
-RUN npm install
-
-COPY Gemfile /srv
-RUN gem install bundler
-RUN bundle install
-
-COPY bower.json /srv
-COPY .bowerrc /srv
-RUN npm install -g bower
-RUN bower --allow-root install
-
-COPY gulpfile.js /srv
-RUN npm install -g gulp
-RUN gulp build
-
-COPY requirements.txt /srv
-RUN pip install -r requirements.txt
-
-COPY requirements-dev.txt /srv
-RUN pip install -r requirements-dev.txt --src /srv/lib
-
-WORKDIR /srv/app
diff --git a/Gemfile b/Gemfile
deleted file mode 100644
index 039d053a..00000000
--- a/Gemfile
+++ /dev/null
@@ -1,4 +0,0 @@
-source "https://rubygems.org"
-ruby "2.1.5"
-gem "compass", "<= 1.0.3"
-gem "sass", "<= 3.4.22"
diff --git a/app/Dockerfile b/app/Dockerfile
new file mode 100644
index 00000000..5e7b7f65
--- /dev/null
+++ b/app/Dockerfile
@@ -0,0 +1,35 @@
+FROM python:3
+
+ENV PYTHONUNBUFFERED 1
+
+RUN mkdir /srv/app
+RUN mkdir /srv/lib
+WORKDIR /srv
+
+RUN apt-get update && apt-get install -y apt-transport-https
+COPY ../etc/apt/sources.list /etc/apt/
+COPY ../requirements.txt /srv
+RUN apt-get update && \
+ DEBIAN_PACKAGES=$(egrep -v "^\s*(#|$)" /srv/requirements.txt) && \
+ apt-get install -y --force-yes $DEBIAN_PACKAGES && \
+ echo fr_FR.UTF-8 UTF-8 >> /etc/locale.gen && \
+ locale-gen && \
+ apt-get clean
+
+ENV LANG fr_FR.UTF-8
+ENV LANGUAGE fr_FR:fr
+ENV LC_ALL fr_FR.UTF-8
+
+COPY package.json /srv
+RUN npm install
+RUN npm install -g gulp
+RUN npm install -g bower
+
+COPY Gemfile /srv
+RUN gem install bundler
+RUN bundle install
+
+COPY requirements.txt /srv
+RUN pip install -r requirements.txt --src /srv/lib
+
+WORKDIR /srv/app
diff --git a/app/Gemfile b/app/Gemfile
new file mode 100644
index 00000000..039d053a
--- /dev/null
+++ b/app/Gemfile
@@ -0,0 +1,4 @@
+source "https://rubygems.org"
+ruby "2.1.5"
+gem "compass", "<= 1.0.3"
+gem "sass", "<= 3.4.22"
diff --git a/app/organization/__init__.py b/app/organization/__init__.py
deleted file mode 100644
index 1c09a839..00000000
--- a/app/organization/__init__.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-
-__version__ = 1.0
diff --git a/app/organization/agenda/__init__.py b/app/organization/agenda/__init__.py
deleted file mode 100644
index 1ad370fd..00000000
--- a/app/organization/agenda/__init__.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-"""
-Provides abstract models and admin features used throughout the various
-Mezzanine apps.
-"""
-from __future__ import unicode_literals
-
-default_app_config = 'organization.agenda.apps.AgendaConfig'
diff --git a/app/organization/agenda/admin.py b/app/organization/agenda/admin.py
deleted file mode 100644
index ad6d5653..00000000
--- a/app/organization/agenda/admin.py
+++ /dev/null
@@ -1,145 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-
-from copy import deepcopy
-
-from django.contrib import admin
-from django.utils.translation import ugettext_lazy as _
-from modeltranslation.admin import TranslationTabularInline
-from mezzanine.core.admin import *
-from mezzanine.pages.admin import PageAdmin
-from mezzanine.conf import settings
-from mezzanine.core.admin import DisplayableAdmin, OwnableAdmin
-from mezzanine_agenda.models import Event, EventCategory
-from mezzanine_agenda.admin import *
-from organization.core.models import *
-from organization.agenda.models import *
-from organization.agenda.forms import *
-
-
-class EventBlockInline(StackedDynamicInlineAdmin):
-
- model = EventBlock
-
-
-class EventImageInline(TabularDynamicInlineAdmin):
-
- model = EventImage
-
-
-class EventPlaylistInline(TabularDynamicInlineAdmin):
-
- model = EventPlaylist
-
-
-class EventDepartmentInline(TabularDynamicInlineAdmin):
-
- model = EventDepartment
-
-
-class EventPersonInline(TabularDynamicInlineAdmin):
-
- model = EventPerson
-
-
-class EventLinkInline(TabularDynamicInlineAdmin):
-
- model = EventLink
-
-
-class EventTrainingInline(StackedDynamicInlineAdmin):
-
- model = EventTraining
-
-
-class EventPeriodInline(TabularDynamicInlineAdmin):
-
- model = EventPeriod
-
-
-class EventRelatedTitleAdmin(TranslationTabularInline):
-
- model = EventRelatedTitle
-
-
-class EventPriceDescriptionAdmin(TranslationTabularInline):
-
- model = EventPriceDescription
-
-
-class CustomEventPriceAdmin(BaseTranslationModelAdmin):
-
- inlines = [EventPriceDescriptionAdmin,]
-
-
-class DynamicContentEventInline(TabularDynamicInlineAdmin):
-
- model = DynamicContentEvent
- form = DynamicContentEventForm
-
- class Media:
- js = (
- static("mezzanine/js/admin/dynamic_inline.js"),
- )
-
-
-class CustomEventAdmin(EventAdmin):
- """
- Admin class for events.
- """
-
- fieldsets = deepcopy(EventAdminBase.fieldsets)
- exclude = ("short_url", )
- list_display = ["title", "start", "end", "rank", "user", "status", "admin_link"]
- if settings.EVENT_USE_FEATURED_IMAGE:
- list_display.insert(0, "admin_thumb")
- list_filter = deepcopy(DisplayableAdmin.list_filter) + ("location", "category")
- inlines = [EventPeriodInline, EventBlockInline, EventImageInline, EventDepartmentInline,
- EventPersonInline, EventLinkInline, EventPlaylistInline, EventTrainingInline,
- EventRelatedTitleAdmin, DynamicContentEventInline]
-
-
-class CustomEventCategoryAdmin(BaseTranslationModelAdmin):
-
- pass
-
-
-class EventPublicTypeAdmin(BaseTranslationModelAdmin):
-
- model = EventPublicType
-
-
-class EventTrainingLevelAdmin(BaseTranslationModelAdmin):
-
- model = EventTrainingLevel
-
-
-
-admin.site.unregister(Event)
-admin.site.unregister(EventPrice)
-admin.site.unregister(EventCategory)
-admin.site.register(EventPublicType, EventPublicTypeAdmin)
-admin.site.register(EventTrainingLevel, EventTrainingLevelAdmin)
-admin.site.register(Event, CustomEventAdmin)
-admin.site.register(EventCategory, CustomEventCategoryAdmin)
-admin.site.register(EventPrice, CustomEventPriceAdmin)
diff --git a/app/organization/agenda/apps.py b/app/organization/agenda/apps.py
deleted file mode 100644
index 00a5653f..00000000
--- a/app/organization/agenda/apps.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.apps import AppConfig
-
-from django.core.checks import register
-
-
-class AgendaConfig(AppConfig):
-
- name = 'organization.agenda'
- label = 'organization-agenda'
diff --git a/app/organization/agenda/forms.py b/app/organization/agenda/forms.py
deleted file mode 100644
index 882bf277..00000000
--- a/app/organization/agenda/forms.py
+++ /dev/null
@@ -1,50 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from dal import autocomplete
-
-import dal_queryset_sequence
-import dal_select2_queryset_sequence
-
-from django import forms
-from django.forms.widgets import HiddenInput
-from django.forms import ModelForm
-from mezzanine.core.models import Orderable
-from organization.magazine.models import Article, Topic, Brief
-from organization.pages.models import CustomPage
-from organization.agenda.models import Event, DynamicContentEvent
-from organization.media.models import Playlist
-
-class DynamicContentEventForm(autocomplete.FutureModelForm):
-
- content_object = dal_queryset_sequence.fields.QuerySetSequenceModelField(
- queryset=autocomplete.QuerySetSequence(
- Article.objects.all(),
- CustomPage.objects.all(),
- Event.objects.all()
- ),
- required=False,
- widget=dal_select2_queryset_sequence.widgets.QuerySetSequenceSelect2('dynamic-content-event'),
- )
-
- class Meta:
- model = DynamicContentEvent
- fields = ('content_object',)
diff --git a/app/organization/agenda/management/__init__.py b/app/organization/agenda/management/__init__.py
deleted file mode 100644
index 12176181..00000000
--- a/app/organization/agenda/management/__init__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
diff --git a/app/organization/agenda/management/commands/__init__.py b/app/organization/agenda/management/commands/__init__.py
deleted file mode 100644
index 12176181..00000000
--- a/app/organization/agenda/management/commands/__init__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
diff --git a/app/organization/agenda/management/commands/organization-sync-eve-events.py b/app/organization/agenda/management/commands/organization-sync-eve-events.py
deleted file mode 100644
index 83342da7..00000000
--- a/app/organization/agenda/management/commands/organization-sync-eve-events.py
+++ /dev/null
@@ -1,119 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from datetime import datetime, timedelta
-from optparse import make_option
-
-from django.conf import settings
-from django.core.management.base import BaseCommand, CommandError
-from django.contrib.auth.models import User
-from django.core.mail import EmailMessage
-
-import mezzanine_agenda.models as ma_models
-from mezzanine.generic.models import AssignedKeyword, Keyword
-
-import eve.models as eve_models
-import organization.agenda
-
-class Command(BaseCommand):
- """Synchronize events from E-vement to mezzanine_agenda"""
-
-
- option_list = BaseCommand.option_list + (
- make_option('-m', '--meta_event',
- dest='meta_event',
- help='define eve meta_event'),
- )
-
- default_user = User.objects.get(username='admin')
-
- def cleanup(self):
- for event in ma_models.Event.objects.all():
- event.delete()
- for location in ma_models.EventLocation.objects.all():
- location.delete()
- for event_price in ma_models.EventPrice.objects.all():
- event_price.delete()
- for period in organization.agenda.models.EventPeriod.objects.all():
- period.delete()
-
- def handle(self, *args, **kwargs):
- self.cleanup()
-
- meta_event_name = kwargs.get('meta_event')
- meta_trans_all = eve_models.MetaEventTranslation.objects.all()
- for meta_trans in meta_trans_all:
- if meta_trans.name == meta_event_name:
- break
-
- eve_events = eve_models.Event.objects.filter(meta_event=meta_trans.id)
-
- for eve_event in eve_events:
- first = True
- eve_locations = []
- event_trans = eve_models.EventTranslation.objects.filter(id=eve_event, lang='fr')[0]
- event_trans_en = eve_models.EventTranslation.objects.filter(id=eve_event, lang='en')[0]
- manifestations = eve_event.manifestations.all().order_by('happens_at')
- events = ma_models.Event.objects.filter(external_id=eve_event.id)
-
- if not events:
- event = ma_models.Event(external_id=eve_event.id)
- else:
- event = events[0]
-
- for manifestation in manifestations:
- if first:
- event.title = event_trans.name
- event.title_en = event_trans_en.name
- event.user = self.default_user
- locations = ma_models.EventLocation.objects.filter(title=manifestation.location.name)
- if locations:
- location = locations[0]
- else:
- location = ma_models.EventLocation(title=manifestation.location.name)
- address = '\n'.join([manifestation.location.address, manifestation.location.postalcode + ' ' + manifestation.location.city])
- location.address = address
- location.external_id = manifestation.id
- location.clean()
- location.save()
- event.location = location
- event.start = manifestation.happens_at
- event.save()
- first = False
-
- period = organization.agenda.models.EventPeriod(event=event)
- period.date_from = manifestation.happens_at
- period.date_to = manifestation.happens_at + timedelta(seconds=manifestation.duration)
- period.save()
-
- # keyword, c = Keyword.objects.get_or_create(title=eve_event.event_category.name)
- # event.keywords.add(AssignedKeyword(keyword=keyword), bulk=False)
-
- eve_prices = eve_models.PriceManifestation.objects.filter(manifestation=manifestation)
- for price in eve_prices:
- event_price, c = ma_models.EventPrice.objects.get_or_create(value=float(price.value))
- if event:
- if not event_price in event.prices.all():
- event.prices.add(event_price)
-
- event.end = period.date_to
- event.status = 1
- event.save()
diff --git a/app/organization/agenda/management/commands/organization-sync-prestashop-events.py b/app/organization/agenda/management/commands/organization-sync-prestashop-events.py
deleted file mode 100644
index d0a3cf0b..00000000
--- a/app/organization/agenda/management/commands/organization-sync-prestashop-events.py
+++ /dev/null
@@ -1,110 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from datetime import datetime, timedelta
-from optparse import make_option
-
-from django.conf import settings
-from django.core.management.base import BaseCommand, CommandError
-from django.contrib.auth.models import User
-from django.core.mail import EmailMessage
-
-from mezzanine.generic.models import AssignedKeyword, Keyword
-
-import mezzanine_agenda.models as ma_models
-import organization.agenda.models as oa_models
-import prestashop.models as pa_models
-import cartridge.shop.models as ca_models
-
-
-class Command(BaseCommand):
- """Synchronize events from PrestaShop to mezzanine_agenda"""
-
-
- option_list = BaseCommand.option_list + (
- make_option('-c', '--category',
- dest='category_lang_name',
- help='define prestashop PsCategoryLang'),
- )
-
- default_user = User.objects.get(username='admin')
- languages = { 1 : {'code': 'en', 'names': ['english', 'anglais']},
- 2 : {'code': 'fr', 'names': ['french', 'français']},}
-
-
- def cleanup(self):
- for event in ma_models.Event.objects.all():
- event.delete()
-
- def handle(self, *args, **kwargs):
- # !! NOT FOR PROD !!
- # self.cleanup()
-
- products = []
- category_lang_name = kwargs.get('category_lang_name')
-
- if not category_lang_name:
- for category in pa_models.PsCategoryLang.objects.all():
- print(category.name)
-
- category_lang_name = kwargs.get('category_lang_name')
- category_lang = pa_models.PsCategoryLang.objects.get(name=category_lang_name)
- category = pa_models.PsCategory.objects.get(id_category=category_lang.id_category)
- category_products = pa_models.PsCategoryProduct.objects.filter(id_category=category.id_category)
-
- for category_product in category_products:
- products.append(pa_models.PsProduct.objects.get(id_product=category_product.id_product))
-
- for product in products:
- print('---------------------------')
- print(product.id_product)
-
- events = ma_models.Event.objects.filter(external_id=product.id_product)
- if events:
- event = events[0]
- else:
- event = ma_models.Event(external_id=product.id_product)
-
- product_langs = pa_models.PsProductLang.objects.filter(id_product=product.id_product)
- for product_lang in product_langs:
- lang_code = self.languages[product_lang.id_lang]['code']
-
- for lang in self.languages:
- if product_lang.teaching_lang.lower() in self.languages[product_lang.id_lang]['names']:
- language = self.languages[product_lang.id_lang]['code']
- event_training = oa_models.EventTraining(language=language)
- break
-
- print(product_lang.name, lang_code, product_lang.dates)
-
- setattr(event, 'title' + '_' + lang_code, product_lang.name)
- setattr(event, 'content' + '_' + lang_code, product_lang.description)
- event.date_text = product_lang.dates
-
- event.start = datetime.now()
- event.user = self.default_user
- event_price, c = ma_models.EventPrice.objects.get_or_create(value=product.price)
- event.save()
- event.prices.add(event_price)
- event.status = 1
- event.save()
- event_training.event = event
- event_training.save()
diff --git a/app/organization/agenda/migrations/0001_initial.py b/app/organization/agenda/migrations/0001_initial.py
deleted file mode 100644
index 0fb3c043..00000000
--- a/app/organization/agenda/migrations/0001_initial.py
+++ /dev/null
@@ -1,55 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-01 15:24
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- initial = True
-
- dependencies = [
- ('mezzanine_agenda', '0003_remove_event_blog_posts'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='EventBlock',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('content', mezzanine.core.fields.RichTextField(verbose_name='Content')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('with_separator', models.BooleanField(default=False)),
- ('background_color', models.CharField(blank=True, choices=[('black', 'black'), ('yellow', 'yellow'), ('red', 'red')], max_length=32, verbose_name='background color')),
- ('event', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='blocks', to='mezzanine_agenda.Event', verbose_name='event')),
- ],
- options={
- 'ordering': ('_order',),
- 'verbose_name_plural': 'blocks',
- 'verbose_name': 'block',
- },
- ),
- migrations.CreateModel(
- name='EventImage',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('file', mezzanine.core.fields.FileField(max_length=1024, verbose_name='Image')),
- ('credits', models.CharField(blank=True, max_length=256, null=True, verbose_name='credits')),
- ('type', models.CharField(choices=[('logo', 'logo'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page slider')], max_length=64, verbose_name='type')),
- ('event', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='images', to='mezzanine_agenda.Event', verbose_name='event')),
- ],
- options={
- 'ordering': ('_order',),
- 'verbose_name_plural': 'images',
- 'verbose_name': 'image',
- },
- ),
- ]
diff --git a/app/organization/agenda/migrations/0002_eventdepartment.py b/app/organization/agenda/migrations/0002_eventdepartment.py
deleted file mode 100644
index 14eb8a81..00000000
--- a/app/organization/agenda/migrations/0002_eventdepartment.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-07 13:41
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0005_auto_20160905_1853'),
- ('mezzanine_agenda', '0005_auto_20160907_1541'),
- ('organization-agenda', '0001_initial'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='EventDepartment',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('department', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='events', to='organization-network.Department', verbose_name='department')),
- ('event', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='departments', to='mezzanine_agenda.Event', verbose_name='event')),
- ],
- options={
- 'verbose_name_plural': 'departments',
- 'verbose_name': 'department',
- },
- ),
- ]
diff --git a/app/organization/agenda/migrations/0003_eventlink_eventperson.py b/app/organization/agenda/migrations/0003_eventlink_eventperson.py
deleted file mode 100644
index 35dde9bd..00000000
--- a/app/organization/agenda/migrations/0003_eventlink_eventperson.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-23 14:34
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('mezzanine_agenda', '0007_auto_20160923_1634'),
- ('organization-core', '0004_auto_20160923_1141'),
- ('organization-network', '0023_auto_20160921_2043'),
- ('organization-agenda', '0002_eventdepartment'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='EventLink',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('url', models.URLField(blank=True, max_length=512, verbose_name='URL')),
- ('event', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='links', to='mezzanine_agenda.Event', verbose_name='event')),
- ('link_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organization-core.LinkType', verbose_name='link type')),
- ],
- options={
- 'verbose_name_plural': 'links',
- 'verbose_name': 'link',
- },
- ),
- migrations.CreateModel(
- name='EventPerson',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('event', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='persons', to='mezzanine_agenda.Event', verbose_name='event')),
- ('person', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='events', to='organization-network.Person', verbose_name='person')),
- ],
- options={
- 'verbose_name_plural': 'persons',
- 'verbose_name': 'person',
- },
- ),
- ]
diff --git a/app/organization/agenda/migrations/0004_eventaudio_eventvideo.py b/app/organization/agenda/migrations/0004_eventaudio_eventvideo.py
deleted file mode 100644
index 6983d766..00000000
--- a/app/organization/agenda/migrations/0004_eventaudio_eventvideo.py
+++ /dev/null
@@ -1,54 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-27 14:55
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('mezzanine_agenda', '0008_auto_20160926_1552'),
- ('organization-agenda', '0003_eventlink_eventperson'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='EventAudio',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('file', mezzanine.core.fields.FileField(max_length=1024, verbose_name='Image')),
- ('credits', models.CharField(blank=True, max_length=256, null=True, verbose_name='credits')),
- ('type', models.CharField(choices=[('logo', 'logo'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page slider')], max_length=64, verbose_name='type')),
- ('event', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='audios', to='mezzanine_agenda.Event', verbose_name='event')),
- ],
- options={
- 'verbose_name_plural': 'audios',
- 'verbose_name': 'audio',
- 'ordering': ('_order',),
- },
- ),
- migrations.CreateModel(
- name='EventVideo',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('file', mezzanine.core.fields.FileField(max_length=1024, verbose_name='Image')),
- ('credits', models.CharField(blank=True, max_length=256, null=True, verbose_name='credits')),
- ('type', models.CharField(choices=[('logo', 'logo'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page slider')], max_length=64, verbose_name='type')),
- ('event', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='videos', to='mezzanine_agenda.Event', verbose_name='event')),
- ],
- options={
- 'verbose_name_plural': 'videos',
- 'verbose_name': 'video',
- 'ordering': ('_order',),
- },
- ),
- ]
diff --git a/app/organization/agenda/migrations/0005_auto_20160928_1858.py b/app/organization/agenda/migrations/0005_auto_20160928_1858.py
deleted file mode 100644
index 2fd170f1..00000000
--- a/app/organization/agenda/migrations/0005_auto_20160928_1858.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-28 16:58
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-agenda', '0004_eventaudio_eventvideo'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='eventaudio',
- name='type',
- field=models.CharField(choices=[('logo', 'logo'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type'),
- ),
- migrations.AlterField(
- model_name='eventimage',
- name='type',
- field=models.CharField(choices=[('logo', 'logo'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type'),
- ),
- migrations.AlterField(
- model_name='eventvideo',
- name='type',
- field=models.CharField(choices=[('logo', 'logo'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type'),
- ),
- ]
diff --git a/app/organization/agenda/migrations/0006_auto_20160929_1257.py b/app/organization/agenda/migrations/0006_auto_20160929_1257.py
deleted file mode 100644
index 6fa20ff2..00000000
--- a/app/organization/agenda/migrations/0006_auto_20160929_1257.py
+++ /dev/null
@@ -1,101 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-29 10:57
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0001_initial'),
- ('organization-agenda', '0005_auto_20160928_1858'),
- ]
-
- operations = [
- migrations.AlterModelOptions(
- name='eventaudio',
- options={'verbose_name': 'audio', 'verbose_name_plural': 'audios'},
- ),
- migrations.AlterModelOptions(
- name='eventvideo',
- options={'verbose_name': 'video', 'verbose_name_plural': 'videos'},
- ),
- migrations.AddField(
- model_name='eventaudio',
- name='audio_ptr',
- field=models.OneToOneField(auto_created=True, default=1, on_delete=django.db.models.deletion.CASCADE, parent_link=True, serialize=False, to='organization-media.Audio'),
- preserve_default=False,
- ),
- migrations.AddField(
- model_name='eventvideo',
- name='video_ptr',
- field=models.OneToOneField(auto_created=True, default=1, on_delete=django.db.models.deletion.CASCADE, parent_link=True, serialize=False, to='organization-media.Video'),
- preserve_default=False,
- ),
- migrations.RemoveField(
- model_name='eventaudio',
- name='_order',
- ),
- migrations.RemoveField(
- model_name='eventaudio',
- name='credits',
- ),
- migrations.RemoveField(
- model_name='eventaudio',
- name='description',
- ),
- migrations.RemoveField(
- model_name='eventaudio',
- name='file',
- ),
- migrations.RemoveField(
- model_name='eventaudio',
- name='id',
- ),
- migrations.RemoveField(
- model_name='eventaudio',
- name='title',
- ),
- migrations.RemoveField(
- model_name='eventaudio',
- name='type',
- ),
- migrations.AlterOrderWithRespectTo(
- name='eventaudio',
- order_with_respect_to='event',
- ),
- migrations.RemoveField(
- model_name='eventvideo',
- name='_order',
- ),
- migrations.RemoveField(
- model_name='eventvideo',
- name='credits',
- ),
- migrations.RemoveField(
- model_name='eventvideo',
- name='description',
- ),
- migrations.RemoveField(
- model_name='eventvideo',
- name='file',
- ),
- migrations.RemoveField(
- model_name='eventvideo',
- name='id',
- ),
- migrations.RemoveField(
- model_name='eventvideo',
- name='title',
- ),
- migrations.RemoveField(
- model_name='eventvideo',
- name='type',
- ),
- migrations.AlterOrderWithRespectTo(
- name='eventvideo',
- order_with_respect_to='event',
- ),
- ]
diff --git a/app/organization/agenda/migrations/0007_auto_20160929_1300.py b/app/organization/agenda/migrations/0007_auto_20160929_1300.py
deleted file mode 100644
index dfae2d99..00000000
--- a/app/organization/agenda/migrations/0007_auto_20160929_1300.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-29 11:00
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-agenda', '0006_auto_20160929_1257'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='eventaudio',
- name='audio_ptr',
- field=models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-media.Audio'),
- ),
- migrations.AlterField(
- model_name='eventvideo',
- name='video_ptr',
- field=models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-media.Video'),
- ),
- ]
diff --git a/app/organization/agenda/migrations/0008_auto_20161005_1455.py b/app/organization/agenda/migrations/0008_auto_20161005_1455.py
deleted file mode 100644
index a07cdbca..00000000
--- a/app/organization/agenda/migrations/0008_auto_20161005_1455.py
+++ /dev/null
@@ -1,80 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-05 12:55
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('mezzanine_agenda', '0010_remove_event_language'),
- ('organization-agenda', '0007_auto_20160929_1300'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='EventPeriod',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('date_from', models.DateTimeField(blank=True, null=True, verbose_name='begin date')),
- ('date_to', models.DateTimeField(blank=True, null=True, verbose_name='end date')),
- ('event', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='periods', to='mezzanine_agenda.Event', verbose_name='event')),
- ],
- options={
- 'verbose_name_plural': 'periods',
- 'verbose_name': 'period',
- },
- ),
- migrations.CreateModel(
- name='EventPublicType',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('name_fr', models.CharField(max_length=512, null=True, verbose_name='name')),
- ('name_en', models.CharField(max_length=512, null=True, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ],
- options={
- 'verbose_name_plural': 'public types',
- 'verbose_name': 'public type',
- },
- ),
- migrations.CreateModel(
- name='EventTraining',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('language', models.CharField(blank=True, choices=[('fr', 'French'), ('en', 'English')], max_length=64, null=True, verbose_name='Language')),
- ('event', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='trainings', to='mezzanine_agenda.Event', verbose_name='event')),
- ],
- options={
- 'verbose_name_plural': 'trainings',
- 'verbose_name': 'training',
- },
- ),
- migrations.CreateModel(
- name='EventTrainingLevel',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('name_fr', models.CharField(max_length=512, null=True, verbose_name='name')),
- ('name_en', models.CharField(max_length=512, null=True, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ],
- options={
- 'verbose_name_plural': 'training levels',
- 'verbose_name': 'training level',
- },
- ),
- migrations.AddField(
- model_name='eventtraining',
- name='level',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='trainings', to='organization-agenda.EventTrainingLevel', verbose_name='level'),
- ),
- migrations.AddField(
- model_name='eventtraining',
- name='public_type',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='trainings', to='organization-agenda.EventPublicType', verbose_name='public type'),
- ),
- ]
diff --git a/app/organization/agenda/migrations/0009_auto_20161013_1631.py b/app/organization/agenda/migrations/0009_auto_20161013_1631.py
deleted file mode 100644
index d3aa4b02..00000000
--- a/app/organization/agenda/migrations/0009_auto_20161013_1631.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-13 14:31
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0005_auto_20160930_1849'),
- ('mezzanine_agenda', '0013_auto_20161010_1130'),
- ('organization-agenda', '0008_auto_20161005_1455'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='EventPlaylist',
- fields=[
- ('playlist_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-media.Playlist')),
- ('event', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='playlists', to='mezzanine_agenda.Event', verbose_name='event')),
- ],
- options={
- 'verbose_name': 'playlist',
- 'verbose_name_plural': 'playlists',
- },
- bases=('organization-media.playlist',),
- ),
- migrations.DeleteModel(
- name='EventAudio',
- ),
- migrations.DeleteModel(
- name='EventVideo',
- ),
- migrations.AlterOrderWithRespectTo(
- name='eventplaylist',
- order_with_respect_to='event',
- ),
- ]
diff --git a/app/organization/agenda/migrations/0010_auto_20161014_0002.py b/app/organization/agenda/migrations/0010_auto_20161014_0002.py
deleted file mode 100644
index 4a148aca..00000000
--- a/app/organization/agenda/migrations/0010_auto_20161014_0002.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-13 22:02
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0009_auto_20161013_2353'),
- ('organization-agenda', '0009_auto_20161013_1631'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='eventplaylist',
- name='playlist_ptr',
- ),
- migrations.AddField(
- model_name='eventplaylist',
- name='playlistrelated_ptr',
- field=models.OneToOneField(auto_created=True, default=1, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-media.PlaylistRelated'),
- preserve_default=False,
- ),
- ]
diff --git a/app/organization/agenda/migrations/0011_auto_20161018_1804.py b/app/organization/agenda/migrations/0011_auto_20161018_1804.py
deleted file mode 100644
index cb14dd46..00000000
--- a/app/organization/agenda/migrations/0011_auto_20161018_1804.py
+++ /dev/null
@@ -1,46 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-18 16:04
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-agenda', '0010_auto_20161014_0002'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='eventblock',
- name='content_en',
- field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Content'),
- ),
- migrations.AddField(
- model_name='eventblock',
- name='content_fr',
- field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Content'),
- ),
- migrations.AddField(
- model_name='eventblock',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='eventblock',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='eventblock',
- name='title_en',
- field=models.CharField(max_length=1024, null=True, verbose_name='title'),
- ),
- migrations.AddField(
- model_name='eventblock',
- name='title_fr',
- field=models.CharField(max_length=1024, null=True, verbose_name='title'),
- ),
- ]
diff --git a/app/organization/agenda/migrations/0012_auto_20161020_1051.py b/app/organization/agenda/migrations/0012_auto_20161020_1051.py
deleted file mode 100644
index a3b4b10e..00000000
--- a/app/organization/agenda/migrations/0012_auto_20161020_1051.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-20 08:51
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-agenda', '0011_auto_20161018_1804'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='eventtraining',
- name='language',
- field=models.CharField(blank=True, choices=[('fr', 'French'), ('en', 'English')], max_length=64, null=True, verbose_name='language'),
- ),
- ]
diff --git a/app/organization/agenda/migrations/0013_eventlink_title.py b/app/organization/agenda/migrations/0013_eventlink_title.py
deleted file mode 100644
index 276cf9de..00000000
--- a/app/organization/agenda/migrations/0013_eventlink_title.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-21 11:06
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-agenda', '0012_auto_20161020_1051'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='eventlink',
- name='title',
- field=models.CharField(default='', max_length=1024, verbose_name='title'),
- preserve_default=False,
- ),
- ]
diff --git a/app/organization/agenda/migrations/0014_auto_20161021_1319.py b/app/organization/agenda/migrations/0014_auto_20161021_1319.py
deleted file mode 100644
index c2e3c511..00000000
--- a/app/organization/agenda/migrations/0014_auto_20161021_1319.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-21 11:19
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-agenda', '0013_eventlink_title'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='eventlink',
- name='title',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- ]
diff --git a/app/organization/agenda/migrations/0015_auto_20161026_1025.py b/app/organization/agenda/migrations/0015_auto_20161026_1025.py
deleted file mode 100644
index 7d081b36..00000000
--- a/app/organization/agenda/migrations/0015_auto_20161026_1025.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-26 08:25
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-agenda', '0014_auto_20161021_1319'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='eventlink',
- name='title_en',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- migrations.AddField(
- model_name='eventlink',
- name='title_fr',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- ]
diff --git a/app/organization/agenda/migrations/0016_dynamiccontentevent.py b/app/organization/agenda/migrations/0016_dynamiccontentevent.py
deleted file mode 100644
index 2dc36a3a..00000000
--- a/app/organization/agenda/migrations/0016_dynamiccontentevent.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-04 17:01
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('contenttypes', '0002_remove_content_type_name'),
- ('mezzanine_agenda', '0015_auto_20161021_1937'),
- ('organization-agenda', '0015_auto_20161026_1025'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='DynamicContentEvent',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('object_id', models.PositiveIntegerField(editable=False, null=True, verbose_name='related object')),
- ('content_type', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType', verbose_name='content type')),
- ('event', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='dynamic_content_event', to='mezzanine_agenda.Event', verbose_name='event')),
- ],
- options={
- 'ordering': ('_order',),
- 'verbose_name': 'Dynamic Content Event',
- },
- ),
- ]
diff --git a/app/organization/agenda/migrations/0017_auto_20161104_1812.py b/app/organization/agenda/migrations/0017_auto_20161104_1812.py
deleted file mode 100644
index 57ee7f58..00000000
--- a/app/organization/agenda/migrations/0017_auto_20161104_1812.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-04 17:12
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('mezzanine_agenda', '0015_auto_20161021_1937'),
- ('organization-agenda', '0016_dynamiccontentevent'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='EventRelatedTitle',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('title', models.CharField(blank=True, max_length=1024, null=True, verbose_name='title')),
- ('event', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='related_title', to='mezzanine_agenda.Event', verbose_name='event')),
- ],
- options={
- 'verbose_name': 'related title',
- },
- ),
- migrations.AlterOrderWithRespectTo(
- name='eventrelatedtitle',
- order_with_respect_to='event',
- ),
- ]
diff --git a/app/organization/agenda/migrations/0018_auto_20161104_1820.py b/app/organization/agenda/migrations/0018_auto_20161104_1820.py
deleted file mode 100644
index 560b7dc9..00000000
--- a/app/organization/agenda/migrations/0018_auto_20161104_1820.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-04 17:20
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-agenda', '0017_auto_20161104_1812'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='eventrelatedtitle',
- name='title_en',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- migrations.AddField(
- model_name='eventrelatedtitle',
- name='title_fr',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- ]
diff --git a/app/organization/agenda/migrations/0019_eventpricedescription.py b/app/organization/agenda/migrations/0019_eventpricedescription.py
deleted file mode 100644
index d31808f1..00000000
--- a/app/organization/agenda/migrations/0019_eventpricedescription.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-07 15:14
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('mezzanine_agenda', '0015_auto_20161021_1937'),
- ('organization-agenda', '0018_auto_20161104_1820'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='EventPriceDescription',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('description', models.TextField(blank=True, null=True, verbose_name='description')),
- ('description_fr', models.TextField(blank=True, null=True, verbose_name='description')),
- ('description_en', models.TextField(blank=True, null=True, verbose_name='description')),
- ('event_price', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='event_price_description', to='mezzanine_agenda.EventPrice', verbose_name='event_price_description')),
- ],
- options={
- 'verbose_name': 'Additionnal description',
- },
- ),
- ]
diff --git a/app/organization/agenda/migrations/0020_auto_20161205_1536.py b/app/organization/agenda/migrations/0020_auto_20161205_1536.py
deleted file mode 100644
index 5b2b116f..00000000
--- a/app/organization/agenda/migrations/0020_auto_20161205_1536.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2016-12-05 14:36
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-agenda', '0019_eventpricedescription'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='eventimage',
- name='type',
- field=models.CharField(choices=[('logo', 'logo'), ('logo_white', 'logo white'), ('logo_black', 'logo black'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type'),
- ),
- ]
diff --git a/app/organization/agenda/migrations/0021_eventblock_login_required.py b/app/organization/agenda/migrations/0021_eventblock_login_required.py
deleted file mode 100644
index b74c3cac..00000000
--- a/app/organization/agenda/migrations/0021_eventblock_login_required.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-03 11:20
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-agenda', '0020_auto_20161205_1536'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='eventblock',
- name='login_required',
- field=models.BooleanField(default=False, verbose_name='login required'),
- ),
- ]
diff --git a/app/organization/agenda/migrations/0022_auto_20170105_1743.py b/app/organization/agenda/migrations/0022_auto_20170105_1743.py
deleted file mode 100644
index 930c9aec..00000000
--- a/app/organization/agenda/migrations/0022_auto_20170105_1743.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-05 16:43
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-agenda', '0021_eventblock_login_required'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='eventimage',
- name='type',
- field=models.CharField(choices=[('logo', 'logo'), ('logo_white', 'logo white'), ('logo_black', 'logo black'), ('logo_header', 'logo header'), ('logo_footer', 'logo footer'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type'),
- ),
- ]
diff --git a/app/organization/agenda/migrations/0023_auto_20170214_1643.py b/app/organization/agenda/migrations/0023_auto_20170214_1643.py
deleted file mode 100644
index a6d3ed01..00000000
--- a/app/organization/agenda/migrations/0023_auto_20170214_1643.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-02-14 15:43
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-agenda', '0022_auto_20170105_1743'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='eventblock',
- name='background_color',
- field=models.CharField(blank=True, choices=[('black', 'black'), ('yellow', 'yellow'), ('red', 'red'), ('white', 'white')], max_length=32, verbose_name='background color'),
- ),
- ]
diff --git a/app/organization/agenda/migrations/0024_eventrank.py b/app/organization/agenda/migrations/0024_eventrank.py
deleted file mode 100644
index 036263fd..00000000
--- a/app/organization/agenda/migrations/0024_eventrank.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-02-21 14:44
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('mezzanine_agenda', '0016_auto_20161216_1558'),
- ('organization-agenda', '0023_auto_20170214_1643'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='EventRank',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('rank', models.IntegerField(blank=True, null=True, verbose_name='rank')),
- ('event', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='event_rank', to='mezzanine_agenda.Event', verbose_name='event')),
- ],
- options={
- 'verbose_name_plural': 'ranks',
- 'verbose_name': 'rank',
- },
- ),
- ]
diff --git a/app/organization/agenda/migrations/0025_auto_20170222_1011.py b/app/organization/agenda/migrations/0025_auto_20170222_1011.py
deleted file mode 100644
index 4998e636..00000000
--- a/app/organization/agenda/migrations/0025_auto_20170222_1011.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-02-22 09:11
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-agenda', '0024_eventrank'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='eventrank',
- name='event',
- ),
- migrations.DeleteModel(
- name='EventRank',
- ),
- ]
diff --git a/app/organization/agenda/migrations/0026_auto_20170313_1224.py b/app/organization/agenda/migrations/0026_auto_20170313_1224.py
deleted file mode 100644
index fbf75f8a..00000000
--- a/app/organization/agenda/migrations/0026_auto_20170313_1224.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-03-13 11:24
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-agenda', '0025_auto_20170222_1011'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='eventtraining',
- name='language',
- field=models.CharField(blank=True, choices=[('en', 'English'), ('fr', 'French')], max_length=64, null=True, verbose_name='language'),
- ),
- ]
diff --git a/app/organization/agenda/migrations/__init__.py b/app/organization/agenda/migrations/__init__.py
deleted file mode 100644
index e69de29b..00000000
diff --git a/app/organization/agenda/models.py b/app/organization/agenda/models.py
deleted file mode 100644
index cfd9523f..00000000
--- a/app/organization/agenda/models.py
+++ /dev/null
@@ -1,150 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-from future.builtins import str
-
-from django.utils.translation import ugettext_lazy as _
-from mezzanine.core.models import Orderable
-from mezzanine.conf import settings
-from mezzanine_agenda.models import *
-from organization.core.models import *
-from organization.network.models import *
-
-
-
-class EventBlock(Block):
-
- event = models.ForeignKey(Event, verbose_name=_('event'), related_name='blocks', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _("block")
- verbose_name_plural = _("blocks")
-
-
-class EventImage(Image):
-
- event = models.ForeignKey(Event, verbose_name=_('event'), related_name='images', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _("image")
- verbose_name_plural = _("images")
- order_with_respect_to = "event"
-
-
-class EventDepartment(models.Model):
-
- event = models.ForeignKey(Event, verbose_name=_('event'), related_name='departments', blank=True, null=True, on_delete=models.SET_NULL)
- department = models.ForeignKey(Department, verbose_name=_('department'), related_name='events', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _("department")
- verbose_name_plural = _("departments")
-
-
-class EventPerson(models.Model):
-
- event = models.ForeignKey(Event, verbose_name=_('event'), related_name='persons', blank=True, null=True, on_delete=models.SET_NULL)
- person = models.ForeignKey(Person, verbose_name=_('person'), related_name='events', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _("person")
- verbose_name_plural = _("persons")
-
-
-class EventLink(Link):
-
- event = models.ForeignKey(Event, verbose_name=_('event'), related_name='links', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _("link")
- verbose_name_plural = _("links")
-
-
-class EventPlaylist(PlaylistRelated):
-
- event = models.ForeignKey(Event, verbose_name=_('event'), related_name='playlists', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _("playlist")
- verbose_name_plural = _("playlists")
- order_with_respect_to = "event"
-
-
-class EventPeriod(PeriodDateTime):
-
- event = models.ForeignKey(Event, verbose_name=_('event'), related_name='periods', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _("period")
- verbose_name_plural = _("periods")
-
-
-class EventPublicType(Named):
-
- class Meta:
- verbose_name = _("public type")
- verbose_name_plural = _("public types")
-
-
-class EventTrainingLevel(Named):
-
- class Meta:
- verbose_name = _("training level")
- verbose_name_plural = _("training levels")
-
-
-class EventTraining(models.Model):
-
- event = models.ForeignKey(Event, verbose_name=_('event'), related_name='trainings', blank=True, null=True, on_delete=models.SET_NULL)
- language = models.CharField(_('language'), max_length=64, blank=True, null=True, choices=settings.LANGUAGES)
- public_type = models.ForeignKey(EventPublicType, verbose_name=_('public type'), related_name='trainings', blank=True, null=True, on_delete=models.SET_NULL)
- level = models.ForeignKey(EventTrainingLevel, verbose_name=_('level'), related_name='trainings', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _("training")
- verbose_name_plural = _("trainings")
-
-
-class EventRelatedTitle(RelatedTitle):
-
- event = models.OneToOneField(Event, verbose_name=_('event'), related_name='related_title', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _("related title")
- order_with_respect_to = "event"
-
-
-class DynamicContentEvent(DynamicContent, Orderable):
-
- event = models.ForeignKey(Event, verbose_name=_('event'), related_name='dynamic_content_event', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = 'Dynamic Content Event'
-
-
-class EventPriceDescription(models.Model):
-
- event_price = models.OneToOneField(EventPrice, verbose_name=_('event_price_description'), related_name='event_price_description', blank=True, null=True, on_delete=models.SET_NULL)
- description = models.TextField(_('description'), blank=True, null=True)
-
- class Meta:
- verbose_name = 'Additionnal description'
diff --git a/app/organization/agenda/translation.py b/app/organization/agenda/translation.py
deleted file mode 100644
index 6764de58..00000000
--- a/app/organization/agenda/translation.py
+++ /dev/null
@@ -1,108 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from modeltranslation.translator import translator, register, TranslationOptions
-
-from organization.agenda.models import *
-
-
-@register(EventBlock)
-class EventBlockTranslationOptions(TranslationOptions):
-
- fields = ('title', 'description', 'content')
-
-
-@register(EventImage)
-class EventImageTranslationOptions(TranslationOptions):
-
- fields = ()
-
-
-@register(EventPlaylist)
-class EventPlaylistTranslationOptions(TranslationOptions):
-
- fields = ()
-
-
-@register(EventDepartment)
-class EventDepartmentTranslationOptions(TranslationOptions):
-
- fields = ()
-
-
-@register(EventPerson)
-class EventPersonTranslationOptions(TranslationOptions):
-
- fields = ()
-
-
-@register(EventLink)
-class EventLinkTranslationOptions(TranslationOptions):
-
- fields = ('title',)
-
-
-@register(EventPeriod)
-class EventPeriodTranslationOptions(TranslationOptions):
-
- fields = ()
-
-
-@register(EventTraining)
-class EventTrainingTranslationOptions(TranslationOptions):
-
- fields = ()
-
-
-@register(EventTrainingLevel)
-class EventTrainingLevelTranslationOptions(TranslationOptions):
-
- fields = ('name',)
-
-
-@register(EventPublicType)
-class EventPublicTypeTranslationOptions(TranslationOptions):
-
- fields = ('name',)
-
-
-@register(EventRelatedTitle)
-class EventRelatedTitleTranslationOptions(TranslationOptions):
-
- fields = ('title',)
-
-
-@register(DynamicContentEvent)
-class DynamicContentEventTranslationOptions(TranslationOptions):
-
- fields = ()
-
-
-@register(EventPriceDescription)
-class EventPriceDescriptionTranslationOptions(TranslationOptions):
-
- fields = ('description', )
-
-
-@register(EventPrice)
-class EventPriceTranslationOptions(TranslationOptions):
-
- fields = ()
diff --git a/app/organization/agenda/urls.py b/app/organization/agenda/urls.py
deleted file mode 100644
index fe74be4f..00000000
--- a/app/organization/agenda/urls.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-
-import django.views.i18n
-from django.contrib.auth.decorators import permission_required
-from django.conf.urls import patterns, include, url
-from django.conf.urls.i18n import i18n_patterns
-
-from mezzanine.core.views import direct_to_template
-from mezzanine.conf import settings
-
-from organization.core.views import *
-from organization.agenda.views import *
-
-
-urlpatterns = [
- url("^%s/" % settings.EVENT_SLUG, include("mezzanine_agenda.urls")),
- url("^%s/confirmation/(?P[0-9]*)$" % settings.EVENT_SLUG, ConfirmationView.as_view(), name="organization-agenda-confirmation"),
- url("^dynamic-content-event/$", permission_required('event.can_edit')(DynamicContentEventView.as_view()), name='dynamic-content-event'),
-]
-#
diff --git a/app/organization/agenda/views.py b/app/organization/agenda/views.py
deleted file mode 100644
index 968bdc85..00000000
--- a/app/organization/agenda/views.py
+++ /dev/null
@@ -1,71 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from datetime import datetime
-from django.views.generic.base import TemplateView
-from mezzanine.conf import settings
-from dal import autocomplete
-from dal_select2_queryset_sequence.views import Select2QuerySetSequenceView
-from organization.magazine.models import Article
-from organization.pages.models import CustomPage
-from mezzanine_agenda.models import Event
-from mezzanine_agenda.views import EventListView
-from organization.core.views import autocomplete_result_formatting
-from django.db.models import Q
-
-
-class ConfirmationView(TemplateView):
-
- template_name = "agenda/confirmation.html"
-
- def get_context_data(self, **kwargs):
- context = super(ConfirmationView, self).get_context_data(**kwargs)
- context['confirmation_url'] = settings.EVENT_CONFIRMATION_URL % kwargs['transaction_id']
- return context
-
-
-class DynamicContentEventView(Select2QuerySetSequenceView):
-
- paginate_by = settings.DAL_MAX_RESULTS
-
- def get_queryset(self):
-
- articles = Article.objects.all()
- custompage = CustomPage.objects.all()
- events = Event.objects.all()
-
- if self.q:
- articles = articles.filter(title__icontains=self.q)
- custompage = custompage.filter(title__icontains=self.q)
- events = events.filter(title__icontains=self.q)
-
- qs = autocomplete.QuerySetSequence(articles, custompage, events,)
-
- if self.q:
- qs = qs.filter(title__icontains=self.q)
-
- qs = self.mixup_querysets(qs)
-
- return qs
-
- def get_results(self, context):
- results = autocomplete_result_formatting(self, context)
- return results
diff --git a/app/organization/core/__init__.py b/app/organization/core/__init__.py
deleted file mode 100644
index 5db70c99..00000000
--- a/app/organization/core/__init__.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-"""
-Provides abstract models and admin features used throughout the various
-Mezzanine apps.
-"""
-from __future__ import unicode_literals
-
-default_app_config = 'organization.core.apps.CoreConfig'
diff --git a/app/organization/core/admin.py b/app/organization/core/admin.py
deleted file mode 100644
index 88d6b8d7..00000000
--- a/app/organization/core/admin.py
+++ /dev/null
@@ -1,83 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.contrib import admin
-from copy import deepcopy
-from mezzanine.core.admin import *
-from mezzanine.pages.admin import PageAdmin
-from organization.core.models import *
-from mezzanine.blog.models import BlogPost
-from mezzanine.generic.models import ThreadedComment, Keyword
-from mezzanine.conf import settings
-from django.contrib.admin import SimpleListFilter
-
-
-class KeywordAdmin(BaseTranslationModelAdmin):
-
- model = Keyword
-
-
-class BaseTranslationOrderedModelAdmin(BaseTranslationModelAdmin):
-
- def get_fieldsets(self, request, obj = None):
- res = super(BaseTranslationOrderedModelAdmin, self).get_fieldsets(request, obj)
- fields = reversed(self.first_fields)
- if settings.USE_MODELTRANSLATION:
- lang = settings.LANGUAGE_CODE
- lang_fields = []
- for field in fields:
- lang_fields.append(field + '_' + lang)
- fields = lang_fields
- for field in fields:
- for trans_field in res[0][1]['fields']:
- if field in trans_field:
- index = res[0][1]['fields'].index(trans_field)
- res[0][1]['fields'].insert(0, res[0][1]['fields'].pop(index))
- return res
-
-
-class NullListFilter(SimpleListFilter):
- """Class to filter by null or not null any field in admin"""
- def lookups(self, request, model_admin):
- return (
- ('1', 'Null', ),
- ('0', '!= Null', ),
- )
-
- def queryset(self, request, queryset):
- if self.value() in ('0', '1'):
- kwargs = { '{0}__isnull'.format(self.parameter_name) : self.value() == '1' }
- return queryset.filter(**kwargs)
- return queryset
-
-
-def null_filter(field, title_=None):
- """Helper to filter by null or not null any field in admin"""
- class NullListFieldFilter(NullListFilter):
- parameter_name = field
- title = title_ or parameter_name
- return NullListFieldFilter
-
-
-admin.site.register(LinkType)
-admin.site.unregister(BlogPost)
-admin.site.unregister(ThreadedComment)
-admin.site.register(Keyword, KeywordAdmin)
diff --git a/app/organization/core/apps.py b/app/organization/core/apps.py
deleted file mode 100644
index 79a3c7f7..00000000
--- a/app/organization/core/apps.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.apps import AppConfig
-
-from django.core.checks import register
-
-
-class CoreConfig(AppConfig):
-
- name = 'organization.core'
- label = 'organization-core'
diff --git a/app/organization/core/context_processors.py b/app/organization/core/context_processors.py
deleted file mode 100644
index 162cf467..00000000
--- a/app/organization/core/context_processors.py
+++ /dev/null
@@ -1,74 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.conf import settings # import the settings file
-from datetime import datetime, date
-from organization.pages.models import Page
-from organization.network.models import Organization, OrganizationLinkedInline
-from mezzanine.utils.sites import current_site_id
-from django.contrib.sites.models import Site
-
-
-def settings(request):
- date_now = datetime.now()
- # SEASON
- current_season = int(date_now.year) - 1 if datetime(date_now.year, 1,1) <= date_now and date_now <= datetime(date_now.year, 7, 31) else date_now.year
- current_season_styled = str(current_season)[-2:]+"."+str(current_season+1)[-2:]
-
- # NEWSLETTER
- newsletter_page = Page.objects.filter(slug="newsletter")
- newsletter_subscribing_url = ""
- if newsletter_page:
- newsletter_subscribing_url = newsletter_page.first().get_absolute_url()
-
- # HOST ORGANIZATIONS
- try:
- site = Site.objects.get(id=current_site_id())
- host_org = Organization.objects.get(site=site)
- except:
- try:
- host_org = Organization.objects.filter(is_host=True).first()
- except:
- host_org = Organization.objects.first()
-
- organization_lists = []
-
- for orga_linked_block in host_org.organization_linked_block.all():
- organizations = []
- for orga_list in OrganizationLinkedInline.objects.filter(organization_list_id=orga_linked_block.organization_linked_id):
- organizations.append(orga_list.organization)
- organization_lists.append(organizations)
-
- linked_org_content = organization_lists[0] if len(organization_lists) > 0 else None
- linked_org_footer = organization_lists[1] if len(organization_lists) > 1 else None
- linked_org_footer_2 = organization_lists[2] if len(organization_lists) > 2 else None
-
- research_slug = "recherche"
-
- return {'current_season': current_season,
- 'current_season_styled': current_season_styled,
- 'newsletter_subscribing_url': newsletter_subscribing_url,
- 'host_organization': host_org,
- 'linked_organization_content' : linked_org_content,
- 'linked_organization_footer' : linked_org_footer,
- 'linked_organization_footer_2' : linked_org_footer_2,
- 'research_slug' : research_slug
- }
diff --git a/app/organization/core/management/__init__.py b/app/organization/core/management/__init__.py
deleted file mode 100644
index 12176181..00000000
--- a/app/organization/core/management/__init__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
diff --git a/app/organization/core/management/commands/__init__.py b/app/organization/core/management/commands/__init__.py
deleted file mode 100644
index 12176181..00000000
--- a/app/organization/core/management/commands/__init__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
diff --git a/app/organization/core/management/commands/create-admin-user.py b/app/organization/core/management/commands/create-admin-user.py
deleted file mode 100644
index 5a2ea04f..00000000
--- a/app/organization/core/management/commands/create-admin-user.py
+++ /dev/null
@@ -1,45 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from optparse import make_option
-from django.conf import settings
-from django.core.management.base import BaseCommand, CommandError
-from django.contrib.auth.models import User
-
-
-class Command(BaseCommand):
- help = """Create a default admin user if it doesn't exist.
- you SHOULD change the password and the email afterwards!"""
-
- username = 'admin'
- password = 'admin'
- email = 'root@example.com'
-
- def handle(self, *args, **options):
- admin = User.objects.filter(username=self.username)
- if not admin:
- user = User(username=self.username)
- user.set_password(self.password)
- user.email = self.email
- user.is_superuser = True
- user.is_staff = True
- user.save()
- print('User ' + self.username + ' created')
diff --git a/app/organization/core/management/commands/festival-sync-eve-events.py b/app/organization/core/management/commands/festival-sync-eve-events.py
deleted file mode 100644
index 0c22ee38..00000000
--- a/app/organization/core/management/commands/festival-sync-eve-events.py
+++ /dev/null
@@ -1,108 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from datetime import datetime, timedelta
-from optparse import make_option
-
-from django.conf import settings
-from django.core.management.base import BaseCommand, CommandError
-from django.contrib.auth.models import User
-from django.core.mail import EmailMessage
-
-import mezzanine_agenda.models as ma_models
-from mezzanine.generic.models import AssignedKeyword, Keyword
-
-import eve.models as eve_models
-
-
-class Command(BaseCommand):
- """Synchronize events from E-vement to mezzanine_agenda"""
-
-
- option_list = BaseCommand.option_list + (
- make_option('-m', '--meta_event',
- dest='meta_event',
- help='define eve meta_event'),
- )
-
- default_user = User.objects.get(username='admin')
-
-
- def cleanup(self):
- # for event in ma_models.Event.objects.all():
- # event.delete()
- # for location in ma_models.EventLocation.objects.all():
- # location.delete()
- for event_price in ma_models.EventPrice.objects.all():
- event_price.delete()
-
- def handle(self, *args, **kwargs):
- # self.cleanup()
- meta_event_name = kwargs.get('meta_event')
- meta_trans_all = eve_models.MetaEventTranslation.objects.all()
- for meta_trans in meta_trans_all:
- if meta_trans.name == meta_event_name:
- break
- eve_events = eve_models.Event.objects.filter(meta_event=meta_trans.id)
- for eve_event in eve_events:
- event_trans = eve_models.EventTranslation.objects.filter(id=eve_event, lang='fr')[0]
- manifestations = eve_event.manifestations.all().order_by('happens_at')
- first = True
- for manifestation in manifestations:
- events = ma_models.Event.objects.filter(external_id=manifestation.id)
- if not events:
- event = ma_models.Event(external_id=manifestation.id)
- else:
- event = events[0]
- event.start = manifestation.happens_at
- event.end = manifestation.happens_at + timedelta(seconds=manifestation.duration)
- event.title = event_trans.name
- event.user = self.default_user
-
- locations = ma_models.EventLocation.objects.filter(title=manifestation.location.name)
- if locations:
- location = locations[0]
- else:
- location = ma_models.EventLocation(title=manifestation.location.name)
- address = '\n'.join([manifestation.location.address, manifestation.location.postalcode + ' ' + manifestation.location.city])
- location.address = address
- location.external_id = manifestation.id
- location.clean()
- location.save()
- event.location = location
- event.save()
- keyword, _ = Keyword.objects.get_or_create(title=eve_event.event_category.name)
- event.keywords.add(AssignedKeyword(keyword=keyword), bulk=False)
-
- eve_prices = eve_models.PriceManifestation.objects.filter(manifestation=manifestation)
- for price in eve_prices:
- event_price, c = ma_models.EventPrice.objects.get_or_create(value=float(price.value))
- if event:
- if not event_price in event.prices.all():
- event.prices.add(event_price)
-
- if not first:
- event.parent = parent
- else:
- parent = event
- first = False
-
- event.save()
diff --git a/app/organization/core/management/commands/wait-for-db.py b/app/organization/core/management/commands/wait-for-db.py
deleted file mode 100644
index 1848488c..00000000
--- a/app/organization/core/management/commands/wait-for-db.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-import os, time
-
-from optparse import make_option
-from django.conf import settings
-from django.core.management.base import BaseCommand, CommandError
-from django.db import connections
-
-
-class Command(BaseCommand):
- help = "wait for default DB connection"
-
- db_name = 'default'
- N = 20
-
- def handle(self, *args, **options):
- i = 0
- connected = False
- db_conn = connections[self.db_name]
- while not connected:
- try:
- c = db_conn.cursor()
- connected = True
- except:
- print('error connecting to DB...')
- if i > self.N:
- print('...exiting')
- raise
- print('...retrying')
- i += 1
- time.sleep(1)
diff --git a/app/organization/core/managers.py b/app/organization/core/managers.py
deleted file mode 100644
index c68adffc..00000000
--- a/app/organization/core/managers.py
+++ /dev/null
@@ -1,132 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-
-import django
-from future.builtins import int, zip
-
-from functools import reduce
-from operator import ior, iand
-from string import punctuation
-
-from django.apps import apps, AppConfig
-from django.core.exceptions import ImproperlyConfigured
-from django.db.models import Manager, Q, CharField, TextField
-from django.db.models.manager import ManagerDescriptor
-from django.db.models.query import QuerySet
-from django.contrib.sites.managers import CurrentSiteManager as DjangoCSM
-from django.utils.timezone import now
-from django.utils.translation import ugettext_lazy as _
-
-from mezzanine.conf import settings
-from mezzanine.utils.sites import current_site_id
-from mezzanine.utils.urls import home_slug
-from mezzanine.core.managers import search_fields_to_dict, SearchableQuerySet, SearchableManager, DisplayableManager
-
-
-class CustomSearchableManager(DisplayableManager):
-
- def search(self, *args, **kwargs):
- """
- Proxy to queryset's search method for the manager's model and
- any models that subclass from this manager's model if the
- model is abstract.
- """
- if not settings.SEARCH_MODEL_CHOICES:
- # No choices defined - build a list of leaf models (those
- # without subclasses) that inherit from Displayable.
- models = [m for m in apps.get_models()
- if issubclass(m, self.model)]
- parents = reduce(ior, [set(m._meta.get_parent_list())
- for m in models])
- models = [m for m in models if m not in parents]
- elif getattr(self.model._meta, "abstract", False):
- # When we're combining model subclasses for an abstract
- # model (eg Displayable), we only want to use models that
- # are represented by the ``SEARCH_MODEL_CHOICES`` setting.
- # Now this setting won't contain an exact list of models
- # we should use, since it can define superclass models such
- # as ``Page``, so we check the parent class list of each
- # model when determining whether a model falls within the
- # ``SEARCH_MODEL_CHOICES`` setting.
- search_choices = set()
- models = set()
- parents = set()
- errors = []
- for name in settings.SEARCH_MODEL_CHOICES:
- try:
- model = apps.get_model(*name.split(".", 1))
- except LookupError:
- errors.append(name)
- else:
- search_choices.add(model)
- if errors:
- raise ImproperlyConfigured("Could not load the model(s) "
- "%s defined in the 'SEARCH_MODEL_CHOICES' setting."
- % ", ".join(errors))
-
- for model in apps.get_models():
- # Model is actually a subclasses of what we're
- # searching (eg Displayabale)
- is_subclass = issubclass(model, self.model)
- # Model satisfies the search choices list - either
- # there are no search choices, model is directly in
- # search choices, or its parent is.
- this_parents = set(model._meta.get_parent_list())
- in_choices = not search_choices or model in search_choices
- in_choices = in_choices or this_parents & search_choices
- if is_subclass and (in_choices or not search_choices):
- # Add to models we'll seach. Also maintain a parent
- # set, used below for further refinement of models
- # list to search.
- models.add(model)
- parents.update(this_parents)
- # Strip out any models that are superclasses of models,
- # specifically the Page model which will generally be the
- # superclass for all custom content types, since if we
- # query the Page model as well, we will get duplicate
- # results.
- models -= parents
- elif self.model.__name__ == "CustomPage":
- # gather all pages defined in PAGES_MODELS settings
- models = set()
- errors = []
- for name in settings.PAGES_MODELS:
- try:
- models.add(apps.get_model(name))
- except LookupError:
- errors.append(name)
- if errors:
- raise ImproperlyConfigured("Could not load the model(s) "
- "%s defined in the 'SEARCH_MODEL_CHOICES' setting."
- % ", ".join(errors))
- else:
- models = [self.model]
- all_results = []
- user = kwargs.pop("for_user", None)
- for model in models:
- try:
- queryset = model.objects.published(for_user=user)
- except AttributeError:
- queryset = model.objects.get_queryset()
- all_results.extend(queryset.search(*args, **kwargs))
- return sorted(all_results, key=lambda r: r.result_count, reverse=True)
diff --git a/app/organization/core/migrations/0001_initial.py b/app/organization/core/migrations/0001_initial.py
deleted file mode 100644
index f65a4d6a..00000000
--- a/app/organization/core/migrations/0001_initial.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-01 15:26
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- initial = True
-
- dependencies = [
- ]
-
- operations = [
- migrations.CreateModel(
- name='Category',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ],
- options={
- 'verbose_name': 'category',
- },
- ),
- migrations.CreateModel(
- name='LinkType',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=256, verbose_name='name')),
- ('slug', models.SlugField(blank=True, help_text='Use this field to define a simple identifier that can be used to style the different link types (i.e. assign social media icons to them)', max_length=256, verbose_name='slug')),
- ('ordering', models.PositiveIntegerField(blank=True, null=True, verbose_name='ordering')),
- ],
- options={
- 'ordering': ['ordering'],
- },
- ),
- ]
diff --git a/app/organization/core/migrations/0002_linktype_picto.py b/app/organization/core/migrations/0002_linktype_picto.py
deleted file mode 100644
index 9997fe06..00000000
--- a/app/organization/core/migrations/0002_linktype_picto.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-14 16:18
-from __future__ import unicode_literals
-
-from django.db import migrations
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-core', '0001_initial'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='linktype',
- name='picto',
- field=mezzanine.core.fields.FileField(default='', max_length=1024, verbose_name='picto'),
- preserve_default=False,
- ),
- ]
diff --git a/app/organization/core/migrations/0003_remove_linktype_picto.py b/app/organization/core/migrations/0003_remove_linktype_picto.py
deleted file mode 100644
index 6c90e45a..00000000
--- a/app/organization/core/migrations/0003_remove_linktype_picto.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-21 13:02
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-core', '0002_linktype_picto'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='linktype',
- name='picto',
- ),
- ]
diff --git a/app/organization/core/migrations/0004_auto_20160923_1141.py b/app/organization/core/migrations/0004_auto_20160923_1141.py
deleted file mode 100644
index 906235d3..00000000
--- a/app/organization/core/migrations/0004_auto_20160923_1141.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-23 09:41
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-core', '0003_remove_linktype_picto'),
- ]
-
- operations = [
- migrations.RenameModel(
- old_name='Category',
- new_name='CustomCategory',
- ),
- migrations.AlterModelOptions(
- name='customcategory',
- options={'verbose_name': 'custom category'},
- ),
- ]
diff --git a/app/organization/core/migrations/0005_linktype_fa_option.py b/app/organization/core/migrations/0005_linktype_fa_option.py
deleted file mode 100644
index 9f8d034a..00000000
--- a/app/organization/core/migrations/0005_linktype_fa_option.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-14 17:42
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-core', '0004_auto_20160923_1141'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='linktype',
- name='fa_option',
- field=models.CharField(blank=True, help_text='will be added to fa-', max_length=64, null=True, verbose_name='fontawesome icon name option'),
- ),
- ]
diff --git a/app/organization/core/migrations/__init__.py b/app/organization/core/migrations/__init__.py
deleted file mode 100644
index e69de29b..00000000
diff --git a/app/organization/core/models.py b/app/organization/core/models.py
deleted file mode 100644
index 8d7d31d7..00000000
--- a/app/organization/core/models.py
+++ /dev/null
@@ -1,319 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.db import models
-from django.conf import settings
-from django.utils.translation import ugettext_lazy as _
-from django.core.urlresolvers import reverse, reverse_lazy
-from django.contrib.contenttypes.models import ContentType
-from django.contrib.contenttypes.fields import GenericForeignKey
-
-from mezzanine.pages.models import Page, RichText
-from mezzanine.core.fields import RichTextField, OrderField, FileField
-from mezzanine.core.models import Displayable, Slugged, Orderable
-
-from django_countries.fields import CountryField
-
-
-COLOR_CHOICES = (('black', _('black')), ('yellow', _('yellow')), ('red', _('red')), ('white', _('white')),)
-
-ALIGNMENT_CHOICES = (('left', _('left')), ('center', _('center')), ('right', _('right')))
-
-IMAGE_TYPE_CHOICES = (('logo', _('logo')), ('logo_white', _('logo white')), ('logo_black', _('logo black')), ('logo_header', _('logo header')), ('logo_footer', _('logo footer')), ('slider', _('slider')), ('card', _('card')), ('page_slider', _('page - slider')), ('page_featured', _('page - featured')))
-
-
-class Description(models.Model):
- """Abstract model providing a description field"""
-
- description = models.TextField(_('description'), blank=True)
-
- class Meta:
- abstract = True
-
-
-class NamedOnly(models.Model):
- """Abstract model providing a name field only"""
-
- name = models.CharField(_('name'), max_length=512, blank=True)
-
- class Meta:
- abstract = True
-
- def __str__(self):
- return self.name
-
-
-class Named(models.Model):
- """Abstract model providing a name field and a description"""
-
- name = models.CharField(_('name'), max_length=512)
- description = models.TextField(_('description'), blank=True)
-
- class Meta:
- abstract = True
- ordering = ['name',]
-
- def __str__(self):
- return self.name
-
- @property
- def slug(self):
- return slugify(self.__str__())
-
-
-class Titled(models.Model):
- """Abstract model providing a title field"""
-
- title = models.CharField(_('title'), max_length=1024)
- description = models.TextField(_('description'), blank=True)
-
- class Meta:
- abstract = True
-
- def __str__(self):
- return self.title
-
-
-class SubTitled(models.Model):
-
- sub_title = models.TextField(_('sub title'), blank=True, max_length=1024)
-
- class Meta:
- abstract = True
-
-
-class CustomCategory(Named):
- """Category description)"""
-
- class Meta:
- verbose_name = _('custom category')
-
- def __str__(self):
- return self.name
-
-
-class Block(Titled, RichText, Orderable):
-
- with_separator = models.BooleanField(default=False)
- background_color = models.CharField(_('background color'), max_length=32, choices=COLOR_CHOICES, blank=True)
- login_required = models.BooleanField(_('login required'), default=False)
-
- class Meta:
- abstract = True
-
-
-class Image(Titled, Orderable):
-
- file = FileField(_("Image"), max_length=1024, format="Image", upload_to="images")
- credits = models.CharField(_('credits'), max_length=256, blank=True, null=True)
- type = models.CharField(_('type'), max_length=64, choices=IMAGE_TYPE_CHOICES)
-
- class Meta:
- abstract = True
-
- def __str__(self):
- value = self.description
- if not value:
- value = self.file.name
- if not value:
- value = ""
- return value
-
-
-class UserImage(Titled, Orderable):
-
- file = models.FileField(_("Image"), max_length=1024, upload_to="user/images/%Y/%m/%d/")
- credits = models.CharField(_('credits'), max_length=256, blank=True, null=True)
-
- class Meta:
- abstract = True
-
- def __str__(self):
- value = self.description
- if not value:
- value = self.file.name
- if not value:
- value = ""
- return value
-
-
-class File(Titled, Orderable):
-
- file = FileField(_("document"), max_length=1024, upload_to="documents")
-
- class Meta:
- abstract = True
-
- def __str__(self):
- value = self.description
- if not value:
- value = self.file.name
- if not value:
- value = ""
- return value
-
-
-class DynamicContent(models.Model):
-
- # used for autocomplete but hidden in admin
- content_type = models.ForeignKey(
- ContentType,
- verbose_name=_('content type'),
- null=True,
- blank=True,
- editable=False,
- )
-
- # used for autocomplete but hidden in admin
- object_id = models.PositiveIntegerField(
- verbose_name=_('related object'),
- null=True,
- editable=False,
- )
-
- content_object = GenericForeignKey('content_type', 'object_id')
-
- class Meta:
- abstract = True
-
-
-class URL(models.Model):
-
- url = models.URLField(_('URL'), max_length=512, blank=True)
-
- class Meta:
- abstract = True
-
-
-class LinkType(models.Model):
- """
- A link type could be ``Facebook`` or ``Twitter`` or ``Website``.
- This is masterdata that should be created by the admins when the site is
- deployed for the first time.
- :ordering: Enter numbers here if you want links to be displayed in a
- special order.
- """
-
- name = models.CharField(max_length=256, verbose_name=_('name'))
- slug = models.SlugField(max_length=256, verbose_name=_('slug'), help_text=_(
- 'Use this field to define a simple identifier that can be used'
- ' to style the different link types (i.e. assign social media'
- ' icons to them)'),
- blank=True,
- )
- ordering = models.PositiveIntegerField(verbose_name=_('ordering'), null=True, blank=True)
- fa_option = models.CharField(max_length=64, verbose_name=_('fontawesome icon name option'), null=True, blank=True, help_text="will be added to fa-")
-
- class Meta:
- ordering = ['ordering', ]
-
- def __str__(self):
- return self.name
-
-
-class Link(URL):
- """A person can have many links."""
-
- title = models.CharField(_('title'), max_length=1024, null=True, blank=True)
- link_type = models.ForeignKey(LinkType, verbose_name=_('link type'))
-
- class Meta:
- abstract = True
- verbose_name = _('link')
- verbose_name_plural = _('links')
-
- def __str__(self):
- return self.url
-
-
-class Period(models.Model):
-
- date_from = models.DateField(_('start date'), null=True, blank=True)
- date_to = models.DateField(_('end date'), null=True, blank=True)
-
- class Meta:
- abstract = True
-
-
-class PeriodDateTime(models.Model):
-
- date_from = models.DateTimeField(_('begin date'), null=True, blank=True)
- date_to = models.DateTimeField(_('end date'), null=True, blank=True)
-
- class Meta:
- abstract = True
-
-
-class AdminThumbRelatedMixin(object):
- """
- Provides a thumbnail method on models for admin classes to
- reference in the ``list_display`` definition.
- """
-
- admin_thumb_type = None
-
- def admin_thumb(self):
- thumb = ""
- if self.admin_thumb_type:
- images = self.images.filter(type=self.admin_thumb_type)
- if images:
- thumb = images[0].file
- if not thumb:
- return ""
- from mezzanine.conf import settings
- from mezzanine.core.templatetags.mezzanine_tags import thumbnail
- x, y = settings.ADMIN_THUMB_SIZE.split('x')
- thumb_url = thumbnail(thumb, x, y)
- return " " % (settings.MEDIA_URL, thumb_url)
- admin_thumb.allow_tags = True
- admin_thumb.short_description = ""
-
-
-class Dated(models.Model):
-
- date_created = models.DateTimeField(_('creation date'), auto_now_add=True)
- date_modified = models.DateTimeField(_('last modification date'), auto_now=True)
-
- class Meta:
- abstract = True
-
-
-class Address(models.Model):
- """(Address description)"""
-
- address = models.TextField(_('address'), blank=True)
- postal_code = models.CharField(_('postal code'), max_length=16, null=True, blank=True)
- city = models.CharField(_('city'), max_length=255, null=True, blank=True)
- country = CountryField(_('country'), null=True, blank=True)
-
- def __str__(self):
- return ' '.join((self.address, self.postal_code))
-
- class Meta:
- abstract = True
-
-
-class RelatedTitle(models.Model):
-
- title = models.CharField(_('title'), max_length=1024, null=True, blank=True)
-
- class Meta:
- abstract = True
diff --git a/app/organization/core/no_db_settings.py b/app/organization/core/no_db_settings.py
deleted file mode 100644
index bd411627..00000000
--- a/app/organization/core/no_db_settings.py
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- coding: utf-8 -*-
-try:
- from local_settings import *
-except ImportError:
- pass
-# Test runner with no database creation
-TEST_RUNNER = 'organization.core.tests.NoDbTestRunner'
diff --git a/app/organization/core/related.py b/app/organization/core/related.py
deleted file mode 100644
index f128fc29..00000000
--- a/app/organization/core/related.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.core import exceptions
-from django.db.models.fields.related import ForeignKey
-from django.db.utils import ConnectionHandler, ConnectionRouter
-
-connections = ConnectionHandler()
-router = ConnectionRouter()
-
-
-class SpanningForeignKey(ForeignKey):
-
- def validate(self, value, model_instance):
- if self.rel.parent_link:
- return
- # Call the grandparent rather than the parent to skip validation
- super(ForeignKey, self).validate(value, model_instance)
- if value is None:
- return
-
- using = router.db_for_read(self.rel.to, instance=model_instance)
- qs = self.rel.to._default_manager.using(using).filter(
- **{self.rel.field_name: value}
- )
- qs = qs.complex_filter(self.get_limit_choices_to())
- if not qs.exists():
- raise exceptions.ValidationError(
- self.error_messages['invalid'],
- code='invalid',
- params={
- 'model': self.rel.to._meta.verbose_name, 'pk': value,
- 'field': self.rel.field_name, 'value': value,
- }, # 'pk' is included for backwards compatibility
- )
diff --git a/app/organization/core/static/js/tinymce_setup.js b/app/organization/core/static/js/tinymce_setup.js
deleted file mode 100644
index 64aaa7d4..00000000
--- a/app/organization/core/static/js/tinymce_setup.js
+++ /dev/null
@@ -1,104 +0,0 @@
-function custom_file_browser(field_name, url, type, win) {
- return tinyMCE.activeEditor.windowManager.open({
- title: "Select " + type + " to insert",
- file: window.__filebrowser_url + "?pop=5&type=" + type,
- width: 800,
- height: 500,
- resizable: "yes",
- scrollbars: "yes",
- inline: "yes",
- close_previous: "no"
- }, {
- window: win,
- input: field_name
- }), !1
-}
-var language_codes = {
- ar: "ar",
- ca: "ca",
- cs: "cs",
- da: "da",
- de: "de",
- es: "es",
- et: "et",
- fa: "fa",
- "fa-ir": "fa_IR",
- fi: "fi",
- fr: "fr_FR",
- "hr-hr": "hr",
- hu: "hu_HU",
- "id-id": "id",
- "is-is": "is_IS",
- it: "it",
- ja: "ja",
- ko: "ko_KR",
- lv: "lv",
- nb: "nb_NO",
- nl: "nl",
- pl: "pl",
- "pt-br": "pt_BR",
- "pt-pt": "pt_PT",
- ru: "ru",
- sk: "sk",
- sr: "sr",
- sv: "sv_SE",
- tr: "tr",
- uk: "uk_UA",
- vi: "vi",
- "zh-cn": "zh_CN",
- "zh-tw": "zh_TW",
- "zh-hant": "zh_TW",
- "zh-hans": "zh_CN"
-};
-jQuery(function($) {
- "undefined" != typeof tinyMCE && tinyMCE.init({
- selector: "textarea.mceEditor",
- height: "500px",
- language: language_codes[window.__language_code] || "en",
- plugins: ["advlist autolink lists link image charmap print preview anchor", "searchreplace visualblocks code fullscreen", "insertdatetime media table contextmenu paste"],
- link_list: window.__link_list_url,
- relative_urls: !1,
- convert_urls: !1,
- menubar: !0,
- statusbar: !1,
- toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image table | code fullscreen",
- image_advtab: !0,
- file_browser_callback: custom_file_browser,
- content_css: [window.__tinymce_css, '/static/admin/css/organization.css', '/static/css/index.min.css'] ,
- valid_elements: "*[*]",
- style_formats: [
- {
- title: 'Boutons', items: [
- { title: 'Boutons Jaune', selector: 'a', classes: 'wys-button'},
- { title: 'Boutons Jaune Small', selector: 'a', classes: 'wys-button-small'},
- { title: 'Boutons Jaune XSmall', selector: 'a', classes: 'wys-button-xsmall'},
- { title: 'Boutons Noir', selector: 'a', classes: 'wys-button-black'},
- { title: 'Boutons Noir Small', selector: 'a', classes: 'wys-button-black-small'},
- { title: 'Boutons Noir XSmall', selector: 'a', classes: 'wys-button-black-xsmall'},
- { title: 'Boutons Blanc', selector: 'a', classes: 'wys-button-white'},
- { title: 'Boutons Blanc Small', selector: 'a', classes: 'wys-button-white-small'},
- { title: 'Boutons Blanc XSmall', selector: 'a', classes: 'wys-button-white-xsmall'}
- ]
-
- },
- {
-
- title: 'Paragraphs', items: [
- { title: 'Highlighted paragraph', selector: 'p', classes: 'wys-highlighted-paragraph'},
- { title: 'Small paragraph', selector: 'p', classes: 'wys-small-text'}
- ]
-
- },
- {
-
- title: 'Links', items: [
- { title: 'Unstyled link', selector: 'a', classes: 'wys-unstyled-link'}
- ]
-
- }
- ],
- style_formats_merge: true
- })
-});
-
-//# sourceMappingURL=tinymce_setup.js.map
diff --git a/app/organization/core/templatetags/organization_tags.py b/app/organization/core/templatetags/organization_tags.py
deleted file mode 100644
index a3db871a..00000000
--- a/app/organization/core/templatetags/organization_tags.py
+++ /dev/null
@@ -1,240 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-# -*- coding: utf-8 -*-
-import datetime
-import calendar
-from re import match
-from django.http import QueryDict
-from mezzanine.pages.models import Page
-from mezzanine.blog.models import BlogPost
-from mezzanine.template import Library
-from mezzanine_agenda.models import Event
-from mezzanine.conf import settings
-from random import shuffle
-from organization.magazine.models import *
-from organization.projects.models import *
-
-register = Library()
-
-
-@register.filter
-def subtract(value, arg):
- return value - arg
-
-@register.as_tag
-def children_pages(page_id):
- childrens = Page.objects.filter(parent_id=page_id).order_by('_order')
- if childrens:
- return childrens
- return None
-
-@register.as_tag
-def featured_edito(*args):
- qs = Page.objects.filter(slug="edito")
- if qs:
- return qs[0].get_content_model()
- else:
- return None
-
-@register.as_tag
-def featured_events(*args):
- featured = Featured.objects.all()
- if featured:
- return featured[0].events.order_by('start')
- return None
-
-@register.as_tag
-def featured(*args):
- featured_list = []
- featured = Featured.objects.filter(id=settings.HOME_FEATURED_ID)
- if featured:
- featured = featured[0]
- for post in featured.blogposts.all():
- featured_list.append(post)
- for video in featured.videos.all():
- featured_list.append(video)
- for playlist in featured.playlists.all():
- featured_list.append(playlist)
- shuffle(featured_list)
- return featured_list
-
-@register.as_tag
-def featured_breaking_news_content(*args):
- featured = Featured.objects.filter(id=settings.BREAKING_NEWS_FEATURED_ID)
- if featured:
- featured = featured[0]
- news = featured.pages.all()
- if news:
- return news[0].richtextpage.content
- else:
- return ''
- return ''
-
-@register.filter
-def get_class(obj):
- return obj.__class__.__name__
-
-@register.filter
-def unique_posts(events):
- post_list = []
- for event in events:
- for post in event.blog_posts.all():
- if not post in post_list:
- post_list.append(post)
- return post_list
-
-@register.filter
-def no_parents(events):
- return events.filter(parent=None)
-
-@register.filter
-def get_mezzanine_menu_name(menu_id):
- if menu_id:
- return settings.PAGE_MENU_TEMPLATES[int(menu_id)-1][1]
- return 'None'
-
-@register.filter
-def get_type(objects, type):
- if objects:
- objs = objects.filter(type=type)
- if objs:
- return objs
- return None
-
-@register.filter
-def get_type_link(objects, slug):
- objs = objects.filter(link_type__slug=slug)
- if objs:
- return objs
- return None
-
-@register.filter
-def in_category(objects, category):
- return objects.filter(category=type)
-
-@register.filter
-def sub_topics(topic):
- return ProjectTopic.objects.filter(parent=topic)
-
-@register.filter
-def classname(obj):
- return obj.__class__.__name__
-
-@register.filter
-def app_label_short(obj):
- app_label = obj._meta.app_config.label
- if app_label.find("_") > 0:
- app_label_short = app_label.split("_")[1]
- elif app_label.find("-") > 0:
- app_label_short = app_label.split("-")[1]
- else :
- app_label_short = app_label
- return app_label_short
-
-@register.as_tag
-def activity_statuses(*args):
- return ActivityStatus.objects.filter(display=True).exclude(parent__isnull=False)
-
-@register.filter
-def get_team_persons(team, status):
- persons = []
- statuses = status.children.all()
- if not statuses:
- statuses = [status,]
- for status in statuses:
- activities = status.activities.filter(teams__in=[team], date_to__gte=datetime.date.today())
- for activity in activities:
- if not activity.person in persons:
- persons.append(activity.person)
- return persons
-
-@register.filter
-def slice_ng(qs, indexes):
- list = []
- for obj in qs:
- list.append(obj)
- index_split = indexes.split(':')
- index_1 = int(index_split[0])
- index_2 = 0
- if len(index_split) > 1:
- index_2 = int(index_split[1])
- if index_1 >= 0 and index_2:
- return list[index_1:index_2]
- else:
- return [list[index_1]]
-
-@register.filter
-def date_year_higher_than(date, years):
- diff = date - datetime.date.today()
- print(diff.days)
- return diff.days > years*365
-
-@register.simple_tag
-def current_year():
- return datetime.datetime.now().strftime("%Y")
-
-@register.filter
-def is_not_host(organizations):
- return organizations.exclude(is_host=True)
-
-@register.filter
-def unspam(email):
- return email.replace('@', ' (at) ')
-
-@register.filter
-def get_attr(obj, attr):
- return getattr(obj, attr)
-
-@register.filter
-def month_name(month_number):
- return calendar.month_name[month_number]
-
-@register.filter
-def format_wp(work_packages):
- work_packages = [str(wk.number) for wk in work_packages]
- return ",".join(work_packages)
-
-@register.filter
-def format_percent(percent):
- return str(percent * 100) + ' %'
-
-@register.filter
-def get_media_type(media):
- mime_type = media.transcoded.first().mime_type
- media_type = ""
- if match('video', mime_type):
- media_type = "Video"
- elif match('audio', mime_type):
- media_type = "Audio"
- return media_type
-
-@register.filter
-def filter_content(dynamic_contents):
- dict = {}
- dict["event"] = []
- dict["other"] = []
- for dc in dynamic_contents:
- if dc.content_object._meta.model_name== "event":
- dict["event"].append(dc)
- else :
- dict["other"].append(dc)
- return dict
diff --git a/app/organization/core/tests.py b/app/organization/core/tests.py
deleted file mode 100644
index 85b5bf83..00000000
--- a/app/organization/core/tests.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.test import TestCase
-from django.test.runner import DiscoverRunner
-
-class NoDbTestRunner(DiscoverRunner):
- """ A test runner to test without database creation """
-
- def setup_databases(self, **kwargs):
- """ Override the database creation defined in parent class """
- pass
-
- def teardown_databases(self, old_config, **kwargs):
- """ Override the database teardown defined in parent class """
- pass
diff --git a/app/organization/core/translation.py b/app/organization/core/translation.py
deleted file mode 100644
index 6e7d602f..00000000
--- a/app/organization/core/translation.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from modeltranslation.translator import translator, register, TranslationOptions
-from mezzanine.pages.models import Page, RichText
-from mezzanine.pages.translation import TranslatedRichText
-from mezzanine.generic.models import Keyword
-from organization.core.models import *
-
-
-
-@register(Keyword)
-class KeywordTranslationOptions(TranslationOptions):
-
- fields = ('title',)
diff --git a/app/organization/core/urls.py b/app/organization/core/urls.py
deleted file mode 100644
index 1574a563..00000000
--- a/app/organization/core/urls.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-
-import django.views.i18n
-from django.conf.urls import patterns, include, url
-from django.conf.urls.i18n import i18n_patterns
-
-from mezzanine.core.views import direct_to_template
-from mezzanine.conf import settings
-
-from organization.core.views import *
-
-urlpatterns = [
- url("^search/$", CustomSearchView.as_view(), name="search"),
-]
diff --git a/app/organization/core/views.py b/app/organization/core/views.py
deleted file mode 100644
index a1f45aca..00000000
--- a/app/organization/core/views.py
+++ /dev/null
@@ -1,199 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.shortcuts import render, get_object_or_404
-from django.http import Http404
-from django.views.generic.base import View
-from django.views.generic import DetailView, ListView, TemplateView, UpdateView
-from django.apps import apps
-from django.utils import six, timezone, formats
-from django.utils.translation import ugettext_lazy as _
-from django.http import QueryDict
-from django.template.defaultfilters import capfirst
-from mezzanine.conf import settings
-from mezzanine.utils.views import paginate
-from organization.core.models import *
-from functools import reduce
-from operator import ior, iand
-from organization.media.models import Playlist
-from mezzanine_agenda.models import Event
-from organization.pages.models import CustomPage
-from organization.projects.models import Project
-from extra_views import CreateWithInlinesView, UpdateWithInlinesView, InlineFormSet
-
-
-class SlugMixin(object):
-
- def get_object(self):
- objects = self.model.objects.all()
- return get_object_or_404(objects, slug=self.kwargs['slug'])
-
-
-class CustomSearchView(TemplateView):
-
- template_name='search_results.html'
-
- def get(self, request, *args, **kwargs):
- """
- Display search results. Takes an optional "contenttype" GET parameter
- in the form "app-name.ModelName" to limit search results to a single model.
- """
- context = super(CustomSearchView, self).get_context_data(**kwargs)
- query = request.GET.get("q", "")
- page = request.GET.get("page", 1)
- per_page = settings.SEARCH_PER_PAGE
- max_paging_links = settings.MAX_PAGING_LINKS
- is_searching_all = False
- try:
- parts = request.GET.get("type", "").split(".", 1)
- search_model = apps.get_model(*parts)
- search_model.objects.search # Attribute check
- except (ValueError, TypeError, LookupError, AttributeError):
- search_model = Displayable
- search_type = _("Everything")
- is_searching_all = True
- else:
- search_type = search_model._meta.verbose_name_plural.capitalize()
-
- # @Todo : rewrite SearchableManager
- results = search_model.objects.search(query, for_user=request.user)
- results_media_count = len(Playlist.objects.search(query, for_user=request.user))
- results_page_count = len(CustomPage.objects.search(query, for_user=request.user))
- results_event_count = len(Event.objects.search(query, for_user=request.user))
- results_project_count = len(Project.objects.search(query, for_user=request.user))
-
- # count objects
- filter_dict = dict()
-
- for result in results:
- classname = result.__class__.__name__
- app_label = result._meta.app_label
- full_classname = app_label+"."+classname
- verbose_name = result._meta.verbose_name
- # aggregate all Page types : CustomPage, TeamPage, Topic etc...
- if result._meta.get_parent_list() :
- parent_class = result._meta.get_parent_list()[0]
- if full_classname in settings.PAGES_MODELS:
- classname = "CustomPage"
- verbose_name = "Page"
- app_label = "organization-pages"
- elif classname == "Playlist":
- verbose_name = "Media"
- if classname in filter_dict:
- filter_dict[classname]['count'] += 1
- else:
- filter_dict[classname] = {'count' : 1}
- filter_dict[classname].update({'verbose_name' : verbose_name})
- filter_dict[classname].update({'app_label' : app_label})
-
- # temporarily overriding filter_dict to get all filters manually
- filter_dict = {
- 'CustomPage': {
- 'count' : results_page_count,
- 'verbose_name' : 'Page',
- 'app_label' : 'organization-pages'
- },
- 'Event': {
- 'count' : results_event_count,
- 'verbose_name' : 'Event',
- 'app_label' : 'mezzanine_agenda'
- },
- 'Playlist': {
- 'count' : results_media_count,
- 'verbose_name' : 'Media',
- 'app_label' : 'organization-media'
- },
- 'Project': {
- 'count' : results_project_count,
- 'verbose_name' : 'Project',
- 'app_label' : 'organization-projects'
- },
- }
-
- # get url param
- current_query = QueryDict(mutable=True)
- current_query = request.GET.copy()
-
- # generate filter url
- for key, value in filter_dict.items():
- current_query['type'] = value['app_label']+'.'+ key
- filter_dict[key].update({'url' : request.path+"?"+current_query.urlencode(safe='/')})
-
- # pagination
- paginated = paginate(results, page, per_page, max_paging_links)
-
- # count all results
- all_results_count = results_media_count + results_page_count + results_event_count
-
- # context
- context = {"query": query, "results": paginated,
- "search_type": search_type.__class__.__name__, "search_model": search_model.__name__,
- "all_results_count" : all_results_count, 'is_searching_all': is_searching_all}
-
- # cancel filter url
- if request.GET.__contains__('type'):
- previous_query = QueryDict(mutable=True)
- previous_query = request.GET.copy()
- previous_query.pop('type')
- context['cancel_filter_url'] = '?'+previous_query.urlencode(safe='/')
-
- context['filter_dict'] = filter_dict
- # context.update(extra_context or {})
- return self.render_to_response(context)
-
-
-def autocomplete_result_formatting(self, context):
- """
- Return a list of results usable by Select2.
- It will render as a list of one per different content type
- containing a list of one per model.
- """
- groups = {}
-
- for result in context['object_list']:
- groups.setdefault(type(result), [])
- groups[type(result)].append(result)
-
- all_results = []
- for model, results in groups.items():
- children = []
- for result in results:
- text = six.text_type(result)
- if model._meta.verbose_name == "Event":
- event_date = timezone.localtime(result.start)
- is_parent = ""
- if not result.parent:
- is_parent = " ⦠-"
- text = "%s -%s%s" % (six.text_type(result), is_parent, formats.date_format(event_date, "d-m-y H:i"))
-
- children.append({
- 'id': self.get_result_value(result),
- 'text': text,
- })
-
- curr_model_result = {
- 'id': None,
- 'text': capfirst(model._meta.verbose_name),
- 'children': children
- }
- all_results.append(curr_model_result)
-
- return all_results
diff --git a/app/organization/formats/__init__.py b/app/organization/formats/__init__.py
deleted file mode 100644
index 0b1f41f8..00000000
--- a/app/organization/formats/__init__.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-"""
-Provides abstract models and admin features used throughout the various
-Mezzanine apps.
-"""
-from __future__ import unicode_literals
-
-default_app_config = 'organization.formats.apps.FormatsConfig'
diff --git a/app/organization/formats/apps.py b/app/organization/formats/apps.py
deleted file mode 100644
index fb95372d..00000000
--- a/app/organization/formats/apps.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.apps import AppConfig
-
-from django.core.checks import register
-
-
-class FormatsConfig(AppConfig):
-
- name = 'organization.formats'
- label = 'organization-formats'
diff --git a/app/organization/formats/en/__init__.py b/app/organization/formats/en/__init__.py
deleted file mode 100644
index 12176181..00000000
--- a/app/organization/formats/en/__init__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
diff --git a/app/organization/formats/en/formats.py b/app/organization/formats/en/formats.py
deleted file mode 100644
index 00ddca62..00000000
--- a/app/organization/formats/en/formats.py
+++ /dev/null
@@ -1,66 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-# -*- encoding: utf-8 -*-
-# This file is distributed under the same license as the Django package.
-#
-from __future__ import unicode_literals
-
-# The *_FORMAT strings use the Django date format syntax,
-# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
-DATE_FORMAT = 'N j, Y'
-DATE_EVENT_FORMAT = 'F j'
-WEEK_DAY_FORMAT = 'F j'
-TIME_FORMAT = 'P'
-DATETIME_FORMAT = 'N j, Y, P'
-YEAR_MONTH_FORMAT = 'F Y'
-MONTH_DAY_FORMAT = 'F j'
-SHORT_DATE_FORMAT = 'm/d/Y'
-SHORT_DATETIME_FORMAT = 'm/d/Y P'
-FIRST_DAY_OF_WEEK = 0 # Sunday
-
-# The *_INPUT_FORMATS strings use the Python strftime format syntax,
-# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-# Kept ISO formats as they are in first position
-DATE_INPUT_FORMATS = [
- '%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', # '2006-10-25', '10/25/2006', '10/25/06'
- # '%b %d %Y', '%b %d, %Y', # 'Oct 25 2006', 'Oct 25, 2006'
- # '%d %b %Y', '%d %b, %Y', # '25 Oct 2006', '25 Oct, 2006'
- # '%B %d %Y', '%B %d, %Y', # 'October 25 2006', 'October 25, 2006'
- # '%d %B %Y', '%d %B, %Y', # '25 October 2006', '25 October, 2006'
-]
-DATETIME_INPUT_FORMATS = [
- '%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
- '%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200'
- '%Y-%m-%d %H:%M', # '2006-10-25 14:30'
- '%Y-%m-%d', # '2006-10-25'
- '%m/%d/%Y %H:%M:%S', # '10/25/2006 14:30:59'
- '%m/%d/%Y %H:%M:%S.%f', # '10/25/2006 14:30:59.000200'
- '%m/%d/%Y %H:%M', # '10/25/2006 14:30'
- '%m/%d/%Y', # '10/25/2006'
- '%m/%d/%y %H:%M:%S', # '10/25/06 14:30:59'
- '%m/%d/%y %H:%M:%S.%f', # '10/25/06 14:30:59.000200'
- '%m/%d/%y %H:%M', # '10/25/06 14:30'
- '%m/%d/%y', # '10/25/06'
-]
-DECIMAL_SEPARATOR = '.'
-THOUSAND_SEPARATOR = ','
-NUMBER_GROUPING = 3
diff --git a/app/organization/formats/fr/__init__.py b/app/organization/formats/fr/__init__.py
deleted file mode 100644
index 12176181..00000000
--- a/app/organization/formats/fr/__init__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
diff --git a/app/organization/formats/fr/formats.py b/app/organization/formats/fr/formats.py
deleted file mode 100644
index a21bc803..00000000
--- a/app/organization/formats/fr/formats.py
+++ /dev/null
@@ -1,59 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-# -*- encoding: utf-8 -*-
-# This file is distributed under the same license as the Django package.
-#
-from __future__ import unicode_literals
-
-# The *_FORMAT strings use the Django date format syntax,
-# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
-DATE_FORMAT = 'j F Y'
-DATE_EVENT_FORMAT = 'D j F'
-WEEK_DAY_FORMAT = 'D j'
-TIME_FORMAT = 'H\hi'
-DATETIME_FORMAT = 'j F Y H:i'
-YEAR_MONTH_FORMAT = 'F Y'
-MONTH_DAY_FORMAT = 'j F'
-SHORT_DATE_FORMAT = 'j N Y'
-SHORT_DATETIME_FORMAT = 'j N Y H:i'
-FIRST_DAY_OF_WEEK = 1 # Monday
-
-# The *_INPUT_FORMATS strings use the Python strftime format syntax,
-# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = [
- '%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/06'
- '%d.%m.%Y', '%d.%m.%y', # Swiss [fr_CH), '25.10.2006', '25.10.06'
- # '%d %B %Y', '%d %b %Y', # '25 octobre 2006', '25 oct. 2006'
-]
-DATETIME_INPUT_FORMATS = [
- '%d/%m/%Y %H:%M:%S', # '25/10/2006 14:30:59'
- '%d/%m/%Y %H:%M:%S.%f', # '25/10/2006 14:30:59.000200'
- '%d/%m/%Y %H:%M', # '25/10/2006 14:30'
- '%d/%m/%Y', # '25/10/2006'
- '%d.%m.%Y %H:%M:%S', # Swiss [fr_CH), '25.10.2006 14:30:59'
- '%d.%m.%Y %H:%M:%S.%f', # Swiss (fr_CH), '25.10.2006 14:30:59.000200'
- '%d.%m.%Y %H:%M', # Swiss (fr_CH), '25.10.2006 14:30'
- '%d.%m.%Y', # Swiss (fr_CH), '25.10.2006'
-]
-DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = '\xa0' # non-breaking space
-NUMBER_GROUPING = 3
diff --git a/app/organization/job/__init__.py b/app/organization/job/__init__.py
deleted file mode 100644
index 09d0a44a..00000000
--- a/app/organization/job/__init__.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-"""
-Provides abstract models and admin features used throughout the various
-Mezzanine apps.
-"""
-from __future__ import unicode_literals
-
-from mezzanine import __version__ # noqa
-
-
-default_app_config = 'organization.job.apps.OrganizationJobConfig'
diff --git a/app/organization/job/admin.py b/app/organization/job/admin.py
deleted file mode 100644
index ad35d700..00000000
--- a/app/organization/job/admin.py
+++ /dev/null
@@ -1,65 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.contrib import admin
-from mezzanine.utils.static import static_lazy as static
-from copy import deepcopy
-from mezzanine.core.admin import *
-from organization.job.models import *
-from organization.job.forms import *
-
-
-class JobResponseInline(TabularDynamicInlineAdmin):
-
- model = JobResponse
-
-
-class JobOfferAdminDisplayable(BaseTranslationModelAdmin):
-
- model = JobOffer
- inlines = [JobResponseInline,]
-
-
-class CandidacyImageInline(TabularDynamicInlineAdmin):
-
- model = CandidacyImage
-
-
-class CandidacyAdmin(admin.ModelAdmin):
-
- model = Candidacy
-
-
-class CandidacyAdminDisplayable(BaseTranslationModelAdmin,):
-
- list_display = ('title', 'external_content', 'content_object', )
- form = CandidacyForm
- inlines = [CandidacyImageInline,]
- exclude = ("short_url", "keywords", "description", "slug", )
- fieldsets = (
- (None, {
- 'fields': ('title', 'status', 'publish_date', 'expiry_date', 'content', 'date_from', 'date_to', 'text_button_external', 'external_content', 'text_button_internal', 'content_object',),
- }),
- )
-
-
-admin.site.register(JobOffer, JobOfferAdminDisplayable)
-admin.site.register(Candidacy, CandidacyAdminDisplayable)
diff --git a/app/organization/job/apps.py b/app/organization/job/apps.py
deleted file mode 100644
index 4f2c65e3..00000000
--- a/app/organization/job/apps.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-
-from django.apps import AppConfig
-
-class OrganizationJobConfig(AppConfig):
- name = 'organization.job'
- label = 'organization-job'
diff --git a/app/organization/job/fixtures/organization-job.json b/app/organization/job/fixtures/organization-job.json
deleted file mode 100644
index a17da885..00000000
--- a/app/organization/job/fixtures/organization-job.json
+++ /dev/null
@@ -1 +0,0 @@
-[{"model": "organization-job.joboffer", "pk": 1, "fields": {"keywords_string": "", "site": 1, "title": "Candidature Spontan\u00e9e", "title_fr": "Candidature Spontan\u00e9e", "title_en": "", "slug": "candidature-spontanee", "_meta_title": "", "description": "Nec minus feminae quoque calamitatum participes fuere similium. nam ex hoc quoque sexu peremptae sunt originis altae conplures, adulteriorum flagitiis obnoxiae vel stuprorum. inter quas notiores fuere Claritas et Flaviana, quarum altera cum duceretur ad mortem, indumento, quo vestita erat, abrepto, ne velemen quidem secreto membrorum sufficiens retinere permissa est. ideoque carnifex nefas admisisse convictus inmane, vivus exustus est.", "gen_description": true, "created": "2016-09-09T08:07:31.034Z", "updated": "2016-09-09T08:07:31.034Z", "status": 2, "publish_date": "2016-09-09T08:07:31.022Z", "expiry_date": null, "short_url": "", "in_sitemap": true, "content": "Nec minus feminae quoque calamitatum participes fuere similium. nam ex hoc quoque sexu peremptae sunt originis altae conplures, adulteriorum flagitiis obnoxiae vel stuprorum. inter quas notiores fuere Claritas et Flaviana, quarum altera cum duceretur ad mortem, indumento, quo vestita erat, abrepto, ne velemen quidem secreto membrorum sufficiens retinere permissa est. ideoque carnifex nefas admisisse convictus inmane, vivus exustus est.
", "content_fr": "Nec minus feminae quoque calamitatum participes fuere similium. nam ex hoc quoque sexu peremptae sunt originis altae conplures, adulteriorum flagitiis obnoxiae vel stuprorum. inter quas notiores fuere Claritas et Flaviana, quarum altera cum duceretur ad mortem, indumento, quo vestita erat, abrepto, ne velemen quidem secreto membrorum sufficiens retinere permissa est. ideoque carnifex nefas admisisse convictus inmane, vivus exustus est.
", "content_en": "", "email": "zawadzki@ircam.fr", "type": ""}}]
\ No newline at end of file
diff --git a/app/organization/job/forms.py b/app/organization/job/forms.py
deleted file mode 100644
index 66784aaf..00000000
--- a/app/organization/job/forms.py
+++ /dev/null
@@ -1,59 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from dal import autocomplete
-import dal_queryset_sequence
-import dal_select2_queryset_sequence
-from django import forms
-from django.forms.widgets import HiddenInput
-from django.forms import ModelForm
-from organization.job.models import *
-from organization.magazine.models import Article
-from organization.pages.models import CustomPage
-from mezzanine_agenda.models import Event
-
-
-class JobResponseForm(ModelForm):
-
- def __init__(self, *args, **kwargs):
- super(JobResponseForm, self).__init__(*args, **kwargs)
- self.fields['job_offer'].widget = forms.HiddenInput()
-
- class Meta:
- model = JobResponse
- fields = ['first_name', 'last_name', 'email', 'message', 'curriculum_vitae', 'cover_letter', 'job_offer']
-
-
-class CandidacyForm(autocomplete.FutureModelForm):
-
- content_object = dal_queryset_sequence.fields.QuerySetSequenceModelField(
- queryset=autocomplete.QuerySetSequence(
- Article.objects.all(),
- Event.objects.all(),
- CustomPage.objects.all(),
- ),
- required=False,
- widget=dal_select2_queryset_sequence.widgets.QuerySetSequenceSelect2('candidacy-autocomplete'),
- )
-
- class Meta:
- model = Candidacy
- fields = ('__all__')
diff --git a/app/organization/job/migrations/0001_initial.py b/app/organization/job/migrations/0001_initial.py
deleted file mode 100644
index c8b648b5..00000000
--- a/app/organization/job/migrations/0001_initial.py
+++ /dev/null
@@ -1,66 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-09 07:50
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- initial = True
-
- dependencies = [
- ('sites', '0002_alter_domain_unique'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='JobOffer',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('keywords_string', models.CharField(blank=True, editable=False, max_length=500)),
- ('title', models.CharField(max_length=500, verbose_name='Title')),
- ('title_fr', models.CharField(max_length=500, null=True, verbose_name='Title')),
- ('title_en', models.CharField(max_length=500, null=True, verbose_name='Title')),
- ('slug', models.CharField(blank=True, help_text='Leave blank to have the URL auto-generated from the title.', max_length=2000, null=True, verbose_name='URL')),
- ('_meta_title', models.CharField(blank=True, help_text='Optional title to be used in the HTML title tag. If left blank, the main title field will be used.', max_length=500, null=True, verbose_name='Title')),
- ('description', models.TextField(blank=True, verbose_name='Description')),
- ('gen_description', models.BooleanField(default=True, help_text='If checked, the description will be automatically generated from content. Uncheck if you want to manually set a custom description.', verbose_name='Generate description')),
- ('created', models.DateTimeField(editable=False, null=True)),
- ('updated', models.DateTimeField(editable=False, null=True)),
- ('status', models.IntegerField(choices=[(1, 'Draft'), (2, 'Published')], default=2, help_text='With Draft chosen, will only be shown for admin users on the site.', verbose_name='Status')),
- ('publish_date', models.DateTimeField(blank=True, db_index=True, help_text="With Published chosen, won't be shown until this time", null=True, verbose_name='Published from')),
- ('expiry_date', models.DateTimeField(blank=True, help_text="With Published chosen, won't be shown after this time", null=True, verbose_name='Expires on')),
- ('short_url', models.URLField(blank=True, null=True)),
- ('in_sitemap', models.BooleanField(default=True, verbose_name='Show in sitemap')),
- ('content', mezzanine.core.fields.RichTextField(verbose_name='Content')),
- ('content_fr', mezzanine.core.fields.RichTextField(null=True, verbose_name='Content')),
- ('content_en', mezzanine.core.fields.RichTextField(null=True, verbose_name='Content')),
- ('email', models.EmailField(max_length=255, verbose_name='Email to forward response')),
- ('type', models.CharField(blank=True, choices=[('internship', 'internship'), ('job', 'job')], max_length=32, verbose_name='Job offer type')),
- ('site', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to='sites.Site')),
- ],
- options={
- 'verbose_name': 'job offer',
- 'verbose_name_plural': 'job offers',
- },
- ),
- migrations.CreateModel(
- name='JobResponse',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('first_name', models.CharField(max_length=255, verbose_name='first name')),
- ('last_name', models.CharField(max_length=255, verbose_name='last name')),
- ('email', models.EmailField(max_length=255, verbose_name='email')),
- ('curriculum_vitae', models.FileField(max_length=1024, upload_to='job_responses/%Y/%m/%d/', verbose_name='curriculum vitae')),
- ('cover_letter', models.FileField(max_length=1024, upload_to='job_responses/%Y/%m/%d/', verbose_name='cover letter')),
- ('job_offer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='job_response', to='organization-job.JobOffer', verbose_name='job offer')),
- ],
- options={
- 'verbose_name': 'job_reponse',
- 'verbose_name_plural': 'job_reponses',
- },
- ),
- ]
diff --git a/app/organization/job/migrations/0002_jobresponse_message.py b/app/organization/job/migrations/0002_jobresponse_message.py
deleted file mode 100644
index 8b910e2b..00000000
--- a/app/organization/job/migrations/0002_jobresponse_message.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-28 16:58
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-job', '0001_initial'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='jobresponse',
- name='message',
- field=models.TextField(default='', max_length=800, verbose_name='message'),
- preserve_default=False,
- ),
- ]
diff --git a/app/organization/job/migrations/0003_auto_20160929_1833.py b/app/organization/job/migrations/0003_auto_20160929_1833.py
deleted file mode 100644
index eff562a6..00000000
--- a/app/organization/job/migrations/0003_auto_20160929_1833.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-09-29 16:33
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-job', '0002_jobresponse_message'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='joboffer',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='Description'),
- ),
- migrations.AddField(
- model_name='joboffer',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='Description'),
- ),
- ]
diff --git a/app/organization/job/migrations/0004_candidacy.py b/app/organization/job/migrations/0004_candidacy.py
deleted file mode 100644
index c808c5f2..00000000
--- a/app/organization/job/migrations/0004_candidacy.py
+++ /dev/null
@@ -1,47 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-30 10:50
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('contenttypes', '0002_remove_content_type_name'),
- ('sites', '0002_alter_domain_unique'),
- ('organization-job', '0003_auto_20160929_1833'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='Candidacy',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('keywords_string', models.CharField(blank=True, editable=False, max_length=500)),
- ('title', models.CharField(max_length=500, verbose_name='Title')),
- ('slug', models.CharField(blank=True, help_text='Leave blank to have the URL auto-generated from the title.', max_length=2000, null=True, verbose_name='URL')),
- ('_meta_title', models.CharField(blank=True, help_text='Optional title to be used in the HTML title tag. If left blank, the main title field will be used.', max_length=500, null=True, verbose_name='Title')),
- ('description', models.TextField(blank=True, verbose_name='Description')),
- ('gen_description', models.BooleanField(default=True, help_text='If checked, the description will be automatically generated from content. Uncheck if you want to manually set a custom description.', verbose_name='Generate description')),
- ('created', models.DateTimeField(editable=False, null=True)),
- ('updated', models.DateTimeField(editable=False, null=True)),
- ('status', models.IntegerField(choices=[(1, 'Draft'), (2, 'Published')], default=2, help_text='With Draft chosen, will only be shown for admin users on the site.', verbose_name='Status')),
- ('publish_date', models.DateTimeField(blank=True, db_index=True, help_text="With Published chosen, won't be shown until this time", null=True, verbose_name='Published from')),
- ('expiry_date', models.DateTimeField(blank=True, help_text="With Published chosen, won't be shown after this time", null=True, verbose_name='Expires on')),
- ('short_url', models.URLField(blank=True, null=True)),
- ('in_sitemap', models.BooleanField(default=True, verbose_name='Show in sitemap')),
- ('content', mezzanine.core.fields.RichTextField(verbose_name='Content')),
- ('text_button', models.CharField(blank=True, max_length=150, verbose_name='text button')),
- ('external_content', models.URLField(blank=True, max_length=1000, verbose_name='external content')),
- ('object_id', models.PositiveIntegerField(editable=False, null=True, verbose_name='related object')),
- ('content_type', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType', verbose_name='local content')),
- ('site', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to='sites.Site')),
- ],
- options={
- 'verbose_name': 'candidacy',
- },
- ),
- ]
diff --git a/app/organization/job/migrations/0005_auto_20160930_1254.py b/app/organization/job/migrations/0005_auto_20160930_1254.py
deleted file mode 100644
index 2faa6b76..00000000
--- a/app/organization/job/migrations/0005_auto_20160930_1254.py
+++ /dev/null
@@ -1,50 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-30 10:54
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-job', '0004_candidacy'),
- ]
-
- operations = [
- migrations.AlterModelOptions(
- name='candidacy',
- options={'verbose_name': 'candidacy', 'verbose_name_plural': 'candidacies'},
- ),
- migrations.AddField(
- model_name='candidacy',
- name='content_en',
- field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Content'),
- ),
- migrations.AddField(
- model_name='candidacy',
- name='content_fr',
- field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Content'),
- ),
- migrations.AddField(
- model_name='candidacy',
- name='text_button_en',
- field=models.CharField(blank=True, max_length=150, null=True, verbose_name='text button'),
- ),
- migrations.AddField(
- model_name='candidacy',
- name='text_button_fr',
- field=models.CharField(blank=True, max_length=150, null=True, verbose_name='text button'),
- ),
- migrations.AddField(
- model_name='candidacy',
- name='title_en',
- field=models.CharField(max_length=500, null=True, verbose_name='Title'),
- ),
- migrations.AddField(
- model_name='candidacy',
- name='title_fr',
- field=models.CharField(max_length=500, null=True, verbose_name='Title'),
- ),
- ]
diff --git a/app/organization/job/migrations/0006_candidacyimage.py b/app/organization/job/migrations/0006_candidacyimage.py
deleted file mode 100644
index b7ede0ff..00000000
--- a/app/organization/job/migrations/0006_candidacyimage.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-30 12:21
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-job', '0005_auto_20160930_1254'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='CandidacyImage',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('file', mezzanine.core.fields.FileField(max_length=1024, verbose_name='Image')),
- ('credits', models.CharField(blank=True, max_length=256, null=True, verbose_name='credits')),
- ('type', models.CharField(choices=[('logo', 'logo'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type')),
- ('candidacy', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='images', to='organization-job.Candidacy', verbose_name='candidacy')),
- ],
- options={
- 'ordering': ('_order',),
- },
- ),
- ]
diff --git a/app/organization/job/migrations/0007_auto_20160930_1758.py b/app/organization/job/migrations/0007_auto_20160930_1758.py
deleted file mode 100644
index 25daf8f9..00000000
--- a/app/organization/job/migrations/0007_auto_20160930_1758.py
+++ /dev/null
@@ -1,67 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-30 15:58
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-job', '0006_candidacyimage'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='candidacy',
- name='text_button',
- ),
- migrations.RemoveField(
- model_name='candidacy',
- name='text_button_en',
- ),
- migrations.RemoveField(
- model_name='candidacy',
- name='text_button_fr',
- ),
- migrations.AddField(
- model_name='candidacy',
- name='date_from',
- field=models.DateField(blank=True, null=True, verbose_name='begin date'),
- ),
- migrations.AddField(
- model_name='candidacy',
- name='date_to',
- field=models.DateField(blank=True, null=True, verbose_name='end date'),
- ),
- migrations.AddField(
- model_name='candidacy',
- name='text_button_external',
- field=models.CharField(blank=True, max_length=150, verbose_name='external text button'),
- ),
- migrations.AddField(
- model_name='candidacy',
- name='text_button_external_en',
- field=models.CharField(blank=True, max_length=150, null=True, verbose_name='external text button'),
- ),
- migrations.AddField(
- model_name='candidacy',
- name='text_button_external_fr',
- field=models.CharField(blank=True, max_length=150, null=True, verbose_name='external text button'),
- ),
- migrations.AddField(
- model_name='candidacy',
- name='text_button_internal',
- field=models.CharField(blank=True, max_length=150, verbose_name='internal text button'),
- ),
- migrations.AddField(
- model_name='candidacy',
- name='text_button_internal_en',
- field=models.CharField(blank=True, max_length=150, null=True, verbose_name='internal text button'),
- ),
- migrations.AddField(
- model_name='candidacy',
- name='text_button_internal_fr',
- field=models.CharField(blank=True, max_length=150, null=True, verbose_name='internal text button'),
- ),
- ]
diff --git a/app/organization/job/migrations/0008_auto_20160930_1849.py b/app/organization/job/migrations/0008_auto_20160930_1849.py
deleted file mode 100644
index 6c3b8b43..00000000
--- a/app/organization/job/migrations/0008_auto_20160930_1849.py
+++ /dev/null
@@ -1,62 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-30 16:49
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-job', '0007_auto_20160930_1758'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='candidacy',
- name='date_from',
- ),
- migrations.RemoveField(
- model_name='candidacy',
- name='date_to',
- ),
- migrations.RemoveField(
- model_name='candidacy',
- name='text_button_external',
- ),
- migrations.RemoveField(
- model_name='candidacy',
- name='text_button_external_en',
- ),
- migrations.RemoveField(
- model_name='candidacy',
- name='text_button_external_fr',
- ),
- migrations.RemoveField(
- model_name='candidacy',
- name='text_button_internal',
- ),
- migrations.RemoveField(
- model_name='candidacy',
- name='text_button_internal_en',
- ),
- migrations.RemoveField(
- model_name='candidacy',
- name='text_button_internal_fr',
- ),
- migrations.AddField(
- model_name='candidacy',
- name='text_button',
- field=models.CharField(blank=True, max_length=150, verbose_name='text button'),
- ),
- migrations.AddField(
- model_name='candidacy',
- name='text_button_en',
- field=models.CharField(blank=True, max_length=150, null=True, verbose_name='text button'),
- ),
- migrations.AddField(
- model_name='candidacy',
- name='text_button_fr',
- field=models.CharField(blank=True, max_length=150, null=True, verbose_name='text button'),
- ),
- ]
diff --git a/app/organization/job/migrations/0009_auto_20160930_1940.py b/app/organization/job/migrations/0009_auto_20160930_1940.py
deleted file mode 100644
index ef63794b..00000000
--- a/app/organization/job/migrations/0009_auto_20160930_1940.py
+++ /dev/null
@@ -1,67 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-30 17:40
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-job', '0008_auto_20160930_1849'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='candidacy',
- name='text_button',
- ),
- migrations.RemoveField(
- model_name='candidacy',
- name='text_button_en',
- ),
- migrations.RemoveField(
- model_name='candidacy',
- name='text_button_fr',
- ),
- migrations.AddField(
- model_name='candidacy',
- name='date_from',
- field=models.DateField(blank=True, null=True, verbose_name='begin date'),
- ),
- migrations.AddField(
- model_name='candidacy',
- name='date_to',
- field=models.DateField(blank=True, null=True, verbose_name='end date'),
- ),
- migrations.AddField(
- model_name='candidacy',
- name='text_button_external',
- field=models.CharField(blank=True, max_length=150, verbose_name='external text button'),
- ),
- migrations.AddField(
- model_name='candidacy',
- name='text_button_external_en',
- field=models.CharField(blank=True, max_length=150, null=True, verbose_name='external text button'),
- ),
- migrations.AddField(
- model_name='candidacy',
- name='text_button_external_fr',
- field=models.CharField(blank=True, max_length=150, null=True, verbose_name='external text button'),
- ),
- migrations.AddField(
- model_name='candidacy',
- name='text_button_internal',
- field=models.CharField(blank=True, max_length=150, verbose_name='internal text button'),
- ),
- migrations.AddField(
- model_name='candidacy',
- name='text_button_internal_en',
- field=models.CharField(blank=True, max_length=150, null=True, verbose_name='internal text button'),
- ),
- migrations.AddField(
- model_name='candidacy',
- name='text_button_internal_fr',
- field=models.CharField(blank=True, max_length=150, null=True, verbose_name='internal text button'),
- ),
- ]
diff --git a/app/organization/job/migrations/0010_auto_20161205_1536.py b/app/organization/job/migrations/0010_auto_20161205_1536.py
deleted file mode 100644
index 99426609..00000000
--- a/app/organization/job/migrations/0010_auto_20161205_1536.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2016-12-05 14:36
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-job', '0009_auto_20160930_1940'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='candidacyimage',
- name='type',
- field=models.CharField(choices=[('logo', 'logo'), ('logo_white', 'logo white'), ('logo_black', 'logo black'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type'),
- ),
- ]
diff --git a/app/organization/job/migrations/0011_auto_20170105_1743.py b/app/organization/job/migrations/0011_auto_20170105_1743.py
deleted file mode 100644
index 79460ccc..00000000
--- a/app/organization/job/migrations/0011_auto_20170105_1743.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-05 16:43
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-job', '0010_auto_20161205_1536'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='candidacyimage',
- name='type',
- field=models.CharField(choices=[('logo', 'logo'), ('logo_white', 'logo white'), ('logo_black', 'logo black'), ('logo_header', 'logo header'), ('logo_footer', 'logo footer'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type'),
- ),
- ]
diff --git a/app/organization/job/migrations/0012_auto_20170323_1039.py b/app/organization/job/migrations/0012_auto_20170323_1039.py
deleted file mode 100644
index 4a9004dd..00000000
--- a/app/organization/job/migrations/0012_auto_20170323_1039.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-03-23 09:39
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-job', '0011_auto_20170105_1743'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='candidacy',
- name='date_from',
- field=models.DateField(blank=True, null=True, verbose_name='start date'),
- ),
- ]
diff --git a/app/organization/job/migrations/__init__.py b/app/organization/job/migrations/__init__.py
deleted file mode 100644
index e69de29b..00000000
diff --git a/app/organization/job/models.py b/app/organization/job/models.py
deleted file mode 100644
index 47bf6ab5..00000000
--- a/app/organization/job/models.py
+++ /dev/null
@@ -1,93 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.db import models
-from django.utils.translation import ugettext_lazy as _
-from django.core.urlresolvers import reverse, reverse_lazy
-from mezzanine.core.models import Displayable
-from organization.core.models import *
-from organization.media.models import *
-
-
-class JobResponse(models.Model):
-
- first_name = models.CharField(max_length=255, null=False, verbose_name=_('first name'))
- last_name = models.CharField(max_length=255, null=False, verbose_name=_('last name'))
- email = models.EmailField(max_length=255, null=False, verbose_name=_('email'))
- message = models.TextField(max_length=800, verbose_name=_('message'))
- #@TODO validate type format
- curriculum_vitae = models.FileField(_("curriculum vitae"), max_length=1024, upload_to="job_responses/%Y/%m/%d/")
- cover_letter = models.FileField(_("cover letter"), max_length=1024, upload_to="job_responses/%Y/%m/%d/")
- job_offer = models.ForeignKey("JobOffer", verbose_name=_('job offer'), related_name='job_response', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _('job_reponse')
- verbose_name_plural = _("job_reponses")
-
-
-class JobOffer(Displayable, RichText):
-
- email = models.EmailField(max_length=255, null=False, verbose_name=_('Email to forward response'))
- type = models.CharField(blank=True, choices=[('internship', 'internship'), ('job', 'job')], max_length=32, verbose_name='Job offer type')
-
- def get_absolute_url(self):
- return reverse("organization-job-offer-detail", kwargs={"slug": self.slug})
-
- class Meta:
- verbose_name = _('job offer')
- verbose_name_plural = _("job offers")
-
-
-class Candidacy(Displayable, RichText, Period):
-
- text_button_external = models.CharField(blank=True, max_length=150, null=False, verbose_name=_('external text button'))
- text_button_internal = models.CharField(blank=True, max_length=150, null=False, verbose_name=_('internal text button'))
- external_content = models.URLField(blank=True, max_length=1000, null=False, verbose_name=_('external content'))
-
- # used for autocomplete but hidden in admin
- content_type = models.ForeignKey(
- ContentType,
- verbose_name=_('local content'),
- null=True,
- blank=True,
- editable=False,
- )
-
- # used for autocomplete but hidden in admin
- object_id = models.PositiveIntegerField(
- verbose_name=_('related object'),
- null=True,
- editable=False,
- )
-
- content_object = GenericForeignKey('content_type', 'object_id')
-
- def get_absolute_url(self):
- return self.external_content
-
- class Meta:
- verbose_name = _('candidacy')
- verbose_name_plural = _("candidacies")
-
-
-class CandidacyImage(Image):
-
- candidacy = models.ForeignKey(Candidacy, verbose_name=_('candidacy'), related_name='images', blank=True, null=True, on_delete=models.SET_NULL)
diff --git a/app/organization/job/tests.py b/app/organization/job/tests.py
deleted file mode 100644
index fa8859d7..00000000
--- a/app/organization/job/tests.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.test import TestCase
-
-# Create your tests here.
diff --git a/app/organization/job/translation.py b/app/organization/job/translation.py
deleted file mode 100644
index 8ecdabd1..00000000
--- a/app/organization/job/translation.py
+++ /dev/null
@@ -1,48 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from modeltranslation.translator import translator, register, TranslationOptions
-from mezzanine.pages.models import Page, RichText
-from mezzanine.pages.translation import TranslatedRichText
-from organization.job.models import *
-
-
-@register(JobOffer)
-class JobOfferTranslationOptions(TranslationOptions):
-
- fields = ('title', 'description', 'content')
-
-
-@register(JobResponse)
-class JobResponseTranslationOptions(TranslationOptions):
-
- pass
-
-@register(Candidacy)
-class JobResponseTranslationOptions(TranslationOptions):
-
- fields = ('title', 'content', 'text_button_internal', 'text_button_external', )
-
-
-@register(CandidacyImage)
-class JobResponseTranslationOptions(TranslationOptions):
-
- pass
diff --git a/app/organization/job/urls.py b/app/organization/job/urls.py
deleted file mode 100644
index 252f73ff..00000000
--- a/app/organization/job/urls.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-
-from django.conf.urls import patterns, include, url
-from django.conf.urls.i18n import i18n_patterns
-from django.contrib import admin
-
-from mezzanine.core.views import direct_to_template
-from mezzanine.conf import settings
-from organization.job.views import *
-
-
-_slash = "/" if settings.APPEND_SLASH else ""
-
-urlpatterns = [
- url("^job-offer/(?P.*)%s$" % _slash, JobOfferDetailView.as_view(), name='organization-job-offer-detail'),
- url("^job-offer/$", JobOfferListView.as_view(), name='organization-job-offer-list'),
- url("^candidacies/$", CandidacyListView.as_view(), name='candidacies-list'),
- url("^candidacy-autocomplete/$", CandidacyAutocomplete.as_view(), name='candidacy-autocomplete'),
-]
diff --git a/app/organization/job/views.py b/app/organization/job/views.py
deleted file mode 100644
index dbbc29b5..00000000
--- a/app/organization/job/views.py
+++ /dev/null
@@ -1,156 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-import os
-import mimetypes
-import humanize
-from dal import autocomplete
-from dal_select2_queryset_sequence.views import Select2QuerySetSequenceView
-from django import forms
-from django.shortcuts import redirect
-from django.shortcuts import render
-from django.views.generic import DetailView, ListView, TemplateView
-from django.views.generic.edit import CreateView
-from django.contrib import messages
-from django.core.urlresolvers import reverse, reverse_lazy
-from django.template import Context
-from django.template.loader import render_to_string, get_template
-from django.core.mail import EmailMessage
-from django.utils.translation import ugettext_lazy as _
-from django.http import HttpResponse
-from django.shortcuts import get_object_or_404
-from mezzanine.conf import settings
-from organization.pages.models import CustomPage
-from organization.magazine.models import Article
-from organization.job.models import *
-from organization.job.forms import JobResponseForm
-
-mime_types = ['pdf', 'msword', 'vnd.oasis.opendocument.text', 'vnd.openxmlformats-officedocument.wordprocessingml.document']
-
-class JobOfferDetailView(CreateView):
-
- model = JobResponse
- template_name='job/job_offer_detail.html'
- context_object_name = 'job_offer'
- form_class = JobResponseForm
-
- def get_context_data(self, **kwargs):
- context = super(JobOfferDetailView, self).get_context_data(**kwargs)
- context['job_offer'] = self.job_offer
- return context
-
- def get_initial(self):
- initial = super(JobOfferDetailView, self).get_initial()
- self.job_offer = get_object_or_404(JobOffer, slug=self.kwargs['slug'])
- initial['job_offer'] = self.job_offer
- return initial
-
- def get_success_url(self):
- return reverse_lazy('organization-job-offer-detail', kwargs={'slug':self.kwargs['slug']})
-
- def form_valid(self, form):
- # check mimetype uploaded files
- mime_type_cv = form.cleaned_data['curriculum_vitae'].content_type.split('/')[1]
- mime_type_cl = form.cleaned_data['cover_letter'].content_type.split('/')[1]
- if mime_type_cv not in mime_types or mime_type_cl not in mime_types :
- messages.info(self.request, _("Only .pdf, .odt, .doc, .docx files allowed."))
- return super(JobOfferDetailView, self).form_invalid(form)
- # check max upload file for anonymous user
- if form.cleaned_data['curriculum_vitae'].size > settings.MAX_UPLOAD_SIZE_FRONT or form.cleaned_data['cover_letter'].size > settings.MAX_UPLOAD_SIZE_FRONT :
- messages.info(self.request, _("Uploaded files cannot exceed "+humanize.naturalsize(settings.MAX_UPLOAD_SIZE_FRONT)+"."))
- return super(JobOfferDetailView, self).form_invalid(form)
- email_application_notification(self.request, self.job_offer, form.cleaned_data)
- messages.info(self.request, _("You have successfully submitted your application."))
- return super(JobOfferDetailView, self).form_valid(form)
-
-
-class JobOfferListView(ListView):
-
- model = JobOffer
- template_name='job/job_offer_list.html'
- context_object_name = 'job_offer'
-
- def get_queryset(self, **kwargs):
- return self.model.objects.published()
-
- def get_context_data(self, **kwargs):
- context = super(JobOfferListView, self).get_context_data(**kwargs)
- return context
-
-def email_application_notification(request, job_offer, data):
- subject = "Candidature > " + job_offer.title
- to = [job_offer.email if job_offer.email else settings.DEFAULT_TO_EMAIL]
- from_email = settings.DEFAULT_FROM_EMAIL
-
- ctx = {
- 'first_name': data['first_name'],
- 'last_name': data['last_name'],
- 'email': data['email'],
- 'message': data['message']
- }
-
- message = get_template('email/application_notification.html').render(Context(ctx))
- msg = EmailMessage(subject, message, to=to, from_email=from_email)
- msg.attach(data['curriculum_vitae'].name, data['curriculum_vitae'].read(), data['curriculum_vitae'].content_type)
- msg.attach(data['cover_letter'].name, data['cover_letter'].read(), data['cover_letter'].content_type)
- msg.content_subtype = 'html'
- msg.send()
-
- return HttpResponse('email_application_notification')
-
-
-class CandidacyListView(ListView):
-
- model = Candidacy
- template_name='job/candidacy_list.html'
- context_object_name = 'candidacy'
-
- def get_queryset(self, **kwargs):
- return self.model.objects.published()
-
- def get_context_data(self, **kwargs):
- context = super(CandidacyListView, self).get_context_data(**kwargs)
- return context
-
-
-class CandidacyAutocomplete(Select2QuerySetSequenceView):
- def get_queryset(self):
-
- articles = Article.objects.all()
- custompage = CustomPage.objects.all()
- events = Event.objects.all()
-
- if self.q:
- articles = articles.filter(title__icontains=self.q)
- custompage = custompage.filter(title__icontains=self.q)
- events = events.filter(title__icontains=self.q)
-
- qs = autocomplete.QuerySetSequence(articles, custompage, events )
-
- if self.q:
- # This would apply the filter on all the querysets
- qs = qs.filter(title__icontains=self.q)
-
- # This will limit each queryset so that they show an equal number
- # of results.
- qs = self.mixup_querysets(qs)
-
- return qs
diff --git a/app/organization/magazine/__init__.py b/app/organization/magazine/__init__.py
deleted file mode 100644
index 128b91f3..00000000
--- a/app/organization/magazine/__init__.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-"""
-Provides abstract models and admin features used throughout the various
-Mezzanine apps.
-"""
-from __future__ import unicode_literals
-
-from mezzanine import __version__ # noqa
-
-
-default_app_config = 'organization.magazine.apps.MagazineConfig'
diff --git a/app/organization/magazine/admin.py b/app/organization/magazine/admin.py
deleted file mode 100644
index bbe94cd1..00000000
--- a/app/organization/magazine/admin.py
+++ /dev/null
@@ -1,97 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.contrib import admin
-from django import forms
-from copy import deepcopy
-from modeltranslation.admin import TranslationTabularInline
-from mezzanine.core.admin import *
-from mezzanine.pages.admin import PageAdmin
-from organization.magazine.models import *
-from organization.magazine.forms import *
-
-
-class ArticleImageInline(TabularDynamicInlineAdmin):
-
- model = ArticleImage
-
-
-class ArticlePlaylistInline(TabularDynamicInlineAdmin):
-
- model = ArticlePlaylist
-
-
-class ArticleAdmin(admin.ModelAdmin):
-
- model = Article
-
-
-class ArticlePersonAutocompleteInlineAdmin(TabularDynamicInlineAdmin):
-
- model = ArticlePersonListBlockInline
- # form = ArticlePersonListForm
- exclude = ("title", "description")
-
-
-class DynamicContentArticleInline(TabularDynamicInlineAdmin):
-
- model = DynamicContentArticle
- form = DynamicContentArticleForm
-
- class Media:
- js = (
- static("mezzanine/js/admin/dynamic_inline.js"),
- )
-
-
-class ArticleRelatedTitleAdmin(TranslationTabularInline):
-
- model = ArticleRelatedTitle
-
-
-class ArticleAdminDisplayable(DisplayableAdmin):
-
- fieldsets = deepcopy(ArticleAdmin.fieldsets)
- exclude = ('related_posts',)
- filter_horizontal = ['categories',]
- inlines = [ArticleImageInline,
- ArticlePersonAutocompleteInlineAdmin,
- ArticleRelatedTitleAdmin,
- DynamicContentArticleInline,
- ArticlePlaylistInline]
-
-
-class BriefAdmin(admin.ModelAdmin): #OrderableTabularInline
-
- model = Brief
-
-
-class BriefAdminDisplayable(BaseTranslationModelAdmin,): #, OrderableAdmin
-
- list_display = ('title', 'external_content', 'content_object', )
- form = BriefForm
- fieldsets = deepcopy(BriefAdmin.fieldsets)
- exclude = ("short_url", "keywords", "description", "slug", )
-
-
-admin.site.register(Article, ArticleAdminDisplayable)
-admin.site.register(Brief, BriefAdminDisplayable)
-admin.site.register(Topic, PageAdmin)
diff --git a/app/organization/magazine/apps.py b/app/organization/magazine/apps.py
deleted file mode 100644
index eda0f1c9..00000000
--- a/app/organization/magazine/apps.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-
-from django.apps import AppConfig
-
-
-class MagazineConfig(AppConfig):
-
- name = 'organization.magazine'
- label = 'organization-magazine'
diff --git a/app/organization/magazine/forms.py b/app/organization/magazine/forms.py
deleted file mode 100644
index c5144cfc..00000000
--- a/app/organization/magazine/forms.py
+++ /dev/null
@@ -1,75 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from dal import autocomplete
-import dal_queryset_sequence
-import dal_select2_queryset_sequence
-from django import forms
-from organization.magazine.models import *
-from organization.pages.models import CustomPage
-from organization.network.models import PersonListBlock, Person
-from mezzanine_agenda.models import Event
-
-class BriefForm(autocomplete.FutureModelForm):
-
- content_object = dal_queryset_sequence.fields.QuerySetSequenceModelField(
- queryset=autocomplete.QuerySetSequence(
- Article.objects.all(),
- Event.objects.all(),
- CustomPage.objects.all(),
- ),
- required=False,
- widget=dal_select2_queryset_sequence.widgets.QuerySetSequenceSelect2('object-autocomplete'),
- )
-
- class Meta:
- model = Brief
- fields = ('__all__')
-
-
-class ArticlePersonListForm(forms.ModelForm):
-
- person_list_block = forms.ModelChoiceField(
- queryset=PersonListBlock.objects.all(),
- widget=autocomplete.ModelSelect2(url='person-list-block-autocomplete')
- )
-
- class Meta:
- model = ArticlePersonListBlockInline
- fields = ('person_list_block',)
-
-
-class DynamicContentArticleForm(autocomplete.FutureModelForm):
-
- content_object = dal_queryset_sequence.fields.QuerySetSequenceModelField(
- queryset=autocomplete.QuerySetSequence(
- Article.objects.all(),
- Event.objects.all(),
- CustomPage.objects.all(),
- Person.objects.published()
- ),
- required=False,
- widget=dal_select2_queryset_sequence.widgets.QuerySetSequenceSelect2('dynamic-content-article'),
- )
-
- class Meta:
- model = DynamicContentArticle
- fields = ('content_object',)
diff --git a/app/organization/magazine/migrations/0001_initial.py b/app/organization/magazine/migrations/0001_initial.py
deleted file mode 100644
index 3cb96013..00000000
--- a/app/organization/magazine/migrations/0001_initial.py
+++ /dev/null
@@ -1,97 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-01 15:37
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- initial = True
-
- dependencies = [
- ('blog', '0001_initial'),
- ('contenttypes', '0002_remove_content_type_name'),
- ('sites', '0002_alter_domain_unique'),
- ('pages', '0004_auto_20160804_1547'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='Article',
- fields=[
- ('blogpost_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='blog.BlogPost')),
- ('sub_title', models.TextField(blank=True, max_length=1024, verbose_name='sub title')),
- ('sub_title_fr', models.TextField(blank=True, max_length=1024, null=True, verbose_name='sub title')),
- ('sub_title_en', models.TextField(blank=True, max_length=1024, null=True, verbose_name='sub title')),
- ],
- options={
- 'verbose_name': 'article',
- },
- bases=('blog.blogpost', models.Model),
- ),
- migrations.CreateModel(
- name='ArticleImage',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('description_fr', models.TextField(blank=True, null=True, verbose_name='description')),
- ('description_en', models.TextField(blank=True, null=True, verbose_name='description')),
- ('file', mezzanine.core.fields.FileField(max_length=1024, verbose_name='Image')),
- ('credits', models.CharField(blank=True, max_length=256, null=True, verbose_name='credits')),
- ('type', models.CharField(choices=[('logo', 'logo'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page slider')], max_length=64, verbose_name='type')),
- ('article', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='images', to='organization-magazine.Article', verbose_name='article')),
- ],
- options={
- 'verbose_name_plural': 'images',
- 'verbose_name': 'image',
- 'ordering': ('_order',),
- },
- ),
- migrations.CreateModel(
- name='Brief',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('keywords_string', models.CharField(blank=True, editable=False, max_length=500)),
- ('title', models.CharField(max_length=500, verbose_name='Title')),
- ('slug', models.CharField(blank=True, help_text='Leave blank to have the URL auto-generated from the title.', max_length=2000, null=True, verbose_name='URL')),
- ('_meta_title', models.CharField(blank=True, help_text='Optional title to be used in the HTML title tag. If left blank, the main title field will be used.', max_length=500, null=True, verbose_name='Title')),
- ('description', models.TextField(blank=True, verbose_name='Description')),
- ('gen_description', models.BooleanField(default=True, help_text='If checked, the description will be automatically generated from content. Uncheck if you want to manually set a custom description.', verbose_name='Generate description')),
- ('created', models.DateTimeField(editable=False, null=True)),
- ('updated', models.DateTimeField(editable=False, null=True)),
- ('status', models.IntegerField(choices=[(1, 'Draft'), (2, 'Published')], default=2, help_text='With Draft chosen, will only be shown for admin users on the site.', verbose_name='Status')),
- ('publish_date', models.DateTimeField(blank=True, db_index=True, help_text="With Published chosen, won't be shown until this time", null=True, verbose_name='Published from')),
- ('expiry_date', models.DateTimeField(blank=True, help_text="With Published chosen, won't be shown after this time", null=True, verbose_name='Expires on')),
- ('short_url', models.URLField(blank=True, null=True)),
- ('in_sitemap', models.BooleanField(default=True, verbose_name='Show in sitemap')),
- ('content', mezzanine.core.fields.RichTextField(verbose_name='Content')),
- ('text_button', models.CharField(blank=True, max_length=150, verbose_name='text button')),
- ('text_button_fr', models.CharField(blank=True, max_length=150, null=True, verbose_name='text button')),
- ('text_button_en', models.CharField(blank=True, max_length=150, null=True, verbose_name='text button')),
- ('external_content', models.URLField(blank=True, max_length=1000, verbose_name='external content')),
- ('object_id', models.PositiveIntegerField(editable=False, null=True, verbose_name='related object')),
- ('content_type', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType', verbose_name='local content')),
- ('site', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to='sites.Site')),
- ],
- options={
- 'verbose_name': 'brief',
- },
- ),
- migrations.CreateModel(
- name='Topic',
- fields=[
- ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='pages.Page')),
- ('content', mezzanine.core.fields.RichTextField(verbose_name='Content')),
- ],
- options={
- 'verbose_name': 'topic',
- 'ordering': ('_order',),
- },
- bases=('pages.page', models.Model),
- ),
- ]
diff --git a/app/organization/magazine/migrations/0002_auto_20160901_1737.py b/app/organization/magazine/migrations/0002_auto_20160901_1737.py
deleted file mode 100644
index e60eb5ba..00000000
--- a/app/organization/magazine/migrations/0002_auto_20160901_1737.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-01 15:37
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- initial = True
-
- dependencies = [
- ('organization-network', '0001_initial'),
- ('organization-magazine', '0001_initial'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='article',
- name='department',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='articles', to='organization-network.Department', verbose_name='department'),
- ),
- migrations.AddField(
- model_name='article',
- name='related_articles',
- field=models.ManyToManyField(blank=True, related_name='_article_related_articles_+', to='organization-magazine.Article', verbose_name='Related articles'),
- ),
- migrations.AddField(
- model_name='article',
- name='topics',
- field=models.ManyToManyField(blank=True, related_name='articles', to='organization-magazine.Topic', verbose_name='topics'),
- ),
- ]
diff --git a/app/organization/magazine/migrations/0003_articlepersonlistblockinline.py b/app/organization/magazine/migrations/0003_articlepersonlistblockinline.py
deleted file mode 100644
index 77325331..00000000
--- a/app/organization/magazine/migrations/0003_articlepersonlistblockinline.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-23 15:38
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0023_auto_20160921_2043'),
- ('organization-magazine', '0002_auto_20160901_1737'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ArticlePersonListBlockInline',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('article', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='article_person_list_block_inlines', to='organization-magazine.Article', verbose_name='Article')),
- ('person_list_block', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='article_person_list_block_inlines', to='organization-network.PersonListBlock', verbose_name='Person List Block')),
- ],
- options={
- 'verbose_name': 'Person List',
- },
- ),
- ]
diff --git a/app/organization/magazine/migrations/0004_dynamiccontentarticle.py b/app/organization/magazine/migrations/0004_dynamiccontentarticle.py
deleted file mode 100644
index c4a42152..00000000
--- a/app/organization/magazine/migrations/0004_dynamiccontentarticle.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-23 16:03
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('contenttypes', '0002_remove_content_type_name'),
- ('organization-magazine', '0003_articlepersonlistblockinline'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='DynamicContentArticle',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('object_id', models.PositiveIntegerField(editable=False, null=True, verbose_name='related object')),
- ('article', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization-magazine.Article', verbose_name='article')),
- ('content_type', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType', verbose_name='content type')),
- ],
- options={
- 'verbose_name': 'Dynamic Content Article',
- 'ordering': ('_order',),
- },
- ),
- ]
diff --git a/app/organization/magazine/migrations/0005_auto_20160923_1821.py b/app/organization/magazine/migrations/0005_auto_20160923_1821.py
deleted file mode 100644
index 55f18118..00000000
--- a/app/organization/magazine/migrations/0005_auto_20160923_1821.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-23 16:21
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-magazine', '0004_dynamiccontentarticle'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='dynamiccontentarticle',
- name='article',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='dynamic_content_articles', to='organization-magazine.Article', verbose_name='article'),
- ),
- ]
diff --git a/app/organization/magazine/migrations/0006_auto_20160924_1058.py b/app/organization/magazine/migrations/0006_auto_20160924_1058.py
deleted file mode 100644
index 896b10f7..00000000
--- a/app/organization/magazine/migrations/0006_auto_20160924_1058.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-24 08:58
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-magazine', '0005_auto_20160923_1821'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='brief',
- name='title_en',
- field=models.CharField(max_length=500, null=True, verbose_name='Title'),
- ),
- migrations.AddField(
- model_name='brief',
- name='title_fr',
- field=models.CharField(max_length=500, null=True, verbose_name='Title'),
- ),
- ]
diff --git a/app/organization/magazine/migrations/0007_auto_20160924_1058.py b/app/organization/magazine/migrations/0007_auto_20160924_1058.py
deleted file mode 100644
index 00d79cbc..00000000
--- a/app/organization/magazine/migrations/0007_auto_20160924_1058.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-24 08:58
-from __future__ import unicode_literals
-
-from django.db import migrations
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-magazine', '0006_auto_20160924_1058'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='brief',
- name='content_en',
- field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Content'),
- ),
- migrations.AddField(
- model_name='brief',
- name='content_fr',
- field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Content'),
- ),
- ]
diff --git a/app/organization/magazine/migrations/0008_remove_article_related_articles.py b/app/organization/magazine/migrations/0008_remove_article_related_articles.py
deleted file mode 100644
index a5e8add2..00000000
--- a/app/organization/magazine/migrations/0008_remove_article_related_articles.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-24 09:20
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-magazine', '0007_auto_20160924_1058'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='article',
- name='related_articles',
- ),
- ]
diff --git a/app/organization/magazine/migrations/0009_auto_20160928_1858.py b/app/organization/magazine/migrations/0009_auto_20160928_1858.py
deleted file mode 100644
index 58ce2d7d..00000000
--- a/app/organization/magazine/migrations/0009_auto_20160928_1858.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-28 16:58
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-magazine', '0008_remove_article_related_articles'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='articleimage',
- name='type',
- field=models.CharField(choices=[('logo', 'logo'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type'),
- ),
- ]
diff --git a/app/organization/magazine/migrations/0010_articleaudio_articlevideo.py b/app/organization/magazine/migrations/0010_articleaudio_articlevideo.py
deleted file mode 100644
index 9e081b90..00000000
--- a/app/organization/magazine/migrations/0010_articleaudio_articlevideo.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-10-05 15:54
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0003_auto_20160929_1835'),
- ('organization-magazine', '0009_auto_20160928_1858'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ArticleAudio',
- fields=[
- ('audio_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-media.Audio')),
- ('article', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='audios', to='organization-magazine.Article', verbose_name='article')),
- ],
- options={
- 'abstract': False,
- },
- bases=('organization-media.audio',),
- ),
- migrations.CreateModel(
- name='ArticleVideo',
- fields=[
- ('video_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-media.Video')),
- ('article', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='videos', to='organization-magazine.Article', verbose_name='article')),
- ],
- options={
- 'abstract': False,
- },
- bases=('organization-media.video',),
- ),
- ]
diff --git a/app/organization/magazine/migrations/0011_auto_20161013_1631.py b/app/organization/magazine/migrations/0011_auto_20161013_1631.py
deleted file mode 100644
index cbea17c3..00000000
--- a/app/organization/magazine/migrations/0011_auto_20161013_1631.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-13 14:31
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0005_auto_20160930_1849'),
- ('organization-magazine', '0010_articleaudio_articlevideo'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ArticlePlaylist',
- fields=[
- ('playlist_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-media.Playlist')),
- ],
- options={
- 'abstract': False,
- },
- bases=('organization-media.playlist',),
- ),
- migrations.RemoveField(
- model_name='articleaudio',
- name='article',
- ),
- migrations.RemoveField(
- model_name='articleaudio',
- name='audio_ptr',
- ),
- migrations.RemoveField(
- model_name='articlevideo',
- name='article',
- ),
- migrations.RemoveField(
- model_name='articlevideo',
- name='video_ptr',
- ),
- ]
diff --git a/app/organization/magazine/migrations/0012_auto_20161013_1631.py b/app/organization/magazine/migrations/0012_auto_20161013_1631.py
deleted file mode 100644
index 0bc550bb..00000000
--- a/app/organization/magazine/migrations/0012_auto_20161013_1631.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-13 14:31
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-magazine', '0011_auto_20161013_1631'),
- ('organization-media', '0006_auto_20161013_1631'),
- ]
-
- operations = [
- migrations.DeleteModel(
- name='ArticleAudio',
- ),
- migrations.DeleteModel(
- name='ArticleVideo',
- ),
- migrations.AddField(
- model_name='articleplaylist',
- name='article',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='playlists', to='organization-magazine.Article', verbose_name='article'),
- ),
- ]
diff --git a/app/organization/magazine/migrations/0013_auto_20161013_2353.py b/app/organization/magazine/migrations/0013_auto_20161013_2353.py
deleted file mode 100644
index 325e31a9..00000000
--- a/app/organization/magazine/migrations/0013_auto_20161013_2353.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-13 21:53
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0009_auto_20161013_2353'),
- ('organization-magazine', '0012_auto_20161013_1631'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='articleplaylist',
- name='playlist_ptr',
- ),
- migrations.AddField(
- model_name='articleplaylist',
- name='playlistrelated_ptr',
- field=models.OneToOneField(auto_created=True, default=1, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-media.PlaylistRelated'),
- preserve_default=False,
- ),
- ]
diff --git a/app/organization/magazine/migrations/0014_brief_style.py b/app/organization/magazine/migrations/0014_brief_style.py
deleted file mode 100644
index cc9753c8..00000000
--- a/app/organization/magazine/migrations/0014_brief_style.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-21 15:35
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-magazine', '0013_auto_20161013_2353'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='brief',
- name='style',
- field=models.CharField(choices=[('grey', 'grey'), ('yellow', 'yellow'), ('black', 'black')], default='', max_length=16, verbose_name='style'),
- preserve_default=False,
- ),
- ]
diff --git a/app/organization/magazine/migrations/0015_auto_20161028_1613.py b/app/organization/magazine/migrations/0015_auto_20161028_1613.py
deleted file mode 100644
index 3607013e..00000000
--- a/app/organization/magazine/migrations/0015_auto_20161028_1613.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-28 14:13
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-magazine', '0014_brief_style'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ArticleRelatedTitle',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('title', models.CharField(blank=True, max_length=1024, null=True, verbose_name='title')),
- ('article', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='related_title', to='organization-magazine.Article', verbose_name='article')),
- ],
- options={
- 'verbose_name': 'related title',
- },
- ),
- migrations.AlterOrderWithRespectTo(
- name='articlerelatedtitle',
- order_with_respect_to='article',
- ),
- ]
diff --git a/app/organization/magazine/migrations/0016_auto_20161028_1617.py b/app/organization/magazine/migrations/0016_auto_20161028_1617.py
deleted file mode 100644
index 65ff4a11..00000000
--- a/app/organization/magazine/migrations/0016_auto_20161028_1617.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-28 14:17
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-magazine', '0015_auto_20161028_1613'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='articlerelatedtitle',
- name='title_en',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- migrations.AddField(
- model_name='articlerelatedtitle',
- name='title_fr',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- ]
diff --git a/app/organization/magazine/migrations/0017_auto_20161104_1026.py b/app/organization/magazine/migrations/0017_auto_20161104_1026.py
deleted file mode 100644
index 3d6bf0e9..00000000
--- a/app/organization/magazine/migrations/0017_auto_20161104_1026.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-04 09:26
-from __future__ import unicode_literals
-
-from django.db import migrations
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-magazine', '0016_auto_20161028_1617'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='topic',
- name='content_en',
- field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Content'),
- ),
- migrations.AddField(
- model_name='topic',
- name='content_fr',
- field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Content'),
- ),
- ]
diff --git a/app/organization/magazine/migrations/0018_auto_20161205_1536.py b/app/organization/magazine/migrations/0018_auto_20161205_1536.py
deleted file mode 100644
index 9136c84a..00000000
--- a/app/organization/magazine/migrations/0018_auto_20161205_1536.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2016-12-05 14:36
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-magazine', '0017_auto_20161104_1026'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='articleimage',
- name='type',
- field=models.CharField(choices=[('logo', 'logo'), ('logo_white', 'logo white'), ('logo_black', 'logo black'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type'),
- ),
- ]
diff --git a/app/organization/magazine/migrations/0019_auto_20170105_1743.py b/app/organization/magazine/migrations/0019_auto_20170105_1743.py
deleted file mode 100644
index 70d49b07..00000000
--- a/app/organization/magazine/migrations/0019_auto_20170105_1743.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-05 16:43
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-magazine', '0018_auto_20161205_1536'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='articleimage',
- name='type',
- field=models.CharField(choices=[('logo', 'logo'), ('logo_white', 'logo white'), ('logo_black', 'logo black'), ('logo_header', 'logo header'), ('logo_footer', 'logo footer'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type'),
- ),
- ]
diff --git a/app/organization/magazine/migrations/__init__.py b/app/organization/magazine/migrations/__init__.py
deleted file mode 100644
index e69de29b..00000000
diff --git a/app/organization/magazine/models.py b/app/organization/magazine/models.py
deleted file mode 100644
index 53afb059..00000000
--- a/app/organization/magazine/models.py
+++ /dev/null
@@ -1,139 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-
-from django.db import models
-from django import forms
-from django.contrib.contenttypes.fields import GenericForeignKey
-from django.contrib.contenttypes.models import ContentType
-from mezzanine.core.managers import SearchableManager
-from django.utils.translation import ugettext_lazy as _
-from django.core.urlresolvers import reverse, reverse_lazy
-
-from mezzanine.core.models import RichText, Displayable, Slugged
-from mezzanine.pages.models import Page
-from mezzanine.blog.models import BlogPost
-from organization.network.models import Department, PersonListBlock
-from organization.media.models import *
-from organization.core.models import *
-from organization.magazine.apps import *
-
-BRIEF_STYLE_CHOICES = [
- ('grey', _('grey')),
- ('yellow', _('yellow')),
- ('black', _('black'))
-]
-
-class Article(BlogPost, SubTitled):
-
- department = models.ForeignKey(Department, verbose_name=_('department'), related_name='articles', limit_choices_to=dict(id__in=Department.objects.all()), blank=True, null=True, on_delete=models.SET_NULL)
- topics = models.ManyToManyField("Topic", verbose_name=_('topics'), related_name="articles", blank=True)
- search_fields = ("title", "content")
-
- def get_absolute_url(self):
- return reverse("magazine-article-detail", kwargs={"slug": self.slug})
-
- class Meta:
- verbose_name = _('article')
-
-
-class ArticleImage(Image):
-
- article = models.ForeignKey("Article", verbose_name=_('article'), related_name='images', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _("image")
- verbose_name_plural = _("images")
- order_with_respect_to = "article"
-
-
-class ArticleRelatedTitle(RelatedTitle):
-
- article = models.OneToOneField("Article", verbose_name=_('article'), related_name='related_title', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _("related title")
- order_with_respect_to = "article"
-
-
-class ArticlePlaylist(PlaylistRelated):
-
- article = models.ForeignKey(Article, verbose_name=_('article'), related_name='playlists', blank=True, null=True, on_delete=models.SET_NULL)
-
-
-class Brief(Displayable, RichText):
-
- style = models.CharField(_('style'), max_length=16, choices=BRIEF_STYLE_CHOICES)
- text_button = models.CharField(blank=True, max_length=150, null=False, verbose_name=_('text button'))
- external_content = models.URLField(blank=True, max_length=1000, null=False, verbose_name=_('external content'))
-
- # used for autocomplete but hidden in admin
- content_type = models.ForeignKey(
- ContentType,
- verbose_name=_('local content'),
- null=True,
- blank=True,
- editable=False,
- )
-
- # used for autocomplete but hidden in admin
- object_id = models.PositiveIntegerField(
- verbose_name=_('related object'),
- null=True,
- editable=False,
- )
-
- content_object = GenericForeignKey('content_type', 'object_id')
-
- def get_absolute_url(self):
- return self.external_content
-
- class Meta:
- verbose_name = _('brief')
- #ordering = ['sort_order']
-
-
-class Topic(Page, RichText):
- """Topic for magazine menu"""
-
- class Meta:
- verbose_name = _('topic')
-
-
-class ArticlePersonListBlockInline(Titled):
-
- article = models.ForeignKey(Article, verbose_name=_('Article'), related_name='article_person_list_block_inlines', blank=True, null=True, on_delete=models.SET_NULL)
- person_list_block = models.ForeignKey(PersonListBlock, related_name='article_person_list_block_inlines', verbose_name=_('Person List Block'), blank=True, null=True)
-
- class Meta:
- verbose_name = _('Person List')
-
- def __str__(self):
- return self.title
-
-
-class DynamicContentArticle(DynamicContent, Orderable):
-
- article = models.ForeignKey(Article, verbose_name=_('article'), related_name='dynamic_content_articles', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = 'Dynamic Content Article'
diff --git a/app/organization/magazine/tests.py b/app/organization/magazine/tests.py
deleted file mode 100644
index fa8859d7..00000000
--- a/app/organization/magazine/tests.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.test import TestCase
-
-# Create your tests here.
diff --git a/app/organization/magazine/translation.py b/app/organization/magazine/translation.py
deleted file mode 100644
index 1d6876a8..00000000
--- a/app/organization/magazine/translation.py
+++ /dev/null
@@ -1,76 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from modeltranslation.translator import translator, register, TranslationOptions
-from mezzanine.pages.models import Page, RichText
-from modeltranslation.translator import TranslationOptions
-from mezzanine.core.translation import (TranslatedSlugged,
- TranslatedDisplayable,
- TranslatedRichText)
-from organization.magazine.models import *
-
-
-@register(Article)
-class ArticleTranslationOptions(TranslationOptions):
-
- fields = ('sub_title',)
-
-
-@register(Brief)
-class BriefTranslationOptions(TranslationOptions):
-
- fields = ('title', 'content', 'text_button', )
-
-
-@register(Topic)
-class TopicTranslationOptions(TranslationOptions):
-
- fields = ('content',)
-
-
-@register(ArticleImage)
-class ArticleImageTranslationOptions(TranslationOptions):
-
- fields = ('description',)
-
-
-@register(ArticlePersonListBlockInline)
-class ArticlePersonListBlockInlineTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(DynamicContentArticle)
-class DynamicContentArticleTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(ArticlePlaylist)
-class ArticlePlaylistTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(ArticleRelatedTitle)
-class ArticleRelatedTitleTranslationOptions(TranslationOptions):
-
- fields = ('title', )
diff --git a/app/organization/magazine/urls.py b/app/organization/magazine/urls.py
deleted file mode 100644
index 78074935..00000000
--- a/app/organization/magazine/urls.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-
-from django.conf.urls import patterns, include, url
-from django.conf.urls.i18n import i18n_patterns
-from django.contrib import admin
-
-from mezzanine.core.views import direct_to_template
-from mezzanine.conf import settings
-
-from organization.magazine.views import *
-
-_slash = "/" if settings.APPEND_SLASH else ""
-
-urlpatterns = [
- url("^article/detail/(?P.*)%s$" % _slash, ArticleDetailView.as_view(), name="magazine-article-detail"),
- url("^article/list%s$" % _slash, ArticleListView.as_view(), name="magazine-article-list"),
- url("^topic/detail/(?P.*)%s$" % _slash, TopicDetailView.as_view(), name='topic-detail'),
- url("^object-autocomplete/$", ObjectAutocomplete.as_view(), name='object-autocomplete'),
- url("^dynamic-content-article/$", DynamicContentArticleView.as_view(), name='dynamic-content-article'),
-]
diff --git a/app/organization/magazine/views.py b/app/organization/magazine/views.py
deleted file mode 100644
index 326053de..00000000
--- a/app/organization/magazine/views.py
+++ /dev/null
@@ -1,205 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from urllib.parse import urlparse
-from django.shortcuts import render
-from django.utils import timezone
-#from django.views.generic import *
-from django.views.generic import DetailView, ListView, TemplateView
-from django.contrib.contenttypes.models import ContentType
-from django.views.generic.base import *
-from django.shortcuts import get_object_or_404
-from itertools import chain
-from dal import autocomplete
-from dal_select2_queryset_sequence.views import Select2QuerySetSequenceView
-from mezzanine_agenda.models import Event
-from mezzanine.utils.views import paginate
-from mezzanine.conf import settings
-from organization.magazine.models import *
-from organization.network.models import DepartmentPage, Person
-from organization.pages.models import CustomPage, DynamicContentPage
-from organization.core.views import SlugMixin, autocomplete_result_formatting
-from django.template.defaultfilters import slugify
-from itertools import chain
-
-
-class ArticleDetailView(SlugMixin, DetailView):
-
- model = Article
- template_name='magazine/article/article_detail.html'
- context_object_name = 'article'
-
- def get_object(self):
- articles = self.model.objects.published(for_user=self.request.user).select_related()
- return get_object_or_404(articles, slug=self.kwargs['slug'])
-
- def get_context_data(self, **kwargs):
- context = super(ArticleDetailView, self).get_context_data(**kwargs)
-
- # automatic relation : dynamic content page
- pages = DynamicContentPage.objects.filter(object_id=self.object.id).all()
- pages = [p.content_object for p in pages]
-
- # automatic relation : dynamic content article
- articles = DynamicContentArticle.objects.filter(object_id=self.object.id).all()
- articles = [a.content_object for a in articles]
-
- # manual relation : get dynamic contents of current article
- dynamic_content = [dca.content_object for dca in self.object.dynamic_content_articles.all()]
-
- # gather all and order by creation date
- related_content = pages
- related_content = articles
- related_content += dynamic_content
- related_content.sort(key=lambda x: x.created, reverse=True)
- context['related_content'] = related_content
-
- if self.object.department:
- context['department_weaving_css_class'] = self.object.department.pages.first().weaving_css_class
- context['department_name'] = self.object.department.name
- return context
-
-
-class BriefDetailView(SlugMixin, DetailView):
-
- model = Brief
- template_name='magazine/inc_brief.html'
- context_object_name = 'brief'
-
- def get_context_data(self, **kwargs):
- context = super(BriefDetailView, self).get_context_data(**kwargs)
- return context
-
-
-class BriefListView(SlugMixin, ListView):
-
- model = Brief
- template_name='magazine/brief/brief_list.html'
- context_object_name = 'brief'
-
- def get_context_data(self, **kwargs):
- context = super(BriefListView, self).get_context_data(**kwargs)
- return context
-
-
-class TopicDetailView(SlugMixin, DetailView):
-
- model = Topic
- template_name='magazine/topic/topic_detail.html'
- context_object_name = 'topic'
-
- def get_context_data(self, **kwargs):
- context = super(TopicDetailView, self).get_context_data(**kwargs)
- # paginate "manually" articles because we are not in a ListView
- articles = paginate(self.object.articles.all(), self.request.GET.get("page", 1),
- settings.ARTICLE_PER_PAGE,
- settings.MAX_PAGING_LINKS)
- context['articles'] = articles
- return context
-
-
-class ObjectAutocomplete(Select2QuerySetSequenceView):
-
- paginate_by = settings.DAL_MAX_RESULTS
-
- def get_queryset(self):
-
- articles = Article.objects.all()
- custompage = CustomPage.objects.all()
- events = Event.objects.all()
-
- if self.q:
- articles = articles.filter(title__icontains=self.q)
- custompage = custompage.filter(title__icontains=self.q)
- events = events.filter(title__icontains=self.q)
-
- qs = autocomplete.QuerySetSequence(articles, custompage, events )
-
- if self.q:
- # This would apply the filter on all the querysets
- qs = qs.filter(title__icontains=self.q)
-
- # This will limit each queryset so that they show an equal number
- # of results.
- qs = self.mixup_querysets(qs)
-
- return qs
-
- def get_results(self, context):
- results = autocomplete_result_formatting(self, context)
- return results
-
-
-class DynamicContentArticleView(Select2QuerySetSequenceView):
-
- paginate_by = settings.DAL_MAX_RESULTS
-
- def get_queryset(self):
-
- articles = Article.objects.all()
- events = Event.objects.all()
- pages = CustomPage.objects.all()
- persons = Person.objects.published()
-
- if self.q:
- articles = articles.filter(title__icontains=self.q)
- events = events.filter(title__icontains=self.q)
- pages = pages.filter(title__icontains=self.q)
- persons = persons.filter(title__icontains=self.q)
-
- qs = autocomplete.QuerySetSequence(articles, events, pages, persons)
-
- if self.q:
- # This would apply the filter on all the querysets
- qs = qs.filter(title__icontains=self.q)
-
- # This will limit each queryset so that they show an equal number
- # of results.
- qs = self.mixup_querysets(qs)
-
- return qs
-
- def get_results(self, context):
- results = autocomplete_result_formatting(self, context)
- return results
-
-
-class ArticleListView(SlugMixin, ListView):
-
- model = Article
- template_name='magazine/article/article_list.html'
- context_object_name = 'objects'
-
- def get_queryset(self):
- qs = super(ArticleListView, self).get_queryset()
- qs = qs.filter(status=2)
- medias = Media.objects.published()
-
- qs = sorted(
- chain(qs, medias),
- key=lambda instance: instance.created,
- reverse=True)
-
- return qs
-
- def get_context_data(self, **kwargs):
- context = super(ArticleListView, self).get_context_data(**kwargs)
- return context
diff --git a/app/organization/media/__init__.py b/app/organization/media/__init__.py
deleted file mode 100644
index 3f7dfe08..00000000
--- a/app/organization/media/__init__.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-"""
-Provides abstract models and admin features used throughout the various
-Mezzanine apps.
-"""
-from __future__ import unicode_literals
-
-from mezzanine import __version__ # noqa
-
-
-default_app_config = 'organization.media.apps.MediaConfig'
diff --git a/app/organization/media/admin.py b/app/organization/media/admin.py
deleted file mode 100644
index 759cbe6a..00000000
--- a/app/organization/media/admin.py
+++ /dev/null
@@ -1,72 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from copy import deepcopy
-from django.contrib import admin
-from mezzanine.core.admin import *
-from organization.media.models import *
-from organization.media.forms import *
-
-
-class MediaTranscodedAdmin(TabularDynamicInlineAdmin):
-
- model = MediaTranscoded
-
-
-class MediaImageInline(TabularDynamicInlineAdmin):
-
- model = MediaImage
-
-
-class MediaAdmin(BaseTranslationModelAdmin):
-
- model = Media
- inlines = (MediaTranscodedAdmin, MediaImageInline)
- list_display = ['title',]
-
-
-class PlaylistMediaInline(TabularDynamicInlineAdmin):
-
- model = PlaylistMedia
- form = PlaylistMediaForm
-
-
-class PlaylistAdmin(BaseTranslationModelAdmin):
-
- model = Playlist
- inlines = (PlaylistMediaInline,)
-
-
-class MediaCategoryAdmin(BaseTranslationModelAdmin):
-
- model = MediaCategory
-
-
-class LiveStreamingAdmin(BaseTranslationModelAdmin):
-
- model = LiveStreaming
- list_display = ['title',]
-
-
-admin.site.register(Media, MediaAdmin)
-admin.site.register(Playlist, PlaylistAdmin)
-admin.site.register(MediaCategory, MediaCategoryAdmin)
-admin.site.register(LiveStreaming, LiveStreamingAdmin)
diff --git a/app/organization/media/apps.py b/app/organization/media/apps.py
deleted file mode 100644
index d0d426a7..00000000
--- a/app/organization/media/apps.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-
-from django.apps import AppConfig
-
-
-class MediaConfig(AppConfig):
-
- name = 'organization.media'
- label = 'organization-media'
diff --git a/app/organization/media/forms.py b/app/organization/media/forms.py
deleted file mode 100644
index 24356a7c..00000000
--- a/app/organization/media/forms.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from dal import autocomplete
-
-import dal_queryset_sequence
-import dal_select2_queryset_sequence
-
-from django import forms
-from django.forms.widgets import HiddenInput
-from django.forms import ModelForm
-from mezzanine.core.models import Orderable
-from organization.media.models import *
-
-
-class PlaylistMediaForm(forms.ModelForm):
-
- media = forms.ModelChoiceField(
- queryset=Media.objects.all(),
- widget=autocomplete.ModelSelect2(url='media-autocomplete')
- )
-
- class Meta:
- model = PlaylistMedia
- fields = ('__all__')
diff --git a/app/organization/media/migrations/0001_initial.py b/app/organization/media/migrations/0001_initial.py
deleted file mode 100644
index 72201d84..00000000
--- a/app/organization/media/migrations/0001_initial.py
+++ /dev/null
@@ -1,86 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-01 15:32
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- initial = True
-
- dependencies = [
- ('sites', '0002_alter_domain_unique'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='Audio',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('title_fr', models.CharField(max_length=1024, null=True, verbose_name='title')),
- ('title_en', models.CharField(max_length=1024, null=True, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('description_fr', models.TextField(blank=True, null=True, verbose_name='description')),
- ('description_en', models.TextField(blank=True, null=True, verbose_name='description')),
- ('media_id', models.CharField(max_length=128, verbose_name='media id')),
- ('open_source_url', models.URLField(blank=True, max_length=1024, verbose_name='open source URL')),
- ('closed_source_url', models.URLField(blank=True, max_length=1024, verbose_name='closed source URL')),
- ('poster_url', models.URLField(blank=True, max_length=1024, verbose_name='poster')),
- ],
- options={
- 'verbose_name': 'audio',
- },
- ),
- migrations.CreateModel(
- name='Playlist',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('title', models.CharField(max_length=500, verbose_name='Title')),
- ('slug', models.CharField(blank=True, help_text='Leave blank to have the URL auto-generated from the title.', max_length=2000, null=True, verbose_name='URL')),
- ('audios', models.ManyToManyField(blank=True, related_name='playlists', to='organization-media.Audio', verbose_name='audios')),
- ('site', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to='sites.Site')),
- ],
- options={
- 'abstract': False,
- },
- ),
- migrations.CreateModel(
- name='Video',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('title_fr', models.CharField(max_length=1024, null=True, verbose_name='title')),
- ('title_en', models.CharField(max_length=1024, null=True, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('description_fr', models.TextField(blank=True, null=True, verbose_name='description')),
- ('description_en', models.TextField(blank=True, null=True, verbose_name='description')),
- ('media_id', models.CharField(max_length=128, verbose_name='media id')),
- ('open_source_url', models.URLField(blank=True, max_length=1024, verbose_name='open source URL')),
- ('closed_source_url', models.URLField(blank=True, max_length=1024, verbose_name='closed source URL')),
- ('poster_url', models.URLField(blank=True, max_length=1024, verbose_name='poster')),
- ],
- options={
- 'verbose_name': 'video',
- },
- ),
- migrations.CreateModel(
- name='VideoCategory',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('title', models.CharField(max_length=500, verbose_name='Title')),
- ('slug', models.CharField(blank=True, help_text='Leave blank to have the URL auto-generated from the title.', max_length=2000, null=True, verbose_name='URL')),
- ('site', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to='sites.Site')),
- ],
- options={
- 'verbose_name': 'video category',
- },
- ),
- migrations.AddField(
- model_name='video',
- name='category',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='videos', to='organization-media.VideoCategory', verbose_name='category'),
- ),
- ]
diff --git a/app/organization/media/migrations/0002_auto_20160929_1310.py b/app/organization/media/migrations/0002_auto_20160929_1310.py
deleted file mode 100644
index 9fef1078..00000000
--- a/app/organization/media/migrations/0002_auto_20160929_1310.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-29 11:10
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0001_initial'),
- ]
-
- operations = [
- migrations.RenameModel(
- old_name='VideoCategory',
- new_name='MediaCategory',
- ),
- migrations.AlterModelOptions(
- name='mediacategory',
- options={'verbose_name': 'media category', 'verbose_name_plural': 'media categories'},
- ),
- migrations.AddField(
- model_name='audio',
- name='category',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='audios', to='organization-media.MediaCategory', verbose_name='category'),
- ),
- ]
diff --git a/app/organization/media/migrations/0003_auto_20160929_1835.py b/app/organization/media/migrations/0003_auto_20160929_1835.py
deleted file mode 100644
index 545207b4..00000000
--- a/app/organization/media/migrations/0003_auto_20160929_1835.py
+++ /dev/null
@@ -1,65 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-09-29 16:35
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0002_auto_20160929_1310'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='mediacategory',
- name='description',
- field=models.TextField(blank=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='mediacategory',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='mediacategory',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='mediacategory',
- name='title_en',
- field=models.CharField(max_length=500, null=True, verbose_name='Title'),
- ),
- migrations.AddField(
- model_name='mediacategory',
- name='title_fr',
- field=models.CharField(max_length=500, null=True, verbose_name='Title'),
- ),
- migrations.AddField(
- model_name='playlist',
- name='description',
- field=models.TextField(blank=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='playlist',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='playlist',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='playlist',
- name='title_en',
- field=models.CharField(max_length=500, null=True, verbose_name='Title'),
- ),
- migrations.AddField(
- model_name='playlist',
- name='title_fr',
- field=models.CharField(max_length=500, null=True, verbose_name='Title'),
- ),
- ]
diff --git a/app/organization/media/migrations/0004_auto_20160930_1039.py b/app/organization/media/migrations/0004_auto_20160930_1039.py
deleted file mode 100644
index 309a1946..00000000
--- a/app/organization/media/migrations/0004_auto_20160930_1039.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-30 08:39
-from __future__ import unicode_literals
-
-import datetime
-from django.db import migrations, models
-from django.utils.timezone import utc
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0003_auto_20160929_1835'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='audio',
- name='created_at',
- field=models.DateTimeField(auto_now=True, default=datetime.datetime(2016, 9, 30, 8, 39, 34, 557510, tzinfo=utc)),
- preserve_default=False,
- ),
- migrations.AddField(
- model_name='video',
- name='created_at',
- field=models.DateTimeField(auto_now=True, default=datetime.datetime(2016, 9, 30, 8, 39, 38, 786940, tzinfo=utc)),
- preserve_default=False,
- ),
- ]
diff --git a/app/organization/media/migrations/0004_auto_20161007_1426.py b/app/organization/media/migrations/0004_auto_20161007_1426.py
deleted file mode 100644
index 93e23b82..00000000
--- a/app/organization/media/migrations/0004_auto_20161007_1426.py
+++ /dev/null
@@ -1,199 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-07 12:26
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('sites', '0002_alter_domain_unique'),
- ('organization-media', '0004_auto_20160930_1039'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='audio',
- name='_meta_title',
- field=models.CharField(blank=True, help_text='Optional title to be used in the HTML title tag. If left blank, the main title field will be used.', max_length=500, null=True, verbose_name='Title'),
- ),
- migrations.AddField(
- model_name='audio',
- name='created',
- field=models.DateTimeField(editable=False, null=True),
- ),
- migrations.AddField(
- model_name='audio',
- name='expiry_date',
- field=models.DateTimeField(blank=True, help_text="With Published chosen, won't be shown after this time", null=True, verbose_name='Expires on'),
- ),
- migrations.AddField(
- model_name='audio',
- name='gen_description',
- field=models.BooleanField(default=True, help_text='If checked, the description will be automatically generated from content. Uncheck if you want to manually set a custom description.', verbose_name='Generate description'),
- ),
- migrations.AddField(
- model_name='audio',
- name='in_sitemap',
- field=models.BooleanField(default=True, verbose_name='Show in sitemap'),
- ),
- migrations.AddField(
- model_name='audio',
- name='keywords_string',
- field=models.CharField(blank=True, editable=False, max_length=500),
- ),
- migrations.AddField(
- model_name='audio',
- name='publish_date',
- field=models.DateTimeField(blank=True, db_index=True, help_text="With Published chosen, won't be shown until this time", null=True, verbose_name='Published from'),
- ),
- migrations.AddField(
- model_name='audio',
- name='short_url',
- field=models.URLField(blank=True, null=True),
- ),
- migrations.AddField(
- model_name='audio',
- name='site',
- field=models.ForeignKey(default=1, editable=False, on_delete=django.db.models.deletion.CASCADE, to='sites.Site'),
- preserve_default=False,
- ),
- migrations.AddField(
- model_name='audio',
- name='slug',
- field=models.CharField(blank=True, help_text='Leave blank to have the URL auto-generated from the title.', max_length=2000, null=True, verbose_name='URL'),
- ),
- migrations.AddField(
- model_name='audio',
- name='status',
- field=models.IntegerField(choices=[(1, 'Draft'), (2, 'Published')], default=2, help_text='With Draft chosen, will only be shown for admin users on the site.', verbose_name='Status'),
- ),
- migrations.AddField(
- model_name='audio',
- name='updated',
- field=models.DateTimeField(editable=False, null=True),
- ),
- migrations.AddField(
- model_name='video',
- name='_meta_title',
- field=models.CharField(blank=True, help_text='Optional title to be used in the HTML title tag. If left blank, the main title field will be used.', max_length=500, null=True, verbose_name='Title'),
- ),
- migrations.AddField(
- model_name='video',
- name='created',
- field=models.DateTimeField(editable=False, null=True),
- ),
- migrations.AddField(
- model_name='video',
- name='expiry_date',
- field=models.DateTimeField(blank=True, help_text="With Published chosen, won't be shown after this time", null=True, verbose_name='Expires on'),
- ),
- migrations.AddField(
- model_name='video',
- name='gen_description',
- field=models.BooleanField(default=True, help_text='If checked, the description will be automatically generated from content. Uncheck if you want to manually set a custom description.', verbose_name='Generate description'),
- ),
- migrations.AddField(
- model_name='video',
- name='in_sitemap',
- field=models.BooleanField(default=True, verbose_name='Show in sitemap'),
- ),
- migrations.AddField(
- model_name='video',
- name='keywords_string',
- field=models.CharField(blank=True, editable=False, max_length=500),
- ),
- migrations.AddField(
- model_name='video',
- name='publish_date',
- field=models.DateTimeField(blank=True, db_index=True, help_text="With Published chosen, won't be shown until this time", null=True, verbose_name='Published from'),
- ),
- migrations.AddField(
- model_name='video',
- name='short_url',
- field=models.URLField(blank=True, null=True),
- ),
- migrations.AddField(
- model_name='video',
- name='site',
- field=models.ForeignKey(default=1, editable=False, on_delete=django.db.models.deletion.CASCADE, to='sites.Site'),
- preserve_default=False,
- ),
- migrations.AddField(
- model_name='video',
- name='slug',
- field=models.CharField(blank=True, help_text='Leave blank to have the URL auto-generated from the title.', max_length=2000, null=True, verbose_name='URL'),
- ),
- migrations.AddField(
- model_name='video',
- name='status',
- field=models.IntegerField(choices=[(1, 'Draft'), (2, 'Published')], default=2, help_text='With Draft chosen, will only be shown for admin users on the site.', verbose_name='Status'),
- ),
- migrations.AddField(
- model_name='video',
- name='updated',
- field=models.DateTimeField(editable=False, null=True),
- ),
- migrations.AlterField(
- model_name='audio',
- name='description',
- field=models.TextField(blank=True, verbose_name='Description'),
- ),
- migrations.AlterField(
- model_name='audio',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='Description'),
- ),
- migrations.AlterField(
- model_name='audio',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='Description'),
- ),
- migrations.AlterField(
- model_name='audio',
- name='title',
- field=models.CharField(max_length=500, verbose_name='Title'),
- ),
- migrations.AlterField(
- model_name='audio',
- name='title_en',
- field=models.CharField(max_length=500, null=True, verbose_name='Title'),
- ),
- migrations.AlterField(
- model_name='audio',
- name='title_fr',
- field=models.CharField(max_length=500, null=True, verbose_name='Title'),
- ),
- migrations.AlterField(
- model_name='video',
- name='description',
- field=models.TextField(blank=True, verbose_name='Description'),
- ),
- migrations.AlterField(
- model_name='video',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='Description'),
- ),
- migrations.AlterField(
- model_name='video',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='Description'),
- ),
- migrations.AlterField(
- model_name='video',
- name='title',
- field=models.CharField(max_length=500, verbose_name='Title'),
- ),
- migrations.AlterField(
- model_name='video',
- name='title_en',
- field=models.CharField(max_length=500, null=True, verbose_name='Title'),
- ),
- migrations.AlterField(
- model_name='video',
- name='title_fr',
- field=models.CharField(max_length=500, null=True, verbose_name='Title'),
- ),
- ]
diff --git a/app/organization/media/migrations/0005_auto_20160930_1849.py b/app/organization/media/migrations/0005_auto_20160930_1849.py
deleted file mode 100644
index 3020d9c8..00000000
--- a/app/organization/media/migrations/0005_auto_20160930_1849.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-30 16:49
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0004_auto_20161007_1426'),
- ]
-
- operations = [
- migrations.AlterModelOptions(
- name='audio',
- options={'ordering': ('-created_at',), 'verbose_name': 'audio'},
- ),
- migrations.AlterModelOptions(
- name='video',
- options={'ordering': ('-created_at',), 'verbose_name': 'video'},
- ),
- ]
diff --git a/app/organization/media/migrations/0006_auto_20161013_1631.py b/app/organization/media/migrations/0006_auto_20161013_1631.py
deleted file mode 100644
index 09cd5b51..00000000
--- a/app/organization/media/migrations/0006_auto_20161013_1631.py
+++ /dev/null
@@ -1,164 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-13 14:31
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0005_auto_20160930_1849'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='Media',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('keywords_string', models.CharField(blank=True, editable=False, max_length=500)),
- ('title', models.CharField(max_length=500, verbose_name='Title')),
- ('title_fr', models.CharField(max_length=500, null=True, verbose_name='Title')),
- ('title_en', models.CharField(max_length=500, null=True, verbose_name='Title')),
- ('slug', models.CharField(blank=True, help_text='Leave blank to have the URL auto-generated from the title.', max_length=2000, null=True, verbose_name='URL')),
- ('_meta_title', models.CharField(blank=True, help_text='Optional title to be used in the HTML title tag. If left blank, the main title field will be used.', max_length=500, null=True, verbose_name='Title')),
- ('description', models.TextField(blank=True, verbose_name='Description')),
- ('description_fr', models.TextField(blank=True, null=True, verbose_name='Description')),
- ('description_en', models.TextField(blank=True, null=True, verbose_name='Description')),
- ('gen_description', models.BooleanField(default=True, help_text='If checked, the description will be automatically generated from content. Uncheck if you want to manually set a custom description.', verbose_name='Generate description')),
- ('created', models.DateTimeField(editable=False, null=True)),
- ('updated', models.DateTimeField(editable=False, null=True)),
- ('status', models.IntegerField(choices=[(1, 'Draft'), (2, 'Published')], default=2, help_text='With Draft chosen, will only be shown for admin users on the site.', verbose_name='Status')),
- ('publish_date', models.DateTimeField(blank=True, db_index=True, help_text="With Published chosen, won't be shown until this time", null=True, verbose_name='Published from')),
- ('expiry_date', models.DateTimeField(blank=True, help_text="With Published chosen, won't be shown after this time", null=True, verbose_name='Expires on')),
- ('short_url', models.URLField(blank=True, null=True)),
- ('in_sitemap', models.BooleanField(default=True, verbose_name='Show in sitemap')),
- ('external_id', models.CharField(max_length=128, verbose_name='media id')),
- ('poster_url', models.URLField(blank=True, max_length=1024, verbose_name='poster')),
- ('created_at', models.DateTimeField(auto_now=True)),
- ],
- options={
- 'verbose_name': 'media',
- 'ordering': ('-created_at',),
- 'verbose_name_plural': 'medias',
- },
- ),
- migrations.CreateModel(
- name='MediaTranscoded',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('file', mezzanine.core.fields.FileField(max_length=1024, verbose_name='Image')),
- ('url', models.URLField(blank=True, max_length=1024, verbose_name='URL')),
- ('mime_type', models.CharField(max_length=64, verbose_name='mime type')),
- ],
- options={
- 'verbose_name': 'media',
- 'verbose_name_plural': 'medias',
- },
- ),
- migrations.CreateModel(
- name='PlaylistMedia',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ],
- options={
- 'verbose_name': 'media',
- 'verbose_name_plural': 'medias',
- },
- ),
- migrations.RemoveField(
- model_name='audio',
- name='category',
- ),
- migrations.RemoveField(
- model_name='audio',
- name='site',
- ),
- migrations.RemoveField(
- model_name='video',
- name='category',
- ),
- migrations.RemoveField(
- model_name='video',
- name='site',
- ),
- migrations.AlterModelOptions(
- name='playlist',
- options={'verbose_name': 'playlist', 'verbose_name_plural': 'playlists'},
- ),
- migrations.RemoveField(
- model_name='playlist',
- name='audios',
- ),
- migrations.AddField(
- model_name='playlist',
- name='_meta_title',
- field=models.CharField(blank=True, help_text='Optional title to be used in the HTML title tag. If left blank, the main title field will be used.', max_length=500, null=True, verbose_name='Title'),
- ),
- migrations.AddField(
- model_name='playlist',
- name='created',
- field=models.DateTimeField(editable=False, null=True),
- ),
- migrations.AddField(
- model_name='playlist',
- name='expiry_date',
- field=models.DateTimeField(blank=True, help_text="With Published chosen, won't be shown after this time", null=True, verbose_name='Expires on'),
- ),
- migrations.AddField(
- model_name='playlist',
- name='gen_description',
- field=models.BooleanField(default=True, help_text='If checked, the description will be automatically generated from content. Uncheck if you want to manually set a custom description.', verbose_name='Generate description'),
- ),
- migrations.AddField(
- model_name='playlist',
- name='in_sitemap',
- field=models.BooleanField(default=True, verbose_name='Show in sitemap'),
- ),
- migrations.AddField(
- model_name='playlist',
- name='keywords_string',
- field=models.CharField(blank=True, editable=False, max_length=500),
- ),
- migrations.AddField(
- model_name='playlist',
- name='publish_date',
- field=models.DateTimeField(blank=True, db_index=True, help_text="With Published chosen, won't be shown until this time", null=True, verbose_name='Published from'),
- ),
- migrations.AddField(
- model_name='playlist',
- name='short_url',
- field=models.URLField(blank=True, null=True),
- ),
- migrations.AddField(
- model_name='playlist',
- name='status',
- field=models.IntegerField(choices=[(1, 'Draft'), (2, 'Published')], default=2, help_text='With Draft chosen, will only be shown for admin users on the site.', verbose_name='Status'),
- ),
- migrations.AddField(
- model_name='playlist',
- name='type',
- field=models.CharField(blank=True, choices=[('audio', 'audio'), ('video', 'video')], max_length=32, null=True, verbose_name='type'),
- ),
- migrations.AddField(
- model_name='playlist',
- name='updated',
- field=models.DateTimeField(editable=False, null=True),
- ),
- migrations.AlterField(
- model_name='playlist',
- name='description',
- field=models.TextField(blank=True, verbose_name='Description'),
- ),
- migrations.AlterField(
- model_name='playlist',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='Description'),
- ),
- migrations.AlterField(
- model_name='playlist',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='Description'),
- ),
- ]
diff --git a/app/organization/media/migrations/0007_auto_20161013_1631.py b/app/organization/media/migrations/0007_auto_20161013_1631.py
deleted file mode 100644
index dc78de06..00000000
--- a/app/organization/media/migrations/0007_auto_20161013_1631.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-13 14:31
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('sites', '0002_alter_domain_unique'),
- ('organization-pages', '0008_auto_20161013_1631'),
- ('organization-magazine', '0012_auto_20161013_1631'),
- ('organization-media', '0006_auto_20161013_1631'),
- ('organization-network', '0038_auto_20161013_1631'),
- ('organization-projects', '0020_auto_20161013_1631'),
- ('organization-agenda', '0009_auto_20161013_1631'),
- ]
-
- operations = [
- migrations.DeleteModel(
- name='Audio',
- ),
- migrations.DeleteModel(
- name='Video',
- ),
- migrations.AddField(
- model_name='playlistmedia',
- name='media',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='playlists', to='organization-media.Media', verbose_name='media'),
- ),
- migrations.AddField(
- model_name='playlistmedia',
- name='playlist',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medias', to='organization-media.Playlist', verbose_name='playlist'),
- ),
- migrations.AddField(
- model_name='mediatranscoded',
- name='media',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='transcoded', to='organization-media.Media', verbose_name='media'),
- ),
- migrations.AddField(
- model_name='media',
- name='category',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medias', to='organization-media.MediaCategory', verbose_name='category'),
- ),
- migrations.AddField(
- model_name='media',
- name='site',
- field=models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to='sites.Site'),
- ),
- ]
diff --git a/app/organization/media/migrations/0008_auto_20161013_1810.py b/app/organization/media/migrations/0008_auto_20161013_1810.py
deleted file mode 100644
index 11dc94bc..00000000
--- a/app/organization/media/migrations/0008_auto_20161013_1810.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-13 16:10
-from __future__ import unicode_literals
-
-from django.db import migrations
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0007_auto_20161013_1631'),
- ]
-
- operations = [
- migrations.AlterModelOptions(
- name='media',
- options={'ordering': ('created',), 'verbose_name': 'media', 'verbose_name_plural': 'medias'},
- ),
- migrations.RemoveField(
- model_name='media',
- name='created_at',
- ),
- migrations.AlterField(
- model_name='mediatranscoded',
- name='file',
- field=mezzanine.core.fields.FileField(max_length=1024, verbose_name='file'),
- ),
- ]
diff --git a/app/organization/media/migrations/0009_auto_20161013_2353.py b/app/organization/media/migrations/0009_auto_20161013_2353.py
deleted file mode 100644
index 70906f91..00000000
--- a/app/organization/media/migrations/0009_auto_20161013_2353.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-13 21:53
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0008_auto_20161013_1810'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='PlaylistRelated',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('playlist', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization-media.Playlist', verbose_name='playlist')),
- ],
- options={
- 'verbose_name': 'playlist',
- 'verbose_name_plural': 'playlists',
- },
- ),
- migrations.AlterModelOptions(
- name='mediatranscoded',
- options={'verbose_name': 'media file', 'verbose_name_plural': 'media files'},
- ),
- ]
diff --git a/app/organization/media/migrations/0010_auto_20161014_0849.py b/app/organization/media/migrations/0010_auto_20161014_0849.py
deleted file mode 100644
index e0adf327..00000000
--- a/app/organization/media/migrations/0010_auto_20161014_0849.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-14 06:49
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0009_auto_20161013_2353'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='playlist',
- name='type',
- field=models.CharField(choices=[('audio', 'audio'), ('video', 'video')], max_length=32, verbose_name='type'),
- ),
- ]
diff --git a/app/organization/media/migrations/0011_auto_20161014_1136.py b/app/organization/media/migrations/0011_auto_20161014_1136.py
deleted file mode 100644
index f15256f7..00000000
--- a/app/organization/media/migrations/0011_auto_20161014_1136.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-14 09:36
-from __future__ import unicode_literals
-
-from django.db import migrations
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0010_auto_20161014_0849'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='mediatranscoded',
- name='file',
- field=mezzanine.core.fields.FileField(blank=True, max_length=1024, null=True, verbose_name='file'),
- ),
- ]
diff --git a/app/organization/media/migrations/0012_auto_20161028_1812.py b/app/organization/media/migrations/0012_auto_20161028_1812.py
deleted file mode 100644
index 6cee6789..00000000
--- a/app/organization/media/migrations/0012_auto_20161028_1812.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-28 16:12
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0011_auto_20161014_1136'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='playlistrelated',
- name='playlist',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='playlist_related', to='organization-media.Playlist', verbose_name='playlist'),
- ),
- ]
diff --git a/app/organization/media/migrations/0013_mediaimage.py b/app/organization/media/migrations/0013_mediaimage.py
deleted file mode 100644
index da739c05..00000000
--- a/app/organization/media/migrations/0013_mediaimage.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-02-15 10:55
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0012_auto_20161028_1812'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='MediaImage',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('file', mezzanine.core.fields.FileField(max_length=1024, verbose_name='Image')),
- ('credits', models.CharField(blank=True, max_length=256, null=True, verbose_name='credits')),
- ('type', models.CharField(choices=[('logo', 'logo'), ('logo_white', 'logo white'), ('logo_black', 'logo black'), ('logo_header', 'logo header'), ('logo_footer', 'logo footer'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type')),
- ('media', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='images', to='organization-media.Media', verbose_name='media')),
- ],
- options={
- 'verbose_name_plural': 'images',
- 'verbose_name': 'image',
- 'ordering': ('_order',),
- },
- ),
- ]
diff --git a/app/organization/media/migrations/0014_livestreaming.py b/app/organization/media/migrations/0014_livestreaming.py
deleted file mode 100644
index 238adc4c..00000000
--- a/app/organization/media/migrations/0014_livestreaming.py
+++ /dev/null
@@ -1,50 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-03-14 17:28
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('sites', '0002_alter_domain_unique'),
- ('organization-media', '0013_mediaimage'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='LiveStreaming',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('keywords_string', models.CharField(blank=True, editable=False, max_length=500)),
- ('title', models.CharField(max_length=500, verbose_name='Title')),
- ('title_en', models.CharField(max_length=500, null=True, verbose_name='Title')),
- ('title_fr', models.CharField(max_length=500, null=True, verbose_name='Title')),
- ('slug', models.CharField(blank=True, help_text='Leave blank to have the URL auto-generated from the title.', max_length=2000, null=True, verbose_name='URL')),
- ('_meta_title', models.CharField(blank=True, help_text='Optional title to be used in the HTML title tag. If left blank, the main title field will be used.', max_length=500, null=True, verbose_name='Title')),
- ('description', models.TextField(blank=True, verbose_name='Description')),
- ('description_en', models.TextField(blank=True, null=True, verbose_name='Description')),
- ('description_fr', models.TextField(blank=True, null=True, verbose_name='Description')),
- ('gen_description', models.BooleanField(default=True, help_text='If checked, the description will be automatically generated from content. Uncheck if you want to manually set a custom description.', verbose_name='Generate description')),
- ('created', models.DateTimeField(editable=False, null=True)),
- ('updated', models.DateTimeField(editable=False, null=True)),
- ('status', models.IntegerField(choices=[(1, 'Draft'), (2, 'Published')], default=2, help_text='With Draft chosen, will only be shown for admin users on the site.', verbose_name='Status')),
- ('publish_date', models.DateTimeField(blank=True, db_index=True, help_text="With Published chosen, won't be shown until this time", null=True, verbose_name='Published from')),
- ('expiry_date', models.DateTimeField(blank=True, help_text="With Published chosen, won't be shown after this time", null=True, verbose_name='Expires on')),
- ('short_url', models.URLField(blank=True, null=True)),
- ('in_sitemap', models.BooleanField(default=True, verbose_name='Show in sitemap')),
- ('html5_url', models.URLField(blank=True, max_length=1024, verbose_name='html5 url')),
- ('html5_url_en', models.URLField(blank=True, max_length=1024, null=True, verbose_name='html5 url')),
- ('html5_url_fr', models.URLField(blank=True, max_length=1024, null=True, verbose_name='html5 url')),
- ('youtube_id', models.CharField(blank=True, max_length=64, null=True, verbose_name='youtube id')),
- ('type', models.CharField(choices=[('html5', 'html5'), ('youtube', 'youtube')], default='html5', max_length=32, verbose_name='type')),
- ('site', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to='sites.Site')),
- ],
- options={
- 'verbose_name': 'live streaming',
- 'verbose_name_plural': 'live streamings',
- },
- ),
- ]
diff --git a/app/organization/media/migrations/0015_livestreaming_event_location.py b/app/organization/media/migrations/0015_livestreaming_event_location.py
deleted file mode 100644
index 30c0286c..00000000
--- a/app/organization/media/migrations/0015_livestreaming_event_location.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-03-14 18:32
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('mezzanine_agenda', '0017_auto_20170222_1039'),
- ('organization-media', '0014_livestreaming'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='livestreaming',
- name='event_location',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='live_streaming_location', to='mezzanine_agenda.EventLocation', verbose_name='Event Location'),
- ),
- ]
diff --git a/app/organization/media/migrations/__init__.py b/app/organization/media/migrations/__init__.py
deleted file mode 100644
index e69de29b..00000000
diff --git a/app/organization/media/models.py b/app/organization/media/models.py
deleted file mode 100644
index 76de7513..00000000
--- a/app/organization/media/models.py
+++ /dev/null
@@ -1,196 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-
-from pyquery import PyQuery as pq
-
-from django.db import models
-from django.utils.translation import ugettext_lazy as _
-from mezzanine.core.managers import SearchableManager
-from mezzanine.core.models import RichText, Displayable, Slugged
-from mezzanine.core.fields import RichTextField, OrderField, FileField
-from mezzanine.utils.models import AdminThumbMixin, upload_to
-from organization.core.models import *
-from mezzanine_agenda.models import Event, EventLocation
-from django.conf import settings
-import requests
-
-
-MEDIA_BASE_URL = getattr(settings, 'MEDIA_BASE_URL', 'http://medias.ircam.fr/embed/media/')
-
-PLAYLIST_TYPE_CHOICES = [
- ('audio', _('audio')),
- ('video', _('video')),
-]
-
-LIVE_STREAMING_TYPE_CHOICES = [
- ('html5', _('html5')),
- ('youtube', _('youtube')),
-]
-
-
-class Media(Displayable):
- """Media"""
-
- external_id = models.CharField(_('media id'), max_length=128)
- poster_url = models.URLField(_('poster'), max_length=1024, blank=True)
- category = models.ForeignKey('MediaCategory', verbose_name=_('category'), related_name='medias', blank=True, null=True, on_delete=models.SET_NULL)
-
- # objects = SearchableManager()
- # search_fields = ("title",)
-
- class Meta:
- verbose_name = "media"
- verbose_name_plural = "medias"
- ordering = ('created',)
-
- def __str__(self):
- return self.title
-
- def get_absolute_url(self):
- return reverse("organization-media-detail", kwargs={"type": self.type, "slug": self.slug})
-
- @property
- def uri(self):
- return MEDIA_BASE_URL + self.external_id
-
- def get_html(self):
- r = requests.get(self.uri)
- return r.content
-
- @property
- def type(self):
- for transcoded in self.transcoded.all():
- if 'video' in transcoded.mime_type:
- return 'video'
- if 'audio' in transcoded.mime_type:
- return 'audio'
-
- def save(self, *args, **kwargs):
- q = pq(self.get_html())
- sources = q('source')
- video = q('video')
- if len(video):
- if 'poster' in video[0].attrib.keys():
- self.poster_url = video[0].attrib['poster']
-
- super(Media, self).save(*args, **kwargs)
-
- for source in sources:
- mime_type = source.attrib['type']
- transcoded, c = MediaTranscoded.objects.get_or_create(media=self, mime_type=mime_type)
- transcoded.url = source.attrib['src']
- transcoded.save()
-
-
-class MediaTranscoded(models.Model):
-
- media = models.ForeignKey('Media', verbose_name=_('media'), related_name='transcoded')
- file = FileField(_("file"), max_length=1024, upload_to="uploads/media/", blank=True, null=True)
- url = models.URLField(_('URL'), max_length=1024, blank=True)
- mime_type = models.CharField(_('mime type'), max_length=64)
-
- preferred_mime_type = ['video/webm', 'audio/ogg']
-
- class Meta:
- verbose_name = "media file"
- verbose_name_plural = "media files"
-
- def __str__(self):
- return self.url
-
-
-class MediaImage(Image):
-
- media = models.ForeignKey(Media, verbose_name=_('media'), related_name='images', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _("image")
- verbose_name_plural = _("images")
- order_with_respect_to = "media"
-
-
-class MediaCategory(Slugged, Description):
- """Media Category"""
-
- class Meta:
- verbose_name = _('media category')
- verbose_name_plural = _('media categories')
-
- def count(self):
- return self.medias.published().count()+1
-
-
-class Playlist(Displayable):
- """Playlist"""
-
- type = models.CharField(_('type'), max_length=32, choices=PLAYLIST_TYPE_CHOICES)
-
- class Meta:
- verbose_name = _('playlist')
- verbose_name_plural = _('playlists')
-
- def __str__(self):
- return ' '.join((self.title, '(' + self.type + ')'))
-
- def get_absolute_url(self):
- return reverse("organization-playlist-detail", kwargs={"slug": self.slug})
-
-
-class PlaylistMedia(models.Model):
- """Playlist media"""
-
- playlist = models.ForeignKey(Playlist, verbose_name=_('playlist'), related_name='medias', blank=True, null=True, on_delete=models.SET_NULL)
- media = models.ForeignKey(Media, verbose_name=_('media'), related_name='playlists', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _('media')
- verbose_name_plural = _('medias')
-
-
-class PlaylistRelated(models.Model):
- """Playlist inline"""
-
- playlist = models.ForeignKey(Playlist, verbose_name=_('playlist'), related_name='playlist_related', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _('playlist')
- verbose_name_plural = _('playlists')
-
-
-class LiveStreaming(Displayable):
- """Live streaming"""
-
- html5_url = models.URLField(_('html5 url'), max_length=1024, blank=True)
- youtube_id = models.CharField(_('youtube id'), max_length=64, blank=True, null=True)
- type = models.CharField(_('type'), max_length=32, choices=LIVE_STREAMING_TYPE_CHOICES, default='html5')
- event_location = models.ForeignKey(EventLocation, verbose_name=_('Event Location'), related_name='live_streaming_location', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = "live streaming"
- verbose_name_plural = "live streamings"
-
- def __str__(self):
- return self.title
-
- def get_absolute_url(self):
- return reverse("organization-streaming-detail", kwargs={"slug": self.slug, "type" : self.type})
diff --git a/app/organization/media/templatetags/media_tags.py b/app/organization/media/templatetags/media_tags.py
deleted file mode 100644
index cda0f360..00000000
--- a/app/organization/media/templatetags/media_tags.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-# -*- coding: utf-8 -*-
-from mezzanine.template import Library
-
-register = Library()
-
-@register.filter
-def get_photo_alignment(value):
- if value == 'left':
- return 0
- elif value == 'center':
- return 0.5
- return 1
diff --git a/app/organization/media/tests.py b/app/organization/media/tests.py
deleted file mode 100644
index fa8859d7..00000000
--- a/app/organization/media/tests.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.test import TestCase
-
-# Create your tests here.
diff --git a/app/organization/media/translation.py b/app/organization/media/translation.py
deleted file mode 100644
index 55f0bff2..00000000
--- a/app/organization/media/translation.py
+++ /dev/null
@@ -1,66 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from modeltranslation.translator import translator, register, TranslationOptions
-
-from organization.media.models import *
-
-
-@register(Media)
-class MediaTranslationOptions(TranslationOptions):
-
- fields = ('title', 'description',)
-
-
-@register(MediaTranscoded)
-class MediaTranscodedTranslationOptions(TranslationOptions):
-
- fields = ()
-
-
-@register(Playlist)
-class PlaylistTranslationOptions(TranslationOptions):
-
- fields = ('title', 'description',)
-
-
-@register(PlaylistMedia)
-class PlaylistMediaTranslationOptions(TranslationOptions):
-
- fields = ()
-
-
-@register(MediaCategory)
-class MediaCategoryTranslationOptions(TranslationOptions):
-
- fields = ('title', 'description',)
-
-
-@register(MediaImage)
-class MediaImageTranslationOptions(TranslationOptions):
-
- fields = ()
-
-
-@register(LiveStreaming)
-class LiveStreamingTranslationOptions(TranslationOptions):
-
- fields = ('title', 'description', 'html5_url')
diff --git a/app/organization/media/urls.py b/app/organization/media/urls.py
deleted file mode 100644
index 6991b2fe..00000000
--- a/app/organization/media/urls.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-
-import django.views.i18n
-from django.conf.urls import patterns, include, url
-from django.conf.urls.i18n import i18n_patterns
-from django.contrib.auth.decorators import permission_required
-
-from mezzanine.core.views import direct_to_template
-from mezzanine.conf import settings
-
-from organization.media.views import *
-
-
-urlpatterns = [
- url("^medias/(?P.*)/(?P.*)/detail/$", MediaDetailView.as_view(), name="organization-media-detail"),
- url("^medias/(?P.*)/(?P.*)/overlay/$", MediaOverlayView.as_view(), name="organization-media-overlay"),
- url("^playlists/(?P.*)/detail/$", PlaylistDetailView.as_view(), name="organization-playlist-detail"),
- url("^playlists/list/$", PlaylistListView.as_view(), name="organization-playlist-list"),
- url("^playlists/list/(?P.*)$", PlaylistListView.as_view(), name="organization-playlist-list"),
- url("^playlists/overlay/(?P.*)/$", PlaylistOverlayView.as_view(), name="organization-playlist-overlay"),
- url("^playlist-media-autocomplete/$", permission_required('playlist.can_edit')(PlayListMediaView.as_view()), name='media-autocomplete'),
- url("^streams/(?P.*)/(?P.*)/detail/$", LiveStreamingDetailView.as_view(), name="organization-streaming-detail"),
-]
diff --git a/app/organization/media/views.py b/app/organization/media/views.py
deleted file mode 100644
index 601b2619..00000000
--- a/app/organization/media/views.py
+++ /dev/null
@@ -1,168 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-import json
-from django.shortcuts import render
-from collections import defaultdict
-from organization.media.models import *
-from organization.core.views import *
-from dal import autocomplete
-from django.core.exceptions import FieldDoesNotExist
-from datetime import datetime
-from django.db.models import Q
-
-# temporarily excluse not ready models
-EXCLUDED_MODELS = ("organizationplaylist", "personplaylist")
-
-
-class MediaDetailView(SlugMixin, DetailView):
-
- model = Media
- context_object_name = 'media'
-
- def get_template_names(self):
- templates = super(MediaDetailView, self).get_template_names()
- templates.insert(0,'media/'+self.kwargs['type'].lower()+'/'+self.kwargs['type'].lower()+'_detail.html')
- return templates
-
-
-class PlaylistDetailView(SlugMixin, DetailView):
-
- model = Playlist
- template_name='media/playlist_detail.html'
- context_object_name = 'playlist'
- def get_context_data(self, **kwargs):
- context = super(PlaylistDetailView, self).get_context_data(**kwargs)
- self.related_objects = []
- self.concrete_objects = []
- related_model = PlaylistRelated._meta.get_fields()
- related_playlist = self.object.playlist_related.all()
-
- # get dynamically related objects like articleplaylist, projectplaylist, eventplaylist etc....
- for rm in related_model:
- if rm.name not in EXCLUDED_MODELS :
- for rp in related_playlist:
- if hasattr(rp, rm.name):
- self.related_objects.append(getattr(rp, rm.name))
-
- # get dynamically related instance of related objects. Example: articleplaylist => article
- for ro in self.related_objects:
- if not isinstance(ro, int) and ro != self.object:
- for c_field in ro._meta.get_fields():
- if hasattr(ro, c_field.name):
- attr = getattr(ro, c_field.name)
- if not isinstance(attr, int) and attr != self.object and not isinstance(attr, PlaylistRelated):
- self.concrete_objects.append(attr)
-
- context['concrete_objects'] = self.concrete_objects
- return context
-
-
-class PlaylistListView(ListView):
-
- model = Playlist
- template_name='media/playlist_list.html'
- context_object_name = 'playlists'
-
- def get_queryset(self):
- self.qs = Playlist.objects.all()
- self.current_type = None
- if "type" in self.kwargs:
- self.qs = self.qs.filter(type=self.kwargs['type'])
- self.current_type = self.kwargs['type']
- return self.qs
-
- def get_context_data(self, **kwargs):
- context = super(PlaylistListView, self).get_context_data(**kwargs)
-
- context['playlists'] = paginate(self.qs, self.request.GET.get("page", 1),
- settings.MEDIA_PER_PAGE,
- settings.MAX_PAGING_LINKS)
-
- context['current_type'] = self.current_type
- return context
-
-
-class PlayListMediaView(autocomplete.Select2QuerySetView):
-
- def get_queryset(self):
- qs = Media.objects.all()
- media_title = self.forwarded.get('title', None)
- if media_title:
- qs = qs.filter(title=media_title)
- if self.q:
- qs = qs.filter(title__istartswith=self.q)
- return qs
-
-
-class MediaOverlayView(SlugMixin, DetailView):
-
- model = Media
- template_name='media/media/media_overlay.html'
- context_object_name = 'media'
-
- def get_template_names(self):
- templates = super(MediaOverlayView, self).get_template_names()
- templates.insert(0,'media/'+self.object.type.lower()+'/'+self.object.type.lower()+'_overlay.html')
- return templates
-
-
-class PlaylistOverlayView(SlugMixin, DetailView):
-
- model = Playlist
- template_name='media/playlist_overlay.html'
- context_object_name = 'playlist'
-
-
-class LiveStreamingDetailView(SlugMixin, DetailView):
-
- model = LiveStreaming
- template_name='media/live_streaming/live_streaming_detail.html'
-
- def get_context_data(self, **kwargs):
- context = super(LiveStreamingDetailView, self).get_context_data(**kwargs)
-
- # check type choices
- type_choices = []
- for st in LIVE_STREAMING_TYPE_CHOICES:
- type_choices.append(st[0])
- if not self.kwargs['type'] in type_choices:
- context['type'] = "html5"
- else :
- context['type'] = self.kwargs['type']
-
- # slug
- context['slug'] = self.object.slug
-
- # event data
- all_events = Event.objects.filter(location=self.object.event_location).filter(end__gte=datetime.now()).order_by('start')
-
- events_data = {}
- counter = 0
- curr_event_index = len(all_events)
- for event in all_events:
- events_data[counter] = {}
- events_data[counter]['title'] = event.title
- events_data[counter]['begin'] = event.start.isoformat()
- events_data[counter]['end'] = event.end.isoformat()
- counter += 1
-
- context['json_event'] = json.dumps(events_data)
- return context
diff --git a/app/organization/network/__init__.py b/app/organization/network/__init__.py
deleted file mode 100644
index d178d67c..00000000
--- a/app/organization/network/__init__.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-"""
-Provides abstract models and admin features used throughout the various
-Mezzanine apps.
-"""
-from __future__ import unicode_literals
-
-from mezzanine import __version__ # noqa
-
-
-default_app_config = 'organization.network.apps.NetworkConfig'
diff --git a/app/organization/network/admin.py b/app/organization/network/admin.py
deleted file mode 100644
index 4d1d8857..00000000
--- a/app/organization/network/admin.py
+++ /dev/null
@@ -1,331 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.contrib import admin
-from django import forms
-from django.http import HttpResponse
-from copy import deepcopy
-from dal import autocomplete
-from dal_select2_queryset_sequence.views import Select2QuerySetSequenceView
-from mezzanine.core.admin import *
-from mezzanine.pages.admin import PageAdmin
-from organization.network.models import *
-from organization.network.forms import *
-from organization.pages.models import *
-from organization.core.admin import *
-from organization.pages.admin import PageImageInline, PageBlockInline, PagePlaylistInline, DynamicContentPageInline, PageRelatedTitleAdmin
-from organization.shop.models import PageProductList
-from organization.network.utils import TimesheetXLS, set_timesheets_validation_date
-
-
-class OrganizationAdminInline(StackedDynamicInlineAdmin):
-
- model = OrganizationLinkedInline
- form = OrganizationLinkedForm
-
-
-class OrganizationLinkedAdmin(BaseTranslationOrderedModelAdmin):
-
- inlines = (OrganizationAdminInline,)
- first_fields = ['name',]
-
- class Media:
- js = (
- static("mezzanine/js/admin/dynamic_inline.js"),
- )
-
-
-class OrganizationLinkedBlockInlineAdmin(StackedDynamicInlineAdmin):
-
- model = OrganizationLinkedBlockInline
- form = OrganizationLinkedListForm
-
-
-class OrganizationPlaylistInline(TabularDynamicInlineAdmin):
-
- model = OrganizationPlaylist
-
-
-class OrganizationLinkInline(StackedDynamicInlineAdmin):
-
- model = OrganizationLink
-
-
-class OrganizationImageInline(TabularDynamicInlineAdmin):
-
- model = OrganizationImage
-
-
-class OrganizationUserImageInline(TabularDynamicInlineAdmin):
-
- model = OrganizationUserImage
-
-
-class OrganizationBlockInline(StackedDynamicInlineAdmin):
-
- model = OrganizationBlock
-
-
-class OrganizationServiceInline(StackedDynamicInlineAdmin):
-
- model = OrganizationService
-
-
-class OrganizationAdmin(BaseTranslationOrderedModelAdmin):
-
- model = Organization
- inlines = [ OrganizationServiceInline,
- OrganizationPlaylistInline,
- OrganizationImageInline,
- OrganizationBlockInline,
- OrganizationLinkInline,
- OrganizationLinkedBlockInlineAdmin
- ]
- list_display = ['name', 'type', 'admin_thumb']
- list_filter = ['is_on_map', 'type']
- search_fields = ['name',]
- first_fields = ['name',]
-
-
-
-class PageProductListInline(TabularDynamicInlineAdmin):
-
- model = PageProductList
-
-
-class DepartmentPageAdmin(PageAdmin):
-
- inlines = [PageImageInline, PageBlockInline, PagePlaylistInline, PageProductListInline, ]
-
-
-class DepartmentAdmin(BaseTranslationModelAdmin):
-
- model = Department
-
-
-class TeamLinkInline(StackedDynamicInlineAdmin):
-
- model = TeamLink
-
-
-class TeamAdmin(BaseTranslationModelAdmin):
-
- model = Team
- search_fields = ['name', 'code']
- list_filter = ['department']
- list_display = ['name', 'department', 'code']
- inlines = [TeamLinkInline,]
-
-
-class TeamPageAdmin(PageAdmin):
-
- inlines = [PageImageInline, PageBlockInline, PagePlaylistInline,
- PageProductListInline, PageRelatedTitleAdmin, DynamicContentPageInline]
-
-
-class PersonAdminBase(BaseTranslationModelAdmin):
-
- model = Person
-
-
-class ActivityWeeklyHourVolumeAdmin(BaseTranslationModelAdmin):
-
- model = ActivityWeeklyHourVolume
-
-
-class PersonActivityInline(StackedDynamicInlineAdmin):
-
- model = PersonActivity
- fk_name = 'person'
- filter_horizontal = ['organizations', 'employers', 'teams',
- 'projects', 'supervisors', 'phd_directors', ]
-
-
-class PersonPlaylistInline(TabularDynamicInlineAdmin):
-
- model = PersonPlaylist
-
-
-class PersonLinkInline(StackedDynamicInlineAdmin):
-
- model = PersonLink
-
-
-class PersonImageInline(TabularDynamicInlineAdmin):
-
- model = PersonImage
-
-
-class PersonFileInline(TabularDynamicInlineAdmin):
-
- model = PersonFile
-
-
-class PersonBlockInline(StackedDynamicInlineAdmin):
-
- model = PersonBlock
-
-
-class PersonAdmin(BaseTranslationOrderedModelAdmin):
-
- model = Person
- inlines = [PersonImageInline,
- PersonBlockInline,
- PersonPlaylistInline,
- PersonLinkInline,
- PersonFileInline,
- PersonActivityInline,]
- first_fields = ['last_name', 'first_name', 'title', 'gender', 'user']
- search_fields = ['last_name', 'first_name']
- list_display = [ 'last_name', 'first_name', 'register_id', 'external_id', 'email', 'last_weekly_hour_volume', 'gender', 'created']
- list_filter = ['person_title', 'activities__date_from', 'activities__date_to',
- 'activities__is_permanent', 'activities__framework', 'activities__grade',
- 'activities__status', 'activities__teams', 'activities__projects',
- 'activities__weekly_hour_volume', null_filter('register_id'), null_filter('external_id')]
-
- def last_weekly_hour_volume(self, instance):
- last_activity = instance.activities.first()
- weekly_hour_volume = '-'
- if hasattr(last_activity, 'weekly_hour_volume'):
- if last_activity.weekly_hour_volume.__str__() != 'None':
- weekly_hour_volume = last_activity.weekly_hour_volume.__str__()
- return weekly_hour_volume
-
-
-class PersonActivityAdmin(BaseTranslationModelAdmin):
-
- model = PersonActivity
- list_display = ['person', 'get_teams', 'status', 'date_from', 'date_to']
- filter_horizontal = ['organizations', 'employers', 'teams', 'projects',
- 'supervisors', 'phd_directors', ]
- search_fields = ['person__title',]
- list_filter = [ 'date_from', 'date_to',
- 'is_permanent', 'framework', 'grade',
- 'status', 'teams', 'projects']
-
- def get_teams(self, instance):
- values = []
- for team in instance.teams.all():
- values.append(team.code)
- return ' - '.join(values)
-
-
-class PersonListBlockInlineAdmin(TabularDynamicInlineAdmin):
-
- model = PersonListBlockInline
- form = PersonListBlockInlineForm
-
-
-class PersonListBlockAdmin(admin.ModelAdmin):
-
- inlines = [PersonListBlockInlineAdmin,]
- list_display = ['title', 'description', 'date_created', 'date_modified']
-
-
-class ActivityFunctionAdmin(BaseTranslationModelAdmin):
-
- model = ActivityFunction
-
-
-class ActivityGradeAdmin(BaseTranslationModelAdmin):
-
- model = ActivityGrade
-
-
-class ActivityFrameworkAdmin(BaseTranslationModelAdmin):
-
- model = ActivityFramework
-
-
-class ActivityStatusAdmin(BaseTranslationModelAdmin):
-
- model = ActivityStatus
-
-
-class TrainingTypeAdmin(BaseTranslationModelAdmin):
-
- model = TrainingType
-
-
-class TrainingLevelAdmin(BaseTranslationModelAdmin):
-
- model = TrainingLevel
-
-
-
-class TrainingSpecialityAdmin(BaseTranslationModelAdmin):
-
- model = TrainingSpeciality
-
-
-class TrainingTopicAdmin(BaseTranslationModelAdmin):
-
- model = TrainingTopic
-
-
-class PersonActivityTimeSheetAdmin(BaseTranslationOrderedModelAdmin):
- model = PersonActivityTimeSheet
- search_fields = ['year', 'month', 'activity__person__last_name', "project__title"]
- list_display = ['person', 'activity', 'year', 'month', 'project', 'work_package', 'percentage', 'accounting', 'validation']
- list_filter = ['activity__person', 'year', 'month', 'project']
- actions = ['export_xls', 'validate_timesheets']
-
-
- def person(self, instance):
- return instance.activity.person
-
- def work_package(self, instance):
- wk_list = [str(wk.number) for wk in instance.work_packages.all()]
- return ",".join(wk_list)
-
- def export_xls(self, request, queryset):
- if request.GET.get('year') :
- xls = TimesheetXLS(queryset, request.GET.get('year'))
- else :
- xls = TimesheetXLS(queryset)
- return xls.write()
-
- def validate_timesheets(self, request, queryset):
- set_timesheets_validation_date(queryset)
-
- export_xls.short_description = "Export person timesheets"
-
-
-admin.site.register(OrganizationLinked, OrganizationLinkedAdmin)
-admin.site.register(Organization, OrganizationAdmin)
-admin.site.register(OrganizationType)
-admin.site.register(Department, DepartmentAdmin)
-admin.site.register(DepartmentPage, DepartmentPageAdmin)
-admin.site.register(Team, TeamAdmin)
-admin.site.register(TeamPage, TeamPageAdmin)
-admin.site.register(Person, PersonAdmin)
-admin.site.register(PersonListBlock, PersonListBlockAdmin)
-admin.site.register(PersonActivity, PersonActivityAdmin)
-admin.site.register(ActivityStatus, ActivityStatusAdmin)
-admin.site.register(ActivityGrade, ActivityGradeAdmin)
-admin.site.register(ActivityFramework, ActivityFrameworkAdmin)
-admin.site.register(ActivityFunction, ActivityFunctionAdmin)
-admin.site.register(ActivityWeeklyHourVolume, ActivityWeeklyHourVolumeAdmin)
-admin.site.register(TrainingType, TrainingTypeAdmin)
-admin.site.register(TrainingLevel, TrainingLevelAdmin)
-admin.site.register(TrainingTopic, TrainingTopicAdmin)
-admin.site.register(TrainingSpeciality, TrainingSpecialityAdmin)
-admin.site.register(PersonActivityTimeSheet, PersonActivityTimeSheetAdmin)
diff --git a/app/organization/network/api.py b/app/organization/network/api.py
deleted file mode 100644
index 2261991f..00000000
--- a/app/organization/network/api.py
+++ /dev/null
@@ -1,124 +0,0 @@
-# Figgo API consumption
-
-import requests
-import time
-from django.conf import settings
-from datetime import date, timedelta
-import dateutil.parser
-from pprint import pprint
-
-WEEK_DAYS = {
- 1:'monday',
- 2:'tuesday',
- 3:'wednesday',
- 4:'thursday',
- 5:'friday'
-}
-
-def figgo_request(method):
- """generic method to call Figgo API"""
- return requests.get(settings.FIGGO_API_URL_PROD+method, headers={'Authorization': settings.FIGGO_API_HEADER_AUTH})
-
-
-def get_active_persons():
- r_p_active = figgo_request('api/users?fields=id,lastname,firstname')
- r_p_active = r_p_active.json()
- return r_p_active['data'] if 'data' in r_p_active else {}
-
-
-def get_inactive_persons():
- yesterday = date.today() - timedelta(1)
- yesterday = yesterday.isoformat()
- r_p_inactive = figgo_request('api/users?dtContractEnd=until,'+yesterday+',null&fields=id,lastname,firstname')
- r_p_inactive = r_p_inactive.json()
- return r_p_inactive['data'] if 'data' in r_p_inactive else {}
-
-
-def get_leave_periods(date_from, date_to, person_external_id):
- leave_periods = figgo_request('api/leaves?date=between,'+str(date_from)+','+str(date_to)+'&fields=owner.name,owner.login,owner.mail,owner.matricule,duration,name,date,status,leaveScope&owner.id='+str(person_external_id))
- leave_periods = leave_periods.json()
-
- return leave_periods['data'] if 'data' in leave_periods else {}
-
-
-def get_leave_days(date_from, date_to, person_external_id):
- """Calculate the number of validated leaving days.
- It takes in account half days.
- Return a dictionary of half days not worked in a week.
- Example :
- {
- "wednesday_am": 2,
- "monday_pm": 1,
- "friday_am": 2,
- "thursday_am": 3,
- }
- """
- leave_periods = get_leave_periods(date_from, date_to, person_external_id)
- days_dict = {}
- for leave_period in leave_periods:
- # if leave period has been validated
- if leave_period['status'] == 1:
- day_week = dateutil.parser.parse(leave_period['date']).isoweekday()
- # morning or evening
- if leave_period['leaveScope'] == 'PM' or leave_period['leaveScope'] == 'AM':
- key = WEEK_DAYS[day_week]+"_"+leave_period['leaveScope'].lower()
- days_dict = increment_day(key, days_dict)
- # whole day = morning + evening
- if leave_period['leaveScope'] == 'ALL':
- key_am = WEEK_DAYS[day_week]+"_am"
- days_dict = increment_day(key_am, days_dict)
- key_pm = WEEK_DAYS[day_week]+"_pm"
- days_dict = increment_day(key_pm, days_dict)
- return days_dict
-
-
-def get_leave_days_per_month(date_from, date_to, person_external_id):
- """Calculate the number of validated leaving days.
- It takes in account half days.
- Return a dictionary of half days not worked in a week.
- Example :
- {
- "wednesday_am": 2,
- "monday_pm": 1,
- "friday_am": 2,
- "thursday_am": 3,
- }
- """
- leave_periods = get_leave_periods(date_from, date_to, person_external_id)
- days_dict = {}
- for leave_period in leave_periods:
- leave_date = dateutil.parser.parse(leave_period['date'])
- month_key = leave_date.month
- # if leave period has been validated
- if leave_period['status'] == 1:
- day_week = dateutil.parser.parse(leave_period['date']).isoweekday()
- # morning or evening
- if leave_period['leaveScope'] == 'PM' or leave_period['leaveScope'] == 'AM':
- day_key = WEEK_DAYS[day_week]+"_"+leave_period['leaveScope'].lower()
- days_dict = increment_day_per_month(month_key, day_key, days_dict)
- # whole day = morning + evening
- if leave_period['leaveScope'] == 'ALL':
- key_am = WEEK_DAYS[day_week]+"_am"
- days_dict = increment_day_per_month(month_key, key_am, days_dict)
- key_pm = WEEK_DAYS[day_week]+"_pm"
- days_dict = increment_day_per_month(month_key, key_pm, days_dict)
- return days_dict
-
-
-def increment_day_per_month(month_key, day_key, dt):
- if month_key in dt:
- if day_key in dt[month_key]:
- dt[month_key][day_key] += 1
- else :
- dt[month_key][day_key] = 1
- else :
- dt[month_key] = {}
- dt[month_key][day_key] = 1
- return dt
-
-
-def increment_day(key, dt):
- if key in dt:
- dt[key] += 1
- else :
- dt[key] = 1
diff --git a/app/organization/network/apps.py b/app/organization/network/apps.py
deleted file mode 100644
index 949bb266..00000000
--- a/app/organization/network/apps.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-
-from django.apps import AppConfig
-
-
-class NetworkConfig(AppConfig):
-
- name = 'organization.network'
- label = 'organization-network'
diff --git a/app/organization/network/forms.py b/app/organization/network/forms.py
deleted file mode 100644
index 61aafeac..00000000
--- a/app/organization/network/forms.py
+++ /dev/null
@@ -1,99 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.utils import timezone
-from dal import autocomplete
-import dal_queryset_sequence
-import dal_select2_queryset_sequence
-from django import forms
-from django.forms.widgets import HiddenInput
-from django.forms import ModelForm
-from mezzanine.core.models import Orderable
-from organization.network.models import (Person,
- PersonListBlock,
- PersonListBlockInline,
- PageCustomPersonListBlockInline,
- OrganizationLinked,
- OrganizationLinkedInline,
- OrganizationLinkedBlockInline,
- Organization,
- PersonActivityTimeSheet)
-from organization.pages.models import Page, CustomPage
-
-
-class PageCustomPersonListForm(forms.ModelForm):
-
- person_list_block = forms.ModelChoiceField(
- queryset=PersonListBlock.objects.all(),
- widget=autocomplete.ModelSelect2(url='person-list-block-autocomplete')
- )
-
- class Meta:
- model = PageCustomPersonListBlockInline
- fields = ('person_list_block',)
-
-
-class PersonListBlockInlineForm(forms.ModelForm):
-
- person = forms.ModelChoiceField(
- queryset=Person.objects.all(),
- widget=autocomplete.ModelSelect2(url='person-autocomplete')
- )
-
- class Meta:
- model = PersonListBlockInline
- fields = ('__all__')
-
-
-class OrganizationLinkedListForm(forms.ModelForm):
-
- organization_linked = forms.ModelChoiceField(
- queryset=OrganizationLinked.objects.all(),
- widget=autocomplete.ModelSelect2(url='organization-linked-list-autocomplete')
- )
-
- class Meta:
- model = OrganizationLinkedBlockInline
- fields = ('organization_linked',)
-
-
-class OrganizationLinkedForm(forms.ModelForm):
-
- organization = forms.ModelChoiceField(
- queryset=Organization.objects.all(),
- widget=autocomplete.ModelSelect2(url='organization-linked-autocomplete')
- )
-
- class Meta:
- model = OrganizationLinkedInline
- fields = ('organization',)
-
-
-class PersonActivityTimeSheetForm(forms.ModelForm):
-
- def save(self):
- self.instance.accounting = timezone.now()
- super(PersonActivityTimeSheetForm, self).save()
-
- class Meta:
- model = PersonActivityTimeSheet
- fields = ('__all__')
- exclude = ['accounting', 'validation']
diff --git a/app/organization/network/management/commands/create-default-organization.py b/app/organization/network/management/commands/create-default-organization.py
deleted file mode 100644
index c0590ee5..00000000
--- a/app/organization/network/management/commands/create-default-organization.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from optparse import make_option
-from django.conf import settings
-from django.core.management.base import BaseCommand, CommandError
-from django.contrib.auth.models import User
-from organization.network.models import Organization
-
-
-class Command(BaseCommand):
- help = "Create a default organization if it doesn't exist."
-
- name = 'Default Organization'
-
- def handle(self, *args, **options):
- organizations = Organization.objects.filter(is_host=True)
- if not organizations:
- organization = Organization(name=self.name, is_host=True)
- organization.save()
- print('Default organization created')
diff --git a/app/organization/network/management/commands/export-ircam-timesheet-xls.py b/app/organization/network/management/commands/export-ircam-timesheet-xls.py
deleted file mode 100644
index 93a813aa..00000000
--- a/app/organization/network/management/commands/export-ircam-timesheet-xls.py
+++ /dev/null
@@ -1,232 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-import os
-import sys
-import csv
-import logging
-import datetime
-from optparse import make_option
-import xlrd
-from itertools import takewhile
-from re import findall
-import dateutil.parser
-# from string import split
-from django.conf import settings
-from django.core.management.base import BaseCommand, CommandError
-from django.contrib.auth.models import User
-from django.db.models import Q
-
-from organization.core.models import *
-from organization.network.models import *
-from organization.projects.models import *
-
-
-class Logger:
-
- def __init__(self, file):
- self.logger = logging.getLogger('myapp')
- self.hdlr = logging.FileHandler(file)
- self.formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s')
- self.hdlr.setFormatter(self.formatter)
- self.logger.addHandler(self.hdlr)
- self.logger.setLevel(logging.INFO)
-
- def info(self, prefix, message):
- self.logger.info(' ' + prefix + ' : ' + message)
-
- def error(self, prefix, message):
- self.logger.error(prefix + ' : ' + message)
-
-
-class IrcamXLS:
-
- def __init__(self, file):
- self.book = xlrd.open_workbook(file)
- self.sheets = self.book.sheets()
-
-
-class IrcamTimeSheet(object):
-
- def __init__(self, person, date_from, date_to):
- self.person = person
- self.date_from = date_from
- self.date_to = date_to
-
- def set_person_activity_timesheet(self,
- activity,
- project,
- percentage,
- month,
- year):
- """ Set for a year percentage worked by month
- on a project
- """
- pats = PersonActivityTimeSheet.objects.get_or_create(activity = activity,
- project = project,
- percentage = percentage,
- month = month,
- year = year
- )
-
-
- def set_work_package(self, person_activity_timesheet):
- """ set contract id of the project """
-
-
-class Command(BaseCommand):
- help = """Import Person data from IRCAM's legacy XLS management file.
- python manage.py import-ircam-timesheet-xls -s /srv/backup/TemplateInputTimeSheet2015-16.xlsx
- """
-
- option_list = BaseCommand.option_list + (
- make_option('-d', '--dry-run',
- action='store_true',
- dest='dry-run',
- help='Do NOT write anything'),
- make_option('-f', '--force',
- action='store_true',
- dest='force',
- help='Force overwrite data'),
- make_option('-s', '--source',
- dest='source_file',
- help='define the XLS source file'),
- make_option('-l', '--log',
- dest='log',
- help='define log file'),
- )
-
- def handle(self, *args, **kwargs):
- self.logger = Logger(kwargs.get('log'))
- self.pattern = kwargs.get('pattern')
- self.source_file = os.path.abspath(kwargs.get('source_file'))
- self.dry_run = kwargs.get('dry-run')
- self.force = kwargs.get('force')
-
- xls = IrcamXLS(self.source_file)
- for sheet in xls.sheets:
- person_register_id = sheet.cell_value(xls.register_id_row, xls.register_id_col)
- persons = Person.objects.filter(register_id=int(person_register_id))
- processing_counter = 0
- # database not enough clear, possible multiple entries for some persons
- # iterating over one person
- for person in persons:
- period_str = sheet.cell_value(xls.period_row, xls.period_col)
- periods = findall(r'\d{1,2}/\d{1,2}/\d{4}', period_str)
- date_from = dateutil.parser.parse(periods[0])
- date_to = dateutil.parser.parse(periods[1])
- curr_year = date_to.year
-
- self.logger.info('Processing', '******************* PERSON : ' + str(person.id) + ' | '+person.title + " *******************" )
- its = IrcamTimeSheet(person, date_from, date_to)
-
- # iterating on each month
- for col_index in range(xls.first_percent_col, xls.first_percent_col + xls.nb_of_month):
-
- # condition to determine the end of projects list
- end_project_list_row = 0
-
- # get month
- month = int(sheet.cell_value(xls.first_month_row, col_index))
- self.logger.info('Processing', 'year : ' + str(curr_year) + " | month : " + str(month))
-
- # calculate the current date
- curr_date = datetime.date(curr_year, month, 1)
-
- # find the right activities corresponding to the current month / year
- activities = person.activities.filter(Q(date_from__lte=curr_date) & Q(date_to__gte=curr_date))
-
- # for each activities
- for activity in activities :
- # iterating over projects cells
- self.logger.info('Processing', 'activity : ' + str(activity.id) + ' | ' + activity.__str__())
- project_row_index = xls.first_project_row
- while sheet.cell_value(project_row_index, xls.first_project_col) != "Total final":
-
- # get percent
- percent = sheet.cell_value(project_row_index, col_index) if sheet.cell_value(project_row_index, col_index) else 0
-
- # try to find project
- project_id_str = sheet.cell_value(project_row_index, xls.first_project_col - 1)
- if isinstance(project_id_str, float) :
- # by default, numbers are retrived as float
- project_id_str = str(int(project_id_str))
-
- # processing projects
- if end_project_list_row == 0:
- # check if project exists
- project = Project.objects.filter(external_id__icontains=project_id_str).first()
- if project :
- # save timesheet without work packages
- its.set_person_activity_timesheet(activity, project, percent, month, curr_year)
- processing_counter += 1
- else :
- self.logger.info('Not Found', 'project : ' + project_external_id)
-
- # increment index
- project_row_index += 1
-
- # processing work package
- work_package_row_index = project_row_index + 1
- while sheet.cell_value(work_package_row_index, xls.first_project_col) != "Date entrée":
-
- # get project
- project_external_id = int(sheet.cell_value(work_package_row_index, xls.first_project_col - 1))
- project = Project.objects.get(external_id__icontains=str(project_external_id))
-
- # check if project exists
- if project:
- self.logger.info('Processing', 'project : ' + str(project.id) + " | " + project.__str__())
-
- # list all work package
- wk_p_str = sheet.cell_value(work_package_row_index, col_index)
- wk_p_list = wk_p_str.split(",")
-
- # link work packages to timesheet
- for wk_p_num in wk_p_list:
- wk_p_num = str(wk_p_num)
-
- # create or get ProjectWorkPackage
- wk_obj, wk_created = ProjectWorkPackage.objects.get_or_create(title="wk_"+wk_p_num, number=wk_p_num, project=project)
- pat = PersonActivityTimeSheet.objects.filter(activity=activity, project=project, month=month, year=curr_year)
-
- # for each PersonActivityTimeSheet link work package
- for timesheet in pat:
- timesheet.work_packages.add(wk_obj)
- timesheet.save()
-
-
- # increment index
- work_package_row_index += 1
-
- # processing accounting and validation date
- dates_row_index = work_package_row_index
- date_accounting = xlrd.xldate.xldate_as_datetime(sheet.cell_value(dates_row_index, col_index), 1)
- date_validation = xlrd.xldate.xldate_as_datetime(sheet.cell_value(dates_row_index + 1, col_index), 1)
-
- # get all timesheets, function of the activity, month and year
- pats = PersonActivityTimeSheet.objects.filter(activity=activity, month=month, year=curr_year)
- for pat in pats :
- pat.accounting = date_accounting
- pat.validation = date_validation
- pat.save()
-
- self.logger.info('Processing', '_________________________ Number of record : ' + str(processing_counter) + ' _________________________')
diff --git a/app/organization/network/management/commands/import-figgo-id.py b/app/organization/network/management/commands/import-figgo-id.py
deleted file mode 100644
index 63662d53..00000000
--- a/app/organization/network/management/commands/import-figgo-id.py
+++ /dev/null
@@ -1,57 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-import requests
-from optparse import make_option
-from django.conf import settings
-from django.core.management.base import BaseCommand, CommandError
-from organization.network.models import Person
-from organization.network.api import *
-from django.utils.text import slugify
-
-class Command(BaseCommand):
- help = """Import figgo id from api
- python manage.py import-figo-id
- """
- number_of_person = 0
- def handle(self, *args, **options):
- # process active person
- self.update_external_id(get_active_persons())
-
- # process INactive person
- self.update_external_id(get_inactive_persons())
-
- print('***************************************************')
- print("Number of person processed : "+str(self.number_of_person))
- print('***************************************************')
-
- def update_external_id(self, figgo_users):
- for figgo_user in figgo_users:
- slug = slugify(figgo_user['firstName']+'-'+figgo_user['lastName'])
- person = Person.objects.filter(slug__contains=slug)
- if person:
- self.number_of_person += 1
- # persons have sometimes two ids
- for p in person:
- p.external_id = figgo_user['id']
- p.save()
- else :
- print("Person not found: "+figgo_user['lastName']+' '+figgo_user['firstName']+' | manual slug : '+ slug)
diff --git a/app/organization/network/management/commands/import-ircam-matricule.py b/app/organization/network/management/commands/import-ircam-matricule.py
deleted file mode 100644
index 7e650c9c..00000000
--- a/app/organization/network/management/commands/import-ircam-matricule.py
+++ /dev/null
@@ -1,79 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-import os
-import unicodedata
-import xlrd
-from optparse import make_option
-from django.conf import settings
-from django.core.management.base import BaseCommand, CommandError
-from organization.network.models import Person
-from django.utils.text import slugify
-
-
-class Command(BaseCommand):
- help = """Import register id from xlsx file
- python manage.py import-ircam-matricule -s /srv/backup/MatriculesIrcamR\&D_2015-2016.xlsx
- """
- option_list = BaseCommand.option_list + (
- make_option('-s', '--source',
- dest='source_file',
- help='define the XLS source file'),
- )
- number_of_person = 0
- number_of_person_non_processed = 0
-
- def handle(self, *args, **kwargs):
-
- self.source_file = os.path.abspath(kwargs.get('source_file'))
- self.book = xlrd.open_workbook(self.source_file)
- self.sheet = self.book.sheet_by_index(0)
- self.first_row = self.sheet.row(0)
- num_cols = self.sheet.ncols
- for row_idx in range(0, self.sheet.nrows): # Iterate through rows
- cell_id = self.sheet.cell(row_idx, 0).value
- print("cell_id", type(cell_id), cell_id)
- if isinstance(cell_id, float):
- cell_id = str(int(cell_id))
- if isinstance(cell_id, str):
- cell_id = cell_id.strip()
- cell_last_name = self.sheet.cell(row_idx, 1).value
- cell_first_name = self.sheet.cell(row_idx, 2).value
- self.update_register_id(cell_id, cell_last_name, cell_first_name)
-
- print('***************************************************')
- print("Number of person processed : "+str(self.number_of_person))
- print('***************************************************')
- print("Number of person NON processed : "+str(self.number_of_person_non_processed))
- print('***************************************************')
-
- def update_register_id(self, id, last_name, first_name):
- slug = slugify(first_name+'-'+last_name)
- person = Person.objects.filter(slug__contains=slug)
- if person:
- self.number_of_person += 1
- # persons have sometimes two ids
- for p in person:
- p.register_id = id
- p.save()
- else :
- print("Person not found: "+last_name+' '+first_name+' | manual slug : '+ slug)
- self.number_of_person_non_processed += 1
diff --git a/app/organization/network/management/commands/import-ircam-person-xls.py b/app/organization/network/management/commands/import-ircam-person-xls.py
deleted file mode 100644
index 3944d542..00000000
--- a/app/organization/network/management/commands/import-ircam-person-xls.py
+++ /dev/null
@@ -1,292 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-import os
-import sys
-import csv
-import logging
-import datetime
-from optparse import make_option
-import xlrd
-from itertools import takewhile
-
-from django.conf import settings
-from django.core.management.base import BaseCommand, CommandError
-from django.contrib.auth.models import User
-from django.db.models import Q
-
-from organization.core.models import *
-from organization.network.models import *
-from organization.projects.models import *
-
-
-class Logger:
-
- def __init__(self, file):
- self.logger = logging.getLogger('myapp')
- self.hdlr = logging.FileHandler(file)
- self.formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s')
- self.hdlr.setFormatter(self.formatter)
- self.logger.addHandler(self.hdlr)
- self.logger.setLevel(logging.INFO)
-
- def info(self, prefix, message):
- self.logger.info(' ' + prefix + ' : ' + message.decode('utf8'))
-
- def error(self, prefix, message):
- self.logger.error(prefix + ' : ' + message.decode('utf8'))
-
-
-def get_instance(model, field, value):
- models = model.objects.filter(field=value)
- if models:
- return models[0]
- else:
- model = model()
- model.field = value
- return model
-
-
-class IrcamXLS:
-
- sheet_id = 2
- first_row = 20
-
- def __init__(self, file):
- self.book = xlrd.open_workbook(file)
- self.sheet = self.book.sheet_by_index(self.sheet_id)
- self.size = self.column_len(0)
-
- def column_len(self, index):
- col_values = self.sheet.col_values(index)
- col_len = len(col_values)
- for _ in takewhile(lambda x: not x, reversed(col_values)):
- col_len -= 1
- return col_len
-
-class IrcamPerson(object):
-
- organization = Organization.objects.get(name='Ircam')
- spliters = ['/', ',']
-
- def __init__(self, row, datemode):
- self.row = row
- self.datemode = datemode
- last_name = self.row[0].value
- first_name = self.row[1].value
- print(last_name)
- title = ' '.join((first_name, last_name))
-
- self.person, c = Person.objects.get_or_create(title=title, first_name=first_name, last_name=last_name)
- self.activity = PersonActivity(person=self.person)
-
- def set_identity(self, ):
- gender = self.row[2].value
- if gender == 'H':
- self.person.gender = 'male'
- elif gender == 'F':
- self.person.gender = 'female'
-
- birthday = self.row[3].value
- if birthday:
- self.person.birthday = datetime.datetime(*xlrd.xldate_as_tuple(birthday, self.datemode))
-
- # self.person.nationality = self.get_or_create_name(Nationality, self.row[33].value)
-
- self.person.save()
-
- def get_person(self, value):
- if value:
- name_exceptions = ['de', 'von']
-
- names = value.split(' / ')[0]
- names = names.split(' ')
-
- if names[0] == 'M.':
- names.remove('M.')
-
- if names[0] == 'Mm.':
- names.remove('Mm.')
-
- first_name = names[0].capitalize()
-
- last_name = []
- for name in names[1:]:
- if name:
- if name[0] != '(' and not name in name_exceptions:
- last_name.append(name.capitalize())
- last_name = ' '.join(last_name)
-
- title = ' '.join((first_name, last_name))
- print('----' + title)
- person, c = Person.objects.get_or_create(title=title, first_name=first_name, last_name=last_name)
-
- return person
- return None
-
- def get_or_create_name(self, model, column_id):
- value = self.row[column_id].value if self.row[column_id].value else None
- obj = None
- if value:
- try:
- obj, c = model.objects.get_or_create(name=value)
- except:
- obj = model(name=value)
- obj.save()
- return obj
-
- def split_names(self, names):
- name_list = []
- for spliter in self.spliters:
- if spliter in names:
- name_list = names.split(spliter)
- if name_list:
- name_list = map(str.strip, name_list)
- return name_list
- return [names,]
-
- def add_many(self, field, model, column_id, type='name'):
- values = self.row[column_id].value if self.row[column_id].value else None
- if values:
- for value in self.split_names(values):
- if type == 'name':
- qs = Q(name=value) | Q(name=value.lower()) | Q(name=value.upper()) | Q(name=value.capitalize())
- obj = model(name=value)
- elif type == 'code':
- qs = Q(code=value) | Q(code=value.lower()) | Q(code=value.upper()) | Q(code=value.capitalize())
- obj = model(code=value)
- elif type == 'title':
- qs = Q(title=value) | Q(title=value.lower()) | Q(title=value.upper()) | Q(title=value.capitalize())
- obj = model(title=value)
- obj.status = 1
- elif type == 'person':
- obj = self.get_person(value)
- qs = None
- if qs:
- objects = model.objects.filter(qs)
- if objects:
- obj = objects[0]
- else:
- obj.save()
- else:
- obj.save()
- field.add(obj)
-
- def set_activity(self):
- self.activity.date_from = datetime.datetime(*xlrd.xldate_as_tuple(self.row[4].value, self.datemode)) if self.row[4].value else None
- self.activity.date_to = datetime.datetime(*xlrd.xldate_as_tuple(self.row[5].value, self.datemode)) if self.row[5].value else None
- try:
- self.activity.weeks = int(self.row[6].value) if self.row[6].value else None
- except:
- pass
-
- self.activity.status = self.get_or_create_name(ActivityStatus, 10)
- self.activity.is_permanent = True if self.row[11].value else False
- self.activity.framework = self.get_or_create_name(ActivityFramework, 12)
- self.activity.grade = self.get_or_create_name(ActivityGrade, 13)
- self.activity.save()
-
- self.add_many(self.activity.employers, Organization, 14)
- self.add_many(self.activity.organizations, Organization, 15)
- self.add_many(self.activity.employers, Organization, 16)
- self.activity.umr = self.get_or_create_name(UMR, 17)
-
- self.add_many(self.activity.teams, Team, 19, type='code')
- self.add_many(self.activity.teams, Team, 21, type='code')
- self.add_many(self.activity.projects, Project, 22, type='title')
-
- quota = self.row[23].value
- try:
- self.activity.rd_quota_float = float(quota)
- except:
- self.activity.rd_quota_text = str(quota)
-
- self.activity.phd_doctoral_school = self.get_or_create_name(Organization, 25)
- if self.activity.phd_doctoral_school:
- self.activity.phd_doctoral_school.type, c = OrganizationType.objects.get_or_create(name='Ecole doctorale')
- self.activity.phd_doctoral_school.save()
- self.add_many(self.activity.phd_directors, Person, 26, type='person')
- self.add_many(self.activity.supervisors, Person, 27, type='person')
- self.add_many(self.activity.supervisors, Person, 28, type='person')
-
- self.activity.training_type = self.get_or_create_name(TrainingType, 29)
- self.activity.training_level = self.get_or_create_name(TrainingLevel, 30)
- self.activity.training_topic = self.get_or_create_name(TrainingTopic, 31)
- self.activity.training_speciality = self.get_or_create_name(TrainingSpeciality, 32)
- self.activity.function = self.get_or_create_name(ActivityFunction, 34)
-
- if self.activity.phd_directors:
- self.activity.phd_title = self.row[35].value
- try:
- self.activity.phd_defense_date = datetime.datetime(*xlrd.xldate_as_tuple(self.row[38].value, self.datemode)) if self.row[38].value else None
- except:
- pass
- self.activity.phd_post_doctoral_situation = self.row[39].value
- elif self.activity.training_type:
- self.activity.training_title = self.row[35].value
-
- self.activity.rd_program = self.row[36].value
- self.activity.comments = self.row[37].value
- self.activity.hdr = self.row[40].value
- self.activity.budget_code = self.get_or_create_name(BudgetCode, 41)
- try:
- self.activity.date_modified_manual = datetime.datetime(*xlrd.xldate_as_tuple(self.row[42].value, self.datemode)) if self.row[42].value else None
- except:
- pass
- self.activity.record_piece = self.get_or_create_name(RecordPiece, 43) if self.row[43].value else None
-
- self.activity.save()
-
-
-class Command(BaseCommand):
- help = """Import Person data from IRCAM's legacy XLS management file.
- python manage.py import-ircam-person-xls -s /srv/backup/TB_personnel_GP-GM_4.xls
- """
-
- option_list = BaseCommand.option_list + (
- make_option('-d', '--dry-run',
- action='store_true',
- dest='dry-run',
- help='Do NOT write anything'),
- make_option('-f', '--force',
- action='store_true',
- dest='force',
- help='Force overwrite data'),
- make_option('-s', '--source',
- dest='source_file',
- help='define the XLS source file'),
- make_option('-l', '--log',
- dest='log',
- help='define log file'),
- )
-
- def handle(self, *args, **kwargs):
- # self.logger = Logger(kwargs.get('log'))
- self.pattern = kwargs.get('pattern')
- self.source_file = os.path.abspath(kwargs.get('source_file'))
- self.dry_run = kwargs.get('dry-run')
- self.force = kwargs.get('force')
-
- xls = IrcamXLS(self.source_file)
- for i in range(xls.first_row, xls.size):
- p = IrcamPerson(xls.sheet.row(i), xls.book.datemode)
- p.set_identity()
- p.set_activity()
diff --git a/app/organization/network/management/commands/import-ircam-project.py b/app/organization/network/management/commands/import-ircam-project.py
deleted file mode 100644
index 1ca33511..00000000
--- a/app/organization/network/management/commands/import-ircam-project.py
+++ /dev/null
@@ -1,240 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-import os
-import sys
-import csv
-import re
-import logging
-import datetime
-from optparse import make_option
-import xlrd
-from itertools import takewhile
-from re import findall
-import dateutil.parser
-# from string import split
-from django.conf import settings
-from django.core.management.base import BaseCommand, CommandError
-from django.contrib.auth.models import User
-from django.db.models import Q
-
-from organization.core.models import *
-from organization.network.models import *
-from organization.projects.models import *
-
-
-class Logger:
-
- def __init__(self, file):
- self.logger = logging.getLogger('myapp')
- self.hdlr = logging.FileHandler(file)
- self.formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s')
- self.hdlr.setFormatter(self.formatter)
- self.logger.addHandler(self.hdlr)
- self.logger.setLevel(logging.INFO)
-
- def info(self, prefix, message):
- self.logger.info(' ' + prefix + ' : ' + message)
-
- def error(self, prefix, message):
- self.logger.error(prefix + ' : ' + message)
-
-
-def get_instance(model, field, value):
- models = model.objects.filter(field=value)
- if models:
- return models[0]
- else:
- model = model()
- model.field = value
- return model
-
-
-def format_message(project):
- message = str(project.id) + " | "
- message += project.title + " | "
- message += project.external_id if project.external_id else "None"
- return message
-
-
-class IrcamXLS:
-
- sheet_id = 0
- project_table_1_first_row = 12
- project_table_1_last_row = 25
- project_table_2_first_row = 34
- project_table_2_last_row = 90
- nb_col_max = 9
- nb_col_min = 0
- avoid_col = 3
-
- def __init__(self, file):
- self.book = xlrd.open_workbook(file)
- self.sheet = self.book.sheet_by_index(self.sheet_id)
-
-
-class IrcamProjects(object):
-
- def __init__(self, project_name):
- print("project", project_name)
- project, is_created = Project.objects.get_or_create(title=project_name)
- self.project = project
- self.is_created = is_created
- if self.is_created:
- self.project.title = project_name
-
-
- def set_external_id(self, external_id):
- if external_id and self.project.external_id is None:
- if isinstance(external_id, float):
- external_id = str(int(external_id))
- external_id = re.sub(r'((\s)*(-)(\s)*)|(\s)', '-', external_id)
- self.project.external_id = external_id
-
-
- def set_call_project(self, call):
- if call and self.project.call is None:
- project_call, is_created = ProjectCall.objects.get_or_create(name__icontains=call)
- if is_created:
- project_call.name = call
- project_call.save()
- self.project.call = project_call
-
-
- def set_date_from(self, date_from):
- if date_from and self.project.date_from is None:
- self.project.date_from = date_from
-
-
- def set_date_to(self, date_to):
- if date_to and self.project.date_to is None:
- self.project.date_to = date_to
-
-
- def set_lead_organization(self, lead_organization):
- if lead_organization and self.project.lead_organization is None:
- lo, is_created = Organization.objects.get_or_create(name=lead_organization)
- self.project.lead_organization = lo
-
-
- def set_referring_person(self, referring_person):
- if referring_person and self.project.referring_person is None:
- referring_person_list = re.split(r'\s*/\s*', referring_person, 1)
- for rp in referring_person_list:
- rp_whole_name = re.split(r'\s*', rp, 1)
- last_name = max(rp_whole_name, key=len)
- initial_first_name = min(rp_whole_name, key=len)
- initial_first_name = re.sub(r'\.', '', initial_first_name)
- persons = Person.objects.filter(last_name__icontains=last_name)
- for person in persons:
- if person.first_name[0] == initial_first_name:
- self.project.referring_person.add(person)
-
-
- def set_teams(self, lead_teams):
- if lead_teams and self.project.lead_team is None:
- lead_teams_list = re.split(r'\s*,\s*', lead_teams, 1)
- for lt in lead_teams_list:
- t, is_created = Team.objects.get_or_create(code__icontains=lt)
- if is_created:
- t.title = lt
- t.save()
- self.project.teams.add(t)
-
-
- def set_manager(self, manager):
- if manager and self.project.manager is None :
- manager_whole_name = re.split(r'\s*', manager, 1)
- last_name = max(manager_whole_name, key=len)
- initial_first_name = min(manager_whole_name, key=len)
- initial_first_name = re.sub(r'\.', '', initial_first_name)
- persons = Person.objects.filter(last_name__icontains=last_name)
- for person in persons:
- if person.first_name[0] == initial_first_name:
- self.project.manager.add(person)
-
-
- def save_project(self):
- self.project.save()
-
-
-class Command(BaseCommand):
- help = """Import Person data from IRCAM's legacy XLS management file.
- python manage.py import-ircam-project -s /srv/backup/projects_rd_jan17.xlsx
- """
-
- option_list = BaseCommand.option_list + (
- make_option('-d', '--dry-run',
- action='store_true',
- dest='dry-run',
- help='Do NOT write anything'),
- make_option('-f', '--force',
- action='store_true',
- dest='force',
- help='Force overwrite data'),
- make_option('-s', '--source',
- dest='source_file',
- help='define the XLS source file'),
- make_option('-l', '--log',
- dest='log',
- help='define log file'),
- )
-
- def handle(self, *args, **kwargs):
- self.logger = Logger(kwargs.get('log'))
- self.pattern = kwargs.get('pattern')
- self.source_file = os.path.abspath(kwargs.get('source_file'))
- self.dry_run = kwargs.get('dry-run')
- self.force = kwargs.get('force')
-
- xls = IrcamXLS(self.source_file)
-
- # Table 1
- for row_index in range(xls.project_table_1_first_row, xls.project_table_1_last_row):
- ip = IrcamProjects(xls.sheet.cell_value(row_index, 0))
- ip.set_external_id(xls.sheet.cell_value(row_index, 1))
- ip.set_call_project(xls.sheet.cell_value(row_index, 2))
- ip.set_date_from(xlrd.xldate.xldate_as_datetime(xls.sheet.cell_value(row_index, 4), 1))
- ip.set_date_to(xlrd.xldate.xldate_as_datetime(xls.sheet.cell_value(row_index, 5), 1))
- ip.set_lead_organization(xls.sheet.cell_value(row_index, 6))
- ip.set_referring_person(xls.sheet.cell_value(row_index, 7))
- ip.set_teams(xls.sheet.cell_value(row_index, 8))
- ip.set_manager(xls.sheet.cell_value(row_index, 9))
- ip.save_project()
-
- self.logger.info('Project', format_message(ip.project))
-
-
- # Table 2
- for row_index in range(xls.project_table_2_first_row, xls.project_table_2_last_row):
-
- ip = IrcamProjects(xls.sheet.cell_value(row_index, 0))
- ip.set_external_id(xls.sheet.cell_value(row_index, 1))
- ip.set_call_project(xls.sheet.cell_value(row_index, 2))
- ip.set_date_from(xlrd.xldate.xldate_as_datetime(xls.sheet.cell_value(row_index, 4), 1))
- ip.set_date_to(xlrd.xldate.xldate_as_datetime(xls.sheet.cell_value(row_index, 5), 1))
- ip.set_lead_organization(xls.sheet.cell_value(row_index, 6))
- ip.set_referring_person(xls.sheet.cell_value(row_index, 7))
- ip.set_teams(xls.sheet.cell_value(row_index, 8))
- ip.set_manager(xls.sheet.cell_value(row_index, 9))
- ip.save_project()
-
- self.logger.info('Project', format_message(ip.project))
diff --git a/app/organization/network/management/commands/import-ircam-timesheet-xls.py b/app/organization/network/management/commands/import-ircam-timesheet-xls.py
deleted file mode 100644
index 3efed67f..00000000
--- a/app/organization/network/management/commands/import-ircam-timesheet-xls.py
+++ /dev/null
@@ -1,284 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-import os
-import sys
-import csv
-import logging
-import datetime
-import math
-import datetimerange
-from optparse import make_option
-import xlrd
-from itertools import takewhile
-from re import findall
-import dateutil.parser
-# from string import split
-from django.conf import settings
-from django.core.management.base import BaseCommand, CommandError
-from django.contrib.auth.models import User
-from django.db.models import Q
-
-from organization.core.models import *
-from organization.network.models import *
-from organization.projects.models import *
-
-
-class Logger:
-
- def __init__(self, file):
- self.logger = logging.getLogger('myapp')
- self.hdlr = logging.FileHandler(file)
- self.formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s')
- self.hdlr.setFormatter(self.formatter)
- self.logger.addHandler(self.hdlr)
- self.logger.setLevel(logging.INFO)
-
- def info(self, prefix, message):
- self.logger.info(' ' + prefix + ' : ' + message)
-
- def error(self, prefix, message):
- self.logger.error(prefix + ' : ' + message)
-
-
-def get_instance(model, field, value):
- models = model.objects.filter(field=value)
- if models:
- return models[0]
- else:
- model = model()
- model.field = value
- return model
-
-
-class IrcamXLS:
-
- register_id_row = 4
- register_id_col = 3
- period_row = 6
- period_col = 2
- first_project_row = 14
- first_project_col = 2
- first_month_row = 11
- first_month_col = 3
- first_percent_row = 13
- first_percent_col = 3
- nb_of_month = 12
- nb_max_of_project = 10
-
- def __init__(self, file):
- self.book = xlrd.open_workbook(file)
- self.sheets = self.book.sheets()
-
-
-class IrcamTimeSheet(object):
-
- def __init__(self, person, date_from, date_to):
- self.person = person
- self.date_from = date_from
- self.date_to = date_to
-
- def set_person_activity_timesheet(self,
- activity,
- project,
- percentage,
- month,
- year):
- """ Set for a year percentage worked by month
- on a project
- """
- pats = PersonActivityTimeSheet.objects.get_or_create(activity = activity,
- project = project,
- percentage = percentage,
- month = month,
- year = year
- )
-
-
- def set_work_package(self, person_activity_timesheet):
- """ set contract id of the project """
-
-class Command(BaseCommand):
- help = """Import Person data from IRCAM's legacy XLS management file.
- python manage.py import-ircam-timesheet-xls -s /srv/backup/time_sheet_2015_V3_H2020.xls
- """
-
- option_list = BaseCommand.option_list + (
- make_option('-d', '--dry-run',
- action='store_true',
- dest='dry-run',
- help='Do NOT write anything'),
- make_option('-f', '--force',
- action='store_true',
- dest='force',
- help='Force overwrite data'),
- make_option('-s', '--source',
- dest='source_file',
- help='define the XLS source file'),
- make_option('-l', '--log',
- dest='log',
- help='define log file'),
- )
-
- def handle(self, *args, **kwargs):
- self.logger = Logger(kwargs.get('log'))
- self.pattern = kwargs.get('pattern')
- self.source_file = os.path.abspath(kwargs.get('source_file'))
- self.dry_run = kwargs.get('dry-run')
- self.force = kwargs.get('force')
-
- xls = IrcamXLS(self.source_file)
- for sheet in xls.sheets:
- person_register_id = sheet.cell_value(xls.register_id_row, xls.register_id_col)
- persons = Person.objects.filter(register_id=int(person_register_id))
- processing_counter = 0
- # database not enough clear, possible multiple entries for some persons
- # iterating over one person
- for person in persons:
- period_str = sheet.cell_value(xls.period_row, xls.period_col)
- periods = findall(r'\d{1,2}/\d{1,2}/\d{4}', period_str)
- date_from = dateutil.parser.parse(periods[0])
- date_to = dateutil.parser.parse(periods[1])
- curr_range_date = datetimerange.DateTimeRange(date_from, date_to)
- curr_year = date_to.year
-
- self.logger.info('Processing', '******************* PERSON : ' + str(person.id) + ' | '+person.title + " *******************" )
- its = IrcamTimeSheet(person, date_from, date_to)
-
- # iterating on each month
- for col_index in range(xls.first_percent_col, xls.first_percent_col + xls.nb_of_month):
-
- # condition to determine the end of projects list
- end_project_list_row = 0
-
- # get month
- month = int(sheet.cell_value(xls.first_month_row, col_index))
-
- # calculate the current date
- curr_date = datetime.date(curr_year, month, 1)
-
- self.logger.info('Processing', 'year : ' + str(curr_year) + " | month : " + str(month) + " | " + str(curr_date))
-
- # find the right activities corresponding to the current month / year
- activities = person.activities.all()
- activity = None
- if not activities:
- self.logger.info('Not Found', 'activity for person : ' + str(person.id) + " - " + person.title + " for period : " + period_str)
- else :
- # find the right
- for curr_activity in activities :
- activity_date_range = datetimerange.DateTimeRange(datetime.datetime.combine(curr_activity.date_from, datetime.datetime.min.time()), datetime.datetime.combine(curr_activity.date_to, datetime.datetime.min.time()))
- if curr_range_date.is_intersection(activity_date_range):
- activity = curr_activity
-
- if not activity:
- self.logger.info('Not Found', 'No activity correponds to period : '+ str(curr_year) +" "+str(month))
- else :
- # for each activities
- # for activity in activities :
- # iterating over projects cells
- self.logger.info('Processing', 'activity : ' + str(activity.id) + ' | ' + activity.__str__())
- project_row_index = xls.first_project_row
- while sheet.cell_value(project_row_index, xls.first_project_col) != "Total final":
-
- # get percent
- percent = sheet.cell_value(project_row_index, col_index) if sheet.cell_value(project_row_index, col_index) else 0
-
- # try to find project
- project_id_str = sheet.cell_value(project_row_index, xls.first_project_col - 1)
- if isinstance(project_id_str, float) :
- # by default, numbers are retrived as float
- project_id_str = str(int(project_id_str))
-
- # processing projects
- if end_project_list_row == 0:
- # check if project exists
- project, is_created = Project.objects.get_or_create(external_id=str(project_id_str))
- if is_created:
- project.title = sheet.cell_value(project_row_index, xls.first_project_col)
- project.external_id = project_id_str
- project.save()
- # project = Project.objects.filter(external_id__icontains=project_id_str).first()
- if project :
- # save timesheet without work packages
- its.set_person_activity_timesheet(activity, project, percent, month, curr_year)
- processing_counter += 1
- self.logger.info('Processing', 'project : ' + str(project.id) + " | " + str(project.external_id) + " | " + project.title + " | percent : " + str(percent))
- else :
- self.logger.info('Not Found', 'project : ' + project_id_str)
-
- # increment index
- project_row_index += 1
-
- # processing work package
- work_package_row_index = project_row_index + 1
- while sheet.cell_value(work_package_row_index, xls.first_project_col) != "Date entrée":
-
- # get project
- project_external_id = int(sheet.cell_value(work_package_row_index, xls.first_project_col - 1))
- project = Project.objects.get(external_id=str(project_external_id))
-
- # check if project exists
- if project:
-
- # list all work package
- wk_p_str = sheet.cell_value(work_package_row_index, col_index)
- if wk_p_str :
- self.logger.info('Processing', 'work packages : ' + str(wk_p_str) + " | project" + project.external_id + " - " + project.title)
- wk_p_list = ""
- if isinstance(wk_p_str, str):
- wk_p_list = wk_p_str.split(",")
- elif isinstance(wk_p_str, float):
- i, d = divmod(wk_p_str, 1)
- wk_p_list = (int(i), int(d))
- # link work packages to timesheet
- for wk_p_num in wk_p_list:
- wk_p_num = str(wk_p_num)
-
- # create or get ProjectWorkPackage
- wk_obj, wk_created = ProjectWorkPackage.objects.get_or_create(title="wk_"+wk_p_num, number=wk_p_num, project=project)
- pat = PersonActivityTimeSheet.objects.filter(activity=activity, project=project, month=month, year=curr_year)
-
- # for each PersonActivityTimeSheet link work package
- for timesheet in pat:
- timesheet.work_packages.add(wk_obj)
- timesheet.save()
-
-
- # increment index
- work_package_row_index += 1
-
- # processing accounting and validation date
- dates_row_index = work_package_row_index
- date_accounting_str = sheet.cell_value(dates_row_index, col_index)
- date_accounting = xlrd.xldate.xldate_as_datetime(date_accounting_str, 1) if date_accounting_str else None
- date_validation_str = sheet.cell_value(dates_row_index + 1, col_index)
- date_validation = xlrd.xldate.xldate_as_datetime(date_validation_str, 1) if date_validation_str else None
-
- # get all timesheets, function of the activity, month and year
- pats = PersonActivityTimeSheet.objects.filter(activity=activity, month=month, year=curr_year)
- for pat in pats :
- pat.accounting = date_accounting
- pat.validation = date_validation
- pat.save()
-
- self.logger.info('Processing', '_________________________ Number of record : ' + str(processing_counter) + ' _________________________')
- print("Person : " + person.title + " | Number of record : " + str(processing_counter))
diff --git a/app/organization/network/migrations/0001_initial.py b/app/organization/network/migrations/0001_initial.py
deleted file mode 100644
index 46345244..00000000
--- a/app/organization/network/migrations/0001_initial.py
+++ /dev/null
@@ -1,291 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-01 15:37
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import django_countries.fields
-import mezzanine.core.fields
-import mezzanine.utils.models
-
-
-class Migration(migrations.Migration):
-
- initial = True
-
- dependencies = [
- ('pages', '0004_auto_20160804_1547'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ActivityFramework',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ],
- options={
- 'verbose_name': 'activity framework',
- },
- ),
- migrations.CreateModel(
- name='ActivityGrade',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ],
- options={
- 'verbose_name': 'activity grade',
- },
- ),
- migrations.CreateModel(
- name='ActivityStatus',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ],
- options={
- 'verbose_name': 'activity status',
- },
- ),
- migrations.CreateModel(
- name='BudgetCode',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ],
- options={
- 'verbose_name': 'budget code',
- },
- ),
- migrations.CreateModel(
- name='Department',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('name_fr', models.CharField(max_length=512, null=True, verbose_name='name')),
- ('name_en', models.CharField(max_length=512, null=True, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('description_fr', models.TextField(blank=True, null=True, verbose_name='description')),
- ('description_en', models.TextField(blank=True, null=True, verbose_name='description')),
- ],
- options={
- 'verbose_name': 'department',
- },
- ),
- migrations.CreateModel(
- name='DepartmentPage',
- fields=[
- ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='pages.Page')),
- ('content', mezzanine.core.fields.RichTextField(verbose_name='Content')),
- ('content_fr', mezzanine.core.fields.RichTextField(null=True, verbose_name='Content')),
- ('content_en', mezzanine.core.fields.RichTextField(null=True, verbose_name='Content')),
- ('sub_title', models.TextField(blank=True, max_length=1024, verbose_name='sub title')),
- ('sub_title_fr', models.TextField(blank=True, max_length=1024, null=True, verbose_name='sub title')),
- ('sub_title_en', models.TextField(blank=True, max_length=1024, null=True, verbose_name='sub title')),
- ('weaving_css_class', models.CharField(blank=True, choices=[('pattern-bg--circles', 'circles'), ('pattern-bg--squares', 'squares'), ('pattern-bg--stripes', 'stripes'), ('pattern-bg--triangles', 'triangles')], max_length=64, verbose_name='background pattern')),
- ],
- options={
- 'verbose_name': 'department page',
- 'ordering': ('_order',),
- },
- bases=('pages.page', models.Model),
- ),
- migrations.CreateModel(
- name='Organization',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('description_fr', models.TextField(blank=True, null=True, verbose_name='description')),
- ('description_en', models.TextField(blank=True, null=True, verbose_name='description')),
- ('url', models.URLField(blank=True, max_length=512, verbose_name='URL')),
- ('address', models.TextField(blank=True, verbose_name='address')),
- ('postal_code', models.CharField(blank=True, max_length=16, verbose_name='postal code')),
- ('country', django_countries.fields.CountryField(max_length=2, verbose_name='country')),
- ('is_on_map', models.BooleanField(default=True, verbose_name='is on map')),
- ],
- options={
- 'verbose_name': 'organization',
- },
- ),
- migrations.CreateModel(
- name='OrganizationType',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ],
- options={
- 'verbose_name': 'organization type',
- },
- ),
- migrations.CreateModel(
- name='Person',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('keywords_string', models.CharField(blank=True, editable=False, max_length=500)),
- ('title', models.CharField(max_length=500, verbose_name='Title')),
- ('slug', models.CharField(blank=True, help_text='Leave blank to have the URL auto-generated from the title.', max_length=2000, null=True, verbose_name='URL')),
- ('_meta_title', models.CharField(blank=True, help_text='Optional title to be used in the HTML title tag. If left blank, the main title field will be used.', max_length=500, null=True, verbose_name='Title')),
- ('description', models.TextField(blank=True, verbose_name='Description')),
- ('gen_description', models.BooleanField(default=True, help_text='If checked, the description will be automatically generated from content. Uncheck if you want to manually set a custom description.', verbose_name='Generate description')),
- ('created', models.DateTimeField(editable=False, null=True)),
- ('updated', models.DateTimeField(editable=False, null=True)),
- ('status', models.IntegerField(choices=[(1, 'Draft'), (2, 'Published')], default=2, help_text='With Draft chosen, will only be shown for admin users on the site.', verbose_name='Status')),
- ('publish_date', models.DateTimeField(blank=True, db_index=True, help_text="With Published chosen, won't be shown until this time", null=True, verbose_name='Published from')),
- ('expiry_date', models.DateTimeField(blank=True, help_text="With Published chosen, won't be shown after this time", null=True, verbose_name='Expires on')),
- ('short_url', models.URLField(blank=True, null=True)),
- ('in_sitemap', models.BooleanField(default=True, verbose_name='Show in sitemap')),
- ('person_title', models.CharField(blank=True, choices=[('Dr', 'Dr'), ('Prof', 'Prof'), ('Prof Dr', 'Prof Dr')], max_length=16, verbose_name='title')),
- ('gender', models.CharField(blank=True, choices=[('male', 'male'), ('female', 'female')], max_length=16, verbose_name='gender')),
- ('first_name', models.CharField(blank=True, max_length=255, null=True, verbose_name='first name')),
- ('last_name', models.CharField(blank=True, max_length=255, null=True, verbose_name='last name')),
- ('birthday', models.DateField(blank=True, null=True, verbose_name='birthday')),
- ('bio', mezzanine.core.fields.RichTextField(blank=True, verbose_name='biography')),
- ('bio_fr', mezzanine.core.fields.RichTextField(blank=True, null=True, verbose_name='biography')),
- ('bio_en', mezzanine.core.fields.RichTextField(blank=True, null=True, verbose_name='biography')),
- ('permanent', models.BooleanField(default=False, verbose_name='permanent')),
- ],
- options={
- 'verbose_name': 'person',
- 'ordering': ['last_name'],
- },
- bases=(models.Model, mezzanine.utils.models.AdminThumbMixin),
- ),
- migrations.CreateModel(
- name='PersonActivity',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('content', mezzanine.core.fields.RichTextField(verbose_name='Content')),
- ('content_fr', mezzanine.core.fields.RichTextField(null=True, verbose_name='Content')),
- ('content_en', mezzanine.core.fields.RichTextField(null=True, verbose_name='Content')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('description_fr', models.TextField(blank=True, null=True, verbose_name='description')),
- ('description_en', models.TextField(blank=True, null=True, verbose_name='description')),
- ('date_begin', models.DateField(blank=True, null=True, verbose_name='begin date')),
- ('date_end', models.DateField(blank=True, null=True, verbose_name='end date')),
- ('function', models.CharField(blank=True, max_length=1024, verbose_name='fonction')),
- ('hdr', models.BooleanField(default=False, verbose_name='HDR')),
- ('rd_quota', models.IntegerField(blank=True, null=True, verbose_name='R&D quota')),
- ('rd_program', models.TextField(blank=True, verbose_name='R&D program')),
- ('phd_defense_date', models.DateField(blank=True, null=True, verbose_name='PhD defense date')),
- ('phd_title', models.TextField(blank=True, verbose_name='PhD title')),
- ('phd_postdoctoralsituation', models.CharField(blank=True, max_length=256, verbose_name='post-doctoral situation')),
- ('training_title', models.TextField(blank=True, verbose_name='Training title')),
- ('comments', models.TextField(blank=True, verbose_name='comments')),
- ('date_added', models.DateTimeField(auto_now_add=True, verbose_name='add date')),
- ('date_modified', models.DateTimeField(auto_now=True, verbose_name='modification date')),
- ('date_modified_manual', models.DateTimeField(blank=True, null=True, verbose_name='manual modification date')),
- ('attachment_organization', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='attachment_activity', to='organization-network.Organization', verbose_name='attachment organization')),
- ('budget_code', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization-network.BudgetCode')),
- ('employer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='employer_activity', to='organization-network.Organization', verbose_name='employer')),
- ('framework', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization-network.ActivityFramework', verbose_name='framework')),
- ('grade', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization-network.ActivityGrade', verbose_name='grade')),
- ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organization-network.Person', verbose_name='person')),
- ('phd_director', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='phd_director_activity', to='organization-network.Person', verbose_name='PhD director')),
- ('phd_doctoral_school', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization-network.Organization', verbose_name='doctoral school')),
- ('phd_officer_1', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='phd_officer_1_activity', to='organization-network.Person', verbose_name='PhD officer 1')),
- ('phd_officer_2', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='phd_officer_2_activity', to='organization-network.Person', verbose_name='PhD officer 2')),
- ],
- options={
- 'verbose_name_plural': 'activities',
- 'verbose_name': 'activity',
- },
- ),
- migrations.CreateModel(
- name='RecordPiece',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ],
- options={
- 'verbose_name': 'record piece',
- },
- ),
- migrations.CreateModel(
- name='Team',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('name_fr', models.CharField(max_length=512, null=True, verbose_name='name')),
- ('name_en', models.CharField(max_length=512, null=True, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('description_fr', models.TextField(blank=True, null=True, verbose_name='description')),
- ('description_en', models.TextField(blank=True, null=True, verbose_name='description')),
- ('url', models.URLField(blank=True, max_length=512, verbose_name='URL')),
- ('department', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='teams', to='organization-network.Department', verbose_name='department')),
- ('organization', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='teams', to='organization-network.Organization', verbose_name='organization')),
- ],
- options={
- 'verbose_name': 'team',
- },
- ),
- migrations.CreateModel(
- name='TeamPage',
- fields=[
- ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='pages.Page')),
- ('content', mezzanine.core.fields.RichTextField(verbose_name='Content')),
- ('content_fr', mezzanine.core.fields.RichTextField(null=True, verbose_name='Content')),
- ('content_en', mezzanine.core.fields.RichTextField(null=True, verbose_name='Content')),
- ('sub_title', models.TextField(blank=True, max_length=1024, verbose_name='sub title')),
- ('sub_title_fr', models.TextField(blank=True, max_length=1024, null=True, verbose_name='sub title')),
- ('sub_title_en', models.TextField(blank=True, max_length=1024, null=True, verbose_name='sub title')),
- ('team', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='pages', to='organization-network.Team', verbose_name='team')),
- ],
- options={
- 'verbose_name': 'team page',
- 'ordering': ('_order',),
- },
- bases=('pages.page', models.Model),
- ),
- migrations.CreateModel(
- name='TrainingLevel',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ],
- options={
- 'verbose_name': 'training level',
- },
- ),
- migrations.CreateModel(
- name='TrainingSpectiality',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ],
- options={
- 'verbose_name': 'training speciality',
- },
- ),
- migrations.CreateModel(
- name='TrainingTopic',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ],
- options={
- 'verbose_name': 'training topic',
- },
- ),
- migrations.CreateModel(
- name='TrainingType',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ],
- options={
- 'verbose_name': 'training type',
- },
- ),
- ]
diff --git a/app/organization/network/migrations/0002_auto_20160901_1737.py b/app/organization/network/migrations/0002_auto_20160901_1737.py
deleted file mode 100644
index ee277f40..00000000
--- a/app/organization/network/migrations/0002_auto_20160901_1737.py
+++ /dev/null
@@ -1,97 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-01 15:37
-from __future__ import unicode_literals
-
-from django.conf import settings
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- initial = True
-
- dependencies = [
- ('organization-projects', '0001_initial'),
- ('sites', '0002_alter_domain_unique'),
- ('organization-network', '0001_initial'),
- migrations.swappable_dependency(settings.AUTH_USER_MODEL),
- ]
-
- operations = [
- migrations.AddField(
- model_name='personactivity',
- name='project',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization-projects.Project', verbose_name='project'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='record_piece',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization-network.RecordPiece'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='second_employer',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='second_employer_activity', to='organization-network.Organization', verbose_name='second employer'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='second_team',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='second_team_activity', to='organization-network.Team', verbose_name='second team'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='status',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization-network.ActivityStatus', verbose_name='status'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='team',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='team_activity', to='organization-network.Team', verbose_name='team'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='training_level',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization-network.TrainingLevel', verbose_name='training level'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='training_speciality',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization-network.TrainingSpectiality', verbose_name='training speciality'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='training_topic',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization-network.TrainingTopic', verbose_name='training topic'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='training_type',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization-network.TrainingType', verbose_name='training type'),
- ),
- migrations.AddField(
- model_name='person',
- name='site',
- field=models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to='sites.Site'),
- ),
- migrations.AddField(
- model_name='person',
- name='user',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='user'),
- ),
- migrations.AddField(
- model_name='organization',
- name='type',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization-network.OrganizationType', verbose_name='organization type'),
- ),
- migrations.AddField(
- model_name='departmentpage',
- name='department',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='pages', to='organization-network.Department', verbose_name='department'),
- ),
- migrations.AddField(
- model_name='department',
- name='organization',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='departments', to='organization-network.Organization', verbose_name='organization'),
- ),
- ]
diff --git a/app/organization/network/migrations/0003_personaudio_personblock_personimage_personlink_personvideo.py b/app/organization/network/migrations/0003_personaudio_personblock_personimage_personlink_personvideo.py
deleted file mode 100644
index 6591be31..00000000
--- a/app/organization/network/migrations/0003_personaudio_personblock_personimage_personlink_personvideo.py
+++ /dev/null
@@ -1,87 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-02 09:54
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0001_initial'),
- ('organization-core', '0001_initial'),
- ('organization-network', '0002_auto_20160901_1737'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='PersonAudio',
- fields=[
- ('audio_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-media.Audio')),
- ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='audios', to='organization-network.Person', verbose_name='project')),
- ],
- options={
- 'abstract': False,
- },
- bases=('organization-media.audio',),
- ),
- migrations.CreateModel(
- name='PersonBlock',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('content', mezzanine.core.fields.RichTextField(verbose_name='Content')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('with_separator', models.BooleanField(default=False)),
- ('background_color', models.CharField(blank=True, choices=[('black', 'black'), ('yellow', 'yellow'), ('red', 'red')], max_length=32, verbose_name='background color')),
- ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='blocks', to='organization-network.Person', verbose_name='project')),
- ],
- options={
- 'ordering': ('_order',),
- },
- ),
- migrations.CreateModel(
- name='PersonImage',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('file', mezzanine.core.fields.FileField(max_length=1024, verbose_name='Image')),
- ('credits', models.CharField(blank=True, max_length=256, null=True, verbose_name='credits')),
- ('type', models.CharField(choices=[('logo', 'logo'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page slider')], max_length=64, verbose_name='type')),
- ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='images', to='organization-network.Person', verbose_name='project')),
- ],
- options={
- 'ordering': ('_order',),
- },
- ),
- migrations.CreateModel(
- name='PersonLink',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('url', models.URLField(blank=True, max_length=512, verbose_name='URL')),
- ('link_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organization-core.LinkType', verbose_name='link type')),
- ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='links', to='organization-network.Person', verbose_name='project')),
- ],
- options={
- 'verbose_name_plural': 'links',
- 'verbose_name': 'link',
- 'abstract': False,
- },
- ),
- migrations.CreateModel(
- name='PersonVideo',
- fields=[
- ('video_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-media.Video')),
- ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='videos', to='organization-network.Person', verbose_name='project')),
- ],
- options={
- 'abstract': False,
- },
- bases=('organization-media.video',),
- ),
- ]
diff --git a/app/organization/network/migrations/0004_organizationaudio_organizationblock_organizationimage_organizationlink_organizationvideo.py b/app/organization/network/migrations/0004_organizationaudio_organizationblock_organizationimage_organizationlink_organizationvideo.py
deleted file mode 100644
index 1569f231..00000000
--- a/app/organization/network/migrations/0004_organizationaudio_organizationblock_organizationimage_organizationlink_organizationvideo.py
+++ /dev/null
@@ -1,87 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-02 10:11
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0001_initial'),
- ('organization-core', '0001_initial'),
- ('organization-network', '0003_personaudio_personblock_personimage_personlink_personvideo'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='OrganizationAudio',
- fields=[
- ('audio_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-media.Audio')),
- ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='audios', to='organization-network.Organization', verbose_name='project')),
- ],
- options={
- 'abstract': False,
- },
- bases=('organization-media.audio',),
- ),
- migrations.CreateModel(
- name='OrganizationBlock',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('content', mezzanine.core.fields.RichTextField(verbose_name='Content')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('with_separator', models.BooleanField(default=False)),
- ('background_color', models.CharField(blank=True, choices=[('black', 'black'), ('yellow', 'yellow'), ('red', 'red')], max_length=32, verbose_name='background color')),
- ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='blocks', to='organization-network.Organization', verbose_name='project')),
- ],
- options={
- 'ordering': ('_order',),
- },
- ),
- migrations.CreateModel(
- name='OrganizationImage',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('file', mezzanine.core.fields.FileField(max_length=1024, verbose_name='Image')),
- ('credits', models.CharField(blank=True, max_length=256, null=True, verbose_name='credits')),
- ('type', models.CharField(choices=[('logo', 'logo'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page slider')], max_length=64, verbose_name='type')),
- ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='images', to='organization-network.Organization', verbose_name='project')),
- ],
- options={
- 'ordering': ('_order',),
- },
- ),
- migrations.CreateModel(
- name='OrganizationLink',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('url', models.URLField(blank=True, max_length=512, verbose_name='URL')),
- ('link_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organization-core.LinkType', verbose_name='link type')),
- ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='links', to='organization-network.Organization', verbose_name='project')),
- ],
- options={
- 'verbose_name_plural': 'links',
- 'abstract': False,
- 'verbose_name': 'link',
- },
- ),
- migrations.CreateModel(
- name='OrganizationVideo',
- fields=[
- ('video_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-media.Video')),
- ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='videos', to='organization-network.Organization', verbose_name='project')),
- ],
- options={
- 'abstract': False,
- },
- bases=('organization-media.video',),
- ),
- ]
diff --git a/app/organization/network/migrations/0005_auto_20160905_1853.py b/app/organization/network/migrations/0005_auto_20160905_1853.py
deleted file mode 100644
index 3055818c..00000000
--- a/app/organization/network/migrations/0005_auto_20160905_1853.py
+++ /dev/null
@@ -1,65 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-05 16:53
-from __future__ import unicode_literals
-
-from django.conf import settings
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0004_organizationaudio_organizationblock_organizationimage_organizationlink_organizationvideo'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='UMR',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ],
- options={
- 'verbose_name': 'UMR',
- },
- ),
- migrations.RemoveField(
- model_name='person',
- name='permanent',
- ),
- migrations.RemoveField(
- model_name='personactivity',
- name='function',
- ),
- migrations.RemoveField(
- model_name='personactivity',
- name='rd_quota',
- ),
- migrations.AddField(
- model_name='personactivity',
- name='is_permanent',
- field=models.BooleanField(default=False, verbose_name='permanent'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='rd_quota_float',
- field=models.IntegerField(blank=True, null=True, verbose_name='R&D quota (float)'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='rd_quota_text',
- field=models.CharField(blank=True, max_length=128, null=True, verbose_name='R&D quota (text)'),
- ),
- migrations.AlterField(
- model_name='person',
- name='user',
- field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='user'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='umr',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization-network.UMR', verbose_name='training type'),
- ),
- ]
diff --git a/app/organization/network/migrations/0006_auto_20160914_1454.py b/app/organization/network/migrations/0006_auto_20160914_1454.py
deleted file mode 100644
index fd60b01c..00000000
--- a/app/organization/network/migrations/0006_auto_20160914_1454.py
+++ /dev/null
@@ -1,65 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-14 12:54
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0005_auto_20160905_1853'),
- ]
-
- operations = [
- migrations.RenameField(
- model_name='organizationaudio',
- old_name='project',
- new_name='organization',
- ),
- migrations.RenameField(
- model_name='organizationblock',
- old_name='project',
- new_name='organization',
- ),
- migrations.RenameField(
- model_name='organizationimage',
- old_name='project',
- new_name='organization',
- ),
- migrations.RenameField(
- model_name='organizationlink',
- old_name='project',
- new_name='organization',
- ),
- migrations.RenameField(
- model_name='organizationvideo',
- old_name='project',
- new_name='organization',
- ),
- migrations.RenameField(
- model_name='personaudio',
- old_name='project',
- new_name='person',
- ),
- migrations.RenameField(
- model_name='personblock',
- old_name='project',
- new_name='person',
- ),
- migrations.RenameField(
- model_name='personimage',
- old_name='project',
- new_name='person',
- ),
- migrations.RenameField(
- model_name='personlink',
- old_name='project',
- new_name='person',
- ),
- migrations.RenameField(
- model_name='personvideo',
- old_name='project',
- new_name='person',
- ),
- ]
diff --git a/app/organization/network/migrations/0007_auto_20160914_1818.py b/app/organization/network/migrations/0007_auto_20160914_1818.py
deleted file mode 100644
index b93d3313..00000000
--- a/app/organization/network/migrations/0007_auto_20160914_1818.py
+++ /dev/null
@@ -1,66 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-14 16:18
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0006_auto_20160914_1454'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='organizationaudio',
- name='organization',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='audios', to='organization-network.Organization', verbose_name='organization'),
- ),
- migrations.AlterField(
- model_name='organizationblock',
- name='organization',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='blocks', to='organization-network.Organization', verbose_name='organization'),
- ),
- migrations.AlterField(
- model_name='organizationimage',
- name='organization',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='images', to='organization-network.Organization', verbose_name='organization'),
- ),
- migrations.AlterField(
- model_name='organizationlink',
- name='organization',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='links', to='organization-network.Organization', verbose_name='organization'),
- ),
- migrations.AlterField(
- model_name='organizationvideo',
- name='organization',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='videos', to='organization-network.Organization', verbose_name='organization'),
- ),
- migrations.AlterField(
- model_name='personaudio',
- name='person',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='audios', to='organization-network.Person', verbose_name='person'),
- ),
- migrations.AlterField(
- model_name='personblock',
- name='person',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='blocks', to='organization-network.Person', verbose_name='person'),
- ),
- migrations.AlterField(
- model_name='personimage',
- name='person',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='images', to='organization-network.Person', verbose_name='person'),
- ),
- migrations.AlterField(
- model_name='personlink',
- name='person',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='links', to='organization-network.Person', verbose_name='person'),
- ),
- migrations.AlterField(
- model_name='personvideo',
- name='person',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='videos', to='organization-network.Person', verbose_name='person'),
- ),
- ]
diff --git a/app/organization/network/migrations/0008_person_email.py b/app/organization/network/migrations/0008_person_email.py
deleted file mode 100644
index 5c177cbd..00000000
--- a/app/organization/network/migrations/0008_person_email.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-16 09:35
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0007_auto_20160914_1818'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='person',
- name='email',
- field=models.EmailField(blank=True, max_length=254, null=True, verbose_name='email'),
- ),
- ]
diff --git a/app/organization/network/migrations/0009_auto_20160916_1229.py b/app/organization/network/migrations/0009_auto_20160916_1229.py
deleted file mode 100644
index a102b764..00000000
--- a/app/organization/network/migrations/0009_auto_20160916_1229.py
+++ /dev/null
@@ -1,49 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-16 10:29
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0008_person_email'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='personactivity',
- name='content',
- ),
- migrations.RemoveField(
- model_name='personactivity',
- name='content_en',
- ),
- migrations.RemoveField(
- model_name='personactivity',
- name='content_fr',
- ),
- migrations.RemoveField(
- model_name='personactivity',
- name='description',
- ),
- migrations.RemoveField(
- model_name='personactivity',
- name='description_en',
- ),
- migrations.RemoveField(
- model_name='personactivity',
- name='description_fr',
- ),
- migrations.AddField(
- model_name='personactivity',
- name='comments_en',
- field=models.TextField(blank=True, null=True, verbose_name='comments'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='comments_fr',
- field=models.TextField(blank=True, null=True, verbose_name='comments'),
- ),
- ]
diff --git a/app/organization/network/migrations/0010_personactivity_weeks.py b/app/organization/network/migrations/0010_personactivity_weeks.py
deleted file mode 100644
index 3c7aa03d..00000000
--- a/app/organization/network/migrations/0010_personactivity_weeks.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-16 10:38
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0009_auto_20160916_1229'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='personactivity',
- name='weeks',
- field=models.IntegerField(blank=True, null=True, verbose_name='number of weeks'),
- ),
- ]
diff --git a/app/organization/network/migrations/0011_auto_20160916_1246.py b/app/organization/network/migrations/0011_auto_20160916_1246.py
deleted file mode 100644
index 9fdfd026..00000000
--- a/app/organization/network/migrations/0011_auto_20160916_1246.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-16 10:46
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0010_personactivity_weeks'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='team',
- name='code',
- field=models.CharField(blank=True, max_length=64, null=True, verbose_name='code'),
- ),
- migrations.AlterField(
- model_name='personactivity',
- name='umr',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization-network.UMR', verbose_name='UMR'),
- ),
- ]
diff --git a/app/organization/network/migrations/0012_auto_20160916_1423.py b/app/organization/network/migrations/0012_auto_20160916_1423.py
deleted file mode 100644
index 2327b7a9..00000000
--- a/app/organization/network/migrations/0012_auto_20160916_1423.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-16 12:23
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0011_auto_20160916_1246'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ActivityFunction',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ],
- options={
- 'verbose_name': 'activity function',
- },
- ),
- migrations.AddField(
- model_name='personactivity',
- name='function',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization-network.ActivityFunction', verbose_name='function'),
- ),
- ]
diff --git a/app/organization/network/migrations/0013_auto_20160919_1829.py b/app/organization/network/migrations/0013_auto_20160919_1829.py
deleted file mode 100644
index 98476aed..00000000
--- a/app/organization/network/migrations/0013_auto_20160919_1829.py
+++ /dev/null
@@ -1,57 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-19 16:29
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-pages', '0002_auto_20160914_1838'),
- ('organization-network', '0012_auto_20160916_1423'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='PageCustomPersonListBlockInline',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='person_list_block', to='organization-pages.CustomPage', verbose_name='Page')),
- ],
- options={
- 'verbose_name': 'Person List',
- },
- ),
- migrations.CreateModel(
- name='PersonListBlock',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('style', models.CharField(choices=[('square', 'square'), ('circle', 'circle')], max_length=16, verbose_name='style')),
- ],
- options={
- 'verbose_name': 'Person List',
- },
- ),
- migrations.CreateModel(
- name='PersonListBlockInline',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('person', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='person_list_block', to='organization-network.Person', verbose_name='Person')),
- ('person_list_block', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='person_autocomplete', to='organization-network.PersonListBlock', verbose_name='Person List Block')),
- ],
- options={
- 'verbose_name': 'Person autocomplete',
- },
- ),
- migrations.AddField(
- model_name='pagecustompersonlistblockinline',
- name='person_list_block',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='page_custom', to='organization-network.PersonListBlock', verbose_name='Person List Block'),
- ),
- ]
diff --git a/app/organization/network/migrations/0014_auto_20160919_1912.py b/app/organization/network/migrations/0014_auto_20160919_1912.py
deleted file mode 100644
index af030946..00000000
--- a/app/organization/network/migrations/0014_auto_20160919_1912.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-19 17:12
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0013_auto_20160919_1829'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='personlistblockinline',
- name='person',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='person_list_block_inline', to='organization-network.Person', verbose_name='Person'),
- ),
- migrations.AlterField(
- model_name='personlistblockinline',
- name='person_list_block',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='person_list_block_inline', to='organization-network.PersonListBlock', verbose_name='Person List Block'),
- ),
- ]
diff --git a/app/organization/network/migrations/0015_auto_20160919_1914.py b/app/organization/network/migrations/0015_auto_20160919_1914.py
deleted file mode 100644
index 930ef7cf..00000000
--- a/app/organization/network/migrations/0015_auto_20160919_1914.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-19 17:14
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0014_auto_20160919_1912'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='personlistblockinline',
- name='person',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='person_list', to='organization-network.Person', verbose_name='Person'),
- ),
- ]
diff --git a/app/organization/network/migrations/0016_auto_20160919_1923.py b/app/organization/network/migrations/0016_auto_20160919_1923.py
deleted file mode 100644
index 7a2675c1..00000000
--- a/app/organization/network/migrations/0016_auto_20160919_1923.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-19 17:23
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0015_auto_20160919_1914'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='personlistblockinline',
- name='person',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='coucou', to='organization-network.Person', verbose_name='Person'),
- ),
- ]
diff --git a/app/organization/network/migrations/0017_auto_20160919_1927.py b/app/organization/network/migrations/0017_auto_20160919_1927.py
deleted file mode 100644
index 2efbd5f4..00000000
--- a/app/organization/network/migrations/0017_auto_20160919_1927.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-19 17:27
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0016_auto_20160919_1923'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='pagecustompersonlistblockinline',
- name='page',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='page_custom_person_list_block_inline', to='organization-pages.CustomPage', verbose_name='Page'),
- ),
- migrations.AlterField(
- model_name='pagecustompersonlistblockinline',
- name='person_list_block',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='page_custom_person_list_block_inline', to='organization-network.PersonListBlock', verbose_name='Person List Block'),
- ),
- migrations.AlterField(
- model_name='personlistblockinline',
- name='person',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='person_list_block_inline', to='organization-network.Person', verbose_name='Person'),
- ),
- ]
diff --git a/app/organization/network/migrations/0018_auto_20160921_1006.py b/app/organization/network/migrations/0018_auto_20160921_1006.py
deleted file mode 100644
index 84b365bf..00000000
--- a/app/organization/network/migrations/0018_auto_20160921_1006.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-21 08:06
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0017_auto_20160919_1927'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='pagecustompersonlistblockinline',
- name='page',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization-pages.CustomPage', verbose_name='Page'),
- ),
- migrations.AlterField(
- model_name='pagecustompersonlistblockinline',
- name='person_list_block',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='organization-network.PersonListBlock', verbose_name='Person List Block'),
- ),
- migrations.AlterField(
- model_name='personlistblockinline',
- name='person',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization-network.Person', verbose_name='Person'),
- ),
- migrations.AlterField(
- model_name='personlistblockinline',
- name='person_list_block',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization-network.PersonListBlock', verbose_name='Person List Block'),
- ),
- ]
diff --git a/app/organization/network/migrations/0019_auto_20160921_1032.py b/app/organization/network/migrations/0019_auto_20160921_1032.py
deleted file mode 100644
index 8e0e4357..00000000
--- a/app/organization/network/migrations/0019_auto_20160921_1032.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-21 08:32
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0018_auto_20160921_1006'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='pagecustompersonlistblockinline',
- name='page',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='page_custom_person_list_block_inline', to='organization-pages.CustomPage', verbose_name='Page'),
- ),
- migrations.AlterField(
- model_name='pagecustompersonlistblockinline',
- name='person_list_block',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='page_custom_person_list_block_inline', to='organization-network.PersonListBlock', verbose_name='Person List Block'),
- ),
- migrations.AlterField(
- model_name='personlistblockinline',
- name='person',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='person_list_block_inline', to='organization-network.Person', verbose_name='Person'),
- ),
- migrations.AlterField(
- model_name='personlistblockinline',
- name='person_list_block',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='person_list_block_inline', to='organization-network.PersonListBlock', verbose_name='Person List Block'),
- ),
- ]
diff --git a/app/organization/network/migrations/0020_auto_20160921_1043.py b/app/organization/network/migrations/0020_auto_20160921_1043.py
deleted file mode 100644
index 854bea0a..00000000
--- a/app/organization/network/migrations/0020_auto_20160921_1043.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-21 08:43
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0019_auto_20160921_1032'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='pagecustompersonlistblockinline',
- name='page',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='page_custom_person_list_block_inlines', to='organization-pages.CustomPage', verbose_name='Page'),
- ),
- migrations.AlterField(
- model_name='pagecustompersonlistblockinline',
- name='person_list_block',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='page_custom_person_list_block_inlines', to='organization-network.PersonListBlock', verbose_name='Person List Block'),
- ),
- migrations.AlterField(
- model_name='personlistblockinline',
- name='person',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='person_list_block_inlines', to='organization-network.Person', verbose_name='Person'),
- ),
- migrations.AlterField(
- model_name='personlistblockinline',
- name='person_list_block',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='person_list_block_inlines', to='organization-network.PersonListBlock', verbose_name='Person List Block'),
- ),
- ]
diff --git a/app/organization/network/migrations/0021_auto_20160921_1908.py b/app/organization/network/migrations/0021_auto_20160921_1908.py
deleted file mode 100644
index 0929f899..00000000
--- a/app/organization/network/migrations/0021_auto_20160921_1908.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-21 17:08
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0020_auto_20160921_1043'),
- ]
-
- operations = [
- migrations.RenameField(
- model_name='personactivity',
- old_name='date_begin',
- new_name='date_from',
- ),
- migrations.RenameField(
- model_name='personactivity',
- old_name='date_end',
- new_name='date_to',
- ),
- ]
diff --git a/app/organization/network/migrations/0022_auto_20160921_1934.py b/app/organization/network/migrations/0022_auto_20160921_1934.py
deleted file mode 100644
index 43e85691..00000000
--- a/app/organization/network/migrations/0022_auto_20160921_1934.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-21 17:34
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0021_auto_20160921_1908'),
- ]
-
- operations = [
- migrations.RenameModel(
- old_name='TrainingSpectiality',
- new_name='TrainingSpeciality',
- ),
- ]
diff --git a/app/organization/network/migrations/0023_auto_20160921_2043.py b/app/organization/network/migrations/0023_auto_20160921_2043.py
deleted file mode 100644
index c3921e51..00000000
--- a/app/organization/network/migrations/0023_auto_20160921_2043.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-21 18:43
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0022_auto_20160921_1934'),
- ]
-
- operations = [
- migrations.AlterModelOptions(
- name='department',
- options={'ordering': ['name'], 'verbose_name': 'department'},
- ),
- migrations.AlterModelOptions(
- name='organization',
- options={'ordering': ['name'], 'verbose_name': 'organization'},
- ),
- migrations.AlterModelOptions(
- name='organizationtype',
- options={'ordering': ['name'], 'verbose_name': 'organization type'},
- ),
- migrations.AlterModelOptions(
- name='team',
- options={'ordering': ['name'], 'verbose_name': 'team'},
- ),
- ]
diff --git a/app/organization/network/migrations/0024_personfile.py b/app/organization/network/migrations/0024_personfile.py
deleted file mode 100644
index c6d3fa13..00000000
--- a/app/organization/network/migrations/0024_personfile.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-28 12:32
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0023_auto_20160921_2043'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='PersonFile',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('file', mezzanine.core.fields.FileField(max_length=1024, verbose_name='document')),
- ('person', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='files', to='organization-network.Person', verbose_name='person')),
- ],
- options={
- 'ordering': ('_order',),
- },
- ),
- ]
diff --git a/app/organization/network/migrations/0025_auto_20160928_1858.py b/app/organization/network/migrations/0025_auto_20160928_1858.py
deleted file mode 100644
index d16f8fb8..00000000
--- a/app/organization/network/migrations/0025_auto_20160928_1858.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-28 16:58
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0024_personfile'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='organizationimage',
- name='type',
- field=models.CharField(choices=[('logo', 'logo'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type'),
- ),
- migrations.AlterField(
- model_name='personimage',
- name='type',
- field=models.CharField(choices=[('logo', 'logo'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type'),
- ),
- ]
diff --git a/app/organization/network/migrations/0026_auto_20160929_1810.py b/app/organization/network/migrations/0026_auto_20160929_1810.py
deleted file mode 100644
index 68dd4778..00000000
--- a/app/organization/network/migrations/0026_auto_20160929_1810.py
+++ /dev/null
@@ -1,181 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-09-29 16:10
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0025_auto_20160928_1858'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='activityframework',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='activityframework',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='activityframework',
- name='name_en',
- field=models.CharField(max_length=512, null=True, verbose_name='name'),
- ),
- migrations.AddField(
- model_name='activityframework',
- name='name_fr',
- field=models.CharField(max_length=512, null=True, verbose_name='name'),
- ),
- migrations.AddField(
- model_name='activityfunction',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='activityfunction',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='activityfunction',
- name='name_en',
- field=models.CharField(max_length=512, null=True, verbose_name='name'),
- ),
- migrations.AddField(
- model_name='activityfunction',
- name='name_fr',
- field=models.CharField(max_length=512, null=True, verbose_name='name'),
- ),
- migrations.AddField(
- model_name='activitygrade',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='activitygrade',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='activitygrade',
- name='name_en',
- field=models.CharField(max_length=512, null=True, verbose_name='name'),
- ),
- migrations.AddField(
- model_name='activitygrade',
- name='name_fr',
- field=models.CharField(max_length=512, null=True, verbose_name='name'),
- ),
- migrations.AddField(
- model_name='activitystatus',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='activitystatus',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='activitystatus',
- name='name_en',
- field=models.CharField(max_length=512, null=True, verbose_name='name'),
- ),
- migrations.AddField(
- model_name='activitystatus',
- name='name_fr',
- field=models.CharField(max_length=512, null=True, verbose_name='name'),
- ),
- migrations.AddField(
- model_name='traininglevel',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='traininglevel',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='traininglevel',
- name='name_en',
- field=models.CharField(max_length=512, null=True, verbose_name='name'),
- ),
- migrations.AddField(
- model_name='traininglevel',
- name='name_fr',
- field=models.CharField(max_length=512, null=True, verbose_name='name'),
- ),
- migrations.AddField(
- model_name='trainingspeciality',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='trainingspeciality',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='trainingspeciality',
- name='name_en',
- field=models.CharField(max_length=512, null=True, verbose_name='name'),
- ),
- migrations.AddField(
- model_name='trainingspeciality',
- name='name_fr',
- field=models.CharField(max_length=512, null=True, verbose_name='name'),
- ),
- migrations.AddField(
- model_name='trainingtopic',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='trainingtopic',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='trainingtopic',
- name='name_en',
- field=models.CharField(max_length=512, null=True, verbose_name='name'),
- ),
- migrations.AddField(
- model_name='trainingtopic',
- name='name_fr',
- field=models.CharField(max_length=512, null=True, verbose_name='name'),
- ),
- migrations.AddField(
- model_name='trainingtype',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='trainingtype',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='trainingtype',
- name='name_en',
- field=models.CharField(max_length=512, null=True, verbose_name='name'),
- ),
- migrations.AddField(
- model_name='trainingtype',
- name='name_fr',
- field=models.CharField(max_length=512, null=True, verbose_name='name'),
- ),
- migrations.AlterField(
- model_name='personactivity',
- name='person',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='activities', to='organization-network.Person', verbose_name='person'),
- ),
- ]
diff --git a/app/organization/network/migrations/0027_personactivity_second_team_text.py b/app/organization/network/migrations/0027_personactivity_second_team_text.py
deleted file mode 100644
index 26b12ad0..00000000
--- a/app/organization/network/migrations/0027_personactivity_second_team_text.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-03 23:01
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0026_auto_20160929_1810'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='personactivity',
- name='second_team_text',
- field=models.CharField(blank=True, max_length=256, null=True, verbose_name='second team text'),
- ),
- ]
diff --git a/app/organization/network/migrations/0028_team_is_legacy.py b/app/organization/network/migrations/0028_team_is_legacy.py
deleted file mode 100644
index bd997c59..00000000
--- a/app/organization/network/migrations/0028_team_is_legacy.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-04 07:23
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0027_personactivity_second_team_text'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='team',
- name='is_legacy',
- field=models.BooleanField(default=False, verbose_name='is legacy'),
- ),
- ]
diff --git a/app/organization/network/migrations/0029_auto_20161004_1556.py b/app/organization/network/migrations/0029_auto_20161004_1556.py
deleted file mode 100644
index 58efd4a3..00000000
--- a/app/organization/network/migrations/0029_auto_20161004_1556.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-04 13:56
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0028_team_is_legacy'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='person',
- name='external_id',
- field=models.CharField(blank=True, max_length=128, null=True, verbose_name='external ID'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='external_id',
- field=models.CharField(blank=True, max_length=128, null=True, verbose_name='external ID'),
- ),
- ]
diff --git a/app/organization/network/migrations/0030_team_parent.py b/app/organization/network/migrations/0030_team_parent.py
deleted file mode 100644
index 381cdfff..00000000
--- a/app/organization/network/migrations/0030_team_parent.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-04 15:55
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0029_auto_20161004_1556'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='team',
- name='parent',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='children', to='organization-network.Team', verbose_name='parent team'),
- ),
- ]
diff --git a/app/organization/network/migrations/0031_auto_20161005_1403.py b/app/organization/network/migrations/0031_auto_20161005_1403.py
deleted file mode 100644
index 09945c16..00000000
--- a/app/organization/network/migrations/0031_auto_20161005_1403.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-10-05 12:03
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0030_team_parent'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='organization',
- name='is_on_map',
- field=models.BooleanField(default=False, verbose_name='is on map'),
- ),
- ]
diff --git a/app/organization/network/migrations/0032_auto_20161005_1412.py b/app/organization/network/migrations/0032_auto_20161005_1412.py
deleted file mode 100644
index 6f0f3572..00000000
--- a/app/organization/network/migrations/0032_auto_20161005_1412.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-10-05 12:12
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0031_auto_20161005_1403'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='organization',
- name='latitude',
- field=models.CharField(blank=True, max_length=40, verbose_name='latitude'),
- ),
- migrations.AddField(
- model_name='organization',
- name='longitude',
- field=models.CharField(blank=True, max_length=40, verbose_name='longitude'),
- ),
- ]
diff --git a/app/organization/network/migrations/0033_auto_20161005_1427.py b/app/organization/network/migrations/0033_auto_20161005_1427.py
deleted file mode 100644
index 7a0fb063..00000000
--- a/app/organization/network/migrations/0033_auto_20161005_1427.py
+++ /dev/null
@@ -1,38 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-10-05 12:27
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0032_auto_20161005_1412'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='organization',
- name='latitude',
- ),
- migrations.RemoveField(
- model_name='organization',
- name='longitude',
- ),
- migrations.AddField(
- model_name='organization',
- name='lat',
- field=models.DecimalField(blank=True, decimal_places=7, help_text='Calculated automatically if mappable location is set.', max_digits=10, null=True, verbose_name='Latitude'),
- ),
- migrations.AddField(
- model_name='organization',
- name='lon',
- field=models.DecimalField(blank=True, decimal_places=7, help_text='Calculated automatically if mappable location is set.', max_digits=10, null=True, verbose_name='Longitude'),
- ),
- migrations.AddField(
- model_name='organization',
- name='mappable_location',
- field=models.CharField(blank=True, help_text='This address will be used to calculate latitude and longitude. Leave blank and set Latitude and Longitude to specify the location yourself, or leave all three blank to auto-fill from the Location field.', max_length=128),
- ),
- ]
diff --git a/app/organization/network/migrations/0034_organization_city.py b/app/organization/network/migrations/0034_organization_city.py
deleted file mode 100644
index b773c3b1..00000000
--- a/app/organization/network/migrations/0034_organization_city.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-10-05 12:43
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0033_auto_20161005_1427'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='organization',
- name='city',
- field=models.CharField(blank=True, max_length=255, verbose_name='city'),
- ),
- ]
diff --git a/app/organization/network/migrations/0035_auto_20161005_1457.py b/app/organization/network/migrations/0035_auto_20161005_1457.py
deleted file mode 100644
index 5fe10c25..00000000
--- a/app/organization/network/migrations/0035_auto_20161005_1457.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-10-05 12:57
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0034_organization_city'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='organization',
- name='address',
- field=models.TextField(verbose_name='address'),
- ),
- ]
diff --git a/app/organization/network/migrations/0036_auto_20161005_1509.py b/app/organization/network/migrations/0036_auto_20161005_1509.py
deleted file mode 100644
index 7ad0e2b3..00000000
--- a/app/organization/network/migrations/0036_auto_20161005_1509.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-10-05 13:09
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0035_auto_20161005_1457'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='organization',
- name='city',
- field=models.CharField(max_length=255, verbose_name='city'),
- ),
- migrations.AlterField(
- model_name='organization',
- name='postal_code',
- field=models.CharField(max_length=16, verbose_name='postal code'),
- ),
- ]
diff --git a/app/organization/network/migrations/0037_organizationtype_css_class.py b/app/organization/network/migrations/0037_organizationtype_css_class.py
deleted file mode 100644
index ba03782c..00000000
--- a/app/organization/network/migrations/0037_organizationtype_css_class.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-12 15:07
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0036_auto_20161005_1509'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='organizationtype',
- name='css_class',
- field=models.CharField(blank=True, help_text='Determine color on map.', max_length=64, null=True, verbose_name='class css'),
- ),
- ]
diff --git a/app/organization/network/migrations/0038_auto_20161013_1631.py b/app/organization/network/migrations/0038_auto_20161013_1631.py
deleted file mode 100644
index 69b215dc..00000000
--- a/app/organization/network/migrations/0038_auto_20161013_1631.py
+++ /dev/null
@@ -1,83 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-13 14:31
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0006_auto_20161013_1631'),
- ('organization-network', '0037_organizationtype_css_class'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='OrganizationPlaylist',
- fields=[
- ('playlist_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-media.Playlist')),
- ('organization', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='playlists', to='organization-network.Organization', verbose_name='organization')),
- ],
- options={
- 'abstract': False,
- },
- bases=('organization-media.playlist',),
- ),
- migrations.CreateModel(
- name='PersonPlaylist',
- fields=[
- ('playlist_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-media.Playlist')),
- ('person', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='playlists', to='organization-network.Person', verbose_name='person')),
- ],
- options={
- 'abstract': False,
- },
- bases=('organization-media.playlist',),
- ),
- migrations.RemoveField(
- model_name='organizationaudio',
- name='audio_ptr',
- ),
- migrations.RemoveField(
- model_name='organizationaudio',
- name='organization',
- ),
- migrations.RemoveField(
- model_name='organizationvideo',
- name='organization',
- ),
- migrations.RemoveField(
- model_name='organizationvideo',
- name='video_ptr',
- ),
- migrations.RemoveField(
- model_name='personaudio',
- name='audio_ptr',
- ),
- migrations.RemoveField(
- model_name='personaudio',
- name='person',
- ),
- migrations.RemoveField(
- model_name='personvideo',
- name='person',
- ),
- migrations.RemoveField(
- model_name='personvideo',
- name='video_ptr',
- ),
- migrations.DeleteModel(
- name='OrganizationAudio',
- ),
- migrations.DeleteModel(
- name='OrganizationVideo',
- ),
- migrations.DeleteModel(
- name='PersonAudio',
- ),
- migrations.DeleteModel(
- name='PersonVideo',
- ),
- ]
diff --git a/app/organization/network/migrations/0039_auto_20161014_0002.py b/app/organization/network/migrations/0039_auto_20161014_0002.py
deleted file mode 100644
index 22b026d3..00000000
--- a/app/organization/network/migrations/0039_auto_20161014_0002.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-13 22:02
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0009_auto_20161013_2353'),
- ('organization-network', '0038_auto_20161013_1631'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='organizationplaylist',
- name='playlist_ptr',
- ),
- migrations.RemoveField(
- model_name='personplaylist',
- name='playlist_ptr',
- ),
- migrations.AddField(
- model_name='organizationplaylist',
- name='playlistrelated_ptr',
- field=models.OneToOneField(auto_created=True, default=1, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-media.PlaylistRelated'),
- preserve_default=False,
- ),
- migrations.AddField(
- model_name='personplaylist',
- name='playlistrelated_ptr',
- field=models.OneToOneField(auto_created=True, default=1, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-media.PlaylistRelated'),
- preserve_default=False,
- ),
- ]
diff --git a/app/organization/network/migrations/0040_auto_20161018_1203.py b/app/organization/network/migrations/0040_auto_20161018_1203.py
deleted file mode 100644
index fd0a7d0e..00000000
--- a/app/organization/network/migrations/0040_auto_20161018_1203.py
+++ /dev/null
@@ -1,38 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-18 10:03
-from __future__ import unicode_literals
-
-import datetime
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0039_auto_20161014_0002'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='person',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='Description'),
- ),
- migrations.AddField(
- model_name='person',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='Description'),
- ),
- migrations.AddField(
- model_name='personlistblock',
- name='date_created',
- field=models.DateTimeField(auto_now_add=True, default=datetime.datetime(2016, 10, 18, 12, 3, 24, 592756), verbose_name='creation date'),
- preserve_default=False,
- ),
- migrations.AddField(
- model_name='personlistblock',
- name='date_modified',
- field=models.DateTimeField(auto_now=True, default=datetime.datetime(2016, 10, 18, 12, 3, 30, 482037), verbose_name='last modification date'),
- preserve_default=False,
- ),
- ]
diff --git a/app/organization/network/migrations/0041_auto_20161018_1236.py b/app/organization/network/migrations/0041_auto_20161018_1236.py
deleted file mode 100644
index b01aa503..00000000
--- a/app/organization/network/migrations/0041_auto_20161018_1236.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-18 10:36
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0040_auto_20161018_1203'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='personlistblock',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='personlistblock',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='personlistblock',
- name='title_en',
- field=models.CharField(max_length=1024, null=True, verbose_name='title'),
- ),
- migrations.AddField(
- model_name='personlistblock',
- name='title_fr',
- field=models.CharField(max_length=1024, null=True, verbose_name='title'),
- ),
- ]
diff --git a/app/organization/network/migrations/0042_auto_20161021_1319.py b/app/organization/network/migrations/0042_auto_20161021_1319.py
deleted file mode 100644
index 39acb2a0..00000000
--- a/app/organization/network/migrations/0042_auto_20161021_1319.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-21 11:19
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0041_auto_20161018_1236'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='organizationlink',
- name='title',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- migrations.AddField(
- model_name='personlink',
- name='title',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- ]
diff --git a/app/organization/network/migrations/0043_auto_20161021_1507.py b/app/organization/network/migrations/0043_auto_20161021_1507.py
deleted file mode 100644
index d426f0de..00000000
--- a/app/organization/network/migrations/0043_auto_20161021_1507.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-21 13:07
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django_countries.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0042_auto_20161021_1319'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='organization',
- name='address',
- field=models.TextField(blank=True, verbose_name='address'),
- ),
- migrations.AlterField(
- model_name='organization',
- name='city',
- field=models.CharField(blank=True, max_length=255, null=True, verbose_name='city'),
- ),
- migrations.AlterField(
- model_name='organization',
- name='country',
- field=django_countries.fields.CountryField(blank=True, max_length=2, null=True, verbose_name='country'),
- ),
- migrations.AlterField(
- model_name='organization',
- name='postal_code',
- field=models.CharField(blank=True, max_length=16, null=True, verbose_name='postal code'),
- ),
- ]
diff --git a/app/organization/network/migrations/0044_auto_20161021_1553.py b/app/organization/network/migrations/0044_auto_20161021_1553.py
deleted file mode 100644
index 6edd4bef..00000000
--- a/app/organization/network/migrations/0044_auto_20161021_1553.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-21 13:53
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0043_auto_20161021_1507'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='personactivity',
- name='phd_officer_3',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='phd_officer_3_activity', to='organization-network.Person', verbose_name='PhD officer 3'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='third_employer',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='third_employer_activity', to='organization-network.Organization', verbose_name='third employer'),
- ),
- ]
diff --git a/app/organization/network/migrations/0045_auto_20161021_1803.py b/app/organization/network/migrations/0045_auto_20161021_1803.py
deleted file mode 100644
index ea1d2adc..00000000
--- a/app/organization/network/migrations/0045_auto_20161021_1803.py
+++ /dev/null
@@ -1,87 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-21 16:03
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0022_projectlink_title'),
- ('organization-network', '0044_auto_20161021_1553'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='personactivity',
- name='phd_director',
- ),
- migrations.RemoveField(
- model_name='personactivity',
- name='phd_officer_1',
- ),
- migrations.RemoveField(
- model_name='personactivity',
- name='phd_officer_2',
- ),
- migrations.RemoveField(
- model_name='personactivity',
- name='phd_officer_3',
- ),
- migrations.RemoveField(
- model_name='personactivity',
- name='project',
- ),
- migrations.AddField(
- model_name='organization',
- name='initials',
- field=models.CharField(blank=True, max_length=128, null=True, verbose_name='initials'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='phd_directors',
- field=models.ManyToManyField(blank=True, related_name='phd_director_activities', to='organization-network.Person', verbose_name='PhD directors'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='phd_officers',
- field=models.ManyToManyField(blank=True, related_name='phd_officer_activities', to='organization-network.Person', verbose_name='PhD officers'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='projects',
- field=models.ManyToManyField(blank=True, related_name='activities', to='organization-projects.Project', verbose_name='projects'),
- ),
- migrations.AlterField(
- model_name='personactivity',
- name='attachment_organization',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='attachment_activities', to='organization-network.Organization', verbose_name='attachment organization'),
- ),
- migrations.AlterField(
- model_name='personactivity',
- name='employer',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='employer_activities', to='organization-network.Organization', verbose_name='employer'),
- ),
- migrations.AlterField(
- model_name='personactivity',
- name='second_employer',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='second_employer_activities', to='organization-network.Organization', verbose_name='second employer'),
- ),
- migrations.AlterField(
- model_name='personactivity',
- name='second_team',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='second_team_activities', to='organization-network.Team', verbose_name='second team'),
- ),
- migrations.AlterField(
- model_name='personactivity',
- name='team',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='team_activities', to='organization-network.Team', verbose_name='team'),
- ),
- migrations.AlterField(
- model_name='personactivity',
- name='third_employer',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='third_employer_activities', to='organization-network.Organization', verbose_name='third employer'),
- ),
- ]
diff --git a/app/organization/network/migrations/0046_auto_20161026_1025.py b/app/organization/network/migrations/0046_auto_20161026_1025.py
deleted file mode 100644
index 6d4548b0..00000000
--- a/app/organization/network/migrations/0046_auto_20161026_1025.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-26 08:25
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0045_auto_20161021_1803'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='organizationlink',
- name='title_en',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- migrations.AddField(
- model_name='organizationlink',
- name='title_fr',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- migrations.AddField(
- model_name='personlink',
- name='title_en',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- migrations.AddField(
- model_name='personlink',
- name='title_fr',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- ]
diff --git a/app/organization/network/migrations/0047_auto_20161104_1424.py b/app/organization/network/migrations/0047_auto_20161104_1424.py
deleted file mode 100644
index 7301dfbf..00000000
--- a/app/organization/network/migrations/0047_auto_20161104_1424.py
+++ /dev/null
@@ -1,83 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-04 13:24
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0046_auto_20161026_1025'),
- ]
-
- operations = [
- migrations.RenameField(
- model_name='personactivity',
- old_name='phd_postdoctoralsituation',
- new_name='phd_post_doctoral_situation',
- ),
- migrations.RemoveField(
- model_name='personactivity',
- name='attachment_organization',
- ),
- migrations.RemoveField(
- model_name='personactivity',
- name='employer',
- ),
- migrations.RemoveField(
- model_name='personactivity',
- name='phd_officers',
- ),
- migrations.RemoveField(
- model_name='personactivity',
- name='second_employer',
- ),
- migrations.RemoveField(
- model_name='personactivity',
- name='second_team',
- ),
- migrations.RemoveField(
- model_name='personactivity',
- name='second_team_text',
- ),
- migrations.RemoveField(
- model_name='personactivity',
- name='team',
- ),
- migrations.RemoveField(
- model_name='personactivity',
- name='third_employer',
- ),
- migrations.AddField(
- model_name='personactivity',
- name='employers',
- field=models.ManyToManyField(blank=True, related_name='employer_project_activities', to='organization-network.Organization', verbose_name='employers'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='organization',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='project_activities', to='organization-network.Organization', verbose_name='organization (attachment or subscribed)'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='supervisors',
- field=models.ManyToManyField(blank=True, related_name='supervisor_activities', to='organization-network.Person', verbose_name='supervisors'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='team_text',
- field=models.CharField(blank=True, max_length=256, null=True, verbose_name='other team text'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='teams',
- field=models.ManyToManyField(blank=True, related_name='team_activities', to='organization-network.Team', verbose_name='teams'),
- ),
- migrations.AlterField(
- model_name='personactivity',
- name='rd_quota_float',
- field=models.FloatField(blank=True, null=True, verbose_name='R&D quota (float)'),
- ),
- ]
diff --git a/app/organization/network/migrations/0048_auto_20161104_1445.py b/app/organization/network/migrations/0048_auto_20161104_1445.py
deleted file mode 100644
index 460c8f16..00000000
--- a/app/organization/network/migrations/0048_auto_20161104_1445.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-04 13:45
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0047_auto_20161104_1424'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='organization',
- name='mappable_location',
- field=models.CharField(blank=True, help_text='This address will be used to calculate latitude and longitude. Leave blank and set Latitude and Longitude to specify the location yourself, or leave all three blank to auto-fill from the Location field.', max_length=128, null=True),
- ),
- ]
diff --git a/app/organization/network/migrations/0049_auto_20161104_1453.py b/app/organization/network/migrations/0049_auto_20161104_1453.py
deleted file mode 100644
index 7d6e42d4..00000000
--- a/app/organization/network/migrations/0049_auto_20161104_1453.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-04 13:53
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0048_auto_20161104_1445'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='personactivity',
- name='organization',
- ),
- migrations.AddField(
- model_name='personactivity',
- name='organizations',
- field=models.ManyToManyField(blank=True, related_name='project_activities', to='organization-network.Organization', verbose_name='organizations (attachment or subscribed)'),
- ),
- ]
diff --git a/app/organization/network/migrations/0050_auto_20161106_2147.py b/app/organization/network/migrations/0050_auto_20161106_2147.py
deleted file mode 100644
index 35b33cd2..00000000
--- a/app/organization/network/migrations/0050_auto_20161106_2147.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-06 20:47
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0049_auto_20161104_1453'),
- ]
-
- operations = [
- migrations.AlterModelOptions(
- name='activitystatus',
- options={'ordering': ['-order'], 'verbose_name': 'activity status'},
- ),
- migrations.AlterModelOptions(
- name='personactivity',
- options={'ordering': ['person__last_name'], 'verbose_name': 'activity', 'verbose_name_plural': 'activities'},
- ),
- migrations.AddField(
- model_name='activitystatus',
- name='display',
- field=models.BooleanField(default=False, verbose_name='display on team page'),
- ),
- migrations.AddField(
- model_name='activitystatus',
- name='order',
- field=models.IntegerField(default=1, verbose_name='order number'),
- ),
- ]
diff --git a/app/organization/network/migrations/0051_auto_20161106_2213.py b/app/organization/network/migrations/0051_auto_20161106_2213.py
deleted file mode 100644
index 1cf5bc11..00000000
--- a/app/organization/network/migrations/0051_auto_20161106_2213.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-06 21:13
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0050_auto_20161106_2147'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='personactivity',
- name='status',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='activities', to='organization-network.ActivityStatus', verbose_name='status'),
- ),
- ]
diff --git a/app/organization/network/migrations/0052_auto_20161106_2239.py b/app/organization/network/migrations/0052_auto_20161106_2239.py
deleted file mode 100644
index 3697ba76..00000000
--- a/app/organization/network/migrations/0052_auto_20161106_2239.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-06 21:39
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0051_auto_20161106_2213'),
- ]
-
- operations = [
- migrations.AlterModelOptions(
- name='activitystatus',
- options={'ordering': ['order'], 'verbose_name': 'activity status'},
- ),
- migrations.AlterField(
- model_name='activitystatus',
- name='order',
- field=models.IntegerField(default=100, verbose_name='order number'),
- ),
- ]
diff --git a/app/organization/network/migrations/0053_auto_20161107_1214.py b/app/organization/network/migrations/0053_auto_20161107_1214.py
deleted file mode 100644
index 6893c21e..00000000
--- a/app/organization/network/migrations/0053_auto_20161107_1214.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-07 11:14
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0052_auto_20161106_2239'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='activitystatus',
- name='display',
- field=models.BooleanField(default=True, verbose_name='display on team page'),
- ),
- ]
diff --git a/app/organization/network/migrations/0054_auto_20161107_1543.py b/app/organization/network/migrations/0054_auto_20161107_1543.py
deleted file mode 100644
index b4a4c79e..00000000
--- a/app/organization/network/migrations/0054_auto_20161107_1543.py
+++ /dev/null
@@ -1,46 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-07 14:43
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0053_auto_20161107_1214'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='personblock',
- name='content_en',
- field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Content'),
- ),
- migrations.AddField(
- model_name='personblock',
- name='content_fr',
- field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Content'),
- ),
- migrations.AddField(
- model_name='personblock',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='personblock',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='personblock',
- name='title_en',
- field=models.CharField(max_length=1024, null=True, verbose_name='title'),
- ),
- migrations.AddField(
- model_name='personblock',
- name='title_fr',
- field=models.CharField(max_length=1024, null=True, verbose_name='title'),
- ),
- ]
diff --git a/app/organization/network/migrations/0055_activitystatus_display_text.py b/app/organization/network/migrations/0055_activitystatus_display_text.py
deleted file mode 100644
index 995bc354..00000000
--- a/app/organization/network/migrations/0055_activitystatus_display_text.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-08 15:12
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0054_auto_20161107_1543'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='activitystatus',
- name='display_text',
- field=models.CharField(blank=True, default=True, max_length=128, verbose_name='display text'),
- ),
- ]
diff --git a/app/organization/network/migrations/0056_auto_20161108_1619.py b/app/organization/network/migrations/0056_auto_20161108_1619.py
deleted file mode 100644
index 43bfa09d..00000000
--- a/app/organization/network/migrations/0056_auto_20161108_1619.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-08 15:19
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0055_activitystatus_display_text'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='activitystatus',
- name='display_text',
- field=models.CharField(blank=True, max_length=128, null=True, verbose_name='display text'),
- ),
- ]
diff --git a/app/organization/network/migrations/0057_auto_20161108_1807.py b/app/organization/network/migrations/0057_auto_20161108_1807.py
deleted file mode 100644
index 85adfc67..00000000
--- a/app/organization/network/migrations/0057_auto_20161108_1807.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-08 17:07
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0056_auto_20161108_1619'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='activitystatus',
- name='display_text_en',
- field=models.CharField(blank=True, max_length=128, null=True, verbose_name='display text'),
- ),
- migrations.AddField(
- model_name='activitystatus',
- name='display_text_fr',
- field=models.CharField(blank=True, max_length=128, null=True, verbose_name='display text'),
- ),
- ]
diff --git a/app/organization/network/migrations/0058_auto_20161109_1218.py b/app/organization/network/migrations/0058_auto_20161109_1218.py
deleted file mode 100644
index ae96fa15..00000000
--- a/app/organization/network/migrations/0058_auto_20161109_1218.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-09 11:18
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-core', '0004_auto_20160923_1141'),
- ('organization-network', '0057_auto_20161108_1807'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='TeamLink',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('url', models.URLField(blank=True, max_length=512, verbose_name='URL')),
- ('title', models.CharField(blank=True, max_length=1024, null=True, verbose_name='title')),
- ('link_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organization-core.LinkType', verbose_name='link type')),
- ('team', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='links', to='organization-network.Team', verbose_name='team')),
- ],
- options={
- 'verbose_name_plural': 'links',
- 'abstract': False,
- 'verbose_name': 'link',
- },
- ),
- migrations.AddField(
- model_name='organization',
- name='is_host',
- field=models.BooleanField(default=False, verbose_name='is host'),
- ),
- ]
diff --git a/app/organization/network/migrations/0059_auto_20161113_2236.py b/app/organization/network/migrations/0059_auto_20161113_2236.py
deleted file mode 100644
index ea4703b0..00000000
--- a/app/organization/network/migrations/0059_auto_20161113_2236.py
+++ /dev/null
@@ -1,111 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-13 21:36
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0058_auto_20161109_1218'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ActivityStatusFamily',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('name_fr', models.CharField(max_length=512, null=True, verbose_name='name')),
- ('name_en', models.CharField(max_length=512, null=True, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('description_fr', models.TextField(blank=True, null=True, verbose_name='description')),
- ('description_en', models.TextField(blank=True, null=True, verbose_name='description')),
- ('order', models.IntegerField(default=100, verbose_name='order number')),
- ('display', models.BooleanField(default=True, verbose_name='display on team page')),
- ],
- options={
- 'ordering': ['order'],
- 'verbose_name': 'Status family',
- },
- ),
- migrations.AlterModelOptions(
- name='activityframework',
- options={'verbose_name': 'framework', 'verbose_name_plural': 'frameworks'},
- ),
- migrations.AlterModelOptions(
- name='activityfunction',
- options={'verbose_name': 'function', 'verbose_name_plural': 'functions'},
- ),
- migrations.AlterModelOptions(
- name='activitygrade',
- options={'verbose_name': 'grade', 'verbose_name_plural': 'grades'},
- ),
- migrations.AlterModelOptions(
- name='activitystatus',
- options={'ordering': ['order'], 'verbose_name': 'status'},
- ),
- migrations.AlterModelOptions(
- name='budgetcode',
- options={'verbose_name': 'budget code', 'verbose_name_plural': 'budget codes'},
- ),
- migrations.AlterModelOptions(
- name='recordpiece',
- options={'verbose_name': 'record piece', 'verbose_name_plural': 'record pieces'},
- ),
- migrations.AlterModelOptions(
- name='traininglevel',
- options={'verbose_name': 'training level', 'verbose_name_plural': 'training levels'},
- ),
- migrations.AlterModelOptions(
- name='trainingspeciality',
- options={'verbose_name': 'training speciality', 'verbose_name_plural': 'training specialities'},
- ),
- migrations.AlterModelOptions(
- name='trainingtopic',
- options={'verbose_name': 'training topic', 'verbose_name_plural': 'training topics'},
- ),
- migrations.AlterModelOptions(
- name='trainingtype',
- options={'verbose_name': 'training type', 'verbose_name_plural': 'training types'},
- ),
- migrations.RemoveField(
- model_name='activitystatus',
- name='display_text',
- ),
- migrations.RemoveField(
- model_name='activitystatus',
- name='display_text_en',
- ),
- migrations.RemoveField(
- model_name='activitystatus',
- name='display_text_fr',
- ),
- migrations.AddField(
- model_name='organization',
- name='opening_times',
- field=models.TextField(blank=True, verbose_name='opening times'),
- ),
- migrations.AddField(
- model_name='organization',
- name='subway_access',
- field=models.TextField(blank=True, verbose_name='subway access'),
- ),
- migrations.AddField(
- model_name='organization',
- name='telephone',
- field=models.CharField(blank=True, max_length=64, null=True, verbose_name='telephone'),
- ),
- migrations.AddField(
- model_name='person',
- name='telephone',
- field=models.CharField(blank=True, max_length=64, null=True, verbose_name='telephone'),
- ),
- migrations.AddField(
- model_name='activitystatus',
- name='family',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='activity_statuses', to='organization-network.ActivityStatusFamily', verbose_name='family'),
- ),
- ]
diff --git a/app/organization/network/migrations/0060_auto_20161113_2253.py b/app/organization/network/migrations/0060_auto_20161113_2253.py
deleted file mode 100644
index 889889c5..00000000
--- a/app/organization/network/migrations/0060_auto_20161113_2253.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-13 21:53
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0059_auto_20161113_2236'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='organization',
- name='opening_times_en',
- field=models.TextField(blank=True, null=True, verbose_name='opening times'),
- ),
- migrations.AddField(
- model_name='organization',
- name='opening_times_fr',
- field=models.TextField(blank=True, null=True, verbose_name='opening times'),
- ),
- migrations.AddField(
- model_name='organization',
- name='subway_access_en',
- field=models.TextField(blank=True, null=True, verbose_name='subway access'),
- ),
- migrations.AddField(
- model_name='organization',
- name='subway_access_fr',
- field=models.TextField(blank=True, null=True, verbose_name='subway access'),
- ),
- ]
diff --git a/app/organization/network/migrations/0061_auto_20161114_1517.py b/app/organization/network/migrations/0061_auto_20161114_1517.py
deleted file mode 100644
index b842c0f2..00000000
--- a/app/organization/network/migrations/0061_auto_20161114_1517.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-14 14:17
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0060_auto_20161113_2253'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='activitystatus',
- name='family',
- ),
- migrations.AddField(
- model_name='activitystatus',
- name='parent',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='children', to='organization-network.ActivityStatus', verbose_name='parent'),
- ),
- migrations.DeleteModel(
- name='ActivityStatusFamily',
- ),
- ]
diff --git a/app/organization/network/migrations/0062_auto_20161114_1842.py b/app/organization/network/migrations/0062_auto_20161114_1842.py
deleted file mode 100644
index c1a2d9e3..00000000
--- a/app/organization/network/migrations/0062_auto_20161114_1842.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-14 17:42
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0061_auto_20161114_1517'),
- ]
-
- operations = [
- migrations.AlterModelOptions(
- name='personactivity',
- options={'ordering': ['-date_from'], 'verbose_name': 'activity', 'verbose_name_plural': 'activities'},
- ),
- ]
diff --git a/app/organization/network/migrations/0063_auto_20161201_1154.py b/app/organization/network/migrations/0063_auto_20161201_1154.py
deleted file mode 100644
index 75c53074..00000000
--- a/app/organization/network/migrations/0063_auto_20161201_1154.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2016-12-01 10:54
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0062_auto_20161114_1842'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='organization',
- name='organizations_content',
- field=models.ManyToManyField(blank=True, help_text='Usefull for host organization', related_name='_organization_organizations_content_+', to='organization-network.Organization', verbose_name='Linked organizations (in content)'),
- ),
- migrations.AddField(
- model_name='organization',
- name='organizations_footer',
- field=models.ManyToManyField(blank=True, help_text='Usefull for host organization', related_name='_organization_organizations_footer_+', to='organization-network.Organization', verbose_name='Linked organizations (in footer)'),
- ),
- ]
diff --git a/app/organization/network/migrations/0064_auto_20161205_1536.py b/app/organization/network/migrations/0064_auto_20161205_1536.py
deleted file mode 100644
index 1d920152..00000000
--- a/app/organization/network/migrations/0064_auto_20161205_1536.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2016-12-05 14:36
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0063_auto_20161201_1154'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='organization',
- name='order',
- field=models.IntegerField(default=10, verbose_name='order number'),
- ),
- migrations.AlterField(
- model_name='organizationimage',
- name='type',
- field=models.CharField(choices=[('logo', 'logo'), ('logo_white', 'logo white'), ('logo_black', 'logo black'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type'),
- ),
- migrations.AlterField(
- model_name='personimage',
- name='type',
- field=models.CharField(choices=[('logo', 'logo'), ('logo_white', 'logo white'), ('logo_black', 'logo black'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type'),
- ),
- ]
diff --git a/app/organization/network/migrations/0065_auto_20161208_1244.py b/app/organization/network/migrations/0065_auto_20161208_1244.py
deleted file mode 100644
index 27204f09..00000000
--- a/app/organization/network/migrations/0065_auto_20161208_1244.py
+++ /dev/null
@@ -1,85 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2016-12-08 11:44
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0064_auto_20161205_1536'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='OrganizationLinked',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ],
- options={
- 'verbose_name': 'Organization Linked',
- },
- ),
- migrations.CreateModel(
- name='OrganizationLinkedBlockInline',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('organization_linked', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='organization_linked_block_inline_list', to='organization-network.OrganizationLinked', verbose_name='organization list')),
- ],
- options={
- 'ordering': ('_order',),
- },
- ),
- migrations.CreateModel(
- name='OrganizationLinkedInline',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ],
- options={
- 'ordering': ('_order',),
- },
- ),
- migrations.RemoveField(
- model_name='organization',
- name='order',
- ),
- migrations.RemoveField(
- model_name='organization',
- name='organizations_content',
- ),
- migrations.RemoveField(
- model_name='organization',
- name='organizations_footer',
- ),
- migrations.AddField(
- model_name='organization',
- name='_order',
- field=mezzanine.core.fields.OrderField(null=True, verbose_name='Order'),
- ),
- migrations.AddField(
- model_name='organizationlinkedinline',
- name='organization',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='organization_linked_inline_from', to='organization-network.Organization', verbose_name='organization'),
- ),
- migrations.AddField(
- model_name='organizationlinkedinline',
- name='organization_list',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='organization_linked_inline_linked', to='organization-network.OrganizationLinked', verbose_name='organization linked'),
- ),
- migrations.AddField(
- model_name='organizationlinkedblockinline',
- name='organization_main',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='organization_linked_block', to='organization-network.Organization', verbose_name='organization'),
- ),
- ]
diff --git a/app/organization/network/migrations/0066_auto_20161216_1603.py b/app/organization/network/migrations/0066_auto_20161216_1603.py
deleted file mode 100644
index ff05ef2d..00000000
--- a/app/organization/network/migrations/0066_auto_20161216_1603.py
+++ /dev/null
@@ -1,55 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2016-12-16 15:03
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0065_auto_20161208_1244'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='OrganizationService',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('name_fr', models.CharField(max_length=512, null=True, verbose_name='name')),
- ('name_en', models.CharField(max_length=512, null=True, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('description_fr', models.TextField(blank=True, null=True, verbose_name='description')),
- ('description_en', models.TextField(blank=True, null=True, verbose_name='description')),
- ('url', models.URLField(blank=True, max_length=512, verbose_name='URL')),
- ('image', mezzanine.core.fields.FileField(max_length=1024, verbose_name='Image')),
- ],
- options={
- 'ordering': ['name'],
- 'abstract': False,
- },
- ),
- migrations.AddField(
- model_name='organization',
- name='bio',
- field=models.TextField(blank=True, verbose_name='bio'),
- ),
- migrations.AddField(
- model_name='organization',
- name='bio_en',
- field=models.TextField(blank=True, null=True, verbose_name='bio'),
- ),
- migrations.AddField(
- model_name='organization',
- name='bio_fr',
- field=models.TextField(blank=True, null=True, verbose_name='bio'),
- ),
- migrations.AddField(
- model_name='organizationservice',
- name='organization',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='services', to='organization-network.Organization', verbose_name='organization'),
- ),
- ]
diff --git a/app/organization/network/migrations/0067_auto_20161216_1606.py b/app/organization/network/migrations/0067_auto_20161216_1606.py
deleted file mode 100644
index 49312e3b..00000000
--- a/app/organization/network/migrations/0067_auto_20161216_1606.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2016-12-16 15:06
-from __future__ import unicode_literals
-
-from django.db import migrations
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0066_auto_20161216_1603'),
- ]
-
- operations = [
- migrations.AlterModelOptions(
- name='organizationservice',
- options={'ordering': ('_order',)},
- ),
- migrations.AddField(
- model_name='organizationservice',
- name='_order',
- field=mezzanine.core.fields.OrderField(null=True, verbose_name='Order'),
- ),
- ]
diff --git a/app/organization/network/migrations/0068_auto_20161216_1639.py b/app/organization/network/migrations/0068_auto_20161216_1639.py
deleted file mode 100644
index dfe2a447..00000000
--- a/app/organization/network/migrations/0068_auto_20161216_1639.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2016-12-16 15:39
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0067_auto_20161216_1606'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='organizationservice',
- name='box_size',
- field=models.IntegerField(choices=[(3, 3), (6, 6)], default=3, verbose_name='box size'),
- ),
- migrations.AddField(
- model_name='organizationservice',
- name='css_color',
- field=models.CharField(blank=True, choices=[('orange', 'orange'), ('blue', 'blue'), ('green', 'green')], help_text='Determine color on home.', max_length=64, null=True, verbose_name='class color'),
- ),
- ]
diff --git a/app/organization/network/migrations/0069_auto_20161216_1649.py b/app/organization/network/migrations/0069_auto_20161216_1649.py
deleted file mode 100644
index a18f1159..00000000
--- a/app/organization/network/migrations/0069_auto_20161216_1649.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2016-12-16 15:49
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0068_auto_20161216_1639'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='organizationservice',
- name='css_banner_type',
- field=models.CharField(blank=True, choices=[('fsxxl', 'fsxxl'), ('fsxxxl', 'fsxxxl')], max_length=64, null=True, verbose_name='css banner type'),
- ),
- migrations.AlterField(
- model_name='organizationservice',
- name='css_color',
- field=models.CharField(blank=True, choices=[('orange', 'orange'), ('blue', 'blue'), ('green', 'green')], max_length=64, null=True, verbose_name='css color'),
- ),
- ]
diff --git a/app/organization/network/migrations/0070_auto_20161222_1656.py b/app/organization/network/migrations/0070_auto_20161222_1656.py
deleted file mode 100644
index f56bedd7..00000000
--- a/app/organization/network/migrations/0070_auto_20161222_1656.py
+++ /dev/null
@@ -1,58 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2016-12-22 15:56
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0069_auto_20161216_1649'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ActivityWeeklyHourVolume',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('monday_hours', models.IntegerField(verbose_name='monday hours')),
- ('tuesday_hours', models.IntegerField(verbose_name='tuesday hours')),
- ('wednesday_hours', models.IntegerField(verbose_name='wednesday hours')),
- ('thursday_hours', models.IntegerField(verbose_name='thursday hours')),
- ('friday_hours', models.IntegerField(verbose_name='friday hours')),
- ],
- options={
- 'verbose_name_plural': 'Activity Weekly Hour Volumes',
- 'verbose_name': 'Activity Weekly Hour Volume',
- },
- ),
- migrations.CreateModel(
- name='PersonActivityWeeklyHourVolume',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('monday_hours', models.IntegerField(blank=True, null=True, verbose_name='monday hours')),
- ('tuesday_hours', models.IntegerField(blank=True, null=True, verbose_name='tuesday hours')),
- ('wednesday_hours', models.IntegerField(blank=True, null=True, verbose_name='wednesday hours')),
- ('thursday_hours', models.IntegerField(blank=True, null=True, verbose_name='thursday hours')),
- ('friday_hours', models.IntegerField(blank=True, null=True, verbose_name='friday hours')),
- ('activity', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='person_activity_weekly_hour_volume', to='organization-network.PersonActivity', verbose_name='activity')),
- ],
- options={
- 'verbose_name': 'Person Activity Weekly Hour Volume',
- },
- ),
- migrations.AddField(
- model_name='person',
- name='register_id',
- field=models.CharField(blank=True, max_length=128, null=True, verbose_name='register ID'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='weekly_hour_volume',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization-network.ActivityWeeklyHourVolume'),
- ),
- ]
diff --git a/app/organization/network/migrations/0071_auto_20161222_1828.py b/app/organization/network/migrations/0071_auto_20161222_1828.py
deleted file mode 100644
index 6b546248..00000000
--- a/app/organization/network/migrations/0071_auto_20161222_1828.py
+++ /dev/null
@@ -1,47 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2016-12-22 17:28
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0070_auto_20161222_1656'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='personactivityweeklyhourvolume',
- name='activity',
- ),
- migrations.AddField(
- model_name='personactivity',
- name='friday_hours',
- field=models.IntegerField(blank=True, null=True, verbose_name='friday hours'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='monday_hours',
- field=models.IntegerField(blank=True, null=True, verbose_name='monday hours'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='thursday_hours',
- field=models.IntegerField(blank=True, null=True, verbose_name='thursday hours'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='tuesday_hours',
- field=models.IntegerField(blank=True, null=True, verbose_name='tuesday hours'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='wednesday_hours',
- field=models.IntegerField(blank=True, null=True, verbose_name='wednesday hours'),
- ),
- migrations.DeleteModel(
- name='PersonActivityWeeklyHourVolume',
- ),
- ]
diff --git a/app/organization/network/migrations/0072_auto_20161222_1906.py b/app/organization/network/migrations/0072_auto_20161222_1906.py
deleted file mode 100644
index 2cec4856..00000000
--- a/app/organization/network/migrations/0072_auto_20161222_1906.py
+++ /dev/null
@@ -1,65 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2016-12-22 18:06
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0071_auto_20161222_1828'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='activityweeklyhourvolume',
- name='friday_hours',
- field=models.FloatField(verbose_name='friday hours'),
- ),
- migrations.AlterField(
- model_name='activityweeklyhourvolume',
- name='monday_hours',
- field=models.FloatField(verbose_name='monday hours'),
- ),
- migrations.AlterField(
- model_name='activityweeklyhourvolume',
- name='thursday_hours',
- field=models.FloatField(verbose_name='thursday hours'),
- ),
- migrations.AlterField(
- model_name='activityweeklyhourvolume',
- name='tuesday_hours',
- field=models.FloatField(verbose_name='tuesday hours'),
- ),
- migrations.AlterField(
- model_name='activityweeklyhourvolume',
- name='wednesday_hours',
- field=models.FloatField(verbose_name='wednesday hours'),
- ),
- migrations.AlterField(
- model_name='personactivity',
- name='friday_hours',
- field=models.FloatField(blank=True, null=True, verbose_name='friday hours'),
- ),
- migrations.AlterField(
- model_name='personactivity',
- name='monday_hours',
- field=models.FloatField(blank=True, null=True, verbose_name='monday hours'),
- ),
- migrations.AlterField(
- model_name='personactivity',
- name='thursday_hours',
- field=models.FloatField(blank=True, null=True, verbose_name='thursday hours'),
- ),
- migrations.AlterField(
- model_name='personactivity',
- name='tuesday_hours',
- field=models.FloatField(blank=True, null=True, verbose_name='tuesday hours'),
- ),
- migrations.AlterField(
- model_name='personactivity',
- name='wednesday_hours',
- field=models.FloatField(blank=True, null=True, verbose_name='wednesday hours'),
- ),
- ]
diff --git a/app/organization/network/migrations/0073_auto_20161228_1428.py b/app/organization/network/migrations/0073_auto_20161228_1428.py
deleted file mode 100644
index 615345d4..00000000
--- a/app/organization/network/migrations/0073_auto_20161228_1428.py
+++ /dev/null
@@ -1,108 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2016-12-28 13:28
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import organization.network.validators
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0032_project_external_id'),
- ('organization-network', '0072_auto_20161222_1906'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='PersonActivityTimeSheet',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('percentage', models.IntegerField(verbose_name='% of work time on the project')),
- ('month', models.IntegerField(verbose_name='month')),
- ('year', models.IntegerField(verbose_name='year')),
- ],
- options={
- 'verbose_name': 'activity timesheet',
- 'ordering': ['month'],
- 'verbose_name_plural': 'activity timesheets',
- },
- ),
- migrations.CreateModel(
- name='PersonActivityVacation',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('date_from', models.DateField(blank=True, null=True, verbose_name='begin date')),
- ('date_to', models.DateField(blank=True, null=True, verbose_name='end date')),
- ],
- options={
- 'abstract': False,
- },
- ),
- migrations.AlterField(
- model_name='activityweeklyhourvolume',
- name='friday_hours',
- field=models.FloatField(validators=[organization.network.validators.validate_positive], verbose_name='friday hours'),
- ),
- migrations.AlterField(
- model_name='activityweeklyhourvolume',
- name='monday_hours',
- field=models.FloatField(validators=[organization.network.validators.validate_positive], verbose_name='monday hours'),
- ),
- migrations.AlterField(
- model_name='activityweeklyhourvolume',
- name='thursday_hours',
- field=models.FloatField(validators=[organization.network.validators.validate_positive], verbose_name='thursday hours'),
- ),
- migrations.AlterField(
- model_name='activityweeklyhourvolume',
- name='tuesday_hours',
- field=models.FloatField(validators=[organization.network.validators.validate_positive], verbose_name='tuesday hours'),
- ),
- migrations.AlterField(
- model_name='activityweeklyhourvolume',
- name='wednesday_hours',
- field=models.FloatField(validators=[organization.network.validators.validate_positive], verbose_name='wednesday hours'),
- ),
- migrations.AlterField(
- model_name='personactivity',
- name='friday_hours',
- field=models.FloatField(blank=True, null=True, validators=[organization.network.validators.validate_positive], verbose_name='friday hours'),
- ),
- migrations.AlterField(
- model_name='personactivity',
- name='monday_hours',
- field=models.FloatField(blank=True, null=True, validators=[organization.network.validators.validate_positive], verbose_name='monday hours'),
- ),
- migrations.AlterField(
- model_name='personactivity',
- name='thursday_hours',
- field=models.FloatField(blank=True, null=True, validators=[organization.network.validators.validate_positive], verbose_name='thursday hours'),
- ),
- migrations.AlterField(
- model_name='personactivity',
- name='tuesday_hours',
- field=models.FloatField(blank=True, null=True, validators=[organization.network.validators.validate_positive], verbose_name='tuesday hours'),
- ),
- migrations.AlterField(
- model_name='personactivity',
- name='wednesday_hours',
- field=models.FloatField(blank=True, null=True, validators=[organization.network.validators.validate_positive], verbose_name='wednesday hours'),
- ),
- migrations.AddField(
- model_name='personactivityvacation',
- name='activity',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organization-network.PersonActivity', verbose_name='activity'),
- ),
- migrations.AddField(
- model_name='personactivitytimesheet',
- name='activity',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='timesheets', to='organization-network.PersonActivity', verbose_name='activity'),
- ),
- migrations.AddField(
- model_name='personactivitytimesheet',
- name='project',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='timesheets', to='organization-projects.Project', verbose_name='project'),
- ),
- ]
diff --git a/app/organization/network/migrations/0074_personactivitytimesheet_work_packages.py b/app/organization/network/migrations/0074_personactivitytimesheet_work_packages.py
deleted file mode 100644
index 3b1e2778..00000000
--- a/app/organization/network/migrations/0074_personactivitytimesheet_work_packages.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2016-12-28 13:28
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0033_projectworkpackage'),
- ('organization-network', '0073_auto_20161228_1428'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='personactivitytimesheet',
- name='work_packages',
- field=models.ManyToManyField(blank=True, related_name='timesheets', to='organization-projects.ProjectWorkPackage', verbose_name='work package'),
- ),
- ]
diff --git a/app/organization/network/migrations/0075_auto_20161229_1151.py b/app/organization/network/migrations/0075_auto_20161229_1151.py
deleted file mode 100644
index 6cebff10..00000000
--- a/app/organization/network/migrations/0075_auto_20161229_1151.py
+++ /dev/null
@@ -1,166 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2016-12-29 10:51
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import organization.network.validators
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0074_personactivitytimesheet_work_packages'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='activityweeklyhourvolume',
- name='friday_hours',
- ),
- migrations.RemoveField(
- model_name='activityweeklyhourvolume',
- name='monday_hours',
- ),
- migrations.RemoveField(
- model_name='activityweeklyhourvolume',
- name='thursday_hours',
- ),
- migrations.RemoveField(
- model_name='activityweeklyhourvolume',
- name='tuesday_hours',
- ),
- migrations.RemoveField(
- model_name='activityweeklyhourvolume',
- name='wednesday_hours',
- ),
- migrations.RemoveField(
- model_name='personactivity',
- name='friday_hours',
- ),
- migrations.RemoveField(
- model_name='personactivity',
- name='monday_hours',
- ),
- migrations.RemoveField(
- model_name='personactivity',
- name='thursday_hours',
- ),
- migrations.RemoveField(
- model_name='personactivity',
- name='tuesday_hours',
- ),
- migrations.RemoveField(
- model_name='personactivity',
- name='wednesday_hours',
- ),
- migrations.AddField(
- model_name='activityweeklyhourvolume',
- name='friday_am',
- field=models.FloatField(default=0, validators=[organization.network.validators.validate_positive], verbose_name='friday AM'),
- preserve_default=False,
- ),
- migrations.AddField(
- model_name='activityweeklyhourvolume',
- name='friday_pm',
- field=models.FloatField(default=0, validators=[organization.network.validators.validate_positive], verbose_name='friday PM'),
- preserve_default=False,
- ),
- migrations.AddField(
- model_name='activityweeklyhourvolume',
- name='monday_am',
- field=models.FloatField(default=0, validators=[organization.network.validators.validate_positive], verbose_name='monday AM'),
- preserve_default=False,
- ),
- migrations.AddField(
- model_name='activityweeklyhourvolume',
- name='monday_pm',
- field=models.FloatField(default=0, validators=[organization.network.validators.validate_positive], verbose_name='monday PM'),
- preserve_default=False,
- ),
- migrations.AddField(
- model_name='activityweeklyhourvolume',
- name='thursday_am',
- field=models.FloatField(default=0, validators=[organization.network.validators.validate_positive], verbose_name='thursday AM'),
- preserve_default=False,
- ),
- migrations.AddField(
- model_name='activityweeklyhourvolume',
- name='thursday_pm',
- field=models.FloatField(default=0, validators=[organization.network.validators.validate_positive], verbose_name='thursday PM'),
- preserve_default=False,
- ),
- migrations.AddField(
- model_name='activityweeklyhourvolume',
- name='tuesday_am',
- field=models.FloatField(default=0, validators=[organization.network.validators.validate_positive], verbose_name='tuesday AM'),
- preserve_default=False,
- ),
- migrations.AddField(
- model_name='activityweeklyhourvolume',
- name='tuesday_pm',
- field=models.FloatField(default=0, validators=[organization.network.validators.validate_positive], verbose_name='tuesday PM'),
- preserve_default=False,
- ),
- migrations.AddField(
- model_name='activityweeklyhourvolume',
- name='wednesday_am',
- field=models.FloatField(default=0, validators=[organization.network.validators.validate_positive], verbose_name='wednesday AM'),
- preserve_default=False,
- ),
- migrations.AddField(
- model_name='activityweeklyhourvolume',
- name='wednesday_pm',
- field=models.FloatField(default=0, validators=[organization.network.validators.validate_positive], verbose_name='wednesday PM'),
- preserve_default=False,
- ),
- migrations.AddField(
- model_name='personactivity',
- name='friday_am',
- field=models.FloatField(blank=True, null=True, validators=[organization.network.validators.validate_positive], verbose_name='friday AM'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='friday_pm',
- field=models.FloatField(blank=True, null=True, validators=[organization.network.validators.validate_positive], verbose_name='friday PM'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='monday_am',
- field=models.FloatField(blank=True, null=True, validators=[organization.network.validators.validate_positive], verbose_name='monday AM'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='monday_pm',
- field=models.FloatField(blank=True, null=True, validators=[organization.network.validators.validate_positive], verbose_name='monday PM'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='thursday_am',
- field=models.FloatField(blank=True, null=True, validators=[organization.network.validators.validate_positive], verbose_name='thursday AM'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='thursday_pm',
- field=models.FloatField(blank=True, null=True, validators=[organization.network.validators.validate_positive], verbose_name='thursday PM'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='tuesday_am',
- field=models.FloatField(blank=True, null=True, validators=[organization.network.validators.validate_positive], verbose_name='tuesday AM'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='tuesday_pm',
- field=models.FloatField(blank=True, null=True, validators=[organization.network.validators.validate_positive], verbose_name='tuesday PM'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='wednesday_am',
- field=models.FloatField(blank=True, null=True, validators=[organization.network.validators.validate_positive], verbose_name='wednesday AM'),
- ),
- migrations.AddField(
- model_name='personactivity',
- name='wednesday_pm',
- field=models.FloatField(blank=True, null=True, validators=[organization.network.validators.validate_positive], verbose_name='wednesday PM'),
- ),
- ]
diff --git a/app/organization/network/migrations/0076_auto_20161230_1839.py b/app/organization/network/migrations/0076_auto_20161230_1839.py
deleted file mode 100644
index 365c7be1..00000000
--- a/app/organization/network/migrations/0076_auto_20161230_1839.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2016-12-30 17:39
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import organization.network.validators
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0075_auto_20161229_1151'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='personactivitytimesheet',
- name='percentage',
- field=models.FloatField(validators=[organization.network.validators.validate_positive], verbose_name='% of work time on the project'),
- ),
- ]
diff --git a/app/organization/network/migrations/0077_auto_20170103_1220.py b/app/organization/network/migrations/0077_auto_20170103_1220.py
deleted file mode 100644
index 58fdf797..00000000
--- a/app/organization/network/migrations/0077_auto_20170103_1220.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-03 11:20
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0076_auto_20161230_1839'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='organizationblock',
- name='login_required',
- field=models.BooleanField(default=False, verbose_name='login required'),
- ),
- migrations.AddField(
- model_name='personblock',
- name='login_required',
- field=models.BooleanField(default=False, verbose_name='login required'),
- ),
- ]
diff --git a/app/organization/network/migrations/0077_auto_20170104_1837.py b/app/organization/network/migrations/0077_auto_20170104_1837.py
deleted file mode 100644
index 9f5587c2..00000000
--- a/app/organization/network/migrations/0077_auto_20170104_1837.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-04 17:37
-from __future__ import unicode_literals
-
-import datetime
-from django.db import migrations, models
-from django.utils.timezone import utc
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0076_auto_20161230_1839'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='personactivitytimesheet',
- name='accounting',
- field=models.DateField(blank=True, default=datetime.datetime(2017, 1, 4, 17, 35, 33, 228164, tzinfo=utc)),
- ),
- migrations.AddField(
- model_name='personactivitytimesheet',
- name='validation',
- field=models.DateField(blank=True, default=datetime.datetime(2017, 1, 4, 17, 35, 33, 228198, tzinfo=utc)),
- ),
- ]
diff --git a/app/organization/network/migrations/0078_auto_20170105_1743.py b/app/organization/network/migrations/0078_auto_20170105_1743.py
deleted file mode 100644
index fc6c3caf..00000000
--- a/app/organization/network/migrations/0078_auto_20170105_1743.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-05 16:43
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0077_auto_20170103_1220'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='organizationimage',
- name='type',
- field=models.CharField(choices=[('logo', 'logo'), ('logo_white', 'logo white'), ('logo_black', 'logo black'), ('logo_header', 'logo header'), ('logo_footer', 'logo footer'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type'),
- ),
- migrations.AlterField(
- model_name='personimage',
- name='type',
- field=models.CharField(choices=[('logo', 'logo'), ('logo_white', 'logo white'), ('logo_black', 'logo black'), ('logo_header', 'logo header'), ('logo_footer', 'logo footer'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type'),
- ),
- ]
diff --git a/app/organization/network/migrations/0078_auto_20170106_1142.py b/app/organization/network/migrations/0078_auto_20170106_1142.py
deleted file mode 100644
index 08c1163e..00000000
--- a/app/organization/network/migrations/0078_auto_20170106_1142.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-06 10:42
-from __future__ import unicode_literals
-
-import datetime
-from django.db import migrations, models
-from django.utils.timezone import utc
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0077_auto_20170104_1837'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='personactivitytimesheet',
- name='accounting',
- field=models.DateField(blank=True, default=datetime.datetime(2017, 1, 6, 10, 40, 49, 573524, tzinfo=utc)),
- ),
- migrations.AlterField(
- model_name='personactivitytimesheet',
- name='validation',
- field=models.DateField(blank=True, default=datetime.datetime(2017, 1, 6, 10, 40, 49, 573558, tzinfo=utc)),
- ),
- ]
diff --git a/app/organization/network/migrations/0079_auto_20170106_1149.py b/app/organization/network/migrations/0079_auto_20170106_1149.py
deleted file mode 100644
index e3c17f85..00000000
--- a/app/organization/network/migrations/0079_auto_20170106_1149.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-06 10:49
-from __future__ import unicode_literals
-
-import datetime
-from django.db import migrations, models
-from django.utils.timezone import utc
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0078_auto_20170106_1142'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='personactivitytimesheet',
- name='accounting',
- field=models.DateField(blank=True, default=datetime.datetime(2017, 1, 6, 10, 47, 54, 649097, tzinfo=utc)),
- ),
- migrations.AlterField(
- model_name='personactivitytimesheet',
- name='validation',
- field=models.DateField(blank=True, default=datetime.datetime(2017, 1, 6, 10, 47, 54, 649141, tzinfo=utc)),
- ),
- ]
diff --git a/app/organization/network/migrations/0080_auto_20170106_1642.py b/app/organization/network/migrations/0080_auto_20170106_1642.py
deleted file mode 100644
index 92f06102..00000000
--- a/app/organization/network/migrations/0080_auto_20170106_1642.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-06 15:42
-from __future__ import unicode_literals
-
-import datetime
-from django.db import migrations, models
-from django.utils.timezone import utc
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0079_auto_20170106_1149'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='personactivitytimesheet',
- name='accounting',
- field=models.DateField(blank=True, default=datetime.datetime(2017, 1, 6, 15, 40, 39, 279343, tzinfo=utc)),
- ),
- migrations.AlterField(
- model_name='personactivitytimesheet',
- name='validation',
- field=models.DateField(blank=True, default=datetime.datetime(2017, 1, 6, 15, 40, 39, 279377, tzinfo=utc)),
- ),
- ]
diff --git a/app/organization/network/migrations/0081_auto_20170106_1645.py b/app/organization/network/migrations/0081_auto_20170106_1645.py
deleted file mode 100644
index 2f862757..00000000
--- a/app/organization/network/migrations/0081_auto_20170106_1645.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-06 15:45
-from __future__ import unicode_literals
-
-import datetime
-from django.db import migrations, models
-from django.utils.timezone import utc
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0080_auto_20170106_1642'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='personactivitytimesheet',
- name='accounting',
- field=models.DateField(blank=True, default=datetime.datetime(2017, 1, 6, 15, 43, 11, 224739, tzinfo=utc)),
- ),
- migrations.AlterField(
- model_name='personactivitytimesheet',
- name='validation',
- field=models.DateField(blank=True, default=datetime.datetime(2017, 1, 6, 15, 43, 11, 224774, tzinfo=utc)),
- ),
- ]
diff --git a/app/organization/network/migrations/0082_merge.py b/app/organization/network/migrations/0082_merge.py
deleted file mode 100644
index 3242f2fd..00000000
--- a/app/organization/network/migrations/0082_merge.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-11 10:40
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0078_auto_20170105_1743'),
- ('organization-network', '0081_auto_20170106_1645'),
- ]
-
- operations = [
- ]
diff --git a/app/organization/network/migrations/0083_auto_20170116_1235.py b/app/organization/network/migrations/0083_auto_20170116_1235.py
deleted file mode 100644
index 3ed84338..00000000
--- a/app/organization/network/migrations/0083_auto_20170116_1235.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-16 11:35
-from __future__ import unicode_literals
-
-import datetime
-from django.db import migrations, models
-from django.utils.timezone import utc
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0082_merge'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='personactivitytimesheet',
- name='accounting',
- field=models.DateField(blank=True, default=datetime.datetime(2017, 1, 16, 11, 33, 2, 772761, tzinfo=utc), null=True),
- ),
- migrations.AlterField(
- model_name='personactivitytimesheet',
- name='validation',
- field=models.DateField(blank=True, default=datetime.datetime(2017, 1, 16, 11, 33, 2, 772794, tzinfo=utc), null=True),
- ),
- ]
diff --git a/app/organization/network/migrations/0084_auto_20170118_1119.py b/app/organization/network/migrations/0084_auto_20170118_1119.py
deleted file mode 100644
index faa9037e..00000000
--- a/app/organization/network/migrations/0084_auto_20170118_1119.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-18 10:19
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0083_auto_20170116_1235'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='personactivitytimesheet',
- name='accounting',
- field=models.DateField(blank=True, null=True),
- ),
- migrations.AlterField(
- model_name='personactivitytimesheet',
- name='validation',
- field=models.DateField(blank=True, null=True),
- ),
- ]
diff --git a/app/organization/network/migrations/0085_auto_20170118_1239.py b/app/organization/network/migrations/0085_auto_20170118_1239.py
deleted file mode 100644
index e64bf171..00000000
--- a/app/organization/network/migrations/0085_auto_20170118_1239.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-18 11:39
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0084_auto_20170118_1119'),
- ]
-
- operations = [
- migrations.AlterUniqueTogether(
- name='personactivitytimesheet',
- unique_together=set([('activity', 'project', 'month', 'year')]),
- ),
- ]
diff --git a/app/organization/network/migrations/0086_auto_20170118_1247.py b/app/organization/network/migrations/0086_auto_20170118_1247.py
deleted file mode 100644
index 6b6e3e4f..00000000
--- a/app/organization/network/migrations/0086_auto_20170118_1247.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-18 11:47
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0085_auto_20170118_1239'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='personactivitytimesheet',
- name='month',
- field=models.IntegerField(choices=[(1, 'January'), (2, 'February'), (3, 'March'), (4, 'April'), (5, 'May'), (6, 'June'), (7, 'July'), (8, 'August'), (9, 'September'), (10, 'October'), (11, 'November'), (12, 'December')], verbose_name='month'),
- ),
- ]
diff --git a/app/organization/network/migrations/0087_auto_20170214_1643.py b/app/organization/network/migrations/0087_auto_20170214_1643.py
deleted file mode 100644
index 4de6dc42..00000000
--- a/app/organization/network/migrations/0087_auto_20170214_1643.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-02-14 15:43
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0086_auto_20170118_1247'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='organizationblock',
- name='background_color',
- field=models.CharField(blank=True, choices=[('black', 'black'), ('yellow', 'yellow'), ('red', 'red'), ('white', 'white')], max_length=32, verbose_name='background color'),
- ),
- migrations.AlterField(
- model_name='personblock',
- name='background_color',
- field=models.CharField(blank=True, choices=[('black', 'black'), ('yellow', 'yellow'), ('red', 'red'), ('white', 'white')], max_length=32, verbose_name='background color'),
- ),
- ]
diff --git a/app/organization/network/migrations/0088_organization_site.py b/app/organization/network/migrations/0088_organization_site.py
deleted file mode 100644
index 4f996300..00000000
--- a/app/organization/network/migrations/0088_organization_site.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-02-23 22:52
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('sites', '0002_alter_domain_unique'),
- ('organization-network', '0087_auto_20170214_1643'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='organization',
- name='site',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='sites.Site'),
- ),
- ]
diff --git a/app/organization/network/migrations/0089_auto_20170303_1637.py b/app/organization/network/migrations/0089_auto_20170303_1637.py
deleted file mode 100644
index dfcdf77c..00000000
--- a/app/organization/network/migrations/0089_auto_20170303_1637.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-03-03 15:37
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django_countries.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0088_organization_site'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='person',
- name='address',
- field=models.TextField(blank=True, verbose_name='address'),
- ),
- migrations.AddField(
- model_name='person',
- name='city',
- field=models.CharField(blank=True, max_length=255, null=True, verbose_name='city'),
- ),
- migrations.AddField(
- model_name='person',
- name='country',
- field=django_countries.fields.CountryField(blank=True, max_length=2, null=True, verbose_name='country'),
- ),
- migrations.AddField(
- model_name='person',
- name='postal_code',
- field=models.CharField(blank=True, max_length=16, null=True, verbose_name='postal code'),
- ),
- ]
diff --git a/app/organization/network/migrations/0090_auto_20170313_1224.py b/app/organization/network/migrations/0090_auto_20170313_1224.py
deleted file mode 100644
index 973afe5c..00000000
--- a/app/organization/network/migrations/0090_auto_20170313_1224.py
+++ /dev/null
@@ -1,57 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-03-13 11:24
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0089_auto_20170303_1637'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='OrganizationContact',
- fields=[
- ('person_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-network.Person')),
- ],
- options={
- 'verbose_name': 'Organization contact',
- 'verbose_name_plural': 'Organization contacts',
- },
- bases=('organization-network.person',),
- ),
- migrations.CreateModel(
- name='OrganizationUserImage',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('file', models.FileField(max_length=1024, upload_to='images', verbose_name='Image')),
- ('credits', models.CharField(blank=True, max_length=256, null=True, verbose_name='credits')),
- ],
- options={
- 'ordering': ('_order',),
- },
- ),
- migrations.AddField(
- model_name='organization',
- name='role',
- field=models.CharField(blank=True, choices=[('coordinator', 'coordinator'), ('producer', 'producer')], max_length=128, null=True, verbose_name='role'),
- ),
- migrations.AddField(
- model_name='organizationuserimage',
- name='organization',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='user_images', to='organization-network.Organization', verbose_name='organization'),
- ),
- migrations.AddField(
- model_name='organizationcontact',
- name='organization',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='contacts', to='organization-network.Organization', verbose_name='organization'),
- ),
- ]
diff --git a/app/organization/network/migrations/0091_auto_20170313_1425.py b/app/organization/network/migrations/0091_auto_20170313_1425.py
deleted file mode 100644
index 387b6d93..00000000
--- a/app/organization/network/migrations/0091_auto_20170313_1425.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-03-13 13:25
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0090_auto_20170313_1224'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='organization',
- name='role',
- ),
- migrations.AddField(
- model_name='person',
- name='role',
- field=models.CharField(blank=True, max_length=256, null=True, verbose_name='role'),
- ),
- ]
diff --git a/app/organization/network/migrations/0092_auto_20170314_1918.py b/app/organization/network/migrations/0092_auto_20170314_1918.py
deleted file mode 100644
index f43f5f01..00000000
--- a/app/organization/network/migrations/0092_auto_20170314_1918.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-03-14 18:18
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0091_auto_20170313_1425'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='organizationuserimage',
- name='file',
- field=models.FileField(max_length=1024, upload_to='user/images/%Y/%m/%d/', verbose_name='Image'),
- ),
- ]
diff --git a/app/organization/network/migrations/0093_auto_20170322_1846.py b/app/organization/network/migrations/0093_auto_20170322_1846.py
deleted file mode 100644
index aa19a751..00000000
--- a/app/organization/network/migrations/0093_auto_20170322_1846.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-03-22 17:46
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0092_auto_20170314_1918'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='person',
- name='organization_name',
- field=models.CharField(blank=True, max_length=128, null=True, verbose_name='organization_name'),
- ),
- migrations.AddField(
- model_name='person',
- name='position',
- field=models.CharField(blank=True, max_length=128, null=True, verbose_name='position'),
- ),
- ]
diff --git a/app/organization/network/migrations/0094_auto_20170323_0815.py b/app/organization/network/migrations/0094_auto_20170323_0815.py
deleted file mode 100644
index c1d3d908..00000000
--- a/app/organization/network/migrations/0094_auto_20170323_0815.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-03-23 07:15
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0093_auto_20170322_1846'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='person',
- name='organization_name',
- ),
- migrations.RemoveField(
- model_name='person',
- name='position',
- ),
- ]
diff --git a/app/organization/network/migrations/0095_auto_20170323_1039.py b/app/organization/network/migrations/0095_auto_20170323_1039.py
deleted file mode 100644
index b5867377..00000000
--- a/app/organization/network/migrations/0095_auto_20170323_1039.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-03-23 09:39
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0094_auto_20170323_0815'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='personactivity',
- name='date_from',
- field=models.DateField(blank=True, null=True, verbose_name='start date'),
- ),
- migrations.AlterField(
- model_name='personactivityvacation',
- name='date_from',
- field=models.DateField(blank=True, null=True, verbose_name='start date'),
- ),
- ]
diff --git a/app/organization/network/migrations/__init__.py b/app/organization/network/migrations/__init__.py
deleted file mode 100644
index e69de29b..00000000
diff --git a/app/organization/network/models.py b/app/organization/network/models.py
deleted file mode 100644
index 94f5a575..00000000
--- a/app/organization/network/models.py
+++ /dev/null
@@ -1,635 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-
-import os
-import re
-import pwd
-import time
-import urllib
-import string
-import datetime
-import mimetypes
-from geopy.geocoders import GoogleV3 as GoogleMaps
-from geopy.exc import GeocoderQueryError
-
-from django.db import models
-from django.utils.translation import ugettext_lazy as _
-from django.core.urlresolvers import reverse, reverse_lazy
-from django.conf import settings
-from django.contrib.auth.models import User
-from django.core.exceptions import ValidationError
-
-from mezzanine.pages.models import Page
-from mezzanine.core.models import RichText, Displayable, Slugged
-from mezzanine.core.fields import RichTextField, OrderField, FileField
-from mezzanine.utils.models import AdminThumbMixin, upload_to
-
-from organization.core.models import *
-from organization.media.models import *
-from organization.pages.models import CustomPage
-
-from organization.network.validators import *
-
-# from .nationalities.fields import NationalityField
-
-# Hack to have these strings translated
-mr = _('Mr')
-mrs = _('Ms')
-
-GENDER_CHOICES = [
- ('male', _('male')),
- ('female', _('female')),
-]
-
-PERSON_LIST_STYLE_CHOICES = [
- ('square', _('square')),
- ('circle', _('circle')),
-]
-
-TITLE_CHOICES = [
- ('Dr', _('Dr')),
- ('Prof', _('Prof')),
- ('Prof Dr', _('Prof Dr')),
-]
-
-PATTERN_CHOICES = [
- ('pattern-bg--circles', _('circles')),
- ('pattern-bg--squares', _('squares')),
- ('pattern-bg--stripes', _('stripes')),
- ('pattern-bg--triangles', _('triangles')),
-]
-
-MONTH_CHOICES = [
- (1, _('January')),
- (2, _('February')),
- (3, _('March')),
- (4, _('April')),
- (5, _('May')),
- (6, _('June')),
- (7, _('July')),
- (8, _('August')),
- (9, _('September')),
- (10, _('October')),
- (11, _('November')),
- (12, _('December')),
-]
-
-ALIGNMENT_CHOICES = (('left', _('left')), ('left', _('left')), ('right', _('right')))
-
-CSS_COLOR_CHOICES = [
- ('orange', _('orange')),
- ('blue', _('blue')),
- ('green', _('green')),
-]
-
-CSS_BANNER_CHOICES = [
- ('fsxxl', 'fsxxl'),
- ('fsxxxl', 'fsxxxl'),
-]
-
-BOX_SIZE_CHOICES = [
- (3, 3),
- (6, 6),
-]
-
-
-class Organization(Named, Address, URL, AdminThumbRelatedMixin, Orderable):
- """(Organization description)"""
-
- mappable_location = models.CharField(max_length=128, blank=True, null=True, help_text="This address will be used to calculate latitude and longitude. Leave blank and set Latitude and Longitude to specify the location yourself, or leave all three blank to auto-fill from the Location field.")
- lat = models.DecimalField(max_digits=10, decimal_places=7, blank=True, null=True, verbose_name="Latitude", help_text="Calculated automatically if mappable location is set.")
- lon = models.DecimalField(max_digits=10, decimal_places=7, blank=True, null=True, verbose_name="Longitude", help_text="Calculated automatically if mappable location is set.")
- type = models.ForeignKey('OrganizationType', verbose_name=_('organization type'), blank=True, null=True, on_delete=models.SET_NULL)
- initials = models.CharField(_('initials'), max_length=128, blank=True, null=True)
- is_on_map = models.BooleanField(_('is on map'), default=False, blank=True)
- is_host = models.BooleanField(_('is host'), default=False, blank=True)
- telephone = models.CharField(_('telephone'), max_length=64, blank=True, null=True)
- opening_times = models.TextField(_('opening times'), blank=True)
- subway_access = models.TextField(_('subway access'), blank=True)
- bio = models.TextField(_('bio'), blank=True)
- site = models.ForeignKey("sites.Site", blank=True, null=True, on_delete=models.SET_NULL)
- admin_thumb_type = 'logo'
-
- class Meta:
- verbose_name = _('organization')
- ordering = ['name',]
-
- def clean(self):
- """
- Validate set/validate mappable_location, longitude and latitude.
- """
- super(Organization, self).clean()
-
- if self.lat and not self.lon:
- raise ValidationError("Longitude required if specifying latitude.")
-
- if self.lon and not self.lat:
- raise ValidationError("Latitude required if specifying longitude.")
-
- if not (self.lat and self.lon) and not self.mappable_location:
- if self.address:
- self.mappable_location = self.address.replace("\n"," ").replace('\r', ' ') + ", " + self.postal_code + " " + self.city
-
- if self.mappable_location and not (self.lat and self.lon): #location should always override lat/long if set
- g = GoogleMaps(domain=settings.EVENT_GOOGLE_MAPS_DOMAIN)
- try:
- mappable_location, (lat, lon) = g.geocode(self.mappable_location)
- except GeocoderQueryError as e:
- raise ValidationError("The mappable location you specified could not be found on {service}: \"{error}\" Try changing the mappable location, removing any business names, or leaving mappable location blank and using coordinates from getlatlon.com.".format(service="Google Maps", error=e.message))
- except ValueError as e:
- raise ValidationError("The mappable location you specified could not be found on {service}: \"{error}\" Try changing the mappable location, removing any business names, or leaving mappable location blank and using coordinates from getlatlon.com.".format(service="Google Maps", error=e.message))
- except TypeError as e:
- raise ValidationError("The mappable location you specified could not be found. Try changing the mappable location, removing any business names, or leaving mappable location blank and using coordinates from getlatlon.com.")
- self.mappable_location = mappable_location
- self.lat = lat
- self.lon = lon
-
-
-class Team(Named, URL):
- """(Team description)"""
-
- organization = models.ForeignKey('Organization', verbose_name=_('organization'), related_name="teams", blank=True, null=True, on_delete=models.SET_NULL)
- department = models.ForeignKey('Department', verbose_name=_('department'), related_name="teams", blank=True, null=True, on_delete=models.SET_NULL)
- code = models.CharField(_('code'), max_length=64, blank=True, null=True)
- is_legacy = models.BooleanField(_('is legacy'), default=False)
- parent = models.ForeignKey('Team', verbose_name=_('parent team'), related_name="children", blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _('team')
- ordering = ['name',]
-
- def __str__(self):
- if self.organization:
- return ' - '.join((self.organization.name, self.name))
- elif self.department:
- if self.department.organization:
- return ' - '.join((self.department.organization.name, self.department.name, self.name))
- else:
- return ' - '.join((self.department.name, self.name))
- return self.name
-
- @property
- def short(self):
- if self.organization:
- return ' - '.join((self.organization.name, self.name))
- elif self.department:
- if self.department.organization:
- return ' - '.join((self.department.organization.name, self.name))
- else:
- return ' - '.join((self.department.name, self.name))
- return self.name
-
-
-class Person(Displayable, AdminThumbMixin, Address):
- """(Person description)"""
-
- user = models.OneToOneField(User, verbose_name=_('user'), blank=True, null=True, on_delete=models.SET_NULL)
- person_title = models.CharField(_('title'), max_length=16, choices=TITLE_CHOICES, blank=True)
- gender = models.CharField(_('gender'), max_length=16, choices=GENDER_CHOICES, blank=True)
- first_name = models.CharField(_('first name'), max_length=255, blank=True, null=True)
- last_name = models.CharField(_('last name'), max_length=255, blank=True, null=True)
- email = models.EmailField(_('email'), blank=True, null=True)
- telephone = models.CharField(_('telephone'), max_length=64, blank=True, null=True)
- register_id = models.CharField(_('register ID'), blank=True, null=True, max_length=128)
- birthday = models.DateField(_('birthday'), blank=True, null=True)
- bio = RichTextField(_('biography'), blank=True)
- role = models.CharField(_('role'), max_length=256, blank=True, null=True)
- external_id = models.CharField(_('external ID'), blank=True, null=True, max_length=128)
-
- class Meta:
- verbose_name = _('person')
- ordering = ['last_name',]
-
- def __str__(self):
- return self.title
-
- def get_absolute_url(self):
- return reverse("organization-network-person-detail", kwargs={'slug': self.slug})
-
- def set_names(self):
- names = self.title.split(' ')
- if len(names) == 1:
- self.first_name = ''
- self.last_name = names[0]
- elif len(names) == 2:
- self.first_name = names[0]
- self.last_name = names[1]
- else:
- self.first_name = names[0]
- self.last_name = ' '.join(names[1:])
-
- def save(self, *args, **kwargs):
- super(Person, self).save(args, kwargs)
- for activity in self.activities.all():
- update_activity(activity)
-
-
-class OrganizationLinkedBlockInline(Titled, Orderable):
- organization_linked = models.ForeignKey('OrganizationLinked', verbose_name=_('organization list'), related_name='organization_linked_block_inline_list', blank=True, null=True)
- organization_main = models.ForeignKey('Organization', verbose_name=_('organization'), related_name='organization_linked_block', blank=True, null=True, on_delete=models.SET_NULL)
-
-
-class OrganizationLinked(Titled):
-
- class Meta:
- verbose_name = _('Organization Linked')
-
- def __str__(self):
- return self.title
-
-
-class OrganizationLinkedInline(Titled, Orderable):
-
- organization_list = models.ForeignKey('OrganizationLinked', verbose_name=_('organization linked'), related_name='organization_linked_inline_linked', blank=True, null=True, on_delete=models.SET_NULL)
- organization = models.ForeignKey('Organization', verbose_name=_('organization'), related_name='organization_linked_inline_from', blank=True, null=True, on_delete=models.SET_NULL)
-
-
-class OrganizationPlaylist(PlaylistRelated):
-
- organization = models.ForeignKey(Organization, verbose_name=_('organization'), related_name='playlists', blank=True, null=True, on_delete=models.SET_NULL)
-
-
-class OrganizationLink(Link):
-
- organization = models.ForeignKey(Organization, verbose_name=_('organization'), related_name='links', blank=True, null=True, on_delete=models.SET_NULL)
-
-
-class OrganizationImage(Image):
-
- organization = models.ForeignKey(Organization, verbose_name=_('organization'), related_name='images', blank=True, null=True, on_delete=models.SET_NULL)
-
-
-class OrganizationBlock(Block):
-
- organization = models.ForeignKey(Organization, verbose_name=_('organization'), related_name='blocks', blank=True, null=True, on_delete=models.SET_NULL)
-
-
-class OrganizationService(Named, URL, Orderable):
-
- organization = models.ForeignKey(Organization, verbose_name=_('organization'), related_name='services', blank=True, null=True, on_delete=models.SET_NULL)
- image = FileField(_("Image"), max_length=1024, format="Image", upload_to="images")
- css_color = models.CharField(_('css color'), max_length=64, blank=True, null=True, choices=CSS_COLOR_CHOICES)
- css_banner_type = models.CharField(_('css banner type'), max_length=64, blank=True, null=True, choices=CSS_BANNER_CHOICES)
- box_size = models.IntegerField(_('box size'), default=3, choices=BOX_SIZE_CHOICES)
-
-
-class OrganizationType(Named):
- """(OrganizationType description)"""
-
- css_class = models.CharField(_('class css'), max_length=64, blank=True, null=True, help_text="Determine color on map.")
-
- class Meta:
- verbose_name = _('organization type')
- ordering = ['name',]
-
-
-class OrganizationContact(Person):
-
- organization = models.ForeignKey(Organization, verbose_name=_('organization'), related_name='contacts', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = 'Organization contact'
- verbose_name_plural = 'Organization contacts'
-
-
-class OrganizationUserImage(UserImage):
-
- organization = models.ForeignKey(Organization, verbose_name=_('organization'), related_name='user_images', blank=True, null=True, on_delete=models.SET_NULL)
-
-
-class Department(Named):
- """(Department description)"""
-
- organization = models.ForeignKey('Organization', verbose_name=_('organization'), related_name="departments")
-
- class Meta:
- verbose_name = _('department')
- ordering = ['name',]
-
- def __str__(self):
- if self.organization:
- return ' - '.join((self.organization.name, self.name))
- return self.name
-
-
-class DepartmentPage(Page, SubTitled, RichText):
- """(Department description)"""
-
- department = models.ForeignKey('Department', verbose_name=_('department'), related_name="pages", blank=True, null=True, on_delete=models.SET_NULL)
- weaving_css_class = models.CharField(_('background pattern'), choices=PATTERN_CHOICES, max_length=64, blank=True)
-
- class Meta:
- verbose_name = _('department page')
-
-
-class TeamPage(Page, SubTitled, RichText):
- """(Team description)"""
-
- team = models.ForeignKey('Team', verbose_name=_('team'), related_name="pages", blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _('team page')
-
-
-class TeamLink(Link):
-
- team = models.ForeignKey(Team, verbose_name=_('team'), related_name='links', blank=True, null=True, on_delete=models.SET_NULL)
-
-
-class PersonPlaylist(PlaylistRelated):
-
- person = models.ForeignKey(Person, verbose_name=_('person'), related_name='playlists', blank=True, null=True, on_delete=models.SET_NULL)
-
-
-class PersonLink(Link):
-
- person = models.ForeignKey(Person, verbose_name=_('person'), related_name='links', blank=True, null=True, on_delete=models.SET_NULL)
-
-
-class PersonImage(Image):
-
- person = models.ForeignKey(Person, verbose_name=_('person'), related_name='images', blank=True, null=True, on_delete=models.SET_NULL)
-
-
-class PersonFile(File):
-
- person = models.ForeignKey(Person, verbose_name=_('person'), related_name='files', blank=True, null=True, on_delete=models.SET_NULL)
-
-
-class PersonBlock(Block):
-
- person = models.ForeignKey(Person, verbose_name=_('person'), related_name='blocks', blank=True, null=True, on_delete=models.SET_NULL)
-
-
-class PageCustomPersonListBlockInline(Titled):
-
- page = models.ForeignKey(CustomPage, verbose_name=_('Page'), related_name='page_custom_person_list_block_inlines', blank=True, null=True, on_delete=models.SET_NULL)
- person_list_block = models.ForeignKey("PersonListBlock", related_name='page_custom_person_list_block_inlines', verbose_name=_('Person List Block'), blank=True, null=True)
-
- class Meta:
- verbose_name = _('Person List')
-
- def __str__(self):
- return self.title
-
-
-class PersonListBlock(Titled, Dated):
-
- style = models.CharField(_('style'), max_length=16, choices=PERSON_LIST_STYLE_CHOICES)
-
- class Meta:
- verbose_name = _('Person List')
-
- def __str__(self):
- return self.title
-
-
-class PersonListBlockInline(models.Model):
-
- person_list_block = models.ForeignKey(PersonListBlock, verbose_name=_('Person List Block'), related_name='person_list_block_inlines', blank=True, null=True, on_delete=models.SET_NULL)
- person = models.ForeignKey(Person, verbose_name=_('Person'), related_name='person_list_block_inlines', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _('Person autocomplete')
-
-
-class ActivityStatus(Named):
-
- order = models.IntegerField(_('order number'), default=100)
- display = models.BooleanField(_('display on team page'), blank=True, default=True)
- parent = models.ForeignKey('ActivityStatus', verbose_name=_('parent'), related_name='children', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _('status')
- ordering = ['order']
-
-
-class ActivityGrade(Named):
-
- class Meta:
- verbose_name = _('grade')
- verbose_name_plural = _('grades')
-
-
-class ActivityFramework(Named):
-
- class Meta:
- verbose_name = _('framework')
- verbose_name_plural = _('frameworks')
-
-class ActivityFunction(Named):
-
- class Meta:
- verbose_name = _('function')
- verbose_name_plural = _('functions')
-
-class BudgetCode(Named):
-
- class Meta:
- verbose_name = _('budget code')
- verbose_name_plural = _('budget codes')
-
-class RecordPiece(Named):
-
- class Meta:
- verbose_name = _('record piece')
- verbose_name_plural = _('record pieces')
-
-class TrainingType(Named):
-
- class Meta:
- verbose_name = _('training type')
- verbose_name_plural = _('training types')
-
-class TrainingLevel(Named):
-
- class Meta:
- verbose_name = _('training level')
- verbose_name_plural = _('training levels')
-
-class TrainingTopic(Named):
-
- class Meta:
- verbose_name = _('training topic')
- verbose_name_plural = _('training topics')
-
-class TrainingSpeciality(Named):
-
- class Meta:
- verbose_name = _('training speciality')
- verbose_name_plural = _('training specialities')
-
-class UMR(Named):
-
- class Meta:
- verbose_name = _('UMR')
-
-
-class ActivityWeeklyHourVolume(Titled):
-
- monday_am = models.FloatField(_('monday AM'), validators=[validate_positive])
- monday_pm = models.FloatField(_('monday PM'), validators=[validate_positive])
- tuesday_am = models.FloatField(_('tuesday AM'), validators=[validate_positive])
- tuesday_pm = models.FloatField(_('tuesday PM'), validators=[validate_positive])
- wednesday_am = models.FloatField(_('wednesday AM'), validators=[validate_positive])
- wednesday_pm = models.FloatField(_('wednesday PM'), validators=[validate_positive])
- thursday_am = models.FloatField(_('thursday AM'), validators=[validate_positive])
- thursday_pm = models.FloatField(_('thursday PM'), validators=[validate_positive])
- friday_am = models.FloatField(_('friday AM'), validators=[validate_positive])
- friday_pm = models.FloatField(_('friday PM'), validators=[validate_positive])
-
- class Meta:
- verbose_name = _('Activity Weekly Hour Volume')
- verbose_name_plural = _('Activity Weekly Hour Volumes')
-
-
-class PersonActivity(Period):
- """(Activity description)"""
-
- person = models.ForeignKey('Person', verbose_name=_('person'), related_name='activities')
-
- weeks = models.IntegerField(_('number of weeks'), blank=True, null=True)
- status = models.ForeignKey(ActivityStatus, verbose_name=_('status'), blank=True, null=True, related_name='activities', on_delete=models.SET_NULL)
- is_permanent = models.BooleanField(_('permanent'), default=False)
- framework = models.ForeignKey(ActivityFramework, verbose_name=_('framework'), blank=True, null=True, on_delete=models.SET_NULL)
- grade = models.ForeignKey(ActivityGrade, verbose_name=_('grade'), blank=True, null=True, on_delete=models.SET_NULL)
- function = models.ForeignKey(ActivityFunction, verbose_name=_('function'), blank=True, null=True, on_delete=models.SET_NULL)
-
- organizations = models.ManyToManyField(Organization, verbose_name=_('organizations (attachment or subscribed)'), related_name='project_activities', blank=True)
- employers = models.ManyToManyField(Organization, verbose_name=_('employers'), related_name='employer_project_activities', blank=True)
- umr = models.ForeignKey(UMR, verbose_name=_('UMR'), blank=True, null=True, on_delete=models.SET_NULL)
- teams = models.ManyToManyField('Team', verbose_name=_('teams'), related_name='team_activities', blank=True)
- team_text = models.CharField(_('other team text'), blank=True, null=True, max_length=256)
-
- projects = models.ManyToManyField('organization-projects.Project', verbose_name=_('projects'), related_name='activities', blank=True)
- rd_quota_float = models.FloatField(_('R&D quota (float)'), blank=True, null=True)
- rd_quota_text = models.CharField(_('R&D quota (text)'), blank=True, null=True, max_length=128)
- rd_program = models.TextField(_('R&D program'), blank=True)
- budget_code = models.ForeignKey(BudgetCode, blank=True, null=True, on_delete=models.SET_NULL)
-
- supervisors = models.ManyToManyField('Person', verbose_name=_('supervisors'), related_name='supervisor_activities', blank=True)
-
- phd_doctoral_school = models.ForeignKey(Organization, verbose_name=_('doctoral school'), blank=True, null=True, on_delete=models.SET_NULL)
- phd_directors = models.ManyToManyField('Person', verbose_name=_('PhD directors'), related_name='phd_director_activities', blank=True)
- phd_defense_date = models.DateField(_('PhD defense date'), blank=True, null=True)
- phd_title = models.TextField(_('PhD title'), blank=True)
- phd_post_doctoral_situation = models.CharField(_('post-doctoral situation'), blank=True, max_length=256)
- hdr = models.BooleanField(_('HDR'), default=False)
-
- training_type = models.ForeignKey(TrainingType, verbose_name=_('training type'), blank=True, null=True, on_delete=models.SET_NULL)
- training_level = models.ForeignKey(TrainingLevel, verbose_name=_('training level'), blank=True, null=True, on_delete=models.SET_NULL)
- training_topic = models.ForeignKey(TrainingTopic, verbose_name=_('training topic'), blank=True, null=True, on_delete=models.SET_NULL)
- training_speciality = models.ForeignKey(TrainingSpeciality, verbose_name=_('training speciality'), blank=True, null=True, on_delete=models.SET_NULL)
- training_title = models.TextField(_('Training title'), blank=True)
-
- record_piece = models.ForeignKey(RecordPiece, blank=True, null=True, on_delete=models.SET_NULL)
-
- date_added = models.DateTimeField(_('add date'), auto_now_add=True)
- date_modified = models.DateTimeField(_('modification date'), auto_now=True)
- date_modified_manual = models.DateTimeField(_('manual modification date'), blank=True, null=True)
-
- comments = models.TextField(_('comments'), blank=True)
- external_id = models.CharField(_('external ID'), blank=True, null=True, max_length=128)
-
- weekly_hour_volume = models.ForeignKey('ActivityWeeklyHourVolume', blank=True, null=True, on_delete=models.SET_NULL)
-
- monday_am = models.FloatField(_('monday AM'), validators=[validate_positive], blank=True, null=True)
- monday_pm = models.FloatField(_('monday PM'), validators=[validate_positive], blank=True, null=True)
- tuesday_am = models.FloatField(_('tuesday AM'), validators=[validate_positive], blank=True, null=True)
- tuesday_pm = models.FloatField(_('tuesday PM'), validators=[validate_positive], blank=True, null=True)
- wednesday_am = models.FloatField(_('wednesday AM'), validators=[validate_positive], blank=True, null=True)
- wednesday_pm = models.FloatField(_('wednesday PM'), validators=[validate_positive], blank=True, null=True)
- thursday_am = models.FloatField(_('thursday AM'), validators=[validate_positive], blank=True, null=True)
- thursday_pm = models.FloatField(_('thursday PM'), validators=[validate_positive], blank=True, null=True)
- friday_am = models.FloatField(_('friday AM'), validators=[validate_positive], blank=True, null=True)
- friday_pm = models.FloatField(_('friday PM'), validators=[validate_positive], blank=True, null=True)
-
- class Meta:
- verbose_name = _('activity')
- verbose_name_plural = _('activities')
- ordering = ['-date_from',]
-
- def __str__(self):
- if self.status:
- return ' - '.join((self.status.name, str(self.date_from), str(self.date_to)))
- else:
- return ' - '.join((str(self.date_from), str(self.date_to)))
-
- def save(self, *args, **kwargs):
- super(PersonActivity, self).save(args, kwargs)
- update_activity(self)
-
-
-
-class PersonActivityTimeSheet(models.Model):
-
- activity = models.ForeignKey('PersonActivity', verbose_name=_('activity'), related_name='timesheets')
- project = models.ForeignKey('organization-projects.Project', verbose_name=_('project'), related_name='timesheets')
- work_packages = models.ManyToManyField('organization-projects.ProjectWorkPackage', verbose_name=_('work package'), related_name='timesheets', blank=True)
- percentage = models.FloatField(_('% of work time on the project'), validators=[validate_positive])
- month = models.IntegerField(_('month'), choices=MONTH_CHOICES)
- year = models.IntegerField(_('year'))
- accounting = models.DateField(blank=True, null=True)
- validation = models.DateField(blank=True, null=True)
-
- @property
- def date(self):
- pass
-
- class Meta:
- verbose_name = _('activity timesheet')
- verbose_name_plural = _('activity timesheets')
- ordering = ['month',]
- unique_together = (("activity", "project", "month", "year"),)
-
-
-class PersonActivityVacation(Period):
-
- activity = models.ForeignKey('PersonActivity', verbose_name=_('activity'))
-
-
-def update_activity(a):
- if a.weekly_hour_volume :
- # caution : if 0 return False
- # caution : 'None' is not empty
- if not a.monday_am.__str__() != 'None' and \
- not a.monday_pm.__str__() != 'None' and \
- not a.tuesday_am.__str__() != 'None' and \
- not a.tuesday_pm.__str__() != 'None' and \
- not a.wednesday_am.__str__() != 'None' and \
- not a.wednesday_pm.__str__() != 'None' and \
- not a.thursday_am.__str__() != 'None' and \
- not a.thursday_pm.__str__() != 'None' and \
- not a.friday_am.__str__() != 'None' and \
- not a.friday_pm.__str__() != 'None' :
- a.monday_am = a.weekly_hour_volume.monday_am
- a.monday_pm = a.weekly_hour_volume.monday_pm
- a.tuesday_am = a.weekly_hour_volume.tuesday_am
- a.tuesday_pm = a.weekly_hour_volume.tuesday_pm
- a.wednesday_am = a.weekly_hour_volume.wednesday_am
- a.wednesday_pm = a.weekly_hour_volume.wednesday_pm
- a.thursday_am = a.weekly_hour_volume.thursday_am
- a.thursday_pm = a.weekly_hour_volume.thursday_pm
- a.friday_am = a.weekly_hour_volume.friday_am
- a.friday_pm = a.weekly_hour_volume.friday_pm
- a.save()
diff --git a/app/organization/network/nationalities/__init__.py b/app/organization/network/nationalities/__init__.py
deleted file mode 100644
index 12176181..00000000
--- a/app/organization/network/nationalities/__init__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
diff --git a/app/organization/network/nationalities/fields.py b/app/organization/network/nationalities/fields.py
deleted file mode 100644
index d09521c1..00000000
--- a/app/organization/network/nationalities/fields.py
+++ /dev/null
@@ -1,138 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.db.models.fields import CharField
-
-class Nationality(object):
- """
- Class represents a nationality.
-
- >>> hungarian = Nationality('HU')
- >>> hungarian.code
- u'HU'
- >>> hungarian.name
- u'Hungarian'
-
- """
-
- def __init__(self, code):
- """
- Constructor accepts ISO 3166-1 country code.
- """
- self.code = code
-
- def __unicode__(self):
- return str(self.code or '')
-
- def __eq__(self, other):
- return self.code == str(other)
-
- def __ne__(self, other):
- return not self.__eq__(other)
-
- def __cmp__(self, other):
- return cmp(self.code, str(other))
-
- def __hash__(self):
- return hash(self.code)
-
- @property
- def name(self):
- """
- Return verbose name of nationality.
- """
- from .nationalities import NATIONALITIES
- for code, name in NATIONALITIES:
- if self.code == code:
- return name
- return None
-
-
-class NationalityDescriptor(object):
- """
- A descriptor for nationality fields on model instances. Returns a
- Nationality when accessed.
-
- >>> instance.nationality.name
- u'Hungarian'
-
- """
-
- def __init__(self, field):
- self.field = field
-
- def __get__(self, instance=None, owner=None):
- if instance is None:
- raise AttributeError(
- "The '%s' attribute can only be accessed from %s instances."
- % (self.field.name, owner.__name__))
- return Nationality(code=instance.__dict__[self.field.name])
-
- def __set__(self, instance, value):
- instance.__dict__[self.field.name] = str(value)
-
-
-class NationalityField(CharField):
- """
- A nationality field for Django models that provides all nationalities as
- choices.
- """
-
- descriptor_class = NationalityDescriptor
-
- def __init__(self, *args, **kwargs):
- from .nationalities import NATIONALITIES
- kwargs.setdefault('max_length', 2)
- kwargs.setdefault('choices', NATIONALITIES)
- super(CharField, self).__init__(*args, **kwargs)
-
- def get_internal_type(self):
- return 'CharField'
-
- def contribute_to_class(self, cls, name):
- super(NationalityField, self).contribute_to_class(cls, name)
- setattr(cls, self.name, self.descriptor_class(self))
-
- def get_prep_lookup(self, lookup_type, value):
- if hasattr(value, 'code'):
- value = value.code
- return super(NationalityField, self).get_prep_lookup(lookup_type, value)
-
- def pre_save(self, *args, **kwargs):
- "Returns field's value just before saving."
- value = super(CharField, self).pre_save(*args, **kwargs)
- return self.get_prep_value(value)
-
- def get_prep_value(self, value):
- "Returns field's value prepared for saving into a database."
- # Convert the Nationality to unicode for database insertion.
- if value is None:
- return None
- return str(value)
-
-
-# If south is installed, ensure that NationalityField will be introspected just
-# like a normal CharField.
-try:
- from south.modelsinspector import add_introspection_rules
- add_introspection_rules([], ["^nationalities\.fields\.NationalityField"])
-except ImportError:
- pass
diff --git a/app/organization/network/nationalities/nationalities.py b/app/organization/network/nationalities/nationalities.py
deleted file mode 100644
index c4fa7221..00000000
--- a/app/organization/network/nationalities/nationalities.py
+++ /dev/null
@@ -1,195 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.utils.translation import ugettext_lazy as _
-
-
-# source: http://www.englishclub.com/vocabulary/world-countries-nationality.htm
-NATIONALITIES = (
- ('AF', _(u'Afghan')),
- ('AL', _(u'Albanian')),
- ('DZ', _(u'Algerian')),
- ('AD', _(u'Andorran')),
- ('AO', _(u'Angolan')),
- ('AR', _(u'Argentinian')),
- ('AM', _(u'Armenian')),
- ('AU', _(u'Australian')),
- ('AT', _(u'Austrian')),
- ('AZ', _(u'Azerbaijani')),
- ('BS', _(u'Bahamian')),
- ('BH', _(u'Bahraini')),
- ('BD', _(u'Bangladeshi')),
- ('BB', _(u'Barbadian')),
- ('BY', _(u'Belorussian')),
- ('BE', _(u'Belgian')),
- ('BZ', _(u'Belizian')),
- ('BJ', _(u'Beninese')),
- ('BT', _(u'Bhutanese')),
- ('BO', _(u'Bolivian')),
- ('BA', _(u'Bosnian')),
- ('BW', _(u'Botswanan')),
- ('BR', _(u'Brazilian')),
- ('GB', _(u'British')),
- ('BN', _(u'Bruneian')),
- ('BG', _(u'Bulgarian')),
- ('BF', _(u'Burkinese')),
- ('MM', _(u'Burmese')),
- ('BF', _(u'Burundian')),
- ('BI', _(u'Cambodian')),
- ('CM', _(u'Cameroonian')),
- ('CA', _(u'Canadian')),
- ('CV', _(u'Cape Verdean')),
- ('TD', _(u'Chadian')),
- ('CL', _(u'Chilean')),
- ('CN', _(u'Chinese')),
- ('CO', _(u'Colombian')),
- ('CG', _(u'Congolese')),
- ('CR', _(u'Costa Rican')),
- ('HR', _(u'Croatian')),
- ('CU', _(u'Cuban')),
- ('CY', _(u'Cypriot')),
- ('CZ', _(u'Czech')),
- ('DK', _(u'Danish')),
- ('DJ', _(u'Djiboutian')),
- ('DM', _(u'Dominican')),
- ('DO', _(u'Dominican')),
- ('EC', _(u'Ecuadorean')),
- ('EG', _(u'Egyptian')),
- ('SV', _(u'Salvadorean')),
- ('GB', _(u'English')),
- ('ER', _(u'Eritrean')),
- ('EE', _(u'Estonian')),
- ('ET', _(u'Ethiopian')),
- ('FJ', _(u'Fijian')),
- ('FI', _(u'Finnish')),
- ('FR', _(u'French')),
- ('GA', _(u'Gabonese')),
- ('GM', _(u'Gambian')),
- ('GE', _(u'Georgian')),
- ('DE', _(u'German')),
- ('GH', _(u'Ghanaian')),
- ('GR', _(u'Greek')),
- ('GD', _(u'Grenadian')),
- ('GT', _(u'Guatemalan')),
- ('GQ', _(u'Guinean')),
- ('GY', _(u'Guyanese')),
- ('HT', _(u'Haitian')),
- ('NL', _(u'Dutch')),
- ('HN', _(u'Honduran')),
- ('HU', _(u'Hungarian')),
- ('IS', _(u'Icelandic')),
- ('IO', _(u'Indian')),
- ('ID', _(u'Indonesian')),
- ('IR', _(u'Iranian')),
- ('IQ', _(u'Iraqi')),
- ('IE', _(u'Irish')),
- ('IL', _(u'Israeli')),
- ('IT', _(u'Italian')),
- ('JM', _(u'Jamaican')),
- ('JP', _(u'Japanese')),
- ('JO', _(u'Jordanian')),
- ('KZ', _(u'Kazakh')),
- ('KE', _(u'Kenyan')),
- ('KW', _(u'Kuwaiti')),
- ('LA', _(u'Laotian')),
- ('LV', _(u'Latvian')),
- ('LB', _(u'Lebanese')),
- ('LR', _(u'Liberian')),
- ('LY', _(u'Libyan')),
- ('LT', _(u'Lithuanian')),
- ('MK', _(u'Macedonian')),
- ('MG', _(u'Malagasay')),
- ('MW', _(u'Malawian')),
- ('MY', _(u'Malaysian')),
- ('MV', _(u'Maldivian')),
- ('ML', _(u'Malian')),
- ('MT', _(u'Maltese')),
- ('MR', _(u'Mauritanian')),
- ('MU', _(u'Mauritian')),
- ('MX', _(u'Mexican')),
- ('MD', _(u'Moldovan')),
- ('MC', _(u'Monacan')),
- ('MN', _(u'Mongolian')),
- ('ME', _(u'Montenegrin')),
- ('MA', _(u'Moroccan')),
- ('MZ', _(u'Mozambican')),
- ('NA', _(u'Namibian')),
- ('NP', _(u'Nepalese')),
- ('NI', _(u'Nicaraguan')),
- ('NE', _(u'Nigerien')),
- ('NG', _(u'Nigerian')),
- ('KP', _(u'North Korean')),
- ('NO', _(u'Norwegian')),
- ('OM', _(u'Omani')),
- ('PK', _(u'Pakistani')),
- ('PA', _(u'Panamanian')),
- ('PG', _(u'Guinean')),
- ('PY', _(u'Paraguayan')),
- ('PE', _(u'Peruvian')),
- ('PH', _(u'Philippine')),
- ('PL', _(u'Polish')),
- ('PT', _(u'Portuguese')),
- ('QA', _(u'Qatari')),
- ('RO', _(u'Romanian')),
- ('RU', _(u'Russian')),
- ('RW', _(u'Rwandan')),
- ('SA', _(u'Saudi')),
- ('AE', _(u'Scottish')),
- ('SN', _(u'Senegalese')),
- ('RS', _(u'Serbian')),
- ('SC', _(u'Seychellois')),
- ('SL', _(u'Sierra Leonian')),
- ('SG', _(u'Singaporean')),
- ('SK', _(u'Slovak')),
- ('SI', _(u'Slovenian')),
- ('SO', _(u'Somali')),
- ('ZA', _(u'South African')),
- ('KR', _(u'South Korean')),
- ('ES', _(u'Spanish')),
- ('LK', _(u'Sri Lankan')),
- ('SD', _(u'Sudanese')),
- ('SR', _(u'Surinamese')),
- ('SZ', _(u'Swazi')),
- ('SE', _(u'Swedish')),
- ('CH', _(u'Swiss')),
- ('SY', _(u'Syrian')),
- ('TW', _(u'Taiwanese')),
- ('TJ', _(u'Tadjik')),
- ('TZ', _(u'Tanzanian')),
- ('TH', _(u'Thai')),
- ('TG', _(u'Togolese')),
- ('TT', _(u'Trinidadian')),
- ('TN', _(u'Tunisian')),
- ('TR', _(u'Turkish')),
- ('TM', _(u'Turkmen')),
- ('TV', _(u'Tuvaluan')),
- ('UG', _(u'Ugandan')),
- ('UA', _(u'Ukrainian')),
- ('UY', _(u'Uruguayan')),
- ('UZ', _(u'Uzbek')),
- ('VU', _(u'Vanuatuan')),
- ('VE', _(u'Venezuelan')),
- ('VN', _(u'Vietnamese')),
- ('GB', _(u'Welsh')),
- ('YE', _(u'Yemeni')),
- ('ZM', _(u'Zambian')),
- ('ZW', _(u'Zimbabwean')),
-)
diff --git a/app/organization/network/tests.py b/app/organization/network/tests.py
deleted file mode 100644
index 7b0e913e..00000000
--- a/app/organization/network/tests.py
+++ /dev/null
@@ -1,470 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.test import SimpleTestCase
-import datetime
-from organization.network.utils import get_nb_half_days_by_period, get_nb_half_days_by_period_per_month
-from organization.network.api import get_leave_days_per_month
-
-#
-# To run tests without database :
-# python manage.py test organization.network.tests.[method_name] --settings='organization.core.no_db_settings'
-#
-
-class NbOfHalfDaysInPeriodTestCase(SimpleTestCase):
-
- def setUp(self):
- self.date_from = datetime.date(2016,12,1)
- self.date_to = datetime.date(2016,12,31)
-
- def test_nbhalf_half_days(self):
-
- expected = {
- "monday_am": 4,
- "monday_pm": 4,
- "tuesday_am": 4,
- "tuesday_pm": 4,
- "wednesday_am": 4,
- "wednesday_pm": 4,
- "thursday_am": 5,
- "thursday_pm": 5,
- "friday_am": 5,
- "friday_pm": 5,
- }
-
- result = get_nb_half_days_by_period(self.date_from, self.date_to)
- self.assertEquals(result, expected)
-
-
-class NbOfHalfDaysInPeriodPerMonthTestCase(SimpleTestCase):
-
- def setUp(self):
- self.date_from = datetime.date(2015,1,1)
- self.date_to = datetime.date(2015,12,31)
-
- def test_nbhalf_half_days(self):
-
- expected = {
- 1:{
- 'friday_pm':52,
- 'tuesday_am':52,
- 'thursday_pm':53,
- 'monday_pm':52,
- 'tuesday_pm':52,
- 'wednesday_am':52,
- 'thursday_am':53,
- 'wednesday_pm':52,
- 'friday_am':52,
- 'monday_am':52
- },
- 2:{
- 'friday_pm':52,
- 'tuesday_am':52,
- 'thursday_pm':53,
- 'monday_pm':52,
- 'tuesday_pm':52,
- 'wednesday_am':52,
- 'thursday_am':53,
- 'wednesday_pm':52,
- 'friday_am':52,
- 'monday_am':52
- },
- 3:{
- 'friday_pm':52,
- 'tuesday_am':52,
- 'thursday_pm':53,
- 'monday_pm':52,
- 'tuesday_pm':52,
- 'wednesday_am':52,
- 'thursday_am':53,
- 'wednesday_pm':52,
- 'friday_am':52,
- 'monday_am':52
- },
- 4:{
- 'friday_pm':52,
- 'tuesday_am':52,
- 'thursday_pm':53,
- 'monday_pm':52,
- 'tuesday_pm':52,
- 'wednesday_am':52,
- 'thursday_am':53,
- 'wednesday_pm':52,
- 'friday_am':52,
- 'monday_am':52
- },
- 5:{
- 'friday_pm':52,
- 'tuesday_am':52,
- 'thursday_pm':53,
- 'monday_pm':52,
- 'tuesday_pm':52,
- 'wednesday_am':52,
- 'thursday_am':53,
- 'wednesday_pm':52,
- 'friday_am':52,
- 'monday_am':52
- },
- 6:{
- 'friday_pm':52,
- 'tuesday_am':52,
- 'thursday_pm':53,
- 'monday_pm':52,
- 'tuesday_pm':52,
- 'wednesday_am':52,
- 'thursday_am':53,
- 'wednesday_pm':52,
- 'friday_am':52,
- 'monday_am':52
- },
- 7:{
- 'friday_pm':52,
- 'tuesday_am':52,
- 'thursday_pm':53,
- 'monday_pm':52,
- 'tuesday_pm':52,
- 'wednesday_am':52,
- 'thursday_am':53,
- 'wednesday_pm':52,
- 'friday_am':52,
- 'monday_am':52
- },
- 8:{
- 'friday_pm':52,
- 'tuesday_am':52,
- 'thursday_pm':53,
- 'monday_pm':52,
- 'tuesday_pm':52,
- 'wednesday_am':52,
- 'thursday_am':53,
- 'wednesday_pm':52,
- 'friday_am':52,
- 'monday_am':52
- },
- 9:{
- 'friday_pm':52,
- 'tuesday_am':52,
- 'thursday_pm':53,
- 'monday_pm':52,
- 'tuesday_pm':52,
- 'wednesday_am':52,
- 'thursday_am':53,
- 'wednesday_pm':52,
- 'friday_am':52,
- 'monday_am':52
- },
- 10:{
- 'friday_pm':52,
- 'tuesday_am':52,
- 'thursday_pm':53,
- 'monday_pm':52,
- 'tuesday_pm':52,
- 'wednesday_am':52,
- 'thursday_am':53,
- 'wednesday_pm':52,
- 'friday_am':52,
- 'monday_am':52
- },
- 11:{
- 'friday_pm':52,
- 'tuesday_am':52,
- 'thursday_pm':53,
- 'monday_pm':52,
- 'tuesday_pm':52,
- 'wednesday_am':52,
- 'thursday_am':53,
- 'wednesday_pm':52,
- 'friday_am':52,
- 'monday_am':52
- },
- 12:{
- 'friday_pm':52,
- 'tuesday_am':52,
- 'thursday_pm':53,
- 'monday_pm':52,
- 'tuesday_pm':52,
- 'wednesday_am':52,
- 'thursday_am':53,
- 'wednesday_pm':52,
- 'friday_am':52,
- 'monday_am':52
- }
- }
-
- result = get_nb_half_days_by_period_per_month(self.date_from, self.date_to)
- self.assertEquals(result, expected)
-
-
-class NbOfHalfDaysInPeriodPerMonthTestCase2(SimpleTestCase):
-
- def setUp(self):
- self.date_from = datetime.date(2016,1,1)
- self.date_to = datetime.date(2016,12,31)
-
- def test_nbhalf_half_days(self):
- expected = {
- 1:{
- 'wednesday_pm':4,
- 'tuesday_am':4,
- 'thursday_am':4,
- 'monday_am':4,
- 'tuesday_pm':4,
- 'friday_am':4,
- 'wednesday_am':4,
- 'thursday_pm':4,
- 'friday_pm':4,
- 'monday_pm':4
- },
- 2:{
- 'wednesday_pm':4,
- 'tuesday_am':4,
- 'thursday_am':4,
- 'monday_am':5,
- 'tuesday_pm':4,
- 'friday_am':4,
- 'wednesday_am':4,
- 'thursday_pm':4,
- 'friday_pm':4,
- 'monday_pm':5
- },
- 3:{
- 'wednesday_pm':5,
- 'tuesday_am':5,
- 'thursday_am':5,
- 'monday_am':3,
- 'tuesday_pm':5,
- 'friday_am':4,
- 'wednesday_am':5,
- 'thursday_pm':5,
- 'friday_pm':4,
- 'monday_pm':3
- },
- 4:{
- 'wednesday_pm':4,
- 'tuesday_am':4,
- 'thursday_am':4,
- 'monday_am':4,
- 'tuesday_pm':4,
- 'friday_am':5,
- 'wednesday_am':4,
- 'thursday_pm':4,
- 'friday_pm':5,
- 'monday_pm':4
- },
- 5:{
- 'wednesday_pm':4,
- 'tuesday_am':5,
- 'thursday_am':3,
- 'monday_am':4,
- 'tuesday_pm':5,
- 'friday_am':4,
- 'wednesday_am':4,
- 'thursday_pm':3,
- 'friday_pm':4,
- 'monday_pm':4
- },
- 6:{
- 'wednesday_pm':5,
- 'tuesday_am':4,
- 'thursday_am':5,
- 'monday_am':4,
- 'tuesday_pm':4,
- 'friday_am':4,
- 'wednesday_am':5,
- 'thursday_pm':5,
- 'friday_pm':4,
- 'monday_pm':4
- },
- 7:{
- 'wednesday_pm':4,
- 'tuesday_am':4,
- 'thursday_am':3,
- 'monday_am':4,
- 'tuesday_pm':4,
- 'friday_am':5,
- 'wednesday_am':4,
- 'thursday_pm':3,
- 'friday_pm':5,
- 'monday_pm':4
- },
- 8:{
- 'wednesday_pm':5,
- 'tuesday_am':5,
- 'thursday_am':4,
- 'monday_am':4,
- 'tuesday_pm':5,
- 'friday_am':4,
- 'wednesday_am':5,
- 'thursday_pm':4,
- 'friday_pm':4,
- 'monday_pm':4
- },
- 9:{
- 'wednesday_pm':4,
- 'tuesday_am':4,
- 'thursday_am':5,
- 'monday_am':4,
- 'tuesday_pm':4,
- 'friday_am':5,
- 'wednesday_am':4,
- 'thursday_pm':5,
- 'friday_pm':5,
- 'monday_pm':4
- },
- 10:{
- 'wednesday_pm':4,
- 'tuesday_am':4,
- 'thursday_am':4,
- 'monday_am':5,
- 'tuesday_pm':4,
- 'friday_am':4,
- 'wednesday_am':4,
- 'thursday_pm':4,
- 'friday_pm':4,
- 'monday_pm':5
- },
- 11:{
- 'wednesday_pm':5,
- 'tuesday_am':4,
- 'thursday_am':4,
- 'monday_am':4,
- 'tuesday_pm':4,
- 'friday_am':3,
- 'wednesday_am':5,
- 'thursday_pm':4,
- 'friday_pm':3,
- 'monday_pm':4
- },
- 12:{
- 'wednesday_pm':4,
- 'tuesday_am':4,
- 'thursday_am':5,
- 'monday_am':4,
- 'tuesday_pm':4,
- 'friday_am':5,
- 'wednesday_am':4,
- 'thursday_pm':5,
- 'friday_pm':5,
- 'monday_pm':4
- }
- }
- result = get_nb_half_days_by_period_per_month(self.date_from, self.date_to)
- self.assertEquals(result, expected)
-
-
-class NbOfLeaveDaysPerMonthTestCase2(SimpleTestCase):
-
- def setUp(self):
- self.date_from = datetime.date(2016,1,1)
- self.date_to = datetime.date(2016,1,31)
- self.external_id = 106
-
- def test_nb_leave_days(self):
- expected = {}
- result = get_leave_days_per_month(self.date_from, self.date_to, self.external_id)
- self.assertEquals(result, expected)
-
-
-class NbOfLeaveDaysPerMonthTestCase(SimpleTestCase):
-
- def setUp(self):
- self.date_from = datetime.date(2015,1,1)
- self.date_to = datetime.date(2015,12,31)
- self.external_id = 97
-
- def test_nb_leave_days(self):
-
- expected = {
- 1:{
- 'wednesday_am':1,
- 'monday_am':2,
- 'friday_am':1,
- 'thursday_am':1,
- 'tuesday_pm':1,
- 'wednesday_pm':1,
- 'friday_pm':2,
- 'tuesday_am':1,
- 'monday_pm':2,
- 'thursday_pm':1
- },
- 6:{
- 'monday_pm':1
- },
- 7:{
- 'wednesday_am':3,
- 'monday_am':2,
- 'friday_am':2,
- 'thursday_am':3,
- 'tuesday_pm':2,
- 'wednesday_pm':3,
- 'friday_pm':2,
- 'tuesday_am':2,
- 'monday_pm':2,
- 'thursday_pm':3
- },
- 8:{
- 'wednesday_am':2,
- 'monday_am':3,
- 'friday_am':2,
- 'thursday_am':2,
- 'tuesday_pm':3,
- 'wednesday_pm':2,
- 'friday_pm':2,
- 'tuesday_am':3,
- 'monday_pm':4,
- 'thursday_pm':2
- },
- 9:{
- 'wednesday_am':1,
- 'friday_am':1,
- 'thursday_am':1,
- 'tuesday_pm':1,
- 'wednesday_pm':1,
- 'tuesday_am':1,
- 'friday_pm':1,
- 'thursday_pm':1
- },
- 10:{
- 'thursday_pm':1
- },
- 11:{
- 'wednesday_am':1,
- 'monday_am':1,
- 'tuesday_pm':1,
- 'wednesday_pm':1,
- 'friday_pm':1,
- 'tuesday_am':1,
- 'monday_pm':1
- },
- 12:{
- 'wednesday_am':2,
- 'monday_am':1,
- 'thursday_am':2,
- 'tuesday_pm':2,
- 'wednesday_pm':2,
- 'tuesday_am':2,
- 'monday_pm':2,
- 'thursday_pm':2
- }
- }
-
- result = get_leave_days_per_month(self.date_from, self.date_to, self.external_id)
- self.assertEquals(result, expected)
diff --git a/app/organization/network/translation.py b/app/organization/network/translation.py
deleted file mode 100644
index 7eb571d9..00000000
--- a/app/organization/network/translation.py
+++ /dev/null
@@ -1,234 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from modeltranslation.translator import translator, register, TranslationOptions
-
-from organization.network.models import *
-
-
-@register(Organization)
-class OrganizationTranslationOptions(TranslationOptions):
-
- fields = ('description', 'opening_times', 'subway_access', 'bio')
-
-
-@register(Department)
-class DepartmentTranslationOptions(TranslationOptions):
-
- fields = ('name', 'description')
-
-
-@register(DepartmentPage)
-class DepartmentPageTranslationOptions(TranslationOptions):
-
- fields = ('sub_title', 'content',)
-
-
-@register(Team)
-class TeamTranslationOptions(TranslationOptions):
-
- fields = ('name', 'description')
-
-
-@register(TeamPage)
-class TeamPageTranslationOptions(TranslationOptions):
-
- fields = ('sub_title', 'content',)
-
-
-@register(TeamLink)
-class TeamLinkTranslationOptions(TranslationOptions):
-
- fields = ()
-
-
-@register(Person)
-class PersonTranslationOptions(TranslationOptions):
-
- fields = ('description','bio',)
-
-
-@register(PersonActivity)
-class PersonActivityTranslationOptions(TranslationOptions):
-
- fields = ('comments',)
-
-
-@register(PersonPlaylist)
-class PersonPlaylistTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(PersonLink)
-class PersonLinkTranslationOptions(TranslationOptions):
-
- fields = ('title',)
-
-
-@register(PersonImage)
-class PersonImageTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(PersonFile)
-class PersonFileTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(PersonBlock)
-class PersonBlockTranslationOptions(TranslationOptions):
-
- fields = ('title', 'description', 'content')
-
-
-@register(OrganizationPlaylist)
-class OrganizationTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(OrganizationLink)
-class OrganizationLinkTranslationOptions(TranslationOptions):
-
- fields = ('title',)
-
-
-@register(OrganizationImage)
-class OrganizationImageTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(OrganizationBlock)
-class OrganizationBlockTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(OrganizationService)
-class OrganizationServiceTranslationOptions(TranslationOptions):
-
- fields = ('name', 'description')
-
-
-@register(OrganizationContact)
-class OrganizationContactTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(PersonListBlock)
-class PersonListBlockTranslationOptions(TranslationOptions):
-
- fields = ('title', 'description')
-
-
-@register(PersonListBlockInline)
-class PersonListBlockInlineTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(PageCustomPersonListBlockInline)
-class PageCustomPersonListBlockInlineTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(ActivityGrade)
-class ActivityGradeTranslationOptions(TranslationOptions):
-
- fields = ['name', 'description']
-
-
-@register(ActivityFunction)
-class ActivityFunctionTranslationOptions(TranslationOptions):
-
- fields = ['name', 'description']
-
-
-@register(ActivityFramework)
-class ActivityFrameworkTranslationOptions(TranslationOptions):
-
- fields = ['name', 'description']
-
-
-@register(ActivityStatus)
-class ActivityStatusTranslationOptions(TranslationOptions):
-
- fields = ['name', 'description',]
-
-
-@register(TrainingTopic)
-class TrainingTopicTranslationOptions(TranslationOptions):
-
- fields = ['name', 'description']
-
-
-@register(TrainingType)
-class TrainingTypeTranslationOptions(TranslationOptions):
-
- fields = ['name', 'description']
-
-
-@register(TrainingLevel)
-class TrainingLevelTranslationOptions(TranslationOptions):
-
- fields = ['name', 'description']
-
-
-@register(TrainingSpeciality)
-class TrainingSpecialityTranslationOptions(TranslationOptions):
-
- fields = ['name', 'description']
-
-
-@register(OrganizationLinked)
-class OrganizationLinkedTranslationOptions(TranslationOptions):
-
- fields = []
-
-
-@register(OrganizationLinkedInline)
-class OrganizationLinkedInlineTranslationOptions(TranslationOptions):
-
- fields = []
-
-
-@register(OrganizationLinkedBlockInline)
-class OrganizationLinkedBlockInlineTranslationOptions(TranslationOptions):
-
- fields = []
-
-
-@register(ActivityWeeklyHourVolume)
-class ActivityWeeklyHourVolumeTranslationOptions(TranslationOptions):
-
- fields = []
-
-
-@register(PersonActivityTimeSheet)
-class PersonActivityTimeSheetTranslationOptions(TranslationOptions):
-
- fields = []
diff --git a/app/organization/network/urls.py b/app/organization/network/urls.py
deleted file mode 100644
index 01dbb171..00000000
--- a/app/organization/network/urls.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-
-import django.views.i18n
-from django.conf.urls import patterns, include, url
-from django.conf.urls.i18n import i18n_patterns
-from django.contrib.auth.decorators import permission_required
-from mezzanine.core.views import direct_to_template
-from mezzanine.conf import settings
-
-from organization.network.views import *
-
-urlpatterns = [
- url(r'^person/(?P.*)/timesheet/(?P[0-9]{4})/(?P[0-9]{1,2})/export_xls/$', PersonActivityTimeSheetExportView.as_view(), name="organization-network-timesheet-export-xls-view"),
- url(r'^person/(?P.*)/timesheet/(?P[0-9]{4})/(?P[0-9]{1,2})/create/$', TimeSheetCreateView.as_view(), name="organization-network-timesheet-create-view"),
- url(r'^person/(?P.*)/timesheet/dashboard/$', PersonActivityTimeSheetListView.as_view(), name="organization-network-timesheet-list-view" ),
- url(r'^person/(?P.*)/$', PersonDetailView.as_view(), name="organization-network-person-detail"),
- url("^person-list-block-autocomplete/$", permission_required('person.can_edit')(PersonListBlockAutocompleteView.as_view()), name='person-list-block-autocomplete'),
- url("^person-autocomplete/$", permission_required('person.can_edit')(PersonListView.as_view()), name='person-autocomplete'),
- url("^network/$", OrganizationListView.as_view(), name='network'),
- url("^organization-linked-list-autocomplete/$", permission_required('organization.can_edit')(OrganizationLinkedListView.as_view()), name='organization-linked-list-autocomplete'),
- url("^organization-linked-autocomplete/$", permission_required('organization.can_edit')(OrganizationLinkedView.as_view()), name='organization-linked-autocomplete'),
- ]
diff --git a/app/organization/network/utils.py b/app/organization/network/utils.py
deleted file mode 100644
index d2fb1d8b..00000000
--- a/app/organization/network/utils.py
+++ /dev/null
@@ -1,316 +0,0 @@
-# -*- coding: utf-8 -*-
-import pandas as pd
-import csv
-from django.http import HttpResponse
-from xlwt import *
-import calendar
-import datetime
-from django.utils import timezone
-from organization.network.api import *
-from collections import defaultdict, OrderedDict
-from pprint import pprint
-from workalendar.europe import France
-
-
-def get_nb_half_days_by_period(date_from, date_to):
- day_list = pd.date_range(date_from, date_to).tolist()
- day_dict = {
- "monday_am": 0,
- "monday_pm": 0,
- "tuesday_am": 0,
- "tuesday_pm": 0,
- "wednesday_am": 0,
- "wednesday_pm": 0,
- "thursday_am": 0,
- "thursday_pm": 0,
- "friday_am": 0,
- "friday_pm": 0,
- }
- for day in day_list :
- if day.dayofweek == 0:
- day_dict['monday_am'] += 1
- day_dict['monday_pm'] += 1
- if day.dayofweek == 1:
- day_dict['tuesday_am'] += 1
- day_dict['tuesday_pm'] += 1
- if day.dayofweek == 2:
- day_dict['wednesday_am'] += 1
- day_dict['wednesday_pm'] += 1
- if day.dayofweek == 3:
- day_dict['thursday_am'] += 1
- day_dict['thursday_pm'] += 1
- if day.dayofweek == 4:
- day_dict['friday_am'] += 1
- day_dict['friday_pm'] += 1
-
- return day_dict
-
-
-def get_nb_half_days_by_period_per_month(date_from, date_to):
- day_list = pd.date_range(date_from, date_to).tolist()
- cal = France()
- holidays = cal.holidays(date_from.year)
- holidays_date = [h[0] for h in holidays]
- md_dict = {}
- for i in range(1,13):
- md_dict[i] = {
- "monday_am": 0,
- "monday_pm": 0,
- "tuesday_am": 0,
- "tuesday_pm": 0,
- "wednesday_am": 0,
- "wednesday_pm": 0,
- "thursday_am": 0,
- "thursday_pm": 0,
- "friday_am": 0,
- "friday_pm": 0,
- }
-
- # for each day of the period
- for day in day_list :
- if not day.date() in holidays_date:
- if day.dayofweek == 0:
- md_dict[day.month]['monday_am'] += 1
- md_dict[day.month]['monday_pm'] += 1
- if day.dayofweek == 1:
- md_dict[day.month]['tuesday_am'] += 1
- md_dict[day.month]['tuesday_pm'] += 1
- if day.dayofweek == 2:
- md_dict[day.month]['wednesday_am'] += 1
- md_dict[day.month]['wednesday_pm'] += 1
- if day.dayofweek == 3:
- md_dict[day.month]['thursday_am'] += 1
- md_dict[day.month]['thursday_pm'] += 1
- if day.dayofweek == 4:
- md_dict[day.month]['friday_am'] += 1
- md_dict[day.month]['friday_pm'] += 1
-
- return md_dict
-
-
-class TimesheetXLS(object):
-
- t_dict = OrderedDict()
- first_month_row = 5
- first_month_col = 3
- last_month_col = first_month_col + 13
- project_margin_row = 4
- project_first_row = 6
- project_first_col = 0
- percent_margin = 1
- percent_label = "Percentage of time worked on project"
- percent_label_row = 7
- percent_label_col = 0
- hours_margin = 2
- hours_label = "Productive hours worked on project"
- hours_label_row = 8
- hours_label_col = 0
- wk_margin = 3
- wk_label = "Workpackages to which the person has contributed"
- wk_label_row = 9
- wk_label_col = 0
- accounting_margin = 4
- accounting_label = "Date of accounting by person working on the action"
- accounting_label_col = 0
- validation_margin = 5
- validation_label_row = 0
- validation_label = "Date of validation by the superior"
- validation_label_col = 0
- title_col = 0
- title_row = 0
- beneficiary_col = 0
- beneficiary_row = 2
- name_person_col = 0
- name_person_row = 3
- type_personal_col = 9
- type_personal_row = 3
- person_signature_label = "Signature of person working on the action :"
- person_signature_col = 1
- person_signature_row_margin = 9
- director_signature_label = "Signature of R&D Department Director:"
- director_signature_col = 10
- director_signature_row_margin = 9
-
-
- def __init__(self, timesheets, year=''):
- self.timesheets = timesheets.order_by('activity', 'project', 'year', 'month')
- self.book = Workbook()
- self.year = year
- font_header = Font()
- font_header.bold = True
-
- font_title = Font()
- font_title.bold = True
-
- grey_pattern = Pattern()
- grey_pattern.pattern = Pattern.SOLID_PATTERN
- grey_pattern.pattern_fore_colour = Style.colour_map['gray25']
-
- self.header_style = XFStyle()
- self.header_style.pattern = grey_pattern
- self.header_style.font = font_header
-
- self.header_title = XFStyle()
- self.header_title.font = font_title
-
- self.date_style = XFStyle()
- self.date_style.num_format_str = 'M/D/YY'
-
- self.title_style = XFStyle()
- self.title_style.pattern = grey_pattern
- self.title_style.font = font_title
- self.title_style.alignment.horz = self.title_style.alignment.HORZ_CENTER
-
-
- def init_layout(self, sheet, year, activity):
- sheet.write_merge(0, self.title_row, self.title_col, self.title_col + 15 , "IRCAM - TIMESHEET - " + str(year), self.title_style)
- sheet.write(self.beneficiary_row, self.beneficiary_col, "Beneficiary :", self.header_title)
- sheet.write(self.beneficiary_row, self.beneficiary_col + 1, "IRCAM")
- sheet.write_merge(self.name_person_row, self.name_person_row, self.name_person_col, self.name_person_col + 3, "Name of the person working on the action :", self.header_title)
- sheet.write_merge(self.name_person_row, self.name_person_row, self.name_person_col + 4, self.name_person_col + 6, activity.person.title)
- sheet.write_merge(self.type_personal_row, self.type_personal_row, self.type_personal_col, self.type_personal_col + 1, "Type of personnel :", self.header_title)
- sheet.write_merge(self.type_personal_row, self.type_personal_row, self.type_personal_col + 2, self.type_personal_col + 6, activity.status.name)
- # sheet.col_default_width = 200
- row = sheet.row(self.first_month_row)
- for i in range(self.first_month_col + 1, self.last_month_col):
- row.write(i, calendar.month_name[i - self.first_month_col] +"-"+ str(year % 100), self.header_style)
- return sheet
-
-
- def format(self):
- self.t_dict = OrderedDict()
- for timesheet in self.timesheets:
- person_slug = timesheet.activity.person.slug
- # if new person
- if not person_slug in self.t_dict:
- self.t_dict[person_slug] = {}
- # caculate for each person leaved days in year
- date_from = datetime.date(timesheet.year, 1, 1)
- date_to = datetime.date(timesheet.year, 12, 31)
- nb_half_days = get_nb_half_days_by_period_per_month(date_from, date_to)
- leave_days = get_leave_days_per_month(date_from, date_to, timesheet.activity.person.external_id)
- worked_hours_by_month = {}
- # for each month
- for m_key, m_val in nb_half_days.items():
- # for each week day
- for nhd_k, nhd_v in m_val.items():
- if not m_key in worked_hours_by_month:
- worked_hours_by_month[m_key] = 0
- half_day_nb_hours = getattr(timesheet.activity, nhd_k)
- if not half_day_nb_hours is None :
- # is the person has been present during current m_key month ?
- if m_key in leave_days :
- if nhd_k in leave_days[m_key]:
- # is the person has been present during current half day nhd_d ?
- worked_hours_by_month[m_key] += (nb_half_days[m_key][nhd_k] - leave_days[m_key][nhd_k]) * half_day_nb_hours
- else :
- # if not, count theorical nb oh hours for this half day
- worked_hours_by_month[m_key] += nb_half_days[m_key][nhd_k] * half_day_nb_hours
- # if not, count theorical nb of hours for whole month
- else :
- worked_hours_by_month[m_key] += nb_half_days[m_key][nhd_k] * half_day_nb_hours
- else :
- # missing data...
- worked_hours_by_month[m_key] = 0
-
- # for each percent time worked on a project...
- project_slug = timesheet.project.slug
- if not project_slug in self.t_dict[person_slug]:
- self.t_dict[person_slug][project_slug] = []
- # ...calculate nb of worked hours proportionally
- # the property 'worked_hours' does not exists in the model, it just calculated on the fly
- timesheet.worked_hours = worked_hours_by_month[timesheet.month] * timesheet.percentage
- self.t_dict[person_slug][project_slug].append(timesheet)
- return self.t_dict
-
-
- def export(self):
- curr_project = ''
- percent_label_row_index = self.percent_label_row
- hours_label_row_index = self.hours_label_row
- # for each person
- for person_k, person_v in self.t_dict.items():
- # for each project
- project_row_last = (len(person_v) - 1) * self.project_margin_row + self.project_first_row
- for project_k, project_v in person_v.items():
- project_position = list(person_v.keys()).index(project_k)
- project_row_index = self.project_margin_row * project_position + self.project_first_row
- # for each timesheet
- for timesheet in project_v:
- try :
- sheet = self.book.add_sheet(person_k)
- sheet.default_width = 200
- sheet = self.init_layout(sheet, timesheet.year, timesheet.activity)
- except:
- pass
-
- # project name
- try :
- sheet.write(project_row_index, self.project_first_col, timesheet.project.title, self.header_style)
- except:
- pass
-
-
- # percent
- try:
- sheet.write(project_row_index + self.percent_margin, timesheet.month + self.first_month_col, timesheet.percentage)
- except :
- pass
-
- # nb worked hours
- try:
- sheet.write(project_row_index + self.hours_margin, timesheet.month + self.first_month_col, timesheet.worked_hours)
- except :
- pass
-
-
- # work packages
- work_packages = [str(wk.number) for wk in timesheet.work_packages.all()]
- work_packages = ",".join(work_packages)
- try :
- sheet.write(project_row_index + self.wk_margin, timesheet.month + self.first_month_col, work_packages)
- except:
- pass
-
- try :
- sheet.write_merge(project_row_index, project_row_index, self.project_first_col + 1, self.project_first_col + 1 + 2, timesheet.project.external_id, self.header_style)
- percent_row = project_row_index + self.percent_margin
- sheet.write_merge(percent_row, percent_row, self.percent_label_col, self.percent_label_col + 3, self.percent_label)
- hours_row = project_row_index + self.hours_margin
- sheet.write_merge(hours_row, hours_row, self.hours_label_col, self.hours_label_col + 3, self.hours_label)
- wk_row = project_row_index + self.wk_margin
- sheet.write_merge(wk_row, wk_row, self.wk_label_col, self.wk_label_col + 3, self.wk_label)
- except:
- pass
-
- try :
- # accounting date
- sheet.write(project_row_last + self.accounting_margin, timesheet.month + self.first_month_col, timesheet.accounting, self.date_style)
-
- # validation date
- sheet.write(project_row_last + self.validation_margin, timesheet.month + self.first_month_col, timesheet.validation, self.date_style)
- except:
- pass
- try :
- person_signature_row = project_row_last + self.person_signature_row_margin
- sheet.write_merge(person_signature_row, person_signature_row, self.person_signature_col, self.person_signature_col + 3, self.person_signature_label)
- director_signature_row = project_row_last + self.director_signature_row_margin
- sheet.write_merge(director_signature_row, director_signature_row, self.director_signature_col, self.director_signature_col + 2, self.director_signature_label)
- except:
- pass
-
- def write(self):
- self.format()
- self.export()
- response = HttpResponse(content_type="application/vnd.ms-excel")
- response['Content-Disposition'] = 'attachment; filename=timesheet_ircam'+self.year+'.xls'
- self.book.save(response)
- return response
-
-
-
-def set_timesheets_validation_date(timesheets):
- """ Admin action to set validation date for selected timesheets """
- for timesheet in timesheets :
- timesheet.validation = timezone.now()
- timesheet.save()
diff --git a/app/organization/network/validators.py b/app/organization/network/validators.py
deleted file mode 100644
index 45ae9118..00000000
--- a/app/organization/network/validators.py
+++ /dev/null
@@ -1,9 +0,0 @@
-from django.core.exceptions import ValidationError
-from django.utils.translation import ugettext_lazy as _
-
-def validate_positive(value):
- if value < 0:
- raise ValidationError(
- _('%(value)s must be positive'),
- params={'value': value},
- )
diff --git a/app/organization/network/views.py b/app/organization/network/views.py
deleted file mode 100644
index 10d5aaa5..00000000
--- a/app/organization/network/views.py
+++ /dev/null
@@ -1,225 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.shortcuts import render
-from django.views.generic.edit import CreateView
-from django.contrib.auth.mixins import LoginRequiredMixin
-from django.views.generic.base import TemplateView
-from django.views.generic import View
-from django.db.models.fields.related import ForeignKey
-from mezzanine.conf import settings
-from django.core.urlresolvers import reverse
-from dal import autocomplete
-from organization.network.models import *
-from organization.core.views import *
-from datetime import date
-from organization.network.forms import *
-from organization.network.utils import TimesheetXLS
-from collections import OrderedDict
-
-
-
-class PersonListView(ListView):
-
- model = Person
- template_name='team/person_list.html'
-
-
-class PersonDetailView(SlugMixin, DetailView):
-
- model = Person
- template_name='network/person_detail.html'
- context_object_name = 'person'
-
- def get_context_data(self, **kwargs):
- context = super(PersonDetailView, self).get_context_data(**kwargs)
- context["related"] = {}
- # Person events : this type is separated from the other because
- # this is not managed by list of person by person in inlines directly
- person_events = self.object.events.all()
- events = [item.event for item in person_events]
- context["related"]["event"] = events
- # All other related models
- person_list_block_inlines = self.object.person_list_block_inlines.all()
- context["related"]["other"] = []
- # for each person list to which the person belongs to...
- for person_list_block_inline in person_list_block_inlines:
- related_objects = person_list_block_inline.person_list_block._meta.get_all_related_objects()
- for related_object in related_objects:
- if hasattr(person_list_block_inline.person_list_block, related_object.name):
- # getting relating inlines like ArticlePersonListBlockInline, PageCustomPersonListBlockInline etc...
- related_inlines = getattr(person_list_block_inline.person_list_block, related_object.name).all()
- for related_inline in related_inlines:
- if not isinstance(related_inline, person_list_block_inline.__class__): #and not isinstance(person_list_block_inline.person_list_block.__class__):
- fields = related_inline._meta.get_fields()
- for field in fields:
- # check if it is a ForeignKey
- if isinstance(field, ForeignKey) :
- instance = getattr(related_inline, field.name)
- # get only article, custom page etc...
- if not isinstance(instance, person_list_block_inline.person_list_block.__class__) : #and not isinstance(person_list_block_inline.person_list_block.__class__):
- context["related"]["other"].append(instance)
-
- context["related"]["other"].sort(key=lambda x: x.created, reverse=True)
- context["person_email"] = self.object.email if self.object.email else self.object.slug.replace('-', '.')+" (at) ircam.fr"
- return context
-
-
-class PersonListBlockAutocompleteView(autocomplete.Select2QuerySetView):
-
- def get_queryset(self):
- # if not self.request.is_authenticated():
- # return PersonListBlock.objects.none()
-
- qs = PersonListBlock.objects.all()
-
- title = self.forwarded.get('title', None)
-
- if title:
- qs = qs.filter(title=title)
-
- if self.q:
- qs = qs.filter(title__istartswith=self.q)
-
- return qs
-
-
-class PersonListView(autocomplete.Select2QuerySetView):
-
- def get_queryset(self):
-
- qs = Person.objects.all()
-
- person_title = self.forwarded.get('person_title', None)
-
- if person_title:
- qs = qs.filter(person_title=person_title)
-
- if self.q:
- qs = qs.filter(person_title__istartswith=self.q)
-
- return qs
-
-class OrganizationListView(ListView):
-
- model = Organization
- context_object_name = 'organizations'
- template_name='network/organization_list.html'
-
- def get_queryset(self, **kwargs):
- return self.model.objects.filter(is_on_map=True)
-
- def get_context_data(self, **kwargs):
- context = super(OrganizationListView, self).get_context_data(**kwargs)
- context['organization_types'] = self.get_queryset().values_list('type__name', 'type__css_class').order_by('type__name').distinct('type__name')
- return context
-
-
-class OrganizationLinkedListView(autocomplete.Select2QuerySetView):
-
- def get_queryset(self):
- qs = OrganizationLinked.objects.all()
- orga_linked_title = self.forwarded.get('title', None)
- if orga_linked_title:
- qs = qs.filter(title=orga_linked_title)
- if self.q:
- qs = qs.filter(title__istartswith=self.q)
- return qs
-
-
-class OrganizationLinkedView(autocomplete.Select2QuerySetView):
-
- def get_queryset(self):
- qs = Organization.objects.all()
- orga_name= self.forwarded.get('name', None)
- if orga_name:
- qs = qs.filter(name=orga_name)
- if self.q:
- qs = qs.filter(name__istartswith=self.q)
- return qs
-
-
-
-class TimesheetAbstractView(LoginRequiredMixin):
- login_url = settings.LOGIN_URL
-
- class Meta:
- abstract = True
-
-
-class TimeSheetCreateView(TimesheetAbstractView, CreateView):
- model = PersonActivityTimeSheet
- template_name='network/person_activity_timesheet/person_activity_timesheet_create.html'
- context_object_name = 'timesheet'
- form_class = PersonActivityTimeSheetForm
-
- def get_success_url(self):
- print(" self.kwargs['slug']", self.kwargs['slug'])
- return reverse('organization-network-timesheet-list-view', kwargs={'slug': self.kwargs['slug']})
-
- def get_initial(self):
- initial = super(TimeSheetCreateView, self).get_initial()
- # get the more recent activity
- initial['activity'] = PersonActivity.objects.filter(person__slug=self.kwargs['slug']).first()
- initial['month'] = self.kwargs['month']
- initial['year'] = self.kwargs['year']
- return initial
-
- def get_context_data(self, **kwargs):
- context = super(TimeSheetCreateView, self).get_context_data(**kwargs)
- context.update(self.kwargs)
- return context
-
-
-class PersonActivityTimeSheetListView(TimesheetAbstractView, ListView):
- model = PersonActivityTimeSheet
- template_name='network/person_activity_timesheet/person_activity_timesheet_list.html'
- context_object_name = 'timesheets_by_year'
-
- def get_queryset(self):
- if 'slug' in self.kwargs:
- timesheets = PersonActivityTimeSheet.objects.filter(activity__person__slug__exact=self.kwargs['slug'])
- t_dict = OrderedDict()
- for timesheet in timesheets:
- year = timesheet.year
- if not year in t_dict:
- t_dict[year] = {}
- project_slug = timesheet.project.title
- # if new person
- if not project_slug in t_dict[year]:
- t_dict[year][project_slug] = []
- t_dict[year][project_slug].append(timesheet)
- return t_dict
-
- def get_context_data(self, **kwargs):
- context = super(PersonActivityTimeSheetListView, self).get_context_data(**kwargs)
- context['current_month'] = date.today().month
- context['current_year'] = date.today().year
- context.update(self.kwargs)
- return context
-
-
-class PersonActivityTimeSheetExportView(TimesheetAbstractView, View):
-
- def get(self, *args, **kwargs):
- timesheets = PersonActivityTimeSheet.objects.filter(activity__person__slug__exact=kwargs['slug'], year=kwargs['year'])
- xls = TimesheetXLS(timesheets)
- return xls.write()
diff --git a/app/organization/pages/__init__.py b/app/organization/pages/__init__.py
deleted file mode 100644
index 14e061ad..00000000
--- a/app/organization/pages/__init__.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-"""
-Provides abstract models and admin features used throughout the various
-Mezzanine apps.
-"""
-from __future__ import unicode_literals
-
-from mezzanine import __version__ # noqa
-
-
-default_app_config = 'organization.pages.apps.OrganizationPagesConfig'
diff --git a/app/organization/pages/admin.py b/app/organization/pages/admin.py
deleted file mode 100644
index 351a08ff..00000000
--- a/app/organization/pages/admin.py
+++ /dev/null
@@ -1,152 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.contrib import admin
-from modeltranslation.admin import TranslationTabularInline
-from mezzanine.utils.static import static_lazy as static
-from copy import deepcopy
-from mezzanine.core.admin import *
-from mezzanine.pages.admin import PageAdmin, LinkAdmin
-from mezzanine.pages.models import Link as MezzanineLink
-from organization.pages.models import *
-from organization.pages.models import (
- DynamicContentHomeSlider,
- DynamicContentHomeBody,
- Home,
-)
-from organization.pages.forms import *
-from organization.network.forms import *
-from organization.network.models import PageCustomPersonListBlockInline
-from organization.shop.models import *
-
-
-class PageBlockInline(StackedDynamicInlineAdmin):
-
- model = PageBlock
-
-
-class PageImageInline(TabularDynamicInlineAdmin):
-
- model = PageImage
-
-
-class PagePlaylistInline(TabularDynamicInlineAdmin):
-
- model = PagePlaylist
-
-
-class PageLinkInline(StackedDynamicInlineAdmin):
-
- model = PageLink
-
-
-class LinkImageInline(StackedDynamicInlineAdmin):
-
- model = LinkImage
-
-
-class LinkImageAdmin(LinkAdmin):
-
- inlines = [LinkImageInline,]
-
-
-class PersonListBlockAutocompleteInlineAdmin(TabularDynamicInlineAdmin):
-
- model = PageCustomPersonListBlockInline
- exclude = ("title", "description")
- # form = PageCustomPersonListForm
-
-
-class PageProductListInline(TabularDynamicInlineAdmin):
-
- model = PageProductList
-
-
-class DynamicContentPageInline(TabularDynamicInlineAdmin):
-
- model = DynamicContentPage
- form = DynamicContentPageForm
-
- class Media:
- js = (
- static("mezzanine/js/admin/dynamic_inline.js"),
- )
-
-
-class PageRelatedTitleAdmin(TranslationTabularInline):
-
- model = PageRelatedTitle
-
-
-class CustomPageAdmin(PageAdmin):
-
- inlines = [PageBlockInline,
- PageImageInline,
- PagePlaylistInline,
- PageLinkInline,
- PersonListBlockAutocompleteInlineAdmin,
- PageProductListInline,
- PageRelatedTitleAdmin,
- DynamicContentPageInline
- ]
-
-
-class DynamicContentHomeSliderInline(TabularDynamicInlineAdmin):
-
- model = DynamicContentHomeSlider
- form = DynamicContentHomeSliderForm
-
- class Media:
- js = (
- static("mezzanine/js/admin/dynamic_inline.js"),
- )
-
-
-class DynamicContentHomeBodyInline(TabularDynamicInlineAdmin):
-
- model = DynamicContentHomeBody
- form = DynamicContentHomeBodyForm
-
-
-class DynamicContentHomeMediaInline(TabularDynamicInlineAdmin):
-
- model = DynamicContentHomeMedia
- form = DynamicContentHomeMediaForm
-
-
-class HomeImageInline(TabularDynamicInlineAdmin):
-
- model = HomeImage
-
-
-class HomeAdminDisplayable(BaseTranslationModelAdmin):
-
- inlines = [ HomeImageInline,
- DynamicContentHomeSliderInline,
- DynamicContentHomeMediaInline,
- DynamicContentHomeBodyInline,
- ]
-
-
-admin.site.register(CustomPage, CustomPageAdmin)
-admin.site.register(Home, HomeAdminDisplayable)
-admin.site.unregister(MezzanineLink)
-admin.site.register(MezzanineLink, LinkImageAdmin)
diff --git a/app/organization/pages/apps.py b/app/organization/pages/apps.py
deleted file mode 100644
index 85b6ef5b..00000000
--- a/app/organization/pages/apps.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-
-from django.apps import AppConfig
-
-class OrganizationPagesConfig(AppConfig):
- name = 'organization.pages'
- label = 'organization-pages'
diff --git a/app/organization/pages/forms.py b/app/organization/pages/forms.py
deleted file mode 100644
index 6a776380..00000000
--- a/app/organization/pages/forms.py
+++ /dev/null
@@ -1,107 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from dal import autocomplete
-
-import dal_queryset_sequence
-import dal_select2_queryset_sequence
-
-from django import forms
-from django.forms.widgets import HiddenInput
-from django.forms import ModelForm
-from mezzanine.core.models import Orderable
-from organization.magazine.models import Article, Topic, Brief
-from organization.pages.models import CustomPage
-from organization.pages.models import *
-from organization.agenda.models import Event
-from organization.media.models import Playlist, Media
-from organization.network.models import Person
-
-
-class DynamicContentHomeSliderForm(autocomplete.FutureModelForm):
-
- content_object = dal_queryset_sequence.fields.QuerySetSequenceModelField(
- queryset=autocomplete.QuerySetSequence(
- Article.objects.all(),
- CustomPage.objects.all(),
- Event.objects.all(),
- Person.objects.published(),
- Media.objects.all()
- ),
- required=False,
- widget=dal_select2_queryset_sequence.widgets.QuerySetSequenceSelect2('dynamic-content-home-slider'),
- )
-
- class Meta:
- model = DynamicContentHomeSlider
- fields = ('content_object',)
-
-
-class DynamicContentHomeBodyForm(autocomplete.FutureModelForm):
-
- content_object = dal_queryset_sequence.fields.QuerySetSequenceModelField(
- queryset=autocomplete.QuerySetSequence(
- Article.objects.all(),
- CustomPage.objects.all(),
- Brief.objects.all(),
- Event.objects.all(),
- Media.objects.all()
- ),
- required=False,
- widget=dal_select2_queryset_sequence.widgets.QuerySetSequenceSelect2('dynamic-content-home-body'),
- )
-
- class Meta:
- model = DynamicContentHomeBody
- fields = ('content_object',)
-
-
-class DynamicContentHomeMediaForm(autocomplete.FutureModelForm):
-
- content_object = dal_queryset_sequence.fields.QuerySetSequenceModelField(
- queryset=autocomplete.QuerySetSequence(
- Playlist.objects.all(),
- ),
- required=False,
- widget=dal_select2_queryset_sequence.widgets.QuerySetSequenceSelect2('dynamic-content-home-media'),
- )
-
- class Meta:
- model = DynamicContentHomeMedia
- fields = ('content_object',)
-
-
-
-class DynamicContentPageForm(autocomplete.FutureModelForm):
-
- content_object = dal_queryset_sequence.fields.QuerySetSequenceModelField(
- queryset=autocomplete.QuerySetSequence(
- Article.objects.all(),
- CustomPage.objects.all(),
- Event.objects.all()
- ),
- required=False,
- widget=dal_select2_queryset_sequence.widgets.QuerySetSequenceSelect2('dynamic-content-page'),
- )
-
- class Meta:
- model = DynamicContentPage
- fields = ('content_object',)
diff --git a/app/organization/pages/migrations/0001_initial.py b/app/organization/pages/migrations/0001_initial.py
deleted file mode 100644
index 11fbd291..00000000
--- a/app/organization/pages/migrations/0001_initial.py
+++ /dev/null
@@ -1,173 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-01 15:33
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- initial = True
-
- dependencies = [
- ('sites', '0002_alter_domain_unique'),
- ('contenttypes', '0002_remove_content_type_name'),
- ('pages', '0004_auto_20160804_1547'),
- ('organization-media', '0001_initial'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='CustomPage',
- fields=[
- ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='pages.Page')),
- ('content', mezzanine.core.fields.RichTextField(verbose_name='Content')),
- ('content_fr', mezzanine.core.fields.RichTextField(null=True, verbose_name='Content')),
- ('content_en', mezzanine.core.fields.RichTextField(null=True, verbose_name='Content')),
- ('sub_title', models.TextField(blank=True, max_length=1024, verbose_name='sub title')),
- ('sub_title_fr', models.TextField(blank=True, max_length=1024, null=True, verbose_name='sub title')),
- ('sub_title_en', models.TextField(blank=True, max_length=1024, null=True, verbose_name='sub title')),
- ],
- options={
- 'verbose_name': 'custom page',
- 'ordering': ('_order',),
- },
- bases=('pages.page', models.Model),
- ),
- migrations.CreateModel(
- name='DynamicContentHomeBody',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('object_id', models.PositiveIntegerField(editable=False, null=True, verbose_name='related object')),
- ('content_type', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType', verbose_name='content type')),
- ],
- options={
- 'verbose_name': 'Dynamic Content Home Body',
- 'ordering': ('_order',),
- },
- ),
- migrations.CreateModel(
- name='DynamicContentHomeSlider',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('object_id', models.PositiveIntegerField(editable=False, null=True, verbose_name='related object')),
- ('content_type', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType', verbose_name='content type')),
- ],
- options={
- 'verbose_name': 'Dynamic Content Home Slider',
- 'ordering': ('_order',),
- },
- ),
- migrations.CreateModel(
- name='Home',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('keywords_string', models.CharField(blank=True, editable=False, max_length=500)),
- ('title', models.CharField(max_length=500, verbose_name='Title')),
- ('slug', models.CharField(blank=True, help_text='Leave blank to have the URL auto-generated from the title.', max_length=2000, null=True, verbose_name='URL')),
- ('_meta_title', models.CharField(blank=True, help_text='Optional title to be used in the HTML title tag. If left blank, the main title field will be used.', max_length=500, null=True, verbose_name='Title')),
- ('description', models.TextField(blank=True, verbose_name='Description')),
- ('gen_description', models.BooleanField(default=True, help_text='If checked, the description will be automatically generated from content. Uncheck if you want to manually set a custom description.', verbose_name='Generate description')),
- ('created', models.DateTimeField(editable=False, null=True)),
- ('updated', models.DateTimeField(editable=False, null=True)),
- ('status', models.IntegerField(choices=[(1, 'Draft'), (2, 'Published')], default=2, help_text='With Draft chosen, will only be shown for admin users on the site.', verbose_name='Status')),
- ('publish_date', models.DateTimeField(blank=True, db_index=True, help_text="With Published chosen, won't be shown until this time", null=True, verbose_name='Published from')),
- ('expiry_date', models.DateTimeField(blank=True, help_text="With Published chosen, won't be shown after this time", null=True, verbose_name='Expires on')),
- ('short_url', models.URLField(blank=True, null=True)),
- ('in_sitemap', models.BooleanField(default=True, verbose_name='Show in sitemap')),
- ('site', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to='sites.Site')),
- ],
- options={
- 'verbose_name': 'home',
- 'verbose_name_plural': 'homes',
- },
- ),
- migrations.CreateModel(
- name='PageAudio',
- fields=[
- ('audio_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-media.Audio')),
- ('page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='audios', to='pages.Page', verbose_name='page')),
- ],
- options={
- 'verbose_name': 'audio',
- 'verbose_name_plural': 'audios',
- },
- bases=('organization-media.audio',),
- ),
- migrations.CreateModel(
- name='PageBlock',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('content', mezzanine.core.fields.RichTextField(verbose_name='Content')),
- ('content_fr', mezzanine.core.fields.RichTextField(null=True, verbose_name='Content')),
- ('content_en', mezzanine.core.fields.RichTextField(null=True, verbose_name='Content')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('title_fr', models.CharField(max_length=1024, null=True, verbose_name='title')),
- ('title_en', models.CharField(max_length=1024, null=True, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('with_separator', models.BooleanField(default=False)),
- ('background_color', models.CharField(blank=True, choices=[('black', 'black'), ('yellow', 'yellow'), ('red', 'red')], max_length=32, verbose_name='background color')),
- ('page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='blocks', to='pages.Page', verbose_name='page')),
- ],
- options={
- 'verbose_name': 'page block',
- 'ordering': ('_order',),
- 'verbose_name_plural': 'blocks',
- },
- ),
- migrations.CreateModel(
- name='PageImage',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('description_fr', models.TextField(blank=True, null=True, verbose_name='description')),
- ('description_en', models.TextField(blank=True, null=True, verbose_name='description')),
- ('file', mezzanine.core.fields.FileField(max_length=1024, verbose_name='Image')),
- ('credits', models.CharField(blank=True, max_length=256, null=True, verbose_name='credits')),
- ('type', models.CharField(choices=[('logo', 'logo'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page slider')], max_length=64, verbose_name='type')),
- ('page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='images', to='pages.Page', verbose_name='page')),
- ],
- options={
- 'verbose_name': 'image',
- 'ordering': ('_order',),
- 'verbose_name_plural': 'images',
- },
- ),
- migrations.CreateModel(
- name='PageVideo',
- fields=[
- ('video_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-media.Video')),
- ('page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='videos', to='pages.Page', verbose_name='page')),
- ],
- options={
- 'verbose_name': 'video',
- 'verbose_name_plural': 'videos',
- },
- bases=('organization-media.video',),
- ),
- migrations.AddField(
- model_name='dynamiccontenthomeslider',
- name='home',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization-pages.Home', verbose_name='home'),
- ),
- migrations.AddField(
- model_name='dynamiccontenthomebody',
- name='home',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization-pages.Home', verbose_name='home'),
- ),
- migrations.AlterOrderWithRespectTo(
- name='pagevideo',
- order_with_respect_to='page',
- ),
- migrations.AlterOrderWithRespectTo(
- name='pageaudio',
- order_with_respect_to='page',
- ),
- ]
diff --git a/app/organization/pages/migrations/0002_auto_20160914_1838.py b/app/organization/pages/migrations/0002_auto_20160914_1838.py
deleted file mode 100644
index ac6be2ea..00000000
--- a/app/organization/pages/migrations/0002_auto_20160914_1838.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-14 16:38
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('pages', '0004_auto_20160804_1547'),
- ('organization-core', '0002_linktype_picto'),
- ('organization-pages', '0001_initial'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='PageLink',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('url', models.URLField(blank=True, max_length=512, verbose_name='URL')),
- ('link_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organization-core.LinkType', verbose_name='link type')),
- ('page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='links', to='pages.Page', verbose_name='page')),
- ],
- options={
- 'verbose_name_plural': 'links',
- 'verbose_name': 'link',
- },
- ),
- migrations.AlterOrderWithRespectTo(
- name='pagelink',
- order_with_respect_to='page',
- ),
- ]
diff --git a/app/organization/pages/migrations/0003_auto_20160923_1418.py b/app/organization/pages/migrations/0003_auto_20160923_1418.py
deleted file mode 100644
index 1f5cfd7c..00000000
--- a/app/organization/pages/migrations/0003_auto_20160923_1418.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-23 12:18
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('pages', '0005_auto_20160923_1219'),
- ('organization-pages', '0002_auto_20160914_1838'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='LinkImage',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('image', mezzanine.core.fields.FileField(max_length=1024, verbose_name='Image')),
- ('link', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='link_images', to='pages.Link', verbose_name='link')),
- ],
- options={
- 'verbose_name': 'link image',
- 'verbose_name_plural': 'link images',
- },
- ),
- migrations.AlterOrderWithRespectTo(
- name='linkimage',
- order_with_respect_to='link',
- ),
- ]
diff --git a/app/organization/pages/migrations/0004_auto_20160928_1858.py b/app/organization/pages/migrations/0004_auto_20160928_1858.py
deleted file mode 100644
index 916bf6f3..00000000
--- a/app/organization/pages/migrations/0004_auto_20160928_1858.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-28 16:58
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-pages', '0003_auto_20160923_1418'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='pageimage',
- name='type',
- field=models.CharField(choices=[('logo', 'logo'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type'),
- ),
- ]
diff --git a/app/organization/pages/migrations/0005_dynamiccontentpage.py b/app/organization/pages/migrations/0005_dynamiccontentpage.py
deleted file mode 100644
index bfafc945..00000000
--- a/app/organization/pages/migrations/0005_dynamiccontentpage.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-07 10:44
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('contenttypes', '0002_remove_content_type_name'),
- ('pages', '0005_auto_20160923_1219'),
- ('organization-pages', '0004_auto_20160928_1858'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='DynamicContentPage',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('object_id', models.PositiveIntegerField(editable=False, null=True, verbose_name='related object')),
- ('content_type', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType', verbose_name='content type')),
- ('page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='dynamic_content_pages', to='pages.Page', verbose_name='page')),
- ],
- options={
- 'ordering': ('_order',),
- 'verbose_name': 'Dynamic Content Page',
- },
- ),
- ]
diff --git a/app/organization/pages/migrations/0006_auto_20161007_1512.py b/app/organization/pages/migrations/0006_auto_20161007_1512.py
deleted file mode 100644
index 40349e0d..00000000
--- a/app/organization/pages/migrations/0006_auto_20161007_1512.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-07 13:12
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('contenttypes', '0002_remove_content_type_name'),
- ('organization-pages', '0005_dynamiccontentpage'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='DynamicContentHomeMedia',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('object_id', models.PositiveIntegerField(editable=False, null=True, verbose_name='related object')),
- ('content_type', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType', verbose_name='content type')),
- ('home', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization-pages.Home', verbose_name='home')),
- ],
- options={
- 'ordering': ('_order',),
- 'verbose_name': 'Media',
- },
- ),
- migrations.AlterModelOptions(
- name='dynamiccontenthomebody',
- options={'ordering': ('_order',), 'verbose_name': 'Body'},
- ),
- migrations.AlterModelOptions(
- name='dynamiccontenthomeslider',
- options={'ordering': ('_order',), 'verbose_name': 'Slider'},
- ),
- ]
diff --git a/app/organization/pages/migrations/0007_auto_20161007_1852.py b/app/organization/pages/migrations/0007_auto_20161007_1852.py
deleted file mode 100644
index 1c865a48..00000000
--- a/app/organization/pages/migrations/0007_auto_20161007_1852.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-07 16:52
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-pages', '0006_auto_20161007_1512'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='dynamiccontenthomemedia',
- name='home',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='dynamic_content_home_media', to='organization-pages.Home', verbose_name='home'),
- ),
- ]
diff --git a/app/organization/pages/migrations/0008_auto_20161013_1631.py b/app/organization/pages/migrations/0008_auto_20161013_1631.py
deleted file mode 100644
index 9734838c..00000000
--- a/app/organization/pages/migrations/0008_auto_20161013_1631.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-13 14:31
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0006_auto_20161013_1631'),
- ('pages', '0005_auto_20160923_1219'),
- ('organization-pages', '0007_auto_20161007_1852'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='PagePlaylist',
- fields=[
- ('playlist_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-media.Playlist')),
- ('page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='playlists', to='pages.Page', verbose_name='page')),
- ],
- options={
- 'verbose_name': 'playlist',
- 'verbose_name_plural': 'playlists',
- },
- bases=('organization-media.playlist',),
- ),
- migrations.DeleteModel(
- name='PageAudio',
- ),
- migrations.DeleteModel(
- name='PageVideo',
- ),
- migrations.AlterOrderWithRespectTo(
- name='pageplaylist',
- order_with_respect_to='page',
- ),
- ]
diff --git a/app/organization/pages/migrations/0009_auto_20161014_0002.py b/app/organization/pages/migrations/0009_auto_20161014_0002.py
deleted file mode 100644
index dc4942cd..00000000
--- a/app/organization/pages/migrations/0009_auto_20161014_0002.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-13 22:02
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0009_auto_20161013_2353'),
- ('organization-pages', '0008_auto_20161013_1631'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='pageplaylist',
- name='playlist_ptr',
- ),
- migrations.AddField(
- model_name='pageplaylist',
- name='playlistrelated_ptr',
- field=models.OneToOneField(auto_created=True, default=1, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-media.PlaylistRelated'),
- preserve_default=False,
- ),
- ]
diff --git a/app/organization/pages/migrations/0010_auto_20161021_1256.py b/app/organization/pages/migrations/0010_auto_20161021_1256.py
deleted file mode 100644
index 41b2e6cb..00000000
--- a/app/organization/pages/migrations/0010_auto_20161021_1256.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-21 10:56
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-pages', '0009_auto_20161014_0002'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='pageimage',
- name='title_en',
- field=models.CharField(max_length=1024, null=True, verbose_name='title'),
- ),
- migrations.AddField(
- model_name='pageimage',
- name='title_fr',
- field=models.CharField(max_length=1024, null=True, verbose_name='title'),
- ),
- ]
diff --git a/app/organization/pages/migrations/0011_pagelink_title.py b/app/organization/pages/migrations/0011_pagelink_title.py
deleted file mode 100644
index cb4ff9c5..00000000
--- a/app/organization/pages/migrations/0011_pagelink_title.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-21 11:19
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-pages', '0010_auto_20161021_1256'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='pagelink',
- name='title',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- ]
diff --git a/app/organization/pages/migrations/0012_auto_20161021_1449.py b/app/organization/pages/migrations/0012_auto_20161021_1449.py
deleted file mode 100644
index bcb2d6cf..00000000
--- a/app/organization/pages/migrations/0012_auto_20161021_1449.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-21 12:49
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-pages', '0011_pagelink_title'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='pageblock',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='pageblock',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- ]
diff --git a/app/organization/pages/migrations/0013_auto_20161026_1025.py b/app/organization/pages/migrations/0013_auto_20161026_1025.py
deleted file mode 100644
index ed0f2376..00000000
--- a/app/organization/pages/migrations/0013_auto_20161026_1025.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-26 08:25
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-pages', '0012_auto_20161021_1449'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='pagelink',
- name='title_en',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- migrations.AddField(
- model_name='pagelink',
- name='title_fr',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- ]
diff --git a/app/organization/pages/migrations/0014_auto_20161028_1516.py b/app/organization/pages/migrations/0014_auto_20161028_1516.py
deleted file mode 100644
index 8e9d0e2a..00000000
--- a/app/organization/pages/migrations/0014_auto_20161028_1516.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-28 13:16
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('pages', '0005_auto_20160923_1219'),
- ('organization-pages', '0013_auto_20161026_1025'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='PageRelatedTitle',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('title', models.CharField(blank=True, max_length=1024, null=True, verbose_name='title')),
- ('page', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='related_title', to='pages.Page', verbose_name='page')),
- ],
- options={
- 'verbose_name': 'related title',
- },
- ),
- migrations.AlterOrderWithRespectTo(
- name='pagerelatedtitle',
- order_with_respect_to='page',
- ),
- ]
diff --git a/app/organization/pages/migrations/0015_auto_20161028_1541.py b/app/organization/pages/migrations/0015_auto_20161028_1541.py
deleted file mode 100644
index 2ba95f15..00000000
--- a/app/organization/pages/migrations/0015_auto_20161028_1541.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-28 13:41
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-pages', '0014_auto_20161028_1516'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='pagerelatedtitle',
- name='title_en',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- migrations.AddField(
- model_name='pagerelatedtitle',
- name='title_fr',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- ]
diff --git a/app/organization/pages/migrations/0016_auto_20161205_1536.py b/app/organization/pages/migrations/0016_auto_20161205_1536.py
deleted file mode 100644
index f3d62327..00000000
--- a/app/organization/pages/migrations/0016_auto_20161205_1536.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2016-12-05 14:36
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-pages', '0015_auto_20161028_1541'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='pageimage',
- name='type',
- field=models.CharField(choices=[('logo', 'logo'), ('logo_white', 'logo white'), ('logo_black', 'logo black'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type'),
- ),
- ]
diff --git a/app/organization/pages/migrations/0017_pageblock_login_required.py b/app/organization/pages/migrations/0017_pageblock_login_required.py
deleted file mode 100644
index 5c2866d7..00000000
--- a/app/organization/pages/migrations/0017_pageblock_login_required.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-03 11:20
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-pages', '0016_auto_20161205_1536'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='pageblock',
- name='login_required',
- field=models.BooleanField(default=False, verbose_name='login required'),
- ),
- ]
diff --git a/app/organization/pages/migrations/0018_auto_20170105_1743.py b/app/organization/pages/migrations/0018_auto_20170105_1743.py
deleted file mode 100644
index 11a8bc05..00000000
--- a/app/organization/pages/migrations/0018_auto_20170105_1743.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-05 16:43
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-pages', '0017_pageblock_login_required'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='pageimage',
- name='type',
- field=models.CharField(choices=[('logo', 'logo'), ('logo_white', 'logo white'), ('logo_black', 'logo black'), ('logo_header', 'logo header'), ('logo_footer', 'logo footer'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type'),
- ),
- ]
diff --git a/app/organization/pages/migrations/0019_auto_20170214_1643.py b/app/organization/pages/migrations/0019_auto_20170214_1643.py
deleted file mode 100644
index 293b7776..00000000
--- a/app/organization/pages/migrations/0019_auto_20170214_1643.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-02-14 15:43
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-pages', '0018_auto_20170105_1743'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='pageblock',
- name='background_color',
- field=models.CharField(blank=True, choices=[('black', 'black'), ('yellow', 'yellow'), ('red', 'red'), ('white', 'white')], max_length=32, verbose_name='background color'),
- ),
- ]
diff --git a/app/organization/pages/migrations/0020_homeimage.py b/app/organization/pages/migrations/0020_homeimage.py
deleted file mode 100644
index 910adcfb..00000000
--- a/app/organization/pages/migrations/0020_homeimage.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-03-14 11:22
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-pages', '0019_auto_20170214_1643'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='HomeImage',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('file', mezzanine.core.fields.FileField(max_length=1024, verbose_name='Image')),
- ('credits', models.CharField(blank=True, max_length=256, null=True, verbose_name='credits')),
- ('type', models.CharField(choices=[('logo', 'logo'), ('logo_white', 'logo white'), ('logo_black', 'logo black'), ('logo_header', 'logo header'), ('logo_footer', 'logo footer'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type')),
- ('home', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='images', to='organization-pages.Home', verbose_name='home')),
- ],
- options={
- 'verbose_name': 'image',
- 'verbose_name_plural': 'images',
- 'ordering': ('_order',),
- },
- ),
- ]
diff --git a/app/organization/pages/migrations/__init__.py b/app/organization/pages/migrations/__init__.py
deleted file mode 100644
index e69de29b..00000000
diff --git a/app/organization/pages/models.py b/app/organization/pages/models.py
deleted file mode 100644
index a711de42..00000000
--- a/app/organization/pages/models.py
+++ /dev/null
@@ -1,151 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.db import models
-from django.utils.translation import ugettext_lazy as _
-from django.core.urlresolvers import reverse, reverse_lazy
-from mezzanine.core.models import Displayable, Slugged, Orderable
-from mezzanine.pages.models import Link as MezzanineLink
-from organization.core.models import *
-from organization.media.models import *
-from organization.core.managers import *
-
-
-class CustomPage(Page, SubTitled, RichText):
-
- objects = CustomSearchableManager()
-
- class Meta:
- verbose_name = 'custom page'
-
-
-class PageBlock(Block):
-
- page = models.ForeignKey(Page, verbose_name=_('page'), related_name='blocks', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _("block")
- verbose_name_plural = _("blocks")
- verbose_name = 'page block'
-
-
-class PageImage(Image):
-
- page = models.ForeignKey(Page, verbose_name=_('page'), related_name='images', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _("image")
- verbose_name_plural = _("images")
- order_with_respect_to = "page"
-
-
-class PagePlaylist(PlaylistRelated):
-
- page = models.ForeignKey(Page, verbose_name=_('page'), related_name='playlists', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _("playlist")
- verbose_name_plural = _("playlists")
- order_with_respect_to = "page"
-
-
-class PageLink(Link):
-
- page = models.ForeignKey(Page, verbose_name=_('page'), related_name='links', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _("link")
- verbose_name_plural = _("links")
- order_with_respect_to = "page"
-
-
-class PageRelatedTitle(RelatedTitle):
-
- page = models.OneToOneField(Page, verbose_name=_('page'), related_name='related_title', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _("related title")
- order_with_respect_to = "page"
-
-
-class DynamicContentPage(DynamicContent, Orderable):
-
- page = models.ForeignKey(Page, verbose_name=_('page'), related_name='dynamic_content_pages', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = 'Dynamic Content Page'
-
-
-class LinkImage(models.Model):
-
- link = models.ForeignKey(MezzanineLink, verbose_name=_('link'), related_name='link_images', blank=True, null=True, on_delete=models.SET_NULL)
- image = FileField(_("Image"), max_length=1024, format="Image", upload_to="images")
-
- class Meta:
- verbose_name = _("link image")
- verbose_name_plural = _("link images")
- order_with_respect_to = "link"
-
-
-class DynamicContentHomeSlider(DynamicContent, Orderable):
-
- home = models.ForeignKey("home", verbose_name=_('home'), blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = 'Slider'
-
-
-class DynamicContentHomeBody(DynamicContent, Orderable):
-
- home = models.ForeignKey("home", verbose_name=_('home'), blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _('Body')
-
-
-class DynamicContentHomeMedia(DynamicContent, Orderable):
-
- home = models.ForeignKey("home", verbose_name=_('home'), related_name='dynamic_content_home_media', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = 'Media'
-
-
-class HomeImage(Image):
-
- home = models.ForeignKey("home", verbose_name=_('home'), related_name='images', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _("image")
- verbose_name_plural = _("images")
- order_with_respect_to = "home"
-
-
-class Home(Displayable):
-
- class Meta:
- verbose_name = _('home')
- verbose_name_plural = _("homes")
-
- def get_absolute_url(self):
- return reverse("organization-home")
-
- verbose_name = _('Person List')
diff --git a/app/organization/pages/tests.py b/app/organization/pages/tests.py
deleted file mode 100644
index fa8859d7..00000000
--- a/app/organization/pages/tests.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.test import TestCase
-
-# Create your tests here.
diff --git a/app/organization/pages/translation.py b/app/organization/pages/translation.py
deleted file mode 100644
index a5b7d86c..00000000
--- a/app/organization/pages/translation.py
+++ /dev/null
@@ -1,103 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from modeltranslation.translator import translator, register, TranslationOptions
-from mezzanine.pages.models import Page, RichText
-from mezzanine.pages.translation import TranslatedRichText
-from organization.pages.models import *
-
-
-@register(Home)
-class HomeTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(DynamicContentHomeSlider)
-class DynamicContentHomeSliderTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(DynamicContentHomeBody)
-class DynamicContentHomeBodyTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(DynamicContentHomeMedia)
-class DynamicContentHomeMediaTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(CustomPage)
-class CustomPageTranslationOptions(TranslationOptions):
-
- fields = ('sub_title', 'content')
-
-
-@register(PageBlock)
-class PageBlockTranslationOptions(TranslationOptions):
-
- fields = ('title', 'description', 'content')
-
-
-@register(PageImage)
-class PageImageTranslationOptions(TranslationOptions):
-
- fields = ('title', 'description',)
-
-
-@register(PagePlaylist)
-class PagePlaylistTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(PageLink)
-class PageLinkTranslationOptions(TranslationOptions):
-
- fields = ('title',)
-
-
-@register(DynamicContentPage)
-class DynamicContentPageTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(LinkImage)
-class LinkImageTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(PageRelatedTitle)
-class PageRelatedTitleTranslationOptions(TranslationOptions):
-
- fields = ('title',)
-
-
-@register(HomeImage)
-class HomeImageTranslationOptions(TranslationOptions):
-
- fields = ()
diff --git a/app/organization/pages/urls.py b/app/organization/pages/urls.py
deleted file mode 100644
index d89a5dd7..00000000
--- a/app/organization/pages/urls.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-
-from django.conf.urls import patterns, include, url
-from django.conf.urls.i18n import i18n_patterns
-from django.contrib import admin
-from django.contrib.auth.decorators import permission_required
-from mezzanine.core.views import direct_to_template
-from mezzanine.conf import settings
-from organization.pages.views import *
-
-_slash = "/" if settings.APPEND_SLASH else ""
-
-urlpatterns = [
- url("^$", HomeView.as_view(), name="home"),
- url("^dynamic-content-home-slider/$", permission_required('home.can_edit')(DynamicContentHomeSliderView.as_view()), name='dynamic-content-home-slider'),
- url("^dynamic-content-home-body/$", permission_required('home.can_edit')(DynamicContentHomeBodyView.as_view()), name='dynamic-content-home-body'),
- url("^dynamic-content-home-media/$", permission_required('page.can_edit')(DynamicContentHomeMediaView.as_view()), name='dynamic-content-home-media'),
- url("^dynamic-content-page/$", permission_required('page.can_edit')(DynamicContentPageView.as_view()), name='dynamic-content-page'),
- url("^home/$", HomeView.as_view(), name='organization-home'),
- url("^newsletter/$", NewsletterView.as_view(), name='organization-newsletter'),
-]
diff --git a/app/organization/pages/views.py b/app/organization/pages/views.py
deleted file mode 100644
index 2ef7faec..00000000
--- a/app/organization/pages/views.py
+++ /dev/null
@@ -1,188 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.shortcuts import render
-from django.views.generic import DetailView, ListView, TemplateView
-from django.contrib.auth.decorators import login_required
-from django.utils.decorators import method_decorator
-from dal import autocomplete
-from dal_select2_queryset_sequence.views import Select2QuerySetSequenceView
-from django.core.urlresolvers import reverse, reverse_lazy
-from django.utils.translation import ugettext_lazy as _
-from mezzanine.conf import settings
-from organization.pages.models import CustomPage
-from organization.core.views import SlugMixin, autocomplete_result_formatting
-from organization.magazine.models import Article, Topic, Brief
-from organization.pages.models import Home
-from organization.agenda.models import Event
-from organization.media.models import Playlist, Media
-from organization.network.models import Person
-from django.shortcuts import redirect
-
-
-class HomeView(SlugMixin, DetailView):
-
- model = Home
- template_name = 'index.html'
- briefs = Brief.objects.all() # with .published, order by isn't working anymore
- context_object_name = 'home'
-
- def get_object(self, **kwargs):
- homes = self.model.objects.published()
- if homes:
- return homes.latest("publish_date")
- return None
-
- def get_context_data(self, **kwargs):
- context = super(HomeView, self).get_context_data(**kwargs)
- context['briefs'] = self.briefs
- return context
-
- def dispatch(self, request, *args, **kwargs):
- if not self.get_object():
- page = CustomPage.objects.first()
- if page:
- return redirect(reverse_lazy('page', kwargs={'slug': page.slug}))
- else:
- return super(HomeView, self).dispatch(request, *args, **kwargs)m
- else:
- return super(HomeView, self).dispatch(request, *args, **kwargs)
-
-
-class DynamicContentHomeSliderView(Select2QuerySetSequenceView):
-
- def get_queryset(self):
-
- articles = Article.objects.all()
- custompage = CustomPage.objects.all()
- events = Event.objects.all()
- persons = Person.objects.published()
- medias = Media.objects.all()
-
- if self.q:
- articles = articles.filter(title__icontains=self.q)
- custompage = custompage.filter(title__icontains=self.q)
- events = events.filter(title__icontains=self.q)
- persons = persons.filter(title__icontains=self.q)
- medias = medias.filter(title__icontains=self.q)
-
- qs = autocomplete.QuerySetSequence(articles, custompage, events, persons, medias)
-
- if self.q:
- # This would apply the filter on all the querysets
- qs = qs.filter(title__icontains=self.q)
-
- # This will limit each queryset so that they show an equal number
- # of results.
- qs = self.mixup_querysets(qs)
-
- return qs
-
- def get_results(self, context):
- results = autocomplete_result_formatting(self, context)
- return results
-
-
-class DynamicContentHomeBodyView(Select2QuerySetSequenceView):
-
- paginate_by = settings.DAL_MAX_RESULTS
-
- def get_queryset(self):
-
- articles = Article.objects.all()
- custompage = CustomPage.objects.all()
- events = Event.objects.all()
- briefs = Brief.objects.all()
- medias = Media.objects.all()
-
- if self.q:
- articles = articles.filter(title__icontains=self.q)
- custompage = custompage.filter(title__icontains=self.q)
- events = events.filter(title__icontains=self.q)
- briefs = briefs.filter(title__icontains=self.q)
- medias = medias.filter(title__icontains=self.q)
-
- qs = autocomplete.QuerySetSequence(articles, custompage, briefs, events, medias)
-
- if self.q:
- # This would apply the filter on all the querysets
- qs = qs.filter(title__icontains=self.q)
-
- # This will limit each queryset so that they show an equal number
- # of results.
- qs = self.mixup_querysets(qs)
-
- return qs
-
-
- def get_results(self, context):
- results = autocomplete_result_formatting(self, context)
- return results
-
-
-class DynamicContentHomeMediaView(Select2QuerySetSequenceView):
-
- def get_queryset(self):
-
- playlists = Playlist.objects.all()
-
- if self.q:
- playlists = playlists.filter(title__icontains=self.q)
-
- qs = autocomplete.QuerySetSequence(playlists,)
-
- if self.q:
- qs = qs.filter(title__icontains=self.q)
-
- qs = self.mixup_querysets(qs)
- return qs
-
-
-class NewsletterView(TemplateView):
-
- template_name = "pages/newsletter.html"
-
-
-class DynamicContentPageView(Select2QuerySetSequenceView):
-
- def get_queryset(self):
-
- articles = Article.objects.all()
- custompage = CustomPage.objects.all()
- events = Event.objects.all()
-
- if self.q:
- articles = articles.filter(title__icontains=self.q)
- custompage = custompage.filter(title__icontains=self.q)
- events = events.filter(title__icontains=self.q)
-
- qs = autocomplete.QuerySetSequence(articles, custompage, events)
-
- if self.q:
- qs = qs.filter(title__icontains=self.q)
-
- qs = self.mixup_querysets(qs)
-
- return qs
-
- def get_results(self, context):
- results = autocomplete_result_formatting(self, context)
- return results
diff --git a/app/organization/projects/__init__.py b/app/organization/projects/__init__.py
deleted file mode 100644
index 39bc60ca..00000000
--- a/app/organization/projects/__init__.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-"""
-Provides abstract models and admin features used throughout the various
-Mezzanine apps.
-"""
-from __future__ import unicode_literals
-
-from mezzanine import __version__ # noqa
-
-
-default_app_config = 'organization.projects.apps.ProjectsConfig'
diff --git a/app/organization/projects/admin.py b/app/organization/projects/admin.py
deleted file mode 100644
index 952007e4..00000000
--- a/app/organization/projects/admin.py
+++ /dev/null
@@ -1,221 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from copy import deepcopy
-
-from django.contrib import admin
-from django.utils.translation import ugettext_lazy as _
-
-from mezzanine.core.admin import *
-from mezzanine.pages.admin import PageAdmin
-from modeltranslation.admin import TranslationTabularInline
-from organization.projects.models import *
-from organization.pages.models import *
-from organization.media.models import Playlist
-from organization.pages.admin import PageImageInline
-from organization.projects.forms import DynamicContentProjectForm
-from organization.core.admin import null_filter
-
-
-class ProjectLinkInline(StackedDynamicInlineAdmin):
-
- model = ProjectLink
-
-
-class ProjectImageInline(TabularDynamicInlineAdmin):
-
- model = ProjectImage
-
-
-class ProjectBlockInline(StackedDynamicInlineAdmin):
-
- model = ProjectBlock
-
-
-class ProjectPlaylistInline(TabularDynamicInlineAdmin):
-
- model = ProjectPlaylist
-
-
-class ProjectFileInline(TabularDynamicInlineAdmin):
-
- model = ProjectFile
-
-
-class ProjectDemoInline(TabularDynamicInlineAdmin):
-
- model = ProjectDemo
-
-
-class ProjectWorkPackageInline(TabularDynamicInlineAdmin):
-
- model = ProjectWorkPackage
-
-
-class ProjectDemoAdmin(BaseTranslationModelAdmin):
-
- model = ProjectDemo
- filter_horizontal = ['authors']
-
-
-class ProjectBlogPageInline(StackedDynamicInlineAdmin):
-
- model = ProjectBlogPage
-
-
-class ProjectUserImageInline(StackedDynamicInlineAdmin):
-
- model = ProjectUserImage
-
-
-class ProjectContactInline(StackedDynamicInlineAdmin):
-
- model = ProjectContact
-
-
-class ProjectAdmin(admin.ModelAdmin):
-
- model = Project
-
-
-class ProjectPublicDataInline(StackedDynamicInlineAdmin):
-
- model = ProjectPublicData
-
-
-class ProjectPrivateDataInline(StackedDynamicInlineAdmin):
-
- model = ProjectPrivateData
-
-
-class ProjectRelatedTitleAdmin(TranslationTabularInline):
-
- model = ProjectRelatedTitle
-
-
-class DynamicContentProjectInline(TabularDynamicInlineAdmin):
-
- model = DynamicContentProject
- form = DynamicContentProjectForm
-
- class Media:
- js = (
- static("mezzanine/js/admin/dynamic_inline.js"),
- )
-
-
-class ProjectAdminDisplayable(DisplayableAdmin):
-
- fieldsets = deepcopy(ProjectAdmin.fieldsets)
- inlines = [ ProjectBlockInline,
- ProjectContactInline,
- ProjectUserImageInline,
- ProjectImageInline,
- ProjectPublicDataInline,
- ProjectPrivateDataInline,
- ProjectWorkPackageInline,
- ProjectPlaylistInline,
- ProjectLinkInline,
- ProjectFileInline,
- ProjectRelatedTitleAdmin,
- DynamicContentProjectInline,
- ProjectBlogPageInline,
- ]
- filter_horizontal = ['teams', 'organizations']
- list_filter = ['type', 'program', 'program_type', null_filter('external_id')]
- list_display = ['title', 'created', 'validation_status',
- 'date_from', 'date_to', 'status', 'external_id', 'admin_link']
-
-
-class ProjectTopicAdmin(BaseTranslationModelAdmin):
-
- model = ProjectTopic
-
-
-class ProjectProgramAdmin(BaseTranslationModelAdmin):
-
- model = ProjectProgram
-
-
-class ProjectProgramTypeAdmin(BaseTranslationModelAdmin):
-
- model = ProjectProgramType
-
-
-class ProjectTopicPageAdmin(PageAdmin):
-
- inlines = [PageImageInline, ]
-
-
-class ProjectWorkPackageAdmin(BaseTranslationModelAdmin):
-
- model = ProjectWorkPackage
- list_display = ['title', 'project', 'date_from', 'date_to', 'number', 'lead_organization' ]
- list_filter = ['project', 'date_from', 'date_to', 'lead_organization' ]
-
-
-class ProjectCallAdmin(admin.ModelAdmin):
-
- model = ProjectCall
-
-
-class ProjectCallBlockInline(StackedDynamicInlineAdmin):
-
- model = ProjectCallBlock
-
-
-class ProjectCallLinkInline(StackedDynamicInlineAdmin):
-
- model = ProjectCallLink
-
-
-class ProjectCallImageInline(StackedDynamicInlineAdmin):
-
- model = ProjectCallImage
-
-
-class ProjectCallFileInline(StackedDynamicInlineAdmin):
-
- model = ProjectCallFile
-
-
-class ProjectCallAdminDisplayable(DisplayableAdmin):
-
- fieldsets = deepcopy(ProjectCallAdmin.fieldsets)
- inlines = [ ProjectCallBlockInline,
- ProjectCallImageInline,
- ProjectCallLinkInline,
- ProjectCallFileInline,
- ]
- # list_filter = ['type', 'program', 'program_type', null_filter('external_id')]
- # list_display = ['title', 'date_from', 'date_to', 'status', 'admin_link']
-
-
-admin.site.register(Project, ProjectAdminDisplayable)
-admin.site.register(ProjectProgram, ProjectProgramAdmin)
-admin.site.register(ProjectProgramType, ProjectProgramTypeAdmin)
-admin.site.register(ProjectTopic, ProjectTopicAdmin)
-admin.site.register(ProjectTopicPage, ProjectTopicPageAdmin)
-admin.site.register(ProjectDemo, ProjectDemoAdmin)
-admin.site.register(Repository)
-admin.site.register(RepositorySystem)
-admin.site.register(ProjectWorkPackage, ProjectWorkPackageAdmin)
-admin.site.register(ProjectCall, ProjectCallAdminDisplayable)
diff --git a/app/organization/projects/apps.py b/app/organization/projects/apps.py
deleted file mode 100644
index ff03f2a6..00000000
--- a/app/organization/projects/apps.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-
-from django.apps import AppConfig
-
-
-class ProjectsConfig(AppConfig):
-
- name = 'organization.projects'
- label = 'organization-projects'
diff --git a/app/organization/projects/fixtures/organization-projects-repositorysystems.json b/app/organization/projects/fixtures/organization-projects-repositorysystems.json
deleted file mode 100644
index 523958ad..00000000
--- a/app/organization/projects/fixtures/organization-projects-repositorysystems.json
+++ /dev/null
@@ -1 +0,0 @@
-[{"model": "organization-projects.repositorysystem", "pk": 2, "fields": {"description": "", "name": "Git", "clone_command": "git clone", "pull_command": "git pull", "checkout_command": "git checkout", "branch_command": "git branch"}}, {"model": "organization-projects.repositorysystem", "pk": 3, "fields": {"description": "", "name": "Mercurial", "clone_command": "hg clone", "pull_command": "hg pull", "checkout_command": "hg up", "branch_command": "hg branch"}}, {"model": "organization-projects.repositorysystem", "pk": 4, "fields": {"description": "", "name": "SVN", "clone_command": "svn co", "pull_command": "svn update", "checkout_command": "svn co", "branch_command": "svn copy"}}, {"model": "organization-projects.repositorysystem", "pk": 5, "fields": {"description": "", "name": "Bazaar", "clone_command": "bzr co", "pull_command": "bzr update", "checkout_command": "bzr co", "branch_command": "bzr branch"}}]
\ No newline at end of file
diff --git a/app/organization/projects/forms.py b/app/organization/projects/forms.py
deleted file mode 100644
index 92ebe660..00000000
--- a/app/organization/projects/forms.py
+++ /dev/null
@@ -1,164 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from dal import autocomplete
-
-import dal_queryset_sequence
-import dal_select2_queryset_sequence
-
-from django import forms
-from django.forms.widgets import HiddenInput
-from django.forms import ModelForm
-from mezzanine.core.models import Orderable
-from organization.magazine.models import Article, Topic, Brief
-from organization.pages.models import CustomPage
-from organization.agenda.models import Event, DynamicContentEvent
-from organization.media.models import Playlist
-from organization.projects.models import *
-from extra_views import InlineFormSet
-
-
-class DynamicContentProjectForm(autocomplete.FutureModelForm):
-
- content_object = dal_queryset_sequence.fields.QuerySetSequenceModelField(
- queryset=autocomplete.QuerySetSequence(
- Article.objects.all(),
- CustomPage.objects.all(),
- Event.objects.all()
- ),
- required=False,
- widget=dal_select2_queryset_sequence.widgets.QuerySetSequenceSelect2('dynamic-content-project'),
- )
-
- class Meta:
- model = DynamicContentProject
- fields = ('content_object',)
-
-
-class ProjectForm(ModelForm):
-
- def __init__(self, *args, **kwargs):
- super(ProjectForm, self).__init__(*args, **kwargs)
- self.fields['title'].label = "Project name"
- self.fields['keywords'].help_text = "5 comma separated keywords"
- self.fields['date_from'].help_text = "Project start date (DD/MM/YYYY)"
- self.fields['date_to'].help_text = "Project end date (DD/MM/YYYY)"
-
- class Meta:
- model = Project
- fields = ('title', 'keywords', 'website', 'date_from', 'date_to')
-
-
-class ProjectPublicDataInline(InlineFormSet):
-
- max_num = 1
- model = ProjectPublicData
- prefix = "Public data"
- can_delete = False
- fields = '__all__'
-
-
-class ProjectPrivateDataInline(InlineFormSet):
-
- max_num = 1
- model = ProjectPrivateData
- prefix = "Private data"
- can_delete = False
- fields = '__all__'
-
-
-class ProjectUserImageInline(InlineFormSet):
-
- extra = 3
- model = ProjectUserImage
- prefix = 'Private images'
- text = "To be published only for ICT-Projects selected by the consortium"
- can_delete = False
- fields = ['file', 'credits']
-
-
-class ProjectLinkInline(InlineFormSet):
-
- extra = 3
- model = ProjectLink
- prefix = 'Public link'
- text = "To be published only for ICT-Projects selected by the consortium"
- can_delete = False
- fields = ['url', 'type']
-
-
-
-class ProjectContactForm(ModelForm):
-
- def __init__(self, *args, **kwargs):
- super(ProjectContactForm, self).__init__(*args, **kwargs)
- self.fields['organization_name'].help_text = "The organization related to the contact"
- self.fields['position'].help_text = "The position of the contact in the organization"
- for field in self._meta.fields:
- self.fields[field].required = True
-
- class Meta:
- model = ProjectContact
- fields = ('first_name', 'last_name', 'email', 'organization_name',
- 'position', 'address', 'telephone', 'address', 'postal_code',
- 'city', 'country')
-
-
-class ProjectContactInline(InlineFormSet):
-
- max_num = 1
- model = ProjectContact
- form_class = ProjectContactForm
- prefix = 'Private project contact'
- can_delete = False
-
-
-class OrganizationContactInline(InlineFormSet):
-
- max_num = 1
- model = OrganizationContact
- prefix = 'Contact'
- can_delete = False
- fields = ['person_title', 'first_name', 'last_name', 'email', 'telephone', 'role']
-
-
-class OrganizationUserImageInline(InlineFormSet):
-
- max_num = 4
- model = OrganizationUserImage
- prefix = 'Images'
- can_delete = False
- fields = ['file', 'credits']
-
-
-class OrganizationForm(ModelForm):
-
- class Meta:
- model = Organization
- fields = ['name', 'description', 'url', 'address',
- 'address', 'postal_code', 'city', 'country',]
-
-
-class ProjectResidencyForm(ModelForm):
-
- class Meta:
- model = ProjectResidency
- fields = '__all__'
diff --git a/app/organization/projects/migrations/0001_initial.py b/app/organization/projects/migrations/0001_initial.py
deleted file mode 100644
index 5ca80b44..00000000
--- a/app/organization/projects/migrations/0001_initial.py
+++ /dev/null
@@ -1,57 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-01 15:37
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- initial = True
-
- dependencies = [
- ('organization-network', '0001_initial'),
- ('sites', '0002_alter_domain_unique'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='Project',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('keywords_string', models.CharField(blank=True, editable=False, max_length=500)),
- ('title', models.CharField(max_length=500, verbose_name='Title')),
- ('title_fr', models.CharField(max_length=500, null=True, verbose_name='Title')),
- ('title_en', models.CharField(max_length=500, null=True, verbose_name='Title')),
- ('slug', models.CharField(blank=True, help_text='Leave blank to have the URL auto-generated from the title.', max_length=2000, null=True, verbose_name='URL')),
- ('_meta_title', models.CharField(blank=True, help_text='Optional title to be used in the HTML title tag. If left blank, the main title field will be used.', max_length=500, null=True, verbose_name='Title')),
- ('description', models.TextField(blank=True, verbose_name='Description')),
- ('description_fr', models.TextField(blank=True, null=True, verbose_name='Description')),
- ('description_en', models.TextField(blank=True, null=True, verbose_name='Description')),
- ('gen_description', models.BooleanField(default=True, help_text='If checked, the description will be automatically generated from content. Uncheck if you want to manually set a custom description.', verbose_name='Generate description')),
- ('created', models.DateTimeField(editable=False, null=True)),
- ('updated', models.DateTimeField(editable=False, null=True)),
- ('status', models.IntegerField(choices=[(1, 'Draft'), (2, 'Published')], default=2, help_text='With Draft chosen, will only be shown for admin users on the site.', verbose_name='Status')),
- ('publish_date', models.DateTimeField(blank=True, db_index=True, help_text="With Published chosen, won't be shown until this time", null=True, verbose_name='Published from')),
- ('expiry_date', models.DateTimeField(blank=True, help_text="With Published chosen, won't be shown after this time", null=True, verbose_name='Expires on')),
- ('short_url', models.URLField(blank=True, null=True)),
- ('in_sitemap', models.BooleanField(default=True, verbose_name='Show in sitemap')),
- ('content', mezzanine.core.fields.RichTextField(verbose_name='Content')),
- ('content_fr', mezzanine.core.fields.RichTextField(null=True, verbose_name='Content')),
- ('content_en', mezzanine.core.fields.RichTextField(null=True, verbose_name='Content')),
- ('date_begin', models.DateField(blank=True, null=True, verbose_name='begin date')),
- ('date_end', models.DateField(blank=True, null=True, verbose_name='end date')),
- ('website', models.URLField(blank=True, max_length=512, verbose_name='website')),
- ('lead_team', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='leader_projects', to='organization-network.Team', verbose_name='lead team')),
- ('organizations', models.ManyToManyField(blank=True, to='organization-network.Organization', verbose_name='organizations')),
- ('persons', models.ManyToManyField(blank=True, to='organization-network.Person', verbose_name='persons')),
- ('site', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to='sites.Site')),
- ('teams', models.ManyToManyField(blank=True, related_name='patner_projects', to='organization-network.Team', verbose_name='teams')),
- ],
- options={
- 'verbose_name': 'project',
- },
- ),
- ]
diff --git a/app/organization/projects/migrations/0002_auto_20160901_1806.py b/app/organization/projects/migrations/0002_auto_20160901_1806.py
deleted file mode 100644
index 678f0d5a..00000000
--- a/app/organization/projects/migrations/0002_auto_20160901_1806.py
+++ /dev/null
@@ -1,49 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-01 16:06
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0001_initial'),
- ('organization-projects', '0001_initial'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ProjectAudio',
- fields=[
- ('audio_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-media.Audio')),
- ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='audios', to='organization-projects.Project', verbose_name='project')),
- ],
- options={
- 'verbose_name': 'audio',
- 'verbose_name_plural': 'audios',
- },
- bases=('organization-media.audio',),
- ),
- migrations.CreateModel(
- name='ProjectVideo',
- fields=[
- ('video_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-media.Video')),
- ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='videos', to='organization-projects.Project', verbose_name='project')),
- ],
- options={
- 'verbose_name': 'video',
- 'verbose_name_plural': 'videos',
- },
- bases=('organization-media.video',),
- ),
- migrations.AlterOrderWithRespectTo(
- name='projectvideo',
- order_with_respect_to='project',
- ),
- migrations.AlterOrderWithRespectTo(
- name='projectaudio',
- order_with_respect_to='project',
- ),
- ]
diff --git a/app/organization/projects/migrations/0003_auto_20160901_1810.py b/app/organization/projects/migrations/0003_auto_20160901_1810.py
deleted file mode 100644
index 6eec1346..00000000
--- a/app/organization/projects/migrations/0003_auto_20160901_1810.py
+++ /dev/null
@@ -1,80 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-01 16:10
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-core', '0001_initial'),
- ('organization-projects', '0002_auto_20160901_1806'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ProjectBlock',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('content', mezzanine.core.fields.RichTextField(verbose_name='Content')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('with_separator', models.BooleanField(default=False)),
- ('background_color', models.CharField(blank=True, choices=[('black', 'black'), ('yellow', 'yellow'), ('red', 'red')], max_length=32, verbose_name='background color')),
- ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='blocks', to='organization-projects.Project', verbose_name='project')),
- ],
- options={
- 'ordering': ('_order',),
- },
- ),
- migrations.CreateModel(
- name='ProjectImage',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('file', mezzanine.core.fields.FileField(max_length=1024, verbose_name='Image')),
- ('credits', models.CharField(blank=True, max_length=256, null=True, verbose_name='credits')),
- ('type', models.CharField(choices=[('logo', 'logo'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page slider')], max_length=64, verbose_name='type')),
- ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='images', to='organization-projects.Project', verbose_name='project')),
- ],
- options={
- 'ordering': ('_order',),
- },
- ),
- migrations.CreateModel(
- name='ProjectLink',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('url', models.URLField(blank=True, max_length=512, verbose_name='URL')),
- ('link_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organization-core.LinkType', verbose_name='link type')),
- ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='links', to='organization-projects.Project', verbose_name='project')),
- ],
- options={
- 'verbose_name_plural': 'links',
- 'abstract': False,
- 'verbose_name': 'link',
- },
- ),
- migrations.AlterModelOptions(
- name='projectaudio',
- options={},
- ),
- migrations.AlterModelOptions(
- name='projectvideo',
- options={},
- ),
- migrations.AlterOrderWithRespectTo(
- name='projectaudio',
- order_with_respect_to=None,
- ),
- migrations.AlterOrderWithRespectTo(
- name='projectvideo',
- order_with_respect_to=None,
- ),
- ]
diff --git a/app/organization/projects/migrations/0004_auto_20160905_1853.py b/app/organization/projects/migrations/0004_auto_20160905_1853.py
deleted file mode 100644
index c8f8044f..00000000
--- a/app/organization/projects/migrations/0004_auto_20160905_1853.py
+++ /dev/null
@@ -1,59 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-05 16:53
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0003_auto_20160901_1810'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ProjectProgram',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ],
- options={
- 'verbose_name': 'project programme',
- },
- ),
- migrations.CreateModel(
- name='ProjectProgramType',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ],
- options={
- 'verbose_name': 'project programme type',
- },
- ),
- migrations.AddField(
- model_name='project',
- name='type',
- field=models.CharField(choices=[('research topic', 'research topic'), ('collaborative project', 'collaborative project')], default=1, max_length=128, verbose_name='type'),
- preserve_default=False,
- ),
- migrations.AlterField(
- model_name='project',
- name='teams',
- field=models.ManyToManyField(blank=True, related_name='partner_projects', to='organization-network.Team', verbose_name='teams'),
- ),
- migrations.AddField(
- model_name='project',
- name='program',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='projects', to='organization-projects.ProjectProgram', verbose_name='project program'),
- ),
- migrations.AddField(
- model_name='project',
- name='program_type',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='projects', to='organization-projects.ProjectProgramType', verbose_name='project program type'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0005_auto_20160907_1046.py b/app/organization/projects/migrations/0005_auto_20160907_1046.py
deleted file mode 100644
index ddf24357..00000000
--- a/app/organization/projects/migrations/0005_auto_20160907_1046.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-07 08:46
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0004_auto_20160905_1853'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='project',
- name='persons',
- ),
- migrations.AlterField(
- model_name='project',
- name='type',
- field=models.CharField(choices=[('internal project', 'internal project'), ('external project', 'external project')], max_length=128, verbose_name='type'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0005_auto_20160907_1138.py b/app/organization/projects/migrations/0005_auto_20160907_1138.py
deleted file mode 100644
index c505b402..00000000
--- a/app/organization/projects/migrations/0005_auto_20160907_1138.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-07 09:38
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0004_auto_20160905_1853'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='project',
- name='type',
- field=models.CharField(choices=[('internal project', 'internal project'), ('external project', 'external project')], max_length=128, verbose_name='type'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0006_merge.py b/app/organization/projects/migrations/0006_merge.py
deleted file mode 100644
index 134db2dc..00000000
--- a/app/organization/projects/migrations/0006_merge.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-07 14:02
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0005_auto_20160907_1046'),
- ('organization-projects', '0005_auto_20160907_1138'),
- ]
-
- operations = [
- ]
diff --git a/app/organization/projects/migrations/0007_auto_20160907_1718.py b/app/organization/projects/migrations/0007_auto_20160907_1718.py
deleted file mode 100644
index aba2a019..00000000
--- a/app/organization/projects/migrations/0007_auto_20160907_1718.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-07 15:18
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0006_merge'),
- ]
-
- operations = [
- migrations.AlterModelOptions(
- name='projectprogram',
- options={'verbose_name': 'program'},
- ),
- migrations.AlterModelOptions(
- name='projectprogramtype',
- options={'verbose_name': 'program type'},
- ),
- ]
diff --git a/app/organization/projects/migrations/0008_auto_20160916_1835.py b/app/organization/projects/migrations/0008_auto_20160916_1835.py
deleted file mode 100644
index 20c285fa..00000000
--- a/app/organization/projects/migrations/0008_auto_20160916_1835.py
+++ /dev/null
@@ -1,48 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-16 16:35
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0007_auto_20160907_1718'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ProjectSubTopic',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ],
- options={
- 'verbose_name': 'project sub topic',
- },
- ),
- migrations.CreateModel(
- name='ProjectTopic',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ],
- options={
- 'verbose_name': 'project topic',
- },
- ),
- migrations.AddField(
- model_name='project',
- name='sub_topic',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='projects', to='organization-projects.ProjectSubTopic', verbose_name='sub topic'),
- ),
- migrations.AddField(
- model_name='project',
- name='topic',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='projects', to='organization-projects.ProjectTopic', verbose_name='topic'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0009_auto_20160921_1908.py b/app/organization/projects/migrations/0009_auto_20160921_1908.py
deleted file mode 100644
index 6437e017..00000000
--- a/app/organization/projects/migrations/0009_auto_20160921_1908.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-21 17:08
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0008_auto_20160916_1835'),
- ]
-
- operations = [
- migrations.RenameField(
- model_name='project',
- old_name='date_begin',
- new_name='date_from',
- ),
- migrations.RenameField(
- model_name='project',
- old_name='date_end',
- new_name='date_to',
- ),
- ]
diff --git a/app/organization/projects/migrations/0010_auto_20160921_1934.py b/app/organization/projects/migrations/0010_auto_20160921_1934.py
deleted file mode 100644
index 40469879..00000000
--- a/app/organization/projects/migrations/0010_auto_20160921_1934.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-21 17:34
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0009_auto_20160921_1908'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='project',
- name='sub_topic',
- ),
- migrations.AddField(
- model_name='projecttopic',
- name='parent',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='topics', to='organization-projects.ProjectTopic', verbose_name='parent topic'),
- ),
- migrations.DeleteModel(
- name='ProjectSubTopic',
- ),
- ]
diff --git a/app/organization/projects/migrations/0011_auto_20160922_1438.py b/app/organization/projects/migrations/0011_auto_20160922_1438.py
deleted file mode 100644
index e7e3c676..00000000
--- a/app/organization/projects/migrations/0011_auto_20160922_1438.py
+++ /dev/null
@@ -1,91 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-22 12:38
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0010_auto_20160921_1934'),
- ]
-
- operations = [
- migrations.AlterModelOptions(
- name='project',
- options={'ordering': ['title'], 'verbose_name': 'project'},
- ),
- migrations.AlterModelOptions(
- name='projectprogram',
- options={'ordering': ['name'], 'verbose_name': 'program'},
- ),
- migrations.AlterModelOptions(
- name='projectprogramtype',
- options={'ordering': ['name'], 'verbose_name': 'program type'},
- ),
- migrations.AlterModelOptions(
- name='projecttopic',
- options={'ordering': ['name'], 'verbose_name': 'project topic'},
- ),
- migrations.AddField(
- model_name='projectprogram',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='projectprogram',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='projectprogram',
- name='name_en',
- field=models.CharField(max_length=512, null=True, verbose_name='name'),
- ),
- migrations.AddField(
- model_name='projectprogram',
- name='name_fr',
- field=models.CharField(max_length=512, null=True, verbose_name='name'),
- ),
- migrations.AddField(
- model_name='projectprogramtype',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='projectprogramtype',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='projectprogramtype',
- name='name_en',
- field=models.CharField(max_length=512, null=True, verbose_name='name'),
- ),
- migrations.AddField(
- model_name='projectprogramtype',
- name='name_fr',
- field=models.CharField(max_length=512, null=True, verbose_name='name'),
- ),
- migrations.AddField(
- model_name='projecttopic',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='projecttopic',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='projecttopic',
- name='name_en',
- field=models.CharField(max_length=512, null=True, verbose_name='name'),
- ),
- migrations.AddField(
- model_name='projecttopic',
- name='name_fr',
- field=models.CharField(max_length=512, null=True, verbose_name='name'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0012_projecttopicpage.py b/app/organization/projects/migrations/0012_projecttopicpage.py
deleted file mode 100644
index 7cf34fd7..00000000
--- a/app/organization/projects/migrations/0012_projecttopicpage.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-22 14:11
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('pages', '0004_auto_20160804_1547'),
- ('organization-projects', '0011_auto_20160922_1438'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ProjectTopicPage',
- fields=[
- ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='pages.Page')),
- ('sub_title', models.TextField(blank=True, max_length=1024, verbose_name='sub title')),
- ('project_topic', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='pages', to='organization-projects.ProjectTopic', verbose_name='project topic')),
- ],
- options={
- 'ordering': ('_order',),
- 'verbose_name': 'team page',
- },
- bases=('pages.page', models.Model),
- ),
- ]
diff --git a/app/organization/projects/migrations/0013_auto_20160922_1633.py b/app/organization/projects/migrations/0013_auto_20160922_1633.py
deleted file mode 100644
index 2f93d747..00000000
--- a/app/organization/projects/migrations/0013_auto_20160922_1633.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-22 14:33
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0012_projecttopicpage'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='projecttopicpage',
- name='sub_title_en',
- field=models.TextField(blank=True, max_length=1024, null=True, verbose_name='sub title'),
- ),
- migrations.AddField(
- model_name='projecttopicpage',
- name='sub_title_fr',
- field=models.TextField(blank=True, max_length=1024, null=True, verbose_name='sub title'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0014_auto_20160922_1642.py b/app/organization/projects/migrations/0014_auto_20160922_1642.py
deleted file mode 100644
index 8129b6fc..00000000
--- a/app/organization/projects/migrations/0014_auto_20160922_1642.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-22 14:42
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0013_auto_20160922_1633'),
- ]
-
- operations = [
- migrations.AlterModelOptions(
- name='projecttopicpage',
- options={'ordering': ('_order',), 'verbose_name': 'project topic page'},
- ),
- ]
diff --git a/app/organization/projects/migrations/0015_project_lead_organization.py b/app/organization/projects/migrations/0015_project_lead_organization.py
deleted file mode 100644
index 148a1fde..00000000
--- a/app/organization/projects/migrations/0015_project_lead_organization.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-23 15:59
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0023_auto_20160921_2043'),
- ('organization-projects', '0014_auto_20160922_1642'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='project',
- name='lead_organization',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='leader_projects', to='organization-network.Organization', verbose_name='lead organization'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0016_projectfile.py b/app/organization/projects/migrations/0016_projectfile.py
deleted file mode 100644
index 6300e364..00000000
--- a/app/organization/projects/migrations/0016_projectfile.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-28 13:02
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0015_project_lead_organization'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ProjectFile',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('file', mezzanine.core.fields.FileField(max_length=1024, verbose_name='document')),
- ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='files', to='organization-projects.Project', verbose_name='project')),
- ],
- options={
- 'ordering': ('_order',),
- },
- ),
- ]
diff --git a/app/organization/projects/migrations/0017_auto_20160928_1858.py b/app/organization/projects/migrations/0017_auto_20160928_1858.py
deleted file mode 100644
index 0fcf231a..00000000
--- a/app/organization/projects/migrations/0017_auto_20160928_1858.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-28 16:58
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0016_projectfile'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='projectimage',
- name='type',
- field=models.CharField(choices=[('logo', 'logo'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0018_auto_20161005_1424.py b/app/organization/projects/migrations/0018_auto_20161005_1424.py
deleted file mode 100644
index 6b54ffb8..00000000
--- a/app/organization/projects/migrations/0018_auto_20161005_1424.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-05 12:24
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0017_auto_20160928_1858'),
- ]
-
- operations = [
- migrations.AlterModelOptions(
- name='project',
- options={'ordering': ['-date_from', '-date_to'], 'verbose_name': 'project'},
- ),
- ]
diff --git a/app/organization/projects/migrations/0019_auto_20161007_1045.py b/app/organization/projects/migrations/0019_auto_20161007_1045.py
deleted file mode 100644
index 75035fdf..00000000
--- a/app/organization/projects/migrations/0019_auto_20161007_1045.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-07 08:45
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-def update_project_type(apps, schema_editor):
- Project = apps.get_model("organization-projects", "Project")
- for project in Project.objects.all():
- if project.type == 'external project':
- project.type = 'external'
- project.save()
- if project.type == 'internal project':
- project.type = 'internal'
- project.save()
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0018_auto_20161005_1424'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='project',
- name='type',
- field=models.CharField(choices=[('internal', 'internal'), ('external', 'external')], max_length=128, verbose_name='type'),
- ),
- migrations.RunPython(update_project_type),
- ]
diff --git a/app/organization/projects/migrations/0020_auto_20161013_1631.py b/app/organization/projects/migrations/0020_auto_20161013_1631.py
deleted file mode 100644
index 3c386819..00000000
--- a/app/organization/projects/migrations/0020_auto_20161013_1631.py
+++ /dev/null
@@ -1,50 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-13 14:31
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0006_auto_20161013_1631'),
- ('organization-projects', '0019_auto_20161007_1045'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ProjectPlaylist',
- fields=[
- ('playlist_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-media.Playlist')),
- ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='playlists', to='organization-projects.Project', verbose_name='project')),
- ],
- options={
- 'abstract': False,
- },
- bases=('organization-media.playlist',),
- ),
- migrations.RemoveField(
- model_name='projectaudio',
- name='audio_ptr',
- ),
- migrations.RemoveField(
- model_name='projectaudio',
- name='project',
- ),
- migrations.RemoveField(
- model_name='projectvideo',
- name='project',
- ),
- migrations.RemoveField(
- model_name='projectvideo',
- name='video_ptr',
- ),
- migrations.DeleteModel(
- name='ProjectAudio',
- ),
- migrations.DeleteModel(
- name='ProjectVideo',
- ),
- ]
diff --git a/app/organization/projects/migrations/0021_auto_20161014_0002.py b/app/organization/projects/migrations/0021_auto_20161014_0002.py
deleted file mode 100644
index a0d8cbee..00000000
--- a/app/organization/projects/migrations/0021_auto_20161014_0002.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-13 22:02
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-media', '0009_auto_20161013_2353'),
- ('organization-projects', '0020_auto_20161013_1631'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='projectplaylist',
- name='playlist_ptr',
- ),
- migrations.AddField(
- model_name='projectplaylist',
- name='playlistrelated_ptr',
- field=models.OneToOneField(auto_created=True, default=1, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-media.PlaylistRelated'),
- preserve_default=False,
- ),
- ]
diff --git a/app/organization/projects/migrations/0022_projectlink_title.py b/app/organization/projects/migrations/0022_projectlink_title.py
deleted file mode 100644
index 430feb0f..00000000
--- a/app/organization/projects/migrations/0022_projectlink_title.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-21 11:19
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0021_auto_20161014_0002'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='projectlink',
- name='title',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0023_auto_20161026_1025.py b/app/organization/projects/migrations/0023_auto_20161026_1025.py
deleted file mode 100644
index c56424a7..00000000
--- a/app/organization/projects/migrations/0023_auto_20161026_1025.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-26 08:25
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0022_projectlink_title'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='projectlink',
- name='title_en',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- migrations.AddField(
- model_name='projectlink',
- name='title_fr',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0024_auto_20161103_1521.py b/app/organization/projects/migrations/0024_auto_20161103_1521.py
deleted file mode 100644
index 8486ef11..00000000
--- a/app/organization/projects/migrations/0024_auto_20161103_1521.py
+++ /dev/null
@@ -1,119 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-03 14:21
-from __future__ import unicode_literals
-
-from django.conf import settings
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- migrations.swappable_dependency(settings.AUTH_USER_MODEL),
- ('sites', '0002_alter_domain_unique'),
- ('organization-projects', '0023_auto_20161026_1025'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ProjectDemo',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('keywords_string', models.CharField(blank=True, editable=False, max_length=500)),
- ('title', models.CharField(max_length=500, verbose_name='Title')),
- ('slug', models.CharField(blank=True, help_text='Leave blank to have the URL auto-generated from the title.', max_length=2000, null=True, verbose_name='URL')),
- ('_meta_title', models.CharField(blank=True, help_text='Optional title to be used in the HTML title tag. If left blank, the main title field will be used.', max_length=500, null=True, verbose_name='Title')),
- ('description', models.TextField(blank=True, verbose_name='Description')),
- ('gen_description', models.BooleanField(default=True, help_text='If checked, the description will be automatically generated from content. Uncheck if you want to manually set a custom description.', verbose_name='Generate description')),
- ('created', models.DateTimeField(editable=False, null=True)),
- ('updated', models.DateTimeField(editable=False, null=True)),
- ('status', models.IntegerField(choices=[(1, 'Draft'), (2, 'Published')], default=2, help_text='With Draft chosen, will only be shown for admin users on the site.', verbose_name='Status')),
- ('publish_date', models.DateTimeField(blank=True, db_index=True, help_text="With Published chosen, won't be shown until this time", null=True, verbose_name='Published from')),
- ('expiry_date', models.DateTimeField(blank=True, help_text="With Published chosen, won't be shown after this time", null=True, verbose_name='Expires on')),
- ('short_url', models.URLField(blank=True, null=True)),
- ('in_sitemap', models.BooleanField(default=True, verbose_name='Show in sitemap')),
- ('content', mezzanine.core.fields.RichTextField(verbose_name='Content')),
- ('directory', models.CharField(blank=True, max_length=256, null=True, verbose_name='directory')),
- ('build_commands', models.TextField(blank=True, verbose_name='build commands')),
- ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='demos', to=settings.AUTH_USER_MODEL, verbose_name='author')),
- ],
- options={
- 'verbose_name_plural': 'project demos',
- 'verbose_name': 'project demo',
- },
- ),
- migrations.CreateModel(
- name='Repository',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('url', models.URLField(blank=True, max_length=512, verbose_name='URL')),
- ('access', models.CharField(choices=[('public', 'public'), ('shared', 'shared'), ('private', 'private')], default='private', max_length=64, verbose_name='access')),
- ('branch', models.CharField(default='master', max_length=32, verbose_name='branch')),
- ],
- options={
- 'verbose_name_plural': 'repositories',
- 'verbose_name': 'repository',
- },
- ),
- migrations.CreateModel(
- name='RepositorySystem',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('type', models.CharField(max_length=32, verbose_name='type')),
- ('clone_command', models.CharField(max_length=256, verbose_name='clone command')),
- ('pull_command', models.CharField(max_length=256, verbose_name='pull command')),
- ('checkout_command', models.CharField(max_length=256, verbose_name='checkout command')),
- ('branch_command', models.CharField(max_length=256, verbose_name='branch command')),
- ],
- options={
- 'verbose_name_plural': 'repository systems',
- 'verbose_name': 'repository system',
- },
- ),
- migrations.AlterModelOptions(
- name='project',
- options={'ordering': ['-date_from', '-date_to'], 'verbose_name': 'project', 'verbose_name_plural': 'projects'},
- ),
- migrations.AlterModelOptions(
- name='projectprogram',
- options={'ordering': ['name'], 'verbose_name': 'program', 'verbose_name_plural': 'programs'},
- ),
- migrations.AlterModelOptions(
- name='projectprogramtype',
- options={'ordering': ['name'], 'verbose_name': 'program type', 'verbose_name_plural': 'program types'},
- ),
- migrations.AlterModelOptions(
- name='projecttopic',
- options={'ordering': ['name'], 'verbose_name': 'project topic', 'verbose_name_plural': 'project topics'},
- ),
- migrations.AlterModelOptions(
- name='projecttopicpage',
- options={'ordering': ('_order',), 'verbose_name': 'project topic page', 'verbose_name_plural': 'project topic pages'},
- ),
- migrations.AddField(
- model_name='repository',
- name='system',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='repositories', to='organization-projects.RepositorySystem', verbose_name='system'),
- ),
- migrations.AddField(
- model_name='projectdemo',
- name='project',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='demos', to='organization-projects.Project', verbose_name='project'),
- ),
- migrations.AddField(
- model_name='projectdemo',
- name='repository',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='demos', to='organization-projects.Repository', verbose_name='repository'),
- ),
- migrations.AddField(
- model_name='projectdemo',
- name='site',
- field=models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to='sites.Site'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0025_auto_20161103_1825.py b/app/organization/projects/migrations/0025_auto_20161103_1825.py
deleted file mode 100644
index b312e9b4..00000000
--- a/app/organization/projects/migrations/0025_auto_20161103_1825.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-03 17:25
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0046_auto_20161026_1025'),
- ('organization-projects', '0024_auto_20161103_1521'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='projectdemo',
- name='author',
- ),
- migrations.RemoveField(
- model_name='projectdemo',
- name='directory',
- ),
- migrations.RemoveField(
- model_name='repositorysystem',
- name='type',
- ),
- migrations.AddField(
- model_name='projectdemo',
- name='authors',
- field=models.ManyToManyField(blank=True, related_name='demos', to='organization-network.Person', verbose_name='authors'),
- ),
- migrations.AddField(
- model_name='projectdemo',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='Description'),
- ),
- migrations.AddField(
- model_name='projectdemo',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='Description'),
- ),
- migrations.AddField(
- model_name='projectdemo',
- name='title_en',
- field=models.CharField(max_length=500, null=True, verbose_name='Title'),
- ),
- migrations.AddField(
- model_name='projectdemo',
- name='title_fr',
- field=models.CharField(max_length=500, null=True, verbose_name='Title'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0026_dynamiccontentproject.py b/app/organization/projects/migrations/0026_dynamiccontentproject.py
deleted file mode 100644
index e18669bb..00000000
--- a/app/organization/projects/migrations/0026_dynamiccontentproject.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-04 17:33
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('contenttypes', '0002_remove_content_type_name'),
- ('organization-projects', '0025_auto_20161103_1825'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='DynamicContentProject',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('object_id', models.PositiveIntegerField(editable=False, null=True, verbose_name='related object')),
- ('content_type', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType', verbose_name='content type')),
- ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='dynamic_content_project', to='organization-projects.Project', verbose_name='project')),
- ],
- options={
- 'verbose_name': 'Dynamic Content Project',
- 'ordering': ('_order',),
- },
- ),
- ]
diff --git a/app/organization/projects/migrations/0027_auto_20161104_1849.py b/app/organization/projects/migrations/0027_auto_20161104_1849.py
deleted file mode 100644
index efbe8b65..00000000
--- a/app/organization/projects/migrations/0027_auto_20161104_1849.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-04 17:49
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0026_dynamiccontentproject'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ProjectRelatedTitle',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('title', models.CharField(blank=True, max_length=1024, null=True, verbose_name='title')),
- ('project', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='related_title', to='organization-projects.Project', verbose_name='project')),
- ],
- options={
- 'verbose_name': 'related title',
- },
- ),
- migrations.AlterOrderWithRespectTo(
- name='projectrelatedtitle',
- order_with_respect_to='project',
- ),
- ]
diff --git a/app/organization/projects/migrations/0028_auto_20161104_1855.py b/app/organization/projects/migrations/0028_auto_20161104_1855.py
deleted file mode 100644
index 30d821cb..00000000
--- a/app/organization/projects/migrations/0028_auto_20161104_1855.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-04 17:55
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0027_auto_20161104_1849'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='projectrelatedtitle',
- name='title_en',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- migrations.AddField(
- model_name='projectrelatedtitle',
- name='title_fr',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0029_auto_20161107_1742.py b/app/organization/projects/migrations/0029_auto_20161107_1742.py
deleted file mode 100644
index 573de714..00000000
--- a/app/organization/projects/migrations/0029_auto_20161107_1742.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-07 16:42
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0028_auto_20161104_1855'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='projectdemo',
- name='directory',
- field=models.CharField(blank=True, help_text='Relative directory in repository', max_length=256, null=True, verbose_name='directory'),
- ),
- migrations.AlterField(
- model_name='repository',
- name='url',
- field=models.CharField(help_text='(HTTP(S) or SSH)', max_length=256, verbose_name='URL'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0030_auto_20161107_1828.py b/app/organization/projects/migrations/0030_auto_20161107_1828.py
deleted file mode 100644
index 168fe550..00000000
--- a/app/organization/projects/migrations/0030_auto_20161107_1828.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-11-07 17:28
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0029_auto_20161107_1742'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='projectdemo',
- name='url',
- field=models.URLField(blank=True, max_length=512, verbose_name='URL'),
- ),
- migrations.AlterField(
- model_name='repository',
- name='url',
- field=models.CharField(help_text='http(s) or ssh', max_length=256, verbose_name='URL'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0031_auto_20161205_1536.py b/app/organization/projects/migrations/0031_auto_20161205_1536.py
deleted file mode 100644
index a804eb0e..00000000
--- a/app/organization/projects/migrations/0031_auto_20161205_1536.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2016-12-05 14:36
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0030_auto_20161107_1828'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='projectimage',
- name='type',
- field=models.CharField(choices=[('logo', 'logo'), ('logo_white', 'logo white'), ('logo_black', 'logo black'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0032_project_external_id.py b/app/organization/projects/migrations/0032_project_external_id.py
deleted file mode 100644
index 193342ff..00000000
--- a/app/organization/projects/migrations/0032_project_external_id.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2016-12-22 15:56
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0031_auto_20161205_1536'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='project',
- name='external_id',
- field=models.CharField(blank=True, max_length=128, null=True, verbose_name='register ID'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0033_projectworkpackage.py b/app/organization/projects/migrations/0033_projectworkpackage.py
deleted file mode 100644
index 72675c3e..00000000
--- a/app/organization/projects/migrations/0033_projectworkpackage.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2016-12-28 13:28
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0073_auto_20161228_1428'),
- ('organization-projects', '0032_project_external_id'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ProjectWorkPackage',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('date_from', models.DateField(blank=True, null=True, verbose_name='begin date')),
- ('date_to', models.DateField(blank=True, null=True, verbose_name='end date')),
- ('number', models.IntegerField(verbose_name='number')),
- ('lead_organization', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='leader_work_packages', to='organization-network.Organization', verbose_name='lead organization')),
- ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='work_packages', to='organization-projects.Project', verbose_name='project')),
- ],
- options={
- 'verbose_name': 'work package',
- 'ordering': ['number'],
- 'verbose_name_plural': 'work packages',
- },
- ),
- ]
diff --git a/app/organization/projects/migrations/0034_auto_20161230_1839.py b/app/organization/projects/migrations/0034_auto_20161230_1839.py
deleted file mode 100644
index 4dceb7a0..00000000
--- a/app/organization/projects/migrations/0034_auto_20161230_1839.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2016-12-30 17:39
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0033_projectworkpackage'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='project',
- name='external_id',
- field=models.CharField(blank=True, max_length=128, null=True, verbose_name='external ID'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0035_auto_20170106_1149.py b/app/organization/projects/migrations/0035_auto_20170106_1149.py
deleted file mode 100644
index bbe71335..00000000
--- a/app/organization/projects/migrations/0035_auto_20170106_1149.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-06 10:49
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0079_auto_20170106_1149'),
- ('organization-projects', '0034_auto_20161230_1839'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='project',
- name='manager',
- field=models.ManyToManyField(blank=True, null=True, related_name='projects_manager', to='organization-network.Person', verbose_name='Manager'),
- ),
- migrations.AddField(
- model_name='project',
- name='referring_person',
- field=models.ManyToManyField(blank=True, null=True, related_name='projects_referring_person', to='organization-network.Person', verbose_name='Referring Person'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0035_projectblock_login_required.py b/app/organization/projects/migrations/0035_projectblock_login_required.py
deleted file mode 100644
index 12a37d78..00000000
--- a/app/organization/projects/migrations/0035_projectblock_login_required.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-03 11:20
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0034_auto_20161230_1839'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='projectblock',
- name='login_required',
- field=models.BooleanField(default=False, verbose_name='login required'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0036_auto_20170103_1227.py b/app/organization/projects/migrations/0036_auto_20170103_1227.py
deleted file mode 100644
index 02072f68..00000000
--- a/app/organization/projects/migrations/0036_auto_20170103_1227.py
+++ /dev/null
@@ -1,46 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-03 11:27
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0035_projectblock_login_required'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='projectblock',
- name='content_en',
- field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Content'),
- ),
- migrations.AddField(
- model_name='projectblock',
- name='content_fr',
- field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Content'),
- ),
- migrations.AddField(
- model_name='projectblock',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='projectblock',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='projectblock',
- name='title_en',
- field=models.CharField(max_length=1024, null=True, verbose_name='title'),
- ),
- migrations.AddField(
- model_name='projectblock',
- name='title_fr',
- field=models.CharField(max_length=1024, null=True, verbose_name='title'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0036_auto_20170106_1645.py b/app/organization/projects/migrations/0036_auto_20170106_1645.py
deleted file mode 100644
index 7eb89cde..00000000
--- a/app/organization/projects/migrations/0036_auto_20170106_1645.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-06 15:45
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0035_auto_20170106_1149'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ProjectCall',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ],
- options={
- 'verbose_name': 'project call',
- 'ordering': ['name'],
- 'verbose_name_plural': 'project calls',
- },
- ),
- migrations.AlterField(
- model_name='project',
- name='referring_person',
- field=models.ManyToManyField(blank=True, related_name='projects_referring_person', to='organization-network.Person', verbose_name='Referring Person'),
- ),
- migrations.AddField(
- model_name='project',
- name='call',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='projects', to='organization-projects.ProjectCall', verbose_name='project call'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0037_projectblogpage.py b/app/organization/projects/migrations/0037_projectblogpage.py
deleted file mode 100644
index 94585109..00000000
--- a/app/organization/projects/migrations/0037_projectblogpage.py
+++ /dev/null
@@ -1,50 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-04 16:33
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('sites', '0002_alter_domain_unique'),
- ('organization-projects', '0036_auto_20170103_1227'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ProjectBlogPage',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('keywords_string', models.CharField(blank=True, editable=False, max_length=500)),
- ('title', models.CharField(max_length=500, verbose_name='Title')),
- ('title_fr', models.CharField(max_length=500, null=True, verbose_name='Title')),
- ('title_en', models.CharField(max_length=500, null=True, verbose_name='Title')),
- ('slug', models.CharField(blank=True, help_text='Leave blank to have the URL auto-generated from the title.', max_length=2000, null=True, verbose_name='URL')),
- ('_meta_title', models.CharField(blank=True, help_text='Optional title to be used in the HTML title tag. If left blank, the main title field will be used.', max_length=500, null=True, verbose_name='Title')),
- ('description', models.TextField(blank=True, verbose_name='Description')),
- ('description_fr', models.TextField(blank=True, null=True, verbose_name='Description')),
- ('description_en', models.TextField(blank=True, null=True, verbose_name='Description')),
- ('gen_description', models.BooleanField(default=True, help_text='If checked, the description will be automatically generated from content. Uncheck if you want to manually set a custom description.', verbose_name='Generate description')),
- ('created', models.DateTimeField(editable=False, null=True)),
- ('updated', models.DateTimeField(editable=False, null=True)),
- ('status', models.IntegerField(choices=[(1, 'Draft'), (2, 'Published')], default=2, help_text='With Draft chosen, will only be shown for admin users on the site.', verbose_name='Status')),
- ('publish_date', models.DateTimeField(blank=True, db_index=True, help_text="With Published chosen, won't be shown until this time", null=True, verbose_name='Published from')),
- ('expiry_date', models.DateTimeField(blank=True, help_text="With Published chosen, won't be shown after this time", null=True, verbose_name='Expires on')),
- ('short_url', models.URLField(blank=True, null=True)),
- ('in_sitemap', models.BooleanField(default=True, verbose_name='Show in sitemap')),
- ('content', mezzanine.core.fields.RichTextField(verbose_name='Content')),
- ('content_fr', mezzanine.core.fields.RichTextField(null=True, verbose_name='Content')),
- ('content_en', mezzanine.core.fields.RichTextField(null=True, verbose_name='Content')),
- ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='blog_pages', to='organization-projects.Project', verbose_name='project')),
- ('site', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to='sites.Site')),
- ],
- options={
- 'verbose_name_plural': 'Project blog pages',
- 'verbose_name': 'Project blog page',
- },
- ),
- ]
diff --git a/app/organization/projects/migrations/0038_projectblogpage_login_required_content.py b/app/organization/projects/migrations/0038_projectblogpage_login_required_content.py
deleted file mode 100644
index 340454b1..00000000
--- a/app/organization/projects/migrations/0038_projectblogpage_login_required_content.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-04 17:00
-from __future__ import unicode_literals
-
-from django.db import migrations
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0037_projectblogpage'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='projectblogpage',
- name='login_required_content',
- field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Login required content'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0039_auto_20170104_1820.py b/app/organization/projects/migrations/0039_auto_20170104_1820.py
deleted file mode 100644
index 32d2fdd0..00000000
--- a/app/organization/projects/migrations/0039_auto_20170104_1820.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-04 17:20
-from __future__ import unicode_literals
-
-from django.db import migrations
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0038_projectblogpage_login_required_content'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='projectblogpage',
- name='login_required_content_en',
- field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Login required content'),
- ),
- migrations.AddField(
- model_name='projectblogpage',
- name='login_required_content_fr',
- field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Login required content'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0040_auto_20170105_1743.py b/app/organization/projects/migrations/0040_auto_20170105_1743.py
deleted file mode 100644
index 22d7c834..00000000
--- a/app/organization/projects/migrations/0040_auto_20170105_1743.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-05 16:43
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0039_auto_20170104_1820'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='projectimage',
- name='type',
- field=models.CharField(choices=[('logo', 'logo'), ('logo_white', 'logo white'), ('logo_black', 'logo black'), ('logo_header', 'logo header'), ('logo_footer', 'logo footer'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0041_merge.py b/app/organization/projects/migrations/0041_merge.py
deleted file mode 100644
index f8cf456a..00000000
--- a/app/organization/projects/migrations/0041_merge.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-11 10:40
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0040_auto_20170105_1743'),
- ('organization-projects', '0036_auto_20170106_1645'),
- ]
-
- operations = [
- ]
diff --git a/app/organization/projects/migrations/0042_auto_20170118_1239.py b/app/organization/projects/migrations/0042_auto_20170118_1239.py
deleted file mode 100644
index a72b079c..00000000
--- a/app/organization/projects/migrations/0042_auto_20170118_1239.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-01-18 11:39
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0041_merge'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='project',
- name='manager',
- field=models.ManyToManyField(blank=True, related_name='projects_manager', to='organization-network.Person', verbose_name='Manager'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0043_auto_20170214_1643.py b/app/organization/projects/migrations/0043_auto_20170214_1643.py
deleted file mode 100644
index f13b953c..00000000
--- a/app/organization/projects/migrations/0043_auto_20170214_1643.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-02-14 15:43
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0042_auto_20170118_1239'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='projectblock',
- name='background_color',
- field=models.CharField(blank=True, choices=[('black', 'black'), ('yellow', 'yellow'), ('red', 'red'), ('white', 'white')], max_length=32, verbose_name='background color'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0044_auto_20170303_1557.py b/app/organization/projects/migrations/0044_auto_20170303_1557.py
deleted file mode 100644
index 992ab8ac..00000000
--- a/app/organization/projects/migrations/0044_auto_20170303_1557.py
+++ /dev/null
@@ -1,261 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-03-03 14:57
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0088_organization_site'),
- ('sites', '0002_alter_domain_unique'),
- ('organization-core', '0005_linktype_fa_option'),
- ('organization-projects', '0043_auto_20170214_1643'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ProjectCallBlock',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('content', mezzanine.core.fields.RichTextField(verbose_name='Content')),
- ('content_fr', mezzanine.core.fields.RichTextField(null=True, verbose_name='Content')),
- ('content_en', mezzanine.core.fields.RichTextField(null=True, verbose_name='Content')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('title_fr', models.CharField(max_length=1024, null=True, verbose_name='title')),
- ('title_en', models.CharField(max_length=1024, null=True, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('description_fr', models.TextField(blank=True, null=True, verbose_name='description')),
- ('description_en', models.TextField(blank=True, null=True, verbose_name='description')),
- ('with_separator', models.BooleanField(default=False)),
- ('background_color', models.CharField(blank=True, choices=[('black', 'black'), ('yellow', 'yellow'), ('red', 'red'), ('white', 'white')], max_length=32, verbose_name='background color')),
- ('login_required', models.BooleanField(default=False, verbose_name='login required')),
- ],
- options={
- 'ordering': ('_order',),
- },
- ),
- migrations.CreateModel(
- name='ProjectCallFile',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('file', mezzanine.core.fields.FileField(max_length=1024, verbose_name='document')),
- ],
- options={
- 'ordering': ('_order',),
- },
- ),
- migrations.CreateModel(
- name='ProjectCallImage',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('file', mezzanine.core.fields.FileField(max_length=1024, verbose_name='Image')),
- ('credits', models.CharField(blank=True, max_length=256, null=True, verbose_name='credits')),
- ('type', models.CharField(choices=[('logo', 'logo'), ('logo_white', 'logo white'), ('logo_black', 'logo black'), ('logo_header', 'logo header'), ('logo_footer', 'logo footer'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page - slider'), ('page_featured', 'page - featured')], max_length=64, verbose_name='type')),
- ],
- options={
- 'ordering': ('_order',),
- },
- ),
- migrations.CreateModel(
- name='ProjectCallLink',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('url', models.URLField(blank=True, max_length=512, verbose_name='URL')),
- ('title', models.CharField(blank=True, max_length=1024, null=True, verbose_name='title')),
- ('title_fr', models.CharField(blank=True, max_length=1024, null=True, verbose_name='title')),
- ('title_en', models.CharField(blank=True, max_length=1024, null=True, verbose_name='title')),
- ],
- options={
- 'verbose_name_plural': 'links',
- 'abstract': False,
- 'verbose_name': 'link',
- },
- ),
- migrations.CreateModel(
- name='ProjectICTData',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('affiliation', models.CharField(max_length=512, verbose_name='affiliation')),
- ('short_description', models.CharField(help_text='Very short description of challenge / technology (110 characters max)', max_length=110, verbose_name='short description')),
- ('technology_description', models.TextField(help_text='Description of the project technology to be made available to artists + challenges it produces (100-200 words) ', verbose_name='technology description')),
- ('challenges_description', models.TextField(help_text='Description of the challenges faced by the ICT-Project (100-150 words).', verbose_name='challenges description')),
- ('objectives_description', models.TextField(help_text='What the project is looking to gain from the collaboration and what kind of artist would be suitable (100 â 150 words)', verbose_name='challenges description')),
- ('resources_description', models.TextField(help_text='Resources available to the artist (50 â 100 words) -- e.g. office facility, studio facility, technical equipment, internet connection, laboratory, and periods of availability for artistic production, staff possibly allocated to the project, available budget for travel, consumables and equipments, etc.).', verbose_name='resources description')),
- ('letter', models.TextField(verbose_name='letter of commitment')),
- ('validation_status', models.IntegerField(choices=[(0, 'pending'), (1, 'accepted'), (2, 'rejected'), (3, 'in process')], verbose_name='validation status')),
- ('contact', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ict_projects_contact_person', to='organization-network.Person', verbose_name='Contact Person')),
- ],
- options={
- 'verbose_name_plural': 'Project ICT data',
- 'verbose_name': 'Project ICT data',
- },
- ),
- migrations.AlterModelOptions(
- name='projectcall',
- options={'ordering': ['title', 'name'], 'verbose_name': 'project call', 'verbose_name_plural': 'project calls'},
- ),
- migrations.AddField(
- model_name='projectcall',
- name='_meta_title',
- field=models.CharField(blank=True, help_text='Optional title to be used in the HTML title tag. If left blank, the main title field will be used.', max_length=500, null=True, verbose_name='Title'),
- ),
- migrations.AddField(
- model_name='projectcall',
- name='content',
- field=mezzanine.core.fields.RichTextField(default='', verbose_name='Content'),
- preserve_default=False,
- ),
- migrations.AddField(
- model_name='projectcall',
- name='content_en',
- field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Content'),
- ),
- migrations.AddField(
- model_name='projectcall',
- name='content_fr',
- field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Content'),
- ),
- migrations.AddField(
- model_name='projectcall',
- name='created',
- field=models.DateTimeField(editable=False, null=True),
- ),
- migrations.AddField(
- model_name='projectcall',
- name='date_from',
- field=models.DateField(blank=True, null=True, verbose_name='begin date'),
- ),
- migrations.AddField(
- model_name='projectcall',
- name='date_to',
- field=models.DateField(blank=True, null=True, verbose_name='end date'),
- ),
- migrations.AddField(
- model_name='projectcall',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='Description'),
- ),
- migrations.AddField(
- model_name='projectcall',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='Description'),
- ),
- migrations.AddField(
- model_name='projectcall',
- name='expiry_date',
- field=models.DateTimeField(blank=True, help_text="With Published chosen, won't be shown after this time", null=True, verbose_name='Expires on'),
- ),
- migrations.AddField(
- model_name='projectcall',
- name='gen_description',
- field=models.BooleanField(default=True, help_text='If checked, the description will be automatically generated from content. Uncheck if you want to manually set a custom description.', verbose_name='Generate description'),
- ),
- migrations.AddField(
- model_name='projectcall',
- name='in_sitemap',
- field=models.BooleanField(default=True, verbose_name='Show in sitemap'),
- ),
- migrations.AddField(
- model_name='projectcall',
- name='keywords_string',
- field=models.CharField(blank=True, editable=False, max_length=500),
- ),
- migrations.AddField(
- model_name='projectcall',
- name='publish_date',
- field=models.DateTimeField(blank=True, db_index=True, help_text="With Published chosen, won't be shown until this time", null=True, verbose_name='Published from'),
- ),
- migrations.AddField(
- model_name='projectcall',
- name='short_url',
- field=models.URLField(blank=True, null=True),
- ),
- migrations.AddField(
- model_name='projectcall',
- name='site',
- field=models.ForeignKey(default=1, editable=False, on_delete=django.db.models.deletion.CASCADE, to='sites.Site'),
- preserve_default=False,
- ),
- migrations.AddField(
- model_name='projectcall',
- name='slug',
- field=models.CharField(blank=True, help_text='Leave blank to have the URL auto-generated from the title.', max_length=2000, null=True, verbose_name='URL'),
- ),
- migrations.AddField(
- model_name='projectcall',
- name='status',
- field=models.IntegerField(choices=[(1, 'Draft'), (2, 'Published')], default=2, help_text='With Draft chosen, will only be shown for admin users on the site.', verbose_name='Status'),
- ),
- migrations.AddField(
- model_name='projectcall',
- name='title',
- field=models.CharField(default='', max_length=500, verbose_name='Title'),
- preserve_default=False,
- ),
- migrations.AddField(
- model_name='projectcall',
- name='title_en',
- field=models.CharField(max_length=500, null=True, verbose_name='Title'),
- ),
- migrations.AddField(
- model_name='projectcall',
- name='title_fr',
- field=models.CharField(max_length=500, null=True, verbose_name='Title'),
- ),
- migrations.AddField(
- model_name='projectcall',
- name='updated',
- field=models.DateTimeField(editable=False, null=True),
- ),
- migrations.AlterField(
- model_name='project',
- name='type',
- field=models.CharField(choices=[('internal', 'internal'), ('external', 'external'), ('ICT', 'ICT')], max_length=128, verbose_name='type'),
- ),
- migrations.AlterField(
- model_name='projectcall',
- name='description',
- field=models.TextField(blank=True, verbose_name='Description'),
- ),
- migrations.AddField(
- model_name='projectictdata',
- name='project',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='ict_data', to='organization-projects.Project', verbose_name='project'),
- ),
- migrations.AddField(
- model_name='projectcalllink',
- name='call',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='links', to='organization-projects.ProjectCall', verbose_name='project call link'),
- ),
- migrations.AddField(
- model_name='projectcalllink',
- name='link_type',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organization-core.LinkType', verbose_name='link type'),
- ),
- migrations.AddField(
- model_name='projectcallimage',
- name='call',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='images', to='organization-projects.ProjectCall', verbose_name='project call image'),
- ),
- migrations.AddField(
- model_name='projectcallfile',
- name='call',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='files', to='organization-projects.ProjectCall', verbose_name='project call file'),
- ),
- migrations.AddField(
- model_name='projectcallblock',
- name='call',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='blocks', to='organization-projects.ProjectCall', verbose_name='project call blocks'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0045_auto_20170303_1605.py b/app/organization/projects/migrations/0045_auto_20170303_1605.py
deleted file mode 100644
index 64affdd6..00000000
--- a/app/organization/projects/migrations/0045_auto_20170303_1605.py
+++ /dev/null
@@ -1,50 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-03-03 15:05
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-network', '0088_organization_site'),
- ('organization-projects', '0044_auto_20170303_1557'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ProjectContact',
- fields=[
- ('person_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization-network.Person')),
- ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='contacts', to='organization-projects.Project', verbose_name='project')),
- ],
- options={
- 'verbose_name': 'Project contact',
- 'verbose_name_plural': 'Project contacts',
- },
- bases=('organization-network.person',),
- ),
- migrations.CreateModel(
- name='ProjectSimpleImage',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('file', mezzanine.core.fields.FileField(max_length=1024, verbose_name='Image')),
- ('credits', models.CharField(blank=True, max_length=256, null=True, verbose_name='credits')),
- ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='simple_images', to='organization-projects.Project', verbose_name='project')),
- ],
- options={
- 'ordering': ('_order',),
- },
- ),
- migrations.AlterField(
- model_name='projectictdata',
- name='objectives_description',
- field=models.TextField(help_text='What the project is looking to gain from the collaboration and what kind of artist would be suitable (100 â 150 words)', verbose_name='objectives description'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0046_auto_20170303_1631.py b/app/organization/projects/migrations/0046_auto_20170303_1631.py
deleted file mode 100644
index 51ce2aa5..00000000
--- a/app/organization/projects/migrations/0046_auto_20170303_1631.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-03-03 15:31
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0045_auto_20170303_1605'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='projectsimpleimage',
- name='file',
- field=models.FileField(max_length=1024, upload_to='images', verbose_name='Image'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0047_remove_projectictdata_contact.py b/app/organization/projects/migrations/0047_remove_projectictdata_contact.py
deleted file mode 100644
index 22091b6f..00000000
--- a/app/organization/projects/migrations/0047_remove_projectictdata_contact.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-03-03 16:38
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0046_auto_20170303_1631'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='projectictdata',
- name='contact',
- ),
- ]
diff --git a/app/organization/projects/migrations/0048_auto_20170307_1540.py b/app/organization/projects/migrations/0048_auto_20170307_1540.py
deleted file mode 100644
index 7a44e89c..00000000
--- a/app/organization/projects/migrations/0048_auto_20170307_1540.py
+++ /dev/null
@@ -1,89 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-03-07 14:40
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('sites', '0002_alter_domain_unique'),
- ('organization-network', '0089_auto_20170303_1637'),
- ('organization-projects', '0047_remove_projectictdata_contact'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ProjectResidency',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('keywords_string', models.CharField(blank=True, editable=False, max_length=500)),
- ('title', models.CharField(max_length=500, verbose_name='Title')),
- ('slug', models.CharField(blank=True, help_text='Leave blank to have the URL auto-generated from the title.', max_length=2000, null=True, verbose_name='URL')),
- ('_meta_title', models.CharField(blank=True, help_text='Optional title to be used in the HTML title tag. If left blank, the main title field will be used.', max_length=500, null=True, verbose_name='Title')),
- ('description', models.TextField(blank=True, verbose_name='Description')),
- ('gen_description', models.BooleanField(default=True, help_text='If checked, the description will be automatically generated from content. Uncheck if you want to manually set a custom description.', verbose_name='Generate description')),
- ('created', models.DateTimeField(editable=False, null=True)),
- ('updated', models.DateTimeField(editable=False, null=True)),
- ('status', models.IntegerField(choices=[(1, 'Draft'), (2, 'Published')], default=2, help_text='With Draft chosen, will only be shown for admin users on the site.', verbose_name='Status')),
- ('publish_date', models.DateTimeField(blank=True, db_index=True, help_text="With Published chosen, won't be shown until this time", null=True, verbose_name='Published from')),
- ('expiry_date', models.DateTimeField(blank=True, help_text="With Published chosen, won't be shown after this time", null=True, verbose_name='Expires on')),
- ('short_url', models.URLField(blank=True, null=True)),
- ('in_sitemap', models.BooleanField(default=True, verbose_name='Show in sitemap')),
- ('content', mezzanine.core.fields.RichTextField(verbose_name='Content')),
- ('date_from', models.DateField(blank=True, null=True, verbose_name='begin date')),
- ('date_to', models.DateField(blank=True, null=True, verbose_name='end date')),
- ('validated', models.BooleanField(default=False)),
- ('producer_commitment', models.TextField(verbose_name='producer commitment')),
- ('artist', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='residencies', to='organization-network.Person', verbose_name='artist')),
- ('producer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='residencies', to='organization-network.Organization', verbose_name='producer')),
- ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='residencies', to='organization-projects.Project', verbose_name='project')),
- ('site', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to='sites.Site')),
- ],
- options={
- 'verbose_name_plural': 'Project residencies',
- 'verbose_name': 'Project residency',
- },
- ),
- migrations.CreateModel(
- name='ProjectResidencyFile',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('file', mezzanine.core.fields.FileField(max_length=1024, verbose_name='document')),
- ('residency', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='files', to='organization-projects.ProjectResidency', verbose_name='project residency file')),
- ],
- options={
- 'ordering': ('_order',),
- },
- ),
- migrations.AlterModelOptions(
- name='projectcall',
- options={'ordering': ['title'], 'verbose_name': 'project call', 'verbose_name_plural': 'project calls'},
- ),
- migrations.AddField(
- model_name='projectcall',
- name='producer_form_content',
- field=mezzanine.core.fields.RichTextField(blank=True, null=True, verbose_name='Producer form content'),
- ),
- migrations.AddField(
- model_name='projectcall',
- name='project_form_content',
- field=mezzanine.core.fields.RichTextField(blank=True, null=True, verbose_name='Project form content'),
- ),
- migrations.AddField(
- model_name='projectcall',
- name='residency_form_content',
- field=mezzanine.core.fields.RichTextField(blank=True, null=True, verbose_name='Residency form content'),
- ),
- migrations.AlterField(
- model_name='projectcall',
- name='name',
- field=models.CharField(blank=True, max_length=512, verbose_name='name'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0049_auto_20170310_1658.py b/app/organization/projects/migrations/0049_auto_20170310_1658.py
deleted file mode 100644
index 2c129e49..00000000
--- a/app/organization/projects/migrations/0049_auto_20170310_1658.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-03-10 15:58
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0048_auto_20170307_1540'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='projectictdata',
- name='validation_status',
- ),
- migrations.AddField(
- model_name='project',
- name='validation_status',
- field=models.IntegerField(choices=[(0, 'rejected'), (1, 'pending'), (2, 'in process'), (3, 'accepted')], default=1, verbose_name='validation status'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0050_auto_20170313_1224.py b/app/organization/projects/migrations/0050_auto_20170313_1224.py
deleted file mode 100644
index 42f514d8..00000000
--- a/app/organization/projects/migrations/0050_auto_20170313_1224.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-03-13 11:24
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0049_auto_20170310_1658'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ProjectUserImage',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('file', models.FileField(max_length=1024, upload_to='images', verbose_name='Image')),
- ('credits', models.CharField(blank=True, max_length=256, null=True, verbose_name='credits')),
- ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='user_images', to='organization-projects.Project', verbose_name='project')),
- ],
- options={
- 'ordering': ('_order',),
- },
- ),
- migrations.RemoveField(
- model_name='projectsimpleimage',
- name='project',
- ),
- migrations.DeleteModel(
- name='ProjectSimpleImage',
- ),
- ]
diff --git a/app/organization/projects/migrations/0051_auto_20170314_0937.py b/app/organization/projects/migrations/0051_auto_20170314_0937.py
deleted file mode 100644
index 2008aa3c..00000000
--- a/app/organization/projects/migrations/0051_auto_20170314_0937.py
+++ /dev/null
@@ -1,70 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-03-14 08:37
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0050_auto_20170313_1224'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ProjectPrivateData',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('description', models.TextField(help_text='(500 - 1000 words)', verbose_name='project description')),
- ('affiliation', models.CharField(max_length=512, verbose_name='affiliation')),
- ('commitment_letter', models.FileField(help_text='Written on behalf of the whole project consortium, this letter will commit in implementing the collaboration of a residency application selected by the VERTIGO jury, on the conditions set by the project (in annex of letter: synthesis of all related information entered by project).', max_length=1024, upload_to='Documents/%Y/%m/%d/', verbose_name='letter of commitment by the project coordinator')),
- ('persons', models.CharField(help_text='First name and last name of the persons from organization / project who will be part preliminary of the project team (separated by a comma)', max_length=512, verbose_name='persons')),
- ],
- options={
- 'verbose_name': 'Project private data',
- 'verbose_name_plural': 'Project private data',
- },
- ),
- migrations.CreateModel(
- name='ProjectPublicData',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('brief_description', models.CharField(help_text='Brief description of the challenges faced by the project to be used for wider communication strategy (e.g. Twitter) (110 characters max).', max_length=110, verbose_name='brief description')),
- ('challenges_description', models.TextField(help_text='Full description of the challenges faced by the project (100-150 words).', verbose_name='full description')),
- ('technology_description', models.TextField(help_text='Must include the elements to be made available to the artist with sufficient functional and implementation details for enabling him/her to elaborate his/her technical approach (100-200 words).', verbose_name='technology description')),
- ('objectives_description', models.TextField(help_text='What the project is looking to gain from the collaboration and what kind of artist would be suitable (100 â 150 words).', verbose_name='objective description')),
- ('resources_description', models.TextField(help_text='Resources available to the artist -- e.g. office facility, studio facility, technical equipment, internet connection, laboratory, and periods of availability for artistic production, staff possibly allocated to the project, available budget for travel, consumables and equipment, etc... (50 â 100 words).', verbose_name='resource description')),
- ('period', models.CharField(help_text='Possible period of implementation (must be part of the project implementation workplan)', max_length=128, verbose_name='period of implementation')),
- ('image', models.FileField(help_text='Representing the project', max_length=1024, upload_to='images', verbose_name='Image')),
- ('image_credits', models.CharField(blank=True, max_length=256, null=True, verbose_name='Image credits')),
- ],
- options={
- 'verbose_name': 'Project public data',
- 'verbose_name_plural': 'Project public data',
- },
- ),
- migrations.RemoveField(
- model_name='projectictdata',
- name='project',
- ),
- migrations.AlterField(
- model_name='project',
- name='type',
- field=models.CharField(choices=[('internal', 'internal'), ('external', 'external')], max_length=128, verbose_name='type'),
- ),
- migrations.DeleteModel(
- name='ProjectICTData',
- ),
- migrations.AddField(
- model_name='projectpublicdata',
- name='project',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='public_data', to='organization-projects.Project', verbose_name='project'),
- ),
- migrations.AddField(
- model_name='projectprivatedata',
- name='project',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='private_data', to='organization-projects.Project', verbose_name='project'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0052_auto_20170314_1828.py b/app/organization/projects/migrations/0052_auto_20170314_1828.py
deleted file mode 100644
index 9dcedf8f..00000000
--- a/app/organization/projects/migrations/0052_auto_20170314_1828.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-03-14 17:28
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0051_auto_20170314_0937'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='projectpublicdata',
- name='challenges_description',
- field=models.TextField(help_text='Full description of the challenges faced by the project (100-150 words).', verbose_name='challenges description'),
- ),
- migrations.AlterField(
- model_name='projectpublicdata',
- name='objectives_description',
- field=models.TextField(help_text='What the project is looking to gain from the collaboration and what kind of artist would be suitable (100 â 150 words).', verbose_name='objectives description'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0053_auto_20170314_1918.py b/app/organization/projects/migrations/0053_auto_20170314_1918.py
deleted file mode 100644
index 6b735eb5..00000000
--- a/app/organization/projects/migrations/0053_auto_20170314_1918.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-03-14 18:18
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0052_auto_20170314_1828'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='projectprivatedata',
- name='commitment_letter',
- field=models.FileField(help_text='Written on behalf of the whole project consortium, this letter will commit in implementing the collaboration of a residency application selected by the VERTIGO jury, on the conditions set by the project (in annex of letter: synthesis of all related information entered by project).', max_length=1024, upload_to='user/documents/%Y/%m/%d/', verbose_name='letter of commitment by the project coordinator'),
- ),
- migrations.AlterField(
- model_name='projectpublicdata',
- name='image',
- field=models.FileField(help_text='Representing the project', max_length=1024, upload_to='user/images/%Y/%m/%d/', verbose_name='Image'),
- ),
- migrations.AlterField(
- model_name='projectuserimage',
- name='file',
- field=models.FileField(max_length=1024, upload_to='user/images/%Y/%m/%d/', verbose_name='Image'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0054_auto_20170323_0815.py b/app/organization/projects/migrations/0054_auto_20170323_0815.py
deleted file mode 100644
index de95c64e..00000000
--- a/app/organization/projects/migrations/0054_auto_20170323_0815.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-03-23 07:15
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0053_auto_20170314_1918'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='projectcontact',
- name='organization_name',
- field=models.CharField(blank=True, max_length=128, null=True, verbose_name='organization name'),
- ),
- migrations.AddField(
- model_name='projectcontact',
- name='position',
- field=models.CharField(blank=True, max_length=128, null=True, verbose_name='position'),
- ),
- migrations.AlterField(
- model_name='projectpublicdata',
- name='image_credits',
- field=models.CharField(max_length=256, null=True, verbose_name='Image credits'),
- ),
- ]
diff --git a/app/organization/projects/migrations/0055_auto_20170323_1039.py b/app/organization/projects/migrations/0055_auto_20170323_1039.py
deleted file mode 100644
index 6cd57d06..00000000
--- a/app/organization/projects/migrations/0055_auto_20170323_1039.py
+++ /dev/null
@@ -1,52 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.11 on 2017-03-23 09:39
-from __future__ import unicode_literals
-
-import datetime
-from django.db import migrations, models
-from django.utils.timezone import utc
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-projects', '0054_auto_20170323_0815'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='projectpublicdata',
- name='period',
- ),
- migrations.AddField(
- model_name='projectpublicdata',
- name='implementation_duration',
- field=models.CharField(default='1', help_text='Possible duration of implementation in months (must be part of the project implementation workplan) (months)', max_length=128, verbose_name='implementation duration'),
- ),
- migrations.AddField(
- model_name='projectpublicdata',
- name='implementation_start_date',
- field=models.DateField(default=datetime.datetime(2017, 3, 23, 9, 39, 34, 20133, tzinfo=utc), help_text='Possible start date of implementation (must be part of the project implementation workplan) (DD/MM/YYYY)', verbose_name='implementation start date'),
- preserve_default=False,
- ),
- migrations.AlterField(
- model_name='project',
- name='date_from',
- field=models.DateField(blank=True, null=True, verbose_name='start date'),
- ),
- migrations.AlterField(
- model_name='projectcall',
- name='date_from',
- field=models.DateField(blank=True, null=True, verbose_name='start date'),
- ),
- migrations.AlterField(
- model_name='projectresidency',
- name='date_from',
- field=models.DateField(blank=True, null=True, verbose_name='start date'),
- ),
- migrations.AlterField(
- model_name='projectworkpackage',
- name='date_from',
- field=models.DateField(blank=True, null=True, verbose_name='start date'),
- ),
- ]
diff --git a/app/organization/projects/migrations/__init__.py b/app/organization/projects/migrations/__init__.py
deleted file mode 100644
index e69de29b..00000000
diff --git a/app/organization/projects/models.py b/app/organization/projects/models.py
deleted file mode 100644
index 90effc06..00000000
--- a/app/organization/projects/models.py
+++ /dev/null
@@ -1,396 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-import datetime
-import os
-
-from django.db import models
-from django.utils.translation import ugettext_lazy as _
-from django.contrib.auth.models import User
-
-from mezzanine.core.models import RichText, Displayable, Slugged, Orderable
-
-from organization.core.models import *
-from organization.pages.models import *
-from organization.network.models import *
-
-
-PROJECT_TYPE_CHOICES = [
- ('internal', _('internal')),
- ('external', _('external')),
-]
-
-REPOSITORY_ACCESS_CHOICES = [
- ('public', _('public')),
- ('shared', _('shared')),
- ('private', _('private')),
-]
-
-PROJECT_STATUS_CHOICES = (
- (0, _('rejected')),
- (1, _('pending')),
- (2, _('in process')),
- (3, _('accepted')),
-)
-
-
-class Project(Displayable, Period, RichText):
- """(Project description)"""
-
- type = models.CharField(_('type'), max_length=128, choices=PROJECT_TYPE_CHOICES)
- external_id = models.CharField(_('external ID'), blank=True, null=True, max_length=128)
- program = models.ForeignKey('ProjectProgram', verbose_name=_('project program'), related_name='projects', blank=True, null=True, on_delete=models.SET_NULL)
- program_type = models.ForeignKey('ProjectProgramType', verbose_name=_('project program type'), related_name='projects', blank=True, null=True, on_delete=models.SET_NULL)
- call = models.ForeignKey('ProjectCall', verbose_name=_('project call'), related_name='projects', blank=True, null=True, on_delete=models.SET_NULL)
- lead_team = models.ForeignKey('organization-network.Team', verbose_name=_('lead team'), related_name='leader_projects', blank=True, null=True)
- lead_organization = models.ForeignKey('organization-network.Organization', verbose_name=_('lead organization'), related_name='leader_projects', blank=True, null=True)
- teams = models.ManyToManyField('organization-network.Team', verbose_name=_('teams'), related_name='partner_projects', blank=True)
- organizations = models.ManyToManyField('organization-network.Organization', verbose_name=_('organizations'), blank=True)
- website = models.URLField(_('website'), max_length=512, blank=True)
- topic = models.ForeignKey('ProjectTopic', verbose_name=_('topic'), related_name='projects', blank=True, null=True)
- referring_person = models.ManyToManyField('organization-network.Person', verbose_name=_('Referring Person'), related_name='projects_referring_person', blank=True)
- manager = models.ManyToManyField('organization-network.Person', verbose_name=_('Manager'), related_name='projects_manager', blank=True)
- validation_status = models.IntegerField(_('validation status'), choices=PROJECT_STATUS_CHOICES, default=1)
-
- class Meta:
- verbose_name = _('project')
- verbose_name_plural = _("projects")
- ordering = ['-date_from', '-date_to']
-
- def __str__(self):
- return self.title
-
- def get_absolute_url(self):
- return reverse("organization-project-detail", kwargs={"slug": self.slug})
-
- def project_status(self):
- if self.date_from and self.date_to:
- if datetime.date.today() >= self.date_from and datetime.date.today() <= self.date_to:
- return _('in progress')
- elif datetime.date.today() < self.date_from and datetime.date.today() < self.date_to:
- return _('pending')
- elif datetime.date.today() > self.date_to and datetime.date.today() > self.date_to:
- return _('completed')
- else:
- return _('pending')
-
-
-class ProjectTopic(Named):
-
- parent = models.ForeignKey('ProjectTopic', verbose_name=_('parent topic'), related_name='topics', blank=True, null=True)
-
- class Meta:
- verbose_name = _('project topic')
- verbose_name_plural = _("project topics")
- ordering = ['name',]
-
- def __str__(self):
- if self.parent:
- return ' - '.join((self.parent.name, self.name))
- else:
- return self.name
-
-
-class ProjectProgram(Named):
-
- class Meta:
- verbose_name = _('program')
- verbose_name_plural = _("programs")
- ordering = ['name',]
-
-
-class ProjectProgramType(Named):
-
- class Meta:
- verbose_name = _('program type')
- verbose_name_plural = _("program types")
- ordering = ['name',]
-
-
-class ProjectWorkPackage(Titled, Period):
-
- project = models.ForeignKey(Project, verbose_name=_('project'), related_name='work_packages')
- number = models.IntegerField(_('number'))
- lead_organization = models.ForeignKey('organization-network.Organization', verbose_name=_('lead organization'), related_name='leader_work_packages', blank=True, null=True)
-
- class Meta:
- verbose_name = _('work package')
- verbose_name_plural = _("work packages")
- ordering = ['number',]
-
-
-class ProjectPlaylist(PlaylistRelated):
-
- project = models.ForeignKey(Project, verbose_name=_('project'), related_name='playlists', blank=True, null=True, on_delete=models.SET_NULL)
-
-
-class ProjectLink(Link):
-
- project = models.ForeignKey(Project, verbose_name=_('project'), related_name='links', blank=True, null=True, on_delete=models.SET_NULL)
-
-
-class ProjectImage(Image):
-
- project = models.ForeignKey(Project, verbose_name=_('project'), related_name='images', blank=True, null=True, on_delete=models.SET_NULL)
-
-
-class ProjectUserImage(UserImage):
-
- project = models.ForeignKey(Project, verbose_name=_('project'), related_name='user_images', blank=True, null=True, on_delete=models.SET_NULL)
-
-
-class ProjectFile(File):
-
- project = models.ForeignKey(Project, verbose_name=_('project'), related_name='files', blank=True, null=True, on_delete=models.SET_NULL)
-
-
-class ProjectBlock(Block):
-
- project = models.ForeignKey(Project, verbose_name=_('project'), related_name='blocks', blank=True, null=True, on_delete=models.SET_NULL)
-
-
-class ProjectTopicPage(Page, SubTitled):
-
- project_topic = models.ForeignKey('ProjectTopic', verbose_name=_('project topic'), related_name="pages", blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _('project topic page')
- verbose_name_plural = _("project topic pages")
-
-
-class ProjectCall(Displayable, Period, RichText, NamedOnly):
-
- project_form_content = RichTextField(_("Project form content"), blank=True, null=True)
- residency_form_content = RichTextField(_("Residency form content"), blank=True, null=True)
- producer_form_content = RichTextField(_("Producer form content"), blank=True, null=True)
-
- class Meta:
- verbose_name = _('project call')
- verbose_name_plural = _("project calls")
- ordering = ['title',]
-
- def __str__(self):
- return self.title
-
- def get_absolute_url(self):
- return reverse("organization-call-detail", kwargs={"slug": self.slug})
-
- def save(self, *args, **kwargs):
- if not self.name and self.title:
- self.name = self.title
- if not self.title and self.name:
- self.title = self.name
- super(ProjectCall, self).save(args, kwargs)
-
-
-class ProjectCallBlock(Block):
-
- call = models.ForeignKey(ProjectCall, verbose_name=_('project call blocks'), related_name='blocks', blank=True, null=True, on_delete=models.SET_NULL)
-
-
-class ProjectCallImage(Image):
-
- call = models.ForeignKey(ProjectCall, verbose_name=_('project call image'), related_name='images', blank=True, null=True, on_delete=models.SET_NULL)
-
-
-class ProjectCallFile(File):
-
- call = models.ForeignKey(ProjectCall, verbose_name=_('project call file'), related_name='files', blank=True, null=True, on_delete=models.SET_NULL)
-
-
-class ProjectCallLink(Link):
-
- call = models.ForeignKey(ProjectCall, verbose_name=_('project call link'), related_name='links', blank=True, null=True, on_delete=models.SET_NULL)
-
-
-class ProjectDemo(Displayable, RichText, URL):
-
- project = models.ForeignKey('Project', verbose_name=_('project'), related_name='demos', blank=True, null=True, on_delete=models.SET_NULL)
- authors = models.ManyToManyField(Person, verbose_name=_('authors'), related_name='demos', blank=True)
- repository = models.ForeignKey('Repository', verbose_name=_('repository'), related_name='demos', blank=True, null=True, on_delete=models.SET_NULL)
- build_commands = models.TextField(_('build commands'), blank=True)
- directory = models.CharField(_('directory'), max_length=256, blank=True, null=True, help_text='Relative directory in repository')
-
- class Meta:
- verbose_name = _('project demo')
- verbose_name_plural = _("project demos")
-
- def get_absolute_url(self):
- return reverse("organization-project-demo-detail", kwargs={"slug": self.slug})
-
- @property
- def relative_url(self):
- path = self.repository.directory.replace(settings.MEDIA_ROOT, '')
- return settings.MEDIA_URL + path + os.sep + self.directory + '/index.html'
-
- def build(self):
- os.chdir(self.repository.directory)
- for command in self.build_commands.split('\n'):
- os.system(command)
-
- def save(self, *args, **kwargs):
- super(ProjectDemo, self).save(args, kwargs)
- if self.repository:
- self.build()
-
-
-class Repository(Named):
-
- system = models.ForeignKey('RepositorySystem', verbose_name=_('system'), related_name='repositories')
- access = models.CharField(_('access'), max_length=64, choices=REPOSITORY_ACCESS_CHOICES, default='private')
- branch = models.CharField(_('branch'), max_length=32, default='master')
- url = models.CharField(_('URL'), max_length=256, help_text='http(s) or ssh')
-
- class Meta:
- verbose_name = _('repository')
- verbose_name_plural = _("repositories")
-
- def save(self, *args, **kwargs):
- super(Repository, self).save(args, kwargs)
- os.path.exists(self.directory)
- if not os.path.exists(self.directory):
- self.clone()
- self.checkout()
-
- @property
- def directory(self):
- dir_name = self.url.split('/')[-1].split('.')[0]
- return settings.PROJECT_DEMOS_DIR + dir_name
-
- def clone(self):
- os.chdir(settings.PROJECT_DEMOS_DIR)
- os.system(' '.join((self.system.clone_command, self.url)))
-
- def pull(self):
- os.chdir(self.directory)
- os.system(' '.join((self.system.pull_command, self.branch)))
-
- def checkout(self):
- os.chdir(self.directory)
- os.system(' '.join((self.system.checkout_command, self.branch)))
-
-
-class RepositorySystem(Named):
-
- clone_command = models.CharField(_('clone command'), max_length=256)
- pull_command = models.CharField(_('pull command'), max_length=256)
- checkout_command = models.CharField(_('checkout command'), max_length=256)
- branch_command = models.CharField(_('branch command'), max_length=256)
-
- class Meta:
- verbose_name = _('repository system')
- verbose_name_plural = _("repository systems")
-
-
-class ProjectRelatedTitle(RelatedTitle):
-
- project = models.OneToOneField(Project, verbose_name=_('project'), related_name='related_title', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _("related title")
- order_with_respect_to = "project"
-
-
-class DynamicContentProject(DynamicContent, Orderable):
-
- project = models.ForeignKey(Project, verbose_name=_('project'), related_name='dynamic_content_project', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = 'Dynamic Content Project'
-
-
-class ProjectBlogPage(Displayable, RichText):
-
- project = models.ForeignKey(Project, verbose_name=_('project'), related_name='blog_pages', blank=True, null=True, on_delete=models.SET_NULL)
- login_required_content = RichTextField(_("Login required content"), null=True)
-
- class Meta:
- verbose_name = 'Project blog page'
- verbose_name_plural = 'Project blog pages'
-
- def get_absolute_url(self):
- return reverse("organization-project-blogpage-detail", kwargs={"slug": self.slug})
-
-
-class ProjectPublicData(models.Model):
-
- project = models.ForeignKey(Project, verbose_name=_('project'), related_name='public_data', blank=True, null=True, on_delete=models.SET_NULL)
-
- brief_description = models.CharField(_('brief description'), max_length=110, help_text="Brief description of the challenges faced by the project to be used for wider communication strategy (e.g. Twitter) (110 characters max).")
- challenges_description = models.TextField(_('challenges description'), help_text="Full description of the challenges faced by the project (100-150 words).")
- technology_description = models.TextField(_('technology description'), help_text="Must include the elements to be made available to the artist with sufficient functional and implementation details for enabling him/her to elaborate his/her technical approach (100-200 words).")
- objectives_description = models.TextField(_('objectives description'), help_text="What the project is looking to gain from the collaboration and what kind of artist would be suitable (100 â 150 words).")
- resources_description = models.TextField(_('resource description'), help_text="Resources available to the artist -- e.g. office facility, studio facility, technical equipment, internet connection, laboratory, and periods of availability for artistic production, staff possibly allocated to the project, available budget for travel, consumables and equipment, etc... (50 â 100 words).")
- implementation_start_date = models.DateField(_('implementation start date'), help_text="Possible start date of implementation (must be part of the project implementation workplan) (DD/MM/YYYY)")
- implementation_duration = models.CharField(_('implementation duration'), max_length=128, help_text="Possible duration of implementation in months (must be part of the project implementation workplan) (months)", default='1')
- image = models.FileField(_("Image"), max_length=1024, upload_to="user/images/%Y/%m/%d/", help_text="Representing the project")
- image_credits = models.CharField(_('Image credits'), max_length=256, null=True)
-
- class Meta:
- verbose_name = 'Project public data'
- verbose_name_plural = 'Project public data'
-
-
-class ProjectPrivateData(models.Model):
-
- project = models.ForeignKey(Project, verbose_name=_('project'), related_name='private_data', blank=True, null=True, on_delete=models.SET_NULL)
-
- description = models.TextField(_('project description'), help_text="(500 - 1000 words)")
- affiliation = models.CharField(_('affiliation'), max_length=512)
- commitment_letter = models.FileField(_("letter of commitment by the project coordinator"), max_length=1024, upload_to="user/documents/%Y/%m/%d/", help_text="Written on behalf of the whole project consortium, this letter will commit in implementing the collaboration of a residency application selected by the VERTIGO jury, on the conditions set by the project (in annex of letter: synthesis of all related information entered by project).")
- persons = models.CharField(_('persons'), max_length=512, help_text="First name and last name of the persons from organization / project who will be part preliminary of the project team (separated by a comma)")
-
- class Meta:
- verbose_name = 'Project private data'
- verbose_name_plural = 'Project private data'
-
-
-class ProjectContact(Person):
-
- project = models.ForeignKey(Project, verbose_name=_('project'), related_name='contacts', blank=True, null=True, on_delete=models.SET_NULL)
- organization_name = models.CharField(_('organization name'), blank=True, null=True, max_length=128)
- position = models.CharField(_('position'), blank=True, null=True, max_length=128)
-
- class Meta:
- verbose_name = 'Project contact'
- verbose_name_plural = 'Project contacts'
-
-
-class ProjectResidency(Displayable, Period, RichText):
-
- project = models.ForeignKey(Project, verbose_name=_('project'), related_name='residencies', blank=True, null=True, on_delete=models.SET_NULL)
- artist = models.ForeignKey(Person, verbose_name=_('artist'), related_name='residencies', blank=True, null=True, on_delete=models.SET_NULL)
- producer = models.ForeignKey('organization-network.Organization', verbose_name=_('producer'), related_name='residencies', blank=True, null=True, on_delete=models.SET_NULL)
- validated = models.BooleanField(default=False)
- producer_commitment = models.TextField(_('producer commitment'), help_text="")
-
- class Meta:
- verbose_name = 'Project residency'
- verbose_name_plural = 'Project residencies'
-
- def get_absolute_url(self):
- return reverse("organization-residency-detail", kwargs={"slug": self.slug})
-
-
-class ProjectResidencyFile(File):
-
- residency = models.ForeignKey(ProjectResidency, verbose_name=_('project residency file'), related_name='files', blank=True, null=True, on_delete=models.SET_NULL)
diff --git a/app/organization/projects/tests.py b/app/organization/projects/tests.py
deleted file mode 100644
index fa8859d7..00000000
--- a/app/organization/projects/tests.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.test import TestCase
-
-# Create your tests here.
diff --git a/app/organization/projects/translation.py b/app/organization/projects/translation.py
deleted file mode 100644
index 6adaccd0..00000000
--- a/app/organization/projects/translation.py
+++ /dev/null
@@ -1,167 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from modeltranslation.translator import translator, register, TranslationOptions
-
-from organization.projects.models import *
-
-
-@register(Project)
-class ProjectTranslationOptions(TranslationOptions):
-
- fields = ('title', 'description', 'content')
-
-
-@register(ProjectPlaylist)
-class ProjectPlaylistTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(ProjectImage)
-class ProjectImageTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(ProjectUserImage)
-class ProjectUserImageTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(ProjectFile)
-class ProjectFileTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(ProjectBlock)
-class ProjectBlockTranslationOptions(TranslationOptions):
-
- fields = ('title', 'description', 'content')
-
-
-@register(ProjectBlogPage)
-class ProjectBlogPageTranslationOptions(TranslationOptions):
-
- fields = ('title', 'description', 'content', 'login_required_content')
-
-
-@register(ProjectLink)
-class ProjectLinkTranslationOptions(TranslationOptions):
-
- fields = ('title',)
-
-
-@register(ProjectProgram)
-class ProjectProgramTranslationOptions(TranslationOptions):
-
- fields = ('name', 'description')
-
-
-@register(ProjectProgramType)
-class ProjectProgramTypeTranslationOptions(TranslationOptions):
-
- fields = ('name', 'description')
-
-
-@register(ProjectTopic)
-class ProjectTopicTranslationOptions(TranslationOptions):
-
- fields = ('name', 'description')
-
-
-@register(ProjectTopicPage)
-class ProjectTopicPageTranslationOptions(TranslationOptions):
-
- fields = ('sub_title',)
-
-
-@register(ProjectDemo)
-class ProjectDemoTranslationOptions(TranslationOptions):
-
- fields = ('title', 'description',)
-
-
-@register(ProjectWorkPackage)
-class ProjectWorkPackageTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(ProjectRelatedTitle)
-class ProjectRelatedTitleTranslationOptions(TranslationOptions):
-
- fields = ('title',)
-
-
-@register(DynamicContentProject)
-class DynamicContentProjectTranslationOptions(TranslationOptions):
-
- fields = ()
-
-
-@register(ProjectPublicData)
-class ProjectPublicDataTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(ProjectPrivateData)
-class ProjectPrivateDataTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(ProjectCall)
-class ProjectCallTranslationOptions(TranslationOptions):
-
- fields = ('title', 'description', 'content',)
-
-
-@register(ProjectCallBlock)
-class ProjectCallBlockTranslationOptions(TranslationOptions):
-
- fields = ('title', 'description', 'content')
-
-
-@register(ProjectCallImage)
-class ProjectCallImageTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(ProjectCallLink)
-class ProjectCallLinkTranslationOptions(TranslationOptions):
-
- fields = ('title',)
-
-
-@register(ProjectCallFile)
-class ProjectCallFileTranslationOptions(TranslationOptions):
-
- pass
-
-@register(ProjectContact)
-class ProjectContactTranslationOptions(TranslationOptions):
-
- pass
diff --git a/app/organization/projects/urls.py b/app/organization/projects/urls.py
deleted file mode 100644
index 817fad7d..00000000
--- a/app/organization/projects/urls.py
+++ /dev/null
@@ -1,61 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-
-import django.views.i18n
-from django.conf.urls import patterns, include, url
-from django.conf.urls.i18n import i18n_patterns
-from django.contrib.auth.decorators import permission_required
-from mezzanine.core.views import direct_to_template
-from mezzanine.conf import settings
-
-from organization.projects.views import *
-
-urlpatterns = [
- url("^dynamic-content-project/$", permission_required('project.can_edit')(DynamicContentProjectView.as_view()), name='dynamic-content-project'),
-
- url("^projects/detail/(?P.*)/$", ProjectDetailView.as_view(), name='organization-project-detail'),
- url("^projects/demo/(?P.*)/$", ProjectDemoDetailView.as_view(), name='organization-project-demo-detail'),
- url("^projects/blog/(?P.*)/$", ProjectBlogPageView.as_view(), name='organization-project-blogpage-detail'),
-
- url("^calls/list/$", ProjectCallListView.as_view(), name='organization-call-list'),
- url("^calls/(?P.*)/detail/$", ProjectCallDetailView.as_view(), name='organization-call-detail'),
-
- url("^calls/(?P.*)/detail/projects/submission/$", ProjectCallDetailView.as_view(), name='organization-project-submission-hack1'), #HACK
- url("^calls/detail/(?P.*)/projects/submission/$", ProjectCallDetailView.as_view(), name='organization-project-submission-hack2'), #HACK
-
- url("^calls/(?P.*)/detail/projects/create/$", ProjectICTCreateView.as_view(), name='organization-project-create'),
- url("^calls/(?P.*)/detail/projects/validation/$", ProjectICTValidationView.as_view(), name='organization-project-validation'),
-
- url("^calls/(?P.*)/projects/detail/(?P.*)/$", ProjectICTDetailView.as_view(), name='organization-project-detail'),
- url("^calls/(?P.*)/projects/list/$", ProjectICTListView.as_view(), name='organization-project-list'),
-
- url("^producers/submission/$", ProducerCreateView.as_view(), name='organization-producer-create'),
- url("^producers/(?P.*)/detail/$", ProducerDetailView.as_view(), name='organization-producer-detail'),
- url("^producers/list/$", ProducerListView.as_view(), name='organization-producer-list'),
-
- url("^calls/(?P.*)/residencies/submission/$", ProjectResidencyCreateView.as_view(), name='organization-residency-create'),
- url("^calls/(?P.*)/residencies/(?P.*)/detail/$", ProjectResidencyDetailView.as_view(), name='organization-residency-detail'),
- url("^calls/(?P.*)/residencies/list/$", ProjectResidencyListView.as_view(), name='organization-residency-list'),
-
-
-]
diff --git a/app/organization/projects/views.py b/app/organization/projects/views.py
deleted file mode 100644
index 39aab2f0..00000000
--- a/app/organization/projects/views.py
+++ /dev/null
@@ -1,268 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.shortcuts import render
-from django.views.generic.detail import SingleObjectMixin
-from django.template.loader import render_to_string, get_template
-from django.core.mail import EmailMessage
-from django.template import Context
-from dal import autocomplete
-from dal_select2_queryset_sequence.views import Select2QuerySetSequenceView
-from mezzanine_agenda.models import Event
-from mezzanine.conf import settings
-from organization.projects.models import *
-from organization.projects.forms import *
-from organization.network.forms import *
-from organization.core.views import *
-from organization.magazine.views import Article
-from organization.pages.models import CustomPage
-
-
-class ProjectMixin(SingleObjectMixin):
-
- def get_context_data(self, **kwargs):
- context = super(ProjectMixin, self).get_context_data(**kwargs)
- self.object = self.get_object()
- if not isinstance(self.object, Project):
- self.project = self.object.project
- else:
- self.project = self.object
-
- department = None
-
- if self.project.lead_team:
- if self.project.lead_team.department:
- department = self.project.lead_team.department
- else:
- for team in self.project.teams.all():
- if team.department:
- department = team.department
- break
-
- context['department'] = department
- if self.project.topic and self.project.topic.parent:
- context['page'] = self.project.topic.parent.pages.all().first()
- elif self.project.topic:
- context['page'] = self.project.topic.pages.all().first()
-
- return context
-
-
-class ProjectDetailView(SlugMixin, ProjectMixin, DetailView):
-
- model = Project
- template_name='projects/project_detail.html'
-
-
-class ProjectICTDetailView(SlugMixin, ProjectMixin, DetailView):
-
- model = Project
- template_name='projects/project_ict_detail.html'
-
-
-class ProjectListView(ListView):
-
- model = Project
- template_name='projects/project_list.html'
-
-
-class DynamicContentProjectView(Select2QuerySetSequenceView):
-
- paginate_by = settings.DAL_MAX_RESULTS
-
- def get_queryset(self):
-
- articles = Article.objects.all()
- custompage = CustomPage.objects.all()
- events = Event.objects.all()
-
- if self.q:
- articles = articles.filter(title__icontains=self.q)
- custompage = custompage.filter(title__icontains=self.q)
- events = events.filter(title__icontains=self.q)
-
- qs = autocomplete.QuerySetSequence(articles, custompage, events,)
-
- if self.q:
- qs = qs.filter(title__icontains=self.q)
-
- qs = self.mixup_querysets(qs)
-
- return qs
-
- def get_results(self, context):
- results = autocomplete_result_formatting(self, context)
- return results
-
-
-class ProjectDemoDetailView(SlugMixin, ProjectMixin, DetailView):
-
- model = ProjectDemo
- template_name='projects/project_demo_detail.html'
-
-
-class ProjectBlogPageView(SlugMixin, ProjectMixin, DetailView):
-
- model = ProjectBlogPage
- template_name='projects/project_blogpage_detail.html'
-
-
-class ProjectICTDetailView(SlugMixin,DetailView):
-
- model = Project
- template_name='projects/project_ict_detail.html'
-
-
-class ProjectCallMixin(object):
-
- def get_context_data(self, **kwargs):
- context = super(ProjectCallMixin, self).get_context_data(**kwargs)
- self.call = ProjectCall.objects.get(slug=self.kwargs['slug'])
- context['call'] = self.call
- return context
-
-
-class ProjectICTSubmissionView(ProjectCallMixin, TemplateView):
-
- model = Project
- template_name='projects/project_ict_submission.html'
-
-
-class ProjectICTCreateView(ProjectCallMixin, CreateWithInlinesView):
-
- model = Project
- form_class = ProjectForm
- template_name='projects/project_ict_create.html'
- inlines = [ProjectPublicDataInline, ProjectPrivateDataInline, ProjectUserImageInline,
- ProjectContactInline]
- topic = 'ICT'
-
- def forms_valid(self, form, inlines):
- self.object = form.save()
- self.call = ProjectCall.objects.get(slug=self.kwargs['slug'])
- self.object.call = self.call
- self.object.topic, c = ProjectTopic.objects.get_or_create(name='ICT')
- self.status = 1
- self.object.save()
-
- for formset in inlines:
- print(formset.prefix)
- if 'contact' in formset.prefix:
- for f in formset:
- contact_data = f.cleaned_data
- contact_email = contact_data.get("email")
-
- from_email = settings.DEFAULT_FROM_EMAIL
- to_email = [contact_email, settings.DEFAULT_TO_EMAIL]
- subject = settings.EMAIL_SUBJECT_PREFIX + ' ' + self.call.title
- ctx = {
- 'first_name': contact_data['first_name'],
- 'last_name': contact_data['last_name'],
- 'project_title': self.object.title,
- }
-
- message = get_template('projects/project_ict_create_notification.html').render(Context(ctx))
- msg = EmailMessage(subject, message, to=to_email, from_email=from_email)
- msg.content_subtype = 'html'
- msg.send()
-
- return super(ProjectICTCreateView, self).forms_valid(form, inlines)
-
- def get_success_url(self):
- return reverse_lazy('organization-project-validation', kwargs={'slug':self.call.slug})
-
-
-class ProjectICTValidationView(ProjectCallMixin, TemplateView):
-
- model = Project
- template_name='projects/project_ict_validation.html'
-
-
-class ProjectICTListView(ListView):
-
- model = Project
- template_name='projects/project_ict_list.html'
-
-
-class ProjectCallDetailView(SlugMixin, DetailView):
-
- model = ProjectCall
- template_name='projects/project_call_detail.html'
-
-
-class ProjectCallListView(ListView):
-
- model = ProjectCall
- template_name='projects/project_call_list.html'
-
-
-class ProducerDetailView(SlugMixin, DetailView):
-
- model = Organization
- template_name='projects/project_producer_detail.html'
-
-
-class ProducerListView(ListView):
-
- model = Organization
- template_name='projects/project_producer_list.html'
-
- def get_queryset(self):
- type, c = OrganizationType.objects.get_or_create(name='Producer')
- qs = Organization.objects.filter(type=type)
- return qs
-
-
-class ProducerCreateView(CreateWithInlinesView):
-
- model = Organization
- form_class = OrganizationForm
- template_name='projects/project_producer_create.html'
- inlines = [OrganizationContactInline, OrganizationUserImageInline]
-
- def forms_valid(self, form, inlines):
- self.object = form.save()
- self.object.type, c = OrganizationType.objects.get_or_create(name='Producer')
- self.object.save()
- return super(ProducerCreateView, self).forms_valid(form, inlines)
-
- def get_success_url(self):
- return reverse_lazy('organization-producer-detail', kwargs={'slug':self.slug})
-
-
-class ProjectResidencyDetailView(SlugMixin, DetailView):
-
- model = ProjectResidency
- template_name='projects/project_residency_detail.html'
-
-
-class ProjectResidencyListView(ListView):
-
- model = ProjectResidency
- template_name='projects/project_residency_list.html'
-
-
-class ProjectResidencyCreateView(CreateWithInlinesView):
-
- model = ProjectResidency
- form_class = ProjectResidencyForm
- template_name='projects/project_residency_create.html'
- inlines = []
diff --git a/app/organization/shop/__init__.py b/app/organization/shop/__init__.py
deleted file mode 100644
index fd4dd20f..00000000
--- a/app/organization/shop/__init__.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-"""
-Provides abstract models and admin features used throughout the various
-Mezzanine apps.
-"""
-from __future__ import unicode_literals
-
-from mezzanine import __version__ # noqa
-
-
-default_app_config = 'organization.shop.apps.ShopConfig'
diff --git a/app/organization/shop/admin.py b/app/organization/shop/admin.py
deleted file mode 100644
index cb5e6558..00000000
--- a/app/organization/shop/admin.py
+++ /dev/null
@@ -1,65 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from copy import deepcopy
-
-from django.contrib import admin
-from django.utils.translation import ugettext_lazy as _
-
-from mezzanine.core.admin import *
-
-from organization.core.admin import *
-from organization.projects.models import *
-from organization.pages.models import *
-from organization.shop.models import *
-
-from cartridge.shop.admin import *
-
-
-class ProductListProductInline(TabularDynamicInlineAdmin):
-
- model = ProductListProduct
-
-
-class ProductListAdmin(BaseTranslationOrderedModelAdmin):
-
- inlines = [ProductListProductInline, ]
- first_fields = ['title', 'description',]
-
-
-class ProductLinkInline(TabularDynamicInlineAdmin):
-
- model = ProductLink
-
-class ProductPrestashopProductInline(TabularDynamicInlineAdmin):
-
- model = ProductPrestashopProduct
-
-
-class CustomProductAdmin(ProductAdmin):
-
- inlines = [ProductImageAdmin, ProductVariationAdmin, ProductLinkInline,
- ProductPrestashopProductInline]
-
-
-admin.site.register(ProductList, ProductListAdmin)
-admin.site.unregister(Product)
-admin.site.register(Product, CustomProductAdmin)
diff --git a/app/organization/shop/apps.py b/app/organization/shop/apps.py
deleted file mode 100644
index 6616d28d..00000000
--- a/app/organization/shop/apps.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-
-from django.apps import AppConfig
-
-
-class ShopConfig(AppConfig):
-
- name = 'organization.shop'
- label = 'organization-shop'
diff --git a/app/organization/shop/management/__init__.py b/app/organization/shop/management/__init__.py
deleted file mode 100644
index 12176181..00000000
--- a/app/organization/shop/management/__init__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
diff --git a/app/organization/shop/management/commands/__init__.py b/app/organization/shop/management/commands/__init__.py
deleted file mode 100644
index 12176181..00000000
--- a/app/organization/shop/management/commands/__init__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
diff --git a/app/organization/shop/management/commands/organization-sync-prestashop-products.py b/app/organization/shop/management/commands/organization-sync-prestashop-products.py
deleted file mode 100644
index b9f9843e..00000000
--- a/app/organization/shop/management/commands/organization-sync-prestashop-products.py
+++ /dev/null
@@ -1,107 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from datetime import datetime, timedelta
-from optparse import make_option
-
-from django.conf import settings
-from django.core.management.base import BaseCommand, CommandError
-from django.contrib.auth.models import User
-from django.core.mail import EmailMessage
-
-from mezzanine.generic.models import AssignedKeyword, Keyword
-
-import organization.shop.models as os_models
-import prestashop.models as pa_models
-import cartridge.shop.models as ca_models
-
-
-class Command(BaseCommand):
- """Synchronize products from PrestaShop to cartridge.shop
-
- ex: python manage.py organization-sync-prestashop-products -c "Forumnet"
- """
-
- option_list = BaseCommand.option_list + (
- make_option('-c', '--category',
- dest='category_lang_name',
- help='define prestashop PsCategoryLang'),
- )
-
- default_user = User.objects.get(username='admin')
- languages = { 1 : {'code': 'en', 'names': ['english', 'anglais']},
- 2 : {'code': 'fr', 'names': ['french', 'français']},}
-
-
- def cleanup(self):
- for product in ca_models.ProductVariation.objects.all():
- product.delete()
- for product in ca_models.Product.objects.all():
- product.delete()
-
- def handle(self, *args, **kwargs):
- # !! NOT FOR PROD !!
- # self.cleanup()
-
- products = []
- category_lang_name = kwargs.get('category_lang_name')
-
- if not category_lang_name:
- for category in pa_models.PsCategoryLang.objects.all():
- print(category.name)
- return
-
- category_lang_name = kwargs.get('category_lang_name')
- category_lang = pa_models.PsCategoryLang.objects.filter(name=category_lang_name)[0]
- category = pa_models.PsCategory.objects.get(id_category=category_lang.id_category)
- category_products = pa_models.PsCategoryProduct.objects.filter(id_category=category.id_category)
-
- for category_product in category_products:
- try:
- products.append(pa_models.PsProduct.objects.get(id_product=category_product.id_product))
- except:
- continue
-
- for product in products:
- print('---------------------------')
- print(product.id_product)
-
- ca_product, c = ca_models.Product.objects.get_or_create(sku=product.reference)
- variation, c = ca_models.ProductVariation.objects.get_or_create(product=ca_product, default=True)
-
- product_langs = pa_models.PsProductLang.objects.filter(id_product=product.id_product)
- for product_lang in product_langs:
- if product_lang.id_lang in self.languages.keys():
- lang_code = self.languages[product_lang.id_lang]['code']
- print(product_lang.name, lang_code)
- setattr(ca_product, 'title' + '_' + lang_code, product_lang.name)
- setattr(ca_product, 'content' + '_' + lang_code, product_lang.description)
- if lang_code == 'en':
- slug = product_lang.link_rewrite
-
- ca_product.sku = product.reference
- ca_product.sale_price = product.price
- ca_product.status = 1
- ca_product.save()
-
- prestashop_product, c = os_models.ProductPrestashopProduct.objects.get_or_create(product=ca_product, external_id=product.id_product)
- prestashop_product.slug = slug
- prestashop_product.save()
diff --git a/app/organization/shop/migrations/0001_initial.py b/app/organization/shop/migrations/0001_initial.py
deleted file mode 100644
index fc64e2e9..00000000
--- a/app/organization/shop/migrations/0001_initial.py
+++ /dev/null
@@ -1,65 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-23 15:40
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- initial = True
-
- dependencies = [
- ('shop', '0008_auto_20160907_1726'),
- ('organization-pages', '0002_auto_20160914_1838'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='PageProductBlock',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='product_blocks', to='organization-pages.CustomPage', verbose_name='page')),
- ],
- options={
- 'verbose_name': 'product block',
- 'verbose_name_plural': 'product blocks',
- },
- ),
- migrations.CreateModel(
- name='ProductBlock',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('title', models.CharField(max_length=1024, verbose_name='title')),
- ('title_fr', models.CharField(max_length=1024, null=True, verbose_name='title')),
- ('title_en', models.CharField(max_length=1024, null=True, verbose_name='title')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ('style', models.CharField(choices=[('square', 'square'), ('circle', 'circle')], max_length=16, verbose_name='style')),
- ],
- options={
- 'verbose_name': 'product block',
- 'verbose_name_plural': 'product blocks',
- },
- ),
- migrations.CreateModel(
- name='ProductBlockProduct',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ('product', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='blocks', to='shop.Product', verbose_name='product')),
- ('product_block', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='products', to='organization-shop.ProductBlock', verbose_name='product block')),
- ],
- options={
- 'verbose_name': 'product',
- 'verbose_name_plural': 'products',
- 'ordering': ('_order',),
- },
- ),
- migrations.AddField(
- model_name='pageproductblock',
- name='product_block',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='pages', to='organization-shop.ProductBlock', verbose_name='product block'),
- ),
- ]
diff --git a/app/organization/shop/migrations/0002_auto_20160923_1749.py b/app/organization/shop/migrations/0002_auto_20160923_1749.py
deleted file mode 100644
index 6bf75a91..00000000
--- a/app/organization/shop/migrations/0002_auto_20160923_1749.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-23 15:49
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-shop', '0001_initial'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='pageproductblock',
- name='page',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='product_blocks', to='pages.Page', verbose_name='page'),
- ),
- ]
diff --git a/app/organization/shop/migrations/0003_productlink.py b/app/organization/shop/migrations/0003_productlink.py
deleted file mode 100644
index 3c13bd0f..00000000
--- a/app/organization/shop/migrations/0003_productlink.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-23 16:11
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-core', '0004_auto_20160923_1141'),
- ('shop', '0008_auto_20160907_1726'),
- ('organization-shop', '0002_auto_20160923_1749'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ProductLink',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('url', models.URLField(blank=True, max_length=512, verbose_name='URL')),
- ('link_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organization-core.LinkType', verbose_name='link type')),
- ('product', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='links', to='shop.Product', verbose_name='product')),
- ],
- options={
- 'verbose_name': 'link',
- 'verbose_name_plural': 'links',
- 'abstract': False,
- },
- ),
- ]
diff --git a/app/organization/shop/migrations/0004_auto_20160926_1144.py b/app/organization/shop/migrations/0004_auto_20160926_1144.py
deleted file mode 100644
index 7b7b78ed..00000000
--- a/app/organization/shop/migrations/0004_auto_20160926_1144.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-26 09:44
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-shop', '0003_productlink'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='productblock',
- name='content',
- field=mezzanine.core.fields.RichTextField(default='', verbose_name='Content'),
- preserve_default=False,
- ),
- migrations.AddField(
- model_name='productblock',
- name='content_en',
- field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Content'),
- ),
- migrations.AddField(
- model_name='productblock',
- name='content_fr',
- field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Content'),
- ),
- migrations.AddField(
- model_name='productblock',
- name='description_en',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- migrations.AddField(
- model_name='productblock',
- name='description_fr',
- field=models.TextField(blank=True, null=True, verbose_name='description'),
- ),
- ]
diff --git a/app/organization/shop/migrations/0005_auto_20160926_1230.py b/app/organization/shop/migrations/0005_auto_20160926_1230.py
deleted file mode 100644
index 91c5872e..00000000
--- a/app/organization/shop/migrations/0005_auto_20160926_1230.py
+++ /dev/null
@@ -1,91 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-26 10:30
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('shop', '0008_auto_20160907_1726'),
- ('pages', '0005_auto_20160923_1219'),
- ('organization-shop', '0004_auto_20160926_1144'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='PageProductList',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ],
- options={
- 'verbose_name': 'product list',
- 'verbose_name_plural': 'product lists',
- },
- ),
- migrations.CreateModel(
- name='ProductListProduct',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
- ],
- options={
- 'verbose_name': 'product',
- 'verbose_name_plural': 'products',
- 'ordering': ('_order',),
- },
- ),
- migrations.RenameModel(
- old_name='ProductBlock',
- new_name='ProductList',
- ),
- migrations.RemoveField(
- model_name='pageproductblock',
- name='page',
- ),
- migrations.RemoveField(
- model_name='pageproductblock',
- name='product_block',
- ),
- migrations.RemoveField(
- model_name='productblockproduct',
- name='product',
- ),
- migrations.RemoveField(
- model_name='productblockproduct',
- name='product_block',
- ),
- migrations.AlterModelOptions(
- name='productlist',
- options={'verbose_name': 'product list', 'verbose_name_plural': 'product lists'},
- ),
- migrations.DeleteModel(
- name='PageProductBlock',
- ),
- migrations.DeleteModel(
- name='ProductBlockProduct',
- ),
- migrations.AddField(
- model_name='productlistproduct',
- name='list',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='products', to='organization-shop.ProductList', verbose_name='product list'),
- ),
- migrations.AddField(
- model_name='productlistproduct',
- name='product',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='lists', to='shop.Product', verbose_name='product'),
- ),
- migrations.AddField(
- model_name='pageproductlist',
- name='list',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='pages', to='organization-shop.ProductList', verbose_name='product list'),
- ),
- migrations.AddField(
- model_name='pageproductlist',
- name='page',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='product_lists', to='pages.Page', verbose_name='page'),
- ),
- ]
diff --git a/app/organization/shop/migrations/0006_productprestashopproduct.py b/app/organization/shop/migrations/0006_productprestashopproduct.py
deleted file mode 100644
index e5500e78..00000000
--- a/app/organization/shop/migrations/0006_productprestashopproduct.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-20 08:51
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('shop', '0008_auto_20160907_1726'),
- ('organization-shop', '0005_auto_20160926_1230'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ProductPrestashopProduct',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('prestashop_id', models.IntegerField(verbose_name='prestashop id')),
- ('prestashop_slug', models.CharField(blank=True, max_length=255, null=True, verbose_name='slug')),
- ('prestashop_url', models.CharField(blank=True, max_length=512, null=True, verbose_name='relative url')),
- ('product', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='prestashop_products', to='shop.Product', verbose_name='prestashop product')),
- ],
- options={
- 'verbose_name': 'prestashop product',
- 'verbose_name_plural': 'prestashop products',
- },
- ),
- ]
diff --git a/app/organization/shop/migrations/0007_auto_20161020_2035.py b/app/organization/shop/migrations/0007_auto_20161020_2035.py
deleted file mode 100644
index daccc5cc..00000000
--- a/app/organization/shop/migrations/0007_auto_20161020_2035.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-20 18:35
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-shop', '0006_productprestashopproduct'),
- ]
-
- operations = [
- migrations.RenameField(
- model_name='productprestashopproduct',
- old_name='prestashop_slug',
- new_name='slug',
- ),
- migrations.RemoveField(
- model_name='productprestashopproduct',
- name='prestashop_id',
- ),
- migrations.RemoveField(
- model_name='productprestashopproduct',
- name='prestashop_url',
- ),
- migrations.AddField(
- model_name='productprestashopproduct',
- name='external_id',
- field=models.IntegerField(blank=True, null=True, verbose_name='external id'),
- ),
- migrations.AddField(
- model_name='productprestashopproduct',
- name='url',
- field=models.CharField(blank=True, max_length=512, null=True, verbose_name='url'),
- ),
- migrations.AlterField(
- model_name='productprestashopproduct',
- name='product',
- field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='prestashop_products', to='shop.Product', verbose_name='product'),
- ),
- ]
diff --git a/app/organization/shop/migrations/0008_productlink_title.py b/app/organization/shop/migrations/0008_productlink_title.py
deleted file mode 100644
index 204dff89..00000000
--- a/app/organization/shop/migrations/0008_productlink_title.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-21 11:19
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-shop', '0007_auto_20161020_2035'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='productlink',
- name='title',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- ]
diff --git a/app/organization/shop/migrations/0009_auto_20161026_1025.py b/app/organization/shop/migrations/0009_auto_20161026_1025.py
deleted file mode 100644
index 77401f5d..00000000
--- a/app/organization/shop/migrations/0009_auto_20161026_1025.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.10 on 2016-10-26 08:25
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organization-shop', '0008_productlink_title'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='productlink',
- name='title_en',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- migrations.AddField(
- model_name='productlink',
- name='title_fr',
- field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='title'),
- ),
- ]
diff --git a/app/organization/shop/migrations/__init__.py b/app/organization/shop/migrations/__init__.py
deleted file mode 100644
index e69de29b..00000000
diff --git a/app/organization/shop/models.py b/app/organization/shop/models.py
deleted file mode 100644
index dbd89dde..00000000
--- a/app/organization/shop/models.py
+++ /dev/null
@@ -1,88 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-
-from django.db import models
-from django.utils.translation import ugettext_lazy as _
-
-from mezzanine.core.models import RichText, Displayable, Slugged, Orderable
-from cartridge.shop.models import Product
-
-from organization.core.models import *
-
-
-PRODUCT_LIST_STYLE_CHOICES = [
- ('square', _('square')),
- ('circle', _('circle')),
-]
-
-
-class ProductList(Titled, RichText):
-
- style = models.CharField(_('style'), max_length=16, choices=PRODUCT_LIST_STYLE_CHOICES)
-
- class Meta:
- verbose_name = _("product list")
- verbose_name_plural = _("product lists")
-
- def __str__(self):
- return self.title
-
-
-class ProductListProduct(Orderable):
-
- list = models.ForeignKey(ProductList, verbose_name=_('product list'), related_name='products', blank=True, null=True, on_delete=models.SET_NULL)
- product = models.ForeignKey(Product, verbose_name=_('product'), related_name='lists', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _("product")
- verbose_name_plural = _("products")
-
-
-class PageProductList(models.Model):
-
- page = models.ForeignKey('pages.Page', verbose_name=_('page'), related_name='product_lists', blank=True, null=True, on_delete=models.SET_NULL)
- list = models.ForeignKey('organization-shop.ProductList', verbose_name=_('product list'), related_name='pages', blank=True, null=True, on_delete=models.SET_NULL)
-
- class Meta:
- verbose_name = _("product list")
- verbose_name_plural = _("product lists")
-
-
-class ProductLink(Link):
-
- product = models.ForeignKey(Product, verbose_name=_('product'), related_name='links', blank=True, null=True, on_delete=models.SET_NULL)
-
-
-class ProductPrestashopProduct(models.Model):
-
- product = models.OneToOneField(Product, verbose_name=_('product'), related_name='prestashop_products')
- external_id = models.IntegerField(verbose_name=_('external id'), null=True, blank=True)
- slug = models.CharField(max_length=255, verbose_name=_('slug'), null=True, blank=True)
- url = models.CharField(max_length=512, verbose_name=_('url'), null=True, blank=True)
-
- class Meta:
- verbose_name = _("prestashop product")
- verbose_name_plural = _("prestashop products")
-
- def __str__(self):
- return ' - '.join((self.product.title, str(self.external_id)))
diff --git a/app/organization/shop/tests.py b/app/organization/shop/tests.py
deleted file mode 100644
index fa8859d7..00000000
--- a/app/organization/shop/tests.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.test import TestCase
-
-# Create your tests here.
diff --git a/app/organization/shop/translation.py b/app/organization/shop/translation.py
deleted file mode 100644
index 801b0d88..00000000
--- a/app/organization/shop/translation.py
+++ /dev/null
@@ -1,55 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from modeltranslation.translator import translator, register, TranslationOptions
-
-from organization.shop.models import *
-
-
-
-@register(ProductList)
-class ProductListTranslationOptions(TranslationOptions):
-
- fields = ['title', 'description', 'content']
-
-
-@register(ProductListProduct)
-class ProductListProductTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(PageProductList)
-class PageProductListTranslationOptions(TranslationOptions):
-
- pass
-
-
-@register(ProductLink)
-class ProductLinkTranslationOptions(TranslationOptions):
-
- fields = ('title',)
-
-
-@register(ProductPrestashopProduct)
-class ProductPrestashopProductTranslationOptions(TranslationOptions):
-
- pass
diff --git a/app/organization/shop/urls.py b/app/organization/shop/urls.py
deleted file mode 100644
index 9efc42d4..00000000
--- a/app/organization/shop/urls.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-
-import django.views.i18n
-from django.conf.urls import patterns, include, url
-from django.conf.urls.i18n import i18n_patterns
-
-from mezzanine.core.views import direct_to_template
-from mezzanine.conf import settings
-
-from organization.shop.views import *
-
-urlpatterns = [
- url("^shop/", include("cartridge.shop.urls")),
-]
diff --git a/app/organization/shop/views.py b/app/organization/shop/views.py
deleted file mode 100644
index d5d25506..00000000
--- a/app/organization/shop/views.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from django.shortcuts import render
-
-from organization.projects.models import *
-from organization.core.views import *
diff --git a/app/organization/urls.py b/app/organization/urls.py
deleted file mode 100644
index c2943e5b..00000000
--- a/app/organization/urls.py
+++ /dev/null
@@ -1,45 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
-
-# This file is part of mezzanine-organization.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-
-import django.views.i18n
-from django.conf.urls import patterns, include, url
-from django.conf.urls.i18n import i18n_patterns
-from django.contrib import admin
-
-admin.autodiscover()
-
-from mezzanine.core.views import direct_to_template
-from mezzanine.conf import settings
-
-
-urlpatterns = [
- url("^", include('organization.core.urls')),
- url("^", include('organization.pages.urls')),
- url("^", include('organization.magazine.urls')),
- url("^", include('organization.media.urls')),
- url("^", include('organization.projects.urls')),
- url("^", include('organization.network.urls')),
- url("^", include('organization.agenda.urls')),
- url("^", include('organization.job.urls')),
- url("^", include('organization.shop.urls')),
-]
diff --git a/app/package.json b/app/package.json
new file mode 100644
index 00000000..cd0b125a
--- /dev/null
+++ b/app/package.json
@@ -0,0 +1,31 @@
+{
+ "name": "mezz-o",
+ "description": "mezz-o",
+ "version": "1.0",
+ "author": {
+ "name": "Bunker Palace",
+ "email": "devs@bunkerpalace.com"
+ },
+ "devDependencies": {
+ "browser-sync": "^2.11.1",
+ "gulp": "^3.9.1",
+ "gulp-autoprefixer": "^3.1.0",
+ "gulp-bower-files": "^0.2.7",
+ "gulp-browserify": "^0.5.1",
+ "gulp-compass": "^2.1.0",
+ "gulp-concat": "^2.6.0",
+ "gulp-copy": "0.0.2",
+ "gulp-cssnano": "^2.1.1",
+ "gulp-favicons": "^2.2.6",
+ "gulp-ignore": "^2.0.1",
+ "gulp-imagemin": "^2.4.0",
+ "gulp-plumber": "^1.1.0",
+ "gulp-rename": "^1.2.2",
+ "gulp-sourcemaps": "^1.6.0",
+ "gulp-uglify": "^1.5.2",
+ "gulp-util": "^3.0.7",
+ "rimraf": "^2.5.2",
+ "run-sequence": "^1.1.5"
+ },
+ "keywords": []
+}
diff --git a/app/requirements.txt b/app/requirements.txt
new file mode 100644
index 00000000..05f8196c
--- /dev/null
+++ b/app/requirements.txt
@@ -0,0 +1,12 @@
+setuptools
+uwsgi
+watchdog
+mysqlclient
+psycopg2
+
+-e git+https://github.com/yomguy/mezzanine.git@jquery#egg=mezzanine-4.2-dev
+-e git+https://github.com/yomguy/grappelli-safe.git@dynamic_stacked#egg=grappelli-safe-0.4.2
+-e git+https://github.com/yomguy/cartridge.git#egg=cartridge-0.12-dev
+-e git+https://github.com/yomguy/mezzanine-agenda.git#egg=mezzanine-agenda-0.2.2
+-e git+https://github.com/Ircam-Web/mezzanine-organization.git@split#egg=mezzanine-organization-1.0
+-e git+https://github.com/Ircam-Web/mezzanine-organization-themes.git#egg=mezzanine-organization-themes-1.0
diff --git a/app/templates/agenda/event/includes/event_card.html b/app/templates/agenda/event/includes/event_card.html
deleted file mode 100644
index e78cb3dd..00000000
--- a/app/templates/agenda/event/includes/event_card.html
+++ /dev/null
@@ -1,78 +0,0 @@
-{% extends "core/inc/generic_card.html" %}
-{% load i18n pages_tags mezzanine_tags media_tags organization_tags %}
-
-{% block metatitle %}
- {{ object.title }}
-{% endblock %}
-
-{% block title %}
- {{ object.title }}
-{% endblock %}
-
-{% block url %}
- {{ object.get_absolute_url }}
-{% endblock %}
-
-{% block image %}
- {% with object.images.all|get_type:'card' as images %}
- {% if images %}
-
-
-
- {% else %}
-
- {% if object.departments.first %}
- {% with object.departments.first as department %}
-
- {% endwith %}
- {% else %}
-
- {% endif %}
-
- {% endif %}
- {% endwith %}
-{% endblock %}
-
-{% block tags %}
-
- {% if object.departments.first %}
- {% with object.departments.first as department %}
-
- {{ department.department.name }}
-
- {% endwith %}
- {% endif %}
- {% if object.category %}
-
- {{ object.category|truncatechars:15 }}
-
- {% endif %}
-
-{% endblock %}
-
-{% block content %}
- {{ object.description|richtext_filters|safe|truncatechars_html:200 }}
-{% endblock %}
-
-{% block subtitle %}
-
- {% include 'agenda/includes/event_date_line.html' %}
-
- {% if object.location %}
- {{ object.location }}
- {% endif %}
-{% endblock %}
-
-{% block btn %}
- {% if object.prices.all.0|floatformat != '0' and object.prices.all|length > 0 %}
- {% if not object.is_full %}
- {% for price in object.prices.all %}
- {% if forloop.first %}
-
- {% endif %}
- {% endfor %}
- {% endif %}
- {% endif %}
-{% endblock %}
diff --git a/app/themes/__init__.py b/app/themes/__init__.py
deleted file mode 100644
index e69de29b..00000000
diff --git a/app/themes/base/__init__.py b/app/themes/base/__init__.py
deleted file mode 100644
index e69de29b..00000000
diff --git a/app/themes/base/static/admin/css/organization.css b/app/themes/base/static/admin/css/organization.css
deleted file mode 100644
index 8d5a827c..00000000
--- a/app/themes/base/static/admin/css/organization.css
+++ /dev/null
@@ -1,16 +0,0 @@
-/* Custom admin styles for mezzanine-organization */
-
-#tree {
- margin-top: 10px;
- width: 100%;
-}
-
-.yellow_button {
- display: inline-block;
- padding: 20px;
- background: yellow;
-}
-
-.select2-container {
- min-width: 70em;
-}
diff --git a/app/themes/base/static/src/assets/favicon/favicon.png b/app/themes/base/static/src/assets/favicon/favicon.png
deleted file mode 100644
index 9bacc522..00000000
Binary files a/app/themes/base/static/src/assets/favicon/favicon.png and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/blank.gif b/app/themes/base/static/src/assets/img/blank.gif
deleted file mode 100755
index f191b280..00000000
Binary files a/app/themes/base/static/src/assets/img/blank.gif and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/logo-ircam-white.png b/app/themes/base/static/src/assets/img/logo-ircam-white.png
deleted file mode 100644
index 25b17273..00000000
Binary files a/app/themes/base/static/src/assets/img/logo-ircam-white.png and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/logo-ircam.png b/app/themes/base/static/src/assets/img/logo-ircam.png
deleted file mode 100644
index 7110541b..00000000
Binary files a/app/themes/base/static/src/assets/img/logo-ircam.png and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/logo-manifest.png b/app/themes/base/static/src/assets/img/logo-manifest.png
deleted file mode 100644
index 7b364f57..00000000
Binary files a/app/themes/base/static/src/assets/img/logo-manifest.png and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/map-legend-blue.png b/app/themes/base/static/src/assets/img/map-legend-blue.png
deleted file mode 100644
index 87f2b183..00000000
Binary files a/app/themes/base/static/src/assets/img/map-legend-blue.png and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/map-legend-green.png b/app/themes/base/static/src/assets/img/map-legend-green.png
deleted file mode 100644
index 187c52ea..00000000
Binary files a/app/themes/base/static/src/assets/img/map-legend-green.png and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/map-legend-red.png b/app/themes/base/static/src/assets/img/map-legend-red.png
deleted file mode 100644
index 6e36da16..00000000
Binary files a/app/themes/base/static/src/assets/img/map-legend-red.png and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/map-marker-blue.png b/app/themes/base/static/src/assets/img/map-marker-blue.png
deleted file mode 100644
index 65bdc659..00000000
Binary files a/app/themes/base/static/src/assets/img/map-marker-blue.png and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/map-marker-green.png b/app/themes/base/static/src/assets/img/map-marker-green.png
deleted file mode 100644
index f954e13b..00000000
Binary files a/app/themes/base/static/src/assets/img/map-marker-green.png and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/map-marker-red.png b/app/themes/base/static/src/assets/img/map-marker-red.png
deleted file mode 100644
index db5fb27d..00000000
Binary files a/app/themes/base/static/src/assets/img/map-marker-red.png and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/partners/logo-cnrs.png b/app/themes/base/static/src/assets/img/partners/logo-cnrs.png
deleted file mode 100644
index 8386e987..00000000
Binary files a/app/themes/base/static/src/assets/img/partners/logo-cnrs.png and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/partners/logo-inria.png b/app/themes/base/static/src/assets/img/partners/logo-inria.png
deleted file mode 100644
index 5e23e27b..00000000
Binary files a/app/themes/base/static/src/assets/img/partners/logo-inria.png and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/partners/logo-ministere-culture.png b/app/themes/base/static/src/assets/img/partners/logo-ministere-culture.png
deleted file mode 100644
index c283cc3f..00000000
Binary files a/app/themes/base/static/src/assets/img/partners/logo-ministere-culture.png and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/partners/logo-upmc.png b/app/themes/base/static/src/assets/img/partners/logo-upmc.png
deleted file mode 100644
index 1a4c6161..00000000
Binary files a/app/themes/base/static/src/assets/img/partners/logo-upmc.png and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/patterns/circles.png b/app/themes/base/static/src/assets/img/patterns/circles.png
deleted file mode 100644
index 6de8cc6a..00000000
Binary files a/app/themes/base/static/src/assets/img/patterns/circles.png and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/patterns/squares.png b/app/themes/base/static/src/assets/img/patterns/squares.png
deleted file mode 100644
index 8745eba8..00000000
Binary files a/app/themes/base/static/src/assets/img/patterns/squares.png and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/patterns/stripes.png b/app/themes/base/static/src/assets/img/patterns/stripes.png
deleted file mode 100644
index cf5f62c3..00000000
Binary files a/app/themes/base/static/src/assets/img/patterns/stripes.png and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/patterns/triangles.png b/app/themes/base/static/src/assets/img/patterns/triangles.png
deleted file mode 100644
index ec4e8555..00000000
Binary files a/app/themes/base/static/src/assets/img/patterns/triangles.png and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/placeholder-media.png b/app/themes/base/static/src/assets/img/placeholder-media.png
deleted file mode 100644
index 24a01f45..00000000
Binary files a/app/themes/base/static/src/assets/img/placeholder-media.png and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/services/applications.jpg b/app/themes/base/static/src/assets/img/services/applications.jpg
deleted file mode 100644
index 5a141866..00000000
Binary files a/app/themes/base/static/src/assets/img/services/applications.jpg and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/services/forumnet.jpg b/app/themes/base/static/src/assets/img/services/forumnet.jpg
deleted file mode 100644
index c19514c1..00000000
Binary files a/app/themes/base/static/src/assets/img/services/forumnet.jpg and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/services/resources.jpg b/app/themes/base/static/src/assets/img/services/resources.jpg
deleted file mode 100644
index 2b75fa02..00000000
Binary files a/app/themes/base/static/src/assets/img/services/resources.jpg and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/services/tours.jpg b/app/themes/base/static/src/assets/img/services/tours.jpg
deleted file mode 100644
index 821711d9..00000000
Binary files a/app/themes/base/static/src/assets/img/services/tours.jpg and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/services/ulysses.jpg b/app/themes/base/static/src/assets/img/services/ulysses.jpg
deleted file mode 100644
index 96830d44..00000000
Binary files a/app/themes/base/static/src/assets/img/services/ulysses.jpg and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/vertigo-starts/vertigo_tx.png b/app/themes/base/static/src/assets/img/vertigo-starts/vertigo_tx.png
deleted file mode 100644
index 300e4fbf..00000000
Binary files a/app/themes/base/static/src/assets/img/vertigo-starts/vertigo_tx.png and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/vertigo/hero-left-date.png b/app/themes/base/static/src/assets/img/vertigo/hero-left-date.png
deleted file mode 100644
index 2cc7a1fc..00000000
Binary files a/app/themes/base/static/src/assets/img/vertigo/hero-left-date.png and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/vertigo/hero-left.png b/app/themes/base/static/src/assets/img/vertigo/hero-left.png
deleted file mode 100644
index 133d16a4..00000000
Binary files a/app/themes/base/static/src/assets/img/vertigo/hero-left.png and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/vertigo/hero-logo.png b/app/themes/base/static/src/assets/img/vertigo/hero-logo.png
deleted file mode 100644
index bc001b1b..00000000
Binary files a/app/themes/base/static/src/assets/img/vertigo/hero-logo.png and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/vertigo/hero-maps.jpg b/app/themes/base/static/src/assets/img/vertigo/hero-maps.jpg
deleted file mode 100644
index 2ddca359..00000000
Binary files a/app/themes/base/static/src/assets/img/vertigo/hero-maps.jpg and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/vertigo/hero-right.png b/app/themes/base/static/src/assets/img/vertigo/hero-right.png
deleted file mode 100644
index 8bf61c10..00000000
Binary files a/app/themes/base/static/src/assets/img/vertigo/hero-right.png and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/vertigo/hero-title.png b/app/themes/base/static/src/assets/img/vertigo/hero-title.png
deleted file mode 100644
index a5c85a31..00000000
Binary files a/app/themes/base/static/src/assets/img/vertigo/hero-title.png and /dev/null differ
diff --git a/app/themes/base/static/src/assets/img/vertigo/hero.jpg b/app/themes/base/static/src/assets/img/vertigo/hero.jpg
deleted file mode 100644
index bf24cb09..00000000
Binary files a/app/themes/base/static/src/assets/img/vertigo/hero.jpg and /dev/null differ
diff --git a/app/themes/base/static/src/js/index.js b/app/themes/base/static/src/js/index.js
deleted file mode 100644
index eae42937..00000000
--- a/app/themes/base/static/src/js/index.js
+++ /dev/null
@@ -1,49 +0,0 @@
-//
-// Require all the modules
-//
-var LangSelector = require('./modules/lang-selector');
-var RoleSelector = require('./modules/role-selector');
-var NavHeader = require('./modules/nav-header');
-var OpenButton = require('./modules/open-button');
-var CloseButton = require('./modules/close-button');
-var CloseEscape = require('./modules/close-escape');
-var Search = require('./modules/search');
-var Summary = require('./modules/summary');
-var OverflowInit = require('./modules/overflow-init');
-var StickyKitInit = require('./modules/sticky-kit-init');
-var LightSliderPageInit = require('./modules/lightsliderpage-init');
-var LightSliderHomeInit = require('./modules/lightsliderhome-init');
-var LightSliderNetworkInit = require('./modules/lightslidernetwork-init');
-var LightSliderPersonsInit = require('./modules/lightsliderpersons-init');
-var LightSliderRelatedInit = require('./modules/lightsliderrelated-init');
-var LazyLoadInit = require('./modules/lazyload-init');
-var HomeMenu = require('./modules/home-menu');
-var Audio = require('./modules/audio');
-var Video = require('./modules/video');
-var VideoOverlay = require('./modules/video-overlay');
-var Instagram = require('./modules/instagram');
-
-//
-// Init all the modules
-//
-window[LangSelector] = new LangSelector();
-window[RoleSelector] = new RoleSelector();
-window[NavHeader] = new NavHeader();
-window[OpenButton] = new OpenButton();
-window[CloseButton] = new CloseButton();
-window[CloseEscape] = new CloseEscape();
-window[Search] = new Search();
-window[Summary] = new Summary();
-window[OverflowInit] = new OverflowInit();
-window[StickyKitInit] = new StickyKitInit();
-window[LightSliderPageInit] = new LightSliderPageInit();
-window[LightSliderHomeInit] = new LightSliderHomeInit();
-window[LightSliderNetworkInit] = new LightSliderNetworkInit();
-window[LightSliderPersonsInit] = new LightSliderPersonsInit();
-window[LightSliderRelatedInit] = new LightSliderRelatedInit();
-window[LazyLoadInit] = new LazyLoadInit();
-window[HomeMenu] = new HomeMenu();
-window['Audio'] = new Audio();
-window['Video'] = new Video();
-window[VideoOverlay] = new VideoOverlay();
-window[Instagram] = new Instagram();
diff --git a/app/themes/base/static/src/js/modules/audio.js b/app/themes/base/static/src/js/modules/audio.js
deleted file mode 100644
index bea26e0c..00000000
--- a/app/themes/base/static/src/js/modules/audio.js
+++ /dev/null
@@ -1,128 +0,0 @@
-var Audio = function(context) {
-
- this.context = context || $('body');
-
- this.audios = [];
- this.playlists = [];
-
- //
- // Init
- //
- this.init();
-
-};
-
-Audio.prototype.init = function() {
-
- var that = this,
- as, i, playlist;
-
- audiojs.events.ready(function() {
-
- as = audiojs.createAll();
-
- for(i = 0; i');
- $(as[i].wrapper).append(as[i].title);
-
- as[i].element.onplay = function (e) {
- that.pauseAllExcept(this);
- };
-
- //
- // Future refs
- //
- that.audios.push(as[i]);
- that.playlists.push(playlist[0]);
-
- //
- // Set the trackEnded function
- //
- as[i].settings.trackEnded = function() {
-
- var idx, next, playlist;
-
- idx = that.audios.indexOf(this);
- playlist = that.playlists[idx];
-
- var next = playlist.find('li.playing').next();
- if (!next.length) next = playlist.find('li').first();
- next.addClass('playing').siblings().removeClass('playing');
- this.load($('a', next).attr('data-src'));
- this.play();
-
- };
-
- //
- // Load the first audio
- //
- var first = playlist.find('li a').attr('data-src');
- playlist.find('li').first().addClass('playing');
- that.setTitle(as[i], playlist.find('li:first-child a span').text(), playlist.find('li:first-child a small').text());
- as[i].load(first);
-
- playlist.find('li').bind('click', function(e) {
-
- var idx = that.playlists.indexOf($(this).parent().get(0));
-
- e.preventDefault();
- $(this).addClass('playing').siblings().removeClass('playing');
- that.audios[idx].load($('a', this).attr('data-src'));
- that.audios[idx].play();
- that.setTitle(that.audios[idx], $('a span', this).text(), $('a small', this).text());
-
- });
-
- }
-
- });
-
-};
-
-Audio.prototype.pauseAllExcept = function(audio) {
-
- var that = this,
- i = 0;
-
- for(i=0; i'+split[1]+' '
- }*/
-
- html += title;
-
- if(subtitle) {
- html += ''+subtitle+' ';
- }
-
- audio.title.html(html);
-
-};
-
-Audio.prototype.play = function(e) {
-
- this.audios[0].play();
-
-}
-
-module.exports = Audio;
diff --git a/app/themes/base/static/src/js/modules/close-button.js b/app/themes/base/static/src/js/modules/close-button.js
deleted file mode 100644
index c4e81dfb..00000000
--- a/app/themes/base/static/src/js/modules/close-button.js
+++ /dev/null
@@ -1,35 +0,0 @@
-var OpenButton = function() {
-
- //
- // Init
- //
- this.init();
-
-};
-
-OpenButton.prototype.init = function() {
-
- var that = this;
-
- $('[data-close-button]').click(that.open);
-
-};
-
-OpenButton.prototype.open = function(e) {
-
- e.preventDefault();
-
- var target = $(this).attr('data-close-button'),
- $target = $('[data-close-button-target="'+target+'"]');
-
- if($target.length > 0) {
-
- $target.removeClass('open');
-
- }
-
- return false;
-
-}
-
-module.exports = OpenButton;
diff --git a/app/themes/base/static/src/js/modules/close-escape.js b/app/themes/base/static/src/js/modules/close-escape.js
deleted file mode 100644
index b9068893..00000000
--- a/app/themes/base/static/src/js/modules/close-escape.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var CloseEscape = function() {
-
- this.$elements = $('[data-close-escape]');
-
- //
- // Init
- //
- this.init();
-
-};
-
-CloseEscape.prototype.init = function() {
-
- var that = this;
-
- $(document).keyup(function(e) {
-
- if(e.keyCode === 27) {
-
- that.$elements.removeClass('open');
-
- }
-
- });
-
-};
-
-module.exports = CloseEscape;
diff --git a/app/themes/base/static/src/js/modules/home-menu.js b/app/themes/base/static/src/js/modules/home-menu.js
deleted file mode 100644
index 95e6007b..00000000
--- a/app/themes/base/static/src/js/modules/home-menu.js
+++ /dev/null
@@ -1,42 +0,0 @@
-var HomeMenu = function() {
-
- //
- // Init
- //
- this.init();
-
- this.$menu = $('.home__menu-item');
-
-};
-
-HomeMenu.prototype.init = function() {
-
- var that = this,
- $elements = $('.home__menu-item a');
-
- $('.home__menu-item').hover(function() {
-
- $elements.removeClass('active');
- $(this).find('>a').addClass('active');
- $('.home__shutter').removeClass('active');
- $(this).find('.home__shutter').addClass('active');
-
- }, function() {
-
- $('.home__shutter').removeClass('active');
- $elements.removeClass('active');
- $($elements.get(0)).addClass('active');
-
- });
-
- /*$('.home__menu').bind('mouseleave', function() {
-
- $('.home__shutter').removeClass('active');
- $elements.removeClass('active');
- $($elements.get(0)).addClass('active');
-
- });*/
-
-};
-
-module.exports = HomeMenu;
diff --git a/app/themes/base/static/src/js/modules/instagram.js b/app/themes/base/static/src/js/modules/instagram.js
deleted file mode 100644
index 169b4389..00000000
--- a/app/themes/base/static/src/js/modules/instagram.js
+++ /dev/null
@@ -1,41 +0,0 @@
-var Instagram = function() {
-
- this.feed = null;
-
- //
- // Init
- //
- this.init();
-
-};
-
-Instagram.prototype.init = function() {
-
- var that = this;
-
- $('.instagram').lightSlider({
- item: 3,
- slideMargin: 0,
- pager: false,
- loop: true,
- auto: true,
- pauseOnHover: true,
- responsive: [
- {
- breakpoint: 752,
- settings: {
- item: 2
- }
- },
- {
- breakpoint: 480,
- settings: {
- item: 1
- }
- }
- ]
- });
-
-};
-
-module.exports = Instagram;
diff --git a/app/themes/base/static/src/js/modules/lang-selector.js b/app/themes/base/static/src/js/modules/lang-selector.js
deleted file mode 100644
index 23bbf447..00000000
--- a/app/themes/base/static/src/js/modules/lang-selector.js
+++ /dev/null
@@ -1,67 +0,0 @@
-var LangSelector = function() {
-
- this.$element = null;
- this.$elementMobile = null;
-
- //
- // Init
- //
- this.init();
-
-};
-
-LangSelector.prototype.init = function() {
-
- var that = this;
-
- that.$element = $('#langSelector');
- that.$element.find('li:first-child a').click(function(e) {
-
- e.preventDefault();
- that.$element.toggleClass('open');
-
- if(that.$element.hasClass('open')) {
-
- that.$element.one('mouseleave', function() {
- that.$element.removeClass('open');
- })
-
- }
-
- return false;
-
- });
-
- that.$element.find('li:not(:first-child) a').click(function(e) {
-
- e.preventDefault();
- that.changeLanguage($(this).attr('data-lang'));
- return false;
-
- });
-
- that.$elementMobile = $('#langSelectorMobile');
- that.$elementMobile.find('a').click(function(e) {
-
- e.preventDefault();
- that.changeLanguage($(this).attr('data-lang'));
- return false;
-
- });
-
- $('[data-lang]').click(function() {
-
- that.changeLanguage($(this).attr('data-lang'));
-
- });
-
-};
-
-LangSelector.prototype.changeLanguage = function(lang) {
-
- $('#language_selector_select').val(lang);
- $('#language_selector_form').submit();
-
-}
-
-module.exports = LangSelector;
diff --git a/app/themes/base/static/src/js/modules/lazyload-init.js b/app/themes/base/static/src/js/modules/lazyload-init.js
deleted file mode 100644
index b2ee77af..00000000
--- a/app/themes/base/static/src/js/modules/lazyload-init.js
+++ /dev/null
@@ -1,21 +0,0 @@
-var LazyLoadInit = function() {
-
- //
- // Init
- //
- this.init();
-
-};
-
-LazyLoadInit.prototype.init = function() {
-
- var that = this;
-
- $("img.lazyload").lazyload({
- effect : "fadeIn",
- container: $("main")
- });
-
-};
-
-module.exports = LazyLoadInit;
diff --git a/app/themes/base/static/src/js/modules/lightsliderhome-init.js b/app/themes/base/static/src/js/modules/lightsliderhome-init.js
deleted file mode 100644
index d5e412db..00000000
--- a/app/themes/base/static/src/js/modules/lightsliderhome-init.js
+++ /dev/null
@@ -1,45 +0,0 @@
-var LightSliderHomeInit = function() {
-
- //
- // Init
- //
- this.init();
-
-};
-
-LightSliderHomeInit.prototype.init = function() {
-
- var that = this;
-
- $('[data-slider-home]').lightSlider({
- item: 1,
- slideMargin: 0,
- pager: false,
- loop: true,
- auto: true,
- pauseOnHover: true,
- pause: 5000,
- onAfterSlide: function(slider) {
- var $pages = slider.parents('.slider-home').find('.slider-home__pager li');
- $pages.removeClass('active');
- $($pages[slider.getCurrentSlideCount()-1]).addClass('active');
- },
- onSliderLoad: function(slider) {
- var $pages = slider.parents('.slider-home').find('.slider-home__pager li');
- $pages.each(function(idx) {
- var that = $(this);
- that.click(function(e) {
- e.preventDefault();
- $pages.removeClass('active');
- that.addClass('active');
- slider.goToSlide(idx+1);
- return false;
- });
-
- });
- }
- });
-
-};
-
-module.exports = LightSliderHomeInit;
diff --git a/app/themes/base/static/src/js/modules/lightslidernetwork-init.js b/app/themes/base/static/src/js/modules/lightslidernetwork-init.js
deleted file mode 100644
index abc319ae..00000000
--- a/app/themes/base/static/src/js/modules/lightslidernetwork-init.js
+++ /dev/null
@@ -1,105 +0,0 @@
-var LightSliderNetworkInit = function() {
-
- this.slider = null;
- this.map = null;
- this.markers = [];
- this.currentLine = null;
- this.animationInterval = null;
-
- //
- // Init
- //
- this.init();
-
-};
-
-LightSliderNetworkInit.prototype.init = function() {
-
- var that = this;
-
- //
- // Slider init
- //
- /*that.slider = $('[data-slider-network]').lightSlider({
- item: 4,
- slideMargin: 10,
- pager: false,
- controls: false,
- loop: false,
- adaptiveHeight: true,
- onSliderLoad: function(elem) {
- elem.parents('.slider-network').find('.lSPrev').click(function(e) {
- elem.goToPrevSlide();
- });
- elem.parents('.slider-network').find('.lSNext').click(function(e) {
- elem.goToNextSlide();
- });
- },
- onBeforeSlide: function(elem) {
- if (that.currentLine) {
- that.currentLine.setMap(null);
- }
- }
- });*/
-
- //
- // Init map
- //
- if($('#network-map').length > 0) {
-
- that.map = new google.maps.Map(document.getElementById('network-map'), {
- zoom: 3,
- center: {lat: 48.85982, lng: 2.351402},
- //styles: [ { "featureType": "all", "elementType": "labels", "stylers": [ { "visibility": "off" } ] }, { "featureType": "administrative", "elementType": "labels.text", "stylers": [ { "visibility": "off" } ] }, { "featureType": "landscape", "elementType": "all", "stylers": [ { "color": "#6c8080" }, { "visibility": "simplified" } ] }, { "featureType": "landscape.man_made", "elementType": "geometry.fill", "stylers": [ { "lightness": "0" }, { "color": "#000f24" } ] }, { "featureType": "landscape.natural", "elementType": "geometry.fill", "stylers": [ { "lightness": "0" }, { "color": "#000f24" } ] }, { "featureType": "landscape.natural.landcover", "elementType": "geometry.fill", "stylers": [ { "saturation": "0" }, { "lightness": "0" }, { "color": "#000f24" } ] }, { "featureType": "landscape.natural.terrain", "elementType": "geometry.fill", "stylers": [ { "color": "#000f24" } ] }, { "featureType": "landscape.natural.terrain", "elementType": "geometry.stroke", "stylers": [ { "saturation": "0" }, { "lightness": "0" } ] }, { "featureType": "poi", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "road", "elementType": "all", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "road", "elementType": "labels.icon", "stylers": [ { "visibility": "off" } ] }, { "featureType": "road.highway", "elementType": "all", "stylers": [ { "color": "#d98080" }, { "hue": "#eeff00" }, { "lightness": 100 }, { "weight": 1.5 } ] }, { "featureType": "road.highway", "elementType": "labels", "stylers": [ { "visibility": "off" } ] }, { "featureType": "transit", "elementType": "labels", "stylers": [ { "visibility": "off" } ] } ]
- styles: [{"featureType":"all","elementType":"geometry","stylers":[{"color":"#ffffff"}]},{"featureType":"all","elementType":"labels.text.fill","stylers":[{"gamma":0.01},{"lightness":20}]},{"featureType":"all","elementType":"labels.text.stroke","stylers":[{"saturation":-31},{"lightness":-33},{"weight":2},{"gamma":0.8}]},{"featureType":"all","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"administrative.locality","elementType":"labels.text.fill","stylers":[{"color":"#050505"}]},{"featureType":"administrative.locality","elementType":"labels.text.stroke","stylers":[{"color":"#fef3f3"},{"weight":"3.01"}]},{"featureType":"administrative.neighborhood","elementType":"labels.text.fill","stylers":[{"color":"#0a0a0a"},{"visibility":"off"}]},{"featureType":"administrative.neighborhood","elementType":"labels.text.stroke","stylers":[{"color":"#fffbfb"},{"weight":"3.01"},{"visibility":"off"}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"lightness":30},{"saturation":30}]},{"featureType":"poi","elementType":"geometry","stylers":[{"saturation":20}]},{"featureType":"poi.attraction","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"poi.park","elementType":"geometry","stylers":[{"lightness":20},{"saturation":-20}]},{"featureType":"road","elementType":"geometry","stylers":[{"lightness":10},{"saturation":-30}]},{"featureType":"road","elementType":"geometry.stroke","stylers":[{"saturation":25},{"lightness":25}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"visibility":"on"},{"color":"#a1a1a1"}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#292929"}]},{"featureType":"road.highway","elementType":"labels.text.fill","stylers":[{"visibility":"on"},{"color":"#202020"}]},{"featureType":"road.highway","elementType":"labels.text.stroke","stylers":[{"visibility":"on"},{"color":"#ffffff"}]},{"featureType":"road.highway","elementType":"labels.icon","stylers":[{"visibility":"simplified"},{"hue":"#0006ff"},{"saturation":"-100"},{"lightness":"13"},{"gamma":"0.00"}]},{"featureType":"road.arterial","elementType":"geometry.fill","stylers":[{"visibility":"on"},{"color":"#686868"}]},{"featureType":"road.arterial","elementType":"geometry.stroke","stylers":[{"visibility":"off"},{"color":"#8d8d8d"}]},{"featureType":"road.arterial","elementType":"labels.text.fill","stylers":[{"visibility":"on"},{"color":"#353535"},{"lightness":"6"}]},{"featureType":"road.arterial","elementType":"labels.text.stroke","stylers":[{"visibility":"on"},{"color":"#ffffff"},{"weight":"3.45"}]},{"featureType":"road.local","elementType":"geometry.fill","stylers":[{"color":"#d0d0d0"}]},{"featureType":"road.local","elementType":"geometry.stroke","stylers":[{"lightness":"2"},{"visibility":"on"},{"color":"#999898"}]},{"featureType":"road.local","elementType":"labels.text.fill","stylers":[{"color":"#383838"}]},{"featureType":"road.local","elementType":"labels.text.stroke","stylers":[{"color":"#faf8f8"}]},{"featureType":"water","elementType":"all","stylers":[{"lightness":-20}]}]
- });
-
- google.maps.event.addListenerOnce(that.map, 'projection_changed', function() {
- that.initMarkers();
- });
-
- google.maps.event.addListener(that.map, 'zoom_changed', function() {
- if (that.map.getZoom() < 3) that.map.setZoom(3);
- });
-
- }
-
-};
-
-LightSliderNetworkInit.prototype.initMarkers = function() {
-
- var that = this;
-
- $('[data-marker-idx]').each(function(idx) {
-
- var obj = {
- 'lat': parseFloat($(this).attr('data-marker-lat').replace(',', '.')),
- 'lng': parseFloat($(this).attr('data-marker-lng').replace(',', '.')),
- 'elem': $(this),
- 'marker': new google.maps.Marker({
- position: {lat: parseFloat($(this).attr('data-marker-lat').replace(',', '.')), lng: parseFloat($(this).attr('data-marker-lng').replace(',', '.'))},
- map: that.map,
- icon: "/static/img/map-marker-" + $(this).attr('data-marker-color') + ".png"
- })
- };
-
- var info = new google.maps.InfoWindow({
- content: '' + $(this).find('[data-marker-title]').text() + '
' + $(this).find('[data-marker-subtitle]').text() + '
' + $(this).find('[data-marker-description]').text() + '
'
- });
-
- obj.info = info;
-
- obj.marker.addListener('click', function() {
- that.markers.forEach(function(m, i) {
- m.info.close();
- });
- info.open(that.map, obj.marker);
- });
-
- that.markers.push(obj);
-
- });
-
-};
-
-module.exports = LightSliderNetworkInit;
diff --git a/app/themes/base/static/src/js/modules/lightsliderpage-init.js b/app/themes/base/static/src/js/modules/lightsliderpage-init.js
deleted file mode 100644
index b9cc712f..00000000
--- a/app/themes/base/static/src/js/modules/lightsliderpage-init.js
+++ /dev/null
@@ -1,149 +0,0 @@
-var LightSliderPageInit = function() {
-
- this.elements = [];
-
- //
- // Init
- //
- this.init();
-
-};
-
-LightSliderPageInit.prototype.init = function() {
-
- var that = this,
- element,
- elements = $('[data-slider-page]');
-
- elements.each(function(idx) {
-
- element = {
- $element: $(this),
- attached: 1,
- slider: null,
- options: {
- autoWidth: true,
- item: 4,
- pager: false,
- responsive: [
- {
- breakpoint: 752,
- settings: {
- autoWidth: false,
- adaptiveHeight: true,
- item: 1
- }
- }
- ],
- onBeforeSlide: function(el) {
- $(el).find('video').each(function(i) {
- this.pause();
- });
- },
- onSliderLoad: function (el) {
-
- var maxHeight = 0,
- container = $(el),
- children = container.children();
-
- el.lightGallery({
- selector: '.slider-page .lslide',
- download: false
- });
-
- children.each(function () {
- var childHeight = $(this).height();
- if (childHeight > maxHeight) {
- maxHeight = childHeight;
- }
- });
- container.height(maxHeight);
- }
- }
- };
-
- that.elements.push(element);
-
- });
-
- elements.imagesLoaded( function() {
-
- that.windowResize();
- $(window).resize( $.throttle(1000, that.windowResize.bind(that)) );
-
- });
-
-};
-
-LightSliderPageInit.prototype.windowResize = function(e) {
-
- var that = this,
- windowWidth = $(window).width(),
- totalWidth, element;
-
- for(var i=0; i windowWidth) {
-
- that.attach(that.elements[i]);
-
- } else {
-
- that.detach(that.elements[i]);
-
- }
-
- }
-
-};
-
-LightSliderPageInit.prototype.attach = function(element) {
-
- var that = this,
- windowWidth = $(window).width(),
- totalWidth = 0;
-
- element.$element.find('li').each(function() {
- totalWidth += $(this).find('img').width();
- });
-
- if(element.attached !== true) {
- element.slider = element.$element.lightSlider(element.options);
- element.$element.removeClass('flexbox');
- element.attached = true;
- }
-
-};
-
-LightSliderPageInit.prototype.detach = function(element) {
-
- var that = this;
-
- if(element.attached !== false) {
- if(element.slider) {
- element.slider.destroy();
- element.$element.lightSlider = $.fn.lightSlider;
- }
- element.slider = null;
- element.$element.addClass('flexbox');
- element.attached = false;
- }
-
-};
-
-module.exports = LightSliderPageInit;
diff --git a/app/themes/base/static/src/js/modules/lightsliderpersons-init.js b/app/themes/base/static/src/js/modules/lightsliderpersons-init.js
deleted file mode 100644
index aaea7a0f..00000000
--- a/app/themes/base/static/src/js/modules/lightsliderpersons-init.js
+++ /dev/null
@@ -1,41 +0,0 @@
-var LightSliderPersonsInit = function() {
-
- this.feed = null;
-
- //
- // Init
- //
- this.init();
-
-};
-
-LightSliderPersonsInit.prototype.init = function() {
-
- var that = this;
-
- $('[data-slider-persons]').lightSlider({
- item: 2,
- slideMargin: 0,
- pager: false,
- loop: true,
- auto: true,
- pauseOnHover: true,
- responsive: [
- {
- breakpoint: 752,
- settings: {
- item: 2
- }
- },
- {
- breakpoint: 480,
- settings: {
- item: 1
- }
- }
- ]
- });
-
-};
-
-module.exports = LightSliderPersonsInit;
diff --git a/app/themes/base/static/src/js/modules/lightsliderrelated-init.js b/app/themes/base/static/src/js/modules/lightsliderrelated-init.js
deleted file mode 100644
index d24734ba..00000000
--- a/app/themes/base/static/src/js/modules/lightsliderrelated-init.js
+++ /dev/null
@@ -1,41 +0,0 @@
-var LightSliderRelatedInit = function() {
-
- this.slider = null;
-
- //
- // Init
- //
- this.init();
-
-};
-
-LightSliderRelatedInit.prototype.init = function() {
-
- var that = this;
-
- that.slider = $('[data-slider-related]').lightSlider({
- item: 1,
- slideMargin: 0,
- pager: false,
- loop: true,
- auto: false,
- pauseOnHover: true,
- responsive: [
- {
- breakpoint: 752,
- settings: {
- item: 1
- }
- },
- {
- breakpoint: 480,
- settings: {
- item: 1
- }
- }
- ]
- });
-
-};
-
-module.exports = LightSliderRelatedInit;
diff --git a/app/themes/base/static/src/js/modules/live-streaming-counter.js b/app/themes/base/static/src/js/modules/live-streaming-counter.js
deleted file mode 100644
index 94270dd7..00000000
--- a/app/themes/base/static/src/js/modules/live-streaming-counter.js
+++ /dev/null
@@ -1,145 +0,0 @@
-
-function switchVideo(id, url) {
- var video = $('#'+id);
- video.attr("src", url);
-}
-
-
-function failed(e) {
- // video playback failed - show a message saying why
- switch (e.target.error.code) {
- case e.target.error.MEDIA_ERR_ABORTED:
- alert('You aborted the video playback.');
- break;
- case e.target.error.MEDIA_ERR_NETWORK:
- alert('A network error caused the video download to fail part-way.');
- break;
- case e.target.error.MEDIA_ERR_DECODE:
- alert('The video playback was aborted due to a corruption problem or because the video used features your browser did not support.');
- break;
- case e.target.error.MEDIA_ERR_SRC_NOT_SUPPORTED:
- alert('The video could not be loaded, either because the server or network failed or because the format is not supported.');
- break;
- default:
- alert('An unknown error occurred.');
- break;
- }
-}
-
-
-function cleanCounter(timer) {
- clearInterval(timer);
- $('#countdown-title').html(' ');
- $('#countdown').html(' ');
- $('.countdown-overlay').show();
-}
-
-function CountDownTimer(json_event, id, video_id, video_container)
- {
-
- var curr_event;
- var begin;
- var end;
- var curr_event_index = 0;
- var _second = 1000;
- var _minute = _second * 60;
- var _hour = _minute * 60;
- var _day = _hour * 24;
- var timer;
- var distance_out = 1;
- var distance_in = 1;
- var video_html;
-
- function init() {
-
- if (Object.keys(json_event).length > 0 ) {
- curr_event = json_event[curr_event_index];
- begin = moment(new Date(curr_event.begin));
- end = moment(new Date(curr_event.end)).add(30, 'm');
- timer = setInterval(start, 1000);
- } else {
- cleanCounter(timer);
- }
- }
-
- function showRemaining() {
- var now = moment().tz("Europe/Paris").format();
- var distance_out = begin.diff(now);
- updateDisplay(distance_out);
- if (distance_out < 0) {
- if ($(video_container).is(':empty')){
- $(video_container).html(video_html);
- }
- $('.countdown-overlay').hide();
- hideRemaining();
- distance_out = 0;
- }
-
- }
-
- function hideRemaining() {
- var now = moment().tz("Europe/Paris").format();
- var distance_in = end.diff(now);
- if (distance_in < 0) {
- nextEvent();
- showRemaining();
- if (! $(video_container).is(':empty')){
- $(video_container).empty();
- }
- $('.countdown-overlay').show();
- distance_in = 0;
- }
- }
-
- function nextEvent() {
- curr_event_index++;
- if (curr_event_index >= Object.keys(json_event).length ) {
- cleanCounter(timer);
- } else {
- init();
- }
- }
-
- function updateDisplay(time_remaining)Â {
-
- $('#countdown-title').html('Prochain évènement :'+ curr_event.title+' Retransmission dans :');
-
- var days = Math.floor(time_remaining / _day);
- var hours = Math.floor((time_remaining % _day) / _hour);
- var minutes = Math.floor((time_remaining % _hour) / _minute);
- var seconds = Math.floor((time_remaining % _minute) / _second);
-
- document.getElementById(id).innerHTML = days + 'jours ';
- document.getElementById(id).innerHTML += hours + 'hrs ';
- document.getElementById(id).innerHTML += minutes + 'mins ';
- document.getElementById(id).innerHTML += seconds + 'secs';
- }
-
- function start() {
- // out of event
- if (distance_out > 0) {
- showRemaining();
- }
-
- // meanwhile an event
- if (distance_in > 0) {
- hideRemaining();
- }
-
- }
-
- // initialize
- video_html = $(video_container).html();
- $(video_container).empty();
- init();
- }
-
-
-jQuery.fn.center = function () {
- this.css("position","absolute");
- this.css("top", Math.max(0, (($(window).height() - $(this).outerHeight()) / 2) +
- $(window).scrollTop()) + "px");
- this.css("left", Math.max(0, (($(window).width() - $(this).outerWidth()) / 2) +
- $(window).scrollLeft()) + "px");
- return this;
-}
diff --git a/app/themes/base/static/src/js/modules/nav-header.js b/app/themes/base/static/src/js/modules/nav-header.js
deleted file mode 100644
index fde9e79e..00000000
--- a/app/themes/base/static/src/js/modules/nav-header.js
+++ /dev/null
@@ -1,39 +0,0 @@
-var NavHeader = function() {
-
- this.$element = $('#navHeader');
- this.$elements = $('#navHeader .nav-header__item');
-
- //
- // Init
- //
- this.init();
-
-};
-
-NavHeader.prototype.init = function() {
-
- var that = this;
-
- that.$elements.hover(function(e) {
-
- var $submenu = $(this).find('.nav-header__submenu');
-
- if($submenu.length > 0) {
-
- var offsetLeft = $(this).position().left,
- originOffsetLeft = $('#navHeader .nav-header__item:first-child').position().left + 100,
- originWidth = that.$element.width();
-
- $(this).toggleClass('hover');
-
- $submenu.css('left', -offsetLeft + originOffsetLeft);
- $submenu.css('width', originWidth - 200);
- $submenu.toggle();
-
- }
-
- });
-
-};
-
-module.exports = NavHeader;
diff --git a/app/themes/base/static/src/js/modules/open-button.js b/app/themes/base/static/src/js/modules/open-button.js
deleted file mode 100644
index 5a3f49eb..00000000
--- a/app/themes/base/static/src/js/modules/open-button.js
+++ /dev/null
@@ -1,35 +0,0 @@
-var CloseButton = function() {
-
- //
- // Init
- //
- this.init();
-
-};
-
-CloseButton.prototype.init = function() {
-
- var that = this;
-
- $('[data-open-button]').click(that.close);
-
-};
-
-CloseButton.prototype.close = function(e) {
-
- e.preventDefault();
-
- var target = $(this).attr('data-open-button'),
- $target = $('[data-open-button-target="'+target+'"]');
-
- if($target.length > 0) {
-
- $target.addClass('open');
-
- }
-
- return false;
-
-}
-
-module.exports = CloseButton;
diff --git a/app/themes/base/static/src/js/modules/overflow-init.js b/app/themes/base/static/src/js/modules/overflow-init.js
deleted file mode 100644
index 4538853e..00000000
--- a/app/themes/base/static/src/js/modules/overflow-init.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var OverflowInit = function() {
-
- //
- // Init
- //
- this.init();
-
-};
-
-OverflowInit.prototype.init = function() {
-
- var that = this;
-
- Overflow.initialize({
- selector: '[data-overflow]'
- });
-
- Overflow.initialize({
- selector: 'hr'
- });
-
-};
-
-module.exports = OverflowInit;
diff --git a/app/themes/base/static/src/js/modules/role-selector.js b/app/themes/base/static/src/js/modules/role-selector.js
deleted file mode 100644
index 1e9f29a2..00000000
--- a/app/themes/base/static/src/js/modules/role-selector.js
+++ /dev/null
@@ -1,52 +0,0 @@
-var RoleSelector = function() {
-
- this.$element = null;
-
- //
- // Init
- //
- this.init();
-
-};
-
-RoleSelector.prototype.init = function() {
-
- var that = this;
-
- that.$element = $('.role-switcher');
-
- that.$element.find('li:first-child a').click(function(e) {
-
- e.preventDefault();
-
- that.$element.toggleClass('open');
-
- if(that.$element.hasClass('open')) {
-
- that.$element.one('mouseleave', function() {
- that.$element.removeClass('open');
- })
-
- }
-
- return false;
-
- });
-
- that.$element.find('li:not(:first-child) a').click(function(e) {
-
- e.preventDefault();
- that.changeUrl($(this).attr('data-url'));
- return false;
-
- });
-
-};
-
-RoleSelector.prototype.changeUrl = function(lang) {
-
- window.location.href = lang;
-
-}
-
-module.exports = RoleSelector;
diff --git a/app/themes/base/static/src/js/modules/search.js b/app/themes/base/static/src/js/modules/search.js
deleted file mode 100644
index fa37f731..00000000
--- a/app/themes/base/static/src/js/modules/search.js
+++ /dev/null
@@ -1,34 +0,0 @@
-var Search = function() {
-
- this.$element = $('[data-search-button]');
- this.$search = $('#search');
- this.$searchInput = this.$search.find('input[type="text"]');
-
- //
- // Init
- //
- this.init();
-
-};
-
-Search.prototype.init = function() {
-
- var that = this;
-
- that.$element = $('[data-search-button]');
- that.$search = $('#search');
-
- that.$element.click(function(e) {
-
- e.preventDefault();
-
- that.$searchInput.focus();
-
- return false;
-
- });
-
-
-};
-
-module.exports = Search;
diff --git a/app/themes/base/static/src/js/modules/sticky-kit-init.js b/app/themes/base/static/src/js/modules/sticky-kit-init.js
deleted file mode 100644
index d6351708..00000000
--- a/app/themes/base/static/src/js/modules/sticky-kit-init.js
+++ /dev/null
@@ -1,149 +0,0 @@
-var StickyKitInit = function() {
-
- this.elements = [];
- this.pageContentTop = -1;
- this.pageContentBottom = -1;
-
- //
- // Init
- //
- this.init();
-
-};
-
-StickyKitInit.prototype.init = function() {
-
- var that = this,
- options = {},
- data, element, $element;
-
- var sliders = $('.page__slider');
- if(sliders.length > 0) {
- that.pageContentTop = $(sliders[0]).offset().top - 72;
- that.pageContentBottom = that.pageContentTop + (sliders.length * 724) + 72;
- }
-
- $('[data-sticky]').each(function(i) {
-
- $element = $(this);
- $element.on('sticky_kit:bottom', function(e) {
- var $self = $(this);
- $(this).parent().parent().css('position', 'static');
- $(this).parent().css('position', 'static');
- $(this).addClass('to-bottom');
- })
- .on('sticky_kit:unbottom', function(e) {
- $(this).parent().parent().css('position', 'relative');
- $(this).parent().css('position', 'relative');
- $(this).removeClass('to-bottom');
- });
-
- data = $(this).data();
-
- if(data.stickyOffset) {
- options.offset_top = data.stickyOffset;
- }
- if(data.stickyParent) {
- options.parent = '.' + data.stickyParent;
- }
-
- element = {
- $element: $(this),
- options: options,
- data: $(this).data(),
- attached: false
- };
- that.elements.push(element);
- that.attach(element);
-
- });
-
- $(window).resize( $.throttle(1000, that.windowResize.bind(that)) );
- $(window).scroll( that.windowScroll.bind(that) );
- that.windowScroll();
-
-};
-
-StickyKitInit.prototype.windowScroll = function(e) {
-
- var that = this;
-
- if(that.pageContentTop >= 0 && that.pageContentBottom >= 0) {
- for(var i=0; i= (that.pageContentTop - height) && top < (that.pageContentBottom)) {
- that.elements[i].$element.addClass('faded');
- } else {
- console.log('remove');
- that.elements[i].$element.removeClass('faded');
- }
-
- }
-
- }
- }
-
-};
-
-StickyKitInit.prototype.windowResize = function(e) {
-
- var that = this,
- windowWidth = $(window).width();
-
- for(var i=0; i that.elements[i].data.stickyDetachAt && !that.elements[i].attached) {
- that.attach(that.elements[i]);
- }
-
- if(windowWidth <= that.elements[i].data.stickyDetachAt && that.elements[i].attached) {
- that.detach(that.elements[i]);
- }
-
- }
-
- }
-
-};
-
-StickyKitInit.prototype.attach = function(element) {
-
- var that = this;
-
- if(element.data.stickyDetachAt) {
-
- var $window = $(window);
-
- //
- // Attach if window width is larger
- //
- if($window.width() > element.data.stickyDetachAt) {
-
- element.$element.stick_in_parent(element.options);
- element.attached = true;
-
- }
-
- } else {
-
- element.$element.stick_in_parent(element.options);
- element.attached = true;
-
- }
-
-};
-
-StickyKitInit.prototype.detach = function(element) {
-
- element.$element.trigger("sticky_kit:detach");
- element.attached = false;
-
-};
-
-module.exports = StickyKitInit;
diff --git a/app/themes/base/static/src/js/modules/summary.js b/app/themes/base/static/src/js/modules/summary.js
deleted file mode 100644
index ae0a8b5a..00000000
--- a/app/themes/base/static/src/js/modules/summary.js
+++ /dev/null
@@ -1,129 +0,0 @@
-var Summary = function() {
-
- this.$summary = $('[data-summary]');
- this.$content = $('[data-summary-content]');
- this.$links = [];
-
- //
- // Init
- //
- this.init();
-
-};
-
-Summary.prototype.init = function() {
-
- var that = this,
- $template, sectionCount = 0;
-
- if(that.$summary.length == 1 && that.$content.length > 0) {
-
- $template = that.$summary.find('li:first-child');
- that.$content.each(function(idx) {
-
- $(this).find('h2:not(.page-box__title)').each(function(idx) {
-
- var $element = $(this),
- $template_clone = $template.clone();
-
- $template_clone.find('a').text($element.text());
- $template_clone.find('a').attr('href', '#section-' + sectionCount);
- $template_clone.removeClass('hide');
-
- $template_clone.find('a').bind('click', function(e) {
-
- e.preventDefault();
- var self = $(this);
- $('html, body').animate({
- scrollTop:$(self.attr('href')).offset().top
- }, 'slow');
- return false;
-
- });
-
- that.$links.push($template_clone.find('a'));
-
- that.$summary.append($template_clone);
-
- $element.attr('id', "section-" + sectionCount);
- sectionCount++;
-
- $element.waypoint(function(direction) {
- that.$links.forEach(function (elem) {
- elem.removeClass('active');
- });
- $('[href="#' + $(this.element).attr('id') + '"]').addClass('active');
- }, {
- offset: '200'
- });
-
- $element.waypoint(function(direction) {
- that.$links.forEach(function (elem) {
- elem.removeClass('active');
- });
- var sectionNumber = parseInt($(this.element).attr('id').substr(8));
- sectionNumber--;
- console.log(sectionNumber);
- $('[href="#section-' + sectionNumber + '"]').addClass('active');
- }, {
- offset: '50%'
- });
-
- });
-
- });
-
- $template.remove();
-
- // Scrollspy
- //$(document).on("scroll", that.onScroll.bind(that));
-
- // Row height
- if($('.page__sidebar .nav-tree--level-0').height() > $('.page__content').height()) {
-
- $('.page__content').css({
- 'margin-bottom': $('.page__sidebar .nav-tree--level-0').height() - $('.page__content').height() + 48
- });
-
- }
-
- }
-
-};
-
-Summary.prototype.onScroll = function(e) {
-
- var scrollPos = $(document).scrollTop(),
- that = this,
- currentTitle, minDiff = 200;
-
- that.$links.forEach(function (elem) {
- var currLink = elem;
- var refElement = $(elem.attr("href"));
- var diff = refElement.offset().top - scrollPos;
- if(diff < minDiff && diff < 200) {
- minDiff = diff;
- currentTitle = refElement;
- }
- if (refElement.position().top <= scrollPos) {
- that.$links.forEach(function (elem) {
- elem.removeClass('active');
- });
- currLink.addClass("active");
- }
- else{
- currLink.removeClass("active");
- }
- });
-
- that.$links.forEach(function (elem) {
- elem.removeClass('active');
- });
-
- if(currentTitle) {
- $('[href="#' + currentTitle.attr('id') + '"]').addClass('active');
- }
-
-};
-
-module.exports = Summary;
diff --git a/app/themes/base/static/src/js/modules/video-overlay.js b/app/themes/base/static/src/js/modules/video-overlay.js
deleted file mode 100644
index d4cff613..00000000
--- a/app/themes/base/static/src/js/modules/video-overlay.js
+++ /dev/null
@@ -1,99 +0,0 @@
-var Audio = require('./audio');
-var Video = require('./video');
-
-var VideoOverlay = function() {
-
- this.$overlay = $('#overlay');
- this.$overlayContent = $('#overlayContent');
- this.$overlayClose = $('#overlayClose');
- this.$overlayLoader = $('#overlayLoader');
-
- this.player = null;
- this.type = null;
-
- //
- // Init
- //
- this.init();
-
-};
-
-VideoOverlay.prototype.init = function() {
-
- var that = this;
-
- $(document).keyup(function(e) {
-
- if(e.keyCode === 27) {
-
- that.closeOverlay();
-
- }
-
- });
-
- that.$overlayClose.bind('click', function(e) {
-
- e.preventDefault();
-
- that.closeOverlay();
-
- return false;
-
- });
-
- $('[data-video-overlay]').click(function(e) {
- e.preventDefault();
-
- that.$overlayLoader.show();
- that.openOverlay(this.href);
-
- return false;
- });
-
-};
-
-VideoOverlay.prototype.openOverlay = function(url) {
-
- var that = this;
-
- that.$overlay.addClass('open');
-
- that.$overlayContent.load(url, function() {
-
- if($('video', that.$overlay).length > 0) {
- that.player = new Video(that.$overlay);
- that.type = 'video';
- } else {
- that.player = new Audio(that.$overlay);
- that.type = 'audio';
- }
-
- setTimeout(function() {
- that.player.play();
- that.$overlayLoader.hide();
- that.$overlayContent.addClass('loaded');
- }, 2000);
-
- });
-
-};
-
-VideoOverlay.prototype.closeOverlay = function(url) {
-
- var that = this;
-
- that.$overlayContent.removeClass('loaded');
- setTimeout(function() {
- if(that.type == 'video') {
- that.player.player.dispose();
- } else {
-
- }
- that.$overlayContent.html('');
- that.$overlay.removeClass('open');
- }, 1000);
-
-};
-
-module.exports = VideoOverlay;
diff --git a/app/themes/base/static/src/js/modules/video.js b/app/themes/base/static/src/js/modules/video.js
deleted file mode 100644
index 9ec4175f..00000000
--- a/app/themes/base/static/src/js/modules/video.js
+++ /dev/null
@@ -1,78 +0,0 @@
-var Video = function(context) {
-
- this.player = null;
- this.context = context || $('body');
-
- //
- // Init
- //
- if($('#video-js-playlist', this.context).length > 0) {
- this.init();
- }
-
-};
-
-Video.prototype.init = function() {
-
- var that = this;
-
- if(that.player) {
- that.player.dispose();
- }
-
- that.player = videojs('video-js-playlist', {
- aspectRatio:"905:520"
- });
-
- var playlist = [];
- $('.video-playlist li a').each(function(idx) {
-
- var elem = $(this);
-
- var srcs = elem.attr('data-src').split(',');
- var mimes = elem.attr('data-mime').split(',');
- var obj = {
- sources: [],
- poster: elem.attr('data-poster')
- };
-
- for(var i=0; i{
- // imageTexture=texture;
- // imageTexture.addEventListener('resize',()=>{
- // let textureCanvas=texture.canvas;
- // let ctx=imageTextureBg.getContext('2d');
- //
- // imageTextureBg.width=textureCanvas.width;
- // imageTextureBg.height=textureCanvas.height;
- //
- // ctx.drawImage(textureCanvas,0,0);
- //
- // drawOverBG();
- // })
- // });
- //
- // (function(){
- // let titleCanvas=document.querySelector('.Content-title');
- // let titleImage=new Image();
- // titleImage.addEventListener('load',event=>{
- // titleCanvas.width=titleImage.width;
- // titleCanvas.height=titleImage.height;
- // let ctx=titleCanvas.getContext('2d');
- // ctx.drawImage(titleImage,0,0);
- // });
- // titleImage.src='img/air-travel-title.svg';
- // }())
-
- haze.gl.createUniform('2f', 'mouse', 0.5, 0.5);
-
- var smooth = function smooth() {
- var n = arguments.length <= 0 || arguments[0] === undefined ? 6 : arguments[0];
-
- var samples = [];
- return function (v) {
- samples = samples.concat(v);
- if (samples.length > n) {
- samples = samples.slice(samples.length - n, samples.length);
- }
- return samples.reduce(function (l, cur) {
- return l + cur;
- }) / samples.length;
- };
- };
-
- var curve = function curve(v) {
- var p = arguments.length <= 1 || arguments[1] === undefined ? 0.8 : arguments[1];
- return v == 0 ? 0 : Math.pow(Math.abs(v), p) * (v / Math.abs(v));
- };
-
- var smoothX = smooth();
- var smoothY = smooth();
-
- var isTouchDevice = 'ontouchstart' in document.documentElement;
-
- var parallaxPos = {
- _x: 0,
- _y: 0,
- _willUpdate: false,
- get x() {
- return this._x;
- },
- set x(v) {
- this._x = v;
- this.updatePos();
- },
- get y() {
- return this._y;
- },
- set y(v) {
- this._y = v;
- this.updatePos();
- },
- updatePos: function updatePos() {
- var _this = this;
-
- if (this._willUpdate) return;
- this._willUpdate = true;
-
- requestAnimationFrame(function () {
- _this._willUpdate = false;
- haze.gl.createUniform('2f', 'mouse', -(-1 + _this.x * 2), -(-1 + _this.y * 2));
- });
- }
- };
- window.addEventListener('mousemove', function (event) {
- if (!isTouchDevice) {
- _gsap2.default.to(parallaxPos, 1, {
- x: event.pageX / window.innerWidth,
- y: event.pageY / window.innerHeight
- });
- }
- });
-
- // window.addEventListener('devicemotion',function(event){
- // if(isTouchDevice){
- // parallaxPos.x=curve(smoothX(-event.accelerationIncludingGravity.x/10))*12;
- // parallaxPos.y=curve(smoothY(-event.accelerationIncludingGravity.y/10))*3;
- // }
- // });
- function getDPI() {
- if (typeof window.devicePixelRatio != "undefined") {
- return window.devicePixelRatio;
- } else {
- return 1;
- }
- }
- window.addEventListener('resize', updateSize);
- function updateSize() {
- var container = document.querySelector('.Background');
- var dimensions = container.getBoundingClientRect();
- haze.width = dimensions.width;
- haze.height = dimensions.height;
- haze.dpi = getDPI();
- haze.gl.createUniform('1f', 'dpi', haze.dpi);
- haze.gl.createUniform('2f', 'resolution', haze.width * haze.dpi, haze.height * haze.dpi);
- }
- updateSize();
-
-/***/ },
-/* 1 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.createCanvas = createCanvas;
-
- var _curry = __webpack_require__(2);
-
- var _curry2 = _interopRequireDefault(_curry);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
-
- exports.default = function (width, height) {
- var dpiAware = arguments.length <= 2 || arguments[2] === undefined ? true : arguments[2];
-
- var object = {
- _width: width,
- _height: height,
- dpi: 1,
- canvas: null,
- ctx: null,
- appendTo: function appendTo(obj) {
- if (typeof obj == 'string') obj = document.querySelector(obj);
- obj.appendChild(this.canvas);
- return this;
- },
-
- set fillStyle(v) {
- this.ctx.fillStyle = v;
- },
- get fillStyle() {
- return this.ctx.fillStyle;
- },
- setFillStyle: function setFillStyle(v) {
- this.fillStyle = v;
- return this;
- },
- setFill: function setFill(v) {
- return this.setFillStyle(v);
- },
-
- set strokeStyle(v) {
- this.ctx.strokeStyle = v;
- },
- get strokeStyle() {
- return this.ctx.strokeStyle;
- },
- setStrokeStyle: function setStrokeStyle(v) {
- this.strokeStyle = v;
- return this;
- },
- setStroke: function setStroke(v) {
- return this.setStrokeStyle(v);
- },
-
- set lineCap(v) {
- this.ctx.lineCap = v;
- },
- get lineCap() {
- return this.ctx.lineCap;
- },
- setLineCap: function setLineCap(v) {
- this.lineCap = v;
- return this;
- },
-
- set lineWidth(v) {
- this.ctx.lineWidth = v;
- },
- get lineWidth() {
- return this.ctx.lineWidth;
- },
- setLineWidth: function setLineWidth(v) {
- this.lineWidth = v;
- return this;
- },
-
- set globalAlpha(v) {
- this.ctx.globalAlpha = v;
- },
- get globalAlpha() {
- return this.ctx.globalAlpha;
- },
- setGlobalAlpha: function setGlobalAlpha(v) {
- this.globalAlpha = v;
- return this;
- },
- alpha: function alpha(v) {
- return this.setGlobalAlpha(v);
- },
-
- get width() {
- return this._width;
- },
- set width(v) {
- this.canvas.setAttribute('width', v * this.dpi);
- this.canvas.style.width = v + 'px';
- this._width = v;
- },
- get height() {
- return this._height;
- },
- set height(v) {
- this.canvas.setAttribute('height', v * this.dpi);
- this.canvas.style.height = v + 'px';
- this._height = v;
- },
- clear: function clear() {
- this.clearRect(0, 0, this.width, this.height);
- },
- clearRect: function clearRect(x, y, w, h) {
- var _ctx;
-
- (_ctx = this.ctx).clearRect.apply(_ctx, _toConsumableArray(d(x, y, w, h)));
- return this;
- },
- fillRect: function fillRect(x, y, w, h) {
- var _ctx2;
-
- (_ctx2 = this.ctx).fillRect.apply(_ctx2, _toConsumableArray(d(x, y, w, h)));
- return this;
- },
- beginPath: function beginPath() {
- this.ctx.beginPath();
- return this;
- },
- moveTo: function moveTo(x, y) {
- var _ctx3;
-
- (_ctx3 = this.ctx).moveTo.apply(_ctx3, _toConsumableArray(d(x, y)));
- return this;
- },
- lineTo: function lineTo(x, y) {
- var _ctx4;
-
- (_ctx4 = this.ctx).lineTo.apply(_ctx4, _toConsumableArray(d(x, y)));
- return this;
- },
- quadraticCurveTo: function quadraticCurveTo(cpx, cpy, x, y) {
- var _ctx5;
-
- (_ctx5 = this.ctx).quadraticCurveTo.apply(_ctx5, _toConsumableArray(d(cpx, cpy, x, y)));
- return this;
- },
- bezierCurveTo: function bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) {
- var _ctx6;
-
- (_ctx6 = this.ctx).bezierCurveTo.apply(_ctx6, _toConsumableArray(d(cp1x, cp1y, cp2x, cp2y, x, y)));
- return this;
- },
- arc: function arc(x, y, r, sAngle, eAngle) {
- var _ctx7;
-
- var counterclockwise = arguments.length <= 5 || arguments[5] === undefined ? false : arguments[5];
-
- (_ctx7 = this.ctx).arc.apply(_ctx7, _toConsumableArray(d(x, y, r, sAngle, eAngle, counterclockwise)));
- return this;
- },
- circle: function circle(x, y, r) {
- this.arc(x, y, r, 0, Math.PI * 2);
- return this;
- },
- fill: function fill() {
- this.ctx.fill();
- return this;
- },
- stroke: function stroke() {
- this.ctx.stroke();
- return this;
- }
- };
-
- var dpi = dpiAware ? window.devicePixelRatio : 1;
- var d = function d() {
- for (var _len = arguments.length, values = Array(_len), _key = 0; _key < _len; _key++) {
- values[_key] = arguments[_key];
- }
-
- return mult(dpi, values);
- }; //multiplies values to the current dpi
-
- object.dpi = dpi;
- object.canvas = createCanvas(width, height, object.dpi);
- object.ctx = object.canvas.getContext('2d');
- return object;
- };
-
- var mult = (0, _curry2.default)(function (multiplier, value) {
- return !Array.isArray(value) ? value * multiplier : value.map(function (v) {
- return v * multiplier;
- });
- });
-
- function createCanvas(width, height) {
- var multiplier = arguments.length <= 2 || arguments[2] === undefined ? 1 : arguments[2];
-
- var canvas = document.createElement("canvas");
- if (multiplier != 1) {
- canvas.style.width = width + 'px';
- canvas.style.height = height + 'px';
- }
- canvas.width = width * multiplier;
- canvas.height = height * multiplier;
- return canvas;
- }
-
-/***/ },
-/* 2 */
-/***/ function(module, exports) {
-
- var slice = Array.prototype.slice;
- var toArray = function(a){ return slice.call(a) }
- var tail = function(a){ return slice.call(a, 1) }
-
- // fn, [value] -> fn
- //-- create a curried function, incorporating any number of
- //-- pre-existing arguments (e.g. if you're further currying a function).
- var createFn = function(fn, args, totalArity){
- var remainingArity = totalArity - args.length;
-
- switch (remainingArity) {
- case 0: return function(){ return processInvocation(fn, concatArgs(args, arguments), totalArity) };
- case 1: return function(a){ return processInvocation(fn, concatArgs(args, arguments), totalArity) };
- case 2: return function(a,b){ return processInvocation(fn, concatArgs(args, arguments), totalArity) };
- case 3: return function(a,b,c){ return processInvocation(fn, concatArgs(args, arguments), totalArity) };
- case 4: return function(a,b,c,d){ return processInvocation(fn, concatArgs(args, arguments), totalArity) };
- case 5: return function(a,b,c,d,e){ return processInvocation(fn, concatArgs(args, arguments), totalArity) };
- case 6: return function(a,b,c,d,e,f){ return processInvocation(fn, concatArgs(args, arguments), totalArity) };
- case 7: return function(a,b,c,d,e,f,g){ return processInvocation(fn, concatArgs(args, arguments), totalArity) };
- case 8: return function(a,b,c,d,e,f,g,h){ return processInvocation(fn, concatArgs(args, arguments), totalArity) };
- case 9: return function(a,b,c,d,e,f,g,h,i){ return processInvocation(fn, concatArgs(args, arguments), totalArity) };
- case 10: return function(a,b,c,d,e,f,g,h,i,j){ return processInvocation(fn, concatArgs(args, arguments), totalArity) };
- default: return createEvalFn(fn, args, remainingArity);
- }
- }
-
- // [value], arguments -> [value]
- //-- concat new arguments onto old arguments array
- var concatArgs = function(args1, args2){
- return args1.concat(toArray(args2));
- }
-
- // fn, [value], int -> fn
- //-- create a function of the correct arity by the use of eval,
- //-- so that curry can handle functions of any arity
- var createEvalFn = function(fn, args, arity){
- var argList = makeArgList(arity);
-
- //-- hack for IE's faulty eval parsing -- http://stackoverflow.com/a/6807726
- var fnStr = 'false||' +
- 'function(' + argList + '){ return processInvocation(fn, concatArgs(args, arguments)); }';
- return eval(fnStr);
- }
-
- var makeArgList = function(len){
- var a = [];
- for ( var i = 0; i < len; i += 1 ) a.push('a' + i.toString());
- return a.join(',');
- }
-
- var trimArrLength = function(arr, length){
- if ( arr.length > length ) return arr.slice(0, length);
- else return arr;
- }
-
- // fn, [value] -> value
- //-- handle a function being invoked.
- //-- if the arg list is long enough, the function will be called
- //-- otherwise, a new curried version is created.
- var processInvocation = function(fn, argsArr, totalArity){
- argsArr = trimArrLength(argsArr, totalArity);
-
- if ( argsArr.length === totalArity ) return fn.apply(null, argsArr);
- return createFn(fn, argsArr, totalArity);
- }
-
- // fn -> fn
- //-- curries a function! <3
- var curry = function(fn){
- return createFn(fn, [], fn.length);
- }
-
- // num, fn -> fn
- //-- curries a function to a certain arity! <33
- curry.to = curry(function(arity, fn){
- return createFn(fn, [], arity);
- });
-
- // num, fn -> fn
- //-- adapts a function in the context-first style
- //-- to a curried version. <3333
- curry.adaptTo = curry(function(num, fn){
- return curry.to(num, function(context){
- var args = tail(arguments).concat(context);
- return fn.apply(this, args);
- });
- })
-
- // fn -> fn
- //-- adapts a function in the context-first style to
- //-- a curried version. <333
- curry.adapt = function(fn){
- return curry.adaptTo(fn.length, fn)
- }
-
-
- module.exports = curry;
-
-
-/***/ },
-/* 3 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _glObj = __webpack_require__(4);
-
- var _glObj2 = _interopRequireDefault(_glObj);
-
- var _simple = __webpack_require__(6);
-
- var _simple2 = _interopRequireDefault(_simple);
-
- var _canvas = __webpack_require__(1);
-
- var _lodash = __webpack_require__(7);
-
- var _fill = __webpack_require__(9);
-
- var _fill2 = _interopRequireDefault(_fill);
-
- var _eventDispatcher = __webpack_require__(10);
-
- var _eventDispatcher2 = _interopRequireDefault(_eventDispatcher);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- function Haze(_ref) {
- var _this = this;
-
- var canvas = _ref.canvas;
- var frag = _ref.shader;
- var _ref$textures = _ref.textures;
- var textures = _ref$textures === undefined ? [] : _ref$textures;
- var _ref$loops = _ref.loops;
- var loops = _ref$loops === undefined ? 1000 : _ref$loops;
-
- this.loops = loops;
- this.canvas = canvas;
- this._width = canvas.width;
- this._height = canvas.height;
- var gl = new _glObj2.default(canvas, null, _simple2.default, frag);
- this.gl = gl;
- var haze = this;
- this._textures = textures.map(function (v, i) {
- return loadTexture(_this, i, v);
- });
-
- Promise.all(this._textures).then(start);
-
- function start() {
- var last = 0;
- var frame = 1000 / 60;
- var time = 0;
- gl.createUniform("1f", "time", time);
-
- (function update(now) {
- var delta = now - last;
- if (isNaN(delta)) {
- delta = frame;
- }
- var incr = delta / frame;
- if (incr > 1.5) incr = 1.5;
- incr *= haze.timeScale;
- time += incr;
- if (time > haze.loops) time = 0;
- last = now;
- gl.createUniform("1f", "time", time);
- haze.dispatchEvent('predraw', {
- deltaTime: incr
- });
- gl.draw();
- requestAnimationFrame(update);
- })();
- }
- }
-
- function loadTexture(haze, index, options) {
- var defaultOptions = {
- file: null,
- name: null,
- repeat: false,
- fill: true,
- align: {
- x: 0.5,
- y: 0.5
- },
- scale: {
- x: 1,
- y: 1
- }
- };
- options = (0, _lodash.assign)(defaultOptions, options);
-
- return new Promise(function (resolve, reject) {
- var image = new Image();
- image.addEventListener('load', function (event) {
- haze.gl.createUniform('1i', options.name, index);
- resolve(processTexture(haze, index, image, options));
- });
- image.src = options.file;
- });
- }
-
- function processTexture(haze, index, image, options) {
- var canvas = document.createElement('canvas');
- var ctx = canvas.getContext('2d');
-
- var textureObj = (0, _lodash.assign)({
- canvas: canvas,
- haze: haze,
- index: index,
- image: image,
- options: options,
- updateTexture: function updateTexture() {
- haze.gl.createTexture(canvas, index, options.repeat ? haze.gl.gl.REPEAT : null);
- },
- render: function render() {
- canvas.width = (options.fill ? haze.width : image.width) * haze.dpi * options.scale.x;
- canvas.height = (options.fill ? haze.height : image.height) * haze.dpi * options.scale.y;
-
- var dimensions = {
- x: 0,
- y: 0,
- width: canvas.width,
- height: canvas.height
- };
-
- if (options.fill) {
- dimensions = (0, _fill2.default)(image.width, image.height, canvas.width, canvas.height, options.align.x, options.align.y);
- }
-
- ctx.drawImage(image, dimensions.x, dimensions.y, dimensions.width, dimensions.height);
-
- this.updateTexture();
- },
- updateSize: function updateSize() {
- this.render();
- this.dispatchEvent('resize');
- }
- }, (0, _eventDispatcher2.default)());
-
- textureObj.updateSize();
- haze.addEventListener('resize', textureObj.updateSize.bind(textureObj));
-
- return textureObj;
- }
-
- Haze.prototype = (0, _lodash.assign)({
- canvas: null,
- _width: 0,
- _height: 0,
- _dpi: 1,
- _willUpdateSize: false,
- _throttledUpdateSize: null,
- timeScale: 1,
- _textures: null,
- loops: 1000,
- get width() {
- return this._width;
- },
- set width(v) {
- if (this._width == v) return;
- this._width = v;
- this.updateSize();
- },
- get height() {
- return this._height;
- },
- set height(v) {
- if (this._height == v) return;
- this._height = v;
- this.updateSize();
- },
- get dpi() {
- return this._dpi;
- },
- set dpi(v) {
- if (this._dpi == v) return;
- this._dpi = v;
- this.updateSize();
- },
- updateSize: function updateSize() {
- var _this2 = this;
-
- if (this._throttledUpdateSize == null) {
- this._throttledUpdateSize = (0, _lodash.throttle)(function () {
- if (_this2._willUpdateSize) return;
- _this2._willUpdateSize = true;
-
- requestAnimationFrame(function () {
- _this2._willUpdateSize = false;
-
- _this2.canvas.width = _this2.width * _this2.dpi;
- _this2.canvas.style.width = _this2.width + 'px';
- _this2.canvas.height = _this2.height * _this2.dpi;
- _this2.canvas.style.height = _this2.height + 'px';
-
- _this2.dispatchEvent('resize');
- _this2.gl.gl.viewport(0, 0, _this2.canvas.width, _this2.canvas.height);
- });
- }, 300);
- }
-
- this._throttledUpdateSize();
- },
- getTextureByName: function getTextureByName(name) {
- var _this3 = this;
-
- return new Promise(function (resolve, reject) {
- _this3._textures.forEach(function (v) {
- return v.then(function (texture) {
- if (texture.options.name == name) resolve(texture);
- });
- });
- });
- }
- }, (0, _eventDispatcher2.default)());
-
- exports.default = Haze;
-
-/***/ },
-/* 4 */
-/***/ function(module, exports, __webpack_require__) {
-
- "use strict";
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _webgl = __webpack_require__(5);
-
- var WebGL = _interopRequireWildcard(_webgl);
-
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
-
- function GL(canvas, options, vert, frag) {
- this.init(canvas, options, vert, frag);
- }
- GL.prototype = {
- canvas: null,
- gl: null,
- program: null,
- width: 0,
- height: 0,
- init: function init(canvas, options, vert, frag) {
- this.canvas = canvas;
- this.width = canvas.width;
- this.height = canvas.height;
- this.gl = WebGL.getContext(canvas, options);
- this.program = this.createProgram(vert, frag);
- this.useProgram(this.program);
- },
- createProgram: function createProgram(vert, frag) {
- var program = WebGL.createProgram(this.gl, vert, frag);
- return program;
- },
- useProgram: function useProgram(program) {
- this.program = program;
- this.gl.useProgram(program);
- },
- createTexture: function createTexture(source, i, wrap) {
- return WebGL.createTexture(this.gl, source, i, wrap);
- },
- createUniform: function createUniform(type, name) {
- for (var _len = arguments.length, v = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
- v[_key - 2] = arguments[_key];
- }
-
- WebGL.createUniform.apply(WebGL, [this.gl, this.program, type, name].concat(v));
- },
- activeTexture: function activeTexture(i) {
- WebGL.activeTexture(this.gl, i);
- },
- updateTexture: function updateTexture(source) {
- WebGL.updateTexture(this.gl, source);
- },
- draw: function draw() {
- WebGL.setRectangle(this.gl, -1, -1, 2, 2);
- this.gl.drawArrays(this.gl.TRIANGLES, 0, 6);
- }
- };
-
- exports.default = GL;
-
-/***/ },
-/* 5 */
-/***/ function(module, exports) {
-
- "use strict";
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.getContext = getContext;
- exports.createProgram = createProgram;
- exports.createShader = createShader;
- exports.createTexture = createTexture;
- exports.createUniform = createUniform;
- exports.activeTexture = activeTexture;
- exports.updateTexture = updateTexture;
- exports.setRectangle = setRectangle;
- function getContext(canvas) {
- var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
-
- var contexts = ["webgl", "experimental-webgl"];
- var context = null;
-
- contexts.some(function (name) {
- try {
- context = canvas.getContext(name, options);
- } catch (e) {};
- return context != null;
- });
-
- if (context == null) {
- document.body.classList.add("no-webgl");
- }
-
- return context;
- }
-
- function createProgram(gl, vertexScript, fragScript) {
- var vertexShader = createShader(gl, vertexScript, gl.VERTEX_SHADER);
- var fragShader = createShader(gl, fragScript, gl.FRAGMENT_SHADER);
-
- var program = gl.createProgram();
- gl.attachShader(program, vertexShader);
- gl.attachShader(program, fragShader);
-
- gl.linkProgram(program);
-
- var linked = gl.getProgramParameter(program, gl.LINK_STATUS);
- if (!linked) {
- var lastError = gl.getProgramInfoLog(program);
- error("Error in program linking: " + lastError);
- gl.deleteProgram(program);
- return null;
- }
-
- var positionLocation = gl.getAttribLocation(program, "a_position");
- var texCoordLocation = gl.getAttribLocation(program, "a_texCoord");
-
- var texCoordBuffer = gl.createBuffer();
- gl.bindBuffer(gl.ARRAY_BUFFER, texCoordBuffer);
-
- gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1.0, -1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0]), gl.STATIC_DRAW);
-
- gl.enableVertexAttribArray(texCoordLocation);
- gl.vertexAttribPointer(texCoordLocation, 2, gl.FLOAT, false, 0, 0);
-
- // Create a buffer for the position of the rectangle corners.
- var buffer = gl.createBuffer();
- gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
- gl.enableVertexAttribArray(positionLocation);
- gl.vertexAttribPointer(positionLocation, 2, gl.FLOAT, false, 0, 0);
-
- return program;
- }
-
- function createShader(gl, script, type) {
- var shader = gl.createShader(type);
- gl.shaderSource(shader, script);
- gl.compileShader(shader);
-
- var compiled = gl.getShaderParameter(shader, gl.COMPILE_STATUS);
-
- if (!compiled) {
- var lastError = gl.getShaderInfoLog(shader);
- error("Error compiling shader '" + shader + "':" + lastError);
- gl.deleteShader(shader);
- return null;
- }
- return shader;
- }
- function createTexture(gl, source, i) {
- var wrap = arguments.length <= 3 || arguments[3] === undefined ? null : arguments[3];
-
- if (wrap == null) wrap = gl.CLAMP_TO_EDGE;
- var texture = gl.createTexture();
- activeTexture(gl, i);
- gl.bindTexture(gl.TEXTURE_2D, texture);
-
- // Set the parameters so we can render any size image.
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, wrap);
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, wrap);
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
- updateTexture(gl, source);
-
- return texture;
- }
- function createUniform(gl, program, type, name) {
- var location = gl.getUniformLocation(program, "u_" + name);
-
- for (var _len = arguments.length, args = Array(_len > 4 ? _len - 4 : 0), _key = 4; _key < _len; _key++) {
- args[_key - 4] = arguments[_key];
- }
-
- gl["uniform" + type].apply(gl, [location].concat(args));
- }
- function activeTexture(gl, i) {
- gl.activeTexture(gl["TEXTURE" + i]);
- }
- function updateTexture(gl, source) {
- gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, source);
- }
- function setRectangle(gl, x, y, width, height) {
- var x1 = x;
- var x2 = x + width;
- var y1 = y;
- var y2 = y + height;
- gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([x1, y1, x2, y1, x1, y2, x1, y2, x2, y1, x2, y2]), gl.STATIC_DRAW);
- }
-
- function error(msg) {
- console.error(msg);
- }
-
-/***/ },
-/* 6 */
-/***/ function(module, exports) {
-
- module.exports = "precision mediump float;\r\n\r\nattribute vec2 a_position;\r\nvarying vec2 v_position;\r\n\r\nvoid main() {\r\n v_position=(a_position+1.0)*0.5;\r\n v_position.y=1.0-v_position.y;\r\n gl_Position = vec4(a_position,0.0,1.0);\r\n}\r\n"
-
-/***/ },
-/* 7 */
-/***/ function(module, exports, __webpack_require__) {
-
- var __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(module, global) {/**
- * @license
- * lodash 4.11.2 (Custom Build)
- * Build: `lodash -d -o ./foo/lodash.js`
- * Copyright jQuery Foundation and other contributors
- * Released under MIT license
- * Based on Underscore.js 1.8.3
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
- ;(function() {
-
- /** Used as a safe reference for `undefined` in pre-ES5 environments. */
- var undefined;
-
- /** Used as the semantic version number. */
- var VERSION = '4.11.2';
-
- /** Used as the size to enable large array optimizations. */
- var LARGE_ARRAY_SIZE = 200;
-
- /** Used as the `TypeError` message for "Functions" methods. */
- var FUNC_ERROR_TEXT = 'Expected a function';
-
- /** Used to stand-in for `undefined` hash values. */
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
-
- /** Used as the internal argument placeholder. */
- var PLACEHOLDER = '__lodash_placeholder__';
-
- /** Used to compose bitmasks for wrapper metadata. */
- var BIND_FLAG = 1,
- BIND_KEY_FLAG = 2,
- CURRY_BOUND_FLAG = 4,
- CURRY_FLAG = 8,
- CURRY_RIGHT_FLAG = 16,
- PARTIAL_FLAG = 32,
- PARTIAL_RIGHT_FLAG = 64,
- ARY_FLAG = 128,
- REARG_FLAG = 256,
- FLIP_FLAG = 512;
-
- /** Used to compose bitmasks for comparison styles. */
- var UNORDERED_COMPARE_FLAG = 1,
- PARTIAL_COMPARE_FLAG = 2;
-
- /** Used as default options for `_.truncate`. */
- var DEFAULT_TRUNC_LENGTH = 30,
- DEFAULT_TRUNC_OMISSION = '...';
-
- /** Used to detect hot functions by number of calls within a span of milliseconds. */
- var HOT_COUNT = 150,
- HOT_SPAN = 16;
-
- /** Used to indicate the type of lazy iteratees. */
- var LAZY_FILTER_FLAG = 1,
- LAZY_MAP_FLAG = 2,
- LAZY_WHILE_FLAG = 3;
-
- /** Used as references for various `Number` constants. */
- var INFINITY = 1 / 0,
- MAX_SAFE_INTEGER = 9007199254740991,
- MAX_INTEGER = 1.7976931348623157e+308,
- NAN = 0 / 0;
-
- /** Used as references for the maximum length and index of an array. */
- var MAX_ARRAY_LENGTH = 4294967295,
- MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
- HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
-
- /** `Object#toString` result references. */
- var argsTag = '[object Arguments]',
- arrayTag = '[object Array]',
- boolTag = '[object Boolean]',
- dateTag = '[object Date]',
- errorTag = '[object Error]',
- funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]',
- mapTag = '[object Map]',
- numberTag = '[object Number]',
- objectTag = '[object Object]',
- promiseTag = '[object Promise]',
- regexpTag = '[object RegExp]',
- setTag = '[object Set]',
- stringTag = '[object String]',
- symbolTag = '[object Symbol]',
- weakMapTag = '[object WeakMap]',
- weakSetTag = '[object WeakSet]';
-
- var arrayBufferTag = '[object ArrayBuffer]',
- dataViewTag = '[object DataView]',
- float32Tag = '[object Float32Array]',
- float64Tag = '[object Float64Array]',
- int8Tag = '[object Int8Array]',
- int16Tag = '[object Int16Array]',
- int32Tag = '[object Int32Array]',
- uint8Tag = '[object Uint8Array]',
- uint8ClampedTag = '[object Uint8ClampedArray]',
- uint16Tag = '[object Uint16Array]',
- uint32Tag = '[object Uint32Array]';
-
- /** Used to match empty string literals in compiled template source. */
- var reEmptyStringLeading = /\b__p \+= '';/g,
- reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
- reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
-
- /** Used to match HTML entities and HTML characters. */
- var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g,
- reUnescapedHtml = /[&<>"'`]/g,
- reHasEscapedHtml = RegExp(reEscapedHtml.source),
- reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
-
- /** Used to match template delimiters. */
- var reEscape = /<%-([\s\S]+?)%>/g,
- reEvaluate = /<%([\s\S]+?)%>/g,
- reInterpolate = /<%=([\s\S]+?)%>/g;
-
- /** Used to match property names within property paths. */
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
- reIsPlainProp = /^\w*$/,
- rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g;
-
- /**
- * Used to match `RegExp`
- * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
- */
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
- reHasRegExpChar = RegExp(reRegExpChar.source);
-
- /** Used to match leading and trailing whitespace. */
- var reTrim = /^\s+|\s+$/g,
- reTrimStart = /^\s+/,
- reTrimEnd = /\s+$/;
-
- /** Used to match non-compound words composed of alphanumeric characters. */
- var reBasicWord = /[a-zA-Z0-9]+/g;
-
- /** Used to match backslashes in property paths. */
- var reEscapeChar = /\\(\\)?/g;
-
- /**
- * Used to match
- * [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components).
- */
- var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
-
- /** Used to match `RegExp` flags from their coerced string values. */
- var reFlags = /\w*$/;
-
- /** Used to detect hexadecimal string values. */
- var reHasHexPrefix = /^0x/i;
-
- /** Used to detect bad signed hexadecimal string values. */
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
-
- /** Used to detect binary string values. */
- var reIsBinary = /^0b[01]+$/i;
-
- /** Used to detect host constructors (Safari). */
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
-
- /** Used to detect octal string values. */
- var reIsOctal = /^0o[0-7]+$/i;
-
- /** Used to detect unsigned integer values. */
- var reIsUint = /^(?:0|[1-9]\d*)$/;
-
- /** Used to match latin-1 supplementary letters (excluding mathematical operators). */
- var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;
-
- /** Used to ensure capturing order of template delimiters. */
- var reNoMatch = /($^)/;
-
- /** Used to match unescaped characters in compiled string literals. */
- var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
-
- /** Used to compose unicode character classes. */
- var rsAstralRange = '\\ud800-\\udfff',
- rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
- rsComboSymbolsRange = '\\u20d0-\\u20f0',
- rsDingbatRange = '\\u2700-\\u27bf',
- rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
- rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
- rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
- rsPunctuationRange = '\\u2000-\\u206f',
- rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
- rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
- rsVarRange = '\\ufe0e\\ufe0f',
- rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
-
- /** Used to compose unicode capture groups. */
- var rsApos = "['\u2019]",
- rsAstral = '[' + rsAstralRange + ']',
- rsBreak = '[' + rsBreakRange + ']',
- rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
- rsDigits = '\\d+',
- rsDingbat = '[' + rsDingbatRange + ']',
- rsLower = '[' + rsLowerRange + ']',
- rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
- rsFitz = '\\ud83c[\\udffb-\\udfff]',
- rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
- rsNonAstral = '[^' + rsAstralRange + ']',
- rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
- rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
- rsUpper = '[' + rsUpperRange + ']',
- rsZWJ = '\\u200d';
-
- /** Used to compose unicode regexes. */
- var rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')',
- rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')',
- rsOptLowerContr = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
- rsOptUpperContr = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
- reOptMod = rsModifier + '?',
- rsOptVar = '[' + rsVarRange + ']?',
- rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
- rsSeq = rsOptVar + reOptMod + rsOptJoin,
- rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
- rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
-
- /** Used to match apostrophes. */
- var reApos = RegExp(rsApos, 'g');
-
- /**
- * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
- * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
- */
- var reComboMark = RegExp(rsCombo, 'g');
-
- /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
- var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
-
- /** Used to match complex or compound words. */
- var reComplexWord = RegExp([
- rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
- rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')',
- rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr,
- rsUpper + '+' + rsOptUpperContr,
- rsDigits,
- rsEmoji
- ].join('|'), 'g');
-
- /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
- var reHasComplexSymbol = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');
-
- /** Used to detect strings that need a more robust regexp to match words. */
- var reHasComplexWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
-
- /** Used to assign default `context` object properties. */
- var contextProps = [
- 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
- 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
- 'Promise', 'Reflect', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError',
- 'Uint8Array', 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
- '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
- ];
-
- /** Used to make template sourceURLs easier to identify. */
- var templateCounter = -1;
-
- /** Used to identify `toStringTag` values of typed arrays. */
- var typedArrayTags = {};
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
- typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
- typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
- typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
- typedArrayTags[uint32Tag] = true;
- typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
- typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
- typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
- typedArrayTags[errorTag] = typedArrayTags[funcTag] =
- typedArrayTags[mapTag] = typedArrayTags[numberTag] =
- typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
- typedArrayTags[setTag] = typedArrayTags[stringTag] =
- typedArrayTags[weakMapTag] = false;
-
- /** Used to identify `toStringTag` values supported by `_.clone`. */
- var cloneableTags = {};
- cloneableTags[argsTag] = cloneableTags[arrayTag] =
- cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
- cloneableTags[boolTag] = cloneableTags[dateTag] =
- cloneableTags[float32Tag] = cloneableTags[float64Tag] =
- cloneableTags[int8Tag] = cloneableTags[int16Tag] =
- cloneableTags[int32Tag] = cloneableTags[mapTag] =
- cloneableTags[numberTag] = cloneableTags[objectTag] =
- cloneableTags[regexpTag] = cloneableTags[setTag] =
- cloneableTags[stringTag] = cloneableTags[symbolTag] =
- cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
- cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
- cloneableTags[errorTag] = cloneableTags[funcTag] =
- cloneableTags[weakMapTag] = false;
-
- /** Used to map latin-1 supplementary letters to basic latin letters. */
- var deburredLetters = {
- '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
- '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
- '\xc7': 'C', '\xe7': 'c',
- '\xd0': 'D', '\xf0': 'd',
- '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
- '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
- '\xcC': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
- '\xeC': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
- '\xd1': 'N', '\xf1': 'n',
- '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
- '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
- '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
- '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
- '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
- '\xc6': 'Ae', '\xe6': 'ae',
- '\xde': 'Th', '\xfe': 'th',
- '\xdf': 'ss'
- };
-
- /** Used to map characters to HTML entities. */
- var htmlEscapes = {
- '&': '&',
- '<': '<',
- '>': '>',
- '"': '"',
- "'": ''',
- '`': '`'
- };
-
- /** Used to map HTML entities to characters. */
- var htmlUnescapes = {
- '&': '&',
- '<': '<',
- '>': '>',
- '"': '"',
- ''': "'",
- '`': '`'
- };
-
- /** Used to determine if values are of the language type `Object`. */
- var objectTypes = {
- 'function': true,
- 'object': true
- };
-
- /** Used to escape characters for inclusion in compiled string literals. */
- var stringEscapes = {
- '\\': '\\',
- "'": "'",
- '\n': 'n',
- '\r': 'r',
- '\u2028': 'u2028',
- '\u2029': 'u2029'
- };
-
- /** Built-in method references without a dependency on `root`. */
- var freeParseFloat = parseFloat,
- freeParseInt = parseInt;
-
- /** Detect free variable `exports`. */
- var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
- ? exports
- : undefined;
-
- /** Detect free variable `module`. */
- var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
- ? module
- : undefined;
-
- /** Detect the popular CommonJS extension `module.exports`. */
- var moduleExports = (freeModule && freeModule.exports === freeExports)
- ? freeExports
- : undefined;
-
- /** Detect free variable `global` from Node.js. */
- var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
-
- /** Detect free variable `self`. */
- var freeSelf = checkGlobal(objectTypes[typeof self] && self);
-
- /** Detect free variable `window`. */
- var freeWindow = checkGlobal(objectTypes[typeof window] && window);
-
- /** Detect `this` as the global object. */
- var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
-
- /**
- * Used as a reference to the global object.
- *
- * The `this` value is used if it's the global object to avoid Greasemonkey's
- * restricted `window` object, otherwise the `window` object is used.
- */
- var root = freeGlobal ||
- ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) ||
- freeSelf || thisGlobal || Function('return this')();
-
- /*--------------------------------------------------------------------------*/
-
- /**
- * Adds the key-value `pair` to `map`.
- *
- * @private
- * @param {Object} map The map to modify.
- * @param {Array} pair The key-value pair to add.
- * @returns {Object} Returns `map`.
- */
- function addMapEntry(map, pair) {
- // Don't return `Map#set` because it doesn't return the map instance in IE 11.
- map.set(pair[0], pair[1]);
- return map;
- }
-
- /**
- * Adds `value` to `set`.
- *
- * @private
- * @param {Object} set The set to modify.
- * @param {*} value The value to add.
- * @returns {Object} Returns `set`.
- */
- function addSetEntry(set, value) {
- set.add(value);
- return set;
- }
-
- /**
- * A faster alternative to `Function#apply`, this function invokes `func`
- * with the `this` binding of `thisArg` and the arguments of `args`.
- *
- * @private
- * @param {Function} func The function to invoke.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {Array} args The arguments to invoke `func` with.
- * @returns {*} Returns the result of `func`.
- */
- function apply(func, thisArg, args) {
- var length = args.length;
- switch (length) {
- case 0: return func.call(thisArg);
- case 1: return func.call(thisArg, args[0]);
- case 2: return func.call(thisArg, args[0], args[1]);
- case 3: return func.call(thisArg, args[0], args[1], args[2]);
- }
- return func.apply(thisArg, args);
- }
-
- /**
- * A specialized version of `baseAggregator` for arrays.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} setter The function to set `accumulator` values.
- * @param {Function} iteratee The iteratee to transform keys.
- * @param {Object} accumulator The initial aggregated object.
- * @returns {Function} Returns `accumulator`.
- */
- function arrayAggregator(array, setter, iteratee, accumulator) {
- var index = -1,
- length = array.length;
-
- while (++index < length) {
- var value = array[index];
- setter(accumulator, value, iteratee(value), array);
- }
- return accumulator;
- }
-
- /**
- * Creates a new array concatenating `array` with `other`.
- *
- * @private
- * @param {Array} array The first array to concatenate.
- * @param {Array} other The second array to concatenate.
- * @returns {Array} Returns the new concatenated array.
- */
- function arrayConcat(array, other) {
- var index = -1,
- length = array.length,
- othIndex = -1,
- othLength = other.length,
- result = Array(length + othLength);
-
- while (++index < length) {
- result[index] = array[index];
- }
- while (++othIndex < othLength) {
- result[index++] = other[othIndex];
- }
- return result;
- }
-
- /**
- * A specialized version of `_.forEach` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns `array`.
- */
- function arrayEach(array, iteratee) {
- var index = -1,
- length = array.length;
-
- while (++index < length) {
- if (iteratee(array[index], index, array) === false) {
- break;
- }
- }
- return array;
- }
-
- /**
- * A specialized version of `_.forEachRight` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns `array`.
- */
- function arrayEachRight(array, iteratee) {
- var length = array.length;
-
- while (length--) {
- if (iteratee(array[length], length, array) === false) {
- break;
- }
- }
- return array;
- }
-
- /**
- * A specialized version of `_.every` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if all elements pass the predicate check,
- * else `false`.
- */
- function arrayEvery(array, predicate) {
- var index = -1,
- length = array.length;
-
- while (++index < length) {
- if (!predicate(array[index], index, array)) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * A specialized version of `_.filter` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
- */
- function arrayFilter(array, predicate) {
- var index = -1,
- length = array.length,
- resIndex = 0,
- result = [];
-
- while (++index < length) {
- var value = array[index];
- if (predicate(value, index, array)) {
- result[resIndex++] = value;
- }
- }
- return result;
- }
-
- /**
- * A specialized version of `_.includes` for arrays without support for
- * specifying an index to search from.
- *
- * @private
- * @param {Array} array The array to search.
- * @param {*} target The value to search for.
- * @returns {boolean} Returns `true` if `target` is found, else `false`.
- */
- function arrayIncludes(array, value) {
- return !!array.length && baseIndexOf(array, value, 0) > -1;
- }
-
- /**
- * This function is like `arrayIncludes` except that it accepts a comparator.
- *
- * @private
- * @param {Array} array The array to search.
- * @param {*} target The value to search for.
- * @param {Function} comparator The comparator invoked per element.
- * @returns {boolean} Returns `true` if `target` is found, else `false`.
- */
- function arrayIncludesWith(array, value, comparator) {
- var index = -1,
- length = array.length;
-
- while (++index < length) {
- if (comparator(value, array[index])) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * A specialized version of `_.map` for arrays without support for iteratee
- * shorthands.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
- */
- function arrayMap(array, iteratee) {
- var index = -1,
- length = array.length,
- result = Array(length);
-
- while (++index < length) {
- result[index] = iteratee(array[index], index, array);
- }
- return result;
- }
-
- /**
- * Appends the elements of `values` to `array`.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {Array} values The values to append.
- * @returns {Array} Returns `array`.
- */
- function arrayPush(array, values) {
- var index = -1,
- length = values.length,
- offset = array.length;
-
- while (++index < length) {
- array[offset + index] = values[index];
- }
- return array;
- }
-
- /**
- * A specialized version of `_.reduce` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @param {boolean} [initAccum] Specify using the first element of `array` as
- * the initial value.
- * @returns {*} Returns the accumulated value.
- */
- function arrayReduce(array, iteratee, accumulator, initAccum) {
- var index = -1,
- length = array.length;
-
- if (initAccum && length) {
- accumulator = array[++index];
- }
- while (++index < length) {
- accumulator = iteratee(accumulator, array[index], index, array);
- }
- return accumulator;
- }
-
- /**
- * A specialized version of `_.reduceRight` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @param {boolean} [initAccum] Specify using the last element of `array` as
- * the initial value.
- * @returns {*} Returns the accumulated value.
- */
- function arrayReduceRight(array, iteratee, accumulator, initAccum) {
- var length = array.length;
- if (initAccum && length) {
- accumulator = array[--length];
- }
- while (length--) {
- accumulator = iteratee(accumulator, array[length], length, array);
- }
- return accumulator;
- }
-
- /**
- * A specialized version of `_.some` for arrays without support for iteratee
- * shorthands.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if any element passes the predicate check,
- * else `false`.
- */
- function arraySome(array, predicate) {
- var index = -1,
- length = array.length;
-
- while (++index < length) {
- if (predicate(array[index], index, array)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * The base implementation of methods like `_.find` and `_.findKey`, without
- * support for iteratee shorthands, which iterates over `collection` using
- * `eachFunc`.
- *
- * @private
- * @param {Array|Object} collection The collection to search.
- * @param {Function} predicate The function invoked per iteration.
- * @param {Function} eachFunc The function to iterate over `collection`.
- * @param {boolean} [retKey] Specify returning the key of the found element
- * instead of the element itself.
- * @returns {*} Returns the found element or its key, else `undefined`.
- */
- function baseFind(collection, predicate, eachFunc, retKey) {
- var result;
- eachFunc(collection, function(value, key, collection) {
- if (predicate(value, key, collection)) {
- result = retKey ? key : value;
- return false;
- }
- });
- return result;
- }
-
- /**
- * The base implementation of `_.findIndex` and `_.findLastIndex` without
- * support for iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to search.
- * @param {Function} predicate The function invoked per iteration.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function baseFindIndex(array, predicate, fromRight) {
- var length = array.length,
- index = fromRight ? length : -1;
-
- while ((fromRight ? index-- : ++index < length)) {
- if (predicate(array[index], index, array)) {
- return index;
- }
- }
- return -1;
- }
-
- /**
- * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
- *
- * @private
- * @param {Array} array The array to search.
- * @param {*} value The value to search for.
- * @param {number} fromIndex The index to search from.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function baseIndexOf(array, value, fromIndex) {
- if (value !== value) {
- return indexOfNaN(array, fromIndex);
- }
- var index = fromIndex - 1,
- length = array.length;
-
- while (++index < length) {
- if (array[index] === value) {
- return index;
- }
- }
- return -1;
- }
-
- /**
- * This function is like `baseIndexOf` except that it accepts a comparator.
- *
- * @private
- * @param {Array} array The array to search.
- * @param {*} value The value to search for.
- * @param {number} fromIndex The index to search from.
- * @param {Function} comparator The comparator invoked per element.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function baseIndexOfWith(array, value, fromIndex, comparator) {
- var index = fromIndex - 1,
- length = array.length;
-
- while (++index < length) {
- if (comparator(array[index], value)) {
- return index;
- }
- }
- return -1;
- }
-
- /**
- * The base implementation of `_.mean` and `_.meanBy` without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {number} Returns the mean.
- */
- function baseMean(array, iteratee) {
- var length = array ? array.length : 0;
- return length ? (baseSum(array, iteratee) / length) : NAN;
- }
-
- /**
- * The base implementation of `_.reduce` and `_.reduceRight`, without support
- * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} accumulator The initial value.
- * @param {boolean} initAccum Specify using the first or last element of
- * `collection` as the initial value.
- * @param {Function} eachFunc The function to iterate over `collection`.
- * @returns {*} Returns the accumulated value.
- */
- function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
- eachFunc(collection, function(value, index, collection) {
- accumulator = initAccum
- ? (initAccum = false, value)
- : iteratee(accumulator, value, index, collection);
- });
- return accumulator;
- }
-
- /**
- * The base implementation of `_.sortBy` which uses `comparer` to define the
- * sort order of `array` and replaces criteria objects with their corresponding
- * values.
- *
- * @private
- * @param {Array} array The array to sort.
- * @param {Function} comparer The function to define sort order.
- * @returns {Array} Returns `array`.
- */
- function baseSortBy(array, comparer) {
- var length = array.length;
-
- array.sort(comparer);
- while (length--) {
- array[length] = array[length].value;
- }
- return array;
- }
-
- /**
- * The base implementation of `_.sum` and `_.sumBy` without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {number} Returns the sum.
- */
- function baseSum(array, iteratee) {
- var result,
- index = -1,
- length = array.length;
-
- while (++index < length) {
- var current = iteratee(array[index]);
- if (current !== undefined) {
- result = result === undefined ? current : (result + current);
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `_.times` without support for iteratee shorthands
- * or max array length checks.
- *
- * @private
- * @param {number} n The number of times to invoke `iteratee`.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the array of results.
- */
- function baseTimes(n, iteratee) {
- var index = -1,
- result = Array(n);
-
- while (++index < n) {
- result[index] = iteratee(index);
- }
- return result;
- }
-
- /**
- * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
- * of key-value pairs for `object` corresponding to the property names of `props`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array} props The property names to get values for.
- * @returns {Object} Returns the new array of key-value pairs.
- */
- function baseToPairs(object, props) {
- return arrayMap(props, function(key) {
- return [key, object[key]];
- });
- }
-
- /**
- * The base implementation of `_.unary` without support for storing wrapper metadata.
- *
- * @private
- * @param {Function} func The function to cap arguments for.
- * @returns {Function} Returns the new function.
- */
- function baseUnary(func) {
- return function(value) {
- return func(value);
- };
- }
-
- /**
- * The base implementation of `_.values` and `_.valuesIn` which creates an
- * array of `object` property values corresponding to the property names
- * of `props`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array} props The property names to get values for.
- * @returns {Object} Returns the array of property values.
- */
- function baseValues(object, props) {
- return arrayMap(props, function(key) {
- return object[key];
- });
- }
-
- /**
- * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
- * that is not found in the character symbols.
- *
- * @private
- * @param {Array} strSymbols The string symbols to inspect.
- * @param {Array} chrSymbols The character symbols to find.
- * @returns {number} Returns the index of the first unmatched string symbol.
- */
- function charsStartIndex(strSymbols, chrSymbols) {
- var index = -1,
- length = strSymbols.length;
-
- while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
- return index;
- }
-
- /**
- * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
- * that is not found in the character symbols.
- *
- * @private
- * @param {Array} strSymbols The string symbols to inspect.
- * @param {Array} chrSymbols The character symbols to find.
- * @returns {number} Returns the index of the last unmatched string symbol.
- */
- function charsEndIndex(strSymbols, chrSymbols) {
- var index = strSymbols.length;
-
- while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
- return index;
- }
-
- /**
- * Checks if `value` is a global object.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {null|Object} Returns `value` if it's a global object, else `null`.
- */
- function checkGlobal(value) {
- return (value && value.Object === Object) ? value : null;
- }
-
- /**
- * Gets the number of `placeholder` occurrences in `array`.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {*} placeholder The placeholder to search for.
- * @returns {number} Returns the placeholder count.
- */
- function countHolders(array, placeholder) {
- var length = array.length,
- result = 0;
-
- while (length--) {
- if (array[length] === placeholder) {
- result++;
- }
- }
- return result;
- }
-
- /**
- * Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters.
- *
- * @private
- * @param {string} letter The matched letter to deburr.
- * @returns {string} Returns the deburred letter.
- */
- function deburrLetter(letter) {
- return deburredLetters[letter];
- }
-
- /**
- * Used by `_.escape` to convert characters to HTML entities.
- *
- * @private
- * @param {string} chr The matched character to escape.
- * @returns {string} Returns the escaped character.
- */
- function escapeHtmlChar(chr) {
- return htmlEscapes[chr];
- }
-
- /**
- * Used by `_.template` to escape characters for inclusion in compiled string literals.
- *
- * @private
- * @param {string} chr The matched character to escape.
- * @returns {string} Returns the escaped character.
- */
- function escapeStringChar(chr) {
- return '\\' + stringEscapes[chr];
- }
-
- /**
- * Gets the index at which the first occurrence of `NaN` is found in `array`.
- *
- * @private
- * @param {Array} array The array to search.
- * @param {number} fromIndex The index to search from.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {number} Returns the index of the matched `NaN`, else `-1`.
- */
- function indexOfNaN(array, fromIndex, fromRight) {
- var length = array.length,
- index = fromIndex + (fromRight ? 0 : -1);
-
- while ((fromRight ? index-- : ++index < length)) {
- var other = array[index];
- if (other !== other) {
- return index;
- }
- }
- return -1;
- }
-
- /**
- * Checks if `value` is a host object in IE < 9.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
- */
- function isHostObject(value) {
- // Many host objects are `Object` objects that can coerce to strings
- // despite having improperly defined `toString` methods.
- var result = false;
- if (value != null && typeof value.toString != 'function') {
- try {
- result = !!(value + '');
- } catch (e) {}
- }
- return result;
- }
-
- /**
- * Converts `iterator` to an array.
- *
- * @private
- * @param {Object} iterator The iterator to convert.
- * @returns {Array} Returns the converted array.
- */
- function iteratorToArray(iterator) {
- var data,
- result = [];
-
- while (!(data = iterator.next()).done) {
- result.push(data.value);
- }
- return result;
- }
-
- /**
- * Converts `map` to an array.
- *
- * @private
- * @param {Object} map The map to convert.
- * @returns {Array} Returns the converted array.
- */
- function mapToArray(map) {
- var index = -1,
- result = Array(map.size);
-
- map.forEach(function(value, key) {
- result[++index] = [key, value];
- });
- return result;
- }
-
- /**
- * Replaces all `placeholder` elements in `array` with an internal placeholder
- * and returns an array of their indexes.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {*} placeholder The placeholder to replace.
- * @returns {Array} Returns the new array of placeholder indexes.
- */
- function replaceHolders(array, placeholder) {
- var index = -1,
- length = array.length,
- resIndex = 0,
- result = [];
-
- while (++index < length) {
- var value = array[index];
- if (value === placeholder || value === PLACEHOLDER) {
- array[index] = PLACEHOLDER;
- result[resIndex++] = index;
- }
- }
- return result;
- }
-
- /**
- * Converts `set` to an array.
- *
- * @private
- * @param {Object} set The set to convert.
- * @returns {Array} Returns the converted array.
- */
- function setToArray(set) {
- var index = -1,
- result = Array(set.size);
-
- set.forEach(function(value) {
- result[++index] = value;
- });
- return result;
- }
-
- /**
- * Gets the number of symbols in `string`.
- *
- * @private
- * @param {string} string The string to inspect.
- * @returns {number} Returns the string size.
- */
- function stringSize(string) {
- if (!(string && reHasComplexSymbol.test(string))) {
- return string.length;
- }
- var result = reComplexSymbol.lastIndex = 0;
- while (reComplexSymbol.test(string)) {
- result++;
- }
- return result;
- }
-
- /**
- * Converts `string` to an array.
- *
- * @private
- * @param {string} string The string to convert.
- * @returns {Array} Returns the converted array.
- */
- function stringToArray(string) {
- return string.match(reComplexSymbol);
- }
-
- /**
- * Used by `_.unescape` to convert HTML entities to characters.
- *
- * @private
- * @param {string} chr The matched character to unescape.
- * @returns {string} Returns the unescaped character.
- */
- function unescapeHtmlChar(chr) {
- return htmlUnescapes[chr];
- }
-
- /*--------------------------------------------------------------------------*/
-
- /**
- * Create a new pristine `lodash` function using the `context` object.
- *
- * @static
- * @memberOf _
- * @since 1.1.0
- * @category Util
- * @param {Object} [context=root] The context object.
- * @returns {Function} Returns a new `lodash` function.
- * @example
- *
- * _.mixin({ 'foo': _.constant('foo') });
- *
- * var lodash = _.runInContext();
- * lodash.mixin({ 'bar': lodash.constant('bar') });
- *
- * _.isFunction(_.foo);
- * // => true
- * _.isFunction(_.bar);
- * // => false
- *
- * lodash.isFunction(lodash.foo);
- * // => false
- * lodash.isFunction(lodash.bar);
- * // => true
- *
- * // Use `context` to mock `Date#getTime` use in `_.now`.
- * var mock = _.runInContext({
- * 'Date': function() {
- * return { 'getTime': getTimeMock };
- * }
- * });
- *
- * // Create a suped-up `defer` in Node.js.
- * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
- */
- function runInContext(context) {
- context = context ? _.defaults({}, context, _.pick(root, contextProps)) : root;
-
- /** Built-in constructor references. */
- var Date = context.Date,
- Error = context.Error,
- Math = context.Math,
- RegExp = context.RegExp,
- TypeError = context.TypeError;
-
- /** Used for built-in method references. */
- var arrayProto = context.Array.prototype,
- objectProto = context.Object.prototype,
- stringProto = context.String.prototype;
-
- /** Used to resolve the decompiled source of functions. */
- var funcToString = context.Function.prototype.toString;
-
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
-
- /** Used to generate unique IDs. */
- var idCounter = 0;
-
- /** Used to infer the `Object` constructor. */
- var objectCtorString = funcToString.call(Object);
-
- /**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
- var objectToString = objectProto.toString;
-
- /** Used to restore the original `_` reference in `_.noConflict`. */
- var oldDash = root._;
-
- /** Used to detect if a method is native. */
- var reIsNative = RegExp('^' +
- funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
- );
-
- /** Built-in value references. */
- var Buffer = moduleExports ? context.Buffer : undefined,
- Reflect = context.Reflect,
- Symbol = context.Symbol,
- Uint8Array = context.Uint8Array,
- clearTimeout = context.clearTimeout,
- enumerate = Reflect ? Reflect.enumerate : undefined,
- getOwnPropertySymbols = Object.getOwnPropertySymbols,
- iteratorSymbol = typeof (iteratorSymbol = Symbol && Symbol.iterator) == 'symbol' ? iteratorSymbol : undefined,
- objectCreate = Object.create,
- propertyIsEnumerable = objectProto.propertyIsEnumerable,
- setTimeout = context.setTimeout,
- splice = arrayProto.splice;
-
- /* Built-in method references for those with the same name as other `lodash` methods. */
- var nativeCeil = Math.ceil,
- nativeFloor = Math.floor,
- nativeGetPrototype = Object.getPrototypeOf,
- nativeIsFinite = context.isFinite,
- nativeJoin = arrayProto.join,
- nativeKeys = Object.keys,
- nativeMax = Math.max,
- nativeMin = Math.min,
- nativeParseInt = context.parseInt,
- nativeRandom = Math.random,
- nativeReplace = stringProto.replace,
- nativeReverse = arrayProto.reverse,
- nativeSplit = stringProto.split;
-
- /* Built-in method references that are verified to be native. */
- var DataView = getNative(context, 'DataView'),
- Map = getNative(context, 'Map'),
- Promise = getNative(context, 'Promise'),
- Set = getNative(context, 'Set'),
- WeakMap = getNative(context, 'WeakMap'),
- nativeCreate = getNative(Object, 'create');
-
- /** Used to store function metadata. */
- var metaMap = WeakMap && new WeakMap;
-
- /** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */
- var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf');
-
- /** Used to lookup unminified function names. */
- var realNames = {};
-
- /** Used to detect maps, sets, and weakmaps. */
- var dataViewCtorString = toSource(DataView),
- mapCtorString = toSource(Map),
- promiseCtorString = toSource(Promise),
- setCtorString = toSource(Set),
- weakMapCtorString = toSource(WeakMap);
-
- /** Used to convert symbols to primitives and strings. */
- var symbolProto = Symbol ? Symbol.prototype : undefined,
- symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
- symbolToString = symbolProto ? symbolProto.toString : undefined;
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a `lodash` object which wraps `value` to enable implicit method
- * chain sequences. Methods that operate on and return arrays, collections,
- * and functions can be chained together. Methods that retrieve a single value
- * or may return a primitive value will automatically end the chain sequence
- * and return the unwrapped value. Otherwise, the value must be unwrapped
- * with `_#value`.
- *
- * Explicit chain sequences, which must be unwrapped with `_#value`, may be
- * enabled using `_.chain`.
- *
- * The execution of chained methods is lazy, that is, it's deferred until
- * `_#value` is implicitly or explicitly called.
- *
- * Lazy evaluation allows several methods to support shortcut fusion.
- * Shortcut fusion is an optimization to merge iteratee calls; this avoids
- * the creation of intermediate arrays and can greatly reduce the number of
- * iteratee executions. Sections of a chain sequence qualify for shortcut
- * fusion if the section is applied to an array of at least `200` elements
- * and any iteratees accept only one argument. The heuristic for whether a
- * section qualifies for shortcut fusion is subject to change.
- *
- * Chaining is supported in custom builds as long as the `_#value` method is
- * directly or indirectly included in the build.
- *
- * In addition to lodash methods, wrappers have `Array` and `String` methods.
- *
- * The wrapper `Array` methods are:
- * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
- *
- * The wrapper `String` methods are:
- * `replace` and `split`
- *
- * The wrapper methods that support shortcut fusion are:
- * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
- * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
- * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
- *
- * The chainable wrapper methods are:
- * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
- * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
- * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
- * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
- * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
- * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
- * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
- * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
- * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
- * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
- * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
- * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
- * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
- * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
- * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
- * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
- * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
- * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
- * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
- * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
- * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
- * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
- * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
- * `zipObject`, `zipObjectDeep`, and `zipWith`
- *
- * The wrapper methods that are **not** chainable by default are:
- * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
- * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `divide`, `each`,
- * `eachRight`, `endsWith`, `eq`, `escape`, `escapeRegExp`, `every`, `find`,
- * `findIndex`, `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `first`,
- * `floor`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`,
- * `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`,
- * `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`,
- * `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, `isBuffer`,
- * `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`,
- * `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, `isMatch`,
- * `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`,
- * `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`,
- * `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`,
- * `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`,
- * `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, `min`, `minBy`, `multiply`,
- * `noConflict`, `noop`, `now`, `nth`, `pad`, `padEnd`, `padStart`, `parseInt`,
- * `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, `round`,
- * `runInContext`, `sample`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`,
- * `sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`, `startCase`,
- * `startsWith`, `subtract`, `sum`, `sumBy`, `template`, `times`, `toInteger`,
- * `toJSON`, `toLength`, `toLower`, `toNumber`, `toSafeInteger`, `toString`,
- * `toUpper`, `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`,
- * `uniqueId`, `upperCase`, `upperFirst`, `value`, and `words`
- *
- * @name _
- * @constructor
- * @category Seq
- * @param {*} value The value to wrap in a `lodash` instance.
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * var wrapped = _([1, 2, 3]);
- *
- * // Returns an unwrapped value.
- * wrapped.reduce(_.add);
- * // => 6
- *
- * // Returns a wrapped value.
- * var squares = wrapped.map(square);
- *
- * _.isArray(squares);
- * // => false
- *
- * _.isArray(squares.value());
- * // => true
- */
- function lodash(value) {
- if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
- if (value instanceof LodashWrapper) {
- return value;
- }
- if (hasOwnProperty.call(value, '__wrapped__')) {
- return wrapperClone(value);
- }
- }
- return new LodashWrapper(value);
- }
-
- /**
- * The function whose prototype chain sequence wrappers inherit from.
- *
- * @private
- */
- function baseLodash() {
- // No operation performed.
- }
-
- /**
- * The base constructor for creating `lodash` wrapper objects.
- *
- * @private
- * @param {*} value The value to wrap.
- * @param {boolean} [chainAll] Enable explicit method chain sequences.
- */
- function LodashWrapper(value, chainAll) {
- this.__wrapped__ = value;
- this.__actions__ = [];
- this.__chain__ = !!chainAll;
- this.__index__ = 0;
- this.__values__ = undefined;
- }
-
- /**
- * By default, the template delimiters used by lodash are like those in
- * embedded Ruby (ERB). Change the following template settings to use
- * alternative delimiters.
- *
- * @static
- * @memberOf _
- * @type {Object}
- */
- lodash.templateSettings = {
-
- /**
- * Used to detect `data` property values to be HTML-escaped.
- *
- * @memberOf _.templateSettings
- * @type {RegExp}
- */
- 'escape': reEscape,
-
- /**
- * Used to detect code to be evaluated.
- *
- * @memberOf _.templateSettings
- * @type {RegExp}
- */
- 'evaluate': reEvaluate,
-
- /**
- * Used to detect `data` property values to inject.
- *
- * @memberOf _.templateSettings
- * @type {RegExp}
- */
- 'interpolate': reInterpolate,
-
- /**
- * Used to reference the data object in the template text.
- *
- * @memberOf _.templateSettings
- * @type {string}
- */
- 'variable': '',
-
- /**
- * Used to import variables into the compiled template.
- *
- * @memberOf _.templateSettings
- * @type {Object}
- */
- 'imports': {
-
- /**
- * A reference to the `lodash` function.
- *
- * @memberOf _.templateSettings.imports
- * @type {Function}
- */
- '_': lodash
- }
- };
-
- // Ensure wrappers are instances of `baseLodash`.
- lodash.prototype = baseLodash.prototype;
- lodash.prototype.constructor = lodash;
-
- LodashWrapper.prototype = baseCreate(baseLodash.prototype);
- LodashWrapper.prototype.constructor = LodashWrapper;
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
- *
- * @private
- * @constructor
- * @param {*} value The value to wrap.
- */
- function LazyWrapper(value) {
- this.__wrapped__ = value;
- this.__actions__ = [];
- this.__dir__ = 1;
- this.__filtered__ = false;
- this.__iteratees__ = [];
- this.__takeCount__ = MAX_ARRAY_LENGTH;
- this.__views__ = [];
- }
-
- /**
- * Creates a clone of the lazy wrapper object.
- *
- * @private
- * @name clone
- * @memberOf LazyWrapper
- * @returns {Object} Returns the cloned `LazyWrapper` object.
- */
- function lazyClone() {
- var result = new LazyWrapper(this.__wrapped__);
- result.__actions__ = copyArray(this.__actions__);
- result.__dir__ = this.__dir__;
- result.__filtered__ = this.__filtered__;
- result.__iteratees__ = copyArray(this.__iteratees__);
- result.__takeCount__ = this.__takeCount__;
- result.__views__ = copyArray(this.__views__);
- return result;
- }
-
- /**
- * Reverses the direction of lazy iteration.
- *
- * @private
- * @name reverse
- * @memberOf LazyWrapper
- * @returns {Object} Returns the new reversed `LazyWrapper` object.
- */
- function lazyReverse() {
- if (this.__filtered__) {
- var result = new LazyWrapper(this);
- result.__dir__ = -1;
- result.__filtered__ = true;
- } else {
- result = this.clone();
- result.__dir__ *= -1;
- }
- return result;
- }
-
- /**
- * Extracts the unwrapped value from its lazy wrapper.
- *
- * @private
- * @name value
- * @memberOf LazyWrapper
- * @returns {*} Returns the unwrapped value.
- */
- function lazyValue() {
- var array = this.__wrapped__.value(),
- dir = this.__dir__,
- isArr = isArray(array),
- isRight = dir < 0,
- arrLength = isArr ? array.length : 0,
- view = getView(0, arrLength, this.__views__),
- start = view.start,
- end = view.end,
- length = end - start,
- index = isRight ? end : (start - 1),
- iteratees = this.__iteratees__,
- iterLength = iteratees.length,
- resIndex = 0,
- takeCount = nativeMin(length, this.__takeCount__);
-
- if (!isArr || arrLength < LARGE_ARRAY_SIZE ||
- (arrLength == length && takeCount == length)) {
- return baseWrapperValue(array, this.__actions__);
- }
- var result = [];
-
- outer:
- while (length-- && resIndex < takeCount) {
- index += dir;
-
- var iterIndex = -1,
- value = array[index];
-
- while (++iterIndex < iterLength) {
- var data = iteratees[iterIndex],
- iteratee = data.iteratee,
- type = data.type,
- computed = iteratee(value);
-
- if (type == LAZY_MAP_FLAG) {
- value = computed;
- } else if (!computed) {
- if (type == LAZY_FILTER_FLAG) {
- continue outer;
- } else {
- break outer;
- }
- }
- }
- result[resIndex++] = value;
- }
- return result;
- }
-
- // Ensure `LazyWrapper` is an instance of `baseLodash`.
- LazyWrapper.prototype = baseCreate(baseLodash.prototype);
- LazyWrapper.prototype.constructor = LazyWrapper;
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a hash object.
- *
- * @private
- * @constructor
- * @returns {Object} Returns the new hash object.
- */
- function Hash() {}
-
- /**
- * Removes `key` and its value from the hash.
- *
- * @private
- * @param {Object} hash The hash to modify.
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function hashDelete(hash, key) {
- return hashHas(hash, key) && delete hash[key];
- }
-
- /**
- * Gets the hash value for `key`.
- *
- * @private
- * @param {Object} hash The hash to query.
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function hashGet(hash, key) {
- if (nativeCreate) {
- var result = hash[key];
- return result === HASH_UNDEFINED ? undefined : result;
- }
- return hasOwnProperty.call(hash, key) ? hash[key] : undefined;
- }
-
- /**
- * Checks if a hash value for `key` exists.
- *
- * @private
- * @param {Object} hash The hash to query.
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function hashHas(hash, key) {
- return nativeCreate ? hash[key] !== undefined : hasOwnProperty.call(hash, key);
- }
-
- /**
- * Sets the hash `key` to `value`.
- *
- * @private
- * @param {Object} hash The hash to modify.
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- */
- function hashSet(hash, key, value) {
- hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
- }
-
- // Avoid inheriting from `Object.prototype` when possible.
- Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto;
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a map cache object to store key-value pairs.
- *
- * @private
- * @constructor
- * @param {Array} [values] The values to cache.
- */
- function MapCache(values) {
- var index = -1,
- length = values ? values.length : 0;
-
- this.clear();
- while (++index < length) {
- var entry = values[index];
- this.set(entry[0], entry[1]);
- }
- }
-
- /**
- * Removes all key-value entries from the map.
- *
- * @private
- * @name clear
- * @memberOf MapCache
- */
- function mapClear() {
- this.__data__ = {
- 'hash': new Hash,
- 'map': Map ? new Map : [],
- 'string': new Hash
- };
- }
-
- /**
- * Removes `key` and its value from the map.
- *
- * @private
- * @name delete
- * @memberOf MapCache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function mapDelete(key) {
- var data = this.__data__;
- if (isKeyable(key)) {
- return hashDelete(typeof key == 'string' ? data.string : data.hash, key);
- }
- return Map ? data.map['delete'](key) : assocDelete(data.map, key);
- }
-
- /**
- * Gets the map value for `key`.
- *
- * @private
- * @name get
- * @memberOf MapCache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function mapGet(key) {
- var data = this.__data__;
- if (isKeyable(key)) {
- return hashGet(typeof key == 'string' ? data.string : data.hash, key);
- }
- return Map ? data.map.get(key) : assocGet(data.map, key);
- }
-
- /**
- * Checks if a map value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf MapCache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function mapHas(key) {
- var data = this.__data__;
- if (isKeyable(key)) {
- return hashHas(typeof key == 'string' ? data.string : data.hash, key);
- }
- return Map ? data.map.has(key) : assocHas(data.map, key);
- }
-
- /**
- * Sets the map `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf MapCache
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the map cache instance.
- */
- function mapSet(key, value) {
- var data = this.__data__;
- if (isKeyable(key)) {
- hashSet(typeof key == 'string' ? data.string : data.hash, key, value);
- } else if (Map) {
- data.map.set(key, value);
- } else {
- assocSet(data.map, key, value);
- }
- return this;
- }
-
- // Add methods to `MapCache`.
- MapCache.prototype.clear = mapClear;
- MapCache.prototype['delete'] = mapDelete;
- MapCache.prototype.get = mapGet;
- MapCache.prototype.has = mapHas;
- MapCache.prototype.set = mapSet;
-
- /*------------------------------------------------------------------------*/
-
- /**
- *
- * Creates a set cache object to store unique values.
- *
- * @private
- * @constructor
- * @param {Array} [values] The values to cache.
- */
- function SetCache(values) {
- var index = -1,
- length = values ? values.length : 0;
-
- this.__data__ = new MapCache;
- while (++index < length) {
- this.push(values[index]);
- }
- }
-
- /**
- * Checks if `value` is in `cache`.
- *
- * @private
- * @param {Object} cache The set cache to search.
- * @param {*} value The value to search for.
- * @returns {number} Returns `true` if `value` is found, else `false`.
- */
- function cacheHas(cache, value) {
- var map = cache.__data__;
- if (isKeyable(value)) {
- var data = map.__data__,
- hash = typeof value == 'string' ? data.string : data.hash;
-
- return hash[value] === HASH_UNDEFINED;
- }
- return map.has(value);
- }
-
- /**
- * Adds `value` to the set cache.
- *
- * @private
- * @name push
- * @memberOf SetCache
- * @param {*} value The value to cache.
- */
- function cachePush(value) {
- var map = this.__data__;
- if (isKeyable(value)) {
- var data = map.__data__,
- hash = typeof value == 'string' ? data.string : data.hash;
-
- hash[value] = HASH_UNDEFINED;
- }
- else {
- map.set(value, HASH_UNDEFINED);
- }
- }
-
- // Add methods to `SetCache`.
- SetCache.prototype.push = cachePush;
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a stack cache object to store key-value pairs.
- *
- * @private
- * @constructor
- * @param {Array} [values] The values to cache.
- */
- function Stack(values) {
- var index = -1,
- length = values ? values.length : 0;
-
- this.clear();
- while (++index < length) {
- var entry = values[index];
- this.set(entry[0], entry[1]);
- }
- }
-
- /**
- * Removes all key-value entries from the stack.
- *
- * @private
- * @name clear
- * @memberOf Stack
- */
- function stackClear() {
- this.__data__ = { 'array': [], 'map': null };
- }
-
- /**
- * Removes `key` and its value from the stack.
- *
- * @private
- * @name delete
- * @memberOf Stack
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function stackDelete(key) {
- var data = this.__data__,
- array = data.array;
-
- return array ? assocDelete(array, key) : data.map['delete'](key);
- }
-
- /**
- * Gets the stack value for `key`.
- *
- * @private
- * @name get
- * @memberOf Stack
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function stackGet(key) {
- var data = this.__data__,
- array = data.array;
-
- return array ? assocGet(array, key) : data.map.get(key);
- }
-
- /**
- * Checks if a stack value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf Stack
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function stackHas(key) {
- var data = this.__data__,
- array = data.array;
-
- return array ? assocHas(array, key) : data.map.has(key);
- }
-
- /**
- * Sets the stack `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf Stack
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the stack cache instance.
- */
- function stackSet(key, value) {
- var data = this.__data__,
- array = data.array;
-
- if (array) {
- if (array.length < (LARGE_ARRAY_SIZE - 1)) {
- assocSet(array, key, value);
- } else {
- data.array = null;
- data.map = new MapCache(array);
- }
- }
- var map = data.map;
- if (map) {
- map.set(key, value);
- }
- return this;
- }
-
- // Add methods to `Stack`.
- Stack.prototype.clear = stackClear;
- Stack.prototype['delete'] = stackDelete;
- Stack.prototype.get = stackGet;
- Stack.prototype.has = stackHas;
- Stack.prototype.set = stackSet;
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Removes `key` and its value from the associative array.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function assocDelete(array, key) {
- var index = assocIndexOf(array, key);
- if (index < 0) {
- return false;
- }
- var lastIndex = array.length - 1;
- if (index == lastIndex) {
- array.pop();
- } else {
- splice.call(array, index, 1);
- }
- return true;
- }
-
- /**
- * Gets the associative array value for `key`.
- *
- * @private
- * @param {Array} array The array to query.
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function assocGet(array, key) {
- var index = assocIndexOf(array, key);
- return index < 0 ? undefined : array[index][1];
- }
-
- /**
- * Checks if an associative array value for `key` exists.
- *
- * @private
- * @param {Array} array The array to query.
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function assocHas(array, key) {
- return assocIndexOf(array, key) > -1;
- }
-
- /**
- * Gets the index at which the `key` is found in `array` of key-value pairs.
- *
- * @private
- * @param {Array} array The array to search.
- * @param {*} key The key to search for.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function assocIndexOf(array, key) {
- var length = array.length;
- while (length--) {
- if (eq(array[length][0], key)) {
- return length;
- }
- }
- return -1;
- }
-
- /**
- * Sets the associative array `key` to `value`.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- */
- function assocSet(array, key, value) {
- var index = assocIndexOf(array, key);
- if (index < 0) {
- array.push([key, value]);
- } else {
- array[index][1] = value;
- }
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Used by `_.defaults` to customize its `_.assignIn` use.
- *
- * @private
- * @param {*} objValue The destination value.
- * @param {*} srcValue The source value.
- * @param {string} key The key of the property to assign.
- * @param {Object} object The parent object of `objValue`.
- * @returns {*} Returns the value to assign.
- */
- function assignInDefaults(objValue, srcValue, key, object) {
- if (objValue === undefined ||
- (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
- return srcValue;
- }
- return objValue;
- }
-
- /**
- * This function is like `assignValue` except that it doesn't assign
- * `undefined` values.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {string} key The key of the property to assign.
- * @param {*} value The value to assign.
- */
- function assignMergeValue(object, key, value) {
- if ((value !== undefined && !eq(object[key], value)) ||
- (typeof key == 'number' && value === undefined && !(key in object))) {
- object[key] = value;
- }
- }
-
- /**
- * Assigns `value` to `key` of `object` if the existing value is not equivalent
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {string} key The key of the property to assign.
- * @param {*} value The value to assign.
- */
- function assignValue(object, key, value) {
- var objValue = object[key];
- if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
- (value === undefined && !(key in object))) {
- object[key] = value;
- }
- }
-
- /**
- * Aggregates elements of `collection` on `accumulator` with keys transformed
- * by `iteratee` and values set by `setter`.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} setter The function to set `accumulator` values.
- * @param {Function} iteratee The iteratee to transform keys.
- * @param {Object} accumulator The initial aggregated object.
- * @returns {Function} Returns `accumulator`.
- */
- function baseAggregator(collection, setter, iteratee, accumulator) {
- baseEach(collection, function(value, key, collection) {
- setter(accumulator, value, iteratee(value), collection);
- });
- return accumulator;
- }
-
- /**
- * The base implementation of `_.assign` without support for multiple sources
- * or `customizer` functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @returns {Object} Returns `object`.
- */
- function baseAssign(object, source) {
- return object && copyObject(source, keys(source), object);
- }
-
- /**
- * The base implementation of `_.at` without support for individual paths.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {string[]} paths The property paths of elements to pick.
- * @returns {Array} Returns the new array of picked elements.
- */
- function baseAt(object, paths) {
- var index = -1,
- isNil = object == null,
- length = paths.length,
- result = Array(length);
-
- while (++index < length) {
- result[index] = isNil ? undefined : get(object, paths[index]);
- }
- return result;
- }
-
- /**
- * The base implementation of `_.clamp` which doesn't coerce arguments to numbers.
- *
- * @private
- * @param {number} number The number to clamp.
- * @param {number} [lower] The lower bound.
- * @param {number} upper The upper bound.
- * @returns {number} Returns the clamped number.
- */
- function baseClamp(number, lower, upper) {
- if (number === number) {
- if (upper !== undefined) {
- number = number <= upper ? number : upper;
- }
- if (lower !== undefined) {
- number = number >= lower ? number : lower;
- }
- }
- return number;
- }
-
- /**
- * The base implementation of `_.clone` and `_.cloneDeep` which tracks
- * traversed objects.
- *
- * @private
- * @param {*} value The value to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @param {boolean} [isFull] Specify a clone including symbols.
- * @param {Function} [customizer] The function to customize cloning.
- * @param {string} [key] The key of `value`.
- * @param {Object} [object] The parent object of `value`.
- * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
- * @returns {*} Returns the cloned value.
- */
- function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
- var result;
- if (customizer) {
- result = object ? customizer(value, key, object, stack) : customizer(value);
- }
- if (result !== undefined) {
- return result;
- }
- if (!isObject(value)) {
- return value;
- }
- var isArr = isArray(value);
- if (isArr) {
- result = initCloneArray(value);
- if (!isDeep) {
- return copyArray(value, result);
- }
- } else {
- var tag = getTag(value),
- isFunc = tag == funcTag || tag == genTag;
-
- if (isBuffer(value)) {
- return cloneBuffer(value, isDeep);
- }
- if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
- if (isHostObject(value)) {
- return object ? value : {};
- }
- result = initCloneObject(isFunc ? {} : value);
- if (!isDeep) {
- return copySymbols(value, baseAssign(result, value));
- }
- } else {
- if (!cloneableTags[tag]) {
- return object ? value : {};
- }
- result = initCloneByTag(value, tag, baseClone, isDeep);
- }
- }
- // Check for circular references and return its corresponding clone.
- stack || (stack = new Stack);
- var stacked = stack.get(value);
- if (stacked) {
- return stacked;
- }
- stack.set(value, result);
-
- if (!isArr) {
- var props = isFull ? getAllKeys(value) : keys(value);
- }
- // Recursively populate clone (susceptible to call stack limits).
- arrayEach(props || value, function(subValue, key) {
- if (props) {
- key = subValue;
- subValue = value[key];
- }
- assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
- });
- return result;
- }
-
- /**
- * The base implementation of `_.conforms` which doesn't clone `source`.
- *
- * @private
- * @param {Object} source The object of property predicates to conform to.
- * @returns {Function} Returns the new function.
- */
- function baseConforms(source) {
- var props = keys(source),
- length = props.length;
-
- return function(object) {
- if (object == null) {
- return !length;
- }
- var index = length;
- while (index--) {
- var key = props[index],
- predicate = source[key],
- value = object[key];
-
- if ((value === undefined &&
- !(key in Object(object))) || !predicate(value)) {
- return false;
- }
- }
- return true;
- };
- }
-
- /**
- * The base implementation of `_.create` without support for assigning
- * properties to the created object.
- *
- * @private
- * @param {Object} prototype The object to inherit from.
- * @returns {Object} Returns the new object.
- */
- function baseCreate(proto) {
- return isObject(proto) ? objectCreate(proto) : {};
- }
-
- /**
- * The base implementation of `_.delay` and `_.defer` which accepts an array
- * of `func` arguments.
- *
- * @private
- * @param {Function} func The function to delay.
- * @param {number} wait The number of milliseconds to delay invocation.
- * @param {Object} args The arguments to provide to `func`.
- * @returns {number} Returns the timer id.
- */
- function baseDelay(func, wait, args) {
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- return setTimeout(function() { func.apply(undefined, args); }, wait);
- }
-
- /**
- * The base implementation of methods like `_.difference` without support
- * for excluding multiple arrays or iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Array} values The values to exclude.
- * @param {Function} [iteratee] The iteratee invoked per element.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new array of filtered values.
- */
- function baseDifference(array, values, iteratee, comparator) {
- var index = -1,
- includes = arrayIncludes,
- isCommon = true,
- length = array.length,
- result = [],
- valuesLength = values.length;
-
- if (!length) {
- return result;
- }
- if (iteratee) {
- values = arrayMap(values, baseUnary(iteratee));
- }
- if (comparator) {
- includes = arrayIncludesWith;
- isCommon = false;
- }
- else if (values.length >= LARGE_ARRAY_SIZE) {
- includes = cacheHas;
- isCommon = false;
- values = new SetCache(values);
- }
- outer:
- while (++index < length) {
- var value = array[index],
- computed = iteratee ? iteratee(value) : value;
-
- value = (comparator || value !== 0) ? value : 0;
- if (isCommon && computed === computed) {
- var valuesIndex = valuesLength;
- while (valuesIndex--) {
- if (values[valuesIndex] === computed) {
- continue outer;
- }
- }
- result.push(value);
- }
- else if (!includes(values, computed, comparator)) {
- result.push(value);
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `_.forEach` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array|Object} Returns `collection`.
- */
- var baseEach = createBaseEach(baseForOwn);
-
- /**
- * The base implementation of `_.forEachRight` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array|Object} Returns `collection`.
- */
- var baseEachRight = createBaseEach(baseForOwnRight, true);
-
- /**
- * The base implementation of `_.every` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if all elements pass the predicate check,
- * else `false`
- */
- function baseEvery(collection, predicate) {
- var result = true;
- baseEach(collection, function(value, index, collection) {
- result = !!predicate(value, index, collection);
- return result;
- });
- return result;
- }
-
- /**
- * The base implementation of methods like `_.max` and `_.min` which accepts a
- * `comparator` to determine the extremum value.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The iteratee invoked per iteration.
- * @param {Function} comparator The comparator used to compare values.
- * @returns {*} Returns the extremum value.
- */
- function baseExtremum(array, iteratee, comparator) {
- var index = -1,
- length = array.length;
-
- while (++index < length) {
- var value = array[index],
- current = iteratee(value);
-
- if (current != null && (computed === undefined
- ? (current === current && !isSymbol(current))
- : comparator(current, computed)
- )) {
- var computed = current,
- result = value;
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `_.fill` without an iteratee call guard.
- *
- * @private
- * @param {Array} array The array to fill.
- * @param {*} value The value to fill `array` with.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns `array`.
- */
- function baseFill(array, value, start, end) {
- var length = array.length;
-
- start = toInteger(start);
- if (start < 0) {
- start = -start > length ? 0 : (length + start);
- }
- end = (end === undefined || end > length) ? length : toInteger(end);
- if (end < 0) {
- end += length;
- }
- end = start > end ? 0 : toLength(end);
- while (start < end) {
- array[start++] = value;
- }
- return array;
- }
-
- /**
- * The base implementation of `_.filter` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
- */
- function baseFilter(collection, predicate) {
- var result = [];
- baseEach(collection, function(value, index, collection) {
- if (predicate(value, index, collection)) {
- result.push(value);
- }
- });
- return result;
- }
-
- /**
- * The base implementation of `_.flatten` with support for restricting flattening.
- *
- * @private
- * @param {Array} array The array to flatten.
- * @param {number} depth The maximum recursion depth.
- * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
- * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
- * @param {Array} [result=[]] The initial result value.
- * @returns {Array} Returns the new flattened array.
- */
- function baseFlatten(array, depth, predicate, isStrict, result) {
- var index = -1,
- length = array.length;
-
- predicate || (predicate = isFlattenable);
- result || (result = []);
-
- while (++index < length) {
- var value = array[index];
- if (depth > 0 && predicate(value)) {
- if (depth > 1) {
- // Recursively flatten arrays (susceptible to call stack limits).
- baseFlatten(value, depth - 1, predicate, isStrict, result);
- } else {
- arrayPush(result, value);
- }
- } else if (!isStrict) {
- result[result.length] = value;
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `baseForOwn` which iterates over `object`
- * properties returned by `keysFunc` and invokes `iteratee` for each property.
- * Iteratee functions may exit iteration early by explicitly returning `false`.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @returns {Object} Returns `object`.
- */
- var baseFor = createBaseFor();
-
- /**
- * This function is like `baseFor` except that it iterates over properties
- * in the opposite order.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @returns {Object} Returns `object`.
- */
- var baseForRight = createBaseFor(true);
-
- /**
- * The base implementation of `_.forOwn` without support for iteratee shorthands.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Object} Returns `object`.
- */
- function baseForOwn(object, iteratee) {
- return object && baseFor(object, iteratee, keys);
- }
-
- /**
- * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Object} Returns `object`.
- */
- function baseForOwnRight(object, iteratee) {
- return object && baseForRight(object, iteratee, keys);
- }
-
- /**
- * The base implementation of `_.functions` which creates an array of
- * `object` function property names filtered from `props`.
- *
- * @private
- * @param {Object} object The object to inspect.
- * @param {Array} props The property names to filter.
- * @returns {Array} Returns the new array of filtered property names.
- */
- function baseFunctions(object, props) {
- return arrayFilter(props, function(key) {
- return isFunction(object[key]);
- });
- }
-
- /**
- * The base implementation of `_.get` without support for default values.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to get.
- * @returns {*} Returns the resolved value.
- */
- function baseGet(object, path) {
- path = isKey(path, object) ? [path] : castPath(path);
-
- var index = 0,
- length = path.length;
-
- while (object != null && index < length) {
- object = object[toKey(path[index++])];
- }
- return (index && index == length) ? object : undefined;
- }
-
- /**
- * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
- * `keysFunc` and `symbolsFunc` to get the enumerable property names and
- * symbols of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @param {Function} symbolsFunc The function to get the symbols of `object`.
- * @returns {Array} Returns the array of property names and symbols.
- */
- function baseGetAllKeys(object, keysFunc, symbolsFunc) {
- var result = keysFunc(object);
- return isArray(object)
- ? result
- : arrayPush(result, symbolsFunc(object));
- }
-
- /**
- * The base implementation of `_.gt` which doesn't coerce arguments to numbers.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is greater than `other`,
- * else `false`.
- */
- function baseGt(value, other) {
- return value > other;
- }
-
- /**
- * The base implementation of `_.has` without support for deep paths.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} key The key to check.
- * @returns {boolean} Returns `true` if `key` exists, else `false`.
- */
- function baseHas(object, key) {
- // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
- // that are composed entirely of index properties, return `false` for
- // `hasOwnProperty` checks of them.
- return hasOwnProperty.call(object, key) ||
- (typeof object == 'object' && key in object && getPrototype(object) === null);
- }
-
- /**
- * The base implementation of `_.hasIn` without support for deep paths.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} key The key to check.
- * @returns {boolean} Returns `true` if `key` exists, else `false`.
- */
- function baseHasIn(object, key) {
- return key in Object(object);
- }
-
- /**
- * The base implementation of `_.inRange` which doesn't coerce arguments to numbers.
- *
- * @private
- * @param {number} number The number to check.
- * @param {number} start The start of the range.
- * @param {number} end The end of the range.
- * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
- */
- function baseInRange(number, start, end) {
- return number >= nativeMin(start, end) && number < nativeMax(start, end);
- }
-
- /**
- * The base implementation of methods like `_.intersection`, without support
- * for iteratee shorthands, that accepts an array of arrays to inspect.
- *
- * @private
- * @param {Array} arrays The arrays to inspect.
- * @param {Function} [iteratee] The iteratee invoked per element.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new array of shared values.
- */
- function baseIntersection(arrays, iteratee, comparator) {
- var includes = comparator ? arrayIncludesWith : arrayIncludes,
- length = arrays[0].length,
- othLength = arrays.length,
- othIndex = othLength,
- caches = Array(othLength),
- maxLength = Infinity,
- result = [];
-
- while (othIndex--) {
- var array = arrays[othIndex];
- if (othIndex && iteratee) {
- array = arrayMap(array, baseUnary(iteratee));
- }
- maxLength = nativeMin(array.length, maxLength);
- caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
- ? new SetCache(othIndex && array)
- : undefined;
- }
- array = arrays[0];
-
- var index = -1,
- seen = caches[0];
-
- outer:
- while (++index < length && result.length < maxLength) {
- var value = array[index],
- computed = iteratee ? iteratee(value) : value;
-
- value = (comparator || value !== 0) ? value : 0;
- if (!(seen
- ? cacheHas(seen, computed)
- : includes(result, computed, comparator)
- )) {
- othIndex = othLength;
- while (--othIndex) {
- var cache = caches[othIndex];
- if (!(cache
- ? cacheHas(cache, computed)
- : includes(arrays[othIndex], computed, comparator))
- ) {
- continue outer;
- }
- }
- if (seen) {
- seen.push(computed);
- }
- result.push(value);
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `_.invert` and `_.invertBy` which inverts
- * `object` with values transformed by `iteratee` and set by `setter`.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} setter The function to set `accumulator` values.
- * @param {Function} iteratee The iteratee to transform values.
- * @param {Object} accumulator The initial inverted object.
- * @returns {Function} Returns `accumulator`.
- */
- function baseInverter(object, setter, iteratee, accumulator) {
- baseForOwn(object, function(value, key, object) {
- setter(accumulator, iteratee(value), key, object);
- });
- return accumulator;
- }
-
- /**
- * The base implementation of `_.invoke` without support for individual
- * method arguments.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the method to invoke.
- * @param {Array} args The arguments to invoke the method with.
- * @returns {*} Returns the result of the invoked method.
- */
- function baseInvoke(object, path, args) {
- if (!isKey(path, object)) {
- path = castPath(path);
- object = parent(object, path);
- path = last(path);
- }
- var func = object == null ? object : object[toKey(path)];
- return func == null ? undefined : apply(func, object, args);
- }
-
- /**
- * The base implementation of `_.isEqual` which supports partial comparisons
- * and tracks traversed objects.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @param {Function} [customizer] The function to customize comparisons.
- * @param {boolean} [bitmask] The bitmask of comparison flags.
- * The bitmask may be composed of the following flags:
- * 1 - Unordered comparison
- * 2 - Partial comparison
- * @param {Object} [stack] Tracks traversed `value` and `other` objects.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- */
- function baseIsEqual(value, other, customizer, bitmask, stack) {
- if (value === other) {
- return true;
- }
- if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
- return value !== value && other !== other;
- }
- return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
- }
-
- /**
- * A specialized version of `baseIsEqual` for arrays and objects which performs
- * deep comparisons and tracks traversed objects enabling objects with circular
- * references to be compared.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} [customizer] The function to customize comparisons.
- * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`
- * for more details.
- * @param {Object} [stack] Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
- var objIsArr = isArray(object),
- othIsArr = isArray(other),
- objTag = arrayTag,
- othTag = arrayTag;
-
- if (!objIsArr) {
- objTag = getTag(object);
- objTag = objTag == argsTag ? objectTag : objTag;
- }
- if (!othIsArr) {
- othTag = getTag(other);
- othTag = othTag == argsTag ? objectTag : othTag;
- }
- var objIsObj = objTag == objectTag && !isHostObject(object),
- othIsObj = othTag == objectTag && !isHostObject(other),
- isSameTag = objTag == othTag;
-
- if (isSameTag && !objIsObj) {
- stack || (stack = new Stack);
- return (objIsArr || isTypedArray(object))
- ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)
- : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
- }
- if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
- var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
- othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
-
- if (objIsWrapped || othIsWrapped) {
- var objUnwrapped = objIsWrapped ? object.value() : object,
- othUnwrapped = othIsWrapped ? other.value() : other;
-
- stack || (stack = new Stack);
- return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);
- }
- }
- if (!isSameTag) {
- return false;
- }
- stack || (stack = new Stack);
- return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
- }
-
- /**
- * The base implementation of `_.isMatch` without support for iteratee shorthands.
- *
- * @private
- * @param {Object} object The object to inspect.
- * @param {Object} source The object of property values to match.
- * @param {Array} matchData The property names, values, and compare flags to match.
- * @param {Function} [customizer] The function to customize comparisons.
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
- */
- function baseIsMatch(object, source, matchData, customizer) {
- var index = matchData.length,
- length = index,
- noCustomizer = !customizer;
-
- if (object == null) {
- return !length;
- }
- object = Object(object);
- while (index--) {
- var data = matchData[index];
- if ((noCustomizer && data[2])
- ? data[1] !== object[data[0]]
- : !(data[0] in object)
- ) {
- return false;
- }
- }
- while (++index < length) {
- data = matchData[index];
- var key = data[0],
- objValue = object[key],
- srcValue = data[1];
-
- if (noCustomizer && data[2]) {
- if (objValue === undefined && !(key in object)) {
- return false;
- }
- } else {
- var stack = new Stack;
- if (customizer) {
- var result = customizer(objValue, srcValue, key, object, source, stack);
- }
- if (!(result === undefined
- ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)
- : result
- )) {
- return false;
- }
- }
- }
- return true;
- }
-
- /**
- * The base implementation of `_.iteratee`.
- *
- * @private
- * @param {*} [value=_.identity] The value to convert to an iteratee.
- * @returns {Function} Returns the iteratee.
- */
- function baseIteratee(value) {
- // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
- // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
- if (typeof value == 'function') {
- return value;
- }
- if (value == null) {
- return identity;
- }
- if (typeof value == 'object') {
- return isArray(value)
- ? baseMatchesProperty(value[0], value[1])
- : baseMatches(value);
- }
- return property(value);
- }
-
- /**
- * The base implementation of `_.keys` which doesn't skip the constructor
- * property of prototypes or treat sparse arrays as dense.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
- function baseKeys(object) {
- return nativeKeys(Object(object));
- }
-
- /**
- * The base implementation of `_.keysIn` which doesn't skip the constructor
- * property of prototypes or treat sparse arrays as dense.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
- function baseKeysIn(object) {
- object = object == null ? object : Object(object);
-
- var result = [];
- for (var key in object) {
- result.push(key);
- }
- return result;
- }
-
- // Fallback for IE < 9 with es6-shim.
- if (enumerate && !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf')) {
- baseKeysIn = function(object) {
- return iteratorToArray(enumerate(object));
- };
- }
-
- /**
- * The base implementation of `_.lt` which doesn't coerce arguments to numbers.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is less than `other`,
- * else `false`.
- */
- function baseLt(value, other) {
- return value < other;
- }
-
- /**
- * The base implementation of `_.map` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
- */
- function baseMap(collection, iteratee) {
- var index = -1,
- result = isArrayLike(collection) ? Array(collection.length) : [];
-
- baseEach(collection, function(value, key, collection) {
- result[++index] = iteratee(value, key, collection);
- });
- return result;
- }
-
- /**
- * The base implementation of `_.matches` which doesn't clone `source`.
- *
- * @private
- * @param {Object} source The object of property values to match.
- * @returns {Function} Returns the new function.
- */
- function baseMatches(source) {
- var matchData = getMatchData(source);
- if (matchData.length == 1 && matchData[0][2]) {
- return matchesStrictComparable(matchData[0][0], matchData[0][1]);
- }
- return function(object) {
- return object === source || baseIsMatch(object, source, matchData);
- };
- }
-
- /**
- * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
- *
- * @private
- * @param {string} path The path of the property to get.
- * @param {*} srcValue The value to match.
- * @returns {Function} Returns the new function.
- */
- function baseMatchesProperty(path, srcValue) {
- if (isKey(path) && isStrictComparable(srcValue)) {
- return matchesStrictComparable(toKey(path), srcValue);
- }
- return function(object) {
- var objValue = get(object, path);
- return (objValue === undefined && objValue === srcValue)
- ? hasIn(object, path)
- : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
- };
- }
-
- /**
- * The base implementation of `_.merge` without support for multiple sources.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {number} srcIndex The index of `source`.
- * @param {Function} [customizer] The function to customize merged values.
- * @param {Object} [stack] Tracks traversed source values and their merged
- * counterparts.
- */
- function baseMerge(object, source, srcIndex, customizer, stack) {
- if (object === source) {
- return;
- }
- if (!(isArray(source) || isTypedArray(source))) {
- var props = keysIn(source);
- }
- arrayEach(props || source, function(srcValue, key) {
- if (props) {
- key = srcValue;
- srcValue = source[key];
- }
- if (isObject(srcValue)) {
- stack || (stack = new Stack);
- baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
- }
- else {
- var newValue = customizer
- ? customizer(object[key], srcValue, (key + ''), object, source, stack)
- : undefined;
-
- if (newValue === undefined) {
- newValue = srcValue;
- }
- assignMergeValue(object, key, newValue);
- }
- });
- }
-
- /**
- * A specialized version of `baseMerge` for arrays and objects which performs
- * deep merges and tracks traversed objects enabling objects with circular
- * references to be merged.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {string} key The key of the value to merge.
- * @param {number} srcIndex The index of `source`.
- * @param {Function} mergeFunc The function to merge values.
- * @param {Function} [customizer] The function to customize assigned values.
- * @param {Object} [stack] Tracks traversed source values and their merged
- * counterparts.
- */
- function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
- var objValue = object[key],
- srcValue = source[key],
- stacked = stack.get(srcValue);
-
- if (stacked) {
- assignMergeValue(object, key, stacked);
- return;
- }
- var newValue = customizer
- ? customizer(objValue, srcValue, (key + ''), object, source, stack)
- : undefined;
-
- var isCommon = newValue === undefined;
-
- if (isCommon) {
- newValue = srcValue;
- if (isArray(srcValue) || isTypedArray(srcValue)) {
- if (isArray(objValue)) {
- newValue = objValue;
- }
- else if (isArrayLikeObject(objValue)) {
- newValue = copyArray(objValue);
- }
- else {
- isCommon = false;
- newValue = baseClone(srcValue, true);
- }
- }
- else if (isPlainObject(srcValue) || isArguments(srcValue)) {
- if (isArguments(objValue)) {
- newValue = toPlainObject(objValue);
- }
- else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
- isCommon = false;
- newValue = baseClone(srcValue, true);
- }
- else {
- newValue = objValue;
- }
- }
- else {
- isCommon = false;
- }
- }
- stack.set(srcValue, newValue);
-
- if (isCommon) {
- // Recursively merge objects and arrays (susceptible to call stack limits).
- mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
- }
- stack['delete'](srcValue);
- assignMergeValue(object, key, newValue);
- }
-
- /**
- * The base implementation of `_.nth` which doesn't coerce `n` to an integer.
- *
- * @private
- * @param {Array} array The array to query.
- * @param {number} n The index of the element to return.
- * @returns {*} Returns the nth element of `array`.
- */
- function baseNth(array, n) {
- var length = array.length;
- if (!length) {
- return;
- }
- n += n < 0 ? length : 0;
- return isIndex(n, length) ? array[n] : undefined;
- }
-
- /**
- * The base implementation of `_.orderBy` without param guards.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
- * @param {string[]} orders The sort orders of `iteratees`.
- * @returns {Array} Returns the new sorted array.
- */
- function baseOrderBy(collection, iteratees, orders) {
- var index = -1;
- iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));
-
- var result = baseMap(collection, function(value, key, collection) {
- var criteria = arrayMap(iteratees, function(iteratee) {
- return iteratee(value);
- });
- return { 'criteria': criteria, 'index': ++index, 'value': value };
- });
-
- return baseSortBy(result, function(object, other) {
- return compareMultiple(object, other, orders);
- });
- }
-
- /**
- * The base implementation of `_.pick` without support for individual
- * property identifiers.
- *
- * @private
- * @param {Object} object The source object.
- * @param {string[]} props The property identifiers to pick.
- * @returns {Object} Returns the new object.
- */
- function basePick(object, props) {
- object = Object(object);
- return arrayReduce(props, function(result, key) {
- if (key in object) {
- result[key] = object[key];
- }
- return result;
- }, {});
- }
-
- /**
- * The base implementation of `_.pickBy` without support for iteratee shorthands.
- *
- * @private
- * @param {Object} object The source object.
- * @param {Function} predicate The function invoked per property.
- * @returns {Object} Returns the new object.
- */
- function basePickBy(object, predicate) {
- var index = -1,
- props = getAllKeysIn(object),
- length = props.length,
- result = {};
-
- while (++index < length) {
- var key = props[index],
- value = object[key];
-
- if (predicate(value, key)) {
- result[key] = value;
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `_.property` without support for deep paths.
- *
- * @private
- * @param {string} key The key of the property to get.
- * @returns {Function} Returns the new function.
- */
- function baseProperty(key) {
- return function(object) {
- return object == null ? undefined : object[key];
- };
- }
-
- /**
- * A specialized version of `baseProperty` which supports deep paths.
- *
- * @private
- * @param {Array|string} path The path of the property to get.
- * @returns {Function} Returns the new function.
- */
- function basePropertyDeep(path) {
- return function(object) {
- return baseGet(object, path);
- };
- }
-
- /**
- * The base implementation of `_.pullAllBy` without support for iteratee
- * shorthands.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {Array} values The values to remove.
- * @param {Function} [iteratee] The iteratee invoked per element.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns `array`.
- */
- function basePullAll(array, values, iteratee, comparator) {
- var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
- index = -1,
- length = values.length,
- seen = array;
-
- if (iteratee) {
- seen = arrayMap(array, baseUnary(iteratee));
- }
- while (++index < length) {
- var fromIndex = 0,
- value = values[index],
- computed = iteratee ? iteratee(value) : value;
-
- while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
- if (seen !== array) {
- splice.call(seen, fromIndex, 1);
- }
- splice.call(array, fromIndex, 1);
- }
- }
- return array;
- }
-
- /**
- * The base implementation of `_.pullAt` without support for individual
- * indexes or capturing the removed elements.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {number[]} indexes The indexes of elements to remove.
- * @returns {Array} Returns `array`.
- */
- function basePullAt(array, indexes) {
- var length = array ? indexes.length : 0,
- lastIndex = length - 1;
-
- while (length--) {
- var index = indexes[length];
- if (length == lastIndex || index !== previous) {
- var previous = index;
- if (isIndex(index)) {
- splice.call(array, index, 1);
- }
- else if (!isKey(index, array)) {
- var path = castPath(index),
- object = parent(array, path);
-
- if (object != null) {
- delete object[toKey(last(path))];
- }
- }
- else {
- delete array[toKey(index)];
- }
- }
- }
- return array;
- }
-
- /**
- * The base implementation of `_.random` without support for returning
- * floating-point numbers.
- *
- * @private
- * @param {number} lower The lower bound.
- * @param {number} upper The upper bound.
- * @returns {number} Returns the random number.
- */
- function baseRandom(lower, upper) {
- return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
- }
-
- /**
- * The base implementation of `_.range` and `_.rangeRight` which doesn't
- * coerce arguments to numbers.
- *
- * @private
- * @param {number} start The start of the range.
- * @param {number} end The end of the range.
- * @param {number} step The value to increment or decrement by.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Array} Returns the new array of numbers.
- */
- function baseRange(start, end, step, fromRight) {
- var index = -1,
- length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
- result = Array(length);
-
- while (length--) {
- result[fromRight ? length : ++index] = start;
- start += step;
- }
- return result;
- }
-
- /**
- * The base implementation of `_.repeat` which doesn't coerce arguments.
- *
- * @private
- * @param {string} string The string to repeat.
- * @param {number} n The number of times to repeat the string.
- * @returns {string} Returns the repeated string.
- */
- function baseRepeat(string, n) {
- var result = '';
- if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
- return result;
- }
- // Leverage the exponentiation by squaring algorithm for a faster repeat.
- // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
- do {
- if (n % 2) {
- result += string;
- }
- n = nativeFloor(n / 2);
- if (n) {
- string += string;
- }
- } while (n);
-
- return result;
- }
-
- /**
- * The base implementation of `_.set`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to set.
- * @param {*} value The value to set.
- * @param {Function} [customizer] The function to customize path creation.
- * @returns {Object} Returns `object`.
- */
- function baseSet(object, path, value, customizer) {
- path = isKey(path, object) ? [path] : castPath(path);
-
- var index = -1,
- length = path.length,
- lastIndex = length - 1,
- nested = object;
-
- while (nested != null && ++index < length) {
- var key = toKey(path[index]);
- if (isObject(nested)) {
- var newValue = value;
- if (index != lastIndex) {
- var objValue = nested[key];
- newValue = customizer ? customizer(objValue, key, nested) : undefined;
- if (newValue === undefined) {
- newValue = objValue == null
- ? (isIndex(path[index + 1]) ? [] : {})
- : objValue;
- }
- }
- assignValue(nested, key, newValue);
- }
- nested = nested[key];
- }
- return object;
- }
-
- /**
- * The base implementation of `setData` without support for hot loop detection.
- *
- * @private
- * @param {Function} func The function to associate metadata with.
- * @param {*} data The metadata.
- * @returns {Function} Returns `func`.
- */
- var baseSetData = !metaMap ? identity : function(func, data) {
- metaMap.set(func, data);
- return func;
- };
-
- /**
- * The base implementation of `_.slice` without an iteratee call guard.
- *
- * @private
- * @param {Array} array The array to slice.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns the slice of `array`.
- */
- function baseSlice(array, start, end) {
- var index = -1,
- length = array.length;
-
- if (start < 0) {
- start = -start > length ? 0 : (length + start);
- }
- end = end > length ? length : end;
- if (end < 0) {
- end += length;
- }
- length = start > end ? 0 : ((end - start) >>> 0);
- start >>>= 0;
-
- var result = Array(length);
- while (++index < length) {
- result[index] = array[index + start];
- }
- return result;
- }
-
- /**
- * The base implementation of `_.some` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if any element passes the predicate check,
- * else `false`.
- */
- function baseSome(collection, predicate) {
- var result;
-
- baseEach(collection, function(value, index, collection) {
- result = predicate(value, index, collection);
- return !result;
- });
- return !!result;
- }
-
- /**
- * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
- * performs a binary search of `array` to determine the index at which `value`
- * should be inserted into `array` in order to maintain its sort order.
- *
- * @private
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @param {boolean} [retHighest] Specify returning the highest qualified index.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- */
- function baseSortedIndex(array, value, retHighest) {
- var low = 0,
- high = array ? array.length : low;
-
- if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
- while (low < high) {
- var mid = (low + high) >>> 1,
- computed = array[mid];
-
- if (computed !== null && !isSymbol(computed) &&
- (retHighest ? (computed <= value) : (computed < value))) {
- low = mid + 1;
- } else {
- high = mid;
- }
- }
- return high;
- }
- return baseSortedIndexBy(array, value, identity, retHighest);
- }
-
- /**
- * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
- * which invokes `iteratee` for `value` and each element of `array` to compute
- * their sort ranking. The iteratee is invoked with one argument; (value).
- *
- * @private
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @param {Function} iteratee The iteratee invoked per element.
- * @param {boolean} [retHighest] Specify returning the highest qualified index.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- */
- function baseSortedIndexBy(array, value, iteratee, retHighest) {
- value = iteratee(value);
-
- var low = 0,
- high = array ? array.length : 0,
- valIsNaN = value !== value,
- valIsNull = value === null,
- valIsSymbol = isSymbol(value),
- valIsUndefined = value === undefined;
-
- while (low < high) {
- var mid = nativeFloor((low + high) / 2),
- computed = iteratee(array[mid]),
- othIsDefined = computed !== undefined,
- othIsNull = computed === null,
- othIsReflexive = computed === computed,
- othIsSymbol = isSymbol(computed);
-
- if (valIsNaN) {
- var setLow = retHighest || othIsReflexive;
- } else if (valIsUndefined) {
- setLow = othIsReflexive && (retHighest || othIsDefined);
- } else if (valIsNull) {
- setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
- } else if (valIsSymbol) {
- setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
- } else if (othIsNull || othIsSymbol) {
- setLow = false;
- } else {
- setLow = retHighest ? (computed <= value) : (computed < value);
- }
- if (setLow) {
- low = mid + 1;
- } else {
- high = mid;
- }
- }
- return nativeMin(high, MAX_ARRAY_INDEX);
- }
-
- /**
- * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
- * support for iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Function} [iteratee] The iteratee invoked per element.
- * @returns {Array} Returns the new duplicate free array.
- */
- function baseSortedUniq(array, iteratee) {
- var index = -1,
- length = array.length,
- resIndex = 0,
- result = [];
-
- while (++index < length) {
- var value = array[index],
- computed = iteratee ? iteratee(value) : value;
-
- if (!index || !eq(computed, seen)) {
- var seen = computed;
- result[resIndex++] = value === 0 ? 0 : value;
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `_.toNumber` which doesn't ensure correct
- * conversions of binary, hexadecimal, or octal string values.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {number} Returns the number.
- */
- function baseToNumber(value) {
- if (typeof value == 'number') {
- return value;
- }
- if (isSymbol(value)) {
- return NAN;
- }
- return +value;
- }
-
- /**
- * The base implementation of `_.toString` which doesn't convert nullish
- * values to empty strings.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
- */
- function baseToString(value) {
- // Exit early for strings to avoid a performance hit in some environments.
- if (typeof value == 'string') {
- return value;
- }
- if (isSymbol(value)) {
- return symbolToString ? symbolToString.call(value) : '';
- }
- var result = (value + '');
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
- }
-
- /**
- * The base implementation of `_.uniqBy` without support for iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Function} [iteratee] The iteratee invoked per element.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new duplicate free array.
- */
- function baseUniq(array, iteratee, comparator) {
- var index = -1,
- includes = arrayIncludes,
- length = array.length,
- isCommon = true,
- result = [],
- seen = result;
-
- if (comparator) {
- isCommon = false;
- includes = arrayIncludesWith;
- }
- else if (length >= LARGE_ARRAY_SIZE) {
- var set = iteratee ? null : createSet(array);
- if (set) {
- return setToArray(set);
- }
- isCommon = false;
- includes = cacheHas;
- seen = new SetCache;
- }
- else {
- seen = iteratee ? [] : result;
- }
- outer:
- while (++index < length) {
- var value = array[index],
- computed = iteratee ? iteratee(value) : value;
-
- value = (comparator || value !== 0) ? value : 0;
- if (isCommon && computed === computed) {
- var seenIndex = seen.length;
- while (seenIndex--) {
- if (seen[seenIndex] === computed) {
- continue outer;
- }
- }
- if (iteratee) {
- seen.push(computed);
- }
- result.push(value);
- }
- else if (!includes(seen, computed, comparator)) {
- if (seen !== result) {
- seen.push(computed);
- }
- result.push(value);
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `_.unset`.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {Array|string} path The path of the property to unset.
- * @returns {boolean} Returns `true` if the property is deleted, else `false`.
- */
- function baseUnset(object, path) {
- path = isKey(path, object) ? [path] : castPath(path);
- object = parent(object, path);
-
- var key = toKey(last(path));
- return !(object != null && baseHas(object, key)) || delete object[key];
- }
-
- /**
- * The base implementation of `_.update`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to update.
- * @param {Function} updater The function to produce the updated value.
- * @param {Function} [customizer] The function to customize path creation.
- * @returns {Object} Returns `object`.
- */
- function baseUpdate(object, path, updater, customizer) {
- return baseSet(object, path, updater(baseGet(object, path)), customizer);
- }
-
- /**
- * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
- * without support for iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to query.
- * @param {Function} predicate The function invoked per iteration.
- * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Array} Returns the slice of `array`.
- */
- function baseWhile(array, predicate, isDrop, fromRight) {
- var length = array.length,
- index = fromRight ? length : -1;
-
- while ((fromRight ? index-- : ++index < length) &&
- predicate(array[index], index, array)) {}
-
- return isDrop
- ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
- : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
- }
-
- /**
- * The base implementation of `wrapperValue` which returns the result of
- * performing a sequence of actions on the unwrapped `value`, where each
- * successive action is supplied the return value of the previous.
- *
- * @private
- * @param {*} value The unwrapped value.
- * @param {Array} actions Actions to perform to resolve the unwrapped value.
- * @returns {*} Returns the resolved value.
- */
- function baseWrapperValue(value, actions) {
- var result = value;
- if (result instanceof LazyWrapper) {
- result = result.value();
- }
- return arrayReduce(actions, function(result, action) {
- return action.func.apply(action.thisArg, arrayPush([result], action.args));
- }, result);
- }
-
- /**
- * The base implementation of methods like `_.xor`, without support for
- * iteratee shorthands, that accepts an array of arrays to inspect.
- *
- * @private
- * @param {Array} arrays The arrays to inspect.
- * @param {Function} [iteratee] The iteratee invoked per element.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new array of values.
- */
- function baseXor(arrays, iteratee, comparator) {
- var index = -1,
- length = arrays.length;
-
- while (++index < length) {
- var result = result
- ? arrayPush(
- baseDifference(result, arrays[index], iteratee, comparator),
- baseDifference(arrays[index], result, iteratee, comparator)
- )
- : arrays[index];
- }
- return (result && result.length) ? baseUniq(result, iteratee, comparator) : [];
- }
-
- /**
- * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
- *
- * @private
- * @param {Array} props The property identifiers.
- * @param {Array} values The property values.
- * @param {Function} assignFunc The function to assign values.
- * @returns {Object} Returns the new object.
- */
- function baseZipObject(props, values, assignFunc) {
- var index = -1,
- length = props.length,
- valsLength = values.length,
- result = {};
-
- while (++index < length) {
- var value = index < valsLength ? values[index] : undefined;
- assignFunc(result, props[index], value);
- }
- return result;
- }
-
- /**
- * Casts `value` to an empty array if it's not an array like object.
- *
- * @private
- * @param {*} value The value to inspect.
- * @returns {Array|Object} Returns the cast array-like object.
- */
- function castArrayLikeObject(value) {
- return isArrayLikeObject(value) ? value : [];
- }
-
- /**
- * Casts `value` to `identity` if it's not a function.
- *
- * @private
- * @param {*} value The value to inspect.
- * @returns {Function} Returns cast function.
- */
- function castFunction(value) {
- return typeof value == 'function' ? value : identity;
- }
-
- /**
- * Casts `value` to a path array if it's not one.
- *
- * @private
- * @param {*} value The value to inspect.
- * @returns {Array} Returns the cast property path array.
- */
- function castPath(value) {
- return isArray(value) ? value : stringToPath(value);
- }
-
- /**
- * Casts `array` to a slice if it's needed.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {number} start The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns the cast slice.
- */
- function castSlice(array, start, end) {
- var length = array.length;
- end = end === undefined ? length : end;
- return (!start && end >= length) ? array : baseSlice(array, start, end);
- }
-
- /**
- * Creates a clone of `buffer`.
- *
- * @private
- * @param {Buffer} buffer The buffer to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Buffer} Returns the cloned buffer.
- */
- function cloneBuffer(buffer, isDeep) {
- if (isDeep) {
- return buffer.slice();
- }
- var result = new buffer.constructor(buffer.length);
- buffer.copy(result);
- return result;
- }
-
- /**
- * Creates a clone of `arrayBuffer`.
- *
- * @private
- * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
- * @returns {ArrayBuffer} Returns the cloned array buffer.
- */
- function cloneArrayBuffer(arrayBuffer) {
- var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
- new Uint8Array(result).set(new Uint8Array(arrayBuffer));
- return result;
- }
-
- /**
- * Creates a clone of `dataView`.
- *
- * @private
- * @param {Object} dataView The data view to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned data view.
- */
- function cloneDataView(dataView, isDeep) {
- var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
- return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
- }
-
- /**
- * Creates a clone of `map`.
- *
- * @private
- * @param {Object} map The map to clone.
- * @param {Function} cloneFunc The function to clone values.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned map.
- */
- function cloneMap(map, isDeep, cloneFunc) {
- var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
- return arrayReduce(array, addMapEntry, new map.constructor);
- }
-
- /**
- * Creates a clone of `regexp`.
- *
- * @private
- * @param {Object} regexp The regexp to clone.
- * @returns {Object} Returns the cloned regexp.
- */
- function cloneRegExp(regexp) {
- var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
- result.lastIndex = regexp.lastIndex;
- return result;
- }
-
- /**
- * Creates a clone of `set`.
- *
- * @private
- * @param {Object} set The set to clone.
- * @param {Function} cloneFunc The function to clone values.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned set.
- */
- function cloneSet(set, isDeep, cloneFunc) {
- var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
- return arrayReduce(array, addSetEntry, new set.constructor);
- }
-
- /**
- * Creates a clone of the `symbol` object.
- *
- * @private
- * @param {Object} symbol The symbol object to clone.
- * @returns {Object} Returns the cloned symbol object.
- */
- function cloneSymbol(symbol) {
- return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
- }
-
- /**
- * Creates a clone of `typedArray`.
- *
- * @private
- * @param {Object} typedArray The typed array to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned typed array.
- */
- function cloneTypedArray(typedArray, isDeep) {
- var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
- return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
- }
-
- /**
- * Compares values to sort them in ascending order.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {number} Returns the sort order indicator for `value`.
- */
- function compareAscending(value, other) {
- if (value !== other) {
- var valIsDefined = value !== undefined,
- valIsNull = value === null,
- valIsReflexive = value === value,
- valIsSymbol = isSymbol(value);
-
- var othIsDefined = other !== undefined,
- othIsNull = other === null,
- othIsReflexive = other === other,
- othIsSymbol = isSymbol(other);
-
- if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
- (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
- (valIsNull && othIsDefined && othIsReflexive) ||
- (!valIsDefined && othIsReflexive) ||
- !valIsReflexive) {
- return 1;
- }
- if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
- (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
- (othIsNull && valIsDefined && valIsReflexive) ||
- (!othIsDefined && valIsReflexive) ||
- !othIsReflexive) {
- return -1;
- }
- }
- return 0;
- }
-
- /**
- * Used by `_.orderBy` to compare multiple properties of a value to another
- * and stable sort them.
- *
- * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
- * specify an order of "desc" for descending or "asc" for ascending sort order
- * of corresponding values.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {boolean[]|string[]} orders The order to sort by for each property.
- * @returns {number} Returns the sort order indicator for `object`.
- */
- function compareMultiple(object, other, orders) {
- var index = -1,
- objCriteria = object.criteria,
- othCriteria = other.criteria,
- length = objCriteria.length,
- ordersLength = orders.length;
-
- while (++index < length) {
- var result = compareAscending(objCriteria[index], othCriteria[index]);
- if (result) {
- if (index >= ordersLength) {
- return result;
- }
- var order = orders[index];
- return result * (order == 'desc' ? -1 : 1);
- }
- }
- // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
- // that causes it, under certain circumstances, to provide the same value for
- // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
- // for more details.
- //
- // This also ensures a stable sort in V8 and other engines.
- // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
- return object.index - other.index;
- }
-
- /**
- * Creates an array that is the composition of partially applied arguments,
- * placeholders, and provided arguments into a single array of arguments.
- *
- * @private
- * @param {Array|Object} args The provided arguments.
- * @param {Array} partials The arguments to prepend to those provided.
- * @param {Array} holders The `partials` placeholder indexes.
- * @params {boolean} [isCurried] Specify composing for a curried function.
- * @returns {Array} Returns the new array of composed arguments.
- */
- function composeArgs(args, partials, holders, isCurried) {
- var argsIndex = -1,
- argsLength = args.length,
- holdersLength = holders.length,
- leftIndex = -1,
- leftLength = partials.length,
- rangeLength = nativeMax(argsLength - holdersLength, 0),
- result = Array(leftLength + rangeLength),
- isUncurried = !isCurried;
-
- while (++leftIndex < leftLength) {
- result[leftIndex] = partials[leftIndex];
- }
- while (++argsIndex < holdersLength) {
- if (isUncurried || argsIndex < argsLength) {
- result[holders[argsIndex]] = args[argsIndex];
- }
- }
- while (rangeLength--) {
- result[leftIndex++] = args[argsIndex++];
- }
- return result;
- }
-
- /**
- * This function is like `composeArgs` except that the arguments composition
- * is tailored for `_.partialRight`.
- *
- * @private
- * @param {Array|Object} args The provided arguments.
- * @param {Array} partials The arguments to append to those provided.
- * @param {Array} holders The `partials` placeholder indexes.
- * @params {boolean} [isCurried] Specify composing for a curried function.
- * @returns {Array} Returns the new array of composed arguments.
- */
- function composeArgsRight(args, partials, holders, isCurried) {
- var argsIndex = -1,
- argsLength = args.length,
- holdersIndex = -1,
- holdersLength = holders.length,
- rightIndex = -1,
- rightLength = partials.length,
- rangeLength = nativeMax(argsLength - holdersLength, 0),
- result = Array(rangeLength + rightLength),
- isUncurried = !isCurried;
-
- while (++argsIndex < rangeLength) {
- result[argsIndex] = args[argsIndex];
- }
- var offset = argsIndex;
- while (++rightIndex < rightLength) {
- result[offset + rightIndex] = partials[rightIndex];
- }
- while (++holdersIndex < holdersLength) {
- if (isUncurried || argsIndex < argsLength) {
- result[offset + holders[holdersIndex]] = args[argsIndex++];
- }
- }
- return result;
- }
-
- /**
- * Copies the values of `source` to `array`.
- *
- * @private
- * @param {Array} source The array to copy values from.
- * @param {Array} [array=[]] The array to copy values to.
- * @returns {Array} Returns `array`.
- */
- function copyArray(source, array) {
- var index = -1,
- length = source.length;
-
- array || (array = Array(length));
- while (++index < length) {
- array[index] = source[index];
- }
- return array;
- }
-
- /**
- * Copies properties of `source` to `object`.
- *
- * @private
- * @param {Object} source The object to copy properties from.
- * @param {Array} props The property identifiers to copy.
- * @param {Object} [object={}] The object to copy properties to.
- * @param {Function} [customizer] The function to customize copied values.
- * @returns {Object} Returns `object`.
- */
- function copyObject(source, props, object, customizer) {
- object || (object = {});
-
- var index = -1,
- length = props.length;
-
- while (++index < length) {
- var key = props[index];
-
- var newValue = customizer
- ? customizer(object[key], source[key], key, object, source)
- : source[key];
-
- assignValue(object, key, newValue);
- }
- return object;
- }
-
- /**
- * Copies own symbol properties of `source` to `object`.
- *
- * @private
- * @param {Object} source The object to copy symbols from.
- * @param {Object} [object={}] The object to copy symbols to.
- * @returns {Object} Returns `object`.
- */
- function copySymbols(source, object) {
- return copyObject(source, getSymbols(source), object);
- }
-
- /**
- * Creates a function like `_.groupBy`.
- *
- * @private
- * @param {Function} setter The function to set accumulator values.
- * @param {Function} [initializer] The accumulator object initializer.
- * @returns {Function} Returns the new aggregator function.
- */
- function createAggregator(setter, initializer) {
- return function(collection, iteratee) {
- var func = isArray(collection) ? arrayAggregator : baseAggregator,
- accumulator = initializer ? initializer() : {};
-
- return func(collection, setter, getIteratee(iteratee), accumulator);
- };
- }
-
- /**
- * Creates a function like `_.assign`.
- *
- * @private
- * @param {Function} assigner The function to assign values.
- * @returns {Function} Returns the new assigner function.
- */
- function createAssigner(assigner) {
- return rest(function(object, sources) {
- var index = -1,
- length = sources.length,
- customizer = length > 1 ? sources[length - 1] : undefined,
- guard = length > 2 ? sources[2] : undefined;
-
- customizer = typeof customizer == 'function'
- ? (length--, customizer)
- : undefined;
-
- if (guard && isIterateeCall(sources[0], sources[1], guard)) {
- customizer = length < 3 ? undefined : customizer;
- length = 1;
- }
- object = Object(object);
- while (++index < length) {
- var source = sources[index];
- if (source) {
- assigner(object, source, index, customizer);
- }
- }
- return object;
- });
- }
-
- /**
- * Creates a `baseEach` or `baseEachRight` function.
- *
- * @private
- * @param {Function} eachFunc The function to iterate over a collection.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
- */
- function createBaseEach(eachFunc, fromRight) {
- return function(collection, iteratee) {
- if (collection == null) {
- return collection;
- }
- if (!isArrayLike(collection)) {
- return eachFunc(collection, iteratee);
- }
- var length = collection.length,
- index = fromRight ? length : -1,
- iterable = Object(collection);
-
- while ((fromRight ? index-- : ++index < length)) {
- if (iteratee(iterable[index], index, iterable) === false) {
- break;
- }
- }
- return collection;
- };
- }
-
- /**
- * Creates a base function for methods like `_.forIn` and `_.forOwn`.
- *
- * @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
- */
- function createBaseFor(fromRight) {
- return function(object, iteratee, keysFunc) {
- var index = -1,
- iterable = Object(object),
- props = keysFunc(object),
- length = props.length;
-
- while (length--) {
- var key = props[fromRight ? length : ++index];
- if (iteratee(iterable[key], key, iterable) === false) {
- break;
- }
- }
- return object;
- };
- }
-
- /**
- * Creates a function that wraps `func` to invoke it with the optional `this`
- * binding of `thisArg`.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
- * for more details.
- * @param {*} [thisArg] The `this` binding of `func`.
- * @returns {Function} Returns the new wrapped function.
- */
- function createBaseWrapper(func, bitmask, thisArg) {
- var isBind = bitmask & BIND_FLAG,
- Ctor = createCtorWrapper(func);
-
- function wrapper() {
- var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
- return fn.apply(isBind ? thisArg : this, arguments);
- }
- return wrapper;
- }
-
- /**
- * Creates a function like `_.lowerFirst`.
- *
- * @private
- * @param {string} methodName The name of the `String` case method to use.
- * @returns {Function} Returns the new function.
- */
- function createCaseFirst(methodName) {
- return function(string) {
- string = toString(string);
-
- var strSymbols = reHasComplexSymbol.test(string)
- ? stringToArray(string)
- : undefined;
-
- var chr = strSymbols
- ? strSymbols[0]
- : string.charAt(0);
-
- var trailing = strSymbols
- ? castSlice(strSymbols, 1).join('')
- : string.slice(1);
-
- return chr[methodName]() + trailing;
- };
- }
-
- /**
- * Creates a function like `_.camelCase`.
- *
- * @private
- * @param {Function} callback The function to combine each word.
- * @returns {Function} Returns the new compounder function.
- */
- function createCompounder(callback) {
- return function(string) {
- return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
- };
- }
-
- /**
- * Creates a function that produces an instance of `Ctor` regardless of
- * whether it was invoked as part of a `new` expression or by `call` or `apply`.
- *
- * @private
- * @param {Function} Ctor The constructor to wrap.
- * @returns {Function} Returns the new wrapped function.
- */
- function createCtorWrapper(Ctor) {
- return function() {
- // Use a `switch` statement to work with class constructors. See
- // http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
- // for more details.
- var args = arguments;
- switch (args.length) {
- case 0: return new Ctor;
- case 1: return new Ctor(args[0]);
- case 2: return new Ctor(args[0], args[1]);
- case 3: return new Ctor(args[0], args[1], args[2]);
- case 4: return new Ctor(args[0], args[1], args[2], args[3]);
- case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
- case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
- case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
- }
- var thisBinding = baseCreate(Ctor.prototype),
- result = Ctor.apply(thisBinding, args);
-
- // Mimic the constructor's `return` behavior.
- // See https://es5.github.io/#x13.2.2 for more details.
- return isObject(result) ? result : thisBinding;
- };
- }
-
- /**
- * Creates a function that wraps `func` to enable currying.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
- * for more details.
- * @param {number} arity The arity of `func`.
- * @returns {Function} Returns the new wrapped function.
- */
- function createCurryWrapper(func, bitmask, arity) {
- var Ctor = createCtorWrapper(func);
-
- function wrapper() {
- var length = arguments.length,
- args = Array(length),
- index = length,
- placeholder = getPlaceholder(wrapper);
-
- while (index--) {
- args[index] = arguments[index];
- }
- var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
- ? []
- : replaceHolders(args, placeholder);
-
- length -= holders.length;
- if (length < arity) {
- return createRecurryWrapper(
- func, bitmask, createHybridWrapper, wrapper.placeholder, undefined,
- args, holders, undefined, undefined, arity - length);
- }
- var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
- return apply(fn, this, args);
- }
- return wrapper;
- }
-
- /**
- * Creates a `_.flow` or `_.flowRight` function.
- *
- * @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new flow function.
- */
- function createFlow(fromRight) {
- return rest(function(funcs) {
- funcs = baseFlatten(funcs, 1);
-
- var length = funcs.length,
- index = length,
- prereq = LodashWrapper.prototype.thru;
-
- if (fromRight) {
- funcs.reverse();
- }
- while (index--) {
- var func = funcs[index];
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
- var wrapper = new LodashWrapper([], true);
- }
- }
- index = wrapper ? index : length;
- while (++index < length) {
- func = funcs[index];
-
- var funcName = getFuncName(func),
- data = funcName == 'wrapper' ? getData(func) : undefined;
-
- if (data && isLaziable(data[0]) &&
- data[1] == (ARY_FLAG | CURRY_FLAG | PARTIAL_FLAG | REARG_FLAG) &&
- !data[4].length && data[9] == 1
- ) {
- wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
- } else {
- wrapper = (func.length == 1 && isLaziable(func))
- ? wrapper[funcName]()
- : wrapper.thru(func);
- }
- }
- return function() {
- var args = arguments,
- value = args[0];
-
- if (wrapper && args.length == 1 &&
- isArray(value) && value.length >= LARGE_ARRAY_SIZE) {
- return wrapper.plant(value).value();
- }
- var index = 0,
- result = length ? funcs[index].apply(this, args) : value;
-
- while (++index < length) {
- result = funcs[index].call(this, result);
- }
- return result;
- };
- });
- }
-
- /**
- * Creates a function that wraps `func` to invoke it with optional `this`
- * binding of `thisArg`, partial application, and currying.
- *
- * @private
- * @param {Function|string} func The function or method name to wrap.
- * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
- * for more details.
- * @param {*} [thisArg] The `this` binding of `func`.
- * @param {Array} [partials] The arguments to prepend to those provided to
- * the new function.
- * @param {Array} [holders] The `partials` placeholder indexes.
- * @param {Array} [partialsRight] The arguments to append to those provided
- * to the new function.
- * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
- * @param {Array} [argPos] The argument positions of the new function.
- * @param {number} [ary] The arity cap of `func`.
- * @param {number} [arity] The arity of `func`.
- * @returns {Function} Returns the new wrapped function.
- */
- function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
- var isAry = bitmask & ARY_FLAG,
- isBind = bitmask & BIND_FLAG,
- isBindKey = bitmask & BIND_KEY_FLAG,
- isCurried = bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG),
- isFlip = bitmask & FLIP_FLAG,
- Ctor = isBindKey ? undefined : createCtorWrapper(func);
-
- function wrapper() {
- var length = arguments.length,
- index = length,
- args = Array(length);
-
- while (index--) {
- args[index] = arguments[index];
- }
- if (isCurried) {
- var placeholder = getPlaceholder(wrapper),
- holdersCount = countHolders(args, placeholder);
- }
- if (partials) {
- args = composeArgs(args, partials, holders, isCurried);
- }
- if (partialsRight) {
- args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
- }
- length -= holdersCount;
- if (isCurried && length < arity) {
- var newHolders = replaceHolders(args, placeholder);
- return createRecurryWrapper(
- func, bitmask, createHybridWrapper, wrapper.placeholder, thisArg,
- args, newHolders, argPos, ary, arity - length
- );
- }
- var thisBinding = isBind ? thisArg : this,
- fn = isBindKey ? thisBinding[func] : func;
-
- length = args.length;
- if (argPos) {
- args = reorder(args, argPos);
- } else if (isFlip && length > 1) {
- args.reverse();
- }
- if (isAry && ary < length) {
- args.length = ary;
- }
- if (this && this !== root && this instanceof wrapper) {
- fn = Ctor || createCtorWrapper(fn);
- }
- return fn.apply(thisBinding, args);
- }
- return wrapper;
- }
-
- /**
- * Creates a function like `_.invertBy`.
- *
- * @private
- * @param {Function} setter The function to set accumulator values.
- * @param {Function} toIteratee The function to resolve iteratees.
- * @returns {Function} Returns the new inverter function.
- */
- function createInverter(setter, toIteratee) {
- return function(object, iteratee) {
- return baseInverter(object, setter, toIteratee(iteratee), {});
- };
- }
-
- /**
- * Creates a function that performs a mathematical operation on two values.
- *
- * @private
- * @param {Function} operator The function to perform the operation.
- * @returns {Function} Returns the new mathematical operation function.
- */
- function createMathOperation(operator) {
- return function(value, other) {
- var result;
- if (value === undefined && other === undefined) {
- return 0;
- }
- if (value !== undefined) {
- result = value;
- }
- if (other !== undefined) {
- if (result === undefined) {
- return other;
- }
- if (typeof value == 'string' || typeof other == 'string') {
- value = baseToString(value);
- other = baseToString(other);
- } else {
- value = baseToNumber(value);
- other = baseToNumber(other);
- }
- result = operator(value, other);
- }
- return result;
- };
- }
-
- /**
- * Creates a function like `_.over`.
- *
- * @private
- * @param {Function} arrayFunc The function to iterate over iteratees.
- * @returns {Function} Returns the new invoker function.
- */
- function createOver(arrayFunc) {
- return rest(function(iteratees) {
- iteratees = (iteratees.length == 1 && isArray(iteratees[0]))
- ? arrayMap(iteratees[0], baseUnary(getIteratee()))
- : arrayMap(baseFlatten(iteratees, 1, isFlattenableIteratee), baseUnary(getIteratee()));
-
- return rest(function(args) {
- var thisArg = this;
- return arrayFunc(iteratees, function(iteratee) {
- return apply(iteratee, thisArg, args);
- });
- });
- });
- }
-
- /**
- * Creates the padding for `string` based on `length`. The `chars` string
- * is truncated if the number of characters exceeds `length`.
- *
- * @private
- * @param {number} length The padding length.
- * @param {string} [chars=' '] The string used as padding.
- * @returns {string} Returns the padding for `string`.
- */
- function createPadding(length, chars) {
- chars = chars === undefined ? ' ' : baseToString(chars);
-
- var charsLength = chars.length;
- if (charsLength < 2) {
- return charsLength ? baseRepeat(chars, length) : chars;
- }
- var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
- return reHasComplexSymbol.test(chars)
- ? castSlice(stringToArray(result), 0, length).join('')
- : result.slice(0, length);
- }
-
- /**
- * Creates a function that wraps `func` to invoke it with the `this` binding
- * of `thisArg` and `partials` prepended to the arguments it receives.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
- * for more details.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {Array} partials The arguments to prepend to those provided to
- * the new function.
- * @returns {Function} Returns the new wrapped function.
- */
- function createPartialWrapper(func, bitmask, thisArg, partials) {
- var isBind = bitmask & BIND_FLAG,
- Ctor = createCtorWrapper(func);
-
- function wrapper() {
- var argsIndex = -1,
- argsLength = arguments.length,
- leftIndex = -1,
- leftLength = partials.length,
- args = Array(leftLength + argsLength),
- fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
-
- while (++leftIndex < leftLength) {
- args[leftIndex] = partials[leftIndex];
- }
- while (argsLength--) {
- args[leftIndex++] = arguments[++argsIndex];
- }
- return apply(fn, isBind ? thisArg : this, args);
- }
- return wrapper;
- }
-
- /**
- * Creates a `_.range` or `_.rangeRight` function.
- *
- * @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new range function.
- */
- function createRange(fromRight) {
- return function(start, end, step) {
- if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
- end = step = undefined;
- }
- // Ensure the sign of `-0` is preserved.
- start = toNumber(start);
- start = start === start ? start : 0;
- if (end === undefined) {
- end = start;
- start = 0;
- } else {
- end = toNumber(end) || 0;
- }
- step = step === undefined ? (start < end ? 1 : -1) : (toNumber(step) || 0);
- return baseRange(start, end, step, fromRight);
- };
- }
-
- /**
- * Creates a function that performs a relational operation on two values.
- *
- * @private
- * @param {Function} operator The function to perform the operation.
- * @returns {Function} Returns the new relational operation function.
- */
- function createRelationalOperation(operator) {
- return function(value, other) {
- if (!(typeof value == 'string' && typeof other == 'string')) {
- value = toNumber(value);
- other = toNumber(other);
- }
- return operator(value, other);
- };
- }
-
- /**
- * Creates a function that wraps `func` to continue currying.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
- * for more details.
- * @param {Function} wrapFunc The function to create the `func` wrapper.
- * @param {*} placeholder The placeholder value.
- * @param {*} [thisArg] The `this` binding of `func`.
- * @param {Array} [partials] The arguments to prepend to those provided to
- * the new function.
- * @param {Array} [holders] The `partials` placeholder indexes.
- * @param {Array} [argPos] The argument positions of the new function.
- * @param {number} [ary] The arity cap of `func`.
- * @param {number} [arity] The arity of `func`.
- * @returns {Function} Returns the new wrapped function.
- */
- function createRecurryWrapper(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
- var isCurry = bitmask & CURRY_FLAG,
- newHolders = isCurry ? holders : undefined,
- newHoldersRight = isCurry ? undefined : holders,
- newPartials = isCurry ? partials : undefined,
- newPartialsRight = isCurry ? undefined : partials;
-
- bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG);
- bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG);
-
- if (!(bitmask & CURRY_BOUND_FLAG)) {
- bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);
- }
- var newData = [
- func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
- newHoldersRight, argPos, ary, arity
- ];
-
- var result = wrapFunc.apply(undefined, newData);
- if (isLaziable(func)) {
- setData(result, newData);
- }
- result.placeholder = placeholder;
- return result;
- }
-
- /**
- * Creates a function like `_.round`.
- *
- * @private
- * @param {string} methodName The name of the `Math` method to use when rounding.
- * @returns {Function} Returns the new round function.
- */
- function createRound(methodName) {
- var func = Math[methodName];
- return function(number, precision) {
- number = toNumber(number);
- precision = toInteger(precision);
- if (precision) {
- // Shift with exponential notation to avoid floating-point issues.
- // See [MDN](https://mdn.io/round#Examples) for more details.
- var pair = (toString(number) + 'e').split('e'),
- value = func(pair[0] + 'e' + (+pair[1] + precision));
-
- pair = (toString(value) + 'e').split('e');
- return +(pair[0] + 'e' + (+pair[1] - precision));
- }
- return func(number);
- };
- }
-
- /**
- * Creates a set of `values`.
- *
- * @private
- * @param {Array} values The values to add to the set.
- * @returns {Object} Returns the new set.
- */
- var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
- return new Set(values);
- };
-
- /**
- * Creates a function that either curries or invokes `func` with optional
- * `this` binding and partially applied arguments.
- *
- * @private
- * @param {Function|string} func The function or method name to wrap.
- * @param {number} bitmask The bitmask of wrapper flags.
- * The bitmask may be composed of the following flags:
- * 1 - `_.bind`
- * 2 - `_.bindKey`
- * 4 - `_.curry` or `_.curryRight` of a bound function
- * 8 - `_.curry`
- * 16 - `_.curryRight`
- * 32 - `_.partial`
- * 64 - `_.partialRight`
- * 128 - `_.rearg`
- * 256 - `_.ary`
- * @param {*} [thisArg] The `this` binding of `func`.
- * @param {Array} [partials] The arguments to be partially applied.
- * @param {Array} [holders] The `partials` placeholder indexes.
- * @param {Array} [argPos] The argument positions of the new function.
- * @param {number} [ary] The arity cap of `func`.
- * @param {number} [arity] The arity of `func`.
- * @returns {Function} Returns the new wrapped function.
- */
- function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
- var isBindKey = bitmask & BIND_KEY_FLAG;
- if (!isBindKey && typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- var length = partials ? partials.length : 0;
- if (!length) {
- bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG);
- partials = holders = undefined;
- }
- ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
- arity = arity === undefined ? arity : toInteger(arity);
- length -= holders ? holders.length : 0;
-
- if (bitmask & PARTIAL_RIGHT_FLAG) {
- var partialsRight = partials,
- holdersRight = holders;
-
- partials = holders = undefined;
- }
- var data = isBindKey ? undefined : getData(func);
-
- var newData = [
- func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
- argPos, ary, arity
- ];
-
- if (data) {
- mergeData(newData, data);
- }
- func = newData[0];
- bitmask = newData[1];
- thisArg = newData[2];
- partials = newData[3];
- holders = newData[4];
- arity = newData[9] = newData[9] == null
- ? (isBindKey ? 0 : func.length)
- : nativeMax(newData[9] - length, 0);
-
- if (!arity && bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG)) {
- bitmask &= ~(CURRY_FLAG | CURRY_RIGHT_FLAG);
- }
- if (!bitmask || bitmask == BIND_FLAG) {
- var result = createBaseWrapper(func, bitmask, thisArg);
- } else if (bitmask == CURRY_FLAG || bitmask == CURRY_RIGHT_FLAG) {
- result = createCurryWrapper(func, bitmask, arity);
- } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !holders.length) {
- result = createPartialWrapper(func, bitmask, thisArg, partials);
- } else {
- result = createHybridWrapper.apply(undefined, newData);
- }
- var setter = data ? baseSetData : setData;
- return setter(result, newData);
- }
-
- /**
- * A specialized version of `baseIsEqualDeep` for arrays with support for
- * partial deep comparisons.
- *
- * @private
- * @param {Array} array The array to compare.
- * @param {Array} other The other array to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} customizer The function to customize comparisons.
- * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
- * for more details.
- * @param {Object} stack Tracks traversed `array` and `other` objects.
- * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
- */
- function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
- var index = -1,
- isPartial = bitmask & PARTIAL_COMPARE_FLAG,
- isUnordered = bitmask & UNORDERED_COMPARE_FLAG,
- arrLength = array.length,
- othLength = other.length;
-
- if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
- return false;
- }
- // Assume cyclic values are equal.
- var stacked = stack.get(array);
- if (stacked) {
- return stacked == other;
- }
- var result = true;
- stack.set(array, other);
-
- // Ignore non-index properties.
- while (++index < arrLength) {
- var arrValue = array[index],
- othValue = other[index];
-
- if (customizer) {
- var compared = isPartial
- ? customizer(othValue, arrValue, index, other, array, stack)
- : customizer(arrValue, othValue, index, array, other, stack);
- }
- if (compared !== undefined) {
- if (compared) {
- continue;
- }
- result = false;
- break;
- }
- // Recursively compare arrays (susceptible to call stack limits).
- if (isUnordered) {
- if (!arraySome(other, function(othValue) {
- return arrValue === othValue ||
- equalFunc(arrValue, othValue, customizer, bitmask, stack);
- })) {
- result = false;
- break;
- }
- } else if (!(
- arrValue === othValue ||
- equalFunc(arrValue, othValue, customizer, bitmask, stack)
- )) {
- result = false;
- break;
- }
- }
- stack['delete'](array);
- return result;
- }
-
- /**
- * A specialized version of `baseIsEqualDeep` for comparing objects of
- * the same `toStringTag`.
- *
- * **Note:** This function only supports comparing values with tags of
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {string} tag The `toStringTag` of the objects to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} customizer The function to customize comparisons.
- * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
- * for more details.
- * @param {Object} stack Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
- switch (tag) {
- case dataViewTag:
- if ((object.byteLength != other.byteLength) ||
- (object.byteOffset != other.byteOffset)) {
- return false;
- }
- object = object.buffer;
- other = other.buffer;
-
- case arrayBufferTag:
- if ((object.byteLength != other.byteLength) ||
- !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
- return false;
- }
- return true;
-
- case boolTag:
- case dateTag:
- // Coerce dates and booleans to numbers, dates to milliseconds and
- // booleans to `1` or `0` treating invalid dates coerced to `NaN` as
- // not equal.
- return +object == +other;
-
- case errorTag:
- return object.name == other.name && object.message == other.message;
-
- case numberTag:
- // Treat `NaN` vs. `NaN` as equal.
- return (object != +object) ? other != +other : object == +other;
-
- case regexpTag:
- case stringTag:
- // Coerce regexes to strings and treat strings, primitives and objects,
- // as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
- // for more details.
- return object == (other + '');
-
- case mapTag:
- var convert = mapToArray;
-
- case setTag:
- var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
- convert || (convert = setToArray);
-
- if (object.size != other.size && !isPartial) {
- return false;
- }
- // Assume cyclic values are equal.
- var stacked = stack.get(object);
- if (stacked) {
- return stacked == other;
- }
- bitmask |= UNORDERED_COMPARE_FLAG;
- stack.set(object, other);
-
- // Recursively compare objects (susceptible to call stack limits).
- return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);
-
- case symbolTag:
- if (symbolValueOf) {
- return symbolValueOf.call(object) == symbolValueOf.call(other);
- }
- }
- return false;
- }
-
- /**
- * A specialized version of `baseIsEqualDeep` for objects with support for
- * partial deep comparisons.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} customizer The function to customize comparisons.
- * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
- * for more details.
- * @param {Object} stack Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
- var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
- objProps = keys(object),
- objLength = objProps.length,
- othProps = keys(other),
- othLength = othProps.length;
-
- if (objLength != othLength && !isPartial) {
- return false;
- }
- var index = objLength;
- while (index--) {
- var key = objProps[index];
- if (!(isPartial ? key in other : baseHas(other, key))) {
- return false;
- }
- }
- // Assume cyclic values are equal.
- var stacked = stack.get(object);
- if (stacked) {
- return stacked == other;
- }
- var result = true;
- stack.set(object, other);
-
- var skipCtor = isPartial;
- while (++index < objLength) {
- key = objProps[index];
- var objValue = object[key],
- othValue = other[key];
-
- if (customizer) {
- var compared = isPartial
- ? customizer(othValue, objValue, key, other, object, stack)
- : customizer(objValue, othValue, key, object, other, stack);
- }
- // Recursively compare objects (susceptible to call stack limits).
- if (!(compared === undefined
- ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))
- : compared
- )) {
- result = false;
- break;
- }
- skipCtor || (skipCtor = key == 'constructor');
- }
- if (result && !skipCtor) {
- var objCtor = object.constructor,
- othCtor = other.constructor;
-
- // Non `Object` object instances with different constructors are not equal.
- if (objCtor != othCtor &&
- ('constructor' in object && 'constructor' in other) &&
- !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
- typeof othCtor == 'function' && othCtor instanceof othCtor)) {
- result = false;
- }
- }
- stack['delete'](object);
- return result;
- }
-
- /**
- * Creates an array of own enumerable property names and symbols of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names and symbols.
- */
- function getAllKeys(object) {
- return baseGetAllKeys(object, keys, getSymbols);
- }
-
- /**
- * Creates an array of own and inherited enumerable property names and
- * symbols of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names and symbols.
- */
- function getAllKeysIn(object) {
- return baseGetAllKeys(object, keysIn, getSymbolsIn);
- }
-
- /**
- * Gets metadata for `func`.
- *
- * @private
- * @param {Function} func The function to query.
- * @returns {*} Returns the metadata for `func`.
- */
- var getData = !metaMap ? noop : function(func) {
- return metaMap.get(func);
- };
-
- /**
- * Gets the name of `func`.
- *
- * @private
- * @param {Function} func The function to query.
- * @returns {string} Returns the function name.
- */
- function getFuncName(func) {
- var result = (func.name + ''),
- array = realNames[result],
- length = hasOwnProperty.call(realNames, result) ? array.length : 0;
-
- while (length--) {
- var data = array[length],
- otherFunc = data.func;
- if (otherFunc == null || otherFunc == func) {
- return data.name;
- }
- }
- return result;
- }
-
- /**
- * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
- * this function returns the custom method, otherwise it returns `baseIteratee`.
- * If arguments are provided, the chosen function is invoked with them and
- * its result is returned.
- *
- * @private
- * @param {*} [value] The value to convert to an iteratee.
- * @param {number} [arity] The arity of the created iteratee.
- * @returns {Function} Returns the chosen function or its result.
- */
- function getIteratee() {
- var result = lodash.iteratee || iteratee;
- result = result === iteratee ? baseIteratee : result;
- return arguments.length ? result(arguments[0], arguments[1]) : result;
- }
-
- /**
- * Gets the "length" property value of `object`.
- *
- * **Note:** This function is used to avoid a
- * [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
- * Safari on at least iOS 8.1-8.3 ARM64.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {*} Returns the "length" value.
- */
- var getLength = baseProperty('length');
-
- /**
- * Gets the property names, values, and compare flags of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the match data of `object`.
- */
- function getMatchData(object) {
- var result = toPairs(object),
- length = result.length;
-
- while (length--) {
- result[length][2] = isStrictComparable(result[length][1]);
- }
- return result;
- }
-
- /**
- * Gets the native function at `key` of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the method to get.
- * @returns {*} Returns the function if it's native, else `undefined`.
- */
- function getNative(object, key) {
- var value = object[key];
- return isNative(value) ? value : undefined;
- }
-
- /**
- * Gets the argument placeholder value for `func`.
- *
- * @private
- * @param {Function} func The function to inspect.
- * @returns {*} Returns the placeholder value.
- */
- function getPlaceholder(func) {
- var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
- return object.placeholder;
- }
-
- /**
- * Gets the `[[Prototype]]` of `value`.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {null|Object} Returns the `[[Prototype]]`.
- */
- function getPrototype(value) {
- return nativeGetPrototype(Object(value));
- }
-
- /**
- * Creates an array of the own enumerable symbol properties of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of symbols.
- */
- function getSymbols(object) {
- // Coerce `object` to an object to avoid non-object errors in V8.
- // See https://bugs.chromium.org/p/v8/issues/detail?id=3443 for more details.
- return getOwnPropertySymbols(Object(object));
- }
-
- // Fallback for IE < 11.
- if (!getOwnPropertySymbols) {
- getSymbols = function() {
- return [];
- };
- }
-
- /**
- * Creates an array of the own and inherited enumerable symbol properties
- * of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of symbols.
- */
- var getSymbolsIn = !getOwnPropertySymbols ? getSymbols : function(object) {
- var result = [];
- while (object) {
- arrayPush(result, getSymbols(object));
- object = getPrototype(object);
- }
- return result;
- };
-
- /**
- * Gets the `toStringTag` of `value`.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
- */
- function getTag(value) {
- return objectToString.call(value);
- }
-
- // Fallback for data views, maps, sets, and weak maps in IE 11,
- // for data views in Edge, and promises in Node.js.
- if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
- (Map && getTag(new Map) != mapTag) ||
- (Promise && getTag(Promise.resolve()) != promiseTag) ||
- (Set && getTag(new Set) != setTag) ||
- (WeakMap && getTag(new WeakMap) != weakMapTag)) {
- getTag = function(value) {
- var result = objectToString.call(value),
- Ctor = result == objectTag ? value.constructor : undefined,
- ctorString = Ctor ? toSource(Ctor) : undefined;
-
- if (ctorString) {
- switch (ctorString) {
- case dataViewCtorString: return dataViewTag;
- case mapCtorString: return mapTag;
- case promiseCtorString: return promiseTag;
- case setCtorString: return setTag;
- case weakMapCtorString: return weakMapTag;
- }
- }
- return result;
- };
- }
-
- /**
- * Gets the view, applying any `transforms` to the `start` and `end` positions.
- *
- * @private
- * @param {number} start The start of the view.
- * @param {number} end The end of the view.
- * @param {Array} transforms The transformations to apply to the view.
- * @returns {Object} Returns an object containing the `start` and `end`
- * positions of the view.
- */
- function getView(start, end, transforms) {
- var index = -1,
- length = transforms.length;
-
- while (++index < length) {
- var data = transforms[index],
- size = data.size;
-
- switch (data.type) {
- case 'drop': start += size; break;
- case 'dropRight': end -= size; break;
- case 'take': end = nativeMin(end, start + size); break;
- case 'takeRight': start = nativeMax(start, end - size); break;
- }
- }
- return { 'start': start, 'end': end };
- }
-
- /**
- * Checks if `path` exists on `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} path The path to check.
- * @param {Function} hasFunc The function to check properties.
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
- */
- function hasPath(object, path, hasFunc) {
- path = isKey(path, object) ? [path] : castPath(path);
-
- var result,
- index = -1,
- length = path.length;
-
- while (++index < length) {
- var key = toKey(path[index]);
- if (!(result = object != null && hasFunc(object, key))) {
- break;
- }
- object = object[key];
- }
- if (result) {
- return result;
- }
- var length = object ? object.length : 0;
- return !!length && isLength(length) && isIndex(key, length) &&
- (isArray(object) || isString(object) || isArguments(object));
- }
-
- /**
- * Initializes an array clone.
- *
- * @private
- * @param {Array} array The array to clone.
- * @returns {Array} Returns the initialized clone.
- */
- function initCloneArray(array) {
- var length = array.length,
- result = array.constructor(length);
-
- // Add properties assigned by `RegExp#exec`.
- if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
- result.index = array.index;
- result.input = array.input;
- }
- return result;
- }
-
- /**
- * Initializes an object clone.
- *
- * @private
- * @param {Object} object The object to clone.
- * @returns {Object} Returns the initialized clone.
- */
- function initCloneObject(object) {
- return (typeof object.constructor == 'function' && !isPrototype(object))
- ? baseCreate(getPrototype(object))
- : {};
- }
-
- /**
- * Initializes an object clone based on its `toStringTag`.
- *
- * **Note:** This function only supports cloning values with tags of
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
- *
- * @private
- * @param {Object} object The object to clone.
- * @param {string} tag The `toStringTag` of the object to clone.
- * @param {Function} cloneFunc The function to clone values.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the initialized clone.
- */
- function initCloneByTag(object, tag, cloneFunc, isDeep) {
- var Ctor = object.constructor;
- switch (tag) {
- case arrayBufferTag:
- return cloneArrayBuffer(object);
-
- case boolTag:
- case dateTag:
- return new Ctor(+object);
-
- case dataViewTag:
- return cloneDataView(object, isDeep);
-
- case float32Tag: case float64Tag:
- case int8Tag: case int16Tag: case int32Tag:
- case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
- return cloneTypedArray(object, isDeep);
-
- case mapTag:
- return cloneMap(object, isDeep, cloneFunc);
-
- case numberTag:
- case stringTag:
- return new Ctor(object);
-
- case regexpTag:
- return cloneRegExp(object);
-
- case setTag:
- return cloneSet(object, isDeep, cloneFunc);
-
- case symbolTag:
- return cloneSymbol(object);
- }
- }
-
- /**
- * Creates an array of index keys for `object` values of arrays,
- * `arguments` objects, and strings, otherwise `null` is returned.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array|null} Returns index keys, else `null`.
- */
- function indexKeys(object) {
- var length = object ? object.length : undefined;
- if (isLength(length) &&
- (isArray(object) || isString(object) || isArguments(object))) {
- return baseTimes(length, String);
- }
- return null;
- }
-
- /**
- * Checks if `value` is a flattenable `arguments` object or array.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
- */
- function isFlattenable(value) {
- return isArrayLikeObject(value) && (isArray(value) || isArguments(value));
- }
-
- /**
- * Checks if `value` is a flattenable array and not a `_.matchesProperty`
- * iteratee shorthand.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
- */
- function isFlattenableIteratee(value) {
- return isArray(value) && !(value.length == 2 && !isFunction(value[0]));
- }
-
- /**
- * Checks if `value` is a valid array-like index.
- *
- * @private
- * @param {*} value The value to check.
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
- */
- function isIndex(value, length) {
- length = length == null ? MAX_SAFE_INTEGER : length;
- return !!length &&
- (typeof value == 'number' || reIsUint.test(value)) &&
- (value > -1 && value % 1 == 0 && value < length);
- }
-
- /**
- * Checks if the given arguments are from an iteratee call.
- *
- * @private
- * @param {*} value The potential iteratee value argument.
- * @param {*} index The potential iteratee index or key argument.
- * @param {*} object The potential iteratee object argument.
- * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
- * else `false`.
- */
- function isIterateeCall(value, index, object) {
- if (!isObject(object)) {
- return false;
- }
- var type = typeof index;
- if (type == 'number'
- ? (isArrayLike(object) && isIndex(index, object.length))
- : (type == 'string' && index in object)
- ) {
- return eq(object[index], value);
- }
- return false;
- }
-
- /**
- * Checks if `value` is a property name and not a property path.
- *
- * @private
- * @param {*} value The value to check.
- * @param {Object} [object] The object to query keys on.
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
- */
- function isKey(value, object) {
- if (isArray(value)) {
- return false;
- }
- var type = typeof value;
- if (type == 'number' || type == 'symbol' || type == 'boolean' ||
- value == null || isSymbol(value)) {
- return true;
- }
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
- (object != null && value in Object(object));
- }
-
- /**
- * Checks if `value` is suitable for use as unique object key.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
- */
- function isKeyable(value) {
- var type = typeof value;
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
- ? (value !== '__proto__')
- : (value === null);
- }
-
- /**
- * Checks if `func` has a lazy counterpart.
- *
- * @private
- * @param {Function} func The function to check.
- * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
- * else `false`.
- */
- function isLaziable(func) {
- var funcName = getFuncName(func),
- other = lodash[funcName];
-
- if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
- return false;
- }
- if (func === other) {
- return true;
- }
- var data = getData(other);
- return !!data && func === data[0];
- }
-
- /**
- * Checks if `value` is likely a prototype object.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
- */
- function isPrototype(value) {
- var Ctor = value && value.constructor,
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
-
- return value === proto;
- }
-
- /**
- * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` if suitable for strict
- * equality comparisons, else `false`.
- */
- function isStrictComparable(value) {
- return value === value && !isObject(value);
- }
-
- /**
- * A specialized version of `matchesProperty` for source values suitable
- * for strict equality comparisons, i.e. `===`.
- *
- * @private
- * @param {string} key The key of the property to get.
- * @param {*} srcValue The value to match.
- * @returns {Function} Returns the new function.
- */
- function matchesStrictComparable(key, srcValue) {
- return function(object) {
- if (object == null) {
- return false;
- }
- return object[key] === srcValue &&
- (srcValue !== undefined || (key in Object(object)));
- };
- }
-
- /**
- * Merges the function metadata of `source` into `data`.
- *
- * Merging metadata reduces the number of wrappers used to invoke a function.
- * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
- * may be applied regardless of execution order. Methods like `_.ary` and
- * `_.rearg` modify function arguments, making the order in which they are
- * executed important, preventing the merging of metadata. However, we make
- * an exception for a safe combined case where curried functions have `_.ary`
- * and or `_.rearg` applied.
- *
- * @private
- * @param {Array} data The destination metadata.
- * @param {Array} source The source metadata.
- * @returns {Array} Returns `data`.
- */
- function mergeData(data, source) {
- var bitmask = data[1],
- srcBitmask = source[1],
- newBitmask = bitmask | srcBitmask,
- isCommon = newBitmask < (BIND_FLAG | BIND_KEY_FLAG | ARY_FLAG);
-
- var isCombo =
- ((srcBitmask == ARY_FLAG) && (bitmask == CURRY_FLAG)) ||
- ((srcBitmask == ARY_FLAG) && (bitmask == REARG_FLAG) && (data[7].length <= source[8])) ||
- ((srcBitmask == (ARY_FLAG | REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == CURRY_FLAG));
-
- // Exit early if metadata can't be merged.
- if (!(isCommon || isCombo)) {
- return data;
- }
- // Use source `thisArg` if available.
- if (srcBitmask & BIND_FLAG) {
- data[2] = source[2];
- // Set when currying a bound function.
- newBitmask |= bitmask & BIND_FLAG ? 0 : CURRY_BOUND_FLAG;
- }
- // Compose partial arguments.
- var value = source[3];
- if (value) {
- var partials = data[3];
- data[3] = partials ? composeArgs(partials, value, source[4]) : value;
- data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
- }
- // Compose partial right arguments.
- value = source[5];
- if (value) {
- partials = data[5];
- data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
- data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
- }
- // Use source `argPos` if available.
- value = source[7];
- if (value) {
- data[7] = value;
- }
- // Use source `ary` if it's smaller.
- if (srcBitmask & ARY_FLAG) {
- data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
- }
- // Use source `arity` if one is not provided.
- if (data[9] == null) {
- data[9] = source[9];
- }
- // Use source `func` and merge bitmasks.
- data[0] = source[0];
- data[1] = newBitmask;
-
- return data;
- }
-
- /**
- * Used by `_.defaultsDeep` to customize its `_.merge` use.
- *
- * @private
- * @param {*} objValue The destination value.
- * @param {*} srcValue The source value.
- * @param {string} key The key of the property to merge.
- * @param {Object} object The parent object of `objValue`.
- * @param {Object} source The parent object of `srcValue`.
- * @param {Object} [stack] Tracks traversed source values and their merged
- * counterparts.
- * @returns {*} Returns the value to assign.
- */
- function mergeDefaults(objValue, srcValue, key, object, source, stack) {
- if (isObject(objValue) && isObject(srcValue)) {
- baseMerge(objValue, srcValue, undefined, mergeDefaults, stack.set(srcValue, objValue));
- }
- return objValue;
- }
-
- /**
- * Gets the parent value at `path` of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array} path The path to get the parent value of.
- * @returns {*} Returns the parent value.
- */
- function parent(object, path) {
- return path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
- }
-
- /**
- * Reorder `array` according to the specified indexes where the element at
- * the first index is assigned as the first element, the element at
- * the second index is assigned as the second element, and so on.
- *
- * @private
- * @param {Array} array The array to reorder.
- * @param {Array} indexes The arranged array indexes.
- * @returns {Array} Returns `array`.
- */
- function reorder(array, indexes) {
- var arrLength = array.length,
- length = nativeMin(indexes.length, arrLength),
- oldArray = copyArray(array);
-
- while (length--) {
- var index = indexes[length];
- array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
- }
- return array;
- }
-
- /**
- * Sets metadata for `func`.
- *
- * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
- * period of time, it will trip its breaker and transition to an identity
- * function to avoid garbage collection pauses in V8. See
- * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
- * for more details.
- *
- * @private
- * @param {Function} func The function to associate metadata with.
- * @param {*} data The metadata.
- * @returns {Function} Returns `func`.
- */
- var setData = (function() {
- var count = 0,
- lastCalled = 0;
-
- return function(key, value) {
- var stamp = now(),
- remaining = HOT_SPAN - (stamp - lastCalled);
-
- lastCalled = stamp;
- if (remaining > 0) {
- if (++count >= HOT_COUNT) {
- return key;
- }
- } else {
- count = 0;
- }
- return baseSetData(key, value);
- };
- }());
-
- /**
- * Converts `string` to a property path array.
- *
- * @private
- * @param {string} string The string to convert.
- * @returns {Array} Returns the property path array.
- */
- var stringToPath = memoize(function(string) {
- var result = [];
- toString(string).replace(rePropName, function(match, number, quote, string) {
- result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
- });
- return result;
- });
-
- /**
- * Converts `value` to a string key if it's not a string or symbol.
- *
- * @private
- * @param {*} value The value to inspect.
- * @returns {string|symbol} Returns the key.
- */
- function toKey(value) {
- if (typeof value == 'string' || isSymbol(value)) {
- return value;
- }
- var result = (value + '');
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
- }
-
- /**
- * Converts `func` to its source code.
- *
- * @private
- * @param {Function} func The function to process.
- * @returns {string} Returns the source code.
- */
- function toSource(func) {
- if (func != null) {
- try {
- return funcToString.call(func);
- } catch (e) {}
- try {
- return (func + '');
- } catch (e) {}
- }
- return '';
- }
-
- /**
- * Creates a clone of `wrapper`.
- *
- * @private
- * @param {Object} wrapper The wrapper to clone.
- * @returns {Object} Returns the cloned wrapper.
- */
- function wrapperClone(wrapper) {
- if (wrapper instanceof LazyWrapper) {
- return wrapper.clone();
- }
- var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
- result.__actions__ = copyArray(wrapper.__actions__);
- result.__index__ = wrapper.__index__;
- result.__values__ = wrapper.__values__;
- return result;
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates an array of elements split into groups the length of `size`.
- * If `array` can't be split evenly, the final chunk will be the remaining
- * elements.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Array
- * @param {Array} array The array to process.
- * @param {number} [size=1] The length of each chunk
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {Array} Returns the new array containing chunks.
- * @example
- *
- * _.chunk(['a', 'b', 'c', 'd'], 2);
- * // => [['a', 'b'], ['c', 'd']]
- *
- * _.chunk(['a', 'b', 'c', 'd'], 3);
- * // => [['a', 'b', 'c'], ['d']]
- */
- function chunk(array, size, guard) {
- if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
- size = 1;
- } else {
- size = nativeMax(toInteger(size), 0);
- }
- var length = array ? array.length : 0;
- if (!length || size < 1) {
- return [];
- }
- var index = 0,
- resIndex = 0,
- result = Array(nativeCeil(length / size));
-
- while (index < length) {
- result[resIndex++] = baseSlice(array, index, (index += size));
- }
- return result;
- }
-
- /**
- * Creates an array with all falsey values removed. The values `false`, `null`,
- * `0`, `""`, `undefined`, and `NaN` are falsey.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to compact.
- * @returns {Array} Returns the new array of filtered values.
- * @example
- *
- * _.compact([0, 1, false, 2, '', 3]);
- * // => [1, 2, 3]
- */
- function compact(array) {
- var index = -1,
- length = array ? array.length : 0,
- resIndex = 0,
- result = [];
-
- while (++index < length) {
- var value = array[index];
- if (value) {
- result[resIndex++] = value;
- }
- }
- return result;
- }
-
- /**
- * Creates a new array concatenating `array` with any additional arrays
- * and/or values.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to concatenate.
- * @param {...*} [values] The values to concatenate.
- * @returns {Array} Returns the new concatenated array.
- * @example
- *
- * var array = [1];
- * var other = _.concat(array, 2, [3], [[4]]);
- *
- * console.log(other);
- * // => [1, 2, 3, [4]]
- *
- * console.log(array);
- * // => [1]
- */
- function concat() {
- var length = arguments.length,
- array = castArray(arguments[0]);
-
- if (length < 2) {
- return length ? copyArray(array) : [];
- }
- var args = Array(length - 1);
- while (length--) {
- args[length - 1] = arguments[length];
- }
- return arrayConcat(array, baseFlatten(args, 1));
- }
-
- /**
- * Creates an array of unique `array` values not included in the other given
- * arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons. The order of result values is determined by the
- * order they occur in the first array.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {...Array} [values] The values to exclude.
- * @returns {Array} Returns the new array of filtered values.
- * @see _.without, _.xor
- * @example
- *
- * _.difference([3, 2, 1], [4, 2]);
- * // => [3, 1]
- */
- var difference = rest(function(array, values) {
- return isArrayLikeObject(array)
- ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
- : [];
- });
-
- /**
- * This method is like `_.difference` except that it accepts `iteratee` which
- * is invoked for each element of `array` and `values` to generate the criterion
- * by which they're compared. Result values are chosen from the first array.
- * The iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {...Array} [values] The values to exclude.
- * @param {Array|Function|Object|string} [iteratee=_.identity]
- * The iteratee invoked per element.
- * @returns {Array} Returns the new array of filtered values.
- * @example
- *
- * _.differenceBy([3.1, 2.2, 1.3], [4.4, 2.5], Math.floor);
- * // => [3.1, 1.3]
- *
- * // The `_.property` iteratee shorthand.
- * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
- * // => [{ 'x': 2 }]
- */
- var differenceBy = rest(function(array, values) {
- var iteratee = last(values);
- if (isArrayLikeObject(iteratee)) {
- iteratee = undefined;
- }
- return isArrayLikeObject(array)
- ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee))
- : [];
- });
-
- /**
- * This method is like `_.difference` except that it accepts `comparator`
- * which is invoked to compare elements of `array` to `values`. Result values
- * are chosen from the first array. The comparator is invoked with two arguments:
- * (arrVal, othVal).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {...Array} [values] The values to exclude.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new array of filtered values.
- * @example
- *
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
- *
- * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
- * // => [{ 'x': 2, 'y': 1 }]
- */
- var differenceWith = rest(function(array, values) {
- var comparator = last(values);
- if (isArrayLikeObject(comparator)) {
- comparator = undefined;
- }
- return isArrayLikeObject(array)
- ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
- : [];
- });
-
- /**
- * Creates a slice of `array` with `n` elements dropped from the beginning.
- *
- * @static
- * @memberOf _
- * @since 0.5.0
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=1] The number of elements to drop.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.drop([1, 2, 3]);
- * // => [2, 3]
- *
- * _.drop([1, 2, 3], 2);
- * // => [3]
- *
- * _.drop([1, 2, 3], 5);
- * // => []
- *
- * _.drop([1, 2, 3], 0);
- * // => [1, 2, 3]
- */
- function drop(array, n, guard) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- n = (guard || n === undefined) ? 1 : toInteger(n);
- return baseSlice(array, n < 0 ? 0 : n, length);
- }
-
- /**
- * Creates a slice of `array` with `n` elements dropped from the end.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=1] The number of elements to drop.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.dropRight([1, 2, 3]);
- * // => [1, 2]
- *
- * _.dropRight([1, 2, 3], 2);
- * // => [1]
- *
- * _.dropRight([1, 2, 3], 5);
- * // => []
- *
- * _.dropRight([1, 2, 3], 0);
- * // => [1, 2, 3]
- */
- function dropRight(array, n, guard) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- n = (guard || n === undefined) ? 1 : toInteger(n);
- n = length - n;
- return baseSlice(array, 0, n < 0 ? 0 : n);
- }
-
- /**
- * Creates a slice of `array` excluding elements dropped from the end.
- * Elements are dropped until `predicate` returns falsey. The predicate is
- * invoked with three arguments: (value, index, array).
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Array
- * @param {Array} array The array to query.
- * @param {Array|Function|Object|string} [predicate=_.identity]
- * The function invoked per iteration.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': false }
- * ];
- *
- * _.dropRightWhile(users, function(o) { return !o.active; });
- * // => objects for ['barney']
- *
- * // The `_.matches` iteratee shorthand.
- * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
- * // => objects for ['barney', 'fred']
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.dropRightWhile(users, ['active', false]);
- * // => objects for ['barney']
- *
- * // The `_.property` iteratee shorthand.
- * _.dropRightWhile(users, 'active');
- * // => objects for ['barney', 'fred', 'pebbles']
- */
- function dropRightWhile(array, predicate) {
- return (array && array.length)
- ? baseWhile(array, getIteratee(predicate, 3), true, true)
- : [];
- }
-
- /**
- * Creates a slice of `array` excluding elements dropped from the beginning.
- * Elements are dropped until `predicate` returns falsey. The predicate is
- * invoked with three arguments: (value, index, array).
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Array
- * @param {Array} array The array to query.
- * @param {Array|Function|Object|string} [predicate=_.identity]
- * The function invoked per iteration.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': false },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': true }
- * ];
- *
- * _.dropWhile(users, function(o) { return !o.active; });
- * // => objects for ['pebbles']
- *
- * // The `_.matches` iteratee shorthand.
- * _.dropWhile(users, { 'user': 'barney', 'active': false });
- * // => objects for ['fred', 'pebbles']
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.dropWhile(users, ['active', false]);
- * // => objects for ['pebbles']
- *
- * // The `_.property` iteratee shorthand.
- * _.dropWhile(users, 'active');
- * // => objects for ['barney', 'fred', 'pebbles']
- */
- function dropWhile(array, predicate) {
- return (array && array.length)
- ? baseWhile(array, getIteratee(predicate, 3), true)
- : [];
- }
-
- /**
- * Fills elements of `array` with `value` from `start` up to, but not
- * including, `end`.
- *
- * **Note:** This method mutates `array`.
- *
- * @static
- * @memberOf _
- * @since 3.2.0
- * @category Array
- * @param {Array} array The array to fill.
- * @param {*} value The value to fill `array` with.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns `array`.
- * @example
- *
- * var array = [1, 2, 3];
- *
- * _.fill(array, 'a');
- * console.log(array);
- * // => ['a', 'a', 'a']
- *
- * _.fill(Array(3), 2);
- * // => [2, 2, 2]
- *
- * _.fill([4, 6, 8, 10], '*', 1, 3);
- * // => [4, '*', '*', 10]
- */
- function fill(array, value, start, end) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
- start = 0;
- end = length;
- }
- return baseFill(array, value, start, end);
- }
-
- /**
- * This method is like `_.find` except that it returns the index of the first
- * element `predicate` returns truthy for instead of the element itself.
- *
- * @static
- * @memberOf _
- * @since 1.1.0
- * @category Array
- * @param {Array} array The array to search.
- * @param {Array|Function|Object|string} [predicate=_.identity]
- * The function invoked per iteration.
- * @returns {number} Returns the index of the found element, else `-1`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': false },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': true }
- * ];
- *
- * _.findIndex(users, function(o) { return o.user == 'barney'; });
- * // => 0
- *
- * // The `_.matches` iteratee shorthand.
- * _.findIndex(users, { 'user': 'fred', 'active': false });
- * // => 1
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.findIndex(users, ['active', false]);
- * // => 0
- *
- * // The `_.property` iteratee shorthand.
- * _.findIndex(users, 'active');
- * // => 2
- */
- function findIndex(array, predicate) {
- return (array && array.length)
- ? baseFindIndex(array, getIteratee(predicate, 3))
- : -1;
- }
-
- /**
- * This method is like `_.findIndex` except that it iterates over elements
- * of `collection` from right to left.
- *
- * @static
- * @memberOf _
- * @since 2.0.0
- * @category Array
- * @param {Array} array The array to search.
- * @param {Array|Function|Object|string} [predicate=_.identity]
- * The function invoked per iteration.
- * @returns {number} Returns the index of the found element, else `-1`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': false }
- * ];
- *
- * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
- * // => 2
- *
- * // The `_.matches` iteratee shorthand.
- * _.findLastIndex(users, { 'user': 'barney', 'active': true });
- * // => 0
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.findLastIndex(users, ['active', false]);
- * // => 2
- *
- * // The `_.property` iteratee shorthand.
- * _.findLastIndex(users, 'active');
- * // => 0
- */
- function findLastIndex(array, predicate) {
- return (array && array.length)
- ? baseFindIndex(array, getIteratee(predicate, 3), true)
- : -1;
- }
-
- /**
- * Flattens `array` a single level deep.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to flatten.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * _.flatten([1, [2, [3, [4]], 5]]);
- * // => [1, 2, [3, [4]], 5]
- */
- function flatten(array) {
- var length = array ? array.length : 0;
- return length ? baseFlatten(array, 1) : [];
- }
-
- /**
- * Recursively flattens `array`.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Array
- * @param {Array} array The array to flatten.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * _.flattenDeep([1, [2, [3, [4]], 5]]);
- * // => [1, 2, 3, 4, 5]
- */
- function flattenDeep(array) {
- var length = array ? array.length : 0;
- return length ? baseFlatten(array, INFINITY) : [];
- }
-
- /**
- * Recursively flatten `array` up to `depth` times.
- *
- * @static
- * @memberOf _
- * @since 4.4.0
- * @category Array
- * @param {Array} array The array to flatten.
- * @param {number} [depth=1] The maximum recursion depth.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * var array = [1, [2, [3, [4]], 5]];
- *
- * _.flattenDepth(array, 1);
- * // => [1, 2, [3, [4]], 5]
- *
- * _.flattenDepth(array, 2);
- * // => [1, 2, 3, [4], 5]
- */
- function flattenDepth(array, depth) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- depth = depth === undefined ? 1 : toInteger(depth);
- return baseFlatten(array, depth);
- }
-
- /**
- * The inverse of `_.toPairs`; this method returns an object composed
- * from key-value `pairs`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} pairs The key-value pairs.
- * @returns {Object} Returns the new object.
- * @example
- *
- * _.fromPairs([['fred', 30], ['barney', 40]]);
- * // => { 'fred': 30, 'barney': 40 }
- */
- function fromPairs(pairs) {
- var index = -1,
- length = pairs ? pairs.length : 0,
- result = {};
-
- while (++index < length) {
- var pair = pairs[index];
- result[pair[0]] = pair[1];
- }
- return result;
- }
-
- /**
- * Gets the first element of `array`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @alias first
- * @category Array
- * @param {Array} array The array to query.
- * @returns {*} Returns the first element of `array`.
- * @example
- *
- * _.head([1, 2, 3]);
- * // => 1
- *
- * _.head([]);
- * // => undefined
- */
- function head(array) {
- return (array && array.length) ? array[0] : undefined;
- }
-
- /**
- * Gets the index at which the first occurrence of `value` is found in `array`
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons. If `fromIndex` is negative, it's used as the
- * offset from the end of `array`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to search.
- * @param {*} value The value to search for.
- * @param {number} [fromIndex=0] The index to search from.
- * @returns {number} Returns the index of the matched value, else `-1`.
- * @example
- *
- * _.indexOf([1, 2, 1, 2], 2);
- * // => 1
- *
- * // Search from the `fromIndex`.
- * _.indexOf([1, 2, 1, 2], 2, 2);
- * // => 3
- */
- function indexOf(array, value, fromIndex) {
- var length = array ? array.length : 0;
- if (!length) {
- return -1;
- }
- fromIndex = toInteger(fromIndex);
- if (fromIndex < 0) {
- fromIndex = nativeMax(length + fromIndex, 0);
- }
- return baseIndexOf(array, value, fromIndex);
- }
-
- /**
- * Gets all but the last element of `array`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to query.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.initial([1, 2, 3]);
- * // => [1, 2]
- */
- function initial(array) {
- return dropRight(array, 1);
- }
-
- /**
- * Creates an array of unique values that are included in all given arrays
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons. The order of result values is determined by the
- * order they occur in the first array.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @returns {Array} Returns the new array of intersecting values.
- * @example
- *
- * _.intersection([2, 1], [4, 2], [1, 2]);
- * // => [2]
- */
- var intersection = rest(function(arrays) {
- var mapped = arrayMap(arrays, castArrayLikeObject);
- return (mapped.length && mapped[0] === arrays[0])
- ? baseIntersection(mapped)
- : [];
- });
-
- /**
- * This method is like `_.intersection` except that it accepts `iteratee`
- * which is invoked for each element of each `arrays` to generate the criterion
- * by which they're compared. Result values are chosen from the first array.
- * The iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @param {Array|Function|Object|string} [iteratee=_.identity]
- * The iteratee invoked per element.
- * @returns {Array} Returns the new array of intersecting values.
- * @example
- *
- * _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor);
- * // => [2.1]
- *
- * // The `_.property` iteratee shorthand.
- * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
- * // => [{ 'x': 1 }]
- */
- var intersectionBy = rest(function(arrays) {
- var iteratee = last(arrays),
- mapped = arrayMap(arrays, castArrayLikeObject);
-
- if (iteratee === last(mapped)) {
- iteratee = undefined;
- } else {
- mapped.pop();
- }
- return (mapped.length && mapped[0] === arrays[0])
- ? baseIntersection(mapped, getIteratee(iteratee))
- : [];
- });
-
- /**
- * This method is like `_.intersection` except that it accepts `comparator`
- * which is invoked to compare elements of `arrays`. Result values are chosen
- * from the first array. The comparator is invoked with two arguments:
- * (arrVal, othVal).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new array of intersecting values.
- * @example
- *
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
- * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
- *
- * _.intersectionWith(objects, others, _.isEqual);
- * // => [{ 'x': 1, 'y': 2 }]
- */
- var intersectionWith = rest(function(arrays) {
- var comparator = last(arrays),
- mapped = arrayMap(arrays, castArrayLikeObject);
-
- if (comparator === last(mapped)) {
- comparator = undefined;
- } else {
- mapped.pop();
- }
- return (mapped.length && mapped[0] === arrays[0])
- ? baseIntersection(mapped, undefined, comparator)
- : [];
- });
-
- /**
- * Converts all elements in `array` into a string separated by `separator`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to convert.
- * @param {string} [separator=','] The element separator.
- * @returns {string} Returns the joined string.
- * @example
- *
- * _.join(['a', 'b', 'c'], '~');
- * // => 'a~b~c'
- */
- function join(array, separator) {
- return array ? nativeJoin.call(array, separator) : '';
- }
-
- /**
- * Gets the last element of `array`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to query.
- * @returns {*} Returns the last element of `array`.
- * @example
- *
- * _.last([1, 2, 3]);
- * // => 3
- */
- function last(array) {
- var length = array ? array.length : 0;
- return length ? array[length - 1] : undefined;
- }
-
- /**
- * This method is like `_.indexOf` except that it iterates over elements of
- * `array` from right to left.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to search.
- * @param {*} value The value to search for.
- * @param {number} [fromIndex=array.length-1] The index to search from.
- * @returns {number} Returns the index of the matched value, else `-1`.
- * @example
- *
- * _.lastIndexOf([1, 2, 1, 2], 2);
- * // => 3
- *
- * // Search from the `fromIndex`.
- * _.lastIndexOf([1, 2, 1, 2], 2, 2);
- * // => 1
- */
- function lastIndexOf(array, value, fromIndex) {
- var length = array ? array.length : 0;
- if (!length) {
- return -1;
- }
- var index = length;
- if (fromIndex !== undefined) {
- index = toInteger(fromIndex);
- index = (
- index < 0
- ? nativeMax(length + index, 0)
- : nativeMin(index, length - 1)
- ) + 1;
- }
- if (value !== value) {
- return indexOfNaN(array, index, true);
- }
- while (index--) {
- if (array[index] === value) {
- return index;
- }
- }
- return -1;
- }
-
- /**
- * Gets the nth element of `array`. If `n` is negative, the nth element
- * from the end is returned.
- *
- * @static
- * @memberOf _
- * @since 4.11.0
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=0] The index of the element to return.
- * @returns {*} Returns the nth element of `array`.
- * @example
- *
- * var array = ['a', 'b', 'c', 'd'];
- *
- * _.nth(array, 1);
- * // => 'b'
- *
- * _.nth(array, -2);
- * // => 'c';
- */
- function nth(array, n) {
- return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
- }
-
- /**
- * Removes all given values from `array` using
- * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
- * to remove elements from an array by predicate.
- *
- * @static
- * @memberOf _
- * @since 2.0.0
- * @category Array
- * @param {Array} array The array to modify.
- * @param {...*} [values] The values to remove.
- * @returns {Array} Returns `array`.
- * @example
- *
- * var array = [1, 2, 3, 1, 2, 3];
- *
- * _.pull(array, 2, 3);
- * console.log(array);
- * // => [1, 1]
- */
- var pull = rest(pullAll);
-
- /**
- * This method is like `_.pull` except that it accepts an array of values to remove.
- *
- * **Note:** Unlike `_.difference`, this method mutates `array`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to modify.
- * @param {Array} values The values to remove.
- * @returns {Array} Returns `array`.
- * @example
- *
- * var array = [1, 2, 3, 1, 2, 3];
- *
- * _.pullAll(array, [2, 3]);
- * console.log(array);
- * // => [1, 1]
- */
- function pullAll(array, values) {
- return (array && array.length && values && values.length)
- ? basePullAll(array, values)
- : array;
- }
-
- /**
- * This method is like `_.pullAll` except that it accepts `iteratee` which is
- * invoked for each element of `array` and `values` to generate the criterion
- * by which they're compared. The iteratee is invoked with one argument: (value).
- *
- * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to modify.
- * @param {Array} values The values to remove.
- * @param {Array|Function|Object|string} [iteratee=_.identity]
- * The iteratee invoked per element.
- * @returns {Array} Returns `array`.
- * @example
- *
- * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
- *
- * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
- * console.log(array);
- * // => [{ 'x': 2 }]
- */
- function pullAllBy(array, values, iteratee) {
- return (array && array.length && values && values.length)
- ? basePullAll(array, values, getIteratee(iteratee))
- : array;
- }
-
- /**
- * This method is like `_.pullAll` except that it accepts `comparator` which
- * is invoked to compare elements of `array` to `values`. The comparator is
- * invoked with two arguments: (arrVal, othVal).
- *
- * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
- *
- * @static
- * @memberOf _
- * @since 4.6.0
- * @category Array
- * @param {Array} array The array to modify.
- * @param {Array} values The values to remove.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns `array`.
- * @example
- *
- * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
- *
- * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
- * console.log(array);
- * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
- */
- function pullAllWith(array, values, comparator) {
- return (array && array.length && values && values.length)
- ? basePullAll(array, values, undefined, comparator)
- : array;
- }
-
- /**
- * Removes elements from `array` corresponding to `indexes` and returns an
- * array of removed elements.
- *
- * **Note:** Unlike `_.at`, this method mutates `array`.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Array
- * @param {Array} array The array to modify.
- * @param {...(number|number[])} [indexes] The indexes of elements to remove.
- * @returns {Array} Returns the new array of removed elements.
- * @example
- *
- * var array = [5, 10, 15, 20];
- * var evens = _.pullAt(array, 1, 3);
- *
- * console.log(array);
- * // => [5, 15]
- *
- * console.log(evens);
- * // => [10, 20]
- */
- var pullAt = rest(function(array, indexes) {
- indexes = baseFlatten(indexes, 1);
-
- var length = array ? array.length : 0,
- result = baseAt(array, indexes);
-
- basePullAt(array, arrayMap(indexes, function(index) {
- return isIndex(index, length) ? +index : index;
- }).sort(compareAscending));
-
- return result;
- });
-
- /**
- * Removes all elements from `array` that `predicate` returns truthy for
- * and returns an array of the removed elements. The predicate is invoked
- * with three arguments: (value, index, array).
- *
- * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
- * to pull elements from an array by value.
- *
- * @static
- * @memberOf _
- * @since 2.0.0
- * @category Array
- * @param {Array} array The array to modify.
- * @param {Array|Function|Object|string} [predicate=_.identity]
- * The function invoked per iteration.
- * @returns {Array} Returns the new array of removed elements.
- * @example
- *
- * var array = [1, 2, 3, 4];
- * var evens = _.remove(array, function(n) {
- * return n % 2 == 0;
- * });
- *
- * console.log(array);
- * // => [1, 3]
- *
- * console.log(evens);
- * // => [2, 4]
- */
- function remove(array, predicate) {
- var result = [];
- if (!(array && array.length)) {
- return result;
- }
- var index = -1,
- indexes = [],
- length = array.length;
-
- predicate = getIteratee(predicate, 3);
- while (++index < length) {
- var value = array[index];
- if (predicate(value, index, array)) {
- result.push(value);
- indexes.push(index);
- }
- }
- basePullAt(array, indexes);
- return result;
- }
-
- /**
- * Reverses `array` so that the first element becomes the last, the second
- * element becomes the second to last, and so on.
- *
- * **Note:** This method mutates `array` and is based on
- * [`Array#reverse`](https://mdn.io/Array/reverse).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to modify.
- * @returns {Array} Returns `array`.
- * @example
- *
- * var array = [1, 2, 3];
- *
- * _.reverse(array);
- * // => [3, 2, 1]
- *
- * console.log(array);
- * // => [3, 2, 1]
- */
- function reverse(array) {
- return array ? nativeReverse.call(array) : array;
- }
-
- /**
- * Creates a slice of `array` from `start` up to, but not including, `end`.
- *
- * **Note:** This method is used instead of
- * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
- * returned.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Array
- * @param {Array} array The array to slice.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns the slice of `array`.
- */
- function slice(array, start, end) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
- start = 0;
- end = length;
- }
- else {
- start = start == null ? 0 : toInteger(start);
- end = end === undefined ? length : toInteger(end);
- }
- return baseSlice(array, start, end);
- }
-
- /**
- * Uses a binary search to determine the lowest index at which `value`
- * should be inserted into `array` in order to maintain its sort order.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- * @example
- *
- * _.sortedIndex([30, 50], 40);
- * // => 1
- *
- * _.sortedIndex([4, 5], 4);
- * // => 0
- */
- function sortedIndex(array, value) {
- return baseSortedIndex(array, value);
- }
-
- /**
- * This method is like `_.sortedIndex` except that it accepts `iteratee`
- * which is invoked for `value` and each element of `array` to compute their
- * sort ranking. The iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @param {Array|Function|Object|string} [iteratee=_.identity]
- * The iteratee invoked per element.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- * @example
- *
- * var dict = { 'thirty': 30, 'forty': 40, 'fifty': 50 };
- *
- * _.sortedIndexBy(['thirty', 'fifty'], 'forty', _.propertyOf(dict));
- * // => 1
- *
- * // The `_.property` iteratee shorthand.
- * _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x');
- * // => 0
- */
- function sortedIndexBy(array, value, iteratee) {
- return baseSortedIndexBy(array, value, getIteratee(iteratee));
- }
-
- /**
- * This method is like `_.indexOf` except that it performs a binary
- * search on a sorted `array`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to search.
- * @param {*} value The value to search for.
- * @returns {number} Returns the index of the matched value, else `-1`.
- * @example
- *
- * _.sortedIndexOf([1, 1, 2, 2], 2);
- * // => 2
- */
- function sortedIndexOf(array, value) {
- var length = array ? array.length : 0;
- if (length) {
- var index = baseSortedIndex(array, value);
- if (index < length && eq(array[index], value)) {
- return index;
- }
- }
- return -1;
- }
-
- /**
- * This method is like `_.sortedIndex` except that it returns the highest
- * index at which `value` should be inserted into `array` in order to
- * maintain its sort order.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Array
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- * @example
- *
- * _.sortedLastIndex([4, 5], 4);
- * // => 1
- */
- function sortedLastIndex(array, value) {
- return baseSortedIndex(array, value, true);
- }
-
- /**
- * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
- * which is invoked for `value` and each element of `array` to compute their
- * sort ranking. The iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @param {Array|Function|Object|string} [iteratee=_.identity]
- * The iteratee invoked per element.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- * @example
- *
- * // The `_.property` iteratee shorthand.
- * _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x');
- * // => 1
- */
- function sortedLastIndexBy(array, value, iteratee) {
- return baseSortedIndexBy(array, value, getIteratee(iteratee), true);
- }
-
- /**
- * This method is like `_.lastIndexOf` except that it performs a binary
- * search on a sorted `array`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to search.
- * @param {*} value The value to search for.
- * @returns {number} Returns the index of the matched value, else `-1`.
- * @example
- *
- * _.sortedLastIndexOf([1, 1, 2, 2], 2);
- * // => 3
- */
- function sortedLastIndexOf(array, value) {
- var length = array ? array.length : 0;
- if (length) {
- var index = baseSortedIndex(array, value, true) - 1;
- if (eq(array[index], value)) {
- return index;
- }
- }
- return -1;
- }
-
- /**
- * This method is like `_.uniq` except that it's designed and optimized
- * for sorted arrays.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @returns {Array} Returns the new duplicate free array.
- * @example
- *
- * _.sortedUniq([1, 1, 2]);
- * // => [1, 2]
- */
- function sortedUniq(array) {
- return (array && array.length)
- ? baseSortedUniq(array)
- : [];
- }
-
- /**
- * This method is like `_.uniqBy` except that it's designed and optimized
- * for sorted arrays.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {Function} [iteratee] The iteratee invoked per element.
- * @returns {Array} Returns the new duplicate free array.
- * @example
- *
- * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
- * // => [1.1, 2.3]
- */
- function sortedUniqBy(array, iteratee) {
- return (array && array.length)
- ? baseSortedUniq(array, getIteratee(iteratee))
- : [];
- }
-
- /**
- * Gets all but the first element of `array`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to query.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.tail([1, 2, 3]);
- * // => [2, 3]
- */
- function tail(array) {
- return drop(array, 1);
- }
-
- /**
- * Creates a slice of `array` with `n` elements taken from the beginning.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=1] The number of elements to take.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.take([1, 2, 3]);
- * // => [1]
- *
- * _.take([1, 2, 3], 2);
- * // => [1, 2]
- *
- * _.take([1, 2, 3], 5);
- * // => [1, 2, 3]
- *
- * _.take([1, 2, 3], 0);
- * // => []
- */
- function take(array, n, guard) {
- if (!(array && array.length)) {
- return [];
- }
- n = (guard || n === undefined) ? 1 : toInteger(n);
- return baseSlice(array, 0, n < 0 ? 0 : n);
- }
-
- /**
- * Creates a slice of `array` with `n` elements taken from the end.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=1] The number of elements to take.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.takeRight([1, 2, 3]);
- * // => [3]
- *
- * _.takeRight([1, 2, 3], 2);
- * // => [2, 3]
- *
- * _.takeRight([1, 2, 3], 5);
- * // => [1, 2, 3]
- *
- * _.takeRight([1, 2, 3], 0);
- * // => []
- */
- function takeRight(array, n, guard) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- n = (guard || n === undefined) ? 1 : toInteger(n);
- n = length - n;
- return baseSlice(array, n < 0 ? 0 : n, length);
- }
-
- /**
- * Creates a slice of `array` with elements taken from the end. Elements are
- * taken until `predicate` returns falsey. The predicate is invoked with
- * three arguments: (value, index, array).
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Array
- * @param {Array} array The array to query.
- * @param {Array|Function|Object|string} [predicate=_.identity]
- * The function invoked per iteration.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': false }
- * ];
- *
- * _.takeRightWhile(users, function(o) { return !o.active; });
- * // => objects for ['fred', 'pebbles']
- *
- * // The `_.matches` iteratee shorthand.
- * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
- * // => objects for ['pebbles']
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.takeRightWhile(users, ['active', false]);
- * // => objects for ['fred', 'pebbles']
- *
- * // The `_.property` iteratee shorthand.
- * _.takeRightWhile(users, 'active');
- * // => []
- */
- function takeRightWhile(array, predicate) {
- return (array && array.length)
- ? baseWhile(array, getIteratee(predicate, 3), false, true)
- : [];
- }
-
- /**
- * Creates a slice of `array` with elements taken from the beginning. Elements
- * are taken until `predicate` returns falsey. The predicate is invoked with
- * three arguments: (value, index, array).
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Array
- * @param {Array} array The array to query.
- * @param {Array|Function|Object|string} [predicate=_.identity]
- * The function invoked per iteration.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': false },
- * { 'user': 'fred', 'active': false},
- * { 'user': 'pebbles', 'active': true }
- * ];
- *
- * _.takeWhile(users, function(o) { return !o.active; });
- * // => objects for ['barney', 'fred']
- *
- * // The `_.matches` iteratee shorthand.
- * _.takeWhile(users, { 'user': 'barney', 'active': false });
- * // => objects for ['barney']
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.takeWhile(users, ['active', false]);
- * // => objects for ['barney', 'fred']
- *
- * // The `_.property` iteratee shorthand.
- * _.takeWhile(users, 'active');
- * // => []
- */
- function takeWhile(array, predicate) {
- return (array && array.length)
- ? baseWhile(array, getIteratee(predicate, 3))
- : [];
- }
-
- /**
- * Creates an array of unique values, in order, from all given arrays using
- * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @returns {Array} Returns the new array of combined values.
- * @example
- *
- * _.union([2, 1], [4, 2], [1, 2]);
- * // => [2, 1, 4]
- */
- var union = rest(function(arrays) {
- return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
- });
-
- /**
- * This method is like `_.union` except that it accepts `iteratee` which is
- * invoked for each element of each `arrays` to generate the criterion by
- * which uniqueness is computed. The iteratee is invoked with one argument:
- * (value).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @param {Array|Function|Object|string} [iteratee=_.identity]
- * The iteratee invoked per element.
- * @returns {Array} Returns the new array of combined values.
- * @example
- *
- * _.unionBy([2.1, 1.2], [4.3, 2.4], Math.floor);
- * // => [2.1, 1.2, 4.3]
- *
- * // The `_.property` iteratee shorthand.
- * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
- * // => [{ 'x': 1 }, { 'x': 2 }]
- */
- var unionBy = rest(function(arrays) {
- var iteratee = last(arrays);
- if (isArrayLikeObject(iteratee)) {
- iteratee = undefined;
- }
- return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee));
- });
-
- /**
- * This method is like `_.union` except that it accepts `comparator` which
- * is invoked to compare elements of `arrays`. The comparator is invoked
- * with two arguments: (arrVal, othVal).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new array of combined values.
- * @example
- *
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
- * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
- *
- * _.unionWith(objects, others, _.isEqual);
- * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
- */
- var unionWith = rest(function(arrays) {
- var comparator = last(arrays);
- if (isArrayLikeObject(comparator)) {
- comparator = undefined;
- }
- return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
- });
-
- /**
- * Creates a duplicate-free version of an array, using
- * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons, in which only the first occurrence of each
- * element is kept.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @returns {Array} Returns the new duplicate free array.
- * @example
- *
- * _.uniq([2, 1, 2]);
- * // => [2, 1]
- */
- function uniq(array) {
- return (array && array.length)
- ? baseUniq(array)
- : [];
- }
-
- /**
- * This method is like `_.uniq` except that it accepts `iteratee` which is
- * invoked for each element in `array` to generate the criterion by which
- * uniqueness is computed. The iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {Array|Function|Object|string} [iteratee=_.identity]
- * The iteratee invoked per element.
- * @returns {Array} Returns the new duplicate free array.
- * @example
- *
- * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
- * // => [2.1, 1.2]
- *
- * // The `_.property` iteratee shorthand.
- * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
- * // => [{ 'x': 1 }, { 'x': 2 }]
- */
- function uniqBy(array, iteratee) {
- return (array && array.length)
- ? baseUniq(array, getIteratee(iteratee))
- : [];
- }
-
- /**
- * This method is like `_.uniq` except that it accepts `comparator` which
- * is invoked to compare elements of `array`. The comparator is invoked with
- * two arguments: (arrVal, othVal).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new duplicate free array.
- * @example
- *
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
- *
- * _.uniqWith(objects, _.isEqual);
- * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
- */
- function uniqWith(array, comparator) {
- return (array && array.length)
- ? baseUniq(array, undefined, comparator)
- : [];
- }
-
- /**
- * This method is like `_.zip` except that it accepts an array of grouped
- * elements and creates an array regrouping the elements to their pre-zip
- * configuration.
- *
- * @static
- * @memberOf _
- * @since 1.2.0
- * @category Array
- * @param {Array} array The array of grouped elements to process.
- * @returns {Array} Returns the new array of regrouped elements.
- * @example
- *
- * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]);
- * // => [['fred', 30, true], ['barney', 40, false]]
- *
- * _.unzip(zipped);
- * // => [['fred', 'barney'], [30, 40], [true, false]]
- */
- function unzip(array) {
- if (!(array && array.length)) {
- return [];
- }
- var length = 0;
- array = arrayFilter(array, function(group) {
- if (isArrayLikeObject(group)) {
- length = nativeMax(group.length, length);
- return true;
- }
- });
- return baseTimes(length, function(index) {
- return arrayMap(array, baseProperty(index));
- });
- }
-
- /**
- * This method is like `_.unzip` except that it accepts `iteratee` to specify
- * how regrouped values should be combined. The iteratee is invoked with the
- * elements of each group: (...group).
- *
- * @static
- * @memberOf _
- * @since 3.8.0
- * @category Array
- * @param {Array} array The array of grouped elements to process.
- * @param {Function} [iteratee=_.identity] The function to combine
- * regrouped values.
- * @returns {Array} Returns the new array of regrouped elements.
- * @example
- *
- * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
- * // => [[1, 10, 100], [2, 20, 200]]
- *
- * _.unzipWith(zipped, _.add);
- * // => [3, 30, 300]
- */
- function unzipWith(array, iteratee) {
- if (!(array && array.length)) {
- return [];
- }
- var result = unzip(array);
- if (iteratee == null) {
- return result;
- }
- return arrayMap(result, function(group) {
- return apply(iteratee, undefined, group);
- });
- }
-
- /**
- * Creates an array excluding all given values using
- * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to filter.
- * @param {...*} [values] The values to exclude.
- * @returns {Array} Returns the new array of filtered values.
- * @see _.difference, _.xor
- * @example
- *
- * _.without([1, 2, 1, 3], 1, 2);
- * // => [3]
- */
- var without = rest(function(array, values) {
- return isArrayLikeObject(array)
- ? baseDifference(array, values)
- : [];
- });
-
- /**
- * Creates an array of unique values that is the
- * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
- * of the given arrays. The order of result values is determined by the order
- * they occur in the arrays.
- *
- * @static
- * @memberOf _
- * @since 2.4.0
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @returns {Array} Returns the new array of values.
- * @see _.difference, _.without
- * @example
- *
- * _.xor([2, 1], [4, 2]);
- * // => [1, 4]
- */
- var xor = rest(function(arrays) {
- return baseXor(arrayFilter(arrays, isArrayLikeObject));
- });
-
- /**
- * This method is like `_.xor` except that it accepts `iteratee` which is
- * invoked for each element of each `arrays` to generate the criterion by
- * which by which they're compared. The iteratee is invoked with one argument:
- * (value).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @param {Array|Function|Object|string} [iteratee=_.identity]
- * The iteratee invoked per element.
- * @returns {Array} Returns the new array of values.
- * @example
- *
- * _.xorBy([2.1, 1.2], [4.3, 2.4], Math.floor);
- * // => [1.2, 4.3]
- *
- * // The `_.property` iteratee shorthand.
- * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
- * // => [{ 'x': 2 }]
- */
- var xorBy = rest(function(arrays) {
- var iteratee = last(arrays);
- if (isArrayLikeObject(iteratee)) {
- iteratee = undefined;
- }
- return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee));
- });
-
- /**
- * This method is like `_.xor` except that it accepts `comparator` which is
- * invoked to compare elements of `arrays`. The comparator is invoked with
- * two arguments: (arrVal, othVal).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new array of values.
- * @example
- *
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
- * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
- *
- * _.xorWith(objects, others, _.isEqual);
- * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
- */
- var xorWith = rest(function(arrays) {
- var comparator = last(arrays);
- if (isArrayLikeObject(comparator)) {
- comparator = undefined;
- }
- return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
- });
-
- /**
- * Creates an array of grouped elements, the first of which contains the
- * first elements of the given arrays, the second of which contains the
- * second elements of the given arrays, and so on.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {...Array} [arrays] The arrays to process.
- * @returns {Array} Returns the new array of grouped elements.
- * @example
- *
- * _.zip(['fred', 'barney'], [30, 40], [true, false]);
- * // => [['fred', 30, true], ['barney', 40, false]]
- */
- var zip = rest(unzip);
-
- /**
- * This method is like `_.fromPairs` except that it accepts two arrays,
- * one of property identifiers and one of corresponding values.
- *
- * @static
- * @memberOf _
- * @since 0.4.0
- * @category Array
- * @param {Array} [props=[]] The property identifiers.
- * @param {Array} [values=[]] The property values.
- * @returns {Object} Returns the new object.
- * @example
- *
- * _.zipObject(['a', 'b'], [1, 2]);
- * // => { 'a': 1, 'b': 2 }
- */
- function zipObject(props, values) {
- return baseZipObject(props || [], values || [], assignValue);
- }
-
- /**
- * This method is like `_.zipObject` except that it supports property paths.
- *
- * @static
- * @memberOf _
- * @since 4.1.0
- * @category Array
- * @param {Array} [props=[]] The property identifiers.
- * @param {Array} [values=[]] The property values.
- * @returns {Object} Returns the new object.
- * @example
- *
- * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
- * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
- */
- function zipObjectDeep(props, values) {
- return baseZipObject(props || [], values || [], baseSet);
- }
-
- /**
- * This method is like `_.zip` except that it accepts `iteratee` to specify
- * how grouped values should be combined. The iteratee is invoked with the
- * elements of each group: (...group).
- *
- * @static
- * @memberOf _
- * @since 3.8.0
- * @category Array
- * @param {...Array} [arrays] The arrays to process.
- * @param {Function} [iteratee=_.identity] The function to combine grouped values.
- * @returns {Array} Returns the new array of grouped elements.
- * @example
- *
- * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
- * return a + b + c;
- * });
- * // => [111, 222]
- */
- var zipWith = rest(function(arrays) {
- var length = arrays.length,
- iteratee = length > 1 ? arrays[length - 1] : undefined;
-
- iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
- return unzipWith(arrays, iteratee);
- });
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a `lodash` wrapper instance that wraps `value` with explicit method
- * chain sequences enabled. The result of such sequences must be unwrapped
- * with `_#value`.
- *
- * @static
- * @memberOf _
- * @since 1.3.0
- * @category Seq
- * @param {*} value The value to wrap.
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 },
- * { 'user': 'pebbles', 'age': 1 }
- * ];
- *
- * var youngest = _
- * .chain(users)
- * .sortBy('age')
- * .map(function(o) {
- * return o.user + ' is ' + o.age;
- * })
- * .head()
- * .value();
- * // => 'pebbles is 1'
- */
- function chain(value) {
- var result = lodash(value);
- result.__chain__ = true;
- return result;
- }
-
- /**
- * This method invokes `interceptor` and returns `value`. The interceptor
- * is invoked with one argument; (value). The purpose of this method is to
- * "tap into" a method chain sequence in order to modify intermediate results.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Seq
- * @param {*} value The value to provide to `interceptor`.
- * @param {Function} interceptor The function to invoke.
- * @returns {*} Returns `value`.
- * @example
- *
- * _([1, 2, 3])
- * .tap(function(array) {
- * // Mutate input array.
- * array.pop();
- * })
- * .reverse()
- * .value();
- * // => [2, 1]
- */
- function tap(value, interceptor) {
- interceptor(value);
- return value;
- }
-
- /**
- * This method is like `_.tap` except that it returns the result of `interceptor`.
- * The purpose of this method is to "pass thru" values replacing intermediate
- * results in a method chain sequence.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Seq
- * @param {*} value The value to provide to `interceptor`.
- * @param {Function} interceptor The function to invoke.
- * @returns {*} Returns the result of `interceptor`.
- * @example
- *
- * _(' abc ')
- * .chain()
- * .trim()
- * .thru(function(value) {
- * return [value];
- * })
- * .value();
- * // => ['abc']
- */
- function thru(value, interceptor) {
- return interceptor(value);
- }
-
- /**
- * This method is the wrapper version of `_.at`.
- *
- * @name at
- * @memberOf _
- * @since 1.0.0
- * @category Seq
- * @param {...(string|string[])} [paths] The property paths of elements to pick.
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
- *
- * _(object).at(['a[0].b.c', 'a[1]']).value();
- * // => [3, 4]
- *
- * _(['a', 'b', 'c']).at(0, 2).value();
- * // => ['a', 'c']
- */
- var wrapperAt = rest(function(paths) {
- paths = baseFlatten(paths, 1);
- var length = paths.length,
- start = length ? paths[0] : 0,
- value = this.__wrapped__,
- interceptor = function(object) { return baseAt(object, paths); };
-
- if (length > 1 || this.__actions__.length ||
- !(value instanceof LazyWrapper) || !isIndex(start)) {
- return this.thru(interceptor);
- }
- value = value.slice(start, +start + (length ? 1 : 0));
- value.__actions__.push({
- 'func': thru,
- 'args': [interceptor],
- 'thisArg': undefined
- });
- return new LodashWrapper(value, this.__chain__).thru(function(array) {
- if (length && !array.length) {
- array.push(undefined);
- }
- return array;
- });
- });
-
- /**
- * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
- *
- * @name chain
- * @memberOf _
- * @since 0.1.0
- * @category Seq
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 }
- * ];
- *
- * // A sequence without explicit chaining.
- * _(users).head();
- * // => { 'user': 'barney', 'age': 36 }
- *
- * // A sequence with explicit chaining.
- * _(users)
- * .chain()
- * .head()
- * .pick('user')
- * .value();
- * // => { 'user': 'barney' }
- */
- function wrapperChain() {
- return chain(this);
- }
-
- /**
- * Executes the chain sequence and returns the wrapped result.
- *
- * @name commit
- * @memberOf _
- * @since 3.2.0
- * @category Seq
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var array = [1, 2];
- * var wrapped = _(array).push(3);
- *
- * console.log(array);
- * // => [1, 2]
- *
- * wrapped = wrapped.commit();
- * console.log(array);
- * // => [1, 2, 3]
- *
- * wrapped.last();
- * // => 3
- *
- * console.log(array);
- * // => [1, 2, 3]
- */
- function wrapperCommit() {
- return new LodashWrapper(this.value(), this.__chain__);
- }
-
- /**
- * Gets the next value on a wrapped object following the
- * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
- *
- * @name next
- * @memberOf _
- * @since 4.0.0
- * @category Seq
- * @returns {Object} Returns the next iterator value.
- * @example
- *
- * var wrapped = _([1, 2]);
- *
- * wrapped.next();
- * // => { 'done': false, 'value': 1 }
- *
- * wrapped.next();
- * // => { 'done': false, 'value': 2 }
- *
- * wrapped.next();
- * // => { 'done': true, 'value': undefined }
- */
- function wrapperNext() {
- if (this.__values__ === undefined) {
- this.__values__ = toArray(this.value());
- }
- var done = this.__index__ >= this.__values__.length,
- value = done ? undefined : this.__values__[this.__index__++];
-
- return { 'done': done, 'value': value };
- }
-
- /**
- * Enables the wrapper to be iterable.
- *
- * @name Symbol.iterator
- * @memberOf _
- * @since 4.0.0
- * @category Seq
- * @returns {Object} Returns the wrapper object.
- * @example
- *
- * var wrapped = _([1, 2]);
- *
- * wrapped[Symbol.iterator]() === wrapped;
- * // => true
- *
- * Array.from(wrapped);
- * // => [1, 2]
- */
- function wrapperToIterator() {
- return this;
- }
-
- /**
- * Creates a clone of the chain sequence planting `value` as the wrapped value.
- *
- * @name plant
- * @memberOf _
- * @since 3.2.0
- * @category Seq
- * @param {*} value The value to plant.
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * var wrapped = _([1, 2]).map(square);
- * var other = wrapped.plant([3, 4]);
- *
- * other.value();
- * // => [9, 16]
- *
- * wrapped.value();
- * // => [1, 4]
- */
- function wrapperPlant(value) {
- var result,
- parent = this;
-
- while (parent instanceof baseLodash) {
- var clone = wrapperClone(parent);
- clone.__index__ = 0;
- clone.__values__ = undefined;
- if (result) {
- previous.__wrapped__ = clone;
- } else {
- result = clone;
- }
- var previous = clone;
- parent = parent.__wrapped__;
- }
- previous.__wrapped__ = value;
- return result;
- }
-
- /**
- * This method is the wrapper version of `_.reverse`.
- *
- * **Note:** This method mutates the wrapped array.
- *
- * @name reverse
- * @memberOf _
- * @since 0.1.0
- * @category Seq
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var array = [1, 2, 3];
- *
- * _(array).reverse().value()
- * // => [3, 2, 1]
- *
- * console.log(array);
- * // => [3, 2, 1]
- */
- function wrapperReverse() {
- var value = this.__wrapped__;
- if (value instanceof LazyWrapper) {
- var wrapped = value;
- if (this.__actions__.length) {
- wrapped = new LazyWrapper(this);
- }
- wrapped = wrapped.reverse();
- wrapped.__actions__.push({
- 'func': thru,
- 'args': [reverse],
- 'thisArg': undefined
- });
- return new LodashWrapper(wrapped, this.__chain__);
- }
- return this.thru(reverse);
- }
-
- /**
- * Executes the chain sequence to resolve the unwrapped value.
- *
- * @name value
- * @memberOf _
- * @since 0.1.0
- * @alias toJSON, valueOf
- * @category Seq
- * @returns {*} Returns the resolved unwrapped value.
- * @example
- *
- * _([1, 2, 3]).value();
- * // => [1, 2, 3]
- */
- function wrapperValue() {
- return baseWrapperValue(this.__wrapped__, this.__actions__);
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates an object composed of keys generated from the results of running
- * each element of `collection` thru `iteratee`. The corresponding value of
- * each key is the number of times the key was returned by `iteratee`. The
- * iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @since 0.5.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Array|Function|Object|string} [iteratee=_.identity]
- * The iteratee to transform keys.
- * @returns {Object} Returns the composed aggregate object.
- * @example
- *
- * _.countBy([6.1, 4.2, 6.3], Math.floor);
- * // => { '4': 1, '6': 2 }
- *
- * _.countBy(['one', 'two', 'three'], 'length');
- * // => { '3': 2, '5': 1 }
- */
- var countBy = createAggregator(function(result, value, key) {
- hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1);
- });
-
- /**
- * Checks if `predicate` returns truthy for **all** elements of `collection`.
- * Iteration is stopped once `predicate` returns falsey. The predicate is
- * invoked with three arguments: (value, index|key, collection).
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Array|Function|Object|string} [predicate=_.identity]
- * The function invoked per iteration.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {boolean} Returns `true` if all elements pass the predicate check,
- * else `false`.
- * @example
- *
- * _.every([true, 1, null, 'yes'], Boolean);
- * // => false
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': false },
- * { 'user': 'fred', 'age': 40, 'active': false }
- * ];
- *
- * // The `_.matches` iteratee shorthand.
- * _.every(users, { 'user': 'barney', 'active': false });
- * // => false
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.every(users, ['active', false]);
- * // => true
- *
- * // The `_.property` iteratee shorthand.
- * _.every(users, 'active');
- * // => false
- */
- function every(collection, predicate, guard) {
- var func = isArray(collection) ? arrayEvery : baseEvery;
- if (guard && isIterateeCall(collection, predicate, guard)) {
- predicate = undefined;
- }
- return func(collection, getIteratee(predicate, 3));
- }
-
- /**
- * Iterates over elements of `collection`, returning an array of all elements
- * `predicate` returns truthy for. The predicate is invoked with three
- * arguments: (value, index|key, collection).
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Array|Function|Object|string} [predicate=_.identity]
- * The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
- * @see _.reject
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': true },
- * { 'user': 'fred', 'age': 40, 'active': false }
- * ];
- *
- * _.filter(users, function(o) { return !o.active; });
- * // => objects for ['fred']
- *
- * // The `_.matches` iteratee shorthand.
- * _.filter(users, { 'age': 36, 'active': true });
- * // => objects for ['barney']
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.filter(users, ['active', false]);
- * // => objects for ['fred']
- *
- * // The `_.property` iteratee shorthand.
- * _.filter(users, 'active');
- * // => objects for ['barney']
- */
- function filter(collection, predicate) {
- var func = isArray(collection) ? arrayFilter : baseFilter;
- return func(collection, getIteratee(predicate, 3));
- }
-
- /**
- * Iterates over elements of `collection`, returning the first element
- * `predicate` returns truthy for. The predicate is invoked with three
- * arguments: (value, index|key, collection).
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to search.
- * @param {Array|Function|Object|string} [predicate=_.identity]
- * The function invoked per iteration.
- * @returns {*} Returns the matched element, else `undefined`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': true },
- * { 'user': 'fred', 'age': 40, 'active': false },
- * { 'user': 'pebbles', 'age': 1, 'active': true }
- * ];
- *
- * _.find(users, function(o) { return o.age < 40; });
- * // => object for 'barney'
- *
- * // The `_.matches` iteratee shorthand.
- * _.find(users, { 'age': 1, 'active': true });
- * // => object for 'pebbles'
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.find(users, ['active', false]);
- * // => object for 'fred'
- *
- * // The `_.property` iteratee shorthand.
- * _.find(users, 'active');
- * // => object for 'barney'
- */
- function find(collection, predicate) {
- predicate = getIteratee(predicate, 3);
- if (isArray(collection)) {
- var index = baseFindIndex(collection, predicate);
- return index > -1 ? collection[index] : undefined;
- }
- return baseFind(collection, predicate, baseEach);
- }
-
- /**
- * This method is like `_.find` except that it iterates over elements of
- * `collection` from right to left.
- *
- * @static
- * @memberOf _
- * @since 2.0.0
- * @category Collection
- * @param {Array|Object} collection The collection to search.
- * @param {Array|Function|Object|string} [predicate=_.identity]
- * The function invoked per iteration.
- * @returns {*} Returns the matched element, else `undefined`.
- * @example
- *
- * _.findLast([1, 2, 3, 4], function(n) {
- * return n % 2 == 1;
- * });
- * // => 3
- */
- function findLast(collection, predicate) {
- predicate = getIteratee(predicate, 3);
- if (isArray(collection)) {
- var index = baseFindIndex(collection, predicate, true);
- return index > -1 ? collection[index] : undefined;
- }
- return baseFind(collection, predicate, baseEachRight);
- }
-
- /**
- * Creates a flattened array of values by running each element in `collection`
- * thru `iteratee` and flattening the mapped results. The iteratee is invoked
- * with three arguments: (value, index|key, collection).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Array|Function|Object|string} [iteratee=_.identity]
- * The function invoked per iteration.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * function duplicate(n) {
- * return [n, n];
- * }
- *
- * _.flatMap([1, 2], duplicate);
- * // => [1, 1, 2, 2]
- */
- function flatMap(collection, iteratee) {
- return baseFlatten(map(collection, iteratee), 1);
- }
-
- /**
- * This method is like `_.flatMap` except that it recursively flattens the
- * mapped results.
- *
- * @static
- * @memberOf _
- * @since 4.7.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Array|Function|Object|string} [iteratee=_.identity]
- * The function invoked per iteration.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * function duplicate(n) {
- * return [[[n, n]]];
- * }
- *
- * _.flatMapDeep([1, 2], duplicate);
- * // => [1, 1, 2, 2]
- */
- function flatMapDeep(collection, iteratee) {
- return baseFlatten(map(collection, iteratee), INFINITY);
- }
-
- /**
- * This method is like `_.flatMap` except that it recursively flattens the
- * mapped results up to `depth` times.
- *
- * @static
- * @memberOf _
- * @since 4.7.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Array|Function|Object|string} [iteratee=_.identity]
- * The function invoked per iteration.
- * @param {number} [depth=1] The maximum recursion depth.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * function duplicate(n) {
- * return [[[n, n]]];
- * }
- *
- * _.flatMapDepth([1, 2], duplicate, 2);
- * // => [[1, 1], [2, 2]]
- */
- function flatMapDepth(collection, iteratee, depth) {
- depth = depth === undefined ? 1 : toInteger(depth);
- return baseFlatten(map(collection, iteratee), depth);
- }
-
- /**
- * Iterates over elements of `collection` and invokes `iteratee` for each element.
- * The iteratee is invoked with three arguments: (value, index|key, collection).
- * Iteratee functions may exit iteration early by explicitly returning `false`.
- *
- * **Note:** As with other "Collections" methods, objects with a "length"
- * property are iterated like arrays. To avoid this behavior use `_.forIn`
- * or `_.forOwn` for object iteration.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @alias each
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Array|Object} Returns `collection`.
- * @see _.forEachRight
- * @example
- *
- * _([1, 2]).forEach(function(value) {
- * console.log(value);
- * });
- * // => Logs `1` then `2`.
- *
- * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
- * console.log(key);
- * });
- * // => Logs 'a' then 'b' (iteration order is not guaranteed).
- */
- function forEach(collection, iteratee) {
- return (typeof iteratee == 'function' && isArray(collection))
- ? arrayEach(collection, iteratee)
- : baseEach(collection, getIteratee(iteratee));
- }
-
- /**
- * This method is like `_.forEach` except that it iterates over elements of
- * `collection` from right to left.
- *
- * @static
- * @memberOf _
- * @since 2.0.0
- * @alias eachRight
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Array|Object} Returns `collection`.
- * @see _.forEach
- * @example
- *
- * _.forEachRight([1, 2], function(value) {
- * console.log(value);
- * });
- * // => Logs `2` then `1`.
- */
- function forEachRight(collection, iteratee) {
- return (typeof iteratee == 'function' && isArray(collection))
- ? arrayEachRight(collection, iteratee)
- : baseEachRight(collection, getIteratee(iteratee));
- }
-
- /**
- * Creates an object composed of keys generated from the results of running
- * each element of `collection` thru `iteratee`. The order of grouped values
- * is determined by the order they occur in `collection`. The corresponding
- * value of each key is an array of elements responsible for generating the
- * key. The iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Array|Function|Object|string} [iteratee=_.identity]
- * The iteratee to transform keys.
- * @returns {Object} Returns the composed aggregate object.
- * @example
- *
- * _.groupBy([6.1, 4.2, 6.3], Math.floor);
- * // => { '4': [4.2], '6': [6.1, 6.3] }
- *
- * // The `_.property` iteratee shorthand.
- * _.groupBy(['one', 'two', 'three'], 'length');
- * // => { '3': ['one', 'two'], '5': ['three'] }
- */
- var groupBy = createAggregator(function(result, value, key) {
- if (hasOwnProperty.call(result, key)) {
- result[key].push(value);
- } else {
- result[key] = [value];
- }
- });
-
- /**
- * Checks if `value` is in `collection`. If `collection` is a string, it's
- * checked for a substring of `value`, otherwise
- * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * is used for equality comparisons. If `fromIndex` is negative, it's used as
- * the offset from the end of `collection`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object|string} collection The collection to search.
- * @param {*} value The value to search for.
- * @param {number} [fromIndex=0] The index to search from.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
- * @returns {boolean} Returns `true` if `value` is found, else `false`.
- * @example
- *
- * _.includes([1, 2, 3], 1);
- * // => true
- *
- * _.includes([1, 2, 3], 1, 2);
- * // => false
- *
- * _.includes({ 'user': 'fred', 'age': 40 }, 'fred');
- * // => true
- *
- * _.includes('pebbles', 'eb');
- * // => true
- */
- function includes(collection, value, fromIndex, guard) {
- collection = isArrayLike(collection) ? collection : values(collection);
- fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
-
- var length = collection.length;
- if (fromIndex < 0) {
- fromIndex = nativeMax(length + fromIndex, 0);
- }
- return isString(collection)
- ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
- : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
- }
-
- /**
- * Invokes the method at `path` of each element in `collection`, returning
- * an array of the results of each invoked method. Any additional arguments
- * are provided to each invoked method. If `methodName` is a function, it's
- * invoked for and `this` bound to, each element in `collection`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Array|Function|string} path The path of the method to invoke or
- * the function invoked per iteration.
- * @param {...*} [args] The arguments to invoke each method with.
- * @returns {Array} Returns the array of results.
- * @example
- *
- * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
- * // => [[1, 5, 7], [1, 2, 3]]
- *
- * _.invokeMap([123, 456], String.prototype.split, '');
- * // => [['1', '2', '3'], ['4', '5', '6']]
- */
- var invokeMap = rest(function(collection, path, args) {
- var index = -1,
- isFunc = typeof path == 'function',
- isProp = isKey(path),
- result = isArrayLike(collection) ? Array(collection.length) : [];
-
- baseEach(collection, function(value) {
- var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined);
- result[++index] = func ? apply(func, value, args) : baseInvoke(value, path, args);
- });
- return result;
- });
-
- /**
- * Creates an object composed of keys generated from the results of running
- * each element of `collection` thru `iteratee`. The corresponding value of
- * each key is the last element responsible for generating the key. The
- * iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Array|Function|Object|string} [iteratee=_.identity]
- * The iteratee to transform keys.
- * @returns {Object} Returns the composed aggregate object.
- * @example
- *
- * var array = [
- * { 'dir': 'left', 'code': 97 },
- * { 'dir': 'right', 'code': 100 }
- * ];
- *
- * _.keyBy(array, function(o) {
- * return String.fromCharCode(o.code);
- * });
- * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
- *
- * _.keyBy(array, 'dir');
- * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
- */
- var keyBy = createAggregator(function(result, value, key) {
- result[key] = value;
- });
-
- /**
- * Creates an array of values by running each element in `collection` thru
- * `iteratee`. The iteratee is invoked with three arguments:
- * (value, index|key, collection).
- *
- * Many lodash methods are guarded to work as iteratees for methods like
- * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
- *
- * The guarded methods are:
- * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
- * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
- * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
- * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Array|Function|Object|string} [iteratee=_.identity]
- * The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
- * @example
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * _.map([4, 8], square);
- * // => [16, 64]
- *
- * _.map({ 'a': 4, 'b': 8 }, square);
- * // => [16, 64] (iteration order is not guaranteed)
- *
- * var users = [
- * { 'user': 'barney' },
- * { 'user': 'fred' }
- * ];
- *
- * // The `_.property` iteratee shorthand.
- * _.map(users, 'user');
- * // => ['barney', 'fred']
- */
- function map(collection, iteratee) {
- var func = isArray(collection) ? arrayMap : baseMap;
- return func(collection, getIteratee(iteratee, 3));
- }
-
- /**
- * This method is like `_.sortBy` except that it allows specifying the sort
- * orders of the iteratees to sort by. If `orders` is unspecified, all values
- * are sorted in ascending order. Otherwise, specify an order of "desc" for
- * descending or "asc" for ascending sort order of corresponding values.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
- * The iteratees to sort by.
- * @param {string[]} [orders] The sort orders of `iteratees`.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
- * @returns {Array} Returns the new sorted array.
- * @example
- *
- * var users = [
- * { 'user': 'fred', 'age': 48 },
- * { 'user': 'barney', 'age': 34 },
- * { 'user': 'fred', 'age': 40 },
- * { 'user': 'barney', 'age': 36 }
- * ];
- *
- * // Sort by `user` in ascending order and by `age` in descending order.
- * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
- * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
- */
- function orderBy(collection, iteratees, orders, guard) {
- if (collection == null) {
- return [];
- }
- if (!isArray(iteratees)) {
- iteratees = iteratees == null ? [] : [iteratees];
- }
- orders = guard ? undefined : orders;
- if (!isArray(orders)) {
- orders = orders == null ? [] : [orders];
- }
- return baseOrderBy(collection, iteratees, orders);
- }
-
- /**
- * Creates an array of elements split into two groups, the first of which
- * contains elements `predicate` returns truthy for, the second of which
- * contains elements `predicate` returns falsey for. The predicate is
- * invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Array|Function|Object|string} [predicate=_.identity]
- * The function invoked per iteration.
- * @returns {Array} Returns the array of grouped elements.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': false },
- * { 'user': 'fred', 'age': 40, 'active': true },
- * { 'user': 'pebbles', 'age': 1, 'active': false }
- * ];
- *
- * _.partition(users, function(o) { return o.active; });
- * // => objects for [['fred'], ['barney', 'pebbles']]
- *
- * // The `_.matches` iteratee shorthand.
- * _.partition(users, { 'age': 1, 'active': false });
- * // => objects for [['pebbles'], ['barney', 'fred']]
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.partition(users, ['active', false]);
- * // => objects for [['barney', 'pebbles'], ['fred']]
- *
- * // The `_.property` iteratee shorthand.
- * _.partition(users, 'active');
- * // => objects for [['fred'], ['barney', 'pebbles']]
- */
- var partition = createAggregator(function(result, value, key) {
- result[key ? 0 : 1].push(value);
- }, function() { return [[], []]; });
-
- /**
- * Reduces `collection` to a value which is the accumulated result of running
- * each element in `collection` thru `iteratee`, where each successive
- * invocation is supplied the return value of the previous. If `accumulator`
- * is not given, the first element of `collection` is used as the initial
- * value. The iteratee is invoked with four arguments:
- * (accumulator, value, index|key, collection).
- *
- * Many lodash methods are guarded to work as iteratees for methods like
- * `_.reduce`, `_.reduceRight`, and `_.transform`.
- *
- * The guarded methods are:
- * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
- * and `sortBy`
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @returns {*} Returns the accumulated value.
- * @see _.reduceRight
- * @example
- *
- * _.reduce([1, 2], function(sum, n) {
- * return sum + n;
- * }, 0);
- * // => 3
- *
- * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
- * (result[value] || (result[value] = [])).push(key);
- * return result;
- * }, {});
- * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
- */
- function reduce(collection, iteratee, accumulator) {
- var func = isArray(collection) ? arrayReduce : baseReduce,
- initAccum = arguments.length < 3;
-
- return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
- }
-
- /**
- * This method is like `_.reduce` except that it iterates over elements of
- * `collection` from right to left.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @returns {*} Returns the accumulated value.
- * @see _.reduce
- * @example
- *
- * var array = [[0, 1], [2, 3], [4, 5]];
- *
- * _.reduceRight(array, function(flattened, other) {
- * return flattened.concat(other);
- * }, []);
- * // => [4, 5, 2, 3, 0, 1]
- */
- function reduceRight(collection, iteratee, accumulator) {
- var func = isArray(collection) ? arrayReduceRight : baseReduce,
- initAccum = arguments.length < 3;
-
- return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
- }
-
- /**
- * The opposite of `_.filter`; this method returns the elements of `collection`
- * that `predicate` does **not** return truthy for.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Array|Function|Object|string} [predicate=_.identity]
- * The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
- * @see _.filter
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': false },
- * { 'user': 'fred', 'age': 40, 'active': true }
- * ];
- *
- * _.reject(users, function(o) { return !o.active; });
- * // => objects for ['fred']
- *
- * // The `_.matches` iteratee shorthand.
- * _.reject(users, { 'age': 40, 'active': true });
- * // => objects for ['barney']
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.reject(users, ['active', false]);
- * // => objects for ['fred']
- *
- * // The `_.property` iteratee shorthand.
- * _.reject(users, 'active');
- * // => objects for ['barney']
- */
- function reject(collection, predicate) {
- var func = isArray(collection) ? arrayFilter : baseFilter;
- predicate = getIteratee(predicate, 3);
- return func(collection, function(value, index, collection) {
- return !predicate(value, index, collection);
- });
- }
-
- /**
- * Gets a random element from `collection`.
- *
- * @static
- * @memberOf _
- * @since 2.0.0
- * @category Collection
- * @param {Array|Object} collection The collection to sample.
- * @returns {*} Returns the random element.
- * @example
- *
- * _.sample([1, 2, 3, 4]);
- * // => 2
- */
- function sample(collection) {
- var array = isArrayLike(collection) ? collection : values(collection),
- length = array.length;
-
- return length > 0 ? array[baseRandom(0, length - 1)] : undefined;
- }
-
- /**
- * Gets `n` random elements at unique keys from `collection` up to the
- * size of `collection`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Collection
- * @param {Array|Object} collection The collection to sample.
- * @param {number} [n=1] The number of elements to sample.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {Array} Returns the random elements.
- * @example
- *
- * _.sampleSize([1, 2, 3], 2);
- * // => [3, 1]
- *
- * _.sampleSize([1, 2, 3], 4);
- * // => [2, 3, 1]
- */
- function sampleSize(collection, n, guard) {
- var index = -1,
- result = toArray(collection),
- length = result.length,
- lastIndex = length - 1;
-
- if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
- n = 1;
- } else {
- n = baseClamp(toInteger(n), 0, length);
- }
- while (++index < n) {
- var rand = baseRandom(index, lastIndex),
- value = result[rand];
-
- result[rand] = result[index];
- result[index] = value;
- }
- result.length = n;
- return result;
- }
-
- /**
- * Creates an array of shuffled values, using a version of the
- * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to shuffle.
- * @returns {Array} Returns the new shuffled array.
- * @example
- *
- * _.shuffle([1, 2, 3, 4]);
- * // => [4, 1, 3, 2]
- */
- function shuffle(collection) {
- return sampleSize(collection, MAX_ARRAY_LENGTH);
- }
-
- /**
- * Gets the size of `collection` by returning its length for array-like
- * values or the number of own enumerable string keyed properties for objects.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to inspect.
- * @returns {number} Returns the collection size.
- * @example
- *
- * _.size([1, 2, 3]);
- * // => 3
- *
- * _.size({ 'a': 1, 'b': 2 });
- * // => 2
- *
- * _.size('pebbles');
- * // => 7
- */
- function size(collection) {
- if (collection == null) {
- return 0;
- }
- if (isArrayLike(collection)) {
- var result = collection.length;
- return (result && isString(collection)) ? stringSize(collection) : result;
- }
- if (isObjectLike(collection)) {
- var tag = getTag(collection);
- if (tag == mapTag || tag == setTag) {
- return collection.size;
- }
- }
- return keys(collection).length;
- }
-
- /**
- * Checks if `predicate` returns truthy for **any** element of `collection`.
- * Iteration is stopped once `predicate` returns truthy. The predicate is
- * invoked with three arguments: (value, index|key, collection).
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Array|Function|Object|string} [predicate=_.identity]
- * The function invoked per iteration.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {boolean} Returns `true` if any element passes the predicate check,
- * else `false`.
- * @example
- *
- * _.some([null, 0, 'yes', false], Boolean);
- * // => true
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false }
- * ];
- *
- * // The `_.matches` iteratee shorthand.
- * _.some(users, { 'user': 'barney', 'active': false });
- * // => false
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.some(users, ['active', false]);
- * // => true
- *
- * // The `_.property` iteratee shorthand.
- * _.some(users, 'active');
- * // => true
- */
- function some(collection, predicate, guard) {
- var func = isArray(collection) ? arraySome : baseSome;
- if (guard && isIterateeCall(collection, predicate, guard)) {
- predicate = undefined;
- }
- return func(collection, getIteratee(predicate, 3));
- }
-
- /**
- * Creates an array of elements, sorted in ascending order by the results of
- * running each element in a collection thru each iteratee. This method
- * performs a stable sort, that is, it preserves the original sort order of
- * equal elements. The iteratees are invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])}
- * [iteratees=[_.identity]] The iteratees to sort by.
- * @returns {Array} Returns the new sorted array.
- * @example
- *
- * var users = [
- * { 'user': 'fred', 'age': 48 },
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 },
- * { 'user': 'barney', 'age': 34 }
- * ];
- *
- * _.sortBy(users, function(o) { return o.user; });
- * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
- *
- * _.sortBy(users, ['user', 'age']);
- * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
- *
- * _.sortBy(users, 'user', function(o) {
- * return Math.floor(o.age / 10);
- * });
- * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
- */
- var sortBy = rest(function(collection, iteratees) {
- if (collection == null) {
- return [];
- }
- var length = iteratees.length;
- if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
- iteratees = [];
- } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
- iteratees = [iteratees[0]];
- }
- iteratees = (iteratees.length == 1 && isArray(iteratees[0]))
- ? iteratees[0]
- : baseFlatten(iteratees, 1, isFlattenableIteratee);
-
- return baseOrderBy(collection, iteratees, []);
- });
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Gets the timestamp of the number of milliseconds that have elapsed since
- * the Unix epoch (1 January 1970 00:00:00 UTC).
- *
- * @static
- * @memberOf _
- * @since 2.4.0
- * @type {Function}
- * @category Date
- * @returns {number} Returns the timestamp.
- * @example
- *
- * _.defer(function(stamp) {
- * console.log(_.now() - stamp);
- * }, _.now());
- * // => Logs the number of milliseconds it took for the deferred function to be invoked.
- */
- var now = Date.now;
-
- /*------------------------------------------------------------------------*/
-
- /**
- * The opposite of `_.before`; this method creates a function that invokes
- * `func` once it's called `n` or more times.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {number} n The number of calls before `func` is invoked.
- * @param {Function} func The function to restrict.
- * @returns {Function} Returns the new restricted function.
- * @example
- *
- * var saves = ['profile', 'settings'];
- *
- * var done = _.after(saves.length, function() {
- * console.log('done saving!');
- * });
- *
- * _.forEach(saves, function(type) {
- * asyncSave({ 'type': type, 'complete': done });
- * });
- * // => Logs 'done saving!' after the two async saves have completed.
- */
- function after(n, func) {
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- n = toInteger(n);
- return function() {
- if (--n < 1) {
- return func.apply(this, arguments);
- }
- };
- }
-
- /**
- * Creates a function that invokes `func`, with up to `n` arguments,
- * ignoring any additional arguments.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Function
- * @param {Function} func The function to cap arguments for.
- * @param {number} [n=func.length] The arity cap.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {Function} Returns the new function.
- * @example
- *
- * _.map(['6', '8', '10'], _.ary(parseInt, 1));
- * // => [6, 8, 10]
- */
- function ary(func, n, guard) {
- n = guard ? undefined : n;
- n = (func && n == null) ? func.length : n;
- return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n);
- }
-
- /**
- * Creates a function that invokes `func`, with the `this` binding and arguments
- * of the created function, while it's called less than `n` times. Subsequent
- * calls to the created function return the result of the last `func` invocation.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Function
- * @param {number} n The number of calls at which `func` is no longer invoked.
- * @param {Function} func The function to restrict.
- * @returns {Function} Returns the new restricted function.
- * @example
- *
- * jQuery(element).on('click', _.before(5, addContactToList));
- * // => allows adding up to 4 contacts to the list
- */
- function before(n, func) {
- var result;
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- n = toInteger(n);
- return function() {
- if (--n > 0) {
- result = func.apply(this, arguments);
- }
- if (n <= 1) {
- func = undefined;
- }
- return result;
- };
- }
-
- /**
- * Creates a function that invokes `func` with the `this` binding of `thisArg`
- * and `partials` prepended to the arguments it receives.
- *
- * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
- * may be used as a placeholder for partially applied arguments.
- *
- * **Note:** Unlike native `Function#bind` this method doesn't set the "length"
- * property of bound functions.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to bind.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {...*} [partials] The arguments to be partially applied.
- * @returns {Function} Returns the new bound function.
- * @example
- *
- * var greet = function(greeting, punctuation) {
- * return greeting + ' ' + this.user + punctuation;
- * };
- *
- * var object = { 'user': 'fred' };
- *
- * var bound = _.bind(greet, object, 'hi');
- * bound('!');
- * // => 'hi fred!'
- *
- * // Bound with placeholders.
- * var bound = _.bind(greet, object, _, '!');
- * bound('hi');
- * // => 'hi fred!'
- */
- var bind = rest(function(func, thisArg, partials) {
- var bitmask = BIND_FLAG;
- if (partials.length) {
- var holders = replaceHolders(partials, getPlaceholder(bind));
- bitmask |= PARTIAL_FLAG;
- }
- return createWrapper(func, bitmask, thisArg, partials, holders);
- });
-
- /**
- * Creates a function that invokes the method at `object[key]` with `partials`
- * prepended to the arguments it receives.
- *
- * This method differs from `_.bind` by allowing bound functions to reference
- * methods that may be redefined or don't yet exist. See
- * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
- * for more details.
- *
- * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
- * builds, may be used as a placeholder for partially applied arguments.
- *
- * @static
- * @memberOf _
- * @since 0.10.0
- * @category Function
- * @param {Object} object The object to invoke the method on.
- * @param {string} key The key of the method.
- * @param {...*} [partials] The arguments to be partially applied.
- * @returns {Function} Returns the new bound function.
- * @example
- *
- * var object = {
- * 'user': 'fred',
- * 'greet': function(greeting, punctuation) {
- * return greeting + ' ' + this.user + punctuation;
- * }
- * };
- *
- * var bound = _.bindKey(object, 'greet', 'hi');
- * bound('!');
- * // => 'hi fred!'
- *
- * object.greet = function(greeting, punctuation) {
- * return greeting + 'ya ' + this.user + punctuation;
- * };
- *
- * bound('!');
- * // => 'hiya fred!'
- *
- * // Bound with placeholders.
- * var bound = _.bindKey(object, 'greet', _, '!');
- * bound('hi');
- * // => 'hiya fred!'
- */
- var bindKey = rest(function(object, key, partials) {
- var bitmask = BIND_FLAG | BIND_KEY_FLAG;
- if (partials.length) {
- var holders = replaceHolders(partials, getPlaceholder(bindKey));
- bitmask |= PARTIAL_FLAG;
- }
- return createWrapper(key, bitmask, object, partials, holders);
- });
-
- /**
- * Creates a function that accepts arguments of `func` and either invokes
- * `func` returning its result, if at least `arity` number of arguments have
- * been provided, or returns a function that accepts the remaining `func`
- * arguments, and so on. The arity of `func` may be specified if `func.length`
- * is not sufficient.
- *
- * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
- * may be used as a placeholder for provided arguments.
- *
- * **Note:** This method doesn't set the "length" property of curried functions.
- *
- * @static
- * @memberOf _
- * @since 2.0.0
- * @category Function
- * @param {Function} func The function to curry.
- * @param {number} [arity=func.length] The arity of `func`.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {Function} Returns the new curried function.
- * @example
- *
- * var abc = function(a, b, c) {
- * return [a, b, c];
- * };
- *
- * var curried = _.curry(abc);
- *
- * curried(1)(2)(3);
- * // => [1, 2, 3]
- *
- * curried(1, 2)(3);
- * // => [1, 2, 3]
- *
- * curried(1, 2, 3);
- * // => [1, 2, 3]
- *
- * // Curried with placeholders.
- * curried(1)(_, 3)(2);
- * // => [1, 2, 3]
- */
- function curry(func, arity, guard) {
- arity = guard ? undefined : arity;
- var result = createWrapper(func, CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
- result.placeholder = curry.placeholder;
- return result;
- }
-
- /**
- * This method is like `_.curry` except that arguments are applied to `func`
- * in the manner of `_.partialRight` instead of `_.partial`.
- *
- * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
- * builds, may be used as a placeholder for provided arguments.
- *
- * **Note:** This method doesn't set the "length" property of curried functions.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Function
- * @param {Function} func The function to curry.
- * @param {number} [arity=func.length] The arity of `func`.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {Function} Returns the new curried function.
- * @example
- *
- * var abc = function(a, b, c) {
- * return [a, b, c];
- * };
- *
- * var curried = _.curryRight(abc);
- *
- * curried(3)(2)(1);
- * // => [1, 2, 3]
- *
- * curried(2, 3)(1);
- * // => [1, 2, 3]
- *
- * curried(1, 2, 3);
- * // => [1, 2, 3]
- *
- * // Curried with placeholders.
- * curried(3)(1, _)(2);
- * // => [1, 2, 3]
- */
- function curryRight(func, arity, guard) {
- arity = guard ? undefined : arity;
- var result = createWrapper(func, CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
- result.placeholder = curryRight.placeholder;
- return result;
- }
-
- /**
- * Creates a debounced function that delays invoking `func` until after `wait`
- * milliseconds have elapsed since the last time the debounced function was
- * invoked. The debounced function comes with a `cancel` method to cancel
- * delayed `func` invocations and a `flush` method to immediately invoke them.
- * Provide an options object to indicate whether `func` should be invoked on
- * the leading and/or trailing edge of the `wait` timeout. The `func` is invoked
- * with the last arguments provided to the debounced function. Subsequent calls
- * to the debounced function return the result of the last `func` invocation.
- *
- * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked
- * on the trailing edge of the timeout only if the debounced function is
- * invoked more than once during the `wait` timeout.
- *
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
- * for details over the differences between `_.debounce` and `_.throttle`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to debounce.
- * @param {number} [wait=0] The number of milliseconds to delay.
- * @param {Object} [options={}] The options object.
- * @param {boolean} [options.leading=false]
- * Specify invoking on the leading edge of the timeout.
- * @param {number} [options.maxWait]
- * The maximum time `func` is allowed to be delayed before it's invoked.
- * @param {boolean} [options.trailing=true]
- * Specify invoking on the trailing edge of the timeout.
- * @returns {Function} Returns the new debounced function.
- * @example
- *
- * // Avoid costly calculations while the window size is in flux.
- * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
- *
- * // Invoke `sendMail` when clicked, debouncing subsequent calls.
- * jQuery(element).on('click', _.debounce(sendMail, 300, {
- * 'leading': true,
- * 'trailing': false
- * }));
- *
- * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
- * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
- * var source = new EventSource('/stream');
- * jQuery(source).on('message', debounced);
- *
- * // Cancel the trailing debounced invocation.
- * jQuery(window).on('popstate', debounced.cancel);
- */
- function debounce(func, wait, options) {
- var lastArgs,
- lastThis,
- maxWait,
- result,
- timerId,
- lastCallTime = 0,
- lastInvokeTime = 0,
- leading = false,
- maxing = false,
- trailing = true;
-
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- wait = toNumber(wait) || 0;
- if (isObject(options)) {
- leading = !!options.leading;
- maxing = 'maxWait' in options;
- maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
- trailing = 'trailing' in options ? !!options.trailing : trailing;
- }
-
- function invokeFunc(time) {
- var args = lastArgs,
- thisArg = lastThis;
-
- lastArgs = lastThis = undefined;
- lastInvokeTime = time;
- result = func.apply(thisArg, args);
- return result;
- }
-
- function leadingEdge(time) {
- // Reset any `maxWait` timer.
- lastInvokeTime = time;
- // Start the timer for the trailing edge.
- timerId = setTimeout(timerExpired, wait);
- // Invoke the leading edge.
- return leading ? invokeFunc(time) : result;
- }
-
- function remainingWait(time) {
- var timeSinceLastCall = time - lastCallTime,
- timeSinceLastInvoke = time - lastInvokeTime,
- result = wait - timeSinceLastCall;
-
- return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
- }
-
- function shouldInvoke(time) {
- var timeSinceLastCall = time - lastCallTime,
- timeSinceLastInvoke = time - lastInvokeTime;
-
- // Either this is the first call, activity has stopped and we're at the
- // trailing edge, the system time has gone backwards and we're treating
- // it as the trailing edge, or we've hit the `maxWait` limit.
- return (!lastCallTime || (timeSinceLastCall >= wait) ||
- (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
- }
-
- function timerExpired() {
- var time = now();
- if (shouldInvoke(time)) {
- return trailingEdge(time);
- }
- // Restart the timer.
- timerId = setTimeout(timerExpired, remainingWait(time));
- }
-
- function trailingEdge(time) {
- clearTimeout(timerId);
- timerId = undefined;
-
- // Only invoke if we have `lastArgs` which means `func` has been
- // debounced at least once.
- if (trailing && lastArgs) {
- return invokeFunc(time);
- }
- lastArgs = lastThis = undefined;
- return result;
- }
-
- function cancel() {
- if (timerId !== undefined) {
- clearTimeout(timerId);
- }
- lastCallTime = lastInvokeTime = 0;
- lastArgs = lastThis = timerId = undefined;
- }
-
- function flush() {
- return timerId === undefined ? result : trailingEdge(now());
- }
-
- function debounced() {
- var time = now(),
- isInvoking = shouldInvoke(time);
-
- lastArgs = arguments;
- lastThis = this;
- lastCallTime = time;
-
- if (isInvoking) {
- if (timerId === undefined) {
- return leadingEdge(lastCallTime);
- }
- if (maxing) {
- // Handle invocations in a tight loop.
- clearTimeout(timerId);
- timerId = setTimeout(timerExpired, wait);
- return invokeFunc(lastCallTime);
- }
- }
- if (timerId === undefined) {
- timerId = setTimeout(timerExpired, wait);
- }
- return result;
- }
- debounced.cancel = cancel;
- debounced.flush = flush;
- return debounced;
- }
-
- /**
- * Defers invoking the `func` until the current call stack has cleared. Any
- * additional arguments are provided to `func` when it's invoked.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to defer.
- * @param {...*} [args] The arguments to invoke `func` with.
- * @returns {number} Returns the timer id.
- * @example
- *
- * _.defer(function(text) {
- * console.log(text);
- * }, 'deferred');
- * // => Logs 'deferred' after one or more milliseconds.
- */
- var defer = rest(function(func, args) {
- return baseDelay(func, 1, args);
- });
-
- /**
- * Invokes `func` after `wait` milliseconds. Any additional arguments are
- * provided to `func` when it's invoked.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to delay.
- * @param {number} wait The number of milliseconds to delay invocation.
- * @param {...*} [args] The arguments to invoke `func` with.
- * @returns {number} Returns the timer id.
- * @example
- *
- * _.delay(function(text) {
- * console.log(text);
- * }, 1000, 'later');
- * // => Logs 'later' after one second.
- */
- var delay = rest(function(func, wait, args) {
- return baseDelay(func, toNumber(wait) || 0, args);
- });
-
- /**
- * Creates a function that invokes `func` with arguments reversed.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Function
- * @param {Function} func The function to flip arguments for.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var flipped = _.flip(function() {
- * return _.toArray(arguments);
- * });
- *
- * flipped('a', 'b', 'c', 'd');
- * // => ['d', 'c', 'b', 'a']
- */
- function flip(func) {
- return createWrapper(func, FLIP_FLAG);
- }
-
- /**
- * Creates a function that memoizes the result of `func`. If `resolver` is
- * provided, it determines the cache key for storing the result based on the
- * arguments provided to the memoized function. By default, the first argument
- * provided to the memoized function is used as the map cache key. The `func`
- * is invoked with the `this` binding of the memoized function.
- *
- * **Note:** The cache is exposed as the `cache` property on the memoized
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
- * constructor with one whose instances implement the
- * [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
- * method interface of `delete`, `get`, `has`, and `set`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to have its output memoized.
- * @param {Function} [resolver] The function to resolve the cache key.
- * @returns {Function} Returns the new memoizing function.
- * @example
- *
- * var object = { 'a': 1, 'b': 2 };
- * var other = { 'c': 3, 'd': 4 };
- *
- * var values = _.memoize(_.values);
- * values(object);
- * // => [1, 2]
- *
- * values(other);
- * // => [3, 4]
- *
- * object.a = 2;
- * values(object);
- * // => [1, 2]
- *
- * // Modify the result cache.
- * values.cache.set(object, ['a', 'b']);
- * values(object);
- * // => ['a', 'b']
- *
- * // Replace `_.memoize.Cache`.
- * _.memoize.Cache = WeakMap;
- */
- function memoize(func, resolver) {
- if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- var memoized = function() {
- var args = arguments,
- key = resolver ? resolver.apply(this, args) : args[0],
- cache = memoized.cache;
-
- if (cache.has(key)) {
- return cache.get(key);
- }
- var result = func.apply(this, args);
- memoized.cache = cache.set(key, result);
- return result;
- };
- memoized.cache = new (memoize.Cache || MapCache);
- return memoized;
- }
-
- // Assign cache to `_.memoize`.
- memoize.Cache = MapCache;
-
- /**
- * Creates a function that negates the result of the predicate `func`. The
- * `func` predicate is invoked with the `this` binding and arguments of the
- * created function.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Function
- * @param {Function} predicate The predicate to negate.
- * @returns {Function} Returns the new function.
- * @example
- *
- * function isEven(n) {
- * return n % 2 == 0;
- * }
- *
- * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
- * // => [1, 3, 5]
- */
- function negate(predicate) {
- if (typeof predicate != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- return function() {
- return !predicate.apply(this, arguments);
- };
- }
-
- /**
- * Creates a function that is restricted to invoking `func` once. Repeat calls
- * to the function return the value of the first invocation. The `func` is
- * invoked with the `this` binding and arguments of the created function.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to restrict.
- * @returns {Function} Returns the new restricted function.
- * @example
- *
- * var initialize = _.once(createApplication);
- * initialize();
- * initialize();
- * // `initialize` invokes `createApplication` once
- */
- function once(func) {
- return before(2, func);
- }
-
- /**
- * Creates a function that invokes `func` with arguments transformed by
- * corresponding `transforms`.
- *
- * @static
- * @since 4.0.0
- * @memberOf _
- * @category Function
- * @param {Function} func The function to wrap.
- * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])}
- * [transforms[_.identity]] The functions to transform.
- * @returns {Function} Returns the new function.
- * @example
- *
- * function doubled(n) {
- * return n * 2;
- * }
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * var func = _.overArgs(function(x, y) {
- * return [x, y];
- * }, square, doubled);
- *
- * func(9, 3);
- * // => [81, 6]
- *
- * func(10, 5);
- * // => [100, 10]
- */
- var overArgs = rest(function(func, transforms) {
- transforms = (transforms.length == 1 && isArray(transforms[0]))
- ? arrayMap(transforms[0], baseUnary(getIteratee()))
- : arrayMap(baseFlatten(transforms, 1, isFlattenableIteratee), baseUnary(getIteratee()));
-
- var funcsLength = transforms.length;
- return rest(function(args) {
- var index = -1,
- length = nativeMin(args.length, funcsLength);
-
- while (++index < length) {
- args[index] = transforms[index].call(this, args[index]);
- }
- return apply(func, this, args);
- });
- });
-
- /**
- * Creates a function that invokes `func` with `partials` prepended to the
- * arguments it receives. This method is like `_.bind` except it does **not**
- * alter the `this` binding.
- *
- * The `_.partial.placeholder` value, which defaults to `_` in monolithic
- * builds, may be used as a placeholder for partially applied arguments.
- *
- * **Note:** This method doesn't set the "length" property of partially
- * applied functions.
- *
- * @static
- * @memberOf _
- * @since 0.2.0
- * @category Function
- * @param {Function} func The function to partially apply arguments to.
- * @param {...*} [partials] The arguments to be partially applied.
- * @returns {Function} Returns the new partially applied function.
- * @example
- *
- * var greet = function(greeting, name) {
- * return greeting + ' ' + name;
- * };
- *
- * var sayHelloTo = _.partial(greet, 'hello');
- * sayHelloTo('fred');
- * // => 'hello fred'
- *
- * // Partially applied with placeholders.
- * var greetFred = _.partial(greet, _, 'fred');
- * greetFred('hi');
- * // => 'hi fred'
- */
- var partial = rest(function(func, partials) {
- var holders = replaceHolders(partials, getPlaceholder(partial));
- return createWrapper(func, PARTIAL_FLAG, undefined, partials, holders);
- });
-
- /**
- * This method is like `_.partial` except that partially applied arguments
- * are appended to the arguments it receives.
- *
- * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
- * builds, may be used as a placeholder for partially applied arguments.
- *
- * **Note:** This method doesn't set the "length" property of partially
- * applied functions.
- *
- * @static
- * @memberOf _
- * @since 1.0.0
- * @category Function
- * @param {Function} func The function to partially apply arguments to.
- * @param {...*} [partials] The arguments to be partially applied.
- * @returns {Function} Returns the new partially applied function.
- * @example
- *
- * var greet = function(greeting, name) {
- * return greeting + ' ' + name;
- * };
- *
- * var greetFred = _.partialRight(greet, 'fred');
- * greetFred('hi');
- * // => 'hi fred'
- *
- * // Partially applied with placeholders.
- * var sayHelloTo = _.partialRight(greet, 'hello', _);
- * sayHelloTo('fred');
- * // => 'hello fred'
- */
- var partialRight = rest(function(func, partials) {
- var holders = replaceHolders(partials, getPlaceholder(partialRight));
- return createWrapper(func, PARTIAL_RIGHT_FLAG, undefined, partials, holders);
- });
-
- /**
- * Creates a function that invokes `func` with arguments arranged according
- * to the specified `indexes` where the argument value at the first index is
- * provided as the first argument, the argument value at the second index is
- * provided as the second argument, and so on.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Function
- * @param {Function} func The function to rearrange arguments for.
- * @param {...(number|number[])} indexes The arranged argument indexes.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var rearged = _.rearg(function(a, b, c) {
- * return [a, b, c];
- * }, 2, 0, 1);
- *
- * rearged('b', 'c', 'a')
- * // => ['a', 'b', 'c']
- */
- var rearg = rest(function(func, indexes) {
- return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes, 1));
- });
-
- /**
- * Creates a function that invokes `func` with the `this` binding of the
- * created function and arguments from `start` and beyond provided as
- * an array.
- *
- * **Note:** This method is based on the
- * [rest parameter](https://mdn.io/rest_parameters).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Function
- * @param {Function} func The function to apply a rest parameter to.
- * @param {number} [start=func.length-1] The start position of the rest parameter.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var say = _.rest(function(what, names) {
- * return what + ' ' + _.initial(names).join(', ') +
- * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
- * });
- *
- * say('hello', 'fred', 'barney', 'pebbles');
- * // => 'hello fred, barney, & pebbles'
- */
- function rest(func, start) {
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- start = nativeMax(start === undefined ? (func.length - 1) : toInteger(start), 0);
- return function() {
- var args = arguments,
- index = -1,
- length = nativeMax(args.length - start, 0),
- array = Array(length);
-
- while (++index < length) {
- array[index] = args[start + index];
- }
- switch (start) {
- case 0: return func.call(this, array);
- case 1: return func.call(this, args[0], array);
- case 2: return func.call(this, args[0], args[1], array);
- }
- var otherArgs = Array(start + 1);
- index = -1;
- while (++index < start) {
- otherArgs[index] = args[index];
- }
- otherArgs[start] = array;
- return apply(func, this, otherArgs);
- };
- }
-
- /**
- * Creates a function that invokes `func` with the `this` binding of the
- * create function and an array of arguments much like
- * [`Function#apply`](http://www.ecma-international.org/ecma-262/6.0/#sec-function.prototype.apply).
- *
- * **Note:** This method is based on the
- * [spread operator](https://mdn.io/spread_operator).
- *
- * @static
- * @memberOf _
- * @since 3.2.0
- * @category Function
- * @param {Function} func The function to spread arguments over.
- * @param {number} [start=0] The start position of the spread.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var say = _.spread(function(who, what) {
- * return who + ' says ' + what;
- * });
- *
- * say(['fred', 'hello']);
- * // => 'fred says hello'
- *
- * var numbers = Promise.all([
- * Promise.resolve(40),
- * Promise.resolve(36)
- * ]);
- *
- * numbers.then(_.spread(function(x, y) {
- * return x + y;
- * }));
- * // => a Promise of 76
- */
- function spread(func, start) {
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- start = start === undefined ? 0 : nativeMax(toInteger(start), 0);
- return rest(function(args) {
- var array = args[start],
- otherArgs = castSlice(args, 0, start);
-
- if (array) {
- arrayPush(otherArgs, array);
- }
- return apply(func, this, otherArgs);
- });
- }
-
- /**
- * Creates a throttled function that only invokes `func` at most once per
- * every `wait` milliseconds. The throttled function comes with a `cancel`
- * method to cancel delayed `func` invocations and a `flush` method to
- * immediately invoke them. Provide an options object to indicate whether
- * `func` should be invoked on the leading and/or trailing edge of the `wait`
- * timeout. The `func` is invoked with the last arguments provided to the
- * throttled function. Subsequent calls to the throttled function return the
- * result of the last `func` invocation.
- *
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
- * invoked on the trailing edge of the timeout only if the throttled function
- * is invoked more than once during the `wait` timeout.
- *
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
- * for details over the differences between `_.throttle` and `_.debounce`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to throttle.
- * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
- * @param {Object} [options={}] The options object.
- * @param {boolean} [options.leading=true]
- * Specify invoking on the leading edge of the timeout.
- * @param {boolean} [options.trailing=true]
- * Specify invoking on the trailing edge of the timeout.
- * @returns {Function} Returns the new throttled function.
- * @example
- *
- * // Avoid excessively updating the position while scrolling.
- * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
- *
- * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
- * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
- * jQuery(element).on('click', throttled);
- *
- * // Cancel the trailing throttled invocation.
- * jQuery(window).on('popstate', throttled.cancel);
- */
- function throttle(func, wait, options) {
- var leading = true,
- trailing = true;
-
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- if (isObject(options)) {
- leading = 'leading' in options ? !!options.leading : leading;
- trailing = 'trailing' in options ? !!options.trailing : trailing;
- }
- return debounce(func, wait, {
- 'leading': leading,
- 'maxWait': wait,
- 'trailing': trailing
- });
- }
-
- /**
- * Creates a function that accepts up to one argument, ignoring any
- * additional arguments.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Function
- * @param {Function} func The function to cap arguments for.
- * @returns {Function} Returns the new function.
- * @example
- *
- * _.map(['6', '8', '10'], _.unary(parseInt));
- * // => [6, 8, 10]
- */
- function unary(func) {
- return ary(func, 1);
- }
-
- /**
- * Creates a function that provides `value` to the wrapper function as its
- * first argument. Any additional arguments provided to the function are
- * appended to those provided to the wrapper function. The wrapper is invoked
- * with the `this` binding of the created function.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {*} value The value to wrap.
- * @param {Function} [wrapper=identity] The wrapper function.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var p = _.wrap(_.escape, function(func, text) {
- * return '' + func(text) + '
';
- * });
- *
- * p('fred, barney, & pebbles');
- * // => 'fred, barney, & pebbles
'
- */
- function wrap(value, wrapper) {
- wrapper = wrapper == null ? identity : wrapper;
- return partial(wrapper, value);
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Casts `value` as an array if it's not one.
- *
- * @static
- * @memberOf _
- * @since 4.4.0
- * @category Lang
- * @param {*} value The value to inspect.
- * @returns {Array} Returns the cast array.
- * @example
- *
- * _.castArray(1);
- * // => [1]
- *
- * _.castArray({ 'a': 1 });
- * // => [{ 'a': 1 }]
- *
- * _.castArray('abc');
- * // => ['abc']
- *
- * _.castArray(null);
- * // => [null]
- *
- * _.castArray(undefined);
- * // => [undefined]
- *
- * _.castArray();
- * // => []
- *
- * var array = [1, 2, 3];
- * console.log(_.castArray(array) === array);
- * // => true
- */
- function castArray() {
- if (!arguments.length) {
- return [];
- }
- var value = arguments[0];
- return isArray(value) ? value : [value];
- }
-
- /**
- * Creates a shallow clone of `value`.
- *
- * **Note:** This method is loosely based on the
- * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
- * and supports cloning arrays, array buffers, booleans, date objects, maps,
- * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
- * arrays. The own enumerable properties of `arguments` objects are cloned
- * as plain objects. An empty object is returned for uncloneable values such
- * as error objects, functions, DOM nodes, and WeakMaps.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to clone.
- * @returns {*} Returns the cloned value.
- * @see _.cloneDeep
- * @example
- *
- * var objects = [{ 'a': 1 }, { 'b': 2 }];
- *
- * var shallow = _.clone(objects);
- * console.log(shallow[0] === objects[0]);
- * // => true
- */
- function clone(value) {
- return baseClone(value, false, true);
- }
-
- /**
- * This method is like `_.clone` except that it accepts `customizer` which
- * is invoked to produce the cloned value. If `customizer` returns `undefined`,
- * cloning is handled by the method instead. The `customizer` is invoked with
- * up to four arguments; (value [, index|key, object, stack]).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to clone.
- * @param {Function} [customizer] The function to customize cloning.
- * @returns {*} Returns the cloned value.
- * @see _.cloneDeepWith
- * @example
- *
- * function customizer(value) {
- * if (_.isElement(value)) {
- * return value.cloneNode(false);
- * }
- * }
- *
- * var el = _.cloneWith(document.body, customizer);
- *
- * console.log(el === document.body);
- * // => false
- * console.log(el.nodeName);
- * // => 'BODY'
- * console.log(el.childNodes.length);
- * // => 0
- */
- function cloneWith(value, customizer) {
- return baseClone(value, false, true, customizer);
- }
-
- /**
- * This method is like `_.clone` except that it recursively clones `value`.
- *
- * @static
- * @memberOf _
- * @since 1.0.0
- * @category Lang
- * @param {*} value The value to recursively clone.
- * @returns {*} Returns the deep cloned value.
- * @see _.clone
- * @example
- *
- * var objects = [{ 'a': 1 }, { 'b': 2 }];
- *
- * var deep = _.cloneDeep(objects);
- * console.log(deep[0] === objects[0]);
- * // => false
- */
- function cloneDeep(value) {
- return baseClone(value, true, true);
- }
-
- /**
- * This method is like `_.cloneWith` except that it recursively clones `value`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to recursively clone.
- * @param {Function} [customizer] The function to customize cloning.
- * @returns {*} Returns the deep cloned value.
- * @see _.cloneWith
- * @example
- *
- * function customizer(value) {
- * if (_.isElement(value)) {
- * return value.cloneNode(true);
- * }
- * }
- *
- * var el = _.cloneDeepWith(document.body, customizer);
- *
- * console.log(el === document.body);
- * // => false
- * console.log(el.nodeName);
- * // => 'BODY'
- * console.log(el.childNodes.length);
- * // => 20
- */
- function cloneDeepWith(value, customizer) {
- return baseClone(value, true, true, customizer);
- }
-
- /**
- * Performs a
- * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * comparison between two values to determine if they are equivalent.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * var object = { 'user': 'fred' };
- * var other = { 'user': 'fred' };
- *
- * _.eq(object, object);
- * // => true
- *
- * _.eq(object, other);
- * // => false
- *
- * _.eq('a', 'a');
- * // => true
- *
- * _.eq('a', Object('a'));
- * // => false
- *
- * _.eq(NaN, NaN);
- * // => true
- */
- function eq(value, other) {
- return value === other || (value !== value && other !== other);
- }
-
- /**
- * Checks if `value` is greater than `other`.
- *
- * @static
- * @memberOf _
- * @since 3.9.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is greater than `other`,
- * else `false`.
- * @see _.lt
- * @example
- *
- * _.gt(3, 1);
- * // => true
- *
- * _.gt(3, 3);
- * // => false
- *
- * _.gt(1, 3);
- * // => false
- */
- var gt = createRelationalOperation(baseGt);
-
- /**
- * Checks if `value` is greater than or equal to `other`.
- *
- * @static
- * @memberOf _
- * @since 3.9.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is greater than or equal to
- * `other`, else `false`.
- * @see _.lte
- * @example
- *
- * _.gte(3, 1);
- * // => true
- *
- * _.gte(3, 3);
- * // => true
- *
- * _.gte(1, 3);
- * // => false
- */
- var gte = createRelationalOperation(function(value, other) {
- return value >= other;
- });
-
- /**
- * Checks if `value` is likely an `arguments` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
- * @example
- *
- * _.isArguments(function() { return arguments; }());
- * // => true
- *
- * _.isArguments([1, 2, 3]);
- * // => false
- */
- function isArguments(value) {
- // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
- return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
- (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
- }
-
- /**
- * Checks if `value` is classified as an `Array` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @type {Function}
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
- * @example
- *
- * _.isArray([1, 2, 3]);
- * // => true
- *
- * _.isArray(document.body.children);
- * // => false
- *
- * _.isArray('abc');
- * // => false
- *
- * _.isArray(_.noop);
- * // => false
- */
- var isArray = Array.isArray;
-
- /**
- * Checks if `value` is classified as an `ArrayBuffer` object.
- *
- * @static
- * @memberOf _
- * @since 4.3.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
- * @example
- *
- * _.isArrayBuffer(new ArrayBuffer(2));
- * // => true
- *
- * _.isArrayBuffer(new Array(2));
- * // => false
- */
- function isArrayBuffer(value) {
- return isObjectLike(value) && objectToString.call(value) == arrayBufferTag;
- }
-
- /**
- * Checks if `value` is array-like. A value is considered array-like if it's
- * not a function and has a `value.length` that's an integer greater than or
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
- * @example
- *
- * _.isArrayLike([1, 2, 3]);
- * // => true
- *
- * _.isArrayLike(document.body.children);
- * // => true
- *
- * _.isArrayLike('abc');
- * // => true
- *
- * _.isArrayLike(_.noop);
- * // => false
- */
- function isArrayLike(value) {
- return value != null && isLength(getLength(value)) && !isFunction(value);
- }
-
- /**
- * This method is like `_.isArrayLike` except that it also checks if `value`
- * is an object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array-like object,
- * else `false`.
- * @example
- *
- * _.isArrayLikeObject([1, 2, 3]);
- * // => true
- *
- * _.isArrayLikeObject(document.body.children);
- * // => true
- *
- * _.isArrayLikeObject('abc');
- * // => false
- *
- * _.isArrayLikeObject(_.noop);
- * // => false
- */
- function isArrayLikeObject(value) {
- return isObjectLike(value) && isArrayLike(value);
- }
-
- /**
- * Checks if `value` is classified as a boolean primitive or object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
- * @example
- *
- * _.isBoolean(false);
- * // => true
- *
- * _.isBoolean(null);
- * // => false
- */
- function isBoolean(value) {
- return value === true || value === false ||
- (isObjectLike(value) && objectToString.call(value) == boolTag);
- }
-
- /**
- * Checks if `value` is a buffer.
- *
- * @static
- * @memberOf _
- * @since 4.3.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
- * @example
- *
- * _.isBuffer(new Buffer(2));
- * // => true
- *
- * _.isBuffer(new Uint8Array(2));
- * // => false
- */
- var isBuffer = !Buffer ? constant(false) : function(value) {
- return value instanceof Buffer;
- };
-
- /**
- * Checks if `value` is classified as a `Date` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
- * @example
- *
- * _.isDate(new Date);
- * // => true
- *
- * _.isDate('Mon April 23 2012');
- * // => false
- */
- function isDate(value) {
- return isObjectLike(value) && objectToString.call(value) == dateTag;
- }
-
- /**
- * Checks if `value` is likely a DOM element.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a DOM element,
- * else `false`.
- * @example
- *
- * _.isElement(document.body);
- * // => true
- *
- * _.isElement('');
- * // => false
- */
- function isElement(value) {
- return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value);
- }
-
- /**
- * Checks if `value` is an empty object, collection, map, or set.
- *
- * Objects are considered empty if they have no own enumerable string keyed
- * properties.
- *
- * Array-like values such as `arguments` objects, arrays, buffers, strings, or
- * jQuery-like collections are considered empty if they have a `length` of `0`.
- * Similarly, maps and sets are considered empty if they have a `size` of `0`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is empty, else `false`.
- * @example
- *
- * _.isEmpty(null);
- * // => true
- *
- * _.isEmpty(true);
- * // => true
- *
- * _.isEmpty(1);
- * // => true
- *
- * _.isEmpty([1, 2, 3]);
- * // => false
- *
- * _.isEmpty({ 'a': 1 });
- * // => false
- */
- function isEmpty(value) {
- if (isArrayLike(value) &&
- (isArray(value) || isString(value) || isFunction(value.splice) ||
- isArguments(value) || isBuffer(value))) {
- return !value.length;
- }
- if (isObjectLike(value)) {
- var tag = getTag(value);
- if (tag == mapTag || tag == setTag) {
- return !value.size;
- }
- }
- for (var key in value) {
- if (hasOwnProperty.call(value, key)) {
- return false;
- }
- }
- return !(nonEnumShadows && keys(value).length);
- }
-
- /**
- * Performs a deep comparison between two values to determine if they are
- * equivalent.
- *
- * **Note:** This method supports comparing arrays, array buffers, booleans,
- * date objects, error objects, maps, numbers, `Object` objects, regexes,
- * sets, strings, symbols, and typed arrays. `Object` objects are compared
- * by their own, not inherited, enumerable properties. Functions and DOM
- * nodes are **not** supported.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if the values are equivalent,
- * else `false`.
- * @example
- *
- * var object = { 'user': 'fred' };
- * var other = { 'user': 'fred' };
- *
- * _.isEqual(object, other);
- * // => true
- *
- * object === other;
- * // => false
- */
- function isEqual(value, other) {
- return baseIsEqual(value, other);
- }
-
- /**
- * This method is like `_.isEqual` except that it accepts `customizer` which
- * is invoked to compare values. If `customizer` returns `undefined`, comparisons
- * are handled by the method instead. The `customizer` is invoked with up to
- * six arguments: (objValue, othValue [, index|key, object, other, stack]).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @param {Function} [customizer] The function to customize comparisons.
- * @returns {boolean} Returns `true` if the values are equivalent,
- * else `false`.
- * @example
- *
- * function isGreeting(value) {
- * return /^h(?:i|ello)$/.test(value);
- * }
- *
- * function customizer(objValue, othValue) {
- * if (isGreeting(objValue) && isGreeting(othValue)) {
- * return true;
- * }
- * }
- *
- * var array = ['hello', 'goodbye'];
- * var other = ['hi', 'goodbye'];
- *
- * _.isEqualWith(array, other, customizer);
- * // => true
- */
- function isEqualWith(value, other, customizer) {
- customizer = typeof customizer == 'function' ? customizer : undefined;
- var result = customizer ? customizer(value, other) : undefined;
- return result === undefined ? baseIsEqual(value, other, customizer) : !!result;
- }
-
- /**
- * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
- * `SyntaxError`, `TypeError`, or `URIError` object.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an error object,
- * else `false`.
- * @example
- *
- * _.isError(new Error);
- * // => true
- *
- * _.isError(Error);
- * // => false
- */
- function isError(value) {
- if (!isObjectLike(value)) {
- return false;
- }
- return (objectToString.call(value) == errorTag) ||
- (typeof value.message == 'string' && typeof value.name == 'string');
- }
-
- /**
- * Checks if `value` is a finite primitive number.
- *
- * **Note:** This method is based on
- * [`Number.isFinite`](https://mdn.io/Number/isFinite).
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a finite number,
- * else `false`.
- * @example
- *
- * _.isFinite(3);
- * // => true
- *
- * _.isFinite(Number.MAX_VALUE);
- * // => true
- *
- * _.isFinite(3.14);
- * // => true
- *
- * _.isFinite(Infinity);
- * // => false
- */
- function isFinite(value) {
- return typeof value == 'number' && nativeIsFinite(value);
- }
-
- /**
- * Checks if `value` is classified as a `Function` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
- * @example
- *
- * _.isFunction(_);
- * // => true
- *
- * _.isFunction(/abc/);
- * // => false
- */
- function isFunction(value) {
- // The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 8 which returns 'object' for typed array and weak map constructors,
- // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
- var tag = isObject(value) ? objectToString.call(value) : '';
- return tag == funcTag || tag == genTag;
- }
-
- /**
- * Checks if `value` is an integer.
- *
- * **Note:** This method is based on
- * [`Number.isInteger`](https://mdn.io/Number/isInteger).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
- * @example
- *
- * _.isInteger(3);
- * // => true
- *
- * _.isInteger(Number.MIN_VALUE);
- * // => false
- *
- * _.isInteger(Infinity);
- * // => false
- *
- * _.isInteger('3');
- * // => false
- */
- function isInteger(value) {
- return typeof value == 'number' && value == toInteger(value);
- }
-
- /**
- * Checks if `value` is a valid array-like length.
- *
- * **Note:** This function is loosely based on
- * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length,
- * else `false`.
- * @example
- *
- * _.isLength(3);
- * // => true
- *
- * _.isLength(Number.MIN_VALUE);
- * // => false
- *
- * _.isLength(Infinity);
- * // => false
- *
- * _.isLength('3');
- * // => false
- */
- function isLength(value) {
- return typeof value == 'number' &&
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
- }
-
- /**
- * Checks if `value` is the
- * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(_.noop);
- * // => true
- *
- * _.isObject(null);
- * // => false
- */
- function isObject(value) {
- var type = typeof value;
- return !!value && (type == 'object' || type == 'function');
- }
-
- /**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
- function isObjectLike(value) {
- return !!value && typeof value == 'object';
- }
-
- /**
- * Checks if `value` is classified as a `Map` object.
- *
- * @static
- * @memberOf _
- * @since 4.3.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
- * @example
- *
- * _.isMap(new Map);
- * // => true
- *
- * _.isMap(new WeakMap);
- * // => false
- */
- function isMap(value) {
- return isObjectLike(value) && getTag(value) == mapTag;
- }
-
- /**
- * Performs a partial deep comparison between `object` and `source` to
- * determine if `object` contains equivalent property values. This method is
- * equivalent to a `_.matches` function when `source` is partially applied.
- *
- * **Note:** This method supports comparing the same values as `_.isEqual`.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Lang
- * @param {Object} object The object to inspect.
- * @param {Object} source The object of property values to match.
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
- * @example
- *
- * var object = { 'user': 'fred', 'age': 40 };
- *
- * _.isMatch(object, { 'age': 40 });
- * // => true
- *
- * _.isMatch(object, { 'age': 36 });
- * // => false
- */
- function isMatch(object, source) {
- return object === source || baseIsMatch(object, source, getMatchData(source));
- }
-
- /**
- * This method is like `_.isMatch` except that it accepts `customizer` which
- * is invoked to compare values. If `customizer` returns `undefined`, comparisons
- * are handled by the method instead. The `customizer` is invoked with five
- * arguments: (objValue, srcValue, index|key, object, source).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {Object} object The object to inspect.
- * @param {Object} source The object of property values to match.
- * @param {Function} [customizer] The function to customize comparisons.
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
- * @example
- *
- * function isGreeting(value) {
- * return /^h(?:i|ello)$/.test(value);
- * }
- *
- * function customizer(objValue, srcValue) {
- * if (isGreeting(objValue) && isGreeting(srcValue)) {
- * return true;
- * }
- * }
- *
- * var object = { 'greeting': 'hello' };
- * var source = { 'greeting': 'hi' };
- *
- * _.isMatchWith(object, source, customizer);
- * // => true
- */
- function isMatchWith(object, source, customizer) {
- customizer = typeof customizer == 'function' ? customizer : undefined;
- return baseIsMatch(object, source, getMatchData(source), customizer);
- }
-
- /**
- * Checks if `value` is `NaN`.
- *
- * **Note:** This method is based on
- * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
- * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
- * `undefined` and other non-number values.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
- * @example
- *
- * _.isNaN(NaN);
- * // => true
- *
- * _.isNaN(new Number(NaN));
- * // => true
- *
- * isNaN(undefined);
- * // => true
- *
- * _.isNaN(undefined);
- * // => false
- */
- function isNaN(value) {
- // An `NaN` primitive is the only value that is not equal to itself.
- // Perform the `toStringTag` check first to avoid errors with some
- // ActiveX objects in IE.
- return isNumber(value) && value != +value;
- }
-
- /**
- * Checks if `value` is a native function.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a native function,
- * else `false`.
- * @example
- *
- * _.isNative(Array.prototype.push);
- * // => true
- *
- * _.isNative(_);
- * // => false
- */
- function isNative(value) {
- if (!isObject(value)) {
- return false;
- }
- var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
- return pattern.test(toSource(value));
- }
-
- /**
- * Checks if `value` is `null`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
- * @example
- *
- * _.isNull(null);
- * // => true
- *
- * _.isNull(void 0);
- * // => false
- */
- function isNull(value) {
- return value === null;
- }
-
- /**
- * Checks if `value` is `null` or `undefined`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
- * @example
- *
- * _.isNil(null);
- * // => true
- *
- * _.isNil(void 0);
- * // => true
- *
- * _.isNil(NaN);
- * // => false
- */
- function isNil(value) {
- return value == null;
- }
-
- /**
- * Checks if `value` is classified as a `Number` primitive or object.
- *
- * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
- * classified as numbers, use the `_.isFinite` method.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
- * @example
- *
- * _.isNumber(3);
- * // => true
- *
- * _.isNumber(Number.MIN_VALUE);
- * // => true
- *
- * _.isNumber(Infinity);
- * // => true
- *
- * _.isNumber('3');
- * // => false
- */
- function isNumber(value) {
- return typeof value == 'number' ||
- (isObjectLike(value) && objectToString.call(value) == numberTag);
- }
-
- /**
- * Checks if `value` is a plain object, that is, an object created by the
- * `Object` constructor or one with a `[[Prototype]]` of `null`.
- *
- * @static
- * @memberOf _
- * @since 0.8.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a plain object,
- * else `false`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * }
- *
- * _.isPlainObject(new Foo);
- * // => false
- *
- * _.isPlainObject([1, 2, 3]);
- * // => false
- *
- * _.isPlainObject({ 'x': 0, 'y': 0 });
- * // => true
- *
- * _.isPlainObject(Object.create(null));
- * // => true
- */
- function isPlainObject(value) {
- if (!isObjectLike(value) ||
- objectToString.call(value) != objectTag || isHostObject(value)) {
- return false;
- }
- var proto = getPrototype(value);
- if (proto === null) {
- return true;
- }
- var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
- return (typeof Ctor == 'function' &&
- Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
- }
-
- /**
- * Checks if `value` is classified as a `RegExp` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
- * @example
- *
- * _.isRegExp(/abc/);
- * // => true
- *
- * _.isRegExp('/abc/');
- * // => false
- */
- function isRegExp(value) {
- return isObject(value) && objectToString.call(value) == regexpTag;
- }
-
- /**
- * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
- * double precision number which isn't the result of a rounded unsafe integer.
- *
- * **Note:** This method is based on
- * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a safe integer,
- * else `false`.
- * @example
- *
- * _.isSafeInteger(3);
- * // => true
- *
- * _.isSafeInteger(Number.MIN_VALUE);
- * // => false
- *
- * _.isSafeInteger(Infinity);
- * // => false
- *
- * _.isSafeInteger('3');
- * // => false
- */
- function isSafeInteger(value) {
- return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
- }
-
- /**
- * Checks if `value` is classified as a `Set` object.
- *
- * @static
- * @memberOf _
- * @since 4.3.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
- * @example
- *
- * _.isSet(new Set);
- * // => true
- *
- * _.isSet(new WeakSet);
- * // => false
- */
- function isSet(value) {
- return isObjectLike(value) && getTag(value) == setTag;
- }
-
- /**
- * Checks if `value` is classified as a `String` primitive or object.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
- * @example
- *
- * _.isString('abc');
- * // => true
- *
- * _.isString(1);
- * // => false
- */
- function isString(value) {
- return typeof value == 'string' ||
- (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
- }
-
- /**
- * Checks if `value` is classified as a `Symbol` primitive or object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
- * @example
- *
- * _.isSymbol(Symbol.iterator);
- * // => true
- *
- * _.isSymbol('abc');
- * // => false
- */
- function isSymbol(value) {
- return typeof value == 'symbol' ||
- (isObjectLike(value) && objectToString.call(value) == symbolTag);
- }
-
- /**
- * Checks if `value` is classified as a typed array.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
- * @example
- *
- * _.isTypedArray(new Uint8Array);
- * // => true
- *
- * _.isTypedArray([]);
- * // => false
- */
- function isTypedArray(value) {
- return isObjectLike(value) &&
- isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
- }
-
- /**
- * Checks if `value` is `undefined`.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
- * @example
- *
- * _.isUndefined(void 0);
- * // => true
- *
- * _.isUndefined(null);
- * // => false
- */
- function isUndefined(value) {
- return value === undefined;
- }
-
- /**
- * Checks if `value` is classified as a `WeakMap` object.
- *
- * @static
- * @memberOf _
- * @since 4.3.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
- * @example
- *
- * _.isWeakMap(new WeakMap);
- * // => true
- *
- * _.isWeakMap(new Map);
- * // => false
- */
- function isWeakMap(value) {
- return isObjectLike(value) && getTag(value) == weakMapTag;
- }
-
- /**
- * Checks if `value` is classified as a `WeakSet` object.
- *
- * @static
- * @memberOf _
- * @since 4.3.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
- * @example
- *
- * _.isWeakSet(new WeakSet);
- * // => true
- *
- * _.isWeakSet(new Set);
- * // => false
- */
- function isWeakSet(value) {
- return isObjectLike(value) && objectToString.call(value) == weakSetTag;
- }
-
- /**
- * Checks if `value` is less than `other`.
- *
- * @static
- * @memberOf _
- * @since 3.9.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is less than `other`,
- * else `false`.
- * @see _.gt
- * @example
- *
- * _.lt(1, 3);
- * // => true
- *
- * _.lt(3, 3);
- * // => false
- *
- * _.lt(3, 1);
- * // => false
- */
- var lt = createRelationalOperation(baseLt);
-
- /**
- * Checks if `value` is less than or equal to `other`.
- *
- * @static
- * @memberOf _
- * @since 3.9.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is less than or equal to
- * `other`, else `false`.
- * @see _.gte
- * @example
- *
- * _.lte(1, 3);
- * // => true
- *
- * _.lte(3, 3);
- * // => true
- *
- * _.lte(3, 1);
- * // => false
- */
- var lte = createRelationalOperation(function(value, other) {
- return value <= other;
- });
-
- /**
- * Converts `value` to an array.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {Array} Returns the converted array.
- * @example
- *
- * _.toArray({ 'a': 1, 'b': 2 });
- * // => [1, 2]
- *
- * _.toArray('abc');
- * // => ['a', 'b', 'c']
- *
- * _.toArray(1);
- * // => []
- *
- * _.toArray(null);
- * // => []
- */
- function toArray(value) {
- if (!value) {
- return [];
- }
- if (isArrayLike(value)) {
- return isString(value) ? stringToArray(value) : copyArray(value);
- }
- if (iteratorSymbol && value[iteratorSymbol]) {
- return iteratorToArray(value[iteratorSymbol]());
- }
- var tag = getTag(value),
- func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
-
- return func(value);
- }
-
- /**
- * Converts `value` to an integer.
- *
- * **Note:** This function is loosely based on
- * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {number} Returns the converted integer.
- * @example
- *
- * _.toInteger(3);
- * // => 3
- *
- * _.toInteger(Number.MIN_VALUE);
- * // => 0
- *
- * _.toInteger(Infinity);
- * // => 1.7976931348623157e+308
- *
- * _.toInteger('3');
- * // => 3
- */
- function toInteger(value) {
- if (!value) {
- return value === 0 ? value : 0;
- }
- value = toNumber(value);
- if (value === INFINITY || value === -INFINITY) {
- var sign = (value < 0 ? -1 : 1);
- return sign * MAX_INTEGER;
- }
- var remainder = value % 1;
- return value === value ? (remainder ? value - remainder : value) : 0;
- }
-
- /**
- * Converts `value` to an integer suitable for use as the length of an
- * array-like object.
- *
- * **Note:** This method is based on
- * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {number} Returns the converted integer.
- * @example
- *
- * _.toLength(3);
- * // => 3
- *
- * _.toLength(Number.MIN_VALUE);
- * // => 0
- *
- * _.toLength(Infinity);
- * // => 4294967295
- *
- * _.toLength('3');
- * // => 3
- */
- function toLength(value) {
- return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
- }
-
- /**
- * Converts `value` to a number.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to process.
- * @returns {number} Returns the number.
- * @example
- *
- * _.toNumber(3);
- * // => 3
- *
- * _.toNumber(Number.MIN_VALUE);
- * // => 5e-324
- *
- * _.toNumber(Infinity);
- * // => Infinity
- *
- * _.toNumber('3');
- * // => 3
- */
- function toNumber(value) {
- if (typeof value == 'number') {
- return value;
- }
- if (isSymbol(value)) {
- return NAN;
- }
- if (isObject(value)) {
- var other = isFunction(value.valueOf) ? value.valueOf() : value;
- value = isObject(other) ? (other + '') : other;
- }
- if (typeof value != 'string') {
- return value === 0 ? value : +value;
- }
- value = value.replace(reTrim, '');
- var isBinary = reIsBinary.test(value);
- return (isBinary || reIsOctal.test(value))
- ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
- : (reIsBadHex.test(value) ? NAN : +value);
- }
-
- /**
- * Converts `value` to a plain object flattening inherited enumerable string
- * keyed properties of `value` to own properties of the plain object.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {Object} Returns the converted plain object.
- * @example
- *
- * function Foo() {
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.assign({ 'a': 1 }, new Foo);
- * // => { 'a': 1, 'b': 2 }
- *
- * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
- * // => { 'a': 1, 'b': 2, 'c': 3 }
- */
- function toPlainObject(value) {
- return copyObject(value, keysIn(value));
- }
-
- /**
- * Converts `value` to a safe integer. A safe integer can be compared and
- * represented correctly.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {number} Returns the converted integer.
- * @example
- *
- * _.toSafeInteger(3);
- * // => 3
- *
- * _.toSafeInteger(Number.MIN_VALUE);
- * // => 0
- *
- * _.toSafeInteger(Infinity);
- * // => 9007199254740991
- *
- * _.toSafeInteger('3');
- * // => 3
- */
- function toSafeInteger(value) {
- return baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);
- }
-
- /**
- * Converts `value` to a string. An empty string is returned for `null`
- * and `undefined` values. The sign of `-0` is preserved.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
- * @example
- *
- * _.toString(null);
- * // => ''
- *
- * _.toString(-0);
- * // => '-0'
- *
- * _.toString([1, 2, 3]);
- * // => '1,2,3'
- */
- function toString(value) {
- return value == null ? '' : baseToString(value);
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Assigns own enumerable string keyed properties of source objects to the
- * destination object. Source objects are applied from left to right.
- * Subsequent sources overwrite property assignments of previous sources.
- *
- * **Note:** This method mutates `object` and is loosely based on
- * [`Object.assign`](https://mdn.io/Object/assign).
- *
- * @static
- * @memberOf _
- * @since 0.10.0
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @see _.assignIn
- * @example
- *
- * function Foo() {
- * this.c = 3;
- * }
- *
- * function Bar() {
- * this.e = 5;
- * }
- *
- * Foo.prototype.d = 4;
- * Bar.prototype.f = 6;
- *
- * _.assign({ 'a': 1 }, new Foo, new Bar);
- * // => { 'a': 1, 'c': 3, 'e': 5 }
- */
- var assign = createAssigner(function(object, source) {
- if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) {
- copyObject(source, keys(source), object);
- return;
- }
- for (var key in source) {
- if (hasOwnProperty.call(source, key)) {
- assignValue(object, key, source[key]);
- }
- }
- });
-
- /**
- * This method is like `_.assign` except that it iterates over own and
- * inherited source properties.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @alias extend
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @see _.assign
- * @example
- *
- * function Foo() {
- * this.b = 2;
- * }
- *
- * function Bar() {
- * this.d = 4;
- * }
- *
- * Foo.prototype.c = 3;
- * Bar.prototype.e = 5;
- *
- * _.assignIn({ 'a': 1 }, new Foo, new Bar);
- * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 }
- */
- var assignIn = createAssigner(function(object, source) {
- if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) {
- copyObject(source, keysIn(source), object);
- return;
- }
- for (var key in source) {
- assignValue(object, key, source[key]);
- }
- });
-
- /**
- * This method is like `_.assignIn` except that it accepts `customizer`
- * which is invoked to produce the assigned values. If `customizer` returns
- * `undefined`, assignment is handled by the method instead. The `customizer`
- * is invoked with five arguments: (objValue, srcValue, key, object, source).
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @alias extendWith
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} sources The source objects.
- * @param {Function} [customizer] The function to customize assigned values.
- * @returns {Object} Returns `object`.
- * @see _.assignWith
- * @example
- *
- * function customizer(objValue, srcValue) {
- * return _.isUndefined(objValue) ? srcValue : objValue;
- * }
- *
- * var defaults = _.partialRight(_.assignInWith, customizer);
- *
- * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
- * // => { 'a': 1, 'b': 2 }
- */
- var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
- copyObject(source, keysIn(source), object, customizer);
- });
-
- /**
- * This method is like `_.assign` except that it accepts `customizer`
- * which is invoked to produce the assigned values. If `customizer` returns
- * `undefined`, assignment is handled by the method instead. The `customizer`
- * is invoked with five arguments: (objValue, srcValue, key, object, source).
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} sources The source objects.
- * @param {Function} [customizer] The function to customize assigned values.
- * @returns {Object} Returns `object`.
- * @see _.assignInWith
- * @example
- *
- * function customizer(objValue, srcValue) {
- * return _.isUndefined(objValue) ? srcValue : objValue;
- * }
- *
- * var defaults = _.partialRight(_.assignWith, customizer);
- *
- * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
- * // => { 'a': 1, 'b': 2 }
- */
- var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
- copyObject(source, keys(source), object, customizer);
- });
-
- /**
- * Creates an array of values corresponding to `paths` of `object`.
- *
- * @static
- * @memberOf _
- * @since 1.0.0
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {...(string|string[])} [paths] The property paths of elements to pick.
- * @returns {Array} Returns the new array of picked elements.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
- *
- * _.at(object, ['a[0].b.c', 'a[1]']);
- * // => [3, 4]
- *
- * _.at(['a', 'b', 'c'], 0, 2);
- * // => ['a', 'c']
- */
- var at = rest(function(object, paths) {
- return baseAt(object, baseFlatten(paths, 1));
- });
-
- /**
- * Creates an object that inherits from the `prototype` object. If a
- * `properties` object is given, its own enumerable string keyed properties
- * are assigned to the created object.
- *
- * @static
- * @memberOf _
- * @since 2.3.0
- * @category Object
- * @param {Object} prototype The object to inherit from.
- * @param {Object} [properties] The properties to assign to the object.
- * @returns {Object} Returns the new object.
- * @example
- *
- * function Shape() {
- * this.x = 0;
- * this.y = 0;
- * }
- *
- * function Circle() {
- * Shape.call(this);
- * }
- *
- * Circle.prototype = _.create(Shape.prototype, {
- * 'constructor': Circle
- * });
- *
- * var circle = new Circle;
- * circle instanceof Circle;
- * // => true
- *
- * circle instanceof Shape;
- * // => true
- */
- function create(prototype, properties) {
- var result = baseCreate(prototype);
- return properties ? baseAssign(result, properties) : result;
- }
-
- /**
- * Assigns own and inherited enumerable string keyed properties of source
- * objects to the destination object for all destination properties that
- * resolve to `undefined`. Source objects are applied from left to right.
- * Once a property is set, additional values of the same property are ignored.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @see _.defaultsDeep
- * @example
- *
- * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
- * // => { 'user': 'barney', 'age': 36 }
- */
- var defaults = rest(function(args) {
- args.push(undefined, assignInDefaults);
- return apply(assignInWith, undefined, args);
- });
-
- /**
- * This method is like `_.defaults` except that it recursively assigns
- * default properties.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 3.10.0
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @see _.defaults
- * @example
- *
- * _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } });
- * // => { 'user': { 'name': 'barney', 'age': 36 } }
- *
- */
- var defaultsDeep = rest(function(args) {
- args.push(undefined, mergeDefaults);
- return apply(mergeWith, undefined, args);
- });
-
- /**
- * This method is like `_.find` except that it returns the key of the first
- * element `predicate` returns truthy for instead of the element itself.
- *
- * @static
- * @memberOf _
- * @since 1.1.0
- * @category Object
- * @param {Object} object The object to search.
- * @param {Array|Function|Object|string} [predicate=_.identity]
- * The function invoked per iteration.
- * @returns {string|undefined} Returns the key of the matched element,
- * else `undefined`.
- * @example
- *
- * var users = {
- * 'barney': { 'age': 36, 'active': true },
- * 'fred': { 'age': 40, 'active': false },
- * 'pebbles': { 'age': 1, 'active': true }
- * };
- *
- * _.findKey(users, function(o) { return o.age < 40; });
- * // => 'barney' (iteration order is not guaranteed)
- *
- * // The `_.matches` iteratee shorthand.
- * _.findKey(users, { 'age': 1, 'active': true });
- * // => 'pebbles'
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.findKey(users, ['active', false]);
- * // => 'fred'
- *
- * // The `_.property` iteratee shorthand.
- * _.findKey(users, 'active');
- * // => 'barney'
- */
- function findKey(object, predicate) {
- return baseFind(object, getIteratee(predicate, 3), baseForOwn, true);
- }
-
- /**
- * This method is like `_.findKey` except that it iterates over elements of
- * a collection in the opposite order.
- *
- * @static
- * @memberOf _
- * @since 2.0.0
- * @category Object
- * @param {Object} object The object to search.
- * @param {Array|Function|Object|string} [predicate=_.identity]
- * The function invoked per iteration.
- * @returns {string|undefined} Returns the key of the matched element,
- * else `undefined`.
- * @example
- *
- * var users = {
- * 'barney': { 'age': 36, 'active': true },
- * 'fred': { 'age': 40, 'active': false },
- * 'pebbles': { 'age': 1, 'active': true }
- * };
- *
- * _.findLastKey(users, function(o) { return o.age < 40; });
- * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
- *
- * // The `_.matches` iteratee shorthand.
- * _.findLastKey(users, { 'age': 36, 'active': true });
- * // => 'barney'
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.findLastKey(users, ['active', false]);
- * // => 'fred'
- *
- * // The `_.property` iteratee shorthand.
- * _.findLastKey(users, 'active');
- * // => 'pebbles'
- */
- function findLastKey(object, predicate) {
- return baseFind(object, getIteratee(predicate, 3), baseForOwnRight, true);
- }
-
- /**
- * Iterates over own and inherited enumerable string keyed properties of an
- * object and invokes `iteratee` for each property. The iteratee is invoked
- * with three arguments: (value, key, object). Iteratee functions may exit
- * iteration early by explicitly returning `false`.
- *
- * @static
- * @memberOf _
- * @since 0.3.0
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Object} Returns `object`.
- * @see _.forInRight
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.forIn(new Foo, function(value, key) {
- * console.log(key);
- * });
- * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
- */
- function forIn(object, iteratee) {
- return object == null
- ? object
- : baseFor(object, getIteratee(iteratee), keysIn);
- }
-
- /**
- * This method is like `_.forIn` except that it iterates over properties of
- * `object` in the opposite order.
- *
- * @static
- * @memberOf _
- * @since 2.0.0
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Object} Returns `object`.
- * @see _.forIn
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.forInRight(new Foo, function(value, key) {
- * console.log(key);
- * });
- * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
- */
- function forInRight(object, iteratee) {
- return object == null
- ? object
- : baseForRight(object, getIteratee(iteratee), keysIn);
- }
-
- /**
- * Iterates over own enumerable string keyed properties of an object and
- * invokes `iteratee` for each property. The iteratee is invoked with three
- * arguments: (value, key, object). Iteratee functions may exit iteration
- * early by explicitly returning `false`.
- *
- * @static
- * @memberOf _
- * @since 0.3.0
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Object} Returns `object`.
- * @see _.forOwnRight
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.forOwn(new Foo, function(value, key) {
- * console.log(key);
- * });
- * // => Logs 'a' then 'b' (iteration order is not guaranteed).
- */
- function forOwn(object, iteratee) {
- return object && baseForOwn(object, getIteratee(iteratee));
- }
-
- /**
- * This method is like `_.forOwn` except that it iterates over properties of
- * `object` in the opposite order.
- *
- * @static
- * @memberOf _
- * @since 2.0.0
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Object} Returns `object`.
- * @see _.forOwn
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.forOwnRight(new Foo, function(value, key) {
- * console.log(key);
- * });
- * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
- */
- function forOwnRight(object, iteratee) {
- return object && baseForOwnRight(object, getIteratee(iteratee));
- }
-
- /**
- * Creates an array of function property names from own enumerable properties
- * of `object`.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The object to inspect.
- * @returns {Array} Returns the new array of property names.
- * @see _.functionsIn
- * @example
- *
- * function Foo() {
- * this.a = _.constant('a');
- * this.b = _.constant('b');
- * }
- *
- * Foo.prototype.c = _.constant('c');
- *
- * _.functions(new Foo);
- * // => ['a', 'b']
- */
- function functions(object) {
- return object == null ? [] : baseFunctions(object, keys(object));
- }
-
- /**
- * Creates an array of function property names from own and inherited
- * enumerable properties of `object`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Object
- * @param {Object} object The object to inspect.
- * @returns {Array} Returns the new array of property names.
- * @see _.functions
- * @example
- *
- * function Foo() {
- * this.a = _.constant('a');
- * this.b = _.constant('b');
- * }
- *
- * Foo.prototype.c = _.constant('c');
- *
- * _.functionsIn(new Foo);
- * // => ['a', 'b', 'c']
- */
- function functionsIn(object) {
- return object == null ? [] : baseFunctions(object, keysIn(object));
- }
-
- /**
- * Gets the value at `path` of `object`. If the resolved value is
- * `undefined`, the `defaultValue` is used in its place.
- *
- * @static
- * @memberOf _
- * @since 3.7.0
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to get.
- * @param {*} [defaultValue] The value returned for `undefined` resolved values.
- * @returns {*} Returns the resolved value.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
- *
- * _.get(object, 'a[0].b.c');
- * // => 3
- *
- * _.get(object, ['a', '0', 'b', 'c']);
- * // => 3
- *
- * _.get(object, 'a.b.c', 'default');
- * // => 'default'
- */
- function get(object, path, defaultValue) {
- var result = object == null ? undefined : baseGet(object, path);
- return result === undefined ? defaultValue : result;
- }
-
- /**
- * Checks if `path` is a direct property of `object`.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path to check.
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
- * @example
- *
- * var object = { 'a': { 'b': 2 } };
- * var other = _.create({ 'a': _.create({ 'b': 2 }) });
- *
- * _.has(object, 'a');
- * // => true
- *
- * _.has(object, 'a.b');
- * // => true
- *
- * _.has(object, ['a', 'b']);
- * // => true
- *
- * _.has(other, 'a');
- * // => false
- */
- function has(object, path) {
- return object != null && hasPath(object, path, baseHas);
- }
-
- /**
- * Checks if `path` is a direct or inherited property of `object`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path to check.
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
- * @example
- *
- * var object = _.create({ 'a': _.create({ 'b': 2 }) });
- *
- * _.hasIn(object, 'a');
- * // => true
- *
- * _.hasIn(object, 'a.b');
- * // => true
- *
- * _.hasIn(object, ['a', 'b']);
- * // => true
- *
- * _.hasIn(object, 'b');
- * // => false
- */
- function hasIn(object, path) {
- return object != null && hasPath(object, path, baseHasIn);
- }
-
- /**
- * Creates an object composed of the inverted keys and values of `object`.
- * If `object` contains duplicate values, subsequent values overwrite
- * property assignments of previous values.
- *
- * @static
- * @memberOf _
- * @since 0.7.0
- * @category Object
- * @param {Object} object The object to invert.
- * @returns {Object} Returns the new inverted object.
- * @example
- *
- * var object = { 'a': 1, 'b': 2, 'c': 1 };
- *
- * _.invert(object);
- * // => { '1': 'c', '2': 'b' }
- */
- var invert = createInverter(function(result, value, key) {
- result[value] = key;
- }, constant(identity));
-
- /**
- * This method is like `_.invert` except that the inverted object is generated
- * from the results of running each element of `object` thru `iteratee`. The
- * corresponding inverted value of each inverted key is an array of keys
- * responsible for generating the inverted value. The iteratee is invoked
- * with one argument: (value).
- *
- * @static
- * @memberOf _
- * @since 4.1.0
- * @category Object
- * @param {Object} object The object to invert.
- * @param {Array|Function|Object|string} [iteratee=_.identity]
- * The iteratee invoked per element.
- * @returns {Object} Returns the new inverted object.
- * @example
- *
- * var object = { 'a': 1, 'b': 2, 'c': 1 };
- *
- * _.invertBy(object);
- * // => { '1': ['a', 'c'], '2': ['b'] }
- *
- * _.invertBy(object, function(value) {
- * return 'group' + value;
- * });
- * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
- */
- var invertBy = createInverter(function(result, value, key) {
- if (hasOwnProperty.call(result, value)) {
- result[value].push(key);
- } else {
- result[value] = [key];
- }
- }, getIteratee);
-
- /**
- * Invokes the method at `path` of `object`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the method to invoke.
- * @param {...*} [args] The arguments to invoke the method with.
- * @returns {*} Returns the result of the invoked method.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
- *
- * _.invoke(object, 'a[0].b.c.slice', 1, 3);
- * // => [2, 3]
- */
- var invoke = rest(baseInvoke);
-
- /**
- * Creates an array of the own enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects. See the
- * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
- * for more details.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keys(new Foo);
- * // => ['a', 'b'] (iteration order is not guaranteed)
- *
- * _.keys('hi');
- * // => ['0', '1']
- */
- function keys(object) {
- var isProto = isPrototype(object);
- if (!(isProto || isArrayLike(object))) {
- return baseKeys(object);
- }
- var indexes = indexKeys(object),
- skipIndexes = !!indexes,
- result = indexes || [],
- length = result.length;
-
- for (var key in object) {
- if (baseHas(object, key) &&
- !(skipIndexes && (key == 'length' || isIndex(key, length))) &&
- !(isProto && key == 'constructor')) {
- result.push(key);
- }
- }
- return result;
- }
-
- /**
- * Creates an array of the own and inherited enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keysIn(new Foo);
- * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
- */
- function keysIn(object) {
- var index = -1,
- isProto = isPrototype(object),
- props = baseKeysIn(object),
- propsLength = props.length,
- indexes = indexKeys(object),
- skipIndexes = !!indexes,
- result = indexes || [],
- length = result.length;
-
- while (++index < propsLength) {
- var key = props[index];
- if (!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
- !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
- result.push(key);
- }
- }
- return result;
- }
-
- /**
- * The opposite of `_.mapValues`; this method creates an object with the
- * same values as `object` and keys generated by running each own enumerable
- * string keyed property of `object` thru `iteratee`. The iteratee is invoked
- * with three arguments: (value, key, object).
- *
- * @static
- * @memberOf _
- * @since 3.8.0
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Array|Function|Object|string} [iteratee=_.identity]
- * The function invoked per iteration.
- * @returns {Object} Returns the new mapped object.
- * @see _.mapValues
- * @example
- *
- * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
- * return key + value;
- * });
- * // => { 'a1': 1, 'b2': 2 }
- */
- function mapKeys(object, iteratee) {
- var result = {};
- iteratee = getIteratee(iteratee, 3);
-
- baseForOwn(object, function(value, key, object) {
- result[iteratee(value, key, object)] = value;
- });
- return result;
- }
-
- /**
- * Creates an object with the same keys as `object` and values generated
- * by running each own enumerable string keyed property of `object` thru
- * `iteratee`. The iteratee is invoked with three arguments:
- * (value, key, object).
- *
- * @static
- * @memberOf _
- * @since 2.4.0
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Array|Function|Object|string} [iteratee=_.identity]
- * The function invoked per iteration.
- * @returns {Object} Returns the new mapped object.
- * @see _.mapKeys
- * @example
- *
- * var users = {
- * 'fred': { 'user': 'fred', 'age': 40 },
- * 'pebbles': { 'user': 'pebbles', 'age': 1 }
- * };
- *
- * _.mapValues(users, function(o) { return o.age; });
- * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
- *
- * // The `_.property` iteratee shorthand.
- * _.mapValues(users, 'age');
- * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
- */
- function mapValues(object, iteratee) {
- var result = {};
- iteratee = getIteratee(iteratee, 3);
-
- baseForOwn(object, function(value, key, object) {
- result[key] = iteratee(value, key, object);
- });
- return result;
- }
-
- /**
- * This method is like `_.assign` except that it recursively merges own and
- * inherited enumerable string keyed properties of source objects into the
- * destination object. Source properties that resolve to `undefined` are
- * skipped if a destination value exists. Array and plain object properties
- * are merged recursively.Other objects and value types are overridden by
- * assignment. Source objects are applied from left to right. Subsequent
- * sources overwrite property assignments of previous sources.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 0.5.0
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var users = {
- * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
- * };
- *
- * var ages = {
- * 'data': [{ 'age': 36 }, { 'age': 40 }]
- * };
- *
- * _.merge(users, ages);
- * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
- */
- var merge = createAssigner(function(object, source, srcIndex) {
- baseMerge(object, source, srcIndex);
- });
-
- /**
- * This method is like `_.merge` except that it accepts `customizer` which
- * is invoked to produce the merged values of the destination and source
- * properties. If `customizer` returns `undefined`, merging is handled by the
- * method instead. The `customizer` is invoked with seven arguments:
- * (objValue, srcValue, key, object, source, stack).
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} sources The source objects.
- * @param {Function} customizer The function to customize assigned values.
- * @returns {Object} Returns `object`.
- * @example
- *
- * function customizer(objValue, srcValue) {
- * if (_.isArray(objValue)) {
- * return objValue.concat(srcValue);
- * }
- * }
- *
- * var object = {
- * 'fruits': ['apple'],
- * 'vegetables': ['beet']
- * };
- *
- * var other = {
- * 'fruits': ['banana'],
- * 'vegetables': ['carrot']
- * };
- *
- * _.mergeWith(object, other, customizer);
- * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
- */
- var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
- baseMerge(object, source, srcIndex, customizer);
- });
-
- /**
- * The opposite of `_.pick`; this method creates an object composed of the
- * own and inherited enumerable string keyed properties of `object` that are
- * not omitted.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The source object.
- * @param {...(string|string[])} [props] The property identifiers to omit.
- * @returns {Object} Returns the new object.
- * @example
- *
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
- *
- * _.omit(object, ['a', 'c']);
- * // => { 'b': '2' }
- */
- var omit = rest(function(object, props) {
- if (object == null) {
- return {};
- }
- props = arrayMap(baseFlatten(props, 1), toKey);
- return basePick(object, baseDifference(getAllKeysIn(object), props));
- });
-
- /**
- * The opposite of `_.pickBy`; this method creates an object composed of
- * the own and inherited enumerable string keyed properties of `object` that
- * `predicate` doesn't return truthy for. The predicate is invoked with two
- * arguments: (value, key).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Object
- * @param {Object} object The source object.
- * @param {Array|Function|Object|string} [predicate=_.identity]
- * The function invoked per property.
- * @returns {Object} Returns the new object.
- * @example
- *
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
- *
- * _.omitBy(object, _.isNumber);
- * // => { 'b': '2' }
- */
- function omitBy(object, predicate) {
- predicate = getIteratee(predicate);
- return basePickBy(object, function(value, key) {
- return !predicate(value, key);
- });
- }
-
- /**
- * Creates an object composed of the picked `object` properties.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The source object.
- * @param {...(string|string[])} [props] The property identifiers to pick.
- * @returns {Object} Returns the new object.
- * @example
- *
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
- *
- * _.pick(object, ['a', 'c']);
- * // => { 'a': 1, 'c': 3 }
- */
- var pick = rest(function(object, props) {
- return object == null ? {} : basePick(object, arrayMap(baseFlatten(props, 1), toKey));
- });
-
- /**
- * Creates an object composed of the `object` properties `predicate` returns
- * truthy for. The predicate is invoked with two arguments: (value, key).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Object
- * @param {Object} object The source object.
- * @param {Array|Function|Object|string} [predicate=_.identity]
- * The function invoked per property.
- * @returns {Object} Returns the new object.
- * @example
- *
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
- *
- * _.pickBy(object, _.isNumber);
- * // => { 'a': 1, 'c': 3 }
- */
- function pickBy(object, predicate) {
- return object == null ? {} : basePickBy(object, getIteratee(predicate));
- }
-
- /**
- * This method is like `_.get` except that if the resolved value is a
- * function it's invoked with the `this` binding of its parent object and
- * its result is returned.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to resolve.
- * @param {*} [defaultValue] The value returned for `undefined` resolved values.
- * @returns {*} Returns the resolved value.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
- *
- * _.result(object, 'a[0].b.c1');
- * // => 3
- *
- * _.result(object, 'a[0].b.c2');
- * // => 4
- *
- * _.result(object, 'a[0].b.c3', 'default');
- * // => 'default'
- *
- * _.result(object, 'a[0].b.c3', _.constant('default'));
- * // => 'default'
- */
- function result(object, path, defaultValue) {
- path = isKey(path, object) ? [path] : castPath(path);
-
- var index = -1,
- length = path.length;
-
- // Ensure the loop is entered when path is empty.
- if (!length) {
- object = undefined;
- length = 1;
- }
- while (++index < length) {
- var value = object == null ? undefined : object[toKey(path[index])];
- if (value === undefined) {
- index = length;
- value = defaultValue;
- }
- object = isFunction(value) ? value.call(object) : value;
- }
- return object;
- }
-
- /**
- * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
- * it's created. Arrays are created for missing index properties while objects
- * are created for all other missing properties. Use `_.setWith` to customize
- * `path` creation.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 3.7.0
- * @category Object
- * @param {Object} object The object to modify.
- * @param {Array|string} path The path of the property to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
- *
- * _.set(object, 'a[0].b.c', 4);
- * console.log(object.a[0].b.c);
- * // => 4
- *
- * _.set(object, ['x', '0', 'y', 'z'], 5);
- * console.log(object.x[0].y.z);
- * // => 5
- */
- function set(object, path, value) {
- return object == null ? object : baseSet(object, path, value);
- }
-
- /**
- * This method is like `_.set` except that it accepts `customizer` which is
- * invoked to produce the objects of `path`. If `customizer` returns `undefined`
- * path creation is handled by the method instead. The `customizer` is invoked
- * with three arguments: (nsValue, key, nsObject).
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Object
- * @param {Object} object The object to modify.
- * @param {Array|string} path The path of the property to set.
- * @param {*} value The value to set.
- * @param {Function} [customizer] The function to customize assigned values.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var object = {};
- *
- * _.setWith(object, '[0][1]', 'a', Object);
- * // => { '0': { '1': 'a' } }
- */
- function setWith(object, path, value, customizer) {
- customizer = typeof customizer == 'function' ? customizer : undefined;
- return object == null ? object : baseSet(object, path, value, customizer);
- }
-
- /**
- * Creates an array of own enumerable string keyed-value pairs for `object`
- * which can be consumed by `_.fromPairs`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @alias entries
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the new array of key-value pairs.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.toPairs(new Foo);
- * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
- */
- function toPairs(object) {
- return baseToPairs(object, keys(object));
- }
-
- /**
- * Creates an array of own and inherited enumerable string keyed-value pairs
- * for `object` which can be consumed by `_.fromPairs`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @alias entriesIn
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the new array of key-value pairs.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.toPairsIn(new Foo);
- * // => [['a', 1], ['b', 2], ['c', 1]] (iteration order is not guaranteed)
- */
- function toPairsIn(object) {
- return baseToPairs(object, keysIn(object));
- }
-
- /**
- * An alternative to `_.reduce`; this method transforms `object` to a new
- * `accumulator` object which is the result of running each of its own
- * enumerable string keyed properties thru `iteratee`, with each invocation
- * potentially mutating the `accumulator` object. The iteratee is invoked
- * with four arguments: (accumulator, value, key, object). Iteratee functions
- * may exit iteration early by explicitly returning `false`.
- *
- * @static
- * @memberOf _
- * @since 1.3.0
- * @category Object
- * @param {Array|Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [accumulator] The custom accumulator value.
- * @returns {*} Returns the accumulated value.
- * @example
- *
- * _.transform([2, 3, 4], function(result, n) {
- * result.push(n *= n);
- * return n % 2 == 0;
- * }, []);
- * // => [4, 9]
- *
- * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
- * (result[value] || (result[value] = [])).push(key);
- * }, {});
- * // => { '1': ['a', 'c'], '2': ['b'] }
- */
- function transform(object, iteratee, accumulator) {
- var isArr = isArray(object) || isTypedArray(object);
- iteratee = getIteratee(iteratee, 4);
-
- if (accumulator == null) {
- if (isArr || isObject(object)) {
- var Ctor = object.constructor;
- if (isArr) {
- accumulator = isArray(object) ? new Ctor : [];
- } else {
- accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
- }
- } else {
- accumulator = {};
- }
- }
- (isArr ? arrayEach : baseForOwn)(object, function(value, index, object) {
- return iteratee(accumulator, value, index, object);
- });
- return accumulator;
- }
-
- /**
- * Removes the property at `path` of `object`.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Object
- * @param {Object} object The object to modify.
- * @param {Array|string} path The path of the property to unset.
- * @returns {boolean} Returns `true` if the property is deleted, else `false`.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 7 } }] };
- * _.unset(object, 'a[0].b.c');
- * // => true
- *
- * console.log(object);
- * // => { 'a': [{ 'b': {} }] };
- *
- * _.unset(object, ['a', '0', 'b', 'c']);
- * // => true
- *
- * console.log(object);
- * // => { 'a': [{ 'b': {} }] };
- */
- function unset(object, path) {
- return object == null ? true : baseUnset(object, path);
- }
-
- /**
- * This method is like `_.set` except that accepts `updater` to produce the
- * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
- * is invoked with one argument: (value).
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 4.6.0
- * @category Object
- * @param {Object} object The object to modify.
- * @param {Array|string} path The path of the property to set.
- * @param {Function} updater The function to produce the updated value.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
- *
- * _.update(object, 'a[0].b.c', function(n) { return n * n; });
- * console.log(object.a[0].b.c);
- * // => 9
- *
- * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
- * console.log(object.x[0].y.z);
- * // => 0
- */
- function update(object, path, updater) {
- return object == null ? object : baseUpdate(object, path, castFunction(updater));
- }
-
- /**
- * This method is like `_.update` except that it accepts `customizer` which is
- * invoked to produce the objects of `path`. If `customizer` returns `undefined`
- * path creation is handled by the method instead. The `customizer` is invoked
- * with three arguments: (nsValue, key, nsObject).
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 4.6.0
- * @category Object
- * @param {Object} object The object to modify.
- * @param {Array|string} path The path of the property to set.
- * @param {Function} updater The function to produce the updated value.
- * @param {Function} [customizer] The function to customize assigned values.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var object = {};
- *
- * _.updateWith(object, '[0][1]', _.constant('a'), Object);
- * // => { '0': { '1': 'a' } }
- */
- function updateWith(object, path, updater, customizer) {
- customizer = typeof customizer == 'function' ? customizer : undefined;
- return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
- }
-
- /**
- * Creates an array of the own enumerable string keyed property values of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property values.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.values(new Foo);
- * // => [1, 2] (iteration order is not guaranteed)
- *
- * _.values('hi');
- * // => ['h', 'i']
- */
- function values(object) {
- return object ? baseValues(object, keys(object)) : [];
- }
-
- /**
- * Creates an array of the own and inherited enumerable string keyed property
- * values of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property values.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.valuesIn(new Foo);
- * // => [1, 2, 3] (iteration order is not guaranteed)
- */
- function valuesIn(object) {
- return object == null ? [] : baseValues(object, keysIn(object));
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Clamps `number` within the inclusive `lower` and `upper` bounds.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Number
- * @param {number} number The number to clamp.
- * @param {number} [lower] The lower bound.
- * @param {number} upper The upper bound.
- * @returns {number} Returns the clamped number.
- * @example
- *
- * _.clamp(-10, -5, 5);
- * // => -5
- *
- * _.clamp(10, -5, 5);
- * // => 5
- */
- function clamp(number, lower, upper) {
- if (upper === undefined) {
- upper = lower;
- lower = undefined;
- }
- if (upper !== undefined) {
- upper = toNumber(upper);
- upper = upper === upper ? upper : 0;
- }
- if (lower !== undefined) {
- lower = toNumber(lower);
- lower = lower === lower ? lower : 0;
- }
- return baseClamp(toNumber(number), lower, upper);
- }
-
- /**
- * Checks if `n` is between `start` and up to, but not including, `end`. If
- * `end` is not specified, it's set to `start` with `start` then set to `0`.
- * If `start` is greater than `end` the params are swapped to support
- * negative ranges.
- *
- * @static
- * @memberOf _
- * @since 3.3.0
- * @category Number
- * @param {number} number The number to check.
- * @param {number} [start=0] The start of the range.
- * @param {number} end The end of the range.
- * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
- * @see _.range, _.rangeRight
- * @example
- *
- * _.inRange(3, 2, 4);
- * // => true
- *
- * _.inRange(4, 8);
- * // => true
- *
- * _.inRange(4, 2);
- * // => false
- *
- * _.inRange(2, 2);
- * // => false
- *
- * _.inRange(1.2, 2);
- * // => true
- *
- * _.inRange(5.2, 4);
- * // => false
- *
- * _.inRange(-3, -2, -6);
- * // => true
- */
- function inRange(number, start, end) {
- start = toNumber(start) || 0;
- if (end === undefined) {
- end = start;
- start = 0;
- } else {
- end = toNumber(end) || 0;
- }
- number = toNumber(number);
- return baseInRange(number, start, end);
- }
-
- /**
- * Produces a random number between the inclusive `lower` and `upper` bounds.
- * If only one argument is provided a number between `0` and the given number
- * is returned. If `floating` is `true`, or either `lower` or `upper` are
- * floats, a floating-point number is returned instead of an integer.
- *
- * **Note:** JavaScript follows the IEEE-754 standard for resolving
- * floating-point values which can produce unexpected results.
- *
- * @static
- * @memberOf _
- * @since 0.7.0
- * @category Number
- * @param {number} [lower=0] The lower bound.
- * @param {number} [upper=1] The upper bound.
- * @param {boolean} [floating] Specify returning a floating-point number.
- * @returns {number} Returns the random number.
- * @example
- *
- * _.random(0, 5);
- * // => an integer between 0 and 5
- *
- * _.random(5);
- * // => also an integer between 0 and 5
- *
- * _.random(5, true);
- * // => a floating-point number between 0 and 5
- *
- * _.random(1.2, 5.2);
- * // => a floating-point number between 1.2 and 5.2
- */
- function random(lower, upper, floating) {
- if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
- upper = floating = undefined;
- }
- if (floating === undefined) {
- if (typeof upper == 'boolean') {
- floating = upper;
- upper = undefined;
- }
- else if (typeof lower == 'boolean') {
- floating = lower;
- lower = undefined;
- }
- }
- if (lower === undefined && upper === undefined) {
- lower = 0;
- upper = 1;
- }
- else {
- lower = toNumber(lower) || 0;
- if (upper === undefined) {
- upper = lower;
- lower = 0;
- } else {
- upper = toNumber(upper) || 0;
- }
- }
- if (lower > upper) {
- var temp = lower;
- lower = upper;
- upper = temp;
- }
- if (floating || lower % 1 || upper % 1) {
- var rand = nativeRandom();
- return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
- }
- return baseRandom(lower, upper);
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the camel cased string.
- * @example
- *
- * _.camelCase('Foo Bar');
- * // => 'fooBar'
- *
- * _.camelCase('--foo-bar--');
- * // => 'fooBar'
- *
- * _.camelCase('__FOO_BAR__');
- * // => 'fooBar'
- */
- var camelCase = createCompounder(function(result, word, index) {
- word = word.toLowerCase();
- return result + (index ? capitalize(word) : word);
- });
-
- /**
- * Converts the first character of `string` to upper case and the remaining
- * to lower case.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to capitalize.
- * @returns {string} Returns the capitalized string.
- * @example
- *
- * _.capitalize('FRED');
- * // => 'Fred'
- */
- function capitalize(string) {
- return upperFirst(toString(string).toLowerCase());
- }
-
- /**
- * Deburrs `string` by converting
- * [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
- * to basic latin letters and removing
- * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to deburr.
- * @returns {string} Returns the deburred string.
- * @example
- *
- * _.deburr('déjà vu');
- * // => 'deja vu'
- */
- function deburr(string) {
- string = toString(string);
- return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, '');
- }
-
- /**
- * Checks if `string` ends with the given target string.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to search.
- * @param {string} [target] The string to search for.
- * @param {number} [position=string.length] The position to search from.
- * @returns {boolean} Returns `true` if `string` ends with `target`,
- * else `false`.
- * @example
- *
- * _.endsWith('abc', 'c');
- * // => true
- *
- * _.endsWith('abc', 'b');
- * // => false
- *
- * _.endsWith('abc', 'b', 2);
- * // => true
- */
- function endsWith(string, target, position) {
- string = toString(string);
- target = baseToString(target);
-
- var length = string.length;
- position = position === undefined
- ? length
- : baseClamp(toInteger(position), 0, length);
-
- position -= target.length;
- return position >= 0 && string.indexOf(target, position) == position;
- }
-
- /**
- * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to
- * their corresponding HTML entities.
- *
- * **Note:** No other characters are escaped. To escape additional
- * characters use a third-party library like [_he_](https://mths.be/he).
- *
- * Though the ">" character is escaped for symmetry, characters like
- * ">" and "/" don't need escaping in HTML and have no special meaning
- * unless they're part of a tag or unquoted attribute value. See
- * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
- * (under "semi-related fun fact") for more details.
- *
- * Backticks are escaped because in IE < 9, they can break out of
- * attribute values or HTML comments. See [#59](https://html5sec.org/#59),
- * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and
- * [#133](https://html5sec.org/#133) of the
- * [HTML5 Security Cheatsheet](https://html5sec.org/) for more details.
- *
- * When working with HTML you should always
- * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
- * XSS vectors.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to escape.
- * @returns {string} Returns the escaped string.
- * @example
- *
- * _.escape('fred, barney, & pebbles');
- * // => 'fred, barney, & pebbles'
- */
- function escape(string) {
- string = toString(string);
- return (string && reHasUnescapedHtml.test(string))
- ? string.replace(reUnescapedHtml, escapeHtmlChar)
- : string;
- }
-
- /**
- * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
- * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to escape.
- * @returns {string} Returns the escaped string.
- * @example
- *
- * _.escapeRegExp('[lodash](https://lodash.com/)');
- * // => '\[lodash\]\(https://lodash\.com/\)'
- */
- function escapeRegExp(string) {
- string = toString(string);
- return (string && reHasRegExpChar.test(string))
- ? string.replace(reRegExpChar, '\\$&')
- : string;
- }
-
- /**
- * Converts `string` to
- * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the kebab cased string.
- * @example
- *
- * _.kebabCase('Foo Bar');
- * // => 'foo-bar'
- *
- * _.kebabCase('fooBar');
- * // => 'foo-bar'
- *
- * _.kebabCase('__FOO_BAR__');
- * // => 'foo-bar'
- */
- var kebabCase = createCompounder(function(result, word, index) {
- return result + (index ? '-' : '') + word.toLowerCase();
- });
-
- /**
- * Converts `string`, as space separated words, to lower case.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the lower cased string.
- * @example
- *
- * _.lowerCase('--Foo-Bar--');
- * // => 'foo bar'
- *
- * _.lowerCase('fooBar');
- * // => 'foo bar'
- *
- * _.lowerCase('__FOO_BAR__');
- * // => 'foo bar'
- */
- var lowerCase = createCompounder(function(result, word, index) {
- return result + (index ? ' ' : '') + word.toLowerCase();
- });
-
- /**
- * Converts the first character of `string` to lower case.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the converted string.
- * @example
- *
- * _.lowerFirst('Fred');
- * // => 'fred'
- *
- * _.lowerFirst('FRED');
- * // => 'fRED'
- */
- var lowerFirst = createCaseFirst('toLowerCase');
-
- /**
- * Pads `string` on the left and right sides if it's shorter than `length`.
- * Padding characters are truncated if they can't be evenly divided by `length`.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to pad.
- * @param {number} [length=0] The padding length.
- * @param {string} [chars=' '] The string used as padding.
- * @returns {string} Returns the padded string.
- * @example
- *
- * _.pad('abc', 8);
- * // => ' abc '
- *
- * _.pad('abc', 8, '_-');
- * // => '_-abc_-_'
- *
- * _.pad('abc', 3);
- * // => 'abc'
- */
- function pad(string, length, chars) {
- string = toString(string);
- length = toInteger(length);
-
- var strLength = length ? stringSize(string) : 0;
- if (!length || strLength >= length) {
- return string;
- }
- var mid = (length - strLength) / 2;
- return (
- createPadding(nativeFloor(mid), chars) +
- string +
- createPadding(nativeCeil(mid), chars)
- );
- }
-
- /**
- * Pads `string` on the right side if it's shorter than `length`. Padding
- * characters are truncated if they exceed `length`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category String
- * @param {string} [string=''] The string to pad.
- * @param {number} [length=0] The padding length.
- * @param {string} [chars=' '] The string used as padding.
- * @returns {string} Returns the padded string.
- * @example
- *
- * _.padEnd('abc', 6);
- * // => 'abc '
- *
- * _.padEnd('abc', 6, '_-');
- * // => 'abc_-_'
- *
- * _.padEnd('abc', 3);
- * // => 'abc'
- */
- function padEnd(string, length, chars) {
- string = toString(string);
- length = toInteger(length);
-
- var strLength = length ? stringSize(string) : 0;
- return (length && strLength < length)
- ? (string + createPadding(length - strLength, chars))
- : string;
- }
-
- /**
- * Pads `string` on the left side if it's shorter than `length`. Padding
- * characters are truncated if they exceed `length`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category String
- * @param {string} [string=''] The string to pad.
- * @param {number} [length=0] The padding length.
- * @param {string} [chars=' '] The string used as padding.
- * @returns {string} Returns the padded string.
- * @example
- *
- * _.padStart('abc', 6);
- * // => ' abc'
- *
- * _.padStart('abc', 6, '_-');
- * // => '_-_abc'
- *
- * _.padStart('abc', 3);
- * // => 'abc'
- */
- function padStart(string, length, chars) {
- string = toString(string);
- length = toInteger(length);
-
- var strLength = length ? stringSize(string) : 0;
- return (length && strLength < length)
- ? (createPadding(length - strLength, chars) + string)
- : string;
- }
-
- /**
- * Converts `string` to an integer of the specified radix. If `radix` is
- * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
- * hexadecimal, in which case a `radix` of `16` is used.
- *
- * **Note:** This method aligns with the
- * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
- *
- * @static
- * @memberOf _
- * @since 1.1.0
- * @category String
- * @param {string} string The string to convert.
- * @param {number} [radix=10] The radix to interpret `value` by.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {number} Returns the converted integer.
- * @example
- *
- * _.parseInt('08');
- * // => 8
- *
- * _.map(['6', '08', '10'], _.parseInt);
- * // => [6, 8, 10]
- */
- function parseInt(string, radix, guard) {
- // Chrome fails to trim leading whitespace characters.
- // See https://bugs.chromium.org/p/v8/issues/detail?id=3109 for more details.
- if (guard || radix == null) {
- radix = 0;
- } else if (radix) {
- radix = +radix;
- }
- string = toString(string).replace(reTrim, '');
- return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10));
- }
-
- /**
- * Repeats the given string `n` times.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to repeat.
- * @param {number} [n=1] The number of times to repeat the string.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {string} Returns the repeated string.
- * @example
- *
- * _.repeat('*', 3);
- * // => '***'
- *
- * _.repeat('abc', 2);
- * // => 'abcabc'
- *
- * _.repeat('abc', 0);
- * // => ''
- */
- function repeat(string, n, guard) {
- if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
- n = 1;
- } else {
- n = toInteger(n);
- }
- return baseRepeat(toString(string), n);
- }
-
- /**
- * Replaces matches for `pattern` in `string` with `replacement`.
- *
- * **Note:** This method is based on
- * [`String#replace`](https://mdn.io/String/replace).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category String
- * @param {string} [string=''] The string to modify.
- * @param {RegExp|string} pattern The pattern to replace.
- * @param {Function|string} replacement The match replacement.
- * @returns {string} Returns the modified string.
- * @example
- *
- * _.replace('Hi Fred', 'Fred', 'Barney');
- * // => 'Hi Barney'
- */
- function replace() {
- var args = arguments,
- string = toString(args[0]);
-
- return args.length < 3 ? string : nativeReplace.call(string, args[1], args[2]);
- }
-
- /**
- * Converts `string` to
- * [snake case](https://en.wikipedia.org/wiki/Snake_case).
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the snake cased string.
- * @example
- *
- * _.snakeCase('Foo Bar');
- * // => 'foo_bar'
- *
- * _.snakeCase('fooBar');
- * // => 'foo_bar'
- *
- * _.snakeCase('--FOO-BAR--');
- * // => 'foo_bar'
- */
- var snakeCase = createCompounder(function(result, word, index) {
- return result + (index ? '_' : '') + word.toLowerCase();
- });
-
- /**
- * Splits `string` by `separator`.
- *
- * **Note:** This method is based on
- * [`String#split`](https://mdn.io/String/split).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category String
- * @param {string} [string=''] The string to split.
- * @param {RegExp|string} separator The separator pattern to split by.
- * @param {number} [limit] The length to truncate results to.
- * @returns {Array} Returns the new array of string segments.
- * @example
- *
- * _.split('a-b-c', '-', 2);
- * // => ['a', 'b']
- */
- function split(string, separator, limit) {
- if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
- separator = limit = undefined;
- }
- limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
- if (!limit) {
- return [];
- }
- string = toString(string);
- if (string && (
- typeof separator == 'string' ||
- (separator != null && !isRegExp(separator))
- )) {
- separator = baseToString(separator);
- if (separator == '' && reHasComplexSymbol.test(string)) {
- return castSlice(stringToArray(string), 0, limit);
- }
- }
- return nativeSplit.call(string, separator, limit);
- }
-
- /**
- * Converts `string` to
- * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
- *
- * @static
- * @memberOf _
- * @since 3.1.0
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the start cased string.
- * @example
- *
- * _.startCase('--foo-bar--');
- * // => 'Foo Bar'
- *
- * _.startCase('fooBar');
- * // => 'Foo Bar'
- *
- * _.startCase('__FOO_BAR__');
- * // => 'FOO BAR'
- */
- var startCase = createCompounder(function(result, word, index) {
- return result + (index ? ' ' : '') + upperFirst(word);
- });
-
- /**
- * Checks if `string` starts with the given target string.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to search.
- * @param {string} [target] The string to search for.
- * @param {number} [position=0] The position to search from.
- * @returns {boolean} Returns `true` if `string` starts with `target`,
- * else `false`.
- * @example
- *
- * _.startsWith('abc', 'a');
- * // => true
- *
- * _.startsWith('abc', 'b');
- * // => false
- *
- * _.startsWith('abc', 'b', 1);
- * // => true
- */
- function startsWith(string, target, position) {
- string = toString(string);
- position = baseClamp(toInteger(position), 0, string.length);
- return string.lastIndexOf(baseToString(target), position) == position;
- }
-
- /**
- * Creates a compiled template function that can interpolate data properties
- * in "interpolate" delimiters, HTML-escape interpolated data properties in
- * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
- * properties may be accessed as free variables in the template. If a setting
- * object is given, it takes precedence over `_.templateSettings` values.
- *
- * **Note:** In the development build `_.template` utilizes
- * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
- * for easier debugging.
- *
- * For more information on precompiling templates see
- * [lodash's custom builds documentation](https://lodash.com/custom-builds).
- *
- * For more information on Chrome extension sandboxes see
- * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category String
- * @param {string} [string=''] The template string.
- * @param {Object} [options={}] The options object.
- * @param {RegExp} [options.escape=_.templateSettings.escape]
- * The HTML "escape" delimiter.
- * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
- * The "evaluate" delimiter.
- * @param {Object} [options.imports=_.templateSettings.imports]
- * An object to import into the template as free variables.
- * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
- * The "interpolate" delimiter.
- * @param {string} [options.sourceURL='lodash.templateSources[n]']
- * The sourceURL of the compiled template.
- * @param {string} [options.variable='obj']
- * The data object variable name.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {Function} Returns the compiled template function.
- * @example
- *
- * // Use the "interpolate" delimiter to create a compiled template.
- * var compiled = _.template('hello <%= user %>!');
- * compiled({ 'user': 'fred' });
- * // => 'hello fred!'
- *
- * // Use the HTML "escape" delimiter to escape data property values.
- * var compiled = _.template('<%- value %> ');
- * compiled({ 'value': '
- *
- *
- *
- *
- *
- * @param {!string} ns The namespace of the class definition, leaving off "com.greensock." as that's assumed. For example, "TweenLite" or "plugins.CSSPlugin" or "easing.Back".
- * @param {!Array.} dependencies An array of dependencies (described as their namespaces minus "com.greensock." prefix). For example ["TweenLite","plugins.TweenPlugin","core.Animation"]
- * @param {!function():Object} func The function that should be called and passed the resolved dependencies which will return the actual class for this definition.
- * @param {boolean=} global If true, the class will be added to the global scope (typically window unless you define a window.GreenSockGlobals object)
- */
- Definition = function(ns, dependencies, func, global) {
- this.sc = (_defLookup[ns]) ? _defLookup[ns].sc : []; //subclasses
- _defLookup[ns] = this;
- this.gsClass = null;
- this.func = func;
- var _classes = [];
- this.check = function(init) {
- var i = dependencies.length,
- missing = i,
- cur, a, n, cl, hasModule;
- while (--i > -1) {
- if ((cur = _defLookup[dependencies[i]] || new Definition(dependencies[i], [])).gsClass) {
- _classes[i] = cur.gsClass;
- missing--;
- } else if (init) {
- cur.sc.push(this);
- }
- }
- if (missing === 0 && func) {
- a = ("com.greensock." + ns).split(".");
- n = a.pop();
- cl = _namespace(a.join("."))[n] = this.gsClass = func.apply(func, _classes);
-
- //exports to multiple environments
- if (global) {
- _globals[n] = cl; //provides a way to avoid global namespace pollution. By default, the main classes like TweenLite, Power1, Strong, etc. are added to window unless a GreenSockGlobals is defined. So if you want to have things added to a custom object instead, just do something like window.GreenSockGlobals = {} before loading any GreenSock files. You can even set up an alias like window.GreenSockGlobals = windows.gs = {} so that you can access everything like gs.TweenLite. Also remember that ALL classes are added to the window.com.greensock object (in their respective packages, like com.greensock.easing.Power1, com.greensock.TweenLite, etc.)
- hasModule = (typeof(module) !== "undefined" && module.exports);
- if (!hasModule && "function" === "function" && __webpack_require__(16)){ //AMD
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function() { return cl; }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
- } else if (ns === moduleName && hasModule){ //node
- module.exports = cl;
- }
- }
- for (i = 0; i < this.sc.length; i++) {
- this.sc[i].check();
- }
- }
- };
- this.check(true);
- },
-
- //used to create Definition instances (which basically registers a class that has dependencies).
- _gsDefine = window._gsDefine = function(ns, dependencies, func, global) {
- return new Definition(ns, dependencies, func, global);
- },
-
- //a quick way to create a class that doesn't have any dependencies. Returns the class, but first registers it in the GreenSock namespace so that other classes can grab it (other classes might be dependent on the class).
- _class = gs._class = function(ns, func, global) {
- func = func || function() {};
- _gsDefine(ns, [], function(){ return func; }, global);
- return func;
- };
-
- _gsDefine.globals = _globals;
-
-
-
- /*
- * ----------------------------------------------------------------
- * Ease
- * ----------------------------------------------------------------
- */
- var _baseParams = [0, 0, 1, 1],
- _blankArray = [],
- Ease = _class("easing.Ease", function(func, extraParams, type, power) {
- this._func = func;
- this._type = type || 0;
- this._power = power || 0;
- this._params = extraParams ? _baseParams.concat(extraParams) : _baseParams;
- }, true),
- _easeMap = Ease.map = {},
- _easeReg = Ease.register = function(ease, names, types, create) {
- var na = names.split(","),
- i = na.length,
- ta = (types || "easeIn,easeOut,easeInOut").split(","),
- e, name, j, type;
- while (--i > -1) {
- name = na[i];
- e = create ? _class("easing."+name, null, true) : gs.easing[name] || {};
- j = ta.length;
- while (--j > -1) {
- type = ta[j];
- _easeMap[name + "." + type] = _easeMap[type + name] = e[type] = ease.getRatio ? ease : ease[type] || new ease();
- }
- }
- };
-
- p = Ease.prototype;
- p._calcEnd = false;
- p.getRatio = function(p) {
- if (this._func) {
- this._params[0] = p;
- return this._func.apply(null, this._params);
- }
- var t = this._type,
- pw = this._power,
- r = (t === 1) ? 1 - p : (t === 2) ? p : (p < 0.5) ? p * 2 : (1 - p) * 2;
- if (pw === 1) {
- r *= r;
- } else if (pw === 2) {
- r *= r * r;
- } else if (pw === 3) {
- r *= r * r * r;
- } else if (pw === 4) {
- r *= r * r * r * r;
- }
- return (t === 1) ? 1 - r : (t === 2) ? r : (p < 0.5) ? r / 2 : 1 - (r / 2);
- };
-
- //create all the standard eases like Linear, Quad, Cubic, Quart, Quint, Strong, Power0, Power1, Power2, Power3, and Power4 (each with easeIn, easeOut, and easeInOut)
- a = ["Linear","Quad","Cubic","Quart","Quint,Strong"];
- i = a.length;
- while (--i > -1) {
- p = a[i]+",Power"+i;
- _easeReg(new Ease(null,null,1,i), p, "easeOut", true);
- _easeReg(new Ease(null,null,2,i), p, "easeIn" + ((i === 0) ? ",easeNone" : ""));
- _easeReg(new Ease(null,null,3,i), p, "easeInOut");
- }
- _easeMap.linear = gs.easing.Linear.easeIn;
- _easeMap.swing = gs.easing.Quad.easeInOut; //for jQuery folks
-
-
- /*
- * ----------------------------------------------------------------
- * EventDispatcher
- * ----------------------------------------------------------------
- */
- var EventDispatcher = _class("events.EventDispatcher", function(target) {
- this._listeners = {};
- this._eventTarget = target || this;
- });
- p = EventDispatcher.prototype;
-
- p.addEventListener = function(type, callback, scope, useParam, priority) {
- priority = priority || 0;
- var list = this._listeners[type],
- index = 0,
- listener, i;
- if (list == null) {
- this._listeners[type] = list = [];
- }
- i = list.length;
- while (--i > -1) {
- listener = list[i];
- if (listener.c === callback && listener.s === scope) {
- list.splice(i, 1);
- } else if (index === 0 && listener.pr < priority) {
- index = i + 1;
- }
- }
- list.splice(index, 0, {c:callback, s:scope, up:useParam, pr:priority});
- if (this === _ticker && !_tickerActive) {
- _ticker.wake();
- }
- };
-
- p.removeEventListener = function(type, callback) {
- var list = this._listeners[type], i;
- if (list) {
- i = list.length;
- while (--i > -1) {
- if (list[i].c === callback) {
- list.splice(i, 1);
- return;
- }
- }
- }
- };
-
- p.dispatchEvent = function(type) {
- var list = this._listeners[type],
- i, t, listener;
- if (list) {
- i = list.length;
- t = this._eventTarget;
- while (--i > -1) {
- listener = list[i];
- if (listener) {
- if (listener.up) {
- listener.c.call(listener.s || t, {type:type, target:t});
- } else {
- listener.c.call(listener.s || t);
- }
- }
- }
- }
- };
-
-
- /*
- * ----------------------------------------------------------------
- * Ticker
- * ----------------------------------------------------------------
- */
- var _reqAnimFrame = window.requestAnimationFrame,
- _cancelAnimFrame = window.cancelAnimationFrame,
- _getTime = Date.now || function() {return new Date().getTime();},
- _lastUpdate = _getTime();
-
- //now try to determine the requestAnimationFrame and cancelAnimationFrame functions and if none are found, we'll use a setTimeout()/clearTimeout() polyfill.
- a = ["ms","moz","webkit","o"];
- i = a.length;
- while (--i > -1 && !_reqAnimFrame) {
- _reqAnimFrame = window[a[i] + "RequestAnimationFrame"];
- _cancelAnimFrame = window[a[i] + "CancelAnimationFrame"] || window[a[i] + "CancelRequestAnimationFrame"];
- }
-
- _class("Ticker", function(fps, useRAF) {
- var _self = this,
- _startTime = _getTime(),
- _useRAF = (useRAF !== false && _reqAnimFrame) ? "auto" : false,
- _lagThreshold = 500,
- _adjustedLag = 33,
- _tickWord = "tick", //helps reduce gc burden
- _fps, _req, _id, _gap, _nextTime,
- _tick = function(manual) {
- var elapsed = _getTime() - _lastUpdate,
- overlap, dispatch;
- if (elapsed > _lagThreshold) {
- _startTime += elapsed - _adjustedLag;
- }
- _lastUpdate += elapsed;
- _self.time = (_lastUpdate - _startTime) / 1000;
- overlap = _self.time - _nextTime;
- if (!_fps || overlap > 0 || manual === true) {
- _self.frame++;
- _nextTime += overlap + (overlap >= _gap ? 0.004 : _gap - overlap);
- dispatch = true;
- }
- if (manual !== true) { //make sure the request is made before we dispatch the "tick" event so that timing is maintained. Otherwise, if processing the "tick" requires a bunch of time (like 15ms) and we're using a setTimeout() that's based on 16.7ms, it'd technically take 31.7ms between frames otherwise.
- _id = _req(_tick);
- }
- if (dispatch) {
- _self.dispatchEvent(_tickWord);
- }
- };
-
- EventDispatcher.call(_self);
- _self.time = _self.frame = 0;
- _self.tick = function() {
- _tick(true);
- };
-
- _self.lagSmoothing = function(threshold, adjustedLag) {
- _lagThreshold = threshold || (1 / _tinyNum); //zero should be interpreted as basically unlimited
- _adjustedLag = Math.min(adjustedLag, _lagThreshold, 0);
- };
-
- _self.sleep = function() {
- if (_id == null) {
- return;
- }
- if (!_useRAF || !_cancelAnimFrame) {
- clearTimeout(_id);
- } else {
- _cancelAnimFrame(_id);
- }
- _req = _emptyFunc;
- _id = null;
- if (_self === _ticker) {
- _tickerActive = false;
- }
- };
-
- _self.wake = function(seamless) {
- if (_id !== null) {
- _self.sleep();
- } else if (seamless) {
- _startTime += -_lastUpdate + (_lastUpdate = _getTime());
- } else if (_self.frame > 10) { //don't trigger lagSmoothing if we're just waking up, and make sure that at least 10 frames have elapsed because of the iOS bug that we work around below with the 1.5-second setTimout().
- _lastUpdate = _getTime() - _lagThreshold + 5;
- }
- _req = (_fps === 0) ? _emptyFunc : (!_useRAF || !_reqAnimFrame) ? function(f) { return setTimeout(f, ((_nextTime - _self.time) * 1000 + 1) | 0); } : _reqAnimFrame;
- if (_self === _ticker) {
- _tickerActive = true;
- }
- _tick(2);
- };
-
- _self.fps = function(value) {
- if (!arguments.length) {
- return _fps;
- }
- _fps = value;
- _gap = 1 / (_fps || 60);
- _nextTime = this.time + _gap;
- _self.wake();
- };
-
- _self.useRAF = function(value) {
- if (!arguments.length) {
- return _useRAF;
- }
- _self.sleep();
- _useRAF = value;
- _self.fps(_fps);
- };
- _self.fps(fps);
-
- //a bug in iOS 6 Safari occasionally prevents the requestAnimationFrame from working initially, so we use a 1.5-second timeout that automatically falls back to setTimeout() if it senses this condition.
- setTimeout(function() {
- if (_useRAF === "auto" && _self.frame < 5 && document.visibilityState !== "hidden") {
- _self.useRAF(false);
- }
- }, 1500);
- });
-
- p = gs.Ticker.prototype = new gs.events.EventDispatcher();
- p.constructor = gs.Ticker;
-
-
- /*
- * ----------------------------------------------------------------
- * Animation
- * ----------------------------------------------------------------
- */
- var Animation = _class("core.Animation", function(duration, vars) {
- this.vars = vars = vars || {};
- this._duration = this._totalDuration = duration || 0;
- this._delay = Number(vars.delay) || 0;
- this._timeScale = 1;
- this._active = (vars.immediateRender === true);
- this.data = vars.data;
- this._reversed = (vars.reversed === true);
-
- if (!_rootTimeline) {
- return;
- }
- if (!_tickerActive) { //some browsers (like iOS 6 Safari) shut down JavaScript execution when the tab is disabled and they [occasionally] neglect to start up requestAnimationFrame again when returning - this code ensures that the engine starts up again properly.
- _ticker.wake();
- }
-
- var tl = this.vars.useFrames ? _rootFramesTimeline : _rootTimeline;
- tl.add(this, tl._time);
-
- if (this.vars.paused) {
- this.paused(true);
- }
- });
-
- _ticker = Animation.ticker = new gs.Ticker();
- p = Animation.prototype;
- p._dirty = p._gc = p._initted = p._paused = false;
- p._totalTime = p._time = 0;
- p._rawPrevTime = -1;
- p._next = p._last = p._onUpdate = p._timeline = p.timeline = null;
- p._paused = false;
-
-
- //some browsers (like iOS) occasionally drop the requestAnimationFrame event when the user switches to a different tab and then comes back again, so we use a 2-second setTimeout() to sense if/when that condition occurs and then wake() the ticker.
- var _checkTimeout = function() {
- if (_tickerActive && _getTime() - _lastUpdate > 2000) {
- _ticker.wake();
- }
- setTimeout(_checkTimeout, 2000);
- };
- _checkTimeout();
-
-
- p.play = function(from, suppressEvents) {
- if (from != null) {
- this.seek(from, suppressEvents);
- }
- return this.reversed(false).paused(false);
- };
-
- p.pause = function(atTime, suppressEvents) {
- if (atTime != null) {
- this.seek(atTime, suppressEvents);
- }
- return this.paused(true);
- };
-
- p.resume = function(from, suppressEvents) {
- if (from != null) {
- this.seek(from, suppressEvents);
- }
- return this.paused(false);
- };
-
- p.seek = function(time, suppressEvents) {
- return this.totalTime(Number(time), suppressEvents !== false);
- };
-
- p.restart = function(includeDelay, suppressEvents) {
- return this.reversed(false).paused(false).totalTime(includeDelay ? -this._delay : 0, (suppressEvents !== false), true);
- };
-
- p.reverse = function(from, suppressEvents) {
- if (from != null) {
- this.seek((from || this.totalDuration()), suppressEvents);
- }
- return this.reversed(true).paused(false);
- };
-
- p.render = function(time, suppressEvents, force) {
- //stub - we override this method in subclasses.
- };
-
- p.invalidate = function() {
- this._time = this._totalTime = 0;
- this._initted = this._gc = false;
- this._rawPrevTime = -1;
- if (this._gc || !this.timeline) {
- this._enabled(true);
- }
- return this;
- };
-
- p.isActive = function() {
- var tl = this._timeline, //the 2 root timelines won't have a _timeline; they're always active.
- startTime = this._startTime,
- rawTime;
- return (!tl || (!this._gc && !this._paused && tl.isActive() && (rawTime = tl.rawTime()) >= startTime && rawTime < startTime + this.totalDuration() / this._timeScale));
- };
-
- p._enabled = function (enabled, ignoreTimeline) {
- if (!_tickerActive) {
- _ticker.wake();
- }
- this._gc = !enabled;
- this._active = this.isActive();
- if (ignoreTimeline !== true) {
- if (enabled && !this.timeline) {
- this._timeline.add(this, this._startTime - this._delay);
- } else if (!enabled && this.timeline) {
- this._timeline._remove(this, true);
- }
- }
- return false;
- };
-
-
- p._kill = function(vars, target) {
- return this._enabled(false, false);
- };
-
- p.kill = function(vars, target) {
- this._kill(vars, target);
- return this;
- };
-
- p._uncache = function(includeSelf) {
- var tween = includeSelf ? this : this.timeline;
- while (tween) {
- tween._dirty = true;
- tween = tween.timeline;
- }
- return this;
- };
-
- p._swapSelfInParams = function(params) {
- var i = params.length,
- copy = params.concat();
- while (--i > -1) {
- if (params[i] === "{self}") {
- copy[i] = this;
- }
- }
- return copy;
- };
-
- p._callback = function(type) {
- var v = this.vars;
- v[type].apply(v[type + "Scope"] || v.callbackScope || this, v[type + "Params"] || _blankArray);
- };
-
- //----Animation getters/setters --------------------------------------------------------
-
- p.eventCallback = function(type, callback, params, scope) {
- if ((type || "").substr(0,2) === "on") {
- var v = this.vars;
- if (arguments.length === 1) {
- return v[type];
- }
- if (callback == null) {
- delete v[type];
- } else {
- v[type] = callback;
- v[type + "Params"] = (_isArray(params) && params.join("").indexOf("{self}") !== -1) ? this._swapSelfInParams(params) : params;
- v[type + "Scope"] = scope;
- }
- if (type === "onUpdate") {
- this._onUpdate = callback;
- }
- }
- return this;
- };
-
- p.delay = function(value) {
- if (!arguments.length) {
- return this._delay;
- }
- if (this._timeline.smoothChildTiming) {
- this.startTime( this._startTime + value - this._delay );
- }
- this._delay = value;
- return this;
- };
-
- p.duration = function(value) {
- if (!arguments.length) {
- this._dirty = false;
- return this._duration;
- }
- this._duration = this._totalDuration = value;
- this._uncache(true); //true in case it's a TweenMax or TimelineMax that has a repeat - we'll need to refresh the totalDuration.
- if (this._timeline.smoothChildTiming) if (this._time > 0) if (this._time < this._duration) if (value !== 0) {
- this.totalTime(this._totalTime * (value / this._duration), true);
- }
- return this;
- };
-
- p.totalDuration = function(value) {
- this._dirty = false;
- return (!arguments.length) ? this._totalDuration : this.duration(value);
- };
-
- p.time = function(value, suppressEvents) {
- if (!arguments.length) {
- return this._time;
- }
- if (this._dirty) {
- this.totalDuration();
- }
- return this.totalTime((value > this._duration) ? this._duration : value, suppressEvents);
- };
-
- p.totalTime = function(time, suppressEvents, uncapped) {
- if (!_tickerActive) {
- _ticker.wake();
- }
- if (!arguments.length) {
- return this._totalTime;
- }
- if (this._timeline) {
- if (time < 0 && !uncapped) {
- time += this.totalDuration();
- }
- if (this._timeline.smoothChildTiming) {
- if (this._dirty) {
- this.totalDuration();
- }
- var totalDuration = this._totalDuration,
- tl = this._timeline;
- if (time > totalDuration && !uncapped) {
- time = totalDuration;
- }
- this._startTime = (this._paused ? this._pauseTime : tl._time) - ((!this._reversed ? time : totalDuration - time) / this._timeScale);
- if (!tl._dirty) { //for performance improvement. If the parent's cache is already dirty, it already took care of marking the ancestors as dirty too, so skip the function call here.
- this._uncache(false);
- }
- //in case any of the ancestor timelines had completed but should now be enabled, we should reset their totalTime() which will also ensure that they're lined up properly and enabled. Skip for animations that are on the root (wasteful). Example: a TimelineLite.exportRoot() is performed when there's a paused tween on the root, the export will not complete until that tween is unpaused, but imagine a child gets restarted later, after all [unpaused] tweens have completed. The startTime of that child would get pushed out, but one of the ancestors may have completed.
- if (tl._timeline) {
- while (tl._timeline) {
- if (tl._timeline._time !== (tl._startTime + tl._totalTime) / tl._timeScale) {
- tl.totalTime(tl._totalTime, true);
- }
- tl = tl._timeline;
- }
- }
- }
- if (this._gc) {
- this._enabled(true, false);
- }
- if (this._totalTime !== time || this._duration === 0) {
- if (_lazyTweens.length) {
- _lazyRender();
- }
- this.render(time, suppressEvents, false);
- if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when someone calls seek() or time() or progress(), they expect an immediate render.
- _lazyRender();
- }
- }
- }
- return this;
- };
-
- p.progress = p.totalProgress = function(value, suppressEvents) {
- var duration = this.duration();
- return (!arguments.length) ? (duration ? this._time / duration : this.ratio) : this.totalTime(duration * value, suppressEvents);
- };
-
- p.startTime = function(value) {
- if (!arguments.length) {
- return this._startTime;
- }
- if (value !== this._startTime) {
- this._startTime = value;
- if (this.timeline) if (this.timeline._sortChildren) {
- this.timeline.add(this, value - this._delay); //ensures that any necessary re-sequencing of Animations in the timeline occurs to make sure the rendering order is correct.
- }
- }
- return this;
- };
-
- p.endTime = function(includeRepeats) {
- return this._startTime + ((includeRepeats != false) ? this.totalDuration() : this.duration()) / this._timeScale;
- };
-
- p.timeScale = function(value) {
- if (!arguments.length) {
- return this._timeScale;
- }
- value = value || _tinyNum; //can't allow zero because it'll throw the math off
- if (this._timeline && this._timeline.smoothChildTiming) {
- var pauseTime = this._pauseTime,
- t = (pauseTime || pauseTime === 0) ? pauseTime : this._timeline.totalTime();
- this._startTime = t - ((t - this._startTime) * this._timeScale / value);
- }
- this._timeScale = value;
- return this._uncache(false);
- };
-
- p.reversed = function(value) {
- if (!arguments.length) {
- return this._reversed;
- }
- if (value != this._reversed) {
- this._reversed = value;
- this.totalTime(((this._timeline && !this._timeline.smoothChildTiming) ? this.totalDuration() - this._totalTime : this._totalTime), true);
- }
- return this;
- };
-
- p.paused = function(value) {
- if (!arguments.length) {
- return this._paused;
- }
- var tl = this._timeline,
- raw, elapsed;
- if (value != this._paused) if (tl) {
- if (!_tickerActive && !value) {
- _ticker.wake();
- }
- raw = tl.rawTime();
- elapsed = raw - this._pauseTime;
- if (!value && tl.smoothChildTiming) {
- this._startTime += elapsed;
- this._uncache(false);
- }
- this._pauseTime = value ? raw : null;
- this._paused = value;
- this._active = this.isActive();
- if (!value && elapsed !== 0 && this._initted && this.duration()) {
- raw = tl.smoothChildTiming ? this._totalTime : (raw - this._startTime) / this._timeScale;
- this.render(raw, (raw === this._totalTime), true); //in case the target's properties changed via some other tween or manual update by the user, we should force a render.
- }
- }
- if (this._gc && !value) {
- this._enabled(true, false);
- }
- return this;
- };
-
-
- /*
- * ----------------------------------------------------------------
- * SimpleTimeline
- * ----------------------------------------------------------------
- */
- var SimpleTimeline = _class("core.SimpleTimeline", function(vars) {
- Animation.call(this, 0, vars);
- this.autoRemoveChildren = this.smoothChildTiming = true;
- });
-
- p = SimpleTimeline.prototype = new Animation();
- p.constructor = SimpleTimeline;
- p.kill()._gc = false;
- p._first = p._last = p._recent = null;
- p._sortChildren = false;
-
- p.add = p.insert = function(child, position, align, stagger) {
- var prevTween, st;
- child._startTime = Number(position || 0) + child._delay;
- if (child._paused) if (this !== child._timeline) { //we only adjust the _pauseTime if it wasn't in this timeline already. Remember, sometimes a tween will be inserted again into the same timeline when its startTime is changed so that the tweens in the TimelineLite/Max are re-ordered properly in the linked list (so everything renders in the proper order).
- child._pauseTime = child._startTime + ((this.rawTime() - child._startTime) / child._timeScale);
- }
- if (child.timeline) {
- child.timeline._remove(child, true); //removes from existing timeline so that it can be properly added to this one.
- }
- child.timeline = child._timeline = this;
- if (child._gc) {
- child._enabled(true, true);
- }
- prevTween = this._last;
- if (this._sortChildren) {
- st = child._startTime;
- while (prevTween && prevTween._startTime > st) {
- prevTween = prevTween._prev;
- }
- }
- if (prevTween) {
- child._next = prevTween._next;
- prevTween._next = child;
- } else {
- child._next = this._first;
- this._first = child;
- }
- if (child._next) {
- child._next._prev = child;
- } else {
- this._last = child;
- }
- child._prev = prevTween;
- this._recent = child;
- if (this._timeline) {
- this._uncache(true);
- }
- return this;
- };
-
- p._remove = function(tween, skipDisable) {
- if (tween.timeline === this) {
- if (!skipDisable) {
- tween._enabled(false, true);
- }
-
- if (tween._prev) {
- tween._prev._next = tween._next;
- } else if (this._first === tween) {
- this._first = tween._next;
- }
- if (tween._next) {
- tween._next._prev = tween._prev;
- } else if (this._last === tween) {
- this._last = tween._prev;
- }
- tween._next = tween._prev = tween.timeline = null;
- if (tween === this._recent) {
- this._recent = this._last;
- }
-
- if (this._timeline) {
- this._uncache(true);
- }
- }
- return this;
- };
-
- p.render = function(time, suppressEvents, force) {
- var tween = this._first,
- next;
- this._totalTime = this._time = this._rawPrevTime = time;
- while (tween) {
- next = tween._next; //record it here because the value could change after rendering...
- if (tween._active || (time >= tween._startTime && !tween._paused)) {
- if (!tween._reversed) {
- tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force);
- } else {
- tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force);
- }
- }
- tween = next;
- }
- };
-
- p.rawTime = function() {
- if (!_tickerActive) {
- _ticker.wake();
- }
- return this._totalTime;
- };
-
- /*
- * ----------------------------------------------------------------
- * TweenLite
- * ----------------------------------------------------------------
- */
- var TweenLite = _class("TweenLite", function(target, duration, vars) {
- Animation.call(this, duration, vars);
- this.render = TweenLite.prototype.render; //speed optimization (avoid prototype lookup on this "hot" method)
-
- if (target == null) {
- throw "Cannot tween a null target.";
- }
-
- this.target = target = (typeof(target) !== "string") ? target : TweenLite.selector(target) || target;
-
- var isSelector = (target.jquery || (target.length && target !== window && target[0] && (target[0] === window || (target[0].nodeType && target[0].style && !target.nodeType)))),
- overwrite = this.vars.overwrite,
- i, targ, targets;
-
- this._overwrite = overwrite = (overwrite == null) ? _overwriteLookup[TweenLite.defaultOverwrite] : (typeof(overwrite) === "number") ? overwrite >> 0 : _overwriteLookup[overwrite];
-
- if ((isSelector || target instanceof Array || (target.push && _isArray(target))) && typeof(target[0]) !== "number") {
- this._targets = targets = _slice(target); //don't use Array.prototype.slice.call(target, 0) because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll()
- this._propLookup = [];
- this._siblings = [];
- for (i = 0; i < targets.length; i++) {
- targ = targets[i];
- if (!targ) {
- targets.splice(i--, 1);
- continue;
- } else if (typeof(targ) === "string") {
- targ = targets[i--] = TweenLite.selector(targ); //in case it's an array of strings
- if (typeof(targ) === "string") {
- targets.splice(i+1, 1); //to avoid an endless loop (can't imagine why the selector would return a string, but just in case)
- }
- continue;
- } else if (targ.length && targ !== window && targ[0] && (targ[0] === window || (targ[0].nodeType && targ[0].style && !targ.nodeType))) { //in case the user is passing in an array of selector objects (like jQuery objects), we need to check one more level and pull things out if necessary. Also note that elements pass all the criteria regarding length and the first child having style, so we must also check to ensure the target isn't an HTML node itself.
- targets.splice(i--, 1);
- this._targets = targets = targets.concat(_slice(targ));
- continue;
- }
- this._siblings[i] = _register(targ, this, false);
- if (overwrite === 1) if (this._siblings[i].length > 1) {
- _applyOverwrite(targ, this, null, 1, this._siblings[i]);
- }
- }
-
- } else {
- this._propLookup = {};
- this._siblings = _register(target, this, false);
- if (overwrite === 1) if (this._siblings.length > 1) {
- _applyOverwrite(target, this, null, 1, this._siblings);
- }
- }
- if (this.vars.immediateRender || (duration === 0 && this._delay === 0 && this.vars.immediateRender !== false)) {
- this._time = -_tinyNum; //forces a render without having to set the render() "force" parameter to true because we want to allow lazying by default (using the "force" parameter always forces an immediate full render)
- this.render(Math.min(0, -this._delay)); //in case delay is negative
- }
- }, true),
- _isSelector = function(v) {
- return (v && v.length && v !== window && v[0] && (v[0] === window || (v[0].nodeType && v[0].style && !v.nodeType))); //we cannot check "nodeType" if the target is window from within an iframe, otherwise it will trigger a security error in some browsers like Firefox.
- },
- _autoCSS = function(vars, target) {
- var css = {},
- p;
- for (p in vars) {
- if (!_reservedProps[p] && (!(p in target) || p === "transform" || p === "x" || p === "y" || p === "width" || p === "height" || p === "className" || p === "border") && (!_plugins[p] || (_plugins[p] && _plugins[p]._autoCSS))) { //note: elements contain read-only "x" and "y" properties. We should also prioritize editing css width/height rather than the element's properties.
- css[p] = vars[p];
- delete vars[p];
- }
- }
- vars.css = css;
- };
-
- p = TweenLite.prototype = new Animation();
- p.constructor = TweenLite;
- p.kill()._gc = false;
-
- //----TweenLite defaults, overwrite management, and root updates ----------------------------------------------------
-
- p.ratio = 0;
- p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;
- p._notifyPluginsOfEnabled = p._lazy = false;
-
- TweenLite.version = "1.18.4";
- TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);
- TweenLite.defaultOverwrite = "auto";
- TweenLite.ticker = _ticker;
- TweenLite.autoSleep = 120;
- TweenLite.lagSmoothing = function(threshold, adjustedLag) {
- _ticker.lagSmoothing(threshold, adjustedLag);
- };
-
- TweenLite.selector = window.$ || window.jQuery || function(e) {
- var selector = window.$ || window.jQuery;
- if (selector) {
- TweenLite.selector = selector;
- return selector(e);
- }
- return (typeof(document) === "undefined") ? e : (document.querySelectorAll ? document.querySelectorAll(e) : document.getElementById((e.charAt(0) === "#") ? e.substr(1) : e));
- };
-
- var _lazyTweens = [],
- _lazyLookup = {},
- _numbersExp = /(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig,
- //_nonNumbersExp = /(?:([\-+](?!(\d|=)))|[^\d\-+=e]|(e(?![\-+][\d])))+/ig,
- _setRatio = function(v) {
- var pt = this._firstPT,
- min = 0.000001,
- val;
- while (pt) {
- val = !pt.blob ? pt.c * v + pt.s : v ? this.join("") : this.start;
- if (pt.r) {
- val = Math.round(val);
- } else if (val < min) if (val > -min) { //prevents issues with converting very small numbers to strings in the browser
- val = 0;
- }
- if (!pt.f) {
- pt.t[pt.p] = val;
- } else if (pt.fp) {
- pt.t[pt.p](pt.fp, val);
- } else {
- pt.t[pt.p](val);
- }
- pt = pt._next;
- }
- },
- //compares two strings (start/end), finds the numbers that are different and spits back an array representing the whole value but with the changing values isolated as elements. For example, "rgb(0,0,0)" and "rgb(100,50,0)" would become ["rgb(", 0, ",", 50, ",0)"]. Notice it merges the parts that are identical (performance optimization). The array also has a linked list of PropTweens attached starting with _firstPT that contain the tweening data (t, p, s, c, f, etc.). It also stores the starting value as a "start" property so that we can revert to it if/when necessary, like when a tween rewinds fully. If the quantity of numbers differs between the start and end, it will always prioritize the end value(s). The pt parameter is optional - it's for a PropTween that will be appended to the end of the linked list and is typically for actually setting the value after all of the elements have been updated (with array.join("")).
- _blobDif = function(start, end, filter, pt) {
- var a = [start, end],
- charIndex = 0,
- s = "",
- color = 0,
- startNums, endNums, num, i, l, nonNumbers, currentNum;
- a.start = start;
- if (filter) {
- filter(a); //pass an array with the starting and ending values and let the filter do whatever it needs to the values.
- start = a[0];
- end = a[1];
- }
- a.length = 0;
- startNums = start.match(_numbersExp) || [];
- endNums = end.match(_numbersExp) || [];
- if (pt) {
- pt._next = null;
- pt.blob = 1;
- a._firstPT = pt; //apply last in the linked list (which means inserting it first)
- }
- l = endNums.length;
- for (i = 0; i < l; i++) {
- currentNum = endNums[i];
- nonNumbers = end.substr(charIndex, end.indexOf(currentNum, charIndex)-charIndex);
- s += (nonNumbers || !i) ? nonNumbers : ","; //note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case.
- charIndex += nonNumbers.length;
- if (color) { //sense rgba() values and round them.
- color = (color + 1) % 5;
- } else if (nonNumbers.substr(-5) === "rgba(") {
- color = 1;
- }
- if (currentNum === startNums[i] || startNums.length <= i) {
- s += currentNum;
- } else {
- if (s) {
- a.push(s);
- s = "";
- }
- num = parseFloat(startNums[i]);
- a.push(num);
- a._firstPT = {_next: a._firstPT, t:a, p: a.length-1, s:num, c:((currentNum.charAt(1) === "=") ? parseInt(currentNum.charAt(0) + "1", 10) * parseFloat(currentNum.substr(2)) : (parseFloat(currentNum) - num)) || 0, f:0, r:(color && color < 4)};
- //note: we don't set _prev because we'll never need to remove individual PropTweens from this list.
- }
- charIndex += currentNum.length;
- }
- s += end.substr(charIndex);
- if (s) {
- a.push(s);
- }
- a.setRatio = _setRatio;
- return a;
- },
- //note: "funcParam" is only necessary for function-based getters/setters that require an extra parameter like getAttribute("width") and setAttribute("width", value). In this example, funcParam would be "width". Used by AttrPlugin for example.
- _addPropTween = function(target, prop, start, end, overwriteProp, round, funcParam, stringFilter) {
- var s = (start === "get") ? target[prop] : start,
- type = typeof(target[prop]),
- isRelative = (typeof(end) === "string" && end.charAt(1) === "="),
- pt = {t:target, p:prop, s:s, f:(type === "function"), pg:0, n:overwriteProp || prop, r:round, pr:0, c:isRelative ? parseInt(end.charAt(0) + "1", 10) * parseFloat(end.substr(2)) : (parseFloat(end) - s) || 0},
- blob, getterName;
- if (type !== "number") {
- if (type === "function" && start === "get") {
- getterName = ((prop.indexOf("set") || typeof(target["get" + prop.substr(3)]) !== "function") ? prop : "get" + prop.substr(3));
- pt.s = s = funcParam ? target[getterName](funcParam) : target[getterName]();
- }
- if (typeof(s) === "string" && (funcParam || isNaN(s))) {
- //a blob (string that has multiple numbers in it)
- pt.fp = funcParam;
- blob = _blobDif(s, end, stringFilter || TweenLite.defaultStringFilter, pt);
- pt = {t:blob, p:"setRatio", s:0, c:1, f:2, pg:0, n:overwriteProp || prop, pr:0}; //"2" indicates it's a Blob property tween. Needed for RoundPropsPlugin for example.
- } else if (!isRelative) {
- pt.s = parseFloat(s);
- pt.c = (parseFloat(end) - pt.s) || 0;
- }
- }
- if (pt.c) { //only add it to the linked list if there's a change.
- if ((pt._next = this._firstPT)) {
- pt._next._prev = pt;
- }
- this._firstPT = pt;
- return pt;
- }
- },
- _internals = TweenLite._internals = {isArray:_isArray, isSelector:_isSelector, lazyTweens:_lazyTweens, blobDif:_blobDif}, //gives us a way to expose certain private values to other GreenSock classes without contaminating tha main TweenLite object.
- _plugins = TweenLite._plugins = {},
- _tweenLookup = _internals.tweenLookup = {},
- _tweenLookupNum = 0,
- _reservedProps = _internals.reservedProps = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, onCompleteScope:1, useFrames:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, onUpdateScope:1, onStart:1, onStartParams:1, onStartScope:1, onReverseComplete:1, onReverseCompleteParams:1, onReverseCompleteScope:1, onRepeat:1, onRepeatParams:1, onRepeatScope:1, easeParams:1, yoyo:1, immediateRender:1, repeat:1, repeatDelay:1, data:1, paused:1, reversed:1, autoCSS:1, lazy:1, onOverwrite:1, callbackScope:1, stringFilter:1},
- _overwriteLookup = {none:0, all:1, auto:2, concurrent:3, allOnStart:4, preexisting:5, "true":1, "false":0},
- _rootFramesTimeline = Animation._rootFramesTimeline = new SimpleTimeline(),
- _rootTimeline = Animation._rootTimeline = new SimpleTimeline(),
- _nextGCFrame = 30,
- _lazyRender = _internals.lazyRender = function() {
- var i = _lazyTweens.length,
- tween;
- _lazyLookup = {};
- while (--i > -1) {
- tween = _lazyTweens[i];
- if (tween && tween._lazy !== false) {
- tween.render(tween._lazy[0], tween._lazy[1], true);
- tween._lazy = false;
- }
- }
- _lazyTweens.length = 0;
- };
-
- _rootTimeline._startTime = _ticker.time;
- _rootFramesTimeline._startTime = _ticker.frame;
- _rootTimeline._active = _rootFramesTimeline._active = true;
- setTimeout(_lazyRender, 1); //on some mobile devices, there isn't a "tick" before code runs which means any lazy renders wouldn't run before the next official "tick".
-
- Animation._updateRoot = TweenLite.render = function() {
- var i, a, p;
- if (_lazyTweens.length) { //if code is run outside of the requestAnimationFrame loop, there may be tweens queued AFTER the engine refreshed, so we need to ensure any pending renders occur before we refresh again.
- _lazyRender();
- }
- _rootTimeline.render((_ticker.time - _rootTimeline._startTime) * _rootTimeline._timeScale, false, false);
- _rootFramesTimeline.render((_ticker.frame - _rootFramesTimeline._startTime) * _rootFramesTimeline._timeScale, false, false);
- if (_lazyTweens.length) {
- _lazyRender();
- }
- if (_ticker.frame >= _nextGCFrame) { //dump garbage every 120 frames or whatever the user sets TweenLite.autoSleep to
- _nextGCFrame = _ticker.frame + (parseInt(TweenLite.autoSleep, 10) || 120);
- for (p in _tweenLookup) {
- a = _tweenLookup[p].tweens;
- i = a.length;
- while (--i > -1) {
- if (a[i]._gc) {
- a.splice(i, 1);
- }
- }
- if (a.length === 0) {
- delete _tweenLookup[p];
- }
- }
- //if there are no more tweens in the root timelines, or if they're all paused, make the _timer sleep to reduce load on the CPU slightly
- p = _rootTimeline._first;
- if (!p || p._paused) if (TweenLite.autoSleep && !_rootFramesTimeline._first && _ticker._listeners.tick.length === 1) {
- while (p && p._paused) {
- p = p._next;
- }
- if (!p) {
- _ticker.sleep();
- }
- }
- }
- };
-
- _ticker.addEventListener("tick", Animation._updateRoot);
-
- var _register = function(target, tween, scrub) {
- var id = target._gsTweenID, a, i;
- if (!_tweenLookup[id || (target._gsTweenID = id = "t" + (_tweenLookupNum++))]) {
- _tweenLookup[id] = {target:target, tweens:[]};
- }
- if (tween) {
- a = _tweenLookup[id].tweens;
- a[(i = a.length)] = tween;
- if (scrub) {
- while (--i > -1) {
- if (a[i] === tween) {
- a.splice(i, 1);
- }
- }
- }
- }
- return _tweenLookup[id].tweens;
- },
- _onOverwrite = function(overwrittenTween, overwritingTween, target, killedProps) {
- var func = overwrittenTween.vars.onOverwrite, r1, r2;
- if (func) {
- r1 = func(overwrittenTween, overwritingTween, target, killedProps);
- }
- func = TweenLite.onOverwrite;
- if (func) {
- r2 = func(overwrittenTween, overwritingTween, target, killedProps);
- }
- return (r1 !== false && r2 !== false);
- },
- _applyOverwrite = function(target, tween, props, mode, siblings) {
- var i, changed, curTween, l;
- if (mode === 1 || mode >= 4) {
- l = siblings.length;
- for (i = 0; i < l; i++) {
- if ((curTween = siblings[i]) !== tween) {
- if (!curTween._gc) {
- if (curTween._kill(null, target, tween)) {
- changed = true;
- }
- }
- } else if (mode === 5) {
- break;
- }
- }
- return changed;
- }
- //NOTE: Add 0.0000000001 to overcome floating point errors that can cause the startTime to be VERY slightly off (when a tween's time() is set for example)
- var startTime = tween._startTime + _tinyNum,
- overlaps = [],
- oCount = 0,
- zeroDur = (tween._duration === 0),
- globalStart;
- i = siblings.length;
- while (--i > -1) {
- if ((curTween = siblings[i]) === tween || curTween._gc || curTween._paused) {
- //ignore
- } else if (curTween._timeline !== tween._timeline) {
- globalStart = globalStart || _checkOverlap(tween, 0, zeroDur);
- if (_checkOverlap(curTween, globalStart, zeroDur) === 0) {
- overlaps[oCount++] = curTween;
- }
- } else if (curTween._startTime <= startTime) if (curTween._startTime + curTween.totalDuration() / curTween._timeScale > startTime) if (!((zeroDur || !curTween._initted) && startTime - curTween._startTime <= 0.0000000002)) {
- overlaps[oCount++] = curTween;
- }
- }
-
- i = oCount;
- while (--i > -1) {
- curTween = overlaps[i];
- if (mode === 2) if (curTween._kill(props, target, tween)) {
- changed = true;
- }
- if (mode !== 2 || (!curTween._firstPT && curTween._initted)) {
- if (mode !== 2 && !_onOverwrite(curTween, tween)) {
- continue;
- }
- if (curTween._enabled(false, false)) { //if all property tweens have been overwritten, kill the tween.
- changed = true;
- }
- }
- }
- return changed;
- },
- _checkOverlap = function(tween, reference, zeroDur) {
- var tl = tween._timeline,
- ts = tl._timeScale,
- t = tween._startTime;
- while (tl._timeline) {
- t += tl._startTime;
- ts *= tl._timeScale;
- if (tl._paused) {
- return -100;
- }
- tl = tl._timeline;
- }
- t /= ts;
- return (t > reference) ? t - reference : ((zeroDur && t === reference) || (!tween._initted && t - reference < 2 * _tinyNum)) ? _tinyNum : ((t += tween.totalDuration() / tween._timeScale / ts) > reference + _tinyNum) ? 0 : t - reference - _tinyNum;
- };
-
-
- //---- TweenLite instance methods -----------------------------------------------------------------------------
-
- p._init = function() {
- var v = this.vars,
- op = this._overwrittenProps,
- dur = this._duration,
- immediate = !!v.immediateRender,
- ease = v.ease,
- i, initPlugins, pt, p, startVars;
- if (v.startAt) {
- if (this._startAt) {
- this._startAt.render(-1, true); //if we've run a startAt previously (when the tween instantiated), we should revert it so that the values re-instantiate correctly particularly for relative tweens. Without this, a TweenLite.fromTo(obj, 1, {x:"+=100"}, {x:"-=100"}), for example, would actually jump to +=200 because the startAt would run twice, doubling the relative change.
- this._startAt.kill();
- }
- startVars = {};
- for (p in v.startAt) { //copy the properties/values into a new object to avoid collisions, like var to = {x:0}, from = {x:500}; timeline.fromTo(e, 1, from, to).fromTo(e, 1, to, from);
- startVars[p] = v.startAt[p];
- }
- startVars.overwrite = false;
- startVars.immediateRender = true;
- startVars.lazy = (immediate && v.lazy !== false);
- startVars.startAt = startVars.delay = null; //no nesting of startAt objects allowed (otherwise it could cause an infinite loop).
- this._startAt = TweenLite.to(this.target, 0, startVars);
- if (immediate) {
- if (this._time > 0) {
- this._startAt = null; //tweens that render immediately (like most from() and fromTo() tweens) shouldn't revert when their parent timeline's playhead goes backward past the startTime because the initial render could have happened anytime and it shouldn't be directly correlated to this tween's startTime. Imagine setting up a complex animation where the beginning states of various objects are rendered immediately but the tween doesn't happen for quite some time - if we revert to the starting values as soon as the playhead goes backward past the tween's startTime, it will throw things off visually. Reversion should only happen in TimelineLite/Max instances where immediateRender was false (which is the default in the convenience methods like from()).
- } else if (dur !== 0) {
- return; //we skip initialization here so that overwriting doesn't occur until the tween actually begins. Otherwise, if you create several immediateRender:true tweens of the same target/properties to drop into a TimelineLite or TimelineMax, the last one created would overwrite the first ones because they didn't get placed into the timeline yet before the first render occurs and kicks in overwriting.
- }
- }
- } else if (v.runBackwards && dur !== 0) {
- //from() tweens must be handled uniquely: their beginning values must be rendered but we don't want overwriting to occur yet (when time is still 0). Wait until the tween actually begins before doing all the routines like overwriting. At that time, we should render at the END of the tween to ensure that things initialize correctly (remember, from() tweens go backwards)
- if (this._startAt) {
- this._startAt.render(-1, true);
- this._startAt.kill();
- this._startAt = null;
- } else {
- if (this._time !== 0) { //in rare cases (like if a from() tween runs and then is invalidate()-ed), immediateRender could be true but the initial forced-render gets skipped, so there's no need to force the render in this context when the _time is greater than 0
- immediate = false;
- }
- pt = {};
- for (p in v) { //copy props into a new object and skip any reserved props, otherwise onComplete or onUpdate or onStart could fire. We should, however, permit autoCSS to go through.
- if (!_reservedProps[p] || p === "autoCSS") {
- pt[p] = v[p];
- }
- }
- pt.overwrite = 0;
- pt.data = "isFromStart"; //we tag the tween with as "isFromStart" so that if [inside a plugin] we need to only do something at the very END of a tween, we have a way of identifying this tween as merely the one that's setting the beginning values for a "from()" tween. For example, clearProps in CSSPlugin should only get applied at the very END of a tween and without this tag, from(...{height:100, clearProps:"height", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in.
- pt.lazy = (immediate && v.lazy !== false);
- pt.immediateRender = immediate; //zero-duration tweens render immediately by default, but if we're not specifically instructed to render this tween immediately, we should skip this and merely _init() to record the starting values (rendering them immediately would push them to completion which is wasteful in that case - we'd have to render(-1) immediately after)
- this._startAt = TweenLite.to(this.target, 0, pt);
- if (!immediate) {
- this._startAt._init(); //ensures that the initial values are recorded
- this._startAt._enabled(false); //no need to have the tween render on the next cycle. Disable it because we'll always manually control the renders of the _startAt tween.
- if (this.vars.immediateRender) {
- this._startAt = null;
- }
- } else if (this._time === 0) {
- return;
- }
- }
- }
- this._ease = ease = (!ease) ? TweenLite.defaultEase : (ease instanceof Ease) ? ease : (typeof(ease) === "function") ? new Ease(ease, v.easeParams) : _easeMap[ease] || TweenLite.defaultEase;
- if (v.easeParams instanceof Array && ease.config) {
- this._ease = ease.config.apply(ease, v.easeParams);
- }
- this._easeType = this._ease._type;
- this._easePower = this._ease._power;
- this._firstPT = null;
-
- if (this._targets) {
- i = this._targets.length;
- while (--i > -1) {
- if ( this._initProps( this._targets[i], (this._propLookup[i] = {}), this._siblings[i], (op ? op[i] : null)) ) {
- initPlugins = true;
- }
- }
- } else {
- initPlugins = this._initProps(this.target, this._propLookup, this._siblings, op);
- }
-
- if (initPlugins) {
- TweenLite._onPluginEvent("_onInitAllProps", this); //reorders the array in order of priority. Uses a static TweenPlugin method in order to minimize file size in TweenLite
- }
- if (op) if (!this._firstPT) if (typeof(this.target) !== "function") { //if all tweening properties have been overwritten, kill the tween. If the target is a function, it's probably a delayedCall so let it live.
- this._enabled(false, false);
- }
- if (v.runBackwards) {
- pt = this._firstPT;
- while (pt) {
- pt.s += pt.c;
- pt.c = -pt.c;
- pt = pt._next;
- }
- }
- this._onUpdate = v.onUpdate;
- this._initted = true;
- };
-
- p._initProps = function(target, propLookup, siblings, overwrittenProps) {
- var p, i, initPlugins, plugin, pt, v;
- if (target == null) {
- return false;
- }
-
- if (_lazyLookup[target._gsTweenID]) {
- _lazyRender(); //if other tweens of the same target have recently initted but haven't rendered yet, we've got to force the render so that the starting values are correct (imagine populating a timeline with a bunch of sequential tweens and then jumping to the end)
- }
-
- if (!this.vars.css) if (target.style) if (target !== window && target.nodeType) if (_plugins.css) if (this.vars.autoCSS !== false) { //it's so common to use TweenLite/Max to animate the css of DOM elements, we assume that if the target is a DOM element, that's what is intended (a convenience so that users don't have to wrap things in css:{}, although we still recommend it for a slight performance boost and better specificity). Note: we cannot check "nodeType" on the window inside an iframe.
- _autoCSS(this.vars, target);
- }
- for (p in this.vars) {
- v = this.vars[p];
- if (_reservedProps[p]) {
- if (v) if ((v instanceof Array) || (v.push && _isArray(v))) if (v.join("").indexOf("{self}") !== -1) {
- this.vars[p] = v = this._swapSelfInParams(v, this);
- }
-
- } else if (_plugins[p] && (plugin = new _plugins[p]())._onInitTween(target, this.vars[p], this)) {
-
- //t - target [object]
- //p - property [string]
- //s - start [number]
- //c - change [number]
- //f - isFunction [boolean]
- //n - name [string]
- //pg - isPlugin [boolean]
- //pr - priority [number]
- this._firstPT = pt = {_next:this._firstPT, t:plugin, p:"setRatio", s:0, c:1, f:1, n:p, pg:1, pr:plugin._priority};
- i = plugin._overwriteProps.length;
- while (--i > -1) {
- propLookup[plugin._overwriteProps[i]] = this._firstPT;
- }
- if (plugin._priority || plugin._onInitAllProps) {
- initPlugins = true;
- }
- if (plugin._onDisable || plugin._onEnable) {
- this._notifyPluginsOfEnabled = true;
- }
- if (pt._next) {
- pt._next._prev = pt;
- }
-
- } else {
- propLookup[p] = _addPropTween.call(this, target, p, "get", v, p, 0, null, this.vars.stringFilter);
- }
- }
-
- if (overwrittenProps) if (this._kill(overwrittenProps, target)) { //another tween may have tried to overwrite properties of this tween before init() was called (like if two tweens start at the same time, the one created second will run first)
- return this._initProps(target, propLookup, siblings, overwrittenProps);
- }
- if (this._overwrite > 1) if (this._firstPT) if (siblings.length > 1) if (_applyOverwrite(target, this, propLookup, this._overwrite, siblings)) {
- this._kill(propLookup, target);
- return this._initProps(target, propLookup, siblings, overwrittenProps);
- }
- if (this._firstPT) if ((this.vars.lazy !== false && this._duration) || (this.vars.lazy && !this._duration)) { //zero duration tweens don't lazy render by default; everything else does.
- _lazyLookup[target._gsTweenID] = true;
- }
- return initPlugins;
- };
-
- p.render = function(time, suppressEvents, force) {
- var prevTime = this._time,
- duration = this._duration,
- prevRawPrevTime = this._rawPrevTime,
- isComplete, callback, pt, rawPrevTime;
- if (time >= duration - 0.0000001) { //to work around occasional floating point math artifacts.
- this._totalTime = this._time = duration;
- this.ratio = this._ease._calcEnd ? this._ease.getRatio(1) : 1;
- if (!this._reversed ) {
- isComplete = true;
- callback = "onComplete";
- force = (force || this._timeline.autoRemoveChildren); //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline.
- }
- if (duration === 0) if (this._initted || !this.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.
- if (this._startTime === this._timeline._duration) { //if a zero-duration tween is at the VERY end of a timeline and that timeline renders at its end, it will typically add a tiny bit of cushion to the render time to prevent rounding errors from getting in the way of tweens rendering their VERY end. If we then reverse() that timeline, the zero-duration tween will trigger its onReverseComplete even though technically the playhead didn't pass over it again. It's a very specific edge case we must accommodate.
- time = 0;
- }
- if (prevRawPrevTime < 0 || (time <= 0 && time >= -0.0000001) || (prevRawPrevTime === _tinyNum && this.data !== "isPause")) if (prevRawPrevTime !== time) { //note: when this.data is "isPause", it's a callback added by addPause() on a timeline that we should not be triggered when LEAVING its exact start time. In other words, tl.addPause(1).play(1) shouldn't pause.
- force = true;
- if (prevRawPrevTime > _tinyNum) {
- callback = "onReverseComplete";
- }
- }
- this._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.
- }
-
- } else if (time < 0.0000001) { //to work around occasional floating point math artifacts, round super small values to 0.
- this._totalTime = this._time = 0;
- this.ratio = this._ease._calcEnd ? this._ease.getRatio(0) : 0;
- if (prevTime !== 0 || (duration === 0 && prevRawPrevTime > 0)) {
- callback = "onReverseComplete";
- isComplete = this._reversed;
- }
- if (time < 0) {
- this._active = false;
- if (duration === 0) if (this._initted || !this.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.
- if (prevRawPrevTime >= 0 && !(prevRawPrevTime === _tinyNum && this.data === "isPause")) {
- force = true;
- }
- this._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.
- }
- }
- if (!this._initted) { //if we render the very beginning (time == 0) of a fromTo(), we must force the render (normal tweens wouldn't need to render at a time of 0 when the prevTime was also 0). This is also mandatory to make sure overwriting kicks in immediately.
- force = true;
- }
- } else {
- this._totalTime = this._time = time;
-
- if (this._easeType) {
- var r = time / duration, type = this._easeType, pow = this._easePower;
- if (type === 1 || (type === 3 && r >= 0.5)) {
- r = 1 - r;
- }
- if (type === 3) {
- r *= 2;
- }
- if (pow === 1) {
- r *= r;
- } else if (pow === 2) {
- r *= r * r;
- } else if (pow === 3) {
- r *= r * r * r;
- } else if (pow === 4) {
- r *= r * r * r * r;
- }
-
- if (type === 1) {
- this.ratio = 1 - r;
- } else if (type === 2) {
- this.ratio = r;
- } else if (time / duration < 0.5) {
- this.ratio = r / 2;
- } else {
- this.ratio = 1 - (r / 2);
- }
-
- } else {
- this.ratio = this._ease.getRatio(time / duration);
- }
- }
-
- if (this._time === prevTime && !force) {
- return;
- } else if (!this._initted) {
- this._init();
- if (!this._initted || this._gc) { //immediateRender tweens typically won't initialize until the playhead advances (_time is greater than 0) in order to ensure that overwriting occurs properly. Also, if all of the tweening properties have been overwritten (which would cause _gc to be true, as set in _init()), we shouldn't continue otherwise an onStart callback could be called for example.
- return;
- } else if (!force && this._firstPT && ((this.vars.lazy !== false && this._duration) || (this.vars.lazy && !this._duration))) {
- this._time = this._totalTime = prevTime;
- this._rawPrevTime = prevRawPrevTime;
- _lazyTweens.push(this);
- this._lazy = [time, suppressEvents];
- return;
- }
- //_ease is initially set to defaultEase, so now that init() has run, _ease is set properly and we need to recalculate the ratio. Overall this is faster than using conditional logic earlier in the method to avoid having to set ratio twice because we only init() once but renderTime() gets called VERY frequently.
- if (this._time && !isComplete) {
- this.ratio = this._ease.getRatio(this._time / duration);
- } else if (isComplete && this._ease._calcEnd) {
- this.ratio = this._ease.getRatio((this._time === 0) ? 0 : 1);
- }
- }
- if (this._lazy !== false) { //in case a lazy render is pending, we should flush it because the new render is occurring now (imagine a lazy tween instantiating and then immediately the user calls tween.seek(tween.duration()), skipping to the end - the end render would be forced, and then if we didn't flush the lazy render, it'd fire AFTER the seek(), rendering it at the wrong time.
- this._lazy = false;
- }
- if (!this._active) if (!this._paused && this._time !== prevTime && time >= 0) {
- this._active = true; //so that if the user renders a tween (as opposed to the timeline rendering it), the timeline is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the tween already finished but the user manually re-renders it as halfway done.
- }
- if (prevTime === 0) {
- if (this._startAt) {
- if (time >= 0) {
- this._startAt.render(time, suppressEvents, force);
- } else if (!callback) {
- callback = "_dummyGS"; //if no callback is defined, use a dummy value just so that the condition at the end evaluates as true because _startAt should render AFTER the normal render loop when the time is negative. We could handle this in a more intuitive way, of course, but the render loop is the MOST important thing to optimize, so this technique allows us to avoid adding extra conditional logic in a high-frequency area.
- }
- }
- if (this.vars.onStart) if (this._time !== 0 || duration === 0) if (!suppressEvents) {
- this._callback("onStart");
- }
- }
- pt = this._firstPT;
- while (pt) {
- if (pt.f) {
- pt.t[pt.p](pt.c * this.ratio + pt.s);
- } else {
- pt.t[pt.p] = pt.c * this.ratio + pt.s;
- }
- pt = pt._next;
- }
-
- if (this._onUpdate) {
- if (time < 0) if (this._startAt && time !== -0.0001) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values.
- this._startAt.render(time, suppressEvents, force); //note: for performance reasons, we tuck this conditional logic inside less traveled areas (most tweens don't have an onUpdate). We'd just have it at the end before the onComplete, but the values should be updated before any onUpdate is called, so we ALSO put it here and then if it's not called, we do so later near the onComplete.
- }
- if (!suppressEvents) if (this._time !== prevTime || isComplete || force) {
- this._callback("onUpdate");
- }
- }
- if (callback) if (!this._gc || force) { //check _gc because there's a chance that kill() could be called in an onUpdate
- if (time < 0 && this._startAt && !this._onUpdate && time !== -0.0001) { //-0.0001 is a special value that we use when looping back to the beginning of a repeated TimelineMax, in which case we shouldn't render the _startAt values.
- this._startAt.render(time, suppressEvents, force);
- }
- if (isComplete) {
- if (this._timeline.autoRemoveChildren) {
- this._enabled(false, false);
- }
- this._active = false;
- }
- if (!suppressEvents && this.vars[callback]) {
- this._callback(callback);
- }
- if (duration === 0 && this._rawPrevTime === _tinyNum && rawPrevTime !== _tinyNum) { //the onComplete or onReverseComplete could trigger movement of the playhead and for zero-duration tweens (which must discern direction) that land directly back on their start time, we don't want to fire again on the next render. Think of several addPause()'s in a timeline that forces the playhead to a certain spot, but what if it's already paused and another tween is tweening the "time" of the timeline? Each time it moves [forward] past that spot, it would move back, and since suppressEvents is true, it'd reset _rawPrevTime to _tinyNum so that when it begins again, the callback would fire (so ultimately it could bounce back and forth during that tween). Again, this is a very uncommon scenario, but possible nonetheless.
- this._rawPrevTime = 0;
- }
- }
- };
-
- p._kill = function(vars, target, overwritingTween) {
- if (vars === "all") {
- vars = null;
- }
- if (vars == null) if (target == null || target === this.target) {
- this._lazy = false;
- return this._enabled(false, false);
- }
- target = (typeof(target) !== "string") ? (target || this._targets || this.target) : TweenLite.selector(target) || target;
- var simultaneousOverwrite = (overwritingTween && this._time && overwritingTween._startTime === this._startTime && this._timeline === overwritingTween._timeline),
- i, overwrittenProps, p, pt, propLookup, changed, killProps, record, killed;
- if ((_isArray(target) || _isSelector(target)) && typeof(target[0]) !== "number") {
- i = target.length;
- while (--i > -1) {
- if (this._kill(vars, target[i], overwritingTween)) {
- changed = true;
- }
- }
- } else {
- if (this._targets) {
- i = this._targets.length;
- while (--i > -1) {
- if (target === this._targets[i]) {
- propLookup = this._propLookup[i] || {};
- this._overwrittenProps = this._overwrittenProps || [];
- overwrittenProps = this._overwrittenProps[i] = vars ? this._overwrittenProps[i] || {} : "all";
- break;
- }
- }
- } else if (target !== this.target) {
- return false;
- } else {
- propLookup = this._propLookup;
- overwrittenProps = this._overwrittenProps = vars ? this._overwrittenProps || {} : "all";
- }
-
- if (propLookup) {
- killProps = vars || propLookup;
- record = (vars !== overwrittenProps && overwrittenProps !== "all" && vars !== propLookup && (typeof(vars) !== "object" || !vars._tempKill)); //_tempKill is a super-secret way to delete a particular tweening property but NOT have it remembered as an official overwritten property (like in BezierPlugin)
- if (overwritingTween && (TweenLite.onOverwrite || this.vars.onOverwrite)) {
- for (p in killProps) {
- if (propLookup[p]) {
- if (!killed) {
- killed = [];
- }
- killed.push(p);
- }
- }
- if ((killed || !vars) && !_onOverwrite(this, overwritingTween, target, killed)) { //if the onOverwrite returned false, that means the user wants to override the overwriting (cancel it).
- return false;
- }
- }
-
- for (p in killProps) {
- if ((pt = propLookup[p])) {
- if (simultaneousOverwrite) { //if another tween overwrites this one and they both start at exactly the same time, yet this tween has already rendered once (for example, at 0.001) because it's first in the queue, we should revert the values to where they were at 0 so that the starting values aren't contaminated on the overwriting tween.
- if (pt.f) {
- pt.t[pt.p](pt.s);
- } else {
- pt.t[pt.p] = pt.s;
- }
- changed = true;
- }
- if (pt.pg && pt.t._kill(killProps)) {
- changed = true; //some plugins need to be notified so they can perform cleanup tasks first
- }
- if (!pt.pg || pt.t._overwriteProps.length === 0) {
- if (pt._prev) {
- pt._prev._next = pt._next;
- } else if (pt === this._firstPT) {
- this._firstPT = pt._next;
- }
- if (pt._next) {
- pt._next._prev = pt._prev;
- }
- pt._next = pt._prev = null;
- }
- delete propLookup[p];
- }
- if (record) {
- overwrittenProps[p] = 1;
- }
- }
- if (!this._firstPT && this._initted) { //if all tweening properties are killed, kill the tween. Without this line, if there's a tween with multiple targets and then you killTweensOf() each target individually, the tween would technically still remain active and fire its onComplete even though there aren't any more properties tweening.
- this._enabled(false, false);
- }
- }
- }
- return changed;
- };
-
- p.invalidate = function() {
- if (this._notifyPluginsOfEnabled) {
- TweenLite._onPluginEvent("_onDisable", this);
- }
- this._firstPT = this._overwrittenProps = this._startAt = this._onUpdate = null;
- this._notifyPluginsOfEnabled = this._active = this._lazy = false;
- this._propLookup = (this._targets) ? {} : [];
- Animation.prototype.invalidate.call(this);
- if (this.vars.immediateRender) {
- this._time = -_tinyNum; //forces a render without having to set the render() "force" parameter to true because we want to allow lazying by default (using the "force" parameter always forces an immediate full render)
- this.render(Math.min(0, -this._delay)); //in case delay is negative.
- }
- return this;
- };
-
- p._enabled = function(enabled, ignoreTimeline) {
- if (!_tickerActive) {
- _ticker.wake();
- }
- if (enabled && this._gc) {
- var targets = this._targets,
- i;
- if (targets) {
- i = targets.length;
- while (--i > -1) {
- this._siblings[i] = _register(targets[i], this, true);
- }
- } else {
- this._siblings = _register(this.target, this, true);
- }
- }
- Animation.prototype._enabled.call(this, enabled, ignoreTimeline);
- if (this._notifyPluginsOfEnabled) if (this._firstPT) {
- return TweenLite._onPluginEvent((enabled ? "_onEnable" : "_onDisable"), this);
- }
- return false;
- };
-
-
- //----TweenLite static methods -----------------------------------------------------
-
- TweenLite.to = function(target, duration, vars) {
- return new TweenLite(target, duration, vars);
- };
-
- TweenLite.from = function(target, duration, vars) {
- vars.runBackwards = true;
- vars.immediateRender = (vars.immediateRender != false);
- return new TweenLite(target, duration, vars);
- };
-
- TweenLite.fromTo = function(target, duration, fromVars, toVars) {
- toVars.startAt = fromVars;
- toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false);
- return new TweenLite(target, duration, toVars);
- };
-
- TweenLite.delayedCall = function(delay, callback, params, scope, useFrames) {
- return new TweenLite(callback, 0, {delay:delay, onComplete:callback, onCompleteParams:params, callbackScope:scope, onReverseComplete:callback, onReverseCompleteParams:params, immediateRender:false, lazy:false, useFrames:useFrames, overwrite:0});
- };
-
- TweenLite.set = function(target, vars) {
- return new TweenLite(target, 0, vars);
- };
-
- TweenLite.getTweensOf = function(target, onlyActive) {
- if (target == null) { return []; }
- target = (typeof(target) !== "string") ? target : TweenLite.selector(target) || target;
- var i, a, j, t;
- if ((_isArray(target) || _isSelector(target)) && typeof(target[0]) !== "number") {
- i = target.length;
- a = [];
- while (--i > -1) {
- a = a.concat(TweenLite.getTweensOf(target[i], onlyActive));
- }
- i = a.length;
- //now get rid of any duplicates (tweens of arrays of objects could cause duplicates)
- while (--i > -1) {
- t = a[i];
- j = i;
- while (--j > -1) {
- if (t === a[j]) {
- a.splice(i, 1);
- }
- }
- }
- } else {
- a = _register(target).concat();
- i = a.length;
- while (--i > -1) {
- if (a[i]._gc || (onlyActive && !a[i].isActive())) {
- a.splice(i, 1);
- }
- }
- }
- return a;
- };
-
- TweenLite.killTweensOf = TweenLite.killDelayedCallsTo = function(target, onlyActive, vars) {
- if (typeof(onlyActive) === "object") {
- vars = onlyActive; //for backwards compatibility (before "onlyActive" parameter was inserted)
- onlyActive = false;
- }
- var a = TweenLite.getTweensOf(target, onlyActive),
- i = a.length;
- while (--i > -1) {
- a[i]._kill(vars, target);
- }
- };
-
-
-
- /*
- * ----------------------------------------------------------------
- * TweenPlugin (could easily be split out as a separate file/class, but included for ease of use (so that people don't need to include another script call before loading plugins which is easy to forget)
- * ----------------------------------------------------------------
- */
- var TweenPlugin = _class("plugins.TweenPlugin", function(props, priority) {
- this._overwriteProps = (props || "").split(",");
- this._propName = this._overwriteProps[0];
- this._priority = priority || 0;
- this._super = TweenPlugin.prototype;
- }, true);
-
- p = TweenPlugin.prototype;
- TweenPlugin.version = "1.18.0";
- TweenPlugin.API = 2;
- p._firstPT = null;
- p._addTween = _addPropTween;
- p.setRatio = _setRatio;
-
- p._kill = function(lookup) {
- var a = this._overwriteProps,
- pt = this._firstPT,
- i;
- if (lookup[this._propName] != null) {
- this._overwriteProps = [];
- } else {
- i = a.length;
- while (--i > -1) {
- if (lookup[a[i]] != null) {
- a.splice(i, 1);
- }
- }
- }
- while (pt) {
- if (lookup[pt.n] != null) {
- if (pt._next) {
- pt._next._prev = pt._prev;
- }
- if (pt._prev) {
- pt._prev._next = pt._next;
- pt._prev = null;
- } else if (this._firstPT === pt) {
- this._firstPT = pt._next;
- }
- }
- pt = pt._next;
- }
- return false;
- };
-
- p._roundProps = function(lookup, value) {
- var pt = this._firstPT;
- while (pt) {
- if (lookup[this._propName] || (pt.n != null && lookup[ pt.n.split(this._propName + "_").join("") ])) { //some properties that are very plugin-specific add a prefix named after the _propName plus an underscore, so we need to ignore that extra stuff here.
- pt.r = value;
- }
- pt = pt._next;
- }
- };
-
- TweenLite._onPluginEvent = function(type, tween) {
- var pt = tween._firstPT,
- changed, pt2, first, last, next;
- if (type === "_onInitAllProps") {
- //sorts the PropTween linked list in order of priority because some plugins need to render earlier/later than others, like MotionBlurPlugin applies its effects after all x/y/alpha tweens have rendered on each frame.
- while (pt) {
- next = pt._next;
- pt2 = first;
- while (pt2 && pt2.pr > pt.pr) {
- pt2 = pt2._next;
- }
- if ((pt._prev = pt2 ? pt2._prev : last)) {
- pt._prev._next = pt;
- } else {
- first = pt;
- }
- if ((pt._next = pt2)) {
- pt2._prev = pt;
- } else {
- last = pt;
- }
- pt = next;
- }
- pt = tween._firstPT = first;
- }
- while (pt) {
- if (pt.pg) if (typeof(pt.t[type]) === "function") if (pt.t[type]()) {
- changed = true;
- }
- pt = pt._next;
- }
- return changed;
- };
-
- TweenPlugin.activate = function(plugins) {
- var i = plugins.length;
- while (--i > -1) {
- if (plugins[i].API === TweenPlugin.API) {
- _plugins[(new plugins[i]())._propName] = plugins[i];
- }
- }
- return true;
- };
-
- //provides a more concise way to define plugins that have no dependencies besides TweenPlugin and TweenLite, wrapping common boilerplate stuff into one function (added in 1.9.0). You don't NEED to use this to define a plugin - the old way still works and can be useful in certain (rare) situations.
- _gsDefine.plugin = function(config) {
- if (!config || !config.propName || !config.init || !config.API) { throw "illegal plugin definition."; }
- var propName = config.propName,
- priority = config.priority || 0,
- overwriteProps = config.overwriteProps,
- map = {init:"_onInitTween", set:"setRatio", kill:"_kill", round:"_roundProps", initAll:"_onInitAllProps"},
- Plugin = _class("plugins." + propName.charAt(0).toUpperCase() + propName.substr(1) + "Plugin",
- function() {
- TweenPlugin.call(this, propName, priority);
- this._overwriteProps = overwriteProps || [];
- }, (config.global === true)),
- p = Plugin.prototype = new TweenPlugin(propName),
- prop;
- p.constructor = Plugin;
- Plugin.API = config.API;
- for (prop in map) {
- if (typeof(config[prop]) === "function") {
- p[map[prop]] = config[prop];
- }
- }
- Plugin.version = config.version;
- TweenPlugin.activate([Plugin]);
- return Plugin;
- };
-
-
- //now run through all the dependencies discovered and if any are missing, log that to the console as a warning. This is why it's best to have TweenLite load last - it can check all the dependencies for you.
- a = window._gsQueue;
- if (a) {
- for (i = 0; i < a.length; i++) {
- a[i]();
- }
- for (p in _defLookup) {
- if (!_defLookup[p].func) {
- window.console.log("GSAP encountered missing dependency: com.greensock." + p);
- }
- }
- }
-
- _tickerActive = false; //ensures that the first official animation forces a ticker.tick() to update the time when it is instantiated
-
- })((typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window, "TweenMax");
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
-
-/***/ },
-/* 16 */
-/***/ function(module, exports) {
-
- /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {module.exports = __webpack_amd_options__;
-
- /* WEBPACK VAR INJECTION */}.call(exports, {}))
-
-/***/ }
-/******/ ]);
-//# sourceMappingURL=water.js.map
diff --git a/app/themes/base/static/src/sass/config/_colors.scss b/app/themes/base/static/src/sass/config/_colors.scss
deleted file mode 100755
index 628e9d84..00000000
--- a/app/themes/base/static/src/sass/config/_colors.scss
+++ /dev/null
@@ -1,40 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$color-facebook: #306199;
-$color-linkedin: #007bb6;
-$color-twitter: #26c4f1;
-$color-googleplus: #e93f2e;
-$color-tumblr: #32506d;
-$color-pinterest: #b81621;
-$color-instagram: #517fa4;
-$color-vine: #00bf8f;
-$color-soundcloud: #f50;
-$color-vimeo: #4bf;
-$color-youtube: #bb0000;
-
-$color-white: #FFFFFF;
-$color-main: #50E3C2;
-$color-gray: #C3C3C3;
-$color-black: #1D1D1B;
-$color-black-light: #343432;
-
-$color-background: #000F24;
-$color-accent: #FF203C;
diff --git a/app/themes/base/static/src/sass/config/_config.scss b/app/themes/base/static/src/sass/config/_config.scss
deleted file mode 100644
index 665b2f32..00000000
--- a/app/themes/base/static/src/sass/config/_config.scss
+++ /dev/null
@@ -1,39 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-// Layout
-
-$header-pre-height: 34px;
-$header-height: 45px;
-$header-height-tablet: 70px;
-$header-height-mobile: 70px;
-$sidenav-width-tablet: 450px;
-$sidenav-width-mobile: 300px;
-
-// Home
-
-$home-slider-height: 760px;
-
-// Brief box
-
-$brief-box-background: #5F5F5E;
-$brief-box-background-head: #868686;
-$brief-box-color-head: #000000;
-$brief-box-color: #FFFFFF;
diff --git a/app/themes/base/static/src/sass/config/_fonts.scss b/app/themes/base/static/src/sass/config/_fonts.scss
deleted file mode 100755
index 1c5010d2..00000000
--- a/app/themes/base/static/src/sass/config/_fonts.scss
+++ /dev/null
@@ -1,20 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
diff --git a/app/themes/base/static/src/sass/config/_variables.scss b/app/themes/base/static/src/sass/config/_variables.scss
deleted file mode 100755
index 3fb86468..00000000
--- a/app/themes/base/static/src/sass/config/_variables.scss
+++ /dev/null
@@ -1,113 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-// Features
-$use-grid-pull: true;
-$use-grid-push: true;
-$use-grid-offset: true;
-$use-responsive-grid: true;
-
-// Grid system
-
-$breakpoints: (
- xxs: 0px,
- xs: 752px,
- sm: 972px,
- md: 1172px,
- lg: 1440px
-);
-
-$grid-columns: 16;
-$grid-gutter: 20px;
-$grid-container-prefix: 'container';
-$grid-row-prefix: 'row';
-$grid-col-prefix: 'col';
-$grid-unresponsive-width: 960px;
-
-// Typography
-
-$base-font-size: 16px;
-
-$body-bg-color: #fff;
-$main-text-color: #000;
-$links-color: $main-text-color;
-
-$primary-font-family: Helvetica, Arial, sans-serif;
-$headings-font-family: $primary-font-family;
-
-// Typey
-
-$sans-serif: 'Oswald', sans-serif;
-$serif: 'Merriweather', serif;
-
-$base-font-size: 16px;
-$base-line-height: 24px;
-$base-unit: rem;
-
-$font-size: (
- xxxl: 42px,
- xxl: 30px,
- xl: 25px,
- l: 20px,
- m: 16px,
- s: 14px,
- xs: 12px
-);
-
-$font-weight: (
- heavy: 900,
- bold: 700,
- regular: 400,
- light: 300
-);
-
-$typefaces: (
- sans-serif: (
- font-family: $sans-serif,
- ),
- serif: (
- font-family: $serif,
- )
-);
-
-$typestyles: (
- heading-1: (
- font-size: xxxl,
- line-height: 2,
- weight: bold
- ),
- heading-2: (
- font-size: xxl,
- line-height: 1.5,
- weight: regular
- ),
- heading-3: (
- font-size: m,
- line-height: 1.5,
- weight: bold
- )
-);
-
-$typey-debug: false;
-$typey-debug-color: #D9B29C;
-
-// Mq
-
-$mq-breakpoints: $breakpoints;
diff --git a/app/themes/base/static/src/sass/global/_buttons.scss b/app/themes/base/static/src/sass/global/_buttons.scss
deleted file mode 100755
index 896a45d4..00000000
--- a/app/themes/base/static/src/sass/global/_buttons.scss
+++ /dev/null
@@ -1,132 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".button";
-
-#{$module} {
-
- border: 0;
- outline: 0;
- background: none;
- box-sizing: border-box;
- @include margin(0 .5 0 0);
-
- @include font-size(l);
- @include line-height(1);
- @include typeface(sans-serif);
- @include padding(.25 1 .25 1);
- //@include margin(0);
- font-weight: weight(light);
-
- background: $color-main;
- color: $color-black;
- display: inline-block;
- vertical-align: middle;
- cursor: pointer;
-
- @include transition(all 0.25s ease-in-out);
-
- i {
- @include margin-right(.25);
- }
-
- &:hover {
- background: $color-black;
- color: white;
- a {
- color: white;
- }
- }
-
- &--black {
-
- background-color: $color-black;
- color: white;
-
- &:hover {
- background-color: $color-main;
- color: $color-black;
- }
-
- }
-
- &--white {
-
- background-color: white;
- color: $color-black;
- border: 1px solid $color-black;
-
- &:hover {
- background-color: $color-black;
- color: white;
- }
-
- }
-
- &--accent {
-
- background-color: $color-accent;
- color: white;
- border: 1px solid $color-accent;
-
- &:hover {
- background-color: white;
- color: $color-accent;
- border: 1px solid white;
- }
-
- }
-
- &--small {
- @include font-size(m);
- @include padding(.18 1);
- }
-
- &--xsmall {
- @include font-size(s);
- @include padding(.125 0.5);
- }
-
- &--block {
- display: block;
- text-align: center;
-
- @include margin(0 0 1 0);
- }
-
- &--tournees {
-
- color: white;
- @include line-height(1);
- @include padding(.25 .5 .25 .5);
- background: $color-black;
- text-transform: uppercase;
- font-weight: weight(regular);
- border: 1px solid $color-black;
-
- &:hover {
- background-color: $color-main;
- color: $color-black;
- border: 1px solid $color-main;
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/global/_defaults.scss b/app/themes/base/static/src/sass/global/_defaults.scss
deleted file mode 100755
index 88a43682..00000000
--- a/app/themes/base/static/src/sass/global/_defaults.scss
+++ /dev/null
@@ -1,46 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-html {
- @include define-type-sizing;
-}
-
-html, body {
- @include box-sizing(border-box);
- margin: 0;
- padding: 0;
-}
-
-*,
-*:before,
-*:after {
- @include box-sizing(inherit);
-}
-
-a {
- outline: none;
- color: $links-color;
- text-decoration: inherit;
-}
-
-img {
- max-width: 100%;
- height: auto;
-}
diff --git a/app/themes/base/static/src/sass/global/_forms.scss b/app/themes/base/static/src/sass/global/_forms.scss
deleted file mode 100644
index 63727f06..00000000
--- a/app/themes/base/static/src/sass/global/_forms.scss
+++ /dev/null
@@ -1,171 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".form";
-
-
-#{$module} {
-
- p {
- @include margin(0);
- }
-
- .form-group {
- @include margin-bottom(.5);
-
- ul {
- list-style-type: none;
- clear: both;
- padding: 0;
- }
- }
-
- input[type="submit"] {
- @extend .button;
- width: 100%;
- display: inline-block;
- }
-
- label {
- text-align: left;
- display: block;
- vertical-align: top;
- float: left;
- width: 80%;
-
- @include padding(0.25 1 0.25 0);
- @include font-size(s);
- @include line-height(1);
- @include typeface(sans-serif);
- font-weight: weight(bold);
- text-transform: uppercase;
-
- @include mq($until: xs) {
-
- }
- }
-
- span.help-block {
- float: right;
- }
-
- .help-block {
- @include font-size(xs);
-
- .has-error & {
- color: $color-accent;
- }
- }
-
- .has-error {
- .help-block, label {
- color: $color-accent;
- }
- input[type="text"], input[type="email"], input[type="password"], input[type="url"], textarea, select {
- border-color: $color-accent;
- }
-
- }
-
- .form-actions {
-
- @include margin-top(4);
-
- }
-
- input[type="text"], input[type="email"], input[type="password"], input[type="url"], textarea {
-
- @include font-size(m);
- @include line-height(1);
- @include padding(.25 .25);
- display: block;
-
- @include transition(all 0.25s ease-in-out);
-
- outline: 0;
- border: 0;
- border-bottom: 1px solid white;
- width: 100%;
- color: white;
-
- background: rgba(#50E3C2, 0.05);
-
- &:focus {
- border-color: $color-main;
- }
-
- @include mq($until: xs) {
- width: 100%;
- }
-
- }
-
- select {
-
- @include font-size(m);
- @include line-height(1);
- @include padding(.25 .25);
-
- width: 100%;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- padding-right: 28px;
- border-radius: 0;
- border: 0;
- border-bottom: 1px solid white;
- outline: 0;
- color: white;
- -webkit-appearance: none;
- background-color: rgba(#50E3C2, 0.05);
- background-image: url('data:image/svg+xml;utf8, ');
- background-position: center right;
- background-repeat: no-repeat;
-
- &:focus {
- border-bottom: 1px solid $color-main;
- background-color: rgba(#50E3C2, 0.05);
- background-image: url('data:image/svg+xml;utf8, ');
- background-position: center right;
- background-repeat: no-repeat;
- }
-
- }
-
- select::-ms-expand {
- display: none;
- }
-
-}
-
-.form-errors {
- list-style-type: none;
- padding: 0;
- margin: 0;
-
- @include margin-bottom(1);
-
- @include font-size(s);
- @include line-height(1);
-
- @include mq($until: xs) {
- padding-left: 0;
- }
-}
diff --git a/app/themes/base/static/src/sass/global/_helpers.scss b/app/themes/base/static/src/sass/global/_helpers.scss
deleted file mode 100755
index 6cb1f951..00000000
--- a/app/themes/base/static/src/sass/global/_helpers.scss
+++ /dev/null
@@ -1,257 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-.m0 {
- @include margin(0);
-}
-.mt0 {
- @include margin-top(0);
-}
-.mb0 {
- @include margin-bottom(0);
-}
-.mr0 {
- @include margin-right(0);
-}
-.m1 {
- @include margin(1);
-}
-.mt1 {
- @include margin-top(1);
-}
-.mb1 {
- @include margin-bottom(1);
-}
-.mr1 {
- @include margin-right(1);
-}
-.ml1 {
- @include margin-left(1);
-}
-.mt2 {
- @include margin-top(2);
-}
-.mb2 {
- @include margin-bottom(2);
-}
-.mr2 {
- @include margin-right(2);
-}
-.ml2 {
- @include margin-left(2);
-}
-.mt3 {
- @include margin-top(3);
-}
-.mb3 {
- @include margin-bottom(3);
-}
-.mr3 {
- @include margin-right(3);
-}
-.ml3 {
- @include margin-left(3);
-}
-.mt4 {
- @include margin-top(4);
-}
-.mb4 {
- @include margin-bottom(4);
-}
-.mr4 {
- @include margin-right(4);
-}
-.ml4 {
- @include margin-left(4);
-}
-.p1 {
- @include padding(1);
-}
-.pt1 {
- @include padding-top(1);
-}
-.pb1 {
- @include padding-bottom(1);
-}
-.pr1 {
- @include padding-right(1);
-}
-.pl1 {
- @include padding-left(1);
-}
-.p2 {
- @include padding(2);
-}
-.pt2 {
- @include padding-top(2);
-}
-.pb2 {
- @include padding-bottom(2);
-}
-.pr2 {
- @include padding-right(2);
-}
-.pl2 {
- @include padding-left(2);
-}
-.bg {
- background-color: $color-main;
-}
-.tal {
- text-align: left;
-}
-@each $size, $width in $breakpoints {
- .tal-#{$size} {
- @include mq($from: $size) {
- text-align: left;
- }
- }
-}
-.tac {
- text-align: center;
-}
-@each $size, $width in $breakpoints {
- .tac-#{$size} {
- @include mq($from: $size) {
- text-align: center;
- }
- }
-}
-.tar {
- text-align: right;
-}
-@each $size, $width in $breakpoints {
- .tar-#{$size} {
- @include mq($from: $size) {
- text-align: right;
- }
- }
-}
-.hide {
- display: none;
-}
-.hide-xxs {
- @include mq($until: xs) {
- display: none;
- }
-}
-.hide-xs {
- @include mq($until: sm) {
- display: none;
- }
-}
-.hide-sm {
- @include mq($until: md) {
- display: none;
- }
-}
-.hide-md {
- @include mq($until: lg) {
- display: none;
- }
-}
-.hide-lg {
- @include mq($from: lg) {
- display: none;
- }
-}
-.ffss {
- @include typeface(sans-serif);
-}
-.ffs {
- @include typeface(serif);
-}
-.fsxxxl {
- @include font-size(xxxl);
- line-height: 3rem !important;
-}
-.fsxxl {
- @include font-size(xxl);
-}
-.fsxl {
- @include font-size(xl);
-}
-.fsl {
- @include font-size(l);
-}
-.fsm {
- @include font-size(m);
-}
-.fss {
- @include font-size(s);
-}
-.fsxs {
- @include font-size(xs);
-}
-.fwl {
- font-weight: weight(light);
-}
-.lh1 {
- @include line-height(1);
-}
-.lh5 {
- @include line-height(1.5);
-}
-.lh2 {
- @include line-height(2);
-}
-.fcl {
- color: white;
-}
-.fcb {
- color: $color-background;
-}
-.unstyled-list {
- list-style-type: none;
- margin: 0;
- padding: 0;
-}
-.white-bg {
- background: white;
-}
-
-//
-// lol helpers
-//
-.hide-from-xs {
- @include mq($from: xs) {
- display: none !important;
- }
-}
-.hide-until-xs {
- @include mq($until: xs) {
- display: none !important;
- }
-}
-.hide-from-sm {
- @include mq($from: sm) {
- display: none !important;
- }
-}
-.hide-until-sm {
- @include mq($until: sm) {
- display: none !important;
- }
-}
-.fsl-until-sm {
- @include mq($until: sm) {
- @include font-size(l);
- }
-}
diff --git a/app/themes/base/static/src/sass/global/_inputs.scss b/app/themes/base/static/src/sass/global/_inputs.scss
deleted file mode 100755
index 1c5010d2..00000000
--- a/app/themes/base/static/src/sass/global/_inputs.scss
+++ /dev/null
@@ -1,20 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
diff --git a/app/themes/base/static/src/sass/global/_tables.scss b/app/themes/base/static/src/sass/global/_tables.scss
deleted file mode 100644
index 1c5010d2..00000000
--- a/app/themes/base/static/src/sass/global/_tables.scss
+++ /dev/null
@@ -1,20 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
diff --git a/app/themes/base/static/src/sass/global/_typography.scss b/app/themes/base/static/src/sass/global/_typography.scss
deleted file mode 100755
index 9b0a83c3..00000000
--- a/app/themes/base/static/src/sass/global/_typography.scss
+++ /dev/null
@@ -1,236 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-body {
- text-rendering: optimizeLegibility;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- color: $main-text-color;
- @include typeface(serif);
-}
-
-::selection {
- background: $main-text-color;
- color: $body-bg-color;
-}
-
-::-moz-selection {
- background: $main-text-color;
- color: $body-bg-color;
-}
-
-h1, h2, h3 {
- margin: 0;
-}
-
-h1 {
- @include typeset(heading-1);
- @include typeface(sans-serif);
- @include margin-bottom(3);
- @include margin-top(1);
-}
-
-h2 {
- @include typeset(heading-2);
- @include typeface(sans-serif);
- @include margin-bottom(2);
- @include margin-top(1);
-
- & + .chapo {
- @include margin-top(0);
- @include margin-bottom(1);
- }
-}
-
-p + h2 {
-
- @include margin-top(2);
-
-}
-
-h3 {
- @include typeset(heading-3);
- @include typeface(serif);
- @include margin-bottom(1);
- @include margin-top(1);
-
- .page__content &, .page__block & {
- text-transform: uppercase;
- line-height: 2rem;
- }
-
- .page__block & {
- @include padding(0 5);
-
- @include mq($until: md) {
- @include padding(0 2.5);
- }
-
- @include mq($until: sm) {
- @include padding(0);
- }
- }
-
-}
-
-p + h3 {
-
- @include margin-top(2);
-
-}
-
-.page__content ul, .page__block ul {
- font-weight: weight(light);
- @include line-height(1.25);
- @include margin-top(0);
- @include margin-bottom(1);
-}
-
-main p, main ul.unstyled-list, main ul:not([class]), main td {
- @include margin-top(0);
- @include margin-bottom(1);
- @include line-height(1.25);
- @include typeface(serif);
- @include typey-debug-grid;
- font-weight: weight(light);
-
- strong {
- font-weight: bold;
- }
-
- a:not(.button) {
-
- position: relative;
- z-index: 1;
- text-decoration: none;
- border-bottom: 1px solid $color-main;
- color: white;
- @include transition(all 0.15s ease-in-out);
-
- &:hover {
- box-shadow: inset 0 -30px $color-main;
- color: $color-background;
- }
-
- /*&:after {
- @include transition(all 0.15s ease-in-out);
- content: "";
- display: block;
- position: absolute;
- left: 0;
- right: 0;
- bottom: 0;
- height: 1px;
- background: $color-gray;
- z-index: -1;
- }
-
- &:hover {
- &:after {
- bottom: 0;
- background: $color-main;
- height: 100%;
- }
- }*/
- }
-}
-
-h3 {
- a:not(.button) {
-
- position: relative;
- z-index: 1;
- border-bottom: 1px solid $color-main;
- @include transition(all 0.15s ease-in-out);
-
- &:hover {
- box-shadow: inset 0 -30px $color-main;
- }
-
- }
-}
-
-hr {
-
- &:before {
- content: "";
- display: block;
- height: 1px;
- background: rgba(255, 255, 255, 0.5);
- width: 100%;
- top: -3px;
- position: relative;
- }
-
- border: 0;
-
- height: 1px;
- background-color: $color-main;
- @include margin(5 0 2 0);
-
- &.invisible {
- height: 0;
- border: 0;
- }
-}
-
-figure {
- margin: 0;
- figcaption {
- text-align: center;
- width: 300px;
- margin: 0 auto;
- display: block;
- @include margin-top(.25);
- @include font-size(xs);
- @include line-height(0.75);
- @include typeface(serif);
- font-weight: weight(light);
- }
- img {
- display: block;
- }
-}
-
-.chapo {
- @include font-size(l);
- @include line-height(1.25);
- @include typeface(serif);
- @include margin-bottom(2);
- font-weight: weight(heavy);
-}
-
-h1 + .chapo {
- @include margin-top(-2);
- @include margin-bottom(4);
- @include typeface(sans-serif);
- @include font-size(xxl);
- font-weight: weight(regular);
-
-}
-
-.small-text {
-
- @include font-size(xs);
- @include line-height(1);
- @include typeface(serif);
- font-weight: weight(light);
-
-}
diff --git a/app/themes/base/static/src/sass/global/_wysiwyg.scss b/app/themes/base/static/src/sass/global/_wysiwyg.scss
deleted file mode 100644
index 450a4ab0..00000000
--- a/app/themes/base/static/src/sass/global/_wysiwyg.scss
+++ /dev/null
@@ -1,199 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-.wys-button {
-
- @extend .button;
- .page__block--black & {
- color: $color-black;
- &:hover {
- color: white;
- }
- }
-
- @include margin(0 .5 0 0);
-
-}
-
-.wys-button-small {
-
- @extend .button;
- @extend .button--small;
- .page__block--black & {
- color: $color-black;
- &:hover {
- color: white;
- }
- }
-
- @include margin(0 .5 0 0);
-
-}
-
-.wys-button-xsmall {
-
- @extend .button;
- @extend .button--xsmall;
- .page__block--black & {
- color: $color-black;
- &:hover {
- color: white;
- }
- }
-
- @include margin(0 .5 0 0);
-
-}
-
-.wys-button-black {
-
- @extend .button;
- @extend .button--black;
-
- .page__block--black & {
- color: white;
- &:hover {
- color: $color-black;
- }
- }
-
- @include margin(0 .5 0 0);
-
-}
-
-.wys-button-black-small {
-
- @extend .button;
- @extend .button--black;
- @extend .button--small;
-
- .page__block--black & {
- color: white;
- &:hover {
- color: $color-black;
- }
- }
-
- @include margin(0 .5 0 0);
-
-}
-
-.wys-button-black-xsmall {
-
- @extend .button;
- @extend .button--black;
- @extend .button--xsmall;
-
- .page__block--black & {
- color: white;
- &:hover {
- color: $color-black;
- }
- }
-
- @include margin(0 .5 0 0);
-
-}
-
-.wys-button-white {
-
- @extend .button;
- @extend .button--white;
-
- .page__block--black & {
- color: $color-black;
- &:hover {
- color: white;
- }
- }
-
- @include margin(0 .5 0 0);
-
-}
-
-.wys-button-white-small {
-
- @extend .button;
- @extend .button--white;
- @extend .button--small;
-
- .page__block--black & {
- color: $color-black;
- &:hover {
- color: white;
- }
- }
-
- @include margin(0 .5 0 0);
-
-}
-
-.wys-button-white-xsmall {
-
- @extend .button;
- @extend .button--white;
- @extend .button--xsmall;
-
- .page__block--black & {
- color: $color-black;
- &:hover {
- color: white;
- }
- }
-
- @include margin(0 .5 0 0);
-
-}
-
-.wys-highlighted-paragraph {
-
- @include padding-left(1);
- @include margin-top(1.5);
- border-left: 1px solid $color-main;
-
- & + .wys-highlighted-paragraph {
-
- @include margin-top(-1);
- @include padding-top(1);
-
- }
-
- .page__block--yellow & {
-
- border-color: $color-background;
-
- }
-
-}
-
-.wys-small-text {
-
- @extend .small-text;
-
-}
-
-.wys-unstyled-link {
-
- border-bottom: 0 !important;
- &:hover {
- box-shadow: none !important;
- }
-
-}
diff --git a/app/themes/base/static/src/sass/index.scss b/app/themes/base/static/src/sass/index.scss
deleted file mode 100755
index 2482cf3e..00000000
--- a/app/themes/base/static/src/sass/index.scss
+++ /dev/null
@@ -1,51 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-@import "compass/reset/utilities";
-@import "compass/utilities";
-@import 'compass/css3';
-
-@import 'config/colors';
-@import 'config/fonts';
-@import 'config/variables';
-@import 'config/config';
-
-@import 'libs/all';
-
-@import 'utils/functions';
-@import 'utils/mixins';
-
-@import 'global/defaults';
-@import 'global/typography';
-@import 'global/forms';
-@import 'global/inputs';
-@import 'global/buttons';
-@import 'global/tables';
-@import 'global/helpers';
-@import 'global/wysiwyg';
-
-@import 'layout/global';
-@import 'layout/grid';
-@import 'layout/header';
-@import 'layout/footer';
-
-@import 'modules/all';
-@import 'pages/all';
-@import 'vendors/all';
diff --git a/app/themes/base/static/src/sass/layout/_footer.scss b/app/themes/base/static/src/sass/layout/_footer.scss
deleted file mode 100755
index d9a55554..00000000
--- a/app/themes/base/static/src/sass/layout/_footer.scss
+++ /dev/null
@@ -1,160 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".footer";
-
-#{$module} {
-
- /* Rectangle 2: */
- background-image: linear-gradient(-180deg, #000F24 0%, #FF203C 100%);
- @include margin-top(10);
-
- @include mq($until: xs) {
- div[class^="col-"] {
- @include margin(.5 0);
- }
- }
-
- .section-title {
- @include margin-bottom(2);
- @include margin-top(0);
- }
-
- &__pre {
-
- border-bottom: 3px solid white;
- color: white;
-
- @include padding(1 0);
-
- @include mq($until: xs) {
- @include padding(0);
- border: 0;
- }
-
- }
-
- &__content {
-
- @include padding(1 0 .5 0);
-
- @include font-size(s);
- @include typeface(sans-serif);
- font-weight: weight(light);
-
- color: white;
-
- @include mq($until: xs) {
- @include padding(0);
- }
-
- }
-
- &__follow-link {
-
- color: white;
- @include font-size(xxl);
- display: inline-block;
-
- @include margin(0 .25);
- @include transition(all 0.5s ease-in-out);
-
- &:hover {
- &.facebook {
- color: $color-facebook;
- }
- &.twitter {
- color: $color-twitter;
- }
- &.instagram {
- color: $color-instagram;
- }
- &.youtube {
- color: $color-youtube;
- }
- &.vimeo {
- color: $color-vimeo;
- }
- }
-
- }
-
- &__link {
-
- color: white;
- border-bottom: 1px solid $color-main;
- font-weight: weight(regular);
-
- }
-
- &__separator {
-
- width: 100%;
- background: white;
- height: 3px;
-
- @include margin(1 0);
-
- @include mq($until: xs) {
- @include margin(0);
- }
-
- &--small {
- height: 1px;
- }
-
- }
-
- &__partner {
- @include mq($until: lg) {
- width: 80px;
- }
- @include mq($until: md) {
- width: 80px;
- }
- @include mq($until: sm) {
- width: 120px;
- }
- @include mq($until: xs) {
- width: 80px;
- height: auto;
- }
- }
-
- &__partner-separator {
- @include typeface(sans-serif);
- @include font-size(m);
- font-weight: weight(regular);
- display: inline-block;
- @include margin(0 1);
- position: relative;
- top: -30px;
- @include mq($until: xs) {
- color: white;
- }
- }
-
- .section-title {
- @include mq($until: xs) {
- color: white;
- }
- }
-
-}
diff --git a/app/themes/base/static/src/sass/layout/_global.scss b/app/themes/base/static/src/sass/layout/_global.scss
deleted file mode 100755
index 82a7b475..00000000
--- a/app/themes/base/static/src/sass/layout/_global.scss
+++ /dev/null
@@ -1,58 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-.main {
- @include margin(0 0 0 0);
- @include padding(0 0 0 0);
-
- @media screen and (max-height: 900px) {
-
- @include margin(0 0 0 0);
-
- }
-}
-
-#container {
- margin-top: 57px;
- @include mq($until: lg) {
- margin-top: 48px;
- }
- @include mq($until: sm) {
- margin-top: $header-height-tablet;
- }
- @include mq($until: xs) {
- margin-top: $header-height-mobile;
- }
-}
-
-html, body {
-
- background: $color-background;
- color: white;
-
- @include mq($until: sm) {
-
- overflow-x: hidden;
- height: 100%;
- -webkit-overflow-scrolling: touch;
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/layout/_grid.scss b/app/themes/base/static/src/sass/layout/_grid.scss
deleted file mode 100755
index 93357778..00000000
--- a/app/themes/base/static/src/sass/layout/_grid.scss
+++ /dev/null
@@ -1,211 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-/* Base container properties */
-
-%grid-container {
-
- margin-right: auto;
- margin-left: auto;
- padding-left: $grid-gutter;
- padding-right: $grid-gutter;
-
- @media screen and (max-width: map-get($breakpoints, md)) {
- padding-left: $grid-gutter / 2;
- padding-right: $grid-gutter / 2;
- }
-
-}
-
-/* Base column properties */
-
-%grid-column {
-
- @include box-sizing(border-box);
-
- position: relative;
- width: 100%;
- padding-left: $grid-gutter / 2;
- padding-right: $grid-gutter / 2;
- min-height: 1px;
- /*float: left;*/
- display: inline-block;
- vertical-align: top;
-
-}
-
-/* Set box-sizing */
-
-.#{$grid-container-prefix},
-.#{$grid-row-prefix},
-.#{$grid-row-prefix}:after,
-.#{$grid-row-prefix}:before {
-
- @include box-sizing(border-box);
-
-}
-
-/* Container */
-
-.#{$grid-container-prefix} {
-
- &,
- &-fluid,
- &-full,
- &-fixed {
- @extend %grid-container;
- }
-
- &-full {
- padding-left: 0;
- padding-right: 0;
- }
-
- &-fixed {
- width: $grid-unresponsive-width + $grid-gutter * 2;
- }
-
- @if $use-responsive-grid {
-
- max-width: map-get($breakpoints, sm);
-
- @media screen and (min-width: map-get($breakpoints, md)) {
- max-width: map-get($breakpoints, md);
- }
-
- @media screen and (min-width: map-get($breakpoints, lg)) {
- max-width: map-get($breakpoints, lg);
- }
-
- } @else {
-
- width: $grid-unresponsive-width + $grid-gutter * 2;
-
- }
-
-}
-
-/* Clearfix & box-model + list-style reset for ul support */
-
-.#{$grid-row-prefix} {
-
- $margin: -$grid-gutter / 2;
-
- @include pie-clearfix();
- @include reset-list-style();
- @include reset-box-model();
-
- margin-left: -$grid-gutter / 2;
- margin-right: -$grid-gutter / 2;
-
- /* Nested grid */
-
- & > & {
- clear: none;
- float: left;
- margin: 0 !important;
- }
-
-}
-
-/* Generate columns */
-
-@if $use-responsive-grid {
-
- @each $size, $width in $breakpoints {
-
- @for $i from 0 to $grid-columns+1 {
-
- .#{$grid-col-prefix}-#{$size}-#{$i} {
- @extend %grid-column;
- }
-
- }
-
- @media screen and (min-width: map-get($breakpoints, $size)) {
-
- @for $i from 0 to $grid-columns+1 {
-
- $col-class: $grid-col-prefix + '-' + $size + '-';
- $value: percentage($i / $grid-columns);
-
- .#{$col-class}#{$i} {
- width: $value;
- }
-
- @if $use-grid-push {
- .#{$col-class}push-#{$i} {
- left: $value;
- }
- }
-
- @if $use-grid-pull {
- .#{$col-class}pull-#{$i} {
- right: $value;
- }
- }
-
- @if $use-grid-offset {
- .#{$col-class}offset-#{$i} {
- margin-left: $value;
- }
- }
-
- }
-
- }
-
- }
-
-} @else {
-
- @for $i from 0 to $grid-columns+1 {
-
- $value: percentage($i / $grid-columns);
-
- .#{$grid-col-prefix}-#{$i} {
- @extend %grid-column;
- }
-
- .#{$grid-col-prefix}-#{$i} {
- width: percentage($i / $grid-columns);
- }
-
- @if $use-grid-push {
- .#{$grid-col-prefix}-push-#{$i} {
- left: $value;
- }
- }
-
- @if $use-grid-pull {
- .#{$grid-col-prefix}-pull-#{$i} {
- right: $value;
- }
- }
-
- @if $use-grid-offset {
- .#{$grid-col-prefix}-offset-#{$i} {
- margin-left: $value;
- }
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/layout/_header.scss b/app/themes/base/static/src/sass/layout/_header.scss
deleted file mode 100755
index a5f066c8..00000000
--- a/app/themes/base/static/src/sass/layout/_header.scss
+++ /dev/null
@@ -1,49 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".header";
-
-#{$module} {
-
- z-index: 100;
- position: relative;
-
- background: white;
- box-shadow: 0 10px 130px rgba(79,227,194,0.5);
- position: fixed;
- width: 100%;
- top: 0;
- left: 0;
- z-index: 100;
-
- @include mq($until: sm) {
- height: $header-height-tablet;
- @include mq($until: xs) {
- height: $header-height-mobile;
- }
- }
-
- &__nav {
-
- background: $color-white;
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/libs/_all.scss b/app/themes/base/static/src/sass/libs/_all.scss
deleted file mode 100755
index 57485828..00000000
--- a/app/themes/base/static/src/sass/libs/_all.scss
+++ /dev/null
@@ -1,23 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-@import "normalize/normalize";
-@import "typey/typey";
-@import "sass-mq/mq";
diff --git a/app/themes/base/static/src/sass/libs/normalize/_normalize.scss b/app/themes/base/static/src/sass/libs/normalize/_normalize.scss
deleted file mode 100755
index 509b7a90..00000000
--- a/app/themes/base/static/src/sass/libs/normalize/_normalize.scss
+++ /dev/null
@@ -1,24 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-@import 'support-for';
-@import 'normalize/variables';
-@import 'normalize/vertical-rhythm';
-@import 'normalize/normalize-mixin';
diff --git a/app/themes/base/static/src/sass/libs/normalize/_support-for.scss b/app/themes/base/static/src/sass/libs/normalize/_support-for.scss
deleted file mode 100755
index c1f93069..00000000
--- a/app/themes/base/static/src/sass/libs/normalize/_support-for.scss
+++ /dev/null
@@ -1,84 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-// Support the last 4 versions of all browsers except IE.
-$support-for: (
- chrome: -4,
- edge: -4,
- firefox: -4,
- ie: 9,
- opera: -4,
- safari: -4,
- '*': -4,
-) !default;
-
-// Set the current version number for all browsers. As of: 2016-04-30
-$support-for-current-browser-version: (
- chrome: 50, // https://en.wikipedia.org/wiki/Google_Chrome_release_history
- edge: 25, // https://en.wikipedia.org/wiki/Microsoft_Edge
- firefox: 46, // https://en.wikipedia.org/wiki/Firefox_release_history
- ie: 11, // https://en.wikipedia.org/wiki/Internet_Explorer_versions
- opera: 36, // https://en.wikipedia.org/wiki/Opera_(web_browser)
- safari: 9, // https://en.wikipedia.org/wiki/Safari_version_history
-) !default;
-
-
-// support-for()
-//
-// Determines if the project has declared a minimum supported version number for
-// the specified browser.
-//
-// If configured, this is a wrapper function that uses Compass'
-// support-legacy-browser().
-// @see http://compass-style.org/reference/compass/support/#function-support-legacy-browser
-//
-@function support-for($browser, $version) {
- // Ensure $version is an integer (or null).
- @if not (type-of($version) == "null" or type-of($version) == "number" and round($version) == $version) {
- @error "The $version parameter of support-for() must be an integer; #{type-of($version)} given.";
- }
-
- // Check against declared minimums.
- $min-version: null;
- @if map-has-key($support-for, $browser) {
- $min-version: map-get($support-for, $browser);
- }
- @else if map-has-key($support-for, '*') {
- $min-version: map-get($support-for, '*');
- }
-
- // Ensure $min-version is an integer (or null).
- @if type-of($min-version) != "null" and type-of($min-version) != "number" {
- @error "$support-for: (#{$browser}: #{$min-version}) must be set to an integer (or null); #{$min-version} is a #{type-of($min-version)}.";
- }
- @elseif type-of($min-version) == "number" and round($min-version) != $min-version {
- @error "$support-for: (#{$browser}: #{$min-version}) must be set to an integer (or null); #{$min-version} is not an integer.";
- }
-
- // Negative $min-version means "X most recent versions".
- @if type-of($min-version) == "number" and $min-version < 0 {
- @if not map-has-key($support-for-current-browser-version, $browser) {
- @error "#{$browser} not found in $support-for-current-browser-version map; it must be set to an integer.";
- }
- $min-version: map-get($support-for-current-browser-version, $browser) + $min-version + 1;
- }
-
- @return if(($min-version and ($version >= $min-version)), true, false);
-}
diff --git a/app/themes/base/static/src/sass/libs/normalize/normalize/_import-now.scss b/app/themes/base/static/src/sass/libs/normalize/normalize/_import-now.scss
deleted file mode 100755
index dee38ecf..00000000
--- a/app/themes/base/static/src/sass/libs/normalize/normalize/_import-now.scss
+++ /dev/null
@@ -1,31 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-// Import Now
-//
-// If you import this module directly, it will immediately output all the CSS
-// needed to normalize default HTML elements across all browsers.
-//
-// ```
-// @import "normalize/import-now";
-// ```
-
-@import '../normalize';
-@include normalize();
diff --git a/app/themes/base/static/src/sass/libs/normalize/normalize/_normalize-mixin.scss b/app/themes/base/static/src/sass/libs/normalize/normalize/_normalize-mixin.scss
deleted file mode 100755
index bee34aca..00000000
--- a/app/themes/base/static/src/sass/libs/normalize/normalize/_normalize-mixin.scss
+++ /dev/null
@@ -1,698 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-// Helper function for the normalize() mixin.
-$_normalize-include: ();
-$_normalize-exclude: ();
-@function _normalize-include($section) {
- // Check if $section is in the $include list.
- @if index($_normalize-include, $section) {
- @return true;
- }
- // If $include is set to (all), make sure $section is not in $exclude.
- @else if not index($_normalize-exclude, $section) and index($_normalize-include, all) {
- @return true;
- }
- @return false;
-}
-
-@mixin normalize($include: (all), $exclude: ()) {
- // If we had local functions, we could access our parameters inside the
- // function without passing them in as parameters. The hacky work-around is to
- // stuff them into global variables so can access them from a global function.
- $_normalize-include: if(type-of($include) == 'list', $include, ($include)) !global;
- $_normalize-exclude: if(type-of($exclude) == 'list', $exclude, ($exclude)) !global;
-
- // If we've customized any font variables, we'll need extra properties.
- @if $base-font-size != 16px
- or $base-line-height != 24px
- or $base-unit != 'em'
- or $h1-font-size != 2 * $base-font-size
- or $h2-font-size != 1.5 * $base-font-size
- or $h3-font-size != 1.17 * $base-font-size
- or $h4-font-size != 1 * $base-font-size
- or $h5-font-size != 0.83 * $base-font-size
- or $h6-font-size != 0.67 * $base-font-size
- or $indent-amount != 40px {
- $normalize-vertical-rhythm: true !global;
- }
-
- /*! normalize-scss | MIT/GPLv2 License | bit.ly/normalize-scss */
-
- @if _normalize-include(root) {
- /**
- * 1. Set default font family to sans-serif.
- * 2. Prevent iOS and IE text size adjust after device orientation change,
- * without disabling user zoom.
- */
-
- html {
- @if $normalize-vertical-rhythm or support-for(ie, 7) {
- // Correct text resizing oddly in IE 6/7 when body `font-size` is set using
- // `em` units.
- font-size: ($base-font-size / 16px) * 100%;
- }
- @if $normalize-vertical-rhythm {
- line-height: ($base-line-height / $base-font-size) * 1em;
- }
- font-family: $base-font-family; /* 1 */
- -ms-text-size-adjust: 100%; /* 2 */
- -webkit-text-size-adjust: 100%; /* 2 */
- }
-
- /**
- * Remove default margin.
- */
-
- body {
- margin: 0;
- }
- }
-
- @if _normalize-include(html5) {
- /* HTML5 display definitions
- ========================================================================== */
-
- /**
- * Correct `block` display not defined for any HTML5 element in IE 8/9.
- * Correct `block` display not defined for `details` or `summary` in IE 10/11
- * and Firefox.
- * Correct `block` display not defined for `main` in IE 11.
- */
-
- article,
- aside,
- details,
- figcaption,
- figure,
- footer,
- header,
- hgroup,
- main,
- menu,
- nav,
- section,
- summary {
- display: block;
- }
-
- /**
- * 1. Correct `inline-block` display not defined in IE 8/9.
- * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
- */
-
- audio,
- canvas,
- progress,
- video {
- @if support-for(ie, 9) {
- display: inline-block; /* 1 */
- @if support-for(ie, 7) {
- *display: inline;
- *zoom: 1;
- }
- }
- vertical-align: baseline; /* 2 */
- }
-
- /**
- * Prevent modern browsers from displaying `audio` without controls.
- * Remove excess height in iOS 5 devices.
- */
-
- audio:not([controls]) {
- display: none;
- height: 0;
- }
-
- @if support-for(ie, 10) {
- /**
- * Address `[hidden]` styling not present in IE 8/9/10.
- */
-
- [hidden] {
- display: none;
- }
- }
-
- /**
- * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.
- */
-
- template {
- display: none;
- }
- }
-
- @if _normalize-include(links) {
- /* Links
- ========================================================================== */
-
- @if support-for(ie, 10) {
- /**
- * Remove the gray background color from active links in IE 10.
- */
-
- a {
- background-color: transparent;
- }
- }
-
- /**
- * Improve readability of focused elements when they are also in an
- * active/hover state.
- */
-
- a:active,
- a:hover {
- outline: 0;
- }
- }
-
- @if _normalize-include(text) {
- /* Text-level semantics
- ========================================================================== */
-
- /**
- * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
- */
-
- abbr[title] {
- border-bottom: 1px dotted;
- }
-
- /**
- * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
- */
-
- b,
- strong {
- font-weight: bold;
- }
-
- /**
- * Address styling not present in Safari and Chrome.
- */
-
- dfn {
- font-style: italic;
- }
-
- /**
- * Address variable `h1` font-size and margin within `section` and `article`
- * contexts in Firefox 4+, Safari, and Chrome.
- */
-
- h1 {
- @include normalize-font-size($h1-font-size);
- @if $normalize-vertical-rhythm {
- @include normalize-line-height($h1-font-size);
- }
-
- /* Set 1 unit of vertical rhythm on the top and bottom margins. */
- @include normalize-margin(1 0, $h1-font-size);
- }
-
- @if $normalize-vertical-rhythm or support-for(ie, 7) {
- h2 {
- @include normalize-font-size($h2-font-size);
- @if $normalize-vertical-rhythm {
- @include normalize-line-height($h2-font-size);
- }
- @include normalize-margin(1 0, $h2-font-size);
- }
-
- h3 {
- @include normalize-font-size($h3-font-size);
- @if $normalize-vertical-rhythm {
- @include normalize-line-height($h3-font-size);
- }
- @include normalize-margin(1 0, $h3-font-size);
- }
-
- h4 {
- @include normalize-font-size($h4-font-size);
- @if $normalize-vertical-rhythm {
- @include normalize-line-height($h4-font-size);
- }
- @include normalize-margin(1 0, $h4-font-size);
- }
-
- h5 {
- @include normalize-font-size($h5-font-size);
- @if $normalize-vertical-rhythm {
- @include normalize-line-height($h5-font-size);
- }
- @include normalize-margin(1 0, $h5-font-size);
- }
-
- h6 {
- @include normalize-font-size($h6-font-size);
- @if $normalize-vertical-rhythm {
- @include normalize-line-height($h6-font-size);
- }
- @include normalize-margin(1 0, $h6-font-size);
- }
- }
-
- @if support-for(ie, 9) {
- /**
- * Address styling not present in IE 8/9.
- */
-
- mark {
- background: #ff0;
- color: #000;
- }
- }
-
- /**
- * Address inconsistent and variable font size in all browsers.
- */
-
- small {
- font-size: 80%;
- }
-
- /**
- * Prevent `sub` and `sup` affecting `line-height` in all browsers.
- */
-
- sub,
- sup {
- font-size: 75%;
- line-height: 0;
- position: relative;
- vertical-align: baseline;
- }
-
- sup {
- top: -0.5em;
- }
-
- sub {
- bottom: -0.25em;
- }
- }
-
- @if _normalize-include(embedded) {
- /* Embedded content
- ========================================================================== */
-
- @if support-for(ie, 10) {
- /**
- * Remove border when inside `a` element in IE 8/9/10.
- */
-
- img {
- border: 0;
- @if support-for(ie, 7) {
- /* Improve image quality when scaled in IE 7. */
- -ms-interpolation-mode: bicubic;
- }
- }
- }
-
- /**
- * Correct overflow not hidden in IE 9/10/11.
- */
-
- svg:not(:root) {
- overflow: hidden;
- }
- }
-
- @if _normalize-include(grouping) {
- /* Grouping content
- ========================================================================== */
-
- @if $normalize-vertical-rhythm or support-for(ie, 7) {
- /**
- * Address margins set differently in IE 6/7.
- */
-
- dl,
- menu,
- ol,
- ul {
- @include normalize-margin(1 0);
- }
- }
-
- @if $normalize-vertical-rhythm {
- /**
- * Turn off margins on nested lists.
- */
-
- ol,
- ul {
- ol,
- ul {
- margin: 0;
- }
- }
- }
-
- @if $normalize-vertical-rhythm or support-for(ie, 7) {
- dd {
- margin: 0 0 0 $indent-amount;
- }
-
- /**
- * Address paddings set differently in IE 6/7.
- */
-
- menu,
- ol,
- ul {
- padding: 0 0 0 $indent-amount;
- }
- }
-
- @if support-for(ie, 7) {
- /**
- * Correct list images handled incorrectly in IE 7.
- */
-
- nav ul,
- nav ol {
- list-style: none;
- list-style-image: none;
- }
- }
-
- @if $normalize-vertical-rhythm or support-for(ie, 7) {
- /**
- * Set 1 unit of vertical rhythm on the top and bottom margin.
- */
-
- blockquote {
- @include normalize-margin(1 $indent-amount);
- }
- }
-
- @if $normalize-vertical-rhythm or support-for(ie, 9) or support-for(safari, 6) {
- /**
- * Address margin not present in IE 8/9 and Safari.
- */
-
- figure {
- @include normalize-margin(1 $indent-amount);
- }
- }
-
- /**
- * Address differences between Firefox and other browsers.
- */
-
- hr {
- @if support-for(firefox, 28) {
- -moz-box-sizing: content-box;
- }
- box-sizing: content-box;
- height: 0;
- }
-
- @if $normalize-vertical-rhythm or support-for(ie, 7) {
- /**
- * Set 1 unit of vertical rhythm on the top and bottom margin.
- */
-
- p,
- pre {
- @include normalize-margin(1 0);
- }
- }
-
- /**
- * Contain overflow in all browsers.
- */
-
- pre {
- overflow: auto;
- }
-
- /**
- * Address odd `em`-unit font size rendering in all browsers.
- */
-
- code,
- kbd,
- pre,
- samp {
- font-family: monospace, monospace;
- @if support-for(ie, 6) {
- _font-family: 'courier new', monospace;
- }
- font-size: 1em;
- }
- }
-
- @if _normalize-include(forms) {
- /* Forms
- ========================================================================== */
-
- /**
- * Known limitation: by default, Chrome and Safari on OS X allow very limited
- * styling of `select`, unless a `border` property is set.
- */
-
- @if support-for(ie, 7) {
- /**
- * Correct margin displayed oddly in IE 6/7.
- */
-
- form {
- margin: 0;
- }
- }
-
- /**
- * 1. Correct color not being inherited.
- * Known issue: affects color of disabled elements.
- * 2. Correct font properties not being inherited.
- * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
- * 4. Address `font-family` inconsistency between `textarea` and other form in IE 7
- * 5. Improve appearance and consistency with IE 6/7.
- */
-
- button,
- input,
- optgroup,
- select,
- textarea {
- color: inherit; /* 1 */
- font: inherit; /* 2 */
- margin: 0; /* 3 */
- @if support-for(ie, 7) {
- *font-family: $base-font-family; /* 4 */
- *vertical-align: middle; /* 5 */
- }
- }
-
- /**
- * Address `overflow` set to `hidden` in IE 8/9/10/11.
- */
-
- button {
- overflow: visible;
- }
-
- /**
- * Address inconsistent `text-transform` inheritance for `button` and `select`.
- * All other form control elements do not inherit `text-transform` values.
- * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
- * Correct `select` style inheritance in Firefox.
- */
-
- button,
- select {
- text-transform: none;
- }
-
- /**
- * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
- * and `video` controls.
- * 2. Correct inability to style clickable `input` types in iOS.
- * 3. Improve usability and consistency of cursor style between image-type
- * `input` and others.
- * 4. Remove inner spacing in IE 7 without affecting normal text inputs.
- * Known issue: inner spacing remains in IE 6.
- */
-
- button,
- html input[type="button"], /* 1 */
- input[type="reset"],
- input[type="submit"] {
- -webkit-appearance: button; /* 2 */
- cursor: pointer; /* 3 */
- @if support-for(ie, 7) {
- *overflow: visible; /* 4 */
- }
- }
-
- /**
- * Re-set default cursor for disabled elements.
- */
-
- button[disabled],
- html input[disabled] {
- cursor: default;
- }
-
- /**
- * Remove inner padding and border in Firefox 4+.
- */
-
- button::-moz-focus-inner,
- input::-moz-focus-inner {
- border: 0;
- padding: 0;
- }
-
- /**
- * Address Firefox 4+ setting `line-height` on `input` using `!important` in
- * the UA stylesheet.
- */
-
- input {
- line-height: normal;
- }
-
- @if support-for(ie, 10) {
- /**
- * It's recommended that you don't attempt to style these elements.
- * Firefox's implementation doesn't respect box-sizing, padding, or width.
- *
- * 1. Address box sizing set to `content-box` in IE 8/9/10.
- * 2. Remove excess padding in IE 8/9/10.
- * 3. Remove excess padding in IE 7.
- * Known issue: excess padding remains in IE 6.
- */
-
- input[type="checkbox"],
- input[type="radio"] {
- box-sizing: border-box; /* 1 */
- padding: 0; /* 2 */
- @if support-for(ie, 7) {
- *height: 13px; /* 3 */
- *width: 13px; /* 3 */
- }
- }
- }
-
- /**
- * Fix the cursor style for Chrome's increment/decrement buttons. For certain
- * `font-size` values of the `input`, it causes the cursor style of the
- * decrement button to change from `default` to `text`.
- */
-
- input[type="number"]::-webkit-inner-spin-button,
- input[type="number"]::-webkit-outer-spin-button {
- height: auto;
- }
-
- /**
- * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
- * 2. Address `box-sizing` set to `border-box` in Safari and Chrome.
- */
-
- input[type="search"] {
- -webkit-appearance: textfield; /* 1 */
- @if support-for(safari, 5) or support-for(chrome, 9) {
- -webkit-box-sizing: content-box;
- }
- box-sizing: content-box; /* 2 */
-
- /**
- * Remove inner padding and search cancel button in Safari and Chrome on OS X.
- * Safari (but not Chrome) clips the cancel button when the search input has
- * padding (and `textfield` appearance).
- */
-
- &::-webkit-search-cancel-button,
- &::-webkit-search-decoration {
- -webkit-appearance: none;
- }
- }
-
- /**
- * Define consistent border, margin, and padding.
- */
-
- fieldset {
- border: 1px solid #c0c0c0;
- margin: 0 2px;
- padding: 0.35em 0.625em 0.75em;
- }
-
- /**
- * 1. Correct `color` not being inherited in IE 8/9/10/11.
- * 2. Remove padding so people aren't caught out if they zero out fieldsets.
- * 3. Correct alignment displayed oddly in IE 6/7.
- */
-
- legend {
- @if support-for(ie, 11) {
- border: 0; /* 1 */
- }
- padding: 0; /* 2 */
- @if support-for(ie, 7) {
- *margin-left: -7px; /* 3 */
- }
- }
-
- /**
- * Remove default vertical scrollbar in IE 8/9/10/11.
- */
-
- textarea {
- overflow: auto;
- }
-
- /**
- * Don't inherit the `font-weight` (applied by a rule above).
- * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
- */
-
- optgroup {
- font-weight: bold;
- }
- }
-
- @if _normalize-include(tables) {
- /* Tables
- ========================================================================== */
-
- /**
- * Remove most spacing between table cells.
- */
-
- table {
- border-collapse: collapse;
- border-spacing: 0;
- }
-
- td,
- th {
- padding: 0;
- }
- }
-}
diff --git a/app/themes/base/static/src/sass/libs/normalize/normalize/_variables.scss b/app/themes/base/static/src/sass/libs/normalize/normalize/_variables.scss
deleted file mode 100755
index 79d013e0..00000000
--- a/app/themes/base/static/src/sass/libs/normalize/normalize/_variables.scss
+++ /dev/null
@@ -1,56 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-//
-// Variables
-//
-// You can override the default values by setting the variables in your Sass
-// before importing the normalize-scss library.
-
-// The font size set on the root html element.
-$base-font-size: 16px !default;
-
-// The base line height determines the basic unit of vertical rhythm.
-$base-line-height: 24px !default;
-
-// The length unit in which to output vertical rhythm values.
-// Supported values: px, em, rem.
-$base-unit: 'em' !default;
-
-// The default font family.
-$base-font-family: sans-serif !default;
-
-// The font sizes for h1-h6.
-$h1-font-size: 2 * $base-font-size !default;
-$h2-font-size: 1.5 * $base-font-size !default;
-$h3-font-size: 1.17 * $base-font-size !default;
-$h4-font-size: 1 * $base-font-size !default;
-$h5-font-size: 0.83 * $base-font-size !default;
-$h6-font-size: 0.67 * $base-font-size !default;
-
-// The amount lists and blockquotes are indented.
-$indent-amount: 40px !default;
-
-// The following variable controls whether normalize-scss will output
-// font-sizes, line-heights and block-level top/bottom margins that form a basic
-// vertical rhythm on the page, which differs from the original Normalize.css.
-// However, changing any of the variables above will cause
-// $normalize-vertical-rhythm to be automatically set to true.
-$normalize-vertical-rhythm: false !default;
diff --git a/app/themes/base/static/src/sass/libs/normalize/normalize/_vertical-rhythm.scss b/app/themes/base/static/src/sass/libs/normalize/normalize/_vertical-rhythm.scss
deleted file mode 100755
index 698e762f..00000000
--- a/app/themes/base/static/src/sass/libs/normalize/normalize/_vertical-rhythm.scss
+++ /dev/null
@@ -1,94 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-//
-// Vertical Rhythm
-//
-// This is the minimal amount of code needed to create vertical rhythm in our
-// CSS. If you are looking for a robust solution, look at the excellent Typey
-// library. @see https://github.com/jptaranto/typey
-
-@function normalize-rhythm($value, $relative-to: $base-font-size, $unit: $base-unit) {
- @if unit($value) != px {
- @error "The normalize vertical-rhythm module only supports px inputs. The typey library is better.";
- }
- @if $unit == rem {
- @return ($value / $base-font-size) * 1rem;
- }
- @else if $unit == em {
- @return ($value / $relative-to) * 1em;
- }
- @else { // $unit == px
- @return $value;
- }
-}
-
-@mixin normalize-font-size($value, $relative-to: $base-font-size) {
- @if unit($value) != 'px' {
- @error "normalize-font-size() only supports px inputs. The typey library is better.";
- }
- // px fallback for IE 8 and earlier. Note: IE 9/10 don't understand rem
- // in font shorthand, but font-size longhand is fine.
- @if $base-unit == rem and support-for(ie, 8) {
- font-size: $value;
- }
- font-size: normalize-rhythm($value, $relative-to);
-}
-
-@mixin normalize-rhythm($property, $values, $relative-to: $base-font-size) {
- $value-list: $values;
- $sep: space;
- @if type-of($values) == 'list' {
- $sep: list-separator($values);
- }
- @else {
- $value-list: append((), $values);
- }
-
- $normalized-values: ();
- $px-fallback: ();
-
- @each $value in $value-list {
- $px-value: $value;
- @if unitless($value) and $value != 0 {
- $value: $value * normalize-rhythm($base-line-height, $relative-to);
- $px-value: $px-value * normalize-rhythm($base-line-height, $relative-to, px);
- }
- $normalized-values: append($normalized-values, $value, $sep);
- $px-fallback: append($px-fallback, $px-value, $sep);
- }
- @if $base-unit == rem and support-for(ie, 8) {
- #{$property}: $px-fallback;
- }
- #{$property}: $normalized-values;
-}
-
-@mixin normalize-margin($values, $relative-to: $base-font-size) {
- @include normalize-rhythm(margin, $values, $relative-to);
-}
-
-@mixin normalize-line-height($font-size, $min-line-padding: 2px) {
- $lines: ceil($font-size / $base-line-height);
- // If lines are cramped include some extra leading.
- @if ($lines * $base-line-height - $font-size) < ($min-line-padding * 2) {
- $lines: $lines + 1;
- }
- @include normalize-rhythm(line-height, $lines, $font-size);
-}
diff --git a/app/themes/base/static/src/sass/libs/sass-mq/_mq.scss b/app/themes/base/static/src/sass/libs/sass-mq/_mq.scss
deleted file mode 100755
index a1722223..00000000
--- a/app/themes/base/static/src/sass/libs/sass-mq/_mq.scss
+++ /dev/null
@@ -1,307 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-@charset "UTF-8"; // Fixes an issue where Ruby locale is not set properly
- // See https://github.com/sass-mq/sass-mq/pull/10
-
-/// Base font size on the `` element
-/// @type Number (unit)
-$mq-base-font-size: 16px !default;
-
-/// Responsive mode
-///
-/// Set to `false` to enable support for browsers that do not support @media queries,
-/// (IE <= 8, Firefox <= 3, Opera <= 9)
-///
-/// You could create a stylesheet served exclusively to older browsers,
-/// where @media queries are rasterized
-///
-/// @example scss
-/// // old-ie.scss
-/// $mq-responsive: false;
-/// @import 'main'; // @media queries in this file will be rasterized up to $mq-static-breakpoint
-/// // larger breakpoints will be ignored
-///
-/// @type Boolean
-/// @link https://github.com/sass-mq/sass-mq#responsive-mode-off Disabled responsive mode documentation
-$mq-responsive: true !default;
-
-/// Breakpoint list
-///
-/// Name your breakpoints in a way that creates a ubiquitous language
-/// across team members. It will improve communication between
-/// stakeholders, designers, developers, and testers.
-///
-/// @type Map
-/// @link https://github.com/sass-mq/sass-mq#seeing-the-currently-active-breakpoint Full documentation and examples
-$mq-breakpoints: (
- mobile: 320px,
- tablet: 740px,
- desktop: 980px,
- wide: 1300px
-) !default;
-
-/// Static breakpoint (for fixed-width layouts)
-///
-/// Define the breakpoint from $mq-breakpoints that should
-/// be used as the target width for the fixed-width layout
-/// (i.e. when $mq-responsive is set to 'false') in a old-ie.scss
-///
-/// @example scss
-/// // tablet-only.scss
-/// //
-/// // Ignore all styles above tablet breakpoint,
-/// // and fix the styles (e.g. layout) at tablet width
-/// $mq-responsive: false;
-/// $mq-static-breakpoint: tablet;
-/// @import 'main'; // @media queries in this file will be rasterized up to tablet
-/// // larger breakpoints will be ignored
-///
-/// @type String
-/// @link https://github.com/sass-mq/sass-mq#adding-custom-breakpoints Full documentation and examples
-$mq-static-breakpoint: desktop !default;
-
-/// Show breakpoints in the top right corner
-///
-/// If you want to display the currently active breakpoint in the top
-/// right corner of your site during development, add the breakpoints
-/// to this list, ordered by width, e.g. (mobile, tablet, desktop).
-///
-/// @type map
-$mq-show-breakpoints: () !default;
-
-/// Customize the media type (e.g. `@media screen` or `@media print`)
-/// By default sass-mq uses an "all" media type (`@media all and â¦`)
-///
-/// @type String
-/// @link https://github.com/sass-mq/sass-mq#changing-media-type Full documentation and examples
-$mq-media-type: all !default;
-
-/// Convert pixels to ems
-///
-/// @param {Number} $px - value to convert
-/// @param {Number} $base-font-size ($mq-base-font-size) - `` font size
-///
-/// @example scss
-/// $font-size-in-ems: mq-px2em(16px);
-/// p { font-size: mq-px2em(16px); }
-///
-/// @requires $mq-base-font-size
-/// @returns {Number}
-@function mq-px2em($px, $base-font-size: $mq-base-font-size) {
- @if unitless($px) {
- @warn "Assuming #{$px} to be in pixels, attempting to convert it into pixels.";
- @return mq-px2em($px * 1px, $base-font-size);
- } @else if unit($px) == em {
- @return $px;
- }
- @return ($px / $base-font-size) * 1em;
-}
-
-/// Get a breakpoint's width
-///
-/// @param {String} $name - Name of the breakpoint. One of $mq-breakpoints
-///
-/// @example scss
-/// $tablet-width: mq-get-breakpoint-width(tablet);
-/// @media (min-width: mq-get-breakpoint-width(desktop)) {}
-///
-/// @requires {Variable} $mq-breakpoints
-///
-/// @returns {Number} Value in pixels
-@function mq-get-breakpoint-width($name, $breakpoints: $mq-breakpoints) {
- @if map-has-key($breakpoints, $name) {
- @return map-get($breakpoints, $name);
- } @else {
- @warn "Breakpoint #{$name} wasn't found in $breakpoints.";
- }
-}
-
-/// Media Query mixin
-///
-/// @param {String | Boolean} $from (false) - One of $mq-breakpoints
-/// @param {String | Boolean} $until (false) - One of $mq-breakpoints
-/// @param {String | Boolean} $and (false) - Additional media query parameters
-/// @param {String} $media-type ($mq-media-type) - Media type: screen, printâ¦
-///
-/// @ignore Undocumented API, for advanced use only:
-/// @ignore @param {Map} $breakpoints ($mq-breakpoints)
-/// @ignore @param {String} $static-breakpoint ($mq-static-breakpoint)
-///
-/// @content styling rules, wrapped into a @media query when $responsive is true
-///
-/// @requires {Variable} $mq-media-type
-/// @requires {Variable} $mq-breakpoints
-/// @requires {Variable} $mq-static-breakpoint
-/// @requires {function} mq-px2em
-/// @requires {function} mq-get-breakpoint-width
-///
-/// @link https://github.com/sass-mq/sass-mq#responsive-mode-on-default Full documentation and examples
-///
-/// @example scss
-/// .element {
-/// @include mq($from: mobile) {
-/// color: red;
-/// }
-/// @include mq($until: tablet) {
-/// color: blue;
-/// }
-/// @include mq(mobile, tablet) {
-/// color: green;
-/// }
-/// @include mq($from: tablet, $and: '(orientation: landscape)') {
-/// color: teal;
-/// }
-/// @include mq(950px) {
-/// color: hotpink;
-/// }
-/// @include mq(tablet, $media-type: screen) {
-/// color: hotpink;
-/// }
-/// // Advanced use:
-/// $my-breakpoints: (L: 900px, XL: 1200px);
-/// @include mq(L, $breakpoints: $my-breakpoints, $static-breakpoint: L) {
-/// color: hotpink;
-/// }
-/// }
-@mixin mq(
- $from: false,
- $until: false,
- $and: false,
- $media-type: $mq-media-type,
- $breakpoints: $mq-breakpoints,
- $responsive: $mq-responsive,
- $static-breakpoint: $mq-static-breakpoint
-) {
- $min-width: 0;
- $max-width: 0;
- $media-query: '';
-
- // From: this breakpoint (inclusive)
- @if $from {
- @if type-of($from) == number {
- $min-width: mq-px2em($from);
- } @else {
- $min-width: mq-px2em(mq-get-breakpoint-width($from, $breakpoints));
- }
- }
-
- // Until: that breakpoint (exclusive)
- @if $until {
- @if type-of($until) == number {
- $max-width: mq-px2em($until);
- } @else {
- $max-width: mq-px2em(mq-get-breakpoint-width($until, $breakpoints)) - .01em;
- }
- }
-
- // Responsive support is disabled, rasterize the output outside @media blocks
- // The browser will rely on the cascade itself.
- @if $responsive == false {
- $static-breakpoint-width: mq-get-breakpoint-width($static-breakpoint, $breakpoints);
- $target-width: mq-px2em($static-breakpoint-width);
-
- // Output only rules that start at or span our target width
- @if (
- $and == false
- and $min-width <= $target-width
- and (
- $until == false or $max-width >= $target-width
- )
- ) {
- @content;
- }
- }
-
- // Responsive support is enabled, output rules inside @media queries
- @else {
- @if $min-width != 0 { $media-query: '#{$media-query} and (min-width: #{$min-width})'; }
- @if $max-width != 0 { $media-query: '#{$media-query} and (max-width: #{$max-width})'; }
- @if $and { $media-query: '#{$media-query} and #{$and}'; }
-
- // Remove unnecessary media query prefix 'all and '
- @if ($media-type == 'all' and $media-query != '') {
- $media-type: '';
- $media-query: str-slice(unquote($media-query), 6);
- }
-
- @media #{$media-type + $media-query} {
- @content;
- }
- }
-}
-
-/// Add a breakpoint
-///
-/// @param {String} $name - Name of the breakpoint
-/// @param {Number} $width - Width of the breakpoint
-///
-/// @requires {Variable} $mq-breakpoints
-///
-/// @example scss
-/// @include mq-add-breakpoint(tvscreen, 1920px);
-/// @include mq(tvscreen) {}
-@mixin mq-add-breakpoint($name, $width) {
- $new-breakpoint: ($name: $width);
- $mq-breakpoints: map-merge($mq-breakpoints, $new-breakpoint) !global;
-}
-
-/// Show the active breakpoint in the top right corner of the viewport
-/// @link https://github.com/sass-mq/sass-mq#seeing-the-currently-active-breakpoint
-///
-/// @param {List} $show-breakpoints ($mq-show-breakpoints) - List of breakpoints to show in the top right corner
-/// @param {Map} $breakpoints ($mq-breakpoints) - Breakpoint names and sizes
-///
-/// @requires {Variable} $mq-breakpoints
-/// @requires {Variable} $mq-show-breakpoints
-///
-/// @example scss
-/// // Show breakpoints using global settings
-/// @include mq-show-breakpoints;
-///
-/// // Show breakpoints using custom settings
-/// @include mq-show-breakpoints((L, XL), (S: 300px, L: 800px, XL: 1200px));
-@mixin mq-show-breakpoints($show-breakpoints: $mq-show-breakpoints, $breakpoints: $mq-breakpoints) {
- body:before {
- background-color: #FCF8E3;
- border-bottom: 1px solid #FBEED5;
- border-left: 1px solid #FBEED5;
- color: #C09853;
- font: small-caption;
- padding: 3px 6px;
- pointer-events: none;
- position: fixed;
- right: 0;
- top: 0;
- z-index: 100;
-
- // Loop through the breakpoints that should be shown
- @each $show-breakpoint in $show-breakpoints {
- $width: mq-get-breakpoint-width($show-breakpoint, $breakpoints);
- @include mq($show-breakpoint, $breakpoints: $breakpoints) {
- content: "#{$show-breakpoint} ⥠#{$width} (#{mq-px2em($width)})";
- }
- }
- }
-}
-
-@if length($mq-show-breakpoints) > 0 {
- @include mq-show-breakpoints;
-}
diff --git a/app/themes/base/static/src/sass/libs/typey/_typey.scss b/app/themes/base/static/src/sass/libs/typey/_typey.scss
deleted file mode 100755
index 73717b96..00000000
--- a/app/themes/base/static/src/sass/libs/typey/_typey.scss
+++ /dev/null
@@ -1,37 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-@import "typey/functions/helpers";
-@import "typey/functions/validators";
-@import "typey/functions/em-calculators";
-@import "typey/functions/outputters";
-@import "typey/functions/sizers";
-@import "typey/functions/extras";
-@import "typey/functions/depreciated";
-@import "typey/font-stacks";
-@import "typey/defaults";
-@import "typey/mixins/debug";
-@import "typey/mixins/define-type-sizing";
-@import "typey/mixins/font-size";
-@import "typey/mixins/line-height";
-@import "typey/mixins/spacing";
-@import "typey/mixins/typeface";
-@import "typey/mixins/typeset";
-@import "typey/mixins/type-layout";
diff --git a/app/themes/base/static/src/sass/libs/typey/config.codekit b/app/themes/base/static/src/sass/libs/typey/config.codekit
deleted file mode 100755
index 56d76193..00000000
--- a/app/themes/base/static/src/sass/libs/typey/config.codekit
+++ /dev/null
@@ -1,943 +0,0 @@
-{
-"CodeKitInfo": "This is a CodeKit 2.x project configuration file. It is designed to sync project settings across multiple machines. MODIFYING THE CONTENTS OF THIS FILE IS A POOR LIFE DECISION. If you do so, you will likely cause CodeKit to crash. This file is not useful unless accompanied by the project that created it in CodeKit 2. This file is not backwards-compatible with CodeKit 1.x. For more information, see: http:\/\/incident57.com\/codekit",
-"creatorBuild": "18493",
-"files": {
- "\/_typey.scss": {
- "createSourceMap": 0,
- "debugStyle": 0,
- "decimalPrecision": 10,
- "fileType": 4,
- "ignore": 1,
- "ignoreWasSetByUser": 0,
- "inputAbbreviatedPath": "\/_typey.scss",
- "outputAbbreviatedPath": "\/css\/_typey.css",
- "outputPathIsOutsideProject": 0,
- "outputPathIsSetByUser": 0,
- "outputStyle": 0,
- "shouldRunAutoprefixer": 0,
- "shouldRunBless": 0,
- "useLibsass": 0
- },
- "\/typey\/_defaults.scss": {
- "createSourceMap": 0,
- "debugStyle": 0,
- "decimalPrecision": 10,
- "fileType": 4,
- "ignore": 1,
- "ignoreWasSetByUser": 0,
- "inputAbbreviatedPath": "\/typey\/_defaults.scss",
- "outputAbbreviatedPath": "\/css\/_defaults.css",
- "outputPathIsOutsideProject": 0,
- "outputPathIsSetByUser": 0,
- "outputStyle": 0,
- "shouldRunAutoprefixer": 0,
- "shouldRunBless": 0,
- "useLibsass": 0
- },
- "\/typey\/_font-size.scss": {
- "createSourceMap": 0,
- "debugStyle": 0,
- "decimalPrecision": 10,
- "fileType": 4,
- "ignore": 1,
- "ignoreWasSetByUser": 0,
- "inputAbbreviatedPath": "\/typey\/_font-size.scss",
- "outputAbbreviatedPath": "\/css\/_font-size.css",
- "outputPathIsOutsideProject": 0,
- "outputPathIsSetByUser": 0,
- "outputStyle": 0,
- "shouldRunAutoprefixer": 0,
- "shouldRunBless": 0,
- "useLibsass": 0
- },
- "\/typey\/_font-stacks.scss": {
- "createSourceMap": 0,
- "debugStyle": 0,
- "decimalPrecision": 10,
- "fileType": 4,
- "ignore": 1,
- "ignoreWasSetByUser": 0,
- "inputAbbreviatedPath": "\/typey\/_font-stacks.scss",
- "outputAbbreviatedPath": "\/css\/_font-stacks.css",
- "outputPathIsOutsideProject": 0,
- "outputPathIsSetByUser": 0,
- "outputStyle": 0,
- "shouldRunAutoprefixer": 0,
- "shouldRunBless": 0,
- "useLibsass": 0
- },
- "\/typey\/_font-weight.scss": {
- "createSourceMap": 0,
- "debugStyle": 0,
- "decimalPrecision": 10,
- "fileType": 4,
- "ignore": 1,
- "ignoreWasSetByUser": 0,
- "inputAbbreviatedPath": "\/typey\/_font-weight.scss",
- "outputAbbreviatedPath": "\/css\/_font-weight.css",
- "outputPathIsOutsideProject": 0,
- "outputPathIsSetByUser": 0,
- "outputStyle": 0,
- "shouldRunAutoprefixer": 0,
- "shouldRunBless": 0,
- "useLibsass": 0
- },
- "\/typey\/_helpers.scss": {
- "createSourceMap": 0,
- "debugStyle": 0,
- "decimalPrecision": 10,
- "fileType": 4,
- "ignore": 1,
- "ignoreWasSetByUser": 0,
- "inputAbbreviatedPath": "\/typey\/_helpers.scss",
- "outputAbbreviatedPath": "\/css\/_helpers.css",
- "outputPathIsOutsideProject": 0,
- "outputPathIsSetByUser": 0,
- "outputStyle": 0,
- "shouldRunAutoprefixer": 0,
- "shouldRunBless": 0,
- "useLibsass": 0
- },
- "\/typey\/_line-height.scss": {
- "createSourceMap": 0,
- "debugStyle": 0,
- "decimalPrecision": 10,
- "fileType": 4,
- "ignore": 1,
- "ignoreWasSetByUser": 0,
- "inputAbbreviatedPath": "\/typey\/_line-height.scss",
- "outputAbbreviatedPath": "\/css\/_line-height.css",
- "outputPathIsOutsideProject": 0,
- "outputPathIsSetByUser": 0,
- "outputStyle": 0,
- "shouldRunAutoprefixer": 0,
- "shouldRunBless": 0,
- "useLibsass": 0
- }
- },
-"hooks": [
- ],
-"lastSavedByUser": "jack",
-"manualImportLinks": {
- },
-"projectAttributes": {
- "bowerAbbreviatedPath": "",
- "displayValue": "stylesheets",
- "displayValueWasSetByUser": 0,
- "iconImageName": "harddrive_darkGray"
- },
-"projectSettings": {
- "alwaysUseExternalServer": 0,
- "animateCSSInjections": 1,
- "autoApplyPSLanguageSettingsStyle": 0,
- "autoprefixerBrowserString": "> 1%, last 2 versions, Firefox ESR, Opera 12.1",
- "autoSyncProjectSettingsFile": 1,
- "browserRefreshDelay": 0,
- "coffeeAutoOutputPathEnabled": 1,
- "coffeeAutoOutputPathFilenamePattern": "*.js",
- "coffeeAutoOutputPathRelativePath": "",
- "coffeeAutoOutputPathReplace1": "",
- "coffeeAutoOutputPathReplace2": "",
- "coffeeAutoOutputPathStyle": 0,
- "coffeeCreateSourceMap": 0,
- "coffeeLintFlags2": {
- "arrow_spacing": {
- "active": 0,
- "flagValue": -1
- },
- "camel_case_classes": {
- "active": 1,
- "flagValue": -1
- },
- "colon_assignment_spacing": {
- "active": 0,
- "flagValue": 1
- },
- "cyclomatic_complexity": {
- "active": 0,
- "flagValue": 10
- },
- "duplicate_key": {
- "active": 1,
- "flagValue": -1
- },
- "empty_constructor_needs_parens": {
- "active": 0,
- "flagValue": -1
- },
- "ensure_comprehensions": {
- "active": 1,
- "flagValue": -1
- },
- "indentation": {
- "active": 1,
- "flagValue": 2
- },
- "line_endings": {
- "active": 0,
- "flagValue": 0
- },
- "max_line_length": {
- "active": 0,
- "flagValue": 150
- },
- "missing_fat_arrows": {
- "active": 0,
- "flagValue": -1
- },
- "newlines_after_classes": {
- "active": 0,
- "flagValue": 3
- },
- "no_backticks": {
- "active": 1,
- "flagValue": -1
- },
- "no_debugger": {
- "active": 1,
- "flagValue": -1
- },
- "no_empty_functions": {
- "active": 0,
- "flagValue": -1
- },
- "no_empty_param_list": {
- "active": 0,
- "flagValue": -1
- },
- "no_implicit_braces": {
- "active": 1,
- "flagValue": -1
- },
- "no_implicit_parens": {
- "active": 0,
- "flagValue": -1
- },
- "no_interpolation_in_single_quotes": {
- "active": 0,
- "flagValue": -1
- },
- "no_plusplus": {
- "active": 0,
- "flagValue": -1
- },
- "no_stand_alone_at": {
- "active": 1,
- "flagValue": -1
- },
- "no_tabs": {
- "active": 1,
- "flagValue": -1
- },
- "no_throwing_strings": {
- "active": 1,
- "flagValue": -1
- },
- "no_trailing_semicolons": {
- "active": 1,
- "flagValue": -1
- },
- "no_trailing_whitespace": {
- "active": 1,
- "flagValue": -1
- },
- "no_unnecessary_double_quotes": {
- "active": 0,
- "flagValue": -1
- },
- "no_unnecessary_fat_arrows": {
- "active": 1,
- "flagValue": -1
- },
- "non_empty_constructor_needs_parens": {
- "active": 0,
- "flagValue": -1
- },
- "prefer_english_operator": {
- "active": 0,
- "flagValue": -1
- },
- "space_operators": {
- "active": 0,
- "flagValue": -1
- },
- "spacing_after_comma": {
- "active": 1,
- "flagValue": -1
- }
- },
- "coffeeMinifyOutput": 1,
- "coffeeOutputStyle": 0,
- "coffeeSyntaxCheckerStyle": 1,
- "externalServerAddress": "http:\/\/localhost:8888",
- "externalServerPreviewPathAddition": "",
- "genericWebpageFileExtensionsString": "html, htm, shtml, shtm, xhtml, php, jsp, asp, aspx, erb, ctp",
- "hamlAutoOutputPathEnabled": 1,
- "hamlAutoOutputPathFilenamePattern": "*.html",
- "hamlAutoOutputPathRelativePath": "",
- "hamlAutoOutputPathReplace1": "",
- "hamlAutoOutputPathReplace2": "",
- "hamlAutoOutputPathStyle": 0,
- "hamlEscapeHTMLCharacters": 0,
- "hamlNoEscapeInAttributes": 0,
- "hamlOutputFormat": 2,
- "hamlOutputStyle": 0,
- "hamlUseCDATA": 0,
- "hamlUseDoubleQuotes": 0,
- "hamlUseUnixNewlines": 0,
- "jadeAutoOutputPathEnabled": 1,
- "jadeAutoOutputPathFilenamePattern": "*.html",
- "jadeAutoOutputPathRelativePath": "",
- "jadeAutoOutputPathReplace1": "",
- "jadeAutoOutputPathReplace2": "",
- "jadeAutoOutputPathStyle": 0,
- "jadeCompileDebug": 1,
- "jadeOutputStyle": 0,
- "javascriptAutoOutputPathEnabled": 1,
- "javascriptAutoOutputPathFilenamePattern": "*-min.js",
- "javascriptAutoOutputPathRelativePath": "\/min",
- "javascriptAutoOutputPathReplace1": "",
- "javascriptAutoOutputPathReplace2": "",
- "javascriptAutoOutputPathStyle": 2,
- "javascriptCreateSourceMap": 1,
- "javascriptOutputStyle": 1,
- "javascriptSyntaxCheckerStyle": 1,
- "jsCheckerReservedNamesString": "",
- "jsHintFlags2": {
- "asi": {
- "active": 0,
- "flagValue": -1
- },
- "bitwise": {
- "active": 1,
- "flagValue": -1
- },
- "boss": {
- "active": 0,
- "flagValue": -1
- },
- "browser": {
- "active": 1,
- "flagValue": -1
- },
- "browserify": {
- "active": 0,
- "flagValue": -1
- },
- "camelcase": {
- "active": 0,
- "flagValue": -1
- },
- "couch": {
- "active": 0,
- "flagValue": -1
- },
- "curly": {
- "active": 1,
- "flagValue": -1
- },
- "debug": {
- "active": 0,
- "flagValue": -1
- },
- "devel": {
- "active": 0,
- "flagValue": -1
- },
- "dojo": {
- "active": 0,
- "flagValue": -1
- },
- "elision": {
- "active": 1,
- "flagValue": -1
- },
- "eqeqeq": {
- "active": 1,
- "flagValue": -1
- },
- "eqnull": {
- "active": 0,
- "flagValue": -1
- },
- "es3": {
- "active": 0,
- "flagValue": -1
- },
- "esnext": {
- "active": 0,
- "flagValue": -1
- },
- "evil": {
- "active": 0,
- "flagValue": -1
- },
- "expr": {
- "active": 0,
- "flagValue": -1
- },
- "forin": {
- "active": 0,
- "flagValue": -1
- },
- "freeze": {
- "active": 1,
- "flagValue": -1
- },
- "funcscope": {
- "active": 0,
- "flagValue": -1
- },
- "globalstrict": {
- "active": 0,
- "flagValue": -1
- },
- "immed": {
- "active": 0,
- "flagValue": -1
- },
- "indent": {
- "active": 0,
- "flagValue": 4
- },
- "iterator": {
- "active": 0,
- "flagValue": -1
- },
- "jasmine": {
- "active": 0,
- "flagValue": -1
- },
- "jquery": {
- "active": 1,
- "flagValue": -1
- },
- "lastsemic": {
- "active": 0,
- "flagValue": -1
- },
- "latedef": {
- "active": 1,
- "flagValue": -1
- },
- "laxbreak": {
- "active": 0,
- "flagValue": -1
- },
- "laxcomma": {
- "active": 0,
- "flagValue": -1
- },
- "loopfunc": {
- "active": 0,
- "flagValue": -1
- },
- "maxcomplexity": {
- "active": 0,
- "flagValue": 10
- },
- "maxdepth": {
- "active": 0,
- "flagValue": 3
- },
- "maxlen": {
- "active": 0,
- "flagValue": 150
- },
- "maxparams": {
- "active": 0,
- "flagValue": 3
- },
- "maxstatements": {
- "active": 0,
- "flagValue": 4
- },
- "mocha": {
- "active": 0,
- "flagValue": -1
- },
- "mootools": {
- "active": 0,
- "flagValue": -1
- },
- "moz": {
- "active": 0,
- "flagValue": -1
- },
- "multistr": {
- "active": 0,
- "flagValue": -1
- },
- "newcap": {
- "active": 1,
- "flagValue": -1
- },
- "noarg": {
- "active": 1,
- "flagValue": -1
- },
- "node": {
- "active": 0,
- "flagValue": -1
- },
- "noempty": {
- "active": 0,
- "flagValue": -1
- },
- "nonbsp": {
- "active": 0,
- "flagValue": -1
- },
- "nonew": {
- "active": 1,
- "flagValue": -1
- },
- "nonstandard": {
- "active": 0,
- "flagValue": -1
- },
- "notypeof": {
- "active": 1,
- "flagValue": -1
- },
- "noyield": {
- "active": 0,
- "flagValue": -1
- },
- "onecase": {
- "active": 0,
- "flagValue": -1
- },
- "phantom": {
- "active": 0,
- "flagValue": -1
- },
- "plusplus": {
- "active": 0,
- "flagValue": -1
- },
- "proto": {
- "active": 0,
- "flagValue": -1
- },
- "prototypejs": {
- "active": 0,
- "flagValue": -1
- },
- "qunit": {
- "active": 0,
- "flagValue": -1
- },
- "regexp": {
- "active": 1,
- "flagValue": -1
- },
- "rhino": {
- "active": 0,
- "flagValue": -1
- },
- "scripturl": {
- "active": 0,
- "flagValue": -1
- },
- "shadow": {
- "active": 0,
- "flagValue": -1
- },
- "shelljs": {
- "active": 0,
- "flagValue": -1
- },
- "singleGroups": {
- "active": 0,
- "flagValue": -1
- },
- "strict": {
- "active": 0,
- "flagValue": -1
- },
- "sub": {
- "active": 0,
- "flagValue": -1
- },
- "supernew": {
- "active": 0,
- "flagValue": -1
- },
- "typed": {
- "active": 0,
- "flagValue": -1
- },
- "undef": {
- "active": 1,
- "flagValue": -1
- },
- "unused": {
- "active": 1,
- "flagValue": -1
- },
- "withstmt": {
- "active": 0,
- "flagValue": -1
- },
- "worker": {
- "active": 0,
- "flagValue": -1
- },
- "wsh": {
- "active": 0,
- "flagValue": -1
- },
- "yui": {
- "active": 0,
- "flagValue": -1
- }
- },
- "jsLintFlags2": {
- "ass": {
- "active": 0,
- "flagValue": -1
- },
- "bitwise": {
- "active": 0,
- "flagValue": -1
- },
- "browser": {
- "active": 1,
- "flagValue": -1
- },
- "closure": {
- "active": 0,
- "flagValue": -1
- },
- "continue": {
- "active": 0,
- "flagValue": -1
- },
- "debug": {
- "active": 0,
- "flagValue": -1
- },
- "devel": {
- "active": 0,
- "flagValue": -1
- },
- "eqeq": {
- "active": 0,
- "flagValue": -1
- },
- "evil": {
- "active": 0,
- "flagValue": -1
- },
- "forin": {
- "active": 0,
- "flagValue": -1
- },
- "indent": {
- "active": 0,
- "flagValue": 4
- },
- "maxlen": {
- "active": 0,
- "flagValue": 150
- },
- "newcap": {
- "active": 0,
- "flagValue": -1
- },
- "node": {
- "active": 0,
- "flagValue": -1
- },
- "nomen": {
- "active": 0,
- "flagValue": -1
- },
- "plusplus": {
- "active": 0,
- "flagValue": -1
- },
- "properties": {
- "active": 0,
- "flagValue": -1
- },
- "regexp": {
- "active": 0,
- "flagValue": -1
- },
- "rhino": {
- "active": 0,
- "flagValue": -1
- },
- "sloppy": {
- "active": 0,
- "flagValue": -1
- },
- "stupid": {
- "active": 0,
- "flagValue": -1
- },
- "sub": {
- "active": 0,
- "flagValue": -1
- },
- "todo": {
- "active": 0,
- "flagValue": -1
- },
- "unparam": {
- "active": 0,
- "flagValue": -1
- },
- "vars": {
- "active": 0,
- "flagValue": -1
- },
- "white": {
- "active": 0,
- "flagValue": -1
- }
- },
- "kitAutoOutputPathEnabled": 1,
- "kitAutoOutputPathFilenamePattern": "*.html",
- "kitAutoOutputPathRelativePath": "",
- "kitAutoOutputPathReplace1": "",
- "kitAutoOutputPathReplace2": "",
- "kitAutoOutputPathStyle": 0,
- "lessAllowInsecureImports": 0,
- "lessAutoOutputPathEnabled": 1,
- "lessAutoOutputPathFilenamePattern": "*.css",
- "lessAutoOutputPathRelativePath": "..\/css",
- "lessAutoOutputPathReplace1": "less",
- "lessAutoOutputPathReplace2": "css",
- "lessAutoOutputPathStyle": 2,
- "lessCreateSourceMap": 0,
- "lessDisableJavascript": 0,
- "lessIeCompatibility": 1,
- "lessOutputStyle": 0,
- "lessRelativeURLS": 0,
- "lessStrictImports": 0,
- "lessStrictMath": 0,
- "lessStrictUnits": 0,
- "markdownAutoOutputPathEnabled": 1,
- "markdownAutoOutputPathFilenamePattern": "*.html",
- "markdownAutoOutputPathRelativePath": "",
- "markdownAutoOutputPathReplace1": "",
- "markdownAutoOutputPathReplace2": "",
- "markdownAutoOutputPathStyle": 0,
- "markdownEnableFootnotes": 0,
- "markdownEnableSmartyPants": 1,
- "markdownExpandTabs": 1,
- "reloadFileURLs": 0,
- "sassAutoOutputPathEnabled": 1,
- "sassAutoOutputPathFilenamePattern": "*.css",
- "sassAutoOutputPathRelativePath": "..\/css",
- "sassAutoOutputPathReplace1": "sass",
- "sassAutoOutputPathReplace2": "css",
- "sassAutoOutputPathStyle": 2,
- "sassCreateSourceMap": 0,
- "sassDebugStyle": 0,
- "sassDecimalPrecision": 10,
- "sassOutputStyle": 0,
- "sassUseLibsass": 0,
- "shouldRunAutoprefixer": 0,
- "shouldRunBless": 0,
- "skippedItemsString": ".svn, .git, .hg, log, _logs, _cache, cache, logs, node_modules",
- "slimAutoOutputPathEnabled": 1,
- "slimAutoOutputPathFilenamePattern": "*.html",
- "slimAutoOutputPathRelativePath": "",
- "slimAutoOutputPathReplace1": "",
- "slimAutoOutputPathReplace2": "",
- "slimAutoOutputPathStyle": 0,
- "slimCompileOnly": 0,
- "slimLogicless": 0,
- "slimOutputFormat": 0,
- "slimOutputStyle": 1,
- "slimRailsCompatible": 0,
- "stylusAutoOutputPathEnabled": 1,
- "stylusAutoOutputPathFilenamePattern": "*.css",
- "stylusAutoOutputPathRelativePath": "..\/css",
- "stylusAutoOutputPathReplace1": "stylus",
- "stylusAutoOutputPathReplace2": "css",
- "stylusAutoOutputPathStyle": 2,
- "stylusCreateSourceMap": 0,
- "stylusDebugStyle": 0,
- "stylusImportCSS": 0,
- "stylusOutputStyle": 0,
- "stylusResolveRelativeURLS": 0,
- "typescriptAutoOutputPathEnabled": 1,
- "typescriptAutoOutputPathFilenamePattern": "*.js",
- "typescriptAutoOutputPathRelativePath": "\/js",
- "typescriptAutoOutputPathReplace1": "",
- "typescriptAutoOutputPathReplace2": "",
- "typescriptAutoOutputPathStyle": 2,
- "typescriptCreateDeclarationFile": 0,
- "typescriptCreateSourceMap": 0,
- "typescriptMinifyOutput": 0,
- "typescriptModuleType": 0,
- "typescriptNoImplicitAny": 0,
- "typescriptPreserveConstEnums": 0,
- "typescriptRemoveComments": 0,
- "typescriptSuppressImplicitAnyIndexErrors": 0,
- "typescriptTargetECMAVersion": 0,
- "uglifyDefinesString": "",
- "uglifyFlags2": {
- "ascii-only": {
- "active": 0,
- "flagValue": -1
- },
- "booleans": {
- "active": 1,
- "flagValue": -1
- },
- "bracketize": {
- "active": 0,
- "flagValue": -1
- },
- "cascade": {
- "active": 1,
- "flagValue": -1
- },
- "comments": {
- "active": 1,
- "flagValue": -1
- },
- "comparisons": {
- "active": 1,
- "flagValue": -1
- },
- "compress": {
- "active": 1,
- "flagValue": -1
- },
- "conditionals": {
- "active": 1,
- "flagValue": -1
- },
- "dead_code": {
- "active": 0,
- "flagValue": -1
- },
- "drop_console": {
- "active": 0,
- "flagValue": -1
- },
- "drop_debugger": {
- "active": 1,
- "flagValue": -1
- },
- "eval": {
- "active": 0,
- "flagValue": -1
- },
- "evaluate": {
- "active": 1,
- "flagValue": -1
- },
- "hoist_funs": {
- "active": 1,
- "flagValue": -1
- },
- "hoist_vars": {
- "active": 0,
- "flagValue": -1
- },
- "if_return": {
- "active": 1,
- "flagValue": -1
- },
- "indent-level": {
- "active": 0,
- "flagValue": 4
- },
- "indent-start": {
- "active": 0,
- "flagValue": 0
- },
- "inline-script": {
- "active": 0,
- "flagValue": -1
- },
- "join_vars": {
- "active": 1,
- "flagValue": -1
- },
- "keep_fargs": {
- "active": 0,
- "flagValue": -1
- },
- "loops": {
- "active": 1,
- "flagValue": -1
- },
- "mangle": {
- "active": 1,
- "flagValue": -1
- },
- "max-line-len": {
- "active": 1,
- "flagValue": 32000
- },
- "negate_iife": {
- "active": 1,
- "flagValue": -1
- },
- "properties": {
- "active": 1,
- "flagValue": -1
- },
- "pure_getters": {
- "active": 0,
- "flagValue": -1
- },
- "quote-keys": {
- "active": 0,
- "flagValue": -1
- },
- "screw-ie8": {
- "active": 0,
- "flagValue": -1
- },
- "semicolons": {
- "active": 1,
- "flagValue": -1
- },
- "sequences": {
- "active": 1,
- "flagValue": -1
- },
- "sort": {
- "active": 0,
- "flagValue": -1
- },
- "space-colon": {
- "active": 1,
- "flagValue": -1
- },
- "toplevel": {
- "active": 0,
- "flagValue": -1
- },
- "unsafe": {
- "active": 0,
- "flagValue": -1
- },
- "unused": {
- "active": 0,
- "flagValue": -1
- },
- "warnings": {
- "active": 0,
- "flagValue": -1
- },
- "width": {
- "active": 1,
- "flagValue": 80
- }
- },
- "uglifyReservedNamesString": "$",
- "websiteRelativeRoot": ""
- },
-"settingsFileVersion": "2"
-}
\ No newline at end of file
diff --git a/app/themes/base/static/src/sass/libs/typey/typey/_defaults.scss b/app/themes/base/static/src/sass/libs/typey/typey/_defaults.scss
deleted file mode 100755
index 550a1528..00000000
--- a/app/themes/base/static/src/sass/libs/typey/typey/_defaults.scss
+++ /dev/null
@@ -1,190 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-// The browser font size default. No need to change this.
-// Allowed units: px
-$browser-font-size: 16px !default;
-
-// Allowed units: rem, em or px
-$base-unit: rem !default;
-
-// The base font size will be used for most calculations involving font-size.
-// Allowed units: px
-$base-font-size: 16px !default;
-
-// The base line height will be used for most calculations involving height.
-// Allowed units: px
-$base-line-height: 24px !default;
-
-// The method to calculate line-height. Allowed values: rhythm or ratio.
-// Rhytm uses a vertical rhythm approach where line-height is specified as
-// a multiple of the $base-line-height.
-// Ratio uses a ratio approach where line-height is specified as a ratio
-// of the elements font-size.
-$line-height-method: rhythm !default;
-
-// The default ratio of line-height to font-size.
-$base-line-height-ratio: 1.5 !default;
-
-// By default we will provide fallbacks when rem is the base unit.
-$rem-fallback: true !default;
-
-// By default, when rem or em are the base unit we will output a print suitable
-// media query with the define-type-sizing() mixin. This will take care of all
-// print media type sizing effortlessly.
-$auto-print-sizing: true !default;
-
-// The pt font-size to be used with the print media query when
-// $auto-print-sizing is enabled.
-// Allowed units: pt
-$print-font-size: 12pt !default;
-
-// Default font sizes
-// Once you redefine the $font-size map it will overwrite all sizes here.
-// Allowed units: px
-$font-size: (
- xxxl: 60px,
- xxl: 46px,
- xl: 32px,
- l: 24px,
- m: 16px,
- s: 14px,
- xs: 12px
-) !default;
-
-// Default font weights
-// This map and accompanying function help provide granular control over
-// setting and retrieving static font weights.
-$font-weight: (
- bold: 700,
- normal: 400,
- lighter: 200
-) !default;
-
-// Declare typefaces
-// These can use any key you like, and allow you to set global letter-spacing,
-// weight and case for font-families. You can then use the
-// font-family mixin to embed your font families anywhere you like.
-//
-// Each key in the $typefaces map can either be a keyed map of settings
-// using any combination of the keys below, or it can be a shorthand list
-// of each property value. When using shorthand it doesn't matter what order
-// each value is arranged in, but best practice is to do it in the order:
-// [font-family] [letter-spacing] [weight] [case]
-//
-// @setting list font-family
-// Any standard CSS font-family. Use typey pre-written stacks or roll your own.
-// @setting number letter-spacing
-// CSS letter-spacing. Specified as a px value when font-size is the
-// $base-font-size.
-// @setting string weight
-// A key from the $font-weight map. Only specify this if you want a consistant
-// font-weight used accross the board with this typeface.
-// @setting string case
-// A value for CSS text-transform. Only specify this if you want a consistant
-// case used accross the board with this typeface.
-$typefaces: () !default;
-
-// Declare typestyles
-// These can use any key you like, and allow you to set an easily reusable type
-// style. They can be as simple as a font-size and line-height, or can go on
-// to encompass a full range of css type properties.
-//
-// Each key in the $typestyles map can either be a keyed map of settings
-// using any combination of the keys below, or it can be a shorthand list
-// of each property value. When using shorthand for $typestyles, the first value
-// must always be font-size. After that it doesn't matter what order each value
-// is arranged in, but best practice is to do it in the order:
-// [font-size] [line-height] [weight] [case]
-//
-// @setting number|string font-size
-// A size from the $font-size map or px value to be converted
-// @setting number $x line-height
-// Multiple of line height, ratio or px value to be converted.
-// @setting string weight
-// A key from the $font-weight map.
-// @setting string case
-// A value for CSS text-transform.
-$typestyles: () !default;
-
-// Debug grid
-// Shows horizontal lines for each elements line height.
-$typey-debug: false !default;
-
-// Debug grid coloring
-$typey-debug-color: #4affff !default;
-
-// Warnings for $base-unit.
-@if $base-unit != px and $base-unit != rem and $base-unit != em {
- @error "$base-unit must be one of the following unit types: rem, em or px";
-}
-
-// Warnings for $base-font-size and $base-line-height.
-@if unit($base-font-size) != px {
- @error "$base-font-size must be in px";
-}
-@if unit($base-line-height) != px {
- @error "$base-line-height must be in px";
-}
-
-// Warnings for $print-font-size.
-@if unit($print-font-size) != pt {
- @error "$print-font-size must be in pt";
-}
-
-// Warnings for $font-size.
-@each $key, $size in $font-size {
- @if unit($size) != px {
- @error "Size '#{$key}' in $font-size map is not specified in px";
- }
-}
-
-// Warnings for $font-weight.
-$typey-text-transform-properties: none capitalize uppercase lowercase initial inherit;
-@each $property in $typey-text-transform-properties {
- @if map-has-key($font-weight, $property) {
- @warn "'#{$property}' used in $font-weight map is a potential value of the text-transform property and will conflict when using typey shorthand";
- }
-}
-
-// Warnings for $typefaces.
-@each $key, $typeface in $typefaces {
- @if type-of($typeface) != "map" and type-of($typeface) != "list" {
- @error "Typeface '#{$key}' in $typefaces map must be a keyed map or a shorthand list in the format: [font-family] [letter-spacing] [weight] [case]";
- }
-}
-
-// Warnings for $typestyles.
-@each $key, $typestyle in $typestyles {
- @if type-of($typestyle) != "map" and type-of($typestyle) != "list" {
- @error "Typestyle '#{$key}' in $typestyles map must be a keyed map or a shorthand list in the format: [font-size] [line-height] [weight] [case]";
- }
- @if type-of($typestyle) == "list" {
- @each $value in $typestyle {
- @if index($typestyle, $value) == 1 {
- $allowed-types: "font-size", "px";
- $type: typey-check-value($value);
- @if index($allowed-types, $type) == null {
- @error "Incorrect shorthand format used in '#{$key}' in $typestyles map: [font-size] must appear first";
- }
- }
- }
- }
-}
diff --git a/app/themes/base/static/src/sass/libs/typey/typey/_font-stacks.scss b/app/themes/base/static/src/sass/libs/typey/typey/_font-stacks.scss
deleted file mode 100755
index 138ecdb9..00000000
--- a/app/themes/base/static/src/sass/libs/typey/typey/_font-stacks.scss
+++ /dev/null
@@ -1,24 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-// Three standard do-all stacks.
-$serif-stack: "Calisto MT", "Book Antiqua", serif !default;
-$sans-serif-stack: "Helvetica Neue", Helvetica, sans-serif !default;
-$monospace-stack: Consolas, "Lucida Console", monospace, monospace !default;
diff --git a/app/themes/base/static/src/sass/libs/typey/typey/functions/_depreciated.scss b/app/themes/base/static/src/sass/libs/typey/typey/functions/_depreciated.scss
deleted file mode 100755
index c0affcd7..00000000
--- a/app/themes/base/static/src/sass/libs/typey/typey/functions/_depreciated.scss
+++ /dev/null
@@ -1,75 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-// DEPRECIATED FUNCTIONS
-// The names of these functions have been refined and namespaced (above) to avoid
-// potential confusion with functions from other libraries.
-
-// (Depreciated) Output a number in the $base-unit..
-//
-// @param string $weight
-// A weight from the $font-weight map.
-//
-// @return string
-// The selected font-weight.
-@function output-unit($number) {
- @warn "output-unit() is depreciated. Please use typey-output-in-base-unit() instead";
- @return typey-output-in-base-unit($number);
-}
-
-// (Depreciated) Remove the unit from a number.
-//
-// @param number $number
-// The number (with unit) to convert. Allowed units: any
-//
-// @return number
-// The number without the unit.
-@function strip-unit($number) {
- @warn "strip-unit() is depreciated. Please use typey-strip-unit() instead";
- @return typey-strip-unit($number);
-}
-
-// (Depreciated) Convert px to the $base-unit.
-//
-// @param number $number
-// The number (with unit) to convert. Allowed units: px
-// @param number|string $context
-// (optional) Only used if em is the $base-unit. The value of the elements/parents
-// font-size if it differs from $base-font-size. Specified as a t-shirt size or
-// value in px.
-//
-// @return number
-// The number converted to the base unit.
-@function convert-unit($number, $context: $base-font-size) {
- @warn "convert-unit() is depreciated. Please use output-from-px() instead";
- @return output-from-px($number, $context);
-}
-
-// (Depreciated) Retrieve a font weight.
-//
-// @param string $weight
-// A weight from the $font-weight map.
-//
-// @return string
-// The selected font-weight.
-@function font-weight($weight) {
- @warn "font-weight() is depreciated. Please use weight() instead";
- @return weight($weight);
-}
diff --git a/app/themes/base/static/src/sass/libs/typey/typey/functions/_em-calculators.scss b/app/themes/base/static/src/sass/libs/typey/typey/functions/_em-calculators.scss
deleted file mode 100755
index c3d0c881..00000000
--- a/app/themes/base/static/src/sass/libs/typey/typey/functions/_em-calculators.scss
+++ /dev/null
@@ -1,61 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-// Calculate relative sizing for em when a px value is used.
-//
-// @param number $number
-// The px value
-// @param number|string $context
-// The relative value to perform the calculation.
-//
-// @return number
-// The calculated value in the base unit.
-@function calculate-em-px($x, $context) {
- $allowed-types: "font-size", "px";
- $type: typey-validator($context, $allowed-types);
- @if $type == "font-size" {
- $context-map-size: map-get($font-size, $context);
- @return typey-output-in-unit(($x / $context-map-size), em);
- }
- @if $type == "px" {
- @return typey-output-in-unit(($x / $context), em);
- }
-}
-
-// Calculate relative sizing for em when a multiplier is used.
-//
-// @param number $number
-// Multiple of line height to be used.
-// @param number|string $context
-// The relative value to perform the calculation.
-//
-// @return number
-// The calculated value in the base unit.
-@function calculate-em-multiplier($x, $context) {
- $allowed-types: "font-size", "px";
- $type: typey-validator($context, $allowed-types);
- @if $type == "font-size" {
- $context-map-size: map-get($font-size, $context);
- @return typey-output-in-unit(($x * $base-line-height) / $context-map-size, em);
- }
- @if $type == "px" {
- @return typey-output-in-unit(($x * $base-line-height) / $context, em);
- }
-}
diff --git a/app/themes/base/static/src/sass/libs/typey/typey/functions/_extras.scss b/app/themes/base/static/src/sass/libs/typey/typey/functions/_extras.scss
deleted file mode 100755
index 67d3b17a..00000000
--- a/app/themes/base/static/src/sass/libs/typey/typey/functions/_extras.scss
+++ /dev/null
@@ -1,54 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-// Retrieve a font weight.
-//
-// @param string $weight
-// A weight from the $font-weight map.
-//
-// @return string
-// The selected font-weight.
-@function weight($weight) {
- @if type-of($weight) == "string" {
- @if map-has-key($font-weight, $weight) {
- @return map-get($font-weight, $weight);
- }
- @else {
- @error "'#{$weight}' not found in $font-weight map";
- }
- }
- @else {
- @error "Weight specified for weight() is not a string";
- }
-}
-
-// Extend a font by adding a web-safe stack to it.
-//
-// Example usage:
-// $new-font-stack: extend-font-stack("Open sans", $sans-serif-stack);
-//
-// @param string $font
-// The name of the font. Use inverted commas if there are spaces in the font
-// name. i.e "Open sans"
-// @param list $font-stack
-// The font stack variable to extend.
-@function extend-font-stack($font, $font-stack) {
- @return join($font, $font-stack, $separator: comma);
-}
diff --git a/app/themes/base/static/src/sass/libs/typey/typey/functions/_helpers.scss b/app/themes/base/static/src/sass/libs/typey/typey/functions/_helpers.scss
deleted file mode 100755
index cfcdd17d..00000000
--- a/app/themes/base/static/src/sass/libs/typey/typey/functions/_helpers.scss
+++ /dev/null
@@ -1,79 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-// Output a number in the $base-unit.
-//
-// @param number $number
-// The number (without unit) to output.
-//
-// @return number
-// The number with the base unit
-@function typey-output-in-base-unit($number) {
- @if $number == 0 {
- @return 0;
- }
- @if $base-unit == rem {
- @return $number * 1rem;
- }
- @if $base-unit == px {
- @return $number * 1px;
- }
- @if $base-unit == em {
- @return $number * 1em;
- }
-}
-
-// Output a number in a chosen unit.
-//
-// @param number $number
-// The number (without unit) to output.
-// @param string $unit
-// (optional) The unit to output, either em, px or rem.
-//
-// @return number
-// The number with the base unit
-@function typey-output-in-unit($number, $unit: $base-unit) {
- @if $number == 0 {
- @return 0;
- }
- @if $unit == rem {
- @return $number * 1rem;
- }
- @if $unit == px {
- @return $number * 1px;
- }
- @if $unit == em {
- @return $number * 1em;
- }
-}
-
-// Remove the unit from a number.
-//
-// @param number $number
-// The number (with unit) to convert. Allowed units: any
-//
-// @return number
-// The number without the unit.
-@function typey-strip-unit($number) {
- @if type-of($number) == "number" and not unitless($number) {
- @return $number / ($number * 0 + 1);
- }
- @return $number;
-}
diff --git a/app/themes/base/static/src/sass/libs/typey/typey/functions/_outputters.scss b/app/themes/base/static/src/sass/libs/typey/typey/functions/_outputters.scss
deleted file mode 100755
index 6c7a0b4e..00000000
--- a/app/themes/base/static/src/sass/libs/typey/typey/functions/_outputters.scss
+++ /dev/null
@@ -1,103 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-// Take a px value and output converted value.
-//
-// @param number $number
-// A px value to convert.
-// @param number|string $context
-// (optional) Only used if em is the $base-unit. The value of the elements/parents
-// font-size if it differs from $base-font-size. Specified as a t-shirt size or
-// value in px.
-//
-// @return number
-// The number converted to the base unit.
-@function output-from-px($number, $context: $base-font-size) {
- @if $base-unit == rem {
- @return typey-output-in-base-unit(($number / $base-font-size));
- }
- @if $base-unit == px {
- @return typey-output-in-base-unit(typey-strip-unit($number));
- }
- @if $base-unit == em {
- @return calculate-em-px($number, $context);
- }
-}
-
-// Take a key from the $font-size map and output converted value.
-//
-// @param string $size
-// A size from the $font-size map.
-// @param number|string $context
-// (optional) Only used if em is the $base-unit. The value of the parent
-// font-size if it differs from $base-font-size. Specified as a t-shirt size or
-// value in px.
-//
-// @return number
-// The selected font-size in $base-unit.
-@function output-from-font-size-map($size, $context: $base-font-size) {
- $map-size: map-get($font-size, $size);
- @if $base-unit == rem {
- @return typey-output-in-base-unit(($map-size / $base-font-size));
- }
- @if $base-unit == px {
- @return typey-output-in-base-unit(typey-strip-unit($map-size));
- }
- @if $base-unit == em {
- @return calculate-em-px($map-size, $context);
- }
-}
-
-// Take a line-height multipler and output converted value.
-//
-// @param number $number
-// Multiple of line height to be used.
-// @param number|string $context
-// (optional) Only used if em is the $base-unit. The value of the elements/parents
-// font-size if it differs from $base-font-size. Specified as a t-shirt size or
-// value in px.
-//
-// @return number
-// The value of the line-height multiple converted to the base unit.
-@function output-from-multiplier($x, $context: $base-font-size) {
- @if $base-unit == rem {
- @return typey-output-in-base-unit(($x * $base-line-height) / $base-font-size);
- }
- @if $base-unit == px {
- @return typey-output-in-base-unit(typey-strip-unit($x * $base-line-height));
- }
- @if $base-unit == em {
- @return calculate-em-multiplier($x, $context);
- }
-}
-
-// Take a line-height ratio and output as em.
-//
-// @param number $ratio
-// Multiple of the $font-size to be used.
-// @param number|string $context
-// (optional) used to ensure function outputs the ratio regardless of whether
-// it is the same as the $base-line-height-ratio.
-//
-// @return number
-// The ratio in em.
-@function output-from-ratio($ratio: $base-line-height-ratio) {
- @return $ratio;
-}
diff --git a/app/themes/base/static/src/sass/libs/typey/typey/functions/_sizers.scss b/app/themes/base/static/src/sass/libs/typey/typey/functions/_sizers.scss
deleted file mode 100755
index f4857323..00000000
--- a/app/themes/base/static/src/sass/libs/typey/typey/functions/_sizers.scss
+++ /dev/null
@@ -1,111 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-// Takes a sizing from the $font-size map (m, xl, xxl, etc) and convert it to
-// the base unit. Alternatively convert a px font-size into the base unit.
-//
-// @param number|string $size
-// A size from the $font-size map or px value to be converted
-// @param number|string $context
-// (optional) Only used if em is the $base-unit. The value of the parent
-// font-size if it differs from $base-font-size. Specified as a t-shirt size or
-// value in px.
-//
-// @return number
-// The selected font-size in $base-unit.
-@function font-size($size, $context: $base-font-size) {
- $allowed-types: "font-size", "px";
- $type: typey-validator($size, $allowed-types);
- @if $type == "font-size" {
- @return output-from-font-size-map($size, $context);
- }
- @if $type == "px" {
- @return output-from-px($size, $context);
- }
-}
-
-// Generate a value to be used as line-height from either:
-// a) a multiple of $base-line-height
-// b) a static px value
-// c) a ratio of the font-size
-//
-// Example usage with multiple:
-// line-height: line-height(2);
-// Example usage with static value:
-// line-height: line-height(18px);
-// Example usage with ratio:
-// line-height: line-height(1.5);
-//
-// @param number $x
-// Multiple of $base-line-height to be used, px value to be converted, or ratio of
-// font-size.
-// @param number|string $context
-// (optional) Only used if em is the $base-unit. The value of the
-// elements/parents font-size if it differs from $base-font-size.
-// Specified as a t-shirt size or value in px.
-// @return number
-// The calculated height in $base-unit.
-@function line-height($x, $context: $base-font-size) {
- $allowed-types: "multiplier", "px";
- $type: typey-validator($x, $allowed-types);
- @if $type == "multiplier" {
- @if ($line-height-method == "ratio") {
- @return output-from-ratio($x);
- }
- @else {
- @return output-from-multiplier($x, $context);
- }
- }
- @if $type == "px" {
- @return output-from-px($x, $context);
- }
-}
-
-// Generate a value to be used as some form of height or spacing from either:
-// a) a multiple of $base-line-height
-// b) a static px value
-//
-// Example usage with multiple:
-// height: spacing(2);
-// Example usage with static value:
-// margin-bottom: spacing(18px);
-//
-// @param number $x
-// Multiple of $base-line-height to be used or px value to be converted.
-// @param number|string $context
-// (optional) Only used if em is the $base-unit. The value of the elements/parents
-// font-size if it differs from $base-font-size. Specified as a t-shirt size or
-// value in px.
-//
-// @return number
-// The calculated spacing in $base-unit.
-@function spacing($x, $context: $base-font-size) {
- $allowed-types: "multiplier", "px", "auto";
- $type: typey-validator($x, $allowed-types);
- @if $type == "multiplier" {
- @return output-from-multiplier($x, $context);
- }
- @if $type == "px" {
- @return output-from-px($x, $context);
- }
- @if $type == "auto" {
- @return auto;
- }
-}
diff --git a/app/themes/base/static/src/sass/libs/typey/typey/functions/_validators.scss b/app/themes/base/static/src/sass/libs/typey/typey/functions/_validators.scss
deleted file mode 100755
index 92ef634e..00000000
--- a/app/themes/base/static/src/sass/libs/typey/typey/functions/_validators.scss
+++ /dev/null
@@ -1,102 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-// Takes a value and checks to ensure it's expressed correctly then returns
-// the type.
-//
-// @param number|string|list $x
-// A multiple of $base-line-height.
-// A px value.
-// A size from the $font-size map.
-// A space seperated list container multiples and/or px values.
-//
-// @return string
-// multiplier, px, font-size, list
-@function typey-check-value($x) {
- @if type-of($x) == "number" {
- @if unitless($x) {
- @return "multiplier";
- }
- @if not unitless($x) {
- @if unit($x) == px {
- @return "px";
- }
- @else {
- @error "All units must be expressed in px";
- }
- }
- }
- @if type-of($x) == "string" {
- @if $x == "auto" {
- @return "auto";
- }
- @if map-has-key($font-size, $x) {
- @return "font-size";
- }
- @else {
- @error "'#{$x}' not found in $font-size map";
- }
- }
- @if type-of($x) == "list" {
- @if list-separator($x) == space {
- @each $value in $x {
- @if type-of($value) == "number" or $value == "auto" {
- @if type-of($value) == "number" {
- @if not unitless($value) and unit($value) != px {
- @error "All units must be expressed in px";
- }
- }
- }
- @else {
- @error "Values specified inside lists must be a number or 'auto'";
- }
- }
- @return "list";
- }
- @else {
- @error "All lists must use a space as their seperator";
- }
- }
- @else {
- @return type-of($x);
- }
-}
-
-// Takes a value and validates it against a specified type.
-//
-// @param number|string|list $x
-// A multiple of $base-line-height.
-// A px value.
-// A size from the $font-size map.
-// A space seperated list container multiples and/or px values.
-// @param string|list $allowed-types
-// Either multiplier, px, font-size, list, or a comibation specified in a list.
-//
-// @return string
-// The values type.
-@function typey-validator($x, $allowed-types) {
- $type: typey-check-value($x);
- @if index($allowed-types, $type) != null {
- @return $type;
- }
- @else {
- @error "'#{$type}' is not a valid type for this function (allowed types are: #{$allowed-types})";
- }
-}
diff --git a/app/themes/base/static/src/sass/libs/typey/typey/mixins/_debug.scss b/app/themes/base/static/src/sass/libs/typey/typey/mixins/_debug.scss
deleted file mode 100755
index 999ce4c5..00000000
--- a/app/themes/base/static/src/sass/libs/typey/typey/mixins/_debug.scss
+++ /dev/null
@@ -1,61 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-// Output a horizontal grid to help with debugging typography.
-//
-// @param number $line-height
-// Multiple of line height to be used, line-height ratio or px value to be converted.
-// @param number|string $context
-// (optional) Only used if em is the $base-unit. The value of the
-// elements/parents font-size if it differs from $base-font-size.
-// Specified as a t-shirt size or value in px.
-// @param string $color
-// (optional) Use a custom grid color.
-@mixin typey-debug-grid($line-height: $base-line-height, $context: $base-font-size, $color: $typey-debug-color) {
- @if $typey-debug == true {
- $allowed-types: "multiplier", "px";
- $type: typey-validator($line-height, $allowed-types);
- $grid-height: 0;
- @if $line-height-method == "rhythm" {
- $grid-height: line-height($line-height, $context);
- }
- @if $line-height-method == "ratio" {
- @if $line-height == $base-line-height {
- $grid-height: line-height($base-line-height-ratio, $context) * 1em;
- }
- @else {
- $grid-height: line-height($line-height, $context) * 1em;
- }
- }
-
- position: relative;
- background-image: repeating-linear-gradient(180deg, $color, $color 1px, transparent 1px, transparent $grid-height);
-
- &:after {
- content: "";
- position: absolute;
- bottom: -1px;
- left: 0;
- height: 1px;
- width: 100%;
- background-color: $color;
- }
- }
-}
diff --git a/app/themes/base/static/src/sass/libs/typey/typey/mixins/_define-type-sizing.scss b/app/themes/base/static/src/sass/libs/typey/typey/mixins/_define-type-sizing.scss
deleted file mode 100755
index ab18d072..00000000
--- a/app/themes/base/static/src/sass/libs/typey/typey/mixins/_define-type-sizing.scss
+++ /dev/null
@@ -1,65 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-// Define defaults (use this in the HTML element).
-//
-// @param number $size
-// (optional) The font-size. Use to set to anything other than $base-font-size.
-// @param number $line-height
-// (optional) The line-height. Use to set to anything other than $base-line-height.
-// Set to a ratio when $line-height-as-ratio is true. Will default to $base-line-height-ratio.
-// Set to false if you do not want to change a ratio of line-height already set.
-@mixin define-type-sizing($size: $base-font-size, $line-height: $base-line-height) {
- @if $base-unit == rem or $base-unit == em {
- font-size: $size / $browser-font-size * 100%;
- }
- @if $base-unit == px {
- font-size: $size;
- }
-
- @if $line-height != false {
- @if $line-height-method == "ratio" {
- @if $line-height == $base-line-height {
- $line-height: $base-line-height-ratio;
- }
- line-height: $line-height;
- }
- @else {
- @if $base-unit == rem or $base-unit == em {
- // In the html element, rem means relative to browser default font size; em means relative to html's font size.
- line-height: calculate-em-px($line-height, $size);
- }
- @if $base-unit == px {
- line-height: $line-height;
- }
- }
- }
-
- @if $auto-print-sizing == true {
- @if $base-unit == rem or $base-unit == em {
- @media print {
- font-size: $print-font-size;
- }
- }
- @else {
- @warn "As you are not using a relative base unit (rem or em) automatic print media sizing will not work. Set $auto-print-sizing to false to hide this warning"
- }
- }
-}
diff --git a/app/themes/base/static/src/sass/libs/typey/typey/mixins/_font-size.scss b/app/themes/base/static/src/sass/libs/typey/typey/mixins/_font-size.scss
deleted file mode 100755
index 9e4008e7..00000000
--- a/app/themes/base/static/src/sass/libs/typey/typey/mixins/_font-size.scss
+++ /dev/null
@@ -1,44 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-// Define font-size (with fallback)
-//
-// @param number|string $size
-// A size from the $font-size map or px value to be converted
-// @param number|string $context
-// (optional) Only used if em is the $base-unit. The value of the elements/parents
-// font-size if it differs from $base-font-size. Specified as a t-shirt size or
-// value in px.
-@mixin font-size($size, $context: $base-font-size) {
- $allowed-types: "font-size", "px";
- $type: typey-validator($size, $allowed-types);
- @if $base-unit == rem {
- @if $rem-fallback == true {
- @if $type == "font-size" {
- $map-size: map-get($font-size, $size);
- font-size: $map-size;
- }
- @if $type == "px" {
- font-size: $size;
- }
- }
- }
- font-size: font-size($size, $context);
-}
diff --git a/app/themes/base/static/src/sass/libs/typey/typey/mixins/_line-height.scss b/app/themes/base/static/src/sass/libs/typey/typey/mixins/_line-height.scss
deleted file mode 100755
index 63fe5229..00000000
--- a/app/themes/base/static/src/sass/libs/typey/typey/mixins/_line-height.scss
+++ /dev/null
@@ -1,43 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-// Define line-height (with fallback).
-//
-// @param number $x
-// Multiple of line height to be used or px value to be converted.
-// @param number|string $context
-// (optional) Only used if em is the $base-unit. The value of the
-// elements/parents font-size if it differs from $base-font-size.
-// Specified as a t-shirt size or value in px.
-@mixin line-height($x, $context: $base-font-size) {
- $allowed-types: "multiplier", "px";
- $type: typey-validator($x, $allowed-types);
- @if $base-unit == rem and $line-height-method == "rhythm" {
- @if $rem-fallback == true {
- @if $type == "multiplier" {
- line-height: $x * $base-line-height;
- }
- @if $type == "px" {
- line-height: $x;
- }
- }
- }
- line-height: line-height($x, $context);
-}
diff --git a/app/themes/base/static/src/sass/libs/typey/typey/mixins/_spacing.scss b/app/themes/base/static/src/sass/libs/typey/typey/mixins/_spacing.scss
deleted file mode 100755
index 97955eb2..00000000
--- a/app/themes/base/static/src/sass/libs/typey/typey/mixins/_spacing.scss
+++ /dev/null
@@ -1,109 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-// Define spacing (with fallbacks).
-//
-// @param string $type
-// The type of spacing: margin, padding, margin-top, etc.
-// @param number|list|string $spacing
-// Multiple of $base-line-height to be used or px value to be converted.
-// Can be a SASS list using the same parameters as the CSS margin property:
-// i.e. top right bottom left, 1 0 2 0.
-// Can also be the string "auto" when used as margin.
-// @param number|string $context
-// (optional) Only used if em is the $base-unit. The value of the elements/parents
-// font-size if it differs from $base-font-size. Specified as a t-shirt size or
-// value in px.
-@mixin spacing($property, $spacing, $context: $base-font-size) {
- $allowed-types: "multiplier", "px", "list";
- $type: typey-validator($spacing, $allowed-types);
-
- $px-fallback-list: ();
- $converted-list: ();
-
- @each $x in $spacing {
- @if $base-unit == rem {
- $allowed-types: "multiplier", "px", "auto";
- $type: typey-validator($x, $allowed-types);
- @if $type == "multiplier" {
- $spacing: $x * $base-line-height;
- $px-fallback-list: join($px-fallback-list, $spacing, $separator: space);
- }
- @if $type == "px" {
- $px-fallback-list: join($px-fallback-list, $x, $separator: space);
- }
- @if $type == "auto" {
- $px-fallback-list: join($px-fallback-list, $x, $separator: space);
- }
- }
- $spacing: spacing($x, $context);
- $converted-list: join($converted-list, $spacing, $separator: space);
- }
-
- @if $base-unit == rem {
- @if $rem-fallback == true {
- #{$property}: $px-fallback-list;
- }
- }
- #{$property}: $converted-list;
-}
-
-// Wrapper mixins for various spacing properties.
-// These can be used to provide easily sized spacing in the base unit.
-//
-// @param number|list|string $x
-// Multiple of $base-line-height to be used or px value to be converted.
-// Can be a SASS list using the same parameters as the CSS margin property:
-// i.e. top right bottom left, 1 0 2 0.
-// Can also be the string "auto" when used as margin.
-// @param number|string $context
-// (optional) Only used if em is the $base-unit. The value of the elements/parents
-// font-size if it differs from $base-font-size. Specified as a t-shirt size or
-// value in px.
-@mixin margin($x, $context: $base-font-size) {
- @include spacing(margin, $x, $context);
-}
-@mixin margin-top($x, $context: $base-font-size) {
- @include spacing(margin-top, $x, $context);
-}
-@mixin margin-bottom($x, $context: $base-font-size) {
- @include spacing(margin-bottom, $x, $context);
-}
-@mixin margin-left($x, $context: $base-font-size) {
- @include spacing(margin-left, $x, $context);
-}
-@mixin margin-right($x, $context: $base-font-size) {
- @include spacing(margin-right, $x, $context);
-}
-@mixin padding($x, $context: $base-font-size) {
- @include spacing(padding, $x, $context);
-}
-@mixin padding-top($x, $context: $base-font-size) {
- @include spacing(padding-top, $x, $context);
-}
-@mixin padding-bottom($x, $context: $base-font-size) {
- @include spacing(padding-bottom, $x, $context);
-}
-@mixin padding-left($x, $context: $base-font-size) {
- @include spacing(padding-left, $x, $context);
-}
-@mixin padding-right($x, $context: $base-font-size) {
- @include spacing(padding-right, $x, $context);
-}
diff --git a/app/themes/base/static/src/sass/libs/typey/typey/mixins/_type-layout.scss b/app/themes/base/static/src/sass/libs/typey/typey/mixins/_type-layout.scss
deleted file mode 100755
index 5baefb55..00000000
--- a/app/themes/base/static/src/sass/libs/typey/typey/mixins/_type-layout.scss
+++ /dev/null
@@ -1,35 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-// Define a type layout (font-size and line-height).
-//
-// @param number|string $size
-// A size from the $font-size map or a px value.
-// @param number $line-height
-// Multiple of line height to be used or px value to be converted.
-// @param number|string $context
-// (optional) Only used if em is the $base-unit. The value of the
-// elements/parents font-size if it differs from $base-font-size.
-// Specified as a t-shirt size or value in px.
-@mixin type-layout($size, $line-height, $context: $base-font-size) {
- @include font-size($size, $context);
- @include line-height($line-height, $size);
- @include typey-debug-grid($line-height, $size);
-}
diff --git a/app/themes/base/static/src/sass/libs/typey/typey/mixins/_typeface.scss b/app/themes/base/static/src/sass/libs/typey/typey/mixins/_typeface.scss
deleted file mode 100755
index fbfaf46e..00000000
--- a/app/themes/base/static/src/sass/libs/typey/typey/mixins/_typeface.scss
+++ /dev/null
@@ -1,99 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-// Embed a typeface.
-//
-// @param string $typeface
-// A font family from the $typefaces map.
-@mixin typeface($typeface) {
- $typeface-name: $typeface;
- $typeface: map-get($typefaces, $typeface);
-
- $font-family: false;
- $letter-spacing: false;
- $weight: false;
- $case: false;
-
- // Assign values to variables when $typeface is a keyed map.
- @if type-of($typeface) == "map" {
- @if map-has-key($typeface, font-family) {
- $font-family: map-get($typeface, font-family);
- }
- @if map-has-key($typeface, letter-spacing) {
- $letter-spacing: map-get($typeface, letter-spacing);
- }
- @if map-has-key($typeface, weight) {
- $weight: map-get($typeface, weight);
- }
- @if map-has-key($typeface, case) {
- $case: map-get($typeface, case);
- }
- }
-
- // Assign values to variables when $typeface is shorthand.
- @if type-of($typeface) == "list" {
- @if (list-separator($typeface) == "comma") {
- // This shorthand is just a list of fonts.
- $font-family: $typeface;
- }
- @else {
- @each $value in $typeface {
- // This is a font-family.
- @if type-of($value) == "list" {
- $font-family: $value;
- }
- // This is a letter-spacing value.
- @if type-of($value) == "number" {
- $letter-spacing: $value;
- }
- // This is a font-weight value.
- @if map-has-key($font-weight, $value) {
- $weight: $value;
- }
- // This is a case value.
- @if type-of($value) == "string" and not(map-has-key($font-weight, $value)) {
- $case: $value;
- }
- }
- }
- }
-
- // Output properties.
- @if $font-family {
- font-family: $font-family;
- }
- @else {
- @error "Typeface '#{$typeface-name}' does not have a font-family";
- }
- @if $letter-spacing {
- @if ($letter-spacing == 0) {
- letter-spacing: 0;
- }
- @else {
- letter-spacing: calculate-em-px($letter-spacing, $base-font-size);
- }
- }
- @if $weight {
- font-weight: weight($weight);
- }
- @if $case {
- text-transform: $case;
- }
-}
diff --git a/app/themes/base/static/src/sass/libs/typey/typey/mixins/_typeset.scss b/app/themes/base/static/src/sass/libs/typey/typey/mixins/_typeset.scss
deleted file mode 100755
index e44f0a90..00000000
--- a/app/themes/base/static/src/sass/libs/typey/typey/mixins/_typeset.scss
+++ /dev/null
@@ -1,93 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-// Typeset your type.
-//
-// @param string $typestyle
-// A type style from the $typestyles map.
-// @param number|string $context
-// (optional) Only used if em is the $base-unit. The value of the
-// elements/parents font-size if it differs from $base-font-size.
-// Specified as a t-shirt size or value in px.
-@mixin typeset($typestyle, $context: $base-font-size) {
- $typestyle: map-get($typestyles, $typestyle);
-
- $font-size: false;
- $line-height: false;
- $weight: false;
- $case: false;
-
- // Assign values to variables when $typestyle is a keyed map.
- @if type-of($typestyle) == "map" {
- @if map-has-key($typestyle, font-size) {
- $font-size: map-get($typestyle, font-size);
- }
- @if map-has-key($typestyle, line-height) {
- $line-height: map-get($typestyle, line-height);
- }
- @if map-has-key($typestyle, weight) {
- $weight: map-get($typestyle, weight);
- }
- @if map-has-key($typestyle, case) {
- $case: map-get($typestyle, case);
- }
- }
-
- // Assign values to variables when $typestyle is shorthand.
- @if type-of($typestyle) == "list" {
- @each $value in $typestyle {
- // The first value is always font-size.
- @if index($typestyle, $value) == 1 {
- $font-size: $value;
- }
- // This is a line-height value.
- @if type-of($value) == "number" and not(index($typestyle, $value) == 1) {
- $line-height: $value;
- }
- // This is a font-weight value.
- @if map-has-key($font-weight, $value) {
- $weight: $value;
- }
- // This is a case value.
- @if type-of($value) == "string" and not(index($typestyle, $value) == 1) {
- $case: $value;
- }
- }
- }
-
- // Output properties.
- @if $font-size {
- @include font-size($font-size, $context);
- }
- @if $line-height {
- @include typey-debug-grid($line-height, $font-size);
- @include line-height($line-height, $font-size);
- }
- @else {
- // Using default line-height so set debug grid accordingly.
- @include typey-debug-grid($base-line-height, $font-size);
- }
- @if $weight {
- font-weight: weight($weight);
- }
- @if $case {
- text-transform: $case;
- }
-}
diff --git a/app/themes/base/static/src/sass/modules/_all.scss b/app/themes/base/static/src/sass/modules/_all.scss
deleted file mode 100755
index 53b1c05e..00000000
--- a/app/themes/base/static/src/sass/modules/_all.scss
+++ /dev/null
@@ -1,82 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-// Navs
-@import "navs/nav-actions";
-@import "navs/nav-header";
-@import "navs/nav-footer";
-@import "navs/nav-tree";
-@import "sidebar";
-
-// Medias
-@import "medias/audio-playlist";
-@import "medias/video-playlist";
-
-// Boxes
-@import 'boxes/article-box';
-@import 'boxes/page-box';
-@import 'boxes/brief-box';
-@import 'boxes/person-list-box';
-@import 'boxes/event-line-box';
-@import 'boxes/job-line-box';
-@import 'boxes/product-box';
-@import 'boxes/search-box';
-@import 'boxes/media-box';
-
-// Sliders
-@import 'sliders/slider-page';
-@import 'sliders/slider-home';
-@import 'sliders/slider-network';
-@import 'sliders/slider-persons';
-
-// Page modules
-@import 'breadcrumb';
-@import 'page';
-@import 'pagination';
-
-// Specific modules
-@import 'lang-switcher';
-@import 'role-switcher';
-@import 'search';
-@import 'pattern';
-@import 'tag';
-@import 'share-links';
-@import 'partners-list';
-@import 'banner';
-@import 'messages';
-@import 'project-details';
-@import 'map-infowindow';
-@import 'map-legend';
-@import 'linked-organizations';
-@import 'newsletter';
-@import 'tweets';
-@import 'instagram';
-@import 'hero';
-@import 'overlay';
-@import 'live-streaming';
-
-
-// Typography modules
-@import 'dashed';
-@import 'dotted';
-@import 'blockquote';
-@import 'well';
-@import 'flash';
-@import 'section-title';
diff --git a/app/themes/base/static/src/sass/modules/_banner.scss b/app/themes/base/static/src/sass/modules/_banner.scss
deleted file mode 100644
index 4f725d68..00000000
--- a/app/themes/base/static/src/sass/modules/_banner.scss
+++ /dev/null
@@ -1,227 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".banner";
-
-#{$module} {
-
- display: block;
-
- background-size: cover;
- background-position: center center;
- width: 100%;
- height: 350px;
- position: relative;
-
- @include margin-top(2);
-
- @include mq($until: lg) {
-
- height: 250px;
-
- }
-
- @include mq($until: sm) {
-
- height: 250px;
-
- }
-
- @include mq($until: xs) {
-
- height: auto;
-
- }
-
- &:hover {
-
- #{$module}__title:after {
-
- opacity: 1;
- @include transform(scaleX(1));
-
- }
-
- }
-
- &--colored {
-
- &:after {
-
- content: "";
- display: block;
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: 1;
-
- }
-
- }
-
- &--blue {
-
- &:after {
-
- background: #009DD2;
- opacity: 0.7;
- background-image: linear-gradient(-180deg, rgba(0,0,0,0.00) 0%, #000000 100%);
-
- }
-
- }
-
- &--green {
-
- &:after {
-
- background: #0D9570;
- opacity: 0.69;
- background-image: linear-gradient(-180deg, rgba(0,0,0,0.00) 0%, #000000 100%);
-
- }
-
- }
-
- &--orange {
-
- &:after {
-
- background: #FDA618;
- opacity: 0.5;
-
- }
-
- }
-
- &--light {
-
- color: white;
-
- }
-
- &--dark {
-
- color: $color-black;
-
- }
-
- &--sidebar {
-
- margin-top: 0;
- @include margin-bottom(2);
- height: 150px;
-
- #{$module}__title {
-
- @include line-height(2);
-
- }
-
- #{$module}__content {
-
- @include padding(1);
-
- }
-
- }
-
- &__content {
-
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: 2;
-
- @include mq($until: sm) {
-
- height: auto;
- position: relative;
-
- }
-
- @include padding(1);
- padding-top: 120px;
- text-align: center;
-
- @include mq($until: lg) {
- padding-top: 36px;
- }
-
- @include mq($until: md) {
- padding-top: 25px;
- }
-
- @include mq($until: sm) {
- padding-top: 75px;
- padding-bottom: 75px;
- }
-
- }
-
- &__title {
-
- @include line-height(1.2);
- @include typeface(sans-serif);
- font-weight: weight(bold);
- display: inline-block;
- position: relative;
-
- @include margin(0 0 1 0);
-
- &:after {
-
- content: "";
- display: block;
- position: absolute;
- top: 50%;
- height: 10px;
- left: -10px;
- right: -10px;
- background: white;
- z-index: -1;
- opacity: 0;
- @include transform(scaleX(0));
- @include transition(all 0.25s ease-in-out);
-
- #{$module}--light & {
- background: $color-black;
- }
- #{$module}--dark & {
- background: white;
- }
-
- }
-
- }
-
- &__desc {
-
- @include line-height(1);
- @include typeface(serif);
- font-weight: weight(bold);
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_blockquote.scss b/app/themes/base/static/src/sass/modules/_blockquote.scss
deleted file mode 100644
index dc9cb3f6..00000000
--- a/app/themes/base/static/src/sass/modules/_blockquote.scss
+++ /dev/null
@@ -1,58 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".blockquote";
-
-#{$module},
-blockquote {
-
- margin: 0;
- padding: 0;
-
- @include font-size(l);
- @include line-height(1.5);
- @include typeface(serif);
- @include margin-top(3);
- @include margin-bottom(3);
- @include margin-left(1);
- @include padding-left(1);
- font-weight: weight(heavy);
- position: relative;
-
- &:before {
- content: "";
- display: block;
- width: 1px;
- height: 100%;
- position: absolute;
- background: black;
- top: 0;
- left: 0;
- }
-
- &--small {
- @include margin-left(.5);
- @include padding-left(.5);
- font-weight: weight(regular);
- @include font-size(m);
- @include line-height(1.25);
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_breadcrumb.scss b/app/themes/base/static/src/sass/modules/_breadcrumb.scss
deleted file mode 100644
index 7ee5dfad..00000000
--- a/app/themes/base/static/src/sass/modules/_breadcrumb.scss
+++ /dev/null
@@ -1,74 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".breadcrumb";
-
-#{$module} {
-
- list-style-type: none;
- margin: 0;
- padding: 0;
-
- background: white;
- @include padding(0 1);
-
- @include clearfix;
- @include font-size(xs);
- @include line-height(1);
- @include typeface(serif);
- font-weight: weight(light);
-
- @include mq($until: sm) {
- display: none;
- }
-
- &__item {
-
- float: left;
- @include margin-right(.25);
-
- &:after {
- content: '|';
- display: block;
- float: right;
- @include margin-left(.25);
- }
-
- &:last-child {
-
- font-weight: weight(bold);
- &:after {
- display: none;
- }
- }
-
- }
-
- &__link {
-
- text-decoration: none;
-
- &:hover {
- border-bottom: 1px solid black;
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_dashed.scss b/app/themes/base/static/src/sass/modules/_dashed.scss
deleted file mode 100644
index 51ac3d57..00000000
--- a/app/themes/base/static/src/sass/modules/_dashed.scss
+++ /dev/null
@@ -1,107 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".dashed";
-
-#{$module} {
-
- position: relative;
- display: inline-block;
- z-index: 1;
-
- @include padding-right(2);
-
- &:before {
- content: '.';
- }
-
- /*&:after {
- position: absolute;
- height: 40%;
- width: 100%;
- display: block;
- top: 30%;
- left: 0;
- content: "";
- background: $color-main;
- z-index: -1;
- }*/
- background-image: -webkit-linear-gradient(transparent 14px,$color-main 14px,$color-main 34px,transparent 34px);
- background-image: -moz-linear-gradient(transparent 14px,$color-main 14px,$color-main 34px,transparent 34px);
- background-image: -ms-linear-gradient(transparent 14px,$color-main 14px,$color-main 34px,transparent 34px);
- background-image: -o-linear-gradient(transparent 14px,$color-main 14px,$color-main 34px,transparent 34px);
- background-image: linear-gradient(transparent 14px,$color-main 14px,$color-main 34px,transparent 34px);
- background-repeat: repeat;
- background-size: 16px 48px;
-
- &.tag {
-
- background-image: -webkit-linear-gradient(transparent 10px,$color-main 10px,$color-main 23px,transparent 23px);
- background-image: -moz-linear-gradient(transparent 10px,$color-main 10px,$color-main 23px,transparent 23px);
- background-image: -ms-linear-gradient(transparent 10px,$color-main 10px,$color-main 23px,transparent 23px);
- background-image: -o-linear-gradient(transparent 10px,$color-main 10px,$color-main 23px,transparent 23px);
- background-image: linear-gradient(transparent 10px,$color-main 10px,$color-main 23px,transparent 23px);
- background-repeat: repeat;
- background-size: 16px 33px;
-
- }
-
- &--gray {
-
- &:after {
- background: $color-gray;
- }
-
- }
-
- &--center {
-
- @include padding(0 .5);
- &:before {
- display: none;
- }
-
- }
-
- &--small {
-
- @include padding-right(.5);
-
- background-image: -webkit-linear-gradient(transparent 7px,$color-main 7px,$color-main 16px,transparent 16px);
- background-image: -moz-linear-gradient(transparent 7px,$color-main 7px,$color-main 16px,transparent 16px);
- background-image: -ms-linear-gradient(transparent 7px,$color-main 7px,$color-main 16px,transparent 16px);
- background-image: -o-linear-gradient(transparent 7px,$color-main 7px,$color-main 16px,transparent 16px);
- background-image: linear-gradient(transparent 7px,$color-main 7px,$color-main 16px,transparent 16px);
- background-repeat: repeat;
- background-size: 16px 24px;
-
- }
-
- &.tag--small {
- background-image: -webkit-linear-gradient(transparent 7px,$color-main 7px,$color-main 16px,transparent 16px);
- background-image: -moz-linear-gradient(transparent 7px,$color-main 7px,$color-main 16px,transparent 16px);
- background-image: -ms-linear-gradient(transparent 7px,$color-main 7px,$color-main 16px,transparent 16px);
- background-image: -o-linear-gradient(transparent 7px,$color-main 7px,$color-main 16px,transparent 16px);
- background-image: linear-gradient(transparent 7px,$color-main 7px,$color-main 16px,transparent 16px);
- background-repeat: repeat;
- background-size: 16px 24px;
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_dotted.scss b/app/themes/base/static/src/sass/modules/_dotted.scss
deleted file mode 100644
index 8e5f69bd..00000000
--- a/app/themes/base/static/src/sass/modules/_dotted.scss
+++ /dev/null
@@ -1,33 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".dotted";
-
-#{$module} {
-
- position: relative;
- display: inline-block;
- z-index: 1;
-
- &:before {
- content: '.';
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_flash.scss b/app/themes/base/static/src/sass/modules/_flash.scss
deleted file mode 100644
index e6b96113..00000000
--- a/app/themes/base/static/src/sass/modules/_flash.scss
+++ /dev/null
@@ -1,40 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".flash";
-
-#{$module} {
-
- background: $color-main;
- @include clearfix;
-
- &__title {
-
- float: left;
-
- }
-
- &__text {
-
- float: left;
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_hero.scss b/app/themes/base/static/src/sass/modules/_hero.scss
deleted file mode 100644
index 16e3a821..00000000
--- a/app/themes/base/static/src/sass/modules/_hero.scss
+++ /dev/null
@@ -1,195 +0,0 @@
-$module: ".hero";
-
-
-#{$module} {
-
- background-image: url(../img/vertigo/hero.jpg);
- background-repeat: no-repeat;
- background-position: center top;
- background-size: cover;
- height: 560px;
- margin-bottom: 350px;
- position: relative;
-
- &.large-title {
- margin-bottom: 500px;
-
- #{$module}__title {
- img {
- max-width: 73%;
- }
- margin: 0 auto;
- position: relative;
-
- @include mq($until: lg) {
- padding-top: 60px;
- }
- @include mq($until: md) {
- padding-top: 97px;
- }
- @include mq($until: sm) {
- padding-top: 115px;
- }
- @include mq($until: xs) {
- padding-top: 120px;
- }
- }
- @include mq($until: lg) {
- margin-bottom: 450px;
- }
- @include mq($until: md) {
- margin-bottom: 350px;
- }
- @include mq($until: sm) {
- margin-bottom: 300px;
- }
- @include mq($until: xs) {
- margin-bottom: 90px;
- }
- }
-
- @include mq($until: xs) {
- height: 346px;
- margin-bottom: 140px;
- }
-
- .Background {
- position: absolute;
- top: 0;
- left: 0;
- height: 563px;
- width: 100%;
- @include mq($until: xs) {
- height: 346px;
- }
- }
-
- &:after {
-
- content: '';
- height: 1px;
- width: 30px;
- background: #F2EDDC;
- position: absolute;
- top: 825px;
- left: 50%;
- margin-left: -15px;
-
- @include mq($until: xs) {
- top: 440px;
- }
-
- }
-
- &__title {
-
- position: absolute;
- bottom: 0;
- left: 0;
- width: 100%;
- text-align: center;
-
- @include transform(translateY(80%));
-
- @include mq($until: sm) {
- img {
- width: 70%;
- }
- }
-
- @include mq($until: xs) {
- img {
- width: 231px;
- }
- }
-
- }
-
- &__logo {
-
- @include margin-top(2);
- text-align: center;
- @include mq($until: xs) {
- @include margin-top(0);
- img {
- width: 159px;
- }
- }
-
- }
-
- &__left {
-
- @include margin-top(4);
- text-align: left;
-
- @include mq($until: xs) {
- @include margin-top(1);
- text-align: center;
- img {
- width: 190px;
- }
- }
-
- }
-
- &__right {
-
- @include margin-top(4);
- text-align: right;
-
- @include mq($until: xs) {
- @include margin-top(.5);
- text-align: center;
-
- img {
- width: 50px;
- }
- }
-
- }
-
- &__date {
-
- display: block;
- @include margin-top(2);
- @include margin-left(2);
-
- @include mq($until: xs) {
- display: block;
- text-align: center;
- width: 120px !important;
- @include margin(0 auto);
- @include transform(translateY(-20px) translateX(-14px));
-
- }
-
- }
-
- &--small {
-
- @include margin-bottom(4);
- @include mq($until: xs) {
- @include margin-bottom(4);
- }
-
- &:after {
- display: none;
- }
-
- #{$module}__logo {
-
- @include margin-top(15);
- text-align: center;
- @include mq($until: xs) {
- @include margin-top(8);
- img {
- width: 159px;
- }
- }
-
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_instagram.scss b/app/themes/base/static/src/sass/modules/_instagram.scss
deleted file mode 100644
index 9464506a..00000000
--- a/app/themes/base/static/src/sass/modules/_instagram.scss
+++ /dev/null
@@ -1,19 +0,0 @@
-$module: ".instagram";
-
-#{$module} {
-
- &__item {
-
- display: block;
- float: left;
- width: 33.33%;
-
- span {
-
- display: none;
-
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_lang-switcher.scss b/app/themes/base/static/src/sass/modules/_lang-switcher.scss
deleted file mode 100644
index 8fcf8e9d..00000000
--- a/app/themes/base/static/src/sass/modules/_lang-switcher.scss
+++ /dev/null
@@ -1,108 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".lang-switcher";
-
-#{$module} {
-
- list-style-type: none;
- padding: 0;
- margin: 0;
- @include padding-right(.5);
-
- position: absolute;
- top: 0;
- right: .25rem;
- z-index: 2;
-
- &__item {
-
- @include font-size(s);
- @include line-height($header-pre-height);
- @include typeface(sans-serif);
-
- @include padding(0 .5);
-
- text-transform: uppercase;
- display: none;
-
- >a {
- color: white;
- }
-
- &.active {
- display: block;
- }
-
- }
-
- &.open {
-
- #{$module}__item {
-
- display: block;
- background: $color-black;
-
- }
-
- &:after {
-
- @include transform(rotate(180deg));
-
- }
-
- }
-
- &:after {
- display: block;
- content: '\f107';
- color: white;
- position: absolute;
- top: 0;
- right: 0;
-
- font-family: FontAwesome;
- font-size: 0.8em;
-
- @include line-height($header-pre-height);
- @include margin-right(.5);
- @include transition(all 0.2s ease-in-out);
- }
-
- .sidebar & {
-
- top: 15px;
-
- #{$module}__item {
-
- display: inline-block;
- @include padding(0 .25);
-
- >a {
-
- color: black;
-
- }
-
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_linked-organizations.scss b/app/themes/base/static/src/sass/modules/_linked-organizations.scss
deleted file mode 100644
index f0bd1d11..00000000
--- a/app/themes/base/static/src/sass/modules/_linked-organizations.scss
+++ /dev/null
@@ -1,45 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".linked-organizations";
-
-#{$module} {
-
- list-style-type: none;
- padding: 0;
- margin: 0;
- margin-top: -45px !important;
-
- &__item {
-
- display: inline-block;
- background-size: contain;
- background-position: center center;
- background-repeat: no-repeat;
-
- @include margin(0 1 0 0);
-
- a {
- display: inline-block;
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_live-streaming.scss b/app/themes/base/static/src/sass/modules/_live-streaming.scss
deleted file mode 100644
index a5548c13..00000000
--- a/app/themes/base/static/src/sass/modules/_live-streaming.scss
+++ /dev/null
@@ -1,79 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".page--live-streaming";
-
-#{$module} {
-
- .intro {
- margin-bottom : 30px;
- }
-
- & #video_container{
- height: 720px;
- }
-
- & .page__content {
- text-align: center;
- height: 720px;
- padding-left: 70px;
- padding-right: 70px;
- }
-
- video {
- }
-
- iframe {
- height: 100%;
- max-height: 720px;
-
- @include mq($until: sm) {
- max-height: 690px;
- }
- }
- .countdown-overlay {
- background: #000000 none repeat scroll 0 0;
- color: white;
- font-family: "Oswald",sans-serif;
- font-size: 2em;
- height: 100%;
- max-height: 720px;
- padding-left: 70px;
- padding-right: 70px;
- position: absolute;
- top: 60px;
- left: 0px;
- width: 100%;
- z-index: 90;
- }
-
- #countdown-title {
- margin-top: 5em;
- }
-
- #countdown {
- margin-top: 1em;
- font-weight: bold;
- color: white;
- }
-
-
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_map-infowindow.scss b/app/themes/base/static/src/sass/modules/_map-infowindow.scss
deleted file mode 100644
index ddf11754..00000000
--- a/app/themes/base/static/src/sass/modules/_map-infowindow.scss
+++ /dev/null
@@ -1,85 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".map-infowindow";
-
-#{$module} {
-
- padding: 24px;
- padding-right: 1px;
-
- @include clearfix;
-
- color: $color-background;
-
- &__content {
-
- //float: left;
- text-align: center;
- max-width: 200px;
-
- p {
- @include margin(0);
- line-height: 1.1rem;
- }
-
- }
-
- &__title {
-
- @include font-size(m);
- @include line-height(.75);
- @include typeface(sans-serif);
- text-transform: uppercase;
- font-weight: weight(regular);
-
- }
-
- &__subtitle {
-
- @include margin-top(.25);
-
- @include font-size(xs);
- @include line-height(.5);
- @include typeface(serif);
- font-weight: weight(regular);
-
- & + p {
- @include margin-top(.5);
- }
-
- }
-
- &__image {
-
- //float: left;
- width: 140px;
- margin: 0 auto;
- @include margin-bottom(1);
- text-align: center;
-
- img {
- width: 140px;
- height: auto;
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_map-legend.scss b/app/themes/base/static/src/sass/modules/_map-legend.scss
deleted file mode 100644
index dd49c725..00000000
--- a/app/themes/base/static/src/sass/modules/_map-legend.scss
+++ /dev/null
@@ -1,88 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".map-legend";
-
-#{$module} {
-
- @include padding(.5);
- position: absolute;
- bottom: 20px;
- left: 20px;
- z-index: 10;
- background: white;
- border: 1px solid black;
-
- @include mq($until: xs) {
- display: none;
- }
-
- &__item {
-
- text-transform: uppercase;
- @include font-size(xs);
- color: $color-black;
- display: inline-block;
- line-height: 22px;
- @include margin-right(.5);
-
- &:last-child {
- @include margin-right(0);
- }
-
- &:before {
-
- content :"";
- float: left;
- width: 22px;
- height: 22px;
- background-repeat: no-repeat;
- background-position: center center;
- @include margin-right(.5);
-
- }
-
- &--red {
-
- &:before {
- background-image: url(../img/map-legend-red.png);
- }
-
- }
-
- &--blue {
-
- &:before {
- background-image: url(../img/map-legend-blue.png);
- }
-
- }
-
- &--green {
-
- &:before {
- background-image: url(../img/map-legend-green.png);
- }
-
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_messages.scss b/app/themes/base/static/src/sass/modules/_messages.scss
deleted file mode 100644
index 2b4b5408..00000000
--- a/app/themes/base/static/src/sass/modules/_messages.scss
+++ /dev/null
@@ -1,45 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".messages";
-
-#{$module} {
-
- padding: 0;
- margin: 0;
- list-style-type: none;
-
- &__item {
-
- background: $color-main;
- color: $color-black;
- @include padding(.5 1);
- font-weight: weight(bold);
-
- &.info {
-
- background: $color-main;
- color: $color-black;
-
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_newsletter.scss b/app/themes/base/static/src/sass/modules/_newsletter.scss
deleted file mode 100644
index 7060c650..00000000
--- a/app/themes/base/static/src/sass/modules/_newsletter.scss
+++ /dev/null
@@ -1,49 +0,0 @@
-$module: ".newsletter";
-
-#{$module} {
-
- @include margin-bottom(2);
-
- @include mq($until: sm) {
-
- @include margin-top(2);
-
- }
-
- &__text {
-
- @include font-size(m);
- @include typeface(sans-serif);
- font-weight: weight(regular);
-
- }
-
- &__input {
-
- @include font-size(m);
- @include typeface(sans-serif);
- font-weight: weight(regular);
-
- width: 100%;
- outline: 0;
- background: transparent;
- border: 0;
- color: white;
- border-bottom: 1px solid white;
-
- }
-
- &__button {
-
- color: white;
- outline: 0;
- background: transparent;
- border: 0;
- position: absolute;
- top: 0px;
- right: 7px;
- @include font-size(l);
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_overlay.scss b/app/themes/base/static/src/sass/modules/_overlay.scss
deleted file mode 100644
index ca43e6ee..00000000
--- a/app/themes/base/static/src/sass/modules/_overlay.scss
+++ /dev/null
@@ -1,139 +0,0 @@
-$module: ".overlay";
-
-#{$module} {
-
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- z-index: 100;
-
- overflow: hidden;
-
- background: rgba($color-background, .95);
-
- display: block;
- height: 0;
- opacity: 0;
-
- @include transition(opacity .5s ease-in-out, height 0s .5s);
-
- &.open {
-
- height: 100%;
- opacity: 1;
- @include transition(opacity .5s ease-in-out, height 0s);
-
- }
-
- &__close {
-
- position: absolute;
- top: 2rem;
- right: 2rem;
- z-index: 2;
- color: white;
- display: block;
-
- width: 40px;
- height: 40px;
-
- &:before, &:after {
- width: 100%;
- height: 1px;
- content: "";
- display: block;
- background: white;
-
- position: absolute;
- top: 20px;
- left: 0;
-
- @include transition(all 0.5s ease-in-out);
- }
-
- &:before {
- @include transform(rotate(45deg));
- }
- &:after {
- @include transform(rotate(-45deg));
- }
-
- &:hover {
-
- &:before {
- background: $color-main;
- @include transform(rotate(225deg));
- }
- &:after {
- background: $color-main;
- @include transform(rotate(-225deg));
- }
-
- }
-
- }
-
- &__container {
-
- display: block;
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: 1;
- overflow: scroll;
-
- }
-
- &__content {
-
- @include padding(5 0);
-
- }
-
- #overlayContent {
-
- opacity: 0;
- @include transition(opacity .5s ease-in-out, height 0s .5s);
-
- &.loaded {
-
- opacity: 1;
-
- }
-
- }
-
- &__loader {
-
- position: absolute;
- top: 50%;
- left: 50%;
- z-index: 10;
- margin-left: -30px;
- margin-top: -30px;
-
- .loading {
-
- height: 60px;
- width: 60px;
- display: block;
- animation: rotation 1s infinite linear;
- border: 1px solid rgba(255, 255, 255, 0.2);
- border-top-color: rgba(255, 255, 255, 0.7);
- border-radius: 50%;
- margin: auto;
-
- }
-
- }
-
-}
-
-@keyframes rotation {
- to {
- transform: rotate(360deg);
- }
-}
diff --git a/app/themes/base/static/src/sass/modules/_page.scss b/app/themes/base/static/src/sass/modules/_page.scss
deleted file mode 100644
index 88950e02..00000000
--- a/app/themes/base/static/src/sass/modules/_page.scss
+++ /dev/null
@@ -1,468 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".page";
-
-#{$module} {
-
- min-height: 500px;
-
- @include mq($until: sm) {
- min-height: 0;
- }
-
- &__sidebar {
-
- @include mq($until: sm) {
- //background: white;
- text-align: center;
- @include margin-bottom(2);
- }
-
- }
-
- &__slider {
-
- @include padding-top(2);
- @include padding-bottom(2);
-
- @include mq($until: sm) {
- @include padding-top(1);
- }
-
- }
-
- &__meta {
-
- @include margin-bottom(2);
-
- }
-
- &__image-container {
- background: $color-background;
- @include transition(all 0.5s ease-in-out);
- @include margin-bottom(3);
-
- img {
- display: block;
- width: 100%;
- max-width: 100%;
- height: auto;
-
- -webkit-filter: grayscale(1);
- filter: grayscale(1);
- mix-blend-mode: screen;
- }
- }
-
- &__meta-separator {
-
- height: 1px;
- background: $color-main;
- width: 45px;
-
- @include margin(1 0);
-
- @include mq($until: sm) {
- @include margin(1 auto);
- }
-
- &--small {
- @include margin(.5 0);
- }
-
- }
-
- &__meta-date {
-
- @include font-size(m);
- @include line-height(1);
- @include typeface(serif);
- font-weight: weight(heavy);
-
- span {
- font-size: 13px;
- margin-top: 2px;
- font-weight: weight(regular);
- display: block;
- }
-
- }
-
- &__meta-title {
-
- @include font-size(s);
- @include line-height(1);
- @include typeface(sans-serif);
- text-transform: uppercase;
- font-weight: weight(regular);
-
- &--small {
- @include font-size(s);
- }
-
- }
-
- &__meta-text {
-
- font-size: 13px;
- margin-top: 2px;
- font-weight: weight(regular);
- display: block;
-
- }
-
- &__filters {
-
- @include margin(0 0 6 0);
-
- @media screen and (max-height: 900px) {
-
- @include margin(0 0 3 0);
-
- }
-
- }
-
- hr + #{$module}__block--yellow {
-
- //@include margin-top(-2);
-
- }
-
- hr + #{$module}__block--black {
-
- //@include margin-top(-2);
-
- }
-
- &__block-title {
- text-align: left;
- }
-
- &__block {
-
- @include padding-bottom(1);
-
- h2:first-child {
- @include font-size(l);
- @include line-height(1);
- @include typeface(serif);
- font-weight: weight(bold);
- }
-
- &--yellow {
-
- position: relative;
- &:before {
- content: "";
- display: block;
- height: 1px;
- background: rgba($color-main, 0.5);
- width: 100%;
- top: -4px;
- position: absolute;
- }
- &:after {
- content: "";
- display: block;
- height: 1px;
- background: rgba($color-main, 0.5);
- width: 100%;
- bottom: -4px;
- position: absolute;
- }
-
- #{$module}__block-title {
- text-align: center;
- }
-
- background-color: $color-main;
- @include padding-top(2);
- @include padding-bottom(2);
- @include margin(2 0 0 0);
- color: $color-background;
-
- h2:first-child {
-
- }
-
- & + hr {
- //margin-top: 1px;
- }
-
- & + .page__block {
- //@include margin-top(2);
- }
-
- a:not(.button) {
-
- position: relative;
- z-index: 1;
- text-decoration: none;
- border-color: $color-background;
- border-bottom: 1px solid $color-background;
- color: $color-background;
- @include transition(all 0.15s ease-in-out);
-
- &:hover {
- box-shadow: inset 0 -30px $color-background;
- color: $color-main;
- }
-
- }
-
- }
-
- &--white {
-
- background-color: white;
- color: $color-background;
- @include padding-top(2);
- @include padding-bottom(2);
- @include margin(2 0 0 0);
-
- position: relative;
- &:before {
- content: "";
- display: block;
- height: 1px;
- background: rgba($color-main, 0.5);
- width: 100%;
- top: -4px;
- position: absolute;
- }
- &:after {
- content: "";
- display: block;
- height: 1px;
- background: rgba($color-main, 0.5);
- width: 100%;
- bottom: -4px;
- position: absolute;
- }
-
- #{$module}__block-title {
- text-align: center;
- }
-
- a:not(.button) {
-
- color: $color-background;
- position: relative;
- z-index: 1;
- text-decoration: none;
- border-color: $color-background;
-
- &:hover {
- box-shadow: none;
- color: $color-background;
- }
-
- }
-
- h2:first-child {
-
- }
-
- & + hr {
- //margin-top: 1px;
- }
-
- & + .page__block {
- //@include margin-top(2);
- }
-
- }
-
- &--black {
-
- background-color: $color-background;
- color: white;
- @include padding-top(2);
- @include padding-bottom(2);
- @include margin(2 0 0 0);
-
- position: relative;
- &:before {
- content: "";
- display: block;
- height: 1px;
- background: rgba($color-main, 0.5);
- width: 100%;
- top: -4px;
- position: absolute;
- }
- &:after {
- content: "";
- display: block;
- height: 1px;
- background: rgba($color-main, 0.5);
- width: 100%;
- bottom: -4px;
- position: absolute;
- }
-
- #{$module}__block-title {
- text-align: center;
- }
-
- a:not(.button) {
-
- color: white;
- position: relative;
- z-index: 1;
- text-decoration: none;
- border-color: $color-main;
-
- &:hover {
- box-shadow: none;
- color: $color-main;
- }
-
- }
-
- h2:first-child {
-
- }
-
- & + hr {
- //margin-top: 1px;
- }
-
- & + .page__block {
- //@include margin-top(2);
- }
-
- }
-
- &--red {
-
- background-color: red;
- color: white;
- @include padding-top(2);
- @include padding-bottom(2);
- @include margin(2 0);
-
- position: relative;
- &:before {
- content: "";
- display: block;
- height: 1px;
- background: rgba(255, 255, 255, 0.5);
- width: 100%;
- top: -4px;
- position: absolute;
- }
- &:after {
- content: "";
- display: block;
- height: 1px;
- background: rgba(255, 255, 255, 0.5);
- width: 100%;
- bottom: -4px;
- position: absolute;
- }
-
- #{$module}__block-title {
- text-align: center;
- }
-
- a:not(.button) {
-
- color: white;
- position: relative;
- z-index: 1;
- text-decoration: none;
- border-color: white;
-
- &:hover {
- box-shadow: none;
- color: white;
- }
-
- }
-
- h2:first-child {
-
- }
-
- & + hr {
- //margin-top: 1px;
- }
-
- & + .page__block {
- //@include margin-top(2);
- }
-
- }
-
- &--accent {
-
- background-color: $color-accent;
- color: $color-background;
- text-align: center;
- font-family: $serif;
-
- @include padding(2 0);
-
- h2 {
- font-family: $serif;
- font-weight: weight(bold);
- @include margin-bottom(1);
- @include margin-top(0);
- }
-
- strong {
- font-weight: weight(regular);
- }
-
- }
-
- p:last-child {
-
- margin-bottom: 0;
-
- }
-
- }
-
- &--organization {
-
- margin-top: -80px;
-
- @include mq($until: xs) {
-
- }
-
- .map {
- width: 100%;
- height: 950px;
- }
-
- }
-
- &--search {
-
- margin-top: 8rem;
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_pagination.scss b/app/themes/base/static/src/sass/modules/_pagination.scss
deleted file mode 100644
index d8188e73..00000000
--- a/app/themes/base/static/src/sass/modules/_pagination.scss
+++ /dev/null
@@ -1,68 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".pagination";
-
-#{$module} {
-
- list-style-type: none;
- margin: 0;
- padding: 0;
- text-align: right;
-
- @include typeface(sans-serif);
-
- @include margin(0 0 2 0);
-
- &__item {
-
- display: inline-block;
- vertical-align: middle;
- cursor: pointer;
-
- @include margin(0 0.1);
-
- }
-
- &__link {
-
- @include font-size(xs);
- @include line-height(1);
- @include typeface(sans-serif);
- @include margin(0);
- font-weight: weight(regular);
-
- display: block;
- background: #001B42;
- color: white;
-
- border: 1px solid black;
-
- @include padding(.15 .5);
- @include transition(all .25s ease-in-out);
-
- &.active, &:hover {
- background: #002C6B;
- color: white;
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_partners-list.scss b/app/themes/base/static/src/sass/modules/_partners-list.scss
deleted file mode 100644
index 2ee20f32..00000000
--- a/app/themes/base/static/src/sass/modules/_partners-list.scss
+++ /dev/null
@@ -1,47 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".partners-list";
-
-#{$module} {
-
- list-style-type: none;
- padding: 0;
- margin: 0;
-
- &__item {
-
- display: inline-block;
- width: 150px;
- height: 100px;
- background-size: contain;
- background-position: center center;
- background-repeat: no-repeat;
-
- @include margin(1 2 0 0);
-
- // SEO
- img {
- display: none;
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_pattern.scss b/app/themes/base/static/src/sass/modules/_pattern.scss
deleted file mode 100644
index 29274d48..00000000
--- a/app/themes/base/static/src/sass/modules/_pattern.scss
+++ /dev/null
@@ -1,116 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".pattern";
-
-#{$module}-bg {
-
- position: relative;
-
- &:after {
- content: "";
- background-repeat: repeat;
- background-position: top left;
- opacity: 1.0;
- top: 0;
- left: 0;
- bottom: 0;
- right: 0;
- position: absolute;
- z-index: -1;
- }
-
-
- &--circles {
- &:after {
- background-image: url(../img/patterns/circles.png);
- opacity: 0.2;
- }
- }
-
- &--squares {
- &:after {
- background-image: url(../img/patterns/squares.png);
- opacity: 0.4;
- }
- }
-
- &--stripes {
- &:after {
- background-image: url(../img/patterns/stripes.png);
- opacity: 0.4;
- }
- }
-
- &--triangles {
- &:after {
- background-image: url(../img/patterns/triangles.png);
- opacity: 0.2;
- }
- }
-
-}
-
-#{$module}-over {
-
- position: relative;
-
- &:after {
- content: "";
- display: block;
- position: absolute;
- top: 0;
- left: 0;
- bottom: 0;
- right: 0;
- background-repeat: repeat;
- background-position: top left;
- opacity: 0.2;
- }
-
- &--circles {
- &:after {
- background-image: url(../img/patterns/circles.png);
- opacity: 0.2;
- }
- }
-
- &--squares {
- &:after {
- background-image: url(../img/patterns/squares.png);
- opacity: 0.4;
- }
- }
-
- &--stripes {
- &:after {
- background-image: url(../img/patterns/stripes.png);
- opacity: 0.4;
- }
- }
-
- &--triangles {
- &:after {
- background-image: url(../img/patterns/triangles.png);
- opacity: 0.2;
- }
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_project-details.scss b/app/themes/base/static/src/sass/modules/_project-details.scss
deleted file mode 100644
index af68840a..00000000
--- a/app/themes/base/static/src/sass/modules/_project-details.scss
+++ /dev/null
@@ -1,121 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".project-details";
-
-#{$module} {
-
- &__title {
-
- text-align: left;
- @include padding-left(2);
- margin-left: 72px;
- @include margin-top(0);
-
- @include mq($until: lg) {
- margin-left: 72px;
- }
-
- @include mq($until: md) {
- margin-left: 72px;
- }
-
- @include mq($until: sm) {
- margin-left: 0;
- padding-left: 0;
- }
-
- }
-
- &__item {
-
- @include clearfix;
- @include margin(0 0 .5 0);
-
- }
-
- &__item-title {
-
- font-weight: weight(bold);
- float: left;
- clear: both;
- width: 100px;
- text-align: right;
- margin-right: 18px;
-
- @include mq($until: lg) {
- width: 100px;
- }
-
- @include mq($until: md) {
- width: 100px;
- }
-
- @include mq($until: sm) {
- float: none;
- text-align: left;
- }
-
- }
-
- &__item-desc {
-
- float: left;
- width: 380px;
- @include font-size(m);
- font-weight: weight(light);
-
- @include mq($until: lg) {
- width: 360px;
- }
-
- @include mq($until: md) {
- width: 330px;
- }
-
- @include mq($until: sm) {
- float: none;
- }
-
- }
-
- &__logo {
-
- clear: both;
- @include padding-left(0);
- margin-left: 200px;
- text-align: left;
-
- @include mq($until: lg) {
- margin-left: 150px;
- }
-
- @include mq($until: md) {
- margin-left: 150px;
- }
-
- @include mq($until: sm) {
- margin-left: 0;
- @include margin-bottom(2);
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_role-switcher.scss b/app/themes/base/static/src/sass/modules/_role-switcher.scss
deleted file mode 100644
index fad9e189..00000000
--- a/app/themes/base/static/src/sass/modules/_role-switcher.scss
+++ /dev/null
@@ -1,163 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".role-switcher";
-
-#{$module} {
-
- list-style-type: none;
- padding: 0;
- margin: 0;
- @include padding-right(.5);
-
- position: relative;
- z-index: 2;
-
- &__item {
-
- @include font-size(m);
- @include line-height($header-pre-height);
- @include typeface(sans-serif);
-
- @include padding(0 .5);
- width: 120px;
- margin-left: -30px;
- position: absolute;
-
- display: none;
-
- >a {
- color: white;
- &:hover {
- color: $color-main;
- }
- }
-
- &.active {
- display: block;
- }
-
- &:first-child {
- margin-left: 0px;
- width: auto;
- position: static;
- @include padding(0);
-
- >a:hover {
- color: white;
- }
-
- &:after {
- display: block;
- content: '\f107';
- color: white;
- position: absolute;
- top: 2px;
- right: -13px;
-
- font-family: FontAwesome;
- font-size: 0.8em;
-
- @include line-height($header-pre-height);
- @include margin-right(.5);
- @include transition(all 0.2s ease-in-out);
- }
- }
-
- &:nth-child(2) {
- top: $header-pre-height;
- }
- &:nth-child(3) {
- top: $header-pre-height*2;
- }
- &:nth-child(4) {
- top: $header-pre-height*3;
- }
- &:nth-child(5) {
- top: $header-pre-height*4;
- }
- &:nth-child(6) {
- top: $header-pre-height*5;
- }
- &:nth-child(7) {
- top: $header-pre-height*6;
- }
- &:nth-child(8) {
- top: $header-pre-height*7;
- }
-
- }
-
- &.open {
-
- #{$module}__item {
-
- display: block;
- background: $color-black;
-
- &:first-child {
- &:after {
- @include transform(rotate(180deg));
- }
- }
-
- }
-
- }
-
- //
- // Sidenav overrides
- //
- .sidebar & {
-
- &:before {
-
- display: block;
- content: "";
- background: black;
- width: 240px;
- height: 6px;
- @include margin(1.5 0 1 0);
-
- }
-
- #{$module}__item {
-
- &:first-child {
- display: none;
- }
-
- position: static;
- margin-left: 0;
- display: block;
- padding: 0;
- @include margin(0 0 .5 0);
-
- >a {
- color: black;
- @include font-size(l);
- }
-
- }
-
- }
-
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_search.scss b/app/themes/base/static/src/sass/modules/_search.scss
deleted file mode 100644
index ee369ec3..00000000
--- a/app/themes/base/static/src/sass/modules/_search.scss
+++ /dev/null
@@ -1,159 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".search";
-
-#{$module} {
-
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- z-index: 100;
-
- background: rgba($color-background, .95);
-
- display: block;
- height: 0;
- opacity: 0;
- overflow: hidden;
-
- @include transition(opacity .5s ease-in-out, height 0s .5s);
-
- &.open {
-
- height: 100%;
- display: table;
- opacity: 1;
- @include transition(opacity .5s ease-in-out, height 0s);
-
- }
-
- &__close {
-
- position: absolute;
- top: 2rem;
- right: 2rem;
- z-index: 2;
- color: white;
- display: block;
-
- width: 40px;
- height: 40px;
-
- &:before, &:after {
- width: 100%;
- height: 1px;
- content: "";
- display: block;
- background: white;
-
- position: absolute;
- top: 20px;
- left: 0;
-
- @include transition(all 0.5s ease-in-out);
- }
-
- &:before {
- @include transform(rotate(45deg));
- }
- &:after {
- @include transform(rotate(-45deg));
- }
-
- &:hover {
-
- &:before {
- background: $color-main;
- @include transform(rotate(225deg));
- }
- &:after {
- background: $color-main;
- @include transform(rotate(-225deg));
- }
-
- }
-
- }
-
- &__container {
-
- display: table;
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: 1;
-
- }
-
- &__content {
-
- display: table-cell;
- vertical-align: middle;
- text-align: center;
-
- }
-
-}
-
-.search-form {
-
- input[type="text"] {
-
- border: 0;
- outline: none;
- background: none;
- border-bottom: 1px solid $color-main;
-
- padding: 1rem 3rem 1rem 0;
- width: 100%;
- color: white;
-
- @include font-size(xxl);
- @include typeface(serif);
- font-weight: weight(regular);
-
- @include mq($until: sm) {
- @include font-size(xl);
- }
-
- }
-
- button[type="submit"] {
-
- position: absolute;
- right: 1rem;
- top: 1rem;
-
- border: 0;
- background: none;
- outline: 0;
- cursor: pointer;
-
- color: white;
-
- @include font-size(xxl);
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_section-title.scss b/app/themes/base/static/src/sass/modules/_section-title.scss
deleted file mode 100644
index a747fbb5..00000000
--- a/app/themes/base/static/src/sass/modules/_section-title.scss
+++ /dev/null
@@ -1,92 +0,0 @@
-$module: ".section-title";
-
-#{$module} {
-
- @include typeface(sans-serif);
- @include font-size(m);
- font-weight: weight(regular);
-
- text-align: center;
- color: white;
- display: inline-block;
- line-height: 1.5em;
-
- @include margin-bottom(4);
- @include margin-top(5);
-
- @include mq($until: md) {
-
- @include margin-bottom(1);
- @include margin-top(1.25);
-
- .page__slider & {
- @include margin-top(0);
- }
-
- }
-
- i {
- display: inline-block;
- @include margin-right(.5);
- @include transition(all 0.5s ease-in-out);
- }
-
- a {
- color: inherit;
- @include transition(all 0.5s ease-in-out);
- &:hover {
- color: $color-main;
- i {
- @include transform(translateX(-50%));
- }
- }
- }
-
- &--uppercase {
- text-transform: uppercase;
- }
-
- &--underline {
- border-bottom: 1px solid white;
- }
-
- &--dark {
- color: $color-background;
- }
-
- &--accent {
- border-color: $color-accent;
- &:before {
- color: $color-accent;
- }
- }
-
- &--main {
- border-color: $color-main;
- &:before {
- color: $color-main;
- }
- }
-
- &:before {
- content: '_';
- display: block;
- text-decoration: none !important;
- @include font-size(m);
- @include margin-bottom(.5);
- }
-
- &--big {
-
- color: $color-main;
- @include font-size(xxxl);
- text-transform: none;
- @include margin-bottom(1);
-
- &:before {
- display: none;
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_share-links.scss b/app/themes/base/static/src/sass/modules/_share-links.scss
deleted file mode 100644
index 10440153..00000000
--- a/app/themes/base/static/src/sass/modules/_share-links.scss
+++ /dev/null
@@ -1,65 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".share-links";
-
-#{$module} {
-
- list-style-type: none;
- padding: 0;
- margin: 0;
- @include margin-top(0);
-
- &__item {
-
- display: block;
- font-size: 2rem;
- @include margin-bottom(.5);
- color: white;
-
- @include mq($until: md) {
- display: inline-block;
- @include margin-right(.5);
- }
-
- a {
- color: white;
- @include transition(all 0.5s ease-in-out);
-
- &:hover {
- color: $color-main;
- }
- }
-
- }
-
- .overlay & {
-
- #{$module}__item {
-
- display: inline-block;
- @include margin-right(.25);
- font-size: 1.3rem;
-
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_sidebar.scss b/app/themes/base/static/src/sass/modules/_sidebar.scss
deleted file mode 100644
index 4f05e4d6..00000000
--- a/app/themes/base/static/src/sass/modules/_sidebar.scss
+++ /dev/null
@@ -1,67 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".sidebar";
-
-#{$module} {
-
- @include padding-bottom(1);
- /* Rectangle 2: */
- background-image: -webkit-linear-gradient(bottom, rgba(79,227,194,0.00) 0%, rgba(80,227,194,0.30) 100%);
- background-image: -o-linear-gradient(bottom, rgba(79,227,194,0.00) 0%, rgba(80,227,194,0.30) 100%);
- background-image: linear-gradient(to top, rgba(79,227,194,0.00) 0%, rgba(80,227,194,0.30) 100%);
-
- &__menu {
-
- @include padding(0 1);
- text-align: left;
- list-style-type: none;
- margin: 0;
-
- }
-
- &__menu-item {
-
- @include font-size(xl);
- @include typeface(sans-serif);
- @include line-height(2);
- font-weight: weight(regular);
-
- a {
- color: black;
- &:hover {
- color: black;
- }
- }
-
- }
-
- .col-xs-3 {
- &:first-of-type {
- margin-top: 10px;
- }
- padding-left: 0;
- padding-right: 0;
- width: 100%;
- display: block;
- @include margin(0 0 .5 0);
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_tag.scss b/app/themes/base/static/src/sass/modules/_tag.scss
deleted file mode 100644
index 94bddc67..00000000
--- a/app/themes/base/static/src/sass/modules/_tag.scss
+++ /dev/null
@@ -1,57 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".tag";
-
-#{$module} {
-
- display: inline-block;
- background: white;
-
- @include font-size(l);
- @include line-height(1.4);
- @include typeface(sans-serif);
- font-weight: weight(regular);
-
- &--small {
- @include font-size(s);
- @include line-height(1);
- @include padding-right(.5);
- }
-
- &--xsmall {
- @include font-size(xs);
- @include line-height(1);
- @include padding-right(.25);
- }
-
- &--category {
- background: black;
- color: white;
-
- @include padding-left(.5);
- @include padding-right(.5);
- }
-
- /*& + #{$module} {
- margin-left: -0.25em;
- }*/
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_tweets.scss b/app/themes/base/static/src/sass/modules/_tweets.scss
deleted file mode 100644
index f103fe63..00000000
--- a/app/themes/base/static/src/sass/modules/_tweets.scss
+++ /dev/null
@@ -1,73 +0,0 @@
-$module: ".tweets";
-
-#{$module} {
-
- list-style-type: none;
- margin: 0;
- padding: 0;
-
- &__tweet {
-
- @include margin-bottom(1);
-
- }
-
- &__tweet-image {
-
- width: 100%;
- border-radius: 10px;
-
- }
-
- &__tweet-content {
-
- text-align: left;
-
- }
-
- &__tweet-author {
-
- margin: 0;
- @include margin-bottom(.5);
- color: white;
- @include typeface(sans-serif);
- @include font-size(m);
- font-weight: weight(regular);
-
- a {
- display: inline-block;
- @include margin-left(.5);
- color: white;
-
- &:hover {
- color: $color-main;
- }
- }
-
- span {
- display: inline-block;
- @include margin-left(.5);
- font-weight: weight(light);
- }
-
- }
-
- &__tweet-body {
-
- @include typeface(sans-serif);
- @include font-size(m);
- font-weight: weight(light);
- a {
- display: inline-block;
- @include margin-right(.25);
- color: white;
- font-weight: weight(regular);
-
- &:hover {
- color: $color-main;
- }
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/_well.scss b/app/themes/base/static/src/sass/modules/_well.scss
deleted file mode 100644
index 65ba5866..00000000
--- a/app/themes/base/static/src/sass/modules/_well.scss
+++ /dev/null
@@ -1,35 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".well";
-
-#{$module} {
-
- width: 100%;
- background: $color-main;
-
- @include padding(2 0);
- @include margin(0 0 1 0);
- @include font-size(xl);
- @include line-height(1.7);
- @include typeface(sans-serif);
- font-weight: weight(light);
-
-}
diff --git a/app/themes/base/static/src/sass/modules/boxes/_article-box.scss b/app/themes/base/static/src/sass/modules/boxes/_article-box.scss
deleted file mode 100644
index affa18a1..00000000
--- a/app/themes/base/static/src/sass/modules/boxes/_article-box.scss
+++ /dev/null
@@ -1,336 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".article-box";
-
-#{$module} {
-
- position: relative;
- display: block;
- @include margin-bottom(1);
- @include transition(all 0.5s ease-in-out);
-
- border: 1px solid rgba($color-main, 0.35);
- @include padding(1);
-
- height: 550px;
-
- @include mq($until: xs) {
- height: auto;
- }
-
- @include mq($until: md) {
- @include padding(.5);
- }
-
- .slider-home & {
- @include margin(0);
- max-width: none;
- height: auto;
- }
-
- &:hover {
-
- border: 1px solid rgba($color-main, 1);
- background: $color-main;
-
- .article-box__image-container {
- background: black;
- }
-
- .article-box__image {
-
- img {
- -webkit-filter: grayscale(0);
- filter: grayscale(0);
- }
-
- }
-
- .article-box__title {
- color: $color-background;
- }
- .article-box__tags {
- color: $color-background;
- }
- .article-box__subtitle {
- color: $color-background;
- }
- .article-box__desc {
- color: $color-background;
- }
-
- }
-
- &__header {
- position: relative;
- }
-
- &__image-container {
- background: $color-background;
- @include transition(all 0.5s ease-in-out);
- }
-
- &__image {
- margin: 0;
- padding: 0;
- width: 100%;
- position: relative;
- overflow: hidden;
-
- @include fluid-aspect(427 286);
-
- img {
- display: block;
- width: 100%;
- max-width: 100%;
- height: auto;
-
- @include transition(all 0.5s ease-in-out);
-
- -webkit-filter: grayscale(1);
- filter: grayscale(1);
- mix-blend-mode: screen;
- }
-
- }
-
- &__placeholder {
-
- background: $color-main;
-
- &.recherche, &.research {
- background-color: white;
- background-image: url(../img/patterns/squares.png);
- opacity: 0.4;
- }
- &.creation {
- background-color: white;
- background-image: url(../img/patterns/circles.png);
- opacity: 0.2;
- }
- &.transmission {
- background-color: white;
- background-image: url(../img/patterns/stripes.png);
- opacity: 0.4;
- }
- &.innovation, &.innovations {
- background-color: white;
- background-image: url(../img/patterns/triangles.png);
- opacity: 0.2;
- }
-
- }
-
- &__tags {
-
- text-transform: uppercase;
- @include font-size(s);
- @include line-height(1.25);
- @include typeface(sans-serif);
- @include margin(0 0 0 0);
- font-weight: weight(regular);
- color: $color-main;
- @include transition(color 0.5s ease-in-out);
- }
-
- &__btn {
- position: absolute;
- bottom: 0;
- right: 0;
-
- @include margin-bottom(.5);
- @include margin-right(.5);
-
- }
-
- &__content {
- @include padding(.25 .25 .25 .25);
-
- position: relative;
- overflow: hidden;
-
- @include mq($until: xs) {
- height: auto;
- }
-
- .slider-home & {
- @include padding(0);
- }
- }
-
- &__title {
- @include font-size(xl);
- @include line-height(1.25);
- @include typeface(sans-serif);
- @include margin(.5 0 0 0);
- font-weight: weight(bold);
- color: $color-main;
- @include transition(color 0.5s ease-in-out);
- }
-
- &__tag {
- color: $color-main;
- }
-
- &__subtitle {
- @include font-size(m);
- @include line-height(.75);
- @include typeface(sans-serif);
- @include margin-top(.25);
- font-weight: weight(bold);
- color: white;
- text-transform: uppercase;
- @include transition(color 0.5s ease-in-out);
-
- span {
- @include typeface(serif);
- @include font-size(s);
- font-weight: weight(regular);
- text-transform: none;
- display: block;
- @include margin-top(.25);
- }
-
- .slider-home & {
- @include margin-top(.5);
- }
-
- }
-
- &__desc {
- @include font-size(s);
- @include line-height(.75);
- @include typeface(serif);
- @include margin(1 0 .25 0);
- font-weight: weight(light);
- color: white;
- @include transition(color 0.5s ease-in-out);
- }
-
- &--small {
-
- .article-box__content {
- height: auto;
- &:after {
- display: none;
- }
- }
-
- .article-box__btn {
- display: none;
- }
-
- }
-
- .slider-home & {
- display: inline-block;
- max-width: 450px;
- background: transparent;
-
- &__content {
- background: transparent;
- margin-top: 1px;
- }
- }
-
- &--person {
-
- @include margin-top(2);
- position: relative;
- border: 0;
- @include padding(0);
-
- height: auto;
-
- &:after {
-
- content: "";
- display: block;
- height: 1px;
- width: 100%;
- background: $color-main;
- position: absolute;
- bottom: -24px;
- left: 0;
- right: 0;
-
- }
-
- #{$module}__title {
-
- @include font-size(xl);
- @include line-height(1.25);
- @include typeface(sans-serif);
- @include margin(.25 0 .25 0);
- font-weight: weight(heavy);
-
- }
-
- #{$module}__image {
-
- @include fluid-aspect(427 500);
-
- }
-
- #{$module}__desc {
- @include line-height(1);
- }
-
- #{$module}__content {
-
- @include mq($until: xs) {
- height: auto;
- }
-
- /*&:after {
-
- @include mq($until: xs) {
- display: none;
- }
-
- content: "";
- display: block;
- position: absolute;
- bottom: 0;
- left: 0;
- right: 0;
- height: 100px;
- background-color: rgba($color-background, 0);
- @include filter-gradient(rgba($color-background, 1), rgba($color-background, 1), vertical);
- @include background-image(linear-gradient(top, rgba($color-background, 0) 0%, rgba($color-background, 1) 50%));
- }*/
-
- }
-
- &:hover {
- border: 0;
- background-color: $color-background;
- #{$module}__title {
- color: $color-main;
- }
- #{$module}__desc {
- color: white;
- }
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/boxes/_brief-box.scss b/app/themes/base/static/src/sass/modules/boxes/_brief-box.scss
deleted file mode 100644
index ebf46161..00000000
--- a/app/themes/base/static/src/sass/modules/boxes/_brief-box.scss
+++ /dev/null
@@ -1,126 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".brief-box";
-
-#{$module} {
-
- position: relative;
- @include padding(1);
- @include margin-bottom(1);
- text-align: center;
-
- background: $brief-box-background;
-
- &__head {
-
- text-transform: uppercase;
- display: inline-block;
- background: $brief-box-background-head;
- color: $brief-box-color-head;
-
- @include padding(0 1);
-
- @include font-size(m);
- @include line-height(1.25);
- @include typeface(sans-serif);
- font-weight: weight(regular);
-
- }
-
- &__title {
-
- display: block;
- margin: 0 auto;
- color: $brief-box-color;
-
- @include margin-top(4);
- @include margin-bottom(1);
-
- @include font-size(l);
- @include line-height(1.25);
- @include typeface(serif);
- font-weight: weight(heavy);
-
- @include mq($until: lg) {
- @include margin-top(2);
- }
-
- }
-
- &__desc {
-
- display: block;
- margin: 0 auto;
- color: $brief-box-color;
-
- @include margin-bottom(1);
-
- @include font-size(l);
- @include line-height(1.25);
- @include typeface(serif);
- font-weight: weight(light);
-
- }
-
- &__button {
-
- @extend .button;
- @extend .button--small;
-
- @include margin-bottom(4);
- margin-right: 0;
-
- @include mq($until: lg) {
- @include margin-bottom(2);
- }
-
- }
-
- &--black {
-
- background: $color-black;
-
- #{$module}__title {
- color: white;
- }
- #{$module}__desc {
- color: white;
- }
-
- }
-
- &--yellow {
-
- background: $color-main;
-
- #{$module}__title {
- color: $color-black;
- }
- #{$module}__desc {
- color: $color-black;
- }
- #{$module}__button {
- @extend .button--black;
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/boxes/_event-line-box.scss b/app/themes/base/static/src/sass/modules/boxes/_event-line-box.scss
deleted file mode 100644
index 93925a56..00000000
--- a/app/themes/base/static/src/sass/modules/boxes/_event-line-box.scss
+++ /dev/null
@@ -1,263 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".event-line-box";
-
-#{$module} {
-
- position: relative;
- display: block;
-
- border: 1px solid rgba($color-main, 0.35);
-
- background: $color-background;
- @include transition(all 0.5s ease-in-out);
- @include margin-bottom(5);
-
- @include mq($until: sm) {
- @include margin-bottom(1);
- }
-
- .lightSlider & {
- margin-bottom: 0 !important;
- }
-
- &:after {
-
- content: "";
- display: block;
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- /* Rectangle 3: */
- background-image: -webkit-linear-gradient(right, rgba(0,15,36,0.00) 0%, rgba(0,15,36,0.90) 99%);
- background-image: -o-linear-gradient(right, rgba(0,15,36,0.00) 0%, rgba(0,15,36,0.90) 99%);
- background-image: linear-gradient(to left, rgba(0,15,36,0.00) 0%, rgba(0,15,36,0.90) 99%);
-
- z-index: 1;
-
- @include mq($until: sm) {
- display: none;
- }
-
- }
-
- &:hover {
-
- border: 1px solid rgba($color-main, 1);
- background: black;
-
- .event-line-box__image {
-
- -webkit-filter: grayscale(0);
- filter: grayscale(0);
-
- }
-
- .event-line-box__category {
-
- background: $color-main;
-
- }
-
- .event-line-box__date {
-
- color: $color-main;
-
- }
-
- }
-
- &__content {
-
- position: absolute;
- top: 0;
- left: 0;
- height: 100%;
- width: 100%;
- text-align: left;
- z-index: 2;
-
- @include mq($until: sm) {
- position: static;
- }
-
- /*@include mq($until: lg) {
- height: 312px;
- }
- @include mq($until: md) {
- height: 361px;
- }*/
-
- }
-
- &__month {
-
- @include font-size(l);
- @include line-height(1);
- @include typeface(serif);
- font-weight: weight(heavy);
-
- visibility: hidden;
- height: 0;
-
- }
-
- &__image {
-
- @include fluid-aspect(1030 400);
-
- @include transition(all 0.5s ease-in-out);
-
- -webkit-filter: grayscale(1);
- filter: grayscale(1);
- mix-blend-mode: screen;
-
- }
-
- &__button {
-
- position: absolute;
- top: 50%;
- right: 1rem;
- @include transform(translateY(-50%));
-
- @include mq($until: sm) {
- top: 70px;
- width: auto;
- }
-
- }
-
- &__tags {
-
- margin-bottom: 5px;
-
- }
-
- &__category {
-
- position: absolute;
- top: 50%;
- left: 0;
- background: white;
- color: $color-background;
- text-align: right;
- text-transform: uppercase;
- @include font-size(s);
- @include line-height(1.25);
- @include typeface(sans-serif);
- font-weight: weight(regular);
-
- @include padding(0.1 .5 0.1 .5);
- @include transform(translateY(-50%));
- @include transition(all 0.5s ease-in-out);
- width: 10rem;
-
- @include mq($until: sm) {
- top: 70px;
- width: auto;
- @include padding(0.1 .5 0.1 2);
- }
-
- }
-
- &__body {
-
- position: absolute;
- top: 50%;
- left: 12rem;
- @include transform(translateY(-50%));
-
- @include mq($until: sm) {
- position: static;
- @include transform(translateY(0));
- @include padding(1);
- }
-
- }
-
- &__title {
-
- font-size: 36px;
- @include line-height(1.5);
- @include typeface(sans-serif);
- font-weight: weight(regular);
- text-transform: uppercase;
-
- color: $color-main;
-
- margin: 0 !important;
-
- a:not(.button) {
-
- color: $color-main;
- border: 0;
-
- &:hover {
- box-shadow: none;
- }
-
- }
-
- }
-
- &__location {
-
- @include font-size(s);
- @include line-height(1.25);
- @include typeface(sans-serif);
- font-weight: weight(regular);
- color: $color-main;
-
- }
-
- &__date {
-
- @include font-size(l);
- @include line-height(1.25);
- @include typeface(sans-serif);
- font-weight: weight(regular);
- color: white;
- @include transition(all 0.5s ease-in-out);
-
- @include margin-top(1);
-
- span {
- display: block;
- @include font-size(m);
- }
-
- }
-
- &__desc {
-
- @include font-size(m);
- @include line-height(1);
- @include typeface(serif);
- font-weight: weight(light);
-
- color: $color-main;
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/boxes/_job-line-box.scss b/app/themes/base/static/src/sass/modules/boxes/_job-line-box.scss
deleted file mode 100644
index fae16101..00000000
--- a/app/themes/base/static/src/sass/modules/boxes/_job-line-box.scss
+++ /dev/null
@@ -1,70 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".job-line-box";
-
-#{$module} {
-
- &:after {
-
- content: "";
- display: block;
- width: 100%;
- height: 1px;
- background: rgba(0, 0, 0, 0.25);
-
- @include margin(2 0 1 0);
-
- @include mq($until: sm) {
- @include margin(1 0 1 0);
- }
-
- }
-
- &--candidacy {
-
- #{$module}__title {
-
- @include margin-top(0);
-
- }
-
- #{$module}__image {
-
- border-radius: 150px;
-
- }
-
- }
-
- &__title {
-
- @include margin-bottom(1);
- @include margin-top(0.5);
-
- }
-
- &__desc {
-
- @include margin-bottom(1);
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/boxes/_media-box.scss b/app/themes/base/static/src/sass/modules/boxes/_media-box.scss
deleted file mode 100644
index 601cfeed..00000000
--- a/app/themes/base/static/src/sass/modules/boxes/_media-box.scss
+++ /dev/null
@@ -1,194 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".media-box";
-
-#{$module} {
-
- position: relative;
- display: block;
- text-align: left;
-
- @include margin-bottom(1);
- @include transition(all 0.5s ease-in-out);
-
- border: 1px solid rgba($color-main, 0.35);
- @include padding(1);
-
- height: 550px;
-
- @include mq($until: xs) {
- height: auto;
- }
-
- @include mq($until: md) {
- @include padding(.5);
- }
-
- &--audio {
-
- #{$module}__placeholder {
- background: rgba($color-main, 0.35);
- }
-
- }
-
- &:hover {
-
- border: 1px solid rgba($color-main, 1);
- background: $color-main;
-
- .media-box__image-container {
- background: black;
- }
-
- .media-box__image {
-
- img {
- -webkit-filter: grayscale(0);
- filter: grayscale(0);
- }
-
- }
-
- .media-box__title {
- color: $color-background;
- }
- .media-box__type {
- color: $color-background;
- }
- .media-box__subtitle {
- color: $color-background;
- }
- .media-box__desc {
- color: $color-background;
- }
- }
-
- &__image-container {
- background: $color-background;
- display: block;
- @include transition(all 0.5s ease-in-out);
- }
-
- &__placeholder {
-
- background: $color-main;
-
- }
-
- &__content {
- @include padding(.25 .25 .25 .25);
-
- position: relative;
- overflow: hidden;
- display: block;
-
- @include mq($until: xs) {
- height: auto;
- }
-
- .slider-home & {
- @include padding(0);
- }
- }
-
- &__image {
- margin: 0;
- padding: 0;
- width: 100%;
- position: relative;
- overflow: hidden;
-
- @include fluid-aspect(427 286);
-
- img {
- display: block;
- width: 100%;
- max-width: 100%;
- height: auto;
-
- @include transition(all 0.5s ease-in-out);
-
- -webkit-filter: grayscale(1);
- filter: grayscale(1);
- mix-blend-mode: screen;
- }
-
- &:after {
- content: "\f04b";
- text-indent: 0px;
- color: white;
- font-family: FontAwesome;
- font-size: 50px;
- position: absolute;
- top: 50%;
- left: 50%;
-
- @include transform(translateX(-50%) translateY(-50%));
-
- }
-
- &--audio {
- &:after {
- content: "\f028";
- }
- }
-
- }
-
- &__type {
-
- text-transform: uppercase;
- @include font-size(s);
- @include line-height(1.25);
- @include typeface(sans-serif);
- @include margin(0 0 0 0);
- font-weight: weight(regular);
- color: $color-main;
- @include transition(color 0.5s ease-in-out);
-
- }
-
- &__title {
-
- @include font-size(xl);
- @include line-height(1.25);
- @include typeface(sans-serif);
- @include margin(.5 0 0 0);
- font-weight: weight(bold);
- color: $color-main;
- @include transition(color 0.5s ease-in-out);
-
- }
-
- &__desc {
-
- @include font-size(s);
- @include line-height(.75);
- @include typeface(serif);
- @include margin(1 0 .25 0);
- font-weight: weight(light);
- color: white;
- @include transition(color 0.5s ease-in-out);
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/boxes/_page-box.scss b/app/themes/base/static/src/sass/modules/boxes/_page-box.scss
deleted file mode 100644
index f2f8c7ab..00000000
--- a/app/themes/base/static/src/sass/modules/boxes/_page-box.scss
+++ /dev/null
@@ -1,132 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".page-box";
-
-#{$module} {
-
- position: relative;
- width: 100%;
- display: block;
-
- @include margin-bottom(1);
-
- @include mq($until: sm) {
- height: auto;
- overflow: hidden;
- }
-
- &:first-of-type {
-
- @include margin-top(3);
-
- }
-
- &__image {
-
- @include fluid-aspect(9 4);
-
- @include mq($until: xs) {
- @include fluid-aspect(4.5 8);
- >img:first-child {
- width: 310%;
- left: -50%;
- max-width: none;
- }
- }
-
- &:after {
- content: '';
- display: block;
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
-
- background: rgba(0, 0, 0, 0.4);
- @include transition(all 0.25s ease-in-out);
- }
-
- }
-
- &__placeholder {
-
- background: $color-main;
-
- &.pattern-bg--squares {
- background-color: white;
- background-image: url(../img/patterns/squares.png);
- opacity: 0.4;
- }
- &.pattern-bg--circles {
- background-color: white;
- background-image: url(../img/patterns/circles.png);
- opacity: 0.2;
- }
- &.pattern-bg--stripes {
- background-color: white;
- background-image: url(../img/patterns/stripes.png);
- opacity: 0.4;
- }
- &.pattern-bg--triangles {
- background-color: white;
- background-image: url(../img/patterns/triangles.png);
- opacity: 0.2;
- }
-
- }
-
- &__content {
-
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
-
- display: flex;
- align-items: center;
- justify-content: center;
- text-align: center;
-
- @include padding(1);
-
- }
-
- &__title {
-
- color: $color-main;
- font-weight: weight(heavy);
-
- @include margin(0 0 1 0);
-
- }
-
- &__subtitle {
-
- color: white;
- font-weight: weight(bold);
-
- @include font-size(m);
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/boxes/_person-list-box.scss b/app/themes/base/static/src/sass/modules/boxes/_person-list-box.scss
deleted file mode 100644
index 36d2a4d9..00000000
--- a/app/themes/base/static/src/sass/modules/boxes/_person-list-box.scss
+++ /dev/null
@@ -1,57 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".person-list-box";
-
-#{$module} {
-
- position: relative;
- @include margin-top(2);
- @include margin-bottom(1);
-
- &__image {
-
- @include mq($until: xs) {
-
- margin: 0;
- @include margin-bottom(1);
-
- }
-
- margin: 0 auto;
- width: 135px;
- height: 135px;
- border-radius: 135px;
-
- img {
- border-radius: 135px;
- }
-
- }
-
- &__desc {
- @include font-size(s);
- @include line-height(.75);
- @include typeface(serif);
- @include margin(1 0 2 0);
- font-weight: weight(light);
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/boxes/_product-box.scss b/app/themes/base/static/src/sass/modules/boxes/_product-box.scss
deleted file mode 100644
index 428c9ecd..00000000
--- a/app/themes/base/static/src/sass/modules/boxes/_product-box.scss
+++ /dev/null
@@ -1,75 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".product-box";
-
-#{$module} {
-
- position: relative;
- @include margin-bottom(2);
-
- &__image {
-
- @include fluid-aspect(320 100);
-
- }
-
- &__title {
-
- @include font-size(xxl);
- @include line-height(2);
- @include typeface(sans-serif);
- @include margin(0 0 1 0);
-
- }
-
- &__desc {
-
- @include font-size(s);
- @include line-height(.75);
- @include typeface(serif);
- @include margin(1 0 .25 0);
- font-weight: weight(light);
-
- }
-
- &__content {
-
- @include padding(.5);
-
- height: 150px;
-
- }
-
- &:after {
-
- content: "";
- display: block;
- height: 1px;
- width: 100%;
- background: #979797;
- position: absolute;
- bottom: -24px;
- left: 0;
- right: 0;
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/boxes/_search-box.scss b/app/themes/base/static/src/sass/modules/boxes/_search-box.scss
deleted file mode 100644
index 628dc45a..00000000
--- a/app/themes/base/static/src/sass/modules/boxes/_search-box.scss
+++ /dev/null
@@ -1,193 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".search-box";
-
-#{$module} {
-
- position: relative;
- @include clearfix;
- @include margin-bottom(2);
-
- &:hover {
-
- #{$module}__title {
- color: $color-main;
- }
-
- }
-
- &__title {
- @include margin(0 0 0 0);
- font-weight: weight(bold);
- text-transform: uppercase;
- color: white;
- @include transition(color 0.25s ease-in-out);
-
- i {
- display: inline-block;
- @include margin-left(.5);
- font-size: 0.75em;
- position: relative;
- top: -5px;
- }
- }
-
- &__subtitle {
-
- @include font-size(m);
- @include line-height(.75);
- @include typeface(sans-serif);
- @include margin-top(.25);
- font-weight: weight(bold);
- color: white;
- text-transform: uppercase;
- @include transition(color 0.5s ease-in-out);
-
- span {
- @include typeface(serif);
- @include font-size(s);
- font-weight: weight(regular);
- text-transform: none;
- display: block;
- @include margin-top(.25);
- }
-
- }
-
- &__tags {
-
- text-transform: uppercase;
- @include font-size(s);
- @include line-height(1.25);
- @include typeface(sans-serif);
- @include margin(0 0 0 0);
- font-weight: weight(regular);
- color: $color-main;
- @include transition(color 0.5s ease-in-out);
-
- }
-
- &__content {
-
- @include font-size(s);
- @include line-height(1);
- @include typeface(serif);
- font-weight: weight(light);
- @include transition(color 0.5s ease-in-out);
-
- }
-
- &__image-wrapper {
-
- float: left;
- width: 20%;
- display: block;
-
- & + #{$module}__right {
-
- width: 80%;
- float: left;
- @include padding-left(1);
-
- }
-
- @include mq($until: xs) {
- display: none;
-
- & + #{$module}__right {
-
- width: 100%;
- float: none;
- @include padding-left(0);
-
- }
- }
-
- }
-
- &__image {
-
- @include fluid-aspect(720 435);
-
- &--playlist {
-
- @include fluid-aspect(720 435);
-
- }
-
- &--video {
-
- &:after {
- font-family: FontAwesome;
- display: block;
- content: "\f04b";
- background: white;
- width: 50px;
- height: 50px;
- border-radius: 50px;
-
- font-size: 25px;
-
- position: absolute;
- top: 50%;
- left: 50%;
- margin-top: -25px;
- margin-left: -25px;
-
- line-height: 50px;
- text-align: center;
- text-indent: 3px;
-
- }
-
- }
-
- &--audio {
-
- &:after {
- font-family: FontAwesome;
- display: block;
- content: "\f028";
- text-indent: 0px;
- background: white;
- width: 50px;
- height: 50px;
- border-radius: 50px;
-
- font-size: 25px;
-
- position: absolute;
- top: 50%;
- left: 50%;
- margin-top: -25px;
- margin-left: -25px;
-
- line-height: 50px;
- text-align: center;
- text-indent: 3px;
-
- }
-
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/medias/_audio-playlist.scss b/app/themes/base/static/src/sass/modules/medias/_audio-playlist.scss
deleted file mode 100644
index 36625564..00000000
--- a/app/themes/base/static/src/sass/modules/medias/_audio-playlist.scss
+++ /dev/null
@@ -1,67 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".audio-playlist";
-
-#{$module} {
-
- margin-top: 0;
- padding: 0;
- background: $color-black-light;
- list-style-type: none;
- color: $color-background;
-
- &__item {
-
- @include padding(0.25 1);
- @include font-size(xs);
- @include typeface(sans-serif);
- @include transition(all 0.25s ease-in-out);
- font-style: italic;
-
- small {
- font-style: normal;
- display: inline-block;
- margin-left: 5px;
- }
-
- color: white;
-
- &.playing {
-
- background: $color-main;
- color: $color-black-light;
-
- >a {
- color: $color-black-light;
- }
-
- }
-
- >a {
-
- @include transition(all 0.25s ease-in-out);
- color: white;
-
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/medias/_video-playlist.scss b/app/themes/base/static/src/sass/modules/medias/_video-playlist.scss
deleted file mode 100644
index eb9ce85e..00000000
--- a/app/themes/base/static/src/sass/modules/medias/_video-playlist.scss
+++ /dev/null
@@ -1,65 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".video-playlist";
-
-#{$module} {
-
- margin-top: 0;
- padding: 0;
- background: $color-black-light;
- list-style-type: none;
-
- &__item {
-
- @include padding(0.25 1);
- @include font-size(xs);
- @include typeface(sans-serif);
- @include transition(all 0.25s ease-in-out);
- color: white;
- font-style: italic;
-
- small {
- font-style: normal;
- display: inline-block;
- margin-left: 5px;
- }
-
- &.playing {
-
- background: $color-main;
- color: $color-black-light;
-
- >a {
- color: $color-black-light;
- }
-
- }
-
- >a {
-
- @include transition(all 0.25s ease-in-out);
- color: white;
-
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/navs/_nav-actions.scss b/app/themes/base/static/src/sass/modules/navs/_nav-actions.scss
deleted file mode 100644
index e02ed1f7..00000000
--- a/app/themes/base/static/src/sass/modules/navs/_nav-actions.scss
+++ /dev/null
@@ -1,116 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".nav-actions";
-
-#{$module} {
-
- list-style-type: none;
- margin: 0;
- padding: 0;
- text-align: center;
-
- &__item {
-
- display: inline-block;
- color: white;
- text-transform: lowercase;
-
- @include margin(0 .5);
-
- &:nth-child(1), &:nth-child(2) {
-
- color: $color-main;
-
- }
-
- &:nth-child(2):after {
-
- content: '|';
- display: inline-block;
- @include margin(0 0 0 1);
- color: white;
-
- }
-
- }
-
- &__item-link {
-
- color: inherit;
- text-decoration: none;
-
- @include font-size(m);
- @include line-height($header-pre-height);
- @include typeface(sans-serif);
-
- }
-
- //
- // Sidenav overrides
- //
- .sidebar & {
-
- @include padding(0.5 1);
- text-align: left;
-
- &__item {
- display: block;
- @include margin(0 0 .5 0);
-
- &:nth-child(2):after {
- display: none;
- }
- }
-
- &__item-link {
- color: black;
- @include font-size(l);
-
- &:hover {
- color: black;
- }
- }
-
- &:before {
-
- display: block;
- content: "";
- background: #979797;
- width: 240px;
- height: 1px;
- @include margin(0 0 1.5 0);
-
- }
-
- &:after {
-
- display: block;
- content: "";
- background: black;
- width: 240px;
- height: 6px;
- @include margin(1.5 0 .5 0);
-
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/navs/_nav-footer.scss b/app/themes/base/static/src/sass/modules/navs/_nav-footer.scss
deleted file mode 100644
index dba766c2..00000000
--- a/app/themes/base/static/src/sass/modules/navs/_nav-footer.scss
+++ /dev/null
@@ -1,53 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".nav-footer";
-
-#{$module} {
-
- list-style-type: none;
- margin: 0;
- padding: 0;
-
- &--horizontal {
-
- #{$module}__item {
-
- display: inline-block;
- @include margin-right(2);
-
- }
-
- #{$module}__item-link {
-
- @include font-size(s);
-
- }
-
- }
-
- &__item-link {
- @include font-size(m);
- @include typeface(sans-serif);
- font-weight: weight(regular);
- color: white;
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/navs/_nav-header.scss b/app/themes/base/static/src/sass/modules/navs/_nav-header.scss
deleted file mode 100644
index d5dc6546..00000000
--- a/app/themes/base/static/src/sass/modules/navs/_nav-header.scss
+++ /dev/null
@@ -1,613 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".nav-header";
-
-#{$module} {
-
- list-style-type: none;
- margin: 0;
- padding: 0;
- text-align: left;
-
- @include margin(.5 0 0 0);
-
- @include mq($until: sm) {
- @include margin(0);
- }
-
- .logo-translated {
- margin-left: -75px;
- height: 194px;
-
- @include mq($until: lg) {
- margin-left: -107px;
-
- }
- /*@include mq($until: lg) {
- margin-left : auto;
- margin-right : auto;
- width : 50px;
- height: 5Opx;
- }*/
- }
-
- .translated {
- width: 196px;
- }
-
-
- &__item {
-
- display: inline-block;
- color: black;
- vertical-align: top;
- position: relative;
-
-
- &:before {
- content: "";
- display: block;
- height: $header-height;
- width: 1px;
- background: black;
- position: absolute;
- top: 0;
- left: -1px;
-
- @include margin-right(.5);
-
- @include mq($until: lg) {
- height: $header-height - 10px;
- }
- }
-
- &--no-separator {
- &:before {
- display: none;
- }
- }
-
- &--separator {
- @include padding-left(1.5);
- &:before {
- @include margin(0 1);
- }
-
- @include mq($until: md) {
- @include padding-left(1);
- &:before {
- @include margin(0 .5);
- }
- }
- }
-
- &:first-child {
- display: none;
- z-index: 3;
- &:before {
- display: none;
- }
- }
-
- &:nth-child(2) {
- &:before {
- display: none;
- }
- }
-
- &:last-child {
- &:after {
- display: none;
- }
- }
-
- &--image {
- vertical-align: top;
- @include margin(0 0 0 .50);
- @include padding-right(.50);
-
- @include mq($until: sm) {
- img {
- height: 70px;
- width: auto;
- display: block;
- }
- }
-
- /*@include mq($until: md) {
- @include margin(0 0 0 .25);
- @include padding-right(.25);
- }*/
- }
-
- &--image-big {
- vertical-align: top;
- @include margin(0 1 0 2.5);
- @include padding-right(.50);
-
- @include mq($until: lg) {
- height: $header-height - 10px;
- img {
- width: 200px;
- }
- }
- @include mq($until: md) {
- height: $header-height - 10px;
- img {
- width: 160px;
- }
- }
-
- @include mq($until: sm) {
- position: absolute;
- top: 20px;
- left: 0;
- width: 100%;
- z-index: 2;
- @include padding(0);
- @include margin(0);
- text-align: center;
- img {
- // width: auto;
- height: 70px;
- display: block;
- margin: 0 auto;
- }
- }
-
- @include mq($until: xs) {
-
- img {
- // width: 200px;
- height: auto;
- display: block;
- margin: 0 auto;
- }
-
- }
-
- height: $header-height;
-
- }
-
- &--special {
- z-index: 3;
- vertical-align: top;
- @include margin(0 0 0 .5);
- @include padding-right(.5);
-
- /*@include mq($until: md) {
- @include margin(0 0 0 .25);
- @include padding-right(.25);
- }*/
- }
-
- &--centered {
- z-index: 3;
- line-height: $header-height - 10px;
-
- @include mq($until: lg) {
- line-height: $header-height - 13px;
- }
- @include mq($until: sm) {
- line-height: $header-height-tablet;
- height: $header-height-tablet - 10px;
- }
- @include mq($until: xs) {
- line-height: $header-height-mobile;
- height: $header-height-mobile - 10px;
- }
- }
-
- &--right {
-
- float: right;
-
- }
-
- &.hover {
- &:before {
- content: "";
- display: block;
- position: absolute;
- top: 0;
- left: 1px;
- right: 0;
- bottom: -1px;
- z-index: 3;
-
- background: #F8F8F8;
- border-top: 1px solid #E3E3E3;
- border-left: 1px solid #E3E3E3;
- border-right: 1px solid #E3E3E3;
- border-bottom: 1px solid #F8F8F8;
- }
-
- }
-
- @include mq($until: sm) {
-
- display: none;
- &:first-child,
- &:nth-child(2),
- &:last-child {
- display: inline-block;
- }
-
- &:first-child {
- float: left;
- }
- &:last-child {
- float: right;
- }
-
- &:after {
- display: none;
- }
-
- }
-
- }
-
- &__item-link {
-
- text-transform: uppercase;
- color: $color-background;
- text-decoration: none;
- position: relative;
- z-index: 4;
- vertical-align: top;
-
- @include font-size(l);
- @include line-height($header-pre-height);
- @include typeface(sans-serif);
-
- @include padding-right(1);
-
- @include mq($until: lg) {
- @include font-size(m);
- @include padding-right(.75);
- }
-
- @include mq($until: md) {
- @include font-size(s);
- @include padding-right(.5);
- }
-
-
- &:before {
- display: inline-block;
- content: '.';
- vertical-align: top;
- @include margin-right(.25);
- }
-
- &--no-dot {
-
- @include padding-right(.25);
- font-weight: weight(light);
-
- &:before {
- content: '';
- }
-
- &.active {
- font-weight: weight(regular);
- &:after {
- display: none !important;
- }
- }
-
- }
-
- &.active {
- &:after {
- position: absolute;
- height: 80%;
- display: block;
- top: 10%;
- left: 0px;
- content: "";
- background: $color-main;
- z-index: -1;
- right: 1px;
- }
- }
-
- }
-
- &__submenu {
-
- position: absolute;
- top: $header-pre-height;
- z-index: 2;
- background: white;
- display: none;
- background-color: #F8F8F8;
- border: 1px solid #E3E3E3;
- text-align: left;
-
- @include padding(2);
-
- @include box-shadow(0px 30px 20px 0px rgba(0,0,0,0.12));
-
- p {
-
- @include font-size(s);
- @include typeface(serif);
- font-weight: weight(light);
-
- @include mq($until: lg) {
- @include font-size(xs);
- }
-
- &:after {
- content: "";
- display: block;
- width: 100%;
- height: 1px;
- background: #979797;
-
- @include margin-top(1);
- }
-
- }
-
- }
-
- &__item-sub {
-
- @include font-size(s);
- @include typeface(sans-serif);
- font-weight: weight(regular);
- text-transform: none;
- position: relative;
-
- @include mq($until: lg) {
- @include font-size(xs);
- }
-
- /*&:after {
- position: absolute;
- height: 8px;
- margin-top: -4px;
- width: 100%;
- display: block;
- top: 50%;
- left: 0;
- content: "";
- background: $color-main;
- z-index: -1;
- @include transform(scaleX(0));
- @include transition(all 0.25s ease-in-out);
- transform-origin:left top;
- }*/
-
- &:hover {
-
- >a {
- border-bottom: 1px solid $color-main;
- }
-
- /*>a {
- color: black;
- }
-
- &:after {
- @include transform(scaleX(1));
- position: absolute;
- height: 8px;
- margin-top: -4px;
- width: 100%;
- display: block;
- top: 50%;
- left: 0;
- content: "";
- background: $color-main;
- z-index: -1;
- }*/
- }
-
- &--first {
- /*&:after {
- display: none;
- }*/
-
- &:hover {
- >a {
- border-bottom: 0;
- }
- }
-
- @include font-size(l);
- @include margin-bottom(.5);
-
- @include mq($until: lg) {
- @include font-size(m);
- }
-
- }
-
- }
-
- //
- // Home mobile nav overrides
- //
- .home-mobile-nav & {
-
- &__item {
-
- display: none;
-
- &:nth-child(3),
- &:nth-child(4),
- &:nth-child(5),
- &:nth-child(6) {
- display: inline-block;
- }
-
- }
-
- &__item-link {
-
- padding: 0 5px;
-
- @include mq($until: sm) {
- font-size: 18px;
- }
-
- @include mq($until: xs) {
- font-size: 14px;
- }
-
- }
-
- }
-
- //
- // Home mobile subnav overrides
- //
- .home-mobile-subnav & {
-
- &__item {
-
- display: none;
- margin: 0;
- padding: 0;
-
- &:nth-child(7),
- &:nth-child(8) {
- display: inline-block;
- }
-
- &--image {
- width: 45%;
- img {
- display: inline-block;
- height: auto;
- width: 80%;
- }
- }
-
- }
-
- }
-
- //
- // Sidenav overrides
- //
- .sidebar & {
-
- @include padding(0.5 1 0 1);
- text-align: left;
-
- &__item {
-
- display: block;
- text-align: left;
- @include margin-bottom(.5);
-
- &:first-child,
- &:nth-child(1),
- &:last-child {
- display: none;
- }
-
- &.hover {
- &:before {
- display: none;
- }
- }
-
- &--image-big {
- position: static;
- height: auto;
- margin-top: 10px;
- @include margin-bottom(3);
- }
-
- &--special {
-
- display: inline-block;
- width: 50%;
- padding: 0;
- margin: 0;
-
- a {
- color: black;
- }
-
- }
-
- &--image {
-
- display: inline-block;
- width: 50%;
- padding: 0;
- margin: 0;
-
- img {
- height: 80px;
- width: auto;
- display: block;
- }
- }
-
- &--right {
- float: none;
- }
-
- &--separator {
- @include margin-top(3);
- @include padding(0);
- }
-
- &:before {
- display: none;
- }
-
- }
-
- &__item-link {
-
- color: $color-background;
- @include font-size(l);
-
- &:hover {
- color: $color-background;
- }
-
- &--no-dot {
- display: inline-block;
- width: auto;
- }
-
- }
-
- &__submenu {
-
- display: none !important;
-
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/navs/_nav-tree.scss b/app/themes/base/static/src/sass/modules/navs/_nav-tree.scss
deleted file mode 100644
index 52eed124..00000000
--- a/app/themes/base/static/src/sass/modules/navs/_nav-tree.scss
+++ /dev/null
@@ -1,148 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".nav-tree";
-
-#{$module} {
-
- padding: 0;
- margin: 0;
- list-style-type: none;
- z-index: 2;
-
- position: absolute;
- width: 100%;
-
- @include mq($until: sm) {
-
- position: static;
-
- }
-
- .nav-tree-wrapper & {
- position: static;
- }
-
- .nav-tree & {
- position: relative;
-
- #{$module}__item {
- &:first-child {
- margin-top: 2px;
- }
- }
- }
-
- opacity: 1;
- @include transition(opacity 0.10s ease-in-out, transform 0.10s ease-in-out);
- @include transform(translateX(0));
-
- &.faded {
- opacity: 0;
- @include transition(opacity 0.10s ease-in-out, transform 0.10s ease-in-out);
- @include transform(translateX(-20px));
- }
-
- &.is_stuck {
- background: white;
- }
-
- &--level-0 {
-
- @include margin-bottom(2);
- box-shadow: 0 0 80px rgba(0, 0, 0, 0.15);
- border-left: 2px solid white;
- border-right: 2px solid white;
- border-bottom: 2px solid white;
- border-top: 2px solid white;
-
- @include mq($until: sm) {
- border-top: 1px solid white;
- }
-
- }
-
- &__item {
-
- margin-top: 2px;
-
- &:first-child {
- margin-top: 0;
- }
-
- }
-
- &__separator {
-
- @include margin(2 0);
-
- }
-
- &__link {
-
- display: block;
- color: white;
- background: $color-black-light;
- padding: 4px 20px;
-
- @include font-size(xs);
- @include typeface(sans-serif);
-
- &.active {
- background: $color-main;
- color: $color-black-light;
- padding: 8px 20px;
- @include font-size(s);
- }
-
- &--filter {
-
- background: #efefef;
- color: $color-black;
-
- }
-
- &--sub {
- @include padding-left(2);
- background: lighten($color_main, 20%);
- color: $color-black-light;
-
- @include transition(all 0.25s ease-in-out);
-
- &.active, &:hover {
- background: lighten($color_main, 10%);
- padding: 4px 20px;
- @include padding-left(2);
- color: $color-black-light;
- font-weight: weight(regular);
- @include font-size(xs);
- color: black;
- }
- }
-
- i {
- float: right;
- position: relative;
- top: 5px;
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/sliders/_slider-home.scss b/app/themes/base/static/src/sass/modules/sliders/_slider-home.scss
deleted file mode 100644
index 260630cd..00000000
--- a/app/themes/base/static/src/sass/modules/sliders/_slider-home.scss
+++ /dev/null
@@ -1,181 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".slider-home";
-
-#{$module} {
-
- position: relative;
- @include margin-bottom(4);
-
- @include mq($until: sm) {
- display: none;
- }
-
- ul {
- list-style-type: none;
- margin: 0;
- padding: 0;
- }
-
- &__slide {
-
- width: 100%;
- position: relative;
-
- }
-
- &__wrapper {
-
- position: relative;
-
- @include padding(1);
- border: 1px solid $color-main;
- display: table;
- width: 100%;
- background: $color-background;
- @include transition(background 0.5s ease-in-out);
-
- &:hover {
- background: $color-main;
- #{$module}__image-container {
- background: black;
- }
- #{$module}__image {
- -webkit-filter: grayscale(0);
- filter: grayscale(0);
- }
- .article-box__title {
- color: $color-background;
- }
- .article-box__tags {
- color: $color-background;
- }
- .article-box__subtitle {
- color: $color-background;
- }
- .article-box__desc {
- color: $color-background;
- }
- }
-
- }
-
- &__image-container {
- background: $color-background;
- @include transition(all 0.5s ease-in-out);
- }
-
- &__image {
-
- width: 100%;
- display: block;
- @include transition(all 0.5s ease-in-out);
-
- -webkit-filter: grayscale(1);
- filter: grayscale(1);
- mix-blend-mode: screen;
- transition: all 0.5s ease-in-out;
-
- }
-
- &__content {
-
- display: table-cell;
- vertical-align: middle;
- height: 373px;
-
- @include mq($until: lg) {
- height: 296px;
- }
-
- @include mq($until: md) {
- height: 245px;
- }
-
- @include mq($until: sm) {
- height: auto;
- display: block;
- @include margin-top(1);
- }
-
- }
-
- &__credits {
-
- position: absolute;
- bottom: 0;
- right: 0;
-
- @include font-size(xs);
- @include line-height(1);
- @include typeface(sans-serif);
- @include padding(.25 .5);
- font-weight: weight(light);
-
- background: rgba(0,0,0,0.5);
- color: white;
-
- }
-
- .article-box {
-
- @include padding(0);
- border: 0;
-
- }
-
- //
- // Overrides lightSlider
- //
-
- &__pager {
-
- position: absolute;
- bottom: 33px;
- left: 0;
- right: 0;
-
- ul {
- list-style-type: none;
- margin: 0;
- padding: 0;
- li {
- display: inline-block;
- margin-right: 10px;
- a {
- display: block;
- width: 14px;
- height: 14px;
- background: white;
- border-bottom: 0 !important;
- &:hover {
- background: $color-main;
- }
- }
- &.active a {
- background: $color-main;
- }
- }
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/sliders/_slider-network.scss b/app/themes/base/static/src/sass/modules/sliders/_slider-network.scss
deleted file mode 100644
index cfdbf314..00000000
--- a/app/themes/base/static/src/sass/modules/sliders/_slider-network.scss
+++ /dev/null
@@ -1,123 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".slider-network";
-
-#{$module} {
-
- padding-right: 140px;
- position: relative;
- @include margin-bottom(6);
- display: none;
-
- ul {
-
- position: relative;
- list-style-type: none;
- margin: 0;
- padding: 0;
- margin-top: 10px;
-
- }
-
- &__slide {
-
-
-
- }
-
- &__slide-image {
-
- background-size: contain;
- background-repeat: no-repeat;
- background-color: #FFF;
- background-position: center center;
- width: 60%;
- height: 140px;
- display: block;
- margin: 0 auto;
-
- @include margin-bottom(.5);
-
- }
-
- &__slide-title {
-
- @include font-size(m);
- @include line-height(1);
- @include typeface(sans-serif);
- font-weight: weight(bold);
-
- }
-
- &__slide-subtitle {
-
- @include font-size(xs);
- @include line-height(.5);
- @include typeface(serif);
- font-weight: weight(bold);
-
- height: 3rem;
-
- }
-
- //
- // Overrides lightSlider
- //
-
- .lSAction {
-
- position: absolute;
- top: 10px;
- right: 0px;
-
- > a:hover {
- width: 65px;
-
- background: $color-main;
- &:before {
- color: #363636;
- }
- }
-
- > a:before {
- color: white;
- line-height: 65px;
- }
-
- .lSPrev, .lSNext {
-
- margin-right: 2px;
- width: 65px;
- height: 65px;
- position: static;
- display: inline-block;
-
- @include transform(none);
- margin: 0;
-
- background: #363636;
- color: white;
-
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/sliders/_slider-page.scss b/app/themes/base/static/src/sass/modules/sliders/_slider-page.scss
deleted file mode 100644
index 18f2c0e2..00000000
--- a/app/themes/base/static/src/sass/modules/sliders/_slider-page.scss
+++ /dev/null
@@ -1,130 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".slider-page";
-
-#{$module} {
-
- list-style-type: none;
- margin: 0;
- padding: 0;
-
-
- //
- // Not lightslider, lets go with Flexbox W00t W00t
- //
- &.flexbox {
- @include mq($from: sm) {
- display: -ms-flexbox;
- display: -webkit-flex;
- display: flex;
- -webkit-flex-direction: row;
- -ms-flex-direction: row;
- flex-direction: row;
- -webkit-flex-wrap: nowrap;
- -ms-flex-wrap: nowrap;
- flex-wrap: nowrap;
- -webkit-justify-content: center;
- -ms-flex-pack: center;
- justify-content: center;
- -webkit-align-content: stretch;
- -ms-flex-line-pack: stretch;
- align-content: stretch;
- -webkit-align-items: flex-start;
- -ms-flex-align: start;
- align-items: flex-start;
- }
- }
-
- //
- // Slides
- //
-
- &__slide {
- text-align: center;
- visibility: hidden;
- .lightSlider & {
- visibility: visible;
- }
- .flexbox & {
- visibility: visible;
- padding: 0 5px;
- @include mq($from: sm) {
- -webkit-order: 0;
- -ms-flex-order: 0;
- order: 0;
- -webkit-flex: 0 1 auto;
- -ms-flex: 0 1 auto;
- flex: 0 1 auto;
- -webkit-align-self: auto;
- -ms-flex-item-align: auto;
- align-self: auto;
- }
- }
-
- }
-
- &__wrapper {
-
- // Nothing ?
- position: relative;
-
- }
-
- //
- // Images
- //
-
- &__img {
-
- @include mq($until: sm) {
- width: 100%;
- }
-
- }
-
- &__caption {
-
- font-weight: weight(light);
- @include font-size(xs);
- @include line-height(0.75);
-
- text-align: center;
-
- max-width: 250px;
- margin: 0 auto;
-
- }
-
- &__video {
-
- margin-bottom: 5px;
- @include fluid-aspect(905 520);
- width: 905px;
-
- @include mq($until: xs) {
-
- width: 100%;
-
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/modules/sliders/_slider-persons.scss b/app/themes/base/static/src/sass/modules/sliders/_slider-persons.scss
deleted file mode 100644
index 397eb30d..00000000
--- a/app/themes/base/static/src/sass/modules/sliders/_slider-persons.scss
+++ /dev/null
@@ -1,29 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".slider-persons";
-
-#{$module} {
-
- //
- // Overrides lightSlider
- //
-
-}
diff --git a/app/themes/base/static/src/sass/pages/_all.scss b/app/themes/base/static/src/sass/pages/_all.scss
deleted file mode 100755
index f9401ac0..00000000
--- a/app/themes/base/static/src/sass/pages/_all.scss
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-@import "home";
diff --git a/app/themes/base/static/src/sass/pages/_home.scss b/app/themes/base/static/src/sass/pages/_home.scss
deleted file mode 100644
index a969cf06..00000000
--- a/app/themes/base/static/src/sass/pages/_home.scss
+++ /dev/null
@@ -1,311 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-$module: ".home";
-
-#{$module} {
-
- // Overrides .main style
- .main {
-
- margin-top: 0;
- padding-top: 0;
-
- @include mq($until: sm) {
- margin-top: 0;
- }
-
- }
-
- &__menu {
-
- list-style-type: none;
- padding: 0;
- margin: 0;
- text-align: center;
- position: relative;
- background: white;
-
- width: 100%;
-
- @include padding-left(3);
- @include padding-right(3);
- @include padding-top(2);
- @include padding-bottom(2);
- @include transition(width 0.5s ease-in-out);
-
- @include mq($until: sm) {
- display: none;
- }
-
- &--with-shutter {
- width: 100%;
- }
-
- }
-
- &__shutter {
-
- position: absolute;
- bottom: 150px;
- left: 0;
- right: 0;
- background: white;
- z-index: 100;
-
- @include padding(2 0 0 0);
- @include transform(scaleY(0));
- @include transition(transform 0.35s ease-in-out);
- transition-delay: 0.15s;
-
- transform-origin: 0 100%;
- -webkit-transform-origin: 0 100%;
-
- &.active {
- @include transform(scaleY(1));
- transition-delay: 0s;
-
- #{$module}__shutter-content {
-
- opacity: 1;
- transition-delay: 0.35s;
-
- }
-
- }
-
- }
-
- &__shutter-content {
-
- @include padding(0 7);
- @include transition(opacity 0.15s ease-in-out);
- opacity: 0;
- transition-delay: 0s;
-
- @include mq($until: lg) {
- @include padding(0 3);
- }
-
- @include mq($until: md) {
- @include padding(0 1);
- }
-
- .col-xs-3:nth-child(n+5) {
-
- &:before {
-
- content: "";
- display: block;
- background: #979797;
- height: 1px;
- width: 100%;
- @include margin-bottom(1);
- @include margin-top(3);
-
- }
-
- }
-
- }
-
- &__shutter-item {
-
- text-decoration: none;
- display: block;
- position: relative;
- z-index: 2;
-
- >h2 {
- @include font-size(l);
- @include line-height(1);
- @include typeface(sans-serif);
- font-weight: weight(regular);
-
- @include margin(0 0 1 0);
-
- position: relative;
- z-index: 3;
- }
- >p {
- @include font-size(s);
- @include line-height(1);
- @include typeface(serif);
- font-weight: weight(light);
-
- @include margin(0);
- }
- >a {
- @include font-size(s);
- @include line-height(0.5);
- @include typeface(serif);
- font-weight: weight(bold);
-
- @include margin(0);
- text-decoration: underline;
- position: relative;
- z-index: 3;
- }
-
- &:before {
- content: "";
- display: block;
- position: absolute;
- background: transparent;
- top: -10%;
- left: -5%;
- width: 110%;
- height: 120%;
- z-index: 1;
- @include transition(all 0.25s ease-in-out);
- }
-
- &:hover {
-
- &:before {
- box-shadow: 0px 0px 14px 0px rgba(0,0,0,0.17);
- }
-
- }
-
- .sidebar & {
-
- >h2 {
- @include font-size(m);
- @include line-height(1);
- @include margin(0 0 0 0);
- }
- >p {
- display: none;
- }
-
- }
-
- &--button {
-
- border: 2px solid black;
- text-align: center;
- @include padding(2);
-
- &:before {
- display: none;
- }
-
- >h2 {
- margin: 0;
- @include font-size(xl);
- @include line-height(1.2);
- font-weight: weight(bold);
- text-transform: uppercase;
- }
-
- }
-
- }
-
- &__menu-item {
-
- display: inline-block;
- border-top: 1px solid #DCDCDC;
-
- @include font-size(xl);
- @include line-height(1);
- @include typeface(sans-serif);
- font-weight: weight(regular);
-
- >a {
-
- @include padding-left(1);
- @include padding-right(1);
- @include padding-top(1);
-
- display: block;
- position: relative;
-
- &:after {
- content: '';
- display: block;
- position: absolute;
- top: -10px;
- left: 50%;
- margin-left: -9px;
- width: 18px;
- height: 18px;
- background: #FFFFFF;
- border-left:1px solid #DCDCDC;
- border-top:1px solid #DCDCDC;
-
- @include transform(scaleY(0) rotate(45deg));
- @include transition(all 0.25s ease-in-out);
- }
-
- &.active {
- &:after {
-
- @include transform(scaleY(1) rotate(45deg));
-
- }
- }
-
- }
-
- }
-
- .lSAction {
- > a {
- background: transparent;
- &:before {
- color: #F2EDDC;
- font-size: 40px;
- }
- }
- > a.lSPrev {
-
- }
- > a.lSNext {
-
- }
- }
-
-}
-
-.home-mobile-nav {
- display: none;
-
- background: $color-main;
- border-top: 1px solid $color-black;
-
- @include mq($until: sm) {
- display: block;
- }
-
- @include mq($until: xs) {
- @include margin-bottom(1);
- }
-}
-
-.home-mobile-subnav {
- display: none;
-
- @include mq($until: xs) {
- display: block;
- @include margin(0 0 1 0);
- }
-}
diff --git a/app/themes/base/static/src/sass/utils/_functions.scss b/app/themes/base/static/src/sass/utils/_functions.scss
deleted file mode 100755
index 1c5010d2..00000000
--- a/app/themes/base/static/src/sass/utils/_functions.scss
+++ /dev/null
@@ -1,20 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
diff --git a/app/themes/base/static/src/sass/utils/_mixins.scss b/app/themes/base/static/src/sass/utils/_mixins.scss
deleted file mode 100755
index be39f0d1..00000000
--- a/app/themes/base/static/src/sass/utils/_mixins.scss
+++ /dev/null
@@ -1,34 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-@mixin fluid-aspect($ratio: 1 1, $selector: "> :first-child") {
- $selector: unquote($selector);
-
- padding-bottom: percentage(nth($ratio, 2) / nth($ratio, 1));
- position: relative;
-
- #{$selector} {
- left: 0;
- height: 100%;
- position: absolute;
- top: 0;
- width: 100%;
- }
-}
diff --git a/app/themes/base/static/src/sass/vendors/_all.scss b/app/themes/base/static/src/sass/vendors/_all.scss
deleted file mode 100755
index b3bc8c7b..00000000
--- a/app/themes/base/static/src/sass/vendors/_all.scss
+++ /dev/null
@@ -1,25 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-@import "slick";
-@import "lightslider";
-@import "pushy";
-@import "audiojs";
-@import "videojs";
diff --git a/app/themes/base/static/src/sass/vendors/_audiojs.scss b/app/themes/base/static/src/sass/vendors/_audiojs.scss
deleted file mode 100644
index d393836e..00000000
--- a/app/themes/base/static/src/sass/vendors/_audiojs.scss
+++ /dev/null
@@ -1,183 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-.audiojs {
- background: white;
- position: relative;
- box-shadow: none;
- width: 100%;
- height: 123px;
- border: 1px solid #E6E6E6;
-
- .play-pause {
- position: absolute;
- width: 56px;
- height: 56px;
- border-right: 0;
- top: 30px;
- left: 30px;
- border-radius: 56px;
- background: $color-black;
- padding: 0;
- }
-
- .scrubber {
- width: 100%;
- height: 7px;
- margin: 0;
- position: absolute;
- bottom: 0;
- left: 0;
- background: #EBEBEB;
- border: 0;
- }
-
- .title {
-
- position: absolute;
- height: 56px;
- left: 116px;
- top: 30px;
-
- /*@include font-size(m);
- @include typeface(serif);
- font-weight: weight(bold);*/
-
- @include font-size(m);
- @include typeface(serif);
- font-weight: weight(bold);
- font-style: italic;
- color: $color-background;
-
- span {
- /*@include font-size(m);
- @include typeface(serif);
- font-weight: weight(regular);
- font-style: italic;*/
-
- @include font-size(s);
- @include typeface(serif);
- font-weight: weight(light);
- font-style: normal;
- }
-
- }
-
- .time {
- position: absolute;
- bottom: 10px;
- right: 10px;
-
- @include font-size(xs);
- @include typeface(serif);
- font-weight: weight(light);
-
- text-shadow: none;
- color: $color-black;
-
- border: 0;
-
- .played {
- color: $color-black;
- }
- }
-
- .progress {
- background: $color-black;
- }
-
- .loaded {
- background: #EBEBEB;
- }
-
-
- .play {
-
- width: 56px;
- height: 56px;
- position: relative;
- background: 0;
-
- &:after {
- position: absolute;
- top: 0;
- left: 3px;
- width: 100%;
- height: 100%;
- content: "\f04b";
- font-family: FontAwesome;
- color: white;
- font-size: 30px;
- display: block;
- text-align: center;
- line-height: 56px;
- }
-
- }
-
- .pause {
-
- width: 56px;
- height: 56px;
- position: relative;
- background: 0;
-
- &:after {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- content: "\f04c";
- font-family: FontAwesome;
- color: white;
- font-size: 30px;
- display: block;
- text-align: center;
- line-height: 56px;
- }
-
- }
-
- .loading {
-
- width: 56px;
- height: 56px;
- position: relative;
- background: 0;
-
- &:after {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- content: "\f110";
- font-family: FontAwesome;
- color: white;
- font-size: 30px;
- display: block;
- text-align: center;
- line-height: 56px;
- }
-
- }
-
-}
diff --git a/app/themes/base/static/src/sass/vendors/_lightslider.scss b/app/themes/base/static/src/sass/vendors/_lightslider.scss
deleted file mode 100644
index 05165293..00000000
--- a/app/themes/base/static/src/sass/vendors/_lightslider.scss
+++ /dev/null
@@ -1,47 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-.lSAction {
-
- > a {
- opacity: 1;
- @include transition(all 0.15s ease-in-out);
- &:hover {
- width: 60px;
- }
- }
-
-}
-
-.lSAction {
- > a {
- background: transparent;
- &:before {
- color: #F2EDDC;
- font-size: 40px;
- }
- }
- > a.lSPrev {
-
- }
- > a.lSNext {
-
- }
-}
diff --git a/app/themes/base/static/src/sass/vendors/_pushy.scss b/app/themes/base/static/src/sass/vendors/_pushy.scss
deleted file mode 100644
index b81b1d6a..00000000
--- a/app/themes/base/static/src/sass/vendors/_pushy.scss
+++ /dev/null
@@ -1,140 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-.pushy {
-
- width: $sidenav-width-tablet;
-
- @include mq($until: xs) {
- width: $sidenav-width-mobile;
- }
-
- background: #FFFFFF;
- border-right: 1px solid #979797;
-
- a {
- padding: 0;
- }
-
- ul:first-child {
- margin-top: 0;
- }
-
-}
-
-.pushy-left {
-
- @include transform(translate3d(-$sidenav-width-tablet, 0, 0));
-
- @include mq($until: xs) {
- @include transform(translate3d(-$sidenav-width-mobile, 0, 0));
- }
-
-}
-
-.pushy-open-left #container,
-.pushy-open-left .push {
-
- box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.50);
- @include transform(translate3d($sidenav-width-tablet, 0, 0));
-
- @include mq($until: xs) {
- @include transform(translate3d($sidenav-width-mobile, 0, 0));
- }
-
-}
-
-.menu-btn {
- position: relative;
- width: 40px;
- cursor: pointer;
-
- @include mq($until: sm) {
- height: $header-height-tablet;
- }
- @include mq($until: xs) {
- height: $header-height-mobile;
- }
-
- .pushy-open-left & {
-
- span {
-
- &:before,
- &:after {
- opacity: 0;
- }
-
- &.first {
- @include transform(rotate(45deg));
- top: 33px;
- }
- &.second {
- @include transform(rotate(-45deg));
- top: 33px;
- }
-
- }
-
- }
-
- span {
- display: block;
- width: 40px;
- height: 2px;
- background: black;
- position: relative;
- position: absolute;
- left: 0;
- @include transition(all 0.2s ease-in-out);
- &:before {
- content: "";
- display: block;
- width: 40px;
- height: 2px;
- background: black;
- position: absolute;
- left: 0;
- top: -4px;
- opacity: 1;
- @include transition(all 0.2s ease-in-out);
- }
- &:after {
- content: "";
- display: block;
- width: 40px;
- height: 2px;
- background: black;
- position: absolute;
- left: 0;
- bottom: -4px;
- opacity: 1;
- @include transition(all 0.2s ease-in-out);
- }
- }
-
- span.first {
- top: 27px;
- }
- span.second {
- top: 39px;
- }
-
-}
diff --git a/app/themes/base/static/src/sass/vendors/_slick.scss b/app/themes/base/static/src/sass/vendors/_slick.scss
deleted file mode 100644
index 213224c1..00000000
--- a/app/themes/base/static/src/sass/vendors/_slick.scss
+++ /dev/null
@@ -1,293 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-.lSAction>a {
-
- background: white;
- width: 45px;
- height: 53px;
- padding: 0;
- text-align: center;
- display: block;
- -webkit-transform: translate(0, -50%);
- -ms-transform: translate(0, -50%);
- transform: translate(0, -50%);
-
- &:before {
- display: inline-block;
-
- font-family: 'fontawesome';
- font-size: 20px;
- line-height: 53px;
-
- opacity: .75;
- color: black;
-
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- }
-
- &.lSNext {
- right: 0;
- &:before {
- content: '\f105';
- }
- }
-
- &.lSPrev {
- left: 0;
- &:before {
- content: '\f104';
- }
- }
-
-}
-
-.slick-prev:before
-{
- content: '\f104';
-}
-[dir='rtl'] .slick-prev:before
-{
- content: '\f105';
-}
-
-.slick-slide img {
- margin: 0 auto;
-}
-
-.slick-slide figure {
- margin: 0 auto;
-}
-
-@charset 'UTF-8';
-/* Slider */
-.slick-loading .slick-list
-{
- background: #fff url('./ajax-loader.gif') center center no-repeat;
-}
-
-/* Icons */
-@font-face
-{
- font-family: 'slick';
- font-weight: normal;
- font-style: normal;
-
- src: url('./fonts/slick.eot');
- src: url('./fonts/slick.eot?#iefix') format('embedded-opentype'), url('./fonts/slick.woff') format('woff'), url('./fonts/slick.ttf') format('truetype'), url('./fonts/slick.svg#slick') format('svg');
-}
-/* Arrows */
-.slick-prev,
-.slick-next
-{
- font-size: 0;
- line-height: 0;
-
- position: absolute;
- top: 50%;
-
- display: block;
- z-index: 2;
-
- width: 45px;
- height: 53px;
- padding: 0;
- -webkit-transform: translate(0, -50%);
- -ms-transform: translate(0, -50%);
- transform: translate(0, -50%);
-
- cursor: pointer;
-
- color: transparent;
- border: none;
- outline: none;
- background: rgba(255,255,255,0.5);
-
- @include transition(all 0.2s ease);
-}
-.slick-prev:hover,
-.slick-next:hover
-{
- color: transparent;
- outline: none;
- background: white;
-
- width: 50px;
-}
-.slick-prev:hover:before,
-.slick-next:hover:before,
-{
- opacity: 1;
-}
-.slick-prev:hover:before {
- @include transform(translateX(5px));
-}
-.slick-next:hover:before {
- @include transform(translateX(-5px));
-}
-.slick-prev.slick-disabled:before,
-.slick-next.slick-disabled:before
-{
- opacity: .25;
-}
-
-.slick-prev:before,
-.slick-next:before
-{
- @include transition(all 0.2s ease);
- display: inline-block;
-
- font-family: 'fontawesome';
- font-size: 20px;
- line-height: 1;
-
- opacity: .75;
- color: black;
-
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-}
-
-.slick-prev
-{
- left: 0px;
-}
-[dir='rtl'] .slick-prev
-{
- right: 0px;
- left: auto;
-}
-.slick-prev:before
-{
- content: '\f104';
-}
-[dir='rtl'] .slick-prev:before
-{
- content: '\f105';
-}
-
-.slick-next
-{
- right: 0px;
-}
-[dir='rtl'] .slick-next
-{
- right: auto;
- left: 0px;
-}
-.slick-next:before
-{
- content: '\f105';
-}
-[dir='rtl'] .slick-next:before
-{
- content: '\f104'
-}
-
-/* Dots */
-.slick-dotted.slick-slider
-{
- margin-bottom: 30px;
-}
-
-.slick-dots
-{
- position: absolute;
- bottom: -25px;
-
- display: block;
-
- width: 100%;
- padding: 0;
- margin: 0;
-
- list-style: none;
-
- text-align: center;
-}
-.slick-dots li
-{
- position: relative;
-
- display: inline-block;
-
- width: 20px;
- height: 20px;
- margin: 0 5px;
- padding: 0;
-
- cursor: pointer;
-}
-.slick-dots li button
-{
- font-size: 0;
- line-height: 0;
-
- display: block;
-
- width: 20px;
- height: 20px;
- padding: 5px;
-
- cursor: pointer;
-
- color: transparent;
- border: 0;
- outline: none;
- background: transparent;
-}
-.slick-dots li button:hover,
-.slick-dots li button:focus
-{
- outline: none;
-}
-.slick-dots li button:hover:before,
-.slick-dots li button:focus:before
-{
- opacity: 1;
-}
-.slick-dots li button:before
-{
- font-family: 'slick';
- font-size: 6px;
- line-height: 20px;
-
- position: absolute;
- top: 0;
- left: 0;
-
- width: 20px;
- height: 20px;
-
- content: 'â¢';
- text-align: center;
-
- opacity: .25;
- color: black;
-
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-}
-.slick-dots li.slick-active button:before
-{
- opacity: .75;
- color: black;
-}
diff --git a/app/themes/base/static/src/sass/vendors/_videojs.scss b/app/themes/base/static/src/sass/vendors/_videojs.scss
deleted file mode 100644
index 3b73cfea..00000000
--- a/app/themes/base/static/src/sass/vendors/_videojs.scss
+++ /dev/null
@@ -1,232 +0,0 @@
-// -*- coding: utf-8 -*-
-
-// Copyright (c) 2016-2017 Ircam
-// Copyright (c) 2016-2017 Jérémy Fabre
-
-// This file is part of mezzanine-organization.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
-// Video JS Sublime Skin
-// The following are SCSS variables to automate some of the values.
-// But don't feel limited by them. Change/replace whatever you want.
-
-// The color of icons, text, and the big play button border.
-// Try changing to #0f0
-$primary-foreground-color: $color-main; // #fff default
-
-// The default color of control backgrounds is mostly black but with a little
-// bit of blue so it can still be seen on all-black video frames, which are common.
-// Try changing to #900
-$primary-background-color: #2B333F; // #2B333F default
-
-// Try changing to true
-$center-big-play-button: true; // true default
-
-.video-js {
- /* The base font size controls the size of everything, not just text.
- All dimensions use em-based sizes so that the scale along with the font size.
- Try increasing it to 15px and see what happens. */
- font-size: 10px;
-
- /* The main font color changes the ICON COLORS as well as the text */
- color: $primary-foreground-color;
-}
-
-/* The "Big Play Button" is the play button that shows before the video plays.
- To center it set the align values to center and middle. The typical location
- of the button is the center, but there is trend towards moving it to a corner
- where it gets out of the way of valuable content in the poster image.*/
-.vjs-ircam-skin .vjs-big-play-button {
- /* The font size is what makes the big play button...big.
- All width/height values use ems, which are a multiple of the font size.
- If the .video-js font-size is 10px, then 3em equals 30px.*/
- font-size: 8em;
-
- /* We're using SCSS vars here because the values are used in multiple places.
- Now that font size is set, the following em values will be a multiple of the
- new font size. If the font-size is 3em (30px), then setting any of
- the following values to 3em would equal 30px. 3 * font-size. */
- $big-play-width: 3em;
- /* 1.5em = 45px default */
- $big-play-height: 1.5em;
-
- line-height: $big-play-height;
- height: $big-play-height;
- width: $big-play-width;
-
- /* 0.06666em = 2px default */
- border: 0;
- /* 0.3em = 9px default */
- border-radius: 0.3em;
-
- @if $center-big-play-button {
- /* Align center */
- left: 50%;
- top: 50%;
- margin-left: -($big-play-width / 2);
- margin-top: -($big-play-height / 2);
- } @else {
- /* Align top left. 0.5em = 15px default */
- left: 0.5em;
- top: 0.5em;
- }
-}
-
-/* The default color of control backgrounds is mostly black but with a little
- bit of blue so it can still be seen on all-black video frames, which are common. */
-.video-js .vjs-control-bar,
-.video-js .vjs-big-play-button,
-.video-js .vjs-menu-button .vjs-menu-content {
- /* IE8 - has no alpha support */
- background-color: $primary-background-color;
- /* Opacity: 1.0 = 100%, 0.0 = 0% */
- background-color: rgba($primary-background-color, 0.7);
- background-color: transparent;
-}
-
-// Make a slightly lighter version of the main background
-// for the slider background.
-$slider-bg-color: lighten($primary-background-color, 33%);
-
-/* Slider - used for Volume bar and Progress bar */
-.video-js .vjs-slider {
- background-color: $slider-bg-color;
- background-color: rgba($slider-bg-color, 0.5);
- background-color: rgba(255,255,255,.3);
- border-radius: 2px;
- height: 4px;
-}
-
-/* The slider bar color is used for the progress bar and the volume bar
- (the first two can be removed after a fix that's coming) */
-.video-js .vjs-volume-level,
-.video-js .vjs-play-progress,
-.video-js .vjs-slider-bar {
- background: $primary-foreground-color;
-}
-
-/* The main progress bar also has a bar that shows how much has been loaded. */
-.video-js .vjs-load-progress {
- /* For IE8 we'll lighten the color */
- background: ligthen($slider-bg-color, 25%);
- /* Otherwise we'll rely on stacked opacities */
- background: rgba($slider-bg-color, 0.5);
-}
-
-/* The load progress bar also has internal divs that represent
- smaller disconnected loaded time ranges */
-.video-js .vjs-load-progress div {
- /* For IE8 we'll lighten the color */
- background: ligthen($slider-bg-color, 50%);
- /* Otherwise we'll rely on stacked opacities */
- background: rgba($slider-bg-color, 0.75);
-}
-
-//Skin Style Starts
-.vjs-ircam-skin .vjs-poster {
- outline: none; //Remove Blue Outline on Click
- outline: 0;
-}
-.vjs-ircam-skin:hover .vjs-big-play-button {
- background-color: transparent;
-}
-.vjs-ircam-skin .vjs-fullscreen-control:before, .vjs-ircam-skin.vjs-fullscreen .vjs-fullscreen-control:before {
- content: ''; //Remove Fullscreen Exit Icon
-}
-.vjs-ircam-skin.vjs-fullscreen .vjs-fullscreen-control {
- background: #fff;
-}
-.vjs-ircam-skin .vjs-fullscreen-control {
- border: 3px solid $color-main;
- box-sizing: border-box;
- cursor: pointer;
- margin-top: -7px;
- top: 50%;
- height: 14px;
- width: 22px;
- margin-right: 10px;
-}
-.vjs-ircam-skin.vjs-fullscreen .vjs-fullscreen-control:after {
- background: #000;
- content: "";
- display: block;
- position: absolute;
- bottom: 0;
- left: 0;
- height: 5px;
- width: 5px;
-}
-.vjs-ircam-skin .vjs-progress-holder {
- margin: 0;
-}
-.vjs-ircam-skin .vjs-progress-control .vjs-progress-holder:after {
- border-radius: 2px;
- display: block;
- height: 4px;
-}
-.vjs-ircam-skin .vjs-progress-control .vjs-load-progres, .vjs-ircam-skin .vjs-progress-control .vjs-play-progress {
- border-radius: 2px;
- height: 4px;
-}
-.vjs-ircam-skin .vjs-playback-rate {
- display: none; //Remove Playback Rate
-}
-.vjs-ircam-skin .vjs-progress-control {
- margin-right: 40px;
-}
-.vjs-ircam-skin .vjs-time-control {
- right: 40px;
-}
-.vjs-ircam-skin .vjs-mute-control:before, .vjs-ircam-skin .vjs-volume-menu-button:before, .vjs-ircam-skin .vjs-mute-control.vjs-vol-0:before, .vjs-ircam-skin .vjs-volume-menu-button.vjs-vol-0:before, .vjs-ircam-skin .vjs-mute-control.vjs-vol-1:before, .vjs-ircam-skin .vjs-volume-menu-button.vjs-vol-1:before, .vjs-ircam-skin .vjs-mute-control.vjs-vol-2:before, .vjs-ircam-skin .vjs-volume-menu-button.vjs-vol-2:before {
- content: ''; //Remove Volume Icons
-}
-.vjs-ircam-skin .vjs-menu-button-inline .vjs-menu, .vjs-ircam-skin .vjs-menu-button-inline:focus .vjs-menu, .vjs-ircam-skin .vjs-menu-button-inline.vjs-slider-active .vjs-menu {
- display: block;
- opacity: 1;
-}
-.vjs-ircam-skin .vjs-volume-menu-button {
- width: 3em;
- position: absolute;
- right: 0;
- margin-right: 40px;
-}
-.vjs-ircam-skin .vjs-menu-button .vjs-menu-content, .vjs-ircam-skin .vjs-menu-button-inline:hover, .vjs-ircam-skin .vjs-menu-button-inline:focus, .vjs-ircam-skin .vjs-menu-button-inline.vjs-slider-active {
- width: 3em;
-}
-.vjs-ircam-skin .vjs-menu-button-inline .vjs-menu {
- left: 0; //Override to Align Volume To the Right Side
-}
-.vjs-ircam-skin .vjs-mouse-display:before, .vjs-ircam-skin .vjs-play-progress:before, .vjs-ircam-skin .vjs-volume-level:before {
- content: ''; //Remove Circle from Progress Bar
-}
-.vjs-ircam-skin .vjs-volume-bar {
- background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAcCAYAAAAa/l2sAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyppVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTMyIDc5LjE1OTI4NCwgMjAxNi8wNC8xOS0xMzoxMzo0MCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUuNSAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMzU4NkFCRTZFMDExMUU2ODQyMjg1MjAwM0FFNjlBMyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMzU4NkFCRjZFMDExMUU2ODQyMjg1MjAwM0FFNjlBMyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjAwNDYyQUZGNkUwMTExRTY4NDIyODUyMDAzQUU2OUEzIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjAwNDYyQjAwNkUwMTExRTY4NDIyODUyMDAzQUU2OUEzIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+/U1vZAAAAFxJREFUeNpi/PWCYUABq/h/FP7vl4y++NQzMQwxMOrgUQcPdQez0MEOXwLym0eTxKiDRx08zEoJqub60SQx6uBRBw+BUmJAc/1okhh18KiDRx086uBRB9MUAAQYAFK9CG1Nh9VWAAAAAElFTkSuQmCC');
- background-size: 22px 14px;
- background-repeat: no-repeat;
- height: 100%;
- width: 100%;
- max-width: 22px;
- max-height: 14px;
- margin: 7px 4px;
- border-radius: 0;
-}
-.vjs-ircam-skin .vjs-volume-level {
- background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAcCAYAAAAa/l2sAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyppVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTMyIDc5LjE1OTI4NCwgMjAxNi8wNC8xOS0xMzoxMzo0MCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUuNSAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowMDQ2MkFGOTZFMDExMUU2ODQyMjg1MjAwM0FFNjlBMyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowMDQ2MkFGQTZFMDExMUU2ODQyMjg1MjAwM0FFNjlBMyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjAwNDYyQUY3NkUwMTExRTY4NDIyODUyMDAzQUU2OUEzIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjAwNDYyQUY4NkUwMTExRTY4NDIyODUyMDAzQUU2OUEzIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+L58+xQAAAFtJREFUeNrs1DsOABAQRVEjrMH+d8cWKEatofHJyH2dkDjFm5Ga3dPEpMO5FdHZe++MBTBg6+Bw4Q9d3AuVAAz4sy2xdeqpBGDABrbE06mnEoABAwYM+Gi6AAMApVAJH04fDl8AAAAASUVORK5CYII=');
- background-size: 22px 14px;
- background-repeat: no-repeat;
- max-width: 22px;
- max-height: 14px;
- height: 100%;
-}
diff --git a/app/themes/base/static/video/blank_480.webm b/app/themes/base/static/video/blank_480.webm
deleted file mode 100644
index 2e097653..00000000
Binary files a/app/themes/base/static/video/blank_480.webm and /dev/null differ
diff --git a/app/themes/base/templates/accounts/account_form.html b/app/themes/base/templates/accounts/account_form.html
deleted file mode 100644
index 88cd5475..00000000
--- a/app/themes/base/templates/accounts/account_form.html
+++ /dev/null
@@ -1,25 +0,0 @@
-{% extends "pages/page.html" %}
-{% load i18n mezzanine_tags %}
-
-{% block meta_title %}
- {% trans "Login" %}
-{% endblock %}
-
-{% block page_title %}
- {% trans "Login" %}
-{% endblock %}
-
-{% block page_content %}
-{% errors_for form %}
-
-{% endblock %}
diff --git a/app/themes/base/templates/accounts/account_login.html b/app/themes/base/templates/accounts/account_login.html
deleted file mode 100644
index 70a79c0b..00000000
--- a/app/themes/base/templates/accounts/account_login.html
+++ /dev/null
@@ -1,28 +0,0 @@
-{% extends "accounts/account_form.html" %}
-{% load i18n mezzanine_tags %}
-
-{% block meta_title %}
- {% trans "Page not found" %}
-{% endblock %}
-
-{% block page_class %}
- custompage
-{% endblock %}
-
-{% block page_title %}
- {% trans "Login" %}
-{% endblock %}
-
-{% block page_content %}
-{% if request.user.is_authenticated %}
- {% trans "You're already logged in. If you'd like to log in as a different user, you'll need to log out first." %}
-{% else %}
- {{ block.super }}
- {% url "signup" as signup_url %}
- {% url "mezzanine_password_reset" as password_reset_url %}
- {% url "profile_update" as profile_update_url %}
- {% block message %}
- {% blocktrans %}You can also reset your password if you've forgotten it.
{% endblocktrans %}
- {% endblock %}
-{% endif %}
-{% endblock %}
diff --git a/app/themes/base/templates/accounts/account_password_reset.html b/app/themes/base/templates/accounts/account_password_reset.html
deleted file mode 100644
index d9c35a63..00000000
--- a/app/themes/base/templates/accounts/account_password_reset.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{% extends "accounts/account_login.html" %}
-{% load i18n %}
-
-{% block page_content %}
-{{ block.super }}
-{% endblock %}
-
-{% block message %}
-{% trans "Enter your username or email address and you'll receive an email with a link you need to click, in order to log in and change your password." %}
-{% endblock %}
diff --git a/app/themes/base/templates/accounts/account_profile.html b/app/themes/base/templates/accounts/account_profile.html
deleted file mode 100644
index d03c90ab..00000000
--- a/app/themes/base/templates/accounts/account_profile.html
+++ /dev/null
@@ -1,29 +0,0 @@
-{% extends "pages/page.html" %}
-{% load i18n mezzanine_tags accounts_tags %}
-
-{% block meta_title %}{{ profile_user|username_or:"get_full_name" }}{% endblock %}
-{% block title %}{{ profile_user|username_or:"get_full_name" }}{% endblock %}
-{% block body_id %}account{% endblock %}
-
-{% block breadcrumb_menu %}
-{{ block.super }}
-{{ profile_user|username_or:"get_full_name" }}
-{% endblock %}
-
-{% block main %}
-
-
-
-
{{ profile_user.get_full_name }}
- {% for field, value in profile_user|profile_fields %}
-
{{ field }}
-
{{ value|linebreaksbr }}
- {% endfor %}
-
-
-{% endblock %}
diff --git a/app/themes/base/templates/accounts/account_profile_update.html b/app/themes/base/templates/accounts/account_profile_update.html
deleted file mode 100644
index 8a7dcbe4..00000000
--- a/app/themes/base/templates/accounts/account_profile_update.html
+++ /dev/null
@@ -1 +0,0 @@
-{% extends "accounts/account_form.html" %}
diff --git a/app/themes/base/templates/accounts/account_signup.html b/app/themes/base/templates/accounts/account_signup.html
deleted file mode 100644
index d135deb9..00000000
--- a/app/themes/base/templates/accounts/account_signup.html
+++ /dev/null
@@ -1,17 +0,0 @@
-{% extends "accounts/account_form.html" %}
-{% load i18n %}
-
-{% block main %}
-
-{% if request.user.is_authenticated %}
- {% trans "You're already logged in. If you'd like to create a new account, you'll need to log out first." %}
-{% else %}
- {{ block.super }}
- {% if settings.ACCOUNTS_APPROVAL_REQUIRED %}
- {% trans "After signing up, your account will be reviewed for approval. You'll receive an email when your account is activated." %}
- {% elif settings.ACCOUNTS_VERIFICATION_REQUIRED %}
- {% trans "After signing up, you'll receive an email with a link you need to click, in order to activate your account." %}
- {% endif %}
-{% endif %}
-
-{% endblock %}
diff --git a/app/themes/base/templates/accounts/includes/user_panel.html b/app/themes/base/templates/accounts/includes/user_panel.html
deleted file mode 100644
index f26b08fd..00000000
--- a/app/themes/base/templates/accounts/includes/user_panel.html
+++ /dev/null
@@ -1,37 +0,0 @@
-{% load i18n mezzanine_tags accounts_tags %}
-
-{% if request.user.is_authenticated %}
-
-{% else %}
-
-{% endif %}
diff --git a/app/themes/base/templates/accounts/includes/user_panel_nav.html b/app/themes/base/templates/accounts/includes/user_panel_nav.html
deleted file mode 100644
index ffc02e73..00000000
--- a/app/themes/base/templates/accounts/includes/user_panel_nav.html
+++ /dev/null
@@ -1,19 +0,0 @@
-{% load i18n mezzanine_tags accounts_tags %}
-
-
-
diff --git a/app/themes/base/templates/admin/base_site.html b/app/themes/base/templates/admin/base_site.html
deleted file mode 100644
index d1a8da71..00000000
--- a/app/themes/base/templates/admin/base_site.html
+++ /dev/null
@@ -1,76 +0,0 @@
-{% extends "admin/base.html" %}
-{% load mezzanine_tags i18n staticfiles %}
-
-{% block title %}{{ title }} | Mezzanine{% endblock %}
-
-{% block extrahead %}
-
-
-
-
-{% if not settings.GRAPPELLI_INSTALLED %}
-
-{% endif %}
-
-
-{% endblock %}
-
-{% block rtl_styles %}
-{{ block.super }}
-
-{% endblock %}
-
-{% block before_content %}
-{% if user.is_staff and not is_popup and not request.GET.pop %}
-{% admin_dropdown_menu %}
-{% endif %}
-{% endblock %}
-
-{% block footer %}
-{% if form.this_is_the_login_form %}
-
-{% else %}
- {% if user.is_staff %}
- {% if not is_popup and not request.GET.pop %}
-
-
-
-
- {% endif %}
-
- {% if settings.GRAPPELLI_INSTALLED %}
-
- {% endif %}
- {% endif %}
-{% endif %}
-{% endblock %}
diff --git a/app/themes/base/templates/admin/includes/app_list.html b/app/themes/base/templates/admin/includes/app_list.html
deleted file mode 100644
index 7d20d3db..00000000
--- a/app/themes/base/templates/admin/includes/app_list.html
+++ /dev/null
@@ -1,37 +0,0 @@
-{% load i18n %}
-
-{% if app_list %}
-
- {% for app in dashboard_app_list %}
-
-
- {% trans app.name %}
- {% for model in app.models %}
-
- {% if model.perms.change or model.perms.custom %}
- {{ model.name }}
- {% else %}
- {{ model.name }}
- {% endif %}
-
- {% if model.perms.add %}
- {% trans 'Add' %}
- {% else %}
-
- {% endif %}
-
- {% if model.perms.change %}
- {% trans 'Change' %}
- {% else %}
-
- {% endif %}
-
- {% endfor %}
-
-
- {% endfor %}
-
-{% endif %}
diff --git a/app/themes/base/templates/admin/includes/content_typed_change_list.html b/app/themes/base/templates/admin/includes/content_typed_change_list.html
deleted file mode 100644
index d78a185e..00000000
--- a/app/themes/base/templates/admin/includes/content_typed_change_list.html
+++ /dev/null
@@ -1,32 +0,0 @@
-{% load pages_tags i18n %}
-
-
-
-
-
- {% trans "Add" %} ...
- {% for model in content_models %}
- {% set_model_permissions model %}
- {% if model.perms.add %}
- {{ model.meta_verbose_name|capfirst }}
- {% endif %}
- {% endfor %}
-
-
diff --git a/app/themes/base/templates/admin/includes/dropdown_menu.html b/app/themes/base/templates/admin/includes/dropdown_menu.html
deleted file mode 100644
index 1d3153c6..00000000
--- a/app/themes/base/templates/admin/includes/dropdown_menu.html
+++ /dev/null
@@ -1,45 +0,0 @@
-{% load i18n mezzanine_tags %}
-
diff --git a/app/themes/base/templates/admin/includes/recent_actions.html b/app/themes/base/templates/admin/includes/recent_actions.html
deleted file mode 100644
index c075b910..00000000
--- a/app/themes/base/templates/admin/includes/recent_actions.html
+++ /dev/null
@@ -1,18 +0,0 @@
-{% load i18n %}
-
-
-
{% trans 'Recent Actions' %}
-
{% trans 'My Actions' %}
- {% load log %}
- {% get_admin_log 10 as admin_log for_user user %}
- {% if not admin_log %}
-
{% trans 'None available' %}
- {% else %}
-
- {% endif %}
-
-
diff --git a/app/themes/base/templates/admin/index.html b/app/themes/base/templates/admin/index.html
deleted file mode 100644
index 22d2ca47..00000000
--- a/app/themes/base/templates/admin/index.html
+++ /dev/null
@@ -1,26 +0,0 @@
-{% extends "admin/base_site.html" %}
-
-{% load i18n mezzanine_tags staticfiles %}
-
-{% block extrahead %}
-{{ block.super }}
-
-
-
-{% endblock %}
-
-{% block coltype %}colMS{% endblock %}
-{% block bodyclass %}dashboard{% endblock %}
-
-{% block breadcrumbs %}{% trans "Home" %}
{% endblock %}
-
-{% block content_title %}{% trans "Dashboard" %} {% endblock %}
-
-{% block content %}{% dashboard_column 0 %}
{% endblock %}
-
-{% block sidebar %}
- {% dashboard_column 2 %}
- {% block extendedsidebar %}
- {% dashboard_column 1 %}
- {% endblock %}
-{% endblock %}
diff --git a/app/themes/base/templates/admin/login.html b/app/themes/base/templates/admin/login.html
deleted file mode 100644
index d9a670ed..00000000
--- a/app/themes/base/templates/admin/login.html
+++ /dev/null
@@ -1,71 +0,0 @@
-{% extends "admin/base_site.html" %}
-{% load i18n staticfiles %}
-
-{% block extrahead %}
-
-{{ block.super }}
-
-
-
-{% endblock %}
-
-{% block bodyclass %}login{% endblock %}
-{% block content_title %}{% endblock %}
-{% block breadcrumbs %}{% endblock %}
-
-{% block content %}
-
-{% if form.non_field_errors %}
-{% for error in form.non_field_errors %}
-{{ error }}
-{% endfor %}
-{% endif %}
-{% if no_site_permission %}
-{% trans "You don't have permission to access the admin for this site." %}
-{% endif %}
-
-
-
-{% endblock %}
-
diff --git a/app/themes/base/templates/agenda/confirmation.html b/app/themes/base/templates/agenda/confirmation.html
deleted file mode 100644
index 7e322187..00000000
--- a/app/themes/base/templates/agenda/confirmation.html
+++ /dev/null
@@ -1,17 +0,0 @@
-{% extends "pages/page.html" %}
-{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %}
-
-{% block meta_title %}{% trans "Confirmation" %}{% endblock %}
-
-
-{% block page_class %}
- Confirmation
-{% endblock %}
-
-{% block page_title %}
- {% trans "Confirmation" %}
-{% endblock %}
-
-{% block page_content %}
-
-{% endblock %}
diff --git a/app/themes/base/templates/agenda/event/includes/event_card.html b/app/themes/base/templates/agenda/event/includes/event_card.html
deleted file mode 100644
index a948df61..00000000
--- a/app/themes/base/templates/agenda/event/includes/event_card.html
+++ /dev/null
@@ -1,74 +0,0 @@
-{% extends "core/inc/generic_card.html" %}
-{% load i18n pages_tags mezzanine_tags media_tags organization_tags %}
-
-{% block metatitle %}
- {{ object.title }}
-{% endblock %}
-
-{% block title %}
- {{ object.title }}
-{% endblock %}
-
-{% block url %}
- {{ object.get_absolute_url }}
-{% endblock %}
-
-{% block image %}
-
- {% with object.images.all|get_type:'card' as images %}
- {% if images %}
-
-
-
- {% else %}
-
- {% if object.departments.first %}
- {% with object.departments.first as department %}
-
- {% endwith %}
- {% else %}
-
- {% endif %}
-
- {% endif %}
- {% endwith %}
-
-{% endblock %}
-
-{% block tags %}
-
- {% if object.departments.first %}
- {% with object.departments.first as department %}
- {{ department.department.name }}
- {% endwith %}
- {% endif %}
- {% if object.category %}
- {{ object.category|truncatechars:15 }}
- {% endif %}
-
-{% endblock %}
-
-{% block content %}
- {{ object.description|richtext_filters|safe|truncatechars_html:200 }}
-{% endblock %}
-
-{% block subtitle %}
-
- {% include 'agenda/includes/event_date_card.html' %}
-
- {% if object.location %}
- {{ object.location }}
- {% endif %}
-{% endblock %}
-
-{% block btn %}
- {% if object.prices.all.0|floatformat != '0' and object.prices.all|length > 0 %}
- {% for price in object.prices.all %}
- {% if forloop.first %}
-
- {% endif %}
- {% endfor %}
- {% endif %}
-{% endblock %}
diff --git a/app/themes/base/templates/agenda/event_base.html b/app/themes/base/templates/agenda/event_base.html
deleted file mode 100644
index 3710af03..00000000
--- a/app/themes/base/templates/agenda/event_base.html
+++ /dev/null
@@ -1,160 +0,0 @@
-{% extends "pages/page.html" %}
-{% load i18n mezzanine_tags keyword_tags organization_tags pages_tags %}
-
-{% block main %}
-
- {% block hero %}
- {% endblock %}
-
-
-
-
-
-
-
- {% block page_title %}
- {{ page.title }}
- {% endblock %}
-
-
-
-
-
-
-
-
-
- {% block page_content %}
- {{ page.content }}
- {% endblock %}
- {% block page_link %}
- {% with object.links.all as links %}
- {% if links %}
- {% include 'core/inc/link.html' %}
- {% endif %}
- {% endwith %}
- {% endblock %}
- {% block page_file %}
- {% with object.files.all as files %}
- {% if files %}
- {% include 'core/inc/files.html' %}
- {% endif %}
- {% endwith %}
- {% endblock %}
- {% block page_audio %}
- {% for related in object.playlists.all %}
- {% with related.playlist as playlist %}
- {% if playlist.type == 'audio' %}
- {% include 'media/inc/playlist_audio_detail.html' %}
- {% endif %}
- {% endwith %}
- {% endfor %}
- {% endblock %}
-
-
-
-
-
-
- {% block page_slider %}
- {% with object.images.all|get_type:'page_slider' as slider_images %}
- {% if slider_images %}
- {% include 'core/inc/slider.html' %}
- {% endif %}
- {% endwith %}
- {% endblock %}
-
- {% block page_video %}
- {% for related in object.playlists.all %}
- {% with related.playlist as playlist %}
- {% if playlist.type == 'video' %}
- {% include 'media/inc/playlist_video_slider.html' %}
- {% endif %}
- {% endwith %}
- {% endfor %}
- {% endblock %}
-
-
-
- {% block page_sub_content %}
- {% with object.blocks.all as blocks %}
- {% include "core/inc/block.html" %}
- {% endwith %}
- {% endblock %}
-
- {% block page_person_list %}
- {% endblock %}
-
- {% block page_demo %}
- {% endblock %}
-
- {% block page_blog %}
- {% endblock %}
-
- {% block related_project %}
- {% endblock %}
-
- {% block products %}
- {% if page.product_lists.all|length > 0 %}
- {% for page_product_list in page.product_lists.all %}
- {% with page_product_list.list as list %}
- {% with "shop/includes/product_list_"|add:list.style|add:"_style.html" as template %}
- {% include template %}
- {% endwith %}
- {% endwith %}
- {% endfor %}
- {% endif %}
- {% endblock %}
-
- {% block page_sub_content_2 %}
- {% endblock %}
-
- {% block page_person_list_team %}
- {% endblock %}
-
- {% block page_sub_content_3 %}
- {% endblock %}
-
- {% block logo %}
- {% with page.images.all|get_type:'logo' as images %}
- {% if images %}
-
-
-
-
-
-
- {% include 'core/inc/logo.html' %}
-
-
-
-
-
-
- {% endif %}
- {% endwith %}
- {% endblock %}
-
-
-
-
-
-
-
- {% block page_related_content %}
- {% with dynamic_content=page.dynamic_content_pages.all|filter_content object=page %}
- {% include "core/inc/related_content.html" %}
- {% endwith %}
- {% endblock %}
-
-
-
-
-{% endblock %}
diff --git a/app/themes/base/templates/agenda/event_booking.html b/app/themes/base/templates/agenda/event_booking.html
deleted file mode 100644
index cfd4073f..00000000
--- a/app/themes/base/templates/agenda/event_booking.html
+++ /dev/null
@@ -1,6 +0,0 @@
-{% extends "agenda/event_detail.html" %}
-{% load mezzanine_tags comment_tags keyword_tags rating_tags i18n future disqus_tags event_tags organization_tags %}
-
-{% block event_detail_content %}
-
-{% endblock %}
diff --git a/app/themes/base/templates/agenda/event_detail.html b/app/themes/base/templates/agenda/event_detail.html
deleted file mode 100644
index 9208ba77..00000000
--- a/app/themes/base/templates/agenda/event_detail.html
+++ /dev/null
@@ -1,152 +0,0 @@
-{% extends "agenda/event_base.html" %}
-{% load mezzanine_tags comment_tags keyword_tags rating_tags i18n future disqus_tags event_tags organization_tags pages_tags %}
-
-{% block meta_title %}{{ event.meta_title }}{% endblock %}
-
-{% block meta_keywords %}{% metablock %}
-{% keywords_for event as tags %}
-{% for tag in tags %}
- {% if not forloop.first %}, {% endif %}
- {{ tag }}
-{% endfor %}
-{% endmetablock %}{% endblock %}
-
-{% block meta_description %}{% metablock %}
- {{ event.description }}
-{% endmetablock %}{% endblock %}
-
-{% block page_class %}
- event
-{% endblock %}
-
-{% block page_title %}
-
- {% include 'agenda/includes/event_linecard.html' %}
-{% endblock %}
-
-{% block breadcrumb_menu %}
- {{ block.super }}
-
- {% trans "Agenda" %}
-
- {{ event.title }}
-{% endblock %}
-
-{% block page_content %}
- {% block event_detail_content %}
- {% if event.content %}
- {% editable event.content %}
- {{ event.content|richtext_filters|safe }}
- {% endeditable %}
- {% endif %}
- {% endblock %}
-{% endblock %}
-
-{% block page_link %}
- {% if event.mentions or event.links.all|length > 0 %}
-
-
- {% if child %}
- {% with child.links.all as links %}
- {% if links %}
-
- {% include 'core/inc/link.html' %}
-
- {% endif %}
- {% endwith %}
- {% else %}
- {% with event.links.all as links %}
- {% if links %}
-
- {% include 'core/inc/link.html' %}
-
- {% endif %}
- {% endwith %}
- {% endif %}
- {% if event.mentions %}
-
-
- {{ event.mentions }}
-
-
- {% endif %}
-
-
- {% endif %}
-{% endblock %}
-
-{% block page_audio %}
- {% with event as object %}
- {{ block.super }}
- {% endwith %}
-{% endblock %}
-
-{% block page_slider %}
- {% with event as object %}
- {{ block.super }}
- {% endwith %}
-{% endblock %}
-
-{% block page_video %}
- {% with event as object %}
- {{ block.super }}
- {% endwith %}
-{% endblock %}
-
-{% block page_person_list %}
- {% if event.persons.all %}
-
-
-
-
-
-
- {% if event.trainings.all %}
- {% trans "Trainers" %}
- {% else %}
- {% trans "Persons" %}
- {% endif %}
-
-
-
-
-
-
-
-
-
-
-
- {% for person in event.persons.all %}
- {% with person.person as person %}
-
- {% include "network/inc/person/person_card_square.html" %}
-
- {% endwith %}
- {% endfor %}
-
-
-
-
-
-
- {% endif %}
-{% endblock %}
-
-{% block page_sub_content %}
- {% with event.blocks.all as blocks %}
- {% include "core/inc/block.html" %}
- {% endwith %}
-{% endblock %}
-
-{% block page_sidebar %}
-
- {% include "includes/share_buttons.html" %}
-
-{% endblock %}
-
-{% block page_related_content %}
- {% with dynamic_content=event.dynamic_content_event.all|filter_content object=event %}
- {% include "core/inc/related_content.html" %}
- {% endwith %}
-{% endblock %}
diff --git a/app/themes/base/templates/agenda/event_iframe.html b/app/themes/base/templates/agenda/event_iframe.html
deleted file mode 100644
index 6f0f2fb6..00000000
--- a/app/themes/base/templates/agenda/event_iframe.html
+++ /dev/null
@@ -1,14 +0,0 @@
-{% extends "agenda/event_detail.html" %}
-{% load mezzanine_tags comment_tags keyword_tags rating_tags i18n future disqus_tags event_tags %}
-
-{% block title %}
- {{ title }}
-{% endblock %}
-
-{% block main %}
-
-{% block event_detail_content %}
-
-{% endblock %}
-
-{% endblock %}
diff --git a/app/themes/base/templates/agenda/event_list.html b/app/themes/base/templates/agenda/event_list.html
deleted file mode 100644
index 86f25d91..00000000
--- a/app/themes/base/templates/agenda/event_list.html
+++ /dev/null
@@ -1,63 +0,0 @@
-{% extends "pages/page.html" %}
-{% load i18n future mezzanine_tags event_tags keyword_tags disqus_tags organization_tags staticfiles pages_tags %}
-
-{% block meta_title %}
- {% if page %}
- {{ page.title }}
- {% else %}
- {% trans "Events" %}
- {% endif %}
-{% endblock %}
-
-{% block meta_keywords %}
- {% metablock %}
- {% keywords_for page as keywords %}
- {% for keyword in keywords %}
- {% if not forloop.first %}, {% endif %}
- {{ keyword }}
- {% endfor %}
- {% endmetablock %}
-{% endblock %}
-
-{% block meta_description %}
- {% metablock %}
- {{ page.description }}
- {% endmetablock %}
-{% endblock %}
-
-{% block main %}
-
-
-
-
-
{% trans "Events" %}
-
-
-
-
-
- {% for event in events %}
- {% include 'agenda/includes/event_linecard.html' %}
- {% endfor %}
-
-
-
- {% if past_events %}
-
-
-
{% trans "Past events" %}
-
-
-
-
-
- {% for event in past_events %}
- {% include 'agenda/includes/event_linecard.html' %}
- {% endfor %}
-
-
-
- {% endif %}
-
-
-{% endblock %}
diff --git a/app/themes/base/templates/agenda/event_location_detail.html b/app/themes/base/templates/agenda/event_location_detail.html
deleted file mode 100644
index c37bee05..00000000
--- a/app/themes/base/templates/agenda/event_location_detail.html
+++ /dev/null
@@ -1,43 +0,0 @@
-{% extends "pages/page.html" %}
-{% load i18n future mezzanine_tags event_tags keyword_tags disqus_tags %}
-
-{% block meta_title %}{{ location.title }}{% if location.room %} - {{ location.room }}{% endif %}{% endblock %}
-
-{% block page_class %}
- location
-{% endblock %}
-
-{% block breadcrumb_menu %}
- {{ block.super }}
- {{ location.title }}{% if location.room %} - {{ location.room }}{% endif %}
-{% endblock %}
-
-{% block page_title %}
- {% editable location.title %}
- {{ location.title }}{% if location.room %} - {{ location.room }}{% endif %}
- {% endeditable %}
-{% endblock %}
-
-
-
-{% block page_content %}
- {% if location.description %}
- {{Â location.description|safe }}
- {% endif %}
- {{ location.link }}
-
-{% endblock %}
-
-{% block page_sidebar %}
-
-{% endblock %}
diff --git a/app/themes/base/templates/agenda/event_location_list.html b/app/themes/base/templates/agenda/event_location_list.html
deleted file mode 100644
index 012bd2b1..00000000
--- a/app/themes/base/templates/agenda/event_location_list.html
+++ /dev/null
@@ -1,48 +0,0 @@
-{% extends "base.html" %}
-{% load i18n future mezzanine_tags event_tags keyword_tags disqus_tags %}
-
-{% block meta_title %}{% if page %}{{ page.richtextpage.meta_title }}{% else %}{% trans "Locations" %}{% endif %}{% endblock %}
-
-{% block meta_keywords %}{% metablock %}
-{% keywords_for page as keywords %}
-{% for keyword in keywords %}
- {% if not forloop.first %}, {% endif %}
- {{ keyword }}
-{% endfor %}
-{% endmetablock %}{% endblock %}
-
-{% block meta_description %}{% metablock %}
-{{ page.description }}
-{% endmetablock %}{% endblock %}
-
-{% block title %}
-{% if page %}
-{{ page.title }}
-{% else %}
-{% trans "Locations" %}
-{% endif %}
-{% endblock %}
-
-{% block breadcrumb_menu %}
-{% endblock %}
-
-{% block main %}
-
-
- {% for location in object_list %}
-
- {% include "agenda/includes/event_location.html" %}
-
- {% endfor %}
-
-{% endblock %}
-
-{% block right_panel %}
-{% include "agenda/includes/filter_panel.html" %}
-{% endblock %}
diff --git a/app/themes/base/templates/agenda/includes/event_date.html b/app/themes/base/templates/agenda/includes/event_date.html
deleted file mode 100644
index e7d77c9b..00000000
--- a/app/themes/base/templates/agenda/includes/event_date.html
+++ /dev/null
@@ -1,85 +0,0 @@
-{% load event_tags pages_tags mezzanine_tags organization_tags i18n %}
-{% with event.periods.all as periods %}
-
- {% if event.start and not event.end %}
- {{ event.start|date:"DATE_EVENT_FORMAT" }},
-
- {% if event.start and event.start|date:"H:i" != "23:59" %}
- {{ event.start|time:"TIME_FORMAT" }}
- {% endif %}
-
- {% else %}
-
- {% if event.start|date:"d.m.y" == event.end|date:"d.m.y" %}
- {% if not periods %}
- {{ event.start|date:"DATE_EVENT_FORMAT" }},
-
- {% if event.end and event.end|date:"H:i" != "23:59" %}
- {{ event.start|time:"TIME_FORMAT" }} - {{ event.end|time:"TIME_FORMAT" }}
- {% else %}
- {{ event.start|time:"TIME_FORMAT" }}
- {% endif %}
- {% else %}
- {{ event.start|date:"DATE_EVENT_FORMAT" }},
- {% for period in periods %}
- {% if period.date_to and period.date_to|date:"H:i" != "23:59" %}
- {{ period.date_from|time:"TIME_FORMAT" }} - {{ period.date_to|time:"TIME_FORMAT" }}
- {% else %}
- {% if forloop.last or periods|length == 2 %} {% trans "and"%} {% elif not forloop.first %}, {% endif %}
- {{ period.date_from|time:"TIME_FORMAT" }}
- {% endif %}
- {% endfor %}
- {% endif %}
-
- {% elif event.start|date:"m.y" == event.end|date:"m.y" %}
- {% if periods %}
- {% with periods|same_time_in_periods as same_time_in_periods %}
- {% for period in periods %}
- {% if period.date_to and period.date_to|date:"H:i" != "23:59" %}
- {{ period.date_from|date:"WEEK_DAY_FORMAT" }},
- {% if period|period_is_more_than_hours:4 %}
- {{ period.date_from|time:"DATE_EVENT_FORMAT" }} {% trans "through" %} {{ period.date_to|time:"TIME_FORMAT" }}
- {% else %}
- {{ period.date_from|time:"TIME_FORMAT" }}
- {% endif %}
- {% else %}
- {% if periods|length > 1 and not forloop.last %}
- {{ period.date_from|date:"DATE_EVENT_FORMAT" }}{% if periods|length == 2 %} {% trans "and" %} {% else %},{% endif %}
- {% else %}
- {{ period.date_from|date:"DATE_EVENT_FORMAT" }},
- {% if periods|length > 1 and forloop.first %}{% trans "and" %}{% endif %}
- {% endif %}
- {% if same_time_in_periods and forloop.last %}
- {{ period.date_from|time:"TIME_FORMAT" }}
- {% elif not same_time_in_periods %}
- {{ period.date_from|time:"TIME_FORMAT" }}
- {% endif %}
- {% endif %}
-
- {% endfor %}
- {% endwith %}
- {% else %}
- {{ event.start|date:"WEEK_DAY_FORMAT" }}
- {% if event.end|subtract:event.start|get_attr:"days" > 1 %}
- {% trans "through" %}
- {% else %}
- {% trans "and" %}
- {% endif %}
- {{ event.end|date:"DATE_EVENT_FORMAT" }}, {{ event.start|time:"TIME_FORMAT" }}
- {% if event.end and event.end|date:"H:i" != "23:59" %}
- - {{ event.end|time:"TIME_FORMAT" }}
- {% endif %}
- {% endif %}
-
- {% else %}
- {{ event.start|date:"DATE_EVENT_FORMAT" }} {% trans "through" %} {{ event.end|date:"DATE_EVENT_FORMAT" }},
-
- {% if event.end and event.end|date:"H:i" != "23:59" %}
- {{ event.start|time:"TIME_FORMAT" }} - {{ event.end|time:"TIME_FORMAT" }}
- {% else %}
- {{ event.start|time:"TIME_FORMAT" }}
- {% endif %}
- {% endif %}
-
- {% endif %}
-{% endwith %}
diff --git a/app/themes/base/templates/agenda/includes/event_date_card.html b/app/themes/base/templates/agenda/includes/event_date_card.html
deleted file mode 100644
index 4aaa9a36..00000000
--- a/app/themes/base/templates/agenda/includes/event_date_card.html
+++ /dev/null
@@ -1,12 +0,0 @@
-{% load i18n %}
-{% load event_tags %}
-
-{% if object.start and not object.end %}
- {{ object.start|date:"l j F" }}
-{% else %}
- {% if object.start|date:"d.m.y" == object.end|date:"d.m.y" %}
- {{ object.start|date:"l j F" }}
- {% else %}
- {{ object.start|date:"j F" }} {% trans "to" %} {{ object.end|date:"j F" }}
- {% endif %}
-{% endif %}
diff --git a/app/themes/base/templates/agenda/includes/event_date_line.html b/app/themes/base/templates/agenda/includes/event_date_line.html
deleted file mode 100644
index fa29a3db..00000000
--- a/app/themes/base/templates/agenda/includes/event_date_line.html
+++ /dev/null
@@ -1,59 +0,0 @@
-{% load event_tags pages_tags mezzanine_tags organization_tags i18n %}
-{% with event.periods.all as periods %}
-
- {% if event.start and not event.end %}
- {{ event.start|date:"DATE_EVENT_FORMAT" }}
-
- {% if event.start and event.start|date:"H:i" != "23:59" %}
- {{ event.start|time:"TIME_FORMAT" }}
- {% endif %}
-
- {% else %}
-
- {% if event.start|date:"d.m.y" == event.end|date:"d.m.y" %}
- {% if not periods %}
- {{ event.start|date:"DATE_EVENT_FORMAT" }}
-
- {% if event.end and event.end|date:"H:i" != "23:59" %}
- {{ event.start|time:"TIME_FORMAT" }} - {{ event.end|time:"TIME_FORMAT" }}
- {% else %}
- {{ event.start|time:"TIME_FORMAT" }}
- {% endif %}
- {% else %}
- {{ event.start|date:"DATE_EVENT_FORMAT" }}
- {% for period in periods %}
- {% if period.date_to and period.date_to|date:"H:i" != "23:59" %}
- {{ period.date_from|time:"TIME_FORMAT" }} - {{ period.date_to|time:"TIME_FORMAT" }}
- {% else %}
- {% if forloop.last or periods|length == 2 %} {% trans "and"%} {% elif not forloop.first %}, {% endif %}
- {{ period.date_from|time:"TIME_FORMAT" }}
- {% endif %}
- {% endfor %}
- {% endif %}
-
- {% elif event.start|date:"m.y" == event.end|date:"m.y" %}
- {{ event.start|date:"WEEK_DAY_FORMAT" }}
- {% if event.end|subtract:event.start|get_attr:"days" > 1 %}
- {% trans "through" %}
- {% else %}
- {% trans "and" %}
- {% endif %}
- {{ event.end|date:"DATE_EVENT_FORMAT" }}
- {% if event.end and event.end|date:"H:i" != "23:59" %}
- {{ event.start|time:"TIME_FORMAT" }} - {{ event.end|time:"TIME_FORMAT" }}
- {% else %}
- {{ event.start|time:"TIME_FORMAT" }}
- {% endif %}
-
- {% else %}
- {{ event.start|date:"DATE_EVENT_FORMAT" }} {% trans "through" %} {{ event.end|date:"DATE_EVENT_FORMAT" }}
-
- {% if event.end and event.end|date:"H:i" != "23:59" %}
- {{ event.start|time:"TIME_FORMAT" }} - {{ event.end|time:"TIME_FORMAT" }}
- {% else %}
- {{ event.start|time:"TIME_FORMAT" }}
- {% endif %}
- {% endif %}
-
- {% endif %}
-{% endwith %}
diff --git a/app/themes/base/templates/agenda/includes/event_date_slider.html b/app/themes/base/templates/agenda/includes/event_date_slider.html
deleted file mode 100644
index 6a41de20..00000000
--- a/app/themes/base/templates/agenda/includes/event_date_slider.html
+++ /dev/null
@@ -1,54 +0,0 @@
-{% load event_tags pages_tags mezzanine_tags organization_tags i18n %}
-{% with event.periods.all as periods %}
-
- {% if event.start and not event.end %}
- {{ event.start|date:"DATE_EVENT_FORMAT" }},
-
- {% if event.start and event.start|date:"H:i" != "23:59" %}
- {{ event.start|time:"TIME_FORMAT" }}
- {% endif %}
-
- {% else %}
-
- {% if event.start|date:"d.m.y" == event.end|date:"d.m.y" %}
- {% if not periods %}
- {{ event.start|date:"DATE_EVENT_FORMAT" }},
-
- {% if event.end and event.end|date:"H:i" != "23:59" %}
- {{ event.start|time:"TIME_FORMAT" }} - {{ event.end|time:"TIME_FORMAT" }}
- {% else %}
- {{ event.start|time:"TIME_FORMAT" }}
- {% endif %}
- {% else %}
- {{ event.start|date:"DATE_EVENT_FORMAT" }},
- {% for period in periods %}
- {% if period.date_to and period.date_to|date:"H:i" != "23:59" %}
- {{ period.date_from|time:"TIME_FORMAT" }} - {{ period.date_to|time:"TIME_FORMAT" }}
- {% else %}
- {% if forloop.last or periods|length == 2 %} {% trans "and"%} {% elif not forloop.first %}, {% endif %}
- {{ period.date_from|time:"TIME_FORMAT" }}
- {% endif %}
- {% endfor %}
- {% endif %}
-
- {% elif event.start|date:"m.y" == event.end|date:"m.y" %}
- {{ event.start|date:"WEEK_DAY_FORMAT" }}
- {% if event.end|subtract:event.start|get_attr:"days" > 1 %}
- {% trans "through" %}
- {% else %}
- {% trans "and" %}
- {% endif %}
- {{ event.end|date:"DATE_EVENT_FORMAT" }}
-
- {% else %}
- {{ event.start|date:"DATE_EVENT_FORMAT" }} {% trans "through" %} {{ event.end|date:"DATE_EVENT_FORMAT" }},
-
- {% if event.end and event.end|date:"H:i" != "23:59" %}
- {{ event.start|time:"TIME_FORMAT" }} - {{ event.end|time:"TIME_FORMAT" }}
- {% else %}
- {{ event.start|time:"TIME_FORMAT" }}
- {% endif %}
- {% endif %}
-
- {% endif %}
-{% endwith %}
diff --git a/app/themes/base/templates/agenda/includes/event_linecard.html b/app/themes/base/templates/agenda/includes/event_linecard.html
deleted file mode 100644
index b8bad92b..00000000
--- a/app/themes/base/templates/agenda/includes/event_linecard.html
+++ /dev/null
@@ -1,80 +0,0 @@
-{% load i18n future mezzanine_tags event_tags keyword_tags disqus_tags organization_tags %}
-
-
diff --git a/app/themes/base/templates/agenda/includes/event_location.html b/app/themes/base/templates/agenda/includes/event_location.html
deleted file mode 100644
index 41c3ed5c..00000000
--- a/app/themes/base/templates/agenda/includes/event_location.html
+++ /dev/null
@@ -1,17 +0,0 @@
-{% load i18n future mezzanine_tags event_tags %}
-
-
-
{{ location.title }}{% if location.room %} - {{ location.room }}{% endif %}
- {% block event_detail_location %}
-
{{ location.address }}
-
{% trans "Room" %} {{ event.location.room }}
-
{{ location.link }}
-
{{Â location.description|safe }}
-
- {% google_static_map location 900 300 15 %}
-
-
{% trans "Click to get the interactive map" %}
-
-
{% trans "Viewing events for the location" %}
- {% endblock %}
-
diff --git a/app/themes/base/templates/agenda/includes/event_metainfo.html b/app/themes/base/templates/agenda/includes/event_metainfo.html
deleted file mode 100644
index dbc7edbc..00000000
--- a/app/themes/base/templates/agenda/includes/event_metainfo.html
+++ /dev/null
@@ -1,82 +0,0 @@
-{% load i18n mezzanine_tags event_tags organization_tags %}
-
-
- {% include 'agenda/includes/event_date.html' %}
-
-
-
-
-{% if event.location %}
- {{ event.location }}
- {% if event.location.room %}
- {{ event.location.room }}
- {% endif %}
-
- {% google_static_map event 194 194 15 %}
-
-
-
-{% endif %}
-
-{% with event.trainings.all.0 as training %}
- {% if training %}
- {% trans "Language" %}
- {{ training.get_language_display }}
- {% comment %}
- {% trans "Public type" %}
- {{ training.public_type }}
- {% endcomment %}
- {% trans "Level" %}
- {{ training.level }}
- {% endif %}
-{% endwith %}
-
-{% if event.brochure %}
- {% trans "Downloads" %}
-
-
- {{ event.brochure.filename }}
-
-
-{% endif %}
-
-{% if unit_booking %}
- {% if event.prices.all %}
- {% if event.prices.all.0|floatformat != '0' %}
- {% for price in event.prices.all %}
- {% if forloop.first %}
- {% trans "Prices" %}
-
- {% endif %}
- {% if price.event_price_description.description %}
- {{ price.event_price_description.description }} :
- {% endif %}
- {{ price.value|floatformat:"-2" }} {{ price.unit }} {% if not forloop.last %} {% endif %}
- {% if forloop.last %}
-
- {% endif %}
- {% endfor %}
- {% else %}
-
- {{ event.no_price_comments }}
-
- {% endif %}
- {% if not event.is_full %}
-
- {% if event.trainings.all|length %}
- {% with event.links.all as links %}
- {% if links %}
-
- {% trans "Reserve" %}
-
- {% endif %}
- {% endwith %}
- {% else %}
-
- {% trans "Reserve" %}
-
- {% endif %}
-
- {% endif %}
- {% endif %}
-{% endif %}
diff --git a/app/themes/base/templates/agenda/includes/event_metainfo_line.html b/app/themes/base/templates/agenda/includes/event_metainfo_line.html
deleted file mode 100644
index 68b0c7a4..00000000
--- a/app/themes/base/templates/agenda/includes/event_metainfo_line.html
+++ /dev/null
@@ -1,35 +0,0 @@
-{% load i18n mezzanine_tags event_tags organization_tags %}
-
-
-
-
-
-{% if event.location %}
- {{ event.location }}
-{% endif %}
-
-{% if unit_booking %}
-
- {% if event.prices.all and not is_archive and not event.is_full %}
-
- {% if event.trainings.all|length %}
- {% with event.links.all as links %}
- {% if links %}
-
- {% trans "Reserve" %}
-
- {% endif %}
- {% endwith %}
- {% else %}
-
- {% trans "Reserve" %}
-
- {% endif %}
-
- {% endif %}
-
-{% endif %}
diff --git a/app/themes/base/templates/agenda/includes/event_metainfo_slider.html b/app/themes/base/templates/agenda/includes/event_metainfo_slider.html
deleted file mode 100644
index 5100044a..00000000
--- a/app/themes/base/templates/agenda/includes/event_metainfo_slider.html
+++ /dev/null
@@ -1,31 +0,0 @@
-{% load i18n mezzanine_tags event_tags %}
-
diff --git a/app/themes/base/templates/agenda/includes/event_search.html b/app/themes/base/templates/agenda/includes/event_search.html
deleted file mode 100644
index d171d335..00000000
--- a/app/themes/base/templates/agenda/includes/event_search.html
+++ /dev/null
@@ -1,65 +0,0 @@
-{% extends "core/inc/search_card.html" %}
-{% load i18n future mezzanine_tags event_tags keyword_tags disqus_tags organization_tags %}
-
-{% block title %}
- {{ event.title }}
-{% endblock %}
-
-{% block icon %}calendar-o{% endblock %}
-
-{% block subtitle %}
-
- {% include 'agenda/includes/event_date_line.html' with object=event %}
- {% if event.prices.all.0|floatformat != '0' and event.prices.all|length > 0 and not is_archive and not event.is_full %}
-
- {% trans "Reserve" %}
-
- {% endif %}
-
-{% endblock %}
-
-{% block image %}
- {% with event.images.all|get_type:'card' as images %}
- {% if images %}
-
-
-
-
-
- {% else %}
- {% with event.parent.images.all|get_type:'card' as images %}
- {% if images %}
-
-
-
-
-
- {% endif %}
- {% endwith %}
- {% endif %}
- {% endwith %}
-{% endblock %}
-
-{% block tags %}
- {% keywords_for event as tags %}
- {% if event.departments.all.0 or tags %}
- {% if event.departments.all.0 %}
-
- {{ event.departments.all.0.department.name }}
-
- {% endif %}
- {% endif %}
- {% if event.category %}
-
- {{ event.category|truncatechars:15 }}
-
- {% endif %}
-{% endblock %}
-
-{% block url %}
- {{ event.get_absolute_url }}
-{% endblock %}
-
-{% block content %}
- {{ event.description|slice:":100" }}
-{% endblock %}
diff --git a/app/themes/base/templates/agenda/includes/filter_panel.html b/app/themes/base/templates/agenda/includes/filter_panel.html
deleted file mode 100644
index 809bbadb..00000000
--- a/app/themes/base/templates/agenda/includes/filter_panel.html
+++ /dev/null
@@ -1,125 +0,0 @@
-{% load event_tags keyword_tags i18n future %}
-
-{% block upcoming_events %}
-{% upcoming_events 5 as upcoming_events %}
-{% if upcoming_events %}
-
-
-{% for upcoming_event in upcoming_events %}
-
-
-
-{% endfor %}
-
-{% endif %}
-{% endblock %}
-
-{% block recent_events %}
-{% recent_events 5 as recent_events %}
-{% if recent_events %}
-
-
- {% for recent_event in recent_events %}
-
-
-
- {% endfor %}
-
-{% endif %}
-{% endblock %}
-
-{% block event_months %}
-{% event_months as months %}
-{% if months %}
-
-{% for month in months %}
- {% ifchanged month.date.year %}
- {% if not forloop.first %}{% endif %}
-
-
- {% endifchanged %}
-
-
-
- {% endfor %}
-
-{% endif %}
-{% endblock %}
-
-{% block event_locations %}
-{% event_locations as locations %}
-{% if locations %}
-
-
-{% for location in locations %}
-
-
-
-{% endfor %}
-
-{% endif %}
-{% endblock %}
-
-{% block event_keywords %}
-{% keywords_for mezzanine_agenda.event as tags %}
-{% if tags %}
-
-
-{% for tag in tags %}
-
-
-
-{% endfor %}
-
-{% endif %}
-{% endblock %}
-
-{% comment %}
-{% block event_authors %}
-{% event_authors as authors %}
-{% if authors %}
-
-
-{% for author in authors %}
-
-
-
-{% endfor %}
-
-{% endif %}
-{% endblock %}
-
-{% block event_feeds %}
-
-{% if tag %}
- /
-
-{% endif %}
-{% if location %}
- /
-
-{% endif %}
-{% if author %}
- /
-
-{% endif %}
-{% if not tag and not location and not author %}
- /
-
-{% endif %}
-{% endblock %}
-{% endcomment %}
diff --git a/app/themes/base/templates/base.html b/app/themes/base/templates/base.html
deleted file mode 100644
index 701b6a98..00000000
--- a/app/themes/base/templates/base.html
+++ /dev/null
@@ -1,112 +0,0 @@
-
-
-{% load i18n pages_tags mezzanine_tags staticfiles keyword_tags event_tags organization_tags %}
-{% get_language_info_list for LANGUAGES as languages %}
-
-
-
-
-
-
- {% spaceless %}{% block meta_title %}{% endblock %}{% endspaceless %}{% if settings.SITE_TITLE %} | {{ settings.SITE_TITLE }}{% endif %}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {% compress css %}
-
-
-
-
-
-
- {% endcompress %}
-
- {% block extra_head %}{% endblock %}
-
-
-
- {% spaceless %}
-
- {% block sidebar %}
-
- {% include "includes/sidebar.html" %}
-
- {% endblock %}
-
- {% block site_overlay %}
-
-
- {% endblock %}
-
- {% block header %}
-
- {% endblock %}
-
- {% block container %}
-
-
- {% block content_header %}{% endblock %}
- {% block main %}{% endblock %}
- {% block content_footer %}{% endblock %}
-
-
- {% block social %}
- {% include "includes/social.html" %}
- {% endblock %}
-
- {% block footer %}
-
- {% endblock %}
-
- {% endblock %}
-
- {% block overlay_container %}
-
- {% endblock %}
-
- {% search_form %}
-
- {% block footer_scripts %}
- {% include "includes/footer_scripts.html" %}
- {% endblock %}
-
- {% endspaceless %}
-
-
-
diff --git a/app/themes/base/templates/core/admin/base_site.html b/app/themes/base/templates/core/admin/base_site.html
deleted file mode 100644
index cc5649e5..00000000
--- a/app/themes/base/templates/core/admin/base_site.html
+++ /dev/null
@@ -1,77 +0,0 @@
-{% extends "admin/base.html" %}
-{% load mezzanine_tags i18n staticfiles %}
-
-{% block title %}{{ title }} | Mezzanine{% endblock %}
-
-{% block extrahead %}
-
-
-
-
-{% if not settings.GRAPPELLI_INSTALLED %}
-
-{% endif %}
-
-
-
-{% endblock %}
-
-{% block rtl_styles %}
-{{ block.super }}
-
-{% endblock %}
-
-{% block before_content %}
-{% if user.is_staff and not is_popup and not request.GET.pop %}
-{% admin_dropdown_menu %}
-{% endif %}
-{% endblock %}
-
-{% block footer %}
-{% if form.this_is_the_login_form %}
-
-{% else %}
- {% if user.is_staff %}
- {% if not is_popup and not request.GET.pop %}
-
-
-
-
- {% endif %}
-
- {% if settings.GRAPPELLI_INSTALLED %}
-
- {% endif %}
- {% endif %}
-{% endif %}
-{% endblock %}
diff --git a/app/themes/base/templates/core/inc/block.html b/app/themes/base/templates/core/inc/block.html
deleted file mode 100644
index 8ef77828..00000000
--- a/app/themes/base/templates/core/inc/block.html
+++ /dev/null
@@ -1,37 +0,0 @@
-{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %}
-{% if blocks %}
-
- {% for block in blocks %}
- {% if block.content %}
- {% if block.with_separator %}
-
- {% endif %}
-
-
-
-
- {% editable block.title %}
-
-
{{ block.title }}
-
- {% endeditable %}
- {% if block.description %}
-
- {% editable block.description %}
- {{ block.description }}
- {% endeditable %}
-
- {% endif %}
- {% if block.content %}
- {% editable block.content %}
- {{ block.content|richtext_filters|safe }}
- {% endeditable %}
- {% endif %}
-
-
-
-
- {% endif %}
- {% endfor %}
-
-{% endif %}
diff --git a/app/themes/base/templates/core/inc/files.html b/app/themes/base/templates/core/inc/files.html
deleted file mode 100644
index 8127a688..00000000
--- a/app/themes/base/templates/core/inc/files.html
+++ /dev/null
@@ -1,17 +0,0 @@
-{% load i18n %}
-
- {% trans "Downloads" %}
-
-
diff --git a/app/themes/base/templates/core/inc/generic_card.html b/app/themes/base/templates/core/inc/generic_card.html
deleted file mode 100644
index f3ebad5c..00000000
--- a/app/themes/base/templates/core/inc/generic_card.html
+++ /dev/null
@@ -1,32 +0,0 @@
-{% load i18n pages_tags mezzanine_tags media_tags organization_tags %}
-
-
-
-
- {% block image %}
- {% endblock %}
-
- {% block btn %}
- {% endblock %}
-
-
-
-
-
- {% block title %}
- {% endblock %}
-
-
- {% block tags %}
- {% endblock %}
-
-
- {% block subtitle %}
- {% endblock %}
-
-
- {% block content %}
- {% endblock %}
-
-
-
diff --git a/app/themes/base/templates/core/inc/link.html b/app/themes/base/templates/core/inc/link.html
deleted file mode 100644
index ebb7bdfc..00000000
--- a/app/themes/base/templates/core/inc/link.html
+++ /dev/null
@@ -1,6 +0,0 @@
-{% load mezzanine_tags i18n %}
-
diff --git a/app/themes/base/templates/core/inc/logo.html b/app/themes/base/templates/core/inc/logo.html
deleted file mode 100644
index a3167990..00000000
--- a/app/themes/base/templates/core/inc/logo.html
+++ /dev/null
@@ -1,6 +0,0 @@
-{% load mezzanine_tags i18n %}
-{% if images %}
- {% for image in images %}
-
- {% endfor %}
-{% endif %}
diff --git a/app/themes/base/templates/core/inc/messages.html b/app/themes/base/templates/core/inc/messages.html
deleted file mode 100644
index 1f5e4473..00000000
--- a/app/themes/base/templates/core/inc/messages.html
+++ /dev/null
@@ -1,7 +0,0 @@
-{% if messages %}
-
- {% for message in messages %}
- {{ message }}
- {% endfor %}
-
-{% endif %}
diff --git a/app/themes/base/templates/core/inc/related_content.html b/app/themes/base/templates/core/inc/related_content.html
deleted file mode 100644
index fd8f4502..00000000
--- a/app/themes/base/templates/core/inc/related_content.html
+++ /dev/null
@@ -1,63 +0,0 @@
-{% load i18n mezzanine_tags keyword_tags organization_tags pages_tags %}
-
-{% if dynamic_content.event|length > 0 %}
-
-
-
-
-
{% trans "Linked events" %}
-
-
-
-
- {% for content in dynamic_content.event %}
- {% with event=content.content_object %}
- {% include 'agenda/includes/event_linecard.html' %}
- {% endwith %}
- {% endfor %}
-
-
-
-
-
-{% endif %}
-
-{% if dynamic_content.other|length > 0 %}
-
-
-
-
-
{% if object.related_title.title %}{{ object.related_title.title }}{% else %}{% trans "Also discover" %}{% endif %}
-
-
-
-
-
-
- {% for content in dynamic_content.other %}
- {% if forloop.counter0 == 0 or forloop.counter|divisibleby:3 %}
-
-
- {% endif %}
-
- {% if content.content_type.model == "article" %}
- {% include "magazine/article/includes/article_card.html" with object=content.content_object %}
- {% elif content.content_type.model == "event" %}
- {% include "agenda/event/includes/event_card.html" with object=content.content_object %}
- {% elif content.content_type.model == "custompage" %}
- {% include "pages/page/includes/page_card.html" with object=content.content_object %}
- {% endif %}
-
- {% if forloop.last or forloop.counter|divisibleby:2 %}
-
-
- {% endif %}
- {% endfor %}
-
-
-
-
-
-
-
-{% endif %}
diff --git a/app/themes/base/templates/core/inc/related_content_dynamic.html b/app/themes/base/templates/core/inc/related_content_dynamic.html
deleted file mode 100644
index e226b2b4..00000000
--- a/app/themes/base/templates/core/inc/related_content_dynamic.html
+++ /dev/null
@@ -1,39 +0,0 @@
-{% load i18n mezzanine_tags keyword_tags organization_tags pages_tags %}
-{% if concrete_objects %}
-
-
-
-
-
{% if object.related_title.title %}{{ object.related_title.title }}{% else %}{% trans "Also discover" %}{% endif %}
-
-
-
-
-
-
- {% for concrete_object in concrete_objects %}
- {% if forloop.counter0 == 0 or forloop.counter|divisibleby:3 %}
-
-
- {% endif %}
-
-
- {% with app_label=concrete_object|app_label_short classname=concrete_object|classname|lower object=concrete_object %}
- {% with app_label|add:"/"|add:classname|add:"/includes/"|add:classname|add:"_card.html" as template %}
- {% include template %}
- {% endwith %}
- {% endwith %}
-
-
- {% if forloop.last or forloop.counter|divisibleby:2 %}
-
-
- {% endif %}
- {% endfor %}
-
-
-
-
-
-
-{% endif %}
diff --git a/app/themes/base/templates/core/inc/search_card.html b/app/themes/base/templates/core/inc/search_card.html
deleted file mode 100644
index 036dd095..00000000
--- a/app/themes/base/templates/core/inc/search_card.html
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
- {% block image %}
- {% endblock %}
-
-
-
-
diff --git a/app/themes/base/templates/core/inc/slider.html b/app/themes/base/templates/core/inc/slider.html
deleted file mode 100644
index 16eba10a..00000000
--- a/app/themes/base/templates/core/inc/slider.html
+++ /dev/null
@@ -1,21 +0,0 @@
-{% load mezzanine_tags %}
-
-
- {% for image in slider_images %}
-
-
-
-
- {{ image.title }}
- {% if image.description %}
- {{ image.description }}
- {% endif %}
- {% if image.credits %}
- {{ image.credits }}
- {% endif %}
-
-
-
- {% endfor %}
-
-
diff --git a/app/themes/base/templates/email/account_approve.html b/app/themes/base/templates/email/account_approve.html
deleted file mode 100644
index 809a825b..00000000
--- a/app/themes/base/templates/email/account_approve.html
+++ /dev/null
@@ -1,13 +0,0 @@
-{% load i18n accounts_tags %}
-{% block main %}
-{% trans "Hey there, a new account has been created and requires activation." %}
-
-{% trans "Name" %}: {{ user.get_full_name }}
-{% trans "Email" %}: {{ user.email }}
-{% for field, value in user|profile_fields %}
-{{ field }}: {{ value|linebreaksbr }}
-{% endfor %}
-
-{% trans "Please use the link below to activate it." %}
-http://{{ request.get_host }}{{ change_url }}
-{% endblock %}
diff --git a/app/themes/base/templates/email/account_approve.txt b/app/themes/base/templates/email/account_approve.txt
deleted file mode 100644
index 763f0ce7..00000000
--- a/app/themes/base/templates/email/account_approve.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-{% load i18n accounts_tags %}
-{% block main %}
-{% trans "Hey there, a new account has been created and requires activation." %}
-
-{% trans "Name" %}: {{ user.get_full_name }}
-{% trans "Email" %}: {{ user.email }}
-{% for field, value in user|profile_fields %}{{ field }}: {{ value|linebreaksbr }}
-{% endfor %}
-{% trans "Please use the link below to activate it." %}
-http://{{ request.get_host }}{{ change_url }}
-{% endblock %}
diff --git a/app/themes/base/templates/email/account_approve_subject.txt b/app/themes/base/templates/email/account_approve_subject.txt
deleted file mode 100644
index 94b70f82..00000000
--- a/app/themes/base/templates/email/account_approve_subject.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-{% load i18n %}
-{% trans "An account requires activation" %}
diff --git a/app/themes/base/templates/email/account_approved.html b/app/themes/base/templates/email/account_approved.html
deleted file mode 100644
index 44642ab7..00000000
--- a/app/themes/base/templates/email/account_approved.html
+++ /dev/null
@@ -1,6 +0,0 @@
-{% load i18n %}
-{% block main %}
-{% trans "Hey there, your account has been activated." %}
-{% trans "Please use the link below to log in." %}
-http://{{ request.get_host }}{% url "login" %}
-{% endblock %}
diff --git a/app/themes/base/templates/email/account_approved.txt b/app/themes/base/templates/email/account_approved.txt
deleted file mode 100644
index 746cecc0..00000000
--- a/app/themes/base/templates/email/account_approved.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-{% load i18n %}
-{% block main %}
-{% trans "Hey there, your account has been activated." %}
-{% trans "Please use the link below to log in." %}
-http://{{ request.get_host }}{% url "login" %}
-{% endblock %}
diff --git a/app/themes/base/templates/email/account_approved_subject.txt b/app/themes/base/templates/email/account_approved_subject.txt
deleted file mode 100644
index e6ce5be5..00000000
--- a/app/themes/base/templates/email/account_approved_subject.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-{% load i18n %}
-{% trans "Your account has been activated" %}
diff --git a/app/themes/base/templates/email/application_notification.html b/app/themes/base/templates/email/application_notification.html
deleted file mode 100644
index b8c71773..00000000
--- a/app/themes/base/templates/email/application_notification.html
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
- Bonjour,
-
- Une nouvelle candidature a été soumise :
- Nom : {{ last_name }}
- Prénom : {{ first_name }}
- Email :{{ email }}
- Message :
- {{ message }}
-
-
- Le curriculum vitae ainsi que la lettre de motivation sont en pièces jointes.
- Ces informations sont disponibles sur le backoffice de http://www.ircam.fr dans l'édition de l'offre d'emploi correspondante.
-
- Bonne journée ! :)
-
-
diff --git a/app/themes/base/templates/email/base.html b/app/themes/base/templates/email/base.html
deleted file mode 100644
index 6030db4b..00000000
--- a/app/themes/base/templates/email/base.html
+++ /dev/null
@@ -1,3 +0,0 @@
-{% block main %}{% endblock %}
-
-http://{{ request.get_host }}
diff --git a/app/themes/base/templates/email/base.txt b/app/themes/base/templates/email/base.txt
deleted file mode 100644
index a8416a37..00000000
--- a/app/themes/base/templates/email/base.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-{% block main %}{% endblock %}
-
-http://{{ request.get_host }}
diff --git a/app/themes/base/templates/email/comment_notification.html b/app/themes/base/templates/email/comment_notification.html
deleted file mode 100644
index 0df6595c..00000000
--- a/app/themes/base/templates/email/comment_notification.html
+++ /dev/null
@@ -1,17 +0,0 @@
-{% extends "email/base.html" %}
-{% load i18n %}
-
-{% block main %}
-
- {% trans "A new comment has been posted on" %}
- {{ obj }}
-
-
- {% blocktrans with submit_date=comment.submit_date user_name=comment.user_name %}
- At {{ submit_date }} {{ user_name }} wrote:
- {% endblocktrans %}
-
-
- {{ comment.comment|linebreaksbr|urlize }}
-
-{% endblock %}
diff --git a/app/themes/base/templates/email/comment_notification.txt b/app/themes/base/templates/email/comment_notification.txt
deleted file mode 100644
index d19ba84b..00000000
--- a/app/themes/base/templates/email/comment_notification.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-{% extends "email/base.txt" %}
-{% load i18n %}
-
-{% block main %}
-A new comment has been posted on {{ obj }} [http://{{ request.get_host }}{{ comment_url }}]
-
-{% blocktrans with submit_date=comment.submit_date user_name=comment.user_name %}
-At {{ submit_date }} {{ user_name }} wrote:
-{% endblocktrans %}
-
-{{ comment.comment }}
-{% endblock %}
diff --git a/app/themes/base/templates/email/form_response.html b/app/themes/base/templates/email/form_response.html
deleted file mode 100644
index 7948635d..00000000
--- a/app/themes/base/templates/email/form_response.html
+++ /dev/null
@@ -1,13 +0,0 @@
-{% extends "email/base.html" %}
-
-{% block main %}
-{% if message %}{{ message }}
{% endif %}
-
-{% for field, value in fields %}
-
- {{ field }}:
- {{ value|linebreaks }}
-
-{% endfor %}
-
-{% endblock %}
diff --git a/app/themes/base/templates/email/form_response.txt b/app/themes/base/templates/email/form_response.txt
deleted file mode 100644
index d4409e17..00000000
--- a/app/themes/base/templates/email/form_response.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-{% extends "email/base.txt" %}
-
-{% block main %}{% if message %}
-{{ message }}
-
-{% endif %}{% for field, value in fields %}
-{{ field }}: {{ value|safe }}
-{% endfor %}
-{% endblock %}
diff --git a/app/themes/base/templates/email/form_response_copies.html b/app/themes/base/templates/email/form_response_copies.html
deleted file mode 100644
index 22fdee75..00000000
--- a/app/themes/base/templates/email/form_response_copies.html
+++ /dev/null
@@ -1,5 +0,0 @@
-{% extends "email/form_response.html" %}
-
-{% block main %}
-{{ block.super }}
-{% endblock %}
diff --git a/app/themes/base/templates/email/form_response_copies.txt b/app/themes/base/templates/email/form_response_copies.txt
deleted file mode 100644
index fa358d62..00000000
--- a/app/themes/base/templates/email/form_response_copies.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-{% extends "email/form_response.txt" %}
-
-{% block main %}
-{{ block.super }}
-{% endblock %}
diff --git a/app/themes/base/templates/email/password_reset_verify.html b/app/themes/base/templates/email/password_reset_verify.html
deleted file mode 100644
index 015c2d17..00000000
--- a/app/themes/base/templates/email/password_reset_verify.html
+++ /dev/null
@@ -1,8 +0,0 @@
-{% load i18n %}
-{% block main %}
-{% trans "Hey there, the password reset form was used for your account." %}
-{% trans "Please use the link below to log in and update your password." %}
-http://{{ request.get_host }}{{ verify_url }}
-{% trans "If you didn't request for your password to be reset, please ignore this email." %}
-{% endblock %}
-
diff --git a/app/themes/base/templates/email/password_reset_verify.txt b/app/themes/base/templates/email/password_reset_verify.txt
deleted file mode 100644
index 48b52500..00000000
--- a/app/themes/base/templates/email/password_reset_verify.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-{% load i18n %}
-{% block main %}
-{% trans "Hey there, the password reset form was used for your account." %}
-{% trans "Please use the link below to log in and update your password." %}
-http://{{ request.get_host }}{{ verify_url }}
-{% trans "If you didn't request for your password to be reset, please ignore this email." %}
-{% endblock %}
diff --git a/app/themes/base/templates/email/password_reset_verify_subject.txt b/app/themes/base/templates/email/password_reset_verify_subject.txt
deleted file mode 100644
index 72060ab7..00000000
--- a/app/themes/base/templates/email/password_reset_verify_subject.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-{% load i18n %}
-{% trans "Reset your password" %}
diff --git a/app/themes/base/templates/email/signup_verify.html b/app/themes/base/templates/email/signup_verify.html
deleted file mode 100644
index 93ff38ff..00000000
--- a/app/themes/base/templates/email/signup_verify.html
+++ /dev/null
@@ -1,6 +0,0 @@
-{% load i18n %}
-{% block main %}
-{% trans "Hey there, thanks for creating your account." %}
-{% trans "Please use the link below to activate it." %}
-http://{{ request.get_host }}{{ verify_url }}
-{% endblock %}
diff --git a/app/themes/base/templates/email/signup_verify.txt b/app/themes/base/templates/email/signup_verify.txt
deleted file mode 100644
index 491d0124..00000000
--- a/app/themes/base/templates/email/signup_verify.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-{% load i18n %}
-{% block main %}
-{% trans "Hey there, thanks for creating your account." %}
-{% trans "Please use the link below to activate it." %}
-http://{{ request.get_host }}{{ verify_url }}
-{% endblock %}
diff --git a/app/themes/base/templates/email/signup_verify_subject.txt b/app/themes/base/templates/email/signup_verify_subject.txt
deleted file mode 100644
index 54999b2f..00000000
--- a/app/themes/base/templates/email/signup_verify_subject.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-{% load i18n %}
-{% trans "Activate your account" %}
diff --git a/app/themes/base/templates/errors/404.html b/app/themes/base/templates/errors/404.html
deleted file mode 100644
index 2857ebbb..00000000
--- a/app/themes/base/templates/errors/404.html
+++ /dev/null
@@ -1,21 +0,0 @@
-{% extends "pages/page.html" %}
-
-{% load i18n %}
-
-{% block meta_title %}
- {% trans "Page not found" %}
-{% endblock %}
-
-{% block page_class %}
- custompage
-{% endblock %}
-
-{% block page_title %}
- {% trans "Page not found" %}
-{% endblock %}
-
-{% block page_content %}
-
- {% trans "The page you requested does not exist." %}
-
-{% endblock %}
diff --git a/app/themes/base/templates/errors/500.html b/app/themes/base/templates/errors/500.html
deleted file mode 100644
index 2eaca3f4..00000000
--- a/app/themes/base/templates/errors/500.html
+++ /dev/null
@@ -1,32 +0,0 @@
-{% extends "base.html" %}
-
-{% load i18n %}
-
-{% block meta_title %}
-{% trans "Error" %}
-{% endblock %}
-
-{% block title %}
-{% trans "Error" %}
-{% endblock %}
-
-{% block main %}
-
-
{% trans "Error" %}
-
{% trans "Sorry, an error occurred." %}
-
-{% endblock %}
-
-{% block page_class %}
- custompage
-{% endblock %}
-
-{% block page_title %}
- {% trans "Error" %}
-{% endblock %}
-
-{% block page_content %}
-
- {% trans "Sorry, an error occurred." %}
-
-{% endblock %}
diff --git a/app/themes/base/templates/generic/comments.html b/app/themes/base/templates/generic/comments.html
deleted file mode 100644
index bf113a8b..00000000
--- a/app/themes/base/templates/generic/comments.html
+++ /dev/null
@@ -1,18 +0,0 @@
-{% extends "base.html" %}
-
-{% load mezzanine_tags comment_tags keyword_tags %}
-
-{% block meta_title %}{{ obj }}{% endblock %}
-
-{% block meta_keywords %}{% metablock %}
-{% keywords_for obj as tags %}
-{% for tag in tags %}{% if not forloop.first %}, {% endif %}{{ tag }}{% endfor %}
-{% endmetablock %}{% endblock %}
-
-{% block meta_description %}{% metablock %}
-{{ obj.description }}
-{% endmetablock %}{% endblock %}
-
-{% block main %}
-{% comments_for obj %}
-{% endblock %}
diff --git a/app/themes/base/templates/generic/includes/comment.html b/app/themes/base/templates/generic/includes/comment.html
deleted file mode 100644
index 260d52ca..00000000
--- a/app/themes/base/templates/generic/includes/comment.html
+++ /dev/null
@@ -1,73 +0,0 @@
-{% load i18n mezzanine_tags comment_tags rating_tags %}
-
-{% for comment in comments_for_thread %}
-
-
{{ comment.user_name }} - {% else %} -
-
-
- {% rating_for comment %}
-
- {% endif %}
-
-
- {% else %}
- {% endif %}
- {% endeditable %}
-
{{ comment.user_name }} - {% endif %} - - {% blocktrans with sometime=comment.submit_date|timesince %}{{ sometime }} ago{% endblocktrans %} - -
-{{ comment.comment|comment_filter }}
- {% endif %} - - {% if not comment.is_removed and comment.is_public %} - - {% trans "Link" %} - | - - {% trans "Reply" %} - - {% if settings.COMMENTS_USE_RATINGS %} -- {% if comment.is_removed %} - {% trans "Comment deleted" %} - {% else %} - {% trans "Comment awaiting approval" %} - {% endif %} - {% blocktrans with sometime=comment.submit_date|timesince %}{{ sometime }} ago{% endblocktrans %} -
- {% endif %} - - {% comment_thread comment %} - - {% if not comment.is_removed and comment.is_public or request.user.is_staff %}{% trans "There are currently no comments" %}
-{% endif %} - diff --git a/app/themes/base/templates/generic/includes/comments.html b/app/themes/base/templates/generic/includes/comments.html deleted file mode 100644 index 56932e3f..00000000 --- a/app/themes/base/templates/generic/includes/comments.html +++ /dev/null @@ -1,29 +0,0 @@ -{% load i18n mezzanine_tags comment_tags %} -{% trans "Comments" %}
-{% if settings.COMMENTS_DISQUS_SHORTNAME %} -{% include "generic/includes/disqus_comments.html" %} -{% else %} - - -{% comment_thread object_for_comments %} -{% trans "New Comment" %}
- -{% endif %} -- -
-{{ title }}
-{{ description|truncatechars:100 }}
- -- {% for slider in home.dynamiccontenthomeslider_set.all %} - {% with slider.content_object.images.all|get_type:'slider' as images %} - {% if images %} --
-
-
-
-
-
-
-
-
-
-
-
-
- {% if slider.content_object.prices.all.0|floatformat != '0' and slider.content_object.prices.all|length > 0 %}
- {% for price in slider.content_object.prices.all %}
- {% if forloop.first %}
-
-
-
- {% endif %}
- {% endfor %}
- {% endif %}
-
-
-
-
-
- {% trans 'News' %}
-
- {% elif slider.content_type.model == 'event' %}
- {% if slider.content_object.category %}
-
- {{ slider.content_object.category }}
-
- {% endif %}
- {% elif slider.content_type.model == 'media' %}
-
- {{ slider.content_object|get_media_type }}
-
- {% endif %}
-
-
- {% if slider.content_type.model != 'event' %}
- {{ slider.content_object.sub_title }}
- {% endif %}
- {% if slider.content_object.start %}
- {% with slider.content_object as event %}
- {% if slider.content_object.sub_title %}
-
-
- {{ slider.content_object.description|richtext_filters|safe|truncatechars_html:200 }}
-
-
-
-
-
-
-
-
-
-
- {% endif %}
- {% endwith %}
-
- {% endfor %}
-
-{{ slider.content_object.title }}
- - {% if slider.content_type.model == 'article' %} -- {% endif %} - {% include 'agenda/includes/event_date_slider.html' %} - {% endwith %} - {% endif %} - {% if slider.content_object.location %} -
{{ slider.content_object.location }} - {% endif %} -
- {% for link in host_organization.links.all %} --
- {{ link.title }}
-
- {% endfor %}
-
- -- {% if field.label %}{% endif %} - {% if field.help_text %} - {{ field.help_text }} - {% endif %} - {{ field }} -
- {% if field.errors %} -- {% for e in field.errors %} - {% if not forloop.first %} / {% endif %}{{ e }} - {% endfor %} -
- {% endif %} -Headings
- -Heading 1
-Heading 2
-Heading 3
-Heading 4
-Heading 5
-Heading 6
- -- -
Headings with Text
- -Heading 1
-Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.
-Heading 2
-Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.
-Heading 3
-Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.
-Heading 4
-Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.
-Heading 5
-Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.
-Heading 6
-Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.
- -- -
Block Elements
- -Paragraphs and Images
- -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu volutpat enim diam eget metus. Maecenas ornare tortor.
- -
- -Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem.
- -Blockquote
- -This is a standard paragraph. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
- -This is a standard paragraph. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
- -Figure-Caption
- -Details-Summary
- -The summary element example
-The details example text. It may be styled differently based on what browser or operating system you are using.
-- -
Text Elements
- -The a element and external a element examples
-The abbr element and an abbr element with title examples
-The ACRONYM element example
-The b element example
-The cite element example
-The
-code element
exampleThe data element example
-The
-del elementexampleThe dfn element and dfn element with title examples
-The em element example
-The i element example
-The ins element example
-The kbd element example
-The mark element example
-The
- exampleThe
- exampleThe
-s elementexampleThe samp element example
-The small element example
-The span element example
-The strong element example
-The sub element example
-The sup element example
-The example
-The u element example
-The var element example
- -- -
Monospace / Preformatted
-Code block wrapped in "pre" and "code" tags
- -Monospace Text wrapped in "pre" tags
- -- -
List Types
- -Ordered List
--- List Item 1
- - List Item 2
- - List Item 3
-
- - List Item 4
-
- --- List Item 3.1
- - List Item 3.2
-
- - List Item 3.3
-
--- List Item 3.2.1
- - List Item 3.2.2
-
-Unordered List
--- List Item 1
- - List Item 2
- - List Item 3
-
- - List Item 4
-
- --- List Item 3.1
- - List Item 3.2
-
- - List Item 3.3
-
--- List Item 3.2.1
- - List Item 3.2.2
-
-Definition List
--- Definition Term 1
- - Definition Description 1
- - Definition Term 2
- - Definition Description 2
-
- -- -
Tables
- -- -
Media
- -The Audio Element:
- - -The Video Element:
- - -Embedded content:
-YouTube video (iframe):
- - -- -
Form Elements
- -The Fieldset:
- diff --git a/app/themes/base/templates/includes/instagram.html b/app/themes/base/templates/includes/instagram.html deleted file mode 100644 index 859eb96c..00000000 --- a/app/themes/base/templates/includes/instagram.html +++ /dev/null @@ -1,12 +0,0 @@ -{% load instagram_client %} - -{% instagram_user_recent_media ircam_paris %} - -- - {% if current_page.has_previous %} --
-
- {% trans 'Previous page' %}
-
-
- {% endif %}
-
- {% for page in current_page.visible_page_range %}
- -
- {{ page }}
-
- {% endfor %}
-
- {% if current_page.has_next %}
- -
-
- {% trans 'Next page' %}
-
-
- {% endif %}
-
-
---
-
-
- -
-
-
- -
-
-
- -
-
-
- {% if is_event %}
- -
-
-
-
-
- -
-
-
-
-
- {% endif %}
-
diff --git a/app/themes/base/templates/includes/sidebar.html b/app/themes/base/templates/includes/sidebar.html deleted file mode 100644 index d3fbd0e1..00000000 --- a/app/themes/base/templates/includes/sidebar.html +++ /dev/null @@ -1,7 +0,0 @@ -{% load i18n pages_tags mezzanine_tags staticfiles keyword_tags event_tags %} - -- {% featured_events as events %} - {% for event in events %} --
-
-
-
-
-
- {% endfor %}
-
-- {{ event.title }} -
- {% include "agenda/includes/event_metainfo_slider.html" %} -Twitter
- Â - -{% endifinstalled %} - {% include "accounts/includes/user_panel.html" %} - {% endifinstalled %} -
{% trans "Candidacies" %}
-{% endblock %} - -{% block page_content %} - - {% if candidacy %} - - {% for content in candidacy %} - {% include "job/inc/candidacy_card.html" %} - {% endfor %} - - {% else %} - -{% trans "Please come back later. There is no candidacy at the moment." %}
- - {% endif %} - -{% endblock %} diff --git a/app/themes/base/templates/job/inc/candidacy_card.html b/app/themes/base/templates/job/inc/candidacy_card.html deleted file mode 100644 index 889269fc..00000000 --- a/app/themes/base/templates/job/inc/candidacy_card.html +++ /dev/null @@ -1,44 +0,0 @@ -{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} -{{ content.title }}
- {% endeditable %} - -- {% elif content.date_from %} - {% trans "From" %} {{ content.date_from|date:"DATE_FORMAT" }}
- {% elif content.date_to %} - {% trans "until" %}{{ content.date_to|date:"DATE_FORMAT" }}
- {% endif %} - {% endeditable %} -
- {% editable content.description %} - {{ content.description|safe }} - {% endeditable %} -
- {{ jo.title }} -
- -- {% endif %} - {% editable jo.description %} - {{ jo.description|slice:":255" }} - {% endeditable %} -
{{ job_offer.title }}
- {% endeditable %} - -{% endblock %} - -{% block page_content %} - - {% include "core/inc/messages.html" %} - - {% comment %} -{% trans "Category" %} : {{ job_offer.type }}
- {% endcomment %} - {% editable job_offer.content %} - {{ job_offer.content|richtext_filters|safe }} - {% endeditable %} - - - {% with form as job_offer.job_response %} - {% include "job/inc/job_response_form.html" %} - {% endwith %} -{% endblock %} diff --git a/app/themes/base/templates/job/job_offer_list.html b/app/themes/base/templates/job/job_offer_list.html deleted file mode 100644 index f0ebe1bb..00000000 --- a/app/themes/base/templates/job/job_offer_list.html +++ /dev/null @@ -1,32 +0,0 @@ -{% extends "pages/page.html" %} -{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} - -{% block meta_title %}{% trans "Jobs" %}{% endblock %} - -{% block meta_description %}{% metablock %} -{{ job_offer.description }} -{% endmetablock %}{% endblock %} - -{% block page_class %} - job_offer -{% endblock %} - -{% block page_title %} -{% trans "Jobs" %}
-{% endblock %} - -{% block page_content %} - - {% if job_offer %} - - {% for jo in job_offer %} - {% include "job/inc/job_offer_card.html" %} - {% endfor %} - - {% else %} - -{% trans "Please come back later. There is no job offer at the moment." %}
- - {% endif %} - -{% endblock %} diff --git a/app/themes/base/templates/magazine/article/article_detail.html b/app/themes/base/templates/magazine/article/article_detail.html deleted file mode 100644 index f6e3d351..00000000 --- a/app/themes/base/templates/magazine/article/article_detail.html +++ /dev/null @@ -1,113 +0,0 @@ -{% extends "pages/page.html" %} -{% load mezzanine_tags keyword_tags i18n organization_tags %} - -{% block meta_title %}{{ article.meta_title }}{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% keywords_for article as tags %} -{% for tag in tags %}{% if not forloop.first %}, {% endif %}{{ tag }}{% endfor %} -{% endmetablock %}{% endblock %} - -{% block meta_description %}{% metablock %} - {{ article.description }} -{% endmetablock %}{% endblock %} - -{% block page_class %} - article -{% endblock %} - -{% block body_class %} - {% if department_weaving_css_class %} - pattern pattern-bg {{ department_weaving_css_class }} - {% endif %} -{% endblock %} - -{% block page_title %} - - {% editable article.title %} -{{ article.title }}
- {% endeditable %} - - {% if article.sub_title %} - {% editable article.sub_title %} -{% trans "News" %}
-- - {{ brief.title }} - -
-- {{ brief.description }} -
- - - {{ brief.text_button }} -{{ brief.title }}
-{{ brief.description|truncatechars:100 }}
- {{ brief.text_button }} -{{content.content_object.title }}
-{{ topic.title }}
-{{ topic.description|slice:":255" }}
- -{{ topic.title }}
- {% endeditable %} -{{ media.title }}
- {% endeditable %} -{% endblock %} - - -{% block page_sidebar %} - ---
- {% for transcoded in media.transcoded.all %}
- {% if transcoded.mime_type == "audio/mp4" or transcoded.mime_type == "audio/mp3" %}
- {{ media.title }}{% if media.description %} {{ media.description }}{% endif %}
- {% endif %}
- {% endfor %}
-
-
- ---
-
-
- -
-
-
- -
-
-
-
-{{ media.title }}
- {% if media.description %} -- {{ media.description }} -
- {% endif %} - -- {% if audio_url %} - {{ audio }} - {% else %} - {{ audio }} - {% endif %} -
- {% if audio.description != audio|stringformat:"s" %} -{{ audio.description|truncatewords_html:200|safe }}
- {% endif %} - {% if audio_url %} - {% trans "read more" %} - {% endif %} --{% endwith %} diff --git a/app/themes/base/templates/media/inc/playlist_audio_card.html b/app/themes/base/templates/media/inc/playlist_audio_card.html deleted file mode 100644 index 4accaa95..00000000 --- a/app/themes/base/templates/media/inc/playlist_audio_card.html +++ /dev/null @@ -1,20 +0,0 @@ -{% load mezzanine_tags keyword_tags i18n organization_tags staticfiles %} - -
{{ playlist.title }}
-{{playlist.title}}
-{% endif %} -{% if playlist.description %} -- {{playlist.description}} -
-{% endif %} - - - -- {% for media in playlist.medias.all %} --
- {% with media.media as media %}
- {% for transcoded in media.transcoded.all %}
- {% if transcoded.mime_type == "audio/mp4" or transcoded.mime_type == "audio/mp3" %}
- {{ media.title }}{% if media.description %} {{ media.description }}{% endif %}
- {% endif %}
- {% endfor %}
- {% endwith %}
-
- {% endfor %}
-
diff --git a/app/themes/base/templates/media/inc/playlist_search.html b/app/themes/base/templates/media/inc/playlist_search.html deleted file mode 100644 index 898892bf..00000000 --- a/app/themes/base/templates/media/inc/playlist_search.html +++ /dev/null @@ -1,60 +0,0 @@ -{% extends "core/inc/search_card.html" %} -{% load i18n mezzanine_tags organization_tags %} - -{% block title %} - {{ result }} -{% endblock %} - -{% block icon %}file-{{playlist.type}}-o{% endblock %} - -{% block tags %} -- {% if playlist_url %} - {{ playlist.title }} - {% else %} - {{ playlist }} - {% endif %} -
- {% if playlist.description != playlist|stringformat:"s" %} -{{ playlist.description|truncatewords_html:200|safe }}
- {% endif %} - {% if playlist_url %} - {% trans "read more" %} - {% endif %} --{% endwith %} - -{% block image %} - {% if playlist.medias.all.0.media.poster_url %} - -
{{ media.content_object.title }}
- - {% if media.content_object.description %} -{{ media.content_object.description|truncatechars:100 }}
- {% endif %} - - {% comment %} - {% if media.content_object.poster_url %} -{% trans 'View all medias' %}
- -{{ playlist.title }}
-{{playlist.title}}
-{% endif %} -{% if playlist.description %} -- {{playlist.description}} -
-{% endif %} - -- {% endif %} - {% spaceless %} -- {{ media.title }}{% if media.description %} {{ media.description }}{% endif %}
- {% endspaceless %}
- {% if forloop.last %}
-
- {% endif %} - {% endwith %} -{% endfor %} diff --git a/app/themes/base/templates/media/inc/playlist_video_slider.html b/app/themes/base/templates/media/inc/playlist_video_slider.html deleted file mode 100644 index a9672773..00000000 --- a/app/themes/base/templates/media/inc/playlist_video_slider.html +++ /dev/null @@ -1,45 +0,0 @@ -{% load mezzanine_tags %} - -{{playlist.title}}
-- {{playlist.description}} -
- {% endif %} -- {% for media in playlist.medias.all %} - {% with media.media as media %} --
-
-
-
-
-
- {{ media.title }}
-
-
-
- {% endwith %}
- {% endfor %}
-
-{{ object.title }}
- {% endeditable %} -{% endblock %} - -{% block page_sidebar %} -{% endblock %} - -{% block page_content %} -If YouTube streaming is not working, try HTML5 version by clicking here
- - {% else %} -Please fill youtube id
- {% endif %} - {% elif type == "html5" %} - {% if object.html5_url %} -If HTML5 streaming is not working, try Youtube version by clicking here
- - {% else %} -Please fill html5 live streaming url
- {% endif %} - {% endif %} -{{ object.title }}
-- {% include 'core/inc/logo.html' %} -
-{{ playlist.title }}
- {% endeditable %} -{% endblock %} - -{% block page_sidebar %} - -{% trans "Media" %}
- {% endeditable %} -{% endblock %} - -{% block meta_title %}{% trans "Media" %}{% endblock %} - -{% block page_sidebar %} ---
-
- {% trans 'audio' %}{% if current_type == 'audio' %} {% endif %}
-
-
- -
-
- {% trans 'video' %}{% if current_type == 'video' %} {% endif %}
-
-
-
- - -{% endblock %} - -{% block page_content %} -- {% if video_url %} - {{ video }} - {% else %} - {{ video }} - {% endif %} -
- {% if video.description != video|stringformat:"s" %} -{{ video.description|truncatewords_html:200|safe }}
- {% endif %} - {% if video_url %} - {% trans "read more" %} - {% endif %} --{% endwith %} diff --git a/app/themes/base/templates/media/video/video_detail.html b/app/themes/base/templates/media/video/video_detail.html deleted file mode 100644 index a6bf7da8..00000000 --- a/app/themes/base/templates/media/video/video_detail.html +++ /dev/null @@ -1,69 +0,0 @@ -{% extends "pages/page.html" %} -{% load mezzanine_tags keyword_tags i18n organization_tags %} - -{% block meta_title %}{% trans "Media" %}{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% keywords_for person as keywords %} -{% for keyword in keywords %} - {% if not forloop.first %}, {% endif %} - {{ keyword }} -{% endfor %} -{% endmetablock %}{% endblock %} - -{% block page_class %} - media -{% endblock %} - -{% block page_title %} - {% editable media.title %} -
{{ media.title }}
- {% endeditable %} -{% endblock %} - -{% block page_sidebar %} - -- {{ media.description }} -
- {% endif %} - -- {% spaceless %} -- {{ media.title }}
- {% endspaceless %}
-
- -{% endblock %} - -{% block page_video %} - -{% endblock %} diff --git a/app/themes/base/templates/media/video/video_overlay.html b/app/themes/base/templates/media/video/video_overlay.html deleted file mode 100644 index e3390dd3..00000000 --- a/app/themes/base/templates/media/video/video_overlay.html +++ /dev/null @@ -1,69 +0,0 @@ -{% load mezzanine_tags keyword_tags i18n organization_tags %} - -- {% spaceless %} -- {{ media.title }}
- {% endspaceless %}
-
- ---
-
-
- -
-
-
- -
-
-
-
-{{ media.title }}
- {% if media.description %} -- {{ media.description }} -
- {% endif %} - -{{ person_list_block.title }}
-{{ person_list_block.description }}
- {% endif %} - -{{ person_list_block.title }}
-{{ person_list_block.description }}
- {% endif %} - -{{ person.first_name }} {{ person.last_name }}
- - {% if person.description %} -{{ person.first_name }} {{ person.last_name }}
- - {% if person.description %} -- {% for organization in organizations %} --
-
-
-
- {{ organization.name }}
-
-
- {{ organization.city }}, {{ organization.country.name }}
-
-
- {{ organization.type }}, {{ organization.type.css_class }}
-
-
- {{ organization.description }}
-
-
-
- {% comment %}
- {{ organization.name }}
- {% endif %}
- {% endwith %}
-
-- {{ organization.lat }}
- {{ organization.lon }}
- {{ organization.city }}
- {{ organization.country.name }}
- - - {% with organization.links|get_type_link:'link' as links %} - {% if links %} - {{ links.first }} - {% endif %} - {% endwith %} -
- - {% with organization.images.all|get_type:'logo' as images %} - {% if images %} -
- {% endcomment %} - - {% endfor %} -
{% trans "Timesheet" %}
-{% endblock %} - -{% block page_content %} - - Back to dashboard - - - - -{% endblock %} diff --git a/app/themes/base/templates/network/person_activity_timesheet/person_activity_timesheet_list.html b/app/themes/base/templates/network/person_activity_timesheet/person_activity_timesheet_list.html deleted file mode 100644 index 31a3f230..00000000 --- a/app/themes/base/templates/network/person_activity_timesheet/person_activity_timesheet_list.html +++ /dev/null @@ -1,41 +0,0 @@ -{% extends "pages/page.html" %} -{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} - -{% block meta_title %}{% trans "Timesheet" %}{% endblock %} - -{% block page_class %} - time_sheet -{% endblock %} - -{% block page_title %} -{% trans "Timesheet" %}
-{% endblock %} - -{% block page_content %} - - Declare this month - {{ timesheets_by_project }} - {% if timesheets_by_year %} - {% for year_k, year_v in timesheets_by_year.items %} -{{ year_k }}
- {% for project_k, project_v in year_v.items %} -{{ project_k }}
-{% trans "No timesheet." %}
- - {% endif %} - -{% endblock %} diff --git a/app/themes/base/templates/network/person_detail.html b/app/themes/base/templates/network/person_detail.html deleted file mode 100644 index ffbd79de..00000000 --- a/app/themes/base/templates/network/person_detail.html +++ /dev/null @@ -1,162 +0,0 @@ -{% extends "pages/page.html" %} -{% load mezzanine_tags keyword_tags i18n organization_tags pages_tags %} - -{% block meta_title %}{{ person.meta_title }}{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% keywords_for person as keywords %} -{% for keyword in keywords %} - {% if not forloop.first %}, {% endif %} - {{ keyword }} -{% endfor %} -{% endmetablock %}{% endblock %} - -{% block page_class %} - person -{% endblock %} - -{% block breadcrumb_menu %} - {{ block.super }} -{{ person.title }}
- {% endeditable %} - - {% with person.images.all|get_type:'page_featured' as card_images %} - {% if card_images %} -{% trans 'Email' %} : {{ person_email }}
{% elif person.email %}{% trans 'Email' %} : {{ person.email|unspam }}
{% endif %} - - {% with person.activities.all as activities %} - {% if activities %} - {#{% trans 'Activities' %}
#} -- {% with activities.0 as activity %} --
- {% with activity.teams.all as teams %}
- {% with activity.organizations.all|is_not_host as organizations %}
- {% with activity.employers.all|is_not_host as employers %}
- {% if teams %}
- {% trans 'Team' %} :
- {% for team in teams %}
- {{ team.name }}
- {% if organizations %}({% for organization in organizations %}{{ organization.name }}{% if not forloop.last %}, {% endif %}{% endfor %})
- {% elif employers %}({% for employer in employers %}{{ employer.name }}{% if not forloop.last %}, {% endif %}{% endfor %}){% endif %}
-
- {% endwith %}
-
- {% endif %} - {% endwith %} - -{% endblock %} - -{% block page_related_content %} - -{% if related.event %} -- {% endfor %} - {% endif %} - {% endwith %} - {% endwith %} - {% endwith %} -
{% trans "Linked events" %}
-{% trans "Linked contents" %}
-{% trans 'Links' %}
- {% include 'core/inc/link.html' %} - {% endif %} - {% endwith %} -{% endblock %} diff --git a/app/themes/base/templates/network/person_detail_multiple_activities.html b/app/themes/base/templates/network/person_detail_multiple_activities.html deleted file mode 100644 index 0562294b..00000000 --- a/app/themes/base/templates/network/person_detail_multiple_activities.html +++ /dev/null @@ -1,109 +0,0 @@ -{% extends "pages/page.html" %} -{% load mezzanine_tags keyword_tags i18n organization_tags pages_tags %} - -{% block meta_title %}{{ person.meta_title }}{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% keywords_for person as keywords %} -{% for keyword in keywords %} - {% if not forloop.first %}, {% endif %} - {{ keyword }} -{% endfor %} -{% endmetablock %}{% endblock %} - -{% block page_class %} - person -{% endblock %} - -{% block breadcrumb_menu %} - {{ block.super }} -{{ person.title }}
- {% endeditable %} -{% endblock %} - -{% block page_content %} - {% editable person.bio %} - {{ person.bio|richtext_filters|safe }} - {% endeditable %} - -{% trans 'Email' %} : {{ person_email }}
- - {% if person.activities.all|length > 0 %} -{% trans 'Activities' %}
-- {% for activity in person.activities.all %} --
- {% comment %}
- {% if activity.function %}
- {% trans 'Function'%} : {{ activity.function }}
- {% endfor %}
-
- {% endif %} -{% endblock %} - -{% block page_sidebar %} - {% if person.images.all %} - {% with person.images.all|get_type:'page_featured' as images %} - {% if images.first %} -- {% endif %} - {% if activity.status %} - {% trans 'Status'%} : {{ activity.status }}
- {% endif %} - {% endcomment %} - {% with activity.teams.all as teams %} - {% if teams %} - {% trans 'Team' %} : - {% for team in teams %} - {{ team.name }}{% if not forloop.last %}, {% endif %} - {% endfor %} -
- {% endif %} - {% endwith %} - {% with activity.organizations.all as organizations %} - {% with activity.employers.all as employers %} - {% if organizations %} - {% trans 'Organization' %} : - {% for organization in organizations %} - {{ organization.name }}{% if not forloop.last %}, {% endif %} - {% endfor %} -
- {% elif employers %} - {% trans 'Organization' %} : - {% for employer in employers %} - {{ employer.name }}{% if not forloop.last %}, {% endif %} - {% endfor %} -
- {% endif %} - {% endwith %} - {% endwith %} - {% if activity.date_from or activity.date_to %} - {% if not activity.date_from and not activity.date_to|date_year_higher_than:10 %} - {% trans 'Period' %} : {% trans 'to' %} {{ activity.date_to }}
- {% elif not activity.date_to %} - {% trans 'Period'%} : {% trans 'from' %} {{ activity.date_from }}
- {% else %} - {% trans 'Period'%} : {% trans 'from' %} {{ activity.date_from }} {% if not activity.date_to|date_year_higher_than:10 %}{% trans 'to' %} {{ activity.date_to }}{% endif %}
- {% endif %} - {% endif %} -
{% trans 'Links' %}
- {% include 'core/inc/link.html' %} - {% endif %} - {% endwith %} -{% endblock %} diff --git a/app/themes/base/templates/network/person_list.html b/app/themes/base/templates/network/person_list.html deleted file mode 100644 index e69de29b..00000000 diff --git a/app/themes/base/templates/pages/custompage.html b/app/themes/base/templates/pages/custompage.html deleted file mode 100644 index cc0110fd..00000000 --- a/app/themes/base/templates/pages/custompage.html +++ /dev/null @@ -1,102 +0,0 @@ -{% extends "pages/page.html" %} -{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} - - {% with page.custompage as object %} - {% block page_class %} - custompage - {% endblock %} - - {% block body_class %} - {% with page.get_ascendants|last as top_level_parent %} - {% if top_level_parent.get_content_model.weaving_css_class %} - pattern pattern-bg {{ top_level_parent.get_content_model.weaving_css_class }} - {% endif %} - {% endwith %} - {% endblock %} - - {% block page_title %} - {% editable page.custompage.title %} -{{ page.custompage.title }}
- {% endeditable %} - {% endblock %} - - {% block page_content %} - - {% with page.get_ascendants|last as top_level_parent %} - {% if linked_organization_content and research_slug == top_level_parent.slug %} - {% include 'pages/page/includes/linked_organization_content.html' %} - {% endif %} - {% endwith %} - - {% if page.custompage.sub_title %} - {% editable page.custompage.sub_title %} -{{ page.departmentpage.sub_title }}
- {% endeditable %} - -{% endblock %} - -{% block page_content %} - - {{ linked_organization_content.all }} - {% if linked_organization_content and research_slug == page.departmentpage.slug %} - {% include 'pages/page/includes/linked_organization_content.html' %} - {% endif %} - - {% if page.departmentpage.content %} - {% editable page.departmentpage.content %} - {{ page.departmentpage.content|richtext_filters|safe }} - {% endeditable %} - {% endif %} - -{% endblock %} - -{% block page_audio %} - {% with page as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_slider %} - {% with page as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_video %} - {% with page as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_sub_content %} - {% with page.blocks.all as blocks %} - {% include "core/inc/block.html" %} - {% endwith %} -{% endblock %} diff --git a/app/themes/base/templates/pages/form.html b/app/themes/base/templates/pages/form.html deleted file mode 100644 index 24cfba82..00000000 --- a/app/themes/base/templates/pages/form.html +++ /dev/null @@ -1,73 +0,0 @@ -{% extends "pages/page.html" %} -{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} - -{% with page as object %} - - {% block page_class %} - custompage - {% endblock %} - - {% block body_class %} - {% with page.get_ascendants|last as top_level_parent %} - {% if top_level_parent.get_content_model.weaving_css_class %} - pattern pattern-bg {{ top_level_parent.get_content_model.weaving_css_class }} - {% endif %} - {% endwith %} - {% endblock %} - - {% block page_title %} - {% editable page.title %} -{{ page.title }}
- {% endeditable %} - {% endblock %} - - {% block page_content %} - -- {% endif %} - {% endif %} - {% if page.in_menu %} - {% if forloop.first and not page.parent.in_menu and not page.is_primary %} - {% endif %} --
- {{ page.title }}
-
- {% endif %}
- {% if page.is_primary %}
- {% if forloop.last %}
-
-
- {% endif %} - {% endif %} - {% endfor %} -{% endif %} -{% endspaceless %} diff --git a/app/themes/base/templates/pages/menus/admin.html b/app/themes/base/templates/pages/menus/admin.html deleted file mode 100644 index 13d48544..00000000 --- a/app/themes/base/templates/pages/menus/admin.html +++ /dev/null @@ -1,57 +0,0 @@ -{% load pages_tags i18n staticfiles mezzanine_tags organization_tags %} - -- {% for page in page_branch %} - {% ifchanged page.in_menus %} - {% for menu in page.in_menus %} - {% if page.branch_level == 0 %} --
-
-
- +
- -
-
- {% set_page_permissions page %}
- {% if page.perms.delete %}
-
- {% else %}
-
- {% endif %}
- {% if page.perms.change %}
- {{ page.title.strip|default:" " }}
- | {{ page.content_model }}
- {% else %}
- {{ page.title }}
- - {{ page.content_model }}
- {% endif %}
-
-
-
-
- {% if page.perms.add %}
-
- {% endif %}
-
-
-
- {% endfor %}
-
diff --git a/app/themes/base/templates/pages/menus/breadcrumb.html b/app/themes/base/templates/pages/menus/breadcrumb.html deleted file mode 100644 index bf40eaf8..00000000 --- a/app/themes/base/templates/pages/menus/breadcrumb.html +++ /dev/null @@ -1,31 +0,0 @@ -{% load i18n pages_tags %} - -{% if on_home %} --
{{ menu|get_mezzanine_menu_name }}
-- {% endif %} - {% endfor %} - {% endifchanged %} -
- {% if page.has_children %}{% page_menu page %}{% endif %} -
--
- {{ page.title }}
- {% if page.is_current %}
-
- {% endif %}
- {% if page.is_current_or_ascendant %}
- {% if page.has_children_in_menu %}
- {% page_menu page %}
- {% endif %}
- {% endif %}
- {% if page.is_primary and page.is_current_or_ascendant %}
-
- {% endif %} - {% endif %} - {% endfor %} - {% endif %} - {% if branch_level == 1 %} - {% for page in page_branch %} - {% if page.in_menu and page.in_menus|first %} -- {% include "pages/menus/current_tree_summary.html" %} -
- {% endif %} -- {% page_menu page %} -
-- {% include "pages/menus/current_tree_summary.html" %} -
- {% endif %} - {% if page.is_current_or_ascendant and not page.has_children_in_menu %} -- {% include "pages/menus/current_tree_summary.html" %} -
- {% endif %} -- {% endif %} - {% if page.in_menu and page.has_children_in_menu %} - {% if page.is_primary and page.is_current_or_ascendant %} --
- {% trans 'Home' %}
-
- {% endif %}
- {% if page.is_current_or_ascendant %}
- {% if page.has_children_in_menu %}
- {% page_menu page %}
- {% endif %}
- {% endif %}
- {% if page.is_primary and page.is_current_or_ascendant %}
- {% endif %}
- {% elif page.in_menu and current_page.in_menus == page.in_menus %}
- -
- {{page.title}}
-
- {% endif %}
- {% if forloop.last %}
-
- {% endif %} - {% endfor %} - {% endif %} - {% if branch_level == 1 %} - {% for page in page_branch %} -- {% page_menu page %} -
-- {% include "pages/menus/current_tree_summary.html" %} -
- {% endif %} - {% if page.is_current_or_ascendant and not page.has_children_in_menu %} -- {% include "pages/menus/current_tree_summary.html" %} -
- {% endif %} -- {% endif %} - {% if page.is_current_or_ascendant %} - {% if page.has_children_in_menu %} - {% page_menu page %} - {% endif %} - {% endif %} - {% if page.is_primary and page.is_current_or_ascendant %} -
- {% else %} -- {% include "pages/menus/current_tree_summary.html" %} -
- {% endif %} - {% endif %} - {% endif %} - {% endfor %} - {% elif branch_level == 1 %} - {% for page in page_branch %} - {% if page.is_current_or_ascendant and page.has_children_in_menu %} -- {% include "pages/menus/current_tree_summary.html" %} -
- {% endif %} - {% endfor %} - {% elif branch_level == 2 %} - {% for page in page_branch %} -- {% include "pages/menus/current_tree_summary.html" %} -
- {% endif %} -- {% for page in page_branch %} - {% if not has_home and page.is_primary and forloop.first %} --
- {% trans "Home" %}
-
- {% endif %}
- {% if page.in_menu %}
- -
- {{ page.title }}{% if page.has_children_in_menu %}{% endif %}
- {% if page.has_children_in_menu %}{% page_menu page %}{% endif %}
-
- {% endif %}
- {% endfor %}
-
- {% else %} -- {% for page in page_branch %} - {% if page.in_menu %} --
- {{ page.title }}
- {% if page.has_children_in_menu %}{% page_menu page %}{% endif %}
-
- {% endif %}
- {% endfor %}
-
- {% endif %} -{% endif %} -{% endspaceless %} diff --git a/app/themes/base/templates/pages/menus/footer_horizontal.html b/app/themes/base/templates/pages/menus/footer_horizontal.html deleted file mode 100644 index 8b849302..00000000 --- a/app/themes/base/templates/pages/menus/footer_horizontal.html +++ /dev/null @@ -1,25 +0,0 @@ -{% load i18n pages_tags staticfiles organization_tags %} -{% get_language_info_list for LANGUAGES as languages %} - -{% spaceless %} -{% if page_branch_in_menu %} - {% for page in page_branch %} - {% if page.is_primary %} - {% if forloop.first %} -- {% endif %} - {% endif %} - {% if page.in_menu %} --
- {{ page.title }}
-
- {% endif %}
-
- {% if page.is_primary %}
- {% if forloop.last %}
-
- {% endif %} - {% endif %} - {% endfor %} -{% endif %} -{% endspaceless %} diff --git a/app/themes/base/templates/pages/menus/footer_tree.html b/app/themes/base/templates/pages/menus/footer_tree.html deleted file mode 100644 index a1c8c99a..00000000 --- a/app/themes/base/templates/pages/menus/footer_tree.html +++ /dev/null @@ -1,31 +0,0 @@ -{% load i18n pages_tags %} - -{% spaceless %} -{% if page_branch_in_menu %} -- {% for page in page_branch %} - - {% if not has_home and page.is_primary and forloop.first %} --
- {% trans "Home" %}
-
- {% endif %}
-
- {% if page.in_menu %}
- -
- {{ page.title }}
- {# remove this if tag to always show all nav items #}
- {% if page.is_current_or_ascendant and page.has_children_in_menu %}
- {% page_menu page %}
- {% endif %}
-
- {% endif %}
-
- {% endfor %}
-
-{% endif %} -{% endspaceless %} diff --git a/app/themes/base/templates/pages/menus/footer_vertical.html b/app/themes/base/templates/pages/menus/footer_vertical.html deleted file mode 100644 index 2f58e8ff..00000000 --- a/app/themes/base/templates/pages/menus/footer_vertical.html +++ /dev/null @@ -1,25 +0,0 @@ -{% load i18n pages_tags staticfiles %} -{% get_language_info_list for LANGUAGES as languages %} - -{% spaceless %} -{% if page_branch_in_menu %} - {% for page in page_branch %} - {% if page.is_primary %} - {% if forloop.first %} -- {% endif %} - {% endif %} - {% if page.in_menu %} --
- {{ page.title }}
-
- {% endif %}
-
- {% if page.is_primary %}
- {% if forloop.last %}
-
- {% endif %} - {% endif %} - {% endfor %} -{% endif %} -{% endspaceless %} diff --git a/app/themes/base/templates/pages/menus/header.html b/app/themes/base/templates/pages/menus/header.html deleted file mode 100644 index d82a800b..00000000 --- a/app/themes/base/templates/pages/menus/header.html +++ /dev/null @@ -1,64 +0,0 @@ -{% load i18n pages_tags staticfiles mezzanine_tags organization_tags %} -{% get_language_info_list for LANGUAGES as languages %} - -{% spaceless %} -{% if page_branch_in_menu %} - {% for page in page_branch %} - {% if page.is_primary %} - {% if forloop.first %} ---
-
-
-
- -
-
- {% with host_organization.images|get_type:"logo_header" as images %}
- {% if images %}
- {% with images|first as img %}
-
- {% endwith %}
- {% endif %}
- {% endwith %}
-
-
- {% endif %}
- {% endif %}
- {% if page.in_menu %}
- {% if page.content_model == "link" %}
- {% with page.link.link_images.all|first as link_image %}
- {% if link_image %}
- -
-
-
- {% else %}
- -
- {{ page.title }}
-
- {% endif %}
- {% endwith %}
- {% else %}
- -
- {{ page.title }}
- {% if page.has_children_in_menu %}
- {% page_menu page "pages/menus/header_tree_primary.html" %}
- {% endif %}
-
- {% endif %}
- {% endif %}
- {% if page.is_primary %}
- {% if forloop.last %}
-
- -
- {% include "includes/languages.html" %}
-
- -
-
-
-
-
- {% endif %} - {% endif %} - {% endfor %} -{% endif %} -{% endspaceless %} diff --git a/app/themes/base/templates/pages/menus/header_tree_primary.html b/app/themes/base/templates/pages/menus/header_tree_primary.html deleted file mode 100644 index a0eb55e5..00000000 --- a/app/themes/base/templates/pages/menus/header_tree_primary.html +++ /dev/null @@ -1,31 +0,0 @@ -{% load i18n pages_tags mezzanine_tags media_tags organization_tags staticfiles %} -{% get_language_info_list for LANGUAGES as languages %} - -{% spaceless %} -{% if page_branch_in_menu %} -- {{ page.departmentpage.description|richtext_filters|safe|truncatechars:415 }} -
---
- {{ page.title }}
-
- {% endif %}
- {% if page.has_children_in_menu %}
- {% page_menu page "pages/menus/header_tree_secondary.html" %}
- {% endif %}
-
-
- {% endfor %} --- {% trans "Home" %}
- {% endif %}
-
- {% if page.is_current_or_ascendant and not page.is_current_child %}
- {% if page.has_children_in_menu %}{% page_menu page %}{% endif %}
- {% endif %}
-
- {% if page.is_current_child %}
- -
- {{ page.title }}
-
- {% endif %}
-
- {% if page.is_primary and forloop.last %}
-
- {% endif %} - -{% endfor %} -{% endif %} -{% endspaceless %} diff --git a/app/themes/base/templates/pages/menus/primary.html b/app/themes/base/templates/pages/menus/primary.html deleted file mode 100644 index e0be3193..00000000 --- a/app/themes/base/templates/pages/menus/primary.html +++ /dev/null @@ -1,20 +0,0 @@ -{% load pages_tags i18n %} - -{% spaceless %} -- {% for page in page_branch %} - {% if not has_home and page.is_primary and forloop.first %} --
- {% trans "Home" %}
-
- {% endif %}
- {% if page.in_menu %}
- -
- {{ page.title }}
-
- {% endif %}
- {% endfor %}
-
-
-{% endspaceless %} diff --git a/app/themes/base/templates/pages/menus/tree.html b/app/themes/base/templates/pages/menus/tree.html deleted file mode 100644 index 36108084..00000000 --- a/app/themes/base/templates/pages/menus/tree.html +++ /dev/null @@ -1,26 +0,0 @@ -{% load i18n pages_tags %} - -{% spaceless %} -{% if page_branch_in_menu %} -- {% for page in page_branch %} - {% if not has_home and page.is_primary and forloop.first %} --
- {% trans "Home" %}
-
- {% endif %}
- {% if page.in_menu %}
- -
- {{ page.title }}
- {# wrap the next line with 'if page.is_current_or_ascendant' #}
- {# to only show child pages in the menu for the current page #}
- {% if page.has_children_in_menu %}{% page_menu page %}{% endif %}
-
- {% endif %}
- {% endfor %}
-
-{% endif %} -{% endspaceless %} diff --git a/app/themes/base/templates/pages/menus/vous_etes.html b/app/themes/base/templates/pages/menus/vous_etes.html deleted file mode 100644 index b9f5a902..00000000 --- a/app/themes/base/templates/pages/menus/vous_etes.html +++ /dev/null @@ -1,26 +0,0 @@ -{% load pages_tags mezzanine_tags i18n %} - -{% if page_branch_in_menu %} - {% nevercache %} - ---
- {% trans "You are" %}
-
- {% for page in page_branch %}
- {% if page.in_menu %}
- -
- {{ page.title }}
-
- {% endif %}
- {% endfor %}
-
- {% endnevercache %} -{% endif %} diff --git a/app/themes/base/templates/pages/mutations-creations.html b/app/themes/base/templates/pages/mutations-creations.html deleted file mode 100644 index 4d5f352e..00000000 --- a/app/themes/base/templates/pages/mutations-creations.html +++ /dev/null @@ -1,106 +0,0 @@ -{% extends "pages/page.html" %} -{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} - - {% with page.custompage as object %} - {% block page_class %} - custompage - {% endblock %} - - {% block body_class %} - {% with page.get_ascendants|last as top_level_parent %} - {% if top_level_parent.get_content_model.weaving_css_class %} - pattern pattern-bg {{ top_level_parent.get_content_model.weaving_css_class }} - {% endif %} - {% endwith %} - {% endblock %} - - {% block hero %} - {% include "home/inc/hero-small.html" %} - {% endblock %} - - {% block page_title %} - {% editable page.custompage.title %} -{{ page.custompage.title }}
- {% endeditable %} - {% endblock %} - - {% block page_content %} - - {% with page.get_ascendants|last as top_level_parent %} - {% if linked_organization_content and research_slug == top_level_parent.slug %} - {% include 'pages/page/includes/linked_organization_content.html' %} - {% endif %} - {% endwith %} - - {% if page.custompage.sub_title %} - {% editable page.custompage.sub_title %} -{% trans "Newsletter" %}
-{% endblock %} - -{% block page_content %} - -{% trans "Sign up for our monthly newsletter to keep up to date with the institute's activities every month and be eligible to take advantage of special offers from our partners." %}
- - -{% endblock %} diff --git a/app/themes/base/templates/pages/page.html b/app/themes/base/templates/pages/page.html deleted file mode 100644 index 3e3fd0b7..00000000 --- a/app/themes/base/templates/pages/page.html +++ /dev/null @@ -1,174 +0,0 @@ -{% extends "base.html" %} -{% load i18n mezzanine_tags keyword_tags organization_tags pages_tags %} - -{% block meta_title %}{{ page.meta_title }}{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% keywords_for page as keywords %} -{% for keyword in keywords %} - {% if not forloop.first %}, {% endif %} - {{ keyword }} -{% endfor %} -{% endmetablock %}{% endblock %} - -{% block meta_description %}{% metablock %} -{{ page.description }} -{% endmetablock %}{% endblock %} - -{% block main %} - - {% block hero %} - {% endblock %} - -- {% include 'core/inc/logo.html' %} -
-- {% for loc in linked_organization_content %} - {% if loc.images.all %} - {% with loc.images|get_type:"logo_black"|first as img %} --
-
-
-
-
- {% endwith %}
- {% endif %}
- {% endfor %}
-
-- {% for lof in linked_organization_footer_2 %} --
- {{ lof.name}}
-
- {% endfor %}
-
diff --git a/app/themes/base/templates/pages/page/includes/page_box.html b/app/themes/base/templates/pages/page/includes/page_box.html deleted file mode 100644 index e02485bb..00000000 --- a/app/themes/base/templates/pages/page/includes/page_box.html +++ /dev/null @@ -1,24 +0,0 @@ -{% load mezzanine_tags organization_tags %} - -{{ object.title }}
-{{ page.projecttopicpage.title }}
- {% endeditable %} -{% endblock %} - -{% block page_content %} - {% with page.get_ascendants|last as top_level_parent %} - {% if linked_organization_content and research_slug == top_level_parent.slug %} - {% include 'pages/page/includes/linked_organization_content.html' %} - {% endif %} - {% endwith %} - - {% if page.projecttopicpage.sub_title %} - {% editable page.projecttopicpage.sub_title %} -{{ sub_topic.name }}
- {% if sub_topic.description %} -- {{ sub_topic.description }} -
- {% endif %} - {% if sub_topic.projects.all %} -- - {{ project }} - -
-- {{ project.description }} -
- -{{ page.title }}
- {% endeditable %} -{% endblock %} - -{% block page_content %} - {% with page.get_ascendants|last as top_level_parent %} - {% if linked_organization_content and research_slug == top_level_parent.slug %} - {% include 'pages/page/includes/linked_organization_content.html' %} - {% endif %} - {% endwith %} - {% if page.teampage.sub_title %} - {% editable page.teampage.sub_title %} --
{% trans "Research topics and related projects" %}
- {% include 'projects/inc/project_list.html' %} -{% trans "European and national projects" %}
- {% with leader_projects as projects %} - {% include 'projects/inc/project_list.html' %} - {% endwith %} - {% with partner_projects as projects %} - {% include 'projects/inc/project_list.html' %} - {% endwith %} --
{% trans 'Team' %}
- {% for status in statuses %} - {% with page.teampage.team|get_team_persons:status as persons %} - {% if persons %} - {% if persons|length == 1 %}{{ status.name }}{% else %}{{ status.description }}{% endif %} : - {% for person in persons %} - {{ person.title }}{% if not forloop.last %}, {% endif %} - {% endfor %} -
- {% endif %} - {% endwith %} - {% endfor %} -
- {% endif %} -
{{ block.title }}
- {% endeditable %} - {% if block.description %} -- {% trans "Login" %} -
- {% endif %} -
- - {{ project }} - -
-- {{ project.description }} -
-{{ object.title }}
- {% endeditable %} - - {% if object.description %} - {% editable object.description %} -- {% trans "Login" %} -
{{ object.title }}
- {% endeditable %} - - {% with page.get_ascendants|last as top_level_parent %} - {% if linked_organization_content and research_slug == top_level_parent.slug %} - {% include 'pages/page/includes/linked_organization_content.html' %} - {% endif %} - {% endwith %} - - {% if object.description %} - {% editable object.description %} ---
- {% trans "Home" %}
-
- -
- {{ page.title }}
-
- -
- {{ object.title }}
-
-
-{% endblock %} - -{% block page_link %} - {% with object.links.all as links %} - {% if links %} - {% include 'core/inc/link.html' %} - {% endif %} - {% endwith %} -{% endblock %} - -{% block page_audio %} - {% with object as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_slider %} - {% with object as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_video %} - {% with object as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_sub_content %} - - {% if object.type == 'external' %} ---
-
-
-
--
{% trans "Project details" %}
- -{% trans "Participants" %}
- -- {% if organization.url %} - - {% endif %} - {% endfor %} -
- {% endif %} - {% endfor %} -
-
-- {{ demo.title }}
- {% endfor %}
-
-{% trans "Demos" %}
- {% for demo in object.demos.all %} --
-- {{ blog_page.title }}
- {% endfor %}
-
-{% trans "Blog Pages" %}
- {% for blog_page in object.blog_pages.all %} -- {% if object.lead_organization %} - {% with object.lead_organization.images.all|get_type:'logo' as images %} - {% include 'core/inc/logo.html' %} - {% endwith %} - {% endif %} - {% for organization in object.organizations.all %} - {% with organization.images.all|get_type:'logo' as images %} - {% include 'core/inc/logo.html' %} - {% endwith %} - {% endfor %} -
-{{ demo.title }}
- {% endeditable %} - - {% if demo.description %} - {% editable demo.description %} -- {% trans "Project" %} : {{ demo.project.title }}
- {% trans "Authors" %} : {% for author in demo.authors.all %}{{ author }}{% endfor %} - -{% endblock %} - -{% block page_sidebar %} -{% endblock %} - -{% block page_slider %} -
{{ object.title }}
- {% endeditable %} - - {% with page.get_ascendants|last as top_level_parent %} - {% if linked_organization_content and research_slug == top_level_parent.slug %} - {% include 'pages/page/includes/linked_organization_content.html' %} - {% endif %} - {% endwith %} - - {% if object.description %} - {% editable object.description %} ---
- {% trans "Home" %}
-
- -
- {{ page.title }}
-
- -
- {{ object.title }}
-
-
-{% endblock %} - -{% block page_link %} - {% with object.links.all as links %} - {% if links %} - {% include 'core/inc/link.html' %} - {% endif %} - {% endwith %} -{% endblock %} - -{% block page_audio %} - {% with object as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_slider %} - {% with object as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_video %} - {% with object as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_sub_content %} - - {% if object.type == 'external' %} ---
-
-
-
--
{% trans "Project details" %}
- -{% trans "Participants" %}
- -- {% if organization.url %} - - {% endif %} - {% endfor %} -
- {% endif %} - {% endfor %} -
-
-- {{ demo.title }}
- {% endfor %}
-
-{% trans "Demos" %}
- {% for demo in object.demos.all %} --
-- {{ blog_page.title }}
- {% endfor %}
-
-{% trans "Blog Pages" %}
- {% for blog_page in object.blog_pages.all %} -- {% if object.lead_organization %} - {% with object.lead_organization.images.all|get_type:'logo' as images %} - {% include 'core/inc/logo.html' %} - {% endwith %} - {% endif %} - {% for organization in object.organizations.all %} - {% with organization.images.all|get_type:'logo' as images %} - {% include 'core/inc/logo.html' %} - {% endwith %} - {% endfor %} -
-{% trans "New project form" %}
- {% endeditable %} -{% endblock %} - -{% block page_content %} -- {% for key,value in filter_dict.items %} --
-
- {{ value.verbose_name }} ({{ value.count }}){% if search_model == key %}{% endif %}
-
-
- {% endfor %}
-
-- {% if results.paginator.count == 0 %} - {% blocktrans %}No results were found matching your query: {{ query }}{% endblocktrans %} - {% endif %} -
- --{% url "login" as login_url %} -{% url "signup" as signup_url %} -{% with request.path as next %} -{% blocktrans %} -If you have an existing account or would like to create one, please -log in or -sign up. -{% endblocktrans %} -{% endwith %} -
-{% endifinstalled %} -{% endif %} - -{% errors_for form %} - - - - - -{% if not settings.SHOP_CHECKOUT_STEPS_SPLIT and settings.SHOP_PAYMENT_STEP_ENABLED %} -{% include "shop/includes/payment_fields.html" %} -{% endif %} - -{% fields_for form.other_fields %} - -{% endif %} -{% endblock %} diff --git a/app/themes/base/templates/shop/cart.html b/app/themes/base/templates/shop/cart.html deleted file mode 100644 index 2a817437..00000000 --- a/app/themes/base/templates/shop/cart.html +++ /dev/null @@ -1,113 +0,0 @@ -{% extends "shop/base.html" %} -{% load mezzanine_tags shop_tags i18n %} - -{% block meta_title %}{% trans "Your Cart" %}{% endblock %} -{% block title %}{% trans "Your Cart" %}{% endblock %} -{% block body_id %}cart{% endblock %} - -{% block breadcrumb_menu %} -{{ block.super }} -{% trans "You may also like:" %}
-{{ product }}
-{% trans "Your Cart is empty." %}
-{% endif %} -{% endblock %} diff --git a/app/themes/base/templates/shop/checkout.html b/app/themes/base/templates/shop/checkout.html deleted file mode 100644 index 554c6016..00000000 --- a/app/themes/base/templates/shop/checkout.html +++ /dev/null @@ -1,83 +0,0 @@ -{% extends "shop/base.html" %} -{% load shop_tags mezzanine_tags i18n %} - -{% block meta_title %}{% trans "Checkout" %} - {{ step_title }}{% endblock %} -{% block title %}{% trans "Checkout" %} - {% trans "Step" %} {{ step }} {% trans "of" %} {{ steps|length }}{% endblock %} -{% block body_id %}checkout{% endblock %} - -{% block extra_head %} - -{% endblock %} - -{% block breadcrumb_menu %} -{% for step in steps %} -- {% for item in request.cart %} --
- {% if item.image %}
-
- {% endif %}
-
- {{ item.quantity }} x {{ item.description }}
- {{ item.total_price|currency }}
-
-
- {% endfor %}
-
- {% order_totals %} -- {% trans "Edit Cart" %} -
{% trans "Thank you for shopping with us, your order is complete." %}
-{% trans "We've sent you a receipt via email." %}
-{% trans "You can also view your invoice using one of the links below." %}
-- -{% endblock %} diff --git a/app/themes/base/templates/shop/confirmation.html b/app/themes/base/templates/shop/confirmation.html deleted file mode 100644 index b87ee607..00000000 --- a/app/themes/base/templates/shop/confirmation.html +++ /dev/null @@ -1,80 +0,0 @@ -{% extends "shop/checkout.html" %} -{% load i18n shop_tags %} - -{% block fields %} -{% if request.cart.has_items %} - -
{% trans "Billing Details" %}
-- - {% for field, value in form.billing_detail_fields.values %} -- {{ value }}
- {% endfor %}
-
-
-{% trans "Shipping Details" %}
-- - {% for field, value in form.shipping_detail_fields.values %} -- {{ value }}
- {% endfor %}
-
- {% for field, value in form.additional_instructions_field.values %}
- - {{ value }}
- {% endfor %}
-
-
--
{% trans "Payment Details" %}
-- - {% for field, value in form.card_name_field.values %} -- {{ value }}
- {% endfor %}
-
- {% for field, value in form.card_type_field.values %}
- - {{ value }}
- {% endfor %}
-
- -
- {% with form.card_expiry_fields.values as expiry_fields %}
- {% with expiry_fields.next as month_field %}
- {{ month_field.1 }}/{{ expiry_fields.next.1 }}
- {% endwith %}
- {% endwith %}
-
-
- {% for field, value in form.card_fields.values %}
- - {{ value }}
- {% endfor %}
-
-
-- -{% for field in form %}{{ field }}{% endfor %} - -{% endif %} -{% endblock %} diff --git a/app/themes/base/templates/shop/includes/order_details.html b/app/themes/base/templates/shop/includes/order_details.html deleted file mode 100644 index b6aa60a3..00000000 --- a/app/themes/base/templates/shop/includes/order_details.html +++ /dev/null @@ -1,55 +0,0 @@ -{% load shop_tags i18n %} - -
{{ settings.SITE_TITLE }}
- -{% trans "Your Details" %}
-{% trans "Items Ordered" %}
-{{ settings.SITE_TITLE }}
- -{% trans "Your Details" %}
-{% trans "Items Ordered" %}
--
{{ list.title }}
- {% if list.description %} -{{ list.description }}
- {% endif %} -{{ product.title }}
- {% if product.description %} --
{{ list.title }}
- {% if list.description %} -{{ list.description }}
- {% endif %} -{{ product.title }}
- {% if product.description %} --
-{% if request.cart.total_quantity != 0 %} - - {% if request.session.order.step %}{% trans "Return to Checkout" %}{% else %}{% trans "Go to Checkout" %}{% endif %} -
-{% endif %} -{% if settings.SHOP_USE_WISHLIST %} - - -{% blocktrans count request.wishlist|length as wishlist_count %}Wishlist contains 1 item{% plural %} Wishlist contains {{ wishlist_count }} items{% endblocktrans %} -{% endif %} -{% endspaceless %} diff --git a/app/themes/base/templates/shop/order_history.html b/app/themes/base/templates/shop/order_history.html deleted file mode 100644 index cb319e07..00000000 --- a/app/themes/base/templates/shop/order_history.html +++ /dev/null @@ -1,51 +0,0 @@ -{% extends "shop/base.html" %} -{% load mezzanine_tags shop_tags i18n %} - -{% block meta_title %}{% trans "Order History" %}{% endblock %} -{% block title %}{% trans "Order History" %}{% endblock %} - -{% block breadcrumb_menu %} -{{ block.super }} -
{% trans "You have not ordered anything from us yet." %}
-{% endif %} - -{% endblock %} diff --git a/app/themes/base/templates/shop/order_invoice.html b/app/themes/base/templates/shop/order_invoice.html deleted file mode 100644 index 5dcda6c9..00000000 --- a/app/themes/base/templates/shop/order_invoice.html +++ /dev/null @@ -1,5 +0,0 @@ -{% if not LANGUAGE_BIDI %} - {% include "shop/includes/order_details.html" %} -{% else %} - {% include "shop/includes/order_details_rtl.html" %} -{% endif %} diff --git a/app/themes/base/templates/shop/order_invoice_pdf.html b/app/themes/base/templates/shop/order_invoice_pdf.html deleted file mode 100644 index da6b04fc..00000000 --- a/app/themes/base/templates/shop/order_invoice_pdf.html +++ /dev/null @@ -1 +0,0 @@ -{% extends "shop/order_invoice.html" %} diff --git a/app/themes/base/templates/shop/payment.html b/app/themes/base/templates/shop/payment.html deleted file mode 100644 index 6be458e6..00000000 --- a/app/themes/base/templates/shop/payment.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends "shop/checkout.html" %} -{% load i18n mezzanine_tags %} - -{% block fields %} -{% if request.cart.has_items %} -{% errors_for form %} -{% include "shop/includes/payment_fields.html" %} -{% fields_for form.other_fields %} -{% endif %} -{% endblock %} diff --git a/app/themes/base/templates/shop/product.html b/app/themes/base/templates/shop/product.html deleted file mode 100644 index 4ef715d0..00000000 --- a/app/themes/base/templates/shop/product.html +++ /dev/null @@ -1,159 +0,0 @@ -{% extends "shop/base.html" %} -{% load staticfiles mezzanine_tags shop_tags rating_tags i18n %} - -{% block meta_title %}{{ product.meta_title }}{% endblock %} -{% block body_id %}category{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% for keyword in product.keywords.all %} - {% if not forloop.first %}, {% endif %} - {{ keyword }} -{% endfor %} -{% endmetablock %}{% endblock %} - -{% block meta_description %}{% metablock %} -{{ product.description }} -{% endmetablock %}{% endblock %} - -{% block extra_css %} -{{ block.super }} - -{% endblock %} - -{% block extra_js %} -{{ block.super }} - - -{% endblock %} - -{% block extra_head %} -{{ block.super }} - - -{% endblock %} - -{% block breadcrumb_menu %} -{{ block.super }} -- {% for image in images %} --
-
-
-
-
- {% endfor %}
-
- -{% if images|length != 1 %} -- {% for image in images %} --
-
-
-
-
- {% endfor %}
-
-{% endif %} - -{% endspaceless %} -{% endif %} - -{% editable product.content %} -{{ product.content|richtext_filters|safe }} -{% endeditable %} - -{% if product.available and has_available_variations %} -- {% for variation in variations %} --
- {% if variation.has_price %}
- {% if variation.on_sale %}
- {{ variation.unit_price|currency }}
- {% trans "On sale:" %}
- {% endif %}
- {{ variation.price|currency }}
- {% else %}
- {% if has_available_variations %}
-
- {% trans "The selected options are currently unavailable." %}
-
- {% endif %}
- {% endif %}
-
- {% endfor %}
-
- -{% errors_for add_product_form %} - - -{% else %} -{% trans "This product is currently unavailable." %}
-{% endif %} - -{% if settings.SHOP_USE_RATINGS %} -{% trans "Related Products" %}
-{{ product }}
-{% trans "Your wishlist is empty." %}
--
{% trans "Continue Shopping" %}
-{% endif %} -{% endblock %} diff --git a/app/themes/base/templates/styles.html b/app/themes/base/templates/styles.html deleted file mode 100644 index 3f22f941..00000000 --- a/app/themes/base/templates/styles.html +++ /dev/null @@ -1,21 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} - -{% block meta_title %}{% trans "Styles" %}{% endblock %} - -{% block title %}{% trans "Styles" %}{% endblock %} - -{% block main %} - -{% trans "Styles" %}
-- {% for tweet in tweets %} --
-
- {% if tweet.retweeter_full_name %}
-
- {% else %}
-
- {% endif %}
-
-
-
-
- {% endfor %}
-
-{% endif %} diff --git a/app/themes/starts_eu/__init__.py b/app/themes/starts_eu/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/app/themes/starts_eu/templates/accounts/account_form.html b/app/themes/starts_eu/templates/accounts/account_form.html deleted file mode 100644 index baba904c..00000000 --- a/app/themes/starts_eu/templates/accounts/account_form.html +++ /dev/null @@ -1,25 +0,0 @@ -{% extends "starts_eu/pages/page.html" %} -{% load i18n mezzanine_tags %} - -{% block meta_title %} - {% trans "Login" %} -{% endblock %} - -{% block page_title %} -- {% if tweet.retweeter_full_name %} - {{ tweet.retweeter_full_name }} @{{ tweet.retweeter_user_name }} - {% else %} - {{ tweet.full_name }} @{{ tweet.user_name }} - {% endif %} - {% blocktrans with sometime=tweet.created_at|timesince %}{{ sometime }} ago{% endblocktrans %} -
-- {{ tweet.text|safe }}
-- {% comment %} - - {% endcomment %} -
{% trans "Login" %}
-{% endblock %} - -{% block page_content %} -{% errors_for form %} - -{% endblock %} diff --git a/app/themes/starts_eu/templates/accounts/account_login.html b/app/themes/starts_eu/templates/accounts/account_login.html deleted file mode 100644 index 70a79c0b..00000000 --- a/app/themes/starts_eu/templates/accounts/account_login.html +++ /dev/null @@ -1,28 +0,0 @@ -{% extends "accounts/account_form.html" %} -{% load i18n mezzanine_tags %} - -{% block meta_title %} - {% trans "Page not found" %} -{% endblock %} - -{% block page_class %} - custompage -{% endblock %} - -{% block page_title %} -{% trans "Login" %}
-{% endblock %} - -{% block page_content %} -{% if request.user.is_authenticated %} -{% trans "You're already logged in. If you'd like to log in as a different user, you'll need to log out first." %}
-{% else %} - {{ block.super }} - {% url "signup" as signup_url %} - {% url "mezzanine_password_reset" as password_reset_url %} - {% url "profile_update" as profile_update_url %} - {% block message %} - {% blocktrans %}You can also reset your password if you've forgotten it.
{% endblocktrans %} - {% endblock %} -{% endif %} -{% endblock %} diff --git a/app/themes/starts_eu/templates/accounts/account_password_reset.html b/app/themes/starts_eu/templates/accounts/account_password_reset.html deleted file mode 100644 index d9c35a63..00000000 --- a/app/themes/starts_eu/templates/accounts/account_password_reset.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends "accounts/account_login.html" %} -{% load i18n %} - -{% block page_content %} -{{ block.super }} -{% endblock %} - -{% block message %} -{% trans "Enter your username or email address and you'll receive an email with a link you need to click, in order to log in and change your password." %}
-{% endblock %} diff --git a/app/themes/starts_eu/templates/accounts/account_profile.html b/app/themes/starts_eu/templates/accounts/account_profile.html deleted file mode 100644 index d766e818..00000000 --- a/app/themes/starts_eu/templates/accounts/account_profile.html +++ /dev/null @@ -1,29 +0,0 @@ -{% extends "starts_eu/pages/page.html" %} -{% load i18n mezzanine_tags accounts_tags %} - -{% block meta_title %}{{ profile_user|username_or:"get_full_name" }}{% endblock %} -{% block title %}{{ profile_user|username_or:"get_full_name" }}{% endblock %} -{% block body_id %}account{% endblock %} - -{% block breadcrumb_menu %} -{{ block.super }} -{% trans "Update profile" %} - {% endif %} -
{{ profile_user.get_full_name }}
- {% for field, value in profile_user|profile_fields %} -{{ field }}
-{{ value|linebreaksbr }}
- {% endfor %} -{% trans "You're already logged in. If you'd like to create a new account, you'll need to log out first." %}
-{% else %} - {{ block.super }} - {% if settings.ACCOUNTS_APPROVAL_REQUIRED %} -{% trans "After signing up, your account will be reviewed for approval. You'll receive an email when your account is activated." %}
- {% elif settings.ACCOUNTS_VERIFICATION_REQUIRED %} -{% trans "After signing up, you'll receive an email with a link you need to click, in order to activate your account." %}
- {% endif %} -{% endif %} - -{% endblock %} diff --git a/app/themes/starts_eu/templates/accounts/includes/user_panel.html b/app/themes/starts_eu/templates/accounts/includes/user_panel.html deleted file mode 100644 index f26b08fd..00000000 --- a/app/themes/starts_eu/templates/accounts/includes/user_panel.html +++ /dev/null @@ -1,37 +0,0 @@ -{% load i18n mezzanine_tags accounts_tags %} - -{% if request.user.is_authenticated %} -- - {{ request.user|username_or:"email" }}
- - {% trans "Log out" %} - {% else %} - - {% trans "Log in" %} - - {% trans "Sign up" %} - {% endif %} -- {% for app in dropdown_menu_app_list %} --
- {% trans app.name %}
-
- {% endfor %}
-
- -{% if settings.USE_L10N and LANGUAGES|length > 1 %} -{% get_language_info_list for LANGUAGES as languages %} - -{% endif %} - -{% if dropdown_menu_sites and dropdown_menu_sites|length > 1 %} - -{% endif %} -- {% for model in app.models %} - {% if model.perms.add or model.perms.change or model.perms.custom %} -- {{ model.name }}
- {% endif %}
- {% endfor %}
-
-{% trans 'Recent Actions' %}
-{% trans 'My Actions' %}
- {% load log %} - {% get_admin_log 10 as admin_log for_user user %} - {% if not admin_log %} -{% trans 'None available' %}
- {% else %} -- {% for entry in admin_log %} -- {% if not entry.is_deletion %}{% endif %}{{ entry.object_repr }}{% if not entry.is_deletion %}{% endif %}
- {% endfor %}
-
- {% endif %} -{% filter capfirst %}{% trans entry.content_type.name %}{% endfilter %}
{% trans "Dashboard" %}
{% endblock %} - -{% block content %}{{ error }}
-{% endfor %} -{% endif %} -{% if no_site_permission %} -{% trans "You don't have permission to access the admin for this site." %}
-{% endif %} - - - -{% endblock %} - diff --git a/app/themes/starts_eu/templates/agenda/confirmation.html b/app/themes/starts_eu/templates/agenda/confirmation.html deleted file mode 100644 index 2ca77e0d..00000000 --- a/app/themes/starts_eu/templates/agenda/confirmation.html +++ /dev/null @@ -1,17 +0,0 @@ -{% extends "starts_eu/pages/page.html" %} -{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} - -{% block meta_title %}{% trans "Confirmation" %}{% endblock %} - - -{% block page_class %} - Confirmation -{% endblock %} - -{% block page_title %} -{% trans "Confirmation" %}
-{% endblock %} - -{% block page_content %} - -{% endblock %} diff --git a/app/themes/starts_eu/templates/agenda/event/includes/event_card.html b/app/themes/starts_eu/templates/agenda/event/includes/event_card.html deleted file mode 100644 index a948df61..00000000 --- a/app/themes/starts_eu/templates/agenda/event/includes/event_card.html +++ /dev/null @@ -1,74 +0,0 @@ -{% extends "core/inc/generic_card.html" %} -{% load i18n pages_tags mezzanine_tags media_tags organization_tags %} - -{% block metatitle %} - {{ object.title }} -{% endblock %} - -{% block title %} - {{ object.title }} -{% endblock %} - -{% block url %} - {{ object.get_absolute_url }} -{% endblock %} - -{% block image %} -{{ object.location }} - {% endif %} -{% endblock %} - -{% block btn %} - {% if object.prices.all.0|floatformat != '0' and object.prices.all|length > 0 %} - {% for price in object.prices.all %} - {% if forloop.first %} -
- {% include 'core/inc/logo.html' %} -
-{% trans "Back to events" %}
- {% include 'agenda/includes/event_linecard.html' %} -{% endblock %} - -{% block breadcrumb_menu %} - {{ block.super }} -- {% if event.trainings.all %} - {% trans "Trainers" %}
-- {% else %} - {% trans "Persons" %}
- {% endif %} -
{% trans "Events" %}
-{% trans "Past events" %}
-{{ location.title }}{% if location.room %} - {{ location.room }}{% endif %}
- {% endeditable %} -{% endblock %} - - - -{% block page_content %} - {% if location.description %} - {{Â location.description|safe }} - {% endif %} -{{ location.link }}
- -{% endblock %} - -{% block page_sidebar %} -- {{ location.address }} -
- - {% google_static_map location 900 300 15 %} - -- {% trans "Viewing events for the location" %} -
-- {% endfor %} -
- - {% if event.start and event.start|date:"H:i" != "23:59" %} - {{ event.start|time:"TIME_FORMAT" }} - {% endif %} - - {% else %} - - {% if event.start|date:"d.m.y" == event.end|date:"d.m.y" %} - {% if not periods %} - {{ event.start|date:"DATE_EVENT_FORMAT" }},
- - {% if event.end and event.end|date:"H:i" != "23:59" %} - {{ event.start|time:"TIME_FORMAT" }} - {{ event.end|time:"TIME_FORMAT" }} - {% else %} - {{ event.start|time:"TIME_FORMAT" }} - {% endif %} - {% else %} - {{ event.start|date:"DATE_EVENT_FORMAT" }},
- {% for period in periods %} - {% if period.date_to and period.date_to|date:"H:i" != "23:59" %} - {{ period.date_from|time:"TIME_FORMAT" }} - {{ period.date_to|time:"TIME_FORMAT" }} - {% else %} - {% if forloop.last or periods|length == 2 %} {% trans "and"%} {% elif not forloop.first %}, {% endif %} - {{ period.date_from|time:"TIME_FORMAT" }} - {% endif %} - {% endfor %} - {% endif %} - - {% elif event.start|date:"m.y" == event.end|date:"m.y" %} - {% if periods %} - {% with periods|same_time_in_periods as same_time_in_periods %} - {% for period in periods %} - {% if period.date_to and period.date_to|date:"H:i" != "23:59" %} - {{ period.date_from|date:"WEEK_DAY_FORMAT" }},
- {% if period|period_is_more_than_hours:4 %} - {{ period.date_from|time:"DATE_EVENT_FORMAT" }} {% trans "through" %} {{ period.date_to|time:"TIME_FORMAT" }} - {% else %} - {{ period.date_from|time:"TIME_FORMAT" }} - {% endif %} - {% else %} - {% if periods|length > 1 and not forloop.last %} - {{ period.date_from|date:"DATE_EVENT_FORMAT" }}{% if periods|length == 2 %} {% trans "and" %} {% else %},{% endif %} - {% else %} - {{ period.date_from|date:"DATE_EVENT_FORMAT" }}, - {% if periods|length > 1 and forloop.first %}{% trans "and" %}{% endif %} - {% endif %} - {% if same_time_in_periods and forloop.last %} - {{ period.date_from|time:"TIME_FORMAT" }} - {% elif not same_time_in_periods %} -
{{ period.date_from|time:"TIME_FORMAT" }} - {% endif %} - {% endif %} -
- {% endfor %} - {% endwith %} - {% else %} - {{ event.start|date:"WEEK_DAY_FORMAT" }} - {% if event.end|subtract:event.start|get_attr:"days" > 1 %} - {% trans "through" %} - {% else %} - {% trans "and" %} - {% endif %} - {{ event.end|date:"DATE_EVENT_FORMAT" }},
{{ event.start|time:"TIME_FORMAT" }} - {% if event.end and event.end|date:"H:i" != "23:59" %} - - {{ event.end|time:"TIME_FORMAT" }} - {% endif %} - {% endif %} - - {% else %} - {{ event.start|date:"DATE_EVENT_FORMAT" }} {% trans "through" %} {{ event.end|date:"DATE_EVENT_FORMAT" }},
- - {% if event.end and event.end|date:"H:i" != "23:59" %} - {{ event.start|time:"TIME_FORMAT" }} - {{ event.end|time:"TIME_FORMAT" }} - {% else %} - {{ event.start|time:"TIME_FORMAT" }} - {% endif %} - {% endif %} - - {% endif %} -{% endwith %} diff --git a/app/themes/starts_eu/templates/agenda/includes/event_date_card.html b/app/themes/starts_eu/templates/agenda/includes/event_date_card.html deleted file mode 100644 index 4aaa9a36..00000000 --- a/app/themes/starts_eu/templates/agenda/includes/event_date_card.html +++ /dev/null @@ -1,12 +0,0 @@ -{% load i18n %} -{% load event_tags %} - -{% if object.start and not object.end %} - {{ object.start|date:"l j F" }}
-{% else %} - {% if object.start|date:"d.m.y" == object.end|date:"d.m.y" %} - {{ object.start|date:"l j F" }}
- {% else %} - {{ object.start|date:"j F" }} {% trans "to" %} {{ object.end|date:"j F" }} - {% endif %} -{% endif %} diff --git a/app/themes/starts_eu/templates/agenda/includes/event_date_line.html b/app/themes/starts_eu/templates/agenda/includes/event_date_line.html deleted file mode 100644 index fa29a3db..00000000 --- a/app/themes/starts_eu/templates/agenda/includes/event_date_line.html +++ /dev/null @@ -1,59 +0,0 @@ -{% load event_tags pages_tags mezzanine_tags organization_tags i18n %} -{% with event.periods.all as periods %} - - {% if event.start and not event.end %} - {{ event.start|date:"DATE_EVENT_FORMAT" }} - - {% if event.start and event.start|date:"H:i" != "23:59" %} - {{ event.start|time:"TIME_FORMAT" }} - {% endif %} - - {% else %} - - {% if event.start|date:"d.m.y" == event.end|date:"d.m.y" %} - {% if not periods %} - {{ event.start|date:"DATE_EVENT_FORMAT" }} - - {% if event.end and event.end|date:"H:i" != "23:59" %} - {{ event.start|time:"TIME_FORMAT" }} - {{ event.end|time:"TIME_FORMAT" }} - {% else %} - {{ event.start|time:"TIME_FORMAT" }} - {% endif %} - {% else %} - {{ event.start|date:"DATE_EVENT_FORMAT" }} - {% for period in periods %} - {% if period.date_to and period.date_to|date:"H:i" != "23:59" %} - {{ period.date_from|time:"TIME_FORMAT" }} - {{ period.date_to|time:"TIME_FORMAT" }} - {% else %} - {% if forloop.last or periods|length == 2 %} {% trans "and"%} {% elif not forloop.first %}, {% endif %} - {{ period.date_from|time:"TIME_FORMAT" }} - {% endif %} - {% endfor %} - {% endif %} - - {% elif event.start|date:"m.y" == event.end|date:"m.y" %} - {{ event.start|date:"WEEK_DAY_FORMAT" }} - {% if event.end|subtract:event.start|get_attr:"days" > 1 %} - {% trans "through" %} - {% else %} - {% trans "and" %} - {% endif %} - {{ event.end|date:"DATE_EVENT_FORMAT" }} - {% if event.end and event.end|date:"H:i" != "23:59" %} - {{ event.start|time:"TIME_FORMAT" }} - {{ event.end|time:"TIME_FORMAT" }} - {% else %} - {{ event.start|time:"TIME_FORMAT" }} - {% endif %} - - {% else %} - {{ event.start|date:"DATE_EVENT_FORMAT" }} {% trans "through" %} {{ event.end|date:"DATE_EVENT_FORMAT" }} - - {% if event.end and event.end|date:"H:i" != "23:59" %} - {{ event.start|time:"TIME_FORMAT" }} - {{ event.end|time:"TIME_FORMAT" }} - {% else %} - {{ event.start|time:"TIME_FORMAT" }} - {% endif %} - {% endif %} - - {% endif %} -{% endwith %} diff --git a/app/themes/starts_eu/templates/agenda/includes/event_date_slider.html b/app/themes/starts_eu/templates/agenda/includes/event_date_slider.html deleted file mode 100644 index 6a41de20..00000000 --- a/app/themes/starts_eu/templates/agenda/includes/event_date_slider.html +++ /dev/null @@ -1,54 +0,0 @@ -{% load event_tags pages_tags mezzanine_tags organization_tags i18n %} -{% with event.periods.all as periods %} - - {% if event.start and not event.end %} - {{ event.start|date:"DATE_EVENT_FORMAT" }},
- - {% if event.start and event.start|date:"H:i" != "23:59" %} - {{ event.start|time:"TIME_FORMAT" }} - {% endif %} - - {% else %} - - {% if event.start|date:"d.m.y" == event.end|date:"d.m.y" %} - {% if not periods %} - {{ event.start|date:"DATE_EVENT_FORMAT" }},
- - {% if event.end and event.end|date:"H:i" != "23:59" %} - {{ event.start|time:"TIME_FORMAT" }} - {{ event.end|time:"TIME_FORMAT" }} - {% else %} - {{ event.start|time:"TIME_FORMAT" }} - {% endif %} - {% else %} - {{ event.start|date:"DATE_EVENT_FORMAT" }},
- {% for period in periods %} - {% if period.date_to and period.date_to|date:"H:i" != "23:59" %} - {{ period.date_from|time:"TIME_FORMAT" }} - {{ period.date_to|time:"TIME_FORMAT" }} - {% else %} - {% if forloop.last or periods|length == 2 %} {% trans "and"%} {% elif not forloop.first %}, {% endif %} - {{ period.date_from|time:"TIME_FORMAT" }} - {% endif %} - {% endfor %} - {% endif %} - - {% elif event.start|date:"m.y" == event.end|date:"m.y" %} - {{ event.start|date:"WEEK_DAY_FORMAT" }} - {% if event.end|subtract:event.start|get_attr:"days" > 1 %} - {% trans "through" %} - {% else %} - {% trans "and" %} - {% endif %} - {{ event.end|date:"DATE_EVENT_FORMAT" }} - - {% else %} - {{ event.start|date:"DATE_EVENT_FORMAT" }} {% trans "through" %} {{ event.end|date:"DATE_EVENT_FORMAT" }},
- - {% if event.end and event.end|date:"H:i" != "23:59" %} - {{ event.start|time:"TIME_FORMAT" }} - {{ event.end|time:"TIME_FORMAT" }} - {% else %} - {{ event.start|time:"TIME_FORMAT" }} - {% endif %} - {% endif %} - - {% endif %} -{% endwith %} diff --git a/app/themes/starts_eu/templates/agenda/includes/event_linecard.html b/app/themes/starts_eu/templates/agenda/includes/event_linecard.html deleted file mode 100644 index b8bad92b..00000000 --- a/app/themes/starts_eu/templates/agenda/includes/event_linecard.html +++ /dev/null @@ -1,80 +0,0 @@ -{% load i18n future mezzanine_tags event_tags keyword_tags disqus_tags organization_tags %} - -
{{ location.title }}{% if location.room %} - {{ location.room }}{% endif %}
- {% block event_detail_location %} -{{ location.address }}
-{% trans "Room" %} {{ event.location.room }}
-{{ location.link }}
-{{Â location.description|safe }}
- - {% google_static_map location 900 300 15 %} -- {% trans "Click to get the interactive map" %} -
- {% trans "Viewing events for the location" %} - {% endblock %} -
{{ training.get_language_display }}
- {% comment %} -{{ training.public_type }}
- {% endcomment %} -{{ training.level }}
- {% endif %} -{% endwith %} - -{% if event.brochure %} -- - {{ event.brochure.filename }} - -
-{% endif %} - -{% if unit_booking %} - {% if event.prices.all %} - {% if event.prices.all.0|floatformat != '0' %} - {% for price in event.prices.all %} - {% if forloop.first %} -- {% endif %} - {% if price.event_price_description.description %} - {{ price.event_price_description.description }} : - {% endif %} - {{ price.value|floatformat:"-2" }} {{ price.unit }} {% if not forloop.last %}
- {% endif %} - {% endfor %} - {% else %} -{% endif %} - {% if forloop.last %} -
- {{ event.no_price_comments }} -
- {% endif %} -- {% if event.trainings.all|length %} - {% with event.links.all as links %} - {% if links %} - - {% trans "Reserve" %} - - {% endif %} - {% endwith %} - {% else %} - - {% trans "Reserve" %} - - {% endif %} -
- {% endif %} -{% endif %} diff --git a/app/themes/starts_eu/templates/agenda/includes/event_metainfo_line.html b/app/themes/starts_eu/templates/agenda/includes/event_metainfo_line.html deleted file mode 100644 index 39ba95b8..00000000 --- a/app/themes/starts_eu/templates/agenda/includes/event_metainfo_line.html +++ /dev/null @@ -1,35 +0,0 @@ -{% load i18n mezzanine_tags event_tags organization_tags %} - -- {% if event.trainings.all|length %} - {% with event.links.all as links %} - {% if links %} - - {% trans "Reserve" %} - - {% endif %} - {% endwith %} - {% else %} - - {% trans "Reserve" %} - - {% endif %} -
- {% endif %} - -{% endif %} diff --git a/app/themes/starts_eu/templates/agenda/includes/event_metainfo_slider.html b/app/themes/starts_eu/templates/agenda/includes/event_metainfo_slider.html deleted file mode 100644 index fe8f1dd1..00000000 --- a/app/themes/starts_eu/templates/agenda/includes/event_metainfo_slider.html +++ /dev/null @@ -1,29 +0,0 @@ -{% load i18n mezzanine_tags event_tags %} -{% trans "Upcoming Events" %}
--{% for upcoming_event in upcoming_events %} --
-
-{% endfor %}
-
-{% endif %} -{% endblock %} - -{% block recent_events %} -{% recent_events 5 as recent_events %} -{% if recent_events %} -- {{ upcoming_event.title }} -
-{% trans "Recent Events" %}
-- {% for recent_event in recent_events %} --
-
- {% endfor %}
-
-{% endif %} -{% endblock %} - -{% block event_months %} -{% event_months as months %} -{% if months %} -- {{ recent_event.title }} -
-{% trans "Archive" %}
-{% for month in months %} - {% ifchanged month.date.year %} - {% if not forloop.first %}{% endif %} -{{ month.date.year }}
-- {% endifchanged %} --
-
- {% endfor %}
-
-{% endif %} -{% endblock %} - -{% block event_locations %} -{% event_locations as locations %} -{% if locations %} -- {{ month.date|date:"F" }} ({{ month.event_count }}) -
-{% trans "Locations" %}
--{% for location in locations %} --
-
-{% endfor %}
-
-{% endif %} -{% endblock %} - -{% block event_keywords %} -{% keywords_for mezzanine_agenda.event as tags %} -{% if tags %} -- {{ location }} ({{ location.event_count }}) -
-{% trans "Tags" %}
--{% for tag in tags %} --
-
-{% endfor %}
-
-{% endif %} -{% endblock %} - -{% comment %} -{% block event_authors %} -{% event_authors as authors %} -{% if authors %} -- {{ tag }} - ({{ tag.item_count }}) -
-{% trans "Authors" %}
--{% for author in authors %} --
-
-{% endfor %}
-
-{% endif %} -{% endblock %} - -{% block event_feeds %} -- {{ author.get_full_name|default:author.username }} - ({{ author.event_count }}) -
-{% trans "Feeds" %}
-{% if tag %} - {% trans "RSS" %} / - {% trans "Atom" %} -{% endif %} -{% if location %} - {% trans "RSS" %} / - {% trans "Atom" %} -{% endif %} -{% if author %} - {% trans "RSS" %} / - {% trans "Atom" %} -{% endif %} -{% if not tag and not location and not author %} - {% trans "RSS" %} / - {% trans "Atom" %} -{% endif %} -{% endblock %} -{% endcomment %} diff --git a/app/themes/starts_eu/templates/base.html b/app/themes/starts_eu/templates/base.html deleted file mode 100644 index 1b61869e..00000000 --- a/app/themes/starts_eu/templates/base.html +++ /dev/null @@ -1,112 +0,0 @@ - - -{% load i18n pages_tags mezzanine_tags staticfiles keyword_tags event_tags organization_tags %} -{% get_language_info_list for LANGUAGES as languages %} - - - - - - -
- {% endif %} -
{{ block.title }}
-- {% trans "Downloads" %} -
--{% for file in files %} --
- {{ file.title }}
- {% if file.description %}
-
-{% endfor %}
-
diff --git a/app/themes/starts_eu/templates/core/inc/generic_card.html b/app/themes/starts_eu/templates/core/inc/generic_card.html deleted file mode 100644 index f3ebad5c..00000000 --- a/app/themes/starts_eu/templates/core/inc/generic_card.html +++ /dev/null @@ -1,32 +0,0 @@ -{% load i18n pages_tags mezzanine_tags media_tags organization_tags %} - - --
- {{ file.description }} -
- {% endif %} -- {% for link in links %} -- {% firstof link.title link.url%}
- {% endfor %}
-
diff --git a/app/themes/starts_eu/templates/core/inc/logo.html b/app/themes/starts_eu/templates/core/inc/logo.html deleted file mode 100644 index a3167990..00000000 --- a/app/themes/starts_eu/templates/core/inc/logo.html +++ /dev/null @@ -1,6 +0,0 @@ -{% load mezzanine_tags i18n %} -{% if images %} - {% for image in images %} -{% trans "Linked events" %}
-{% if object.related_title.title %}{{ object.related_title.title }}{% else %}{% trans "Also discover" %}{% endif %}
-{% if object.related_title.title %}{{ object.related_title.title }}{% else %}{% trans "Also discover" %}{% endif %}
-- {% block title %} - {% endblock %} - -
- - - {% block tags %} - {% endblock %} - - {% block subtitle %} - {% endblock %} - -- {% for image in slider_images %} --
-
-
-
- {{ image.title }}
- {% if image.description %}
- {{ image.description }}
- {% endif %}
- {% if image.credits %}
- {{ image.credits }}
- {% endif %}
-
-
-
- {% endfor %}
-
-{% trans "Hey there, a new account has been created and requires activation." %}
--
{% trans "Name" %}: {{ user.get_full_name }}
-{% trans "Email" %}: {{ user.email }}
-{% for field, value in user|profile_fields %} -{{ field }}: {{ value|linebreaksbr }}
-{% endfor %} --
{% trans "Please use the link below to activate it." %}
-http://{{ request.get_host }}{{ change_url }}
-{% endblock %} diff --git a/app/themes/starts_eu/templates/email/account_approve.txt b/app/themes/starts_eu/templates/email/account_approve.txt deleted file mode 100644 index 763f0ce7..00000000 --- a/app/themes/starts_eu/templates/email/account_approve.txt +++ /dev/null @@ -1,11 +0,0 @@ -{% load i18n accounts_tags %} -{% block main %} -{% trans "Hey there, a new account has been created and requires activation." %} - -{% trans "Name" %}: {{ user.get_full_name }} -{% trans "Email" %}: {{ user.email }} -{% for field, value in user|profile_fields %}{{ field }}: {{ value|linebreaksbr }} -{% endfor %} -{% trans "Please use the link below to activate it." %} -http://{{ request.get_host }}{{ change_url }} -{% endblock %} diff --git a/app/themes/starts_eu/templates/email/account_approve_subject.txt b/app/themes/starts_eu/templates/email/account_approve_subject.txt deleted file mode 100644 index 94b70f82..00000000 --- a/app/themes/starts_eu/templates/email/account_approve_subject.txt +++ /dev/null @@ -1,2 +0,0 @@ -{% load i18n %} -{% trans "An account requires activation" %} diff --git a/app/themes/starts_eu/templates/email/account_approved.html b/app/themes/starts_eu/templates/email/account_approved.html deleted file mode 100644 index 44642ab7..00000000 --- a/app/themes/starts_eu/templates/email/account_approved.html +++ /dev/null @@ -1,6 +0,0 @@ -{% load i18n %} -{% block main %} -{% trans "Hey there, your account has been activated." %}
-{% trans "Please use the link below to log in." %}
-http://{{ request.get_host }}{% url "login" %}
-{% endblock %} diff --git a/app/themes/starts_eu/templates/email/account_approved.txt b/app/themes/starts_eu/templates/email/account_approved.txt deleted file mode 100644 index 746cecc0..00000000 --- a/app/themes/starts_eu/templates/email/account_approved.txt +++ /dev/null @@ -1,6 +0,0 @@ -{% load i18n %} -{% block main %} -{% trans "Hey there, your account has been activated." %} -{% trans "Please use the link below to log in." %} -http://{{ request.get_host }}{% url "login" %} -{% endblock %} diff --git a/app/themes/starts_eu/templates/email/account_approved_subject.txt b/app/themes/starts_eu/templates/email/account_approved_subject.txt deleted file mode 100644 index e6ce5be5..00000000 --- a/app/themes/starts_eu/templates/email/account_approved_subject.txt +++ /dev/null @@ -1,2 +0,0 @@ -{% load i18n %} -{% trans "Your account has been activated" %} diff --git a/app/themes/starts_eu/templates/email/application_notification.html b/app/themes/starts_eu/templates/email/application_notification.html deleted file mode 100644 index b8c71773..00000000 --- a/app/themes/starts_eu/templates/email/application_notification.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - -Bonjour,
- -Une nouvelle candidature a été soumise :
-Nom : {{ last_name }}
-Prénom : {{ first_name }}
-Email :{{ email }}
-Message :
-{{ message }}
--
-
Le curriculum vitae ainsi que la lettre de motivation sont en pièces jointes.
-Ces informations sont disponibles sur le backoffice de http://www.ircam.fr dans l'édition de l'offre d'emploi correspondante.
- -Bonne journée ! :)
- - diff --git a/app/themes/starts_eu/templates/email/base.html b/app/themes/starts_eu/templates/email/base.html deleted file mode 100644 index 6030db4b..00000000 --- a/app/themes/starts_eu/templates/email/base.html +++ /dev/null @@ -1,3 +0,0 @@ -{% block main %}{% endblock %} - -http://{{ request.get_host }} diff --git a/app/themes/starts_eu/templates/email/base.txt b/app/themes/starts_eu/templates/email/base.txt deleted file mode 100644 index a8416a37..00000000 --- a/app/themes/starts_eu/templates/email/base.txt +++ /dev/null @@ -1,3 +0,0 @@ -{% block main %}{% endblock %} - -http://{{ request.get_host }} diff --git a/app/themes/starts_eu/templates/email/comment_notification.html b/app/themes/starts_eu/templates/email/comment_notification.html deleted file mode 100644 index faee5cf3..00000000 --- a/app/themes/starts_eu/templates/email/comment_notification.html +++ /dev/null @@ -1,17 +0,0 @@ -{% extends "email/starts_eu/base.html" %} -{% load i18n %} - -{% block main %} -
- {% trans "A new comment has been posted on" %} - {{ obj }} -
-- {% blocktrans with submit_date=comment.submit_date user_name=comment.user_name %} - At {{ submit_date }} {{ user_name }} wrote: - {% endblocktrans %} -
-- {{ comment.comment|linebreaksbr|urlize }} -
-{% endblock %} diff --git a/app/themes/starts_eu/templates/email/comment_notification.txt b/app/themes/starts_eu/templates/email/comment_notification.txt deleted file mode 100644 index d19ba84b..00000000 --- a/app/themes/starts_eu/templates/email/comment_notification.txt +++ /dev/null @@ -1,12 +0,0 @@ -{% extends "email/base.txt" %} -{% load i18n %} - -{% block main %} -A new comment has been posted on {{ obj }} [http://{{ request.get_host }}{{ comment_url }}] - -{% blocktrans with submit_date=comment.submit_date user_name=comment.user_name %} -At {{ submit_date }} {{ user_name }} wrote: -{% endblocktrans %} - -{{ comment.comment }} -{% endblock %} diff --git a/app/themes/starts_eu/templates/email/form_response.html b/app/themes/starts_eu/templates/email/form_response.html deleted file mode 100644 index 61d4af52..00000000 --- a/app/themes/starts_eu/templates/email/form_response.html +++ /dev/null @@ -1,13 +0,0 @@ -{% extends "email/starts_eu/base.html" %} - -{% block main %} -{% if message %}{{ message }}
{% endif %} -{% trans "Hey there, the password reset form was used for your account." %}
-{% trans "Please use the link below to log in and update your password." %}
-http://{{ request.get_host }}{{ verify_url }}
-{% trans "If you didn't request for your password to be reset, please ignore this email." %}
-{% endblock %} - diff --git a/app/themes/starts_eu/templates/email/password_reset_verify.txt b/app/themes/starts_eu/templates/email/password_reset_verify.txt deleted file mode 100644 index 48b52500..00000000 --- a/app/themes/starts_eu/templates/email/password_reset_verify.txt +++ /dev/null @@ -1,7 +0,0 @@ -{% load i18n %} -{% block main %} -{% trans "Hey there, the password reset form was used for your account." %} -{% trans "Please use the link below to log in and update your password." %} -http://{{ request.get_host }}{{ verify_url }} -{% trans "If you didn't request for your password to be reset, please ignore this email." %} -{% endblock %} diff --git a/app/themes/starts_eu/templates/email/password_reset_verify_subject.txt b/app/themes/starts_eu/templates/email/password_reset_verify_subject.txt deleted file mode 100644 index 72060ab7..00000000 --- a/app/themes/starts_eu/templates/email/password_reset_verify_subject.txt +++ /dev/null @@ -1,2 +0,0 @@ -{% load i18n %} -{% trans "Reset your password" %} diff --git a/app/themes/starts_eu/templates/email/signup_verify.html b/app/themes/starts_eu/templates/email/signup_verify.html deleted file mode 100644 index 93ff38ff..00000000 --- a/app/themes/starts_eu/templates/email/signup_verify.html +++ /dev/null @@ -1,6 +0,0 @@ -{% load i18n %} -{% block main %} -{% trans "Hey there, thanks for creating your account." %}
-{% trans "Please use the link below to activate it." %}
-http://{{ request.get_host }}{{ verify_url }}
-{% endblock %} diff --git a/app/themes/starts_eu/templates/email/signup_verify.txt b/app/themes/starts_eu/templates/email/signup_verify.txt deleted file mode 100644 index 491d0124..00000000 --- a/app/themes/starts_eu/templates/email/signup_verify.txt +++ /dev/null @@ -1,6 +0,0 @@ -{% load i18n %} -{% block main %} -{% trans "Hey there, thanks for creating your account." %} -{% trans "Please use the link below to activate it." %} -http://{{ request.get_host }}{{ verify_url }} -{% endblock %} diff --git a/app/themes/starts_eu/templates/email/signup_verify_subject.txt b/app/themes/starts_eu/templates/email/signup_verify_subject.txt deleted file mode 100644 index 54999b2f..00000000 --- a/app/themes/starts_eu/templates/email/signup_verify_subject.txt +++ /dev/null @@ -1,2 +0,0 @@ -{% load i18n %} -{% trans "Activate your account" %} diff --git a/app/themes/starts_eu/templates/errors/404.html b/app/themes/starts_eu/templates/errors/404.html deleted file mode 100644 index 3379f568..00000000 --- a/app/themes/starts_eu/templates/errors/404.html +++ /dev/null @@ -1,21 +0,0 @@ -{% extends "starts_eu/pages/page.html" %} - -{% load i18n %} - -{% block meta_title %} - {% trans "Page not found" %} -{% endblock %} - -{% block page_class %} - custompage -{% endblock %} - -{% block page_title %} -{% trans "Page not found" %}
-{% endblock %} - -{% block page_content %} -- {% trans "The page you requested does not exist." %} -
-{% endblock %} diff --git a/app/themes/starts_eu/templates/errors/500.html b/app/themes/starts_eu/templates/errors/500.html deleted file mode 100644 index 2b2fb5fb..00000000 --- a/app/themes/starts_eu/templates/errors/500.html +++ /dev/null @@ -1,32 +0,0 @@ -{% extends "starts_eu/base.html" %} - -{% load i18n %} - -{% block meta_title %} -{% trans "Error" %} -{% endblock %} - -{% block title %} -{% trans "Error" %} -{% endblock %} - -{% block main %} -{% trans "Error" %}
{% trans "Error" %}
-{% endblock %} - -{% block page_content %} -- {% trans "Sorry, an error occurred." %} -
-{% endblock %} diff --git a/app/themes/starts_eu/templates/generic/comments.html b/app/themes/starts_eu/templates/generic/comments.html deleted file mode 100644 index e4dbb9d7..00000000 --- a/app/themes/starts_eu/templates/generic/comments.html +++ /dev/null @@ -1,18 +0,0 @@ -{% extends "starts_eu/base.html" %} - -{% load mezzanine_tags comment_tags keyword_tags %} - -{% block meta_title %}{{ obj }}{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% keywords_for obj as tags %} -{% for tag in tags %}{% if not forloop.first %}, {% endif %}{{ tag }}{% endfor %} -{% endmetablock %}{% endblock %} - -{% block meta_description %}{% metablock %} -{{ obj.description }} -{% endmetablock %}{% endblock %} - -{% block main %} -{% comments_for obj %} -{% endblock %} diff --git a/app/themes/starts_eu/templates/generic/includes/comment.html b/app/themes/starts_eu/templates/generic/includes/comment.html deleted file mode 100644 index 260d52ca..00000000 --- a/app/themes/starts_eu/templates/generic/includes/comment.html +++ /dev/null @@ -1,73 +0,0 @@ -{% load i18n mezzanine_tags comment_tags rating_tags %} - -{% for comment in comments_for_thread %} - -{{ comment.user_name }} - {% else %} -
-
-
- {% rating_for comment %}
-
- {% endif %}
-
-
- {% else %}
- {% endif %}
- {% endeditable %}
-
{{ comment.user_name }} - {% endif %} - - {% blocktrans with sometime=comment.submit_date|timesince %}{{ sometime }} ago{% endblocktrans %} - -
-{{ comment.comment|comment_filter }}
- {% endif %} - - {% if not comment.is_removed and comment.is_public %} - - {% trans "Link" %} - | - - {% trans "Reply" %} - - {% if settings.COMMENTS_USE_RATINGS %} -- {% if comment.is_removed %} - {% trans "Comment deleted" %} - {% else %} - {% trans "Comment awaiting approval" %} - {% endif %} - {% blocktrans with sometime=comment.submit_date|timesince %}{{ sometime }} ago{% endblocktrans %} -
- {% endif %} - - {% comment_thread comment %} - - {% if not comment.is_removed and comment.is_public or request.user.is_staff %}{% trans "There are currently no comments" %}
-{% endif %} - diff --git a/app/themes/starts_eu/templates/generic/includes/comments.html b/app/themes/starts_eu/templates/generic/includes/comments.html deleted file mode 100644 index 56932e3f..00000000 --- a/app/themes/starts_eu/templates/generic/includes/comments.html +++ /dev/null @@ -1,29 +0,0 @@ -{% load i18n mezzanine_tags comment_tags %} -{% trans "Comments" %}
-{% if settings.COMMENTS_DISQUS_SHORTNAME %} -{% include "generic/includes/disqus_comments.html" %} -{% else %} - - -{% comment_thread object_for_comments %} -{% trans "New Comment" %}
- -{% endif %} -- -
-{{ title }}
-{{ description|truncatechars:100 }}
- -- {% for slider in home.dynamiccontenthomeslider_set.all %} - {% with slider.content_object.images.all|get_type:'slider' as images %} - {% if images %} --
-
-
-
-
-
-
-
-
-
-
-
-
- {% if slider.content_object.prices.all.0|floatformat != '0' and slider.content_object.prices.all|length > 0 %}
- {% for price in slider.content_object.prices.all %}
- {% if forloop.first %}
-
-
-
- {% endif %}
- {% endfor %}
- {% endif %}
-
-
-
-
-
- {% trans 'News' %}
-
- {% elif slider.content_type.model == 'event' %}
- {% if slider.content_object.category %}
-
- {{ slider.content_object.category }}
-
- {% endif %}
- {% elif slider.content_type.model == 'media' %}
-
- {{ slider.content_object|get_media_type }}
-
- {% endif %}
-
-
- {% if slider.content_type.model != 'event' %}
- {{ slider.content_object.sub_title }}
- {% endif %}
- {% if slider.content_object.start %}
- {% with slider.content_object as event %}
- {% if slider.content_object.sub_title %}
-
-
- {{ slider.content_object.description|richtext_filters|safe|truncatechars_html:200 }}
-
-
-
-
-
-
-
-
-
-
- {% endif %}
- {% endwith %}
-
- {% endfor %}
-
-{{ slider.content_object.title }}
- - {% if slider.content_type.model == 'article' %} -- {% endif %} - {% include 'agenda/includes/event_date_slider.html' %} - {% endwith %} - {% endif %} - {% if slider.content_object.location %} -
{{ slider.content_object.location }} - {% endif %} -
- {% for link in host_organization.links.all %} --
- {{ link.title }}
-
- {% endfor %}
-
- -- {% if field.label %}{% endif %} - {% if field.help_text %} - {{ field.help_text }} - {% endif %} - {{ field }} -
- {% if field.errors %} -- {% for e in field.errors %} - {% if not forloop.first %} / {% endif %}{{ e }} - {% endfor %} -
- {% endif %} -Headings
- -Heading 1
-Heading 2
-Heading 3
-Heading 4
-Heading 5
-Heading 6
- -- -
Headings with Text
- -Heading 1
-Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.
-Heading 2
-Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.
-Heading 3
-Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.
-Heading 4
-Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.
-Heading 5
-Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.
-Heading 6
-Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.
- -- -
Block Elements
- -Paragraphs and Images
- -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu volutpat enim diam eget metus. Maecenas ornare tortor.
- -
- -Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem.
- -Blockquote
- -This is a standard paragraph. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
- -This is a standard paragraph. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
- -Figure-Caption
- -Details-Summary
- -The summary element example
-The details example text. It may be styled differently based on what browser or operating system you are using.
-- -
Text Elements
- -The a element and external a element examples
-The abbr element and an abbr element with title examples
-The ACRONYM element example
-The b element example
-The cite element example
-The
-code element
exampleThe data element example
-The
-del elementexampleThe dfn element and dfn element with title examples
-The em element example
-The i element example
-The ins element example
-The kbd element example
-The mark element example
-The
- exampleThe
- exampleThe
-s elementexampleThe samp element example
-The small element example
-The span element example
-The strong element example
-The sub element example
-The sup element example
-The example
-The u element example
-The var element example
- -- -
Monospace / Preformatted
-Code block wrapped in "pre" and "code" tags
- -Monospace Text wrapped in "pre" tags
- -- -
List Types
- -Ordered List
--- List Item 1
- - List Item 2
- - List Item 3
-
- - List Item 4
-
- --- List Item 3.1
- - List Item 3.2
-
- - List Item 3.3
-
--- List Item 3.2.1
- - List Item 3.2.2
-
-Unordered List
--- List Item 1
- - List Item 2
- - List Item 3
-
- - List Item 4
-
- --- List Item 3.1
- - List Item 3.2
-
- - List Item 3.3
-
--- List Item 3.2.1
- - List Item 3.2.2
-
-Definition List
--- Definition Term 1
- - Definition Description 1
- - Definition Term 2
- - Definition Description 2
-
- -- -
Tables
- -- -
Media
- -The Audio Element:
- - -The Video Element:
- - -Embedded content:
-YouTube video (iframe):
- - -- -
Form Elements
- -The Fieldset:
- diff --git a/app/themes/starts_eu/templates/includes/instagram.html b/app/themes/starts_eu/templates/includes/instagram.html deleted file mode 100644 index 859eb96c..00000000 --- a/app/themes/starts_eu/templates/includes/instagram.html +++ /dev/null @@ -1,12 +0,0 @@ -{% load instagram_client %} - -{% instagram_user_recent_media ircam_paris %} - -- - {% if current_page.has_previous %} --
-
- {% trans 'Previous page' %}
-
-
- {% endif %}
-
- {% for page in current_page.visible_page_range %}
- -
- {{ page }}
-
- {% endfor %}
-
- {% if current_page.has_next %}
- -
-
- {% trans 'Next page' %}
-
-
- {% endif %}
-
-
---
-
-
- -
-
-
- -
-
-
- -
-
-
- {% if is_event %}
- -
-
-
-
-
- -
-
-
-
-
- {% endif %}
-
diff --git a/app/themes/starts_eu/templates/includes/sidebar.html b/app/themes/starts_eu/templates/includes/sidebar.html deleted file mode 100644 index d3fbd0e1..00000000 --- a/app/themes/starts_eu/templates/includes/sidebar.html +++ /dev/null @@ -1,7 +0,0 @@ -{% load i18n pages_tags mezzanine_tags staticfiles keyword_tags event_tags %} - -- {% featured_events as events %} - {% for event in events %} --
-
-
-
-
-
- {% endfor %}
-
-- {{ event.title }} -
- {% include "agenda/includes/event_metainfo_slider.html" %} -Twitter
- Â - -{% endifinstalled %} - {% include "accounts/includes/user_panel.html" %} - {% endifinstalled %} -
{% trans "Candidacies" %}
-{% endblock %} - -{% block page_content %} - - {% if candidacy %} - - {% for content in candidacy %} - {% include "job/inc/candidacy_card.html" %} - {% endfor %} - - {% else %} - -{% trans "Please come back later. There is no candidacy at the moment." %}
- - {% endif %} - -{% endblock %} diff --git a/app/themes/starts_eu/templates/job/inc/candidacy_card.html b/app/themes/starts_eu/templates/job/inc/candidacy_card.html deleted file mode 100644 index 889269fc..00000000 --- a/app/themes/starts_eu/templates/job/inc/candidacy_card.html +++ /dev/null @@ -1,44 +0,0 @@ -{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} -{{ content.title }}
- {% endeditable %} - -- {% elif content.date_from %} - {% trans "From" %} {{ content.date_from|date:"DATE_FORMAT" }}
- {% elif content.date_to %} - {% trans "until" %}{{ content.date_to|date:"DATE_FORMAT" }}
- {% endif %} - {% endeditable %} -
- {% editable content.description %} - {{ content.description|safe }} - {% endeditable %} -
- {{ jo.title }} -
- -- {% endif %} - {% editable jo.description %} - {{ jo.description|slice:":255" }} - {% endeditable %} -
{{ job_offer.title }}
- {% endeditable %} - -{% endblock %} - -{% block page_content %} - - {% include "core/inc/messages.html" %} - - {% comment %} -{% trans "Category" %} : {{ job_offer.type }}
- {% endcomment %} - {% editable job_offer.content %} - {{ job_offer.content|richtext_filters|safe }} - {% endeditable %} - - - {% with form as job_offer.job_response %} - {% include "job/inc/job_response_form.html" %} - {% endwith %} -{% endblock %} diff --git a/app/themes/starts_eu/templates/job/job_offer_list.html b/app/themes/starts_eu/templates/job/job_offer_list.html deleted file mode 100644 index cb6af92f..00000000 --- a/app/themes/starts_eu/templates/job/job_offer_list.html +++ /dev/null @@ -1,32 +0,0 @@ -{% extends "starts_eu/pages/page.html" %} -{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} - -{% block meta_title %}{% trans "Jobs" %}{% endblock %} - -{% block meta_description %}{% metablock %} -{{ job_offer.description }} -{% endmetablock %}{% endblock %} - -{% block page_class %} - job_offer -{% endblock %} - -{% block page_title %} -{% trans "Jobs" %}
-{% endblock %} - -{% block page_content %} - - {% if job_offer %} - - {% for jo in job_offer %} - {% include "job/inc/job_offer_card.html" %} - {% endfor %} - - {% else %} - -{% trans "Please come back later. There is no job offer at the moment." %}
- - {% endif %} - -{% endblock %} diff --git a/app/themes/starts_eu/templates/magazine/article/article_detail.html b/app/themes/starts_eu/templates/magazine/article/article_detail.html deleted file mode 100644 index f819c3ca..00000000 --- a/app/themes/starts_eu/templates/magazine/article/article_detail.html +++ /dev/null @@ -1,113 +0,0 @@ -{% extends "starts_eu/pages/page.html" %} -{% load mezzanine_tags keyword_tags i18n organization_tags %} - -{% block meta_title %}{{ article.meta_title }}{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% keywords_for article as tags %} -{% for tag in tags %}{% if not forloop.first %}, {% endif %}{{ tag }}{% endfor %} -{% endmetablock %}{% endblock %} - -{% block meta_description %}{% metablock %} - {{ article.description }} -{% endmetablock %}{% endblock %} - -{% block page_class %} - article -{% endblock %} - -{% block body_class %} - {% if department_weaving_css_class %} - pattern pattern-bg {{ department_weaving_css_class }} - {% endif %} -{% endblock %} - -{% block page_title %} - - {% editable article.title %} -{{ article.title }}
- {% endeditable %} - - {% if article.sub_title %} - {% editable article.sub_title %} -{% trans "News" %}
-- - {{ brief.title }} - -
-- {{ brief.description }} -
- - - {{ brief.text_button }} -{{ brief.title }}
-{{ brief.description|truncatechars:100 }}
- {{ brief.text_button }} -{{content.content_object.title }}
-{{ topic.title }}
-{{ topic.description|slice:":255" }}
- -{{ topic.title }}
- {% endeditable %} -{{ media.title }}
- {% endeditable %} -{% endblock %} - - -{% block page_sidebar %} - ---
- {% for transcoded in media.transcoded.all %}
- {% if transcoded.mime_type == "audio/mp4" or transcoded.mime_type == "audio/mp3" %}
- {{ media.title }}{% if media.description %} {{ media.description }}{% endif %}
- {% endif %}
- {% endfor %}
-
-
- ---
-
-
- -
-
-
- -
-
-
-
-{{ media.title }}
- {% if media.description %} -- {{ media.description }} -
- {% endif %} - -- {% if audio_url %} - {{ audio }} - {% else %} - {{ audio }} - {% endif %} -
- {% if audio.description != audio|stringformat:"s" %} -{{ audio.description|truncatewords_html:200|safe }}
- {% endif %} - {% if audio_url %} - {% trans "read more" %} - {% endif %} --{% endwith %} diff --git a/app/themes/starts_eu/templates/media/inc/playlist_audio_card.html b/app/themes/starts_eu/templates/media/inc/playlist_audio_card.html deleted file mode 100644 index 4accaa95..00000000 --- a/app/themes/starts_eu/templates/media/inc/playlist_audio_card.html +++ /dev/null @@ -1,20 +0,0 @@ -{% load mezzanine_tags keyword_tags i18n organization_tags staticfiles %} - -
{{ playlist.title }}
-{{playlist.title}}
-{% endif %} -{% if playlist.description %} -- {{playlist.description}} -
-{% endif %} - - - -- {% for media in playlist.medias.all %} --
- {% with media.media as media %}
- {% for transcoded in media.transcoded.all %}
- {% if transcoded.mime_type == "audio/mp4" or transcoded.mime_type == "audio/mp3" %}
- {{ media.title }}{% if media.description %} {{ media.description }}{% endif %}
- {% endif %}
- {% endfor %}
- {% endwith %}
-
- {% endfor %}
-
diff --git a/app/themes/starts_eu/templates/media/inc/playlist_search.html b/app/themes/starts_eu/templates/media/inc/playlist_search.html deleted file mode 100644 index 898892bf..00000000 --- a/app/themes/starts_eu/templates/media/inc/playlist_search.html +++ /dev/null @@ -1,60 +0,0 @@ -{% extends "core/inc/search_card.html" %} -{% load i18n mezzanine_tags organization_tags %} - -{% block title %} - {{ result }} -{% endblock %} - -{% block icon %}file-{{playlist.type}}-o{% endblock %} - -{% block tags %} -- {% if playlist_url %} - {{ playlist.title }} - {% else %} - {{ playlist }} - {% endif %} -
- {% if playlist.description != playlist|stringformat:"s" %} -{{ playlist.description|truncatewords_html:200|safe }}
- {% endif %} - {% if playlist_url %} - {% trans "read more" %} - {% endif %} --{% endwith %} - -{% block image %} - {% if playlist.medias.all.0.media.poster_url %} - -
{{ media.content_object.title }}
- - {% if media.content_object.description %} -{{ media.content_object.description|truncatechars:100 }}
- {% endif %} - - {% comment %} - {% if media.content_object.poster_url %} -{% trans 'View all medias' %}
- -{{ playlist.title }}
-{{playlist.title}}
-{% endif %} -{% if playlist.description %} -- {{playlist.description}} -
-{% endif %} - -- {% endif %} - {% spaceless %} -- {{ media.title }}{% if media.description %} {{ media.description }}{% endif %}
- {% endspaceless %}
- {% if forloop.last %}
-
- {% endif %} - {% endwith %} -{% endfor %} diff --git a/app/themes/starts_eu/templates/media/inc/playlist_video_slider.html b/app/themes/starts_eu/templates/media/inc/playlist_video_slider.html deleted file mode 100644 index a9672773..00000000 --- a/app/themes/starts_eu/templates/media/inc/playlist_video_slider.html +++ /dev/null @@ -1,45 +0,0 @@ -{% load mezzanine_tags %} - -{{playlist.title}}
-- {{playlist.description}} -
- {% endif %} -- {% for media in playlist.medias.all %} - {% with media.media as media %} --
-
-
-
-
-
- {{ media.title }}
-
-
-
- {% endwith %}
- {% endfor %}
-
-{{ object.title }}
-{{ playlist.title }}
- {% endeditable %} -{% endblock %} - -{% block page_sidebar %} - -{% trans "Media" %}
- {% endeditable %} -{% endblock %} - -{% block meta_title %}{% trans "Media" %}{% endblock %} - -{% block page_sidebar %} ---
-
- {% trans 'audio' %}{% if current_type == 'audio' %} {% endif %}
-
-
- -
-
- {% trans 'video' %}{% if current_type == 'video' %} {% endif %}
-
-
-
- - -{% endblock %} - -{% block page_content %} -- {% if video_url %} - {{ video }} - {% else %} - {{ video }} - {% endif %} -
- {% if video.description != video|stringformat:"s" %} -{{ video.description|truncatewords_html:200|safe }}
- {% endif %} - {% if video_url %} - {% trans "read more" %} - {% endif %} --{% endwith %} diff --git a/app/themes/starts_eu/templates/media/video/video_detail.html b/app/themes/starts_eu/templates/media/video/video_detail.html deleted file mode 100644 index d258d146..00000000 --- a/app/themes/starts_eu/templates/media/video/video_detail.html +++ /dev/null @@ -1,69 +0,0 @@ -{% extends "starts_eu/pages/page.html" %} -{% load mezzanine_tags keyword_tags i18n organization_tags %} - -{% block meta_title %}{% trans "Media" %}{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% keywords_for person as keywords %} -{% for keyword in keywords %} - {% if not forloop.first %}, {% endif %} - {{ keyword }} -{% endfor %} -{% endmetablock %}{% endblock %} - -{% block page_class %} - media -{% endblock %} - -{% block page_title %} - {% editable media.title %} -
{{ media.title }}
- {% endeditable %} -{% endblock %} - -{% block page_sidebar %} - -- {{ media.description }} -
- {% endif %} - -- {% spaceless %} -- {{ media.title }}
- {% endspaceless %}
-
- -{% endblock %} - -{% block page_video %} - -{% endblock %} diff --git a/app/themes/starts_eu/templates/media/video/video_overlay.html b/app/themes/starts_eu/templates/media/video/video_overlay.html deleted file mode 100644 index e3390dd3..00000000 --- a/app/themes/starts_eu/templates/media/video/video_overlay.html +++ /dev/null @@ -1,69 +0,0 @@ -{% load mezzanine_tags keyword_tags i18n organization_tags %} - -- {% spaceless %} -- {{ media.title }}
- {% endspaceless %}
-
- ---
-
-
- -
-
-
- -
-
-
-
-{{ media.title }}
- {% if media.description %} -- {{ media.description }} -
- {% endif %} - -{{ person_list_block.title }}
-{{ person_list_block.description }}
- {% endif %} - -{{ person_list_block.title }}
-{{ person_list_block.description }}
- {% endif %} - -{{ person.first_name }} {{ person.last_name }}
- - {% if person.description %} -{{ person.first_name }} {{ person.last_name }}
- - {% if person.description %} -- {% for organization in organizations %} --
-
-
-
- {{ organization.name }}
-
-
- {{ organization.city }}, {{ organization.country.name }}
-
-
- {{ organization.type }}, {{ organization.type.css_class }}
-
-
- {{ organization.description }}
-
-
-
- {% comment %}
- {{ organization.name }}
- {% endif %}
- {% endwith %}
-
-- {{ organization.lat }}
- {{ organization.lon }}
- {{ organization.city }}
- {{ organization.country.name }}
- - - {% with organization.links|get_type_link:'link' as links %} - {% if links %} - {{ links.first }} - {% endif %} - {% endwith %} -
- - {% with organization.images.all|get_type:'logo' as images %} - {% if images %} -
- {% endcomment %} - - {% endfor %} -
{% trans "Timesheet" %}
-{% endblock %} - -{% block page_content %} - - Back to dashboard - - - - -{% endblock %} diff --git a/app/themes/starts_eu/templates/network/person_activity_timesheet/person_activity_timesheet_list.html b/app/themes/starts_eu/templates/network/person_activity_timesheet/person_activity_timesheet_list.html deleted file mode 100644 index 1d879f67..00000000 --- a/app/themes/starts_eu/templates/network/person_activity_timesheet/person_activity_timesheet_list.html +++ /dev/null @@ -1,41 +0,0 @@ -{% extends "starts_eu/pages/page.html" %} -{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} - -{% block meta_title %}{% trans "Timesheet" %}{% endblock %} - -{% block page_class %} - time_sheet -{% endblock %} - -{% block page_title %} -{% trans "Timesheet" %}
-{% endblock %} - -{% block page_content %} - - Declare this month - {{ timesheets_by_project }} - {% if timesheets_by_year %} - {% for year_k, year_v in timesheets_by_year.items %} -{{ year_k }}
- {% for project_k, project_v in year_v.items %} -{{ project_k }}
-{% trans "No timesheet." %}
- - {% endif %} - -{% endblock %} diff --git a/app/themes/starts_eu/templates/network/person_detail.html b/app/themes/starts_eu/templates/network/person_detail.html deleted file mode 100644 index 2f8acef0..00000000 --- a/app/themes/starts_eu/templates/network/person_detail.html +++ /dev/null @@ -1,162 +0,0 @@ -{% extends "starts_eu/pages/page.html" %} -{% load mezzanine_tags keyword_tags i18n organization_tags pages_tags %} - -{% block meta_title %}{{ person.meta_title }}{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% keywords_for person as keywords %} -{% for keyword in keywords %} - {% if not forloop.first %}, {% endif %} - {{ keyword }} -{% endfor %} -{% endmetablock %}{% endblock %} - -{% block page_class %} - person -{% endblock %} - -{% block breadcrumb_menu %} - {{ block.super }} -{{ person.title }}
- {% endeditable %} - - {% with person.images.all|get_type:'page_featured' as card_images %} - {% if card_images %} -{% trans 'Email' %} : {{ person_email }}
{% elif person.email %}{% trans 'Email' %} : {{ person.email|unspam }}
{% endif %} - - {% with person.activities.all as activities %} - {% if activities %} - {#{% trans 'Activities' %}
#} -- {% with activities.0 as activity %} --
- {% with activity.teams.all as teams %}
- {% with activity.organizations.all|is_not_host as organizations %}
- {% with activity.employers.all|is_not_host as employers %}
- {% if teams %}
- {% trans 'Team' %} :
- {% for team in teams %}
- {{ team.name }}
- {% if organizations %}({% for organization in organizations %}{{ organization.name }}{% if not forloop.last %}, {% endif %}{% endfor %})
- {% elif employers %}({% for employer in employers %}{{ employer.name }}{% if not forloop.last %}, {% endif %}{% endfor %}){% endif %}
-
- {% endwith %}
-
- {% endif %} - {% endwith %} - -{% endblock %} - -{% block page_related_content %} - -{% if related.event %} -- {% endfor %} - {% endif %} - {% endwith %} - {% endwith %} - {% endwith %} -
{% trans "Linked events" %}
-{% trans "Linked contents" %}
-{% trans 'Links' %}
- {% include 'core/inc/link.html' %} - {% endif %} - {% endwith %} -{% endblock %} diff --git a/app/themes/starts_eu/templates/network/person_detail_multiple_activities.html b/app/themes/starts_eu/templates/network/person_detail_multiple_activities.html deleted file mode 100644 index 7b6c8bbd..00000000 --- a/app/themes/starts_eu/templates/network/person_detail_multiple_activities.html +++ /dev/null @@ -1,109 +0,0 @@ -{% extends "starts_eu/pages/page.html" %} -{% load mezzanine_tags keyword_tags i18n organization_tags pages_tags %} - -{% block meta_title %}{{ person.meta_title }}{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% keywords_for person as keywords %} -{% for keyword in keywords %} - {% if not forloop.first %}, {% endif %} - {{ keyword }} -{% endfor %} -{% endmetablock %}{% endblock %} - -{% block page_class %} - person -{% endblock %} - -{% block breadcrumb_menu %} - {{ block.super }} -{{ person.title }}
- {% endeditable %} -{% endblock %} - -{% block page_content %} - {% editable person.bio %} - {{ person.bio|richtext_filters|safe }} - {% endeditable %} - -{% trans 'Email' %} : {{ person_email }}
- - {% if person.activities.all|length > 0 %} -{% trans 'Activities' %}
-- {% for activity in person.activities.all %} --
- {% comment %}
- {% if activity.function %}
- {% trans 'Function'%} : {{ activity.function }}
- {% endfor %}
-
- {% endif %} -{% endblock %} - -{% block page_sidebar %} - {% if person.images.all %} - {% with person.images.all|get_type:'page_featured' as images %} - {% if images.first %} -- {% endif %} - {% if activity.status %} - {% trans 'Status'%} : {{ activity.status }}
- {% endif %} - {% endcomment %} - {% with activity.teams.all as teams %} - {% if teams %} - {% trans 'Team' %} : - {% for team in teams %} - {{ team.name }}{% if not forloop.last %}, {% endif %} - {% endfor %} -
- {% endif %} - {% endwith %} - {% with activity.organizations.all as organizations %} - {% with activity.employers.all as employers %} - {% if organizations %} - {% trans 'Organization' %} : - {% for organization in organizations %} - {{ organization.name }}{% if not forloop.last %}, {% endif %} - {% endfor %} -
- {% elif employers %} - {% trans 'Organization' %} : - {% for employer in employers %} - {{ employer.name }}{% if not forloop.last %}, {% endif %} - {% endfor %} -
- {% endif %} - {% endwith %} - {% endwith %} - {% if activity.date_from or activity.date_to %} - {% if not activity.date_from and not activity.date_to|date_year_higher_than:10 %} - {% trans 'Period' %} : {% trans 'to' %} {{ activity.date_to }}
- {% elif not activity.date_to %} - {% trans 'Period'%} : {% trans 'from' %} {{ activity.date_from }}
- {% else %} - {% trans 'Period'%} : {% trans 'from' %} {{ activity.date_from }} {% if not activity.date_to|date_year_higher_than:10 %}{% trans 'to' %} {{ activity.date_to }}{% endif %}
- {% endif %} - {% endif %} -
{% trans 'Links' %}
- {% include 'core/inc/link.html' %} - {% endif %} - {% endwith %} -{% endblock %} diff --git a/app/themes/starts_eu/templates/network/person_list.html b/app/themes/starts_eu/templates/network/person_list.html deleted file mode 100644 index e69de29b..00000000 diff --git a/app/themes/starts_eu/templates/pages/custompage.html b/app/themes/starts_eu/templates/pages/custompage.html deleted file mode 100644 index 38376a67..00000000 --- a/app/themes/starts_eu/templates/pages/custompage.html +++ /dev/null @@ -1,102 +0,0 @@ -{% extends "starts_eu/pages/page.html" %} -{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} - - {% with page.custompage as object %} - {% block page_class %} - custompage - {% endblock %} - - {% block body_class %} - {% with page.get_ascendants|last as top_level_parent %} - {% if top_level_parent.get_content_model.weaving_css_class %} - pattern pattern-bg {{ top_level_parent.get_content_model.weaving_css_class }} - {% endif %} - {% endwith %} - {% endblock %} - - {% block page_title %} - {% editable page.custompage.title %} -{{ page.custompage.title }}
- {% endeditable %} - {% endblock %} - - {% block page_content %} - - {% with page.get_ascendants|last as top_level_parent %} - {% if linked_organization_content and research_slug == top_level_parent.slug %} - {% include 'pages/page/includes/linked_organization_content.html' %} - {% endif %} - {% endwith %} - - {% if page.custompage.sub_title %} - {% editable page.custompage.sub_title %} -{{ page.departmentpage.sub_title }}
- {% endeditable %} - -{% endblock %} - -{% block page_content %} - - {{ linked_organization_content.all }} - {% if linked_organization_content and research_slug == page.departmentpage.slug %} - {% include 'pages/page/includes/linked_organization_content.html' %} - {% endif %} - - {% if page.departmentpage.content %} - {% editable page.departmentpage.content %} - {{ page.departmentpage.content|richtext_filters|safe }} - {% endeditable %} - {% endif %} - -{% endblock %} - -{% block page_audio %} - {% with page as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_slider %} - {% with page as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_video %} - {% with page as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_sub_content %} - {% with page.blocks.all as blocks %} - {% include "core/inc/block.html" %} - {% endwith %} -{% endblock %} diff --git a/app/themes/starts_eu/templates/pages/form.html b/app/themes/starts_eu/templates/pages/form.html deleted file mode 100644 index ff1e2d52..00000000 --- a/app/themes/starts_eu/templates/pages/form.html +++ /dev/null @@ -1,73 +0,0 @@ -{% extends "starts_eu/pages/page.html" %} -{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} - -{% with page as object %} - - {% block page_class %} - custompage - {% endblock %} - - {% block body_class %} - {% with page.get_ascendants|last as top_level_parent %} - {% if top_level_parent.get_content_model.weaving_css_class %} - pattern pattern-bg {{ top_level_parent.get_content_model.weaving_css_class }} - {% endif %} - {% endwith %} - {% endblock %} - - {% block page_title %} - {% editable page.title %} -{{ page.title }}
- {% endeditable %} - {% endblock %} - - {% block page_content %} - -- {% endif %} - {% endif %} - {% if page.in_menu %} - {% if forloop.first and not page.parent.in_menu and not page.is_primary %} - {% endif %} --
- {{ page.title }}
-
- {% endif %}
- {% if page.is_primary %}
- {% if forloop.last %}
-
-
- {% endif %} - {% endif %} - {% endfor %} -{% endif %} -{% endspaceless %} diff --git a/app/themes/starts_eu/templates/pages/menus/admin.html b/app/themes/starts_eu/templates/pages/menus/admin.html deleted file mode 100644 index 13d48544..00000000 --- a/app/themes/starts_eu/templates/pages/menus/admin.html +++ /dev/null @@ -1,57 +0,0 @@ -{% load pages_tags i18n staticfiles mezzanine_tags organization_tags %} - -- {% for page in page_branch %} - {% ifchanged page.in_menus %} - {% for menu in page.in_menus %} - {% if page.branch_level == 0 %} --
-
-
- +
- -
-
- {% set_page_permissions page %}
- {% if page.perms.delete %}
-
- {% else %}
-
- {% endif %}
- {% if page.perms.change %}
- {{ page.title.strip|default:" " }}
- | {{ page.content_model }}
- {% else %}
- {{ page.title }}
- - {{ page.content_model }}
- {% endif %}
-
-
-
-
- {% if page.perms.add %}
-
- {% endif %}
-
-
-
- {% endfor %}
-
diff --git a/app/themes/starts_eu/templates/pages/menus/breadcrumb.html b/app/themes/starts_eu/templates/pages/menus/breadcrumb.html deleted file mode 100644 index bf40eaf8..00000000 --- a/app/themes/starts_eu/templates/pages/menus/breadcrumb.html +++ /dev/null @@ -1,31 +0,0 @@ -{% load i18n pages_tags %} - -{% if on_home %} --
{{ menu|get_mezzanine_menu_name }}
-- {% endif %} - {% endfor %} - {% endifchanged %} -
- {% if page.has_children %}{% page_menu page %}{% endif %} -
--
- {{ page.title }}
- {% if page.is_current %}
-
- {% endif %}
- {% if page.is_current_or_ascendant %}
- {% if page.has_children_in_menu %}
- {% page_menu page %}
- {% endif %}
- {% endif %}
- {% if page.is_primary and page.is_current_or_ascendant %}
-
- {% endif %} - {% endif %} - {% endfor %} - {% endif %} - {% if branch_level == 1 %} - {% for page in page_branch %} - {% if page.in_menu and page.in_menus|first %} -- {% include "pages/menus/current_tree_summary.html" %} -
- {% endif %} -- {% page_menu page %} -
-- {% include "pages/menus/current_tree_summary.html" %} -
- {% endif %} - {% if page.is_current_or_ascendant and not page.has_children_in_menu %} -- {% include "pages/menus/current_tree_summary.html" %} -
- {% endif %} -- {% endif %} - {% if page.in_menu and page.has_children_in_menu %} - {% if page.is_primary and page.is_current_or_ascendant %} --
- {% trans 'Home' %}
-
- {% endif %}
- {% if page.is_current_or_ascendant %}
- {% if page.has_children_in_menu %}
- {% page_menu page %}
- {% endif %}
- {% endif %}
- {% if page.is_primary and page.is_current_or_ascendant %}
- {% endif %}
- {% elif page.in_menu and current_page.in_menus == page.in_menus %}
- -
- {{page.title}}
-
- {% endif %}
- {% if forloop.last %}
-
- {% endif %} - {% endfor %} - {% endif %} - {% if branch_level == 1 %} - {% for page in page_branch %} -- {% page_menu page %} -
-- {% include "pages/menus/current_tree_summary.html" %} -
- {% endif %} - {% if page.is_current_or_ascendant and not page.has_children_in_menu %} -- {% include "pages/menus/current_tree_summary.html" %} -
- {% endif %} -- {% endif %} - {% if page.is_current_or_ascendant %} - {% if page.has_children_in_menu %} - {% page_menu page %} - {% endif %} - {% endif %} - {% if page.is_primary and page.is_current_or_ascendant %} -
- {% else %} -- {% include "pages/menus/current_tree_summary.html" %} -
- {% endif %} - {% endif %} - {% endif %} - {% endfor %} - {% elif branch_level == 1 %} - {% for page in page_branch %} - {% if page.is_current_or_ascendant and page.has_children_in_menu %} -- {% include "pages/menus/current_tree_summary.html" %} -
- {% endif %} - {% endfor %} - {% elif branch_level == 2 %} - {% for page in page_branch %} -- {% include "pages/menus/current_tree_summary.html" %} -
- {% endif %} -- {% for page in page_branch %} - {% if not has_home and page.is_primary and forloop.first %} --
- {% trans "Home" %}
-
- {% endif %}
- {% if page.in_menu %}
- -
- {{ page.title }}{% if page.has_children_in_menu %}{% endif %}
- {% if page.has_children_in_menu %}{% page_menu page %}{% endif %}
-
- {% endif %}
- {% endfor %}
-
- {% else %} -- {% for page in page_branch %} - {% if page.in_menu %} --
- {{ page.title }}
- {% if page.has_children_in_menu %}{% page_menu page %}{% endif %}
-
- {% endif %}
- {% endfor %}
-
- {% endif %} -{% endif %} -{% endspaceless %} diff --git a/app/themes/starts_eu/templates/pages/menus/footer_horizontal.html b/app/themes/starts_eu/templates/pages/menus/footer_horizontal.html deleted file mode 100644 index 8b849302..00000000 --- a/app/themes/starts_eu/templates/pages/menus/footer_horizontal.html +++ /dev/null @@ -1,25 +0,0 @@ -{% load i18n pages_tags staticfiles organization_tags %} -{% get_language_info_list for LANGUAGES as languages %} - -{% spaceless %} -{% if page_branch_in_menu %} - {% for page in page_branch %} - {% if page.is_primary %} - {% if forloop.first %} -- {% endif %} - {% endif %} - {% if page.in_menu %} --
- {{ page.title }}
-
- {% endif %}
-
- {% if page.is_primary %}
- {% if forloop.last %}
-
- {% endif %} - {% endif %} - {% endfor %} -{% endif %} -{% endspaceless %} diff --git a/app/themes/starts_eu/templates/pages/menus/footer_tree.html b/app/themes/starts_eu/templates/pages/menus/footer_tree.html deleted file mode 100644 index a1c8c99a..00000000 --- a/app/themes/starts_eu/templates/pages/menus/footer_tree.html +++ /dev/null @@ -1,31 +0,0 @@ -{% load i18n pages_tags %} - -{% spaceless %} -{% if page_branch_in_menu %} -- {% for page in page_branch %} - - {% if not has_home and page.is_primary and forloop.first %} --
- {% trans "Home" %}
-
- {% endif %}
-
- {% if page.in_menu %}
- -
- {{ page.title }}
- {# remove this if tag to always show all nav items #}
- {% if page.is_current_or_ascendant and page.has_children_in_menu %}
- {% page_menu page %}
- {% endif %}
-
- {% endif %}
-
- {% endfor %}
-
-{% endif %} -{% endspaceless %} diff --git a/app/themes/starts_eu/templates/pages/menus/footer_vertical.html b/app/themes/starts_eu/templates/pages/menus/footer_vertical.html deleted file mode 100644 index 2f58e8ff..00000000 --- a/app/themes/starts_eu/templates/pages/menus/footer_vertical.html +++ /dev/null @@ -1,25 +0,0 @@ -{% load i18n pages_tags staticfiles %} -{% get_language_info_list for LANGUAGES as languages %} - -{% spaceless %} -{% if page_branch_in_menu %} - {% for page in page_branch %} - {% if page.is_primary %} - {% if forloop.first %} -- {% endif %} - {% endif %} - {% if page.in_menu %} --
- {{ page.title }}
-
- {% endif %}
-
- {% if page.is_primary %}
- {% if forloop.last %}
-
- {% endif %} - {% endif %} - {% endfor %} -{% endif %} -{% endspaceless %} diff --git a/app/themes/starts_eu/templates/pages/menus/header.html b/app/themes/starts_eu/templates/pages/menus/header.html deleted file mode 100644 index d82a800b..00000000 --- a/app/themes/starts_eu/templates/pages/menus/header.html +++ /dev/null @@ -1,64 +0,0 @@ -{% load i18n pages_tags staticfiles mezzanine_tags organization_tags %} -{% get_language_info_list for LANGUAGES as languages %} - -{% spaceless %} -{% if page_branch_in_menu %} - {% for page in page_branch %} - {% if page.is_primary %} - {% if forloop.first %} ---
-
-
-
- -
-
- {% with host_organization.images|get_type:"logo_header" as images %}
- {% if images %}
- {% with images|first as img %}
-
- {% endwith %}
- {% endif %}
- {% endwith %}
-
-
- {% endif %}
- {% endif %}
- {% if page.in_menu %}
- {% if page.content_model == "link" %}
- {% with page.link.link_images.all|first as link_image %}
- {% if link_image %}
- -
-
-
- {% else %}
- -
- {{ page.title }}
-
- {% endif %}
- {% endwith %}
- {% else %}
- -
- {{ page.title }}
- {% if page.has_children_in_menu %}
- {% page_menu page "pages/menus/header_tree_primary.html" %}
- {% endif %}
-
- {% endif %}
- {% endif %}
- {% if page.is_primary %}
- {% if forloop.last %}
-
- -
- {% include "includes/languages.html" %}
-
- -
-
-
-
-
- {% endif %} - {% endif %} - {% endfor %} -{% endif %} -{% endspaceless %} diff --git a/app/themes/starts_eu/templates/pages/menus/header_tree_primary.html b/app/themes/starts_eu/templates/pages/menus/header_tree_primary.html deleted file mode 100644 index a0eb55e5..00000000 --- a/app/themes/starts_eu/templates/pages/menus/header_tree_primary.html +++ /dev/null @@ -1,31 +0,0 @@ -{% load i18n pages_tags mezzanine_tags media_tags organization_tags staticfiles %} -{% get_language_info_list for LANGUAGES as languages %} - -{% spaceless %} -{% if page_branch_in_menu %} -- {{ page.departmentpage.description|richtext_filters|safe|truncatechars:415 }} -
---
- {{ page.title }}
-
- {% endif %}
- {% if page.has_children_in_menu %}
- {% page_menu page "pages/menus/header_tree_secondary.html" %}
- {% endif %}
-
-
- {% endfor %} --- {% trans "Home" %}
- {% endif %}
-
- {% if page.is_current_or_ascendant and not page.is_current_child %}
- {% if page.has_children_in_menu %}{% page_menu page %}{% endif %}
- {% endif %}
-
- {% if page.is_current_child %}
- -
- {{ page.title }}
-
- {% endif %}
-
- {% if page.is_primary and forloop.last %}
-
- {% endif %} - -{% endfor %} -{% endif %} -{% endspaceless %} diff --git a/app/themes/starts_eu/templates/pages/menus/primary.html b/app/themes/starts_eu/templates/pages/menus/primary.html deleted file mode 100644 index e0be3193..00000000 --- a/app/themes/starts_eu/templates/pages/menus/primary.html +++ /dev/null @@ -1,20 +0,0 @@ -{% load pages_tags i18n %} - -{% spaceless %} -- {% for page in page_branch %} - {% if not has_home and page.is_primary and forloop.first %} --
- {% trans "Home" %}
-
- {% endif %}
- {% if page.in_menu %}
- -
- {{ page.title }}
-
- {% endif %}
- {% endfor %}
-
-
-{% endspaceless %} diff --git a/app/themes/starts_eu/templates/pages/menus/tree.html b/app/themes/starts_eu/templates/pages/menus/tree.html deleted file mode 100644 index 36108084..00000000 --- a/app/themes/starts_eu/templates/pages/menus/tree.html +++ /dev/null @@ -1,26 +0,0 @@ -{% load i18n pages_tags %} - -{% spaceless %} -{% if page_branch_in_menu %} -- {% for page in page_branch %} - {% if not has_home and page.is_primary and forloop.first %} --
- {% trans "Home" %}
-
- {% endif %}
- {% if page.in_menu %}
- -
- {{ page.title }}
- {# wrap the next line with 'if page.is_current_or_ascendant' #}
- {# to only show child pages in the menu for the current page #}
- {% if page.has_children_in_menu %}{% page_menu page %}{% endif %}
-
- {% endif %}
- {% endfor %}
-
-{% endif %} -{% endspaceless %} diff --git a/app/themes/starts_eu/templates/pages/menus/vous_etes.html b/app/themes/starts_eu/templates/pages/menus/vous_etes.html deleted file mode 100644 index b9f5a902..00000000 --- a/app/themes/starts_eu/templates/pages/menus/vous_etes.html +++ /dev/null @@ -1,26 +0,0 @@ -{% load pages_tags mezzanine_tags i18n %} - -{% if page_branch_in_menu %} - {% nevercache %} - ---
- {% trans "You are" %}
-
- {% for page in page_branch %}
- {% if page.in_menu %}
- -
- {{ page.title }}
-
- {% endif %}
- {% endfor %}
-
- {% endnevercache %} -{% endif %} diff --git a/app/themes/starts_eu/templates/pages/mutations-creations.html b/app/themes/starts_eu/templates/pages/mutations-creations.html deleted file mode 100644 index ca8e4723..00000000 --- a/app/themes/starts_eu/templates/pages/mutations-creations.html +++ /dev/null @@ -1,106 +0,0 @@ -{% extends "starts_eu/pages/page.html" %} -{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} - - {% with page.custompage as object %} - {% block page_class %} - custompage - {% endblock %} - - {% block body_class %} - {% with page.get_ascendants|last as top_level_parent %} - {% if top_level_parent.get_content_model.weaving_css_class %} - pattern pattern-bg {{ top_level_parent.get_content_model.weaving_css_class }} - {% endif %} - {% endwith %} - {% endblock %} - - {% block hero %} - {% include "home/inc/hero-small.html" %} - {% endblock %} - - {% block page_title %} - {% editable page.custompage.title %} -{{ page.custompage.title }}
- {% endeditable %} - {% endblock %} - - {% block page_content %} - - {% with page.get_ascendants|last as top_level_parent %} - {% if linked_organization_content and research_slug == top_level_parent.slug %} - {% include 'pages/page/includes/linked_organization_content.html' %} - {% endif %} - {% endwith %} - - {% if page.custompage.sub_title %} - {% editable page.custompage.sub_title %} -{% trans "Newsletter" %}
-{% endblock %} - -{% block page_content %} - -{% trans "Sign up for our monthly newsletter to keep up to date with the institute's activities every month and be eligible to take advantage of special offers from our partners." %}
- - -{% endblock %} diff --git a/app/themes/starts_eu/templates/pages/page.html b/app/themes/starts_eu/templates/pages/page.html deleted file mode 100644 index ca0ecfb4..00000000 --- a/app/themes/starts_eu/templates/pages/page.html +++ /dev/null @@ -1,174 +0,0 @@ -{% extends "starts_eu/base.html" %} -{% load i18n mezzanine_tags keyword_tags organization_tags pages_tags %} - -{% block meta_title %}{{ page.meta_title }}{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% keywords_for page as keywords %} -{% for keyword in keywords %} - {% if not forloop.first %}, {% endif %} - {{ keyword }} -{% endfor %} -{% endmetablock %}{% endblock %} - -{% block meta_description %}{% metablock %} -{{ page.description }} -{% endmetablock %}{% endblock %} - -{% block main %} - - {% block hero %} - {% endblock %} - -- {% include 'core/inc/logo.html' %} -
-- {% for loc in linked_organization_content %} - {% if loc.images.all %} - {% with loc.images|get_type:"logo_black"|first as img %} --
-
-
-
-
- {% endwith %}
- {% endif %}
- {% endfor %}
-
-- {% for lof in linked_organization_footer_2 %} --
- {{ lof.name}}
-
- {% endfor %}
-
diff --git a/app/themes/starts_eu/templates/pages/page/includes/page_box.html b/app/themes/starts_eu/templates/pages/page/includes/page_box.html deleted file mode 100644 index e02485bb..00000000 --- a/app/themes/starts_eu/templates/pages/page/includes/page_box.html +++ /dev/null @@ -1,24 +0,0 @@ -{% load mezzanine_tags organization_tags %} - -{{ object.title }}
-{{ page.projecttopicpage.title }}
- {% endeditable %} -{% endblock %} - -{% block page_content %} - {% with page.get_ascendants|last as top_level_parent %} - {% if linked_organization_content and research_slug == top_level_parent.slug %} - {% include 'pages/page/includes/linked_organization_content.html' %} - {% endif %} - {% endwith %} - - {% if page.projecttopicpage.sub_title %} - {% editable page.projecttopicpage.sub_title %} -{{ sub_topic.name }}
- {% if sub_topic.description %} -- {{ sub_topic.description }} -
- {% endif %} - {% if sub_topic.projects.all %} -- - {{ project }} - -
-- {{ project.description }} -
- -{{ page.title }}
- {% endeditable %} -{% endblock %} - -{% block page_content %} - {% with page.get_ascendants|last as top_level_parent %} - {% if linked_organization_content and research_slug == top_level_parent.slug %} - {% include 'pages/page/includes/linked_organization_content.html' %} - {% endif %} - {% endwith %} - {% if page.teampage.sub_title %} - {% editable page.teampage.sub_title %} --
{% trans "Research topics and related projects" %}
- {% include 'projects/inc/project_list.html' %} -{% trans "European and national projects" %}
- {% with leader_projects as projects %} - {% include 'projects/inc/project_list.html' %} - {% endwith %} - {% with partner_projects as projects %} - {% include 'projects/inc/project_list.html' %} - {% endwith %} --
{% trans 'Team' %}
- {% for status in statuses %} - {% with page.teampage.team|get_team_persons:status as persons %} - {% if persons %} - {% if persons|length == 1 %}{{ status.name }}{% else %}{{ status.description }}{% endif %} : - {% for person in persons %} - {{ person.title }}{% if not forloop.last %}, {% endif %} - {% endfor %} -
- {% endif %} - {% endwith %} - {% endfor %} -
- {% endif %} -
{{ block.title }}
- {% endeditable %} - {% if block.description %} -- {% trans "Login" %} -
- {% endif %} -
- - {{ project }} - -
-- {{ project.description }} -
-{{ object.title }}
- {% endeditable %} - - {% if object.description %} - {% editable object.description %} -- {% trans "Login" %} -
{{ demo.title }}
- {% endeditable %} - - {% if demo.description %} - {% editable demo.description %} -- {% trans "Project" %} : {{ demo.project.title }}
- {% trans "Authors" %} : {% for author in demo.authors.all %}{{ author }}{% endfor %} - -{% endblock %} - -{% block page_sidebar %} -{% endblock %} - -{% block page_slider %} -
{{ object.title }}
- {% endeditable %} - - {% with page.get_ascendants|last as top_level_parent %} - {% if linked_organization_content and research_slug == top_level_parent.slug %} - {% include 'pages/page/includes/linked_organization_content.html' %} - {% endif %} - {% endwith %} - - {% if object.description %} - {% editable object.description %} ---
- {% trans "Home" %}
-
- -
- {{ page.title }}
-
- -
- {{ object.title }}
-
-
-{% endblock %} - -{% block page_link %} - {% with object.links.all as links %} - {% if links %} - {% include 'core/inc/link.html' %} - {% endif %} - {% endwith %} -{% endblock %} - -{% block page_audio %} - {% with object as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_slider %} - {% with object as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_video %} - {% with object as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_sub_content %} - - {% if object.type == 'external' %} ---
-
-
-
--
{% trans "Project details" %}
- -{% trans "Participants" %}
- -- {% if organization.url %} - - {% endif %} - {% endfor %} -
- {% endif %} - {% endfor %} -
-
-- {{ demo.title }}
- {% endfor %}
-
-{% trans "Demos" %}
- {% for demo in object.demos.all %} --
-- {{ blog_page.title }}
- {% endfor %}
-
-{% trans "Blog Pages" %}
- {% for blog_page in object.blog_pages.all %} -- {% if object.lead_organization %} - {% with object.lead_organization.images.all|get_type:'logo' as images %} - {% include 'core/inc/logo.html' %} - {% endwith %} - {% endif %} - {% for organization in object.organizations.all %} - {% with organization.images.all|get_type:'logo' as images %} - {% include 'core/inc/logo.html' %} - {% endwith %} - {% endfor %} -
-- {% for key,value in filter_dict.items %} --
-
- {{ value.verbose_name }} ({{ value.count }}){% if search_model == key %}{% endif %}
-
-
- {% endfor %}
-
-- {% if results.paginator.count == 0 %} - {% blocktrans %}No results were found matching your query: {{ query }}{% endblocktrans %} - {% endif %} -
- --{% url "login" as login_url %} -{% url "signup" as signup_url %} -{% with request.path as next %} -{% blocktrans %} -If you have an existing account or would like to create one, please -log in or -sign up. -{% endblocktrans %} -{% endwith %} -
-{% endifinstalled %} -{% endif %} - -{% errors_for form %} - - - - - -{% if not settings.SHOP_CHECKOUT_STEPS_SPLIT and settings.SHOP_PAYMENT_STEP_ENABLED %} -{% include "shop/includes/payment_fields.html" %} -{% endif %} - -{% fields_for form.other_fields %} - -{% endif %} -{% endblock %} diff --git a/app/themes/starts_eu/templates/shop/cart.html b/app/themes/starts_eu/templates/shop/cart.html deleted file mode 100644 index fdfb69a9..00000000 --- a/app/themes/starts_eu/templates/shop/cart.html +++ /dev/null @@ -1,113 +0,0 @@ -{% extends "shop/starts_eu/base.html" %} -{% load mezzanine_tags shop_tags i18n %} - -{% block meta_title %}{% trans "Your Cart" %}{% endblock %} -{% block title %}{% trans "Your Cart" %}{% endblock %} -{% block body_id %}cart{% endblock %} - -{% block breadcrumb_menu %} -{{ block.super }} -{% trans "You may also like:" %}
-{{ product }}
-{% trans "Your Cart is empty." %}
-{% endif %} -{% endblock %} diff --git a/app/themes/starts_eu/templates/shop/checkout.html b/app/themes/starts_eu/templates/shop/checkout.html deleted file mode 100644 index 6947e4c5..00000000 --- a/app/themes/starts_eu/templates/shop/checkout.html +++ /dev/null @@ -1,83 +0,0 @@ -{% extends "shop/starts_eu/base.html" %} -{% load shop_tags mezzanine_tags i18n %} - -{% block meta_title %}{% trans "Checkout" %} - {{ step_title }}{% endblock %} -{% block title %}{% trans "Checkout" %} - {% trans "Step" %} {{ step }} {% trans "of" %} {{ steps|length }}{% endblock %} -{% block body_id %}checkout{% endblock %} - -{% block extra_head %} - -{% endblock %} - -{% block breadcrumb_menu %} -{% for step in steps %} -- {% for item in request.cart %} --
- {% if item.image %}
-
- {% endif %}
-
- {{ item.quantity }} x {{ item.description }}
- {{ item.total_price|currency }}
-
-
- {% endfor %}
-
- {% order_totals %} -- {% trans "Edit Cart" %} -
{% trans "Thank you for shopping with us, your order is complete." %}
-{% trans "We've sent you a receipt via email." %}
-{% trans "You can also view your invoice using one of the links below." %}
-- -{% endblock %} diff --git a/app/themes/starts_eu/templates/shop/confirmation.html b/app/themes/starts_eu/templates/shop/confirmation.html deleted file mode 100644 index b87ee607..00000000 --- a/app/themes/starts_eu/templates/shop/confirmation.html +++ /dev/null @@ -1,80 +0,0 @@ -{% extends "shop/checkout.html" %} -{% load i18n shop_tags %} - -{% block fields %} -{% if request.cart.has_items %} - -
{% trans "Billing Details" %}
-- - {% for field, value in form.billing_detail_fields.values %} -- {{ value }}
- {% endfor %}
-
-
-{% trans "Shipping Details" %}
-- - {% for field, value in form.shipping_detail_fields.values %} -- {{ value }}
- {% endfor %}
-
- {% for field, value in form.additional_instructions_field.values %}
- - {{ value }}
- {% endfor %}
-
-
--
{% trans "Payment Details" %}
-- - {% for field, value in form.card_name_field.values %} -- {{ value }}
- {% endfor %}
-
- {% for field, value in form.card_type_field.values %}
- - {{ value }}
- {% endfor %}
-
- -
- {% with form.card_expiry_fields.values as expiry_fields %}
- {% with expiry_fields.next as month_field %}
- {{ month_field.1 }}/{{ expiry_fields.next.1 }}
- {% endwith %}
- {% endwith %}
-
-
- {% for field, value in form.card_fields.values %}
- - {{ value }}
- {% endfor %}
-
-
-- -{% for field in form %}{{ field }}{% endfor %} - -{% endif %} -{% endblock %} diff --git a/app/themes/starts_eu/templates/shop/includes/order_details.html b/app/themes/starts_eu/templates/shop/includes/order_details.html deleted file mode 100644 index b6aa60a3..00000000 --- a/app/themes/starts_eu/templates/shop/includes/order_details.html +++ /dev/null @@ -1,55 +0,0 @@ -{% load shop_tags i18n %} - -
{{ settings.SITE_TITLE }}
- -{% trans "Your Details" %}
-{% trans "Items Ordered" %}
-{{ settings.SITE_TITLE }}
- -{% trans "Your Details" %}
-{% trans "Items Ordered" %}
--
{{ list.title }}
- {% if list.description %} -{{ list.description }}
- {% endif %} -{{ product.title }}
- {% if product.description %} --
{{ list.title }}
- {% if list.description %} -{{ list.description }}
- {% endif %} -{{ product.title }}
- {% if product.description %} --
-{% if request.cart.total_quantity != 0 %} - - {% if request.session.order.step %}{% trans "Return to Checkout" %}{% else %}{% trans "Go to Checkout" %}{% endif %} -
-{% endif %} -{% if settings.SHOP_USE_WISHLIST %} - - -{% blocktrans count request.wishlist|length as wishlist_count %}Wishlist contains 1 item{% plural %} Wishlist contains {{ wishlist_count }} items{% endblocktrans %} -{% endif %} -{% endspaceless %} diff --git a/app/themes/starts_eu/templates/shop/order_history.html b/app/themes/starts_eu/templates/shop/order_history.html deleted file mode 100644 index f782f3d0..00000000 --- a/app/themes/starts_eu/templates/shop/order_history.html +++ /dev/null @@ -1,51 +0,0 @@ -{% extends "shop/starts_eu/base.html" %} -{% load mezzanine_tags shop_tags i18n %} - -{% block meta_title %}{% trans "Order History" %}{% endblock %} -{% block title %}{% trans "Order History" %}{% endblock %} - -{% block breadcrumb_menu %} -{{ block.super }} -
{% trans "You have not ordered anything from us yet." %}
-{% endif %} - -{% endblock %} diff --git a/app/themes/starts_eu/templates/shop/order_invoice.html b/app/themes/starts_eu/templates/shop/order_invoice.html deleted file mode 100644 index 5dcda6c9..00000000 --- a/app/themes/starts_eu/templates/shop/order_invoice.html +++ /dev/null @@ -1,5 +0,0 @@ -{% if not LANGUAGE_BIDI %} - {% include "shop/includes/order_details.html" %} -{% else %} - {% include "shop/includes/order_details_rtl.html" %} -{% endif %} diff --git a/app/themes/starts_eu/templates/shop/order_invoice_pdf.html b/app/themes/starts_eu/templates/shop/order_invoice_pdf.html deleted file mode 100644 index da6b04fc..00000000 --- a/app/themes/starts_eu/templates/shop/order_invoice_pdf.html +++ /dev/null @@ -1 +0,0 @@ -{% extends "shop/order_invoice.html" %} diff --git a/app/themes/starts_eu/templates/shop/payment.html b/app/themes/starts_eu/templates/shop/payment.html deleted file mode 100644 index 6be458e6..00000000 --- a/app/themes/starts_eu/templates/shop/payment.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends "shop/checkout.html" %} -{% load i18n mezzanine_tags %} - -{% block fields %} -{% if request.cart.has_items %} -{% errors_for form %} -{% include "shop/includes/payment_fields.html" %} -{% fields_for form.other_fields %} -{% endif %} -{% endblock %} diff --git a/app/themes/starts_eu/templates/shop/product.html b/app/themes/starts_eu/templates/shop/product.html deleted file mode 100644 index 570dd398..00000000 --- a/app/themes/starts_eu/templates/shop/product.html +++ /dev/null @@ -1,159 +0,0 @@ -{% extends "shop/starts_eu/base.html" %} -{% load staticfiles mezzanine_tags shop_tags rating_tags i18n %} - -{% block meta_title %}{{ product.meta_title }}{% endblock %} -{% block body_id %}category{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% for keyword in product.keywords.all %} - {% if not forloop.first %}, {% endif %} - {{ keyword }} -{% endfor %} -{% endmetablock %}{% endblock %} - -{% block meta_description %}{% metablock %} -{{ product.description }} -{% endmetablock %}{% endblock %} - -{% block extra_css %} -{{ block.super }} - -{% endblock %} - -{% block extra_js %} -{{ block.super }} - - -{% endblock %} - -{% block extra_head %} -{{ block.super }} - - -{% endblock %} - -{% block breadcrumb_menu %} -{{ block.super }} -- {% for image in images %} --
-
-
-
-
- {% endfor %}
-
- -{% if images|length != 1 %} -- {% for image in images %} --
-
-
-
-
- {% endfor %}
-
-{% endif %} - -{% endspaceless %} -{% endif %} - -{% editable product.content %} -{{ product.content|richtext_filters|safe }} -{% endeditable %} - -{% if product.available and has_available_variations %} -- {% for variation in variations %} --
- {% if variation.has_price %}
- {% if variation.on_sale %}
- {{ variation.unit_price|currency }}
- {% trans "On sale:" %}
- {% endif %}
- {{ variation.price|currency }}
- {% else %}
- {% if has_available_variations %}
-
- {% trans "The selected options are currently unavailable." %}
-
- {% endif %}
- {% endif %}
-
- {% endfor %}
-
- -{% errors_for add_product_form %} - - -{% else %} -{% trans "This product is currently unavailable." %}
-{% endif %} - -{% if settings.SHOP_USE_RATINGS %} -{% trans "Related Products" %}
-{{ product }}
-{% trans "Your wishlist is empty." %}
--
{% trans "Continue Shopping" %}
-{% endif %} -{% endblock %} diff --git a/app/themes/starts_eu/templates/starts_eu/base.html b/app/themes/starts_eu/templates/starts_eu/base.html deleted file mode 100644 index e430cf72..00000000 --- a/app/themes/starts_eu/templates/starts_eu/base.html +++ /dev/null @@ -1,112 +0,0 @@ - - -{% load i18n pages_tags mezzanine_tags staticfiles keyword_tags event_tags organization_tags %} -{% get_language_info_list for LANGUAGES as languages %} - - - - - - -- {% for link in host_organization.links.all %} --
- {{ link.title }}
-
- {% endfor %}
-
- ---
-
-
-
- -
-
- {% with host_organization.images|get_type:"logo_header" as images %}
- {% if images %}
- {% with images|first as img %}
-
- {% endwith %}
- {% endif %}
- {% endwith %}
-
-
- {% endif %}
- {% endif %}
- {% if page.in_menu %}
- {% if page.content_model == "link" %}
- {% with page.link.link_images.all|first as link_image %}
- {% if link_image %}
- -
-
-
- {% else %}
- -
- {{ page.title }}
-
- {% endif %}
- {% endwith %}
- {% else %}
- -
- {{ page.title }}
- {% if page.has_children_in_menu %}
- {% page_menu page "pages/menus/header_tree_primary.html" %}
- {% endif %}
-
- {% endif %}
- {% endif %}
- {% if page.is_primary %}
- {% if forloop.last %}
-
- {# - #}
- {# {% include "includes/languages.html" %}#}
- {#
#}
- -
-
-
-
-
- {% endif %} - {% endif %} - {% endfor %} -{% endif %} -{% endspaceless %} diff --git a/app/themes/starts_eu/templates/starts_eu/pages/page.html b/app/themes/starts_eu/templates/starts_eu/pages/page.html deleted file mode 100644 index aacc0242..00000000 --- a/app/themes/starts_eu/templates/starts_eu/pages/page.html +++ /dev/null @@ -1,174 +0,0 @@ -{% extends "starts_eu/base.html" %} -{% load i18n mezzanine_tags keyword_tags organization_tags pages_tags %} - -{% block meta_title %}{{ page.meta_title }}{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% keywords_for page as keywords %} -{% for keyword in keywords %} - {% if not forloop.first %}, {% endif %} - {{ keyword }} -{% endfor %} -{% endmetablock %}{% endblock %} - -{% block meta_description %}{% metablock %} -{{ page.description }} -{% endmetablock %}{% endblock %} - -{% block main %} - - {% block hero %} - {% endblock %} - -- {% include 'core/inc/logo.html' %} -
-{% trans "Styles" %}
-- {% for tweet in tweets %} --
-
- {% if tweet.retweeter_full_name %}
-
- {% else %}
-
- {% endif %}
-
-
-
-
- {% endfor %}
-
-{% endif %} diff --git a/app/themes/vertigo_starts_eu/__init__.py b/app/themes/vertigo_starts_eu/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/app/themes/vertigo_starts_eu/templates/accounts/account_form.html b/app/themes/vertigo_starts_eu/templates/accounts/account_form.html deleted file mode 100644 index 6df7f222..00000000 --- a/app/themes/vertigo_starts_eu/templates/accounts/account_form.html +++ /dev/null @@ -1,25 +0,0 @@ -{% extends "vertigo_starts_eu/pages/page.html" %} -{% load i18n mezzanine_tags %} - -{% block meta_title %} - {% trans "Login" %} -{% endblock %} - -{% block page_title %} -- {% if tweet.retweeter_full_name %} - {{ tweet.retweeter_full_name }} @{{ tweet.retweeter_user_name }} - {% else %} - {{ tweet.full_name }} @{{ tweet.user_name }} - {% endif %} - {% blocktrans with sometime=tweet.created_at|timesince %}{{ sometime }} ago{% endblocktrans %} -
-- {{ tweet.text|safe }}
-- {% comment %} - - {% endcomment %} -
{% trans "Login" %}
-{% endblock %} - -{% block page_content %} -{% errors_for form %} - -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/accounts/account_login.html b/app/themes/vertigo_starts_eu/templates/accounts/account_login.html deleted file mode 100644 index 70a79c0b..00000000 --- a/app/themes/vertigo_starts_eu/templates/accounts/account_login.html +++ /dev/null @@ -1,28 +0,0 @@ -{% extends "accounts/account_form.html" %} -{% load i18n mezzanine_tags %} - -{% block meta_title %} - {% trans "Page not found" %} -{% endblock %} - -{% block page_class %} - custompage -{% endblock %} - -{% block page_title %} -{% trans "Login" %}
-{% endblock %} - -{% block page_content %} -{% if request.user.is_authenticated %} -{% trans "You're already logged in. If you'd like to log in as a different user, you'll need to log out first." %}
-{% else %} - {{ block.super }} - {% url "signup" as signup_url %} - {% url "mezzanine_password_reset" as password_reset_url %} - {% url "profile_update" as profile_update_url %} - {% block message %} - {% blocktrans %}You can also reset your password if you've forgotten it.
{% endblocktrans %} - {% endblock %} -{% endif %} -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/accounts/account_password_reset.html b/app/themes/vertigo_starts_eu/templates/accounts/account_password_reset.html deleted file mode 100644 index d9c35a63..00000000 --- a/app/themes/vertigo_starts_eu/templates/accounts/account_password_reset.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends "accounts/account_login.html" %} -{% load i18n %} - -{% block page_content %} -{{ block.super }} -{% endblock %} - -{% block message %} -{% trans "Enter your username or email address and you'll receive an email with a link you need to click, in order to log in and change your password." %}
-{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/accounts/account_profile.html b/app/themes/vertigo_starts_eu/templates/accounts/account_profile.html deleted file mode 100644 index b97d15f8..00000000 --- a/app/themes/vertigo_starts_eu/templates/accounts/account_profile.html +++ /dev/null @@ -1,29 +0,0 @@ -{% extends "vertigo_starts_eu/pages/page.html" %} -{% load i18n mezzanine_tags accounts_tags %} - -{% block meta_title %}{{ profile_user|username_or:"get_full_name" }}{% endblock %} -{% block title %}{{ profile_user|username_or:"get_full_name" }}{% endblock %} -{% block body_id %}account{% endblock %} - -{% block breadcrumb_menu %} -{{ block.super }} -{% trans "Update profile" %} - {% endif %} -
{{ profile_user.get_full_name }}
- {% for field, value in profile_user|profile_fields %} -{{ field }}
-{{ value|linebreaksbr }}
- {% endfor %} -{% trans "You're already logged in. If you'd like to create a new account, you'll need to log out first." %}
-{% else %} - {{ block.super }} - {% if settings.ACCOUNTS_APPROVAL_REQUIRED %} -{% trans "After signing up, your account will be reviewed for approval. You'll receive an email when your account is activated." %}
- {% elif settings.ACCOUNTS_VERIFICATION_REQUIRED %} -{% trans "After signing up, you'll receive an email with a link you need to click, in order to activate your account." %}
- {% endif %} -{% endif %} - -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/accounts/includes/user_panel.html b/app/themes/vertigo_starts_eu/templates/accounts/includes/user_panel.html deleted file mode 100644 index f26b08fd..00000000 --- a/app/themes/vertigo_starts_eu/templates/accounts/includes/user_panel.html +++ /dev/null @@ -1,37 +0,0 @@ -{% load i18n mezzanine_tags accounts_tags %} - -{% if request.user.is_authenticated %} -- - {{ request.user|username_or:"email" }}
- - {% trans "Log out" %} - {% else %} - - {% trans "Log in" %} - - {% trans "Sign up" %} - {% endif %} -- {% for app in dropdown_menu_app_list %} --
- {% trans app.name %}
-
- {% endfor %}
-
- -{% if settings.USE_L10N and LANGUAGES|length > 1 %} -{% get_language_info_list for LANGUAGES as languages %} - -{% endif %} - -{% if dropdown_menu_sites and dropdown_menu_sites|length > 1 %} - -{% endif %} -- {% for model in app.models %} - {% if model.perms.add or model.perms.change or model.perms.custom %} -- {{ model.name }}
- {% endif %}
- {% endfor %}
-
-{% trans 'Recent Actions' %}
-{% trans 'My Actions' %}
- {% load log %} - {% get_admin_log 10 as admin_log for_user user %} - {% if not admin_log %} -{% trans 'None available' %}
- {% else %} -- {% for entry in admin_log %} -- {% if not entry.is_deletion %}{% endif %}{{ entry.object_repr }}{% if not entry.is_deletion %}{% endif %}
- {% endfor %}
-
- {% endif %} -{% filter capfirst %}{% trans entry.content_type.name %}{% endfilter %}
{% trans "Dashboard" %}
{% endblock %} - -{% block content %}{{ error }}
-{% endfor %} -{% endif %} -{% if no_site_permission %} -{% trans "You don't have permission to access the admin for this site." %}
-{% endif %} - - - -{% endblock %} - diff --git a/app/themes/vertigo_starts_eu/templates/agenda/confirmation.html b/app/themes/vertigo_starts_eu/templates/agenda/confirmation.html deleted file mode 100644 index 21b35c76..00000000 --- a/app/themes/vertigo_starts_eu/templates/agenda/confirmation.html +++ /dev/null @@ -1,17 +0,0 @@ -{% extends "vertigo_starts_eu/pages/page.html" %} -{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} - -{% block meta_title %}{% trans "Confirmation" %}{% endblock %} - - -{% block page_class %} - Confirmation -{% endblock %} - -{% block page_title %} -{% trans "Confirmation" %}
-{% endblock %} - -{% block page_content %} - -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/agenda/event/includes/event_card.html b/app/themes/vertigo_starts_eu/templates/agenda/event/includes/event_card.html deleted file mode 100644 index a948df61..00000000 --- a/app/themes/vertigo_starts_eu/templates/agenda/event/includes/event_card.html +++ /dev/null @@ -1,74 +0,0 @@ -{% extends "core/inc/generic_card.html" %} -{% load i18n pages_tags mezzanine_tags media_tags organization_tags %} - -{% block metatitle %} - {{ object.title }} -{% endblock %} - -{% block title %} - {{ object.title }} -{% endblock %} - -{% block url %} - {{ object.get_absolute_url }} -{% endblock %} - -{% block image %} -{{ object.location }} - {% endif %} -{% endblock %} - -{% block btn %} - {% if object.prices.all.0|floatformat != '0' and object.prices.all|length > 0 %} - {% for price in object.prices.all %} - {% if forloop.first %} -
- {% include 'core/inc/logo.html' %} -
-{% trans "Back to events" %}
- {% include 'agenda/includes/event_linecard.html' %} -{% endblock %} - -{% block breadcrumb_menu %} - {{ block.super }} -- {% if event.trainings.all %} - {% trans "Trainers" %}
-- {% else %} - {% trans "Persons" %}
- {% endif %} -
{% trans "Events" %}
-{% trans "Past events" %}
-{{ location.title }}{% if location.room %} - {{ location.room }}{% endif %}
- {% endeditable %} -{% endblock %} - - - -{% block page_content %} - {% if location.description %} - {{Â location.description|safe }} - {% endif %} -{{ location.link }}
- -{% endblock %} - -{% block page_sidebar %} -- {{ location.address }} -
- - {% google_static_map location 900 300 15 %} - -- {% trans "Viewing events for the location" %} -
-- {% endfor %} -
- - {% if event.start and event.start|date:"H:i" != "23:59" %} - {{ event.start|time:"TIME_FORMAT" }} - {% endif %} - - {% else %} - - {% if event.start|date:"d.m.y" == event.end|date:"d.m.y" %} - {% if not periods %} - {{ event.start|date:"DATE_EVENT_FORMAT" }},
- - {% if event.end and event.end|date:"H:i" != "23:59" %} - {{ event.start|time:"TIME_FORMAT" }} - {{ event.end|time:"TIME_FORMAT" }} - {% else %} - {{ event.start|time:"TIME_FORMAT" }} - {% endif %} - {% else %} - {{ event.start|date:"DATE_EVENT_FORMAT" }},
- {% for period in periods %} - {% if period.date_to and period.date_to|date:"H:i" != "23:59" %} - {{ period.date_from|time:"TIME_FORMAT" }} - {{ period.date_to|time:"TIME_FORMAT" }} - {% else %} - {% if forloop.last or periods|length == 2 %} {% trans "and"%} {% elif not forloop.first %}, {% endif %} - {{ period.date_from|time:"TIME_FORMAT" }} - {% endif %} - {% endfor %} - {% endif %} - - {% elif event.start|date:"m.y" == event.end|date:"m.y" %} - {% if periods %} - {% with periods|same_time_in_periods as same_time_in_periods %} - {% for period in periods %} - {% if period.date_to and period.date_to|date:"H:i" != "23:59" %} - {{ period.date_from|date:"WEEK_DAY_FORMAT" }},
- {% if period|period_is_more_than_hours:4 %} - {{ period.date_from|time:"DATE_EVENT_FORMAT" }} {% trans "through" %} {{ period.date_to|time:"TIME_FORMAT" }} - {% else %} - {{ period.date_from|time:"TIME_FORMAT" }} - {% endif %} - {% else %} - {% if periods|length > 1 and not forloop.last %} - {{ period.date_from|date:"DATE_EVENT_FORMAT" }}{% if periods|length == 2 %} {% trans "and" %} {% else %},{% endif %} - {% else %} - {{ period.date_from|date:"DATE_EVENT_FORMAT" }}, - {% if periods|length > 1 and forloop.first %}{% trans "and" %}{% endif %} - {% endif %} - {% if same_time_in_periods and forloop.last %} - {{ period.date_from|time:"TIME_FORMAT" }} - {% elif not same_time_in_periods %} -
{{ period.date_from|time:"TIME_FORMAT" }} - {% endif %} - {% endif %} -
- {% endfor %} - {% endwith %} - {% else %} - {{ event.start|date:"WEEK_DAY_FORMAT" }} - {% if event.end|subtract:event.start|get_attr:"days" > 1 %} - {% trans "through" %} - {% else %} - {% trans "and" %} - {% endif %} - {{ event.end|date:"DATE_EVENT_FORMAT" }},
{{ event.start|time:"TIME_FORMAT" }} - {% if event.end and event.end|date:"H:i" != "23:59" %} - - {{ event.end|time:"TIME_FORMAT" }} - {% endif %} - {% endif %} - - {% else %} - {{ event.start|date:"DATE_EVENT_FORMAT" }} {% trans "through" %} {{ event.end|date:"DATE_EVENT_FORMAT" }},
- - {% if event.end and event.end|date:"H:i" != "23:59" %} - {{ event.start|time:"TIME_FORMAT" }} - {{ event.end|time:"TIME_FORMAT" }} - {% else %} - {{ event.start|time:"TIME_FORMAT" }} - {% endif %} - {% endif %} - - {% endif %} -{% endwith %} diff --git a/app/themes/vertigo_starts_eu/templates/agenda/includes/event_date_card.html b/app/themes/vertigo_starts_eu/templates/agenda/includes/event_date_card.html deleted file mode 100644 index 4aaa9a36..00000000 --- a/app/themes/vertigo_starts_eu/templates/agenda/includes/event_date_card.html +++ /dev/null @@ -1,12 +0,0 @@ -{% load i18n %} -{% load event_tags %} - -{% if object.start and not object.end %} - {{ object.start|date:"l j F" }}
-{% else %} - {% if object.start|date:"d.m.y" == object.end|date:"d.m.y" %} - {{ object.start|date:"l j F" }}
- {% else %} - {{ object.start|date:"j F" }} {% trans "to" %} {{ object.end|date:"j F" }} - {% endif %} -{% endif %} diff --git a/app/themes/vertigo_starts_eu/templates/agenda/includes/event_date_line.html b/app/themes/vertigo_starts_eu/templates/agenda/includes/event_date_line.html deleted file mode 100644 index fa29a3db..00000000 --- a/app/themes/vertigo_starts_eu/templates/agenda/includes/event_date_line.html +++ /dev/null @@ -1,59 +0,0 @@ -{% load event_tags pages_tags mezzanine_tags organization_tags i18n %} -{% with event.periods.all as periods %} - - {% if event.start and not event.end %} - {{ event.start|date:"DATE_EVENT_FORMAT" }} - - {% if event.start and event.start|date:"H:i" != "23:59" %} - {{ event.start|time:"TIME_FORMAT" }} - {% endif %} - - {% else %} - - {% if event.start|date:"d.m.y" == event.end|date:"d.m.y" %} - {% if not periods %} - {{ event.start|date:"DATE_EVENT_FORMAT" }} - - {% if event.end and event.end|date:"H:i" != "23:59" %} - {{ event.start|time:"TIME_FORMAT" }} - {{ event.end|time:"TIME_FORMAT" }} - {% else %} - {{ event.start|time:"TIME_FORMAT" }} - {% endif %} - {% else %} - {{ event.start|date:"DATE_EVENT_FORMAT" }} - {% for period in periods %} - {% if period.date_to and period.date_to|date:"H:i" != "23:59" %} - {{ period.date_from|time:"TIME_FORMAT" }} - {{ period.date_to|time:"TIME_FORMAT" }} - {% else %} - {% if forloop.last or periods|length == 2 %} {% trans "and"%} {% elif not forloop.first %}, {% endif %} - {{ period.date_from|time:"TIME_FORMAT" }} - {% endif %} - {% endfor %} - {% endif %} - - {% elif event.start|date:"m.y" == event.end|date:"m.y" %} - {{ event.start|date:"WEEK_DAY_FORMAT" }} - {% if event.end|subtract:event.start|get_attr:"days" > 1 %} - {% trans "through" %} - {% else %} - {% trans "and" %} - {% endif %} - {{ event.end|date:"DATE_EVENT_FORMAT" }} - {% if event.end and event.end|date:"H:i" != "23:59" %} - {{ event.start|time:"TIME_FORMAT" }} - {{ event.end|time:"TIME_FORMAT" }} - {% else %} - {{ event.start|time:"TIME_FORMAT" }} - {% endif %} - - {% else %} - {{ event.start|date:"DATE_EVENT_FORMAT" }} {% trans "through" %} {{ event.end|date:"DATE_EVENT_FORMAT" }} - - {% if event.end and event.end|date:"H:i" != "23:59" %} - {{ event.start|time:"TIME_FORMAT" }} - {{ event.end|time:"TIME_FORMAT" }} - {% else %} - {{ event.start|time:"TIME_FORMAT" }} - {% endif %} - {% endif %} - - {% endif %} -{% endwith %} diff --git a/app/themes/vertigo_starts_eu/templates/agenda/includes/event_date_slider.html b/app/themes/vertigo_starts_eu/templates/agenda/includes/event_date_slider.html deleted file mode 100644 index 6a41de20..00000000 --- a/app/themes/vertigo_starts_eu/templates/agenda/includes/event_date_slider.html +++ /dev/null @@ -1,54 +0,0 @@ -{% load event_tags pages_tags mezzanine_tags organization_tags i18n %} -{% with event.periods.all as periods %} - - {% if event.start and not event.end %} - {{ event.start|date:"DATE_EVENT_FORMAT" }},
- - {% if event.start and event.start|date:"H:i" != "23:59" %} - {{ event.start|time:"TIME_FORMAT" }} - {% endif %} - - {% else %} - - {% if event.start|date:"d.m.y" == event.end|date:"d.m.y" %} - {% if not periods %} - {{ event.start|date:"DATE_EVENT_FORMAT" }},
- - {% if event.end and event.end|date:"H:i" != "23:59" %} - {{ event.start|time:"TIME_FORMAT" }} - {{ event.end|time:"TIME_FORMAT" }} - {% else %} - {{ event.start|time:"TIME_FORMAT" }} - {% endif %} - {% else %} - {{ event.start|date:"DATE_EVENT_FORMAT" }},
- {% for period in periods %} - {% if period.date_to and period.date_to|date:"H:i" != "23:59" %} - {{ period.date_from|time:"TIME_FORMAT" }} - {{ period.date_to|time:"TIME_FORMAT" }} - {% else %} - {% if forloop.last or periods|length == 2 %} {% trans "and"%} {% elif not forloop.first %}, {% endif %} - {{ period.date_from|time:"TIME_FORMAT" }} - {% endif %} - {% endfor %} - {% endif %} - - {% elif event.start|date:"m.y" == event.end|date:"m.y" %} - {{ event.start|date:"WEEK_DAY_FORMAT" }} - {% if event.end|subtract:event.start|get_attr:"days" > 1 %} - {% trans "through" %} - {% else %} - {% trans "and" %} - {% endif %} - {{ event.end|date:"DATE_EVENT_FORMAT" }} - - {% else %} - {{ event.start|date:"DATE_EVENT_FORMAT" }} {% trans "through" %} {{ event.end|date:"DATE_EVENT_FORMAT" }},
- - {% if event.end and event.end|date:"H:i" != "23:59" %} - {{ event.start|time:"TIME_FORMAT" }} - {{ event.end|time:"TIME_FORMAT" }} - {% else %} - {{ event.start|time:"TIME_FORMAT" }} - {% endif %} - {% endif %} - - {% endif %} -{% endwith %} diff --git a/app/themes/vertigo_starts_eu/templates/agenda/includes/event_linecard.html b/app/themes/vertigo_starts_eu/templates/agenda/includes/event_linecard.html deleted file mode 100644 index b8bad92b..00000000 --- a/app/themes/vertigo_starts_eu/templates/agenda/includes/event_linecard.html +++ /dev/null @@ -1,80 +0,0 @@ -{% load i18n future mezzanine_tags event_tags keyword_tags disqus_tags organization_tags %} - -
{{ location.title }}{% if location.room %} - {{ location.room }}{% endif %}
- {% block event_detail_location %} -{{ location.address }}
-{% trans "Room" %} {{ event.location.room }}
-{{ location.link }}
-{{Â location.description|safe }}
- - {% google_static_map location 900 300 15 %} -- {% trans "Click to get the interactive map" %} -
- {% trans "Viewing events for the location" %} - {% endblock %} -
{{ training.get_language_display }}
- {% comment %} -{{ training.public_type }}
- {% endcomment %} -{{ training.level }}
- {% endif %} -{% endwith %} - -{% if event.brochure %} -- - {{ event.brochure.filename }} - -
-{% endif %} - -{% if unit_booking %} - {% if event.prices.all %} - {% if event.prices.all.0|floatformat != '0' %} - {% for price in event.prices.all %} - {% if forloop.first %} -- {% endif %} - {% if price.event_price_description.description %} - {{ price.event_price_description.description }} : - {% endif %} - {{ price.value|floatformat:"-2" }} {{ price.unit }} {% if not forloop.last %}
- {% endif %} - {% endfor %} - {% else %} -{% endif %} - {% if forloop.last %} -
- {{ event.no_price_comments }} -
- {% endif %} -- {% if event.trainings.all|length %} - {% with event.links.all as links %} - {% if links %} - - {% trans "Reserve" %} - - {% endif %} - {% endwith %} - {% else %} - - {% trans "Reserve" %} - - {% endif %} -
- {% endif %} -{% endif %} diff --git a/app/themes/vertigo_starts_eu/templates/agenda/includes/event_metainfo_line.html b/app/themes/vertigo_starts_eu/templates/agenda/includes/event_metainfo_line.html deleted file mode 100644 index 39ba95b8..00000000 --- a/app/themes/vertigo_starts_eu/templates/agenda/includes/event_metainfo_line.html +++ /dev/null @@ -1,35 +0,0 @@ -{% load i18n mezzanine_tags event_tags organization_tags %} - -- {% if event.trainings.all|length %} - {% with event.links.all as links %} - {% if links %} - - {% trans "Reserve" %} - - {% endif %} - {% endwith %} - {% else %} - - {% trans "Reserve" %} - - {% endif %} -
- {% endif %} - -{% endif %} diff --git a/app/themes/vertigo_starts_eu/templates/agenda/includes/event_metainfo_slider.html b/app/themes/vertigo_starts_eu/templates/agenda/includes/event_metainfo_slider.html deleted file mode 100644 index fe8f1dd1..00000000 --- a/app/themes/vertigo_starts_eu/templates/agenda/includes/event_metainfo_slider.html +++ /dev/null @@ -1,29 +0,0 @@ -{% load i18n mezzanine_tags event_tags %} -{% trans "Upcoming Events" %}
--{% for upcoming_event in upcoming_events %} --
-
-{% endfor %}
-
-{% endif %} -{% endblock %} - -{% block recent_events %} -{% recent_events 5 as recent_events %} -{% if recent_events %} -- {{ upcoming_event.title }} -
-{% trans "Recent Events" %}
-- {% for recent_event in recent_events %} --
-
- {% endfor %}
-
-{% endif %} -{% endblock %} - -{% block event_months %} -{% event_months as months %} -{% if months %} -- {{ recent_event.title }} -
-{% trans "Archive" %}
-{% for month in months %} - {% ifchanged month.date.year %} - {% if not forloop.first %}{% endif %} -{{ month.date.year }}
-- {% endifchanged %} --
-
- {% endfor %}
-
-{% endif %} -{% endblock %} - -{% block event_locations %} -{% event_locations as locations %} -{% if locations %} -- {{ month.date|date:"F" }} ({{ month.event_count }}) -
-{% trans "Locations" %}
--{% for location in locations %} --
-
-{% endfor %}
-
-{% endif %} -{% endblock %} - -{% block event_keywords %} -{% keywords_for mezzanine_agenda.event as tags %} -{% if tags %} -- {{ location }} ({{ location.event_count }}) -
-{% trans "Tags" %}
--{% for tag in tags %} --
-
-{% endfor %}
-
-{% endif %} -{% endblock %} - -{% comment %} -{% block event_authors %} -{% event_authors as authors %} -{% if authors %} -- {{ tag }} - ({{ tag.item_count }}) -
-{% trans "Authors" %}
--{% for author in authors %} --
-
-{% endfor %}
-
-{% endif %} -{% endblock %} - -{% block event_feeds %} -- {{ author.get_full_name|default:author.username }} - ({{ author.event_count }}) -
-{% trans "Feeds" %}
-{% if tag %} - {% trans "RSS" %} / - {% trans "Atom" %} -{% endif %} -{% if location %} - {% trans "RSS" %} / - {% trans "Atom" %} -{% endif %} -{% if author %} - {% trans "RSS" %} / - {% trans "Atom" %} -{% endif %} -{% if not tag and not location and not author %} - {% trans "RSS" %} / - {% trans "Atom" %} -{% endif %} -{% endblock %} -{% endcomment %} diff --git a/app/themes/vertigo_starts_eu/templates/base.html b/app/themes/vertigo_starts_eu/templates/base.html deleted file mode 100644 index 701b6a98..00000000 --- a/app/themes/vertigo_starts_eu/templates/base.html +++ /dev/null @@ -1,112 +0,0 @@ - - -{% load i18n pages_tags mezzanine_tags staticfiles keyword_tags event_tags organization_tags %} -{% get_language_info_list for LANGUAGES as languages %} - - - - - - -
- {% endif %} -
{{ block.title }}
-- {% trans "Downloads" %} -
--{% for file in files %} --
- {{ file.title }}
- {% if file.description %}
-
-{% endfor %}
-
diff --git a/app/themes/vertigo_starts_eu/templates/core/inc/generic_card.html b/app/themes/vertigo_starts_eu/templates/core/inc/generic_card.html deleted file mode 100644 index f3ebad5c..00000000 --- a/app/themes/vertigo_starts_eu/templates/core/inc/generic_card.html +++ /dev/null @@ -1,32 +0,0 @@ -{% load i18n pages_tags mezzanine_tags media_tags organization_tags %} - - --
- {{ file.description }} -
- {% endif %} -- {% for link in links %} -- {% firstof link.title link.url%}
- {% endfor %}
-
diff --git a/app/themes/vertigo_starts_eu/templates/core/inc/logo.html b/app/themes/vertigo_starts_eu/templates/core/inc/logo.html deleted file mode 100644 index a3167990..00000000 --- a/app/themes/vertigo_starts_eu/templates/core/inc/logo.html +++ /dev/null @@ -1,6 +0,0 @@ -{% load mezzanine_tags i18n %} -{% if images %} - {% for image in images %} -{% trans "Linked events" %}
-{% if object.related_title.title %}{{ object.related_title.title }}{% else %}{% trans "Also discover" %}{% endif %}
-{% if object.related_title.title %}{{ object.related_title.title }}{% else %}{% trans "Also discover" %}{% endif %}
-- {% block title %} - {% endblock %} - -
- - - {% block tags %} - {% endblock %} - - {% block subtitle %} - {% endblock %} - -- {% for image in slider_images %} --
-
-
-
- {{ image.title }}
- {% if image.description %}
- {{ image.description }}
- {% endif %}
- {% if image.credits %}
- {{ image.credits }}
- {% endif %}
-
-
-
- {% endfor %}
-
-{% trans "Hey there, a new account has been created and requires activation." %}
--
{% trans "Name" %}: {{ user.get_full_name }}
-{% trans "Email" %}: {{ user.email }}
-{% for field, value in user|profile_fields %} -{{ field }}: {{ value|linebreaksbr }}
-{% endfor %} --
{% trans "Please use the link below to activate it." %}
-http://{{ request.get_host }}{{ change_url }}
-{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/email/account_approve.txt b/app/themes/vertigo_starts_eu/templates/email/account_approve.txt deleted file mode 100644 index 763f0ce7..00000000 --- a/app/themes/vertigo_starts_eu/templates/email/account_approve.txt +++ /dev/null @@ -1,11 +0,0 @@ -{% load i18n accounts_tags %} -{% block main %} -{% trans "Hey there, a new account has been created and requires activation." %} - -{% trans "Name" %}: {{ user.get_full_name }} -{% trans "Email" %}: {{ user.email }} -{% for field, value in user|profile_fields %}{{ field }}: {{ value|linebreaksbr }} -{% endfor %} -{% trans "Please use the link below to activate it." %} -http://{{ request.get_host }}{{ change_url }} -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/email/account_approve_subject.txt b/app/themes/vertigo_starts_eu/templates/email/account_approve_subject.txt deleted file mode 100644 index 94b70f82..00000000 --- a/app/themes/vertigo_starts_eu/templates/email/account_approve_subject.txt +++ /dev/null @@ -1,2 +0,0 @@ -{% load i18n %} -{% trans "An account requires activation" %} diff --git a/app/themes/vertigo_starts_eu/templates/email/account_approved.html b/app/themes/vertigo_starts_eu/templates/email/account_approved.html deleted file mode 100644 index 44642ab7..00000000 --- a/app/themes/vertigo_starts_eu/templates/email/account_approved.html +++ /dev/null @@ -1,6 +0,0 @@ -{% load i18n %} -{% block main %} -{% trans "Hey there, your account has been activated." %}
-{% trans "Please use the link below to log in." %}
-http://{{ request.get_host }}{% url "login" %}
-{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/email/account_approved.txt b/app/themes/vertigo_starts_eu/templates/email/account_approved.txt deleted file mode 100644 index 746cecc0..00000000 --- a/app/themes/vertigo_starts_eu/templates/email/account_approved.txt +++ /dev/null @@ -1,6 +0,0 @@ -{% load i18n %} -{% block main %} -{% trans "Hey there, your account has been activated." %} -{% trans "Please use the link below to log in." %} -http://{{ request.get_host }}{% url "login" %} -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/email/account_approved_subject.txt b/app/themes/vertigo_starts_eu/templates/email/account_approved_subject.txt deleted file mode 100644 index e6ce5be5..00000000 --- a/app/themes/vertigo_starts_eu/templates/email/account_approved_subject.txt +++ /dev/null @@ -1,2 +0,0 @@ -{% load i18n %} -{% trans "Your account has been activated" %} diff --git a/app/themes/vertigo_starts_eu/templates/email/application_notification.html b/app/themes/vertigo_starts_eu/templates/email/application_notification.html deleted file mode 100644 index b8c71773..00000000 --- a/app/themes/vertigo_starts_eu/templates/email/application_notification.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - -Bonjour,
- -Une nouvelle candidature a été soumise :
-Nom : {{ last_name }}
-Prénom : {{ first_name }}
-Email :{{ email }}
-Message :
-{{ message }}
--
-
Le curriculum vitae ainsi que la lettre de motivation sont en pièces jointes.
-Ces informations sont disponibles sur le backoffice de http://www.ircam.fr dans l'édition de l'offre d'emploi correspondante.
- -Bonne journée ! :)
- - diff --git a/app/themes/vertigo_starts_eu/templates/email/base.html b/app/themes/vertigo_starts_eu/templates/email/base.html deleted file mode 100644 index 6030db4b..00000000 --- a/app/themes/vertigo_starts_eu/templates/email/base.html +++ /dev/null @@ -1,3 +0,0 @@ -{% block main %}{% endblock %} - -http://{{ request.get_host }} diff --git a/app/themes/vertigo_starts_eu/templates/email/base.txt b/app/themes/vertigo_starts_eu/templates/email/base.txt deleted file mode 100644 index a8416a37..00000000 --- a/app/themes/vertigo_starts_eu/templates/email/base.txt +++ /dev/null @@ -1,3 +0,0 @@ -{% block main %}{% endblock %} - -http://{{ request.get_host }} diff --git a/app/themes/vertigo_starts_eu/templates/email/comment_notification.html b/app/themes/vertigo_starts_eu/templates/email/comment_notification.html deleted file mode 100644 index 659db47d..00000000 --- a/app/themes/vertigo_starts_eu/templates/email/comment_notification.html +++ /dev/null @@ -1,17 +0,0 @@ -{% extends "email/vertigo_starts_eu/base.html" %} -{% load i18n %} - -{% block main %} -
- {% trans "A new comment has been posted on" %} - {{ obj }} -
-- {% blocktrans with submit_date=comment.submit_date user_name=comment.user_name %} - At {{ submit_date }} {{ user_name }} wrote: - {% endblocktrans %} -
-- {{ comment.comment|linebreaksbr|urlize }} -
-{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/email/comment_notification.txt b/app/themes/vertigo_starts_eu/templates/email/comment_notification.txt deleted file mode 100644 index d19ba84b..00000000 --- a/app/themes/vertigo_starts_eu/templates/email/comment_notification.txt +++ /dev/null @@ -1,12 +0,0 @@ -{% extends "email/base.txt" %} -{% load i18n %} - -{% block main %} -A new comment has been posted on {{ obj }} [http://{{ request.get_host }}{{ comment_url }}] - -{% blocktrans with submit_date=comment.submit_date user_name=comment.user_name %} -At {{ submit_date }} {{ user_name }} wrote: -{% endblocktrans %} - -{{ comment.comment }} -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/email/form_response.html b/app/themes/vertigo_starts_eu/templates/email/form_response.html deleted file mode 100644 index d035c329..00000000 --- a/app/themes/vertigo_starts_eu/templates/email/form_response.html +++ /dev/null @@ -1,13 +0,0 @@ -{% extends "email/vertigo_starts_eu/base.html" %} - -{% block main %} -{% if message %}{{ message }}
{% endif %} -{% trans "Hey there, the password reset form was used for your account." %}
-{% trans "Please use the link below to log in and update your password." %}
-http://{{ request.get_host }}{{ verify_url }}
-{% trans "If you didn't request for your password to be reset, please ignore this email." %}
-{% endblock %} - diff --git a/app/themes/vertigo_starts_eu/templates/email/password_reset_verify.txt b/app/themes/vertigo_starts_eu/templates/email/password_reset_verify.txt deleted file mode 100644 index 48b52500..00000000 --- a/app/themes/vertigo_starts_eu/templates/email/password_reset_verify.txt +++ /dev/null @@ -1,7 +0,0 @@ -{% load i18n %} -{% block main %} -{% trans "Hey there, the password reset form was used for your account." %} -{% trans "Please use the link below to log in and update your password." %} -http://{{ request.get_host }}{{ verify_url }} -{% trans "If you didn't request for your password to be reset, please ignore this email." %} -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/email/password_reset_verify_subject.txt b/app/themes/vertigo_starts_eu/templates/email/password_reset_verify_subject.txt deleted file mode 100644 index 72060ab7..00000000 --- a/app/themes/vertigo_starts_eu/templates/email/password_reset_verify_subject.txt +++ /dev/null @@ -1,2 +0,0 @@ -{% load i18n %} -{% trans "Reset your password" %} diff --git a/app/themes/vertigo_starts_eu/templates/email/signup_verify.html b/app/themes/vertigo_starts_eu/templates/email/signup_verify.html deleted file mode 100644 index 93ff38ff..00000000 --- a/app/themes/vertigo_starts_eu/templates/email/signup_verify.html +++ /dev/null @@ -1,6 +0,0 @@ -{% load i18n %} -{% block main %} -{% trans "Hey there, thanks for creating your account." %}
-{% trans "Please use the link below to activate it." %}
-http://{{ request.get_host }}{{ verify_url }}
-{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/email/signup_verify.txt b/app/themes/vertigo_starts_eu/templates/email/signup_verify.txt deleted file mode 100644 index 491d0124..00000000 --- a/app/themes/vertigo_starts_eu/templates/email/signup_verify.txt +++ /dev/null @@ -1,6 +0,0 @@ -{% load i18n %} -{% block main %} -{% trans "Hey there, thanks for creating your account." %} -{% trans "Please use the link below to activate it." %} -http://{{ request.get_host }}{{ verify_url }} -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/email/signup_verify_subject.txt b/app/themes/vertigo_starts_eu/templates/email/signup_verify_subject.txt deleted file mode 100644 index 54999b2f..00000000 --- a/app/themes/vertigo_starts_eu/templates/email/signup_verify_subject.txt +++ /dev/null @@ -1,2 +0,0 @@ -{% load i18n %} -{% trans "Activate your account" %} diff --git a/app/themes/vertigo_starts_eu/templates/errors/404.html b/app/themes/vertigo_starts_eu/templates/errors/404.html deleted file mode 100644 index ee499990..00000000 --- a/app/themes/vertigo_starts_eu/templates/errors/404.html +++ /dev/null @@ -1,21 +0,0 @@ -{% extends "vertigo_starts_eu/pages/page.html" %} - -{% load i18n %} - -{% block meta_title %} - {% trans "Page not found" %} -{% endblock %} - -{% block page_class %} - custompage -{% endblock %} - -{% block page_title %} -{% trans "Page not found" %}
-{% endblock %} - -{% block page_content %} -- {% trans "The page you requested does not exist." %} -
-{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/errors/500.html b/app/themes/vertigo_starts_eu/templates/errors/500.html deleted file mode 100644 index 454fa98c..00000000 --- a/app/themes/vertigo_starts_eu/templates/errors/500.html +++ /dev/null @@ -1,32 +0,0 @@ -{% extends "vertigo_starts_eu/base.html" %} - -{% load i18n %} - -{% block meta_title %} -{% trans "Error" %} -{% endblock %} - -{% block title %} -{% trans "Error" %} -{% endblock %} - -{% block main %} -{% trans "Error" %}
{% trans "Error" %}
-{% endblock %} - -{% block page_content %} -- {% trans "Sorry, an error occurred." %} -
-{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/generic/comments.html b/app/themes/vertigo_starts_eu/templates/generic/comments.html deleted file mode 100644 index 3394768e..00000000 --- a/app/themes/vertigo_starts_eu/templates/generic/comments.html +++ /dev/null @@ -1,18 +0,0 @@ -{% extends "vertigo_starts_eu/base.html" %} - -{% load mezzanine_tags comment_tags keyword_tags %} - -{% block meta_title %}{{ obj }}{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% keywords_for obj as tags %} -{% for tag in tags %}{% if not forloop.first %}, {% endif %}{{ tag }}{% endfor %} -{% endmetablock %}{% endblock %} - -{% block meta_description %}{% metablock %} -{{ obj.description }} -{% endmetablock %}{% endblock %} - -{% block main %} -{% comments_for obj %} -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/generic/includes/comment.html b/app/themes/vertigo_starts_eu/templates/generic/includes/comment.html deleted file mode 100644 index 260d52ca..00000000 --- a/app/themes/vertigo_starts_eu/templates/generic/includes/comment.html +++ /dev/null @@ -1,73 +0,0 @@ -{% load i18n mezzanine_tags comment_tags rating_tags %} - -{% for comment in comments_for_thread %} - -{{ comment.user_name }} - {% else %} -
-
-
- {% rating_for comment %}
-
- {% endif %}
-
-
- {% else %}
- {% endif %}
- {% endeditable %}
-
{{ comment.user_name }} - {% endif %} - - {% blocktrans with sometime=comment.submit_date|timesince %}{{ sometime }} ago{% endblocktrans %} - -
-{{ comment.comment|comment_filter }}
- {% endif %} - - {% if not comment.is_removed and comment.is_public %} - - {% trans "Link" %} - | - - {% trans "Reply" %} - - {% if settings.COMMENTS_USE_RATINGS %} -- {% if comment.is_removed %} - {% trans "Comment deleted" %} - {% else %} - {% trans "Comment awaiting approval" %} - {% endif %} - {% blocktrans with sometime=comment.submit_date|timesince %}{{ sometime }} ago{% endblocktrans %} -
- {% endif %} - - {% comment_thread comment %} - - {% if not comment.is_removed and comment.is_public or request.user.is_staff %}{% trans "There are currently no comments" %}
-{% endif %} - diff --git a/app/themes/vertigo_starts_eu/templates/generic/includes/comments.html b/app/themes/vertigo_starts_eu/templates/generic/includes/comments.html deleted file mode 100644 index 56932e3f..00000000 --- a/app/themes/vertigo_starts_eu/templates/generic/includes/comments.html +++ /dev/null @@ -1,29 +0,0 @@ -{% load i18n mezzanine_tags comment_tags %} -{% trans "Comments" %}
-{% if settings.COMMENTS_DISQUS_SHORTNAME %} -{% include "generic/includes/disqus_comments.html" %} -{% else %} - - -{% comment_thread object_for_comments %} -{% trans "New Comment" %}
- -{% endif %} -- -
-{{ title }}
-{{ description|truncatechars:100 }}
- -- {% for slider in home.dynamiccontenthomeslider_set.all %} - {% with slider.content_object.images.all|get_type:'slider' as images %} - {% if images %} --
-
-
-
-
-
-
-
-
-
-
-
-
- {% if slider.content_object.prices.all.0|floatformat != '0' and slider.content_object.prices.all|length > 0 %}
- {% for price in slider.content_object.prices.all %}
- {% if forloop.first %}
-
-
-
- {% endif %}
- {% endfor %}
- {% endif %}
-
-
-
-
-
- {% trans 'News' %}
-
- {% elif slider.content_type.model == 'event' %}
- {% if slider.content_object.category %}
-
- {{ slider.content_object.category }}
-
- {% endif %}
- {% elif slider.content_type.model == 'media' %}
-
- {{ slider.content_object|get_media_type }}
-
- {% endif %}
-
-
- {% if slider.content_type.model != 'event' %}
- {{ slider.content_object.sub_title }}
- {% endif %}
- {% if slider.content_object.start %}
- {% with slider.content_object as event %}
- {% if slider.content_object.sub_title %}
-
-
- {{ slider.content_object.description|richtext_filters|safe|truncatechars_html:200 }}
-
-
-
-
-
-
-
-
-
-
- {% endif %}
- {% endwith %}
-
- {% endfor %}
-
-{{ slider.content_object.title }}
- - {% if slider.content_type.model == 'article' %} -- {% endif %} - {% include 'agenda/includes/event_date_slider.html' %} - {% endwith %} - {% endif %} - {% if slider.content_object.location %} -
{{ slider.content_object.location }} - {% endif %} -
- {% for link in host_organization.links.all %} --
- {{ link.title }}
-
- {% endfor %}
-
- -- {% if field.label %}{% endif %} - {% if field.help_text %} - {{ field.help_text }} - {% endif %} - {{ field }} -
- {% if field.errors %} -- {% for e in field.errors %} - {% if not forloop.first %} / {% endif %}{{ e }} - {% endfor %} -
- {% endif %} -Headings
- -Heading 1
-Heading 2
-Heading 3
-Heading 4
-Heading 5
-Heading 6
- -- -
Headings with Text
- -Heading 1
-Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.
-Heading 2
-Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.
-Heading 3
-Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.
-Heading 4
-Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.
-Heading 5
-Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.
-Heading 6
-Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.
- -- -
Block Elements
- -Paragraphs and Images
- -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu volutpat enim diam eget metus. Maecenas ornare tortor.
- -
- -Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem.
- -Blockquote
- -This is a standard paragraph. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
- -This is a standard paragraph. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
- -Figure-Caption
- -Details-Summary
- -The summary element example
-The details example text. It may be styled differently based on what browser or operating system you are using.
-- -
Text Elements
- -The a element and external a element examples
-The abbr element and an abbr element with title examples
-The ACRONYM element example
-The b element example
-The cite element example
-The
-code element
exampleThe data element example
-The
-del elementexampleThe dfn element and dfn element with title examples
-The em element example
-The i element example
-The ins element example
-The kbd element example
-The mark element example
-The
- exampleThe
- exampleThe
-s elementexampleThe samp element example
-The small element example
-The span element example
-The strong element example
-The sub element example
-The sup element example
-The example
-The u element example
-The var element example
- -- -
Monospace / Preformatted
-Code block wrapped in "pre" and "code" tags
- -Monospace Text wrapped in "pre" tags
- -- -
List Types
- -Ordered List
--- List Item 1
- - List Item 2
- - List Item 3
-
- - List Item 4
-
- --- List Item 3.1
- - List Item 3.2
-
- - List Item 3.3
-
--- List Item 3.2.1
- - List Item 3.2.2
-
-Unordered List
--- List Item 1
- - List Item 2
- - List Item 3
-
- - List Item 4
-
- --- List Item 3.1
- - List Item 3.2
-
- - List Item 3.3
-
--- List Item 3.2.1
- - List Item 3.2.2
-
-Definition List
--- Definition Term 1
- - Definition Description 1
- - Definition Term 2
- - Definition Description 2
-
- -- -
Tables
- -- -
Media
- -The Audio Element:
- - -The Video Element:
- - -Embedded content:
-YouTube video (iframe):
- - -- -
Form Elements
- -The Fieldset:
- diff --git a/app/themes/vertigo_starts_eu/templates/includes/instagram.html b/app/themes/vertigo_starts_eu/templates/includes/instagram.html deleted file mode 100644 index 859eb96c..00000000 --- a/app/themes/vertigo_starts_eu/templates/includes/instagram.html +++ /dev/null @@ -1,12 +0,0 @@ -{% load instagram_client %} - -{% instagram_user_recent_media ircam_paris %} - -- - {% if current_page.has_previous %} --
-
- {% trans 'Previous page' %}
-
-
- {% endif %}
-
- {% for page in current_page.visible_page_range %}
- -
- {{ page }}
-
- {% endfor %}
-
- {% if current_page.has_next %}
- -
-
- {% trans 'Next page' %}
-
-
- {% endif %}
-
-
---
-
-
- -
-
-
- -
-
-
- -
-
-
- {% if is_event %}
- -
-
-
-
-
- -
-
-
-
-
- {% endif %}
-
diff --git a/app/themes/vertigo_starts_eu/templates/includes/sidebar.html b/app/themes/vertigo_starts_eu/templates/includes/sidebar.html deleted file mode 100644 index d3fbd0e1..00000000 --- a/app/themes/vertigo_starts_eu/templates/includes/sidebar.html +++ /dev/null @@ -1,7 +0,0 @@ -{% load i18n pages_tags mezzanine_tags staticfiles keyword_tags event_tags %} - -- {% featured_events as events %} - {% for event in events %} --
-
-
-
-
-
- {% endfor %}
-
-- {{ event.title }} -
- {% include "agenda/includes/event_metainfo_slider.html" %} -Twitter
- Â - -{% endifinstalled %} - {% include "accounts/includes/user_panel.html" %} - {% endifinstalled %} -
{% trans "Candidacies" %}
-{% endblock %} - -{% block page_content %} - - {% if candidacy %} - - {% for content in candidacy %} - {% include "job/inc/candidacy_card.html" %} - {% endfor %} - - {% else %} - -{% trans "Please come back later. There is no candidacy at the moment." %}
- - {% endif %} - -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/job/inc/candidacy_card.html b/app/themes/vertigo_starts_eu/templates/job/inc/candidacy_card.html deleted file mode 100644 index 889269fc..00000000 --- a/app/themes/vertigo_starts_eu/templates/job/inc/candidacy_card.html +++ /dev/null @@ -1,44 +0,0 @@ -{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} -{{ content.title }}
- {% endeditable %} - -- {% elif content.date_from %} - {% trans "From" %} {{ content.date_from|date:"DATE_FORMAT" }}
- {% elif content.date_to %} - {% trans "until" %}{{ content.date_to|date:"DATE_FORMAT" }}
- {% endif %} - {% endeditable %} -
- {% editable content.description %} - {{ content.description|safe }} - {% endeditable %} -
- {{ jo.title }} -
- -- {% endif %} - {% editable jo.description %} - {{ jo.description|slice:":255" }} - {% endeditable %} -
{{ job_offer.title }}
- {% endeditable %} - -{% endblock %} - -{% block page_content %} - - {% include "core/inc/messages.html" %} - - {% comment %} -{% trans "Category" %} : {{ job_offer.type }}
- {% endcomment %} - {% editable job_offer.content %} - {{ job_offer.content|richtext_filters|safe }} - {% endeditable %} - - - {% with form as job_offer.job_response %} - {% include "job/inc/job_response_form.html" %} - {% endwith %} -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/job/job_offer_list.html b/app/themes/vertigo_starts_eu/templates/job/job_offer_list.html deleted file mode 100644 index 6e2a5887..00000000 --- a/app/themes/vertigo_starts_eu/templates/job/job_offer_list.html +++ /dev/null @@ -1,32 +0,0 @@ -{% extends "vertigo_starts_eu/pages/page.html" %} -{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} - -{% block meta_title %}{% trans "Jobs" %}{% endblock %} - -{% block meta_description %}{% metablock %} -{{ job_offer.description }} -{% endmetablock %}{% endblock %} - -{% block page_class %} - job_offer -{% endblock %} - -{% block page_title %} -{% trans "Jobs" %}
-{% endblock %} - -{% block page_content %} - - {% if job_offer %} - - {% for jo in job_offer %} - {% include "job/inc/job_offer_card.html" %} - {% endfor %} - - {% else %} - -{% trans "Please come back later. There is no job offer at the moment." %}
- - {% endif %} - -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/magazine/article/article_detail.html b/app/themes/vertigo_starts_eu/templates/magazine/article/article_detail.html deleted file mode 100644 index e5f65349..00000000 --- a/app/themes/vertigo_starts_eu/templates/magazine/article/article_detail.html +++ /dev/null @@ -1,113 +0,0 @@ -{% extends "vertigo_starts_eu/pages/page.html" %} -{% load mezzanine_tags keyword_tags i18n organization_tags %} - -{% block meta_title %}{{ article.meta_title }}{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% keywords_for article as tags %} -{% for tag in tags %}{% if not forloop.first %}, {% endif %}{{ tag }}{% endfor %} -{% endmetablock %}{% endblock %} - -{% block meta_description %}{% metablock %} - {{ article.description }} -{% endmetablock %}{% endblock %} - -{% block page_class %} - article -{% endblock %} - -{% block body_class %} - {% if department_weaving_css_class %} - pattern pattern-bg {{ department_weaving_css_class }} - {% endif %} -{% endblock %} - -{% block page_title %} - - {% editable article.title %} -{{ article.title }}
- {% endeditable %} - - {% if article.sub_title %} - {% editable article.sub_title %} -{% trans "News" %}
-- - {{ brief.title }} - -
-- {{ brief.description }} -
- - - {{ brief.text_button }} -{{ brief.title }}
-{{ brief.description|truncatechars:100 }}
- {{ brief.text_button }} -{{content.content_object.title }}
-{{ topic.title }}
-{{ topic.description|slice:":255" }}
- -{{ topic.title }}
- {% endeditable %} -{{ media.title }}
- {% endeditable %} -{% endblock %} - - -{% block page_sidebar %} - ---
- {% for transcoded in media.transcoded.all %}
- {% if transcoded.mime_type == "audio/mp4" or transcoded.mime_type == "audio/mp3" %}
- {{ media.title }}{% if media.description %} {{ media.description }}{% endif %}
- {% endif %}
- {% endfor %}
-
-
- ---
-
-
- -
-
-
- -
-
-
-
-{{ media.title }}
- {% if media.description %} -- {{ media.description }} -
- {% endif %} - -- {% if audio_url %} - {{ audio }} - {% else %} - {{ audio }} - {% endif %} -
- {% if audio.description != audio|stringformat:"s" %} -{{ audio.description|truncatewords_html:200|safe }}
- {% endif %} - {% if audio_url %} - {% trans "read more" %} - {% endif %} --{% endwith %} diff --git a/app/themes/vertigo_starts_eu/templates/media/inc/playlist_audio_card.html b/app/themes/vertigo_starts_eu/templates/media/inc/playlist_audio_card.html deleted file mode 100644 index 4accaa95..00000000 --- a/app/themes/vertigo_starts_eu/templates/media/inc/playlist_audio_card.html +++ /dev/null @@ -1,20 +0,0 @@ -{% load mezzanine_tags keyword_tags i18n organization_tags staticfiles %} - -
{{ playlist.title }}
-{{playlist.title}}
-{% endif %} -{% if playlist.description %} -- {{playlist.description}} -
-{% endif %} - - - -- {% for media in playlist.medias.all %} --
- {% with media.media as media %}
- {% for transcoded in media.transcoded.all %}
- {% if transcoded.mime_type == "audio/mp4" or transcoded.mime_type == "audio/mp3" %}
- {{ media.title }}{% if media.description %} {{ media.description }}{% endif %}
- {% endif %}
- {% endfor %}
- {% endwith %}
-
- {% endfor %}
-
diff --git a/app/themes/vertigo_starts_eu/templates/media/inc/playlist_search.html b/app/themes/vertigo_starts_eu/templates/media/inc/playlist_search.html deleted file mode 100644 index 898892bf..00000000 --- a/app/themes/vertigo_starts_eu/templates/media/inc/playlist_search.html +++ /dev/null @@ -1,60 +0,0 @@ -{% extends "core/inc/search_card.html" %} -{% load i18n mezzanine_tags organization_tags %} - -{% block title %} - {{ result }} -{% endblock %} - -{% block icon %}file-{{playlist.type}}-o{% endblock %} - -{% block tags %} -- {% if playlist_url %} - {{ playlist.title }} - {% else %} - {{ playlist }} - {% endif %} -
- {% if playlist.description != playlist|stringformat:"s" %} -{{ playlist.description|truncatewords_html:200|safe }}
- {% endif %} - {% if playlist_url %} - {% trans "read more" %} - {% endif %} --{% endwith %} - -{% block image %} - {% if playlist.medias.all.0.media.poster_url %} - -
{{ media.content_object.title }}
- - {% if media.content_object.description %} -{{ media.content_object.description|truncatechars:100 }}
- {% endif %} - - {% comment %} - {% if media.content_object.poster_url %} -{% trans 'View all medias' %}
- -{{ playlist.title }}
-{{playlist.title}}
-{% endif %} -{% if playlist.description %} -- {{playlist.description}} -
-{% endif %} - -- {% endif %} - {% spaceless %} -- {{ media.title }}{% if media.description %} {{ media.description }}{% endif %}
- {% endspaceless %}
- {% if forloop.last %}
-
- {% endif %} - {% endwith %} -{% endfor %} diff --git a/app/themes/vertigo_starts_eu/templates/media/inc/playlist_video_slider.html b/app/themes/vertigo_starts_eu/templates/media/inc/playlist_video_slider.html deleted file mode 100644 index a9672773..00000000 --- a/app/themes/vertigo_starts_eu/templates/media/inc/playlist_video_slider.html +++ /dev/null @@ -1,45 +0,0 @@ -{% load mezzanine_tags %} - -{{playlist.title}}
-- {{playlist.description}} -
- {% endif %} -- {% for media in playlist.medias.all %} - {% with media.media as media %} --
-
-
-
-
-
- {{ media.title }}
-
-
-
- {% endwith %}
- {% endfor %}
-
-{{ object.title }}
-{{ playlist.title }}
- {% endeditable %} -{% endblock %} - -{% block page_sidebar %} - -{% trans "Media" %}
- {% endeditable %} -{% endblock %} - -{% block meta_title %}{% trans "Media" %}{% endblock %} - -{% block page_sidebar %} ---
-
- {% trans 'audio' %}{% if current_type == 'audio' %} {% endif %}
-
-
- -
-
- {% trans 'video' %}{% if current_type == 'video' %} {% endif %}
-
-
-
- - -{% endblock %} - -{% block page_content %} -- {% if video_url %} - {{ video }} - {% else %} - {{ video }} - {% endif %} -
- {% if video.description != video|stringformat:"s" %} -{{ video.description|truncatewords_html:200|safe }}
- {% endif %} - {% if video_url %} - {% trans "read more" %} - {% endif %} --{% endwith %} diff --git a/app/themes/vertigo_starts_eu/templates/media/video/video_detail.html b/app/themes/vertigo_starts_eu/templates/media/video/video_detail.html deleted file mode 100644 index 39537c31..00000000 --- a/app/themes/vertigo_starts_eu/templates/media/video/video_detail.html +++ /dev/null @@ -1,69 +0,0 @@ -{% extends "vertigo_starts_eu/pages/page.html" %} -{% load mezzanine_tags keyword_tags i18n organization_tags %} - -{% block meta_title %}{% trans "Media" %}{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% keywords_for person as keywords %} -{% for keyword in keywords %} - {% if not forloop.first %}, {% endif %} - {{ keyword }} -{% endfor %} -{% endmetablock %}{% endblock %} - -{% block page_class %} - media -{% endblock %} - -{% block page_title %} - {% editable media.title %} -
{{ media.title }}
- {% endeditable %} -{% endblock %} - -{% block page_sidebar %} - -- {{ media.description }} -
- {% endif %} - -- {% spaceless %} -- {{ media.title }}
- {% endspaceless %}
-
- -{% endblock %} - -{% block page_video %} - -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/media/video/video_overlay.html b/app/themes/vertigo_starts_eu/templates/media/video/video_overlay.html deleted file mode 100644 index e3390dd3..00000000 --- a/app/themes/vertigo_starts_eu/templates/media/video/video_overlay.html +++ /dev/null @@ -1,69 +0,0 @@ -{% load mezzanine_tags keyword_tags i18n organization_tags %} - -- {% spaceless %} -- {{ media.title }}
- {% endspaceless %}
-
- ---
-
-
- -
-
-
- -
-
-
-
-{{ media.title }}
- {% if media.description %} -- {{ media.description }} -
- {% endif %} - -{{ person_list_block.title }}
-{{ person_list_block.description }}
- {% endif %} - -{{ person_list_block.title }}
-{{ person_list_block.description }}
- {% endif %} - -{{ person.first_name }} {{ person.last_name }}
- - {% if person.description %} -{{ person.first_name }} {{ person.last_name }}
- - {% if person.description %} -- {% for organization in organizations %} --
-
-
-
- {{ organization.name }}
-
-
- {{ organization.city }}, {{ organization.country.name }}
-
-
- {{ organization.type }}, {{ organization.type.css_class }}
-
-
- {{ organization.description }}
-
-
-
- {% comment %}
- {{ organization.name }}
- {% endif %}
- {% endwith %}
-
-- {{ organization.lat }}
- {{ organization.lon }}
- {{ organization.city }}
- {{ organization.country.name }}
- - - {% with organization.links|get_type_link:'link' as links %} - {% if links %} - {{ links.first }} - {% endif %} - {% endwith %} -
- - {% with organization.images.all|get_type:'logo' as images %} - {% if images %} -
- {% endcomment %} - - {% endfor %} -
{% trans "Timesheet" %}
-{% endblock %} - -{% block page_content %} - - Back to dashboard - - - - -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/network/person_activity_timesheet/person_activity_timesheet_list.html b/app/themes/vertigo_starts_eu/templates/network/person_activity_timesheet/person_activity_timesheet_list.html deleted file mode 100644 index 78aba877..00000000 --- a/app/themes/vertigo_starts_eu/templates/network/person_activity_timesheet/person_activity_timesheet_list.html +++ /dev/null @@ -1,41 +0,0 @@ -{% extends "vertigo_starts_eu/pages/page.html" %} -{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} - -{% block meta_title %}{% trans "Timesheet" %}{% endblock %} - -{% block page_class %} - time_sheet -{% endblock %} - -{% block page_title %} -{% trans "Timesheet" %}
-{% endblock %} - -{% block page_content %} - - Declare this month - {{ timesheets_by_project }} - {% if timesheets_by_year %} - {% for year_k, year_v in timesheets_by_year.items %} -{{ year_k }}
- {% for project_k, project_v in year_v.items %} -{{ project_k }}
-{% trans "No timesheet." %}
- - {% endif %} - -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/network/person_detail.html b/app/themes/vertigo_starts_eu/templates/network/person_detail.html deleted file mode 100644 index 2c34d1a2..00000000 --- a/app/themes/vertigo_starts_eu/templates/network/person_detail.html +++ /dev/null @@ -1,162 +0,0 @@ -{% extends "vertigo_starts_eu/pages/page.html" %} -{% load mezzanine_tags keyword_tags i18n organization_tags pages_tags %} - -{% block meta_title %}{{ person.meta_title }}{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% keywords_for person as keywords %} -{% for keyword in keywords %} - {% if not forloop.first %}, {% endif %} - {{ keyword }} -{% endfor %} -{% endmetablock %}{% endblock %} - -{% block page_class %} - person -{% endblock %} - -{% block breadcrumb_menu %} - {{ block.super }} -{{ person.title }}
- {% endeditable %} - - {% with person.images.all|get_type:'page_featured' as card_images %} - {% if card_images %} -{% trans 'Email' %} : {{ person_email }}
{% elif person.email %}{% trans 'Email' %} : {{ person.email|unspam }}
{% endif %} - - {% with person.activities.all as activities %} - {% if activities %} - {#{% trans 'Activities' %}
#} -- {% with activities.0 as activity %} --
- {% with activity.teams.all as teams %}
- {% with activity.organizations.all|is_not_host as organizations %}
- {% with activity.employers.all|is_not_host as employers %}
- {% if teams %}
- {% trans 'Team' %} :
- {% for team in teams %}
- {{ team.name }}
- {% if organizations %}({% for organization in organizations %}{{ organization.name }}{% if not forloop.last %}, {% endif %}{% endfor %})
- {% elif employers %}({% for employer in employers %}{{ employer.name }}{% if not forloop.last %}, {% endif %}{% endfor %}){% endif %}
-
- {% endwith %}
-
- {% endif %} - {% endwith %} - -{% endblock %} - -{% block page_related_content %} - -{% if related.event %} -- {% endfor %} - {% endif %} - {% endwith %} - {% endwith %} - {% endwith %} -
{% trans "Linked events" %}
-{% trans "Linked contents" %}
-{% trans 'Links' %}
- {% include 'core/inc/link.html' %} - {% endif %} - {% endwith %} -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/network/person_detail_multiple_activities.html b/app/themes/vertigo_starts_eu/templates/network/person_detail_multiple_activities.html deleted file mode 100644 index 6f31591e..00000000 --- a/app/themes/vertigo_starts_eu/templates/network/person_detail_multiple_activities.html +++ /dev/null @@ -1,109 +0,0 @@ -{% extends "vertigo_starts_eu/pages/page.html" %} -{% load mezzanine_tags keyword_tags i18n organization_tags pages_tags %} - -{% block meta_title %}{{ person.meta_title }}{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% keywords_for person as keywords %} -{% for keyword in keywords %} - {% if not forloop.first %}, {% endif %} - {{ keyword }} -{% endfor %} -{% endmetablock %}{% endblock %} - -{% block page_class %} - person -{% endblock %} - -{% block breadcrumb_menu %} - {{ block.super }} -{{ person.title }}
- {% endeditable %} -{% endblock %} - -{% block page_content %} - {% editable person.bio %} - {{ person.bio|richtext_filters|safe }} - {% endeditable %} - -{% trans 'Email' %} : {{ person_email }}
- - {% if person.activities.all|length > 0 %} -{% trans 'Activities' %}
-- {% for activity in person.activities.all %} --
- {% comment %}
- {% if activity.function %}
- {% trans 'Function'%} : {{ activity.function }}
- {% endfor %}
-
- {% endif %} -{% endblock %} - -{% block page_sidebar %} - {% if person.images.all %} - {% with person.images.all|get_type:'page_featured' as images %} - {% if images.first %} -- {% endif %} - {% if activity.status %} - {% trans 'Status'%} : {{ activity.status }}
- {% endif %} - {% endcomment %} - {% with activity.teams.all as teams %} - {% if teams %} - {% trans 'Team' %} : - {% for team in teams %} - {{ team.name }}{% if not forloop.last %}, {% endif %} - {% endfor %} -
- {% endif %} - {% endwith %} - {% with activity.organizations.all as organizations %} - {% with activity.employers.all as employers %} - {% if organizations %} - {% trans 'Organization' %} : - {% for organization in organizations %} - {{ organization.name }}{% if not forloop.last %}, {% endif %} - {% endfor %} -
- {% elif employers %} - {% trans 'Organization' %} : - {% for employer in employers %} - {{ employer.name }}{% if not forloop.last %}, {% endif %} - {% endfor %} -
- {% endif %} - {% endwith %} - {% endwith %} - {% if activity.date_from or activity.date_to %} - {% if not activity.date_from and not activity.date_to|date_year_higher_than:10 %} - {% trans 'Period' %} : {% trans 'to' %} {{ activity.date_to }}
- {% elif not activity.date_to %} - {% trans 'Period'%} : {% trans 'from' %} {{ activity.date_from }}
- {% else %} - {% trans 'Period'%} : {% trans 'from' %} {{ activity.date_from }} {% if not activity.date_to|date_year_higher_than:10 %}{% trans 'to' %} {{ activity.date_to }}{% endif %}
- {% endif %} - {% endif %} -
{% trans 'Links' %}
- {% include 'core/inc/link.html' %} - {% endif %} - {% endwith %} -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/network/person_list.html b/app/themes/vertigo_starts_eu/templates/network/person_list.html deleted file mode 100644 index e69de29b..00000000 diff --git a/app/themes/vertigo_starts_eu/templates/pages/custompage.html b/app/themes/vertigo_starts_eu/templates/pages/custompage.html deleted file mode 100644 index bb3a6b94..00000000 --- a/app/themes/vertigo_starts_eu/templates/pages/custompage.html +++ /dev/null @@ -1,102 +0,0 @@ -{% extends "vertigo_starts_eu/pages/page.html" %} -{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} - - {% with page.custompage as object %} - {% block page_class %} - custompage - {% endblock %} - - {% block body_class %} - {% with page.get_ascendants|last as top_level_parent %} - {% if top_level_parent.get_content_model.weaving_css_class %} - pattern pattern-bg {{ top_level_parent.get_content_model.weaving_css_class }} - {% endif %} - {% endwith %} - {% endblock %} - - {% block page_title %} - {% editable page.custompage.title %} -{{ page.custompage.title }}
- {% endeditable %} - {% endblock %} - - {% block page_content %} - - {% with page.get_ascendants|last as top_level_parent %} - {% if linked_organization_content and research_slug == top_level_parent.slug %} - {% include 'pages/page/includes/linked_organization_content.html' %} - {% endif %} - {% endwith %} - - {% if page.custompage.sub_title %} - {% editable page.custompage.sub_title %} -{{ page.departmentpage.sub_title }}
- {% endeditable %} - -{% endblock %} - -{% block page_content %} - - {{ linked_organization_content.all }} - {% if linked_organization_content and research_slug == page.departmentpage.slug %} - {% include 'pages/page/includes/linked_organization_content.html' %} - {% endif %} - - {% if page.departmentpage.content %} - {% editable page.departmentpage.content %} - {{ page.departmentpage.content|richtext_filters|safe }} - {% endeditable %} - {% endif %} - -{% endblock %} - -{% block page_audio %} - {% with page as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_slider %} - {% with page as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_video %} - {% with page as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_sub_content %} - {% with page.blocks.all as blocks %} - {% include "core/inc/block.html" %} - {% endwith %} -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/pages/form.html b/app/themes/vertigo_starts_eu/templates/pages/form.html deleted file mode 100644 index 13a81908..00000000 --- a/app/themes/vertigo_starts_eu/templates/pages/form.html +++ /dev/null @@ -1,73 +0,0 @@ -{% extends "vertigo_starts_eu/pages/page.html" %} -{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} - -{% with page as object %} - - {% block page_class %} - custompage - {% endblock %} - - {% block body_class %} - {% with page.get_ascendants|last as top_level_parent %} - {% if top_level_parent.get_content_model.weaving_css_class %} - pattern pattern-bg {{ top_level_parent.get_content_model.weaving_css_class }} - {% endif %} - {% endwith %} - {% endblock %} - - {% block page_title %} - {% editable page.title %} -{{ page.title }}
- {% endeditable %} - {% endblock %} - - {% block page_content %} - -- {% endif %} - {% endif %} - {% if page.in_menu %} - {% if forloop.first and not page.parent.in_menu and not page.is_primary %} - {% endif %} --
- {{ page.title }}
-
- {% endif %}
- {% if page.is_primary %}
- {% if forloop.last %}
-
-
- {% endif %} - {% endif %} - {% endfor %} -{% endif %} -{% endspaceless %} diff --git a/app/themes/vertigo_starts_eu/templates/pages/menus/admin.html b/app/themes/vertigo_starts_eu/templates/pages/menus/admin.html deleted file mode 100644 index 13d48544..00000000 --- a/app/themes/vertigo_starts_eu/templates/pages/menus/admin.html +++ /dev/null @@ -1,57 +0,0 @@ -{% load pages_tags i18n staticfiles mezzanine_tags organization_tags %} - -- {% for page in page_branch %} - {% ifchanged page.in_menus %} - {% for menu in page.in_menus %} - {% if page.branch_level == 0 %} --
-
-
- +
- -
-
- {% set_page_permissions page %}
- {% if page.perms.delete %}
-
- {% else %}
-
- {% endif %}
- {% if page.perms.change %}
- {{ page.title.strip|default:" " }}
- | {{ page.content_model }}
- {% else %}
- {{ page.title }}
- - {{ page.content_model }}
- {% endif %}
-
-
-
-
- {% if page.perms.add %}
-
- {% endif %}
-
-
-
- {% endfor %}
-
diff --git a/app/themes/vertigo_starts_eu/templates/pages/menus/breadcrumb.html b/app/themes/vertigo_starts_eu/templates/pages/menus/breadcrumb.html deleted file mode 100644 index bf40eaf8..00000000 --- a/app/themes/vertigo_starts_eu/templates/pages/menus/breadcrumb.html +++ /dev/null @@ -1,31 +0,0 @@ -{% load i18n pages_tags %} - -{% if on_home %} --
{{ menu|get_mezzanine_menu_name }}
-- {% endif %} - {% endfor %} - {% endifchanged %} -
- {% if page.has_children %}{% page_menu page %}{% endif %} -
--
- {{ page.title }}
- {% if page.is_current %}
-
- {% endif %}
- {% if page.is_current_or_ascendant %}
- {% if page.has_children_in_menu %}
- {% page_menu page %}
- {% endif %}
- {% endif %}
- {% if page.is_primary and page.is_current_or_ascendant %}
-
- {% endif %} - {% endif %} - {% endfor %} - {% endif %} - {% if branch_level == 1 %} - {% for page in page_branch %} - {% if page.in_menu and page.in_menus|first %} -- {% include "pages/menus/current_tree_summary.html" %} -
- {% endif %} -- {% page_menu page %} -
-- {% include "pages/menus/current_tree_summary.html" %} -
- {% endif %} - {% if page.is_current_or_ascendant and not page.has_children_in_menu %} -- {% include "pages/menus/current_tree_summary.html" %} -
- {% endif %} -- {% endif %} - {% if page.in_menu and page.has_children_in_menu %} - {% if page.is_primary and page.is_current_or_ascendant %} --
- {% trans 'Home' %}
-
- {% endif %}
- {% if page.is_current_or_ascendant %}
- {% if page.has_children_in_menu %}
- {% page_menu page %}
- {% endif %}
- {% endif %}
- {% if page.is_primary and page.is_current_or_ascendant %}
- {% endif %}
- {% elif page.in_menu and current_page.in_menus == page.in_menus %}
- -
- {{page.title}}
-
- {% endif %}
- {% if forloop.last %}
-
- {% endif %} - {% endfor %} - {% endif %} - {% if branch_level == 1 %} - {% for page in page_branch %} -- {% page_menu page %} -
-- {% include "pages/menus/current_tree_summary.html" %} -
- {% endif %} - {% if page.is_current_or_ascendant and not page.has_children_in_menu %} -- {% include "pages/menus/current_tree_summary.html" %} -
- {% endif %} -- {% endif %} - {% if page.is_current_or_ascendant %} - {% if page.has_children_in_menu %} - {% page_menu page %} - {% endif %} - {% endif %} - {% if page.is_primary and page.is_current_or_ascendant %} -
- {% else %} -- {% include "pages/menus/current_tree_summary.html" %} -
- {% endif %} - {% endif %} - {% endif %} - {% endfor %} - {% elif branch_level == 1 %} - {% for page in page_branch %} - {% if page.is_current_or_ascendant and page.has_children_in_menu %} -- {% include "pages/menus/current_tree_summary.html" %} -
- {% endif %} - {% endfor %} - {% elif branch_level == 2 %} - {% for page in page_branch %} -- {% include "pages/menus/current_tree_summary.html" %} -
- {% endif %} -- {% for page in page_branch %} - {% if not has_home and page.is_primary and forloop.first %} --
- {% trans "Home" %}
-
- {% endif %}
- {% if page.in_menu %}
- -
- {{ page.title }}{% if page.has_children_in_menu %}{% endif %}
- {% if page.has_children_in_menu %}{% page_menu page %}{% endif %}
-
- {% endif %}
- {% endfor %}
-
- {% else %} -- {% for page in page_branch %} - {% if page.in_menu %} --
- {{ page.title }}
- {% if page.has_children_in_menu %}{% page_menu page %}{% endif %}
-
- {% endif %}
- {% endfor %}
-
- {% endif %} -{% endif %} -{% endspaceless %} diff --git a/app/themes/vertigo_starts_eu/templates/pages/menus/footer_horizontal.html b/app/themes/vertigo_starts_eu/templates/pages/menus/footer_horizontal.html deleted file mode 100644 index 8b849302..00000000 --- a/app/themes/vertigo_starts_eu/templates/pages/menus/footer_horizontal.html +++ /dev/null @@ -1,25 +0,0 @@ -{% load i18n pages_tags staticfiles organization_tags %} -{% get_language_info_list for LANGUAGES as languages %} - -{% spaceless %} -{% if page_branch_in_menu %} - {% for page in page_branch %} - {% if page.is_primary %} - {% if forloop.first %} -- {% endif %} - {% endif %} - {% if page.in_menu %} --
- {{ page.title }}
-
- {% endif %}
-
- {% if page.is_primary %}
- {% if forloop.last %}
-
- {% endif %} - {% endif %} - {% endfor %} -{% endif %} -{% endspaceless %} diff --git a/app/themes/vertigo_starts_eu/templates/pages/menus/footer_tree.html b/app/themes/vertigo_starts_eu/templates/pages/menus/footer_tree.html deleted file mode 100644 index a1c8c99a..00000000 --- a/app/themes/vertigo_starts_eu/templates/pages/menus/footer_tree.html +++ /dev/null @@ -1,31 +0,0 @@ -{% load i18n pages_tags %} - -{% spaceless %} -{% if page_branch_in_menu %} -- {% for page in page_branch %} - - {% if not has_home and page.is_primary and forloop.first %} --
- {% trans "Home" %}
-
- {% endif %}
-
- {% if page.in_menu %}
- -
- {{ page.title }}
- {# remove this if tag to always show all nav items #}
- {% if page.is_current_or_ascendant and page.has_children_in_menu %}
- {% page_menu page %}
- {% endif %}
-
- {% endif %}
-
- {% endfor %}
-
-{% endif %} -{% endspaceless %} diff --git a/app/themes/vertigo_starts_eu/templates/pages/menus/footer_vertical.html b/app/themes/vertigo_starts_eu/templates/pages/menus/footer_vertical.html deleted file mode 100644 index 2f58e8ff..00000000 --- a/app/themes/vertigo_starts_eu/templates/pages/menus/footer_vertical.html +++ /dev/null @@ -1,25 +0,0 @@ -{% load i18n pages_tags staticfiles %} -{% get_language_info_list for LANGUAGES as languages %} - -{% spaceless %} -{% if page_branch_in_menu %} - {% for page in page_branch %} - {% if page.is_primary %} - {% if forloop.first %} -- {% endif %} - {% endif %} - {% if page.in_menu %} --
- {{ page.title }}
-
- {% endif %}
-
- {% if page.is_primary %}
- {% if forloop.last %}
-
- {% endif %} - {% endif %} - {% endfor %} -{% endif %} -{% endspaceless %} diff --git a/app/themes/vertigo_starts_eu/templates/pages/menus/header.html b/app/themes/vertigo_starts_eu/templates/pages/menus/header.html deleted file mode 100644 index d82a800b..00000000 --- a/app/themes/vertigo_starts_eu/templates/pages/menus/header.html +++ /dev/null @@ -1,64 +0,0 @@ -{% load i18n pages_tags staticfiles mezzanine_tags organization_tags %} -{% get_language_info_list for LANGUAGES as languages %} - -{% spaceless %} -{% if page_branch_in_menu %} - {% for page in page_branch %} - {% if page.is_primary %} - {% if forloop.first %} ---
-
-
-
- -
-
- {% with host_organization.images|get_type:"logo_header" as images %}
- {% if images %}
- {% with images|first as img %}
-
- {% endwith %}
- {% endif %}
- {% endwith %}
-
-
- {% endif %}
- {% endif %}
- {% if page.in_menu %}
- {% if page.content_model == "link" %}
- {% with page.link.link_images.all|first as link_image %}
- {% if link_image %}
- -
-
-
- {% else %}
- -
- {{ page.title }}
-
- {% endif %}
- {% endwith %}
- {% else %}
- -
- {{ page.title }}
- {% if page.has_children_in_menu %}
- {% page_menu page "pages/menus/header_tree_primary.html" %}
- {% endif %}
-
- {% endif %}
- {% endif %}
- {% if page.is_primary %}
- {% if forloop.last %}
-
- -
- {% include "includes/languages.html" %}
-
- -
-
-
-
-
- {% endif %} - {% endif %} - {% endfor %} -{% endif %} -{% endspaceless %} diff --git a/app/themes/vertigo_starts_eu/templates/pages/menus/header_tree_primary.html b/app/themes/vertigo_starts_eu/templates/pages/menus/header_tree_primary.html deleted file mode 100644 index a0eb55e5..00000000 --- a/app/themes/vertigo_starts_eu/templates/pages/menus/header_tree_primary.html +++ /dev/null @@ -1,31 +0,0 @@ -{% load i18n pages_tags mezzanine_tags media_tags organization_tags staticfiles %} -{% get_language_info_list for LANGUAGES as languages %} - -{% spaceless %} -{% if page_branch_in_menu %} -- {{ page.departmentpage.description|richtext_filters|safe|truncatechars:415 }} -
---
- {{ page.title }}
-
- {% endif %}
- {% if page.has_children_in_menu %}
- {% page_menu page "pages/menus/header_tree_secondary.html" %}
- {% endif %}
-
-
- {% endfor %} --- {% trans "Home" %}
- {% endif %}
-
- {% if page.is_current_or_ascendant and not page.is_current_child %}
- {% if page.has_children_in_menu %}{% page_menu page %}{% endif %}
- {% endif %}
-
- {% if page.is_current_child %}
- -
- {{ page.title }}
-
- {% endif %}
-
- {% if page.is_primary and forloop.last %}
-
- {% endif %} - -{% endfor %} -{% endif %} -{% endspaceless %} diff --git a/app/themes/vertigo_starts_eu/templates/pages/menus/primary.html b/app/themes/vertigo_starts_eu/templates/pages/menus/primary.html deleted file mode 100644 index e0be3193..00000000 --- a/app/themes/vertigo_starts_eu/templates/pages/menus/primary.html +++ /dev/null @@ -1,20 +0,0 @@ -{% load pages_tags i18n %} - -{% spaceless %} -- {% for page in page_branch %} - {% if not has_home and page.is_primary and forloop.first %} --
- {% trans "Home" %}
-
- {% endif %}
- {% if page.in_menu %}
- -
- {{ page.title }}
-
- {% endif %}
- {% endfor %}
-
-
-{% endspaceless %} diff --git a/app/themes/vertigo_starts_eu/templates/pages/menus/tree.html b/app/themes/vertigo_starts_eu/templates/pages/menus/tree.html deleted file mode 100644 index 36108084..00000000 --- a/app/themes/vertigo_starts_eu/templates/pages/menus/tree.html +++ /dev/null @@ -1,26 +0,0 @@ -{% load i18n pages_tags %} - -{% spaceless %} -{% if page_branch_in_menu %} -- {% for page in page_branch %} - {% if not has_home and page.is_primary and forloop.first %} --
- {% trans "Home" %}
-
- {% endif %}
- {% if page.in_menu %}
- -
- {{ page.title }}
- {# wrap the next line with 'if page.is_current_or_ascendant' #}
- {# to only show child pages in the menu for the current page #}
- {% if page.has_children_in_menu %}{% page_menu page %}{% endif %}
-
- {% endif %}
- {% endfor %}
-
-{% endif %} -{% endspaceless %} diff --git a/app/themes/vertigo_starts_eu/templates/pages/menus/vous_etes.html b/app/themes/vertigo_starts_eu/templates/pages/menus/vous_etes.html deleted file mode 100644 index b9f5a902..00000000 --- a/app/themes/vertigo_starts_eu/templates/pages/menus/vous_etes.html +++ /dev/null @@ -1,26 +0,0 @@ -{% load pages_tags mezzanine_tags i18n %} - -{% if page_branch_in_menu %} - {% nevercache %} - ---
- {% trans "You are" %}
-
- {% for page in page_branch %}
- {% if page.in_menu %}
- -
- {{ page.title }}
-
- {% endif %}
- {% endfor %}
-
- {% endnevercache %} -{% endif %} diff --git a/app/themes/vertigo_starts_eu/templates/pages/mutations-creations.html b/app/themes/vertigo_starts_eu/templates/pages/mutations-creations.html deleted file mode 100644 index f64461f2..00000000 --- a/app/themes/vertigo_starts_eu/templates/pages/mutations-creations.html +++ /dev/null @@ -1,106 +0,0 @@ -{% extends "vertigo_starts_eu/pages/page.html" %} -{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} - - {% with page.custompage as object %} - {% block page_class %} - custompage - {% endblock %} - - {% block body_class %} - {% with page.get_ascendants|last as top_level_parent %} - {% if top_level_parent.get_content_model.weaving_css_class %} - pattern pattern-bg {{ top_level_parent.get_content_model.weaving_css_class }} - {% endif %} - {% endwith %} - {% endblock %} - - {% block hero %} - {% include "home/inc/hero-small.html" %} - {% endblock %} - - {% block page_title %} - {% editable page.custompage.title %} -{{ page.custompage.title }}
- {% endeditable %} - {% endblock %} - - {% block page_content %} - - {% with page.get_ascendants|last as top_level_parent %} - {% if linked_organization_content and research_slug == top_level_parent.slug %} - {% include 'pages/page/includes/linked_organization_content.html' %} - {% endif %} - {% endwith %} - - {% if page.custompage.sub_title %} - {% editable page.custompage.sub_title %} -{% trans "Newsletter" %}
-{% endblock %} - -{% block page_content %} - -{% trans "Sign up for our monthly newsletter to keep up to date with the institute's activities every month and be eligible to take advantage of special offers from our partners." %}
- - -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/pages/page.html b/app/themes/vertigo_starts_eu/templates/pages/page.html deleted file mode 100644 index ab00704b..00000000 --- a/app/themes/vertigo_starts_eu/templates/pages/page.html +++ /dev/null @@ -1,174 +0,0 @@ -{% extends "vertigo_starts_eu/base.html" %} -{% load i18n mezzanine_tags keyword_tags organization_tags pages_tags %} - -{% block meta_title %}{{ page.meta_title }}{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% keywords_for page as keywords %} -{% for keyword in keywords %} - {% if not forloop.first %}, {% endif %} - {{ keyword }} -{% endfor %} -{% endmetablock %}{% endblock %} - -{% block meta_description %}{% metablock %} -{{ page.description }} -{% endmetablock %}{% endblock %} - -{% block main %} - - {% block hero %} - {% endblock %} - -- {% include 'core/inc/logo.html' %} -
-- {% for loc in linked_organization_content %} - {% if loc.images.all %} - {% with loc.images|get_type:"logo_black"|first as img %} --
-
-
-
-
- {% endwith %}
- {% endif %}
- {% endfor %}
-
-- {% for lof in linked_organization_footer_2 %} --
- {{ lof.name}}
-
- {% endfor %}
-
diff --git a/app/themes/vertigo_starts_eu/templates/pages/page/includes/page_box.html b/app/themes/vertigo_starts_eu/templates/pages/page/includes/page_box.html deleted file mode 100644 index e02485bb..00000000 --- a/app/themes/vertigo_starts_eu/templates/pages/page/includes/page_box.html +++ /dev/null @@ -1,24 +0,0 @@ -{% load mezzanine_tags organization_tags %} - -{{ object.title }}
-{{ page.projecttopicpage.title }}
- {% endeditable %} -{% endblock %} - -{% block page_content %} - {% with page.get_ascendants|last as top_level_parent %} - {% if linked_organization_content and research_slug == top_level_parent.slug %} - {% include 'pages/page/includes/linked_organization_content.html' %} - {% endif %} - {% endwith %} - - {% if page.projecttopicpage.sub_title %} - {% editable page.projecttopicpage.sub_title %} -{{ sub_topic.name }}
- {% if sub_topic.description %} -- {{ sub_topic.description }} -
- {% endif %} - {% if sub_topic.projects.all %} -- - {{ project }} - -
-- {{ project.description }} -
- -{{ page.title }}
- {% endeditable %} -{% endblock %} - -{% block page_content %} - {% with page.get_ascendants|last as top_level_parent %} - {% if linked_organization_content and research_slug == top_level_parent.slug %} - {% include 'pages/page/includes/linked_organization_content.html' %} - {% endif %} - {% endwith %} - {% if page.teampage.sub_title %} - {% editable page.teampage.sub_title %} --
{% trans "Research topics and related projects" %}
- {% include 'projects/inc/project_list.html' %} -{% trans "European and national projects" %}
- {% with leader_projects as projects %} - {% include 'projects/inc/project_list.html' %} - {% endwith %} - {% with partner_projects as projects %} - {% include 'projects/inc/project_list.html' %} - {% endwith %} --
{% trans 'Team' %}
- {% for status in statuses %} - {% with page.teampage.team|get_team_persons:status as persons %} - {% if persons %} - {% if persons|length == 1 %}{{ status.name }}{% else %}{{ status.description }}{% endif %} : - {% for person in persons %} - {{ person.title }}{% if not forloop.last %}, {% endif %} - {% endfor %} -
- {% endif %} - {% endwith %} - {% endfor %} -
- {% endif %} -
{{ block.title }}
- {% endeditable %} - {% if block.description %} -- {% trans "Login" %} -
- {% endif %} -
- - {{ project }} - -
-- {{ project.description }} -
-Thank you for applying for the Vertigo Call for Projects and your interest in hosting an artist.
-With the submission of data and documents about your project, you declare, that you are allowed to establish a cooperation with an artist funded by the Vertigo project.
-We will keep you informed about the further project selection process.
- -{# You submitted the following data:#} - -If you wish to change the information or would like to add further information, please send an email containing the new information to vertigo@iuk.fraunhofer.de.
- -Best regards,
- --The VERTIGO team -
http://vertigo.starts.eu
diff --git a/app/themes/vertigo_starts_eu/templates/projects/project/includes/project_card.html b/app/themes/vertigo_starts_eu/templates/projects/project/includes/project_card.html deleted file mode 100644 index ef64bbd6..00000000 --- a/app/themes/vertigo_starts_eu/templates/projects/project/includes/project_card.html +++ /dev/null @@ -1,31 +0,0 @@ -{% extends "core/inc/generic_card.html" %} -{% load i18n pages_tags mezzanine_tags media_tags organization_tags %} - -{% block metatitle %} - {{ object.title }} -{% endblock %} - -{% block title %} - {{ object.title }} -{% endblock %} - -{% block url %} - {{ object.get_absolute_url }} -{% endblock %} -{% block image %} - {% with object.images.all|get_type:'card' as images %} - {% if images %} -{{ object.title }}
- {% endeditable %} - - {% if object.description %} - {% editable object.description %} -- {% trans "Login" %} -
{{ object.title }}
- {% endeditable %} - - {% with page.get_ascendants|last as top_level_parent %} - {% if linked_organization_content and research_slug == top_level_parent.slug %} - {% include 'pages/page/includes/linked_organization_content.html' %} - {% endif %} - {% endwith %} - - {% if object.description %} - {% editable object.description %} ---
- {% trans "Home" %}
-
- -
- {{ page.title }}
-
- -
- {{ object.title }}
-
-
-{% endblock %} - -{% block page_link %} - {% with object.links.all as links %} - {% if links %} - {% include 'core/inc/link.html' %} - {% endif %} - {% endwith %} -{% endblock %} - -{% block page_audio %} - {% with object as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_slider %} - {% with object as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_video %} - {% with object as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_sub_content %} - {% with object.blocks.all as blocks %} - {% include "core/inc/block.html" %} - {% endwith %} -{% endblock %} - -{% block page_demo %} -{% endblock %} - -{% block page_blog %} -{% endblock %} - -{% block logo %} -{% endblock %} - -{% block page_related_content %} - {% with dynamic_content=object.dynamic_content_object.all|filter_content object=object %} - {% include "core/inc/related_content.html" %} - {% endwith %} -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/projects/project_call_list.html b/app/themes/vertigo_starts_eu/templates/projects/project_call_list.html deleted file mode 100644 index e69de29b..00000000 diff --git a/app/themes/vertigo_starts_eu/templates/projects/project_demo_detail.html b/app/themes/vertigo_starts_eu/templates/projects/project_demo_detail.html deleted file mode 100644 index 4af41cc3..00000000 --- a/app/themes/vertigo_starts_eu/templates/projects/project_demo_detail.html +++ /dev/null @@ -1,47 +0,0 @@ -{% extends "vertigo_starts_eu/pages/page.html" %} -{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} - -{% block meta_title %}{% trans "Demo" %}{% endblock %} - -{% block meta_description %} - {% metablock %} - {{ demo.description }} - {% endmetablock %} -{% endblock %} - -{% block page_class %} - demo -{% endblock %} - -{% block breadcrumb_menu %} - {{ block.super }} ---
-
-
-
-{{ demo.title }}
- {% endeditable %} - - {% if demo.description %} - {% editable demo.description %} -- {% trans "Project" %} : {{ demo.project.title }}
- {% trans "Authors" %} : {% for author in demo.authors.all %}{{ author }}{% endfor %} - -{% endblock %} - -{% block page_sidebar %} -{% endblock %} - -{% block page_slider %} -
{{ object.title }}
- {% endeditable %} - - {% with page.get_ascendants|last as top_level_parent %} - {% if linked_organization_content and research_slug == top_level_parent.slug %} - {% include 'pages/page/includes/linked_organization_content.html' %} - {% endif %} - {% endwith %} - - {% if object.description %} - {% editable object.description %} ---
- {% trans "Home" %}
-
- -
- {{ page.title }}
-
- -
- {{ object.title }}
-
-
-{% endblock %} - -{% block page_link %} - {% with object.links.all as links %} - {% if links %} - {% include 'core/inc/link.html' %} - {% endif %} - {% endwith %} -{% endblock %} - -{% block page_audio %} - {% with object as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_slider %} - {% with object as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_video %} - {% with object as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_sub_content %} - - {% if object.type == 'external' %} ---
-
-
-
--
{% trans "Project details" %}
- -{% trans "Participants" %}
- -- {% if organization.url %} - - {% endif %} - {% endfor %} -
- {% endif %} - {% endfor %} -
-
-- {{ demo.title }}
- {% endfor %}
-
-{% trans "Demos" %}
- {% for demo in object.demos.all %} --
-- {{ blog_page.title }}
- {% endfor %}
-
-{% trans "Blog Pages" %}
- {% for blog_page in object.blog_pages.all %} -- {% if object.lead_organization %} - {% with object.lead_organization.images.all|get_type:'logo' as images %} - {% include 'core/inc/logo.html' %} - {% endwith %} - {% endif %} - {% for organization in object.organizations.all %} - {% with organization.images.all|get_type:'logo' as images %} - {% include 'core/inc/logo.html' %} - {% endwith %} - {% endfor %} -
-{% trans "Project submission form" %}
- {% endeditable %} -All fields are mandatory / required
-{% endblock %} - -{% block page_content %} -Dear {{ first_name }} {{ last_name }},
- {% include 'projects/inc/project_validation.html' %} - - diff --git a/app/themes/vertigo_starts_eu/templates/projects/project_ict_detail.html b/app/themes/vertigo_starts_eu/templates/projects/project_ict_detail.html deleted file mode 100644 index b9d35bbd..00000000 --- a/app/themes/vertigo_starts_eu/templates/projects/project_ict_detail.html +++ /dev/null @@ -1,351 +0,0 @@ -{% extends "vertigo_starts_eu/pages/page.html" %} -{% load mezzanine_tags keyword_tags i18n organization_tags pages_tags %} - -{% block meta_title %}{{ object.meta_title }}{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% keywords_for object as keywords %} -{% for keyword in keywords %} - {% if not forloop.first %}, {% endif %} - {{ keyword }} -{% endfor %} -{% endmetablock %}{% endblock %} - -{% block page_class %} - object -{% endblock %} - -{% block body_class %} - pattern pattern-bg {{ department.pages.all.0.weaving_css_class }} -{% endblock %} - -{% block breadcrumb_menu %} - {{ block.super }} -{{ object.title }}
- {% endeditable %} - - {% with page.get_ascendants|last as top_level_parent %} - {% if linked_organization_content and research_slug == top_level_parent.slug %} - {% include 'pages/page/includes/linked_organization_content.html' %} - {% endif %} - {% endwith %} - - {% if object.description %} - {% editable object.description %} ---
- {% trans "Home" %}
-
- -
- {{ page.title }}
-
- -
- {{ object.title }}
-
-
-{% endblock %} - -{% block page_link %} - {% with object.links.all as links %} - {% if links %} - {% include 'core/inc/link.html' %} - {% endif %} - {% endwith %} -{% endblock %} - -{% block page_audio %} - {% with object as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_slider %} - {% with object as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_video %} - {% with object as object %} - {{ block.super }} - {% endwith %} -{% endblock %} - -{% block page_sub_content %} - - {% if object.type == 'external' %} ---
-
-
-
--
{% trans "Project details" %}
- -{% trans "Participants" %}
- -- {% if organization.url %} - - {% endif %} - {% endfor %} -
- {% endif %} - {% endfor %} -
-
-- {{ demo.title }}
- {% endfor %}
-
-{% trans "Demos" %}
- {% for demo in object.demos.all %} --
-- {{ blog_page.title }}
- {% endfor %}
-
-{% trans "Blog Pages" %}
- {% for blog_page in object.blog_pages.all %} -- {% if object.lead_organization %} - {% with object.lead_organization.images.all|get_type:'logo' as images %} - {% include 'core/inc/logo.html' %} - {% endwith %} - {% endif %} - {% for organization in object.organizations.all %} - {% with organization.images.all|get_type:'logo' as images %} - {% include 'core/inc/logo.html' %} - {% endwith %} - {% endfor %} -
-{% trans "Framework and submission process for hosting R&D Projects" %}
- {% endeditable %} -{% endblock %} - -{% block page_content %} - -{% trans "Project submission validation" %}
- {% endeditable %} -{% endblock %} - -{% block page_content %} -Dear Submitter,
- {% include 'projects/inc/project_validation.html' %} -{% trans "Framework and submission process for producers" %}
- {% endeditable %} -{% endblock %} - -{% block page_content %} -{% trans "Producer submission form (all fields required)" %}
- {% errors_for form %} - -{% trans "New residency form" %}
- {% endeditable %} -{% endblock %} - -{% block page_content %} -- {% for key,value in filter_dict.items %} --
-
- {{ value.verbose_name }} ({{ value.count }}){% if search_model == key %}{% endif %}
-
-
- {% endfor %}
-
-- {% if results.paginator.count == 0 %} - {% blocktrans %}No results were found matching your query: {{ query }}{% endblocktrans %} - {% endif %} -
- --{% url "login" as login_url %} -{% url "signup" as signup_url %} -{% with request.path as next %} -{% blocktrans %} -If you have an existing account or would like to create one, please -log in or -sign up. -{% endblocktrans %} -{% endwith %} -
-{% endifinstalled %} -{% endif %} - -{% errors_for form %} - - - - - -{% if not settings.SHOP_CHECKOUT_STEPS_SPLIT and settings.SHOP_PAYMENT_STEP_ENABLED %} -{% include "shop/includes/payment_fields.html" %} -{% endif %} - -{% fields_for form.other_fields %} - -{% endif %} -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/shop/cart.html b/app/themes/vertigo_starts_eu/templates/shop/cart.html deleted file mode 100644 index 344e44f8..00000000 --- a/app/themes/vertigo_starts_eu/templates/shop/cart.html +++ /dev/null @@ -1,113 +0,0 @@ -{% extends "shop/vertigo_starts_eu/base.html" %} -{% load mezzanine_tags shop_tags i18n %} - -{% block meta_title %}{% trans "Your Cart" %}{% endblock %} -{% block title %}{% trans "Your Cart" %}{% endblock %} -{% block body_id %}cart{% endblock %} - -{% block breadcrumb_menu %} -{{ block.super }} -{% trans "You may also like:" %}
-{{ product }}
-{% trans "Your Cart is empty." %}
-{% endif %} -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/shop/checkout.html b/app/themes/vertigo_starts_eu/templates/shop/checkout.html deleted file mode 100644 index 663a3638..00000000 --- a/app/themes/vertigo_starts_eu/templates/shop/checkout.html +++ /dev/null @@ -1,83 +0,0 @@ -{% extends "shop/vertigo_starts_eu/base.html" %} -{% load shop_tags mezzanine_tags i18n %} - -{% block meta_title %}{% trans "Checkout" %} - {{ step_title }}{% endblock %} -{% block title %}{% trans "Checkout" %} - {% trans "Step" %} {{ step }} {% trans "of" %} {{ steps|length }}{% endblock %} -{% block body_id %}checkout{% endblock %} - -{% block extra_head %} - -{% endblock %} - -{% block breadcrumb_menu %} -{% for step in steps %} -- {% for item in request.cart %} --
- {% if item.image %}
-
- {% endif %}
-
- {{ item.quantity }} x {{ item.description }}
- {{ item.total_price|currency }}
-
-
- {% endfor %}
-
- {% order_totals %} -- {% trans "Edit Cart" %} -
{% trans "Thank you for shopping with us, your order is complete." %}
-{% trans "We've sent you a receipt via email." %}
-{% trans "You can also view your invoice using one of the links below." %}
-- -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/shop/confirmation.html b/app/themes/vertigo_starts_eu/templates/shop/confirmation.html deleted file mode 100644 index b87ee607..00000000 --- a/app/themes/vertigo_starts_eu/templates/shop/confirmation.html +++ /dev/null @@ -1,80 +0,0 @@ -{% extends "shop/checkout.html" %} -{% load i18n shop_tags %} - -{% block fields %} -{% if request.cart.has_items %} - -
{% trans "Billing Details" %}
-- - {% for field, value in form.billing_detail_fields.values %} -- {{ value }}
- {% endfor %}
-
-
-{% trans "Shipping Details" %}
-- - {% for field, value in form.shipping_detail_fields.values %} -- {{ value }}
- {% endfor %}
-
- {% for field, value in form.additional_instructions_field.values %}
- - {{ value }}
- {% endfor %}
-
-
--
{% trans "Payment Details" %}
-- - {% for field, value in form.card_name_field.values %} -- {{ value }}
- {% endfor %}
-
- {% for field, value in form.card_type_field.values %}
- - {{ value }}
- {% endfor %}
-
- -
- {% with form.card_expiry_fields.values as expiry_fields %}
- {% with expiry_fields.next as month_field %}
- {{ month_field.1 }}/{{ expiry_fields.next.1 }}
- {% endwith %}
- {% endwith %}
-
-
- {% for field, value in form.card_fields.values %}
- - {{ value }}
- {% endfor %}
-
-
-- -{% for field in form %}{{ field }}{% endfor %} - -{% endif %} -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/shop/includes/order_details.html b/app/themes/vertigo_starts_eu/templates/shop/includes/order_details.html deleted file mode 100644 index b6aa60a3..00000000 --- a/app/themes/vertigo_starts_eu/templates/shop/includes/order_details.html +++ /dev/null @@ -1,55 +0,0 @@ -{% load shop_tags i18n %} - -
{{ settings.SITE_TITLE }}
- -{% trans "Your Details" %}
-{% trans "Items Ordered" %}
-{{ settings.SITE_TITLE }}
- -{% trans "Your Details" %}
-{% trans "Items Ordered" %}
--
{{ list.title }}
- {% if list.description %} -{{ list.description }}
- {% endif %} -{{ product.title }}
- {% if product.description %} --
{{ list.title }}
- {% if list.description %} -{{ list.description }}
- {% endif %} -{{ product.title }}
- {% if product.description %} --
-{% if request.cart.total_quantity != 0 %} - - {% if request.session.order.step %}{% trans "Return to Checkout" %}{% else %}{% trans "Go to Checkout" %}{% endif %} -
-{% endif %} -{% if settings.SHOP_USE_WISHLIST %} - - -{% blocktrans count request.wishlist|length as wishlist_count %}Wishlist contains 1 item{% plural %} Wishlist contains {{ wishlist_count }} items{% endblocktrans %} -{% endif %} -{% endspaceless %} diff --git a/app/themes/vertigo_starts_eu/templates/shop/order_history.html b/app/themes/vertigo_starts_eu/templates/shop/order_history.html deleted file mode 100644 index 983ba232..00000000 --- a/app/themes/vertigo_starts_eu/templates/shop/order_history.html +++ /dev/null @@ -1,51 +0,0 @@ -{% extends "shop/vertigo_starts_eu/base.html" %} -{% load mezzanine_tags shop_tags i18n %} - -{% block meta_title %}{% trans "Order History" %}{% endblock %} -{% block title %}{% trans "Order History" %}{% endblock %} - -{% block breadcrumb_menu %} -{{ block.super }} -
{% trans "You have not ordered anything from us yet." %}
-{% endif %} - -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/shop/order_invoice.html b/app/themes/vertigo_starts_eu/templates/shop/order_invoice.html deleted file mode 100644 index 5dcda6c9..00000000 --- a/app/themes/vertigo_starts_eu/templates/shop/order_invoice.html +++ /dev/null @@ -1,5 +0,0 @@ -{% if not LANGUAGE_BIDI %} - {% include "shop/includes/order_details.html" %} -{% else %} - {% include "shop/includes/order_details_rtl.html" %} -{% endif %} diff --git a/app/themes/vertigo_starts_eu/templates/shop/order_invoice_pdf.html b/app/themes/vertigo_starts_eu/templates/shop/order_invoice_pdf.html deleted file mode 100644 index da6b04fc..00000000 --- a/app/themes/vertigo_starts_eu/templates/shop/order_invoice_pdf.html +++ /dev/null @@ -1 +0,0 @@ -{% extends "shop/order_invoice.html" %} diff --git a/app/themes/vertigo_starts_eu/templates/shop/payment.html b/app/themes/vertigo_starts_eu/templates/shop/payment.html deleted file mode 100644 index 6be458e6..00000000 --- a/app/themes/vertigo_starts_eu/templates/shop/payment.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends "shop/checkout.html" %} -{% load i18n mezzanine_tags %} - -{% block fields %} -{% if request.cart.has_items %} -{% errors_for form %} -{% include "shop/includes/payment_fields.html" %} -{% fields_for form.other_fields %} -{% endif %} -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/shop/product.html b/app/themes/vertigo_starts_eu/templates/shop/product.html deleted file mode 100644 index bfd406c5..00000000 --- a/app/themes/vertigo_starts_eu/templates/shop/product.html +++ /dev/null @@ -1,159 +0,0 @@ -{% extends "shop/vertigo_starts_eu/base.html" %} -{% load staticfiles mezzanine_tags shop_tags rating_tags i18n %} - -{% block meta_title %}{{ product.meta_title }}{% endblock %} -{% block body_id %}category{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% for keyword in product.keywords.all %} - {% if not forloop.first %}, {% endif %} - {{ keyword }} -{% endfor %} -{% endmetablock %}{% endblock %} - -{% block meta_description %}{% metablock %} -{{ product.description }} -{% endmetablock %}{% endblock %} - -{% block extra_css %} -{{ block.super }} - -{% endblock %} - -{% block extra_js %} -{{ block.super }} - - -{% endblock %} - -{% block extra_head %} -{{ block.super }} - - -{% endblock %} - -{% block breadcrumb_menu %} -{{ block.super }} -- {% for image in images %} --
-
-
-
-
- {% endfor %}
-
- -{% if images|length != 1 %} -- {% for image in images %} --
-
-
-
-
- {% endfor %}
-
-{% endif %} - -{% endspaceless %} -{% endif %} - -{% editable product.content %} -{{ product.content|richtext_filters|safe }} -{% endeditable %} - -{% if product.available and has_available_variations %} -- {% for variation in variations %} --
- {% if variation.has_price %}
- {% if variation.on_sale %}
- {{ variation.unit_price|currency }}
- {% trans "On sale:" %}
- {% endif %}
- {{ variation.price|currency }}
- {% else %}
- {% if has_available_variations %}
-
- {% trans "The selected options are currently unavailable." %}
-
- {% endif %}
- {% endif %}
-
- {% endfor %}
-
- -{% errors_for add_product_form %} - - -{% else %} -{% trans "This product is currently unavailable." %}
-{% endif %} - -{% if settings.SHOP_USE_RATINGS %} -{% trans "Related Products" %}
-{{ product }}
-{% trans "Your wishlist is empty." %}
--
{% trans "Continue Shopping" %}
-{% endif %} -{% endblock %} diff --git a/app/themes/vertigo_starts_eu/templates/styles.html b/app/themes/vertigo_starts_eu/templates/styles.html deleted file mode 100644 index 2ea8d00a..00000000 --- a/app/themes/vertigo_starts_eu/templates/styles.html +++ /dev/null @@ -1,21 +0,0 @@ -{% extends "vertigo_starts_eu/base.html" %} -{% load i18n %} - -{% block meta_title %}{% trans "Styles" %}{% endblock %} - -{% block title %}{% trans "Styles" %}{% endblock %} - -{% block main %} - -{% trans "Styles" %}
-- {% for tweet in tweets %} --
-
- {% if tweet.retweeter_full_name %}
-
- {% else %}
-
- {% endif %}
-
-
-
-
- {% endfor %}
-
-{% endif %} diff --git a/app/themes/vertigo_starts_eu/templates/vertigo_starts_eu/base.html b/app/themes/vertigo_starts_eu/templates/vertigo_starts_eu/base.html deleted file mode 100644 index c932c3ce..00000000 --- a/app/themes/vertigo_starts_eu/templates/vertigo_starts_eu/base.html +++ /dev/null @@ -1,112 +0,0 @@ - - -{% load i18n pages_tags mezzanine_tags staticfiles keyword_tags event_tags organization_tags %} -{% get_language_info_list for LANGUAGES as languages %} - - - - - - -- {% if tweet.retweeter_full_name %} - {{ tweet.retweeter_full_name }} @{{ tweet.retweeter_user_name }} - {% else %} - {{ tweet.full_name }} @{{ tweet.user_name }} - {% endif %} - {% blocktrans with sometime=tweet.created_at|timesince %}{{ sometime }} ago{% endblocktrans %} -
-- {{ tweet.text|safe }}
-- {% comment %} - - {% endcomment %} -
- {% for link in host_organization.links.all %} --
- {{ link.title }}
-
- {% endfor %}
-
- ---
-
-
-
- -
-
- {% with host_organization.images|get_type:"logo_header" as images %}
- {% if images %}
- {% with images|first as img %}
-
- {% endwith %}
- {% endif %}
- {% endwith %}
-
-
- {% endif %}
- {% endif %}
- {% if page.in_menu %}
- {% if page.content_model == "link" %}
- {% with page.link.link_images.all|first as link_image %}
- {% if link_image %}
- -
-
-
- {% else %}
- -
- {{ page.title }}
-
- {% endif %}
- {% endwith %}
- {% else %}
- -
- {{ page.title }}
- {% if page.has_children_in_menu %}
- {% page_menu page "pages/menus/header_tree_primary.html" %}
- {% endif %}
-
- {% endif %}
- {% endif %}
- {% if page.is_primary %}
- {% if forloop.last %}
-
- {# - #}
- {# {% include "includes/languages.html" %}#}
- {#
#}
- {# -
-
-
#}
-
-
- {% endif %} - {% endif %} - {% endfor %} -{% endif %} -{% endspaceless %} diff --git a/app/themes/vertigo_starts_eu/templates/vertigo_starts_eu/pages/page.html b/app/themes/vertigo_starts_eu/templates/vertigo_starts_eu/pages/page.html deleted file mode 100644 index af1ced3a..00000000 --- a/app/themes/vertigo_starts_eu/templates/vertigo_starts_eu/pages/page.html +++ /dev/null @@ -1,176 +0,0 @@ -{% extends "vertigo_starts_eu/base.html" %} -{% load i18n mezzanine_tags keyword_tags organization_tags pages_tags %} - -{% block meta_title %}{{ page.meta_title }}{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% keywords_for page as keywords %} -{% for keyword in keywords %} - {% if not forloop.first %}, {% endif %} - {{ keyword }} -{% endfor %} -{% endmetablock %}{% endblock %} - -{% block meta_description %}{% metablock %} -{{ page.description }} -{% endmetablock %}{% endblock %} - -{% block main %} - - {% block hero %} - {% endblock %} - -- {% include 'core/inc/logo.html' %} -
-