From 9c9bf153cd90778172a70864eedde3672c412a53 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 10 Nov 2021 15:30:42 +0000 Subject: [PATCH] Simplify user_image and user_thumbnail css Now that all uses of the images and thumbnails have been migrated to flex grids, we can remove the margin and padding from the original css classes and revert to using them. --- app/assets/stylesheets/common.scss | 16 ---------------- app/views/dashboards/_contact.html.erb | 2 +- app/views/dashboards/_popup.html.erb | 2 +- app/views/diary_entries/_diary_comment.html.erb | 2 +- app/views/diary_entries/_diary_entry.html.erb | 2 +- app/views/diary_entries/index.html.erb | 2 +- app/views/diary_entries/show.html.erb | 2 +- app/views/issues/_comments.html.erb | 2 +- app/views/issues/_reports.html.erb | 2 +- app/views/users/show.html.erb | 2 +- 10 files changed, 9 insertions(+), 25 deletions(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 782094af9..bd6e97691 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -1421,28 +1421,12 @@ img.user_image { max-width: 100px; max-height: 100px; border: 1px solid $grey; - margin-bottom: $lineheight; - float: left; - margin-right: $lineheight; -} - -img.user_image_no_margins { - max-width: 100px; - max-height: 100px; - border: 1px solid $grey; } img.user_thumbnail { max-width: 50px; max-height: 50px; border: 1px solid $grey; - margin-right: $lineheight; -} - -img.user_thumbnail_no_margins { - max-width: 50px; - max-height: 50px; - border: 1px solid $grey; } img.user_thumbnail_tiny { diff --git a/app/views/dashboards/_contact.html.erb b/app/views/dashboards/_contact.html.erb index 7614c0c4d..dd78b1c86 100644 --- a/app/views/dashboards/_contact.html.erb +++ b/app/views/dashboards/_contact.html.erb @@ -6,7 +6,7 @@ } %> <%= tag.div :class => "contact-activity clearfix row", :data => { :user => user_data } do %>
- <%= user_thumbnail contact, :class => "user_thumbnail_no_margins" %> + <%= user_thumbnail contact %>

diff --git a/app/views/dashboards/_popup.html.erb b/app/views/dashboards/_popup.html.erb index 8a8a94959..ef86f042d 100644 --- a/app/views/dashboards/_popup.html.erb +++ b/app/views/dashboards/_popup.html.erb @@ -1,6 +1,6 @@

- <%= user_thumbnail popup, :class => "user_thumbnail_no_margins" %> + <%= user_thumbnail popup %>

<%= t(".#{type}") %>

diff --git a/app/views/diary_entries/_diary_comment.html.erb b/app/views/diary_entries/_diary_comment.html.erb index 5423e2686..403d30742 100644 --- a/app/views/diary_entries/_diary_comment.html.erb +++ b/app/views/diary_entries/_diary_comment.html.erb @@ -1,6 +1,6 @@
">
- <%= user_thumbnail diary_comment.user, :class => "user_thumbnail_no_margins" %> + <%= user_thumbnail diary_comment.user %>

<%= t(".comment_from_html", :link_user => (link_to diary_comment.user.display_name, user_path(diary_comment.user)), :comment_created_at => link_to(l(diary_comment.created_at, :format => :friendly), :anchor => "comment#{diary_comment.id}")) %> diff --git a/app/views/diary_entries/_diary_entry.html.erb b/app/views/diary_entries/_diary_entry.html.erb index cd577b1fe..2b3dad055 100644 --- a/app/views/diary_entries/_diary_entry.html.erb +++ b/app/views/diary_entries/_diary_entry.html.erb @@ -5,7 +5,7 @@ <% else %>

- <%= user_thumbnail diary_entry.user, :class => "user_thumbnail_no_margins" %> + <%= user_thumbnail diary_entry.user %>

<%= link_to diary_entry.title, diary_entry_path(diary_entry.user, diary_entry) %>

diff --git a/app/views/diary_entries/index.html.erb b/app/views/diary_entries/index.html.erb index 0dfe95fa3..15a3b0692 100644 --- a/app/views/diary_entries/index.html.erb +++ b/app/views/diary_entries/index.html.erb @@ -3,7 +3,7 @@
id="userinformation"<% end %> class="row"> <% if @user %>
- <%= user_image @user, :class => "user_image_no_margins" %> + <%= user_image @user %>
<% end %> diff --git a/app/views/diary_entries/show.html.erb b/app/views/diary_entries/show.html.erb index e5dcbbdda..23b2dc783 100644 --- a/app/views/diary_entries/show.html.erb +++ b/app/views/diary_entries/show.html.erb @@ -1,7 +1,7 @@ <% content_for :heading do %>
- <%= user_image @entry.user, :class => "user_image_no_margins" %> + <%= user_image @entry.user %>

<%= link_to t(".user_title", :user => @entry.user.display_name), :action => :index %>

diff --git a/app/views/issues/_comments.html.erb b/app/views/issues/_comments.html.erb index 046e80163..e55bf4257 100644 --- a/app/views/issues/_comments.html.erb +++ b/app/views/issues/_comments.html.erb @@ -2,7 +2,7 @@ <% comments.each do |comment| %>
- <%= link_to user_thumbnail(comment.user, :class => "user_image_no_margins"), user_path(comment.user) %> + <%= link_to user_thumbnail(comment.user), user_path(comment.user) %>

diff --git a/app/views/issues/_reports.html.erb b/app/views/issues/_reports.html.erb index 6a00bfe23..b1b690f8c 100644 --- a/app/views/issues/_reports.html.erb +++ b/app/views/issues/_reports.html.erb @@ -1,7 +1,7 @@ <% reports.each do |report| %>

- <%= link_to user_thumbnail(report.user, :class => "user_thumbnail_no_margins"), user_path(report.user) %> + <%= link_to user_thumbnail(report.user), user_path(report.user) %>

diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 5aaeabb23..9e078ce74 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -1,7 +1,7 @@ <% content_for :heading do %>

- <%= user_image @user, :class => "user_image_no_margins" %> + <%= user_image @user %>

<%= @user.display_name %> <%= role_icons(@user) %>

-- 2.39.5