Sha256: faea3456a2cb56154459373fb075a07cf8e735eacc5d774314e7c8940ee8469e
Contents?: true
Size: 1.26 KB
Versions: 5
Compression:
Stored size: 1.26 KB
Contents
- truncated = simple_format(truncate(comment.comment.gsub("\n", " "), :length => 125)) - formatted = defined?(RedCloth) ? RedCloth.new(comment.comment).to_html : simple_format(comment.comment) - collapsable = formatted.size > 150 - commentable = comment.commentable %li.comment.highlight[comment] .body = link_to avatar_for(comment.user, :size => :small), user_path(comment.user) %ul.tools - if can?(:update, commentable) %li= link_to_edit(comment) - if can?(:destroy, commentable) %li= link_to_delete(comment) = link_to(comment.user.full_name, user_path(comment.user)) + "," %tt added note #{t(:time_ago, distance_of_time_in_words(Time.now, comment.created_at))} - if collapsable && can?(:read, commentable) = " | " = link_to_function(comment.collapsed? ? t(:more) : t(:less), "crm.flip_note_or_email(this, '#{t(:more)}', '#{t(:less)}')", :class => "toggle") - if can?(:read, commentable) - if collapsable %dt{ hidden_if(comment.expanded?), :id => dom_id(comment, :truncated) } = truncated %dt.textile{ hidden_if(comment.collapsed?), :id => dom_id(comment, :formatted) } = sanitize auto_link(formatted) - else %dt.textile= sanitize auto_link(formatted)
Version data entries
5 entries across 5 versions & 1 rubygems