<% moment.lang("en"); var recentAnnotations = collection.models; %>

My recent notes

    <% qweriLodash.each(recentAnnotations, function(recentAnnotation) { %> <% var text = recentAnnotation.get('text'); var comment = recentAnnotation.get('comment'); var colorClass = recentAnnotation.get('color') + "-annotation"; var modificationDate = recentAnnotation.get('modificationDate'); var documentTitle = recentAnnotation.get('documentTitle'); if (text.length > 100) { text = text.substring(0, text.lastIndexOf(" ", 180)) + "..."; } var date = moment(modificationDate).format('LL'); var time = moment(modificationDate).format('LT'); %>
  1. <% var title = documentTitle; var titleClass = ""; if (qweriLodash.isEmpty(title)) { title = "Untitled"; titleClass = "untitled"; } %> <%= title %> on <%= date %> at <%= time %>
    <%= text %>
    <% if (!qweriLodash.isEmpty(comment)) { %>
    <%= comment %>
    <% } %>
  2. <% }); %>