Finished chapter 11
[depot.git] / app / views / layouts / store.html.erb
1
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5 <head>
6 <title>Neil's Whimsical Online Store</title>
7 <%= stylesheet_link_tag "depot" , :media => "all" %>
8 <%= javascript_include_tag :defaults %>
9 </head>
10 <body id="store">
11 <div id="banner">
12 <%= image_tag("logo.png" ) %>
13 <%= @page_title || "Neil's Whimisical Store" %>
14 </div>
15 <div id="columns">
16 <div id="side">
17 <% if @cart %>
18 <% hidden_div_if(@cart.items.empty?, :id => "cart") do %>
19 <%= render(:partial => "cart" , :object => @cart) %>
20 <% end %>
21 <% end %>
22 <a href="/">Home</a><br />
23 <a href="http://www..../faq">Questions</a><br />
24 <a href="http://www..../news">News</a><br />
25 <a href="http://www..../contact">Contact</a><br />
26
27 <% if session[:user_id] %>
28 <br />
29 <%= link_to 'Orders', :controller => 'orders' %><br />
30 <%= link_to 'Products', :controller => 'products' %><br />
31 <%= link_to 'Users', :controller => 'users' %><br />
32 <br />
33 <%= link_to 'Logout', :controller => 'admin', :action => 'logout' %>
34 <% end %>
35
36 </div>
37 <div id="main">
38 <% if flash[:notice] -%>
39 <div id="notice"><%= flash[:notice] %></div>
40 <% end -%>
41 <div id="main_panel">
42 <%= yield :layout %>
43 </div>
44 </div>
45 </div>
46 </body>
47 </html>