Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-03-17 13:43:43 +0300
committerDouwe Maan <douwe@gitlab.com>2015-03-18 16:08:26 +0300
commit5adb1128dcca2810a32b7b974372970c6d36a98c (patch)
tree749eb3aff1d43b3a49a6bf08f667794ec2c5a434 /app/views/projects/show.html.haml
parentd328b4166ed235346e3ea841f178a52224c23c99 (diff)
Show changelog link even if no version is known.
Diffstat (limited to 'app/views/projects/show.html.haml')
-rw-r--r--app/views/projects/show.html.haml10
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