mirror of
https://github.com/pretix/pretix.git
synced 2026-05-03 14:54:04 +00:00
Widget: Add hidden location in detail view
This commit is contained in:
@@ -682,8 +682,10 @@ class WidgetAPIProductList(EventListMixin, View):
|
||||
data['name'] = str(ev.name)
|
||||
if self.subevent:
|
||||
data['frontpage_text'] = str(rich_text(self.subevent.frontpage_text, safelinks=False))
|
||||
data['location'] = str(rich_text(self.subevent.location, safelinks=False))
|
||||
else:
|
||||
data['frontpage_text'] = str(rich_text(request.event.settings.frontpage_text, safelinks=False))
|
||||
data['location'] = str(rich_text(request.event.location, safelinks=False))
|
||||
data['date_range'] = self._get_date_range(ev, request.event)
|
||||
fail = False
|
||||
|
||||
|
||||
@@ -836,6 +836,9 @@ Vue.component('pretix-widget-event-form', {
|
||||
+ '{{ $root.date_range }}'
|
||||
+ '</div>'
|
||||
|
||||
// Date range
|
||||
+ '<div class="pretix-widget-event-location" v-if="($root.events || $root.weeks || $root.days) && $root.location" v-html="$root.location"></div>'
|
||||
|
||||
// Form start
|
||||
+ '<div class="pretix-widget-event-description" v-if="($root.events || $root.weeks || $root.days) && $root.frontpage_text" v-html="$root.frontpage_text"></div>'
|
||||
+ '<form method="post" :action="$root.formAction" ref="form" :target="$root.formTarget">'
|
||||
@@ -1581,6 +1584,7 @@ var shared_root_methods = {
|
||||
root.name = data.name;
|
||||
root.frontpage_text = data.frontpage_text;
|
||||
root.date_range = data.date_range;
|
||||
root.location = data.location;
|
||||
root.categories = data.items_by_category;
|
||||
root.currency = data.currency;
|
||||
root.display_net_prices = data.display_net_prices;
|
||||
@@ -1818,6 +1822,7 @@ var create_widget = function (element) {
|
||||
currency: null,
|
||||
name: null,
|
||||
date_range: null,
|
||||
location: null,
|
||||
offset: 0,
|
||||
has_more_events: false,
|
||||
append_events: false,
|
||||
|
||||
@@ -394,6 +394,11 @@
|
||||
padding-top: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
.pretix-widget-event-location {
|
||||
display: none;
|
||||
padding-top: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
.pretix-widget-event-description {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user