Remove url from sorting
Add sorting_options to params in filters
This commit is contained in:
1 parent
32faef0c70
commit
63ee8eaca9
6 files changed
+13
-15
No files matched your search
@@ -20,7 +20,7 @@ module OrbitBackendHelper
|
||||
' active' if (@filter[type].include?(id.to_s) rescue nil)
|
||||
end
|
||||
|
||||
def render_sort_bar(url, delete_all, *titles)
|
||||
def render_sort_bar(delete_all, *titles)
|
||||
content_tag :table, :class => "table main-list" do
|
||||
content_tag :thead do
|
||||
content_tag :tr, :class => "sort-header" do
|
||||
@@ -29,14 +29,14 @@ module OrbitBackendHelper
|
||||
link_to content_tag(:i, nil, :class => "icon-trash"), '#', :class => "list-remove"
|
||||
end) if delete_all
|
||||
titles.each do |title|
|
||||
concat render_title(url, title[0], title[1], title[2], title[3])
|
||||
concat render_title(title[0], title[1], title[2], title[3])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def render_title(url, title, fields, span, translation)
|
||||
def render_title(title, fields, span, translation)
|
||||
content_tag :th, :class => "sort #{span} #{is_sort_active?(title)}" do
|
||||
link_to (t(translation) + content_tag(:b, nil, :class => is_sort?(title))).html_safe, url_for({:filter => @filter}.merge(sortable(title).merge(:sort_options => fields))), :class => 'js_history'
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user