Commit c2db73b6 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'project-readme-edit' into 'master'

Restore edit button in project readme

Also make sure edit button can actually be clicked, like !1668.

See merge request !1670
parents 01315cfe 097238f0
...@@ -544,5 +544,13 @@ pre.light-well { ...@@ -544,5 +544,13 @@ pre.light-well {
} }
.project-show-readme .readme-holder { .project-show-readme .readme-holder {
margin-left: -$gl-padding;
margin-right: -$gl-padding;
padding: $gl-padding;
border-top: 0; border-top: 0;
.edit-project-readme {
z-index: 100;
position: relative;
}
} }
- if readme = @repository.readme - if readme = @repository.readme
%article.file-holder.readme-holder %article.readme-holder
.file-title .pull-right
= blob_icon readme.mode, readme.name - if can?(current_user, :push_code, @project)
= link_to namespace_project_blob_path(@project.namespace, @project, tree_join(@repository.root_ref, readme.name)) do = link_to icon('pencil'), namespace_project_edit_blob_path(@project.namespace, @project, tree_join(@repository.root_ref, readme.name)), class: 'light edit-project-readme'
%strong
= readme.name
.file-content.wiki .file-content.wiki
= cache(readme_cache_key) do = cache(readme_cache_key) do
= render_readme(readme) = render_readme(readme)
......
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