diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-09-29 16:23:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-29 16:23:01 +0200 |
commit | bd9685f7980838ecc675af20cf52ef1e686d98d6 (patch) | |
tree | 43523cd55cde31d31e591e8178bf9c293dc356ad /app/views | |
parent | 0a49b26793d467589be09305e15ff9cc97cdd200 (diff) |
Fix public list of domain blocks being too verbose on about page (#11967)
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/about/_domain_blocks.html.haml | 10 | ||||
-rw-r--r-- | app/views/about/more.html.haml | 22 |
2 files changed, 19 insertions, 13 deletions
diff --git a/app/views/about/_domain_blocks.html.haml b/app/views/about/_domain_blocks.html.haml new file mode 100644 index 000000000..940bcb934 --- /dev/null +++ b/app/views/about/_domain_blocks.html.haml @@ -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? diff --git a/app/views/about/more.html.haml b/app/views/about/more.html.haml index cba2fe657..7e156db61 100644 --- a/app/views/about/more.html.haml +++ b/app/views/about/more.html.haml @@ -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 |