diff --git a/app/controllers/content_controller.rb b/app/controllers/content_controller.rb index 8fb40a4e..cc4dc7c9 100644 --- a/app/controllers/content_controller.rb +++ b/app/controllers/content_controller.rb @@ -334,11 +334,13 @@ class ContentController < ApplicationController # List all recently-deleted content def deleted + @maximum_recovery_time = current_user.on_premium_plan? ? 7.days : 48.hours + @content_pages = {} @activated_content_types.each do |content_type| - @content_pages[content_type] = content_type.constantize.with_deleted.where('deleted_at > ?', 24.hours.ago).where(user_id: current_user.id) + @content_pages[content_type] = content_type.constantize.with_deleted.where('deleted_at > ?', @maximum_recovery_time.ago).where(user_id: current_user.id) end - @content_pages["Document"] = current_user.documents.with_deleted.where('deleted_at > ?', 24.hours.ago) + @content_pages["Document"] = current_user.documents.with_deleted.where('deleted_at > ?', @maximum_recovery_time.ago) # Override controller @sidenav_expansion = 'my account' diff --git a/app/views/content/deleted.html.erb b/app/views/content/deleted.html.erb index fcd7bd29..f45aa5d5 100644 --- a/app/views/content/deleted.html.erb +++ b/app/views/content/deleted.html.erb @@ -1,17 +1,40 @@
- Pages can be "un-deleted" for up to 24 hours after deletion. - After this time, they are permanently deleted and cannot be recovered. - Use this page if you've accidentally deleted a page and need to recover it. -
++ Hello there! +
++ Whenever you delete a page from your notebook, it ends up here for a little while. + While a page is here, you can recover it at any time to add it back to your notebook. + If not recovered, the page will be automatically and permanently deleted. +
++ In other words, use this page if you've accidentally deleted a page and need to recover it. +
+-