From cfd25042b6e5ec6c7aae24059e1798a407cbcc16 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 19 Aug 2015 18:58:52 +0200 Subject: [PATCH] Adds styles for comment as moderator --- app/assets/images/moderator_avatar.png | Bin 0 -> 1926 bytes app/assets/stylesheets/debates.scss | 5 +++++ app/assets/stylesheets/participacion.scss | 23 ++++++++++++++-------- app/assets/stylesheets/variables.scss | 3 ++- app/views/comments/_comment.html.erb | 19 +++++++++++++++--- app/views/comments/_form.html.erb | 9 ++++++++- config/locales/en.yml | 4 +++- config/locales/es.yml | 4 +++- 8 files changed, 52 insertions(+), 15 deletions(-) create mode 100644 app/assets/images/moderator_avatar.png diff --git a/app/assets/images/moderator_avatar.png b/app/assets/images/moderator_avatar.png new file mode 100644 index 0000000000000000000000000000000000000000..1c726e57beee873d24c8d300ce31bb149b600154 GIT binary patch literal 1926 zcmaJ?X;c$e7#$L=xJ1-qkwqCtD72bP79u1PASR?x3FoIY?>uXCQzJt?x_7aOD9w@^XVzGD2RqWO2RdTrVd0`hf^(riK;cs8c`6U28CXw z!&R6Tv??NU%!ueV9STRF2F$2e5RHqSWp$NxiAq7Y;Es<+C5?-X2`mIGrYv%&G@5QV&?V4a3@y>ZYJ)`(_kTAYHI5KA|$~% z(*A2KHsOj-XJruzQ$3|Cn`d}=@zI_azm`9%C~W`f z$C|w^q~!B$jGrqfKIoLXdCqXnvFq#L7oC;eoe{Vy^ke%)Q+ge`*bQByZ8uhpx2*3F zK`HJp|N71jXvlq*7IY=dJuFV16@c}+nEyK66f!w8%Jts5vz@vUkR?CGWK6yY) ztY^0%{MzvnO!eW|d)IqgobOva+>Q=`Ll1gLicQ>9;NzmdDHmIBX4j34ZoFz&5jF5+ z!JPJTd4-dVT3Yed<=*X1zg%Bj*LG|Nb4;UIVmGR)uONq6EpKnHhC}xuQ&BsBWGZraX4F_% z;g=>+f|t^ zrL5S!6KD(av$wV<1#Ma!Bc6572N;~`K+A5o_eQm!VH18%atbOPZ(L8VIQ18xB zn>PE8cbZu^(LZa-VVlh6#nHDdSq|bRK`Qy z{5JWddAm+REo%p! <% end %> - +
<% if comment.user.hidden? %> <%= t("debates.comment.user_deleted") %> <% else %> - <%= comment.user.name %> + + <% if comment.user.moderator? %> + <%= t("debates.comment.moderator") %> + <% else %> + <%= comment.user.name %> + <% end %> + <% if comment.user.official? %>  •  @@ -52,6 +64,8 @@

<%= comment.body %>

<% elsif comment.user.official? %>

<%= comment.body %>

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

<%= comment.body %>

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

<%= comment.body %>

<% else %> @@ -83,6 +97,5 @@
<%= render comment.children.with_hidden.reorder('id DESC, lft') %>
-
diff --git a/app/views/comments/_form.html.erb b/app/views/comments/_form.html.erb index 5e34a9f84..45cdcecab 100644 --- a/app/views/comments/_form.html.erb +++ b/app/views/comments/_form.html.erb @@ -4,6 +4,13 @@ <%= f.hidden_field :commentable_type, value: parent.class %> <%= f.hidden_field :commentable_id, value: parent.id %> - <%= f.submit comment_button_text(parent), class: "button radius small" %> + <%= f.submit comment_button_text(parent), class: "button radius small inline-block" %> + + <% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index b47d06c44..ed6f1b2ae 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -49,6 +49,7 @@ en: other: "%{count} votes" comment: author: Debate's author + moderator: Moderator deleted: This comment has been deleted user_deleted: Deleted user responses: @@ -94,7 +95,8 @@ en: recommendation_three: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore" comments: form: - leave_comment: Write a comment + leave_comment: Write a comment + comment_as_moderator: Comentar como moderador comments_helper: comment_link: Comment comment_button: Publish comment diff --git a/config/locales/es.yml b/config/locales/es.yml index ef903082f..31be240ba 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -49,6 +49,7 @@ es: other: "%{count} votos" comment: author: Autor del debate + moderator: Moderador deleted: Este comentario ha sido eliminado user_deleted: Usuario eliminado responses: @@ -94,7 +95,8 @@ es: recommendation_three: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore" comments: form: - leave_comment: Deja tu comentario + leave_comment: Deja tu comentario + comment_as_moderator: Comentar como moderador comments_helper: comment_link: Comentar comment_button: Publicar comentario