various fixes
This commit is contained in:
@@ -202,7 +202,8 @@ plugin_pool.unregister_plugin(_FormPlugin)
|
||||
class FormPlugin(_FormPlugin):
|
||||
module = 'Content'
|
||||
name = 'Form'
|
||||
child_classes = ['TextField', 'TextAreaField', 'EmailField', 'RadioSelectField', 'MultipleSelectField', 'SubmitButton']
|
||||
child_classes = ['TextField', 'TextAreaField', 'EmailField', 'RadioSelectField', 'MultipleSelectField',
|
||||
'SubmitButton']
|
||||
|
||||
|
||||
class SocialMediaListItemInlineAdmin(admin.TabularInline):
|
||||
|
||||
@@ -5,7 +5,17 @@ from project.models import Notification
|
||||
|
||||
|
||||
def search_form(request):
|
||||
return {'search_form': ModelSearchForm}
|
||||
egg_pages = (
|
||||
(81, 'C', 1),
|
||||
(83, 'R', 2),
|
||||
(95, 'E', 3),
|
||||
(105, 'D', 4),
|
||||
(99, 'O', 5),
|
||||
)
|
||||
return {
|
||||
'egg_pages': egg_pages,
|
||||
'search_form': ModelSearchForm
|
||||
}
|
||||
|
||||
|
||||
def notification(request):
|
||||
|
||||
@@ -30,6 +30,28 @@
|
||||
{% block content_main %}
|
||||
{% placeholder 'content' %}
|
||||
{% endblock %}
|
||||
|
||||
{% for page, letter, position in egg_pages %}
|
||||
{% if page == request.current_page.pk %}
|
||||
<a href="#" class="search__contest__item data_id_{{ forloop.counter }}">
|
||||
<span class="letter">{{ letter }}</span>
|
||||
<span class="position">{{ position }}</span>
|
||||
|
||||
<div class="flower petal{% cycle '5' '8' '10' %} {% cycle 'roundpetal' '' %}">
|
||||
<div class="petal">
|
||||
<div class="petal">
|
||||
<div class="petal">
|
||||
<div class="petal">
|
||||
<div class="petal">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
{% load i18n spurl %}
|
||||
|
||||
{% if page_obj.has_other_pages %}
|
||||
|
||||
<div class="pagenav">
|
||||
{% with from=page_obj.start_index until=page_obj.end_index count=page_obj.paginator.count %}
|
||||
<p>{% blocktrans %}{{ from }} – {{ until }} of {{ count }} {{ obj_string }} are displayed{% endblocktrans %}</p>
|
||||
{% endwith %}
|
||||
<ul>
|
||||
{% if page_obj.has_previous %}
|
||||
<li class="prev"><a href="{% spurl base='' query=request.GET set_query='page={{ page_obj.previous_page_number }}' %}">« {% trans "previous" %}</a></li>
|
||||
{% endif %}
|
||||
{% for page_num in page_obj.page_range %}
|
||||
{% if page_num %}
|
||||
{% if page_obj.number == page_num %}
|
||||
<li class="page active"><span>{{ page_num }}</span></li>
|
||||
{% else %}
|
||||
<li class="page"><a href="{% spurl base='' query=request.GET set_query='page={{ page_num }}' %}">{{ page_num }}</a></li>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<li class="jumper"><span>...</span></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if page_obj.has_next %}
|
||||
<li class="prev"><a href="{% spurl base='' query=request.GET set_query='page={{ page_obj.next_page_number }}' %}">{% trans "next" %} »</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -3,9 +3,7 @@
|
||||
<form method="post" id="newsletter_subscription" action="{% url 'newsletter_subscription' %}" class="form">
|
||||
{% if success %}
|
||||
<p class="section__text form__success">
|
||||
{% blocktrans %}
|
||||
Ihre Angaben wurden erfolgreich übermittelt. Vielen Dank!
|
||||
{% endblocktrans %}
|
||||
{% trans 'Ihre Angaben wurden erfolgreich übermittelt. Vielen Dank!' %}
|
||||
</p>
|
||||
{% else %}
|
||||
{% if form.non_field_errors %}
|
||||
|
||||
Reference in New Issue
Block a user