!!!
%html
  %head
    %title Tahi
    = stylesheet_link_tag    "application", media: "all", "data-turbolinks-track" => true
    = stylesheet_link_tag "http://fonts.googleapis.com/css?family=Cabin:400,700,400italic"
    = javascript_include_tag "application", "data-turbolinks-track" => true
    = csrf_meta_tags
  %body
    #overlay.reset-z-index

    #nav-bar-container.fixed.bring-front
      %nav#nav-bar
        %header
          = link_to root_path do
            %strong Tahi
            Dashboard
        %section
          %ul
            - if current_user
              - if current_user.admin?
                %li.nav-bar-item= active_link_to 'Flow Manager', flow_manager_path
                %li.nav-bar-item= active_link_to 'Admin', rails_admin_path
              %li.nav-bar-text= link_to 'Sign out', destroy_user_session_path, method: :delete
              %li.nav-bar-text Welcome back, #{current_user.username}

    = yield

    .backdrop.text-center
      = image_tag @task.paper.journal.logo.url
      %h2 Nothing to see here.
      %p.center Take a look at your dashboard for tasks needing your attention.

    :javascript
      $(document).ready(function() {
        $('a:hidden').click();
      });


!!!
%html
  %head
    %title Tahi
    = stylesheet_link_tag    "application", media: "all", "data-turbolinks-track" => true
    = stylesheet_link_tag "http://fonts.googleapis.com/css?family=Cabin:400,700,400italic"
    = javascript_include_tag "application", "data-turbolinks-track" => true
    = csrf_meta_tags
  %body
    #overlay.reset-z-index

    #nav-bar-container.fixed.bring-front
      %nav#nav-bar
        %header
          = link_to root_path do
            %strong Tahi
            Dashboard
        %section
          %ul
            - if current_user
              - if current_user.admin?
                %li.nav-bar-item= active_link_to 'Flow Manager', flow_manager_path
                %li.nav-bar-item= active_link_to 'Admin', rails_admin_path
              %li.nav-bar-text= link_to 'Sign out', destroy_user_session_path, method: :delete
              %li.nav-bar-text Welcome back, #{current_user.username}

    = yield

    .backdrop.text-center
      = image_tag @task.paper.journal.logo.url
      %h2 Nothing to see here.
      %p.center Take a look at your dashboard for tasks needing your attention.

    :javascript
      window.Tahi.currentUser = {id: #{current_user.id}, fullName: "#{current_user.full_name}", imageUrl: "#{current_user.image_url}"};

      $(document).ready(function() {
        $('a:hidden').click();
      });

Add Tahi.currentUser to overlay layout js.
Add Tahi.currentUser to overlay layout js.
