Split the wiki page versions template into two partials, _global_listing.html.erb and _page_listing.html.erb, to avoid the nested conditionals that arise from combining these two pages into one template. Add html IDs to distinguish between these two partials.