1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
{{#if eventGroupHasCoverImage}}
<div id="eventImageContainer" style="background-image: url(/events/{{eventGroupData.image}});"></div>
{{else}}
<div id="genericEventImageContainer" style="background-image: url(/images/seigaiha.png);"></div>
{{/if}}
<div class="row">
<div class="col-lg">
<h3 id="eventName">{{eventGroupData.name}}</h3>
</div>
{{#if editingEnabled}}
<div class="col-lg-2 ml-2 edit-buttons">
<div class="btn-group" role="group" aria-label="Event controls">
<button type="button" id="editEvent" class="btn btn-success" data-toggle="modal" data-target="#editModal" ><i class="fas fa-edit"></i></button>
<button type="button" id="deleteEvent" class="btn btn-danger" data-toggle="modal" data-target="#deleteModal"><i class="fas fa-trash"></i></button>
</div>
</div>
{{/if}}
</div>
{{#if firstLoad}}
<div class="alert alert-success alert-dismissible fade show" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
Welcome to your event group! We've just sent you an email with your secret editing link, which you can also see in the address bar above. Haven't got the email? Check your spam or junk folder. To share your event group, use the link you can see just below this message - that way your attendees won't be able to edit or delete your event group!
</div>
{{/if}}
<div class="card mt-4 mb-4">
<div class="card-body">
<ul class="fa-ul eventInformation">
{{#if eventGroupHasHost}}
<li>
<span class="fa-li">
<i class="fas fa-fw fa-user-circle"></i>
</span>
<span class="text-muted">Hosted by</span> {{eventGroupData.hostName}}
</li>
{{/if}}
{{#if eventGroupData.url}}
<li>
<span class="fa-li">
<i class="fas fa-link"></i>
</span>
<a href="{{eventGroupData.url}}">
{{eventGroupData.url}}
</a>
</li>
{{/if}}
<li>
<span class="fa-li">
<i class="fas fa-share-square"></i>
</span>
<a href="https://{{domain}}/group/{{eventGroupData.id}}">
{{domain}}/group/{{eventGroupData.id}}
</a>
<button type="button" id="copyEventLink" class="eventInformationAction btn btn-outline-secondary btn-sm" data-clipboard-text="https://{{domain}}/group/{{eventGroupData.id}}">
<i class="fas fa-copy"></i> Copy
</button>
</li>
</ul>
</div>
</div>
{{#if editingEnabled}}
<div class="alert alert-success">
<p>To add an event to this group, copy and paste the two codes below into the 'Event Group' box when creating a new event or editing an existing event.</p>
<div class="table-responsive">
<table style="width:100%">
<tr style="border-bottom:1px solid rgba(0,0,0,0.2)">
<td><strong>Event group ID</strong></td>
<td><span class="code">{{eventGroupData.id}}</span></td>
</tr>
<tr>
<td><strong>Event group secret editing code</strong></td>
<td><span class="code">{{eventGroupData.editToken}}</span></td>
</tr>
</table>
</div>
</div>
{{/if}}
<div class="card mb-4" id="eventDescription">
<h5 class="card-header">About</h5>
<div class="card-body">
{{{parsedDescription}}}
</div>
</div>
<div class="card mt-4 mb-4">
<h5 class="card-header">Upcoming events</h5>
<div class="list-group list-group-flush">
{{#if upcomingEventsExist}}
{{#each events}}
{{#unless this.eventHasConcluded}}
<a href="/{{this.id}}" class="list-group-item list-group-item-action" target="_blank">
<i class="fas fa-fw fa-calendar-day"></i>
<strong>{{this.name}}</strong>
<span class="ml-2 text-muted">{{this.displayDate}}</span>
</a>
{{/unless}}
{{/each}}
{{else}}
<div class="list-group-item">No events!</div>
{{/if}}
</div>
</div>
{{#if editingEnabled}}
{{> editeventgroupmodal }}
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete '{{eventGroupData.name}}'</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<form action="/deleteeventgroup/{{eventGroupData.id}}/{{eventGroupData.editToken}}" method="post">
<div class="modal-body">
<p>Are you sure you want to delete this event group? This action cannot be undone.</p>
<p>This will <strong>not</strong> delete the individual events contained in this group. They can be linked to another group later.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-danger">Delete event group</button>
</div>
</form>
</div>
</div>
</div>
{{/if}}
<script>
$.validate({
lang: 'en',
errorElementClass: "is-invalid",
errorMessageClass: "text-danger",
successElementClass: "is-valid"
});
$(document).ready(function() {
$.uploadPreview({
input_field: "#eventGroupImageUpload",
preview_box: "#eventGroupImagePreview",
label_field: "#eventGroupImageLabel",
label_default: "Choose file",
label_selected: "Change file",
no_label: false
});
$("#eventGroupImagePreview").css("background-image", "url('/events/{{eventGroupData.image}}')");
$("#eventGroupImagePreview").css("background-size", "cover");
$("#eventGroupImagePreview").css("background-position", "center center");
new ClipboardJS('#copyEventLink');
autosize($('textarea'));
$("#copyEventLink").click(function(){
$(this).html('<i class="fas fa-copy"></i> Copied!');
setTimeout(function(){ $("#copyEventLink").html('<i class="fas fa-copy"></i> Copy');}, 5000);
})
});
</script>
|