<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
% if $proj == nil then
<title>{{$title}}</title>
% else
<title>{{$proj.name}} - {{$title}}</title>
% end
<style>
.centered { text-align: center; }
% include view/menu.css
% include view/board.css
</style>
</head>
<body>
% include view/menu.html
% if $proj == nil then
% set proj_name = "global"
% set from = "home"
% else
% set proj_name = $proj.name
% set from = "proj"
% end
<h1 class="centered">{{$proj_name}} board</h1>
<div class="kanban-board">
% set state_id = 1
% for column in $columns do
<div class="kanban-column">
<h2 class="centered">
{{$states[$state_id]}}
% if #$column > 0 then
({{#$column}})
% end
</h2>
% for card in $column do
<div class="kanban-card" style="border-color: {{$card.proj_color}};">
<div>
% if $proj == nil then
<a href="/p/{{$card.proj_name}}">{{$card.proj_name}}</a>
% end
<a href="/p/{{$card.proj_name}}/t/{{$card.code}}">#{{$card.code}}</a>
</div>
<p>{{$card.title}}</p>
<div>
{{os.date("%F %R", $card.time)}}
({{$card.priority}})
</div>
<div class="buttons">
% set base_path = "/p/"..$card.proj_name.."/t/"..$card.code
% set shift_path = $base_path.."/shift"
<form action="{{$shift_path}}/left?from={{$from}}" method="post">
<button type="submit">←</button>
</form>
<form action="{{$shift_path}}/right?from={{$from}}" method="post">
<button type="submit">→</button>
</form>
</div>
</div>
% end
</div>
% set state_id = $state_id + 1
% end
</div>
</body>
</html>