2010-04-24 00:32:36 +00:00
|
|
|
%title= escape_once("#{Locomotive.config.name} — #{current_site.name}")
|
|
|
|
|
|
|
|
= csrf_meta_tag
|
|
|
|
|
2011-11-16 00:39:16 +00:00
|
|
|
- key = Rails.application.config.session_options[:key]
|
|
|
|
|
|
|
|
%meta{ :name => 'key-param', :content => Rails.application.config.session_options[:key] }
|
|
|
|
%meta{ :name => 'key-token', :content => cookies[key] }
|
|
|
|
|
2012-04-06 07:54:54 +00:00
|
|
|
%script{ :type => 'text/javascript' }
|
|
|
|
:plain
|
|
|
|
window.Locomotive = { mounted_on: '#{Locomotive.mounted_on}' };
|
|
|
|
|
2011-11-08 14:34:25 +00:00
|
|
|
= stylesheet_link_tag 'locomotive', :media => 'screen'
|
2011-11-10 01:43:19 +00:00
|
|
|
= javascript_include_tag 'locomotive'
|
2010-04-25 00:33:38 +00:00
|
|
|
|
|
|
|
%script{ :type => 'text/javascript' }
|
2011-11-10 01:43:19 +00:00
|
|
|
:plain
|
2012-02-10 00:42:06 +00:00
|
|
|
window.locale = '#{I18n.locale}';
|
|
|
|
window.content_locale = '#{::Mongoid::Fields::I18n.locale}';
|
2011-11-10 01:43:19 +00:00
|
|
|
|
2012-05-24 17:19:46 +00:00
|
|
|
Locomotive.current_site = new Locomotive.Models.Site(#{j current_site.to_presenter.as_json_for_html_view.to_json.html_safe});
|
|
|
|
Locomotive.current_account = new Locomotive.Models.Account(#{j current_locomotive_account.to_json.html_safe});
|
2011-11-10 01:43:19 +00:00
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
|
|
|
window.application_view = new Locomotive.Views.ApplicationView({
|
2011-11-21 01:27:05 +00:00
|
|
|
flash: #{flash.to_json},
|
|
|
|
view: #{backbone_view_class_name},
|
2012-02-02 15:53:26 +00:00
|
|
|
view_data: { #{backbone_view_data} }
|
2011-11-10 01:43:19 +00:00
|
|
|
});
|
|
|
|
window.application_view.render();
|
|
|
|
|
|
|
|
});
|
2010-04-24 00:32:36 +00:00
|
|
|
|
2012-02-07 14:20:38 +00:00
|
|
|
= yield :head
|
|
|
|
|
2012-04-06 07:54:54 +00:00
|
|
|
= render 'locomotive/shared/main_app_head'
|