diff --git a/app/views/pull_requests/_show.html.erb b/app/views/pull_requests/_show.html.erb index be3970d3a..3fe189c98 100644 --- a/app/views/pull_requests/_show.html.erb +++ b/app/views/pull_requests/_show.html.erb @@ -11,20 +11,26 @@
<%= @request.title %>

<%= @request.description %>

请求将 <%= @request.source_branch %> 合并至 <%= @request.target_branch %> -
+ <% if @commits_count == 0 && @changes_count == 0 %> +
<%= @request.source_branch %>没有新内容可以合并至<%= @request.target_branch %>

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

+
<% else %> <% if @request.state == "merged" %> +
<%= 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) %> 前合并

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

+
<% 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 %> -
+