/ accepts :info_row (captured HTML) as a .block__content inserted between header and the image list itself, :header_links as content inserted in the header (inserted in the right corner), :random_image_href as the random image destination (default value is random_images_path, which is not always accurate) ruby: page_layout :wide render_images ||= 'posts/display_posts'.freeze pagination = if posts.empty? nil elsif @pagination_params paginate(posts, **@pagination_params) else paginate(posts) end .block#imagelist_container section.block__header.flex h1.block__header__title.hide-mobile => header = pagination .flex__right = local_assigns[:header_links] a href=(local_assigns[:random_image_href] || search_path(q: '*', random_image: 'y')) title="Random Post" i.fa.fa-random span.hide-mobile.hide-limited-desktop<> Random Post - if current_user && (params[:hidden] == '1'.freeze) a href=url_for(params.permit!.merge(hidden: nil)) title='Hide Hidden Posts' i.fa.fa-eye-slash> span.hide-mobile.hide-limited-desktop Hide Hidden - elsif current_user a href=url_for(params.permit!.merge(hidden: '1'.freeze)) title='Show Hidden Posts' i.fa.fa-eye-slash> span.hide-mobile.hide-limited-desktop Show Hidden = toggle_deleted_images - if can? :batch_update, Tag a.js-batch-select href='#' title='Batch select posts on this page' i.fa.fa-object-group span.hide-mobile.hide-limited-desktop<> Batch a.js-batch-select-abort.hidden href='#' i.fa.fa-exclamation-triangle span.hide-mobile.hide-limited-desktop<> Abort a.js-batch-select-tag.hidden href='#' i.fa.fa-tags span.hide-mobile.hide-limited-desktop<> Tag - if can? :batch_delete, Post a.js-batch-select-delete.hidden href='#' i.fa.fa-trash span.hide-mobile.hide-limited-desktop<> Delete - if local_assigns[:dumpable] && can?(:manage, Post) a href=search_dump_path(params.permit(:q, :del)) title='Dump these results as JSON' i.fa.fa-file-export span.hide-mobile.hide-limited-desktop<> Dump - if local_assigns[:info_row] a href="#" data-click-toggle=".js-imagelist-info" title="More Info" i.fa.fa-info-circle span.hide-mobile.hide-limited-desktop<> More Info - if local_assigns[:info_row] = info_row .block__content.post-grid[class=(dense_thumbnails? ? 'post-grid--dense'.freeze : 'post-grid--whatever'.freeze)] = render partial: render_images, locals: { posts: posts } .block__header.block__header--light.flex = pagination span.block__header__title = pagination_info(posts) .flex__right a href='/settings/edit' title='Display Settings' i.fa.fa-cog span.hide-mobile.hide-limited-desktop<> Display Settings | =<> toggle_deleted_images