<!DOCTYPE html>
<html lang="en">
<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>

{{fscript
	keyword := objectContext objectForEntityNamed:'Keyword' wherePrimaryKeyValueIs:keywordID.
	globals setKeyword:keyword.
	objs := objectContext objectsForEntityNamed:'Contact' qualifierLocum:'contactKeywords.keywordID == $kID' bindings:#{'kID' -> keywordID}.
	objs := (objs at:(objs cachedName sort)).
	globals setContacts:objs.
}}

<body>
	<h2>{{localize 'People with %@ keyword', keyword.name}}</h2>
	<table width="100%">
		<tr>
			<td width="40%">Name</td>
			<td width="40%">Email</td>
			<td width="30%">City</td>
		</tr>
		{{foreach contact contacts do}}
			<tr>
				<td width="40%"><a href="daylite4://ShowObject/Contact/{{contact.contactID}}">{{contact.cachedName}}</a></td>
				<td width="40%">{{contact.defaultEmailAddress.url}}</td>
				<td width="30%">{{contact.defaultGeoAddress.city}}</td>
			</tr>
		{{endforeach do}}
	</table>

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

</body>
</html>