diff options
Diffstat (limited to 'views/event.handlebars')
-rwxr-xr-x | views/event.handlebars | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/views/event.handlebars b/views/event.handlebars index 999a12b..4402578 100755 --- a/views/event.handlebars +++ b/views/event.handlebars @@ -131,7 +131,7 @@ {{#if eventData.usersCanAttend}} <div class="card mb-4" id="eventAttendees"> - <h5 class="card-header">Attendees {{#if eventAttendees}}({{numberOfAttendees}}){{/if}} + <h5 class="card-header">Attendees {{#if numberOfAttendees}}({{numberOfAttendees}}){{/if}} <div class="btn-group" role="group" aria-label="Attendance controls"> {{#unless noMoreSpots}} <button type="button" id="attendEvent" class="btn btn-success" data-event-id="{{eventData.id}}"><i class="fas fa-user-plus"></i> Add me</button> @@ -139,7 +139,7 @@ <button type="button" id="unattendEvent" class="btn btn-secondary" data-toggle="modal" data-target="#unattendModal"><i class="fas fa-user-times"></i> Remove me</button> </div> </h5> - <div class="card-body"> + <div class="card-body text-center"> {{#if eventData.maxAttendees}} {{#if noMoreSpots}} <div class="alert alert-warning text-center" id="attendees-alert">This event is at capacity.</div> @@ -147,12 +147,22 @@ <div class="alert alert-warning text-center" id="attendees-alert">{{spotsRemaining}} {{plural spotsRemaining "spot(s)"}} remaining - add yourself now!</div> {{/if}} {{/if}} - {{#if eventAttendees}} + {{#if numberOfAttendees}} <ul class="attendeesList"> - {{#each eventAttendees}} + {{#each visibleAttendees}} <li{{#if ../editingEnabled}} data-attendee-name="{{this.name}}" data-attendee-id="{{this._id}}"{{/if}}><span class="attendee-name">{{this.name}}</span>{{#if ../editingEnabled}} <a href="#" class="remove-attendee" data-toggle="modal" data-target="#removeAttendeeModal" title="Remove user from event"><i class="fas fa-user-times"></i></a>{{/if}}</li> {{/each}} + {{#if editingEnabled}} + {{#each hiddenAttendees}} + <li{{#if ../editingEnabled}} data-attendee-name="{{this.name}}" data-attendee-id="{{this._id}}"{{/if}} class="hidden-attendee"><span class="attendee-name">{{this.name}} (hidden from public list)</span>{{#if ../editingEnabled}} <a href="#" class="remove-attendee" data-toggle="modal" data-target="#removeAttendeeModal" title="Remove user from event"><i class="fas fa-user-times"></i></a>{{/if}}</li> + {{/each}} + {{/if}} </ul> + {{#unless editingEnabled}} + {{#if numberOfHiddenAttendees}} + <div class="hidden-attendees-message">{{numberOfHiddenAttendees}} hidden attendee{{plural numberOfHiddenAttendees ""}}</div> + {{/if}} + {{/unless}} {{else}} <p class="text-center text-muted mb-0">No attendees yet!</p> {{/if}} @@ -189,6 +199,13 @@ <input type="email" class="form-control" id="attendeeEmail" name="attendeeEmail" placeholder="We won't spam you <3" data-validation="email" data-validation-optional="true"> </div> </div> + <div class="form-check"> + <input class="form-check-input" type="checkbox" id="attendeeVisible" name="attendeeVisible" checked> + <label class="form-check-label" for="attendeeVisible"> + Show my name in the public list of attendees + </label> + <p class="form-text small">If you choose to hide your name, only the event organiser will be able to see it.</p> + </div> <div class="form-group"> <label for="removalPassword">Deletion password</label> <p class="form-text small">You will need this password if you want to remove yourself from the list of event attendees. If you provided your email, you'll receive it by email. Otherwise, write it down now because it will <strong>not be shown again</strong>.</p> |