<% 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. %>

<%= 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 @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. %>

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

<%= render "comments/comment_abbreviated_list", comments: comments %> <%= will_paginate(comments, param_name: "comments_page", params: { anchor: "comments-summary" }) %>
<% end %>