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

<p class="page-title">Search</p>

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

<p class="page-description">
	The <em>Naaya </em> free text search will mark the items older than a certain age as <em>Old</em>.
	The search result will display a maximum amount of items on a page equal with the <em>Number of results</em>.
	Modify these parameters in the form below and click <em>Save</em>.
</p>

<form name="frmSettings" method="post" action="manageInternalSearch">
<table border="0" cellspacing="2" cellpadding="2" width="70%">
	<tr>
		<td class="form-label">Search age</td>
		<td><input type="text" name="search_age" size="3" tal:attributes="value here/getItemsAge" /> months</td>
	</tr>
	<tr>
		<td class="form-label">Number of results</td>
		<td><input type="text" name="results_number" size="3" tal:attributes="value here/getNumberOfResults" /></td>
	</tr>
	<tr>
		<td class="form-label" style="vertical-align: top">Searchable meta types</td>
		<td>
			<table border="0" cellspacing="2" cellpadding="2" width="100%">
				<tr>
					<th style="text-align: center"><strong>Zope objects</strong></th>
					<th style="text-align: center"><strong>Naaya objects</strong></th>
				</tr>
				<tr>
					<td width="50%" style="text-align: center">
						<select name="content" size="10" multiple="true">
							<option tal:repeat="item here/getProductsMetaTypes"
									tal:attributes="value item; selected python:item in here.searchable_content" 
									tal:content="item">Meta type</option>
						</select>
					</td>
					<td width="50%" style="text-align: center">
						<select name="content" size="10" multiple="true">
							<option tal:repeat="item python:here.get_meta_types(1)"
									tal:attributes="value item; selected python:item in here.searchable_content" 
									tal:content="item">Meta type</option>
						</select>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td></td>
		<td><input type="submit" name="submit" value="Save" /></td>
	</tr>
</table>
</form>

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