Commit b8e81e558f4387b4ab4fed6594594ac29a7adec2

Authored by robertd
1 parent f7b46fa5

Show avatars of groups on profile screen that user belongs to

app/assets/javascripts/profile.js.coffee
... ... @@ -26,3 +26,5 @@ $ ->
26 26 form = $(this).closest("form")
27 27 filename = $(this).val().replace(/^.*[\\\/]/, '')
28 28 form.find(".js-avatar-filename").text(filename)
  29 +
  30 + $('.profile-groups-avatars').tooltip("placement": "top")
29 31 \ No newline at end of file
... ...
app/assets/stylesheets/sections/profile.scss
... ... @@ -105,3 +105,12 @@
105 105 }
106 106 }
107 107 }
  108 +
  109 +.profile-groups-avatars {
  110 + margin: 0 5px 10px 0;
  111 +
  112 + img {
  113 + width: 50px;
  114 + height: 50px;
  115 + }
  116 +}
... ...
app/views/users/_groups.html.haml 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +- groups.each do |group|
  2 + = link_to group, class: 'profile-groups-avatars', :title => group.name do
  3 + = image_tag group_icon(group.path)
0 4 \ No newline at end of file
... ...
app/views/users/show.html.haml
... ... @@ -13,6 +13,8 @@
13 13 %br
14 14 %small member since #{@user.created_at.stamp("Nov 12, 2031")}
15 15 .clearfix
  16 + %h4 Groups:
  17 + = render 'groups', groups: @user.groups
16 18 %hr
17 19 %h4 User Activity:
18 20 = render @events
... ...