Factor out thumbnail galleries into a PostGallery component. This changes the html structure so that post galleries on all pages are always wrapped in a `.posts-container` class. This fixes an issue with thumbnails on the pool show page not being aligned correctly on mobile, like they are on the post index page. This also affected thumbnail galleries on other pages, like wiki pages and user profiles.
15 lines
671 B
Plaintext
15 lines
671 B
Plaintext
This post belongs to a <%= link_to "parent", posts_path(tags: "parent:#{parent.id}"), rel: "nofollow" %> <% "(deleted)" if parent.is_deleted? %>
|
|
|
|
<% children.length.tap do |children_count| %>
|
|
<% if children_count > 1 %>
|
|
and has <%= link_to pluralize(children_count - 1, "sibling"), posts_path(tags: "parent:#{parent.id}"), rel: "nofollow" %>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
(<%= link_to_wiki "learn more", "help:post_relationships" %>)
|
|
<%= link_to "« hide", "#", id: "has-parent-relationship-preview-link" %>
|
|
|
|
<div id="has-parent-relationship-preview">
|
|
<%= render_post_gallery([parent, *children], tags: "parent:#{parent.id}", show_deleted: true, inline: true) %>
|
|
</div>
|