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
4c058f2e
Commit
4c058f2e
authored
Nov 21, 2016
by
Alejandro Rodríguez
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'ce/master' into ce-upstream
parents
90cecd89
56b420ae
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
109 additions
and
55 deletions
+109
-55
app/assets/stylesheets/framework/blocks.scss
app/assets/stylesheets/framework/blocks.scss
+29
-0
app/helpers/application_settings_helper.rb
app/helpers/application_settings_helper.rb
+5
-5
app/helpers/groups_helper.rb
app/helpers/groups_helper.rb
+4
-0
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+4
-0
app/views/admin/application_settings/_form.html.haml
app/views/admin/application_settings/_form.html.haml
+2
-3
app/views/groups/issues.html.haml
app/views/groups/issues.html.haml
+21
-18
app/views/projects/issues/_issues.html.haml
app/views/projects/issues/_issues.html.haml
+1
-2
app/views/projects/issues/index.html.haml
app/views/projects/issues/index.html.haml
+4
-20
app/views/shared/_issues.html.haml
app/views/shared/_issues.html.haml
+1
-1
app/views/shared/empty_states/_issues.html.haml
app/views/shared/empty_states/_issues.html.haml
+22
-0
app/views/shared/empty_states/icons/_issues.svg
app/views/shared/empty_states/icons/_issues.svg
+1
-0
changelogs/unreleased/18136-ui-for-restricting-global-visibility-levels-is-unclear.yml
...i-for-restricting-global-visibility-levels-is-unclear.yml
+4
-0
features/steps/project/issues/issues.rb
features/steps/project/issues/issues.rb
+1
-1
spec/features/issues/filter_issues_spec.rb
spec/features/issues/filter_issues_spec.rb
+5
-5
spec/features/issues_spec.rb
spec/features/issues_spec.rb
+5
-0
No files found.
app/assets/stylesheets/framework/blocks.scss
View file @
4c058f2e
...
@@ -254,3 +254,32 @@
...
@@ -254,3 +254,32 @@
.content-block-small
{
.content-block-small
{
padding
:
10px
0
;
padding
:
10px
0
;
}
}
.empty-state
{
margin
:
100px
0
0
;
.text-content
{
max-width
:
460px
;
margin
:
0
auto
;
padding
:
$gl-padding
;
}
.svg-content
{
text-align
:
center
;
svg
{
max-width
:
425px
;
width
:
100%
;
padding
:
$gl-padding
;
}
}
@media
(
max-width
:
$screen-xs-max
)
{
margin-top
:
50px
;
text-align
:
center
;
.btn
{
width
:
100%
;
}
}
}
app/helpers/application_settings_helper.rb
View file @
4c058f2e
...
@@ -50,14 +50,14 @@ module ApplicationSettingsHelper
...
@@ -50,14 +50,14 @@ module ApplicationSettingsHelper
def
restricted_level_checkboxes
(
help_block_id
)
def
restricted_level_checkboxes
(
help_block_id
)
Gitlab
::
VisibilityLevel
.
options
.
map
do
|
name
,
level
|
Gitlab
::
VisibilityLevel
.
options
.
map
do
|
name
,
level
|
checked
=
restricted_visibility_levels
(
true
).
include?
(
level
)
checked
=
restricted_visibility_levels
(
true
).
include?
(
level
)
css_class
=
'btn'
css_class
=
checked
?
'active'
:
''
css_class
+=
' active'
if
checked
checkbox_name
=
"application_setting[restricted_visibility_levels][]"
checkbox_name
=
'application_setting[restricted_visibility_levels][]'
label_tag
(
checkbox_
name
,
class:
css_class
)
do
label_tag
(
name
,
class:
css_class
)
do
check_box_tag
(
checkbox_name
,
level
,
checked
,
check_box_tag
(
checkbox_name
,
level
,
checked
,
autocomplete:
'off'
,
autocomplete:
'off'
,
'aria-describedby'
=>
help_block_id
)
+
name
'aria-describedby'
=>
help_block_id
,
id:
name
)
+
visibility_level_icon
(
level
)
+
name
end
end
end
end
end
end
...
...
app/helpers/groups_helper.rb
View file @
4c058f2e
...
@@ -54,4 +54,8 @@ module GroupsHelper
...
@@ -54,4 +54,8 @@ module GroupsHelper
"
#{
status
.
humanize
}
#{
projects_lfs_status
(
group
)
}
"
"
#{
status
.
humanize
}
#{
projects_lfs_status
(
group
)
}
"
end
end
end
end
def
group_issues
(
group
)
IssuesFinder
.
new
(
current_user
,
group_id:
group
.
id
).
execute
end
end
end
app/helpers/projects_helper.rb
View file @
4c058f2e
...
@@ -486,4 +486,8 @@ module ProjectsHelper
...
@@ -486,4 +486,8 @@ module ProjectsHelper
def
project_child_container_class
(
view_path
)
def
project_child_container_class
(
view_path
)
view_path
==
"projects/issues/issues"
?
"prepend-top-default"
:
"project-show-
#{
view_path
}
"
view_path
==
"projects/issues/issues"
?
"prepend-top-default"
:
"project-show-
#{
view_path
}
"
end
end
def
project_issues
(
project
)
IssuesFinder
.
new
(
current_user
,
project_id:
project
.
id
).
execute
end
end
end
app/views/admin/application_settings/_form.html.haml
View file @
4c058f2e
...
@@ -22,9 +22,8 @@
...
@@ -22,9 +22,8 @@
.form-group
.form-group
=
f
.
label
:restricted_visibility_levels
,
class:
'control-label col-sm-2'
=
f
.
label
:restricted_visibility_levels
,
class:
'control-label col-sm-2'
.col-sm-10
.col-sm-10
-
data_attrs
=
{
toggle:
'buttons'
}
-
restricted_level_checkboxes
(
'restricted-visibility-help'
).
each
do
|
level
|
.btn-group
{
data:
data_attrs
}
.checkbox
-
restricted_level_checkboxes
(
'restricted-visibility-help'
).
each
do
|
level
|
=
level
=
level
%span
.help-block
#restricted-visibility-help
%span
.help-block
#restricted-visibility-help
Selected levels cannot be used by non-admin users for projects or snippets.
Selected levels cannot be used by non-admin users for projects or snippets.
...
...
app/views/groups/issues.html.haml
View file @
4c058f2e
...
@@ -3,24 +3,27 @@
...
@@ -3,24 +3,27 @@
-
if
current_user
-
if
current_user
=
auto_discovery_link_tag
(
:atom
,
url_for
(
params
.
merge
(
format: :atom
,
private_token:
current_user
.
private_token
)),
title:
"
#{
@group
.
name
}
issues"
)
=
auto_discovery_link_tag
(
:atom
,
url_for
(
params
.
merge
(
format: :atom
,
private_token:
current_user
.
private_token
)),
title:
"
#{
@group
.
name
}
issues"
)
.top-area
-
if
group_issues
(
@group
).
exists?
=
render
'shared/issuable/nav'
,
type: :issues
.top-area
.nav-controls
=
render
'shared/issuable/nav'
,
type: :issues
-
if
current_user
.nav-controls
=
link_to
url_for
(
params
.
merge
(
format: :atom
,
private_token:
current_user
.
private_token
)),
class:
'btn'
do
-
if
current_user
=
icon
(
'rss'
)
=
link_to
url_for
(
params
.
merge
(
format: :atom
,
private_token:
current_user
.
private_token
)),
class:
'btn'
do
%span
.icon-label
=
icon
(
'rss'
)
Subscribe
%span
.icon-label
=
render
'shared/new_project_item_select'
,
path:
'issues/new'
,
label:
"New Issue"
Subscribe
=
render
'shared/new_project_item_select'
,
path:
'issues/new'
,
label:
"New Issue"
=
render
'shared/issuable/filter'
,
type: :issues
=
render
'shared/issuable/filter'
,
type: :issues
.row-content-block.second-block
.row-content-block.second-block
Only issues from
Only issues from the
%strong
#{
@group
.
name
}
%strong
#{
@group
.
name
}
group are listed here.
group are listed here.
-
if
current_user
-
if
current_user
To see all issues you should visit
#{
link_to
'dashboard'
,
issues_dashboard_path
}
page.
To see all issues you should visit
#{
link_to
'dashboard'
,
issues_dashboard_path
}
page.
.prepend-top-default
.prepend-top-default
=
render
'shared/issues'
=
render
'shared/issues'
-
else
=
render
'shared/empty_states/issues'
,
project_select_button:
true
app/views/projects/issues/_issues.html.haml
View file @
4c058f2e
%ul
.content-list.issues-list.issuable-list
%ul
.content-list.issues-list.issuable-list
=
render
partial:
"projects/issues/issue"
,
collection:
@issues
=
render
partial:
"projects/issues/issue"
,
collection:
@issues
-
if
@issues
.
blank?
-
if
@issues
.
blank?
%li
=
render
'shared/empty_states/issues'
.nothing-here-block
No issues to show
-
if
@issues
.
present?
-
if
@issues
.
present?
=
paginate
@issues
,
theme:
"gitlab"
=
paginate
@issues
,
theme:
"gitlab"
app/views/projects/issues/index.html.haml
View file @
4c058f2e
...
@@ -10,8 +10,8 @@
...
@@ -10,8 +10,8 @@
-
if
current_user
-
if
current_user
=
auto_discovery_link_tag
(
:atom
,
url_for
(
params
.
merge
(
format: :atom
,
private_token:
current_user
.
private_token
)),
title:
"
#{
@project
.
name
}
issues"
)
=
auto_discovery_link_tag
(
:atom
,
url_for
(
params
.
merge
(
format: :atom
,
private_token:
current_user
.
private_token
)),
title:
"
#{
@project
.
name
}
issues"
)
%div
{
class:
(
container_class
)
}
-
if
project_issues
(
@project
).
exists?
-
if
@project
.
issues
.
any?
%div
{
class:
(
container_class
)
}
.top-area
.top-area
=
render
'shared/issuable/nav'
,
type: :issues
=
render
'shared/issuable/nav'
,
type: :issues
.nav-controls
.nav-controls
...
@@ -36,21 +36,5 @@
...
@@ -36,21 +36,5 @@
=
render
'issues'
=
render
'issues'
-
if
new_issue_email
-
if
new_issue_email
=
render
'issue_by_email'
,
email:
new_issue_email
=
render
'issue_by_email'
,
email:
new_issue_email
-
else
-
else
.blank-state.blank-state-welcome
=
render
'shared/empty_states/issues'
,
button_path:
new_namespace_project_issue_path
(
@project
.
namespace
,
@project
)
%h2
.blank-state-title.blank-state-welcome-title
Welcome to GitLab Issues
%p
.blank-state-text
Code, test, and deploy together
.blank-state
.blank-state-icon
=
custom_icon
(
"issues"
,
size:
50
)
%h3
.blank-state-title
You don't have any issues right now.
%p
.blank-state-text
Issues are the best way to track your project progress
-
if
can?
current_user
,
:create_issue
,
@project
=
link_to
new_namespace_project_issue_path
(
@project
.
namespace
,
@project
),
class:
"btn btn-new"
,
title:
"New Issue"
,
id:
"new_issue_link"
do
New Issue
-
if
new_issue_email
=
render
'issue_by_email'
,
email:
new_issue_email
app/views/shared/_issues.html.haml
View file @
4c058f2e
...
@@ -13,4 +13,4 @@
...
@@ -13,4 +13,4 @@
=
render
'projects/issues/issue'
,
issue:
issue
=
render
'projects/issues/issue'
,
issue:
issue
=
paginate
@issues
,
theme:
"gitlab"
=
paginate
@issues
,
theme:
"gitlab"
-
else
-
else
.nothing-here-block
No issues to show
=
render
'shared/empty_states/issues'
app/views/shared/empty_states/_issues.html.haml
0 → 100644
View file @
4c058f2e
-
button_path
=
local_assigns
.
fetch
(
:button_path
,
false
)
-
project_select_button
=
local_assigns
.
fetch
(
:project_select_button
,
false
)
-
has_button
=
button_path
||
project_select_button
.row.empty-state
.pull-right.col-xs-12
{
class:
"#{'col-sm-6' if has_button}"
}
.svg-content
=
render
'shared/empty_states/icons/issues.svg'
.col-xs-12
{
class:
"#{'col-sm-6' if has_button}"
}
.text-content
-
if
has_button
%h4
The Issue Tracker is a good place to add things that need to be improved or solved in a project!
%p
An issue can be a bug, a todo or a feature request that needs to be discussed in a project.
Besides, issues are searchable and filterable.
-
if
project_select_button
=
render
'shared/new_project_item_select'
,
path:
'issues/new'
,
label:
'New issue'
-
else
=
link_to
'New issue'
,
button_path
,
class:
'btn btn-new'
,
title:
'New issue'
,
id:
'new_issue_link'
-
else
%h4
.text-center
There are no issues to show.
app/views/shared/empty_states/icons/_issues.svg
0 → 100644
View file @
4c058f2e
This diff is collapsed.
Click to expand it.
changelogs/unreleased/18136-ui-for-restricting-global-visibility-levels-is-unclear.yml
0 → 100644
View file @
4c058f2e
---
title
:
Changed restricted visibility admin buttons to checkboxes
merge_request
:
7463
author
:
features/steps/project/issues/issues.rb
View file @
4c058f2e
...
@@ -62,7 +62,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
...
@@ -62,7 +62,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
end
end
step
'I click link "New Issue"'
do
step
'I click link "New Issue"'
do
click_link
"New Issue"
page
.
has_link?
(
'New Issue'
)
?
click_link
(
'New Issue'
)
:
click_link
(
'New issue'
)
end
end
step
'I click "author" dropdown'
do
step
'I click "author" dropdown'
do
...
...
spec/features/issues/filter_issues_spec.rb
View file @
4c058f2e
...
@@ -3,8 +3,8 @@ require 'rails_helper'
...
@@ -3,8 +3,8 @@ require 'rails_helper'
describe
'Filter issues'
,
feature:
true
do
describe
'Filter issues'
,
feature:
true
do
include
WaitForAjax
include
WaitForAjax
let!
(
:project
)
{
create
(
:project
)
}
let!
(
:group
)
{
create
(
:group
)
}
let!
(
:group
)
{
create
(
:group
)
}
let!
(
:project
)
{
create
(
:project
,
group:
group
)
}
let!
(
:user
)
{
create
(
:user
)}
let!
(
:user
)
{
create
(
:user
)}
let!
(
:milestone
)
{
create
(
:milestone
,
project:
project
)
}
let!
(
:milestone
)
{
create
(
:milestone
,
project:
project
)
}
let!
(
:label
)
{
create
(
:label
,
project:
project
)
}
let!
(
:label
)
{
create
(
:label
,
project:
project
)
}
...
@@ -127,7 +127,7 @@ describe 'Filter issues', feature: true do
...
@@ -127,7 +127,7 @@ describe 'Filter issues', feature: true do
expect
(
page
).
to
have_content
wontfix
.
title
expect
(
page
).
to
have_content
wontfix
.
title
end
end
find
(
'
body
'
).
click
find
(
'
.dropdown-menu-close-icon
'
).
click
expect
(
find
(
'.filtered-labels'
)).
to
have_content
(
wontfix
.
title
)
expect
(
find
(
'.filtered-labels'
)).
to
have_content
(
wontfix
.
title
)
...
@@ -135,7 +135,7 @@ describe 'Filter issues', feature: true do
...
@@ -135,7 +135,7 @@ describe 'Filter issues', feature: true do
wait_for_ajax
wait_for_ajax
find
(
'.dropdown-menu-labels a'
,
text:
label
.
title
).
click
find
(
'.dropdown-menu-labels a'
,
text:
label
.
title
).
click
find
(
'
body
'
).
click
find
(
'
.dropdown-menu-close-icon
'
).
click
expect
(
find
(
'.filtered-labels'
)).
to
have_content
(
wontfix
.
title
)
expect
(
find
(
'.filtered-labels'
)).
to
have_content
(
wontfix
.
title
)
expect
(
find
(
'.filtered-labels'
)).
to
have_content
(
label
.
title
)
expect
(
find
(
'.filtered-labels'
)).
to
have_content
(
label
.
title
)
...
@@ -150,8 +150,8 @@ describe 'Filter issues', feature: true do
...
@@ -150,8 +150,8 @@ describe 'Filter issues', feature: true do
it
"selects and unselects `won't fix`"
do
it
"selects and unselects `won't fix`"
do
find
(
'.dropdown-menu-labels a'
,
text:
wontfix
.
title
).
click
find
(
'.dropdown-menu-labels a'
,
text:
wontfix
.
title
).
click
find
(
'.dropdown-menu-labels a'
,
text:
wontfix
.
title
).
click
find
(
'.dropdown-menu-labels a'
,
text:
wontfix
.
title
).
click
# Close label dropdown to load
find
(
'
body
'
).
click
find
(
'
.dropdown-menu-close-icon
'
).
click
expect
(
page
).
not_to
have_css
(
'.filtered-labels'
)
expect
(
page
).
not_to
have_css
(
'.filtered-labels'
)
end
end
end
end
...
...
spec/features/issues_spec.rb
View file @
4c058f2e
...
@@ -371,10 +371,12 @@ describe 'Issues', feature: true do
...
@@ -371,10 +371,12 @@ describe 'Issues', feature: true do
describe
'when I want to reset my incoming email token'
do
describe
'when I want to reset my incoming email token'
do
let
(
:project1
)
{
create
(
:project
,
namespace:
@user
.
namespace
)
}
let
(
:project1
)
{
create
(
:project
,
namespace:
@user
.
namespace
)
}
let
(
:issue
)
{
create
(
:issue
,
project:
project1
)
}
before
do
before
do
allow
(
Gitlab
.
config
.
incoming_email
).
to
receive
(
:enabled
).
and_return
(
true
)
allow
(
Gitlab
.
config
.
incoming_email
).
to
receive
(
:enabled
).
and_return
(
true
)
project1
.
team
<<
[
@user
,
:master
]
project1
.
team
<<
[
@user
,
:master
]
project1
.
issues
<<
issue
visit
namespace_project_issues_path
(
@user
.
namespace
,
project1
)
visit
namespace_project_issues_path
(
@user
.
namespace
,
project1
)
end
end
...
@@ -597,7 +599,10 @@ describe 'Issues', feature: true do
...
@@ -597,7 +599,10 @@ describe 'Issues', feature: true do
describe
'new issue by email'
do
describe
'new issue by email'
do
shared_examples
'show the email in the modal'
do
shared_examples
'show the email in the modal'
do
let
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
before
do
before
do
project
.
issues
<<
issue
stub_incoming_email_setting
(
enabled:
true
,
address:
"p+%{key}@gl.ab"
)
stub_incoming_email_setting
(
enabled:
true
,
address:
"p+%{key}@gl.ab"
)
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
...
...
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