Updated stats and privacy

This commit is contained in:
2013-09-28 18:55:22 -07:00
parent 2c204a8f9d
commit 9e08a0d036
4 changed files with 48 additions and 41 deletions

View File

@@ -1,3 +1,4 @@
<% if can? :read_details, Mac %>
<% if @mac_time_start_date.present? %>
<b>Most Active Machine Last <%= distance_of_time_in_words DateTime.now, @mac_time_start_date %>:</b>
<span title="<%= @most_active_mac.mac %><%= " - "+@most_active_mac.ip.to_s if can? :read_details, @most_active_mac %>">
@@ -13,6 +14,7 @@
- <%= (@runner_up.last[:time] / 1.hour).round %> hrs
</span>
<% end %>
<% end %>
<h2>What machines are on our network?</h2>
<%= link_to "New MAC registration", new_mac_path if can? :create, Mac %>
@@ -31,6 +33,10 @@ Rails.logger.info mac.inspect %>
<% end %>
</ul>
<% unless can? :read_details, Mac %>
<p>To see more or register your own, login!</p>
<% end %>
<% if can? :read_details, Mac %>
<ul class="mac_list hidden">
<% @hidden_macs.each do |mac| %>