From d20368aa38d06c2841ee67192c4cc20309b9ea78 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Fri, 9 Oct 2015 14:33:26 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E5=B0=86=E6=B6=88=E6=81=AF=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=94=B1=E4=B8=80=E8=A1=8C=E5=88=86=E8=87=B3=E4=B8=A4?= =?UTF-8?q?=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/user_messages.html.erb | 56 +++++++++++++++----------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index 84d5ec1bf..813c13509 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -2,30 +2,38 @@
<%= title_for_message(params[:type]) %>
  • @@ -40,7 +34,7 @@
    - <% if @message_alls.count >0 || @user_system_messages.count >0 %> + <% if (!@message_alls.nil? && @message_alls.count >0) || (!@user_system_messages.nil? && @user_system_messages.count >0) %> <% if params[:type].nil? || params[:type] == "unviewed" %>
    有 <%= unviewed_message(@user) %> 条未读 From 6ad1ee36e2f0b878c9eddc5739589e7aeb72179c Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Fri, 9 Oct 2015 15:56:14 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E5=B0=86=E2=80=9C=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E8=AE=A8=E8=AE=BA=E5=8C=BA=E2=80=9D=E7=AE=80=E5=8C=96=E4=B8=BA?= =?UTF-8?q?=E2=80=9C=E9=A1=B9=E7=9B=AE=E8=AE=A8=E8=AE=BA=E2=80=9D=EF=BC=8C?= =?UTF-8?q?=E4=B8=8E=E5=85=B6=E4=BB=96=E5=88=97=E8=A1=A8=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/user_messages.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index 25900e737..958d5cf53 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -19,7 +19,7 @@
    • <%= link_to "项目任务", user_message_path(User.current, :type => 'issue'), :class => "resourcesGrey" %>
    • -
    • <%= link_to "项目讨论区", user_message_path(User.current, :type => 'forge_message'), :class => "resourcesGrey" %>
    • +
    • <%= link_to "项目讨论", user_message_path(User.current, :type => 'forge_message'), :class => "resourcesGrey" %>
    • <%= link_to "项目新闻", user_message_path(User.current, :type => 'forge_news'), :class => "resourcesGrey" %>
    • <%= link_to "用户申请", user_message_path(User.current, :type => 'apply'), :class => "resourcesGrey" %>
    • From a0f0ecf86dc4b92fd20e0e8ba27cd507459bd584 Mon Sep 17 00:00:00 2001 From: huang Date: Sat, 10 Oct 2015 11:43:41 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=AA=E8=AF=BB?= =?UTF-8?q?=E6=B6=88=E6=81=AF500=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 7e44174fe..c82cbf79e 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -121,7 +121,7 @@ class UsersController < ApplicationController messages = MessageAll.where("user_id =?", @user).order("created_at desc") messages.each do |message_all| # 在点击或者刷新消息列表后未读的消息存放在数组 - if message_all.message.viewed == 0 + if message_all.message_type != "SystemMessage" && message_all.message.viewed == 0 @message_alls << message_all.message end end From e5c64fc43a941878340bf03dd0072503788d375f Mon Sep 17 00:00:00 2001 From: huang Date: Sat, 10 Oct 2015 11:49:25 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/user_messages.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index 958d5cf53..d0f7bb9bb 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -34,7 +34,7 @@
  • - <% if (!@message_alls.nil? && @message_alls.count >0) || (!@user_system_messages.nil? && @user_system_messages.count >0) %> + <% if (!@message_alls.nil? && @message_alls.count >0) %> <% if params[:type].nil? || params[:type] == "unviewed" %>
    有 <%= unviewed_message(@user) %> 条未读 From c365f32a17f597db753f39be539bd7df5ffc7ce7 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Sat, 10 Oct 2015 14:00:12 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E4=B8=AD=EF=BC=8C=E6=9C=89=E4=BA=9B=E9=82=AE=E4=BB=B6=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E4=B8=8D=E8=83=BD=E6=AD=A3=E5=B8=B8=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mailer/send_for_user_activities.html.erb | 32 +++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/app/views/mailer/send_for_user_activities.html.erb b/app/views/mailer/send_for_user_activities.html.erb index 3f761fbd4..23cbe6176 100644 --- a/app/views/mailer/send_for_user_activities.html.erb +++ b/app/views/mailer/send_for_user_activities.html.erb @@ -224,13 +224,15 @@ <%= link_to issues_journal.user, user_activities_url(issues_journal.user,:token => @token.value), :class => "wmail_name", :style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> <%= l(:label_project_issue_update) %> - <% if issues_journal.notes.blank? || issues_journal.notes.nil? %> - <%= link_to truncate(issues_journal.issue.subject.html_safe, length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value), - :style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> - <% else %> - <%= link_to truncate(issues_journal.notes.html_safe, length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value), - :style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> - <% end %> + <%= link_to truncate(issues_journal.issue.subject, length:30,omission:'...'),issue_url(issues_journal.issue, :token => @token.value), + :style => "color:#2E8DD7;float:left;font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;", + :onmouseover =>"message_titile_show($(this),event)", + :onmouseout => "message_titile_hide($(this))" + %> +
    +
    更新内容:
    +
    <%= issues_journal.notes.html_safe %>
    +
    <%= format_time(issues_journal.created_on) %> <% end %> @@ -290,9 +292,9 @@ :style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> <%= l(:label_wiki_mail_notification) %> <% unless wikicontent.page.nil? %> - <%= link_to truncate(wikicontent.text.html_safe, length: 30,omission: '...'), project_wiki_url(wikicontent.page.wiki,:token => @token.value), + <%= link_to wikicontent.text.gsub("

    ","").gsub("

    ","").gsub("
    ","").html_safe, project_wiki_url(wikicontent.page.wiki,:token => @token.value), :class => 'wmail_info', - :style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + :style => "color:#2E8DD7;float:left; max-width:400px;height:23px;font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> <% end %> <%= format_time(wikicontent.updated_on) %> @@ -520,3 +522,15 @@
    + + From a9456ca82f4083304a63540b462a6ccdb34cc419 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Sat, 10 Oct 2015 14:14:36 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E8=AE=A9=E9=A1=B9=E7=9B=AE=E7=95=99?= =?UTF-8?q?=E8=A8=80=E7=9A=84=E5=86=85=E5=AE=B9=E4=BB=A5html=E5=BD=A2?= =?UTF-8?q?=E5=BC=8F=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/mailer/send_for_user_activities.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/mailer/send_for_user_activities.html.erb b/app/views/mailer/send_for_user_activities.html.erb index 23cbe6176..3c462be08 100644 --- a/app/views/mailer/send_for_user_activities.html.erb +++ b/app/views/mailer/send_for_user_activities.html.erb @@ -407,9 +407,9 @@ :style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> <%= l(:label_send_course_journals_for_messages) %> - <%= link_to truncate(project_journal_message.notes.html_safe,length: 30,omission: '...'), project_feedback_url(project_journal_message.project,:token => @token.value), + <%= link_to project_journal_message.notes.gsub("

    ","").gsub("

    ","").gsub("
    ","").html_safe, project_feedback_url(project_journal_message.project,:token => @token.value), :class => 'wmail_info', - :style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" + :style => "color:#2E8DD7;float:left; max-width:400px; max-height:30px;font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> <%= format_time(project_journal_message.created_on) %> From 3957ca5dc25240992a9e16d2439d1490e6d05bd8 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Sat, 10 Oct 2015 14:30:23 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E9=82=AE=E4=BB=B6=E4=B8=AD=EF=BC=8C?= =?UTF-8?q?=E8=AE=A9=E7=94=A8=E6=88=B7=E7=95=99=E8=A8=80=E4=BB=A5html?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/mailer/send_for_user_activities.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/mailer/send_for_user_activities.html.erb b/app/views/mailer/send_for_user_activities.html.erb index 3c462be08..ae5604099 100644 --- a/app/views/mailer/send_for_user_activities.html.erb +++ b/app/views/mailer/send_for_user_activities.html.erb @@ -439,9 +439,9 @@ :style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> <%= l(:label_show_your_message) %> - <%= link_to truncate(user_journal_message.notes,length: 30,omission: '...'),feedback_url(@user,:token => @token.value), + <%= link_to user_journal_message.notes.gsub("

    ","").gsub("

    ","").gsub("
    ","").html_safe,feedback_url(@user,:token => @token.value), :class => 'wmail_info', - :style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" + :style => "color:#2E8DD7;float:left; max-width:400px; max-height:30px;font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> <%= format_time(user_journal_message.created_on) %>