new
This commit is contained in:
parent
b2b74534e4
commit
832a5b427b
@ -2,9 +2,9 @@
|
||||
module IconHelper
|
||||
|
||||
|
||||
def i(name,color=:gray_dark, size=16,options = nil)
|
||||
def i(name,color=:gray_dark, size=16,style = "")
|
||||
|
||||
image_tag(i_path(name,color,size), options)
|
||||
image_tag(i_path(name,color,size), :style => style)
|
||||
end
|
||||
|
||||
def i_path(name,color=:gray_dark, size=16)
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
%h4
|
||||
Portfolios
|
||||
=link_to i(:plus,:white,32, :style => "width:10px;"), new_portfolio_path, :remote => true if current_admin
|
||||
=link_to i(:plus,:white,32, "width:10px;"), new_portfolio_path, :remote => true if current_admin
|
||||
|
||||
%ul.portfolios_links
|
||||
=render Portfolio.order(:title)
|
||||
|
@ -1,6 +1,6 @@
|
||||
%li#portfolio_line{:id => portfolio.id}
|
||||
=link_to portfolio.title, portfolio_path(portfolio.slug, :format => :html)
|
||||
=link_to portfolio.title, public_portfolio_path(portfolio.slug, :format => :html)
|
||||
|
||||
-if current_admin
|
||||
=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
|
||||
=link_to i(:pen_alt_fill,:white,32, "width:10px;"), edit_portfolio_path(:format => "js", :id => portfolio.id), :remote => true
|
||||
=link_to i(:x_alt,:white,32, "width:10px;"), portfolio_path(portfolio, :format => "js"), :method => :delete, :confirm => "Voulez-vous vraiment supprimer ce portfolio ?", :remote => true
|
@ -4,10 +4,12 @@ SitePerso::Application.routes.draw do
|
||||
|
||||
|
||||
match ":id.:format" => 'pages#show', :as => :page, :format => "html"
|
||||
match "portfolio/:id/:page.:format" => 'portfolios#show',:page => "1", :as => :portfolio, :format => "html"
|
||||
|
||||
|
||||
resources :portfolios
|
||||
|
||||
match "portfolio/:id/:page.:format" => 'portfolios#show',:page => "1", :as => :public_portfolio, :format => "html"
|
||||
|
||||
|
||||
|
||||
namespace :admin do
|
||||
|
Loading…
x
Reference in New Issue
Block a user