summaryrefslogtreecommitdiff
path: root/app/views/projects/_readme.html.haml
blob: 0ab802fa282a5ab8041a070c053e2923c11fc51a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
- if readme = @repository.readme
  %article.readme-holder
    .pull-right
      - if can?(current_user, :push_code, @project)
        = link_to icon('pencil'), namespace_project_edit_blob_path(@project.namespace, @project, tree_join(@repository.root_ref, readme.name)), class: 'light edit-project-readme'
    .file-content.wiki
      = cache(readme_cache_key) do
        = render_readme(readme)
- else
  .gray-content-block.second-block.center
    %h3.page-title
      此项目还未有 README 文件
    - if can?(current_user, :push_code, @project)
      %p
        %code README
        文件包含有版本仓库中其他文件的信息,
        也在电脑软件中作为格式化文档的一部分普遍存在。
      %p
        建议
        = link_to "增加 README", new_readme_path, class: 'underlined-link'
        文件到版本仓库,GitLab 将会载入其内容显示在这里,以替换掉此信息。