Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/pull/3363'
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Nov 10, 2021
2 parents 8da015a + 9c9bf15 commit 4258189
Show file tree
Hide file tree
Showing 11 changed files with 94 additions and 93 deletions.
24 changes: 0 additions & 24 deletions app/assets/stylesheets/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -1589,10 +1569,6 @@ dl.dl-inline {
}
}

.comments .richtext {
margin-left: 70px;
}

/* Rules for the user notes list */

.note_list {
Expand Down
3 changes: 0 additions & 3 deletions app/assets/stylesheets/leaflet-all.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion app/views/dashboards/_contact.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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'>
Expand Down
12 changes: 8 additions & 4 deletions app/views/dashboards/_popup.html.erb
Original file line number Diff line number Diff line change
@@ -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>
38 changes: 21 additions & 17 deletions app/views/diary_entries/_diary_comment.html.erb
Original file line number Diff line number Diff line change
@@ -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>
17 changes: 12 additions & 5 deletions app/views/diary_entries/_diary_entry.html.erb
Original file line number Diff line number Diff line change
@@ -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)) %>
Expand Down
43 changes: 24 additions & 19 deletions app/views/diary_entries/index.html.erb
Original file line number Diff line number Diff line change
@@ -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 %>
Expand Down
12 changes: 8 additions & 4 deletions app/views/diary_entries/show.html.erb
Original file line number Diff line number Diff line change
@@ -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 %>
Expand Down
16 changes: 9 additions & 7 deletions app/views/issues/_comments.html.erb
Original file line number Diff line number Diff line change
@@ -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 %>
Expand Down
18 changes: 10 additions & 8 deletions app/views/issues/_reports.html.erb
Original file line number Diff line number Diff line change
@@ -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 %>
2 changes: 1 addition & 1 deletion app/views/users/show.html.erb
Original file line number Diff line number Diff line change
@@ -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>
Expand Down

0 comments on commit 4258189

Please sign in to comment.