From 8596d594a7c6e8ca59bc2b225050f550e952cbb8 Mon Sep 17 00:00:00 2001 From: z9hang Date: Tue, 2 Sep 2014 09:57:59 +0800 Subject: [PATCH 01/16] =?UTF-8?q?js=E5=A4=B1=E5=8E=BB=E7=84=A6=E7=82=B9?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E4=B8=8E=E7=82=B9=E5=87=BB=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E5=86=B2=E7=AA=81=E9=97=AE=E9=A2=98=EF=BC=8C=E4=BD=BF=E7=94=A8?= =?UTF-8?q?onmouseover=E4=BA=8B=E4=BB=B6=E8=8E=B7=E5=8F=96=E7=84=A6?= =?UTF-8?q?=E7=82=B9=E9=9A=94=E5=BC=80=E4=B8=A4=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/attachments/_form.html.erb | 2 +- app/views/news/_course_show.html.erb | 2 +- app/views/news/_project_news.html.erb | 8 +++++++- app/views/news/_project_show.html.erb | 3 ++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/app/views/attachments/_form.html.erb b/app/views/attachments/_form.html.erb index bb043cd70..81dc5d939 100644 --- a/app/views/attachments/_form.html.erb +++ b/app/views/attachments/_form.html.erb @@ -27,7 +27,7 @@ <%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %> -<%= button_tag "浏览", :type=>"button", :onclick=>"_file.click()" %> +<%= button_tag "浏览", :type=>"button", :onclick=>"_file.click()",:onmouseover => 'this.focus()' %> <%= file_field_tag 'attachments[dummy][file]', :id => '_file', :class => 'file_selector', diff --git a/app/views/news/_course_show.html.erb b/app/views/news/_course_show.html.erb index b86cea93f..03731373c 100644 --- a/app/views/news/_course_show.html.erb +++ b/app/views/news/_course_show.html.erb @@ -69,7 +69,7 @@ :html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %> <%= render :partial => 'course_form', :locals => { :f => f, :is_new => false } %> <%#= submit_tag l(:button_save) %> - <%= link_to l(:button_save), "#", :onclick => 'submitNews();',:class => 'whiteButton m3p10' %> + <%= link_to l(:button_save), "#", :onclick => 'submitNews();',:onmouseover => 'this.focus()',:class => 'whiteButton m3p10' %> <%= preview_link preview_news_path(:course_id => @course, :id => @news), 'news-form',target='preview',{:class => 'whiteButton m3p10'} %> | <%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;',:class => 'whiteButton m3p10' %> <% end %> diff --git a/app/views/news/_project_news.html.erb b/app/views/news/_project_news.html.erb index e9a912c5c..35f76dfaa 100644 --- a/app/views/news/_project_news.html.erb +++ b/app/views/news/_project_news.html.erb @@ -49,6 +49,12 @@ $("#news-form").submit(); } } + + function submitFocus(obj) + { + $(obj).focus(); + } + <% @@ -76,7 +82,7 @@ :html => {:id => 'news-form', :multipart => true} do |f| %> <%= render :partial => 'news/form', :locals => {:f => f} %> <%#= submit_tag l(:button_create), :class => 'whiteButton m3p10 h30', :name => nil %> - <%= link_to l(:button_create), "#", :onclick => 'submitNews();', :class => 'whiteButton m3p10' %> + <%= link_to l(:button_create), "#", :onclick => 'submitNews();',:onmouseover => 'submitFocus(this);', :class => 'whiteButton m3p10' %> | <%= preview_link preview_news_path(:project_id => @project), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %> | diff --git a/app/views/news/_project_show.html.erb b/app/views/news/_project_show.html.erb index ecae672b6..66580ddd5 100644 --- a/app/views/news/_project_show.html.erb +++ b/app/views/news/_project_show.html.erb @@ -49,6 +49,7 @@ $("#news-form").submit(); } } +
<%= watcher_link(@news, User.current) %> @@ -68,7 +69,7 @@ :html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %> <%= render :partial => 'form', :locals => { :f => f } %> <%#= submit_tag l(:button_save) %> - <%= link_to l(:button_save), "#", :onclick => 'submitNews();',:class => 'whiteButton m3p10' %> + <%= link_to l(:button_save), "#", :onclick => 'submitNews();',:onmouseover => 'this.focus()',:class => 'whiteButton m3p10' %> <%= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form',target='preview',{:class => 'whiteButton m3p10'} %> | <%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;',:class => 'whiteButton m3p10' %> <% end %> From a97511750cb28ac3750370f5a2b08bbdf2229db8 Mon Sep 17 00:00:00 2001 From: z9hang Date: Tue, 2 Sep 2014 10:42:04 +0800 Subject: [PATCH 02/16] =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=AF=BC=E8=88=AA=E6=A0=8F=E4=B8=A2=E5=A4=B1?= =?UTF-8?q?=EF=BC=9A=E5=8E=9F=E5=9B=A0layout=E6=8C=87=E5=AE=9A=E9=94=99?= =?UTF-8?q?=E8=AF=AF=EF=BC=8C=E8=A7=A3=E5=86=B3=E6=96=B9=E6=B3=95=EF=BC=9A?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index c0561bd1c..943718392 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -836,7 +836,7 @@ class ProjectsController < ApplicationController format.api { render_api_ok } end else - render :layout => "base" + render :layout => "project_base" end # hide project in layout @project = nil From 4c58b6a50c60b6731a707ba3d264c454f6c7226f Mon Sep 17 00:00:00 2001 From: z9hang Date: Tue, 2 Sep 2014 11:02:16 +0800 Subject: [PATCH 03/16] =?UTF-8?q?1=E3=80=81=E9=A1=B9=E7=9B=AE=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=BA=93=E4=B8=AD=E6=9F=A5=E7=9C=8B=E4=BF=AE=E8=AE=A2?= =?UTF-8?q?=E5=AF=BC=E8=88=AA=E6=A0=8F=E4=B8=A2=E5=A4=B1=EF=BC=8C=E5=8E=9F?= =?UTF-8?q?=E5=9B=A0=E6=9C=AA=E6=8C=87=E5=AE=9Alayout=EF=BC=8C=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=EF=BC=9A=E6=8C=87=E5=AE=9Alaout=E3=80=822=E3=80=81?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=89=88=E6=9C=AC=E5=BA=93=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E4=B8=AD=E6=9C=89=E4=B8=A4=E9=A1=B5=E9=9D=A2=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E8=8B=B1=E6=96=87=E7=9A=84ok=E6=8C=89=E9=92=AE=EF=BC=8C?= =?UTF-8?q?=E5=B0=86=E5=85=B6=E9=80=9A=E8=BF=87=E5=9B=BD=E9=99=85=E5=8C=96?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E4=B8=AD=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 2 +- app/views/repositories/revision.html.erb | 2 +- app/views/repositories/revisions.html.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index ef4c9b061..a705d6934 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -372,7 +372,7 @@ class RepositoriesController < ApplicationController def revision respond_to do |format| - format.html + format.html{render :layout => 'project_base'} format.js {render :layout => false} end end diff --git a/app/views/repositories/revision.html.erb b/app/views/repositories/revision.html.erb index 0de0cfee7..7b4934bfa 100644 --- a/app/views/repositories/revision.html.erb +++ b/app/views/repositories/revision.html.erb @@ -20,7 +20,7 @@ :rev => nil}, :method => :get) do %> <%= text_field_tag 'rev', @rev, :size => 8 %> - <%= submit_tag 'OK', :name => nil %> + <%= submit_tag l(:label_button_ok), :name => nil %> <% end %>
diff --git a/app/views/repositories/revisions.html.erb b/app/views/repositories/revisions.html.erb index e89deeb7d..321ff72b2 100644 --- a/app/views/repositories/revisions.html.erb +++ b/app/views/repositories/revisions.html.erb @@ -5,7 +5,7 @@ :method => :get ) do %> <%= l(:label_revision) %>: <%= text_field_tag 'rev', nil, :size => 8 %> - <%= submit_tag 'OK' %> + <%= submit_tag l(:label_button_ok) %> <% end %> From c2020a9535a4e3288f5e16866bccf1193d9331d1 Mon Sep 17 00:00:00 2001 From: z9hang Date: Wed, 3 Sep 2014 16:13:50 +0800 Subject: [PATCH 04/16] =?UTF-8?q?=20#1097=20=E8=AE=A8=E8=AE=BA=E5=8C=BA?= =?UTF-8?q?=E7=9A=84=E5=9B=9E=E5=B8=96=E5=BC=95=E7=94=A8=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E5=92=8C=E7=BC=BA=E9=99=B7=E7=AD=89=E6=A8=A1=E5=9D=97=E4=B8=80?= =?UTF-8?q?=E8=87=B4=20=E8=A7=A3=E5=86=B3=EF=BC=9A=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E3=80=81=E9=A1=B9=E7=9B=AE=E8=AE=A8=E8=AE=BA?= =?UTF-8?q?=E5=8C=BA=E5=BC=95=E7=94=A8=E7=9A=84=E8=A7=A3=E6=9E=90=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=E4=B8=8E=E7=BC=BA=E9=99=B7=E4=B8=80=E8=87=B4=E7=94=B1?= =?UTF-8?q?=E4=BD=BF=E7=94=A8
=E6=94=B9=E5=9B=9E=E8=87=B3?= =?UTF-8?q?=E2=80=9C>=20>=E2=80=9D,=E4=BB=A5=E4=B8=8A=E4=B8=BA=E4=B8=A4?= =?UTF-8?q?=E7=A7=8D=E4=B8=8D=E5=90=8C=E7=BC=96=E8=BE=91=E5=99=A8=E7=9A=84?= =?UTF-8?q?=E8=A7=A3=E6=9E=90=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/messages_controller.rb | 20 ++++++++--------- app/views/messages/_course_show.html.erb | 2 +- app/views/messages/_form.html.erb | 1 + app/views/messages/_project_show.html.erb | 2 +- db/schema.rb | 26 +++-------------------- 5 files changed, 16 insertions(+), 35 deletions(-) diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 44496c3d7..e1af9ca34 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -156,17 +156,17 @@ class MessagesController < ApplicationController @subject = @message.subject @subject = "RE: #{@subject}" unless @subject.starts_with?('RE:') - #@content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}\n> " - #@temp = Message.new - ##@temp.content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}> " - #@content << @message.content.to_s.strip.gsub(%r{
((.|\s)*?)
}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n" - #@content_html = textilizable(@content) - #@temp.content = @content_html - @content = "#{ll(Setting.default_language, :text_user_wrote, @message.author)}
  " - @content << @message.content.to_s.strip.gsub(%r{
