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
-def static(request):
+def settings(request):
date_now = datetime.now()
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_page = Page.objects.filter(slug="newsletter")
+ NEWSLETTER_SUBSCRIBING_URL = ""
+ if newsletter_page:
+ NEWSLETTER_SUBSCRIBING_URL = newsletter_page.first().get_absolute_url()
+
+ host_organization = Organization.objects.get(is_host=True)
+
return {'CURRENT_SEASON': CURRENT_SEASON,
- 'CURRENT_SEASON_STYLED': CURRENT_SEASON_STYLED}
+ 'CURRENT_SEASON_STYLED': CURRENT_SEASON_STYLED,
+ 'NEWSLETTER_SUBSCRIBING_URL': NEWSLETTER_SUBSCRIBING_URL,
+ 'host_organization': host_organization,
+ }
--- /dev/null
+# -*- 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-<slug>', max_length=64, null=True, verbose_name='fontawesome icon name option'),
+ ),
+ ]
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-<slug>")
class Meta:
ordering = ['ordering', ]
--- /dev/null
+# -*- 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'},
+ ),
+ ]
'django.core.context_processors.tz',
'mezzanine.conf.context_processors.settings',
'mezzanine.pages.context_processors.page',
- 'organization.core.context_processors.static',
- 'organization.pages.context_processors.page_static',
+ 'organization.core.context_processors.settings',
)
}
}]
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
-
<meta name="keywords" content="{% block meta_keywords %}{% endblock %}">
<meta name="description" content="{% block meta_description %}{% endblock %}">
<title>{% spaceless %}{% block meta_title %}{% endblock %}{% endspaceless %}{% if settings.SITE_TITLE %} | {{ settings.SITE_TITLE }}{% endif %}</title>
{% page_menu "pages/menus/action.html" %}
</div>
<div class="col-md-1 col-md-push-1 tar">
- {% if settings.USE_MODELTRANSLATION and languages|length > 1 %}
- {% nevercache %}
- {% include "includes/language_selector.html" %}
- {% endnevercache %}
- <ul class="lang-switcher" id="langSelector">
- {% for language in languages %}
- {% if language.code == LANGUAGE_CODE %}
- <li class="lang-switcher__item active">
- <a href="#">
- {{ language.code|title }}
- </a>
- </li>
- {% endif %}
- {% endfor %}
- {% for language in languages %}
- {% if language.code != LANGUAGE_CODE %}
- <li class="lang-switcher__item">
- <a href="#" data-lang="{{ language.code }}">
- {{ language.code|title }}
- </a>
- </li>
- {% endif %}
- {% endfor %}
- </ul>
- {% endif %}
+ {% include "includes/languages.html" %}
</div>
</div>
</div>
</main>
<footer class="footer" role="footer">
- <div class="footer__pre">
- <div class="container">
- <div class="row">
- <div class="col-sm-11 tar-sm tal-xs">
- <a class="button button--small button--white mr3" href="{{ NEWSLETTER_SUBSCRIBING_URL }}">
- {% trans "Subscribe to our newsletter" %}
- </a>
- <a class="footer__follow-link facebook ml3" href="https://www.facebook.com/iIRCAM/" target="_blank" title="{% trans 'Follow us on Facebook' %}"><i class="fa fa-facebook-square"></i></a>
- <a class="footer__follow-link twitter" href="https://twitter.com/ircam" target="_blank" title="{% trans 'Follow us on Twitter' %}"><i class="fa fa-twitter-square"></i></a>
- <a class="footer__follow-link instagram" href="https://www.instagram.com/ircam_paris/" target="_blank" title="{% trans 'Follow us on Instagram' %}"><i class="fa fa-instagram"></i></a>
- <a class="footer__follow-link youtube" href="https://www.youtube.com/user/Ircam75" target="_blank" title="{% trans 'Follow us on Youtube' %}"><i class="fa fa-youtube-square"></i></a>
- <a class="footer__follow-link vimeo" href="https://vimeo.com/ircam" target="_blank" title="{% trans 'Follow us on Vimeo' %}"><i class="fa fa-vimeo-square"></i></a>
- </div>
- </div>
- </div>
- </div>
-
- <div class="footer__content">
- <div class="container">
- <div class="row">
- <div class="col-xs-3 col-sm-4 col-sm-push-1 tal">
- <a href="{% url "home" %}" title="{% trans 'Home' %}"><img src="{% static "img/logo-ircam-white.png" %}" width="151" /></a>
- </div>
- <div class="col-xs-3 col-sm-2 col-sm-push-1 tar-sm tal fsm">
- <strong>Ircam</strong><br />
- <br />
- 1 Place Igor-Stravinsky<br />
- 75004 Paris<br />
- T. +33 1 44 78 48 43
- </div>
- <div class="col-xs-3 col-sm-2 col-sm-push-1 tar-sm tal fsm">
- <strong>{% trans 'Opening times' %}</strong><br />
- <br />
- du lundi au vendredi<br />
-
09h30 – 19h00<br />
- fermé le samedi et dimanche
- </div>
- <div class="col-xs-3 col-sm-2 col-sm-push-1 tar-sm tal fsm">
- <strong>{% trans 'Subway access' %}</strong><br />
- <br />
- Hôtel de Ville, Rambuteau,<br />
- Châtelet, Les Halles
- </div>
- </div>
-
- <div class="row">
- <div class="col-sm-10 col-sm-push-1">
- <div class="footer__separator"></div>
- </div>
- </div>
-
- <div class="row">
- <div class="col-xs-4 col-sm-3 col-sm-push-1 tal">
- {% page_menu "pages/menus/footer_vertical.html" %}
- </div>
-
- <div class="col-xs-4 col-sm-5 col-sm-push-1 tal">
- <strong>Institut de Recherche et Coordination Acoustique/Musique</strong> {% trans 'under the tutelage of' %} :<br />
- <br />
- <a href="http://www.culturecommunication.gouv.fr/" target="_blank" title="Ministère de la Culture et de la Communication"><img class="footer__partner" width="120" height="66" src="{% static "img/partners/logo-ministere-culture.png" %}" /></a>
- <a href="http://www.cnrs.fr/" target="_blank" title="Centre National de la Recherche Scientifique"><img class="footer__partner" width="120" height="66" src="{% static "img/partners/logo-cnrs.png" %}" /></a>
- <a href="http://www.upmc.fr/" target="_blank" title="Université Pierre et Marie Curie"><img class="footer__partner" width="120" height="66" src="{% static "img/partners/logo-upmc.png" %}" /></a>
- <a href="http://www.inria.fr/" target="_blank" title="Inria"><img class="footer__partner" width="120" height="66" src="{% static "img/partners/logo-inria.png" %}" /></a>
- </div>
-
- <div class="col-xs-4 col-sm-2 col-sm-push-1 tal">
- {% trans 'go to' %} :
- <ul class="unstyled-list">
- <li>
- <a class="footer__link" href="https://www.centrepompidou.fr/" target="_blank" title="Centre Pompidou">Centre Pompidou</a>
- </li>
- <li>
- <a class="footer__link" href="http://www.bpi.fr/home.html" target="_blank" title="Bibliothèque Publique d’Information">Bibliothèque Publique d’Information</a>
- </li>
- </ul>
- </div>
- </div>
-
- <div class="row">
- <div class="col-sm-10 col-sm-push-1">
- <div class="footer__separator footer__seprator--small"></div>
- </div>
- </div>
-
- <div class="row">
- <div class="col-xxs-12 col-xs-8 col-sm-7 col-sm-push-1">
- {% page_menu "pages/menus/footer_horizontal.html" %}
- </div>
- <div class="col-xxs-12 col-xs-4 col-sm-3 col-sm-push-1 tar-xs tal-xxs">
- Copyright © {% current_year %} IRCAM
- </div>
- </div>
-
- </div>
- </div>
+ {% include "includes/footer.html" %}
</footer>
</div>
{% search_form %}
--- /dev/null
+{% load i18n pages_tags mezzanine_tags staticfiles keyword_tags event_tags organization_tags %}
+<div class="footer__pre">
+ <div class="container">
+ <div class="row">
+ <div class="col-sm-11 tar-sm tal-xs">
+ <a class="button button--small button--white mr3" href="{{ NEWSLETTER_SUBSCRIBING_URL }}">
+ {% trans "Subscribe to our newsletter" %}
+ </a>
+ {% for link in host_organization.links.all %}
+ <a class="footer__follow-link {{ link.link_type }}" href="{{ link.url }}" target="_blank" title="{% trans 'Follow us on' %} {{ link.title }}"><i class="fa fa-{{ link.link_type }}{% if link.fa_option %}-{{ link.fa_option }}{% endif %}"></i></a>
+ {% endfor %}
+ </div>
+ </div>
+ </div>
+</div>
+
+<div class="footer__content">
+ <div class="container">
+ <div class="row">
+ <div class="col-xs-3 col-sm-4 col-sm-push-1 tal">
+ <a href="{% url "home" %}" title="{% trans 'Home' %}"><img src="{% static "img/logo-ircam-white.png" %}" width="151" /></a>
+ </div>
+ <div class="col-xs-3 col-sm-2 col-sm-push-1 tar-sm tal fsm">
+ <strong>{{ host_organization.name }}</strong><br />
+ <br />
+ {{ host_organization.address }}<br />
+ {{ host_organization.postal_code }} {{ host_organization.city }}<br />
+ {% if host_organization.telephone %}T. {{ host_organization.telephone }}{% endif %}
+ </div>
+ <div class="col-xs-3 col-sm-2 col-sm-push-1 tar-sm tal fsm">
+ <strong>{% trans 'Opening times' %}</strong><br />
+ <br />
+ {{ host_organization.opening_times|safe }}
+ </div>
+ <div class="col-xs-3 col-sm-2 col-sm-push-1 tar-sm tal fsm">
+ <strong>{% trans 'Subway access' %}</strong><br />
+ <br />
+ {{ host_organization.subway_access|safe }}
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="col-sm-10 col-sm-push-1">
+ <div class="footer__separator"></div>
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="col-xs-4 col-sm-3 col-sm-push-1 tal">
+ {% page_menu "pages/menus/footer_vertical.html" %}
+ </div>
+
+ <div class="col-xs-4 col-sm-5 col-sm-push-1 tal">
+ <strong>{{ host_organization.description }}</strong> {% trans 'under the tutelage of' %} :<br />
+ <br />
+ <a href="http://www.culturecommunication.gouv.fr/" target="_blank" title="Ministère de la Culture et de la Communication"><img class="footer__partner" width="120" height="66" src="{% static "img/partners/logo-ministere-culture.png" %}" /></a>
+ <a href="http://www.cnrs.fr/" target="_blank" title="Centre National de la Recherche Scientifique"><img class="footer__partner" width="120" height="66" src="{% static "img/partners/logo-cnrs.png" %}" /></a>
+ <a href="http://www.upmc.fr/" target="_blank" title="Université Pierre et Marie Curie"><img class="footer__partner" width="120" height="66" src="{% static "img/partners/logo-upmc.png" %}" /></a>
+ <a href="http://www.inria.fr/" target="_blank" title="Inria"><img class="footer__partner" width="120" height="66" src="{% static "img/partners/logo-inria.png" %}" /></a>
+ </div>
+
+ <div class="col-xs-4 col-sm-2 col-sm-push-1 tal">
+ {% trans 'go to' %} :
+ <ul class="unstyled-list">
+ <li>
+ <a class="footer__link" href="https://www.centrepompidou.fr/" target="_blank" title="Centre Pompidou">Centre Pompidou</a>
+ </li>
+ <li>
+ <a class="footer__link" href="http://www.bpi.fr/home.html" target="_blank" title="Bibliothèque Publique d’Information">Bibliothèque Publique d’Information</a>
+ </li>
+ </ul>
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="col-sm-10 col-sm-push-1">
+ <div class="footer__separator footer__seprator--small"></div>
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="col-xxs-12 col-xs-8 col-sm-7 col-sm-push-1">
+ {% page_menu "pages/menus/footer_horizontal.html" %}
+ </div>
+ <div class="col-xxs-12 col-xs-4 col-sm-3 col-sm-push-1 tar-xs tal-xxs">
+ Copyright © {% current_year %} {{ host_organization.name }}. {% trans "All rights reserved" %}.
+ </div>
+ </div>
+
+ </div>
+</div>
--- /dev/null
+{% load i18n pages_tags mezzanine_tags staticfiles keyword_tags event_tags organization_tags %}
+{% if settings.USE_MODELTRANSLATION and languages|length > 1 %}
+ {% nevercache %}
+ {% include "includes/language_selector.html" %}
+ {% endnevercache %}
+ <ul class="lang-switcher" id="langSelector">
+ {% for language in languages %}
+ {% if language.code == LANGUAGE_CODE %}
+ <li class="lang-switcher__item active">
+ <a href="#">
+ {{ language.code|title }}
+ </a>
+ </li>
+ {% endif %}
+ {% endfor %}
+ {% for language in languages %}
+ {% if language.code != LANGUAGE_CODE %}
+ <li class="lang-switcher__item">
+ <a href="#" data-lang="{{ language.code }}">
+ {{ language.code|title }}
+ </a>
+ </li>
+ {% endif %}
+ {% endfor %}
+ </ul>
+{% endif %}