Merge remote-tracking branch 'upstream/pull/3362'

This commit is contained in:
Tom Hughes 2021-11-10 18:21:01 +00:00
commit 8da015ac88
8 changed files with 22 additions and 43 deletions

View file

@ -370,8 +370,6 @@ body.compact-nav {
} }
h3, h4 { h3, h4 {
margin-top: $lineheight;
margin-bottom: $lineheight/2;
font-size: 1.25rem; font-size: 1.25rem;
} }
@ -813,7 +811,6 @@ tr.turn:hover {
border-bottom: 1px solid $grey; border-bottom: 1px solid $grey;
h4:first-child { h4:first-child {
margin-top: 0;
word-wrap: break-word; word-wrap: break-word;
} }
} }
@ -858,6 +855,7 @@ tr.turn:hover {
border-collapse: separate; border-collapse: separate;
border-spacing: 0; border-spacing: 0;
width: 100%; width: 100%;
margin-bottom: $spacer;
th, td { th, td {
border-bottom: 1px solid $grey; border-bottom: 1px solid $grey;
@ -910,7 +908,7 @@ tr.turn:hover {
.subscribe-buttons { .subscribe-buttons {
float: left; float: left;
margin: 18px 10px 10px; margin: 0 10px;
min-width: 80px; min-width: 80px;
} }
@ -966,7 +964,7 @@ tr.turn:hover {
} }
.export_area_inputs { .export_area_inputs {
margin-bottom: $lineheight/2; margin-bottom: $spacer;
input[type="text"] { input[type="text"] {
width: 100px; width: 100px;
text-align: center; 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 */ /* Rules for the user map */
.content_map .leaflet-popup-content { .content_map .leaflet-popup-content {
@ -1127,20 +1118,6 @@ tr.turn:hover {
#user_list { #user_list {
width: 100%; 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 */ /* Rules for the diary list page */

View file

@ -11,7 +11,7 @@
<% end %> <% end %>
</p> </p>
<div class="details"> <p class="details">
<%= t "browse.#{common_details.visible? ? :edited : :deleted}_by_html", <%= t "browse.#{common_details.visible? ? :edited : :deleted}_by_html",
:time => time_ago_in_words(common_details.timestamp, :scope => :"datetime.distance_in_words_ago"), :time => time_ago_in_words(common_details.timestamp, :scope => :"datetime.distance_in_words_ago"),
:user => changeset_user_link(common_details.changeset), :user => changeset_user_link(common_details.changeset),
@ -19,7 +19,7 @@
&middot; &middot;
<%= t "browse.in_changeset" %> <%= t "browse.in_changeset" %>
#<%= link_to common_details.changeset_id, :action => :changeset, :id => common_details.changeset_id %> #<%= link_to common_details.changeset_id, :action => :changeset, :id => common_details.changeset_id %>
</div> </p>
<% if @type == "node" and common_details.visible? %> <% if @type == "node" and common_details.visible? %>
<div class="details geo"> <div class="details geo">

View file

@ -6,7 +6,7 @@
<p class="font-italic"> <p class="font-italic">
<%= linkify(@changeset.tags["comment"].to_s.presence || t("browse.no_comment")) %> <%= linkify(@changeset.tags["comment"].to_s.presence || t("browse.no_comment")) %>
</p> </p>
<div class="details"><%= changeset_details(@changeset) %></div> <p class="details"><%= changeset_details(@changeset) %></p>
<%= render :partial => "tag_details", :object => @changeset.tags.except("comment") %> <%= render :partial => "tag_details", :object => @changeset.tags.except("comment") %>
@ -63,14 +63,14 @@
<% end %> <% end %>
<% unless current_user %> <% unless current_user %>
<div class="notice"> <p class="notice">
<%= link_to(t(".join_discussion"), login_path(:referer => request.fullpath)) %> <%= link_to(t(".join_discussion"), login_path(:referer => request.fullpath)) %>
</div> </p>
<% end %> <% end %>
<% if current_user %> <% if current_user %>
<% unless @changeset.is_open? %> <% unless @changeset.is_open? %>
<form action="#"> <form action="#" class="mb-3">
<div class="form-group"> <div class="form-group">
<textarea class="form-control" name="text" cols="40" rows="5"></textarea> <textarea class="form-control" name="text" cols="40" rows="5"></textarea>
</div> </div>
@ -79,9 +79,9 @@
</div> </div>
</form> </form>
<% else %> <% else %>
<div class="notice"> <p class="notice">
<%= t(".still_open") %> <%= t(".still_open") %>
</div> </p>
<% end %> <% end %>
<% end %> <% end %>

View file

@ -4,7 +4,7 @@
:icon => image_path(type == "friend" ? "marker-blue.png" : "marker-green.png"), :icon => image_path(type == "friend" ? "marker-blue.png" : "marker-green.png"),
:description => render(:partial => "popup", :object => contact, :locals => { :type => type }) :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"> <div class="col-auto">
<%= user_thumbnail contact, :class => "user_thumbnail_no_margins" %> <%= user_thumbnail contact, :class => "user_thumbnail_no_margins" %>
</div> </div>

View file

@ -32,7 +32,7 @@
<% if friends.empty? %> <% if friends.empty? %>
<%= t ".no friends" %> <%= t ".no friends" %>
<% else %> <% else %>
<nav class='secondary-actions'> <nav class='secondary-actions mb-3'>
<ul class='clearfix'> <ul class='clearfix'>
<li><%= link_to t(".friends_changesets"), friend_changesets_path %></li> <li><%= link_to t(".friends_changesets"), friend_changesets_path %></li>
<li><%= link_to t(".friends_diaries"), friends_diary_entries_path %></li> <li><%= link_to t(".friends_diaries"), friends_diary_entries_path %></li>
@ -50,7 +50,7 @@
<% if nearby.empty? %> <% if nearby.empty? %>
<%= t ".no nearby users" %> <%= t ".no nearby users" %>
<% else %> <% else %>
<nav class='secondary-actions'> <nav class='secondary-actions mb-3'>
<ul class='clearfix'> <ul class='clearfix'>
<li><%= link_to t(".nearby_changesets"), nearby_changesets_path %></li> <li><%= link_to t(".nearby_changesets"), nearby_changesets_path %></li>
<li><%= link_to t(".nearby_diaries"), nearby_diary_entries_path %></li> <li><%= link_to t(".nearby_diaries"), nearby_diary_entries_path %></li>

View file

@ -35,9 +35,9 @@
<%= render @users %> <%= render @users %>
</table> </table>
<div id="user_list_actions buttons"> <div>
<%= submit_tag t(".confirm"), :name => "confirm" %> <%= submit_tag t(".confirm"), :name => "confirm", :class => "btn btn-primary" %>
<%= submit_tag t(".hide"), :name => "hide" %> <%= submit_tag t(".hide"), :name => "hide", :class => "btn btn-primary" %>
</div> </div>
<% end %> <% end %>
<% else %> <% else %>

View file

@ -28,7 +28,9 @@ class DashboardsControllerTest < ActionDispatch::IntegrationTest
# Friends should be visible as we're now logged in # Friends should be visible as we're now logged in
assert_select "div#friends-container" do 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 end
end end

View file

@ -12,7 +12,7 @@ class UserChangesetCommentsTest < ActionDispatch::IntegrationTest
assert_select "div#sidebar" do assert_select "div#sidebar" do
assert_select "div#sidebar_content" do assert_select "div#sidebar_content" do
assert_select "div" 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 assert_select "a[href='/login?referer=%2Fchangeset%2F#{changeset.id}']", :text => I18n.t("browse.changeset.join_discussion"), :count => 1
end end
end end