Show avatars of groups on profile screen that user belongs to
This commit is contained in:
parent
f7b46fa5ff
commit
b8e81e558f
4 changed files with 16 additions and 0 deletions
|
@ -26,3 +26,5 @@ $ ->
|
|||
form = $(this).closest("form")
|
||||
filename = $(this).val().replace(/^.*[\\\/]/, '')
|
||||
form.find(".js-avatar-filename").text(filename)
|
||||
|
||||
$('.profile-groups-avatars').tooltip("placement": "top")
|
|
@ -105,3 +105,12 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.profile-groups-avatars {
|
||||
margin: 0 5px 10px 0;
|
||||
|
||||
img {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
}
|
||||
|
|
3
app/views/users/_groups.html.haml
Normal file
3
app/views/users/_groups.html.haml
Normal file
|
@ -0,0 +1,3 @@
|
|||
- groups.each do |group|
|
||||
= link_to group, class: 'profile-groups-avatars', :title => group.name do
|
||||
= image_tag group_icon(group.path)
|
|
@ -13,6 +13,8 @@
|
|||
%br
|
||||
%small member since #{@user.created_at.stamp("Nov 12, 2031")}
|
||||
.clearfix
|
||||
%h4 Groups:
|
||||
= render 'groups', groups: @user.groups
|
||||
%hr
|
||||
%h4 User Activity:
|
||||
= render @events
|
||||
|
|
Loading…
Reference in a new issue