Permalink
Browse files

Changed admin paths, added header

  • Loading branch information...
1 parent 679241c commit ab0fa93e82c326a712f06e01ddbc455342c2a30d @florida committed Nov 13, 2012
View
BIN app/assets/images/bg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
4 app/assets/stylesheets/application.css
@@ -11,3 +11,7 @@
*= require_self
*= require_tree .
*/
+
+ body{
+ background-image: url(bg.png);
+ }
View
2 app/views/admin/orders/index.html.erb
@@ -19,7 +19,7 @@
<td><%= order.address %></td>
<td><%= link_to 'Show', admin_order_path(order) %></td>
<td><%= link_to 'Edit', edit_admin_order_path(order) %></td>
- <td><%= link_to 'Destroy', admin_order_path(order), method: :delete, data: { confirm: 'Are you sure?' } %></td>
+ <td><%= link_to 'Destroy', order, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</table>
View
2 app/views/admin/orders/show.html.erb
@@ -21,5 +21,5 @@
</p>
-<%= link_to 'Edit', edit_admin_order_path(@order) %> |
+<%= link_to 'Edit', edit_order_path(@order) %> |
<%= link_to 'Back', admin_orders_path %>
View
2 app/views/admin/products/new.html.erb
@@ -2,4 +2,4 @@
<%= render 'form' %>
-<%= link_to 'Back', products_path %>
+<%= link_to 'Back', admin_products_path %>
View
7 app/views/layouts/application.html.erb
@@ -8,6 +8,13 @@
</head>
<body>
+<header>
+ <ul>
+ <li><%= link_to 'Orders', admin_orders_path %></li>
+ <li><%= link_to 'Products', admin_products_path %></li>
+ <li></li>
+ </ul>
+</header>
<%= yield %>
</body>
View
2 config/routes.rb
@@ -2,6 +2,8 @@
namespace :admin do
resources :orders, :products
end
+
+resources :orders, :products
# The priority is based upon order of creation:
# first created -> highest priority.

0 comments on commit ab0fa93

Please sign in to comment.