-if video_file.image_file
  -img_url = video_file.image_file.file.large.medium.small.url
-else
  -img_url = ""



-if video_file.public and (video_file.investigation_cat_id? or true) and ( (@lang.slug == "fr" and video_file.fr) or (@lang.slug == "en" and video_file.en) )
  -@count = @count + 1
  -if !@new_site
    =link_to public_video_file_url(:slug => video_file.lang(@lang.slug).slug), :class => "article_search" do
  
      .image{:style => "background-image:url('#{img_url}');"}
  
  
      .description
        %h3 Vidéo

        %h2= video_file.lang(@lang.slug).title
      
     
      .clear

    -if video_file.image_file and video_file.image_file.photograph

      -@page_images_credits << video_file.image_file.photograph
  
  -else
    =link_to public_video_file_url(:slug => video_file.lang(@lang.slug).slug), :class => "article_search" do
  
      .image{:style => "background-image:url('#{img_url}');"}
  
  
      .description

        %h2= video_file.lang(@lang.slug).title
        .desc
          =l video_file.created_at, :format => :date
          %br
          =qit "Vidéo"
          %p
            =video_file.lang(@lang.slug).description.to_s.truncate(120, separator: ' ')
     
      .clear

    -if video_file.image_file and video_file.image_file.photograph

      -@page_images_credits << video_file.image_file.photograph
  