2011-10-21 19:04:41 +02:00
|
|
|
:css
|
2011-10-13 03:00:00 +02:00
|
|
|
.view_file
|
|
|
|
.view_file_header
|
|
|
|
%strong
|
|
|
|
= name
|
|
|
|
= link_to "raw", blob_project_path(@project, :commit_id => @commit.id, :path => params[:path] ), :class => "right", :target => "_blank"
|
2011-10-24 21:47:53 +02:00
|
|
|
= link_to "history", project_commits_path(@project, :path => params[:path], :branch => params[:branch], :tag => params[:tag] ), :class => "right", :style => "margin-right:10px;"
|
2011-10-13 03:00:00 +02:00
|
|
|
%br/
|
2011-10-21 19:04:41 +02:00
|
|
|
- if file.text?
|
2011-10-13 03:00:00 +02:00
|
|
|
.view_file_content
|
|
|
|
:erb
|
2011-10-21 19:04:41 +02:00
|
|
|
<%= raw file.colorize %>
|
|
|
|
- elsif file.image?
|
2011-10-13 03:00:00 +02:00
|
|
|
.view_file_content_image
|
2011-10-21 19:04:41 +02:00
|
|
|
%img{ :src => "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"}
|
2011-10-13 03:00:00 +02:00
|
|
|
- else
|
2011-10-24 21:47:53 +02:00
|
|
|
%p
|
2011-10-13 03:00:00 +02:00
|
|
|
%center No preview for this file type
|
|
|
|
|