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
a9d686b2
Commit
a9d686b2
authored
Sep 21, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Link project repo size to files
parent
183892fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+2
-2
app/views/projects/show.html.haml
app/views/projects/show.html.haml
+1
-1
No files found.
app/helpers/projects_helper.rb
View file @
a9d686b2
...
...
@@ -156,8 +156,8 @@ module ProjectsHelper
end
end
def
repository_size
(
project
=
nil
)
"
#{
(
project
||
@project
)
.
repository_size
}
MB"
def
repository_size
(
project
=
@project
)
"
#{
project
.
repository_size
}
MB"
rescue
# In order to prevent 500 error
# when application cannot allocate memory
...
...
app/views/projects/show.html.haml
View file @
a9d686b2
...
...
@@ -24,7 +24,7 @@
=
pluralize
(
number_with_delimiter
(
@repository
.
tag_names
.
count
),
'tag'
)
%li
=
link_to
namespace_project_path
(
@project
.
namespace
,
@project
)
do
=
link_to
project_files_path
(
@project
)
do
=
repository_size
-
if
!
prefer_readme?
&&
@repository
.
readme
...
...
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