]> git.openstreetmap.org Git - rails.git/blob - app/views/notifications/_note_comment.html.erb
Merge remote-tracking branch 'upstream/pull/7283'
[rails.git] / app / views / notifications / _note_comment.html.erb
1 <%# locals: (notification:, record:) %>
2
3 <article class="user-notification">
4   <div class="row align-items-center">
5     <h2 class="col-8 fs-6 mb-3 lh-sm fw-bold">
6       <%= link_to(
7             t(".headline.#{record.event}"),
8             note_path(
9               record.note,
10               :anchor => "c#{record.id}"
11             )
12           ) %>
13     </h2>
14     <p class="col-4 lh-sm text-end"><%= friendly_date_ago(record.created_at) %></p>
15   </div>
16
17   <div class="row">
18     <div class="col-1 text-center">
19       <%= link_to(
20             user_thumbnail(record.author, :class => "img-fluid"),
21             user_url(record.author),
22             :target => "_blank", :rel => "noopener"
23           ) %>
24     </div>
25     <div class="col-11">
26       <p class="text-body-secondary mb-1">
27       <%= t(
28             ".description.#{record.event}_html",
29             :commenter_name_with_link => link_to(
30               record.author.display_name,
31               record.author
32             ),
33             :note_id_with_link => link_to("##{record.note_id}", record.note),
34             :note_text => record.note.description
35           ) %>
36       </p>
37       <% if record.body.present? %>
38         <blockquote class="col-10 fst-italic border-start border-light-subtle border-3 ps-2">
39           <%= record.body.to_html %>
40         </blockquote>
41       <% end %>
42     </div>
43   </div>
44 </article>