Special-case the LINK item type in the templates.

Ignore-this: f498bd061633fee9b83120e91433db7e

darcs-hash:20091123214934-77622-cf80679228854bc8b727f575cc1a5d4bf24e047a.gz
This commit is contained in:
Mathieu Bridon (bochecha) 2009-11-23 13:49:34 -08:00
parent 1506a171be
commit 8f544f7faf
2 changed files with 23 additions and 7 deletions

View File

@ -54,7 +54,21 @@ hr {
<py:if test="len(item.notes) > 0">
<li py:for="note in item.notes">
<i class="itemtype">${note.itemtype}</i>:
<span class="${note.itemtype}">${note.line}</span>
<py:choose>
<py:when test="note.itemtype == 'LINK'">
<span class="${note.itemtype}">
<a href="${note.url}">
<py:choose>
<py:when test="note.line">${note.line}</py:when>
<py:otherwise>${note.url}</py:otherwise>
</py:choose>
</a>
</span>
</py:when>
<py:otherwise>
<span class="${note.itemtype}">${note.line}</span>
</py:otherwise>
</py:choose>
<span class="details">(<a href='${meeting.logs}#${note.anchor}'>${note.nick}</a>, ${note.time})</span>
</li>
</py:if>

View File

@ -10,8 +10,7 @@ ${meeting.title}
${heading}
Meeting started by ${meeting.owner} at ${time.start} ${time.timezone}. The full logs are
available at ${meeting.logs} .
${wrap("Meeting started by %s at %s %s. The full logs are available at %s ."%(meeting.owner, time.start, time.timezone, meeting.logs), 1)}
@ -19,16 +18,19 @@ Meeting summary
---------------
{% for item in agenda %}\
{% choose %}\
{% choose %}
{% when item.topic.nick %}${wrap("* %s (%s, %s)"%(item.topic.topic, item.topic.nick, item.topic.time), 1)}{% end %}\
{% otherwise %}${wrap("* %s"%(item.topic.topic), 1)}{% end %}
{% end %}\
{% for note in item.notes %}\
${wrap("* %s: %s (%s, %s)"%(note.itemtype, note.line, note.nick, note.time), 2)}
{% choose %}\
{% when note.itemtype == 'LINK' %}${wrap("* %s: %s %s (%s, %s)"%(note.itemtype, note.url, note.line, note.nick, note.time), 2)}{% end %}\
{% otherwise %}${wrap("* %s: %s (%s, %s)"%(note.itemtype, note.line, note.nick, note.time), 2)}{% end %}
{% end %}\
{% end %}\
{% end %}
{%end%}
Meeting ended at ${time.end} ${time.timezone}.
${wrap("Meeting ended at %s %s."%(time.end, time.timezone), 1)}