2011-02-27 11:18:48 +00:00
|
|
|
- title t('.title')
|
|
|
|
|
2011-12-07 01:09:13 +00:00
|
|
|
- content_for :head do
|
|
|
|
= render 'asset'
|
|
|
|
|
|
|
|
= render 'list', :name => 'images', :title => t('.images'), :empty_message => t('.no_items', :url => new_theme_asset_url)
|
|
|
|
= render 'list', :name => 'media', :title => t('.media'), :empty_message => t('.no_items', :url => new_theme_asset_url)
|
|
|
|
|
|
|
|
- if can?(:manage, Locomotive::Snippet)
|
|
|
|
= render '/locomotive/snippets/snippet'
|
|
|
|
= render 'list', :name => 'snippets', :title => t('.snippets'), :empty_message => t('locomotive.snippets.index.no_items', :url => new_snippet_url)
|
|
|
|
|
|
|
|
- if can?(:manage, Locomotive::ThemeAsset)
|
|
|
|
= render 'list', :name => 'js_and_css', :title => t('.css_and_js'), :empty_message => t('.no_items', :url => new_theme_asset_url)
|
|
|
|
= render 'list', :name => 'fonts', :title => t('.fonts'), :empty_message => t('.no_items', :url => new_theme_asset_url)
|
|
|
|
|
2011-12-06 11:39:32 +00:00
|
|
|
- content_for :backbone_view_data do
|
|
|
|
:plain
|
2012-02-07 10:17:56 +00:00
|
|
|
snippets: #{can?(:manage, Locomotive::Snippet) ? @snippets.map { |snippet| snippet.to_presenter.as_json_for_html_view }.to_json : 'null'},
|
2012-03-01 10:07:22 +00:00
|
|
|
images: #{theme_assets_to_json(@assets[:images])},
|
|
|
|
media: #{theme_assets_to_json(@assets[:media])},
|
|
|
|
js_and_css_assets: #{can?(:manage, Locomotive::ThemeAsset) ? theme_assets_to_json(@js_and_css_assets) : 'null'},
|
|
|
|
fonts: #{can?(:manage, Locomotive::ThemeAsset) ? theme_assets_to_json(@assets[:fonts]) : 'null'}
|
2011-12-06 11:39:32 +00:00
|
|
|
|
2011-02-27 11:18:48 +00:00
|
|
|
- content_for :submenu do
|
2011-11-08 00:11:15 +00:00
|
|
|
= render_cell 'locomotive/settings_menu', :show
|
2011-02-27 11:18:48 +00:00
|
|
|
|
|
|
|
- content_for :buttons do
|
2011-12-07 01:09:13 +00:00
|
|
|
- if can?(:manage, Locomotive::ThemeAsset)
|
2012-04-16 09:38:32 +00:00
|
|
|
= form_tag theme_assets_url(:json), :id => 'theme-assets-quick-upload', :class => 'quick-upload', :'data-sending-form-message' => t('locomotive.messages.sending_form') do
|
2011-12-07 11:25:30 +00:00
|
|
|
= file_field_tag 'theme_asset[source]', :multiple => 'multiple'
|
|
|
|
= local_action_button :quick_upload, '#', :class => 'new'
|
|
|
|
|
2011-11-08 14:34:25 +00:00
|
|
|
= local_action_button t('locomotive.snippets.index.new'), new_snippet_url, :class => 'new' if can?(:manage, Locomotive::Snippet)
|
|
|
|
= local_action_button :new, new_theme_asset_url, :class => 'new' if can?(:manage, Locomotive::ThemeAsset)
|
2011-02-27 11:18:48 +00:00
|
|
|
|
|
|
|
%p!= t('.help')
|
|
|
|
|
2011-11-08 14:34:25 +00:00
|
|
|
- if can?(:manage, Locomotive::Snippet)
|
2011-12-06 11:39:32 +00:00
|
|
|
#snippets-anchor
|
|
|
|
|
2011-11-08 14:34:25 +00:00
|
|
|
- if can?(:manage, Locomotive::ThemeAsset)
|
2011-12-07 01:09:13 +00:00
|
|
|
#js-and-css-anchor
|
2011-12-03 00:11:31 +00:00
|
|
|
|
2011-12-07 01:09:13 +00:00
|
|
|
#images-anchor
|
2011-02-27 11:18:48 +00:00
|
|
|
|
2011-11-08 14:34:25 +00:00
|
|
|
- if can?(:manage, Locomotive::ThemeAsset)
|
2011-12-07 01:09:13 +00:00
|
|
|
#fonts-anchor
|
2011-02-27 11:18:48 +00:00
|
|
|
|
2011-12-07 01:09:13 +00:00
|
|
|
#media-anchor
|