26 lines
1.1 KiB
Plaintext
26 lines
1.1 KiB
Plaintext
<% if @path.blank? %>
|
|
<%= @repository.identifier %>
|
|
<% else %>
|
|
<%= link_to "#{@repository.identifier.present? ? h(@repository.identifier) : 'root'}", myshixun_game_path(@game, :myshixun_id => @myshixun, :type => "root"), :remote => true %>
|
|
<%
|
|
dirs = path.split('/')
|
|
if 'file' == kind
|
|
filename = dirs.pop
|
|
end
|
|
link_path = ''
|
|
dirs.each do |dir|
|
|
next if dir.blank?
|
|
link_path << '/' unless link_path.empty?
|
|
link_path << "#{dir}"
|
|
%>
|
|
<% if dir.include?(".") %>
|
|
<span class="c_grey">/</span> <%= link_to h(dir), {:action => 'entry', :id => @game, :myshixun_id => @myshixun, :path => to_path_param(link_path), :rev => @rev},
|
|
:remote => true, :class => "f14 fb" %>
|
|
<% else %>
|
|
<span class="c_grey">/</span> <%= link_to h(dir), {:action => 'show', :id => @game, :myshixun_id => @myshixun, :path => to_path_param(link_path), :rev => @rev},
|
|
:remote => true, :class => "f14 fb" %>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %>
|
|
|