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
8c7bee0e
Commit
8c7bee0e
authored
Jan 05, 2018
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve conflict in BranchesHelper by adding EE::BranchesHelper
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
83556acf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
27 deletions
+32
-27
app/helpers/branches_helper.rb
app/helpers/branches_helper.rb
+2
-27
ee/app/helpers/ee/branches_helper.rb
ee/app/helpers/ee/branches_helper.rb
+30
-0
No files found.
app/helpers/branches_helper.rb
View file @
8c7bee0e
module
BranchesHelper
module
BranchesHelper
prepend
EE
::
BranchesHelper
def
filter_branches_path
(
options
=
{})
def
filter_branches_path
(
options
=
{})
exist_opts
=
{
exist_opts
=
{
search:
params
[
:search
],
search:
params
[
:search
],
...
@@ -24,38 +26,11 @@ module BranchesHelper
...
@@ -24,38 +26,11 @@ module BranchesHelper
ProtectedBranch
.
protected?
(
project
,
branch
.
name
)
ProtectedBranch
.
protected?
(
project
,
branch
.
name
)
end
end
<<<<<<<
HEAD
# Returns a hash were keys are types of access levels (user, role), and
# values are the number of access levels of the particular type.
def
access_level_frequencies
(
access_levels
)
access_levels
.
each_with_object
(
Hash
.
new
(
0
))
do
|
access_level
,
frequencies
|
frequencies
[
access_level
.
type
]
+=
1
end
end
def
access_levels_data
(
access_levels
)
access_levels
.
map
do
|
level
|
if
level
.
type
==
:user
{
id:
level
.
id
,
type:
level
.
type
,
user_id:
level
.
user_id
,
username:
level
.
user
.
username
,
name:
level
.
user
.
name
,
avatar_url:
level
.
user
.
avatar_url
}
elsif
level
.
type
==
:group
{
id:
level
.
id
,
type:
level
.
type
,
group_id:
level
.
group_id
}
else
{
id:
level
.
id
,
type:
level
.
type
,
access_level:
level
.
access_level
}
end
=======
def
diverging_count_label
(
count
)
def
diverging_count_label
(
count
)
if
count
>=
Repository
::
MAX_DIVERGING_COUNT
if
count
>=
Repository
::
MAX_DIVERGING_COUNT
"
#{
Repository
::
MAX_DIVERGING_COUNT
-
1
}
+"
"
#{
Repository
::
MAX_DIVERGING_COUNT
-
1
}
+"
else
else
count
.
to_s
count
.
to_s
>>>>>>>
upstream
/
master
end
end
end
end
end
end
ee/app/helpers/ee/branches_helper.rb
0 → 100644
View file @
8c7bee0e
module
EE
module
BranchesHelper
# Returns a hash were keys are types of access levels (user, role), and
# values are the number of access levels of the particular type.
def
access_level_frequencies
(
access_levels
)
access_levels
.
each_with_object
(
Hash
.
new
(
0
))
do
|
access_level
,
frequencies
|
frequencies
[
access_level
.
type
]
+=
1
end
end
def
access_levels_data
(
access_levels
)
access_levels
.
map
do
|
level
|
if
level
.
type
==
:user
{
id:
level
.
id
,
type:
level
.
type
,
user_id:
level
.
user_id
,
username:
level
.
user
.
username
,
name:
level
.
user
.
name
,
avatar_url:
level
.
user
.
avatar_url
}
elsif
level
.
type
==
:group
{
id:
level
.
id
,
type:
level
.
type
,
group_id:
level
.
group_id
}
else
{
id:
level
.
id
,
type:
level
.
type
,
access_level:
level
.
access_level
}
end
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