lib/templates/flog_page.html.erb in p8-metric_fu-0.8.4 vs lib/templates/flog_page.html.erb in p8-metric_fu-0.8.4.1
- old
+ new
@@ -1,13 +1,22 @@
<html>
<head>
<style>
- <%= open(File.join(MetricFu::TEMPLATE_DIR, "flog.css")) { |f| f.read } %>
+ <%= inline_css("flog.css") %>
</style>
</head>
<body>
<p>Score: <%= score %></p>
<% scanned_methods.each do |sm| %>
- <%= sm.to_html %>
- <% end %>
+ <p><strong><%= sm.name %> (<%= sm.score %>)</strong></p>
+ <table>
+ <tr><th>Score</th><th>Operator</th></tr>
+ <% sm.operators.each_with_index do |operator, count| %>
+ <tr class='<%= cycle("light", "dark", count) %>'>
+ <td class='score'><%= sprintf(SCORE_FORMAT, operator.score) %></td>
+ <td class='score'><%= operator.operator %></td>
+ </tr>
+ <% end %>
+ </table>
+ <% end %>
</body>
</html>
\ No newline at end of file