((.|\s)*?)
}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n") + "
\n\n
" - @content = "
" << @content + @content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}\n> " @temp = Message.new - @temp.content = @content + #@temp.content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}> " + @content << @message.content.to_s.strip.gsub(%r{
((.|\s)*?)
}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n" + @content_html = textilizable(@content) + @temp.content = @content_html + #@content = "#{ll(Setting.default_language, :text_user_wrote, @message.author)}
  " + #@content << @message.content.to_s.strip.gsub(%r{
((.|\s)*?)
}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n") + "
\n\n
" + #@content = "
" << @content + #@temp = Message.new + #@temp.content = @content end diff --git a/app/views/messages/_course_show.html.erb b/app/views/messages/_course_show.html.erb index aba16d620..a11107a9b 100644 --- a/app/views/messages/_course_show.html.erb +++ b/app/views/messages/_course_show.html.erb @@ -157,7 +157,7 @@
- <%= textAreailizable message,:content,:attachments => message.attachments %> + <%= textilizable message,:content,:attachments => message.attachments %> <%#= message.content.html_safe %>
<%= link_to_attachments message, :author => false %> diff --git a/app/views/messages/_form.html.erb b/app/views/messages/_form.html.erb index 047f7d660..c6e5bd686 100644 --- a/app/views/messages/_form.html.erb +++ b/app/views/messages/_form.html.erb @@ -34,6 +34,7 @@

