mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Add (hidden) location field to event list widget
This commit is contained in:
@@ -798,6 +798,8 @@ Vue.component('pretix-widget-event-list-entry', {
|
||||
template: ('<a :class="classObject" @click.prevent="select">'
|
||||
+ '<div class="pretix-widget-event-list-entry-name">{{ event.name }}</div>'
|
||||
+ '<div class="pretix-widget-event-list-entry-date">{{ event.date_range }}</div>'
|
||||
+ '<div class="pretix-widget-event-list-entry-location">{{ location }}</div>' // hidden by css for now, but
|
||||
// used by a few people
|
||||
+ '<div class="pretix-widget-event-list-entry-availability"><span>{{ event.availability.text }}</span></div>'
|
||||
+ '</a>'),
|
||||
props: {
|
||||
@@ -810,6 +812,9 @@ Vue.component('pretix-widget-event-list-entry', {
|
||||
};
|
||||
o['pretix-widget-event-availability-' + this.event.availability.color] = true;
|
||||
return o
|
||||
},
|
||||
location: function () {
|
||||
return this.event.location.replace(/\s*\n\s*/g, ', ');
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -390,6 +390,11 @@
|
||||
padding: 5px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.pretix-widget-event-list-entry-location {
|
||||
padding: 5px;
|
||||
box-sizing: border-box;
|
||||
display: none;
|
||||
}
|
||||
.pretix-widget-event-list-entry-date {
|
||||
width: 25%;
|
||||
padding: 5px;
|
||||
@@ -673,6 +678,9 @@
|
||||
.pretix-widget-event-list-entry-name {
|
||||
width: 100%;
|
||||
}
|
||||
.pretix-widget-event-list-entry-location {
|
||||
width: 100%;
|
||||
}
|
||||
.pretix-widget-event-list-entry-date {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user