login

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>projects - {{$title}}</title>
  <style>
    .centered { text-align: center; }
    .archived { background-color: #FFFF90; }
    % include view/menu.css
    % include view/table.css
  </style>
</head>
<body>
  % include view/menu.html
  <h1 class="centered">projects</h1>
  <table class="center">
    <tr>
      <th>name</th>
      <th>description</th>
      <th>priority</th>
      <th>color</th>
      <th>edit</th>
      <th>status</th>
      <th>delete</th>
    </tr>
    % for proj in $projs do
      % if $proj.is_active ~= 0 then
        % set row_class = ""
        % set action = "archive"
      % else
        % set row_class = ' class="archived"'
        % set action = "restore"
      % end
      <tr{{!$row_class}}>
        <td><a href="/p/{{$proj.name}}">{{$proj.name}}</a></td>
        <td>{{$proj.desc}}</td>
        <td>{{$proj.priority}}</td>
        <td><span style="background-color:{{$proj.color}};">{{$proj.color}}</span></td>
        <td><a href="/p/{{$proj.name}}/edit">edit</a></td>
        <td>
          <form action="/p/{{$proj.name}}/{{$action}}" method="post">
            <button type="submit">{{$action}}</button>
          </form>
        </td>
        <td>
          <form action="/p/{{$proj.name}}/del" method="post">
            <button type="submit">delete</button>
          </form>
        </td>
      </tr>
    % end
  </table>
  <br>
  <div class="centered"><a href="/p/new">new project</a></div>
</body>
</html>