Adds styles for comment as administrator
This commit is contained in:
committed by
Juanjo Bazán
parent
cfd25042b6
commit
dffb8e8a5e
BIN
app/assets/images/admin_avatar.png
Normal file
BIN
app/assets/images/admin_avatar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@@ -249,6 +249,7 @@
|
|||||||
|
|
||||||
.panel {
|
.panel {
|
||||||
border: 0;
|
border: 0;
|
||||||
|
border-radius: 0;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
min-height: rem-calc(192);
|
min-height: rem-calc(192);
|
||||||
padding: 0 rem-calc(12) rem-calc(2) rem-calc(12);
|
padding: 0 rem-calc(12) rem-calc(2) rem-calc(12);
|
||||||
@@ -568,10 +569,14 @@
|
|||||||
padding: rem-calc(6) rem-calc(12);
|
padding: rem-calc(6) rem-calc(12);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-moderator {
|
&.is-admin {
|
||||||
background: $comment-moderator;
|
background: $comment-admin;
|
||||||
padding: rem-calc(6) rem-calc(12);
|
padding: rem-calc(6) rem-calc(12);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.is-moderator {
|
||||||
|
@extend .is-admin;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -692,7 +692,7 @@ form {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
img.moderator-avatar {
|
img.admin-avatar, img.moderator-avatar {
|
||||||
border-radius: rem-calc(1000);
|
border-radius: rem-calc(1000);
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ $association: #C0392B;
|
|||||||
|
|
||||||
$comment-author: rgba(45,144,248,.15);
|
$comment-author: rgba(45,144,248,.15);
|
||||||
$comment-level-5: rgba(255,241,204,1);
|
$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);
|
$comment-official: rgba(70,219,145,.3);
|
||||||
|
|
||||||
// 06. Responsive
|
// 06. Responsive
|
||||||
|
|||||||
@@ -15,9 +15,9 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<!--
|
<!--
|
||||||
<% if comment.user.moderator? %> <!-- AND has activated CHECKBOX comment as moderator ->
|
<% if comment.user.moderator? %> <!-- AND has activated CHECKBOX comment as moderator ->
|
||||||
<%= image_tag('moderator_avatar.png', size: 32, class: "moderator-avatar left") %>
|
<%= image_tag("moderator_avatar.png", size: 32, class: "moderator-avatar left") %>
|
||||||
<% else %>
|
<% elsif comment.user.administrator? %> <!-- AND has activated CHECKBOX comment as admin ->
|
||||||
<%= avatar_image(comment.user, size: 32, class: "left") %>
|
<%= image_tag("admin_avatar.png", size: 32, class: "admin-avatar left") %>
|
||||||
<% end %>
|
<% end %>
|
||||||
-->
|
-->
|
||||||
<div class="comment-body">
|
<div class="comment-body">
|
||||||
@@ -28,7 +28,9 @@
|
|||||||
<% else %>
|
<% else %>
|
||||||
|
|
||||||
<% if comment.user.moderator? %> <!-- AND activate moderator CHECKBOX -->
|
<% if comment.user.moderator? %> <!-- AND activate moderator CHECKBOX -->
|
||||||
<span class="user-name"><%= t("debates.comment.moderator") %></span>
|
<span class="user-name"><%= t("debates.comment.moderator") %> #ID</span> <!-- Add ID to Moderator name -->
|
||||||
|
<% elsif comment.user.administrator? %> <!-- AND activate administrator CHECKBOX -->
|
||||||
|
<span class="user-name"><%= t("debates.comment.admin") %> #ID</span> <!-- Add ID to Admin name -->
|
||||||
<% else %>
|
<% else %>
|
||||||
<span class="user-name"><%= comment.user.name %></span>
|
<span class="user-name"><%= comment.user.name %></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -64,8 +66,10 @@
|
|||||||
<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) -->
|
<% 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>
|
<p class="comment-user is-moderator"><%= comment.body %></p>
|
||||||
|
<% elsif comment.user.administrator? %> <!-- AND has activated CHECKBOX comment as admin (all badges are hidden: 100% anonymous) -->
|
||||||
|
<p class="comment-user is-admin"><%= 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 %>
|
||||||
|
|||||||
@@ -12,5 +12,11 @@
|
|||||||
<%#= f.label :, t("comments.form.comment_as_moderator"), class: "checkbox" %>
|
<%#= f.label :, t("comments.form.comment_as_moderator"), class: "checkbox" %>
|
||||||
</div>
|
</div>
|
||||||
end -->
|
end -->
|
||||||
|
<!-- if user is admin
|
||||||
|
<div class="right">
|
||||||
|
<%#= f.check_box :, label: false %>
|
||||||
|
<%#= f.label :, t("comments.form.comment_as_admin"), class: "checkbox" %>
|
||||||
|
</div>
|
||||||
|
end -->
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ en:
|
|||||||
comment:
|
comment:
|
||||||
author: Debate's author
|
author: Debate's author
|
||||||
moderator: Moderator
|
moderator: Moderator
|
||||||
|
admin: Administrator
|
||||||
deleted: This comment has been deleted
|
deleted: This comment has been deleted
|
||||||
user_deleted: Deleted user
|
user_deleted: Deleted user
|
||||||
responses:
|
responses:
|
||||||
@@ -96,7 +97,8 @@ en:
|
|||||||
comments:
|
comments:
|
||||||
form:
|
form:
|
||||||
leave_comment: Write a comment
|
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:
|
comments_helper:
|
||||||
comment_link: Comment
|
comment_link: Comment
|
||||||
comment_button: Publish comment
|
comment_button: Publish comment
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ es:
|
|||||||
comment:
|
comment:
|
||||||
author: Autor del debate
|
author: Autor del debate
|
||||||
moderator: Moderador
|
moderator: Moderador
|
||||||
|
admin: Administrador
|
||||||
deleted: Este comentario ha sido eliminado
|
deleted: Este comentario ha sido eliminado
|
||||||
user_deleted: Usuario eliminado
|
user_deleted: Usuario eliminado
|
||||||
responses:
|
responses:
|
||||||
@@ -97,6 +98,7 @@ es:
|
|||||||
form:
|
form:
|
||||||
leave_comment: Deja tu comentario
|
leave_comment: Deja tu comentario
|
||||||
comment_as_moderator: Comentar como moderador
|
comment_as_moderator: Comentar como moderador
|
||||||
|
comment_as_admin: Comentar como administrador
|
||||||
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