diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-06-25 04:35:21 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-06-25 04:35:21 +0200 |
| commit | 5f8cc4fa269dadc895d99eec9ef3a82b17c5890a (patch) | |
| tree | 048ffe4ef9e6b147eddbe6472312b72267d268d9 /app/views/admin | |
| parent | f7a5944a1f44ede9881d368a36eb9f7d82d6ab69 (diff) | |
Rails 4.2 view fixes
- Replace :confirm => with :data => { :confirm => } in all link_to calls
- Fix link_to_path helper: use content_path named route instead of hash-style routing
- Fix admin/_menu.html.erb: use named routes for logout and admin index
- Fix admin layout: load jquery/jquery_ujs before jquery-ui, remove duplicate jQuery 1.3.2
- Add csrf_meta_tags to admin layout
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 |
2 files changed, 5 insertions, 5 deletions
diff --git a/app/views/admin/_drafts.html.erb b/app/views/admin/_drafts.html.erb index 58b946b..2036d12 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 | <%= link_to "Publish", publish_node_path(draft.node), :method => :put, :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..3188d94 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 | <%= link_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') %> > |
