Commit 39ed04c7 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'repo-size-link' into 'master'

Link project repo size to files



See merge request !1374
parents ea64ba1f a9d686b2
...@@ -156,8 +156,8 @@ module ProjectsHelper ...@@ -156,8 +156,8 @@ module ProjectsHelper
end end
end end
def repository_size(project = nil) def repository_size(project = @project)
"#{(project || @project).repository_size} MB" "#{project.repository_size} MB"
rescue rescue
# In order to prevent 500 error # In order to prevent 500 error
# when application cannot allocate memory # when application cannot allocate memory
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
= pluralize(number_with_delimiter(@repository.tag_names.count), 'tag') = pluralize(number_with_delimiter(@repository.tag_names.count), 'tag')
%li %li
= link_to namespace_project_path(@project.namespace, @project) do = link_to project_files_path(@project) do
= repository_size = repository_size
- if !prefer_readme? && @repository.readme - 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