summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2017-05-18 14:53:29 +0000
committerTimothy Andrew <mail@timothyandrew.net>2017-05-19 05:20:31 +0000
commit7842bcb613e7d0847ebc1afecbd61421a65663dc (patch)
tree1c62e9c426a8d9b3b31097c250c3e4f0cf5a7449
parent05b80594274a626cec7035c7ce811b901957d785 (diff)
downloadgitlab-ce-9-2-stable-fix-conflicts-for-mr-11459.tar.gz
Merge branch 'dm-empty-tree-readme' into 'master'9-2-stable-fix-conflicts-for-mr-11459
Don't blow up when a tree readme is empty and consequently has no rich viewer Closes #32396 See merge request !11459 Conflicts: app/views/projects/tree/_readme.html.haml
-rw-r--r--app/views/projects/tree/_readme.html.haml12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/views/projects/tree/_readme.html.haml b/app/views/projects/tree/_readme.html.haml
index 01599060844..8aa503467ec 100644
--- a/app/views/projects/tree/_readme.html.haml
+++ b/app/views/projects/tree/_readme.html.haml
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
%article.file-holder.readme-holder
.js-file-title.file-title
= blob_icon readme.mode, readme.name
@@ -6,3 +7,14 @@
= readme.name
.file-content.wiki
= markup(readme.name, readme.data)
+=======
+- if readme.rich_viewer
+ %article.file-holder.readme-holder
+ .js-file-title.file-title
+ = blob_icon readme.mode, readme.name
+ = link_to namespace_project_blob_path(@project.namespace, @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(@ref, readme.path), viewer: :rich, format: :json)
+>>>>>>> a30aa41... Merge branch 'dm-empty-tree-readme' into 'master'