Download link for binary
This commit is contained in:
parent
0712e78597
commit
ed3f3a0d4d
4 changed files with 17 additions and 4 deletions
|
@ -32,4 +32,13 @@ class TreeDecorator < ApplicationDecorator
|
|||
def history_path
|
||||
h.project_commits_path(project, :path => path, :ref => ref)
|
||||
end
|
||||
|
||||
def mb_size
|
||||
size = (tree.size / 1024)
|
||||
if size < 1024
|
||||
"#{size} KB"
|
||||
else
|
||||
"#{size/1024} MB"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue