<% import datetime %>
<%include file="navigation.html"/>

## Release ${release["name"] | h}

<% closed_issues = filter(lambda issue: issue["status"] == ":closed", issues) open_issues = filter(lambda issue: issue["status"] != ":closed", issues) issue_count = len(issues) closed_count = len(closed_issues) open_count = len(open_issues) closed_percent = closed_count * 100 / issue_count if issue_count else 100 open_percent = open_count * 100 / issue_count if issue_count else 100 keywords = { ":released":"Released", ":unreleased":"Unreleased" } %>

### Details

Status:
  ${keywords[release["status"]] | h}
Progress:
% if release["status"] != ":released":
  ${" " * closed_percent}${" " * open_percent}${closed_count} / ${issue_count | h} (${closed_percent | h}%)
% else:
  ${release["release_time"].strftime("Released %B %d, %Y") | h}
% endif

### Open Issues

% if len(open_issues):

% for issue in sorted(open_issues, lambda lhs, rhs: cmp(lhs["creation_time"], rhs["creation_time"]), reverse=True):
${issue['creation_time'].date() | h} | ${issue['title'] | h}
% endfor

% else:

No open issues.

% endif

### Closed Issues

% if len(closed_issues):

% for issue in sorted(closed_issues, lambda lhs, rhs: cmp(lhs["creation_time"], rhs["creation_time"]), reverse=True):
${issue['creation_time'].date() | h} | ${issue['title'] | h}
% endfor

% else:

No closed issues.

% endif

### Release Log

% for event in release["log_events"]:
${event[0].strftime("%Y-%m-%d %H:%M UTC") | h} | ${event[1] | h} | ${event[2] | h}
% endfor