jipe_app/app/views/public/video_files/_intro.html.haml
2017-08-14 10:53:30 +02:00

20 lines
878 B
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 Jipe TV
%p
Sur Jipe 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 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 investigation_cat.name, public_investigation_cat_path(investigation_cat), :class => ("active" if @investigation_cat and investigation_cat == @investigation_cat)
=raw "<div class='main_container'>"