pic_vert_app/app/views/public/plumes/print.html.haml
Nicolas Bally beb3b4c63f suite
2018-03-21 01:20:02 +01:00

66 lines
1.9 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

!!!
%html
%head
%meta{:charset => "utf-8"}/
=# wicked_pdf_javascript_include_tag "number_pages"
= stylesheet_link_tag 'plume_print'
%body{:onload => "number_pages"}
.page
#plume_header
=image_tag "http://lepicvert.org/plume-logo.png", :class => "plume_logo"
.baseline
Bulletin indépendant des lobbies, dun électorat, consacré à lintérêt général et super intéressant !
.hr
.page
-i = 0
-@plume.plume_cats.order(:position).each do |plume_cat|
-if plume_cat.title != "Brèves"
-plume_cat.plume_articles.each do |plume_article|
=debug plume_article.article_type
=debug i
-if plume_article.article_type == "page" and i == 1
-i = 0
=raw "</div><div class='page'>"
-if plume_article.plume_cat
.plume_cat= plume_article.plume_cat.title
%h1=plume_article.title
.render_block
=render plume_article.block
-if plume_article.article_type == "page"
-i = 0
=raw "</div><div class='page'>"
-else
-i += 1
-if i == 2
-i = 0
=raw "</div><div class='page'>"
.page
-@plume.plume_events.each do |plume_event|
.plume_event
%h2=plume_event.title
.date
=raw event_human_date(plume_event)
.desc
=plume_event.description
.page
-@breve_cat = @plume.plume_cats.where(:title => "Brèves").first
-if @breve_cat
-@breve_cat.plume_articles.each do |plume_article|
.plume_breve
%h2=plume_article.title
.render_block
=render plume_article.block
%div{:style => "width:100px;height:100px;background:red;position:fixed;top:0;right:0;"}