Merge branch 'yuanke_youhua' into develop
This commit is contained in:
commit
3c81c4ccad
|
@ -162,7 +162,7 @@ class JournalsForMessage < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def reset_counters!
|
||||
self.class.reset_counters!(self)
|
||||
# self.class.reset_counters!(self)
|
||||
end
|
||||
def self.reset_counters! journals_for_messages
|
||||
# jfm_id = journals_for_messages.id.to_i
|
||||
|
|
|
@ -1186,7 +1186,7 @@ class User < Principal
|
|||
end
|
||||
end
|
||||
private
|
||||
|
||||
|
||||
def act_as_activity
|
||||
self.acts << Activity.new(:user_id => self.id)
|
||||
end
|
||||
|
@ -1205,6 +1205,12 @@ class User < Principal
|
|||
|
||||
#为新注册用户发送留言
|
||||
def add_new_jour
|
||||
self.delay.add_new_jour_delay
|
||||
end
|
||||
|
||||
#为新注册用户发送留言
|
||||
def add_new_jour_delay
|
||||
Rails.logger.info "add_new_jour_delay!!!!!!!!!"
|
||||
if Setting.find_by_name("hidden_non_project") && Setting.find_by_name("hidden_non_project").value != "0"
|
||||
if Message.where("id=19504").any? and Message.where("id=19291").any? and Message.where("id=19292").any?
|
||||
lead_message1 = Message.find(19292)
|
||||
|
|
|
@ -68,20 +68,13 @@
|
|||
<% end %>
|
||||
</td>
|
||||
<td class="center">
|
||||
<% if(journal.m_reply_count) %>
|
||||
<%case journal.jour_type %>
|
||||
<% when 'Principal' %>
|
||||
<%= link_to(journal.m_reply_count, feedback_path(journal.jour_id)) %>
|
||||
<% when 'Course' %>
|
||||
<%= link_to(journal.m_reply_count, course_feedback_path(journal.jour_id)) %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%case journal.jour_type %>
|
||||
<% when 'Principal' %>
|
||||
<%= link_to(0, feedback_path(journal.jour_id)) %>
|
||||
<% when 'Course' %>
|
||||
<%= link_to(0, course_feedback_path(journal.jour_id)) %>
|
||||
<% end %>
|
||||
<% replys = JournalsForMessage.where(:m_parent_id=>journal.id) %>
|
||||
<% reply_count = replys.nil? ? 0:replys.count %>
|
||||
<%case journal.jour_type %>
|
||||
<% when 'Principal' %>
|
||||
<%= link_to(reply_count, feedback_path(journal.jour_id)) %>
|
||||
<% when 'Course' %>
|
||||
<%= link_to(reply_count, course_feedback_path(journal.jour_id)) %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in New Issue