Commit 51ceae67 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

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: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

See merge request !1892
parents 5309dad4 d8dfbc51
...@@ -44,10 +44,11 @@ ...@@ -44,10 +44,11 @@
- if readme = @repository.readme - if readme = @repository.readme
%article.readme-holder#README %article.readme-holder#README
.clearfix .clearfix
%small.pull-right .pull-right
= link_to namespace_project_blob_path(@project.namespace, @project, tree_join(@repository.root_ref, readme.name)), class: 'light' do &nbsp;
%i.fa.fa-file - if can?(current_user, :push_code, @project)
= readme.name = 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 .wiki
= render_readme(readme) = render_readme(readme)
- else - else
......
...@@ -86,13 +86,15 @@ class Spinach::Features::Project < Spinach::FeatureSteps ...@@ -86,13 +86,15 @@ class Spinach::Features::Project < Spinach::FeatureSteps
end end
step 'I should see project "Forum" README' do step 'I should see project "Forum" README' do
expect(page).to have_link 'README.md' page.within('#README') do
expect(page).to have_content 'Sample repo for testing gitlab features' expect(page).to have_content 'Sample repo for testing gitlab features'
end
end end
step 'I should see project "Shop" README' do step 'I should see project "Shop" README' do
expect(page).to have_link 'README.md' page.within('#README') do
expect(page).to have_content 'testme' expect(page).to have_content 'testme'
end
end end
step 'I add project tags' do step 'I add project tags' do
......
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