From 6e5a0a54a66c8c19bc1c06b3be76bfa3881986c9 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Mon, 1 Sep 2025 20:08:36 -0700 Subject: [PATCH] Fix content#edit page layout - restore missing right sidebar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The right sidebar wasn't showing on the edit page due to Rails content_for timing issue. Fixed by moving content_for :right_sidebar block before the layout render. Additional fixes: - Pass current_page to sidebars for conditional rendering - Hide navigation buttons (Details/Gallery/References) in left sidebar on edit pages - Fix responsive classes for proper mobile/desktop display - Ensure edit tools sidebar shows on desktop, collapses on mobile 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- app/views/content/edit.html.erb | 8 +- app/views/content/edit/_edit_tools.html.erb | 2 +- .../content/shared/_page_layout.html.erb | 4 +- .../_content_context_sidenav.html.erb | 73 ++++++++----------- 4 files changed, 38 insertions(+), 49 deletions(-) diff --git a/app/views/content/edit.html.erb b/app/views/content/edit.html.erb index 46a81aa0..d8b24b55 100644 --- a/app/views/content/edit.html.erb +++ b/app/views/content/edit.html.erb @@ -1,3 +1,7 @@ +<% content_for :right_sidebar do %> + <%= render partial: 'content/edit/edit_tools', locals: { content: @serialized_content } %> +<% end %> + <%= render layout: 'content/shared/page_layout', locals: { show_edit_controls: true, current_page: :edit @@ -5,10 +9,6 @@ <%= render partial: 'content/edit/edit_main', locals: { content: @serialized_content } %> <% end %> -<% content_for :right_sidebar do %> - <%= render partial: 'content/edit/edit_tools', locals: { content: @serialized_content } %> -<% end %> -