summaryrefslogtreecommitdiff
path: root/app/views/nodes
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-06-27 22:52:50 +0200
committererdgeist <erdgeist@erdgeist.org>2026-06-27 22:52:50 +0200
commit9a19a0494ef51cdac9a78e24d517ca48ba44c453 (patch)
tree8eaae12d8047a40e29d3ea7ff3116b5c869e04bd /app/views/nodes
parent85a01e35274b8d4d4165a7b26bd7986e211246bb (diff)
parent1853082fcd8c067390c246f9daa01a9b47387497 (diff)
Migration from Rails 2.3.5 to Rails 8.1 successful.
Merging dev branch.
Diffstat (limited to 'app/views/nodes')
-rw-r--r--app/views/nodes/edit.html.erb168
-rw-r--r--app/views/nodes/index.html.erb2
-rw-r--r--app/views/nodes/new.html.erb21
-rw-r--r--app/views/nodes/update.js.erb8
4 files changed, 94 insertions, 105 deletions
diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb
index 8e27d0f..b45c700 100644
--- a/app/views/nodes/edit.html.erb
+++ b/app/views/nodes/edit.html.erb
@@ -2,109 +2,89 @@
2 <%= link_to 'metadata', '#', :id => 'button', :class => "unselected" %> 2 <%= link_to 'metadata', '#', :id => 'button', :class => "unselected" %>
3 <%= link_to 'Show', @node %> 3 <%= link_to 'Show', @node %>
4 <%= link_to 'Preview', preview_page_path(@draft) %> 4 <%= link_to 'Preview', preview_page_path(@draft) %>
5 <%= link_to 'Publish', publish_node_path, :method => :put, :confirm => "Publish this draft?" %> 5 <%= button_to 'Publish', publish_node_path(@node), method: :put, form: { data: { confirm: "Publish this draft?" } } %>
6 <%= link_to 'Revisions', node_revisions_path(@node) %> 6 <%= link_to 'Revisions', node_revisions_path(@node) %>
7<% end %> 7<% end %>
8 8
9<div id="page_editor"> 9<div id="page_editor">
10<% form_for(@node) do |f| %> 10<%= form_for(@node) do |f| %>
11 <%= f.error_messages %> 11 <% if @node.errors.any? %>
12 <div class="error_messages">
13 <ul><% @node.errors.full_messages.each do |msg| %><li><%= msg %></li><% end %></ul>
14 </div>
15 <% end %>
12 16
13 <div id="metadata"> 17 <div id="metadata">
14 <table> 18 <div class="node_description">Event</div>
15 <tr> 19 <div class="node_content"><%= event_information %></div>
16 <td class="description">Event</td> 20
17 <td><%= event_information %></td> 21 <div class="node_description">Slug</div>
18 </tr> 22 <div class="node_content">
19 <tr> 23 <%= f.text_field(
20 <td class="description">Slug</td> 24 :staged_slug, :value => @node.staged_slug || @node.slug
21 <td> 25 )
22 <%= 26 %>
23 f.text_field( 27 </div>
24 :staged_slug, :value => @node.staged_slug || @node.slug 28
25 ) 29 <div class="node_description">parent</div>
26 %> 30 <div class="node_content">
27 </td> 31 <%= text_field_tag :move_to_search_term, @node.parent.title rescue "" %>
28 </tr> 32 <div id="search_results">
29 <tr>
30 <td class="description">parent</td>
31 <td>
32 <%= text_field_tag :move_to_search_term, @node.parent.title rescue "" %>
33 <div id="search_results">
34 33
35 </div> 34 </div>
36 <%= f.hidden_field( 35 <%= f.hidden_field(
37 :staged_parent_id, 36 :staged_parent_id,
38 :value => @node.staged_parent_id || @node.parent_id 37 :value => @node.staged_parent_id || @node.parent_id
39 ) 38 )
40 %> 39 %>
41 </td> 40 </div>
42 </tr>
43 41
44 <% fields_for @draft do |d| %> 42 <%= fields_for @draft do |d| %>
45 <tr> 43 <div class="node_description">Tags - comma seperated</div>
46 <td class="description">Tags - comma seperated</td> 44 <div class="node_content"><%= text_field_tag :tag_list, @draft.tag_list %></div>
47 <td><%= text_field_tag :tag_list, @draft.tag_list %></td> 45
48 </tr> 46 <div class="node_description">Publish at</div>
49 <tr> 47 <div class="node_content"><%= d.datetime_select :published_at, :value => @draft.published_at %></div>
50 <td class="description">Publish at</td> 48
51 <td><%= d.datetime_select :published_at, :value => @draft.published_at %></td> 49 <div class="node_description">Template</div>
52 </tr> 50 <div class="node_content"><%= d.select :template_name, custom_page_templates, {:prompt => 'Select Template'} %></div>
53 <tr> 51
54 <td class="description">Template</td> 52 <div class="node_description">Author</div>
55 <td><%= d.select :template_name, custom_page_templates, {:prompt => 'Select Template'} %></td> 53 <div class="node_content"><%= d.select :user_id, user_list %></div>
56 </tr> 54
57 <tr> 55 <div class="node_description">Images</div>
58 <td class="description">Author</td> 56 <div class="node_content">
59 <td><%= d.select :user_id, user_list %></td> 57 <ul id="image_box" rel="<%= @draft.id %>">
60 </tr> 58 <% @draft.assets.images.each do |image| %>
61 <tr> 59 <li rel="images_<%= image.id %>">
62 <td class="description">Images</td> 60 <%= image_tag(image.upload.url(:thumb)) %>
63 <td> 61 </li>
64 <ul id="image_box" rel="<%= @draft.id %>"> 62 <% end %>
65 <% @draft.assets.images.each do |image| %> 63 </ul>
66 <li rel="images_<%= image.id %>"> 64 <div class="clear_left right">
67 <%= image_tag(image.upload.url(:thumb)) %> 65 <a id="image_browser_toggle" class="unselected" href="#">image browser</a>
68 </li> 66 </div>
69 <% end %> 67 <div id="image_browser">
70 </ul> 68 <ul>
71 <div class="clear_left right"> 69 <% Asset.images.each do |image| %>
72 <a id="image_browser_toggle" class="unselected" href="#">image browser</a> 70 <li rel="images_<%= image.id %>"><%= image_tag(image.upload.url(:thumb)) %></li>
73 </div> 71 <% end %>
74 <div id="image_browser"> 72 </ul>
75 <ul> 73 </div>
76 <% Asset.images.each do |image| %> 74 </div>
77 <li rel="images_<%= image.id %>"><%= image_tag(image.upload.url(:thumb)) %></li>
78 <% end %>
79 </ul>
80 </div>
81 </td>
82 </tr>
83 </table>
84 </div> 75 </div>
85 76
86 <table id="content"> 77 <div id="content">
87 <tr> 78 <div class="node_description">Title</div>
88 <th class="description"></th> 79 <div class="node_content"><%= d.text_field :title %></div>
89 <th class="content"></th> 80
90 </tr> 81 <div class="node_description">Abstract</div>
91 <tr> 82 <div class="node_content"><%= d.text_area :abstract %></div>
92 <td class="description">Title</td> 83
93 <td><%= d.text_field :title %></td> 84 <div class="node_description">Body</div>
94 </tr> 85 <div class="node_content"><%= d.text_area :body, :class => 'with_editor' %></div>
95 <tr> 86
96 <td class="description">Abstract</td> 87 <div><%= d.submit 'save' %></div>
97 <td><%= d.text_area :abstract %></td>
98 </tr>
99 <tr>
100 <td class="description">Body</td>
101 <td><%= d.text_area :body, :class => 'with_editor' %></td>
102 </tr>
103 <tr>
104 <td></td>
105 <td class="right"><%= d.submit 'save' %></td>
106 </tr>
107 </table>
108 <% end %> 88 <% end %>
109<% end %> 89<% end %>
110</div> \ No newline at end of file 90</div>
diff --git a/app/views/nodes/index.html.erb b/app/views/nodes/index.html.erb
index bf01645..e5a55d4 100644
--- a/app/views/nodes/index.html.erb
+++ b/app/views/nodes/index.html.erb
@@ -27,7 +27,7 @@
27 <%= node.lock_owner.login if node.lock_owner %> 27 <%= node.lock_owner.login if node.lock_owner %>
28 </td> 28 </td>
29 <td> 29 <td>
30 <%= node.draft ? node.draft.revision : node.head.revision %> 30 <%= node.draft ? node.draft.revision : (node.head ? node.head.revision : "EMPTY") %>
31 </td> 31 </td>
32 </tr> 32 </tr>
33 <% end %> 33 <% end %>
diff --git a/app/views/nodes/new.html.erb b/app/views/nodes/new.html.erb
index 850207b..028d727 100644
--- a/app/views/nodes/new.html.erb
+++ b/app/views/nodes/new.html.erb
@@ -1,11 +1,14 @@
1<h1>Create new node</h1> 1<h1>Create new node</h1>
2 2
3<%= error_messages_for( :node ).gsub("Slug", "Title") %> 3<% if @node.errors.any? %>
4 4 <div class="error_messages">
5 <ul><% @node.errors.full_messages.each do |msg| %><li><%= msg.to_s.gsub("Slug", "Title") %></li><% end %></ul>
6 </div>
7<% end %>
5 8
6<p>What kind of node do you want to create?</p> 9<p>What kind of node do you want to create?</p>
7 10
8<% form_tag nodes_path do %> 11<%= form_tag nodes_path do %>
9<table id="new_node"> 12<table id="new_node">
10 <tr> 13 <tr>
11 <td class="description">Type</td> 14 <td class="description">Type</td>
@@ -20,7 +23,11 @@
20 </p> 23 </p>
21 <p> 24 <p>
22 <%= radio_button_tag :kind, "update" %> 25 <%= radio_button_tag :kind, "update" %>
23 Update / Press release ( is automatically created in /updates ) 26 Update ( is automatically created in /updates/<%= Time.now.year.to_s %>/ and gets tag "update" )
27 </p>
28 <p>
29 <%= radio_button_tag :kind, "press_release" %>
30 Pressemitteilung ( is automatically created in /updates/<%= Time.now.year.to_s %>/ and gets tags "update, pressemitteilung" )
24 </p> 31 </p>
25 </td> 32 </td>
26 </tr> 33 </tr>
@@ -31,8 +38,8 @@
31 <tr id="parent_search_field"> 38 <tr id="parent_search_field">
32 <td class="description">Parent</td> 39 <td class="description">Parent</td>
33 <td> 40 <td>
34 <%= text_field_tag :parent_search_term %> 41 <%= text_field_tag :parent_search_term, @parent_name %>
35 <%= hidden_field_tag :parent_id %> 42 <%= hidden_field_tag :parent_id, @parent_id %>
36 <div id="search_results"> 43 <div id="search_results">
37 44
38 </div> 45 </div>
@@ -43,4 +50,4 @@
43 <td class="right"><%= submit_tag "Create" %></td> 50 <td class="right"><%= submit_tag "Create" %></td>
44 </tr> 51 </tr>
45</table> 52</table>
46<% end %> \ No newline at end of file 53<% end %>
diff --git a/app/views/nodes/update.js.erb b/app/views/nodes/update.js.erb
index be26fab..35dfeee 100644
--- a/app/views/nodes/update.js.erb
+++ b/app/views/nodes/update.js.erb
@@ -1,3 +1,5 @@
1$("#flash").html( 1<% if flash[:notice] %>
2 "<span><%= escape_javascript(flash.delete(:notice)) %></span>" 2 $("#flash").html(
3); \ No newline at end of file 3 "<span><%= escape_javascript(flash.delete(:notice)) %></span>"
4 );
5<% end %>