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
8b4bec59
Commit
8b4bec59
authored
Sep 12, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed boards text in the project sidebar
Closes #3415
parent
fd326fc3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
8 deletions
+37
-8
app/views/layouts/nav/sidebar/_project.html.haml
app/views/layouts/nav/sidebar/_project.html.haml
+2
-2
ee/app/helpers/ee/boards_helper.rb
ee/app/helpers/ee/boards_helper.rb
+8
-0
spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb
spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb
+27
-6
No files found.
app/views/layouts/nav/sidebar/_project.html.haml
View file @
8b4bec59
...
@@ -124,9 +124,9 @@
...
@@ -124,9 +124,9 @@
List
List
=
nav_link
(
controller: :boards
)
do
=
nav_link
(
controller: :boards
)
do
=
link_to
project_boards_path
(
@project
),
title:
'Board'
do
=
link_to
project_boards_path
(
@project
),
title:
boards_link_text
do
%span
%span
Board
=
boards_link_text
.feature-highlight.js-feature-highlight
{
disabled:
true
,
data:
{
trigger:
'manual'
,
container:
'body'
,
toggle:
'popover'
,
placement:
'right'
,
highlight:
'issue-boards'
}
}
.feature-highlight.js-feature-highlight
{
disabled:
true
,
data:
{
trigger:
'manual'
,
container:
'body'
,
toggle:
'popover'
,
placement:
'right'
,
highlight:
'issue-boards'
}
}
.feature-highlight-popover-content
.feature-highlight-popover-content
=
render
'feature_highlight/issue_boards.svg'
=
render
'feature_highlight/issue_boards.svg'
...
...
ee/app/helpers/ee/boards_helper.rb
View file @
8b4bec59
...
@@ -54,5 +54,13 @@ module EE
...
@@ -54,5 +54,13 @@ module EE
def
board_sidebar_user_data
def
board_sidebar_user_data
super
.
merge
(
group_id:
@group
&
.
id
)
super
.
merge
(
group_id:
@group
&
.
id
)
end
end
def
boards_link_text
if
@project
.
multiple_issue_boards_available?
(
current_user
)
"Boards"
else
"Board"
end
end
end
end
end
end
spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb
View file @
8b4bec59
require
'spec_helper'
require
'spec_helper'
describe
'layouts/nav/sidebar/_project'
do
describe
'layouts/nav/sidebar/_project'
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
before
do
assign
(
:project
,
project
)
assign
(
:repository
,
project
.
repository
)
allow
(
view
).
to
receive
(
:current_ref
).
and_return
(
'master'
)
allow
(
view
).
to
receive
(
:can?
).
and_return
(
true
)
end
describe
'issue boards'
do
it
'has boards tab when multiple issue boards available'
do
render
expect
(
rendered
).
to
have_css
(
'a[title="Boards"]'
)
end
it
'has board tab when multiple issue boards is not available'
do
allow
(
License
).
to
receive
(
:feature_available?
).
and_call_original
allow
(
License
).
to
receive
(
:feature_available?
).
with
(
:multiple_issue_boards
)
{
false
}
render
expect
(
rendered
).
to
have_css
(
'a[title="Board"]'
)
end
end
describe
'container registry tab'
do
describe
'container registry tab'
do
before
do
before
do
project
=
create
(
:project
,
:repository
)
stub_container_registry_config
(
enabled:
true
)
stub_container_registry_config
(
enabled:
true
)
assign
(
:project
,
project
)
assign
(
:repository
,
project
.
repository
)
allow
(
view
).
to
receive
(
:current_ref
).
and_return
(
'master'
)
allow
(
view
).
to
receive
(
:can?
).
and_return
(
true
)
allow
(
controller
).
to
receive
(
:controller_name
)
allow
(
controller
).
to
receive
(
:controller_name
)
.
and_return
(
'repositories'
)
.
and_return
(
'repositories'
)
allow
(
controller
).
to
receive
(
:controller_path
)
allow
(
controller
).
to
receive
(
:controller_path
)
...
...
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