0
0
Fork 0

Fix public list of domain blocks being too verbose on about page (#11967)

This commit is contained in:
Eugen Rochko 2019-09-29 16:23:01 +02:00 committed by GitHub
parent 0a49b26793
commit bd9685f798
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 65 additions and 84 deletions

View file

@ -0,0 +1,10 @@
%table
%thead
%tr
%th= t('about.unavailable_content_description.domain')
%th= t('about.unavailable_content_description.reason')
%tbody
- domain_blocks.each do |domain_block|
%tr
%td.nowrap= domain_block.domain
%td= domain_block.public_comment if display_blocks_rationale?

View file

@ -55,19 +55,15 @@
%p= t('about.unavailable_content_html')
- @blocks.each do |domain_block|
%p
%strong= "#{domain_block.domain}:"
- if domain_block.suspend?
= t('about.unavailable_content_description.suspended')
- else
= t('about.unavailable_content_description.silenced') if domain_block.silence?
= t('about.unavailable_content_description.rejecting_media') if domain_block.reject_media?
- if display_blocks_rationale? && domain_block.public_comment.present?
%strong= t('about.unavailable_content_description.reason')
= domain_block.public_comment
- if (blocks = @blocks.select(&:reject_media?)) && !blocks.empty?
%p= t('about.unavailable_content_description.rejecting_media')
= render partial: 'domain_blocks', locals: { domain_blocks: blocks }
- if (blocks = @blocks.select(&:silence?)) && !blocks.empty?
%p= t('about.unavailable_content_description.silenced')
= render partial: 'domain_blocks', locals: { domain_blocks: blocks }
- if (blocks = @blocks.select(&:suspend?)) && !blocks.empty?
%p= t('about.unavailable_content_description.suspended')
= render partial: 'domain_blocks', locals: { domain_blocks: blocks }
.column-4
%ul.table-of-contents