]> 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)
12 files changed:
app/assets/stylesheets/common.scss
app/views/browse/_common_details.html.erb
app/views/browse/changeset.html.erb
app/views/dashboards/_contact.html.erb
app/views/dashboards/show.html.erb
app/views/diary_entries/index.html.erb
app/views/layouts/_meta.html.erb
app/views/user_mailer/diary_comment_notification.html.erb
app/views/user_mailer/message_notification.html.erb
app/views/users/index.html.erb
test/controllers/dashboards_controller_test.rb
test/integration/user_changeset_comments_test.rb

index bd6e97691cd03c9f6a89f7c7ec5e8ab91e869619..f2afdcf7a9446f8d29c369ffe0eecec6becbe13a 100644 (file)
@@ -370,8 +370,6 @@ body.compact-nav {
     }
 
     h3, h4 {
-      margin-top: $lineheight;
-      margin-bottom: $lineheight/2;
       font-size: 1.25rem;
     }
 
@@ -813,7 +811,6 @@ tr.turn:hover {
     border-bottom: 1px solid $grey;
 
     h4:first-child {
-      margin-top: 0;
       word-wrap: break-word;
     }
   }
@@ -858,6 +855,7 @@ tr.turn:hover {
     border-collapse: separate;
     border-spacing: 0;
     width: 100%;
+    margin-bottom: $spacer;
 
     th, td {
       border-bottom: 1px solid $grey;
@@ -910,7 +908,7 @@ tr.turn:hover {
 
   .subscribe-buttons {
     float: left;
-    margin: 18px 10px 10px;
+    margin: 0 10px;
     min-width: 80px;
   }
 
@@ -966,7 +964,7 @@ tr.turn:hover {
   }
 
   .export_area_inputs {
-    margin-bottom: $lineheight/2;
+    margin-bottom: $spacer;
     input[type="text"] {
       width: 100px;
       text-align: center;
@@ -1094,13 +1092,6 @@ tr.turn:hover {
   }
 }
 
-/* Rules for the user profile page */
-
-.contact-activity {
-  margin-top: $lineheight;
-  width: 100%;
-}
-
 /* Rules for the user map */
 
 .content_map .leaflet-popup-content {
@@ -1123,20 +1114,6 @@ tr.turn:hover {
 
 #user_list {
   width: 100%;
-
-  tr {
-    vertical-align: middle;
-  }
-
-  p {
-    margin-top: 0px;
-    margin-bottom: 0px;
-  }
-}
-
-#user_list_actions {
-  float: right;
-  margin-top: $lineheight/2;
 }
 
 /* Rules for the diary list page */
index 35620775488f230ab4a0665d9bfdb2aedc33d437..5505ee4a9f2db9ebc1cd84df054c8788c3bee44c 100644 (file)
@@ -11,7 +11,7 @@
   <% end %>
 </p>
 
-<div class="details">
+<p class="details">
   <%= t "browse.#{common_details.visible? ? :edited : :deleted}_by_html",
         :time => time_ago_in_words(common_details.timestamp, :scope => :"datetime.distance_in_words_ago"),
         :user => changeset_user_link(common_details.changeset),
@@ -19,7 +19,7 @@
   &middot;
   <%= t "browse.in_changeset" %>
   #<%= link_to common_details.changeset_id, :action => :changeset, :id => common_details.changeset_id %>
-</div>
+</p>
 
 <% if @type == "node" and common_details.visible? %>
 <div class="details geo">
index 079915fcf1f48187023d729c690b3ac83102648b..496589a08049daf944c75d78cf4998e508e24dd2 100644 (file)
@@ -6,7 +6,7 @@
   <p class="font-italic">
     <%= linkify(@changeset.tags["comment"].to_s.presence || t("browse.no_comment")) %>
   </p>
-  <div class="details"><%= changeset_details(@changeset) %></div>
+  <p class="details"><%= changeset_details(@changeset) %></p>
 
   <%= render :partial => "tag_details", :object => @changeset.tags.except("comment") %>
 
   <% end %>
 
   <% unless current_user %>
-    <div class="notice">
+    <p class="notice">
       <%= link_to(t(".join_discussion"), login_path(:referer => request.fullpath)) %>
-    </div>
+    </p>
   <% end %>
 
   <% if current_user %>
     <% unless @changeset.is_open? %>
-      <form action="#">
+      <form action="#" class="mb-3">
         <div class="form-group">
           <textarea class="form-control" name="text" cols="40" rows="5"></textarea>
         </div>
@@ -79,9 +79,9 @@
         </div>
       </form>
     <% else %>
-      <div class="notice">
-      <%= t(".still_open") %>
-      </div>
+      <p class="notice">
+        <%= t(".still_open") %>
+      </p>
     <% end %>
   <% end %>
 
index dd78b1c86812750861ee9b69ad4f08402382cf7f..77363dbdb0a627b50f409eaa00fa69ab121b35af 100644 (file)
@@ -4,7 +4,7 @@
      :icon => image_path(type == "friend" ? "marker-blue.png" : "marker-green.png"),
      :description => render(:partial => "popup", :object => contact, :locals => { :type => type })
    } %>
-<%= tag.div :class => "contact-activity clearfix row", :data => { :user => user_data } do %>
+<%= tag.div :class => "clearfix row", :data => { :user => user_data } do %>
   <div class="col-auto">
     <%= user_thumbnail contact %>
   </div>
index 9aa4abed4606566547dd8ca6f3d5f564389f4fb0..0f04dafb912b9143ac9fdef4560ca0b08b6b1756 100644 (file)
@@ -32,7 +32,7 @@
       <% if friends.empty? %>
         <%= t ".no friends" %>
       <% else %>
-        <nav class='secondary-actions'>
+        <nav class='secondary-actions mb-3'>
           <ul class='clearfix'>
             <li><%= link_to t(".friends_changesets"), friend_changesets_path %></li>
             <li><%= link_to t(".friends_diaries"), friends_diary_entries_path %></li>
@@ -50,7 +50,7 @@
       <% if nearby.empty? %>
         <%= t ".no nearby users" %>
       <% else %>
-        <nav class='secondary-actions'>
+        <nav class='secondary-actions mb-3'>
           <ul class='clearfix'>
             <li><%= link_to t(".nearby_changesets"), nearby_changesets_path %></li>
             <li><%= link_to t(".nearby_diaries"), nearby_diary_entries_path %></li>
index 15a3b0692e7b846d2df00b3c3ba8a7f09f21f8e8..b08bf05a4261a27315d1c39ecf0910ba0adb8d0d 100644 (file)
@@ -1,4 +1,4 @@
-<% content_for :head, tag(:meta, :name => :robots, :content => :noindex) %>
+<% content_for :head, tag.meta(:name => :robots, :content => :noindex) %>
 <% content_for :heading do %>
   <div <% if @user %> id="userinformation"<% end %> class="row">
     <% if @user %>
index dc08424f36a69432bd1c7d6993dcfc4711102896..2052b1d64135f802f873ca3a2595a666e81837c6 100644 (file)
@@ -7,19 +7,19 @@
 <%= favicon_link_tag "favicon-96x96.png", :rel => "icon", :sizes => "96x96", :type => "image/png" %>
 <%= favicon_link_tag "android-chrome-192x192.png", :rel => "icon", :sizes => "192x192", :type => "image/png" %>
 <%= favicon_link_tag "favicon-16x16.png", :rel => "icon", :sizes => "16x16", :type => "image/png" %>
-<%= tag("link", :rel => "mask-icon", :href => asset_path("tab-icon.svg"), :color => "#7ebc6f") %>
-<%= tag("link", :rel => "manifest", :href => asset_path("manifest.json")) %>
-<%= tag("meta", :name => "msapplication-config", :content => asset_path("browserconfig.xml")) %>
-<%= tag("meta", :name => "msapplication-TileColor", :content => "#00a300") %>
-<%= tag("meta", :name => "msapplication-TileImage", :content => image_path("mstile-144x144.png")) %>
-<%= tag("meta", :name => "theme-color", :content => "#ffffff") %>
+<%= tag.link :rel => "mask-icon", :href => asset_path("tab-icon.svg"), :color => "#7ebc6f" %>
+<%= tag.link :rel => "manifest", :href => asset_path("manifest.json") %>
+<%= tag.meta :name => "msapplication-config", :content => asset_path("browserconfig.xml") %>
+<%= tag.meta :name => "msapplication-TileColor", :content => "#00a300" %>
+<%= tag.meta :name => "msapplication-TileImage", :content => image_path("mstile-144x144.png") %>
+<%= tag.meta :name => "theme-color", :content => "#ffffff" %>
 <%= canonical_tag %>
 <% if Settings.key?(:publisher_url) -%>
-<%= tag("link", :rel => "publisher", :href => Settings.publisher_url) %>
+<%= tag.link :rel => "publisher", :href => Settings.publisher_url %>
 <% end -%>
-<%= tag("link", :rel => "search", :type => "application/opensearchdescription+xml", :title => "OpenStreetMap Search", :href => asset_path("osm.xml")) %>
-<%= tag("meta", :name => "description", :content => "OpenStreetMap is the free wiki world map.") %>
+<%= tag.link :rel => "search", :type => "application/opensearchdescription+xml", :title => "OpenStreetMap Search", :href => asset_path("osm.xml") %>
+<%= tag.meta :name => "description", :content => "OpenStreetMap is the free wiki world map." %>
 <%= opengraph_tags(@title) %>
 <% if flash[:piwik_goal] -%>
-<%= tag("meta", :name => "piwik-goal", :content => flash[:piwik_goal]) %>
+<%= tag.meta :name => "piwik-goal", :content => flash[:piwik_goal] %>
 <% end -%>
index b4efae83bd7aa15ed1cda0421fe68b85ff87e431..7f9368fe33b038bb25c2e185c7f07d2b8fb917ef 100644 (file)
@@ -11,8 +11,8 @@
 
 <% content_for :footer do %>
   <p><%= t ".footer_html",
-           :readurl => link_to(@readurl, @readurl) + tag(:br),
-           :commenturl => link_to(@commenturl, @commenturl) + tag(:br),
+           :readurl => link_to(@readurl, @readurl) + tag.br,
+           :commenturl => link_to(@commenturl, @commenturl) + tag.br,
            :replyurl => link_to(@replyurl, @replyurl) %>
   </p>
 <% end %>
index 4095b5e59426f13c1a991a2ad5215d7805a00530..a39a3fe5d1825b5cef527a10ded387f82e68f76c 100644 (file)
@@ -14,7 +14,7 @@
 <% content_for :footer do %>
   <p>
     <%= t ".footer_html",
-          :readurl => link_to(@readurl, @readurl) + tag(:br),
+          :readurl => link_to(@readurl, @readurl) + tag.br,
           :replyurl => link_to(@replyurl, @replyurl) %>
   </p>
 <% end %>
index cc71702222121efcdde10c9b3f88656baabd1532..12d5ae7af232edb801b0f5340d86435a1a2c2d39 100644 (file)
@@ -35,9 +35,9 @@
       <%= render @users %>
     </table>
 
-    <div id="user_list_actions buttons">
-      <%= submit_tag t(".confirm"), :name => "confirm" %>
-      <%= submit_tag t(".hide"), :name => "hide" %>
+    <div>
+      <%= submit_tag t(".confirm"), :name => "confirm", :class => "btn btn-primary" %>
+      <%= submit_tag t(".hide"), :name => "hide", :class => "btn btn-primary" %>
     </div>
   <% end %>
 <% else %>
index 5073df8cc1ab8d6b1d32b1a447da3bbc1ee4d287..84f9610e5f3ac7a583a3ee6a513f3f3304585cb9 100644 (file)
@@ -28,7 +28,9 @@ class DashboardsControllerTest < ActionDispatch::IntegrationTest
 
     # Friends should be visible as we're now logged in
     assert_select "div#friends-container" do
-      assert_select "div.contact-activity", :count => 1
+      assert_select "div" do
+        assert_select "a[href='/user/#{ERB::Util.u(friend_user.display_name)}']", :count => 1
+      end
     end
   end
 end
index a9bd468cead1b1ec6bbcba7ed6ac6c7bbff2de6b..2b95094fec464587c4759737c633b9d7dd44fcd8 100644 (file)
@@ -12,7 +12,7 @@ class UserChangesetCommentsTest < ActionDispatch::IntegrationTest
       assert_select "div#sidebar" do
         assert_select "div#sidebar_content" do
           assert_select "div" do
-            assert_select "div.notice" do
+            assert_select "p.notice" do
               assert_select "a[href='/login?referer=%2Fchangeset%2F#{changeset.id}']", :text => I18n.t("browse.changeset.join_discussion"), :count => 1
             end
           end