Module: RushJob::RushJobsHelper
Instance Method Summary
collapse
Methods included from SortHelper
#sort_column, #sort_direction
#current_theme, #editing_enabled?, #invert_theme
Instance Method Details
#sort_arrow(column) ⇒ Object
12
13
14
15
16
17
18
19
20
|
# File 'app/helpers/rush_job/rush_jobs_helper.rb', line 12
def sort_arrow(column)
return unless column == sort_column
if sort_direction == 'desc'
image_tag("rush_job/arrow-down-#{invert_theme}.svg", id: 'rush-job-down-arrow', alt: 'down arrow')
else
image_tag("rush_job/arrow-up-#{invert_theme}.svg", id: 'rush-job-up-arrow', alt: 'up arrow')
end
end
|
#sortable(column) ⇒ Object
7
8
9
10
|
# File 'app/helpers/rush_job/rush_jobs_helper.rb', line 7
def sortable(column)
direction = column == sort_column && sort_direction == 'asc' ? 'desc' : 'asc'
link_to t(column), rush_job.rush_jobs_path({ sort: column, direction: }), class: "link-#{invert_theme}"
end
|