|
|
|
@ -1,17 +1,11 @@
|
|
|
|
|
<%= call_hook(:view_repositories_show_contextual, {:repository => @repository, :project => @project}) %>
|
|
|
|
|
<%#= call_hook(:view_repositories_show_contextual, {:repository => @repository, :project => @project}) %>
|
|
|
|
|
<div class="project_r_h">
|
|
|
|
|
<div class="fl"><h2 class="project_h2_repository"><%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %></h2></div>
|
|
|
|
|
<% unless @entries.nil? %>
|
|
|
|
|
<a href="<%= @zip_path %>" class="btn_zipdown fr" onclick="">ZIP下载</a>
|
|
|
|
|
<%# if is_project_manager?(User.current, @project.id) && QualityAnalysis.where(:project_id => @project.id).first.nil? %>
|
|
|
|
|
<%# if User.current.member_of?(@project) %>
|
|
|
|
|
<% if quality_analysis(User.current.try(:login), @repository.id).nil? && User.current.member_of?(@project) && @project.is_public? %>
|
|
|
|
|
<%= link_to "质量分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch ), :remote => true, :class => "btn_zipdown fr" %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<%# end %>
|
|
|
|
|
<%# else %>
|
|
|
|
|
<%#= link_to "质量分析", project_quality_analysis_path(:project_id => @project.id, :resource_id => @proje), :class => "btn_zipdown fr" %>
|
|
|
|
|
<%# end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="repository_con" style="line-height:1.9;">
|
|
|
|
@ -23,29 +17,29 @@
|
|
|
|
|
该版本库还没有上传代码!
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if @repository.type.to_s=="Repository::Gitlab" %>
|
|
|
|
|
<% if @repository.type.to_s == "Repository::Gitlab" %>
|
|
|
|
|
版本库地址:<%= @repos_url %>
|
|
|
|
|
<% else %>
|
|
|
|
|
版本库地址:<%= h @repository.url %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<!-- added by bai -->
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= render :partial => 'navigation' %>
|
|
|
|
|
<div class="fl c_grey02 mt5 mr5">克隆网址:</div>
|
|
|
|
|
<textarea id="copy_rep_content" class="cloneUrl mt5 fl" type="input" ><%= @repository.type.to_s=="Repository::Gitlab" ? @repos_url.to_s.lstrip : @repository.url %></textarea>
|
|
|
|
|
<textarea id="copy_rep_content" class="cloneUrl mt5 fl" type="input" ><%= @repos_url.to_s.lstrip %></textarea>
|
|
|
|
|
<a href="javascript:void(0);" class="clone_btn mt5" onclick="jsCopy()"><span class="vl_copy" title="点击复制版本库地址"></span></a>
|
|
|
|
|
<div class="fl mt5 ml15">
|
|
|
|
|
<%=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" %>
|
|
|
|
|
</div>
|
|
|
|
|
<%# 针对公开项目:用户必须创建了项目,否则用户无法同步 %>
|
|
|
|
|
|
|
|
|
|
<% if User.current.id != @project.user_id %>
|
|
|
|
|
<div class="fr mt5"><%= link_to "<span class='vl_fork'></span>".html_safe+"Fork", {:controller => 'repositories', :action => 'forked'}, :class=>"vl_btn", :target => "_blank", :confirm=>"平台将为您创建一个新的同名项目和版本库,请问是否继续?" %>
|
|
|
|
|
<span href="javascript:void(0);" class="vl_btn_2 fb"><%= @project.forked_count.to_i %></span>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
|
|
|
|
|
<div class="recordBanner mt10">
|
|
|
|
|
<% if @changesets && !@changesets.empty? %>
|
|
|
|
|
<% if !user_commit_rep(@changesets_latest_coimmit.author_email).nil? %>
|
|
|
|
@ -77,7 +71,7 @@
|
|
|
|
|
<%# 数据统计 %>
|
|
|
|
|
<%#= render :partial => 'summary' %>
|
|
|
|
|
<%# end %>
|
|
|
|
|
<%= render :partial => 'dir_list' %>
|
|
|
|
|
<%#= render :partial => 'dir_list' %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<%#= render_properties(@properties) %>
|
|
|
|
|
|
|
|
|
@ -87,8 +81,8 @@
|
|
|
|
|
|
|
|
|
|
<a href="https://<%=Setting.host_name %>/forums/1/memos/1232" >如何提交代码</a>
|
|
|
|
|
</div>
|
|
|
|
|
<% content_for :header_tags do %>
|
|
|
|
|
<%= stylesheet_link_tag "scm" %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<%# content_for :header_tags do %>
|
|
|
|
|
<%#= stylesheet_link_tag "scm" %>
|
|
|
|
|
<%# end %>
|
|
|
|
|
|
|
|
|
|
<% html_title(l(:label_repository)) -%>
|
|
|
|
|