Files
danbooru/app/views/artist_commentaries/index.html.erb
evazion 1b30b71a07 posts: refactor post previews to use ViewComponent.
Refactor the post preview html to use the ViewComponent framework. This
lets us encapsulate all the HTML, CSS, and helper methods for a UI
component in a single place.

See https://viewcomponent.org.
2021-01-14 21:17:57 -06:00

26 lines
876 B
Plaintext

<div id="c-artist-commentaries">
<div id="a-index">
<h1>Artist Commentary</h1>
<%= render "posts/partials/common/inline_blacklist" %>
<%= table_for @commentaries, width: "100%" do |t| %>
<% t.column "Post", width: "1%" do |commentary| %>
<%= post_preview(commentary.post, show_deleted: true) %>
<% end %>
<% t.column "Original" do |commentary| %>
<%= format_commentary_title(commentary.original_title) %>
<%= format_commentary_description(commentary.original_description) %>
<% end %>
<% t.column "Translated" do |commentary| %>
<%= format_commentary_title(commentary.translated_title) %>
<%= format_commentary_description(commentary.translated_description) %>
<% end %>
<% end %>
<%= numbered_paginator(@commentaries) %>
</div>
</div>
<%= render "secondary_links" %>