summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-06-25 04:35:21 +0200
committererdgeist <erdgeist@erdgeist.org>2026-06-25 04:35:21 +0200
commit5f8cc4fa269dadc895d99eec9ef3a82b17c5890a (patch)
tree048ffe4ef9e6b147eddbe6472312b72267d268d9 /app/views
parentf7a5944a1f44ede9881d368a36eb9f7d82d6ab69 (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')
-rw-r--r--app/views/admin/_drafts.html.erb4
-rw-r--r--app/views/admin/_menu.html.erb6
-rw-r--r--app/views/assets/index.html.erb4
-rw-r--r--app/views/events/index.html.erb4
-rw-r--r--app/views/layouts/admin.html.erb3
-rw-r--r--app/views/menu_items/index.html.erb4
-rw-r--r--app/views/nodes/edit.html.erb2
-rw-r--r--app/views/occurrences/index.html.erb4
-rw-r--r--app/views/pages/index.html.erb2
-rw-r--r--app/views/revisions/index.html.erb2
-rw-r--r--app/views/users/_user.html.erb4
11 files changed, 20 insertions, 19 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') %> &gt;&nbsp; \ No newline at end of file 7<%= link_to 'Navigation', menu_items_path, selected?('menu_items') %> &gt;&nbsp;
diff --git a/app/views/assets/index.html.erb b/app/views/assets/index.html.erb
index fc7c029..e7ef313 100644
--- a/app/views/assets/index.html.erb
+++ b/app/views/assets/index.html.erb
@@ -15,7 +15,7 @@
15 <td><%= asset.upload.content_type %></td> 15 <td><%= asset.upload.content_type %></td>
16 <td><%= link_to 'Show', asset %></td> 16 <td><%= link_to 'Show', asset %></td>
17 <td><%= link_to 'Edit', edit_asset_path(asset) %></td> 17 <td><%= link_to 'Edit', edit_asset_path(asset) %></td>
18 <td><%= link_to 'Destroy', asset, :confirm => 'Are you sure?', :method => :delete %></td> 18 <td><%= link_to 'Destroy', asset, :data => { :confirm => 'Are you sure?' }, :method => :delete %></td>
19 </tr> 19 </tr>
20<% end %> 20<% end %>
21</table> \ No newline at end of file 21</table>
diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb
index c1b5b48..93c95fa 100644
--- a/app/views/events/index.html.erb
+++ b/app/views/events/index.html.erb
@@ -26,11 +26,11 @@
26 <td><%=h event.node_id %></td> 26 <td><%=h event.node_id %></td>
27 <td><%= link_to 'Show', event %></td> 27 <td><%= link_to 'Show', event %></td>
28 <td><%= link_to 'Edit', edit_event_path(event) %></td> 28 <td><%= link_to 'Edit', edit_event_path(event) %></td>
29 <td><%= link_to 'Destroy', event, :confirm => 'Are you sure?', :method => :delete %></td> 29 <td><%= link_to 'Destroy', event, :data => { :confirm => 'Are you sure?' }, :method => :delete %></td>
30 </tr> 30 </tr>
31<% end %> 31<% end %>
32</table> 32</table>
33 33
34<br /> 34<br />
35 35
36<%= link_to 'New event', new_event_path %> \ No newline at end of file 36<%= link_to 'New event', new_event_path %>
diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb
index 9f36021..e64850b 100644
--- a/app/views/layouts/admin.html.erb
+++ b/app/views/layouts/admin.html.erb
@@ -4,9 +4,10 @@
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5 <head> 5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
7 <%= csrf_meta_tags %>
7 8
8 <title><%= "#{params[:controller]} | #{params[:action]}" %></title> 9 <title><%= "#{params[:controller]} | #{params[:action]}" %></title>
9 <%= javascript_include_tag 'jquery-1.3.2.min' %> 10 <%= javascript_include_tag 'jquery', 'jquery_ujs' %>
10 <%= javascript_include_tag 'jquery-ui-1.7.2.custom.min' %> 11 <%= javascript_include_tag 'jquery-ui-1.7.2.custom.min' %>
11 <%= javascript_include_tag 'jquery.hotkeys' %> 12 <%= javascript_include_tag 'jquery.hotkeys' %>
12 <%= javascript_include_tag 'tiny_mce/jquery.tinymce.js' %> 13 <%= javascript_include_tag 'tiny_mce/jquery.tinymce.js' %>
diff --git a/app/views/menu_items/index.html.erb b/app/views/menu_items/index.html.erb
index 123a07a..7d0ce62 100644
--- a/app/views/menu_items/index.html.erb
+++ b/app/views/menu_items/index.html.erb
@@ -18,9 +18,9 @@
18 "Delete", 18 "Delete",
19 menu_item_path(menu_item), 19 menu_item_path(menu_item),
20 :method => :delete, 20 :method => :delete,
21 :confirm => "Are you sure?" 21 :data => { :confirm => "Are you sure?" }
22 ) %> 22 ) %>
23 </td> 23 </td>
24 </tr> 24 </tr>
25 <% end %> 25 <% end %>
26</table> \ No newline at end of file 26</table>
diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb
index d40d4e7..64884cf 100644
--- a/app/views/nodes/edit.html.erb
+++ b/app/views/nodes/edit.html.erb
@@ -2,7 +2,7 @@
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 <%= link_to 'Publish', publish_node_path, :method => :put, :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
diff --git a/app/views/occurrences/index.html.erb b/app/views/occurrences/index.html.erb
index 06dbf07..7b8ffb8 100644
--- a/app/views/occurrences/index.html.erb
+++ b/app/views/occurrences/index.html.erb
@@ -18,11 +18,11 @@
18 <td><%=h occurrence.event_id %></td> 18 <td><%=h occurrence.event_id %></td>
19 <td><%= link_to 'Show', occurrence %></td> 19 <td><%= link_to 'Show', occurrence %></td>
20 <td><%= link_to 'Edit', edit_occurrence_path(occurrence) %></td> 20 <td><%= link_to 'Edit', edit_occurrence_path(occurrence) %></td>
21 <td><%= link_to 'Destroy', occurrence, :confirm => 'Are you sure?', :method => :delete %></td> 21 <td><%= link_to 'Destroy', occurrence, :data => { :confirm => 'Are you sure?' }, :method => :delete %></td>
22 </tr> 22 </tr>
23<% end %> 23<% end %>
24</table> 24</table>
25 25
26<br /> 26<br />
27 27
28<%= link_to 'New occurrence', new_occurrence_path %> \ No newline at end of file 28<%= link_to 'New occurrence', new_occurrence_path %>
diff --git a/app/views/pages/index.html.erb b/app/views/pages/index.html.erb
index 06cb16c..4b28c9b 100644
--- a/app/views/pages/index.html.erb
+++ b/app/views/pages/index.html.erb
@@ -12,7 +12,7 @@
12 <td><%=h page.title %></td> 12 <td><%=h page.title %></td>
13 <td><%= link_to 'Show', content_path(:page_path => page.node.unique_path) %></td> 13 <td><%= link_to 'Show', content_path(:page_path => page.node.unique_path) %></td>
14 <td><%= link_to 'Edit', edit_page_path(page) %></td> 14 <td><%= link_to 'Edit', edit_page_path(page) %></td>
15 <td><%= link_to 'Destroy', page, :confirm => 'Are you sure?', :method => :delete %></td> 15 <td><%= link_to 'Destroy', page, :data => { :confirm => 'Are you sure?' }, :method => :delete %></td>
16 </tr> 16 </tr>
17<% end %> 17<% end %>
18</table> 18</table>
diff --git a/app/views/revisions/index.html.erb b/app/views/revisions/index.html.erb
index 306f9ea..e038ed2 100644
--- a/app/views/revisions/index.html.erb
+++ b/app/views/revisions/index.html.erb
@@ -31,7 +31,7 @@
31 'restore', 31 'restore',
32 restore_node_revision_path(@node, page), 32 restore_node_revision_path(@node, page),
33 :method => :put, 33 :method => :put,
34 :confirm => "Restore this revision?" 34 :data => { :confirm => "Restore this revision?" }
35 ) %> 35 ) %>
36 </td> 36 </td>
37 </tr> 37 </tr>
diff --git a/app/views/users/_user.html.erb b/app/views/users/_user.html.erb
index 8117bcd..9987e31 100644
--- a/app/views/users/_user.html.erb
+++ b/app/views/users/_user.html.erb
@@ -11,9 +11,9 @@
11 "destroy", 11 "destroy",
12 user_path(user), 12 user_path(user),
13 :method => :delete, 13 :method => :delete,
14 :confirm => "Do you really want to delete user #{user.login}?" 14 :data => { :confirm => "Do you really want to delete user #{user.login}?" }
15 ) %> 15 ) %>
16 </td> 16 </td>
17 <% end %> 17 <% end %>
18</tr> 18</tr>
19<% end %> \ No newline at end of file 19<% end %>