module SoftapplicationsHelper 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 #作品分类下拉框 def work_type_opttion type = [] #work_types = WorksCategory.all WorksCategory.all.each do |work_type| option = [] option << work_type.category option << work_type.category type << option end type end # def select_option_helper option # tmp = Hash.new # option.each do |project| # tmp[project.name] = project.identifier # end # tmp # end end