Skip to content

Instantly share code, notes, and snippets.

@jballanc
Created July 6, 2011 00:30
Show Gist options
  • Save jballanc/1066285 to your computer and use it in GitHub Desktop.
Save jballanc/1066285 to your computer and use it in GitHub Desktop.
diff --git a/app/views/comments/_comment.html.haml b/app/views/comments/_comment.html.haml
index 8c98f41..81d5e87 100644
--- a/app/views/comments/_comment.html.haml
+++ b/app/views/comments/_comment.html.haml
@@ -10,10 +10,10 @@
- editor_or_above ||= false
- too_many_comments_for_photos ||= false
-.clearfix.less-headroom.less-legroom.comment{:class => "#{comment.reply_to_id ? 'prepend-2' : ''}"}
+.clearfix.less-headroom.less-legroom.comment{:class => "#{comment.reply_to_id ? 'prepend-2' : ''}", :id => "comment_#{comment.id}"}
- if comment.reply_to_id
.append-1.float-right= image_tag("comments/comment_arrow.png", :class => "comment_arrow")
- .thin_light_gray_solid_border.white-list-element.spacer{:id => "comment_#{comment.id}", :class => "#{comment.suppressed? ? 'suppressed' : ''}"}
+ .thin_light_gray_solid_border.white-list-element.spacer{:class => "#{comment.suppressed? ? 'suppressed' : ''}"}
.main.list-element-base.clearfix
.clearfix
- if comment.deleted?
@@ -38,18 +38,18 @@
%h4.author.green.bottom= link_to_user(comment.user)
%p.timestamp
= link_to(comment.updated_at.to_s(:pnc_comment_datetime), comment_url(comment))
- - if only_excerpt
- %p.excerpt.bottom
- &= excerpt(comment.comment, :limit => 400)
- -# Without the nbsp, IE7 ignores the whitespace
- %span.after
- &nbsp
- = link_to('more ›', comment_url(comment))
- - else
- .body= simple_format(auto_link(h(comment.comment), :all, :target => '_blank'))
- -# you can't reply to excerpted comments
- - if !comment.reply_to_id && !do_not_show_reply
- - if current_user
- = link_to('Reply', '#', :class => 'comment_reply float-right btn no-margin green')
+ - if only_excerpt
+ %p.excerpt.bottom
+ &= excerpt(comment.comment, :limit => 400)
+ -# Without the nbsp, IE7 ignores the whitespace
+ %span.after
+ &nbsp
+ = link_to('more ›', comment_url(comment))
- else
- = link_to_login_popup('Log in to reply', nil, 'float-right btn no-margin green')
+ .body= simple_format(auto_link(h(comment.comment), :all, :target => '_blank'))
+ -# you can't reply to excerpted comments
+ - if !comment.reply_to_id && !do_not_show_reply
+ - if current_user
+ = link_to('Reply', '#', :class => 'comment_reply float-right btn no-margin green')
+ - else
+ = link_to_login_popup('Log in to reply', nil, 'float-right btn no-margin green')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment