From 6cddb59a4a92c2281c2c089d0f2ec27f5b30e58b Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 2 Jun 2015 11:02:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=82=AE=E4=BB=B6=E6=8F=90?= =?UTF-8?q?=E9=86=92=EF=BC=9A=E9=A1=B9=E7=9B=AE=E7=BC=BA=E9=99=B7=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E4=B8=8D=E8=83=BD=E6=94=B6=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/mailer.rb | 42 +- .../mailer/send_for_user_activities.html.erb | 566 +++++++++--------- 2 files changed, 299 insertions(+), 309 deletions(-) diff --git a/app/models/mailer.rb b/app/models/mailer.rb index dbc5d3cff..44139fb03 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -45,7 +45,6 @@ class Mailer < ActionMailer::Base MailerProxy.new(self) end - # author: alan # 发送邀请未注册用户加入项目邮件 # 功能: 在加入项目的同时自动注册用户 def send_invite_in_project(email, project, invitor) @@ -101,16 +100,16 @@ class Mailer < ActionMailer::Base course_ids = courses.map {|course| course.id}.join(",") # 查询user的缺陷,包括发布的,跟踪的以及被指派的缺陷 - sql = "select DISTINCT i.* from issues i, watchers w - where (i.assigned_to_id = #{user.id} or i.author_id = #{user.id} - or (w.watchable_type = 'Issue' and w.watchable_id = i.id and w.user_id = #{user.id})) - and (i.created_on between '#{date_from}' and '#{date_to}') order by i.created_on desc" + # sql = "select DISTINCT i.* from issues i, watchers w + # where (i.assigned_to_id = #{user.id} or i.author_id = #{user.id} + # or (w.watchable_type = 'Issue' and w.watchable_id = i.id and w.user_id = #{user.id})) + # and (i.created_on between '#{date_from}' and '#{date_to}') order by i.created_on desc" + sql = "select DISTINCT i.* from issues i where (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 ||= [] - @bids ||= [] # 老师发布的作业 unless courses.first.nil? @@ -142,9 +141,9 @@ class Mailer < ActionMailer::Base # 查询user在课程中发布的通知,项目中发的新闻 @course_news = (course_ids && !course_ids.empty?) ? News.find_by_sql("select DISTINCT n.* from news n where n.course_id in (#{course_ids}) - and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc") : [] + and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc") : [] @project_news = (project_ids && !project_ids.empty?) ? News.find_by_sql("select DISTINCT n.* from news n where n.project_id in (#{project_ids}) - and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc") : [] + and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc") : [] # 查询user在课程及个人中留言 @course_journal_messages = JournalsForMessage.find_by_sql("select DISTINCT * from journals_for_messages where @@ -165,7 +164,7 @@ class Mailer < ActionMailer::Base } mylogger.debug "Sent activity mail : #{user.mail} - #{has_content}" #有内容才发,没有不发 - mail :to => user.mail,:subject => subject if has_content + mail :to => user.mail, :subject => subject if has_content end # 公共讨论区发帖、回帖添加邮件发送信息 @@ -188,8 +187,8 @@ class Mailer < ActionMailer::Base :subject => "[ #{l(:label_message_plural)} : #{memo.subject} #{l(:label_memo_create_succ)}]", :filter => true end - # Builds a Mail::Message object used to email recipients of the added journals for message. + # Builds a Mail::Message object used to email recipients of the added journals for message. # 留言分为直接留言,和对留言人留言的回复 # 字段说明在JournalsForMessage.rb # 直接留言后 reply_id,m_parent_id 为空,相对应的at_user取值为nil @@ -511,7 +510,7 @@ class Mailer < ActionMailer::Base end # Builds a Mail::Message object used to email recipients of a news' project when a news comment is added. - # + # 新增新闻评论时邮件通知 # Example: # news_comment_added(comment) => Mail::Message object # Mailer.news_comment_added(comment) => sends an email to the news' project recipients @@ -526,9 +525,9 @@ class Mailer < ActionMailer::Base @comment = comment @news_url = url_for(:controller => 'news', :action => 'show', :id => news) mail :to => news.recipients, - :cc => news.watcher_recipients, - :subject => "Re: [#{news.project.name}] #{l(:label_news)}: #{news.title}", - :filter => true + :cc => news.watcher_recipients, + :subject => "Re: [#{news.project.name}] #{l(:label_news)}: #{news.title}", + :filter => true elsif news.course redmine_headers 'Course' => news.course.id @author = comment.author @@ -563,9 +562,9 @@ class Mailer < ActionMailer::Base @message = message @message_url = url_for(message.event_url) mail :to => recipients, - :cc => cc, - :subject => "[#{message.board.project.name} - #{message.board.name} - msg#{message.root.id}] #{message.subject}", - :filter => true + :cc => cc, + :subject => "[#{message.board.project.name} - #{message.board.name} - msg#{message.root.id}] #{message.subject}", + :filter => true elsif message.course redmine_headers 'Course' => message.course.id, 'Topic-Id' => (message.parent_id || message.id) @@ -909,10 +908,11 @@ class Mailer < ActionMailer::Base if email.attachments && email.attachments.any? email.attachments.each do |attachment| obj.attachments << Attachment.create(:container => obj, - :file => attachment.decoded, - :filename => attachment.filename, - :author => user, - :content_type => attachment.mime_type) + :file => attachment.decoded, + :filename => attachment.filename, + :author => user, + + :content_type => attachment.mime_type) end end end diff --git a/app/views/mailer/send_for_user_activities.html.erb b/app/views/mailer/send_for_user_activities.html.erb index 73a561ca3..2cf070960 100644 --- a/app/views/mailer/send_for_user_activities.html.erb +++ b/app/views/mailer/send_for_user_activities.html.erb @@ -1,341 +1,331 @@ - - - - - - -

