.row-fluid
  .span9
    .right= link_to 'Ajouter un newsletter', new_admin_newsletter_path(), :class => "btn btn-primary", :remote => true
    %h1 Liste des newsletters

    #newsletters_index=render :partial => "index_block"
    
  .span3
    %h3 Tags
    =render :partial => "tags"
  

  :coffeescript
    root = exports ? this
    root.tag_id = []
  
  
    $(document.body).on "click", "#tags .tag_label", ->
    
      if $(this).hasClass("active")
        $(this).removeClass "active"  
      
      else
        $(this).addClass "active"
    
      root.tag_id = []
    
      $("#tags .tag_label.active").each ->
        root.tag_id.push $(this).data "tag_id"
      
      if root.tag_id.length > 0
        $(".set_tag").show()
      else
        $(".set_tag").hide()
   
   
    $(document.body).on "click", ".set_tag", ->    
    
      $.ajax({
        url:$(this).attr("href"), 
        type: "PUT",
        data: { 
        tag_id : tag_id
        } 

      })

      return false
  

  
  


