]> git.openstreetmap.org Git - rails.git/blob - app/views/notifications/_diary_comment.html.erb
Merge remote-tracking branch 'upstream/pull/7283'
[rails.git] / app / views / notifications / _diary_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"),
8             diary_entry_path(
9               record.diary_entry.user,
10               record.diary_entry,
11               :anchor => "c#{record.id}"
12             )
13           ) %>
14     </h2>
15     <p class="col-4 lh-sm text-end"><%= friendly_date_ago(record.created_at) %></p>
16   </div>
17
18   <div class="row">
19     <div class="col-1 text-center">
20       <%= link_to(
21             user_thumbnail(record.user, :class => "img-fluid"),
22             user_url(record.user),
23             :target => "_blank", :rel => "noopener"
24           ) %>
25     </div>
26     <div class="col-11">
27       <p class="text-body-secondary mb-1">
28         <%= t(
29               ".description_html",
30               :commenter_name_with_link => link_to(
31                 record.user.display_name,
32                 record.user
33               ),
34               :diary_entry_title_with_link => link_to(
35                 record.diary_entry.title,
36                 diary_entry_path(
37                   record.diary_entry.user,
38                   record.diary_entry
39                 )
40               )
41             ) %>
42       </p>
43       <blockquote class="col-10 fst-italic border-start border-light-subtle border-3 ps-2">
44         <%= record.body.to_html %>
45       </blockquote>
46     </div>
47   </div>
48 </article>