<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{{$title}}</title>
<style>
.centered { text-align: center; }
.menu a { margin: 7px; }
% include view/menu.css
% include view/ticket.css
</style>
</head>
<body>
% include view/menu.html
<h1 class="centered">{{$proj.name}} - ticket #{{$tick.code}}</h1>
<div class="ticket-details">
<h1>{{$tick.title}}</h1>
<div class="header-details">
<p class="date"><strong>Date:</strong> {{os.date("%F %R", $tick.time)}}</p>
<p class="author">
<strong>Author:</strong>
<a href="/u/{{$tick.author_nick}}">{{$tick.author_name}}</a>
</p>
</div>
<pre>{{$tick.desc}}</pre>
<div class="footer-details">
<p><strong>Status:</strong> {{$states[$tick.state_id]}}</p>
<p><strong>Priority:</strong> {{$tick.priority}}</p>
<div class="menu">
<a href="/p/{{$proj.name}}/t/{{$tick.code}}/edit">edit</a>
<form action="/p/{{$proj.name}}/t/{{$tick.code}}/del" method="post">
<button type="submit">delete</button>
</form>
</div>
</div>
</div>
<div class="comments-section">
<h2>Comments</h2>
% for ev in $events do
<div class="comment">
<div class="header-details">
<p class="date"><strong>Date:</strong> {{os.date("%F %R", $ev.time)}}</p>
<p class="author">
<strong>Author:</strong>
<a href="/u/{{$ev.author_nick}}">{{$ev.author_name}}</a>
</p>
</div>
% if $ev.type == "comment" then
<pre>{{$ev.text}}</pre>
<div class="footer-details">
<div class="menu">
<a href="/p/{{$proj.name}}/t/{{$tick.code}}/c/{{$ev.code}}/edit">edit</a>
<form action="/p/{{$proj.name}}/t/{{$tick.code}}/c/{{$ev.code}}/del" method="post">
<button type="submit">delete</button>
</form>
</div>
</div>
% end
% if $ev.type == "shift" then
<p class="centered shift"><em>{{$ev.old_stt_name}} → {{$ev.new_stt_name}}</em></p>
% end
</div>
% end
</div>
<a href="/p/{{$proj.name}}/t/{{$tick.code}}/c/new">add comment</a>
</body>
</html>