From 1c33e6481f8fb2a0c1492c42f1bf9d8c7ec211aa Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Tue, 27 Sep 2016 10:48:39 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E9=97=AE=E9=A2=98issue=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=E5=8F=8A=E5=85=B6=E5=8A=A8=E6=80=81=E7=9A=84=E7=9B=AE=E6=A0=87?=
=?UTF-8?q?=E7=89=88=E6=9C=AC=E6=94=B9=E4=B8=BA=E9=87=8C=E7=A8=8B=E7=A2=91?=
=?UTF-8?q?=EF=BC=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/issues/_attributes.html.erb | 2 +-
app/views/issues/_attributes_show.html.erb | 2 +-
app/views/issues/index.html.erb | 6 +++---
app/views/users/_project_issue_detail.html.erb | 2 +-
config/locales/projects/zh.yml | 1 +
5 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/app/views/issues/_attributes.html.erb b/app/views/issues/_attributes.html.erb
index 80c8ad185..f7d7b4d50 100644
--- a/app/views/issues/_attributes.html.erb
+++ b/app/views/issues/_attributes.html.erb
@@ -44,7 +44,7 @@
<% if @issue.safe_attribute?('fixed_version_id') && @issue.assignable_versions.any? %>
-
+
<%= f.select :fixed_version_id, version_options_for_select(@issue.assignable_versions, @issue.fixed_version),
{:include_blank => true, :required => @issue.required_attribute?('fixed_version_id'), :no_label => true},
:class => "w150" %>
diff --git a/app/views/issues/_attributes_show.html.erb b/app/views/issues/_attributes_show.html.erb
index 15160facb..7ff59fd9d 100644
--- a/app/views/issues/_attributes_show.html.erb
+++ b/app/views/issues/_attributes_show.html.erb
@@ -40,7 +40,7 @@
<% end %>
<% unless @issue.disabled_core_fields.include?('fixed_version_id') %>
- 目标版本 :
<%= (@issue.fixed_version ? link_to_version(@issue.fixed_version, :class => "pro_info_p") : "--") %>
+ <%=l(:milestone)%> :
<%= (@issue.fixed_version ? link_to_version(@issue.fixed_version, :class => "pro_info_p") : "--") %>
<% end %>
diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb
index ec5849abd..8552a65b2 100644
--- a/app/views/issues/index.html.erb
+++ b/app/views/issues/index.html.erb
@@ -91,9 +91,9 @@
新 增
导出EXCEL
diff --git a/app/views/users/_project_issue_detail.html.erb b/app/views/users/_project_issue_detail.html.erb
index 321ba663a..81df1500b 100644
--- a/app/views/users/_project_issue_detail.html.erb
+++ b/app/views/users/_project_issue_detail.html.erb
@@ -115,7 +115,7 @@
<%= format_date(activity.due_date)? format_date(activity.due_date) : "--" %>
- 目标版本 :
+ <%=l(:milestone)%> :
<%= (activity.fixed_version ? link_to_user_version(activity.fixed_version) : "--") %>
diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml
index 3d5c26d45..1d44cffba 100644
--- a/config/locales/projects/zh.yml
+++ b/config/locales/projects/zh.yml
@@ -236,6 +236,7 @@ zh:
# 自定义查询> 过滤器类别
field_status: 状态
field_fixed_version: 目标版本
+ milestone: 里程碑
field_assigned_to_role: 角色的成员
field_category: 类别
field_created_on: 创建于
From d2d0c263d7b3092fc4766234b7aa9f966e7f9477 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Tue, 27 Sep 2016 12:08:03 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AEissue?=
=?UTF-8?q?=E5=AF=BC=E5=87=BAexcel=E7=9A=84=E6=97=B6=E9=97=B4=E8=BE=93?=
=?UTF-8?q?=E5=87=BA=E6=A0=BC=E5=BC=8F=E5=8F=8A=E7=9B=AE=E6=A0=87=E7=89=88?=
=?UTF-8?q?=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/helpers/application_helper.rb | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 95125cd11..8563f6f02 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -102,7 +102,7 @@ module ApplicationHelper
sheet1 = book.create_worksheet :name => "issues"
blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10
sheet1.row(0).default_format = blue
- sheet1.row(0).concat([l(:issue_xls_id),l(:issue_xls_tracker_id),l(:issue_xls_title),l(:issue_xls_description),l(:issue_xls_status),l(:issue_xls_assign),l(:issue_xls_priority),l(:issue_xls_author),l(:issue_xls_created_at),l(:issue_xls_version),l(:issue_xls_start),l(:issue_xls_due),l(:issue_xls_ratio)])
+ sheet1.row(0).concat([l(:issue_xls_id),l(:issue_xls_tracker_id),l(:issue_xls_title),l(:issue_xls_description),l(:issue_xls_status),l(:issue_xls_assign),l(:issue_xls_priority),l(:issue_xls_author),l(:issue_xls_created_at),l(:milestone),l(:issue_xls_start),l(:issue_xls_due),l(:issue_xls_ratio)])
count_row = 1
issues.each do |issue|
sheet1[count_row,0] = issue.id
@@ -113,10 +113,10 @@ module ApplicationHelper
sheet1[count_row,5] = issue.assigned_to.try(:show_name)
sheet1[count_row,6] = issue_priority_change(issue.priority_id)
sheet1[count_row,7] = issue.author.show_name
- sheet1[count_row,8] = issue.created_on
+ sheet1[count_row,8] = issue.created_on.nil? ? issue.created_on : issue.created_on.strftime('%Y-%m-%d %H:%M:%S')
sheet1[count_row,9] = issue.fixed_version.try(:name)
- sheet1[count_row,10] = issue.start_date
- sheet1[count_row,11] = issue.due_date
+ sheet1[count_row,10] = issue.start_date.nil? ? issue.start_date : issue.start_date.strftime('%Y-%m-%d')
+ sheet1[count_row,11] = issue.due_date.nil? ? issue.due_date : issue.due_date.strftime('%Y-%m-%d')
sheet1[count_row,12] = issue_ratio_change(issue.done_ratio, issue.status_id)
count_row += 1
end