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
Hide 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
"
#{
request
.
path
}
?
#{
params
.
to_param
}
"
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?
browser
.
ie?
&&
browser
.
version
.
to_i
<
10
end
...
...
app/views/shared/empty_states/_issues.html.haml
View file @
3924c20b
...
...
@@ -8,7 +8,12 @@
=
image_tag
'illustrations/issues.svg'
.col-12
.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
=
_
(
"The Issue Tracker is the place to add things that need to be improved or solved in a project"
)
%p
...
...
locale/gitlab.pot
View file @
3924c20b
...
...
@@ -5736,6 +5736,9 @@ msgstr ""
msgid "Something went wrong. Please try again."
msgstr ""
msgid "Sorry, your filter produced no results"
msgstr ""
msgid "Sort by"
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."
msgstr ""
msgid "To widen your search, change or remove filters in the filter bar above"
msgstr ""
msgid "Today"
msgstr ""
...
...
spec/features/issues_spec.rb
View file @
3924c20b
...
...
@@ -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
(
'You can register or sign in to create issues for this project.'
)
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
...
...
@@ -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
(
'New issue'
)
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
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