...
This commit is contained in:
parent
8fcf7ac7a8
commit
a456616212
|
@ -15,11 +15,10 @@ class ActivityNotifysController < ApplicationController
|
|||
end
|
||||
|
||||
if( query != nil )
|
||||
logger.info('xxoo')
|
||||
limit = 10;
|
||||
@obj_count = query.count();
|
||||
@obj_pages = Paginator.new @obj_count,limit,params['page']
|
||||
list = query.order('id desc').limit(limit).offset(@obj_pages.offset).all();
|
||||
list = query.order('is_read,id desc').limit(limit).offset(@obj_pages.offset).all();
|
||||
events=[];
|
||||
for item in list
|
||||
event = item.activity;
|
||||
|
@ -29,7 +28,6 @@ class ActivityNotifysController < ApplicationController
|
|||
end
|
||||
@events_by_day = events.group_by {|event| User.current.time_to_date(event.event_datetime)}
|
||||
@controller_name = 'ActivityNotifys'
|
||||
logger.info('aavv')
|
||||
end
|
||||
respond_to do |format|
|
||||
format.html {render :template => 'courses/show', :layout => 'base_courses'}
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
<a class="fl about_me" href="<%=course_path(@course)%>"><%= l(:label_activity)%></a>
|
||||
<h2 class="fl project_h2">与我相关</h2>
|
||||
<div class="fr mt10 mr5 c_grey02">
|
||||
<label class="mr5" style="cursor:pointer;" data-href="<%= course_activity_notifys_path(@course) %>/chang_read_flag" nhname='nh_act_link_all'>全部标为已读</label>
|
||||
<a class="c_dblue">
|
||||
<label class="mr5" style="cursor:pointer;" data-href="<%= course_activity_notifys_path(@course) %>/chang_read_flag" nhname='nh_act_link_all'>全部标为已读</label>
|
||||
</a>
|
||||
</div>
|
||||
<% else %>
|
||||
<h2 class="fl project_h2"><%= l(:label_activity)%></h2>
|
||||
|
|
Loading…
Reference in New Issue