forked from rc/aircox
		
	issue#1: synchronise automatically station and programs from db. For station generate a set of usual desired pages.
This commit is contained in:
		@ -12,8 +12,8 @@
 | 
			
		||||
    <head>
 | 
			
		||||
        <meta charset="utf-8">
 | 
			
		||||
        <meta name="application-name" content="aircox-cms">
 | 
			
		||||
        <meta name="description" content="{{ settings.cms.WebsiteSettings.description }}">
 | 
			
		||||
        <meta name="keywords" content="{{ page.tags.all|default:settings.cms.WebsiteSettings.tags }}">
 | 
			
		||||
        <meta name="description" content="{{ settings.aircox_cms.WebsiteSettings.description }}">
 | 
			
		||||
        <meta name="keywords" content="{{ page.tags.all|default:settings.aircox_cms.WebsiteSettings.tags }}">
 | 
			
		||||
 | 
			
		||||
        {% with favicon=settings.cms.WebsiteSettings.favicon %}
 | 
			
		||||
            <link rel="icon" href="{{ favicon.url }}" />
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										54
									
								
								aircox_cms/templates/aircox_cms/dynamic_list_page.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								aircox_cms/templates/aircox_cms/dynamic_list_page.html
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,54 @@
 | 
			
		||||
{% extends "aircox_cms/base_site.html" %}
 | 
			
		||||
{# generic page to display list of articles #}
 | 
			
		||||
 | 
			
		||||
{% load i18n %}
 | 
			
		||||
{% load wagtailcore_tags %}
 | 
			
		||||
{% load wagtailimages_tags %}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{% block title %}
 | 
			
		||||
<h1>
 | 
			
		||||
{# Translators: titles for the page that shows a list of elements. #}
 | 
			
		||||
{# Translators: terms are search terms, or tag tarms. url: url to the page #}
 | 
			
		||||
{% with terms=list_selector.terms %}
 | 
			
		||||
{% if terms %}
 | 
			
		||||
{% blocktrans %}Search in publications for <i>{{ terms }}</i>{% endblocktrans %}
 | 
			
		||||
{% elif list_selector.filter_related %}
 | 
			
		||||
{# should never happen #}
 | 
			
		||||
{% with title=list_selector.filter_related.title url=list_selector.filter_related.url %}
 | 
			
		||||
{% blocktrans %}
 | 
			
		||||
    Related to <a href="{{ url }}">{{ title }}</a>{% endblocktrans %}
 | 
			
		||||
{% endwith %}
 | 
			
		||||
{% else %}
 | 
			
		||||
{% blocktrans %}All the publications{% endblocktrans %}
 | 
			
		||||
{% endif %}
 | 
			
		||||
{% endwith %}
 | 
			
		||||
{% endif %}
 | 
			
		||||
</h1>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
{% with related=list_selector.filter_related %}
 | 
			
		||||
    {% if related %}
 | 
			
		||||
        <div class="body summary">
 | 
			
		||||
            {% image related.cover fill-128x128 class="cover item_cover" %}
 | 
			
		||||
            {{ related.summary }}
 | 
			
		||||
            <a href="{{ related.url }}">{% trans "More about it" %}</a>
 | 
			
		||||
        </div>
 | 
			
		||||
        {% elif page.body %}
 | 
			
		||||
        <div class="body">
 | 
			
		||||
        {{ page.body|richtext }}
 | 
			
		||||
        </div>
 | 
			
		||||
        {% endif %}
 | 
			
		||||
        {% endwith %}
 | 
			
		||||
 | 
			
		||||
        {% with list_paginator=paginator %}
 | 
			
		||||
        {% include "aircox_cms/snippets/list.html" %}
 | 
			
		||||
        {% endwith %}
 | 
			
		||||
    {% endif %}
 | 
			
		||||
{% endwith %}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,61 +0,0 @@
 | 
			
		||||
{% extends "aircox_cms/base_site.html" %}
 | 
			
		||||
{# generic page to display list of articles #}
 | 
			
		||||
 | 
			
		||||
{% load i18n %}
 | 
			
		||||
{% load wagtailcore_tags %}
 | 
			
		||||
{% load wagtailimages_tags %}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{% block title %}
 | 
			
		||||
<h1>
 | 
			
		||||
{# Translators: titles for the page that shows a list of elements. #}
 | 
			
		||||
{# Translators: terms are search terms, or tag tarms. url: url to the page #}
 | 
			
		||||
{% if page.list_from_request %}
 | 
			
		||||
    {% with terms=list_selector.terms %}
 | 
			
		||||
    {% if terms %}
 | 
			
		||||
    {% blocktrans %}Search in publications for <i>{{ terms }}</i>{% endblocktrans %}
 | 
			
		||||
    {% elif list_selector.filter_related %}
 | 
			
		||||
    {# should never happen #}
 | 
			
		||||
    {% with title=list_selector.filter_related.title url=list_selector.filter_related.url %}
 | 
			
		||||
    {% blocktrans %}
 | 
			
		||||
        Related to <a href="{{ url }}">{{ title }}</a>{% endblocktrans %}
 | 
			
		||||
    {% endwith %}
 | 
			
		||||
    {% else %}
 | 
			
		||||
    {% blocktrans %}All the publications{% endblocktrans %}
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    {% endwith %}
 | 
			
		||||
{% else %}
 | 
			
		||||
{{ page.title }}
 | 
			
		||||
{% endif %}
 | 
			
		||||
</h1>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
{% if page.list_from_request %}
 | 
			
		||||
    {% with related=list_selector.filter_related %}
 | 
			
		||||
    {% if related %}
 | 
			
		||||
    <div class="body summary">
 | 
			
		||||
        {% image related.cover fill-128x128 class="cover item_cover" %}
 | 
			
		||||
        {{ related.summary }}
 | 
			
		||||
        <a href="{{ related.url }}">{% trans "More about it" %}</a>
 | 
			
		||||
    </div>
 | 
			
		||||
    {% elif page.body %}
 | 
			
		||||
    <div class="body">
 | 
			
		||||
    {{ page.body|richtext }}
 | 
			
		||||
    </div>
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    {% endwith %}
 | 
			
		||||
 | 
			
		||||
    {% with list_paginator=paginator %}
 | 
			
		||||
    {% include "aircox_cms/snippets/list.html" %}
 | 
			
		||||
    {% endwith %}
 | 
			
		||||
{% else %}
 | 
			
		||||
    <div class="body">
 | 
			
		||||
    {{ page.body|richtext }}
 | 
			
		||||
    </div>
 | 
			
		||||
{% endif %}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -57,4 +57,3 @@
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user