diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-10-24 07:52:21 +0000 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-10-24 07:52:21 +0000 |
commit | f7bdfe5098c9a5a3a426344ba1d7dd668212cf7e (patch) | |
tree | 5a1cb2a90b0a2b5114f6f23712b68724b3e8a7e0 /app/views/projects/_readme.html.haml | |
parent | 9cd528aa7ac5066570cb50b909951a6c6b723935 (diff) | |
parent | e16add2267648d3d3ef1d98f9b53f67a29428791 (diff) | |
download | gitlab-ce-f7bdfe5098c9a5a3a426344ba1d7dd668212cf7e.tar.gz |
Merge branch 'master' into 'es-module-autosave'es-module-autosave
# Conflicts:
# app/assets/javascripts/issuable_form.js
# app/assets/javascripts/notes.js
Diffstat (limited to 'app/views/projects/_readme.html.haml')
-rw-r--r-- | app/views/projects/_readme.html.haml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/app/views/projects/_readme.html.haml b/app/views/projects/_readme.html.haml new file mode 100644 index 00000000000..44aa9eb3826 --- /dev/null +++ b/app/views/projects/_readme.html.haml @@ -0,0 +1,23 @@ +- if (readme = @repository.readme) && readme.rich_viewer + %article.file-holder.readme-holder{ id: 'readme', class: ("limited-width-container" unless fluid_layout) } + .js-file-title.file-title + = blob_icon readme.mode, readme.name + = link_to project_blob_path(@project, tree_join(@ref, readme.path)) do + %strong + = readme.name + = render 'projects/blob/viewer', viewer: readme.rich_viewer, viewer_url: namespace_project_blob_path(@project.namespace, @project, tree_join(@ref, readme.path), viewer: :rich, format: :json) + +- else + .row-content-block.second-block.center + %h3.page-title + This project does not have a README yet + - if can?(current_user, :push_code, @project) + %p + A + %code README + file contains information about other files in a repository and is commonly + distributed with computer software, forming part of its documentation. + %p + We recommend you to + = link_to "add a README", add_special_file_path(@project, file_name: 'README.md'), class: 'underlined-link' + file to the repository and GitLab will render it here instead of this message. |