]> git.openstreetmap.org Git - rails.git/blob - app/views/notifications/_changeset_comment.html.erb
Localisation updates from https://translatewiki.net.
[rails.git] / app / views / notifications / _changeset_comment.html.erb
1 <%# locals: (notification:) %>
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             changeset_path(
9               notification.changeset,
10               :anchor => "c#{notification.comment_id}"
11             )
12           ) %>
13     </h2>
14     <p class="col-4 lh-sm text-end"><%= friendly_date_ago(notification.timestamp) %></p>
15   </div>
16
17   <div class="row">
18     <div class="col-1 text-center">
19       <%= link_to(
20             user_thumbnail(notification.commenter, :class => "img-fluid"),
21             user_url(notification.commenter),
22             :target => "_blank", :rel => "noopener"
23           ) %>
24     </div>
25     <div class="col-11">
26       <p class="text-body-secondary mb-1 event-description">
27         <% if notification.changeset_summary %>
28           <%= t(
29                 ".description_with_summary_html",
30                 :commenter_name_with_link => link_to(
31                   notification.commenter.display_name,
32                   notification.commenter
33                 ),
34                 :changeset_id_with_link => link_to("##{notification.changeset_id}", notification.changeset),
35                 :changeset_summary => notification.changeset_summary
36               ) %>
37         <% else %>
38           <%= t(
39                 ".description_without_summary_html",
40                 :commenter_name_with_link => link_to(
41                   notification.commenter.display_name,
42                   notification.commenter
43                 ),
44                 :changeset_id_with_link => link_to("##{notification.changeset_id}", notification.changeset)
45               ) %>
46         <% end %>
47       </p>
48       <blockquote class="col-10 fst-italic border-start border-light-subtle border-3 ps-2">
49         <%= notification.comment_body.to_html %>
50       </blockquote>
51     </div>
52   </div>
53 </article>