Commit 8e137333f747401e27b9e924b0ea79684e8e170b

a scattering of microformats added and a few more markup validation erros fixed

Commit diff

lib/component.rhtml

 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
14<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
25<head>
36<title>Component <%= component.name %></title>
1616
1717<%= render "issue_table", :show_component => false, :show_release => true %>
1818
19<p class="footer">Generated <%= Time.now %> by <a href="http://ditz.rubyforge.org/">ditz</a>.
19<p class="footer vevent"><span class="summary">Generated</span> <%= uf_time Time.now %> by <a href="http://ditz.rubyforge.org/">ditz</a>.</p>
20
2021</body>
2122</html>
toggle raw diff

lib/html.rb

 
3636 def to_s
3737 @@erbs[@template_name].result binding
3838 end
39
40 def uf_time time
41 "<abbr class=\"dtstart\" title=\"" + time.strftime('%Y-%m-%dT%H:%M') + "\">" + time.to_s + "</abbr>"
42 end
43
44 def uf_hatom time
45 "<abbr class=\"updated\" title=\"" + time.strftime('%Y-%m-%dT%H:%M') + "\">" + time.to_s + "</abbr>"
46 end
47
48
3949end
4050
4151end
toggle raw diff

lib/index.rhtml

 
4444<% else %>
4545 <ul>
4646 <% past_releases.sort_by { |r| r.release_time }.reverse.each do |r| %>
47 <li><%= link_to r, "Release #{r.name}" %>, released <%= r.release_time.pretty_date %>. </li>
47 <li class="vevent"><span class="summary"><%= link_to r, "Release #{r.name}" %>, released</span> <%= uf_time r.release_time %>. </li>
4848 <% end %>
4949 </ul>
5050<% end %>
8080 </ul>
8181<% end %>
8282
83<p class="footer">Generated <%= Time.now %> by <a href="http://ditz.rubyforge.org/">ditz</a>.</p>
83<p class="footer vevent"><span class="summary">Generated</span> <%= uf_time Time.now %> by <a href="http://ditz.rubyforge.org/">ditz</a>.</p>
8484
8585</body>
8686</html>
toggle raw diff

