1 <% max_total = @browsers.inject(0) {|m,a| a[:total].to_i > m ? a[:total].to_i : m }%>
4 <table align=center width=90% border=1 cellpadding=3>
9 <th width=70>Version</th>
10 <th width=10>Percentage</th>
13 <% i=1; @browsers.each do |browser| width=((browser[:total].to_f/max_total)*200).round; width = 1 if width < 1 %>
15 <td align=center><%= i %></td>
16 <td align=center><%= browser[:total] %></td>
17 <td><%= browser[:browser][:type] %></td>
18 <td align=left><%= browser[:browser][:version] ? browser[:browser][:version] : 'Unknown' %> </td>
19 <td align=center><%= sprintf("%000.2f",(browser[:total].to_f/@total_hits)*100) %>%</td>
20 <td align=left><%=image_tag 'sitealizer/bar.gif', :width => width, :height => 3%></td>