mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
more polish
This commit is contained in:
parent
8abeb228bb
commit
a86d3ff07a
@ -19,7 +19,7 @@ class DocumentsController < ApplicationController
|
||||
def index
|
||||
@page_title = "My documents"
|
||||
@recent_documents = current_user.linkable_documents.order('updated_at DESC').limit(6).to_a
|
||||
@documents = current_user.linkable_documents.where(folder_id: nil).order('favorite DESC, title ASC, updated_at DESC').to_a
|
||||
@documents = current_user.linkable_documents.order('favorite DESC, title ASC, updated_at DESC').to_a
|
||||
@folders = current_user.folders.where(context: 'Document', parent_folder_id: nil)
|
||||
|
||||
if params.key?(:favorite_only)
|
||||
|
||||
@ -13,4 +13,8 @@ class Folder < ApplicationRecord
|
||||
def self.icon
|
||||
'folder'
|
||||
end
|
||||
|
||||
def to_param
|
||||
self.id.to_s + '-' + PageTagService.slug_for(self.title)
|
||||
end
|
||||
end
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
<%= render partial: 'folders/list', locals: { folders: @folders } %>
|
||||
|
||||
<div class="row">
|
||||
<h5>Documents</h5>
|
||||
<h5>All Documents (<%= @documents.count %>)</h5>
|
||||
<%= render partial: 'content/components/list_filter_bar', locals: { content_type: Document } %>
|
||||
<%= render partial: 'content/list/document_table', locals: { content_list: @documents, content_type: Document } %>
|
||||
<%# render partial: 'notice_dismissal/messages/02' %>
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<h5>Folders</h5>
|
||||
<h5>Folders (<%= folders.count %>)</h5>
|
||||
</div>
|
||||
<% folders.each do |folder| %>
|
||||
<div class="col s12 m3 l2">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user