Files
danbooru/app/views/application/_diff_list.html.erb
evazion 00f4fbe2d1 artists: don't show unchanged URLs in artist history.
Only show changed URLs in the artist history, not unchanged URLs. Makes
the edit history more compact and easier to read by showing only the
things that changed on every edit.
2022-01-19 23:24:20 -06:00

24 lines
646 B
Plaintext

<%# diff, ul_class, li_class %>
<%= tag.ul class: [*ul_class] do %>
<% diff.added.each do |item| %>
<%= tag.li item, class: ["added", *li_class] %>
<% end %>
<% diff.removed.each do |item| %>
<%= tag.li item, class: ["removed", *li_class] %>
<% end %>
<% diff.changed.each do |old, new| %>
<%= tag.li class: "changed" do %>
<%= tag.span old, class: ["removed", *li_class] %>→ <%= tag.span new, class: ["added", *li_class] %>
<% end %>
<% end %>
<% if show_unchanged %>
<% diff.unchanged.each do |item| %>
<%= tag.li item, class: ["unchanged", *li_class] %>
<% end %>
<% end %>
<% end %>