<span tal:replace="structure here/manage_page_header" />
<span tal:replace="structure here/manage_tabs" />

<p class="form-help">
	Channel types.
</p>

<tal:block tal:define="record_id python:request.get('id', None); record_data python:here.get_channeltype_item_data(record_id)">
<form method="post" tal:attributes="action python:test(record_data[0]=='add', 'manage_add_channeltype_item', 'manage_edit_channeltype_item')">
<table border="0" cellspacing="2" cellpadding="2" width="100%">
	<tr>
		<td class="form-label" width="20%">Id</td>
		<td width="80%">
			<tal:block tal:condition="python:record_data[0]=='edit'">
				<strong tal:content="python:record_data[1]" />
				<input type="hidden" name="id" tal:attributes="value python:record_data[1]" />
			</tal:block>
			<tal:block tal:condition="python:record_data[0]=='add'">
				<input type="text" name="id" tal:attributes="value python:record_data[1]" />
			</tal:block>
		</td>
	</tr>
	<tr>
		<td class="form-label">Title</td>
		<td><input type="text" name="title" size="50" tal:attributes="value python:record_data[2]" /></td>
	</tr>
	<tr>
		<td></td>
		<td>
			<input type="submit" tal:attributes="value python:test(record_data[0]=='add', 'Add', 'Save changes')" />
			<input type="button" value="New" onclick="javascript:document.location.href='manage_channeltypes_html'" />
		</td>
	</tr>
</table>
</form>
</tal:block>

<form method="post" action="manage_delete_channeltypes">
<table border="0" cellspacing="0" cellpadding="4" width="100%">
	<tr class="list-header">
		<td width="1%"></td>
		<td width="50%">Id</td>
		<td width="50%">Title</td>
	</tr>
	<tr tal:repeat="record here/get_channeltypes_list" 
		tal:attributes="class python:test(path('repeat/record/odd'), 'row-hilite', 'row-normal')">
		<td><input type="checkbox" name="ids" tal:attributes="value record/id"></td>
		<td><a tal:attributes="href string:manage_channeltypes_html?id=${record/id}" tal:content="record/id" /></td>
		<td tal:content="record/title" />
	</tr>
	<tr>
		<td></td>
		<td colspan="2"><input type="submit" name="delete" value="Delete" /></td>
	</tr>
</table>
</form>

<span tal:replace="structure here/manage_page_footer" />
