Commit 1f4d8eac authored by Riyad Preukschas's avatar Riyad Preukschas

Extract tree/readme partial

parent 5cff72ad
.file_holder#README
.file_title
%i.icon-file
= readme.name
.file_content.wiki
- if gitlab_markdown?(readme.name)
= preserve do
= markdown(readme.data)
- else
= raw GitHub::Markup.render(readme.name, readme.data)
\ No newline at end of file
......@@ -12,7 +12,7 @@
%div#tree-content-holder.tree-content-holder
- if tree.is_blob?
= render partial: "tree/blob", object: tree
= render "tree/blob", blob: tree
- else
%table#tree-slider{class: "table_#{@hex_path} tree-table" }
%thead
......@@ -32,17 +32,8 @@
= render_tree(tree.contents)
- if content = tree.contents.find { |c| c.is_a?(Grit::Blob) and c.name =~ /^readme/i }
.file_holder#README
.file_title
%i.icon-file
= content.name
.file_content.wiki
- if gitlab_markdown?(content.name)
= preserve do
= markdown(content.data)
- else
= raw GitHub::Markup.render(content.name, content.data)
- if readme = tree.contents.find { |c| c.is_a?(Grit::Blob) and c.name =~ /^readme/i }
= render "tree/readme", readme: readme
- unless tree.is_blob?
:javascript
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment