From dffb8e8a5eb984b39a2cadca17e519f4220d6fea Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Sat, 22 Aug 2015 10:32:45 +0200 Subject: [PATCH] Adds styles for comment as administrator --- app/assets/images/admin_avatar.png | Bin 0 -> 1867 bytes app/assets/stylesheets/debates.scss | 9 +++++++-- app/assets/stylesheets/participacion.scss | 2 +- app/assets/stylesheets/variables.scss | 2 +- app/views/comments/_comment.html.erb | 14 +++++++++----- app/views/comments/_form.html.erb | 6 ++++++ config/locales/en.yml | 4 +++- config/locales/es.yml | 2 ++ 8 files changed, 29 insertions(+), 10 deletions(-) create mode 100644 app/assets/images/admin_avatar.png diff --git a/app/assets/images/admin_avatar.png b/app/assets/images/admin_avatar.png new file mode 100644 index 0000000000000000000000000000000000000000..28ea4a143f89d279bc28ed689dc229bebf9951f4 GIT binary patch literal 1867 zcmaJ?X;2eq7~Y`La0#M9RMaIw%a!aVAtyu(IWR&HV-RqPx+EKjB-xlOB;bKs6%?_G z2UFm? zFZa>z004L?rbt!93OZl13-RrxbX5||C|s6;&%kuJ4Y8nrSc|2jpu&h`pehv6=FV?M zqX1w~uwI>lrzqov8qCN*oEV1PXeQVI5EX4VBbqD}2h-6Ey-7rUdZLaB>a`+jGDit3 z%@Q^0gm>eE2f)@_5U?vBG*$^A1v)IB2SQxEaD`hX5zS62thWRjbURmFiQr+6bJ+m%z{`fI)R{Db4@s6r<<&_0S{8tst+(}hI^N+XA zr6+xO$*kPD9hk8$dv(LKD~<~jiKn!*Tlr#>~=Xf>OA$wSB72d)3yIa21i zvU#ePt);LNY;+4CEx+-yXFE^p`+I!YrG;T5I@Xu7CqPXLpE*8saY{SF64sLzgkE@= zQ#Qo&^nz1eaxk={=oD$qJVyL=t)p~P;JCw%v#~2(hkA%AcKsUp))?OPj#Uy_8$H@q zkWK|QHCh_HJBQxgI)}sEcIQ6oe{JCnWNcHjU**)Hsv~htd){2myuXcu@pp8AQ9#vN zq3Gf?xMf*U_w$@Ff;rs=?#;5{0r~c4_sgfZUCr|;dsj%24?ZesHTeJOy*pX8uA;Tm zA0g2=958op9sl|1M=g>58Q0X7NVJ%0&JHCXe0zhm?@CM3!{CB@>}pD@t*z?5S8?xQnlnPuES}n0B4KIJ;moS3(7nX32DJ6`pC`?IilkgcC0U89&;8dD7ks zZz*>D>#)05&F|xi5@8Qgr}$QI;#LK1h&sn5Hs|~4GZS4EkFNusiQ9KM>JL3k z+E3qq<#GEdMi8HTF}2|0nL_=6*LPk;59;-s3qa)g;m;$6k8%Fq6tV
@@ -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