/ TODO / Replace ApplicationName !!! %html

%head
  %title ApplicationName Connector
  = stylesheet_link_tag    'application', media: 'all'
  = javascript_include_tag 'application'
  %script{src: 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js', integrity: 'sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa', crossorigin: 'anonymous'}
  = csrf_meta_tags
%body
  .navbar.navbar-fixed-top.navbar-inverse
    .container-fluid
      .collapse.navbar-collapse#maestrano-navbar-collapse
        %ul.nav.navbar-nav
          =image_tag "logos/default.png", class: 'logo'

        %ul.nav.navbar-nav
          %li=link_to "Status", root_path

          %li=link_to "History", synchronizations_index_path

          -if is_admin
            %li=link_to "Mapping", shared_entities_index_path

        -if current_user
          %ul.nav.navbar-nav.navbar-right
            %li.dropdown
              %a{:href=>"#", :class=>"dropdown-toggle", :'data-toggle'=>"dropdown", :role=>"button"}
                Hi #{current_user.first_name} #{current_user.last_name}

  .padding-navbar

  .wrapper{style: 'margin-bottom: 15px; '}
    - if flash.any?
      - flash.each do |flash_key, message|
        .alert{:class => "alert-#{flash_key}"}
          %strong= flash.discard(flash_key)

    = yield

  .footer
    .container
      .row
        .col-xs-12
          .copyright
            © Copyright #{Time.now.year}. All rights reserved. Various trademarks held by their respective owners.