版本库统计
This commit is contained in:
parent
dc0b7defa1
commit
04849659de
|
@ -364,6 +364,7 @@ update
|
|||
unless @changesets[0].blank?
|
||||
update_commits_date(@project, @changesets_latest_coimmit)
|
||||
end
|
||||
@creator = User.where("id =?", @project.user_id).first.try(:login)
|
||||
@properties = @repository.properties(@path, @rev)
|
||||
@repositories = @project.repositories
|
||||
project_path_cut = RepositoriesHelper::PROJECT_PATH_CUT
|
||||
|
|
|
@ -24,7 +24,9 @@
|
|||
<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>
|
||||
<a href="javascript:void(0);" class="clone_btn mt5" onclick="jsCopy()"><span class="vl_copy" title="点击复制版本库地址"></span></a>
|
||||
<div class="fl mt5 ml15"><a href="javascript:void(0);" class="vl_btn fb" onclick="zip()"><span class="vl_zip"></span>ZIP</a> </div>
|
||||
<div class="fl mt5 ml15">
|
||||
<%=link_to "统计", stats_repository_project_path(:id => @project, :repository_id => @repository.identifier_param, :rev => @rev, :creator => @creator ), :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=>"平台将为您创建一个新的同名项目和版本库,请问是否继续?" %>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><%= l(:label_statistics) %></h2>
|
||||
</div>
|
||||
<% if @status_commit_count ==0 %>
|
||||
<div class="flash notice">该项目目前还没有提交过代码!</div>
|
||||
<% if false %>
|
||||
<div class="flash notice">请在版本库中提交代码,统计信息将更准确</div>
|
||||
<% else %>
|
||||
<div class="riviseRed fl"></div><div class="fl">修订 是版本库的提交次数, 显示为橘红色。</div><br>
|
||||
<div class="changeBlue fl"></div><div class="fl">变更 是对版本库中文件的修改次数, 显示为蓝色。</div>
|
||||
|
|
|
@ -836,7 +836,7 @@ RedmineApp::Application.routes.draw do
|
|||
get 'activity', :to => 'activities#index'
|
||||
|
||||
# repositories routes
|
||||
get 'projects/:id/repository/:repository_id/statistics', :to => 'repositories#stats'
|
||||
get 'projects/:id/repository/:repository_id/statistics', :to => 'repositories#stats', :as => "stats_repository_project"
|
||||
get 'projects/:id/repository/:repository_id/graph', :to => 'repositories#graph'
|
||||
|
||||
get 'projects/:id/repository/:repository_id/changes(/*path(.:ext))', :to => 'repositories#changes'
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
|
@ -214,7 +214,7 @@
|
|||
.recordBanner {width:670px; height:30px; background-color:#f1f1f1; color:#666666; line-height:30px; vertical-align:middle;}
|
||||
.vl_copy {background:url(../images/vlicon/clone_url.png) 0px 0px no-repeat; padding-left:22px;}
|
||||
.vl_copy2 {background:url(../images/vlicon/clone_url.png) 0px 0px no-repeat; padding-left:22px;}
|
||||
.vl_zip {background:url(../images/vlicon/download_icon.png) 0px 0px no-repeat; padding-left:22px;}
|
||||
.vl_zip {background:url(../images/vlicon/graph.png) 0px 2px no-repeat; padding-left:22px;}
|
||||
.vl_fork {background:url(../images/vlicon/fork_icon.png) 0px -2px no-repeat; padding-left:22px;}
|
||||
.vl_commit {background:url(../images/vlicon/commit_icon.png) 0px -2px no-repeat; padding-left:22px;weight:20px;height: 24px;}
|
||||
.vl_branch {background:url(../images/vlicon/branch_icon.png) 0px -2px no-repeat; padding-left:22px}
|
||||
|
|
Loading…
Reference in New Issue