<div xmlns:py="http://genshi.edgewall.org/" xmlns:i18n="http://genshi.edgewall.org/i18n" py:strip="">
<div class="milestones">
  <div py:for="idx, milestone in enumerate(milestones)" class="milestone">

    <div class="info">
      <h3><a href="${href.milestone(milestone.name)}">
        Milestone: <em>${milestone.name}</em>
      </a></h3>
      <py:choose>
        <p py:when="milestone.completed" class="date">
          <i18n:msg params="duration, date">
            Completed ${dateinfo(milestone.completed)} ago (${format_datetime(milestone.completed)})
          </i18n:msg>
        </p>
        <p py:when="milestone.is_late" class="date">
          <i18n:msg params="duration, date">
            <strong>${dateinfo(milestone.due)} late</strong> (${format_datetime(milestone.due)})
          </i18n:msg>
        </p>
        <p py:when="milestone.due" class="date">
          <i18n:msg params="duration, date">
            Due in ${dateinfo(milestone.due)} (${format_datetime(milestone.due)})
          </i18n:msg>
        </p>
        <p py:otherwise="" class="date">
          No date set
        </p>
      </py:choose>
    </div>

    <div class="description">
      ${wiki_to_html(context(milestone.resource), milestone.description)}
    </div>

  </div>
</div>
</div>
