summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-10-17 10:05:02 -0700
committerAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-10-17 10:05:02 -0700
commit9c7fba3dc8ff4a3b84d1e3a018aed1d3470d405d (patch)
treeb0de4f917ad68651571b8598b78a0936566938c8
parent2c6cd2e575b04440df24ba79ef70d6463a248fa9 (diff)
downloadgitlab-ce-30140-restore-readme-only-preference.tar.gz
Add readme title and check for rich_viewer30140-restore-readme-only-preference
-rw-r--r--app/views/projects/_readme.html.haml7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/views/projects/_readme.html.haml b/app/views/projects/_readme.html.haml
index 6922442a834..5a27c6300a0 100644
--- a/app/views/projects/_readme.html.haml
+++ b/app/views/projects/_readme.html.haml
@@ -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