diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index 7e6096bc3..f62b5efd6 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -140,7 +140,7 @@ body.admin { .delete { border-bottom: 1px dotted #CF2A0E; - color: #F04124; + color: $delete; font-size: rem-calc(12); &:hover, &:active, &:focus { @@ -160,7 +160,7 @@ body.admin { } .rejected { - color: #F04124; + color: $delete; } .level { diff --git a/app/assets/stylesheets/debates.scss b/app/assets/stylesheets/debates.scss index 66ea491af..641e7ccff 100644 --- a/app/assets/stylesheets/debates.scss +++ b/app/assets/stylesheets/debates.scss @@ -5,6 +5,7 @@ // 03. Show // 04. New // 05. Comments +// 06. Flags // // 01. Debates @@ -541,6 +542,10 @@ font-size: rem-calc(12); margin: rem-calc(6) 0; padding: rem-calc(6); + + .divider { + color: $text-light; + } } .comment-user { @@ -608,3 +613,17 @@ .faded { opacity: 0.4; } + +// 06. Flags +// - - - - - - - - - - - - - - - - - - - - - - - - - + +.flag-disable { + color: $text-medium; + line-height: rem-calc(24); + vertical-align: middle; +} + +.flag-active { + @extend .flag-disable; + color: $delete; +} diff --git a/app/assets/stylesheets/participacion.scss b/app/assets/stylesheets/participacion.scss index 485dbfd60..b3ee7046a 100644 --- a/app/assets/stylesheets/participacion.scss +++ b/app/assets/stylesheets/participacion.scss @@ -150,6 +150,25 @@ h1, h2, h3, h4, h5, h6 { } } +.f-dropdown { + + li a { + font-size: rem-calc(12); + + &:hover { + color: $link-hover; + } + } + + li:hover, .f-dropdown li:focus { + background: white; + } + + &.open { + outline: none; + } +} + // 04. Header // - - - - - - - - - - - - - - - - - - - - - - - - - @@ -692,13 +711,13 @@ form { } } -img.admin-avatar, img.moderator-avatar { +img.avatar, img.admin-avatar, img.moderator-avatar { border-radius: rem-calc(1000); position: relative; } img.initialjs-avatar { - @extend .moderator-avatar; + @extend .avatar; } .author-deleted { diff --git a/app/assets/stylesheets/variables.scss b/app/assets/stylesheets/variables.scss index 4be7028e3..64861e215 100644 --- a/app/assets/stylesheets/variables.scss +++ b/app/assets/stylesheets/variables.scss @@ -38,6 +38,7 @@ $votes-like-act: #5D9E7F; $votes-unlike: #EF8585; $votes-unlike-act: #BD6A6A; +$delete: #F04124; $check: #46DB91; // 03. Forms diff --git a/app/views/comments/_actions.html.erb b/app/views/comments/_actions.html.erb index 5454179f0..51a6743e0 100644 --- a/app/views/comments/_actions.html.erb +++ b/app/views/comments/_actions.html.erb @@ -1,12 +1,16 @@ + + <%= render 'comments/flag_as_inappropiate_actions', comment: comment %> + + <% if can? :hide, comment %> -  |  +  •  <%= link_to t("admin.actions.hide").capitalize, hide_moderation_comment_path(comment), method: :put, remote: true, data: { confirm: t('admin.actions.confirm') } %> <% end %> <% if can? :hide, comment.user %> -  |  +  •  <%= link_to t("admin.actions.hide_author").capitalize, hide_moderation_user_path(comment.user_id, debate_id: @debate.id), method: :put, data: { confirm: t('admin.actions.confirm') } %> <% end %> diff --git a/app/views/comments/_comment.html.erb b/app/views/comments/_comment.html.erb index ca7474ebd..6f93bdde4 100644 --- a/app/views/comments/_comment.html.erb +++ b/app/views/comments/_comment.html.erb @@ -58,10 +58,6 @@ <% end %>  • <%= time_ago_in_words(comment.created_at) %> - - - <%= render 'comments/flag_as_inappropiate_actions', comment: comment %> - <% if comment.as_administrator? %> @@ -81,11 +77,11 @@ <%= render 'comments/votes', comment: comment %> -

+

<%= t("debates.comment.responses", count: comment.children_count) %> <% if user_signed_in? %> -  |  +  |  <%= link_to(comment_link_text(comment), "", class: "js-add-comment-link", data: {'id': dom_id(comment)}) %> @@ -93,7 +89,7 @@ <%= render 'comments/form', {parent: comment, toggeable: true} %> <% end %> -

+
<% end %> diff --git a/app/views/comments/_flag_as_inappropiate_actions.html.erb b/app/views/comments/_flag_as_inappropiate_actions.html.erb index fad83d4d6..0b62715e3 100644 --- a/app/views/comments/_flag_as_inappropiate_actions.html.erb +++ b/app/views/comments/_flag_as_inappropiate_actions.html.erb @@ -1,6 +1,23 @@ <% if can? :flag_as_inappropiate, comment %> - <%= link_to t('shared.flag_as_inappropiate'), flag_as_inappropiate_comment_path(comment), method: :put, remote: true %> +  |  + + <% end %> + <% if can? :undo_flag_as_inappropiate, comment %> - <%= link_to t('shared.undo_flag_as_inappropiate'), undo_flag_as_inappropiate_comment_path(comment), method: :put, remote: true %> +  |  + + <% end %> diff --git a/app/views/debates/_flag_as_inappropiate_actions.html.erb b/app/views/debates/_flag_as_inappropiate_actions.html.erb index 8003600e0..6db9bc5f4 100644 --- a/app/views/debates/_flag_as_inappropiate_actions.html.erb +++ b/app/views/debates/_flag_as_inappropiate_actions.html.erb @@ -1,6 +1,21 @@ <% if can? :flag_as_inappropiate, debate %> - <%= link_to t('shared.flag_as_inappropiate'), flag_as_inappropiate_debate_path(debate), method: :put, remote: true %> + + <% end %> + <% if can? :undo_flag_as_inappropiate, debate %> - <%= link_to t('shared.undo_flag_as_inappropiate'), undo_flag_as_inappropiate_debate_path(debate), method: :put, remote: true %> + + <% end %> diff --git a/app/views/debates/show.html.erb b/app/views/debates/show.html.erb index 47ff9e34f..a6765e1b0 100644 --- a/app/views/debates/show.html.erb +++ b/app/views/debates/show.html.erb @@ -41,8 +41,8 @@  •    <%= link_to t("debates.show.comments", count: @debate.comment_threads.count), "#comments" %> - - +  •  + <%= render 'debates/flag_as_inappropiate_actions', debate: @debate %> diff --git a/config/locales/en.yml b/config/locales/en.yml index ce3339b25..55e06af4e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -135,7 +135,7 @@ en: tags_cloud: tags: Topics flag_as_inappropiate: Flag as inappropiate - undo_flag_as_inappropiate: Undo flag as inappropiate + undo_flag_as_inappropiate: Undo flag collective: Collective mailer: comment: diff --git a/config/locales/es.yml b/config/locales/es.yml index 1e2cca785..d548f2334 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -135,7 +135,7 @@ es: tags_cloud: tags: Temas flag_as_inappropiate: Denunciar como inapropiado - undo_flag_as_inappropiate: Deshacer denunciar como inapropiado + undo_flag_as_inappropiate: Deshacer denuncia collective: Colectivo mailer: comment: