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") %> -
- <%= t('moderation.comments.index.filter') %>: <% @valid_filters.each do |filter| %> <% if @filter == filter %> - <%= t("moderation.comments.index.filters.#{filter}") %> +
| <%= 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" %> | <% if can? :mark_as_reviewed, comment %>- <%= 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" %> | <% end %> <% if comment.reviewed? %> -- <%= t('moderation.comments.index.reviewed') %> + | + <%= t("moderation.comments.index.archived") %> | <% end %>
- <%= t('moderation.debates.index.filter') %>: <% @valid_filters.each do |filter| %> <% if @filter == filter %> - <%= t("moderation.debates.index.filters.#{filter}") %> +
| <%= 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" %> | <% if can? :mark_as_reviewed, debate %>- <%= 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" %> | <% end %> <% if debate.reviewed? %> -- <%= t('moderation.debates.index.reviewed') %> + | + <%= t("moderation.debates.index.archived") %> | <% end %>