2014-04-04 17:54:20 +08:00
|
|
|
module SoftapplicationsHelper
|
2014-04-29 18:21:07 +08:00
|
|
|
def sort_softapplication(state)
|
|
|
|
content = ''.html_safe
|
|
|
|
case state
|
|
|
|
when 0
|
|
|
|
content << content_tag('li', link_to(l(:label_sort_by_time), {controller: 'softapplications', action: 'index' ,:softapplication_sort_type => '1'}))
|
|
|
|
content << content_tag('li', link_to(l(:label_sort_by_active), {controller: 'softapplications', action: 'index' ,:softapplication_sort_type => '0'}, :class=>"selected"), :class=>"selected")
|
|
|
|
|
|
|
|
when 1
|
|
|
|
content << content_tag('li', link_to(l(:label_sort_by_time), {controller: 'softapplications', action: 'index' ,:softapplication_sort_type => '1'}, :class=>"selected"), :class=>"selected")
|
|
|
|
content << content_tag('li', link_to(l(:label_sort_by_active), {controller: 'softapplications', action: 'index' ,:softapplication_sort_type => '0'}))
|
|
|
|
end
|
|
|
|
content = content_tag('ul', content)
|
|
|
|
content_tag('div', content, :class => "tabs")
|
|
|
|
end
|
2014-05-20 15:58:34 +08:00
|
|
|
|
2014-05-22 12:38:30 +08:00
|
|
|
# def select_option_helper option
|
|
|
|
# tmp = Hash.new
|
|
|
|
# option.each do |project|
|
|
|
|
# tmp[project.name] = project.identifier
|
|
|
|
# end
|
|
|
|
# tmp
|
|
|
|
# end
|
2014-05-20 15:58:34 +08:00
|
|
|
|
2014-04-04 17:54:20 +08:00
|
|
|
end
|
2014-04-29 18:21:07 +08:00
|
|
|
|
|
|
|
|