45 lines
1.3 KiB
Plaintext
45 lines
1.3 KiB
Plaintext
<div class="comment_form_container">
|
|
<%= form_tag((comment.new_record? ? "/comments/post_to/#{story.short_id}" :
|
|
"/comments/#{comment.short_id}/update"), { :id => "comment_form" }) do |f| %>
|
|
<% if comment && comment.errors.any? %>
|
|
<%= errors_for comment %>
|
|
<% end %>
|
|
|
|
<% if comment.parent_comment_short_id.present? %>
|
|
<%= 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" %>
|
|
|
|
<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 :partial => "comments/comment",
|
|
:locals => { :comment => show_comment, :story => story } %>
|
|
</ol>
|
|
<% end %>
|
|
</div>
|