-<%= @subject %> + <%= @subject %>

<% if @attachments.first || @course_news.first || @bids.first || - @homeworks.first || @course_journal_messages.first|| @course_messages.first %> -
-

<%= l(:label_course_overview)%>

- <% unless @course_news.first.nil? %> -
    + @homeworks.first || @course_journal_messages.first|| @course_messages.first %> +
    +

    <%= l(:label_course_overview)%>

    + <% unless @course_news.first.nil? %> +
      +

      + <%= l(:label_course_news) %> + (<%= @course_news.count %>) +

      + <% @course_news.each do |course_new|%> +
    • + + [ -

      - <%= l(:label_course_news) %> - (<%= @course_news.count %>) -

      + <%= 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;" %> + ] - <% @course_news.each do |course_new|%> -
    • - - [ - - <%= 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;" %> - ] + <%= 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;"%> + <%= l(:label_project_notice) %> - <%= 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;"%> - <%= l(:label_project_notice) %> + <%= 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;" + %> + <%= format_time(course_new.created_on) %> +
    • + <% end %> - <%= 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;" - %> - <%= format_time(course_new.created_on) %> - +
      +
    + <% end %> + <% if !@bids.first.nil? || !@homeworks.first.nil? %> +
      + +

      <%= l(:label_homework_overview) %>(<%= @bids.count %>)

      + <% unless @bids.first.nil?%> + <% @bids.each do |bid| %> +
    • + + [ + + <%= link_to truncate(bid.courses.first.name,length: 30,omission: '...'), course_url(bid.courses.first, :token => @token.value), + :class=> "wmail_column", + :style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + ] + + <%= link_to bid.author, user_activities_url(bid.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;"%> + <%= l(:label_course_homework) %> + + <%= link_to truncate(bid.name,length: 30,omission: '...'), course_for_bid_url(:id => 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;" + %> + <%= format_time(bid.created_on) %> +
    • + <% end %> + <% end %> + <% unless @homeworks.first.nil? %> + <% @homeworks.each do |homework| %> +
    • + + [ + + <%= link_to truncate(homework.bid.courses.first.name,length: 30,omission: '...'), course_url(homework.bid.courses.first, :token => @token.value), + :class=> "wmail_column", + :style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + ] + + <%= link_to homework.user, user_activities_url(homework.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;"%> + <%= l(:label_course_submit_homework) %> + + <%= link_to truncate(homework.name,length: 30,omission: '...'), course_for_bid_url(:id => 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;" + %> + <%= format_time(homework.created_at) %> +
    • + <% end %> + <% end %> + +
      +
    <% end %> -
    -
- <% end %> - <% if !@bids.first.nil? || !@homeworks.first.nil? %> -
    + <% unless @course_journal_messages.first.nil? %> +
      -

      <%= l(:label_homework_overview) %>(<%= @bids.count %>)

      - <% unless @bids.first.nil?%> - <% @bids.each do |bid| %> -
    • - - [ +

      + <%= l(:view_course_journals_for_messages) %> + (<%= @course_journal_messages.count %>) +

      - <%= link_to truncate(bid.courses.first.name,length: 30,omission: '...'), course_url(bid.courses.first, :token => @token.value), - :class=> "wmail_column", - :style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> - ] + <% @course_journal_messages.each do |course_journal_message|%> +
    • + + [ - <%= link_to bid.author, user_activities_url(bid.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;"%> - <%= l(:label_course_homework) %> + <%= 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;" %> + ] - <%= link_to truncate(bid.name,length: 30,omission: '...'), course_for_bid_url(:id => 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;" - %> - <%= format_time(bid.created_on) %> -
    • - <% end %> - <% end %> - <% unless @homeworks.first.nil? %> - <% @homeworks.each do |homework| %> -
    • - - [ + <%= 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;"%> + <%= l(:label_send_course_journals_for_messages) %> - <%= link_to truncate(homework.bid.courses.first.name,length: 30,omission: '...'), course_url(homework.bid.courses.first, :token => @token.value), - :class=> "wmail_column", - :style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> - ] + <%= 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;" + %> + <%= format_time(course_journal_message.created_on) %> +
    • + <% end %> - <%= link_to homework.user, user_activities_url(homework.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;"%> - <%= l(:label_course_submit_homework) %> - - <%= link_to truncate(homework.name,length: 30,omission: '...'), course_for_bid_url(:id => 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;" - %> - <%= format_time(homework.created_at) %> - - <% end %> +
      +
    <% end %> -
    -
- <% end %> + <% unless @course_messages.first.nil? %> +
    - <% unless @course_journal_messages.first.nil? %> -
      +

      + <%= l(:view_borad_course) %> + (<%= @course_journal_messages.count %>) +

      -

      - <%= l(:view_course_journals_for_messages) %> - (<%= @course_journal_messages.count %>) -

      + <% @course_messages.each do |course_message|%> +
    • + + [ - <% @course_journal_messages.each do |course_journal_message|%> -
    • - - [ + <%= 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;" %> + ] - <%= 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;" %> - ] + <%= 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;"%> + <%= l(:label_send_course_messages) %> - <%= 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;"%> - <%= l(:label_send_course_journals_for_messages) %> + <%= 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;" + %> + <%= format_time(course_message.created_on) %> +
    • + <% end %> - <%= 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;" - %> - <%= format_time(course_journal_message.created_on) %> - - <% end %> +
      +
    + <% end %> -
    -
- <% end %> + <% unless @attachments.first.nil? %> +
    +

    + <%= l(:label_course_attendingcontestwork_download) %> + (<%= @attachments.count %>) +

    - <% unless @course_messages.first.nil? %> -
      + <% @attachments.each do |attachment|%> +
    • + + [ -

      - <%= l(:view_borad_course) %> - (<%= @course_journal_messages.count %>) -

      + <%= 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;" %> + ] - <% @course_messages.each do |course_message|%> -
    • - - [ + <%= 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;"%> + <%= l(:label_course_file_upload) %> - <%= 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;" %> - ] + <%= 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;" + %> + <%= format_time(attachment.created_on) %> +
    • + <% end %> +
      +
    + <% end %> +
+<% end %> +<% if @issues.first || @project_messages.first %> +
+

<%= l(:label_project_overview_new)%>

+ <% unless @issues.first.nil? %> +
    +

    + <%= l(:label_issue_tracking) %> + (<%= @issues.count %>) +

    + <% @issues.each do |issue|%> +
  • + + [ - <%= 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;"%> - <%= l(:label_send_course_messages) %> + <%= 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;" %> + ] - <%= 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;" - %> - <%= format_time(course_message.created_on) %> -
  • - <% end %> + <%= 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;"%> + <%= l(:label_project_issue) %> -
    -
- <% end %> + <%= 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;" + %> + <%= format_time(issue.created_on) %> + + <% end %> - <% unless @attachments.first.nil? %> -
    -

    - <%= l(:label_course_attendingcontestwork_download) %> - (<%= @attachments.count %>) -

    +
    +
+ <% end %> - <% @attachments.each do |attachment|%> -
  • - - [ + <% unless @project_messages.first.nil? %> +
      +

      + <%= l(:project_moule_boards_show) %> + (<%= @project_messages.count %>) +

      - <%= 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;" %> - ] + <% @project_messages.each do |project_message|%> +
    • + + [ - <%= 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;"%> - <%= l(:label_course_file_upload) %> + <%= 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;" %> + ] - <%= 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;" - %> - <%= format_time(attachment.created_on) %> -
    • - <% end %> -
      -
    - <% end %> -
  • - <% end %> - <% if @issues.first || @project_messages.first %> -
    -

    <%= l(:label_project_overview_new)%>

    - <% unless @issues.first.nil? %> -
      -

      - <%= l(:label_issue_tracking) %> - (<%= @issues.count %>) -

      + <%= 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;"%> + <%= l(:label_send_course_messages) %> - <% @issues.each do |issue|%> -
    • - - [ + <%= 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;" + %> + <%= format_time(project_message.created_on) %> +
    • + <% end %> - <%= 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;" %> - ] - - <%= 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;"%> - <%= l(:label_project_issue) %> - - <%= 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;" - %> - <%= format_time(issue.created_on) %> - - <% end %> - -
      -
    - <% end %> - - <% unless @project_messages.first.nil? %> -
      -

      - <%= l(:project_moule_boards_show) %> - (<%= @project_messages.count %>) -

      - - <% @project_messages.each do |project_message|%> -
    • - - [ - - <%= 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;" %> - ] - - <%= 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;"%> - <%= l(:label_send_course_messages) %> - - <%= 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;" - %> - <%= format_time(project_message.created_on) %> -
    • - <% end %> - -
      -
    - <% end %> +
    + + <% end %> -
    - <% end %> - <% unless @user_journal_messages.first.nil? %> -
    -

    <%= l(:label_activities) %>

    +
    +<% end %> +<% unless @user_journal_messages.first.nil? %> +
    +

    <%= l(:label_activities) %>

    -
      -

      - <%= l(:label_user_message) %> - (<%= @user_journal_messages.count %>) -

      +
        +

        + <%= l(:label_user_message) %> + (<%= @user_journal_messages.count %>) +

        - <% @user_journal_messages.each do |user_journal_message|%> -
      • - + <% @user_journal_messages.each do |user_journal_message|%> +
      • + - <%= 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;" %> - <%= l(:label_show_your_message) %> + <%= 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;" %> + <%= l(:label_show_your_message) %> - <%= 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;" - %> + <%= 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;" + %> <%= format_time(user_journal_message.created_on) %>
      • <% end %> -
        -
      +
      +
    -
    - <% end %> - <% if @forums.first || @memos.first %> +
    +<% end %> +<% if @forums.first || @memos.first %>

    <%= l(:lable_bar_active) %>

    <% unless @forums.first.nil? %> - <% end %> <% unless @memos.first.nil? %>
    <% end %> -
    - <% [: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 %> - - <% else %> - <%= link_to l(mail_option), my_change_mail_notification_url(token: @token.value,mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %> - <% end %> - <% end %> -
    +
    + <% [: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 %> + + <% else %> + <%= link_to l(mail_option), my_change_mail_notification_url(token: @token.value,mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %> + <% end %> + <% end %> +