Adds styles for comment as moderator
This commit is contained in:
committed by
Juanjo Bazán
parent
f1b625aadd
commit
cfd25042b6
BIN
app/assets/images/moderator_avatar.png
Normal file
BIN
app/assets/images/moderator_avatar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
@@ -567,6 +567,11 @@
|
|||||||
background: $comment-author;
|
background: $comment-author;
|
||||||
padding: rem-calc(6) rem-calc(12);
|
padding: rem-calc(6) rem-calc(12);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.is-moderator {
|
||||||
|
background: $comment-moderator;
|
||||||
|
padding: rem-calc(6) rem-calc(12);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -548,19 +548,19 @@ form {
|
|||||||
line-height: $line-height;
|
line-height: $line-height;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type]:not([type=submit]):not([type=file]) {
|
input[type]:not([type=submit]):not([type=file]):not([type=checkbox]) {
|
||||||
background: $input-bg;
|
background: $input-bg;
|
||||||
height: rem-calc(48);
|
height: rem-calc(48);
|
||||||
margin-bottom: rem-calc(16);
|
margin-bottom: rem-calc(16);
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="checkbox"] {
|
input[type="checkbox"] + label,
|
||||||
height: rem-calc(24) !important;
|
input[type="radio"] + label {
|
||||||
margin: 0 !important;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=file] {
|
input[type=file] {
|
||||||
margin: rem-calc(12) 0;
|
margin: rem-calc(12) 0 rem-calc(12) rem-calc(6);
|
||||||
}
|
}
|
||||||
|
|
||||||
.note {
|
.note {
|
||||||
@@ -579,8 +579,7 @@ form {
|
|||||||
font-size: rem-calc(14);
|
font-size: rem-calc(14);
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
line-height: $line-height;
|
line-height: $line-height;
|
||||||
margin: 0 0 0 rem-calc(6);
|
vertical-align: middle;
|
||||||
vertical-align: top;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.captcha {
|
.captcha {
|
||||||
@@ -591,6 +590,10 @@ form {
|
|||||||
margin-bottom: 0 !important;
|
margin-bottom: 0 !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.button.margin-top {
|
||||||
|
margin-top: rem-calc(24);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 09. Alerts
|
// 09. Alerts
|
||||||
@@ -689,11 +692,15 @@ form {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
img.initialjs-avatar, img.avatar {
|
img.moderator-avatar {
|
||||||
border-radius: rem-calc(1000);
|
border-radius: rem-calc(1000);
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
img.initialjs-avatar {
|
||||||
|
@extend .moderator-avatar;
|
||||||
|
}
|
||||||
|
|
||||||
.author-deleted {
|
.author-deleted {
|
||||||
background-color: rgba(255,255,255,.5);
|
background-color: rgba(255,255,255,.5);
|
||||||
color: rgba(0,0,0,.4);
|
color: rgba(0,0,0,.4);
|
||||||
|
|||||||
@@ -77,8 +77,9 @@ $author: #008CCF;
|
|||||||
$association: #C0392B;
|
$association: #C0392B;
|
||||||
|
|
||||||
$comment-author: rgba(45,144,248,.15);
|
$comment-author: rgba(45,144,248,.15);
|
||||||
$comment-official: rgba(70,219,145,.3);
|
|
||||||
$comment-level-5: rgba(255,241,204,1);
|
$comment-level-5: rgba(255,241,204,1);
|
||||||
|
$comment-moderator: rgba(45,144,248,.15);
|
||||||
|
$comment-official: rgba(70,219,145,.3);
|
||||||
|
|
||||||
// 06. Responsive
|
// 06. Responsive
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
@@ -13,14 +13,26 @@
|
|||||||
<% if comment.user.hidden? %>
|
<% if comment.user.hidden? %>
|
||||||
<i class="icon-deleted user-deleted"></i>
|
<i class="icon-deleted user-deleted"></i>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<!--
|
||||||
|
<% if comment.user.moderator? %> <!-- AND has activated CHECKBOX comment as moderator ->
|
||||||
|
<%= image_tag('moderator_avatar.png', size: 32, class: "moderator-avatar left") %>
|
||||||
|
<% else %>
|
||||||
|
<%= avatar_image(comment.user, size: 32, class: "left") %>
|
||||||
|
<% end %>
|
||||||
|
-->
|
||||||
<div class="comment-body">
|
<div class="comment-body">
|
||||||
<div class="comment-info">
|
<div class="comment-info">
|
||||||
|
|
||||||
<% if comment.user.hidden? %>
|
<% if comment.user.hidden? %>
|
||||||
<span class="user-name"><%= t("debates.comment.user_deleted") %></span>
|
<span class="user-name"><%= t("debates.comment.user_deleted") %></span>
|
||||||
<% else %>
|
<% else %>
|
||||||
<span class="user-name"><%= comment.user.name %></span>
|
|
||||||
|
<% if comment.user.moderator? %> <!-- AND activate moderator CHECKBOX -->
|
||||||
|
<span class="user-name"><%= t("debates.comment.moderator") %></span>
|
||||||
|
<% else %>
|
||||||
|
<span class="user-name"><%= comment.user.name %></span>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<% if comment.user.official? %>
|
<% if comment.user.official? %>
|
||||||
•
|
•
|
||||||
<span class="label round level-<%= comment.user.official_level %>">
|
<span class="label round level-<%= comment.user.official_level %>">
|
||||||
@@ -52,6 +64,8 @@
|
|||||||
<p class="comment-user level-<%= comment.user.official_level %> is-author"><%= comment.body %></p>
|
<p class="comment-user level-<%= comment.user.official_level %> is-author"><%= comment.body %></p>
|
||||||
<% elsif comment.user.official? %>
|
<% elsif comment.user.official? %>
|
||||||
<p class="comment-user level-<%= comment.user.official_level %>"><%= comment.body %></p>
|
<p class="comment-user level-<%= comment.user.official_level %>"><%= comment.body %></p>
|
||||||
|
<% elsif comment.user.moderator? %> <!-- AND has activated CHECKBOX comment as moderator & all badges are hidden (100% anonymous) -->
|
||||||
|
<p class="comment-user is-moderator"><%= comment.body %></p>
|
||||||
<% elsif comment.user_id == @debate.author_id %>
|
<% elsif comment.user_id == @debate.author_id %>
|
||||||
<p class="comment-user is-author"><%= comment.body %></p>
|
<p class="comment-user is-author"><%= comment.body %></p>
|
||||||
<% else %>
|
<% else %>
|
||||||
@@ -83,6 +97,5 @@
|
|||||||
<div class="comment-children">
|
<div class="comment-children">
|
||||||
<%= render comment.children.with_hidden.reorder('id DESC, lft') %>
|
<%= render comment.children.with_hidden.reorder('id DESC, lft') %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,6 +4,13 @@
|
|||||||
<%= f.hidden_field :commentable_type, value: parent.class %>
|
<%= f.hidden_field :commentable_type, value: parent.class %>
|
||||||
<%= f.hidden_field :commentable_id, value: parent.id %>
|
<%= 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" %>
|
||||||
|
|
||||||
|
<!-- if user is moderator
|
||||||
|
<div class="right">
|
||||||
|
<%#= f.check_box :, label: false %>
|
||||||
|
<%#= f.label :, t("comments.form.comment_as_moderator"), class: "checkbox" %>
|
||||||
|
</div>
|
||||||
|
end -->
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ en:
|
|||||||
other: "%{count} votes"
|
other: "%{count} votes"
|
||||||
comment:
|
comment:
|
||||||
author: Debate's author
|
author: Debate's author
|
||||||
|
moderator: Moderator
|
||||||
deleted: This comment has been deleted
|
deleted: This comment has been deleted
|
||||||
user_deleted: Deleted user
|
user_deleted: Deleted user
|
||||||
responses:
|
responses:
|
||||||
@@ -94,7 +95,8 @@ en:
|
|||||||
recommendation_three: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore"
|
recommendation_three: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore"
|
||||||
comments:
|
comments:
|
||||||
form:
|
form:
|
||||||
leave_comment: Write a comment
|
leave_comment: Write a comment
|
||||||
|
comment_as_moderator: Comentar como moderador
|
||||||
comments_helper:
|
comments_helper:
|
||||||
comment_link: Comment
|
comment_link: Comment
|
||||||
comment_button: Publish comment
|
comment_button: Publish comment
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ es:
|
|||||||
other: "%{count} votos"
|
other: "%{count} votos"
|
||||||
comment:
|
comment:
|
||||||
author: Autor del debate
|
author: Autor del debate
|
||||||
|
moderator: Moderador
|
||||||
deleted: Este comentario ha sido eliminado
|
deleted: Este comentario ha sido eliminado
|
||||||
user_deleted: Usuario eliminado
|
user_deleted: Usuario eliminado
|
||||||
responses:
|
responses:
|
||||||
@@ -94,7 +95,8 @@ es:
|
|||||||
recommendation_three: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore"
|
recommendation_three: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore"
|
||||||
comments:
|
comments:
|
||||||
form:
|
form:
|
||||||
leave_comment: Deja tu comentario
|
leave_comment: Deja tu comentario
|
||||||
|
comment_as_moderator: Comentar como moderador
|
||||||
comments_helper:
|
comments_helper:
|
||||||
comment_link: Comentar
|
comment_link: Comentar
|
||||||
comment_button: Publicar comentario
|
comment_button: Publicar comentario
|
||||||
|
|||||||
Reference in New Issue
Block a user