Sha256: 94e192735611eb95dcc3033446fe108e79db6ec8ef1bc9196f92e8919fb8328e
Contents?: true
Size: 1.04 KB
Versions: 26
Compression:
Stored size: 1.04 KB
Contents
<% # Clients of this partial must supply the following variables: # comment # user %> <% can_edit = comment.can_be_edited_by?(user) can_delete = comment.can_be_deleted_by?(user) %> <% if can_edit %> <%= link_to 'Edit', commontator.edit_comment_path(comment), :id => "comment_#{comment.id.to_s}_edit_link", :class => "comment_edit_link", :remote => true %> <% end %> <% if can_delete %> <% is_deleted = comment.is_deleted? %> <% del_string = is_deleted ? "undelete" : "delete" %> <%= link_to del_string.capitalize, commontator.polymorphic_path([del_string, comment]), :confirm => (!is_deleted ? \ "Are you sure you want to delete this " + \ "#{comment.thread.config.comment_name}?" : nil), :method => :put, :id => "comment_#{comment.id.to_s}_#{del_string}_link", :class => "comment_#{del_string}_link", :remote => true %> <% end %>
Version data entries
26 entries across 25 versions & 1 rubygems