diff --git a/app/views/pull_requests/_pull_request_commits.html.erb b/app/views/pull_requests/_pull_request_commits.html.erb index ffccccd8d..a7f6b5aa7 100644 --- a/app/views/pull_requests/_pull_request_commits.html.erb +++ b/app/views/pull_requests/_pull_request_commits.html.erb @@ -3,10 +3,11 @@
<%= format_date(commit.created_at) %> +

<%= link_to commit.author_name, user_path(get_user_by_mail(commit.author_email)), :class => "link-blue" %>创建于<%= time_tag(commit.created_at) %>前

<%= commit.title %> -

<%= link_to commit.author_name, user_path(get_user_by_mail(commit.author_email)), :class => "link-blue" %>创建于24小时前

+
diff --git a/app/views/pull_requests/_show.html.erb b/app/views/pull_requests/_show.html.erb index 3015a4d7a..7ebdc1dde 100644 --- a/app/views/pull_requests/_show.html.erb +++ b/app/views/pull_requests/_show.html.erb @@ -4,23 +4,33 @@
<%= @request.title %>

<%= @request.description %>

-
- 请求将 <%= @request.source_branch %> 合并至 <%= @request.target_branch %> -
- <%= link_to "接受请求", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "BlueCirBtn" %> -
-
- -
根据最近提交时间排列
-
- <%= render :partial => "pull_requests/pull_request_commits" %> -
-
- <%= render :partial => "pull_requests/pull_request_changes" %> -
+<% if @commits_count == 0 && @changes_count == 0 %> +
+ 请求将 <%= @request.source_branch %> 合并至 <%= @request.target_branch %> +
+ <%= @request.source_branch %>没有新内容可以合并至<%= @request.target_branch %>
+

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

+
+
+<% else %> +
+ 请求将 <%= @request.source_branch %> 合并至 <%= @request.target_branch %> +
+ <%= link_to "接受请求", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "BlueCirBtn" %> +
+
+ +
根据最近提交时间排列
+
+ <%= render :partial => "pull_requests/pull_request_commits" %> +
+
+ <%= render :partial => "pull_requests/pull_request_changes" %> +
+<% end %>