<!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
	cat := objectContext objectForEntityNamed:'Category' wherePrimaryKeyValueIs:categoryID.
	globals setCategory:cat.
	objs := objectContext objectsForEntityNamed:'Organization' qualifierLocum:'categoryID == $catID' bindings:#{'catID' -> categoryID}.
	globals setOrganizations:objs.
}}

<body>
	<h2>{{localize 'Companies with %@ category', category.name}}</h2>
	<table width="100%">
		<tr>
			<td width="40%">Name</td>
			<td width="40%">Web</td>
			<td width="30%">City</td>
		</tr>
		{{foreach org organizations do}}
			<tr>
				<td width="40%"><a href="daylite4://ShowObject/Organization/{{org.organizationID}}">{{org.name}}</a></td>
				<td width="40%">{{org.defaultEmailAddress.url}}</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>