From b034da9fbabb882fbe9f5f3f355442dfa20e5ecf Mon Sep 17 00:00:00 2001 From: erdgeist Date: Wed, 8 Jul 2026 11:56:11 +0200 Subject: Tuck away metadata section in nodes#edit behind a summary/detail cascade --- app/views/nodes/edit.html.erb | 105 ++++++++++++++++++++++-------------------- 1 file changed, 54 insertions(+), 51 deletions(-) (limited to 'app') diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb index 4cdb3ae..4693569 100644 --- a/app/views/nodes/edit.html.erb +++ b/app/views/nodes/edit.html.erb @@ -1,9 +1,7 @@ <% content_for :subnavigation do %> - <%= link_to 'metadata', '#', :id => 'button', :class => "unselected" %> <%= link_to 'Show', @node %> <%= link_to 'Preview', preview_page_path(@draft) %> <%= button_to 'Publish', publish_node_path(@node), method: :put, form: { data: { confirm: "Publish this draft?" }, class: 'button_to state_changing' } %> - <%= link_to 'Revisions', node_revisions_path(@node) %> <% end %>
@@ -13,67 +11,72 @@
<% end %> - -
-
Slug
-
- <%= f.text_field( - :staged_slug, :value => @node.staged_slug || @node.slug - ) - %> -
-
parent
-
- <%= text_field_tag :move_to_search_term, @node.parent.title rescue "" %> -
+

<%= title_for_node(@node) %>

-
- <%= f.hidden_field( - :staged_parent_id, - :value => @node.staged_parent_id || @node.parent_id +
+ Metadata (slug, parent, tags, template, author, images) +
+
Slug
+
+ <%= f.text_field( + :staged_slug, :value => @node.staged_slug || @node.slug ) - %> -
- - <%= fields_for @draft do |d| %> -
Tags - comma seperated
-
<%= text_field_tag :tag_list, @draft.tag_list.join(', ') %>
+ %> +
-
Publish at
-
<%= d.datetime_select :published_at, :value => @draft.published_at %>
+
parent
+
+ <%= text_field_tag :move_to_search_term, @node.parent.title rescue "" %> +
-
Template
-
- <%= d.select :template_name, custom_page_templates, {:prompt => 'Select Template'} %> - Set automatically based on how this node was created - change it if needed. -
+
+ <%= f.hidden_field( + :staged_parent_id, + :value => @node.staged_parent_id || @node.parent_id + ) + %> +
-
Author
-
<%= d.select :user_id, user_list %>
+ <%= fields_for @draft do |d| %> +
Tags - comma seperated
+
<%= text_field_tag :tag_list, @draft.tag_list.join(', ') %>
-
Images
-
-
    - <% @draft.assets.images.each do |image| %> -
  • - <%= image_tag(image.upload.url(:thumb)) %> -
  • - <% end %> -
-
- image browser +
Publish at
+
<%= d.datetime_select :published_at, :value => @draft.published_at %>
+ +
Template
+
+ <%= d.select :template_name, custom_page_templates, {:prompt => 'Select Template'} %> + Set automatically based on how this node was created - change it if needed.
-
-
    - <% Asset.images.each do |image| %> -
  • <%= image_tag(image.upload.url(:thumb)) %>
  • + +
    Author
    +
    <%= d.select :user_id, user_list %>
    + +
    Images
    +
    +
      + <% @draft.assets.images.each do |image| %> +
    • + <%= image_tag(image.upload.url(:thumb)) %> +
    • <% end %>
    + +
    +
      + <% Asset.images.each do |image| %> +
    • <%= image_tag(image.upload.url(:thumb)) %>
    • + <% end %> +
    +
-
- +
+
Title
<%= d.text_field :title %>
-- cgit v1.3