<commit_before><ui:composition template="/templates/default.xhtml"
				xmlns="http://www.w3.org/1999/xhtml"
				xmlns:h="http://java.sun.com/jsf/html"
				xmlns:f="http://java.sun.com/jsf/core"
				xmlns:fn="http://java.sun.com/jsp/jstl/functions"
				xmlns:ui="http://java.sun.com/jsf/facelets"
				xmlns:c="http://java.sun.com/jstl/core"
				xmlns:sec="http://www.springframework.org/security/facelets/tags">
	<ui:define name="title">OpenHDS - History</ui:define>
	
	<ui:param name="hideTabBar" value="true" />
	
	<ui:define name="display">
  <style>
		.base-table {
			border:0px solid #98BF21;
			border-collapse:collapse;
			border-color:#888;
			table-layout:fixed;
			margin-bottom:2em;
		}
		   		
		.base-table th {
		   	background-color:#B9D264;
			font-weight:bold;
			font-size:.9em;
			overflow:hidden;
		 }
		   		
		.base-table td {
		   	padding:5px 5px 5px;
		   	text-align:center;
		 }
		   		
		.base-table a {
		   	width:100%;
			border:0;
		 }
		   		
		 .base-table .alt {
		   	background-color:#CCC;
		 }
		   		
		.base-table .alt-col {
			width:40%;
		 }
		 
		.base-table-center {
		   	margin:0 auto;
		 }
	</style>
	
    	<sec:ifNotGranted roles="VIEW_ENTITY">
    		<h1>#{msg.accessDenied}</h1>
    		<p>#{msg.accessDeniedException}</p>
    	</sec:ifNotGranted>
    	
    	<sec:ifAllGranted roles="VIEW_ENTITY">
    	
    		<h:outputText value="#{navController.breadcrumbTrail}" />

	        <h1><h:outputText value="#{msg.historyName}" /></h1>
	        <h:messages id="errors" globalOnly="true" />
	        <h:form id="form">
	
			<h:panelGrid columns="3" >
		 		<h:outputText value="#{msg.individualId}:" />
		       	<h:inputText styleClass="individual" autocomplete="off" id="indivId" value="#{individualHistoryBean.individualExtId}" converter="#{defaultConverter}" />
				<h:message for="indivId" errorClass="error" errorStyle="color: red" infoStyle="color: green"/>
		    </h:panelGrid>  
		    <script>
            	document.getElementById('form:indivId').focus();
  			</script> 
		    
			<h:commandButton id="selectBtn" value="#{msg.lblSelect}" action="setIndividual" rendered="#{flowScope.step == 0}"/>
			<h:commandButton id="resetBtn" value="#{msg.lblClear}" action="finish" rendered="#{flowScope.step > 0}" immediate="true"/>
	        <br /><br />
	        
	        <div align="center">
		        <c:if test="#{fn:length(individualHistoryBean.memberships) == 0 and flowScope.step > 0}" >
		        	<h:outputText value="#{msg.membershipEmpty}" /><br /><br />
		        </c:if>
		                        
	        	<h:panelGroup rendered="#{fn:length(individualHistoryBean.memberships) > 0}">
		  			<h:dataTable value="#{individualHistoryBean.memberships}" var="membership"
		  				styleClass="base-table" rowClasses=",alt" columnClasses="alt-col,">	
		  			    <f:facet name="header">
                            <h:outputText value="#{msg.historyMembership}" />
                        </f:facet>
			  			<h:column headerClass="width1">
	                        <f:facet name="header">
	                            <h:outputText value="#{msg.socialGroupId}" />
	                        </f:facet>
	                        <h:outputText value="#{membership.socialGroup.extId}" />
                      	 </h:column>	
			  			 <h:column headerClass="width1">
	                        <f:facet name="header">
	                            <h:outputText value="#{msg.membershipRelationToHead}" /><commit_msg>Display Individual info on main screen in Individual history<commit_after><ui:composition template="/templates/default.xhtml"
				xmlns="http://www.w3.org/1999/xhtml"
				xmlns:h="http://java.sun.com/jsf/html"
				xmlns:f="http://java.sun.com/jsf/core"
				xmlns:fn="http://java.sun.com/jsp/jstl/functions"
				xmlns:ui="http://java.sun.com/jsf/facelets"
				xmlns:c="http://java.sun.com/jstl/core"
				xmlns:sec="http://www.springframework.org/security/facelets/tags">
	<ui:define name="title">OpenHDS - History</ui:define>
	
	<ui:param name="hideTabBar" value="true" />
	
	<ui:define name="display">
  <style>
		.base-table {
			border:0px solid #98BF21;
			border-collapse:collapse;
			border-color:#888;
			table-layout:fixed;
			margin-bottom:2em;
		}
		   		
		.base-table th {
		   	background-color:#B9D264;
			font-weight:bold;
			font-size:.9em;
			overflow:hidden;
		 }
		   		
		.base-table td {
		   	padding:5px 5px 5px;
		   	text-align:center;
		 }
		   		
		.base-table a {
		   	width:100%;
			border:0;
		 }
		   		
		 .base-table .alt {
		   	background-color:#CCC;
		 }
		   		
		.base-table .alt-col {
			width:40%;
		 }
		 
		.base-table-center {
		   	margin:0 auto;
		 }
	</style>
	
    	<sec:ifNotGranted roles="VIEW_ENTITY">
    		<h1>#{msg.accessDenied}</h1>
    		<p>#{msg.accessDeniedException}</p>
    	</sec:ifNotGranted>
    	
    	<sec:ifAllGranted roles="VIEW_ENTITY">
    	
    		<h:outputText value="#{navController.breadcrumbTrail}" />

	        <h1><h:outputText value="#{msg.historyName}" /></h1>
	        <h:messages id="errors" globalOnly="true" />
	        <h:form id="form">
	
			<h:panelGrid columns="3" >
		 		<h:outputText value="#{msg.individualId}:" />
		       	<h:inputText styleClass="individual" autocomplete="off" id="indivId" value="#{individualHistoryBean.individualExtId}" converter="#{defaultConverter}" />
				<h:message for="indivId" errorClass="error" errorStyle="color: red" infoStyle="color: green"/>
		    </h:panelGrid>  
		    <script>
            	document.getElementById('form:indivId').focus();
  			</script> 
		    
			<h:commandButton id="selectBtn" value="#{msg.lblSelect}" action="setIndividual" rendered="#{flowScope.step == 0}"/>
			<h:commandButton id="resetBtn" value="#{msg.lblClear}" action="finish" rendered="#{flowScope.step > 0}" immediate="true"/>
	        <br /><br />
	        
	        <div align="center">
	        
	        	<c:if test="${empty individualHistoryBean.individual and flowScope.step > 0}" >
		        	<h:outputText value="Individual is null" /><br /><br />
		        </c:if>
		        
		        <h:panelGroup rendered="${not empty individualHistoryBean.individual}">
		        	<table class="base-table">
		        		<thead>
			        		<tr>
			        			<th colspan="4" scope="colgroup">Individual info</th>
			        		</tr>
			        		<tr>
			        			<th class="width1" scope="col">Id</th>
			        			<th class="width1" scope="col">First name</th>
			        			<th class="width1" scope="col">Last name</th>
			        			<th class="width1" scope="col">DoB</th>
			        		</tr>
		        		</thead>
		        		<tbody>
			        		<tr>
			        			<td class="alt-col"><h:outputText>#{individualHistoryBean.individual.extId}</h:outputText></td>
			        			<td class="alt-col"><h:outputText>#{individualHistoryBean.individual.firstName}</h:outputText></td>
			        			<td class="alt-col"><h:outputText>#{individualHistoryBean.individual.lastName}</h:outputText></td>
			        			<td class="alt-col"><h:outputText value="#{individualHistoryBean.individual.dob.time}">
			        					<f:convertDateTime pattern="dd.MM.yyyy HH:mm" />
			        				</h:outputText>
			        			</td>
			        		</tr>
		        		</tbody>
		        	</table>   	
		        </h:panelGroup>
		        	        
		        <c:if test="#{fn:length(individualHistoryBean.memberships) == 0 and flowScope.step > 0}" >
		        	<h:outputText value="#{msg.membershipEmpty}" /><br /><br />
		        </c:if>
		                        
	        	<h:panelGroup rendered="#{fn:length(individualHistoryBean.memberships) > 0}">
		  			<h:dataTable value="#{individualHistoryBean.memberships}" var="membership"
		  				styleClass="base-table" rowClasses=",alt" columnClasses="alt-col,">	
		  			    <f:facet name="header">
                            <h:outputText value="#{msg.historyMembership}" />
                        </f:facet>
			  			<h:column headerClass="width1">
	                        <f:facet name="header">
	                            <h:outputText value="#{msg.socialGroupId}" />
	                        </f:facet>
	                        <h:outputText value="#{membership.socialGroup.extId}" />
                      	 </h:column>	
			  			 <h:column headerClass="width1">
	                        <f:facet name="header">
	                            <h:outputText value="#{msg.membershipRelationToHead}" />
{'fraction_non_alphanumeric': 0.16819754264583084, 'fraction_numerical': 0.010497435285697245, 'mean_word_length': 2.2737212026552127, 'pattern_counts': {'":': 0, '<': 151, '<?xml version=': 0, '>': 158, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 14}, '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': '356070', 'n_tokens_mistral': 3307, 'n_tokens_neox': 2741, 'n_words': 367}