summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2014-07-07 11:12:41 +0200
committerMarin Jankovski <marin@gitlab.com>2014-07-09 10:12:08 +0200
commit4e0afce6a70aa8d2f56706ce1304104b4f136c60 (patch)
treed4e6db4bc758eb983985788945c04dc4bb126d75 /app
parent22995fc9324774ce5301589d05a4687793faddac (diff)
downloadgitlab-ce-4e0afce6a70aa8d2f56706ce1304104b4f136c60.tar.gz
Show browse file if we are browsing file history.
Diffstat (limited to 'app')
-rw-r--r--app/views/projects/commits/_commit.html.haml5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml
index 74146b5f196..2beb7495ed2 100644
--- a/app/views/projects/commits/_commit.html.haml
+++ b/app/views/projects/commits/_commit.html.haml
@@ -7,7 +7,10 @@
- if commit.description?
%a.text-expander.js-toggle-button ...
- = link_to "Browse Code »", project_tree_path(project, commit), class: "pull-right"
+ - if @path.present?
+ = link_to "Browse File »", project_blob_path(project, tree_join(commit.id, @path)), class: "pull-right"
+ - else
+ = link_to "Browse Code »", project_tree_path(project, commit), class: "pull-right"
.notes_count
- if @note_counts
- note_count = @note_counts.fetch(commit.id, 0)