<%#= call_hook(:view_repositories_show_contextual, {:repository => @repository, :project => @project}) %>

<%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>

<% unless @entries.nil? %> ZIP下载 <% if User.current.member_of?(@project) && @project.is_public? %> <% if quality_analysis(User.current.try(:login), @repository.id).nil? %> <%= link_to "质量分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "1"), :remote => true, :class => "btn_zipdown fr" %> <% else %> <%= link_to "重新分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "2"), :remote => true, :class => "btn_zipdown fr" %> <% end %> <% end %> <% end %> <% unless QualityAnalysis.where(:project_id => @project.id).first.nil? %> <%= link_to "代码分析结果", project_quality_analysis_path(:project_id => @project.id), :class => "btn_zipdown fr" %> <% end %>
<% if @entries.nil? %> <%# 未提交代码提示 %>
<% if @entries.nil? && authorize_for('repositories', 'browse') %>
该版本库还没有上传代码!
<% end %> <% if @repository.type.to_s == "Repository::Gitlab" %> 版本库地址:<%= @repos_url %> <% else %> 版本库地址:<%= h @repository.url %> <% end %>
<% else %> <%= render :partial => 'navigation' %>
克隆网址:
<%=link_to "代码统计", stats_repository_project_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :creator => @creator, :default_branch => @g_default_branch ), :class => "fl vl_zip" %>
<% if User.current.id != @project.user_id %>
<%= link_to "".html_safe+"Fork", {:controller => 'repositories', :action => 'forked'}, :class=>"vl_btn", :target => "_blank", :confirm=>"平台将为您创建一个新的同名项目和版本库,请问是否继续?" %> <%= @project.forked_count.to_i %>
<% end %>
<% if @changesets && !@changesets.empty? %> <% if !user_commit_rep(@changesets_latest_coimmit.author_email).nil? %> <%= image_tag(url_to_avatar(user_commit_rep(@changesets_latest_coimmit.author_email)), :width => "25", :height => "25", :class => "fl portraitRadius mt2 ml4 mr5") %>
提交于<%= time_tag(@changesets_latest_coimmit.created_at) %>:
<%= @changesets_latest_coimmit.message %>
<% else %>
提交于<%= time_tag(@changesets_latest_coimmit.created_at) %>:
<%= @changesets_latest_coimmit.message %>
<%end%> <% end %> <%= @repository.branches.count %> 个分支 <%=link_to @changesets_all_count, {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev,:page=>1 ,:commit_count =>"#{@changesets_all_count}"} %> 提交
<% end %> <% if !@entries.nil? && authorize_for('repositories', 'browse') %> <%= render :partial => 'dir_list' %> <% end %> 如何提交代码
<%# content_for :header_tags do %> <%#= stylesheet_link_tag "scm" %> <%# end %> <% html_title(l(:label_repository)) -%>