Add readme title and check for rich_viewer

This commit is contained in:
Annabel Dunstone Gray 2017-10-17 10:05:02 -07:00
parent 2c6cd2e575
commit 9c7fba3dc8
No known key found for this signature in database
GPG key ID: 7C8C78A372AD7A2D

View file

@ -1,5 +1,10 @@
- if readme = @repository.readme
- 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(@repository.root_ref, readme.path), viewer: :rich, format: :json)
- else