css: ensure dtext is always wrapped in .prose container.

Ensure dtext is always wrapped in a `<div class="prose">` or
`<span class="prose">` (for inline dtext) container so that dtext css is
properly applied.
This commit is contained in:
evazion
2019-09-17 00:28:41 -05:00
parent a5ef86bbe8
commit 73a4d675c0
18 changed files with 77 additions and 19 deletions

View File

@@ -28,7 +28,11 @@
</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 %></td>
<td class="col-expand">
<div class="prose">
<%= format_text ban.reason %>
</div>
</td>
<td>
<% if CurrentUser.is_moderator? %>
<%= link_to "Edit", edit_ban_path(ban) %>

View File

@@ -4,7 +4,12 @@
<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 %></li>
<li>
<strong>Reason</strong>:
<div class="prose">
<%= format_text @ban.reason %>
</div>
</li>
</ul>
<%= form_tag(ban_path(@ban), :method => :delete) do %>

View File

@@ -14,7 +14,9 @@
<div style="margin: 1em 0;">
<h2>Script</h2>
<pre><%= format_text @bulk_update_request.script_with_links %></pre>
<div class="prose">
<%= format_text @bulk_update_request.script_with_links %>
</div>
<%= render "bur_edit_links", bur: @bulk_update_request %>
</div>

View File

@@ -136,7 +136,7 @@
<% end %>
<div class="ui-corner-all ui-state-highlight" id="notice" style="<%= "display: none;" unless flash[:notice] %>">
<span><%= format_text(flash[:notice], inline: true) %>.</span>
<span class="prose"><%= format_text(flash[:notice], inline: true) %>.</span>
<a href="#" id="close-notice-link">close</a>
</div>

View File

@@ -17,7 +17,11 @@
<tr>
<td><%= compact_time mod_action.created_at %></td>
<td><%= link_to_user mod_action.creator %></td>
<td><%= format_text(mod_action.filtered_description) %></td>
<td>
<div class="prose">
<%= format_text(mod_action.filtered_description) %>
</div>
</td>
</tr>
<% end %>
</tbody>

View File

@@ -10,7 +10,11 @@
<% @dashboard.mod_actions.each do |mod_action| %>
<tr>
<td><%= link_to_user mod_action.creator %></td>
<td><%= format_text(mod_action.description) %></td>
<td>
<div class="prose">
<%= format_text(mod_action.description) %>
</div>
</td>
</tr>
<% end %>
</tbody>

View File

@@ -11,7 +11,11 @@
<% @dashboard.user_feedbacks.each do |record| %>
<tr class="feedback-category-<%= record.category %>">
<td><%= link_to_user(record.user) %></td>
<td><%= format_text(record.body) %></td>
<td>
<div class="prose">
<%= format_text(record.body) %>
</div>
</td>
<td><%= time_ago_in_words_tagged(record.created_at) %></td>
</tr>
<% end %>

View File

@@ -29,7 +29,11 @@
<%= link_to "post ##{post_disapproval.post_id}", post_path(post_disapproval.post_id) %>
<%= link_to "»", moderator_post_disapprovals_path(search: params[:search].merge(post_id: post_disapproval.post_id)) %>
</td>
<td class="col-expand"><%= format_text(post_disapproval.message) %></td>
<td class="col-expand">
<div class="prose">
<%= format_text(post_disapproval.message) %>
</div>
</td>
<td>
<%= link_to post_disapproval.reason.humanize, moderator_post_disapprovals_path(search: params[:search].merge(reason: post_disapproval.reason)) %>
</td>

View File

@@ -19,7 +19,11 @@
<% @post_appeals.each do |post_appeal| %>
<tr>
<td><%= PostPresenter.preview(post_appeal.post, :tags => "status:any") %></td>
<td><%= format_text post_appeal.reason %></td>
<td>
<div class="prose">
<%= format_text post_appeal.reason %>
</div>
</td>
<td>
<%= link_to post_appeal.post.appeals.size, post_appeals_path(search: { post_id: post_appeal.post_id }) %>
</td>

View File

@@ -23,7 +23,11 @@
<% end %>
<br><%= time_ago_in_words_tagged event.created_at %>
</td>
<td class="col-expand"><%= format_text event.reason %></td>
<td class="col-expand">
<div class="prose">
<%= format_text event.reason %>
</div>
</td>
<td><%= event.is_resolved %></td>
</tr>
<% end %>

View File

@@ -21,7 +21,9 @@
<tr class="resolved-<%= post_flag.is_resolved? %>">
<td><%= PostPresenter.preview(post_flag.post, :tags => "status:any") %></td>
<td>
<%= format_text post_flag.reason %>
<div class="prose">
<%= format_text post_flag.reason %>
</div>
</td>
<td>
<%= link_to post_flag.post.flags.size, post_flags_path(search: { post_id: post_flag.post_id }) %>

View File

@@ -11,9 +11,14 @@
<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 %></li>
<li>
<strong>Reason</strong>
<div class="prose">
<%= format_text @tag_alias.reason %>
</div>
</li>
<% end %>
<li><strong>Status</strong>: <%= @tag_alias.status %></li>
<li><strong>Status</strong> <%= @tag_alias.status %></li>
<% if CurrentUser.is_admin? && @tag_alias.is_pending? %>
<li><strong>Commands</strong> <%= link_to "Approve", approve_tag_alias_path(@tag_alias), :method => :post %></li>

View File

@@ -11,7 +11,12 @@
<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 %></li>
<li>
<strong>Reason</strong>
<div class="prose">
<%= format_text @tag_implication.reason %>
</div>
</li>
<% end %>
<li><strong>Status</strong>: <%= @tag_implication.status %></li>

View File

@@ -3,7 +3,7 @@
<h1>Upload</h1>
<% if CurrentUser.can_upload? %>
<div id="upload-guide-notice">
<div id="upload-guide-notice" class="prose">
<%= format_text(@upload_notice_wiki.try(&:body)) %>
</div>

View File

@@ -19,7 +19,9 @@
<td><%= link_to_user feedback.creator %></td>
<td><%= compact_time(feedback.created_at) %></td>
<td>
<%= format_text(feedback.body) %>
<div class="prose">
<%= format_text(feedback.body) %>
</div>
<%= render "application/update_notice", record: feedback, interval: 0.minutes %>
</td>
<td>

View File

@@ -6,7 +6,12 @@
<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 %></li>
<li>
<strong>Message</strong>
<div class="prose">
<%= format_text @user_feedback.body %>
</div>
</li>
</ul>
<% if @user_feedback.editable_by?(CurrentUser.user) %>

View File

@@ -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 %></p>
<p>Reason: <span class="prose"><%= format_text CurrentUser.user.recent_ban.reason, inline: true %></span></p>
<p>Your ban will expire in <%= time_ago_in_words(CurrentUser.user.recent_ban.expires_at) %></p>
</div>

View File

@@ -38,7 +38,11 @@
<% if user.is_banned? && user.recent_ban %>
<tr>
<th>Ban reason</th>
<td><%= format_text presenter.ban_reason %></td>
<td>
<div class="prose">
<%= format_text presenter.ban_reason %>
</div>
</td>
</tr>
<% end %>