Skip to content

Commit 8ec2631

Browse files
Merge pull request #213 from CodeForPhilly/develop
Release: laddr v3.0.0-beta.9
2 parents d605238 + aad5cc6 commit 8ec2631

File tree

3 files changed

+9
-24
lines changed

3 files changed

+9
-24
lines changed

html-templates/events/event.tpl

Lines changed: 2 additions & 16 deletions
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

@@ -94,21 +95,6 @@
9495
</dd>
9596
</div>
9697
{/if}
97-
98-
{*if $Event->Segments}
99-
<dt>Schedule</dt>
100-
<dd>
101-
<ol class="list-unstyled">
102-
{foreach item=Segment from=$Event->Segments}
103-
{$thisDate = date("l, M j", $Segment->StartTime)}
104-
{if $lastDate != $thisDate}
105-
<li><a href="#{$Segment->StartTime}">{$thisDate}</a></li>
106-
{$lastDate = $thisDate}
107-
{/if}
108-
{/foreach}
109-
</ol>
110-
</dd>
111-
{/if*}
11298
</dl>
11399
</div>
114100

html-templates/events/events.tpl

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@
1414
<h1>{_ "Events"} <span class="badge badge-secondary badge-pill">{$total|number_format}</span></h1>
1515
</header>
1616

17-
{$starUrl = explode('*', $.server.REQUEST_URI)}
18-
{$currentGroup = $starUrl[1]}
19-
2017
<div class="row">
2118
<div class="col-sm-4 col-md-3">
2219
<div class="list-group">
23-
<a class="list-group-item list-group-item-action {tif $currentGroup=='past' ? active}" href="/events/*past">Past Events</a>
24-
<a class="list-group-item list-group-item-action {tif $currentGroup=='upcoming' || $currentGroup=='' ? active}" href="/events/*upcoming">Upcoming Events</a>
25-
<a class="list-group-item list-group-item-action {tif $currentGroup=='all' ? active}" href="/events/*all">All Events</a>
20+
{$requestPath = Site::$requestPath}
21+
{$currentGroup = $requestPath[1]}
22+
<a class="list-group-item list-group-item-action {tif $currentGroup=='*past' ? active}" href="/events/*past">Past Events</a>
23+
<a class="list-group-item list-group-item-action {tif $currentGroup=='*upcoming' || !$currentGroup ? active}" href="/events/*upcoming">Upcoming Events</a>
24+
<a class="list-group-item list-group-item-action {tif $currentGroup=='*all' ? active}" href="/events/*all">All Events</a>
2625
</div>
2726
</div>
2827
<div class="col-sm-8 col-md-9">

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)