<%= text_area_tag "comment", comment.comment, :rows => 5,
:style => "width: 100%;", :autocomplete => "off", :disabled => !@user,
:placeholder => (@user ? "" : "You must be logged in to leave a comment.")
%>
<% if @user %>
Markdown formatting available
[M↓]
<% end %>
<%= button_tag "#{comment.new_record?? "Post" : "Update"}",
:class => "comment-post", :type => "button",
:disabled => !@user %>
<%= button_tag "Preview", :class => "comment-preview",
:type => "button", :disabled => !@user %>
<% if comment.persisted? || comment.parent_comment_id %>
<%= button_tag "Cancel", :class => "comment-cancel",
:type => "button" %>
<% end %>
<% if @user && @user.hats.any? %>
Put on hat:
<%= select_tag "hat_id",
options_from_collection_for_select(@user.hats, "id", "hat",
comment.hat_id), :include_blank => true %>
<% end %>
<% if @user %>
<%= render :partial => "global/markdownhelp" %>
<% end %>