diff --git a/app/views/admin/admin_users/_user_creations_summary.html.erb b/app/views/admin/admin_users/_user_creations_summary.html.erb index a96a6ad4d64..a69164a098e 100644 --- a/app/views/admin/admin_users/_user_creations_summary.html.erb +++ b/app/views/admin/admin_users/_user_creations_summary.html.erb @@ -1,17 +1,20 @@ -<% unless @works.empty? %> +<% unless @user.works.empty? %> + <%# Checking @user.items.empty? rather than @items.empty? allows us to display +# an empty listbox with pagination if the admin manually enters the wrong URL. +# This is consistent with pagination on other site pages. %>
-

<%= t(".works", count: works.size) %>

+

<%= search_header(@works, nil, "Work") %>

<%= render "works/work_abbreviated_list", works: works %> <%= will_paginate(works, param_name: "works_page", params: { anchor: "works-summary" }) %>
<% end %> -<% unless @comments.empty? %> +<% unless @user.comments.empty? %> <%# We use comments rather than comment as the class because .comment:after # create a clear that causes wonky styling when there are only a few # comments. %>
-

<%= t(".comments", count: comments.size) %>

+

<%= search_header(@comments, nil, "Comment") %>

<%= render "comments/comment_abbreviated_list", comments: comments %> <%= will_paginate(comments, param_name: "comments_page", params: { anchor: "comments-summary" }) %>
diff --git a/app/views/admin/admin_users/creations.html.erb b/app/views/admin/admin_users/creations.html.erb index 79c3b08777c..9ac8030f7ae 100644 --- a/app/views/admin/admin_users/creations.html.erb +++ b/app/views/admin/admin_users/creations.html.erb @@ -4,15 +4,18 @@ -