Feature #1948 » git-submodule-view.patch
| app/views/repositories/_dir_list_content.html.erb | ||
|---|---|---|
|
:depth => (depth + 1),
|
||
|
:parent_id => tr_id)) %>');"> </span>
|
||
|
<% end %>
|
||
|
<% if entry.is_submodule? %>
|
||
|
<%= link_to ent_name,
|
||
|
{:id => @project, :repository_id => ent_name, :rev => ent_path },
|
||
|
:class => "icon icon-shared"
|
||
|
%>
|
||
|
<% else %>
|
||
|
<%= link_to ent_name,
|
||
|
{:action => (entry.is_dir? ? 'show' : 'entry'), :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(ent_path), :rev => @rev},
|
||
|
:class => (entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%>
|
||
|
<% end %>
|
||
|
</td>
|
||
|
<td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td>
|
||
|
<% if @repository.report_last_commit %>
|
||
| lib/redmine/scm/adapters/abstract_adapter.rb | ||
|---|---|---|
|
'file' == self.kind
|
||
|
end
|
||
|
def is_submodule?
|
||
|
'submodule' == self.kind
|
||
|
end
|
||
|
def is_dir?
|
||
|
'dir' == self.kind
|
||
|
end
|
||
| lib/redmine/scm/adapters/git_adapter.rb | ||
|---|---|---|
|
full_path = p.empty? ? name : "#{p}/#{name}"
|
||
|
n = scm_iconv('UTF-8', @path_encoding, name)
|
||
|
full_p = scm_iconv('UTF-8', @path_encoding, full_path)
|
||
|
if type == "tree"
|
||
|
kind = 'dir'
|
||
|
elsif type == "commit"
|
||
|
kind = 'submodule'
|
||
|
full_p = sha
|
||
|
else
|
||
|
kind = 'file'
|
||
|
end
|
||
|
entries << Entry.new({:name => n,
|
||
|
:path => full_p,
|
||
|
:kind => (type == "tree") ? 'dir' : 'file',
|
||
|
:kind => kind,
|
||
|
:size => (type == "tree") ? nil : size,
|
||
|
:lastrev => options[:report_last_commit] ?
|
||
|
lastrev(full_path, identifier) : Revision.new
|
||