diff --git a/app/controllers/documents_controller.rb b/app/controllers/documents_controller.rb index e89a3efa..89b2a02a 100644 --- a/app/controllers/documents_controller.rb +++ b/app/controllers/documents_controller.rb @@ -16,7 +16,8 @@ class DocumentsController < ApplicationController def index @page_title = "My documents" - @documents = @current_user_content['Document'] + @documents = @current_user_content.fetch('Document', []) + @recent_documents = current_user.linkable_documents.order('updated_at DESC') end def show @@ -234,18 +235,18 @@ class DocumentsController < ApplicationController @navbar_actions = [] return unless user_signed_in? - if @current_user_content && @current_user_content['Document'].present? - @navbar_actions << { - label: "Your #{@current_user_content['Document'].count} Document#{'s' unless @navbar_actions == 1}", - href: documents_path - } - end + # if @current_user_content && @current_user_content['Document'].present? + # @navbar_actions << { + # label: "Your #{@current_user_content['Document'].count} Document#{'s' unless @navbar_actions == 1}", + # href: documents_path + # } + # end - @navbar_actions << { - label: "New Document", - href: new_document_path, - target: '_blank' - } + # @navbar_actions << { + # label: "New Document", + # href: new_document_path, + # target: '_blank' + # } end def set_footer_visibility diff --git a/app/views/content/list/_cards.html.erb b/app/views/content/list/_cards.html.erb index 285d10c9..03dd14dc 100644 --- a/app/views/content/list/_cards.html.erb +++ b/app/views/content/list/_cards.html.erb @@ -97,39 +97,41 @@ <% end %> - <% if current_user.can_create?(content_type) %> -
- add + <% if local_assigns.fetch(:show_new_button, true) %> + <% if current_user.can_create?(content_type) %> +
+ add +
+ + New+ <%= content_type.icon %> +
++ An active + <%= link_to 'Notebook.ai Premium', subscription_path, class: 'blue-text text-darken-2' %> subscription + is required to create additional + <%= content_type.name.downcase %> pages, but pages you've already created will always + be available here.
- - New- <%= content_type.icon %> -
-- An active - <%= link_to 'Notebook.ai Premium', subscription_path, class: 'blue-text text-darken-2' %> subscription - is required to create additional - <%= content_type.name.downcase %> pages, but pages you've already created will always - be available here. -
-