diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 24a18d11d..0e2c05446 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -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?
diff --git a/app/views/artist_commentary_versions/index.html.erb b/app/views/artist_commentary_versions/index.html.erb
index 91e2c5124..cf6be852e 100644
--- a/app/views/artist_commentary_versions/index.html.erb
+++ b/app/views/artist_commentary_versions/index.html.erb
@@ -32,7 +32,7 @@
<% if CurrentUser.is_moderator? %>
- <%= commentary_version.updater_ip_addr %>
+ <%= link_to_ip commentary_version.updater_ip_addr %>
|
<% end %>
<%= link_to_user commentary_version.updater %> |
diff --git a/app/views/artist_versions/index.html.erb b/app/views/artist_versions/index.html.erb
index 9420d127b..c49e8559e 100644
--- a/app/views/artist_versions/index.html.erb
+++ b/app/views/artist_versions/index.html.erb
@@ -37,7 +37,7 @@
<%= link_to_user artist_version.updater %> |
<% if CurrentUser.is_moderator? %>
- <%= artist_version.updater_ip_addr %>
+ <%= link_to_ip artist_version.updater_ip_addr %>
|
<% end %>
<%= artist_version.is_active? %> |
diff --git a/app/views/dmails/show.html.erb b/app/views/dmails/show.html.erb
index 98e32d5ed..6260dc070 100644
--- a/app/views/dmails/show.html.erb
+++ b/app/views/dmails/show.html.erb
@@ -9,7 +9,7 @@
Recipient: <%= link_to_user @dmail.to %>
Date: <%= compact_time(@dmail.created_at) %>
<% if CurrentUser.user.is_moderator? %>
- Sender IP: <%= @dmail.creator_ip_addr %>
+ Sender IP: <%= link_to_ip @dmail.creator_ip_addr %>
<% end %>
diff --git a/app/views/ip_bans/index.html.erb b/app/views/ip_bans/index.html.erb
index 9646a1145..4af2846bc 100644
--- a/app/views/ip_bans/index.html.erb
+++ b/app/views/ip_bans/index.html.erb
@@ -14,7 +14,7 @@
<% @ip_bans.each do |ip_ban| %>
- | <%= ip_ban.ip_addr %> |
+ <%= link_to_ip ip_ban.ip_addr %> |
<%= ip_ban.creator.name %> |
<%= ip_ban.reason %> |
<%= link_to "Unban", ip_ban_path(ip_ban), :remote => true, :method => :delete, :data => {:confirm => "Do your really want to unban #{ip_ban.ip_addr}?"} %> |
diff --git a/app/views/maintenance/user/dmail_filters/edit.html.erb b/app/views/maintenance/user/dmail_filters/edit.html.erb
index 931c3a806..2c9eb4c87 100644
--- a/app/views/maintenance/user/dmail_filters/edit.html.erb
+++ b/app/views/maintenance/user/dmail_filters/edit.html.erb
@@ -10,7 +10,7 @@
Recipient: <%= link_to_user @dmail.to, :raw => true %>
Date: <%= compact_time(@dmail.created_at) %>
<% if CurrentUser.user.is_moderator? %>
- Sender IP: <%= @dmail.creator_ip_addr %>
+ Sender IP: <%= link_to_ip @dmail.creator_ip_addr %>
<% end %>
diff --git a/app/views/moderator/ip_addrs/_ip_listing.erb b/app/views/moderator/ip_addrs/_ip_listing.erb
index 217c3874f..2dca3e295 100644
--- a/app/views/moderator/ip_addrs/_ip_listing.erb
+++ b/app/views/moderator/ip_addrs/_ip_listing.erb
@@ -10,7 +10,7 @@
<% @results.each do |ip_address, count| %>
- | <%= link_to ip_address, moderator_ip_addrs_path(:search => {:ip_addr => ip_address}) %> |
+ <%= link_to_ip ip_address %> |
<%= count %> |
<% end %>
diff --git a/app/views/note_versions/index.html.erb b/app/views/note_versions/index.html.erb
index bbc3b2b59..89814a828 100644
--- a/app/views/note_versions/index.html.erb
+++ b/app/views/note_versions/index.html.erb
@@ -38,7 +38,7 @@
<% if CurrentUser.is_moderator? %>
- <%= note_version.updater_ip_addr %>
+ <%= link_to_ip note_version.updater_ip_addr %>
|
<% end %>
<%= link_to_user note_version.updater %> |
diff --git a/app/views/pool_versions/index.html.erb b/app/views/pool_versions/index.html.erb
index bae6fa1dd..f7c0ecc37 100644
--- a/app/views/pool_versions/index.html.erb
+++ b/app/views/pool_versions/index.html.erb
@@ -27,7 +27,7 @@
<%= link_to_user pool_version.updater %> |
<% if CurrentUser.is_moderator? %>
- <%= pool_version.updater_ip_addr %>
+ <%= link_to_ip pool_version.updater_ip_addr %>
|
<% end %>
<%= compact_time pool_version.updated_at %> |
diff --git a/app/views/post_versions/_listing.html.erb b/app/views/post_versions/_listing.html.erb
index fcd221f68..ed5ff4178 100644
--- a/app/views/post_versions/_listing.html.erb
+++ b/app/views/post_versions/_listing.html.erb
@@ -30,7 +30,7 @@
<%= post_version.parent_id %> |
<% if CurrentUser.is_moderator? %>
- <%= post_version.updater_ip_addr %>
+ <%= link_to_ip post_version.updater_ip_addr %>
|
<% end %>
<%= post_version_diff(post_version) %> |
diff --git a/app/views/wiki_page_versions/index.html.erb b/app/views/wiki_page_versions/index.html.erb
index 21e352480..18f87bbd5 100644
--- a/app/views/wiki_page_versions/index.html.erb
+++ b/app/views/wiki_page_versions/index.html.erb
@@ -54,7 +54,7 @@
<%= link_to "wiki", wiki_page_path(wiki_page_version.wiki_page_id) %> |
<% if CurrentUser.is_moderator? %>
- <%= wiki_page_version.updater_ip_addr %>
+ <%= link_to_ip wiki_page_version.updater_ip_addr %>
|
<% end %>
|