views: convert helpers to partials.

This commit is contained in:
evazion
2020-01-11 20:01:14 -06:00
parent 153a8339ab
commit abacc8ebb1
12 changed files with 64 additions and 87 deletions

View File

@@ -0,0 +1,9 @@
<span class="diff-list">
<% added_tags.each do |tag| %>
<ins>+<%= link_to wordbreakify(tag), posts_path(tags: tag) %></ins>
<% end %>
<% removed_tags.each do |tag| %>
<del>-<%= link_to wordbreakify(tag), posts_path(tags: tag) %></del>
<% end %>
</span>

View File

@@ -12,7 +12,7 @@
<%= TagSetPresenter.new(upload_report.uploader_tags_array).inline_tag_list_html %>
<% end %>
<% t.column "Tags added by uploader", width: "45%" do |upload_report| %>
<%= diff_to_current(upload_report) %>
<%= render "reports/tag_diff_list", added_tags: upload_report.added_tags_array, removed_tags: upload_report.removed_tags_array %>
<% end %>
<% end %>