24 lines
686 B
Plaintext
24 lines
686 B
Plaintext
<%= form_tag({ :controller => "comments", :action => "create",
|
|
:story_id => story.short_id }, :method => :post) do |f| %>
|
|
<%= text_area_tag "comment", comment.comment, :size => "100x5" %>
|
|
|
|
<p></p>
|
|
|
|
<%= button_to_function "Post Comment",
|
|
"Lobsters.postComment($(this).parents('form').first()); return false;",
|
|
:type => "submit" %>
|
|
|
|
|
|
|
|
<%= button_to_function "Preview Comment",
|
|
"Lobsters.previewComment($(this).parents('form').first()); return false;"
|
|
%>
|
|
|
|
<% if params[:preview].present? %>
|
|
<ol class="comments">
|
|
<%= render :partial => "stories/comment",
|
|
:locals => { :comment => comment, :story => story } %>
|
|
</ol>
|
|
<% end %>
|
|
<% end %>
|