Method: CustomTable::ApplicationHelper#tree_opener
- Defined in:
- app/helpers/custom_table/application_helper.rb
#tree_opener(item_id, has_children = false, expanded = false) ⇒ Object
463 464 465 466 467 468 |
# File 'app/helpers/custom_table/application_helper.rb', line 463 def tree_opener item_id, has_children=false, =false content_tag :span, class: "tree-opener #{ ? 'opened' : ''}", data: {action: (has_children ? "click->table#toggle" : ""), "table-css-param": ".child-of-#{item_id}"} do concat content_tag(:span, (has_children ? "▶" : "▷"), class: "closed") concat content_tag(:span, "▼", class: "opened") end end |