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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
39ed04c7
Commit
39ed04c7
authored
Sep 21, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'repo-size-link' into 'master'
Link project repo size to files See merge request !1374
parents
ea64ba1f
a9d686b2
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 @
39ed04c7
...
@@ -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
...
...
app/views/projects/show.html.haml
View file @
39ed04c7
...
@@ -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
...
...
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