= admin_inject_currency_config
= render "layouts/i18n_script"

#wrapper{"data-hook" => ""}
  - if flash[:error]
    .flash.error= flash[:error]
  - if notice
    .flash.notice= notice
  - if flash[:success]
    .flash.success= flash[:success]

  #progress
    .wrapper
      #spinner
      .progress-message
        = Spree.t(:loading)
        \...

  %header#header{"data-hook" => ""}
    .container
      %figure.columns.five{"data-hook" => "logo-wrapper"}
        = link_to image_tag(Spree::Config[:admin_interface_logo], :id => 'logo'), spree.admin_dashboard_path
      %nav.columns.eleven{"data-hook" => "admin_login_navigation_bar"}
        = render :partial => 'spree/layouts/admin/login_nav'

  %nav#admin-menu{"data-hook" => ""}
    .container
      .sixteen.columns.main-menu-wrapper
        %ul.inline-menu.fullwidth-menu{"data-hook" => "admin_tabs"}
          = render :partial => 'spree/admin/shared/tabs'

  - if content_for?(:sub_menu)
    %nav#sub-menu{"data-hook" => ""}
      .container
        .sixteen.columns
          = yield :sub_menu

  - if content_for?(:page_title) || content_for?(:page_actions)
    #content-header{"data-hook" => ""}
      .container
        .sixteen.columns
          .block-table
            - if content_for?(:page_title)
              .table-cell
                %h1{:class => "page-title"}= yield :page_title
            - if content_for?(:page_actions)
              .page-actions.table-cell.toolbar{"data-hook" => "toolbar"}
                %ul.inline-menu
                  = yield :page_actions

  .container
    .row
      - content_class = content_for?(:sidebar) ? "with-sidebar" : ""
      #content{:class => content_class, "data-hook" => ""}
        - if content_for?(:table_filter)
          - table_filter_class = content_for?(:sidebar) ? 'twelve columns' : 'sixteen columns'
          #table-filter{:class => table_filter_class, "data-hook" => ""}
            %fieldset
              %legend{:align => "center"}= yield :table_filter_title
              = yield :table_filter
        - div_class = content_for?(:sidebar) ? 'twelve columns' : 'sixteen columns'
        %div{:class => div_class}
          = yield
        - if content_for?(:sidebar)
          %aside#sidebar.four.columns{"data-hook" => ""}
            - if content_for?(:sidebar_title)
              %h5.sidebar-title
                %span= yield :sidebar_title
            = yield :sidebar

%div{"data-hook" => "admin_footer_scripts"}

= render 'spree/shared/google_analytics'

%script
  = raw "Spree.api_key = \"#{try_spree_current_user.try(:spree_api_key).to_s}\";"
