_readme.html.haml 1.1 KB
Newer Older
1
- if readme = @repository.readme
2 3 4
  %article.readme-holder
    .pull-right
      - if can?(current_user, :push_code, @project)
5 6 7
        = link_to icon('pencil'), namespace_project_edit_blob_path(@project.namespace, @project, tree_join(@repository.root_ref, readme.path)), class: 'light edit-project-readme'

    = render 'projects/blob/viewer', viewer: readme.rich_viewer, viewer_url: namespace_project_blob_path(@project.namespace, @project, tree_join(@repository.root_ref, readme.path), viewer: :rich, format: :json)
8
- else
Annabel Dunstone's avatar
Annabel Dunstone committed
9
  .row-content-block.second-block.center
10
    %h3.page-title
11
      This project does not have a README yet
12 13 14 15 16 17 18 19
    - 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
20
        = link_to "add a README", add_special_file_path(@project, file_name: 'README.md'), class: 'underlined-link'
21
        file to the repository and GitLab will render it here instead of this message.