-
- Staff Notes (<%= user.staff_notes.count %>)
-
-
<%= link_to "Staff Notes", staff_notes_path(search: { user_id: user.id }) %>
- <%= render "staff_notes/partials/list_of_notes", staff_notes: user.staff_notes.limit(15), show_receiver_name: false %>
-
-
<%= link_to "Create »", new_staff_note_path(search: { user_id: user.id }), class: "expand-new-staff-note" %>
- <%= render "staff_notes/partials/new", user: user, staff_note: StaffNote.new(user_id: user.id), hidden: true %>
-
-
-
+
+
+
+ <%= render "staff_notes/partials/list_of_notes", staff_notes: user.staff_notes.limit(15), show_receiver_name: false %>
+
+
<%= link_to "Create »", new_staff_note_path(search: { user_id: user.id }), class: "expand-new-staff-note" %>
+ <%= render "staff_notes/partials/new", user: user, staff_note: StaffNote.new(user_id: user.id), hidden: true %>
+
+
<% end %>
diff --git a/app/views/users/_about.html.erb b/app/views/users/_about.html.erb
deleted file mode 100644
index faa72ecad..000000000
--- a/app/views/users/_about.html.erb
+++ /dev/null
@@ -1,14 +0,0 @@
-
- <% if user.profile_about.present? %>
-
-
About
-
<%= format_text(user.profile_about, allow_color: true) %>
-
- <% end %>
- <% if user.profile_artinfo.present? %>
-
-
Artist Information
-
<%= format_text(user.profile_artinfo, allow_color: true) %>
-
- <% end %>
-
diff --git a/app/views/users/_statistics.html.erb b/app/views/users/_statistics.html.erb
deleted file mode 100644
index 5c230162c..000000000
--- a/app/views/users/_statistics.html.erb
+++ /dev/null
@@ -1,156 +0,0 @@
-
-
- <%= user_avatar @user %>
-
-
-
<%= link_to_user @user %>
-
-
- Join Date
- <%= compact_time @user.created_at %>
-
- Level
- <%= "(Unactivated)" unless user.is_verified? %> <%= presenter.level %>
-
- <% if user.is_banned? && user.recent_ban %>
- Ban reason
- <%= format_text presenter.ban_reason %>
- <% end %>
-
- Posts
-
- <%= presenter.active_upload_count(self) %>
- [<%= link_to "pending", posts_path(tags: "user:#{user.name} status:pending") %>]
- (<%= link_to "comments on", comments_path(group_by: :comment, search: {poster_id: user.id}) %>)
- <% if CurrentUser.is_moderator? %>
- (<%= link_to "votes", action: "index", controller: "post_votes", search: { user_name: user.name } %>)
- <% end %>
-
-
- Deleted
-
- <%= presenter.deleted_upload_count(self) %>
-
-
- Replaced
-
- <%= presenter.replaced_upload_count(self) %>
- [<%= link_to "pending", post_replacements_path(search: { creator_name: user.name }) %>]
-
-
- Rejected
- <%= presenter.rejected_replacements_count(self) %>
-
- Favorites
-
- <%= presenter.favorite_count(self) %>
-
-
- Forum Posts
-
- <%= presenter.forum_post_count(self) %>
- (<%= link_to "mentions", forum_posts_path(search: { body_matches: user.name }) %>)
-
-
- Comments
-
- <%= presenter.comment_count(self) %> on <%= presenter.commented_posts_count(self) %> posts
- (<%= link_to "mentions", comments_path(group_by: :comment, search:{ body_matches: user.name }) %>)
- <% if CurrentUser.is_moderator? %>
- (<%= link_to "votes", action: "index", controller: "comment_votes", search: { user_name: user.name } %>)
- <% end %>
-
-
- <% if user.can_approve_posts? || Post.where(approver: user).exists? %>
- Approvals
- <%= presenter.approval_count(self) %>
- <% end %>
-
- <% if CurrentUser.user.id == user.id || CurrentUser.is_janitor? %>
- <% if presenter.previous_names(self).present? %>
- Previous Names
- <%= presenter.previous_names(self) %> -> <%= user.name %>
- <% end %>
- <% end %>
-
- <% if CurrentUser.is_admin? %>
- Email
-
- <%= user.email %>
- <%= email_domain_search(user.email) %>
-
- Last IP
- <%= link_to_ip(user.last_ip_addr) %>
- <% end %>
-
-
-
- Feedback
-
- <%= presenter.feedbacks %>
- <%= link_to("List", user_feedbacks_path(search: { user_id: @user.id })) %>
- <% if CurrentUser.is_moderator? && @user.feedback.active.count == 0 %>
- | <%= link_to("Create", new_user_feedback_path(user_feedback: { user_id: @user.id, category: "neutral" })) %>
- <% end %>
-
-
- Permissions
- <%= presenter.permissions %>
-
- Upload Limit
-
- <%= presenter.upload_limit(self) %>
- <% if CurrentUser.user.id == user.id %>
- (<%= link_to "help", upload_limit_users_path %>)
- <% else %>
- (<%= link_to "help", wiki_page_path(id: "upload_limit") %>)
- <% end %>
-
-
- Post Changes
-
- <%= presenter.post_version_count(self) %>
- <% if CurrentUser.is_moderator? && UserRevert.can_revert?(user) %>
- [<%= link_to "revert all", new_user_revert_path(user_id: user.id) %>]
- <% end %>
-
-
- Wiki Changes
- <%= presenter.wiki_page_version_count(self) %>
-
- Note Changes
- <%= presenter.note_version_count(self) %> on <%= presenter.noted_posts_count(self) %> posts
-
- Artist Changes
- <%= presenter.artist_version_count(self) %>
-
- Pool Changes
- <%= presenter.pool_version_count(self) %>
-
- <% if CurrentUser.user.id == user.id || CurrentUser.is_janitor? %>
- Flags
- <%= presenter.flag_count(self) %>
- <% end %>
-
- <% if CurrentUser.user.id == user.id || CurrentUser.is_moderator? %>
- Tickets
-
- <%= presenter.ticket_count(self) %>
- <% if CurrentUser.is_moderator? %>
- [<%= link_to "pending", tickets_path(search: { creator_id: user.id, status: "pending" }) %>]
- [<%= link_to "accused", tickets_path(search: { accused_id: user.id }) %>]
- <% end %>
-
- <% end %>
-
- <% if CurrentUser.id == user.id %>
- API Key
-
- <%= link_to (CurrentUser.api_key ? "View" : "Generate"), user_api_key_path(CurrentUser.user) %>
- (<%= link_to "help", help_page_path(id: "api") %>)
-
- <% end %>
-
-
-
-
diff --git a/app/views/users/partials/show/_about.html.erb b/app/views/users/partials/show/_about.html.erb
new file mode 100644
index 000000000..636f651dd
--- /dev/null
+++ b/app/views/users/partials/show/_about.html.erb
@@ -0,0 +1,17 @@
+<% if has_about %>
+
+ About
+
+ <%= format_text(user.profile_about, allow_color: true) %>
+
+
+<% end %>
+
+<% if has_artinfo %>
+
+ Artist Information
+
+ <%= format_text(user.profile_artinfo, allow_color: true) %>
+
+
+<% end %>
diff --git a/app/views/users/partials/show/_ban_banner.html.erb b/app/views/users/partials/show/_ban_banner.html.erb
new file mode 100644
index 000000000..a6ffe4218
--- /dev/null
+++ b/app/views/users/partials/show/_ban_banner.html.erb
@@ -0,0 +1,5 @@
+<% if user.is_banned? && user.recent_ban %>
+
+ <%= format_text presenter.ban_reason %>
+
+<% end %>
diff --git a/app/views/users/partials/show/_card.html.erb b/app/views/users/partials/show/_card.html.erb
new file mode 100644
index 000000000..e635ce1f0
--- /dev/null
+++ b/app/views/users/partials/show/_card.html.erb
@@ -0,0 +1,20 @@
+
+
+ <%= profile_avatar(@user) %>
+
+
+
+ <%= link_to_user(@user) %>
+ <%= user_feedback_badge(@user) %>
+
+
+ Joined <%= compact_date @user.created_at %>
+
+
+ <%= user_level_badge(@user) %>
+ <% unless @user.is_verified? %>
+ UNACTIVATED
+ <% end %>
+
+
+
diff --git a/app/views/users/partials/show/_mentions.html.erb b/app/views/users/partials/show/_mentions.html.erb
new file mode 100644
index 000000000..e69de29bb
diff --git a/app/views/users/_post_summary.html.erb b/app/views/users/partials/show/_post_summary.html.erb
similarity index 89%
rename from app/views/users/_post_summary.html.erb
rename to app/views/users/partials/show/_post_summary.html.erb
index 2c4873a71..886cf76f5 100644
--- a/app/views/users/_post_summary.html.erb
+++ b/app/views/users/partials/show/_post_summary.html.erb
@@ -4,7 +4,7 @@
@@ -29,11 +29,11 @@
- <%= link_to(sanitize("
#{user.favorite_count} total"), favorites_path(:user_id => user.id)) %>
+ <%= link_to(sanitize("
#{user.favorite_count} total"), favorites_path(user_id: user.id)) %>
<% if user.enable_privacy_mode? || user.is_blocked? %>
[hidden]
<% end %>
diff --git a/app/views/users/partials/show/_staff_info.html.erb b/app/views/users/partials/show/_staff_info.html.erb
new file mode 100644
index 000000000..31327f7c5
--- /dev/null
+++ b/app/views/users/partials/show/_staff_info.html.erb
@@ -0,0 +1,34 @@
+
+
+
+ <% if presenter.previous_names(self).present? %>
+
Previous Names
+ <%= presenter.previous_names(self) %> -> <%= user.name %>
+ <% end %>
+
+ <% if CurrentUser.is_admin? %>
+ Email
+
+ <%= user.email %>
+ <%= email_domain_search(user.email) %>
+
+
+ Last IP
+ <%= link_to_ip(user.last_ip_addr) %>
+ <% end %>
+
+ <% if CurrentUser.is_moderator? %>
+ Votes
+
+ <%= link_to "Posts", action: "index", controller: "post_votes", search: { user_name: user.name } %>
+ | <%= link_to "Comments", action: "index", controller: "comment_votes", search: { user_name: user.name } %>
+
+ <% end %>
+
+ Pending
+
+ <%= link_to "Posts", posts_path(tags: "user:#{user.name} status:pending") %>
+ | <%= link_to "Replacements", post_replacements_path(search: { creator_name: user.name }) %>
+
+
+
diff --git a/app/views/users/partials/show/_user_info.html.erb b/app/views/users/partials/show/_user_info.html.erb
new file mode 100644
index 000000000..c29850642
--- /dev/null
+++ b/app/views/users/partials/show/_user_info.html.erb
@@ -0,0 +1,129 @@
+
+
+
+
<%= svg_icon(:message_square) %> Comments
+
+ <%= presenter.comment_count(self) %>
+
+
+
+
+
+
<%= svg_icon(:lectern) %> Forum posts
+
+ <%= presenter.forum_post_count(self) %>
+
+
+
+
+ <% if user.can_approve_posts? || Post.where(approver: user).exists? %>
+
+
<%= svg_icon(:stamp) %> Approvals
+
+ <%= presenter.approval_count(self) %>
+
+
+ <% end %>
+
+
+
<%= svg_icon(:upload) %> Upload Limit
+
+ <% if CurrentUser.user.id == user.id %>
+ <%= link_to presenter.upload_limit_short, upload_limit_users_path %>
+ <% else %>
+ <%= link_to presenter.upload_limit_short, wiki_page_path(id: "upload_limit") %>
+ <% end %>
+
+
+
+
+
+
<%= svg_icon(:replace) %> Changes
+
+
+
+ <% if CurrentUser.user.id == user.id || CurrentUser.is_approver? %>
+
+
<%= svg_icon(:flag_left) %> Flags
+ <%= presenter.flag_count(self) %>
+
+ <% end %>
+
+ <% if CurrentUser.user.id == user.id || CurrentUser.is_moderator? %>
+
+
<%= svg_icon(:ticket) %> Tickets
+ <%= presenter.ticket_count(self) %>
+ <% if CurrentUser.is_moderator? %>
+
+ <% end %>
+
+ <% end %>
+
+ <% if CurrentUser.user.id == user.id %>
+
+
<%= svg_icon(:key_square) %> API Key
+
+ <%= link_to (CurrentUser.api_key ? "View" : "Generate"), user_api_key_path(CurrentUser.user) %>
+
+
+
+ <% end %>
+
+ <% permissions = presenter.permissions %>
+ <% unless permissions.empty? %>
+
+
<%= svg_icon(:power) %> Permissions
+
+
+ <% end %>
+
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 4a4dec43d..b5ff80535 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -1,10 +1,41 @@
- <%= render "statistics", :presenter => @presenter, :user => @user %>
- <%= render "staff_notes/partials/for_user", user: @user %>
+
+
+ <%= render "/users/partials/show/card", :presenter => @presenter, :user => @user %>
+ <%= render "/users/partials/show/ban_banner", :presenter => @presenter, :user => @user %>
+
+ <% if CurrentUser.is_staff? %>
+
+ <%= render "/users/partials/show/staff_info", :presenter => @presenter, :user => @user %>
+ <%= render "staff_notes/partials/for_user", user: @user %>
+ <% end %>
+
+
<%= render "posts/partials/common/inline_blacklist" %>
- <%= render "post_summary", presenter: @presenter, user: @user %>
- <%= render "about", presenter: @presenter, user: @user %>
+
+
+ <% has_about = @user.profile_about.present? %>
+ <% has_artinfo = @user.profile_artinfo.present? %>
+
+ <% if has_about %>
+
+ <% end %>
+ <% if has_artinfo %>
+
+ <% end %>
+
+
+
+
+ <%= render "/users/partials/show/user_info", :presenter => @presenter, :user => @user %>
+ <%= render "/users/partials/show/about", presenter: @presenter, user: @user, has_about: has_about, has_artinfo: has_artinfo %>
+ <%= render "/users/partials/show/post_summary", presenter: @presenter, user: @user %>
+