diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-03-17 11:43:43 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-03-18 14:08:26 +0100 |
commit | 5adb1128dcca2810a32b7b974372970c6d36a98c (patch) | |
tree | 749eb3aff1d43b3a49a6bf08f667794ec2c5a434 | |
parent | d328b4166ed235346e3ea841f178a52224c23c99 (diff) | |
download | gitlab-ce-5adb1128dcca2810a32b7b974372970c6d36a98c.tar.gz |
Show changelog link even if no version is known.
-rw-r--r-- | app/views/projects/show.html.haml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 0eaf4b95d66..25dee2043be 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -50,13 +50,17 @@ = link_to namespace_project_compare_index_path(@project.namespace, @project, from: @repository.root_ref, to: @ref || @repository.root_ref), class: 'btn btn-block' do Compare code - - if @repository.version - - version = @repository.version - - detail_file = @repository.changelog.try(:name) || version.name + - version = @repository.version + - changelog = @repository.changelog + - if version + - detail_file = changelog.try(:name) || version.name = link_to namespace_project_blob_path(@project.namespace, @project, tree_join(@repository.root_ref, detail_file)), class: 'btn btn-block' do Version: %span.count = @repository.blob_by_oid(version.id).data + - elsif changelog + = link_to namespace_project_blob_path(@project.namespace, @project, tree_join(@repository.root_ref, changelog.name)), class: 'btn btn-block' do + View changelog .prepend-top-10 %p |