Sha256: 0982f8dbddd654121705fec0dec8dea735d1dc8712565ef99fb4212ff88b67b9
Contents?: true
Size: 1.4 KB
Versions: 6
Compression:
Stored size: 1.4 KB
Contents
= simple_form_for(menu, (EffectivePages.simple_form_options || {}).merge(:url => (menu.persisted? ? effective_pages.admin_menu_path(menu) : effective_pages.admin_menus_path))) do |f| = f.input :title, :hint => "Give this menu a title" %h3 Menu Item Visibility %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) .form-group .col-xs-12 .form-group .pull-right = f.button :submit, 'Save' = link_to 'Cancel', effective_pages.admin_menus_path
Version data entries
6 entries across 6 versions & 1 rubygems