Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
99b8568f
Commit
99b8568f
authored
Oct 18, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Find correct group membership.
parent
5c4bb6df
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+1
-2
app/views/projects/buttons/_notifications.html.haml
app/views/projects/buttons/_notifications.html.haml
+5
-6
No files found.
app/controllers/projects_controller.rb
View file @
99b8568f
...
...
@@ -87,8 +87,7 @@ class ProjectsController < ApplicationController
render
'projects/empty'
else
if
current_user
@membership
=
@project
.
project_member_by_id
(
current_user
.
id
)
@group_member
=
GroupMember
.
find_by
(
user_id:
current_user
.
id
)
@membership
=
@project
.
team
.
find_member
(
current_user
.
id
)
end
render
:show
...
...
app/views/projects/buttons/_notifications.html.haml
View file @
99b8568f
-
return
unless
[
@membership
,
@group_member
].
any?
-
if
@membership
-
case
@membership
-
when
ProjectMember
=
form_tag
profile_notifications_path
,
method: :put
,
remote:
true
,
class:
'inline'
,
id:
'notification-form'
do
=
hidden_field_tag
:notification_type
,
'project'
=
hidden_field_tag
:notification_id
,
@membership
.
id
...
...
@@ -14,8 +13,8 @@
-
Notification
.
project_notification_levels
.
each
do
|
level
|
=
notification_list_item
(
level
,
@membership
)
-
elsif
@group_m
ember
.btn.btn-new.disabled
#notifications-button
-
when
GroupM
ember
.btn.btn-new.disabled
=
icon
(
'bell'
)
=
notification_label
(
@
group_member
)
=
notification_label
(
@
membership
)
=
icon
(
'angle-down'
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment