<!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>Work Time Management - Burndown Chart</title>
    <link href="${href.chrome('common/css/report.css')}" rel="stylesheet" type="text/css" />
    <link href="${href.chrome('worktime/css/jqplot/jquery.jqplot.min.css')}" rel="stylesheet" type="text/css" />
    <link href="${href.chrome('worktime/css/worktime.css')}" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="${chrome.htdocs_location}js/folding.js"></script>
    <script type="text/javascript" src="${href.chrome('worktime/js/jqplot/burndown.js')}"></script>
    <script type="text/javascript" src="${href.chrome('worktime/js/jqplot/excanvas.min.js')}"></script>
    <script type="text/javascript" src="${href.chrome('worktime/js/jqplot/jquery.jqplot.min.js')}"></script>
    <script type="text/javascript" src="${href.chrome('worktime/js/jqplot/jqplot.pointLabels.min.js')}"></script>
    <script type="text/javascript" src="${href.chrome('worktime/js/jqplot/jqplot.barRenderer.min.js')}"></script>
    <script type="text/javascript" src="${href.chrome('worktime/js/jqplot/jqplot.categoryAxisRenderer.min.js')}"></script>
    <script type="text/javascript" src="${href.chrome('worktime/js/jqplot/jqplot.dateAxisRenderer.min.js')}"></script>
    <script type="text/javascript" src="${href.chrome('worktime/js/jqplot/jqplot.cursor.min.js')}"></script>
	<script type="text/javascript" src="${href.chrome('worktime/js/jqplot/jqplot.highlighter.min.js')}"></script>
    <script type="text/javascript" src="${href.chrome('worktime/js/dateformat.js')}"></script>
    <script type="text/javascript">
      jQuery(document).ready(function($) {
        $("fieldset legend.foldable").enableFolding(false);
      });
    </script>
  </head>
  <body>
    <div id="content">
      <h1>Daily Burndown Chart</h1>
      <form id="form" action="${href.worktime('burndown/daily')}" method="get">
        <fieldset id="filter" class="">
          <legend class="foldable">Filter</legend>
          <table class="list">
            <tr>
              <td>表示期間</td>
              <td>
                <select id="year_selector" name="from_year">
                  <option py:for="y in range(from_date.year-3,from_date.year+4)"
                          value="$y"
                          selected="${y==from_date.year or None}">$y</option>
                </select>年
                <select id="month_selector" name="from_month">
                  <option py:for="m in range(1, 13)"
                          value="$m" selected="${m==from_date.month or None}">$m</option>
                </select>月
              </td>
              <td> - </td>
              <td>
                <select id="year_selector" name="to_year">
                  <option py:for="y in range(to_date.year-3,to_date.year+4)"
                          value="$y"
                          selected="${y==to_date.year or None}">$y</option>
                </select>年
                <select id="month_selector" name="to_month">
                  <option py:for="m in range(1, 13)"
                          value="$m" selected="${m==to_date.month or None}">$m</option>
                </select>月
              </td>
            </tr>
          </table>
        </fieldset>
        <div id="update_button">
          <input type="submit" value="更新" />
        </div>
      </form>
      <hr/>

      <div id="reportgraph_0">
        <div id="placeholder_0" style="width:600px;height:350px"></div>
        <div id="reportgraphopt_0" style="display: none;">
          <span class="legendLoc">se</span>
          <span class="legendYOffset">12</span>
          <span class="renderer">jqplot</span>
          <span class="table">inline</span>
          <span class="stack">False</span>
          <span class="end"/>
          <span class="title">${from_date.year}/${from_date.month} から ${to_date.year}/${to_date.month} のDaily Burndown Chart</span>
          <span class="graph">lines</span>
          <span class="dateFormat">yyyy-MM-dd</span>
          <span class="per">day</span>
          <span class="legendXOffset">-150</span>
          <span class="start"/>
        </div>
        <table id="reportgraphtable_0" class="listing">
          <thead>
            <tr>
              <th>日付</th>
              <th>見積り時間合計</th>
              <th>残存時間合計</th>
            </tr>
          </thead>
          <tbody>
            <tr py:for="date, est, worked, remain in table">
              <td>${date}</td>
              <td>${est}</td>
              <td>${remain}</td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
  </body>
</html>
