diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-24 10:19:47 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-24 10:19:47 +0000 |
commit | 961217f87e628c6f26ed8a425653a2a32ceb7461 (patch) | |
tree | 093a3ffe7663b63c5de7eb33a86f29731de3a951 | |
parent | 614e0857d66f5635eead6270e70d6c7d337a1ff1 (diff) | |
parent | 7ed11fded5862bd7c03448e48ba17efdabdbc218 (diff) | |
download | gitlab-ce-961217f87e628c6f26ed8a425653a2a32ceb7461.tar.gz |
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.
-rw-r--r-- | app/views/projects/_home_panel.html.haml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml index 81bb0e20a35..273a8493f44 100644 --- a/app/views/projects/_home_panel.html.haml +++ b/app/views/projects/_home_panel.html.haml @@ -21,6 +21,10 @@ - if can?(current_user, :admin_project, @project) – %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 .col-md-5 |