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.
24 lines
646 B
Plaintext
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 %>
|