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

<div class="system-msg" tal:condition="python:request.has_key('save')">
	Saved changes. (<span tal:replace="here/ZopeTime" />)
</div>

<p class="page-description" i18n:translate="">
	The list below presents the namespaces included in the RDF files generated from local channels.
</p>
<dl>
	<dd>If you want to add new ones fill the form below and click <em>Add</em>.</dd>
	<dd>In order to modify existing,
	click on the item and the form will be loaded with its properties; make sure to click <em>Update</em>
	when you're done.</dd>
	<dd>Subsequently, select the ones you want to delete and click the <em>Delete</em> button.</dd>
</dl>

<tal:block tal:define="record_id python:request.get('id', None); record_data python:here.getNamespaceItemData(record_id)">
<form method="post" tal:attributes="action python:test(record_data[0]=='add', 'manageAddNamespaceItem', 'manageUpdateNamespaceItem')">
<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]=='update'">
			<strong tal:content="python:record_data[1]">id</strong>
			<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">Prefix</td>
	<td><input type="text" name="prefix" tal:attributes="value python:record_data[2]" /></td>
</tr>
<tr>
	<td class="form-label">Value</td>
	<td><input type="text" name="value" size="50" tal:attributes="value python:record_data[3]" /></td>
</tr>
 <tr>
	<td class="form-label"></td>
	<td><input type="submit" tal:attributes="value python:test(record_data[0]=='add', 'Add', 'Update')" /></td>
 </tr>
</table>
</form>
</tal:block>

<form method="post" action="manageDeleteNamespaceItems">
<table border="0" cellspacing="0" cellpadding="4" width="100%">
<tr class="list-header">
	<td width="1%"></td>
	<td width="40%"><div class="cell-header">Namespace</div></td>
</tr>
<tr tal:repeat="record here/getNamespaceItemsList" 
	tal:attributes="class python:test(path('repeat/record/odd'), 'row-hilite', 'row-normal')">
	<td><input type="checkbox" name="id" tal:attributes="value record/id" /></td>
	<td><a tal:attributes="href string:manage_namespaces_html?id=${record/id}" tal:content="record">namespace</a></td>
</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" />
