<!DOCTYPE html>                                           
<html>
<head>
  <title>Internetové knihkupectví Pragprog</title>
  <%= stylesheet_link_tag "scaffold" %>                   
  <%= stylesheet_link_tag "depot", :media => "all" %>
  <%= javascript_include_tag :defaults %>
  <%= csrf_meta_tag %>
</head>
<body id="store">                                        
  <div id="banner">
<%= form_tag store_path, :class => 'locale' do %>
  <%= select_tag 'set_locale', 
                 options_for_select(LANGUAGES, I18n.locale.to_s),
                 :onchange => 'this.form.submit()' %>
  <%= submit_tag 'submit' %>
  <%= javascript_tag "$$('.locale input').each(Element.hide)" %>
<% end %>

    <%= image_tag("logo.png") %>
    <%= @page_title || t('.title') %>
  </div>
  <div id="columns">                                
    <div id="side">
      <% if @cart %>
        <%= hidden_div_if(@cart.line_items.empty?, :id => "cart") do %>
          <%= render @cart %>
        <% end %>
      <% end %>
      <a href="http://www...." ><%= t('.home') %></a><br />
      <a href="http://www..../faq" ><%= t('.questions') %></a><br />
      <a href="http://www..../news" ><%= t('.news') %></a><br />
      <a href="http://www..../contact" ><%= t('.contact') %></a><br />
      <% if session[:user_id] %>
        <br />
        <%= link_to 'Objednávky', orders_path %><br />
        <%= link_to 'Produkty', products_path %><br />
        <%= link_to 'Uživatelé', users_path %><br />
        <br />
        <%= button_to 'Odhlášení', logout_path, :method => :delete %>
      <% end %>
    </div>
    <div id="main">
      <%= yield %>
    </div>
  </div> 
</body>
</html>
