tpm版本库目录功能
This commit is contained in:
parent
47e87b115a
commit
90efe7cc35
|
@ -366,7 +366,7 @@ update
|
|||
s = Trustie::Gitlab::Sync.new
|
||||
gproject = s.create_shixun(@shixun, @repository)
|
||||
raise "sync failed" if @shixun.gpid.blank?
|
||||
redirect_to(:controller => 'repositories', :action => 'shixun_show', :shixun_id => @shixun, :identifier => @repository.try(:identifier))
|
||||
redirect_to(:controller => 'repositories', :action => 'shixun_show', :id => @shixun, :repository_id => shixun_repository(@shixun).try(:identifier))
|
||||
rescue Exception => e
|
||||
@shixun.update_attribute(:gpid, nil)
|
||||
if @repository.id
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
<tbody>
|
||||
<tr style="border: 1px solid #DDD; border-bottom:none;">
|
||||
<td colspan="4">
|
||||
<!--<a href="javascript:history.go(-1)" class="fl linkBlue2 mt3" >-->
|
||||
<!--<span class="new_roadmap_icons_back mr5"></span>-->
|
||||
<!--<span></span>返回上级目录-->
|
||||
<%#= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>
|
||||
<!--</a>-->
|
||||
<a href="javascript:history.go(-1)" class="fl linkBlue2 mt3" >
|
||||
<span class="new_roadmap_icons_back mr5"></span>
|
||||
<span></span>返回上级目录
|
||||
<%= render :partial => 'shixun_breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
<% unless @path.blank? %>
|
||||
<%= link_to "#{@repository.identifier.present? ? h(@repository.identifier) : 'root'}", ({:controller => 'repositories', :action => 'show', :id => @project, :repository_id => gitlab_repository(@project).try(:identifier)}), :class => "c_blue f14 fb" %>
|
||||
<%#= link_to(@repository.identifier.present? ? h(@repository.identifier) : 'root',
|
||||
:action => 'show', :id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:path => nil, :rev => @rev)
|
||||
%>
|
||||
<%
|
||||
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}"
|
||||
%>
|
||||
<span class="c_grey">/</span> <%= link_to h(dir), {:action => 'show', :id => @project, :repository_id => @repository.identifier_param,
|
||||
:path => to_path_param(link_path), :rev => @rev}, :class => "f14 fb" %>
|
||||
<% end %>
|
||||
<% if filename %>
|
||||
<span class="c_grey">/</span> <%= link_to h(filename),
|
||||
{:action => 'changes', :id => @project, :repository_id => @repository.identifier_param,
|
||||
:path => to_path_param("#{link_path}/#{filename}"), :rev => @rev}, :class => "f14 fb" %>
|
||||
<% end %>
|
||||
<%
|
||||
# @rev is revsion or Git and Mercurial branch or tag.
|
||||
# For Mercurial *tip*, @rev and @changeset are nil.
|
||||
rev_text = @changeset.nil? ? @rev : format_revision(@changeset)
|
||||
%>
|
||||
<%#= "@ #{h rev_text}" unless rev_text.blank? %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<% html_title(with_leading_slash(path)) -%>
|
Loading…
Reference in New Issue