<%
	import org.exoplatform.webui.application.WebuiRequestContext;
	import org.exoplatform.webui.application.portlet.PortletRequestContext;
	import org.exoplatform.wcm.webui.Utils;
	
	def rcontext = _ctx.getRequestContext() ;
	String portletId = Utils.getRealPortletId(rcontext);
	def quickEditingBlockId = portletId + "-QuickEditingBlock";
	def jsManager = rcontext.getJavascriptManager();
	//jsManager.importJavascript('eXo.wcm.frontoffice.private.QuickEdit', '/eXoWCMResources/javascript/') ;
	//jsManager.addOnLoadJavascript('eXo.ecm.QuickEdit.removeQuickeditingBlock("' + portletId + '","' + quickEditingBlockId + '")');
	String fieldName;
%>
<div class="UIForm $uicomponent.id">
  <%uiform.begin()%>
  <div class="HorizontalLayout">
    <div class="FormContainer">
      <table class="UIFormGrid">
	      	<tr>
			      <td class="FieldLabel">
				      <%=uicomponent.getLabel(uiform.getChildById(uicomponent.ITEMS_PER_PAGE_SELECTOR).getName()) %>
			      </td>
						<td class="FieldComponent" colspan="2"><% uiform.renderField(uiform.getChildById(uicomponent.ITEMS_PER_PAGE_SELECTOR)); %></td>
					</tr>
	      	<tr>
			      <td class="FieldLabel">
				      <%=uicomponent.getLabel(uiform.getChildById(uicomponent.PAGE_MODE_SELECTOR).getName()) %>
			      </td>
						<td class="FieldComponent" colspan="2"><% uiform.renderField(uiform.getChildById(uicomponent.PAGE_MODE_SELECTOR)); %></td>
					</tr>
					<tr>
			      <td class="FieldLabel">
				      <%=uicomponent.getLabel(uiform.getChildById(uicomponent.SEARCH_FORM_TEMPLATE_SELECTOR).getName()) %>
			      </td>
						<td class="FieldComponent" colspan="2"><% uiform.renderField(uiform.getChildById(uicomponent.SEARCH_FORM_TEMPLATE_SELECTOR)); %></td>				
					</tr>
					<tr>
			      <td class="FieldLabel">
				      <%=uicomponent.getLabel(uiform.getChildById(uicomponent.SEARCH_RESULT_TEMPLATE_SELECTOR).getName()) %>
			      </td>
						<td class="FieldComponent" colspan="2"><% uiform.renderField(uiform.getChildById(uicomponent.SEARCH_RESULT_TEMPLATE_SELECTOR)) ;%></td>								
					</tr>					

					<tr>
			      <td class="FieldLabel">
				      <%=uicomponent.getLabel(uiform.getChildById(uicomponent.SEARCH_PAGE_LAYOUT_SELECTOR).getName()) %>
			      </td>
						<td class="FieldComponent" colspan="2"><% uiform.renderField(uiform.getChildById(uicomponent.SEARCH_PAGE_LAYOUT_SELECTOR)); %></td>								
					</tr>											
					<tr>
				      <td class="FieldLabel">
					      <%=uicomponent.getLabel(uiform.getChildById(uicomponent.BASE_PATH_INPUT_SET_ACTION).getName()) %>
				      </td>
					  <td class="FieldComponent"><% uiform.renderField(uiform.getChildById(uicomponent.BASE_PATH_INPUT_SET_ACTION)); %></td>
					  <td class="SelectTargetPageIcon" onclick="<%=uicomponent.event("SelectBasePath")%>"><span></span></td>													
					</tr>		
	      </table>  
      <div class="UIAction"> 
			  <% for(action in uicomponent.getActions()) { 
				 String actionLabel = _ctx.appRes(uicomponent.getName() + ".action." + action) ;
			   String link = uicomponent.event(action) ;
				%>
					  <a onclick="$link" class="ActionButton LightBlueStyle" href="javascript:void(0);">$actionLabel</a>
			   <%}%>        
			</div>
    </div>
  </div>
  <%uiform.end()%>
</div>
