Module: Spree::Billing::NavigationHelperDecorator

Defined in:
app/helpers/spree/billing/navigation_helper_decorator.rb

Instance Method Summary collapse

Instance Method Details

#billing_main_menu_tree(text, icon: nil, sub_menu: nil, url: '#') ⇒ Object



4
5
6
7
8
9
# File 'app/helpers/spree/billing/navigation_helper_decorator.rb', line 4

def billing_main_menu_tree(text, icon: nil, sub_menu: nil, url: '#')
   :li, class: 'sidebar-menu-item d-block w-100 text-muted' do
    main_menu_item(text, url: url, icon: icon) +
      render(partial: "spree/billing/shared/sub_menu/#{sub_menu}")
  end
end

#customer_per_page_dropdownObject



11
12
13
14
15
16
17
18
19
20
21
# File 'app/helpers/spree/billing/navigation_helper_decorator.rb', line 11

def customer_per_page_dropdown
  per_page_default = Spree::Backend::Config.admin_orders_per_page
  per_page_options = %w[24 48 120 200 400 600]

  selected_option = params[:per_page].try(:to_i) || per_page_default

  select_tag(:per_page,
             options_for_select(per_page_options, selected_option),
             class: "w-auto form-control js-per-page-select per-page-selected-#{selected_option} custom-select custom-select-sm"
            )
end