engine/app/views/locomotive/public/pages/show_toolbar.html.haml

63 lines
2.3 KiB
Plaintext

!!! XML
!!!
%html{ :xmlns => 'http://www.w3.org/1999/xhtml' }
%head
%title Locomotive
= 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/inline_editor', :media => 'screen'
= javascript_include_tag 'locomotive/inline_editor'
%script{ :type => 'text/javascript' }
:plain
window.locale = '#{I18n.locale}';
window.content_locale = '#{::Mongoid::Fields::I18n.locale}';
Locomotive.mounted_on = '#{Locomotive.mounted_on}';
Locomotive.current_site = new Locomotive.Models.Site(#{j current_site.to_json.html_safe});
Locomotive.current_account = new Locomotive.Models.Account(#{j current_locomotive_account.to_json.html_safe});
$(document).ready(function() {
window.application_view = new Locomotive.Views.InlineEditor.ApplicationView();
window.application_view.render();
});
= render '/locomotive/content_assets/picker'
%body
#page
%iframe{ :src => request.fullpath.gsub('_admin', '_edit'), :scrolling => 'no', :frameborder => '0' }
#toolbar
.background
.inner
%h1{ :class => 'loading', :'data-disabled-status' => t('.statuses.disabled'), :'data-loading-status' => t('.statuses.loading') }= t('.statuses.loading')
.back.col
= link_to image_tag('locomotive/inline_editor/back.png'), '#', :class => 'button back', :title => t('.buttons.back'), :alt => t('.buttons.back')
- if current_site.locales.size > 1
.lang.col
%label= t('.labels.lang')
= render '/locomotive/shared/locale_picker_link'
.editing-mode.col
%label= t('.labels.editing_mode')
= check_box_tag 'edit', '1', false
.element-actions.col{ :style => 'display: none' }
%label= t('.labels.save_changes')
= link_to t('.buttons.confirm'), '#', :class => 'button blue save'
= link_to t('.buttons.cancel'), '#', :class => 'button cancel'
= render_cell 'locomotive/content_locale_picker', :show, :site => current_site, :locale => current_content_locale