ctdo-trac/TracRendezVous/tracrendezvous/rendezvous/templates/rendezvous.html

150 lines
10 KiB
HTML
Raw Permalink Normal View History

2012-03-31 15:45:24 +00:00
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="layout.html" />
<head>
<title>RendezVous</title>
<script type="text/javascript" src="${chrome.htdocs_location}js/wikitoolbar.js"></script>
</head>
<body>
<div id="content">
<div id="rendezvous-main">
<div id="rendezvous-details">
<h1>RendezVous #${rendezvous.rendezvous_id}<span style="color:#ff0000">&nbsp;(${rendezvous.status})</span></h1>
<span class="rendezvous-header">Created on ${rendezvous.time_created.strftime('%d.%m.%Y %H:%M')} by ${rendezvous.author}</span>
<h3>${rendezvous.name}</h3><span></span>
<table class="properties" cellspacing="10px">
<tr>
<th id="h_type">Type</th>
<td headers="h_type">${rendezvous.type_name}</td>
</tr>
<tr py:if="rendezvous.min_votes > 0">
<th id="h_minvotes">Min. Votes</th>
<td headers="h_minvotes">${rendezvous.min_votes}</td>
</tr>
<tr>
<th id="h_tags">Tagged with</th>
<td headers="h_tags">${rendezvous.tags and rendezvous.tags or None}</td>
</tr>
<tr>
<th id="h_location">Location</th>
<td headers="h_location">${location.name}</td>
</tr>
<tr py:if="location and location.lat != None">
<th id="h_coordinates">Coordinates</th>
<td headers="h_coordinates"><a href="${'http://www.openstreetmap.org/index.html?mlat=%s&amp;mlon=%s&amp;zoom=15&amp;layers=B00TTT' % (location.lat, location.lon)}">${location.coordinate_str()}</a></td>
</tr>
<tr py:if="show_location_map and location.lat != None"><td colspan="4"><iframe width="100%" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="${'http://www.openstreetmap.org/export/embed.html?bbox=%f,%f,%f,%f&amp;layer=mapnik&amp;marker=%s,%s&amp;zoom=16' % (location.lon-0.00928, location.lat-0.0033, location.lon+0.011276, location.lat+0.0109, location.lat, location.lon)}" style="border: 1px solid black"></iframe></td></tr>
</table>
</div>
<div py:if="rendezvous.description">
<h3>Description</h3>
${wiki_to_html(context, rendezvous.description, escape_newlines=preserve_newlines)}
</div>
<h3>Votings</h3>
<table class="rendezvous-matrix">
<thead>
<tr class="rendezvous-matrix"><th class="rendezvous-matrix">Date proposals -></th>
<py:for each="date in rendezvous.dates">
2012-04-24 10:25:53 +00:00
<th class="rendezvous-matrix" py:with="dt_begin = date.time_begin.astimezone(selected_tz); dt_end = date.time_end.astimezone(selected_tz)">
2012-03-31 15:45:24 +00:00
<div py:if="date.elected" class="scheduled"><img src="${href.chrome('/hw/images/selected.png')}"/>scheduled</div>
<a py:strip="('RENDEZVOUS_DATE_VIEW' not in perm and date.author != authname) or 'RENDEZVOUS_ADMIN' not in perm" href="${href.date(rendezvous.rendezvous_id)}">${dt_begin.strftime('%d.%m.%Y %H:%M')} ${dt_begin.tzinfo.tzname(None)} - ${dt_end.strftime('%d.%m.%Y %H:%M')} ${dt_end.tzinfo.tzname(None)}</a>
</th>
</py:for>
<th class="rendezvous-matrix" py:if="'RENDEZVOUS_DATE_ADD' in perm and not rendezvous.elected">
<a title="create a new date for rendezvous #${rendezvous.rendezvous_id}" href="${href.date(rendezvous.rendezvous_id)}">new date</a>
</th>
</tr>
</thead>
<tfoot>
<tr class="rendezvous-stats">
<td class="rendezvous-stats">VoteCount</td>
<py:for each="date in rendezvous.dates">
<td class="rendezvous-stats">${date.get_vote_count()}</td>
</py:for>
</tr>
</tfoot>
<tbody>
<py:for each="row in table">
<tr class="rendezvous-matrix">
<td align="center" class="rendezvous-details">${row[0]}</td>
<py:for each="col in row[1:]" py:with="ismyrow = row[0] == req.authname">
<py:choose test="">
<td py:when="rendezvous.elected and not rendezvous.get_date(col[1]).elected" align="center" class="rendezvous-notelected"/>
<py:otherwise test=""><td align="center" class="${not col[0] and 'rendezvous-notvoted' or 'rendezvous-voted'}">
<py:if test="'RENDEZVOUS_VOTE_VIEW' in perm and ismyrow">
<py:choose>
<py:when test="not col[0] and 'RENDEZVOUS_VOTE_ADD' in perm">
<a class="voting" title="quick and dirty voting for the date" href="${href.quickvote(col[1])}">vote</a>&nbsp;&nbsp;
<a class="voting" title="advanced voting operations" href="${href.vote(col[1])}">...advanced</a>
</py:when>
<a py:when="'RENDEZVOUS_VOTE_MODIFY' in perm" class="voting" href="${href.vote(col[1])}">edit</a>
</py:choose>
</py:if>
</td>
</py:otherwise>
</py:choose>
</py:for>
</tr>
</py:for>
<tr class="rendezvous-details" py:if="not voted and len(rendezvous.dates) > 0 and 'RENDEZVOUS_VOTE_ADD' in perm" action="${urlbase}/rendezvous/addvote">
<td class="rendezvous-details"><input type="text" id="n" size="16" maxlength="15" name="newuser" value="${authname}"/></td>
<py:for each="date in rendezvous.dates">
<td align="center" class="rendezvous-details">
<a class="voting" title="quick and dirty voting for the date" href="${href.quickvote(date.date_id)}">vote</a>&nbsp;&nbsp;
<a class="voting" title="advanced voting operations" href="${href.vote(date.date_id)}">...advanced</a>
</td>
</py:for>
</tr>
</tbody>
</table>
<div py:if="has_votes and show_vote_graph == True and 'RENDEZVOUS_VOTE_GRAPH_VIEW' in perm">
<h2>Vote Distribution By RendezVousDate</h2>
<div py:if="date.votes" py:for="date in rendezvous.dates">
<img src="${href.chrome('site/rendezvous_graphs/date%s.png'%date.date_id)}" border="3" width="100%"/>
</div>
</div>
<div>
<py:if test="'RENDEZVOUS_COMMENT_VIEW' in perm">
<py:if test="comments">
<h3>Comments</h3>
<div py:for="comment in comments" class="comment">
<span class="comment-header">added on ${comment.time_created.strftime('%d.%m.%Y %H:%M')} by ${comment.author} <a py:if="authname == comment.author or 'RENDEZVOUS_ADMIN' in perm" href="${href.rendezvous(rendezvous.rendezvous_id, 'comment', comment.comment_id)}#edit">edit</a></span>
${wiki_to_html(context, comment.comment, escape_newlines=preserve_newlines)}
</div>
</py:if>
<h3 id="edit">New Comment</h3>
<div>
<py:if test="preview_comment">
<h3 style="color:#ff0000;">Preview!</h3>
<div class="graph">
<div class="comment">
<span class="comment-header">added on ${preview_comment.time_created.strftime('%d.%m.%Y %H:%M')} by ${preview_comment.author}</span>
${wiki_to_html(context, preview_comment.comment, escape_newlines=preserve_newlines)}
</div>
</div>
</py:if>
<form name="my_comment" action="#edit" method="post" mime-type="text/plain">
<input py:if="preview_comment and preview_comment.comment_id > 0" type="hidden" name="comment_id" value="${preview_comment.comment_id}"/>
<textarea id="new_comment" class="wikitext" rows="20" cols="100" name="comment" py:content="preview_comment and preview_comment.comment or None"></textarea>
<div class="buttons">
<input type="submit" name="preview" value="Preview"/>
<input type="submit" name="save" value="Save"/>
<input type="submit" name="delete" value="Delete"/>
</div>
<b>Note:</b> See <a href="${href.wiki('WikiFormatting')}">WikiFormatting</a> and
<a href="${href.wiki('TracWiki')}">TracWiki</a> for help on editing wiki content.
</form>
</div>
</py:if>
</div>
</div>
</div>
</body>
</html>