]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/3363'
authorTom Hughes <tom@compton.nu>
Wed, 10 Nov 2021 18:26:34 +0000 (18:26 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 10 Nov 2021 18:26:34 +0000 (18:26 +0000)
app/assets/stylesheets/common.scss
app/assets/stylesheets/leaflet-all.scss
app/views/dashboards/_contact.html.erb
app/views/dashboards/_popup.html.erb
app/views/diary_entries/_diary_comment.html.erb
app/views/diary_entries/_diary_entry.html.erb
app/views/diary_entries/index.html.erb
app/views/diary_entries/show.html.erb
app/views/issues/_comments.html.erb
app/views/issues/_reports.html.erb
app/views/users/show.html.erb

index 255e04511b0eff0f228e141a40189822067f6b9d..f2afdcf7a9446f8d29c369ffe0eecec6becbe13a 100644 (file)
@@ -1108,10 +1108,6 @@ tr.turn:hover {
     margin-top: 0 0 0 60px;
     font-size: 12px;
   }
-  img.user_thumbnail {
-    float: left;
-    margin: 0 $lineheight/2 0 0;
-  }
 }
 
 /* Rules for the user list */
@@ -1402,28 +1398,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 {
@@ -1589,10 +1569,6 @@ dl.dl-inline {
   }
 }
 
-.comments .richtext {
-  margin-left: 70px;
-}
-
 /* Rules for the user notes list */
 
 .note_list {
index 34e3d094e25941b56c872ea4372e1dec06a83099..d12c61f77766d4aa635397db6907871164618a28 100644 (file)
@@ -15,9 +15,6 @@ div.leaflet-marker-icon.location-filter.move-marker {
 
 /* Override some conflicting styles.
    https://github.com/openstreetmap/openstreetmap-website/pull/121#issuecomment-10206946 */
-.leaflet-popup-content img.user_thumbnail {
-  max-width: 50px !important;
-}
 
 .user_popup p {
   margin: 0 !important;
index cf1866cc9ca9e5619fd367f4c7abce27282202ff..77363dbdb0a627b50f409eaa00fa69ab121b35af 100644 (file)
@@ -6,7 +6,7 @@
    } %>
 <%= tag.div :class => "clearfix row", :data => { :user => user_data } do %>
   <div class="col-auto">
-    <%= user_thumbnail contact, :class => "user_thumbnail_no_margins" %>
+    <%= user_thumbnail contact %>
   </div>
   <div class="col">
     <p class='text-muted mb-0'>
index a643b5c90b932ee447818a304798a700ad0b94dc..ef86f042d9fbe0575639fbcd48ac34e8ec2dce0e 100644 (file)
@@ -1,5 +1,9 @@
-<div class="user_popup">
-  <%= user_thumbnail popup %>
-  <p><%= t(".#{type}") %></p>
-  <p><%= link_to popup.display_name, user_path(popup) %></p>
+<div class="user_popup row no-gutters mx-1">
+  <div class="col-auto mx-1">
+    <%= user_thumbnail popup %>
+  </div>
+  <div class="col mx-1">
+    <p><%= t(".#{type}") %></p>
+    <p><%= link_to popup.display_name, user_path(popup) %></p>
+  </div>
 </div>
index a7cdf21d7321d2215dc8caa915d8cd884c437e54..403d30742d982a45d1b08ba237621f2a1fa30581 100644 (file)
@@ -1,19 +1,23 @@
-<div class="clearfix diary-comment<%= " text-muted deleted" unless diary_comment.visible? %>">
-  <%= user_thumbnail diary_comment.user %>
-  <p class="text-muted comment-heading" id="comment<%= diary_comment.id %>"><%= 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}")) %>
-    <% if current_user and diary_comment.user.id != current_user.id %>
-      | <%= report_link(t(".report"), diary_comment) %>
-    <% end %>
-  </p>
-
-  <div class="richtext text-break"><%= diary_comment.body.to_html %></div>
-  <% if can? :hidecomment, DiaryEntry %>
-    <span>
-      <% if diary_comment.visible? %>
-        <%= link_to t(".hide_link"), hide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data => { :confirm => t(".confirm") } %>
-      <% else %>
-        <%= link_to t(".unhide_link"), unhide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data => { :confirm => t(".confirm") } %>
+<div class="row diary-comment<%= " text-muted deleted" unless diary_comment.visible? %>">
+  <div class="col-auto">
+    <%= user_thumbnail diary_comment.user %>
+  </div>
+  <div class="col">
+    <p class="text-muted comment-heading" id="comment<%= diary_comment.id %>"><%= 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}")) %>
+      <% if current_user and diary_comment.user.id != current_user.id %>
+        | <%= report_link(t(".report"), diary_comment) %>
       <% end %>
