Sha256: 8e4a18c86a4e5803a9feb5b063319d9891daa74354078c32a82dfd3bacb67260

Contents?: true

Size: 1.51 KB

Versions: 1

Compression:

Stored size: 1.51 KB

Contents

<%# @comment ||= commentable.comments.build %>
<% if @comment %>
	<% authorized_tag(:div, :create, @comment, :id => 'comment_form_wrapper') do %>
    <div id="registered_author" style="display: none;">
      <p><%= t(:'adva.info.greeting_logged_in') %></p>
    </div>

    <h2><%= @comment.new_record? ? t(:'adva.comments.titles.add_reply') : t(:'adva.comments.titles.edit') %></h2>

    <%= form_for :comment, @comment, :url => (@comment.new_record? ? comments_path : comment_path(@comment)), :html => { :id => 'comment_form', :method => (@comment.new_record? ? :post : :put) } do |f| -%>
      <%= comment_form_hidden_fields commentable %>

      <%= fields_for @comment.author do |author| %>
        <div id="anonymous_author">
          <p>
            <%= author.label :name, 'Name' %>
            <%= author.text_field :name %>
          </p>
          <p> 
            <%= author.label :email, 'E-Mail' %>
            <%= author.text_field :email %>
          </p>
          <p> 
            <%= author.label :homepage %>
            <%= author.text_field :homepage %>
          </p>
        </div>
      <% end %>

      <p>
        <%= f.text_area :body %>
      </p>

      <p id="preview"></p>

      <p>
        <input type="text" name="comment[url]" style="background-color: transparent; border: 0px" />
        <%= submit_tag (@comment.new_record? ? t(:'adva.comments.titles.submit_comment') : t(:'adva.comments.titles.save_comment')) %>
        <%= link_to_remote_comment_preview %>
      </p>
    <% end %>
	<% end %>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
adva-0.0.1 adva_comments/app/views/comments/_form.html.erb