2015-04-27 16:58:16 +08:00
|
|
|
|
<%= call_hook(:view_repositories_show_contextual, {:repository => @repository, :project => @project}) %>
|
2015-04-16 05:01:09 +08:00
|
|
|
|
<div class="project_r_h">
|
2015-10-22 16:03:22 +08:00
|
|
|
|
<div class="fl"><h2 class="project_h2_repository"><%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %></h2></div>
|
2015-04-16 05:01:09 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="repository_con" style="line-height:1.9;">
|
2015-10-26 17:18:59 +08:00
|
|
|
|
<% if @entries.nil? %>
|
|
|
|
|
<%# 未提交代码提示 %>
|
|
|
|
|
<div class=" repository-url light-well">
|
|
|
|
|
<% if @entries.nil? && authorize_for('repositories', 'browse') %>
|
|
|
|
|
<div class="page-title">
|
|
|
|
|
该版本库还没有上传代码!
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if @repository.type.to_s=="Repository::Gitlab" %>
|
|
|
|
|
版本库地址:<%= @repos_url %>
|
|
|
|
|
<% else %>
|
|
|
|
|
版本库地址:<%= h @repository.url %>
|
2015-12-05 14:34:16 +08:00
|
|
|
|
<% end %>
|
2015-10-26 17:18:59 +08:00
|
|
|
|
<!-- added by bai -->
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= render :partial => 'navigation' %>
|
|
|
|
|
<div class="fl c_grey02 mt5 mr5">克隆网址:</div>
|
2015-12-04 17:32:56 +08:00
|
|
|
|
<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>
|
2015-10-27 11:41:25 +08:00
|
|
|
|
<a href="javascript:void(0);" class="clone_btn mt5" onclick="jsCopy()"><span class="vl_copy" title="点击复制版本库地址"></span></a>
|
2015-10-28 09:23:12 +08:00
|
|
|
|
<div class="fl mt5 ml15"><a href="javascript:void(0);" class="vl_btn fb" onclick="zip()"><span class="vl_zip"></span>ZIP</a> </div>
|
2015-12-08 09:46:29 +08:00
|
|
|
|
<%# 针对公开项目:用户必须创建了项目,否则用户无法同步 %>
|
|
|
|
|
<% if User.current.id != @project.user_id %>
|
2015-12-07 10:34:10 +08:00
|
|
|
|
<div class="fr mt5"><%= link_to "<span class='vl_fork'></span>".html_safe+"Fork", {:controller => 'repositories', :action => 'forked'}, :class=>"vl_btn"%>
|
2015-12-07 15:12:30 +08:00
|
|
|
|
<span href="javascript:void(0);" class="vl_btn_2 fb"><%= @project.forked_count.to_i %></span>
|
|
|
|
|
</div>
|
2015-12-07 10:34:10 +08:00
|
|
|
|
<% end %>
|
2015-10-26 17:18:59 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<div class="recordBanner mt10">
|
2015-10-27 15:27:12 +08:00
|
|
|
|
<% if @changesets && !@changesets.empty? %>
|
2015-11-27 11:25:16 +08:00
|
|
|
|
<% 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") %>
|
|
|
|
|
<span class="fl"><div class="fb fontGrey3 mr5 fl"><%=link_to user_commit_rep(@changesets_latest_coimmit.author_email), user_path(user_commit_rep(@changesets_latest_coimmit.author_email)) %></div>
|
|
|
|
|
<div class="fl">提交于<%= time_tag(@changesets_latest_coimmit.created_at) %>:</div>
|
|
|
|
|
<div class="commit_content_dec fl" title="<%= @changesets_latest_coimmit.comments %>"><%= @changesets_latest_coimmit.message %></div>
|
|
|
|
|
</span>
|
|
|
|
|
<% else %>
|
|
|
|
|
<span class="fl"><div class="fb fontGrey3 mr5 fl"><%=@changesets_latest_coimmit.author_email %></div>
|
|
|
|
|
<div class="fl">提交于<%= time_tag(@changesets_latest_coimmit.created_at) %>:</div>
|
|
|
|
|
<div class="commit_content_dec fl" title="<%= @changesets_latest_coimmit.comments %>"><%= @changesets_latest_coimmit.message %></div>
|
|
|
|
|
</span>
|
|
|
|
|
<%end%>
|
2015-10-27 15:27:12 +08:00
|
|
|
|
<% end %>
|
2015-10-26 17:18:59 +08:00
|
|
|
|
<span class="fr mr5 "><font class="fb ml2 mr2 vl_branch mt2">
|
2015-10-27 14:32:51 +08:00
|
|
|
|
<%= @repository.branches.count %></font> 个分支
|
2015-10-26 17:18:59 +08:00
|
|
|
|
</span>
|
2015-10-27 15:27:12 +08:00
|
|
|
|
|
2015-10-26 17:18:59 +08:00
|
|
|
|
<span class="fr mr5"><font class="fb ml2 mr2 vl_commit">
|
2015-12-08 15:56:31 +08:00
|
|
|
|
|
|
|
|
|
<%=link_to"全部提交次数", {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev,:page=>1 ,:commit_count =>"#{@changesets_all_count}"} %></font>
|
2015-11-19 14:42:37 +08:00
|
|
|
|
|
2015-10-26 17:18:59 +08:00
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
2015-12-07 15:12:30 +08:00
|
|
|
|
|
2015-10-26 17:18:59 +08:00
|
|
|
|
<!--contextual end-->
|
2015-10-22 13:44:35 +08:00
|
|
|
|
|
2015-06-12 16:48:43 +08:00
|
|
|
|
<% if !@entries.nil? && authorize_for('repositories', 'browse') %>
|
2015-10-23 16:20:32 +08:00
|
|
|
|
<%# 数据统计 %>
|
2015-10-26 17:18:59 +08:00
|
|
|
|
<%#= render :partial => 'summary' %>
|
2015-10-23 16:20:32 +08:00
|
|
|
|
<%# end %>
|
2015-06-12 16:48:43 +08:00
|
|
|
|
<%= render :partial => 'dir_list' %>
|
|
|
|
|
<% end %>
|
2015-12-07 15:12:30 +08:00
|
|
|
|
<%#= render_properties(@properties) %>
|
2015-06-12 16:48:43 +08:00
|
|
|
|
|
|
|
|
|
<!-- 代码修订 -->
|
2015-12-07 15:12:30 +08:00
|
|
|
|
<%#= render_properties(@properties) %>
|
2015-10-27 11:41:25 +08:00
|
|
|
|
|
2015-10-29 17:28:23 +08:00
|
|
|
|
|
2015-10-27 15:27:12 +08:00
|
|
|
|
<a href="https://<%=Setting.host_name %>/forums/1/memos/1232" >如何提交代码</a>
|
2015-12-07 15:12:30 +08:00
|
|
|
|
</div>
|
2013-08-01 10:33:49 +08:00
|
|
|
|
<% content_for :header_tags do %>
|
2015-04-27 16:58:16 +08:00
|
|
|
|
<%= stylesheet_link_tag "scm" %>
|
2013-08-01 10:33:49 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<% html_title(l(:label_repository)) -%>
|