This commit is contained in:
sw 2015-06-10 15:16:54 +08:00
commit 574c7373ec
3 changed files with 107 additions and 110 deletions

View File

@ -107,7 +107,6 @@ class Mailer < ActionMailer::Base
and (i.created_on between '#{date_from}' and '#{date_to}') order by i.created_on desc"
@issues = Issue.find_by_sql(sql)
# @bids 查询课程作业包括老师发布的作业以及user提交作业
# @attachments查询课程课件更新
@attachments ||= []

View File

@ -5,61 +5,62 @@
<% if @attachments.first || @course_news.first || @bids.first ||
@course_journal_messages.first|| @course_messages.first %>
<div class="wmail_main" style="padding:20px 10px 0px;">
<h2 class="wmail_h2" style="color:#15bccf; "><%= l(:label_course_overview)%></h2>
<h3 class="wmail_h2" style="color:#15bccf; "><%= l(:label_course_overview)%></h3>
<% unless @course_news.first.nil? %>
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
<span class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
<%= l(:label_course_news) %>
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @course_news.count %>)</span>
</h4>
<!--<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%#= @course_news.count %>)</span>-->
</span>
<% @course_news.each do |course_new|%>
<li style="clear: both; list-style: none;">
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
<%= link_to truncate(course_new.course.name,length: 30,omission: '...'), course_url(course_new.course, :token => @token.value),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
<%= link_to course_new.author, user_activities_url(course_new.author,:token => @token.value), :class => "wmail_name",
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_project_notice) %></span>
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_project_notice) %></span>
<%= link_to truncate(course_new.title,length: 30,omission: '...'), news_url(course_new,:token => @token.value),
:class => 'wmail_info',
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(course_new.created_on) %></span>
</li>
<% end %>
<div class="cl"></div>
</ul><!--课程通知 end-->
<% end %>
<!--课程作业-->
<% unless @bids.empty? %>
<ul class="wmail_ul" style="clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;"><%= l(:label_homework_overview) %><span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @bids.count %>)</span></h4>
<ul class="wmail_ul" style="clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
<span class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;">
<%= l(:label_homework_overview) %>
<!--<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%#= @bids.count %>)</span>-->
</span>
<% unless @bids.first.nil?%>
<% @bids.each do |bid| %>
<li style="clear: both; list-style: none;">
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
<%= link_to truncate(bid.course.name,length: 30,omission: '...'), course_url(bid.course, :token => @token.value),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
<%= link_to bid.user, user_activities_url(bid.user,:token => @token.value), :class => "wmail_name",
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_course_homework) %></span>
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_course_homework) %></span>
<%= link_to truncate(bid.name,length: 30,omission: '...'), student_work_index_path(:homework => bid.id,:token => @token.value),
:class => 'wmail_info',
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(bid.created_at) %></span>
</li>
@ -72,29 +73,29 @@
<!-- 课程留言 -->
<% unless @course_journal_messages.first.nil? %>
<ul class="wmail_ul" style="clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
<ul class="wmail_ul" style="clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
<%= l(:view_course_journals_for_messages) %>
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @course_journal_messages.count %>)</span>
</h4>
<!--<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%#= @course_journal_messages.count %>)</span>-->
</span>
<% @course_journal_messages.each do |course_journal_message|%>
<li style="clear: both; list-style: none;">
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
<%= link_to truncate(course_journal_message.course.name,length: 30,omission: '...'), course_url(course_journal_message.course, :token => @token.value),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
<%= link_to course_journal_message.user, user_activities_url(course_journal_message.user,:token => @token.value), :class => "wmail_name",
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_send_course_journals_for_messages) %></span>
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_send_course_journals_for_messages) %></span>
<%= link_to truncate(course_journal_message.notes,length: 30,omission: '...'), course_feedback_url(course_journal_message.course,:token => @token.value),
:class => 'wmail_info',
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(course_journal_message.created_on) %></span>
</li>
@ -105,25 +106,25 @@
<!-- 课程讨论区 -->
<% unless @course_messages.first.nil? %>
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
<%= l(:view_borad_course) %>
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @course_messages.count %>)</span>
</h4>
<!--<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%#= @course_messages.count %>)</span>-->
</span>
<% @course_messages.each do |course_message|%>
<li style="clear: both; list-style: none;">
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
<%= link_to truncate(course_message.course.name,length: 30,omission: '...'), course_url(course_message.course.id, :token => @token.value),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
<%= link_to course_message.author, user_activities_url(course_message.author,:token => @token.value), :class => "wmail_name",
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_send_course_messages) %></span>
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_send_course_messages) %></span>
<%= link_to truncate(course_message.subject,length: 30,omission: '...'),board_message_url(course_message, :board_id => course_message.board_id,:token => @token.value),
:class => 'wmail_info',
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(course_message.created_on) %></span>
</li>
<% end %>
@ -133,28 +134,28 @@
<!-- 课件 -->
<% unless @attachments.first.nil? %>
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
<%= l(:label_course_attendingcontestwork_download) %>
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @attachments.count %>)</span>
</h4>
<!--<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%#= @attachments.count %>)</span>-->
</span>
<% @attachments.each do |attachment|%>
<li style="clear: both; list-style: none;">
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
<%= link_to truncate(attachment.course.name,length: 30,omission: '...'), course_url(attachment.course, :token => @token.value),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
<%= link_to attachment.author, user_activities_url(attachment.author,:token => @token.value), :class => "wmail_name",
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_course_file_upload) %></span>
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_course_file_upload) %></span>
<%= link_to truncate(attachment.filename,length: 30,omission: '...'),course_files_url(attachment.course,:token => @token.value),
:class => 'wmail_info',
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(attachment.created_on) %></span>
</li>
@ -165,32 +166,29 @@
</div>
<% end %>
<!--项目相关-->
<% if @issues.first || @project_messages.first %>
<div class="wmail_main" style="padding:20px 10px 0px;">
<h2 class="wmail_h2" style="color:#15bccf; "><%= l(:label_project_overview_new)%></h2>
<h3 class="wmail_h2" style="color:#15BCCF; "><%= l(:label_project_overview_new)%></h3>
<% unless @issues.first.nil? %>
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
<%= l(:label_issue_tracking) %>
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @issues.count %>)</span>
</h4>
<!--<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%#= @issues.count %>)</span>-->
</span>
<% @issues.each do |issue|%>
<li style="clear: both; list-style: none;">
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
<%= link_to truncate(issue.project.name,length: 30,omission: '...'), project_url(issue.project, :token => @token.value),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
<%= link_to issue.author, user_activities_url(issue.author,:token => @token.value), :class => "wmail_name",
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_project_issue) %></span>
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_project_issue) %></span>
<%= link_to truncate(issue.subject,length: 30,omission: '...'),issue_url(issue, :token => @token.value),
:class => 'wmail_info',
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(issue.created_on) %></span>
</li>
@ -202,29 +200,28 @@
<!-- 讨论区 -->
<% unless @project_messages.first.nil? %>
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
<%= l(:project_moule_boards_show) %>
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @project_messages.count %>)</span>
</h4>
<!--<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%#= @project_messages.count %>)</span>-->
</span>
<% @project_messages.each do |project_message|%>
<li style="clear: both; list-style: none;">
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
<%= link_to truncate(project_message.project.name,length: 30,omission: '...'), project_url(project_message.project, :token => @token.value),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
<%= link_to project_message.author, user_activities_url(project_message.author,:token => @token.value), :class => "wmail_name",
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_send_course_messages) %></span>
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_send_course_messages) %></span>
<%= link_to truncate(project_message.subject,length: 30,omission: '...'),board_message_url(project_message, :board_id => project_message.board_id,:token => @token.value),
:class => 'wmail_info',
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(project_message.created_on) %></span>
</li>
@ -236,28 +233,27 @@
<!--项目新闻-->
<% unless @project_news.first.nil? %>
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
<%= l(:label_project_news) %>
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @project_news.count %>)</span>
</h4>
<!--<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%#= @project_news.count %>)</span>-->
</span>
<% @project_news.each do |project_new|%>
<li style="clear: both; list-style: none;">
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
<%= link_to truncate(project_new.project.name,length: 30,omission: '...'), project_url(project_new.project, :token => @token.value),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
<%= link_to project_new.author, user_activities_url(project_new.author,:token => @token.value), :class => "wmail_name",
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_project_notice) %></span>
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_project_notice) %></span>
<%= link_to truncate(project_new.title,length: 30,omission: '...'), news_url(project_new,:token => @token.value),
:class => 'wmail_info',
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(project_new.created_on) %></span>
</li>
<% end %>
@ -271,13 +267,13 @@
<!-- 用户留言 -->
<% unless @user_journal_messages.first.nil? %>
<div class="wmail_main" style="padding:20px 10px 0px;">
<h2 class="wmail_h2" style="color:#15bccf; "><%= l(:label_activities) %></h2>
<h3 class="wmail_h2" style="color:#15bccf; "><%= l(:label_activities) %></h3>
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
<%= l(:label_user_message) %>
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @user_journal_messages.count %>)</span>
</h4>
<!--<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%#= @user_journal_messages.count %>)</span>-->
</span>
<% @user_journal_messages.each do |user_journal_message|%>
<li style="clear: both; list-style: none;">
@ -285,12 +281,12 @@
<%= link_to user_journal_message.user, user_activities_url(user_journal_message.user,:token => @token.value),
:class => "wmail_name",
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_show_your_message) %></span>
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_show_your_message) %></span>
<%= link_to truncate(user_journal_message.notes,length: 30,omission: '...'),feedback_url(@user,:token => @token.value),
:class => 'wmail_info',
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(user_journal_message.created_on) %></span></li>
@ -303,13 +299,13 @@
<% end %>
<% if @forums.first || @memos.first %>
<div class="wmail_main" style="padding:20px 10px 0px;">
<h2 class="wmail_h2" style="color:#15bccf; "><%= l(:lable_bar_active) %></h2>
<h3 class="wmail_h2" style="color:#15bccf; "><%= l(:lable_bar_active) %></h3>
<% unless @forums.first.nil? %>
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
<span class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
<%= l(:label_user_forum) %>
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @forums.count %>)</span>
</h4>
<span class="wmail_num" style="color:#666; margin-left:5px; font-weight:normal;">(<%= @forums.count %>)</span>
</span>
<% @forums.each do |forum|%>
<li style="clear: both; list-style: none;">
@ -317,12 +313,12 @@
<%= link_to forum.creator, user_activities_url(forum.creator,:token => @token.value),
:class => "wmail_name",
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_forum_new) %></span>
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_forum_new) %></span>
<%= link_to truncate(forum.name,length: 30,omission: '...'),forum_url(forum,:token => @token.value),
:class => 'wmail_info',
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(forum.created_at) %></span></li>
@ -332,11 +328,11 @@
</ul><!-- 新建贴吧 end-->
<% end %>
<% unless @memos.first.nil? %>
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
<span class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
<%= l(:label_user_message_forum) %>
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @memos.count %>)</span>
</h4>
<!--<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%#= @memos.count %>)</span>-->
</span>
<% @memos.each do |memo|%>
<li style="clear: both; list-style: none;">
@ -344,12 +340,12 @@
<%= link_to memo.author, user_activities_url(memo.author,:token => @token.value),
:class => "wmail_name",
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= memo.parent_id.nil? ? l(:label_memo_new_from_forum) : l(:label_reply) %></span>
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= memo.parent_id.nil? ? l(:label_memo_new_from_forum) : l(:label_reply) %></span>
<%= link_to truncate(memo.subject,length: 30,omission: '...'),forum_memo_url(memo.forum, (memo.parent_id.nil? ? memo : memo.parent_id)),
:class => 'wmail_info',
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(memo.created_at) %></span></li>
@ -361,6 +357,7 @@
</div><!--贴吧动态 end-->
<% end %>
<div class="wmail_foot" style="margin-top:20px;color:#2775d2; margin-left:10px;">
<span style="color:#666;"><%= l(:label_mail_policy) %></span>
<% [:label_user_mail_option_all, :label_user_mail_option_day, :label_user_mail_option_none].each do |mail_option| %>
<% if Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten][@user.mail_notification] == mail_option %>
<label style="margin-top:20px;color:gray; margin-left:10px;"><%= l(mail_option) %></label>

View File

@ -736,6 +736,7 @@ zh:
label_date_to:
label_language_based: 根据用户的语言
label_mail_policy: 邮件策略
label_send_test_email: 发送测试邮件
label_feeds_access_key: RSS存取键
label_missing_feeds_access_key: 缺少RSS存取键