-    </span>
-  <% end %>
+    </p>
+
+    <div class="richtext text-break"><%= diary_comment.body.to_html %></div>
+    <% if can? :hidecomment, DiaryEntry %>
+      <span>
+        <% if diary_comment.visible? %>
+          <%= link_to t(".hide_link"), hide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data => { :confirm => t(".confirm") } %>
+        <% else %>
+          <%= link_to t(".unhide_link"), unhide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data => { :confirm => t(".confirm") } %>
+        <% end %>
+      </span>
+    <% end %>
+  </div>
 </div>
index 4080b8f958c34f9c869e13d53256836e2832c8bc..2b3dad055e572d6b4648909450cafdcfd3831b52 100644 (file)
@@ -1,11 +1,18 @@
 <div class='diary_post<%= " text-muted px-3 deleted" unless diary_entry.visible %> user_<%= diary_entry.user.id %>'>
-  <div class='post_heading clearfix'>
-    <% if !@user %>
-      <%= user_thumbnail diary_entry.user %>
+  <div class='post_heading'>
+    <% if @user %>
+      <h2><%= link_to diary_entry.title, diary_entry_path(diary_entry.user, diary_entry) %></h2>
+    <% else %>
+      <div class="row">
+        <div class="col-auto">
+          <%= user_thumbnail diary_entry.user %>
+        </div>
+        <div class="col">
+          <h2><%= link_to diary_entry.title, diary_entry_path(diary_entry.user, diary_entry) %></h2>
+        </div>
+      </div>
     <% end %>
 
-    <h2><%= link_to diary_entry.title, diary_entry_path(diary_entry.user, diary_entry) %></h2>
-
     <small class='text-muted'>
       <%= t(".posted_by_html", :link_user => (link_to diary_entry.user.display_name, user_path(diary_entry.user)), :created => l(diary_entry.created_at, :format => :blog), :language_link => (link_to diary_entry.language.name, :controller => "diary_entries", :action => "index", :display_name => nil, :language => diary_entry.language_code)) %>
       <% if (l(diary_entry.updated_at, :format => :blog) != l(diary_entry.created_at, :format => :blog)) %>
index acab663bc991c6e75a779f025c0be8e4a14d4e7d..b08bf05a4261a27315d1c39ecf0910ba0adb8d0d 100644 (file)
@@ -1,26 +1,31 @@
 <% content_for :head, tag.meta(:name => :robots, :content => :noindex) %>
 <% content_for :heading do %>
-  <div <% if @user %> id="userinformation"<% end %>>
+  <div <% if @user %> id="userinformation"<% end %> class="row">
     <% if @user %>
-      <%= user_image @user %>
+        <div class="col-auto">
+          <%= user_image @user %>
+        </div>
     <% end %>
-    <h1><%= @title %></h1>
-
-    <nav class="secondary-actions">
-      <ul class="clearfix">
-        <% unless params[:friends] or params[:nearby] -%>
-          <li><%= rss_link_to :action => "rss", :language => params[:language] %></li>
-          <% end -%>
-
-          <% if @user && @user == current_user || !@user && current_user %>
-            <li><%= link_to image_tag("new.png", :class => "small_icon") + t(".new"), new_diary_entry_path, :title => t(".new_title") %></li>
-          <% end %>
-
-          <% if !@user && current_user %>
-            <li><%= link_to t(".my_diary"), :controller => "diary_entries", :action => "index", :display_name => current_user.display_name %></li>
-          <% end %>
-      </ul>
-    </nav>
+
+    <div class="col">
+      <h1><%= @title %></h1>
+
+      <nav class="secondary-actions">
+        <ul class="clearfix">
+          <% unless params[:friends] or params[:nearby] -%>
+            <li><%= rss_link_to :action => "rss", :language => params[:language] %></li>
+            <% end -%>
+
+            <% if @user && @user == current_user || !@user && current_user %>
+              <li><%= link_to image_tag("new.png", :class => "small_icon") + t(".new"), new_diary_entry_path, :title => t(".new_title") %></li>
+            <% end %>
+
+            <% if !@user && current_user %>
+              <li><%= link_to t(".my_diary"), :controller => "diary_entries", :action => "index", :display_name => current_user.display_name %></li>
+            <% end %>
+        </ul>
+      </nav>
+    </div>
   </div>
 <% end %>
 