<% end %>

+

<%= text_area :quote,:quote,:style => 'display:none' %>

diff --git a/app/views/messages/_project_show.html.erb b/app/views/messages/_project_show.html.erb index ddb23fc95..eff5fa160 100644 --- a/app/views/messages/_project_show.html.erb +++ b/app/views/messages/_project_show.html.erb @@ -163,7 +163,7 @@

- <%= textAreailizable message,:content,:attachments => message.attachments %> + <%= textilizable message,:content,:attachments => message.attachments %> <%#= message.content.html_safe %>
<%= link_to_attachments message, :author => false %> diff --git a/db/schema.rb b/db/schema.rb index 1307dd913..db51ddd37 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -437,14 +437,14 @@ ActiveRecord::Schema.define(:version => 20140826072838) do t.string "web_title" t.string "title" t.text "description" + t.string "page_type" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false - t.string "page_type" t.integer "sort_type" - t.integer "show_course", :default => 1 - t.integer "show_contest", :default => 1 t.integer "image_width", :default => 107 t.integer "image_height", :default => 63 + t.integer "show_course", :default => 1 + t.integer "show_contest", :default => 1 end create_table "forums", :force => true do |t| @@ -458,26 +458,6 @@ ActiveRecord::Schema.define(:version => 20140826072838) do t.datetime "updated_at", :null => false end - create_table "gitlab_projects", :force => true do |t| - t.integer "gitlab_project_id" - t.integer "project_id" - t.string "repository_url" - t.string "web_url" - t.string "localfile_url" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "gitlab_users", :force => true do |t| - t.integer "gitlab_user_id" - t.integer "user_id" - t.string "email" - t.string "password" - t.string "login", :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - create_table "groups_users", :id => false, :force => true do |t| t.integer "group_id", :null => false t.integer "user_id", :null => false From ae40e1341a25d799e80aec62c0d31668a8a5974d Mon Sep 17 00:00:00 2001 From: z9hang Date: Wed, 3 Sep 2014 17:17:45 +0800 Subject: [PATCH 05/16] =?UTF-8?q?#1136=20=E4=BB=A3=E7=A0=81=E8=BF=87?= =?UTF-8?q?=E9=95=BF=EF=BC=8C=E6=8D=A2=E8=A1=8C=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/attachments_controller.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index db77283cc..d87bc6d2c 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -180,9 +180,10 @@ class AttachmentsController < ApplicationController end respond_to do |format| - # modify by nwb if !@attachment.container.nil? && - (@attachment.container.is_a?(Course) || ((@attachment.container.has_attribute?(:course) ||@attachment.container.has_attribute?(:course_id) ) && @attachment.container.course ) || ((@attachment.container.has_attribute?(:board) || @attachment.container.has_attribute?(:board_id)) && @attachment.container.board && @attachment.container.board.course ) ) + (@attachment.container.is_a?(Course) || ((@attachment.container.has_attribute?(:course) || @attachment.container.has_attribute?(:course_id) ) && + @attachment.container.course ) || ((@attachment.container.has_attribute?(:board) || @attachment.container.has_attribute?(:board_id)) && + @attachment.container.board && @attachment.container.board.course ) ) if @attachment.container.is_a?(News) format.html { redirect_to_referer_or news_path(@attachment.container) } elsif @attachment.container.is_a?(Message) From f13eb73a72eb849075a901c64bf290b3b62901a8 Mon Sep 17 00:00:00 2001 From: z9hang Date: Thu, 4 Sep 2014 09:46:24 +0800 Subject: [PATCH 06/16] =?UTF-8?q?label=E5=86=99=E9=94=99=E7=BA=A0=E6=AD=A3?= =?UTF-8?q?=EF=BC=8C=E4=B8=80=E4=B8=AA=E5=86=99=E6=AD=BB=E7=9A=84=E4=B8=BB?= =?UTF-8?q?=E9=A1=B5=E9=93=BE=E6=8E=A5=E7=BA=A0=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/projects_helper.rb | 4 ++-- app/views/courses/_course.html.erb | 2 +- .../_course_sort_by_attachtypel.html.erb | 2 +- app/views/files/_sort_by_attachtypel.html.erb | 2 +- app/views/forums/_form.html.erb | 2 +- app/views/forums/show.html.erb | 2 +- app/views/users/_score_new_index.html.erb | 2 +- app/views/welcome/_course_list.html.erb | 2 +- app/views/welcome/course.html.erb | 4 ++-- app/views/welcome/index.html.erb | 2 +- config/locales/en.yml | 13 +++++++++--- config/locales/zh.yml | 20 +++++++++---------- public/file_not_found.html.erb | 6 +++--- 13 files changed, 35 insertions(+), 28 deletions(-) diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 6849ba83d..b0f54a5f0 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -176,14 +176,14 @@ module ProjectsHelper #Modified by young if (project.try(:project_type) == Project::ProjectType_course ) unless project.is_public == 1 - s = "#{l(:lable_private)}".html_safe + s = "#{l(:label_private)}".html_safe else s = "".html_safe end s += link_to_project(project, {}, :class => "#{project.css_classes} #{User.current.member_of?(project) ? 'my-project' : nil}").html_safe else unless project.is_public - s = "#{l(:lable_private)}".html_safe + s = "#{l(:label_private)}".html_safe else s = "".html_safe end diff --git a/app/views/courses/_course.html.erb b/app/views/courses/_course.html.erb index 12eec558f..239f2da26 100644 --- a/app/views/courses/_course.html.erb +++ b/app/views/courses/_course.html.erb @@ -11,7 +11,7 @@

