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/admin | |
| 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/admin')
| -rw-r--r-- | app/views/admin/_drafts.html.erb | 4 | ||||
| -rw-r--r-- | app/views/admin/_menu.html.erb | 6 | ||||
| -rw-r--r-- | app/views/admin/_recent_changes.html.erb | 2 | ||||
| -rw-r--r-- | app/views/admin/index.html.erb | 85 | ||||
| -rw-r--r-- | app/views/admin/search_results.html.erb | 7 |
5 files changed, 93 insertions, 11 deletions
diff --git a/app/views/admin/_drafts.html.erb b/app/views/admin/_drafts.html.erb index 58b946b..a35b0ab 100644 --- a/app/views/admin/_drafts.html.erb +++ b/app/views/admin/_drafts.html.erb | |||
| @@ -17,9 +17,9 @@ | |||
| 17 | <td class="actions"> | 17 | <td class="actions"> |
| 18 | <%= link_to 'Show', node_path(draft.node) %> | 18 | <%= link_to 'Show', node_path(draft.node) %> |
| 19 | <%= link_to "Revisions", revision_path(draft.node.id) %> | 19 | <%= link_to "Revisions", revision_path(draft.node.id) %> |
| 20 | <%= link_to "Publish", publish_node_path(draft.node), :method => :put, :confirm => "Do you really want to publish?" %> | 20 | <%= button_to "Publish", publish_node_path(draft.node), method: :put, form: { data: { confirm: "Do you really want to publish?" } } %> |
| 21 | </td> | 21 | </td> |
| 22 | </tr> | 22 | </tr> |
| 23 | <% end %> | 23 | <% end %> |
| 24 | </table> | 24 | </table> |
| 25 | </div> \ No newline at end of file | 25 | </div> |
diff --git a/app/views/admin/_menu.html.erb b/app/views/admin/_menu.html.erb index e8b39ce..6f217eb 100644 --- a/app/views/admin/_menu.html.erb +++ b/app/views/admin/_menu.html.erb | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | <%= language_selector %> | 1 | <%= language_selector %> |
| 2 | <%= link_to 'Logout', :controller => :sessions, :action => :destroy %> | 2 | <%= button_to 'Logout', logout_path, method: :delete %> |
| 3 | <%= link_to 'Overview', :controller => :admin, :action => 'index' %> | 3 | <%= link_to 'Overview', admin_path %> |
| 4 | <%= link_to 'Nodes', nodes_path, selected?('nodes') %> | 4 | <%= link_to 'Nodes', nodes_path, selected?('nodes') %> |
| 5 | <%= link_to 'Assets', assets_path, selected?('assets') %> | 5 | <%= link_to 'Assets', assets_path, selected?('assets') %> |
| 6 | <%= link_to 'User', users_path, selected?('users') %> | 6 | <%= link_to 'User', users_path, selected?('users') %> |
| 7 | <%= link_to 'Navigation', menu_items_path, selected?('menu_items') %> > \ No newline at end of file | 7 | <%= link_to 'Navigation', menu_items_path, selected?('menu_items') %> > |
diff --git a/app/views/admin/_recent_changes.html.erb b/app/views/admin/_recent_changes.html.erb index 300d088..88b5e93 100644 --- a/app/views/admin/_recent_changes.html.erb +++ b/app/views/admin/_recent_changes.html.erb | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | <td><%= truncated_title_for_node node %></td> | 13 | <td><%= truncated_title_for_node node %></td> |
| 14 | <td><%= node.unique_name %></td> | 14 | <td><%= node.unique_name %></td> |
| 15 | <td><%= node.draft.user.login rescue "" %></td> | 15 | <td><%= node.draft.user.login rescue "" %></td> |
| 16 | <td><%= node.updated_at.to_s(:db) %></td> | 16 | <td><%= node.updated_at.to_fs(:db) %></td> |
| 17 | <td class="actions"> | 17 | <td class="actions"> |
| 18 | <%= link_to 'Show', node_path(node) %> | 18 | <%= link_to 'Show', node_path(node) %> |
| 19 | <%= link_to "Revisions", revision_path(:id => node.id) %> | 19 | <%= link_to "Revisions", revision_path(:id => node.id) %> |
diff --git a/app/views/admin/index.html.erb b/app/views/admin/index.html.erb index 526aa88..2741db3 100644 --- a/app/views/admin/index.html.erb +++ b/app/views/admin/index.html.erb | |||
| @@ -1,6 +1,15 @@ | |||
| 1 | <div id="admin_wizard"> | ||
| 2 | <div class="admin_wizard_button"><%= link_to 'Create Update or Pressemitteilung', new_node_path, :only_path => false %></div> | ||
| 3 | <div class="admin_wizard_button"><a href="#" id="admin_wizard_my_work" class="button">Continue my work</a></div> | ||
| 4 | <div class="admin_wizard_button"><a href="#" id="admin_wizard_create_page" class="button">Add a page in the page tree</a></div> | ||
| 5 | <div class="admin_wizard_button"><%= link_to("Upload a new asset", new_asset_path, :only_path => false) %></div> | ||
| 6 | </div> | ||
| 7 | |||
| 1 | <p id="overview_toggle"> | 8 | <p id="overview_toggle"> |
| 2 | <a href="#" id="recent_changes_toggle" class="button">recent changes</a> | 9 | <a href="#" id="recent_changes_toggle" class="button">recent changes</a> |
| 3 | <a href="#" id="current_drafts_toggle" class="button">current drafts</a> | 10 | <a href="#" id="my_work_toggle" class="button">my work</a> |
| 11 | <a href="#" id="current_drafts_toggle" class="button">current drafts (<%= @drafts_count %>)</a> | ||
| 12 | <a href="#" id="admin_sitemap_toggle" class="button">site map</a> | ||
| 4 | </p> | 13 | </p> |
| 5 | 14 | ||
| 6 | <div id="recent_changes_table"> | 15 | <div id="recent_changes_table"> |
| @@ -30,7 +39,41 @@ | |||
| 30 | <%= node.lock_owner.login if node.lock_owner %> | 39 | <%= node.lock_owner.login if node.lock_owner %> |
| 31 | </td> | 40 | </td> |
| 32 | <td> | 41 | <td> |
| 33 | <%= node.draft ? node.draft.revision : node.head.revision %> | 42 | <%= link_to ( node.draft ? node.draft.revision : (node.head ? node.head.revision : "EMPTY" ) ), node_revisions_path(node) %> |
| 43 | </td> | ||
| 44 | </tr> | ||
| 45 | <% end %> | ||
| 46 | </table> | ||
| 47 | </div> | ||
| 48 | |||
| 49 | <div id="my_work_table"> | ||
| 50 | |||
| 51 | <h1>My Work</h1> | ||
| 52 | |||
| 53 | <table class="node_table"> | ||
| 54 | <tr class="header"> | ||
| 55 | <th class="node_id">ID</th> | ||
| 56 | <th class="title">Title</th> | ||
| 57 | <th class="actions">Actions</th> | ||
| 58 | <th class="editor">Locked by</th> | ||
| 59 | <th class="revision">Rev.</th> | ||
| 60 | </tr> | ||
| 61 | <% @mynodes.each do |node| %> | ||
| 62 | <tr class="<%= cycle("even", "odd") %>"> | ||
| 63 | <td class="node_id"><%= node.id %></td> | ||
| 64 | <td class="title"> | ||
| 65 | <h4><%= link_to title_for_node(node), node_path(node) %></h4> | ||
| 66 | <p><%= link_to_path(node.unique_name, node.unique_name) %></p> | ||
| 67 | </td> | ||
| 68 | <td class="actions"> | ||
| 69 | <%= link_to 'show', node_path(node) %> | ||
| 70 | <%= link_to 'Revisions', node_revisions_path(node) %> | ||
| 71 | </td> | ||
| 72 | <td> | ||
| 73 | <%= node.lock_owner.login if node.lock_owner %> | ||
| 74 | </td> | ||
| 75 | <td> | ||
| 76 | <%= link_to ( node.draft ? node.draft.revision : (node.head ? node.head.revision : "EMPTY" ) ), node_revisions_path(node) %> | ||
| 34 | </td> | 77 | </td> |
| 35 | </tr> | 78 | </tr> |
| 36 | <% end %> | 79 | <% end %> |
| @@ -39,7 +82,7 @@ | |||
| 39 | 82 | ||
| 40 | <div id="current_drafts_table"> | 83 | <div id="current_drafts_table"> |
| 41 | 84 | ||
| 42 | <h1>Current Drafts</h1> | 85 | <h1>Current Drafts (<%= @drafts_count %>)</h1> |
| 43 | 86 | ||
| 44 | <table class="node_table"> | 87 | <table class="node_table"> |
| 45 | <tr class="header"> | 88 | <tr class="header"> |
| @@ -64,9 +107,41 @@ | |||
| 64 | <%= node.lock_owner.login if node.lock_owner %> | 107 | <%= node.lock_owner.login if node.lock_owner %> |
| 65 | </td> | 108 | </td> |
| 66 | <td> | 109 | <td> |
| 67 | <%= node.draft ? node.draft.revision : node.head.revision %> | 110 | <%= link_to ( node.draft ? node.draft.revision : (node.head ? node.head.revision : "EMPTY" ) ), node_revisions_path(node) %> |
| 111 | </td> | ||
| 112 | </tr> | ||
| 113 | <% end %> | ||
| 114 | </table> | ||
| 115 | </div> | ||
| 116 | |||
| 117 | <div id="admin_sitemap_table"> | ||
| 118 | |||
| 119 | <h1>Sitemap</h1> | ||
| 120 | |||
| 121 | <table class="node_table"> | ||
| 122 | <tr class="header"> | ||
| 123 | <th class="node_id">ID</th> | ||
| 124 | <th class="title">Title</th> | ||
| 125 | <th class="actions">Actions</th> | ||
| 126 | <th class="editor">Locked by</th> | ||
| 127 | </tr> | ||
| 128 | <% @sitemap.each do |node| %> | ||
| 129 | <% if !node.nil? %> | ||
| 130 | <tr class="<%= cycle("even", "odd") %>"> | ||
| 131 | <td class="node_id" style="padding-left: <%= @sitemap_depth[node.id] * 30 %>px;"><%= node.id %></td> | ||
| 132 | <td class="title" style="padding-left: <%= @sitemap_depth[node.id] * 30 %>px;"> | ||
| 133 | <h4><%= link_to title_for_node(node), node_path(node) %></h4> | ||
| 134 | <p><%= link_to_path(node.unique_name, node.unique_name) %></p> | ||
| 135 | </td> | ||
| 136 | <td class="actions"> | ||
| 137 | <%= link_to 'create subpage', new_node_path(:parent_id => node.id) %> | ||
| 138 | <%= link_to 'Revisions', node_revisions_path(node) %> | ||
| 139 | </td> | ||
| 140 | <td> | ||
| 141 | <%= node.lock_owner.login if node.lock_owner %> | ||
| 68 | </td> | 142 | </td> |
| 69 | </tr> | 143 | </tr> |
| 70 | <% end %> | 144 | <% end %> |
| 145 | <% end %> | ||
| 71 | </table> | 146 | </table> |
| 72 | </div> \ No newline at end of file | 147 | </div> |
diff --git a/app/views/admin/search_results.html.erb b/app/views/admin/search_results.html.erb new file mode 100644 index 0000000..671b665 --- /dev/null +++ b/app/views/admin/search_results.html.erb | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | <h1>Search Results</h1> | ||
| 2 | |||
| 3 | <ul> | ||
| 4 | <%- @results.each do |result| %> | ||
| 5 | <li><a href="<%= node_path(result) %>"><%= result.title %></a></li> | ||
| 6 | <% end %> | ||
| 7 | </ul> | ||
