5
6
7
8
9
10
11
12
13
14
15
|
# File 'app/helpers/llm_cost_tracker/sortable_table_helper.rb', line 5
def (label, column, num: false)
state = sortable_state(column, num: num)
classes = ["lct-sortable"]
classes << "lct-num" if num
classes << "lct-sorted" if state[:active]
href = dashboard_filter_path(current_query(sort: column, dir: state[:next_dir], page: nil))
tag.th(class: classes.join(" "), "aria-sort": state[:aria_sort]) do
link_to(href) { safe_join([label, " ", tag.span(state[:arrow], class: "lct-sort-ind")]) }
end
end
|