Link IP addresses to IP searches.
This commit is contained in:
@@ -89,6 +89,10 @@ module ApplicationHelper
|
||||
time_tag(time.strftime("%Y-%m-%d %H:%M"), time)
|
||||
end
|
||||
|
||||
def link_to_ip(ip)
|
||||
link_to ip, moderator_ip_addrs_path(:search => {:ip_addr => ip})
|
||||
end
|
||||
|
||||
def link_to_user(user, options = {})
|
||||
user_class = user.level_class
|
||||
user_class = user_class + " user-post-approver" if user.can_approve_posts?
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</td>
|
||||
<% if CurrentUser.is_moderator? %>
|
||||
<td>
|
||||
<%= commentary_version.updater_ip_addr %>
|
||||
<%= link_to_ip commentary_version.updater_ip_addr %>
|
||||
</td>
|
||||
<% end %>
|
||||
<td><%= link_to_user commentary_version.updater %></td>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<td><%= link_to_user artist_version.updater %></td>
|
||||
<% if CurrentUser.is_moderator? %>
|
||||
<td>
|
||||
<%= artist_version.updater_ip_addr %>
|
||||
<%= link_to_ip artist_version.updater_ip_addr %>
|
||||
</td>
|
||||
<% end %>
|
||||
<td><%= artist_version.is_active? %></td>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<li><strong>Recipient</strong>: <%= link_to_user @dmail.to %></li>
|
||||
<li><strong>Date</strong>: <%= compact_time(@dmail.created_at) %></li>
|
||||
<% if CurrentUser.user.is_moderator? %>
|
||||
<li><strong>Sender IP</strong>: <%= @dmail.creator_ip_addr %></li>
|
||||
<li><strong>Sender IP</strong>: <%= link_to_ip @dmail.creator_ip_addr %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<tbody>
|
||||
<% @ip_bans.each do |ip_ban| %>
|
||||
<tr>
|
||||
<td><%= ip_ban.ip_addr %></td>
|
||||
<td><%= link_to_ip ip_ban.ip_addr %></td>
|
||||
<td><%= ip_ban.creator.name %></td>
|
||||
<td><%= ip_ban.reason %></td>
|
||||
<td><%= link_to "Unban", ip_ban_path(ip_ban), :remote => true, :method => :delete, :data => {:confirm => "Do your really want to unban #{ip_ban.ip_addr}?"} %></td>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<li><strong>Recipient</strong>: <%= link_to_user @dmail.to, :raw => true %></li>
|
||||
<li><strong>Date</strong>: <%= compact_time(@dmail.created_at) %></li>
|
||||
<% if CurrentUser.user.is_moderator? %>
|
||||
<li><strong>Sender IP</strong>: <%= @dmail.creator_ip_addr %></li>
|
||||
<li><strong>Sender IP</strong>: <%= link_to_ip @dmail.creator_ip_addr %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<tbody>
|
||||
<% @results.each do |ip_address, count| %>
|
||||
<tr>
|
||||
<td><%= link_to ip_address, moderator_ip_addrs_path(:search => {:ip_addr => ip_address}) %></td>
|
||||
<td><%= link_to_ip ip_address %></td>
|
||||
<td><%= count %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
</td>
|
||||
<% if CurrentUser.is_moderator? %>
|
||||
<td>
|
||||
<%= note_version.updater_ip_addr %>
|
||||
<%= link_to_ip note_version.updater_ip_addr %>
|
||||
</td>
|
||||
<% end %>
|
||||
<td><%= link_to_user note_version.updater %></td>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<td><%= link_to_user pool_version.updater %></td>
|
||||
<% if CurrentUser.is_moderator? %>
|
||||
<td>
|
||||
<%= pool_version.updater_ip_addr %>
|
||||
<%= link_to_ip pool_version.updater_ip_addr %>
|
||||
</td>
|
||||
<% end %>
|
||||
<td><%= compact_time pool_version.updated_at %></td>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<td><%= post_version.parent_id %></td>
|
||||
<% if CurrentUser.is_moderator? %>
|
||||
<td>
|
||||
<%= post_version.updater_ip_addr %>
|
||||
<%= link_to_ip post_version.updater_ip_addr %>
|
||||
</td>
|
||||
<% end %>
|
||||
<td><%= post_version_diff(post_version) %></td>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<td><%= link_to "wiki", wiki_page_path(wiki_page_version.wiki_page_id) %></td>
|
||||
<% if CurrentUser.is_moderator? %>
|
||||
<td>
|
||||
<%= wiki_page_version.updater_ip_addr %>
|
||||
<%= link_to_ip wiki_page_version.updater_ip_addr %>
|
||||
</td>
|
||||
<% end %>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user