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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
3924c20b
Commit
3924c20b
authored
Nov 02, 2018
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show separate empty_state if issues are filtered
parent
08ddb655
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
1 deletion
+45
-1
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+15
-0
app/views/shared/empty_states/_issues.html.haml
app/views/shared/empty_states/_issues.html.haml
+6
-1
locale/gitlab.pot
locale/gitlab.pot
+6
-0
spec/features/issues_spec.rb
spec/features/issues_spec.rb
+18
-0
No files found.
app/helpers/application_helper.rb
View file @
3924c20b
...
@@ -188,6 +188,21 @@ module ApplicationHelper
...
@@ -188,6 +188,21 @@ module ApplicationHelper
"
#{
request
.
path
}
?
#{
params
.
to_param
}
"
"
#{
request
.
path
}
?
#{
params
.
to_param
}
"
end
end
def
filter_bar_params
{
milestone_title:
params
[
:milestone_title
],
assignee_id:
params
[
:assignee_id
],
author_id:
params
[
:author_id
],
search:
params
[
:search
],
label_name:
params
[
:label_name
],
my_reaction_emoji:
params
[
:my_reaction_emoji
]
}
end
def
has_filter_bar_param?
filter_bar_params
.
values
.
any?
{
|
v
|
v
.
present?
}
end
def
outdated_browser?
def
outdated_browser?
browser
.
ie?
&&
browser
.
version
.
to_i
<
10
browser
.
ie?
&&
browser
.
version
.
to_i
<
10
end
end
...
...
app/views/shared/empty_states/_issues.html.haml
View file @
3924c20b
...
@@ -8,7 +8,12 @@
...
@@ -8,7 +8,12 @@
=
image_tag
'illustrations/issues.svg'
=
image_tag
'illustrations/issues.svg'
.col-12
.col-12
.text-content
.text-content
-
if
current_user
-
if
has_filter_bar_param?
%h4
.text-center
=
_
(
"Sorry, your filter produced no results"
)
%p
.text-center
=
_
(
"To widen your search, change or remove filters in the filter bar above"
)
-
elsif
current_user
%h4
%h4
=
_
(
"The Issue Tracker is the place to add things that need to be improved or solved in a project"
)
=
_
(
"The Issue Tracker is the place to add things that need to be improved or solved in a project"
)
%p
%p
...
...
locale/gitlab.pot
View file @
3924c20b
...
@@ -5736,6 +5736,9 @@ msgstr ""
...
@@ -5736,6 +5736,9 @@ msgstr ""
msgid "Something went wrong. Please try again."
msgid "Something went wrong. Please try again."
msgstr ""
msgstr ""
msgid "Sorry, your filter produced no results"
msgstr ""
msgid "Sort by"
msgid "Sort by"
msgstr ""
msgstr ""
...
@@ -6609,6 +6612,9 @@ msgstr ""
...
@@ -6609,6 +6612,9 @@ msgstr ""
msgid "To validate your GitLab CI configurations, go to 'CI/CD → Pipelines' inside your project, and click on the 'CI Lint' button."
msgid "To validate your GitLab CI configurations, go to 'CI/CD → Pipelines' inside your project, and click on the 'CI Lint' button."
msgstr ""
msgstr ""
msgid "To widen your search, change or remove filters in the filter bar above"
msgstr ""
msgid "Today"
msgid "Today"
msgstr ""
msgstr ""
...
...
spec/features/issues_spec.rb
View file @
3924c20b
...
@@ -17,6 +17,15 @@ describe 'Issues' do
...
@@ -17,6 +17,15 @@ describe 'Issues' do
expect
(
page
).
to
have_content
(
'The Issue Tracker is the place to add things that need to be improved or solved in a project.'
)
expect
(
page
).
to
have_content
(
'The Issue Tracker is the place to add things that need to be improved or solved in a project.'
)
expect
(
page
).
to
have_content
(
'You can register or sign in to create issues for this project.'
)
expect
(
page
).
to
have_content
(
'You can register or sign in to create issues for this project.'
)
end
end
it
'user sees empty state with filters'
do
create
(
:issue
,
author:
user
,
project:
project
)
visit
project_issues_path
(
project
,
milestone_title:
"1.0"
)
expect
(
page
).
to
have_content
(
'Sorry, your filter produced no results'
)
expect
(
page
).
to
have_content
(
'To widen your search, change or remove filters in the filter bar above'
)
end
end
end
end
end
...
@@ -37,6 +46,15 @@ describe 'Issues' do
...
@@ -37,6 +46,15 @@ describe 'Issues' do
expect
(
page
).
to
have_content
(
'Issues can be bugs, tasks or ideas to be discussed. Also, issues are searchable and filterable.'
)
expect
(
page
).
to
have_content
(
'Issues can be bugs, tasks or ideas to be discussed. Also, issues are searchable and filterable.'
)
expect
(
page
).
to
have_content
(
'New issue'
)
expect
(
page
).
to
have_content
(
'New issue'
)
end
end
it
'user sees empty state with filters'
do
create
(
:issue
,
author:
user
,
project:
project
)
visit
project_issues_path
(
project
,
milestone_title:
"1.0"
)
expect
(
page
).
to
have_content
(
'Sorry, your filter produced no results'
)
expect
(
page
).
to
have_content
(
'To widen your search, change or remove filters in the filter bar above'
)
end
end
end
describe
'Edit issue'
do
describe
'Edit issue'
do
...
...
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