Skip to content

Commit

Permalink
Merge pull request #213 from CodeForPhilly/develop
Browse files Browse the repository at this point in the history
Release: laddr v3.0.0-beta.9
  • Loading branch information
themightychris committed Aug 27, 2019
2 parents d605238 + aad5cc6 commit 8ec2631
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 24 deletions.
18 changes: 2 additions & 16 deletions html-templates/events/event.tpl
Expand Up @@ -56,7 +56,8 @@
</ol>
{if $.User}
<div class="btn-toolbar pull-right mt-1">
<a class="btn btn-secondary" href="{$Event->getUrl(edit)}">{icon "pencil"}&nbsp;{_ "Edit Event"}</a>
<a class="btn btn-secondary mr-2" href="{$Event->getUrl(edit)}">{icon "pencil"}&nbsp;{_ "Edit Event"}</a>
<a class="btn btn-secondary" href="{$Event->getUrl(segments/!create)}">{icon "plus-square-o"}&nbsp;{_ "Add Segment"}</a>
</div>
{/if}

Expand Down Expand Up @@ -94,21 +95,6 @@
</dd>
</div>
{/if}

{*if $Event->Segments}
<dt>Schedule</dt>
<dd>
<ol class="list-unstyled">
{foreach item=Segment from=$Event->Segments}
{$thisDate = date("l, M j", $Segment->StartTime)}
{if $lastDate != $thisDate}
<li><a href="#{$Segment->StartTime}">{$thisDate}</a></li>
{$lastDate = $thisDate}
{/if}
{/foreach}
</ol>
</dd>
{/if*}
</dl>
</div>

Expand Down
11 changes: 5 additions & 6 deletions html-templates/events/events.tpl
Expand Up @@ -14,15 +14,14 @@
<h1>{_ "Events"} <span class="badge badge-secondary badge-pill">{$total|number_format}</span></h1>
</header>

{$starUrl = explode('*', $.server.REQUEST_URI)}
{$currentGroup = $starUrl[1]}

<div class="row">
<div class="col-sm-4 col-md-3">
<div class="list-group">
<a class="list-group-item list-group-item-action {tif $currentGroup=='past' ? active}" href="/events/*past">Past Events</a>
<a class="list-group-item list-group-item-action {tif $currentGroup=='upcoming' || $currentGroup=='' ? active}" href="/events/*upcoming">Upcoming Events</a>
<a class="list-group-item list-group-item-action {tif $currentGroup=='all' ? active}" href="/events/*all">All Events</a>
{$requestPath = Site::$requestPath}
{$currentGroup = $requestPath[1]}
<a class="list-group-item list-group-item-action {tif $currentGroup=='*past' ? active}" href="/events/*past">Past Events</a>
<a class="list-group-item list-group-item-action {tif $currentGroup=='*upcoming' || !$currentGroup ? active}" href="/events/*upcoming">Upcoming Events</a>
<a class="list-group-item list-group-item-action {tif $currentGroup=='*all' ? active}" href="/events/*all">All Events</a>
</div>
</div>
<div class="col-sm-8 col-md-9">
Expand Down
4 changes: 2 additions & 2 deletions php-classes/Emergence/Events/EventsRequestHandler.php
Expand Up @@ -76,8 +76,8 @@ public static function handleSegmentsRequest(Event $Event)
'total' => count($Event->Segments)
]);
}
if ($segmentHandle == '*create') {

if ($segmentHandle == '!create') {
return EventSegmentsRequestHandler::handleCreateRequest(EventSegment::create(['Event' => $Event]));
}

Expand Down

0 comments on commit 8ec2631

Please sign in to comment.