Renaming pamela to macs

This commit is contained in:
2013-01-31 20:48:27 -07:00
parent a7e999614c
commit 048ce52111
11 changed files with 32 additions and 22 deletions

View File

@@ -0,0 +1,25 @@
<%= form_for(@mac) do |f| %>
<% if @mac.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@mac.errors.count, "error") %> prohibited this Mac from being saved:</h2>
<ul>
<% @mac.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :user_id, "User" %><br />
<%= collection_select(:mac, :user_id, @users, :id, :name) %>
</div>
<div class="field">
<%= f.label :mac, "Mac" %><br />
<%= f.text_field :mac %>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>

View File

@@ -0,0 +1,6 @@
<h1>Editing Mac</h1>
<%= render 'form' %>
<%= link_to 'Show', @mac %> |
<%= link_to 'Back', macs_path %>

View File

@@ -0,0 +1,9 @@
<h2>What machines are on our network?</h2>
<% @macs.each do |mac| %>
<%= mac.user.name unless mac.user.blank? %>
<%= mac.mac %> <!--
<%= mac.since %>,
<%= mac.refreshed %>,
<%= mac.active %>--> |
<%= link_to 'Edit', edit_mac_path(mac) %> <br/>
<% end %>

View File

@@ -0,0 +1,5 @@
<h1>New Mac</h1>
<%= render 'form' %>
<%= link_to 'Back', macs_path %>

View File

@@ -0,0 +1,5 @@
Scanning...
<% @log.each do |log| %>
<%= log.mac %> =
<%= log.ip %><br/>
<% end %>

View File

@@ -0,0 +1,12 @@
<p>
<b>User:</b>
<%= @mac.user.name unless @mac.user.blank? %>
</p>
<p>
<b>Mac:</b>
<%= @mac.mac %>
</p>
<%= link_to 'Edit', edit_mac_path(@mac) %> |
<%= link_to 'Back', macs_path %>