molten-trunk/molten5/app/helpers/cases_helper.rb
# Creates a link to sort the results by the specified column.
# No links are created when searching.
Creates a link to sort the results by the specified column.
No links are created when searching.
Creates a link to sort the results by the specified column . No links are created when searching .
def link_to_sort(name,column)
    return name if search?
    if column == @sort
      order = ('ASC' == @order ? 'DESC' : 'ASC')
    else
      order = 'ASC'
    end
    if column == 'account'
      column = 'sfcase.account_id'
    end
    link = link_to(name, params.merge({:sort => column, :order => order}))
    image = build_sort_image(column,order)
    "#{link} #{image}"
  end
def link_to_sort ( name , column ) return name if search? if column == @sort order = ( 'ASC' == @order ? 'DESC' : 'ASC' ) else order = 'ASC' end if column == 'account' column = 'sfcase.account_id' end link = link_to ( name , params . merge ( { :sort => column , :order => order } ) ) image = build_sort_image ( column , order ) "#{link} #{image}" end
Creates a link to sort the results by the specified column.
Creates a link to sort the results by the specified column .
name
column