modif 3
This commit is contained in:
parent
73ef89979b
commit
7a88e9f553
@ -8,7 +8,7 @@ class Public::CommentsController < ApplicationController
|
||||
|
||||
if @comment.save
|
||||
commentable = @comment.commentable
|
||||
|
||||
@comment_id = @comment.id
|
||||
@comment = Comment.new
|
||||
@comment.commentable = commentable
|
||||
|
||||
|
@ -53,7 +53,7 @@
|
||||
|
||||
%footer
|
||||
|
||||
Sauf mention contraire, textes & photos créés par
|
||||
Sauf mentions contraires, textes & photos créés par
|
||||
=link_to "Nicolas Bally", "mailto:info@nicolasbally.com"
|
||||
sous
|
||||
=link_to "license Creative Commons (BY-NC-ND)", "http://creativecommons.org/licenses/by-nc-nd/3.0/fr/", :target => "_blank"
|
||||
|
@ -13,10 +13,20 @@
|
||||
Nicolas Bally
|
||||
|
||||
|
||||
|
||||
%time.updated{:datetime => Time.now, :pubdate => true}
|
||||
publié
|
||||
="le "+l(article.published_at, :format => :human_date)
|
||||
|
||||
%p{:style => "margin-top:1em;"}
|
||||
-if article.comments.count == 0
|
||||
=link_to "Pas de commentaires", article_path(:slug => article.slug, :anchor => "comments")
|
||||
-elsif article.comments.count == 1
|
||||
=link_to "1 commentaire", article_path(:slug => article.slug, :anchor => "comments")
|
||||
-else
|
||||
=link_to "#{article.comments.count} commentaires", article_path(:slug => article.slug, :anchor => "comments")
|
||||
|
||||
|
||||
|
||||
%h1=link_to article.title, article_path(:slug => article.slug), :title => "Blog de Nicolas Bally "+article.title.to_s
|
||||
|
||||
|
@ -16,6 +16,16 @@
|
||||
publié
|
||||
="le "+l(article.published_at, :format => :human_date)
|
||||
|
||||
%p{:style => "margin-top:1em;"}
|
||||
-if article.comments.count == 0
|
||||
=link_to "Pas de commentaires", article_path(:slug => article.slug, :anchor => "comments")
|
||||
-elsif article.comments.count == 1
|
||||
=link_to "1 commentaire", article_path(:slug => article.slug, :anchor => "comments")
|
||||
-else
|
||||
=link_to "#{article.comments.count} commentaires", article_path(:slug => article.slug, :anchor => "comments")
|
||||
|
||||
|
||||
|
||||
|
||||
%h1=link_to article.title, article_path(:slug => article.slug), :title => "blog conseil en image : "+article.title.to_s
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
.comment
|
||||
%aside=gravatar_image_tag(comment.email? ? comment.email : comment.pseudo, :gravatar => {:default => :identicon})
|
||||
.comment#comment{:class => ("author" if comment.email == "info@nicolasbally.com"), :id => comment.id}
|
||||
%aside=gravatar_image_tag(comment.email? ? comment.email : comment.pseudo, :gravatar => {:default => "http://#{HOSTNAME}/assets/front/default_avatar.jpg"})
|
||||
|
||||
|
||||
%p.header
|
||||
=gravatar_image_tag(comment.email? ? comment.email : comment.pseudo, :gravatar => {:default => :identicon})
|
||||
|
||||
Commentaire de
|
||||
%strong
|
||||
|
||||
|
@ -1,3 +1,12 @@
|
||||
$("#comment_form").html("<%= escape_javascript(render(:partial => "form")) %>");
|
||||
|
||||
$("#comments").html("<%= escape_javascript(render(@comment.commentable.comments.recents)) %>");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$(document.body).animate({
|
||||
'scrollTop': ( $("#comment_<%= @comment_id %>").offset().top - 150)
|
||||
}, 700);
|
Loading…
x
Reference in New Issue
Block a user