Commit 146e1516 authored by Luzian Bieri's avatar Luzian Bieri
Browse files

Edited display of Event-spots

parent 15a59697
......@@ -133,8 +133,8 @@
"events.registration_over": "Das Anmeldefenster ist geschlossen.",
"events.registration_starts_at": "Das Anmeldefenster öffnet am %{time}",
"events.%n_spots_available": [
[-1, -1, "Plätze verfügbar"],
[0, 0, "Keine Plätze verfügbar"],
[-100, -1, "Plätze verfügbar"],
[0, 0, "Keine Plätze verfügbar, du landest auf der Wartelist"],
[1, 1, "%n Platz verfügbar"],
[2, null, "%n Plätze verfügbar"]
],
......
......@@ -134,7 +134,7 @@
"events.registration_starts_at": "The registration starts at %{time}",
"events.%n_spots_available": [
[-1, -1, "Spots available"],
[0, 0, "No spots available"],
[0, 0, "No spots available. You will be put on the waiting-list"],
[1, 1, "%n spot available"],
[2, null, "%n spots available"]
],
......
.event-details {
width: 30vw;
padding: 2vmin;
.title{
font-weight: 100;
font-size: 6vmin;
color: #004398;
}
button {
margin-right: 1em;
......
......@@ -174,15 +174,15 @@ export default class EventDetails {
}
return m('div.event-details', [
m('h1', event.getTitle()),
m('div', {class: 'title'}, event.getTitle()),
m('div', day + time + ' '+ i18n('date.oclock', )),
m('div', i18n('events.price', ) + ': ' + price),
m(
'div',
event.spots === undefined
? i18n('events.no_registration')
: i18n('events.%n_spots_available', event.spots - event.signup_count)
),
m('div', i18n('events.price', ) + ': ' + price),
m(
'div',
event.spots === undefined
? i18n('events.no_registration')
: i18n('events.%n_spots_available', event.spots == 0 ? -1 : (event.spots - event.signup_count) < 0 ? 0 : (event.spots - event.signup_count))
),
m('p', m.trust(marked(escape(event.getDescription())))),
eventSignupForm,
]);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment