diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index a955fa88b..b1e23a96a 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -410,23 +410,21 @@ update if request.xhr? @entries ? render(:partial => 'dir_list_content') : render(:nothing => true) else - unless @entries.blank? - @changesets_latest_coimmit = @g.rep_last_changes(@project.gpid, :rev => @rev, :path => @path) - # @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.default_branch.nil? ? "master" : @g_project.default_branch + @changesets_latest_coimmit = @g.rep_last_changes(@project.gpid, :rev => @rev, :path => @path) + # @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.default_branch.nil? ? "master" : @g_project.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 - end + @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 gitlab_address = Redmine::Configuration['gitlab_address'] diff --git a/app/views/repositories/_latest_commit.html.erb b/app/views/repositories/_latest_commit.html.erb index 204196442..acce15cd8 100644 --- a/app/views/repositories/_latest_commit.html.erb +++ b/app/views/repositories/_latest_commit.html.erb @@ -1,11 +1,11 @@ -