diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-10-22 17:11:21 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-10-22 17:11:21 +0200 |
commit | 097238f0a5f6735b7f0596e2283068be17d39e91 (patch) | |
tree | dd09b6198c8f6be4fbb1ac6c47b63e1cad2ee6bd /app | |
parent | 8b127f4526ea6dacec3ee02725e5624aaa7f9d4a (diff) | |
download | gitlab-ce-097238f0a5f6735b7f0596e2283068be17d39e91.tar.gz |
Restore edit button in project readmeproject-readme-edit
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/stylesheets/pages/projects.scss | 8 | ||||
-rw-r--r-- | app/views/projects/_readme.html.haml | 10 |
2 files changed, 12 insertions, 6 deletions
diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index 41bea0ec5c8..27bedea0e1f 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -544,5 +544,13 @@ pre.light-well { } .project-show-readme .readme-holder { + margin-left: -$gl-padding; + margin-right: -$gl-padding; + padding: $gl-padding; border-top: 0; + + .edit-project-readme { + z-index: 100; + position: relative; + } } diff --git a/app/views/projects/_readme.html.haml b/app/views/projects/_readme.html.haml index 0a1cecfdcdf..b5ef0aca540 100644 --- a/app/views/projects/_readme.html.haml +++ b/app/views/projects/_readme.html.haml @@ -1,10 +1,8 @@ - if readme = @repository.readme - %article.file-holder.readme-holder - .file-title - = blob_icon readme.mode, readme.name - = link_to namespace_project_blob_path(@project.namespace, @project, tree_join(@repository.root_ref, readme.name)) do - %strong - = readme.name + %article.readme-holder + .pull-right + - if can?(current_user, :push_code, @project) + = link_to icon('pencil'), namespace_project_edit_blob_path(@project.namespace, @project, tree_join(@repository.root_ref, readme.name)), class: 'light edit-project-readme' .file-content.wiki = cache(readme_cache_key) do = render_readme(readme) |