
.right
  =link_to i(:plus, :icon => false)+" Créer une newsletter", new_newsletter_path, :class => "btn btn-primary"

%h1 Newsletters

%table.admin_table#newsletters-list.table.table-striped

  %tr
    %th Expéditeur
    %th Sujet
    %th
    %th
  

  -for u in @newsletter
  
    %tr
      %td
        =u.email_from
      %td
        = u.title
      
            
            

      %td{:style => "text-align:right;"}
        -  if has_permission?('newsletter.send')
          =form_tag send_test_newsletter_path(u), :style => "display:inline;" do
            .input-append{:style => "display:inline-block;margin:2px;"}
              = text_field_tag :email,"", :class => ""
              = submit_tag "Envoyer un email de test", :class => "btn"
      
      %td{:style => "width:150px;text-align:right;"}
        = link_to i(:trash), u, :method => :delete,  :confirm => 'Voulez-vous vraiment supprimer cette newsletter ?'
        = link_to i(:"envelope-alt"), select_recipients_newsletter_path(u)
        = link_to i(:pencil), edit_newsletter_path(u)
        = link_to i(:"eye-open"), newsletter_path(u), :target => "_blank"
        
        
       
      
        
