mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-02-08 09:33:37 +01:00
- Add display of content that was replied to/with - Instead of marking notifications new, only show new items and hide seen entries - Add a 'New Notifications' page and set it as default - Add proper display if there are no new notifications - Adjust theme to fit new changes
18 lines
588 B
Ruby
18 lines
588 B
Ruby
class NotificationsController < ApplicationController
|
|
before_filter :authenticate_user!
|
|
|
|
def index
|
|
@type = params[:type]
|
|
@notifications = if @type == 'all'
|
|
Notification.for(current_user)
|
|
elsif @type == 'new'
|
|
Notification.for(current_user).where(new: true)
|
|
else
|
|
Notification.for(current_user).where('LOWER(target_type) = ?', @type)
|
|
end.paginate(page: params[:page])
|
|
respond_to do |format|
|
|
format.html
|
|
format.js
|
|
end
|
|
end
|
|
end
|