Sha256: 8d2771f09e25759c7d155ec7a2cccbe1c9c57229d58913c5553c5b0275b73a3c

Contents?: true

Size: 1.1 KB

Versions: 3

Compression:

Stored size: 1.1 KB

Contents

<% # Clients of this partial must supply the following variables:
   # comment
%>

<% can_edit = comment.can_be_edited_by?(@commontator)
   can_delete = comment.can_be_deleted_by?(@commontator) %>

<% if can_edit %>
  <%= link_to 'Edit', edit_comment_path(comment),
                      :id => "edit_comment_#{comment.id.to_s}_link",
                      :class => "edit_comment_link",
                      :remote => true %>
<% end %>

&nbsp;

<% if can_delete %>
  <% if !comment.is_deleted? %>
    <%= link_to('Delete', delete_comment_path(comment),
                :confirm => 'Are you sure you want to delete this ' + @thread.config.comment_name + '?',
                :method => :put,
                :id => "delete_comment_#{comment.id.to_s}_link",
                :class => "delete_comment_link",
                :remote => true) %>
  <% else %>
    <%= link_to('Undelete', undelete_comment_path(comment),
                :method => :put,
                :id => "undelete_comment_#{comment.id.to_s}_link",
                :class => "undelete_comment_link",
                :remote => true) %>
  <% end %>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
commontator-0.2.4 app/views/commontator/comments/_actions.html.erb
commontator-0.2.0 app/views/commontator/comments/_actions.html.erb
commontator-0.1.46 app/views/commontator/comments/_actions.html.erb