Sha256: 97ccf1140f89ccd1a38a3ab3ddbd8e46cdea5707cf5357172d43e7edd7c94855

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 KB

Contents

<%= cell("decidim/posts/post_header", post) %>
<%= cell("decidim/posts/post_attachments", post) %>
<div class="card__grid-text">
  <% should_truncate = strip_tags(post_body).length > 300 %>
  <div class="content-block__description editor-content" <%= "data-component='accordion'" if should_truncate %>>
    <% if should_truncate %>
      <% seed = SecureRandom.hex(4) %>
      <div id="panel-view-more-<%= seed %>" aria-hidden="true">
        <%= post_body %>
      </div>
      <button class="button button__sm button__text-secondary mt-2" data-controls="panel-view-more-<%= seed %>" aria-expanded="false">
        <span>
          <%= t("view_more", scope: "layouts.decidim.announcements") %>
        </span>
        <%= icon "arrow-down-s-line" %>
        <span>
          <%= t("view_less", scope: "layouts.decidim.announcements") %>
        </span>
        <%= icon "arrow-up-s-line" %>
      </button>
    <% else %>
      <%= post_body %>
    <% end %>
  </div>
</div>
<% if post_category == 'survey' %>
  <%= render :survey %>
<% end %>
<%= cell("decidim/posts/post_comment", post) %>
<%= cell("decidim/posts/post_metadata", post) %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
decidim-posts-1.0.0 app/cells/decidim/posts/post/show.erb