40 lines
1.1 KiB
Plaintext
40 lines
1.1 KiB
Plaintext
<% posts.each do |post| %>
|
|
<div class="post">
|
|
<h4 class="mt-2">
|
|
<%= link_to post.title, post %>
|
|
<% if post.is_group %>
|
|
<div class="post__group_label badge bg-secondary"><%= I18n.t("activerecord.attributes.#{post.class.name.downcase}.is_group") %></div>
|
|
<% end %>
|
|
</h4>
|
|
<p>
|
|
<%= sanitize strip_tags(post.rendered_description.to_html) %>
|
|
</p>
|
|
<p>
|
|
<small>
|
|
<% if post.category %>
|
|
<span class="category">
|
|
<%= link_to [post.class, cat: post.category] do %>
|
|
<%= category_icon(post.category) %>
|
|
<%= post.category %>
|
|
<% end %>
|
|
</span>
|
|
<% end %>
|
|
<% (post.tags || []).each do |tag| %>
|
|
<span class="badge rounded-pill bg-info">
|
|
<%= glyph :tag %>
|
|
<%= link_to [post.class, tag: tag] do %>
|
|
<%= tag %>
|
|
<% end %>
|
|
</span>
|
|
<% end %>
|
|
</small>
|
|
</p>
|
|
|
|
<% if post.type == "Inquiry" %>
|
|
<div class="post__datetime">
|
|
<%= l post.updated_at.to_date, format: :long %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|