diff --git a/app/models/artist_commentary_version.rb b/app/models/artist_commentary_version.rb index 799f359bc..83f335919 100644 --- a/app/models/artist_commentary_version.rb +++ b/app/models/artist_commentary_version.rb @@ -1,5 +1,6 @@ class ArtistCommentaryVersion < ApplicationRecord before_validation :initialize_updater + belongs_to :post belongs_to :updater, :class_name => "User" scope :for_user, lambda {|user_id| where("updater_id = ?", user_id)} attr_accessible :post_id, :original_title, :original_description, :translated_title, :translated_description diff --git a/app/views/artist_commentary_versions/index.html.erb b/app/views/artist_commentary_versions/index.html.erb index cf6be852e..4f8c20534 100644 --- a/app/views/artist_commentary_versions/index.html.erb +++ b/app/views/artist_commentary_versions/index.html.erb @@ -2,6 +2,8 @@
| <%= link_to commentary_version.post_id, post_path(commentary_version.post_id) %> | ++ <% if params.dig(:search, :post_id).present? %> + <%= link_to commentary_version.post_id, post_path(commentary_version.post_id) %> + <% else %> + <%= PostPresenter.preview(commentary_version.post, :tags => "status:any") %> + <% end %> + |
<%= h(commentary_version.original_title) %>- <%= h(commentary_version.original_description) %> +
+ <%= format_text(commentary_version.original_description) %>
+
|
<%= h(commentary_version.translated_title) %>- <%= h(commentary_version.translated_description) %> +
+ <%= format_text(commentary_version.translated_description) %>
+
|
<% if CurrentUser.is_moderator? %>