X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=app%2Fviews%2Flayouts%2Fstore.html.erb;h=e4845d76207dea4ff6b78016578a527a2bbefaf8;hb=2e4e591080e228dec676acf40b9e7bc4b044b8bc;hp=5f2d4f10bd04a50ff6cedb36881cd420bc9fd805;hpb=aff195f08c5fc2b8db74058b34720164148cfb4e;p=depot.git diff --git a/app/views/layouts/store.html.erb b/app/views/layouts/store.html.erb index 5f2d4f1..e4845d7 100644 --- a/app/views/layouts/store.html.erb +++ b/app/views/layouts/store.html.erb @@ -14,20 +14,33 @@
-
- <%= render(:partial => "cart" , :object => @cart) %> -
- Home
+ <% if @cart %> + <% hidden_div_if(@cart.items.empty?, :id => "cart") do %> + <%= render(:partial => "cart" , :object => @cart) %> + <% end %> + <% end %> + Home
Questions
News
Contact
+ + <% if session[:user_id] %> +
+ <%= link_to 'Orders', :controller => 'orders' %>
+ <%= link_to 'Products', :controller => 'products' %>
+ <%= link_to 'Users', :controller => 'users' %>
+
+ <%= link_to 'Logout', :controller => 'admin', :action => 'logout' %> + <% end %> +
<% if flash[:notice] -%>
<%= flash[:notice] %>
<% end -%> - - <%= yield :layout %> +
+ <%= yield :layout %> +