Merge branch 'hjq_mail' into develop
This commit is contained in:
commit
96223b414d
|
@ -163,13 +163,13 @@ class News < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
#课程/项目通知 消息发送
|
||||
#消息发送原则:除了消息的发布者,课程的其它成员都能收到消息提醒
|
||||
# 课程/项目通知 消息发送
|
||||
# 消息发送原则:除了消息的发布者,课程的其它成员都能收到消息提醒
|
||||
def act_as_system_message
|
||||
if self.course
|
||||
self.course.members.each do |m|
|
||||
if m.user_id != self.author_id
|
||||
#self.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => self.course_id, :viewed => false)
|
||||
self.delay.send_message(m.user_id, self.course_id)
|
||||
count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Course' and shield_id=#{self.course_id}").count
|
||||
if count == 0
|
||||
ws = WechatService.new
|
||||
|
@ -189,6 +189,10 @@ class News < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
def send_message user_id, course_id
|
||||
self.course_messages << CourseMessage.new(:user_id => user_id, :course_id => course_id, :viewed => false)
|
||||
end
|
||||
|
||||
# Time 2015-03-31 13:50:54
|
||||
# Author lizanle
|
||||
# Description 删除news后删除对应的资源
|
||||
|
|
|
@ -6,15 +6,15 @@
|
|||
<p class="pro_page_tit" style="word-break:break-all;">
|
||||
<% case @issue.tracker_id %>
|
||||
<% when 1%>
|
||||
<span class="issues fl" title="缺陷"></span>
|
||||
<span class="fl" title="缺陷">【缺陷】</span>
|
||||
<% when 2%>
|
||||
<span class="issues-function fl" title="功能"></span>
|
||||
<span class="fl" title="功能">【功能】</span>
|
||||
<% when 3%>
|
||||
<span class="support fl" title="支持"></span>
|
||||
<span class="fl" title="支持">【支持】</span>
|
||||
<% when 4%>
|
||||
<span class="duty fl" title="任务"></span>
|
||||
<span class="fl" title="任务">【任务】</span>
|
||||
<% when 5%>
|
||||
<span class="weekly fl" title="周报"></span>
|
||||
<span class="fl" title="周报">【周报】</span>
|
||||
<% end %>
|
||||
</span> <span style="padding-left: 5px;"><%= @issue.subject %></span>
|
||||
<span class='<%= "#{get_issue_priority(@issue.priority_id)[0]} " %>'><%= get_issue_priority(@issue.priority_id)[1] %></span></p>
|
||||
|
|
|
@ -38,16 +38,16 @@
|
|||
</div>
|
||||
<div class="homepagePostTitle break_word">
|
||||
<% case activity.tracker_id %>
|
||||
<% when 1%>
|
||||
<span class="issues fl" title="缺陷"></span>
|
||||
<% when 1%>
|
||||
<span class="fl" title="缺陷">【缺陷】</span>
|
||||
<% when 2%>
|
||||
<span class="issues-function fl" title="功能"></span>
|
||||
<span class="fl" title="功能">【功能】</span>
|
||||
<% when 3%>
|
||||
<span class="support fl" title="支持"></span>
|
||||
<span class="fl" title="支持">【支持】</span>
|
||||
<% when 4%>
|
||||
<span class="duty fl" title="任务"></span>
|
||||
<span class="fl" title="任务">【任务】</span>
|
||||
<% when 5%>
|
||||
<span class="weekly fl" title="周报"></span>
|
||||
<span class="fl" title="周报">【周报】</span>
|
||||
<% end %>
|
||||
<%= link_to activity.subject.to_s, issue_path(activity), :class => "postGrey ml5" %>
|
||||
<span class='<%= get_issue_priority(activity.priority_id)[0] %>'>
|
||||
|
@ -100,4 +100,4 @@
|
|||
$(function(){
|
||||
user_card_show_hide();
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue