diff --git a/app/controllers/pull_requests_controller.rb b/app/controllers/pull_requests_controller.rb
index a71f9c105..e4a2dc9df 100644
--- a/app/controllers/pull_requests_controller.rb
+++ b/app/controllers/pull_requests_controller.rb
@@ -227,7 +227,7 @@ class PullRequestsController < ApplicationController
# Gets the comments on a merge request.
#
# @example
- # Gitlab.merge_request_comments(5, 1)
+ # Gitlab.merge_request_comments(5, 1)
def pull_request_comments
begin
@comments = @g.merge_request_comments(@project.gpid, params[:id]).reverse
diff --git a/app/controllers/versions_controller.rb b/app/controllers/versions_controller.rb
index ed9c4638f..7b4695d3c 100644
--- a/app/controllers/versions_controller.rb
+++ b/app/controllers/versions_controller.rb
@@ -125,7 +125,8 @@ class VersionsController < ApplicationController
@issue_pages = Paginator.new @issue_count, @limit, params['page'] || 1
# @offset ||= @issue_pages.offset
@issues = paginateHelper @version_issues, @limit
- @version_issue_assigned_name = @version_issues.group_by(&:assigned_to_id)
+ @version_issue_assigned_name = @version_issues.sort_by{ |i| Issue.where(:project_id => @project.id ,
+ :assigned_to_id => i.assigned_to_id, :fixed_version_id => @version.id).count }.reverse.group_by(&:assigned_to_id)
format.html {
# @issues = @version.fixed_issues.visible.
# includes(:status, :tracker, :priority).
diff --git a/app/views/layouts/_base_project_top.html.erb b/app/views/layouts/_base_project_top.html.erb
index afd78117a..d6c704aa0 100644
--- a/app/views/layouts/_base_project_top.html.erb
+++ b/app/views/layouts/_base_project_top.html.erb
@@ -19,8 +19,8 @@
<% unless @project.forked_from_project_id.nil? %>
- forked from <%=link_to "#{get_fork_from_project(@project.forked_from_project_id).owner.try(:show_name)}/ ".html_safe, user_path(get_fork_from_project(@project.forked_from_project_id).owner), :class => "pro_new_username_fork fl" %>
- <%=link_to get_fork_from_project(@project.forked_from_project_id).name, project_path(get_fork_from_project(@project.forked_from_project_id)), :class => "pro_new_username_fork fl" %>
+ forked from <%=link_to "#{get_fork_from_project(@project.forked_from_project_id).owner.try(:show_name)}/ ".html_safe, user_path(get_fork_from_project(@project.forked_from_project_id).owner), :class => "pro_new_username_fork fl", :target => "_blank" %>
+ <%=link_to get_fork_from_project(@project.forked_from_project_id).name, project_path(get_fork_from_project(@project.forked_from_project_id)), :class => "pro_new_username_fork fl", :target => "_blank" %>
<% end %>
diff --git a/app/views/pull_requests/_show.html.erb b/app/views/pull_requests/_show.html.erb
index a7dbc91f1..adf0ded0c 100644
--- a/app/views/pull_requests/_show.html.erb
+++ b/app/views/pull_requests/_show.html.erb
@@ -31,15 +31,7 @@
改动已合并至 <%= @request.target_branch %> 分支
<% else %>
- <% if is_project_manager?(User.current.id, @project.id) %>
- <% if @request.state == "closed" %>
- 该请求已被关闭
- <% else %>
-
- 在管理员接受后,将由系统自动合并。<%= link_to "接受", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "linkBlue2", :remote => true %>
-
- <% end %>
- <% end %>
+ <%= render "show_container" %>
<% end %>
diff --git a/app/views/pull_requests/_show_container.html.erb b/app/views/pull_requests/_show_container.html.erb
new file mode 100644
index 000000000..24216ac77
--- /dev/null
+++ b/app/views/pull_requests/_show_container.html.erb
@@ -0,0 +1,15 @@
+<% if @request.state == "closed" %>
+
+ 该请求已被关闭
+
+<% elsif @commits_count == 0 %>
+
+ 项目分支 <%= @request.source_branch %> 和 <%= @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 => "linkBlue2", :remote => true %>
+
+ <% end %>
+<% end %>
diff --git a/app/views/versions/_issue_statistics.html.erb b/app/views/versions/_issue_statistics.html.erb
index b8c0ff2e3..47d420a75 100644
--- a/app/views/versions/_issue_statistics.html.erb
+++ b/app/views/versions/_issue_statistics.html.erb
@@ -9,21 +9,21 @@
+
+ 合计
+ <%= Issue.where(:fixed_version_id => @version.id).count %>
+ <%= Issue.where(:fixed_version_id => @version.id, :status_id => 3).count %>
+ <%= Issue.where(:fixed_version_id => @version.id, :status_id => 5).count %>
+ <%= Issue.where(fixed_version_id: @version.id, status_id: [1,2,4]).count %>
+
<% @version_issue_assigned_name.each do | assigned | %>
- <%= User.find(assigned[0]).try(:show_name) %>
+ <%= User.find(assigned[0]).try(:show_name).nil? ? "未指派" : User.find(assigned[0]).try(:show_name) %>
<%= Issue.where(:fixed_version_id => @version.id, :assigned_to_id => assigned[0]).count %>
<%= Issue.where(:fixed_version_id => @version.id, :assigned_to_id => assigned[0], :status_id => 3).count %>
<%= Issue.where(:fixed_version_id => @version.id, :assigned_to_id => assigned[0], :status_id => 5).count %>
<%= Issue.where(fixed_version_id: @version.id, assigned_to_id: assigned[0], status_id: [1,2,4]).count %>
<% end %>
-
- Total
- <%= Issue.where(:fixed_version_id => @version.id).count %>
- <%= Issue.where(:fixed_version_id => @version.id, :status_id => 3).count %>
- <%= Issue.where(:fixed_version_id => @version.id, :status_id => 5).count %>
- <%= Issue.where(fixed_version_id: @version.id, status_id: [1,2,4]).count %>
-
\ No newline at end of file
diff --git a/app/views/versions/_new_milestone.html.erb b/app/views/versions/_new_milestone.html.erb
index 40fff71f2..b89936f3e 100644
--- a/app/views/versions/_new_milestone.html.erb
+++ b/app/views/versions/_new_milestone.html.erb
@@ -14,7 +14,7 @@
* 名称 :
<%= f.text_field :name, :maxlength => 60, :class=>"w650", :style=>"height: 28px;", :id => "popub_setting_version_name", :no_label => true %>
- 标题不能为空
+ 标题不能为空
描述 :
diff --git a/public/stylesheets/css/project.css b/public/stylesheets/css/project.css
index 33d6d1dbf..5af60925c 100644
--- a/public/stylesheets/css/project.css
+++ b/public/stylesheets/css/project.css
@@ -860,8 +860,8 @@ input.pro_newissue_con_check{ width: 15px; height: 15px;}
.pro_new_top {padding-top:15px; border:1px solid #ddd; background-color:#fff; width: 998px;}
.icons_newpro_lock{width: 22px; height: 23px; display: inline-block; background: url("/images/new_project/icons_issue.png") 0 -113px no-repeat;}
.pro_new_name{width: 600px; }
-a.pro_new_username { font-size: 20px; color: #3b94d6; line-height: 24px; cursor: default;}
-a.pro_new_username_fork { font-size: 12px; color: #3b94d6; line-height: 24px; cursor: default;}
+a.pro_new_username { font-size: 20px; color: #3b94d6; line-height: 24px;}
+a.pro_new_username_fork { font-size: 12px; color: #3b94d6; line-height: 24px;}
a.pro_new_proname{ overflow: hidden;white-space: nowrap;text-overflow:ellipsis;display: inline-block;}
a.pro_new_project_name{ width: 250px; overflow: hidden;white-space: nowrap;text-overflow:ellipsis;display: inline-block;}
a.pro_new_topbtn{ padding: 3px 7px; font-size: 12px; line-height: 20px; color: #333;vertical-align: middle;background-color: #fff; border: 1px solid #ddd; border-left: 0; border-top-right-radius: 3px; border-bottom-right-radius: 3px; color: #333;}