<commit_before><%
/**
 * OpenCPS is the open source Core Public Services software
 * Copyright (C) 2016-present OpenCPS community
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
%>

<%@page import="org.opencps.servicemgt.util.ServiceUtil"%>
<%@page import="com.liferay.portal.kernel.log.LogFactoryUtil"%>
<%@page import="com.liferay.portal.kernel.log.Log"%>
<%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%>
<%@page import="org.opencps.dossiermgt.util.DossierMgtUtil"%>
<%@page import="org.opencps.util.ActionKeys"%>
<%@page import="org.opencps.dossiermgt.permissions.DossierPermission"%>
<%@page import="javax.portlet.PortletURL"%>
<%@page import="org.opencps.util.PortletUtil"%>
<%@page import="com.liferay.portal.kernel.language.LanguageUtil"%>

<%@ include file="../init.jsp"%>

<%
	String tabs1 = ParamUtil.getString(request, "tabs1", DossierMgtUtil.TOP_TABS_DOSSIER);
	PortletURL searchURL = renderResponse.createRenderURL();
	
	boolean isListServiceConfig = ParamUtil.getBoolean(request, "isListServiceConfig", false);
%>

<aui:nav-bar cssClass="custom-toolbar">

	<c:if test="<%=!isListServiceConfig %>">
		<aui:nav id="toolbarContainer" cssClass="nav-display-style-buttons pull-left font-pull" >
			<c:if test="<%=DossierPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_DOSSIER) 
				&& tabs1.equals(DossierMgtUtil.TOP_TABS_DOSSIER)%>">
				
				<portlet:renderURL var="addDossierURL" windowState="<%=LiferayWindowState.NORMAL.toString() %>">
					<portlet:param name="mvcPath" value="/html/portlets/dossiermgt/frontoffice/frontofficeservicelist.jsp"/>
					<portlet:param name="isListServiceConfig" value="<%=String.valueOf(true) %>"/>
					<portlet:param name="backURL" value="<%=currentURL %>"/>
				</portlet:renderURL>
				<aui:nav-item 
					id="addDictItem" 
					label="add-dossier" 
					iconCssClass="icon-plus"  
					href="<%=addDossierURL %>"
				/>
			</c:if>
		</aui:nav>
	</c:if>
	
	<aui:nav-bar-search cssClass="pull-right front-custom-select-search">
		<div class="form-search">
			<aui:form action="<%= searchURL %>" method="post" name="fm">

				<c:choose>
					<c:when test="<%=isListServiceConfig %>">
						<aui:row>
							<aui:col width="33">
								<datamgt:ddr 
									depthLevel="1" 
									dictCollectionCode="<%=ServiceUtil.SERVICE_DOMAIN %>" 
									name="serviceDomain"
									itemNames=""
									inlineField="<%=true%>"
									inlineLabel="left"
								/>
							</aui:col>
							<aui:col width="33">
								<datamgt:ddr 
									depthLevel="1" 
									dictCollectionCode="<%=ServiceUtil.SERVICE_ADMINISTRATION %>" 
									name="govAgency"
									itemNames=""
									inlineField="<%=true%>"
									inlineLabel="left"
								/>
							</aui:col>
							<aui:col width="33">
								<liferay-ui:input-search 
									id="keywords1"
									name="keywords"
									title="keywords"
									placeholder='<%= LanguageUtil.get(locale, "keywords") %>'
								/>
							</aui:col>
						</aui:row>
					</c:when>
					<c:otherwise>
						<c:if test="<%=tabs1.equals(DossierMgtUtil.TOP_TABS_DOSSIER) %>">
						<%
							searchURL.setParameter("mvcPath", templatePath + "frontofficedossierlist.jsp");
							searchURL.setParameter("tabs1", DossierMgtUtil.TOP_TABS_DOSSIER);
						%>
							<aui:row>
								<aui:col width="50">
									<aui:select name="dossierStatus" label="dossier-status" inlineField="<%=true %>" inlineLabel="left">
										<aui:option><liferay-ui:message key="dossier-status-fill"/></aui:option>
										<aui:option value="-1"><liferay-ui:message key="all"/></aui:option>
											<%
												for(Integer status : PortletUtil.getDossierStatus()){<commit_msg>Update toolbar search<commit_after><%
/**
 * OpenCPS is the open source Core Public Services software
 * Copyright (C) 2016-present OpenCPS community
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
%>

<%@page import="org.opencps.servicemgt.util.ServiceUtil"%>
<%@page import="com.liferay.portal.kernel.log.LogFactoryUtil"%>
<%@page import="com.liferay.portal.kernel.log.Log"%>
<%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%>
<%@page import="org.opencps.dossiermgt.util.DossierMgtUtil"%>
<%@page import="org.opencps.util.ActionKeys"%>
<%@page import="org.opencps.dossiermgt.permissions.DossierPermission"%>
<%@page import="javax.portlet.PortletURL"%>
<%@page import="org.opencps.util.PortletUtil"%>
<%@page import="com.liferay.portal.kernel.language.LanguageUtil"%>

<%@ include file="../init.jsp"%>

<%
	String tabs1 = ParamUtil.getString(request, "tabs1", DossierMgtUtil.TOP_TABS_DOSSIER);
	PortletURL searchURL = renderResponse.createRenderURL();
	
	boolean isListServiceConfig = ParamUtil.getBoolean(request, "isListServiceConfig", false);
%>

<aui:nav-bar cssClass="custom-toolbar">

	<c:if test="<%=!isListServiceConfig %>">
		<aui:nav id="toolbarContainer" cssClass="nav-display-style-buttons pull-left font-pull" >
			<c:if test="<%=DossierPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_DOSSIER) 
				&& tabs1.equals(DossierMgtUtil.TOP_TABS_DOSSIER)%>">
				
				<portlet:renderURL var="addDossierURL" windowState="<%=LiferayWindowState.NORMAL.toString() %>">
					<portlet:param name="mvcPath" value="/html/portlets/dossiermgt/frontoffice/frontofficeservicelist.jsp"/>
					<portlet:param name="isListServiceConfig" value="<%=String.valueOf(true) %>"/>
					<portlet:param name="backURL" value="<%=currentURL %>"/>
				</portlet:renderURL>
				<aui:nav-item 
					id="addDictItem" 
					label="add-dossier" 
					iconCssClass="icon-plus"  
					href="<%=addDossierURL %>"
				/>
			</c:if>
		</aui:nav>
	</c:if>
	
	<aui:nav-bar-search cssClass="pull-right front-custom-select-search">
		<div class="form-search">
			<aui:form action="<%= searchURL %>" method="post" name="fm">

				<c:choose>
					<c:when test="<%=isListServiceConfig %>">
						<aui:row>
							<aui:col width="30">
								<datamgt:ddr 
									depthLevel="1" 
									dictCollectionCode="<%=ServiceUtil.SERVICE_DOMAIN %>" 
									name="serviceDomain"
									inlineField="<%=true%>"
									inlineLabel="left"
									showLabel="<%=false%>"
									emptyOptionLabels="filter-by-service-domain"
									itemsEmptyOption="true"
								/>
							</aui:col>
							<aui:col width="30">
								<datamgt:ddr 
									depthLevel="1" 
									dictCollectionCode="<%=ServiceUtil.SERVICE_ADMINISTRATION %>" 
									name="govAgency"
									inlineField="<%=true%>"
									inlineLabel="left"
									showLabel="<%=false%>"
									emptyOptionLabels="filter-by-gov-agency"
									itemsEmptyOption="true"
								/>
							</aui:col>
							<aui:col width="30">
								<liferay-ui:input-search 
									id="keywords1"
									name="keywords"
									title="keywords"
									placeholder='<%= LanguageUtil.get(locale, "keywords") %>'
								/>
							</aui:col>
						</aui:row>
					</c:when>
					<c:otherwise>
						<c:if test="<%=tabs1.equals(DossierMgtUtil.TOP_TABS_DOSSIER) %>">
						<%
							searchURL.setParameter("mvcPath", templatePath + "frontofficedossierlist.jsp");
							searchURL.setParameter("tabs1", DossierMgtUtil.TOP_TABS_DOSSIER);
						%>
							<aui:row>
								<aui:col width="50">
									<aui:select name="dossierStatus" label="dossier-status" inlineField="<%=true %>" inlineLabel="left">
										<aui:option><liferay-ui:message key="dossier-status-fill"/></aui:option>
										<aui:option value="-1"><liferay-ui:message key="all"/></aui:option>
											<%
												for(Integer status : PortletUtil.getDossierStatus()){
{'fraction_non_alphanumeric': 0.15648421530774473, 'fraction_numerical': 0.004996593231887349, 'mean_word_length': 3.6870675891431612, 'pattern_counts': {'":': 0, '<': 149, '<?xml version=': 0, '>': 147, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2500930', 'n_tokens_mistral': 3807, 'n_tokens_neox': 2928, 'n_words': 513}