diff --git a/app/assets/images/admin_avatar.png b/app/assets/images/admin_avatar.png new file mode 100644 index 000000000..28ea4a143 Binary files /dev/null and b/app/assets/images/admin_avatar.png differ diff --git a/app/assets/stylesheets/debates.scss b/app/assets/stylesheets/debates.scss index bbe0d034d..66ea491af 100644 --- a/app/assets/stylesheets/debates.scss +++ b/app/assets/stylesheets/debates.scss @@ -249,6 +249,7 @@ .panel { border: 0; + border-radius: 0; margin-bottom: 0; min-height: rem-calc(192); padding: 0 rem-calc(12) rem-calc(2) rem-calc(12); @@ -568,10 +569,14 @@ padding: rem-calc(6) rem-calc(12); } - &.is-moderator { - background: $comment-moderator; + &.is-admin { + background: $comment-admin; padding: rem-calc(6) rem-calc(12); } + + &.is-moderator { + @extend .is-admin; + } } } diff --git a/app/assets/stylesheets/participacion.scss b/app/assets/stylesheets/participacion.scss index 15becbaf5..485dbfd60 100644 --- a/app/assets/stylesheets/participacion.scss +++ b/app/assets/stylesheets/participacion.scss @@ -692,7 +692,7 @@ form { } } -img.moderator-avatar { +img.admin-avatar, img.moderator-avatar { border-radius: rem-calc(1000); position: relative; } diff --git a/app/assets/stylesheets/variables.scss b/app/assets/stylesheets/variables.scss index 1f06906d6..4be7028e3 100644 --- a/app/assets/stylesheets/variables.scss +++ b/app/assets/stylesheets/variables.scss @@ -78,7 +78,7 @@ $association: #C0392B; $comment-author: rgba(45,144,248,.15); $comment-level-5: rgba(255,241,204,1); -$comment-moderator: rgba(45,144,248,.15); +$comment-admin: rgba(45,144,248,.15); $comment-official: rgba(70,219,145,.3); // 06. Responsive diff --git a/app/views/comments/_comment.html.erb b/app/views/comments/_comment.html.erb index d0d1dcd7c..449619c9d 100644 --- a/app/views/comments/_comment.html.erb +++ b/app/views/comments/_comment.html.erb @@ -15,9 +15,9 @@ <% end %>
@@ -28,7 +28,9 @@ <% else %> <% if comment.user.moderator? %> - <%= t("debates.comment.moderator") %> + <%= t("debates.comment.moderator") %> #ID + <% elsif comment.user.administrator? %> + <%= t("debates.comment.admin") %> #ID <% else %> <%= comment.user.name %> <% end %> @@ -64,8 +66,10 @@

<%= comment.body %>

<% elsif comment.user.official? %>

<%= comment.body %>

- <% elsif comment.user.moderator? %> + <% elsif comment.user.moderator? %>

<%= comment.body %>

+ <% elsif comment.user.administrator? %> +

<%= comment.body %>

<% elsif comment.user_id == @debate.author_id %>

<%= comment.body %>

<% else %> diff --git a/app/views/comments/_form.html.erb b/app/views/comments/_form.html.erb index 45cdcecab..438537627 100644 --- a/app/views/comments/_form.html.erb +++ b/app/views/comments/_form.html.erb @@ -12,5 +12,11 @@ <%#= f.label :, t("comments.form.comment_as_moderator"), class: "checkbox" %>
end --> + <% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index ed6f1b2ae..ce3339b25 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -50,6 +50,7 @@ en: comment: author: Debate's author moderator: Moderator + admin: Administrator deleted: This comment has been deleted user_deleted: Deleted user responses: @@ -96,7 +97,8 @@ en: comments: form: leave_comment: Write a comment - comment_as_moderator: Comentar como moderador + comment_as_moderator: Comment as moderator + comment_as_admin: Comment as administrator comments_helper: comment_link: Comment comment_button: Publish comment diff --git a/config/locales/es.yml b/config/locales/es.yml index 31be240ba..871cc023c 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -50,6 +50,7 @@ es: comment: author: Autor del debate moderator: Moderador + admin: Administrador deleted: Este comentario ha sido eliminado user_deleted: Usuario eliminado responses: @@ -97,6 +98,7 @@ es: form: leave_comment: Deja tu comentario comment_as_moderator: Comentar como moderador + comment_as_admin: Comentar como administrador comments_helper: comment_link: Comentar comment_button: Publicar comentario