Compare commits
2 Commits
65a9893f0e
...
94ae0f4e7e
Author | SHA1 | Date | |
---|---|---|---|
|
94ae0f4e7e | ||
|
db35804629 |
@ -6,10 +6,34 @@ $beige:#F1F0EE;
|
|||||||
@import "qi_css/grid";
|
@import "qi_css/grid";
|
||||||
img{
|
img{
|
||||||
opacity:1;
|
opacity:1;
|
||||||
|
position:relative;
|
||||||
|
z-index:100;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#mentions{
|
||||||
|
background:$beige;
|
||||||
|
color:$marron;
|
||||||
|
position:absolute;
|
||||||
|
bottom:0;
|
||||||
|
left:0;
|
||||||
|
right:0;
|
||||||
|
padding:15px 30px;
|
||||||
|
margin-top:10px;
|
||||||
|
padding-bottom:25px;
|
||||||
|
|
||||||
|
.legals{
|
||||||
|
text-style:italic;
|
||||||
|
font-size:0.9em;
|
||||||
|
|
||||||
|
}
|
||||||
|
font-size:0.9em;
|
||||||
|
p{margin-top:0;
|
||||||
|
margin-bottom:4px;}
|
||||||
|
}
|
||||||
#couv{
|
#couv{
|
||||||
height:685px;
|
height:685px;
|
||||||
|
|
||||||
@ -162,6 +186,7 @@ html{
|
|||||||
display: block;
|
display: block;
|
||||||
clear: both;
|
clear: both;
|
||||||
width:788px;
|
width:788px;
|
||||||
|
margin:auto;
|
||||||
position:relative;
|
position:relative;
|
||||||
min-height: 295mm;
|
min-height: 295mm;
|
||||||
page-break-after: always;
|
page-break-after: always;
|
||||||
@ -228,28 +253,32 @@ html{
|
|||||||
|
|
||||||
.sommaire{
|
.sommaire{
|
||||||
float:left;
|
float:left;
|
||||||
width:30%;
|
width:295px;
|
||||||
text-align:left;
|
text-align:left;
|
||||||
|
margin-left:40px;
|
||||||
.sommaire_panel{
|
.sommaire_panel{
|
||||||
background:$marron;
|
background:$marron;
|
||||||
padding:20px;
|
padding:10px;
|
||||||
.content{
|
.content{
|
||||||
padding:10px 20px;
|
padding:8px 16px;
|
||||||
border:dashed 1px white;
|
border:dashed 1px white;
|
||||||
h2{
|
h2{
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
color:white;
|
color:white;
|
||||||
font-size:40px;
|
font-size:28px;
|
||||||
|
margin-bottom:10px;
|
||||||
|
|
||||||
text-align:center;
|
text-align:center;
|
||||||
text-transform:uppercase;
|
text-transform:uppercase;
|
||||||
margin-top:0;
|
margin-top:0;
|
||||||
padding-top:0;
|
padding-top:0;
|
||||||
|
padding-top:5px;
|
||||||
}
|
}
|
||||||
h3{
|
h3{
|
||||||
text-transform:uppercase;
|
text-transform:uppercase;
|
||||||
margin:0;
|
margin:0;
|
||||||
padding:0;
|
padding:0;
|
||||||
|
font-size:18px;
|
||||||
margin-top:10px;
|
margin-top:10px;
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
color:white;
|
color:white;
|
||||||
@ -258,7 +287,7 @@ html{
|
|||||||
a{
|
a{
|
||||||
display:block;
|
display:block;
|
||||||
color:black;
|
color:black;
|
||||||
font-size:18px;
|
font-size:15px;
|
||||||
&:hover{
|
&:hover{
|
||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
}
|
}
|
||||||
@ -404,4 +433,15 @@ h1,h2,h3,h4{
|
|||||||
text-align:left;
|
text-align:left;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#edito_place{
|
||||||
|
padding-top:20px;
|
||||||
|
margin-left:305px;
|
||||||
|
.left{
|
||||||
|
text-transform:uppercase;
|
||||||
|
font-size:25px;
|
||||||
|
color:$marron;
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
}
|
}
|
@ -195,6 +195,7 @@ $vert:#7BAE53;
|
|||||||
font-size:30px;
|
font-size:30px;
|
||||||
margin-top:15px;
|
margin-top:15px;
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
|
line-height:1em;
|
||||||
}
|
}
|
||||||
h2{
|
h2{
|
||||||
font-size:20px;
|
font-size:20px;
|
||||||
@ -234,4 +235,17 @@ $vert:#7BAE53;
|
|||||||
background:center center no-repeat;
|
background:center center no-repeat;
|
||||||
background-size:100%;
|
background-size:100%;
|
||||||
background-size:cover;
|
background-size:cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.plume_right_buttons{
|
||||||
|
margin-top:50px;
|
||||||
|
text-align:right;
|
||||||
|
.btn{
|
||||||
|
background:$vert;
|
||||||
|
color:white;
|
||||||
|
font-weight:bold;
|
||||||
|
padding:10px 20px;
|
||||||
|
text-transform:uppercase;
|
||||||
|
border-radius:0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -53,8 +53,13 @@ class Public::PlumesController < ApplicationController
|
|||||||
layout: false,
|
layout: false,
|
||||||
#page_size: 'A4',
|
#page_size: 'A4',
|
||||||
zoom: 1,
|
zoom: 1,
|
||||||
|
|
||||||
|
#page_width: 300,
|
||||||
|
#page_height:320,
|
||||||
|
|
||||||
page_width: 210,
|
page_width: 210,
|
||||||
page_height:297,
|
page_height:297,
|
||||||
|
|
||||||
viewport_size: '800x600',
|
viewport_size: '800x600',
|
||||||
|
|
||||||
template: "public/plumes/print.html.haml" ,
|
template: "public/plumes/print.html.haml" ,
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
class Plume < ActiveRecord::Base
|
class Plume < ActiveRecord::Base
|
||||||
belongs_to :image_file
|
belongs_to :image_file
|
||||||
|
|
||||||
|
belongs_to :data_file
|
||||||
|
|
||||||
|
belongs_to :couv_image_file, :class_name => "ImageFile"
|
||||||
|
|
||||||
|
|
||||||
has_many :plume_cats
|
has_many :plume_cats
|
||||||
|
|
||||||
has_many :plume_articles, :through => :plume_cats
|
has_many :plume_articles, :through => :plume_cats
|
||||||
|
@ -8,9 +8,40 @@
|
|||||||
= form.input :number, :label => "Numéro plume :"
|
= form.input :number, :label => "Numéro plume :"
|
||||||
= form.input :p_version, :label => "Ligne 'version' :"
|
= form.input :p_version, :label => "Ligne 'version' :"
|
||||||
= form.input :image_file_id, :as => :qi_image_select
|
= form.input :image_file_id, :as => :qi_image_select
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
= form.input :credits, :label => "Crédit photo couverture :"
|
= form.input :credits, :label => "Crédit photo couverture :"
|
||||||
= form.input :redaction_credits, :label => "Crédits rédac & relecture :"
|
= form.input :redaction_credits, :label => "Crédits rédac & relecture :"
|
||||||
|
|
||||||
|
%hr
|
||||||
|
|
||||||
|
|
||||||
|
%p
|
||||||
|
%strong
|
||||||
|
Infos PDF
|
||||||
|
|
||||||
|
= form.input :couv_image_file_id, :as => :qi_image_select
|
||||||
|
%p
|
||||||
|
%table.form_table
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%tr
|
||||||
|
%td{:style => "vertical-align:top;padding-right:10px;"}
|
||||||
|
-r = rand(1000000000000000000000000000)
|
||||||
|
%strong Fichier associé :
|
||||||
|
%td
|
||||||
|
#name{:id => r}
|
||||||
|
-if form.object.data_file
|
||||||
|
=form.object.data_file.abstract_file_name if form.object.data_file
|
||||||
|
=link_to "Supprimer", "#", :onclick => "$('#input_"+r.to_s+"').val('');$('#name_"+r.to_s+"').html('');return false;"
|
||||||
|
|
||||||
|
=form.hidden_field :data_file_id, :id => "input_"+r.to_s
|
||||||
|
|
||||||
|
=link_to "Modifier ce fichier", "#", :onclick => "select_file_from_manager('"+r.to_s+"');return false;"
|
||||||
|
|
||||||
|
%hr
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,8 +10,10 @@
|
|||||||
-plume_cat.plume_articles.each do |plume_article|
|
-plume_cat.plume_articles.each do |plume_article|
|
||||||
=link_to plume_article.title, public_plume_article_path(plume_article)
|
=link_to plume_article.title, public_plume_article_path(plume_article)
|
||||||
|
|
||||||
=link_to agenda_public_plume_path(@plume) do
|
|
||||||
%h3 Agenda
|
|
||||||
=link_to breves_public_plume_path(@plume) do
|
=link_to breves_public_plume_path(@plume) do
|
||||||
%h3 Brèves
|
%h3 Brèves
|
||||||
|
|
||||||
|
=link_to agenda_public_plume_path(@plume) do
|
||||||
|
%h3 Agenda
|
||||||
|
|
@ -13,12 +13,17 @@
|
|||||||
-@breve_cat = @plume.plume_cats.where(:title => "Brèves").first
|
-@breve_cat = @plume.plume_cats.where(:title => "Brèves").first
|
||||||
-if @breve_cat
|
-if @breve_cat
|
||||||
|
|
||||||
-@breve_cat.plume_articles.each do |plume_article|
|
-@breve_cat.plume_articles.order(:position).each do |plume_article|
|
||||||
.plume_breve
|
-if !plume_article.breakpage
|
||||||
%h2=plume_article.title
|
.plume_breve
|
||||||
|
%h2=plume_article.title
|
||||||
|
|
||||||
.render_block
|
.render_block
|
||||||
=render plume_article.block
|
=render plume_article.block
|
||||||
|
|
||||||
|
-if plume_article.author?
|
||||||
|
.author
|
||||||
|
=plume_article.author
|
||||||
|
|
||||||
|
|
||||||
.clear
|
.clear
|
||||||
|
@ -56,10 +56,62 @@
|
|||||||
%br
|
%br
|
||||||
04 76 91 34 33 - contact@lepicvert.asso.fr - www.lepicvert.org
|
04 76 91 34 33 - contact@lepicvert.asso.fr - www.lepicvert.org
|
||||||
|
|
||||||
|
.page
|
||||||
|
-plume_article = @plume.plume_articles.where(:plume_cat_id => (@plume.plume_cats.where(:title => "Edito").first.id if @plume.plume_cats.where(:title => "Edito").first)).first
|
||||||
|
-if plume_article
|
||||||
|
-@plume_article = plume_article
|
||||||
|
|
||||||
|
-if plume_article.article_type == "page" or (plume_article.article_type == "demi") and plume_article.plume_cat
|
||||||
|
.page_header{:style => "background:transparent;"}
|
||||||
|
.right
|
||||||
|
=image_tag "http://lepicvert.org/plume-header2.png"
|
||||||
|
%span
|
||||||
|
La Plume
|
||||||
|
="N°#{@plume.number}"
|
||||||
|
|
||||||
|
.clear
|
||||||
|
|
||||||
|
|
||||||
|
.sommaire{:style => ("margin-top:20px" if @plume.id == 3)}
|
||||||
|
=render :partial => "sommaire"
|
||||||
|
|
||||||
|
#edito_place
|
||||||
|
|
||||||
|
.page_inner{:style => ("padding-top:0" )}
|
||||||
|
.left= plume_article.plume_cat.title
|
||||||
|
|
||||||
|
%h1{:style => ("font-size:15px;" if @plume.id == 3)}=plume_article.title
|
||||||
|
|
||||||
|
.render_block{:style => ("font-size:12.6px;" if @plume.id == 3)}
|
||||||
|
=render plume_article.block
|
||||||
|
|
||||||
|
-if plume_article.author?
|
||||||
|
.author
|
||||||
|
=plume_article.author
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.clear
|
||||||
|
|
||||||
|
#mentions
|
||||||
|
%p.big
|
||||||
|
%strong Comité de rédaction et de relecture :
|
||||||
|
%p
|
||||||
|
=@plume.redaction_credits
|
||||||
|
|
||||||
|
%p
|
||||||
|
%strong Crédit photo couverture :
|
||||||
|
=@plume.credits
|
||||||
|
|
||||||
|
.legals
|
||||||
|
Imprimé sur papier 100% recyclé - Imprimerie Ruzzin
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.page
|
.page
|
||||||
-i = 0
|
-i = 0
|
||||||
-@plume.plume_cats.order(:position).each do |plume_cat|
|
-@plume.plume_cats.order(:position).each do |plume_cat|
|
||||||
-if plume_cat.title != "Brèves"
|
-if plume_cat.title != "Brèves" and plume_cat.title != "Edito"
|
||||||
-plume_cat.plume_articles.order("position").each do |plume_article|
|
-plume_cat.plume_articles.order("position").each do |plume_article|
|
||||||
-@plume_article = plume_article
|
-@plume_article = plume_article
|
||||||
-if plume_article.article_type == "page" or (plume_article.article_type == "demi" and i ==0) and plume_article.plume_cat
|
-if plume_article.article_type == "page" or (plume_article.article_type == "demi" and i ==0) and plume_article.plume_cat
|
||||||
@ -130,6 +182,7 @@
|
|||||||
-if plume_article.author?
|
-if plume_article.author?
|
||||||
.author
|
.author
|
||||||
=plume_article.author
|
=plume_article.author
|
||||||
|
.clear
|
||||||
|
|
||||||
=image_tag "http://lepicvert.org/adhesion.png", :style => "width:108%;margin-top:50px;margin-left:-4%;max-width:10000%;"
|
=image_tag "http://lepicvert.org/adhesion.png", :style => "width:108%;margin-top:50px;margin-left:-4%;max-width:10000%;"
|
||||||
|
|
||||||
|
@ -50,6 +50,12 @@
|
|||||||
=article.description
|
=article.description
|
||||||
.clear
|
.clear
|
||||||
|
|
||||||
|
.plume_right_buttons
|
||||||
|
-if @plume.data_file
|
||||||
|
=link_to "Télécharger la version PDF", @plume.data_file.file.path, :target => "plume_pdf_#{plume.id}", :class => "btn"
|
||||||
|
-else
|
||||||
|
=link_to "Télécharger la version PDF", print_public_plume_path(@plume, :format => "pdf"), :target => "plume_pdf_#{@plume.id}", :class => "btn"
|
||||||
|
|
||||||
.clear
|
.clear
|
||||||
|
|
||||||
.plume_bottom
|
.plume_bottom
|
||||||
|
5
db/migrate/20180528150643_add_data_file_id_to_plumes.rb
Normal file
5
db/migrate/20180528150643_add_data_file_id_to_plumes.rb
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
class AddDataFileIdToPlumes < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :plumes, :data_file_id, :integer
|
||||||
|
end
|
||||||
|
end
|
@ -11,7 +11,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20180329135016) do
|
ActiveRecord::Schema.define(version: 20180528150643) do
|
||||||
|
|
||||||
create_table "admins", force: true do |t|
|
create_table "admins", force: true do |t|
|
||||||
t.string "email", default: "", null: false
|
t.string "email", default: "", null: false
|
||||||
@ -727,6 +727,7 @@ ActiveRecord::Schema.define(version: 20180329135016) do
|
|||||||
t.datetime "enabled_at"
|
t.datetime "enabled_at"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
|
t.integer "data_file_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "portlets", force: true do |t|
|
create_table "portlets", force: true do |t|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user