30 lines
1.6 KiB
HTML
30 lines
1.6 KiB
HTML
<html xmlns="http://www.w3.org/1999/xhtml"
|
|
xmlns:py="http://genshi.edgewall.org/"
|
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
|
<py:def function="render_event(event, with_day=False, wiki_on=True)">
|
|
<h2>${event.name}<span py:if="'EVENTS_MODIFY' in perm" class="edit"><a style="color:#f00;" href="${href.event('edit', event.e_id)}">edit</a></span></h2>
|
|
<table py:with="dt = selected_tz.normalize(event.time_begin.astimezone(selected_tz));dt2 = selected_tz.normalize(event.time_end.astimezone(selected_tz))">
|
|
<tr>
|
|
<td >${with_day==True and dt.strftime('%Y.%m.%d') or None} ${dt.strftime('%H:%M')} - ${with_day==True and dt2.strftime('%Y.%m.%d') or None} ${dt2.strftime('%H:%M')} (${dt.tzinfo.tzname(None)})</td>
|
|
<!-- <td >${dt.strftime('%H:%M')} ${dt.tzinfo.tzname(None)} - ${dt2.strftime('%H:%M')} ${dt2.tzinfo.tzname(None)}</td> -->
|
|
</tr>
|
|
<tr py:if="event.periodic()">
|
|
<td headers="h_tags">${event.rrule and event.rrule.explain() or None}</td>
|
|
</tr>
|
|
<tr py:if="event.tags">
|
|
<td headers="h_tags">${event.tags and event.tags or None}</td>
|
|
</tr>
|
|
<py:if test="event.location and event.location.lat != None">
|
|
<tr>
|
|
<td headers="h_location">${event.location.name}</td>
|
|
</tr>
|
|
<tr py:if="event.location">
|
|
<td headers="h_coordinates"><a href="${'http://www.openstreetmap.org/index.html?mlat=%s&mlon=%s&zoom=15&layers=B00TTT' % (event.location.lat, event.location.lon)}">${event.location.coordinate_str()}</a></td>
|
|
</tr>
|
|
</py:if>
|
|
<tr py:if="wiki_on">
|
|
<td headers="wiki_link"><a href="${href.wiki(event.wikipage)}">wiki page</a></td>
|
|
</tr>
|
|
</table>
|
|
</py:def>
|
|
</html> |