<div xmlns="http://www.w3.org/1999/xhtml"
     xmlns:py="http://genshi.edgewall.org/"
     xmlns:xi="http://www.w3.org/2001/XInclude">
  <xi:include href="${g.allura_templates}/lib.html"/>

  <py:if test="value.author_url is not None">
    Authored by
    <a href="${value.author_url}">${email_gravatar(value.author.email, title=value.author.name, size=16)}</a>
    <a href="${value.author_url}">${value.author.name}</a>
  </py:if>
  <py:if test="value.author_url is None">
    Authored by
    ${email_gravatar(value.author.email, title=value.author.name, size=16)} $value.author.name
  </py:if>  
  <py:if test="hasattr(value,'authored_datetime')">${h.ago(value.authored_datetime)}</py:if>
  <py:if test="value.committer != value.author">
    <py:if test="hasattr(value,'committer_url') and value.committer_url is not None">
      Committed by
      <a href="${value.committer_url}">${email_gravatar(value.committer.email, title=value.committer.name, size=16)}</a>
      <a href="${value.committer_url}">${value.committer.name}</a>
    </py:if>
    <py:if test="not hasattr(value,'committer_url') or value.committer_url is None">
      Committed by
      ${email_gravatar(value.committer.email, title=value.committer.name, size=16)} $value.committer.name
    </py:if>
    <py:if test="hasattr(value,'committed_datetime')">${h.ago(value.committed_datetime)}</py:if>
  </py:if>

  <br/>
  <a href="${value.tree().url()}">Tree</a><br/>
  <py:if test="prev">
    Parent(s):
    <py:for each="ci in prev"><a href="${ci.url()}">${h.text.truncate(ci._id, 10)}</a></py:for>
    <br/>
  </py:if>
  <py:if test="next">
    Child(ren):
    <py:for each="ci in next"><a href="${ci.url()}">${h.text.truncate(ci._id, 10)}</a></py:for>
    <br/>
  </py:if>
  ${Markup(g.markdown.convert(value.message.decode('utf8')))}
</div>
