43 lines
1.1 KiB
Plaintext
43 lines
1.1 KiB
Plaintext
%h3= t("layout.projects.files_in_project")
|
|
.files
|
|
.l= render 'whereami'
|
|
= render 'fork'
|
|
.both
|
|
|
|
- render_way = choose_render_way(@blob)
|
|
.file
|
|
.top= render 'top', :render_way => render_way
|
|
.data
|
|
- case render_way
|
|
- when :image
|
|
%table.table.blob
|
|
%tr
|
|
%td.lines
|
|
%td.blob
|
|
:plain
|
|
<br/>
|
|
<center> <img src='?raw=true'/></center>
|
|
<br/>
|
|
- when :text
|
|
.gutter= render_line_numbers(@text.length)
|
|
#output.formatted.cm-s-default
|
|
%pre#code
|
|
=#{render_blob(@blob)}
|
|
:preserve
|
|
#{h(@blob.data).html_safe}
|
|
.both
|
|
- when :binary
|
|
%table.table.blob
|
|
%tr
|
|
%td.lines
|
|
%td.blob
|
|
:plain
|
|
<br/>
|
|
<pre>#{ link_to @blob.basename, raw_path(@project, @treeish, @path) }</pre>
|
|
<br/>
|
|
:javascript
|
|
$(document).ready(function() {
|
|
var text = $('#code').text().replace(/&/gi, '&');
|
|
CodeMirror.runMode(text, "#{@blob.raw_mime_type.content_type}", document.getElementById("output"));
|
|
});
|