people integration

master
fefa4ka 11 years ago
parent 79e7c10eee
commit 9689d4aeb8
  1. 39
      zsite/settings.py
  2. 17
      zsite/templates/aldryn_people/includes/people_item.html
  3. 17
      zsite/templates/aldryn_people/includes/people_items.html
  4. 22
      zsite/templates/aldryn_people/plugins/standard/people_list.html

@ -112,8 +112,9 @@ SITE_ID = 1
TEMPLATE_LOADERS = ( TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader', 'django.template.loaders.filesystem.Loader',
# important! place right before django.template.loaders.app_directories.Loader
'aldryn_boilerplates.template_loaders.AppDirectoriesLoader',
'django.template.loaders.app_directories.Loader', 'django.template.loaders.app_directories.Loader',
'django.template.loaders.eggs.Loader'
) )
MIDDLEWARE_CLASSES = ( MIDDLEWARE_CLASSES = (
@ -142,7 +143,8 @@ TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.tz', 'django.core.context_processors.tz',
'sekizai.context_processors.sekizai', 'sekizai.context_processors.sekizai',
'django.core.context_processors.static', 'django.core.context_processors.static',
'cms.context_processors.cms_settings' 'cms.context_processors.cms_settings',
'aldryn_boilerplates.context_processors.boilerplate',
) )
TEMPLATE_DIRS = ( TEMPLATE_DIRS = (
@ -176,7 +178,36 @@ INSTALLED_APPS = (
'djangocms_video', 'djangocms_video',
'reversion', 'reversion',
'pipeline', 'pipeline',
'zsite' 'zsite',
# Newsblog
'aldryn_common',
'aldryn_apphooks_config',
'aldryn_boilerplates',
'aldryn_categories',
'aldryn_newsblog',
'aldryn_people',
'aldryn_reversion',
'easy_thumbnails',
'filer',
'parler',
'sortedm2m',
'taggit',
'aldryn_bootstrap3',
'debug_toolbar',
)
ALDRYN_BOILERPLATE_NAME = 'bootstrap3'
THUMBNAIL_PROCESSORS = (
'easy_thumbnails.processors.colorspace',
'easy_thumbnails.processors.autocrop',
# 'easy_thumbnails.processors.scale_and_crop',
'filer.thumbnail_processors.scale_and_crop_with_subject_location',
'easy_thumbnails.processors.filters',
'easy_thumbnails.processors.background',
) )
LANGUAGES = ( LANGUAGES = (
@ -216,7 +247,7 @@ CMS_LANGUAGES = {
CMS_TEMPLATES = ( CMS_TEMPLATES = (
## Customize this ## Customize this
('page.html', 'Page'), ('page.html', 'Page'),
('feature.html', 'Page with Feature') ('sub_section.html', 'Page with sub menu')
) )
CMS_PERMISSION = True CMS_PERMISSION = True

@ -0,0 +1,17 @@
{% load aldryn_people_tags i18n thumbnail %}
<div class="people-item">
<h2>{{ person.name }} <span>{{ person.function }}</span></h2>
{% if person.visual %}<p class="people-visual">
{% if instance.show_links %}<a href="{{ person.get_absolute_url }}">{% endif %}
<img src="{% thumbnail person.visual 120x150 crop subject_location=person.visual.subject_location %}" alt="{{ person.name }}" />
{% if instance.show_links %}</a>{% endif %}
</p>{% endif %}
<p class="people-meta">
{% if person.phone %}{% trans "Phone:" %} <span>{{ person.phone|phoneformat }}</span><br />{% endif %}
{% if person.mobile %}{% trans "Mobile:" %} <span>{{ person.mobile|phoneformat }}</span><br />{% endif %}
{% if person.email %}{% trans "E-Mail:" %} <a href="mailto:{{ person.email }}">{{ person.email }}</a>{% endif %}
{% if instance.show_vcard and person.vcard_enabled %}<br /><a href="{% url 'download_vcard' person.slug %}" class="btn-download">{% trans "Download vCard" %}</a>{% endif %}
</p>
{% if person.description %}<div class="people-desc">{{ person.description|safe }}</div>{% endif %}
</div>

@ -0,0 +1,17 @@
{% load i18n thumbnail %}
<ul class="people-items list-unsltyled list-inline">
{% for person in people %}
<li class="people-item">
{% if person.visual %}
<p class="people-visual">
{% if instance.show_links %}<a href="{{ person.get_absolute_url }}">{% endif %}
<img src="{% thumbnail person.visual 120x150 crop subject_location=person.visual.subject_location quality=100 %}" alt="{{ person.name }}" />
{% if instance.show_links %}</a>{% endif %}
</p>
{% endif %}
<h5>{{ person.name }}</h5>
<h6>{{ person.function }}</h6>
</li>
{% endfor %}
</ul>

@ -0,0 +1,22 @@
{% load i18n thumbnail %}
<div class="plugin plugin-people">
{% if people_groups %}
{# Because of hvad I have to activate the plugin's language :( #}
{% language instance.language %}
{% for group, people_list in people_groups.items %}
{% if group.name %}
<div class="people-group">
<h2>{{ group.name }}</h2>
<div class="people-lead">{{ group.description|safe }}</div>
</div>
{% endif %}
{% include "aldryn_people/includes/people_items.html" with people=people_list %}
{% endfor %}
{% endlanguage %}
{% endif %}
{% if not people_groups %}
{% include "aldryn_people/includes/people_items.html" %}
{% endif %}
</div>
Loading…
Cancel
Save