From 675f72fe359748ac0b573eadcc3c4248d6a477e5 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 17 Nov 2021 18:23:38 +0000 Subject: [PATCH] Use flex grid to position changeset discussion subscribe button This avoids needing any floats. Also remove buttons class from two locations, since there is a min-width on that class and it affects the button styling negatively for standalone buttons --- app/assets/stylesheets/common.scss | 10 --------- app/views/browse/changeset.html.erb | 32 ++++++++++++++++------------- 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index e2c66190c..fe3693267 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -860,16 +860,6 @@ tr.turn:hover { } } - .comments-header { - float: left; - } - - .subscribe-buttons { - float: left; - margin: 0 10px; - min-width: 80px; - } - .subscribe-buttons input { font-size: 90%; line-height: 15px; diff --git a/app/views/browse/changeset.html.erb b/app/views/browse/changeset.html.erb index 523cb84d6..6aa0f11fb 100644 --- a/app/views/browse/changeset.html.erb +++ b/app/views/browse/changeset.html.erb @@ -10,21 +10,25 @@ <%= render :partial => "tag_details", :object => @changeset.tags.except("comment") %> -

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

- - <% if current_user %> -
-
- <% if @changeset.subscribers.exists?(current_user.id) %> - " data-method="POST" data-url="<%= changeset_unsubscribe_url(@changeset) %>" /> - <% else %> - " data-method="POST" data-url="<%= changeset_subscribe_url(@changeset) %>" /> - <% end %> -
+
+
+

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

- <% end %> -
+ <% if current_user %> +
+ +
+ <% end %> +
<% if @comments.length > 0 %>
@@ -74,7 +78,7 @@
-
+
" data-changeset-id="<%= @changeset.id %>" data-method="POST" data-url="<%= changeset_comment_url(@changeset) %>" disabled="1" class="btn btn-sm btn-primary" />
-- 2.45.1