fixes #1424 for comments
This commit is contained in:
5
app/views/comments/_edit.html.erb
Normal file
5
app/views/comments/_edit.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<%= simple_form_for(comment) do |f| %>
|
||||
<%= dtext_field "comment", "body", :value => comment.body, :input_id => "comment_body_for_#{comment.id}", :preview_id => "dtext-preview-for-#{comment.id}" %>
|
||||
<%= f.button :submit, "Submit" %>
|
||||
<%= dtext_preview_button "comment", "body", :input_id => "comment_body_for_#{comment.id}", :preview_id => "dtext-preview-for-#{comment.id}" %>
|
||||
<% end %>
|
||||
@@ -20,12 +20,15 @@
|
||||
<li><%= link_to "Reply", new_comment_path(:post_id => comment.post_id), :class => "reply-link", "data-comment-id" => comment.id %></li>
|
||||
<% if comment.editable_by?(CurrentUser.user) %>
|
||||
<li><%= link_to "Delete", comment_path(comment.id), :confirm => "Are you sure you want to delete this comment?", :method => :delete, :remote => true %></li>
|
||||
<li><%= link_to "Edit", edit_comment_path(comment.id) %></li>
|
||||
<li><%= link_to "Edit", edit_comment_path(comment.id), :id => "edit_comment_link_#{comment.id}", :class => "edit_comment_link" %></li>
|
||||
<% end %>
|
||||
<li id="comment-vote-up-link-for-<%= comment.id %>"><%= link_to "Vote up", comment_votes_path(:comment_id => comment.id, :score => "up"), :method => :post, :remote => true %></li>
|
||||
<li id="comment-vote-down-link-for-<%= comment.id %>"><%= link_to "Vote down", comment_votes_path(:comment_id => comment.id, :score => "down"), :method => :post, :remote => true %></li>
|
||||
<% end %>
|
||||
</menu>
|
||||
<% if comment.editable_by?(CurrentUser.user) %>
|
||||
<%= render "comments/edit", :comment => comment %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
Reference in New Issue
Block a user