diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-09-13 03:44:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-13 03:44:08 +0200 |
commit | 011437dcb5c4719ad6627f3a4dc07a5ce1bd9db8 (patch) | |
tree | d20890e83bb58eda30205d355aad49402ace7622 /app/helpers | |
parent | 7b7c26063e3fcf9e75a61780d81bd60b7c398ead (diff) |
Group reports by target account (#8674)
* Group reports by target account * Improve CSS
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/admin/account_moderation_notes_helper.rb | 4 | ||||
-rw-r--r-- | app/helpers/home_helper.rb | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/app/helpers/admin/account_moderation_notes_helper.rb b/app/helpers/admin/account_moderation_notes_helper.rb index 25586fbba..4d8f0352e 100644 --- a/app/helpers/admin/account_moderation_notes_helper.rb +++ b/app/helpers/admin/account_moderation_notes_helper.rb @@ -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 diff --git a/app/helpers/home_helper.rb b/app/helpers/home_helper.rb index f5b501235..0157785fa 100644 --- a/app/helpers/home_helper.rb +++ b/app/helpers/home_helper.rb @@ -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 |