diff options
author | robertd <robert.djurasaj@gmail.com> | 2014-02-06 23:19:49 -0700 |
---|---|---|
committer | robertd <robert.djurasaj@gmail.com> | 2014-02-06 23:27:32 -0700 |
commit | b8e81e558f4387b4ab4fed6594594ac29a7adec2 (patch) | |
tree | 0e833fa363cea8671d1504142a4cd77b89f045f5 /app | |
parent | f7b46fa5fff2b26d8213aeb8619f2212e39f9541 (diff) | |
download | gitlab-ce-b8e81e558f4387b4ab4fed6594594ac29a7adec2.tar.gz |
Show avatars of groups on profile screen that user belongs to
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/profile.js.coffee | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/sections/profile.scss | 9 | ||||
-rw-r--r-- | app/views/users/_groups.html.haml | 3 | ||||
-rw-r--r-- | app/views/users/show.html.haml | 2 |
4 files changed, 16 insertions, 0 deletions
diff --git a/app/assets/javascripts/profile.js.coffee b/app/assets/javascripts/profile.js.coffee index 744f3086d55..b37a78ac197 100644 --- a/app/assets/javascripts/profile.js.coffee +++ b/app/assets/javascripts/profile.js.coffee @@ -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")
\ No newline at end of file diff --git a/app/assets/stylesheets/sections/profile.scss b/app/assets/stylesheets/sections/profile.scss index 3a3bf7cdf2a..0ee46b9a2f7 100644 --- a/app/assets/stylesheets/sections/profile.scss +++ b/app/assets/stylesheets/sections/profile.scss @@ -105,3 +105,12 @@ } } } + +.profile-groups-avatars { + margin: 0 5px 10px 0; + + img { + width: 50px; + height: 50px; + } +} diff --git a/app/views/users/_groups.html.haml b/app/views/users/_groups.html.haml new file mode 100644 index 00000000000..412df943fcc --- /dev/null +++ b/app/views/users/_groups.html.haml @@ -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)
\ No newline at end of file diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 65f46500a89..98210af1e3d 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -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 |