<% #-- # Copyright (C) 2010 Juho Nieminen # Copyright (C) 2010 Tero Hänninen # Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) # Copyright (C) 2008 Johan Sørensen # Copyright (C) 2008 Fabio Akita # Copyright (C) 2008 Tor Arne Vestbø # Copyright (C) 2009 Fabio Akita # Copyright (C) 2009 Bill Marquette # # 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.trees.page_title", :repo => @repository.name, :title => @project.title) -%> <%= breadcrumbs_from(@root) -%>

Source tree for <%= @repository.name -%>

<% cache(tree_path(@commit.id, @path)) do -%> <% @tree.contents.sort_by{|c| force_utf8(c.name).downcase}.each do |node| -%> "> <% if node.is_a? Grit::Tree -%> <% elsif node.is_a? Grit::Submodule -%> <% else -%> <% end -%> <% if node.is_a? Grit::Submodule -%> <% else -%> <% if !too_many_entries_for_log?(@tree) && last_commit = commit_for_tree_path(@repository, node.name) -%> <% else -%> <% end -%> <% end -%> <% end -%>
File name Last updated Latest commit message
<%= link_to h(node.basename) + "/", tree_path(@ref, node.name) -%> <%= h(node.basename) -%> <%= link_to h(node.basename), blob_path(@ref, node.name).gsub("%2F","/") -%> submodule: <%= h(node.url(@ref)) -%><%= last_commit.committed_date.to_s(:short) -%> <%= link_to truncate(h(last_commit.message), :length => 75, :omission => "…"), commit_path(last_commit.id) -%>
<% end -%> <% if logged_in? && @repository.committer?(current_user) && !@ref.eql?(GitoriousConfig["repo_meta_branch"]) -%> <% form_for [@owner, @repository.id], :url => { :action => "show", :controller => "trees" }, :html => {:multipart => true} do |f|-%>

Add file: <%=file_field_tag "local_file", :size => 42 %>
with message: <%= f.submit "Upload file" -%>
Note: you can also update files by uploading a file with the same name.

<% end -%> <% end -%> <% content_for :sidebar do -%>
  • Repository: <%= link_to(h(@repository.name), repo_owner_path(@repository, :project_repository_path, @repository.project, @repository)) -%>
  • Project: <%= link_to(h(@repository.project.title), @repository.project) -%>
  • Owner: <%= link_to(h(@repository.owner.title), @repository.owner) -%>
  • <%= t("views.trees.branch") %>: <%=h @ref -%>
  • HEAD: <%= link_to h(@commit.id[0,7]), commit_path(@commit.id) -%>
  • <%= t("views.logs.head_tree") %>: <%= link_to h(@commit.tree.id[0,7]), tree_path(branch_with_tree(@commit.id, [])) -%>
<% cache([tree_path(@commit.id), :tags_and_branches], {:expires_in => 10.minutes}) do -%>
<%= t("views.logs.branches") %>:
<% unless @git.tags.blank? -%>
<%= t("views.logs.tags") %>:
<% end -%> <% end # cache() -%> <% end -%>