0
0
Fork 0

Group reports by target account (#8674)

* Group reports by target account

* Improve CSS
This commit is contained in:
Eugen Rochko 2018-09-13 03:44:08 +02:00 committed by GitHub
parent 7b7c26063e
commit 011437dcb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
48 changed files with 154 additions and 227 deletions

View file

@ -4,7 +4,7 @@ module Admin::AccountModerationNotesHelper
def admin_account_link_to(account)
return if account.nil?
link_to admin_account_path(account.id), class: name_tag_classes(account) do
link_to admin_account_path(account.id), class: name_tag_classes(account), title: account.acct do
safe_join([
image_tag(account.avatar.url, width: 15, height: 15, alt: display_name(account), class: 'avatar'),
content_tag(:span, account.acct, class: 'username'),
@ -15,7 +15,7 @@ module Admin::AccountModerationNotesHelper
def admin_account_inline_link_to(account)
return if account.nil?
link_to admin_account_path(account.id), class: name_tag_classes(account, true) do
link_to admin_account_path(account.id), class: name_tag_classes(account, true), title: account.acct do
content_tag(:span, account.acct, class: 'username')
end
end

View file

@ -7,13 +7,13 @@ module HomeHelper
}
end
def account_link_to(account, button = '')
def account_link_to(account, button = '', size: 36, path: nil)
content_tag(:div, class: 'account') do
content_tag(:div, class: 'account__wrapper') do
section = if account.nil?
content_tag(:div, class: 'account__display-name') do
content_tag(:div, class: 'account__avatar-wrapper') do
content_tag(:div, '', class: 'account__avatar', style: "background-image: url(#{full_asset_url('avatars/original/missing.png', skip_pipeline: true)})")
content_tag(:div, '', class: 'account__avatar', style: "width: #{size}px; height: #{size}px; background-size: #{size}px #{size}px; background-image: url(#{full_asset_url('avatars/original/missing.png', skip_pipeline: true)})")
end +
content_tag(:span, class: 'display-name') do
content_tag(:strong, t('about.contact_missing')) +
@ -21,9 +21,9 @@ module HomeHelper
end
end
else
link_to(TagManager.instance.url_for(account), class: 'account__display-name') do
link_to(path || TagManager.instance.url_for(account), class: 'account__display-name') do
content_tag(:div, class: 'account__avatar-wrapper') do
content_tag(:div, '', class: 'account__avatar', style: "background-image: url(#{account.avatar.url})")
content_tag(:div, '', class: 'account__avatar', style: "width: #{size}px; height: #{size}px; background-size: #{size}px #{size}px; background-image: url(#{account.avatar.url})")
end +
content_tag(:span, class: 'display-name') do
content_tag(:bdi) do