<!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" />
  <xi:include href="macros.html" />
  <head>
    <title>${_('Roadmap')}</title>
    <link rel="stylesheet" type="text/css"
          href="${chrome.htdocs_location}css/roadmap.css" />
  </head>

  <body>
    <div id="content" class="roadmap">
      <h1>${_('Roadmap')}</h1>

      <form id="prefs" method="get" action="">
        <div>
          <input type="checkbox" id="showall" name="show" value="all"
                 checked="${showall or None}" />
          <label for="showall">${_('Show already completed milestones')}</label>
        </div>
        <div class="buttons">
          <input type="submit" value="${_('Update')}" />
        </div>
      </form>

      <ul class="milestones">
        <li py:for="idx, milestone in enumerate(milestones)" class="milestone">

          <div class="info" py:with="mstats = milestone_stats[idx]">
            <h2><a href="${href.milestone(milestone.name)}">
              ${_('Milestone')}: <em>${milestone.name}</em>
            </a></h2>
            <py:choose>
              <p py:when="milestone.completed" class="date">
                <!--! FIXME: message_contains_tag --> 
                ${dateinfo(milestone.completed)} に完了 
                (${format_date(milestone.completed)})
              </p>
              <p py:when="milestone.is_late" class="date">
                <!--! FIXME: message_contains_tag --> 
                <strong>完了期限から ${dateinfo(milestone.due)} 遅れ</strong>
                (${format_date(milestone.due)})
              </p>
              <p py:when="milestone.due" class="date">
                <!--! FIXME: message_contains_tag --> 
                あと ${dateinfo(milestone.due)} で完了期限 
                (${format_date(milestone.due)})
              </p>
              <p py:otherwise="" class="date">
                ${_('No date set')} 
              </p>
            </py:choose>
            <py:if test="mstats.stats.count">${progress_bar(mstats.stats, mstats.interval_hrefs, stats_href=mstats.stats_href)}</py:if>
          </div>

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

        </li>
      </ul>

      <div py:if="'MILESTONE_CREATE' in perm" class="buttons">
       <form method="get" action="${href.milestone()}"><div>
        <input type="hidden" name="action" value="new" />
        <input type="submit" value="${_('Add new milestone')}" />
       </div></form>
      </div>

      <!--! FIXME: message_contains_tag --> 
      <div id="help"><strong>Note:</strong> ロードマップについてのヘルプは
        <a href="${href.wiki('TracRoadmap')}">TracRoadmap</a> を参照
        して下さい。
      </div>

    </div>
  </body>
</html>
