burs/index: format update scripts as dtext, same as forum.

Format scripts on the BUR index page as dtext, the same way they're
formatted in forum posts. This means that tags have colors and underlines,
but they don't have post counts. Gathering post counts was too slow.
This commit is contained in:
evazion
2020-02-16 19:08:27 -06:00
parent ef3188a7fe
commit c4521acb54
2 changed files with 5 additions and 96 deletions

View File

@@ -1,3 +1,5 @@
<% dtext_data = DText.preprocess(bulk_update_requests.map(&:script_with_links)) %>
<%= table_for bulk_update_requests, width: "100%" do |t| %>
<% t.column "Request" do |request| %>
<% if request.forum_post.present? %>
@@ -6,7 +8,9 @@
<p><%= link_to "Topic ##{request.forum_topic_id}: #{request.forum_topic.title}", request.forum_topic %></p>
<% end %>
<%= script_with_line_breaks(request.script) %>
<div class="prose">
<%= format_text(request.script_with_links, data: dtext_data) %>
</div>
<% end %>
<% t.column "Votes" do |request| %>
<% if request.forum_post.present? %>