Sha256: e732fcca8ebf3c77b3829ed0efb499c2dbbc835004e51bfaf92a7b00d3ab3796

Contents?: true

Size: 1.52 KB

Versions: 19

Compression:

Stored size: 1.52 KB

Contents

%h1.effective-admin-heading= @page_title

- if defined?(EffectiveRegions)
  .row.effective-admin-actions
    .col-sm-6
      %p
        All menu editing may be done from the fullscreen editor. Just drag and drop menu items.
    .col-sm-6
      %p.text-right
        = link_to "Edit #{@menu}", effective_regions.edit_path('/'), class: 'btn btn-primary', 'data-no-turbolink': true, target: '_blank'

- if defined?(EffectiveRoles)
  %h2 Menu Items

  - if @menu.menu_items.length > 1
    %table.table
      %thead
        %th Menu Item
        %th.text-center Public
        %th.text-center Signed In
        - EffectiveRoles.roles.each do |role|
          %th.text-center= ":#{role}"

      %tbody
        - stack = [@menu.menu_items.first]
        - @menu.menu_items.each_with_index do |menu_item, index|
          - next if index == 0
          - stack.pop while menu_item.rgt > stack.last.rgt if stack.size > 1
          %tr
            %td
              = ("  " * (stack.size-1)).html_safe
              = (menu_item.divider? ? ':divider' : menu_item.title)
            %td.text-center= visible_badge(menu_item, stack, Proc.new { |item| item.roles_mask == nil || item.roles_mask == -1 })
            %td.text-center= visible_badge(menu_item, stack, Proc.new { |item| item.roles_mask == nil || item.roles_mask == 0 })
            - EffectiveRoles.roles.each do |role|
              %td.text-center= visible_badge(menu_item, stack, Proc.new { |item| item.visible_for?(role) })
          - stack.push(menu_item)
  - else
    %p No menu items.

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
effective_pages-1.3.2 app/views/admin/menus/show.html.haml
effective_pages-1.3.1 app/views/admin/menus/show.html.haml
effective_pages-1.3.0 app/views/admin/menus/show.html.haml
effective_pages-1.2.0 app/views/admin/menus/show.html.haml
effective_pages-2.0.6 app/views/admin/menus/show.html.haml
effective_pages-2.0.5 app/views/admin/menus/show.html.haml
effective_pages-2.0.4 app/views/admin/menus/show.html.haml
effective_pages-2.0.3 app/views/admin/menus/show.html.haml
effective_pages-2.0.2 app/views/admin/menus/show.html.haml
effective_pages-2.0.1 app/views/admin/menus/show.html.haml
effective_pages-1.1.9 app/views/admin/menus/show.html.haml
effective_pages-2.0.0 app/views/admin/menus/show.html.haml
effective_pages-1.1.8 app/views/admin/menus/show.html.haml
effective_pages-1.1.7 app/views/admin/menus/show.html.haml
effective_pages-1.1.6 app/views/admin/menus/show.html.haml
effective_pages-1.1.5 app/views/admin/menus/show.html.haml
effective_pages-1.1.4 app/views/admin/menus/show.html.haml
effective_pages-1.1.3 app/views/admin/menus/show.html.haml
effective_pages-1.1.2 app/views/admin/menus/show.html.haml