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

55 lines
1.5 KiB
Plaintext
Raw Normal View History

- title t('.title')
- content_for :submenu do
= render_cell 'locomotive/settings_menu', :show
- content_for :buttons do
= 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)
.box
%h3!= t('.snippets')
.inner
- if @snippets.empty?
%p.no-items!= t('locomotive.snippets.index.no_items', :url => new_snippet_url)
- else
%ul.snippets
= render @snippets
- if can?(:manage, Locomotive::ThemeAsset)
.box
%h3!= t('.css_and_js')
.inner
- if @js_and_css_assets.empty?
%p.no-items!= t('.no_items', :url => new_theme_asset_url)
- else
%ul.js-css
= render :partial => 'asset', :collection => @js_and_css_assets
.box
%h3!= t('.images')
.inner
- if @assets[:images].nil?
%p.no-items!= t('.no_items', :url => new_theme_asset_url)
- else
%ul.images
= render :partial => 'asset', :collection => @assets[:images]
- if can?(:manage, Locomotive::ThemeAsset)
- if @assets[:fonts]
.box
%h3!= t('.fonts')
.inner
%ul.fonts
= render :partial => 'asset', :collection => @assets[:fonts]
- if @assets[:medias]
.box
%h3!= t('.medias')
.inner
%ul.media
= render :partial => 'asset', :collection => @assets[:medias]