diff --git a/app/models/comment.rb b/app/models/comment.rb index 7f326168d..5056414b2 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -30,6 +30,10 @@ class Comment < ActiveRecord::Base commentable if commentable.class == Debate end + def author_id + user_id + end + def author user end diff --git a/app/views/moderation/comments/index.html.erb b/app/views/moderation/comments/index.html.erb index f89e58cc1..1d3a0e2f3 100644 --- a/app/views/moderation/comments/index.html.erb +++ b/app/views/moderation/comments/index.html.erb @@ -5,16 +5,18 @@
| <%= t('moderation.comments.index.flags') %> | -<%= t('moderation.comments.index.debate') %> | -<%= t('moderation.comments.index.comment') %> | <%= t('moderation.comments.index.updated_at') %> | +<%= t('moderation.comments.index.commentable_type') %> | +<%= t('moderation.comments.index.commentable') %> | +<%= t('moderation.comments.index.comment') %> | |
|---|---|---|---|---|---|---|---|
| <%= comment.inappropiate_flags_count %> | -<%= link_to(comment.debate.title, comment.debate) %> | -<%= comment.body %> | <%= l comment.updated_at.to_date %> | +<%= comment.commentable_type.constantize.model_name.human %> | +<%= link_to comment.commentable.title, comment.commentable %> | +<%= comment.body %> | <%= link_to t('moderation.comments.index.hide'), hide_in_moderation_screen_moderation_comment_path(comment), method: :put %> | diff --git a/config/locales/moderation.en.yml b/config/locales/moderation.en.yml index e9eb8bbfa..192da6fe3 100644 --- a/config/locales/moderation.en.yml +++ b/config/locales/moderation.en.yml @@ -6,7 +6,8 @@ en: comments: index: title: Comments flagged as inappropiate - debate: Debate + commentable_type: Type + commentable: Root comment: Comment updated_at: Date flags: Flags diff --git a/config/locales/moderation.es.yml b/config/locales/moderation.es.yml index 6e3d6eb68..421b50a78 100644 --- a/config/locales/moderation.es.yml +++ b/config/locales/moderation.es.yml @@ -6,7 +6,8 @@ es: comments: index: title: Comentarios Denunciados como Inapropiados - debate: Debate + commentable_type: Tipo + commentable: RaĆz comment: Comentario updated_at: Fecha flags: Denuncias