Remove ruby DText implementation (#3206).
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
<section id="original-artist-commentary">
|
||||
<h3><%= artist_commentary.original_title %></h3>
|
||||
<div class="prose">
|
||||
<%= format_text(artist_commentary.original_description, :ragel => true, :disable_mentions => true) %>
|
||||
<%= format_text(artist_commentary.original_description, :disable_mentions => true) %>
|
||||
</div>
|
||||
</section>
|
||||
<% end %>
|
||||
@@ -31,9 +31,9 @@
|
||||
</h3>
|
||||
<div class="prose">
|
||||
<% if artist_commentary.translated_description.present? %>
|
||||
<%= format_text(artist_commentary.translated_description, :ragel => true, :disable_mentions => true) %>
|
||||
<%= format_text(artist_commentary.translated_description, :disable_mentions => true) %>
|
||||
<% else %>
|
||||
<span class="disabled"><%= format_text(artist_commentary.original_description, :ragel => true, :disable_mentions => true) %></span>
|
||||
<span class="disabled"><%= format_text(artist_commentary.original_description, :disable_mentions => true) %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
<td>
|
||||
<h3><%= h(commentary.original_title) %></h3>
|
||||
<div class="prose">
|
||||
<%= format_text(commentary.original_description, :ragel => true) %>
|
||||
<%= format_text(commentary.original_description, :disable_mentions => true) %>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<h3><%= h(commentary.translated_title) %></h3>
|
||||
<div class="prose">
|
||||
<%= format_text(commentary.translated_description, :ragel => true) %>
|
||||
<%= format_text(commentary.translated_description, :disable_mentions => true) %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -34,12 +34,13 @@
|
||||
<h3><%= h(commentary_version.original_title) %></h3>
|
||||
<div class="prose">
|
||||
<%= format_text(commentary_version.original_description) %>
|
||||
<%= format_text(commentary_version.original_description, :disable_mentions => true) %>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<h3><%= h(commentary_version.translated_title) %></h3>
|
||||
<div class="prose">
|
||||
<%= format_text(commentary_version.translated_description) %>
|
||||
<%= format_text(commentary_version.translated_description, :disable_mentions => true) %>
|
||||
</div>
|
||||
</td>
|
||||
<% if CurrentUser.is_moderator? %>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<% if @artist.notes.present? && @artist.visible? %>
|
||||
<div class="prose">
|
||||
<%= format_text(@artist.notes, :ragel => true, :disable_mentions => true) %>
|
||||
<%= format_text(@artist.notes, :disable_mentions => true) %>
|
||||
</div>
|
||||
|
||||
<p><%= link_to "View wiki page", @artist.wiki_page %></p>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</td>
|
||||
<td><%= time_ago_in_words_tagged(ban.created_at) %></td>
|
||||
<td><%= humanized_duration(ban.created_at, ban.expires_at) %></td>
|
||||
<td class="col-expand"><%= format_text ban.reason, :ragel => true %></td>
|
||||
<td class="col-expand"><%= format_text ban.reason %></td>
|
||||
<td>
|
||||
<% if CurrentUser.is_moderator? %>
|
||||
<%= link_to "Edit", edit_ban_path(ban) %>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<ul style="margin-bottom: 1em;">
|
||||
<li><strong>User</strong>: <%= link_to_user(@ban.user) %></li>
|
||||
<li><strong>Expires</strong>: <%= compact_time @ban.expires_at %></li>
|
||||
<li><strong>Reason</strong>: <%= format_text @ban.reason, :ragel => true %></li>
|
||||
<li><strong>Reason</strong>: <%= format_text @ban.reason %></li>
|
||||
</ul>
|
||||
|
||||
<%= form_tag(ban_path(@ban), :method => :delete) do %>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="body prose">
|
||||
<%= format_text(comment.body, :ragel => true) %>
|
||||
<%= format_text(comment.body) %>
|
||||
|
||||
<% if comment.updated_at - comment.created_at > 5.minutes %>
|
||||
<p class="info">Updated by <%= link_to_user comment.updater %> <%= time_ago_in_words_tagged(comment.updated_at) %></p>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<h3>Body</h3>
|
||||
<div class="prose">
|
||||
<%= format_text(@dmail.body, :ragel => true) %>
|
||||
<%= format_text(@dmail.body) %>
|
||||
|
||||
<% if @dmail.is_automated? %>
|
||||
<p class="tn">
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="prose">
|
||||
<%= format_text(forum_post.body, :ragel => true) %>
|
||||
<%= format_text(forum_post.body) %>
|
||||
</div>
|
||||
<% if forum_post.updated_at - forum_post.created_at > 5.minutes %>
|
||||
<p class="info">Updated by <%= link_to_user forum_post.updater %> <%= time_ago_in_words_tagged(forum_post.updated_at) %></p>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<h3>Body</h3>
|
||||
<div class="prose">
|
||||
<%= format_text(@dmail.body, :ragel => true) %>
|
||||
<%= format_text(@dmail.body) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<tr>
|
||||
<td><%= compact_time mod_action.created_at %></td>
|
||||
<td><%= link_to_user mod_action.creator %></td>
|
||||
<td><%= format_text(mod_action.description, :ragel => true) %></td>
|
||||
<td><%= format_text(mod_action.description) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<% @dashboard.mod_actions.each do |mod_action| %>
|
||||
<tr>
|
||||
<td><%= link_to_user mod_action.creator %></td>
|
||||
<td><%= format_text(mod_action.description, :ragel => true) %></td>
|
||||
<td><%= format_text(mod_action.description) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<% @dashboard.user_feedbacks.each do |record| %>
|
||||
<tr class="feedback-category-<%= record.category %>">
|
||||
<td><%= link_to_user(record.user) %></td>
|
||||
<td><%= format_text(record.body, :ragel => true) %></td>
|
||||
<td><%= format_text(record.body) %></td>
|
||||
<td><%= time_ago_in_words_tagged(record.created_at) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</h1>
|
||||
|
||||
<div id="description" class="prose">
|
||||
<%= format_text(@pool.description, :ragel => true) %>
|
||||
<%= format_text(@pool.description) %>
|
||||
</div>
|
||||
|
||||
<%= render "posts/partials/common/inline_blacklist" %>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%= format_text(WikiPage.titled(Danbooru.config.appeal_notice_wiki_page).first.try(&:body), :ragel => true) %>
|
||||
<%= format_text(WikiPage.titled(Danbooru.config.appeal_notice_wiki_page).first.try(&:body)) %>
|
||||
|
||||
<!-- XXX dtext_field expects there to be a `post_appeal` instance variable. -->
|
||||
<% @post_appeal = post_appeal %>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<% @post_appeals.each do |post_appeal| %>
|
||||
<tr>
|
||||
<td><%= PostPresenter.preview(post_appeal.post, :tags => "status:any") %></td>
|
||||
<td><%= format_text post_appeal.reason, :ragel => true %></td>
|
||||
<td><%= format_text post_appeal.reason %></td>
|
||||
<td>
|
||||
<%= link_to post_appeal.post.appeals.size, post_appeals_path(search: { post_id: post_appeal.post_id }) %>
|
||||
</td>
|
||||
|
||||
@@ -12,6 +12,6 @@
|
||||
<% end %>
|
||||
|
||||
<% if disapprovals.map(&:message).any?(&:present?) %>
|
||||
(messages: <%= disapprovals.map(&:message).select(&:present?).map { |msg| format_text(msg, ragel: true, inline: true) }.to_sentence.html_safe %>)
|
||||
(messages: <%= disapprovals.map(&:message).select(&:present?).map { |msg| format_text(msg, inline: true) }.to_sentence.html_safe %>)
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<% end %>
|
||||
|
||||
<% if disapprovals.map(&:message).any?(&:present?) %>
|
||||
Messages: <%= disapprovals.map(&:message).select(&:present?).map { |msg| format_text(msg, ragel: true, inline: true) }.to_sentence.html_safe %>.
|
||||
Messages: <%= disapprovals.map(&:message).select(&:present?).map { |msg| format_text(msg, inline: true) }.to_sentence.html_safe %>.
|
||||
<% end %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<i>hidden</i>
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= format_text event.reason, :ragel => true %></td>
|
||||
<td><%= format_text event.reason %></td>
|
||||
<td>
|
||||
<% if event.is_resolved %>
|
||||
yes
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%= format_text(WikiPage.titled(Danbooru.config.flag_notice_wiki_page).first.try(&:body), :ragel => true) %>
|
||||
<%= format_text(WikiPage.titled(Danbooru.config.flag_notice_wiki_page).first.try(&:body)) %>
|
||||
|
||||
<!-- XXX dtext_field expects there to be a `post_flag` instance variable. -->
|
||||
<% @post_flag = post_flag %>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<tr class="resolved-<%= post_flag.is_resolved? %>">
|
||||
<td><%= PostPresenter.preview(post_flag.post, :tags => "status:any") %></td>
|
||||
<td>
|
||||
<%= format_text post_flag.reason, :ragel => true %>
|
||||
<%= format_text post_flag.reason %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to post_flag.post.flags.size, post_flags_path(search: { post_id: post_flag.post_id }) %>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%= format_text(WikiPage.titled(Danbooru.config.replacement_notice_wiki_page).first.try(&:body), ragel: true) %>
|
||||
<%= format_text(WikiPage.titled(Danbooru.config.replacement_notice_wiki_page).first.try(&:body)) %>
|
||||
|
||||
<%= simple_form_for(post_replacement, url: post_replacements_path(post_id: post_replacement.post_id), method: :post) do |f| %>
|
||||
<%= f.input :replacement_file, label: "File", as: :file %>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<% if artist.visible? %>
|
||||
<% unless artist.notes.blank? %>
|
||||
<div class="prose">
|
||||
<%= format_text(artist.notes, :ragel => true) %>
|
||||
<%= format_text(artist.notes) %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<p><%= wiki_page_other_names_list(wiki_page) %></p>
|
||||
<% end %>
|
||||
|
||||
<%= format_text(wiki_page.presenter.excerpt, :ragel => true) %>
|
||||
<%= format_text(wiki_page.presenter.excerpt) %>
|
||||
<%= wiki_page_alias_and_implication_list(wiki_page) %>
|
||||
|
||||
<p class="links">
|
||||
@@ -49,7 +49,7 @@
|
||||
</h4>
|
||||
|
||||
<div id="description" class="prose">
|
||||
<%= format_text(post_set.pool.description, :ragel => true) %>
|
||||
<%= format_text(post_set.pool.description) %>
|
||||
</div>
|
||||
|
||||
<p class="links">
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<li><strong>Creator</strong> <%= link_to_user @tag_alias.creator %></li>
|
||||
<li><strong>Date</strong> <%= @tag_alias.created_at %></li>
|
||||
<% if @tag_alias.respond_to?(:reason) && @tag_alias.reason.present? %>
|
||||
<li><strong>Reason</strong> <%= format_text @tag_alias.reason, :ragel => true %></li>
|
||||
<li><strong>Reason</strong> <%= format_text @tag_alias.reason %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<li><strong>Creator</strong> <%= link_to_user @tag_implication.creator %></li>
|
||||
<li><strong>Date</strong> <%= @tag_implication.created_at %></li>
|
||||
<% if @tag_implication.respond_to?(:reason) && @tag_implication.reason.present? %>
|
||||
<li><strong>Reason</strong> <%= format_text @tag_implication.reason, :ragel => true %></li>
|
||||
<li><strong>Reason</strong> <%= format_text @tag_implication.reason %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<% if CurrentUser.can_upload? %>
|
||||
<div id="upload-guide-notice">
|
||||
<%= format_text(@upload_notice_wiki.try(&:body), :ragel => true) %>
|
||||
<%= format_text(@upload_notice_wiki.try(&:body)) %>
|
||||
</div>
|
||||
|
||||
<% unless CurrentUser.can_upload_free? %>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<td><%= link_to_user feedback.user %></td>
|
||||
<td><%= link_to_user feedback.creator %></td>
|
||||
<td><%= compact_time(feedback.created_at) %></td>
|
||||
<td><%= format_text(feedback.body, :ragel => true) %></td>
|
||||
<td><%= format_text(feedback.body) %></td>
|
||||
<td>
|
||||
<% if feedback.editable_by?(CurrentUser.user) %>
|
||||
<%= link_to "edit", edit_user_feedback_path(feedback) %>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<li><strong>Creator</strong> <%= link_to_user @user_feedback.creator %></li>
|
||||
<li><strong>Date</strong> <%= @user_feedback.created_at %></li>
|
||||
<li><strong>Category</strong> <%= @user_feedback.category %></li>
|
||||
<li><strong>Message</strong> <%= format_text @user_feedback.body, :ragel => true %></li>
|
||||
<li><strong>Message</strong> <%= format_text @user_feedback.body %></li>
|
||||
</ul>
|
||||
|
||||
<% if @user_feedback.editable_by?(CurrentUser.user) %>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<p>
|
||||
<strong><%= forum_post.creator_name %> said:</strong>
|
||||
</p>
|
||||
<%= format_text(forum_post.body, :ragel => true) %>
|
||||
<%= format_text(forum_post.body) %>
|
||||
<br>
|
||||
<hr>
|
||||
<br>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="ui-corner-all ui-state-error" id="ban-notice">
|
||||
<h1>Your account has been temporarily banned</h1>
|
||||
<p>Reason: <%= format_text CurrentUser.user.recent_ban.reason, :ragel => true %></p>
|
||||
<p>Reason: <%= format_text CurrentUser.user.recent_ban.reason %></p>
|
||||
<p>Your ban will expire in <%= time_ago_in_words(CurrentUser.user.recent_ban.expires_at) %></p>
|
||||
</div>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<% if user.is_banned? && user.recent_ban %>
|
||||
<tr>
|
||||
<th>Ban reason</th>
|
||||
<td><%= format_text presenter.ban_reason, :ragel => true %></td>
|
||||
<td><%= format_text presenter.ban_reason %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<p><%= wiki_page_other_names_list(@wiki_page_version) %></p>
|
||||
<% end %>
|
||||
|
||||
<%= format_text(@wiki_page_version.body, :ragel => true) %>
|
||||
<%= format_text(@wiki_page_version.body) %>
|
||||
<% else %>
|
||||
<p>The artist has requested removal of this page.</p>
|
||||
<% end %>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<p><%= wiki_page_other_names_list(@wiki_page) %></p>
|
||||
<% end %>
|
||||
|
||||
<%= format_text(@wiki_page.body, :ragel => true) %>
|
||||
<%= format_text(@wiki_page.body) %>
|
||||
|
||||
<% if @wiki_page.artist %>
|
||||
<p><%= link_to "View artist", @wiki_page.artist %></p>
|
||||
|
||||
Reference in New Issue
Block a user