journalduhacker/app/views/comments/_commentbox.html.erb
2012-08-24 10:57:42 -05:00

45 lines
1.2 KiB
Plaintext

<div class="form_container">
<%= form_tag("/comments/#{story.short_id}", { :id => "comment_form" }) do |f| %>
<% if comment.parent_comment_short_id.present? %>
<%= hidden_field_tag "parent_comment_short_id",
comment.parent_comment_short_id %>
<% end %>
<div style="width: 100%; max-width: 650px;">
<%= text_area_tag "comment", comment.comment, :rows => 5,
:style => "width: 100%;" %>
<p></p>
<div class="markdown_help_toggler">
<div class="markdown_help_label">
<span class="fakea">Markdown formatting available</span>
</div>
<%= button_tag "Post Comment", :class => "comment-post",
:type => "button" %>
&nbsp;
<%= button_tag "Preview Comment", :class => "comment-preview",
:type => "button" %>
<div style="clear: both;"></div>
<%= render :partial => "global/markdownhelp" %>
</div>
</div>
<p></p>
<% if defined?(show_comment) %>
<% if show_comment.valid? %>
<ol class="comments comments1 preview">
<%= render :partial => "comments/comment",
:locals => { :comment => show_comment, :story => story } %>
</ol>
<% else %>
<%= errors_for comment %>
<% end %>
<% end %>
<% end %>
</div>