added sorting arrow for favorites view

This commit is contained in:
Pfingstfrosch
2020-05-31 16:45:22 +02:00
parent cfcbf5acdb
commit ad85619ccc
7 changed files with 27 additions and 33 deletions
+11
View File
@@ -3,4 +3,15 @@ module FavoritesHelper
direction = column == sort_column && sort_direction == 'asc' ? 'desc' : 'asc'
link_to title, :sort => column, :direction => direction
end
def sorting_arrow(column)
if sort_column == column
direction = column == sort_column && sort_direction == 'asc' ? 'desc' : 'asc'
if direction == 'asc'
image_tag 'up.png'
else
image_tag 'down.png'
end
end
end
end