<%= render :partial => "pull_requests/error_message" %>
<%= get_state(@request.state) %>合并请求 由 <%= link_to @request.author.try(:username), user_path(get_user_by_login_and(@request.author.try(:username))), :class => "link-blue" %> 于 <%= time_tag(@request.created_at) %> 前提交 · 最后编辑时间 <%= time_tag(@request.updated_at) %> 前 <% unless @request.state == "merged" %> <%= link_to "#{@request.state == 'closed' ? '重新打开' : '关闭'}", update_pull_request_project_pull_request_path(@request.id, :project_id => @project.id, :state => @request.state =="closed" ? "reopen" : "close"), :class => "BlueCirBtn fr" %> <% end %>
<%= @request.title %>

<%= @request.description %>

<%= link_to @request.author.try(:username), user_path(get_user_by_login_and(@request.author.try(:username))), :class => "link-blue" %> 请求将 <%= @request.source_branch %> 合并至 <%= @request.target_branch %> <% if @commits_count == 0 && @changes_count == 0 %>
<%= @request.source_branch %>没有新内容可以合并至<%= @request.target_branch %>

请将新改动提交至源分支或者切换到其它目标分支

<% else %> <% if @request.state == "merged" %>
<% if accept_user(@request.id).blank? %>

改动已合并至<%= @request.target_branch %>

<% else %> <%= link_to User.find(accept_user(@request.id).user_id), user_path(accept_user(@request.id).user_id), :class => "link-blue" %> 于 <%= time_tag(accept_user(@request.id).created_at) %> 前合并
<% end %>
<% else %> <% if is_project_manager?(User.current.id, @project.id) %>
<%= link_to "接受请求", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "BlueCirBtn", :remote => true %>
<% end %> <% end %>
<% if @type == nil || @type == "1" %>
<%= render :partial => "pull_requests/pull_request_comments" %>
<% end %>
<%= render :partial => "pull_requests/pull_request_commits" %>
<%= render :partial => "pull_requests/pull_request_changes" %>
<% end %>