fixed ip ban ui
This commit is contained in:
@@ -18,6 +18,5 @@ class IpBansController < ApplicationController
|
|||||||
def destroy
|
def destroy
|
||||||
@ip_ban = IpBan.find(params[:id])
|
@ip_ban = IpBan.find(params[:id])
|
||||||
@ip_ban.destroy
|
@ip_ban.destroy
|
||||||
redirect_to ip_bans_path
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
6
app/views/ip_bans/_secondary_links.html.erb
Normal file
6
app/views/ip_bans/_secondary_links.html.erb
Normal 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 %>
|
||||||
1
app/views/ip_bans/destroy.js.erb
Normal file
1
app/views/ip_bans/destroy.js.erb
Normal file
@@ -0,0 +1 @@
|
|||||||
|
location.reload();
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
<div id="a-index">
|
<div id="a-index">
|
||||||
<h1>IP Bans</h1>
|
<h1>IP Bans</h1>
|
||||||
|
|
||||||
<table>
|
<table class="striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>IP Address</th>
|
<th>IP Address</th>
|
||||||
@@ -22,6 +22,9 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<%= numbered_paginator(@ip_bans) %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<%= render "secondary_links" %>
|
||||||
|
|||||||
@@ -5,7 +5,9 @@
|
|||||||
<%= simple_form_for(@ip_ban) do |f| %>
|
<%= simple_form_for(@ip_ban) do |f| %>
|
||||||
<%= f.input :ip_addr %>
|
<%= f.input :ip_addr %>
|
||||||
<%= f.input :reason %>
|
<%= f.input :reason %>
|
||||||
<%= f.button :submit %>
|
<%= f.button :submit, "Submit" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<%= render "secondary_links" %>
|
||||||
|
|||||||
Reference in New Issue
Block a user