/wiki_page_versions/diff: use SetDiff to diff other_names.
Use SetDiff instead of DiffBuilder to generate diffs for wiki page other names. SetDiff is what we use for artist other names.
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
<%# diff %>
|
||||
<%# diff, ul_class, li_class %>
|
||||
|
||||
<ul class="diff-list">
|
||||
<%= tag.ul class: [*ul_class] do %>
|
||||
<% diff.added.each do |item| %>
|
||||
<%= tag.li item, class: (item.in?(diff.obsolete_added) ? "obsolete added" : "added") %>
|
||||
<%= tag.li item, class: ["added", ("obsolete" if item.in?(diff.obsolete_added)), *li_class] %>
|
||||
<% end %>
|
||||
|
||||
<% diff.removed.each do |item| %>
|
||||
<%= tag.li item, class: (item.in?(diff.obsolete_removed) ? "obsolete removed" : "removed") %>
|
||||
<%= tag.li item, class: ["removed", ("obsolete" if item.in?(diff.obsolete_removed)), *li_class] %>
|
||||
<% end %>
|
||||
|
||||
<% diff.changed.each do |old, new| %>
|
||||
<%= tag.li class: "changed" do %>
|
||||
<%= tag.span old, class: "removed" %>→ <%= tag.span new, class: "added" %>
|
||||
<%= tag.span old, class: ["removed", *li_class] %>→ <%= tag.span new, class: ["added", *li_class] %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% diff.unchanged.each do |item| %>
|
||||
<%= tag.li item, class: "unchanged" %>
|
||||
<%= tag.li item, class: ["unchanged", *li_class] %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user