<commit_before><?xml version="1.0"?>
<f:view xmlns="http://www.w3.org/1999/xhtml"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:collab="http://climatecollaboratorium.org/facelets"
        xmlns:ice="http://www.icesoft.com/icefaces/component"
        xmlns:fn="http://java.sun.com/jsp/jstl/functions"
        xmlns:c="http://java.sun.com/jsp/jstl/core">

	<script type="text/javascript">
		function clearSendMessageForm() {
			jQuery(
					".sendMessagePopup .popuplogin_input, .sendMessagePopup textarea")
					.val('');
		}

		function lockSendMessageForm() {
			jQuery(".sendMessagePopup").block({
				message : "Sending message"
			});
		}

		function messageSent() {
			jQuery.growlUI('Message has been sent', '');
		}
        function limitExceeded() {
            jQuery.growlUI('Your daily message limit has been reached. Please try again tomorrow.', '');
        }

		<f:subview rendered="#{userprofileBean.messageSent}">
                messageSent();
        </f:subview>
        <f:subview rendered="#{userprofileBean.limitExceeded}">
                limitExceeded();
        </f:subview>

		function hideSendMessagForm() {
			jQuery(".sendMessagePopup").hide();
		}

		function showSendMessageForm() {
			clearSendMessageForm();
			jQuery(".sendMessagePopup").show();

		}

		function sendMessageFormValid() {
			var valid = true;
			clearSendMessageForm();
			var subj = jQuery(".sendMessage_subject");
			var msg = jQuery(".sendMessage_message");

			if (jQuery.trim(subj.val()) == '') {
				subj.parent().find(".error").show();
				valid = false;
			}

			if (jQuery.trim(msg.val()) == '') {
				msg.parent().find(".error").show();
				valid = false;
			}

			return valid;
		}

		function clearSendMessageForm() {
			jQuery(".sendMessagePopup .error").hide();
			jQuery(".sendMessage_subject .sendMessage_message").val('');
		}
	</script>

	<div id="bread" class="pro">
		<a href="/web/guest/community">Community</a> <img
			src="/climatecolab-theme/images/arrow.gif" width="8" height="8" /> <a
			href="/web/guest/members">Members</a> <img
			src="/climatecolab-theme/images/arrow.gif" width="8" height="8" /> <a
			href="/web/guest/member/-/member/userId/#{currentUser.userId}">#{currentUser.screenName}</a>
	</div>


	<div id="main"
		class="#{userprofileBean.viewingOwnProfile ? '' : 'full'} userProfile">

		<div class="comm_member" style="margin-top: 0;">
            <f:subview rendered="#{currentUser.attendsConference}">
                <a href="/web/guest/conference2014" class="attendingConference"><img src="/climatecolab-theme/images/attending-conference.png" alt="Attends MIT Conference 2014"/></a>
            </f:subview>

            <div class="badge-container">
                <ui:repeat value="#{userprofileBean.badges.badges}" var="badge">
                    <div class="badge-big badge-#{badge.badgeType}">

                        <span class="badge-title">
                            <a href="/web/guest/plans/-/plans/contestId/#{badge.contestId}/planId/#{badge.planId}" style="#{badge.badgeTitle.length() gt 8 ? 'top: 26px;' : ''};">#{badge.badgeTitle}</a>
                        </span>

                        <div class="badge-text" style="#{badge.badgeText.length() gt 15 ? 'font-size: 7px;' : ''}#{fn:substring(badge.badgeText,0,6) eq 'Judges' ? 'width: 47px;' : ''}">#{badge.badgeText.length() gt 13 ? badge.badgeText : ''}</div>
                        <span class="badge-year">#{badge.badgeYear}</span>
                    </div>
                </ui:repeat>
            </div>

			<div class="comm_member-photo">
				<img src="#{currentUser.portrait}" width="150" height="150"
					alt="#{currentUser.realName}" />
			</div>
			<div class="comm_member-info" style="width:300px;">
				<table border="0" cellpadding="0" cellspacing="0"
					class="colab members topInfo">
					<tr>
						<td colspan="2"><h2>Member Profile</h2></td>
					</tr>
					<tr>
						<td class="memname">#{currentUser.realName}</td>
					</tr>
                    <tr>
                        <td>
                            <div class="role-indicator" style="margin-top: 5px;">
                                <div style="width: 16px">
                                    <img
                                            src="/climatecolab-theme/images/icon_mem-${currentUser.role.lowerCase}.png"
                                            width="16" height="16" />
                                </div>
                                ${currentUser.role.printName}
                            </div>
                        </td>
                    </tr>
				</table>

				<div class="memdiv" style="background-color:#707070;"></div>
				<table border="0" cellpadding="0" cellspacing="0"
					class="colab members otherInfo" style="width:300px;">
					<tr>
						<td class="b" nowrap="nowrap" width="50%">Screen Name</td>
						<td>#{currentUser.screenName}</td>
					</tr>
					<tr>
						<td class="b" nowrap="nowrap" width="50%">Member Since</td>
						<td><ice:outputText value="#{currentUser.joinDate}">
								<f:convertDateTime pattern="MM/dd/yy" locale="en_US"
									timeZone="America/New_York" />
							</ice:outputText></td>
					</tr>

					<f:subview rendered="#{userprofileBean.viewingOwnProfile}">
						<tr>
							<td class="b" width="50%">Email</td>
							<td width="50%">
                                <a href="mailto:#{currentUser.email}">#{currentUser.email}</a>
                                <f:subview rendered="#{userprofileBean.displayEMailErrorMessage}">
                                    <span class="iceMsgError portlet-msg-error Error form_error_messageError">Please update your email address. Only votes from members with valid email addresses will be counted. </span>
                                </f:subview>
                            </td>
						</tr>
					</f:subview>
					<f:subview rendered="#{not empty currentUser.country}">
						<tr>
							<td class="b" width="50%">Country</td>
							<td width="50%">#{currentUser.country}</td>
						</tr>
					</f:subview>
                    <tr><td colspan="2"><ice:form>
                        <f:subview rendered="#{userprofileBean.viewingOwnProfile}">
                            <a href="./#{currentUser.userId}/page/edit">Manage profile
                                and settings &gt;&gt;</a>
                        </f:subview>
                    </ice:form> <f:subview rendered="#{not userprofileBean.viewingOwnProfile and userprofileBean.canSendMessage}">
                        <a style="margin-top: 6px; display: block;" href="javascript:;"
                           onclick="if (! deferUntilLogin()) { return false; } else { showSendMessageForm(); }">Send
                            <strong>#{currentUser.firstName}</strong> a Message </a>
                    </f:subview></td></tr>
				</table>
			</div>
			<div class="clearfix"></div>
		</div>
		<p>
			<ice:outputText value="#{currentUser.filteredAbout}" escape="false" />
		</p>

        <h2 style="margin-top: 20px;">Proposals</h2>

        <f:subview rendered="#{fn:length(currentUser.proposals) == 0}">
            #{currentUser.firstName} has not yet contributed to any Climate CoLab proposals.
        </f:subview>
        <ice:dataTable styleClass="colab" value="#{currentUser.proposals}"
                       rowClasses="t,nt" var="proposal">
            <ice:column>
                <collab:planLink planId="#{proposal.planId}"
                                 contestId="#{proposal.contestId}"
                                 text="#{proposal.proposalName}" />
            </ice:column>
            <ice:column style="text-align: right;">
                <ice:outputText value="#{proposal.proposalCreationDate}">
                    <f:convertDateTime pattern="MM/dd/yy" locale="en_US"
                                       timeZone="America/New_York" />
                </ice:outputText>
            </ice:column><commit_msg>send message<commit_after><?xml version="1.0"?>
