diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-11-29 13:38:41 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-11-29 13:38:41 +0000 |
commit | ff25cb934beac5189f9d80341873bba8d635d537 (patch) | |
tree | bff9d352ebf1e3e8dbc82e567c0c4d271aeba037 | |
parent | 8a650f5d4aada203465f8b343b5fef9789425cbd (diff) | |
parent | 44920811424ae78de6db7b16772d63a648cedfea (diff) | |
download | gitlab-ce-ff25cb934beac5189f9d80341873bba8d635d537.tar.gz |
Merge branch 'feature/repo_size_in_admin' of /home/git/repositories/gitlab/gitlabhq
-rw-r--r-- | app/helpers/projects_helper.rb | 4 | ||||
-rw-r--r-- | app/views/admin/groups/show.html.haml | 2 | ||||
-rw-r--r-- | app/views/admin/projects/index.html.haml | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 6b6903c0b2c..096cef02b2b 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -137,8 +137,8 @@ module ProjectsHelper end end - def repository_size - "#{@project.repository.size} MB" + def repository_size(project = nil) + "#{(project || @project).repository.size} MB" rescue # In order to prevent 500 error # when application cannot allocate memory diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml index ca51a57000a..299f397c51f 100644 --- a/app/views/admin/groups/show.html.haml +++ b/app/views/admin/groups/show.html.haml @@ -39,6 +39,8 @@ %li %strong = link_to project.name_with_namespace, [:admin, project] + %span.label.label-gray + = repository_size(project) %span.pull-right.light %span.monospace= project.path_with_namespace + ".git" diff --git a/app/views/admin/projects/index.html.haml b/app/views/admin/projects/index.html.haml index 05236e320b5..890321d57ec 100644 --- a/app/views/admin/projects/index.html.haml +++ b/app/views/admin/projects/index.html.haml @@ -49,6 +49,8 @@ = visibility_level_icon(project.visibility_level) = link_to project.name_with_namespace, [:admin, project] .pull-right + %span.label.label-gray + = repository_size(project) = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small" = link_to 'Destroy', [project], confirm: remove_project_message(project), method: :delete, class: "btn btn-small btn-remove" - if @projects.blank? |