From 27be52e58da569b6d0bc38378d867b04a348ab8a Mon Sep 17 00:00:00 2001 From: z9hang Date: Tue, 3 Jun 2014 16:58:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=81=E5=B8=88=E7=9A=84=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E4=B8=AD=E5=A2=9E=E5=8A=A0=E5=8F=96=E6=B6=88=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E9=93=BE=E6=8E=A5=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=B8=BB=E9=A1=B5=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E4=B8=AD=E7=82=B9=E5=87=BB=E8=BF=9B=E5=85=A5=E9=99=84?= =?UTF-8?q?=E4=BB=B6=E8=B7=B3=E8=BD=AC=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/mail_handler_controller.rb | 5 +++++ app/helpers/welcome_helper.rb | 2 +- app/views/files/index.html.erb | 1 + .../mailer/journals_for_message_add.html.erb | 1 + config/locales/en.yml | 2 +- config/locales/zh.yml | 2 +- config/routes.rb | 1 + db/schema.rb | 15 +++++++-------- 8 files changed, 18 insertions(+), 11 deletions(-) diff --git a/app/controllers/mail_handler_controller.rb b/app/controllers/mail_handler_controller.rb index 3a4b219bb..183a1ea52 100644 --- a/app/controllers/mail_handler_controller.rb +++ b/app/controllers/mail_handler_controller.rb @@ -29,6 +29,11 @@ class MailHandlerController < ActionController::Base end end + #取消邮件通知 + def cancel_mail_notify + + end + private def check_credential diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb index 330010212..c00f629dc 100644 --- a/app/helpers/welcome_helper.rb +++ b/app/helpers/welcome_helper.rb @@ -237,7 +237,7 @@ module WelcomeHelper content_tag('span', find_all_event_type(event)) << ': '.html_safe << link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url) << - link_to((' ['.html_safe+l(:label_downloads_list).to_s << ']'), project_files_path(event.container), :class => "attachments_list_color") + link_to((' ['.html_safe+l(:label_downloads_list).to_s << ']'), project_files_path(event.container.project), :class => "attachments_list_color") else str << content_tag("span", "更新了") << content_tag("span", find_all_event_type(event)) << diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb index 9fc430e3f..9c1eee9d8 100644 --- a/app/views/files/index.html.erb +++ b/app/views/files/index.html.erb @@ -5,6 +5,7 @@ <%= (@project.project_type == 1) ? t(:label_user_course) : t(:label_project) %>资源共享区
+ <%#= link_to(l(:label_attachment_new), 'javascript:void(0);', :onclick=>"$('#file_buttons').slideToggle();", :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @project) %>
diff --git a/app/views/mailer/journals_for_message_add.html.erb b/app/views/mailer/journals_for_message_add.html.erb index bd2a36440..43c5b9ae8 100644 --- a/app/views/mailer/journals_for_message_add.html.erb +++ b/app/views/mailer/journals_for_message_add.html.erb @@ -1,4 +1,5 @@ 尊敬的用户,<%= @user %>给你留言了:
<%= @message %>

点击链接查看最新回复<%= link_to(@url, @url) %>

+         

<%= link_to(l(:lable_not_receive_mail),"http://forge.trustie.net/my/account")%>

diff --git a/config/locales/en.yml b/config/locales/en.yml index f19e076c0..23911e568 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1620,6 +1620,6 @@ en: label_your_course: your course label_have_message : have a new message label_login_prompt: Email/NickName - + :lable_not_receive_mail: Click here don't receive email form site! # ajax异步验证 modal_valid_passing: can be used. diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 95a610e7c..447b8f4be 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1966,7 +1966,7 @@ zh: label_attendingcontestwork_release_time: 发布时间 label_attendingcontestwork_deposit_project: 托管项目 label_attendingcontestwork_sorting_intimation: 您可以重新打分,打分结果以最后一次打分为主! - + lable_not_receive_mail: 点此设置接收本站邮件偏好! #end # ajax异步验证 diff --git a/config/routes.rb b/config/routes.rb index 69bbf6632..1e0eb1a59 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -522,6 +522,7 @@ RedmineApp::Application.routes.draw do get 'search', :controller => 'search', :action => 'index' match 'mail_handler', :controller => 'mail_handler', :action => 'index', :via => :post + match 'mail_handler/cancel/:id', :controller => 'mail_handler', :action => 'cancel_mail_notify',:via => :get match 'admin', :controller => 'admin', :action => 'index', :via => :get match 'admin/projects', :controller => 'admin', :action => 'projects', :via => :get diff --git a/db/schema.rb b/db/schema.rb index 12bcab886..721945ed4 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20140522025721) do +ActiveRecord::Schema.define(:version => 20140527060344) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -57,14 +57,11 @@ ActiveRecord::Schema.define(:version => 20140522025721) do add_index "attachments", ["container_id", "container_type"], :name => "index_attachments_on_container_id_and_container_type" add_index "attachments", ["created_on"], :name => "index_attachments_on_created_on" - create_table "attachmentstypes", :id => false, :force => true do |t| - t.integer "id", :null => false - t.integer "typeId" + create_table "attachmentstypes", :force => true do |t| + t.integer "typeId", :null => false t.string "typeName", :limit => 50 end - add_index "attachmentstypes", ["id"], :name => "id" - create_table "auth_sources", :force => true do |t| t.string "type", :limit => 30, :default => "", :null => false t.string "name", :limit => 60, :default => "", :null => false @@ -482,12 +479,13 @@ ActiveRecord::Schema.define(:version => 20140522025721) do t.text "notes" t.integer "status" t.integer "reply_id" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false t.string "m_parent_id" t.boolean "is_readed" t.integer "m_reply_count" t.integer "m_reply_id" + t.integer "is_comprehensive_evaluation" end create_table "member_roles", :force => true do |t| @@ -801,6 +799,7 @@ ActiveRecord::Schema.define(:version => 20140522025721) do t.string "application_developers" t.string "deposit_project_url" t.string "deposit_project" + t.integer "project_id" end create_table "students_for_courses", :force => true do |t|