summaryrefslogtreecommitdiff
path: root/app/views/projects/_readme.html.haml
diff options
context:
space:
mode:
authorAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-10-16 13:21:51 -0700
committerAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-10-16 15:33:20 -0700
commita42d7980af0ccad036a68cb5497049464be0b2dc (patch)
treed2137e752d0b450e7341bd8475507aad8ee5b99f /app/views/projects/_readme.html.haml
parent30083458b9e2a1e9e54ea09aea8c037e76732af4 (diff)
downloadgitlab-ce-a42d7980af0ccad036a68cb5497049464be0b2dc.tar.gz
Add readme only option as project view
Diffstat (limited to 'app/views/projects/_readme.html.haml')
-rw-r--r--app/views/projects/_readme.html.haml18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/views/projects/_readme.html.haml b/app/views/projects/_readme.html.haml
new file mode 100644
index 00000000000..6922442a834
--- /dev/null
+++ b/app/views/projects/_readme.html.haml
@@ -0,0 +1,18 @@
+- if readme = @repository.readme
+ %article.file-holder.readme-holder{ id: 'readme', class: ("limited-width-container" unless fluid_layout) }
+ = 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)
+
+- 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.