diff --git a/app/helpers/artist_commentary_versions_helper.rb b/app/helpers/artist_commentary_versions_helper.rb deleted file mode 100644 index 0a52fed5d..000000000 --- a/app/helpers/artist_commentary_versions_helper.rb +++ /dev/null @@ -1,5 +0,0 @@ -module ArtistCommentaryVersionsHelper - def artist_commentary_versions_listing_type - params.dig(:search, :post_id).present? ? :revert : :standard - end -end diff --git a/app/javascript/src/styles/specific/artist_commentary_versions.scss b/app/javascript/src/styles/specific/artist_commentary_versions.scss new file mode 100644 index 000000000..c60410940 --- /dev/null +++ b/app/javascript/src/styles/specific/artist_commentary_versions.scss @@ -0,0 +1,15 @@ +div#c-artist-commentary-versions { + #a-index { + div.commentary-body-section { + padding: 0.5em; + margin-bottom: 0.5em; + border: var(--footer-border); + } + + td.original-column, + td.translated-column { + padding-top: 0.5em; + vertical-align: top; + } + } +} diff --git a/app/models/artist_commentary_version.rb b/app/models/artist_commentary_version.rb index 8ce732caa..e362821cb 100644 --- a/app/models/artist_commentary_version.rb +++ b/app/models/artist_commentary_version.rb @@ -14,4 +14,17 @@ class ArtistCommentaryVersion < ApplicationRecord end @previous.first end + + def self.status_fields + { + original_title: "OrigTitle", + original_description: "OrigDesc", + translated_title: "TransTitle", + translated_description: "TransDesc", + } + end + + def unchanged_empty?(field) + self[field].strip.empty? && (previous.nil? || previous[field].strip.empty?) + end end diff --git a/app/views/artist_commentary_versions/_listing.html.erb b/app/views/artist_commentary_versions/_listing.html.erb index 2f2e1f18d..fd4fb089d 100644 --- a/app/views/artist_commentary_versions/_listing.html.erb +++ b/app/views/artist_commentary_versions/_listing.html.erb @@ -1,33 +1,60 @@ -