testimonies
This commit is contained in:
parent
82ad1e2ab0
commit
44a3a33a09
@ -340,3 +340,34 @@ ul, ol{
|
||||
padding: 0;
|
||||
margin: 0 0 10px 25px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#testimony_index{
|
||||
|
||||
.testimony{
|
||||
|
||||
padding:1px;
|
||||
clear:both;
|
||||
img{
|
||||
float:left;
|
||||
width:150px;
|
||||
|
||||
margin-bottom:1em;
|
||||
margin-right:1em;
|
||||
}
|
||||
margin:1em 0;
|
||||
margin-bottom:3em;
|
||||
blockquote{
|
||||
margin-top:30px;
|
||||
a{
|
||||
color:black;}
|
||||
margin-bottom:0.5em;
|
||||
}
|
||||
|
||||
.author{
|
||||
text-align:right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,5 +25,10 @@ class Public::TestimoniesController < ApplicationController
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
def index
|
||||
@testimonies = Testimony.all
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -58,7 +58,9 @@
|
||||
=image_tag("front/right.png", :class => "next-testimony")
|
||||
|
||||
.author=link_to testimony.author, testimony_path(:slug => testimony.id.to_s+"-"+testimony.author.to_slug)
|
||||
|
||||
%br
|
||||
%br
|
||||
%div{:style => "text-align:right;"}=link_to "Tous les témoignages", testimonies_path
|
||||
|
||||
|
||||
:coffeescript
|
||||
|
@ -1,6 +1,7 @@
|
||||
#testimony_header
|
||||
=link_to image_tag(testimony.image_file.image.url(:square)), testimony_link(testimony) if testimony.image_file
|
||||
.quote
|
||||
=link_to testimony.quote, testimony_link(testimony)
|
||||
.testimony
|
||||
=link_to image_tag(testimony.image_file.file.square.url()), testimony_path(testimony) if testimony.image_file
|
||||
%blockquote
|
||||
=link_to testimony.quote, testimony_path(testimony)
|
||||
|
||||
.author=link_to testimony.author, testimony_link(testimony)
|
||||
.author=link_to testimony.author+" - lire la suite >", testimony_path(testimony)
|
||||
.clear{:style => "clear:both;"}
|
||||
|
4
app/views/public/testimonies/index.haml
Normal file
4
app/views/public/testimonies/index.haml
Normal file
@ -0,0 +1,4 @@
|
||||
#testimony_index
|
||||
|
||||
%h1 Témoignages
|
||||
=render @testimonies
|
@ -18,7 +18,7 @@ CMSnb::Application.routes.draw do
|
||||
|
||||
get 'rubriques/:id.html' => "public/portfolios#show", :as => "public_portfolio"
|
||||
get 'vos-temoignages/:slug.:f' => 'public/testimonies#show', :as => :testimony, :f => "html"
|
||||
|
||||
get 'vos-temoignages.:f' => 'public/testimonies#index', :as => :testimonies, :f => "html"
|
||||
namespace :student do
|
||||
root :to => "topics#index", :id => 1
|
||||
resources :student_topics
|
||||
|
Loading…
x
Reference in New Issue
Block a user