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
b49632f4
Commit
b49632f4
authored
Apr 07, 2020
by
Steffen Köhler
Committed by
Phil Hughes
Apr 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use different approval icon if current user approved
parent
8c7f358a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
2 deletions
+33
-2
changelogs/unreleased/approval-by-me-icon.yml
changelogs/unreleased/approval-by-me-icon.yml
+5
-0
ee/app/views/projects/merge_requests/_approvals_count.html.haml
.../views/projects/merge_requests/_approvals_count.html.haml
+3
-2
ee/spec/features/merge_requests/user_views_all_merge_requests_spec.rb
...ures/merge_requests/user_views_all_merge_requests_spec.rb
+22
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-0
No files found.
changelogs/unreleased/approval-by-me-icon.yml
0 → 100644
View file @
b49632f4
---
title
:
Use different approval icon if current user approved
merge_request
:
28290
author
:
Steffen Köhler
type
:
changed
ee/app/views/projects/merge_requests/_approvals_count.html.haml
View file @
b49632f4
-
if
merge_request
.
approval_needed?
%li
.d-none.d-sm-inline-block.has-tooltip
{
title:
_
(
'Approvals'
),
class:
(
'text-success'
if
merge_request
.
approved?
)
}
=
sprite_icon
(
'approval'
,
size:
16
,
css_class:
'align-middle'
)
-
approval_tooltip
=
merge_request
.
has_approved?
(
current_user
)
?
_
(
"Approvals (you've approved)"
)
:
_
(
"Approvals"
)
%li
.d-none.d-sm-inline-block.has-tooltip
{
title:
approval_tooltip
,
class:
(
'text-success'
if
merge_request
.
approved?
)
}
=
sprite_icon
((
merge_request
.
has_approved?
(
current_user
)
?
'approval-solid'
:
'approval'
),
size:
16
,
css_class:
'align-middle'
)
=
merge_request
.
approvals_given
%span
of
=
merge_request
.
approvals_required
ee/spec/features/merge_requests/user_views_all_merge_requests_spec.rb
0 → 100644
View file @
b49632f4
# frozen_string_literal: true
require
'spec_helper'
describe
'User views all merge requests'
do
let!
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
,
target_project:
project
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
approvals_before_merge:
1
)
}
let
(
:user
)
{
create
(
:user
)
}
it
'shows generic approvals tooltip'
do
visit
(
project_merge_requests_path
(
project
,
state: :all
))
expect
(
page
.
all
(
'li'
).
any?
{
|
item
|
item
[
"title"
]
==
"Approvals"
}).
to
be
true
end
it
'shows custom tooltip after user has approved'
do
project
.
add_developer
(
user
)
sign_in
(
user
)
merge_request
.
approvals
.
create
(
user:
user
)
visit
(
project_merge_requests_path
(
project
,
state: :all
))
expect
(
page
.
all
(
'li'
).
any?
{
|
item
|
item
[
"title"
]
==
"Approvals (you've approved)"
}).
to
be
true
end
end
locale/gitlab.pot
View file @
b49632f4
...
...
@@ -2266,6 +2266,9 @@ msgstr ""
msgid "Approvals"
msgstr ""
msgid "Approvals (you've approved)"
msgstr ""
msgid "Approve"
msgstr ""
...
...
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