Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-07-12 19:22:03 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-07-12 19:22:03 +0400
commitacb402a1c1cfb23613be0f988b60884c352de37c (patch)
tree5b2edb93552e1fc032e1386d572a2c8bf3e6f563 /app/views
parent7a42decec7a58c4824a1b951368d19b4ba3336dd (diff)
Ability to leave group from profile area
Diffstat (limited to 'app/views')
-rw-r--r--app/views/layouts/_flash.html.haml2
-rw-r--r--app/views/layouts/nav/_profile.html.haml2
-rw-r--r--app/views/profiles/groups/index.html.haml17
-rw-r--r--app/views/users_groups/_users_group.html.haml3
4 files changed, 22 insertions, 2 deletions
diff --git a/app/views/layouts/_flash.html.haml b/app/views/layouts/_flash.html.haml
index a3bed593e1c..f9ef068d18d 100644
--- a/app/views/layouts/_flash.html.haml
+++ b/app/views/layouts/_flash.html.haml
@@ -1,6 +1,6 @@
.flash-container
- if alert
- .alert
+ .alert.alert-error
%span= alert
- elsif notice
diff --git a/app/views/layouts/nav/_profile.html.haml b/app/views/layouts/nav/_profile.html.haml
index c2db7067e44..7c3acfc398a 100644
--- a/app/views/layouts/nav/_profile.html.haml
+++ b/app/views/layouts/nav/_profile.html.haml
@@ -12,6 +12,8 @@
%span.count= current_user.keys.count
= nav_link(path: 'profiles#design') do
= link_to "Design", design_profile_path
+ = nav_link(controller: :groups) do
+ = link_to "Groups", profile_groups_path
= nav_link(path: 'profiles#history') do
= link_to "History", history_profile_path
diff --git a/app/views/profiles/groups/index.html.haml b/app/views/profiles/groups/index.html.haml
new file mode 100644
index 00000000000..c07c0355b4b
--- /dev/null
+++ b/app/views/profiles/groups/index.html.haml
@@ -0,0 +1,17 @@
+.ui-box
+ %h5.title Groups
+ %ul.well-list
+ - @groups.each do |group|
+ %li
+ .pull-right
+ - if can?(current_user, :manage_group, group)
+ = link_to edit_group_path(group), class: "btn-small btn grouped" do
+ %i.icon-cogs
+ Settings
+
+ = link_to leave_profile_group_path(group), confirm: "Are you sure you want to leave #{group.name} group?", method: :delete, class: "btn-small btn grouped", title: 'Remove user from group' do
+ %i.icon-signout
+ Leave
+
+ = link_to group, class: 'group-name' do
+ = group.name
diff --git a/app/views/users_groups/_users_group.html.haml b/app/views/users_groups/_users_group.html.haml
index 3a1e32dd79d..d3d08dd5dea 100644
--- a/app/views/users_groups/_users_group.html.haml
+++ b/app/views/users_groups/_users_group.html.haml
@@ -13,6 +13,7 @@
- else
= member.human_access
- - if show_controls && user != current_user && user != @group.owner
+ - if show_controls && user != @group.owner && user != current_user
= link_to group_users_group_path(@group, member), confirm: remove_user_from_group_message(@group, user), method: :delete, remote: true, class: "btn-tiny btn btn-remove", title: 'Remove user from group' do
%i.icon-minus.icon-white
+