Commit 961217f8 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'link-to-readme-from-description' into 'master'

Link to readme from description

If you are viewing a repository for the first time you are likely to view the description. If you want to keep reading after that you can now click a link to the readme. This place is in addition to the README button at the bottom of the right hand menu that is harder to find. If you have edit rights only the description edit button is shown to ensure the text fits, the assumption is that the readme is most interesting for people not yet added to the project.
parents 614e0857 7ed11fde
...@@ -21,6 +21,10 @@ ...@@ -21,6 +21,10 @@
- if can?(current_user, :admin_project, @project) - if can?(current_user, :admin_project, @project)
– –
%strong= link_to 'Edit', edit_project_path %strong= link_to 'Edit', edit_project_path
- elsif @repository.readme
- readme = @repository.readme
= link_to project_blob_path(@project, tree_join(@repository.root_ref, readme.name)) do
= readme.name
- unless empty_repo - unless empty_repo
.col-md-5 .col-md-5
......
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