189 lines
6.9 KiB
HTML
189 lines
6.9 KiB
HTML
{% extends "combo/manager_base.html" %}
|
|
{% load i18n %}
|
|
{% load cells %}
|
|
{% load thumbnail %}
|
|
|
|
{% block appbar %}
|
|
<h2>{% trans 'Page' %} - {{ object.title }}</h2>
|
|
<span class="actions">
|
|
<a class="extra-actions-menu-opener"></a>
|
|
<a href="{{ object.get_online_url }}">{% trans 'see online' %}</a>
|
|
<ul class="extra-actions-menu">
|
|
<li><a href="{% url 'combo-manager-page-history' pk=object.id %}">{% trans 'history' %}</a></li>
|
|
<li><a download href="{% url 'combo-manager-page-export' pk=object.id %}">{% trans 'export' %}</a></li>
|
|
<li><a rel="popup" href="{% url 'combo-manager-page-add-child' pk=object.id %}">{% trans 'add a child page' %}</a></li>
|
|
<li><a href="{% url 'combo-manager-page-duplicate' pk=object.id %}">{% trans 'Duplicate' %}</a></li>
|
|
<li><a rel="popup" href="{% url 'combo-manager-page-delete' pk=object.id %}">{% trans 'delete' %}</a></li>
|
|
</ul>
|
|
</span>
|
|
{% endblock %}
|
|
|
|
{% block breadcrumb %}
|
|
{{ block.super }}
|
|
<a href="{% url 'combo-manager-page-view' pk=object.id %}">{% trans 'Page' %} - {{object.title }}</a>
|
|
{% endblock %}
|
|
|
|
{% block sidebar %}
|
|
<aside id="sidebar">
|
|
|
|
<div class="page-options">
|
|
<h3>{% trans 'Parameters' %}</h3>
|
|
|
|
<p>
|
|
<label>{% trans 'Title:' %}</label>
|
|
{{object.title}}
|
|
(<a rel="popup" href="{% url 'combo-manager-page-edit-title' pk=object.id %}">{% trans 'change' %}</a>)
|
|
</p>
|
|
|
|
<p>
|
|
<label>{% trans 'Slug:' %}</label>
|
|
<tt>{{ object.slug }}{% if object.sub_slug %}/{{ object.sub_slug }}{% endif %}</tt>
|
|
(<a rel="popup" href="{% url 'combo-manager-page-edit-slug' pk=object.id %}">{% trans 'change' %}</a>)
|
|
</p>
|
|
|
|
<p>
|
|
<label>{% trans 'Description:' %}</label>
|
|
{% if object.description %}{{ object.description|truncatewords:32 }}{% else %}<i>{% trans 'none' %}</i>{% endif %}
|
|
(<a rel="popup" href="{% url 'combo-manager-page-edit-description' pk=object.id %}">{% trans 'change' %}</a>)
|
|
</p>
|
|
|
|
<p>
|
|
<label>{% trans 'Template:' %}</label>
|
|
{{ object.get_template_display_name }}
|
|
{% if object.missing_template %}<span class="error">({% trans "missing" %})</span>{% endif %}
|
|
(<a rel="popup" href="{% url 'combo-manager-page-select-template' pk=object.id %}">{% trans 'change' %}</a>)
|
|
</p>
|
|
|
|
<p>
|
|
<label>{% trans 'Visibility:' %}</label>
|
|
{{ object.visibility }}
|
|
(<a rel="popup" href="{% url 'combo-manager-page-visibility' pk=object.id %}">{% trans 'change' %}</a>)
|
|
</p>
|
|
|
|
<p>
|
|
<label>{% trans 'Exclude from navigation:' %}</label>
|
|
{% if object.exclude_from_navigation %}{% trans 'yes' %}{% else %}{% trans 'no' %}{% endif %}
|
|
(<a rel="popup" href="{% url 'combo-manager-page-edit-exclude-from-navigation' pk=object.id %}">{% trans 'change' %}</a>)
|
|
</p>
|
|
|
|
<p>
|
|
<label>{% trans 'Redirection:' %}</label>
|
|
{% if object.redirect_url %}{{ object.redirect_url }}{% else %}<i>{% trans 'none' %}</i>{% endif %}
|
|
(<a rel="popup" href="{% url 'combo-manager-page-edit-redirection' pk=object.id %}">{% trans 'change' %}</a>)
|
|
</p>
|
|
|
|
<p>
|
|
<label>{% trans 'Picture:' %}</label>
|
|
{% if object.picture %}
|
|
{% if object.picture_extension != '.svg' %}
|
|
{% thumbnail object.picture "320x240" crop="50% 25%" as im %}
|
|
<img class="page-picture" src="{{im.url}}"/>
|
|
{% endthumbnail %}
|
|
{% else %}
|
|
<img class="page-picture" src="{{page.picture.url}}"/>
|
|
{% endif %}
|
|
(<a href="{% url 'combo-manager-page-remove-picture' pk=object.id %}">{% trans 'remove' %}</a>)
|
|
{% else %}<i>{% trans 'none' %}</i>{% endif %}
|
|
(<a rel="popup" href="{% url 'combo-manager-page-edit-picture' pk=object.id %}">{% trans 'change' %}</a>)
|
|
</p>
|
|
|
|
</div>
|
|
|
|
{% if object.parent_id or previous_page or next_page %}
|
|
<div class="page-options navigation">
|
|
<h3>{% trans 'Navigation' %}</h3>
|
|
<ul>
|
|
{% if object.parent_id %}
|
|
<li class="nav-up"><a href="{% url 'combo-manager-page-view' pk=object.parent_id %}">{{ object.parent.title }}</a></li>
|
|
{% endif %}
|
|
{% if previous_page %}
|
|
<li class="nav-left"><a href="{% url 'combo-manager-page-view' pk=previous_page.pk %}">{{ previous_page.title }}</a></li>
|
|
{% endif %}
|
|
{% if next_page %}
|
|
<li class="nav-right"><a href="{% url 'combo-manager-page-view' pk=next_page.pk %}">{{ next_page.title }}</a></li>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
|
|
</aside>
|
|
{% endblock %} {# sidebar #}
|
|
|
|
{% block content %}
|
|
|
|
<div id="page-content">
|
|
|
|
{% if object.redirect_url %}
|
|
<div class="infonotice">
|
|
<p>{% blocktrans with redirect_url=object.redirect_url %}This page is configured as a redirection to the URL "{{ redirect_url }}", it can also be used as a template for the pages behind this URL.{% endblocktrans %}</p>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div id="placeholders"
|
|
data-cell-order-url="{% url 'combo-manager-cell-order' page_pk=object.id %}"
|
|
>
|
|
{% for placeholder in placeholders %}
|
|
<div class="placeholder" data-placeholder-key="{{ placeholder.key }}">
|
|
<h2>{{ placeholder.name }}</h2>
|
|
<div class="cell-list">
|
|
{% for cell in placeholder.cells %}
|
|
<div id="cell-{{cell.get_reference}}" class="cell {{cell.class_name}}" data-cell-reference="{{ cell.get_reference }}">
|
|
<h3><span class="handle">⣿</span>
|
|
<span class="group1">
|
|
{{ cell.get_label }}
|
|
{% if cell.slug %} [{{cell.slug}}] {% endif %}
|
|
{% if cell.extra_css_class %}
|
|
<span class="extra-css-class">[{{ cell.extra_css_class }}]</span>
|
|
{% endif %}
|
|
<span class="additional-label">
|
|
<i>{{cell.get_additional_label|default_if_none:""}}</i></span>
|
|
</span>
|
|
{% if not cell.public %}
|
|
<span class="visibility-summary
|
|
{% if cell.restricted_to_unlogged %}visibility-off{% endif %}" title="{% trans 'Restricted visibility' %}">
|
|
{% if cell.groups.all|length %}
|
|
{% for group in cell.groups.all %}{{group.name}}{% if not forloop.last %}, {% endif %}{% endfor %}
|
|
{% else %}
|
|
{% trans "logged users" %}
|
|
{% endif %}
|
|
</span>
|
|
{% elif cell.restricted_to_unlogged %}
|
|
<span class="visibility-summary" title="{% trans 'Restricted visibility' %}">
|
|
{% trans "unlogged users" %}
|
|
</span>
|
|
{% endif %}
|
|
</h3>
|
|
<div>{% cell_form cell %}</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<div class="manager-add-new-cell">
|
|
<a href="#">{% trans 'Add a new cell' %}</a>
|
|
<div style="display: none">
|
|
<select>
|
|
{% for label, celltypes in cell_type_groups %}
|
|
{% if label %}
|
|
<optgroup label="{{label}}">
|
|
{% endif %}
|
|
{% for cell_type in celltypes %}
|
|
<option data-add-url="{% url 'combo-manager-page-add-cell' page_pk=object.id cell_type=cell_type.cell_type_str variant=cell_type.variant ph_key=placeholder.key %}"
|
|
>{{cell_type.name}}</option>
|
|
{% endfor %}
|
|
{% if label %}
|
|
</optgroup>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</select>
|
|
<button>ok</button>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|