pull request 列表增加源项目/姓名 目标项目/姓名
This commit is contained in:
parent
99ac546782
commit
ecf5101ef2
|
@ -19,6 +19,11 @@ module PullRequestsHelper
|
|||
PullRequest.where(:pull_request_id => pull_request_id).first
|
||||
end
|
||||
|
||||
# 通过gitlab项目id获取Trustie项目的用户名
|
||||
def find_gitlab_project gitlab_project_id
|
||||
Project.find_by_gpid(gitlab_project_id).owner.try(:show_name)
|
||||
end
|
||||
|
||||
def get_state state
|
||||
case state
|
||||
when "open","reopened"
|
||||
|
|
|
@ -14,10 +14,8 @@
|
|||
<div class="c_grey clear mt5">
|
||||
<p class="fl">由 <%= link_to request.author.try(:username), user_path(get_user_by_login_and(request.author.try(:username))), :class => "linkBlue2" %> 创建于<%= time_tag(request.created_at) %>前</p>
|
||||
<span class="fl ml10"><%= time_tag(request.updated_at) %>前更新</span>
|
||||
<p class="fr"><%= @project.name+"/"+request.source_branch %><span class="c_grey02 ml10 mr10">合并到</span><%= request.target_branch %></p>
|
||||
<p class="fr"><%= find_gitlab_project(request.source_project_id)+"/"+request.source_branch %><span class="c_grey02 ml10 mr10">合并到</span><%= find_gitlab_project(request.target_project_id)+"/"+request.target_branch %></p>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
<% end %>
|
Loading…
Reference in New Issue