From e5fb90f954cb14ffd8eb7209aa8decaf602a5927 Mon Sep 17 00:00:00 2001 From: Alessandro Cuoghi Date: Tue, 8 Aug 2017 17:01:58 +0200 Subject: [PATCH] Renaming class. Topic show: Added author_info. --- app/assets/stylesheets/community.scss | 12 +++++++++++- app/assets/stylesheets/participation.scss | 7 +++++-- app/views/communities/show.html.erb | 2 +- app/views/topics/_comments.html.erb | 13 ++++++++----- app/views/topics/show.html.erb | 11 +++++++++-- 5 files changed, 34 insertions(+), 11 deletions(-) diff --git a/app/assets/stylesheets/community.scss b/app/assets/stylesheets/community.scss index 0c788a2fa..13ff3bf60 100644 --- a/app/assets/stylesheets/community.scss +++ b/app/assets/stylesheets/community.scss @@ -33,15 +33,25 @@ } } -.communities-participantes{ +.communities-participants{ .comment-body{ display: inline-block; float: left; margin-right: $line-height; + margin-bottom: $line-height; } } .topic-show{ p{ margin-bottom: 0; } + ul li { + margin-bottom:0; + } + .comments{ + .first-comment{ + margin-top: $line-height; + margin-bottom: $line-height; + } + } } diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index 8d79eca55..84c223170 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -316,7 +316,9 @@ .debate-quiz, .budget-investment-show, .draft-panels, -.debate-questions { +.debate-questions, +.communities-show, +.topic-show { p { word-wrap: break-word; @@ -350,7 +352,8 @@ .debate-info, .proposal-info, .investment-project-info, - .budget-investment-show { + .budget-investment-show, + .topic-info { clear: both; color: $text-medium; font-size: $small-font-size; diff --git a/app/views/communities/show.html.erb b/app/views/communities/show.html.erb index ea4fc8aae..69bf729c0 100644 --- a/app/views/communities/show.html.erb +++ b/app/views/communities/show.html.erb @@ -22,7 +22,7 @@ -
+
  • <%= link_to "#tab-participantes" do %> diff --git a/app/views/topics/_comments.html.erb b/app/views/topics/_comments.html.erb index ccab89847..84d7b1ac3 100644 --- a/app/views/topics/_comments.html.erb +++ b/app/views/topics/_comments.html.erb @@ -1,13 +1,20 @@ <% cache [locale_and_user_status, @current_order, commentable_cache_key(@topic), @comment_tree.comments, @comment_tree.comment_authors, @topic.comments_count, @comment_flags] do %>
    +
    <%= render 'shared/wide_order_selector', i18n_namespace: "comments" %> + + <% @comment_tree.root_comments.each do |comment| %> + + <%= render 'comments/comment', comment: comment %> + <% end %> + + <%= paginate @comment_tree.root_comments %> <% if user_signed_in? %> <%= render 'comments/form', {commentable: @topic, parent_id: nil, toggeable: false} %> <% else %>
    -
    <%= t("topics.show.login_to_comment", signin: link_to(t("votes.signin"), new_user_session_path), @@ -15,10 +22,6 @@
    <% end %> - <% @comment_tree.root_comments.each do |comment| %> - <%= render 'comments/comment', comment: comment %> - <% end %> - <%= paginate @comment_tree.root_comments %>
    <% end %> diff --git a/app/views/topics/show.html.erb b/app/views/topics/show.html.erb index 51fe661e2..b5eb454fa 100644 --- a/app/views/topics/show.html.erb +++ b/app/views/topics/show.html.erb @@ -2,12 +2,19 @@
    <%= render "shared/back_link" %>
    -

    Comunidad: <%= @community.proposal.title %>

    +

    Comunidad de la propuesta: <%= @community.proposal.title %>

    <%= @topic.title %>

    +
    + <%= render '/shared/author_info', resource: @topic %> + +  •  + <%= l @topic.created_at.to_date %> +  •  +   +
    <%= render "topics/filter_subnav" %> -
    <%= render "topics/comments" %>