Sha256: ad0baf320069823973781b838b74c9edb5094cc9118399b559fe7253d7e87497

Contents?: true

Size: 1.76 KB

Versions: 2

Compression:

Stored size: 1.76 KB

Contents

<div class="talkie-comment-holder">
  <% if display_user_avatar? %>
    <div class="talkie-comment-creator-avatar">
      <%= avatar_image_tag comment.creator %>
    </div>
  <% end %>

  <div class="talkie-comment-content">
    <header class="talkie-comment-header">
      <% if display_user_handler? %>
        <div class="talkie-comment-creator">
          <%= link_to_creator comment.creator, class: "talkie-comment-creator-link" %>
        </div>
      <% end %>
      <small class="talkie-comment-created-at"><%= l comment.created_at, format: :long %></small>

    </header>
    <p class="talkie-comment-body">
      <%= comment.body %>
    </p>

    <div class="talkie-comment-footer">
      <% if !nested_enabled? && deletable_and_allowed?(comment) %>
        <%= link_to_delete_comment comment %>
      <% end %>

      <% if nested_enabled? %>
        <div class="talkie-comment-reply">
          <a href="#" class="talkie-comment-reply-link"><%= t("talkie.comment.reply") %></a>
          <% if deletable_and_allowed? comment %>
            <%= link_to_delete_comment comment %>
          <% end %>
        </div>
        <div class="talkie-comments-reply-form-container" style="display:none">
          <%= form_for [talkie, Talkie::Comment.new] do |f| %>
            <%= f.hidden_field :commentable_id, value: commentable.id %>
            <%= f.hidden_field :commentable_type, value: commentable.class.name %>
            <%= hidden_field_tag :parent_comment_id, comment.id %>

            <%= f.text_area :body, placeholder: t("talkie.comment.form.body_placeholder") %>
            <%= submit_tag t("talkie.comment.form.reply"), class: 'talkie-comments-form-submit' %>
          <% end %>
        </div>
        <%= render comment.children %>
      <% end %>
    </div>
  </div>
</div>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
talkie-0.2.0 app/views/talkie/comments/_comment.html.erb
talkie-0.1.1 app/views/talkie/comments/_comment.html.erb