Commit a9d686b2 authored by Douwe Maan's avatar Douwe Maan

Link project repo size to files

parent 183892fd
......@@ -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
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment