修改个人留言在按天发送中查询条件
This commit is contained in:
parent
15697e05ed
commit
7bf4cfd218
|
@ -165,12 +165,11 @@ class Mailer < ActionMailer::Base
|
|||
# 查询user在课程及个人中留言
|
||||
@course_journal_messages = JournalsForMessage.find_by_sql("select DISTINCT * from journals_for_messages where
|
||||
jour_type='Course' and user_id = #{user.id} and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
|
||||
@user_journal_messages = user.journals_for_messages.where("m_parent_id IS NULL and (created_on between '#{date_from}' and '#{date_to}')").order('created_on DESC')
|
||||
@user_journal_messages = user.journals_for_messages.where("jour_type='Principal' and (created_on between '#{date_from}' and '#{date_to}')").order('created_on DESC')
|
||||
|
||||
# 查询user在项目中留言(用户反馈)
|
||||
@project_journal_messages = JournalsForMessage.find_by_sql("select jfm.* from journals_for_messages jfm, members m, projects p
|
||||
where m.user_id = '#{user.id}' and p.id = m.project_id and jfm.jour_id = p.id and jfm.user_id = m.user_id and jfm.jour_type='Project'
|
||||
and (jfm.created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
|
||||
@project_journal_messages = JournalsForMessage.find_by_sql("select DISTINCT * from journals_for_messages where
|
||||
jour_type='Project' and user_id = #{user.id} and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
|
||||
|
||||
# 查询user新建贴吧或发布帖子
|
||||
@forums = Forum.find_by_sql("select DISTINCT * from forums where creator_id = #{user.id} and (created_at between '#{date_from}' and '#{date_to}') order by created_at desc")
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
: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),
|
||||
<%= link_to truncate(course_journal_message.notes.html_safe,length: 30,omission: '...'), course_feedback_url(course_journal_message.course,: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;"
|
||||
%>
|
||||
|
@ -311,15 +311,15 @@
|
|||
: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_journal_message.project.user, user_activities_url(project_journal_message.project.user,:token => @token.value), :class => "wmail_name",
|
||||
<%= link_to project_journal_message.user, user_activities_url(project_journal_message.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;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_send_course_journals_for_messages) %></span>
|
||||
|
||||
<%= link_to truncate(project_journal_message.project.notes,length: 30,omission: '...'), project_feedback_url(project_journal_message.project,:token => @token.value),
|
||||
<%= link_to truncate(project_journal_message.notes.html_safe,length: 30,omission: '...'), 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;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(project_journal_message.project.created_on) %></span>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(project_journal_message.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
|
|
Loading…
Reference in New Issue