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 @@
- 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
&nbsp;
- 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
......
......@@ -86,14 +86,16 @@ class Spinach::Features::Project < Spinach::FeatureSteps
end
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'
end
end
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'
end
end
step 'I add project tags' do
fill_in 'Tags', with: 'tag1, tag2'
......
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