<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{{$title}}</title>
<style>
.centered { text-align: center; }
.menu a { margin: 7px; }
% include view/board.css
</style>
</head>
<body>
<div class="centered menu">
% if $proj == nil then
% set proj_name = "global"
<a href="/p">projects</a>
<a href="/i">invites</a>
% else
% set proj_name = $proj.name
<a href="/p/{{$proj.name}}/t/new">new ticket</a>
% end
</div>
<br>
<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>{{$states[$state_id]}}</h2>
% for card in $column do
<div class="kanban-card" style="border-color: {{$card.proj_color}};">
<p>{{$card.title}}</p>
<div class="buttons">
% set left_disabled = ""
% if $state_id == 1 then
% set left_disabled = " disabled"
% end
<button{{$left_disabled}}>←</button>
% set right_disabled = ""
% if $state_id == #$states then
% set right_disabled = " disabled"
% end
<button{{$right_disabled}}>→</button>
</div>
</div>
% end
</div>
% set state_id = $state_id + 1
% end
</div>
</body>
</html>