70 lines
1.9 KiB
Plaintext
70 lines
1.9 KiB
Plaintext
-if @data_file.image_file
|
|
-img_url = @data_file.image_file.file.large.url
|
|
-@facebook_img = @data_file.image_file.file.large.medium.url
|
|
|
|
|
|
-if @data_file.title?
|
|
-@title = @data_file.title
|
|
.menu_item_title
|
|
%h1
|
|
=@data_file.title
|
|
|
|
|
|
-if @data_file.description?
|
|
-@title = @data_file.description
|
|
|
|
=raw(@data_file.yumpu_content)
|
|
|
|
%p{:style => "text-align:center;"}
|
|
Vous pouvez aussi
|
|
=link_to @data_file.file.url do
|
|
|
|
télécharger ce PDF
|
|
=ic :"arrow-down"
|
|
|
|
|
|
-@file_menu_items = []
|
|
-@file_articles = []
|
|
-@data_file.download_contents.each do |dc|
|
|
|
|
- if dc.portlet and dc.portlet.blockable_parent
|
|
|
|
-if dc.portlet.blockable_parent.class.to_s == "Page" and dc.portlet.blockable_parent.menu_item
|
|
-@file_menu_items << dc.portlet.blockable_parent.menu_item.id
|
|
-elsif dc.portlet.blockable_parent.class.to_s == "Article"
|
|
-@file_articles << dc.portlet.blockable_parent.id
|
|
|
|
|
|
-@menu_items_links = []
|
|
-@file_menu_items = MenuItem.where(:id => @file_menu_items).each do |menu_item|
|
|
-if menu_item_link(menu_item)
|
|
-@menu_items_links << menu_item_link(menu_item)
|
|
|
|
|
|
-@articles_links = []
|
|
-@file_articles = Article.before(Date.today).recents.joins(:lang_articles).where("lang_articles.enabled = 1 and lang_articles.lang_site_id = 1").where(:id => @file_articles).each do |article|
|
|
-lang_article = article.lang_articles.find_by_lang_site_id(@lang.id)
|
|
|
|
-@articles_links << link_to(lang_article.title, article_path(:slug => lang_article.slug, :lang => lang_article.lang_site.slug))
|
|
|
|
|
|
-if @menu_items_links.size > 0
|
|
.center
|
|
%p
|
|
%strong Pages contenant ce document :
|
|
%ul
|
|
-@menu_items_links.each do |link|
|
|
%li=raw link
|
|
%br
|
|
%br
|
|
|
|
-if @articles_links.size > 0
|
|
.center
|
|
%p
|
|
%strong Articles contenant ce document :
|
|
%ul
|
|
-@articles_links.each do |link|
|
|
%li=raw link
|
|
%br
|
|
%br
|
|
|