<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- START:jit -->
<html>
<head>
  <title>Pragprog Books Online Store</title>
<!-- START:stylesheet -->
  <%= stylesheet_link_tag "depot", :media => "all" %>
<!-- END:stylesheet -->
  <%= javascript_include_tag :defaults %>
</head>
<!-- END:jit -->
<body id="store">
  <div id="banner">
  <!-- START:i18n -->
  <% form_tag '', :method => 'GET', :class => 'locale' do %>
    <%= select_tag 'locale', options_for_select(LANGUAGES, I18n.locale),
      :onchange => 'this.form.submit()' %>
    <%= submit_tag 'submit' %>
    <%= javascript_tag "$$('.locale input').each(Element.hide)" %>
  <% end %>
  <!-- END:i18n -->
    <%= image_tag("logo.png") %>
<!-- START_HIGHLIGHT -->
    <%= @page_title || I18n.t('layout.title') %>
<!-- END_HIGHLIGHT -->
  </div>
  <div id="columns">
    <div id="side">
      <!-- START:hidden_div -->
      <% if @cart %>
        <% hidden_div_if(@cart.items.empty?, :id => "cart") do %>
          <%= render(:partial => "cart", :object => @cart) %>
        <% end %>
      <% end %>
    <!-- END:hidden_div -->

<!-- START_HIGHLIGHT -->
      <a href="http://www...."><%= I18n.t 'layout.side.home' %></a><br />
<!-- END_HIGHLIGHT -->
<!-- START_HIGHLIGHT -->
      <a href="http://www..../faq"><%= I18n.t 'layout.side.questions' %></a><br />
<!-- END_HIGHLIGHT -->
<!-- START_HIGHLIGHT -->
      <a href="http://www..../news"><%= I18n.t 'layout.side.news' %></a><br />
<!-- END_HIGHLIGHT -->
<!-- START_HIGHLIGHT -->
      <a href="http://www..../contact"><%= I18n.t 'layout.side.contact' %></a><br />
<!-- END_HIGHLIGHT -->
      <% 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">
      <!-- START:flash -->
      <% if flash[:notice] -%>
        <div id="notice"><%= flash[:notice] %></div>
      <% end -%>
      <!-- END:flash -->

      <%= yield :layout %>
    </div>
  </div>
</body>
</html>
