-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) or object.respond_to?(key.to_s)
    -if object.respond_to?("tr_"+key.to_s) 
      -v =object.send("tr_"+key.to_s)
    
    -elsif object.respond_to?(key.to_s)
      -v = object.send(key.to_s)
    
  
    -if value.instance_of? Hash and value[:format]
      
      -if value[:format] == :date
        %td=l v, :format => :short_date
      -elsif value[:format] == :boolean
        %td="Oui" if v
      
      -elsif value[:format] == :currency
        %td.numeraire=number_to_currency v
      
      -else
        %td= v
    -else
      %td=v

  -else
    %td
      Err :
      =key
