From f9cecbee5c3d64358607fcf3291118907ecd1136 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 2 Jul 2015 09:20:27 +0800 Subject: [PATCH 01/22] =?UTF-8?q?=E7=BC=BA=E9=99=B7=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=AD=E5=9B=9E=E5=A4=8D=E5=92=8C=E7=95=99=E8=A8=80=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/_edit.html.erb | 2 +- config/locales/projects/zh.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/issues/_edit.html.erb b/app/views/issues/_edit.html.erb index e4c1290aa..8ae40623a 100644 --- a/app/views/issues/_edit.html.erb +++ b/app/views/issues/_edit.html.erb @@ -20,7 +20,7 @@ <%= render :partial => 'history', :locals => {:issue => @issue, :journals => @journals} %> <% end %> -
回复 +
<%= l(:label_project_issue_feedback) %> <%= f.text_area :notes, :style => "width:99%;", :rows => "5", :no_label => true %>
diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml index 5bf8957bf..92e3cdc28 100644 --- a/config/locales/projects/zh.yml +++ b/config/locales/projects/zh.yml @@ -399,6 +399,7 @@ zh: label_issue_number: issue的数量 label_issue_journal_number: issue的留言数量 label_project_mail_feedback: 项目留言 + label_project_issue_feedback: 留言 label_news_score: 新闻得分 label_new_number: 新闻的数量 From faf019b326d9bc4a4da6abb4b91fe6a4b525f0d9 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 2 Jul 2015 14:32:06 +0800 Subject: [PATCH 02/22] =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=90=8E=E7=BB=99=E5=87=BA=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/create.js.erb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/files/create.js.erb b/app/views/files/create.js.erb index 87bf5b864..2d99941dd 100644 --- a/app/views/files/create.js.erb +++ b/app/views/files/create.js.erb @@ -21,9 +21,13 @@ $("#attachments_fields").children().remove(); $("#upload_file_count").text("未上传文件"); $('#upload_file_div').slideToggle('slow'); - <% if @project%> + <% if @project %> closeModal(); $("#resource_list").html('<%= j(render partial: "project_file_new" ,locals: {project: @project}) %>'); +// 添加文件上传成功提示, + var div = $('
文件上传成功!
'); + $("#course_list").prepend(div); + setTimeout( function(){div.remove();},30000) <%elsif @course%> closeModal(); $("#resource_list").html('<%= j(render partial: "course_file" ,locals: {course: @course}) %>'); From 288cc5397e0fa3e834ab10b1be80eeb2df160978 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 2 Jul 2015 14:39:36 +0800 Subject: [PATCH 03/22] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=8F=90=E9=86=92=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/create.js.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/files/create.js.erb b/app/views/files/create.js.erb index 2d99941dd..6abbeeb44 100644 --- a/app/views/files/create.js.erb +++ b/app/views/files/create.js.erb @@ -25,9 +25,9 @@ $('#upload_file_div').slideToggle('slow'); closeModal(); $("#resource_list").html('<%= j(render partial: "project_file_new" ,locals: {project: @project}) %>'); // 添加文件上传成功提示, - var div = $('
文件上传成功!
'); + var div = $('
文件上传成功!
'); $("#course_list").prepend(div); - setTimeout( function(){div.remove();},30000) + setTimeout( function(){div.remove();},3000) <%elsif @course%> closeModal(); $("#resource_list").html('<%= j(render partial: "course_file" ,locals: {course: @course}) %>'); From ea139128524725f950c08081f55fa72c4772aa85 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 2 Jul 2015 14:56:44 +0800 Subject: [PATCH 04/22] =?UTF-8?q?=E8=A7=A3=E5=86=B3issue=E6=8F=8F=E8=BF=B0?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E5=B7=AE=E5=88=AB=E7=82=B9=E5=87=BB=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=90=8E=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/journals/diff.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/journals/diff.html.erb b/app/views/journals/diff.html.erb index 5bc823c76..190459b71 100644 --- a/app/views/journals/diff.html.erb +++ b/app/views/journals/diff.html.erb @@ -1,5 +1,5 @@

<%=h @issue.tracker %> #<%= @issue.id %>

-

<%= authoring @journal.created_on, @journal.user, :label => :label_updated_time_by %>

+

由<%= @journal.user %> 更新于 <%= format_time @journal.created_on %>

<%= simple_format_without_paragraph @diff.to_html %> From c0b3e27c1b382a3d40e197bbc799716400ac300a Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 2 Jul 2015 15:02:05 +0800 Subject: [PATCH 05/22] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0=E6=88=90=E5=8A=9F=E6=8F=90?= =?UTF-8?q?=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/create.js.erb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/views/files/create.js.erb b/app/views/files/create.js.erb index 6abbeeb44..07d0c06f2 100644 --- a/app/views/files/create.js.erb +++ b/app/views/files/create.js.erb @@ -33,6 +33,10 @@ $('#upload_file_div').slideToggle('slow'); $("#resource_list").html('<%= j(render partial: "course_file" ,locals: {course: @course}) %>'); $("#courses_files_count_info").html("<%= @all_attachments.count%>"); $("#courses_files_count_nav").html("(<%= @all_attachments.count%>)") + // 添加文件上传成功提示, + var div = $('
文件上传成功!
'); + $("#course_list").prepend(div); + setTimeout( function(){div.remove();},3000) <% end %> <% end %> $(document).ready(img_thumbnails); From 081a0cedf7aafcb386fa48dd0aa0e9879f96a087 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 2 Jul 2015 15:16:07 +0800 Subject: [PATCH 06/22] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E5=88=97=E8=A1=A8=E4=B8=AD=E5=AF=BC=E5=87=BA?= =?UTF-8?q?atom?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/search.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/projects/search.html.erb b/app/views/projects/search.html.erb index ccffce775..fedc9f846 100644 --- a/app/views/projects/search.html.erb +++ b/app/views/projects/search.html.erb @@ -116,9 +116,9 @@

<% end %> -<% other_formats_links do |f| %> -<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %> -<% end %> +<%# other_formats_links do |f| %> +<%#= f.link_to 'Atom', :url => {:key => User.current.rss_key} %> +<%# end %> <% content_for :sidebar do %> <%= form_tag({}, :method => :get) do %> From 5a950b227abe29ead41166e2b9e143b6d8f6bbb7 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 2 Jul 2015 15:53:12 +0800 Subject: [PATCH 07/22] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E3=80=81=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E6=97=B6=E7=BB=99=E5=87=BA=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/create.js.erb | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/app/views/files/create.js.erb b/app/views/files/create.js.erb index 07d0c06f2..a7e92ca2f 100644 --- a/app/views/files/create.js.erb +++ b/app/views/files/create.js.erb @@ -25,16 +25,25 @@ $('#upload_file_div').slideToggle('slow'); closeModal(); $("#resource_list").html('<%= j(render partial: "project_file_new" ,locals: {project: @project}) %>'); // 添加文件上传成功提示, - var div = $('
文件上传成功!
'); - $("#course_list").prepend(div); - setTimeout( function(){div.remove();},3000) + <% if params[:attachments].nil? %> + var div = $('
您上传了一个空文件!
'); + <% else %> + var div = $('
文件上传成功!
'); + + <% end %> + $("#course_list").prepend(div); + setTimeout( function(){div.remove();},3000) <%elsif @course%> closeModal(); $("#resource_list").html('<%= j(render partial: "course_file" ,locals: {course: @course}) %>'); $("#courses_files_count_info").html("<%= @all_attachments.count%>"); $("#courses_files_count_nav").html("(<%= @all_attachments.count%>)") // 添加文件上传成功提示, - var div = $('
文件上传成功!
'); + <% if params[:attachments].nil? %> + var div = $('
您上传了一个空文件!
'); + <% else %> + var div = $('
文件上传成功!
'); + <% end %> $("#course_list").prepend(div); setTimeout( function(){div.remove();},3000) <% end %> From a3070e06e89bec8bd378d2b2b3aac28ab34b4831 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 2 Jul 2015 16:03:06 +0800 Subject: [PATCH 08/22] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=88=90=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E7=A9=BA=E6=96=87=E4=BB=B6=E4=B8=8D=E7=BB=99=E5=87=BA?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/create.js.erb | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/app/views/files/create.js.erb b/app/views/files/create.js.erb index a7e92ca2f..a1c278a7a 100644 --- a/app/views/files/create.js.erb +++ b/app/views/files/create.js.erb @@ -24,28 +24,23 @@ $('#upload_file_div').slideToggle('slow'); <% if @project %> closeModal(); $("#resource_list").html('<%= j(render partial: "project_file_new" ,locals: {project: @project}) %>'); -// 添加文件上传成功提示, - <% if params[:attachments].nil? %> - var div = $('
您上传了一个空文件!
'); - <% else %> +// 添加文件上传成功提示 + <% unless params[:attachments].nil? %> var div = $('
文件上传成功!
'); - - <% end %> $("#course_list").prepend(div); setTimeout( function(){div.remove();},3000) + <% end %> <%elsif @course%> closeModal(); $("#resource_list").html('<%= j(render partial: "course_file" ,locals: {course: @course}) %>'); $("#courses_files_count_info").html("<%= @all_attachments.count%>"); $("#courses_files_count_nav").html("(<%= @all_attachments.count%>)") // 添加文件上传成功提示, - <% if params[:attachments].nil? %> - var div = $('
您上传了一个空文件!
'); - <% else %> + <% unless params[:attachments].nil? %> var div = $('
文件上传成功!
'); + $("#course_list").prepend(div); + setTimeout( function(){div.remove();},3000) <% end %> - $("#course_list").prepend(div); - setTimeout( function(){div.remove();},3000) <% end %> <% end %> $(document).ready(img_thumbnails); From def0e892af837734af40624cbb3a71c7aa63d585 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 2 Jul 2015 16:38:28 +0800 Subject: [PATCH 09/22] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=85=AC=E5=85=B1?= =?UTF-8?q?=E8=B4=B4=E5=90=A7=E5=8F=91=E5=B8=83=E5=86=85=E5=AE=B9=E8=BF=87?= =?UTF-8?q?=E9=95=BF500=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/memo.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/memo.rb b/app/models/memo.rb index 2831effe3..e0abaa19f 100644 --- a/app/models/memo.rb +++ b/app/models/memo.rb @@ -9,7 +9,7 @@ class Memo < ActiveRecord::Base # 若是主题帖,则内容可以是空 #validates :content, presence: true, if: Proc.new{|o| !o.parent_id.nil? } validates_length_of :subject, maximum: 50 - #validates_length_of :content, maximum: 3072 + validates_length_of :content, maximum: 5000 validate :cannot_reply_to_locked_topic, :on => :create acts_as_tree :counter_cache => :replies_count, :order => "#{Memo.table_name}.created_at ASC" From f3e71450ee62064cc1c0348e3b6fd8235e656ba2 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 2 Jul 2015 17:20:09 +0800 Subject: [PATCH 10/22] =?UTF-8?q?=E4=BF=AE=E6=94=B9issue=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=9C=A8IE=E6=B5=8F=E8=A7=88=E5=99=A8=E4=B8=8B=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/_list.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index 616e205c4..0fcb37021 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -11,7 +11,7 @@
<%= link_to issue.author.name, user_path(issue.author), :class => "problem_name c_orange fl" %> <%= l(:label_post_on_issue) %>(<%= "#{raw column_content[2]}" %>): -
+
<%=link_to "#{column_content[4]}#{get_issue_type(column_content[1])[1]}".html_safe, issue_path(issue.id), :class => "problem_tit_a break_word",:target => "_blank" %>
From b16e19096f7d0e6725de18948f39a527e2fd0091 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 3 Jul 2015 10:25:21 +0800 Subject: [PATCH 11/22] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=B0=E9=97=BB?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/news/_course_news.html.erb | 1 + app/views/news/_project_news.html.erb | 3 ++- public/stylesheets/courses.css | 1 + public/stylesheets/project.css | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/news/_course_news.html.erb b/app/views/news/_course_news.html.erb index 28eb5c805..4d6328c48 100644 --- a/app/views/news/_course_news.html.erb +++ b/app/views/news/_course_news.html.erb @@ -34,6 +34,7 @@ <%= l(:label_release_news) %>: <%= link_to h(news.title), news_path(news),:class => 'problem_tit fl fb c_dblue' %> + <%=link_to "#{news.comments.all.count}".html_safe, news_path(news.id), :class => "pro_mes_w" %>