53 lines
1.4 KiB
Plaintext
53 lines
1.4 KiB
Plaintext
<li class="comment">
|
|
<div class="comment_form_container">
|
|
<%= form_tag comment.new_record? ?
|
|
"/comments/post_to/#{comment.story.short_id}" :
|
|
"/comments/#{comment.short_id}/update" do |f| %>
|
|
<% if comment.errors.any? %>
|
|
<%= errors_for comment %>
|
|
<% end %>
|
|
|
|
<% if comment.parent_comment %>
|
|
<%= hidden_field_tag "parent_comment_short_id",
|
|
comment.parent_comment.short_id %>
|
|
<% end %>
|
|
|
|
<div style="width: 100%;">
|
|
<%= text_area_tag "comment", comment.comment, :rows => 5,
|
|
:style => "width: 100%;", :autocomplete => "off" %>
|
|
|
|
<p></p>
|
|
|
|
<div class="markdown_help_toggler">
|
|
<div class="markdown_help_label">
|
|
Markdown formatting available
|
|
</div>
|
|
|
|
<%= button_tag "#{comment.new_record?? "Post" : "Update"} Comment",
|
|
:class => "comment-post", :type => "button" %>
|
|
|
|
<%= button_tag "Preview Comment", :class => "comment-preview",
|
|
:type => "button" %>
|
|
<% if local_assigns[:cancellable] %>
|
|
|
|
<%= button_tag "Cancel", :class => "comment-cancel",
|
|
:type => "button" %>
|
|
<% end %>
|
|
|
|
|
|
<div style="clear: both;"></div>
|
|
|
|
<%= render :partial => "global/markdownhelp" %>
|
|
</div>
|
|
</div>
|
|
|
|
<p></p>
|
|
<% end %>
|
|
<% if defined?(show_comment) && show_comment.valid? %>
|
|
<ol class="comments comments1 preview">
|
|
<%= render "comments/comment", :comment => show_comment %>
|
|
</ol>
|
|
<% end %>
|
|
</div>
|
|
</li>
|