engine/app/views/locomotive/shared/_head.html.haml

33 lines
1.0 KiB
Plaintext
Raw Normal View History

2010-04-24 00:32:36 +00:00
%title= escape_once("#{Locomotive.config.name} — #{current_site.name}")
= csrf_meta_tag
- 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] }
= stylesheet_link_tag 'locomotive', :media => 'screen'
= javascript_include_tag 'locomotive'
2010-04-25 00:33:38 +00:00
/ [if IE]
= stylesheet_link_tag 'locomotive/ie', :media => 'screen'
2010-04-24 00:32:36 +00:00
2010-04-25 00:33:38 +00:00
%script{ :type => 'text/javascript' }
:plain
window.locale = '#{I18n.locale}';
Locomotive.current_site = new Locomotive.Models.Site(#{current_site.to_json});
Locomotive.current_account = new Locomotive.Models.Account(#{current_locomotive_account.to_json});
$(document).ready(function() {
window.application_view = new Locomotive.Views.ApplicationView({
flash: #{flash.to_json},
view: Locomotive.Views.#{controller.controller_name.camelize}.#{controller.action_name.camelize}View
});
window.application_view.render();
});
2010-04-24 00:32:36 +00:00
= yield :head