forked from CGM_Public/pretix_original
New signals to add content to the front page
This commit is contained in:
@@ -78,3 +78,25 @@ easy to cause serious performance problems.
|
||||
|
||||
As with all plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
"""
|
||||
|
||||
front_page_top = EventPluginSignal(
|
||||
providing_args=[]
|
||||
)
|
||||
"""
|
||||
This signal is sent out to display additional information on the frontpage above the list
|
||||
of products and but below a custom frontpage text.
|
||||
|
||||
As with all plugin signals, the ``sender`` keyword argument will contain the event. The
|
||||
receivers are expected to return HTML.
|
||||
"""
|
||||
|
||||
front_page_bottom = EventPluginSignal(
|
||||
providing_args=[]
|
||||
)
|
||||
"""
|
||||
This signal is sent out to display additional information on the frontpage below the list
|
||||
of products.
|
||||
|
||||
As with all plugin signals, the ``sender`` keyword argument will contain the event. The
|
||||
receivers are expected to return HTML.
|
||||
"""
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
{% load l10n %}
|
||||
{% load eventurl %}
|
||||
{% load thumbnail %}
|
||||
{% load eventsignal %}
|
||||
{% load markup_tags %}
|
||||
{% block title %}{% trans "Presale" %}{% endblock %}
|
||||
|
||||
@@ -55,6 +56,7 @@
|
||||
{% if frontpage_text %}
|
||||
{{ frontpage_text|apply_markup:"markdown"|linebreaks }}
|
||||
{% endif %}
|
||||
{% eventsignal event "pretix.presale.signals.front_page_top" %}
|
||||
{% if event.presale_is_running or event.settings.show_items_outside_presale_period %}
|
||||
<form method="post" data-asynctask
|
||||
action="{% eventurl request.event "presale:event.cart.add" %}?next={{ request.path|urlencode }}">
|
||||
@@ -213,23 +215,26 @@
|
||||
</form>
|
||||
{% endif %}
|
||||
{% if vouchers_exist %}
|
||||
<h2>{% trans "Redeem a voucher" %}</h2>
|
||||
<form method="get" action="{% eventurl event "presale:event.redeem" %}">
|
||||
<div class="row-fluid">
|
||||
<div class="col-md-8 col-sm-6 col-xs-12">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fa fa-ticket fa-fw"></i></span>
|
||||
<input type="text" class="form-control" name="voucher" id="voucher"
|
||||
placeholder="{% trans "Voucher code" %}">
|
||||
<section class="front-page">
|
||||
<h2>{% trans "Redeem a voucher" %}</h2>
|
||||
<form method="get" action="{% eventurl event "presale:event.redeem" %}">
|
||||
<div class="row-fluid">
|
||||
<div class="col-md-8 col-sm-6 col-xs-12">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fa fa-ticket fa-fw"></i></span>
|
||||
<input type="text" class="form-control" name="voucher" id="voucher"
|
||||
placeholder="{% trans "Voucher code" %}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-6 col-xs-12">
|
||||
<button class="btn btn-block btn-primary" type="submit">
|
||||
{% trans "Redeem voucher" %}
|
||||
</button>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-6 col-xs-12">
|
||||
<button class="btn btn-block btn-primary" type="submit">
|
||||
{% trans "Redeem voucher" %}
|
||||
</button>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% eventsignal event "pretix.presale.signals.front_page_bottom" %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -96,7 +96,10 @@
|
||||
color: white;
|
||||
}
|
||||
.checkout-button-row {
|
||||
padding: 15px 0;
|
||||
padding-top: 15px;
|
||||
}
|
||||
section.front-page {
|
||||
margin-top: 15px;
|
||||
}
|
||||
.offline-banner {
|
||||
background: $brand-danger;
|
||||
|
||||
Reference in New Issue
Block a user