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