Sha256: 6de812120835744c9bb61aa375b85767794fd7c8eb0aeca84a57715ee1e0aabf

Contents?: true

Size: 1.65 KB

Versions: 4

Compression:

Stored size: 1.65 KB

Contents

/= stylesheet_link_tag    "menu", :media => "all"
= render :partial => "mokio/common/notice"

.box.gradient
  .title
    h4
      span= bt("index_title", Mokio::Menu)
      = btn_new( bt("index_add_new", Mokio::Menu), new_url(Mokio::Menu) )

- if @menus.present?
  ol#menusList.sortable
    - @menus.each do |menu, menu_children|
      li id="#menu_#{menu.id}" class="not-sortable" 
        = render :partial => "menu", :locals => {menu: menu}
        ol
          - menu_children.each do |submenu, submenu_children|
            li class="not-sortable" 
              = render :partial => "menu", :locals => {menu: submenu}
              ol= tree_menu(submenu_children, true)
- else
  h3 There are currently no menus.

- cache :menu_legend do
  #legend.well.span4
    label= btc("legend", Mokio::Menu)
    .active_true
      = btc('menu_active_legend', Mokio::Menu)
    .active_false
      = btc('menu_non_active_legend', Mokio::Menu)
    .visible_true
      .menu_name
        = btc('menu_visible_legend', Mokio::Menu)
    .visible_false
      .menu_name
        = btc('menu_non_visible_legend', Mokio::Menu)
    span.warning
      | !
    = '  ' + btc('exclamation_legend', Mokio::Menu)

- content_for :js do
  = javascript_include_tag "backend/menu/jquery.ui.nestedSortable", :async => true

  javascript:
    setTimeout(function(){
      $('.sortable').nestedSortable({
          handle: 'div',
          items: 'li.sortable_true',
          toleranceElement: '> div',
          protectRoot: true,
          update: function(event, ui) {
            $.post("#{Mokio::Engine.routes.url_helpers.root_path}menus/sort", $(this).nestedSortable('serialize'));
          }
      });
    },300);

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mokio-0.0.11 app/views/mokio/menus/index.html.slim
mokio-0.0.10 app/views/mokio/menus/index.html.slim
mokio-0.0.9 app/views/mokio/menus/index.html.slim
mokio-0.0.8 app/views/mokio/menus/index.html.slim