-qi_ordered_table_model = object.class
-qi_ordered_table_name = qi_ordered_table_model.to_s.tableize

-if !@qi_table_orders
  =render :partial => "qi/qi_ordered_table_head", :locals => {:qi_ordered_table_name => qi_ordered_table_name, :qi_ordered_table_model => qi_ordered_table_model}





-@qi_table_orders[qi_ordered_table_name.to_sym].each do |key,value|
  -if tr[:"#{key}"]
    =raw tr[:"#{key}"]
    
  -elsif object.respond_to?("tr_"+key.to_s)
    %td
      =#eval("#{qi_ordered_table_name.singularize}.send('#{key}')")
      =object.send("tr_"+key.to_s)
    
  -elsif object.respond_to?(key.to_s)
    %td
      =#eval("#{qi_ordered_table_name.singularize}.send('#{key}')")
      =object.send(key.to_s)
  
  -else
    %td
      Err :
      =key
