change sth
This commit is contained in:
parent
dc6e08368d
commit
acbbdc26cb
|
@ -503,45 +503,8 @@ update
|
|||
Rails.logger.info("!!!!! this is to show the value of @path and @rev: ")
|
||||
Rails.logger.info(@path)
|
||||
Rails.logger.info(@rev)
|
||||
@entries = @repository.entries(@path, @rev)
|
||||
if request.xhr?
|
||||
@entries ? render(:partial => 'dir_list_content') : render(:nothing => true)
|
||||
else
|
||||
# @changesets_latest_coimmit = @g.rep_last_changes(@project.gpid, :rev => @rev, :path => @path)
|
||||
@changesets_latest_coimmit = @g.commits(@project.gpid, :rev => @rev, :path => @paht).try(:first)
|
||||
# @g.rep_last_changes(@project.gpid, :rev => @rev, :path => @path)
|
||||
# 总的提交数
|
||||
@changesets_all_count = @g.user_static(@project.gpid, :rev => @rev).count
|
||||
# 获取默认分支
|
||||
@g_default_branch = @g_project.try(:default_branch).nil? ? "master" : @g_project.try(:default_branch)
|
||||
|
||||
@creator = @project.owner.to_s
|
||||
gitlab_address = Redmine::Configuration['gitlab_address']
|
||||
gitlab_token = Gitlab.private_token
|
||||
# token值加密解密
|
||||
token = aes_encrypt("priEn3UwXfJs3Pmy", gitlab_token)
|
||||
# token值解密
|
||||
# gitlab_token = aes_dicrypt("priEn3UwXfJs3Pmy", token)
|
||||
@zip_path = Gitlab.endpoint.to_s + "/projects/" + @project.gpid.to_s + "/repository/archive?&private_token=" + token
|
||||
|
||||
@creator = @project.owner.to_s
|
||||
@repos_url = @g.project(@project.gpid).try(:http_url_to_repo)
|
||||
|
||||
# 一些数据的异步同步更新
|
||||
# 访问版本庫后更新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
|
||||
render :layout => 'base_projects'
|
||||
end
|
||||
|
||||
alias_method :browse, :show
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<div class="container-big mb10">
|
||||
<div class="project_r_h" style="width:970px;">
|
||||
<h2>This is the test!!!</h2>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>测试</p>
|
||||
</div>
|
||||
|
||||
<% html_title(l(:label_contribution)) -%>
|
||||
<% html_title(l(:label_calendar)) -%>
|
||||
</div>
|
|
@ -601,7 +601,7 @@ RedmineApp::Application.routes.draw do
|
|||
get '/issues/calendar', :to => 'calendars#show'
|
||||
|
||||
# add by zxh 项目详情页面"贡献占比"按钮路由
|
||||
get 'projects/:id/contributions/:repository_id', :to => 'contributions#show', :path => nil
|
||||
get '/projects/:id/contributions/:repository_id', :to => 'contributions#show', :path => nil
|
||||
|
||||
get 'projects/:id/issues/statistics', :to => 'issues#statistics', :as => 'project_issues_statistics'
|
||||
get 'projects/:id/issues/report', :to => 'reports#issue_report', :as => 'project_issues_report'
|
||||
|
|
Loading…
Reference in New Issue