Merge branch 'master' into legislation-module-stable

This commit is contained in:
Amaia Castro
2016-12-27 18:07:11 +01:00
5 changed files with 70 additions and 64 deletions

View File

@@ -901,16 +901,12 @@ img.avatar, img.admin-avatar, img.moderator-avatar, img.initialjs-avatar {
} }
.author-deleted, .user-deleted { .author-deleted, .user-deleted {
background-color: rgba(255,255,255,.5);
color: rgba(0,0,0,.4); color: rgba(0,0,0,.4);
font-size: rem-calc(40); display: inline-block;
left: 11px; font-size: rem-calc(32);
position: absolute; line-height: rem-calc(32);
top: 72px; height: rem-calc(32);
} vertical-align: top;
.user-deleted {
top: -4px;
} }
.user-permissions { .user-permissions {
@@ -1601,7 +1597,10 @@ table {
} }
.comment-body { .comment-body {
margin-left: rem-calc(42);
img {
margin-right: $line-height/2;
}
.reply { .reply {
background: white; background: white;
@@ -1609,20 +1608,28 @@ table {
border-left: 0; border-left: 0;
border-right: 0; border-right: 0;
font-size: $small-font-size; font-size: $small-font-size;
margin: rem-calc(6) 0; margin: $line-height/4 0;
padding: rem-calc(6); padding: $line-height/4;
position: relative; position: relative;
a.relative, [class^="icon-arrow"] {
padding-left: $line-height/2;
}
[class^="icon-arrow"] { [class^="icon-arrow"] {
font-size: rem-calc(18); font-size: $base-font-size;
left: -20px; left: -20px;
position: absolute; position: absolute;
top: 0; top: -1px;
} }
.divider { .divider {
color: $text-light; color: $text-light;
} }
form {
margin-top: $line-height/2;
}
} }
.comment-user { .comment-user {
@@ -1652,13 +1659,13 @@ table {
.is-deleted { .is-deleted {
background: #E7E7E7; background: #E7E7E7;
margin-left: rem-calc(42); margin-left: $line-height;
padding: $line-height/4 $line-height/2; padding: $line-height/2;
} }
.comment-children { .comment-children {
border-left: 1px dashed $border; border-left: 1px dashed $border;
margin-left: rem-calc(42); margin-left: $line-height;
padding-left: $line-height/4; padding-left: $line-height/4;
@media only screen and (max-width: 40em) { @media only screen and (max-width: 40em) {
@@ -1668,9 +1675,9 @@ table {
.comment-info { .comment-info {
color: $text-medium; color: $text-medium;
display: inline-block;
font-size: $small-font-size; font-size: $small-font-size;
margin-top: $line-height/4; line-height: rem-calc(32); // Same as avatar height
vertical-align: middle;
span.user-name { span.user-name {
color: $text; color: $text;

View File

@@ -326,9 +326,13 @@
clear: both; clear: both;
color: $text-medium; color: $text-medium;
font-size: $small-font-size; font-size: $small-font-size;
min-height: $line-height*2; margin-bottom: $line-height/2;
position: relative; position: relative;
span {
line-height: rem-calc(32); // Same as avatar height
}
a { a {
color: $text-medium; color: $text-medium;
} }
@@ -338,15 +342,6 @@
line-height: $line-height; line-height: $line-height;
margin: 0; margin: 0;
} }
.author-deleted {
left: 0;
top: 4px;
}
.author.deleted {
margin-left: rem-calc(48);
}
} }
.debate-description, .proposal-description { .debate-description, .proposal-description {
@@ -371,9 +366,9 @@
} }
.author-photo { .author-photo {
line-height: $line-height*2; line-height: rem-calc(32);
margin-right: rem-calc(6); margin-right: rem-calc(6);
vertical-align: middle; vertical-align: top;
width: 32px; width: 32px;
} }

View File

@@ -1,7 +1,7 @@
<% cache [locale_and_user_status(comment), comment, commentable_cache_key(comment.commentable), comment.author, (@comment_flags[comment.id] if @comment_flags)] do %> <% cache [locale_and_user_status(comment), comment, commentable_cache_key(comment.commentable), comment.author, (@comment_flags[comment.id] if @comment_flags)] do %>
<div class="row"> <div class="row">
<ul id="<%= dom_id(comment) %>" class="comment no-bullet small-12 column"> <ul id="<%= dom_id(comment) %>" class="comment no-bullet small-12 column">
<li class="comment-body">
<% if comment.hidden? || comment.user.hidden? %> <% if comment.hidden? || comment.user.hidden? %>
<% if comment.children.size > 0 %> <% if comment.children.size > 0 %>
<div class="is-deleted"> <div class="is-deleted">
@@ -23,7 +23,6 @@
<% end %> <% end %>
<% end %> <% end %>
<li class="comment-body">
<div class="comment-info"> <div class="comment-info">
<% if comment.as_administrator? %> <% if comment.as_administrator? %>
@@ -58,7 +57,7 @@
<% end %> <% end %>
&nbsp;&bull;&nbsp;<time><%= l comment.created_at.to_datetime, format: :datetime %></time> &nbsp;&bull;&nbsp;<span><%= l comment.created_at.to_datetime, format: :datetime %></span>
</div> </div>
<div class="comment-user <div class="comment-user
@@ -68,12 +67,12 @@
</div> </div>
<div id="<%= dom_id(comment) %>_reply" class="reply"> <div id="<%= dom_id(comment) %>_reply" class="reply">
<span id="<%= dom_id(comment) %>_votes" class="comment-votes float-right"> <div id="<%= dom_id(comment) %>_votes" class="comment-votes float-right">
<%= render 'comments/votes', comment: comment %> <%= render 'comments/votes', comment: comment %>
</span> </div>
<% if comment.children.size > 0 %> <% if comment.children.size > 0 %>
<%= link_to "", class: "js-toggle-children relative", data: {'id': "#{dom_id(comment)}"} do %> <%= link_to "#{dom_id(comment)}", class: "js-toggle-children relative", data: {'id': "#{dom_id(comment)}"} do %>
<span class="sr-only js-child-toggle" style="display: none;"><%= t("shared.show") %></span> <span class="sr-only js-child-toggle" style="display: none;"><%= t("shared.show") %></span>
<span class="sr-only js-child-toggle"><%= t("shared.hide") %></span> <span class="sr-only js-child-toggle"><%= t("shared.hide") %></span>
<span id="<%= dom_id(comment) %>_children_arrow" class="icon-arrow-down"></span> <%= t("comments.comment.responses", count: comment.children.size) %> <span id="<%= dom_id(comment) %>_children_arrow" class="icon-arrow-down"></span> <%= t("comments.comment.responses", count: comment.children.size) %>
@@ -92,13 +91,15 @@
<%= render 'comments/form', {commentable: comment.commentable, parent_id: comment.id, toggeable: true} %> <%= render 'comments/form', {commentable: comment.commentable, parent_id: comment.id, toggeable: true} %>
<% end %> <% end %>
</div> </div>
</li>
<% end %> <% end %>
</li>
<li>
<ul id="<%= dom_id(comment) %>_children" class="no-bullet comment-children"> <ul id="<%= dom_id(comment) %>_children" class="no-bullet comment-children">
<% child_comments_of(comment).each do |child| %> <% child_comments_of(comment).each do |child| %>
<%= render 'comments/comment', comment: child %> <%= render 'comments/comment', comment: child %>
<% end %> <% end %>
</ul> </ul>
</li>
</ul> </ul>
</div> </div>
<% end %> <% end %>

View File

@@ -58,6 +58,7 @@
</a> </a>
<% end %> <% end %>
</div> </div>
</aside>
</div> </div>
</div> </div>
<% end %> <% end %>

View File

@@ -1,9 +1,9 @@
<div class="relative"> <div class="relative">
<%= link_to t("shared.advanced_search.title"), "#", id: 'js-advanced-search-title', class: "advanced-search small" %> <%= link_to t("shared.advanced_search.title"), "#advanced_search_form", id: 'js-advanced-search-title', class: "advanced-search small" %>
</div> </div>
<div class="row advanced-search-form"> <div class="row advanced-search-form">
<%= form_tag search_path, method: :get do %> <%= form_tag search_path, id: "advanced_search_form", method: :get do %>
<div id='js-advanced-search' data-advanced-search-terms=<%= @advanced_search_terms.present? %> style="display: none"> <div id='js-advanced-search' data-advanced-search-terms=<%= @advanced_search_terms.present? %> style="display: none">
<div class="small-12 column"> <div class="small-12 column">
@@ -36,6 +36,7 @@
</label> </label>
<%= text_field_tag 'advanced_search[date_min]', <%= text_field_tag 'advanced_search[date_min]',
params[:advanced_search].try(:[], :date_min), params[:advanced_search].try(:[], :date_min),
type: "date",
placeholder: t("shared.advanced_search.date_placeholder"), placeholder: t("shared.advanced_search.date_placeholder"),
class: 'js-calendar' %> class: 'js-calendar' %>
</div> </div>
@@ -45,6 +46,7 @@
</label> </label>
<%= text_field_tag 'advanced_search[date_max]', <%= text_field_tag 'advanced_search[date_max]',
params[:advanced_search].try(:[], :date_max), params[:advanced_search].try(:[], :date_max),
type: "date",
placeholder: t("shared.advanced_search.date_placeholder"), placeholder: t("shared.advanced_search.date_placeholder"),
class: 'js-calendar' %> class: 'js-calendar' %>
</div> </div>