Sha256: 6da471ae27d65b0651d6bedf3b0bb491926203f83267945f81ed3d74c714650d
Contents?: true
Size: 1.39 KB
Versions: 5
Compression:
Stored size: 1.39 KB
Contents
.card.bg-light .card-body %h2= current_page_title %p You can easily add a column with checkboxes for each row with %code g.action_column \. Normally WiceGrid does not use a form, but its filters work correctly when placed inside a form, so you can use a form to process the selected records while keeping the state of the filters. Another way could be reading the selected checkoxes with the help of a simple javascript. %p By default the checkboxes have name %code "grid_name[selected][]" , but you can change %code selected to something else with parameter %code param_name: 'my-parameter-name' %p The value of the checkox is the id by default, but you can change it with parameter %code object_property: 'some_object_property' \. %p %code select_all_buttons: false hides the "(de)select all" icons, and %code html: {class: 'my_class'} changes the css class of the checkboxes. = show_code = dump_filter_parameters_as_hidden_fields(@tasks_grid) = form_for '#', method: :get do - if @selected .card.bg-light .card-body Selected tasks: = @selected.to_sentence .row .col-md-12 %p %button.btn.btn-default{'type' => 'submit'} Process tasks = render 'grid' %p %button.btn.btn-default{'type' => 'submit'} Process tasks
Version data entries
5 entries across 5 versions & 1 rubygems