BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
1f94b952
Commit
1f94b952
authored
Feb 13, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show notifications settings when repository is disabled
parent
edb8ed36
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
1 deletion
+41
-1
_home_panel.html.haml
app/views/projects/_home_panel.html.haml
+3
-1
_home_panel.html.haml_spec.rb
spec/views/projects/_home_panel.html.haml_spec.rb
+38
-0
No files found.
app/views/projects/_home_panel.html.haml
View file @
1f94b952
...
@@ -31,6 +31,8 @@
...
@@ -31,6 +31,8 @@
-
if
current_user
&&
can?
(
current_user
,
:download_code
,
@project
)
-
if
current_user
&&
can?
(
current_user
,
:download_code
,
@project
)
=
render
'projects/buttons/download'
,
project:
@project
,
ref:
@ref
=
render
'projects/buttons/download'
,
project:
@project
,
ref:
@ref
=
render
'projects/buttons/dropdown'
=
render
'projects/buttons/dropdown'
=
render
'shared/notifications/button'
,
notification_setting:
@notification_setting
=
render
'projects/buttons/koding'
=
render
'projects/buttons/koding'
-
if
current_user
=
render
'shared/notifications/button'
,
notification_setting:
@notification_setting
=
render
'shared/members/access_request_buttons'
,
source:
@project
=
render
'shared/members/access_request_buttons'
,
source:
@project
spec/views/projects/_home_panel.html.haml_spec.rb
0 → 100644
View file @
1f94b952
require
'spec_helper'
describe
'projects/_home_panel'
,
:view
do
let
(
:project
)
{
create
(
:empty_project
,
:public
)
}
let
(
:notification_settings
)
do
user
.
notification_settings_for
(
project
)
if
user
end
before
do
assign
(
:project
,
project
)
assign
(
:notification_setting
,
notification_settings
)
allow
(
view
).
to
receive
(
:current_user
).
and_return
(
user
)
allow
(
view
).
to
receive
(
:can?
).
and_return
(
false
)
end
context
'user is signed in'
do
let
(
:user
)
{
create
(
:user
)
}
it
'makes it possible to set notification level'
do
render
expect
(
view
).
to
render_template
(
'shared/notifications/_button'
)
expect
(
rendered
).
to
have_selector
(
'.notification-dropdown'
)
end
end
context
'user is signed out'
do
let
(
:user
)
{
nil
}
it
'is not possible to set notification level'
do
render
expect
(
rendered
).
not_to
have_selector
(
'.notification_dropdown'
)
end
end
end
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