added sorting arrow for favorites view
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user