%= stylesheet_link_tag "application", media: "all",
"data-turbolinks-track" => true %>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<%= csrf_meta_tags %>
<%= 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').hide()" %>
<% end %>
<%= image_tag("logo.png") %>
<%= @page_title || t('.title') %>
<% if @cart %>
<%= hidden_div_if(@cart.line_items.empty?, id: 'cart') do %>
<%= render @cart %>
<% end %>
<% end %>
<% if session[:user_id] %>
- <%= link_to 'Orders', orders_path %>
- <%= link_to 'Products', products_path %>
- <%= link_to 'Users', users_path %>
<%= button_to 'Logout', logout_path, method: :delete %>
<% end %>
<%= yield %>