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
74c6d474
Commit
74c6d474
authored
Jul 11, 2018
by
George Tsiolis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move approval items to a new method
parent
da4f0f14
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
ee/app/helpers/ee/merge_requests_helper.rb
ee/app/helpers/ee/merge_requests_helper.rb
+11
-9
No files found.
ee/app/helpers/ee/merge_requests_helper.rb
View file @
74c6d474
...
...
@@ -26,18 +26,20 @@ module EE
more_approvals
=
merge_request
.
approvals_left
-
merge_request
.
approvers_left
.
count
approvers_names
=
merge_request
.
approvers_left
.
map
(
&
:name
)
str
<<
if
more_approvals
>
0
" (from
#{
render_items_list
(
approvers_names
+
[
"
#{
more_approvals
}
more"
])
}
)"
elsif
more_approvals
<
0
" (from
#{
render_items_list
(
approvers_names
,
"or"
)
}
)"
else
" (from
#{
render_items_list
(
approvers_names
)
}
)"
end
str
<<
approval_items
(
more_approvals
,
approvers_names
)
end
str
end
def
approval_items
(
more_approvals
,
approvers_names
)
if
more_approvals
>
0
" (from
#{
render_items_list
(
approvers_names
+
[
"
#{
more_approvals
}
more"
])
}
)"
elsif
more_approvals
<
0
" (from
#{
render_items_list
(
approvers_names
,
"or"
)
}
)"
else
" (from
#{
render_items_list
(
approvers_names
)
}
)"
end
end
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