2017-10-18 06:17:08 -04:00
|
|
|
- if (readme = @repository.readme) && readme.rich_viewer
|
2020-06-18 17:09:05 -04:00
|
|
|
.tree-holder
|
|
|
|
.nav-block.mt-0
|
|
|
|
= render 'projects/tree/tree_header', tree: @tree
|
2017-10-16 16:21:51 -04:00
|
|
|
%article.file-holder.readme-holder{ id: 'readme', class: ("limited-width-container" unless fluid_layout) }
|
2020-06-18 17:09:05 -04:00
|
|
|
.js-file-title.file-title-flex-parent
|
|
|
|
.file-header-content
|
|
|
|
= blob_icon readme.mode, readme.name
|
|
|
|
= link_to project_blob_path(@project, tree_join(@ref, readme.path)) do
|
|
|
|
%strong
|
|
|
|
= readme.name
|
2017-10-18 06:17:08 -04:00
|
|
|
= 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)
|
2017-10-16 16:21:51 -04:00
|
|
|
|
|
|
|
- else
|
|
|
|
.row-content-block.second-block.center
|
2018-01-22 07:13:07 -05:00
|
|
|
%h4
|
2017-10-16 16:21:51 -04:00
|
|
|
This project does not have a README yet
|
2018-01-22 07:13:07 -05:00
|
|
|
|
2017-10-16 16:21:51 -04:00
|
|
|
- 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.
|
2018-01-22 07:13:07 -05:00
|
|
|
GitLab will render it here instead of this message.
|
2017-10-16 16:21:51 -04:00
|
|
|
%p
|
2021-03-23 05:09:17 -04:00
|
|
|
= link_to "Add Readme", @project.add_readme_path, class: 'gl-button btn btn-confirm'
|