<f:view xmlns="http://www.w3.org/1999/xhtml"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:collab="http://climatecollaboratorium.org/facelets"
        xmlns:ice="http://www.icesoft.com/icefaces/component"
        xmlns:fn="http://java.sun.com/jsp/jstl/functions"
        xmlns:c="http://java.sun.com/jsp/jstl/core">

	<script type="text/javascript">
		function clearSendMessageForm() {
			jQuery(
					".sendMessagePopup .popuplogin_input, .sendMessagePopup textarea")
					.val('');
		}

		function lockSendMessageForm() {
			jQuery(".sendMessagePopup").block({
				message : "Sending message"
			});
		}

		function messageSent() {
			jQuery.growlUI('Message has been sent', '');
		}
        function limitExceeded() {
            jQuery.growlUI('Your daily message limit has been reached. Please try again tomorrow.', '');
        }

		<f:subview rendered="#{userprofileBean.messageSent}">
                messageSent();
        </f:subview>
        <f:subview rendered="#{userprofileBean.limitExceeded}">
                limitExceeded();
        </f:subview>

		function hideSendMessagForm() {
			jQuery(".sendMessagePopup").hide();
		}

		function showSendMessageForm() {
			clearSendMessageForm();
			jQuery(".sendMessagePopup").show();

		}

		function sendMessageFormValid() {
			var valid = true;
			clearSendMessageForm();
			var subj = jQuery(".sendMessage_subject");
			var msg = jQuery(".sendMessage_message");

			if (jQuery.trim(subj.val()) == '') {
				subj.parent().find(".error").show();
				valid = false;
			}

			if (jQuery.trim(msg.val()) == '') {
				msg.parent().find(".error").show();
				valid = false;
			}

			return valid;
		}

		function clearSendMessageForm() {
			jQuery(".sendMessagePopup .error").hide();
			jQuery(".sendMessage_subject .sendMessage_message").val('');
		}
	</script>

	<div id="bread" class="pro">
		<a href="/web/guest/community">Community</a> <img
			src="/climatecolab-theme/images/arrow.gif" width="8" height="8" /> <a
			href="/web/guest/members">Members</a> <img
			src="/climatecolab-theme/images/arrow.gif" width="8" height="8" /> <a
			href="/web/guest/member/-/member/userId/#{currentUser.userId}">#{currentUser.screenName}</a>
	</div>


	<div id="main"
		class="#{userprofileBean.viewingOwnProfile ? '' : 'full'} userProfile">

		<div class="comm_member" style="margin-top: 0;">
            <f:subview rendered="#{currentUser.attendsConference}">
                <a href="/web/guest/conference2014" class="attendingConference"><img src="/climatecolab-theme/images/attending-conference.png" alt="Attends MIT Conference 2014"/></a>
            </f:subview>

            <div class="badge-container">
                <ui:repeat value="#{userprofileBean.badges.badges}" var="badge">
                    <div class="badge-big badge-#{badge.badgeType}">

                        <span class="badge-title">
                            <a href="/web/guest/plans/-/plans/contestId/#{badge.contestId}/planId/#{badge.planId}" style="#{badge.badgeTitle.length() gt 8 ? 'top: 26px;' : ''};">#{badge.badgeTitle}</a>
                        </span>

                        <div class="badge-text" style="#{badge.badgeText.length() gt 15 ? 'font-size: 7px;' : ''}#{fn:substring(badge.badgeText,0,6) eq 'Judges' ? 'width: 47px;' : ''}">#{badge.badgeText.length() gt 13 ? badge.badgeText : ''}</div>
                        <span class="badge-year">#{badge.badgeYear}</span>
                    </div>
                </ui:repeat>
            </div>

			<div class="comm_member-photo">
				<img src="#{currentUser.portrait}" width="150" height="150"
					alt="#{currentUser.realName}" />
			</div>
			<div class="comm_member-info" style="width:300px;">
				<table border="0" cellpadding="0" cellspacing="0"
					class="colab members topInfo">
					<tr>
						<td colspan="2"><h2>Member Profile</h2></td>
					</tr>
					<tr>
						<td class="memname">#{currentUser.realName}</td>
					</tr>
                    <tr>
                        <td>
                            <div class="role-indicator" style="margin-top: 5px;">
                                <div style="width: 16px">
                                    <img
                                            src="/climatecolab-theme/images/icon_mem-${currentUser.role.lowerCase}.png"
                                            width="16" height="16" />
                                </div>
                                ${currentUser.role.printName}
                            </div>
                        </td>
                    </tr>
				</table>

				<div class="memdiv" style="background-color:#707070;"></div>
				<table border="0" cellpadding="0" cellspacing="0"
					class="colab members otherInfo" style="width:300px;">
					<tr>
						<td class="b" nowrap="nowrap" width="50%">Screen Name</td>
						<td>#{currentUser.screenName}</td>
					</tr>
					<tr>
						<td class="b" nowrap="nowrap" width="50%">Member Since</td>
						<td><ice:outputText value="#{currentUser.joinDate}">
								<f:convertDateTime pattern="MM/dd/yy" locale="en_US"
									timeZone="America/New_York" />
							</ice:outputText></td>
					</tr>

					<f:subview rendered="#{userprofileBean.viewingOwnProfile}">
						<tr>
							<td class="b" width="50%">Email</td>
							<td width="50%">
                                <a href="mailto:#{currentUser.email}">#{currentUser.email}</a>
                                <f:subview rendered="#{userprofileBean.displayEMailErrorMessage}">
                                    <span class="iceMsgError portlet-msg-error Error form_error_messageError">Please update your email address. Only votes from members with valid email addresses will be counted. </span>
                                </f:subview>
                            </td>
						</tr>
					</f:subview>
					<f:subview rendered="#{not empty currentUser.country}">
						<tr>
							<td class="b" width="50%">Country</td>
							<td width="50%">#{currentUser.country}</td>
						</tr>
					</f:subview>
                    <tr><td colspan="2"><ice:form>
                        <f:subview rendered="#{userprofileBean.viewingOwnProfile}">
                            <a href="./#{currentUser.userId}/page/edit">Manage profile
                                and settings &gt;&gt;</a>
                        </f:subview>
                    </ice:form> <f:subview rendered="#{not userprofileBean.viewingOwnProfile}">
                        <a style="margin-top: 6px; display: block;" href="javascript:;"
                           onclick="if (! deferUntilLogin()) { return false; } else { showSendMessageForm(); }">Send
                            <strong>#{currentUser.firstName}</strong> a Message </a>
                    </f:subview></td></tr>
				</table>
			</div>
			<div class="clearfix"></div>
		</div>
		<p>
			<ice:outputText value="#{currentUser.filteredAbout}" escape="false" />
		</p>

        <h2 style="margin-top: 20px;">Proposals</h2>

        <f:subview rendered="#{fn:length(currentUser.proposals) == 0}">
            #{currentUser.firstName} has not yet contributed to any Climate CoLab proposals.
        </f:subview>
        <ice:dataTable styleClass="colab" value="#{currentUser.proposals}"
                       rowClasses="t,nt" var="proposal">
            <ice:column>
                <collab:planLink planId="#{proposal.planId}"
                                 contestId="#{proposal.contestId}"
                                 text="#{proposal.proposalName}" />
            </ice:column>
            <ice:column style="text-align: right;">
                <ice:outputText value="#{proposal.proposalCreationDate}">
                    <f:convertDateTime pattern="MM/dd/yy" locale="en_US"
                                       timeZone="America/New_York" />
                </ice:outputText>
            </ice:column>
{'fraction_non_alphanumeric': 0.16856392294220665, 'fraction_numerical': 0.010632974731048286, 'mean_word_length': 2.1173718073698575, 'pattern_counts': {'":': 0, '<': 285, '<?xml version=': 2, '>': 285, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 16}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 22, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1376341', 'n_tokens_mistral': 5567, 'n_tokens_neox': 4790, 'n_words': 762}