<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/WEB-INF/jspf/taglibs.jsp"%>

<h2>${l.l('Найдено')}: ${form.page.recordCount}, ${l.l('отображено')}: ${frd.list.size()}</h2>

<table class="data">
	<tr>
		<td>&nbsp;</td>
		<td>ID</td>
		<td width="100%">${l.l('Title')}</td>
		<td>${l.l('Type')}</td>
	</tr>

	<c:set var="customerLinkRoleConfig" value="${ctxSetup.getConfig('ProcessCustomerLinkRoleConfig')}"/>

	<c:forEach var="item" items="${frd.list}">
		<tr>
			<td>
				<html:form action="/user/link">
					<input type="hidden" name="method" value="addLink"/>
					<input type="hidden" name="objectType" value="process"/>
					<input type="hidden" name="id" value="${form.param.processId}"/>
					<input type="hidden" name="linkedObjectId" value="${item.id}"/>
					<input type="hidden" name="linkedObjectTitle" value="${u.escapeXml(item.title)}"/>
					<input type="hidden" name="linkedObjectType" value="customer"/>
					<input type="checkbox" name="check"/>
				</html:form>
			</td>
			<td>${item.id}</td>
			<td><ui:customer-link id="${item.id}" text="${item.title}"/></td>
			<td nowrap="nowrap">
				<ui:combo-single style="width: 100%;" list="${customerLinkRoleConfig.list}" onSelect="$$.process.link.customerRoleChanged(this)"/>
			</td>
		</tr>
	</c:forEach>
</table>


