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

This commit is contained in:
Tom Hughes 2025-03-05 18:22:59 +00:00
commit 05556370f0
2 changed files with 23 additions and 5 deletions

View file

@ -1,20 +1,32 @@
<%= tag.li :id => "changeset_#{changeset.id}", :data => { :changeset => changeset_data(changeset) }, :class => "list-group-item list-group-item-action" do %> <%= tag.li :id => "changeset_#{changeset.id}", :data => { :changeset => changeset_data(changeset) }, :class => "list-group-item list-group-item-action" do %>
<p class="fs-6 text-truncate text-wrap"> <p class="fs-6 text-truncate text-wrap mb-0">
<a class="changeset_id link-body-emphasis stretched-link" href="<%= changeset_path(changeset) %>"> <a class="changeset_id link-body-emphasis stretched-link" href="<%= changeset_path(changeset) %>">
<span><%= changeset.tags["comment"].to_s.presence || t("browse.no_comment") %></span> <span><%= changeset.tags["comment"].to_s.presence || t("browse.no_comment") %></span>
</a> </a>
</p> </p>
<div class="row"> <div class="row">
<div class="col"> <div class="col pt-3">
<%= changeset_details(changeset) %> <%= changeset_details(changeset) %>
&middot; &middot;
<a class="changeset_id link-body-emphasis" href="<%= changeset_path(changeset) %>"> <a class="changeset_id link-body-emphasis" href="<%= changeset_path(changeset) %>">
#<%= changeset.id %> #<%= changeset.id %>
</a> </a>
</div> </div>
<div class="col-auto text-secondary<%= " opacity-50" if changeset.comments.empty? %>"> <div class="col-auto d-flex flex-column justify-content-end align-items-end text-secondary">
<%= changeset.comments.length %> <%= tag.div :class => ["d-flex align-items-baseline gap-1", { "opacity-50" => changeset.comments.empty? }],
<span class="icon note grey"></span> :title => t(".comments", :count => changeset.comments.length) do %>
<%= changeset.comments.length %>
<svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor">
<path d="M2.678 11.894a1 1 0 0 1 .287.801 11 11 0 0 1-.398 2c1.395-.323 2.247-.697 2.634-.893a1 1 0 0 1 .71-.074A8 8 0 0 0 8 14c3.996 0 7-2.807 7-6s-3.004-6-7-6-7 2.808-7 6c0 1.468.617 2.83 1.678 3.894m-.493 3.905a22 22 0 0 1-.713.129c-.2.032-.352-.176-.273-.362a10 10 0 0 0 .244-.637l.003-.01c.248-.72.45-1.548.524-2.319C.743 11.37 0 9.76 0 8c0-3.866 3.582-7 8-7s8 3.134 8 7-3.582 7-8 7a9 9 0 0 1-2.347-.306c-.52.263-1.639.742-3.468 1.105" />
</svg>
<% end %>
<%= tag.div :class => ["d-flex align-items-baseline gap-1", { "opacity-50" => changeset.num_changes.zero? }],
:title => t(".changes", :count => changeset.num_changes) do %>
<%= changeset.num_changes %>
<svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor">
<path d="M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325" />
</svg>
<% end %>
</div> </div>
</div> </div>
<% end %> <% end %>

View file

@ -477,6 +477,12 @@ en:
changeset: changeset:
no_edits: "(no edits)" no_edits: "(no edits)"
view_changeset_details: "View changeset details" view_changeset_details: "View changeset details"
comments:
one: "%{count} comment"
other: "%{count} comments"
changes:
one: "%{count} change"
other: "%{count} changes"
index: index:
title: "Changesets" title: "Changesets"
title_user: "Changesets by %{user}" title_user: "Changesets by %{user}"