diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index f62b5efd6..5afa088d1 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -151,11 +151,16 @@ body.admin { .verified { color: $check; + + a { + border-bottom: 1px dotted $check; + color: $check; + font-size: rem-calc(12); + } } -.verified a { - border-bottom: 1px dotted $check; - color: $check; +.archived { + color: $text-medium; font-size: rem-calc(12); } @@ -163,6 +168,12 @@ body.admin { color: $delete; } +.date { + color: $text-medium; + font-size: rem-calc(12); + font-style: italic; +} + .level { font-size: rem-calc(12); } diff --git a/app/assets/stylesheets/participacion.scss b/app/assets/stylesheets/participacion.scss index b3ee7046a..619f25d48 100644 --- a/app/assets/stylesheets/participacion.scss +++ b/app/assets/stylesheets/participacion.scss @@ -135,6 +135,7 @@ h1, h2, h3, h4, h5, h6 { } .sub-nav dt, .sub-nav dd, .sub-nav li { + padding: rem-calc(3) 0; &.active { background: #008CBA; @@ -142,7 +143,7 @@ h1, h2, h3, h4, h5, h6 { color: white; cursor: default; font-weight: normal; - padding: 0.16667rem 0.88889rem; + padding: rem-calc(3) rem-calc(14); a:hover { color: #737373; diff --git a/app/controllers/moderation/comments_controller.rb b/app/controllers/moderation/comments_controller.rb index 03667e286..6434c708e 100644 --- a/app/controllers/moderation/comments_controller.rb +++ b/app/controllers/moderation/comments_controller.rb @@ -31,7 +31,7 @@ class Moderation::CommentsController < Moderation::BaseController end def set_valid_filters - @valid_filters = %w{all pending_review reviewed} + @valid_filters = %w{all pending_review archived} end def parse_filter diff --git a/app/controllers/moderation/debates_controller.rb b/app/controllers/moderation/debates_controller.rb index 22e4eac6b..89360ddaa 100644 --- a/app/controllers/moderation/debates_controller.rb +++ b/app/controllers/moderation/debates_controller.rb @@ -31,7 +31,7 @@ class Moderation::DebatesController < Moderation::BaseController end def set_valid_filters - @valid_filters = %w{all pending_review reviewed} + @valid_filters = %w{all pending_review archived} end def parse_filter diff --git a/app/models/comment.rb b/app/models/comment.rb index 824f1dbf0..0fa84dc6e 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -19,7 +19,7 @@ class Comment < ActiveRecord::Base scope :sorted_for_moderation, -> { order(inappropiate_flags_count: :desc, updated_at: :desc) } scope :pending_review, -> { where(reviewed_at: nil, hidden_at: nil) } - scope :reviewed, -> { where("reviewed_at IS NOT NULL AND hidden_at IS NULL") } + scope :archived, -> { where("reviewed_at IS NOT NULL AND hidden_at IS NULL") } scope :flagged_as_inappropiate, -> { where("inappropiate_flags_count > 0") } def self.build(commentable, user, body) diff --git a/app/models/debate.rb b/app/models/debate.rb index c16048f70..e31a82a85 100644 --- a/app/models/debate.rb +++ b/app/models/debate.rb @@ -25,7 +25,7 @@ class Debate < ActiveRecord::Base scope :sorted_for_moderation, -> { order(inappropiate_flags_count: :desc, updated_at: :desc) } scope :pending_review, -> { where(reviewed_at: nil, hidden_at: nil) } - scope :reviewed, -> { where("reviewed_at IS NOT NULL AND hidden_at IS NULL") } + scope :archived, -> { where("reviewed_at IS NOT NULL AND hidden_at IS NULL") } scope :flagged_as_inappropiate, -> { where("inappropiate_flags_count > 0") } # Ahoy setup diff --git a/app/views/moderation/_menu.html.erb b/app/views/moderation/_menu.html.erb index 41e84287a..d7c76b31a 100644 --- a/app/views/moderation/_menu.html.erb +++ b/app/views/moderation/_menu.html.erb @@ -4,17 +4,17 @@ <%= t("moderation.dashboard.index.title") %> -
  • > +
  • > <%= link_to moderation_debates_path do %> - - <%= t('moderation.menu.flagged_debates') %> + + <%= t("moderation.menu.flagged_debates") %> <% end %>
  • -
  • > +
  • > <%= link_to moderation_comments_path do %> - - <%= t('moderation.menu.flagged_comments') %> + + <%= t("moderation.menu.flagged_comments") %> <% end %>
  • diff --git a/app/views/moderation/comments/index.html.erb b/app/views/moderation/comments/index.html.erb index 0d89114f1..02b503497 100644 --- a/app/views/moderation/comments/index.html.erb +++ b/app/views/moderation/comments/index.html.erb @@ -1,45 +1,52 @@ -

    <%= t('moderation.comments.index.title') %>

    +

    <%= t("moderation.comments.index.title") %>

    + +

    <%= page_entries_info @comments %>

    - - - - - + + + + <% @comments.each do |comment| %> - - - - - + + + <% if can? :mark_as_reviewed, comment %> <% end %> <% if comment.reviewed? %> - <% end %> @@ -47,4 +54,3 @@
    <%= t('moderation.comments.index.headers.flags') %><%= t('moderation.comments.index.headers.updated_at') %><%= t('moderation.comments.index.headers.commentable_type') %><%= t('moderation.comments.index.headers.commentable') %><%= t('moderation.comments.index.headers.comment') %> + <%= t("moderation.comments.index.headers.commentable") %> |  + <%= t("moderation.comments.index.headers.commentable_type") %> |  + <%= t("moderation.comments.index.headers.updated_at") %> + <%= t("moderation.comments.index.headers.comment") %><%= t("moderation.comments.index.headers.flags") %><%= t("moderation.debates.index.headers.actions") %>
    <%= comment.inappropiate_flags_count %><%= 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, request.query_parameters), method: :put %> + <%= link_to comment.commentable.title, comment.commentable %> +
    + <%= comment.commentable_type.constantize.model_name.human %> + <%= l comment.updated_at.to_date %> +
    <%= comment.body %><%= comment.inappropiate_flags_count %> + <%= link_to t("moderation.comments.index.hide"), hide_in_moderation_screen_moderation_comment_path(comment, request.query_parameters), method: :put, class: "delete" %> - <%= link_to t('moderation.comments.index.mark_as_reviewed'), mark_as_reviewed_moderation_comment_path(comment, request.query_parameters), method: :put %> + <%= link_to t("moderation.comments.index.archive"), mark_as_reviewed_moderation_comment_path(comment, request.query_parameters), method: :put, class: "button radius tiny warning" %> - <%= t('moderation.comments.index.reviewed') %> + + <%= t("moderation.comments.index.archived") %>
    <%= paginate @comments %> - diff --git a/app/views/moderation/debates/index.html.erb b/app/views/moderation/debates/index.html.erb index 611f68e16..68de5807d 100644 --- a/app/views/moderation/debates/index.html.erb +++ b/app/views/moderation/debates/index.html.erb @@ -1,43 +1,51 @@ -

    <%= t('moderation.debates.index.title') %>

    +

    <%= t("moderation.debates.index.title") %>

    + +

    <%= page_entries_info @debates %>

    - - - - + + + <% @debates.each do |debate| %> - - - - + + <% if can? :mark_as_reviewed, debate %> <% end %> <% if debate.reviewed? %> - <% end %> @@ -45,4 +53,3 @@
    <%= t('moderation.debates.index.headers.flags') %><%= t('moderation.debates.index.headers.updated_at') %><%= t('moderation.debates.index.headers.title') %><%= t('moderation.debates.index.headers.description') %> + <%= t("moderation.debates.index.headers.title") %> |  + <%= t("moderation.debates.index.headers.updated_at") %> |  + <%= t("moderation.debates.index.headers.description") %> + <%= t("moderation.debates.index.headers.flags") %><%= t("moderation.debates.index.headers.actions") %>
    <%= debate.inappropiate_flags_count %><%= l debate.updated_at.to_date %><%= link_to debate.title, debate %><%= debate.description %> - <%= link_to t('moderation.debates.index.hide'), hide_in_moderation_screen_moderation_debate_path(debate, request.query_parameters), method: :put %> + <%= link_to debate.title, debate, target: "_blank" %> +
    + <%= l debate.updated_at.to_date %> +
    + <%= debate.description %> +
    <%= debate.inappropiate_flags_count %> + <%= link_to t("moderation.debates.index.hide"), hide_in_moderation_screen_moderation_debate_path(debate, request.query_parameters), method: :put, class: "delete" %> - <%= link_to t('moderation.debates.index.mark_as_reviewed'), mark_as_reviewed_moderation_debate_path(debate, request.query_parameters), method: :put %> + <%= link_to t("moderation.debates.index.archive"), mark_as_reviewed_moderation_debate_path(debate, request.query_parameters), method: :put, class: "button radius tiny warning" %> - <%= t('moderation.debates.index.reviewed') %> + + <%= t("moderation.debates.index.archived") %>
    <%= paginate @debates %> - diff --git a/config/locales/moderation.en.yml b/config/locales/moderation.en.yml index 2728f10d9..7688dfa09 100644 --- a/config/locales/moderation.en.yml +++ b/config/locales/moderation.en.yml @@ -8,7 +8,7 @@ en: title: Moderation comments: index: - title: Comments flagged as inappropiate + title: Comments flagged as inappropriate headers: flags: Flags updated_at: Date @@ -16,27 +16,27 @@ en: commentable: Root comment: Comment hide: Hide - mark_as_reviewed: Mark as reviewed - reviewed: Reviewed + archive: Archive + archived: Archived filter: Filter filters: all: All pending_review: Pending - reviewed: Reviewed + archived: Archived debates: index: - title: Debates flagged as inappropiate + title: Debates flagged as inappropriate headers: flags: Flags updated_at: Date title: Title description: Description + actions: Actions hide: Hide - mark_as_reviewed: Mark as reviewed - reviewed: Reviewed + archive: Archive + archived: Archived filter: Filter filters: all: All pending_review: Pending - reviewed: Reviewed - + archived: Archived diff --git a/config/locales/moderation.es.yml b/config/locales/moderation.es.yml index 2afaec7a9..61d6b5f5c 100644 --- a/config/locales/moderation.es.yml +++ b/config/locales/moderation.es.yml @@ -8,7 +8,7 @@ es: title: Moderación comments: index: - title: Comentarios Denunciados como Inapropiados + title: Comentarios denunciados como inapropiados headers: flags: Denuncias updated_at: Fecha @@ -16,28 +16,27 @@ es: commentable: Raíz comment: Comentario hide: Ocultar - mark_as_reviewed: Marcar como revisado - reviewed: Revisado + archive: Archivar + archived: Archivado filter: Filtrar filters: all: Todos pending_review: Pendientes - reviewed: Revisados + archived: Archivados debates: index: - title: Debates Denunciados como Inapropiados + title: Debates denunciados como inapropiados headers: flags: Denuncias updated_at: Fecha title: Título description: Descripción + actions: Acciones hide: Ocultar - mark_as_reviewed: Marcar como revisado - reviewed: Revisado + archive: Archivar + archived: Archivado filter: Filtrar filters: all: Todos pending_review: Pendientes - reviewed: Revisados - - + archived: Archivados