ctdo-trac/TracRendezVous/tracrendezvous/event/templates/event_display.html

30 lines
1.5 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)">
<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.fromutc(event.time_begin);dt2 = selected_tz.fromutc(event.time_end)">
<tr>
<td >${with_day and dt.strftime('%Y.%m.%d')} ${dt.strftime('%H:%M')} - ${with_day and dt2.strftime('%Y.%m.%d')} ${dt2.strftime('%H:%M')}</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&amp;mlon=%s&amp;zoom=15&amp;layers=B00TTT' % (event.location.lat, event.location.lon)}">${event.location.coordinate_str()}</a></td>
</tr>
</py:if>
<tr>
<td headers="wiki_link"><a href="${href.wiki(event.wikipage)}">wiki page</a></td>
</tr>
</table>
</py:def>
</html>