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

33 lines
1.1 KiB
Plaintext
Raw Normal View History

- title t('.title', :type => @content_type.name.capitalize)
- content_for :submenu do
= render 'locomotive/shared/menu/contents'
- content_for :actions do
= render 'locomotive/shared/actions/contents'
- content_for :head do
= include_javascripts :contents
- content_for :buttons do
- if can?(:manage, Locomotive::ContentType)
= local_action_button :edit, edit_content_type_url(@content_type), :class => 'edit'
= local_action_button :new, new_content_url(@content_type.slug), :class => 'new'
- if @content_type.description.present?
%p= @content_type.description
- if @content_type.groupable?
- @contents.each do |group|
%h3= group[:name] || t('.category_noname')
= render 'list', :contents => group[:items]
%br
- else
= render 'list', :contents => @contents
- if can?(:manage, Locomotive::ContentType)
#local-actions-bottom-bar
%p.tleft
= link_to(content_tag(:em, escape_once(' ')) + t('.destroy'), content_type_url(@content_type), :confirm => t('locomotive.messages.confirm'), :method => :delete, :class => 'button small remove')