-s_project_module = s_project_module || nil

%tr#s_module_row{:id => s_module.id}
  %td= s_module.serial_nbr
  %td= s_module.s_module_configuration.name if s_module.s_module_configuration
  %td= s_module.s_site.name if s_module.s_site
  
  %td.actions
    -if !@s_project and !params[:s_project_id]
      = link_to i(:"trash-o"), [:admin, s_module], method: :delete, data: { confirm: 'Voulez-vous vraiment supprimer cet enregistrement ? ' } , :remote => true
      = link_to i(:pencil), edit_admin_s_module_path(s_module), :remote => true
      = link_to i(:eye), admin_s_module_path(s_module), :remote => true
    -elsif @s_project
      = link_to i(:"trash-o"), [:admin, s_project_module], method: :delete, data: { confirm: 'Voulez-vous vraiment supprimer cet enregistrement ? ' } , :remote => true
    
    -else
      =link_to "Ajouter au projet >", add_to_project_admin_s_module_path(:id => s_module.id, :s_project_id => params[:s_project_id]), :class => "btn btn-primary"

