<commit_before><template name="eventPage">
	<div class="container-sm">
		{{> event}}
	</div>
</template>

<template name="eventNotFound">
	<h4>{{mf "event.no_event" "Sorry, we couldn't find this event, it must have been deleted or it never existed in the first place."}}</h4>
</template>

<template name="event">
	{{#if editing}}
		{{> eventEdit}}
	{{else}}
		{{> eventBackToLink}}
		{{> eventDisplay}}
	{{/if}}
</template>

<template name="eventBackToLink">
	<div class="page-component">
		{{#if course}}
			{{#if referredByCourse}}
				<a href="{{pathFor 'showCourse' _id=course._id}}">
					{{backArrow}}
					{{mf 'course.event.detail.back' 'Back to course'}} "{{course.name}}"
				</a>
			{{else}}
				{{> backToLink}}
				<a href="{{pathFor 'showCourse' _id=course._id}}">
					<span class="fa fa-rocket fa-fw" aria-hidden="true"></span>
					{{mf 'course.event.detail.goToCourse' 'Go to course'}} "{{course.name}}"
				</a>
			{{/if}}
		{{else}}
			{{> backToLink}}
		{{/if}}
	</div>
</template>

<template name="eventDisplay">
	<div class="page-component">
		<div class="details-header event-details-header">
				<span class="day">{{weekday startLocal}}</span><br>
				<span class="date">
					<span class="fa fa-calendar fa-fw" aria-hidden="true"></span>
					{{dateformat_mini_fullmonth startLocal}}
				</span>
				<span class="fa fa-clock-o fa-fw" aria-hidden="true"></span>
				{{timeformat startLocal}} - {{timeformat endLocal}}
		</div>
		<div class="details-body event-details-body">
			{{> regionTag}}
			<div class="details-content">
				<h3>{{this.title}}</h3>
				<div class="tag-group multiline">
					{{> venueLink}}
					{{#if venue.address}}
						<div class="tag">
							<span class="fa fa-map-marker fa-fw" aria-hidden="true"></span>
							{{venue.address}}
						</div>
					{{/if}}
				</div>

				{{> eventGroupList}}

				<p>
					{{#if hasVenue}}
						<div class="details-map">
							{{>map markers=eventMarkers}}
						</div>
					{{/if}}
					{{{description}}}
				</p>
			</div>
		</div>
		{{#if replicating}}
			{{>eventReplication}}
		{{/if}}
		{{#if mayEdit}}
			<div class="actions">

				{{#if replicating}}
					<button type="button" class="btn btn-cancel js-toggle-replication">
						<span class="fa fa-remove fa-fw" aria-hidden="true"></span>
						{{mf 'course.details.hideReplicationMenu' 'Cancel replication'}}
					</button>
				{{else}}
					<button type="button" class="btn btn-add js-toggle-replication">
						<span class="fa fa-plus fa-fw" aria-hidden="true"></span>
						{{mf 'course.details.repl_menu_btn' 'Repeat'}}
					</button>
				{{/if}}
				{{> buttonEdit event="js-event-edit"}}
				{{#unless expanded}}
					{{> buttonDelete event="js-expand"}}
				{{/unless}}
			</div>
			{{#if expanded}}
				{{> eventDeleteConfirmDialog}}
			{{/if}}
		{{/if}}
	</div>
	<div class="page-component">
		<a href="{{pathFor 'calEvent' this}}" class="js-download">
			<i class="fa fa-arrow-down fa-fw" aria-hidden="true"></i>
			{{mf 'event.detail.download_cal' 'Download event to my calendar'}}
		</a>
	</div>
	<div class="page-component">
		{{> report}}
	</div>
</template>


<!-- COPYPASTA WARNING
    Below are slightly modified templates from course.details.html.
    Where possible, the original translation keys have been kept.

    Most of what is in these templates could be generalized across courses and
    events. It's the pesky translation strings where I think we'll run into
    trouble when we try to unite them.
-->
<template name="eventDeleteConfirmDialog">
	<div class="event-delete-confirmation">
		<p>{{mf 'event.reallydelete' 'Please confirm that you would like to delete this event. This cannot be undone.'}}</p>
		<div class="form-actions">
			{{> buttonDeleteConfirm
				event="js-event-delete-confirm"
				textIdle=(mf 'event.delete.confirm.button' 'Delete this event')
				textBusy=(mf 'event.delete.confirm.button.busy' 'Deleting event...')
			}}
			{{> buttonCancel event="js-collapse"}}
		</div>
	</div>
</template>

<template name="eventGroupList">
	<div class="tag-group multiline">
		{{#each allGroups}}
			{{> groupName}}
			{{#if isOrganizer}}
				<div class="tag addon">
					<span class="glyphicon glyphicon-bullhorn fa-fw" aria-hidden="true"></span>
				</div>
			{{/if}}
			{{#if tools}}
				<div class="btn-group tag-btn group-tag-btn addon">
					<button type="button" class="dropdown-toggle"<commit_msg>add missing class to group editing rights indicator in event details. fixes #902<commit_after><template name="eventPage">
	<div class="container-sm">
		{{> event}}
	</div>
</template>

<template name="eventNotFound">
	<h4>{{mf "event.no_event" "Sorry, we couldn't find this event, it must have been deleted or it never existed in the first place."}}</h4>
</template>

<template name="event">
	{{#if editing}}
		{{> eventEdit}}
	{{else}}
		{{> eventBackToLink}}
		{{> eventDisplay}}
	{{/if}}
</template>

<template name="eventBackToLink">
	<div class="page-component">
		{{#if course}}
			{{#if referredByCourse}}
				<a href="{{pathFor 'showCourse' _id=course._id}}">
					{{backArrow}}
					{{mf 'course.event.detail.back' 'Back to course'}} "{{course.name}}"
				</a>
			{{else}}
				{{> backToLink}}
				<a href="{{pathFor 'showCourse' _id=course._id}}">
					<span class="fa fa-rocket fa-fw" aria-hidden="true"></span>
					{{mf 'course.event.detail.goToCourse' 'Go to course'}} "{{course.name}}"
				</a>
			{{/if}}
		{{else}}
			{{> backToLink}}
		{{/if}}
	</div>
</template>

<template name="eventDisplay">
	<div class="page-component">
		<div class="details-header event-details-header">
				<span class="day">{{weekday startLocal}}</span><br>
				<span class="date">
					<span class="fa fa-calendar fa-fw" aria-hidden="true"></span>
					{{dateformat_mini_fullmonth startLocal}}
				</span>
				<span class="fa fa-clock-o fa-fw" aria-hidden="true"></span>
				{{timeformat startLocal}} - {{timeformat endLocal}}
		</div>
		<div class="details-body event-details-body">
			{{> regionTag}}
			<div class="details-content">
				<h3>{{this.title}}</h3>
				<div class="tag-group multiline">
					{{> venueLink}}
					{{#if venue.address}}
						<div class="tag">
							<span class="fa fa-map-marker fa-fw" aria-hidden="true"></span>
							{{venue.address}}
						</div>
					{{/if}}
				</div>

				{{> eventGroupList}}

				<p>
					{{#if hasVenue}}
						<div class="details-map">
							{{>map markers=eventMarkers}}
						</div>
					{{/if}}
					{{{description}}}
				</p>
			</div>
		</div>
		{{#if replicating}}
			{{>eventReplication}}
		{{/if}}
		{{#if mayEdit}}
			<div class="actions">

				{{#if replicating}}
					<button type="button" class="btn btn-cancel js-toggle-replication">
						<span class="fa fa-remove fa-fw" aria-hidden="true"></span>
						{{mf 'course.details.hideReplicationMenu' 'Cancel replication'}}
					</button>
				{{else}}
					<button type="button" class="btn btn-add js-toggle-replication">
						<span class="fa fa-plus fa-fw" aria-hidden="true"></span>
						{{mf 'course.details.repl_menu_btn' 'Repeat'}}
					</button>
				{{/if}}
				{{> buttonEdit event="js-event-edit"}}
				{{#unless expanded}}
					{{> buttonDelete event="js-expand"}}
				{{/unless}}
			</div>
			{{#if expanded}}
				{{> eventDeleteConfirmDialog}}
			{{/if}}
		{{/if}}
	</div>
	<div class="page-component">
		<a href="{{pathFor 'calEvent' this}}" class="js-download">
			<i class="fa fa-arrow-down fa-fw" aria-hidden="true"></i>
			{{mf 'event.detail.download_cal' 'Download event to my calendar'}}
		</a>
	</div>
	<div class="page-component">
		{{> report}}
	</div>
</template>


<!-- COPYPASTA WARNING
    Below are slightly modified templates from course.details.html.
    Where possible, the original translation keys have been kept.

    Most of what is in these templates could be generalized across courses and
    events. It's the pesky translation strings where I think we'll run into
    trouble when we try to unite them.
-->
<template name="eventDeleteConfirmDialog">
	<div class="event-delete-confirmation">
		<p>{{mf 'event.reallydelete' 'Please confirm that you would like to delete this event. This cannot be undone.'}}</p>
		<div class="form-actions">
			{{> buttonDeleteConfirm
				event="js-event-delete-confirm"
				textIdle=(mf 'event.delete.confirm.button' 'Delete this event')
				textBusy=(mf 'event.delete.confirm.button.busy' 'Deleting event...')
			}}
			{{> buttonCancel event="js-collapse"}}
		</div>
	</div>
</template>

<template name="eventGroupList">
	<div class="tag-group multiline">
		{{#each allGroups}}
			{{> groupName}}
			{{#if isOrganizer}}
				<div class="tag group-tag addon">
					<span class="glyphicon glyphicon-bullhorn fa-fw" aria-hidden="true"></span>
				</div>
			{{/if}}
			{{#if tools}}
				<div class="btn-group tag-btn group-tag-btn addon">
					<button type="button" class="dropdown-toggle"
{'fraction_non_alphanumeric': 0.194541558588023, 'fraction_numerical': 0.0012405548663584076, 'mean_word_length': 3.5523613963039016, 'pattern_counts': {'":': 0, '<': 175, '<?xml version=': 0, '>': 209, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2393513', 'n_tokens_mistral': 3599, 'n_tokens_neox': 2961, 'n_words': 718}