--- /dev/null
+# -*- 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
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('shop', '0009_product_content_model'),
+ ]
+
+ operations = [
+ migrations.RemoveField(
+ model_name='product',
+ name='content_model',
+ ),
+ ]
# HOST ORGANIZATION
host_organization = Organization.objects.get(is_host=True)
-
+ linked_organizations_content = host_organization.organizations_content.all()
+ linked_organizations_footer = host_organization.organizations_footer.all()
return {'CURRENT_SEASON': CURRENT_SEASON,
'CURRENT_SEASON_STYLED': CURRENT_SEASON_STYLED,
'NEWSLETTER_SUBSCRIBING_URL': NEWSLETTER_SUBSCRIBING_URL,
'host_organization': host_organization,
+ 'LINKED_ORGA_CONTENT' : linked_organizations_content,
+ 'LINKED_ORGA_FOOTER' : linked_organizations_footer
}
COLOR_CHOICES = (('black', _('black')), ('yellow', _('yellow')), ('red', _('red')))
ALIGNMENT_CHOICES = (('left', _('left')), ('center', _('center')), ('right', _('right')))
-IMAGE_TYPE_CHOICES = (('logo', _('logo')), ('slider', _('slider')), ('card', _('card')), ('page_slider', _('page - slider')), ('page_featured', _('page - featured')))
+IMAGE_TYPE_CHOICES = (('logo', _('logo')), ('logo_white', _('logo white')), ('logo_black', _('logo black')), ('slider', _('slider')), ('card', _('card')), ('page_slider', _('page - slider')), ('page_featured', _('page - featured')))
class Description(models.Model):
OrganizationImageInline,
OrganizationBlockInline,
OrganizationLinkInline ]
+ filter_horizontal = ['organizations_content', 'organizations_footer']
list_display = ['name', 'type', 'admin_thumb']
list_filter = ['is_on_map',]
search_fields = ['name',]
--- /dev/null
+# -*- 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)'),
+ ),
+ ]
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)
+ organizations_content = models.ManyToManyField('self', verbose_name=_('Linked organizations (in content)'), related_name='organization_main', blank=True, help_text="Usefull for host organization")
+ organizations_footer = models.ManyToManyField('self', verbose_name=_('Linked organizations (in footer)'), related_name='organization_main', blank=True, help_text="Usefull for host organization")
admin_thumb_type = 'logo'
@import 'project-details';
@import 'map-infowindow';
@import 'map-legend';
-
+@import 'linked-organizations';
// Typography modules
@import 'dashed';
@import 'dotted';
--- /dev/null
+$module: ".linked-organizations";
+
+#{$module} {
+
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+
+ &__item {
+
+ display: inline-block;
+ width: 30px;
+ height: 30px;
+ background-size: contain;
+ background-position: center center;
+ background-repeat: no-repeat;
+
+ @include margin(1 1 0 0);
+
+ a {
+ width : 30px;
+ height : 30px;
+ }
+
+ }
+
+}
--- /dev/null
+{% load organization_tags %}
+<div class="row">
+ <div class="pull-right">
+ <ul class="linked-organizations">
+ {% for loc in LINKED_ORGA_CONTENT %}
+ {% with loc.images|get_type:"logo_black"|first as img %}
+ <li class="linked-organizations__item">
+ <a href="{{ loc.url }}" title="{{ loc.title }}" target="_blank">
+ <img src="{{ MEDIA_URL }}{{ img }}" title="{{ img.title }}" />
+ </a>
+ </li>
+ {% endwith %}
+ {% endfor %}
+ </ul>
+ </div>
+</div>
--- /dev/null
+{% load organization_tags %}
+{% for lof in LINKED_ORGA_FOOTER %}
+ <a href="{{ lof.url }}" target="_blank" title="{{ lof.name }}">
+ {% with lof.images|get_type:"logo_white"|first as img %}
+ <img class="footer__partner" src="{{ MEDIA_URL }}{{ img }}" title="{{ img.title }}" width="120" height="66" />
+ {% endwith %}
+ </a>
+{% endfor %}
<div class="col-xs-4 col-sm-5 col-sm-push-1 tal">
<strong>{{ host_organization.description }}</strong><br/ >{% 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>
+ {% if LINKED_ORGA_FOOTER %}
+ {% include 'core/inc/linked_organization_footer.html' %}
+ {% endif %}
</div>
<div class="col-xs-4 col-sm-2 col-sm-push-1 tal">
{% endeditable %}
{% endif %}-->
+ {% if LINKED_ORGA_CONTENT %}
+ {% include 'core/inc/linked_organization_content.html' %}
+ {% endif %}
+
{% if page.departmentpage.content %}
{% editable page.departmentpage.content %}
{{ page.departmentpage.content|richtext_filters|safe }}
{% endblock %}
{% block page_content %}
-
+ {% if LINKED_ORGA_CONTENT %}
+ {% include 'core/inc/linked_organization_content.html' %}
+ {% endif %}
+
{% if page.projecttopicpage.sub_title %}
{% editable page.projecttopicpage.sub_title %}
<div class="chapo">
{% block page_content %}
+ {% if LINKED_ORGA_CONTENT %}
+ {% include 'core/inc/linked_organization_content.html' %}
+ {% endif %}
+
{% if page.teampage.sub_title %}
{% editable page.teampage.sub_title %}
<div class="chapo">
<h1 class="dotted">{{ project.title }}</h1>
{% endeditable %}
+ {% if LINKED_ORGA_CONTENT %}
+ {% include 'core/inc/linked_organization_content.html' %}
+ {% endif %}
+
{% if project.description %}
{% editable project.description %}
<div class="chapo">