Retrospring/app/views/settings/_blocks.haml

36 lines
1.4 KiB
Plaintext
Raw Normal View History

.card
.card-body
%h2= t(".section.blocks.heading")
%p= t(".section.blocks.body")
%ul.list-group
- @blocks.each do |block|
%li.list-group-item
.d-flex
%img.avatar-md.d-none.d-sm-inline.mr-2{ src: block.target.profile_picture.url(:small) }
%div
%p.mb-0= user_screen_name(block.target)
%p.text-muted.mb-0= t(".blocked", time: time_ago_in_words(block.created_at))
.ml-auto.d-inline-flex
%button.btn.btn-default.align-self-center{ data: { action: :unblock, target: block.target.screen_name } }
%span.pe-none= t("views.actions.unblock")
- if @blocks.empty?
%p.text-muted.text-center= t(".none")
.card
.card-body
%h2= t(".section.anon_blocks.heading")
%p= t(".section.anon_blocks.body")
%ul.list-group
- @anonymous_blocks.each do |block|
%li.list-group-item
.d-flex
%div
%p.mb-0= block.question.content
%p.text-muted.mb-0= t(".blocked", time: time_ago_in_words(block.created_at))
.ml-auto.d-inline-flex
%button.btn.btn-default.align-self-center{ data: { action: "anon-unblock", target: block.id } }
%span.pe-none= t("views.actions.unblock")
- if @anonymous_blocks.empty?
%p.text-muted.text-center= t(".none")