From: Tom Hughes Date: Wed, 14 Feb 2024 18:43:26 +0000 (+0000) Subject: Merge remote-tracking branch 'upstream/pull/4521' X-Git-Tag: live~1263 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/d22e851557581fe92d837fb99705e5541582c9fe?hp=50d799397aa283fd591ce26c6f957c6b29c264b3 Merge remote-tracking branch 'upstream/pull/4521' --- diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index f0746117d..b5bd5adec 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -827,14 +827,11 @@ tr.turn:hover { height: 400px; display: none; } - .comments { - max-width: 740px; + .diary-comment .col-auto { + width: 62px; } - .diary-comment { - border-top: 1px dashed $grey; - &:first-child { - border-top: 1px solid $grey; - } + .diary-comment .col { + max-width: 690px; } } diff --git a/app/views/diary_entries/_diary_comment.html.erb b/app/views/diary_entries/_diary_comment.html.erb index 238f4d43c..04e011574 100644 --- a/app/views/diary_entries/_diary_comment.html.erb +++ b/app/views/diary_entries/_diary_comment.html.erb @@ -1,5 +1,5 @@ -
"> -
+
"> +
<%= user_thumbnail diary_comment.user %>
diff --git a/app/views/diary_entries/show.html.erb b/app/views/diary_entries/show.html.erb index 5bfdfa17b..63ab89b8f 100644 --- a/app/views/diary_entries/show.html.erb +++ b/app/views/diary_entries/show.html.erb @@ -12,11 +12,23 @@ <%= render @entry %> -
-<%= render :partial => "diary_comment", :collection => @comments %> -
+
+
+

<%= t(".discussion") %>

-
+ <% if current_user %> +
+ <% if @entry.subscribers.exists?(current_user.id) %> + <%= link_to t("javascripts.changesets.show.unsubscribe"), diary_entry_unsubscribe_path(:display_name => @entry.user.display_name, :id => @entry.id), :method => :post, :class => "btn btn-sm btn-primary" %> + <% else %> + <%= link_to t("javascripts.changesets.show.subscribe"), diary_entry_subscribe_path(:display_name => @entry.user.display_name, :id => @entry.id), :method => :post, :class => "btn btn-sm btn-primary" %> + <% end %> +
+ <% end %> +
+ + <%= render :partial => "diary_comment", :collection => @comments %> +
<% if current_user %> @@ -25,11 +37,6 @@ <%= bootstrap_form_for @entry.comments.new, :url => { :action => "comment" } do |f| %> <%= f.richtext_field :body, :cols => 80, :rows => 20, :hide_label => true %> <%= f.primary %> - <% if @entry.subscribers.exists?(current_user.id) %> - <%= link_to t("javascripts.changesets.show.unsubscribe"), diary_entry_unsubscribe_path(:display_name => @entry.user.display_name, :id => @entry.id), :method => :post, :class => "btn btn-light" %> - <% else %> - <%= link_to t("javascripts.changesets.show.subscribe"), diary_entry_subscribe_path(:display_name => @entry.user.display_name, :id => @entry.id), :method => :post, :class => "btn btn-light" %> - <% end %> <% end %> <% else %>

<%= t(".login_to_leave_a_comment_html", :login_link => link_to(t(".login"), login_path(:referer => request.fullpath))) %>

diff --git a/config/locales/en.yml b/config/locales/en.yml index 00c27dfc7..d66482639 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -523,6 +523,7 @@ en: show: title: "%{user}'s Diary | %{title}" user_title: "%{user}'s Diary" + discussion: "Discussion" leave_a_comment: "Leave a comment" login_to_leave_a_comment_html: "%{login_link} to leave a comment" login: "Login"