Sha256: 761b76f7d1a005b7f20f06574f3c03496777f89b043e1f036716911ecfe5ec32

Contents?: true

Size: 1016 Bytes

Versions: 10

Compression:

Stored size: 1016 Bytes

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 t('commontator.comment.actions.edit'),
              commontator.edit_comment_path(comment),
              :id => "comment_#{comment.id.to_s}_edit_link",
              :class => "comment_edit_link",
              :remote => true %>
<% end %>

&nbsp;

<% if can_delete %>
  <% is_deleted = comment.is_deleted? %>
  <% del_string = is_deleted ? 'undelete' : 'delete' %>
  <%= link_to t("commontator.comment.actions.#{del_string}"),
              commontator.polymorphic_path([del_string, comment]),
              :confirm => (!is_deleted ? t('commontator.comment.actions.confirm_delete') : nil),
              :method => :put,
              :id => "comment_#{comment.id.to_s}_#{del_string}_link",
              :class => "comment_#{del_string}_link",
              :remote => true %>
<% end %>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
commontator-4.11.1 app/views/commontator/comments/_actions.html.erb
commontator-4.11.0 app/views/commontator/comments/_actions.html.erb
commontator-4.10.5 app/views/commontator/comments/_actions.html.erb
commontator-4.10.4 app/views/commontator/comments/_actions.html.erb
commontator-4.10.3 app/views/commontator/comments/_actions.html.erb
commontator-4.10.2 app/views/commontator/comments/_actions.html.erb
commontator-4.10.1 app/views/commontator/comments/_actions.html.erb
commontator-4.10.0 app/views/commontator/comments/_actions.html.erb
commontator-4.9.0 app/views/commontator/comments/_actions.html.erb
commontator-4.5.4 app/views/commontator/comments/_actions.html.erb