<% #-- # Copyright (C) 2010 Juho Nieminen # Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) # Copyright (C) 2008 Johan Sørensen # Copyright (C) 2008 Tor Arne Vestbø # Copyright (C) 2009 Fabio Akita # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . #++ %> <% @page_title = t("views.blobs.page_title", :path => current_path.join("/"), :repo => @repository.name, :title => @project.title) -%> <%= breadcrumbs_from(@root) -%>

<%= current_path.last -%>

<% content_for :extra_head do -%> <% if highlightable?(@blob) -%> <%= stylesheet_link_tag("prettify/prettify.css") -%> <%= javascript_include_tag("prettify/prettify.js") -%> <% if hl = language_of_file(current_path.last) -%> <%= javascript_include_tag("prettify/lang-#{hl}.js", :cache => false) -%> <% end -%> <% end -%> <% end -%> <% if false -%>
  • <%= t("views.blobs.wrap") %>:
  • <%= link_to_function t("views.common.toggle"), "Gitorious.Wordwrapper.toggle($$('table#codeblob td.code'))" -%>
<% end -%> <% if textual?(@blob) && !too_big_to_render?(@blob.size) -%> <% cache([:blob_render, @commit.id, @blob.id]) do -%> <% help_box(:center, :error, :style => "display:none", :id => "long-file") do -%>

This file looks large and may slow your browser down if we attempt to syntax highlight it, so we're showing it without any pretty colors. Highlight it anyway.

<% end -%> <%= render_highlighted(@blob.data, current_path.last || "") -%> <% end -%> <% elsif textual?(@blob) && too_big_to_render?(@blob.size) -%>

<%= t("views.blobs.too_big").call(self, raw_blob_path(@commit.id, current_path)) %>

<% elsif image?(@blob) -%> <% cache(blob_path(@commit.id, @blob.id)) do -%> <%= image_tag raw_blob_path(@commit.id, current_path) -%> <% end -%> <% else -%>

<%= t("views.blobs.message").call(self, raw_blob_path(@commit.id, current_path)) %>

<% end -%> <%= render "menu" -%>