  [% META title = 'Admin &raquo; Parent Organisations &raquo; Search' -%]

    [% # PROCESS dumper.tt dump = parents %]

	[% PROCESS admin/referral_nav.tt page = 'parent-organisations' %]
	
	<h2>Parent organisations:</h2>
    [% PROCESS site/page_count.tt %]
	
	<div class="indent">
		<table>
			<tr>
				<td>&nbsp;</td>
				<th>Parent Code</th>
				<th>Description</th>
				<th>Location Type</th>
				<td>&nbsp;</td>
			</tr>

		[% FOREACH org IN parents %]
			<tr>
				<td>
                    [%
						IF cgi_pager; cgi_pager.first_pos_displayed + loop.count - 1;
						ELSE; loop.count; END;
					%]
				<td>
					<input type="text" size="5" value="[% org.parent_code %]"
						[% site.html.disabled %] />
				</td>
				<td>
					<input type="text" size="60" value="[% org.description | upper %]"
						[% site.html.disabled %] />
				</td>
				<td>
					<input type="text" size="10" value="[% org.referral_type.description %]"
						[% site.html.disabled %] />
				</td>
				<td align="center">
					<a href="[% app_url %]/config/parent-organisations/edit/[% org.id %]">Edit</a>
				</td>
			 </tr>
		[% END %]

		</table>
	</div>

    [% PROCESS site/cgi_pager.tt %]
	
	<h3>Search again</h3>
	<div class="indent">
		[% PROCESS search/parent_organisation_search.tt %]
	</div>