Commit 14bc7e05 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Show README link only if repository exists and not empty

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 39c20991
......@@ -21,7 +21,7 @@
- if can?(current_user, :admin_project, @project)
&ndash;
%strong= link_to 'Edit', edit_project_path
- elsif @repository.readme
- elsif !@project.empty_repo? && @repository.readme
- readme = @repository.readme
= link_to project_blob_path(@project, tree_join(@repository.root_ref, readme.name)) do
= readme.name
......
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