Module: Adminterface::Extensions::BatchActions::ResourceSelectionToggleCell

Defined in:
lib/adminterface/extensions/batch_actions/views/selection_cells.rb

Instance Method Summary collapse

Instance Method Details

#build(label_text = "") ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/adminterface/extensions/batch_actions/views/selection_cells.rb', line 5

def build(label_text = "")
  if label_text.present?
    div class: "form-check" do
      input_html
      label label_text, class: "form-check-label"
    end
  else
    input_html
  end
end

#input_htmlObject



16
17
18
19
# File 'lib/adminterface/extensions/batch_actions/views/selection_cells.rb', line 16

def input_html
  input type: "checkbox", id: "collection_selection_toggle_all",
        name: "collection_selection_toggle_all", class: "toggle_all form-check-input"
end