|
|
|
@ -91,4 +91,25 @@ module UsersHelper
|
|
|
|
|
content_tag('div', content, :class => "pagination")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# added by huang
|
|
|
|
|
def sort_user(state)
|
|
|
|
|
content = ''.html_safe
|
|
|
|
|
case state
|
|
|
|
|
when 0
|
|
|
|
|
content << content_tag('li', link_to(l(:label_sort_by_time), users_path(:user_sort_type => '0'), :class=>"selected"), :class=>"selected")
|
|
|
|
|
content << content_tag('li', link_to(l(:label_sort_by_active), users_path(:user_sort_type => '1')))
|
|
|
|
|
content << content_tag('li', link_to(l(:label_sort_by_influence), users_path(:user_sort_type => '2')))
|
|
|
|
|
when 1
|
|
|
|
|
content << content_tag('li', link_to(l(:label_sort_by_time), users_path(:user_sort_type => '0')))
|
|
|
|
|
content << content_tag('li', link_to(l(:label_sort_by_active), users_path(:user_sort_type => '1'), :class=>"selected"), :class=>"selected")
|
|
|
|
|
content << content_tag('li', link_to(l(:label_sort_by_influence), users_path(:user_sort_type => '2')))
|
|
|
|
|
when 2
|
|
|
|
|
content << content_tag('li', link_to(l(:label_sort_by_time), users_path(:user_sort_type => '0')))
|
|
|
|
|
content << content_tag('li', link_to(l(:label_sort_by_active), users_path(:user_sort_type => '1')))
|
|
|
|
|
content << content_tag('li', link_to(l(:label_sort_by_influence), users_path(:user_sort_type => '2'), :class=>"selected"), :class=>"selected")
|
|
|
|
|
end
|
|
|
|
|
content = content_tag('ul', content)
|
|
|
|
|
content_tag('div', content, :class => "tabs")
|
|
|
|
|
end
|
|
|
|
|
#end
|
|
|
|
|
end
|
|
|
|
|