summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2012-09-27 09:49:00 +0300
committerDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2012-09-27 09:49:00 +0300
commitbeb324c1c6518f4ad20039b4122ef6d59ba430c2 (patch)
tree72b7b6adc07f6012a1c6677e2c04a84f2adb6474
parentd8f7748dea5d43a16babd15dd02dcbc76220da5a (diff)
downloadgitlab-ce-beb324c1c6518f4ad20039b4122ef6d59ba430c2.tar.gz
Fixed updir method. Fixed breadcrumbs for commits
-rw-r--r--app/decorators/tree_decorator.rb8
-rw-r--r--app/views/commits/show.html.haml4
2 files changed, 6 insertions, 6 deletions
diff --git a/app/decorators/tree_decorator.rb b/app/decorators/tree_decorator.rb
index 97981785afc..38236c2c553 100644
--- a/app/decorators/tree_decorator.rb
+++ b/app/decorators/tree_decorator.rb
@@ -6,7 +6,7 @@ class TreeDecorator < ApplicationDecorator
part_path = ""
parts = path.split("\/")
- #parts = parts[0...-1] if is_blob?
+ #parts = parts[0...-1] if is_blob?
yield(h.link_to("..", "#", remote: :true)) if parts.count > max_links
@@ -21,7 +21,7 @@ class TreeDecorator < ApplicationDecorator
end
def up_dir?
- !!path
+ path.present?
end
def up_dir_path
@@ -36,8 +36,8 @@ class TreeDecorator < ApplicationDecorator
def mb_size
size = (tree.size / 1024)
if size < 1024
- "#{size} KB"
- else
+ "#{size} KB"
+ else
"#{size/1024} MB"
end
end
diff --git a/app/views/commits/show.html.haml b/app/views/commits/show.html.haml
index 11ffdb6afc3..a4f164651f9 100644
--- a/app/views/commits/show.html.haml
+++ b/app/views/commits/show.html.haml
@@ -1,6 +1,6 @@
= render "head"
-- if params[:path]
+- if @path
%ul.breadcrumb
%li
%span.arrow
@@ -9,7 +9,7 @@
%span.divider
\/
%li
- %a{href: "#"}= params[:path].split("/").join(" / ")
+ %a{href: "#"}= @path.split("/").join(" / ")
%div{id: dom_id(@project)}
#commits_list= render "commits"