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
d0279ccb
Commit
d0279ccb
authored
Sep 05, 2016
by
Patricio Cano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct helper for group LFS status.
parent
c788c66a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
app/helpers/groups_helper.rb
app/helpers/groups_helper.rb
+14
-14
No files found.
app/helpers/groups_helper.rb
View file @
d0279ccb
...
...
@@ -24,27 +24,27 @@ module GroupsHelper
end
end
def
projects_with_lfs_enabled
(
group
)
lfs_enabled
=
group
.
projects
.
select
(
&
:lfs_enabled?
).
size
def
projects_with_lfs_enabled
(
group
,
status
)
if
status
lfs_status
=
group
.
projects
.
select
(
&
:lfs_enabled?
).
size
else
lfs_status
=
group
.
projects
.
select
{
|
p
|
!
p
.
lfs_enabled?
}.
size
end
size
=
group
.
projects
.
size
if
lfs_
enabled
==
size
||
lfs_enabled
==
0
'
on all projects'
if
lfs_
status
==
size
||
lfs_status
==
0
'on all projects'
else
"
on
#{
lfs_enabled
}
/
#{
size
}
projects"
"
on
#{
lfs_status
}
out of
#{
size
}
projects"
end
end
def
group_lfs_status
(
group
)
if
group
.
lfs_enabled?
output
=
content_tag
(
:span
,
class:
'lfs-enabled'
)
do
'Enabled'
end
else
output
=
content_tag
(
:span
,
class:
'lfs-disabled'
)
do
'Disabled'
end
status
=
group
.
lfs_enabled?
?
'enabled'
:
'disabled'
content_tag
(
:span
,
class:
"lfs-
#{
status
}
"
)
do
"
#{
status
.
humanize
}
#{
projects_with_lfs_enabled
(
group
,
group
.
lfs_enabled?
)
}
"
end
output
<<
projects_with_lfs_enabled
(
group
)
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