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
5f6c6d6a
Commit
5f6c6d6a
authored
Aug 17, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide `Create new list button` on Issues and MRs pages
parent
146e9059
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
3 deletions
+43
-3
app/views/shared/issuable/_filter.html.haml
app/views/shared/issuable/_filter.html.haml
+3
-3
spec/features/projects/issues/list_spec.rb
spec/features/projects/issues/list_spec.rb
+20
-0
spec/features/projects/merge_requests/list_spec.rb
spec/features/projects/merge_requests/list_spec.rb
+20
-0
No files found.
app/views/shared/issuable/_filter.html.haml
View file @
5f6c6d6a
...
...
@@ -27,9 +27,7 @@
=
render
"shared/issuable/label_dropdown"
.pull-right
-
if
controller
.
controller_name
!=
'boards'
=
render
'shared/sort_dropdown'
-
if
can?
(
current_user
,
:admin_list
,
@project
)
-
if
controller
.
controller_name
==
'boards'
&&
can?
(
current_user
,
:admin_list
,
@project
)
.dropdown
%button
.btn.btn-create.js-new-board-list
{
type:
"button"
,
data:
{
toggle:
"dropdown"
,
labels:
labels_filter_path
,
project_id:
@project
.
try
(
:id
)
}
}
Create new list
...
...
@@ -38,6 +36,8 @@
-
if
can?
(
current_user
,
:admin_label
,
@project
)
=
render
partial:
"shared/issuable/label_page_create"
=
dropdown_loading
-
else
=
render
'shared/sort_dropdown'
-
if
controller
.
controller_name
==
'issues'
.issues_bulk_update.hide
...
...
spec/features/projects/issues/list_spec.rb
0 → 100644
View file @
5f6c6d6a
require
'spec_helper'
feature
'Issues List'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:empty_project
)
}
background
do
project
.
team
<<
[
user
,
:developer
]
login_as
(
user
)
end
scenario
'user does not see create new list button'
do
create
(
:issue
,
project:
project
)
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
expect
(
page
).
not_to
have_selector
(
'.js-new-board-list'
)
end
end
spec/features/projects/merge_requests/list_spec.rb
0 → 100644
View file @
5f6c6d6a
require
'spec_helper'
feature
'Merge Requests List'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
background
do
project
.
team
<<
[
user
,
:developer
]
login_as
(
user
)
end
scenario
'user does not see create new list button'
do
create
(
:merge_request
,
source_project:
project
)
visit
namespace_project_merge_requests_path
(
project
.
namespace
,
project
)
expect
(
page
).
not_to
have_selector
(
'.js-new-board-list'
)
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