%tr#circuit_row{:id => circuit.id}
  -tr = {}
  
  -tr[:description] = capture do
    %td
      =circuit.description.truncate(100)
      
  -tr[:cp] = capture do
    %td
      =d = circuit.cp.to_s[0..1]
      -dep = DepartementFrance.where(:num_dep => d).first
      -if dep and !circuit.circuit_region
        -circuit.circuit_region = CircuitRegion.where(:name => dep.region_name).first
        - circuit.save if circuit.circuit_region
        
        
  -tr[:actions] = capture do
    %td.actions
      = link_to i(:"trash-o"), [:admin, circuit], method: :delete, data: { confirm: 'Voulez-vous vraiment supprimer cet enregistrement ? ' } , :remote => true
      = link_to i(:pencil), edit_admin_circuit_path(circuit), :remote => true
      = #link_to i(:eye), admin_circuit_path(circuit), :remote => true



  =render :partial => "qi/qi_ordered_table_object", :locals => {:tr => tr, :object => circuit}
    
  
  
  