<!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:'Organization' qualifierLocum:'keywordOrganizations.keywordID == $kID' bindings:#{'kID' -> keywordID}.
	objs := (objs at:(objs name sort)).
	globals setOrganizations:objs.
}}

<body>
	<h2>{{localize 'Companies with %@ keyword', keyword.name}}</h2>
	<table width="100%">
		<tr>
			<td width="70%">Name</td>
			<td width="30%">City</td>
		</tr>
		{{foreach org organizations do}}
			<tr>
				<td width="70%"><a href="daylite4://ShowObject/Organization/{{org.organizationID}}">{{org.name}}</a></td>
				<td width="30%">{{org.defaultGeoAddress.city}}</td>
			</tr>
		{{endforeach do}}
	</table>

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

</body>
</html>