time to sleep

This commit is contained in:
Andrew Brown 2019-07-26 03:02:10 -05:00
parent 59b8b4c704
commit 0cae9994aa
3 changed files with 32 additions and 17 deletions

View File

@ -26,6 +26,10 @@ class DocumentsController < ApplicationController
.includes(:entity)
.order('entity_type asc')
@navbar_actions.unshift({
label: 'Edit this document',
href: edit_document_path(@document)
})
@navbar_actions.unshift({
label: (@document.name || 'Untitled document'),
href: document_path(@document)

View File

@ -98,22 +98,24 @@
</ul>
<% end %>
<div class="smart-sidebar hide-on-med-and-down">
<div class="entities-container">
<div class="grey-text center">Quick reference</div>
<% @linked_entities.each do |entity| %>
<% entity_class = entity.entity_type.constantize %>
<% linked_entity = entity.entity %>
<% next unless linked_entity.present? %>
<% if @linked_entities.any? %>
<div class="smart-sidebar hide-on-med-and-down">
<div class="entities-container">
<div class="grey-text center">Quick reference</div>
<% @linked_entities.each do |entity| %>
<% entity_class = entity.entity_type.constantize %>
<% linked_entity = entity.entity %>
<% next unless linked_entity.present? %>
<a href="#"
class="hoverable entity-trigger sidenav-trigger white-text <%= entity_class.color %>"
data-target="quick-reference-<%= entity.entity_type %>-<%= entity.entity_id %>">
<i class="material-icons small left">
<%= entity_class.icon %>
</i>
<%= entity.linked_name_if_possible %>
</a>
<% end %>
<a href="#"
class="hoverable entity-trigger sidenav-trigger white-text <%= entity_class.color %>"
data-target="quick-reference-<%= entity.entity_type %>-<%= entity.entity_id %>">
<i class="material-icons small left">
<%= entity_class.icon %>
</i>
<%= entity.linked_name_if_possible %>
</a>
<% end %>
</div>
</div>
</div>
<% end %>

9
tomorrow.txt Normal file
View File

@ -0,0 +1,9 @@
Still to do:
- [ ] Auto-create document entities when @mentioning
- hmm, tie DE to doc instead of DA?
- [ ] Optimize serializer wrt linked fields (!!!)
- [ ] Optimize serializer wrt multiple pages (!!!)
- [ ] Gallery in quick reference
- [ ] Random image in quick reference header
- [ ] Add a manual "Add quick reference" link+modal on doc#edit list
- [ ] Enable copy/paste from quick reference