Replace remaining usages of `user.display_name`
This commit is contained in:
parent
df606a768e
commit
842f51d745
|
@ -3,7 +3,7 @@ module UserHelper
|
||||||
# @return [String] The user name
|
# @return [String] The user name
|
||||||
def user_screen_name(user, anonymous: false, url: true, link_only: false)
|
def user_screen_name(user, anonymous: false, url: true, link_only: false)
|
||||||
return APP_CONFIG['anonymous_name'] if user.nil? || anonymous
|
return APP_CONFIG['anonymous_name'] if user.nil? || anonymous
|
||||||
name = user.display_name.blank? ? user.screen_name : user.display_name
|
name = user.profile.display_name.blank? ? user.screen_name : user.profile.display_name
|
||||||
if url
|
if url
|
||||||
link = show_user_profile_path(user.screen_name)
|
link = show_user_profile_path(user.screen_name)
|
||||||
return link if link_only
|
return link if link_only
|
||||||
|
|
|
@ -32,7 +32,7 @@ class Services::Tumblr < Service
|
||||||
asker = if answer.question.author_is_anonymous?
|
asker = if answer.question.author_is_anonymous?
|
||||||
APP_CONFIG['anonymous_name']
|
APP_CONFIG['anonymous_name']
|
||||||
else
|
else
|
||||||
answer.question.user.display_name.blank? ? answer.question.user.screen_name : answer.question.user.display_name
|
answer.question.user.profile.display_name.blank? ? answer.question.user.screen_name : answer.question.user.profile.display_name
|
||||||
end
|
end
|
||||||
client.text(
|
client.text(
|
||||||
self.uid,
|
self.uid,
|
||||||
|
|
|
@ -6,12 +6,12 @@
|
||||||
%img.avatar-md.mr-2{ src: u.profile_picture.url(:medium) }
|
%img.avatar-md.mr-2{ src: u.profile_picture.url(:medium) }
|
||||||
.media-body
|
.media-body
|
||||||
%h6.media-heading.answerbox__question-user
|
%h6.media-heading.answerbox__question-user
|
||||||
- if u.display_name.blank?
|
- if u.profile.display_name.blank?
|
||||||
%a{ href: show_user_profile_path(u.screen_name) }
|
%a{ href: show_user_profile_path(u.screen_name) }
|
||||||
= u.screen_name
|
= u.screen_name
|
||||||
- else
|
- else
|
||||||
%a{ href: show_user_profile_path(u.screen_name) }
|
%a{ href: show_user_profile_path(u.screen_name) }
|
||||||
= u.display_name
|
= u.profile.display_name
|
||||||
%span.text-muted= u.screen_name
|
%span.text-muted= u.screen_name
|
||||||
%p.answerbox__question-text
|
%p.answerbox__question-text
|
||||||
- case type
|
- case type
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
.card-body
|
.card-body
|
||||||
%img.userbox__avatar{ src: user.profile_picture.url(:small) }
|
%img.userbox__avatar{ src: user.profile_picture.url(:small) }
|
||||||
%a.profile__name{ href: show_user_profile_path(user.screen_name) }
|
%a.profile__name{ href: show_user_profile_path(user.screen_name) }
|
||||||
- unless user.display_name.blank?
|
- unless user.profile.display_name.blank?
|
||||||
.profile__display-name
|
.profile__display-name
|
||||||
= user.display_name
|
= user.profile.display_name
|
||||||
.profile__screen-name
|
.profile__screen-name
|
||||||
= user.screen_name
|
= user.screen_name
|
||||||
.row
|
.row
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
.card-body
|
.card-body
|
||||||
%img.userbox__avatar{ src: user.profile_picture.url(:small) }
|
%img.userbox__avatar{ src: user.profile_picture.url(:small) }
|
||||||
%a.profile__name{ href: show_user_profile_path(user.screen_name) }
|
%a.profile__name{ href: show_user_profile_path(user.screen_name) }
|
||||||
- unless user.display_name.blank?
|
- unless user.profile.display_name.blank?
|
||||||
.profile__display-name
|
.profile__display-name
|
||||||
= user.display_name
|
= user.profile.display_name
|
||||||
.profile__screen-name
|
.profile__screen-name
|
||||||
= user.screen_name
|
= user.screen_name
|
||||||
= render 'user/actions', user: user, type: type
|
= render 'user/actions', user: user, type: type
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
%img.profile__avatar{ src: user.profile_picture.url(:large) }
|
%img.profile__avatar{ src: user.profile_picture.url(:large) }
|
||||||
.card-body
|
.card-body
|
||||||
.profile__name
|
.profile__name
|
||||||
- unless user.display_name.blank?
|
- unless user.profile.display_name.blank?
|
||||||
.profile__display-name
|
.profile__display-name
|
||||||
= user.display_name
|
= user.profile.display_name
|
||||||
.profile__screen-name
|
.profile__screen-name
|
||||||
= user.screen_name
|
= user.screen_name
|
||||||
.profile__badge-container
|
.profile__badge-container
|
||||||
|
|
Loading…
Reference in New Issue