Making it possible for users to easily register existing MACs
This commit is contained in:
@@ -17,7 +17,8 @@
|
||||
</div>
|
||||
<div class="field">
|
||||
<%= f.label :mac %><br />
|
||||
<%= f.text_field :mac %>
|
||||
<%= f.text_field :mac, :value => (@mac.mac || @arp || nil) %>
|
||||
<% if @arp.present? %><br/><em>Autodetected from your IP of <%= @ip %></em><% end %>
|
||||
</div>
|
||||
<div class="field">
|
||||
<%= f.label :note %><br />
|
||||
|
||||
@@ -93,6 +93,14 @@
|
||||
<% end %>
|
||||
</p>
|
||||
|
||||
<b>Computers: </b><%= link_to "+ Add", new_mac_path, :class => 'btn' if can? :create, Mac %>
|
||||
<ul>
|
||||
<% @user.macs.each do |mac| %>
|
||||
<li><%= link_to mac.mac, mac %></li>
|
||||
<% end %>
|
||||
<% if @user.macs.blank? %><li>n/a</li><% end %>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
<% if current_user.admin? then %>
|
||||
<b>Payments:</b>
|
||||
|
||||
Reference in New Issue
Block a user