X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=app%2Fviews%2Flayouts%2Fstore.html.erb;h=e4845d76207dea4ff6b78016578a527a2bbefaf8;hb=HEAD;hp=77e86d9e23e08684c1cbb69f3c329f337ed50fd0;hpb=c611b802645df9f0b490550d8c352fd24eb6ec5b;p=depot.git diff --git a/app/views/layouts/store.html.erb b/app/views/layouts/store.html.erb index 77e86d9..e4845d7 100644 --- a/app/views/layouts/store.html.erb +++ b/app/views/layouts/store.html.erb @@ -5,6 +5,7 @@ <head> <title>Neil's Whimsical Online Store</title> <%= stylesheet_link_tag "depot" , :media => "all" %> + <%= javascript_include_tag :defaults %> </head> <body id="store"> <div id="banner"> @@ -13,17 +14,33 @@ </div> <div id="columns"> <div id="side"> - <a href="http://www....">Home</a><br /> + <% if @cart %> + <% hidden_div_if(@cart.items.empty?, :id => "cart") do %> + <%= render(:partial => "cart" , :object => @cart) %> + <% end %> + <% end %> + <a href="/">Home</a><br /> <a href="http://www..../faq">Questions</a><br /> <a href="http://www..../news">News</a><br /> <a href="http://www..../contact">Contact</a><br /> + + <% if session[:user_id] %> + <br /> + <%= link_to 'Orders', :controller => 'orders' %><br /> + <%= link_to 'Products', :controller => 'products' %><br /> + <%= link_to 'Users', :controller => 'users' %><br /> + <br /> + <%= link_to 'Logout', :controller => 'admin', :action => 'logout' %> + <% end %> + </div> <div id="main"> <% if flash[:notice] -%> <div id="notice"><%= flash[:notice] %></div> <% end -%> - - <%= yield :layout %> + <div id="main_panel"> + <%= yield :layout %> + </div> </div> </div> </body>