File: release.rhtml

package info (click to toggle)
ditz 0.5-1
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 356 kB
  • ctags: 489
  • sloc: ruby: 3,664; sh: 15; makefile: 12
file content (98 lines) | stat: -rw-r--r-- 2,813 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title><%= project.name %> release <%= release.name %></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>

<div class="main">

<h1><%= project.name %> release <%= release.name %></h1>
<div class="backptr"><%= link_to "index", "&laquo; #{project.name} project page" %></div>

<table>
  <tbody>
    <tr>
      <td class="attrname">Status:</td>
      <td class="attrval"><%= release.status %></td>
    </tr>
    <% if release.released? %>
      <tr>
        <td class="attrname">Release time:</td>
        <td class="attrval"><%=t release.release_time %></td>
      </tr>
    <% end %>
    <tr>
      <td class="attrname">Completion:</td>
      <td>
      <%
        num_done = issues.count_of { |i| i.closed? }
        pct_done = issues.size == 0 ? 1.0 : (num_done.to_f / issues.size.to_f)
      %>
      <%= progress_meter pct_done %>
      <%= sprintf "%.0f%%", pct_done * 100.0 %>
      </td>
    </tr>
    <tr><td></td><td class="attrval">
      <%= num_done %> / <%= issues.size %> issues
    </td></tr>
  </tbody>
</table>

<h2>Issues</h2>
<% if issues.empty? %>
  <p>No issues assigned to this release.</p>
<% else %>
  <%= render "issue_table", :show_component => false, :show_release => false %>
<% end %>

<h2>Recent activity for this release</h2>
<table class="log">
  <tbody>
  <% issues.map { |i| i.log_events.map { |e| [e, i] } }.
        flatten_one_level.
        sort_by { |e| e.first.first }.
        reverse[0 ... 10].
        each_with_index do |((date, who, what, comment), i), idx| %>
    <tr class="<%= idx % 2 == 0 ? "even-row" : "odd-row" %>">
      <td class="date"><%= date.pretty_date %></td>
      <td class="issuename">
        <%= issue_link_for i, :status_image => true %>
      </td>
      <td> <%= what %> </td>
    </tr>
    <tr><td></td></tr>
  <% end %>
  </tbody>
</table>

<h2>Release log</h2>
<table class="log">
  <tbody>
<% release.log_events.reverse.each_with_index do |(time, who, what, comment), i| %>
    <tr class="<%= i % 2 == 0 ? "even-row" : "odd-row" %>">
    <td class="date"><%=h time %></td>
    <td class="person"><%=obscured_email who %></td>
    <td class="message"><%=h what %></td>
    </tr>
    <tr><td colspan="3" class="logcomment">
      <% if comment.empty? %>
      <% else %>
        <%= link_issue_names project, comment %>
      <% end %>
    </td></tr>
    <tr><td></td></tr>
<% end %>
  </tbody>
</table>

</div>
<div class="footer">Generated by <a href="http://ditz.rubyforge.org/">ditz</a>.</div>

</body>
</html>