Skip to content

Commit a62f3a7

Browse files
feat: add button for adding event segments
1 parent e0b6285 commit a62f3a7

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

html-templates/events/event.tpl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@
5656
</ol>
5757
{if $.User}
5858
<div class="btn-toolbar pull-right mt-1">
59-
<a class="btn btn-secondary" href="{$Event->getUrl(edit)}">{icon "pencil"}&nbsp;{_ "Edit Event"}</a>
59+
<a class="btn btn-secondary mr-2" href="{$Event->getUrl(edit)}">{icon "pencil"}&nbsp;{_ "Edit Event"}</a>
60+
<a class="btn btn-secondary" href="{$Event->getUrl(segments/!create)}">{icon "plus-square-o"}&nbsp;{_ "Add Segment"}</a>
6061
</div>
6162
{/if}
6263

php-classes/Emergence/Events/EventsRequestHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ public static function handleSegmentsRequest(Event $Event)
7676
'total' => count($Event->Segments)
7777
]);
7878
}
79-
80-
if ($segmentHandle == '*create') {
79+
80+
if ($segmentHandle == '!create') {
8181
return EventSegmentsRequestHandler::handleCreateRequest(EventSegment::create(['Event' => $Event]));
8282
}
8383

0 commit comments

Comments
 (0)