Class: Plutonium::UI::Table::Base::SortableHeaderCell

Inherits:
Phlexi::Table::Components::SortableHeaderCell
  • Object
show all
Defined in:
lib/plutonium/ui/table/base.rb

Overview

Enhanced sortable header cell with:

  • plain click → replace sort (single column); shift-click → multi-sort
  • direction indicator (↑/↓) with priority badge when multi-sort active
  • ⋯ column menu with Clear sort + disabled placeholders

Instance Method Summary collapse

Instance Method Details

#view_templateObject



74
75
76
77
78
79
80
81
82
83
84
# File 'lib/plutonium/ui/table/base.rb', line 74

def view_template
  if !sort_params
    div(class: themed(:header_cell_content_wrapper)) { plain label_text }
    return
  end

  div(class: themed(:header_cell_sort_wrapper), data: {controller: "table-header"}) do
    render_sort_link
    render_column_menu
  end
end