Commit 5adb1128 authored by Douwe Maan's avatar Douwe Maan

Show changelog link even if no version is known.

parent d328b416
...@@ -50,13 +50,17 @@ ...@@ -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 = 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 Compare code
- if @repository.version - version = @repository.version
- version = @repository.version - changelog = @repository.changelog
- detail_file = @repository.changelog.try(:name) || version.name - 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 = link_to namespace_project_blob_path(@project.namespace, @project, tree_join(@repository.root_ref, detail_file)), class: 'btn btn-block' do
Version: Version:
%span.count %span.count
= @repository.blob_by_oid(version.id).data = @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 .prepend-top-10
%p %p
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment