This commit is contained in:
parent
84fd99ced1
commit
54b66b86dc
|
@ -379,33 +379,37 @@ update
|
|||
def show
|
||||
# 获取版本库目录结构
|
||||
@entries = @repository.entries(@path, @rev)
|
||||
@changesets_latest_coimmit = @g.commits(@project.gpid, :ref_name => @rev)[0]
|
||||
|
||||
# 总的提交数
|
||||
@changesets_all_count = @g.user_static(@project.gpid, :rev => @rev).count
|
||||
|
||||
# 获取默认分支
|
||||
@g_default_branch = @g_project.default_branch.nil? ? "master" : @g_project.default_branch
|
||||
|
||||
@creator = @project.owner.to_s
|
||||
gitlab_address = Redmine::Configuration['gitlab_address']
|
||||
# REDO:需优化,仅测试用
|
||||
@zip_path = Gitlab.endpoint.to_s + "/projects/" + @project.gpid.to_s + "/repository/archive?&private_token=" + Gitlab.private_token
|
||||
@repos_url = gitlab_address.to_s+"/" + @creator + "/" + @repository.identifier+"."+"git"
|
||||
|
||||
# 一些数据的异步同步更新
|
||||
# 访问版本庫后更新project_score表数据;changeset_num为提交总数
|
||||
project_score = @project.project_score
|
||||
if project_score.nil?
|
||||
ProjectScore.create(:project_id => @project.id, :score => false)
|
||||
if request.xhr?
|
||||
@entries ? render(:partial => 'dir_list_content') : render(:nothing => true)
|
||||
else
|
||||
project_score.update_column(:changeset_num, @changesets_all_count)
|
||||
end
|
||||
unless @changesets_latest_coimmit.blank?
|
||||
update_commits_date(@project, @changesets_latest_coimmit)
|
||||
end
|
||||
@changesets_latest_coimmit = @g.commits(@project.gpid, :ref_name => @rev)[0]
|
||||
|
||||
render :layout => 'base_projects'
|
||||
# 总的提交数
|
||||
@changesets_all_count = @g.user_static(@project.gpid, :rev => @rev).count
|
||||
|
||||
# 获取默认分支
|
||||
@g_default_branch = @g_project.default_branch.nil? ? "master" : @g_project.default_branch
|
||||
|
||||
@creator = @project.owner.to_s
|
||||
gitlab_address = Redmine::Configuration['gitlab_address']
|
||||
# REDO:需优化,仅测试用
|
||||
@zip_path = Gitlab.endpoint.to_s + "/projects/" + @project.gpid.to_s + "/repository/archive?&private_token=" + Gitlab.private_token
|
||||
@repos_url = gitlab_address.to_s+"/" + @creator + "/" + @repository.identifier+"."+"git"
|
||||
|
||||
# 一些数据的异步同步更新
|
||||
# 访问版本庫后更新project_score表数据;changeset_num为提交总数
|
||||
project_score = @project.project_score
|
||||
if project_score.nil?
|
||||
ProjectScore.create(:project_id => @project.id, :score => false)
|
||||
else
|
||||
project_score.update_column(:changeset_num, @changesets_all_count)
|
||||
end
|
||||
unless @changesets_latest_coimmit.blank?
|
||||
update_commits_date(@project, @changesets_latest_coimmit)
|
||||
end
|
||||
|
||||
render :layout => 'base_projects'
|
||||
end
|
||||
end
|
||||
|
||||
alias_method :browse, :show
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
<!--邀请加入-->
|
||||
<div class="subNavBoxProject">
|
||||
<div id="project_memu_list">
|
||||
<%= render :partial => 'projects/development_group', :locals => {:project => @project} %>
|
||||
<%#= render :partial => 'projects/development_group', :locals => {:project => @project} %>
|
||||
</div>
|
||||
</div>
|
||||
<!--项目侧导航 end-->
|
||||
|
|
Loading…
Reference in New Issue