openstreetmap-website/app/views/changesets/_changeset.html.erb
Anton Khorev 98ff2c0b9c Truncate descriptions horizontally in changeset lists
Can't have horizontal scroll because it interferes with stretched links.
2024-05-18 19:41:07 +03:00

32 lines
1.1 KiB
Text

<% changeset_data = { :id => changeset.id }
if changeset.bbox_valid?
bbox = changeset.bbox.to_unscaled
changeset_data[:bbox] = {
:minlon => bbox.min_lon,
:minlat => bbox.min_lat,
:maxlon => bbox.max_lon,
:maxlat => bbox.max_lat
}
end %>
<%= tag.li :id => "changeset_#{changeset.id}", :data => { :changeset => changeset_data }, :class => "list-group-item list-group-item-action" do %>
<p class="fs-6 text-truncate text-wrap">
<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>
</a>
</p>
<div class="row">
<div class="col">
<%= changeset_details(changeset) %>
&middot;
<a class="changeset_id link-body-emphasis" href="<%= changeset_path(changeset) %>">
#<%= changeset.id %>
</a>
</div>
<div class="col-auto text-secondary<%= " opacity-50" if changeset.comments.empty? %>">
<%= changeset.comments.length %>
<span class="icon note grey"></span>
</div>
</div>
<% end %>