fix display of children notes in an empty note, closes #2536

This commit is contained in:
zadam 2022-01-09 09:12:21 +01:00
parent 0e9d76890b
commit f2732bcab7

View file

@ -40,10 +40,7 @@
<div id="noteClippedFrom">This note was originally clipped from <a href="<%= note.getLabelValue("pageUrl") %>"><%= note.getLabelValue("pageUrl") %></a></div>
<% } %>
<% if (note.type === 'book') { %>
<% } else if (isEmpty) { %>
<p>This note has no content.</p>
<% } else { %>
<% if (!isEmpty) { %>
<div id="content" class="type-<%= note.type %><% if (note.type === 'text') { %> ck-content<% } %>">
<%- content %>
</div>
@ -52,20 +49,21 @@
<% if (note.hasChildren()) { %>
<nav id="childLinks" class="<% if (isEmpty) { %>grid<% } else { %>list<% } %>">
<% if (!isEmpty) { %>
<div id="noteClippedFrom">
<hr>
<span>Child notes: </span>
<ul>
<% for (const childNote of note.getChildNotes()) { %>
<li>
<a href="<%= childNote.shareId %>"
class="type-<%= childNote.type %>"><%= childNote.title %></a>
</li>
<% } %>
</ul>
</div>
<% } %>
<ul>
<% for (const childNote of note.getChildNotes()) { %>
<li>
<a href="<%= childNote.shareId %>"
class="type-<%= childNote.type %>"><%= childNote.title %></a>
</li>
<% } %>
</ul>
</nav>
<% } else if (isEmpty) { %>
<p>This note has no content.</p>
<% } %>
</div>