app/views/para/admin/shared/_navigation.html.haml in para-0.4.0 vs app/views/para/admin/shared/_navigation.html.haml in para-0.5.0

- old
+ new

@@ -3,18 +3,20 @@ = link_to admin_path do = t('para.admin.title') - if @component_sections.any? - @component_sections.each do |component_section| + - next unless component_section.components.any? { |component| can?(:manage, component) } + %li.component-section-item = link_to "#", class: 'component-section-title' do = component_section.name %ul.component-section-list-items - component_section.components.each do |component| - - active = request.fullpath.split('/')[3] == component.slug - %li.component-item{ class: active && 'active' } - = link_to component.name, component.path + - if can? :manage, component + %li.component-item{ class: (@component == component) && 'active' } + = link_to component.name, component.path - else %li.component-section-item .component-section-title = t('para.component.none_created')