summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2014-07-08 16:12:06 +0200
committerMarin Jankovski <marin@gitlab.com>2014-07-09 10:12:08 +0200
commit5d25f3d9b12203c3010ba92d7dacfcbeaf51781e (patch)
tree08ca37e7c5a78011d1fed44df23e02a8d5b95bfd /app
parentde229135011c8012acf157e1e8b10e4dc443dcd4 (diff)
downloadgitlab-ce-5d25f3d9b12203c3010ba92d7dacfcbeaf51781e.tar.gz
Differentiate between dirs, files and general code.
Diffstat (limited to 'app')
-rw-r--r--app/views/projects/commits/_commit.html.haml7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml
index 106d95ee10d..20fe2688fb4 100644
--- a/app/views/projects/commits/_commit.html.haml
+++ b/app/views/projects/commits/_commit.html.haml
@@ -7,10 +7,13 @@
- if commit.description?
%a.text-expander.js-toggle-button ...
- - if @repo.blob_at(commit.id, @path)
+ - if @repo && @repo.blob_at(commit.id, @path)
= link_to "Browse File »", project_blob_path(project, tree_join(commit.id, @path)), class: "pull-right"
- - else
+ - elsif @path.blank?
= link_to "Browse Code »", project_tree_path(project, commit), class: "pull-right"
+ - else
+ = link_to "Browse Dir »", project_tree_path(project, tree_join(commit.id, @path)), class: "pull-right"
+
.notes_count
- if @note_counts
- note_count = @note_counts.fetch(commit.id, 0)