1 <% max_total = @referers.inject(0) {|m,a| a['total'].to_i > m ? a['total'].to_i : m }%>
4 <table align=center width=98% border=1 cellpadding=3>
9 <th width=10>Percentage</th>
12 <% i=1; @referers.each do |referer| width=((referer.total.to_f/max_total)*100).round; width = 1 if width <= 1 %>
14 <td align=center><%= i %></td>
15 <td align=center><%= referer.total %></td>
17 <%= referer.referer.nil? ? "Direct Request / Bookmarks" : link_to(truncate(referer.referer, 73), referer.referer, {:target=>'_blank'}) %></td>
18 <td align=center><%= sprintf("%000.2f",(referer.total.to_f/@total_hits)*100) %>%</td>
19 <td align=left><%=image_tag 'sitealizer/bar.gif', :width => width, :height => 3%></td>