-
Notifications
You must be signed in to change notification settings - Fork 4
/
_event.html.erb
48 lines (41 loc) · 1.43 KB
/
_event.html.erb
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
<% no_map = event.lat.blank? %>
<div class="grid_12 event">
<div class="grid_1 alpha datetime">
<div class="datestamp <%=status_class(event)%>">
<div class="month"><%= event.starts_at.strftime("%b") %></div>
<div class="day"><%= event.starts_at.strftime("%d") %></div>
</div>
<div class="timestamp <%=status_class(event)%>">
<%= event.starts_at.strftime("%H:%M") %>
</div>
</div>
<div class="map grid_3 <%=no_map ? 'no_map' : ''%>">
<div id="event_map_<%=event.id%>">
<%= "no map available" if no_map %>
</div>
</div>
<div class="grid_7 omgega">
<h2 class="eventitle <%=status_class(event)%>">
<%= link_to event.name, event_url(event.id) %>
<span class="event permalink">
<%= link_to 'Permalink', event_url(event.id) %>
</span>
</h2>
<ul>
<li class="eventdate"><%= time_summary(event) %></li>
<li class="eventlocation">
<%= link_to_event_location(event) %>
</li>
</ul>
<div class="eventdescription">
<%= auto_link(event.description).html_safe %>
</div>
</div>
</div>
<% unless no_map %>
<script>
$(document).ready(function() {
show_map("event_map_<%=event.id%>", <%=event.lat || 'null'%>, <%=event.lon || 'null'%>);
});
</script>
<% end %>