-
<%= link_to main_app.documents_path, class: 'logo-container white-text' do %>
<%= Document.icon %>
Documents
<% end %>
-
-
<%= link_to main_app.documents_path, class: 'waves-effect' do %>
file_copy
View all documents
<%= @current_user_content.fetch('Document', []).count %>
<% end %>
-
<%= link_to main_app.new_document_path, class: 'waves-effect' do %>
note_add
New document
<% end %>
<%
folder = @document.folder
if folder
%>
-
-
<%= link_to folder, class: 'waves-effect' do %>
<%= Folder.icon %>
<%= folder.title %>
<% end %>
<% Document.where(folder_id: folder.id).where.not(id: @document.id).order('updated_at DESC').each do |document| %>
-
<%= link_to edit_document_path(document), class: 'waves-effect tooltipped', data: { tooltip: "Last edited #{time_ago_in_words document.updated_at} ago", position: 'right' } do %>
<%= Document.icon %>
<%= document.title %>
<% end %>
<% end %>
<% end %>
<%
other_folders = current_user.folders.where(context: 'Document').where.not(id: @document.folder_id).order('title ASC')
if other_folders.any?
%>
-
<% other_folders.each do |folder| %>
-
<%= link_to folder, class: 'waves-effect' do %>
<%= Folder.icon %>
<%= folder.title %>
<% end %>
<% end %>
<% end %>
-
<% @current_user_content.fetch('Document', []).each do |document| %>
-
<%= link_to edit_document_path(document), class: 'waves-effect tooltipped', data: { tooltip: "Last edited #{time_ago_in_words document.updated_at} ago", position: 'right' } do %>
<%= Document.icon %>
<%= document.title %>
<% end %>
<% end %>