diff --git a/common/locales/en/challenge.json b/common/locales/en/challenge.json index fb49da873a..91f9760845 100644 --- a/common/locales/en/challenge.json +++ b/common/locales/en/challenge.json @@ -60,5 +60,6 @@ "noPermissionEditChallenge": "You don't have permissions to edit this challenge", "noPermissionDeleteChallenge": "You don't have permissions to delete this challenge", "noPermissionCloseChallenge": "You don't have permissions to close this challenge", - "noChallengeOwner": "no owner" + "noChallengeOwner": "no owner", + "noChallengeOwnerPopover": "This challenge does not have an owner because the user who created the challenge deleted their account." } diff --git a/website/views/options/social/challenges.jade b/website/views/options/social/challenges.jade index 0a8341613c..cb0a36e358 100644 --- a/website/views/options/social/challenges.jade +++ b/website/views/options/social/challenges.jade @@ -186,11 +186,13 @@ script(type='text/ng-template', id='partials/options.social.challenges.html') | {{challenge.group.name}} a(ui-sref="options.social.party" ng-if="challenge.group.type=='party'") | {{challenge.group.name}} - li + li(ng-if='challenge.leader.profile.name') =env.t('by') + ' ' - a(ng-click='clickMember(challenge.leader._id, true)') {{challenge.leader.profile.name || env.t('noChallengeOwner')}} - li - =env.t('participants', {membercount: "{{challenge.memberCount}}"}) + a(ng-click='clickMember(challenge.leader._id, true)') {{::challenge.leader.profile.name}} + li(ng-if='!challenge.leader.profile.name', + popover=env.t('noChallengeOwnerPopover'), + popover-trigger='mouseenter')=env.t('noChallengeOwner') + li=env.t('participants', {membercount: "{{challenge.memberCount}}"}) li(ng-show='challenge.prize') p!=env.t('prizeValue', {gemcount: "{{challenge.prize}}", gemicon: ""}) li.bg-transparent