diff --git a/app/models/comment.rb b/app/models/comment.rb
index bdb642d3c..1f6655bc4 100644
--- a/app/models/comment.rb
+++ b/app/models/comment.rb
@@ -27,7 +27,7 @@ class Comment < ActiveRecord::Base
def send_mail
if self.commented.is_a?(News) && Setting.notified_events.include?('news_comment_added')
- Mailer.run.news_comment_added(self)
+ Mailer.news_comment_added(self)
end
end
after_destroy :delete_kindeditor_assets
diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb
index 58960df4c..4519b6047 100644
--- a/app/views/issues/_list.html.erb
+++ b/app/views/issues/_list.html.erb
@@ -55,9 +55,9 @@
<%= l(:label_updated_time_on, format_date(issue.updated_on)).html_safe %>
<% end -%>
diff --git a/app/views/issues/new.html.erb b/app/views/issues/new.html.erb
index 51ebd139e..0ac338321 100644
--- a/app/views/issues/new.html.erb
+++ b/app/views/issues/new.html.erb
@@ -1,5 +1,5 @@
-
问题跟踪
+ <%= l(:label_issue_new) %>
<%= call_hook(:view_issues_new_top, {:issue => @issue}) %>
diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb
index 38afc672d..1f782341d 100644
--- a/app/views/issues/show.html.erb
+++ b/app/views/issues/show.html.erb
@@ -1,5 +1,5 @@
-
<%= l(:label_issue_plural) %>
+ <%= l(:label_issue_edit) %>
<%# html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>
<% html_title "#{@issue.tracker.name} #{@issue.source_from}'#'#{@issue.project_index}: #{@issue.subject}" %>
diff --git a/app/views/news/_project_news.html.erb b/app/views/news/_project_news.html.erb
index 7131896ca..d6bf0bf95 100644
--- a/app/views/news/_project_news.html.erb
+++ b/app/views/news/_project_news.html.erb
@@ -133,7 +133,7 @@
<%= l :label_update_time %>
: <%= format_time(news.created_on) %> |
- <%= link_to l(:label_project_newother), news_path(news) %><%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count >= 0 %> |
+ <%= link_to l(:label_project_newother), news_path(news) if news.comments_count >0 %><%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count >= 0 %> |
diff --git a/app/views/projects/_newproject_show.html.erb b/app/views/projects/_newproject_show.html.erb
index 6d785ce6b..acacae37b 100644
--- a/app/views/projects/_newproject_show.html.erb
+++ b/app/views/projects/_newproject_show.html.erb
@@ -36,7 +36,7 @@
: <%= format_activity_day(day) %> <%= format_time(e.event_datetime, false) %>
<% if e.event_type == "issue" %>
- <%= link_to l(:label_find_all_comments), issue_path(e) %> <%= l(:label_comments_count, :count => e.journals.count) %>
+ <%= link_to l(:label_find_all_comments), issue_path(e) if e.journals.count!= 0%> <%= l(:label_comments_count, :count => e.journals.count) %>
<% end %>
diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb
index 2c56cefa3..2579b3115 100644
--- a/app/views/projects/show.html.erb
+++ b/app/views/projects/show.html.erb
@@ -76,7 +76,7 @@
<%= l :label_activity_time %>
: <%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %>
- <%= link_to l(:label_find_all_comments), issue_path(act.id) %> <%= l(:label_comments_count, :count => act.journals.count) %>
+ <%= link_to l(:label_find_all_comments), issue_path(act.id) if act.journals.count!= 0%> <%= l(:label_comments_count, :count => act.journals.count) %>
@@ -151,7 +151,7 @@
: <%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %>
- <%= link_to l(:label_find_all_comments), {:controller => 'news', :action => 'show', :id => act.id} %>
+ <%= link_to l(:label_find_all_comments), {:controller => 'news', :action => 'show', :id => act.id} if act.comments_count!= 0%>
<%= l(:label_comments_count, :count => act.comments_count) %>
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 2c5126794..055a00a82 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -302,7 +302,7 @@
:action => 'revision',
:id => act.repository.project,
:repository_id => act.repository.identifier_param,
- :rev => act.identifier} %>
+ :rev => act.identifier} if e.act.count!= 0%>
<%= l(:label_comments_count, :count => e.act.count) %>
@@ -444,7 +444,7 @@
- <%= link_to l(:label_find_all_comments), {:controller => 'issues', :action => 'show', :id => act.id} %>
+ <%= link_to l(:label_find_all_comments), {:controller => 'issues', :action => 'show', :id => act.id} if e.act.journals.count!= 0 %>
<%= l(:label_comments_count, :count => e.act.journals.count) %>
diff --git a/config/locales/commons/en.yml b/config/locales/commons/en.yml
index e4544dbeb..3c2c63654 100644
--- a/config/locales/commons/en.yml
+++ b/config/locales/commons/en.yml
@@ -190,10 +190,10 @@ en:
label_anonymous: Anonymous #作业和留言 模块
- text_are_you_sure: Are you sure? #js 提示
- text_are_you_sure_out: Are you sure to quit from this course?
- text_are_you_sure_out_group: Are you sure to quit from this group?
-
+ text_are_you_sure: "Are you sure?" #js 提示
+ text_are_you_sure_out: "Are you sure to quit from this course?"
+ text_are_you_sure_out_group: "Are you sure to quit from this group?"
+ text_are_you_sure_all: "Are you sure to delete all files?"
diff --git a/config/locales/commons/zh.yml b/config/locales/commons/zh.yml
index 1f411bdbb..dae2a9741 100644
--- a/config/locales/commons/zh.yml
+++ b/config/locales/commons/zh.yml
@@ -189,6 +189,8 @@ zh:
text_are_you_sure: 您确定要删除吗? #js 提示
text_are_you_sure_out: 你确定要退出该课程吗?
text_are_you_sure_out_group: 你确定要退出该分班吗?
+ text_are_you_sure_all: 您确定要删除所有文件吗
+
label_field_correct: 填写正确
label_title_blank: 标题不能为空
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 625c926fd..3e5fc22fe 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -402,7 +402,7 @@ en:
label_project_all: All Projects
label_project_latest: Latest projects
- label_issue_plural: Issues Tracking
+
label_issue_view_all: View all issues
label_issues_by: "Issues by %{value}"
label_issue_added: Issue added
diff --git a/config/locales/projects/en.yml b/config/locales/projects/en.yml
index 3b6af9a08..57ef221b0 100644
--- a/config/locales/projects/en.yml
+++ b/config/locales/projects/en.yml
@@ -133,7 +133,7 @@ en:
label_max_size: Maximum size
label_optional_description: Description
- label_file_count: "Uploaded successfully"
+ label_file_count: " files uploaded successfully"
#
# 项目托管平台
@@ -201,6 +201,15 @@ en:
default_priority_immediate: Immediate
field_hours: Hours
+
+
+
+
+ #问题更新
+ label_issue_edit: Tracking
+
+
+
#
# 项目托管平台
#
diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml
index aba26990f..6f952f135 100644
--- a/config/locales/projects/zh.yml
+++ b/config/locales/projects/zh.yml
@@ -139,8 +139,6 @@ zh:
label_optional_description: 可选的描述
label_file_count: "个文件已上传"
- text_are_you_sure_all: 您确定要删除所有文件吗
-
#
# 项目托管平台
@@ -239,7 +237,7 @@ zh:
#问题更新
-
+ label_issue_edit: 问题跟踪
@@ -261,6 +259,8 @@ zh:
label_post_by: 由
label_post_by_time: 添加于
label_short_reply: "回复"
+
+
#
# 项目托管平台
#
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 9997cca57..dd3b5d395 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -383,7 +383,6 @@ zh:
label_project_latest: 最近的项目
label_issue: 问题
- label_issue_plural: 问题跟踪
label_issue_view_all: 查看所有问题
label_issues_by: "按 %{value} 分组显示问题"
label_issue_added: 问题已添加
diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js
index 6bfcd05d8..2c10d28e4 100644
--- a/public/javascripts/attachments.js
+++ b/public/javascripts/attachments.js
@@ -25,8 +25,8 @@ function reload(fileSpan) {
function addFile(inputEl, file, eagerUpload) {
- if ($('#attachments_fields').children().length < 10) {
-
+ if ($('#attachments_fields').children().length < 30) {
+ deleteallfiles = $(inputEl).data('deleteAllFiles');
var attachmentId = addFile.nextAttachmentId++;
var fileSpan = $('', { 'id': 'attachments_' + attachmentId, 'class':'attachment' });
@@ -141,7 +141,7 @@ function removeFile() {
//gcm delete all file
function removeAll(){
- if(confirm($(inputEl).data('deleteAllFiles'))){
+ if(confirm(deleteallfiles)){
$(".remove-upload").removeAttr("data-confirm");
$(".remove-upload").click();
}