doctype html
html lang="en"
  head
    meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height"
    meta name="msapplication-tap-highlight" content="no"

    title= application_title
    = javascript_include_tag "vendor/modernizr"
    = stylesheet_link_tag "user/foundation/application"
    - if Rails.env.user_app?
      javascript:
        var QMobile, Mozo, Quser;
        var $data_host = 'http://data.mozo.bar';
        var $event_host = '#{Mozo.event_host}';
        var $assets_path = './assets/';
        var $app_version = '#{app_version}';
        var $day_names = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"]
        var $user_feedback_path = 'http://feedback.mozo.bar/user_feedback';
        var Qstorage = window.localStorage;
        Qstorage.setItem('root_url', '##root_url##');
        var $platform = '##platform##';
        var $obtain_token_url = 'http://mozo.bar/user/obtain_token';
        var $log = function(params){$.post('http://log.mozo.bar/user_app', {log: params})};
    - elsif Rails.env.production?
      javascript:
        var QMobile, Mozo, Quser;
        var $data_host = null;
        var $event_host = '#{Mozo.event_host}';
        var $assets_path = '/assets/';
        var $app_version = '#{app_version}';
        var $day_names = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"]
        var $user_feedback_path = 'http://feedback.mozo.bar/user_feedback';
        var Qstorage = window.localStorage;
        #{user_dynamic_data_host};
        #{user_dynamic_root_url};
        #{user_dynamic_obtain_token_url};
        var $platform = 'web'
        var $log = function(params){console.log('App log:'); console.log(params);console.log('=======================================')};
    - else
      javascript:
        var QMobile, Mozo, Quser;
        var $data_host = null;
        var $event_host = '#{Mozo.event_host}';
        var $assets_path = '/assets/';
        var $app_version = '#{app_version}';
        var $day_names = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"]
        var $user_feedback_path = '/user_feedback';
        var Qstorage = window.localStorage;
        #{user_dynamic_data_host};
        #{user_dynamic_root_url};
        #{user_dynamic_obtain_token_url};
        var $platform = 'web'
        var $log = function(params){console.log('App log:'); console.log(params);console.log('=======================================')};
    = javascript_include_tag "user/flat/application"
    - unless Rails.env.user_app?
      javascript:
        window.ember_ready = false
        App.advanceReadiness()
  body
    #ember-app-container
