<!DOCTYPE html>
<html lang="en">

{{fscript
	notes := selectedObjects sortedArrayUsingDescriptors:{(NSSortDescriptor sortDescriptorWithKey:'createDate' ascending:true)}.
	globals setNotesForDisplay:notes.
}}

<head>
	<meta charset="utf-8">
	<link rel="stylesheet" href="{{framework}}/default.css" type="text/css" charset="utf-8">
	<link rel="stylesheet" href="{{framework}}/screen.css" type="text/css" charset="utf-8" media="screen">
	<link rel="stylesheet" href="{{framework}}/print.css" type="text/css" charset="utf-8" media="print">
	
</head>


<body>
	<h2>{{localize 'Notes'}}</h2>

	<table>
		{{foreach note notesForDisplay do}}
			<tr>
			<td>
				<table>
					<tr>
						<td>
						Note Title: <b>{{note.title}}</b>
						</td>
						<td>
						Modify Date: <b>{{note.modifyDate.mcShortDate}}</b>
						</td>
						<td>
						Create Date: <b>{{note.createDate.mcShortDate}}</b>
						</td>
					</tr>
				</table>
				<br>
				Content:</b><br><br>
				{{fscript	
					htmlString := NSAttributedString htmlRepresenation:(note attributedStringRepresentation).
					htmlString.
				}}
				
				<br><br><br><br><br>
			</td>
			</tr>{{endforeach do}}	
	</table>

	<br>
	<br>
	<div id="reportfooter">
	{{localize 'Generated by %@ on %@', objectContext.user.contact.cachedName, date}}.		
	</div>

</body>
</html>