diff options
author | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-07-09 13:00:17 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-07-09 13:00:17 +0000 |
commit | 51ceae672426610e7eee075cee0f95f5e07eab40 (patch) | |
tree | d05689114a6abdf4f6f3027d636739128b1ebb6f /app/views | |
parent | 5309dad4599310a50883366c9cdf866465a89f11 (diff) | |
parent | d8dfbc511830aff5e3e3f01f94f91f292b606f44 (diff) | |
download | gitlab-ce-51ceae672426610e7eee075cee0f95f5e07eab40.tar.gz |
Merge branch 'edit-readme' into 'master'
Show edit readme from project home page
I added pencil icon which redirect you to edit README page (web editor). In this case people can make changes to README easily without going to Files tab, searching for README and pressing edit button here
cc @job @darby
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
See merge request !1892
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/show.html.haml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index d9cff805575..d642690153f 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -44,10 +44,11 @@ - if readme = @repository.readme %article.readme-holder#README .clearfix - %small.pull-right - = link_to namespace_project_blob_path(@project.namespace, @project, tree_join(@repository.root_ref, readme.name)), class: 'light' do - %i.fa.fa-file - = readme.name + .pull-right + + - if can?(current_user, :push_code, @project) + = link_to namespace_project_edit_blob_path(@project.namespace, @project, tree_join(@repository.root_ref, readme.name)), class: 'light' do + %i.fa.fa-pencil .wiki = render_readme(readme) - else |