lib/issue.rhtml

 
1414
1515<h1><%= issue.title %></h1>
1616
17<%=
18 project.issues.inject(p(issue.desc)) do |s, i|
19 s.gsub(/\{issue #{i.id}\}/, link_to(i, i.title))
20 end.gsub(/\{issue \w+\}/, "[unknown issue]")
21%>
22
23<table>
17<table class="vevent">
2418 <tr>
2519 <td class="attrname">Id:</td>
26 <td class="attrval"><%= issue.id %></td>
20 <td class="attrval uid"><%= issue.id %></td>
2721 </tr>
2822
2923 <tr>
2626 </tr>
2727
2828 <tr>
29 <td class="attrname">Creation time:</td>
30 <td class="attrval"><%= issue.creation_time %></td>
29 <td class="attrname summary">Creation time:</td>
30 <td class="attrval"><%= uf_time issue.creation_time %></td>
3131 </tr>
3232
3333 <tr>
7474 <%= issue.status_string %><% if issue.closed? %>: <%= issue.disposition_string %><% end %>
7575 </td>
7676 </tr>
77
78 <tr>
79 <td class="attrname">Description</td>
80 <td class="attrval description">
81 <%=
82 project.issues.inject(p(issue.desc)) do |s, i|
83 s.gsub(/\{issue #{i.id}\}/, link_to(i, i.title))
84 end.gsub(/\{issue \w+\}/, "[unknown issue]")
85 %>
86 </td>
87 </tr>
88
7789</table>
7890
7991<h2>Issue log</h2>
8092
81<table>
93<table class="hfeed">
8294<% issue.log_events.each_with_index do |(time, who, what, comment), i| %>
8395<% if i % 2 == 0 %>
84 <tr class="logentryeven">
96 <tr class="logentryeven hentry">
8597<% else %>
86 <tr class="logentryodd">
98 <tr class="logentryodd hentry">
8799<% end %>
88 <td class="logtime"><%=h time %></td>
100 <td class="logtime"><%= uf_hatom time %></td>
89101 <td class="logwho"><%=obscured_email who %></td>
90 <td class="logwhat"><%=h what %></td>
102 <td class="logwhat entry-title"><%=h what %></td>
91103 </tr>
92104 <tr><td colspan="3" class="logcomment">
93105 <% if comment.empty? %>
110110<% end %>
111111</table>
112112
113<p class="footer">Generated <%= Time.now %> by <a href="http://ditz.rubyforge.org/">ditz</a>.<p>
113<p class="footer vevent"><span class="summary">Generated</span> <%= uf_time Time.now %> by <a href="http://ditz.rubyforge.org/">ditz</a>.</p>
114
114115</body>
115116</html>
toggle raw diff

lib/issue_table.rhtml

 
1<table>
1<table class="hfeed">
22<% issues.sort_by { |i| i.sort_order }.each do |i| %>
3 <tr>
3 <tr class="hentry">
44 <td class="issuestatus_<%= i.status %>">
55 <%= i.status_string %><% if i.closed? %>: <%= i.disposition_string %><% end %>
66 </td>
7 <td class="issuename">
7 <td class="issuename entry-title">
88 <%= link_to i, i.title %>
99 <%= i.bug? ? '(bug)' : '' %>
1010 </td>
2323 component <%= link_to project.component_for(i.component), i.component %>
2424 </td>
2525 <% end %>
26 <td>
27 <%= uf_hatom i.creation_time %>
28 </td>
2629 </tr>
2730<% end %>
28</table>
29
31</table>
toggle raw diff

lib/release.rhtml

 
1313
1414<h1><%= project.name %> release <%= release.name %></h1>
1515
16<p>
1716<table>
1817 <tr>
1918 <td class="attrname">Status:</td>
2019 <td class="attrval"><%= release.status %></td>
2120 </tr>
2221 <% if release.released? %>
23 <tr>
24 <td class="attrname">Release time:</td>
25 <td class="attrval"><%= release.release_time %></td>
22 <tr class="vevent">
23 <td class="attrname summary">Release time:</td>
24 <td class="attrval"><%= uf_time release.release_time %></td>
2625 </tr>
2726 <% end %>
2827 <tr>
3333 <td class="attrval"><%= sprintf "%.0f%%", pct_done %></td>
3434 </tr>
3535</table>
36</p>
3736
3837<h2>Issues</h2>
3938<% if issues.empty? %>
4242<% end %>
4343
4444<h2>Release log</h2>
45<table>
45<table class="hfeed">
4646<% release.log_events.each_with_index do |(time, who, what, comment), i| %>
4747<% if i % 2 == 0 %>
48 <tr class="logentryeven">
48 <tr class="logentryeven hentry">
4949<% else %>
50 <tr class="logentryodd">
50 <tr class="logentryodd hentry">
5151<% end %>
52 <td class="logtime"><%=h time %></td>
52 <td class="logtime"><%= uf_hatom time %></td>
5353 <td class="logwho"><%=obscured_email who %></td>
54 <td class="logwhat"><%=h what %></td>
54 <td class="logwhat entry-title"><%=h what %></td>
5555 </tr>
5656 <tr><td colspan="3" class="logcomment">
5757 <% if comment.empty? %>
6262<% end %>
6363</table>
6464
65<p class="footer">Generated <%= Time.now %> by <a href="http://ditz.rubyforge.org/">ditz</a>.</p>
65<p class="footer vevent"><span class="summary">Generated</span> <%= uf_time Time.now %> by <a href="http://ditz.rubyforge.org/">ditz</a>.</p>
6666
6767</body>
6868</html>
toggle raw diff

lib/style.css

 
22 background: white;
33 color: #202020;
44 margin-bottom: 2em;
5 margin-left: auto;
6 margin-right: auto;
7 width: 90%;
85}
96
107a, a:visited {
3838
3939h1 {
4040 padding: 0.2em;
41 margin-left: -1em;
42 margin-right: 1em;
4341 background: #abc;
4442}
4543
toggle raw diff

lib/unassigned.rhtml

 
99</head>
1010<body>
1111
12<%= link_to "index", "&laquo; #{project.name} project page" %>
13
1214<h1>Issues not assigned to any release</h1>
1315
14<table>
16<table class="hfeed">
1517<% issues.sort_by { |i| i.sort_order }.each do |i| %>
16 <tr>
18 <tr class="hentry">
1719 <td class="issuestatus_<%= i.status %>">
1820 <%= i.status_string %><% if i.closed? %>: <%= i.disposition_string %><% end %>
1921 </td>
20 <td class="issuename">
22 <td class="issuename entry-title">
2123 <%= link_to i, i.title %>
2224 <%= i.bug? ? '(bug)' : '' %>
2325 </td>
26 <td>
27 <%= uf_hatom i.creation_time %>
28 </td>
2429 </tr>
2530<% end %>
2631</table>
2732
28<p class="footer">Generated <%= Time.now %> by <a href="http://ditz.rubyforge.org/">ditz</a>.</p>
33<p class="footer vevent"><span class="summary">Generated</span> <%= uf_time Time.now %> by <a href="http://ditz.rubyforge.org/">ditz</a>.</p>
34
2935</body>
3036</html>
toggle raw diff