2018-08-03 01:08:08 +02:00

69 lines
3.3 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

=raw "</div>"
#intro_videos
=link_to public_video_files_path do
=qit "intro-video-new" do
%h2 3P TV
%p
Sur 3P TV, découvrez les images inédites de nos enquêtes et de nos campagnes en France et avec nos partenaires du monde entier !
.investigation_cats
.main_container
%h3= qit "videos-categories", "Catégories"
-InvestigationCat.where(:parent_id => nil).order("position ASC, name DESC").each do |investigation_cat|
-ids = investigation_cat.children.map{|e| e.id}
-ids << investigation_cat.id
-total = VideoFile.where(:investigation_cat_id => ids).recents.lang(@lang.slug).count and total > 3
-if total > 0
=link_to ((@lang.slug == "en" and investigation_cat.english_name?) ? investigation_cat.english_name : investigation_cat.name), public_investigation_cat_path(investigation_cat), :class => ("active" if @investigation_cat and investigation_cat == @investigation_cat)
=raw "<div class='main_container'>"
-if @index
.main_container
%h2=qit "video-a-la-une", "à la une"
-if @lang.slug == "fr"
-@video_file = VideoFile.find_by_id(283) || VideoFile.where(:public => true).order("created_at DESC").first
-else
-@video_file = VideoFile.find_by_id(279) || VideoFile.where(:public => true).order("created_at DESC").first
.main_container
.show_video
.row
.columns.span_8
-if @video_file.image_file
-img_url = @video_file.image_file.file.large.url
-@facebook_img = img_url
-@title = @video_file.lang(@lang.slug).title.to_s
-@video_file.lang(@lang.slug).description? ? @description = @video_file.lang(@lang.slug).description : @description = "Voir la vidéo sur OneVoice.fr"
-if @video_file and @video_file.youtube_code? or @video_file.vimeo_code?
.video_content
.video-container
-if @video_file.youtube_code?
=raw ('<iframe width="560" height="315" src="https://www.youtube.com/embed/'+@video_file.youtube_code+'?rel=0" frameborder="0" allowfullscreen></iframe>')
-else
=raw'<iframe class="vimeo_iframe" src="https://player.vimeo.com/video/'+@video_file.vimeo_code+'?" width="1920" height="1080" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'
.columns.span_4
.video_content
%h2= @video_file.lang(@lang.slug).title if @video_file.lang(@lang.slug).title?
-if @video_file.lang(@lang.slug).description.to_s
.description
=simple_format(auto_link(@video_file.lang(@lang.slug).description, :html => { :target => '_blank' }))
.links
=qit "videos2-share", "Partager :"
=link_to "https://www.facebook.com/sharer/sharer.php?u=#{public_video_file_url(:lang => params[:lang],:slug => @video_file.lang(@lang.slug).slug)}", :target => "_blank", :class => "link facebook" do
=i(:"facebook")
=#text=CSS%20Social%20Media%20Sidebar&
=link_to "https://twitter.com/intent/tweet?url=#{public_video_file_url(:lang => params[:lang],:slug => @video_file.lang(@lang.slug).slug)}&via=onevoiceanimal", :target => "_blank", :class => "link twitter" do
=i(:"twitter")
.clear