summaryrefslogtreecommitdiff
path: root/app/views/nodes/new.html.erb
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-25 02:23:13 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-25 02:23:13 +0200
commit0a5d7806700bb3154529b99abc75d37ccc46faff (patch)
tree16c4b705d824c83c5887ae7661928c0c4f93c2c3 /app/views/nodes/new.html.erb
parent90207029de7474082310d0725801d60f7145fa98 (diff)
Extract admin strings to i18n: the nodes cluster
Diffstat (limited to 'app/views/nodes/new.html.erb')
-rw-r--r--app/views/nodes/new.html.erb24
1 files changed, 12 insertions, 12 deletions
diff --git a/app/views/nodes/new.html.erb b/app/views/nodes/new.html.erb
index f9efbf50..b56bbeed 100644
--- a/app/views/nodes/new.html.erb
+++ b/app/views/nodes/new.html.erb
@@ -1,4 +1,4 @@
1<h1>Create new node</h1> 1<h1><%= t(".title") %></h1>
2 2
3<% if @node.errors.any? %> 3<% if @node.errors.any? %>
4 <div class="error_messages"> 4 <div class="error_messages">
@@ -9,7 +9,7 @@
9<%= form_tag nodes_path do %> 9<%= form_tag nodes_path do %>
10<div id="new_node"> 10<div id="new_node">
11 11
12 <div class="layout_row_label">Type</div> 12 <div class="layout_row_label"><%= t(".type") %></div>
13 <div class="layout_row_content"> 13 <div class="layout_row_content">
14 <% CccConventions::NODE_KINDS.each do |kind, config| %> 14 <% CccConventions::NODE_KINDS.each do |kind, config| %>
15 <p> 15 <p>
@@ -23,14 +23,14 @@
23 <% end %> 23 <% end %>
24 </div> 24 </div>
25 25
26 <div class="layout_row_label">Title</div> 26 <div class="layout_row_label"><%= t("admin.columns.title") %></div>
27 <div class="layout_row_content"> 27 <div class="layout_row_content">
28 <%= text_field_tag :title, nil, required: true %> 28 <%= text_field_tag :title, nil, required: true %>
29 <span class="field_hint">A URL slug will be generated from this automatically. You can review or adjust it afterward under the "metadata" section's Slug field.</span> 29 <span class="field_hint"><%= t(".slug_hint") %></span>
30 </div> 30 </div>
31 31
32 <div id="parent_search_field" style="<%= @selected_kind == "generic" ? "" : "display: none;" %>"> 32 <div id="parent_search_field" style="<%= @selected_kind == "generic" ? "" : "display: none;" %>">
33 <div class="layout_row_label">Parent</div> 33 <div class="layout_row_label"><%= t(".parent") %></div>
34 <div class="layout_row_content"> 34 <div class="layout_row_content">
35 <%= text_field_tag :parent_search_term, @parent&.title %> 35 <%= text_field_tag :parent_search_term, @parent&.title %>
36 <%= hidden_field_tag :parent_id, @parent&.id, data: { unique_name: @parent&.computed_unique_name } %> 36 <%= hidden_field_tag :parent_id, @parent&.id, data: { unique_name: @parent&.computed_unique_name } %>
@@ -38,18 +38,18 @@
38 </div> 38 </div>
39 </div> 39 </div>
40 40
41 <div class="layout_row_label">Resulting path</div> 41 <div class="layout_row_label"><%= t(".resulting_path") %></div>
42 <div class="layout_row_content"> 42 <div class="layout_row_content">
43 <span id="resulting_path">—</span> 43 <span id="resulting_path">—</span>
44 <button type="button" id="copy_resulting_path" class="unselected copy_button" data-copy-target="#resulting_path"> 44 <button type="button" id="copy_resulting_path" class="unselected copy_button" data-copy-target="#resulting_path">
45 <span class="copy_button_label">copy</span> 45 <span class="copy_button_label"><%= t(".copy") %></span>
46 </button> 46 </button>
47 47
48 <span class="field_hint">This preview updates as you type. The final path can still be changed afterward by editing the title (for the last segment) or moving the node to a different parent (for everything before it).</span> 48 <span class="field_hint"><%= t(".path_hint") %></span>
49 </div> 49 </div>
50 50
51 <% if @attach_asset %> 51 <% if @attach_asset %>
52 <div class="layout_row_label">attachment</div> 52 <div class="layout_row_label"><%= t(".attachment") %></div>
53 <div class="layout_row_content"> 53 <div class="layout_row_content">
54 <ul class="thumbnail_list"> 54 <ul class="thumbnail_list">
55 <li> 55 <li>
@@ -60,14 +60,14 @@
60 :target => "_blank", :rel => "noopener" %> 60 :target => "_blank", :rel => "noopener" %>
61 </li> 61 </li>
62 </ul> 62 </ul>
63 <span class="field_hint">This asset will automatically be attached to the new page.</span> 63 <span class="field_hint"><%= t(".attach_hint") %></span>
64 <label><%= check_box_tag :asset_headline, "1" %> as the page's headline</label> 64 <label><%= check_box_tag :asset_headline, "1" %> <%= t(".as_headline") %></label>
65 <%= hidden_field_tag :asset_id, @attach_asset.id %> 65 <%= hidden_field_tag :asset_id, @attach_asset.id %>
66 </div> 66 </div>
67 <% end %> 67 <% end %>
68 68
69 <div class="layout_row_label"></div> 69 <div class="layout_row_label"></div>
70 <div class="layout_row_content"><%= submit_tag "Create" %></div> 70 <div class="layout_row_content"><%= submit_tag t("admin.common.create") %></div>
71 71
72</div> 72</div>
73<% end %> 73<% end %>