.links
	=link_to "Créer une newsletter", {:action => :newsletter_new}, :class => "lien" if has_permission?('newsletter.add')

%table.admin_table#newsletters-list

	%tr
		%th Sujet
		%th
		%th
	

	-for u in @newsletter
		- klass = cycle("a","b")
		%tr
			%td
				= truncate(u.title, 70)
			%td
				-  if has_permission?('newsletter.send')
					-form_tag :action => :send_test, :id => u.id do
						= text_field_tag :email
						= submit_tag "Envoyer un email de test", :class => "lien"
			%td.link-column{:style => "width:200px;"}
				= link_to "Editer", { :action => :newsletter_edit, :id => u.id}, :class => "lien"  if has_permission?('newsletter.edit')
				= link_to "Effacer", { :action => :newsletter_del , :id => u.id},  :confirm => 'Voulez-vous vraiment supprimer cette newsletter ?', :class => "lien"  if has_permission?('newsletter.delete')
				= link_to "Envoyer", { :action => :select_recipients, :id => u.id}, :class => "lien" if has_permission?('newsletter.send')
			
				
