2014-08-29 19:22:45 +00:00
|
|
|
.search-result-row
|
|
|
|
%span
|
|
|
|
= snippet_blob[:snippet_object].title
|
|
|
|
by
|
|
|
|
= link_to user_snippets_path(snippet_blob[:snippet_object].author) do
|
|
|
|
= image_tag avatar_icon(snippet_blob[:snippet_object].author_email), class: "avatar avatar-inline s16", alt: ''
|
|
|
|
= snippet_blob[:snippet_object].author_name
|
|
|
|
%span.light #{time_ago_with_tooltip(snippet_blob[:snippet_object].created_at)}
|
|
|
|
%h4.snippet-title
|
|
|
|
- snippet_path = reliable_snippet_path(snippet_blob[:snippet_object])
|
|
|
|
= link_to snippet_path do
|
|
|
|
.file-holder
|
|
|
|
.file-title
|
2014-10-01 22:21:29 +00:00
|
|
|
%i.fa.fa-file
|
2014-08-29 19:22:45 +00:00
|
|
|
%strong= snippet_blob[:snippet_object].file_name
|
2015-05-12 23:54:13 +00:00
|
|
|
- if markup?(snippet_blob[:snippet_object].file_name)
|
2014-08-29 19:22:45 +00:00
|
|
|
.file-content.wiki
|
|
|
|
- snippet_blob[:snippet_chunks].each do |snippet|
|
|
|
|
- unless snippet[:data].empty?
|
|
|
|
= render_markup(snippet_blob[:snippet_object].file_name, snippet[:data])
|
|
|
|
- else
|
|
|
|
.file-content.code
|
|
|
|
.nothing-here-block Empty file
|
|
|
|
- else
|
2016-01-21 13:23:53 +00:00
|
|
|
.file-content.code.js-syntax-highlight
|
|
|
|
.line-numbers
|
|
|
|
- snippet_blob[:snippet_chunks].each do |snippet|
|
|
|
|
- unless snippet[:data].empty?
|
|
|
|
- snippet[:data].lines.to_a.size.times do |index|
|
|
|
|
- offset = defined?(snippet[:start_line]) ? snippet[:start_line] : 1
|
|
|
|
- i = index + offset
|
|
|
|
= link_to snippet_path+"#L#{i}", id: "L#{i}", rel: "#L#{i}", class: "diff-line-num" do
|
|
|
|
%i.fa.fa-link
|
|
|
|
= i
|
|
|
|
- unless snippet == snippet_blob[:snippet_chunks].last
|
|
|
|
%a.diff-line-num
|
|
|
|
= "."
|
|
|
|
%pre.code
|
|
|
|
%code
|
2014-08-29 19:22:45 +00:00
|
|
|
- snippet_blob[:snippet_chunks].each do |snippet|
|
|
|
|
- unless snippet[:data].empty?
|
2016-01-21 13:23:53 +00:00
|
|
|
= snippet[:data]
|
2014-08-29 19:22:45 +00:00
|
|
|
- unless snippet == snippet_blob[:snippet_chunks].last
|
|
|
|
%a
|
2016-01-21 13:23:53 +00:00
|
|
|
= "..."
|
|
|
|
- else
|
|
|
|
.file-content.code
|
|
|
|
.nothing-here-block Empty file
|