migrations

This commit is contained in:
2018-03-15 12:42:13 +01:00
parent 29e19deebc
commit 25001e38c9
419 changed files with 44849 additions and 2142 deletions

View File

@@ -0,0 +1,26 @@
{% extends "admin/change_form.html" %}
{% load i18n djangocms_forms_tags %}
{% block submit_buttons_bottom %}{% endblock %}
{% block object-tools-items %}
{% endblock %}
{% block field_sets %}
{% if original.form_data %}
<fieldset class="module aligned">
{% for field in original.form_data %}
<div class="form-row required {{ field.name}}">
<div>
<label>
{{ field.label }}:
</label>
<p>{{ field|to_html }}</p>
</div>
</div>
{% endfor %}
</fieldset>
{% endif %}
{{ block.super }}
{% endblock %}

View File

@@ -0,0 +1,15 @@
{% extends "admin/change_list.html" %}
{% load i18n admin_urls %}
{% block object-tools %}
{% if has_export_permission %}
<ul class="object-tools">
{% block object-tools-items %}
<li>
{% url cl.opts|admin_urlname:'export' as export_url %}
<a href="{{ export_url }}" class="addlink">{% trans "Export Form Submissions" %}</a>
</li>
{% endblock %}
</ul>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,22 @@
{% extends "admin/change_form.html" %}
{% load i18n admin_urls admin_static admin_modify %}
{% block bodyclass %}{{ block.super }} export-form{% endblock %}
{% if not is_popup %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
&rsaquo; <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
&rsaquo; {% if has_change_permission %}<a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>{% else %}{{ opts.verbose_name_plural|capfirst }}{% endif %}
&rsaquo; {% trans 'Export' %} {{ opts.verbose_name|capfirst }}
</div>
{% endblock %}
{% endif %}
{% block submit_buttons_bottom %}
<div class="submit-row">
<input type="submit" value="{% trans 'Export' %}" class="default" name="export" />
</div>
{% endblock %}

View File

@@ -1,28 +1,19 @@
{% load i18n aldryn_forms_tags %}
{% if field %}
{% comment %}
{# available conditions #}
{# if field.field.required %} required{% endif %}
{% if field.errors %} error{% endif %}
{% endcomment %}
<div class="form__field reveal_self reveal reveal_animation">
{% render_form_widget field class=instance.custom_classes %}
<label for="{{ field.id_for_label }}">
{{ field.label }}
{% if field.field.required %}
<abbr title="{% trans "Required field" %}">*</abbr>
{% if field.errors %}
<p class="form__field__errors">
{% for error in field.errors %}
{{ error }}{% if not forloop.last %}<br>{% endif %}
{% endfor %}
</p>
{% endif %}
</label>
{% render_form_widget field class=instance.custom_classes %}
{% if field.errors %}
{% for error in field.errors %}
<p>{{ error }}</p>
{% endfor %}
{% endif %}
{% if field.help_text %}
<p>{{ field.help_text }}</p>
{% endif %}
{% if field.help_text %}
<p class="form__field__help_text">{{ field.help_text }}</p>
{% endif %}
</div>
{% endif %}

View File

@@ -1,21 +1,24 @@
{% load i18n cms_tags sekizai_tags %}
<form method="post"
{% if form.is_multipart %}enctype="multipart/form-data"{% endif %}
{% if instance.custom_classes %} class="{{ instance.custom_classes }}"{% endif %}>
<form method="post" action="." id="{{ instance.id }}"
{% if form.is_multipart %}enctype="multipart/form-data"{% endif %}
class="form {% if instance.custom_classes %}{{ instance.custom_classes }}{% endif %}">
{% if form.non_field_errors %}
{% for error in form.non_field_errors %}
<p>{{ error }}</p>
<p class="form__errors">{{ error }}</p>
{% endfor %}
{% endif %}
{% if form_success_url %}
<p>
{% blocktrans %}
Thank you for submitting your information, you will be
<a href="{{ form_success_url }}">redirected shortly</a>.
{% endblocktrans %}
<p class="section__text form__success">
{% if instance.success_message %}
{{ instance.success_message }}
{% else %}
{% blocktrans %}
Ihre Angaben wurden erfolgreich übermittelt. Vielen Dank!
{% endblocktrans %}
{% endif %}
</p>
{% endif %}
@@ -29,15 +32,4 @@
{% for field in form.hidden_fields %}
{{ field }}
{% endfor %}
</form>
{# INFO: this solution is currently required because we can't redirect from a plugin. #}
{% if form_success_url %}
{% addtoblock "js" %}
<script>
setTimeout(function () {
window.location.href = '{{ form_success_url }}';
}, 2000);
</script>
{% endaddtoblock %}
{% endif %}
</form>

View File

@@ -1,3 +1,6 @@
<button type="submit" {% if instance.custom_classes %} class="{{ instance.custom_classes}}"{% endif %}>
{{ instance.label }}
</button>
<div class="form__submit reveal_self reveal reveal_animation">
<button type="submit" class="button {% if instance.custom_classes %}{{ instance.custom_classes }}{% endif %}">
<span class="button__icon">{% include 'project/assets/arrow-right-long.svg' %}</span>
<span class="button__text">{{ instance.label }}</span>
</button>
</div>

View File

@@ -7,7 +7,7 @@
{% block extrahead %}
<script>window.CKEDITOR_BASEPATH = "{{ CKEDITOR_BASEPATH }}";</script>
<script src="{% static_with_version "cms/js/dist/bundle.admin.base.min.js" %}"></script>
<script src="{% static "djangocms_text_ckeditor/js/dist/bundle-bca0d2d3f4.cms.ckeditor.min.js" %}"></script>
<script src="{% static "djangocms_text_ckeditor/js/dist/bundle-d8935bb598.cms.ckeditor.min.js" %}"></script>
{% endblock %}
<script>

View File

@@ -1,26 +0,0 @@
<a href="{{ instance.file_src.url }}"
{% if instance.link_target %} target="{{ instance.link_target }}"{% endif %}
{% if instance.link_title %} title="{{ instance.link_title }}"{% endif %}
{{ instance.attributes_str }}>
{% if instance.file_name %}
{{ instance.file_name }}
{% else %}
{{ instance.file_src.label }}
{% endif %}
{% if instance.show_file_size %}
<span>{{ instance.file_src.size|filesizeformat }}</span>
{% endif %}
</a>
{% comment %}
# https://github.com/divio/django-filer/blob/master/filer/models/filemodels.py
{{ instance.file_src }}
{{ instance.file_src.extension }}
# Available variables:
{{ instance.template }}
{{ instance.file_name }}
{{ instance.link_target }}
{{ instance.link_title }}
{{ instance.show_file_size }}
{{ instance.attributes_str }}
{% endcomment %}

View File

@@ -1,26 +0,0 @@
{% load i18n %}
{% for file in folder_files %}
<a href="{{ file.url }}"
{% if instance.link_target %} target="{{ instance.link_target }}"{% endif %}
{{ instance.attributes_str }}>
{{ file }}
{% if instance.show_file_size %}
<span>{{ file.size|filesizeformat }}</span>
{% endif %}
</a>
{% if not forloop.last %}<br>{% endif %}
{% empty %}
<p>{% trans "No files were found in the specified folder." %}</p>
{% endfor %}
{% comment %}
# https://github.com/divio/django-filer/blob/master/filer/models/filemodels.py
{{ instance.folder_src }}
{{ instance.get_files }} or {{ folder_files }}
# Available variables:
{{ instance.template }}
{{ instance.link_target }}
{{ instance.show_file_size }}
{{ instance.attributes_str }}
{% endcomment %}

View File

@@ -1,51 +0,0 @@
{% load i18n staticfiles sekizai_tags cms_tags %}
<div class="djangocms-googlemap js-djangocms-googlemap"
data-zoom="{{ instance.zoom }}"
data-style="{{ instance.style }}"
data-lat="{{ instance.lat|stringformat:"f" }}"
data-lng="{{ instance.lng|stringformat:"f" }}"
data-zoom-control="{{ instance.zoom_control|lower }}"
data-street-view-control="{{ instance.street_view_control|lower }}"
data-rotate-control="{{ instance.rotate_control|lower }}"
data-scale-control="{{ instance.scale_control|lower }}"
data-fullscreen-control="{{ instance.fullscreen_control|lower }}"
data-pan-control="{{ instance.pan_control|lower }}"
data-double-click-zoom="{{ instance.double_click_zoom|lower }}"
data-draggable="{{ instance.draggable|lower }}"
data-keyboard-shortcuts="{{ instance.keyboard_shortcuts|lower }}"
data-scrollwheel="{{ instance.scrollwheel|lower }}"
data-map-type-control="{{ instance.map_type_control }}"
{% if instance.title %} title="{{ instance.title }}"{% endif %}
>
<div class="djangocms-googlemap-container js-djangocms-googlemap-container"
style="width:{{ instance.width }};height:{{ instance.height }};"></div>
{% for plugin in instance.child_plugin_instances %}
{% render_plugin plugin %}
{% endfor %}
</div>
{% addtoblock "js" %}<script src="https://maps.googleapis.com/maps/api/js{% if googlemap_key %}?key={{ googlemap_key }}{% endif %}" async defer></script>{% endaddtoblock %}
{% addtoblock "js" %}<script src="{% static 'djangocms_googlemap/js/djangocms.googlemap.js' %}" async defer></script>{% endaddtoblock %}
{% comment %}
{{ googlemap_key }}
{{ instance.title }}
{{ instance.width }}
{{ instance.height }}
{{ instance.zoom }}
{{ instance.style }}
{{ instance.map_type_control }}
{{ instance.zoom_control }}
{{ instance.street_view_control }}
{{ instance.rotate_control }}
{{ instance.scale_control }}
{{ instance.fullscreen_control }}
{{ instance.pan_control }}
{{ instance.double_click_zoom }}
{{ instance.draggable }}
{{ instance.keyboard_shortcuts }}
{{ instance.scrollwheel }}
{% endcomment %}

View File

@@ -1,24 +0,0 @@
{% load cms_tags %}
<div class="djangocms-googlemap-marker js-djangocms-googlemap-marker"
data-title="{{ instance.title }}"
data-address="{{ instance.address }}"
data-lat="{{ instance.lat|default:"false"|stringformat:"f" }}"
data-lng="{{ instance.lng|default:"false"|stringformat:"f" }}"
data-icon="{{ instance.icon.url }}"
data-show-content="{{ instance.show_content|lower }}"
data-admin="{{ instance.get_edit_url }}"
hidden
>
{{ instance.info_content|safe }}
</div>
{% comment %}
{{ instance.title }}
{{ instance.address }}
{{ instance.lat }}
{{ instance.lng }}
{{ instance.icon }}
{{ instance.show_content }}
{{ instance.info_content }}
{% endcomment %}

View File

@@ -1,15 +0,0 @@
<div class="djangocms-googlemap-route js-djangocms-googlemap-route"
data-title="{{ instance.title }}"
data-origin="{{ instance.origin }}"
data-destination="{{ instance.destination }}"
data-travel-mode="{{ instance.travel_mode }}"
>
<div class="djangocms-googlemap-direction js-djangocms-googlemap-direction"></div>
</div>
{% comment %}
{{ instance.title }}
{{ instance.origin }}
{{ instance.destination }}
{{ instance.travel_mode }}
{% endcomment %}

View File

@@ -1,42 +1,51 @@
{% load thumbnail %}
{% if picture_link %}
<a href="{{ picture_link }}"
{% if instance.link_target %} target="{{ instance.link_target }}"{% endif %}
{{ instance.link_attributes_str }}>
{% endif %}
<div class="picture reveal_container{% if not instance.width and not instance.height %} full{% endif %}">
{% if picture_link %}
<a href="{{ picture_link }}"
{% if instance.link_target %} target="{{ instance.link_target }}"{% endif %}
{{ instance.link_attributes_str }}>
{% endif %}
{# start render figure/figcaption #}
{% if instance.caption_text %}
<figure>
{% endif %}
{# end render figure/figcaption #}
{# start render figure/figcaption #}
{% if instance.caption_text %}
<figure>
{% endif %}
{# end render figure/figcaption #}
<img src="{% spaceless %}
<div class="picture__main reveal reveal_animation">
<img class="{% if not instance.width and not instance.height %}scroll{% endif %}" data-ease-multiplier="-2"
src="{% spaceless %}
{% if instance.external_picture %}
{{ instance.external_picture }}
{% elif instance.use_no_cropping %}
{{ instance.picture.url }}
{% elif instance.picture %}
{% thumbnail instance.picture picture_size.size crop=picture_size.crop upscale=picture_size.upscale subject_location=instance.picture.subject_location as thumbnail %}
{% thumbnail instance.picture picture_size.size box=instance.cropping crop detail as thumbnail %}
{{ thumbnail.url }}
{% endif %}{% endspaceless %}"
{% if instance.picture.default_alt_text and not instance.attributes.alt %} alt="{{ instance.picture.default_alt_text }}"{% endif %}
{% if instance.width %} width="{{ instance.width }}"{% endif %}
{% if instance.height %} height="{{ instance.height }}"{% endif %}
{{ instance.attributes_str }}
>
{% if instance.picture.default_alt_text and not instance.attributes.alt %}
alt="{{ instance.picture.default_alt_text }}"{% endif %}
{% if instance.width %} width="{{ instance.width }}"{% endif %}
{% if instance.height %} height="{{ instance.height }}"{% endif %}
{{ instance.attributes_str }}
>
</div>
{# start render figure/figcaption #}
{% if instance.caption_text %}
<figcaption>{{ instance.caption_text }}</figcaption>
</figure>
{% endif %}
{# end render figure/figcaption #}
{# start render figure/figcaption #}
{% if instance.caption_text %}
<figcaption class="reveal reveal_animation data_delay_2">
{{ instance.caption_text }}
</figcaption>
</figure>
{% endif %}
{# end render figure/figcaption #}
{% if picture_link %}
</a>
{% endif %}
{% if picture_link %}
</a>
{% endif %}
</div>
{% comment %}
# https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img

View File

@@ -1,37 +0,0 @@
{% extends "admin/change_form.html" %}
{% load static %}
{% block object-tools %}
{{ block.super }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.5/ace.js"></script>
<script>
django.jQuery(function () {
// ace editor cannot be attached directly to a textarea
var textarea = django.jQuery('textarea').css('display', 'none');
var settings = textarea.data();
var div = django.jQuery('<div>', {
position: 'absolute',
width: '100%',
height: textarea.height(),
'class': textarea.attr('class')
}).insertBefore(textarea);
// init editor with settings
var editor = ace.edit(div[0]);
editor.setTheme('ace/theme/' + settings.theme);
editor.getSession().setValue(textarea.val());
editor.getSession().setMode('ace/mode/' + settings.mode);
editor.setOptions({
fontSize: '14px',
cursorStyle: 'smooth'
});
editor.renderer.setScrollMargin(5, 5);
// send data back to textarea when submitting
textarea.closest('form').submit(function () {
textarea.val(editor.getSession().getValue());
})
});
</script>
{% endblock %}

View File

@@ -1 +0,0 @@
{{ content|safe }}

View File

@@ -1,18 +0,0 @@
{% load cms_tags %}<{{ instance.tag_type }} {% spaceless %}
{% endspaceless %}{% if instance.id_name %} id="{{ instance.id_name }}"{% endif %}{% spaceless %}
{% endspaceless %}{% if instance.class_name or instance.additional_classes %}class="{% spaceless %}
{{ instance.class_name }}
{{ instance.get_additional_classes }}
{% endspaceless %}"{% endif %}{% spaceless %}
{% endspaceless %}{% if inline_styles %} style="{{ inline_styles }}"{% endif %}{{ instance.attributes_str }}>{% for plugin in instance.child_plugin_instances %}{% render_plugin plugin %}{% endfor %}</{{ instance.tag_type }}>{% comment %}
# The formatting of this file is very specific to remove unnecessary whitespaces
# Available variables:
{{ instance.label }}
{{ instance.tag_type }}
{{ instance.class_name }}
{{ instance.additional_classes }} or {{ instance.get_additional_classes }}
{{ instance.id_name }}
{{ instance.attributes_str }}
{{ instance.padding_top|right|bottom|left }} or {{ inline_styles }}
{{ instance.margin_top|right|bottom|left }} oe {{ inline_styles }}
{% endcomment %}

View File

@@ -1,17 +0,0 @@
{% load i18n cms_tags %}
{% if not disabled %}
{% with instance.source_file.extension as ext %}
<source src="{{ instance.source_file.url }}" type="video/{{ ext }}" {{ instance.attributes_str }}>
{% endwith %}
{% endif %}
{% comment %}
# https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video
# https://github.com/divio/django-filer/blob/master/filer/models/filemodels.py
{{ instance.source_file }}
# Available variables:
{{ instance.text_title }}
{{ instance.text_description }}
{{ instance.attributes_str }}
{% endcomment %}

View File

@@ -1,18 +0,0 @@
{% if not disabled %}
<track kind="{{ instance.kind }}" src="{{ instance.src.url }}"
{% if instance.srclang %} srclang="{{ instance.srclang }}"{% endif %}
{% if instance.label %} label="{{ instance.label }}"{% endif %}
{% if instance.attributes %} {{ instance.attributes_str }}{% endif %}
>
{% endif %}
{% comment %}
# https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track
# https://github.com/divio/django-filer/blob/master/filer/models/foldermodels.py
{{ instance.src }}
# Available variables:
{{ instance.kind }}
{{ instance.srclang }}
{{ instance.label }}
{{ instance.attributes_str }}
{% endcomment %}

View File

@@ -1,29 +0,0 @@
{% load i18n cms_tags %}
{% if instance.embed_link %}
{# show iframe if embed_link is provided #}
<iframe src="{{ instance.embed_link }}" {{ instance.attributes_str }} frameborder="0" allowfullscreen="true"></iframe>
{% with disabled=instance.embed_link %}
{% for plugin in instance.child_plugin_instances %}
{% render_plugin plugin %}
{% endfor %}
{% endwith %}
{% else %}
{# render <source> or <track> plugins #}
<video controls {{ instance.attributes_str }}
{% if instance.poster %} poster="{{ instance.poster.url }}"{% endif %}>
{% for plugin in instance.child_plugin_instances %}
{% render_plugin plugin %}
{% endfor %}
{% trans "Your browser doesn't support this video format." %}
</video>
{% endif %}
{% comment %}
# Available variables:
{{ instance.template }}
{{ instance.label }}
{{ instance.embed_link }}
{{ instance.poster }}
{{ instance.attributes_str }}
{% endcomment %}