Files
danbooru/app/views/artist_versions/_listing.html.erb
BrokenEagle a95e57d938 Move more logic to the helper modules
- Diff view changes
-- Only show pool description changes in diff view
-- Conditionally render diff link when applicable values are changed
-- Conditionally show diff view sections when values are changed
- Show renames on index view
-- There is plenty of space
-- This wasn't shown at all for wikis
-- Having to navigate to an alternate page is unwieldy for pools
- Show "posts" as a status on pools
-- This is so all changes among versions are quantified as a status
- Standardize diff/index titles
2020-03-17 18:31:20 +00:00

34 lines
1.6 KiB
Plaintext

<div id="p-<%= listing_type(:artist_id) %>-listing">
<%= table_for @artist_versions, {class: "striped autofit", width: "100%"} do |t| %>
<% t.column "Name", td: {class: "diff-body"} do |artist_version| %>
<%= link_to artist_version.name, artist_path(artist_version.artist_id) %>
<%= link_to "»", artist_versions_path(search: {artist_id: artist_version.artist_id}, anchor: "artist-version-#{artist_version.id}") %>
<%= artist_version_name_diff(artist_version) %>
<% end %>
<% t.column "Other Names", td: {class: "diff-body"} do |artist_version| %>
<%= artist_version_group_name_diff(artist_version) %>
<%= artist_version_other_names_diff(artist_version) %>
<% end %>
<% t.column "URLs", td: {class: "col-expand"} do |artist_version| %>
<%= artist_version_urls_diff(artist_version) %>
<% end %>
<% t.column "Changes" do |artist_version| %>
<%= status_diff_html(artist_version) %>
<% end %>
<% t.column "Updated" do |artist_version| %>
<%= link_to_user artist_version.updater %>
<%= link_to "»", artist_versions_path(search: { updater_name: artist_version.updater.name }) %>
<p>
<%= compact_time(artist_version.updated_at) %>
</p>
<% end %>
<% if listing_type(:artist_id) == :revert %>
<% t.column column: "control" do |artist_version| %>
<%= link_to "Revert to", revert_artist_path(artist_version.artist_id, version_id: artist_version.id), method: :put, "data-confirm": "Are you sure you want to revert to this version?" %>
<% end %>
<% end %>
<% end %>
</div>