

%tr#video_file.video_file{:id => video_file.id,:data_thumb => video_file.poster.large.medium.small.thumb.url, :"data-id" => video_file.id, :"data-name" => video_file.title, :"data-description" => video_file.description, :"data-show_url" => admin_video_file_path(:id => video_file.id, :manager => params[:manager], :multiple => params[:multiple]), :"data-edit_url" => edit_admin_video_file_path(:id => video_file.id, :manager => params[:manager], :multiple => params[:multiple]) , :class => ("new" if @video_file_create)}
  
  %td{:style => "width:200px;text-align:center;"}
    -if video_file.image_file
      =image_tag video_file.image_file.file.large.medium.small.thumb.url, :style => "width:250px;"
  %td
    =video_file.title
    =link_to "fr", public_video_file_url(:slug => video_file.lang("fr").slug, :lang => "fr"), :target => "_blank"
    =link_to "en", public_video_file_url(:slug => video_file.lang("en").slug, :lang => "en"), :target => "_blank"
    
    %br
    -if video_file.mpg?
      =video_file.mpg.url
      %br
    -if video_file.ogg?
      =video_file.ogg.url
      %br
    -if video_file.webm?
      =video_file.webm.url
      %br
    
    -if video_file.youtube_code?
      .video-container
        =raw ('<iframe width="560" height="315" src="https://www.youtube.com/embed/'+video_file.youtube_code+'?rel=0" frameborder="0" allowfullscreen></iframe>')
    -if video_file.vimeo_code?
      .video-container
        =raw'<iframe class="vimeo_iframe" style="width:560px;height:316px;" src="https://player.vimeo.com/video/'+video_file.vimeo_code+'?" width="1920" height="1080" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'
        
  %td


  %td{:style => "width:60px;text-align:right;"}

    = link_to i(:"pencil"), edit_admin_video_file_path(video_file), :remote => true
    = link_to i(:"trash-o"), admin_video_file_path(:id => video_file.id, :manager => params[:manager], :multiple => params[:multiple]), :data => {:confirm => 'Voulez-vous vraiment supprimer cette image ?'}, :method => :delete, :remote => true
    = link_to i(:check), "#",:onclick => "manager_send_video_file("+video_file.id.to_s+");return false;" if params[:manager] and !params[:multiple]

