pages statiques
This commit is contained in:
parent
4e3fe13b68
commit
5e6ca7c998
@ -134,6 +134,11 @@ body{
|
||||
margin-left:250px;
|
||||
|
||||
padding:1px 1em;
|
||||
.text{
|
||||
max-width:600px;
|
||||
margin:auto;
|
||||
|
||||
}
|
||||
}
|
||||
#pagination{
|
||||
|
||||
|
@ -2,10 +2,17 @@ class PagesController < ApplicationController
|
||||
|
||||
|
||||
def show
|
||||
@slug = params[:slug] ? params[:slug] : "index"
|
||||
@slug = params[:slug]
|
||||
|
||||
if params[:slug]
|
||||
@page = Page.find_by_slug(params[:slug])
|
||||
|
||||
if @slug
|
||||
@page = Page.find_by_slug(@slug)
|
||||
@err_404 = true if !@page
|
||||
@page = Page.find_by_slug("404") if !@page
|
||||
|
||||
if @err_404
|
||||
render :status => 404
|
||||
end
|
||||
else
|
||||
|
||||
end
|
||||
|
@ -2,9 +2,9 @@
|
||||
module IconHelper
|
||||
|
||||
|
||||
def i(name,color=:gray_dark, size=16)
|
||||
def i(name,color=:gray_dark, size=16,options = nil)
|
||||
|
||||
image_tag(i_path(name,color,size))
|
||||
image_tag(i_path(name,color,size), options)
|
||||
end
|
||||
|
||||
def i_path(name,color=:gray_dark, size=16)
|
||||
|
@ -28,16 +28,18 @@
|
||||
#menu
|
||||
=link_to image_tag("logo.png", :id => "logo"), "/"
|
||||
|
||||
=link_to raw("<h4>A propos</h4>")
|
||||
=link_to raw("<h4>A propos</h4>"), "a-propos.html"
|
||||
|
||||
|
||||
%h4 Portfolios
|
||||
=link_to "nouveau portfolio", new_portfolio_path, :remote => true if current_admin
|
||||
%h4
|
||||
Portfolios
|
||||
=link_to i(:plus,:white,32, :style => "width:10px;"), new_portfolio_path, :remote => true if current_admin
|
||||
|
||||
%ul.portfolios_links
|
||||
=render Portfolio.order(:title)
|
||||
|
||||
=link_to raw("<h4>Contact</h4>")
|
||||
=link_to raw("<h4>Partenaires</h4>"), "partenaires.html"
|
||||
=link_to raw("<h4>Contact</h4>"), "contact.html"
|
||||
|
||||
|
||||
-if @images
|
||||
@ -45,7 +47,8 @@
|
||||
|
||||
=render :partial => "portfolios/pagination"
|
||||
|
||||
#main= yield
|
||||
#main
|
||||
= yield
|
||||
|
||||
-if current_admin
|
||||
#admin_over
|
||||
|
@ -1 +1 @@
|
||||
=markdown @page.markdown_content
|
||||
.text=markdown @page.markdown_content
|
@ -2,5 +2,5 @@
|
||||
=link_to portfolio.title, portfolio.path
|
||||
|
||||
-if current_admin
|
||||
=link_to "m", edit_portfolio_path(portfolio, :format => "js"), :remote => true
|
||||
=link_to "s", portfolio_path(portfolio, :format => "js"), :method => :delete, :confirm => "Voulez-vous vraiment supprimer cette portfolio ?", :remote => true
|
||||
=link_to i(:pen_alt_fill,:white,32, :style => "width:10px;"), edit_portfolio_path(portfolio, :format => "js"), :remote => true
|
||||
=link_to i(:x_alt,:white,32, :style => "width:10px;"), portfolio_path(portfolio, :format => "js"), :method => :delete, :confirm => "Voulez-vous vraiment supprimer cette portfolio ?", :remote => true
|
Loading…
x
Reference in New Issue
Block a user