@if (poll().settings.allowComments) {
} @else {
Comments are disabled for this poll.
}
@for (log of logs(); track log._id) {
@switch (log.type) {
@case ("comment") {
@let comment = $any(log.data);
}
@case ("participant.created") {
participated in the poll
}
@case ("events.changed") {
@let data = $any(log.data);
@let total = data.created + data.updated + data.deleted;
@if (data.created) {
added {{ data.created }}
}
@if (data.updated) {
@if (data.created) {
and
}
modified {{ data.updated }}
}
@if (data.deleted) {
@if (data.created || data.updated) {
and
}
removed {{ data.deleted }}
}
{total, plural, one {option} other {options}}
}
@case ("poll.booked") {
@let booked = $any(log.data).booked;
booked {{ booked }} {booked, plural, =1 {appointment} other {appointments}}
}
@case ("poll.changed") {
edited the poll with
@let diff = $any(log.data).diff | keyvalue;
{{ diff?.length }} {diff?.length, plural, one {change} other {changes}}
@for (kv of diff; track kv.key) {
-
{{ changeDisplayKey[kv.key] ?? kv.key }}:
{{ changeDisplayValues[kv.value] ?? kv.value }}
}
}
}
}
@if (showMore()) {
}