diff options
| author | hukl <contact@smyck.org> | 2009-08-09 14:45:12 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-08-09 14:45:12 +0200 |
| commit | 97aecb984afa6a7d8d1424f544b8e32d8c87603d (patch) | |
| tree | 8939b12d327875241179c07ac975871cabdb582c /app/views/menu_items | |
| parent | 72593784d6d580ea8cc6987a83cf7b18167aba80 (diff) | |
added sorting (via drag and drop) and deleting of menu items. Its not perfect though and needs more styling. I'm unsure about the proper route for the sort action. Will investigate.
Diffstat (limited to 'app/views/menu_items')
| -rw-r--r-- | app/views/menu_items/index.html.erb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/views/menu_items/index.html.erb b/app/views/menu_items/index.html.erb index 00a9b05..f4316bf 100644 --- a/app/views/menu_items/index.html.erb +++ b/app/views/menu_items/index.html.erb | |||
| @@ -5,11 +5,19 @@ | |||
| 5 | 5 | ||
| 6 | <h1>Menu Items</h1> | 6 | <h1>Menu Items</h1> |
| 7 | 7 | ||
| 8 | <table> | 8 | <table id="menu_item_list"> |
| 9 | <% @menu_items.each do |menu_item| %> | 9 | <% @menu_items.each do |menu_item| %> |
| 10 | <tr> | 10 | <tr id="menu_items-<%= menu_item.id %>"> |
| 11 | <td><%= menu_item.title %></td> | 11 | <td><%= menu_item.title %></td> |
| 12 | <td><%= link_to "Edit", edit_menu_item_path(menu_item) %></td> | 12 | <td><%= link_to "Edit", edit_menu_item_path(menu_item) %></td> |
| 13 | <td> | ||
| 14 | <%= link_to( | ||
| 15 | "Delete", | ||
| 16 | menu_item_path(menu_item), | ||
| 17 | :method => :delete, | ||
| 18 | :confirm => "Are you sure?" | ||
| 19 | ) %> | ||
| 20 | </td> | ||
| 13 | </tr> | 21 | </tr> |
| 14 | <% end %> | 22 | <% end %> |
| 15 | </table> \ No newline at end of file | 23 | </table> \ No newline at end of file |
