Sha256: 9c7be5fa622971b10f4ae2e463767f792d45058da14f6de5f9778245f64e06a0
Contents?: true
Size: 1.23 KB
Versions: 13
Compression:
Stored size: 1.23 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 = t(:added_note, value: timeago(comment.created_at) ).html_safe - 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
13 entries across 13 versions & 1 rubygems