<%= content_tag('span',"#{l(:label_bid_show_course_name)}:", :class => "course-font")%> <% unless @course.is_public == 1 %> - <%= l(:lable_private) %> + <%= l(:label_private) %> <% end %> <%= content_tag('span', link_to("#{@course.name}", course_path(@course), :class => "info"))%>

diff --git a/app/views/files/_course_sort_by_attachtypel.html.erb b/app/views/files/_course_sort_by_attachtypel.html.erb index c13d76620..5a0cdba02 100644 --- a/app/views/files/_course_sort_by_attachtypel.html.erb +++ b/app/views/files/_course_sort_by_attachtypel.html.erb @@ -37,7 +37,7 @@ <%= number_to_human_size(file.filesize) %> - <%= file.attachmentstype.nil? ? l(:lable_unknow_type):file.attachmentstype.typeName %> + <%= file.attachmentstype.nil? ? l(:label_unknow_type):file.attachmentstype.typeName %>   <%= render :partial => 'attachments/course_type_edit', :locals => {:attachmenttypes => attachmenttypes, diff --git a/app/views/files/_sort_by_attachtypel.html.erb b/app/views/files/_sort_by_attachtypel.html.erb index eb7ffffec..6c6e11791 100644 --- a/app/views/files/_sort_by_attachtypel.html.erb +++ b/app/views/files/_sort_by_attachtypel.html.erb @@ -37,7 +37,7 @@ <%= number_to_human_size(file.filesize) %> - <%= file.attachmentstype.nil? ? l(:lable_unknow_type):file.attachmentstype.typeName %> + <%= file.attachmentstype.nil? ? l(:label_unknow_type):file.attachmentstype.typeName %>   <%= render :partial => 'attachments/type_edit', :locals => {:attachmenttypes => attachmenttypes, diff --git a/app/views/forums/_form.html.erb b/app/views/forums/_form.html.erb index 993563954..c253e8d78 100644 --- a/app/views/forums/_form.html.erb +++ b/app/views/forums/_form.html.erb @@ -21,7 +21,7 @@ <%= f.text_area :description, :required => true, :id => 'editor01' %> -

(<%= l(:lable_forums_max_length) %>)

+

(<%= l(:label_forums_max_length) %>)

<%= submit_tag l(:button_submit) %> diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index 48913a38d..1622bbe02 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -18,7 +18,7 @@

<%= f.text_field :subject, :required => true%>

<%= f.text_area :content, :required => true, :id => 'editor02' %>

-

(<%= l(:lable_memos_max_length) %>)

+

(<%= l(:label_memos_max_length) %>)

<%= l(:label_attachment_plural) %>
diff --git a/app/views/users/_score_new_index.html.erb b/app/views/users/_score_new_index.html.erb index b79a57e71..d0647d8e3 100644 --- a/app/views/users/_score_new_index.html.erb +++ b/app/views/users/_score_new_index.html.erb @@ -7,7 +7,7 @@

= <%= format("%.2f" ,collaboration(option_num)).to_i %> + <%= format("%.2f" , influence(option_num) ).to_i %> + <%= "(" if skill(option_num) < 0 %> <%= format("%.2f" , skill(option_num)).to_i %> <%= ")" if skill(option_num) < 0 %> + <%= format("%.2f" , active(option_num)).to_i %>
<% if (format("%.2f" ,collaboration(option_num)).to_i + format("%.2f" , influence(option_num) ).to_i + format("%.2f" , skill(option_num)).to_i + format("%.2f" , active(option_num)).to_i) < 0 %> -
<%= l(:lable_score_less_than_zero) %>
+
<%= l(:label_score_less_than_zero) %>
<% else %>
= <%= format("%.2f" ,option_num.total_score).to_i %>
<% end %> diff --git a/app/views/welcome/_course_list.html.erb b/app/views/welcome/_course_list.html.erb index 0dcf1085a..b6dac9022 100644 --- a/app/views/welcome/_course_list.html.erb +++ b/app/views/welcome/_course_list.html.erb @@ -7,7 +7,7 @@
<% unless course.is_public == 1 %> - <%= l(:lable_private) %> + <%= l(:label_private) %> <% end %> <%= link_to(course.name.truncate(30, omission: '...')+":", course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %> diff --git a/app/views/welcome/course.html.erb b/app/views/welcome/course.html.erb index c46df7777..e25ef5665 100644 --- a/app/views/welcome/course.html.erb +++ b/app/views/welcome/course.html.erb @@ -92,7 +92,7 @@ <% if User.current.logged? %>
  • - <%= render :partial => 'no_course_title', :locals => {:course_title => l(:lable_school_no_course)} %> + <%= render :partial => 'no_course_title', :locals => {:course_title => l(:label_school_no_course)} %>
  • <%= render :partial => 'course_list', :locals => {:course_list => find_all_new_hot_course(9, @school_id)} %> <% else %> @@ -115,7 +115,7 @@ <%= render :partial => 'course_list', :locals => {:course_list => school_course} %> <% if school_course.count < 10 %>
  • - <%= render :partial => 'no_course_title', :locals => {:course_title => l(:lable_school_less_course)} %> + <%= render :partial => 'no_course_title', :locals => {:course_title => l(:label_school_less_course)} %>
  • <%= render :partial => 'course_list', :locals => {:course_list => find_all_new_hot_course(9 - school_course.count, @school_id)} %> <% end %> diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index fd4a1637e..b73f0970f 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -73,7 +73,7 @@
    <% unless project.is_public %> - <%= l(:lable_private) %> + <%= l(:label_private) %> <% end %> <%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}" )%> (<%= link_to "#{projectCount(project)}人", project_member_path(project) ,:course =>'0' %>) diff --git a/config/locales/en.yml b/config/locales/en.yml index ee7e76ed1..987acabc4 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1807,7 +1807,14 @@ en: label_company_name: Company Name notice_account_invalid_creditentials_new: You have not to the mailbox activation - lable_unknow_type: Unknow type - lable_score_less_than_zero: Score less than 0, revised to 0 + label_school_no_course: The school did not offer any courses, you can view other school curriculum + label_school_less_course: The school offers courses in less, you can view other school curriculum + label_file_not_found: Sorry, the file can't be downloaded now! + label_goto_homepage: Return to the home page + label_trustie_team: The Trustie development team + label_memos_max_length: The content of the post up to 65535 characters in length + label_forums_max_length: Post Bar describing the maximum length of 65535 characters + label_unknow_type: Unknow type + label_score_less_than_zero: Score less than 0, revised to 0 review_assignments: review assignments - lable_private: private \ No newline at end of file + label_private: private \ No newline at end of file diff --git a/config/locales/zh.yml b/config/locales/zh.yml index a3db5964b..874c9108a 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -2106,16 +2106,16 @@ zh: modal_valid_passing: 可以使用 label_bug: 漏洞 - lable_school_no_course: 该学校未开设任何课程,您可以查看其他学校课程 - lable_school_less_course: 该学校开设课程较少,您可以查看其他学校课程 + label_school_no_course: 该学校未开设任何课程,您可以查看其他学校课程 + label_school_less_course: 该学校开设课程较少,您可以查看其他学校课程 - lable_file_not_found: 对不起,该文件现在不能下载! - lable_goto_homepage: 返回主页 - lable_trustie_team: Trustie开发团队 + label_file_not_found: 对不起,该文件现在不能下载! + label_goto_homepage: 返回主页 + label_trustie_team: Trustie开发团队 - lable_memos_max_length: 帖子内容最大长度为65535个字符 - lable_forums_max_length: 贴吧描述最大长度为65535个字符 - lable_unknow_type: 未知类型 - lable_score_less_than_zero: 得分小于0,修正为0 + label_memos_max_length: 帖子内容最大长度为65535个字符 + label_forums_max_length: 贴吧描述最大长度为65535个字符 + label_unknow_type: 未知类型 + label_score_less_than_zero: 得分小于0,修正为0 review_assignments: 评审任务 - lable_private: 私有 + label_private: 私有 diff --git a/public/file_not_found.html.erb b/public/file_not_found.html.erb index b3b45203a..8cd5e7af6 100644 --- a/public/file_not_found.html.erb +++ b/public/file_not_found.html.erb @@ -26,12 +26,12 @@
    -

    <%= l(:lable_file_not_found) %>

    -

    <%= l(:lable_goto_homepage) %>

    +

    <%= l(:label_file_not_found) %>

    +

    <%= link_to l(:label_goto_homepage),{:controller=>'welcome',:action=>'index',:host=>Setting.host_name} %>

    -

    <%= l(:lable_trustie_team) %>

    +

    <%= l(:label_trustie_team) %>

    <%= link_to_attachment @attachment, :text => l(:button_download), :download => true -%> (<%= number_to_human_size @attachment.filesize %>)    - - <% if @attachment!=nil &&(@attachment.container_type == 'Document' || @attachment.container_type == 'WikiPage')&&User.current.allowed_to?({:controller => 'code_review', :action => 'update_diff_view'}, @attachment.project) %> + <% if @attachment!=nil &&(@attachment.container_type == 'Document' || @attachment.container_type == 'WikiPage') && + User.current.allowed_to?({:controller => 'code_review', :action => 'update_diff_view'}, @attachment.project) %> <%= l(:review_assignments)+":" %><%= link = link_to(l(:button_add), {:controller => 'code_review', :action => 'assign', :action_type => 'attachment', :id=>@attachment.project, From 6ec1a7ce058636195576c41ffaa06fa01a5d596a Mon Sep 17 00:00:00 2001 From: z9hang Date: Thu, 4 Sep 2014 11:39:04 +0800 Subject: [PATCH 09/16] =?UTF-8?q?=E7=BC=BA=E9=99=B7=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E6=9F=A5=E8=AF=A2=E5=B8=83=E5=B1=80=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E4=B8=8B=E6=8B=89=E6=A1=86=E5=A4=AA=E9=95=BF=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=EF=BC=8C=E7=BC=A9=E5=B0=8F=E5=85=B6=E6=9C=80=E5=A4=A7?= =?UTF-8?q?=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/application.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 1d785eb9d..aaa7506df 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -1636,7 +1636,7 @@ fieldset#filters td.field { width:230px; } fieldset#filters td.operator { width:180px; } fieldset#filters td.operator select {max-width:170px;} fieldset#filters td.values { white-space:nowrap; } -fieldset#filters td.values select {min-width:130px;max-width: 220px;} +fieldset#filters td.values select {min-width:130px;max-width: 100px;} fieldset#filters td.values input {height:1em;} fieldset#filters td.add-filter { text-align: right; vertical-align: top; } From 36329200b7a91995df9afc603d0c022ade7fc5e5 Mon Sep 17 00:00:00 2001 From: z9hang Date: Thu, 4 Sep 2014 14:11:20 +0800 Subject: [PATCH 10/16] =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E8=AE=BF=E9=97=AE?= =?UTF-8?q?=E7=A7=AF=E5=88=86=E9=93=BE=E6=8E=A5=E6=8A=A5=E9=94=99=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E5=8E=9F=E5=9B=A0=EF=BC=9A1=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=A7=AF=E5=88=86=E6=9C=89=E4=B8=AA=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E5=90=8D=E5=AD=97=E6=AD=A4=E5=A4=84?= =?UTF-8?q?=E6=9C=AA=E6=94=B9=E3=80=822=E4=B8=AA=E4=BA=BA=E7=A7=AF?= =?UTF-8?q?=E5=88=86=E9=93=BE=E6=9C=89=E4=B8=AA=E5=8F=98=E9=87=8F=E6=9C=AA?= =?UTF-8?q?=E8=B5=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/show_projects_score.html.erb | 7 +++---- app/views/users/_score_new_index.html.erb | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/views/projects/show_projects_score.html.erb b/app/views/projects/show_projects_score.html.erb index 94f3dfaf8..b16f46f91 100644 --- a/app/views/projects/show_projects_score.html.erb +++ b/app/views/projects/show_projects_score.html.erb @@ -1,4 +1,3 @@ - @@ -16,7 +15,7 @@ <%= yield :header_tags -%> - +<% if @project %>

    <%= l(:label_projects_score) %>

    @@ -54,7 +53,7 @@
  • <%= link_to l(:label_file_score), {:controller => 'projects', :action => 'file_score_index', :remote => true}%> : - <%= format("%.2f" , document_score(@project)).to_i %> + <%= format("%.2f" , documents_score(@project)).to_i %>
  • <%= link_to l(:label_code_submit_score), {:controller => 'projects', :action => 'code_submit_score_index', :remote => true}%> : @@ -69,4 +68,4 @@
    <%= render :partial => 'projects/project_score_index', :locals => {:index => 0 } %>
    - \ No newline at end of file +<% end %> \ No newline at end of file diff --git a/app/views/users/_score_new_index.html.erb b/app/views/users/_score_new_index.html.erb index d0647d8e3..733088067 100644 --- a/app/views/users/_score_new_index.html.erb +++ b/app/views/users/_score_new_index.html.erb @@ -1,5 +1,5 @@ - +<% option_num = get_option_number(@user,1) %>
    <%= l(:label_user_score) %>
    = <%= l(:label_user_score_of_collaboration) %> + <%= l(:label_user_score_of_influence) %> + <%= l(:label_user_score_of_skill)%> + <%= l(:label_user_score_of_active) %>
    @@ -11,4 +11,4 @@ <% else %>
    = <%= format("%.2f" ,option_num.total_score).to_i %>
    <% end %> - + From a3aa2b0c2b042506f6b6f54a97e493ee65d1216f Mon Sep 17 00:00:00 2001 From: z9hang Date: Thu, 4 Sep 2014 15:32:31 +0800 Subject: [PATCH 11/16] =?UTF-8?q?#1087=20=E9=A1=B9=E7=9B=AE--=E9=85=8D?= =?UTF-8?q?=E7=BD=AE--=E7=89=88=E6=9C=AC=EF=BC=9A=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E8=B7=B3=E8=BD=AC=E9=97=AE=E9=A2=98=E5=8F=8A?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98=20?= =?UTF-8?q?=E5=90=8D=E5=AD=97=E8=BF=87=E9=95=BF=E6=97=B6=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=A4=B1=E8=B4=A5=E4=BF=A1=E6=81=AF=EF=BC=8C?= =?UTF-8?q?=E7=AC=AC=E4=BA=8C=E6=AC=A1=E6=AD=A3=E7=A1=AE=E5=A1=AB=E5=86=99?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E6=8F=90=E4=BA=A4=E6=88=90=E5=8A=9F=EF=BC=8C?= =?UTF-8?q?=E4=BD=86=E9=A1=B5=E9=9D=A2=E8=B7=B3=E8=BD=AC=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=9A=E5=8E=9F=E5=9B=A0=EF=BC=9A=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E6=88=90=E5=8A=9F=E5=90=8E=E4=BB=96=E7=94=A8=E7=9A=84?= =?UTF-8?q?=E6=98=AF=E8=BF=94=E5=9B=9E=E4=B8=8A=E4=B8=80=E4=B8=AA=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=88=96=E9=BB=98=E8=AE=A4=E9=A1=B5=E9=9D=A2=EF=BC=8C?= =?UTF-8?q?=E7=AC=AC=E4=BA=8C=E6=AC=A1=E6=8F=90=E4=BA=A4=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=88=B0=E4=B8=8A=E4=B8=80=E4=B8=AA=E9=A1=B5=E9=9D=A2=E4=BE=9D?= =?UTF-8?q?=E7=84=B6=E6=98=AF=E6=96=B0=E5=BB=BA=E7=89=88=E6=9C=AC=E7=9A=84?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=EF=BC=8C=E4=BF=AE=E6=94=B9=E4=B8=BA=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E6=88=90=E5=8A=9F=E5=88=99=E6=8C=87=E5=AE=9A=E8=B7=B3?= =?UTF-8?q?=E5=88=B0=E9=A1=B9=E7=9B=AE=E9=85=8D=E7=BD=AE=E7=9A=84=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E9=85=8D=E7=BD=AE=E9=A1=B5=E9=9D=A2=E3=80=82=E4=B8=A4?= =?UTF-8?q?=E4=B8=AA=E6=8D=A2=E8=A1=8C=E9=97=AE=E9=A2=98=EF=BC=8C=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=8D=A2=E8=A1=8C=E7=9A=84css=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/versions_controller.rb | 2 +- public/stylesheets/application.css | 2 +- public/themes/redpenny-master/stylesheets/application.css | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/controllers/versions_controller.rb b/app/controllers/versions_controller.rb index 3641e0c61..5824848ff 100644 --- a/app/controllers/versions_controller.rb +++ b/app/controllers/versions_controller.rb @@ -107,7 +107,7 @@ class VersionsController < ApplicationController respond_to do |format| format.html do flash[:notice] = l(:notice_successful_create) - redirect_back_or_default settings_project_path(@project, :tab => 'versions') + redirect_to settings_project_path(@project, :tab => 'versions') end format.js format.api do diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index aaa7506df..e75230700 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -1350,7 +1350,7 @@ tr.message.locked td.subject { background: url(../images/locked.png) no-repeat 0 tr.message.sticky td.subject { background: url(../images/bullet_go.png) no-repeat 0 1px; font-weight: bold; } tr.version.closed, tr.version.closed a { color: #999; } -tr.version td.name { padding-left: 20px; } +tr.version td.name { padding-left: 20px;word-break: break-all; } tr.version.shared td.name { background: url(../images/link.png) no-repeat 0% 70%; } tr.version td.date, tr.version td.status, tr.version td.sharing { text-align: center; white-space:nowrap; } diff --git a/public/themes/redpenny-master/stylesheets/application.css b/public/themes/redpenny-master/stylesheets/application.css index 098e02be2..9fe6625ef 100644 --- a/public/themes/redpenny-master/stylesheets/application.css +++ b/public/themes/redpenny-master/stylesheets/application.css @@ -689,7 +689,8 @@ table.list tbody td,table.list tbody tr td,table.list tbody tr td.checkbox { border-bottom:solid 1px #ddd; font-size:11px; - padding:4px 10px 4px 3px + padding:4px 10px 4px 3px; + word-break: break-all; } table.list thead th From bd636115d50504e7a3353c76e4a0c7fb73343cf1 Mon Sep 17 00:00:00 2001 From: z9hang Date: Thu, 4 Sep 2014 15:41:59 +0800 Subject: [PATCH 12/16] =?UTF-8?q?#1177=20=E6=AD=A3=E5=BC=8F=E7=89=88?= =?UTF-8?q?=EF=BC=9A=E9=A1=B9=E7=9B=AE--=E6=96=87=E6=A1=A3=EF=BC=8C?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E4=B8=8B=E8=BD=BD=E4=B8=8A=E4=BC=A0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=9A=84=E5=9B=BE=E6=A0=87=E6=8C=89=E9=92=AE=EF=BC=8C?= =?UTF-8?q?=E5=BC=B9=E5=87=BA=E7=AA=97=E5=8F=A3=E4=B8=AD=E6=9C=89=E4=B8=A4?= =?UTF-8?q?=E4=B8=AA=E2=80=9C=E6=96=B0=E5=A2=9E=E2=80=9D=E8=AF=84=E5=AE=A1?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=8C=89=E9=92=AE,=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=EF=BC=9A=E5=B1=8F=E8=94=BD=E6=8E=89=E9=A1=B5=E9=9D=A2=E5=8F=B3?= =?UTF-8?q?=E4=B8=8B=E8=A7=92=E9=82=A3=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/users_base.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/users_base.html.erb b/app/views/layouts/users_base.html.erb index bad051fc5..97db13193 100644 --- a/app/views/layouts/users_base.html.erb +++ b/app/views/layouts/users_base.html.erb @@ -45,6 +45,6 @@ -<%= call_hook :view_layouts_base_body_bottom %> + From e99f9250c3ca87a1539da2461413165a47354faf Mon Sep 17 00:00:00 2001 From: z9hang Date: Thu, 4 Sep 2014 15:52:17 +0800 Subject: [PATCH 13/16] =?UTF-8?q?=E5=89=8D=E6=AC=A1=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E7=BC=BA=E9=99=B7#1087=E6=8D=A2=E8=A1=8C=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E7=9A=84=E6=8F=90=E4=BA=A4=E4=B8=AD=E6=8D=A2=E8=A1=8C=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E5=BD=B1=E5=93=8D=E4=BA=86=E7=89=88=E6=9C=AC=E5=BA=93?= =?UTF-8?q?=E4=B8=AD=E4=BF=AE=E8=AE=A2=E5=88=97=E8=A1=A8=E7=9A=84=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=EF=BC=8C=E4=B8=A4=E8=80=85=E5=85=B1=E7=94=A8=E4=BA=86?= =?UTF-8?q?=E5=90=8C=E4=B8=80=E6=AE=B5css=EF=BC=8C=E5=B0=86=E4=B9=8B?= =?UTF-8?q?=E6=94=B9=E5=9B=9E=E5=8E=BB=EF=BC=8C=E5=9C=A8=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=8F=A6=E4=B8=80css=E7=BB=99=E9=A1=B9=E7=9B=AE=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=3D>=E7=89=88=E6=9C=AC=E4=B8=AD=E7=9A=84=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/application.css | 1 + public/themes/redpenny-master/stylesheets/application.css | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index e75230700..dacf51833 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -1351,6 +1351,7 @@ tr.message.sticky td.subject { background: url(../images/bullet_go.png) no-repea tr.version.closed, tr.version.closed a { color: #999; } tr.version td.name { padding-left: 20px;word-break: break-all; } +tr.version td.description{word-break: break-all} tr.version.shared td.name { background: url(../images/link.png) no-repeat 0% 70%; } tr.version td.date, tr.version td.status, tr.version td.sharing { text-align: center; white-space:nowrap; } diff --git a/public/themes/redpenny-master/stylesheets/application.css b/public/themes/redpenny-master/stylesheets/application.css index 9fe6625ef..098e02be2 100644 --- a/public/themes/redpenny-master/stylesheets/application.css +++ b/public/themes/redpenny-master/stylesheets/application.css @@ -689,8 +689,7 @@ table.list tbody td,table.list tbody tr td,table.list tbody tr td.checkbox { border-bottom:solid 1px #ddd; font-size:11px; - padding:4px 10px 4px 3px; - word-break: break-all; + padding:4px 10px 4px 3px } table.list thead th From 20b8bf00b6c224a546f3ed5d4ebe79d2510d1d73 Mon Sep 17 00:00:00 2001 From: linhk <304431313@.com> Date: Fri, 5 Sep 2014 11:22:10 +0800 Subject: [PATCH 14/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=85=B3=E6=B3=A8=E4=B8=8D=E8=83=BD=E5=8F=8A?= =?UTF-8?q?=E6=97=B6=E6=9B=B4=E6=96=B0Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/project_status.rb | 2 +- app/views/projects/_project.html.erb | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/models/project_status.rb b/app/models/project_status.rb index c3d306c58..7fd246234 100644 --- a/app/models/project_status.rb +++ b/app/models/project_status.rb @@ -12,7 +12,7 @@ class ProjectStatus < ActiveRecord::Base # 但是 如果超级用户删除其他用户的话会造成读取错误 这里是遗漏点 # 删除用户时 此表创建人员未作相应删除动作 def update_watchers_count(num) - if self.watchers_count >= 0 + if self.watchers_count||0 >= 0 self.update_attribute(:watchers_count, self.watchers_count.to_i + num) end end diff --git a/app/views/projects/_project.html.erb b/app/views/projects/_project.html.erb index 004fb38ac..6f2354d66 100644 --- a/app/views/projects/_project.html.erb +++ b/app/views/projects/_project.html.erb @@ -82,7 +82,7 @@ <% end %> <%= content_tag('span', link_to(files_count, file_project_path(@project)), :class => "info") %><%= content_tag('span', l(:label_x_data,:count => files_count)) %>

    - + <% end %> @@ -114,19 +114,19 @@ <% if(@project.project_type==1)%>    <%= l(:label_course_college) %>: <%if @admin&&@admin.first&&@admin.first.user&&@admin.first.user.user_extensions%> - <%= @admin.first.user.user_extensions.occupation %> + <%= @admin.first.user.user_extensions.occupation %> <% end %> <% end %>
    <%= content_tag('span', "#{l(:label_create_time)}: ") %><%= content_tag('span', format_time(@project.created_on)) %>
    - +
    - + <% if @project.project_type !=1 %> - <%= l(:label_project_grade)%>: + <%= l(:label_project_grade)%>: <%= link_to(format("%.2f" , red_project_scores(@project) ).to_i, {:controller => 'projects', @@ -138,7 +138,7 @@ - +
    From 08d59b9820b78930d48ce2fd93eab3b3ed406dec Mon Sep 17 00:00:00 2001 From: linhk <304431313@.com> Date: Fri, 5 Sep 2014 17:16:40 +0800 Subject: [PATCH 15/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9google=E4=B8=AD?= =?UTF-8?q?=E2=80=9C=E5=8F=82=E5=8A=A0=E7=AB=9E=E8=B5=9B=E2=80=9D=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E9=83=A8=E5=88=86=E5=AD=97=E9=87=8D=E5=8F=A0Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/contests/_new_softapplication.html.erb | 2 +- app/views/softapplications/_form.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/contests/_new_softapplication.html.erb b/app/views/contests/_new_softapplication.html.erb index 9fb3fc7f1..e8b0a32cd 100644 --- a/app/views/contests/_new_softapplication.html.erb +++ b/app/views/contests/_new_softapplication.html.erb @@ -166,7 +166,7 @@ <%= render :partial => 'attachments/form' %>

    -

    +

    1、<%= l(:label_upload_softapplication_packets_mustpacketed) %>

    2、<%= l(:label_upload_softapplication_photo_condition) %> diff --git a/app/views/softapplications/_form.html.erb b/app/views/softapplications/_form.html.erb index 4e38981f8..95c61ae27 100644 --- a/app/views/softapplications/_form.html.erb +++ b/app/views/softapplications/_form.html.erb @@ -112,7 +112,7 @@

    <%= render :partial => 'attachments/form' %>

    -

    1、<%=l(:label_upload_softapplication_packets_mustpacketed)%>
    2、<%=l(:label_upload_softapplication_photo_condition)%>

    +

    1、<%=l(:label_upload_softapplication_packets_mustpacketed)%>
    2、<%=l(:label_upload_softapplication_photo_condition)%>

    From c4a69424ef6c37bdb18d7d0f288b7bff5ecca85b Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 9 Sep 2014 09:45:52 +0800 Subject: [PATCH 16/16] 111 --- db/schema.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index db51ddd37..e23fd19d2 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -441,10 +441,10 @@ ActiveRecord::Schema.define(:version => 20140826072838) do t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.integer "sort_type" - t.integer "image_width", :default => 107 - t.integer "image_height", :default => 63 t.integer "show_course", :default => 1 t.integer "show_contest", :default => 1 + t.integer "image_width", :default => 107 + t.integer "image_height", :default => 63 end create_table "forums", :force => true do |t|