<commit_before><!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	template="/template/template.xhtml">

<ui:define name="pageTitle">Mail: Inbox</ui:define>
<ui:define name="body">

	<p:panel rendered="#{!mail.loggedIn}">
		Please login first!
	</p:panel>
	
	<p:panel rendered="#{mail.loggedIn}">
	<!-- Display the main part of the whole page. DO NOT
	 *** add a message with rendered="#{empty mail.list}" because call is EXPENSIVE
	 -->
	<p:dataTable border='1' 
		var="message" value="#{mail.list}" 
		>
		<p:column style="width: 15%">
			<f:facet name="header">Sent</f:facet>
			<h:outputText value="#{message.sentDate}">
				<f:convertDateTime pattern="yyyy-MM-dd HH:mm" />
			</h:outputText>
		</p:column>
		<p:column style="width: 25%">
			<f:facet name="header">From</f:facet>
			<h:outputText value="#{message.from[0]}"/>
		</p:column>
		<p:column style="width: 50%">
			<f:facet name="header">Subject</f:facet>
			<h:outputLink value="Message.web">
				<f:param name="messageNumber" value="#{message.messageNumber}"/>
				<h:outputText value="#{message.subject}"/>
			</h:outputLink>
		</p:column>

		<p:column style="width: 10%">
			<f:facet name="header">Actions</f:facet>
			<h:outputLink value="MessageReply.web">
				Reply
			</h:outputLink>
P
			<p:commandButton value="Delete" action="#{mail.delete(message.message.messageId)}" icon="ui-icon-trash">
				<p:confirm header="Confirm Deletion" message="Really delete this member?" icon="ui-icon-alert" />
			</p:commandButton>
		</p:column>
	</p:dataTable>
	<p:confirmDialog global="true" showEffect="fade" hideEffect="fade">
	    <p:commandButton value="Yes" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
	    <p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
	</p:confirmDialog>
	</p:panel>
</ui:define>
</ui:composition>
<commit_msg>Move confirm dialog out of loop<commit_after><!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	template="/template/template.xhtml">

<ui:define name="pageTitle">Mail: Inbox</ui:define>
<ui:define name="body">

	<p:panel rendered="#{!mail.loggedIn}">
		Please login first!
	</p:panel>
	
	<p:panel rendered="#{mail.loggedIn}">
	<!-- Display the main part of the whole page. DO NOT
	 *** add a message with rendered="#{empty mail.list}" because call is EXPENSIVE
	 -->
	<p:dataTable border='1' 
		var="message" value="#{mail.list}" 
		>
		<p:column style="width: 15%">
			<f:facet name="header">Sent</f:facet>
			<h:outputText value="#{message.sentDate}">
				<f:convertDateTime pattern="yyyy-MM-dd HH:mm" />
			</h:outputText>
		</p:column>
		<p:column style="width: 25%">
			<f:facet name="header">From</f:facet>
			<h:outputText value="#{message.from[0]}"/>
		</p:column>
		<p:column style="width: 50%">
			<f:facet name="header">Subject</f:facet>
			<h:outputLink value="Message.web">
				<f:param name="messageNumber" value="#{message.messageNumber}"/>
				<h:outputText value="#{message.subject}"/>
			</h:outputLink>
		</p:column>

		<p:column style="width: 10%">
			<f:facet name="header">Actions</f:facet>
			<h:outputLink value="MessageReply.web">
				Reply
			</h:outputLink>
P
			<p:commandButton value="Delete" action="#{mail.delete(message.message.messageId)}" icon="ui-icon-trash">
				<p:confirm header="Confirm Deletion" message="Really delete this member?" icon="ui-icon-alert" />
			</p:commandButton>
		</p:column>
	</p:dataTable>
	<p:confirmDialog global="true" showEffect="fade" hideEffect="fade">
		<p:commandButton value="Yes" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
		<p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
	</p:confirmDialog>
	</p:panel>
</ui:define>
</ui:composition>

{'fraction_non_alphanumeric': 0.20732265446224257, 'fraction_numerical': 0.009610983981693364, 'mean_word_length': 4.859249329758713, 'pattern_counts': {'":': 0, '<': 97, '<?xml version=': 0, '>': 97, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 10}, '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': '6409496', 'n_tokens_mistral': 1790, 'n_tokens_neox': 1591, 'n_words': 263}