Sha256: 2b8e8c7edaa3d19e5154936f60e111350ea0c8d70946d807a873f14df2f4d08d

Contents?: true

Size: 1.89 KB

Versions: 11

Compression:

Stored size: 1.89 KB

Contents

<%= content_tag :div, id: "comment_#{model.id}", class: comment_classes, data: { depth: model.depth, comment_id: model.id, toggler: ".no-comments" } do %>
  <% if model.hidden? %>
    <%= render :moderation_data %>
  <% elsif model.deleted? %>
    <%= render :deletion_data %>
  <% else %>
    <div class="comment__header">
      <div class="author-data">
        <div class="author-data__main">
          <%= render :author %>
          <span>
            <%= time_tag created_at, l(created_at, format: :decidim_short) %>
          </span>
          <% if edited? %>
            <div class="author-data__extra">
              <span class="comment__edited">
                <%= t("decidim.components.comment.edited") %>
              </span>
            </div>
          <% end %>
        </div>
      </div>
      <%= render :utilities %>
    </div>
    <div class="comment__content">
      <%= alignment_badge %>
      <%= comment_body %>
    </div>
    <div class="comment__footer">
      <%= render :actions %>
      <%= votes %>
    </div>
  <% end %>
  <div id="comment-<%= model.id %>-replies" class="replies">
    <% if has_replies_in_children? %>
      <% replies.each do |reply| %>
        <%= cell("decidim/comments/comment", reply, root_depth: root_depth, order: order, reloaded: reloaded?) %>
      <% end %>
    <% end %>
  </div>
  <% if can_reply? %>
    <div class="comment__additionalreply<%= " hide" unless commentable? %> replies">
      <button class="comment__reply muted-link" aria-controls="<%= reply_id %>" data-toggle="<%= reply_id %>">
        <%= icon "pencil", class: "icon--small", role: "img", "aria-hidden": true %>&nbsp;<%= t("decidim.components.comment.reply") %>
      </button>
    </div>
    <div class="add-comment hide" id="<%= reply_id %>" data-toggler=".hide">
      <%== cell("decidim/comments/comment_form", model, root_depth: root_depth, order: order) %>
    </div>
  <% end %>
<% end %>

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
decidim-comments-0.27.9 app/cells/decidim/comments/comment/show.erb
decidim-comments-0.27.8 app/cells/decidim/comments/comment/show.erb
decidim-comments-0.27.7 app/cells/decidim/comments/comment/show.erb
decidim-comments-0.27.6 app/cells/decidim/comments/comment/show.erb
decidim-comments-0.26.10 app/cells/decidim/comments/comment/show.erb
decidim-comments-0.26.9 app/cells/decidim/comments/comment/show.erb
decidim-comments-0.27.5 app/cells/decidim/comments/comment/show.erb
decidim-comments-0.26.8 app/cells/decidim/comments/comment/show.erb
decidim-comments-0.27.4 app/cells/decidim/comments/comment/show.erb
decidim-comments-0.27.3 app/cells/decidim/comments/comment/show.erb
decidim-comments-0.26.7 app/cells/decidim/comments/comment/show.erb