:::

3-6 index.tpl

<!DOCTYPE html>
<html lang="zh-Hant-TW">
  {include file='header.tpl'}
  <body>
    <div class="container">

      {include file='navbar.tpl'}

      <div class="row">
        <div class="col-12 col-sm-6 col-lg-3">
          日期:{$now}
        </div>
        <div class="col-12 col-sm-6 col-lg-9">
          <ul>
            <li>今天到期:1</li>
            <li>逾期:2</li>
          </ul>
        </div>
      </div>
      {if $op=='post_form'}
        <!-- 新增表單 -->
        {include file='post_form.tpl'}
      {else}
        <!-- 首頁 -->
        {if $content}
          <div class="table-responsive">
              <table class="table table-bordered border-primary table-hover">
                <thead class="table-primary">
                  <tr>
                    <th scope="col">是否完成</th>
                    <th scope="col">標題</th>
                    <th scope="col">到期日</th>
                    <th scope="col">優先順序</th>
                    <th scope="col">指派對象</th>
                  </tr>
                </thead>
                <tbody>
                  <!-- 迴圈 -->
                  {foreach $content as $row}
                    <tr>
                      <td>{$row.done}</td>
                      <td>{$row.directions}</td>
                      <td>{$row.end}</td>
                      <td>{$row.priority}</td>
                      <td>{$row.asign}</td>
                    </tr>
                  {/foreach}
                </tbody>
              </table>
          </div>
        {else}
          <div class="d-grid col-12 col-md-3 mx-auto">
            <a class="btn btn-info" href="{$action}?op=post_form" role="button">新增待辦事項</a>
          </div>
        {/if}
      {/if}
    </div>
  </body>
</html>