index 2b72453561582e1aeb9e2ad71669f1ed1f653ee4..23b2dc783dd6ce31ac5299fd5e0a1f5b775e88ec 100644 (file)
@@ -1,8 +1,12 @@
 <% content_for :heading do %>
-  <div id="userinformation">
-    <%= user_image @entry.user %>
-    <h2><%= link_to t(".user_title", :user => @entry.user.display_name), :action => :index %></h2>
-    <p><%= rss_link_to :action => :rss, :display_name => @entry.user.display_name %></p>
+  <div id="userinformation" class="row">
+    <div class="col-sm-auto">
+      <%= user_image @entry.user %>
+    </div>
+    <div class="col">
+      <h2><%= link_to t(".user_title", :user => @entry.user.display_name), :action => :index %></h2>
+      <p><%= rss_link_to :action => :rss, :display_name => @entry.user.display_name %></p>
+    </div>
   </div>
 <% end %>
 
index 6a90dbbff49c0bf1841c93e6848155f31b22d573..e55bf42578fb5200ccf94040f02113b32fd7599c 100644 (file)
@@ -1,14 +1,16 @@
 <div>
   <% comments.each do |comment| %>
-    <div class="comment">
-      <div class="float-left">
+    <div class="row">
+      <div class="col-auto">
         <%= link_to user_thumbnail(comment.user), user_path(comment.user) %>
       </div>
-      <p class="text-muted mb-0">
-        <%= t ".comment_from_html", :user_link => link_to(comment.user.display_name, user_path(comment.user)),
-                                    :comment_created_at => l(comment.created_at.to_datetime, :format => :friendly) %>
-      </p>
-      <p><%= comment.body %></p>
+      <div class="col">
+        <p class="text-muted mb-0">
+          <%= t ".comment_from_html", :user_link => link_to(comment.user.display_name, user_path(comment.user)),
+                                      :comment_created_at => l(comment.created_at.to_datetime, :format => :friendly) %>
+        </p>
+        <p><%= comment.body %></p>
+      </div>
     </div>
     <hr>
   <% end %>
index 143f2d887106cb996406f62358b4d4e8f3429465..b1b690f8c965ec5d93c5113b03498181e3aba2dc 100644 (file)
@@ -1,14 +1,16 @@
 <% reports.each do |report| %>
-  <div class="report">
-    <div class="float-left">
+  <div class="row">
+    <div class="col-auto">
       <%= link_to user_thumbnail(report.user), user_path(report.user) %>
     </div>
-    <p class="text-muted mb-0">
-      <%= t ".reported_by_html", :category => report.category,
-                                 :user => link_to(report.user.display_name, user_path(report.user)),
-                                 :updated_at => l(report.updated_at.to_datetime, :format => :friendly) %>
-    </p>
-    <p><%= report.details %></p>
+    <div class="col">
+      <p class="text-muted mb-0">
+        <%= t ".reported_by_html", :category => report.category,
+                                   :user => link_to(report.user.display_name, user_path(report.user)),
+                                   :updated_at => l(report.updated_at.to_datetime, :format => :friendly) %>
+      </p>
+      <p><%= report.details %></p>
+    </div>
   </div>
   <hr>
 <% end %>
index 5aaeabb23b85f99f572005a8221e03fbba95a628..9e078ce74bda7b8bec69be985b2a1b5795d6ac87 100644 (file)
@@ -1,7 +1,7 @@
 <% content_for :heading do %>
   <div id="userinformation" class="row">
     <div class="col-sm-auto">
-      <%= user_image @user, :class => "user_image_no_margins" %>
+      <%= user_image @user %>
     </div>
     <div class="col">
       <h1><%= @user.display_name %> <%= role_icons(@user) %></h1>