diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-06-27 22:52:50 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-06-27 22:52:50 +0200 |
| commit | 9a19a0494ef51cdac9a78e24d517ca48ba44c453 (patch) | |
| tree | 8eaae12d8047a40e29d3ea7ff3116b5c869e04bd /app/views/nodes/edit.html.erb | |
| parent | 85a01e35274b8d4d4165a7b26bd7986e211246bb (diff) | |
| parent | 1853082fcd8c067390c246f9daa01a9b47387497 (diff) | |
Migration from Rails 2.3.5 to Rails 8.1 successful.
Merging dev branch.
Diffstat (limited to 'app/views/nodes/edit.html.erb')
| -rw-r--r-- | app/views/nodes/edit.html.erb | 168 |
1 files changed, 74 insertions, 94 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> |
