saut de page articles
This commit is contained in:
parent
bf25544169
commit
137e9b2a78
@ -30,7 +30,7 @@ class Admin::PlumeArticlesController < ApplicationController
|
||||
|
||||
|
||||
def edit
|
||||
|
||||
@admin = true
|
||||
@plume_article = PlumeArticle.find(params[:id])
|
||||
|
||||
|
||||
|
@ -3,6 +3,7 @@ class Portlet::DynamicContentsController < ApplicationController
|
||||
layout "admin"
|
||||
|
||||
def new
|
||||
@admin = true
|
||||
@dynamic_content = DynamicContent.new
|
||||
|
||||
respond_to do |format|
|
||||
@ -16,6 +17,7 @@ class Portlet::DynamicContentsController < ApplicationController
|
||||
end
|
||||
|
||||
def create
|
||||
@admin = true
|
||||
@dynamic_content = DynamicContent.new(params.require(:dynamic_content).permit!)
|
||||
|
||||
respond_to do |format|
|
||||
@ -46,6 +48,7 @@ class Portlet::DynamicContentsController < ApplicationController
|
||||
end
|
||||
|
||||
def edit
|
||||
@admin = true
|
||||
@dynamic_content = DynamicContent.find(params[:id])
|
||||
@portlet = Portlet.find(params[:portlet_id])
|
||||
respond_to do |format|
|
||||
@ -68,6 +71,7 @@ class Portlet::DynamicContentsController < ApplicationController
|
||||
end
|
||||
|
||||
def update
|
||||
@admin = true
|
||||
@dynamic_content = DynamicContent.find(params[:id])
|
||||
@portlet = @dynamic_content.portlet
|
||||
|
||||
@ -93,6 +97,7 @@ class Portlet::DynamicContentsController < ApplicationController
|
||||
end
|
||||
|
||||
def destroy
|
||||
@admin = true
|
||||
@portlet = Portlet.find(params[:portlet_id])
|
||||
@dynamic_content = DynamicContent.find(params[:id])
|
||||
@dynamic_content.destroy
|
||||
|
@ -4,7 +4,7 @@ class DynamicContent < ActiveRecord::Base
|
||||
|
||||
belongs_to :item
|
||||
|
||||
NAMES = {}
|
||||
NAMES = {"saut" => "Saut de page"}
|
||||
|
||||
def self.picto
|
||||
"cog"
|
||||
|
@ -1,12 +1,19 @@
|
||||
%tr#plume_article_row.plume_article_row{:id => plume_article.id}
|
||||
|
||||
%td=plume_article.title
|
||||
%td
|
||||
-if plume_article.article_type == "demi"
|
||||
Demi article
|
||||
-else
|
||||
Article pleine page
|
||||
|
||||
|
||||
%td
|
||||
=link_to "voir", public_plume_article_path(plume_article), :target => "plume_article_#{plume_article.id}"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%td{:style => "width:140px"}
|
||||
|
@ -1,3 +1,4 @@
|
||||
-@public = true
|
||||
!!!
|
||||
|
||||
%html{:lang => "fr", "xml:lang" => "fr", :xmlns => "http://www.w3.org/1999/xhtml"}
|
||||
|
@ -1,3 +1,4 @@
|
||||
-@public = true
|
||||
!!!
|
||||
|
||||
%html{:lang => "fr", "xml:lang" => "fr", :xmlns => "http://www.w3.org/1999/xhtml"}
|
||||
|
18
app/views/portlets/dynamic_contents/_saut.html.haml
Normal file
18
app/views/portlets/dynamic_contents/_saut.html.haml
Normal file
@ -0,0 +1,18 @@
|
||||
-if @plume_article and @print
|
||||
=raw "</div></div></div></div><div class='page'>"
|
||||
.page_header{:style => ""}
|
||||
.right
|
||||
=image_tag "http://lepicvert.org/plume-header.png"
|
||||
%span
|
||||
La Plume
|
||||
="N°#{@plume_article.plume.number}"
|
||||
.left= @plume_article.plume_cat.title
|
||||
.clear
|
||||
|
||||
=raw "<div class='page_inner'><div class='render_block'><div class='row-fluid'>"
|
||||
-elsif @admin
|
||||
%hr
|
||||
Saut de page
|
||||
%hr
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
-@print = true
|
||||
|
||||
%html
|
||||
%head
|
||||
%meta{:charset => "utf-8"}/
|
||||
@ -39,7 +41,7 @@
|
||||
-@plume.plume_cats.order(:position).each do |plume_cat|
|
||||
-if plume_cat.title != "Brèves"
|
||||
-plume_cat.plume_articles.each do |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
|
||||
.page_header
|
||||
.right
|
||||
|
Loading…
x
Reference in New Issue
Block a user