engine/app/views/locomotive/theme_assets/index.html.haml

52 lines
2.1 KiB
Plaintext
Raw Normal View History

- 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)
- content_for :backbone_view_data do
:plain
2011-12-07 01:09:13 +00:00
{
snippets: #{can?(:manage, Locomotive::Snippet) ? @snippets.to_json : 'null'},
images: #{@assets[:images].to_json},
media: #{@assets[:media].to_json},
js_and_css_assets: #{can?(:manage, Locomotive::ThemeAsset) ? @js_and_css_assets.to_json : 'null'},
fonts: #{can?(:manage, Locomotive::ThemeAsset) ? @assets[:fonts].to_json : 'null'}
}
- content_for :submenu do
= render_cell 'locomotive/settings_menu', :show
- content_for :buttons do
2011-12-07 01:09:13 +00:00
- if can?(:manage, Locomotive::ThemeAsset)
2011-12-07 11:25:30 +00:00
= form_tag theme_assets_url(:json), :id => 'theme-assets-quick-upload', :class => 'quick-upload' do
= file_field_tag 'theme_asset[source]', :multiple => 'multiple'
= local_action_button :quick_upload, '#', :class => 'new'
= 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)
%p!= t('.help')
- if can?(:manage, Locomotive::Snippet)
#snippets-anchor
- if can?(:manage, Locomotive::ThemeAsset)
2011-12-07 01:09:13 +00:00
#js-and-css-anchor
2011-12-07 01:09:13 +00:00
#images-anchor
- if can?(:manage, Locomotive::ThemeAsset)
2011-12-07 01:09:13 +00:00
#fonts-anchor
2011-12-07 01:09:13 +00:00
#media-anchor