fixed ip ban ui

This commit is contained in:
albert
2011-10-17 00:31:49 -04:00
parent b9ace89e53
commit d20f1ee0a4
5 changed files with 14 additions and 3 deletions

View File

@@ -18,6 +18,5 @@ class IpBansController < ApplicationController
def destroy
@ip_ban = IpBan.find(params[:id])
@ip_ban.destroy
redirect_to ip_bans_path
end
end

View File

@@ -0,0 +1,6 @@
<% content_for(:secondary_links) do %>
<menu>
<li><%= link_to "Listing", ip_bans_path %></li>
<li><%= link_to "New", new_ip_ban_path %></li>
</menu>
<% end %>

View File

@@ -0,0 +1 @@
location.reload();

View File

@@ -2,7 +2,7 @@
<div id="a-index">
<h1>IP Bans</h1>
<table>
<table class="striped">
<thead>
<tr>
<th>IP Address</th>
@@ -22,6 +22,9 @@
<% end %>
</tbody>
</table>
<%= numbered_paginator(@ip_bans) %>
</div>
</div>
<%= render "secondary_links" %>

View File

@@ -5,7 +5,9 @@
<%= simple_form_for(@ip_ban) do |f| %>
<%= f.input :ip_addr %>
<%= f.input :reason %>
<%= f.button :submit %>
<%= f.button :submit, "Submit" %>
<% end %>
</div>
</div>
<%= render "secondary_links" %>