anchor.diff:   * along with this program. If not, see <http://www.gnu.org/licenses/>.
    */
   %>
  +
  +<%@page import="org.opencps.dossiermgt.service.DossierLocalServiceUtil"%>
  +<%@page import="org.opencps.dossiermgt.model.Dossier"%>
  +<%@page import="org.opencps.util.DateTimeUtil"%>
   
   <%@page import="com.liferay.portal.kernel.servlet.SessionErrors"%>
   <%@page import="com.liferay.portal.kernel.servlet.SessionMessages"%>
  
positive.code: <portlet:actionURL var="cloneDossierFileURL" name="cloneDossierFile"/>
  
  <aui:form action="<%=cloneDossierFileURL.toString() %>" method="post" name="fmSelectDossierFile">
  	<liferay-ui:search-container 
  		searchContainer="<%= new DossierFileSearch(renderRequest, SearchContainer.DEFAULT_DELTA, iteratorURL) %>" 
  		headerNames="<%= headers %>"
  	>
  	
  		<liferay-ui:search-container-results>
  			<%
  				DossierFileSearchTerms searchTerms = (DossierFileSearchTerms)searchContainer.getSearchTerms();
  							
  					List<DossierFile> dossierFiles = new ArrayList<DossierFile>();
  					int totalCount = 0;
  					try {
  						dossierFiles = DossierFileLocalServiceUtil.searchDossierFile(scopeGroupId, citizen != null ? citizen.getMappingUserId() : 0, business != null ? business.getMappingOrganizationId() : 0, searchTerms.getKeywords(), templateFileNo, 0, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
  						totalCount = DossierFileLocalServiceUtil.countDossierFile(scopeGroupId, citizen != null ? citizen.getMappingUserId() : 0, business != null ? business.getMappingOrganizationId() : 0, searchTerms.getKeywords(), templateFileNo, 0);
  					} catch(Exception e){
  						
  					}
  				
  					total = totalCount;
  					results = dossierFiles;
  					
  					pageContext.setAttribute("results", results);
  					pageContext.setAttribute("total", total);				
  			%>
  		</liferay-ui:search-container-results>	
  			<liferay-ui:search-container-row 
  				className="org.opencps.dossiermgt.model.DossierFile" 
  				modelVar="dossierFile" 
  				keyProperty="dossierFileId"
  			>
  
  				<%-- <div class="row-fluid min-width10">
  						<div class="span12 bold">
  							<%=row.getPos() + 1 %>
  						</div>
  					</div> --%>
  				<liferay-util:buffer var="rowTicker">
  					<aui:input name="hiddenDossierFileId" type="hidden" value="<%=dossierFile.getDossierFileId() %>"	/>
  					<i class="fa fa-circle-o "></i>
  					
  				</liferay-util:buffer>
  				<%
  					row.addText(rowTicker);
  
  					row.addText(String.valueOf(row.getPos() + 1 + searchContainer.getStart()));
  					
  					// dossier file no column
  					row.addText(dossierFile.getDossierFileNo());
  									
  					// dossier display name column
  					row.addText(dossierFile.getDisplayName());
  
  				//	row.addButton(LanguageUtil.get(locale, "select"), "javascript:" + renderResponse.getNamespace() + "selectDossierFile(" + dossierFile.getDossierFileId() +")");
  					
  				%>	
  			</liferay-ui:search-container-row> 
  		
  		<liferay-ui:search-iterator type="opencs_page_iterator"/>
  	</liferay-ui:search-container>
  	<aui:input name="cloneDossierFileId" type="hidden"/>
  	<aui:input name="redirectURL" type="hidden" value="<%=Validator.isNull(redirectURL) ? currentURL : redirectURL %>"/>
  	<aui:input name="<%=DossierDisplayTerms.DOSSIER_ID %>" type="hidden" value="<%=dossierId %>"/>
  	<aui:input name="groupDossierPartId" type="hidden" value="<%=groupDossierPartId %>"/>
  	<aui:input name="<%=DossierFileDisplayTerms.DOSSIER_FILE_ID %>" type="hidden" value="<%=dossierFileId %>"/>
  	<aui:input name="<%=DossierDisplayTerms.FILE_GROUP_ID %>" type="hidden" value="<%=fileGroupId %>"/>
  	<aui:input name="<%=DossierFileDisplayTerms.DOSSIER_PART_ID %>" type="hidden" value="<%=dossierPartId %>"/>
  	<aui:input name="<%=DossierFileDisplayTerms.DOSSIER_FILE_ORIGINAL %>" type="hidden" value="<%=String.valueOf(PortletConstants.DOSSIER_FILE_ORIGINAL) %>"/>
  	<aui:input name="<%=DossierFileDisplayTerms.DOSSIER_FILE_TYPE %>" type="hidden" value="<%=String.valueOf(PortletConstants.DOSSIER_FILE_TYPE_INPUT) %>"/>
  	<aui:input name="<%=DossierFileDisplayTerms.GROUP_NAME %>" type="hidden" value="<%=groupName %>"/>
  
  	<aui:input name="receiveHiddenDossierFile" type="hidden" />
  	<aui:row>
  		<aui:button  name="btnAccept" value="agree" cssClass="btn-primary"/>
  		<aui:button name="btnCancel" value="cancel"/>
  	</aui:row>
  </aui:form>
  
  <aui:script>
  
negative.code: 	String modalDialogId = ParamUtil.getString(request, "modalDialogId");
  	
  	String redirectURL = ParamUtil.getString(request, "redirectURL");
  	
  	PortletURL iteratorURL = renderResponse.createRenderURL();
  	iteratorURL.setParameter("mvcPath", templatePath + "dossier_file.jsp");
  