2018-03-17 18:26:18 +05:30
|
|
|
- if (readme = @repository.readme) && readme.rich_viewer
|
2020-07-28 23:09:34 +05:30
|
|
|
.tree-holder
|
|
|
|
.nav-block.mt-0
|
|
|
|
= render 'projects/tree/tree_header', tree: @tree
|
2018-03-17 18:26:18 +05:30
|
|
|
%article.file-holder.readme-holder{ id: 'readme', class: ("limited-width-container" unless fluid_layout) }
|
2020-07-28 23:09:34 +05:30
|
|
|
.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
|
2018-03-17 18:26:18 +05:30
|
|
|
= 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
|
|
|
|
%h4
|
|
|
|
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.
|
|
|
|
GitLab will render it here instead of this message.
|
|
|
|
%p
|
2018-12-05 23:21:45 +05:30
|
|
|
= link_to "Add Readme", @project.add_readme_path, class: 'btn btn-success'
|