cirandas.net

ref: master

app/views/content_viewer/_comment_form.html.erb




<% if @comment && @comment.errors.any? && @comment.reply_of_id.blank? %>
  <%= error_messages_for :comment %>
  
<% end %>

<% @form_div ||= 'closed' %>

<%= link_to(_('Post a comment'), '#', :class => 'display-comment-form') if display_link %> <% unless pass_without_comment_captcha? %> <% end %> <%= form_tag( url, { :class => 'comment_form' } ) do %> <%= required_fields_message %> <% unless logged_in? %> <%= required labelled_form_field(_('Name'), text_field(:comment, :name)) %> <%= required labelled_form_field(_('e-mail'), text_field(:comment, :email)) %>

<%= _('If you are a registered user, you can login and be automatically recognized.') %>

<% end %> <% unless pass_without_comment_captcha? %> <%= hidden_field_tag(:recaptcha_response_field, nil, :id => nil) %> <%= hidden_field_tag(:recaptcha_challenge_field, nil, :id => nil) %> <% end %> <%= labelled_form_field(_('Title'), text_field(:comment, :title)) %> <%= required labelled_form_field(_('Enter your comment'), text_area(:comment, :body, :rows => 5)) %> <%= hidden_field_tag(:confirm, 'false') %> <%= hidden_field_tag(:view, params[:view])%> <%= button_bar do %> <%= submit_button('add', _('Post comment'), :onclick => "submit_comment_form(this); return false") %> <% if cancel_triggers_hide %> <%= button :cancel, _('Cancel'), '', :id => 'cancel-comment' %> <% else %> <%= button('cancel', _('Cancel'), {:action => 'view_page', :profile => profile.identifier, :page => @comment.article.explode_path})%> <% end %> <% end %> <% end %>
<%= javascript_include_tag 'comments' %>