summaryrefslogtreecommitdiff
path: root/app/views/projects/_readme.html.haml
blob: 44aa9eb3826d5fb18e397060cd6af6af98199145 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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.