Skip to content

Commit af6f92b

Browse files
authored
add followers user profile (#7637)
1 parent 2b1af16 commit af6f92b

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

app/routes/groups/view.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ export default class ViewRoute extends Route.extend(AuthenticatedRouteMixin) {
3131
sort : 'name'
3232
}),
3333
group: this.store.findRecord('group', params.group_id, {
34-
include: 'events,follower,user'
34+
include: 'events,follower,followers,user'
3535
})
3636
});
3737
}
3838
}
39+

app/templates/components/forms/group/group-view.hbs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,25 @@
8080
<i class="users icon"></i>
8181
({{@group.followerCount}} {{t 'followers'}})
8282
</div>
83+
{{#if @group.followers}}
84+
<div class="d-flex content-center items-center wrap mt-4">
85+
{{#each @group.followers as |follower index|}}
86+
{{#if (lt index 6)}}
87+
<a href={{if follower.user.isProfilePublic (href-to 'public.sessions.user.view' follower.user.id) '#'}}
88+
class="pointer"
89+
data-tooltip={{follower.user.resolvedName}}>
90+
<img
91+
class="ui tiny avatar image mb-2"
92+
src={{or follower.user.thumbnailImageUrl follower.user.avatarUrl '/images/placeholders/avatar.png'}} />
93+
</a>
94+
{{else}}
95+
{{#if (eq index 6)}}
96+
<span>{{t 'and'}} {{sub @group.followerCount index}} {{t 'others'}}</span>
97+
{{/if}}
98+
{{/if}}
99+
{{/each}}
100+
</div>
101+
{{/if}}
83102
</div>
84103
</div>
85104
<Modals::EventShareModal @isOpen={{this.isShareModalOpen}} @event={{this.eventToShare}} />

0 commit comments

Comments
 (0)