增加初始版本
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/activities/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/activities/configuration.jsp
new file mode 100644
index 0000000..79423b5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/activities/configuration.jsp
@@ -0,0 +1,63 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/activities/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+%>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+
+	<aui:fieldset>
+		<aui:select label="maximum-activities-to-display" name="preferences--max--">
+			<aui:option label="1" selected="<%= max == 1 %>" />
+			<aui:option label="2" selected="<%= max == 2 %>" />
+			<aui:option label="3" selected="<%= max == 3 %>" />
+			<aui:option label="4" selected="<%= max == 4 %>" />
+			<aui:option label="5" selected="<%= max == 5 %>" />
+			<aui:option label="10" selected="<%= max == 10 %>" />
+			<aui:option label="15" selected="<%= max == 15 %>" />
+			<aui:option label="20" selected="<%= max == 20 %>" />
+			<aui:option label="25" selected="<%= max == 25 %>" />
+			<aui:option label="30" selected="<%= max == 30 %>" />
+			<aui:option label="40" selected="<%= max == 40 %>" />
+			<aui:option label="50" selected="<%= max == 50 %>" />
+			<aui:option label="60" selected="<%= max == 60 %>" />
+			<aui:option label="70" selected="<%= max == 70 %>" />
+			<aui:option label="80" selected="<%= max == 80 %>" />
+			<aui:option label="90" selected="<%= max == 90 %>" />
+			<aui:option label="100" selected="<%= max == 100 %>" />
+		</aui:select>
+	</aui:fieldset>
+
+	<c:if test="<%= PortalUtil.isRSSFeedsEnabled() %>">
+		<liferay-ui:rss-settings
+			delta="<%= rssDelta %>"
+			displayStyle="<%= rssDisplayStyle %>"
+			enabled="<%= enableRSS %>"
+			feedType="<%= rssFeedType %>"
+		/>
+	</c:if>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/activities/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/activities/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/activities/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/activities/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/activities/init.jsp
new file mode 100644
index 0000000..19a08bb
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/activities/init.jsp
@@ -0,0 +1,32 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.social.model.SocialActivity" %><%@
+page import="com.liferay.portlet.social.service.SocialActivityLocalServiceUtil" %><%@
+page import="com.liferay.util.RSSUtil" %>
+
+<%
+int max = GetterUtil.getInteger(portletPreferences.getValue("max", "10"));
+
+boolean enableRSS = !PortalUtil.isRSSFeedsEnabled() ? false : GetterUtil.getBoolean(portletPreferences.getValue("enableRss", null), true);
+int rssDelta = GetterUtil.getInteger(portletPreferences.getValue("rssDelta", StringPool.BLANK), SearchContainer.DEFAULT_DELTA);
+String rssDisplayStyle = portletPreferences.getValue("rssDisplayStyle", RSSUtil.DISPLAY_STYLE_DEFAULT);
+String rssFeedType = portletPreferences.getValue("rssFeedType", RSSUtil.FEED_TYPE_DEFAULT);
+%>
+
+<%@ include file="/html/portlet/activities/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/activities/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/activities/view.jsp
new file mode 100644
index 0000000..b79868d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/activities/view.jsp
@@ -0,0 +1,54 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/activities/init.jsp" %>
+
+<%
+Group group = GroupLocalServiceUtil.getGroup(scopeGroupId);
+
+List<SocialActivity> activities = null;
+
+if (group.isOrganization()) {
+	activities = SocialActivityLocalServiceUtil.getOrganizationActivities(group.getOrganizationId(), 0, max);
+}
+else if (group.isRegularSite()) {
+	activities = SocialActivityLocalServiceUtil.getGroupActivities(group.getGroupId(), 0, max);
+}
+else if (group.isUser()) {
+	activities = SocialActivityLocalServiceUtil.getUserActivities(group.getClassPK(), 0, max);
+}
+
+ResourceURL rssURL = liferayPortletResponse.createResourceURL();
+
+rssURL.setCacheability(ResourceURL.FULL);
+rssURL.setParameter("struts_action", "/activities/rss");
+
+String feedTitle = LanguageUtil.format(pageContext, "x's-activities", HtmlUtil.escape(group.getDescriptiveName(locale)));
+
+rssURL.setParameter("feedTitle", feedTitle);
+
+String taglibFeedTitle = LanguageUtil.format(pageContext, "subscribe-to-x's-activities", HtmlUtil.escape(group.getDescriptiveName(locale)));
+%>
+
+<liferay-ui:social-activities
+	activities="<%= activities %>"
+	feedDisplayStyle="<%= rssDisplayStyle %>"
+	feedEnabled="<%= enableRSS %>"
+	feedLink="<%= rssURL.toString() %>"
+	feedLinkMessage="<%= taglibFeedTitle %>"
+	feedTitle="<%= taglibFeedTitle %>"
+	feedType="<%= rssFeedType %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/edit_document_library_extra_settings.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/edit_document_library_extra_settings.jsp
new file mode 100644
index 0000000..cbf76ba
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/edit_document_library_extra_settings.jsp
@@ -0,0 +1,135 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/admin/init.jsp" %>
+
+<%
+DLFileEntry dlFileEntry = null;
+
+List<String> keys = null;
+List<String> expandoBridgeAttributeNames = null;
+
+List<DLFileEntry> dlFileEntries = DLFileEntryLocalServiceUtil.getExtraSettingsFileEntries(0, 1);
+
+if (!dlFileEntries.isEmpty()) {
+	dlFileEntry = dlFileEntries.get(0);
+
+	List<DLFileVersion> dlFileVersions = dlFileEntry.getFileVersions(WorkflowConstants.STATUS_ANY);
+
+	for (DLFileVersion dlFileVersion : dlFileVersions) {
+		UnicodeProperties extraSettingsProperties = dlFileVersion.getExtraSettingsProperties();
+
+		if (extraSettingsProperties.isEmpty()) {
+			continue;
+		}
+
+		keys = new ArrayList<String>(extraSettingsProperties.size());
+		expandoBridgeAttributeNames = new ArrayList<String>(extraSettingsProperties.size());
+
+		ExpandoBridge expandoBridge = dlFileEntry.getExpandoBridge();
+
+		for (String key : extraSettingsProperties.keySet()) {
+			if (expandoBridge.hasAttribute(key)) {
+				expandoBridgeAttributeNames.add(key);
+			}
+			else {
+				keys.add(key);
+			}
+		}
+
+		break;
+	}
+}
+%>
+
+<c:choose>
+	<c:when test="<%= dlFileEntry == null %>">
+			<div class="alert alert-success">
+				<liferay-ui:message key="there-are-no-longer-any-documents-and-media-files-with-extra-settings" />
+			</div>
+	</c:when>
+	<c:otherwise>
+		<c:if test="<%= (expandoBridgeAttributeNames != null) && !expandoBridgeAttributeNames.isEmpty() %>">
+			<div class="alert alert-error">
+				<%= LanguageUtil.format(pageContext, "custom-fields-already-exist-for-these-extra-settings-x", StringUtil.merge(expandoBridgeAttributeNames)) %>
+			</div>
+		</c:if>
+
+		<portlet:actionURL var="convertDocumentLibraryExtraSettingsURL">
+			<portlet:param name="struts_action" value="/admin_server/edit_document_library_extra_settings" />
+		</portlet:actionURL>
+
+		<aui:form action="<%= convertDocumentLibraryExtraSettingsURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "convertDocumentLibraryExtraSettings();" %>'>
+			<aui:input name="<%= Constants.CMD %>" type="hidden" />
+			<aui:input name="keys" type="hidden" value="<%= StringUtil.merge(keys) %>" />
+
+			<%
+			for (String key : keys) {
+				String selectName = "type_" + key;
+			%>
+
+				<aui:fieldset>
+					<%= LanguageUtil.format(pageContext, "convert-extra-settings-key-from-x-to", key) %>
+
+					<br />
+
+					<aui:select helpMessage="custom-field-type-help" label="type" name="<%= selectName %>">
+						<optgroup label="<liferay-ui:message key="presets" />">
+							<aui:option label="selection-of-integer-values" value="PresetSelectionIntegerArray()" />
+							<aui:option label="selection-of-decimal-values" value="PresetSelectionDoubleArray()" />
+							<aui:option label="selection-of-text-values" value="PresetSelectionStringArray()" />
+							<aui:option label="text-box" value="PresetTextBox()" />
+							<aui:option label="text-box-indexed" value="PresetTextBoxIndexed()" />
+							<aui:option label="text-field-secret" value="PresetTextFieldSecret()" />
+							<aui:option label="text-field-indexed" selected="<%= true %>" value="PresetTextFieldIndexed()" />
+						</optgroup>
+						<optgroup label="<liferay-ui:message key="primitives" />">
+
+							<%
+							for (int curType : ExpandoColumnConstants.TYPES) {
+								if ((curType == ExpandoColumnConstants.BOOLEAN_ARRAY) || (curType == ExpandoColumnConstants.DATE_ARRAY)) {
+									continue;
+								}
+							%>
+
+								<aui:option label="<%= ExpandoColumnConstants.getTypeLabel(curType) %>" value="<%= curType %>" />
+
+							<%
+							}
+							%>
+
+						</optgroup>
+					</aui:select>
+				</aui:fieldset>
+
+			<%
+			}
+			%>
+
+			<aui:button-row>
+				<aui:button type="submit" />
+			</aui:button-row>
+		</aui:form>
+	</c:otherwise>
+</c:choose>
+
+<aui:script>
+	function <portlet:namespace />convertDocumentLibraryExtraSettings(options) {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "convert";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/edit_instance.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/edit_instance.jsp
new file mode 100644
index 0000000..6c27087
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/edit_instance.jsp
@@ -0,0 +1,118 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/admin/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+Company selCompany = (Company)request.getAttribute(WebKeys.SEL_COMPANY);
+
+long companyId = BeanParamUtil.getLong(selCompany, request, "companyId");
+
+VirtualHost virtualHost = null;
+
+try {
+	virtualHost = VirtualHostLocalServiceUtil.getVirtualHost(companyId, 0);
+}
+catch (Exception e) {
+}
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	escapeXml="<%= false %>"
+	localizeTitle="<%= (selCompany == null) %>"
+	title='<%= (selCompany == null) ? "new-portal-instance" : HtmlUtil.escape(selCompany.getName()) %>'
+/>
+
+<portlet:actionURL var="editInstanceURL">
+	<portlet:param name="struts_action" value="/admin/edit_instance" />
+</portlet:actionURL>
+
+<aui:form action="<%= editInstanceURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveCompany();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="companyId" type="hidden" value="<%= companyId %>" />
+
+	<liferay-ui:error exception="<%= CompanyMxException.class %>" message="please-enter-a-valid-mail-domain" />
+	<liferay-ui:error exception="<%= CompanyVirtualHostException.class %>" message="please-enter-a-valid-virtual-host" />
+	<liferay-ui:error exception="<%= CompanyWebIdException.class %>" message="please-enter-a-valid-web-id" />
+
+	<aui:model-context bean="<%= selCompany %>" model="<%= Company.class %>" />
+
+	<aui:fieldset>
+		<c:choose>
+			<c:when test="<%= selCompany != null %>">
+				<aui:field-wrapper label="id">
+					<liferay-ui:input-resource url="<%= String.valueOf(companyId) %>" />
+				</aui:field-wrapper>
+
+				<aui:field-wrapper label="web-id">
+					<liferay-ui:input-resource url="<%= selCompany.getWebId() %>" />
+				</aui:field-wrapper>
+			</c:when>
+			<c:otherwise>
+				<aui:input name="webId" />
+			</c:otherwise>
+		</c:choose>
+
+		<aui:input bean="<%= virtualHost %>" fieldParam="virtualHostname" label="virtual-host" model="<%= VirtualHost.class %>" name="hostname" />
+
+		<aui:input label="mail-domain" name="mx" />
+
+		<c:if test="<%= showShardSelector %>">
+			<c:choose>
+				<c:when test="<%= selCompany != null %>">
+					<%= selCompany.getShardName() %>
+				</c:when>
+				<c:otherwise>
+					<aui:select name="shardName">
+
+						<%
+						for (String shardName : ShardUtil.getAvailableShardNames()) {
+						%>
+
+							<aui:option label="<%= shardName %>" selected="<%= shardName.equals(PropsValues.SHARD_DEFAULT_NAME) %>" />
+
+						<%
+						}
+						%>
+
+					</aui:select>
+				</c:otherwise>
+			</c:choose>
+		</c:if>
+
+		<aui:input name="maxUsers" />
+
+		<aui:input disabled="<%= (selCompany != null) && (selCompany.getCompanyId() == PortalInstances.getDefaultCompanyId()) %>" name="active" type="checkbox" value="<%= (selCompany != null) ? selCompany.isActive() : true %>" />
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />saveCompany() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (selCompany == null) ? Constants.ADD : Constants.UPDATE %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/error.jsp
new file mode 100644
index 0000000..2c4c3d6
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/error.jsp
@@ -0,0 +1,24 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/admin/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/init.jsp
new file mode 100644
index 0000000..17f7e76
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/init.jsp
@@ -0,0 +1,50 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.CompanyMxException" %><%@
+page import="com.liferay.portal.CompanyVirtualHostException" %><%@
+page import="com.liferay.portal.CompanyWebIdException" %><%@
+page import="com.liferay.portal.RequiredCompanyException" %><%@
+page import="com.liferay.portal.captcha.recaptcha.ReCaptchaImpl" %><%@
+page import="com.liferay.portal.convert.ConvertProcess" %><%@
+page import="com.liferay.portal.dao.shard.ManualShardSelector" %><%@
+page import="com.liferay.portal.kernel.dao.shard.ShardUtil" %><%@
+page import="com.liferay.portal.kernel.image.ImageMagickUtil" %><%@
+page import="com.liferay.portal.kernel.scripting.ScriptingUtil" %><%@
+page import="com.liferay.portal.kernel.util.InstancePool" %><%@
+page import="com.liferay.portal.kernel.util.OSDetector" %><%@
+page import="com.liferay.portal.kernel.xuggler.XugglerUtil" %><%@
+page import="com.liferay.portal.upload.LiferayFileUpload" %><%@
+page import="com.liferay.portal.util.PortalInstances" %><%@
+page import="com.liferay.portlet.documentlibrary.model.DLFileVersion" %><%@
+page import="com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil" %><%@
+page import="com.liferay.portlet.expando.model.ExpandoColumnConstants" %>
+
+<%@ page import="org.apache.log4j.Level" %><%@
+page import="org.apache.log4j.LogManager" %><%@
+page import="org.apache.log4j.Logger" %>
+
+<%
+boolean showShardSelector = false;
+
+if (PropsValues.SHARD_SELECTOR.equals(ManualShardSelector.class.getName()) && (ShardUtil.getAvailableShardNames().length > 1)) {
+	showShardSelector = true;
+}
+%>
+
+<%@ include file="/html/portlet/admin/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/instance_actions.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/instance_actions.jsp
new file mode 100644
index 0000000..f2e3f8d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/instance_actions.jsp
@@ -0,0 +1,44 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/admin/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+Company companyObject = (Company)row.getObject();
+%>
+
+<liferay-ui:icon-menu>
+	<portlet:renderURL var="editURL">
+		<portlet:param name="struts_action" value="/admin/edit_instance" />
+		<portlet:param name="redirect" value="<%= currentURL %>" />
+		<portlet:param name="companyId" value="<%= String.valueOf(companyObject.getCompanyId()) %>" />
+	</portlet:renderURL>
+
+	<liferay-ui:icon image="edit" url="<%= editURL %>" />
+
+	<c:if test="<%= companyObject.getCompanyId() != PortalInstances.getDefaultCompanyId() %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/admin/edit_instance" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="companyId" value="<%= String.valueOf(companyObject.getCompanyId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete url="<%= deleteURL %>" />
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/instances.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/instances.jspf
new file mode 100644
index 0000000..c34f72a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/instances.jspf
@@ -0,0 +1,127 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:error exception="<%= RequiredCompanyException.class %>" message="the-default-company-is-required" />
+
+<div class="btn-toolbar">
+	<portlet:renderURL var="addURL">
+		<portlet:param name="struts_action" value="/admin/edit_instance" />
+		<portlet:param name="redirect" value="<%= currentURL %>" />
+	</portlet:renderURL>
+
+	<%
+	String taglibAdd = "location.href = '" + addURL + "';";
+	%>
+
+	<aui:button onClick="<%= taglibAdd %>" value="add" />
+</div>
+
+<%
+List<String> headerNames = new ArrayList<String>();
+
+headerNames.add("instance-id");
+headerNames.add("web-id");
+headerNames.add("virtual-host");
+headerNames.add("mail-domain");
+
+if (showShardSelector) {
+	headerNames.add("shard");
+}
+
+headerNames.add("num-of-users");
+headerNames.add("max-num-of-users");
+headerNames.add("active");
+headerNames.add(StringPool.BLANK);
+
+SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, portletURL, headerNames, null);
+
+List<Company> companies = CompanyLocalServiceUtil.getCompanies(false);
+
+int total = companies.size();
+
+searchContainer.setTotal(total);
+
+List results = ListUtil.subList(companies, searchContainer.getStart(), searchContainer.getEnd());
+
+searchContainer.setResults(results);
+
+List resultRows = searchContainer.getResultRows();
+
+for (int i = 0; i < results.size(); i++) {
+	Company curCompany = (Company)results.get(i);
+
+	ResultRow row = new ResultRow(curCompany, curCompany.getCompanyId(), i);
+
+	PortletURL rowURL = renderResponse.createRenderURL();
+
+	rowURL.setParameter("struts_action", "/admin/edit_instance");
+	rowURL.setParameter("redirect", currentURL);
+	rowURL.setParameter("companyId", String.valueOf(curCompany.getCompanyId()));
+
+	// Company ID
+
+	row.addText(String.valueOf(curCompany.getCompanyId()), rowURL);
+
+	// Web ID
+
+	row.addText(HtmlUtil.escape(curCompany.getWebId()), rowURL);
+
+	// Virtual Host
+
+	row.addText(curCompany.getVirtualHostname(), rowURL);
+
+	// Mail Domain
+
+	row.addText(curCompany.getMx(), rowURL);
+
+	// Shard Name
+
+	if (showShardSelector) {
+		row.addText(LanguageUtil.get(pageContext, curCompany.getShardName()), rowURL);
+	}
+
+	// # of Users
+
+	int usersCount = UserLocalServiceUtil.searchCount(curCompany.getCompanyId(), null, WorkflowConstants.STATUS_APPROVED, null);
+
+	row.addText(String.valueOf(usersCount), rowURL);
+
+	// Max # of Users
+
+	int maxUsers = curCompany.getMaxUsers();
+
+	if (maxUsers > 0) {
+		row.addText(String.valueOf(maxUsers), rowURL);
+	}
+	else {
+		row.addText(LanguageUtil.get(pageContext, "unlimited"), rowURL);
+	}
+
+	// Active
+
+	row.addText(LanguageUtil.get(pageContext, curCompany.isActive() ? "yes" : "no"), rowURL);
+
+	// Actions
+
+	row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/admin/instance_actions.jsp");
+
+	// Add result row
+
+	resultRows.add(row);
+}
+%>
+
+<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/js/main.js b/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/js/main.js
new file mode 100644
index 0000000..84bf50c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/js/main.js
@@ -0,0 +1,133 @@
+AUI.add(
+	'liferay-admin',
+	function(A) {
+		var AObject = A.Object;
+		var Lang = A.Lang;
+		var Poller = Liferay.Poller;
+
+		var WIN = A.config.win;
+
+		var STR_CLICK = 'click';
+
+		var STR_PORTLET_MSG_ERROR = 'alert alert-error';
+
+		var STR_PORTLET_MSG_SUCCESS = 'alert alert-success';
+
+		var Admin = A.Component.create(
+			{
+				AUGMENTS: [Liferay.PortletBase],
+
+				ATTRS: {
+					form: {
+						setter: A.one,
+						value: null
+					},
+
+					url: {
+						value: null
+					}
+				},
+
+				EXTENDS: A.Base,
+
+				NAME: 'admin',
+
+				prototype: {
+					initializer: function(config) {
+						var instance = this;
+
+						instance._errorCount = 0;
+
+						var eventHandles = [];
+
+						var installXugglerButton = instance.one('#installXugglerButton');
+
+						if (installXugglerButton) {
+							eventHandles.push(
+								installXugglerButton.on(STR_CLICK, instance._installXuggler, instance)
+							);
+
+							instance._installXugglerButton = installXugglerButton;
+
+							instance._xugglerProgressInfo = instance.one('#xugglerProgressInfo');
+
+							instance._eventHandles = eventHandles;
+						}
+					},
+
+					destructor: function() {
+						var instance = this;
+
+						A.Array.invoke(instance._eventHandles, 'detach');
+
+						Poller.removeListener(instance.ID);
+					},
+
+					_installXuggler: function() {
+						var instance = this;
+
+						var xugglerProgressInfo = instance._xugglerProgressInfo;
+
+						Liferay.Util.toggleDisabled(instance._installXugglerButton, true);
+
+						var form = instance.get('form');
+
+						form.get(instance.ns('cmd')).val('installXuggler');
+
+						var ioRequest = A.io.request(
+							instance.get('url'),
+							{
+								autoLoad: false,
+								dataType: 'json',
+								form: form.getDOM()
+							}
+						);
+
+						ioRequest.on(['failure', 'success'], instance._onIOResponse, instance);
+
+						WIN[instance.ns('xugglerProgressInfo')].startProgress();
+
+						ioRequest.start();
+					},
+
+					_onIOResponse: function(event) {
+						var instance = this;
+
+						var responseData = event.currentTarget.get('responseData');
+
+						var progressBar = instance.one('#xugglerProgressInfoBar');
+
+						progressBar.hide();
+
+						WIN[instance.ns('xugglerProgressInfo')].fire('complete');
+
+						var xugglerProgressInfo = instance._xugglerProgressInfo;
+
+						var cssClass = STR_PORTLET_MSG_ERROR;
+
+						var message = '';
+
+						if (responseData.success) {
+							cssClass = STR_PORTLET_MSG_SUCCESS;
+
+							message = Liferay.Language.get('xuggler-has-been-installed-you-need-to-reboot-your-server-to-apply-changes');
+						}
+						else {
+							message = Liferay.Language.get('an-unexpected-error-occurred-while-installing-xuggler') + ': ' + responseData.exception;
+						}
+
+						xugglerProgressInfo.html(message);
+
+						xugglerProgressInfo.addClass(cssClass);
+					}
+				}
+			}
+		);
+
+		Liferay.Portlet.Admin = Admin;
+	},
+	'',
+	{
+		requires: ['liferay-poller', 'liferay-portlet-base']
+	}
+);
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/server.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/server.jspf
new file mode 100644
index 0000000..b0a70d5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/server.jspf
@@ -0,0 +1,1053 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%= ReleaseInfo.getReleaseInfo() %><br />
+
+<%
+String keywords = ParamUtil.getString(request, "keywords");
+
+long uptimeDiff = System.currentTimeMillis() - PortalUtil.getUptime().getTime();
+long days = uptimeDiff / Time.DAY;
+long hours = (uptimeDiff / Time.HOUR) % 24;
+long minutes = (uptimeDiff / Time.MINUTE) % 60;
+long seconds = (uptimeDiff / Time.SECOND) % 60;
+
+NumberFormat numberFormat = NumberFormat.getInstance();
+
+numberFormat.setMaximumIntegerDigits(2);
+numberFormat.setMinimumIntegerDigits(2);
+
+PortletURL serverURL = renderResponse.createRenderURL();
+
+serverURL.setParameter("struts_action", "/admin/view");
+serverURL.setParameter("tabs1", tabs1);
+serverURL.setParameter("tabs2", tabs2);
+serverURL.setParameter("tabs3", tabs3);
+%>
+
+<liferay-ui:message key="uptime" />:
+
+<c:if test="<%= days > 0 %>">
+	<%= days %> <%= LanguageUtil.get(pageContext, ((days > 1) ? "days" : "day")) %>,
+</c:if>
+
+<%= numberFormat.format(hours) %>:<%= numberFormat.format(minutes) %>:<%= numberFormat.format(seconds) %>
+
+<br /><br />
+
+<c:choose>
+	<c:when test="<%= windowState.equals(WindowState.NORMAL) %>">
+		<html:link page="/admin/view?windowState=maximized&portletMode=view&actionURL=0"><liferay-ui:message key="more" /></html:link> &raquo;
+	</c:when>
+	<c:otherwise>
+		<liferay-ui:tabs
+			names="resources,log-levels,properties,captcha,data-migration,file-uploads,mail,external-services,script,shutdown"
+			param="tabs2"
+			portletURL="<%= serverURL %>"
+		/>
+
+		<c:choose>
+			<c:when test='<%= tabs2.equals("log-levels") %>'>
+				<liferay-ui:tabs
+					names="update-categories,add-category"
+					param="tabs3"
+					portletURL="<%= serverURL %>"
+				/>
+
+				<c:choose>
+					<c:when test='<%= tabs3.equals("add-category") %>'>
+						<aui:fieldset>
+							<aui:input cssClass="lfr-input-text-container" label="" name="loggerName" type="text" />
+
+							<aui:select label="" name="priority">
+
+								<%
+								for (int i = 0; i < Levels.ALL_LEVELS.length; i++) {
+								%>
+
+									<aui:option label="<%= Levels.ALL_LEVELS[i] %>" selected="<%= Level.INFO.equals(Levels.ALL_LEVELS[i]) %>" />
+
+								<%
+								}
+								%>
+
+							</aui:select>
+						</aui:fieldset>
+
+						<aui:button-row>
+
+							<%
+							String taglibAddLogLevel = renderResponse.getNamespace() + "saveServer('addLogLevel');";
+							%>
+
+							<aui:button onClick="<%= taglibAddLogLevel %>" value="save" />
+						</aui:button-row>
+					</c:when>
+					<c:otherwise>
+						<div class="form-search">
+							<liferay-ui:input-search placeholder='<%= LanguageUtil.get(locale, "keywords") %>' title='<%= LanguageUtil.get(locale, "search-categories") %>' />
+						</div>
+
+						<%
+						List<String> headerNames = new ArrayList<String>();
+
+						headerNames.add("category");
+						headerNames.add("level");
+
+						SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, serverURL, headerNames, null);
+
+						Map currentLoggerNames = new TreeMap();
+
+						Enumeration enu = LogManager.getCurrentLoggers();
+
+						while (enu.hasMoreElements()) {
+							Logger logger = (Logger)enu.nextElement();
+
+							if (Validator.isNull(keywords) || logger.getName().contains(keywords)) {
+								currentLoggerNames.put(logger.getName(), logger);
+							}
+						}
+
+						List results = ListUtil.fromCollection(currentLoggerNames.entrySet());
+
+						Iterator itr = results.iterator();
+
+						while (itr.hasNext()) {
+							Map.Entry entry = (Map.Entry)itr.next();
+
+							String name = (String)entry.getKey();
+							Logger logger = (Logger)entry.getValue();
+
+							Level level = logger.getLevel();
+
+							if (level == null) {
+								itr.remove();
+							}
+						}
+
+						searchContainer.setTotal(results.size());
+
+						results = ListUtil.subList(results, searchContainer.getStart(), searchContainer.getEnd());
+
+						searchContainer.setResults(results);
+
+						List resultRows = searchContainer.getResultRows();
+
+						for (int i = 0; i < results.size(); i++) {
+							Map.Entry entry = (Map.Entry)results.get(i);
+
+							String name = (String)entry.getKey();
+							Logger logger = (Logger)entry.getValue();
+
+							Level level = logger.getLevel();
+
+							ResultRow row = new ResultRow(entry, name, i);
+
+							// Name
+
+							row.addText(HtmlUtil.escape(name));
+
+							// Logger
+
+							StringBundler sb = new StringBundler(Levels.ALL_LEVELS.length * 6 + 7);
+
+							sb.append("<select name=\"");
+							sb.append(renderResponse.getNamespace());
+							sb.append("logLevel");
+							sb.append(HtmlUtil.escapeAttribute(name));
+							sb.append("\">");
+
+							for (int j = 0; j < Levels.ALL_LEVELS.length; j++) {
+								sb.append("<option ");
+
+								if (level.equals(Levels.ALL_LEVELS[j])) {
+									sb.append("selected");
+								}
+
+								sb.append(" value=\"");
+								sb.append(Levels.ALL_LEVELS[j]);
+								sb.append("\">");
+								sb.append(Levels.ALL_LEVELS[j]);
+								sb.append("</option>");
+							}
+
+							sb.append("</select>");
+
+							row.addText(sb.toString());
+
+							// Add result row
+
+							resultRows.add(row);
+						}
+						%>
+
+						<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+
+						<aui:button-row>
+
+							<%
+							String taglibUpdateLogLevels = renderResponse.getNamespace() + "saveServer('updateLogLevels');";
+							%>
+
+							<aui:button onClick="<%= taglibUpdateLogLevels %>" value="save" />
+						</aui:button-row>
+					</c:otherwise>
+				</c:choose>
+			</c:when>
+			<c:when test='<%= tabs2.equals("properties") %>'>
+				<liferay-ui:tabs
+					names="system-properties,portal-properties"
+					param="tabs3"
+					portletURL="<%= serverURL %>"
+				/>
+
+				<div class="form-search">
+					<liferay-ui:input-search placeholder='<%= LanguageUtil.get(locale, "keywords") %>' />
+				</div>
+
+				<%
+				List<String> headerNames = new ArrayList<String>();
+
+				headerNames.add("property");
+				headerNames.add("value");
+
+				if (tabs3.equals("portal-properties")) {
+					headerNames.add("source");
+				}
+
+				String emptyResultsMessage = null;
+
+				if (tabs3.equals("portal-properties")) {
+					emptyResultsMessage = "no-portal-properties-were-found-that-matched-the-keywords";
+				}
+				else {
+					emptyResultsMessage = "no-system-properties-were-found-that-matched-the-keywords";
+				}
+
+				SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, serverURL, headerNames, emptyResultsMessage);
+
+				Map<String, String> filteredProperties = new TreeMap<String, String>();
+
+				Properties properties = null;
+
+				if (tabs3.equals("portal-properties")) {
+					properties = PropsUtil.getProperties();
+				}
+				else {
+					properties = System.getProperties();
+				}
+
+				for (Map.Entry<Object, Object> entry : properties.entrySet()) {
+					String property = (String)entry.getKey();
+					String value = (String)entry.getValue();
+
+					if (Validator.isNull(keywords) || property.contains(keywords) || value.contains(keywords)) {
+						filteredProperties.put(property, value);
+					}
+				}
+
+				List results = ListUtil.fromCollection(filteredProperties.entrySet());
+
+				searchContainer.setTotal(results.size());
+
+				results = ListUtil.subList(results, searchContainer.getStart(), searchContainer.getEnd());
+
+				searchContainer.setResults(results);
+
+				List resultRows = searchContainer.getResultRows();
+
+				PortletPreferences serverPortletPreferences = PrefsPropsUtil.getPreferences();
+
+				Map<String, String[]> serverPortletPreferencesMap = serverPortletPreferences.getMap();
+
+				PortletPreferences companyPortletPreferences = PrefsPropsUtil.getPreferences(company.getCompanyId());
+
+				Map<String, String[]> companyPortletPreferencesMap = companyPortletPreferences.getMap();
+
+				for (int i = 0; i < results.size(); i++) {
+					Map.Entry entry = (Map.Entry)results.get(i);
+
+					String property = (String)entry.getKey();
+					String value = (String)entry.getValue();
+
+					boolean overriddenPropertyValue = false;
+
+					if (tabs3.equals("portal-properties")) {
+						if (serverPortletPreferencesMap.containsKey(property)) {
+							value = serverPortletPreferences.getValue(property, StringPool.BLANK);
+
+							overriddenPropertyValue = true;
+						}
+
+						if (companyPortletPreferencesMap.containsKey(property)) {
+							value = companyPortletPreferences.getValue(property, StringPool.BLANK);
+
+							overriddenPropertyValue = true;
+						}
+					}
+
+					ResultRow row = new ResultRow(entry, property, i);
+
+					// Property
+
+					row.addText(HtmlUtil.escape(StringUtil.shorten(property, 80)));
+
+					// Value
+
+					if (Validator.isNotNull(value)) {
+						if (value.length() > 80) {
+							StringBundler sb = new StringBundler(5);
+
+							sb.append("<span onmouseover=\"Liferay.Portal.ToolTip.show(this, '");
+							sb.append(HtmlUtil.escape(value));
+							sb.append("')\">");
+							sb.append(HtmlUtil.escape(StringUtil.shorten(value, 80)));
+							sb.append("</span>");
+
+							row.addText(sb.toString());
+						}
+						else {
+							row.addText(HtmlUtil.escape(StringUtil.shorten(value, 80)));
+						}
+					}
+					else {
+						row.addText(StringPool.BLANK);
+					}
+
+					// Source
+
+					if (tabs3.equals("portal-properties")) {
+						StringBundler sb = new StringBundler(5);
+
+						sb.append("<span onmouseover=\"Liferay.Portal.ToolTip.show(this, '");
+
+						if (overriddenPropertyValue) {
+							sb.append(LanguageUtil.get(pageContext, "the-value-of-this-property-was-overridden-using-the-control-panel-and-is-stored-in-the-database"));
+						}
+						else {
+							sb.append(LanguageUtil.get(pageContext, "the-value-of-this-property-is-read-from-a-portal.properties-file-or-one-of-its-extension-files"));
+						}
+
+						sb.append("')\"><img alt=\"");
+
+						if (overriddenPropertyValue) {
+							sb.append(LanguageUtil.get(pageContext, "the-value-of-this-property-was-overridden-using-the-control-panel-and-is-stored-in-the-database"));
+						}
+						else {
+							sb.append(LanguageUtil.get(pageContext, "the-value-of-this-property-is-read-from-a-portal.properties-file-or-one-of-its-extension-files"));
+						}
+
+						sb.append("\" src=\"");
+						sb.append(themeDisplay.getPathThemeImages());
+
+						if (overriddenPropertyValue) {
+							sb.append("/common/saved_in_database.png");
+						}
+						else {
+							sb.append("/common/page.png");
+						}
+
+						sb.append("\" /></span>");
+
+						row.addText(sb.toString());
+					}
+
+					// Add result row
+
+					resultRows.add(row);
+				}
+				%>
+
+				<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+			</c:when>
+			<c:when test='<%= tabs2.equals("captcha") %>'>
+				<liferay-ui:error key="reCaptchaPrivateKey" message="the-recaptcha-private-key-is-not-valid" />
+				<liferay-ui:error key="reCaptchaPublicKey" message="the-recaptcha-public-key-is-not-valid" />
+
+				<aui:fieldset>
+					<aui:input helpMessage='<%= LanguageUtil.format(pageContext, "recaptcha-help", "https://www.google.com/recaptcha/admin/create") %>' label="enable-recaptcha" name="reCaptchaEnabled" type="checkbox" value="<%= PrefsPropsUtil.getString(PropsKeys.CAPTCHA_ENGINE_IMPL, PropsValues.CAPTCHA_ENGINE_IMPL).equals(ReCaptchaImpl.class.getName()) %>" />
+
+					<aui:input cssClass="lfr-input-text-container" label="recaptcha-public-key" name="reCaptchaPublicKey" type="text" value="<%= PrefsPropsUtil.getString(PropsKeys.CAPTCHA_ENGINE_RECAPTCHA_KEY_PUBLIC, PropsValues.CAPTCHA_ENGINE_RECAPTCHA_KEY_PUBLIC) %>" />
+
+					<aui:input cssClass="lfr-input-text-container" label="recaptcha-private-key" name="reCaptchaPrivateKey" type="text" value="<%= PrefsPropsUtil.getString(PropsKeys.CAPTCHA_ENGINE_RECAPTCHA_KEY_PRIVATE, PropsValues.CAPTCHA_ENGINE_RECAPTCHA_KEY_PRIVATE) %>" />
+				</aui:fieldset>
+
+				<aui:button-row>
+
+					<%
+					String taglibUpdateCaptcha = renderResponse.getNamespace() + "saveServer('updateCaptcha');";
+					%>
+
+					<aui:button onClick="<%= taglibUpdateCaptcha %>" value="save" />
+				</aui:button-row>
+			</c:when>
+			<c:when test='<%= tabs2.equals("data-migration") %>'>
+
+				<%
+				List<ConvertProcess> convertProcesses = new ArrayList<ConvertProcess>();
+
+				for (String convertProcessClassName : PropsValues.CONVERT_PROCESSES) {
+					ConvertProcess convertProcess = (ConvertProcess)InstancePool.get(convertProcessClassName);
+
+					if (convertProcess.isEnabled()) {
+						convertProcesses.add(convertProcess);
+					}
+				}
+				%>
+
+				<c:choose>
+					<c:when test="<%= convertProcesses.isEmpty() %>">
+						<div class="alert alert-info">
+							<liferay-ui:message key="no-data-migration-processes-are-available" />
+						</div>
+					</c:when>
+					<c:otherwise>
+
+						<%
+						int i = 0;
+
+						for (ConvertProcess convertProcess : convertProcesses) {
+						%>
+
+							<liferay-ui:panel-container extended="<%= true %>" id='<%= "convert" + i + "PanelContainer" %>' persistState="<%= true %>">
+								<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id='<%= "convert" + i + "Panel" %>' persistState="<%= true %>" title="<%= convertProcess.getDescription() %>">
+									<c:if test="<%= convertProcess.getParameterNames() != null %>">
+										<aui:fieldset label='<%= Validator.isNotNull(convertProcess.getParameterDescription()) ? convertProcess.getParameterDescription() : "" %>'>
+
+											<%
+											for (String parameter : convertProcess.getParameterNames()) {
+												if (parameter.contains(StringPool.EQUAL) && parameter.contains(StringPool.SEMICOLON)) {
+													String[] parameterPair = StringUtil.split(parameter, CharPool.EQUAL);
+													String[] parameterSelectEntries = StringUtil.split(parameterPair[1], CharPool.SEMICOLON);
+											%>
+
+												<aui:select label="<%= parameterPair[0] %>" name="<%= convertProcess.getClass().getName() + StringPool.PERIOD + parameterPair[0] %>">
+
+													<%
+													for (String parameterSelectEntry : parameterSelectEntries) {
+													%>
+
+														<aui:option label="<%= parameterSelectEntry %>" />
+
+													<%
+													}
+													%>
+
+												</aui:select>
+
+											<%
+												}
+												else {
+													String[] parameterPair = StringUtil.split(parameter, CharPool.EQUAL);
+
+													String parameterName = null;
+													String parameterType = null;
+
+													if (parameterPair.length > 1) {
+														parameterName = parameterPair[0];
+														parameterType = parameterPair[1];
+													}
+													else {
+														parameterName = parameter;
+													}
+											%>
+
+													<aui:input cssClass="lfr-input-text-container" label="<%= parameterName %>" name="<%= convertProcess.getClass().getName() + StringPool.PERIOD + parameterName %>" type='<%= parameterType != null ? parameterType : "" %>' />
+
+											<%
+												}
+											}
+											%>
+
+										</aui:fieldset>
+									</c:if>
+
+									<aui:button-row>
+
+										<%
+										String taglibConvertProcess = renderResponse.getNamespace() + "saveServer('convertProcess." + convertProcess.getClass().getName() + "');";
+										%>
+
+										<aui:button onClick="<%= taglibConvertProcess %>" value="execute" />
+									</aui:button-row>
+								</liferay-ui:panel>
+							</liferay-ui:panel-container>
+
+							<br />
+
+						<%
+							i++;
+						}
+						%>
+
+					</c:otherwise>
+				</c:choose>
+			</c:when>
+			<c:when test='<%= tabs2.equals("file-uploads") %>'>
+				<aui:fieldset label="configure-the-file-upload-settings">
+					<liferay-ui:panel-container extended="<%= true %>" id="adminGeneralUploadPanelContainer" persistState="<%= true %>">
+						<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="adminGeneralUploadPanel" persistState="<%= true %>" title="general">
+							<aui:input cssClass="lfr-input-text-container" label="overall-maximum-file-size" name="uploadServletRequestImplMaxSize" type="text" value="<%= PrefsPropsUtil.getLong(PropsKeys.UPLOAD_SERVLET_REQUEST_IMPL_MAX_SIZE) %>" />
+
+							<aui:input cssClass="lfr-input-text-container" label="temporary-storage-directory" name="uploadServletRequestImplTempDir" type="text" value="<%= PrefsPropsUtil.getString(PropsKeys.UPLOAD_SERVLET_REQUEST_IMPL_TEMP_DIR, StringPool.BLANK) %>" />
+						</liferay-ui:panel>
+					</liferay-ui:panel-container>
+
+					<liferay-ui:panel-container extended="<%= true %>" id="adminDocumentLibraryPanelContainer" persistState="<%= true %>">
+						<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="adminDocumentLibraryPanel" persistState="<%= true %>" title="documents-and-media">
+							<aui:input cssClass="lfr-input-text-container" label="maximum-file-size" name="dlFileMaxSize" type="text" value="<%= PrefsPropsUtil.getLong(PropsKeys.DL_FILE_MAX_SIZE) %>" />
+
+							<aui:input cssClass="lfr-input-text-container" helpMessage="maximum-previewable-file-size-help" label="maximum-previewable-file-size" name="dlFileEntryPreviewableProcessorMaxSize" type="text" value="<%= PrefsPropsUtil.getLong(PropsKeys.DL_FILE_ENTRY_PREVIEWABLE_PROCESSOR_MAX_SIZE) %>" />
+
+							<aui:input cssClass="lfr-input-text-container" label="maximum-thumbnail-height" name="dlFileEntryThumbnailMaxHeight" type="text" value="<%= PrefsPropsUtil.getLong(PropsKeys.DL_FILE_ENTRY_THUMBNAIL_MAX_HEIGHT) %>" />
+
+							<aui:input cssClass="lfr-input-text-container" label="maximum-thumbnail-width" name="dlFileEntryThumbnailMaxWidth" type="text" value="<%= PrefsPropsUtil.getLong(PropsKeys.DL_FILE_ENTRY_THUMBNAIL_MAX_WIDTH) %>" />
+
+							<aui:input cssClass="lfr-input-text-container" label="allowed-file-extensions" name="dlFileExtensions" type="text" value="<%= PrefsPropsUtil.getString(PropsKeys.DL_FILE_EXTENSIONS) %>" />
+						</liferay-ui:panel>
+					</liferay-ui:panel-container>
+
+					<liferay-ui:panel-container extended="<%= true %>" id="adminWebContentImagesPanelContainer" persistState="<%= true %>">
+						<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="adminWebContentImagesPanel" persistState="<%= true %>" title="web-content-images">
+							<aui:input cssClass="lfr-input-text-container" label="maximum-file-size" name="journalImageSmallMaxSize" type="text" value="<%= PrefsPropsUtil.getLong(PropsKeys.JOURNAL_IMAGE_SMALL_MAX_SIZE) %>" />
+
+							<aui:input cssClass="lfr-input-text-container" label="allowed-file-extensions" name="journalImageExtensions" type="text" value="<%= PrefsPropsUtil.getString(PropsKeys.JOURNAL_IMAGE_EXTENSIONS) %>" />
+						</liferay-ui:panel>
+					</liferay-ui:panel-container>
+
+					<liferay-ui:panel-container extended="<%= true %>" id="adminShoppingCartImagesPanelContainer" persistState="<%= true %>">
+						<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="adminShoppingCartImagesPanel" persistState="<%= true %>" title="shopping-cart-images">
+							<aui:input cssClass="lfr-input-text-container" label='<%= LanguageUtil.get(pageContext, "maximum-file-size") + "(" + LanguageUtil.get(pageContext,"large-image") + ")" %>' name="shoppingImageLargeMaxSize" type="text" value="<%= PrefsPropsUtil.getLong(PropsKeys.SHOPPING_IMAGE_LARGE_MAX_SIZE) %>" />
+
+							<aui:input cssClass="lfr-input-text-container" label='<%= LanguageUtil.get(pageContext, "maximum-file-size") + "(" + LanguageUtil.get(pageContext,"medium-image") + ")" %>' name="shoppingImageMediumMaxSize" type="text" value="<%= PrefsPropsUtil.getLong(PropsKeys.SHOPPING_IMAGE_MEDIUM_MAX_SIZE) %>" />
+
+							<aui:input cssClass="lfr-input-text-container" label='<%= LanguageUtil.get(pageContext, "maximum-file-size") + "(" + LanguageUtil.get(pageContext,"small-image") + ")" %>' name="shoppingImageSmallMaxSize" type="text" value="<%= PrefsPropsUtil.getLong(PropsKeys.SHOPPING_IMAGE_SMALL_MAX_SIZE) %>" />
+
+							<aui:input cssClass="lfr-input-text-container" label="allowed-file-extensions" name="shoppingImageExtensions" type="text" value="<%= PrefsPropsUtil.getString(PropsKeys.SHOPPING_IMAGE_EXTENSIONS) %>" />
+						</liferay-ui:panel>
+					</liferay-ui:panel-container>
+
+					<liferay-ui:panel-container extended="<%= true %>" id="adminSoftwareCatalogImagesPanelContainer" persistState="<%= true %>">
+						<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="adminSoftwareCatalogImagesPanel" persistState="<%= true %>" title="software-catalog-images">
+							<aui:input cssClass="lfr-input-text-container" label="maximum-file-size" name="scImageMaxSize" type="text" value="<%= PrefsPropsUtil.getLong(PropsKeys.SC_IMAGE_MAX_SIZE) %>" />
+
+							<aui:input cssClass="lfr-input-text-container" label="maximum-thumbnail-height" name="scImageThumbnailMaxHeight" type="text" value="<%= PrefsPropsUtil.getLong(PropsKeys.SC_IMAGE_THUMBNAIL_MAX_HEIGHT) %>" />
+
+							<aui:input cssClass="lfr-input-text-container" label="maximum-thumbnail-width" name="scImageThumbnailMaxWidth" type="text" value="<%= PrefsPropsUtil.getLong(PropsKeys.SC_IMAGE_THUMBNAIL_MAX_WIDTH) %>" />
+						</liferay-ui:panel>
+					</liferay-ui:panel-container>
+
+					<liferay-ui:panel-container extended="<%= true %>" id="adminUserImagesPanelContainer" persistState="<%= true %>">
+						<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="adminUserImagesPanel" persistState="<%= true %>" title="user-images">
+							<aui:input cssClass="lfr-input-text-container" label="maximum-file-size" name="usersImageMaxSize" type="text" value="<%= PrefsPropsUtil.getLong(PropsKeys.USERS_IMAGE_MAX_SIZE) %>" />
+						</liferay-ui:panel>
+					</liferay-ui:panel-container>
+				</aui:fieldset>
+
+				<aui:button-row>
+
+					<%
+					String taglibUpdateFileUploads = renderResponse.getNamespace() + "saveServer('updateFileUploads');";
+					%>
+
+					<aui:button onClick="<%= taglibUpdateFileUploads %>" value="save" />
+				</aui:button-row>
+			</c:when>
+			<c:when test='<%= tabs2.equals("mail") %>'>
+				<aui:fieldset>
+					<liferay-ui:panel-container extended="<%= true %>" id="adminMailServerSettingsPanelContainer" persistState="<%= true %>">
+						<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="adminMailServerSettingsPanel" persistState="<%= true %>" title="configure-the-mail-server-settings">
+							<aui:input cssClass="lfr-input-text-container" label="incoming-pop-server" name="pop3Host" type="text" value="<%= PrefsPropsUtil.getString(PropsKeys.MAIL_SESSION_MAIL_POP3_HOST) %>" />
+
+							<aui:input cssClass="lfr-input-text-container" label="incoming-port" name="pop3Port" type="text" value="<%= PrefsPropsUtil.getString(PropsKeys.MAIL_SESSION_MAIL_POP3_PORT) %>" />
+
+							<aui:input label="use-a-secure-network-connection" name="pop3Secure" type="checkbox" value='<%= PrefsPropsUtil.getString(PropsKeys.MAIL_SESSION_MAIL_STORE_PROTOCOL).equals("pop3s") %>' />
+
+							<aui:input cssClass="lfr-input-text-container" label="user-name" name="pop3User" type="text" value="<%= PrefsPropsUtil.getString(PropsKeys.MAIL_SESSION_MAIL_POP3_USER) %>" />
+
+							<aui:input cssClass="lfr-input-text-container" label="password" name="pop3Password" type="password" value="<%= PrefsPropsUtil.getString(PropsKeys.MAIL_SESSION_MAIL_POP3_PASSWORD) %>" />
+
+							<aui:input cssClass="lfr-input-text-container" label="outgoing-smtp-server" name="smtpHost" type="text" value="<%= PrefsPropsUtil.getString(PropsKeys.MAIL_SESSION_MAIL_SMTP_HOST) %>" />
+
+							<aui:input cssClass="lfr-input-text-container" label="outgoing-port" name="smtpPort" type="text" value="<%= PrefsPropsUtil.getString(PropsKeys.MAIL_SESSION_MAIL_SMTP_PORT) %>" />
+
+							<aui:input label="use-a-secure-network-connection" name="smtpSecure" type="checkbox" value='<%= PrefsPropsUtil.getString(PropsKeys.MAIL_SESSION_MAIL_TRANSPORT_PROTOCOL).equals("smtps") %>' />
+
+							<aui:input cssClass="lfr-input-text-container" label="user-name" name="smtpUser" type="text" value="<%= PrefsPropsUtil.getString(PropsKeys.MAIL_SESSION_MAIL_SMTP_USER) %>" />
+
+							<aui:input cssClass="lfr-input-text-container" label="password" name="smtpPassword" type="password" value="<%= PrefsPropsUtil.getString(PropsKeys.MAIL_SESSION_MAIL_SMTP_PASSWORD) %>" />
+
+							<aui:input cssClass="lfr-textarea-container" label="manually-specify-additional-javamail-properties-to-override-the-above-configuration" name="advancedProperties" type="textarea" value="<%= PrefsPropsUtil.getString(PropsKeys.MAIL_SESSION_MAIL_ADVANCED_PROPERTIES, StringPool.BLANK) %>" />
+						</liferay-ui:panel>
+					</liferay-ui:panel-container>
+				</aui:fieldset>
+
+				<aui:button-row>
+
+					<%
+					String taglibUpdateMail = renderResponse.getNamespace() + "saveServer('updateMail');";
+					%>
+
+					<aui:button onClick="<%= taglibUpdateMail %>" value="save" />
+				</aui:button-row>
+			</c:when>
+			<c:when test='<%= tabs2.equals("external-services") %>'>
+				<aui:fieldset>
+					<liferay-ui:panel-container extended="<%= true %>" id="adminExternalServicesPanelContainer" persistState="<%= true %>">
+						<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="adminImageMagickConversionPanel" persistState="<%= true %>" title="enabling-imagemagick-provides-document-preview-functionality">
+							<aui:input label="enabled" name="imageMagickEnabled" type="checkbox" value="<%= ImageMagickUtil.isEnabled() %>" />
+
+							<aui:input cssClass="lfr-input-text-container" label="path" name="imageMagickPath" type="text" value="<%= ImageMagickUtil.getGlobalSearchPath() %>" />
+
+							<aui:fieldset label="resource-limits">
+
+								<%
+								Properties resourceLimitsProperties = ImageMagickUtil.getResourceLimitsProperties();
+
+								for (String label : _IMAGEMAGICK_RESOURCE_LIMIT_LABELS) {
+									String name = "imageMagickLimit" + StringUtil.upperCaseFirstLetter(label);
+								%>
+
+									<aui:input cssClass="lfr-input-text-container" label="<%= label %>" name="<%= name %>" type="text" value="<%= resourceLimitsProperties.getProperty(label) %>" />
+
+								<%
+								}
+								%>
+
+							</aui:fieldset>
+						</liferay-ui:panel>
+
+						<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="adminOpenOfficeConversionPanel" persistState="<%= true %>" title="enabling-openoffice-integration-provides-document-conversion-functionality">
+							<aui:input label="enabled" name="openOfficeEnabled" type="checkbox" value="<%= PrefsPropsUtil.getBoolean(PropsKeys.OPENOFFICE_SERVER_ENABLED) %>" />
+
+							<aui:input cssClass="lfr-input-text-container" label="port" name="openOfficePort" type="text" value="<%= PrefsPropsUtil.getString(PropsKeys.OPENOFFICE_SERVER_PORT) %>" />
+						</liferay-ui:panel>
+
+						<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="adminXugglerPanel" persistState="<%= true %>" title="enabling-xuggler-provides-video-conversion-functionality">
+							<c:choose>
+								<c:when test="<%= XugglerUtil.isNativeLibraryInstalled() %>">
+									<div class="alert alert-info">
+										<liferay-ui:message key="xuggler-installed" />
+									</div>
+
+									<aui:input label="enabled" name="xugglerEnabled" type="checkbox" value="<%= XugglerUtil.isEnabled() %>" />
+								</c:when>
+								<c:otherwise>
+
+									<%
+									String xugglerHelp = LanguageUtil.format(pageContext, "xuggler-help", "http://www.xuggle.com/xuggler/downloads");
+
+									String[] xugglerOptions = PropsUtil.getArray(PropsKeys.XUGGLER_JAR_OPTIONS);
+
+									String bitmode = OSDetector.getBitmode();
+
+									String guess = StringPool.BLANK;
+
+									if (Validator.isNotNull(bitmode) && (bitmode.equals("32") || bitmode.equals("64"))) {
+										if (OSDetector.isApple()) {
+											guess = bitmode + "-mac";
+										}
+										else if (OSDetector.isLinux()) {
+											guess = bitmode + "-linux";
+										}
+										else if (OSDetector.isWindows()) {
+											guess = bitmode + "-win";
+										}
+
+										if (Validator.isNotNull(guess)) {
+											boolean found = false;
+
+											for (String xugglerOption : xugglerOptions) {
+												if (xugglerOption.equals(guess)) {
+													found = true;
+
+													break;
+												}
+											}
+
+											if (!found) {
+												guess = StringPool.BLANK;
+											}
+										}
+									}
+									%>
+
+									<div class="alert alert-info">
+										<liferay-ui:message key="<%= xugglerHelp %>" />
+									</div>
+
+									<div id="<portlet:namespace />xugglerProgressInfo"></div>
+
+									<liferay-ui:progress
+										id='<%= renderResponse.getNamespace() + "xugglerProgressInfo" %>'
+										message="preparing-the-installation"
+										sessionKey="<%= LiferayFileUpload.PERCENT + WebKeys.XUGGLER_INSTALL_STATUS %>"
+									/>
+
+									<aui:select label="jar-file" name="jarName">
+
+										<%
+										if (Validator.isNull(guess)) {
+										%>
+
+											<aui:option label="unknown" value="" />
+
+										<%
+										}
+
+										for (String xugglerOption : xugglerOptions) {
+											String jarFile = PropsUtil.get(PropsKeys.XUGGLER_JAR_FILE, new Filter(xugglerOption));
+											String jarName = PropsUtil.get(PropsKeys.XUGGLER_JAR_NAME, new Filter(xugglerOption));
+										%>
+
+											<aui:option label='<%= jarName + " (" + jarFile + ")" %>' selected="<%= xugglerOption.equals(guess) %>" value="<%= jarFile %>" />
+
+										<%
+										}
+										%>
+
+									</aui:select>
+
+									<aui:button-row>
+										<aui:button name="installXugglerButton" value="install" />
+									</aui:button-row>
+								</c:otherwise>
+							</c:choose>
+						</liferay-ui:panel>
+					</liferay-ui:panel-container>
+				</aui:fieldset>
+
+				<aui:button-row>
+
+					<%
+					String taglibUpdateExternalServices = renderResponse.getNamespace() + "saveServer('updateExternalServices');";
+					%>
+
+					<aui:button onClick="<%= taglibUpdateExternalServices %>" value="save" />
+				</aui:button-row>
+			</c:when>
+			<c:when test='<%= tabs2.equals("script") %>'>
+
+				<%
+				String language = ParamUtil.getString(renderRequest, "language", "javascript");
+
+				if (SessionMessages.contains(renderRequest, "language")) {
+					language = (String)SessionMessages.get(renderRequest, "language");
+				}
+
+				String script = "// ### Javascript Sample ###\n\nnumber = Packages.com.liferay.portal.service.UserLocalServiceUtil.getUsersCount();\n\nout.println(number);";
+
+				if (SessionMessages.contains(renderRequest, "script")) {
+					script = (String)SessionMessages.get(renderRequest, "script");
+				}
+
+				String scriptOutput = (String)SessionMessages.get(renderRequest, "scriptOutput");
+				%>
+
+				<aui:fieldset>
+					<aui:select name="language">
+
+						<%
+						for (String supportedLanguage: ScriptingUtil.getSupportedLanguages()) {
+						%>
+
+							<aui:option label="<%= TextFormatter.format(supportedLanguage, TextFormatter.J) %>" selected="<%= supportedLanguage.equals(language) %>" value="<%= supportedLanguage %>" />
+
+						<%
+						}
+						%>
+
+					</aui:select>
+
+					<aui:input cssClass="lfr-textarea-container" name="script" resizable="<%= true %>" type="textarea" value="<%= script %>" />
+				</aui:fieldset>
+
+				<c:if test="<%= Validator.isNotNull(scriptOutput) %>">
+					<b><liferay-ui:message key="output" /></b>
+
+					<pre><%= scriptOutput %></pre>
+				</c:if>
+
+				<aui:button-row>
+
+					<%
+					String taglibRunScript = renderResponse.getNamespace() + "saveServer('runScript');";
+					%>
+
+					<aui:button onClick="<%= taglibRunScript %>" value="execute" />
+				</aui:button-row>
+			</c:when>
+			<c:when test='<%= tabs2.equals("shutdown") %>'>
+				<liferay-ui:error key="shutdownMinutes" message="please-enter-the-number-of-minutes" />
+
+				<aui:button-row>
+
+					<%
+					String taglibShutdown = renderResponse.getNamespace() + "saveServer('shutdown');";
+					%>
+
+					<c:choose>
+						<c:when test="<%= ShutdownUtil.isInProcess() %>">
+							<aui:button onClick="<%= taglibShutdown %>" value="cancel-shutdown" />
+						</c:when>
+						<c:otherwise>
+							<aui:fieldset>
+								<aui:input label="number-of-minutes" name="minutes" size="3" type="text">
+									<aui:validator name="digits" />
+									<aui:validator name="min">1</aui:validator>
+									<aui:validator name="required" />
+								</aui:input>
+
+								<aui:input cssClass="lfr-textarea-container" label="custom-message" name='<%= "message" + GetterUtil.getString(ShutdownUtil.getMessage()) %>' type="textarea" />
+							</aui:fieldset>
+
+							<aui:button onClick="<%= taglibShutdown %>" value="shutdown" />
+						</c:otherwise>
+					</c:choose>
+				</aui:button-row>
+			</c:when>
+			<c:otherwise>
+
+				<%
+				Runtime runtime = Runtime.getRuntime();
+
+				numberFormat = NumberFormat.getInstance(locale);
+
+				long totalMemory = runtime.totalMemory();
+				long usedMemory = totalMemory - runtime.freeMemory();
+				%>
+
+				<div>
+					<portlet:resourceURL var="totalMemoryChartURL">
+						<portlet:param name="struts_action" value="/admin_server/view_chart" />
+						<portlet:param name="type" value="total" />
+						<portlet:param name="totalMemory" value="<%= String.valueOf(totalMemory) %>" />
+						<portlet:param name="usedMemory" value="<%= String.valueOf(usedMemory) %>" />
+					</portlet:resourceURL>
+
+					<img border="0" src="<%= totalMemoryChartURL %>" />
+
+					<portlet:resourceURL var="maxMemoryChartURL">
+						<portlet:param name="struts_action" value="/admin_server/view_chart" />
+						<portlet:param name="type" value="max" />
+						<portlet:param name="maxMemory" value="<%= String.valueOf(runtime.maxMemory()) %>" />
+						<portlet:param name="usedMemory" value="<%= String.valueOf(usedMemory) %>" />
+					</portlet:resourceURL>
+
+					<img border="0" src="<%= maxMemoryChartURL %>" />
+				</div>
+
+				<br />
+
+				<table class="lfr-table">
+				<tr>
+					<td>
+						<liferay-ui:message key="used-memory" />:
+					</td>
+					<td>
+						<%= numberFormat.format(usedMemory) %> <liferay-ui:message key="bytes" />
+					</td>
+				</tr>
+				<tr>
+					<td>
+						<liferay-ui:message key="total-memory" />:
+					</td>
+					<td>
+						<%= numberFormat.format(runtime.totalMemory()) %> <liferay-ui:message key="bytes" />
+					</td>
+				</tr>
+				<tr>
+					<td>
+						<liferay-ui:message key="maximum-memory" />:
+					</td>
+					<td>
+						<%= numberFormat.format(runtime.maxMemory()) %> <liferay-ui:message key="bytes" />
+					</td>
+				</tr>
+				</table>
+
+				<br />
+
+				<liferay-ui:panel-container extended="<%= true %>" id="adminServerAdministrationActionsPanelContainer" persistState="<%= true %>">
+					<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="adminServerAdministrationActionsPanel" persistState="<%= true %>" title="actions">
+						<table class="table table-condensed table-hover">
+						<tr>
+							<td>
+								<liferay-ui:message key="run-the-garbage-collector-to-free-up-memory" />
+							</td>
+							<td>
+
+								<%
+								String taglibGC = renderResponse.getNamespace() + "saveServer('gc');";
+								%>
+
+								<aui:button onClick="<%= taglibGC %>" value="execute" />
+							</td>
+						</tr>
+						<tr>
+							<td>
+								<liferay-ui:message key="clear-content-cached-by-this-vm" />
+							</td>
+							<td>
+
+								<%
+								String taglibCacheSingle = renderResponse.getNamespace() + "saveServer('cacheSingle');";
+								%>
+
+								<aui:button onClick="<%= taglibCacheSingle %>" value="execute" />
+							</td>
+						</tr>
+						<tr>
+							<td>
+								<liferay-ui:message key="clear-content-cached-across-the-cluster" />
+							</td>
+							<td>
+
+								<%
+								String taglibCacheMulti = renderResponse.getNamespace() + "saveServer('cacheMulti');";
+								%>
+
+								<aui:button onClick="<%= taglibCacheMulti %>" value="execute" />
+							</td>
+						</tr>
+						<tr>
+							<td>
+								<liferay-ui:message key="clear-the-database-cache" />
+							</td>
+							<td>
+
+								<%
+								String taglibCacheDb = renderResponse.getNamespace() + "saveServer('cacheDb');";
+								%>
+
+								<aui:button onClick="<%= taglibCacheDb %>" value="execute" />
+							</td>
+						</tr>
+						<tr>
+							<td>
+								<liferay-ui:message key="clear-the-direct-servlet-cache" />
+							</td>
+							<td>
+
+								<%
+								String taglibCacheServlet = renderResponse.getNamespace() + "saveServer('cacheServlet');";
+								%>
+
+								<aui:button onClick="<%= taglibCacheServlet %>" value="execute" />
+							</td>
+						</tr>
+						<tr>
+							<td>
+								<liferay-ui:message key="reindex-all-search-indexes" />
+							</td>
+							<td>
+
+								<%
+								String taglibReindex = renderResponse.getNamespace() + "saveServer('reindex');";
+								%>
+
+								<aui:button onClick="<%= taglibReindex %>" value="execute" />
+							</td>
+						</tr>
+						<tr>
+							<td>
+								<liferay-ui:message key="reindex-all-spell-check-indexes" />
+							</td>
+							<td>
+
+								<%
+								String taglibReindexDictionaries = renderResponse.getNamespace() + "saveServer('reindexDictionaries');";
+								%>
+
+								<aui:button onClick="<%= taglibReindexDictionaries %>" value="execute" />
+							</td>
+						</tr>
+						<tr>
+							<td>
+								<liferay-ui:message key="reset-preview-and-thumbnail-files-for-documents-and-media-portlet" />
+							</td>
+							<td>
+
+								<%
+								String taglibDLPreviews = renderResponse.getNamespace() + "saveServer('dlPreviews');";
+								%>
+
+								<aui:button onClick="<%= taglibDLPreviews %>" value="execute" />
+							</td>
+						</tr>
+						<tr>
+							<td>
+								<liferay-ui:message key="generate-thread-dump" />
+							</td>
+							<td>
+
+								<%
+								String taglibThreadDump = renderResponse.getNamespace() + "saveServer('threadDump');";
+								%>
+
+								<aui:button onClick="<%= taglibThreadDump %>" value="execute" />
+							</td>
+						</tr>
+						<tr>
+							<td>
+								<liferay-ui:message key="verify-database-tables-of-all-plugins" />
+							</td>
+							<td>
+
+								<%
+								String taglibVerifyPluginTables = renderResponse.getNamespace() + "saveServer('verifyPluginTables');";
+								%>
+
+								<aui:button onClick="<%= taglibVerifyPluginTables %>" value="execute" />
+							</td>
+						</tr>
+						<tr>
+							<td>
+								<liferay-ui:message key="verify-membership-policies" />
+							</td>
+							<td>
+
+								<%
+								String taglibVerifyMembershipPolicies = renderResponse.getNamespace() + "saveServer('verifyMembershipPolicies');";
+								%>
+
+								<aui:button onClick="<%= taglibVerifyMembershipPolicies %>" value="execute" />
+							</td>
+						</tr>
+						<tr>
+							<td>
+								<liferay-ui:message key="clean-up-permissions" /> <liferay-ui:icon-help message="clean-up-permissions-help" />
+							</td>
+							<td>
+
+								<%
+								String taglibCleanUpPermissions = renderResponse.getNamespace() + "saveServer('cleanUpPermissions');";
+								%>
+
+								<aui:button onClick="<%= taglibCleanUpPermissions %>" value="execute" />
+							</td>
+						</tr>
+						</table>
+					</liferay-ui:panel>
+				</liferay-ui:panel-container>
+			</c:otherwise>
+		</c:choose>
+	</c:otherwise>
+</c:choose>
+
+<%!
+private static final String[] _IMAGEMAGICK_RESOURCE_LIMIT_LABELS= {"area", "disk", "file", "map", "memory", "thread", "time"};
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/view.jsp
new file mode 100644
index 0000000..2084c8d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/admin/view.jsp
@@ -0,0 +1,130 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/admin/init.jsp" %>
+
+<c:choose>
+	<c:when test="<%= permissionChecker.isOmniadmin() %>">
+
+		<%
+		String tabs1 = ParamUtil.getString(request, "tabs1", "server");
+
+		boolean showTabs1 = false;
+
+		if (portletName.equals(PortletKeys.ADMIN_INSTANCE)) {
+			tabs1 = "instances";
+		}
+		else if (portletName.equals(PortletKeys.ADMIN_PLUGINS)) {
+			tabs1 = "plugins";
+		}
+		else if (portletName.equals(PortletKeys.ADMIN_SERVER)) {
+			tabs1 = "server";
+		}
+		else if (portletName.equals(PortletKeys.ADMIN)) {
+			showTabs1 = true;
+		}
+
+		String tabs2 = ParamUtil.getString(request, "tabs2");
+		String tabs3 = ParamUtil.getString(request, "tabs3");
+
+		if (tabs1.equals("plugins")) {
+			if (!tabs2.equals("portlet-plugins") && !tabs2.equals("theme-plugins") && !tabs2.equals("layout-template-plugins") && !tabs2.equals("hook-plugins") && !tabs2.equals("web-plugins")) {
+				tabs2 = "portlet-plugins";
+			}
+		}
+
+		int cur = ParamUtil.getInteger(request, SearchContainer.DEFAULT_CUR_PARAM);
+		int delta = ParamUtil.getInteger(request, SearchContainer.DEFAULT_DELTA_PARAM);
+
+		PortletURL portletURL = renderResponse.createRenderURL();
+
+		portletURL.setParameter("struts_action", "/admin/view");
+		portletURL.setParameter("tabs1", tabs1);
+		portletURL.setParameter("tabs2", tabs2);
+		portletURL.setParameter("tabs3", tabs3);
+		%>
+
+		<portlet:renderURL var="redirectURL">
+			<portlet:param name="struts_action" value="/admin/view" />
+			<portlet:param name="tabs1" value="<%= tabs1 %>" />
+			<portlet:param name="tabs2" value="<%= tabs2 %>" />
+			<portlet:param name="tabs3" value="<%= tabs3 %>" />
+			<portlet:param name="cur" value="<%= String.valueOf(cur) %>" />
+		</portlet:renderURL>
+
+		<aui:form action="<%= portletURL.toString() %>" method="post" name="fm">
+			<aui:input name="<%= Constants.CMD %>" type="hidden" />
+			<aui:input name="tabs1" type="hidden" value="<%= tabs1 %>" />
+			<aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
+			<aui:input name="tabs3" type="hidden" value="<%= tabs3 %>" />
+			<aui:input name="redirect" type="hidden" value="<%= redirectURL %>" />
+			<aui:input name="portletId" type="hidden" />
+
+			<c:if test="<%= showTabs1 %>">
+				<liferay-ui:tabs
+					names="server,instances,plugins"
+					url="<%= portletURL.toString() %>"
+				/>
+			</c:if>
+
+			<c:choose>
+				<c:when test='<%= tabs1.equals("server") %>'>
+					<%@ include file="/html/portlet/admin/server.jspf" %>
+
+					<aui:script use="liferay-admin">
+						new Liferay.Portlet.Admin(
+							{
+								form: document.<portlet:namespace />fm,
+								namespace: '<portlet:namespace />',
+								url: '<portlet:actionURL><portlet:param name="struts_action" value="/admin/edit_server" /></portlet:actionURL>'
+							}
+						);
+					</aui:script>
+				</c:when>
+				<c:when test='<%= tabs1.equals("instances") %>'>
+					<%@ include file="/html/portlet/admin/instances.jspf" %>
+				</c:when>
+				<c:when test='<%= tabs1.equals("plugins") %>'>
+
+					<%
+					PortletURL marketplaceURL = null;
+
+					if ((PrefsPropsUtil.getBoolean(PropsKeys.AUTO_DEPLOY_ENABLED, PropsValues.AUTO_DEPLOY_ENABLED) || PortalUtil.isOmniadmin(user.getUserId())) && PortletLocalServiceUtil.hasPortlet(themeDisplay.getCompanyId(), PortletKeys.MARKETPLACE_STORE)) {
+						marketplaceURL = ((RenderResponseImpl)renderResponse).createRenderURL(PortletKeys.MARKETPLACE_STORE);
+					}
+
+					boolean showEditPluginHREF = false;
+					boolean showReindexButton = true;
+					%>
+
+					<%@ include file="/html/portlet/plugins_admin/plugins.jspf" %>
+				</c:when>
+			</c:choose>
+		</aui:form>
+
+		<aui:script>
+			function <portlet:namespace />saveServer(cmd) {
+				document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = cmd;
+				document.<portlet:namespace />fm.<portlet:namespace />redirect.value = "<portlet:renderURL><portlet:param name="struts_action" value="/admin/view" /><portlet:param name="tabs1" value="<%= tabs1 %>" /><portlet:param name="tabs2" value="<%= tabs2 %>" /><portlet:param name="tabs3" value="<%= tabs3 %>" /><portlet:param name="<%= SearchContainer.DEFAULT_CUR_PARAM %>" value="<%= String.valueOf(cur) %>" /><portlet:param name="<%= SearchContainer.DEFAULT_DELTA_PARAM %>" value="<%= String.valueOf(delta) %>" /></portlet:renderURL>";
+
+				submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/admin/edit_server" /></portlet:actionURL>");
+			}
+		</aui:script>
+	</c:when>
+	<c:otherwise>
+		<liferay-util:include page="/html/portal/portlet_access_denied.jsp" />
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/amazon_rankings/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/amazon_rankings/configuration.jsp
new file mode 100644
index 0000000..4ab6940
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/amazon_rankings/configuration.jsp
@@ -0,0 +1,65 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/amazon_rankings/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+String isbnsString = StringUtil.merge(isbns, StringPool.SPACE);
+
+isbns = StringUtil.split(ParamUtil.getString(request, "isbns", isbnsString), CharPool.SPACE);
+
+isbnsString = StringUtil.merge(isbns, StringPool.SPACE);
+%>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+
+	<liferay-ui:error exception="<%= ValidatorException.class %>">
+
+		<%
+		ValidatorException ve = (ValidatorException)errorException;
+		%>
+
+		<liferay-ui:message key="the-following-are-invalid-isbn-numbers" />
+
+		<%
+		Enumeration enu = ve.getFailedKeys();
+
+		while (enu.hasMoreElements()) {
+			String isbn = (String)enu.nextElement();
+		%>
+
+			<strong><%= isbn %></strong><%= (enu.hasMoreElements()) ? ", " : "." %>
+
+		<%
+		}
+		%>
+
+	</liferay-ui:error>
+
+	<aui:fieldset>
+		<aui:input autoFocus="<%= (windowState.equals(WindowState.MAXIMIZED) || windowState.equals(LiferayWindowState.POP_UP)) %>" cssClass="lfr-textarea-container" label="add-all-isbn-numbers-separated-by-spaces" name="preferences--isbns--" type="textarea" value="<%= isbnsString %>" wrap="soft" />
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/amazon_rankings/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/amazon_rankings/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/amazon_rankings/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/amazon_rankings/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/amazon_rankings/init.jsp
new file mode 100644
index 0000000..4cd93ba
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/amazon_rankings/init.jsp
@@ -0,0 +1,28 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.amazonrankings.model.AmazonRankings" %><%@
+page import="com.liferay.portlet.amazonrankings.util.AmazonRankingsUtil" %>
+
+<%
+String[] isbns = portletPreferences.getValues("isbns", new String[0]);
+
+NumberFormat numberFormat = NumberFormat.getNumberInstance(locale);
+%>
+
+<%@ include file="/html/portlet/amazon_rankings/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/amazon_rankings/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/amazon_rankings/view.jsp
new file mode 100644
index 0000000..c825e52
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/amazon_rankings/view.jsp
@@ -0,0 +1,78 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/amazon_rankings/init.jsp" %>
+
+<c:choose>
+	<c:when test="<%= Validator.isNull(AmazonRankingsUtil.getAmazonAccessKeyId()) %>">
+		<liferay-ui:message key="please-contact-the-administrator-to-configure-an-amazon-license" />
+	</c:when>
+	<c:otherwise>
+		<table class="lfr-table">
+
+		<%
+		Set<AmazonRankings> amazonRankingsSet = new TreeSet<AmazonRankings>();
+
+		for (int i = 0; i < isbns.length; i++) {
+			AmazonRankings rankings = AmazonRankingsUtil.getAmazonRankings(isbns[i]);
+
+			if (rankings != null) {
+				amazonRankingsSet.add(rankings);
+			}
+		}
+
+		int i = 0;
+
+		for (AmazonRankings amazonRankings : amazonRankingsSet) {
+		%>
+
+			<tr>
+				<td>
+					<aui:a href='<%= "http://www.amazon.com/exec/obidos/ASIN/" + amazonRankings.getISBN() %>' target="_blank">
+						<img border="0" src="<%= amazonRankings.getSmallImageURL() %>" />
+					</aui:a>
+				</td>
+				<td>
+					<span style="font-size: xx-small;">
+					<liferay-ui:message key="title" />: <%= StringUtil.shorten(amazonRankings.getProductName(), _DESCRIPTION_LENGTH) %><br />
+					<liferay-ui:message key="author" />: <%= StringUtil.shorten(StringUtil.merge(amazonRankings.getAuthors(), ", "), _DESCRIPTION_LENGTH) %><br />
+					<liferay-ui:message key="publisher" />: <%= StringUtil.shorten(amazonRankings.getManufacturer() + "; (" + amazonRankings.getReleaseDateAsString() + ")", _DESCRIPTION_LENGTH) %><br />
+					<liferay-ui:message key="isbn" />: <%= amazonRankings.getISBN() %><br />
+					<liferay-ui:message key="rank" />: <%= numberFormat.format(amazonRankings.getSalesRank()) %>
+					</span>
+				</td>
+			</tr>
+
+			<c:if test="<%= i < amazonRankingsSet.size() - 1 %>">
+				<tr>
+					<td>
+						<br />
+					</td>
+				</tr>
+			</c:if>
+
+		<%
+			i++;
+		}
+		%>
+
+		</table>
+	</c:otherwise>
+</c:choose>
+
+<%!
+private static final int _DESCRIPTION_LENGTH = 16;
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/configuration.jsp
new file mode 100644
index 0000000..bb8dd35
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/configuration.jsp
@@ -0,0 +1,63 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/announcements/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+%>
+
+<liferay-portlet:renderURL portletConfiguration="true" var="portletURL">
+	<portlet:param name="redirect" value="<%= redirect %>" />
+</liferay-portlet:renderURL>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveConfiguration();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+
+	<aui:fieldset>
+		<aui:select label="maximum-items-to-display" name="preferences--pageDelta--">
+
+			<%
+			for (int pageDeltaValue : PropsValues.ANNOUNCEMENTS_ENTRY_PAGE_DELTA_VALUES) {
+			%>
+
+				<aui:option label="<%= pageDeltaValue %>" selected="<%= pageDelta == pageDeltaValue %>" />
+
+			<%
+			}
+			%>
+
+		</aui:select>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />saveConfiguration',
+		function() {
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/css/.sass-cache/main.css
new file mode 100644
index 0000000..f4ba0b3
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/css/.sass-cache/main.css
@@ -0,0 +1,58 @@
+.portlet-alerts .entry {
+  border: 6px solid #c00;
+  margin: 8px 0px;
+  padding: 6px; }
+.portlet-alerts .entry-content {
+  display: block;
+  padding: 2px 2px 2px 30px; }
+.portlet-alerts .entry-scope {
+  color: #ccc;
+  display: block; }
+.portlet-alerts .entry-type-general {
+  background: white url("@theme_image_path@/common/page.png") left top no-repeat;
+  clear: both; }
+.portlet-alerts .entry-type-news {
+  background: white url("@theme_image_path@/common/page.png") left top no-repeat;
+  clear: both; }
+.portlet-alerts .entry-type-test {
+  background: white url("@theme_image_path@/common/page.png") left top no-repeat;
+  clear: both; }
+
+.portlet-announcements .entry {
+  margin: 4px 0px 1.2em;
+  padding-bottom: 0.5em; }
+.portlet-announcements .entry-content {
+  display: block;
+  margin-bottom: 0.5em;
+  padding: 2px 2px 2px 30px; }
+.portlet-announcements .entry-scope {
+  color: #555;
+  display: block; }
+.portlet-announcements .delete-entry {
+  padding-right: 2em; }
+.portlet-announcements .entry-type-general {
+  background: white url("@theme_image_path@/common/all_pages.png") 4px 4px no-repeat;
+  clear: both; }
+.portlet-announcements .entry-type-news {
+  background: white url("@theme_image_path@/common/page.png") 4px 4px no-repeat;
+  clear: both; }
+.portlet-announcements .entry-type-test {
+  background: white url("@theme_image_path@/common/page.png") 4px 4px no-repeat;
+  clear: both; }
+
+.portlet-announcements .important, .portlet-alerts .important {
+  font-weight: normal; }
+.portlet-announcements .entry-title, .portlet-alerts .entry-title {
+  display: block;
+  margin-bottom: 0;
+  position: relative; }
+.portlet-announcements .read-entries .entry-title, .portlet-alerts .read-entries .entry-title {
+  filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50);
+  opacity: 0.5; }
+.portlet-announcements .edit-actions, .portlet-alerts .edit-actions {
+  float: right;
+  font-size: 0.7em;
+  font-weight: normal;
+  right: 0;
+  top: 0; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/css/main.css
new file mode 100644
index 0000000..726f212
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/css/main.css
@@ -0,0 +1,98 @@
+@import "compass";
+
+.portlet-alerts {
+	.entry {
+		border: 6px solid #c00;
+		margin: 8px 0px;
+		padding: 6px;
+	}
+
+	.entry-content {
+		display: block;
+		padding: 2px 2px 2px 30px;
+	}
+
+	.entry-scope {
+		color: #ccc;
+		display: block;
+	}
+
+	.entry-type-general {
+		background: #fff url('@theme_image_path@/common/page.png') left top no-repeat;
+		clear: both;
+	}
+
+	.entry-type-news {
+		background: #fff url('@theme_image_path@/common/page.png') left top no-repeat;
+		clear: both;
+	}
+
+	.entry-type-test {
+		background: #fff url('@theme_image_path@/common/page.png') left top no-repeat;
+		clear: both;
+	}
+}
+
+.portlet-announcements {
+	.entry {
+		margin: 4px 0px 1.2em;
+		padding-bottom: 0.5em;
+	}
+
+	.entry.last {
+	}
+
+	.entry-content {
+		display: block;
+		margin-bottom: 0.5em;
+		padding: 2px 2px 2px 30px;
+	}
+
+	.entry-scope {
+		color: #555;
+		display: block;
+	}
+
+	.delete-entry {
+		padding-right: 2em;
+	}
+
+	.entry-type-general {
+		background: #fff url('@theme_image_path@/common/all_pages.png') 4px 4px no-repeat;
+		clear: both;
+	}
+
+	.entry-type-news {
+		background: #fff url('@theme_image_path@/common/page.png') 4px 4px no-repeat;
+		clear: both;
+	}
+
+	.entry-type-test {
+		background: #fff url('@theme_image_path@/common/page.png') 4px 4px no-repeat;
+		clear: both;
+	}
+}
+
+.portlet-announcements, .portlet-alerts {
+	.important {
+		font-weight: normal;
+	}
+
+	.entry-title {
+		display: block;
+		margin-bottom: 0;
+		position: relative;
+	}
+
+	.read-entries .entry-title {
+		@include opacity(0.5);
+	}
+
+	.edit-actions {
+		float: right;
+		font-size: 0.7em;
+		font-weight: normal;
+		right: 0;
+		top: 0;
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/edit_entry.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/edit_entry.jsp
new file mode 100644
index 0000000..57cf709
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/edit_entry.jsp
@@ -0,0 +1,160 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/announcements/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+AnnouncementsEntry entry = (AnnouncementsEntry)request.getAttribute(WebKeys.ANNOUNCEMENTS_ENTRY);
+
+long entryId = BeanParamUtil.getLong(entry, request, "entryId");
+
+String content = BeanParamUtil.getString(entry, request, "content");
+
+boolean displayImmediately = ParamUtil.getBoolean(request, "displayImmediately");
+
+if (entry == null) {
+	displayImmediately = true;
+}
+%>
+
+<aui:form method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveEntry();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="entryId" type="hidden" value="<%= entryId %>" />
+	<aui:input name="alert" type="hidden" value="<%= portletName.equals(PortletKeys.ALERTS) %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title="entry"
+	/>
+
+	<liferay-ui:error exception="<%= EntryContentException.class %>" message="please-enter-valid-content" />
+	<liferay-ui:error exception="<%= EntryDisplayDateException.class %>" message="please-enter-a-valid-display-date" />
+	<liferay-ui:error exception="<%= EntryExpirationDateException.class %>" message="please-enter-a-valid-expiration-date" />
+	<liferay-ui:error exception="<%= EntryTitleException.class %>" message="please-enter-a-valid-title" />
+	<liferay-ui:error exception="<%= EntryURLException.class %>" message="please-enter-a-valid-url" />
+
+	<aui:model-context bean="<%= entry %>" model="<%= AnnouncementsEntry.class %>" />
+
+	<aui:fieldset>
+		<c:choose>
+			<c:when test="<%= entry != null %>">
+
+				<%
+				boolean showScopeName = true;
+				%>
+
+				<%@ include file="/html/portlet/announcements/entry_scope.jspf" %>
+
+			</c:when>
+			<c:otherwise>
+
+				<%
+				String distributionScope = ParamUtil.getString(request, "distributionScope");
+
+				long classNameId = -1;
+				long classPK = -1;
+
+				String[] distributionScopeArray = StringUtil.split(distributionScope);
+
+				if (distributionScopeArray.length == 2) {
+					classNameId = GetterUtil.getLong(distributionScopeArray[0]);
+					classPK = GetterUtil.getLong(distributionScopeArray[1]);
+				}
+
+				boolean submitOnChange = false;
+				%>
+
+				<%@ include file="/html/portlet/announcements/entry_select_scope.jspf" %>
+
+			</c:otherwise>
+		</c:choose>
+
+		<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" name="title" />
+
+		<aui:input name="url" />
+
+		<aui:field-wrapper label="content">
+			<liferay-ui:input-editor editorImpl="<%= EDITOR_WYSIWYG_IMPL_KEY %>" />
+
+			<aui:input name="content" type="hidden" />
+		</aui:field-wrapper>
+
+		<aui:select name="type">
+
+			<%
+			for (String curType : AnnouncementsEntryConstants.TYPES) {
+			%>
+
+				<aui:option label="<%= curType %>" selected="<%= (entry != null) && curType.equals(entry.getType()) %>" />
+
+			<%
+			}
+			%>
+
+		</aui:select>
+
+		<aui:select name="priority">
+			<aui:option label="normal" selected="<%= (entry != null) && (entry.getPriority() == 0) %>" value="0" />
+			<aui:option label="important" selected="<%= (entry != null) && (entry.getPriority() == 1) %>" value="1" />
+		</aui:select>
+
+		<aui:input dateTogglerCheckboxLabel="display-immediately" disabled="<%= displayImmediately %>" name="displayDate" />
+
+		<aui:input name="expirationDate" />
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+
+		<aui:button onClick='<%= renderResponse.getNamespace() + "previewEntry();" %>' value="preview" />
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />getContent() {
+		return window.<portlet:namespace />editor.getHTML();
+	}
+
+	function <portlet:namespace />initEditor() {
+		return "<%= UnicodeFormatter.toString(content) %>";
+	}
+
+	function <portlet:namespace />previewEntry() {
+		document.<portlet:namespace />fm.action = '<portlet:actionURL><portlet:param name="struts_action" value="/announcements/preview_entry" /></portlet:actionURL>';
+		document.<portlet:namespace />fm.target = '_blank';
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.PREVIEW %>";
+		document.<portlet:namespace />fm.<portlet:namespace />content.value = <portlet:namespace />getContent();
+		document.<portlet:namespace />fm.submit();
+	}
+
+	function <portlet:namespace />saveEntry() {
+		document.<portlet:namespace />fm.action = '<portlet:actionURL><portlet:param name="struts_action" value="/announcements/edit_entry" /></portlet:actionURL>';
+		document.<portlet:namespace />fm.target = '';
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (entry == null) ? Constants.ADD : Constants.UPDATE %>";
+		document.<portlet:namespace />fm.<portlet:namespace />content.value = <portlet:namespace />getContent();
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
+
+<%!
+public static final String EDITOR_WYSIWYG_IMPL_KEY = "editor.wysiwyg.portal-web.docroot.html.portlet.announcements.edit_entry.jsp";
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/entry_action.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/entry_action.jspf
new file mode 100644
index 0000000..b56e294
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/entry_action.jspf
@@ -0,0 +1,59 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<div class="edit-actions">
+	<table class="lfr-table">
+	<tr>
+		<c:if test="<%= AnnouncementsEntryPermission.contains(permissionChecker, entry, ActionKeys.UPDATE) %>">
+			<td class="edit-entry">
+				<portlet:renderURL var="editURL">
+					<portlet:param name="struts_action" value="/announcements/edit_entry" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="entryId" value="<%= String.valueOf(entry.getEntryId()) %>" />
+				</portlet:renderURL>
+
+				<liferay-ui:icon
+					image="edit"
+					label="<%= true %>"
+					url="<%= editURL %>"
+				/>
+			</td>
+		</c:if>
+
+		<c:if test="<%= AnnouncementsEntryPermission.contains(permissionChecker, entry, ActionKeys.DELETE) %>">
+			<td class="delete-entry">
+				<portlet:actionURL var="deleteURL">
+					<portlet:param name="struts_action" value="/announcements/edit_entry" />
+					<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="entryId" value="<%= String.valueOf(entry.getEntryId()) %>" />
+				</portlet:actionURL>
+
+				<liferay-ui:icon-delete
+					label="<%= true %>"
+					url="<%= deleteURL %>"
+				/>
+			</td>
+		</c:if>
+
+		<td class="control-entry">
+			<c:if test='<%= tabs1.equals("entries") && themeDisplay.isSignedIn() %>'>
+				<a href="<%= "javascript:" + renderResponse.getNamespace() + "handleEntry(" + entry.getEntryId() + ");" %>"><liferay-ui:message key='<%= ((flagValue == AnnouncementsFlagConstants.NOT_HIDDEN) ? "mark-as-read" : "show") %>' /></a>
+			</c:if>
+		</td>
+	</tr>
+	</table>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/entry_iterator.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/entry_iterator.jspf
new file mode 100644
index 0000000..f67d9fc
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/entry_iterator.jspf
@@ -0,0 +1,44 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+total = AnnouncementsEntryLocalServiceUtil.getEntriesCount(user.getUserId(), scopes, portletName.equals(PortletKeys.ALERTS), flagValue);
+
+searchContainer.setTotal(total);
+
+results = AnnouncementsEntryLocalServiceUtil.getEntries(user.getUserId(), scopes, portletName.equals(PortletKeys.ALERTS), flagValue, searchContainer.getStart(), searchContainer.getEnd());
+
+searchContainer.setResults(results);
+
+for (int i = 0; i < results.size(); i++) {
+	AnnouncementsEntry entry = results.get(i);
+
+	String className = StringPool.BLANK;
+
+	if (i == 0) {
+		className += " first";
+	}
+
+	if ((i + 1) == results.size()) {
+		className += " last";
+	}
+%>
+
+	<%@ include file="/html/portlet/announcements/view_entry.jspf" %>
+
+<%
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/entry_scope.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/entry_scope.jspf
new file mode 100644
index 0000000..68ced15
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/entry_scope.jspf
@@ -0,0 +1,76 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+String entryClassName = entry.getClassName();
+long entryClassPK = entry.getClassPK();
+
+String scopeName = StringPool.BLANK;
+String scopeClassName = StringPool.BLANK;
+
+if (entryClassName.equals(Group.class.getName())) {
+	Group group = GroupLocalServiceUtil.getGroup(entryClassPK);
+
+	scopeName = group.getDescriptiveName(locale);
+	scopeClassName = "site";
+}
+else if (entryClassName.equals(Organization.class.getName())) {
+	Organization organization = OrganizationLocalServiceUtil.getOrganization(entryClassPK);
+
+	scopeName = organization.getName();
+	scopeClassName = "organization";
+}
+else if (entryClassName.equals(Role.class.getName())) {
+	Role role = RoleLocalServiceUtil.getRole(entryClassPK);
+
+	scopeName = role.getTitle(locale);
+	scopeClassName = "role";
+}
+else if (entryClassName.equals(User.class.getName())) {
+	User curUser = UserLocalServiceUtil.getUser(entryClassPK);
+
+	scopeName = curUser.getFullName();
+	scopeClassName = "personal";
+}
+else if (entryClassName.equals(UserGroup.class.getName())) {
+	UserGroup userGroup = UserGroupLocalServiceUtil.getUserGroup(entryClassPK);
+
+	scopeName = userGroup.getName();
+	scopeClassName = "user-group";
+}
+else {
+	scopeName = LanguageUtil.get(locale, "general");
+	scopeClassName = scopeName;
+}
+
+scopeName = HtmlUtil.escape(scopeName);
+%>
+
+<c:choose>
+	<c:when test="<%= showScopeName %>">
+		<c:choose>
+			<c:when test="<%= scopeName.equals(scopeClassName) %>">
+				<%= scopeName %>
+			</c:when>
+			<c:otherwise>
+				<liferay-ui:message key="<%= scopeClassName %>" /> &raquo; <%= scopeName %>
+			</c:otherwise>
+		</c:choose>
+	</c:when>
+	<c:otherwise>
+		<span class="entry-scope"><%= scopeName %></span>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/entry_select_scope.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/entry_select_scope.jspf
new file mode 100644
index 0000000..c37b7ff
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/entry_select_scope.jspf
@@ -0,0 +1,136 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+boolean hasDistributionScope = false;
+%>
+
+<aui:select changesContext="<%= submitOnChange %>" name="distributionScope" onChange='<%= submitOnChange ? renderResponse.getNamespace() + "selectDistributionScope(this.value);" : "" %>' showEmptyOption="<%= true %>">
+	<c:if test="<%= PortalPermissionUtil.contains(permissionChecker, ActionKeys.ADD_GENERAL_ANNOUNCEMENTS) %>">
+
+		<%
+		hasDistributionScope = true;
+		%>
+
+		<aui:option label="general" selected="<%= (classNameId == 0) && (classPK == 0) %>" value="0,0" />
+	</c:if>
+
+	<%
+	List<Group> groups = GroupLocalServiceUtil.getUserGroups(user.getUserId(), true);
+	%>
+
+	<c:if test="<%= !groups.isEmpty() %>">
+		<optgroup label="<liferay-ui:message key="sites" />">
+
+			<%
+			for (Group group : groups) {
+				if ((group.isOrganization() || (group.isRegularSite() && group.isSite())) && GroupPermissionUtil.contains(permissionChecker, group.getGroupId(), ActionKeys.MANAGE_ANNOUNCEMENTS)) {
+					hasDistributionScope = true;
+			%>
+
+					<aui:option label="<%= HtmlUtil.escape(group.getDescriptiveName(locale)) %>" selected="<%= classPK == group.getGroupId() %>" value="<%= PortalUtil.getClassNameId(Group.class) + StringPool.COMMA + group.getGroupId() %>" />
+
+			<%
+				}
+			}
+			%>
+
+		</optgroup>
+	</c:if>
+
+	<%
+	List<Organization> organizations = OrganizationLocalServiceUtil.getUserOrganizations(user.getUserId());
+	%>
+
+	<c:if test="<%= !organizations.isEmpty() %>">
+		<optgroup label="<liferay-ui:message key="organizations" />">
+
+			<%
+			for (Organization organization : organizations) {
+				if (OrganizationPermissionUtil.contains(permissionChecker, organization.getOrganizationId(), ActionKeys.MANAGE_ANNOUNCEMENTS)) {
+					hasDistributionScope = true;
+			%>
+
+					<aui:option label="<%= HtmlUtil.escape(organization.getName()) %>" selected="<%= classPK == organization.getOrganizationId() %>" value="<%= PortalUtil.getClassNameId(Organization.class) + StringPool.COMMA + organization.getOrganizationId() %>" />
+
+			<%
+				}
+			}
+			%>
+
+		</optgroup>
+	</c:if>
+
+	<%
+	List<Role> roles = RoleLocalServiceUtil.getRoles(themeDisplay.getCompanyId());
+	%>
+
+	<c:if test="<%= !roles.isEmpty() %>">
+		<optgroup label="<liferay-ui:message key="roles" />">
+
+			<%
+			for (Role role : roles) {
+				if (role.isTeam()) {
+					Team team = TeamLocalServiceUtil.getTeam(role.getClassPK());
+
+					if (!GroupPermissionUtil.contains(permissionChecker, team.getGroupId(), ActionKeys.MANAGE_ANNOUNCEMENTS)) {
+						continue;
+					}
+				}
+
+				if (RolePermissionUtil.contains(permissionChecker, themeDisplay.getScopeGroupId(), role.getRoleId(), ActionKeys.MANAGE_ANNOUNCEMENTS)) {
+					hasDistributionScope = true;
+			%>
+
+					<aui:option label="<%= HtmlUtil.escape(role.getTitle(locale)) %>" selected="<%= classPK == role.getRoleId() %>" value="<%= PortalUtil.getClassNameId(Role.class) + StringPool.COMMA + role.getRoleId() %>" />
+
+			<%
+				}
+			}
+			%>
+
+		</optgroup>
+	</c:if>
+
+	<%
+	List<UserGroup> userGroups = UserGroupLocalServiceUtil.getUserGroups(themeDisplay.getCompanyId());
+	%>
+
+	<c:if test="<%= !userGroups.isEmpty() %>">
+		<optgroup label="<liferay-ui:message key="user-groups" />">
+
+			<%
+			for (UserGroup userGroup : userGroups) {
+				if (UserGroupPermissionUtil.contains(permissionChecker, userGroup.getUserGroupId(), ActionKeys.MANAGE_ANNOUNCEMENTS)) {
+					hasDistributionScope = true;
+			%>
+
+					<aui:option label="<%= HtmlUtil.escape(userGroup.getName()) %>" selected="<%= classPK == userGroup.getUserGroupId() %>" value="<%= PortalUtil.getClassNameId(UserGroup.class) + StringPool.COMMA + userGroup.getUserGroupId() %>" />
+
+			<%
+				}
+			}
+			%>
+
+		</optgroup>
+	</c:if>
+</aui:select>
+
+<aui:script use="aui-base">
+	if (<%= !hasDistributionScope %>) {
+		A.one('#<portlet:namespace />fieldSet').hide();
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/error.jsp
new file mode 100644
index 0000000..69c8eaa
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/error.jsp
@@ -0,0 +1,25 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/announcements/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= NoSuchEntryException.class %>" message="the-entry-could-not-be-found" />
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/init.jsp
new file mode 100644
index 0000000..8b348c0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/init.jsp
@@ -0,0 +1,40 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.service.permission.OrganizationPermissionUtil" %><%@
+page import="com.liferay.portal.service.permission.UserGroupPermissionUtil" %><%@
+page import="com.liferay.portlet.announcements.EntryContentException" %><%@
+page import="com.liferay.portlet.announcements.EntryDisplayDateException" %><%@
+page import="com.liferay.portlet.announcements.EntryExpirationDateException" %><%@
+page import="com.liferay.portlet.announcements.EntryTitleException" %><%@
+page import="com.liferay.portlet.announcements.EntryURLException" %><%@
+page import="com.liferay.portlet.announcements.NoSuchEntryException" %><%@
+page import="com.liferay.portlet.announcements.NoSuchFlagException" %><%@
+page import="com.liferay.portlet.announcements.model.AnnouncementsEntry" %><%@
+page import="com.liferay.portlet.announcements.model.AnnouncementsEntryConstants" %><%@
+page import="com.liferay.portlet.announcements.model.AnnouncementsFlagConstants" %><%@
+page import="com.liferay.portlet.announcements.service.AnnouncementsEntryLocalServiceUtil" %><%@
+page import="com.liferay.portlet.announcements.service.AnnouncementsFlagLocalServiceUtil" %><%@
+page import="com.liferay.portlet.announcements.service.permission.AnnouncementsEntryPermission" %><%@
+page import="com.liferay.portlet.announcements.util.AnnouncementsUtil" %>
+
+<%
+int pageDelta = GetterUtil.getInteger(portletPreferences.getValue("pageDelta", String.valueOf(SearchContainer.DEFAULT_DELTA)));
+%>
+
+<%@ include file="/html/portlet/announcements/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/preview_entry.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/preview_entry.jsp
new file mode 100644
index 0000000..6933fbc
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/preview_entry.jsp
@@ -0,0 +1,29 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/announcements/init.jsp" %>
+
+<%
+String tabs1 = "preview";
+
+AnnouncementsEntry entry = (AnnouncementsEntry)request.getAttribute(WebKeys.ANNOUNCEMENTS_ENTRY);
+
+int flagValue = AnnouncementsFlagConstants.NOT_HIDDEN;
+
+String className = StringPool.BLANK;
+%>
+
+<%@ include file="/html/portlet/announcements/view_entry.jspf" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/tabs1.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/tabs1.jsp
new file mode 100644
index 0000000..ce05f19
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/tabs1.jsp
@@ -0,0 +1,37 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/announcements/init.jsp" %>
+
+<%
+String tabs1 = ParamUtil.getString(request, "tabs1", "entries");
+
+PortletURL tabs1URL = renderResponse.createRenderURL();
+
+tabs1URL.setParameter("struts_action", "/announcements/view");
+tabs1URL.setParameter("tabs1", tabs1);
+
+String tabs1Names = "entries";
+
+if (AnnouncementsEntryPermission.contains(permissionChecker, layout, portletName, ActionKeys.ADD_ENTRY)) {
+	tabs1Names += ",manage-entries";
+}
+%>
+
+<liferay-ui:tabs
+	names="<%= tabs1Names %>"
+	url="<%= tabs1URL.toString() %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/view.jsp
new file mode 100644
index 0000000..a5f71da
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/view.jsp
@@ -0,0 +1,39 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/announcements/init.jsp" %>
+
+<%
+String tabs1 = ParamUtil.getString(request, "tabs1", "entries");
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/announcements/view");
+portletURL.setParameter("tabs1", tabs1);
+%>
+
+<c:if test="<%= !portletName.equals(PortletKeys.ALERTS) || (portletName.equals(PortletKeys.ALERTS) && AnnouncementsEntryPermission.contains(permissionChecker, layout, PortletKeys.ALERTS, ActionKeys.ADD_ENTRY)) %>">
+	<liferay-util:include page="/html/portlet/announcements/tabs1.jsp" />
+</c:if>
+
+<c:choose>
+	<c:when test='<%= tabs1.equals("entries") %>'>
+		<%@ include file="/html/portlet/announcements/view_entries.jspf" %>
+	</c:when>
+	<c:when test='<%= tabs1.equals("manage-entries") %>'>
+		<%@ include file="/html/portlet/announcements/view_manage_entries.jspf" %>
+	</c:when>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/view_entries.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/view_entries.jspf
new file mode 100644
index 0000000..a7d51de
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/view_entries.jspf
@@ -0,0 +1,142 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+LinkedHashMap<Long, long[]> scopes = AnnouncementsUtil.getAnnouncementScopes(user.getUserId());
+
+SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, "cur1", pageDelta, portletURL, null, "no-entries-were-found");
+
+List<AnnouncementsEntry> results = null;
+int total = 0;
+
+int flagValue = AnnouncementsFlagConstants.NOT_HIDDEN;
+%>
+
+<div class="unread-entries">
+	<%@ include file="/html/portlet/announcements/entry_iterator.jspf" %>
+</div>
+
+<%
+int visibleMessagesCount = total;
+%>
+
+<c:if test="<%= visibleMessagesCount > 0 %>">
+	<liferay-ui:search-paginator id="pageIteratorTop" searchContainer="<%= searchContainer %>" type="article" />
+</c:if>
+
+<%
+flagValue = AnnouncementsFlagConstants.HIDDEN;
+
+searchContainer = new SearchContainer(renderRequest, null, null, "cur2", pageDelta, portletURL, null, "no-entries-were-found");
+%>
+
+<div class="read-entries">
+	<%@ include file="/html/portlet/announcements/entry_iterator.jspf" %>
+</div>
+
+<%
+int hiddenMessagesCount = total;
+%>
+
+<c:if test="<%= hiddenMessagesCount > 0 %>">
+	<liferay-ui:search-paginator id="pageIteratorBottom" searchContainer="<%= searchContainer %>" type="article" />
+</c:if>
+
+<%
+if (((hiddenMessagesCount == 0) && (visibleMessagesCount == 0)) && portletName.equals(PortletKeys.ALERTS) && !AnnouncementsEntryPermission.contains(permissionChecker, layout, PortletKeys.ALERTS, ActionKeys.ADD_ENTRY)) {
+	renderRequest.setAttribute(WebKeys.PORTLET_CONFIGURATOR_VISIBILITY, Boolean.TRUE);
+}
+%>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />handleEntry',
+		function(entryId) {
+			var A = AUI();
+
+			var entry = A.one('#<portlet:namespace />' + entryId);
+
+			if (entry) {
+				var container = entry.get('parentNode');
+
+				if (container) {
+					if (container.hasClass('unread-entries')) {
+						<portlet:namespace />markEntry(entry, entryId);
+					}
+					else {
+						<portlet:namespace />toggleContent(entry);
+					}
+				}
+			}
+		},
+		['aui-base']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />markEntry',
+		function(entry, entryId) {
+			var A = AUI();
+
+			Liferay.Service(
+				'/announcementsflag/add-flag',
+				{
+					entryId : entryId,
+					value: <%= AnnouncementsFlagConstants.HIDDEN %>
+				}
+			);
+
+			Liferay.Portlet.refresh('#p_p_id<portlet:namespace />');
+		},
+		['aui-base']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />toggleContent',
+		function(entry) {
+			var A = AUI();
+
+			var content = entry.all('.entry-content');
+			var control = entry.all('.control-entry a');
+
+			if (entry.hasClass('visible')) {
+				entry.removeClass('visible');
+
+				if (content) {
+					content.hide();
+				}
+
+				if (control) {
+					control.html('<%= UnicodeLanguageUtil.get(pageContext, "show") %>');
+				}
+			}
+			else {
+				entry.addClass('visible');
+
+				if (content) {
+					content.show();
+				}
+
+				if (control) {
+					control.html('<%= UnicodeLanguageUtil.get(pageContext, "hide") %>');
+				}
+			}
+		},
+		['aui-base']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/view_entry.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/view_entry.jspf
new file mode 100644
index 0000000..bec5c89
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/view_entry.jspf
@@ -0,0 +1,70 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+boolean hiddenEntry = false;
+boolean readEntry = false;
+
+if (flagValue == AnnouncementsFlagConstants.HIDDEN) {
+	hiddenEntry = true;
+	readEntry = true;
+}
+else {
+	try {
+		AnnouncementsFlagLocalServiceUtil.getFlag(user.getUserId(), entry.getEntryId(), AnnouncementsFlagConstants.READ);
+
+		readEntry = true;
+	}
+	catch (NoSuchFlagException nsfe) {
+		AnnouncementsFlagLocalServiceUtil.addFlag(user.getUserId(), entry.getEntryId(), AnnouncementsFlagConstants.READ);
+	}
+}
+
+if (readEntry) {
+	className += " read";
+}
+
+if (entry.getPriority() > 0) {
+	className += " important";
+}
+%>
+
+<div class="entry<%= className %>" id="<portlet:namespace /><%= entry.getEntryId() %>">
+	<h3 class="entry-title">
+		<c:choose>
+			<c:when test="<%= Validator.isNotNull(entry.getUrl()) %>">
+				<a class="entry-url" href="<%= entry.getUrl() %>"><%= HtmlUtil.escape(entry.getTitle()) %></a>
+			</c:when>
+			<c:when test="<%= Validator.isNull(entry.getUrl()) %>">
+				<%= HtmlUtil.escape(entry.getTitle()) %>
+			</c:when>
+		</c:choose>
+
+		<c:if test='<%= !tabs1.equals("preview") %>'>
+			<%@ include file="/html/portlet/announcements/entry_action.jspf" %>
+		</c:if>
+	</h3>
+
+	<%
+	boolean showScopeName = false;
+	%>
+
+	<div class="<%= hiddenEntry ? "hide" : "" %> entry-content entry-type-<%= entry.getType() %>">
+		<%@ include file="/html/portlet/announcements/entry_scope.jspf" %>
+
+		<%= entry.getContent() %>
+	</div>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/view_manage_entries.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/view_manage_entries.jspf
new file mode 100644
index 0000000..c41a9e7
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/view_manage_entries.jspf
@@ -0,0 +1,143 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+String distributionScope = ParamUtil.getString(request, "distributionScope");
+
+long classNameId = -1;
+long classPK = -1;
+
+String[] distributionScopeArray = StringUtil.split(distributionScope);
+
+if (distributionScopeArray.length == 2) {
+	classNameId = GetterUtil.getLong(distributionScopeArray[0]);
+	classPK = GetterUtil.getLong(distributionScopeArray[1]);
+}
+
+if ((classNameId == 0) && (classPK == 0) && !PortalPermissionUtil.contains(permissionChecker, ActionKeys.ADD_GENERAL_ANNOUNCEMENTS)) {
+	throw new PrincipalException();
+}
+%>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="fm">
+	<aui:fieldset id="fieldSet">
+
+		<%
+		boolean submitOnChange = true;
+		%>
+
+		<%@ include file="/html/portlet/announcements/entry_select_scope.jspf" %>
+
+	</aui:fieldset>
+
+	<c:choose>
+		<c:when test="<%= distributionScopeArray.length > 0 %>">
+			<aui:button onClick='<%= renderResponse.getNamespace() + "addEntry()" %>' value="add-entry" />
+		</c:when>
+		<c:otherwise>
+			<div class="alert alert-info">
+				<liferay-ui:message key="please-select-a-distribution-scope" />
+			</div>
+		</c:otherwise>
+	</c:choose>
+
+	<c:if test="<%= Validator.isNotNull(distributionScope) %>">
+		<div class="separator"><!-- --></div>
+
+		<%
+		PortletURL iteratorURL = PortletURLUtil.clone(portletURL, renderResponse);
+
+		iteratorURL.setParameter("distributionScope", distributionScope);
+
+		List<String> headerNames = new ArrayList<String>();
+
+		headerNames.add("title");
+		headerNames.add("type");
+		headerNames.add("modified-date");
+		headerNames.add("display-date");
+		headerNames.add("expiration-date");
+		headerNames.add(StringPool.BLANK);
+
+		SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, iteratorURL, headerNames, "no-entries-were-found");
+
+		int total = AnnouncementsEntryLocalServiceUtil.getEntriesCount(classNameId, classPK, portletName.equals(PortletKeys.ALERTS));
+
+		searchContainer.setTotal(total);
+
+		List<AnnouncementsEntry> results = AnnouncementsEntryLocalServiceUtil.getEntries(classNameId, classPK, portletName.equals(PortletKeys.ALERTS), searchContainer.getStart(), searchContainer.getEnd());
+
+		searchContainer.setResults(results);
+
+		List resultRows = searchContainer.getResultRows();
+
+		for (int i = 0; i < results.size(); i++) {
+			AnnouncementsEntry entry = results.get(i);
+
+			entry = entry.toEscapedModel();
+
+			ResultRow row = new ResultRow(entry, entry.getEntryId(), i);
+
+			PortletURL rowURL = renderResponse.createRenderURL();
+
+			rowURL.setParameter("struts_action", "/announcements/edit_entry");
+			rowURL.setParameter("redirect", currentURL);
+			rowURL.setParameter("entryId", String.valueOf(entry.getEntryId()));
+
+			// Title
+
+			row.addText(entry.getTitle(), rowURL);
+
+			// Type
+
+			row.addText(LanguageUtil.get(pageContext, entry.getType()), rowURL);
+
+			// Modified date
+
+			row.addDate(entry.getModifiedDate(), rowURL);
+
+			// Display date
+
+			row.addDate(entry.getDisplayDate(), rowURL);
+
+			// Expiration date
+
+			row.addDate(entry.getExpirationDate(), rowURL);
+
+			// Action
+
+			row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/announcements/view_manage_entries_entry_action.jsp");
+
+			// Add result row
+
+			resultRows.add(row);
+		}
+		%>
+
+		<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+	</c:if>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />addEntry() {
+		location.href = '<portlet:renderURL><portlet:param name="struts_action" value="/announcements/edit_entry" /><portlet:param name="redirect" value="<%= currentURL %>" /><portlet:param name="distributionScope" value="<%= distributionScope %>" /></portlet:renderURL>';
+	}
+
+	function <portlet:namespace />selectDistributionScope(distributionScope) {
+		var url = "<%= portletURL.toString() %>&<portlet:namespace />distributionScope=" + distributionScope;
+
+		submitForm(document.<portlet:namespace />fm, url);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/view_manage_entries_entry_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/view_manage_entries_entry_action.jsp
new file mode 100644
index 0000000..88c0d01
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/announcements/view_manage_entries_entry_action.jsp
@@ -0,0 +1,51 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/announcements/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+AnnouncementsEntry entry = (AnnouncementsEntry)row.getObject();
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= AnnouncementsEntryPermission.contains(permissionChecker, entry, ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/announcements/edit_entry" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="entryId" value="<%= String.valueOf(entry.getEntryId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= AnnouncementsEntryPermission.contains(permissionChecker, entry, ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/announcements/edit_entry" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="entryId" value="<%= String.valueOf(entry.getEntryId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete
+			url="<%= deleteURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_browser/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_browser/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_browser/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_browser/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_browser/init.jsp
new file mode 100644
index 0000000..12e9b6a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_browser/init.jsp
@@ -0,0 +1,23 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.kernel.search.Document" %><%@
+page import="com.liferay.portlet.assetpublisher.search.AssetSearch" %><%@
+page import="com.liferay.portlet.assetpublisher.search.AssetSearchTerms" %>
+
+<%@ include file="/html/portlet/asset_browser/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_browser/toolbar.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_browser/toolbar.jsp
new file mode 100644
index 0000000..3fe05db
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_browser/toolbar.jsp
@@ -0,0 +1,100 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_browser/init.jsp" %>
+
+<%
+String toolbarItem = ParamUtil.getString(request, "toolbarItem", "browse");
+
+long groupId = ParamUtil.getLong(request, "groupId");
+String typeSelection = ParamUtil.getString(request, "typeSelection");
+
+PortletURL portletURL = (PortletURL)request.getAttribute("view.jsp-portletURL");
+
+AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(typeSelection);
+
+Map<Long, String> classTypes = assetRendererFactory.getClassTypes(new long[] {themeDisplay.getCompanyGroupId(), themeDisplay.getScopeGroupId()}, locale);
+%>
+
+<aui:nav-item href="<%= portletURL %>" label="browse" selected='<%= toolbarItem.equals("browse") %>' />
+
+<c:choose>
+	<c:when test="<%= classTypes.isEmpty() %>">
+
+		<%
+		PortletURL addPortletURL = AssetUtil.getAddPortletURL(liferayPortletRequest, liferayPortletResponse, typeSelection, 0, null, null, portletURL.toString());
+		%>
+
+		<c:if test="<%= addPortletURL != null %>">
+
+			<%
+			addPortletURL.setParameter("groupId", String.valueOf(groupId));
+
+			String addPortletURLString = addPortletURL.toString();
+
+			addPortletURLString = HttpUtil.addParameter(addPortletURLString, "doAsGroupId", groupId);
+			addPortletURLString = HttpUtil.addParameter(addPortletURLString, "refererPlid", plid);
+			%>
+
+			<aui:nav-item href="<%= addPortletURLString %>" label='<%= LanguageUtil.format(pageContext, "add-x", assetRendererFactory.getTypeName(locale, false)) %>' />
+		</c:if>
+	</c:when>
+	<c:otherwise>
+		<aui:nav-item dropdown="<%= true %>" iconCssClass="icon-plus" label="add" selected='<%= toolbarItem.equals("add") %>'>
+
+			<%
+			PortletURL addPortletURL = AssetUtil.getAddPortletURL(liferayPortletRequest, liferayPortletResponse, typeSelection, 0, null, null, portletURL.toString());
+			%>
+
+			<c:if test="<%= addPortletURL != null %>">
+
+				<%
+				addPortletURL.setParameter("groupId", String.valueOf(groupId));
+
+				String addPortletURLString = addPortletURL.toString();
+
+				addPortletURLString = HttpUtil.addParameter(addPortletURLString, "doAsGroupId", groupId);
+				addPortletURLString = HttpUtil.addParameter(addPortletURLString, "refererPlid", plid);
+				%>
+
+				<aui:nav-item href="<%= addPortletURLString %>" label="<%= assetRendererFactory.getTypeName(locale, true) %>" />
+			</c:if>
+
+			<%
+			for (long classTypeId : classTypes.keySet()) {
+				addPortletURL = AssetUtil.getAddPortletURL(liferayPortletRequest, liferayPortletResponse, typeSelection, classTypeId, null, null, portletURL.toString());
+
+				if (addPortletURL == null) {
+					continue;
+				}
+
+				addPortletURL.setParameter("groupId", String.valueOf(groupId));
+
+				String addPortletURLString = addPortletURL.toString();
+
+				addPortletURLString = HttpUtil.addParameter(addPortletURLString, "doAsGroupId", groupId);
+				addPortletURLString = HttpUtil.addParameter(addPortletURLString, "refererPlid", plid);
+			%>
+
+				<aui:nav-item href="<%= addPortletURLString %>" label="<%= HtmlUtil.escape(classTypes.get(classTypeId)) %>" />
+
+			<%
+			}
+			%>
+
+		</aui:nav-item>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_browser/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_browser/view.jsp
new file mode 100644
index 0000000..0f499b2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_browser/view.jsp
@@ -0,0 +1,162 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_browser/init.jsp" %>
+
+<%
+long groupId = ParamUtil.getLong(request, "groupId");
+long[] selectedGroupIds = StringUtil.split(ParamUtil.getString(request, "selectedGroupIds"), 0L);
+long refererAssetEntryId = ParamUtil.getLong(request, "refererAssetEntryId");
+String typeSelection = ParamUtil.getString(request, "typeSelection");
+String eventName = ParamUtil.getString(request, "eventName", liferayPortletResponse.getNamespace() + "selectAsset");
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/asset_browser/view");
+portletURL.setParameter("groupId", String.valueOf(groupId));
+portletURL.setParameter("selectedGroupIds", StringUtil.merge(selectedGroupIds));
+portletURL.setParameter("refererAssetEntryId", String.valueOf(refererAssetEntryId));
+portletURL.setParameter("typeSelection", typeSelection);
+portletURL.setParameter("eventName", eventName);
+
+request.setAttribute("view.jsp-portletURL", portletURL);
+%>
+
+<div class="asset-search">
+	<aui:form action="<%= portletURL %>" method="post" name="selectAssetFm">
+		<aui:input name="typeSelection" type="hidden" value="<%= typeSelection %>" />
+
+		<liferay-ui:search-container
+			searchContainer="<%= new AssetSearch(renderRequest, portletURL) %>"
+		>
+			<aui:nav-bar>
+				<aui:nav>
+					<liferay-util:include page="/html/portlet/asset_browser/toolbar.jsp">
+						<liferay-util:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+						<liferay-util:param name="typeSelection" value="<%= typeSelection %>" />
+					</liferay-util:include>
+				</aui:nav>
+
+				<aui:nav-bar-search cssClass="pull-right">
+					<liferay-ui:search-form
+						page="/html/portlet/asset_publisher/asset_search.jsp"
+					/>
+				</aui:nav-bar-search>
+			</aui:nav-bar>
+
+			<%
+			AssetSearchTerms searchTerms = (AssetSearchTerms)searchContainer.getSearchTerms();
+
+			long[] groupIds = selectedGroupIds;
+
+			AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(typeSelection);
+			%>
+
+			<liferay-ui:search-container-results>
+				<%@ include file="/html/portlet/asset_publisher/asset_search_results.jspf" %>
+			</liferay-ui:search-container-results>
+
+			<div class="separator"><!-- --></div>
+
+			<liferay-ui:search-container-row
+				className="com.liferay.portal.kernel.search.Document"
+				escapedModel="<%= true %>"
+				modelVar="doc"
+			>
+
+				<%
+				long assetEntryId = 0;
+
+				if (typeSelection.equals(JournalArticle.class.getName())) {
+					assetEntryId = GetterUtil.getLong(doc.get(Field.ROOT_ENTRY_CLASS_PK));
+				}
+				else {
+					assetEntryId = GetterUtil.getLong(doc.get(Field.ENTRY_CLASS_PK));
+				}
+
+				AssetEntry assetEntry = AssetEntryLocalServiceUtil.fetchEntry(typeSelection, assetEntryId);
+
+				if ((assetEntry == null) || !assetEntry.isVisible()) {
+					continue;
+				}
+
+				Group group = GroupLocalServiceUtil.getGroup(assetEntry.getGroupId());
+				%>
+
+				<liferay-ui:search-container-column-text
+					name="title"
+					value="<%= HtmlUtil.escape(assetEntry.getTitle(locale)) %>"
+				/>
+
+				<liferay-ui:search-container-column-text
+					name="description"
+					value="<%= HtmlUtil.stripHtml(assetEntry.getDescription(locale)) %>"
+				/>
+
+				<liferay-ui:search-container-column-text
+					name="userName"
+					value="<%= PortalUtil.getUserName(assetEntry) %>"
+				/>
+
+				<liferay-ui:search-container-column-date
+					name="modifiedDate"
+					value="<%= assetEntry.getModifiedDate() %>"
+				/>
+
+				<liferay-ui:search-container-column-text
+					name="descriptiveName"
+					value="<%= HtmlUtil.escape(group.getDescriptiveName(locale)) %>"
+				/>
+
+				<liferay-ui:search-container-column-text>
+					<c:if test="<%= assetEntry.getEntryId() != refererAssetEntryId %>">
+
+						<%
+						Map<String, Object> data = new HashMap<String, Object>();
+
+						data.put("assetentryid", assetEntry.getEntryId());
+						data.put("assetclassname", assetEntry.getClassName());
+						data.put("assettype", assetRendererFactory.getTypeName(locale, true));
+						data.put("assettitle", HtmlUtil.escape(assetEntry.getTitle(locale)));
+						data.put("groupdescriptivename", HtmlUtil.escape(group.getDescriptiveName(locale)));
+						%>
+
+						<aui:button cssClass="selector-button" data="<%= data %>" value="choose" />
+					</c:if>
+				</liferay-ui:search-container-column-text>
+
+			</liferay-ui:search-container-row>
+
+			<liferay-ui:search-iterator />
+		</liferay-ui:search-container>
+	</aui:form>
+</div>
+
+<aui:script use="aui-base">
+	var Util = Liferay.Util;
+
+	A.one('#<portlet:namespace />selectAssetFm').delegate(
+		'click',
+		function(event) {
+			var result = Util.getAttributes(event.currentTarget, 'data-');
+
+			Util.getOpener().Liferay.fire('<%= HtmlUtil.escapeJS(eventName) %>', result);
+
+			Util.getWindow().hide();
+		},
+		'.selector-button'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_categories_navigation/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_categories_navigation/configuration.jsp
new file mode 100644
index 0000000..376349f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_categories_navigation/configuration.jsp
@@ -0,0 +1,135 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_categories_navigation/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+%>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveConfiguration();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+
+	<aui:fieldset>
+		<aui:select label="vocabularies" name="preferences--allAssetVocabularies--">
+			<aui:option label="all" selected="<%= allAssetVocabularies %>" value="<%= true %>" />
+			<aui:option label="filter[action]" selected="<%= !allAssetVocabularies %>" value="<%= false %>" />
+		</aui:select>
+
+		<aui:input name="preferences--assetVocabularyIds--" type="hidden" />
+
+		<%
+		Set<Long> availableAssetVocabularyIdsSet = SetUtil.fromArray(availableAssetVocabularyIds);
+
+		// Left list
+
+		List<KeyValuePair> typesLeftList = new ArrayList<KeyValuePair>();
+
+		for (long assetVocabularyId : assetVocabularyIds) {
+			try {
+				AssetVocabulary assetVocabulary = AssetVocabularyLocalServiceUtil.getVocabulary(assetVocabularyId);
+
+				assetVocabulary = assetVocabulary.toEscapedModel();
+
+				typesLeftList.add(new KeyValuePair(String.valueOf(assetVocabularyId), _getTitle(assetVocabulary, themeDisplay)));
+			}
+			catch (NoSuchVocabularyException nsve) {
+			}
+		}
+
+		// Right list
+
+		List<KeyValuePair> typesRightList = new ArrayList<KeyValuePair>();
+
+		Arrays.sort(assetVocabularyIds);
+
+		for (long assetVocabularyId : availableAssetVocabularyIdsSet) {
+			if (Arrays.binarySearch(assetVocabularyIds, assetVocabularyId) < 0) {
+				AssetVocabulary assetVocabulary = AssetVocabularyLocalServiceUtil.getVocabulary(assetVocabularyId);
+
+				assetVocabulary = assetVocabulary.toEscapedModel();
+
+				typesRightList.add(new KeyValuePair(String.valueOf(assetVocabularyId), _getTitle(assetVocabulary, themeDisplay)));
+			}
+		}
+
+		typesRightList = ListUtil.sort(typesRightList, new KeyValuePairComparator(false, true));
+		%>
+
+		<div class="<%= allAssetVocabularies ? "hide" : "" %>" id="<portlet:namespace />assetVocabulariesBoxes">
+			<liferay-ui:input-move-boxes
+				leftBoxName="currentAssetVocabularyIds"
+				leftList="<%= typesLeftList %>"
+				leftReorder="true"
+				leftTitle="current"
+				rightBoxName="availableAssetVocabularyIds"
+				rightList="<%= typesRightList %>"
+				rightTitle="available"
+			/>
+		</div>
+
+		<div class="display-template">
+
+			<%
+			TemplateHandler templateHandler = TemplateHandlerRegistryUtil.getTemplateHandler(AssetCategory.class.getName());
+			%>
+
+			<liferay-ui:ddm-template-selector
+				classNameId="<%= PortalUtil.getClassNameId(templateHandler.getClassName()) %>"
+				displayStyle="<%= displayStyle %>"
+				displayStyleGroupId="<%= displayStyleGroupId %>"
+				refreshURL="<%= currentURL %>"
+				showEmptyOption="<%= true %>"
+			/>
+		</div>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />saveConfiguration',
+		function() {
+			if (document.<portlet:namespace />fm.<portlet:namespace />assetVocabularyIds) {
+				document.<portlet:namespace />fm.<portlet:namespace />assetVocabularyIds.value = Liferay.Util.listSelect(document.<portlet:namespace />fm.<portlet:namespace />currentAssetVocabularyIds);
+			}
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['liferay-util-list-fields']
+	);
+
+	Liferay.Util.toggleSelectBox('<portlet:namespace />allAssetVocabularies', 'false', '<portlet:namespace />assetVocabulariesBoxes');
+</aui:script>
+
+<%!
+private String _getTitle(AssetVocabulary assetVocabulary, ThemeDisplay themeDisplay) {
+	String title = assetVocabulary.getTitle(themeDisplay.getLanguageId());
+
+	if (assetVocabulary.getGroupId() == themeDisplay.getCompanyGroupId()) {
+		title += " (" + LanguageUtil.get(themeDisplay.getLocale(), "global") + ")";
+	}
+
+	return title;
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_categories_navigation/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_categories_navigation/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_categories_navigation/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_categories_navigation/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_categories_navigation/init.jsp
new file mode 100644
index 0000000..ffb60a9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_categories_navigation/init.jsp
@@ -0,0 +1,44 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.asset.NoSuchVocabularyException" %>
+
+<%
+List<AssetVocabulary> assetVocabularies = AssetVocabularyServiceUtil.getGroupsVocabularies(new long[] {scopeGroupId, themeDisplay.getCompanyGroupId()});
+
+long[] availableAssetVocabularyIds = new long[assetVocabularies.size()];
+
+for (int i = 0; i < assetVocabularies.size(); i++) {
+	AssetVocabulary assetVocabulary = assetVocabularies.get(i);
+
+	availableAssetVocabularyIds[i] = assetVocabulary.getVocabularyId();
+}
+
+boolean allAssetVocabularies = GetterUtil.getBoolean(portletPreferences.getValue("allAssetVocabularies", Boolean.TRUE.toString()));
+
+long[] assetVocabularyIds = availableAssetVocabularyIds;
+
+if (!allAssetVocabularies && (portletPreferences.getValues("assetVocabularyIds", null) != null)) {
+	assetVocabularyIds = StringUtil.split(portletPreferences.getValue("assetVocabularyIds", null), 0L);
+}
+
+String displayStyle = portletPreferences.getValue("displayStyle", StringPool.BLANK);
+long displayStyleGroupId = GetterUtil.getLong(portletPreferences.getValue("displayStyleGroupId", null), themeDisplay.getScopeGroupId());
+%>
+
+<%@ include file="/html/portlet/asset_categories_navigation/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_categories_navigation/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_categories_navigation/view.jsp
new file mode 100644
index 0000000..45314ed
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_categories_navigation/view.jsp
@@ -0,0 +1,60 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_categories_navigation/init.jsp" %>
+
+<%
+long portletDisplayDDMTemplateId = PortletDisplayTemplateUtil.getPortletDisplayTemplateDDMTemplateId(displayStyleGroupId, displayStyle);
+%>
+
+<c:choose>
+	<c:when test="<%= portletDisplayDDMTemplateId > 0 %>">
+
+		<%
+		List<AssetVocabulary> ddmTemplateAssetVocabularies = new ArrayList<AssetVocabulary>();
+
+		if (allAssetVocabularies) {
+			ddmTemplateAssetVocabularies = assetVocabularies;
+		}
+		else {
+			for (long assetVocabularyId : assetVocabularyIds) {
+				try {
+					ddmTemplateAssetVocabularies.add(AssetVocabularyServiceUtil.getVocabulary(assetVocabularyId));
+				}
+				catch (NoSuchVocabularyException nsve) {
+				}
+			}
+		}
+		%>
+
+		<%= PortletDisplayTemplateUtil.renderDDMTemplate(pageContext, portletDisplayDDMTemplateId, ddmTemplateAssetVocabularies) %>
+	</c:when>
+	<c:otherwise>
+		<c:choose>
+			<c:when test="<%= allAssetVocabularies %>">
+				<liferay-ui:asset-categories-navigation
+					hidePortletWhenEmpty="<%= true %>"
+				/>
+			</c:when>
+			<c:otherwise>
+				<liferay-ui:asset-categories-navigation
+					hidePortletWhenEmpty="<%= true %>"
+					vocabularyIds="<%= assetVocabularyIds %>"
+				/>
+			</c:otherwise>
+		</c:choose>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/css/.sass-cache/main.css
new file mode 100644
index 0000000..001a4d9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/css/.sass-cache/main.css
@@ -0,0 +1,194 @@
+.portlet-asset-category-admin .form-search {
+  float: left; }
+  .portlet-asset-category-admin .form-search .search-query {
+    margin-right: 0;
+    padding-right: 0;
+    width: 200px; }
+.portlet-asset-category-admin .control-group {
+  float: left;
+  margin-bottom: 0; }
+  .portlet-asset-category-admin .control-group .categories-admin-select-search {
+    width: auto; }
+.portlet-asset-category-admin .categories-admin-content .select-vocabularies-container, .portlet-asset-category-admin .categories-admin-content .select-categories-container {
+  display: inline-block;
+  margin-left: 10px; }
+.portlet-asset-category-admin .categories-admin-content .vocabularies-header, .portlet-asset-category-admin .categories-admin-content .categories-header {
+  display: inline-block;
+  margin-left: 2px; }
+.portlet-asset-category-admin .categories-admin-content .vocabulary-categories-container .tree-node-selected .tree-label {
+  background: none; }
+.portlet-asset-category-admin .categories-admin-content li.vocabulary-category, .portlet-asset-category-admin .categories-admin-content li.vocabulary-item {
+  font-weight: bold;
+  list-style: none; }
+.portlet-asset-category-admin .categories-search-combobox {
+  background: #CCC; }
+.portlet-asset-category-admin .select-vocabularies, .portlet-asset-category-admin .select-categories {
+  float: left;
+  margin-left: 2px; }
+.portlet-asset-category-admin .select-categories {
+  margin-left: 10px; }
+.portlet-asset-category-admin .vocabulary-list-container-content, .portlet-asset-category-admin .vocabulary-categories-container-content, .portlet-asset-category-admin .vocabulary-edit-category-content {
+  padding: 0; }
+.portlet-asset-category-admin .vocabulary-item-name, .portlet-asset-category-admin .header-title, .portlet-asset-category-admin .tree-node-content .tree-label {
+  word-wrap: break-word; }
+.portlet-asset-category-admin .vocabulary-item-actions-trigger {
+  background-image: url(@theme_image_path@/common/edit.png);
+  background-repeat: no-repeat;
+  clip: rect(0pt, 0pt, 0pt, 0pt);
+  display: block;
+  height: 16px;
+  margin-top: -8px;
+  padding: 0;
+  position: absolute;
+  right: 5px;
+  top: 50%;
+  width: 16px; }
+.portlet-asset-category-admin input.vocabulary-item-check {
+  float: left;
+  margin-right: 5px;
+  margin-top: 0;
+  position: static; }
+.portlet-asset-category-admin .vocabulary-category {
+  position: relative; }
+  .portlet-asset-category-admin .vocabulary-category:hover .vocabulary-item-actions-trigger, .portlet-asset-category-admin .vocabulary-category:focus .vocabulary-item-actions-trigger, .portlet-asset-category-admin .vocabulary-category .vocabulary-item-actions-trigger:focus {
+    clip: rect(auto auto auto auto); }
+.portlet-asset-category-admin .vocabulary-container .results-row .vocabulary-item-actions a {
+  padding: 0; }
+.portlet-asset-category-admin .vocabulary-item.alt {
+  background: #F0F2F4; }
+.portlet-asset-category-admin .vocabulary-item.selected {
+  background: #AEB9BE; }
+.portlet-asset-category-admin .vocabulary-item a {
+  display: block;
+  padding: 8px 20px 8px 10px;
+  text-decoration: none; }
+.portlet-asset-category-admin .vocabulary-list {
+  overflow: auto;
+  overflow-x: hidden; }
+  .portlet-asset-category-admin .vocabulary-list .active-area {
+    border: 1px solid #008000; }
+    .portlet-asset-category-admin .vocabulary-list .active-area a {
+      background-color: #90EE90; }
+  .portlet-asset-category-admin .vocabulary-list .selected a {
+    color: #000;
+    text-decoration: none; }
+    .portlet-asset-category-admin .vocabulary-list .selected a:hover {
+      color: #FFB683; }
+.portlet-asset-category-admin .vocabulary-categories .category-item {
+  cursor: pointer;
+  display: block;
+  font-weight: bold;
+  padding-left: 18px;
+  padding-right: 5px; }
+  .portlet-asset-category-admin .vocabulary-categories .category-item:after {
+    clear: both;
+    content: ".";
+    display: block;
+    height: 0;
+    visibility: hidden; }
+  .portlet-asset-category-admin .vocabulary-categories .category-item:hover {
+    background: #EEE; }
+  .portlet-asset-category-admin .vocabulary-categories .category-item.active {
+    background-color: #08C;
+    color: #FFF; }
+    .portlet-asset-category-admin .vocabulary-categories .category-item.active:hover {
+      background-color: #08C;
+      color: #FFB683; }
+.portlet-asset-category-admin .vocabulary-categories .category-name, .portlet-asset-category-admin .vocabulary-categories .category-path {
+  overflow: hidden;
+  padding-bottom: 8px;
+  padding-top: 8px;
+  text-overflow: ellipsis;
+  white-space: nowrap; }
+.portlet-asset-category-admin .vocabulary-categories .category-name {
+  float: left;
+  width: 50%; }
+  .portlet-asset-category-admin .vocabulary-categories .category-name .category-item-check {
+    margin-right: 8px;
+    margin-top: 0; }
+.portlet-asset-category-admin .vocabulary-categories .category-path {
+  float: right;
+  font-weight: normal;
+  font-size: 0.8em;
+  text-align: right;
+  width: 49%; }
+.portlet-asset-category-admin .vocabulary-edit-category {
+  position: relative; }
+  .portlet-asset-category-admin .vocabulary-edit-category .category-view-close {
+    position: absolute;
+    right: 5px;
+    top: 26px; }
+.portlet-asset-category-admin #vocabulary-category-messages {
+  margin: 0 10px 10px 10px; }
+.portlet-asset-category-admin .categories-treeview-container .tree-label {
+  cursor: pointer; }
+  .portlet-asset-category-admin .categories-treeview-container .tree-label:hover {
+    color: #06C; }
+.portlet-asset-category-admin .categories-treeview-container .tree-node .tree-icon {
+  background: none;
+  height: 0;
+  width: 0; }
+.portlet-asset-category-admin .categories-treeview-container .tree-node-over {
+  background: #EEE; }
+.portlet-asset-category-admin .categories-treeview-container .tree-node-content {
+  height: 33px; }
+  .portlet-asset-category-admin .categories-treeview-container .tree-node-content .tree-hitarea {
+    margin-left: 5px;
+    margin-top: 10px; }
+  .portlet-asset-category-admin .categories-treeview-container .tree-node-content .tree-node-checkbox-container, .portlet-asset-category-admin .categories-treeview-container .tree-node-content .tree-label {
+    display: inline-block;
+    position: relative;
+    top: 8px;
+    vertical-align: middle; }
+.portlet-asset-category-admin .categories-treeview-container .tree-node-selected {
+  background: #08C; }
+  .portlet-asset-category-admin .categories-treeview-container .tree-node-selected .tree-label {
+    color: #FFF;
+    cursor: move; }
+.portlet-asset-category-admin .vocabulary-container .category-name {
+  width: 300px; }
+.portlet-asset-category-admin .view-category {
+  margin: 1em; }
+  .portlet-asset-category-admin .view-category label {
+    display: block;
+    font-weight: bold; }
+  .portlet-asset-category-admin .view-category .category-field {
+    clear: left;
+    margin: 1em auto; }
+.portlet-asset-category-admin .vocabularies-pagination {
+  margin: 10px 0;
+  text-align: center; }
+  .portlet-asset-category-admin .vocabularies-pagination .pagination-content {
+    margin: 0; }
+
+.portlet-asset-categories-admin-dialog .fieldset {
+  margin-bottom: 0; }
+.portlet-asset-categories-admin-dialog .lfr-panel-container {
+  background-color: transparent;
+  border-width: 0; }
+.portlet-asset-categories-admin-dialog .asset-category-layer .overlay {
+  overflow: visible;
+  width: 230px; }
+.portlet-asset-categories-admin-dialog .yui3-widget-bd .asset-category-layer {
+  padding: 0 10px; }
+  .portlet-asset-categories-admin-dialog .yui3-widget-bd .asset-category-layer .field-content {
+    margin-bottom: 10px; }
+  .portlet-asset-categories-admin-dialog .yui3-widget-bd .asset-category-layer label {
+    display: block;
+    font-weight: bold; }
+  .portlet-asset-categories-admin-dialog .yui3-widget-bd .asset-category-layer .field input, .portlet-asset-categories-admin-dialog .yui3-widget-bd .asset-category-layer .field select {
+    width: 200px; }
+  .portlet-asset-categories-admin-dialog .yui3-widget-bd .asset-category-layer .button-holder {
+    margin-top: 10px; }
+
+.ie6 .portlet-asset-category-admin .vocabulary-item-actions-trigger, .ie7 .portlet-asset-category-admin .vocabulary-item-actions-trigger {
+  cursor: pointer; }
+.ie6 .portlet-asset-category-admin .vocabulary-categories .category-item, .ie7 .portlet-asset-category-admin .vocabulary-categories .category-item {
+  zoom: 1; }
+
+.ie .portlet-asset-category-admin .vocabulary-item a {
+  zoom: 1; }
+
+.ie6 .portlet-asset-categories-admin-dialog .yui3-widget-bd .asset-category-layer {
+  width: 200px; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/css/main.css
new file mode 100644
index 0000000..df218e8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/css/main.css
@@ -0,0 +1,359 @@
+.portlet-asset-category-admin {
+	.form-search {
+		float: left;
+
+		.search-query {
+			margin-right: 0;
+			padding-right: 0;
+			width: 200px;
+		}
+
+	}
+
+	.control-group {
+		float: left;
+		margin-bottom: 0;
+
+		.categories-admin-select-search {
+			width: auto;
+		}
+	}
+
+	.categories-admin-content {
+		.select-vocabularies-container, .select-categories-container {
+			display: inline-block;
+			margin-left: 10px;
+		}
+
+		.vocabularies-header, .categories-header {
+			display: inline-block;
+			margin-left: 2px;
+		}
+
+		.vocabulary-categories-container {
+			.tree-node-selected .tree-label {
+				background: none;
+			}
+		}
+	}
+
+	.categories-admin-content {
+		li.vocabulary-category, li.vocabulary-item {
+			font-weight: bold;
+			list-style: none;
+		}
+	}
+
+	.categories-search-combobox {
+		background: #CCC;
+	}
+
+	.select-vocabularies, .select-categories {
+		float: left;
+		margin-left: 2px;
+	}
+
+	.select-categories {
+		margin-left: 10px;
+	}
+
+	.vocabulary-list-container-content, .vocabulary-categories-container-content, .vocabulary-edit-category-content {
+		padding: 0;
+	}
+
+	.vocabulary-item-name, .header-title, .tree-node-content .tree-label {
+		word-wrap: break-word;
+	}
+
+	.vocabulary-item-actions-trigger {
+		background-image: url(@theme_image_path@/common/edit.png);
+		background-repeat: no-repeat;
+		clip: rect(0pt, 0pt, 0pt, 0pt);
+		display: block;
+		height: 16px;
+		margin-top: -8px;
+		padding: 0;
+		position: absolute;
+		right: 5px;
+		top: 50%;
+		width: 16px;
+	}
+
+	input.vocabulary-item-check {
+		float: left;
+		margin-right: 5px;
+		margin-top: 0;
+		position: static;
+	}
+
+	.vocabulary-category {
+		position: relative;
+
+		&:hover .vocabulary-item-actions-trigger, &:focus .vocabulary-item-actions-trigger, .vocabulary-item-actions-trigger:focus {
+			clip: rect(auto auto auto auto);
+		}
+	}
+
+	.vocabulary-container .results-row .vocabulary-item-actions a {
+		padding: 0;
+	}
+
+	.vocabulary-item.alt {
+		background: #F0F2F4;
+	}
+
+	.vocabulary-item {
+		&.selected {
+			background: #AEB9BE;
+		}
+
+		a {
+			display: block;
+			padding: 8px 20px 8px 10px;
+			text-decoration: none;
+		}
+	}
+
+	.vocabulary-list {
+		overflow: auto;
+		overflow-x: hidden;
+
+		.active-area {
+			border: 1px solid #008000;
+
+			a {
+				background-color: #90EE90;
+			}
+		}
+
+		.selected {
+			a {
+				color: #000;
+				text-decoration: none;
+
+				&:hover {
+					color: #FFB683;
+				}
+			}
+		}
+	}
+
+	.vocabulary-categories {
+		.category-item {
+			cursor: pointer;
+			display: block;
+			font-weight: bold;
+			padding-left: 18px;
+			padding-right: 5px;
+
+			&:after {
+				clear: both;
+				content: ".";
+				display: block;
+				height: 0;
+				visibility: hidden;
+			}
+
+			&:hover {
+				background: #EEE;
+			}
+
+			&.active {
+				background-color: #08C;
+				color: #FFF;
+
+				&:hover {
+					background-color: #08C;
+					color: #FFB683;
+				}
+			}
+		}
+
+		.category-name, .category-path {
+			overflow: hidden;
+			padding-bottom: 8px;
+			padding-top: 8px;
+			text-overflow: ellipsis;
+			white-space: nowrap;
+		}
+
+		.category-name {
+			float: left;
+			width: 50%;
+
+			.category-item-check {
+				margin-right: 8px;
+				margin-top: 0;
+			}
+		}
+
+		.category-path {
+			float: right;
+			font-weight: normal;
+			font-size: 0.8em;
+			text-align: right;
+			width: 49%;
+		}
+	}
+
+	.vocabulary-edit-category {
+		position: relative;
+
+		.category-view-close {
+			position: absolute;
+			right: 5px;
+			top: 26px;
+		}
+	}
+
+	#vocabulary-category-messages {
+		margin: 0 10px 10px 10px;
+	}
+
+	.categories-treeview-container {
+		.tree-label {
+			cursor: pointer;
+
+			&:hover {
+				color: #06C;
+			}
+		}
+
+		.tree-node {
+			.tree-icon {
+				background: none;
+				height: 0;
+				width: 0;
+			}
+		}
+
+		.tree-node-over {
+			background: #EEE;
+		}
+
+		.tree-node-content {
+			height: 33px;
+
+			.tree-hitarea {
+				margin-left: 5px;
+				margin-top: 10px;
+			}
+
+			.tree-node-checkbox-container, .tree-label {
+				display: inline-block;
+				position: relative;
+				top: 8px;
+				vertical-align: middle;
+			}
+		}
+
+		.tree-node-selected {
+			background: #08C;
+
+			.tree-label {
+				color: #FFF;
+				cursor: move;
+			}
+		}
+	}
+
+	.vocabulary-container .category-name {
+		width: 300px;
+	}
+
+	.view-category {
+		margin: 1em;
+
+		label {
+			display: block;
+			font-weight: bold;
+		}
+
+		.category-field {
+			clear: left;
+			margin: 1em auto;
+		}
+	}
+
+	.vocabularies-pagination {
+		margin: 10px 0;
+		text-align: center;
+
+		.pagination-content {
+			margin: 0;
+		}
+	}
+}
+
+.portlet-asset-categories-admin-dialog {
+	.fieldset {
+		margin-bottom: 0;
+	}
+
+	.lfr-panel-container {
+		background-color: transparent;
+		border-width: 0;
+	}
+
+	.asset-category-layer .overlay {
+		overflow: visible;
+		width: 230px;
+	}
+
+	.yui3-widget-bd {
+		.asset-category-layer {
+			padding: 0 10px;
+
+			.field-content {
+				margin-bottom: 10px;
+			}
+
+			label {
+				display: block;
+				font-weight: bold;
+			}
+
+			.field {
+				input, select {
+					width: 200px;
+				}
+			}
+
+			.button-holder {
+				margin-top: 10px;
+			}
+		}
+	}
+}
+
+.ie6, .ie7 {
+	.portlet-asset-category-admin {
+		.vocabulary-item-actions-trigger {
+			cursor: pointer;
+		}
+
+		.vocabulary-categories {
+			.category-item {
+				zoom: 1;
+			}
+		}
+	}
+}
+
+.ie {
+	.portlet-asset-category-admin {
+		.vocabulary-item a {
+			zoom: 1;
+		}
+	}
+}
+
+.ie6 {
+	.portlet-asset-categories-admin-dialog {
+		.yui3-widget-bd {
+			.asset-category-layer {
+				width: 200px;
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/edit_category.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/edit_category.jsp
new file mode 100644
index 0000000..6935b0d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/edit_category.jsp
@@ -0,0 +1,211 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_category_admin/init.jsp" %>
+
+<%
+String randomNamespace = PortalUtil.generateRandomKey(request, "portlet_asset_category_admin_edit_category") + StringPool.UNDERLINE;
+
+AssetCategory category = (AssetCategory)request.getAttribute(WebKeys.ASSET_CATEGORY);
+
+long categoryId = BeanParamUtil.getLong(category, request, "categoryId");
+
+long parentCategoryId = BeanParamUtil.getLong(category, request, "parentCategoryId");
+
+List<AssetVocabulary> vocabularies = (List<AssetVocabulary>)request.getAttribute(WebKeys.ASSET_VOCABULARIES);
+
+long vocabularyId = ParamUtil.getLong(request, "vocabularyId");
+
+int[] categoryPropertiesIndexes = null;
+
+List<AssetCategoryProperty> categoryProperties = Collections.emptyList();
+
+String categoryPropertiesIndexesParam = ParamUtil.getString(request, "categoryPropertiesIndexes");
+
+if (Validator.isNotNull(categoryPropertiesIndexesParam)) {
+	categoryProperties = new ArrayList<AssetCategoryProperty>();
+
+	categoryPropertiesIndexes = StringUtil.split(categoryPropertiesIndexesParam, 0);
+
+	for (int categoryPropertiesIndex : categoryPropertiesIndexes) {
+		categoryProperties.add(new AssetCategoryPropertyImpl());
+	}
+}
+else {
+	if (category != null) {
+		categoryProperties = AssetCategoryPropertyServiceUtil.getCategoryProperties(category.getCategoryId());
+
+		categoryPropertiesIndexes = new int[categoryProperties.size()];
+
+		for (int i = 0; i < categoryProperties.size(); i++) {
+			categoryPropertiesIndexes[i] = i;
+		}
+	}
+
+	if (categoryProperties.isEmpty()) {
+		categoryProperties = new ArrayList<AssetCategoryProperty>();
+
+		categoryProperties.add(new AssetCategoryPropertyImpl());
+
+		categoryPropertiesIndexes = new int[] {0};
+	}
+
+	if (categoryPropertiesIndexes == null) {
+		categoryPropertiesIndexes = new int[0];
+	}
+}
+
+String categoryDescriptionId = "categoryDescription";
+String categoryNameId = "categoryName";
+String categoryPropertiesId = "categoryProperties";
+%>
+
+<portlet:actionURL var="editCategoryURL">
+	<portlet:param name="struts_action" value="/asset_category_admin/edit_category" />
+</portlet:actionURL>
+
+<aui:form action="<%= editCategoryURL %>" cssClass="update-category-form" method="get" name='<%= randomNamespace + "fm" %>'>
+	<div class="hide lfr-message-response" id="categoryMessagesEdit"></div>
+
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= category == null ? Constants.ADD : Constants.UPDATE %>" />
+
+	<aui:model-context bean="<%= category %>" model="<%= AssetCategory.class %>" />
+
+	<aui:fieldset>
+		<div>
+			<div class="add-category-layer asset-category-layer">
+				<aui:input name="categoryId" type="hidden" value="<%= categoryId %>" />
+				<aui:input name="parentCategoryId" type="hidden" value="<%= parentCategoryId %>" />
+
+				<%
+				if (category != null) {
+					categoryNameId += "Edit";
+					categoryDescriptionId += "Edit";
+				}
+				%>
+
+				<aui:input autoFocus="<%= true %>" cssClass="category-name" id="<%= categoryNameId %>" label="name" name="title" />
+
+				<aui:input id="<%= categoryDescriptionId %>" name="description" />
+
+				<c:choose>
+					<c:when test="<%= parentCategoryId == 0 %>">
+						<aui:select cssClass="vocabulary-select-list" label="to-vocabulary" name="vocabularyId">
+
+							<%
+							for (AssetVocabulary vocabulary : vocabularies) {
+							%>
+
+								<aui:option label="<%= HtmlUtil.escape(vocabulary.getTitle(locale)) %>" selected="<%= vocabulary.getVocabularyId() == vocabularyId %>" value="<%= vocabulary.getVocabularyId() %>" />
+
+							<%
+							}
+							%>
+
+						</aui:select>
+					</c:when>
+					<c:otherwise>
+						<aui:input name="vocabularyId" type="hidden" value="<%= vocabularyId %>" />
+					</c:otherwise>
+				</c:choose>
+
+				<liferay-ui:panel-container extended="<%= false %>" id="assetCategoryPanelContainer" persistState="<%= true %>">
+					<c:if test="<%= category == null %>">
+						<liferay-ui:panel collapsible="<%= true %>" cssClass="category-permissions-actions" defaultState="open" extended="<%= true %>" id="assetCategoryPermissionsPanel" persistState="<%= true %>" title="permissions">
+							<liferay-ui:input-permissions
+								modelName="<%= AssetCategory.class.getName() %>"
+							/>
+						</liferay-ui:panel>
+					</c:if>
+
+					<%
+					if (category != null) {
+						categoryPropertiesId += "Edit";
+					}
+					%>
+
+					<liferay-ui:panel collapsible="<%= true %>" defaultState="closed" extended="<%= true %>" helpMessage="properties-are-a-way-to-add-more-detailed-information-to-a-specific-category" id="assetCategoryPropertiesPanel" persistState="<%= true %>" title="properties">
+						<aui:fieldset cssClass="category-categoryProperties" id="<%= categoryPropertiesId %>">
+
+							<%
+							for (int i = 0; i < categoryPropertiesIndexes.length; i++) {
+								int categoryPropertiesIndex = categoryPropertiesIndexes[i];
+
+								AssetCategoryProperty categoryProperty = categoryProperties.get(i);
+							%>
+
+								<aui:model-context bean="<%= categoryProperty %>" model="<%= AssetCategoryProperty.class %>" />
+
+								<div class="lfr-form-row lfr-form-row-inline">
+									<div class="row-fields">
+										<aui:input fieldParam='<%= "key" + categoryPropertiesIndex %>' id='<%= "key" + categoryPropertiesIndex %>' name="key" />
+
+										<aui:input fieldParam='<%= "value" + categoryPropertiesIndex %>' id='<%= "value" + categoryPropertiesIndex %>' name="value" />
+									</div>
+								</div>
+
+							<%
+							}
+							%>
+
+							<aui:input name="categoryPropertiesIndexes" type="hidden" value="<%= StringUtil.merge(categoryPropertiesIndexes) %>" />
+						</aui:fieldset>
+					</liferay-ui:panel>
+				</liferay-ui:panel-container>
+
+				<aui:button-row>
+					<aui:button type="submit" />
+
+					<c:if test="<%= category != null %>">
+						<c:if test="<%= AssetCategoryPermission.contains(permissionChecker, category, ActionKeys.DELETE) %>">
+							<aui:button id="deleteCategoryButton" value="delete" />
+						</c:if>
+
+						<c:if test="<%= AssetCategoryPermission.contains(permissionChecker, category, ActionKeys.PERMISSIONS) %>">
+							<liferay-security:permissionsURL
+								modelResource="<%= AssetCategory.class.getName() %>"
+								modelResourceDescription="<%= category.getTitle(locale) %>"
+								resourcePrimKey="<%= String.valueOf(category.getCategoryId()) %>"
+								var="permissionsURL"
+								windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+							/>
+
+							<aui:button data-url="<%= permissionsURL %>" id="updateCategoryPermissions" value="permissions" />
+						</c:if>
+					</c:if>
+
+					<aui:button cssClass="close-panel" type="cancel" value="close" />
+				</aui:button-row>
+			</div>
+		</div>
+	</aui:fieldset>
+</aui:form>
+
+<aui:script use="liferay-auto-fields">
+	var autoFields = new Liferay.AutoFields(
+		{
+			contentBox: 'fieldset#<portlet:namespace /><%= categoryPropertiesId %>',
+			fieldIndexes: '<portlet:namespace />categoryPropertiesIndexes',
+			namespace: '<portlet:namespace />'
+		}
+	).render();
+
+	var categoryPropertiesTrigger = A.one('fieldset#<portlet:namespace /><%= categoryPropertiesId %>');
+
+	if (categoryPropertiesTrigger) {
+		categoryPropertiesTrigger.setData('autoFieldsInstance', autoFields);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/edit_vocabulary.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/edit_vocabulary.jsp
new file mode 100644
index 0000000..20bc9ac
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/edit_vocabulary.jsp
@@ -0,0 +1,84 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_category_admin/init.jsp" %>
+
+<%
+String randomNamespace = PortalUtil.generateRandomKey(request, "portlet_asset_category_admin_edit_vocabulary") + StringPool.UNDERLINE;
+
+AssetVocabulary vocabulary = (AssetVocabulary)request.getAttribute(WebKeys.ASSET_VOCABULARY);
+
+long vocabularyId = BeanParamUtil.getLong(vocabulary, request, "vocabularyId");
+%>
+
+<portlet:actionURL var="editVocabularyURL">
+	<portlet:param name="struts_action" value="/asset_category_admin/edit_vocabulary" />
+</portlet:actionURL>
+
+<aui:form action="<%= editVocabularyURL %>" cssClass="update-vocabulary-form" method="get" name='<%= randomNamespace + "fm" %>'>
+	<div class="hide lfr-message-response" id="vocabularyMessagesEdit"></div>
+
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= vocabulary == null ? Constants.ADD : Constants.UPDATE %>" />
+	<aui:input name="vocabularyId" type="hidden" value="<%= vocabularyId %>" />
+
+	<aui:model-context bean="<%= vocabulary %>" model="<%= AssetVocabulary.class %>" />
+
+	<aui:fieldset>
+		<div>
+			<div class="add-vocabulary-layer asset-category-layer">
+				<aui:input autoFocus="<%= true %>" cssClass="vocabulary-name" label="name" name="title" />
+
+				<aui:input name="description" />
+
+				<%@ include file="/html/portlet/asset_category_admin/edit_vocabulary_settings.jspf" %>
+
+				<c:choose>
+					<c:when test="<%= vocabulary == null %>">
+						<aui:field-wrapper cssClass="vocabulary-permissions-actions" label="permissions">
+							<liferay-ui:input-permissions
+								modelName="<%= AssetVocabulary.class.getName() %>"
+							/>
+						</aui:field-wrapper>
+					</c:when>
+				</c:choose>
+
+				<aui:button-row>
+					<aui:button type="submit" />
+
+					<c:if test="<%= vocabulary != null %>">
+						<c:if test="<%= AssetVocabularyPermission.contains(permissionChecker, vocabulary, ActionKeys.DELETE) %>">
+							<aui:button id="deleteVocabularyButton" value="delete" />
+						</c:if>
+
+						<c:if test="<%= AssetVocabularyPermission.contains(permissionChecker, vocabulary, ActionKeys.PERMISSIONS) %>">
+							<liferay-security:permissionsURL
+								modelResource="<%= AssetVocabulary.class.getName() %>"
+								modelResourceDescription="<%= vocabulary.getTitle(locale) %>"
+								resourcePrimKey="<%= String.valueOf(vocabulary.getVocabularyId()) %>"
+								var="permissionsURL"
+								windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+							/>
+
+							<aui:button data-url="<%= permissionsURL %>" id="vocabulary-change-permissions" value="permissions" />
+						</c:if>
+					</c:if>
+
+					<aui:button cssClass="close-panel" type="cancel" value="close" />
+				</aui:button-row>
+			</div>
+		</div>
+	</aui:fieldset>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/edit_vocabulary_settings.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/edit_vocabulary_settings.jspf
new file mode 100644
index 0000000..49fa4a7
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/edit_vocabulary_settings.jspf
@@ -0,0 +1,157 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+List<Long> availableClassNameIds = new ArrayList<Long>();
+
+for (AssetRendererFactory assetRendererFactory : AssetRendererFactoryRegistryUtil.getAssetRendererFactories()) {
+	if (assetRendererFactory.isCategorizable()) {
+		availableClassNameIds.add(assetRendererFactory.getClassNameId());
+	}
+}
+
+boolean required = false;
+
+long[] selectedClassNameIds = null;
+long[] requiredClassNameIds = null;
+
+if (vocabulary != null) {
+	UnicodeProperties settingsProperties = vocabulary.getSettingsProperties();
+
+	selectedClassNameIds = StringUtil.split(settingsProperties.getProperty("selectedClassNameIds"), 0L);
+	requiredClassNameIds = StringUtil.split(settingsProperties.getProperty("requiredClassNameIds"), 0L);
+
+	if ((requiredClassNameIds != null) && _isDefaultClassNameIds(requiredClassNameIds)) {
+		required = true;
+	}
+}
+
+if (ArrayUtil.isEmpty(selectedClassNameIds)) {
+	selectedClassNameIds = new long[] {0};
+}
+
+if (ArrayUtil.isEmpty(requiredClassNameIds)) {
+	requiredClassNameIds = new long[] {0};
+}
+%>
+
+<aui:input cssClass="vocabulary-checkbox" helpMessage="multi-valued-help" label="allow-multiple-categories" name="multiValued" type="checkbox" value="<%= (vocabulary != null) ? vocabulary.isMultiValued() : true %>" />
+
+<liferay-ui:panel collapsible="<%= true %>" defaultState="closed" extended="<%= false %>" id="vocabularyExtraFieldsPanelContainer" persistState="<%= true %>" title="associated-asset-types">
+	<aui:fieldset id="extraFields">
+
+		<%
+		List<String> indexes = new ArrayList<String>();
+
+		if (_isDefaultClassNameIds(selectedClassNameIds)) {
+			indexes.add("0");
+		%>
+
+			<div class="lfr-form-row lfr-form-row-inline">
+				<div class="row-fields">
+					<aui:select label="choose-asset-type" name="classNameId0">
+						<aui:option label="all-asset-types" selected="<%= true %>" value="<%= AssetCategoryConstants.ALL_CLASS_NAME_IDS %>" />
+
+						<%
+						for (long availableClassNameId : availableClassNameIds) {
+						%>
+
+							<aui:option label="<%= ResourceActionsUtil.getModelResource(locale, PortalUtil.getClassName(availableClassNameId)) %>" selected="<%= false %>" value="<%= availableClassNameId %>" />
+
+						<%
+						}
+						%>
+
+					</aui:select>
+
+					<aui:input cssClass="vocabulary-checkbox" label="required" name="required0" type="checkbox" value="<%= required %>" />
+				</div>
+			</div>
+
+		<%
+		}
+		else {
+			for (int index = 0; index < selectedClassNameIds.length; index++) {
+				indexes.add(String.valueOf(index));
+
+				boolean requiredIndex = false;
+
+				if (ArrayUtil.contains(requiredClassNameIds, selectedClassNameIds[index])) {
+					requiredIndex = true;
+				}
+		%>
+
+				<div class="lfr-form-row lfr-form-row-inline">
+					<div class="row-fields">
+						<aui:select label="choose-asset-type" name='<%= "classNameId" + index %>'>
+							<aui:option label="all-asset-types" value="<%= AssetCategoryConstants.ALL_CLASS_NAME_IDS %>" />
+
+							<%
+							for (int i = 0; i < availableClassNameIds.size(); i++) {
+								long availableClassNameId = availableClassNameIds.get(i);
+
+								boolean selected = false;
+
+								if (availableClassNameId == selectedClassNameIds[index]) {
+									selected = true;
+								}
+							%>
+
+								<aui:option label="<%= ResourceActionsUtil.getModelResource(locale, PortalUtil.getClassName(availableClassNameId)) %>" selected="<%= selected %>" value="<%= availableClassNameId %>" />
+
+							<%
+							}
+							%>
+
+						</aui:select>
+
+						<aui:input cssClass="vocabulary-checkbox" label="required" name='<%= "required" + index %>' type="checkbox" value="<%= requiredIndex %>" />
+					</div>
+				</div>
+
+		<%
+			}
+		}
+		%>
+
+		<aui:input name="indexes" type="hidden" value="<%= indexes.toString() %>" />
+	</aui:fieldset>
+</liferay-ui:panel>
+
+<aui:script use="liferay-auto-fields">
+	var extraFields = A.one('#<portlet:namespace />extraFields');
+
+	var autoFields = new Liferay.AutoFields(
+		{
+			contentBox: '#<portlet:namespace />extraFields',
+			fieldIndexes: '<portlet:namespace />indexes',
+			namespace: '<portlet:namespace />'
+		}
+	).render();
+
+	extraFields.setData('autoFieldsInstance', autoFields);
+</aui:script>
+
+<%!
+private boolean _isDefaultClassNameIds(long[] classNameIds) {
+	if ((classNameIds.length == 1) && (classNameIds[0] == 0)) {
+		return true;
+	}
+	else {
+		return false;
+	}
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/init.jsp
new file mode 100644
index 0000000..ac8a047
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/init.jsp
@@ -0,0 +1,27 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.asset.model.AssetCategoryConstants" %><%@
+page import="com.liferay.portlet.asset.model.AssetCategoryProperty" %><%@
+page import="com.liferay.portlet.asset.model.impl.AssetCategoryPropertyImpl" %><%@
+page import="com.liferay.portlet.asset.service.AssetCategoryPropertyServiceUtil" %><%@
+page import="com.liferay.portlet.asset.service.permission.AssetCategoryPermission" %><%@
+page import="com.liferay.portlet.asset.service.permission.AssetPermission" %><%@
+page import="com.liferay.portlet.asset.service.permission.AssetVocabularyPermission" %>
+
+<%@ include file="/html/portlet/asset_category_admin/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/js/main.js b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/js/main.js
new file mode 100644
index 0000000..11660de
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/js/main.js
@@ -0,0 +1,3003 @@
+AUI.add(
+	'liferay-category-admin',
+	function(A) {
+		var AArray = A.Array;
+		var AObject = A.Object;
+		var HistoryManager = Liferay.HistoryManager;
+		var JSON = A.JSON;
+		var Lang = A.Lang;
+		var Node = A.Node;
+		var Util = Liferay.Util;
+
+		var owns = AObject.owns;
+		var toInt = Lang.toInt;
+
+		var ACTION_ADD = 0;
+
+		var ACTION_ADD_SUBCATEGORY = 4;
+
+		var ACTION_EDIT = 1;
+
+		var ACTION_MOVE = 2;
+
+		var ACTION_VIEW = 3;
+
+		var CATEGORY = 0;
+
+		var CSS_ACTIVE_AREA = 'active-area';
+
+		var CSS_ADMIN_DIALOG = 'portlet-asset-categories-admin-dialog';
+
+		var CSS_CATEGORY_ITEM_CHECK = 'category-item-check';
+
+		var CSS_COLUMN_WIDTH_CATEGORY = 'span5';
+
+		var CSS_COLUMN_WIDTH_CATEGORY_FULL = 'span9';
+
+		var CSS_MESSAGE_RESPONSE = 'lfr-message-response';
+
+		var CSS_MESSAGE_ERROR = 'alert alert-error';
+
+		var CSS_MESSAGE_SUCCESS = 'alert alert-success';
+
+		var CSS_VOCABULARY_ITEM_CHECK = 'vocabulary-item-check';
+
+		var DATA_CATEGORY_ID = 'data-categoryId';
+
+		var DATA_CATEGORY_URL = 'data-url';
+
+		var DATA_VOCABULARY = 'data-vocabulary';
+
+		var DATA_VOCABULARY_ID = 'data-vocabularyId';
+
+		var DEFAULT_DEBOUNCE_TIMEOUT = 50;
+
+		var EVENT_CLICK = 'click';
+
+		var EVENT_SAVE_AUTO_FIELDS = 'saveAutoFields';
+
+		var EVENT_SUBMIT = 'submit';
+
+		var EVENT_VISIBLE_CHANGE = 'visibleChange';
+
+		var EXCEPTION_NO_SUCH_VOCABULARY = 'NoSuchVocabularyException';
+
+		var EXCEPTION_PRINCIPAL = 'auth.PrincipalException';
+
+		var EXCEPTION_VOCABULARY_NAME = 'VocabularyNameException';
+
+		var ID = 'id';
+
+		var INVALID_VALUE = A.Attribute.INVALID_VALUE;
+
+		var LIFECYCLE_RENDER = 0;
+
+		var LIFECYCLE_ACTION = 1;
+
+		var MESSAGE_TYPE_ALERT = 'alert';
+
+		var MESSAGE_TYPE_ERROR = 'error';
+
+		var MESSAGE_TYPE_SUCCESS = 'success';
+
+		var MODE_RENDER_FLAT = 0;
+
+		var REGEX_TREE_NODE_ID = /(\d+)$/;
+
+		var REGEX_TREE_NODE_TYPE = /^(vocabulary|category)/;
+
+		var SELECTOR_BUTTON_CANCEL = '.close-panel';
+
+		var SELECTOR_CATEGORY_ITEM = '.category-item';
+
+		var SELECTOR_CATEGORY_MESSAGES_EDIT = '#categoryMessagesEdit';
+
+		var SELECTOR_CATEGORY_NAME_INPUT = '.category-name';
+
+		var SELECTOR_FLOATING_TRIGGER = '.lfr-floating-trigger';
+
+		var SELECTOR_UPDATE_CATEGORY_FORM = 'form.update-category-form';
+
+		var SELECTOR_UPDATE_VOCABULARY_FORM = 'form.update-vocabulary-form';
+
+		var SELECTOR_VOCABULARY_MESSAGES = '#vocabularyMessages';
+
+		var SELECTOR_VOCABULARY_MESSAGES_EDIT = '#vocabularyMessagesEdit';
+
+		var SELECTOR_VOCABULARY_CATEGORY_MESSAGES = '#vocabularyCategoryMessages';
+
+		var SELECTOR_VOCABULARY_NAME_INPUT = '.vocabulary-name';
+
+		var SELECTOR_VOCABULARY_SELECT_LIST = '.vocabulary-select-list';
+
+		var STR_ACTION = 'action';
+
+		var STR_AUTO_FIELDS_INSTANCE = 'autoFieldsInstance';
+
+		var STR_BOUNDING_BOX = 'boundingBox';
+
+		var STR_CATEGORY_ID = 'categoryId';
+
+		var STR_CATEGORY_NODE = 'categoryNode';
+
+		var STR_CHECKED = 'checked';
+
+		var STR_CONTENT_BOX = 'contentBox';
+
+		var STR_EDIT_CATEGORY = 'edit_category';
+
+		var STR_EMPTY = '';
+
+		var STR_LABEL = 'label';
+
+		var STR_NODE = 'node';
+
+		var STR_PAGE = 'page';
+
+		var STR_PARENT_NODE = 'parentNode';
+
+		var STR_PARENT_CATEGORY_ID = 'parentCategoryId';
+
+		var STR_QUERY = 'query';
+
+		var STR_SELECTED = 'active';
+
+		var STR_SPACE = ' ';
+
+		var STR_SUCCESS = 'success';
+
+		var STR_TITLE = 'title';
+
+		var STR_TREE_NODE = 'tree-node';
+
+		var STR_TREE_VIEW = 'tree-view';
+
+		var STR_URI = 'uri';
+
+		var STR_VOCABULARY_ID = 'vocabularyId';
+
+		var STR_VOCABULARIES = 'vocabularies';
+
+		var STR_ZINDEX = 'zIndex';
+
+		var STR_RESPONSE_DATA = 'responseData';
+
+		var STR_ROWS_PER_PAGE = 'rowsPerPage';
+
+		var TPL_CATEGORY_ITEM =
+			'<label class="category-item" id="categoryNode{categoryId}" title="{name}">' +
+				'<span class="category-name" title="{name}">' +
+					'<input class="category-item-check" data-categoryId="{categoryId}" name="category-item-check" type="checkbox" value="{name}" {checked} />' +
+					'{name}' +
+				'</span>' +
+				'<span class="category-path" title="{path}">{path}</span>' +
+			'</label>';
+
+		var TPL_MESSAGES_CATEGORY = '<div class="hide lfr-message-response" id="vocabularyCategoryMessages" />';
+
+		var TPL_MESSAGES_PORTLET = '<div class="hide lfr-message-response" id="porletMessages" />';
+
+		var TPL_MESSAGES_VOCABULARY = '<div class="hide lfr-message-response" id="vocabularyMessages" />';
+
+		var TPL_SEARCH_QUERY = '%{0}%';
+
+		var TPL_VOCABULARY_LIST_CONTAINER = '<ul class="nav nav-pills nav-stacked">';
+
+		var TPL_VOCABULARY_LIST =
+			'<li class="vocabulary-category results-row {cssClassSelected}" data-vocabulary="{titleCurrentValue}" data-vocabularyId="{vocabularyId}" tabIndex="0">' +
+				'<a href="javascript:;" data-vocabularyId="{vocabularyId}" tabIndex="-1">' +
+					'<input type="checkbox" class="vocabulary-item-check" name="vocabulary-item-check" data-vocabularyId="{vocabularyId}" data-vocabularyName="{titleCurrentValue}">' +
+					'<span class="vocabulary-item-name" data-vocabularyId="{vocabularyId}">{titleCurrentValue}</span>' +
+					'<span tabindex="0" class="vocabulary-item-actions-trigger" data-vocabularyId="{vocabularyId}"></span>' +
+				'</a>' +
+			'</li>';
+
+		var TPL_VOCABULARY_OPTION = '<option value="{vocabularyId}">{titleCurrentValue}</option>';
+
+		var TPL_CATEGORIES_TREE_CONTAINER = '<div class="categories-treeview-container" id="categoriesTreeContainer"></div>';
+
+		var TYPE_VOCABULARY = 1;
+
+		var AssetCategoryAdmin = A.Component.create(
+			{
+				EXTENDS: A.Base,
+
+				NAME: 'assetcategoryadmin',
+
+				prototype: {
+					initializer: function(config) {
+						var instance = this;
+
+						instance._ioCategory = {};
+
+						instance._originalConfig = config;
+
+						var categoriesContainer = A.one(instance._categoryContainerSelector);
+						var vocabularyList = A.one(instance._vocabularyListSelector);
+
+						instance.portletId = config.portletId;
+
+						instance._prefixedPortletId = '_' + config.portletId + '_';
+
+						instance._container = A.one('.categories-admin-content');
+						instance._categoryViewSection = instance._container.one('.vocabulary-edit-category');
+						instance._categoryViewContainer = instance._categoryViewSection.one('.category-view');
+
+						instance._categoryMessageContainer = Node.create(TPL_MESSAGES_CATEGORY);
+						instance._portletMessageContainer = Node.create(TPL_MESSAGES_PORTLET);
+						instance._vocabularyMessageContainer = Node.create(TPL_MESSAGES_VOCABULARY);
+
+						instance._container.placeBefore(instance._portletMessageContainer);
+						categoriesContainer.placeBefore(instance._categoryMessageContainer);
+						vocabularyList.placeBefore(instance._vocabularyMessageContainer);
+
+						instance._dialogAlignConfig = {
+							node: '.vocabulary-list-container',
+							points: ['tl', 'tc']
+						};
+
+						var namespace = instance._prefixedPortletId;
+
+						var idPrefix = '#' + namespace;
+
+						instance._toggleAllCategories = A.debounce(instance._toggleAllCategoriesFn, DEFAULT_DEBOUNCE_TIMEOUT);
+						instance._toggleAllVocabularies = A.debounce(instance._toggleAllVocabulariesFn, DEFAULT_DEBOUNCE_TIMEOUT);
+
+						instance._searchInput = A.one(idPrefix + 'categoriesAdminSearchInput');
+						instance._searchType = A.one(idPrefix + 'categoriesAdminSelectSearch');
+
+						A.one('.category-view-close').on(EVENT_CLICK, instance._closeEditSection, instance);
+
+						instance._searchType.on('change', A.debounce(instance._onSearchTypeChange, DEFAULT_DEBOUNCE_TIMEOUT), instance);
+
+						instance._categoryViewContainer.on(EVENT_CLICK, instance._onCategoryViewContainerClick, instance);
+
+						instance._hideMessageTask = A.debounce(instance._hideMessage, 7000);
+
+						vocabularyList.on(EVENT_CLICK, instance._onVocabularyListClick, instance);
+
+						vocabularyList.on('key', instance._onVocabularyListSelect, 'up:13', instance);
+
+						var addCategoryButton = A.one(idPrefix + 'addCategoryButton');
+
+						if (addCategoryButton) {
+							addCategoryButton.on(EVENT_CLICK, instance._onShowCategoryPanel, instance, ACTION_ADD);
+						}
+
+						instance._addCategoryButton = addCategoryButton;
+
+						var addVocabularyButton = A.one(idPrefix + 'addVocabularyButton');
+
+						if (addVocabularyButton) {
+							addVocabularyButton.on(EVENT_CLICK, instance._onShowVocabularyPanel, instance, ACTION_ADD);
+						}
+
+						var permissionButton = A.one(idPrefix + 'categoryPermissionsButton');
+
+						if (permissionButton) {
+							permissionButton.on(EVENT_CLICK, instance._onChangePermissions, instance);
+						}
+
+						A.one(idPrefix + 'deleteSelectedItems').on(EVENT_CLICK, instance._deleteSelected, instance);
+
+						var checkAllVocabulariesCheckbox = A.one(idPrefix + 'checkAllVocabulariesCheckbox');
+
+						checkAllVocabulariesCheckbox.on(EVENT_CLICK, instance._checkAllVocabularies, instance);
+
+						instance._checkAllVocabulariesCheckbox = checkAllVocabulariesCheckbox;
+
+						var checkAllCategoriesCheckbox = A.one(idPrefix + 'checkAllCategoriesCheckbox');
+
+						checkAllCategoriesCheckbox.on(EVENT_CLICK, instance._checkAllCategories, instance);
+
+						instance._checkAllCategoriesCheckbox = checkAllCategoriesCheckbox;
+
+						instance._categoriesContainer = categoriesContainer;
+
+						instance._createLiveSearch();
+
+						HistoryManager.on('stateChange', instance._onStateChange, instance);
+
+						instance._loadData();
+
+						instance.after('drop:enter', instance._afterDragEnter);
+						instance.after('drop:exit', instance._afterDragExit);
+
+						instance.on('drop:hit', instance._onDragDrop);
+					},
+
+					_addCategory: function(form, action) {
+						var instance = this;
+
+						var ioCategory = instance._getIOCategory(action);
+
+						ioCategory.set('form', form.getDOM());
+						ioCategory.set(STR_URI, form.attr(STR_ACTION));
+
+						ioCategory.start();
+					},
+
+					_addVocabulary: function(form) {
+						var instance = this;
+
+						var ioVocabulary = instance._getIOVocabulary();
+
+						ioVocabulary.set('form', form.getDOM());
+						ioVocabulary.set(STR_URI, form.attr(STR_ACTION));
+
+						ioVocabulary.start();
+					},
+
+					_afterDragEnter: function(event) {
+						var instance = this;
+
+						var dropNode = event.drop.get(STR_NODE);
+
+						dropNode.addClass(CSS_ACTIVE_AREA);
+					},
+
+					_afterDragExit: function(event) {
+						var instance = this;
+
+						var dropNode = event.target.get(STR_NODE);
+
+						dropNode.removeClass(CSS_ACTIVE_AREA);
+					},
+
+					_afterVocabulariesPaginationChangeRequest: function(event) {
+						var instance = this;
+
+						var lastState = event.lastState;
+						var state = event.state;
+
+						var historyState = {};
+
+						var paginationMap = instance._getVocabulariesPaginationMap();
+
+						AObject.each(
+							paginationMap,
+							function(item, index, collection) {
+								if (owns(state, index)) {
+									var historyEntry = item.historyEntry;
+
+									var newItemValue = state[index];
+
+									var value = INVALID_VALUE;
+
+									if (newItemValue === item.defaultValue &&
+										Lang.isValue(HistoryManager.get(historyEntry))) {
+
+										value = null;
+									}
+									else if (lastState && (newItemValue !== lastState[index])) {
+										value = newItemValue;
+									}
+
+									if (value !== INVALID_VALUE) {
+										historyState[historyEntry] = value;
+									}
+								}
+							}
+						);
+
+						if (!AObject.isEmpty(historyState)) {
+							HistoryManager.add(historyState);
+						}
+
+						instance._loadData();
+					},
+
+					_bindCloseEvent: function(contextPanel) {
+						var instance = this;
+
+						contextPanel.get(STR_BOUNDING_BOX).on('key', contextPanel.hide, 'up:27', contextPanel);
+					},
+
+					_clearCategoriesContainer: function() {
+						var instance = this;
+
+						if (instance._categoriesTreeView) {
+							instance._categoriesTreeView.destroy();
+
+							instance._categoriesTreeView = null;
+						}
+
+						instance._categoriesContainer.empty();
+					},
+
+					_createAlertMessage: function(items, selectedNames, keyId) {
+						var instance = this;
+
+						var itemNames = AArray.map(
+							items,
+							function(item, index, collection) {
+								var itemId = item[keyId];
+
+								return selectedNames[itemId];
+							}
+						);
+
+						return Liferay.Language.get('the-following-items-could-not-be-deleted') + ' ' + itemNames.join(', ');
+					},
+
+					_createCategoryFlatView: function(categories) {
+						var instance = this;
+
+						instance._clearCategoriesContainer();
+
+						if (categories.length) {
+							var buffer = AArray.map(
+								categories,
+								function(item, index, collection) {
+									if (item.parentCategoryId == 0) {
+										instance._vocabularyRootCategories[item.categoryId] = 1;
+									}
+
+									return Lang.sub(TPL_CATEGORY_ITEM, item);
+								}
+							);
+
+							instance._categoriesContainer.html(buffer.join(STR_EMPTY));
+
+							if (!instance._categoresSearchHandle) {
+								instance._categoresSearchHandle = instance._categoriesContainer.delegate(
+									EVENT_CLICK,
+									instance._onCategorySearchClick,
+									'input[type=checkbox]',
+									instance
+								);
+							}
+						}
+						else {
+							instance._showCateroryMessage();
+						}
+					},
+
+					_createCategoryTreeView: function(categories) {
+						var instance = this;
+
+						instance._clearCategoriesContainer();
+
+						var boundingBox = Node.create(TPL_CATEGORIES_TREE_CONTAINER);
+
+						instance._categoriesContainer.append(boundingBox);
+
+						var paginatorConfig = {
+							limit: 10,
+							moreResultsLabel: Liferay.Language.get('load-more-results'),
+							offsetParam: 'start',
+							total: instance._getVocabularyCategoriesCount(instance._vocabularies, instance._selectedVocabularyId)
+						};
+
+						instance._categoriesTreeView = new CategoriesTree(
+							{
+								boundingBox: boundingBox,
+								children: categories,
+								on: {
+									dropAppend: function(event) {
+										var tree = event.tree;
+
+										var fromCategoryId = instance._getCategoryId(tree.dragNode);
+										var toCategoryId = instance._getCategoryId(tree.dropNode);
+										var vocabularyId = instance._selectedVocabularyId;
+
+										instance._merge(fromCategoryId, toCategoryId, vocabularyId);
+
+										instance._categoriesTreeView.reinsertChild(tree.dragNode, tree.dropNode);
+									},
+									dropFailed: function(event) {
+										var tree = event.tree;
+
+										var parentNode = tree.dropNode.get(STR_PARENT_NODE);
+										var dragParentNode = tree.dragNode.get(STR_PARENT_NODE);
+
+										var toCategoryId = instance._getCategoryId(tree.dropNode);
+										var fromCategoryId = instance._getCategoryId(dragParentNode);
+
+										if (tree.instance.dropAction != 'append') {
+											toCategoryId = instance._getCategoryId(parentNode);
+										}
+
+										var errorKey = STR_EMPTY;
+
+										if (toCategoryId == fromCategoryId) {
+											errorKey = Liferay.Language.get('changing-the-order-of-the-categories-is-not-supported');
+										}
+										else {
+											errorKey = Liferay.Language.get('there-is-another-category-with-the-same-name-and-the-same-parent');
+										}
+
+										instance._sendMessage(MESSAGE_TYPE_ERROR, errorKey);
+									},
+									dropInsert: function(event) {
+										var tree = event.tree;
+
+										var parentNode = tree.dropNode.get(STR_PARENT_NODE);
+										var fromCategoryId = instance._getCategoryId(tree.dragNode);
+										var toCategoryId = instance._getCategoryId(parentNode);
+										var vocabularyId = instance._selectedVocabularyId;
+
+										instance._merge(fromCategoryId, toCategoryId, vocabularyId);
+
+										instance._categoriesTreeView.reinsertChild(tree.dragNode, parentNode);
+									}
+								},
+								io: {
+									cfg: {
+										data: A.bind('_formatRequestData', instance)
+									},
+									formatter: A.bind('_formatJSONResult', instance),
+									url: themeDisplay.getPathMain() + '/asset/get_categories'
+								},
+								paginator: paginatorConfig,
+								type: 'normal'
+							}
+						).render();
+					},
+
+					_createItemNameMap: function(itemIds, itemLookupFn, attrLookup, attr) {
+						var instance = this;
+
+						var itemNameMap = {};
+
+						var length = itemIds.length;
+
+						for (var i = 0; i < length; i++) {
+							var itemId = itemIds[i];
+
+							var item = itemLookupFn(itemId);
+
+							var attrLookupFn = item[attrLookup];
+
+							itemNameMap[itemId] = attrLookupFn.call(item, attr);
+						}
+
+						return itemNameMap;
+					},
+
+					_checkAllCategories: function(event) {
+						var instance = this;
+
+						instance._toggleAllCategories(event.currentTarget.attr(STR_CHECKED));
+					},
+
+					_checkAllVocabularies: function(event) {
+						var instance = this;
+
+						instance._toggleAllVocabularies(event.currentTarget.attr(STR_CHECKED));
+					},
+
+					_closeEditSection: function() {
+						var instance = this;
+
+						instance._hideSection(instance._categoryViewSection);
+
+						var selectedCategory = instance._selectedCategory;
+
+						if (selectedCategory) {
+							if (Lang.isFunction(selectedCategory.unselect)) {
+								selectedCategory.unselect();
+							}
+							else {
+								selectedCategory.removeClass(STR_SELECTED);
+							}
+						}
+					},
+
+					_createCategoryPanelAdd: function() {
+						var instance = this;
+
+						instance._categoryPanelAdd = Liferay.Util.Window.getWindow(
+							{
+								dialog: {
+									cssClass: CSS_ADMIN_DIALOG
+								},
+								title: Liferay.Language.get('add-category')
+							}
+						);
+
+						instance._categoryPanelAdd.hide();
+
+						instance._bindCloseEvent(instance._categoryPanelAdd);
+
+						instance._categoryPanelAdd.on(
+							EVENT_VISIBLE_CHANGE,
+							function(event) {
+								if (!event.newVal) {
+									if (instance._categoryFormAdd) {
+										instance._categoryFormAdd.reset();
+									}
+
+									instance._hideFloatingPanels(event);
+									instance._resetCategoriesProperties(event);
+								}
+							}
+						);
+
+						return instance._categoryPanelAdd;
+					},
+
+					_createLiveSearch: function() {
+						var instance = this;
+
+						var liveSearch = new LiveSearch(
+							{
+								inputNode: instance._searchInput,
+								minQueryLength: 0,
+								queryDelay: 300
+							}
+						);
+
+						if (Liferay.Form.Placeholders) {
+							liveSearch.sendRequest('');
+						}
+
+						liveSearch.after(STR_QUERY, instance._processSearch, instance);
+
+						instance._searchInput.on('keydown', instance._onSearchInputKeyDown, instance);
+
+						instance._liveSearch = liveSearch;
+					},
+
+					_createVocabularyPanelAdd: function() {
+						var instance = this;
+
+						instance._vocabularyPanelAdd = Liferay.Util.Window.getWindow(
+							{
+								dialog: {
+									cssClass: CSS_ADMIN_DIALOG
+								},
+								title: Liferay.Language.get('add-vocabulary')
+							}
+						);
+
+						instance._vocabularyPanelAdd.hide();
+
+						instance._bindCloseEvent(instance._vocabularyPanelAdd);
+
+						instance._vocabularyPanelAdd.on(
+							EVENT_VISIBLE_CHANGE,
+							function(event) {
+								if (!event.newVal) {
+									if (instance._vocabularyFormAdd) {
+										instance._vocabularyFormAdd.reset();
+									}
+
+									var autoFields = A.one('#' + instance._prefixedPortletId + 'extraFields').getData(STR_AUTO_FIELDS_INSTANCE);
+
+									if (autoFields) {
+										autoFields.reset();
+									}
+
+									instance._hideFloatingPanels(event);
+								}
+							}
+						);
+
+						return instance._vocabularyPanelAdd;
+					},
+
+					_createPanelEdit: function(config) {
+						var instance = this;
+
+						instance._panelEdit = Liferay.Util.Window.getWindow(
+							{
+								dialog: {
+									align: instance._dialogAlignConfig,
+									cssClass: CSS_ADMIN_DIALOG
+								},
+								title: Liferay.Language.get('edit-category')
+							}
+						);
+
+						instance._panelEdit.hide();
+
+						instance._bindCloseEvent(instance._panelEdit);
+
+						instance._panelEdit.on(
+							EVENT_VISIBLE_CHANGE,
+							function(event) {
+								if (!event.newVal) {
+									instance._processAutoFieldsTriggers(event, instance._destroyFloatingPanels);
+
+									var body = instance._panelEdit.getStdModNode(A.WidgetStdMod.BODY);
+
+									body.empty();
+								}
+							}
+						);
+
+						return instance._panelEdit;
+					},
+
+					_createPanelPermissions: function() {
+						var instance = this;
+
+						var panelPermissionsChange = instance._panelPermissionsChange;
+
+						if (!panelPermissionsChange) {
+							panelPermissionsChange = Util.Window.getWindow(
+								{
+									dialog: {
+										align: instance._dialogAlignConfig,
+										cssClass: 'portlet-asset-categories-admin-dialog permissions-change'
+									},
+									title: Liferay.Language.get('edit-permissions'),
+									uri: 'about:blank'
+								}
+							);
+
+							instance._panelPermissionsChange = panelPermissionsChange;
+						}
+
+						return panelPermissionsChange;
+					},
+
+					_createURL: function(type, action, lifecycle, params) {
+						var instance = this;
+
+						var path = '/asset_category_admin/';
+
+						var url;
+
+						var config = instance._originalConfig;
+
+						if (lifecycle == LIFECYCLE_RENDER) {
+							url = Liferay.PortletURL.createURL(config.baseRenderURL);
+						}
+						else if (lifecycle == LIFECYCLE_ACTION) {
+							url = Liferay.PortletURL.createURL(config.baseActionURL);
+						}
+						else {
+							throw 'Internal error. Unimplemented lifecycle.';
+						}
+
+						url.setPortletId(instance.portletId);
+						url.setWindowState('exclusive');
+
+						if (type == TYPE_VOCABULARY) {
+							path += 'edit_vocabulary';
+
+							if (action == ACTION_EDIT) {
+								url.setParameter(STR_VOCABULARY_ID, instance._selectedVocabularyId);
+							}
+						}
+						else if (type == CATEGORY) {
+							if (action == ACTION_ADD) {
+								path += STR_EDIT_CATEGORY;
+
+								url.setParameter(STR_VOCABULARY_ID, instance._selectedVocabularyId);
+							}
+							else if (action == ACTION_ADD_SUBCATEGORY) {
+								path += STR_EDIT_CATEGORY;
+
+								url.setParameter(STR_PARENT_CATEGORY_ID, instance._selectedCategoryId);
+								url.setParameter(STR_VOCABULARY_ID, instance._selectedVocabularyId);
+							}
+							else if (action == ACTION_EDIT) {
+								path += STR_EDIT_CATEGORY;
+
+								url.setParameter(STR_CATEGORY_ID, instance._selectedCategoryId);
+								url.setParameter(STR_VOCABULARY_ID, instance._selectedVocabularyId);
+							}
+							else if (action == ACTION_MOVE) {
+								path += STR_EDIT_CATEGORY;
+
+								url.setParameter(STR_CATEGORY_ID, instance._selectedCategoryId);
+								url.setParameter('cmd', 'move');
+							}
+							else if (action == ACTION_VIEW) {
+								path += 'view_category';
+
+								url.setParameter(STR_CATEGORY_ID, instance._selectedCategoryId);
+								url.setParameter(STR_VOCABULARY_ID, instance._selectedVocabularyId);
+							}
+						}
+
+						url.setParameter('struts_action', path);
+
+						if (params) {
+							for (var key in params) {
+								if (owns(params, key)) {
+									url.setParameter(key, params[key]);
+								}
+							}
+						}
+
+						url.setDoAsGroupId(themeDisplay.getScopeGroupId());
+
+						return url;
+					},
+
+					_deleteCategory: function(categoryId, callback) {
+						var instance = this;
+
+						Liferay.Service(
+							'/assetcategory/delete-category',
+							{
+								categoryId: categoryId
+							},
+							callback
+						);
+					},
+
+					_deleteSelected: function(event) {
+						var instance = this;
+
+						instance._selectedVocabularies = instance._getSelectedVocabularies();
+
+						var ids = AObject.keys(instance._selectedVocabularies);
+
+						if (ids.length) {
+							instance._deleteSelectedVocabularies(ids);
+						}
+						else {
+							instance._selectedCategories = instance._getSelectedCategories();
+
+							ids = AObject.keys(instance._selectedCategories);
+
+							if (ids.length) {
+								instance._deleteSelectedCategories(ids);
+							}
+						}
+
+						if (!ids.length) {
+							alert(Liferay.Language.get('there-are-no-selected-vocabularies-or-categories'));
+						}
+					},
+
+					_deleteSelectedCategories: function(categoryIds) {
+						var instance = this;
+
+						if (Lang.isArray(categoryIds) && categoryIds.length > 0 &&
+							confirm(Liferay.Language.get('are-you-sure-you-want-to-delete-the-selected-categories'))) {
+
+							Liferay.Service(
+								'/assetcategory/delete-categories',
+								{
+									categoryIds: categoryIds,
+									serviceContext: JSON.stringify(
+										{
+											failOnPortalException: false
+										}
+									)
+								},
+								A.bind('_processCategoryDeletion', instance, instance._selectedVocabularyId, categoryIds)
+							);
+						}
+					},
+
+					_deleteSelectedVocabularies: function(vocabularyIds) {
+						var instance = this;
+
+						if (vocabularyIds.length > 0 &&
+							confirm(Liferay.Language.get('are-you-sure-you-want-to-delete-the-selected-vocabularies'))) {
+
+							Liferay.Service(
+								'/assetvocabulary/delete-vocabularies',
+								{
+									vocabularyIds: vocabularyIds,
+									serviceContext: JSON.stringify(
+										{
+											failOnPortalException: false
+										}
+									)
+								},
+								A.bind('_processVocabularyDeletion', instance)
+							);
+						}
+					},
+
+					_deleteVocabulary: function(vocabularyId, callback) {
+						var instance = this;
+
+						Liferay.Service(
+							'/assetvocabulary/delete-vocabulary',
+							{
+								vocabularyId: vocabularyId
+							},
+							A.bind(callback, instance)
+						);
+					},
+
+					_destroyFloatingPanels: function(autoFieldsInstance) {
+						var instance = this;
+
+						if (autoFieldsInstance) {
+							autoFieldsInstance.destroy();
+						}
+					},
+
+					_displayCategoriesTreeView: function(categories) {
+						var instance = this;
+
+						if (categories.length) {
+							instance._createCategoryTreeView(categories);
+						}
+						else {
+							instance._categoriesContainer.empty();
+
+							instance._showCateroryMessage();
+						}
+
+						var vocabularyList = A.one(instance._vocabularyListSelector);
+
+						var listLinks = vocabularyList.all('li');
+
+						listLinks.unplug(A.Plugin.Drop);
+
+						var bubbleTargets = [instance];
+
+						if (instance._categoriesTreeView) {
+							bubbleTargets.push(instance._categoriesTreeView);
+						}
+
+						listLinks.plug(
+							A.Plugin.Drop,
+							{
+								bubbleTargets: bubbleTargets
+							}
+						);
+					},
+
+					_displayList: function(callback) {
+						var instance = this;
+
+						var vocabularyList = A.one(instance._vocabularyListSelector);
+
+						instance._showLoading('.vocabulary-categories, .vocabulary-list');
+
+						instance._getVocabularies(
+							function(result) {
+								var vocabularies = result.vocabularies;
+
+								instance._vocabularies = vocabularies;
+
+								if (vocabularies && vocabularies.length) {
+									instance._hideVocabularyMessage();
+
+									var buffer = [TPL_VOCABULARY_LIST_CONTAINER];
+
+									A.each(
+										vocabularies,
+										function(item, index, collection) {
+											if (index === 0) {
+												item.cssClassSelected = STR_SELECTED;
+											}
+											else {
+												item.cssClassSelected = STR_EMPTY;
+											}
+
+											var auxItem = A.clone(item);
+
+											auxItem.titleCurrentValue = Util.escapeHTML(auxItem.titleCurrentValue);
+
+											buffer.push(Lang.sub(TPL_VOCABULARY_LIST, auxItem));
+										}
+									);
+
+									buffer.push('</ul>');
+
+									vocabularyList.html(buffer.join(STR_EMPTY));
+
+									var firstVocabulary = A.one(instance._vocabularyItemSelector);
+
+									if (firstVocabulary) {
+										instance._selectedVocabularyName = instance._getVocabularyName(firstVocabulary);
+										instance._selectedVocabularyId = instance._getVocabularyId(firstVocabulary);
+									}
+
+									Util.toggleDisabled(instance._addCategoryButton, !firstVocabulary);
+								}
+								else {
+									vocabularyList.html(STR_EMPTY);
+
+									instance._showVocabularyMessage();
+								}
+
+								if (callback) {
+									callback();
+								}
+							}
+						);
+					},
+
+					_displayVocabularyCategories: function(vocabularyId, callback, renderMode) {
+						var instance = this;
+
+						var categoryMessages = A.one(SELECTOR_VOCABULARY_CATEGORY_MESSAGES);
+
+						if (categoryMessages) {
+							categoryMessages.hide();
+						}
+
+						instance._checkAllCategoriesCheckbox.attr(STR_CHECKED, false);
+
+						instance._vocabularyRootCategories = {};
+
+						if (renderMode == MODE_RENDER_FLAT) {
+							instance._getVocabularyCategoriesFlat(
+								vocabularyId,
+								function(response) {
+									instance._displayCategoriesFlatView(response.categories, callback);
+								}
+							);
+						}
+						else {
+							instance._getVocabularyCategoriesTree(
+								vocabularyId,
+								function(response) {
+									var categories = instance._formatJSONResult(response);
+
+									instance._displayCategoriesTreeView(categories);
+								}
+							);
+						}
+					},
+
+					_displayCategoriesFlatView: function(categories, callback) {
+						var instance = this;
+
+						instance._createCategoryFlatView(categories);
+
+						if (callback) {
+							callback();
+						}
+					},
+
+					_filterCategory: function(categories, parentCategoryId) {
+						var instance = this;
+
+						var filteredCategories = [];
+
+						if (Lang.isArray(categories)) {
+							filteredCategories = AArray.filter(
+								categories,
+								function(item, index, collection) {
+									return (item.parentCategoryId == parentCategoryId);
+								}
+							);
+						}
+
+						return filteredCategories;
+					},
+
+					_focusVocabularyPanelAdd: function() {
+						var instance = this;
+
+						var inputVocabularyAddNameNode = instance._inputVocabularyAddNameNode || instance._vocabularyFormAdd.one(SELECTOR_VOCABULARY_NAME_INPUT);
+
+						Util.focusFormField(inputVocabularyAddNameNode);
+					},
+
+					_formatRequestData: function(treeNode) {
+						var instance = this;
+
+						var data = {
+							p_auth: Liferay.authToken
+						};
+
+						var assetId = instance._getTreeNodeId(treeNode, REGEX_TREE_NODE_ID);
+
+						var assetType = instance._getTreeNodeId(treeNode, REGEX_TREE_NODE_TYPE);
+
+						if (Lang.isValue(assetId)) {
+							if (assetType == 'category') {
+								data.categoryId = assetId;
+							}
+							else {
+								data.vocabularyId = instance._selectedVocabularyId;
+							}
+						}
+
+						return data;
+					},
+
+					_formatJSONResult: function(json) {
+						var instance = this;
+
+						return AArray.map(
+							json,
+							function(item, index, collection) {
+								var checked = false;
+
+								if (item.parentCategoryId == 0) {
+									instance._vocabularyRootCategories[item.categoryId] = 1;
+								}
+
+								var paginatorConfig = {
+									limit: 10,
+									moreResultsLabel: Liferay.Language.get('load-more-results'),
+									offsetParam: 'start',
+									total: item.childrenCount
+								};
+
+								return {
+									after: {
+										childrenChange: function(event) {
+											var target = event.target;
+
+											target.set('alwaysShowHitArea', (event.newVal.length > 0));
+										}
+									},
+									alwaysShowHitArea: item.hasChildren,
+									id: STR_CATEGORY_NODE + item.categoryId,
+									io: {
+										cfg: {
+											data: A.bind('_formatRequestData', instance)
+										},
+										formatter: A.bind('_formatJSONResult', instance),
+										url: themeDisplay.getPathMain() + '/asset/get_categories'
+									},
+									label: Liferay.Util.escapeHTML(item.titleCurrentValue),
+									paginator: paginatorConfig,
+									type: 'check',
+									on: {
+										checkedChange: function(event) {
+											if (event.newVal) {
+												instance._toggleAllVocabularies(false);
+											}
+										},
+										select: function(event) {
+											var categoryId = instance._getCategoryId(event.target);
+
+											instance._showCategoryViewContainer(categoryId);
+										}
+									}
+								};
+							}
+						);
+					},
+
+					_getCategory: function(categoryId) {
+						var instance = this;
+
+						var categoryNode = instance._categoriesContainer.one('#' + STR_CATEGORY_NODE + categoryId);
+
+						var category = categoryNode.getData('tree-node');
+
+						if (!A.instanceOf(category, A.TreeNode)) {
+							category = categoryNode;
+						}
+
+						return category;
+					},
+
+					_getCategoryId: function(node) {
+						var instance = this;
+
+						var categoryId = STR_EMPTY;
+
+						if (node) {
+							var nodeId = node.get(ID) || STR_EMPTY;
+
+							categoryId = nodeId.replace(STR_CATEGORY_NODE, STR_EMPTY);
+
+							if (Lang.isGuid(categoryId)) {
+								categoryId = STR_EMPTY;
+							}
+						}
+
+						return categoryId;
+					},
+
+					_getIOCategory: function(action) {
+						var instance = this;
+
+						var ioCategory = instance._ioCategory[action];
+
+						if (!ioCategory) {
+							ioCategory = A.io.request(
+								null,
+								{
+									autoLoad: false,
+									dataType: 'json',
+									on: {
+										success: function(event, id, obj) {
+											var response = this.get(STR_RESPONSE_DATA);
+
+											instance._onCategoryAddSuccess(response, action);
+										},
+										failure: function(event, id, obj) {
+											instance._onCategoryAddFailure(obj);
+										}
+									}
+								}
+							);
+
+							instance._ioCategory[action] = ioCategory;
+						}
+
+						return ioCategory;
+					},
+
+					_getIOCategoryDetails: function() {
+						var instance = this;
+
+						var ioCategoryDetails = instance._ioCategoryDetails;
+
+						if (!ioCategoryDetails) {
+							ioCategoryDetails = A.io.request(
+								null,
+								{
+									autoLoad: false,
+									dataType: 'html',
+									on: {
+										success: function(event, id, obj) {
+											var response = this.get(STR_RESPONSE_DATA);
+
+											instance._onCategoryViewSuccess(response);
+										},
+										failure: function(event, id, obj) {
+											instance._onCategoryViewFailure(obj);
+										}
+									}
+								}
+							);
+
+							instance._ioCategoryDetails = ioCategoryDetails;
+						}
+
+						return ioCategoryDetails;
+					},
+
+					_getIOCategoryUpdate: function() {
+						var instance = this;
+
+						var ioCategoryUpdate = instance._ioCategoryUpdate;
+
+						if (!ioCategoryUpdate) {
+							ioCategoryUpdate = A.io.request(
+								null,
+								{
+									arguments: {},
+									autoLoad: false,
+									dataType: 'json',
+									on: {
+										success: function(event, id, obj, args) {
+											var response = this.get(STR_RESPONSE_DATA);
+
+											instance._onCategoryMoveSuccess(response, args.success);
+										},
+										failure: function(event, id, obj) {
+											instance._onCategoryMoveFailure(obj);
+										}
+									}
+								}
+							);
+
+							instance._ioCategoryUpdate = ioCategoryUpdate;
+						}
+
+						return ioCategoryUpdate;
+					},
+
+					_getIOVocabulary: function() {
+						var instance = this;
+
+						var ioVocabulary = instance._ioVocabulary;
+
+						if (!ioVocabulary) {
+							ioVocabulary = A.io.request(
+								null,
+								{
+									autoLoad: false,
+									dataType: 'json',
+									on: {
+										success: function(event, id, obj) {
+											var response = this.get(STR_RESPONSE_DATA);
+
+											instance._onVocabularyAddSuccess(response);
+										},
+										failure: function(event, id, obj) {
+											instance._onVocabularyAddFailure(obj);
+										}
+									}
+								}
+							);
+
+							instance._ioVocabulary = ioVocabulary;
+						}
+
+						return ioVocabulary;
+					},
+
+					_getParentCategoryId: function(node) {
+						var instance = this;
+
+						var categoryId = STR_EMPTY;
+
+						var parentNode = node.get(STR_PARENT_NODE);
+
+						if (parentNode) {
+							categoryId = instance._getCategoryId(parentNode);
+						}
+
+						return categoryId;
+					},
+
+					_getSelectedCategories: function() {
+						var instance = this;
+
+						var selectedCategories = {};
+
+						var categoriesTreeView = instance._categoriesTreeView;
+
+						if (categoriesTreeView) {
+							categoriesTreeView.eachChildren(
+								function(child) {
+									if (child.isChecked()) {
+										var categoryId = instance._getCategoryId(child);
+
+										selectedCategories[categoryId] = child.get(STR_LABEL);
+									}
+								},
+								true
+							);
+						}
+						else {
+							var categoryIds = instance._categoriesContainer.all('.category-item-check:checked').attr(DATA_CATEGORY_ID);
+
+							selectedCategories = instance._createItemNameMap(categoryIds, A.bind('_getCategory', instance), 'get', STR_TITLE);
+						}
+
+						return selectedCategories;
+					},
+
+					_getSelectedVocabularies: function() {
+						var instance = this;
+
+						var vocabularyIds = A.all('.vocabulary-item-check:checked').attr(DATA_VOCABULARY_ID);
+
+						return instance._createItemNameMap(vocabularyIds, instance._getVocabulary, 'attr', DATA_VOCABULARY);
+					},
+
+					_getTreeNodeId: function(treeNode, regex) {
+						var instance = this;
+
+						var treeId = treeNode.get(ID);
+
+						var match = treeId.match(regex);
+
+						return match && match[1];
+					},
+
+					_getVocabularyById: function(vocabularyId) {
+						var instance = this;
+
+						return AArray.find(
+							instance._vocabularies,
+							function(item, index, collection) {
+								return (vocabularyId == item.vocabularyId);
+							}
+						);
+					},
+
+					_getVocabularyCategoriesCount: function(vocabularies, vocabularyId) {
+						var instance = this;
+
+						var categoriesCount;
+
+						vocabularyId = toInt(vocabularyId);
+
+						A.some(
+							vocabularies,
+							function(item, index, collection) {
+								if (item.vocabularyId === vocabularyId) {
+									categoriesCount = item.categoriesCount;
+
+									return true;
+								}
+							}
+						);
+
+						return categoriesCount;
+					},
+
+					_getVocabulariesPagination: function() {
+						var instance = this;
+
+						var vocabulariesPagination = instance._vocabulariesPagination;
+
+						if (!vocabulariesPagination) {
+							var originalConfig = instance._originalConfig;
+
+							var config = {
+								boundingBox: '.vocabularies-pagination',
+								circular: false,
+								visible: false
+							};
+
+							var paginationMap = instance._getVocabulariesPaginationMap();
+
+							AObject.each(
+								paginationMap,
+								function(item, index, collection) {
+									config[index] = Number(HistoryManager.get(item.historyEntry)) || item.defaultValue;
+								}
+							);
+
+							vocabulariesPagination = new A.Pagination(config).render();
+
+							vocabulariesPagination.after('changeRequest', instance._afterVocabulariesPaginationChangeRequest, instance);
+
+							instance._vocabulariesPagination = vocabulariesPagination;
+						}
+
+						return vocabulariesPagination;
+					},
+
+					_getVocabulariesPaginationMap: function() {
+						var instance = this;
+
+						var paginationMap = instance._paginationMap;
+
+						if (!paginationMap) {
+							paginationMap = {
+								page: {
+									historyEntry: instance._prefixedPortletId + STR_PAGE,
+									defaultValue: 1,
+									formatter: Number
+								},
+								rowsPerPage: {
+									historyEntry: instance._prefixedPortletId + STR_ROWS_PER_PAGE,
+									defaultValue: instance._originalConfig.itemsPerPage,
+									formatter: Number
+								}
+							};
+
+							instance._paginationMap = paginationMap;
+						}
+
+						return paginationMap;
+					},
+
+					_getVocabularies: function(callback) {
+						var instance = this;
+
+						var pagination = instance._getVocabulariesPagination();
+
+						var config = instance._originalConfig;
+
+						var itemsPerPage = config.itemsPerPage;
+
+						var currentPage = 0;
+
+						var query = instance._liveSearch.get(STR_QUERY);
+
+						if (!instance._restartSearch) {
+							currentPage = pagination.get(STR_PAGE);
+
+							if (!currentPage) {
+								var paginationMap = instance._getVocabulariesPaginationMap();
+
+								currentPage = paginationMap[STR_PAGE].defaultValue;
+							}
+
+							currentPage -= 1;
+						}
+
+						var start = currentPage * itemsPerPage;
+						var end = start + itemsPerPage;
+
+						var parentGroupId = themeDisplay.getParentGroupId();
+
+						Liferay.Service(
+							{
+								'$display = /assetvocabulary/get-group-vocabularies-display': {
+									groupId: parentGroupId,
+									name: query,
+									start: start,
+									end: end,
+									addDefaultVocabulary: true,
+									obc: null,
+									'vocabularies.$categoriesCount = /assetcategory/get-vocabulary-root-categories-count': {
+										groupId: parentGroupId,
+										'@vocabularyId': '$display.vocabularies.vocabularyId'
+									}
+								}
+							},
+							function(result) {
+								var total = result.total;
+
+								instance._restartSearch = false;
+
+								pagination.set('total', Math.ceil(total / itemsPerPage));
+								pagination.set('visible', (total > itemsPerPage));
+
+								pagination.setState(result);
+
+								if (callback) {
+									callback.apply(instance, arguments);
+								}
+							}
+						);
+					},
+
+					_getVocabulary: function(vocabularyId) {
+						var instance = this;
+
+						return A.one('li[data-vocabularyId="' + vocabularyId + '"]');
+					},
+
+					_getVocabularyCategoriesFlat: function(vocabularyId, callback) {
+						var instance = this;
+
+						instance._showLoading(instance._categoryContainerSelector);
+
+						var defaultParams = {
+							vocabularyId: vocabularyId,
+							start: -1,
+							end: -1,
+							obc: null
+						};
+
+						var query = instance._liveSearch.get(STR_QUERY);
+
+						var params = defaultParams;
+
+						if (query && instance._searchType.val() != STR_VOCABULARIES) {
+							params = A.mix(
+								{
+									groupId: themeDisplay.getSiteGroupId(),
+									name: Lang.sub(TPL_SEARCH_QUERY, [query])
+								},
+								defaultParams
+							);
+						}
+
+						Liferay.Service('/assetcategory/get-json-vocabulary-categories', params, callback);
+					},
+
+					_getVocabularyCategoriesTree: function(vocabularyId, callback) {
+						var instance = this;
+
+						A.io.request(
+							themeDisplay.getPathMain() + '/asset/get_categories',
+							{
+								data: {
+									end: 10,
+									p_auth: Liferay.authToken,
+									start: 0,
+									vocabularyId: vocabularyId
+								},
+								dataType: 'json',
+								on: {
+									success: function(event) {
+										callback(this.get(STR_RESPONSE_DATA));
+									}
+								}
+							}
+						);
+					},
+
+					_getVocabularyId: function(exp) {
+						var instance = this;
+
+						return A.one(exp).attr(DATA_VOCABULARY_ID);
+					},
+
+					_getVocabularyName: function(exp) {
+						var instance = this;
+
+						return A.one(exp).attr(DATA_VOCABULARY);
+					},
+
+					_hideAllMessages: function() {
+						var instance = this;
+
+						instance._container.one('.lfr-message-response').hide();
+					},
+
+					_hideFloatingPanels: function(event) {
+						var instance = this;
+
+						instance._processAutoFieldsTriggers(event, instance._resetInputLocalized);
+					},
+
+					_hideMessage: function(container) {
+						var instance = this;
+
+						container = container || instance._portletMessageContainer;
+
+						container.hide();
+					},
+
+					_hideSection: function(node) {
+						var instance = this;
+
+						if (node) {
+							node.previous().replaceClass(CSS_COLUMN_WIDTH_CATEGORY, CSS_COLUMN_WIDTH_CATEGORY_FULL);
+							node.hide();
+						}
+					},
+
+					_hidePanels: function() {
+						var instance = this;
+
+						if (instance._categoryPanelAdd) {
+							instance._categoryPanelAdd.hide();
+						}
+
+						if (instance._vocabularyPanelAdd) {
+							instance._vocabularyPanelAdd.hide();
+						}
+
+						if (instance._panelEdit) {
+							instance._panelEdit.hide();
+						}
+
+						if (instance._panelPermissionsChange) {
+							instance._panelPermissionsChange.hide();
+						}
+					},
+
+					_hideVocabularyMessage: function() {
+						A.one(SELECTOR_VOCABULARY_MESSAGES).hide();
+					},
+
+					_initializeCategoryPanelAdd: function(action) {
+						var instance = this;
+
+						var categoryFormAdd = instance._categoryPanelAdd.get(STR_CONTENT_BOX).one(SELECTOR_UPDATE_CATEGORY_FORM);
+
+						categoryFormAdd.detach(EVENT_SUBMIT);
+
+						categoryFormAdd.on(EVENT_SUBMIT, instance._onCategoryFormSubmit, instance, categoryFormAdd, action);
+
+						var closeButton = categoryFormAdd.one(SELECTOR_BUTTON_CANCEL);
+
+						closeButton.on(EVENT_CLICK, instance._onCategoryAddButtonClose, instance);
+
+						instance._categoryFormAdd = categoryFormAdd;
+
+						instance._loadVocabularySelect(instance._vocabularies, instance._selectedVocabularyId);
+					},
+
+					_initializeCategoryPanelEdit: function() {
+						var instance = this;
+
+						var categoryFormEdit = instance._panelEdit.get(STR_CONTENT_BOX).one(SELECTOR_UPDATE_CATEGORY_FORM);
+
+						categoryFormEdit.detach(EVENT_SUBMIT);
+
+						categoryFormEdit.on(EVENT_SUBMIT, instance._onCategoryFormSubmit, instance, categoryFormEdit, ACTION_EDIT);
+
+						var closeButton = categoryFormEdit.one(SELECTOR_BUTTON_CANCEL);
+
+						closeButton.on(
+							EVENT_CLICK,
+							function(event, panel) {
+								panel.hide();
+							},
+							instance,
+							instance._panelEdit
+						);
+
+						var buttonDeleteCategory = categoryFormEdit.one('#deleteCategoryButton');
+
+						if (buttonDeleteCategory) {
+							buttonDeleteCategory.on(EVENT_CLICK, instance._onCategoryDelete, instance);
+						}
+
+						var buttonChangeCategoryPermissions = categoryFormEdit.one('#updateCategoryPermissions');
+
+						if (buttonChangeCategoryPermissions) {
+							buttonChangeCategoryPermissions.on(EVENT_CLICK, instance._onChangePermissions, instance);
+						}
+
+						var inputCategoryNameNode = categoryFormEdit.one(SELECTOR_CATEGORY_NAME_INPUT);
+
+						Util.focusFormField(inputCategoryNameNode);
+					},
+
+					_initializeVocabularyPanelAdd: function(callback) {
+						var instance = this;
+
+						var vocabularyFormAdd = instance._vocabularyPanelAdd.get(STR_CONTENT_BOX).one(SELECTOR_UPDATE_VOCABULARY_FORM);
+
+						vocabularyFormAdd.detach(EVENT_SUBMIT);
+
+						vocabularyFormAdd.on(EVENT_SUBMIT, instance._onVocabularyFormSubmit, instance, vocabularyFormAdd);
+
+						var closeButton = vocabularyFormAdd.one(SELECTOR_BUTTON_CANCEL);
+
+						closeButton.on(
+							EVENT_CLICK,
+							function(event, panel) {
+								panel.hide();
+							},
+							instance,
+							instance._vocabularyPanelAdd
+						);
+
+						instance._vocabularyFormAdd = vocabularyFormAdd;
+
+						if (callback) {
+							callback.call(instance);
+						}
+					},
+
+					_initializeVocabularyPanelEdit: function() {
+						var instance = this;
+
+						var vocabularyFormEdit = instance._panelEdit.get(STR_CONTENT_BOX).one(SELECTOR_UPDATE_VOCABULARY_FORM);
+
+						vocabularyFormEdit.detach(EVENT_SUBMIT);
+
+						vocabularyFormEdit.on(EVENT_SUBMIT, instance._onVocabularyFormSubmit, instance, vocabularyFormEdit);
+
+						var closeButton = vocabularyFormEdit.one(SELECTOR_BUTTON_CANCEL);
+
+						closeButton.on(
+							EVENT_CLICK,
+							function(event, panel) {
+								panel.hide();
+							},
+							instance,
+							instance._panelEdit
+						);
+
+						var buttonDeleteVocabulary = vocabularyFormEdit.one('#deleteVocabularyButton');
+
+						if (buttonDeleteVocabulary) {
+							buttonDeleteVocabulary.on(EVENT_CLICK, instance._onVocabularyDelete, instance);
+						}
+
+						var buttonChangeVocabularyPermissions = vocabularyFormEdit.one('#vocabulary-change-permissions');
+
+						if (buttonChangeVocabularyPermissions) {
+							buttonChangeVocabularyPermissions.on(EVENT_CLICK, instance._onChangePermissions, instance);
+						}
+
+						var inputVocabularyEditNameNode = vocabularyFormEdit.one(SELECTOR_VOCABULARY_NAME_INPUT);
+
+						Util.focusFormField(inputVocabularyEditNameNode);
+					},
+
+					_loadData: function() {
+						var instance = this;
+
+						instance._closeEditSection();
+
+						instance._checkAllVocabulariesCheckbox.attr(STR_CHECKED, false);
+
+						instance._displayList(
+							function() {
+								var selectedVocabularyId = instance._selectedVocabularyId;
+
+								if (selectedVocabularyId) {
+									instance._displayVocabularyCategories(instance._selectedVocabularyId);
+								}
+								else {
+									instance._categoriesContainer.empty();
+
+									instance._showCateroryMessage();
+								}
+							}
+						);
+					},
+
+					_loadPermissions: function(url) {
+						var instance = this;
+
+						var panelPermissionsChange = instance._panelPermissionsChange;
+
+						if (!instance._panelPermissionsChange) {
+							panelPermissionsChange = instance._createPanelPermissions();
+						}
+
+						panelPermissionsChange.show();
+
+						panelPermissionsChange.iframe.set(STR_URI, url);
+
+						panelPermissionsChange._syncUIPosAlign();
+
+						if (instance._panelEdit) {
+							var zIndex = toInt(instance._panelEdit.get(STR_ZINDEX)) + 2;
+
+							panelPermissionsChange.set(STR_ZINDEX, zIndex);
+						}
+					},
+
+					_loadVocabularySelect: function(vocabularies, selectedVocabularyId) {
+						var instance = this;
+
+						if (instance._categoryFormAdd) {
+							var selectNode = instance._categoryFormAdd.one(SELECTOR_VOCABULARY_SELECT_LIST);
+
+							if (selectNode) {
+								selectedVocabularyId = toInt(selectedVocabularyId);
+
+								selectNode.empty();
+
+								var buffer = [];
+
+								var selectedVocabularyIndex;
+
+								A.each(
+									vocabularies,
+									function(item, index, collection) {
+										if (item.vocabularyId === selectedVocabularyId) {
+											selectedVocabularyIndex = index;
+										}
+
+										buffer.push(
+											Lang.sub(
+												TPL_VOCABULARY_OPTION,
+												{
+													selected: item.selected,
+													vocabularyId: item.vocabularyId,
+													titleCurrentValue: A.Escape.html(item.titleCurrentValue)
+												}
+											)
+										);
+									}
+								);
+
+								selectNode.append(buffer.join(STR_EMPTY));
+
+								selectNode.set('selectedIndex', selectedVocabularyIndex);
+							}
+						}
+					},
+
+					_merge: function(fromCategoryId, toCategoryId, vocabularyId) {
+						var instance = this;
+
+						vocabularyId = vocabularyId || instance._selectedVocabularyId;
+
+						instance._updateCategory(fromCategoryId, toCategoryId, vocabularyId);
+					},
+
+					_onCategoryAddFailure: function(response) {
+						var instance = this;
+
+						instance._sendMessage(MESSAGE_TYPE_ERROR, Liferay.Language.get('your-request-failed-to-complete'), SELECTOR_CATEGORY_MESSAGES_EDIT);
+					},
+
+					_onCategoryAddSuccess: function(response, action) {
+						var instance = this;
+
+						var exception = response.exception;
+
+						if (!exception && response.categoryId) {
+							var vocabulary = instance._getVocabularyById(instance._selectedVocabularyId);
+
+							if (action === ACTION_ADD && response.parentCategoryId === 0) {
+								vocabulary.categoriesCount++;
+							}
+
+							instance._sendMessage(MESSAGE_TYPE_SUCCESS, Liferay.Language.get('your-request-processed-successfully'));
+
+							instance._selectVocabulary(instance._selectedVocabularyId);
+
+							instance._displayVocabularyCategories(
+								instance._selectedVocabularyId,
+								function() {
+									instance._hideSection(instance._categoryViewContainer);
+								}
+							);
+
+							if (action === ACTION_EDIT) {
+								instance._showCategoryViewContainer(response.categoryId);
+							}
+
+							instance._hidePanels();
+						}
+						else {
+							var errorKey = STR_EMPTY;
+
+							if	(exception.indexOf('AssetCategoryException') > -1) {
+								errorKey = Liferay.Language.get('one-of-your-fields-contains-invalid-characters');
+							}
+							else if (exception.indexOf('CategoryNameException') > -1) {
+								errorKey = Liferay.Language.get('please-enter-a-valid-category-name');
+							}
+							else if ((exception.indexOf('CategoryPropertyKeyException') > -1) ||
+									(exception.indexOf('CategoryPropertyValueException') > -1)) {
+
+								errorKey = Liferay.Language.get('one-of-your-property-fields-contains-invalid-characters');
+							}
+							else if (exception.indexOf('DuplicateCategoryException') > -1) {
+								errorKey = Liferay.Language.get('that-category-already-exists');
+							}
+							else if (exception.indexOf(EXCEPTION_NO_SUCH_VOCABULARY) > -1) {
+								errorKey = Liferay.Language.get('that-vocabulary-does-not-exist');
+							}
+							else if (exception.indexOf(EXCEPTION_PRINCIPAL) > -1) {
+								errorKey = Liferay.Language.get('you-do-not-have-permission-to-access-the-requested-resource');
+							}
+							else {
+								errorKey = Liferay.Language.get('your-request-failed-to-complete');
+							}
+
+							instance._sendMessage(MESSAGE_TYPE_ERROR, errorKey, SELECTOR_CATEGORY_MESSAGES_EDIT);
+						}
+					},
+
+					_onCategoryAddButtonClose: function(event) {
+						var instance = this;
+
+						instance._categoryPanelAdd.hide();
+					},
+
+					_onCategoryDelete: function(event) {
+						var instance = this;
+
+						if (confirm(Liferay.Language.get('are-you-sure-you-want-to-delete-this-category'))) {
+							instance._deleteCategory(
+								instance._selectedCategoryId,
+								A.bind('_processCategoryDeletion', instance, instance._selectedVocabularyId, [instance._selectedCategoryId])
+							);
+						}
+					},
+
+					_onCategoryFormSubmit: function(event, form, action) {
+						var instance = this;
+
+						event.halt();
+
+						var vocabularySelectNode = A.one(SELECTOR_VOCABULARY_SELECT_LIST);
+
+						var vocabularyId = (vocabularySelectNode && vocabularySelectNode.val()) || instance._selectedVocabularyId;
+
+						if (vocabularyId) {
+							var vocabularyElId = '#' + instance._prefixedPortletId + STR_VOCABULARY_ID;
+
+							form.one(vocabularyElId).val(vocabularyId);
+
+							var parentCategoryElId = '#' + instance._prefixedPortletId + 'parentCategoryId';
+
+							var parentCategoryId = instance._selectedParentCategoryId;
+
+							if (action == ACTION_ADD) {
+								parentCategoryId = 0;
+							}
+							else if (action == ACTION_ADD_SUBCATEGORY) {
+								parentCategoryId = instance._selectedCategoryId;
+							}
+
+							form.one(parentCategoryElId).val(parentCategoryId);
+
+							Liferay.fire(
+								EVENT_SAVE_AUTO_FIELDS,
+								{
+									form: form
+								}
+							);
+
+							instance._addCategory(form, action);
+						}
+					},
+
+					_onCategoryMoveFailure: function(event) {
+						var instance = this;
+
+						instance._sendMessage(MESSAGE_TYPE_ERROR, Liferay.Language.get('your-request-failed-to-complete'));
+					},
+
+					_onCategoryMoveSuccess: function(response, vocabularyId) {
+						var instance = this;
+
+						var exception = response.exception;
+
+						if (!exception) {
+							instance._closeEditSection();
+							instance._sendMessage(MESSAGE_TYPE_SUCCESS, Liferay.Language.get('your-request-processed-successfully'));
+
+							instance._selectVocabulary(vocabularyId);
+						}
+						else {
+							var errorKey;
+
+							if (exception.indexOf('AssetCategoryNameException') > -1) {
+								errorKey = Liferay.Language.get('please-enter-a-valid-category-name');
+							}
+							else if (exception.indexOf('DuplicateCategoryException') > -1) {
+								errorKey = Liferay.Language.get('there-is-another-category-with-the-same-name-and-the-same-parent');
+							}
+							else if (exception.indexOf(EXCEPTION_NO_SUCH_VOCABULARY) > -1) {
+								errorKey = Liferay.Language.get('that-vocabulary-does-not-exist');
+							}
+							else if (exception.indexOf('NoSuchCategoryException') > -1) {
+								errorKey = Liferay.Language.get('that-parent-category-does-not-exist');
+							}
+							else if (exception.indexOf(EXCEPTION_PRINCIPAL) > -1) {
+								errorKey = Liferay.Language.get('you-do-not-have-permission-to-access-the-requested-resource');
+							}
+							else if (exception.indexOf('Exception') > -1) {
+								errorKey = Liferay.Language.get('one-of-your-fields-contains-invalid-characters');
+							}
+							else {
+								errorKey = Liferay.Language.get('your-request-failed-to-complete');
+							}
+
+							instance._sendMessage(MESSAGE_TYPE_ERROR, errorKey);
+						}
+					},
+
+					_onCategorySearchClick: function(event) {
+						var instance = this;
+
+						var categoryItem = event.target.ancestor(SELECTOR_CATEGORY_ITEM);
+
+						instance._unselectAllCategories();
+
+						categoryItem.addClass(STR_SELECTED);
+
+						Util.checkAllBox(event.container, CSS_CATEGORY_ITEM_CHECK, instance._checkAllCategoriesCheckbox);
+
+						instance._toggleAllVocabularies(false);
+
+						var categoryId = instance._getCategoryId(categoryItem);
+
+						if (categoryId) {
+							instance._showCategoryViewContainer(categoryId);
+						}
+					},
+
+					_onCategoryViewContainerClick: function(event) {
+						var instance = this;
+
+						var targetId = event.target.get(ID);
+
+						if (targetId == 'editCategoryButton') {
+							event.halt();
+
+							instance._hidePanels();
+							instance._showCategoryPanel(ACTION_EDIT);
+						}
+						else if (targetId == 'deleteCategoryButton') {
+							event.halt();
+
+							instance._onCategoryDelete();
+						}
+						else if (targetId == 'updateCategoryPermissions') {
+							event.halt();
+
+							instance._onChangePermissions(event);
+						}
+						else if (targetId == 'addSubCategoryButton') {
+							event.halt();
+
+							instance._hidePanels();
+							instance._showCategoryPanel(ACTION_ADD_SUBCATEGORY);
+						}
+					},
+
+					_onCategoryViewFailure: function(response) {
+						var instance = this;
+
+						instance._sendMessage(MESSAGE_TYPE_ERROR, Liferay.Language.get('your-request-failed-to-complete'));
+					},
+
+					_onCategoryViewSuccess: function(response) {
+						var instance = this;
+
+						instance._categoryViewContainer.html(response);
+					},
+
+					_onChangePermissions: function(event) {
+						var instance = this;
+
+						var url = event.target.attr(DATA_CATEGORY_URL) || event.currentTarget.attr(DATA_CATEGORY_URL);
+
+						instance._loadPermissions(url);
+					},
+
+					_onDragDrop: function(event) {
+						var instance = this;
+
+						var dragNode = event.drag.get(STR_NODE);
+						var dropNode = event.drop.get(STR_NODE);
+
+						var node = dragNode.getData('tree-node');
+
+						var vocabularyId = dropNode.attr('data-vocabularyid');
+						var fromCategoryId = instance._getCategoryId(node);
+
+						instance._merge(fromCategoryId, 0, vocabularyId);
+
+						dropNode.removeClass(CSS_ACTIVE_AREA);
+					},
+
+					_onSearchInputKeyDown: function(event) {
+						if (event.isKey('ENTER')) {
+							event.halt();
+						}
+					},
+
+					_onSearchTypeChange: function(event) {
+						var instance = this;
+
+						var searchInput = instance._searchInput;
+
+						if (searchInput.val()) {
+							instance._processSearch();
+						}
+						else {
+							searchInput.focus();
+						}
+					},
+
+					_onShowCategoryPanel: function(event, action) {
+						var instance = this;
+
+						instance._hidePanels();
+
+						instance._showCategoryPanel(action);
+					},
+
+					_onShowVocabularyPanel: function(event, action) {
+						var instance = this;
+
+						instance._hidePanels();
+
+						instance._showVocabularyPanel(action);
+					},
+
+					_onStateChange: function(event) {
+						var instance = this;
+
+						var changed = event.changed;
+						var removed = event.removed;
+
+						var paginationState = {};
+
+						var paginationMap = instance._getVocabulariesPaginationMap();
+
+						AObject.each(
+							paginationMap,
+							function(item, index, collection) {
+								var historyEntry = item.historyEntry;
+
+								var value;
+
+								if (owns(changed, historyEntry)) {
+									value = item.formatter(changed[historyEntry].newVal);
+								}
+								else if (owns(removed, historyEntry)) {
+									value = item.defaultValue;
+								}
+
+								if (value) {
+									paginationState[index] = value;
+								}
+							}
+						);
+
+						if (!AObject.isEmpty(paginationState)) {
+							instance._vocabulariesPagination.setState(paginationState);
+
+							instance._loadData();
+						}
+					},
+
+					_onVocabularyAddFailure: function(response) {
+						var instance = this;
+
+						instance._sendMessage(MESSAGE_TYPE_ERROR, Liferay.Language.get('your-request-failed-to-complete'), SELECTOR_VOCABULARY_MESSAGES_EDIT);
+					},
+
+					_onVocabularyAddSuccess: function(response) {
+						var instance = this;
+
+						instance._hideAllMessages();
+
+						var exception = response.exception;
+
+						if (!response.exception) {
+							instance._sendMessage(MESSAGE_TYPE_SUCCESS, Liferay.Language.get('your-request-processed-successfully'));
+
+							instance._displayList(
+								function() {
+									var vocabulary = instance._selectVocabulary(response.vocabularyId);
+
+									instance._displayVocabularyCategories(instance._selectedVocabularyId);
+
+									if (vocabulary) {
+										var scrollTop = vocabulary.get('region').top;
+
+										A.one(instance._vocabularyListSelector).set('scrollTop', scrollTop);
+									}
+								}
+							);
+
+							instance._hidePanels();
+						}
+						else {
+							var errorKey = STR_EMPTY;
+
+							if (exception.indexOf('DuplicateVocabularyException') > -1) {
+								errorKey = Liferay.Language.get('that-vocabulary-already-exists');
+							}
+							else if (exception.indexOf(EXCEPTION_VOCABULARY_NAME) > -1) {
+								errorKey = Liferay.Language.get('one-of-your-fields-contains-invalid-characters');
+							}
+							else if (exception.indexOf(EXCEPTION_NO_SUCH_VOCABULARY) > -1) {
+								errorKey = Liferay.Language.get('that-parent-vocabulary-does-not-exist');
+							}
+							else if (exception.indexOf(EXCEPTION_PRINCIPAL) > -1) {
+								errorKey = Liferay.Language.get('you-do-not-have-permission-to-access-the-requested-resource');
+							}
+							else {
+								errorKey = Liferay.Language.get('your-request-failed-to-complete');
+							}
+
+							instance._sendMessage(MESSAGE_TYPE_ERROR, errorKey, SELECTOR_VOCABULARY_MESSAGES_EDIT);
+						}
+					},
+
+					_onVocabularyDelete: function() {
+						var instance = this;
+
+						if (confirm(Liferay.Language.get('are-you-sure-you-want-to-delete-this-vocabulary'))) {
+							instance._deleteVocabulary(instance._selectedVocabularyId, instance._processVocabularyDeletion);
+						}
+					},
+
+					_onVocabularyFormSubmit: function(event, form) {
+						var instance = this;
+
+						event.halt();
+
+						Liferay.fire(
+							EVENT_SAVE_AUTO_FIELDS,
+							{
+								form: form
+							}
+						);
+
+						instance._addVocabulary(form);
+					},
+
+					_onVocabularyListClick: function(event) {
+						var instance = this;
+
+						instance._onVocabularyListSelect(event);
+
+						var target = event.target;
+
+						if (target.hasClass(CSS_VOCABULARY_ITEM_CHECK)) {
+							Util.checkAllBox(event.currentTarget, CSS_VOCABULARY_ITEM_CHECK, instance._checkAllVocabulariesCheckbox);
+
+							instance._toggleAllCategories(false);
+						}
+						else if (event.target.hasClass('vocabulary-item-actions-trigger')) {
+							instance._showVocabularyPanel(ACTION_EDIT);
+						}
+					},
+
+					_onVocabularyListSelect: function(event) {
+						var instance = this;
+
+						var vocabularyId = instance._getVocabularyId(event.target);
+
+						instance._selectVocabulary(vocabularyId);
+					},
+
+					_processAutoFieldsTriggers: function(event, callback) {
+						var instance = this;
+
+						var contextPanel = event.currentTarget;
+
+						var boundingBox = contextPanel.get(STR_BOUNDING_BOX);
+
+						var autoFieldsTriggers = boundingBox.all(SELECTOR_FLOATING_TRIGGER);
+
+						autoFieldsTriggers.each(
+							function(item, index, collection) {
+								var autoFieldsInstance = item.getData(STR_AUTO_FIELDS_INSTANCE);
+
+								callback.call(instance, autoFieldsInstance);
+							}
+						);
+					},
+
+					_processCategoryDeletion: function() {
+						var instance = this;
+
+						var categoryIds = arguments[1];
+						var vocabularyId = arguments[0];
+
+						var exception;
+						var result;
+
+						var argsLength = arguments.length;
+
+						if (argsLength > 2) {
+							result = arguments[2];
+
+							if (argsLength > 3) {
+								exception = arguments[2];
+								result = arguments[3];
+							}
+						}
+
+						var vocabulary = instance._getVocabularyById(vocabularyId);
+
+						if (!exception) {
+							var errorVocabularies = {};
+
+							AObject.each(
+								result,
+								function(item, index, collection) {
+									errorVocabularies[toInt(item.categoryId)] = true;
+								}
+							);
+
+							var deletedRootCategories = AArray.filter(
+								categoryIds,
+								function(item, index, collection) {
+									var categoryId = item;
+
+									var rootVocabulary = (instance._vocabularyRootCategories[categoryId] === 1);
+
+									var deletedVocabulary = !errorVocabularies[categoryId];
+
+									var deletedRootCategory = (rootVocabulary && deletedVocabulary);
+
+									if (deletedRootCategory) {
+										instance._vocabularyRootCategories[categoryId] = null;
+									}
+
+									return deletedRootCategory;
+								}
+							);
+
+							vocabulary.categoriesCount -= deletedRootCategories.length;
+
+							instance._closeEditSection();
+							instance._hidePanels();
+							instance._displayVocabularyCategories(instance._selectedVocabularyId);
+
+							if (Lang.isArray(result) && result.length > 0) {
+								var alertMessage = instance._createAlertMessage(result, instance._selectedCategories, STR_CATEGORY_ID);
+
+								instance._sendMessage(MESSAGE_TYPE_ALERT, alertMessage);
+							}
+							else {
+								instance._sendMessage(MESSAGE_TYPE_SUCCESS, Liferay.Language.get('your-request-processed-successfully'));
+							}
+						}
+						else {
+							var errorMessage = Liferay.Language.get('your-request-failed-to-complete');
+
+							if (exception.indexOf(EXCEPTION_PRINCIPAL) > -1) {
+								errorMessage = Liferay.Language.get('you-do-not-have-permission-to-access-the-requested-resource');
+							}
+
+							instance._sendMessage(MESSAGE_TYPE_ERROR, errorMessage);
+						}
+					},
+
+					_processSearch: function() {
+						var instance = this;
+
+						instance._restartSearch = true;
+
+						if (!instance._liveSearch.get(STR_QUERY) || instance._searchType.val() == STR_VOCABULARIES) {
+							instance._selectedVocabularyId = null;
+
+							instance._loadData();
+						}
+						else if (instance._selectedVocabularyId) {
+							instance._closeEditSection();
+
+							instance._displayVocabularyCategories(instance._selectedVocabularyId, null, MODE_RENDER_FLAT);
+						}
+					},
+
+					_processVocabularyDeletion: function() {
+						var instance = this;
+
+						var exception;
+
+						var result = arguments[0];
+
+						if (arguments.length > 1) {
+							exception = arguments[0];
+							result = arguments[1];
+						}
+
+						if (!exception) {
+							instance._closeEditSection();
+							instance._hidePanels();
+							instance._loadData();
+
+							if (Lang.isArray(result) && result.length > 0) {
+								var alertMessage = instance._createAlertMessage(result, instance._selectedVocabularies, STR_VOCABULARY_ID);
+
+								instance._sendMessage(MESSAGE_TYPE_ALERT, alertMessage);
+							}
+							else {
+								instance._sendMessage(MESSAGE_TYPE_SUCCESS, Liferay.Language.get('your-request-processed-successfully'));
+							}
+						}
+						else {
+							var errorKey;
+
+							if (exception.indexOf(EXCEPTION_PRINCIPAL) > -1) {
+								errorKey = Liferay.Language.get('you-do-not-have-permission-to-access-the-requested-resource');
+							}
+							else {
+								errorKey = Liferay.Language.get('your-request-failed-to-complete');
+							}
+
+							instance._sendMessage(MESSAGE_TYPE_ERROR, errorKey);
+						}
+					},
+
+					_resetCategoriesProperties: function(event) {
+						var instance = this;
+
+						var contextPanel = event.currentTarget;
+						var boundingBox = contextPanel.get(STR_BOUNDING_BOX);
+
+						var namespace = instance._prefixedPortletId;
+
+						var propertiesTrigger = boundingBox.one('fieldset#' + namespace + 'categoryProperties');
+
+						var autoFieldsInstance = propertiesTrigger.getData(STR_AUTO_FIELDS_INSTANCE);
+
+						autoFieldsInstance.reset();
+					},
+
+					_resetInputLocalized: function(autoFieldsInstance) {
+						var instance = this;
+
+						if (autoFieldsInstance) {
+							autoFieldsInstance.reset();
+						}
+					},
+
+					_selectCategory: function(categoryId) {
+						var instance = this;
+
+						var category = instance._getCategory(categoryId);
+						var parentCategoryId = instance._getParentCategoryId(category);
+
+						instance._selectedCategoryId = categoryId;
+						instance._selectedParentCategoryId = parentCategoryId || 0;
+
+						instance._selectedCategory = category;
+
+						return category;
+					},
+
+					_selectCurrentVocabulary: function(value) {
+						var instance = this;
+
+						var option = A.one('select.vocabulary-select-list option[value="' + value + '"]');
+
+						if (option) {
+							option.set(STR_SELECTED, true);
+						}
+					},
+
+					_selectVocabulary: function(vocabularyId) {
+						var instance = this;
+
+						var vocabulary = instance._getVocabulary(vocabularyId);
+
+						if (vocabulary) {
+							var vocabularyName = instance._getVocabularyName(vocabulary);
+
+							if (vocabulary.hasClass(STR_SELECTED)) {
+								return vocabulary;
+							}
+
+							instance._hideAllMessages();
+							instance._selectedVocabularyName = vocabularyName;
+							instance._selectedVocabularyId = vocabularyId;
+							instance._selectCurrentVocabulary(vocabularyId);
+
+							instance._unselectAllVocabularies();
+							instance._closeEditSection();
+
+							vocabulary.addClass(STR_SELECTED);
+
+							instance._displayVocabularyCategories(instance._selectedVocabularyId);
+						}
+
+						return vocabulary;
+					},
+
+					_sendMessage: function(type, message, container) {
+						var instance = this;
+
+						var output = A.one(container || instance._portletMessageContainer);
+						var typeClass = 'alert alert-' + type;
+
+						output.removeClass(CSS_MESSAGE_ERROR).removeClass(CSS_MESSAGE_SUCCESS);
+						output.addClass(typeClass);
+						output.html(message);
+
+						output.show();
+
+						instance._hideMessageTask(output);
+					},
+
+					_showCateroryMessage: function(message, className) {
+						var categoryMessages = A.one(SELECTOR_VOCABULARY_CATEGORY_MESSAGES);
+
+						className = className || 'alert alert-info';
+
+						message = message || Liferay.Language.get('there-are-no-categories');
+
+						categoryMessages.set('className', CSS_MESSAGE_RESPONSE + STR_SPACE + className);
+
+						categoryMessages.html(message);
+
+						categoryMessages.show();
+					},
+
+					_showCategoryPanel: function(action) {
+						var instance = this;
+
+						if (action == ACTION_ADD || action == ACTION_ADD_SUBCATEGORY) {
+							instance._showCategoryPanelAdd(action);
+						}
+						else if (action == ACTION_EDIT) {
+							instance._showCategoryPanelEdit();
+						}
+						else {
+							throw 'Internal error. No default action specified.';
+						}
+					},
+
+					_showCategoryPanelAdd: function(action) {
+						var instance = this;
+
+						var categoryPanelAdd = instance._categoryPanelAdd;
+
+						var categoryURL = instance._createURL(CATEGORY, action, LIFECYCLE_RENDER);
+
+						if (!categoryPanelAdd) {
+							categoryPanelAdd = instance._createCategoryPanelAdd();
+
+							categoryPanelAdd.plug(
+								A.Plugin.IO,
+								{
+									autoLoad: false,
+									uri: categoryURL.toString()
+								}
+							);
+						}
+						else if (instance._currentCategoryPanelAddIOHandle) {
+							instance._currentCategoryPanelAddIOHandle.detach();
+
+							categoryPanelAdd.io.set(STR_URI, categoryURL.toString());
+						}
+
+						categoryPanelAdd.show();
+
+						categoryPanelAdd._syncUIPosAlign();
+
+						instance._currentCategoryPanelAddIOHandle = categoryPanelAdd.io.after(
+							STR_SUCCESS,
+							A.bind('_initializeCategoryPanelAdd', instance, action)
+						);
+
+						categoryPanelAdd.io.start();
+					},
+
+					_showCategoryPanelEdit: function() {
+						var instance = this;
+
+						var forceStart = false;
+						var categoryPanelEdit = instance._panelEdit;
+
+						if (!categoryPanelEdit) {
+							categoryPanelEdit = instance._createPanelEdit();
+						}
+						else {
+							forceStart = true;
+
+							instance._currentPanelEditIOHandle.detach();
+						}
+
+						categoryPanelEdit.titleNode.html(Liferay.Language.get('edit-category'));
+
+						var categoryEditURL = instance._createURL(CATEGORY, ACTION_EDIT, LIFECYCLE_RENDER);
+
+						categoryPanelEdit.show();
+
+						categoryPanelEdit._syncUIPosAlign();
+
+						categoryPanelEdit.plug(
+							A.Plugin.IO,
+							{
+								uri: categoryEditURL.toString(),
+								after: {
+									success: instance._currentPanelEditInitListener
+								}
+							}
+						);
+
+						instance._currentPanelEditIOHandle = categoryPanelEdit.io.after(STR_SUCCESS, instance._initializeCategoryPanelEdit, instance);
+
+						if (forceStart) {
+							categoryPanelEdit.io.start();
+						}
+					},
+
+					_showCategoryViewContainer: function(categoryId) {
+						var instance = this;
+
+						var viewContainer = instance._categoryViewContainer;
+
+						instance._selectCategory(categoryId);
+
+						instance._showLoading(viewContainer);
+						instance._showSection(instance._categoryViewSection);
+
+						var categoryURL = instance._createURL(CATEGORY, ACTION_VIEW, LIFECYCLE_RENDER);
+
+						var ioCategoryDetails = instance._getIOCategoryDetails();
+
+						ioCategoryDetails.set(STR_URI, categoryURL.toString()).start();
+					},
+
+					_showLoading: function(container) {
+						var instance = this;
+
+						A.all(container).html('<div class="loading-animation" />');
+					},
+
+					_showSection: function(node) {
+						var instance = this;
+
+						node.previous().replaceClass(CSS_COLUMN_WIDTH_CATEGORY_FULL, CSS_COLUMN_WIDTH_CATEGORY);
+
+						node.show();
+
+						var firstInput = node.one('input');
+
+						if (firstInput) {
+							firstInput.focus();
+						}
+					},
+
+					_showVocabularyMessage: function(message, className) {
+						var vocabularyMessages = A.one(SELECTOR_VOCABULARY_MESSAGES);
+
+						className = className || 'alert alert-info';
+
+						message = message || Liferay.Language.get('there-are-no-vocabularies');
+
+						vocabularyMessages.set('className', CSS_MESSAGE_RESPONSE + STR_SPACE + className);
+
+						vocabularyMessages.html(message);
+
+						vocabularyMessages.show();
+					},
+
+					_showVocabularyPanel: function(action) {
+						var instance = this;
+
+						if (action == ACTION_ADD) {
+							instance._showVocabularyPanelAdd();
+						}
+						else if (action == ACTION_EDIT) {
+							instance._showVocabularyPanelEdit();
+						}
+						else {
+							throw 'Internal error. No default action specified.';
+						}
+					},
+
+					_showVocabularyPanelAdd: function() {
+						var instance = this;
+
+						var vocabularyPanelAdd = instance._vocabularyPanelAdd;
+
+						if (!vocabularyPanelAdd) {
+							vocabularyPanelAdd = instance._createVocabularyPanelAdd();
+
+							var vocabularyURL = instance._createURL(TYPE_VOCABULARY, ACTION_ADD, LIFECYCLE_RENDER);
+
+							vocabularyPanelAdd.show();
+
+							vocabularyPanelAdd._syncUIPosAlign();
+
+							var afterSuccess = A.bind('_initializeVocabularyPanelAdd', instance, instance._focusVocabularyPanelAdd);
+
+							vocabularyPanelAdd.plug(
+								A.Plugin.IO,
+								{
+									uri: vocabularyURL.toString(),
+									after: {
+										success: afterSuccess
+									}
+								}
+							);
+						}
+						else {
+							vocabularyPanelAdd.show();
+
+							vocabularyPanelAdd._syncUIPosAlign();
+
+							instance._focusVocabularyPanelAdd();
+						}
+					},
+
+					_showVocabularyPanelEdit: function() {
+						var instance = this;
+
+						var forceStart = false;
+						var vocabularyPanelEdit = instance._panelEdit;
+
+						if (!vocabularyPanelEdit) {
+							vocabularyPanelEdit = instance._createPanelEdit();
+						}
+						else {
+							forceStart = true;
+
+							instance._currentPanelEditIOHandle.detach();
+						}
+
+						vocabularyPanelEdit.titleNode.html(Liferay.Language.get('edit-vocabulary'));
+
+						var vocabularyEditURL = instance._createURL(TYPE_VOCABULARY, ACTION_EDIT, LIFECYCLE_RENDER);
+
+						vocabularyPanelEdit.show();
+
+						vocabularyPanelEdit._syncUIPosAlign();
+
+						vocabularyPanelEdit.plug(
+							A.Plugin.IO,
+							{
+								uri: vocabularyEditURL.toString()
+							}
+						);
+
+						instance._currentPanelEditIOHandle = vocabularyPanelEdit.io.after(STR_SUCCESS, instance._initializeVocabularyPanelEdit, instance);
+
+						if (forceStart) {
+							vocabularyPanelEdit.io.start();
+						}
+					},
+
+					_toggleAllCategoriesFn: function(state) {
+						var instance = this;
+
+						var categoriesTreeView = instance._categoriesTreeView;
+
+						instance._checkAllCategoriesCheckbox.attr(STR_CHECKED, state);
+
+						if (categoriesTreeView) {
+							categoriesTreeView.eachChildren(
+								function(child) {
+									if (state) {
+										child.check();
+									}
+									else {
+										child.uncheck();
+									}
+								},
+								true
+							);
+						}
+						else {
+							instance._categoriesContainer.all('.category-item-check').attr(STR_CHECKED, state);
+						}
+					},
+
+					_toggleAllVocabulariesFn: function(state) {
+						var instance = this;
+
+						if (state === true) {
+							instance._toggleAllCategories(false);
+						}
+
+						instance._checkAllVocabulariesCheckbox.attr(STR_CHECKED, state);
+
+						A.all('.vocabulary-item-check').attr(STR_CHECKED, state);
+					},
+
+					_unselectAllCategories: function() {
+						var instance = this;
+
+						A.all(instance._categoryItemSelectorFlat).removeClass(STR_SELECTED);
+					},
+
+					_unselectAllVocabularies: function() {
+						var instance = this;
+
+						A.all(instance._vocabularyItemSelector).removeClass(STR_SELECTED);
+					},
+
+					_updateCategory: function(categoryId, parentCategoryId, vocabularyId) {
+						var instance = this;
+
+						var moveURL = instance._createURL(CATEGORY, ACTION_MOVE, LIFECYCLE_ACTION);
+
+						var prefix = instance._prefixedPortletId;
+
+						var data = prefix + 'categoryId=' + categoryId + '&' +
+									prefix + 'parentCategoryId=' + parentCategoryId + '&' +
+									prefix + 'vocabularyId=' + vocabularyId;
+
+						var ioCategoryUpdate = instance._getIOCategoryUpdate();
+
+						ioCategoryUpdate.set('data', data);
+						ioCategoryUpdate.set(STR_URI, moveURL.toString());
+
+						ioCategoryUpdate.set('arguments.success', vocabularyId);
+
+						ioCategoryUpdate.start();
+					},
+
+					_categoryItemSelectorFlat: '.category-item',
+					_categoryContainerSelector: '.vocabulary-categories',
+					_selectedCategories: null,
+					_selectedVocabularies: null,
+					_selectedVocabulary: null,
+					_selectedVocabularyId: null,
+					_selectedVocabularyName: null,
+					_vocabularies: null,
+					_vocabularyItemSelector: '.vocabulary-list li',
+					_vocabularyListSelector: '.vocabulary-list'
+				}
+			}
+		);
+
+		var CategoriesTree = A.Component.create(
+			{
+				NAME: 'CategoriesTree',
+
+				EXTENDS: A.TreeViewDD,
+
+				prototype: {
+					reinsertChild: function(dragNode, dropNode) {
+						var instance = this;
+
+						var categoryName = dragNode.get(STR_LABEL);
+
+						dropNode.removeChild(dragNode);
+
+						var children = dropNode.get('children');
+
+						if (children.length) {
+							var result;
+
+							var method = 'insertBefore';
+
+							AArray.some(
+								children,
+								function(item, index, collection) {
+									if (item.get(STR_LABEL) > categoryName) {
+										result = item;
+									}
+									else {
+										var nextItem = collection[index + 1];
+
+										if (!nextItem) {
+											result = item;
+
+											method = 'insertAfter';
+										}
+										else if (nextItem.get(STR_LABEL) > categoryName) {
+											result = nextItem;
+										}
+									}
+
+									return result;
+								}
+							);
+
+							if (result) {
+								result[method](dragNode);
+							}
+						}
+						else {
+							dropNode.appendChild(dragNode);
+						}
+					},
+
+					_findCategoryByName: function(event) {
+						var instance = this;
+
+						var result = false;
+
+						var dragNode = event.drag.get(STR_NODE).get(STR_PARENT_NODE);
+
+						var dragTreeNode = dragNode.getData(STR_TREE_NODE);
+
+						if (dragTreeNode) {
+							var categoryName = dragTreeNode.get(STR_LABEL);
+
+							var dropAction = instance.dropAction;
+
+							var dropNode = event.drop.get(STR_NODE).get(STR_PARENT_NODE);
+
+							if (dropAction !== 'append') {
+								dropNode = dropNode.get('parentNode.parentNode');
+							}
+
+							var dropTreeNode = dropNode.getData(STR_TREE_NODE);
+
+							if (!A.instanceOf(dropTreeNode, A.TreeNode)) {
+								dropTreeNode = dropNode.getData(STR_TREE_VIEW);
+							}
+
+							if (dropTreeNode) {
+								var children = dropTreeNode.get('children');
+
+								result = A.some(
+									children,
+									function(item, index, collection) {
+										return (item.get(STR_LABEL) === categoryName);
+									}
+								);
+							}
+						}
+
+						return result;
+					},
+
+					_onDropHit: function(event) {
+						var instance = this;
+
+						if (instance._findCategoryByName(event)) {
+							var dragNode = event.drag.get(STR_NODE).get(STR_PARENT_NODE);
+							var dropNode = event.drop.get(STR_NODE).get(STR_PARENT_NODE);
+
+							var dropTreeNode = dropNode.getData(STR_TREE_NODE);
+							var dragTreeNode = dragNode.getData(STR_TREE_NODE);
+
+							var output = instance.getEventOutputMap(instance);
+
+							output.tree.dropNode = dropTreeNode;
+							output.tree.dragNode = dragTreeNode;
+
+							instance.bubbleEvent('dropFailed', output);
+
+							event.halt();
+
+							instance._resetState(instance.nodeContent);
+						}
+						else {
+							CategoriesTree.superclass._onDropHit.apply(instance, arguments);
+						}
+					},
+
+					_updateNodeState: function(event) {
+						var instance = this;
+
+						var dropNode = event.drop.get(STR_NODE);
+
+						if (dropNode && dropNode.hasClass('vocabulary-category')) {
+							instance._appendState(dropNode);
+						}
+						else {
+							CategoriesTree.superclass._updateNodeState.apply(instance, arguments);
+						}
+					}
+				}
+			}
+		);
+
+		var LiveSearch = A.Component.create(
+			{
+				AUGMENTS: [A.AutoCompleteBase],
+				EXTENDS: A.Base,
+				NAME: 'livesearch',
+				prototype: {
+					initializer: function() {
+						this._bindUIACBase();
+						this._syncUIACBase();
+					}
+				}
+			}
+		);
+
+		Liferay.Portlet.AssetCategoryAdmin = AssetCategoryAdmin;
+	},
+	'',
+	{
+		requires: ['aui-dialog-iframe-deprecated', 'aui-io-plugin-deprecated', 'aui-live-search-deprecated', 'aui-modal', 'aui-pagination', 'autocomplete-base', 'aui-tree-view', 'dd', 'escape', 'json', 'liferay-form', 'liferay-history-manager', 'liferay-portlet-url', 'liferay-util-window']
+	}
+);
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/view.jsp
new file mode 100644
index 0000000..6ed3c3f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/view.jsp
@@ -0,0 +1,101 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_category_admin/init.jsp" %>
+
+<aui:form name="fm">
+	<aui:nav-bar>
+		<aui:nav>
+			<c:if test="<%= AssetPermission.contains(permissionChecker, themeDisplay.getSiteGroupId(), ActionKeys.ADD_VOCABULARY) %>">
+				<aui:nav-item id="addVocabularyButton" label="add-vocabulary" />
+			</c:if>
+
+			<c:if test="<%= AssetPermission.contains(permissionChecker, themeDisplay.getSiteGroupId(), ActionKeys.ADD_CATEGORY) %>">
+				<aui:nav-item disabled="<%= true %>" id="addCategoryButton" label="add-category" />
+			</c:if>
+
+			<c:if test="<%= AssetPermission.contains(permissionChecker, themeDisplay.getSiteGroupId(), ActionKeys.PERMISSIONS) && GroupPermissionUtil.contains(permissionChecker, themeDisplay.getSiteGroupId(), ActionKeys.PERMISSIONS) %>">
+				<liferay-security:permissionsURL
+					modelResource="com.liferay.portlet.asset"
+					modelResourceDescription="<%= themeDisplay.getScopeGroupName() %>"
+					resourcePrimKey="<%= String.valueOf(themeDisplay.getSiteGroupId()) %>"
+					var="permissionsURL"
+					windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+				/>
+
+				<aui:nav-item data-url="<%= permissionsURL %>" id="categoryPermissionsButton" label="permissions" />
+			</c:if>
+
+			<aui:nav-item dropdown="<%= true %>" label="actions">
+				<aui:nav-item iconCssClass="icon-remove" id="deleteSelectedItems" label="delete" />
+			</aui:nav-item>
+		</aui:nav>
+
+		<aui:nav-bar-search cssClass="pull-right">
+			<aui:select cssClass="categories-admin-select-search" label="" name="categoriesAdminSelectSearch">
+				<aui:option label="categories" />
+				<aui:option label="vocabularies" selected="<%= true %>" />
+			</aui:select>
+
+			<liferay-ui:input-search cssClass="form-search" id="categoriesAdminSearchInput" name="tagsAdminSearchInput" showButton="<%= false %>" />
+		</aui:nav-bar-search>
+	</aui:nav-bar>
+
+	<aui:row cssClass="categories-admin-content">
+		<aui:col cssClass="vocabulary-list-container" width="<%= 25 %>">
+			<span class="select-vocabularies-container">
+				<aui:input cssClass="select-vocabularies" inline="<%= true %>" label="" name="checkAllVocabularies" title='<%= LanguageUtil.get(pageContext, "check-all-vocabularies") %>' type="checkbox" />
+			</span>
+
+			<h3 class="vocabularies-header"><%= LanguageUtil.get(pageContext, "vocabularies") %></h3>
+
+					<div class="unstyled vocabulary-message"></div>
+
+					<div class="unstyled vocabulary-list"></div>
+
+			<div class="vocabularies-pagination"></div>
+		</aui:col>
+
+		<aui:col cssClass="vocabulary-categories-container" width="<%= 40 %>">
+			<span class="select-vocabularies-container">
+				<aui:input cssClass="select-categories" inline="<%= true %>" label="" name="checkAllCategories" title='<%= LanguageUtil.get(pageContext, "check-all-categories") %>' type="checkbox" />
+			</span>
+
+			<h3 class="categories-header"><%= LanguageUtil.get(pageContext, "categories") %></h3>
+
+			<div class="vocabulary-categories"></div>
+		</aui:col>
+
+		<aui:col cssClass="hide vocabulary-edit-category" width="<%= 35 %>">
+			<h3><%= LanguageUtil.get(pageContext, "category-details") %></h3>
+
+			<aui:button cssClass="category-view-close close" icon="icon-remove" />
+
+			<div class="category-view"></div>
+		</aui:col>
+	</aui:row>
+</aui:form>
+
+<aui:script use="liferay-category-admin">
+	new Liferay.Portlet.AssetCategoryAdmin(
+		{
+			baseActionURL: '<%= PortletURLFactoryUtil.create(request, portletDisplay.getId(), themeDisplay.getPlid(), PortletRequest.ACTION_PHASE) %>',
+			baseRenderURL: '<%= PortletURLFactoryUtil.create(request, portletDisplay.getId(), themeDisplay.getPlid(), PortletRequest.RENDER_PHASE) %>',
+			itemsPerPage: <%= SearchContainer.DEFAULT_DELTA %>,
+			portletId: '<%= portletDisplay.getId() %>'
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/view_category.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/view_category.jsp
new file mode 100644
index 0000000..5bea186
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_category_admin/view_category.jsp
@@ -0,0 +1,81 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_category_admin/init.jsp" %>
+
+<%
+long categoryId = ParamUtil.getLong(request, "categoryId");
+
+AssetCategory category = AssetCategoryServiceUtil.getCategory(categoryId);
+
+List<AssetCategoryProperty> categoryProperties = AssetCategoryPropertyServiceUtil.getCategoryProperties(category.getCategoryId());
+%>
+
+<div class="view-category">
+	<liferay-ui:header
+		localizeTitle="<%= false %>"
+		title="<%= category.getTitle(locale) %>"
+	/>
+
+	<c:if test="<%= category != null %>">
+		<c:if test="<%= AssetCategoryPermission.contains(permissionChecker, category, ActionKeys.UPDATE) %>">
+			<aui:button id="editCategoryButton" value="edit" />
+		</c:if>
+
+		<c:if test="<%= AssetCategoryPermission.contains(permissionChecker, category, ActionKeys.DELETE) %>">
+			<aui:button id="deleteCategoryButton" value="delete" />
+		</c:if>
+
+		<c:if test="<%= AssetCategoryPermission.contains(permissionChecker, category, ActionKeys.PERMISSIONS) %>">
+			<liferay-security:permissionsURL
+				modelResource="<%= AssetCategory.class.getName() %>"
+				modelResourceDescription="<%= category.getTitle(locale) %>"
+				resourcePrimKey="<%= String.valueOf(category.getCategoryId()) %>"
+				var="permissionsURL"
+				windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+			/>
+
+			<aui:button data-url="<%= permissionsURL %>" id="updateCategoryPermissions" value="permissions" />
+		</c:if>
+
+		<c:if test="<%= AssetCategoryPermission.contains(permissionChecker, category, ActionKeys.ADD_CATEGORY) %>">
+			<aui:button id="addSubCategoryButton" value="add-subcategory" />
+		</c:if>
+	</c:if>
+
+	<c:if test="<%= Validator.isNotNull(category.getDescription(locale)) %>">
+		<div class="category-field">
+			<label><liferay-ui:message key="description" />:</label> <%= HtmlUtil.escape(category.getDescription(locale)) %>
+		</div>
+	</c:if>
+
+	<c:if test="<%= !categoryProperties.isEmpty() %>">
+		<div class="category-field">
+			<label><liferay-ui:message key="properties" />:</label>
+
+			<%
+			for (AssetCategoryProperty categoryProperty : categoryProperties) {
+			%>
+
+				<span class="property-key"><%= categoryProperty.getKey() %></span>: <span class="property-value"><%= categoryProperty.getValue() %></span><br />
+
+			<%
+			}
+			%>
+
+		</div>
+	</c:if>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/add_asset.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/add_asset.jspf
new file mode 100644
index 0000000..4bbc502
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/add_asset.jspf
@@ -0,0 +1,133 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<c:if test="<%= !addPortletURLs.isEmpty() %>">
+
+	<%
+	String taglibId = "addNew";
+
+	if (groupIds.length > 1) {
+		taglibId = taglibId.concat("In");
+
+		if (themeDisplay.getCompanyGroupId() == groupId) {
+			taglibId = taglibId.concat("Global");
+		}
+		else {
+			Group group = GroupLocalServiceUtil.getGroup(groupId);
+
+			if (group.isLayout()) {
+				Layout scopeLayout = LayoutLocalServiceUtil.getLayout(group.getClassPK());
+
+				String friendlyURL = scopeLayout.getFriendlyURL();
+
+				taglibId = taglibId.concat(friendlyURL.substring(1));
+			}
+			else {
+				String friendlyURL = group.getFriendlyURL();
+
+				taglibId = taglibId.concat(friendlyURL.substring(1));
+			}
+		}
+	}
+	%>
+
+	<aui:nav-bar>
+		<aui:nav>
+			<c:choose>
+				<c:when test="<%= addPortletURLs.size() == 1 %>">
+
+					<%
+					Set<Map.Entry<String, PortletURL>> addPortletURLsSet = addPortletURLs.entrySet();
+
+					Iterator<Map.Entry<String, PortletURL>> iterator = addPortletURLsSet.iterator();
+
+					Map.Entry<String, PortletURL> entry = iterator.next();
+
+					String message = _getMessage(entry.getKey(), addPortletURLs, locale);
+					%>
+
+					<aui:nav-item
+						href="<%= _getURL(groupId, plid, entry.getValue(), message, defaultAssetPublisher, layout, pageContext, liferayPortletResponse) %>"
+						iconCssClass="icon-file"
+						label='<%= LanguageUtil.format(pageContext, "add-x", HtmlUtil.escape(message)) %>'
+					/>
+				</c:when>
+				<c:otherwise>
+					<aui:nav-item
+						dropdown="<%= true %>"
+						iconCssClass="icon-plus"
+						label='<%= LanguageUtil.format(pageContext, (groupIds.length == 1) ? "add-new" : "add-new-in-x", new Object[] {HtmlUtil.escape((GroupLocalServiceUtil.getGroup(groupId)).getDescriptiveName(locale))}) %>'
+					>
+
+						<%
+						for (Map.Entry<String, PortletURL> entry : addPortletURLs.entrySet()) {
+							String message = _getMessage(entry.getKey(), addPortletURLs, locale);
+						%>
+
+							<aui:nav-item
+								href="<%= _getURL(groupId, plid, entry.getValue(), message, defaultAssetPublisher, layout, pageContext, liferayPortletResponse) %>"
+								iconCssClass="icon-file"
+								label="<%= HtmlUtil.escape(message) %>"
+							/>
+
+						<%
+						}
+						%>
+
+					</aui:nav-item>
+				</c:otherwise>
+			</c:choose>
+		</aui:nav>
+	</aui:nav-bar>
+</c:if>
+
+<%!
+private String _getMessage(String className, Map<String, PortletURL> addPortletURLs, Locale locale) {
+	String message = null;
+
+	int pos = className.indexOf(AssetUtil.CLASSNAME_SEPARATOR);
+
+	if (pos != -1) {
+		message = className.substring(pos + AssetUtil.CLASSNAME_SEPARATOR.length());
+
+		className = className.substring(0, pos);
+	}
+
+	AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(className);
+
+	if (pos == -1) {
+		message = assetRendererFactory.getTypeName(locale, AssetUtil.hasSubtype(className, addPortletURLs));
+	}
+
+	return message;
+}
+
+private String _getURL(long groupId, long plid, PortletURL addPortletURL, String message, boolean defaultAssetPublisher, Layout layout, PageContext pageContext, LiferayPortletResponse liferayPortletResponse) {
+	addPortletURL.setParameter("groupId", String.valueOf(groupId));
+	addPortletURL.setParameter("showHeader", Boolean.FALSE.toString());
+
+	String addPortletURLString = addPortletURL.toString();
+
+	addPortletURLString = HttpUtil.addParameter(addPortletURLString, "doAsGroupId", groupId);
+	addPortletURLString = HttpUtil.addParameter(addPortletURLString, "refererPlid", plid);
+
+	if (defaultAssetPublisher) {
+		addPortletURLString = HttpUtil.addParameter(addPortletURLString, "layoutUuid", layout.getUuid());
+	}
+
+	return "javascript:Liferay.Util.openWindow({dialog: {destroyOnHide: true}, id: '" + liferayPortletResponse.getNamespace() + "editAsset', title: '" + HtmlUtil.escapeJS(LanguageUtil.format(pageContext, "new-x", HtmlUtil.escape(message))) + "', uri: '" + HtmlUtil.escapeJS(addPortletURLString) + "'});";
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/add_asset_redirect.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/add_asset_redirect.jsp
new file mode 100644
index 0000000..30709e7
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/add_asset_redirect.jsp
@@ -0,0 +1,44 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_publisher/init.jsp" %>
+
+<%
+String redirect = request.getParameter("redirect");
+
+redirect = PortalUtil.escapeRedirect(redirect);
+
+Portlet selPortlet = PortletLocalServiceUtil.getPortletById(company.getCompanyId(), portletDisplay.getId());
+%>
+
+<aui:script use="aui-base">
+	Liferay.fire(
+		'closeWindow',
+		{
+			id: '<portlet:namespace />editAsset',
+			portletAjaxable: <%= selPortlet.isAjaxable() %>,
+
+			<c:choose>
+				<c:when test="<%= redirect != null %>">
+					redirect: '<%= HtmlUtil.escapeJS(redirect) %>'
+				</c:when>
+				<c:otherwise>
+					refresh: '<%= portletDisplay.getId() %>'
+				</c:otherwise>
+			</c:choose>
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/asset_actions.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/asset_actions.jsp
new file mode 100644
index 0000000..ef3cc31
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/asset_actions.jsp
@@ -0,0 +1,62 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_publisher/init.jsp" %>
+
+<%
+boolean showIconLabel = ((Boolean)request.getAttribute("view.jsp-showIconLabel")).booleanValue();
+
+AssetRenderer assetRenderer = (AssetRenderer)request.getAttribute("view.jsp-assetRenderer");
+
+boolean showEditURL = ParamUtil.getBoolean(request, "showEditURL", true);
+
+PortletURL editPortletURL = null;
+
+if (showEditURL && assetRenderer.hasEditPermission(permissionChecker)) {
+	PortletURL redirectURL = liferayPortletResponse.createLiferayPortletURL(plid, portletDisplay.getId(), PortletRequest.RENDER_PHASE, false);
+
+	redirectURL.setParameter("struts_action", "/asset_publisher/add_asset_redirect");
+
+	String fullContentRedirect = (String)request.getAttribute("view.jsp-fullContentRedirect");
+
+	if (fullContentRedirect != null) {
+		redirectURL.setParameter("redirect", fullContentRedirect);
+	}
+	else {
+		redirectURL.setParameter("redirect", currentURL);
+	}
+
+	redirectURL.setWindowState(LiferayWindowState.POP_UP);
+
+	editPortletURL = assetRenderer.getURLEdit(liferayPortletRequest, liferayPortletResponse, LiferayWindowState.POP_UP, redirectURL);
+}
+%>
+
+<c:if test="<%= editPortletURL != null %>">
+	<div class="lfr-meta-actions asset-actions">
+
+		<%
+		String taglibEditURL = "javascript:Liferay.Util.openWindow({id: '" + renderResponse.getNamespace() + "editAsset', title: '" + LanguageUtil.format(pageContext, "edit-x", HtmlUtil.escape(assetRenderer.getTitle(locale))) + "', uri:'" + HtmlUtil.escapeURL(editPortletURL.toString()) + "'});";
+		%>
+
+		<liferay-ui:icon
+			image="edit"
+			label="<%= showIconLabel %>"
+			message='<%= showIconLabel ? LanguageUtil.format(pageContext, "edit-x-x", new Object[] {"hide-accessible", HtmlUtil.escape(assetRenderer.getTitle(locale))}) : LanguageUtil.format(pageContext, "edit-x", HtmlUtil.escape(assetRenderer.getTitle(locale))) %>'
+			url="<%= taglibEditURL %>"
+		/>
+	</div>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/asset_export.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/asset_export.jspf
new file mode 100644
index 0000000..d30c354
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/asset_export.jspf
@@ -0,0 +1,40 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+exportAssetURL.setWindowState(LiferayWindowState.EXCLUSIVE);
+%>
+
+<liferay-ui:icon-list>
+
+	<%
+	for (String extension : extensions) {
+		exportAssetURL.setParameter("targetExtension", extension);
+	%>
+
+		<liferay-ui:icon
+			image='<%= "../file_system/small/" + extension %>'
+			label="<%= true %>"
+			message='<%= LanguageUtil.format(pageContext, "x-convert-x-to-x", new Object[] {"hide-accessible", assetRenderer.getTitle(locale), StringUtil.toUpperCase(extension)}) %>'
+			method="get"
+			url="<%= exportAssetURL.toString() %>"
+		/>
+
+	<%
+	}
+	%>
+
+</liferay-ui:icon-list>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/asset_html_metadata.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/asset_html_metadata.jsp
new file mode 100644
index 0000000..7d8a127
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/asset_html_metadata.jsp
@@ -0,0 +1,34 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_publisher/init.jsp" %>
+
+<%
+AssetEntry assetEntry = (AssetEntry)request.getAttribute("view.jsp-assetEntry");
+AssetRenderer assetRenderer = (AssetRenderer)request.getAttribute("view.jsp-assetRenderer");
+
+String title = (String)request.getAttribute("view.jsp-title");
+
+if (Validator.isNull(title)) {
+	title = assetRenderer.getTitle(locale);
+}
+
+String summary = StringUtil.shorten(assetRenderer.getSummary(locale), abstractLength);
+
+PortalUtil.setPageSubtitle(title, request);
+PortalUtil.setPageDescription(summary, request);
+PortalUtil.setPageKeywords(AssetUtil.getAssetKeywords(assetEntry.getClassName(), assetEntry.getClassPK()), request);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/asset_metadata.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/asset_metadata.jspf
new file mode 100644
index 0000000..370bdd0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/asset_metadata.jspf
@@ -0,0 +1,106 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+boolean previous = false;
+
+for (int j = 0; j < metadataFields.length; j++) {
+	String value = null;
+
+	if (metadataFields[j].equals("create-date")) {
+		value = dateFormatDate.format(assetEntry.getCreateDate());
+	}
+	else if (metadataFields[j].equals("modified-date")) {
+		value = dateFormatDate.format(assetEntry.getModifiedDate());
+	}
+	else if (metadataFields[j].equals("publish-date")) {
+		if (assetEntry.getPublishDate() == null) {
+			value = StringPool.BLANK;
+		}
+		else {
+			value = dateFormatDate.format(assetEntry.getPublishDate());
+		}
+	}
+	else if (metadataFields[j].equals("expiration-date")) {
+		if (assetEntry.getExpirationDate() == null) {
+			value = StringPool.BLANK;
+		}
+		else {
+			value = dateFormatDate.format(assetEntry.getExpirationDate());
+		}
+	}
+	else if (metadataFields[j].equals("priority")) {
+		value = LanguageUtil.get(pageContext, "priority") + StringPool.COLON + StringPool.SPACE + assetEntry.getPriority();
+	}
+	else if (metadataFields[j].equals("author")) {
+		String userName = PortalUtil.getUserName(assetRenderer.getUserId(), assetRenderer.getUserName());
+
+		value = LanguageUtil.get(pageContext, "by") + StringPool.SPACE + HtmlUtil.escape(userName);
+	}
+	else if (metadataFields[j].equals("view-count")) {
+		int viewCount = assetEntry.getViewCount();
+
+		value = viewCount + StringPool.SPACE + LanguageUtil.get(pageContext, (viewCount == 1) ? "view" : "views");
+	}
+	else if (metadataFields[j].equals("categories")) {
+		value = "categories";
+	}
+	else if (metadataFields[j].equals("tags")) {
+		value = "tags";
+	}
+
+	if (Validator.isNotNull(value)) {
+		boolean hasCategoriesOrTags = !(value.equals("categories") && assetEntry.getCategories().isEmpty()) && !(value.equals("tags") && assetEntry.getTags().isEmpty());
+
+		if (previous && hasCategoriesOrTags) {
+%>
+
+			<span class="vertical-separator"><!-- --></span>
+
+<%
+		}
+
+		if (previous || hasCategoriesOrTags) {
+			previous = true;
+		}
+%>
+
+		<span class="metadata-entry <%= "metadata-" + metadataFields[j] %>">
+			<c:choose>
+				<c:when test='<%= value.equals("categories") %>' >
+					<liferay-ui:asset-categories-summary
+						className="<%= assetEntry.getClassName() %>"
+						classPK="<%= assetEntry.getClassPK () %>"
+						portletURL="<%= renderResponse.createRenderURL() %>"
+					/>
+				</c:when>
+				<c:when test='<%= value.equals("tags") %>' >
+					<liferay-ui:asset-tags-summary
+						className="<%= assetEntry.getClassName() %>"
+						classPK="<%= assetEntry.getClassPK () %>"
+						portletURL="<%= renderResponse.createRenderURL() %>"
+					/>
+				</c:when>
+				<c:otherwise>
+					<%= value %>
+				</c:otherwise>
+			</c:choose>
+		</span>
+
+<%
+	}
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/asset_print.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/asset_print.jspf
new file mode 100644
index 0000000..5c2cd27
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/asset_print.jspf
@@ -0,0 +1,63 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+PortletURL printAssetURL = renderResponse.createRenderURL();
+
+printAssetURL.setParameter("struts_action", "/asset_publisher/view_content");
+printAssetURL.setParameter("assetEntryId", String.valueOf(assetEntry.getEntryId()));
+printAssetURL.setParameter("viewMode", Constants.PRINT);
+printAssetURL.setParameter("type", assetRendererFactory.getType());
+
+if (Validator.isNotNull(assetRenderer.getUrlTitle())) {
+	if (assetRenderer.getGroupId() != scopeGroupId) {
+		printAssetURL.setParameter("groupId", String.valueOf(assetRenderer.getGroupId()));
+	}
+
+	printAssetURL.setParameter("urlTitle", assetRenderer.getUrlTitle());
+}
+
+printAssetURL.setWindowState(LiferayWindowState.POP_UP);
+%>
+
+<c:choose>
+	<c:when test="<%= print %>">
+		<liferay-ui:icon
+			image="print"
+			label="<%= true %>"
+			message='<%= LanguageUtil.format(pageContext, "print-x-x", new Object[] {"hide-accessible", HtmlUtil.escape(assetRenderer.getTitle(locale))}) %>'
+			url="javascript:print();"
+		/>
+
+		<aui:script>
+			print();
+		</aui:script>
+	</c:when>
+	<c:otherwise>
+		<liferay-ui:icon
+			image="print"
+			label="<%= true %>"
+			message='<%= LanguageUtil.format(pageContext, "print-x-x", new Object[] {"hide-accessible", HtmlUtil.escape(assetRenderer.getTitle(locale))}) %>'
+			url='<%= "javascript:" + renderResponse.getNamespace() + "printPage_" + assetEntryIndex + "();" %>'
+		/>
+
+		<aui:script>
+			function <portlet:namespace />printPage_<%= assetEntryIndex %>() {
+				window.open('<%= printAssetURL %>', '', "directories=0,height=480,left=80,location=1,menubar=1,resizable=1,scrollbars=yes,status=0,toolbar=0,top=180,width=640");
+			}
+		</aui:script>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/asset_search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/asset_search.jsp
new file mode 100644
index 0000000..b9ae701
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/asset_search.jsp
@@ -0,0 +1,54 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_publisher/init.jsp" %>
+
+<%
+AssetSearch searchContainer = (AssetSearch)request.getAttribute("liferay-ui:search:searchContainer");
+
+AssetDisplayTerms displayTerms = (AssetDisplayTerms)searchContainer.getDisplayTerms();
+
+long[] selectedGroupIds = StringUtil.split(ParamUtil.getString(request, "selectedGroupIds"), 0L);
+%>
+
+<liferay-ui:search-toggle
+	buttonLabel="search"
+	displayTerms="<%= displayTerms %>"
+	id="toggle_id_asset_search"
+>
+	<aui:fieldset>
+		<aui:input name="<%= displayTerms.TITLE %>" size="20" type="text" value="<%= displayTerms.getTitle() %>" />
+
+		<aui:input name="<%= displayTerms.DESCRIPTION %>" size="20" type="text" value="<%= displayTerms.getDescription() %>" />
+
+		<aui:input name="<%= displayTerms.USER_NAME %>" size="20" type="text" value="<%= displayTerms.getUserName() %>" />
+
+		<aui:select label="my-sites" name="<%= displayTerms.GROUP_ID %>">
+
+			<%
+			for (long groupId : selectedGroupIds) {
+				Group group = GroupLocalServiceUtil.getGroup(groupId);
+			%>
+
+				<aui:option label="<%= HtmlUtil.escape(group.getDescriptiveName(locale)) %>" selected="<%= displayTerms.getGroupId() == groupId %>" value="<%= groupId %>" />
+
+			<%
+			}
+			%>
+
+		</aui:select>
+	</aui:fieldset>
+</liferay-ui:search-toggle>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/asset_search_results.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/asset_search_results.jspf
new file mode 100644
index 0000000..c08039d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/asset_search_results.jspf
@@ -0,0 +1,29 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+Hits hits = null;
+
+if (searchTerms.isAdvancedSearch()) {
+	hits = AssetEntryLocalServiceUtil.search(themeDisplay.getCompanyId(), new long[] {searchTerms.getGroupId()}, themeDisplay.getUserId(), assetRendererFactory.getClassName(), searchTerms.getUserName(), searchTerms.getTitle(), searchTerms.getDescription(), null, null, WorkflowConstants.STATUS_APPROVED, searchTerms.isAndOperator(), searchContainer.getStart(), searchContainer.getEnd());
+}
+else {
+	hits = AssetEntryLocalServiceUtil.search(themeDisplay.getCompanyId(), groupIds, themeDisplay.getUserId(), assetRendererFactory.getClassName(), searchTerms.getKeywords(), WorkflowConstants.STATUS_APPROVED, searchContainer.getStart(), searchContainer.getEnd());
+}
+
+searchContainer.setResults(ListUtil.fromArray(hits.getDocs()));
+searchContainer.setTotal(hits.getLength());
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/asset_selection_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/asset_selection_action.jsp
new file mode 100644
index 0000000..9066bc7
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/asset_selection_action.jsp
@@ -0,0 +1,92 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_publisher/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "backURL");
+
+redirect = ParamUtil.getString(request, "redirect");
+
+SearchContainer searchContainer = (SearchContainer)request.getAttribute("liferay-ui:search:searchContainer");
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+int assetEntryOrder = searchContainer.getStart() + row.getPos();
+
+boolean last = (assetEntryOrder == (searchContainer.getTotal() - 1));
+%>
+
+<c:choose>
+	<c:when test="<%= (assetEntryOrder == 0) && last %>">
+	</c:when>
+	<c:when test="<%= (assetEntryOrder > 0) && !last %>">
+
+		<%
+		String taglibDownURL = "javascript:" + renderResponse.getNamespace() + "moveSelectionDown('" + assetEntryOrder + "')";
+		%>
+
+		<liferay-ui:icon
+			message="down"
+			src='<%= themeDisplay.getPathThemeImages() + "/arrows/02_down.png" %>'
+			url="<%= taglibDownURL %>"
+		/>
+
+		<%
+		String taglibUpURL = "javascript:" + renderResponse.getNamespace() + "moveSelectionUp('" + assetEntryOrder + "')";
+		%>
+
+		<liferay-ui:icon
+			message="up"
+			src='<%= themeDisplay.getPathThemeImages() + "/arrows/02_up.png" %>'
+			url="<%= taglibUpURL %>"
+		/>
+	</c:when>
+	<c:when test="<%= assetEntryOrder == 0 %>">
+
+		<%
+		String taglibDownURL = "javascript:" + renderResponse.getNamespace() + "moveSelectionDown('" + assetEntryOrder + "')";
+		%>
+
+		<liferay-ui:icon
+			message="down"
+			src='<%= themeDisplay.getPathThemeImages() + "/arrows/02_down.png" %>'
+			url="<%= taglibDownURL %>"
+		/>
+	</c:when>
+	<c:when test="<%= last %>">
+
+		<%
+		String taglibUpURL = "javascript:" + renderResponse.getNamespace() + "moveSelectionUp('" + assetEntryOrder + "')";
+		%>
+
+		<liferay-ui:icon
+			message="up"
+			src='<%= themeDisplay.getPathThemeImages() + "/arrows/02_up.png" %>'
+			url="<%= taglibUpURL %>"
+		/>
+	</c:when>
+</c:choose>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="deleteURL">
+	<portlet:param name="<%= Constants.CMD %>" value="remove-selection" />
+	<portlet:param name="redirect" value="<%= currentURL %>" />
+	<portlet:param name="assetEntryOrder" value="<%= String.valueOf(assetEntryOrder) %>" />
+</liferay-portlet:actionURL>
+
+<liferay-ui:icon-delete
+	url="<%= deleteURL %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/configuration.jsp
new file mode 100644
index 0000000..cadd47e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/configuration.jsp
@@ -0,0 +1,355 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_publisher/init.jsp" %>
+
+<%
+String tabs2 = ParamUtil.getString(request, "tabs2");
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+String typeSelection = ParamUtil.getString(request, "typeSelection", StringPool.BLANK);
+String eventName = "_" + HtmlUtil.escapeJS(portletResource) + "_selectSite";
+
+List<AssetRendererFactory> classTypesAssetRendererFactories = new ArrayList<AssetRendererFactory>();
+
+String emailParam = "emailAssetEntryAdded";
+
+String currentLanguageId = LanguageUtil.getLanguageId(request);
+
+String emailSubjectParam = emailParam + "Subject_" + currentLanguageId;
+String emailBodyParam = emailParam + "Body_" + currentLanguageId;
+%>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationActionURL" />
+<liferay-portlet:renderURL portletConfiguration="true" varImpl="configurationRenderURL" />
+
+<aui:form action="<%= configurationActionURL %>" method="post" name="fm" onSubmit="event.preventDefault();">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
+	<aui:input name="redirect" type="hidden" value="<%= configurationRenderURL.toString() %>" />
+	<aui:input name="groupId" type="hidden" />
+	<aui:input name="typeSelection" type="hidden" />
+	<aui:input name="assetEntryId" type="hidden" />
+	<aui:input name="assetEntryOrder" type="hidden" value="-1" />
+	<aui:input name="assetEntryType" type="hidden" />
+	<aui:input name="scopeId" type="hidden" />
+
+	<%
+	String rootPortletId = PortletConstants.getRootPortletId(portletResource);
+	%>
+
+	<liferay-util:buffer var="selectStyle">
+		<c:choose>
+			<c:when test="<%= rootPortletId.equals(PortletKeys.HIGHEST_RATED_ASSETS) || rootPortletId.equals(PortletKeys.MOST_VIEWED_ASSETS) || rootPortletId.equals(PortletKeys.RELATED_ASSETS) %>">
+				<aui:input name="preferences--selectionStyle--" type="hidden" value="dynamic" />
+			</c:when>
+			<c:otherwise>
+				<aui:fieldset label="asset-selection">
+					<aui:input checked='<%= selectionStyle.equals("dynamic") %>' id="selectionStyleDynamic" label="dynamic" name="preferences--selectionStyle--" onChange='<%= renderResponse.getNamespace() + "chooseSelectionStyle();" %>' type="radio" value="dynamic" />
+
+					<aui:input checked='<%= selectionStyle.equals("manual") %>' id="selectionStyleManual" label="manual" name="preferences--selectionStyle--" onChange='<%= renderResponse.getNamespace() + "chooseSelectionStyle();" %>' type="radio" value="manual" />
+				</aui:fieldset>
+			</c:otherwise>
+		</c:choose>
+	</liferay-util:buffer>
+
+	<liferay-util:buffer var="selectScope">
+
+		<%
+		Set<Group> availableGroups = new HashSet<Group>();
+
+		availableGroups.add(company.getGroup());
+		availableGroups.add(themeDisplay.getScopeGroup());
+
+		if (layout.hasScopeGroup()) {
+			availableGroups.add(layout.getScopeGroup());
+		}
+
+		List<Group> selectedGroups = GroupLocalServiceUtil.getGroups(groupIds);
+		%>
+
+		<div id="<portlet:namespace />scopesBoxes">
+			<liferay-ui:search-container
+				emptyResultsMessage="no-groups-were-found"
+				iteratorURL="<%= configurationRenderURL %>"
+			>
+				<liferay-ui:search-container-results
+					results="<%= selectedGroups %>"
+					total="<%= selectedGroups.size() %>"
+				/>
+
+				<liferay-ui:search-container-row
+					className="com.liferay.portal.model.Group"
+					modelVar="group"
+				>
+					<liferay-ui:search-container-column-text
+						name="name"
+					>
+						<liferay-ui:icon
+							label="<%= true %>"
+							message="<%= group.getScopeDescriptiveName(themeDisplay) %>"
+							src="<%= group.getIconURL(themeDisplay) %>"
+						/>
+					</liferay-ui:search-container-column-text>
+
+					<liferay-ui:search-container-column-text
+						name="type"
+						value="<%= LanguageUtil.get(pageContext, group.getScopeLabel(themeDisplay)) %>"
+					/>
+
+					<liferay-ui:search-container-column-text
+						align="right"
+					>
+						<liferay-portlet:actionURL portletConfiguration="true" var="deleteURL">
+							<portlet:param name="<%= Constants.CMD %>" value="remove-scope" />
+							<portlet:param name="redirect" value="<%= currentURL %>" />
+							<portlet:param name="scopeId" value="<%= AssetPublisherUtil.getScopeId(group, scopeGroupId) %>" />
+						</liferay-portlet:actionURL>
+
+						<liferay-ui:icon
+							image="delete"
+							url="<%= deleteURL %>"
+						/>
+					</liferay-ui:search-container-column-text>
+				</liferay-ui:search-container-row>
+
+				<liferay-ui:search-iterator paginate="<%= false %>" />
+			</liferay-ui:search-container>
+
+			<div class="select-asset-selector">
+				<liferay-ui:icon-menu cssClass="select-existing-selector" direction="right" icon='<%= themeDisplay.getPathThemeImages() + "/common/add.png" %>' message="select" showWhenSingleIcon="<%= true %>">
+
+					<%
+					Map<String, Object> data = new HashMap<String, Object>();
+
+					for (Group group : availableGroups) {
+						if (ArrayUtil.contains(groupIds, group.getGroupId())) {
+							continue;
+						}
+					%>
+
+						<liferay-portlet:actionURL portletConfiguration="true" var="addScopeURL">
+							<portlet:param name="<%= Constants.CMD %>" value="add-scope" />
+							<portlet:param name="redirect" value="<%= currentURL %>" />
+							<portlet:param name="scopeId" value="<%= AssetPublisherUtil.getScopeId(group, scopeGroupId) %>" />
+						</liferay-portlet:actionURL>
+
+						<liferay-ui:icon
+							id='<%= "scope" + group.getGroupId() %>'
+							message="<%= group.getScopeDescriptiveName(themeDisplay) %>"
+							method="post"
+							src="<%= group.getIconURL(themeDisplay) %>"
+							url="<%= addScopeURL %>"
+						/>
+
+					<%
+					}
+					%>
+
+					<c:if test="<%= GroupLocalServiceUtil.getGroupsCount(company.getCompanyId(), Layout.class.getName(), layout.getGroupId()) > 0 %>">
+
+						<%
+						PortletURL layoutSiteBrowserURL = PortletURLFactoryUtil.create(request, PortletKeys.SITE_BROWSER, PortalUtil.getControlPanelPlid(company.getCompanyId()), PortletRequest.RENDER_PHASE);
+
+						layoutSiteBrowserURL.setParameter("struts_action", "/site_browser/view");
+						layoutSiteBrowserURL.setParameter("groupId", String.valueOf(layout.getGroupId()));
+						layoutSiteBrowserURL.setParameter("selectedGroupIds", StringUtil.merge(groupIds));
+						layoutSiteBrowserURL.setParameter("type", "layoutScopes");
+						layoutSiteBrowserURL.setParameter("eventName", eventName);
+						layoutSiteBrowserURL.setPortletMode(PortletMode.VIEW);
+						layoutSiteBrowserURL.setWindowState(LiferayWindowState.POP_UP);
+
+						String layoutSiteBrowserURLString = HttpUtil.addParameter(layoutSiteBrowserURL.toString(), "doAsGroupId", scopeGroupId);
+
+						data = new HashMap<String, Object>();
+
+						data.put("href", layoutSiteBrowserURLString);
+						data.put("title", LanguageUtil.get(pageContext, "pages"));
+						%>
+
+						<liferay-ui:icon
+							cssClass="highlited scope-selector"
+							data="<%= data %>"
+							id="selectGroup"
+							image="add"
+							message='<%= LanguageUtil.get(pageContext, "pages") + StringPool.TRIPLE_PERIOD %>'
+							method="get"
+							url="javascript:;"
+						/>
+					</c:if>
+
+					<%
+					List<String> types = new ArrayList<String>();
+
+					if (PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.SITES_CONTENT_SHARING_THROUGH_ADMINISTRATORS_ENABLED)) {
+						types.add("sites-that-i-administer");
+					}
+
+					if (GroupLocalServiceUtil.getGroupsCount(company.getCompanyId(), layout.getGroupId(), Boolean.TRUE) > 0) {
+						types.add("child-sites");
+					}
+
+					Group siteGroup = themeDisplay.getSiteGroup();
+
+					if (!siteGroup.isRoot()) {
+						types.add("parent-sites");
+					}
+					%>
+
+					<c:if test="<%= !types.isEmpty() %>">
+
+						<%
+						PortletURL siteBrowserURL = PortletURLFactoryUtil.create(request, PortletKeys.SITE_BROWSER, PortalUtil.getControlPanelPlid(company.getCompanyId()), PortletRequest.RENDER_PHASE);
+
+						siteBrowserURL.setParameter("struts_action", "/site_browser/view");
+						siteBrowserURL.setParameter("groupId", String.valueOf(layout.getGroupId()));
+						siteBrowserURL.setParameter("selectedGroupIds", StringUtil.merge(groupIds));
+						siteBrowserURL.setParameter("types", StringUtil.merge(types));
+						siteBrowserURL.setParameter("filter", "contentSharingWithChildrenEnabled");
+						siteBrowserURL.setParameter("eventName", eventName);
+						siteBrowserURL.setPortletMode(PortletMode.VIEW);
+						siteBrowserURL.setWindowState(LiferayWindowState.POP_UP);
+
+						String siteBrowserURLString = HttpUtil.addParameter(siteBrowserURL.toString(), "doAsGroupId", scopeGroupId);
+
+						data = new HashMap<String, Object>();
+
+						data.put("href", siteBrowserURLString);
+						data.put("title", LanguageUtil.get(pageContext, "sites"));
+						%>
+
+						<liferay-ui:icon
+							cssClass="highlited scope-selector"
+							data="<%= data %>"
+							id="selectManageableGroup"
+							image="add"
+							message='<%= LanguageUtil.get(pageContext, "other-site") + StringPool.TRIPLE_PERIOD %>'
+							method="get"
+							url="javascript:;"
+						/>
+					</c:if>
+				</liferay-ui:icon-menu>
+			</div>
+		</div>
+	</liferay-util:buffer>
+
+	<%
+	request.setAttribute("configuration.jsp-classTypesAssetRendererFactories", classTypesAssetRendererFactories);
+	request.setAttribute("configuration.jsp-configurationRenderURL", configurationRenderURL);
+	request.setAttribute("configuration.jsp-emailBodyParam", emailBodyParam);
+	request.setAttribute("configuration.jsp-emailParam", emailParam);
+	request.setAttribute("configuration.jsp-emailSubjectParam", emailSubjectParam);
+	request.setAttribute("configuration.jsp-redirect", redirect);
+	request.setAttribute("configuration.jsp-rootPortletId", rootPortletId);
+	request.setAttribute("configuration.jsp-selectScope", selectScope);
+	request.setAttribute("configuration.jsp-selectStyle", selectStyle);
+	%>
+
+	<c:choose>
+		<c:when test='<%= selectionStyle.equals("manual") %>'>
+			<liferay-util:include page="/html/portlet/asset_publisher/configuration_manual.jsp" />
+		</c:when>
+		<c:when test='<%= selectionStyle.equals("dynamic") %>'>
+			<liferay-util:include page="/html/portlet/asset_publisher/configuration_dynamic.jsp" />
+		</c:when>
+	</c:choose>
+</aui:form>
+
+<aui:script use="aui-base">
+	A.getBody().delegate(
+		'click',
+		function(event) {
+			event.preventDefault();
+
+			var currentTarget = event.currentTarget;
+
+			Liferay.Util.selectEntity(
+				{
+					dialog: {
+						constrain: true,
+						modal: true,
+						width: 600
+					},
+					eventName: '<%= eventName %>',
+					id: '<%= eventName %>' + currentTarget.attr('id'),
+					title: currentTarget.attr('data-title'),
+					uri: currentTarget.attr('data-href')
+				},
+				function(event) {
+					document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = 'add-scope';
+					document.<portlet:namespace />fm.<portlet:namespace />scopeId.value = event.scopeid;
+
+					submitForm(document.<portlet:namespace />fm);
+				}
+			);
+		},
+		'.scope-selector a'
+	);
+</aui:script>
+
+<aui:script>
+	function <portlet:namespace />chooseSelectionStyle() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = 'selection-style';
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />moveSelectionDown(assetEntryOrder) {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = 'move-selection-down';
+		document.<portlet:namespace />fm.<portlet:namespace />assetEntryOrder.value = assetEntryOrder;
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />moveSelectionUp(assetEntryOrder) {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = 'move-selection-up';
+		document.<portlet:namespace />fm.<portlet:namespace />assetEntryOrder.value = assetEntryOrder;
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />saveSelectBoxes',
+		function() {
+			if (document.<portlet:namespace />fm.<portlet:namespace />classNameIds) {
+				document.<portlet:namespace />fm.<portlet:namespace />classNameIds.value = Liferay.Util.listSelect(document.<portlet:namespace />fm.<portlet:namespace />currentClassNameIds);
+			}
+
+			<%
+			for (AssetRendererFactory curRendererFactory : classTypesAssetRendererFactories) {
+				String className = AssetPublisherUtil.getClassName(curRendererFactory);
+			%>
+
+				if (document.<portlet:namespace />fm.<portlet:namespace />classTypeIds<%= className %>) {
+					document.<portlet:namespace />fm.<portlet:namespace />classTypeIds<%= className %>.value = Liferay.Util.listSelect(document.<portlet:namespace />fm.<portlet:namespace /><%= className %>currentClassTypeIds);
+				}
+
+			<%
+			}
+			%>
+
+			document.<portlet:namespace />fm.<portlet:namespace />metadataFields.value = Liferay.Util.listSelect(document.<portlet:namespace />fm.<portlet:namespace />currentMetadataFields);
+			document.<portlet:namespace />fm.<portlet:namespace /><%= emailBodyParam %>.value = window.<portlet:namespace />editor.getHTML();
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['liferay-util-list-fields']
+	);
+
+	Liferay.Util.toggleSelectBox('<portlet:namespace />anyAssetType','false','<portlet:namespace />classNamesBoxes');
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/configuration_dynamic.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/configuration_dynamic.jsp
new file mode 100644
index 0000000..5191e66
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/configuration_dynamic.jsp
@@ -0,0 +1,790 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_publisher/init.jsp" %>
+
+<%
+List<AssetRendererFactory> classTypesAssetRendererFactories = (List<AssetRendererFactory>)request.getAttribute("configuration.jsp-classTypesAssetRendererFactories");
+PortletURL configurationRenderURL = (PortletURL)request.getAttribute("configuration.jsp-configurationRenderURL");
+String redirect = (String)request.getAttribute("configuration.jsp-redirect");
+String rootPortletId = (String)request.getAttribute("configuration.jsp-rootPortletId");
+String selectScope = (String)request.getAttribute("configuration.jsp-selectScope");
+String selectStyle = (String)request.getAttribute("configuration.jsp-selectStyle");
+%>
+
+<liferay-ui:tabs
+	formName="fm"
+	names="asset-selection,display-settings,subscriptions"
+	param="tabs2"
+	refresh="<%= false %>"
+>
+	<liferay-ui:section>
+		<liferay-ui:error-marker key="errorSection" value="asset-selection" />
+
+		<%= selectStyle %>
+
+		<liferay-ui:panel-container extended="<%= true %>" id="assetPublisherDynamicSelectionAssetSelectionPanelContainer" persistState="<%= true %>">
+			<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="assetPublisherSourcePanel" persistState="<%= true %>" title="source">
+				<aui:fieldset cssClass='<%= rootPortletId.equals(PortletKeys.RELATED_ASSETS) ? "hide" : "" %>' label="scope">
+					<%= selectScope %>
+				</aui:fieldset>
+
+				<aui:fieldset label="asset-entry-type">
+
+					<%
+					Set<Long> availableClassNameIdsSet = SetUtil.fromArray(availableClassNameIds);
+
+					// Left list
+
+					List<KeyValuePair> typesLeftList = new ArrayList<KeyValuePair>();
+
+					for (long classNameId : classNameIds) {
+						String className = PortalUtil.getClassName(classNameId);
+
+						typesLeftList.add(new KeyValuePair(String.valueOf(classNameId), ResourceActionsUtil.getModelResource(locale, className)));
+					}
+
+					// Right list
+
+					List<KeyValuePair> typesRightList = new ArrayList<KeyValuePair>();
+
+					Arrays.sort(classNameIds);
+					%>
+
+					<aui:select label="" name="preferences--anyAssetType--">
+						<aui:option label="any" selected="<%= anyAssetType %>" value="<%= true %>" />
+						<aui:option label='<%= LanguageUtil.get(pageContext, "select-more-than-one") + StringPool.TRIPLE_PERIOD %>' selected="<%= !anyAssetType && (classNameIds.length > 1) %>" value="<%= false %>" />
+
+						<optgroup label="<liferay-ui:message key="asset-type" />">
+
+							<%
+							for (long classNameId : availableClassNameIdsSet) {
+								ClassName className = ClassNameLocalServiceUtil.getClassName(classNameId);
+
+								if (Arrays.binarySearch(classNameIds, classNameId) < 0) {
+									typesRightList.add(new KeyValuePair(String.valueOf(classNameId), ResourceActionsUtil.getModelResource(locale, className.getValue())));
+								}
+							%>
+
+								<aui:option label="<%= ResourceActionsUtil.getModelResource(locale, className.getValue()) %>" selected="<%= (classNameIds.length == 1) && (classNameId == classNameIds[0]) %>" value="<%= classNameId %>" />
+
+							<%
+							}
+							%>
+
+						</optgroup>
+					</aui:select>
+
+					<aui:input name="preferences--classNameIds--" type="hidden" />
+
+					<%
+					typesRightList = ListUtil.sort(typesRightList, new KeyValuePairComparator(false, true));
+					%>
+
+					<div class="<%= anyAssetType ? "hide" : "" %>" id="<portlet:namespace />classNamesBoxes">
+						<liferay-ui:input-move-boxes
+							leftBoxName="currentClassNameIds"
+							leftList="<%= typesLeftList %>"
+							leftReorder="true"
+							leftTitle="selected"
+							rightBoxName="availableClassNameIds"
+							rightList="<%= typesRightList %>"
+							rightTitle="available"
+						/>
+					</div>
+
+					<%
+					for (AssetRendererFactory assetRendererFactory : AssetRendererFactoryRegistryUtil.getAssetRendererFactories(company.getCompanyId())) {
+						Map<Long, String> assetAvailableClassTypes = assetRendererFactory.getClassTypes(new long[] {themeDisplay.getCompanyGroupId(), scopeGroupId}, themeDisplay.getLocale());
+
+						if (assetAvailableClassTypes.isEmpty()) {
+							continue;
+						}
+
+						classTypesAssetRendererFactories.add(assetRendererFactory);
+
+						String className = AssetPublisherUtil.getClassName(assetRendererFactory);
+
+						Set<Long> assetAvailableClassTypeIdsSet = assetAvailableClassTypes.keySet();
+
+						Long[] assetAvailableClassTypeIds = assetAvailableClassTypeIdsSet.toArray(new Long[assetAvailableClassTypeIdsSet.size()]);
+
+						Long[] assetSelectedClassTypeIds = AssetPublisherUtil.getClassTypeIds(portletPreferences, className, assetAvailableClassTypeIds);
+
+						// Left list
+
+						List<KeyValuePair> subtypesLeftList = new ArrayList<KeyValuePair>();
+
+						for (long subtypeId : assetSelectedClassTypeIds) {
+							subtypesLeftList.add(new KeyValuePair(String.valueOf(subtypeId), HtmlUtil.escape(assetAvailableClassTypes.get(subtypeId))));
+						}
+
+						Arrays.sort(assetSelectedClassTypeIds);
+
+						// Right list
+
+						List<KeyValuePair> subtypesRightList = new ArrayList<KeyValuePair>();
+
+						boolean anyAssetSubtype = GetterUtil.getBoolean(portletPreferences.getValue("anyClassType" + className, Boolean.TRUE.toString()));
+					%>
+
+						<div class='asset-subtype <%= (assetSelectedClassTypeIds.length < 1) ? StringPool.BLANK : "hide" %>' id="<portlet:namespace /><%= className %>Options">
+							<aui:select label='<%= LanguageUtil.format(pageContext, "x-subtype", ResourceActionsUtil.getModelResource(locale, assetRendererFactory.getClassName())) %>' name='<%= "preferences--anyClassType" + className + "--" %>'>
+								<aui:option label="any" selected="<%= anyAssetSubtype %>" value="<%= true %>" />
+								<aui:option label='<%= LanguageUtil.get(pageContext, "select-more-than-one") + StringPool.TRIPLE_PERIOD %>' selected="<%= !anyAssetSubtype && (assetSelectedClassTypeIds.length > 1) %>" value="<%= false %>" />
+
+								<optgroup label="<liferay-ui:message key="subtype" />">
+
+									<%
+									for (Long classTypeId : assetAvailableClassTypes.keySet()) {
+										if (Arrays.binarySearch(assetSelectedClassTypeIds, classTypeId) < 0) {
+											subtypesRightList.add(new KeyValuePair(String.valueOf(classTypeId), HtmlUtil.escape(assetAvailableClassTypes.get(classTypeId))));
+										}
+									%>
+
+										<aui:option label="<%= HtmlUtil.escapeAttribute(assetAvailableClassTypes.get(classTypeId)) %>" selected="<%= !anyAssetSubtype && (assetSelectedClassTypeIds.length == 1) && (classTypeId.equals(assetSelectedClassTypeIds[0])) %>" value="<%= classTypeId %>" />
+
+									<%
+									}
+									%>
+
+								</optgroup>
+							</aui:select>
+
+							<aui:input name='<%= "preferences--classTypeIds" + className + "--" %>' type="hidden" />
+
+							<div class="asset-subtypefields-wrapper-enable hide" id="<portlet:namespace /><%= className %>subtypeFieldsFilterEnableWrapper">
+								<aui:input checked="<%= subtypeFieldsFilterEnabled %>" label="filter-by-field" name='<%= "preferences--subtypeFieldsFilterEnabled" + className + "--" %>' type="checkbox" value="<%= subtypeFieldsFilterEnabled %>" />
+							</div>
+
+							<span class="asset-subtypefields-message" id="<portlet:namespace /><%= className %>ddmStructureFieldMessage">
+								<c:if test="<%= (Validator.isNotNull(ddmStructureFieldLabel) && (classNameIds[0] == PortalUtil.getClassNameId(assetRendererFactory.getClassName()))) %>">
+									<%= ddmStructureFieldLabel + ": " + ddmStructureDisplayFieldValue %>
+								</c:if>
+							</span>
+
+							<div class="asset-subtypefields-wrapper hide" id="<portlet:namespace /><%= className %>subtypeFieldsWrapper">
+
+								<%
+								for (long assetAvailableClassTypeId : assetAvailableClassTypeIds) {
+									if (assetRendererFactory.getClassTypeFieldNamesCount(assetAvailableClassTypeId, locale) == 0) {
+										continue;
+									}
+								%>
+
+									<span class="asset-subtypefields hide" id="<portlet:namespace /><%= assetAvailableClassTypeId %>_<%= className %>Options">
+										<portlet:renderURL var="selectStructureFieldURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+											<portlet:param name="struts_action" value="/portlet_configuration/select_structure_field" />
+											<portlet:param name="portletResource" value="<%= portletResource %>" />
+											<portlet:param name="className" value="<%= assetRendererFactory.getClassName() %>" />
+											<portlet:param name="classTypeId" value="<%= String.valueOf(assetAvailableClassTypeId) %>" />
+										</portlet:renderURL>
+
+										<span class="asset-subtypefields-popup" id="<portlet:namespace /><%= assetAvailableClassTypeId %>_<%= className %>PopUpButton">
+											<aui:button data-href="<%= selectStructureFieldURL.toString() %>" disabled="<%= !subtypeFieldsFilterEnabled %>" value="select" />
+										</span>
+									</span>
+
+								<%
+								}
+
+								typesRightList = ListUtil.sort(typesRightList, new KeyValuePairComparator(false, true));
+								%>
+
+							</div>
+
+							<div class="<%= assetSelectedClassTypeIds.length > 1 ? StringPool.BLANK : "hide" %>" id="<portlet:namespace /><%= className %>Boxes">
+								<liferay-ui:input-move-boxes
+									leftBoxName='<%= className + "currentClassTypeIds" %>'
+									leftList="<%= subtypesLeftList %>"
+									leftReorder="true"
+									leftTitle="selected"
+									rightBoxName='<%= className + "availableClassTypeIds" %>'
+									rightList="<%= subtypesRightList %>"
+									rightTitle="available"
+								/>
+							</div>
+						</div>
+
+					<%
+					}
+					%>
+
+					<div class="asset-subtypefield-selected <%= Validator.isNull(ddmStructureFieldName) ? "hide" : StringPool.BLANK %>">
+						<aui:input name='<%= "preferences--ddmStructureFieldName--" %>' type="hidden" value="<%= ddmStructureFieldName %>" />
+
+						<aui:input name='<%= "preferences--ddmStructureFieldValue--" %>' type="hidden" value="<%= ddmStructureFieldValue %>" />
+
+						<aui:input name='<%= "preferences--ddmStructureDisplayFieldValue--" %>' type="hidden" value="<%= ddmStructureDisplayFieldValue %>" />
+					</div>
+				</aui:fieldset>
+			</liferay-ui:panel>
+
+			<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="assetPublisherQueryRulesPanelContainer" persistState="<%= true %>" title="filter[action]">
+				<div id="<portlet:namespace />queryRules">
+					<aui:fieldset label="displayed-assets-must-match-these-rules">
+						<liferay-ui:asset-tags-error />
+
+						<%
+						DuplicateQueryRuleException dqre = null;
+						%>
+
+						<liferay-ui:error exception="<%= DuplicateQueryRuleException.class %>">
+
+							<%
+							dqre = (DuplicateQueryRuleException)errorException;
+
+							String name = dqre.getName();
+							%>
+
+							<liferay-util:buffer var="messageArgument">
+								<em>(<liferay-ui:message key='<%= dqre.isContains() ? "contains" : "does-not-contain" %>' /> - <liferay-ui:message key='<%= dqre.isAndOperator() ? "all" : "any" %>' /> - <liferay-ui:message key='<%= name.equals(("assetTags")) ? "tags" : "categories" %>' />)</em>
+							</liferay-util:buffer>
+
+							<liferay-ui:message arguments="<%= messageArgument %>" key="only-one-rule-with-the-combination-x-is-supported" translateArguments="<%= false %>" />
+						</liferay-ui:error>
+
+						<%
+						String queryLogicIndexesParam = ParamUtil.getString(request, "queryLogicIndexes");
+
+						int[] queryLogicIndexes = null;
+
+						if (Validator.isNotNull(queryLogicIndexesParam)) {
+							queryLogicIndexes = StringUtil.split(queryLogicIndexesParam, 0);
+						}
+						else {
+							queryLogicIndexes = new int[0];
+
+							for (int i = 0; true; i++) {
+								String queryValues = PrefsParamUtil.getString(portletPreferences, request, "queryValues" + i);
+
+								if (Validator.isNull(queryValues)) {
+									break;
+								}
+
+								queryLogicIndexes = ArrayUtil.append(queryLogicIndexes, i);
+							}
+
+							if (queryLogicIndexes.length == 0) {
+								queryLogicIndexes = ArrayUtil.append(queryLogicIndexes, -1);
+							}
+						}
+
+						int index = 0;
+
+						for (int queryLogicIndex : queryLogicIndexes) {
+							String queryValues = StringUtil.merge(portletPreferences.getValues("queryValues" + queryLogicIndex , new String[0]));
+							String tagNames = ParamUtil.getString(request, "queryTagNames" + queryLogicIndex, queryValues);
+							String categoryIds = ParamUtil.getString(request, "queryCategoryIds" + queryLogicIndex, queryValues);
+
+							if (Validator.isNotNull(tagNames) || Validator.isNotNull(categoryIds) || (queryLogicIndexes.length == 1)) {
+								request.setAttribute("configuration.jsp-categorizableGroupIds", _getCategorizableGroupIds(groupIds));
+								request.setAttribute("configuration.jsp-index", String.valueOf(index));
+								request.setAttribute("configuration.jsp-queryLogicIndex", String.valueOf(queryLogicIndex));
+
+								String cssClass = StringPool.BLANK;
+
+								if (dqre != null) {
+									boolean queryContains = PrefsParamUtil.getBoolean(portletPreferences, request, "queryContains" + queryLogicIndex, true);
+									boolean queryAndOperator = PrefsParamUtil.getBoolean(portletPreferences, request, "queryAndOperator" + queryLogicIndex);
+									String queryName = PrefsParamUtil.getString(portletPreferences, request, "queryName" + queryLogicIndex, "assetTags");
+
+									String dqreQueryName = dqre.getName();
+
+									if ((dqre.isContains() == queryContains) && (dqre.isAndOperator() == queryAndOperator) && dqreQueryName.equals(queryName)) {
+										cssClass = "asset-query-rule-error";
+									}
+								}
+						%>
+
+								<div class="lfr-form-row <%= cssClass %>">
+									<div class="row-fields">
+										<liferay-util:include page="/html/portlet/asset_publisher/edit_query_rule.jsp" />
+									</div>
+								</div>
+
+						<%
+							}
+
+							index++;
+						}
+						%>
+
+					</aui:fieldset>
+				</div>
+
+				<aui:input label='<%= LanguageUtil.format(pageContext, "show-only-assets-with-x-as-its-display-page", HtmlUtil.escape(layout.getName(locale)), false) %>' name="preferences--showOnlyLayoutAssets--" type="checkbox" value="<%= showOnlyLayoutAssets %>" />
+
+				<aui:input label="include-tags-specified-in-the-url" name="preferences--mergeUrlTags--" type="checkbox" value="<%= mergeUrlTags %>" />
+
+				<aui:input helpMessage="include-tags-set-by-other-applications-help" label="include-tags-set-by-other-applications" name="preferences--mergeLayoutTags--" type="checkbox" value="<%= mergeLayoutTags %>" />
+
+				<aui:script use="liferay-auto-fields">
+					var autoFields = new Liferay.AutoFields(
+						{
+							contentBox: '#<portlet:namespace />queryRules > fieldset',
+							fieldIndexes: '<portlet:namespace />queryLogicIndexes',
+							namespace: '<portlet:namespace />',
+							url: '<portlet:renderURL windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>"><portlet:param name="struts_action" value="/portlet_configuration/edit_query_rule" /></portlet:renderURL>'
+						}
+					).render();
+				</aui:script>
+			</liferay-ui:panel>
+
+			<%
+			String[] sections = PropsValues.ASSET_PUBLISHER_QUERY_FORM_CONFIGURATION;
+
+			for (String section : sections) {
+				String sectionId = renderResponse.getNamespace() + _getSectionId(section);
+			%>
+
+				<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id='<%= "assetPublisherPanelContainerSection_" + sectionId %>' persistState="<%= true %>" title="<%= section %>">
+					<liferay-util:include page='<%= "/html/portlet/asset_publisher/query/" + _getSectionJsp(section) + ".jsp" %>' />
+				</liferay-ui:panel>
+
+			<%
+			}
+			%>
+
+			<c:if test="<%= !rootPortletId.equals(PortletKeys.HIGHEST_RATED_ASSETS) && !rootPortletId.equals(PortletKeys.MOST_VIEWED_ASSETS) %>">
+				<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="assetPublisherOrderingAndGroupingPanel" persistState="<%= true %>" title="ordering-and-grouping">
+					<aui:fieldset>
+						<span class="field-row">
+							<aui:select inlineField="<%= true %>" inlineLabel="left" label="order-by" name="preferences--orderByColumn1--">
+								<aui:option label="title" selected='<%= orderByColumn1.equals("title") %>' />
+								<aui:option label="create-date" selected='<%= orderByColumn1.equals("createDate") %>' value="createDate" />
+								<aui:option label="modified-date" selected='<%= orderByColumn1.equals("modifiedDate") %>' value="modifiedDate" />
+								<aui:option label="publish-date" selected='<%= orderByColumn1.equals("publishDate") %>' value="publishDate" />
+								<aui:option label="expiration-date" selected='<%= orderByColumn1.equals("expirationDate") %>' value="expirationDate" />
+								<aui:option label="priority" selected='<%= orderByColumn1.equals("priority") %>' value="priority" />
+
+								<c:if test="<%= !PropsValues.ASSET_PUBLISHER_SEARCH_WITH_INDEX %>">
+									<aui:option label="view-count" selected='<%= orderByColumn1.equals("viewCount") %>' value="viewCount" />
+									<aui:option label="ratings" selected='<%= orderByColumn1.equals("ratings") %>' value="ratings" />
+								</c:if>
+							</aui:select>
+
+							<aui:select inlineField="<%= true %>" label="" name="preferences--orderByType1--">
+								<aui:option label="ascending" selected='<%= orderByType1.equals("ASC") %>' value="ASC" />
+								<aui:option label="descending" selected='<%= orderByType1.equals("DESC") %>' value="DESC" />
+							</aui:select>
+						</span>
+
+						<span class="field-row">
+							<aui:select inlineField="<%= true %>" inlineLabel="left" label="and-then-by" name="preferences--orderByColumn2--">
+								<aui:option label="title" selected='<%= orderByColumn2.equals("title") %>' />
+								<aui:option label="create-date" selected='<%= orderByColumn2.equals("createDate") %>' value="createDate" />
+								<aui:option label="modified-date" selected='<%= orderByColumn2.equals("modifiedDate") %>' value="modifiedDate" />
+								<aui:option label="publish-date" selected='<%= orderByColumn2.equals("publishDate") %>' value="publishDate" />
+								<aui:option label="expiration-date" selected='<%= orderByColumn2.equals("expirationDate") %>' value="expirationDate" />
+								<aui:option label="priority" selected='<%= orderByColumn2.equals("priority") %>' value="priority" />
+
+								<c:if test="<%= !PropsValues.ASSET_PUBLISHER_SEARCH_WITH_INDEX %>">
+									<aui:option label="view-count" selected='<%= orderByColumn2.equals("viewCount") %>' value="viewCount" />
+									<aui:option label="ratings" selected='<%= orderByColumn2.equals("ratings") %>' value="ratings" />
+								</c:if>
+							</aui:select>
+
+							<aui:select inlineField="<%= true %>" label="" name="preferences--orderByType2--">
+								<aui:option label="ascending" selected='<%= orderByType2.equals("ASC") %>' value="ASC" />
+								<aui:option label="descending" selected='<%= orderByType2.equals("DESC") %>' value="DESC" />
+							</aui:select>
+						</span>
+
+						<span class="field-row">
+							<aui:select inlineField="<%= true %>" inlineLabel="left" label="group-by" name="preferences--assetVocabularyId--">
+								<aui:option value="" />
+								<aui:option label="asset-types" selected="<%= assetVocabularyId == -1 %>" value="-1" />
+
+								<%
+								Group companyGroup = company.getGroup();
+
+								if (scopeGroupId != companyGroup.getGroupId()) {
+									List<AssetVocabulary> assetVocabularies = AssetVocabularyLocalServiceUtil.getGroupVocabularies(scopeGroupId, false);
+
+									if (!assetVocabularies.isEmpty()) {
+									%>
+
+										<optgroup label="<liferay-ui:message key="vocabularies" />">
+
+											<%
+											for (AssetVocabulary assetVocabulary : assetVocabularies) {
+												assetVocabulary = assetVocabulary.toEscapedModel();
+											%>
+
+												<aui:option label="<%= assetVocabulary.getTitle(locale) %>" selected="<%= assetVocabularyId == assetVocabulary.getVocabularyId() %>" value="<%= assetVocabulary.getVocabularyId() %>" />
+
+											<%
+											}
+											%>
+
+										</optgroup>
+
+									<%
+									}
+								}
+								%>
+
+								<%
+								List<AssetVocabulary> assetVocabularies = AssetVocabularyLocalServiceUtil.getGroupVocabularies(companyGroup.getGroupId(), false);
+
+								if (!assetVocabularies.isEmpty()) {
+								%>
+
+									<optgroup label="<liferay-ui:message key="vocabularies" /> (<liferay-ui:message key="global" />)">
+
+										<%
+										for (AssetVocabulary assetVocabulary : assetVocabularies) {
+											assetVocabulary = assetVocabulary.toEscapedModel();
+										%>
+
+											<aui:option label="<%= assetVocabulary.getTitle(locale) %>" selected="<%= assetVocabularyId == assetVocabulary.getVocabularyId() %>" value="<%= assetVocabulary.getVocabularyId() %>" />
+
+										<%
+										}
+										%>
+
+									</optgroup>
+
+								<%
+								}
+								%>
+
+							</aui:select>
+						</span>
+					</aui:fieldset>
+				</liferay-ui:panel>
+			</c:if>
+		</liferay-ui:panel-container>
+	</liferay-ui:section>
+
+	<liferay-ui:section>
+		<liferay-ui:error-marker key="errorSection" value="display-settings" />
+
+		<%@ include file="/html/portlet/asset_publisher/display_settings.jspf" %>
+	</liferay-ui:section>
+
+	<liferay-ui:section>
+		<liferay-ui:error-marker key="errorSection" value="subscriptions" />
+
+		<c:if test="<%= PortalUtil.isRSSFeedsEnabled() %>">
+			<liferay-ui:rss-settings
+				delta="<%= rssDelta %>"
+				displayStyle="<%= rssDisplayStyle %>"
+				displayStyles="<%= new String[] {RSSUtil.DISPLAY_STYLE_ABSTRACT, RSSUtil.DISPLAY_STYLE_TITLE} %>"
+				enabled="<%= enableRSS %>"
+				feedType="<%= rssFeedType %>"
+				name="<%= rssName %>"
+				nameEnabled="<%= true %>"
+			/>
+		</c:if>
+
+		<%@ include file="/html/portlet/asset_publisher/email_subscription_settings.jspf" %>
+	</liferay-ui:section>
+</liferay-ui:tabs>
+
+<aui:button-row>
+	<aui:button onClick='<%= renderResponse.getNamespace() + "saveSelectBoxes();" %>' type="submit" />
+</aui:button-row>
+
+<aui:script use="aui-base">
+	var MAP_DDM_STRUCTURES = {};
+
+	var assetSelector = A.one('#<portlet:namespace />anyAssetType');
+	var assetMultipleSelector = A.one('#<portlet:namespace />currentClassNameIds');
+	var ddmStructureFieldName = A.one('#<portlet:namespace />ddmStructureFieldName');
+	var orderByColumn1 = A.one('#<portlet:namespace />orderByColumn1');
+	var orderByColumn2 = A.one('#<portlet:namespace />orderByColumn2');
+	var sourcePanel = A.one('#assetPublisherSourcePanel');
+
+	<%
+	for (AssetRendererFactory curRendererFactory : classTypesAssetRendererFactories) {
+		String className = AssetPublisherUtil.getClassName(curRendererFactory);
+	%>
+
+		Liferay.Util.toggleSelectBox('<portlet:namespace />anyClassType<%= className %>','false','<portlet:namespace /><%= className %>Boxes');
+
+		var <%= className %>Options = A.one('#<portlet:namespace /><%= className %>Options');
+
+		function <portlet:namespace />toggle<%= className %>(removeOrderBySubtype) {
+			var assetOptions = assetMultipleSelector.all('option');
+
+			if ((assetSelector.val() == '<%= curRendererFactory.getClassNameId() %>') ||
+				((assetSelector.val() == 'false') && (assetOptions.size() == 1) && (assetOptions.item(0).val() == '<%= curRendererFactory.getClassNameId() %>'))) {
+
+				<%= className %>Options.show();
+			}
+			else {
+				<%= className %>Options.hide();
+			}
+
+			if (removeOrderBySubtype) {
+				var orderByColumn1Subtype = orderByColumn1.one('.order-by-subtype');
+
+				if (orderByColumn1Subtype) {
+					orderByColumn1Subtype.remove();
+				}
+
+				var orderByColumn2Subtype = orderByColumn2.one('.order-by-subtype');
+
+				if (orderByColumn2Subtype) {
+					orderByColumn2Subtype.remove();
+				}
+			}
+
+			<%= className %>toggleSubclassesFields(true);
+		}
+
+		<%
+		Map<Long, String> assetAvailableClassTypes = curRendererFactory.getClassTypes(new long[] {themeDisplay.getCompanyGroupId(), scopeGroupId}, themeDisplay.getLocale());
+
+		if (assetAvailableClassTypes.isEmpty()) {
+			continue;
+		}
+
+		Set<Long> assetAvailableClassTypeIdsSet = assetAvailableClassTypes.keySet();
+
+		for (long subtypeId : assetAvailableClassTypeIdsSet) {
+			List<Tuple> classTypeFieldNames = curRendererFactory.getClassTypeFieldNames(subtypeId, locale, QueryUtil.ALL_POS, QueryUtil.ALL_POS);
+
+			if (classTypeFieldNames.isEmpty()) {
+				continue;
+			}
+		%>
+
+			var optgroupClose = '</optgroup>';
+			var optgroupOpen = '<optgroup class="order-by-subtype" label="<%= HtmlUtil.escape(assetAvailableClassTypes.get(subtypeId)) %>">';
+
+			var columnBuffer1 = [optgroupOpen];
+			var columnBuffer2 = [optgroupOpen];
+
+			<%
+			for (Tuple classTypeFieldName : classTypeFieldNames) {
+				String value = DDMIndexerUtil.encodeName((Long)classTypeFieldName.getObject(3), (String)classTypeFieldName.getObject(1));
+				String selectedOrderByColumn1 = StringPool.BLANK;
+				String selectedOrderByColumn2 = StringPool.BLANK;
+
+				if (orderByColumn1.equals(value)) {
+					selectedOrderByColumn1 = "selected";
+				}
+
+				if (orderByColumn2.equals(value)) {
+					selectedOrderByColumn2 = "selected";
+				}
+			%>
+
+				columnBuffer1.push('<option <%= selectedOrderByColumn1 %> value="<%= value %>"><%= (String)classTypeFieldName.getObject(0) %></option>');
+				columnBuffer2.push('<option <%= selectedOrderByColumn2 %> value="<%= value %>"><%= (String)classTypeFieldName.getObject(0) %></option>');
+
+			<%
+			}
+			%>
+
+			columnBuffer1.push(optgroupClose);
+			columnBuffer2.push(optgroupClose);
+
+			MAP_DDM_STRUCTURES['<%= className %>_<%= subtypeId %>_optTextOrderByColumn1'] = columnBuffer1.join('');
+			MAP_DDM_STRUCTURES['<%= className %>_<%= subtypeId %>_optTextOrderByColumn2'] = columnBuffer2.join('');
+
+		<%
+		}
+		%>
+
+		var <%= className %>SubtypeSelector = A.one('#<portlet:namespace />anyClassType<%= className %>');
+
+		function <%= className %>toggleSubclassesFields(hideSubtypeFilterEnableWrapper) {
+			var subtypeFieldsWrapper = A.one('#<portlet:namespace /><%= className %>subtypeFieldsWrapper');
+			var subtypeFieldsFilterEnableWrapper = A.one('#<portlet:namespace /><%= className %>subtypeFieldsFilterEnableWrapper');
+
+			var selectedSubtype = <%= className %>SubtypeSelector.val();
+
+			var structureOptions = A.one('#<portlet:namespace />' + selectedSubtype + '_<%= className %>Options');
+
+			if (structureOptions) {
+				structureOptions.show();
+			}
+
+			if ((selectedSubtype != 'false') && (selectedSubtype != 'true')) {
+				var orderByColumn1Subtype = orderByColumn1.one('.order-by-subtype');
+
+				if (orderByColumn1Subtype) {
+					orderByColumn1Subtype.remove();
+				}
+
+				var orderByColumn2Subtype = orderByColumn2.one('.order-by-subtype');
+
+				if (orderByColumn2Subtype) {
+					orderByColumn2Subtype.remove();
+				}
+
+				orderByColumn1.appendChild(MAP_DDM_STRUCTURES['<%= className %>_' + selectedSubtype + '_optTextOrderByColumn1']);
+				orderByColumn2.appendChild(MAP_DDM_STRUCTURES['<%= className %>_' + selectedSubtype + '_optTextOrderByColumn2']);
+
+				if (structureOptions) {
+					subtypeFieldsWrapper.show();
+					subtypeFieldsFilterEnableWrapper.show();
+				}
+				else if (hideSubtypeFilterEnableWrapper) {
+					subtypeFieldsWrapper.hide();
+					subtypeFieldsFilterEnableWrapper.hide();
+				}
+			}
+			else if (hideSubtypeFilterEnableWrapper) {
+				subtypeFieldsWrapper.hide();
+				subtypeFieldsFilterEnableWrapper.hide();
+			}
+		}
+
+		<%= className %>toggleSubclassesFields(false);
+
+		<%= className %>SubtypeSelector.on(
+			'change',
+			function(event) {
+				setDDMFields('<%= className %>', '', '', '', '');
+
+				var subtypeFieldsFilterEnabled = A.one('#<portlet:namespace />subtypeFieldsFilterEnabled<%= className %>');
+
+				subtypeFieldsFilterEnabled.val(false);
+
+				var subtypeFieldsFilterEnabledCheckbox = A.one('#<portlet:namespace />subtypeFieldsFilterEnabled<%= className %>Checkbox');
+
+				subtypeFieldsFilterEnabledCheckbox.attr('checked', false);
+
+				sourcePanel.all('.asset-subtypefields').hide();
+
+				<%= className %>toggleSubclassesFields(true);
+			}
+		);
+
+	<%
+	}
+	%>
+
+	function <portlet:namespace />toggleSubclasses(removeOrderBySubtype) {
+
+		<%
+		for (AssetRendererFactory curRendererFactory : classTypesAssetRendererFactories) {
+			String className = AssetPublisherUtil.getClassName(curRendererFactory);
+		%>
+
+			<portlet:namespace />toggle<%= className %>(removeOrderBySubtype);
+
+		<%
+		}
+		%>
+
+	}
+
+	<portlet:namespace />toggleSubclasses(false);
+
+	assetSelector.on(
+		'change',
+		function(event) {
+			var ddmStructureFieldValue = A.one('#<portlet:namespace />ddmStructureFieldValue');
+
+			ddmStructureFieldName.val('');
+			ddmStructureFieldValue.val('');
+
+			<portlet:namespace />toggleSubclasses(true);
+		}
+	);
+
+	sourcePanel.delegate(
+		'click',
+		function(event) {
+			var assetSubtypeFieldsPopupNodes = A.all('.asset-subtypefields-popup .btn');
+
+			Liferay.Util.toggleDisabled(assetSubtypeFieldsPopupNodes, !event.target.attr('checked'));
+		},
+		'.asset-subtypefields-wrapper-enable .field'
+	);
+
+	Liferay.after(
+		'inputmoveboxes:moveItem',
+		function(event) {
+			if ((event.fromBox.get('id') == '<portlet:namespace />currentClassNameIds') || (event.toBox.get('id') == '<portlet:namespace />currentClassNameIds')) {
+				<portlet:namespace />toggleSubclasses();
+			}
+		}
+	);
+
+	sourcePanel.delegate(
+		'click',
+		function(event) {
+			Liferay.Util.selectEntity(
+				{
+					dialog: {
+						constrain: true,
+						modal: true,
+						width: 600
+					},
+					eventName: '<portlet:namespace />selectDDMStructureField',
+					id: '<portlet:namespace />selectDDMStructure' + event.currentTarget.attr('id'),
+					title: '<liferay-ui:message arguments="structure-field" key="select-x" />',
+					uri: event.target.attr('data-href')
+				},
+				function(event) {
+					setDDMFields(event.className, event.name, event.value, event.displayValue, event.label + ': ' + event.displayValue);
+				}
+			);
+		},
+		'.asset-subtypefields-popup'
+	);
+
+	function setDDMFields(className, name, value, displayValue, message) {
+		var ddmStructureFieldName = A.one('#<portlet:namespace />ddmStructureFieldName');
+
+		ddmStructureFieldName.val(name);
+
+		var ddmStructureFieldvalue = A.one('#<portlet:namespace />ddmStructureFieldValue');
+
+		ddmStructureFieldvalue.val(value);
+
+		var ddmStructureDisplayFieldvalue = A.one('#<portlet:namespace />ddmStructureDisplayFieldValue');
+
+		ddmStructureDisplayFieldvalue.val(displayValue);
+
+		var ddmStructureFieldMessage = A.one('#<portlet:namespace />' + className + 'ddmStructureFieldMessage');
+
+		ddmStructureFieldMessage.html(message);
+	}
+</aui:script>
+
+<%!
+private long[] _getCategorizableGroupIds(long[] groupIds) throws Exception {
+	Set<Long> categorizableGroupIds = new HashSet<Long>(groupIds.length);
+
+	for (long groupId : groupIds) {
+		Group group = GroupLocalServiceUtil.getGroup(groupId);
+
+		if (group.isLayout()) {
+			groupId = group.getParentGroupId();
+		}
+
+		categorizableGroupIds.add(groupId);
+	}
+
+	return ArrayUtil.toLongArray(categorizableGroupIds);
+}
+
+private String _getSectionId(String name) {
+	return TextFormatter.format(name, TextFormatter.M);
+}
+
+private String _getSectionJsp(String name) {
+	return TextFormatter.format(name, TextFormatter.N);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/configuration_manual.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/configuration_manual.jsp
new file mode 100644
index 0000000..cc05019
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/configuration_manual.jsp
@@ -0,0 +1,215 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_publisher/init.jsp" %>
+
+<%
+List<AssetRendererFactory> classTypesAssetRendererFactories = (List<AssetRendererFactory>)request.getAttribute("configuration.jsp-classTypesAssetRendererFactories");
+PortletURL configurationRenderURL = (PortletURL)request.getAttribute("configuration.jsp-configurationRenderURL");
+String redirect = (String)request.getAttribute("configuration.jsp-redirect");
+String rootPortletId = (String)request.getAttribute("configuration.jsp-rootPortletId");
+String selectScope = (String)request.getAttribute("configuration.jsp-selectScope");
+String selectStyle = (String)request.getAttribute("configuration.jsp-selectStyle");
+String eventName = "_" + HtmlUtil.escapeJS(portletResource) + "_selectAsset";
+%>
+
+<liferay-ui:tabs
+	formName="fm"
+	names="asset-selection,display-settings,subscriptions"
+	param="tabs2"
+	refresh="<%= false %>"
+>
+	<liferay-ui:section>
+		<liferay-ui:error-marker key="errorSection" value="asset-selection" />
+
+		<%= selectStyle %>
+
+		<aui:fieldset label="scope">
+			<%= selectScope %>
+		</aui:fieldset>
+
+		<aui:fieldset label="model.resource.com.liferay.portlet.asset">
+
+			<%
+			List<AssetEntry> assetEntries = AssetPublisherUtil.getAssetEntries(renderRequest, portletPreferences, permissionChecker, groupIds, assetEntryXmls, true, enablePermissions);
+			%>
+
+			<liferay-ui:search-container
+				emptyResultsMessage="no-assets-selected"
+				iteratorURL="<%= configurationRenderURL %>"
+				total="<%= assetEntries.size() %>"
+			>
+				<liferay-ui:search-container-results
+					results="<%= assetEntries.subList(searchContainer.getStart(), searchContainer.getResultEnd()) %>"
+				/>
+
+				<liferay-ui:search-container-row
+					className="com.liferay.portlet.asset.model.AssetEntry"
+					escapedModel="<%= true %>"
+					keyProperty="entryId"
+					modelVar="assetEntry"
+				>
+
+					<%
+					AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(assetEntry.getClassName());
+
+					AssetRenderer assetRenderer = assetRendererFactory.getAssetRenderer(assetEntry.getClassPK());
+					%>
+
+					<liferay-ui:search-container-column-text name="title">
+						<img alt="" src="<%= assetRenderer.getIconPath(renderRequest) %>" /><%= assetRenderer.getTitle(locale) %>
+					</liferay-ui:search-container-column-text>
+
+					<liferay-ui:search-container-column-text
+						name="type"
+						value="<%= assetRendererFactory.getTypeName(locale, false) %>"
+					/>
+
+					<liferay-ui:search-container-column-date
+						name="modified-date"
+						value="<%= assetEntry.getModifiedDate() %>"
+					/>
+
+					<liferay-ui:search-container-column-jsp
+						align="right"
+						path="/html/portlet/asset_publisher/asset_selection_action.jsp"
+					/>
+				</liferay-ui:search-container-row>
+
+				<liferay-ui:search-iterator paginate="<%= total > SearchContainer.DEFAULT_DELTA %>" />
+			</liferay-ui:search-container>
+
+			<c:if test='<%= SessionMessages.contains(renderRequest, "deletedMissingAssetEntries") %>'>
+				<div class="alert alert-info">
+					<liferay-ui:message key="the-selected-assets-have-been-removed-from-the-list-because-they-do-not-belong-in-the-scope-of-this-portlet" />
+				</div>
+			</c:if>
+
+			<%
+			classNameIds = availableClassNameIds;
+
+			String portletId = portletResource;
+
+			for (long groupId : groupIds) {
+			%>
+
+				<div class="select-asset-selector">
+					<div class="lfr-meta-actions edit-controls">
+						<liferay-ui:icon-menu cssClass="select-existing-selector" direction="right" icon='<%= themeDisplay.getPathThemeImages() + "/common/add.png" %>' message='<%= LanguageUtil.format(pageContext, (groupIds.length == 1) ? "select" : "select-in-x", new Object[] {HtmlUtil.escape((GroupLocalServiceUtil.getGroup(groupId)).getDescriptiveName(locale))}) %>' showWhenSingleIcon="<%= true %>">
+
+							<%
+							PortletURL assetBrowserURL = PortletURLFactoryUtil.create(request, PortletKeys.ASSET_BROWSER, PortalUtil.getControlPanelPlid(company.getCompanyId()), PortletRequest.RENDER_PHASE);
+
+							assetBrowserURL.setParameter("struts_action", "/asset_browser/view");
+							assetBrowserURL.setParameter("groupId", String.valueOf(groupId));
+							assetBrowserURL.setParameter("selectedGroupIds", String.valueOf(groupId));
+							assetBrowserURL.setParameter("eventName", eventName);
+							assetBrowserURL.setPortletMode(PortletMode.VIEW);
+							assetBrowserURL.setWindowState(LiferayWindowState.POP_UP);
+
+							for (AssetRendererFactory curRendererFactory : AssetRendererFactoryRegistryUtil.getAssetRendererFactories(company.getCompanyId())) {
+								if (!curRendererFactory.isSelectable()) {
+									continue;
+								}
+
+								assetBrowserURL.setParameter("typeSelection", curRendererFactory.getClassName());
+
+								Map<String, Object> data = new HashMap<String, Object>();
+
+								data.put("groupid", String.valueOf(groupId));
+								data.put("href", assetBrowserURL.toString());
+								data.put("title", LanguageUtil.format(pageContext, "select-x", curRendererFactory.getTypeName(locale, false)));
+
+								String type = curRendererFactory.getTypeName(locale, false);
+
+								data.put("type", type);
+							%>
+
+								<liferay-ui:icon
+									cssClass="asset-selector"
+									data="<%= data %>"
+									id="<%= groupId + FriendlyURLNormalizerUtil.normalize(type) %>"
+									message="<%= curRendererFactory.getTypeName(locale, false) %>"
+									src="<%= curRendererFactory.getIconPath(renderRequest) %>"
+									url="javascript:;"
+								/>
+
+							<%
+							}
+							%>
+
+						</liferay-ui:icon-menu>
+					</div>
+				</div>
+
+			<%
+			}
+			%>
+
+		</aui:fieldset>
+	</liferay-ui:section>
+	<liferay-ui:section>
+		<liferay-ui:error-marker key="errorSection" value="display-settings" />
+
+		<%@ include file="/html/portlet/asset_publisher/display_settings.jspf" %>
+	</liferay-ui:section>
+	<liferay-ui:section>
+		<liferay-ui:error-marker key="errorSection" value="subscriptions" />
+
+		<%@ include file="/html/portlet/asset_publisher/email_subscription_settings.jspf" %>
+	</liferay-ui:section>
+</liferay-ui:tabs>
+
+<aui:button-row>
+	<aui:button onClick='<%= renderResponse.getNamespace() + "saveSelectBoxes();" %>' type="submit" />
+</aui:button-row>
+
+<aui:script use="aui-base">
+	function selectAsset(assetEntryId, assetClassName, assetType, assetEntryTitle, groupName) {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = 'add-selection';
+		document.<portlet:namespace />fm.<portlet:namespace />assetEntryId.value = assetEntryId;
+		document.<portlet:namespace />fm.<portlet:namespace />assetEntryType.value = assetClassName;
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	A.getBody().delegate(
+		'click',
+		function(event) {
+			event.preventDefault();
+
+			var currentTarget = event.currentTarget;
+
+			Liferay.Util.selectEntity(
+				{
+					dialog: {
+						constrain: true,
+						modal: true,
+						width: 900
+					},
+					eventName: '<%= eventName %>',
+					id: '<%= eventName %>' + currentTarget.attr('id'),
+					title: currentTarget.attr('data-title'),
+					uri: currentTarget.attr('data-href')
+				},
+				function(event) {
+					selectAsset(event.assetentryid, event.assetclassname, event.assettype, event.assettitle, event.groupdescriptivename);
+				}
+			);
+		},
+		'.asset-selector a'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/css/.sass-cache/main.css
new file mode 100644
index 0000000..beed6f0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/css/.sass-cache/main.css
@@ -0,0 +1,177 @@
+.portlet-asset-publisher .asset-abstract {
+  margin-bottom: 2em; }
+  .portlet-asset-publisher .asset-abstract .asset-content p {
+    margin-bottom: 0; }
+  .portlet-asset-publisher .asset-abstract .asset-description {
+    clear: left; }
+.portlet-asset-publisher .asset-back-to {
+  text-align: right; }
+.portlet-asset-publisher .asset-content {
+  clear: right;
+  margin-bottom: 10px;
+  margin-left: 25px;
+  margin-right: 10px; }
+  .portlet-asset-publisher .asset-content .asset-description {
+    clear: left;
+    font-style: italic; }
+.portlet-asset-publisher .asset-flag {
+  margin-top: 1.8em; }
+.portlet-asset-publisher .asset-full-content .asset-content {
+  margin-right: 25px; }
+.portlet-asset-publisher .asset-full-content.show-asset-title .asset-content {
+  margin-right: 10px; }
+.portlet-asset-publisher .asset-full-content.no-title .asset-user-actions {
+  padding-bottom: 2em; }
+.portlet-asset-publisher .asset-edit {
+  float: right;
+  margin-left: 1em; }
+.portlet-asset-publisher .asset-metadata {
+  clear: both;
+  margin-left: 25px;
+  overflow: hidden; }
+  .portlet-asset-publisher .asset-metadata span {
+    float: left; }
+  .portlet-asset-publisher .asset-metadata .metadata-categories span {
+    float: none; }
+.portlet-asset-publisher .asset-more {
+  clear: left; }
+.portlet-asset-publisher .asset-small-image {
+  float: right;
+  padding-left: 0.5em;
+  width: 150px; }
+.portlet-asset-publisher .asset-actions {
+  float: right;
+  font-size: 11px;
+  font-weight: normal;
+  margin-bottom: 3px;
+  margin-top: 0; }
+.portlet-asset-publisher .asset-title {
+  border-bottom: 1px solid #DDD;
+  margin-right: 8px;
+  padding-bottom: 1px; }
+  .portlet-asset-publisher .asset-title .asset-actions img {
+    margin-left: 5px; }
+  .portlet-asset-publisher .asset-title a {
+    text-decoration: none; }
+    .portlet-asset-publisher .asset-title a:hover {
+      text-decoration: underline; }
+.portlet-asset-publisher .asset-user-actions .export-actions, .portlet-asset-publisher .asset-user-actions .print-action, .portlet-asset-publisher .asset-user-actions .locale-actions {
+  float: right; }
+.portlet-asset-publisher .asset-user-actions .locale-separator {
+  border-right: 1px solid #CCC;
+  float: right;
+  margin-right: 1em;
+  padding: 0.8em 0.5em; }
+.portlet-asset-publisher .asset-user-actions .print-action {
+  margin: 0 1em; }
+.portlet-asset-publisher .edit-controls {
+  margin-bottom: 20px; }
+.portlet-asset-publisher .lfr-meta-actions {
+  margin-right: 1em;
+  padding-top: 0; }
+.portlet-asset-publisher .add-asset-selector {
+  margin-right: 0; }
+.portlet-asset-publisher .metadata-author {
+  background: url(@theme_image_path@/portlet/edit_guest.png) no-repeat 0 0;
+  float: left;
+  font-weight: bold;
+  margin-right: 10px;
+  padding-left: 25px; }
+.portlet-asset-publisher .metadata-entry {
+  color: #999; }
+.portlet-asset-publisher .metadata-modified-date, .portlet-asset-publisher .metadata-create-date, .portlet-asset-publisher .metadata-publish-date, .portlet-asset-publisher .metadata-expiration-date {
+  background: url(@theme_image_path@/common/date.png) no-repeat 0 0;
+  color: #999;
+  margin-bottom: 1em;
+  padding-left: 25px; }
+.portlet-asset-publisher .metadata-priority {
+  background: url(@theme_image_path@/common/top.png) no-repeat 0 20%;
+  margin-right: 10px;
+  padding-left: 25px; }
+.portlet-asset-publisher .metadata-view-count {
+  margin-right: 10px; }
+.portlet-asset-publisher .subscribe-action {
+  text-align: right; }
+  .portlet-asset-publisher .subscribe-action .taglib-rss {
+    margin-left: 10px; }
+.portlet-asset-publisher .taglib-asset-categories-summary {
+  float: left; }
+.portlet-asset-publisher .taglib-asset-tags-summary {
+  float: left; }
+.portlet-asset-publisher .title-list .asset-actions {
+  left: 10px;
+  position: relative; }
+.portlet-asset-publisher .title-list .asset-metadata {
+  padding: 0; }
+.portlet-asset-publisher .title-list a {
+  float: left; }
+.portlet-asset-publisher li.title-list {
+  clear: both;
+  list-style: none;
+  margin-bottom: 0.15em;
+  margin-right: 8px;
+  padding-bottom: 1px; }
+.portlet-asset-publisher ul.title-list {
+  margin-left: 0; }
+
+.portlet-configuration .form .queryRules fieldset {
+  padding: 0; }
+  .portlet-configuration .form .queryRules fieldset legend {
+    font-size: 1em;
+    font-weight: normal;
+    padding: 0; }
+.portlet-configuration .form .lfr-form-row {
+  background-color: #F3F3F3; }
+  .portlet-configuration .form .lfr-form-row:hover {
+    background-color: #DFFCCB; }
+  .portlet-configuration .form .lfr-form-row .field {
+    line-height: 2; }
+    .portlet-configuration .form .lfr-form-row .field.tags-selector, .portlet-configuration .form .lfr-form-row .field.categories-selector {
+      clear: both;
+      line-height: 1.5;
+      margin-top: 5px;
+      width: 100%; }
+.portlet-configuration .form .asset-query-rule-error {
+  background-color: #fee5e2; }
+.portlet-configuration .form .general-display-settings {
+  margin-bottom: 1em; }
+.portlet-configuration .lfr-panel .lfr-panel-titlebar {
+  margin-bottom: 0; }
+.portlet-configuration .lfr-panel-content {
+  background-color: #F8F8F8;
+  padding: 10px; }
+.portlet-configuration .dl-file-icon {
+  border-width: 0;
+  margin-right: 0.3em;
+  position: relative;
+  text-align: left;
+  top: 0.4em; }
+.portlet-configuration .add-asset-selector {
+  overflow: auto; }
+.portlet-configuration .asset-search {
+  margin-bottom: 1em; }
+.portlet-configuration .asset-subtype, .portlet-configuration .asset-subtypefields-wrapper-enable {
+  margin-left: 2em; }
+.portlet-configuration .asset-subtypefields-wrapper {
+  display: inline; }
+.portlet-configuration .asset-subtypefields-message {
+  margin-left: 4em; }
+.portlet-configuration .asset-subtypefields-popup {
+  color: #5B677D;
+  cursor: pointer;
+  text-decoration: underline; }
+.portlet-configuration .asset-subtypefield-selected {
+  padding-top: 10px;
+  margin-left: 6em; }
+.portlet-configuration .select-asset-selector {
+  margin: 1em 0;
+  overflow: auto; }
+  .portlet-configuration .select-asset-selector .select-existing-selector {
+    margin: 0; }
+
+.ie .portlet-asset-publisher .asset-metadata {
+  height: 1%; }
+
+.social-boomarks-options {
+  margin-left: 2em; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/css/main.css
new file mode 100644
index 0000000..57c5b6d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/css/main.css
@@ -0,0 +1,314 @@
+.portlet-asset-publisher {
+	.asset-abstract {
+		margin-bottom: 2em;
+
+		.asset-content p {
+			margin-bottom: 0;
+		}
+
+		.asset-description {
+			clear: left;
+		}
+	}
+
+	.asset-back-to {
+		text-align: right;
+	}
+
+	.asset-content {
+		clear: right;
+		margin-bottom: 10px;
+		margin-left: 25px;
+		margin-right: 10px;
+
+		.asset-description {
+			clear: left;
+			font-style: italic;
+		}
+	}
+
+	.asset-flag {
+		margin-top: 1.8em;
+	}
+
+	.asset-full-content {
+		.asset-content {
+			margin-right: 25px;
+		}
+
+		&.show-asset-title .asset-content {
+			margin-right: 10px;
+		}
+
+		&.no-title .asset-user-actions{
+			padding-bottom: 2em;
+		}
+	}
+
+	.asset-edit {
+		float: right;
+		margin-left: 1em;
+	}
+
+	.asset-metadata {
+		clear: both;
+		margin-left: 25px;
+		overflow: hidden;
+
+		span {
+			float: left;
+		}
+
+		.metadata-categories span {
+			float: none;
+		}
+	}
+
+	.asset-more {
+		clear: left;
+	}
+
+	.asset-small-image {
+		float: right;
+		padding-left: 0.5em;
+		width: 150px;
+	}
+
+	.asset-actions {
+		float: right;
+		font-size: 11px;
+		font-weight: normal;
+		margin-bottom: 3px;
+		margin-top: 0;
+	}
+
+	.asset-title {
+		border-bottom: 1px solid #DDD;
+		margin-right: 8px;
+		padding-bottom: 1px;
+
+		.asset-actions img {
+			margin-left: 5px;
+		}
+
+		a {
+			text-decoration: none;
+
+			&:hover {
+				text-decoration: underline;
+			}
+		}
+	}
+
+	.asset-user-actions {
+		.export-actions, .print-action, .locale-actions {
+			float: right;
+		}
+
+		.locale-separator {
+			border-right: 1px solid #CCC;
+			float: right;
+			margin-right: 1em;
+			padding: 0.8em 0.5em;
+		}
+
+		.print-action {
+			margin: 0 1em;
+		}
+	}
+
+	.edit-controls {
+		margin-bottom: 20px;
+	}
+
+	.lfr-meta-actions {
+		margin-right: 1em;
+		padding-top: 0;
+	}
+
+	.add-asset-selector {
+		margin-right: 0;
+	}
+
+	.metadata-author {
+		background: url(@theme_image_path@/portlet/edit_guest.png) no-repeat 0 0;
+		float: left;
+		font-weight: bold;
+		margin-right: 10px;
+		padding-left: 25px;
+	}
+
+	.metadata-entry {
+		color: #999;
+	}
+
+	.metadata-modified-date, .metadata-create-date, .metadata-publish-date, .metadata-expiration-date {
+		background: url(@theme_image_path@/common/date.png) no-repeat 0 0;
+		color: #999;
+		margin-bottom: 1em;
+		padding-left: 25px;
+	}
+
+	.metadata-priority {
+		background: url(@theme_image_path@/common/top.png) no-repeat 0 20%;
+		margin-right: 10px;
+		padding-left: 25px;
+	}
+
+	.metadata-view-count {
+		margin-right: 10px;
+	}
+
+	.subscribe-action {
+		text-align: right;
+
+		.taglib-rss {
+			margin-left: 10px;
+		}
+	}
+
+	.taglib-asset-categories-summary {
+		float: left;
+	}
+
+	.taglib-asset-tags-summary {
+		float: left;
+	}
+
+	.title-list {
+		.asset-actions {
+			left: 10px;
+			position: relative;
+		}
+
+		.asset-metadata {
+			padding: 0;
+		}
+
+		a {
+			float: left;
+		}
+	}
+
+	li.title-list {
+		clear: both;
+		list-style: none;
+		margin-bottom: 0.15em;
+		margin-right: 8px;
+		padding-bottom: 1px;
+	}
+
+	ul.title-list {
+		margin-left: 0;
+	}
+}
+
+.portlet-configuration {
+	.form {
+		.queryRules fieldset {
+			padding: 0;
+
+			legend {
+				font-size: 1em;
+				font-weight: normal;
+				padding: 0;
+			}
+		}
+
+		.lfr-form-row {
+			background-color: #F3F3F3;
+
+			&:hover {
+				background-color: #DFFCCB;
+			}
+
+			.field {
+				line-height: 2;
+
+				&.tags-selector, &.categories-selector {
+					clear: both;
+					line-height: 1.5;
+					margin-top: 5px;
+					width: 100%;
+				}
+			}
+		}
+
+		.asset-query-rule-error {
+			background-color: #fee5e2;
+		}
+
+		.general-display-settings {
+			margin-bottom: 1em;
+		}
+	}
+
+	.lfr-panel .lfr-panel-titlebar {
+		margin-bottom: 0;
+	}
+
+	.lfr-panel-content {
+		background-color: #F8F8F8;
+		padding: 10px;
+	}
+
+	.dl-file-icon {
+		border-width: 0;
+		margin-right: 0.3em;
+		position: relative;
+		text-align: left;
+		top: 0.4em;
+	}
+
+	.add-asset-selector {
+		overflow: auto;
+	}
+
+	.asset-search {
+		margin-bottom: 1em;
+	}
+
+	.asset-subtype, .asset-subtypefields-wrapper-enable {
+		margin-left: 2em;
+	}
+
+	.asset-subtypefields-wrapper {
+		display: inline;
+	}
+
+	.asset-subtypefields-message {
+		margin-left: 4em;
+	}
+
+	.asset-subtypefields-popup {
+		color: #5B677D;
+		cursor: pointer;
+		text-decoration: underline;
+	}
+
+	.asset-subtypefield-selected {
+		padding-top: 10px;
+		margin-left: 6em;
+	}
+
+	.select-asset-selector {
+		margin: 1em 0;
+		overflow: auto;
+
+		.select-existing-selector {
+			margin: 0;
+		}
+	}
+}
+
+.ie {
+	.portlet-asset-publisher {
+		.asset-metadata {
+			height: 1%;
+		}
+	}
+}
+
+.social-boomarks-options {
+	margin-left: 2em;
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/display/abstracts.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/display/abstracts.jsp
new file mode 100644
index 0000000..8804d3e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/display/abstracts.jsp
@@ -0,0 +1,124 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_publisher/init.jsp" %>
+
+<%
+List results = (List)request.getAttribute("view.jsp-results");
+
+int assetEntryIndex = ((Integer)request.getAttribute("view.jsp-assetEntryIndex")).intValue();
+
+AssetEntry assetEntry = (AssetEntry)request.getAttribute("view.jsp-assetEntry");
+AssetRendererFactory assetRendererFactory = (AssetRendererFactory)request.getAttribute("view.jsp-assetRendererFactory");
+AssetRenderer assetRenderer = (AssetRenderer)request.getAttribute("view.jsp-assetRenderer");
+
+boolean show = ((Boolean)request.getAttribute("view.jsp-show")).booleanValue();
+
+request.setAttribute("view.jsp-showIconLabel", true);
+
+String title = (String)request.getAttribute("view.jsp-title");
+
+if (Validator.isNull(title)) {
+	title = assetRenderer.getTitle(locale);
+}
+
+PortletURL viewFullContentURL = liferayPortletResponse.createLiferayPortletURL(plid, portletDisplay.getId(), PortletRequest.RENDER_PHASE, true);
+
+viewFullContentURL.setParameter("struts_action", "/asset_publisher/view_content");
+viewFullContentURL.setParameter("redirect", currentURL);
+viewFullContentURL.setParameter("assetEntryId", String.valueOf(assetEntry.getEntryId()));
+viewFullContentURL.setParameter("type", assetRendererFactory.getType());
+
+if (Validator.isNotNull(assetRenderer.getUrlTitle())) {
+	if (assetRenderer.getGroupId() != scopeGroupId) {
+		viewFullContentURL.setParameter("groupId", String.valueOf(assetRenderer.getGroupId()));
+	}
+
+	viewFullContentURL.setParameter("urlTitle", assetRenderer.getUrlTitle());
+}
+
+String summary = StringUtil.shorten(assetRenderer.getSummary(locale), abstractLength);
+
+String viewURL = null;
+
+if (viewInContext) {
+	String viewFullContentURLString = viewFullContentURL.toString();
+
+	viewFullContentURLString = HttpUtil.setParameter(viewFullContentURLString, "redirect", currentURL);
+
+	viewURL = assetRenderer.getURLViewInContext(liferayPortletRequest, liferayPortletResponse, viewFullContentURLString);
+}
+else {
+	viewURL = viewFullContentURL.toString();
+}
+
+if (Validator.isNull(viewURL)) {
+	viewURL = viewFullContentURL.toString();
+}
+
+String viewURLMessage = viewInContext ? assetRenderer.getViewInContextMessage() : "read-more-x-about-x";
+
+viewURL = _checkViewURL(assetEntry, viewInContext, viewURL, currentURL, themeDisplay);
+%>
+
+<c:if test="<%= show %>">
+	<div class="asset-abstract <%= defaultAssetPublisher ? "default-asset-publisher" : StringPool.BLANK %>">
+		<liferay-util:include page="/html/portlet/asset_publisher/asset_actions.jsp" />
+
+		<h3 class="asset-title">
+			<c:choose>
+				<c:when test="<%= Validator.isNotNull(viewURL) %>">
+					<a href="<%= viewURL %>"><img alt="" src="<%= assetRenderer.getIconPath(renderRequest) %>" /> <%= HtmlUtil.escape(title) %></a>
+				</c:when>
+				<c:otherwise>
+					<img alt="" src="<%= assetRenderer.getIconPath(renderRequest) %>" /> <%= HtmlUtil.escape(title) %>
+				</c:otherwise>
+			</c:choose>
+		</h3>
+
+		<div class="asset-content">
+			<div class="asset-summary">
+
+				<%
+				String path = assetRenderer.render(renderRequest, renderResponse, AssetRenderer.TEMPLATE_ABSTRACT);
+
+				request.setAttribute(WebKeys.ASSET_RENDERER, assetRenderer);
+				request.setAttribute(WebKeys.ASSET_PUBLISHER_ABSTRACT_LENGTH, abstractLength);
+				request.setAttribute(WebKeys.ASSET_PUBLISHER_VIEW_URL, viewURL);
+				%>
+
+				<c:choose>
+					<c:when test="<%= path == null %>">
+						<%= HtmlUtil.escape(summary) %>
+					</c:when>
+					<c:otherwise>
+						<liferay-util:include page="<%= path %>" portletId="<%= assetRendererFactory.getPortletId() %>" />
+					</c:otherwise>
+				</c:choose>
+			</div>
+
+			<c:if test="<%= Validator.isNotNull(viewURL) %>">
+				<div class="asset-more">
+					<a href="<%= viewURL %>"><liferay-ui:message arguments='<%= new Object[] {"hide-accessible", HtmlUtil.escape(assetRenderer.getTitle(locale))} %>' key="<%= viewURLMessage %>" /> &raquo; </a>
+				</div>
+			</c:if>
+		</div>
+
+		<div class="asset-metadata">
+			<%@ include file="/html/portlet/asset_publisher/asset_metadata.jspf" %>
+		</div>
+	</div>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/display/full_content.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/display/full_content.jsp
new file mode 100644
index 0000000..5e1c91e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/display/full_content.jsp
@@ -0,0 +1,254 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_publisher/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+List results = (List)request.getAttribute("view.jsp-results");
+
+if (Validator.isNull(redirect) && results.isEmpty()) {
+	PortletURL portletURL = renderResponse.createRenderURL();
+
+	portletURL.setParameter("struts_action", "/asset_publisher/view");
+
+	redirect = portletURL.toString();
+}
+
+int assetEntryIndex = ((Integer)request.getAttribute("view.jsp-assetEntryIndex")).intValue();
+
+AssetEntry assetEntry = (AssetEntry)request.getAttribute("view.jsp-assetEntry");
+AssetRendererFactory assetRendererFactory = (AssetRendererFactory)request.getAttribute("view.jsp-assetRendererFactory");
+AssetRenderer assetRenderer = (AssetRenderer)request.getAttribute("view.jsp-assetRenderer");
+
+String languageId = LanguageUtil.getLanguageId(request);
+
+String title = assetRenderer.getTitle(LocaleUtil.fromLanguageId(languageId));
+
+boolean show = ((Boolean)request.getAttribute("view.jsp-show")).booleanValue();
+boolean print = ((Boolean)request.getAttribute("view.jsp-print")).booleanValue();
+
+request.setAttribute(WebKeys.LAYOUT_ASSET_ENTRY, assetEntry);
+
+request.setAttribute("view.jsp-fullContentRedirect", currentURL);
+request.setAttribute("view.jsp-showIconLabel", true);
+%>
+
+<c:if test="<%= showAssetTitle %>">
+	<liferay-ui:header
+		backURL="<%= print ? null : redirect %>"
+		localizeTitle="<%= false %>"
+		title="<%= title %>"
+	/>
+</c:if>
+
+<div class="asset-full-content <%= defaultAssetPublisher ? "default-asset-publisher" : StringPool.BLANK %> <%= showAssetTitle ? "show-asset-title" : "no-title" %>">
+	<c:if test="<%= !print %>">
+		<liferay-util:include page="/html/portlet/asset_publisher/asset_actions.jsp" />
+	</c:if>
+
+	<c:if test="<%= (enableConversions && assetRenderer.isConvertible()) || (enablePrint && assetRenderer.isPrintable()) || (showAvailableLocales && assetRenderer.isLocalizable()) %>">
+		<div class="asset-user-actions">
+			<c:if test="<%= enablePrint %>">
+				<div class="print-action">
+					<%@ include file="/html/portlet/asset_publisher/asset_print.jspf" %>
+				</div>
+			</c:if>
+
+			<c:if test="<%= (enableConversions && assetRenderer.isConvertible()) && !print %>">
+
+				<%
+				PortletURL exportAssetURL = assetRenderer.getURLExport(liferayPortletRequest, liferayPortletResponse);
+				%>
+
+				<div class="export-actions">
+					<%@ include file="/html/portlet/asset_publisher/asset_export.jspf" %>
+				</div>
+			</c:if>
+			<c:if test="<%= (showAvailableLocales && assetRenderer.isLocalizable()) && !print %>">
+
+				<%
+				String[] availableLanguageIds = assetRenderer.getAvailableLanguageIds();
+				%>
+
+				<c:if test="<%= availableLanguageIds.length > 1 %>">
+					<c:if test="<%= enableConversions || enablePrint %>">
+						<div class="locale-separator"> </div>
+					</c:if>
+
+					<div class="locale-actions">
+						<liferay-ui:language displayStyle="<%= 0 %>" formAction="<%= currentURL %>" languageId="<%= languageId %>" languageIds="<%= availableLanguageIds %>" />
+					</div>
+				</c:if>
+			</c:if>
+		</div>
+	</c:if>
+
+	<%
+
+	// Dynamically created asset entries are never persisted so incrementing the view counter breaks
+
+	if (!assetEntry.isNew() && assetEntry.isVisible()) {
+		AssetEntry incrementAssetEntry = null;
+
+		if (assetEntryQuery.isEnablePermissions()) {
+			incrementAssetEntry = AssetEntryServiceUtil.incrementViewCounter(assetEntry.getClassName(), assetEntry.getClassPK());
+		}
+		else {
+			incrementAssetEntry = AssetEntryLocalServiceUtil.incrementViewCounter(user.getUserId(), assetEntry.getClassName(), assetEntry.getClassPK());
+		}
+
+		if (incrementAssetEntry != null) {
+			assetEntry = incrementAssetEntry;
+		}
+	}
+
+	if (showContextLink) {
+		if (PortalUtil.getPlidFromPortletId(assetRenderer.getGroupId(), assetRendererFactory.getPortletId()) == 0) {
+			showContextLink = false;
+		}
+	}
+
+	PortletURL viewFullContentURL = renderResponse.createRenderURL();
+
+	viewFullContentURL.setParameter("struts_action", "/asset_publisher/view_content");
+	viewFullContentURL.setParameter("type", assetRendererFactory.getType());
+	viewFullContentURL.setParameter("viewMode", print ? Constants.PRINT : Constants.VIEW);
+
+	if (Validator.isNotNull(assetRenderer.getUrlTitle())) {
+		if (assetRenderer.getGroupId() != scopeGroupId) {
+			viewFullContentURL.setParameter("groupId", String.valueOf(assetRenderer.getGroupId()));
+		}
+
+		viewFullContentURL.setParameter("urlTitle", assetRenderer.getUrlTitle());
+	}
+
+	String viewFullContentURLString = viewFullContentURL.toString();
+
+	viewFullContentURLString = HttpUtil.setParameter(viewFullContentURLString, "redirect", currentURL);
+	%>
+
+	<div class="asset-content" id="<portlet:namespace /><%= assetEntry.getEntryId() %>">
+		<c:if test='<%= enableSocialBookmarks && socialBookmarksDisplayPosition.equals("top") && !print %>'>
+			<liferay-ui:social-bookmarks
+				contentId="<%= String.valueOf(assetEntry.getEntryId()) %>"
+				displayStyle="<%= socialBookmarksDisplayStyle %>"
+				target="_blank"
+				title="<%= title %>"
+				url="<%= PortalUtil.getCanonicalURL(viewFullContentURL.toString(), themeDisplay, layout) %>"
+			/>
+		</c:if>
+
+		<%
+		String path = assetRenderer.render(renderRequest, renderResponse, AssetRenderer.TEMPLATE_FULL_CONTENT);
+
+		request.setAttribute(WebKeys.ASSET_RENDERER_FACTORY, assetRendererFactory);
+		request.setAttribute(WebKeys.ASSET_RENDERER, assetRenderer);
+		%>
+
+		<liferay-util:include page="<%= path %>" portletId="<%= assetRendererFactory.getPortletId() %>">
+			<liferay-util:param name="showHeader" value="<%= Boolean.FALSE.toString() %>" />
+		</liferay-util:include>
+
+		<c:if test="<%= enableFlags %>">
+			<div class="asset-flag">
+				<liferay-ui:flags
+					className="<%= assetEntry.getClassName() %>"
+					classPK="<%= assetEntry.getClassPK() %>"
+					contentTitle="<%= title %>"
+					reportedUserId="<%= assetRenderer.getUserId() %>"
+				/>
+			</div>
+		</c:if>
+
+		<c:if test='<%= enableSocialBookmarks && socialBookmarksDisplayPosition.equals("bottom") && !print %>'>
+			<liferay-ui:social-bookmarks
+				displayStyle="<%= socialBookmarksDisplayStyle %>"
+				target="_blank"
+				title="<%= title %>"
+				url="<%= PortalUtil.getCanonicalURL(viewFullContentURL.toString(), themeDisplay, layout) %>"
+			/>
+		</c:if>
+
+		<c:if test="<%= enableRatings %>">
+			<div class="asset-ratings">
+
+				<%
+				String assetEntryClassName = assetEntry.getClassName();
+
+				String ratingsType = "stars";
+
+				if (assetEntryClassName.equals(MBDiscussion.class.getName()) || assetEntryClassName.equals(MBMessage.class.getName())) {
+					ratingsType = "thumbs";
+				}
+				%>
+
+				<liferay-ui:ratings
+					className="<%= assetEntry.getClassName() %>"
+					classPK="<%= assetEntry.getClassPK() %>"
+					type="<%= ratingsType %>"
+				/>
+			</div>
+		</c:if>
+
+		<c:if test="<%= showContextLink && !print && assetEntry.isVisible() %>">
+			<div class="asset-more">
+				<a href="<%= assetRenderer.getURLViewInContext(liferayPortletRequest, liferayPortletResponse, viewFullContentURLString) %>"><liferay-ui:message key="<%= assetRenderer.getViewInContextMessage() %>" /> &raquo;</a>
+			</div>
+		</c:if>
+
+		<br />
+
+		<c:if test="<%= enableRelatedAssets %>">
+			<liferay-ui:asset-links
+				assetEntryId="<%= assetEntry.getEntryId() %>"
+			/>
+		</c:if>
+
+		<c:if test="<%= Validator.isNotNull(assetRenderer.getDiscussionPath()) && enableComments %>">
+			<br />
+
+			<portlet:actionURL var="discussionURL">
+				<portlet:param name="struts_action" value='<%= "/asset_publisher/" + assetRenderer.getDiscussionPath() %>' />
+			</portlet:actionURL>
+
+			<liferay-ui:discussion
+				className="<%= assetEntry.getClassName() %>"
+				classPK="<%= assetEntry.getClassPK() %>"
+				formAction="<%= discussionURL %>"
+				formName='<%= "fm" + assetEntry.getClassPK() %>'
+				ratingsEnabled="<%= enableCommentRatings %>"
+				redirect="<%= currentURL %>"
+				userId="<%= assetRenderer.getUserId() %>"
+			/>
+		</c:if>
+	</div>
+
+	<c:if test="<%= show %>">
+		<div class="asset-metadata">
+			<%@ include file="/html/portlet/asset_publisher/asset_metadata.jspf" %>
+		</div>
+	</c:if>
+</div>
+
+<c:if test="<%= !showAssetTitle && ((assetEntryIndex + 1) < results.size()) %>">
+	<div class="separator"><!-- --></div>
+</c:if>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.asset_publisher.display_full_content_jsp");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/display/preview.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/display/preview.jsp
new file mode 100644
index 0000000..1eccd32
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/display/preview.jsp
@@ -0,0 +1,84 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_publisher/init.jsp" %>
+
+<%
+AssetEntry assetEntry = (AssetEntry)request.getAttribute("add_panel.jsp-assetEntry");
+AssetRenderer assetRenderer = (AssetRenderer)request.getAttribute("add_panel.jsp-assetRenderer");
+%>
+
+<div class="asset-preview">
+
+	<%
+	String imagePreviewURL = assetRenderer.getURLImagePreview(liferayPortletRequest);
+	%>
+
+	<c:if test="<%= Validator.isNotNull(imagePreviewURL) %>">
+		<div class="asset-image-preview">
+			<img alt="<%= assetRenderer.getTitle(themeDisplay.getLocale()) %>" src="<%= imagePreviewURL %>" />
+		</div>
+	</c:if>
+
+	<div class="asset-title">
+		<%= assetRenderer.getTitle(themeDisplay.getLocale()) %>
+	</div>
+
+	<%
+	String displayDateString = StringPool.BLANK;
+
+	if (Validator.isNotNull(assetRenderer.getDisplayDate())) {
+		Format displayFormatDate = FastDateFormatFactoryUtil.getSimpleDateFormat("MMMM d, yyyy", locale, timeZone);
+
+		displayDateString = CharPool.OPEN_PARENTHESIS + displayFormatDate.format(assetRenderer.getDisplayDate()) + CharPool.CLOSE_PARENTHESIS;
+	}
+	%>
+
+	<div class="asset-information">
+		<span class="user-name"><%= assetRenderer.getUserName() %></span>&nbsp; <span class="display-date"><%= displayDateString %></span>
+	</div>
+
+	<div class="asset-summary">
+		<%= StringUtil.shorten(assetRenderer.getSummary(themeDisplay.getLocale()), 320) %>
+	</div>
+
+	<div class="asset-metadata">
+		<div class="categories">
+			<liferay-ui:asset-categories-summary
+				className="<%= assetEntry.getClassName() %>"
+				classPK="<%= assetEntry.getClassPK () %>"
+			/>
+		</div>
+
+		<div class="tags">
+			<liferay-ui:asset-tags-summary
+				className="<%= assetEntry.getClassName() %>"
+				classPK="<%= assetEntry.getClassPK () %>"
+			/>
+		</div>
+	</div>
+
+	<%
+	Map<String, Object> data = new HashMap<String, Object>();
+
+	data.put("class-name", assetEntry.getClassName());
+	data.put("class-pk", assetEntry.getClassPK());
+	data.put("instanceable", Boolean.TRUE);
+	data.put("portlet-id", assetRenderer.getAddToPagePortletId());
+	%>
+
+	<aui:button cssClass="add-button-preview" data="<%= data %>" value="add" />
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/display/table.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/display/table.jsp
new file mode 100644
index 0000000..3980c0f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/display/table.jsp
@@ -0,0 +1,196 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_publisher/init.jsp" %>
+
+<%
+List results = (List)request.getAttribute("view.jsp-results");
+
+int assetEntryIndex = ((Integer)request.getAttribute("view.jsp-assetEntryIndex")).intValue();
+
+AssetEntry assetEntry = (AssetEntry)request.getAttribute("view.jsp-assetEntry");
+AssetRendererFactory assetRendererFactory = (AssetRendererFactory)request.getAttribute("view.jsp-assetRendererFactory");
+AssetRenderer assetRenderer = (AssetRenderer)request.getAttribute("view.jsp-assetRenderer");
+
+Group stageableGroup = themeDisplay.getScopeGroup();
+
+if (stageableGroup.isLayout()) {
+	stageableGroup = layout.getGroup();
+}
+
+String title = (String)request.getAttribute("view.jsp-title");
+
+if (Validator.isNull(title)) {
+	title = assetRenderer.getTitle(locale);
+}
+
+boolean show = ((Boolean)request.getAttribute("view.jsp-show")).booleanValue();
+
+PortletURL editPortletURL = assetRenderer.getURLEdit(liferayPortletRequest, liferayPortletResponse);
+
+PortletURL viewFullContentURL = renderResponse.createRenderURL();
+
+viewFullContentURL.setParameter("struts_action", "/asset_publisher/view_content");
+viewFullContentURL.setParameter("assetEntryId", String.valueOf(assetEntry.getEntryId()));
+viewFullContentURL.setParameter("type", assetRendererFactory.getType());
+
+if (Validator.isNotNull(assetRenderer.getUrlTitle())) {
+	if (assetRenderer.getGroupId() != scopeGroupId) {
+		viewFullContentURL.setParameter("groupId", String.valueOf(assetRenderer.getGroupId()));
+	}
+
+	viewFullContentURL.setParameter("urlTitle", assetRenderer.getUrlTitle());
+}
+
+String viewFullContentURLString = viewFullContentURL.toString();
+
+viewFullContentURLString = HttpUtil.setParameter(viewFullContentURLString, "redirect", currentURL);
+
+String viewURL = viewInContext ? assetRenderer.getURLViewInContext(liferayPortletRequest, liferayPortletResponse, viewFullContentURLString) : viewFullContentURL.toString();
+
+viewURL = _checkViewURL(assetEntry, viewInContext, viewURL, currentURL, themeDisplay);
+
+request.setAttribute("view.jsp-showIconLabel", false);
+%>
+
+<c:if test="<%= assetEntryIndex == 0 %>">
+	<table class="table table-bordered table-hover table-striped">
+	<thead class="table-columns">
+	<tr>
+		<th class="table-header table-sortable-column">
+			<liferay-ui:message key="title" />
+		</th>
+
+		<%
+		for (int m = 0; m < metadataFields.length; m++) {
+		%>
+
+			<th class="table-header">
+				<liferay-ui:message key="<%= metadataFields[m] %>" />
+			</th>
+
+		<%
+		}
+		%>
+
+		<c:if test="<%= assetRenderer.hasEditPermission(permissionChecker) && (editPortletURL != null) && !stageableGroup.hasStagingGroup() %>">
+			<th class="table-header"></th>
+		</c:if>
+	</tr>
+	</thead>
+
+	<tbody class="table-data">
+</c:if>
+
+<tr>
+	<td class="table-cell">
+		<c:choose>
+			<c:when test="<%= Validator.isNotNull(viewURL) %>">
+				<a href="<%= viewURL %>"><%= HtmlUtil.escape(title) %></a>
+			</c:when>
+			<c:otherwise>
+				<%= HtmlUtil.escape(title) %>
+			</c:otherwise>
+		</c:choose>
+	</td>
+
+	<%
+	for (int m = 0; m < metadataFields.length; m++) {
+		String value = null;
+
+		if (metadataFields[m].equals("create-date")) {
+			value = dateFormatDate.format(assetEntry.getCreateDate());
+		}
+		else if (metadataFields[m].equals("modified-date")) {
+			value = dateFormatDate.format(assetEntry.getModifiedDate());
+		}
+		else if (metadataFields[m].equals("publish-date")) {
+			if (assetEntry.getPublishDate() == null) {
+				value = StringPool.BLANK;
+			}
+			else {
+				value = dateFormatDate.format(assetEntry.getPublishDate());
+			}
+		}
+		else if (metadataFields[m].equals("expiration-date")) {
+			if (assetEntry.getExpirationDate() == null) {
+				value = StringPool.BLANK;
+			}
+			else {
+				value = dateFormatDate.format(assetEntry.getExpirationDate());
+			}
+		}
+		else if (metadataFields[m].equals("priority")) {
+			value = String.valueOf(assetEntry.getPriority());
+		}
+		else if (metadataFields[m].equals("author")) {
+			String userName = PortalUtil.getUserName(assetRenderer.getUserId(), assetRenderer.getUserName());
+
+			value = HtmlUtil.escape(userName);
+		}
+		else if (metadataFields[m].equals("view-count")) {
+			value = String.valueOf(assetEntry.getViewCount());
+		}
+		else if (metadataFields[m].equals("categories")) {
+		%>
+
+			<td class="table-cell">
+				<liferay-ui:asset-categories-summary
+					className="<%= assetEntry.getClassName() %>"
+					classPK="<%= assetEntry.getClassPK() %>"
+					portletURL="<%= renderResponse.createRenderURL() %>"
+				/>
+			</td>
+
+		<%
+		}
+		else if (metadataFields[m].equals("tags")) {
+		%>
+
+			<td class="table-cell">
+				<liferay-ui:asset-tags-summary
+					className="<%= assetEntry.getClassName() %>"
+					classPK="<%= assetEntry.getClassPK() %>"
+					portletURL="<%= renderResponse.createRenderURL() %>"
+				/>
+			</td>
+
+		<%
+		}
+
+		if (value != null) {
+	%>
+
+			<td class="table-cell">
+				<liferay-ui:message key="<%= value %>" />
+			</td>
+
+	<%
+		}
+	}
+	%>
+
+	<c:if test="<%= assetRenderer.hasEditPermission(permissionChecker) && (editPortletURL != null) && !stageableGroup.hasStagingGroup() %>">
+		<td class="table-cell">
+			<liferay-util:include page="/html/portlet/asset_publisher/asset_actions.jsp" />
+		</td>
+	</c:if>
+</tr>
+
+<c:if test="<%= (assetEntryIndex + 1) == results.size() %>">
+	</tbody>
+	</table>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/display/title_list.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/display/title_list.jsp
new file mode 100644
index 0000000..d70d1e4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/display/title_list.jsp
@@ -0,0 +1,82 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_publisher/init.jsp" %>
+
+<%
+List results = (List)request.getAttribute("view.jsp-results");
+
+int assetEntryIndex = ((Integer)request.getAttribute("view.jsp-assetEntryIndex")).intValue();
+
+AssetEntry assetEntry = (AssetEntry)request.getAttribute("view.jsp-assetEntry");
+AssetRendererFactory assetRendererFactory = (AssetRendererFactory)request.getAttribute("view.jsp-assetRendererFactory");
+AssetRenderer assetRenderer = (AssetRenderer)request.getAttribute("view.jsp-assetRenderer");
+
+String title = (String)request.getAttribute("view.jsp-title");
+
+if (Validator.isNull(title)) {
+	title = assetRenderer.getTitle(locale);
+}
+
+boolean show = ((Boolean)request.getAttribute("view.jsp-show")).booleanValue();
+
+request.setAttribute("view.jsp-showIconLabel", false);
+
+PortletURL viewFullContentURL = renderResponse.createRenderURL();
+
+viewFullContentURL.setParameter("struts_action", "/asset_publisher/view_content");
+viewFullContentURL.setParameter("assetEntryId", String.valueOf(assetEntry.getEntryId()));
+viewFullContentURL.setParameter("type", assetRendererFactory.getType());
+
+if (Validator.isNotNull(assetRenderer.getUrlTitle())) {
+	if (assetRenderer.getGroupId() != scopeGroupId) {
+		viewFullContentURL.setParameter("groupId", String.valueOf(assetRenderer.getGroupId()));
+	}
+
+	viewFullContentURL.setParameter("urlTitle", assetRenderer.getUrlTitle());
+}
+
+String viewFullContentURLString = viewFullContentURL.toString();
+
+viewFullContentURLString = HttpUtil.setParameter(viewFullContentURLString, "redirect", currentURL);
+
+String viewURL = viewInContext ? assetRenderer.getURLViewInContext(liferayPortletRequest, liferayPortletResponse, viewFullContentURLString) : viewFullContentURLString;
+
+viewURL = _checkViewURL(assetEntry, viewInContext, viewURL, currentURL, themeDisplay);
+%>
+
+	<c:if test="<%= assetEntryIndex == 0 %>">
+		<ul class="title-list">
+	</c:if>
+
+	<li class="title-list <%= assetRendererFactory.getType() %>">
+		<liferay-ui:icon
+			label="<%= true %>"
+			message="<%= HtmlUtil.escape(title) %>"
+			src="<%= assetRenderer.getIconPath(renderRequest) %>"
+			url="<%= viewURL %>"
+		/>
+
+		<liferay-util:include page="/html/portlet/asset_publisher/asset_actions.jsp" />
+
+		<div class="asset-metadata">
+			<%@ include file="/html/portlet/asset_publisher/asset_metadata.jspf" %>
+		</div>
+	</li>
+
+	<c:if test="<%= (assetEntryIndex + 1) == results.size() %>">
+		</ul>
+	</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/display_settings.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/display_settings.jspf
new file mode 100644
index 0000000..0654b98
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/display_settings.jspf
@@ -0,0 +1,254 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<aui:fieldset cssClass="general-display-settings">
+	<c:if test="<%= !rootPortletId.equals(PortletKeys.HIGHEST_RATED_ASSETS) && !rootPortletId.equals(PortletKeys.MOST_VIEWED_ASSETS) %>">
+		<aui:input helpMessage="show-add-content-button-help" name="preferences--showAddContentButton--" type="checkbox" value="<%= showAddContentButton %>" />
+	</c:if>
+
+	<div class="display-template">
+
+		<%
+		TemplateHandler templateHandler = TemplateHandlerRegistryUtil.getTemplateHandler(AssetEntry.class.getName());
+		%>
+
+		<liferay-ui:ddm-template-selector
+			classNameId="<%= PortalUtil.getClassNameId(templateHandler.getClassName()) %>"
+			displayStyle="<%= displayStyle %>"
+			displayStyleGroupId="<%= displayStyleGroupId %>"
+			displayStyles="<%= Arrays.asList(PropsValues.ASSET_PUBLISHER_DISPLAY_STYLES) %>"
+			label="display-template"
+			refreshURL="<%= configurationRenderURL.toString() %>"
+		/>
+	</div>
+
+	<aui:select cssClass="hidden-field abstract-length" helpMessage="abstract-length-key-help" name="preferences--abstractLength--">
+		<aui:option label="100" selected="<%= abstractLength == 100 %>" />
+		<aui:option label="200" selected="<%= abstractLength == 200 %>" />
+		<aui:option label="300" selected="<%= abstractLength == 300 %>" />
+		<aui:option label="400" selected="<%= abstractLength == 400 %>" />
+		<aui:option label="500" selected="<%= abstractLength == 500 %>" />
+	</aui:select>
+
+	<aui:input cssClass="hidden-field show-asset-title" name="preferences--showAssetTitle--" type="checkbox" value="<%= showAssetTitle %>" />
+
+	<aui:input cssClass="hidden-field show-context-link" name="preferences--showContextLink--" type="checkbox" value="<%= showContextLink %>" />
+
+	<aui:select cssClass="hidden-field asset-link-behavior" name="preferences--assetLinkBehavior--">
+		<aui:option label="show-full-content" selected='<%= assetLinkBehavior.equals("showFullContent") %>' value="showFullContent" />
+		<aui:option label="view-in-context" selected='<%= assetLinkBehavior.equals("viewInPortlet") %>' value="viewInPortlet" />
+	</aui:select>
+
+	<aui:select helpMessage="number-of-items-to-display-help" label="number-of-items-to-display" name="preferences--delta--">
+
+		<%
+		int[] deltas = {1, 2, 3, 4, 5, 10, 15, 20, 25, 30, 40, 50, 60, 70, 80, 90, 100};
+
+		for (int currentDelta: deltas) {
+		%>
+
+			<aui:option label="<%= currentDelta %>" selected="<%= (delta == currentDelta) %>" />
+
+		<%
+		}
+		%>
+
+	</aui:select>
+
+	<aui:select name="preferences--paginationType--">
+		<aui:option label="none" selected='<%= paginationType.equals("none") %>' />
+		<aui:option label="simple" selected='<%= paginationType.equals("simple") %>' />
+		<aui:option label="regular" selected='<%= paginationType.equals("regular") %>' />
+	</aui:select>
+
+	<c:if test="<%= !PropsValues.ASSET_PUBLISHER_SEARCH_WITH_INDEX %>">
+		<c:if test='<%= selectionStyle.equals("dynamic") %>'>
+			<aui:input label="exclude-assets-with-0-views" name="preferences--excludeZeroViewCount--" type="checkbox" value="<%= excludeZeroViewCount %>" />
+		</c:if>
+	</c:if>
+
+	<%
+	String helpMessage1 = "<em>" + LanguageUtil.format(pageContext, "content-related-to-x", StringPool.DOUBLE_PERIOD) + "</em>";
+	String helpMessage2 = "<em>" + LanguageUtil.format(pageContext, "content-with-tag-x", StringPool.DOUBLE_PERIOD) + "</em>";
+	%>
+
+	<aui:input helpMessage='<%= LanguageUtil.format(pageContext, "such-as-x-or-x", new Object[] {helpMessage1, helpMessage2}) %>' name="preferences--showMetadataDescriptions--" type="checkbox" value="<%= showMetadataDescriptions %>" />
+
+	<aui:input name="preferences--showAvailableLocales--" type="checkbox" value="<%= showAvailableLocales %>" />
+
+	<aui:input helpMessage="set-as-the-default-asset-publisher-for-this-page-help" label="set-as-the-default-asset-publisher-for-this-page" name="defaultAssetPublisher" type="checkbox" value="<%= defaultAssetPublisher %>" />
+
+	<aui:field-wrapper helpMessage='<%= !openOfficeServerEnabled ? "enabling-openoffice-integration-provides-document-conversion-functionality" : StringPool.BLANK %>' label="enable-conversion-to">
+		<div class="field-row">
+
+			<%
+			for (String conversion : conversions) {
+			%>
+
+			<aui:field-wrapper inlineField="<%= true %>" inlineLabel="left" label="<%= StringUtil.toUpperCase(conversion) %>">
+				<input <%= ArrayUtil.contains(extensions, conversion) ? "checked": "" %> <%= !openOfficeServerEnabled ? "disabled" : "" %> name="<portlet:namespace />extensions" type="checkbox" value="<%= conversion %>" />
+			</aui:field-wrapper>
+
+			<%
+			}
+			%>
+
+		</div>
+	</aui:field-wrapper>
+
+	<aui:input name="preferences--enablePrint--" type="checkbox" value="<%= enablePrint %>" />
+
+	<aui:input name="preferences--enableFlags--" type="checkbox" value="<%= enableFlags %>" />
+
+	<c:if test="<%= rootPortletId.equals(PortletKeys.HIGHEST_RATED_ASSETS) || rootPortletId.equals(PortletKeys.MOST_VIEWED_ASSETS) || !PropsValues.ASSET_PUBLISHER_SEARCH_WITH_INDEX %>">
+		<aui:input name="preferences--enablePermissions--" type="checkbox" value="<%= enablePermissions %>" />
+	</c:if>
+
+	<c:choose>
+		<c:when test="<%= rootPortletId.equals(PortletKeys.RELATED_ASSETS) %>">
+			<aui:input name="preferences--enableRelatedAssets--" type="hidden" value="<%= enableRelatedAssets %>" />
+		</c:when>
+		<c:otherwise>
+			<aui:input name="preferences--enableRelatedAssets--" type="checkbox" value="<%= enableRelatedAssets %>" />
+		</c:otherwise>
+	</c:choose>
+
+	<aui:input name="preferences--enableRatings--" type="checkbox" value="<%= enableRatings %>" />
+
+	<aui:input name="preferences--enableComments--" type="checkbox" value="<%= enableComments %>" />
+
+	<aui:input name="preferences--enableCommentRatings--" type="checkbox" value="<%= enableCommentRatings %>" />
+
+	<aui:fieldset>
+		<aui:input name="preferences--enableSocialBookmarks--" type="checkbox" value="<%= enableSocialBookmarks %>" />
+
+		<div class="social-boomarks-options" id="<portlet:namespace />socialBookmarksOptions">
+			<aui:select label="display-style" name="preferences--socialBookmarksDisplayStyle--">
+				<aui:option label="simple" selected='<%= socialBookmarksDisplayStyle.equals("simple") %>' />
+				<aui:option label="vertical" selected='<%= socialBookmarksDisplayStyle.equals("vertical") %>' />
+				<aui:option label="horizontal" selected='<%= socialBookmarksDisplayStyle.equals("horizontal") %>' />
+			</aui:select>
+
+			<aui:select label="display-position" name="preferences--socialBookmarksDisplayPosition--">
+				<aui:option label="top" selected='<%= socialBookmarksDisplayPosition.equals("top") %>' />
+				<aui:option label="bottom" selected='<%= socialBookmarksDisplayPosition.equals("bottom") %>' />
+			</aui:select>
+		</div>
+	</aui:fieldset>
+
+	<c:if test='<%= selectionStyle.equals("manual") %>'>
+		<aui:input helpMessage="enable-tag-based-navigation-help" label="enable-tag-based-navigation" name="preferences--enableTagBasedNavigation--" type="checkbox" value="<%= enableTagBasedNavigation %>" />
+	</c:if>
+</aui:fieldset>
+
+<aui:fieldset label="show-metadata">
+	<br />
+
+	<aui:input name="preferences--metadataFields--" type="hidden" />
+
+	<aui:field-wrapper label="metadata-fields">
+
+		<%
+		Set<String> availableMetadataFields = SetUtil.fromArray(StringUtil.split(allMetadataFields));
+
+		// Left list
+
+		List leftList = new ArrayList();
+
+		for (int i = 0; i < metadataFields.length; i++) {
+			String folderColumn = metadataFields[i];
+
+			leftList.add(new KeyValuePair(folderColumn, LanguageUtil.get(pageContext, folderColumn)));
+		}
+
+		// Right list
+
+		List rightList = new ArrayList();
+
+		Arrays.sort(metadataFields);
+
+		for (String folderColumn : availableMetadataFields) {
+			if (Arrays.binarySearch(metadataFields, folderColumn) < 0) {
+				rightList.add(new KeyValuePair(folderColumn, LanguageUtil.get(pageContext, folderColumn)));
+			}
+		}
+
+		rightList = ListUtil.sort(rightList, new KeyValuePairComparator(false, true));
+		%>
+
+		<liferay-ui:input-move-boxes
+			leftBoxName="currentMetadataFields"
+			leftList="<%= leftList %>"
+			leftReorder="true"
+			leftTitle="current"
+			rightBoxName="availableMetadataFields"
+			rightList="<%= rightList %>"
+			rightTitle="available"
+		/>
+	</aui:field-wrapper>
+</aui:fieldset>
+
+<aui:script use="aui-base">
+	var selectDisplayStyle = A.one('#<portlet:namespace />displayStyle');
+
+	function showHiddenFields () {
+		var assetLinkBehavior = A.one('.asset-link-behavior');
+		var hiddenFields = A.all('.hidden-field');
+		var selectDisplayStyle = A.one('#<portlet:namespace />displayStyle');
+
+		if (hiddenFields) {
+			hiddenFields.get('parentNode').hide();
+		}
+
+		if (selectDisplayStyle) {
+			var displayStyle = selectDisplayStyle.val();
+
+			if (displayStyle == 'full-content') {
+				var showAssetTitle = A.one('.show-asset-title');
+				var showContextLink = A.one('.show-context-link');
+
+				if (showAssetTitle) {
+					showAssetTitle.get('parentNode').show();
+				}
+
+				if (showContextLink) {
+					showContextLink.get('parentNode').show();
+				}
+			}
+			else {
+				if (displayStyle == 'abstracts') {
+					var abstractLength = A.one('.abstract-length');
+
+					if (abstractLength) {
+						abstractLength.get('parentNode').show();
+					}
+				}
+
+				if (assetLinkBehavior) {
+					assetLinkBehavior.get('parentNode').show();
+				}
+			}
+		}
+	}
+
+	showHiddenFields();
+
+	if (selectDisplayStyle) {
+		selectDisplayStyle.on('change', showHiddenFields);
+	}
+
+	Liferay.Util.toggleBoxes('<portlet:namespace />enableSocialBookmarksCheckbox','<portlet:namespace />socialBookmarksOptions');
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/edit_query_rule.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/edit_query_rule.jsp
new file mode 100644
index 0000000..7645c72
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/edit_query_rule.jsp
@@ -0,0 +1,113 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_publisher/init.jsp" %>
+
+<%
+String randomNamespace = PortalUtil.generateRandomKey(request, "portlet_asset_publisher_edit_query_rule") + StringPool.UNDERLINE;
+
+long[] categorizableGroupIds = (long[])request.getAttribute("configuration.jsp-categorizableGroupIds");
+int index = ParamUtil.getInteger(request, "index", GetterUtil.getInteger((String)request.getAttribute("configuration.jsp-index")));
+int queryLogicIndex = GetterUtil.getInteger((String)request.getAttribute("configuration.jsp-queryLogicIndex"));
+
+boolean queryContains = true;
+boolean queryAndOperator = false;
+String queryName = "assetTags";
+String queryValues = null;
+
+if (queryLogicIndex >= 0) {
+	queryContains = PrefsParamUtil.getBoolean(portletPreferences, request, "queryContains" + queryLogicIndex, true);
+	queryAndOperator = PrefsParamUtil.getBoolean(portletPreferences, request, "queryAndOperator" + queryLogicIndex);
+	queryName = PrefsParamUtil.getString(portletPreferences, request, "queryName" + queryLogicIndex, "assetTags");
+	queryValues = StringUtil.merge(portletPreferences.getValues("queryValues" + queryLogicIndex, new String[0]));
+
+	if (Validator.equals(queryName, "assetTags")) {
+		queryValues = ParamUtil.getString(request, "queryTagNames" + queryLogicIndex, queryValues);
+	}
+	else {
+		queryValues = ParamUtil.getString(request, "queryCategoryIds" + queryLogicIndex, queryValues);
+	}
+}
+%>
+
+<div class="field-row form-inline query-row">
+	<aui:select inlineField="<%= true %>" label="" name='<%= "queryContains" + index %>'>
+		<aui:option label="contains" selected="<%= queryContains %>" value="true" />
+		<aui:option label="does-not-contain" selected="<%= !queryContains %>" value="false" />
+	</aui:select>
+
+	<aui:select inlineField="<%= true %>" label="" name='<%= "queryAndOperator" + index %>'>
+		<aui:option label="all" selected="<%= queryAndOperator %>" value="true" />
+		<aui:option label="any" selected="<%= !queryAndOperator %>" value="false" />
+	</aui:select>
+
+	<aui:select cssClass="asset-query-name" id='<%= randomNamespace + "selector" %>' inlineField="<%= true %>" label="of-the-following" name='<%= "queryName" + index %>'>
+		<aui:option label="tags" selected='<%= Validator.equals(queryName, "assetTags") %>' value="assetTags" />
+		<aui:option label="categories" selected='<%= Validator.equals(queryName, "assetCategories") %>' value="assetCategories" />
+	</aui:select>
+
+	<div class="field tags-selector <%= Validator.equals(queryName, "assetTags") ? StringPool.BLANK : "hide" %>">
+		<liferay-ui:asset-tags-selector
+			curTags='<%= Validator.equals(queryName, "assetTags") ? queryValues : null %>'
+			groupIds="<%= categorizableGroupIds %>"
+			hiddenInput='<%= "queryTagNames" + index %>'
+		/>
+	</div>
+
+	<div class="field categories-selector <%= Validator.equals(queryName, "assetCategories") ? StringPool.BLANK : "hide" %>">
+		<liferay-ui:asset-categories-selector
+			curCategoryIds='<%= Validator.equals(queryName, "assetCategories") ? queryValues : null %>'
+			hiddenInput='<%= "queryCategoryIds" + index %>'
+		/>
+	</div>
+</div>
+
+<aui:script use="aui-base">
+	var select = A.one('#<portlet:namespace /><%= randomNamespace %>selector');
+
+	if (select) {
+		var row = select.ancestor('.query-row');
+
+		if (row) {
+			select.on(
+				'change',
+				function(event) {
+					var tagsSelector = row.one('.tags-selector');
+					var categoriesSelector = row.one('.categories-selector');
+
+					if (select.val() == 'assetTags') {
+						if (tagsSelector) {
+							tagsSelector.show();
+						}
+
+						if (categoriesSelector) {
+							categoriesSelector.hide();
+						}
+					}
+					else {
+						if (tagsSelector) {
+							tagsSelector.hide();
+						}
+
+						if (categoriesSelector) {
+							categoriesSelector.show();
+						}
+					}
+				}
+			);
+		}
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/email_subscription_settings.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/email_subscription_settings.jspf
new file mode 100644
index 0000000..e05afd6
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/email_subscription_settings.jspf
@@ -0,0 +1,202 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+String emailFromName = ParamUtil.getString(request, "preferences--emailFromName--", AssetPublisherUtil.getEmailFromName(portletPreferences, company.getCompanyId()));
+String emailFromAddress = ParamUtil.getString(request, "preferences--emailFromAddress--", AssetPublisherUtil.getEmailFromAddress(portletPreferences, company.getCompanyId()));
+
+boolean emailAssetEntryAddedEnabled = ParamUtil.getBoolean(request, "preferences--emailAssetEntryAddedEnabled--", AssetPublisherUtil.getEmailAssetEntryAddedEnabled(portletPreferences));
+
+String emailParam = (String)request.getAttribute("configuration.jsp-emailParam");
+String defaultEmailSubject = ContentUtil.get(PropsValues.ASSET_PUBLISHER_EMAIL_ASSET_ENTRY_ADDED_SUBJECT);
+String defaultEmailBody = ContentUtil.get(PropsValues.ASSET_PUBLISHER_EMAIL_ASSET_ENTRY_ADDED_BODY);
+
+String currentLanguageId = LanguageUtil.getLanguageId(request);
+
+String emailSubjectParam = (String)request.getAttribute("configuration.jsp-emailSubjectParam");
+String emailBodyParam = (String)request.getAttribute("configuration.jsp-emailBodyParam");
+
+String emailSubject = PrefsParamUtil.getString(portletPreferences, request, emailSubjectParam, defaultEmailSubject);
+String emailBody = PrefsParamUtil.getString(portletPreferences, request, emailBodyParam, defaultEmailBody);
+%>
+
+<liferay-ui:error key="emailAssetEntryAddedBody" message="please-enter-a-valid-body" />
+<liferay-ui:error key="emailAssetEntryAddedSubject" message="please-enter-a-valid-subject" />
+<liferay-ui:error key="emailFromAddress" message="please-enter-a-valid-email-address" />
+<liferay-ui:error key="emailFromName" message="please-enter-a-valid-name" />
+
+<aui:fieldset>
+	<aui:input id="enableEmailSubscription" label="enable-email-subscription" name="preferences--emailAssetEntryAddedEnabled--" type="checkbox" value="<%= emailAssetEntryAddedEnabled %>" />
+
+	<div class='<%= emailAssetEntryAddedEnabled ? StringPool.BLANK : "hide" %>' id="<portlet:namespace />emailSubscriptionSettings">
+		<aui:input cssClass="lfr-input-text-container" label="name" name="preferences--emailFromName--" value="<%= emailFromName %>" />
+
+		<aui:input cssClass="lfr-input-text-container" label="address" name="preferences--emailFromAddress--" value="<%= emailFromAddress %>" />
+
+		<aui:select label="language" name="languageId">
+
+			<%
+			Locale[] locales = LanguageUtil.getAvailableLocales(themeDisplay.getSiteGroupId());
+
+			for (int i = 0; i < locales.length; i++) {
+				String style = StringPool.BLANK;
+
+				if (Validator.isNotNull(portletPreferences.getValue(emailParam + "Subject_" + LocaleUtil.toLanguageId(locales[i]), StringPool.BLANK)) ||
+					Validator.isNotNull(portletPreferences.getValue(emailParam + "Body_" + LocaleUtil.toLanguageId(locales[i]), StringPool.BLANK))) {
+
+					style = "font-weight: bold;";
+				}
+			%>
+
+				<aui:option label="<%= locales[i].getDisplayName(locale) %>" selected="<%= currentLanguageId.equals(LocaleUtil.toLanguageId(locales[i])) %>" style="<%= style %>" value="<%= LocaleUtil.toLanguageId(locales[i]) %>" />
+
+			<%
+			}
+			%>
+
+		</aui:select>
+
+		<aui:input cssClass="lfr-input-text-container" label="subject" name='<%= "preferences--" + emailSubjectParam + "--" %>' value="<%= emailSubject %>" />
+
+		<aui:field-wrapper label="body">
+			<liferay-ui:input-editor editorImpl="<%= EDITOR_WYSIWYG_IMPL_KEY %>" />
+
+			<aui:input name='<%= "preferences--" + emailBodyParam + "--" %>' type="hidden" />
+		</aui:field-wrapper>
+
+		<div class="definition-of-terms">
+			<h4><liferay-ui:message key="definition-of-terms" /></h4>
+
+			<dl>
+				<dt>
+					[$ASSET_ENTRIES$]
+				</dt>
+				<dd>
+					<liferay-ui:message key="the-list-of-assets" />
+				</dd>
+				<dt>
+					[$COMPANY_ID$]
+				</dt>
+				<dd>
+					<liferay-ui:message key="the-company-id-associated-with-the-assets" />
+				</dd>
+				<dt>
+					[$COMPANY_MX$]
+				</dt>
+				<dd>
+					<liferay-ui:message key="the-company-mx-associated-with-the-assets" />
+				</dd>
+				<dt>
+					[$COMPANY_NAME$]
+				</dt>
+				<dd>
+					<liferay-ui:message key="the-company-name-associated-with-the-assets" />
+				</dd>
+				<dt>
+				<dt>
+					[$FROM_ADDRESS$]
+				</dt>
+				<dd>
+					<%= HtmlUtil.escape(emailFromAddress) %>
+				</dd>
+				<dt>
+					[$FROM_NAME$]
+				</dt>
+				<dd>
+					<%= HtmlUtil.escape(emailFromName) %>
+				</dd>
+				<dt>
+					[$PORTAL_URL$]
+				</dt>
+				<dd>
+					<%= company.getVirtualHostname() %>
+				</dd>
+				<dt>
+					[$PORTLET_NAME$]
+				</dt>
+				<dd>
+					<%= PortalUtil.getPortletTitle(renderResponse) %>
+				</dd>
+				<dt>
+					[$SITE_NAME$]
+				</dt>
+				<dd>
+					<liferay-ui:message key="the-site-name-associated-with-the-assets" />
+				</dd>
+				<dt>
+					[$TO_ADDRESS$]
+				</dt>
+				<dd>
+					<liferay-ui:message key="the-address-of-the-email-recipient" />
+				</dd>
+				<dt>
+					[$TO_NAME$]
+				</dt>
+				<dd>
+					<liferay-ui:message key="the-name-of-the-email-recipient" />
+				</dd>
+			</dl>
+		</div>
+	</div>
+</aui:fieldset>
+
+<aui:script>
+	function <portlet:namespace />initEditor() {
+		return "<%= UnicodeFormatter.toString(emailBody) %>";
+	}
+</aui:script>
+
+<aui:script use="aui-base">
+	var enableEmailSubscription = A.one('#<portlet:namespace />enableEmailSubscriptionCheckbox');
+
+	enableEmailSubscription.on(
+		'change',
+		function(event) {
+			var emailSubscriptionSettings = A.one('#<portlet:namespace />emailSubscriptionSettings');
+
+			emailSubscriptionSettings.toggle();
+		}
+	);
+
+	var languageSelector = A.one('#<portlet:namespace />languageId');
+
+	var currentLanguageIndex = languageSelector.attr('selectedIndex');
+
+	var subjectInput = A.one('#<portlet:namespace /><%= emailParam + "Subject_" + currentLanguageId %>');
+
+	var originalEmailSubject = subjectInput.val();
+
+	languageSelector.on(
+		'change',
+		function(event) {
+			if (CKEDITOR.instances.<portlet:namespace />editor.checkDirty() || originalEmailSubject !== subjectInput.val()) {
+				if (!confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-switch-the-languages-view") %>')) {
+					languageSelector.attr('selectedIndex', currentLanguageIndex);
+
+					return false;
+				}
+			}
+
+			document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = '<%= Constants.TRANSLATE %>';
+
+			submitForm(document.<portlet:namespace />fm);
+		}
+	);
+</aui:script>
+
+<%!
+public static final String EDITOR_WYSIWYG_IMPL_KEY = "editor.wysiwyg.portal-web.docroot.html.portlet.asset_publisher.configuration.jsp";
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/error.jsp
new file mode 100644
index 0000000..539e03c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/error.jsp
@@ -0,0 +1,28 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_publisher/init.jsp" %>
+
+<portlet:renderURL var="portletURL">
+	<portlet:param name="struts_action" value="/asset_publisher/view" />
+</portlet:renderURL>
+
+<liferay-ui:header
+	backURL="<%= portletURL.toString() %>"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= NoSuchModelException.class %>" message="the-asset-could-not-be-found" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/init.jsp
new file mode 100644
index 0000000..f77b15f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/init.jsp
@@ -0,0 +1,280 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.NoSuchModelException" %><%@
+page import="com.liferay.portal.kernel.util.DateFormatFactoryUtil" %><%@
+page import="com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil" %><%@
+page import="com.liferay.portal.kernel.util.PredicateFilter" %><%@
+page import="com.liferay.portlet.asset.DuplicateQueryRuleException" %><%@
+page import="com.liferay.portlet.asset.NoSuchTagException" %><%@
+page import="com.liferay.portlet.asset.NoSuchTagPropertyException" %><%@
+page import="com.liferay.portlet.asset.model.AssetTagProperty" %><%@
+page import="com.liferay.portlet.asset.service.AssetTagPropertyLocalServiceUtil" %><%@
+page import="com.liferay.portlet.assetpublisher.search.AssetDisplayTerms" %><%@
+page import="com.liferay.portlet.assetpublisher.search.AssetSearch" %><%@
+page import="com.liferay.portlet.assetpublisher.util.AssetPublisherHelperUtil" %><%@
+page import="com.liferay.portlet.assetpublisher.util.AssetPublisherUtil" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.util.DDMImpl" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.util.DDMIndexerUtil" %><%@
+page import="com.liferay.portlet.messageboards.model.MBDiscussion" %><%@
+page import="com.liferay.portlet.portletdisplaytemplate.util.PortletDisplayTemplateConstants" %><%@
+page import="com.liferay.util.RSSUtil" %>
+
+<%
+String portletResource = ParamUtil.getString(request, "portletResource");
+
+String selectionStyle = GetterUtil.getString(portletPreferences.getValue("selectionStyle", null), "dynamic");
+
+long[] groupIds = AssetPublisherUtil.getGroupIds(portletPreferences, scopeGroupId, layout);
+
+long[] availableClassNameIds = AssetRendererFactoryRegistryUtil.getClassNameIds(company.getCompanyId());
+
+availableClassNameIds = ArrayUtil.filter(
+	availableClassNameIds,
+	new PredicateFilter<Long>() {
+
+		public boolean filter(Long classNameId) {
+			AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(PortalUtil.getClassName(classNameId));
+
+			return assetRendererFactory.isSelectable();
+		}
+
+	});
+
+boolean anyAssetType = GetterUtil.getBoolean(portletPreferences.getValue("anyAssetType", null), true);
+
+long[] classNameIds = AssetPublisherUtil.getClassNameIds(portletPreferences, availableClassNameIds);
+
+long[] classTypeIds = GetterUtil.getLongValues(portletPreferences.getValues("classTypeIds", null));
+
+AssetEntryQuery assetEntryQuery = new AssetEntryQuery();
+
+long[] allAssetCategoryIds = new long[0];
+String[] allAssetTagNames = new String[0];
+
+String ddmStructureDisplayFieldValue = StringPool.BLANK;
+String ddmStructureFieldLabel = StringPool.BLANK;
+String ddmStructureFieldName = StringPool.BLANK;
+Serializable ddmStructureFieldValue = null;
+
+boolean subtypeFieldsFilterEnabled = GetterUtil.getBoolean(portletPreferences.getValue("subtypeFieldsFilterEnabled", Boolean.FALSE.toString()));
+
+if (selectionStyle.equals("dynamic")) {
+	if (!ArrayUtil.contains(groupIds, scopeGroupId)) {
+		assetEntryQuery = AssetPublisherUtil.getAssetEntryQuery(portletPreferences, ArrayUtil.append(groupIds, scopeGroupId));
+	}
+	else {
+		assetEntryQuery = AssetPublisherUtil.getAssetEntryQuery(portletPreferences, groupIds);
+	}
+
+	allAssetTagNames = AssetPublisherUtil.getAssetTagNames(portletPreferences, scopeGroupId);
+
+	assetEntryQuery.setClassTypeIds(classTypeIds);
+
+	if ((classNameIds.length == 1) && (classTypeIds.length == 1)) {
+		AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(PortalUtil.getClassName(classNameIds[0]));
+
+		ddmStructureDisplayFieldValue = GetterUtil.getString(portletPreferences.getValue("ddmStructureDisplayFieldValue", StringPool.BLANK));
+		ddmStructureFieldName = GetterUtil.getString(portletPreferences.getValue("ddmStructureFieldName", StringPool.BLANK));
+		ddmStructureFieldValue = portletPreferences.getValue("ddmStructureFieldValue", StringPool.BLANK);
+
+		if (Validator.isNotNull(ddmStructureFieldName) && Validator.isNotNull(ddmStructureFieldValue)) {
+			List<Tuple> classTypeFieldNames = assetRendererFactory.getClassTypeFieldNames(classTypeIds[0], locale, QueryUtil.ALL_POS, QueryUtil.ALL_POS);
+
+			for (Tuple classTypeFieldName : classTypeFieldNames) {
+				String fieldName = (String)classTypeFieldName.getObject(1);
+
+				if (fieldName.equals(ddmStructureFieldName)) {
+					ddmStructureFieldLabel = (String)classTypeFieldName.getObject(0);
+
+					if (subtypeFieldsFilterEnabled) {
+						long ddmStructureId = GetterUtil.getLong(classTypeFieldName.getObject(3));
+
+						assetEntryQuery.setAttribute("ddmStructureFieldName", DDMIndexerUtil.encodeName(ddmStructureId, ddmStructureFieldName, locale));
+						assetEntryQuery.setAttribute("ddmStructureFieldValue", ddmStructureFieldValue);
+					}
+
+					break;
+				}
+			}
+		}
+	}
+
+	AssetPublisherUtil.processAssetEntryQuery(user, portletPreferences, assetEntryQuery);
+}
+
+long assetVocabularyId = GetterUtil.getLong(portletPreferences.getValue("assetVocabularyId", StringPool.BLANK));
+
+long assetCategoryId = ParamUtil.getLong(request, "categoryId");
+
+String assetCategoryTitle = null;
+String assetVocabularyTitle = null;
+
+if (assetCategoryId > 0) {
+	if (selectionStyle.equals("dynamic")) {
+		allAssetCategoryIds = assetEntryQuery.getAllCategoryIds();
+
+		if (!ArrayUtil.contains(allAssetCategoryIds, assetCategoryId)) {
+			assetEntryQuery.setAllCategoryIds(ArrayUtil.append(allAssetCategoryIds, assetCategoryId));
+		}
+	}
+	else if (selectionStyle.equals("manual")) {
+		allAssetCategoryIds = ArrayUtil.append(allAssetCategoryIds, assetCategoryId);
+	}
+
+	AssetCategory assetCategory = AssetCategoryLocalServiceUtil.getCategory(assetCategoryId);
+
+	assetCategory = assetCategory.toEscapedModel();
+
+	assetCategoryTitle = assetCategory.getTitle(locale);
+
+	AssetVocabulary assetVocabulary = AssetVocabularyLocalServiceUtil.getAssetVocabulary(assetCategory.getVocabularyId());
+
+	assetVocabulary = assetVocabulary.toEscapedModel();
+
+	assetVocabularyTitle = assetVocabulary.getTitle(locale);
+
+	PortalUtil.setPageKeywords(assetCategoryTitle, request);
+}
+
+String assetTagName = ParamUtil.getString(request, "tag");
+
+if (Validator.isNotNull(assetTagName)) {
+	allAssetTagNames = new String[] {assetTagName};
+
+	long[] assetTagIds = AssetTagLocalServiceUtil.getTagIds(groupIds, allAssetTagNames);
+
+	assetEntryQuery.setAnyTagIds(assetTagIds);
+
+	PortalUtil.setPageKeywords(assetTagName, request);
+}
+
+boolean showOnlyLayoutAssets = GetterUtil.getBoolean(portletPreferences.getValue("showOnlyLayoutAssets", null));
+
+if (showOnlyLayoutAssets) {
+	assetEntryQuery.setLayout(layout);
+}
+
+if (portletName.equals(PortletKeys.RELATED_ASSETS)) {
+	AssetEntry layoutAssetEntry = (AssetEntry)request.getAttribute(WebKeys.LAYOUT_ASSET_ENTRY);
+
+	if (layoutAssetEntry != null) {
+		assetEntryQuery.setLinkedAssetEntryId(layoutAssetEntry.getEntryId());
+	}
+}
+
+boolean mergeUrlTags = GetterUtil.getBoolean(portletPreferences.getValue("mergeUrlTags", null), true);
+boolean mergeLayoutTags = GetterUtil.getBoolean(portletPreferences.getValue("mergeLayoutTags", null), false);
+
+String displayStyle = GetterUtil.getString(portletPreferences.getValue("displayStyle", PropsValues.ASSET_PUBLISHER_DISPLAY_STYLE_DEFAULT));
+long displayStyleGroupId = GetterUtil.getLong(portletPreferences.getValue("displayStyleGroupId", null), themeDisplay.getScopeGroupId());
+
+boolean showAddContentButton = GetterUtil.getBoolean(portletPreferences.getValue("showAddContentButton", null), true);
+boolean showAssetTitle = GetterUtil.getBoolean(portletPreferences.getValue("showAssetTitle", null), true);
+boolean showContextLink = GetterUtil.getBoolean(portletPreferences.getValue("showContextLink", null), true);
+int abstractLength = GetterUtil.getInteger(portletPreferences.getValue("abstractLength", null), 200);
+String assetLinkBehavior = GetterUtil.getString(portletPreferences.getValue("assetLinkBehavior", "showFullContent"));
+String orderByColumn1 = GetterUtil.getString(portletPreferences.getValue("orderByColumn1", "modifiedDate"));
+String orderByColumn2 = GetterUtil.getString(portletPreferences.getValue("orderByColumn2", "title"));
+String orderByType1 = GetterUtil.getString(portletPreferences.getValue("orderByType1", "DESC"));
+String orderByType2 = GetterUtil.getString(portletPreferences.getValue("orderByType2", "ASC"));
+boolean excludeZeroViewCount = GetterUtil.getBoolean(portletPreferences.getValue("excludeZeroViewCount", null));
+
+int delta = GetterUtil.getInteger(portletPreferences.getValue("delta", null), SearchContainer.DEFAULT_DELTA);
+
+if (portletName.equals(PortletKeys.RECENT_CONTENT)) {
+	delta = PropsValues.RECENT_CONTENT_MAX_DISPLAY_ITEMS;
+}
+
+String paginationType = GetterUtil.getString(portletPreferences.getValue("paginationType", "none"));
+
+assetEntryQuery.setPaginationType(paginationType);
+
+boolean showAvailableLocales = GetterUtil.getBoolean(portletPreferences.getValue("showAvailableLocales", null));
+boolean showMetadataDescriptions = GetterUtil.getBoolean(portletPreferences.getValue("showMetadataDescriptions", null), true);
+
+boolean defaultAssetPublisher = false;
+
+UnicodeProperties typeSettingsProperties = layout.getTypeSettingsProperties();
+
+String defaultAssetPublisherPortletId = typeSettingsProperties.getProperty(LayoutTypePortletConstants.DEFAULT_ASSET_PUBLISHER_PORTLET_ID, StringPool.BLANK);
+
+if (defaultAssetPublisherPortletId.equals(portletDisplay.getId()) || (Validator.isNotNull(defaultAssetPublisherPortletId) && defaultAssetPublisherPortletId.equals(portletResource))) {
+	defaultAssetPublisher = true;
+}
+
+boolean enablePermissions = (!portletName.equals(PortletKeys.HIGHEST_RATED_ASSETS) && !portletName.equals(PortletKeys.MOST_VIEWED_ASSETS) && PropsValues.ASSET_PUBLISHER_SEARCH_WITH_INDEX) ? true : GetterUtil.getBoolean(portletPreferences.getValue("enablePermissions", null));
+
+assetEntryQuery.setEnablePermissions(enablePermissions);
+
+boolean enableRelatedAssets = GetterUtil.getBoolean(portletPreferences.getValue("enableRelatedAssets", null), true);
+boolean enableRatings = GetterUtil.getBoolean(portletPreferences.getValue("enableRatings", null));
+boolean enableComments = GetterUtil.getBoolean(portletPreferences.getValue("enableComments", null));
+boolean enableCommentRatings = GetterUtil.getBoolean(portletPreferences.getValue("enableCommentRatings", null));
+boolean enableTagBasedNavigation = GetterUtil.getBoolean(portletPreferences.getValue("enableTagBasedNavigation", null));
+
+String[] conversions = DocumentConversionUtil.getConversions("html");
+String[] extensions = portletPreferences.getValues("extensions", new String[0]);
+boolean openOfficeServerEnabled = PrefsPropsUtil.getBoolean(PropsKeys.OPENOFFICE_SERVER_ENABLED, PropsValues.OPENOFFICE_SERVER_ENABLED);
+boolean enableConversions = openOfficeServerEnabled && (extensions != null) && (extensions.length > 0);
+boolean enablePrint = GetterUtil.getBoolean(portletPreferences.getValue("enablePrint", null));
+boolean enableFlags = GetterUtil.getBoolean(portletPreferences.getValue("enableFlags", null));
+boolean enableSocialBookmarks = GetterUtil.getBoolean(portletPreferences.getValue("enableSocialBookmarks", null), true);
+String socialBookmarksDisplayStyle = portletPreferences.getValue("socialBookmarksDisplayStyle", "horizontal");
+String socialBookmarksDisplayPosition = portletPreferences.getValue("socialBookmarksDisplayPosition", "bottom");
+
+String defaultMetadataFields = StringPool.BLANK;
+String allMetadataFields = "create-date,modified-date,publish-date,expiration-date,priority,author,view-count,categories,tags";
+
+String[] metadataFields = StringUtil.split(portletPreferences.getValue("metadataFields", defaultMetadataFields));
+
+boolean enableRSS = !PortalUtil.isRSSFeedsEnabled() ? false : GetterUtil.getBoolean(portletPreferences.getValue("enableRss", null));
+int rssDelta = GetterUtil.getInteger(portletPreferences.getValue("rssDelta", StringPool.BLANK), SearchContainer.DEFAULT_DELTA);
+String rssDisplayStyle = portletPreferences.getValue("rssDisplayStyle", RSSUtil.DISPLAY_STYLE_ABSTRACT);
+String rssFeedType = portletPreferences.getValue("rssFeedType", RSSUtil.FEED_TYPE_DEFAULT);
+String rssName = portletPreferences.getValue("rssName", portletDisplay.getTitle());
+
+String[] assetEntryXmls = portletPreferences.getValues("assetEntryXml", new String[0]);
+
+boolean viewInContext = assetLinkBehavior.equals("viewInPortlet");
+
+boolean showPortletWithNoResults = false;
+boolean groupByClass = (assetVocabularyId == -1);
+
+Map<String, PortletURL> addPortletURLs = null;
+
+Format dateFormatDate = FastDateFormatFactoryUtil.getDate(locale, timeZone);
+%>
+
+<%@ include file="/html/portlet/asset_publisher/init-ext.jsp" %>
+
+<%!
+private String _checkViewURL(AssetEntry assetEntry, boolean viewInContext, String viewURL, String currentURL, ThemeDisplay themeDisplay) {
+	if (Validator.isNotNull(viewURL)) {
+		Layout layout = themeDisplay.getLayout();
+
+		String assetEntryLayoutUuid = assetEntry.getLayoutUuid();
+
+		if (!viewInContext || (Validator.isNotNull(assetEntryLayoutUuid) && !assetEntryLayoutUuid.equals(layout.getUuid()))) {
+			viewURL = HttpUtil.setParameter(viewURL, "redirect", currentURL);
+		}
+	}
+
+	return viewURL;
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/query/custom_user_attributes.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/query/custom_user_attributes.jsp
new file mode 100644
index 0000000..bcb22ac
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/query/custom_user_attributes.jsp
@@ -0,0 +1,23 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_publisher/init.jsp" %>
+
+<%
+String customUserAttributes = GetterUtil.getString(portletPreferences.getValue("customUserAttributes", StringPool.BLANK));
+%>
+
+<aui:input helpMessage="custom-user-attributes-help" label="displayed-assets-must-match-these-custom-user-profile-attributes" name="preferences--customUserAttributes--" value="<%= customUserAttributes %>" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/select_structure_field.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/select_structure_field.jsp
new file mode 100644
index 0000000..53cd09b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/select_structure_field.jsp
@@ -0,0 +1,198 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_publisher/init.jsp" %>
+
+<%
+String className = ParamUtil.getString(request, "className");
+long classTypeId = ParamUtil.getLong(request, "classTypeId");
+String eventName = ParamUtil.getString(request, "eventName", liferayPortletResponse.getNamespace() + "selectDDMStructureField");
+
+AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(className);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/asset_publisher/select_structure_field");
+portletURL.setParameter("portletResource", portletResource);
+portletURL.setParameter("className", className);
+portletURL.setParameter("classTypeId", String.valueOf(classTypeId));
+%>
+
+<div id="<portlet:namespace />selectDDMStructureFieldForm">
+	<liferay-ui:search-container
+		iteratorURL="<%= portletURL %>"
+		total="<%= assetRendererFactory.getClassTypeFieldNamesCount(classTypeId, locale) %>"
+	>
+		<liferay-ui:search-container-results
+			results="<%= assetRendererFactory.getClassTypeFieldNames(classTypeId, locale, searchContainer.getStart(), searchContainer.getEnd()) %>"
+		/>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.kernel.util.Tuple"
+			modelVar="field"
+		>
+
+			<%
+			String label = (String)field.getObject(0);
+			String name = (String)field.getObject(1);
+			String fieldType = (String)field.getObject(2);
+			long ddmStructureId = GetterUtil.getLong(field.getObject(3));
+			%>
+
+			<liferay-ui:search-container-column-text>
+				<input data-button-id="<%= renderResponse.getNamespace() + "applyButton" + name %>" data-form-id="<%= renderResponse.getNamespace() + name + "fieldForm" %>" name="<portlet:namespace />selectStructureFieldSubtype" type="radio" <%= name.equals(ddmStructureFieldName) ? "checked" : StringPool.BLANK %> />
+			</liferay-ui:search-container-column-text>
+
+			<%
+			String fieldsNamespace = StringUtil.randomId();
+			%>
+
+			<liferay-ui:search-container-column-text
+				name="field"
+			>
+				<liferay-portlet:resourceURL portletConfiguration="true" var="structureFieldURL">
+					<portlet:param name="<%= Constants.CMD %>" value="getFieldValue" />
+					<portlet:param name="portletResource" value="<%= portletResource %>" />
+					<portlet:param name="structureId" value="<%= String.valueOf(ddmStructureId) %>" />
+					<portlet:param name="name" value="<%= name %>" />
+					<portlet:param name="fieldsNamespace" value="<%= fieldsNamespace %>" />
+				</liferay-portlet:resourceURL>
+
+				<aui:form action="<%= structureFieldURL %>" name='<%= name + "fieldForm" %>' onSubmit="event.preventDefault()">
+					<aui:input disabled="<%= true %>" name="buttonId" type="hidden" value='<%= renderResponse.getNamespace() + "applyButton" + name %>' />
+
+					<%
+					com.liferay.portlet.dynamicdatamapping.storage.Field ddmField = new com.liferay.portlet.dynamicdatamapping.storage.Field();
+
+					ddmField.setDefaultLocale(themeDisplay.getLocale());
+					ddmField.setDDMStructureId(ddmStructureId);
+					ddmField.setName(name);
+
+					if (name.equals(ddmStructureFieldName)) {
+						if (fieldType.equals(DDMImpl.TYPE_DDM_DATE)) {
+							ddmStructureFieldValue = GetterUtil.getDate(ddmStructureFieldValue, DateFormatFactoryUtil.getSimpleDateFormat("yyyyMMddHHmmss"));
+						}
+
+						ddmField.setValue(themeDisplay.getLocale(), ddmStructureFieldValue);
+					}
+					%>
+
+					<liferay-ddm:html-field
+						classNameId="<%= PortalUtil.getClassNameId(DDMStructure.class) %>"
+						classPK="<%= ddmStructureId %>"
+						field="<%= ddmField %>"
+						fieldsNamespace="<%= fieldsNamespace %>"
+					/>
+				</aui:form>
+			</liferay-ui:search-container-column-text>
+
+			<liferay-ui:search-container-column-text>
+
+				<%
+				Map<String, Object> data = new HashMap<String, Object>();
+
+				data.put("form", renderResponse.getNamespace() + name + "fieldForm");
+				data.put("label", label);
+				data.put("name", name);
+				%>
+
+				<aui:button cssClass="selector-button" data="<%= data %>" disabled="<%= name.equals(ddmStructureFieldName) ? false : true %>" id='<%= renderResponse.getNamespace() + "applyButton" + name %>' value="apply" />
+			</liferay-ui:search-container-column-text>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</div>
+
+<aui:script use="aui-base,aui-io">
+	var Util = Liferay.Util;
+
+	var structureFormContainer = A.one('#<portlet:namespace />selectDDMStructureFieldForm');
+
+	var fieldSubtypeForms = structureFormContainer.all('form');
+
+	var toggleDisabledFormFields = function(form, state) {
+		Util.toggleDisabled(form.all('input, select, textarea'), state);
+	};
+
+	var submitForm = function(applyButton) {
+		var result = Util.getAttributes(applyButton, 'data-');
+
+		var form = A.one('#' + result.form);
+
+		A.io.request(
+			form.attr('action'),
+			{
+				dataType: 'json',
+				form: {
+					id: form
+				},
+				on: {
+					success: function(event, id, obj) {
+						var respondData = this.get('responseData');
+
+						result.className = '<%= AssetPublisherUtil.getClassName(assetRendererFactory) %>';
+						result.displayValue = respondData.displayValue;
+						result.value = respondData.value;
+
+						Util.getOpener().Liferay.fire('<%= HtmlUtil.escapeJS(eventName) %>', result);
+
+						Util.getWindow().hide();
+					}
+				}
+			}
+		);
+	};
+
+	structureFormContainer.delegate(
+		'click',
+		function(event) {
+			submitForm(event.currentTarget);
+		},
+		'.selector-button'
+	);
+
+	structureFormContainer.delegate(
+		'submit',
+		function(event) {
+			var buttonId = event.currentTarget.one('#<portlet:namespace />buttonId').attr('value');
+
+			submitForm(structureFormContainer.one('#' + buttonId));
+		},
+		'form'
+	);
+
+	A.one('#<portlet:namespace />tuplesSearchContainer').delegate(
+		'click',
+		function(event) {
+			var target = event.currentTarget;
+
+			var buttonId = target.attr('data-button-id');
+			var formId = target.attr('data-form-id');
+
+			Util.toggleDisabled(structureFormContainer.all('.selector-button'), true);
+
+			Util.toggleDisabled('#' + buttonId, false);
+
+			toggleDisabledFormFields(fieldSubtypeForms, true);
+
+			toggleDisabledFormFields(A.one('#' + formId), false);
+		},
+		'input[name=<portlet:namespace />selectStructureFieldSubtype]'
+	);
+
+	toggleDisabledFormFields(fieldSubtypeForms, true);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/view.jsp
new file mode 100644
index 0000000..6767fb7
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/view.jsp
@@ -0,0 +1,184 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_publisher/init.jsp" %>
+
+<%
+if (mergeUrlTags || mergeLayoutTags) {
+	String[] compilerTagNames = new String[0];
+
+	if (mergeUrlTags) {
+		compilerTagNames = ParamUtil.getParameterValues(request, "tags");
+	}
+
+	if (mergeLayoutTags) {
+		Set<String> layoutTagNames = AssetUtil.getLayoutTagNames(request);
+
+		if (!layoutTagNames.isEmpty()) {
+			compilerTagNames = ArrayUtil.append(compilerTagNames, layoutTagNames.toArray(new String[layoutTagNames.size()]));
+		}
+	}
+
+	String titleEntry = null;
+
+	if (ArrayUtil.isNotEmpty(compilerTagNames)) {
+		String[] newAssetTagNames = ArrayUtil.append(allAssetTagNames, compilerTagNames);
+
+		allAssetTagNames = ArrayUtil.distinct(newAssetTagNames, new StringComparator());
+
+		long[] allAssetTagIds = AssetTagLocalServiceUtil.getTagIds(scopeGroupId, allAssetTagNames);
+
+		assetEntryQuery.setAllTagIds(allAssetTagIds);
+
+		titleEntry = compilerTagNames[compilerTagNames.length - 1];
+	}
+
+	String portletTitle = HtmlUtil.unescape(portletDisplay.getTitle());
+
+	portletTitle = AssetUtil.substituteTagPropertyVariables(scopeGroupId, titleEntry, portletTitle);
+
+	renderResponse.setTitle(portletTitle);
+}
+else {
+	allAssetTagNames = ArrayUtil.distinct(allAssetTagNames, new StringComparator());
+}
+
+for (String curAssetTagName : allAssetTagNames) {
+	try {
+		AssetTag assetTag = AssetTagLocalServiceUtil.getTag(scopeGroupId, curAssetTagName);
+
+		AssetTagProperty journalTemplateIdProperty = AssetTagPropertyLocalServiceUtil.getTagProperty(assetTag.getTagId(), "journal-template-id");
+
+		String journalTemplateId = journalTemplateIdProperty.getValue();
+
+		request.setAttribute(WebKeys.JOURNAL_TEMPLATE_ID, journalTemplateId);
+
+		break;
+	}
+	catch (NoSuchTagException nste) {
+	}
+	catch (NoSuchTagPropertyException nstpe) {
+	}
+}
+
+if (enableTagBasedNavigation && selectionStyle.equals("manual") && ((assetEntryQuery.getAllCategoryIds().length > 0) || (assetEntryQuery.getAllTagIds().length > 0))) {
+	selectionStyle = "dynamic";
+}
+
+Group scopeGroup = themeDisplay.getScopeGroup();
+%>
+
+<c:if test="<%= showAddContentButton && (scopeGroup != null) && (!scopeGroup.hasStagingGroup() || scopeGroup.isStagingGroup()) && !portletName.equals(PortletKeys.HIGHEST_RATED_ASSETS) && !portletName.equals(PortletKeys.MOST_VIEWED_ASSETS) && !portletName.equals(PortletKeys.RELATED_ASSETS) %>">
+
+	<%
+	addPortletURLs = AssetUtil.getAddPortletURLs(liferayPortletRequest, liferayPortletResponse, classNameIds, classTypeIds, allAssetCategoryIds, allAssetTagNames, null);
+
+	for (long groupId : groupIds) {
+	%>
+
+		<div class="lfr-meta-actions add-asset-selector">
+			<%@ include file="/html/portlet/asset_publisher/add_asset.jspf" %>
+		</div>
+
+	<%
+	}
+	%>
+
+</c:if>
+
+<div class="subscribe-action">
+	<c:if test="<%= !portletName.equals(PortletKeys.HIGHEST_RATED_ASSETS) && !portletName.equals(PortletKeys.MOST_VIEWED_ASSETS) && !portletName.equals(PortletKeys.RECENT_CONTENT) && !portletName.equals(PortletKeys.RELATED_ASSETS) && PortletPermissionUtil.contains(permissionChecker, plid, portletDisplay.getId(), ActionKeys.SUBSCRIBE) && AssetPublisherUtil.getEmailAssetEntryAddedEnabled(portletPreferences) %>">
+		<c:choose>
+			<c:when test="<%= AssetPublisherUtil.isSubscribed(themeDisplay.getCompanyId(), user.getUserId(), themeDisplay.getPlid(), portletDisplay.getId()) %>">
+				<portlet:actionURL var="unsubscribeURL">
+					<portlet:param name="struts_action" value="/asset_publisher/edit_subscription" />
+					<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UNSUBSCRIBE %>" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+				</portlet:actionURL>
+
+				<liferay-ui:icon
+					image="unsubscribe"
+					label="<%= true %>"
+					url="<%= unsubscribeURL %>"
+				/>
+			</c:when>
+			<c:otherwise>
+				<portlet:actionURL var="subscribeURL">
+					<portlet:param name="struts_action" value="/asset_publisher/edit_subscription" />
+					<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.SUBSCRIBE %>" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+				</portlet:actionURL>
+
+				<liferay-ui:icon
+					image="subscribe"
+					label="<%= true %>"
+					url="<%= subscribeURL %>"
+				/>
+			</c:otherwise>
+		</c:choose>
+	</c:if>
+
+	<c:if test="<%= enableRSS %>">
+		<liferay-portlet:resourceURL varImpl="rssURL">
+			<portlet:param name="struts_action" value="/asset_publisher/rss" />
+		</liferay-portlet:resourceURL>
+
+		<liferay-ui:rss resourceURL="<%= rssURL %>" />
+	</c:if>
+</div>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, delta, portletURL, null, null);
+
+if (!paginationType.equals("none")) {
+	searchContainer.setDelta(delta);
+	searchContainer.setDeltaConfigurable(false);
+}
+%>
+
+<c:if test="<%= showMetadataDescriptions %>">
+	<liferay-ui:categorization-filter
+		assetType="content"
+		portletURL="<%= portletURL %>"
+	/>
+</c:if>
+
+<%
+long portletDisplayDDMTemplateId = PortletDisplayTemplateUtil.getPortletDisplayTemplateDDMTemplateId(displayStyleGroupId, displayStyle);
+
+Map<String, Object> contextObjects = new HashMap<String, Object>();
+
+contextObjects.put(PortletDisplayTemplateConstants.ASSET_PUBLISHER_HELPER, AssetPublisherHelperUtil.getAssetPublisherHelper());
+%>
+
+<c:choose>
+	<c:when test='<%= selectionStyle.equals("dynamic") %>'>
+		<%@ include file="/html/portlet/asset_publisher/view_dynamic_list.jspf" %>
+	</c:when>
+	<c:when test='<%= selectionStyle.equals("manual") %>'>
+		<%@ include file="/html/portlet/asset_publisher/view_manual.jspf" %>
+	</c:when>
+</c:choose>
+
+<c:if test='<%= !paginationType.equals("none") && (searchContainer.getTotal() > searchContainer.getResults().size()) %>'>
+	<liferay-ui:search-paginator searchContainer="<%= searchContainer %>" type="<%= paginationType %>" />
+</c:if>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.asset_publisher.view_jsp");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/view_content.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/view_content.jsp
new file mode 100644
index 0000000..b6867bd
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/view_content.jsp
@@ -0,0 +1,120 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_publisher/init.jsp" %>
+
+<%
+String returnToFullPageURL = ParamUtil.getString(request, "returnToFullPageURL");
+
+if (Validator.isNotNull(returnToFullPageURL)) {
+	portletDisplay.setURLBack(returnToFullPageURL);
+}
+
+long assetEntryId = ParamUtil.getLong(request, "assetEntryId");
+String type = ParamUtil.getString(request, "type");
+long groupId = ParamUtil.getLong(request, "groupId", scopeGroupId);
+String urlTitle = ParamUtil.getString(request, "urlTitle");
+
+boolean show = true;
+boolean print = ParamUtil.getString(request, "viewMode").equals(Constants.PRINT);
+
+List results = new ArrayList();
+
+int assetEntryIndex = 0;
+
+AssetEntry assetEntry = null;
+
+String className = StringPool.BLANK;
+long classPK = 0;
+
+try {
+	AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByType(type);
+	AssetRenderer assetRenderer = null;
+
+	if (Validator.isNotNull(urlTitle)) {
+		assetRenderer = assetRendererFactory.getAssetRenderer(groupId, urlTitle);
+
+		className = assetRendererFactory.getClassName();
+		classPK = assetRenderer.getClassPK();
+
+		assetEntry = assetRendererFactory.getAssetEntry(className, classPK);
+	}
+	else {
+		assetEntry = assetRendererFactory.getAssetEntry(assetEntryId);
+
+		className = PortalUtil.getClassName(assetEntry.getClassNameId());
+		classPK = assetEntry.getClassPK();
+
+		if (portletName.equals(PortletKeys.MY_WORKFLOW_INSTANCES) || portletName.equals(PortletKeys.MY_WORKFLOW_TASKS) || portletName.equals(PortletKeys.WORKFLOW_DEFINITIONS) || portletName.equals(PortletKeys.WORKFLOW_INSTANCES) || portletName.equals(PortletKeys.WORKFLOW_TASKS)) {
+			long assetEntryVersionId = ParamUtil.getLong(request, "assetEntryVersionId");
+
+			assetRenderer = assetRendererFactory.getAssetRenderer(assetEntryVersionId, AssetRendererFactory.TYPE_LATEST);
+		}
+		else {
+			assetRenderer = assetRendererFactory.getAssetRenderer(classPK, AssetRendererFactory.TYPE_LATEST_APPROVED);
+		}
+	}
+
+	if (!assetEntry.isVisible() &&
+		(assetRenderer.getAssetRendererType() == AssetRendererFactory.TYPE_LATEST_APPROVED)) {
+
+		throw new NoSuchModelException();
+	}
+
+	String title = assetRenderer.getTitle(locale);
+	String summary = StringPool.BLANK;
+	String viewURL = StringPool.BLANK;
+	String viewURLMessage = StringPool.BLANK;
+
+	request.setAttribute("view.jsp-results", results);
+
+	request.setAttribute("view.jsp-assetEntryIndex", new Integer(assetEntryIndex));
+
+	request.setAttribute("view.jsp-assetEntry", assetEntry);
+	request.setAttribute("view.jsp-assetRendererFactory", assetRendererFactory);
+	request.setAttribute("view.jsp-assetRenderer", assetRenderer);
+
+	request.setAttribute("view.jsp-title", title);
+
+	request.setAttribute("view.jsp-show", new Boolean(show));
+	request.setAttribute("view.jsp-print", new Boolean(print));
+%>
+
+	<div>
+		<liferay-util:include page="/html/portlet/asset_publisher/display/full_content.jsp" />
+	</div>
+
+	<liferay-util:include page="/html/portlet/asset_publisher/asset_html_metadata.jsp" />
+
+<%
+	PortalUtil.addPortletBreadcrumbEntry(request, title, currentURL);
+}
+catch (NoSuchModelException nsme) {
+	SessionErrors.add(renderRequest, NoSuchModelException.class.getName());
+%>
+
+	<liferay-util:include page="/html/portlet/asset_publisher/error.jsp" />
+
+<%
+}
+catch (Exception e) {
+	_log.error(e);
+}
+%>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.asset_publisher.view_content_jsp");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/view_display.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/view_display.jspf
new file mode 100644
index 0000000..f431a36
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/view_display.jspf
@@ -0,0 +1,38 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+if (!ArrayUtil.contains(PropsValues.ASSET_PUBLISHER_DISPLAY_STYLES, displayStyle)) {
+%>
+
+	<%= HtmlUtil.escape(LanguageUtil.format(pageContext, "x-is-not-a-display-type", displayStyle)) %>
+
+<%
+}
+else {
+	for (String curDisplayStyle : PropsValues.ASSET_PUBLISHER_DISPLAY_STYLES) {
+		if (displayStyle.equals(curDisplayStyle)) {
+			String displayStyleJsp = "/html/portlet/asset_publisher/display/" + TextFormatter.format(curDisplayStyle, TextFormatter.N) + ".jsp";
+%>
+
+			<liferay-util:include page="<%= displayStyleJsp %>" />
+
+<%
+			break;
+		}
+	}
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/view_dynamic_list.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/view_dynamic_list.jspf
new file mode 100644
index 0000000..0c47225
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/view_dynamic_list.jspf
@@ -0,0 +1,256 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+int end = searchContainer.getEnd();
+int start = searchContainer.getStart();
+
+if (!portletName.equals(PortletKeys.RELATED_ASSETS)) {
+	assetEntryQuery.setGroupIds(groupIds);
+}
+
+assetEntryQuery.setExcludeZeroViewCount(excludeZeroViewCount);
+assetEntryQuery.setOrderByCol1(orderByColumn1);
+assetEntryQuery.setOrderByCol2(orderByColumn2);
+assetEntryQuery.setOrderByType1(orderByType1);
+assetEntryQuery.setOrderByType2(orderByType2);
+
+List<AssetEntry> results = new ArrayList<AssetEntry>();
+int total = 0;
+
+if (!portletName.equals(PortletKeys.RELATED_ASSETS) || (assetEntryQuery.getLinkedAssetEntryId() > 0)) {
+	if (assetVocabularyId > 0) {
+		AssetVocabulary assetVocabulary = AssetVocabularyLocalServiceUtil.getVocabulary(assetVocabularyId);
+
+		List<AssetCategory> assetCategories = AssetCategoryLocalServiceUtil.getVocabularyRootCategories(assetVocabulary.getVocabularyId(), QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
+
+		assetEntryQuery.setClassNameIds(classNameIds);
+
+		for (AssetCategory assetCategory : assetCategories) {
+			assetCategory = assetCategory.toEscapedModel();
+
+			long[] oldAllCategoryIds = assetEntryQuery.getAllCategoryIds();
+
+			long[] newAllAssetCategoryIds = ArrayUtil.append(oldAllCategoryIds, assetCategory.getCategoryId());
+
+			assetEntryQuery.setAllCategoryIds(newAllAssetCategoryIds);
+
+			int groupTotal = 0;
+
+			if (PropsValues.ASSET_PUBLISHER_SEARCH_WITH_INDEX && (assetEntryQuery.getLinkedAssetEntryId() == 0) && !portletName.equals(PortletKeys.HIGHEST_RATED_ASSETS) && !portletName.equals(PortletKeys.MOST_VIEWED_ASSETS)) {
+				Hits hits = AssetUtil.search(request, assetEntryQuery, start, end);
+
+				groupTotal = hits.getLength();
+
+				total += groupTotal;
+
+				results = AssetUtil.getAssetEntries(hits);
+			}
+			else {
+				groupTotal = AssetEntryServiceUtil.getEntriesCount(assetEntryQuery);
+
+				total += groupTotal;
+
+				assetEntryQuery.setEnd(end);
+				assetEntryQuery.setStart(start);
+
+				results = AssetEntryServiceUtil.getEntries(assetEntryQuery);
+			}
+
+			if (!results.isEmpty()) {
+				searchContainer.setResults(results);
+
+				request.setAttribute("view.jsp-results", results);
+%>
+
+				<h3 class="asset-entries-group-label"><%= assetCategory.getTitle(locale) %></h3>
+
+				<c:choose>
+					<c:when test="<%= portletDisplayDDMTemplateId > 0 %>">
+						<%= PortletDisplayTemplateUtil.renderDDMTemplate(pageContext, portletDisplayDDMTemplateId, results, contextObjects) %>
+					</c:when>
+					<c:otherwise>
+						<%@ include file="/html/portlet/asset_publisher/view_dynamic_list_asset.jspf" %>
+					</c:otherwise>
+				</c:choose>
+
+<%
+			}
+
+			if (groupTotal > 0) {
+				if ((end > 0) && (end > groupTotal)) {
+					end -= groupTotal;
+				}
+				else {
+					end = 0;
+				}
+
+				if ((start > 0) && (start > groupTotal)) {
+					start -= groupTotal;
+				}
+				else {
+					start = 0;
+				}
+			}
+
+			assetEntryQuery.setAllCategoryIds(oldAllCategoryIds);
+			assetEntryQuery.setEnd(QueryUtil.ALL_POS);
+			assetEntryQuery.setStart(QueryUtil.ALL_POS);
+		}
+
+		searchContainer.setTotal(total);
+	}
+	else if (!groupByClass) {
+		assetEntryQuery.setClassNameIds(classNameIds);
+
+		if (PropsValues.ASSET_PUBLISHER_SEARCH_WITH_INDEX && (assetEntryQuery.getLinkedAssetEntryId() == 0) && !portletName.equals(PortletKeys.HIGHEST_RATED_ASSETS) && !portletName.equals(PortletKeys.MOST_VIEWED_ASSETS)) {
+			Hits hits = AssetUtil.search(request, assetEntryQuery, start, end);
+
+			total = hits.getLength();
+
+			searchContainer.setTotal(total);
+
+			results = AssetUtil.getAssetEntries(hits);
+		}
+		else {
+			total = AssetEntryServiceUtil.getEntriesCount(assetEntryQuery);
+
+			searchContainer.setTotal(total);
+
+			assetEntryQuery.setEnd(end);
+			assetEntryQuery.setStart(start);
+
+			results = AssetEntryServiceUtil.getEntries(assetEntryQuery);
+		}
+
+		searchContainer.setResults(results);
+
+		request.setAttribute("view.jsp-results", results);
+%>
+
+		<c:choose>
+			<c:when test="<%= portletDisplayDDMTemplateId > 0 %>">
+				<%= PortletDisplayTemplateUtil.renderDDMTemplate(pageContext, portletDisplayDDMTemplateId, results, contextObjects) %>
+			</c:when>
+			<c:otherwise>
+				<%@ include file="/html/portlet/asset_publisher/view_dynamic_list_asset.jspf" %>
+			</c:otherwise>
+		</c:choose>
+
+<%
+	}
+	else {
+		for (long classNameId : classNameIds) {
+			long[] oldGroupClassNameIds = assetEntryQuery.getClassNameIds();
+
+			long[] groupClassNameIds = {classNameId};
+
+			assetEntryQuery.setClassNameIds(groupClassNameIds);
+
+			String groupClassName = PortalUtil.getClassName(classNameId);
+
+			AssetRendererFactory groupAssetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(groupClassName);
+
+			int groupTotal = 0;
+
+			if (PropsValues.ASSET_PUBLISHER_SEARCH_WITH_INDEX && (assetEntryQuery.getLinkedAssetEntryId() == 0) && !portletName.equals(PortletKeys.HIGHEST_RATED_ASSETS) && !portletName.equals(PortletKeys.MOST_VIEWED_ASSETS)) {
+				Hits hits = AssetUtil.search(request, assetEntryQuery, start, end);
+
+				groupTotal = hits.getLength();
+
+				total += groupTotal;
+
+				results = AssetUtil.getAssetEntries(hits);
+			}
+			else {
+				groupTotal = AssetEntryServiceUtil.getEntriesCount(assetEntryQuery);
+
+				total += groupTotal;
+
+				assetEntryQuery.setEnd(end);
+				assetEntryQuery.setStart(start);
+
+				results = AssetEntryServiceUtil.getEntries(assetEntryQuery);
+			}
+
+			searchContainer.setResults(results);
+
+			request.setAttribute("view.jsp-results", results);
+
+			if (!results.isEmpty()) {
+%>
+
+				<h3 class="asset-entries-group-label"><%= ResourceActionsUtil.getModelResource(locale, groupAssetRendererFactory.getClassName()) %></h3>
+
+				<c:choose>
+					<c:when test="<%= portletDisplayDDMTemplateId > 0 %>">
+						<%= PortletDisplayTemplateUtil.renderDDMTemplate(pageContext, portletDisplayDDMTemplateId, results, contextObjects) %>
+					</c:when>
+					<c:otherwise>
+						<%@ include file="/html/portlet/asset_publisher/view_dynamic_list_asset.jspf" %>
+					</c:otherwise>
+				</c:choose>
+
+<%
+			}
+
+			if (!portletName.equals(PortletKeys.RECENT_CONTENT)) {
+				if (groupTotal > 0) {
+					if ((end > 0) && (end > groupTotal)) {
+						end -= groupTotal;
+					}
+					else {
+						end = 0;
+					}
+
+					if ((start > 0) && (start > groupTotal)) {
+						start -= groupTotal;
+					}
+					else {
+						start = 0;
+					}
+				}
+
+				assetEntryQuery.setClassNameIds(oldGroupClassNameIds);
+				assetEntryQuery.setEnd(QueryUtil.ALL_POS);
+				assetEntryQuery.setStart(QueryUtil.ALL_POS);
+			}
+		}
+
+		searchContainer.setTotal(total);
+	}
+}
+
+if ((total == 0) && (portletDisplayDDMTemplateId == 0)) {
+	if (!showPortletWithNoResults && ((addPortletURLs == null) || addPortletURLs.isEmpty()) && !((assetCategoryId > 0) || Validator.isNotNull(assetTagName))) {
+		renderRequest.setAttribute(WebKeys.PORTLET_CONFIGURATOR_VISIBILITY, Boolean.TRUE);
+	}
+%>
+
+	<div class="alert alert-info">
+		<c:choose>
+			<c:when test="<%= !portletName.equals(PortletKeys.RELATED_ASSETS) %>">
+				<liferay-ui:message key="there-are-no-results" />
+			</c:when>
+			<c:otherwise>
+				<liferay-ui:message key="there-are-no-related-assets" />
+			</c:otherwise>
+		</c:choose>
+	</div>
+
+<%
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/view_dynamic_list_asset.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/view_dynamic_list_asset.jspf
new file mode 100644
index 0000000..5b49d08
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/view_dynamic_list_asset.jspf
@@ -0,0 +1,72 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+for (int assetEntryIndex = 0; assetEntryIndex < results.size(); assetEntryIndex++) {
+	AssetEntry assetEntry = (AssetEntry)results.get(assetEntryIndex);
+
+	String className = PortalUtil.getClassName(assetEntry.getClassNameId());
+	long classPK = assetEntry.getClassPK();
+
+	AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(className);
+
+	if (assetRendererFactory == null) {
+		continue;
+	}
+
+	AssetRenderer assetRenderer = null;
+
+	try {
+		assetRenderer = assetRendererFactory.getAssetRenderer(classPK);
+	}
+	catch (Exception e) {
+		if (_log.isWarnEnabled()) {
+			_log.warn(e, e);
+		}
+	}
+
+	if ((assetRenderer == null) || !assetRenderer.isDisplayable()) {
+		continue;
+	}
+
+	String title = assetRenderer.getTitle(locale);
+
+	boolean show = true;
+	boolean print = false;
+
+	request.setAttribute("view.jsp-assetEntryIndex", new Integer(assetEntryIndex));
+
+	request.setAttribute("view.jsp-assetEntry", assetEntry);
+	request.setAttribute("view.jsp-assetRendererFactory", assetRendererFactory);
+	request.setAttribute("view.jsp-assetRenderer", assetRenderer);
+
+	request.setAttribute("view.jsp-title", title);
+
+	request.setAttribute("view.jsp-show", new Boolean(show));
+	request.setAttribute("view.jsp-print", new Boolean(print));
+
+	try {
+%>
+
+		<%@ include file="/html/portlet/asset_publisher/view_display.jspf" %>
+
+<%
+	}
+	catch (Exception e) {
+		_log.error(e.getMessage());
+	}
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/view_manual.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/view_manual.jspf
new file mode 100644
index 0000000..4024afb
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_publisher/view_manual.jspf
@@ -0,0 +1,73 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+List<AssetEntry> assetEntries = AssetPublisherUtil.getAssetEntries(renderRequest, portletPreferences, permissionChecker, groupIds, allAssetCategoryIds, assetEntryXmls, allAssetTagNames, false, enablePermissions);
+
+searchContainer.setTotal(assetEntries.size());
+
+assetEntries = assetEntries.subList(searchContainer.getStart(), searchContainer.getResultEnd());
+
+searchContainer.setResults(assetEntries);
+
+request.setAttribute("view.jsp-results", assetEntries);
+%>
+
+<c:choose>
+	<c:when test="<%= portletDisplayDDMTemplateId > 0 %>">
+		<%= PortletDisplayTemplateUtil.renderDDMTemplate(pageContext, portletDisplayDDMTemplateId, assetEntries, contextObjects) %>
+	</c:when>
+	<c:otherwise>
+
+		<%
+		for (int assetEntryIndex = 0; assetEntryIndex < assetEntries.size(); assetEntryIndex++) {
+			AssetEntry assetEntry = assetEntries.get(assetEntryIndex);
+
+			AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(assetEntry.getClassName());
+
+			AssetRenderer assetRenderer = assetRendererFactory.getAssetRenderer(assetEntry.getClassPK());
+
+			String title = assetRenderer.getTitle(locale);
+
+			boolean show = true;
+			boolean print = false;
+
+			request.setAttribute("view.jsp-assetEntryIndex", new Integer(assetEntryIndex));
+
+			request.setAttribute("view.jsp-assetEntry", assetEntry);
+			request.setAttribute("view.jsp-assetRendererFactory", assetRendererFactory);
+			request.setAttribute("view.jsp-assetRenderer", assetRenderer);
+
+			request.setAttribute("view.jsp-title", title);
+
+			request.setAttribute("view.jsp-show", new Boolean(show));
+			request.setAttribute("view.jsp-print", new Boolean(print));
+
+			try {
+		%>
+
+				<%@ include file="/html/portlet/asset_publisher/view_display.jspf" %>
+
+		<%
+			}
+			catch (Exception e) {
+				_log.error(e.getMessage());
+			}
+		}
+		%>
+
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tag_admin/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tag_admin/css/.sass-cache/main.css
new file mode 100644
index 0000000..12e6082
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tag_admin/css/.sass-cache/main.css
@@ -0,0 +1,113 @@
+.portlet-asset-tag-admin .lfr-app-column-view {
+  border: none; }
+.portlet-asset-tag-admin .navbar-inner {
+  padding-left: 12px; }
+  .portlet-asset-tag-admin .navbar-inner .search-query {
+    width: 260px; }
+.portlet-asset-tag-admin .tags-admin-actions {
+  clear: none;
+  float: left;
+  margin: 0; }
+.portlet-asset-tag-admin .tags-admin-container .toolbar-container {
+  position: relative; }
+  .portlet-asset-tag-admin .tags-admin-container .toolbar-container .tags-admin-toolbar {
+    background: #F6F8FB;
+    border-bottom: 1px solid #dedede;
+    overflow: hidden;
+    padding: 5px 0; }
+  .portlet-asset-tag-admin .tags-admin-container .toolbar-container .tags-search-combobox {
+    position: absolute;
+    right: 5px;
+    top: 2px; }
+.portlet-asset-tag-admin .header-title, .portlet-asset-tag-admin .tree-node-content .tree-label {
+  word-wrap: break-word; }
+.portlet-asset-tag-admin .tags-admin-edit-tag .tag-view-container {
+  padding: 0 0.5em 0 0; }
+.portlet-asset-tag-admin .tags-admin-edit-tag .tag-details {
+  font-weight: bold;
+  vertical-align: middle; }
+.portlet-asset-tag-admin .tag-item a {
+  display: block;
+  padding: 8px 20px 8px 25px;
+  text-decoration: none; }
+.portlet-asset-tag-admin .tag-item-actions-trigger {
+  background-image: url(@theme_image_path@/common/edit.png);
+  background-repeat: no-repeat;
+  clip: rect(0pt, 0pt, 0pt, 0pt);
+  display: block;
+  height: 16px;
+  margin-top: -8px;
+  padding: 0;
+  position: absolute;
+  right: 5px;
+  top: 50%;
+  width: 16px; }
+.portlet-asset-tag-admin input.tag-item-check {
+  margin-right: 10px;
+  margin-top: 0;
+  position: static; }
+.portlet-asset-tag-admin .tags-admin-content .tag-item-container {
+  position: relative; }
+  .portlet-asset-tag-admin .tags-admin-content .tag-item-container .tag-item-name {
+    margin-top: 2px; }
+.portlet-asset-tag-admin .tags-admin-content li.tag-item-container, .portlet-asset-tag-admin .tags-admin-content li.tag-item {
+  font-weight: bold; }
+.portlet-asset-tag-admin .tag-item-container:hover .tag-item-actions-trigger, .portlet-asset-tag-admin .tag-item-container:focus .tag-item-actions-trigger {
+  clip: rect(auto auto auto auto); }
+.portlet-asset-tag-admin .tag-item-actions-trigger:focus {
+  clip: rect(auto auto auto auto); }
+.portlet-asset-tag-admin .tags-admin-list ul {
+  margin-left: 0; }
+.portlet-asset-tag-admin .tags-admin-list .active a:hover {
+  color: #D9EDF7; }
+.portlet-asset-tag-admin .tags-admin-list .active-area {
+  border: 1px solid #008000; }
+  .portlet-asset-tag-admin .tags-admin-list .active-area a {
+    background-color: #90EE90;
+    color: #90EE90; }
+.portlet-asset-tag-admin .select-tags {
+  margin-left: 12px;
+  margin-top: -5px; }
+.portlet-asset-tag-admin .tags-admin-list-container .tags-header {
+  display: inline-block;
+  margin-left: 2px; }
+.portlet-asset-tag-admin .tags-admin-list-container:after {
+  clear: both;
+  content: "";
+  display: block;
+  height: 0; }
+.portlet-asset-tag-admin .tags-admin-search {
+  background-image: url(@theme_image_path@/common/search.png);
+  background-position: 5px center;
+  background-repeat: no-repeat;
+  padding-left: 25px; }
+.portlet-asset-tag-admin .tags-pagination {
+  margin: 10px 0;
+  text-align: center; }
+  .portlet-asset-tag-admin .tags-pagination .pagination-content {
+    margin: 0; }
+.portlet-asset-tag-admin .view-tag .tag-field {
+  clear: left;
+  margin: 1em auto; }
+
+.tag-item-merge {
+  border: 1px solid #4E4848;
+  display: block;
+  font-weight: bold;
+  list-style: none;
+  padding: 8px 20px 8px 10px; }
+  .tag-item-merge a {
+    text-decoration: none; }
+
+.ie .portlet-asset-tag-admin .tag-item a {
+  zoom: 1; }
+
+.ie6 .portlet-asset-tag-admin .tag-item-actions-trigger, .ie6 .portlet-asset-tag-admin .tag-item-check, .ie7 .portlet-asset-tag-admin .tag-item-actions-trigger, .ie7 .portlet-asset-tag-admin .tag-item-check {
+  cursor: pointer; }
+.ie6 .portlet-asset-tag-admin-dialog .yui3-widget-bd .asset-tag-layer .field, .ie7 .portlet-asset-tag-admin-dialog .yui3-widget-bd .asset-tag-layer .field {
+  width: 200px; }
+
+.ie6 .portlet-asset-tag-admin .tag-item-merge, .ie7 .portlet-asset-tag-admin .tag-item-merge, .ie8 .portlet-asset-tag-admin .tag-item-merge {
+  font-weight: normal;
+  font-size: 120%; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tag_admin/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tag_admin/css/main.css
new file mode 100644
index 0000000..f87543b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tag_admin/css/main.css
@@ -0,0 +1,211 @@
+.portlet-asset-tag-admin {
+	.lfr-app-column-view {
+		border: none;
+	}
+
+	.navbar-inner {
+		padding-left: 12px;
+
+		.search-query {
+			width: 260px;
+		}
+	}
+
+	.tags-admin-actions {
+		clear: none;
+		float: left;
+		margin: 0;
+	}
+
+	.tags-admin-container {
+		.toolbar-container {
+			position: relative;
+
+			.tags-admin-toolbar {
+				background: #F6F8FB;
+				border-bottom: 1px solid #dedede;
+				overflow: hidden;
+				padding: 5px 0;
+			}
+
+			.tags-search-combobox {
+				position: absolute;
+				right: 5px;
+				top: 2px;
+			}
+		}
+	}
+
+	.header-title, .tree-node-content .tree-label {
+		word-wrap: break-word;
+	}
+
+	.tags-admin-edit-tag {
+		.tag-view-container {
+			padding: 0 0.5em 0 0;
+		}
+
+		.tag-details {
+			font-weight: bold;
+			vertical-align: middle;
+		}
+	}
+
+	.tag-item a {
+		display: block;
+		padding: 8px 20px 8px 25px;
+		text-decoration: none;
+	}
+
+	.tag-item-actions-trigger {
+		background-image: url(@theme_image_path@/common/edit.png);
+		background-repeat: no-repeat;
+		clip: rect(0pt, 0pt, 0pt, 0pt);
+		display: block;
+		height: 16px;
+		margin-top: -8px;
+		padding: 0;
+		position: absolute;
+		right: 5px;
+		top: 50%;
+		width: 16px;
+	}
+
+	input.tag-item-check {
+		margin-right: 10px;
+		margin-top: 0;
+		position: static;
+	}
+
+	.tags-admin-content {
+		.tag-item-container {
+			position: relative;
+
+			.tag-item-name {
+				margin-top: 2px;
+			}
+		}
+
+		li.tag-item-container, li.tag-item {
+			font-weight: bold;
+		}
+	}
+
+	.tag-item-container {
+		&:hover, &:focus {
+			.tag-item-actions-trigger {
+				clip: rect(auto auto auto auto);
+			}
+		}
+	}
+
+	.tag-item-actions-trigger:focus {
+		clip: rect(auto auto auto auto);
+	}
+
+	.tags-admin-list {
+		ul {
+			margin-left: 0;
+		}
+
+		.active {
+			a:hover {
+				color: #D9EDF7;
+			}
+		}
+
+		.active-area {
+			border: 1px solid #008000;
+
+			a {
+				background-color: #90EE90;
+				color: #90EE90;
+			}
+		}
+	}
+
+	.select-tags {
+		margin-left: 12px;
+		margin-top: -5px;
+	}
+
+	.tags-admin-list-container {
+		.tags-header {
+			display: inline-block;
+			margin-left: 2px;
+		}
+
+		&:after {
+			clear: both;
+			content: "";
+			display: block;
+			height: 0;
+		}
+	}
+
+	.tags-admin-search {
+		background-image: url(@theme_image_path@/common/search.png);
+		background-position: 5px center;
+		background-repeat: no-repeat;
+		padding-left: 25px;
+	}
+
+	.tags-pagination {
+		margin: 10px 0;
+		text-align: center;
+
+		.pagination-content {
+			margin: 0;
+		}
+	}
+
+	.view-tag {
+		.tag-field {
+			clear: left;
+			margin: 1em auto;
+		}
+	}
+}
+
+.tag-item-merge {
+	border: 1px solid #4E4848;
+	display: block;
+	font-weight: bold;
+	list-style: none;
+	padding: 8px 20px 8px 10px;
+
+	a {
+		text-decoration: none;
+	}
+}
+
+.ie {
+	.portlet-asset-tag-admin {
+		.tag-item a {
+			zoom: 1;
+		}
+	}
+}
+
+.ie6, .ie7 {
+	.portlet-asset-tag-admin {
+		.tag-item-actions-trigger, .tag-item-check {
+			cursor: pointer;
+		}
+	}
+
+	.portlet-asset-tag-admin-dialog {
+		.yui3-widget-bd .asset-tag-layer .field {
+			width: 200px;
+		}
+	}
+}
+
+.ie6, .ie7, .ie8 {
+	.portlet-asset-tag-admin {
+		.tag-item-merge {
+			font-weight: normal;
+			font-size: 120%;
+		}
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tag_admin/edit_tag.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tag_admin/edit_tag.jsp
new file mode 100644
index 0000000..ad4e457
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tag_admin/edit_tag.jsp
@@ -0,0 +1,168 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_tag_admin/init.jsp" %>
+
+<%
+String randomNamespace = PortalUtil.generateRandomKey(request, "portlet_asset_tad_admin_edit_tag") + StringPool.UNDERLINE;
+
+AssetTag tag = (AssetTag)request.getAttribute(WebKeys.ASSET_TAG);
+
+long tagId = BeanParamUtil.getLong(tag, request, "tagId");
+
+int[] tagPropertiesIndexes = null;
+
+List<AssetTagProperty> tagProperties = Collections.emptyList();
+
+String tagPropertiesIndexesParam = ParamUtil.getString(request, "tagPropertiesIndexes");
+
+if (Validator.isNotNull(tagPropertiesIndexesParam)) {
+	tagProperties = new ArrayList<AssetTagProperty>();
+
+	tagPropertiesIndexes = StringUtil.split(tagPropertiesIndexesParam, 0);
+
+	for (int tagPropertiesIndex : tagPropertiesIndexes) {
+		tagProperties.add(new AssetTagPropertyImpl());
+	}
+}
+else {
+	if (tag != null) {
+		tagProperties = AssetTagPropertyServiceUtil.getTagProperties(tag.getTagId());
+
+		tagPropertiesIndexes = new int[tagProperties.size()];
+
+		for (int i = 0; i < tagProperties.size(); i++) {
+			tagPropertiesIndexes[i] = i;
+		}
+	}
+
+	if (tagProperties.isEmpty()) {
+		tagProperties = new ArrayList<AssetTagProperty>();
+
+		tagProperties.add(new AssetTagPropertyImpl());
+
+		tagPropertiesIndexes = new int[] {0};
+	}
+
+	if (tagPropertiesIndexes == null) {
+		tagPropertiesIndexes = new int[0];
+	}
+}
+%>
+
+<portlet:actionURL var="editTagURL">
+	<portlet:param name="struts_action" value="/asset_tag_admin/edit_tag" />
+</portlet:actionURL>
+
+<aui:form action="<%= editTagURL %>" cssClass="update-tag-form" method="get" name='<%= randomNamespace + "fm" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= tag == null ? Constants.ADD : Constants.UPDATE %>" />
+
+	<aui:model-context bean="<%= tag %>" model="<%= AssetTag.class %>" />
+
+	<aui:fieldset>
+		<div>
+			<div class="add-tag-layer asset-tag-layer">
+				<aui:input name="tagId" type="hidden" value="<%= tagId %>" />
+
+				<aui:input autoFocus="<%= true %>" cssClass="tag-name" name="name" />
+
+				<c:if test="<%= PropsValues.ASSET_TAG_PERMISSIONS_ENABLED || PropsValues.ASSET_TAG_PROPERTIES_ENABLED %>">
+					<liferay-ui:panel-container extended="<%= false %>" id="assetTagPanelContainer" persistState="<%= true %>">
+						<c:if test="<%= PropsValues.ASSET_TAG_PERMISSIONS_ENABLED && (tag == null) %>">
+							<liferay-ui:panel collapsible="<%= true %>" cssClass="tag-permissions-actions" defaultState="open" extended="<%= true %>" id="assetTagPermissionsPanel" persistState="<%= true %>" title="permissions">
+								<liferay-ui:input-permissions
+									modelName="<%= AssetTag.class.getName() %>"
+								/>
+							</liferay-ui:panel>
+						</c:if>
+
+						<c:if test="<%= PropsValues.ASSET_TAG_PROPERTIES_ENABLED %>">
+							<liferay-ui:panel collapsible="<%= true %>" defaultState="closed" extended="<%= true %>" helpMessage="properties-are-a-way-to-add-more-detailed-information-to-a-specific-tag" id="assetTagPropertiesPanel" persistState="<%= true %>" title="properties">
+								<aui:fieldset cssClass="tag-tagProperties" id="tagProperties">
+
+									<%
+									for (int i = 0; i < tagPropertiesIndexes.length; i++) {
+										int tagPropertiesIndex = tagPropertiesIndexes[i];
+
+										AssetTagProperty tagProperty = tagProperties.get(i);
+									%>
+
+										<aui:model-context bean="<%= tagProperty %>" model="<%= AssetTagProperty.class %>" />
+
+										<div class="lfr-form-row lfr-form-row-inline">
+											<div class="row-fields">
+												<aui:input fieldParam='<%= "key" + tagPropertiesIndex %>' id='<%= "key" + tagPropertiesIndex %>' name="key" />
+
+												<aui:input fieldParam='<%= "value" + tagPropertiesIndex %>' id='<%= "value" + tagPropertiesIndex %>' name="value" />
+											</div>
+										</div>
+
+									<%
+									}
+									%>
+
+									<aui:input name="tagPropertiesIndexes" type="hidden" value="<%= StringUtil.merge(tagPropertiesIndexes) %>" />
+								</aui:fieldset>
+							</liferay-ui:panel>
+						</c:if>
+					</liferay-ui:panel-container>
+				</c:if>
+
+				<aui:button-row>
+					<aui:button type="submit" />
+
+					<c:if test="<%= tag != null %>">
+						<c:if test="<%= AssetTagPermission.contains(permissionChecker, tag, ActionKeys.DELETE) %>">
+							<aui:button id="deleteTagButton" value="delete" />
+						</c:if>
+
+						<c:if test="<%= PropsValues.ASSET_TAG_PERMISSIONS_ENABLED && AssetTagPermission.contains(permissionChecker, tag, ActionKeys.PERMISSIONS) %>">
+							<liferay-security:permissionsURL
+								modelResource="<%= AssetTag.class.getName() %>"
+								modelResourceDescription="<%= tag.getName() %>"
+								resourcePrimKey="<%= String.valueOf(tag.getTagId()) %>"
+								var="permissionsURL"
+								windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+							/>
+
+							<aui:button data-url="<%= permissionsURL %>" id="updateTagPermissions" value="permissions" />
+						</c:if>
+					</c:if>
+
+					<aui:button cssClass="close-panel" type="cancel" value="close" />
+				</aui:button-row>
+			</div>
+		</div>
+	</aui:fieldset>
+</aui:form>
+
+<c:if test="<%= PropsValues.ASSET_TAG_PROPERTIES_ENABLED %>">
+	<aui:script use="liferay-auto-fields">
+		var autoFields = new Liferay.AutoFields(
+			{
+				contentBox: 'fieldset#<portlet:namespace />tagProperties',
+				fieldIndexes: '<portlet:namespace />tagPropertiesIndexes',
+				namespace: '<portlet:namespace />'
+			}
+		).render();
+
+		var tagPropertiesTrigger = A.one('fieldset#<portlet:namespace />tagProperties');
+
+		if (tagPropertiesTrigger) {
+			tagPropertiesTrigger.setData('autoFieldsInstance', autoFields);
+		}
+	</aui:script>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tag_admin/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tag_admin/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tag_admin/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tag_admin/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tag_admin/init.jsp
new file mode 100644
index 0000000..3d6621d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tag_admin/init.jsp
@@ -0,0 +1,25 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.asset.model.AssetTagProperty" %><%@
+page import="com.liferay.portlet.asset.model.impl.AssetTagPropertyImpl" %><%@
+page import="com.liferay.portlet.asset.service.AssetTagPropertyServiceUtil" %><%@
+page import="com.liferay.portlet.asset.service.permission.AssetPermission" %><%@
+page import="com.liferay.portlet.asset.service.permission.AssetTagPermission" %>
+
+<%@ include file="/html/portlet/asset_tag_admin/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tag_admin/js/main.js b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tag_admin/js/main.js
new file mode 100644
index 0000000..a7345e1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tag_admin/js/main.js
@@ -0,0 +1,1877 @@
+AUI.add(
+	'liferay-tags-admin',
+	function(A) {
+		var AObject = A.Object;
+		var HistoryManager = Liferay.HistoryManager;
+		var Lang = A.Lang;
+		var Node = A.Node;
+
+		var owns = AObject.owns;
+
+		var ACTION_ADD = 0;
+
+		var ACTION_EDIT = 1;
+
+		var ACTION_VIEW = 2;
+
+		var ADD_PANEL = 'addPanel';
+
+		var CSS_ACTIVE_AREA = 'active-area';
+
+		var CSS_MESSAGE_ERROR = 'alert-error';
+
+		var CSS_MESSAGE_SUCCESS = 'alert-success';
+
+		var CSS_TAG_DIALOG = 'portlet-asset-tag-admin-dialog';
+
+		var DRAG_NODE = 'dragNode';
+
+		var EDIT_PANEL = 'editPanel';
+
+		var EVENT_CLICK = 'click';
+
+		var EVENT_SUBMIT = 'submit';
+
+		var INVALID_VALUE = A.Attribute.INVALID_VALUE;
+
+		var LIFECYCLE_RENDER = 0;
+
+		var LIFECYCLE_PROCESS = 1;
+
+		var MAX_DISPLAY_ITEMS = 15;
+
+		var MESSAGE_TYPE_ERROR = 'error';
+
+		var MESSAGE_TYPE_SUCCESS = 'success';
+
+		var NODE = 'node';
+
+		var TAG_MESSAGES = 'TagMessages';
+
+		var TPL_PORTLET_MESSAGES = '<div class="alert hide lfr-message-response" id="portletMessages" />';
+
+		var TPL_TAG_LIST_CONTAINER = '<ul class="nav nav-pills nav-stacked">';
+
+		var TPL_TAG_LIST = '<li class="tag-item-container results-row {cssClassSelected}" data-tag="{name}" data-tagId="{tagId}" tabIndex="0">' +
+			'<a href="javascript:;" data-tagId="{tagId}" tabIndex="-1">' +
+				'<input type="checkbox" class="tag-item-check" name="tag-item-check" data-tagId="{tagId}" data-tagName="{name}">' +
+				'<span class="tag-item-name" data-tagId="{tagId}">{name}</span>' +
+				'<span tabindex="0" class="tag-item-actions-trigger" data-tagId="{tagId}"></span>' +
+			'</a>' +
+		'</li>';
+
+		var TPL_TAG_MERGE_BODY = '<div class="container-fluid tags-admin-merge-tag">' +
+			'<div class="row">' +
+				'<div class="span6">' +
+					'<div class="selected-tags-container">' +
+						'<label for="{namespace}selectedTagsList">' + Liferay.Language.get('tags-to-be-merged') + ':</label>' +
+						'<select id="{namespace}selectedTagsList" class="selected-tags-list" multiple>' +
+						'</select>' +
+					'</div>' +
+					'<div class="btn-group" id="{namespace}sortSelect">' +
+						'<button class="btn btn-mini tag-move-up" id="{namespace}tagMoveUp"><i class="icon-chevron-up"></i></button>' +
+						'<button class="btn btn-mini tag-move-down" id="{namespace}tagMoveDown"><i class="icon-chevron-down"></i></button>' +
+					'</div>' +
+				'</div>' +
+				'<div class="span6">' +
+					'<div class="target-tags-container">' +
+						'<label class="tags-label" for="{namespace}targetTagsList">' + Liferay.Language.get('target-tag') + ':</label>' +
+						'<select id="{namespace}targetTagsList" class="target-tags-list">' +
+						'</select>' +
+					'</div>' +
+				'</div>' +
+			'</div>' +
+		'</div>';
+
+		var TPL_TAG_MERGE_FOOTER =
+			'<div class="container-fluid tags-admin-merge-tag">' +
+				'<div class="row-fluid">' +
+					'<div class="span7">' +
+						'<div class="pull-left tag-options">' +
+							'<label class="checkbox">' +
+								'<input id="{namespace}mergeOnlySelectedTags" type="checkbox">' + Liferay.Language.get('merge-only-selected-tags') +
+							'</label>' +
+							'<label class="checkbox">' +
+								'<input checked id="{namespace}overrideProperties" type="checkbox">' + Liferay.Language.get('override-tags-properties') +
+							'</label>' +
+						'</div>' +
+					'</div>' +
+					'<div class="span5">' +
+						'<div id="{namespace}buttonsContainer"></div>' +
+					'</div>' +
+				'</div>' +
+			'</div>';
+
+		var TPL_TAG_MERGE_ITEM = '<option value="{value}" title="{name}" active>{name}</option>';
+
+		var TPL_TAG_PANEL_MESSAGES = '<div class="alert hide lfr-message-response" id="{namespace}{panel}TagMessages" />';
+
+		var TPL_TAGS_MESSAGES = '<div class="alert alert-info hide lfr-message-response" id="tagsMessages" />';
+
+		var AssetTagsAdmin = A.Component.create(
+			{
+				NAME: 'assettagsadmin',
+
+				EXTENDS: A.Base,
+
+				prototype: {
+					initializer: function(config) {
+						var instance = this;
+
+						instance._config = config;
+
+						instance.portletId = config.portletId;
+
+						instance._prefixedPortletId = '_' + config.portletId + '_';
+
+						instance._container = A.one('.tags-admin-container');
+						instance._tagViewContainer = A.one('.tag-view-container');
+						instance._stagedTagsWrapper = A.one('.selected-tags-wrapper');
+						instance._tagsList = A.one('.tags-admin-list');
+
+						instance._stagedTagsList = instance._stagedTagsWrapper.one('.token-container');
+
+						instance._tokenList = new Liferay.TokenList(
+							{
+								after: {
+									close: function(event) {
+										instance._checkTag(event.item, false);
+
+										instance._toggleStagedTagsWrapper();
+									}
+								},
+								boundingBox: '.tag-staging-area',
+								contentBox: '.token-container'
+							}
+						).render();
+
+						instance._tagsMessageContainer = Node.create(TPL_TAGS_MESSAGES);
+						instance._portletMessageContainer = Node.create(TPL_PORTLET_MESSAGES);
+
+						instance._container.placeBefore(instance._portletMessageContainer);
+
+						var tagDataContainer = A.one('.tags-admin-edit-tag');
+
+						instance._dialogAlignConfig = {
+							node: tagDataContainer,
+							points: ['tc', 'tl']
+						};
+
+						instance._hideMessageTask = A.debounce(instance._hideMessage, 7000);
+
+						instance._tagsList.on(EVENT_CLICK, instance._onTagsListClick, instance);
+						instance._tagsList.on('key', instance._onTagsListClick, 'up:13', instance);
+
+						instance._tagViewContainer.on(EVENT_CLICK, instance._onTagViewContainerClick, instance);
+
+						instance._listContainer = instance._container.one('.tags-admin-list-container');
+
+						instance._listContainer.plug(A.LoadingMask);
+
+						var namespace = instance._prefixedPortletId;
+
+						var addTagButton = A.one('#' + namespace + 'addTagButton');
+
+						if (addTagButton) {
+							addTagButton.on(EVENT_CLICK, instance._onShowTagPanel, instance, ACTION_ADD);
+						}
+
+						var tagsPermissionsButton = A.one('#' + namespace + 'tagsPermissionsButton');
+
+						if (tagsPermissionsButton) {
+							tagsPermissionsButton.on(EVENT_CLICK, instance._onTagChangePermissions, instance);
+						}
+
+						instance._tagsActionsButton = A.one('#' + namespace + 'tagsActionsButton');
+
+						A.one('#' + namespace + 'deleteSelectedTags').on(EVENT_CLICK, instance._deleteSelectedTags, instance);
+						A.one('#' + namespace + 'mergeSelectedTags').on(EVENT_CLICK, instance._mergeSelectedTags, instance);
+
+						var checkAllTagsCheckbox = A.one('#' + namespace + 'checkAllTagsCheckbox');
+
+						checkAllTagsCheckbox.on(EVENT_CLICK, instance._checkAllTags, instance);
+
+						instance._checkAllTagsCheckbox = checkAllTagsCheckbox;
+
+						instance._createTagSearch();
+
+						HistoryManager.on('stateChange', instance._onStateChange, instance);
+
+						instance._loadData();
+
+						instance.after('drag:drag', instance._afterDrag);
+						instance.after('drag:drophit', instance._afterDragDrop);
+						instance.after('drag:enter', instance._afterDragEnter);
+						instance.after('drag:exit', instance._afterDragExit);
+						instance.after('drag:start', instance._afterDragStart);
+					},
+
+					_afterDrag: function(event) {
+						var instance = this;
+
+						A.DD.DDM.syncActiveShims(true);
+					},
+
+					_afterDragDrop: function(event) {
+						var instance = this;
+
+						var dropNode = event.drop.get(NODE);
+						var node = event.target.get(NODE);
+
+						dropNode.removeClass(CSS_ACTIVE_AREA);
+
+						instance._merge(node, dropNode);
+					},
+
+					_afterDragEnter: function(event) {
+						var instance = this;
+
+						var dropNode = event.drop.get(NODE);
+
+						var target = event.target;
+
+						var proxyNode = target.get(DRAG_NODE);
+						var node = target.get(NODE);
+
+						var textDestNode = dropNode.one('a').html();
+						var textSrcNode = node.one('a').html();
+
+						proxyNode.one('a').html(textDestNode + ' &larr; ' + textSrcNode);
+
+						dropNode.addClass(CSS_ACTIVE_AREA);
+					},
+
+					_afterDragExit: function(event) {
+						var instance = this;
+
+						var dropNode = event.drop.get(NODE);
+
+						dropNode.removeClass(CSS_ACTIVE_AREA);
+					},
+
+					_afterDragStart: function(event) {
+						var instance = this;
+
+						var drag = event.target;
+
+						var node = drag.get(NODE);
+						var proxyNode = drag.get(DRAG_NODE);
+
+						var clone = proxyNode.get('firstChild');
+
+						if (!clone) {
+							clone = node.clone().empty();
+
+							clone.addClass('tag-item-merge');
+
+							proxyNode.attr('data-tagId', clone.attr('data-tagId'));
+							proxyNode.appendChild(clone);
+						}
+
+						clone.html(node.html());
+					},
+
+					_afterTagsPaginationChangeRequest: function(event) {
+						var instance = this;
+
+						var lastState = event.state.lastState;
+						var state = event.state;
+
+						var historyState = {};
+
+						var paginationMap = instance._getTagsPaginationMap();
+
+						AObject.each(
+							paginationMap,
+							function(item, index, collection) {
+								if (owns(state, index)) {
+									var historyEntry = item.historyEntry;
+
+									var newItemValue = state[index];
+
+									var value = INVALID_VALUE;
+
+									if (newItemValue === item.defaultValue &&
+										Lang.isValue(HistoryManager.get(historyEntry))) {
+
+										value = null;
+									}
+									else if (lastState && (newItemValue !== lastState[index])) {
+										value = newItemValue;
+									}
+
+									if (value !== INVALID_VALUE) {
+										historyState[historyEntry] = value;
+									}
+								}
+							}
+						);
+
+						if (!AObject.isEmpty(historyState)) {
+							HistoryManager.add(historyState);
+						}
+
+						instance._reloadData();
+					},
+
+					_bindCloseEvent: function(contextPanel) {
+						var instance = this;
+
+						contextPanel.get('boundingBox').on('key', contextPanel.hide, 'up:27', contextPanel);
+					},
+
+					_checkAllTags: function(event) {
+						var instance = this;
+
+						var currentCheckedStatus = event.currentTarget.attr('checked');
+
+						var tagItemChecks = instance._tagsList.all('.tag-item-check');
+
+						tagItemChecks.each(
+							function(item, index, collection) {
+								var checked = item.attr('checked');
+
+								if (currentCheckedStatus && !checked) {
+									instance._stageTagItem(item);
+								}
+								else if (!currentCheckedStatus && checked) {
+									instance._removeStagedTagItem(item);
+								}
+							}
+						);
+
+						tagItemChecks.attr('checked', currentCheckedStatus);
+					},
+
+					_checkStagedTags: function() {
+						var instance = this;
+
+						instance._getStagedTags().each(
+							function(item, index, collection) {
+								instance._checkTag(item, true);
+							}
+						);
+					},
+
+					_checkTag: function(node, checked) {
+						var instance = this;
+
+						var tagId = node.attr('data-fieldValues');
+
+						var tagCheck = instance._getTagCheck(tagId);
+
+						if (tagCheck) {
+							tagCheck.attr('checked', checked);
+						}
+
+						Liferay.Util.checkAllBox(instance._tagsList, 'tag-item-check', '#' + instance._prefixedPortletId + 'checkAllTagsCheckbox');
+					},
+
+					_createTagPanelAdd: function() {
+						var instance = this;
+
+						var tagPanelAdd = Liferay.Util.Window.getWindow(
+							{
+								dialog: {
+									align: instance._dialogAlignConfig,
+									cssClass: CSS_TAG_DIALOG
+								},
+								title: Liferay.Language.get('add-tag')
+							}
+						);
+
+						tagPanelAdd.hide();
+
+						instance._bindCloseEvent(tagPanelAdd);
+
+						instance._tagPanelAdd = tagPanelAdd;
+
+						return tagPanelAdd;
+					},
+
+					_createTagPanelEdit: function() {
+						var instance = this;
+
+						instance._tagPanelEdit = Liferay.Util.Window.getWindow(
+							{
+								dialog: {
+									align: instance._dialogAlignConfig,
+									cssClass: CSS_TAG_DIALOG
+								},
+								title: Liferay.Language.get('edit-tag')
+							}
+						);
+
+						instance._tagPanelEdit.hide();
+
+						instance._bindCloseEvent(instance._tagPanelEdit);
+
+						instance._tagPanelEdit.after(
+							'visibleChange',
+							function(event) {
+								if (!event.newVal) {
+									var body = instance._tagPanelEdit.getStdModNode(A.WidgetStdMod.BODY);
+
+									body.empty();
+								}
+							}
+						);
+
+						return instance._tagPanelEdit;
+					},
+
+					_createTagPanelMessage: function(panel) {
+						var instance = this;
+
+						var tplValues = {
+							namespace: instance._prefixedPortletId,
+							panel: panel
+						};
+
+						var tagPanelMessageTpl = Lang.sub(TPL_TAG_PANEL_MESSAGES, tplValues);
+
+						return Node.create(tagPanelMessageTpl);
+					},
+
+					_createTagPanelPermissions: function() {
+						var instance = this;
+
+						var panelPermissionsChange = instance._panelPermissionsChange;
+
+						if (!panelPermissionsChange) {
+							panelPermissionsChange = Liferay.Util.Window.getWindow(
+								{
+									dialog: {
+										align: instance._dialogAlignConfig,
+										cssClass: CSS_TAG_DIALOG + ' permissions-change',
+										width: 600
+									},
+									title: Liferay.Language.get('edit-permissions'),
+									uri: 'about:blank'
+								}
+							);
+
+							instance._panelPermissionsChange = panelPermissionsChange;
+						}
+
+						return panelPermissionsChange;
+					},
+
+					_createTagSearch: function() {
+						var instance = this;
+
+						var searchInput = A.one('#' + instance._prefixedPortletId + 'tagsAdminSearchInput');
+
+						var tagsSearch = new TagsSearch(
+							{
+								inputNode: searchInput,
+								minQueryLength: 0,
+								queryDelay: 300
+							}
+						);
+
+						if (Liferay.Form.Placeholders) {
+							tagsSearch.sendRequest('');
+						}
+
+						tagsSearch.after(
+							'query',
+							function(event) {
+								instance._restartSearch = true;
+
+								instance._loadData();
+							}
+						);
+
+						searchInput.on('keydown', instance._onSearchInputKeyDown, instance);
+
+						instance._tagsSearch = tagsSearch;
+					},
+
+					_createURL: function(action, lifecycle, params) {
+						var instance = this;
+
+						var path = '/asset_tag_admin/';
+
+						var url;
+
+						var config = instance._config;
+
+						if (lifecycle == LIFECYCLE_RENDER) {
+							url = Liferay.PortletURL.createURL(config.baseRenderURL);
+						}
+						else if (lifecycle == LIFECYCLE_PROCESS) {
+							url = Liferay.PortletURL.createURL(config.baseActionURL);
+						}
+						else {
+							throw 'Internal error. Unimplemented lifecycle.';
+						}
+
+						url.setPortletId(instance.portletId);
+						url.setWindowState('exclusive');
+
+						if (action == ACTION_ADD) {
+							path += 'edit_tag';
+						}
+						else if (action == ACTION_EDIT) {
+							path += 'edit_tag';
+
+							url.setParameter('tagId', instance._selectedTagId);
+						}
+						else if (action == ACTION_VIEW) {
+							path += 'view_tag';
+
+							url.setParameter('tagId', instance._selectedTagId);
+						}
+
+						url.setParameter('struts_action', path);
+
+						if (params) {
+							for (var key in params) {
+								if (owns(params, key)) {
+									url.setParameter(key, params[key]);
+								}
+							}
+						}
+
+						url.setDoAsGroupId(themeDisplay.getScopeGroupId());
+
+						return url;
+					},
+
+					_deleteSelectedTags: function(event) {
+						var instance = this;
+
+						var tagsNodes = instance._getStagedTags();
+
+						if (tagsNodes.size() > 0) {
+							if (confirm(Liferay.Language.get('are-you-sure-you-want-to-delete-the-selected-tags'))) {
+								var checkedItemsIds = tagsNodes.attr('data-fieldValues');
+
+								if (checkedItemsIds.length > 0) {
+									Liferay.Service(
+										'/assettag/delete-tags',
+										{
+											tagIds: checkedItemsIds
+										},
+										A.bind('_processActionResult', instance)
+									);
+								}
+							}
+						}
+						else {
+							alert(Liferay.Language.get('there-are-no-selected-tags'));
+						}
+					},
+
+					_deleteTag: function(tagId, callback) {
+						var instance = this;
+
+						Liferay.Service(
+							'/assettag/delete-tag',
+							{
+								tagId: tagId
+							},
+							callback
+						);
+					},
+
+					_displayTagData: function() {
+						var instance = this;
+
+						if (instance._selectedTagId) {
+							var tagURL = instance._createURL(ACTION_VIEW, LIFECYCLE_RENDER);
+
+							var ioDetails = instance._getIOTagDetails();
+
+							ioDetails.set('uri', tagURL.toString()).start();
+						}
+						else {
+							instance._tagViewContainer.empty();
+						}
+					},
+
+					_displayTags: function(callback) {
+						var instance = this;
+
+						var loadingMask = instance._listContainer.loadingmask;
+
+						loadingMask.show();
+
+						instance._getTags(
+							function(result) {
+								loadingMask.hide();
+
+								var tags = result.tags || [];
+
+								instance._prepareTags(tags, callback);
+
+								instance._checkStagedTags();
+							}
+						);
+					},
+
+					_focusTagPanelAdd: function() {
+						var instance = this;
+
+						var inputTagAddNameNode = instance._tagFormAdd.one('.tag-name input');
+
+						Liferay.Util.focusFormField(inputTagAddNameNode);
+					},
+
+					_focusTagPanelEdit: function() {
+						var instance = this;
+
+						var inputTagEditNameNode = instance._tagFormEdit.one('.tag-name input');
+
+						Liferay.Util.focusFormField(inputTagEditNameNode);
+					},
+
+					_getDDHandler: function() {
+						var instance = this;
+
+						var ddHandler = instance._ddHandler;
+
+						if (!ddHandler) {
+							ddHandler = new A.DD.Delegate(
+								{
+									container: '.tags-admin-list',
+									nodes: 'li',
+									target: true
+								}
+							);
+
+							var dd = ddHandler.dd;
+
+							dd.addTarget(instance);
+
+							dd.plug(
+								A.Plugin.DDProxy,
+								{
+									borderStyle: '0',
+									moveOnEnd: false
+								}
+							);
+
+							dd.plug(
+								A.Plugin.DDConstrained,
+								{
+									constrain2node: instance._tagsList
+								}
+							);
+
+							dd.plug(
+								A.Plugin.DDNodeScroll,
+								{
+									node: instance._tagsList,
+									scrollDelay: 100
+								}
+							);
+
+							dd.removeInvalid('a');
+
+							instance._ddHandler = ddHandler;
+						}
+
+						return ddHandler;
+					},
+
+					_getIOTagUpdate: function() {
+						var instance = this;
+
+						var ioTag = instance._ioTag;
+
+						if (!ioTag) {
+							ioTag = A.io.request(
+								null,
+								{
+									autoLoad: false,
+									dataType: 'json',
+									on: {
+										failure: function(event, id, obj) {
+											instance._onTagUpdateFailure(obj);
+										},
+										success: function(event, id, obj) {
+											var response = this.get('responseData');
+
+											instance._onTagUpdateSuccess(response);
+										}
+									}
+								}
+							);
+
+							instance._ioTag = ioTag;
+						}
+
+						return ioTag;
+					},
+
+					_getIOTagDetails: function() {
+						var instance = this;
+
+						var ioTagDetails = instance._ioTagDetails;
+
+						if (!ioTagDetails) {
+							ioTagDetails = A.io.request(
+								null,
+								{
+									autoLoad: false,
+									dataType: 'html',
+									on: {
+										success: function(event, id, obj) {
+											var response = this.get('responseData');
+
+											instance._onTagViewSuccess(response);
+										},
+										failure: function(event, id, obj) {
+											instance._onTagViewFailure(obj);
+										}
+									}
+								}
+							);
+
+							instance._ioTagDetails = ioTagDetails;
+						}
+
+						return ioTagDetails;
+					},
+
+					_getStagedTag: function(tagId) {
+						var instance = this;
+
+						return instance._stagedTagsList.one('.lfr-token[data-fieldValues="' + tagId + '"]');
+					},
+
+					_getStagedTags: function() {
+						var instance = this;
+
+						return instance._stagedTagsList.all('.lfr-token');
+					},
+
+					_getTag: function(tagId) {
+						var instance = this;
+
+						return instance._tagsList.one('li[data-tagId="' + tagId + '"]');
+					},
+
+					_getTagCheck: function(tagId) {
+						var instance = this;
+
+						return instance._tagsList.one('.tag-item-check[data-tagId="' + tagId + '"]');
+					},
+
+					_getTagId: function(expr) {
+						var instance = this;
+
+						var elem = expr;
+						var attr;
+
+						if (!expr instanceof Node) {
+							elem = instance._tagsList.one(expr);
+						}
+
+						if (elem) {
+							attr = elem.attr('data-tagId');
+						}
+
+						return attr;
+					},
+
+					_getTagName: function(expr) {
+						var instance = this;
+
+						var elem = expr;
+						var attr;
+
+						if (!expr instanceof Node) {
+							elem = instance._tagsList.one(expr);
+						}
+
+						if (elem) {
+							attr = elem.attr('data-tag');
+						}
+
+						return attr;
+					},
+
+					_getTagsPagination: function() {
+						var instance = this;
+
+						var tagsPagination = instance._tagsPagination;
+
+						if (!tagsPagination) {
+							var instanceConfig = instance._config;
+
+							var config = {
+								boundingBox: '.tags-pagination',
+								circular: false,
+								visible: false
+							};
+
+							var paginationMap = instance._getTagsPaginationMap();
+
+							AObject.each(
+								paginationMap,
+								function(item, index, collection) {
+									config[index] = Number(HistoryManager.get(item.historyEntry)) || item.defaultValue;
+								}
+							);
+
+							tagsPagination = new A.Pagination(config).render();
+
+							tagsPagination.after('changeRequest', instance._afterTagsPaginationChangeRequest, instance);
+
+							instance._tagsPagination = tagsPagination;
+						}
+
+						return tagsPagination;
+					},
+
+					_getTagsPaginationMap: function() {
+						var instance = this;
+
+						var namespace = instance._prefixedPortletId;
+						var paginationMap = instance._paginationMap;
+
+						if (!paginationMap) {
+							paginationMap = {
+								page: {
+									defaultValue: 1,
+									formatter: Number,
+									historyEntry: namespace + 'page'
+								},
+								tagsPerPage: {
+									defaultValue: instance._config.tagsPerPage,
+									formatter: Number,
+									historyEntry: namespace + 'tagsPerPage'
+								}
+							};
+
+							instance._paginationMap = paginationMap;
+						}
+
+						return paginationMap;
+					},
+
+					_getTagPanelMerge: function() {
+						var instance = this;
+
+						var tagPanelMerge = instance._tagPanelMerge;
+
+						if (!tagPanelMerge) {
+							var namespace = instance._prefixedPortletId;
+
+							var tplValues = {
+								namespace: namespace
+							};
+
+							var panelBodyContent = Lang.sub(TPL_TAG_MERGE_BODY, tplValues);
+							var panelFooterContent = Lang.sub(TPL_TAG_MERGE_FOOTER, tplValues);
+
+							tagPanelMerge = Liferay.Util.Window.getWindow(
+								{
+									dialog: {
+										align: instance._dialogAlignConfig,
+										bodyContent: panelBodyContent,
+										cssClass: CSS_TAG_DIALOG,
+										footerContent: panelFooterContent
+									},
+									title: Liferay.Language.get('merge-tags')
+								}
+							);
+
+							var okButton = new A.Button(
+								{
+									label: Liferay.Language.get('ok'),
+									on: {
+										click: A.bind('_onTagMergeClick', instance)
+									}
+								}
+							);
+
+							var cancelButton = new A.Button(
+								{
+									label: Liferay.Language.get('cancel'),
+									on: {
+										click: function(event) {
+											tagPanelMerge.hide();
+										}
+									}
+								}
+							);
+
+							var buttonsContainer = A.one('#' + namespace + 'buttonsContainer');
+
+							okButton.render(buttonsContainer);
+							cancelButton.render(buttonsContainer);
+
+							tagPanelMerge.hide();
+
+							tagPanelMerge.after(
+								'visibleChange',
+								function(event) {
+									if (!event.newVal) {
+										instance._previousTagData = null;
+									}
+								}
+							);
+
+							A.one('#' + namespace + 'sortSelect').delegate(
+								'click',
+								function(event) {
+									var down = event.currentTarget.hasClass('tag-move-down');
+
+									Liferay.Util.reorder(instance._selectedTagsList, down);
+								},
+								'button'
+							);
+
+							instance._bindCloseEvent(tagPanelMerge);
+
+							var contentBox = tagPanelMerge.get('contentBox');
+
+							var targetTagsList = contentBox.one('#' + namespace + 'targetTagsList');
+
+							targetTagsList.on('change', instance._updateMergeItemsTarget, instance);
+
+							instance._selectedTagsList = contentBox.one('#' + namespace + 'selectedTagsList');
+							instance._targetTagsList = contentBox.one('#' + namespace + 'targetTagsList');
+
+							instance._tagPanelMerge = tagPanelMerge;
+						}
+
+						return tagPanelMerge;
+					},
+
+					_getTags: function(callback) {
+						var instance = this;
+
+						var pagination = instance._getTagsPagination();
+
+						var config = instance._config;
+
+						var tagsPerPage = config.tagsPerPage;
+
+						var currentPage = 0;
+
+						if (!instance._restartSearch) {
+							currentPage = pagination.get('page');
+
+							if (!currentPage) {
+								var paginationMap = instance._getTagsPaginationMap();
+
+								currentPage = paginationMap.page.defaultValue;
+							}
+
+							currentPage -= 1;
+						}
+
+						var start = currentPage * tagsPerPage;
+						var end = start + tagsPerPage;
+
+						Liferay.Service(
+							'/assettag/get-json-group-tags',
+							{
+								end: end,
+								groupId: themeDisplay.getSiteGroupId(),
+								name: instance._tagsSearch.get('query'),
+								start: start
+							},
+							function(result) {
+								var total = result.total;
+
+								instance._restartSearch = false;
+
+								pagination.set('total', Math.ceil(total / tagsPerPage));
+								pagination.set('visible', (total > tagsPerPage));
+
+								pagination.setState(result);
+
+								if (callback) {
+									callback.apply(instance, arguments);
+								}
+							}
+						);
+					},
+
+					_initializeTagPanelAdd: function(callback) {
+						var instance = this;
+
+						var tagPanelAdd = instance._tagPanelAdd;
+
+						var tagFormAdd = tagPanelAdd.get('contentBox').one('form.update-tag-form');
+
+						var tagPanelMessage = instance._createTagPanelMessage(ADD_PANEL);
+
+						tagFormAdd.prepend(tagPanelMessage);
+
+						tagFormAdd.detach(EVENT_SUBMIT);
+
+						tagFormAdd.on(EVENT_SUBMIT, instance._onTagFormSubmit, instance, tagFormAdd);
+
+						instance._tagFormAdd = tagFormAdd;
+
+						var closeButton = tagFormAdd.one('.close-panel');
+
+						closeButton.on(
+							EVENT_CLICK,
+							function(event) {
+								tagPanelAdd.hide();
+							}
+						);
+
+						tagPanelAdd.on(
+							'visibleChange',
+							function(event) {
+								if (!event.newVal) {
+									if (instance._tagFormAdd) {
+										instance._tagFormAdd.reset();
+									}
+
+									instance._resetTagsProperties(event);
+								}
+							}
+						);
+
+						if (callback) {
+							callback.call(instance);
+						}
+
+						return tagPanelAdd;
+					},
+
+					_initializeTagPanelEdit: function(callback) {
+						var instance = this;
+
+						var tagPanelEdit = instance._tagPanelEdit;
+
+						var tagFormEdit = tagPanelEdit.get('contentBox').one('form.update-tag-form');
+
+						var tagPanelMessage = instance._createTagPanelMessage(EDIT_PANEL);
+
+						tagFormEdit.prepend(tagPanelMessage);
+
+						tagFormEdit.detach(EVENT_SUBMIT);
+
+						tagFormEdit.on(EVENT_SUBMIT, instance._onTagFormSubmit, instance, tagFormEdit);
+
+						var closeButton = tagFormEdit.one('.close-panel');
+
+						closeButton.on(
+							EVENT_CLICK,
+							function(event) {
+								tagPanelEdit.hide();
+							}
+						);
+
+						var buttonDeleteTag = tagFormEdit.one('#deleteTagButton');
+
+						if (buttonDeleteTag) {
+							buttonDeleteTag.on(EVENT_CLICK, instance._onDeleteTag, instance);
+						}
+
+						var buttonChangeTagPermissions = tagFormEdit.one('#updateTagPermissions');
+
+						if (buttonChangeTagPermissions) {
+							buttonChangeTagPermissions.on(EVENT_CLICK, instance._onTagChangePermissions, instance);
+						}
+
+						var inputTagNameNode = tagFormEdit.one('.tag-name input');
+
+						Liferay.Util.focusFormField(inputTagNameNode);
+					},
+
+					_hideAllMessages: function() {
+						var instance = this;
+
+						instance._container.all('.lfr-message-response').hide();
+					},
+
+					_hideMessage: function(container) {
+						var instance = this;
+
+						container = container || instance._portletMessageContainer;
+
+						container.hide();
+					},
+
+					_hidePanels: function() {
+						var instance = this;
+
+						if (instance._tagPanelAdd) {
+							instance._tagPanelAdd.hide();
+						}
+
+						if (instance._tagPanelEdit) {
+							instance._tagPanelEdit.hide();
+						}
+
+						if (instance._tagPanelMerge) {
+							instance._tagPanelMerge.hide();
+						}
+					},
+
+					_loadData: function() {
+						var instance = this;
+
+						instance._displayTags(
+							function() {
+								instance._displayTagData();
+							}
+						);
+					},
+
+					_loadPermissions: function(url) {
+						var instance = this;
+
+						var panelPermissionsChange = instance._panelPermissionsChange;
+
+						if (!instance._panelPermissionsChange) {
+							panelPermissionsChange = instance._createTagPanelPermissions();
+						}
+
+						panelPermissionsChange.show();
+
+						panelPermissionsChange.iframe.set('uri', url);
+
+						panelPermissionsChange._syncUIPosAlign();
+
+						if (instance._tagPanelEdit) {
+							var zIndex = parseInt(instance._tagPanelEdit.get('zIndex'), 10) + 2;
+
+							panelPermissionsChange.set('zIndex', zIndex);
+						}
+					},
+
+					_merge: function(node, dropNode) {
+						var instance = this;
+
+						var fromTagId = instance._getTagId(node);
+						var fromTagName = instance._getTagName(node);
+						var toTagId = instance._getTagId(dropNode);
+						var toTagName = instance._getTagName(dropNode);
+
+						var mergeText = Liferay.Language.get('are-you-sure-you-want-to-merge-x-into-x');
+
+						mergeText = Lang.sub(mergeText, [fromTagName, toTagName]);
+
+						if (confirm(mergeText)) {
+							instance._mergeTag(
+								fromTagId,
+								toTagId,
+								function() {
+									node.remove();
+
+									instance._selectTag(toTagId);
+
+									if (instance._getStagedTag(fromTagId)) {
+										instance._removeStagedTagItem(node);
+									}
+								}
+							);
+						}
+					},
+
+					_mergeSelectedTags: function(event) {
+						var instance = this;
+
+						var selectedTagsNodes = instance._getStagedTags();
+
+						if (selectedTagsNodes.size() > 1) {
+							var checkedItemsIds = selectedTagsNodes.attr('data-fieldValues');
+							var checkedItemsName = selectedTagsNodes.attr('data-clearFields');
+
+							var tagPanelMerge = instance._getTagPanelMerge();
+
+							var selectedTagsList = instance._selectedTagsList;
+							var targetTagsList = instance._targetTagsList;
+
+							selectedTagsList.empty();
+							targetTagsList.empty();
+
+							selectedTagsNodes.each(
+								function(item, index, collection) {
+									var name = checkedItemsName[index];
+
+									var listItem = Lang.sub(
+										TPL_TAG_MERGE_ITEM,
+										{
+											name: name,
+											title: name,
+											value: checkedItemsIds[index]
+										}
+									);
+
+									selectedTagsList.append(listItem);
+									targetTagsList.append(listItem);
+								}
+							);
+
+							targetTagsList.attr('selectedIndex', 0);
+
+							instance._updateMergeItemsTarget();
+
+							if (selectedTagsNodes.size() > MAX_DISPLAY_ITEMS) {
+								selectedTagsList.attr('size', MAX_DISPLAY_ITEMS);
+							}
+							else {
+								selectedTagsList.removeAttribute('size');
+							}
+
+							tagPanelMerge.show();
+						}
+						else {
+							var errorMessage = Lang.sub(Liferay.Language.get('please-choose-at-least-x-tags'), [2]);
+
+							alert(errorMessage);
+						}
+					},
+
+					_mergeTags: function(fromIds, toId, overrideProperties, callback) {
+						Liferay.Service(
+							'/assettag/merge-tags',
+							{
+								fromTagIds: fromIds,
+								overrideProperties: overrideProperties,
+								toTagId: toId
+							},
+							callback
+						);
+					},
+
+					_mergeTag: function(fromId, toId, callback) {
+						Liferay.Service(
+							'/assettag/merge-tags',
+							{
+								fromTagId: fromId,
+								overrideProperties: true,
+								toTagId: toId
+							},
+							callback
+						);
+					},
+
+					_onDeleteTag: function(event) {
+						var instance = this;
+
+						if (confirm(Liferay.Language.get('are-you-sure-you-want-to-delete-this-tag'))) {
+							instance._deleteTag(
+								instance._selectedTagId,
+								A.bind('_processActionResult', instance)
+							);
+						}
+					},
+
+					_onSearchInputKeyDown: function(event) {
+						if (event.isKey('ENTER')) {
+							event.halt();
+						}
+					},
+
+					_onShowTagPanel: function(event, action) {
+						var instance = this;
+
+						instance._hidePanels();
+
+						instance._showTagPanel(action);
+					},
+
+					_onStateChange: function(event) {
+						var instance = this;
+
+						var changed = event.changed;
+						var removed = event.removed;
+
+						var paginationState = {};
+
+						var paginationMap = instance._getTagsPaginationMap();
+
+						AObject.each(
+							paginationMap,
+							function(item, index, collection) {
+								var historyEntry = item.historyEntry;
+
+								var value;
+
+								if (owns(changed, historyEntry)) {
+									value = item.formatter(changed[historyEntry].newVal);
+								}
+								else if (owns(removed, historyEntry)) {
+									value = item.defaultValue;
+								}
+
+								if (value) {
+									paginationState[index] = value;
+								}
+							}
+						);
+
+						if (AObject.size(paginationState)) {
+							instance._tagsPagination.setState(paginationState);
+
+							instance._reloadData();
+						}
+					},
+
+					_onTagChangePermissions: function(event) {
+						var instance = this;
+
+						var url = event.target.attr('data-url') || event.currentTarget.attr('data-url');
+
+						instance._loadPermissions(url);
+					},
+
+					_onTagFormSubmit: function(event, form) {
+						var instance = this;
+
+						event.halt();
+
+						Liferay.fire(
+							'saveAutoFields',
+							{
+								form: form
+							}
+						);
+
+						instance._updateTag(form);
+					},
+
+					_onTagsListClick: function(event) {
+						var instance = this;
+
+						instance._onTagsListSelect(event);
+
+						var target = event.target;
+
+						if (target.hasClass('tag-item-check')) {
+							Liferay.Util.checkAllBox(event.currentTarget, 'tag-item-check', '#' + instance._prefixedPortletId + 'checkAllTagsCheckbox');
+
+							instance._toggleStagedTagItem(target);
+						}
+						else if (target.hasClass('tag-item-actions-trigger')) {
+							instance._onShowTagPanel(event, ACTION_EDIT);
+						}
+					},
+
+					_onTagsListSelect: function(event) {
+						var instance = this;
+
+						var tagId = instance._getTagId(event.target);
+
+						instance._selectTag(tagId);
+					},
+
+					_onTagMergeClick: function(event) {
+						var instance = this;
+
+						var namespace = instance._prefixedPortletId;
+						var selectedList = instance._selectedTagsList;
+
+						var mergeOnlySelected = A.one('#' + namespace + 'mergeOnlySelectedTags').get('checked');
+
+						var tags = selectedList.all(mergeOnlySelected ? ':selected' : 'option');
+
+						if (tags.size() > 0) {
+							var targetTag = instance._targetTagsList.one(':selected');
+
+							var mergeText = Liferay.Language.get('are-you-sure-you-want-to-merge-the-chosen-tags-into-x');
+
+							mergeText = Lang.sub(mergeText, [targetTag.text()]);
+
+							if (confirm(mergeText)) {
+								var tagsIds = tags.val();
+								var targetTagId = targetTag.val();
+
+								var overrideProperties = A.one('#' + namespace + 'overrideProperties').attr('checked');
+
+								instance._mergeTags(
+									tagsIds,
+									targetTagId,
+									overrideProperties,
+									A.bind('_processActionResult', instance)
+								);
+							}
+						}
+						else {
+							alert(Liferay.Language.get('there-are-no-selected-tags'));
+						}
+					},
+
+					_onTagUpdateFailure: function(response) {
+						var instance = this;
+
+						var containerSelector = '#' + instance._prefixedPortletId + instance._currentPanel + TAG_MESSAGES;
+
+						instance._sendMessage(MESSAGE_TYPE_ERROR, Liferay.Language.get('your-request-failed-to-complete'), true, containerSelector);
+					},
+
+					_onTagUpdateSuccess: function(response) {
+						var instance = this;
+
+						instance._hideAllMessages();
+
+						var exception = response.exception;
+
+						if (!response.exception) {
+							instance._sendMessage(MESSAGE_TYPE_SUCCESS, Liferay.Language.get('your-request-processed-successfully'));
+
+							instance._displayTags(
+								function() {
+									instance._unselectAllTags();
+									instance._selectTag(response.tagId);
+								}
+							);
+
+							instance._hidePanels();
+						}
+						else {
+							var errorText;
+
+							var autoHide = true;
+
+							if (exception.indexOf('DuplicateTagException') > -1) {
+								errorText = Liferay.Language.get('that-tag-already-exists');
+							}
+							else if ((exception.indexOf('AssetTagException') > -1)) {
+								errorText = Lang.sub(
+									Liferay.Language.get('tag-names-cannot-be-empty-string-or-contain-characters-such-as-x'),
+									['<br />' + exception.substr(exception.lastIndexOf(':') + 1)]
+								);
+
+								autoHide = false;
+							}
+							else if (exception.indexOf('auth.PrincipalException') > -1) {
+								errorText = Liferay.Language.get('you-do-not-have-permission-to-access-the-requested-resource');
+							}
+							else {
+								errorText = Liferay.Language.get('your-request-failed-to-complete');
+							}
+
+							var containerSelector = '#' + instance._prefixedPortletId + instance._currentPanel + TAG_MESSAGES;
+
+							instance._sendMessage(MESSAGE_TYPE_ERROR, errorText, autoHide, containerSelector);
+						}
+					},
+
+					_onTagViewContainerClick: function(event) {
+						var instance = this;
+
+						var targetId = event.target.get('id');
+
+						if (targetId == 'editTagButton') {
+							instance._onShowTagPanel(event, ACTION_EDIT);
+						}
+						else if (targetId == 'deleteTagButton') {
+							instance._onDeleteTag(event);
+						}
+						else if (targetId == 'updateTagPermissions') {
+							instance._onTagChangePermissions(event);
+						}
+					},
+
+					_onTagViewFailure: function() {
+						var instance = this;
+
+						instance._sendMessage(MESSAGE_TYPE_ERROR, Liferay.Language.get('your-request-failed-to-complete'));
+					},
+
+					_onTagViewSuccess: function(response) {
+						var instance = this;
+
+						instance._tagViewContainer.html(response);
+					},
+
+					_prepareTags: function(tags, callback) {
+						var instance = this;
+
+						var selectedTagId;
+						var selectedTagName;
+
+						if (tags.length > 0) {
+							var buffer = [TPL_TAG_LIST_CONTAINER];
+
+							instance._tags = tags;
+
+							A.each(
+								tags,
+								function(item, index, collection) {
+									if (index === 0) {
+										item.cssClassSelected = 'active';
+									}
+									else {
+										item.cssClassSelected = '';
+									}
+
+									buffer.push(Lang.sub(TPL_TAG_LIST, item));
+								}
+							);
+
+							buffer.push('</ul>');
+
+							instance._tagsList.html(buffer.join(''));
+
+							var firstTag = A.one(instance._tagsItemsSelector);
+							var tagName = instance._getTagName(firstTag);
+							var tagId = instance._getTagId(firstTag);
+
+							selectedTagId = tagId;
+							selectedTagName = tagName;
+						}
+						else {
+							var tagsMessageContainer = instance._tagsMessageContainer;
+
+							tagsMessageContainer.html(Liferay.Language.get('there-are-no-tags'));
+
+							instance._tagsList.setContent(tagsMessageContainer);
+
+							tagsMessageContainer.show();
+
+							selectedTagId = null;
+							selectedTagName = null;
+						}
+
+						instance._selectedTagId = selectedTagId;
+						instance._selectedTagName = selectedTagName;
+
+						instance._getDDHandler().syncTargets();
+
+						if (callback) {
+							callback();
+						}
+					},
+
+					_processActionResult: function(result) {
+						var instance = this;
+
+						var exception = result.exception;
+
+						if (!exception) {
+							instance._sendMessage(MESSAGE_TYPE_SUCCESS, Liferay.Language.get('your-request-processed-successfully'));
+
+							instance._hidePanels();
+
+							instance._stagedTagsList.empty();
+							instance._stagedTagsWrapper.hide();
+
+							instance._loadData();
+						}
+						else {
+							var errorText;
+
+							if (exception.indexOf('auth.PrincipalException') > -1) {
+								errorText = Liferay.Language.get('you-do-not-have-permission-to-access-the-requested-resource');
+							}
+							else {
+								errorText = Liferay.Language.get('your-request-failed-to-complete');
+							}
+
+							instance._sendMessage(MESSAGE_TYPE_ERROR, errorText);
+						}
+					},
+
+					_reloadData: function() {
+						var instance = this;
+
+						instance._checkAllTagsCheckbox.attr('checked', false);
+
+						instance._displayTags();
+					},
+
+					_removeStagedTagItem: function(tagItem) {
+						var instance = this;
+
+						var tagId = instance._getTagId(tagItem);
+
+						var selectedTag = instance._getStagedTag(tagId);
+
+						selectedTag.remove();
+
+						instance._toggleStagedTagsWrapper();
+					},
+
+					_resetTagsProperties: function(event) {
+						var instance = this;
+
+						var boundingBox = event.currentTarget.get('boundingBox');
+
+						var propertiesTrigger = boundingBox.one('#' + instance._prefixedPortletId + 'tagProperties');
+
+						if (propertiesTrigger) {
+							var autoFieldsInstance = propertiesTrigger.getData('autoFieldsInstance');
+
+							autoFieldsInstance.reset();
+						}
+					},
+
+					_selectTag: function(tagId) {
+						var instance = this;
+
+						var tag = instance._getTag(tagId);
+
+						if (tag) {
+							var tagName = instance._getTagName(tag);
+
+							if (tag.hasClass('active')) {
+								return tag;
+							}
+
+							instance._hideAllMessages();
+
+							instance._selectedTagName = tagName;
+							instance._selectedTagId = tagId;
+
+							instance._unselectAllTags();
+
+							tag.addClass('active');
+
+							instance._displayTagData();
+						}
+
+						return tag;
+					},
+
+					_sendMessage: function(type, message, autoHide, container) {
+						var instance = this;
+
+						var output = A.one(container || instance._portletMessageContainer);
+
+						var typeClass = 'alert-' + type;
+
+						output.removeClass(CSS_MESSAGE_ERROR).removeClass(CSS_MESSAGE_SUCCESS);
+
+						output.addClass(typeClass);
+
+						output.html(message);
+
+						output.show();
+
+						if (autoHide !== false) {
+							instance._hideMessageTask(output);
+						}
+					},
+
+					_showTagPanel: function(action) {
+						var instance = this;
+
+						if (action == ACTION_ADD) {
+							instance._showTagPanelAdd();
+						}
+						else if (action == ACTION_EDIT) {
+							instance._showTagPanelEdit();
+						}
+						else {
+							throw 'Internal error. No action specified.';
+						}
+					},
+
+					_showTagPanelAdd: function() {
+						var instance = this;
+
+						var tagPanelAdd = instance._tagPanelAdd;
+
+						if (!tagPanelAdd) {
+							tagPanelAdd = instance._createTagPanelAdd();
+
+							var tagURL = instance._createURL(ACTION_ADD, LIFECYCLE_RENDER);
+
+							tagPanelAdd.show();
+
+							tagPanelAdd._syncUIPosAlign();
+
+							var afterSuccess = A.bind(
+								'_initializeTagPanelAdd',
+								instance,
+								function() {
+									instance._focusTagPanelAdd();
+								}
+							);
+
+							tagPanelAdd.plug(
+								A.Plugin.IO,
+								{
+									after: {
+										success: afterSuccess
+									},
+									uri: tagURL.toString()
+								}
+							);
+						}
+						else {
+							tagPanelAdd.show();
+
+							tagPanelAdd._syncUIPosAlign();
+
+							instance._focusTagPanelAdd();
+						}
+
+						instance._currentPanel = ADD_PANEL;
+					},
+
+					_showTagPanelEdit: function() {
+						var instance = this;
+
+						var forceStart = false;
+						var tagPanelEdit = instance._tagPanelEdit;
+
+						if (!tagPanelEdit) {
+							tagPanelEdit = instance._createTagPanelEdit();
+						}
+						else {
+							forceStart = true;
+
+							instance._currentPanelEditIOHandle.detach();
+						}
+
+						var tagEditURL = instance._createURL(ACTION_EDIT, LIFECYCLE_RENDER);
+
+						tagPanelEdit.show();
+
+						tagPanelEdit._syncUIPosAlign();
+
+						tagPanelEdit.plug(
+							A.Plugin.IO,
+							{
+								uri: tagEditURL.toString()
+							}
+						);
+
+						instance._currentPanelEditIOHandle = tagPanelEdit.io.after('success', instance._initializeTagPanelEdit, instance);
+
+						if (forceStart) {
+							tagPanelEdit.io.start();
+						}
+
+						instance._currentPanel = EDIT_PANEL;
+					},
+
+					_stageTagItem: function(tagItem) {
+						var instance = this;
+
+						var tagId = instance._getTagId(tagItem);
+
+						var tagName = instance._getTagName(tagItem.ancestor('li'));
+
+						instance._tokenList.add(
+							{
+								clearFields: tagName,
+								fieldValues: tagId,
+								text: tagName
+							}
+						);
+
+						setTimeout(
+							function() {
+								instance._toggleStagedTagsWrapper();
+							},
+							100
+						);
+					},
+
+					_toggleStagedTagItem: function(tagItem) {
+						var instance = this;
+
+						if (tagItem.attr('checked')) {
+							instance._stageTagItem(tagItem);
+						}
+						else {
+							instance._removeStagedTagItem(tagItem);
+						}
+					},
+
+					_toggleStagedTagsWrapper: function() {
+						var instance = this;
+
+						var hasTags = !!instance._getStagedTags().size();
+
+						instance._stagedTagsWrapper.toggle(hasTags);
+						instance._tagsActionsButton.toggle(hasTags);
+					},
+
+					_updateMergeItemsTarget: function() {
+						var instance = this;
+
+						var selectedTagsList = instance._selectedTagsList;
+						var targetTagsList = instance._targetTagsList;
+
+						var selectetTargeTagIndex = targetTagsList.get('selectedIndex');
+
+						var targetTag = targetTagsList.get('options').item(selectetTargeTagIndex);
+
+						var previousTagData = instance._previousTagData;
+
+						if (previousTagData) {
+							var previousTag = previousTagData.tagNode;
+							var previousTagNextSibling = previousTagData.nextSibling;
+							var previousTagPrevSibling = previousTagData.previousSibling;
+
+							if (previousTagNextSibling) {
+								previousTagNextSibling.placeBefore(previousTag);
+							}
+							else if (previousTagPrevSibling) {
+								previousTagPrevSibling.placeAfter(previousTag);
+							}
+							else {
+								selectedTagsList.append(previousTag);
+							}
+
+							previousTagData = null;
+						}
+
+						var selectedTag = selectedTagsList.one('[value=' + targetTag.val() + ']');
+
+						if (selectedTag) {
+							previousTagData = {
+								tagNode: selectedTag,
+								nextSibling: selectedTag.next(),
+								previousSibling: selectedTag.previous()
+							};
+
+							selectedTag.remove();
+
+							instance._previousTagData = previousTagData;
+						}
+					},
+
+					_unselectAllTags: function() {
+						var instance = this;
+
+						A.all(instance._tagsItemsSelector).removeClass('active');
+					},
+
+					_updateTag: function(form) {
+						var instance = this;
+
+						var ioTag = instance._getIOTagUpdate();
+
+						ioTag.set('form', form.getDOM());
+						ioTag.set('uri', form.attr('action'));
+
+						ioTag.start();
+					},
+
+					_tagsItemsSelector: '.tags-admin-list li'
+				}
+			}
+		);
+
+		var TagsSearch = A.Component.create(
+			{
+				AUGMENTS: [A.AutoCompleteBase],
+				EXTENDS: A.Base,
+				NAME: 'tagssearch',
+				prototype: {
+					initializer: function() {
+						this._bindUIACBase();
+						this._syncUIACBase();
+					}
+				}
+			}
+		);
+
+		Liferay.Portlet.AssetTagsAdmin = AssetTagsAdmin;
+	},
+	'',
+	{
+		requires: ['aui-button', 'aui-dialog-iframe-deprecated', 'aui-io-plugin-deprecated', 'aui-loading-mask-deprecated', 'aui-pagination', 'aui-tree-view', 'autocomplete-base', 'dd', 'json', 'liferay-form','liferay-history-manager', 'liferay-portlet-url', 'liferay-token-list', 'liferay-util-window']
+	}
+);
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tag_admin/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tag_admin/view.jsp
new file mode 100644
index 0000000..c45d0f1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tag_admin/view.jsp
@@ -0,0 +1,92 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_tag_admin/init.jsp" %>
+
+<aui:form name="fm">
+	<aui:nav-bar>
+		<aui:nav>
+			<c:if test="<%= AssetPermission.contains(permissionChecker, themeDisplay.getSiteGroupId(), ActionKeys.ADD_TAG) %>">
+				<aui:nav-item id="addTagButton" label="add-tag" />
+			</c:if>
+
+			<c:if test="<%= PropsValues.ASSET_TAG_PERMISSIONS_ENABLED && AssetPermission.contains(permissionChecker, themeDisplay.getSiteGroupId(), ActionKeys.PERMISSIONS) && GroupPermissionUtil.contains(permissionChecker, themeDisplay.getSiteGroupId(), ActionKeys.PERMISSIONS) %>">
+				<liferay-security:permissionsURL
+					modelResource="com.liferay.portlet.asset"
+					modelResourceDescription="<%= themeDisplay.getScopeGroupName() %>"
+					resourcePrimKey="<%= String.valueOf(themeDisplay.getSiteGroupId()) %>"
+					var="permissionsURL"
+					windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+				/>
+
+				<aui:nav-item data-url="<%= permissionsURL %>" id="tagsPermissionsButton" label="permissions" />
+			</c:if>
+
+			<aui:nav-item cssClass="hide" dropdown="<%= true %>" id="tagsActionsButton" label="actions">
+				<aui:nav-item iconCssClass="icon-remove" id="deleteSelectedTags" label="delete" />
+
+				<aui:nav-item iconCssClass="icon-random" id="mergeSelectedTags" label="merge" />
+			</aui:nav-item>
+		</aui:nav>
+
+		<aui:nav-bar-search cssClass="pull-right">
+			<liferay-ui:input-search cssClass="form-search" id="tagsAdminSearchInput" name="tagsAdminSearchInput" showButton="<%= false %>" />
+		</aui:nav-bar-search>
+	</aui:nav-bar>
+
+	<div class="tags-admin-container lfr-app-column-view">
+		<div class="tags-admin-content-wrapper">
+			<aui:row cssClass="tags-admin-content">
+				<aui:col cssClass="tags-admin-list-container" width="<%= 35 %>">
+					<div class="hide selected-tags-wrapper">
+						<h3 class="tags-header"><%= LanguageUtil.get(pageContext, "selected") %></h3>
+
+						<div class="tag-staging-area">
+							<div class="token-container"></div>
+						</div>
+					</div>
+
+					<div class="available-tags-wrapper">
+						<aui:input cssClass="select-tags" inline="<%= true %>" label="" name="checkAllTags" title='<%= LanguageUtil.get(pageContext, "check-all-tags") %>' type="checkbox" />
+
+						<h3 class="tags-header"><%= LanguageUtil.get(pageContext, "available") %></h3>
+					</div>
+
+					<div class="tags-admin-list unstyled"></div>
+
+					<div class="tags-pagination"></div>
+				</aui:col>
+
+				<aui:col cssClass="tags-admin-edit-tag" width="<%= 65 %>">
+					<h3><%= LanguageUtil.get(pageContext, "tag-details") %></h3>
+
+					<div class="tag-view-container"></div>
+				</aui:col>
+			</aui:row>
+		</div>
+	</div>
+</aui:form>
+
+<aui:script use="liferay-tags-admin">
+	new Liferay.Portlet.AssetTagsAdmin(
+		{
+			baseActionURL: '<%= PortletURLFactoryUtil.create(request, portletDisplay.getId(), themeDisplay.getPlid(), PortletRequest.ACTION_PHASE) %>',
+			baseRenderURL: '<%= PortletURLFactoryUtil.create(request, portletDisplay.getId(), themeDisplay.getPlid(), PortletRequest.RENDER_PHASE) %>',
+			portletId: '<%= portletDisplay.getId() %>',
+			tagsPerPage: <%= SearchContainer.DEFAULT_DELTA %>
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tag_admin/view_tag.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tag_admin/view_tag.jsp
new file mode 100644
index 0000000..2ddd296
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tag_admin/view_tag.jsp
@@ -0,0 +1,84 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_tag_admin/init.jsp" %>
+
+<%
+long tagId = ParamUtil.getLong(request, "tagId");
+
+AssetTag tag = AssetTagServiceUtil.getTag(tagId);
+
+List<AssetTagProperty> tagProperties = AssetTagPropertyServiceUtil.getTagProperties(tag.getTagId());
+%>
+
+<div class="view-tag">
+	<liferay-ui:header
+		localizeTitle="<%= false %>"
+		title="<%= tag.getName() %>"
+	/>
+
+	<c:if test="<%= tag != null %>">
+		<c:if test="<%= AssetTagPermission.contains(permissionChecker, tag, ActionKeys.UPDATE) %>">
+			<aui:button id="editTagButton" value="edit" />
+		</c:if>
+
+		<c:if test="<%= AssetTagPermission.contains(permissionChecker, tag, ActionKeys.DELETE) %>">
+			<aui:button id="deleteTagButton" value="delete" />
+		</c:if>
+
+		<c:if test="<%= PropsValues.ASSET_TAG_PERMISSIONS_ENABLED && AssetTagPermission.contains(permissionChecker, tag, ActionKeys.PERMISSIONS) %>">
+			<liferay-security:permissionsURL
+				modelResource="<%= AssetTag.class.getName() %>"
+				modelResourceDescription="<%= tag.getName() %>"
+				resourcePrimKey="<%= String.valueOf(tag.getTagId()) %>"
+				var="permissionsURL"
+				windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+			/>
+
+			<aui:button data-url="<%= permissionsURL %>" id="updateTagPermissions" value="permissions" />
+		</c:if>
+	</c:if>
+
+	<div class="tag-field">
+		<c:choose>
+			<c:when test="<%= tag.getAssetCount() > 0 %>">
+				<label><liferay-ui:message key="count" />:</label> <liferay-ui:message key="used-in-x-assets" arguments="<%= tag.getAssetCount() %>" />
+			</c:when>
+			<c:otherwise>
+				<div class="alert alert-info">
+					<liferay-ui:message key="this-tag-is-not-used" />
+				</div>
+			</c:otherwise>
+		</c:choose>
+	</div>
+
+	<c:if test="<%= !tagProperties.isEmpty() %>">
+		<div class="tag-field">
+			<label><liferay-ui:message key="properties" />:</label>
+
+			<%
+			for (AssetTagProperty tagProperty : tagProperties) {
+			%>
+
+				<span class="property-key"><%= tagProperty.getKey() %></span>: <span class="property-value"><%= tagProperty.getValue() %></span><br />
+
+			<%
+			}
+			%>
+
+		</div>
+	</c:if>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tags_navigation/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tags_navigation/configuration.jsp
new file mode 100644
index 0000000..c8e18a2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tags_navigation/configuration.jsp
@@ -0,0 +1,114 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_tags_navigation/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+%>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+
+	<aui:fieldset>
+		<ul class="lfr-tree unstyled">
+			<li class="tree-item">
+				<aui:input label="show-unused-tags" name="preferences--showZeroAssetCount--" type="checkbox" value="<%= showZeroAssetCount %>" />
+			</li>
+
+			<li class="tree-item">
+				<aui:input name="preferences--showAssetCount--" type="checkbox" value="<%= showAssetCount %>" />
+
+				<ul class="lfr-tree hide unstyled" id="<portlet:namespace />assetCountOptions">
+					<li class="tree-item">
+						<aui:select helpMessage="asset-type-asset-count-help" label="asset-type" name="preferences--classNameId--">
+							<aui:option label="any" value="<%= classNameId == 0 %>" />
+
+							<%
+							List<AssetRendererFactory> assetRendererFactories = AssetRendererFactoryRegistryUtil.getAssetRendererFactories(company.getCompanyId());
+
+							for (AssetRendererFactory assetRendererFactory : assetRendererFactories) {
+							%>
+
+								<aui:option label="<%= ResourceActionsUtil.getModelResource(locale, assetRendererFactory.getClassName()) %>" selected="<%= classNameId == assetRendererFactory.getClassNameId() %>" value="<%= assetRendererFactory.getClassNameId() %>" />
+
+							<%
+							}
+							%>
+
+						</aui:select>
+					</li>
+				</ul>
+			</li>
+
+			<li class="tree-item">
+				<ul class="lfr-tree unstyled" id="<portlet:namespace />displayTemplateSettings">
+					<div class="display-template">
+
+						<%
+						TemplateHandler templateHandler = TemplateHandlerRegistryUtil.getTemplateHandler(AssetTag.class.getName());
+
+						List<String> displayStyles = new ArrayList<String>();
+
+						displayStyles.add("number");
+						displayStyles.add("cloud");
+						%>
+
+						<liferay-ui:ddm-template-selector
+							classNameId="<%= PortalUtil.getClassNameId(templateHandler.getClassName()) %>"
+							displayStyle="<%= displayStyle %>"
+							displayStyleGroupId="<%= displayStyleGroupId %>"
+							displayStyles="<%= displayStyles %>"
+							refreshURL="<%= currentURL %>"
+						/>
+					</div>
+				</ul>
+			</li>
+
+			<li class="tree-item">
+				<aui:input label="max-num-of-tags" name="preferences--maxAssetTags--" type="text" value="<%= maxAssetTags %>" />
+			</li>
+		</ul>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script use="aui-base">
+	var showAssetCount = A.one('#<portlet:namespace />showAssetCountCheckbox');
+
+	function showHiddenFields() {
+		var assetCountOptions = A.one('#<portlet:namespace />assetCountOptions');
+
+		if (showAssetCount && assetCountOptions) {
+			if (showAssetCount.get('checked')) {
+				assetCountOptions.show();
+			}
+			else {
+				assetCountOptions.hide();
+			}
+		}
+	}
+
+	showHiddenFields();
+
+	showAssetCount.on('change', showHiddenFields);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tags_navigation/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tags_navigation/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tags_navigation/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tags_navigation/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tags_navigation/init.jsp
new file mode 100644
index 0000000..03d49ac
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tags_navigation/init.jsp
@@ -0,0 +1,30 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.asset.util.comparator.AssetTagCountComparator" %>
+
+<%
+long classNameId = PrefsParamUtil.getLong(portletPreferences, request, "classNameId");
+String displayStyle = PrefsParamUtil.getString(portletPreferences, request, "displayStyle", "cloud");
+long displayStyleGroupId = PrefsParamUtil.getLong(portletPreferences, request, "displayStyleGroupId", themeDisplay.getScopeGroupId());
+int maxAssetTags = PrefsParamUtil.getInteger(portletPreferences, request, "maxAssetTags", 10);
+boolean showAssetCount = PrefsParamUtil.getBoolean(portletPreferences, request, "showAssetCount");
+boolean showZeroAssetCount = PrefsParamUtil.getBoolean(portletPreferences, request, "showZeroAssetCount");
+%>
+
+<%@ include file="/html/portlet/asset_tags_navigation/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tags_navigation/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tags_navigation/view.jsp
new file mode 100644
index 0000000..01deb4f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/asset_tags_navigation/view.jsp
@@ -0,0 +1,55 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/asset_tags_navigation/init.jsp" %>
+
+<%
+long portletDisplayDDMTemplateId = PortletDisplayTemplateUtil.getPortletDisplayTemplateDDMTemplateId(displayStyleGroupId, displayStyle);
+%>
+
+<c:choose>
+	<c:when test="<%= portletDisplayDDMTemplateId > 0 %>">
+
+		<%
+		List<AssetTag> assetTags = null;
+
+		if (showAssetCount && (classNameId > 0)) {
+			assetTags = AssetTagServiceUtil.getTags(scopeGroupId, classNameId, null, 0, maxAssetTags, new AssetTagCountComparator());
+		}
+		else {
+			assetTags = AssetTagServiceUtil.getGroupTags(themeDisplay.getSiteGroupId(), 0, maxAssetTags, new AssetTagCountComparator());
+		}
+
+		assetTags = ListUtil.sort(assetTags);
+
+		Map<String, Object> contextObjects = new HashMap<String, Object>();
+
+		contextObjects.put("scopeGroupId", new Long(scopeGroupId));
+		%>
+
+		<%= PortletDisplayTemplateUtil.renderDDMTemplate(pageContext, portletDisplayDDMTemplateId, assetTags, contextObjects) %>
+	</c:when>
+	<c:otherwise>
+		<liferay-ui:asset-tags-navigation
+			classNameId="<%= classNameId %>"
+			displayStyle="<%= displayStyle %>"
+			hidePortletWhenEmpty="<%= true %>"
+			maxAssetTags="<%= maxAssetTags %>"
+			showAssetCount="<%= showAssetCount %>"
+			showZeroAssetCount="<%= showZeroAssetCount %>"
+		/>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/background_task/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/background_task/error.jsp
new file mode 100644
index 0000000..7e53a83
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/background_task/error.jsp
@@ -0,0 +1,25 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/background_task/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= NoSuchBackgroundTaskException.class %>" message="the-entry-could-not-be-found" />
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/background_task/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/background_task/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/background_task/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/background_task/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/background_task/init.jsp
new file mode 100644
index 0000000..9c5f5e4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/background_task/init.jsp
@@ -0,0 +1,21 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.NoSuchBackgroundTaskException" %>
+
+<%@ include file="/html/portlet/background_task/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/asset/abstract.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/asset/abstract.jsp
new file mode 100644
index 0000000..ddc081c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/asset/abstract.jsp
@@ -0,0 +1,41 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/blogs/init.jsp" %>
+
+<%
+int abstractLength = (Integer)request.getAttribute(WebKeys.ASSET_PUBLISHER_ABSTRACT_LENGTH);
+
+BlogsEntry entry = (BlogsEntry)request.getAttribute(WebKeys.BLOGS_ENTRY);
+%>
+
+<c:if test="<%= entry.isSmallImage() %>">
+	<div class="asset-small-image">
+		<img alt="" class="asset-small-image" src="<%= HtmlUtil.escape(entry.getEntryImageURL(themeDisplay)) %>" width="150" />
+	</div>
+</c:if>
+
+<%
+String summary = HtmlUtil.escape(entry.getDescription());
+
+summary = HtmlUtil.replaceNewLine(summary);
+
+if (Validator.isNull(summary)) {
+	summary = HtmlUtil.stripHtml(entry.getContent());
+}
+%>
+
+<%= StringUtil.shorten(summary, abstractLength) %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/asset/full_content.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/asset/full_content.jsp
new file mode 100644
index 0000000..3ee788c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/asset/full_content.jsp
@@ -0,0 +1,32 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/blogs/init.jsp" %>
+
+<%
+BlogsEntry entry = (BlogsEntry)request.getAttribute(WebKeys.BLOGS_ENTRY);
+%>
+
+<%= entry.getContent() %>
+
+<liferay-ui:custom-attributes-available className="<%= BlogsEntry.class.getName() %>">
+	<liferay-ui:custom-attribute-list
+		className="<%= BlogsEntry.class.getName() %>"
+		classPK="<%= (entry != null) ? entry.getEntryId() : 0 %>"
+		editable="<%= false %>"
+		label="<%= true %>"
+	/>
+</liferay-ui:custom-attributes-available>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/configuration.jsp
new file mode 100644
index 0000000..2bc6ad6
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/configuration.jsp
@@ -0,0 +1,330 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/blogs/init.jsp" %>
+
+<%
+String tabs2 = ParamUtil.getString(request, "tabs2", "display-settings");
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+String emailFromName = ParamUtil.getString(request, "preferences--emailFromName--", BlogsUtil.getEmailFromName(portletPreferences, company.getCompanyId()));
+String emailFromAddress = ParamUtil.getString(request, "preferences--emailFromAddress--", BlogsUtil.getEmailFromAddress(portletPreferences, company.getCompanyId()));
+
+boolean emailEntryAddedEnabled = ParamUtil.getBoolean(request, "preferences--emailEntryAddedEnabled--", BlogsUtil.getEmailEntryAddedEnabled(portletPreferences));
+boolean emailEntryUpdatedEnabled = ParamUtil.getBoolean(request, "preferences--emailEntryUpdatedEnabled--", BlogsUtil.getEmailEntryUpdatedEnabled(portletPreferences));
+
+String emailParam = StringPool.BLANK;
+String defaultEmailSubject = StringPool.BLANK;
+String defaultEmailBody = StringPool.BLANK;
+
+if (tabs2.equals("entry-added-email")) {
+	emailParam = "emailEntryAdded";
+	defaultEmailSubject = ContentUtil.get(PropsValues.BLOGS_EMAIL_ENTRY_ADDED_SUBJECT);
+	defaultEmailBody = ContentUtil.get(PropsValues.BLOGS_EMAIL_ENTRY_ADDED_BODY);
+}
+else if (tabs2.equals("entry-updated-email")) {
+	emailParam = "emailEntryUpdated";
+	defaultEmailSubject = ContentUtil.get(PropsValues.BLOGS_EMAIL_ENTRY_UPDATED_SUBJECT);
+	defaultEmailBody = ContentUtil.get(PropsValues.BLOGS_EMAIL_ENTRY_UPDATED_BODY);
+}
+
+String currentLanguageId = LanguageUtil.getLanguageId(request);
+
+String emailSubjectParam = emailParam + "Subject_" + currentLanguageId;
+String emailBodyParam = emailParam + "Body_" + currentLanguageId;
+
+String emailSubject = PrefsParamUtil.getString(portletPreferences, request, emailSubjectParam, defaultEmailSubject);
+String emailBody = PrefsParamUtil.getString(portletPreferences, request, emailBodyParam, defaultEmailBody);
+
+String[] socialBookmarksTypesArray = StringUtil.split(portletPreferences.getValue("socialBookmarksTypes", PropsUtil.get(PropsKeys.SOCIAL_BOOKMARK_TYPES)));
+%>
+
+<liferay-portlet:renderURL portletConfiguration="true" var="portletURL">
+	<portlet:param name="tabs2" value="<%= tabs2 %>" />
+	<portlet:param name="redirect" value="<%= redirect %>" />
+</liferay-portlet:renderURL>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveConfiguration();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+
+	<%
+	String tabs2Names = "display-settings,email-from,entry-added-email,entry-updated-email";
+
+	if (PortalUtil.isRSSFeedsEnabled()) {
+		tabs2Names += ",rss";
+	}
+	%>
+
+	<liferay-ui:tabs
+		names="<%= tabs2Names %>"
+		param="tabs2"
+		url="<%= portletURL %>"
+	/>
+
+	<liferay-ui:error key="emailFromAddress" message="please-enter-a-valid-email-address" />
+	<liferay-ui:error key="emailFromName" message="please-enter-a-valid-name" />
+	<liferay-ui:error key="emailEntryAddedBody" message="please-enter-a-valid-body" />
+	<liferay-ui:error key="emailEntryAddedSignature" message="please-enter-a-valid-signature" />
+	<liferay-ui:error key="emailEntryAddedSubject" message="please-enter-a-valid-subject" />
+	<liferay-ui:error key="emailEntryUpdatedBody" message="please-enter-a-valid-body" />
+	<liferay-ui:error key="emailEntryUpdatedSignature" message="please-enter-a-valid-signature" />
+	<liferay-ui:error key="emailEntryUpdatedSubject" message="please-enter-a-valid-subject" />
+
+	<c:choose>
+		<c:when test='<%= tabs2.equals("email-from") %>'>
+			<aui:fieldset>
+				<aui:input cssClass="lfr-input-text-container" label="name" name="preferences--emailFromName--" value="<%= emailFromName %>" />
+
+				<aui:input cssClass="lfr-input-text-container" label="address" name="preferences--emailFromAddress--" value="<%= emailFromAddress %>" />
+			</aui:fieldset>
+
+			<div class="definition-of-terms">
+				<h4><liferay-ui:message key="definition-of-terms" /></h4>
+
+				<dl>
+					<dt>
+						[$BLOGS_ENTRY_STATUS_BY_USER_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-user-who-updated-the-blog-entry" />
+					</dd>
+					<dt>
+						[$BLOGS_ENTRY_USER_ADDRESS$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-email-address-of-the-user-who-added-the-blog-entry" />
+					</dd>
+					<dt>
+						[$BLOGS_ENTRY_USER_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-user-who-added-the-blog-entry" />
+					</dd>
+					<dt>
+						[$COMPANY_ID$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-company-id-associated-with-the-blog" />
+					</dd>
+					<dt>
+						[$COMPANY_MX$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-company-mx-associated-with-the-blog" />
+					</dd>
+					<dt>
+						[$COMPANY_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-company-name-associated-with-the-blog" />
+					</dd>
+					<dt>
+						[$PORTLET_NAME$]
+					</dt>
+					<dd>
+						<%= PortalUtil.getPortletTitle(renderResponse) %>
+					</dd>
+					<dt>
+						[$SITE_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-site-name-associated-with-the-blog" />
+					</dd>
+				</dl>
+			</div>
+		</c:when>
+		<c:when test='<%= tabs2.startsWith("entry-") %>'>
+			<aui:fieldset>
+				<c:choose>
+					<c:when test='<%= tabs2.equals("entry-added-email") %>'>
+						<aui:input label="enabled" name="preferences--emailEntryAddedEnabled--" type="checkbox" value="<%= emailEntryAddedEnabled %>" />
+					</c:when>
+					<c:when test='<%= tabs2.equals("entry-updated-email") %>'>
+						<aui:input label="enabled" name="preferences--emailEntryUpdatedEnabled--" type="checkbox" value="<%= emailEntryUpdatedEnabled %>" />
+					</c:when>
+				</c:choose>
+
+				<aui:select label="language" name="languageId" onChange='<%= renderResponse.getNamespace() + "updateLanguage(this);" %>'>
+
+					<%
+					Locale[] locales = LanguageUtil.getAvailableLocales(themeDisplay.getSiteGroupId());
+
+					for (int i = 0; i < locales.length; i++) {
+						String style = StringPool.BLANK;
+
+						if (Validator.isNotNull(portletPreferences.getValue(emailParam + "Subject_" + LocaleUtil.toLanguageId(locales[i]), StringPool.BLANK)) ||
+							Validator.isNotNull(portletPreferences.getValue(emailParam + "Body_" + LocaleUtil.toLanguageId(locales[i]), StringPool.BLANK))) {
+
+							style = "font-weight: bold;";
+						}
+					%>
+
+						<aui:option label="<%= locales[i].getDisplayName(locale) %>" selected="<%= currentLanguageId.equals(LocaleUtil.toLanguageId(locales[i])) %>" style="<%= style %>" value="<%= LocaleUtil.toLanguageId(locales[i]) %>" />
+
+					<%
+					}
+					%>
+
+				</aui:select>
+
+				<aui:input cssClass="lfr-input-text-container" label="subject" name='<%= "preferences--" + emailSubjectParam + "--" %>' value="<%= emailSubject %>" />
+
+				<aui:field-wrapper label="body">
+					<liferay-ui:input-editor editorImpl="<%= EDITOR_WYSIWYG_IMPL_KEY %>" />
+
+					<aui:input name='<%= "preferences--" + emailBodyParam + "--" %>' type="hidden" />
+				</aui:field-wrapper>
+			</aui:fieldset>
+
+			<div class="definition-of-terms">
+				<h4><liferay-ui:message key="definition-of-terms" /></h4>
+
+				<dl>
+					<dt>
+						[$BLOGS_ENTRY_USER_ADDRESS$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-email-address-of-the-user-who-added-the-blog-entry" />
+					</dd>
+					<dt>
+						[$BLOGS_ENTRY_USER_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-user-who-added-the-blog-entry" />
+					</dd>
+					<dt>
+						[$BLOGS_ENTRY_URL$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-blog-entry-url" />
+					</dd>
+					<dt>
+						[$COMPANY_ID$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-company-id-associated-with-the-blog" />
+					</dd>
+					<dt>
+						[$COMPANY_MX$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-company-mx-associated-with-the-blog" />
+					</dd>
+					<dt>
+						[$COMPANY_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-company-name-associated-with-the-blog" />
+					</dd>
+					<dt>
+						[$FROM_ADDRESS$]
+					</dt>
+					<dd>
+						<%= HtmlUtil.escape(emailFromAddress) %>
+					</dd>
+					<dt>
+						[$FROM_NAME$]
+					</dt>
+					<dd>
+						<%= HtmlUtil.escape(emailFromName) %>
+					</dd>
+					<dt>
+						[$PORTAL_URL$]
+					</dt>
+					<dd>
+						<%= company.getVirtualHostname() %>
+					</dd>
+					<dt>
+						[$PORTLET_NAME$]
+					</dt>
+					<dd>
+						<%= PortalUtil.getPortletTitle(renderResponse) %>
+					</dd>
+					<dt>
+						[$SITE_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-site-name-associated-with-the-blog" />
+					</dd>
+					<dt>
+						[$TO_ADDRESS$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-address-of-the-email-recipient" />
+					</dd>
+					<dt>
+						[$TO_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-name-of-the-email-recipient" />
+					</dd>
+				</dl>
+			</div>
+
+		</c:when>
+		<c:when test='<%= tabs2.equals("display-settings") %>'>
+			<%@ include file="/html/portlet/blogs/display_settings.jspf" %>
+		</c:when>
+		<c:when test='<%= tabs2.equals("rss") %>'>
+			<liferay-ui:rss-settings
+				delta="<%= rssDelta %>"
+				displayStyle="<%= rssDisplayStyle %>"
+				enabled="<%= enableRSS %>"
+				feedType="<%= rssFeedType %>"
+			/>
+		</c:when>
+	</c:choose>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />initEditor() {
+		return "<%= UnicodeFormatter.toString(emailBody) %>";
+	}
+
+	function <portlet:namespace />updateLanguage() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = '';
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />saveConfiguration',
+		function() {
+			<c:if test='<%= tabs2.startsWith("entry-") %>'>
+				document.<portlet:namespace />fm.<portlet:namespace /><%= emailBodyParam %>.value = window.<portlet:namespace />editor.getHTML();
+			</c:if>
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['liferay-util-list-fields']
+	);
+
+	Liferay.Util.toggleBoxes('<portlet:namespace />enableSocialBookmarksCheckbox','<portlet:namespace />socialBookmarksOptions');
+</aui:script>
+
+<%!
+public static final String EDITOR_WYSIWYG_IMPL_KEY = "editor.wysiwyg.portal-web.docroot.html.portlet.blogs.configuration.jsp";
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/css/.sass-cache/main.css
new file mode 100644
index 0000000..0c45ebd
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/css/.sass-cache/main.css
@@ -0,0 +1,103 @@
+.portlet-blogs .lfr-blogs-small-image-content {
+  background-color: #F5F5F5;
+  padding: 5px; }
+  .portlet-blogs .lfr-blogs-small-image-content th {
+    padding: 5px;
+    white-space: nowrap;
+    width: 1%; }
+.portlet-blogs .lfr-blogs-small-image-content img {
+  margin-right: 1em; }
+.portlet-blogs .taglib-custom-attributes-list {
+  margin-bottom: 1em; }
+.portlet-blogs .taglib-custom-attributes-list label {
+  display: block; }
+.portlet-blogs .edit-actions {
+  margin: 1.5em 0; }
+.portlet-blogs .entry {
+  clear: both; }
+.portlet-blogs .entry-author {
+  background: url(@theme_image_path@/portlet/edit_guest.png) no-repeat 0 50%;
+  border-right: 1px solid #999;
+  color: #999;
+  float: left;
+  font-weight: bold;
+  margin-right: 10px;
+  padding-left: 25px;
+  padding-right: 10px; }
+.portlet-blogs .entry-body {
+  margin-bottom: 10px; }
+.portlet-blogs .entry-date {
+  background: url(@theme_image_path@/common/date.png) no-repeat 0 50%;
+  color: #999;
+  padding-left: 25px; }
+.portlet-blogs .taglib-asset-categories-summary, .portlet-blogs .taglib-asset-tags-summary {
+  border-left: 1px solid #999;
+  padding-left: 10px; }
+.portlet-blogs .entry-title {
+  display: block;
+  font-weight: bold;
+  margin-bottom: 0.5em; }
+.portlet-blogs .entry.draft, .portlet-blogs .entry.pending, .portlet-blogs .entry.scheduled {
+  background: #eee;
+  border: 1px solid #ccc;
+  color: #555;
+  padding: 5px; }
+  .portlet-blogs .entry.draft h3, .portlet-blogs .entry.pending h3, .portlet-blogs .entry.scheduled h3 {
+    background: url(@theme_image_path@/common/page.png) no-repeat 0 50%;
+    margin-top: 0;
+    padding-left: 20px; }
+.portlet-blogs .entry-navigation {
+  background: #eee;
+  border-top: 1px solid #ccc;
+  margin: 15px 0 0;
+  overflow: hidden;
+  padding: 5px; }
+  .portlet-blogs .entry-navigation a, .portlet-blogs .entry-navigation span {
+    background: url() no-repeat; }
+  .portlet-blogs .entry-navigation .previous {
+    background-image: url(@theme_image_path@/arrows/paging_previous.png);
+    float: left;
+    padding-left: 15px; }
+  .portlet-blogs .entry-navigation span.previous {
+    background-position: 0 100%; }
+  .portlet-blogs .entry-navigation .next {
+    background-image: url(@theme_image_path@/arrows/paging_next.png);
+    background-position: 100% 0;
+    float: right;
+    padding-right: 15px; }
+  .portlet-blogs .entry-navigation span.next {
+    background-position: 100% 100%; }
+.portlet-blogs .preview {
+  background: #ffc;
+  border: 1px dotted gray;
+  padding: 3px; }
+.portlet-blogs .search-form {
+  float: right; }
+.portlet-blogs .search-root-entry {
+  color: #999;
+  float: right; }
+.portlet-blogs .stats {
+  color: #999;
+  float: left;
+  padding-right: 10px; }
+.portlet-blogs .subscribe {
+  margin-bottom: 1.5em; }
+.portlet-blogs .taglib-flags {
+  border-left: 1px solid #999;
+  color: #999;
+  padding-left: 10px;
+  padding-right: 10px; }
+.portlet-blogs .taglib-ratings.stars {
+  margin-top: 0.5em; }
+.portlet-blogs .form-search:after {
+  clear: both;
+  content: ".";
+  display: block;
+  height: 0;
+  visibility: hidden; }
+.portlet-blogs #blogsCommentsPanelContainer {
+  border-width: 0; }
+
+.social-boomarks-options {
+  margin-left: 2em; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/css/main.css
new file mode 100644
index 0000000..c7d9eee
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/css/main.css
@@ -0,0 +1,162 @@
+.portlet-blogs {
+	.lfr-blogs-small-image-content {
+		background-color: #F5F5F5;
+		padding: 5px;
+
+			th {
+				padding: 5px;
+				white-space: nowrap;
+				width: 1%;
+			}
+		}
+
+	.lfr-blogs-small-image-content img {
+		margin-right: 1em;
+	}
+
+	.taglib-custom-attributes-list {
+		margin-bottom: 1em;
+	}
+
+	.taglib-custom-attributes-list label {
+		display: block;
+	}
+
+	.edit-actions {
+		margin: 1.5em 0;
+	}
+
+	.entry {
+		clear: both;
+	}
+
+	.entry-author {
+		background: url(@theme_image_path@/portlet/edit_guest.png) no-repeat 0 50%;
+		border-right: 1px solid #999;
+		color: #999;
+		float: left;
+		font-weight: bold;
+		margin-right: 10px;
+		padding-left: 25px;
+		padding-right: 10px;
+	}
+
+	.entry-body {
+		margin-bottom: 10px;
+	}
+
+	.entry-date {
+		background: url(@theme_image_path@/common/date.png) no-repeat 0 50%;
+		color: #999;
+		padding-left: 25px;
+	}
+
+	.taglib-asset-categories-summary, .taglib-asset-tags-summary {
+		border-left: 1px solid #999;
+		padding-left: 10px;
+	}
+
+	.entry-title {
+		display: block;
+		font-weight: bold;
+		margin-bottom: 0.5em;
+	}
+
+	.entry.draft, .entry.pending, .entry.scheduled {
+		background: #eee;
+		border: 1px solid #ccc;
+		color: #555;
+		padding: 5px;
+
+		h3 {
+			background: url(@theme_image_path@/common/page.png) no-repeat 0 50%;
+			margin-top: 0;
+			padding-left: 20px;
+		}
+	}
+
+	.entry-navigation {
+		background: #eee;
+		border-top: 1px solid #ccc;
+		margin: 15px 0 0;
+		overflow: hidden;
+		padding: 5px;
+
+		a, span {
+			background: url() no-repeat;
+		}
+
+		.previous {
+			background-image: url(@theme_image_path@/arrows/paging_previous.png);
+			float: left;
+			padding-left: 15px;
+		}
+
+		span.previous {
+			background-position: 0 100%;
+		}
+
+		.next {
+			background-image: url(@theme_image_path@/arrows/paging_next.png);
+			background-position: 100% 0;
+			float: right;
+			padding-right: 15px;
+		}
+
+		span.next {
+			background-position: 100% 100%;
+		}
+	}
+
+	.preview {
+		background: #ffc;
+		border: 1px dotted gray;
+		padding: 3px;
+	}
+
+	.search-form {
+		float: right
+	}
+
+	.search-root-entry {
+		color: #999;
+		float: right;
+	}
+
+	.stats {
+		color: #999;
+		float: left;
+		padding-right: 10px;
+	}
+
+	.subscribe {
+		margin-bottom: 1.5em;
+	}
+
+	.taglib-flags {
+		border-left: 1px solid #999;
+		color: #999;
+		padding-left: 10px;
+		padding-right: 10px;
+	}
+
+	.taglib-ratings.stars {
+		margin-top: 0.5em;
+	}
+
+	.form-search:after {
+		clear: both;
+		content: ".";
+		display: block;
+		height: 0;
+		visibility: hidden;
+	}
+
+	#blogsCommentsPanelContainer {
+		border-width: 0;
+	}
+}
+
+.social-boomarks-options {
+	margin-left: 2em;
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/display_settings.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/display_settings.jspf
new file mode 100644
index 0000000..e2d1e17
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/display_settings.jspf
@@ -0,0 +1,101 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<div class="alert alert-info">
+	<liferay-ui:message key="set-the-display-styles-used-to-display-blogs-when-viewed-via-as-a-regular-page-or-as-an-rss" />
+</div>
+
+<aui:fieldset>
+	<aui:select label="maximum-items-to-display" name="preferences--pageDelta--">
+
+		<%
+		for (int pageDeltaValue : PropsValues.BLOGS_ENTRY_PAGE_DELTA_VALUES) {
+		%>
+
+			<aui:option label="<%= pageDeltaValue %>" selected="<%= pageDelta == pageDeltaValue %>" />
+
+		<%
+		}
+		%>
+
+	</aui:select>
+
+	<div class="display-template">
+
+		<%
+		TemplateHandler templateHandler = TemplateHandlerRegistryUtil.getTemplateHandler(BlogsEntry.class.getName());
+
+		List<String> displayStyles = new ArrayList<String>();
+
+		displayStyles.add(BlogsUtil.DISPLAY_STYLE_ABSTRACT);
+		displayStyles.add(BlogsUtil.DISPLAY_STYLE_FULL_CONTENT);
+		displayStyles.add(BlogsUtil.DISPLAY_STYLE_TITLE);
+		%>
+
+		<liferay-ui:ddm-template-selector
+			classNameId="<%= PortalUtil.getClassNameId(templateHandler.getClassName()) %>"
+			displayStyle="<%= displayStyle %>"
+			displayStyleGroupId="<%= displayStyleGroupId %>"
+			displayStyles="<%= displayStyles %>"
+			refreshURL="<%= portletURL.toString() %>"
+		/>
+	</div>
+
+	<aui:input name="preferences--enableFlags--" type="checkbox" value="<%= enableFlags %>" />
+
+	<aui:input name="preferences--enableRelatedAssets--" type="checkbox" value="<%= enableRelatedAssets %>" />
+
+	<aui:input name="preferences--enableRatings--" type="checkbox" value="<%= enableRatings %>" />
+
+	<c:if test="<%= PropsValues.BLOGS_ENTRY_COMMENTS_ENABLED %>">
+		<aui:input name="preferences--enableComments--" type="checkbox" value="<%= enableComments %>" />
+
+		<aui:input name="preferences--enableCommentRatings--" type="checkbox" value="<%= enableCommentRatings %>" />
+	</c:if>
+
+	<aui:fieldset>
+		<aui:input name="preferences--enableSocialBookmarks--" type="checkbox" value="<%= enableSocialBookmarks %>" />
+
+		<div class="social-boomarks-options" id="<portlet:namespace />socialBookmarksOptions">
+			<aui:select label="display-style" name="preferences--socialBookmarksDisplayStyle--">
+				<aui:option label="simple" selected='<%= socialBookmarksDisplayStyle.equals("simple") %>' />
+				<aui:option label="vertical" selected='<%= socialBookmarksDisplayStyle.equals("vertical") %>' />
+				<aui:option label="horizontal" selected='<%= socialBookmarksDisplayStyle.equals("horizontal") %>' />
+			</aui:select>
+
+			<aui:select label="display-position" name="preferences--socialBookmarksDisplayPosition--">
+				<aui:option label="top" selected='<%= socialBookmarksDisplayPosition.equals("top") %>' />
+				<aui:option label="bottom" selected='<%= socialBookmarksDisplayPosition.equals("bottom") %>' />
+			</aui:select>
+
+			<aui:field-wrapper label="social-bookmarks">
+
+				<%
+				for (String type : PropsUtil.getArray(PropsKeys.SOCIAL_BOOKMARK_TYPES)) {
+				%>
+
+					<aui:field-wrapper inlineLabel="right" label="<%= type %>">
+						<aui:input checked="<%= ArrayUtil.contains(socialBookmarksTypesArray, type) %>" name="preferences--socialBookmarksTypes--" type="checkbox" value="<%= type %>" />
+					</aui:field-wrapper>
+
+				<%
+				}
+				%>
+
+			</aui:field-wrapper>
+		</div>
+	</aui:fieldset>
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/edit_entry.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/edit_entry.jsp
new file mode 100644
index 0000000..4eb5168
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/edit_entry.jsp
@@ -0,0 +1,540 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/blogs/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+String backURL = ParamUtil.getString(request, "backURL");
+
+String referringPortletResource = ParamUtil.getString(request, "referringPortletResource");
+
+BlogsEntry entry = (BlogsEntry)request.getAttribute(WebKeys.BLOGS_ENTRY);
+
+long entryId = BeanParamUtil.getLong(entry, request, "entryId");
+
+String content = BeanParamUtil.getString(entry, request, "content");
+boolean allowPingbacks = PropsValues.BLOGS_PINGBACK_ENABLED && BeanParamUtil.getBoolean(entry, request, "allowPingbacks", true);
+boolean allowTrackbacks = PropsValues.BLOGS_TRACKBACK_ENABLED && BeanParamUtil.getBoolean(entry, request, "allowTrackbacks", true);
+boolean smallImage = BeanParamUtil.getBoolean(entry, request, "smallImage");
+
+boolean preview = ParamUtil.getBoolean(request, "preview");
+boolean showHeader = ParamUtil.getBoolean(request, "showHeader", true);
+%>
+
+<c:if test="<%= showHeader %>">
+	<liferay-ui:header
+		backURL="<%= backURL %>"
+		localizeTitle="<%= (entry == null) %>"
+		title='<%= (entry == null) ? "new-blog-entry" : entry.getTitle() %>'
+	/>
+</c:if>
+
+<portlet:actionURL var="editEntryURL">
+	<portlet:param name="struts_action" value="/blogs/edit_entry" />
+</portlet:actionURL>
+
+<aui:form action="<%= editEntryURL %>" enctype="multipart/form-data" method="post" name="fm" onSubmit="event.preventDefault();">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="backURL" type="hidden" value="<%= backURL %>" />
+	<aui:input name="referringPortletResource" type="hidden" value="<%= referringPortletResource %>" />
+	<aui:input name="entryId" type="hidden" value="<%= entryId %>" />
+	<aui:input name="preview" type="hidden" value="<%= false %>" />
+	<aui:input name="workflowAction" type="hidden" value="<%= WorkflowConstants.ACTION_PUBLISH %>" />
+
+	<liferay-ui:error exception="<%= EntryContentException.class %>" message="please-enter-valid-content" />
+	<liferay-ui:error exception="<%= EntryTitleException.class %>" message="please-enter-a-valid-title" />
+
+	<liferay-ui:asset-categories-error />
+
+	<liferay-ui:asset-tags-error />
+
+	<aui:model-context bean="<%= entry %>" model="<%= BlogsEntry.class %>" />
+
+	<c:if test="<%= (entry == null) || !entry.isApproved() %>">
+		<div class="save-status" id="<portlet:namespace />saveStatus"></div>
+	</c:if>
+
+	<c:if test="<%= entry != null %>">
+		<aui:workflow-status id="<%= String.valueOf(entry.getEntryId()) %>" status="<%= entry.getStatus() %>" />
+	</c:if>
+
+	<aui:fieldset>
+		<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" name="title" />
+
+		<aui:input name="displayDate" />
+
+		<c:if test="<%= preview %>">
+
+			<%
+			if (entry == null) {
+				entry = new BlogsEntryImpl();
+			}
+
+			entry.setContent(content);
+			%>
+
+			<liferay-ui:message key="preview" />:
+
+			<div class="preview">
+				<%= entry.getContent() %>
+			</div>
+
+			<br />
+		</c:if>
+
+		<aui:field-wrapper label="content">
+			<liferay-ui:input-editor editorImpl="<%= EDITOR_WYSIWYG_IMPL_KEY %>" />
+
+			<aui:input name="content" type="hidden" />
+		</aui:field-wrapper>
+
+		<liferay-ui:custom-attributes-available className="<%= BlogsEntry.class.getName() %>">
+			<liferay-ui:custom-attribute-list
+				className="<%= BlogsEntry.class.getName() %>"
+				classPK="<%= entryId %>"
+				editable="<%= true %>"
+				label="<%= true %>"
+			/>
+		</liferay-ui:custom-attributes-available>
+
+		<c:if test="<%= PropsValues.BLOGS_PINGBACK_ENABLED %>">
+			<aui:input helpMessage="to-allow-pingbacks,-please-also-ensure-the-entry's-guest-view-permission-is-enabled" name="allowPingbacks" value="<%= allowPingbacks %>" />
+		</c:if>
+
+		<c:if test="<%= PropsValues.BLOGS_TRACKBACK_ENABLED %>">
+			<aui:input helpMessage="to-allow-trackbacks,-please-also-ensure-the-entry's-guest-view-permission-is-enabled" name="allowTrackbacks" value="<%= allowTrackbacks %>" />
+
+			<aui:input label="trackbacks-to-send" name="trackbacks" />
+
+			<c:if test="<%= (entry != null) && Validator.isNotNull(entry.getTrackbacks()) %>">
+				<aui:field-wrapper name="trackbacks-already-sent">
+
+					<%
+					for (String trackback : StringUtil.split(entry.getTrackbacks())) {
+					%>
+
+						<liferay-ui:input-resource url="<%= trackback %>" /><br />
+
+					<%
+					}
+					%>
+
+				</aui:field-wrapper>
+			</c:if>
+		</c:if>
+
+		<c:if test="<%= (entry == null) || (entry.getStatus() == WorkflowConstants.STATUS_DRAFT) %>">
+			<aui:field-wrapper label="permissions">
+				<liferay-ui:input-permissions
+					modelName="<%= BlogsEntry.class.getName() %>"
+				/>
+			</aui:field-wrapper>
+		</c:if>
+
+		<br />
+
+		<liferay-ui:panel defaultState="closed" extended="<%= false %>" id="blogsEntryAbstractPanel" persistState="<%= true %>" title="abstract">
+			<liferay-ui:error exception="<%= EntrySmallImageNameException.class %>">
+
+				<%
+				String[] imageExtensions = PrefsPropsUtil.getStringArray(PropsKeys.BLOGS_IMAGE_EXTENSIONS, StringPool.COMMA);
+				%>
+
+				<liferay-ui:message key="image-names-must-end-with-one-of-the-following-extensions" /> <%= StringUtil.merge(imageExtensions, ", ") %>.
+			</liferay-ui:error>
+
+			<liferay-ui:error exception="<%= EntrySmallImageSizeException.class %>">
+
+				<%
+				long imageMaxSize = PrefsPropsUtil.getLong(PropsKeys.BLOGS_IMAGE_SMALL_MAX_SIZE) / 1024;
+				%>
+
+				<liferay-ui:message arguments="<%= imageMaxSize %>" key="please-enter-a-small-image-with-a-valid-file-size-no-larger-than-x" />
+			</liferay-ui:error>
+
+			<aui:fieldset>
+				<aui:input label="description" name="description" />
+
+				<div id="<portlet:namespace />smallImageContainer">
+					<div class="lfr-blogs-small-image-header">
+						<aui:input label="use-small-image" name="smallImage" />
+					</div>
+
+					<div class="lfr-blogs-small-image-content toggler-content-collapsed">
+						<aui:row>
+							<c:if test="<%= smallImage && (entry != null) %>">
+								<aui:col width="<%= 50 %>">
+									<img alt="<liferay-ui:message key="preview" />" class="lfr-blogs-small-image-preview" src="<%= Validator.isNotNull(entry.getSmallImageURL()) ? entry.getSmallImageURL() : themeDisplay.getPathImage() + "/template?img_id=" + entry.getSmallImageId() + "&t=" + WebServerServletTokenUtil.getToken(entry.getSmallImageId()) %>" />
+								</aui:col>
+							</c:if>
+
+							<aui:col width="<%= (smallImage && (entry != null)) ? 50 : 100 %>">
+								<aui:fieldset>
+									<aui:input cssClass="lfr-blogs-small-image-type" inlineField="<%= true %>" label="small-image-url" name="type" type="radio" />
+
+									<aui:input cssClass="lfr-blogs-small-image-value" inlineField="<%= true %>" label="" name="smallImageURL" />
+								</aui:fieldset>
+
+								<aui:fieldset>
+									<aui:input cssClass="lfr-blogs-small-image-type" inlineField="<%= true %>" label="small-image" name="type" type="radio" />
+
+									<aui:input cssClass="lfr-blogs-small-image-value" inlineField="<%= true %>" label="" name="smallFile" type="file" />
+								</aui:fieldset>
+							</aui:col>
+						</aui:row>
+					</div>
+				</div>
+			</aui:fieldset>
+		</liferay-ui:panel>
+
+		<liferay-ui:panel defaultState="closed" extended="<%= false %>" id="blogsEntryCategorizationPanel" persistState="<%= true %>" title="categorization">
+			<aui:fieldset>
+				<aui:input name="categories" type="assetCategories" />
+
+				<aui:input name="tags" type="assetTags" />
+			</aui:fieldset>
+		</liferay-ui:panel>
+
+		<liferay-ui:panel defaultState="closed" extended="<%= false %>" id="blogsEntryAssetLinksPanel" persistState="<%= true %>" title="related-assets">
+			<aui:fieldset>
+				<liferay-ui:input-asset-links
+					className="<%= BlogsEntry.class.getName() %>"
+					classPK="<%= entryId %>"
+				/>
+			</aui:fieldset>
+		</liferay-ui:panel>
+
+		<%
+		boolean pending = false;
+
+		if (entry != null) {
+			pending = entry.isPending();
+		}
+		%>
+
+		<c:if test="<%= pending %>">
+			<div class="alert alert-info">
+				<liferay-ui:message key="there-is-a-publication-workflow-in-process" />
+			</div>
+		</c:if>
+
+		<aui:button-row>
+
+			<%
+			String saveButtonLabel = "save";
+
+			if ((entry == null) || entry.isDraft() || entry.isApproved()) {
+				saveButtonLabel = "save-as-draft";
+			}
+
+			String publishButtonLabel = "publish";
+
+			if (WorkflowDefinitionLinkLocalServiceUtil.hasWorkflowDefinitionLink(themeDisplay.getCompanyId(), scopeGroupId, BlogsEntry.class.getName())) {
+				publishButtonLabel = "submit-for-publication";
+			}
+			%>
+
+			<c:if test="<%= (entry != null) && entry.isApproved() && WorkflowDefinitionLinkLocalServiceUtil.hasWorkflowDefinitionLink(entry.getCompanyId(), entry.getGroupId(), BlogsEntry.class.getName()) %>">
+				<div class="alert alert-info">
+					<%= LanguageUtil.format(pageContext, "this-x-is-approved.-publishing-these-changes-will-cause-it-to-be-unpublished-and-go-through-the-approval-process-again", ResourceActionsUtil.getModelResource(locale, BlogsEntry.class.getName())) %>
+				</div>
+			</c:if>
+
+			<aui:button name="saveButton" onClick='<%= renderResponse.getNamespace() + "saveEntry(true, false);" %>' primary="<%= false %>" type="submit" value="<%= saveButtonLabel %>" />
+
+			<c:if test="<%= (entry == null) || entry.isDraft() || preview %>">
+				<aui:button name="previewButton" onClick='<%= renderResponse.getNamespace() + "previewEntry();" %>' value="preview" />
+			</c:if>
+
+			<aui:button disabled="<%= pending %>" name="publishButton" onClick='<%= renderResponse.getNamespace() + "saveEntry(false, false);" %>' type="submit" value="<%= publishButtonLabel %>" />
+
+			<aui:button href="<%= redirect %>" name="cancelButton" type="cancel" />
+		</aui:button-row>
+	</aui:fieldset>
+</aui:form>
+
+<aui:script>
+	var <portlet:namespace />saveDraftIntervalId = null;
+	var <portlet:namespace />oldTitle = null;
+	var <portlet:namespace />oldContent = null;
+
+	function <portlet:namespace />clearSaveDraftIntervalId() {
+		if (<portlet:namespace />saveDraftIntervalId != null) {
+			clearInterval(<portlet:namespace />saveDraftIntervalId);
+		}
+	}
+
+	function <portlet:namespace />getSuggestionsContent() {
+		return document.<portlet:namespace />fm.<portlet:namespace />title.value + ' ' + window.<portlet:namespace />editor.getHTML();
+	}
+
+	function <portlet:namespace />initEditor() {
+		return "<%= UnicodeFormatter.toString(content) %>";
+	}
+
+	function <portlet:namespace />previewEntry() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (entry == null) ? Constants.ADD : Constants.UPDATE %>";
+		document.<portlet:namespace />fm.<portlet:namespace />preview.value = "true";
+		document.<portlet:namespace />fm.<portlet:namespace />workflowAction.value = "<%= WorkflowConstants.ACTION_SAVE_DRAFT %>";
+
+		if (window.<portlet:namespace />editor) {
+			document.<portlet:namespace />fm.<portlet:namespace />content.value = window.<portlet:namespace />editor.getHTML();
+		}
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />saveEntry',
+		function(draft, ajax) {
+			var A = AUI();
+
+			var title = document.<portlet:namespace />fm.<portlet:namespace />title.value;
+			var content = window.<portlet:namespace />editor.getHTML();
+
+			var publishButton = A.one('#<portlet:namespace />publishButton');
+			var cancelButton = A.one('#<portlet:namespace />cancelButton');
+
+			var saveStatus = A.one('#<portlet:namespace />saveStatus');
+			var saveText = '<%= UnicodeLanguageUtil.format(pageContext, ((entry != null) && entry.isPending()) ? "entry-saved-at-x" : "draft-saved-at-x", "[TIME]", false) %>';
+
+			if (draft && ajax) {
+				if ((title == '') || (content == '')) {
+					return;
+				}
+
+				if ((<portlet:namespace />oldTitle == title) &&
+					(<portlet:namespace />oldContent == content)) {
+
+					return;
+				}
+
+				<portlet:namespace />oldTitle = title;
+				<portlet:namespace />oldContent = content;
+
+				var url = '<portlet:actionURL windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>"><portlet:param name="struts_action" value="/blogs/edit_entry" /><portlet:param name="ajax" value="true" /><portlet:param name="preview" value="false" /></portlet:actionURL>';
+
+				var data = {
+					<portlet:namespace />assetTagNames: document.<portlet:namespace />fm.<portlet:namespace />assetTagNames.value,
+					<portlet:namespace /><%= Constants.CMD %>: '<%= Constants.ADD %>',
+					<portlet:namespace />content: content,
+					<portlet:namespace />displayDateAmPm: document.<portlet:namespace />fm.<portlet:namespace />displayDateAmPm.value,
+					<portlet:namespace />displayDateDay: document.<portlet:namespace />fm.<portlet:namespace />displayDateDay.value,
+					<portlet:namespace />displayDateHour: document.<portlet:namespace />fm.<portlet:namespace />displayDateHour.value,
+					<portlet:namespace />displayDateMinute: document.<portlet:namespace />fm.<portlet:namespace />displayDateMinute.value,
+					<portlet:namespace />displayDateMonth: document.<portlet:namespace />fm.<portlet:namespace />displayDateMonth.value,
+					<portlet:namespace />displayDateYear: document.<portlet:namespace />fm.<portlet:namespace />displayDateYear.value,
+					<portlet:namespace />entryId: document.<portlet:namespace />fm.<portlet:namespace />entryId.value,
+					<portlet:namespace />redirect: document.<portlet:namespace />fm.<portlet:namespace />redirect.value,
+					<portlet:namespace />referringPortletResource: document.<portlet:namespace />fm.<portlet:namespace />referringPortletResource.value,
+					<portlet:namespace />title: title,
+					<portlet:namespace />workflowAction: <%= WorkflowConstants.ACTION_SAVE_DRAFT %>
+				};
+
+				var customAttributes = A.one(document.<portlet:namespace />fm).all('[name^=<portlet:namespace />ExpandoAttribute]');
+
+				customAttributes.each(
+					function(item, index, collection) {
+						data[item.attr('name')] = item.val();
+					}
+				);
+
+				A.io.request(
+					url,
+					{
+						data: data,
+						dataType: 'json',
+						on: {
+							failure: function() {
+								if (saveStatus) {
+									saveStatus.set('className', 'alert alert-error save-status');
+									saveStatus.html('<%= UnicodeLanguageUtil.get(pageContext, "could-not-save-draft-to-the-server") %>');
+								}
+							},
+							start: function() {
+								Liferay.Util.toggleDisabled(publishButton, true);
+
+								if (saveStatus) {
+									saveStatus.set('className', 'alert alert-info save-status pending');
+									saveStatus.html('<%= UnicodeLanguageUtil.get(pageContext, "saving-draft") %>');
+								}
+							},
+							success: function(event, id, obj) {
+								var instance = this;
+
+								var message = instance.get('responseData');
+
+								if (message) {
+									document.<portlet:namespace />fm.<portlet:namespace />entryId.value = message.entryId;
+									document.<portlet:namespace />fm.<portlet:namespace />redirect.value = message.redirect;
+
+									var tabs1BackButton = A.one('#<portlet:namespace />tabs1TabsBack');
+
+									if (tabs1BackButton) {
+										tabs1BackButton.attr('href', message.redirect);
+									}
+
+									if (cancelButton) {
+										cancelButton.detach('click');
+
+										cancelButton.on(
+											'click',
+											function() {
+												location.href = message.redirect;
+											}
+										);
+									}
+
+									var now = saveText.replace(/\[TIME\]/gim, (new Date()).toString());
+
+									if (saveStatus) {
+										saveStatus.set('className', 'alert alert-success save-status');
+										saveStatus.html(now);
+									}
+								}
+								else {
+									saveStatus.hide();
+								}
+
+								Liferay.Util.toggleDisabled(publishButton, false);
+							}
+						}
+					}
+				);
+			}
+			else {
+				<portlet:namespace />clearSaveDraftIntervalId();
+
+				document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (entry == null) ? Constants.ADD : Constants.UPDATE %>";
+				document.<portlet:namespace />fm.<portlet:namespace />content.value = content;
+
+				if (draft) {
+					document.<portlet:namespace />fm.<portlet:namespace />workflowAction.value = <%= WorkflowConstants.ACTION_SAVE_DRAFT %>;
+				}
+				else {
+					document.<portlet:namespace />fm.<portlet:namespace />workflowAction.value = <%= WorkflowConstants.ACTION_PUBLISH %>;
+				}
+
+				submitForm(document.<portlet:namespace />fm);
+			}
+		},
+		['aui-io']
+	);
+</aui:script>
+
+<aui:script use="aui-base">
+	var cancelButton = A.one('#<portlet:namespace />cancelButton');
+
+	if (cancelButton) {
+		cancelButton.on(
+			'click',
+			function() {
+				<portlet:namespace />clearSaveDraftIntervalId();
+
+				location.href = '<%= HtmlUtil.escapeJS(PortalUtil.escapeRedirect(redirect)) %>';
+			}
+		);
+	}
+
+	<c:if test="<%= (entry == null) || ((entry.getUserId() == user.getUserId()) && (entry.getStatus() == WorkflowConstants.STATUS_DRAFT)) %>">
+		<portlet:namespace />saveDraftIntervalId = setInterval('<portlet:namespace />saveEntry(true, true)', 30000);
+		<portlet:namespace />oldTitle = document.<portlet:namespace />fm.<portlet:namespace />title.value;
+		<portlet:namespace />oldContent = <portlet:namespace />initEditor();
+	</c:if>
+</aui:script>
+
+<aui:script use="aui-toggler">
+	var container = A.one('#<portlet:namespace />smallImageContainer');
+
+	var types = container.all('.lfr-blogs-small-image-type');
+	var values = container.all('.lfr-blogs-small-image-value');
+
+	var selectSmallImageType = function(index) {
+		types.set('checked', false);
+
+		types.item(index).set('checked', true);
+
+		values.set('disabled', true);
+
+		values.item(index).set('disabled', false);
+	};
+
+	container.delegate(
+		'change',
+		function(event) {
+			var index = types.indexOf(event.currentTarget);
+
+			selectSmallImageType(index);
+		},
+		'.lfr-blogs-small-image-type'
+	);
+
+	new A.Toggler(
+		{
+			animated: true,
+			content: '#<portlet:namespace />smallImageContainer .lfr-blogs-small-image-content',
+			expanded: <%= smallImage %>,
+			header: '#<portlet:namespace />smallImageContainer .lfr-blogs-small-image-header',
+			on: {
+				animatingChange: function(event) {
+					var instance = this;
+
+					var expanded = !instance.get('expanded');
+
+					A.one('#<portlet:namespace />smallImage').set('value', expanded);
+					A.one('#<portlet:namespace />smallImageCheckbox').set('checked', expanded);
+
+					if (expanded) {
+						types.each(
+							function(item, index, collection) {
+								if (item.get('checked')) {
+									values.item(index).set('disabled', false);
+								}
+							}
+						);
+					}
+					else {
+						values.set('disabled', true);
+					}
+				}
+			}
+		}
+	);
+
+	selectSmallImageType('<%= (entry != null) && Validator.isNotNull(entry.getSmallImageURL()) ? 0 : 1 %>');
+</aui:script>
+
+<%
+if (entry != null) {
+	PortletURL portletURL = renderResponse.createRenderURL();
+
+	portletURL.setParameter("struts_action", "/blogs/view_entry");
+	portletURL.setParameter("entryId", String.valueOf(entry.getEntryId()));
+
+	PortalUtil.addPortletBreadcrumbEntry(request, entry.getTitle(), portletURL.toString());
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit"), currentURL);
+}
+else {
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "add-entry"), currentURL);
+}
+%>
+
+<%!
+public static final String EDITOR_WYSIWYG_IMPL_KEY = "editor.wysiwyg.portal-web.docroot.html.portlet.blogs.edit_entry.jsp";
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/error.jsp
new file mode 100644
index 0000000..d2f0e86
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/error.jsp
@@ -0,0 +1,25 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/blogs/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= NoSuchEntryException.class %>" message="the-entry-could-not-be-found" />
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/init.jsp
new file mode 100644
index 0000000..c68a6a9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/init.jsp
@@ -0,0 +1,59 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.service.SubscriptionLocalServiceUtil" %><%@
+page import="com.liferay.portlet.blogs.EntryContentException" %><%@
+page import="com.liferay.portlet.blogs.EntrySmallImageNameException" %><%@
+page import="com.liferay.portlet.blogs.EntrySmallImageSizeException" %><%@
+page import="com.liferay.portlet.blogs.EntryTitleException" %><%@
+page import="com.liferay.portlet.blogs.NoSuchEntryException" %><%@
+page import="com.liferay.portlet.blogs.model.impl.BlogsEntryImpl" %><%@
+page import="com.liferay.portlet.blogs.service.BlogsEntryLocalServiceUtil" %><%@
+page import="com.liferay.portlet.blogs.service.BlogsEntryServiceUtil" %><%@
+page import="com.liferay.portlet.blogs.service.permission.BlogsEntryPermission" %><%@
+page import="com.liferay.portlet.blogs.service.permission.BlogsPermission" %><%@
+page import="com.liferay.portlet.blogs.util.BlogsUtil" %><%@
+page import="com.liferay.util.RSSUtil" %>
+
+<%
+int pageDelta = GetterUtil.getInteger(portletPreferences.getValue("pageDelta", StringPool.BLANK), SearchContainer.DEFAULT_DELTA);
+String displayStyle = portletPreferences.getValue("displayStyle", BlogsUtil.DISPLAY_STYLE_FULL_CONTENT);
+long displayStyleGroupId = GetterUtil.getLong(portletPreferences.getValue("displayStyleGroupId", null), themeDisplay.getScopeGroupId());
+int pageAbstractLength = PropsValues.BLOGS_PAGE_ABSTRACT_LENGTH;
+boolean enableFlags = GetterUtil.getBoolean(portletPreferences.getValue("enableFlags", null), true);
+boolean enableRelatedAssets = GetterUtil.getBoolean(portletPreferences.getValue("enableRelatedAssets", null), true);
+boolean enableRatings = GetterUtil.getBoolean(portletPreferences.getValue("enableRatings", null), true);
+boolean enableComments = PropsValues.BLOGS_ENTRY_COMMENTS_ENABLED && GetterUtil.getBoolean(portletPreferences.getValue("enableComments", null), true);
+boolean enableCommentRatings = GetterUtil.getBoolean(portletPreferences.getValue("enableCommentRatings", null), true);
+boolean enableSocialBookmarks = GetterUtil.getBoolean(portletPreferences.getValue("enableSocialBookmarks", null), true);
+String socialBookmarksDisplayStyle = portletPreferences.getValue("socialBookmarksDisplayStyle", "horizontal");
+String socialBookmarksDisplayPosition = portletPreferences.getValue("socialBookmarksDisplayPosition", "bottom");
+String socialBookmarksTypes = portletPreferences.getValue("socialBookmarksTypes", PropsUtil.get(PropsKeys.SOCIAL_BOOKMARK_TYPES));
+
+boolean enableRSS = !PortalUtil.isRSSFeedsEnabled() ? false : GetterUtil.getBoolean(portletPreferences.getValue("enableRss", null), true);
+int rssDelta = GetterUtil.getInteger(portletPreferences.getValue("rssDelta", StringPool.BLANK), SearchContainer.DEFAULT_DELTA);
+String rssDisplayStyle = portletPreferences.getValue("rssDisplayStyle", RSSUtil.DISPLAY_STYLE_DEFAULT);
+String rssFeedType = portletPreferences.getValue("rssFeedType", RSSUtil.FEED_TYPE_DEFAULT);
+
+boolean showSearch = true;
+boolean showEditEntryPermissions = true;
+
+Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(locale, timeZone);
+%>
+
+<%@ include file="/html/portlet/blogs/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/search.jsp
new file mode 100644
index 0000000..67d03f6
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/search.jsp
@@ -0,0 +1,125 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/blogs/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+String keywords = ParamUtil.getString(request, "keywords");
+%>
+
+<liferay-portlet:renderURL varImpl="searchURL">
+	<portlet:param name="struts_action" value="/blogs/search" />
+</liferay-portlet:renderURL>
+
+<aui:form action="<%= searchURL %>" method="get" name="fm">
+	<liferay-portlet:renderURLParams varImpl="searchURL" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title="search"
+	/>
+
+	<div class="form-search">
+		<liferay-ui:input-search autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" id="keywords1" name="keywords" placeholder='<%= LanguageUtil.get(locale, "keywords") %>' />
+	</div>
+
+	<%
+	PortletURL portletURL = renderResponse.createRenderURL();
+
+	portletURL.setParameter("struts_action", "/blogs/search");
+	portletURL.setParameter("redirect", redirect);
+	portletURL.setParameter("keywords", keywords);
+	%>
+
+	<liferay-ui:search-container
+		emptyResultsMessage='<%= LanguageUtil.format(pageContext, "no-entries-were-found-that-matched-the-keywords-x", "<strong>" + HtmlUtil.escape(keywords) + "</strong>") %>'
+		iteratorURL="<%= portletURL %>"
+	>
+
+		<%
+		Indexer indexer = IndexerRegistryUtil.getIndexer(BlogsEntry.class);
+
+		SearchContext searchContext = SearchContextFactory.getInstance(request);
+
+		searchContext.setAttribute("paginationType", "regular");
+		searchContext.setEnd(searchContainer.getEnd());
+		searchContext.setIncludeDiscussions(true);
+		searchContext.setKeywords(keywords);
+
+		QueryConfig queryConfig = new QueryConfig();
+
+		queryConfig.setHighlightEnabled(true);
+
+		searchContext.setQueryConfig(queryConfig);
+
+		searchContext.setStart(searchContainer.getStart());
+
+		Hits hits = indexer.search(searchContext);
+
+		searchContainer.setTotal(hits.getLength());
+
+		PortletURL hitURL = renderResponse.createRenderURL();
+
+		hitURL.setParameter("struts_action", "/blogs/view_entry");
+		hitURL.setParameter("redirect", currentURL);
+		%>
+
+		<liferay-ui:search-container-results
+			results="<%= SearchResultUtil.getSearchResults(hits, locale, hitURL) %>"
+		/>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.kernel.search.SearchResult"
+			modelVar="searchResult"
+		>
+
+			<%
+			BlogsEntry entry = BlogsEntryLocalServiceUtil.getEntry(searchResult.getClassPK());
+
+			entry = entry.toEscapedModel();
+
+			Summary summary = searchResult.getSummary();
+			%>
+
+			<portlet:renderURL var="rowURL">
+				<portlet:param name="struts_action" value="/blogs/view_entry" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="urlTitle" value="<%= entry.getUrlTitle() %>" />
+			</portlet:renderURL>
+
+			<liferay-ui:app-view-search-entry
+				cssClass='<%= MathUtil.isEven(index) ? "search" : "search alt" %>'
+				description="<%= (summary != null) ? HtmlUtil.escape(summary.getContent()) : entry.getDescription() %>"
+				mbMessages="<%= searchResult.getMBMessages() %>"
+				queryTerms="<%= hits.getQueryTerms() %>"
+				thumbnailSrc="<%= Validator.isNotNull(entry.getEntryImageURL(themeDisplay)) ? entry.getEntryImageURL(themeDisplay) : StringPool.BLANK %>"
+				title="<%= (summary != null) ? HtmlUtil.escape(summary.getTitle()) : entry.getTitle() %>"
+				url="<%= rowURL %>"
+			/>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-paginator searchContainer="<%= searchContainer %>" type="more" />
+	</liferay-ui:search-container>
+</aui:form>
+
+<%
+if (Validator.isNotNull(keywords)) {
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "search") + ": " + keywords, currentURL);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/view.jsp
new file mode 100644
index 0000000..5683eaf
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/view.jsp
@@ -0,0 +1,86 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/blogs/init.jsp" %>
+
+<%
+long assetCategoryId = ParamUtil.getLong(request, "categoryId");
+String assetTagName = ParamUtil.getString(request, "tag");
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/blogs/view");
+%>
+
+<portlet:actionURL var="undoTrashURL">
+	<portlet:param name="struts_action" value="/blogs/edit_entry" />
+	<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.RESTORE %>" />
+</portlet:actionURL>
+
+<liferay-ui:trash-undo portletURL="<%= undoTrashURL %>" />
+
+<liferay-portlet:renderURL varImpl="searchURL">
+	<portlet:param name="struts_action" value="/blogs/search" />
+</liferay-portlet:renderURL>
+
+<aui:form action="<%= searchURL %>" method="get" name="fm1">
+	<liferay-portlet:renderURLParams varImpl="searchURL" />
+	<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+	<aui:input name="groupId" type="hidden" value="<%= String.valueOf(scopeGroupId) %>" />
+
+	<%
+	SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, pageDelta, portletURL, null, null);
+
+	searchContainer.setDelta(pageDelta);
+	searchContainer.setDeltaConfigurable(false);
+
+	int total = 0;
+	List results = null;
+
+	if ((assetCategoryId != 0) || Validator.isNotNull(assetTagName)) {
+		AssetEntryQuery assetEntryQuery = new AssetEntryQuery(BlogsEntry.class.getName(), searchContainer);
+
+		assetEntryQuery.setExcludeZeroViewCount(false);
+		assetEntryQuery.setVisible(Boolean.TRUE);
+
+		total = AssetEntryServiceUtil.getEntriesCount(assetEntryQuery);
+
+		searchContainer.setTotal(total);
+
+		assetEntryQuery.setEnd(searchContainer.getEnd());
+		assetEntryQuery.setStart(searchContainer.getStart());
+
+		results = AssetEntryServiceUtil.getEntries(assetEntryQuery);
+	}
+	else {
+		int status = WorkflowConstants.STATUS_APPROVED;
+
+		if (BlogsPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_ENTRY)) {
+			status = WorkflowConstants.STATUS_ANY;
+		}
+
+		total = BlogsEntryServiceUtil.getGroupEntriesCount(scopeGroupId, status);
+
+		searchContainer.setTotal(total);
+
+		results = BlogsEntryServiceUtil.getGroupEntries(scopeGroupId, status, searchContainer.getStart(), searchContainer.getEnd());
+	}
+
+	searchContainer.setResults(results);
+	%>
+
+	<%@ include file="/html/portlet/blogs/view_entries.jspf" %>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/view_entries.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/view_entries.jspf
new file mode 100644
index 0000000..dc63726
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/view_entries.jspf
@@ -0,0 +1,180 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+boolean showAddEntryButton = BlogsPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_ENTRY);
+boolean showPermissionsButton = BlogsPermission.contains(permissionChecker, scopeGroupId, ActionKeys.PERMISSIONS);
+boolean showSubscribeButton = BlogsPermission.contains(permissionChecker, scopeGroupId, ActionKeys.SUBSCRIBE) && (BlogsUtil.getEmailEntryAddedEnabled(portletPreferences) || BlogsUtil.getEmailEntryUpdatedEnabled(portletPreferences));
+showSearch = showSearch && !results.isEmpty();
+%>
+
+<c:if test="<%= showAddEntryButton || showPermissionsButton || showSearch %>">
+	<aui:nav-bar>
+		<c:if test="<%= showAddEntryButton || showPermissionsButton %>">
+			<aui:nav>
+				<c:if test="<%= showAddEntryButton %>">
+					<portlet:renderURL var="editEntryURL">
+						<portlet:param name="struts_action" value="/blogs/edit_entry" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+						<portlet:param name="backURL" value="<%= currentURL %>" />
+					</portlet:renderURL>
+
+					<aui:nav-item href="<%= editEntryURL %>" label="add-blog-entry" name="addEntryButton" />
+				</c:if>
+
+				<c:if test="<%= showPermissionsButton %>">
+					<liferay-security:permissionsURL
+						modelResource="com.liferay.portlet.blogs"
+						modelResourceDescription="<%= HtmlUtil.escape(themeDisplay.getScopeGroupName()) %>"
+						resourcePrimKey="<%= String.valueOf(scopeGroupId) %>"
+						var="permissionsURL"
+						windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+					/>
+
+					<aui:nav-item href="<%= permissionsURL %>" label="permissions" title="edit-permissions" useDialog="<%= true %>" />
+				</c:if>
+			</aui:nav>
+		</c:if>
+
+		<c:if test="<%= showSearch %>">
+			<aui:nav-bar-search cssClass="pull-right">
+				<div class="form-search">
+					<liferay-ui:input-search autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" id="keywords1" name="keywords" placeholder='<%= LanguageUtil.get(locale, "keywords") %>' />
+				</div>
+			</aui:nav-bar-search>
+		</c:if>
+	</aui:nav-bar>
+</c:if>
+
+<liferay-ui:categorization-filter
+	assetType="entries"
+	portletURL="<%= portletURL %>"
+/>
+
+<%
+long portletDisplayDDMTemplateId = PortletDisplayTemplateUtil.getPortletDisplayTemplateDDMTemplateId(displayStyleGroupId, displayStyle);
+
+if (portletDisplayDDMTemplateId > 0) {
+%>
+
+	<%= PortletDisplayTemplateUtil.renderDDMTemplate(pageContext, portletDisplayDDMTemplateId, _convertToBlogEntries(results)) %>
+
+<%
+}
+else {
+	for (Object result : results) {
+		BlogsEntry entry = null;
+
+		AssetEntry assetEntry = null;
+
+		if (result instanceof AssetEntry) {
+			assetEntry = (AssetEntry)result;
+
+			entry = BlogsEntryLocalServiceUtil.getEntry(assetEntry.getClassPK());
+
+			AssetUtil.addLayoutTags(request, assetEntry.getTags());
+		}
+		else {
+			entry = (BlogsEntry)result;
+		}
+
+		if (((entry.getStatus() == WorkflowConstants.STATUS_DRAFT) || entry.getDisplayDate().after(new Date())) && (entry.getUserId() != user.getUserId()) && !permissionChecker.isGroupAdmin(scopeGroupId)) {
+			searchContainer.setTotal(searchContainer.getTotal() - 1);
+
+			continue;
+		}
+
+		request.setAttribute("view_entry_content.jsp-searchContainer", searchContainer);
+
+		request.setAttribute("view_entry_content.jsp-entry", entry);
+
+		request.setAttribute("view_entry_content.jsp-assetEntry", assetEntry);
+%>
+
+	<liferay-util:include page="/html/portlet/blogs/view_entry_content.jsp" />
+
+<%
+	}
+}
+%>
+
+<div class="subscribe">
+	<c:if test="<%= enableRSS %>">
+		<liferay-portlet:resourceURL varImpl="rssURL">
+			<portlet:param name="struts_action" value="/blogs/rss" />
+		</liferay-portlet:resourceURL>
+
+		<liferay-ui:rss
+			delta="<%= rssDelta %>"
+			displayStyle="<%= rssDisplayStyle %>"
+			feedType="<%= rssFeedType %>"
+			resourceURL="<%= rssURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= showSubscribeButton %>">
+		<c:choose>
+			<c:when test="<%= SubscriptionLocalServiceUtil.isSubscribed(company.getCompanyId(), user.getUserId(), BlogsEntry.class.getName(), scopeGroupId) %>">
+				<portlet:actionURL var="unsubscribeURL">
+					<portlet:param name="struts_action" value="/blogs/edit_entry" />
+					<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UNSUBSCRIBE %>" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+				</portlet:actionURL>
+
+				<liferay-ui:icon
+					image="unsubscribe"
+					label="<%= true %>"
+					url="<%= unsubscribeURL %>"
+				/>
+			</c:when>
+			<c:otherwise>
+				<portlet:actionURL var="subscribeURL">
+					<portlet:param name="struts_action" value="/blogs/edit_entry" />
+					<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.SUBSCRIBE %>" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+				</portlet:actionURL>
+
+				<liferay-ui:icon
+					image="subscribe"
+					label="<%= true %>"
+					url="<%= subscribeURL %>"
+				/>
+			</c:otherwise>
+		</c:choose>
+	</c:if>
+</div>
+
+<liferay-ui:search-paginator searchContainer="<%= searchContainer %>" />
+
+<%!
+private List<BlogsEntry> _convertToBlogEntries(List results) throws PortalException, SystemException {
+	if (results.isEmpty() || (results.get(0) instanceof BlogsEntry)) {
+		return results;
+	}
+
+	List<BlogsEntry> entries = new ArrayList<BlogsEntry>(results.size());
+
+	for (Object result : results) {
+		AssetEntry assetEntry = (AssetEntry)result;
+
+		BlogsEntry entry = BlogsEntryLocalServiceUtil.getEntry(assetEntry.getClassPK());
+
+		entries.add(entry);
+	}
+
+	return entries;
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/view_entry.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/view_entry.jsp
new file mode 100644
index 0000000..2f026d5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/view_entry.jsp
@@ -0,0 +1,161 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/blogs/init.jsp" %>
+
+<%
+String strutsAction = ParamUtil.getString(request, "struts_action");
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+String portletId = portletDisplay.getId();
+
+if (Validator.isNull(redirect) || (strutsAction.equals("/blogs/view_entry") && !portletId.equals(PortletKeys.BLOGS))) {
+	PortletURL portletURL = renderResponse.createRenderURL();
+
+	if (portletId.equals(PortletKeys.BLOGS_ADMIN)) {
+		portletURL.setParameter("struts_action", "/blogs_admin/view");
+	}
+	else if (portletId.equals(PortletKeys.BLOGS_AGGREGATOR)) {
+		portletURL.setParameter("struts_action", "/blogs_aggregator/view");
+	}
+	else {
+		portletURL.setParameter("struts_action", "/blogs/view");
+	}
+
+	redirect = portletURL.toString();
+}
+
+BlogsEntry entry = (BlogsEntry)request.getAttribute(WebKeys.BLOGS_ENTRY);
+
+//entry = entry.toEscapedModel();
+
+long entryId = BeanParamUtil.getLong(entry, request, "entryId");
+
+displayStyle = BlogsUtil.DISPLAY_STYLE_FULL_CONTENT;
+
+AssetEntry assetEntry = AssetEntryLocalServiceUtil.getEntry(BlogsEntry.class.getName(), entry.getEntryId());
+
+AssetEntryServiceUtil.incrementViewCounter(BlogsEntry.class.getName(), entry.getEntryId());
+
+AssetUtil.addLayoutTags(request, AssetTagLocalServiceUtil.getTags(BlogsEntry.class.getName(), entry.getEntryId()));
+
+request.setAttribute(WebKeys.LAYOUT_ASSET_ENTRY, assetEntry);
+
+request.setAttribute("view_entry_content.jsp-entry", entry);
+
+request.setAttribute("view_entry_content.jsp-assetEntry", assetEntry);
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	localizeTitle="<%= false %>"
+	title="<%= entry.getTitle() %>"
+/>
+
+<portlet:actionURL var="editEntryURL">
+	<portlet:param name="struts_action" value="/blogs/edit_entry" />
+</portlet:actionURL>
+
+<aui:form action="<%= editEntryURL %>" method="post" name="fm1" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveEntry();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="entryId" type="hidden" value="<%= String.valueOf(entryId) %>" />
+
+	<liferay-util:include page="/html/portlet/blogs/view_entry_content.jsp" />
+</aui:form>
+
+<c:if test="<%= PropsValues.BLOGS_ENTRY_PREVIOUS_AND_NEXT_NAVIGATION_ENABLED %>">
+
+	<%
+	BlogsEntry[] prevAndNext = BlogsEntryLocalServiceUtil.getEntriesPrevAndNext(entryId);
+
+	BlogsEntry previousEntry = prevAndNext[0];
+	BlogsEntry nextEntry = prevAndNext[2];
+	%>
+
+	<div class="entry-navigation">
+		<c:choose>
+			<c:when test="<%= previousEntry != null %>">
+				<portlet:renderURL var="previousEntryURL">
+					<portlet:param name="struts_action" value="/blogs/view_entry" />
+					<portlet:param name="redirect" value="<%= redirect %>" />
+					<portlet:param name="entryId" value="<%= String.valueOf(previousEntry.getEntryId()) %>" />
+				</portlet:renderURL>
+
+				<aui:a cssClass="previous" href="<%= previousEntryURL %>" label="previous" />
+			</c:when>
+			<c:otherwise>
+				<span class="previous"><liferay-ui:message key="previous" /></span>
+			</c:otherwise>
+		</c:choose>
+
+		<c:choose>
+			<c:when test="<%= nextEntry != null %>">
+				<portlet:renderURL var="nextEntryURL">
+					<portlet:param name="struts_action" value="/blogs/view_entry" />
+					<portlet:param name="redirect" value="<%= redirect %>" />
+					<portlet:param name="entryId" value="<%= String.valueOf(nextEntry.getEntryId()) %>" />
+				</portlet:renderURL>
+
+				<aui:a cssClass="next" href="<%= nextEntryURL %>" label="next" />
+			</c:when>
+			<c:otherwise>
+				<span class="next"><liferay-ui:message key="next" /></span>
+			</c:otherwise>
+		</c:choose>
+	</div>
+</c:if>
+
+<c:if test="<%= enableComments %>">
+	<liferay-ui:panel-container extended="<%= false %>" id="blogsCommentsPanelContainer" persistState="<%= true %>">
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="blogsCommentsPanel" persistState="<%= true %>" title="comments">
+			<c:if test="<%= PropsValues.BLOGS_TRACKBACK_ENABLED && entry.isAllowTrackbacks() %>">
+				<liferay-ui:message key="trackback-url" />:
+
+				<liferay-ui:input-resource
+					url='<%= PortalUtil.getLayoutFullURL(themeDisplay) + Portal.FRIENDLY_URL_SEPARATOR + "blogs/trackback/" + entry.getUrlTitle() %>'
+				/>
+
+				<br /><br />
+			</c:if>
+
+			<portlet:actionURL var="discussionURL">
+				<portlet:param name="struts_action" value="/blogs/edit_entry_discussion" />
+			</portlet:actionURL>
+
+			<liferay-ui:discussion
+				className="<%= BlogsEntry.class.getName() %>"
+				classPK="<%= entry.getEntryId() %>"
+				formAction="<%= discussionURL %>"
+				formName="fm2"
+				ratingsEnabled="<%= enableCommentRatings %>"
+				redirect="<%= currentURL %>"
+				userId="<%= entry.getUserId() %>"
+			/>
+		</liferay-ui:panel>
+	</liferay-ui:panel-container>
+</c:if>
+
+<%
+PortalUtil.setPageSubtitle(entry.getTitle(), request);
+PortalUtil.setPageDescription(entry.getDescription(), request);
+
+List<AssetTag> assetTags = AssetTagLocalServiceUtil.getTags(BlogsEntry.class.getName(), entry.getEntryId());
+
+PortalUtil.setPageKeywords(ListUtil.toString(assetTags, AssetTag.NAME_ACCESSOR), request);
+
+PortalUtil.addPortletBreadcrumbEntry(request, entry.getTitle(), currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/view_entry_content.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/view_entry_content.jsp
new file mode 100644
index 0000000..f5ca95a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs/view_entry_content.jsp
@@ -0,0 +1,315 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/blogs/init.jsp" %>
+
+<%
+SearchContainer searchContainer = (SearchContainer)request.getAttribute("view_entry_content.jsp-searchContainer");
+
+BlogsEntry entry = (BlogsEntry)request.getAttribute("view_entry_content.jsp-entry");
+
+AssetEntry assetEntry = (AssetEntry)request.getAttribute("view_entry_content.jsp-assetEntry");
+%>
+
+<c:choose>
+	<c:when test="<%= BlogsEntryPermission.contains(permissionChecker, entry, ActionKeys.VIEW) && (entry.isVisible() || (entry.getUserId() == user.getUserId()) || BlogsEntryPermission.contains(permissionChecker, entry, ActionKeys.UPDATE)) %>">
+		<div class="entry <%= WorkflowConstants.getStatusLabel(entry.getStatus()) %>" id="<portlet:namespace /><%= entry.getEntryId() %>">
+			<div class="entry-content">
+
+				<%
+				String strutsAction = ParamUtil.getString(request, "struts_action");
+				%>
+
+				<c:if test="<%= !entry.isApproved() %>">
+					<h3>
+						<liferay-ui:message key='<%= entry.isPending() ? "pending-approval" : WorkflowConstants.getStatusLabel(entry.getStatus()) %>' />
+					</h3>
+				</c:if>
+
+				<portlet:renderURL var="viewEntryURL">
+					<portlet:param name="struts_action" value="/blogs/view_entry" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="urlTitle" value="<%= entry.getUrlTitle() %>" />
+				</portlet:renderURL>
+
+				<c:if test='<%= !strutsAction.equals("/blogs/view_entry") %>'>
+					<div class="entry-title">
+						<h2><aui:a href="<%= viewEntryURL %>"><%= HtmlUtil.escape(entry.getTitle()) %></aui:a></h2>
+					</div>
+				</c:if>
+
+				<div class="entry-date">
+					<span class="hide-accessible"><liferay-ui:message key="published-date" /></span>
+
+					<%= dateFormatDateTime.format(entry.getDisplayDate()) %>
+				</div>
+			</div>
+
+			<portlet:renderURL var="bookmarkURL" windowState="<%= WindowState.NORMAL.toString() %>">
+				<portlet:param name="struts_action" value="/blogs/view_entry" />
+				<portlet:param name="urlTitle" value="<%= entry.getUrlTitle() %>" />
+			</portlet:renderURL>
+
+			<c:if test='<%= enableSocialBookmarks && socialBookmarksDisplayPosition.equals("top") %>'>
+				<liferay-ui:social-bookmarks
+					displayStyle="<%= socialBookmarksDisplayStyle %>"
+					target="_blank"
+					title="<%= entry.getTitle() %>"
+					types="<%= socialBookmarksTypes %>"
+					url="<%= PortalUtil.getCanonicalURL(bookmarkURL.toString(), themeDisplay, layout) %>"
+				/>
+			</c:if>
+
+			<c:if test="<%= BlogsEntryPermission.contains(permissionChecker, entry, ActionKeys.DELETE) || BlogsEntryPermission.contains(permissionChecker, entry, ActionKeys.PERMISSIONS) || BlogsEntryPermission.contains(permissionChecker, entry, ActionKeys.UPDATE) %>">
+				<div class="lfr-meta-actions edit-actions entry">
+					<table class="lfr-table">
+					<tr>
+						<c:if test="<%= BlogsEntryPermission.contains(permissionChecker, entry, ActionKeys.UPDATE) %>">
+							<td>
+								<portlet:renderURL var="editEntryURL">
+									<portlet:param name="struts_action" value="/blogs/edit_entry" />
+									<portlet:param name="redirect" value="<%= currentURL %>" />
+									<portlet:param name="backURL" value="<%= currentURL %>" />
+									<portlet:param name="entryId" value="<%= String.valueOf(entry.getEntryId()) %>" />
+								</portlet:renderURL>
+
+								<liferay-ui:icon
+									image="edit"
+									label="<%= true %>"
+									url="<%= editEntryURL %>"
+								/>
+							</td>
+						</c:if>
+
+						<c:if test="<%= showEditEntryPermissions && BlogsEntryPermission.contains(permissionChecker, entry, ActionKeys.PERMISSIONS) %>">
+							<td>
+								<liferay-security:permissionsURL
+									modelResource="<%= BlogsEntry.class.getName() %>"
+									modelResourceDescription="<%= entry.getTitle() %>"
+									resourcePrimKey="<%= String.valueOf(entry.getEntryId()) %>"
+									var="permissionsEntryURL"
+									windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+								/>
+
+								<liferay-ui:icon
+									image="permissions"
+									label="<%= true %>"
+									method="get"
+									url="<%= permissionsEntryURL %>"
+									useDialog="<%= true %>"
+								/>
+							</td>
+						</c:if>
+
+						<c:if test="<%= BlogsEntryPermission.contains(permissionChecker, entry, ActionKeys.DELETE) %>">
+							<td>
+								<portlet:renderURL var="viewURL">
+									<portlet:param name="struts_action" value="/blogs/view" />
+								</portlet:renderURL>
+
+								<portlet:actionURL var="deleteEntryURL">
+									<portlet:param name="struts_action" value="/blogs/edit_entry" />
+									<portlet:param name="<%= Constants.CMD %>" value="<%= TrashUtil.isTrashEnabled(scopeGroupId) ? Constants.MOVE_TO_TRASH : Constants.DELETE %>" />
+									<portlet:param name="redirect" value="<%= viewURL %>" />
+									<portlet:param name="entryId" value="<%= String.valueOf(entry.getEntryId()) %>" />
+								</portlet:actionURL>
+
+								<liferay-ui:icon-delete
+									label="<%= true %>"
+									trash="<%= TrashUtil.isTrashEnabled(scopeGroupId) %>"
+									url="<%= deleteEntryURL %>"
+								/>
+							</td>
+						</c:if>
+					</tr>
+					</table>
+				</div>
+			</c:if>
+
+			<div class="entry-body">
+				<c:choose>
+					<c:when test='<%= displayStyle.equals(BlogsUtil.DISPLAY_STYLE_ABSTRACT) && !strutsAction.equals("/blogs/view_entry") %>'>
+						<c:if test="<%= entry.isSmallImage() %>">
+							<div class="asset-small-image">
+								<img alt="" class="asset-small-image" src="<%= HtmlUtil.escape(entry.getEntryImageURL(themeDisplay)) %>" width="150" />
+							</div>
+						</c:if>
+
+						<%
+						String summary = entry.getDescription();
+
+						if (Validator.isNull(summary)) {
+							summary = entry.getContent();
+						}
+						%>
+
+						<%= StringUtil.shorten(HtmlUtil.stripHtml(summary), pageAbstractLength) %>
+
+						<br />
+
+						<aui:a href="<%= viewEntryURL %>"><liferay-ui:message arguments='<%= new Object[] {"hide-accessible", HtmlUtil.escape(entry.getTitle())} %>' key="read-more-x-about-x" /> &raquo;</aui:a>
+					</c:when>
+					<c:when test='<%= displayStyle.equals(BlogsUtil.DISPLAY_STYLE_FULL_CONTENT) || strutsAction.equals("/blogs/view_entry") %>'>
+
+						<%
+						String entryContentId = "blogs-entry-content-" + entry.getEntryId();
+
+						boolean inlineEditEnabled = BlogsEntryPermission.contains(permissionChecker, entry, ActionKeys.UPDATE) && BrowserSnifferUtil.isRtf(request) && !WorkflowDefinitionLinkLocalServiceUtil.hasWorkflowDefinitionLink(themeDisplay.getCompanyId(), scopeGroupId, BlogsEntry.class.getName());
+						%>
+
+						<div <%= inlineEditEnabled ? "class=\"lfr-editable\" contenteditable=\"true\" id=\"" + entryContentId + "\" spellcheck=\"false\"" : StringPool.BLANK %>>
+							<%= entry.getContent() %>
+						</div>
+
+						<liferay-ui:custom-attributes-available className="<%= BlogsEntry.class.getName() %>">
+							<liferay-ui:custom-attribute-list
+								className="<%= BlogsEntry.class.getName() %>"
+								classPK="<%= entry.getEntryId() %>"
+								editable="<%= false %>"
+								label="<%= true %>"
+							/>
+						</liferay-ui:custom-attributes-available>
+
+						<c:if test="<%= inlineEditEnabled %>">
+							<portlet:actionURL var="updateEntryContent">
+								<portlet:param name="struts_action" value="/blogs/edit_entry" />
+								<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UPDATE_CONTENT %>" />
+								<portlet:param name="entryId" value="<%= String.valueOf(entry.getEntryId()) %>" />
+							</portlet:actionURL>
+
+							<liferay-ui:input-editor
+								editorImpl="ckeditor"
+								inlineEdit="<%= true %>"
+								inlineEditSaveURL="<%= updateEntryContent %>"
+								name="<%= entryContentId %>"
+							/>
+						</c:if>
+					</c:when>
+					<c:when test='<%= displayStyle.equals(BlogsUtil.DISPLAY_STYLE_TITLE) && !strutsAction.equals("/blogs/view_entry") %>'>
+						<aui:a href="<%= viewEntryURL %>"><liferay-ui:message arguments='<%= new Object[] {"hide-accessible", HtmlUtil.escape(entry.getTitle())} %>' key="read-more-x-about-x" /> &raquo;</aui:a>
+					</c:when>
+				</c:choose>
+			</div>
+
+			<div class="entry-footer">
+				<div class="entry-author">
+					<liferay-ui:message key="written-by" /> <%= HtmlUtil.escape(PortalUtil.getUserName(entry)) %>
+				</div>
+
+				<div class="stats">
+					<c:if test="<%= assetEntry != null %>">
+						<span class="view-count">
+							<c:choose>
+								<c:when test="<%= assetEntry.getViewCount() == 1 %>">
+									<%= assetEntry.getViewCount() %> <liferay-ui:message key="view" />,
+								</c:when>
+								<c:when test="<%= assetEntry.getViewCount() > 1 %>">
+									<%= assetEntry.getViewCount() %> <liferay-ui:message key="views" />,
+								</c:when>
+							</c:choose>
+						</span>
+					</c:if>
+
+					<c:if test="<%= enableComments %>">
+						<span class="comments">
+
+							<%
+							long classNameId = PortalUtil.getClassNameId(BlogsEntry.class.getName());
+
+							int messagesCount = MBMessageLocalServiceUtil.getDiscussionMessagesCount(classNameId, entry.getEntryId(), WorkflowConstants.STATUS_APPROVED);
+							%>
+
+							<c:choose>
+								<c:when test='<%= strutsAction.equals("/blogs/view_entry") %>'>
+									<%= messagesCount %> <liferay-ui:message key='<%= (messagesCount == 1) ? "comment" : "comments" %>' />
+								</c:when>
+								<c:otherwise>
+									<aui:a href='<%= PropsValues.PORTLET_URL_ANCHOR_ENABLE ? viewEntryURL : viewEntryURL + StringPool.POUND + "blogsCommentsPanelContainer" %>'><%= messagesCount %> <liferay-ui:message key='<%= (messagesCount == 1) ? "comment" : "comments" %>' /></aui:a>
+								</c:otherwise>
+							</c:choose>
+						</span>
+					</c:if>
+				</div>
+
+				<c:if test="<%= enableFlags %>">
+					<liferay-ui:flags
+						className="<%= BlogsEntry.class.getName() %>"
+						classPK="<%= entry.getEntryId() %>"
+						contentTitle="<%= entry.getTitle() %>"
+						reportedUserId="<%= entry.getUserId() %>"
+					/>
+				</c:if>
+
+				<span class="entry-categories">
+					<liferay-ui:asset-categories-summary
+						className="<%= BlogsEntry.class.getName() %>"
+						classPK="<%= entry.getEntryId() %>"
+						portletURL="<%= renderResponse.createRenderURL() %>"
+					/>
+				</span>
+
+				<span class="entry-tags">
+					<liferay-ui:asset-tags-summary
+						className="<%= BlogsEntry.class.getName() %>"
+						classPK="<%= entry.getEntryId() %>"
+						portletURL="<%= renderResponse.createRenderURL() %>"
+					/>
+				</span>
+
+				<c:if test='<%= displayStyle.equals(BlogsUtil.DISPLAY_STYLE_FULL_CONTENT) || strutsAction.equals("/blogs/view_entry") %>'>
+					<c:if test="<%= enableRelatedAssets %>">
+						<div class="entry-links">
+							<liferay-ui:asset-links
+								assetEntryId="<%= (assetEntry != null) ? assetEntry.getEntryId() : 0 %>"
+								className="<%= BlogsEntry.class.getName() %>"
+								classPK="<%= entry.getEntryId() %>"
+							/>
+						</div>
+					</c:if>
+
+					<c:if test='<%= enableSocialBookmarks && socialBookmarksDisplayPosition.equals("bottom") %>'>
+						<liferay-ui:social-bookmarks
+							contentId="<%= String.valueOf(entry.getEntryId()) %>"
+							displayStyle="<%= socialBookmarksDisplayStyle %>"
+							target="_blank"
+							title="<%= entry.getTitle() %>"
+							types="<%= socialBookmarksTypes %>"
+							url="<%= PortalUtil.getCanonicalURL(bookmarkURL.toString(), themeDisplay, layout) %>"
+						/>
+					</c:if>
+
+					<c:if test="<%= enableRatings %>">
+						<liferay-ui:ratings
+							className="<%= BlogsEntry.class.getName() %>"
+							classPK="<%= entry.getEntryId() %>"
+						/>
+					</c:if>
+				</c:if>
+			</div>
+		</div>
+
+		<div class="separator"><!-- --></div>
+	</c:when>
+	<c:otherwise>
+
+		<%
+		if (searchContainer != null) {
+			searchContainer.setTotal(searchContainer.getTotal() - 1);
+		}
+		%>
+
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_admin/entry_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_admin/entry_action.jsp
new file mode 100644
index 0000000..2e784e8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_admin/entry_action.jsp
@@ -0,0 +1,84 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/blogs_admin/init.jsp" %>
+
+<%
+SearchContainer searchContainer = (SearchContainer)request.getAttribute("liferay-ui:search:searchContainer");
+
+String redirect = searchContainer.getIteratorURL().toString();
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+BlogsEntry entry = (BlogsEntry)row.getObject();
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= BlogsEntryPermission.contains(permissionChecker, entry, ActionKeys.VIEW) %>">
+		<portlet:renderURL var="viewEntryURL">
+			<portlet:param name="struts_action" value="/blogs_admin/view_entry" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="entryId" value="<%= String.valueOf(entry.getEntryId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="view"
+			url="<%= viewEntryURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= BlogsEntryPermission.contains(permissionChecker, entry, ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editEntryURL">
+			<portlet:param name="struts_action" value="/blogs_admin/edit_entry" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UPDATE %>" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="entryId" value="<%= String.valueOf(entry.getEntryId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editEntryURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= BlogsEntryPermission.contains(permissionChecker, entry, ActionKeys.PERMISSIONS) %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= BlogsEntry.class.getName() %>"
+			modelResourceDescription="<%= entry.getTitle() %>"
+			resourcePrimKey="<%= String.valueOf(entry.getEntryId()) %>"
+			var="permissionsEntryURL"
+			windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			method="get"
+			url="<%= permissionsEntryURL %>"
+			useDialog="<%= true %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= BlogsEntryPermission.contains(permissionChecker, entry, ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteEntryURL">
+			<portlet:param name="struts_action" value="/blogs_admin/edit_entry" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= TrashUtil.isTrashEnabled(scopeGroupId) ? Constants.MOVE_TO_TRASH : Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="entryId" value="<%= String.valueOf(entry.getEntryId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete trash="<%= TrashUtil.isTrashEnabled(scopeGroupId) %>" url="<%= deleteEntryURL %>" />
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_admin/entry_search_results.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_admin/entry_search_results.jspf
new file mode 100644
index 0000000..6e1c801
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_admin/entry_search_results.jspf
@@ -0,0 +1,67 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+if (Validator.isNull(searchTerms.getKeywords())) {
+	total = BlogsEntryServiceUtil.getGroupEntriesCount(scopeGroupId, WorkflowConstants.STATUS_ANY);
+
+	searchContainer.setTotal(total);
+
+	results = BlogsEntryServiceUtil.getGroupEntries(scopeGroupId, WorkflowConstants.STATUS_ANY, searchContainer.getStart(), searchContainer.getEnd());
+}
+else {
+	Indexer indexer = IndexerRegistryUtil.getIndexer(BlogsEntry.class);
+
+	SearchContext searchContext = SearchContextFactory.getInstance(request);
+
+	searchContext.setEnd(searchContainer.getEnd());
+	searchContext.setKeywords(searchTerms.getKeywords());
+	searchContext.setStart(searchContainer.getStart());
+
+	Hits hits = indexer.search(searchContext);
+
+	searchContainer.setTotal(hits.getLength());
+
+	for (int i = 0; i < hits.getDocs().length; i++) {
+		Document doc = hits.doc(i);
+
+		long entryId = GetterUtil.getLong(doc.get(Field.ENTRY_CLASS_PK));
+
+		BlogsEntry entry = null;
+
+		try {
+			entry = BlogsEntryServiceUtil.getEntry(entryId);
+
+			entry = entry.toEscapedModel();
+		}
+		catch (Exception e) {
+			if (_log.isWarnEnabled()) {
+				_log.warn("Blogs search index is stale and contains entry " + entryId);
+			}
+
+			continue;
+		}
+
+		results.add(entry);
+	}
+}
+
+searchContainer.setResults(results);
+%>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.blogs_admin.entry_search_results_jspf");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_admin/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_admin/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_admin/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_admin/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_admin/init.jsp
new file mode 100644
index 0000000..e45bd3b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_admin/init.jsp
@@ -0,0 +1,30 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.kernel.search.Document" %><%@
+page import="com.liferay.portlet.blogs.service.BlogsEntryServiceUtil" %><%@
+page import="com.liferay.portlet.blogs.service.permission.BlogsEntryPermission" %><%@
+page import="com.liferay.portlet.blogs.service.permission.BlogsPermission" %><%@
+page import="com.liferay.portlet.blogsadmin.search.EntrySearch" %><%@
+page import="com.liferay.portlet.blogsadmin.search.EntrySearchTerms" %>
+
+<%@ include file="/html/portlet/blogs_admin/init-ext.jsp" %>
+
+<%
+boolean showBlogEntriesSearch = PrefsParamUtil.getBoolean(portletPreferences, request, "showBlogEntriesSearch", true);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_admin/search_columns.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_admin/search_columns.jspf
new file mode 100644
index 0000000..8dc5955
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_admin/search_columns.jspf
@@ -0,0 +1,41 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="title"
+	orderable="<%= false %>"
+	property="title"
+/>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="author"
+	orderable="<%= false %>"
+	property="userName"
+/>
+
+<liferay-ui:search-container-column-date
+	href="<%= rowURL %>"
+	name="create-date"
+	orderable="<%= false %>"
+	property="createDate"
+/>
+
+<liferay-ui:search-container-column-status
+	href="<%= rowURL %>"
+	name="status"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_admin/toolbar.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_admin/toolbar.jsp
new file mode 100644
index 0000000..35245ce
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_admin/toolbar.jsp
@@ -0,0 +1,47 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/blogs_admin/init.jsp" %>
+
+<%
+String toolbarItem = ParamUtil.getString(request, "toolbarItem");
+%>
+
+<aui:nav-bar>
+	<aui:nav>
+		<portlet:renderURL var="viewEntriesURL">
+			<portlet:param name="struts_action" value="/blogs_admin/view" />
+		</portlet:renderURL>
+
+		<c:if test="<%= BlogsPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_ENTRY) %>">
+			<portlet:renderURL var="addEntryURL">
+				<portlet:param name="struts_action" value="/blogs_admin/edit_entry" />
+				<portlet:param name="redirect" value="<%= viewEntriesURL %>" />
+				<portlet:param name="backURL" value="<%= viewEntriesURL %>" />
+			</portlet:renderURL>
+
+			<aui:nav-item href="<%= addEntryURL %>" iconCssClass="icon-plus" label="add" selected='<%= toolbarItem.equals("add") %>' />
+		</c:if>
+	</aui:nav>
+
+	<c:if test="<%= showBlogEntriesSearch %>">
+		<aui:nav-bar-search cssClass="pull-right">
+			<div class="form-search">
+				<liferay-ui:input-search autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" id="keywords1" name="keywords" placeholder='<%= LanguageUtil.get(locale, "keywords") %>' />
+			</div>
+		</aui:nav-bar-search>
+	</c:if>
+</aui:nav-bar>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_admin/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_admin/view.jsp
new file mode 100644
index 0000000..80be806
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_admin/view.jsp
@@ -0,0 +1,105 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/blogs_admin/init.jsp" %>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/blogs_admin/view");
+%>
+
+<portlet:actionURL var="undoTrashURL">
+	<portlet:param name="struts_action" value="/blogs/edit_entry" />
+	<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.RESTORE %>" />
+</portlet:actionURL>
+
+<liferay-ui:trash-undo portletURL="<%= undoTrashURL %>" />
+
+<liferay-portlet:renderURL varImpl="searchURL">
+	<portlet:param name="struts_action" value="/blogs_admin/search" />
+</liferay-portlet:renderURL>
+
+<aui:form action="<%= searchURL.toString() %>" method="get" name="fm">
+	<liferay-portlet:renderURLParams varImpl="searchURL" />
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= portletURL.toString() %>" />
+	<aui:input name="deleteEntryIds" type="hidden" />
+
+	<liferay-util:include page="/html/portlet/blogs_admin/toolbar.jsp" />
+
+	<liferay-ui:search-container
+		rowChecker="<%= new RowChecker(renderResponse) %>"
+		searchContainer="<%= new EntrySearch(renderRequest, portletURL) %>"
+	>
+
+		<%
+		EntrySearchTerms searchTerms = (EntrySearchTerms)searchContainer.getSearchTerms();
+		%>
+
+		<liferay-ui:search-container-results>
+			<%@ include file="/html/portlet/blogs_admin/entry_search_results.jspf" %>
+		</liferay-ui:search-container-results>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portlet.blogs.model.BlogsEntry"
+			escapedModel="<%= true %>"
+			keyProperty="entryId"
+			modelVar="entry"
+			rowIdProperty="urlTitle"
+		>
+			<liferay-portlet:renderURL varImpl="rowURL">
+				<portlet:param name="struts_action" value="/blogs_admin/view_entry" />
+				<portlet:param name="redirect" value="<%= searchContainer.getIteratorURL().toString() %>" />
+				<portlet:param name="entryId" value="<%= String.valueOf(entry.getEntryId()) %>" />
+			</liferay-portlet:renderURL>
+
+			<%@ include file="/html/portlet/blogs_admin/search_columns.jspf" %>
+
+			<liferay-ui:search-container-column-jsp
+				align="right"
+				path="/html/portlet/blogs_admin/entry_action.jsp"
+			/>
+		</liferay-ui:search-container-row>
+
+		<c:if test="<%= total > 0 %>">
+			<aui:button disabled="<%= true %>" name="delete" onClick='<%= renderResponse.getNamespace() + "deleteEntries();" %>' value='<%= TrashUtil.isTrashEnabled(scopeGroupId) ? "move-to-the-recycle-bin" : "delete" %>' />
+
+			<div class="separator"><!-- --></div>
+		</c:if>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script>
+	Liferay.Util.toggleSearchContainerButton('#<portlet:namespace />delete', '#<portlet:namespace /><%= searchContainerReference.getId() %>SearchContainer', document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />deleteEntries',
+		function() {
+			if (<%= TrashUtil.isTrashEnabled(scopeGroupId) %> || confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-delete-the-selected-entries") %>')) {
+				document.<portlet:namespace />fm.method = "post";
+				document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= TrashUtil.isTrashEnabled(scopeGroupId) ? Constants.MOVE_TO_TRASH :Constants.DELETE %>";
+				document.<portlet:namespace />fm.<portlet:namespace />deleteEntryIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+				submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/blogs_admin/edit_entry" /></portlet:actionURL>");
+			}
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/configuration.jsp
new file mode 100644
index 0000000..502a55e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/configuration.jsp
@@ -0,0 +1,156 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/blogs_aggregator/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+String organizationName = StringPool.BLANK;
+
+Organization organization = null;
+
+if (organizationId > 0) {
+	organization = OrganizationLocalServiceUtil.getOrganization(organizationId);
+
+	organizationName = organization.getName();
+}
+%>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="preferences--organizationId--" type="hidden" value="<%= organizationId %>" />
+
+	<aui:fieldset>
+		<aui:select name="preferences--selectionMethod--">
+			<aui:option label="users" selected='<%= selectionMethod.equals("users") %>' />
+			<aui:option label="scope" selected='<%= selectionMethod.equals("scope") %>' />
+		</aui:select>
+
+		<div id="<portlet:namespace />usersSelectionOptions">
+			<aui:field-wrapper label="organization">
+				<div class="input-append">
+					<liferay-ui:input-resource id="organizationName" url="<%= HtmlUtil.escape(organizationName) %>" />
+
+					<aui:button name="selectOrganizationButton" value="select" />
+
+					<aui:button disabled="<%= organizationId <= 0 %>" name="removeOrganizationButton" onClick='<%= renderResponse.getNamespace() + "removeOrganization();" %>' value="remove" />
+				</div>
+			</aui:field-wrapper>
+		</div>
+
+		<aui:select name="preferences--displayStyle--">
+			<aui:option label="body-and-image" selected='<%= displayStyle.equals("body-and-image") %>' />
+			<aui:option label="body" selected='<%= displayStyle.equals("body") %>' />
+			<aui:option label="abstract" selected='<%= displayStyle.equals("abstract") %>' />
+			<aui:option label="abstract-without-title" selected='<%= displayStyle.equals("abstract-without-title") %>' />
+			<aui:option label="quote" selected='<%= displayStyle.equals("quote") %>' />
+			<aui:option label="quote-without-title" selected='<%= displayStyle.equals("quote-without-title") %>' />
+			<aui:option label="title" selected='<%= displayStyle.equals("title") %>' />
+		</aui:select>
+
+		<aui:select label="maximum-items-to-display" name="preferences--max--">
+			<aui:option label="1" selected="<%= max == 1 %>" />
+			<aui:option label="2" selected="<%= max == 2 %>" />
+			<aui:option label="3" selected="<%= max == 3 %>" />
+			<aui:option label="4" selected="<%= max == 4 %>" />
+			<aui:option label="5" selected="<%= max == 5 %>" />
+			<aui:option label="10" selected="<%= max == 10 %>" />
+			<aui:option label="15" selected="<%= max == 15 %>" />
+			<aui:option label="20" selected="<%= max == 20 %>" />
+			<aui:option label="25" selected="<%= max == 25 %>" />
+			<aui:option label="30" selected="<%= max == 30 %>" />
+			<aui:option label="40" selected="<%= max == 40 %>" />
+			<aui:option label="50" selected="<%= max == 50 %>" />
+			<aui:option label="60" selected="<%= max == 60 %>" />
+			<aui:option label="70" selected="<%= max == 70 %>" />
+			<aui:option label="80" selected="<%= max == 80 %>" />
+			<aui:option label="90" selected="<%= max == 90 %>" />
+			<aui:option label="100" selected="<%= max == 100 %>" />
+		</aui:select>
+
+		<c:if test="<%= PortalUtil.isRSSFeedsEnabled() %>">
+			<liferay-ui:rss-settings
+				delta="<%= rssDelta %>"
+				displayStyle="<%= rssDisplayStyle %>"
+				enabled="<%= enableRSS %>"
+				feedType="<%= rssFeedType %>"
+			/>
+		</c:if>
+
+		<aui:input name="preferences--showTags--" type="checkbox" value="<%= showTags %>" />
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />removeOrganization() {
+		document.<portlet:namespace />fm.<portlet:namespace />organizationId.value = "";
+
+		document.getElementById('<portlet:namespace />organizationName').value = "";
+
+		Liferay.Util.toggleDisabled('#<portlet:namespace />removeOrganizationButton', true);
+	}
+</aui:script>
+
+<aui:script use="aui-base">
+	A.one('#<portlet:namespace />selectOrganizationButton').on(
+		'click',
+		function(event) {
+			Liferay.Util.selectEntity(
+				{
+					dialog: {
+						constrain: true,
+						modal: true
+					},
+					id: '<portlet:namespace />selectOrganization',
+					title: '<liferay-ui:message arguments="organization" key="select-x" />',
+					uri: '<portlet:renderURL windowState="<%= LiferayWindowState.POP_UP.toString() %>"><portlet:param name="struts_action" value="/portlet_configuration/select_organization" /><portlet:param name="tabs1" value="organizations" /></portlet:renderURL>'
+				},
+				function(event) {
+					document.<portlet:namespace />fm.<portlet:namespace />organizationId.value = event.organizationid;
+
+					document.getElementById('<portlet:namespace />organizationName').value = event.name;
+
+					Liferay.Util.toggleDisabled('#<portlet:namespace />removeOrganizationButton', false);
+				}
+			);
+		}
+	);
+
+	var selectionMethod = A.one('#<portlet:namespace />selectionMethod');
+
+	function showHiddenFields() {
+		var usersSelectionOptions = A.one('#<portlet:namespace />usersSelectionOptions');
+
+		if (selectionMethod.val() == 'users') {
+			usersSelectionOptions.show();
+		}
+		else {
+			usersSelectionOptions.hide();
+		}
+	}
+
+	showHiddenFields();
+
+	selectionMethod.on('change', showHiddenFields);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/css/.sass-cache/main.css
new file mode 100644
index 0000000..50e7aaa
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/css/.sass-cache/main.css
@@ -0,0 +1,48 @@
+.portlet-blogs-aggregator .abstract {
+  clear: both;
+  margin-top: 1.5em;
+  margin-bottom: 1.5em; }
+.portlet-blogs-aggregator .comments {
+  margin-top: 1.5em; }
+.portlet-blogs-aggregator .entry-info {
+  line-height: 2em;
+  overflow: hidden; }
+.portlet-blogs-aggregator .entry-author {
+  background: url(@theme_image_path@/portlet/edit_guest.png) no-repeat 0 50%;
+  border-right: 1px solid #999;
+  color: #999;
+  float: left;
+  font-weight: bold;
+  margin-right: 10px;
+  padding-left: 20px;
+  padding-right: 10px; }
+.portlet-blogs-aggregator .entry-categories {
+  border-left: 1px solid #999;
+  float: left;
+  padding-left: 10px; }
+.portlet-blogs-aggregator .entry-date {
+  background: url(@theme_image_path@/common/date.png) no-repeat 0 50%;
+  color: #999;
+  float: left;
+  overflow: hidden;
+  padding-left: 25px;
+  padding-right: 10px; }
+.portlet-blogs-aggregator .entry-tags {
+  border-left: 1px solid #999;
+  overflow: hidden;
+  padding-left: 10px;
+  padding-right: 10px; }
+.portlet-blogs-aggregator .entry-title {
+  display: block;
+  font-size: 1.2em;
+  font-weight: bold;
+  margin-bottom: 0.2em; }
+.portlet-blogs-aggregator .search-container {
+  margin-top: 1.5em; }
+
+.ie .portlet-blogs-aggregator .entry-date {
+  overflow: visible;
+  white-space: nowrap; }
+.ie .portlet-blogs-aggregator .entry-info {
+  height: 1%; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/css/main.css
new file mode 100644
index 0000000..952f0c1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/css/main.css
@@ -0,0 +1,73 @@
+.portlet-blogs-aggregator {
+	.abstract {
+		clear: both;
+		margin-top: 1.5em;
+		margin-bottom: 1.5em;
+	}
+
+	.comments {
+		margin-top: 1.5em;
+	}
+
+	.entry-info {
+		line-height: 2em;
+		overflow: hidden;
+	}
+
+	.entry-author {
+		background: url(@theme_image_path@/portlet/edit_guest.png) no-repeat 0 50%;
+		border-right: 1px solid #999;
+		color: #999;
+		float: left;
+		font-weight: bold;
+		margin-right: 10px;
+		padding-left: 20px;
+		padding-right: 10px;
+	}
+
+	.entry-categories {
+		border-left: 1px solid #999;
+		float: left;
+		padding-left: 10px;
+	}
+
+	.entry-date {
+		background: url(@theme_image_path@/common/date.png) no-repeat 0 50%;
+		color: #999;
+		float: left;
+		overflow: hidden;
+		padding-left: 25px;
+		padding-right: 10px;
+	}
+
+	.entry-tags {
+		border-left: 1px solid #999;
+		overflow: hidden;
+		padding-left: 10px;
+		padding-right: 10px;
+	}
+
+	.entry-title {
+		display: block;
+		font-size: 1.2em;
+		font-weight: bold;
+		margin-bottom: 0.2em;
+	}
+
+	.search-container {
+		margin-top: 1.5em;
+	}
+}
+
+.ie {
+	.portlet-blogs-aggregator {
+		.entry-date {
+			overflow: visible;
+			white-space: nowrap;
+		}
+
+		.entry-info {
+			height: 1%;
+		}
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/error.jsp
new file mode 100644
index 0000000..2f20e1e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/error.jsp
@@ -0,0 +1,24 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/blogs_aggregator/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/init.jsp
new file mode 100644
index 0000000..f5abc8c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/init.jsp
@@ -0,0 +1,46 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.blogs.service.BlogsEntryServiceUtil" %><%@
+page import="com.liferay.portlet.blogs.service.permission.BlogsEntryPermission" %><%@
+page import="com.liferay.util.RSSUtil" %>
+
+<%
+String selectionMethod = portletPreferences.getValue("selectionMethod", "users");
+long organizationId = GetterUtil.getLong(portletPreferences.getValue("organizationId", "0"));
+String displayStyle = portletPreferences.getValue("displayStyle", "abstract");
+int max = GetterUtil.getInteger(portletPreferences.getValue("max", "20"));
+boolean showTags = GetterUtil.getBoolean(portletPreferences.getValue("showTags", null), true);
+
+boolean enableRSS = !PortalUtil.isRSSFeedsEnabled() ? false : GetterUtil.getBoolean(portletPreferences.getValue("enableRss", null), true);
+int rssDelta = GetterUtil.getInteger(portletPreferences.getValue("rssDelta", StringPool.BLANK), SearchContainer.DEFAULT_DELTA);
+String rssDisplayStyle = portletPreferences.getValue("rssDisplayStyle", RSSUtil.DISPLAY_STYLE_DEFAULT);
+String rssFeedType = portletPreferences.getValue("rssFeedType", RSSUtil.FEED_TYPE_DEFAULT);
+
+if (organizationId == 0) {
+	Group group = GroupLocalServiceUtil.getGroup(scopeGroupId);
+
+	if (group.isOrganization()) {
+		organizationId = group.getOrganizationId();
+	}
+}
+
+Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(locale, timeZone);
+%>
+
+<%@ include file="/html/portlet/blogs_aggregator/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/view.jsp
new file mode 100644
index 0000000..2db1e85
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/view.jsp
@@ -0,0 +1,55 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/blogs_aggregator/init.jsp" %>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/blogs_aggregator/view");
+
+SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, 5, portletURL, null, null);
+
+List entries = null;
+
+if (selectionMethod.equals("users")) {
+	if (organizationId > 0) {
+		entries = BlogsEntryServiceUtil.getOrganizationEntries(organizationId, new Date(), WorkflowConstants.STATUS_APPROVED, max);
+	}
+	else {
+		entries = BlogsEntryServiceUtil.getGroupsEntries(company.getCompanyId(), scopeGroupId, new Date(), WorkflowConstants.STATUS_APPROVED, max);
+	}
+}
+else {
+	entries = BlogsEntryServiceUtil.getGroupEntries(scopeGroupId, new Date(), WorkflowConstants.STATUS_APPROVED, max);
+}
+
+int total = entries.size();
+
+searchContainer.setTotal(total);
+
+List results = ListUtil.subList(entries, searchContainer.getStart(), searchContainer.getEnd());
+
+searchContainer.setResults(results);
+%>
+
+<%@ include file="/html/portlet/blogs_aggregator/view_entries.jspf" %>
+
+<c:if test="<%= windowState.equals(WindowState.MAXIMIZED) %>">
+	<aui:script>
+		Liferay.Util.focusFormField(document.<portlet:namespace />fm1.<portlet:namespace />keywords);
+	</aui:script>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/view_entries.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/view_entries.jspf
new file mode 100644
index 0000000..4ae1700
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/view_entries.jspf
@@ -0,0 +1,78 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<c:choose>
+	<c:when test="<%= results.isEmpty() %>">
+		<liferay-ui:message key="there-are-no-blogs" />
+
+		<br /><br />
+	</c:when>
+	<c:otherwise>
+
+		<%
+		for (int i = 0; i < results.size(); i++) {
+			BlogsEntry entry = (BlogsEntry)results.get(i);
+
+			if (entry.getDisplayDate().after(new Date())) {
+				searchContainer.setTotal(searchContainer.getTotal() - 1);
+
+				continue;
+			}
+		%>
+
+			<%@ include file="/html/portlet/blogs_aggregator/view_entry_content.jspf" %>
+
+		<%
+		}
+		%>
+
+	</c:otherwise>
+</c:choose>
+
+<c:if test="<%= enableRSS %>">
+
+	<%
+	StringBundler rssURLParams = new StringBundler();
+
+	if (selectionMethod.equals("users")) {
+		if (organizationId > 0) {
+			rssURLParams.append("&organizationId=");
+			rssURLParams.append(organizationId);
+		}
+		else {
+			rssURLParams.append("&companyId=");
+			rssURLParams.append(company.getCompanyId());
+		}
+	}
+	else {
+		rssURLParams.append("&groupId=");
+		rssURLParams.append(themeDisplay.getScopeGroupId());
+	}
+	%>
+
+	<liferay-ui:rss
+		delta="<%= rssDelta %>"
+		displayStyle="<%= rssDisplayStyle %>"
+		feedType="<%= rssFeedType %>"
+		url='<%= themeDisplay.getPathMain() + "/blogs_aggregator/rss?p_l_id=" + plid + rssURLParams %>'
+	/>
+</c:if>
+
+<c:if test="<%= !results.isEmpty() %>">
+	<div class="search-container">
+		<liferay-ui:search-paginator searchContainer="<%= searchContainer %>" />
+	</div>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/view_entry_content.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/view_entry_content.jspf
new file mode 100644
index 0000000..f2e0b8c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/blogs_aggregator/view_entry_content.jspf
@@ -0,0 +1,133 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<c:if test="<%= BlogsEntryPermission.contains(permissionChecker, entry, ActionKeys.VIEW) %>">
+	<div class="entry-content">
+
+		<%
+		PortletURL showBlogEntryURL = renderResponse.createRenderURL();
+
+		showBlogEntryURL.setParameter("struts_action", "/blogs_aggregator/view_entry");
+		showBlogEntryURL.setParameter("entryId", String.valueOf(entry.getEntryId()));
+
+		StringBundler sb = new StringBundler(8);
+
+		sb.append(themeDisplay.getPathMain());
+		sb.append("/blogs/find_entry?noSuchEntryRedirect=");
+		sb.append(HttpUtil.encodeURL(showBlogEntryURL.toString()));
+		sb.append("&entryId=");
+		sb.append(entry.getEntryId());
+
+		String viewEntryURL = sb.toString();
+
+		sb.append("&showAllEntries=1");
+
+		String viewAllEntriesURL = sb.toString();
+		%>
+
+		<c:if test='<%= !displayStyle.endsWith("-without-title") %>'>
+			<div class="entry-info">
+				<span class="entry-title"><a href="<%= viewEntryURL %>"><%= HtmlUtil.escape(entry.getTitle()) %></a></span>
+
+				<span class="entry-author"><liferay-ui:message key="written-by" /> <a href="<%= viewAllEntriesURL %>"><%= HtmlUtil.escape(PortalUtil.getUserName(entry)) %></a>,</span>
+
+				<span class="entry-date"><liferay-ui:message key="on-date" /> <%= dateFormatDateTime.format(entry.getDisplayDate()) %></span>
+
+				<span class="entry-categories">
+					<liferay-ui:asset-categories-summary
+						className="<%= BlogsEntry.class.getName() %>"
+						classPK="<%= entry.getEntryId() %>"
+					/>
+				</span>
+
+				<c:if test="<%= showTags %>">
+					<span class="entry-tags">
+						<liferay-ui:asset-tags-summary
+							className="<%= BlogsEntry.class.getName() %>"
+							classPK="<%= entry.getEntryId() %>"
+						/>
+					</span>
+				</c:if>
+			</div>
+		</c:if>
+	</div>
+
+	<c:if test='<%= !displayStyle.equals("title") %>'>
+		<div class="abstract">
+			<c:if test='<%= displayStyle.endsWith("-image") %>'>
+
+				<%
+				User user2 = UserLocalServiceUtil.fetchUserById(entry.getUserId());
+
+				String portraitUrl = null;
+
+				if (user2 != null) {
+					portraitUrl = user2.getPortraitURL(themeDisplay);
+				}
+				else {
+					portraitUrl = UserConstants.getPortraitURL(themeDisplay.getPathImage(), true, 0);
+				}
+				%>
+
+				<a href="<%= viewAllEntriesURL %>"><img align="left" border="0" hspace="0" src="<%= portraitUrl %>" width="65" /></a>
+			</c:if>
+			<c:choose>
+				<c:when test='<%= displayStyle.startsWith("abstract") %>'>
+					<%= StringUtil.shorten(HtmlUtil.stripHtml(entry.getDescription()), 200, StringPool.BLANK) %>
+
+					<c:if test="<%= entry.isSmallImage() %>">
+						<div class="asset-small-image">
+							<img alt="" class="asset-small-image" src="<%= HtmlUtil.escape(entry.getEntryImageURL(themeDisplay)) %>" width="150" />
+						</div>
+					</c:if>
+
+				</c:when>
+				<c:when test='<%= displayStyle.startsWith("quote") %>'>
+					<span class="quote">
+						<a href="<%= viewAllEntriesURL %>">
+							&quot;<%= StringUtil.shorten(StringUtil.trim(HtmlUtil.stripHtml(entry.getContent())), 100, StringPool.BLANK) + StringPool.TRIPLE_PERIOD %> &quot;
+
+							<span class="nobreak"><liferay-ui:message arguments='<%= new Object[] {"hide-accessible", HtmlUtil.escape(entry.getTitle())} %>' key="read-more-x-about-x" /> &raquo;</span>
+						</a>
+					</span>
+				</c:when>
+				<c:otherwise>
+					<%= entry.getContent() %>
+				</c:otherwise>
+			</c:choose>
+		</div>
+
+		<div class="comments">
+			<c:choose>
+				<c:when test='<%= displayStyle.startsWith("abstract") %>'>
+					<a href="<%= viewEntryURL %>"><liferay-ui:message arguments='<%= new Object[] {"hide-accessible", HtmlUtil.escape(entry.getTitle())} %>' key="read-more-x-about-x" /> &raquo;</a>
+				</c:when>
+				<c:when test='<%= !displayStyle.startsWith("quote") %>'>
+
+					<%
+					long classNameId = PortalUtil.getClassNameId(BlogsEntry.class.getName());
+
+					int messagesCount = MBMessageLocalServiceUtil.getDiscussionMessagesCount(classNameId, entry.getEntryId(), WorkflowConstants.STATUS_APPROVED);
+					%>
+
+					<a href="<%= PropsValues.PORTLET_URL_ANCHOR_ENABLE ? viewEntryURL : viewEntryURL + "#blogsCommentsPanelContainer" %>"><%= messagesCount %> <liferay-ui:message key='<%= (messagesCount == 1) ? "comment" : "comments" %>' /></a>
+				</c:when>
+			</c:choose>
+		</div>
+	</c:if>
+
+	<div class="separator"><!-- --></div>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/asset/folder_full_content.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/asset/folder_full_content.jsp
new file mode 100644
index 0000000..a2dca7d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/asset/folder_full_content.jsp
@@ -0,0 +1,68 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/bookmarks/init.jsp" %>
+
+<%
+BookmarksFolder folder = (BookmarksFolder)request.getAttribute(WebKeys.BOOKMARKS_FOLDER);
+%>
+
+<c:if test="<%= folder != null %>">
+
+	<%
+	int status = WorkflowConstants.STATUS_APPROVED;
+
+	if (permissionChecker.isCompanyAdmin() || permissionChecker.isGroupAdmin(scopeGroupId)) {
+		status = WorkflowConstants.STATUS_ANY;
+	}
+
+	int foldersCount = BookmarksFolderServiceUtil.getFoldersCount(scopeGroupId, folder.getFolderId(), status);
+	int entriesCount = BookmarksEntryServiceUtil.getEntriesCount(scopeGroupId, folder.getFolderId(), status);
+	%>
+
+	<aui:row>
+		<aui:col cssClass="lfr-asset-column lfr-asset-column-details" width="100">
+			<c:if test="<%= Validator.isNotNull(folder.getDescription()) %>">
+				<div class="lfr-asset-description">
+					<%= HtmlUtil.escape(folder.getDescription()) %>
+				</div>
+			</c:if>
+
+			<div class="lfr-asset-metadata">
+				<div class="lfr-asset-icon lfr-asset-date">
+					<%= LanguageUtil.format(pageContext, "last-updated-x", dateFormatDate.format(folder.getModifiedDate())) %>
+				</div>
+
+				<div class="lfr-asset-icon lfr-asset-subfolders">
+					<%= foldersCount %> <liferay-ui:message key='<%= (foldersCount == 1) ? "subfolder" : "subfolders" %>' />
+				</div>
+
+				<div class="lfr-asset-icon lfr-asset-items last">
+					<%= entriesCount %> <liferay-ui:message key='<%= (entriesCount == 1) ? "bookmark" : "bookmarks" %>' />
+				</div>
+			</div>
+
+			<liferay-ui:custom-attributes-available className="<%= BookmarksFolder.class.getName() %>">
+				<liferay-ui:custom-attribute-list
+					className="<%= BookmarksFolder.class.getName() %>"
+					classPK="<%= (folder != null) ? folder.getFolderId() : 0 %>"
+					editable="<%= false %>"
+					label="<%= true %>"
+				/>
+			</liferay-ui:custom-attributes-available>
+		</aui:col>
+	</aui:row>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/asset/full_content.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/asset/full_content.jsp
new file mode 100644
index 0000000..c13dbfa
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/asset/full_content.jsp
@@ -0,0 +1,34 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/bookmarks/init.jsp" %>
+
+<%
+BookmarksEntry entry = (BookmarksEntry)request.getAttribute(WebKeys.BOOKMARKS_ENTRY);
+%>
+
+<aui:a href='<%= themeDisplay.getPathMain() + "/bookmarks/open_entry?entryId=" + entry.getEntryId() + (portletName.equals(PortletKeys.TRASH) ? "&status=" + WorkflowConstants.STATUS_IN_TRASH : StringPool.BLANK) %>' target="_blank"><%= HtmlUtil.escape(entry.getName()) %> (<%= HtmlUtil.escape(entry.getUrl()) %>)</aui:a>
+
+<p class="asset-description"><%= HtmlUtil.escape(entry.getDescription()) %></p>
+
+<liferay-ui:custom-attributes-available className="<%= BookmarksEntry.class.getName() %>">
+	<liferay-ui:custom-attribute-list
+		className="<%= BookmarksEntry.class.getName() %>"
+		classPK="<%= (entry != null) ? entry.getEntryId() : 0 %>"
+		editable="<%= false %>"
+		label="<%= true %>"
+	/>
+</liferay-ui:custom-attributes-available>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/cast_result.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/cast_result.jspf
new file mode 100644
index 0000000..7f40791
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/cast_result.jspf
@@ -0,0 +1,28 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+BookmarksEntry entry = null;
+
+if (result instanceof AssetEntry) {
+	AssetEntry assetEntry = (AssetEntry)result;
+
+	entry = BookmarksEntryServiceUtil.getEntry(assetEntry.getClassPK());
+}
+else {
+	entry = (BookmarksEntry)result;
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/configuration.jsp
new file mode 100644
index 0000000..f0c77bf
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/configuration.jsp
@@ -0,0 +1,237 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/bookmarks/init.jsp" %>
+
+<%
+String tabs2 = ParamUtil.getString(request, "tabs2", "display-settings");
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+String emailFromName = ParamUtil.getString(request, "preferences--emailFromName--", BookmarksUtil.getEmailFromName(portletPreferences, company.getCompanyId()));
+String emailFromAddress = ParamUtil.getString(request, "preferences--emailFromAddress--", BookmarksUtil.getEmailFromAddress(portletPreferences, company.getCompanyId()));
+
+boolean emailEntryAddedEnabled = ParamUtil.getBoolean(request, "preferences--emailEntryAddedEnabled--", BookmarksUtil.getEmailEntryAddedEnabled(portletPreferences));
+boolean emailEntryUpdatedEnabled = ParamUtil.getBoolean(request, "preferences--emailEntryUpdatedEnabled--", BookmarksUtil.getEmailEntryUpdatedEnabled(portletPreferences));
+
+String emailParam = StringPool.BLANK;
+String defaultEmailSubject = StringPool.BLANK;
+String defaultEmailBody = StringPool.BLANK;
+
+if (tabs2.equals("entry-added-email")) {
+	emailParam = "emailEntryAdded";
+	defaultEmailSubject = ContentUtil.get(PropsValues.BOOKMARKS_EMAIL_ENTRY_ADDED_SUBJECT);
+	defaultEmailBody = ContentUtil.get(PropsValues.BOOKMARKS_EMAIL_ENTRY_ADDED_BODY);
+}
+else if (tabs2.equals("entry-updated-email")) {
+	emailParam = "emailEntryUpdated";
+	defaultEmailSubject = ContentUtil.get(PropsValues.BOOKMARKS_EMAIL_ENTRY_UPDATED_SUBJECT);
+	defaultEmailBody = ContentUtil.get(PropsValues.BOOKMARKS_EMAIL_ENTRY_UPDATED_BODY);
+}
+
+String currentLanguageId = LanguageUtil.getLanguageId(request);
+
+String emailSubjectParam = emailParam + "Subject_" + currentLanguageId;
+String emailBodyParam = emailParam + "Body_" + currentLanguageId;
+
+String emailSubject = PrefsParamUtil.getString(portletPreferences, request, emailSubjectParam, defaultEmailSubject);
+String emailBody = PrefsParamUtil.getString(portletPreferences, request, emailBodyParam, defaultEmailBody);
+%>
+
+<liferay-portlet:renderURL portletConfiguration="true" var="portletURL">
+	<portlet:param name="tabs2" value="<%= tabs2 %>" />
+	<portlet:param name="redirect" value="<%= redirect %>" />
+</liferay-portlet:renderURL>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveConfiguration();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+
+	<liferay-ui:tabs
+		names="display-settings,email-from,entry-added-email,entry-updated-email"
+		param="tabs2"
+		url="<%= portletURL %>"
+	/>
+
+	<liferay-ui:error key="emailFromAddress" message="please-enter-a-valid-email-address" />
+	<liferay-ui:error key="emailFromName" message="please-enter-a-valid-name" />
+	<liferay-ui:error key="emailEntryAddedBody" message="please-enter-a-valid-body" />
+	<liferay-ui:error key="emailEntryAddedSignature" message="please-enter-a-valid-signature" />
+	<liferay-ui:error key="emailEntryAddedSubject" message="please-enter-a-valid-subject" />
+	<liferay-ui:error key="emailEntryUpdatedBody" message="please-enter-a-valid-body" />
+	<liferay-ui:error key="emailEntryUpdatedSignature" message="please-enter-a-valid-signature" />
+	<liferay-ui:error key="emailEntryUpdatedSubject" message="please-enter-a-valid-subject" />
+	<liferay-ui:error key="rootFolderId" message="please-enter-a-valid-root-folder" />
+
+	<c:choose>
+		<c:when test='<%= tabs2.equals("email-from") %>'>
+			<aui:fieldset>
+				<aui:input cssClass="lfr-input-text-container" label="name" name="preferences--emailFromName--" value="<%= emailFromName %>" />
+
+				<aui:input cssClass="lfr-input-text-container" label="address" name="preferences--emailFromAddress--" value="<%= emailFromAddress %>" />
+			</aui:fieldset>
+		</c:when>
+		<c:when test='<%= tabs2.startsWith("entry-") %>'>
+			<aui:fieldset>
+				<c:choose>
+					<c:when test='<%= tabs2.equals("entry-added-email") %>'>
+						<aui:input label="enabled" name="preferences--emailEntryAddedEnabled--" type="checkbox" value="<%= emailEntryAddedEnabled %>" />
+					</c:when>
+					<c:when test='<%= tabs2.equals("entry-updated-email") %>'>
+						<aui:input label="enabled" name="preferences--emailEntryUpdatedEnabled--" type="checkbox" value="<%= emailEntryUpdatedEnabled %>" />
+					</c:when>
+				</c:choose>
+
+				<aui:select label="language" name="languageId" onChange='<%= renderResponse.getNamespace() + "updateLanguage(this);" %>'>
+
+					<%
+					Locale[] locales = LanguageUtil.getAvailableLocales(themeDisplay.getSiteGroupId());
+
+					for (int i = 0; i < locales.length; i++) {
+						String style = StringPool.BLANK;
+
+						if (Validator.isNotNull(portletPreferences.getValue(emailParam + "Subject_" + LocaleUtil.toLanguageId(locales[i]), StringPool.BLANK)) ||
+							Validator.isNotNull(portletPreferences.getValue(emailParam + "Body_" + LocaleUtil.toLanguageId(locales[i]), StringPool.BLANK))) {
+
+							style = "font-weight: bold;";
+						}
+					%>
+
+						<aui:option label="<%= locales[i].getDisplayName(locale) %>" selected="<%= currentLanguageId.equals(LocaleUtil.toLanguageId(locales[i])) %>" style="<%= style %>" value="<%= LocaleUtil.toLanguageId(locales[i]) %>" />
+
+					<%
+					}
+					%>
+
+				</aui:select>
+
+				<aui:input cssClass="lfr-input-text-container" label="subject" name='<%= "preferences--" + emailSubjectParam + "--" %>' value="<%= emailSubject %>" />
+
+				<aui:field-wrapper label="body">
+					<liferay-ui:input-editor editorImpl="<%= EDITOR_WYSIWYG_IMPL_KEY %>" />
+
+					<aui:input name='<%= "preferences--" + emailBodyParam + "--" %>' type="hidden" />
+				</aui:field-wrapper>
+			</aui:fieldset>
+
+			<div class="definition-of-terms">
+				<h4><liferay-ui:message key="definition-of-terms" /></h4>
+
+				<dl>
+					<dt>
+						[$BOOKMARKS_ENTRY_USER_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-user-who-added-the-bookmark-entry" />
+					</dd>
+					<dt>
+						[$BOOKMARKS_ENTRY_STATUS_BY_USER_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-user-who-updated-the-bookmark-entry" />
+					</dd>
+					<dt>
+						[$BOOKMARKS_ENTRY_URL$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-bookmark-entry-url" />
+					</dd>
+					<dt>
+						[$FROM_ADDRESS$]
+					</dt>
+					<dd>
+						<%= HtmlUtil.escape(emailFromAddress) %>
+					</dd>
+					<dt>
+						[$FROM_NAME$]
+					</dt>
+					<dd>
+						<%= HtmlUtil.escape(emailFromName) %>
+					</dd>
+					<dt>
+						[$PORTAL_URL$]
+					</dt>
+					<dd>
+						<%= company.getVirtualHostname() %>
+					</dd>
+					<dt>
+						[$PORTLET_NAME$]
+					</dt>
+					<dd>
+						<%= PortalUtil.getPortletTitle(renderResponse) %>
+					</dd>
+					<dt>
+						[$TO_ADDRESS$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-address-of-the-email-recipient" />
+					</dd>
+					<dt>
+						[$TO_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-name-of-the-email-recipient" />
+					</dd>
+				</dl>
+			</div>
+		</c:when>
+		<c:when test='<%= tabs2.equals("display-settings") %>'>
+			<%@ include file="/html/portlet/bookmarks/display_settings.jspf" %>
+		</c:when>
+	</c:choose>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />initEditor() {
+		return "<%= UnicodeFormatter.toString(emailBody) %>";
+	}
+
+	function <portlet:namespace />updateLanguage() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = '';
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />saveConfiguration',
+		function() {
+			<c:choose>
+				<c:when test='<%= tabs2.equals("display-settings") %>'>
+					document.<portlet:namespace />fm.<portlet:namespace />folderColumns.value = Liferay.Util.listSelect(document.<portlet:namespace />fm.<portlet:namespace />currentFolderColumns);
+					document.<portlet:namespace />fm.<portlet:namespace />entryColumns.value = Liferay.Util.listSelect(document.<portlet:namespace />fm.<portlet:namespace />currentEntryColumns);
+				</c:when>
+				<c:when test='<%= tabs2.startsWith("entry-") %>'>
+					document.<portlet:namespace />fm.<portlet:namespace /><%= emailBodyParam %>.value = window.<portlet:namespace />editor.getHTML();
+				</c:when>
+			</c:choose>
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
+
+<%!
+public static final String EDITOR_WYSIWYG_IMPL_KEY = "editor.wysiwyg.portal-web.docroot.html.portlet.bookmarks.configuration.jsp";
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/css/.sass-cache/main.css
new file mode 100644
index 0000000..fff990e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/css/.sass-cache/main.css
@@ -0,0 +1,10 @@
+.portlet-bookmarks .lfr-asset-url {
+  margin: 1em 0 0.3em; }
+.portlet-bookmarks .lfr-asset-url, .portlet-bookmarks .row-url {
+  word-break: break-all; }
+.portlet-bookmarks .folder-search {
+  float: right;
+  margin: 0 0 0.5em 0.5em; }
+.portlet-bookmarks .lfr-panel-content {
+  overflow: auto; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/css/main.css
new file mode 100644
index 0000000..fc7212e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/css/main.css
@@ -0,0 +1,18 @@
+.portlet-bookmarks {
+	.lfr-asset-url {
+		margin: 1em 0 0.3em;
+	}
+
+	.lfr-asset-url, .row-url {
+		word-break: break-all;
+	}
+
+	.folder-search {
+		float: right;
+		margin: 0 0 0.5em 0.5em;
+	}
+
+	.lfr-panel-content {
+		overflow: auto;
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/display_settings.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/display_settings.jspf
new file mode 100644
index 0000000..20c3c00
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/display_settings.jspf
@@ -0,0 +1,164 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<aui:input name="preferences--rootFolderId--" type="hidden" value="<%= rootFolderId %>" />
+<aui:input name="preferences--folderColumns--" type="hidden" />
+<aui:input name="preferences--entryColumns--" type="hidden" />
+
+<liferay-ui:panel-container extended="<%= true %>" id="bookmarksSettingsPanelContainer" persistState="<%= true %>">
+	<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="bookmarksFoldersListingPanel" persistState="<%= true %>" title="folders-listing">
+		<aui:fieldset>
+			<aui:field-wrapper label="root-folder">
+
+				<div class="input-append">
+					<liferay-ui:input-resource id="rootFolderName" url="<%= rootFolderName %>" />
+
+					<aui:button name="selectFolderButton" value="select" />
+
+					<%
+					String taglibRemoveFolder = "Liferay.Util.removeFolderSelection('rootFolderId', 'rootFolderName', '" + renderResponse.getNamespace() + "');";
+					%>
+
+					<aui:button disabled="<%= rootFolderId <= 0 %>" name="removeFolderButton" onClick="<%= taglibRemoveFolder %>" value="remove" />
+				</div>
+			</aui:field-wrapper>
+
+			<aui:input label="show-search" name="preferences--showFoldersSearch--" type="checkbox" value="<%= showFoldersSearch %>" />
+
+			<aui:input name="preferences--showSubfolders--" type="checkbox" value="<%= showSubfolders %>" />
+
+			<aui:input name="preferences--foldersPerPage--" size="2" type="text" value="<%= foldersPerPage %>" />
+
+			<aui:field-wrapper label="show-columns">
+
+				<%
+				Set<String> availableFolderColumns = SetUtil.fromArray(StringUtil.split(allFolderColumns));
+
+				// Left list
+
+				List leftList = new ArrayList();
+
+				for (String folderColumn : folderColumns) {
+					leftList.add(new KeyValuePair(folderColumn, LanguageUtil.get(pageContext, folderColumn)));
+				}
+
+				// Right list
+
+				List rightList = new ArrayList();
+
+				Arrays.sort(folderColumns);
+
+				for (String folderColumn : availableFolderColumns) {
+					if (Arrays.binarySearch(folderColumns, folderColumn) < 0) {
+						rightList.add(new KeyValuePair(folderColumn, LanguageUtil.get(pageContext, folderColumn)));
+					}
+				}
+
+				rightList = ListUtil.sort(rightList, new KeyValuePairComparator(false, true));
+				%>
+
+				<liferay-ui:input-move-boxes
+					leftBoxName="currentFolderColumns"
+					leftList="<%= leftList %>"
+					leftReorder="true"
+					leftTitle="current"
+					rightBoxName="availableFolderColumns"
+					rightList="<%= rightList %>"
+					rightTitle="available"
+				/>
+			</aui:field-wrapper>
+		</aui:fieldset>
+	</liferay-ui:panel>
+
+	<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="bookmarksListingPanel" persistState="<%= true %>" title="bookmarks-listing">
+		<aui:fieldset>
+			<aui:input name="preferences--enableRelatedAssets--" type="checkbox" value="<%= enableRelatedAssets %>" />
+
+			<aui:input label="documents-per-page" name="preferences--entriesPerPage--" size="2" type="text" value="<%= entriesPerPage %>" />
+
+			<aui:field-wrapper label="show-columns">
+
+				<%
+				Set<String> availableEntryColumns = SetUtil.fromArray(StringUtil.split(allEntryColumns));
+
+				// Left list
+
+				List leftList = new ArrayList();
+
+				for (int i = 0; i < entryColumns.length; i++) {
+					String entryColumn = entryColumns[i];
+
+					leftList.add(new KeyValuePair(entryColumn, LanguageUtil.get(pageContext, entryColumn)));
+				}
+
+				// Right list
+
+				List rightList = new ArrayList();
+
+				Arrays.sort(entryColumns);
+
+				for (String entryColumn : availableEntryColumns) {
+					if (Arrays.binarySearch(entryColumns, entryColumn) < 0) {
+						rightList.add(new KeyValuePair(entryColumn, LanguageUtil.get(pageContext, entryColumn)));
+					}
+				}
+
+				rightList = ListUtil.sort(rightList, new KeyValuePairComparator(false, true));
+				%>
+
+				<liferay-ui:input-move-boxes
+					leftBoxName="currentEntryColumns"
+					leftList="<%= leftList %>"
+					leftReorder="true"
+					leftTitle="current"
+					rightBoxName="availableEntryColumns"
+					rightList="<%= rightList %>"
+					rightTitle="available"
+				/>
+			</aui:field-wrapper>
+		</aui:fieldset>
+	</liferay-ui:panel>
+</liferay-ui:panel-container>
+
+<aui:script use="aui-base">
+	A.one('#<portlet:namespace />selectFolderButton').on(
+		'click',
+		function(event) {
+			Liferay.Util.selectEntity(
+				{
+					dialog: {
+						constrain: true,
+						modal: true,
+						width: 830
+					},
+					id: '<%= HtmlUtil.escapeJS(PortalUtil.getPortletNamespace(portletResource)) %>selectFolder',
+					title: '<liferay-ui:message arguments="folder" key="select-x" />',
+					uri: '<liferay-portlet:renderURL windowState="<%= LiferayWindowState.POP_UP.toString() %>" portletName="<%= portletResource %>"><portlet:param name="struts_action" value="/bookmarks/select_folder" /></liferay-portlet:renderURL>'
+				},
+				function(event) {
+					var folderData = {
+						idString: 'rootFolderId',
+						idValue: event.folderid,
+						nameString: 'rootFolderName',
+						nameValue: event.name
+					};
+
+					Liferay.Util.selectFolder(folderData, '<portlet:namespace />');
+				}
+			);
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/edit_entry.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/edit_entry.jsp
new file mode 100644
index 0000000..75c5474
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/edit_entry.jsp
@@ -0,0 +1,197 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/bookmarks/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+String backURL = ParamUtil.getString(request, "backURL");
+
+String referringPortletResource = ParamUtil.getString(request, "referringPortletResource");
+
+BookmarksEntry entry = (BookmarksEntry)request.getAttribute(WebKeys.BOOKMARKS_ENTRY);
+
+long entryId = BeanParamUtil.getLong(entry, request, "entryId");
+
+long folderId = BeanParamUtil.getLong(entry, request, "folderId");
+
+if (entry != null) {
+	BookmarksUtil.addPortletBreadcrumbEntries(entry, request, renderResponse);
+
+	if (!layout.isTypeControlPanel()) {
+		PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit"), currentURL);
+	}
+}
+else {
+	BookmarksUtil.addPortletBreadcrumbEntries(folderId, request, renderResponse);
+
+	if (!layout.isTypeControlPanel()) {
+		PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "add-bookmark"), currentURL);
+	}
+}
+
+boolean showHeader = ParamUtil.getBoolean(request, "showHeader", true);
+%>
+
+<c:if test="<%= Validator.isNull(referringPortletResource) %>">
+	<liferay-util:include page="/html/portlet/bookmarks/top_links.jsp" />
+</c:if>
+
+<portlet:actionURL var="editEntryURL">
+	<portlet:param name="struts_action" value="/bookmarks/edit_entry" />
+</portlet:actionURL>
+
+<aui:form action="<%= editEntryURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveEntry();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="backURL" type="hidden" value="<%= backURL %>" />
+	<aui:input name="referringPortletResource" type="hidden" value="<%= referringPortletResource %>" />
+	<aui:input name="entryId" type="hidden" value="<%= entryId %>" />
+	<aui:input name="folderId" type="hidden" value="<%= folderId %>" />
+
+	<c:if test="<%= showHeader %>">
+		<liferay-ui:header
+			backURL="<%= backURL %>"
+			localizeTitle="<%= (entry == null) %>"
+			title='<%= (entry == null) ? "add-bookmark" : LanguageUtil.format(pageContext, "edit-x", entry.getName()) %>'
+		/>
+	</c:if>
+
+	<liferay-ui:error exception="<%= EntryURLException.class %>" message="please-enter-a-valid-url" />
+	<liferay-ui:error exception="<%= NoSuchFolderException.class %>" message="please-enter-a-valid-folder" />
+
+	<liferay-ui:asset-categories-error />
+
+	<liferay-ui:asset-tags-error />
+
+	<aui:model-context bean="<%= entry %>" model="<%= BookmarksEntry.class %>" />
+
+	<aui:fieldset>
+		<c:if test="<%= ((entry != null) || (folderId <= 0) || Validator.isNotNull(referringPortletResource)) %>">
+			<aui:field-wrapper label="folder">
+
+				<%
+				String folderName = StringPool.BLANK;
+
+				if (folderId > 0) {
+					BookmarksFolder folder = BookmarksFolderServiceUtil.getFolder(folderId);
+
+					folderId = folder.getFolderId();
+					folderName = folder.getName();
+				}
+				%>
+
+				<div class="input-append">
+					<liferay-ui:input-resource id="folderName" url="<%= folderName %>" />
+
+					<aui:button name="selectFolderButton" value="select" />
+
+					<aui:script use="aui-base">
+						A.one('#<portlet:namespace />selectFolderButton').on(
+							'click',
+							function(event) {
+								Liferay.Util.selectEntity(
+									{
+										dialog: {
+											constrain: true,
+											modal: true,
+											width: 680
+										},
+										id: '<portlet:namespace />selectFolder',
+										title: '<liferay-ui:message arguments="folder" key="select-x" />',
+										uri: '<liferay-portlet:renderURL windowState="<%= LiferayWindowState.POP_UP.toString() %>"><portlet:param name="struts_action" value="/bookmarks/select_folder" /></liferay-portlet:renderURL>'
+									},
+									function(event) {
+										var folderData = {
+											idString: 'folderId',
+											idValue: event.folderid,
+											nameString: 'folderName',
+											nameValue: event.name
+										};
+
+										Liferay.Util.selectFolder(folderData, '<portlet:namespace />');
+									}
+								);
+							}
+						);
+					</aui:script>
+
+					<%
+					String taglibRemoveFolder = "Liferay.Util.removeFolderSelection('folderId', 'folderName', '" + renderResponse.getNamespace() + "');";
+					%>
+
+					<aui:button disabled="<%= (folderId <= 0) %>" name="removeFolderButton" onClick="<%= taglibRemoveFolder %>" value="remove" />
+				</div>
+			</aui:field-wrapper>
+		</c:if>
+
+		<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" name="name" />
+
+		<aui:input name="url" />
+
+		<aui:input name="description" />
+
+		<liferay-ui:custom-attributes-available className="<%= BookmarksEntry.class.getName() %>">
+			<liferay-ui:custom-attribute-list
+				className="<%= BookmarksEntry.class.getName() %>"
+				classPK="<%= entryId %>"
+				editable="<%= true %>"
+				label="<%= true %>"
+			/>
+		</liferay-ui:custom-attributes-available>
+
+		<c:if test="<%= entry == null %>">
+			<aui:field-wrapper label="permissions">
+				<liferay-ui:input-permissions
+					modelName="<%= BookmarksEntry.class.getName() %>"
+				/>
+			</aui:field-wrapper>
+		</c:if>
+
+		<liferay-ui:panel defaultState="closed" extended="<%= false %>" id="bookmarksEntryCategorizationPanel" persistState="<%= true %>" title="categorization">
+			<aui:input name="categories" type="assetCategories" />
+
+			<aui:input name="tags" type="assetTags" />
+		</liferay-ui:panel>
+
+		<liferay-ui:panel defaultState="closed" extended="<%= false %>" id="bookmarksEntryAssetLinksPanel" persistState="<%= true %>" title="related-assets">
+			<aui:fieldset>
+				<liferay-ui:input-asset-links
+					className="<%= BookmarksEntry.class.getName() %>"
+					classPK="<%= entryId %>"
+				/>
+			</aui:fieldset>
+		</liferay-ui:panel>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />getSuggestionsContent() {
+		return document.<portlet:namespace />fm.<portlet:namespace />name.value + ' ' + document.<portlet:namespace />fm.<portlet:namespace />description.value;
+	}
+
+	function <portlet:namespace />saveEntry() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (entry == null) ? Constants.ADD : Constants.UPDATE %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/edit_folder.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/edit_folder.jsp
new file mode 100644
index 0000000..efb6e89
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/edit_folder.jsp
@@ -0,0 +1,170 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/bookmarks/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+BookmarksFolder folder = (BookmarksFolder)request.getAttribute(WebKeys.BOOKMARKS_FOLDER);
+
+long folderId = BeanParamUtil.getLong(folder, request, "folderId");
+
+long parentFolderId = BeanParamUtil.getLong(folder, request, "parentFolderId", BookmarksFolderConstants.DEFAULT_PARENT_FOLDER_ID);
+
+boolean mergeWithParentFolderDisabled = ParamUtil.getBoolean(request, "mergeWithParentFolderDisabled");
+
+if (folder != null) {
+	BookmarksUtil.addPortletBreadcrumbEntries(folderId, request, renderResponse);
+
+	if (!layout.isTypeControlPanel()) {
+		PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit"), currentURL);
+	}
+}
+else {
+	if (parentFolderId > 0) {
+		BookmarksUtil.addPortletBreadcrumbEntries(parentFolderId, request, renderResponse);
+
+		if (!layout.isTypeControlPanel()) {
+			PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "add-subfolder"), currentURL);
+		}
+	}
+	else if (!layout.isTypeControlPanel()) {
+		PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "add-folder"), currentURL);
+	}
+}
+%>
+
+<liferay-util:include page="/html/portlet/bookmarks/top_links.jsp" />
+
+<portlet:actionURL var="editFolderURL">
+	<portlet:param name="struts_action" value="/bookmarks/edit_folder" />
+</portlet:actionURL>
+
+<aui:form action="<%= editFolderURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveFolder();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="folderId" type="hidden" value="<%= folderId %>" />
+	<aui:input name="parentFolderId" type="hidden" value="<%= parentFolderId %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		localizeTitle="<%= (folder == null) %>"
+		title='<%= (folder == null) ? ((parentFolderId > 0) ? "add-subfolder" : "add-folder") : LanguageUtil.format(pageContext, "edit-x", folder.getName()) %>'
+	/>
+
+	<liferay-ui:error exception="<%= FolderNameException.class %>" message="please-enter-a-valid-name" />
+
+	<aui:model-context bean="<%= folder %>" model="<%= BookmarksFolder.class %>" />
+
+	<aui:fieldset>
+		<c:if test="<%= folder != null %>">
+			<aui:field-wrapper label="parent-folder">
+
+				<%
+				String parentFolderName = LanguageUtil.get(pageContext, "home");
+
+				try {
+					BookmarksFolder parentFolder = BookmarksFolderServiceUtil.getFolder(parentFolderId);
+
+					parentFolderName = parentFolder.getName();
+				}
+				catch (NoSuchFolderException nsfe) {
+				}
+				%>
+
+				<div class="input-append">
+					<liferay-ui:input-resource id="parentFolderName" url="<%= parentFolderName %>" />
+
+					<aui:button name="selectFolderButton" value="select" />
+
+					<aui:script use="aui-base">
+						A.one('#<portlet:namespace />selectFolderButton').on(
+							'click',
+							function(event) {
+								Liferay.Util.selectEntity(
+									{
+										dialog: {
+											constrain: true,
+											modal: true,
+											width: 680
+										},
+										id: '<portlet:namespace />selectFolder',
+										title: '<liferay-ui:message arguments="folder" key="select-x" />',
+										uri: '<liferay-portlet:renderURL windowState="<%= LiferayWindowState.POP_UP.toString() %>"><portlet:param name="struts_action" value="/bookmarks/select_folder" /></liferay-portlet:renderURL>'
+									},
+									function(event) {
+										var folderData = {
+											idString: 'parentFolderId',
+											idValue: event.folderid,
+											nameString: 'parentFolderName',
+											nameValue: event.name
+										};
+
+										Liferay.Util.selectFolder(folderData, '<portlet:namespace />');
+									}
+								);
+							}
+						);
+					</aui:script>
+
+					<%
+					String taglibRemoveFolder = "Liferay.Util.removeFolderSelection('parentFolderId', 'parentFolderName', '" + renderResponse.getNamespace() + "');";
+					%>
+
+					<aui:button disabled="<%= (parentFolderId <= 0) %>" name="removeFolderButton" onClick="<%= taglibRemoveFolder %>" value="remove" />
+				</div>
+
+				<aui:input disabled="<%= mergeWithParentFolderDisabled %>" label="merge-with-parent-folder" name="mergeWithParentFolder" type="checkbox" />
+			</aui:field-wrapper>
+		</c:if>
+
+		<aui:input autoFocus="<%= (windowState.equals(WindowState.MAXIMIZED) || windowState.equals(LiferayWindowState.POP_UP)) %>" name="name" />
+
+		<aui:input name="description" />
+
+		<liferay-ui:custom-attributes-available className="<%= BookmarksFolder.class.getName() %>">
+			<liferay-ui:custom-attribute-list
+				className="<%= BookmarksFolder.class.getName() %>"
+				classPK="<%= (folder != null) ? folder.getFolderId() : 0 %>"
+				editable="<%= true %>"
+				label="<%= true %>"
+			/>
+		</liferay-ui:custom-attributes-available>
+
+		<c:if test="<%= folder == null %>">
+			<aui:field-wrapper label="permissions">
+				<liferay-ui:input-permissions
+					modelName="<%= BookmarksFolder.class.getName() %>"
+				/>
+			</aui:field-wrapper>
+		</c:if>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />saveFolder() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (folder == null) ? Constants.ADD : Constants.UPDATE %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/entry_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/entry_action.jsp
new file mode 100644
index 0000000..0943f08
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/entry_action.jsp
@@ -0,0 +1,130 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/bookmarks/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+BookmarksEntry entry = null;
+
+String cssClass = StringPool.BLANK;
+
+boolean view = false;
+
+if (row != null) {
+	Object result = row.getObject();
+
+	if (result instanceof AssetEntry) {
+		AssetEntry assetEntry = (AssetEntry)result;
+
+		entry = BookmarksEntryServiceUtil.getEntry(assetEntry.getClassPK());
+	}
+	else {
+		entry = (BookmarksEntry)result;
+	}
+}
+else {
+	entry = (BookmarksEntry)request.getAttribute("view_entry.jsp-entry");
+
+	cssClass = "nav nav-list unstyled well";
+
+	view = true;
+}
+%>
+
+<liferay-ui:icon-menu cssClass="<%= cssClass %>" showExpanded="<%= view %>" showWhenSingleIcon="<%= view %>">
+	<c:if test="<%= BookmarksEntryPermission.contains(permissionChecker, entry, ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/bookmarks/edit_entry" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="backURL" value="<%= currentURL %>" />
+			<portlet:param name="entryId" value="<%= String.valueOf(entry.getEntryId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= BookmarksEntryPermission.contains(permissionChecker, entry, ActionKeys.PERMISSIONS) %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= BookmarksEntry.class.getName() %>"
+			modelResourceDescription="<%= entry.getName() %>"
+			resourcePrimKey="<%= String.valueOf(entry.getEntryId()) %>"
+			var="permissionsURL"
+			windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			method="get"
+			url="<%= permissionsURL %>"
+			useDialog="<%= true %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= BookmarksEntryPermission.contains(permissionChecker, entry, ActionKeys.SUBSCRIBE) && (BookmarksUtil.getEmailEntryAddedEnabled(portletPreferences) || BookmarksUtil.getEmailEntryUpdatedEnabled(portletPreferences)) %>">
+		<c:choose>
+			<c:when test="<%= SubscriptionLocalServiceUtil.isSubscribed(user.getCompanyId(), user.getUserId(), BookmarksEntry.class.getName(), entry.getEntryId()) %>">
+				<portlet:actionURL var="unsubscribeURL">
+					<portlet:param name="struts_action" value="/bookmarks/edit_entry" />
+					<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UNSUBSCRIBE %>" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="entryId" value="<%= String.valueOf(entry.getEntryId()) %>" />
+				</portlet:actionURL>
+
+				<liferay-ui:icon
+					image="unsubscribe"
+					url="<%= unsubscribeURL %>"
+				/>
+			</c:when>
+			<c:otherwise>
+				<portlet:actionURL var="subscribeURL">
+					<portlet:param name="struts_action" value="/bookmarks/edit_entry" />
+					<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.SUBSCRIBE %>" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="entryId" value="<%= String.valueOf(entry.getEntryId()) %>" />
+				</portlet:actionURL>
+
+				<liferay-ui:icon
+					image="subscribe"
+					url="<%= subscribeURL %>"
+				/>
+			</c:otherwise>
+		</c:choose>
+	</c:if>
+
+	<c:if test="<%= BookmarksEntryPermission.contains(permissionChecker, entry, ActionKeys.DELETE) %>">
+		<portlet:renderURL var="redirectURL">
+			<portlet:param name="struts_action" value="/bookmarks/view" />
+			<portlet:param name="folderId" value="<%= String.valueOf(entry.getFolderId()) %>" />
+		</portlet:renderURL>
+
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/bookmarks/edit_entry" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= TrashUtil.isTrashEnabled(scopeGroupId) ? Constants.MOVE_TO_TRASH : Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= view ? redirectURL : currentURL %>" />
+			<portlet:param name="entryId" value="<%= String.valueOf(entry.getEntryId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete
+			trash="<%= TrashUtil.isTrashEnabled(scopeGroupId) %>"
+			url="<%= deleteURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/entry_columns.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/entry_columns.jspf
new file mode 100644
index 0000000..5d78cfe
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/entry_columns.jspf
@@ -0,0 +1,71 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+for (int j = 0; j < entryColumns.length; j++) {
+	String bookmarksEntryColumn = entryColumns[j];
+%>
+
+	<c:choose>
+		<c:when test='<%= bookmarksEntryColumn.equals("action") %>'>
+
+			<%
+			String align = SearchEntry.DEFAULT_ALIGN;
+
+			if ((j + 1) == entryColumns.length) {
+				align = "right";
+			}
+			%>
+
+			<liferay-ui:search-container-column-jsp
+				align="<%= align %>"
+				path="/html/portlet/bookmarks/entry_action.jsp"
+			/>
+		</c:when>
+		<c:when test='<%= bookmarksEntryColumn.equals("modified-date") %>'>
+			<liferay-ui:search-container-column-date
+				href="<%= rowHREF %>"
+				name="<%= bookmarksEntryColumn %>"
+				value="<%= entry.getModifiedDate() %>"
+			/>
+		</c:when>
+		<c:when test='<%= bookmarksEntryColumn.equals("name") %>'>
+			<liferay-ui:search-container-column-text
+				href="<%= rowHREF %>"
+				name="<%= bookmarksEntryColumn %>"
+				value="<%= HtmlUtil.escape(entry.getName()) %>"
+			/>
+		</c:when>
+		<c:when test='<%= bookmarksEntryColumn.equals("url") %>'>
+			<liferay-ui:search-container-column-text
+				cssClass="row-url"
+				href="<%= rowHREF %>"
+				name="<%= bookmarksEntryColumn %>"
+				value="<%= HtmlUtil.escape(entry.getUrl()) %>"
+			/>
+		</c:when>
+		<c:when test='<%= bookmarksEntryColumn.equals("visits") %>'>
+			<liferay-ui:search-container-column-text
+				href="<%= rowHREF %>"
+				name="<%= bookmarksEntryColumn %>"
+				value="<%= String.valueOf(entry.getVisits()) %>"
+			/>
+		</c:when>
+	</c:choose>
+
+<%
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/error.jsp
new file mode 100644
index 0000000..10199e7
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/error.jsp
@@ -0,0 +1,26 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/bookmarks/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= NoSuchEntryException.class %>" message="the-entry-could-not-be-found" />
+<liferay-ui:error exception="<%= NoSuchFolderException.class %>" message="the-folder-could-not-be-found" />
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/folder_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/folder_action.jsp
new file mode 100644
index 0000000..58ca852
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/folder_action.jsp
@@ -0,0 +1,174 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/bookmarks/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+BookmarksFolder folder = null;
+
+long folderId = 0;
+
+if (row != null) {
+	folder = (BookmarksFolder)row.getObject();
+
+	folderId = folder.getFolderId();
+}
+else {
+	folder = (BookmarksFolder)request.getAttribute("view.jsp-folder");
+
+	folderId = GetterUtil.getLong((String)request.getAttribute("view.jsp-folderId"));
+}
+
+String modelResource = null;
+String modelResourceDescription = null;
+String resourcePrimKey = null;
+
+boolean showPermissionsURL = false;
+
+if (folder != null) {
+	modelResource = BookmarksFolder.class.getName();
+	modelResourceDescription = folder.getName();
+	resourcePrimKey = String.valueOf(folderId);
+
+	showPermissionsURL = BookmarksFolderPermission.contains(permissionChecker, folder, ActionKeys.PERMISSIONS);
+}
+else {
+	modelResource = "com.liferay.portlet.bookmarks";
+	modelResourceDescription = themeDisplay.getScopeGroupName();
+	resourcePrimKey = String.valueOf(scopeGroupId);
+
+	showPermissionsURL = GroupPermissionUtil.contains(permissionChecker, scopeGroupId, ActionKeys.PERMISSIONS);
+}
+
+String cssClass = StringPool.BLANK;
+
+boolean view = false;
+
+if (row == null) {
+	cssClass = "nav nav-list unstyled well";
+
+	view = true;
+}
+%>
+
+<liferay-ui:icon-menu cssClass="<%= cssClass %>" showExpanded="<%= view %>" showWhenSingleIcon="<%= view %>">
+	<c:if test="<%= (folder != null) && BookmarksFolderPermission.contains(permissionChecker, folder, ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/bookmarks/edit_folder" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="folderId" value="<%= String.valueOf(folder.getFolderId()) %>" />
+			<portlet:param name="mergeWithParentFolderDisabled" value="<%= String.valueOf(row == null) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= showPermissionsURL %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= modelResource %>"
+			modelResourceDescription="<%= HtmlUtil.escape(modelResourceDescription) %>"
+			resourcePrimKey="<%= resourcePrimKey %>"
+			var="permissionsURL"
+			windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			method="get"
+			url="<%= permissionsURL %>"
+			useDialog="<%= true %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= BookmarksFolderPermission.contains(permissionChecker, scopeGroupId, folderId, ActionKeys.SUBSCRIBE) && (BookmarksUtil.getEmailEntryAddedEnabled(portletPreferences) || BookmarksUtil.getEmailEntryUpdatedEnabled(portletPreferences)) %>">
+		<c:choose>
+			<c:when test="<%= (folder == null) ? SubscriptionLocalServiceUtil.isSubscribed(user.getCompanyId(), user.getUserId(), BookmarksFolder.class.getName(), scopeGroupId) : SubscriptionLocalServiceUtil.isSubscribed(user.getCompanyId(), user.getUserId(), BookmarksFolder.class.getName(), folder.getFolderId()) %>">
+				<portlet:actionURL var="unsubscribeURL">
+					<portlet:param name="struts_action" value="/bookmarks/edit_folder" />
+					<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UNSUBSCRIBE %>" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+				</portlet:actionURL>
+
+				<liferay-ui:icon
+					image="unsubscribe"
+					url="<%= unsubscribeURL %>"
+				/>
+			</c:when>
+			<c:otherwise>
+				<portlet:actionURL var="subscribeURL">
+					<portlet:param name="struts_action" value="/bookmarks/edit_folder" />
+					<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.SUBSCRIBE %>" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+				</portlet:actionURL>
+
+				<liferay-ui:icon
+					image="subscribe"
+					url="<%= subscribeURL %>"
+				/>
+			</c:otherwise>
+		</c:choose>
+	</c:if>
+
+	<c:if test="<%= (folder != null) && BookmarksFolderPermission.contains(permissionChecker, folder, ActionKeys.DELETE) %>">
+		<portlet:renderURL var="redirectURL">
+			<portlet:param name="struts_action" value="/bookmarks/view" />
+			<portlet:param name="folderId" value="<%= String.valueOf(folder.getParentFolderId()) %>" />
+		</portlet:renderURL>
+
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/bookmarks/edit_folder" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= TrashUtil.isTrashEnabled(scopeGroupId) ? Constants.MOVE_TO_TRASH : Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= view ? redirectURL : currentURL %>" />
+			<portlet:param name="folderId" value="<%= String.valueOf(folder.getFolderId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete
+			trash="<%= TrashUtil.isTrashEnabled(scopeGroupId) %>"
+			url="<%= deleteURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= BookmarksFolderPermission.contains(permissionChecker, scopeGroupId, folderId, ActionKeys.ADD_FOLDER) %>">
+		<portlet:renderURL var="addFolderURL">
+			<portlet:param name="struts_action" value="/bookmarks/edit_folder" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="parentFolderId" value="<%= String.valueOf(folderId) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon image="add_folder" message='<%= (folder != null) ? "add-subfolder" : "add-folder" %>' url="<%= addFolderURL %>" />
+	</c:if>
+
+	<c:if test="<%= BookmarksFolderPermission.contains(permissionChecker, scopeGroupId, folderId, ActionKeys.ADD_ENTRY) %>">
+		<portlet:renderURL var="editEntryURL">
+			<portlet:param name="struts_action" value="/bookmarks/edit_entry" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="../bookmarks/add_bookmark"
+			message="add-bookmark"
+			url="<%= editEntryURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/folder_columns.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/folder_columns.jspf
new file mode 100644
index 0000000..11584aa
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/folder_columns.jspf
@@ -0,0 +1,144 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+List subfolderIds = new ArrayList();
+
+subfolderIds.add(new Long(curFolder.getFolderId()));
+
+if (ArrayUtil.contains(folderColumns, "num-of-entries") || ArrayUtil.contains(folderColumns, "num-of-folders")) {
+	BookmarksFolderServiceUtil.getSubfolderIds(subfolderIds, scopeGroupId, curFolder.getFolderId());
+}
+
+int curFoldersCount = subfolderIds.size() - 1;
+
+int curEntriesCount = 0;
+
+if (ArrayUtil.contains(folderColumns, "num-of-entries")) {
+	curEntriesCount = BookmarksEntryServiceUtil.getFoldersEntriesCount(scopeGroupId, subfolderIds);
+}
+
+for (int j = 0; j < folderColumns.length; j++) {
+	String folderColumn = folderColumns[j];
+%>
+
+	<c:choose>
+		<c:when test='<%= folderColumn.equals("action") %>'>
+
+			<%
+			String align = SearchEntry.DEFAULT_ALIGN;
+
+			if ((j + 1) == folderColumns.length) {
+				align = "right";
+			}
+			%>
+
+			<liferay-ui:search-container-column-jsp
+				align="<%= align %>"
+				path="/html/portlet/bookmarks/folder_action.jsp"
+			/>
+		</c:when>
+		<c:when test='<%= folderColumn.equals("folder") %>'>
+			<liferay-ui:search-container-column-text
+				buffer="buffer"
+				name="folder"
+			>
+
+				<%
+				buffer.append("<a href=\"");
+				buffer.append(rowURL);
+				buffer.append("\">");
+				buffer.append("<img alt=\"");
+				buffer.append(LanguageUtil.get(pageContext, "folder"));
+				buffer.append("\" class=\"label-icon\" src=\"");
+				buffer.append(themeDisplay.getPathThemeImages());
+				buffer.append("/common/folder.png\">");
+				buffer.append("<strong>");
+				buffer.append(curFolder.getName());
+				buffer.append("</strong>");
+
+				if (Validator.isNotNull(curFolder.getDescription())) {
+					buffer.append("<br />");
+					buffer.append(curFolder.getDescription());
+				}
+
+				buffer.append("</a>");
+
+				if (showSubfolders) {
+					List subfolders = BookmarksFolderServiceUtil.getFolders(scopeGroupId, curFolder.getFolderId(), 0, 5);
+
+					if (!subfolders.isEmpty()) {
+						int subfoldersCount = BookmarksFolderServiceUtil.getFoldersCount(scopeGroupId, curFolder.getFolderId());
+
+						buffer.append("<br /><u>");
+						buffer.append(LanguageUtil.get(pageContext, "subfolders"));
+						buffer.append("</u>: ");
+
+						for (int k = 0; k < subfolders.size(); k++) {
+							BookmarksFolder subfolder = (BookmarksFolder)subfolders.get(k);
+
+							subfolder = subfolder.toEscapedModel();
+
+							rowURL.setParameter("folderId", String.valueOf(subfolder.getFolderId()));
+
+							buffer.append("<a href=\"");
+							buffer.append(rowURL);
+							buffer.append("\">");
+							buffer.append(subfolder.getName());
+							buffer.append("</a>");
+
+							if ((k + 1) < subfolders.size()) {
+								buffer.append(", ");
+							}
+						}
+
+						if (subfoldersCount > subfolders.size()) {
+							rowURL.setParameter("folderId", String.valueOf(curFolder.getFolderId()));
+
+							buffer.append(", <a href=\"");
+							buffer.append(rowURL);
+							buffer.append("\">");
+							buffer.append(LanguageUtil.get(pageContext, "more"));
+							buffer.append(" &raquo;");
+							buffer.append("</a>");
+						}
+
+						rowURL.setParameter("folderId", String.valueOf(curFolder.getFolderId()));
+					}
+				}
+				%>
+
+			</liferay-ui:search-container-column-text>
+		</c:when>
+		<c:when test='<%= folderColumn.equals("num-of-entries") %>'>
+			<liferay-ui:search-container-column-text
+				href="<%= rowURL %>"
+				name="num-of-entries"
+				value="<%= String.valueOf(curEntriesCount) %>"
+			/>
+		</c:when>
+		<c:when test='<%= folderColumn.equals("num-of-folders") %>'>
+			<liferay-ui:search-container-column-text
+				href="<%= rowURL %>"
+				name="num-of-folders"
+				value="<%= String.valueOf(curFoldersCount) %>"
+			/>
+		</c:when>
+	</c:choose>
+
+<%
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/init.jsp
new file mode 100644
index 0000000..65db0cf
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/init.jsp
@@ -0,0 +1,100 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.bookmarks.EntryURLException" %><%@
+page import="com.liferay.portlet.bookmarks.FolderNameException" %><%@
+page import="com.liferay.portlet.bookmarks.NoSuchEntryException" %><%@
+page import="com.liferay.portlet.bookmarks.NoSuchFolderException" %><%@
+page import="com.liferay.portlet.bookmarks.model.BookmarksEntry" %><%@
+page import="com.liferay.portlet.bookmarks.model.BookmarksFolder" %><%@
+page import="com.liferay.portlet.bookmarks.model.BookmarksFolderConstants" %><%@
+page import="com.liferay.portlet.bookmarks.service.BookmarksEntryServiceUtil" %><%@
+page import="com.liferay.portlet.bookmarks.service.BookmarksFolderLocalServiceUtil" %><%@
+page import="com.liferay.portlet.bookmarks.service.BookmarksFolderServiceUtil" %><%@
+page import="com.liferay.portlet.bookmarks.service.permission.BookmarksEntryPermission" %><%@
+page import="com.liferay.portlet.bookmarks.service.permission.BookmarksFolderPermission" %><%@
+page import="com.liferay.portlet.bookmarks.util.BookmarksSearcher" %><%@
+page import="com.liferay.portlet.bookmarks.util.BookmarksUtil" %>
+
+<%
+PortalPreferences portalPreferences = PortletPreferencesFactoryUtil.getPortalPreferences(request);
+
+String portletResource = ParamUtil.getString(request, "portletResource");
+
+if (layout.isTypeControlPanel()) {
+	portletPreferences = PortletPreferencesLocalServiceUtil.getPreferences(themeDisplay.getCompanyId(), scopeGroupId, PortletKeys.PREFS_OWNER_TYPE_GROUP, 0, PortletKeys.BOOKMARKS, null);
+}
+
+long rootFolderId = PrefsParamUtil.getLong(portletPreferences, request, "rootFolderId", BookmarksFolderConstants.DEFAULT_PARENT_FOLDER_ID);
+String rootFolderName = StringPool.BLANK;
+
+if (rootFolderId != BookmarksFolderConstants.DEFAULT_PARENT_FOLDER_ID) {
+	try {
+		BookmarksFolder rootFolder = BookmarksFolderServiceUtil.getFolder(rootFolderId);
+
+		rootFolderName = rootFolder.getName();
+	}
+	catch (NoSuchFolderException nsfe) {
+	}
+}
+
+boolean showFoldersSearch = PrefsParamUtil.getBoolean(portletPreferences, request, "showFoldersSearch", true);
+boolean showSubfolders = PrefsParamUtil.getBoolean(portletPreferences, request, "showSubfolders", true);
+int foldersPerPage = PrefsParamUtil.getInteger(portletPreferences, request, "foldersPerPage", SearchContainer.DEFAULT_DELTA);
+
+String defaultFolderColumns = "folder,num-of-folders,num-of-entries";
+
+String portletId = portletDisplay.getId();
+
+if (portletId.equals(PortletKeys.PORTLET_CONFIGURATION)) {
+	portletId = portletResource;
+}
+
+if (portletId.equals(PortletKeys.BOOKMARKS)) {
+	defaultFolderColumns += ",action";
+}
+
+String allFolderColumns = defaultFolderColumns;
+
+String[] folderColumns = StringUtil.split(PrefsParamUtil.getString(portletPreferences, request, "folderColumns", defaultFolderColumns));
+
+if (!portletId.equals(PortletKeys.BOOKMARKS)) {
+	folderColumns = ArrayUtil.remove(folderColumns, "action");
+}
+
+boolean enableRelatedAssets = GetterUtil.getBoolean(portletPreferences.getValue("enableRelatedAssets", null), true);
+int entriesPerPage = PrefsParamUtil.getInteger(portletPreferences, request, "entriesPerPage", SearchContainer.DEFAULT_DELTA);
+
+String defaultEntryColumns = "name,url,visits,modified-date";
+
+if (portletId.equals(PortletKeys.BOOKMARKS)) {
+	defaultEntryColumns += ",action";
+}
+
+String allEntryColumns = defaultEntryColumns;
+
+String[] entryColumns = StringUtil.split(PrefsParamUtil.getString(portletPreferences, request, "entryColumns", defaultEntryColumns));
+
+if (!portletId.equals(PortletKeys.BOOKMARKS)) {
+	entryColumns = ArrayUtil.remove(entryColumns, "action");
+}
+
+Format dateFormatDate = FastDateFormatFactoryUtil.getDate(locale, timeZone);
+%>
+
+<%@ include file="/html/portlet/bookmarks/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/search.jsp
new file mode 100644
index 0000000..eb8e868
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/search.jsp
@@ -0,0 +1,211 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/bookmarks/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+long breadcrumbsFolderId = ParamUtil.getLong(request, "breadcrumbsFolderId");
+
+long searchFolderId = ParamUtil.getLong(request, "searchFolderId");
+long searchFolderIds = ParamUtil.getLong(request, "searchFolderIds");
+
+long[] folderIdsArray = null;
+
+if (searchFolderId > 0) {
+	folderIdsArray = new long[] {searchFolderId};
+}
+else {
+	List folderIds = new ArrayList();
+
+	folderIds.add(new Long(searchFolderIds));
+
+	BookmarksFolderServiceUtil.getSubfolderIds(folderIds, scopeGroupId, searchFolderIds);
+
+	folderIdsArray = StringUtil.split(StringUtil.merge(folderIds), 0L);
+}
+
+String keywords = ParamUtil.getString(request, "keywords");
+
+if (searchFolderId > 0) {
+	BookmarksUtil.addPortletBreadcrumbEntries(searchFolderId, request, renderResponse);
+}
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "search") + ": " + keywords, currentURL);
+%>
+
+<liferay-portlet:renderURL varImpl="searchURL">
+	<portlet:param name="struts_action" value="/bookmarks/search" />
+</liferay-portlet:renderURL>
+
+<aui:form action="<%= searchURL %>" method="get" name="fm">
+	<liferay-portlet:renderURLParams varImpl="searchURL" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="breadcrumbsFolderId" type="hidden" value="<%= breadcrumbsFolderId %>" />
+	<aui:input name="searchFolderId" type="hidden" value="<%= searchFolderId %>" />
+	<aui:input name="searchFolderIds" type="hidden" value="<%= searchFolderIds %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title="search"
+	/>
+
+	<%
+	PortletURL portletURL = renderResponse.createRenderURL();
+
+	portletURL.setParameter("struts_action", "/bookmarks/search");
+	portletURL.setParameter("redirect", redirect);
+	portletURL.setParameter("breadcrumbsFolderId", String.valueOf(breadcrumbsFolderId));
+	portletURL.setParameter("searchFolderId", String.valueOf(searchFolderId));
+	portletURL.setParameter("searchFolderIds", String.valueOf(searchFolderIds));
+	portletURL.setParameter("keywords", keywords);
+	%>
+
+	<liferay-ui:search-container
+		emptyResultsMessage='<%= LanguageUtil.format(pageContext, "no-entries-were-found-that-matched-the-keywords-x", "<strong>" + HtmlUtil.escape(keywords) + "</strong>") %>'
+		iteratorURL="<%= portletURL %>"
+	>
+
+		<%
+		Indexer indexer = BookmarksSearcher.getInstance();
+
+		SearchContext searchContext = SearchContextFactory.getInstance(request);
+
+		searchContext.setAttribute("paginationType", "more");
+		searchContext.setEnd(searchContainer.getEnd());
+		searchContext.setFolderIds(folderIdsArray);
+		searchContext.setKeywords(keywords);
+		searchContext.setStart(searchContainer.getStart());
+
+		Hits hits = indexer.search(searchContext);
+
+		searchContainer.setTotal(hits.getLength());
+		%>
+
+		<liferay-ui:search-container-results
+			results="<%= BookmarksUtil.getEntries(hits) %>"
+		/>
+
+		<liferay-ui:search-container-row
+			className="Object"
+			modelVar="obj"
+		>
+
+			<c:choose>
+				<c:when test="<%= obj instanceof BookmarksEntry %>">
+
+					<%
+					BookmarksEntry entry = (BookmarksEntry)obj;
+
+					entry = entry.toEscapedModel();
+
+					BookmarksFolder folder = entry.getFolder();
+
+					String rowHREF = themeDisplay.getPathMain().concat("/bookmarks/open_entry?entryId=").concat(String.valueOf(entry.getEntryId()));
+					%>
+
+					<liferay-ui:search-container-column-text
+						name="entry"
+						title="<%= entry.getDescription() %>"
+					>
+						<liferay-ui:icon
+							image="../ratings/star_hover"
+							label="<%= true %>"
+							message="<%= entry.getName() %>"
+							target="_blank"
+							url="<%= rowHREF %>"
+						/>
+					</liferay-ui:search-container-column-text>
+
+					<liferay-ui:search-container-column-text
+						href="<%= rowHREF %>"
+						name="type"
+						target="_blank"
+						title="<%= entry.getDescription() %>"
+						value='<%= LanguageUtil.get(locale, "entry") %>'
+					/>
+
+					<liferay-ui:search-container-column-text
+						href="<%= rowHREF %>"
+						name="folder"
+						target="_blank"
+						title="<%= entry.getDescription() %>"
+						value="<%= folder.getName() %>"
+					/>
+
+					<c:if test='<%= ArrayUtil.contains(entryColumns, "action") %>'>
+						<liferay-ui:search-container-column-jsp
+							path="/html/portlet/bookmarks/entry_action.jsp"
+						/>
+					</c:if>
+				</c:when>
+				<c:when test="<%= obj instanceof BookmarksFolder %>">
+
+					<%
+					BookmarksFolder folder = (BookmarksFolder)obj;
+
+					BookmarksFolder parentFolder = folder.getParentFolder();
+					%>
+
+					<liferay-portlet:renderURL var="rowURL">
+						<portlet:param name="struts_action" value="/bookmarks/view" />
+						<portlet:param name="folderId" value="<%= String.valueOf(folder.getFolderId()) %>" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+					</liferay-portlet:renderURL>
+
+					<liferay-ui:search-container-column-text
+						name="entry"
+						title="<%= folder.getDescription() %>"
+					>
+						<liferay-ui:icon
+							image='<%= (BookmarksFolderLocalServiceUtil.getFoldersAndEntriesCount(folder.getGroupId(), folder.getFolderId(), WorkflowConstants.STATUS_ANY) > 0) ? "folder_full_document" : "folder_empty" %>'
+							label="<%= true %>"
+							message="<%= folder.getName() %>"
+							url="<%= rowURL %>"
+						/>
+					</liferay-ui:search-container-column-text>
+
+					<liferay-ui:search-container-column-text
+						href="<%= rowURL %>"
+						name="type"
+						title="<%= folder.getDescription() %>"
+						value='<%= LanguageUtil.get(locale, "folder") %>'
+					/>
+
+					<liferay-ui:search-container-column-text
+						href="<%= rowURL %>"
+						name="folder"
+						title="<%= folder.getDescription() %>"
+						value='<%= (parentFolder != null) ? parentFolder.getName() : LanguageUtil.get(locale, "home") %>'
+					/>
+
+					<c:if test='<%= ArrayUtil.contains(folderColumns, "action") %>'>
+						<liferay-ui:search-container-column-jsp
+							path="/html/portlet/bookmarks/folder_action.jsp"
+						/>
+					</c:if>
+				</c:when>
+			</c:choose>
+		</liferay-ui:search-container-row>
+
+		<div class="form-search">
+			<liferay-ui:input-search autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" placeholder='<%= LanguageUtil.get(locale, "keywords") %>' title='<%= LanguageUtil.get(locale, "search-categories") %>' />
+		</div>
+
+		<liferay-ui:search-iterator type="more" />
+	</liferay-ui:search-container>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/select_folder.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/select_folder.jsp
new file mode 100644
index 0000000..173cd42
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/select_folder.jsp
@@ -0,0 +1,151 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/bookmarks/init.jsp" %>
+
+<%
+BookmarksFolder folder = (BookmarksFolder)request.getAttribute(WebKeys.BOOKMARKS_FOLDER);
+
+long folderId = BeanParamUtil.getLong(folder, request, "folderId", BookmarksFolderConstants.DEFAULT_PARENT_FOLDER_ID);
+
+String eventName = ParamUtil.getString(request, "eventName", liferayPortletResponse.getNamespace() + "selectFolder");
+
+String folderName = LanguageUtil.get(pageContext, "home");
+
+if (folder != null) {
+	folderName = folder.getName();
+
+	BookmarksUtil.addPortletBreadcrumbEntries(folder, request, renderResponse);
+}
+%>
+
+<aui:form method="post" name="selectFolderFm">
+	<liferay-ui:header
+		title="home"
+	/>
+
+	<liferay-ui:breadcrumb showGuestGroup="<%= false %>" showLayout="<%= false %>" showParentGroups="<%= false %>" />
+
+	<%
+	PortletURL portletURL = renderResponse.createRenderURL();
+
+	portletURL.setParameter("struts_action", "/bookmarks/select_folder");
+	portletURL.setParameter("folderId", String.valueOf(folderId));
+	portletURL.setParameter("eventName", eventName);
+	%>
+
+	<br />
+
+	<liferay-ui:search-container
+		iteratorURL="<%= portletURL %>"
+		total="<%= BookmarksFolderServiceUtil.getFoldersCount(scopeGroupId, folderId) %>"
+	>
+		<liferay-ui:search-container-results
+			results="<%= BookmarksFolderServiceUtil.getFolders(scopeGroupId, folderId, searchContainer.getStart(), searchContainer.getEnd()) %>"
+		/>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portlet.bookmarks.model.BookmarksFolder"
+			modelVar="curFolder"
+		>
+
+			<portlet:renderURL var="viewFolderURL">
+				<portlet:param name="struts_action" value="/bookmarks/select_folder" />
+				<portlet:param name="folderId" value="<%= String.valueOf(curFolder.getFolderId()) %>" />
+			</portlet:renderURL>
+
+			<%
+			List<Long> subfolderIds = new ArrayList<Long>();
+
+			subfolderIds.add(curFolder.getFolderId());
+
+			BookmarksFolderServiceUtil.getSubfolderIds(subfolderIds, scopeGroupId, curFolder.getFolderId());
+
+			int foldersCount = subfolderIds.size() - 1;
+			int entriesCount = BookmarksEntryServiceUtil.getFoldersEntriesCount(scopeGroupId, subfolderIds);
+			%>
+
+			<liferay-ui:search-container-column-text
+				href="<%= viewFolderURL %>"
+				name="folder"
+				value="<%= HtmlUtil.escape(curFolder.getName()) %>"
+			/>
+
+			<liferay-ui:search-container-column-text
+				href="<%= viewFolderURL %>"
+				name="num-of-folders"
+				value="<%= String.valueOf(foldersCount) %>"
+			/>
+
+			<liferay-ui:search-container-column-text
+				href="<%= viewFolderURL %>"
+				name="num-of-entries"
+				value="<%= String.valueOf(entriesCount) %>"
+			/>
+
+			<liferay-ui:search-container-column-text>
+
+				<%
+				Map<String, Object> data = new HashMap<String, Object>();
+
+				data.put("folderid", curFolder.getFolderId());
+				data.put("name", HtmlUtil.escapeAttribute(curFolder.getName()));
+				%>
+
+				<aui:button cssClass="selector-button" data="<%= data %>" value="choose" />
+			</liferay-ui:search-container-column-text>
+		</liferay-ui:search-container-row>
+
+		<aui:button-row>
+			<c:if test="<%= BookmarksFolderPermission.contains(permissionChecker, scopeGroupId, folderId, ActionKeys.ADD_FOLDER) %>">
+				<portlet:renderURL var="editFolderURL">
+					<portlet:param name="struts_action" value="/bookmarks/edit_folder" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="parentFolderId" value="<%= String.valueOf(folderId) %>" />
+				</portlet:renderURL>
+
+				<aui:button href="<%= editFolderURL %>" value='<%= (folder == null) ? "add-folder" : "add-subfolder" %>' />
+			</c:if>
+
+			<%
+			Map<String, Object> data = new HashMap<String, Object>();
+
+			data.put("folderid", folderId);
+			data.put("name", HtmlUtil.escapeAttribute(folderName));
+			%>
+
+			<aui:button cssClass="selector-button" data="<%= data %>" value="choose-this-folder" />
+		</aui:button-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script use="aui-base">
+	var Util = Liferay.Util;
+
+	A.one('#<portlet:namespace />selectFolderFm').delegate(
+		'click',
+		function(event) {
+			var result = Util.getAttributes(event.currentTarget, 'data-');
+
+			Util.getOpener().Liferay.fire('<%= HtmlUtil.escapeJS(eventName) %>', result);
+
+			Util.getWindow().hide();
+		},
+		'.selector-button'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/top_links.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/top_links.jsp
new file mode 100644
index 0000000..a9445c4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/top_links.jsp
@@ -0,0 +1,88 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/bookmarks/init.jsp" %>
+
+<%
+String topLink = ParamUtil.getString(request, "topLink", "home");
+
+long folderId = GetterUtil.getLong((String)request.getAttribute("view.jsp-folderId"));
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("categoryId", StringPool.BLANK);
+portletURL.setParameter("tag", StringPool.BLANK);
+%>
+
+<aui:nav-bar>
+	<aui:nav>
+
+		<%
+		String label = "home";
+		boolean selected = topLink.equals(label);
+
+		portletURL.setParameter("topLink", label);
+		%>
+
+		<aui:nav-item cssClass='<%= selected ? "active" : StringPool.BLANK %>' href="<%= portletURL.toString() %>" label="<%= label %>" selected="<%= selected %>" />
+
+		<%
+		label = "recent";
+		selected = topLink.equals(label);
+
+		portletURL.setParameter("topLink", label);
+		%>
+
+		<aui:nav-item cssClass='<%= selected ? "active" : StringPool.BLANK %>' href="<%= portletURL.toString() %>" label="<%= label %>" selected="<%= selected %>" />
+
+		<c:if test="<%= themeDisplay.isSignedIn() %>">
+
+			<%
+			label = "mine";
+			selected = topLink.equals(label);
+
+			portletURL.setParameter("topLink", label);
+			%>
+
+			<aui:nav-item cssClass='<%= selected ? "active" : StringPool.BLANK %>' href="<%= portletURL.toString() %>" label="<%= label %>" selected="<%= selected %>" />
+		</c:if>
+	</aui:nav>
+
+	<c:if test="<%= showFoldersSearch %>">
+		<liferay-portlet:renderURL varImpl="searchURL">
+			<portlet:param name="struts_action" value="/bookmarks/search" />
+		</liferay-portlet:renderURL>
+
+		<aui:form action="<%= searchURL %>" method="get" name="searchFm">
+			<liferay-portlet:renderURLParams varImpl="searchURL" />
+			<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+			<aui:input name="breadcrumbsFolderId" type="hidden" value="<%= folderId %>" />
+			<aui:input name="searchFolderIds" type="hidden" value="<%= folderId %>" />
+
+			<aui:nav-bar-search cssClass="pull-right">
+				<div class="form-search">
+					<liferay-ui:input-search autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" id="keywords1" name="keywords" placeholder='<%= LanguageUtil.get(locale, "keywords") %>' />
+				</div>
+			</aui:nav-bar-search>
+		</aui:form>
+	</c:if>
+</aui:nav-bar>
+
+<c:if test="<%= layout.isTypeControlPanel() %>">
+	<div id="breadcrumb">
+		<liferay-ui:breadcrumb showCurrentGroup="<%= false %>" showCurrentPortlet="<%= false %>" showGuestGroup="<%= false %>" showLayout="<%= false %>" showPortletBreadcrumb="<%= true %>" />
+	</div>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/view.jsp
new file mode 100644
index 0000000..63500cd
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/view.jsp
@@ -0,0 +1,280 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/bookmarks/init.jsp" %>
+
+<%
+String topLink = ParamUtil.getString(request, "topLink", "home");
+
+BookmarksFolder folder = (BookmarksFolder)request.getAttribute(WebKeys.BOOKMARKS_FOLDER);
+
+long folderId = BeanParamUtil.getLong(folder, request, "folderId", rootFolderId);
+
+boolean defaultFolderView = false;
+
+if ((folder == null) && (folderId != BookmarksFolderConstants.DEFAULT_PARENT_FOLDER_ID)) {
+	defaultFolderView = true;
+}
+
+if (defaultFolderView) {
+	try {
+		folder = BookmarksFolderServiceUtil.getFolder(folderId);
+	}
+	catch (NoSuchFolderException nsfe) {
+		folderId = BookmarksFolderConstants.DEFAULT_PARENT_FOLDER_ID;
+	}
+}
+
+int foldersCount = BookmarksFolderServiceUtil.getFoldersCount(scopeGroupId, folderId);
+int entriesCount = BookmarksEntryServiceUtil.getEntriesCount(scopeGroupId, folderId);
+
+long assetCategoryId = ParamUtil.getLong(request, "categoryId");
+String assetTagName = ParamUtil.getString(request, "tag");
+
+boolean useAssetEntryQuery = (assetCategoryId > 0) || Validator.isNotNull(assetTagName);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/bookmarks/view");
+portletURL.setParameter("topLink", topLink);
+portletURL.setParameter("folderId", String.valueOf(folderId));
+
+request.setAttribute("view.jsp-folder", folder);
+
+request.setAttribute("view.jsp-folderId", String.valueOf(folderId));
+
+request.setAttribute("view.jsp-viewFolder", Boolean.TRUE.toString());
+
+request.setAttribute("view.jsp-useAssetEntryQuery", String.valueOf(useAssetEntryQuery));
+
+if (folder != null) {
+	BookmarksUtil.addPortletBreadcrumbEntries(folder, request, renderResponse);
+}
+%>
+
+<portlet:actionURL var="undoTrashURL">
+	<portlet:param name="struts_action" value="/bookmarks/edit_entry" />
+	<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.RESTORE %>" />
+</portlet:actionURL>
+
+<liferay-ui:trash-undo portletURL="<%= undoTrashURL %>" />
+
+<liferay-util:include page="/html/portlet/bookmarks/top_links.jsp" />
+
+<c:choose>
+	<c:when test="<%= useAssetEntryQuery %>">
+		<liferay-ui:categorization-filter
+			assetType="bookmarks"
+			portletURL="<%= portletURL %>"
+		/>
+
+		<%@ include file="/html/portlet/bookmarks/view_entries.jspf" %>
+
+	</c:when>
+	<c:when test='<%= topLink.equals("home") %>'>
+		<aui:row>
+			<c:if test="<%= folder != null %>">
+
+				<%
+				long parentFolderId = folder.getParentFolderId();
+				String parentFolderName = LanguageUtil.get(pageContext, "home");
+
+				if (!folder.isRoot()) {
+					BookmarksFolder parentFolder = BookmarksFolderLocalServiceUtil.getBookmarksFolder(parentFolderId);
+
+					parentFolderId = parentFolder.getFolderId();
+					parentFolderName = parentFolder.getName();
+				}
+				%>
+
+				<portlet:renderURL var="backURL">
+					<portlet:param name="struts_action" value="/bookmarks/view" />
+					<portlet:param name="folderId" value="<%= String.valueOf(parentFolderId) %>" />
+				</portlet:renderURL>
+
+				<liferay-ui:header
+					backLabel="<%= parentFolderName %>"
+					backURL="<%= backURL.toString() %>"
+					localizeTitle="<%= false %>"
+					title="<%= folder.getName() %>"
+				/>
+			</c:if>
+		</aui:row>
+
+		<aui:row>
+			<aui:col cssClass="lfr-asset-column lfr-asset-column-details" width="<%= 75 %>">
+				<liferay-ui:panel-container extended="<%= false %>" id="bookmarksInfoPanelContainer" persistState="<%= true %>">
+					<c:if test="<%= folder != null %>">
+						<div class="lfr-asset-description">
+							<%= HtmlUtil.escape(folder.getDescription()) %>
+						</div>
+
+						<div class="lfr-asset-metadata">
+							<div class="lfr-asset-icon lfr-asset-date">
+								<%= LanguageUtil.format(pageContext, "last-updated-x", dateFormatDate.format(folder.getModifiedDate())) %>
+							</div>
+
+							<div class="lfr-asset-icon lfr-asset-subfolders">
+								<%= foldersCount %> <liferay-ui:message key='<%= (foldersCount == 1) ? "subfolder" : "subfolders" %>' />
+							</div>
+
+							<div class="lfr-asset-icon lfr-asset-items last">
+								<%= entriesCount %> <liferay-ui:message key='<%= (entriesCount == 1) ? "entry" : "entries" %>' />
+							</div>
+						</div>
+
+						<liferay-ui:custom-attributes-available className="<%= BookmarksFolder.class.getName() %>">
+							<liferay-ui:custom-attribute-list
+								className="<%= BookmarksFolder.class.getName() %>"
+								classPK="<%= (folder != null) ? folder.getFolderId() : 0 %>"
+								editable="<%= false %>"
+								label="<%= true %>"
+							/>
+						</liferay-ui:custom-attributes-available>
+					</c:if>
+
+					<c:if test="<%= foldersCount > 0 %>">
+						<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="bookmarksEntriesFoldersListingPanel" persistState="<%= true %>" title='<%= (folder != null) ? "subfolders" : "folders" %>'>
+							<liferay-ui:search-container
+								curParam="cur1"
+								delta="<%= foldersPerPage %>"
+								deltaConfigurable="<%= false %>"
+								headerNames="<%= StringUtil.merge(folderColumns) %>"
+								iteratorURL="<%= portletURL %>"
+								total="<%= BookmarksFolderServiceUtil.getFoldersCount(scopeGroupId, folderId) %>"
+							>
+								<liferay-ui:search-container-results
+									results="<%= BookmarksFolderServiceUtil.getFolders(scopeGroupId, folderId, searchContainer.getStart(), searchContainer.getEnd()) %>"
+								/>
+
+								<liferay-ui:search-container-row
+									className="com.liferay.portlet.bookmarks.model.BookmarksFolder"
+									escapedModel="<%= true %>"
+									keyProperty="folderId"
+									modelVar="curFolder"
+								>
+									<liferay-portlet:renderURL varImpl="rowURL">
+										<portlet:param name="struts_action" value="/bookmarks/view" />
+										<portlet:param name="folderId" value="<%= String.valueOf(curFolder.getFolderId()) %>" />
+										<portlet:param name="redirect" value="<%= currentURL %>" />
+									</liferay-portlet:renderURL>
+
+									<%@ include file="/html/portlet/bookmarks/folder_columns.jspf" %>
+								</liferay-ui:search-container-row>
+
+								<liferay-ui:search-iterator />
+							</liferay-ui:search-container>
+						</liferay-ui:panel>
+					</c:if>
+
+					<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="bookmarksEntriesListingPanel" persistState="<%= true %>" title="bookmarks">
+						<%@ include file="/html/portlet/bookmarks/view_entries.jspf" %>
+					</liferay-ui:panel>
+				</liferay-ui:panel-container>
+			</aui:col>
+
+			<aui:col cssClass="lfr-asset-column lfr-asset-column-actions" last="<%= true %>" width="<%= 25 %>">
+				<div class="lfr-asset-summary">
+					<liferay-ui:icon
+						cssClass="lfr-asset-avatar"
+						image='<%= "../file_system/large/" + (((foldersCount + entriesCount) > 0) ? "folder_full_bookmark" : "folder_empty_bookmark") %>'
+						message='<%= (folder != null) ? HtmlUtil.escapeAttribute(folder.getName()) : "home" %>'
+					/>
+
+					<div class="lfr-asset-name">
+						<h4><%= (folder != null) ? HtmlUtil.escape(folder.getName()) : LanguageUtil.get(pageContext, "home") %></h4>
+					</div>
+				</div>
+
+				<%
+				request.removeAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+				%>
+
+				<liferay-util:include page="/html/portlet/bookmarks/folder_action.jsp" />
+			</aui:col>
+		</aui:row>
+
+		<%
+		if (!defaultFolderView && (folder != null) && portletName.equals(PortletKeys.BOOKMARKS)) {
+			PortalUtil.setPageSubtitle(folder.getName(), request);
+			PortalUtil.setPageDescription(folder.getDescription(), request);
+		}
+		%>
+
+	</c:when>
+	<c:when test='<%= topLink.equals("mine") || topLink.equals("recent") %>'>
+		<aui:row>
+			<liferay-ui:header
+				title="<%= topLink %>"
+			/>
+
+			<%
+			long groupEntriesUserId = 0;
+
+			if (topLink.equals("mine") && themeDisplay.isSignedIn()) {
+				groupEntriesUserId = user.getUserId();
+			}
+			%>
+
+			<liferay-ui:search-container
+				delta="<%= entriesPerPage %>"
+				deltaConfigurable="<%= false %>"
+				emptyResultsMessage="there-are-no-entries"
+				iteratorURL="<%= portletURL %>"
+				total="<%= BookmarksEntryServiceUtil.getGroupEntriesCount(scopeGroupId, groupEntriesUserId) %>"
+			>
+				<liferay-ui:search-container-results
+					results="<%= BookmarksEntryServiceUtil.getGroupEntries(scopeGroupId, groupEntriesUserId, searchContainer.getStart(), searchContainer.getEnd()) %>"
+				/>
+
+				<liferay-ui:search-container-row
+					className="com.liferay.portlet.bookmarks.model.BookmarksEntry"
+					escapedModel="<%= true %>"
+					keyProperty="entryId"
+					modelVar="entry"
+				>
+
+					<%
+					String rowHREF = null;
+
+					if (BookmarksEntryPermission.contains(permissionChecker, entry, ActionKeys.VIEW)) {
+						PortletURL tempRowURL = renderResponse.createRenderURL();
+
+						tempRowURL.setParameter("struts_action", "/bookmarks/view_entry");
+						tempRowURL.setParameter("redirect", currentURL);
+						tempRowURL.setParameter("entryId", String.valueOf(entry.getEntryId()));
+
+						rowHREF = tempRowURL.toString();
+					}
+					%>
+
+					<%@ include file="/html/portlet/bookmarks/entry_columns.jspf" %>
+				</liferay-ui:search-container-row>
+
+				<liferay-ui:search-iterator />
+			</liferay-ui:search-container>
+		</aui:row>
+
+		<%
+		if (!layout.isTypeControlPanel()) {
+			PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, topLink), currentURL);
+		}
+
+		PortalUtil.setPageSubtitle(LanguageUtil.get(pageContext, StringUtil.replace(topLink, StringPool.UNDERLINE, StringPool.DASH)), request);
+		%>
+
+	</c:when>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/view_entries.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/view_entries.jspf
new file mode 100644
index 0000000..6bacbbc
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/view_entries.jspf
@@ -0,0 +1,98 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+String orderByCol = ParamUtil.getString(request, "orderByCol");
+String orderByType = ParamUtil.getString(request, "orderByType");
+
+if (Validator.isNotNull(orderByCol) && Validator.isNotNull(orderByType)) {
+	portalPreferences.setValue(PortletKeys.BOOKMARKS, "entries-order-by-col", orderByCol);
+	portalPreferences.setValue(PortletKeys.BOOKMARKS, "entries-order-by-type", orderByType);
+}
+else {
+	orderByCol = portalPreferences.getValue(PortletKeys.BOOKMARKS, "entries-order-by-col", "name");
+	orderByType = portalPreferences.getValue(PortletKeys.BOOKMARKS, "entries-order-by-type", "asc");
+}
+
+OrderByComparator orderByComparator = BookmarksUtil.getEntryOrderByComparator(orderByCol, orderByType);
+%>
+
+<liferay-ui:search-container
+	curParam="cur2"
+	delta="<%= entriesPerPage %>"
+	deltaConfigurable="<%= false %>"
+	emptyResultsMessage="there-are-no-bookmarks-in-this-folder"
+	headerNames="<%= StringUtil.merge(entryColumns) %>"
+	iteratorURL="<%= portletURL %>"
+	orderByCol="<%= orderByCol %>"
+	orderByType="<%= orderByType %>"
+>
+	<liferay-ui:search-container-results>
+
+		<%
+		if (useAssetEntryQuery) {
+
+			AssetEntryQuery assetEntryQuery = new AssetEntryQuery(BookmarksEntry.class.getName(), searchContainer);
+
+			assetEntryQuery.setExcludeZeroViewCount(false);
+
+			searchContainer.setTotal(total);
+
+			assetEntryQuery.setEnd(searchContainer.getEnd());
+			assetEntryQuery.setStart(searchContainer.getStart());
+
+			results = AssetEntryServiceUtil.getEntries(assetEntryQuery);
+		}
+		else {
+			total = BookmarksEntryServiceUtil.getEntriesCount(scopeGroupId, folderId);
+
+			searchContainer.setTotal(total);
+
+			results = BookmarksEntryServiceUtil.getEntries(scopeGroupId, folderId, searchContainer.getStart(), searchContainer.getEnd(), orderByComparator);
+		}
+
+		searchContainer.setResults(results);
+		%>
+
+	</liferay-ui:search-container-results>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.BaseModel"
+		keyProperty="primaryKeyObj"
+		modelVar="result"
+	>
+
+		<%@ include file="/html/portlet/bookmarks/cast_result.jspf" %>
+
+		<%
+		String rowHREF = null;
+
+		if (BookmarksEntryPermission.contains(permissionChecker, entry, ActionKeys.VIEW)) {
+			PortletURL tempRowURL = renderResponse.createRenderURL();
+
+			tempRowURL.setParameter("struts_action", "/bookmarks/view_entry");
+			tempRowURL.setParameter("redirect", currentURL);
+			tempRowURL.setParameter("entryId", String.valueOf(entry.getEntryId()));
+
+			rowHREF = tempRowURL.toString();
+		}
+		%>
+
+		<%@ include file="/html/portlet/bookmarks/entry_columns.jspf" %>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/view_entry.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/view_entry.jsp
new file mode 100644
index 0000000..350d8bc
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/bookmarks/view_entry.jsp
@@ -0,0 +1,153 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/bookmarks/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+BookmarksEntry entry = (BookmarksEntry)request.getAttribute(WebKeys.BOOKMARKS_ENTRY);
+
+entry = entry.toEscapedModel();
+
+long entryId = entry.getEntryId();
+
+BookmarksFolder folder = entry.getFolder();
+
+AssetEntry layoutAssetEntry = AssetEntryLocalServiceUtil.getEntry(BookmarksEntry.class.getName(), entry.getEntryId());
+
+request.setAttribute(WebKeys.LAYOUT_ASSET_ENTRY, layoutAssetEntry);
+
+request.setAttribute("view_entry.jsp-entry", entry);
+
+BookmarksUtil.addPortletBreadcrumbEntries(entry, request, renderResponse);
+%>
+
+<liferay-util:include page="/html/portlet/bookmarks/top_links.jsp" />
+
+<c:choose>
+	<c:when test="<%= Validator.isNull(redirect) %>">
+		<portlet:renderURL var="backURL">
+			<portlet:param name="struts_action" value="/bookmarks/view" />
+			<portlet:param name="folderId" value="<%= (folder != null) ? String.valueOf(folder.getFolderId()) : String.valueOf(BookmarksFolderConstants.DEFAULT_PARENT_FOLDER_ID) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:header
+			backLabel='<%= (folder != null) ? folder.getName() : "home" %>'
+			backURL="<%= backURL.toString() %>"
+			escapeXml="<%= false %>"
+			localizeTitle="<%= false %>"
+			title="<%= entry.getName() %>"
+		/>
+	</c:when>
+	<c:otherwise>
+		<liferay-ui:header
+			backURL="<%= redirect %>"
+			escapeXml="<%= false %>"
+			localizeTitle="<%= false %>"
+			title="<%= entry.getName() %>"
+		/>
+	</c:otherwise>
+</c:choose>
+
+<aui:row>
+	<aui:col cssClass="lfr-asset-column lfr-asset-column-details" width="<%= 75 %>">
+		<div class="lfr-asset-categories">
+			<liferay-ui:asset-categories-summary
+				className="<%= BookmarksEntry.class.getName() %>"
+				classPK="<%= entryId %>"
+			/>
+		</div>
+
+		<div class="lfr-asset-tags">
+			<liferay-ui:asset-tags-summary
+				className="<%= BookmarksEntry.class.getName() %>"
+				classPK="<%= entryId %>"
+				message="tags"
+			/>
+		</div>
+
+		<div class="lfr-asset-url">
+			<a href="<%= themeDisplay.getPathMain() %>/bookmarks/open_entry?entryId=<%= entry.getEntryId() %>"><%= entry.getUrl() %></a>
+		</div>
+
+		<div class="lfr-asset-description">
+			<%= entry.getDescription() %>
+		</div>
+
+		<liferay-ui:custom-attributes-available className="<%= BookmarksEntry.class.getName() %>">
+			<liferay-ui:custom-attribute-list
+				className="<%= BookmarksEntry.class.getName() %>"
+				classPK="<%= entryId %>"
+				editable="<%= false %>"
+				label="<%= true %>"
+			/>
+		</liferay-ui:custom-attributes-available>
+
+		<div class="lfr-asset-metadata">
+			<div class="lfr-asset-icon lfr-asset-author">
+				<%= LanguageUtil.format(pageContext, "created-by-x", HtmlUtil.escape(PortalUtil.getUserName(entry.getUserId(), themeDisplay.getScopeGroupName()))) %>
+			</div>
+
+			<div class="lfr-asset-icon lfr-asset-date">
+				<%= dateFormatDate.format(entry.getCreateDate()) %>
+			</div>
+
+			<div class="lfr-asset-icon lfr-asset-downloads last">
+				<%= entry.getVisits() %> <liferay-ui:message key="visits" />
+			</div>
+		</div>
+
+		<c:if test="<%= enableRelatedAssets %>">
+			<div class="entry-links">
+				<liferay-ui:asset-links
+					assetEntryId="<%= layoutAssetEntry.getEntryId() %>"
+				/>
+			</div>
+		</c:if>
+
+		<div class="lfr-asset-ratings">
+			<liferay-ui:ratings
+				className="<%= BookmarksEntry.class.getName() %>"
+				classPK="<%= entryId %>"
+			/>
+		</div>
+	</aui:col>
+
+	<aui:col cssClass="lfr-asset-column lfr-asset-column-actions" last="<%= true %>" width="<%= 25 %>">
+		<div class="lfr-asset-summary">
+			<liferay-ui:icon
+				cssClass="lfr-asset-avatar"
+				image="../file_system/large/bookmark"
+				message="visit"
+				method="get"
+				url="<%= entry.getUrl() %>"
+			/>
+
+			<div class="lfr-asset-name">
+				<a href="<%= entry.getUrl() %>">
+					<%= entry.getName() %>
+				</a>
+			</div>
+		</div>
+
+		<%
+		request.removeAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+		%>
+
+		<liferay-util:include page="/html/portlet/bookmarks/entry_action.jsp" />
+	</aui:col>
+</aui:row>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/breadcrumb/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/breadcrumb/configuration.jsp
new file mode 100644
index 0000000..b2b5c70
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/breadcrumb/configuration.jsp
@@ -0,0 +1,76 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/breadcrumb/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+%>
+
+<aui:row>
+	<aui:col width="<%= 50 %>">
+		<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+		<aui:form action="<%= configurationURL %>" method="post" name="fm">
+			<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+			<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+
+			<aui:fieldset cssClass="checkBoxes">
+				<aui:col width="<%= 50 %>">
+					<aui:input label="show-current-site" name="preferences--showCurrentGroup--" type="checkbox" value="<%= showCurrentGroup %>" />
+					<aui:input label="show-current-application" name="preferences--showCurrentPortlet--" type="checkbox" value="<%= showCurrentPortlet %>" />
+					<aui:input label="show-guest-site" name="preferences--showGuestGroup--" type="checkbox" value="<%= showGuestGroup %>" />
+				</aui:col>
+
+				<aui:col width="<%= 50 %>">
+					<aui:input label="show-page" name="preferences--showLayout--" type="checkbox" value="<%= showLayout %>" />
+					<aui:input label="show-parent-sites" name="preferences--showParentGroups--" type="checkbox" value="<%= showParentGroups %>" />
+					<aui:input label="show-application-breadcrumb" name="preferences--showPortletBreadcrumb--" type="checkbox" value="<%= showPortletBreadcrumb %>" />
+				</aui:col>
+			</aui:fieldset>
+
+			<aui:button-row>
+				<aui:button type="submit" />
+			</aui:button-row>
+		</aui:form>
+	</aui:col>
+	<aui:col width="<%= 50 %>">
+		<liferay-portlet:preview
+			portletName="<%= portletResource %>"
+			queryString="struts_action=/breadcrumb/view"
+			showBorders="<%= true %>"
+		/>
+	</aui:col>
+</aui:row>
+
+<aui:script use="aui-base">
+	var formNode = A.one('#<portlet:namespace />fm');
+
+	var toggleCustomFields = function() {
+		var data = {
+			'_<%= HtmlUtil.escapeJS(portletResource) %>_showCurrentGroup': formNode.one('#<portlet:namespace />showCurrentGroup').val(),
+			'_<%= HtmlUtil.escapeJS(portletResource) %>_showCurrentPortlet': formNode.one('#<portlet:namespace />showCurrentPortlet').val(),
+			'_<%= HtmlUtil.escapeJS(portletResource) %>_showGuestGroup': formNode.one('#<portlet:namespace />showGuestGroup').val(),
+			'_<%= HtmlUtil.escapeJS(portletResource) %>_showLayout': formNode.one('#<portlet:namespace />showLayout').val(),
+			'_<%= HtmlUtil.escapeJS(portletResource) %>_showParentGroups': formNode.one('#<portlet:namespace />showParentGroups').val(),
+			'_<%= HtmlUtil.escapeJS(portletResource) %>_showPortletBreadcrumb': formNode.one('#<portlet:namespace />showPortletBreadcrumb').val()
+		};
+
+		Liferay.Portlet.refresh('#p_p_id_<%= HtmlUtil.escapeJS(portletResource) %>_', data);
+	};
+
+	A.one('.checkBoxes').delegate('change', toggleCustomFields, 'input[type="checkbox"]');
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/breadcrumb/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/breadcrumb/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/breadcrumb/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/breadcrumb/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/breadcrumb/init.jsp
new file mode 100644
index 0000000..de11adf
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/breadcrumb/init.jsp
@@ -0,0 +1,30 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%
+String portletResource = ParamUtil.getString(request, "portletResource");
+
+boolean showCurrentGroup = PrefsParamUtil.getBoolean(portletPreferences, renderRequest, "showCurrentGroup", true);
+boolean showCurrentPortlet = PrefsParamUtil.getBoolean(portletPreferences, renderRequest, "showCurrentPortlet", true);
+boolean showGuestGroup = PrefsParamUtil.getBoolean(portletPreferences, renderRequest, "showGuestGroup", PropsValues.BREADCRUMB_SHOW_GUEST_GROUP);
+boolean showLayout = PrefsParamUtil.getBoolean(portletPreferences, renderRequest, "showLayout", true);
+boolean showParentGroups = PrefsParamUtil.getBoolean(portletPreferences, renderRequest, "showParentGroups", PropsValues.BREADCRUMB_SHOW_PARENT_GROUPS);
+boolean showPortletBreadcrumb = PrefsParamUtil.getBoolean(portletPreferences, renderRequest, "showPortletBreadcrumb", true);
+%>
+
+<%@ include file="/html/portlet/breadcrumb/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/breadcrumb/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/breadcrumb/view.jsp
new file mode 100644
index 0000000..3468c52
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/breadcrumb/view.jsp
@@ -0,0 +1,26 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/breadcrumb/init.jsp" %>
+
+<liferay-ui:breadcrumb
+	showCurrentGroup="<%= showCurrentGroup %>"
+	showCurrentPortlet="<%= showCurrentPortlet %>"
+	showGuestGroup="<%= showGuestGroup %>"
+	showLayout="<%= showLayout %>"
+	showParentGroups="<%= showParentGroups %>"
+	showPortletBreadcrumb="<%= showPortletBreadcrumb %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/control_panel_home/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/control_panel_home/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/control_panel_home/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/control_panel_home/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/control_panel_home/init.jsp
new file mode 100644
index 0000000..48ec2a6
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/control_panel_home/init.jsp
@@ -0,0 +1,19 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ include file="/html/portlet/control_panel_home/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/control_panel_home/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/control_panel_home/view.jsp
new file mode 100644
index 0000000..8bf88f0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/control_panel_home/view.jsp
@@ -0,0 +1,85 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/control_panel_home/init.jsp" %>
+
+<aui:container cssClass="control-panel-home-menu">
+	<aui:row>
+
+		<%
+		Map<String, List<Portlet>> categoriesMap = PortalUtil.getControlPanelCategoriesMap(request);
+
+		for (String category : categoriesMap.keySet()) {
+			String categoryHeaderId = "control-panel-home-category-header" + category;
+		%>
+
+			<aui:col width="<%= 20 %>">
+				<h3 class="control-panel-home-category-header" id="<%= categoryHeaderId %>">
+					<aui:a href='<%= HttpUtil.setParameter(themeDisplay.getURLControlPanel(), "controlPanelCategory", category) %>'>
+						<%= LanguageUtil.get(pageContext, "category." + category) %>
+					</aui:a>
+				</h3>
+
+				<ul aria-labelledby="<%= categoryHeaderId %>" class="unstyled" role="menu">
+
+					<%
+					List<Portlet> categoryPortlets = categoriesMap.get(category);
+
+					for (Portlet categoryPortlet : categoryPortlets) {
+						String categoryPortletId = categoryPortlet.getPortletId();
+
+						String urlCategoryPortlet = HttpUtil.setParameter(themeDisplay.getURLControlPanel(), "p_p_id", categoryPortletId);
+
+						String portletDescription = PortalUtil.getPortletDescription(categoryPortlet, application, locale);
+					%>
+
+							<li role="presentation">
+								<liferay-ui:icon
+									ariaRole="menuitem"
+									cssClass="control-panel-home-link"
+									id='<%= "controlPanelPortletLink_" + categoryPortletId %>'
+									label="<%= true %>"
+									message="<%= PortalUtil.getPortletTitle(categoryPortlet, application, locale) %>"
+									src='<%= Validator.isNull(categoryPortlet.getIcon())? themeDisplay.getPathContext() + "/html/icons/default.png" : categoryPortlet.getStaticResourcePath().concat(categoryPortlet.getIcon()) %>'
+									url="<%= urlCategoryPortlet %>"
+								/>
+
+							<c:if test='<%= Validator.isNotNull(portletDescription) && !portletDescription.startsWith("javax.portlet.description") %>'>
+								<liferay-ui:icon-help message="<%= portletDescription %>" />
+							</c:if>
+						</li>
+
+					<%
+					}
+					%>
+
+				</ul>
+			</aui:col>
+
+		<%
+		}
+		%>
+
+		<c:if test="<%= categoriesMap.isEmpty() %>">
+			<div class="alert alert-info">
+				<liferay-ui:message key="you-do-not-have-permission-to-access-any-control-panel-applications" />
+			</div>
+		</c:if>
+	</aui:row>
+	<aui:row>
+		<liferay-util:include page="/html/portlet/control_panel_home/view_actions.jsp" />
+	</aui:row>
+</aui:container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/control_panel_home/view_actions.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/control_panel_home/view_actions.jsp
new file mode 100644
index 0000000..54ea0c3
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/control_panel_home/view_actions.jsp
@@ -0,0 +1,121 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/control_panel_home/init.jsp" %>
+
+<div class="control-panel-home-actions">
+
+	<%
+	Map<String, List<Portlet>> categoriesMap = PortalUtil.getControlPanelCategoriesMap(request);
+
+	for (String category : categoriesMap.keySet()) {
+	%>
+
+		<aui:col width="<%= 20 %>">
+			<div class="control-panel-home-actions-category">
+				<c:choose>
+					<c:when test="<%= category.equals(PortletCategoryKeys.APPS) %>">
+						<c:choose>
+							<c:when test="<%= PortletLocalServiceUtil.hasPortlet(themeDisplay.getCompanyId(), PortletKeys.MARKETPLACE_APP_MANAGER) %>">
+								<liferay-portlet:renderURL portletName="<%= PortletKeys.MARKETPLACE_APP_MANAGER %>" var="appManagerURL">
+									<portlet:param name="redirect" value="<%= PortalUtil.getCurrentURL(request) %>" />
+								</liferay-portlet:renderURL>
+
+								<p>
+									<liferay-ui:message key="do-you-want-to-manage-the-installed-apps" />
+								</p>
+
+								<aui:button href="<%= appManagerURL %>" id="controlPanelHomeActionManageApps" primary="<%= true %>" value="manage-apps" />
+							</c:when>
+							<c:otherwise>
+								<liferay-portlet:renderURL portletName="<%= PortletKeys.PLUGINS_ADMIN %>" var="pluginsAdminURL">
+									<portlet:param name="redirect" value="<%= PortalUtil.getCurrentURL(request) %>" />
+								</liferay-portlet:renderURL>
+
+								<p>
+									<liferay-ui:message key="do-you-want-to-manage-the-installed-apps" />
+								</p>
+
+								<aui:button href="<%= pluginsAdminURL %>" id="controlPanelHomeActionManageApps" primary="<%= true %>" value="manage-apps" />
+							</c:otherwise>
+						</c:choose>
+					</c:when>
+					<c:when test="<%= category.equals(PortletCategoryKeys.CONFIGURATION) %>">
+						<liferay-portlet:renderURL portletName="<%= PortletKeys.PORTAL_SETTINGS %>" var="editPortalSettingsURL">
+							<portlet:param name="redirect" value="<%= PortalUtil.getCurrentURL(request) %>" />
+						</liferay-portlet:renderURL>
+
+						<p>
+							<liferay-ui:message key="do-you-want-to-modify-any-settings-of-your-portal" />
+						</p>
+
+						<aui:button href="<%= editPortalSettingsURL %>" id="controlPanelHomeActionPortalSettings" primary="<%= true %>" value="edit-portal-settings" />
+					</c:when>
+					<c:when test="<%= category.equals(PortletCategoryKeys.SITES) %>">
+
+						<%
+						if (themeDisplay.getRefererPlid() > 0) {
+							Layout refererLayout = LayoutLocalServiceUtil.fetchLayout(themeDisplay.getRefererPlid());
+
+							if (refererLayout != null) {
+								Group refererGroup = refererLayout.getGroup();
+
+								ThemeDisplay siteThemeDisplay = (ThemeDisplay)themeDisplay.clone();
+
+								siteThemeDisplay.setScopeGroupId(refererGroup.getGroupId());
+
+								String buttonLabel = LanguageUtil.format(pageContext, "manage-x", StringUtil.shorten(refererGroup.getDescriptiveName(locale), 35));
+
+								PortletURL siteAdministrationURL = PortalUtil.getSiteAdministrationURL(renderResponse, siteThemeDisplay);
+						%>
+
+								<c:if test="<%= siteAdministrationURL != null %>">
+									<p>
+										<liferay-ui:message key="you-can-manage-the-site-you-are-coming-from" />
+									</p>
+
+									<aui:button href="<%= siteAdministrationURL.toString() %>" id="controlPanelHomeActionManageSite" primary="<%= true %>" value="<%= buttonLabel %>" />
+								</c:if>
+
+						<%
+							}
+						}
+						%>
+
+					</c:when>
+					<c:when test="<%= category.equals(PortletCategoryKeys.USERS) %>">
+						<c:if test="<%= PortalPermissionUtil.contains(permissionChecker, ActionKeys.ADD_USER) %>">
+							<liferay-portlet:renderURL portletName="<%= PortletKeys.USERS_ADMIN %>" var="addUserURL">
+								<portlet:param name="struts_action" value="/users_admin/edit_user" />
+								<portlet:param name="redirect" value="<%= PortalUtil.getCurrentURL(request) %>" />
+							</liferay-portlet:renderURL>
+
+							<p>
+								<liferay-ui:message key="do-you-want-to-create-a-user" />
+							</p>
+
+							<aui:button href="<%= addUserURL %>" id="controlPanelHomeActionAddUser" primary="<%= true %>" value="add-user" />
+						</c:if>
+					</c:when>
+				</c:choose>
+			</div>
+		</aui:col>
+
+	<%
+	}
+	%>
+
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/control_panel_menu/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/control_panel_menu/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/control_panel_menu/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/control_panel_menu/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/control_panel_menu/init.jsp
new file mode 100644
index 0000000..da45045
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/control_panel_menu/init.jsp
@@ -0,0 +1,22 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.util.bridges.alloy.AlloyPortlet" %><%@
+page import="com.liferay.util.bridges.alloy.BaseAlloyControllerImpl" %>
+
+<%@ include file="/html/portlet/control_panel_menu/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/control_panel_menu/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/control_panel_menu/view.jsp
new file mode 100644
index 0000000..d3d4210
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/control_panel_menu/view.jsp
@@ -0,0 +1,186 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/control_panel_menu/init.jsp" %>
+
+<div class="portal-add-content">
+	<div class="control-panel-tools">
+		<div class="search-panels">
+			<i class="icon-search"></i>
+
+			<div class="search-panels-bar">
+				<aui:input cssClass="search-panels-input search-query span12" label="" name="searchPanel" />
+			</div>
+		</div>
+	</div>
+
+	<liferay-ui:panel-container accordion="<%= true %>" extended="<%= true %>" id="controlPanelMenuAddContentPanelContainer" persistState="<%= true %>">
+
+		<%
+		String ppid = GetterUtil.getString((String)request.getAttribute("control_panel.jsp-ppid"), layoutTypePortlet.getStateMaxPortletId());
+
+		String portletCategory = null;
+
+		if (Validator.isNotNull(ppid)) {
+			Portlet portlet = PortletLocalServiceUtil.getPortletById(themeDisplay.getCompanyId(), ppid);
+
+			portletCategory = portlet.getControlPanelEntryCategory();
+		}
+
+		Map<String, List<Portlet>> siteAdministrationCategoriesMap = PortalUtil.getSiteAdministrationCategoriesMap(request);
+
+		for (String siteAdministrationCategory : siteAdministrationCategoriesMap.keySet()) {
+			String iconCssClass = "icon-file";
+
+			String panelPageCategoryId = "panel-manage-" + siteAdministrationCategory;
+
+			if (siteAdministrationCategory.equals(PortletCategoryKeys.SITE_ADMINISTRATION_CONFIGURATION)) {
+				iconCssClass = "icon-hdd";
+			}
+			else if (siteAdministrationCategory.equals(PortletCategoryKeys.SITE_ADMINISTRATION_CONTENT)) {
+				iconCssClass = "icon-file-text";
+			}
+			else if (siteAdministrationCategory.equals(PortletCategoryKeys.SITE_ADMINISTRATION_PAGES)) {
+				iconCssClass = "icon-sitemap";
+			}
+			else if (siteAdministrationCategory.equals(PortletCategoryKeys.SITE_ADMINISTRATION_USERS)) {
+				iconCssClass = "icon-group";
+			}
+		%>
+
+			<liferay-ui:panel collapsible="<%= true %>" cssClass="panel-page-category unstyled" extended="<%= true %>" iconCssClass="<%= iconCssClass %>" id="<%= panelPageCategoryId %>" persistState="<%= true %>" state='<%= siteAdministrationCategory.equals(portletCategory) ? "open" : "closed" %>' title='<%= LanguageUtil.get(pageContext, "category." + siteAdministrationCategory) %>'>
+				<c:if test="<%= siteAdministrationCategory.equals(PortletCategoryKeys.SITE_ADMINISTRATION_CONTENT) %>">
+
+					<%
+					List<Layout> scopeLayouts = new ArrayList<Layout>();
+
+					Group curSite = themeDisplay.getSiteGroup();
+
+					scopeLayouts.addAll(LayoutLocalServiceUtil.getScopeGroupLayouts(curSite.getGroupId(), false));
+					scopeLayouts.addAll(LayoutLocalServiceUtil.getScopeGroupLayouts(curSite.getGroupId(), true));
+
+					String scopeLabel = null;
+
+					Group curScopeGroup = themeDisplay.getScopeGroup();
+
+					if (curScopeGroup.isLayout()) {
+						Layout scopeLayout = LayoutLocalServiceUtil.getLayout(curScopeGroup.getClassPK());
+
+						scopeLabel = StringUtil.shorten(scopeLayout.getName(locale), 20);
+					}
+					else {
+						scopeLabel = LanguageUtil.get(pageContext, "default");
+					}
+					%>
+
+					<c:if test="<%= !scopeLayouts.isEmpty() && siteAdministrationCategory.equals(PortletCategoryKeys.SITE_ADMINISTRATION_CONTENT) %>">
+						<div class="nobr lfr-title-scope-selector">
+							<liferay-ui:message key="scope" />:
+							<liferay-ui:icon-menu direction="down" icon="" message="<%= scopeLabel %>">
+								<liferay-ui:icon
+									message="default"
+									src="<%= curSite.getIconURL(themeDisplay) %>"
+									url='<%= HttpUtil.setParameter(PortalUtil.getCurrentURL(request), "doAsGroupId", curSite.getGroupId()) %>'
+								/>
+
+								<%
+								for (Layout curScopeLayout : scopeLayouts) {
+									Group scopeGroup = curScopeLayout.getScopeGroup();
+								%>
+
+									<liferay-ui:icon
+										message="<%= HtmlUtil.escape(curScopeLayout.getName(locale)) %>"
+										src="<%= scopeGroup.getIconURL(themeDisplay) %>"
+										url='<%= HttpUtil.setParameter(PortalUtil.getCurrentURL(request), "doAsGroupId", scopeGroup.getGroupId()) %>'
+										/>
+
+								<%
+								}
+								%>
+
+							</liferay-ui:icon-menu>
+						</div>
+					</c:if>
+				</c:if>
+
+				<ul aria-labelledby="<%= panelPageCategoryId %>" class="category-portlets" role="menu">
+
+					<%
+					List<Portlet> portlets = siteAdministrationCategoriesMap.get(siteAdministrationCategory);
+
+					for (Portlet portlet : portlets) {
+						String portletId = portlet.getPortletId();
+					%>
+
+						<li class="<%= ppid.equals(portletId) ? "selected-portlet" : "" %>" role="presentation">
+							<liferay-portlet:renderURL
+								doAsGroupId="<%= themeDisplay.getScopeGroupId() %>"
+								portletName="<%= portlet.getRootPortletId() %>"
+								var="portletURL"
+								windowState="<%= WindowState.MAXIMIZED.toString() %>"
+								/>
+
+							<a href="<%= portletURL %>" id="<portlet:namespace />portlet_<%= portletId %>" role="menuitem">
+								<c:choose>
+									<c:when test="<%= Validator.isNull(portlet.getIcon()) %>">
+										<liferay-ui:icon src='<%= themeDisplay.getPathContext() + "/html/icons/default.png" %>' />
+									</c:when>
+									<c:otherwise>
+										<liferay-portlet:icon-portlet portlet="<%= portlet %>" />
+									</c:otherwise>
+								</c:choose>
+
+								<%= PortalUtil.getPortletTitle(portlet, application, locale) %>
+							</a>
+						</li>
+
+						<c:if test="<%= !ppid.equals(portletId) %>">
+
+							<%
+							String portletClassName = portlet.getPortletClass();
+							%>
+
+							<%
+							if (portletClassName.equals(AlloyPortlet.class.getName())) {
+								PortletConfig alloyPortletConfig = PortletConfigFactoryUtil.create(portlet, application);
+
+								PortletContext alloyPortletContext = alloyPortletConfig.getPortletContext();
+
+								if (alloyPortletContext.getAttribute(BaseAlloyControllerImpl.TOUCH + portlet.getRootPortletId()) != Boolean.FALSE) {
+							%>
+
+								<iframe height="0" src="<%= portletURL %>" style="display: none; visibility: hidden;" width="0"></iframe>
+
+							<%
+								}
+							}
+							%>
+
+						</c:if>
+
+					<%
+					}
+					%>
+
+				</ul>
+			</liferay-ui:panel>
+
+		<%
+		}
+		%>
+
+	</liferay-ui:panel-container>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/currency_converter/edit.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/currency_converter/edit.jsp
new file mode 100644
index 0000000..5dae7cb
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/currency_converter/edit.jsp
@@ -0,0 +1,80 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/currency_converter/init.jsp" %>
+
+<form action="<portlet:actionURL><portlet:param name="struts_action" value="/currency_converter/edit" /></portlet:actionURL>" method="post" name="<portlet:namespace />fm">
+<input name="<portlet:namespace /><%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+<input name="<portlet:namespace />symbols" type="hidden" value="" />
+
+<%
+
+// Left list
+
+List leftList = new ArrayList();
+
+for (int i = 0; i < symbols.length; i++) {
+	leftList.add(new KeyValuePair(symbols[i], LanguageUtil.get(pageContext, "currency." + symbols[i])));
+}
+
+//leftList = ListUtil.sort(leftList, new KeyValuePairComparator(false, true));
+
+// Right list
+
+List rightList = new ArrayList();
+
+Arrays.sort(symbols);
+
+for (Map.Entry<String, String> entry : allSymbols.entrySet()) {
+	String symbol = entry.getValue();
+	String currencyValue = entry.getKey();
+
+	if (Arrays.binarySearch(symbols, symbol) < 0) {
+		rightList.add(new KeyValuePair(symbol, LanguageUtil.get(pageContext, "currency." + currencyValue)));
+	}
+}
+
+rightList = ListUtil.sort(rightList, new KeyValuePairComparator(false, true));
+%>
+
+<liferay-ui:input-move-boxes
+	leftBoxName="current_actions"
+	leftList="<%= leftList %>"
+	leftReorder="true"
+	leftTitle="current"
+	rightBoxName="available_actions"
+	rightList="<%= rightList %>"
+	rightTitle="available"
+/>
+
+<br />
+
+<input onClick="<portlet:namespace />saveCurrency();" type="button" value="<liferay-ui:message key="save" />" />
+
+</form>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />saveCurrency',
+		function() {
+			document.<portlet:namespace />fm.<portlet:namespace />symbols.value = Liferay.Util.listSelect(document.<portlet:namespace />fm.<portlet:namespace />current_actions);
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/currency_converter/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/currency_converter/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/currency_converter/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/currency_converter/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/currency_converter/init.jsp
new file mode 100644
index 0000000..373fab7
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/currency_converter/init.jsp
@@ -0,0 +1,27 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.currencyconverter.util.CurrencyUtil" %>
+
+<%
+String[] symbols = portletPreferences.getValues("symbols", new String[0]);
+
+Map<String, String> allSymbols = CurrencyUtil.getAllSymbols(pageContext);
+%>
+
+<%@ include file="/html/portlet/currency_converter/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/currency_converter/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/currency_converter/view.jsp
new file mode 100644
index 0000000..99e960b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/currency_converter/view.jsp
@@ -0,0 +1,196 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/currency_converter/init.jsp" %>
+
+<%
+String from = ParamUtil.getString(request, "from", com.liferay.portlet.currencyconverter.model.Currency.DEFAULT_FROM);
+String to = ParamUtil.getString(request, "to", com.liferay.portlet.currencyconverter.model.Currency.DEFAULT_TO);
+
+com.liferay.portlet.currencyconverter.model.Currency currency = CurrencyUtil.getCurrency(from + to);
+
+double number = ParamUtil.getDouble(request, "number", 1.0);
+
+String chartId = ParamUtil.getString(request, "chartId", "3m");
+
+NumberFormat decimalFormat = NumberFormat.getNumberInstance(locale);
+
+decimalFormat.setMaximumFractionDigits(2);
+decimalFormat.setMinimumFractionDigits(2);
+%>
+
+<form action="<portlet:renderURL windowState="<%= WindowState.MAXIMIZED.toString() %>"><portlet:param name="struts_action" value="/currency_converter/view" /></portlet:renderURL>" method="post" name="<portlet:namespace />fm" onSubmit="submitForm(this); return false;">
+
+<input type="submit" value="<liferay-ui:message key="convert" />" />
+
+<input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" name="<portlet:namespace />number" size="3" type="text" value="<%= number %>" />
+
+<select name="<portlet:namespace />from">
+
+	<%
+	for (Map.Entry<String, String> entry : allSymbols.entrySet()) {
+		String symbol = entry.getValue();
+		String currencyValue = entry.getKey();
+	%>
+
+		<option <%= symbol.equals(from) ? "selected" : "" %> value="<%= symbol %>"><%= currencyValue %></option value>
+
+	<%
+	}
+	%>
+
+</select>
+
+<strong><liferay-ui:message key="to" /></strong>
+
+<select name="<portlet:namespace />to">
+
+	<%
+	for (Map.Entry<String, String> entry : allSymbols.entrySet()) {
+		String symbol = entry.getValue();
+		String currencyValue = entry.getKey();
+	%>
+
+		<option <%= symbol.equals(to) ? "selected" : "" %> value="<%= symbol %>"><%= currencyValue %></option value>
+
+	<%
+	}
+	%>
+
+</select>
+
+<br /><br />
+
+<c:choose>
+	<c:when test="<%= windowState.equals(WindowState.NORMAL) %>">
+		<table class="table table-bordered table-hover table-striped">
+		<thead class="table-columns">
+		<tr>
+			<th class="table-header">
+				<strong><liferay-ui:message key="currency" /></strong>
+			</th>
+
+			<%
+			for (int i = 0; i < symbols.length; i++) {
+				String symbol = symbols[i];
+			%>
+
+				<th class="table-header">
+					<liferay-ui:message key='<%= "currency." + symbol %>' /><br />
+					(<%= symbol %>)
+				</th>
+
+			<%
+			}
+			%>
+
+		</tr>
+		</thead>
+
+		<tbody class="table-data">
+
+		<%
+		for (int i = 0; i < symbols.length; i++) {
+			String symbol = symbols[i];
+		%>
+
+			<tr>
+				<td class="table-cell">
+					<%= symbol %>
+				</td>
+
+		<%
+				for (int j = 0; j < symbols.length; j++) {
+					String symbol2 = symbols[j];
+
+					currency = CurrencyUtil.getCurrency(symbol2 + symbol);
+
+					if (currency != null) {
+		%>
+
+						<c:if test="<%= i != j %>">
+							<td class="table-cell"><%= currency.getRate() %></td>
+						</c:if>
+
+						<c:if test="<%= i == j %>">
+							<td class="table-cell">1</td>
+						</c:if>
+
+		<%
+					}
+				}
+		%>
+
+			</tr>
+
+		<%
+		}
+		%>
+
+		</tbody>
+		</table>
+	</c:when>
+	<c:otherwise>
+		<table border="1" cellpadding="0" cellspacing="0" width="520">
+		<tr>
+			<td align="center" width="33%">
+				<%= currency.getFromSymbol() %><br />
+				<strong><%= number %></strong>
+			</td>
+			<td align="center" width="33%">
+				<%= currency.getToSymbol() %><br />
+				<strong><%= decimalFormat.format(number * currency.getRate()) %></strong>
+			</td>
+			<td align="center" width="34%">
+				<liferay-ui:message key="historical-charts" /><br />
+
+				<%
+				PortletURL portletURL = renderResponse.createRenderURL();
+
+				portletURL.setParameter("struts_action", "/currency_converter/view");
+				portletURL.setParameter("number", String.valueOf(number));
+				portletURL.setParameter("from", currency.getFromSymbol());
+				portletURL.setParameter("to", currency.getToSymbol());
+				%>
+
+				<c:if test='<%= chartId.equals("3m") %>'>
+					3<liferay-ui:message key="month-abbreviation" />, <a href="<% portletURL.setParameter("chartId", "1y"); %><%= portletURL.toString() %>">1<liferay-ui:message key="year-abbreviation" /></a>, <a href="<% portletURL.setParameter("chartId", "2y"); %><%= portletURL.toString() %>">2<liferay-ui:message key="year-abbreviation" /></a>
+				</c:if>
+
+				<c:if test='<%= chartId.equals("1y") %>'>
+					<a href="<% portletURL.setParameter("chartId", "3m"); %><%= portletURL.toString() %>">3<liferay-ui:message key="month-abbreviation" /></a>, 1<liferay-ui:message key="year-abbreviation" />, <a href="<% portletURL.setParameter("chartId", "2y"); %><%= portletURL.toString() %>">2<liferay-ui:message key="year-abbreviation" /></a>
+				</c:if>
+
+				<c:if test='<%= chartId.equals("2y") %>'>
+					<a href="<% portletURL.setParameter("chartId", "3m"); %><%= portletURL.toString() %>">3<liferay-ui:message key="month-abbreviation" /></a>, <a href="<% portletURL.setParameter("chartId", "1y"); %><%= portletURL.toString() %>">1<liferay-ui:message key="year-abbreviation" /></a>, 2<liferay-ui:message key="year-abbreviation" />
+				</c:if>
+			</td>
+		</tr>
+		</table>
+
+		<br />
+
+		<table border="1" cellpadding="2" cellspacing="0">
+		<tr>
+			<td>
+				<img height="288" src="http://ichart.yahoo.com/z?s=<%= currency.getSymbol() %>=X&t=<%= HtmlUtil.escape(chartId) %>?" width="512" />
+			</td>
+		</tr>
+		</table>
+	</c:otherwise>
+</c:choose>
+
+</form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dictionary/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dictionary/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dictionary/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dictionary/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dictionary/init.jsp
new file mode 100644
index 0000000..f4edf65
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dictionary/init.jsp
@@ -0,0 +1,19 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ include file="/html/portlet/dictionary/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dictionary/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dictionary/view.jsp
new file mode 100644
index 0000000..e4db24b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dictionary/view.jsp
@@ -0,0 +1,30 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dictionary/init.jsp" %>
+
+<form name="<portlet:namespace />fm" onSubmit="window.open(document.<portlet:namespace />fm.<portlet:namespace />type[document.<portlet:namespace />fm.<portlet:namespace />type.selectedIndex].value + encodeURIComponent(document.<portlet:namespace />fm.<portlet:namespace />word.value)); return false;">
+
+<input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" name="<portlet:namespace />word" size="30" type="text" />
+
+<select name="<portlet:namespace />type">
+	<option value="http://dictionary.reference.com/search?q="><liferay-ui:message key="dictionary" /></option>
+	<option value="http://thesaurus.reference.com/search?q="><liferay-ui:message key="thesaurus" /></option>
+</select>
+
+<input type="submit" value="<liferay-ui:message key="find" />" />
+
+</form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/asset/abstract.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/asset/abstract.jsp
new file mode 100644
index 0000000..22b8b27
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/asset/abstract.jsp
@@ -0,0 +1,77 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+User selUser = (User)request.getAttribute(WebKeys.USER);
+
+selUser = selUser.toEscapedModel();
+
+Contact selContact = selUser.getContact();
+
+List<Organization> organizations = OrganizationLocalServiceUtil.getUserOrganizations(selUser.getUserId());
+
+request.setAttribute("user.selUser", selUser);
+request.setAttribute("user.selContact", selContact);
+request.setAttribute("user.organizations", organizations);
+request.setAttribute("addresses.className", Contact.class.getName());
+request.setAttribute("addresses.classPK", selContact.getContactId());
+request.setAttribute("emailAddresses.className", Contact.class.getName());
+request.setAttribute("emailAddresses.classPK", selContact.getContactId());
+request.setAttribute("phones.className", Contact.class.getName());
+request.setAttribute("phones.classPK", selContact.getContactId());
+request.setAttribute("websites.className", Contact.class.getName());
+request.setAttribute("websites.classPK", selContact.getContactId());
+%>
+
+<div class="user-information">
+	<div class="section entity-details">
+		<liferay-util:include page="/html/portlet/directory/user/details.jsp" />
+	</div>
+
+	<div class="section entity-addresses">
+		<liferay-util:include page="/html/portlet/directory/user/addresses.jsp" />
+	</div>
+
+	<div class="section entity-email-addresses">
+		<liferay-util:include page="/html/portlet/directory/common/additional_email_addresses.jsp" />
+	</div>
+
+	<div class="section entity-websites">
+		<liferay-util:include page="/html/portlet/directory/common/websites.jsp" />
+	</div>
+
+	<div class="section entity-phones">
+		<liferay-util:include page="/html/portlet/directory/user/phone_numbers.jsp" />
+	</div>
+
+	<div class="section entity-instant-messenger">
+		<liferay-util:include page="/html/portlet/directory/user/instant_messenger.jsp" />
+	</div>
+
+	<div class="section entity-social-network">
+		<liferay-util:include page="/html/portlet/directory/user/social_network.jsp" />
+	</div>
+
+	<div class="section entity-sms">
+		<liferay-util:include page="/html/portlet/directory/user/sms.jsp" />
+	</div>
+
+	<div class="section entity-comments">
+		<liferay-util:include page="/html/portlet/directory/user/comments.jsp" />
+	</div>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/common/additional_email_addresses.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/common/additional_email_addresses.jsp
new file mode 100644
index 0000000..f4df710
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/common/additional_email_addresses.jsp
@@ -0,0 +1,51 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+String className = (String)request.getAttribute("emailAddresses.className");
+long classPK = (Long)request.getAttribute("emailAddresses.classPK");
+
+List<EmailAddress> emailAddresses = Collections.emptyList();
+
+if (classPK > 0) {
+	emailAddresses = EmailAddressServiceUtil.getEmailAddresses(className, classPK);
+}
+%>
+
+<c:if test="<%= !emailAddresses.isEmpty() %>">
+	<h3><liferay-ui:message key="additional-email-addresses" /></h3>
+
+	<ul class="property-list">
+
+	<%
+	for (int i = 0; i < emailAddresses.size(); i++) {
+		EmailAddress emailAddress = emailAddresses.get(i);
+	%>
+
+		<li class="<%= emailAddress.isPrimary() ? "primary" : "" %>">
+			<a href="mailto:<%= emailAddress.getAddress() %>"><%= emailAddress.getAddress() %></a>
+
+			<%= LanguageUtil.get(pageContext, emailAddress.getType().getName()) %>
+		</li>
+
+	<%
+	}
+	%>
+
+	</ul>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/common/websites.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/common/websites.jsp
new file mode 100644
index 0000000..f7b2ceb
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/common/websites.jsp
@@ -0,0 +1,51 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+String className = (String)request.getAttribute("websites.className");
+long classPK = (Long)request.getAttribute("websites.classPK");
+
+List<Website> websites = Collections.emptyList();
+
+if (classPK > 0) {
+	websites = WebsiteServiceUtil.getWebsites(className, classPK);
+}
+%>
+
+<c:if test="<%= !websites.isEmpty() %>">
+	<h3><liferay-ui:message key="websites" /></h3>
+
+	<ul class="property-list">
+
+	<%
+	for (Website website: websites) {
+		website = website.toEscapedModel();
+	%>
+
+		<li class="<%= website.isPrimary() ? "primary" : "" %>">
+			<a href="<%= website.getUrl() %>"><%= website.getUrl() %></a>
+
+			<%= LanguageUtil.get(pageContext, website.getType().getName()) %>
+		</li>
+
+	<%
+	}
+	%>
+
+	</ul>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/css/.sass-cache/main.css
new file mode 100644
index 0000000..74fa80b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/css/.sass-cache/main.css
@@ -0,0 +1,106 @@
+.portlet-directory .details {
+  overflow: hidden; }
+  .portlet-directory .details .avatar {
+    float: left;
+    width: 100px; }
+  .portlet-directory .details dd {
+    margin-bottom: 0.8em; }
+  .portlet-directory .details dl {
+    margin-left: 115px; }
+  .portlet-directory .details dt, .portlet-directory .details dd {
+    clear: both; }
+  .portlet-directory .details dt {
+    font-weight: bold;
+    line-height: 1.1;
+    margin-bottom: 0; }
+.portlet-directory table.org-labor-table {
+  border: 1px solid white;
+  margin-bottom: 30px;
+  margin-top: 10px; }
+  .portlet-directory table.org-labor-table td {
+    background-color: #EFEFEF;
+    padding: 5px;
+    text-align: center; }
+    .portlet-directory table.org-labor-table td.no-color {
+      background-color: #FFF; }
+  .portlet-directory table.org-labor-table th {
+    background-color: #999;
+    color: white;
+    padding: 1px 5px 1px 5px; }
+.portlet-directory .primary {
+  background: #eeeeee url(@theme_image_path@/common/check.png) no-repeat 3px 50%;
+  color: #020509;
+  font-weight: bold;
+  margin-bottom: 10px;
+  padding: 5px;
+  padding-left: 10px; }
+.portlet-directory dl.property-list {
+  margin-top: 0;
+  overflow: hidden;
+  padding: 0; }
+  .portlet-directory dl.property-list dd {
+    padding-left: 5px; }
+    .portlet-directory dl.property-list dd img {
+      vertical-align: middle; }
+  .portlet-directory dl.property-list li {
+    margin-bottom: 5px; }
+  .portlet-directory dl.property-list dt, .portlet-directory dl.property-list dd {
+    float: left;
+    line-height: 1.5;
+    margin: 0; }
+  .portlet-directory dl.property-list dt {
+    clear: left;
+    font-weight: bold;
+    min-width: 5em; }
+.portlet-directory .section {
+  float: left;
+  margin-left: 10px;
+  min-width: 250px;
+  width: 47%; }
+  .portlet-directory .section h3 {
+    background: url() no-repeat 2px 50%;
+    border-bottom: 1px solid #CCC;
+    line-height: 1.5;
+    margin-bottom: 0.5em;
+    padding-left: 25px; }
+  .portlet-directory .section li {
+    list-style: none;
+    margin: 0;
+    padding-left: 25px; }
+  .portlet-directory .section ul {
+    margin: 0; }
+.portlet-directory .entity-addresses .mailing-name {
+  display: block;
+  font-style: italic; }
+.portlet-directory .entity-addresses h3 {
+  background-image: url(@theme_image_path@/common/home.png); }
+.portlet-directory .entity-addresses .primary {
+  background-position: 3px 5px; }
+.portlet-directory .entity-comments h3 {
+  background-image: url(@theme_image_path@/common/welcome_message.png); }
+.portlet-directory .entity-details {
+  clear: both; }
+.portlet-directory .entity-email-addresses h3 {
+  background-image: url(@theme_image_path@/mail/unread.png); }
+.portlet-directory .user-information, .portlet-directory .organization-information {
+  overflow: hidden; }
+.portlet-directory .entity-instant-messenger h3 {
+  background-image: url(@theme_image_path@/common/conversation.png); }
+.portlet-directory .entity-phones h3 {
+  background-image: url(@theme_image_path@/common/telephone.png); }
+.portlet-directory .entity-sms h3 {
+  background-image: url(@theme_image_path@/common/telephone_mobile.png); }
+.portlet-directory .entity-social-network h3 {
+  background-image: url(@theme_image_path@/common/group.png); }
+.portlet-directory .entity-websites h3 {
+  background-image: url(@theme_image_path@/common/history.png); }
+.portlet-directory .entity-services h3 {
+  background-image: url(@theme_image_path@/common/services.png); }
+
+.ie6 .portlet-directory {
+  height: 1%; }
+  .ie6 .portlet-directory dl.property-list {
+    height: 1%; }
+  .ie6 .portlet-directory .user-information, .ie6 .portlet-directory .organization-information {
+    height: 1%; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/css/main.css
new file mode 100644
index 0000000..7ac456d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/css/main.css
@@ -0,0 +1,183 @@
+.portlet-directory {
+	.details {
+		overflow: hidden;
+
+		.avatar {
+			float: left;
+			width: 100px;
+		}
+
+		dd {
+			margin-bottom: 0.8em;
+		}
+
+		dl {
+			margin-left: 115px;
+		}
+
+		dt, dd {
+			clear: both;
+		}
+
+		dt {
+			font-weight: bold;
+			line-height: 1.1;
+			margin-bottom: 0;
+		}
+	}
+
+	table.org-labor-table {
+		border: 1px solid white;
+		margin-bottom: 30px;
+		margin-top: 10px;
+
+		td {
+			background-color: #EFEFEF;
+			padding: 5px;
+			text-align: center;
+
+			&.no-color {
+				background-color: #FFF;
+			}
+		}
+
+		th {
+			background-color: #999;
+			color: white;
+			padding: 1px 5px 1px 5px;
+		}
+	}
+
+	.primary {
+		background: #EEE url(@theme_image_path@/common/check.png) no-repeat 3px 50%;
+		color: #020509;
+		font-weight: bold;
+		margin-bottom: 10px;
+		padding: 5px;
+		padding-left: 10px;
+	}
+
+	dl.property-list {
+		margin-top: 0;
+		overflow: hidden;
+		padding: 0;
+
+		dd {
+			padding-left: 5px;
+
+			img {
+				vertical-align: middle;
+			}
+		}
+
+		li {
+			margin-bottom: 5px;
+		}
+
+		dt, dd {
+			float: left;
+			line-height: 1.5;
+			margin: 0;
+		}
+
+		dt {
+			clear: left;
+			font-weight: bold;
+			min-width: 5em;
+		}
+	}
+
+	.section {
+		float: left;
+		margin-left: 10px;
+		min-width: 250px;
+		width: 47%;
+
+		h3 {
+			background: url() no-repeat 2px 50%;
+			border-bottom: 1px solid #CCC;
+			line-height: 1.5;
+			margin-bottom: 0.5em;
+			padding-left: 25px;
+		}
+
+		li {
+			list-style: none;
+			margin: 0;
+			padding-left: 25px;
+		}
+
+		ul {
+			margin: 0;
+		}
+	}
+
+	.entity-addresses {
+		.mailing-name {
+			display: block;
+			font-style: italic;
+		}
+
+		h3 {
+			background-image: url(@theme_image_path@/common/home.png);
+		}
+
+		.primary {
+			background-position: 3px 5px;
+		}
+	}
+
+	.entity-comments h3 {
+		background-image: url(@theme_image_path@/common/welcome_message.png);
+	}
+
+	.entity-details {
+		clear: both;
+	}
+
+	.entity-email-addresses h3 {
+		background-image: url(@theme_image_path@/mail/unread.png);
+	}
+
+	.user-information, .organization-information {
+		overflow: hidden;
+	}
+
+	.entity-instant-messenger h3 {
+		background-image: url(@theme_image_path@/common/conversation.png);
+	}
+
+	.entity-phones h3 {
+		background-image: url(@theme_image_path@/common/telephone.png);
+	}
+
+	.entity-sms h3 {
+		background-image: url(@theme_image_path@/common/telephone_mobile.png);
+	}
+
+	.entity-social-network h3 {
+		background-image: url(@theme_image_path@/common/group.png);
+	}
+
+	.entity-websites h3 {
+		background-image: url(@theme_image_path@/common/history.png);
+	}
+
+	.entity-services h3 {
+		background-image: url(@theme_image_path@/common/services.png);
+	}
+}
+
+.ie6 {
+	.portlet-directory {
+		height: 1%;
+
+		dl.property-list {
+			height: 1%;
+		}
+
+		.user-information, .organization-information {
+			height: 1%;
+		}
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/error.jsp
new file mode 100644
index 0000000..a03d26c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/error.jsp
@@ -0,0 +1,26 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= NoSuchOrganizationException.class %>" message="the-organization-could-not-be-found" />
+<liferay-ui:error exception="<%= NoSuchUserException.class %>" message="the-user-could-not-be-found" />
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/init.jsp
new file mode 100644
index 0000000..c7f40d4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/init.jsp
@@ -0,0 +1,31 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.NoSuchOrganizationException" %><%@
+page import="com.liferay.portal.NoSuchUserGroupException" %><%@
+page import="com.liferay.portlet.social.model.SocialRelationConstants" %><%@
+page import="com.liferay.portlet.usersadmin.search.OrganizationDisplayTerms" %><%@
+page import="com.liferay.portlet.usersadmin.search.UserDisplayTerms" %>
+
+<%
+String tabs1 = ParamUtil.getString(request, "tabs1", "users");
+
+Format dateFormatDate = FastDateFormatFactoryUtil.getDate(locale);
+%>
+
+<%@ include file="/html/portlet/directory/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/organization/addresses.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/organization/addresses.jsp
new file mode 100644
index 0000000..6449bd5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/organization/addresses.jsp
@@ -0,0 +1,78 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+String className = (String)request.getAttribute("addresses.className");
+long classPK = (Long)request.getAttribute("addresses.classPK");
+
+List<Address> addresses = Collections.emptyList();
+
+if (classPK > 0) {
+	addresses = AddressServiceUtil.getAddresses(className, classPK);
+}
+%>
+
+<c:if test="<%= !addresses.isEmpty() %>">
+	<h3><liferay-ui:message key="address" /></h3>
+
+	<ul class="property-list">
+
+	<%
+	for (Address address: addresses) {
+		String street1 = address.getStreet1();
+		String street2 = address.getStreet2();
+		String street3 = address.getStreet3();
+
+		String zipCode = address.getZip();
+		String city = address.getCity();
+
+		String mailingName = LanguageUtil.get(pageContext, address.getType().getName());
+	%>
+
+		<li class="<%= address.isPrimary() ? "primary" : "" %>">
+			<em class="mailing-name"><%= mailingName %></em>
+
+			<c:if test="<%= Validator.isNotNull(street1) %>">
+				<%= street1 %><br />
+			</c:if>
+
+			<c:if test="<%= Validator.isNotNull(street2) %>">
+				<%= street2 %><br />
+			</c:if>
+
+			<c:if test="<%= Validator.isNotNull(street3) %>">
+				<%= street3 %><br />
+			</c:if>
+
+			<c:if test="<%= Validator.isNotNull(zipCode) %>">
+				<%= zipCode %>,
+			</c:if>
+
+			<c:if test="<%= Validator.isNotNull(city) %>">
+				<%= city %>
+			</c:if>
+
+			<c:if test="<%= address.isMailing() %>">(<liferay-ui:message key="mailing" />)</c:if>
+		</li>
+
+	<%
+	}
+	%>
+
+	</ul>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/organization/comments.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/organization/comments.jsp
new file mode 100644
index 0000000..add3ecf
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/organization/comments.jsp
@@ -0,0 +1,27 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+Organization organization = (Organization)request.getAttribute(WebKeys.ORGANIZATION);
+%>
+
+<c:if test="<%= Validator.isNotNull(organization.getComments()) %>">
+	<h3><liferay-ui:message key="comments" /></h3>
+
+	<%= organization.getComments() %>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/organization/details.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/organization/details.jsp
new file mode 100644
index 0000000..84dbff6
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/organization/details.jsp
@@ -0,0 +1,74 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+Organization organization = (Organization)request.getAttribute(WebKeys.ORGANIZATION);
+
+long logoId = organization.getLogoId();
+%>
+
+<h2><%= HtmlUtil.escape(organization.getName()) %></h2>
+
+<div class="details">
+	<img alt="<%= HtmlUtil.escape(organization.getName()) %>" class="avatar" src="<%= themeDisplay.getPathImage() %>/organization_logo?img_id=<%= logoId %>&t=<%= WebServerServletTokenUtil.getToken(logoId) %>" />
+
+	<dl class="property-list">
+		<dt>
+			<liferay-ui:message key="type" />
+		</dt>
+		<dd>
+			<%= LanguageUtil.get(pageContext, organization.getType()) %>
+		</dd>
+
+		<c:if test="<%= PropsValues.FIELD_ENABLE_COM_LIFERAY_PORTAL_MODEL_ORGANIZATION_STATUS %>">
+			<dt>
+				<liferay-ui:message key="status" />
+			</dt>
+			<dd>
+				<%= LanguageUtil.get(pageContext, ListTypeServiceUtil.getListType(organization.getStatusId()).getName()) %>
+			</dd>
+		</c:if>
+
+		<c:if test="<%= organization.getCountryId() > 0 %>">
+			<dt>
+				<liferay-ui:message key="country" />
+			</dt>
+			<dd>
+				<%= LanguageUtil.get(pageContext, CountryServiceUtil.getCountry(organization.getCountryId()).getName()) %>
+			</dd>
+		</c:if>
+
+		<c:if test="<%= organization.getRegionId() > 0 %>">
+			<dt>
+				<liferay-ui:message key="region" />
+			</dt>
+			<dd>
+				<%= LanguageUtil.get(pageContext, RegionServiceUtil.getRegion(organization.getRegionId()).getName()) %>
+			</dd>
+		</c:if>
+
+		<c:if test="<%= organization.getParentOrganization() != null %>">
+			<dt>
+				<liferay-ui:message key="parent-organization" />
+			</dt>
+			<dd>
+				<%= HtmlUtil.escape(organization.getParentOrganization().getName()) %>
+			</dd>
+		</c:if>
+	</dl>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/organization/phone_numbers.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/organization/phone_numbers.jsp
new file mode 100644
index 0000000..692502d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/organization/phone_numbers.jsp
@@ -0,0 +1,48 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+String className = (String)request.getAttribute("phones.className");
+long classPK = (Long)request.getAttribute("phones.classPK");
+
+List<Phone> phones = Collections.emptyList();
+
+if (classPK > 0) {
+	phones = PhoneServiceUtil.getPhones(className, classPK);
+}
+%>
+
+<c:if test="<%= !phones.isEmpty() %>">
+	<h3><liferay-ui:message key="phones" /></h3>
+
+	<ul class="property-list">
+
+	<%
+	for (Phone phone: phones) {
+	%>
+
+		<li class="<%= phone.isPrimary() ? "primary" : "" %>">
+			<%= phone.getNumber() %> <%= phone.getExtension() %> <%= LanguageUtil.get(pageContext, phone.getType().getName()) %>
+		</li>
+
+	<%
+	}
+	%>
+
+	</ul>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/organization/search_columns.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/organization/search_columns.jspf
new file mode 100644
index 0000000..fc36a36
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/organization/search_columns.jspf
@@ -0,0 +1,74 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="name"
+	orderable="<%= true %>"
+	property="name"
+/>
+
+<liferay-ui:search-container-column-text
+	buffer="buffer"
+	href="<%= rowURL %>"
+	name="parent-organization"
+>
+
+	<%
+	if (organization.getParentOrganizationId() > 0) {
+		try {
+			Organization parentOrganization = OrganizationLocalServiceUtil.getOrganization(organization.getParentOrganizationId());
+
+			buffer.append(HtmlUtil.escape(parentOrganization.getName()));
+		}
+		catch (Exception e) {
+		}
+	}
+	%>
+
+</liferay-ui:search-container-column-text>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="type"
+	orderable="<%= true %>"
+	value="<%= LanguageUtil.get(pageContext, organization.getType()) %>"
+/>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="city"
+	value="<%= HtmlUtil.escape(organization.getAddress().getCity()) %>"
+/>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="region"
+>
+	<liferay-ui:write bean="<%= organization %>" property="region" />
+</liferay-ui:search-container-column-text>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="country"
+>
+	<liferay-ui:write bean="<%= organization %>" property="country" />
+</liferay-ui:search-container-column-text>
+
+<liferay-ui:search-container-column-jsp
+	align="right"
+	path="/html/portlet/directory/organization_action.jsp"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/organization/services.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/organization/services.jsp
new file mode 100644
index 0000000..29c0ea8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/organization/services.jsp
@@ -0,0 +1,130 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+Organization organization = (Organization)request.getAttribute(WebKeys.ORGANIZATION);
+
+long organizationId = (organization != null) ? organization.getOrganizationId() : 0;
+
+List<OrgLabor> orgLabors = OrgLaborServiceUtil.getOrgLabors(organizationId);
+
+Format timeFormat = FastDateFormatFactoryUtil.getSimpleDateFormat("HH:mm", locale);
+%>
+
+<c:if test="<%= !orgLabors.isEmpty() %>">
+	<h3><liferay-ui:message key="services" /></h3>
+
+	<%
+	Calendar cal = CalendarFactoryUtil.getCalendar();
+	String[] days = CalendarUtil.getDays(locale);
+	String[] paramPrefixes = {"sun", "mon", "tue", "wed", "thu", "fri", "sat"};
+
+	for (int i = 0; i < orgLabors.size(); i++) {
+		OrgLabor orgLabor = orgLabors.get(i);
+
+		int[] openArray = new int[paramPrefixes.length];
+
+		for (int j = 0; j < paramPrefixes.length; j++) {
+			openArray[j] = BeanPropertiesUtil.getInteger(orgLabor, paramPrefixes[j] + "Open", -1);
+		}
+
+		int[] closeArray = new int[paramPrefixes.length];
+
+		for (int j = 0; j < paramPrefixes.length; j++) {
+			closeArray[j] = BeanPropertiesUtil.getInteger(orgLabor, paramPrefixes[j] + "Close", -1);
+		}
+	%>
+
+		<ul class="property-list">
+			<li>
+				<h4><%= LanguageUtil.get(pageContext,ListTypeServiceUtil.getListType(orgLabor.getTypeId()).getName()) %></h4>
+
+				<table border="1" class="org-labor-table">
+				<tr>
+					<td class="no-color"></td>
+
+					<%
+					for (String day : days) {
+					%>
+
+						<th>
+							<label><%= day %></label>
+						</th>
+
+					<%
+					}
+					%>
+
+				</tr>
+				<tr>
+					<td>
+						<strong><liferay-ui:message key="open" /></strong>
+					</td>
+
+					<%
+					for (int j = 0; j < days.length; j++) {
+						int curOpen = openArray[j];
+
+						cal.set(Calendar.HOUR_OF_DAY, curOpen / 100);
+						cal.set(Calendar.MINUTE, curOpen % 100);
+						cal.set(Calendar.SECOND, 0);
+						cal.set(Calendar.MILLISECOND, 0);
+					%>
+
+						<td>
+							<%= curOpen != -1 ? timeFormat.format(cal.getTime()) : "" %>
+						</td>
+
+					<%
+					}
+					%>
+
+				</tr>
+				<tr>
+					<td>
+						<strong><liferay-ui:message key="close[status]" /></strong>
+					</td>
+
+					<%
+					for (int j = 0; j < days.length; j++) {
+						int curClose = closeArray[j];
+
+						cal.set(Calendar.HOUR_OF_DAY, curClose / 100);
+						cal.set(Calendar.MINUTE, curClose % 100);
+						cal.set(Calendar.SECOND, 0);
+						cal.set(Calendar.MILLISECOND, 0);
+					%>
+
+						<td>
+							<%= curClose != -1 ? timeFormat.format(cal.getTime()) : "" %>
+						</td>
+
+					<%
+					}
+					%>
+
+				</tr>
+				</table>
+			</li>
+		</ul>
+
+	<%
+	}
+	%>
+
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/organization_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/organization_action.jsp
new file mode 100644
index 0000000..4ff7d03
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/organization_action.jsp
@@ -0,0 +1,55 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+OrganizationSearch searchContainer = (OrganizationSearch)request.getAttribute("liferay-ui:search:searchContainer");
+
+String redirect = searchContainer.getIteratorURL().toString();
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+Organization organization = (Organization)row.getObject();
+
+long organizationId = organization.getOrganizationId();
+%>
+
+<liferay-ui:icon-menu>
+	<portlet:renderURL var="viewUsersURL">
+		<portlet:param name="struts_action" value="/directory/view" />
+		<portlet:param name="tabs1" value="users" />
+		<portlet:param name="viewUsersRedirect" value="<%= currentURL %>" />
+		<portlet:param name="organizationId" value="<%= String.valueOf(organizationId) %>" />
+	</portlet:renderURL>
+
+	<liferay-ui:icon
+		image="view_users"
+		message="view-users"
+		method="get" url="<%= viewUsersURL %>"
+	/>
+
+	<c:if test="<%= organization.hasSuborganizations() %>">
+		<portlet:renderURL var="viewSuborganizationsURL">
+			<portlet:param name="struts_action" value="/directory/view" />
+			<portlet:param name="tabs1" value="organizations" />
+			<portlet:param name="viewUsersRedirect" value="<%= currentURL %>" />
+			<portlet:param name="parentOrganizationId" value="<%= String.valueOf(organizationId) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon image="view_locations" message="view-suborganizations" method="get" url="<%= viewSuborganizationsURL %>" />
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/organization_search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/organization_search.jsp
new file mode 100644
index 0000000..7930ee5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/organization_search.jsp
@@ -0,0 +1,103 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+OrganizationSearch searchContainer = (OrganizationSearch)request.getAttribute("liferay-ui:search:searchContainer");
+
+OrganizationDisplayTerms displayTerms = (OrganizationDisplayTerms)searchContainer.getDisplayTerms();
+
+String type = displayTerms.getType();
+%>
+
+<liferay-ui:search-toggle
+	autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>"
+	buttonLabel="search"
+	displayTerms="<%= displayTerms %>"
+	id="toggle_id_directory_organization_search"
+>
+	<aui:fieldset>
+		<aui:input name="<%= displayTerms.NAME %>" size="20" type="text" value="<%= displayTerms.getName() %>" />
+
+		<aui:select name="<%= displayTerms.TYPE %>">
+			<aui:option value=""></aui:option>
+
+			<%
+			for (String curType : PropsValues.ORGANIZATIONS_TYPES) {
+			%>
+
+				<aui:option label="<%= curType %>" selected="<%= type.equals(curType) %>" />
+
+			<%
+			}
+			%>
+
+		</aui:select>
+
+		<aui:input name="<%= displayTerms.STREET %>" size="20" type="text" value="<%= displayTerms.getStreet() %>" />
+
+		<aui:select label="country" name="<%= displayTerms.COUNTRY_ID %>" />
+
+		<aui:input name="<%= displayTerms.CITY %>" size="20" type="text" value="<%= displayTerms.getCity() %>" />
+
+		<aui:select label="region" name="<%= displayTerms.REGION_ID %>" />
+
+		<aui:input label="postal-code" name="<%= displayTerms.ZIP %>" size="20" type="text" value="<%= displayTerms.getZip() %>" />
+	</aui:fieldset>
+</liferay-ui:search-toggle>
+
+<%
+Organization parentOrganization = null;
+
+if (displayTerms.getParentOrganizationId() > 0) {
+	try {
+		parentOrganization = OrganizationLocalServiceUtil.getOrganization(displayTerms.getParentOrganizationId());
+	}
+	catch (NoSuchOrganizationException nsoe) {
+	}
+}
+%>
+
+<c:if test="<%= parentOrganization != null %>">
+	<aui:input name="<%= OrganizationDisplayTerms.PARENT_ORGANIZATION_ID %>" type="hidden" value="<%= parentOrganization.getOrganizationId() %>" />
+
+	<br />
+
+	<liferay-ui:message key="filter-by-organization" />: <%= HtmlUtil.escape(parentOrganization.getName()) %><br />
+</c:if>
+
+<aui:script use="liferay-dynamic-select">
+	new Liferay.DynamicSelect(
+		[
+			{
+				select: '<portlet:namespace /><%= displayTerms.COUNTRY_ID %>',
+				selectData: Liferay.Address.getCountries,
+				selectDesc: 'nameCurrentValue',
+				selectId: 'countryId',
+				selectSort: '<%= true %>',
+				selectVal: '<%= displayTerms.getCountryId() %>'
+			},
+			{
+				select: '<portlet:namespace /><%= displayTerms.REGION_ID %>',
+				selectData: Liferay.Address.getRegions,
+				selectDesc: 'name',
+				selectId: 'regionId',
+				selectVal: '<%= displayTerms.getRegionId() %>'
+			}
+		]
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/tabs1.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/tabs1.jsp
new file mode 100644
index 0000000..db2d800
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/tabs1.jsp
@@ -0,0 +1,38 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+PortletURL tabs1URL = renderResponse.createRenderURL();
+
+tabs1URL.setParameter("struts_action", "/directory/view");
+
+String tabs1Names = ParamUtil.getString(request, "tabs1Names", "users,organizations,user-groups");
+
+String tabs1Values = tabs1Names;
+
+String viewUsersRedirect = ParamUtil.getString(request, "viewUsersRedirect");
+String redirect = ParamUtil.getString(request, "redirect", viewUsersRedirect);
+String backURL = ParamUtil.getString(request, "backURL", redirect);
+%>
+
+<liferay-ui:tabs
+	backURL="<%= backURL %>"
+	names="<%= tabs1Names %>"
+	tabsValues="<%= tabs1Values %>"
+	url="<%= tabs1URL.toString() %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/addresses.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/addresses.jsp
new file mode 100644
index 0000000..e7fa551
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/addresses.jsp
@@ -0,0 +1,103 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+List<Organization> organizations = (List<Organization>)request.getAttribute("user.organizations");
+
+String className = (String)request.getAttribute("addresses.className");
+long classPK = (Long)request.getAttribute("addresses.classPK");
+
+List<Address> personalAddresses = Collections.emptyList();
+List<Address> organizationAddresses = new ArrayList<Address>();
+
+if (classPK > 0) {
+	personalAddresses = AddressServiceUtil.getAddresses(className, classPK);
+}
+
+for (int i = 0; i < organizations.size(); i++) {
+	try {
+		organizationAddresses.addAll(AddressServiceUtil.getAddresses(Organization.class.getName(), organizations.get(i).getOrganizationId()));
+	}
+	catch (Exception e) {
+	}
+}
+%>
+
+<c:if test="<%= !personalAddresses.isEmpty() || !organizationAddresses.isEmpty() %>">
+	<h3><liferay-ui:message key="address" /></h3>
+
+	<c:if test="<%= !organizationAddresses.isEmpty() %>">
+		<div>
+			<h4><liferay-ui:message key="organization-address" /></h4>
+
+			<ul class="property-list">
+
+			<%
+			for (Address address: organizationAddresses) {
+				String street1 = address.getStreet1();
+				String street2 = address.getStreet2();
+				String street3 = address.getStreet3();
+
+				String zipCode = address.getZip();
+				String city = address.getCity();
+
+				String mailingName = LanguageUtil.get(pageContext, address.getType().getName());
+			%>
+
+				<li class="<%= address.isPrimary() ? "primary" : "" %>">
+					<%@ include file="/html/portlet/directory/user/addresses_address.jspf" %>
+				</li>
+
+			<%
+			}
+			%>
+
+			</ul>
+		</div>
+	</c:if>
+
+	<c:if test="<%= !personalAddresses.isEmpty() %>">
+		<div>
+			<h4><liferay-ui:message key="personal-address" /></h4>
+
+			<ul class="property-list">
+
+			<%
+			for (Address address: personalAddresses) {
+				String street1 = address.getStreet1();
+				String street2 = address.getStreet2();
+				String street3 = address.getStreet3();
+
+				String zipCode = address.getZip();
+				String city = address.getCity();
+
+				String mailingName = LanguageUtil.get(pageContext, address.getType().getName());
+			%>
+
+				<li class="<%= address.isPrimary() ? "primary" : "" %>">
+					<%@ include file="/html/portlet/directory/user/addresses_address.jspf" %>
+				</li>
+
+			<%
+			}
+			%>
+
+			</ul>
+		</div>
+	</c:if>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/addresses_address.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/addresses_address.jspf
new file mode 100644
index 0000000..290f87c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/addresses_address.jspf
@@ -0,0 +1,39 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<em class="mailing-name"><%= mailingName %></em>
+
+<c:if test="<%= Validator.isNotNull(street1) %>">
+	<%= HtmlUtil.escape(street1) %><br />
+</c:if>
+
+<c:if test="<%= Validator.isNotNull(street2) %>">
+	<%= HtmlUtil.escape(street2) %><br />
+</c:if>
+
+<c:if test="<%= Validator.isNotNull(street3) %>">
+	<%= HtmlUtil.escape(street3) %><br />
+</c:if>
+
+<c:if test="<%= Validator.isNotNull(zipCode) %>">
+	<%= zipCode %>,
+</c:if>
+
+<c:if test="<%= Validator.isNotNull(city) %>">
+	<%= HtmlUtil.escape(city) %>
+</c:if>
+
+<c:if test="<%= address.isMailing() %>">(<liferay-ui:message key="mailing" />)</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/comments.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/comments.jsp
new file mode 100644
index 0000000..b34a3bb
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/comments.jsp
@@ -0,0 +1,27 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+User selUser = (User)request.getAttribute("user.selUser");
+%>
+
+<c:if test="<%= Validator.isNotNull(selUser.getComments()) %>">
+	<h3><liferay-ui:message key="comments" /></h3>
+
+	<%= selUser.getComments() %>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/details.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/details.jsp
new file mode 100644
index 0000000..90de9fa
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/details.jsp
@@ -0,0 +1,93 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+User selUser = (User)request.getAttribute("user.selUser");
+Contact selContact = (Contact)request.getAttribute("user.selContact");
+List<Organization> organizations = (List<Organization>)request.getAttribute("user.organizations");
+
+String organizationsHTML = StringPool.BLANK;
+
+if (!organizations.isEmpty()) {
+	organizationsHTML = organizations.get(0).getName();
+}
+
+for (int i = 1; i<organizations.size(); i++) {
+	organizationsHTML += ", "+ organizations.get(i).getName();
+}
+%>
+
+<h2><%= selUser.getFullName() %></h2>
+
+<div class="details">
+	<img alt="<liferay-ui:message key="avatar" />" class="avatar" id="<portlet:namespace />avatar" src="<%= selUser.getPortraitURL(themeDisplay) %>" />
+
+	<dl class="property-list">
+		<c:if test="<%= Validator.isNotNull(selUser.getDisplayEmailAddress()) %>">
+			<dt>
+				<liferay-ui:message key="email-address" />
+			</dt>
+			<dd>
+				<%= selUser.getDisplayEmailAddress() %>
+			</dd>
+		</c:if>
+
+		<c:if test="<%= PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.FIELD_ENABLE_COM_LIFERAY_PORTAL_MODEL_CONTACT_BIRTHDAY) %>">
+			<dt>
+				<liferay-ui:message key="birthday" />
+			</dt>
+			<dd>
+				<%= dateFormatDate.format(selUser.getBirthday()) %>
+			</dd>
+		</c:if>
+
+		<c:if test="<%= Validator.isNotNull(selContact.getJobTitle()) %>">
+			<dt>
+				<liferay-ui:message key="job-title" />
+			</dt>
+			<dd>
+				<%= HtmlUtil.escape(selContact.getJobTitle()) %>
+			</dd>
+		</c:if>
+
+		<c:if test="<%= PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.FIELD_ENABLE_COM_LIFERAY_PORTAL_MODEL_CONTACT_MALE) %>">
+			<dt>
+				<liferay-ui:message key="gender" />
+			</dt>
+			<dd>
+				<%= LanguageUtil.get(pageContext, selUser.isMale() ? "male" : "female") %>
+			</dd>
+		</c:if>
+
+		<c:if test="<%= !organizations.isEmpty() %>">
+			<dt>
+				<c:choose>
+					<c:when test="<%= organizations.size() > 1 %>">
+						<liferay-ui:message key="organizations" />
+					</c:when>
+					<c:otherwise>
+						<liferay-ui:message key="organization" />
+					</c:otherwise>
+				</c:choose>
+			</dt>
+			<dd>
+				<%= HtmlUtil.escape(organizationsHTML) %>
+			</dd>
+		</c:if>
+	</dl>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/instant_messenger.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/instant_messenger.jsp
new file mode 100644
index 0000000..ff416ee
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/instant_messenger.jsp
@@ -0,0 +1,92 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+Contact selContact = (Contact)request.getAttribute("user.selContact");
+
+String aim = selContact.getAimSn();
+String icq = selContact.getIcqSn();
+String jabber = selContact.getJabberSn();
+String msn = selContact.getMsnSn();
+String skype = selContact.getSkypeSn();
+String ym = selContact.getYmSn();
+%>
+
+<c:if test="<%= Validator.isNotNull(aim) || Validator.isNotNull(icq) || Validator.isNotNull(jabber) || Validator.isNotNull(msn) || Validator.isNotNull(skype) || Validator.isNotNull(ym) %>">
+	<h3><liferay-ui:message key="instant-messenger" /></h3>
+
+	<dl class="property-list">
+		<c:if test="<%= Validator.isNotNull(aim) %>">
+			<dt>
+				<liferay-ui:message key="aim" />
+			</dt>
+			<dd>
+				<%= HtmlUtil.escape(aim) %>
+			</dd>
+		</c:if>
+
+		<c:if test="<%= Validator.isNotNull(icq) %>">
+			<dt>
+				<liferay-ui:message key="icq" />
+			</dt>
+			<dd>
+				<%= HtmlUtil.escape(icq) %>
+
+				<img alt="" class="instant-messenger-logo" src="http://web.icq.com/whitepages/online?icq=<%= HtmlUtil.escapeAttribute(icq) %>&img=5" />
+			</dd>
+		</c:if>
+
+		<c:if test="<%= Validator.isNotNull(jabber) %>">
+			<dt>
+				<liferay-ui:message key="jabber" />
+			</dt>
+			<dd>
+				<%= HtmlUtil.escape(jabber) %>
+			</dd>
+		</c:if>
+
+		<c:if test="<%= Validator.isNotNull(skype) %>">
+			<dt>
+				<liferay-ui:message key="skype" />
+			</dt>
+			<dd>
+				<%= HtmlUtil.escape(skype) %>
+				<a href="callto://<%= HtmlUtil.escapeAttribute(skype) %>"><img alt="<liferay-ui:message key="call-this-user" />" class="instant-messenger-logo" src="http://mystatus.skype.com/smallicon/<%= HtmlUtil.escapeAttribute(skype) %>" /></a>
+			</dd>
+		</c:if>
+
+		<c:if test="<%= Validator.isNotNull(msn) %>">
+			<dt>
+				<liferay-ui:message key="windows-live-messenger" />
+			</dt>
+			<dd>
+				<%= HtmlUtil.escape(msn) %>
+			</dd>
+		</c:if>
+
+		<c:if test="<%= Validator.isNotNull(ym) %>">
+			<dt>
+				<liferay-ui:message key="yim" />
+			</dt>
+			<dd>
+				<%= HtmlUtil.escape(ym) %>
+				<img alt="" class="instant-messenger-logo" src="http://opi.yahoo.com/online?u=<%= HtmlUtil.escapeAttribute(ym) %>&m=g&t=0" />
+			</dd>
+		</c:if>
+	</dl>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/phone_numbers.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/phone_numbers.jsp
new file mode 100644
index 0000000..8271350
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/phone_numbers.jsp
@@ -0,0 +1,83 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+List<Organization> organizations = (List<Organization>)request.getAttribute("user.organizations");
+
+String className = (String)request.getAttribute("phones.className");
+long classPK = (Long)request.getAttribute("phones.classPK");
+
+List<Phone> personalPhones = Collections.emptyList();
+List<Phone> organizationPhones = new ArrayList<Phone>();
+
+if (classPK > 0) {
+	personalPhones = PhoneServiceUtil.getPhones(className, classPK);
+}
+
+for (int i = 0; i < organizations.size(); i++) {
+	try {
+		organizationPhones.addAll(PhoneServiceUtil.getPhones(Organization.class.getName(), organizations.get(i).getOrganizationId()));
+	}
+	catch (Exception e) {
+	}
+}
+%>
+
+<c:if test="<%= !personalPhones.isEmpty() || !organizationPhones.isEmpty() %>">
+	<h3><liferay-ui:message key="phones" /></h3>
+
+	<c:if test="<%= !organizationPhones.isEmpty() %>">
+		<h4><liferay-ui:message key="organization-phones" /></h4>
+
+		<ul class="property-list">
+
+		<%
+		for (Phone phone: organizationPhones) {
+		%>
+
+			<li class="<%= phone.isPrimary() ? "primary" : "" %>">
+				<%= phone.getNumber() %> <%= phone.getExtension() %> <%= LanguageUtil.get(pageContext, phone.getType().getName()) %>
+			</li>
+
+		<%
+		}
+		%>
+
+		</ul>
+	</c:if>
+
+	<c:if test="<%= !personalPhones.isEmpty() %>">
+		<h4><liferay-ui:message key="personal-phones" /></h4>
+
+		<ul class="property-list">
+
+		<%
+		for (Phone phone: personalPhones) {
+		%>
+
+			<li class="<%= phone.isPrimary() ? "primary" : "" %>">
+				<%= phone.getNumber() %> <%= phone.getExtension() %> <%= LanguageUtil.get(pageContext, phone.getType().getName()) %>
+			</li>
+
+		<%
+		}
+		%>
+
+		</ul>
+	</c:if>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/search_columns.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/search_columns.jspf
new file mode 100644
index 0000000..6978567
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/search_columns.jspf
@@ -0,0 +1,38 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/user/search_columns_user_name.jspf" %>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="screen-name"
+	orderable="<%= true %>"
+	property="screenName"
+/>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="job-title"
+	orderable="<%= true %>"
+	value="<%= user2.getJobTitle() %>"
+/>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="organizations"
+>
+	<liferay-ui:write bean="<%= user2 %>" property="organizations" />
+</liferay-ui:search-container-column-text>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/search_columns_user_name.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/search_columns_user_name.jspf
new file mode 100644
index 0000000..3dfc6eb
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/search_columns_user_name.jspf
@@ -0,0 +1,29 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="first-name"
+	orderable="<%= true %>"
+	property="firstName"
+/>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="last-name"
+	orderable="<%= true %>"
+	property="lastName"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/sms.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/sms.jsp
new file mode 100644
index 0000000..e0ae23d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/sms.jsp
@@ -0,0 +1,29 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+Contact selContact = (Contact)request.getAttribute("user.selContact");
+%>
+
+<c:if test="<%= Validator.isNotNull(selContact.getSmsSn()) %>">
+	<h3><liferay-ui:message key="sms" /></h3>
+
+	<ul class="property-list">
+		<li><%= HtmlUtil.escape(selContact.getSmsSn()) %></li>
+	</ul>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/social_network.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/social_network.jsp
new file mode 100644
index 0000000..faeffab
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user/social_network.jsp
@@ -0,0 +1,48 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+Contact selContact = (Contact)request.getAttribute("user.selContact");
+
+String facebook = selContact.getFacebookSn();
+String twitter = selContact.getTwitterSn();
+%>
+
+<c:if test="<%= Validator.isNotNull(facebook) || Validator.isNotNull(twitter) %>">
+	<h3><liferay-ui:message key="social-network" /></h3>
+
+	<dl class="property-list">
+		<c:if test="<%= Validator.isNotNull(facebook) %>">
+			<dt>
+				<liferay-ui:message key="facebook" />
+			</dt>
+			<dd>
+				<%= HtmlUtil.escape(facebook) %>
+			</dd>
+		</c:if>
+
+		<c:if test="<%= Validator.isNotNull(twitter) %>">
+			<dt>
+				<liferay-ui:message key="twitter" />
+			</dt>
+			<dd>
+				<%= HtmlUtil.escape(twitter) %>
+			</dd>
+		</c:if>
+	</dl>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user_group_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user_group_action.jsp
new file mode 100644
index 0000000..10b4f81
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user_group_action.jsp
@@ -0,0 +1,43 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+UserGroupSearch searchContainer = (UserGroupSearch)request.getAttribute("liferay-ui:search:searchContainer");
+
+String redirect = searchContainer.getIteratorURL().toString();
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+UserGroup userGroup = (UserGroup)row.getObject();
+%>
+
+<liferay-ui:icon-menu>
+	<portlet:renderURL var="viewUsersURL">
+		<portlet:param name="struts_action" value="/directory/view" />
+		<portlet:param name="tabs1" value="users" />
+		<portlet:param name="viewUsersRedirect" value="<%= currentURL %>" />
+		<portlet:param name="userGroupId" value="<%= String.valueOf(userGroup.getUserGroupId()) %>" />
+	</portlet:renderURL>
+
+	<liferay-ui:icon
+		image="view_users"
+		message="view-users"
+		method="get"
+		url="<%= viewUsersURL %>"
+	/>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user_group_search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user_group_search.jsp
new file mode 100644
index 0000000..1d70218
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user_group_search.jsp
@@ -0,0 +1,36 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+UserGroupSearch searchContainer = (UserGroupSearch)request.getAttribute("liferay-ui:search:searchContainer");
+
+UserGroupDisplayTerms displayTerms = (UserGroupDisplayTerms)searchContainer.getDisplayTerms();
+%>
+
+<liferay-ui:search-toggle
+	autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>"
+	buttonLabel="search"
+	displayTerms="<%= displayTerms %>"
+	id="toggle_id_directory_user_group_search"
+>
+	<aui:fieldset>
+		<aui:input name="<%= displayTerms.NAME %>" size="20" value="<%= displayTerms.getName() %>" />
+
+		<aui:input name="<%= displayTerms.DESCRIPTION %>" size="20" value="<%= displayTerms.getDescription() %>" />
+	</aui:fieldset>
+</liferay-ui:search-toggle>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user_search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user_search.jsp
new file mode 100644
index 0000000..361c674
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user_search.jsp
@@ -0,0 +1,38 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+UserSearch searchContainer = (UserSearch)request.getAttribute("liferay-ui:search:searchContainer");
+
+UserDisplayTerms displayTerms = (UserDisplayTerms)searchContainer.getDisplayTerms();
+%>
+
+<liferay-ui:search-toggle
+	autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>"
+	buttonLabel="search"
+	displayTerms="<%= displayTerms %>"
+	id="toggle_id_directory_user_search"
+>
+	<aui:fieldset>
+		<%@ include file="/html/portlet/directory/user_search_user_name.jspf" %>
+
+		<aui:input name="<%= displayTerms.SCREEN_NAME %>" size="20" type="text" value="<%= displayTerms.getScreenName() %>" />
+
+		<aui:input name="<%= displayTerms.EMAIL_ADDRESS %>" size="20" type="text" value="<%= displayTerms.getEmailAddress() %>" />
+	</aui:fieldset>
+</liferay-ui:search-toggle>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user_search_user_name.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user_search_user_name.jspf
new file mode 100644
index 0000000..a2b1e49
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/user_search_user_name.jspf
@@ -0,0 +1,21 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<aui:input name="<%= displayTerms.FIRST_NAME %>" size="20" type="text" value="<%= displayTerms.getFirstName() %>" />
+
+<aui:input name="<%= displayTerms.MIDDLE_NAME %>" size="20" type="text" value="<%= displayTerms.getMiddleName() %>" />
+
+<aui:input name="<%= displayTerms.LAST_NAME %>" size="20" type="text" value="<%= displayTerms.getLastName() %>" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/view.jsp
new file mode 100644
index 0000000..f3cb8b5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/view.jsp
@@ -0,0 +1,54 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/directory/view");
+portletURL.setParameter("tabs1", tabs1);
+
+pageContext.setAttribute("portletURL", portletURL);
+
+String portletURLString = portletURL.toString();
+
+request.setAttribute("view.jsp-portletURL", portletURL);
+request.setAttribute("view.jsp-portletURLString", portletURLString);
+%>
+
+<aui:form action="<%= portletURLString %>" method="get" name="fm">
+	<liferay-portlet:renderURLParams varImpl="portletURL" />
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="tabs1" type="hidden" value="<%= tabs1 %>" />
+	<aui:input name="redirect" type="hidden" value="<%= portletURLString %>" />
+
+	<c:if test="<%= !portletName.equals(PortletKeys.FRIENDS_DIRECTORY) %>">
+		<liferay-util:include page="/html/portlet/directory/tabs1.jsp" />
+	</c:if>
+
+	<c:choose>
+		<c:when test='<%= tabs1.equals("users") %>'>
+			<liferay-util:include page="/html/portlet/directory/view_users.jsp" />
+		</c:when>
+		<c:when test='<%= tabs1.equals("organizations") %>'>
+			<liferay-util:include page="/html/portlet/directory/view_organizations.jsp" />
+		</c:when>
+		<c:when test='<%= tabs1.equals("user-groups") %>'>
+			<liferay-util:include page="/html/portlet/directory/view_user_groups.jsp" />
+		</c:when>
+	</c:choose>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/view_organization.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/view_organization.jsp
new file mode 100644
index 0000000..0690166
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/view_organization.jsp
@@ -0,0 +1,65 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+Organization organization = (Organization)request.getAttribute(WebKeys.ORGANIZATION);
+
+long organizationId = BeanParamUtil.getLong(organization, request, "organizationId");
+
+request.setAttribute(WebKeys.ORGANIZATION, organization);
+request.setAttribute("addresses.className", Organization.class.getName());
+request.setAttribute("addresses.classPK", organizationId);
+request.setAttribute("emailAddresses.className", Organization.class.getName());
+request.setAttribute("emailAddresses.classPK", organizationId);
+request.setAttribute("phones.className", Organization.class.getName());
+request.setAttribute("phones.classPK", organizationId);
+request.setAttribute("websites.className", Organization.class.getName());
+request.setAttribute("websites.classPK", organizationId);
+%>
+
+<liferay-util:include page="/html/portlet/directory/tabs1.jsp" />
+
+<div class="organization-information">
+	<div class="section entity-details">
+		<liferay-util:include page="/html/portlet/directory/organization/details.jsp" />
+	</div>
+
+	<div class="section entity-email-addresses">
+		<liferay-util:include page="/html/portlet/directory/common/additional_email_addresses.jsp" />
+	</div>
+
+	<div class="section entity-websites">
+		<liferay-util:include page="/html/portlet/directory/common/websites.jsp" />
+	</div>
+
+	<div class="section entity-addresses">
+		<liferay-util:include page="/html/portlet/directory/organization/addresses.jsp" />
+	</div>
+
+	<div class="section entity-phones">
+		<liferay-util:include page="/html/portlet/directory/organization/phone_numbers.jsp" />
+	</div>
+
+	<div class="section entity-services">
+		<liferay-util:include page="/html/portlet/directory/organization/services.jsp" />
+	</div>
+
+	<div class="section entity-comments">
+		<liferay-util:include page="/html/portlet/directory/organization/comments.jsp" />
+	</div>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/view_organizations.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/view_organizations.jsp
new file mode 100644
index 0000000..6e2b4c7
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/view_organizations.jsp
@@ -0,0 +1,112 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+PortletURL portletURL = (PortletURL)request.getAttribute("view.jsp-portletURL");
+
+long parentOrganizationId = ParamUtil.getLong(request, "parentOrganizationId", OrganizationConstants.DEFAULT_PARENT_ORGANIZATION_ID);
+
+if (parentOrganizationId > 0) {
+	portletURL.setParameter("parentOrganizationId", String.valueOf(parentOrganizationId));
+}
+%>
+
+<liferay-ui:search-container
+	searchContainer="<%= new OrganizationSearch(renderRequest, portletURL) %>"
+	var="organizationSearchContainer"
+>
+	<aui:input disabled="<%= true %>" name="organizationsRedirect" type="hidden" value="<%= portletURL.toString() %>" />
+
+	<liferay-ui:search-form
+		page="/html/portlet/directory/organization_search.jsp"
+	/>
+
+	<%
+	OrganizationSearchTerms searchTerms = (OrganizationSearchTerms)organizationSearchContainer.getSearchTerms();
+
+	LinkedHashMap<String, Object> organizationParams = new LinkedHashMap<String, Object>();
+
+	if (parentOrganizationId <= 0) {
+		parentOrganizationId = OrganizationConstants.ANY_PARENT_ORGANIZATION_ID;
+	}
+
+	if (portletName.equals(PortletKeys.MY_SITES_DIRECTORY)) {
+		LinkedHashMap<String, Object> groupParams = new LinkedHashMap<String, Object>();
+
+		groupParams.put("inherit", Boolean.FALSE);
+		groupParams.put("site", Boolean.TRUE);
+		groupParams.put("usersGroups", user.getUserId());
+
+		List<Group> groups = GroupLocalServiceUtil.search(user.getCompanyId(), groupParams, QueryUtil.ALL_POS,QueryUtil.ALL_POS);
+
+		organizationParams.put("organizationsGroups", SitesUtil.filterGroups(groups, PropsValues.MY_SITES_DIRECTORY_SITE_EXCLUDES));
+	}
+	else if (portletName.equals(PortletKeys.SITE_MEMBERS_DIRECTORY)) {
+		organizationParams.put("organizationsGroups", new Long(themeDisplay.getScopeGroupId()));
+	}
+
+	if (Validator.isNotNull(searchTerms.getKeywords()) || searchTerms.isAdvancedSearch()) {
+		if (parentOrganizationId != OrganizationConstants.ANY_PARENT_ORGANIZATION_ID) {
+			List<Long> excludedOrganizationIds = new ArrayList<Long>();
+
+			excludedOrganizationIds.add(parentOrganizationId);
+
+			organizationParams.put("excludedOrganizationIds", excludedOrganizationIds);
+
+			Organization parentOrganization = OrganizationLocalServiceUtil.getOrganization(parentOrganizationId);
+
+			List<Organization> organizations = new ArrayList<Organization>();
+
+			organizations.add(parentOrganization);
+
+			organizationParams.put("organizationsTree", organizations);
+		}
+	}
+	%>
+
+	<liferay-ui:search-container-results>
+		<c:choose>
+			<c:when test="<%= portletName.equals(PortletKeys.DIRECTORY) && PropsValues.ORGANIZATIONS_INDEXER_ENABLED && PropsValues.ORGANIZATIONS_SEARCH_WITH_INDEX %>">
+				<%@ include file="/html/portlet/users_admin/organization_search_results_index.jspf" %>
+			</c:when>
+			<c:otherwise>
+				<%@ include file="/html/portlet/users_admin/organization_search_results_database.jspf" %>
+			</c:otherwise>
+		</c:choose>
+	</liferay-ui:search-container-results>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.Organization"
+		escapedModel="<%= true %>"
+		keyProperty="organizationId"
+		modelVar="organization"
+	>
+		<portlet:renderURL var="rowURL">
+			<portlet:param name="struts_action" value="/directory/view_organization" />
+			<portlet:param name="tabs1" value="<%= HtmlUtil.escape(tabs1) %>" />
+			<portlet:param name="redirect" value="<%= organizationSearchContainer.getIteratorURL().toString() %>" />
+			<portlet:param name="organizationId" value="<%= String.valueOf(organization.getOrganizationId()) %>" />
+		</portlet:renderURL>
+
+		<%@ include file="/html/portlet/directory/organization/search_columns.jspf" %>
+	</liferay-ui:search-container-row>
+
+	<div class="separator"><!-- --></div>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/view_user.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/view_user.jsp
new file mode 100644
index 0000000..eeaff8a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/view_user.jsp
@@ -0,0 +1,79 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+User selUser = PortalUtil.getSelectedUser(request);
+
+selUser = selUser.toEscapedModel();
+
+Contact selContact = selUser.getContact();
+
+List<Organization> organizations = OrganizationLocalServiceUtil.getUserOrganizations(selUser.getUserId());
+
+request.setAttribute("user.selUser", selUser);
+request.setAttribute("user.selContact", selContact);
+request.setAttribute("user.organizations", organizations);
+request.setAttribute("addresses.className", Contact.class.getName());
+request.setAttribute("addresses.classPK", selContact.getContactId());
+request.setAttribute("emailAddresses.className", Contact.class.getName());
+request.setAttribute("emailAddresses.classPK", selContact.getContactId());
+request.setAttribute("phones.className", Contact.class.getName());
+request.setAttribute("phones.classPK", selContact.getContactId());
+request.setAttribute("websites.className", Contact.class.getName());
+request.setAttribute("websites.classPK", selContact.getContactId());
+%>
+
+<liferay-util:include page="/html/portlet/directory/tabs1.jsp" />
+
+<div class="user-information">
+	<div class="section entity-details">
+		<liferay-util:include page="/html/portlet/directory/user/details.jsp" />
+	</div>
+
+	<div class="section entity-addresses">
+		<liferay-util:include page="/html/portlet/directory/user/addresses.jsp" />
+	</div>
+
+	<div class="section entity-email-addresses">
+		<liferay-util:include page="/html/portlet/directory/common/additional_email_addresses.jsp" />
+	</div>
+
+	<div class="section entity-websites">
+		<liferay-util:include page="/html/portlet/directory/common/websites.jsp" />
+	</div>
+
+	<div class="section entity-phones">
+		<liferay-util:include page="/html/portlet/directory/user/phone_numbers.jsp" />
+	</div>
+
+	<div class="section entity-instant-messenger">
+		<liferay-util:include page="/html/portlet/directory/user/instant_messenger.jsp" />
+	</div>
+
+	<div class="section entity-social-network">
+		<liferay-util:include page="/html/portlet/directory/user/social_network.jsp" />
+	</div>
+
+	<div class="section entity-sms">
+		<liferay-util:include page="/html/portlet/directory/user/sms.jsp" />
+	</div>
+
+	<div class="section entity-comments">
+		<liferay-util:include page="/html/portlet/directory/user/comments.jsp" />
+	</div>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/view_user_groups.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/view_user_groups.jsp
new file mode 100644
index 0000000..a931ce1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/view_user_groups.jsp
@@ -0,0 +1,91 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+PortletURL portletURL = (PortletURL)request.getAttribute("view.jsp-portletURL");
+%>
+
+<liferay-ui:search-container
+	searchContainer="<%= new UserGroupSearch(renderRequest, portletURL) %>"
+>
+	<aui:input disabled="<%= true %>" name="userGroupsRedirect" type="hidden" value="<%= portletURL.toString() %>" />
+
+	<liferay-ui:search-form
+		page="/html/portlet/directory/user_group_search.jsp"
+	/>
+
+	<%
+	UserGroupDisplayTerms searchTerms = (UserGroupDisplayTerms)searchContainer.getSearchTerms();
+
+	LinkedHashMap<String, Object> userGroupParams = new LinkedHashMap<String, Object>();
+
+	if (portletName.equals(PortletKeys.MY_SITES_DIRECTORY)) {
+		LinkedHashMap<String, Object> groupParams = new LinkedHashMap<String, Object>();
+
+		groupParams.put("inherit", Boolean.FALSE);
+		groupParams.put("site", Boolean.TRUE);
+		groupParams.put("usersGroups", user.getUserId());
+
+		List<Group> groups = GroupLocalServiceUtil.search(user.getCompanyId(), groupParams, QueryUtil.ALL_POS,QueryUtil.ALL_POS);
+
+		userGroupParams.put("userGroupsGroups", SitesUtil.filterGroups(groups, PropsValues.MY_SITES_DIRECTORY_SITE_EXCLUDES));
+	}
+	else if (portletName.equals(PortletKeys.SITE_MEMBERS_DIRECTORY)) {
+		userGroupParams.put("userGroupsGroups", new Long(themeDisplay.getScopeGroupId()));
+	}
+	%>
+
+	<liferay-ui:search-container-results>
+		<c:choose>
+			<c:when test="<%= portletName.equals(PortletKeys.DIRECTORY) && PropsValues.USER_GROUPS_INDEXER_ENABLED && PropsValues.USER_GROUPS_SEARCH_WITH_INDEX %>">
+				<%@ include file="/html/portlet/user_groups_admin/user_group_search_results_index.jspf" %>
+			</c:when>
+			<c:otherwise>
+				<%@ include file="/html/portlet/user_groups_admin/user_group_search_results_database.jspf" %>
+			</c:otherwise>
+		</c:choose>
+	</liferay-ui:search-container-results>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.UserGroup"
+		escapedModel="<%= true %>"
+		keyProperty="userGroupId"
+		modelVar="userGroup"
+	>
+		<liferay-ui:search-container-column-text
+			name="name"
+			orderable="<%= true %>"
+			property="name"
+		/>
+
+		<liferay-ui:search-container-column-text
+			name="description"
+			orderable="<%= true %>"
+			property="description"
+		/>
+
+		<liferay-ui:search-container-column-jsp
+			align="right"
+			path="/html/portlet/directory/user_group_action.jsp"
+		/>
+	</liferay-ui:search-container-row>
+
+	<div class="separator"><!-- --></div>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/view_users.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/view_users.jsp
new file mode 100644
index 0000000..3606ee6
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/directory/view_users.jsp
@@ -0,0 +1,162 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/init.jsp" %>
+
+<%
+String viewUsersRedirect = ParamUtil.getString(request, "viewUsersRedirect");
+
+PortletURL portletURL = (PortletURL)request.getAttribute("view.jsp-portletURL");
+
+if (Validator.isNotNull(viewUsersRedirect)) {
+	portletURL.setParameter("viewUsersRedirect", viewUsersRedirect);
+}
+%>
+
+<c:if test="<%= Validator.isNotNull(viewUsersRedirect) %>">
+	<aui:input name="viewUsersRedirect" type="hidden" value="<%= viewUsersRedirect %>" />
+</c:if>
+
+<liferay-ui:search-container
+	searchContainer="<%= new UserSearch(renderRequest, portletURL) %>"
+	var="userSearchContainer"
+>
+	<aui:input disabled="<%= true %>" name="usersRedirect" type="hidden" value="<%= portletURL.toString() %>" />
+
+	<%
+	UserSearchTerms searchTerms = (UserSearchTerms)userSearchContainer.getSearchTerms();
+
+	long organizationId = searchTerms.getOrganizationId();
+	long userGroupId = searchTerms.getUserGroupId();
+
+	Organization organization = null;
+
+	if (organizationId > 0) {
+		try {
+			organization = OrganizationLocalServiceUtil.getOrganization(organizationId);
+		}
+		catch (NoSuchOrganizationException nsoe) {
+		}
+	}
+
+	UserGroup userGroup = null;
+
+	if (userGroupId > 0) {
+		try {
+			userGroup = UserGroupLocalServiceUtil.getUserGroup(userGroupId);
+		}
+		catch (NoSuchUserGroupException nsuge) {
+		}
+	}
+	%>
+
+	<c:if test="<%= organization != null %>">
+		<aui:input name="<%= UserDisplayTerms.ORGANIZATION_ID %>" type="hidden" value="<%= organization.getOrganizationId() %>" />
+
+		<h3><%= HtmlUtil.escape(LanguageUtil.format(pageContext, "users-of-x", organization.getName())) %></h3>
+	</c:if>
+
+	<c:if test="<%= userGroup != null %>">
+		<aui:input name="<%= UserDisplayTerms.USER_GROUP_ID %>" type="hidden" value="<%= userGroup.getUserGroupId() %>" />
+
+		<h3><%= LanguageUtil.format(pageContext, "users-of-x", HtmlUtil.escape(userGroup.getName())) %></h3>
+	</c:if>
+
+	<liferay-ui:search-form
+		page="/html/portlet/directory/user_search.jsp"
+	/>
+
+	<%
+	LinkedHashMap<String, Object> userParams = new LinkedHashMap<String, Object>();
+
+	if (organizationId > 0) {
+		userParams.put("usersOrgs", new Long(organizationId));
+	}
+
+	if (userGroupId > 0) {
+		userParams.put("usersUserGroups", new Long(userGroupId));
+	}
+
+	if (portletName.equals(PortletKeys.FRIENDS_DIRECTORY)) {
+		userParams.put("socialRelationType", new Long[] {themeDisplay.getUserId(), new Long(SocialRelationConstants.TYPE_BI_FRIEND)});
+	}
+	else if (portletName.equals(PortletKeys.MY_SITES_DIRECTORY) && (organizationId == 0) && (userGroupId == 0)) {
+		LinkedHashMap<String, Object> groupParams = new LinkedHashMap<String, Object>();
+
+		groupParams.put("inherit", Boolean.FALSE);
+		groupParams.put("site", Boolean.TRUE);
+		groupParams.put("usersGroups", user.getUserId());
+
+		userParams.put("inherit", Boolean.TRUE);
+
+		List<Group> groups = GroupLocalServiceUtil.search(user.getCompanyId(), groupParams, QueryUtil.ALL_POS,QueryUtil.ALL_POS);
+
+		userParams.put("usersGroups", SitesUtil.filterGroups(groups, PropsValues.MY_SITES_DIRECTORY_SITE_EXCLUDES));
+	}
+	else if (portletName.equals(PortletKeys.SITE_MEMBERS_DIRECTORY) && (organizationId == 0) && (userGroupId == 0)) {
+		userParams.put("inherit", Boolean.TRUE);
+		userParams.put("usersGroups", new Long(themeDisplay.getScopeGroupId()));
+	}
+	%>
+
+	<liferay-ui:search-container-results>
+		<c:choose>
+			<c:when test="<%= portletName.equals(PortletKeys.DIRECTORY) && PropsValues.USERS_INDEXER_ENABLED && PropsValues.USERS_SEARCH_WITH_INDEX %>">
+				<%@ include file="/html/portlet/users_admin/user_search_results_index.jspf" %>
+			</c:when>
+			<c:otherwise>
+				<%@ include file="/html/portlet/users_admin/user_search_results_database.jspf" %>
+			</c:otherwise>
+		</c:choose>
+	</liferay-ui:search-container-results>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.User"
+		escapedModel="<%= true %>"
+		keyProperty="userId"
+		modelVar="user2"
+		rowIdProperty="screenName"
+	>
+		<liferay-portlet:renderURL varImpl="rowURL">
+			<portlet:param name="struts_action" value="/directory/view_user" />
+			<portlet:param name="tabs1" value="<%= HtmlUtil.escape(tabs1) %>" />
+			<portlet:param name="redirect" value="<%= userSearchContainer.getIteratorURL().toString() %>" />
+			<portlet:param name="p_u_i_d" value="<%= String.valueOf(user2.getUserId()) %>" />
+		</liferay-portlet:renderURL>
+
+		<%@ include file="/html/portlet/directory/user/search_columns.jspf" %>
+	</liferay-ui:search-container-row>
+
+	<c:if test="<%= (organization != null) || (userGroup != null) %>">
+		<br />
+	</c:if>
+
+	<c:if test="<%= organization != null %>">
+		<aui:input name="<%= UserDisplayTerms.ORGANIZATION_ID %>" type="hidden" value="<%= organization.getOrganizationId() %>" />
+
+		<liferay-ui:message key="filter-by-organization" />: <%= HtmlUtil.escape(organization.getName()) %><br />
+	</c:if>
+
+	<c:if test="<%= userGroup != null %>">
+		<aui:input name="<%= UserDisplayTerms.USER_GROUP_ID %>" type="hidden" value="<%= userGroup.getUserGroupId() %>" />
+
+		<liferay-ui:message key="filter-by-user-group" />: <%= HtmlUtil.escape(userGroup.getName()) %><br />
+	</c:if>
+
+	<div class="separator"><!-- --></div>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/add_application.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/add_application.jsp
new file mode 100644
index 0000000..d358a8f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/add_application.jsp
@@ -0,0 +1,212 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dockbar/init.jsp" %>
+
+<%
+PortletURL refererURL = renderResponse.createActionURL();
+
+refererURL.setParameter("updateLayout", "true");
+%>
+
+<aui:form action='<%= themeDisplay.getPathMain() + "/portal/update_layout?p_auth=" + AuthTokenUtil.getToken(request) + "&p_l_id=" + plid + "&p_v_l_s_g_id=" + themeDisplay.getSiteGroupId() %>' method="post" name="addApplicationForm">
+	<aui:input name="doAsUserId" type="hidden" value="<%= themeDisplay.getDoAsUserId() %>" />
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="template" />
+	<aui:input name="<%= WebKeys.REFERER %>" type="hidden" value="<%= refererURL.toString() %>" />
+	<aui:input name="refresh" type="hidden" value="<%= true %>" />
+
+	<div class="row-fluid" id="<portlet:namespace />applicationList">
+		<c:if test="<%= layout.isTypePortlet() %>">
+			<div class="search-panel btn-toolbar">
+				<aui:input cssClass="search-query span12" label="" name="searchApplication" type="text"  />
+			</div>
+		</c:if>
+
+		<%
+		String panelContainerId = "addApplicationPanelContainer";
+
+		List<Portlet> portlets = new ArrayList<Portlet>();
+
+		for (String portletId : PropsValues.DOCKBAR_ADD_PORTLETS) {
+			Portlet portlet = PortletLocalServiceUtil.getPortletById(portletId);
+
+			if ((portlet != null) && portlet.isInclude() && portlet.isActive() && PortletPermissionUtil.contains(permissionChecker, layout, portlet, ActionKeys.ADD_TO_PAGE)) {
+				portlets.add(portlet);
+			}
+		}
+
+		int portletCategoryIndex = 0;
+		%>
+
+		<liferay-ui:panel-container id="<%= panelContainerId %>">
+			<c:if test="<%= portlets.size() > 0 %>">
+
+				<%
+				String panelId = renderResponse.getNamespace() + "portletCategory" + portletCategoryIndex;
+				%>
+
+				<div class="lfr-add-content">
+					<liferay-ui:panel collapsible="<%= layout.isTypePortlet() %>" cssClass="lfr-content-category lfr-component panel-page-category" extended="<%= true %>" id="<%= panelId %>" persistState="<%= true %>" title='<%= LanguageUtil.get(pageContext, "highlighted") %>'>
+						<aui:nav collapsible="<%= false %>" cssClass="nav-list">
+
+							<%
+							for (Portlet portlet : portlets) {
+								if (!PortletPermissionUtil.contains(permissionChecker, layout, portlet.getPortletId(), ActionKeys.ADD_TO_PAGE)) {
+									continue;
+								}
+
+								boolean portletInstanceable = portlet.isInstanceable();
+
+								boolean portletUsed = layoutTypePortlet.hasPortletId(portlet.getPortletId());
+
+								boolean portletLocked = (!portletInstanceable && portletUsed);
+
+								Map<String, Object> data = new HashMap<String, Object>();
+
+								data.put("draggable", "true");
+								data.put("id", renderResponse.getNamespace() + "portletItem" + portlet.getPortletId());
+								data.put("instanceable", portletInstanceable);
+								data.put("plid", plid);
+								data.put("portlet-id", portlet.getPortletId());
+								data.put("title", PortalUtil.getPortletTitle(portlet, application, locale));
+
+								String cssClass = "drag-content-item";
+
+								if (portletLocked) {
+									cssClass += " lfr-portlet-used";
+								}
+							%>
+
+							<aui:nav-item cssClass="lfr-content-item" href="">
+								<span <%= AUIUtil.buildData(data) %> class="<%= cssClass %>">
+									<i class="<%= portletInstanceable ? "icon-th-large" : "icon-stop" %>"></i>
+
+									<liferay-ui:message key="<%= PortalUtil.getPortletTitle(portlet, application, locale) %>" />
+								</span>
+
+								<%
+								data.remove("draggable");
+								%>
+
+								<span <%= AUIUtil.buildData(data) %> class='add-content-item <%= portletLocked ? "lfr-portlet-used" : StringPool.BLANK %>'>
+									<liferay-ui:message key="add" />
+								</span>
+							</aui:nav-item>
+
+							<%
+							}
+							%>
+
+						</aui:nav>
+					</liferay-ui:panel>
+				</div>
+
+				<%
+				portletCategoryIndex++;
+				%>
+
+			</c:if>
+
+			<%
+			PortletCategory portletCategory = (PortletCategory)WebAppPool.get(company.getCompanyId(), WebKeys.PORTLET_CATEGORY);
+
+			portletCategory = PortletCategoryUtil.getRelevantPortletCategory(permissionChecker, user.getCompanyId(), layout, portletCategory, layoutTypePortlet);
+
+			List<PortletCategory> categories = ListUtil.fromCollection(portletCategory.getCategories());
+
+			categories = ListUtil.sort(categories, new PortletCategoryComparator(locale));
+
+			for (PortletCategory curPortletCategory : categories) {
+				if (curPortletCategory.isHidden()) {
+					continue;
+				}
+
+				request.setAttribute(WebKeys.PORTLET_CATEGORY, curPortletCategory);
+				request.setAttribute(WebKeys.PORTLET_CATEGORY_INDEX, String.valueOf(portletCategoryIndex));
+			%>
+
+			<liferay-util:include page="/html/portlet/dockbar/view_category.jsp">
+				<liferay-util:param name="panelContainerId" value="<%= panelContainerId %>" />
+			</liferay-util:include>
+
+			<%
+				portletCategoryIndex++;
+			}
+			%>
+
+		</liferay-ui:panel-container>
+
+		<c:if test="<%= layout.isTypePortlet() %>">
+			<ul class="lfr-add-apps-legend nav-list unstyled">
+				<li>
+					<aui:icon image="stop" label="can-be-added-once" />
+				</li>
+				<li>
+					<aui:icon image="th-large" label="can-be-added-several-times" />
+				</li>
+			</ul>
+
+			<div class="alert alert-info lfr-drag-portlet-message">
+				<liferay-ui:message key="to-add-a-portlet-to-the-page-just-drag-it" />
+			</div>
+		</c:if>
+
+		<c:if test="<%= !layout.isTypePanel() && permissionChecker.isOmniadmin() && PortletLocalServiceUtil.hasPortlet(themeDisplay.getCompanyId(), PortletKeys.MARKETPLACE_STORE) %>">
+
+			<%
+			long controlPanelPlid = PortalUtil.getControlPanelPlid(company.getCompanyId());
+
+			PortletURLImpl marketplaceURL = new PortletURLImpl(request, PortletKeys.MARKETPLACE_STORE, controlPanelPlid, PortletRequest.RENDER_PHASE);
+			%>
+
+			<p class="lfr-install-more">
+				<aui:a cssClass="btn btn-primary" href='<%= HttpUtil.removeParameter(marketplaceURL.toString(), "controlPanelCategory") %>' label="install-more-applications" />
+			</p>
+		</c:if>
+	</div>
+</aui:form>
+
+<aui:script use="liferay-dockbar-add-application,liferay-dockbar-portlet-dd">
+	var searchApplication = A.one('#<portlet:namespace />searchApplication');
+
+	var addApplication = new Liferay.Dockbar.AddApplication(
+		{
+			focusItem: searchApplication,
+			inputNode: searchApplication,
+			namespace: '<portlet:namespace />',
+			nodeList: A.one('#<portlet:namespace />applicationList'),
+			nodeSelector: '.drag-content-item',
+			selected: !A.one('#<portlet:namespace />addApplicationForm').ancestor().hasClass('hide')
+		}
+	);
+
+	addApplication.plug(
+		Liferay.Dockbar.PortletDragDrop,
+		{
+			on: {
+				dragEnd: function(event) {
+					addApplication.addPortlet(
+						event.portletNode,
+						{
+							item: event.appendNode
+						}
+					);
+				}
+			},
+			srcNode: '#<portlet:namespace />applicationList'
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/add_content.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/add_content.jsp
new file mode 100644
index 0000000..f7fe41e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/add_content.jsp
@@ -0,0 +1,124 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dockbar/init.jsp" %>
+
+<%
+int deltaDefault = GetterUtil.getInteger(SessionClicks.get(request, "liferay_addpanel_numitems", "10"));
+
+int delta = ParamUtil.getInteger(request, "delta", deltaDefault);
+%>
+
+<portlet:resourceURL var="updateContentListURL">
+	<portlet:param name="struts_action" value="/dockbar/view" />
+	<portlet:param name="redirect" value="<%= currentURL %>" />
+</portlet:resourceURL>
+
+<aui:form action="<%= updateContentListURL %>" name="addContentForm" onSubmit="event.preventDefault();">
+	<div class="row-fluid">
+		<div class="btn-toolbar">
+			<aui:input cssClass="input-small search-query" inlineField="<%= true %>" label="" name="searchContent" type="text" />
+
+			<%
+			String displayStyleDefault = GetterUtil.getString(SessionClicks.get(request, "liferay_addpanel_displaystyle", "descriptive"));
+
+			String displayStyle = ParamUtil.getString(request, "displayStyle", displayStyleDefault);
+			%>
+
+			<div class="btn-group" id="<portlet:namespace />styleButtons">
+				<aui:button cssClass='<%= displayStyle.equals("icon") ? "active" : StringPool.BLANK %>' data-style="icon" icon="icon-th-large" />
+
+				<aui:button cssClass='<%= displayStyle.equals("descriptive") ? "active" : StringPool.BLANK %>' data-style="descriptive" icon="icon-th-list" />
+
+				<aui:button cssClass='<%= displayStyle.equals("list") ? "active" : StringPool.BLANK %>' data-style="list" icon="icon-list" />
+			</div>
+
+			<aui:select cssClass="input-mini" inlineField="<%= true %>" label="" name="numItems">
+
+				<%
+				for (int curDelta : PropsValues.SEARCH_CONTAINER_PAGE_DELTA_VALUES) {
+					if (curDelta > SearchContainer.MAX_DELTA) {
+						continue;
+					}
+				%>
+
+					<aui:option label="<%= curDelta %>" selected="<%= delta == curDelta %>" />
+
+				<%
+				}
+				%>
+
+			</aui:select>
+		</div>
+
+		<span class="add-content-button">
+
+			<%
+			long groupId = scopeGroupId;
+
+			long[] groupIds = new long[] {scopeGroupId};
+
+			boolean defaultAssetPublisher = false;
+
+			PortletURL redirectURL = liferayPortletResponse.createLiferayPortletURL(themeDisplay.getPlid(), portletDisplay.getId(), PortletRequest.RENDER_PHASE, false);
+
+			redirectURL.setParameter("struts_action", "/dockbar/add_content_redirect");
+			redirectURL.setWindowState(LiferayWindowState.POP_UP);
+
+			Map<String, PortletURL> addPortletURLs = AssetUtil.getAddPortletURLs(liferayPortletRequest, liferayPortletResponse, AssetRendererFactoryRegistryUtil.getClassNameIds(company.getCompanyId()), new long[0], new long[0], new String[0], redirectURL.toString());
+			%>
+
+			<%@ include file="/html/portlet/asset_publisher/add_asset.jspf" %>
+		</span>
+
+		<div id="<portlet:namespace />entriesContainer">
+			<liferay-util:include page="/html/portlet/dockbar/view_resources.jsp" />
+		</div>
+	</div>
+</aui:form>
+
+<aui:script use="liferay-dockbar-add-content,liferay-dockbar-portlet-dd">
+	var searchContent = A.one('#<portlet:namespace />searchContent');
+
+	var addContent = new Liferay.Dockbar.AddContent(
+		{
+			focusItem: searchContent,
+			inputNode: searchContent,
+			namespace: '<portlet:namespace />',
+			plugins: [
+				{
+					cfg: {
+						srcNode: '#<portlet:namespace />entriesContainer'
+					},
+					fn: Liferay.Dockbar.PortletDragDrop
+				}
+			],
+			selected: !A.one('#<portlet:namespace />addContentForm').ancestor().hasClass('hide')
+		}
+	);
+
+	addContent.portletdd.on(
+		'dragEnd',
+		function(event) {
+			addContent.addPortlet(
+				event.portletNode,
+				{
+					item: event.appendNode
+				}
+			);
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/add_content_redirect.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/add_content_redirect.jsp
new file mode 100644
index 0000000..a773564
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/add_content_redirect.jsp
@@ -0,0 +1,73 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dockbar/init.jsp" %>
+
+<%
+String redirect = request.getParameter("redirect");
+
+Portlet selPortlet = PortletLocalServiceUtil.getPortletById(company.getCompanyId(), portletDisplay.getId());
+
+String className = ParamUtil.getString(request, "className");
+long classPK = ParamUtil.getLong(request, "classPK");
+
+Map<String, Object> data = new HashMap<String, Object>();
+
+if (Validator.isNotNull(className) && (classPK > 0)) {
+	AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(className);
+
+	AssetRenderer assetRenderer = assetRendererFactory.getAssetRenderer(classPK);
+
+	data.put("class-name", className);
+	data.put("class-pk", classPK);
+	data.put("instanceable", true);
+	data.put("portlet-id", assetRenderer.getAddToPagePortletId());
+}
+%>
+
+<span <%= AUIUtil.buildData(data) %> class="aui-helper-hidden portlet-item"></span>
+
+<aui:script use="aui-base">
+	<c:if test="<%= Validator.isNotNull(className) && (classPK > 0) %>">
+		var Util = Liferay.Util;
+
+		Util.getOpener().Liferay.fire(
+			'AddContent:addPortlet',
+			{
+				node: A.one('.portlet-item')
+			}
+		);
+
+		Util.getOpener().Liferay.fire('AddContent:refreshContentList');
+	</c:if>
+
+	Liferay.fire(
+		'closeWindow',
+		{
+			id: '<portlet:namespace />editAsset',
+			portletAjaxable: <%= selPortlet.isAjaxable() %>,
+
+			<c:choose>
+				<c:when test="<%= Validator.isNotNull(redirect) %>">
+					redirect: '<%= HtmlUtil.escapeJS(redirect) %>'
+				</c:when>
+				<c:otherwise>
+					refresh: '<%= portletDisplay.getId() %>'
+				</c:otherwise>
+			</c:choose>
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/add_panel.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/add_panel.jsp
new file mode 100644
index 0000000..a0e8720
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/add_panel.jsp
@@ -0,0 +1,100 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dockbar/init.jsp" %>
+
+<c:choose>
+	<c:when test="<%= themeDisplay.isSignedIn() %>">
+		<c:if test="<%= layout != null %>">
+
+			<%
+			Group group = layout.getGroup();
+
+			boolean hasLayoutAddPermission = false;
+
+			if (layout.getParentLayoutId() == LayoutConstants.DEFAULT_PARENT_LAYOUT_ID) {
+				hasLayoutAddPermission = GroupPermissionUtil.contains(permissionChecker, group.getGroupId(), ActionKeys.ADD_LAYOUT);
+			}
+			else {
+				hasLayoutAddPermission = LayoutPermissionUtil.contains(permissionChecker, layout, ActionKeys.ADD_LAYOUT);
+			}
+
+			boolean hasLayoutCustomizePermission = LayoutPermissionUtil.contains(permissionChecker, layout, ActionKeys.CUSTOMIZE);
+			boolean hasLayoutUpdatePermission = LayoutPermissionUtil.contains(permissionChecker, layout, ActionKeys.UPDATE);
+			%>
+
+			<c:if test="<%= !group.isControlPanel() && (hasLayoutAddPermission || hasLayoutUpdatePermission || (layoutTypePortlet.isCustomizable() && layoutTypePortlet.isCustomizedView() && hasLayoutCustomizePermission)) %>">
+				<div class="add-content-menu" id="<portlet:namespace />addPanelContainer">
+					<aui:button cssClass="close pull-right" name="closePanelAdd" value="&times;" />
+
+					<%
+					String[] tabs1Names = new String[0];
+
+					boolean stateMaximized = ParamUtil.getBoolean(request, "stateMaximized");
+
+					boolean hasAddContentAndApplicationsPermission = !stateMaximized && layout.isTypePortlet() && !layout.isLayoutPrototypeLinkActive() && (hasLayoutUpdatePermission || (layoutTypePortlet.isCustomizable() && layoutTypePortlet.isCustomizedView() && hasLayoutCustomizePermission));
+
+					if (hasAddContentAndApplicationsPermission) {
+						tabs1Names = ArrayUtil.append(tabs1Names, "content,applications");
+					}
+
+					if (hasLayoutAddPermission) {
+						tabs1Names = ArrayUtil.append(tabs1Names, "page");
+					}
+
+					String selectedTab = GetterUtil.getString(SessionClicks.get(request, "liferay_addpanel_tab", "content"));
+
+					if (stateMaximized) {
+						selectedTab = "page";
+					}
+					%>
+
+					<h1><liferay-ui:message key="add" /></h1>
+
+					<liferay-ui:tabs
+						names="<%= StringUtil.merge(tabs1Names) %>"
+						refresh="<%= false %>"
+						type="pills"
+						value="<%= selectedTab %>"
+					>
+						<c:if test="<%= hasAddContentAndApplicationsPermission %>">
+							<liferay-ui:section>
+								<liferay-util:include page="/html/portlet/dockbar/add_content.jsp" />
+							</liferay-ui:section>
+
+							<liferay-ui:section>
+								<liferay-util:include page="/html/portlet/dockbar/add_application.jsp" />
+							</liferay-ui:section>
+						</c:if>
+
+						<c:if test="<%= hasLayoutAddPermission %>">
+							<liferay-ui:section>
+								<liferay-util:include page="/html/portlet/layouts_admin/add_layout.jsp" />
+							</liferay-ui:section>
+						</c:if>
+					</liferay-ui:tabs>
+				</div>
+			</c:if>
+		</c:if>
+	</c:when>
+	<c:otherwise>
+		<liferay-ui:message key="please-sign-in-to-continue" />
+	</c:otherwise>
+</c:choose>
+
+<aui:script use="liferay-dockbar">
+	A.one('#<portlet:namespace />closePanelAdd').on('click', Liferay.Dockbar.toggleAddPanel, Liferay.Dockbar);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/edit_layout_panel.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/edit_layout_panel.jsp
new file mode 100644
index 0000000..b6bc4bb
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/edit_layout_panel.jsp
@@ -0,0 +1,137 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%@ include file="/html/portlet/layouts_admin/init_attributes.jspf" %>
+
+<div id="<portlet:namespace />editLayoutContainer">
+	<c:choose>
+		<c:when test='<%= SessionMessages.contains(renderRequest, "requestProcessed") || ((selPlid == 0) && Validator.isNotNull(closeRedirect)) %>'>
+
+			<%
+			String refreshURL = null;
+
+			if ((selPlid == 0) && Validator.isNotNull(closeRedirect)) {
+				refreshURL = closeRedirect;
+			}
+			else {
+				refreshURL = (String)SessionMessages.get(renderRequest, portletDisplay.getId() + SessionMessages.KEY_SUFFIX_CLOSE_REDIRECT);
+			}
+
+			if (Validator.isNull(refreshURL)) {
+				refreshURL = PortalUtil.getLayoutURL(layout, themeDisplay);
+			}
+			%>
+
+			<aui:script>
+				window.location.href = '<%= HtmlUtil.escapeJS(refreshURL) %>';
+			</aui:script>
+		</c:when>
+		<c:otherwise>
+			<aui:button cssClass="close pull-right" name="closePanelEdit" value="&times;" />
+
+			<h1><liferay-ui:message key="edit-page" /></h1>
+
+			<c:if test="<%= selPlid > 0 %>">
+				<liferay-util:include page="/html/portlet/layouts_admin/edit_layout.jsp">
+					<liferay-util:param name="displayStyle" value="panel" />
+					<liferay-util:param name="showAddAction" value="<%= Boolean.FALSE.toString() %>" />
+				</liferay-util:include>
+
+				<c:if test="<%= themeDisplay.isShowSiteAdministrationIcon() %>">
+					<liferay-portlet:renderURL plid="<%= PortalUtil.getControlPanelPlid(company.getCompanyId()) %>" portletName="<%= PortletKeys.GROUP_PAGES %>" varImpl="siteAdministrationURL" windowState="<%= WindowState.NORMAL.toString() %>">
+						<portlet:param name="struts_action" value="/group_pages/edit_layouts" />
+						<portlet:param name="tabs1" value="public-pages" />
+						<portlet:param name="groupId" value="<%= String.valueOf(liveGroupId) %>" />
+						<portlet:param name="selPlid" value="<%= String.valueOf(selPlid) %>" />
+						<portlet:param name="treeId" value="layoutsTree" />
+						<portlet:param name="viewLayout" value="true" />
+					</liferay-portlet:renderURL>
+
+					<%
+					String siteAdministrationURLString = HttpUtil.setParameter(siteAdministrationURL.toString(), "controlPanelCategory", "current_site");
+
+					siteAdministrationURLString = HttpUtil.setParameter(siteAdministrationURLString, "doAsGroupId", String.valueOf(liveGroupId));
+					siteAdministrationURLString = HttpUtil.setParameter(siteAdministrationURLString, "refererPlid", String.valueOf(selPlid));
+					%>
+
+					<aui:a cssClass="site-admin-link" href="<%= siteAdministrationURLString %>" label="site-administration" />
+				</c:if>
+			</c:if>
+
+			<aui:script use="aui-io-request,aui-loading-mask-deprecated,liferay-dockbar">
+				A.one('#<portlet:namespace />closePanelEdit').on('click', Liferay.Dockbar.toggleEditLayoutPanel, Liferay.Dockbar);
+
+				var nameInput = A.one('#<portlet:namespace />name');
+
+				if (nameInput) {
+					nameInput.focus();
+				}
+
+				var loadingMask = A.getBody().plug(A.LoadingMask).loadingmask;
+
+				Liferay.once(
+					'submitForm',
+					function(event) {
+						var form = event.form;
+
+						if (form.hasClass('edit-layout-form')) {
+							event.preventDefault();
+
+							<liferay-portlet:renderURL varImpl="redirectURL">
+								<portlet:param name="struts_action" value="/layouts_admin/update_layout" />
+								<portlet:param name="groupId" value="<%= String.valueOf(liveGroupId) %>" />
+							</liferay-portlet:renderURL>
+
+							form.get('<portlet:namespace />redirect').val('<%= HttpUtil.addParameter(redirectURL.toString(), liferayPortletResponse.getNamespace() + "selPlid", selPlid) %>');
+
+							loadingMask.show();
+
+							A.io.request(
+								form.attr('action'),
+								{
+									dataType: 'json',
+									form: {
+										id: form.attr('id')
+									},
+									after: {
+										success: function(event, id, obj) {
+											var response = this.get('responseData');
+
+											var panel = A.one('#<portlet:namespace />editLayoutContainer');
+
+											panel.empty();
+
+											panel.plug(A.Plugin.ParseContent);
+
+											panel.setContent(response);
+
+											loadingMask.hide();
+										},
+										failure: function(event) {
+											loadingMask.hide();
+										}
+									}
+								}
+							);
+						}
+					}
+				);
+			</aui:script>
+		</c:otherwise>
+	</c:choose>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/init.jsp
new file mode 100644
index 0000000..363f064
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/init.jsp
@@ -0,0 +1,25 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.util.PortletCategoryUtil" %><%@
+page import="com.liferay.taglib.aui.AUIUtil" %>
+
+<%@ page import="java.util.regex.Matcher" %><%@
+page import="java.util.regex.Pattern" %>
+
+<%@ include file="/html/portlet/dockbar/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/preview_panel.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/preview_panel.jsp
new file mode 100644
index 0000000..23954d6
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/preview_panel.jsp
@@ -0,0 +1,102 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dockbar/init.jsp" %>
+
+<div id="<portlet:namespace />devicePreviewContainer">
+	<aui:button cssClass="close pull-right" name="closePanelPreview" value="&times;" />
+
+	<h1><liferay-ui:message key="preview" /></h1>
+
+	<aui:nav cssClass="nav-list">
+		<aui:nav-item cssClass="autosize lfr-device-item" data-device="autosize">
+			<div class="device-info">
+				<span class="device-name"><liferay-ui:message key="autosize" /></span>
+				<span class="device-dimensions">100%</span>
+			</div>
+		</aui:nav-item>
+
+		<aui:nav-item cssClass="lfr-device-item selected smartphone" data-device="smartphone">
+			<div class="device-info">
+				<span class="device-name"><liferay-ui:message key="smartphone" /></span>
+				<span class="device-dimensions">768px</span>
+			</div>
+		</aui:nav-item>
+
+		<aui:nav-item cssClass="lfr-device-item tablet" data-device="tablet">
+			<div class="device-info">
+				<span class="device-name"><liferay-ui:message key="tablet" /></span>
+				<span class="device-dimensions">1024px</span>
+			</div>
+		</aui:nav-item>
+
+		<aui:nav-item cssClass="desktop lfr-device-item" data-device="desktop">
+			<div class="device-info">
+				<span class="device-name"><liferay-ui:message key="desktop" /></span>
+				<span class="device-dimensions">1280px</span>
+			</div>
+		</aui:nav-item>
+
+		<aui:nav-item cssClass="lfr-device-item" data-device="custom">
+			<p><liferay-ui:message key="custom" /> (px)</p>
+
+			<aui:input cssClass="input-mini" inlineField="<%= true %>" label="" name="width" value="400" /><span> &times; </span><aui:input cssClass="input-mini" inlineField="<%= true %>" label="" name="height" value="400" />
+		</aui:nav-item>
+	</aui:nav>
+
+	<div class="alert">
+		<small><liferay-ui:message key="preview-may-not-be-accurate" /></small>
+	</div>
+</div>
+
+<aui:script use="liferay-dockbar-device-preview">
+	var devicePreview = new Liferay.Dockbar.DevicePreview(
+		{
+			devices: {
+				autosize: {},
+				custom: {
+					height: '#<portlet:namespace />height',
+					resizable: true,
+					width: '#<portlet:namespace />width'
+				},
+				desktop: {
+					height: 1050,
+					width: 1300
+				},
+				smartphone: {
+					height: 640,
+					preventTransition: true,
+					rotation: true,
+					selected: true,
+					skin: 'smartphone',
+					width: 400
+				},
+				tablet: {
+					height: 900,
+					preventTransition: true,
+					rotation: true,
+					skin: 'tablet',
+					width: 760
+				}
+			},
+			inputHeight: '#<portlet:namespace />height',
+			inputWidth: '#<portlet:namespace />width',
+			namespace: '<portlet:namespace />'
+		}
+	);
+
+	Liferay.once('dockbarHidePanel', A.bind('destroy', devicePreview));
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/view.jsp
new file mode 100644
index 0000000..429f86a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/view.jsp
@@ -0,0 +1,279 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dockbar/init.jsp" %>
+
+<%
+Group group = null;
+LayoutSet layoutSet = null;
+
+if (layout != null) {
+	group = layout.getGroup();
+	layoutSet = layout.getLayoutSet();
+}
+
+boolean hasLayoutCustomizePermission = LayoutPermissionUtil.contains(permissionChecker, layout, ActionKeys.CUSTOMIZE);
+boolean hasLayoutUpdatePermission = LayoutPermissionUtil.contains(permissionChecker, layout, ActionKeys.UPDATE);
+
+String toggleControlsState = GetterUtil.getString(SessionClicks.get(request, "liferay_toggle_controls", ""));
+%>
+
+<aui:nav-bar cssClass="navbar-static-top dockbar" data-namespace="<%= renderResponse.getNamespace() %>" id="dockbar">
+	<c:if test="<%= group.isControlPanel() %>">
+
+		<%
+		String controlPanelCategory = themeDisplay.getControlPanelCategory();
+
+		String refererGroupDescriptiveName = null;
+		String backURL = null;
+
+		if (themeDisplay.getRefererPlid() > 0) {
+			Layout refererLayout = LayoutLocalServiceUtil.fetchLayout(themeDisplay.getRefererPlid());
+
+			if (refererLayout != null) {
+				Group refererGroup = refererLayout.getGroup();
+
+				if (refererGroup.isUserGroup() && (themeDisplay.getRefererGroupId() > 0)) {
+					refererGroup = GroupLocalServiceUtil.getGroup(themeDisplay.getRefererGroupId());
+
+					refererLayout = new VirtualLayout(refererLayout, refererGroup);
+				}
+
+				refererGroupDescriptiveName = refererGroup.getDescriptiveName(locale);
+
+				if (refererGroup.isUser() && (refererGroup.getClassPK() == user.getUserId())) {
+					if (refererLayout.isPublicLayout()) {
+						refererGroupDescriptiveName = LanguageUtil.get(pageContext, "my-profile");
+					}
+					else {
+						refererGroupDescriptiveName = LanguageUtil.get(pageContext, "my-dashboard");
+					}
+				}
+
+				backURL = PortalUtil.getLayoutURL(refererLayout, themeDisplay);
+
+				if (!CookieKeys.hasSessionId(request)) {
+					backURL = PortalUtil.getURLWithSessionId(backURL, session.getId());
+				}
+			}
+		}
+
+		if (Validator.isNull(refererGroupDescriptiveName) || Validator.isNull(backURL)) {
+			refererGroupDescriptiveName = themeDisplay.getAccount().getName();
+			backURL = themeDisplay.getURLHome();
+		}
+
+		if (Validator.isNotNull(themeDisplay.getDoAsUserId())) {
+			backURL = HttpUtil.addParameter(backURL, "doAsUserId", themeDisplay.getDoAsUserId());
+		}
+
+		if (Validator.isNotNull(themeDisplay.getDoAsUserLanguageId())) {
+			backURL = HttpUtil.addParameter(backURL, "doAsUserLanguageId", themeDisplay.getDoAsUserLanguageId());
+		}
+		%>
+
+		<c:if test="<%= controlPanelCategory.startsWith(PortletCategoryKeys.CURRENT_SITE) || !controlPanelCategory.equals(PortletCategoryKeys.MY) %>">
+			<div class="brand">
+				<a class="control-panel-back-link" href="<%= backURL %>" title="<liferay-ui:message key="back" />">
+					<i class="control-panel-back-icon icon-chevron-sign-left"></i>
+
+					<span class="control-panel-back-text helper-hidden-accessible">
+						<liferay-ui:message key="back" />
+					</span>
+				</a>
+
+				<h1>
+					<c:choose>
+						<c:when test="<%= controlPanelCategory.startsWith(PortletCategoryKeys.CURRENT_SITE) %>">
+							<%@ include file="/html/portal/layout/view/control_panel_site_selector.jspf" %>
+
+							<span class="divider">/</span>
+
+							<span class="site-administration-title">
+								<liferay-ui:message key="site-administration" />
+							</span>
+						</c:when>
+						<c:otherwise>
+							<a href="<%= themeDisplay.getURLControlPanel() %>">
+								<liferay-ui:message key="control-panel" />
+							</a>
+						</c:otherwise>
+					</c:choose>
+				</h1>
+			</div>
+		</c:if>
+	</c:if>
+
+	<%
+	String controlPanelCategory = themeDisplay.getControlPanelCategory();
+	%>
+
+	<c:if test="<%= !(group.isControlPanel() && controlPanelCategory.startsWith(PortletCategoryKeys.CURRENT_SITE)) %>">
+		<aui:nav collapsible="<%= true %>" cssClass="nav-navigation" icon="reorder" id="navSiteNavigation">
+			<c:if test="<%= group.isControlPanel() && !controlPanelCategory.equals(PortletCategoryKeys.MY) && !controlPanelCategory.startsWith(PortletCategoryKeys.CURRENT_SITE) %>">
+
+				<%
+				String[] categories = PortletCategoryKeys.ALL;
+
+				for (String curCategory : categories) {
+					String urlControlPanelCategory = HttpUtil.setParameter(themeDisplay.getURLControlPanel(), "controlPanelCategory", curCategory);
+
+					String cssClass = StringPool.BLANK;
+					String iconCssClass = StringPool.BLANK;
+
+					if (curCategory.equals(PortletCategoryKeys.APPS)) {
+						cssClass = "control-panel-apps";
+						iconCssClass = "icon-th";
+					}
+					else if (curCategory.equals(PortletCategoryKeys.CONFIGURATION)) {
+						cssClass = "control-panel-configuration";
+						iconCssClass = "icon-cog";
+					}
+					else if (curCategory.equals(PortletCategoryKeys.SITES)) {
+						cssClass = "control-panel-sites";
+						iconCssClass = "icon-globe";
+					}
+					else if (curCategory.equals(PortletCategoryKeys.USERS)) {
+						cssClass = "control-panel-users";
+						iconCssClass = "icon-user";
+					}
+				%>
+
+					<c:if test="<%= _hasPortlets(curCategory, themeDisplay) %>">
+						<aui:nav-item anchorId='<%= "controlPanelNav" + curCategory + "Link" %>' cssClass="<%= cssClass %>" href="<%= urlControlPanelCategory %>" iconCssClass="<%= iconCssClass %>" label='<%= "category." + curCategory %>' selected="<%= controlPanelCategory.equals(curCategory) %>" />
+					</c:if>
+
+				<%
+				}
+				%>
+
+			</c:if>
+		</aui:nav>
+	</c:if>
+
+	<%
+	boolean userSetupComplete = user.isSetupComplete();
+
+	boolean portalMessageUseAnimation = GetterUtil.getBoolean(PortalMessages.get(request, PortalMessages.KEY_ANIMATION), true);
+	%>
+
+	<aui:nav ariaLabel='<%= LanguageUtil.get(pageContext, "layout-controls") %>' collapsible="<%= true %>" cssClass='<%= portalMessageUseAnimation ? "nav-add-controls" : "nav-add-controls nav-add-controls-notice" %>' icon="pencil" id="navAddControls">
+
+		<%
+		boolean hasLayoutAddPermission = false;
+
+		if (layout.getParentLayoutId() == LayoutConstants.DEFAULT_PARENT_LAYOUT_ID) {
+			hasLayoutAddPermission = GroupPermissionUtil.contains(permissionChecker, group.getGroupId(), ActionKeys.ADD_LAYOUT);
+		}
+		else {
+			hasLayoutAddPermission = LayoutPermissionUtil.contains(permissionChecker, layout, ActionKeys.ADD_LAYOUT);
+		}
+		%>
+
+		<c:if test="<%= !group.isControlPanel() && userSetupComplete && (hasLayoutAddPermission || hasLayoutUpdatePermission || (layoutTypePortlet.isCustomizable() && layoutTypePortlet.isCustomizedView() && hasLayoutCustomizePermission)) %>">
+			<portlet:renderURL var="addURL" windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>">
+				<portlet:param name="struts_action" value="/dockbar/add_panel" />
+				<portlet:param name="stateMaximized" value="<%= String.valueOf(themeDisplay.isStateMaximized()) %>" />
+				<portlet:param name="viewEntries" value="<%= Boolean.TRUE.toString() %>" />
+			</portlet:renderURL>
+
+			<aui:nav-item anchorId="addPanel" cssClass="site-add-controls" data-panelURL="<%= addURL %>" href="javascript:;" iconCssClass="icon-plus" label="add" />
+		</c:if>
+
+		<c:if test="<%= !group.isControlPanel() && userSetupComplete && (hasLayoutUpdatePermission || GroupPermissionUtil.contains(permissionChecker, group.getGroupId(), ActionKeys.PREVIEW_IN_DEVICE)) %>">
+			<portlet:renderURL var="previewContentURL" windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>">
+				<portlet:param name="struts_action" value="/dockbar/preview_panel" />
+			</portlet:renderURL>
+
+			<aui:nav-item anchorId="previewPanel" cssClass="page-preview-controls" data-panelURL="<%= previewContentURL %>" href="javascript:;" iconCssClass="icon-desktop" label="preview" />
+		</c:if>
+
+		<c:if test="<%= !group.isControlPanel() && userSetupComplete && (themeDisplay.isShowLayoutTemplatesIcon() || themeDisplay.isShowPageSettingsIcon()) %>">
+			<portlet:renderURL var="editLayoutURL" windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>">
+				<portlet:param name="struts_action" value="/dockbar/edit_layout_panel" />
+				<portlet:param name="closeRedirect" value="<%= PortalUtil.getLayoutURL(layout, themeDisplay) %>" />
+				<portlet:param name="groupId" value="<%= String.valueOf(scopeGroupId) %>" />
+				<portlet:param name="selPlid" value="<%= String.valueOf(plid) %>" />
+			</portlet:renderURL>
+
+			<aui:nav-item anchorId="editLayoutPanel" cssClass="page-edit-controls" data-panelURL="<%= editLayoutURL %>" href="javascript:;" iconCssClass="icon-edit" label="edit" />
+		</c:if>
+
+		<c:if test="<%= !group.isControlPanel() && userSetupComplete && (!group.hasStagingGroup() || group.isStagingGroup()) && (hasLayoutUpdatePermission || (layoutTypePortlet.isCustomizable() && layoutTypePortlet.isCustomizedView() && hasLayoutCustomizePermission) || PortletPermissionUtil.hasConfigurationPermission(permissionChecker, themeDisplay.getSiteGroupId(), layout, ActionKeys.CONFIGURATION)) %>">
+			<aui:nav-item anchorCssClass="toggle-controls-link" cssClass="toggle-controls" iconCssClass='<%= "controls-state-icon " + (toggleControlsState.equals("visible") ? "icon-eye-open" : "icon-eye-close") %>' id="toggleControls" label="edit-controls" />
+		</c:if>
+	</aui:nav>
+
+	<%@ include file="/html/portlet/dockbar/view_user_panel.jspf" %>
+</aui:nav-bar>
+
+<div class="dockbar-messages" id="<portlet:namespace />dockbarMessages">
+	<div class="header"></div>
+
+	<div class="body"></div>
+
+	<div class="footer"></div>
+</div>
+
+<%
+List<LayoutPrototype> layoutPrototypes = LayoutPrototypeServiceUtil.search(company.getCompanyId(), Boolean.TRUE, null);
+%>
+
+<c:if test="<%= !layoutPrototypes.isEmpty() %>">
+	<div class="html-template" id="layoutPrototypeTemplate">
+		<ul class="unstyled">
+
+			<%
+			for (LayoutPrototype layoutPrototype : layoutPrototypes) {
+			%>
+
+				<li>
+					<a href="javascript:;">
+						<label>
+							<input name="template" type="radio" value="<%= layoutPrototype.getLayoutPrototypeId() %>" /> <%= HtmlUtil.escape(layoutPrototype.getName(user.getLanguageId())) %>
+						</label>
+					</a>
+				</li>
+
+			<%
+			}
+			%>
+
+		</ul>
+	</div>
+</c:if>
+
+<aui:script position="inline" use="liferay-dockbar">
+	Liferay.Dockbar.init('#<portlet:namespace />dockbar');
+
+	var customizableColumns = A.all('.portlet-column-content.customizable');
+
+	if (customizableColumns.size() > 0) {
+		customizableColumns.get('parentNode').addClass('customizable');
+	}
+</aui:script>
+
+<%!
+private boolean _hasPortlets(String category, ThemeDisplay themeDisplay) throws SystemException {
+	List<Portlet> portlets = PortalUtil.getControlPanelPortlets(category, themeDisplay);
+
+	if (portlets.isEmpty()) {
+		return false;
+	}
+
+	return true;
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/view_admin_links.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/view_admin_links.jspf
new file mode 100644
index 0000000..0a25962
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/view_admin_links.jspf
@@ -0,0 +1,57 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<c:if test="<%= (themeDisplay.isShowControlPanelIcon() || themeDisplay.isShowSiteAdministrationIcon()) && (!layout.getGroup().isControlPanel() || (Validator.isNotNull(controlPanelCategory) && controlPanelCategory.startsWith(PortletCategoryKeys.CURRENT_SITE))) %>">
+	<aui:nav-item cssClass="admin-links" dropdown="<%= true %>" id="adminLinks" label="admin">
+		<c:if test="<%= themeDisplay.isShowSiteAdministrationIcon() %>">
+			<aui:nav-item anchorId="siteAdministrationLink" href="<%= themeDisplay.getURLSiteAdministration() %>" iconCssClass="icon-cog" label="site-administration">
+
+				<%
+				Map<String, List<Portlet>> categoriesMap = PortalUtil.getSiteAdministrationCategoriesMap(request);
+
+				if (!categoriesMap.isEmpty()) {
+					String currentSiteCategory = PortletCategoryKeys.CURRENT_SITE.concat(StringPool.PERIOD);
+				%>
+
+					<ul class="unstyled site-administration-menu">
+
+						<%
+						for (String category : categoriesMap.keySet()) {
+							String url = HttpUtil.setParameter(themeDisplay.getURLSiteAdministration(), "controlPanelCategory", StringUtil.replace(category, PortletCategoryKeys.SITE_ADMINISTRATION, currentSiteCategory));
+						%>
+
+							<aui:nav-item anchorId="siteAdministrationLink" href="<%= url %>" iconCssClass="icon-chevron-right" label='<%= "category." + category %>'/>
+
+						<%
+						}
+						%>
+
+					</ul>
+
+				<%
+				}
+				%>
+
+			</aui:nav-item>
+		</c:if>
+
+		<c:if test="<%= themeDisplay.isShowControlPanelIcon() %>">
+			<aui:nav-item anchorId="controlPanelLink" href="<%= themeDisplay.getURLControlPanel() %>" iconCssClass="icon-wrench" label="control-panel" />
+		</c:if>
+	</aui:nav-item>
+
+	<aui:nav-item cssClass="divider-vertical"></aui:nav-item>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/view_category.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/view_category.jsp
new file mode 100644
index 0000000..22e255b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/view_category.jsp
@@ -0,0 +1,222 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dockbar/init.jsp" %>
+
+<%
+String panelContainerId = ParamUtil.getString(request, "panelContainerId");
+
+PortletCategory portletCategory = (PortletCategory)request.getAttribute(WebKeys.PORTLET_CATEGORY);
+
+int portletCategoryIndex = GetterUtil.getInteger((String)request.getAttribute(WebKeys.PORTLET_CATEGORY_INDEX));
+
+String oldCategoryPath = (String)request.getAttribute(WebKeys.PORTLET_CATEGORY_PATH);
+
+String newCategoryPath = LanguageUtil.get(pageContext, portletCategory.getName());
+
+Pattern pattern = Pattern.compile(".*");
+
+Matcher matcher = pattern.matcher(newCategoryPath);
+
+StringBundler divId = new StringBundler();
+
+while (matcher.find()) {
+	divId.append(matcher.group());
+}
+
+newCategoryPath = divId.toString();
+
+if (Validator.isNotNull(oldCategoryPath)) {
+	newCategoryPath = oldCategoryPath + ":" + newCategoryPath;
+}
+
+List<PortletCategory> categories = ListUtil.fromCollection(portletCategory.getCategories());
+
+categories = ListUtil.sort(categories, new PortletCategoryComparator(locale));
+
+List<Portlet> portlets = new ArrayList<Portlet>();
+
+Set<String> portletIds = portletCategory.getPortletIds();
+
+String externalPortletCategory = null;
+
+for (String portletId : portletIds) {
+	Portlet portlet = PortletLocalServiceUtil.getPortletById(user.getCompanyId(), portletId);
+
+	if ((portlet != null) && PortletPermissionUtil.contains(permissionChecker, layout, portlet, ActionKeys.ADD_TO_PAGE)) {
+		portlets.add(portlet);
+
+		PortletApp portletApp = portlet.getPortletApp();
+
+		if (portletApp.isWARFile() && Validator.isNull(externalPortletCategory)) {
+			PortletConfig curPortletConfig = PortletConfigFactoryUtil.create(portlet, application);
+
+			ResourceBundle resourceBundle = curPortletConfig.getResourceBundle(locale);
+
+			externalPortletCategory = ResourceBundleUtil.getString(resourceBundle, portletCategory.getName());
+		}
+	}
+}
+
+portlets = ListUtil.sort(portlets, new PortletTitleComparator(application, locale));
+
+if (!categories.isEmpty() || !portlets.isEmpty()) {
+	String panelId = renderResponse.getNamespace() + "portletCategory" + portletCategoryIndex;
+	String title = Validator.isNotNull(externalPortletCategory) ? externalPortletCategory : LanguageUtil.get(pageContext, portletCategory.getName());
+%>
+
+	<div class="lfr-add-content">
+		<liferay-ui:panel collapsible="<%= layout.isTypePortlet() %>" cssClass="lfr-content-category panel-page-category unstyled" defaultState="closed" extended="<%= true %>" id="<%= panelId %>" parentId="<%= panelContainerId %>" persistState="<%= true %>" title="<%= title %>">
+
+			<aui:nav collapsible="<%= false %>" cssClass="nav-list">
+
+				<%
+				for (PortletCategory category : categories) {
+					request.setAttribute(WebKeys.PORTLET_CATEGORY, category);
+					request.setAttribute(WebKeys.PORTLET_CATEGORY_INDEX, String.valueOf(portletCategoryIndex));
+					request.setAttribute(WebKeys.PORTLET_CATEGORY_PATH, newCategoryPath);
+				%>
+
+					<liferay-util:include page="/html/portlet/dockbar/view_category.jsp">
+						<liferay-util:param name="panelContainerId" value="<%= panelContainerId %>" />
+					</liferay-util:include>
+
+				<%
+					request.setAttribute(WebKeys.PORTLET_CATEGORY_PATH, oldCategoryPath);
+
+					portletCategoryIndex++;
+				}
+
+				for (Portlet portlet : portlets) {
+					divId.setIndex(0);
+
+					divId.append(newCategoryPath);
+					divId.append(":");
+
+					matcher = pattern.matcher(PortalUtil.getPortletTitle(portlet, application, locale));
+
+					while (matcher.find()) {
+						divId.append(matcher.group());
+					}
+
+					boolean portletInstanceable = portlet.isInstanceable();
+
+					boolean portletUsed = layoutTypePortlet.hasPortletId(portlet.getPortletId());
+
+					boolean portletLocked = (!portletInstanceable && portletUsed);
+
+					if (portletInstanceable && layout.isTypePanel()) {
+						continue;
+					}
+				%>
+
+					<c:choose>
+						<c:when test="<%= layout.isTypePortlet() %>">
+
+							<%
+							Map<String, Object> data = new HashMap<String, Object>();
+
+							data.put("draggable", true);
+							data.put("id", renderResponse.getNamespace() + "portletItem" + portlet.getPortletId());
+							data.put("instanceable", portletInstanceable);
+							data.put("plid", plid);
+							data.put("portlet-id", portlet.getPortletId());
+							data.put("search", divId.toString().replace(':', '-'));
+							data.put("title", PortalUtil.getPortletTitle(portlet, application, locale));
+
+							String cssClass = "drag-content-item";
+
+							if (portletLocked) {
+								cssClass += " lfr-portlet-used";
+							}
+							%>
+
+							<aui:nav-item cssClass="lfr-content-item" href="">
+								<span <%= AUIUtil.buildData(data) %> class="<%= cssClass %>">
+									<i class="<%= portletInstanceable ? "icon-th-large" : "icon-stop" %>"></i>
+
+									<liferay-ui:message key="<%= PortalUtil.getPortletTitle(portlet, application, locale) %>" />
+								</span>
+
+								<%
+								data.remove("draggable");
+								%>
+
+								<span <%= AUIUtil.buildData(data) %> class='add-content-item <%= portletLocked ? "lfr-portlet-used" : StringPool.BLANK %>'>
+									<liferay-ui:message key="add" />
+								</span>
+							</aui:nav-item>
+
+							<%
+							List<PortletItem> portletItems = PortletItemLocalServiceUtil.getPortletItems(themeDisplay.getScopeGroupId(), portlet.getPortletId(), com.liferay.portal.model.PortletPreferences.class.getName());
+
+							for (PortletItem portletItem : portletItems) {
+								divId.setIndex(0);
+
+								divId.append(newCategoryPath);
+								divId.append(":");
+								divId.append(PortalUtil.getPortletTitle(portlet, application, locale));
+								divId.append(":");
+
+								matcher = pattern.matcher(HtmlUtil.escape(portletItem.getName()));
+
+								while (matcher.find()) {
+									divId.append(matcher.group());
+								}
+
+								Map<String, Object> portletItemData = new HashMap<String, Object>();
+
+								portletItemData.put("draggable", true);
+								portletItemData.put("id", renderResponse.getNamespace() + "portletItem" + portletItem.getPortletItemId());
+								portletItemData.put("instanceable", portletInstanceable);
+								portletItemData.put("plid", plid);
+								portletItemData.put("portlet-id", portlet.getPortletId());
+								portletItemData.put("portlet-item-id", portletItem.getPortletItemId());
+								portletItemData.put("search", divId.toString().replace(':', '-'));
+								portletItemData.put("title", HtmlUtil.escape(portletItem.getName()));
+							%>
+
+								<aui:nav-item cssClass="lfr-content-item lfr-archived-setup" data="<%= portletItemData %>" href="" iconCssClass='<%= portletInstanceable ? "icon-th-large" : "icon-stop" %>' label="<%= HtmlUtil.escape(portletItem.getName()) %>">
+									<span <%= AUIUtil.buildData(portletItemData) %> class='add-content-item <%= portletLocked ? "lfr-portlet-used" : StringPool.BLANK %>'>
+										<liferay-ui:message key="add" />
+									</span>
+								</aui:nav-item>
+
+							<%
+							}
+							%>
+
+						</c:when>
+						<c:otherwise>
+							<div>
+								<a href="<liferay-portlet:renderURL portletName="<%= portlet.getRootPortletId() %>" windowState="<%= WindowState.MAXIMIZED.toString() %>"></liferay-portlet:renderURL>"><%= PortalUtil.getPortletTitle(portlet, application, locale) %></a>
+							</div>
+						</c:otherwise>
+					</c:choose>
+
+				<%
+				}
+				%>
+
+			</aui:nav>
+		</liferay-ui:panel>
+	</div>
+
+	<input id="<portlet:namespace />portletCategory<%= portletCategoryIndex %>CategoryPath" type="hidden" value="<%= newCategoryPath.replace(':', '-') %>" />
+
+<%
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/view_my_sites.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/view_my_sites.jspf
new file mode 100644
index 0000000..020b215
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/view_my_sites.jspf
@@ -0,0 +1,23 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<c:if test="<%= user.hasMySites() %>">
+	<aui:nav-item cssClass="my-sites" dropdown="<%= true %>" id="mySites" label="my-sites" wrapDropDownMenu="<%= false %>">
+		<liferay-ui:my-sites classNames="<%= new String[] {Group.class.getName(), Organization.class.getName()} %>" cssClass="dropdown-menu my-sites-menu" />
+	</aui:nav-item>
+</c:if>
+
+<aui:nav-item cssClass="divider-vertical"></aui:nav-item>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/view_page_customization_bar.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/view_page_customization_bar.jspf
new file mode 100644
index 0000000..fce8615
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/view_page_customization_bar.jspf
@@ -0,0 +1,196 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+boolean customizableLayout = !(group.isLayoutPrototype() || group.isLayoutSetPrototype() || group.isUserGroup()) && layoutTypePortlet.isCustomizable() && LayoutPermissionUtil.containsWithoutViewableGroup(permissionChecker, layout, false, ActionKeys.CUSTOMIZE);
+boolean linkedLayout = (!SitesUtil.isLayoutUpdateable(layout) || (layout.isLayoutPrototypeLinkActive() && !group.hasStagingGroup())) && LayoutPermissionUtil.containsWithoutViewableGroup(themeDisplay.getPermissionChecker(), layout, false, ActionKeys.UPDATE);
+boolean modifiedLayout = (layoutSet != null) && layoutSet.isLayoutSetPrototypeLinkActive() && SitesUtil.isLayoutModifiedSinceLastMerge(layout) && hasLayoutUpdatePermission;
+%>
+
+<c:if test="<%= modifiedLayout || linkedLayout || customizableLayout %>">
+
+	<%
+	boolean dockbarMessagesHidden = GetterUtil.getBoolean(SessionClicks.get(request, "dockbarMessagesHidden", "false"));
+	%>
+
+	<aui:nav-item cssClass='<%= "info-items" + (dockbarMessagesHidden ? " hide" : StringPool.BLANK) %>'>
+		<div class="page-customization-bar-container">
+			<c:if test="<%= modifiedLayout %>">
+				<div class="page-customization-bar">
+					<div class="page-customization-bar-text">
+						<span class="page-customization-bar-message">
+							<liferay-ui:message key="this-page-has-been-changed-since-the-last-update-from-the-site-template-excerpt" />
+						</span>
+
+						<liferay-ui:icon-help message="this-page-has-been-changed-since-the-last-update-from-the-site-template" />
+					</div>
+
+					<div class="page-customization-bar-form">
+						<liferay-portlet:actionURL portletName="<%= PortletKeys.LAYOUTS_ADMIN %>" var="resetPrototypeURL">
+							<portlet:param name="struts_action" value="/layouts_admin/edit_layouts" />
+						</liferay-portlet:actionURL>
+
+						<aui:form action="<%= resetPrototypeURL %>" cssClass="reset-prototype" name="resetFm" portletNamespace="<%= PortalUtil.getPortletNamespace(PortletKeys.LAYOUTS_ADMIN) %>">
+							<aui:input name="<%= Constants.CMD %>" type="hidden" value="reset_prototype" />
+							<aui:input name="redirect" type="hidden" value="<%= PortalUtil.getLayoutURL(themeDisplay) %>" />
+							<aui:input name="groupId" type="hidden" value="<%= String.valueOf(themeDisplay.getSiteGroupId()) %>" />
+
+							<aui:button cssClass="btn-link" name="submit" type="submit" value="reset-changes" />
+						</aui:form>
+					</div>
+				</div>
+			</c:if>
+
+			<c:if test="<%= linkedLayout %>">
+				<div class="page-customization-bar">
+					<div class="page-customization-bar-text">
+						<c:choose>
+							<c:when test="<%= layout.isLayoutPrototypeLinkActive() && !group.hasStagingGroup() %>">
+								<liferay-ui:message key="this-page-is-linked-to-a-page-template" />
+							</c:when>
+							<c:when test="<%= layout instanceof VirtualLayout %>">
+								<liferay-ui:message key="this-page-belongs-to-a-user-group" />
+							</c:when>
+							<c:otherwise>
+								<liferay-ui:message key="this-page-is-linked-to-a-site-template-which-does-not-allow-modifications-to-it" />
+							</c:otherwise>
+						</c:choose>
+					</div>
+				</div>
+			</c:if>
+
+			<c:if test="<%= customizableLayout %>">
+				<div class="page-customization-bar">
+					<div class="page-customization-bar-text">
+						<c:choose>
+							<c:when test="<%= layoutTypePortlet.isCustomizedView() %>">
+
+								<span class="page-customization-bar-message">
+									<liferay-ui:message key="you-can-customize-this-page" />
+								</span>
+
+								<liferay-ui:icon-help message="customizable-user-help" />
+							</c:when>
+							<c:otherwise>
+								<span class="page-customization-bar-message">
+									<liferay-ui:message key="this-is-the-default-page-without-your-customizations" />
+								</span>
+
+								<c:if test="<%= hasLayoutUpdatePermission %>">
+									<liferay-ui:icon-help message="customizable-admin-help" />
+								</c:if>
+							</c:otherwise>
+						</c:choose>
+					</div>
+
+					<div class="page-customization-bar-form">
+
+						<%
+						String taglibImage = "search";
+						String taglibMessage = "view-default-page";
+
+						if (!layoutTypePortlet.isCustomizedView()) {
+							taglibMessage = "view-my-customized-page";
+						}
+						else if (layoutTypePortlet.isDefaultUpdated()) {
+							taglibImage = "activate";
+							taglibMessage = "the-defaults-for-the-current-page-have-been-updated-click-here-to-see-them";
+						}
+						%>
+
+						<liferay-ui:icon id="toggleCustomizedView" label="<%= true %>" message="<%= taglibMessage %>" url="javascript:;" />
+
+						<c:if test="<%= layoutTypePortlet.isCustomizedView() %>">
+							<liferay-portlet:actionURL portletName="<%= PortletKeys.LAYOUTS_ADMIN %>" var="resetCustomizationViewURL">
+								<portlet:param name="struts_action" value="/layouts_admin/edit_layouts" />
+								<portlet:param name="groupId" value="<%= String.valueOf(themeDisplay.getSiteGroupId()) %>" />
+								<portlet:param name="<%= Constants.CMD %>" value="reset_customized_view" />
+							</liferay-portlet:actionURL>
+
+							<%
+							String taglibURL = "javascript:if (confirm('" + UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-reset-your-customizations-to-default") + "')){submitForm(document.hrefFm, '" + HttpUtil.encodeURL(resetCustomizationViewURL) + "');}";
+							%>
+
+							<liferay-ui:icon label="<%= true %>" message="reset-my-customizations" url="<%= taglibURL %>" />
+						</c:if>
+					</div>
+				</div>
+
+				<aui:script>
+					Liferay.provide(
+						window,
+						'<portlet:namespace />toggleCustomizedView',
+						function(event) {
+							var A = AUI();
+
+							A.io.request(
+								themeDisplay.getPathMain() + '/portal/update_layout',
+								{
+									data: {
+										cmd: 'toggle_customized_view',
+										customized_view: '<%= String.valueOf(!layoutTypePortlet.isCustomizedView()) %>',
+										p_auth: '<%= AuthTokenUtil.getToken(request) %>'
+									},
+									on: {
+										success: function(event, id, obj) {
+											window.location.href = themeDisplay.getLayoutURL();
+										}
+									}
+								}
+							);
+						},
+						['aui-io-request']
+					);
+				</aui:script>
+
+				<aui:script use="aui-base">
+					var toggleCustomizedView = A.one('#<portlet:namespace />toggleCustomizedView');
+
+					if (toggleCustomizedView) {
+						toggleCustomizedView.on('click', <portlet:namespace />toggleCustomizedView);
+					}
+				</aui:script>
+			</c:if>
+		</div>
+
+		<aui:nav-item cssClass="info-link-container">
+			<div class="info-button">
+				<a class="info-link" href="javascript:;">
+					<i class="icon-info"></i>
+				</a>
+
+				<div class="diamond"></div>
+			</div>
+		</aui:nav-item>
+
+		<aui:script use="aui-base, liferay-store">
+			A.one('.info-link-container').on(
+				'click',
+				function(event) {
+					event.preventDefault();
+
+					var navAccountControls = event.currentTarget.ancestor('.nav-account-controls');
+
+					var infoItems = navAccountControls.one('.info-items');
+
+					navAccountControls.one('.info-items').toggleClass('hide');
+
+					Liferay.Store('dockbarMessagesHidden', infoItems.hasClass('hide'));
+				}
+			);
+		</aui:script>
+	</aui:nav-item>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/view_resources.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/view_resources.jsp
new file mode 100644
index 0000000..d51fbf5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/view_resources.jsp
@@ -0,0 +1,195 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dockbar/init.jsp" %>
+
+<%
+boolean viewEntries = ParamUtil.getBoolean(request, "viewEntries");
+boolean viewPreview = ParamUtil.getBoolean(request, "viewPreview");
+%>
+
+<c:choose>
+	<c:when test="<%= viewEntries %>">
+		<div id="<portlet:namespace />entries">
+
+			<%
+			String displayStyleDefault = GetterUtil.getString(SessionClicks.get(request, "liferay_addpanel_displaystyle", "descriptive"));
+			String displayStyle = ParamUtil.getString(request, "displayStyle", displayStyleDefault);
+			String keywords = ParamUtil.getString(request, "keywords");
+
+			String panelTitle = "recent";
+
+			if (Validator.isNotNull(keywords)) {
+				panelTitle = "search-results";
+			}
+
+			String navListCssClass = "add-content nav-list ";
+
+			if (displayStyle.equals("icon")) {
+				navListCssClass += "add-content-icon";
+			}
+			else if (displayStyle.equals("descriptive")) {
+				navListCssClass += "add-content-descriptive";
+			}
+			else if (displayStyle.equals("icon")) {
+				navListCssClass += "add-content-list";
+			}
+			%>
+
+			<liferay-ui:panel collapsible="<%= false %>" cssClass="clearfix lfr-component panel-page-category recent" extended="<%= true %>" id="manageRecentPanel" persistState="<%= true %>" title="<%= panelTitle %>">
+				<aui:nav cssClass="<%= navListCssClass %>">
+
+					<%
+					int deltaDefault = GetterUtil.getInteger(SessionClicks.get(request, "liferay_addpanel_numitems", "10"));
+					int delta = ParamUtil.getInteger(request, "delta", deltaDefault);
+
+					long[] availableClassNameIds = AssetRendererFactoryRegistryUtil.getClassNameIds(company.getCompanyId());
+
+					for (long classNameId : availableClassNameIds) {
+						AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(PortalUtil.getClassName(classNameId));
+
+						if (!assetRendererFactory.isSelectable()) {
+							availableClassNameIds = ArrayUtil.remove(availableClassNameIds, classNameId);
+						}
+					}
+
+					AssetEntryQuery assetEntryQuery = new AssetEntryQuery();
+
+					assetEntryQuery.setClassNameIds(availableClassNameIds);
+					assetEntryQuery.setEnd(delta);
+					assetEntryQuery.setGroupIds(new long[] {scopeGroupId});
+					assetEntryQuery.setKeywords(keywords);
+					assetEntryQuery.setOrderByCol1("modifiedDate");
+					assetEntryQuery.setOrderByCol2("title");
+					assetEntryQuery.setOrderByType1("DESC");
+					assetEntryQuery.setOrderByType2("ASC");
+					assetEntryQuery.setStart(0);
+
+					List<AssetEntry> results = null;
+
+					if (PropsValues.ASSET_PUBLISHER_SEARCH_WITH_INDEX && (assetEntryQuery.getLinkedAssetEntryId() == 0)) {
+						Hits hits = AssetUtil.search(request, assetEntryQuery, 0, delta);
+
+						results = AssetUtil.getAssetEntries(hits);
+					}
+					else {
+						results = AssetEntryServiceUtil.getEntries(assetEntryQuery);
+					}
+
+					for (AssetEntry assetEntry : results) {
+						String className = PortalUtil.getClassName(assetEntry.getClassNameId());
+						long classPK = assetEntry.getClassPK();
+
+						AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(className);
+
+						if (assetRendererFactory == null) {
+							continue;
+						}
+
+						AssetRenderer assetRenderer = null;
+
+						try {
+							assetRenderer = assetRendererFactory.getAssetRenderer(classPK);
+						}
+						catch (Exception e) {
+						}
+
+						if ((assetRenderer == null) || !assetRenderer.isDisplayable()) {
+							continue;
+						}
+
+						String title = HtmlUtil.escape(StringUtil.shorten(assetRenderer.getTitle(themeDisplay.getLocale()), 60));
+
+						Map<String, Object> data = new HashMap<String, Object>();
+
+						data.put("class-name", assetEntry.getClassName());
+						data.put("class-pk", assetEntry.getClassPK());
+						data.put("draggable", true);
+						data.put("instanceable", true);
+						data.put("portlet-id", assetRenderer.getAddToPagePortletId());
+						data.put("title", title);
+
+						String navItemCssClass="content-shortcut lfr-content-item ";
+
+						if (!displayStyle.equals("icon")) {
+							navItemCssClass += "has-preview";
+						}
+					%>
+
+						<aui:nav-item cssClass='<%= navItemCssClass %>'
+							data="<%= data %>"
+							href=""
+							iconCssClass='<%= displayStyle.equals("icon") ? "" : "icon-file" %>'
+							label='<%= displayStyle.equals("list") ? title : "" %>'
+						>
+							<c:choose>
+								<c:when test='<%= !displayStyle.equals("list") %>' >
+									<div class="add-content-thumbnail <%= displayStyle.equals("descriptive") ? "span4" : StringPool.BLANK %>">
+										<img src="<%= assetRenderer.getThumbnailPath(liferayPortletRequest) %>" />
+									</div>
+
+									<div class="add-content-details <%= displayStyle.equals("descriptive") ? "span8" : StringPool.BLANK %>">
+										<div class="add-content-title">
+											<%= title %>
+										</div>
+
+										<div class="add-content-description">
+											<%= StringUtil.shorten(assetRenderer.getSummary(themeDisplay.getLocale()), 120) %>
+										</div>
+									</div>
+								</c:when>
+								<c:otherwise >
+									<div <%= AUIUtil.buildData(data) %> class="add-content-item">
+										<liferay-ui:message key="add" />
+									</div>
+								</c:otherwise>
+							</c:choose>
+						</aui:nav-item>
+
+					<%
+					}
+					%>
+
+				</aui:nav>
+			</liferay-ui:panel>
+		</div>
+	</c:when>
+
+	<c:when test="<%= viewPreview %>">
+
+		<%
+		long classPK = ParamUtil.getLong(request, "classPK");
+		String className = ParamUtil.getString(request, "className");
+		%>
+
+		<c:if test="<%= (classPK > 0) && Validator.isNotNull(className) %>">
+
+			<%
+			AssetEntry assetEntry = AssetEntryLocalServiceUtil.getEntry(className, classPK);
+			AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(className);
+			AssetRenderer assetRenderer = assetRendererFactory.getAssetRenderer(classPK);
+
+			request.setAttribute("add_panel.jsp-assetEntry", assetEntry);
+			request.setAttribute("add_panel.jsp-assetRendererFactory", assetRendererFactory);
+			request.setAttribute("add_panel.jsp-assetRenderer", assetRenderer);
+			%>
+
+			<div id="<portlet:namespace />preview">
+				<liferay-util:include page="<%= assetRenderer.getPreviewPath(liferayPortletRequest, liferayPortletResponse) %>" portletId="<%= assetRendererFactory.getPortletId() %>" servletContext="<%= application %>" />
+			</div>
+		</c:if>
+	</c:when>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/view_user_panel.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/view_user_panel.jspf
new file mode 100644
index 0000000..9a517b3
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dockbar/view_user_panel.jspf
@@ -0,0 +1,33 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<aui:nav collapsible="<%= true %>" cssClass='<%= portalMessageUseAnimation ? "nav-account-controls" : "nav-account-controls nav-account-controls-notice" %>' icon="user" id="navAccountControls">
+	<c:if test="<%= userSetupComplete %>">
+		<%@ include file="/html/portlet/dockbar/view_page_customization_bar.jspf" %>
+
+		<c:if test="<%= themeDisplay.isShowStagingIcon() %>">
+			<aui:nav-item cssClass="staging-controls">
+				<liferay-portlet:runtime portletName="<%= PortletKeys.STAGING_BAR %>" />
+			</aui:nav-item>
+		</c:if>
+
+		<%@ include file="/html/portlet/dockbar/view_admin_links.jspf" %>
+
+		<%@ include file="/html/portlet/dockbar/view_my_sites.jspf" %>
+	</c:if>
+
+	<%@ include file="/html/portlet/dockbar/view_user_account.jspf" %>
+</aui:nav>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/delete.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/delete.jspf
new file mode 100644
index 0000000..911e34e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/delete.jspf
@@ -0,0 +1,64 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<c:choose>
+	<c:when test="<%= (fileShortcut == null) %>">
+		<c:if test="<%= (!checkedOut || hasLock) && showActions && DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.DELETE) %>">
+			<c:choose>
+				<c:when test="<%= (fileEntry.getModel() instanceof DLFileEntry) && TrashUtil.isTrashEnabled(scopeGroupId) %>">
+					<portlet:actionURL var="deleteURL">
+						<portlet:param name="struts_action" value="/document_library/edit_file_entry" />
+						<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.MOVE_TO_TRASH %>" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+						<portlet:param name="fileEntryId" value="<%= String.valueOf(fileEntry.getFileEntryId()) %>" />
+					</portlet:actionURL>
+
+					<liferay-ui:icon-delete
+						trash="<%= true %>"
+						url="<%= deleteURL %>"
+					/>
+				</c:when>
+				<c:otherwise>
+					<portlet:actionURL var="deleteURL">
+						<portlet:param name="struts_action" value="/document_library/edit_file_entry" />
+						<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+						<portlet:param name="fileEntryId" value="<%= String.valueOf(fileEntry.getFileEntryId()) %>" />
+					</portlet:actionURL>
+
+					<liferay-ui:icon-delete
+						url="<%= deleteURL %>"
+					/>
+				</c:otherwise>
+			</c:choose>
+		</c:if>
+	</c:when>
+	<c:otherwise>
+		<c:if test="<%= showActions && DLFileShortcutPermission.contains(permissionChecker, fileShortcut, ActionKeys.DELETE) %>">
+			<portlet:actionURL var="deleteShortcutURL">
+				<portlet:param name="struts_action" value="/document_library/edit_file_shortcut" />
+				<portlet:param name="<%= Constants.CMD %>" value="<%= TrashUtil.isTrashEnabled(scopeGroupId) ? Constants.MOVE_TO_TRASH : Constants.DELETE %>" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="fileShortcutId" value="<%= String.valueOf(fileShortcut.getFileShortcutId()) %>" />
+			</portlet:actionURL>
+
+			<liferay-ui:icon-delete
+				trash="<%= TrashUtil.isTrashEnabled(scopeGroupId) %>"
+				url="<%= deleteShortcutURL %>"
+			/>
+		</c:if>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/download.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/download.jspf
new file mode 100644
index 0000000..c4475ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/download.jspf
@@ -0,0 +1,36 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<c:choose>
+	<c:when test="<%= (fileShortcut == null) %>">
+		<c:if test="<%= DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.VIEW) %>">
+			<liferay-ui:icon
+				image="download"
+				message='<%= LanguageUtil.get(pageContext, "download") + " (" + TextFormatter.formatStorageSize(fileEntry.getSize(), locale) + ")" %>'
+				url="<%= DLUtil.getPreviewURL(fileEntry, fileEntry.getFileVersion(), themeDisplay, StringPool.BLANK, false, true) %>"
+			/>
+		</c:if>
+	</c:when>
+	<c:otherwise>
+		<c:if test="<%= DLFileShortcutPermission.contains(permissionChecker, fileShortcut, ActionKeys.VIEW) %>">
+			<liferay-ui:icon
+				image="download"
+				message='<%= LanguageUtil.get(pageContext, "download") + " (" + TextFormatter.formatStorageSize(fileEntry.getSize(), locale) + ")" %>'
+				url='<%= themeDisplay.getPortalURL() + themeDisplay.getPathContext() + "/documents/" + fileShortcut.getFileShortcutId() %>'
+			/>
+		</c:if>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/edit.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/edit.jspf
new file mode 100644
index 0000000..a47975d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/edit.jspf
@@ -0,0 +1,47 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<c:choose>
+	<c:when test="<%= (fileShortcut == null) %>">
+		<c:if test="<%= (!checkedOut || hasLock) && showActions && DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.UPDATE) %>">
+			<portlet:renderURL var="editURL">
+				<portlet:param name="struts_action" value="/document_library/edit_file_entry" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="backURL" value="<%= currentURL %>" />
+				<portlet:param name="fileEntryId" value="<%= String.valueOf(fileEntry.getFileEntryId()) %>" />
+			</portlet:renderURL>
+
+			<liferay-ui:icon
+				image="edit"
+				url="<%= editURL %>"
+			/>
+		</c:if>
+	</c:when>
+	<c:otherwise>
+		<c:if test="<%= showActions && DLFileShortcutPermission.contains(permissionChecker, fileShortcut, ActionKeys.UPDATE) %>">
+			<portlet:renderURL var="editShortcutURL">
+				<portlet:param name="struts_action" value="/document_library/edit_file_shortcut" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="fileShortcutId" value="<%= String.valueOf(fileShortcut.getFileShortcutId()) %>" />
+			</portlet:renderURL>
+
+			<liferay-ui:icon
+				image="edit"
+				url="<%= editShortcutURL %>"
+			/>
+		</c:if>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/lock.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/lock.jspf
new file mode 100644
index 0000000..58893d0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/lock.jspf
@@ -0,0 +1,63 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<c:if test="<%= showActions && fileEntry.isSupportsLocking() %>">
+	<c:choose>
+		<c:when test="<%= !checkedOut && DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.UPDATE) %>">
+			<portlet:actionURL var="checkOutURL">
+				<portlet:param name="struts_action" value="/document_library/edit_file_entry" />
+				<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.CHECKOUT %>" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="fileEntryId" value="<%= String.valueOf(fileEntry.getFileEntryId()) %>" />
+			</portlet:actionURL>
+
+			<liferay-ui:icon
+				image="lock"
+				message="checkout[document]"
+				url="<%= checkOutURL %>"
+			/>
+		</c:when>
+		<c:otherwise>
+			<c:if test="<%= checkedOut && hasLock %>">
+				<portlet:actionURL var="checkInURL">
+					<portlet:param name="struts_action" value="/document_library/edit_file_entry" />
+					<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.CHECKIN %>" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="fileEntryId" value="<%= String.valueOf(fileEntry.getFileEntryId()) %>" />
+				</portlet:actionURL>
+
+				<liferay-ui:icon
+					image="unlock"
+					message="checkin"
+					url="<%= checkInURL %>"
+				/>
+
+				<portlet:actionURL var="cancelCheckOutURL">
+					<portlet:param name="struts_action" value="/document_library/edit_file_entry" />
+					<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.CANCEL_CHECKOUT %>" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="fileEntryId" value="<%= String.valueOf(fileEntry.getFileEntryId()) %>" />
+				</portlet:actionURL>
+
+				<liferay-ui:icon
+					image="undo"
+					message="cancel-checkout[document]"
+					url="<%= cancelCheckOutURL %>"
+				/>
+			</c:if>
+		</c:otherwise>
+	</c:choose>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/move.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/move.jspf
new file mode 100644
index 0000000..093ac39
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/move.jspf
@@ -0,0 +1,46 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<c:if test="<%= (!checkedOut || hasLock) && DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.UPDATE) && ((portletName.equals(PortletKeys.TRASH) && (restore || !fileEntry.isInTrash())) || showActions) %>">
+
+	<%
+	PortletURL moveURL = liferayPortletResponse.createRenderURL(PortletKeys.DOCUMENT_LIBRARY);
+
+	if (fileShortcut != null) {
+		moveURL.setParameter("struts_action", "/document_library/move_file_shortcut");
+		moveURL.setParameter("fileShortcutId", String.valueOf(fileShortcut.getFileShortcutId()));
+	}
+	else {
+		moveURL.setParameter("struts_action", "/document_library/move_file_entry");
+		moveURL.setParameter("fileEntryId", String.valueOf(fileEntry.getFileEntryId()));
+	}
+
+	if (portletName.equals(PortletKeys.TRASH)) {
+		moveURL.setParameter(Constants.CMD, Constants.MOVE_FROM_TRASH);
+		moveURL.setParameter("redirect", PortalUtil.getCurrentURL(request));
+		moveURL.setParameter("folderId", String.valueOf(DLFolderConstants.DEFAULT_PARENT_FOLDER_ID));
+	}
+	else if (showActions) {
+		moveURL.setParameter("redirect", viewFolderURL.toString());
+	}
+	%>
+
+	<liferay-ui:icon
+		image="submit"
+		message="move"
+		url="<%= moveURL.toString() %>"
+	/>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/open_document.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/open_document.jspf
new file mode 100644
index 0000000..af2a747
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/open_document.jspf
@@ -0,0 +1,38 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<c:if test="<%= DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.VIEW) %>">
+
+	<%
+	if (DLUtil.isOfficeExtension(fileEntry.getExtension()) && portletDisplay.isWebDAVEnabled() && BrowserSnifferUtil.isIeOnWin32(request)) {
+		String webDavUrl = DLUtil.getWebDavURL(themeDisplay, fileEntry.getFolder(), fileEntry, PropsValues.DL_FILE_ENTRY_OPEN_IN_MS_OFFICE_MANUAL_CHECK_IN_REQUIRED, true);
+
+		String taglibOnClick = "javascript:" + liferayPortletResponse.getNamespace() + "openDocument('" + webDavUrl + "');";
+	%>
+
+		<liferay-ui:icon
+			image="../document_library/msoffice"
+			message="open-in-ms-office"
+			onClick="<%= taglibOnClick %>"
+			url="javascript:;"
+		/>
+
+	<%
+	}
+	%>
+
+	<%@ include file="/html/portlet/document_library/action/open_document_js.jspf" %>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/open_document_js.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/open_document_js.jspf
new file mode 100644
index 0000000..38d7894
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/open_document_js.jspf
@@ -0,0 +1,43 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />openDocument',
+		function(webDavUrl) {
+			var A = AUI();
+
+			Liferay.Util.openDocument(
+				webDavUrl,
+				null,
+				function(exception) {
+					var errorMessage = A.Lang.sub(
+						'<%= UnicodeLanguageUtil.get(pageContext, "cannot-open-the-requested-document-due-to-the-following-reason") %>',
+						[exception.message]
+					);
+
+					var openMSOfficeError = A.one('#<portlet:namespace />openMSOfficeError');
+
+					openMSOfficeError.html(errorMessage);
+
+					openMSOfficeError.show();
+				}
+			);
+		},
+		['aui-base']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/permissions.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/permissions.jspf
new file mode 100644
index 0000000..b9e63b0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/permissions.jspf
@@ -0,0 +1,56 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<c:choose>
+	<c:when test="<%= (fileShortcut == null) %>">
+		<c:if test="<%= showActions && DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.PERMISSIONS) %>">
+			<liferay-security:permissionsURL
+				modelResource="<%= DLFileEntryConstants.getClassName() %>"
+				modelResourceDescription="<%= HtmlUtil.unescape(fileEntry.getTitle()) %>"
+				redirect="<%= currentURL %>"
+				resourcePrimKey="<%= String.valueOf(fileEntry.getFileEntryId()) %>"
+				var="permissionsURL"
+				windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+			/>
+
+			<liferay-ui:icon
+				image="permissions"
+				method="get"
+				url="<%= permissionsURL %>"
+				useDialog="<%= true %>"
+			/>
+		</c:if>
+	</c:when>
+	<c:otherwise>
+		<c:if test="<%= showActions && DLFileShortcutPermission.contains(permissionChecker, fileShortcut, ActionKeys.PERMISSIONS) %>">
+			<liferay-security:permissionsURL
+				modelResource="<%= DLFileShortcut.class.getName() %>"
+				modelResourceDescription="<%= fileEntry.getTitle() %>"
+				redirect="<%= currentURL %>"
+				resourcePrimKey="<%= String.valueOf(fileShortcut.getFileShortcutId()) %>"
+				var="shortcutPermissionsURL"
+				windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+			/>
+
+			<liferay-ui:icon
+				image="permissions"
+				method="get"
+				url="<%= shortcutPermissionsURL %>"
+				useDialog="<%= true %>"
+			/>
+		</c:if>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/view.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/view.jspf
new file mode 100644
index 0000000..ee3a6c2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/view.jspf
@@ -0,0 +1,31 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<c:if test="<%= (fileShortcut == null) %>">
+	<c:if test="<%= DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.VIEW) %>">
+		<portlet:renderURL var="viewFileEntryURL">
+			<portlet:param name="struts_action" value="/document_library/view_file_entry" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="fileEntryId" value="<%= String.valueOf(fileEntry.getFileEntryId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="view"
+			message="view"
+			url="<%= viewFileEntryURL %>"
+		/>
+	</c:if>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/view_original.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/view_original.jspf
new file mode 100644
index 0000000..3551bac
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/action/view_original.jspf
@@ -0,0 +1,31 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<c:if test="<%= (fileShortcut != null) %>">
+	<c:if test="<%= DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.VIEW) %>">
+		<portlet:renderURL var="viewOriginalFileURL">
+			<portlet:param name="struts_action" value="/document_library/view_file_entry" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="fileEntryId" value="<%= String.valueOf(fileShortcut.getToFileEntryId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="view"
+			message="view-original-file"
+			url="<%= viewOriginalFileURL %>"
+		/>
+	</c:if>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/add_button.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/add_button.jsp
new file mode 100644
index 0000000..5ba16cb
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/add_button.jsp
@@ -0,0 +1,131 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+Folder folder = (Folder)request.getAttribute("view.jsp-folder");
+
+long folderId = GetterUtil.getLong((String)request.getAttribute("view.jsp-folderId"));
+
+long repositoryId = GetterUtil.getLong((String)request.getAttribute("view.jsp-repositoryId"));
+
+List<DLFileEntryType> fileEntryTypes = Collections.emptyList();
+
+boolean inherited = true;
+
+if ((folder != null) && (folder.getModel() instanceof DLFolder)) {
+	DLFolder dlFolder = (DLFolder)folder.getModel();
+
+	inherited = !dlFolder.isOverrideFileEntryTypes();
+}
+
+if ((folder == null) || folder.isSupportsMetadata()) {
+	fileEntryTypes = DLFileEntryTypeServiceUtil.getFolderFileEntryTypes(PortalUtil.getSiteAndCompanyGroupIds(themeDisplay), folderId, inherited);
+}
+
+boolean hasAddDocumentPermission = DLFolderPermission.contains(permissionChecker, scopeGroupId, folderId, ActionKeys.ADD_DOCUMENT);
+%>
+
+<aui:nav-item dropdown="<%= true %>" id="addButtonContainer" label="add">
+	<c:if test="<%= DLFolderPermission.contains(permissionChecker, scopeGroupId, folderId, ActionKeys.ADD_FOLDER) %>">
+		<portlet:renderURL var="addFolderURL">
+			<portlet:param name="struts_action" value="/document_library/edit_folder" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="repositoryId" value="<%= String.valueOf(repositoryId) %>" />
+			<portlet:param name="parentFolderId" value="<%= String.valueOf(folderId) %>" />
+		</portlet:renderURL>
+
+		<aui:nav-item href="<%= addFolderURL %>" iconCssClass="icon-folder-open" label='<%= (folder != null) ? "subfolder" : "folder" %>' />
+	</c:if>
+
+	<c:if test="<%= ((folder == null) || folder.isSupportsShortcuts()) && DLFolderPermission.contains(permissionChecker, scopeGroupId, folderId, ActionKeys.ADD_SHORTCUT) %>">
+		<portlet:renderURL var="editFileShortcutURL">
+			<portlet:param name="struts_action" value="/document_library/edit_file_shortcut" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="repositoryId" value="<%= String.valueOf(repositoryId) %>" />
+			<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+		</portlet:renderURL>
+
+		<aui:nav-item href="<%= editFileShortcutURL %>" label="shortcut" />
+	</c:if>
+
+	<c:if test="<%= (folderId == DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) && (DLFolderPermission.contains(permissionChecker, scopeGroupId, folderId, ActionKeys.ADD_REPOSITORY)) %>">
+		<portlet:renderURL var="addRepositoryURL">
+			<portlet:param name="struts_action" value="/document_library/edit_repository" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+		</portlet:renderURL>
+
+		<aui:nav-item href="<%= addRepositoryURL %>" iconCssClass="icon-hdd" label="repository" />
+	</c:if>
+
+	<c:if test="<%= ((folder == null) || folder.isSupportsMultipleUpload()) && hasAddDocumentPermission && !fileEntryTypes.isEmpty() %>">
+		<portlet:renderURL var="editFileEntryURL">
+			<portlet:param name="struts_action" value="/document_library/upload_multiple_file_entries" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="backURL" value="<%= currentURL %>" />
+			<portlet:param name="repositoryId" value="<%= String.valueOf(repositoryId) %>" />
+			<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+		</portlet:renderURL>
+
+		<aui:nav-item href="<%= editFileEntryURL %>" label="multiple-documents" />
+	</c:if>
+
+	<c:choose>
+		<c:when test="<%= hasAddDocumentPermission && (repositoryId != scopeGroupId) %>">
+			<portlet:renderURL var="editFileEntryURL">
+				<portlet:param name="struts_action" value="/document_library/edit_file_entry" />
+				<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ADD %>" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="backURL" value="<%= currentURL %>" />
+				<portlet:param name="repositoryId" value="<%= String.valueOf(repositoryId) %>" />
+				<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+			</portlet:renderURL>
+
+			<aui:nav-item href="<%= editFileEntryURL %>" iconCssClass="icon-file" label="basic-document" />
+		</c:when>
+		<c:when test="<%= !fileEntryTypes.isEmpty() && hasAddDocumentPermission %>">
+
+			<%
+			for (DLFileEntryType fileEntryType : fileEntryTypes) {
+			%>
+
+				<portlet:renderURL var="addFileEntryTypeURL">
+					<portlet:param name="struts_action" value="/document_library/edit_file_entry" />
+					<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ADD %>" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="repositoryId" value="<%= String.valueOf(repositoryId) %>" />
+					<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+					<portlet:param name="fileEntryTypeId" value="<%= String.valueOf(fileEntryType.getFileEntryTypeId()) %>" />
+				</portlet:renderURL>
+
+				<aui:nav-item href="<%= addFileEntryTypeURL %>" iconCssClass="icon-file" label="<%= HtmlUtil.escape(fileEntryType.getName(locale)) %>" />
+
+			<%
+			}
+			%>
+
+		</c:when>
+	</c:choose>
+</aui:nav-item>
+
+<aui:script use="aui-base,uploader">
+	if (!A.UA.ios && (A.Uploader.TYPE != 'none')) {
+		var uploadMultipleDocumentsIcon = A.all('.upload-multiple-documents:hidden');
+
+		uploadMultipleDocumentsIcon.show();
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/asset/file_entry_abstract.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/asset/file_entry_abstract.jsp
new file mode 100644
index 0000000..a1b329a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/asset/file_entry_abstract.jsp
@@ -0,0 +1,71 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+int abstractLength = (Integer)request.getAttribute(WebKeys.ASSET_PUBLISHER_ABSTRACT_LENGTH);
+AssetRenderer assetRenderer = (AssetRenderer)request.getAttribute(WebKeys.ASSET_RENDERER);
+
+FileEntry fileEntry = (FileEntry)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FILE_ENTRY);
+
+FileVersion fileVersion = (FileVersion)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FILE_VERSION);
+
+boolean showThumbnail = false;
+
+if (fileEntry.getVersion().equals(fileVersion.getVersion())) {
+	showThumbnail = true;
+}
+%>
+
+<p class="asset-description">
+	<%= HtmlUtil.escape(StringUtil.shorten(fileEntry.getDescription(), abstractLength)) %>
+</p>
+
+<c:if test="<%= fileVersion.isApproved() %>">
+	<div class="asset-resource-info">
+		<c:choose>
+			<c:when test="<%= showThumbnail && ImageProcessorUtil.hasImages(fileVersion) %>">
+				<div>
+					<img alt="" src="<%= DLUtil.getPreviewURL(fileEntry, fileVersion, themeDisplay, "&imageThumbnail=1") %>" />
+				</div>
+			</c:when>
+			<c:when test="<%= showThumbnail && PDFProcessorUtil.hasImages(fileVersion) %>">
+				<div>
+					<img alt="" src="<%= DLUtil.getPreviewURL(fileEntry, fileVersion, themeDisplay, "&documentThumbnail=1") %>" />
+				</div>
+			</c:when>
+			<c:when test="<%= showThumbnail && VideoProcessorUtil.hasVideo(fileVersion) %>">
+				<div>
+					<img alt="" src="<%= DLUtil.getPreviewURL(fileEntry, fileVersion, themeDisplay, "&videoThumbnail=1") %>" />
+				</div>
+			</c:when>
+			<c:otherwise>
+
+				<%
+				String taglibFileEntryTitle = "<span class='hide-accessible'>" + fileEntry.getTitle() + "</span>";
+				%>
+
+				<liferay-ui:icon
+					image="download"
+					label="<%= true %>"
+					message='<%= LanguageUtil.format(pageContext, "download-x", taglibFileEntryTitle) + " (" + TextFormatter.formatStorageSize(fileVersion.getSize(), locale) + ")" %>'
+					url="<%= assetRenderer.getURLDownload(themeDisplay) %>"
+				/>
+			</c:otherwise>
+		</c:choose>
+	</div>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/asset/file_entry_full_content.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/asset/file_entry_full_content.jsp
new file mode 100644
index 0000000..b5bfbb4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/asset/file_entry_full_content.jsp
@@ -0,0 +1,19 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<liferay-util:include page="/html/portlet/document_library/view_file_entry.jsp" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/asset/folder_abstract.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/asset/folder_abstract.jsp
new file mode 100644
index 0000000..0e284e6
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/asset/folder_abstract.jsp
@@ -0,0 +1,27 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+int abstractLength = (Integer)request.getAttribute(WebKeys.ASSET_PUBLISHER_ABSTRACT_LENGTH);
+
+Folder folder = (Folder)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FOLDER);
+%>
+
+<p class="asset-description">
+	<%= HtmlUtil.escape(StringUtil.shorten(folder.getDescription(), abstractLength)) %>
+</p>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/asset/folder_full_content.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/asset/folder_full_content.jsp
new file mode 100644
index 0000000..d58ec72
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/asset/folder_full_content.jsp
@@ -0,0 +1,68 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+Folder folder = (Folder)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FOLDER);
+%>
+
+<c:if test="<%= folder != null %>">
+
+	<%
+	int status = WorkflowConstants.STATUS_APPROVED;
+
+	if (permissionChecker.isCompanyAdmin() || permissionChecker.isGroupAdmin(scopeGroupId)) {
+		status = WorkflowConstants.STATUS_ANY;
+	}
+
+	int foldersCount = DLAppServiceUtil.getFoldersCount(folder.getRepositoryId(), folder.getFolderId());
+	int fileEntriesCount = DLAppServiceUtil.getFileEntriesAndFileShortcutsCount(folder.getRepositoryId(), folder.getFolderId(), status);
+	%>
+
+	<aui:row>
+		<aui:col cssClass="lfr-asset-column lfr-asset-column-details" width="100">
+			<c:if test="<%= Validator.isNotNull(folder.getDescription()) %>">
+				<div class="lfr-asset-description">
+					<%= HtmlUtil.escape(folder.getDescription()) %>
+				</div>
+			</c:if>
+
+			<div class="lfr-asset-metadata">
+				<div class="lfr-asset-icon lfr-asset-date">
+					<%= LanguageUtil.format(pageContext, "last-updated-x", dateFormatDateTime.format(folder.getModifiedDate())) %>
+				</div>
+
+				<div class="lfr-asset-icon lfr-asset-subfolders">
+					<%= foldersCount %> <liferay-ui:message key='<%= (foldersCount == 1) ? "subfolder" : "subfolders" %>' />
+				</div>
+
+				<div class="lfr-asset-icon lfr-asset-items last">
+					<%= fileEntriesCount %> <liferay-ui:message key='<%= (fileEntriesCount == 1) ? "document" : "documents" %>' />
+				</div>
+			</div>
+
+			<liferay-ui:custom-attributes-available className="<%= DLFolderConstants.getClassName() %>">
+				<liferay-ui:custom-attribute-list
+					className="<%= DLFolderConstants.getClassName() %>"
+					classPK="<%= (folder != null) ? folder.getFolderId() : 0 %>"
+					editable="<%= false %>"
+					label="<%= true %>"
+				/>
+			</liferay-ui:custom-attributes-available>
+		</aui:col>
+	</aui:row>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/breadcrumb.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/breadcrumb.jsp
new file mode 100644
index 0000000..c6d452e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/breadcrumb.jsp
@@ -0,0 +1,31 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+Folder folder = (Folder)request.getAttribute("view.jsp-folder");
+
+DLUtil.addPortletBreadcrumbEntries(folder, request, liferayPortletResponse);
+%>
+
+<liferay-ui:breadcrumb
+	showCurrentGroup="<%= false %>"
+	showCurrentPortlet="<%= false %>"
+	showGuestGroup="<%= false %>"
+	showLayout="<%= false %>"
+	showParentGroups="<%= false %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/cast_result.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/cast_result.jspf
new file mode 100644
index 0000000..2ac43e8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/cast_result.jspf
@@ -0,0 +1,59 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+Folder curFolder = null;
+FileEntry fileEntry = null;
+DLFileShortcut fileShortcut = null;
+
+if (result instanceof AssetEntry) {
+	AssetEntry assetEntry = (AssetEntry)result;
+
+	if (assetEntry.getClassName().equals(DLFileEntryConstants.getClassName())) {
+		fileEntry = DLAppLocalServiceUtil.getFileEntry(assetEntry.getClassPK());
+
+		fileEntry = fileEntry.toEscapedModel();
+	}
+	else {
+		fileShortcut = DLAppLocalServiceUtil.getFileShortcut(assetEntry.getClassPK());
+
+		fileShortcut = fileShortcut.toEscapedModel();
+
+		fileEntry = DLAppLocalServiceUtil.getFileEntry(fileShortcut.getToFileEntryId());
+
+		fileEntry = fileEntry.toEscapedModel();
+	}
+}
+else if (result instanceof Folder) {
+	curFolder = (Folder)result;
+
+	curFolder = curFolder.toEscapedModel();
+}
+else if (result instanceof FileEntry) {
+	fileEntry = (FileEntry)result;
+
+	fileEntry = fileEntry.toEscapedModel();
+}
+else {
+	fileShortcut = (DLFileShortcut)result;
+
+	fileShortcut = fileShortcut.toEscapedModel();
+
+	fileEntry = DLAppLocalServiceUtil.getFileEntry(fileShortcut.getToFileEntryId());
+
+	fileEntry = fileEntry.toEscapedModel();
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/compare_versions.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/compare_versions.jsp
new file mode 100644
index 0000000..d20316e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/compare_versions.jsp
@@ -0,0 +1,36 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+String backURL = ParamUtil.getString(request, "backURL");
+
+String sourceName = (String)renderRequest.getAttribute(WebKeys.SOURCE_NAME);
+String targetName = (String)renderRequest.getAttribute(WebKeys.TARGET_NAME);
+List[] diffResults = (List[])renderRequest.getAttribute(WebKeys.DIFF_RESULTS);
+%>
+
+<liferay-ui:header
+	backURL="<%= backURL %>"
+	title="compare-versions"
+/>
+
+<liferay-ui:diff
+	diffResults="<%= diffResults %>"
+	sourceName="<%= sourceName %>"
+	targetName="<%= targetName %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/configuration.jsp
new file mode 100644
index 0000000..9086236
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/configuration.jsp
@@ -0,0 +1,499 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+String strutsAction = "/document_library_display";
+
+if (portletResource.equals(PortletKeys.DOCUMENT_LIBRARY)) {
+	strutsAction = "/document_library";
+}
+
+String tabs2 = ParamUtil.getString(request, "tabs2", "display-settings");
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+String emailFromName = ParamUtil.getString(request, "preferences--emailFromName--", DLUtil.getEmailFromName(portletPreferences, company.getCompanyId()));
+String emailFromAddress = ParamUtil.getString(request, "preferences--emailFromAddress--", DLUtil.getEmailFromAddress(portletPreferences, company.getCompanyId()));
+
+boolean emailFileEntryAddedEnabled = ParamUtil.getBoolean(request, "preferences--emailFileEntryAddedEnabled--", DLUtil.getEmailFileEntryAddedEnabled(portletPreferences));
+boolean emailFileEntryUpdatedEnabled = ParamUtil.getBoolean(request, "preferences--emailFileEntryUpdatedEnabled--", DLUtil.getEmailFileEntryUpdatedEnabled(portletPreferences));
+
+String emailParam = StringPool.BLANK;
+String defaultEmailSubject = StringPool.BLANK;
+String defaultEmailBody = StringPool.BLANK;
+
+if (tabs2.equals("document-added-email")) {
+	emailParam = "emailFileEntryAdded";
+	defaultEmailSubject = ContentUtil.get(PropsValues.DL_EMAIL_FILE_ENTRY_ADDED_SUBJECT);
+	defaultEmailBody = ContentUtil.get(PropsValues.DL_EMAIL_FILE_ENTRY_ADDED_BODY);
+}
+else if (tabs2.equals("document-updated-email")) {
+	emailParam = "emailFileEntryUpdated";
+	defaultEmailSubject = ContentUtil.get(PropsValues.DL_EMAIL_FILE_ENTRY_UPDATED_SUBJECT);
+	defaultEmailBody = ContentUtil.get(PropsValues.DL_EMAIL_FILE_ENTRY_UPDATED_BODY);
+}
+
+String currentLanguageId = LanguageUtil.getLanguageId(request);
+
+String emailSubjectParam = emailParam + "Subject_" + currentLanguageId;
+String emailBodyParam = emailParam + "Body_" + currentLanguageId;
+
+String emailSubject = PrefsParamUtil.getString(portletPreferences, request, emailSubjectParam, defaultEmailSubject);
+String emailBody = PrefsParamUtil.getString(portletPreferences, request, emailBodyParam, defaultEmailBody);
+%>
+
+<liferay-portlet:renderURL portletConfiguration="true" var="portletURL">
+	<portlet:param name="tabs2" value="<%= tabs2 %>" />
+	<portlet:param name="redirect" value="<%= redirect %>" />
+</liferay-portlet:renderURL>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveConfiguration();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+
+	<%
+	String tabs2Names = "display-settings,email-from,document-added-email,document-updated-email";
+	%>
+
+	<liferay-ui:tabs
+		names="<%= tabs2Names %>"
+		param="tabs2"
+		url="<%= portletURL %>"
+	/>
+
+	<liferay-ui:error key="displayViewsInvalid" message="display-style-views-cannot-be-empty" />
+	<liferay-ui:error key="emailFileEntryAddedBody" message="please-enter-a-valid-body" />
+	<liferay-ui:error key="emailFileEntryAddedSignature" message="please-enter-a-valid-signature" />
+	<liferay-ui:error key="emailFileEntryAddedSubject" message="please-enter-a-valid-subject" />
+	<liferay-ui:error key="emailFileEntryUpdatedBody" message="please-enter-a-valid-body" />
+	<liferay-ui:error key="emailFileEntryUpdatedSignature" message="please-enter-a-valid-signature" />
+	<liferay-ui:error key="emailFileEntryUpdatedSubject" message="please-enter-a-valid-subject" />
+	<liferay-ui:error key="emailFromAddress" message="please-enter-a-valid-email-address" />
+	<liferay-ui:error key="emailFromName" message="please-enter-a-valid-name" />
+	<liferay-ui:error key="rootFolderIdInvalid" message="please-enter-a-valid-root-folder" />
+
+	<c:choose>
+		<c:when test='<%= tabs2.equals("display-settings") %>'>
+			<aui:input name="preferences--rootFolderId--" type="hidden" value="<%= rootFolderId %>" />
+			<aui:input name="preferences--displayViews--" type="hidden" />
+			<aui:input name="preferences--entryColumns--" type="hidden" />
+
+			<liferay-ui:panel-container extended="<%= true %>" id="documentLibrarySettingsPanelContainer" persistState="<%= true %>">
+				<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="documentLibraryItemsListingPanel" persistState="<%= true %>" title="display-settings">
+					<aui:fieldset>
+						<aui:field-wrapper label="root-folder">
+							<div class="input-append">
+								<liferay-ui:input-resource id="rootFolderName" url="<%= rootFolderName %>" />
+
+								<aui:button name="selectFolderButton" value="select" />
+
+								<%
+								String taglibRemoveFolder = "Liferay.Util.removeFolderSelection('rootFolderId', 'rootFolderName', '" + renderResponse.getNamespace() + "');";
+								%>
+
+								<aui:button disabled="<%= rootFolderId <= 0 %>" name="removeFolderButton" onClick="<%= taglibRemoveFolder %>" value="remove" />
+							</div>
+						</aui:field-wrapper>
+
+						<aui:input label="show-search" name="preferences--showFoldersSearch--" type="checkbox" value="<%= showFoldersSearch %>" />
+
+						<aui:select label="maximum-entries-to-display" name="preferences--entriesPerPage--">
+
+							<%
+							for (int pageDeltaValue : PropsValues.SEARCH_CONTAINER_PAGE_DELTA_VALUES) {
+							%>
+
+								<aui:option label="<%= pageDeltaValue %>" selected="<%= entriesPerPage == pageDeltaValue %>" />
+
+							<%
+							}
+							%>
+
+						</aui:select>
+
+						<aui:input name="preferences--enableRelatedAssets--" type="checkbox" value="<%= enableRelatedAssets %>" />
+
+						<aui:field-wrapper label="display-style-views">
+
+							<%
+							Set<String> availableDisplayViews = SetUtil.fromArray(PropsValues.DL_DISPLAY_VIEWS);
+
+							// Left list
+
+							List leftList = new ArrayList();
+
+							for (String displayView : displayViews) {
+								leftList.add(new KeyValuePair(displayView, LanguageUtil.get(pageContext, displayView)));
+							}
+
+							// Right list
+
+							List rightList = new ArrayList();
+
+							Arrays.sort(displayViews);
+
+							for (String displayView : availableDisplayViews) {
+								if (Arrays.binarySearch(displayViews, displayView) < 0) {
+									rightList.add(new KeyValuePair(displayView, LanguageUtil.get(pageContext, displayView)));
+								}
+							}
+
+							rightList = ListUtil.sort(rightList, new KeyValuePairComparator(false, true));
+							%>
+
+							<liferay-ui:input-move-boxes
+								leftBoxName="currentDisplayViews"
+								leftList="<%= leftList %>"
+								leftReorder="true"
+								leftTitle="current"
+								rightBoxName="availableDisplayViews"
+								rightList="<%= rightList %>"
+								rightTitle="available"
+							/>
+						</aui:field-wrapper>
+					</aui:fieldset>
+				</liferay-ui:panel>
+
+				<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="documentLibraryEntriesListingPanel" persistState="<%= true %>" title="entries-listing-for-list-display-style">
+					<aui:fieldset>
+						<aui:field-wrapper label="show-columns">
+
+							<%
+							Set<String> availableEntryColumns = SetUtil.fromArray(StringUtil.split(allEntryColumns));
+
+							// Left list
+
+							List leftList = new ArrayList();
+
+							for (String entryColumn : entryColumns) {
+								leftList.add(new KeyValuePair(entryColumn, LanguageUtil.get(pageContext, entryColumn)));
+							}
+
+							// Right list
+
+							List rightList = new ArrayList();
+
+							Arrays.sort(entryColumns);
+
+							for (String entryColumn : availableEntryColumns) {
+								if (Arrays.binarySearch(entryColumns, entryColumn) < 0) {
+									rightList.add(new KeyValuePair(entryColumn, LanguageUtil.get(pageContext, entryColumn)));
+								}
+							}
+
+							rightList = ListUtil.sort(rightList, new KeyValuePairComparator(false, true));
+							%>
+
+							<liferay-ui:input-move-boxes
+								leftBoxName="currentEntryColumns"
+								leftList="<%= leftList %>"
+								leftReorder="true"
+								leftTitle="current"
+								rightBoxName="availableEntryColumns"
+								rightList="<%= rightList %>"
+								rightTitle="available"
+							/>
+						</aui:field-wrapper>
+					</aui:fieldset>
+				</liferay-ui:panel>
+
+				<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="documentLibraryDocumentsRatingsPanel" persistState="<%= true %>" title="ratings">
+					<aui:input name="preferences--enableRatings--" type="checkbox" value="<%= enableRatings %>" />
+					<aui:input name="preferences--enableCommentRatings--" type="checkbox" value="<%= enableCommentRatings %>" />
+				</liferay-ui:panel>
+			</liferay-ui:panel-container>
+
+			<liferay-portlet:renderURL portletName="<%= portletResource %>" var="selectFolderURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+				<portlet:param name="struts_action" value='<%= strutsAction + "/select_folder" %>' />
+			</liferay-portlet:renderURL>
+
+			<aui:script use="aui-base">
+				A.one('#<portlet:namespace />selectFolderButton').on(
+					'click',
+					function(event) {
+						Liferay.Util.selectEntity(
+							{
+								dialog: {
+									constrain: true,
+									modal: true,
+									width: 600
+								},
+								id: '_<%= HtmlUtil.escapeJS(portletResource) %>_selectFolder',
+								title: '<liferay-ui:message arguments="folder" key="select-x" />',
+								uri: '<%= selectFolderURL.toString() %>'
+							},
+							function(event) {
+								var folderData = {
+									idString: 'rootFolderId',
+									idValue: event.folderid,
+									nameString: 'rootFolderName',
+									nameValue: event.foldername
+								};
+
+								Liferay.Util.selectFolder(folderData, '<portlet:namespace />');
+							}
+						);
+					}
+				);
+			</aui:script>
+		</c:when>
+		<c:when test='<%= tabs2.equals("email-from") %>'>
+			<aui:fieldset>
+				<aui:input cssClass="lfr-input-text-container" label="name" name="preferences--emailFromName--" value="<%= emailFromName %>" />
+
+				<aui:input cssClass="lfr-input-text-container" label="address" name="preferences--emailFromAddress--" value="<%= emailFromAddress %>" />
+			</aui:fieldset>
+
+			<div class="definition-of-terms">
+				<h4><liferay-ui:message key="definition-of-terms" /></h4>
+
+				<dl>
+					<dt>
+						[$COMPANY_ID$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-company-id-associated-with-the-document" />
+					</dd>
+					<dt>
+						[$COMPANY_MX$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-company-mx-associated-with-the-document" />
+					</dd>
+					<dt>
+						[$COMPANY_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-company-name-associated-with-the-document" />
+					</dd>
+					<dt>
+						[$DOCUMENT_STATUS_BY_USER_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-user-who-updated-the-document" />
+					</dd>
+					<dt>
+						[$DOCUMENT_USER_ADDRESS$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-email-address-of-the-user-who-added-the-document" />
+					</dd>
+					<dt>
+						[$DOCUMENT_USER_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-user-who-added-the-document" />
+					</dd>
+					<dt>
+						[$PORTLET_NAME$]
+					</dt>
+					<dd>
+						<%= PortalUtil.getPortletTitle(renderResponse) %>
+					</dd>
+					<dt>
+						[$SITE_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-site-name-associated-with-the-document" />
+					</dd>
+				</dl>
+			</div>
+		</c:when>
+		<c:when test='<%= tabs2.startsWith("document-") %>'>
+			<aui:fieldset>
+				<c:choose>
+					<c:when test='<%= tabs2.equals("document-added-email") %>'>
+						<aui:input label="enabled" name="preferences--emailFileEntryAddedEnabled--" type="checkbox" value="<%= emailFileEntryAddedEnabled %>" />
+					</c:when>
+					<c:when test='<%= tabs2.equals("document-updated-email") %>'>
+						<aui:input label="enabled" name="preferences--emailFileEntryUpdatedEnabled--" type="checkbox" value="<%= emailFileEntryUpdatedEnabled %>" />
+					</c:when>
+				</c:choose>
+
+				<aui:select label="language" name="languageId" onChange='<%= renderResponse.getNamespace() + "updateLanguage(this);" %>'>
+
+					<%
+					Locale[] locales = LanguageUtil.getAvailableLocales(themeDisplay.getSiteGroupId());
+
+					for (int i = 0; i < locales.length; i++) {
+						String style = StringPool.BLANK;
+
+						if (Validator.isNotNull(portletPreferences.getValue(emailParam + "Subject_" + LocaleUtil.toLanguageId(locales[i]), StringPool.BLANK)) ||
+							Validator.isNotNull(portletPreferences.getValue(emailParam + "Body_" + LocaleUtil.toLanguageId(locales[i]), StringPool.BLANK))) {
+
+							style = "font-weight: bold;";
+						}
+					%>
+
+						<aui:option label="<%= locales[i].getDisplayName(locale) %>" selected="<%= currentLanguageId.equals(LocaleUtil.toLanguageId(locales[i])) %>" style="<%= style %>" value="<%= LocaleUtil.toLanguageId(locales[i]) %>" />
+
+					<%
+					}
+					%>
+
+				</aui:select>
+
+				<aui:input cssClass="lfr-input-text-container" label="subject" name='<%= "preferences--" + emailSubjectParam + "--" %>' value="<%= emailSubject %>" />
+
+				<aui:field-wrapper label="body">
+					<liferay-ui:input-editor editorImpl="<%= EDITOR_WYSIWYG_IMPL_KEY %>" />
+
+					<aui:input name='<%= "preferences--" + emailBodyParam + "--" %>' type="hidden" />
+				</aui:field-wrapper>
+			</aui:fieldset>
+
+			<div class="definition-of-terms">
+				<h4><liferay-ui:message key="definition-of-terms" /></h4>
+
+				<dl>
+					<dt>
+						[$COMPANY_ID$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-company-id-associated-with-the-document" />
+					</dd>
+					<dt>
+						[$COMPANY_MX$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-company-mx-associated-with-the-document" />
+					</dd>
+					<dt>
+						[$COMPANY_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-company-name-associated-with-the-document" />
+					</dd>
+					<dt>
+						[$DOCUMENT_TITLE$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-document-title" />
+					</dd>
+					<dt>
+						[$DOCUMENT_TYPE$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-document-type" />
+					</dd>
+					<dt>
+						[$DOCUMENT_USER_ADDRESS$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-email-address-of-the-user-who-added-the-document" />
+					</dd>
+					<dt>
+						[$DOCUMENT_USER_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-user-who-added-the-document" />
+					</dd>
+					<dt>
+						[$FOLDER_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-folder-in-which-the-document-has-been-added" />
+					</dd>
+					<dt>
+						[$FROM_ADDRESS$]
+					</dt>
+					<dd>
+						<%= HtmlUtil.escape(emailFromAddress) %>
+					</dd>
+					<dt>
+						[$FROM_NAME$]
+					</dt>
+					<dd>
+						<%= HtmlUtil.escape(emailFromName) %>
+					</dd>
+					<dt>
+						[$PORTAL_URL$]
+					</dt>
+					<dd>
+						<%= company.getVirtualHostname() %>
+					</dd>
+					<dt>
+						[$PORTLET_NAME$]
+					</dt>
+					<dd>
+						<%= PortalUtil.getPortletTitle(renderResponse) %>
+					</dd>
+					<dt>
+						[$SITE_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-site-name-associated-with-the-document" />
+					</dd>
+					<dt>
+						[$TO_ADDRESS$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-address-of-the-email-recipient" />
+					</dd>
+					<dt>
+						[$TO_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-name-of-the-email-recipient" />
+					</dd>
+				</dl>
+			</div>
+		</c:when>
+	</c:choose>
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />initEditor() {
+		return "<%= UnicodeFormatter.toString(emailBody) %>";
+	}
+
+	function <portlet:namespace />updateLanguage() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = '';
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />saveConfiguration',
+		function() {
+			<c:choose>
+				<c:when test='<%= tabs2.startsWith("document-") %>'>
+					document.<portlet:namespace />fm.<portlet:namespace /><%= emailBodyParam %>.value = window.<portlet:namespace />editor.getHTML();
+				</c:when>
+				<c:when test='<%= tabs2.equals("display-settings") %>'>
+					document.<portlet:namespace />fm.<portlet:namespace />displayViews.value = Liferay.Util.listSelect(document.<portlet:namespace />fm.<portlet:namespace />currentDisplayViews);
+					document.<portlet:namespace />fm.<portlet:namespace />entryColumns.value = Liferay.Util.listSelect(document.<portlet:namespace />fm.<portlet:namespace />currentEntryColumns);
+				</c:when>
+			</c:choose>
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
+
+<%!
+public static final String EDITOR_WYSIWYG_IMPL_KEY = "editor.wysiwyg.portal-web.docroot.html.portlet.document_library.configuration.jsp";
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/css/.sass-cache/main.css
new file mode 100644
index 0000000..f350080
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/css/.sass-cache/main.css
@@ -0,0 +1,362 @@
+.portlet-document-library .select-all-entries, .portlet-document-library-display .select-all-entries {
+  display: inline-block;
+  margin-left: 10px;
+  margin-top: 15px; }
+.portlet-document-library .file-entry-list-description, .portlet-document-library-display .file-entry-list-description {
+  font-style: italic;
+  margin-left: 10px; }
+.portlet-document-library .file-entry-tags, .portlet-document-library-display .file-entry-tags {
+  margin-top: 5px; }
+.portlet-document-library .edit-file-entry-type h3, .portlet-document-library-display .edit-file-entry-type h3 {
+  margin: 1em 0 0.3em 0; }
+.portlet-document-library .edit-file-entry-type .select-metadata-set, .portlet-document-library-display .edit-file-entry-type .select-metadata-set {
+  display: block;
+  margin-bottom: 2em; }
+.portlet-document-library .repository-settings-display dt, .portlet-document-library-display .repository-settings-display dt {
+  font-weight: bold;
+  margin-top: 1em; }
+.portlet-document-library .lfr-asset-panels .lfr-panel.lfr-extended, .portlet-document-library-display .lfr-asset-panels .lfr-panel.lfr-extended {
+  border-bottom: none; }
+.portlet-document-library .document-container .search-info, .portlet-document-library-display .document-container .search-info {
+  background-color: #D3E8F1;
+  margin-bottom: 0.5em;
+  padding: 0.5em 0.75em;
+  padding-right: 30px;
+  position: relative;
+  word-wrap: break-word; }
+  .portlet-document-library .document-container .search-info .keywords, .portlet-document-library-display .document-container .search-info .keywords {
+    float: none;
+    font-size: 1.4em;
+    font-weight: bold; }
+  .portlet-document-library .document-container .search-info .change-search-folder, .portlet-document-library-display .document-container .search-info .change-search-folder {
+    position: absolute;
+    right: 30px;
+    top: 0.3em; }
+  .portlet-document-library .document-container .search-info .close-search, .portlet-document-library-display .document-container .search-info .close-search {
+    margin-top: -8px;
+    position: absolute;
+    right: 5px;
+    top: 50%; }
+.portlet-document-library .document-container .search-results-container .tabview-list, .portlet-document-library-display .document-container .search-results-container .tabview-list {
+  margin-bottom: 0; }
+.portlet-document-library .move-list .move-file, .portlet-document-library .move-list .move-folder, .portlet-document-library-display .move-list .move-file, .portlet-document-library-display .move-list .move-folder {
+  background: #f0faf0 url() no-repeat 5px 50%;
+  border-bottom: 1px solid #CCC;
+  display: block;
+  font-weight: bold;
+  margin-bottom: 1px;
+  padding: 5px;
+  padding-left: 25px;
+  position: relative; }
+.portlet-document-library .move-list .move-file, .portlet-document-library-display .move-list .move-file {
+  background-image: url(@theme_image_path@/file_system/small/jpg.png); }
+.portlet-document-library .move-list .move-folder, .portlet-document-library-display .move-list .move-folder {
+  background-image: url(@theme_image_path@/common/folder.png); }
+.portlet-document-library .move-list .move-error, .portlet-document-library-display .move-list .move-error {
+  background-color: #FDD;
+  background-image: url(@theme_image_path@/messages/error.png);
+  font-weight: normal;
+  filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=60);
+  opacity: 0.6; }
+  .portlet-document-library .move-list .move-error .error-message, .portlet-document-library-display .move-list .move-error .error-message {
+    position: absolute;
+    right: 5px; }
+.portlet-document-library .move-list .unstyled, .portlet-document-library-display .move-list .unstyled {
+  margin: 0; }
+.portlet-document-library .move-list-info, .portlet-document-library-display .move-list-info {
+  margin: 5px 0; }
+  .portlet-document-library .move-list-info h4, .portlet-document-library-display .move-list-info h4 {
+    font-size: 1.3em; }
+.portlet-document-library .document-container, .portlet-document-library .document-entries-pagination, .portlet-document-library-display .document-container, .portlet-document-library-display .document-entries-pagination {
+  clear: both; }
+.portlet-document-library .document-entries-pagination, .portlet-document-library-display .document-entries-pagination {
+  text-align: center;
+  margin: 10px 0; }
+  .portlet-document-library .document-entries-pagination .pagination-content, .portlet-document-library-display .document-entries-pagination .pagination-content {
+    margin: 0; }
+.portlet-document-library .folder.error:hover, .portlet-document-library-display .folder.error:hover {
+  background-color: #FDD; }
+.portlet-document-library .folder-search, .portlet-document-library-display .folder-search {
+  float: right;
+  margin: 0 0 0.5em 0.5em; }
+.portlet-document-library img.locked-icon, .portlet-document-library img.shortcut-icon, .portlet-document-library-display img.locked-icon, .portlet-document-library-display img.shortcut-icon {
+  bottom: 10px;
+  position: absolute;
+  z-index: 10; }
+.portlet-document-library img.locked-icon, .portlet-document-library-display img.locked-icon {
+  right: -10px; }
+.portlet-document-library img.shortcut-icon, .portlet-document-library-display img.shortcut-icon {
+  left: -5px; }
+.portlet-document-library .button-holder.toolbar, .portlet-document-library-display .button-holder.toolbar {
+  display: inline;
+  margin: 0; }
+.portlet-document-library .lfr-header-row .lfr-asset-summary, .portlet-document-library-display .lfr-header-row .lfr-asset-summary {
+  margin-left: 5px; }
+  .portlet-document-library .lfr-header-row .lfr-asset-summary .download-document, .portlet-document-library .lfr-header-row .lfr-asset-summary .conversions, .portlet-document-library .lfr-header-row .lfr-asset-summary .lfr-asset-author, .portlet-document-library .lfr-header-row .lfr-asset-summary .webdav-url, .portlet-document-library-display .lfr-header-row .lfr-asset-summary .download-document, .portlet-document-library-display .lfr-header-row .lfr-asset-summary .conversions, .portlet-document-library-display .lfr-header-row .lfr-asset-summary .lfr-asset-author, .portlet-document-library-display .lfr-header-row .lfr-asset-summary .webdav-url {
+    display: block;
+    margin: 0.7em 0; }
+  .portlet-document-library .lfr-header-row .lfr-asset-summary .download-document, .portlet-document-library-display .lfr-header-row .lfr-asset-summary .download-document {
+    margin-top: 1.2em; }
+  .portlet-document-library .lfr-header-row .lfr-asset-summary .conversions, .portlet-document-library-display .lfr-header-row .lfr-asset-summary .conversions {
+    margin-bottom: 1.2em; }
+  .portlet-document-library .lfr-header-row .lfr-asset-summary .version, .portlet-document-library-display .lfr-header-row .lfr-asset-summary .version {
+    display: block;
+    font-size: 1.4em;
+    font-weight: bold; }
+.portlet-document-library .lfr-header-row .icon-delete, .portlet-document-library .lfr-header-row .icon-download, .portlet-document-library .lfr-header-row .icon-edit, .portlet-document-library .lfr-header-row .icon-lock, .portlet-document-library .lfr-header-row .icon-move, .portlet-document-library .lfr-header-row .icon-permissions, .portlet-document-library .lfr-header-row .icon-trash, .portlet-document-library .lfr-header-row .icon-undo, .portlet-document-library .lfr-header-row .icon-unlock, .portlet-document-library-display .lfr-header-row .icon-delete, .portlet-document-library-display .lfr-header-row .icon-download, .portlet-document-library-display .lfr-header-row .icon-edit, .portlet-document-library-display .lfr-header-row .icon-lock, .portlet-document-library-display .lfr-header-row .icon-move, .portlet-document-library-display .lfr-header-row .icon-permissions, .portlet-document-library-display .lfr-header-row .icon-trash, .portlet-document-library-display .lfr-header-row .icon-undo, .portlet-document-library-display .lfr-header-row .icon-unlock {
+  background: url() no-repeat 0 0; }
+.portlet-document-library .lfr-header-row .icon-delete, .portlet-document-library-display .lfr-header-row .icon-delete {
+  background-image: url(@theme_image_path@/common/delete.png); }
+.portlet-document-library .lfr-header-row .icon-download, .portlet-document-library-display .lfr-header-row .icon-download {
+  background-image: url(@theme_image_path@/common/download.png); }
+.portlet-document-library .lfr-header-row .icon-edit, .portlet-document-library-display .lfr-header-row .icon-edit {
+  background-image: url(@theme_image_path@/common/edit.png); }
+.portlet-document-library .lfr-header-row .icon-lock, .portlet-document-library-display .lfr-header-row .icon-lock {
+  background-image: url(@theme_image_path@/common/lock.png); }
+.portlet-document-library .lfr-header-row .icon-move, .portlet-document-library-display .lfr-header-row .icon-move {
+  background-image: url(@theme_image_path@/common/submit.png); }
+.portlet-document-library .lfr-header-row .icon-msoffice, .portlet-document-library-display .lfr-header-row .icon-msoffice {
+  background-image: url(@theme_image_path@/document_library/msoffice.png); }
+.portlet-document-library .lfr-header-row .icon-permissions, .portlet-document-library-display .lfr-header-row .icon-permissions {
+  background-image: url(@theme_image_path@/common/permissions.png); }
+.portlet-document-library .lfr-header-row .icon-trash, .portlet-document-library-display .lfr-header-row .icon-trash {
+  background-image: url(@theme_image_path@/common/trash.png); }
+.portlet-document-library .lfr-header-row .icon-undo, .portlet-document-library-display .lfr-header-row .icon-undo {
+  background-image: url(@theme_image_path@/common/undo.png); }
+.portlet-document-library .lfr-header-row .icon-unlock, .portlet-document-library-display .lfr-header-row .icon-unlock {
+  background-image: url(@theme_image_path@/common/unlock.png); }
+.portlet-document-library .lfr-header-row-content, .portlet-document-library-display .lfr-header-row-content {
+  padding-left: 0;
+  padding-top: 0; }
+  .portlet-document-library .lfr-header-row-content .edit-toolbar, .portlet-document-library-display .lfr-header-row-content .edit-toolbar {
+    margin: 0; }
+.portlet-document-library .lfr-app-column-view, .portlet-document-library-display .lfr-app-column-view {
+  border: none; }
+  .portlet-document-library .lfr-app-column-view .sync-notification, .portlet-document-library-display .lfr-app-column-view .sync-notification {
+    border-top-width: 1px; }
+  .portlet-document-library .lfr-app-column-view .lfr-app-column-view-content, .portlet-document-library-display .lfr-app-column-view .lfr-app-column-view-content {
+    background-color: #FAFAFA; }
+.portlet-document-library .context-pane .context-pane-content, .portlet-document-library-display .context-pane .context-pane-content {
+  border-left: 1px solid #7B7B7B;
+  position: relative; }
+.portlet-document-library .taglib-search-iterator-page-iterator-top, .portlet-document-library .taglib-search-iterator-page-iterator-bottom, .portlet-document-library .paginator-container, .portlet-document-library-display .taglib-search-iterator-page-iterator-top, .portlet-document-library-display .taglib-search-iterator-page-iterator-bottom, .portlet-document-library-display .paginator-container {
+  clear: both;
+  padding: 5px;
+  position: relative; }
+.portlet-document-library .taglib-search-iterator-page-iterator-top.page-iterator-bottom, .portlet-document-library .lfr-app-column-view .taglib-search-iterator-page-iterator-bottom, .portlet-document-library-display .taglib-search-iterator-page-iterator-top.page-iterator-bottom, .portlet-document-library-display .lfr-app-column-view .taglib-search-iterator-page-iterator-bottom {
+  bottom: 0;
+  left: 0;
+  position: absolute;
+  right: 0; }
+.portlet-document-library .taglib-search-iterator, .portlet-document-library-display .taglib-search-iterator {
+  table-layout: fixed; }
+  .portlet-document-library .taglib-search-iterator .align-left, .portlet-document-library-display .taglib-search-iterator .align-left {
+    word-wrap: break-word; }
+.portlet-document-library .taglib-webdav, .portlet-document-library-display .taglib-webdav {
+  margin-top: 3em; }
+.portlet-document-library .taglib-workflow-status, .portlet-document-library-display .taglib-workflow-status {
+  margin-bottom: 5px; }
+.portlet-document-library .document-library-breadcrumb ul, .portlet-document-library-display .document-library-breadcrumb ul {
+  margin-bottom: 0; }
+.portlet-document-library .show-sync-message-icon-container, .portlet-document-library-display .show-sync-message-icon-container {
+  position: relative; }
+.portlet-document-library .show-sync-message, .portlet-document-library-display .show-sync-message {
+  position: absolute;
+  right: 5px;
+  top: 5px;
+  z-index: 1; }
+.portlet-document-library .subscribe-action, .portlet-document-library-display .subscribe-action {
+  margin-bottom: 5px;
+  margin-right: 10px;
+  margin-top: 5px;
+  text-align: right; }
+.portlet-document-library .sync-message-hidden, .portlet-document-library-display .sync-message-hidden {
+  display: none; }
+.portlet-document-library .lfr-document-library-comments.lfr-panel.lfr-extended, .portlet-document-library-display .lfr-document-library-comments.lfr-panel.lfr-extended {
+  background: #FFF;
+  border-width: 0;
+  border-right: 1px solid #CCC;
+  margin-bottom: 0; }
+  .portlet-document-library .lfr-document-library-comments.lfr-panel.lfr-extended .lfr-panel-titlebar, .portlet-document-library-display .lfr-document-library-comments.lfr-panel.lfr-extended .lfr-panel-titlebar {
+    margin-top: 0; }
+.portlet-document-library .version.document-locked, .portlet-document-library-display .version.document-locked {
+  background: url(@theme_image_path@/common/lock.png) no-repeat 0 50%;
+  padding-left: 20px; }
+.portlet-document-library .common-file-metadata-container, .portlet-document-library-display .common-file-metadata-container {
+  padding: 1em; }
+  .portlet-document-library .common-file-metadata-container .field-element, .portlet-document-library-display .common-file-metadata-container .field-element {
+    display: block; }
+    .portlet-document-library .common-file-metadata-container .field-element textarea, .portlet-document-library-display .common-file-metadata-container .field-element textarea {
+      width: 100% !important; }
+  .portlet-document-library .common-file-metadata-container.selected, .portlet-document-library-display .common-file-metadata-container.selected {
+    background-color: #D3E8F1;
+    border: 1px solid #38F; }
+  .portlet-document-library .common-file-metadata-container .selected-files-count, .portlet-document-library-display .common-file-metadata-container .selected-files-count {
+    border-bottom: 1px solid #C8C9CA;
+    color: #555;
+    font-size: 1.8em;
+    font-weight: bold;
+    margin-bottom: 10px;
+    overflow: hidden; }
+  .portlet-document-library .common-file-metadata-container .document-type .lfr-panel-content, .portlet-document-library-display .common-file-metadata-container .document-type .lfr-panel-content {
+    min-height: 35px; }
+  .portlet-document-library .common-file-metadata-container .document-type-fields, .portlet-document-library-display .common-file-metadata-container .document-type-fields {
+    clear: left;
+    padding-top: 0.5em; }
+  .portlet-document-library .common-file-metadata-container .categorization-panel, .portlet-document-library-display .common-file-metadata-container .categorization-panel {
+    clear: left; }
+.portlet-document-library .app-view-entry-taglib .entry-result-icon, .portlet-document-library-display .app-view-entry-taglib .entry-result-icon {
+  background: url() no-repeat 50%;
+  display: none;
+  height: 16px;
+  position: absolute;
+  right: 5px;
+  vertical-align: middle;
+  width: 16px; }
+.portlet-document-library .app-view-entry-taglib.entry-display-style.display-icon .entry-thumbnail .taglib-workflow-status, .portlet-document-library .app-view-entry-taglib.entry-display-style.display-descriptive .entry-thumbnail .taglib-workflow-status, .portlet-document-library-display .app-view-entry-taglib.entry-display-style.display-icon .entry-thumbnail .taglib-workflow-status, .portlet-document-library-display .app-view-entry-taglib.entry-display-style.display-descriptive .entry-thumbnail .taglib-workflow-status {
+  left: 6px;
+  margin: 0;
+  padding: 0;
+  position: absolute;
+  top: 4px; }
+  .portlet-document-library .app-view-entry-taglib.entry-display-style.display-icon .entry-thumbnail .taglib-workflow-status .workflow-status, .portlet-document-library .app-view-entry-taglib.entry-display-style.display-descriptive .entry-thumbnail .taglib-workflow-status .workflow-status, .portlet-document-library-display .app-view-entry-taglib.entry-display-style.display-icon .entry-thumbnail .taglib-workflow-status .workflow-status, .portlet-document-library-display .app-view-entry-taglib.entry-display-style.display-descriptive .entry-thumbnail .taglib-workflow-status .workflow-status {
+    margin: 0;
+    padding: 0; }
+.portlet-document-library .app-view-entry-taglib.entry-display-style.display-icon .entry-thumbnail .taglib-workflow-status, .portlet-document-library-display .app-view-entry-taglib.entry-display-style.display-icon .entry-thumbnail .taglib-workflow-status {
+  left: 6px; }
+.portlet-document-library .app-view-entry-taglib.entry-display-style.display-icon .entry-title, .portlet-document-library-display .app-view-entry-taglib.entry-display-style.display-icon .entry-title {
+  white-space: nowrap;
+  overflow: hidden;
+  -ms-text-overflow: ellipsis;
+  -o-text-overflow: ellipsis;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  position: relative;
+  white-space: nowrap; }
+.portlet-document-library .app-view-entry-taglib.entry-display-style.display-icon .entry-title-text, .portlet-document-library-display .app-view-entry-taglib.entry-display-style.display-icon .entry-title-text {
+  background: url() no-repeat 0 50%; }
+.portlet-document-library .app-view-entry-taglib.entry-display-style.display-icon.upload-error .entry-title-text, .portlet-document-library .app-view-entry-taglib.entry-display-style.display-icon.upload-success .entry-title-text, .portlet-document-library .app-view-entry-taglib.entry-display-style.display-icon.upload-warning .entry-title-text, .portlet-document-library-display .app-view-entry-taglib.entry-display-style.display-icon.upload-error .entry-title-text, .portlet-document-library-display .app-view-entry-taglib.entry-display-style.display-icon.upload-success .entry-title-text, .portlet-document-library-display .app-view-entry-taglib.entry-display-style.display-icon.upload-warning .entry-title-text {
+  padding-left: 20px; }
+.portlet-document-library .app-view-entry-taglib.entry-display-style.display-icon.upload-error .entry-title-text, .portlet-document-library-display .app-view-entry-taglib.entry-display-style.display-icon.upload-error .entry-title-text {
+  background-image: url(@theme_image_path@/messages/error.png); }
+.portlet-document-library .app-view-entry-taglib.entry-display-style.display-icon.upload-success .entry-title-text, .portlet-document-library-display .app-view-entry-taglib.entry-display-style.display-icon.upload-success .entry-title-text {
+  background-image: url(@theme_image_path@/messages/success.png); }
+.portlet-document-library .app-view-entry-taglib.entry-display-style.display-icon.upload-warning .entry-title-text, .portlet-document-library-display .app-view-entry-taglib.entry-display-style.display-icon.upload-warning .entry-title-text {
+  background-image: url(@theme_image_path@/messages/alert.png); }
+.portlet-document-library .app-view-entry-taglib.entry-display-style.display-descriptive .entry-thumbnail .taglib-workflow-status, .portlet-document-library-display .app-view-entry-taglib.entry-display-style.display-descriptive .entry-thumbnail .taglib-workflow-status {
+  left: 5px; }
+
+.portlet-document-library .document-info, .portlet-document-library-display .document-info, .portlet-trash .document-info {
+  background: #D2DDE7;
+  border-bottom: 1px solid #6D6D6E;
+  padding: 10px; }
+  .portlet-document-library .document-info:after, .portlet-document-library-display .document-info:after, .portlet-trash .document-info:after {
+    clear: both;
+    content: "";
+    display: block;
+    height: 0; }
+  .portlet-document-library .document-info .document-title, .portlet-document-library-display .document-info .document-title, .portlet-trash .document-info .document-title {
+    margin: 0 0 10px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    text-shadow: 1px 1px #FFF; }
+  .portlet-document-library .document-info .user-date, .portlet-document-library .document-info .taglib-asset-tags-summary, .portlet-document-library-display .document-info .user-date, .portlet-document-library-display .document-info .taglib-asset-tags-summary, .portlet-trash .document-info .user-date, .portlet-trash .document-info .taglib-asset-tags-summary {
+    font-weight: bold; }
+  .portlet-document-library .document-info .document-description, .portlet-document-library-display .document-info .document-description, .portlet-trash .document-info .document-description {
+    margin: 8px 0;
+    display: block; }
+  .portlet-document-library .document-info .document-thumbnail, .portlet-document-library-display .document-info .document-thumbnail, .portlet-trash .document-info .document-thumbnail {
+    float: left;
+    margin: 0 10px 0 0; }
+  .portlet-document-library .document-info .clear, .portlet-document-library-display .document-info .clear, .portlet-trash .document-info .clear {
+    clear: both; }
+.portlet-document-library .asset-details h3.version, .portlet-document-library-display .asset-details h3.version, .portlet-trash .asset-details h3.version {
+  margin: 0 0 10px; }
+.portlet-document-library .asset-details .taglib-custom-attributes-list, .portlet-document-library-display .asset-details .taglib-custom-attributes-list, .portlet-trash .asset-details .taglib-custom-attributes-list {
+  margin-bottom: 0; }
+.portlet-document-library .asset-details .asset-details-content, .portlet-document-library-display .asset-details .asset-details-content, .portlet-trash .asset-details .asset-details-content {
+  padding: 10px; }
+  .portlet-document-library .asset-details .asset-details-content .taglib-workflow-status, .portlet-document-library-display .asset-details .asset-details-content .taglib-workflow-status, .portlet-trash .asset-details .asset-details-content .taglib-workflow-status {
+    margin: 0; }
+  .portlet-document-library .asset-details .asset-details-content .lfr-asset-icon, .portlet-document-library-display .asset-details .asset-details-content .lfr-asset-icon, .portlet-trash .asset-details .asset-details-content .lfr-asset-icon {
+    background-position: 0 2px;
+    background-repeat: no-repeat;
+    border-right-width: 0;
+    float: none;
+    padding: 2px 0 2px 20px; }
+  .portlet-document-library .asset-details .asset-details-content .lfr-asset-author, .portlet-document-library-display .asset-details .asset-details-content .lfr-asset-author, .portlet-trash .asset-details .asset-details-content .lfr-asset-author {
+    background-image: url(@theme_image_path@/portlet/edit_defaults.png); }
+  .portlet-document-library .asset-details .asset-details-content .lfr-asset-downloads, .portlet-document-library-display .asset-details .asset-details-content .lfr-asset-downloads, .portlet-trash .asset-details .asset-details-content .lfr-asset-downloads {
+    background-image: url(@theme_image_path@/common/download.png); }
+  .portlet-document-library .asset-details .asset-details-content .lfr-asset-ratings, .portlet-document-library-display .asset-details .asset-details-content .lfr-asset-ratings, .portlet-trash .asset-details .asset-details-content .lfr-asset-ratings {
+    margin: 0 0 1em; }
+.portlet-document-library .taglib-discussion, .portlet-document-library-display .taglib-discussion, .portlet-trash .taglib-discussion {
+  width: 90%;
+  margin: 0 auto; }
+.portlet-document-library .taglib-ratings.stars, .portlet-document-library-display .taglib-ratings.stars, .portlet-trash .taglib-ratings.stars {
+  border: 1px solid transparent;
+  display: inline-block;
+  margin: 0 3px;
+  padding: 4px;
+  position: relative;
+  vertical-align: middle; }
+  .portlet-document-library .taglib-ratings.stars .liferay-rating-vote, .portlet-document-library-display .taglib-ratings.stars .liferay-rating-vote, .portlet-trash .taglib-ratings.stars .liferay-rating-vote {
+    display: none;
+    left: -1px;
+    padding: 4px;
+    position: absolute;
+    right: -1px;
+    top: -1px; }
+  .portlet-document-library .taglib-ratings.stars:hover, .portlet-document-library .taglib-ratings.stars:hover .liferay-rating-vote, .portlet-document-library-display .taglib-ratings.stars:hover, .portlet-document-library-display .taglib-ratings.stars:hover .liferay-rating-vote, .portlet-trash .taglib-ratings.stars:hover, .portlet-trash .taglib-ratings.stars:hover .liferay-rating-vote {
+    background: #B0D3F6;
+    border: 1px solid #3F6F9F; }
+  .portlet-document-library .taglib-ratings.stars:hover .liferay-rating-vote, .portlet-document-library-display .taglib-ratings.stars:hover .liferay-rating-vote, .portlet-trash .taglib-ratings.stars:hover .liferay-rating-vote {
+    display: block; }
+  .portlet-document-library .taglib-ratings.stars .rating-content, .portlet-document-library .taglib-ratings.stars .rating-label-element, .portlet-document-library-display .taglib-ratings.stars .rating-content, .portlet-document-library-display .taglib-ratings.stars .rating-label-element, .portlet-trash .taglib-ratings.stars .rating-content, .portlet-trash .taglib-ratings.stars .rating-label-element {
+    display: inline; }
+  .portlet-document-library .taglib-ratings.stars .rating-label-element, .portlet-document-library-display .taglib-ratings.stars .rating-label-element, .portlet-trash .taglib-ratings.stars .rating-label-element {
+    color: #555;
+    font-size: 0.9em;
+    margin-left: 0.5em; }
+  .portlet-document-library .taglib-ratings.stars .liferay-rating-score, .portlet-document-library-display .taglib-ratings.stars .liferay-rating-score, .portlet-trash .taglib-ratings.stars .liferay-rating-score {
+    padding-left: 0; }
+
+.portlet-document-library .taglib-search-iterator .results-header input {
+  display: none; }
+.portlet-document-library .lfr-asset-column-details .lfr-panel {
+  margin-bottom: 0.5em;
+  padding-bottom: 0; }
+  .portlet-document-library .lfr-asset-column-details .lfr-panel.lfr-collapsed {
+    margin-bottom: 0; }
+    .portlet-document-library .lfr-asset-column-details .lfr-panel.lfr-collapsed .lfr-panel-titlebar {
+      border-bottom-width: 0; }
+.upload-drop-active .portlet-document-library .document-container, .upload-drop-intent .portlet-document-library .document-container {
+  background-color: #EEF4FF; }
+.portlet-document-library .upload-multiple-file-permissions {
+  overflow: auto; }
+
+.active-area-proxy {
+  background: lightyellow url(@theme_image_path@/portlet/pop_up.png) no-repeat 10px 50%;
+  font-size: 1.2em;
+  padding: 0.3em 0.3em 0.3em 2em; }
+
+.ie6 .portlet-document-library .entry-display-style.display-descriptive, .ie6 .portlet-document-library .document-info, .ie6 .portlet-document-library-display .entry-display-style.display-descriptive, .ie6 .portlet-document-library-display .document-info, .ie7 .portlet-document-library .entry-display-style.display-descriptive, .ie7 .portlet-document-library .document-info, .ie7 .portlet-document-library-display .entry-display-style.display-descriptive, .ie7 .portlet-document-library-display .document-info {
+  zoom: 1; }
+.ie6 .portlet-document-library .show-sync-message-icon-container, .ie6 .portlet-document-library-display .show-sync-message-icon-container, .ie7 .portlet-document-library .show-sync-message-icon-container, .ie7 .portlet-document-library-display .show-sync-message-icon-container {
+  background-image: url(@theme_image_path@/application/button_bg_selected.png);
+  height: 21px;
+  position: absolute;
+  right: 0px;
+  width: 21px;
+  z-index: 1; }
+
+.ie6 .portlet-document-library .taglib-ratings.stars {
+  border-width: 0; }
+.ie6 .portlet-document-library .lfr-header-row {
+  height: 31px; }
+  .ie6 .portlet-document-library .lfr-header-row .lfr-header-row-content .lfr-search-combobox {
+    width: 250px; }
+
+.firefox .portlet-document-library .audio-node, .firefox .portlet-document-library-display .audio-node {
+  height: 28px; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/css/main.css
new file mode 100644
index 0000000..ca29c4c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/css/main.css
@@ -0,0 +1,633 @@
+@import "compass";
+
+.portlet-document-library, .portlet-document-library-display {
+	.select-all-entries {
+		display: inline-block;
+		margin-left: 10px;
+		margin-top: 15px;
+	}
+
+	.file-entry-list-description {
+		font-style: italic;
+		margin-left: 10px;
+	}
+
+	.file-entry-tags {
+		margin-top: 5px;
+	}
+
+	.edit-file-entry-type {
+		h3 {
+			margin: 1em 0 0.3em 0;
+		}
+
+		.select-metadata-set {
+			display: block;
+			margin-bottom: 2em;
+		}
+	}
+
+	.repository-settings-display dt {
+		font-weight: bold;
+		margin-top: 1em;
+	}
+
+	.lfr-asset-panels .lfr-panel.lfr-extended {
+		border-bottom: none;
+	}
+
+	.document-container .search-info {
+		background-color: #D3E8F1;
+		margin-bottom: 0.5em;
+		padding: 0.5em 0.75em;
+		padding-right: 30px;
+		position: relative;
+		word-wrap: break-word;
+
+		.keywords {
+			float: none;
+			font-size: 1.4em;
+			font-weight: bold;
+		}
+
+		.change-search-folder {
+			position: absolute;
+			right: 30px;
+			top: 0.3em;
+		}
+
+		.close-search {
+			margin-top: -8px;
+			position: absolute;
+			right: 5px;
+			top: 50%;
+		}
+	}
+
+	.document-container .search-results-container .tabview-list {
+		margin-bottom: 0;
+	}
+
+	.move-list {
+		.move-file, .move-folder {
+			background: #F0FAF0 url() no-repeat 5px 50%;
+			border-bottom: 1px solid #CCC;
+			display: block;
+			font-weight: bold;
+			margin-bottom: 1px;
+			padding: 5px;
+			padding-left: 25px;
+			position: relative;
+		}
+
+		.move-file {
+			background-image: url(@theme_image_path@/file_system/small/jpg.png);
+		}
+
+		.move-folder {
+			background-image: url(@theme_image_path@/common/folder.png);
+		}
+
+		.move-error {
+			background-color: #FDD;
+			background-image: url(@theme_image_path@/messages/error.png);
+			font-weight: normal;
+
+			@include opacity(0.6);
+
+			.error-message {
+				position: absolute;
+				right: 5px;
+			}
+		}
+
+		.unstyled {
+			margin: 0;
+		}
+	}
+
+	.move-list-info {
+		margin: 5px 0;
+
+		h4 {
+			font-size: 1.3em;
+		}
+	}
+
+	.document-container, .document-entries-pagination {
+		clear: both;
+	}
+
+	.document-entries-pagination {
+		text-align: center;
+		margin: 10px 0;
+
+		.pagination-content {
+			margin: 0;
+		}
+	}
+
+	.folder.error:hover {
+		background-color: #FDD;
+	}
+
+	.folder-search {
+		float: right;
+		margin: 0 0 0.5em 0.5em;
+	}
+
+	img.locked-icon, img.shortcut-icon {
+		bottom: 10px;
+		position: absolute;
+		z-index: 10;
+	}
+
+	img.locked-icon {
+		right: -10px;
+	}
+
+	img.shortcut-icon {
+		left: -5px;
+	}
+
+	.button-holder.toolbar {
+		display: inline;
+		margin: 0;
+	}
+
+	.lfr-header-row {
+		.lfr-asset-summary {
+			margin-left: 5px;
+
+			.download-document, .conversions, .lfr-asset-author, .webdav-url {
+				display: block;
+				margin: 0.7em 0;
+			}
+
+			.download-document {
+				margin-top: 1.2em;
+			}
+
+			.conversions {
+				margin-bottom: 1.2em;
+			}
+
+			.version {
+				display: block;
+				font-size: 1.4em;
+				font-weight: bold;
+			}
+		}
+
+		.icon-delete, .icon-download, .icon-edit, .icon-lock, .icon-move, .icon-permissions, .icon-trash, .icon-undo, .icon-unlock {
+			background: url() no-repeat 0 0;
+		}
+
+		.icon-delete {
+			background-image: url(@theme_image_path@/common/delete.png);
+		}
+
+		.icon-download {
+			background-image: url(@theme_image_path@/common/download.png);
+		}
+
+		.icon-edit {
+			background-image: url(@theme_image_path@/common/edit.png);
+		}
+
+		.icon-lock {
+			background-image: url(@theme_image_path@/common/lock.png);
+		}
+
+		.icon-move {
+			background-image: url(@theme_image_path@/common/submit.png);
+		}
+
+		.icon-msoffice {
+			background-image: url(@theme_image_path@/document_library/msoffice.png);
+		}
+
+		.icon-permissions {
+			background-image: url(@theme_image_path@/common/permissions.png);
+		}
+
+		.icon-trash {
+			background-image: url(@theme_image_path@/common/trash.png);
+		}
+
+		.icon-undo {
+			background-image: url(@theme_image_path@/common/undo.png);
+		}
+
+		.icon-unlock {
+			background-image: url(@theme_image_path@/common/unlock.png);
+		}
+	}
+
+	.lfr-header-row-content {
+		padding-left: 0;
+		padding-top: 0;
+
+		.edit-toolbar {
+			margin: 0;
+		}
+	}
+
+	.lfr-app-column-view {
+		border: none;
+
+		.sync-notification {
+			border-top-width: 1px;
+		}
+
+		.lfr-app-column-view-content {
+			background-color: #FAFAFA;
+		}
+	}
+
+	.context-pane .context-pane-content {
+		border-left: 1px solid #7B7B7B;
+		position: relative;
+	}
+
+	.taglib-search-iterator-page-iterator-top, .taglib-search-iterator-page-iterator-bottom, .paginator-container {
+		clear: both;
+		padding: 5px;
+		position: relative;
+	}
+
+	.taglib-search-iterator-page-iterator-top.page-iterator-bottom, .lfr-app-column-view .taglib-search-iterator-page-iterator-bottom {
+		bottom: 0;
+		left: 0;
+		position: absolute;
+		right: 0;
+	}
+
+	.taglib-search-iterator {
+		table-layout: fixed;
+
+		.align-left {
+			word-wrap: break-word;
+		}
+	}
+
+	.taglib-webdav {
+		margin-top: 3em;
+	}
+
+	.taglib-workflow-status {
+		margin-bottom: 5px;
+	}
+
+	.document-library-breadcrumb  ul {
+		margin-bottom: 0;
+	}
+
+	.show-sync-message-icon-container {
+		position: relative;
+	}
+
+	.show-sync-message {
+		position: absolute;
+		right: 5px;
+		top: 5px;
+		z-index: 1;
+	}
+
+	.subscribe-action {
+		margin-bottom: 5px;
+		margin-right: 10px;
+		margin-top: 5px;
+		text-align: right;
+	}
+
+	.sync-message-hidden {
+		display: none;
+	}
+
+	.lfr-document-library-comments.lfr-panel.lfr-extended {
+		background: #FFF;
+		border-width: 0;
+		border-right: 1px solid #CCC;
+		margin-bottom: 0;
+
+		.lfr-panel-titlebar {
+			margin-top: 0;
+		}
+	}
+
+	.version.document-locked {
+		background: url(@theme_image_path@/common/lock.png) no-repeat 0 50%;
+		padding-left: 20px;
+	}
+
+	.common-file-metadata-container {
+		padding: 1em;
+
+		.field-element {
+			display: block;
+
+			textarea {
+				width: 100% !important;
+			}
+		}
+
+		&.selected {
+			background-color: #D3E8F1;
+			border: 1px solid #38F;
+		}
+
+		.selected-files-count {
+			border-bottom: 1px solid #C8C9CA;
+			color: #555;
+			font-size: 1.8em;
+			font-weight: bold;
+			margin-bottom: 10px;
+			overflow: hidden;
+		}
+
+		.document-type .lfr-panel-content {
+			min-height: 35px;
+		}
+
+		.document-type-fields {
+			clear: left;
+			padding-top: 0.5em;
+		}
+
+		.categorization-panel {
+			clear: left;
+		}
+	}
+
+	.app-view-entry-taglib {
+		.entry-result-icon {
+			background: url() no-repeat 50%;
+			display: none;
+			height: 16px;
+			position: absolute;
+			right: 5px;
+			vertical-align: middle;
+			width: 16px;
+		}
+	}
+
+	.app-view-entry-taglib.entry-display-style {
+		&.display-icon, &.display-descriptive {
+			.entry-thumbnail .taglib-workflow-status {
+				left: 6px;
+				margin: 0;
+				padding: 0;
+				position: absolute;
+				top: 4px;
+
+				.workflow-status {
+					margin: 0;
+					padding: 0;
+				}
+			}
+		}
+	}
+
+	.app-view-entry-taglib.entry-display-style.display-icon {
+		.entry-thumbnail .taglib-workflow-status {
+			left: 6px;
+		}
+
+		.entry-title {
+			@include ellipsis;
+
+			overflow: hidden;
+			position: relative;
+			white-space: nowrap;
+		}
+
+		.entry-title-text {
+			background: url() no-repeat 0 50%;
+		}
+
+		&.upload-error, &.upload-success, &.upload-warning {
+			.entry-title-text {
+				padding-left: 20px;
+			}
+		}
+
+		&.upload-error .entry-title-text {
+			background-image: url(@theme_image_path@/messages/error.png);
+		}
+
+		&.upload-success .entry-title-text {
+			background-image: url(@theme_image_path@/messages/success.png);
+		}
+
+		&.upload-warning .entry-title-text {
+			background-image: url(@theme_image_path@/messages/alert.png);
+		}
+	}
+
+	.app-view-entry-taglib.entry-display-style.display-descriptive {
+		.entry-thumbnail .taglib-workflow-status {
+			left: 5px;
+		}
+	}
+}
+
+.portlet-document-library, .portlet-document-library-display, .portlet-trash {
+	.document-info {
+		background: #D2DDE7;
+		border-bottom: 1px solid #6D6D6E;
+		padding: 10px;
+
+		&:after {
+			clear: both;
+			content: "";
+			display:block;
+			height: 0;
+		}
+
+		.document-title {
+			margin: 0 0 10px;
+			overflow: hidden;
+			text-overflow: ellipsis;
+			text-shadow: 1px 1px #FFF;
+		}
+
+		.user-date, .taglib-asset-tags-summary {
+			font-weight: bold;
+		}
+
+		.document-description {
+			margin: 8px 0;
+			display: block;
+		}
+
+		.document-thumbnail {
+			float: left;
+			margin: 0 10px 0 0;
+		}
+
+		.clear {
+			clear: both;
+		}
+	}
+
+	.asset-details {
+		h3.version {
+			margin: 0 0 10px;
+		}
+
+		.taglib-custom-attributes-list {
+			margin-bottom: 0;
+		}
+
+		.asset-details-content {
+			padding: 10px;
+
+			.taglib-workflow-status {
+				margin: 0;
+			}
+
+			.lfr-asset-icon {
+				background-position: 0 2px;
+				background-repeat: no-repeat;
+				border-right-width: 0;
+				float: none;
+				padding: 2px 0 2px 20px;
+			}
+
+			.lfr-asset-author {
+				background-image: url(@theme_image_path@/portlet/edit_defaults.png);
+			}
+
+			.lfr-asset-downloads {
+				background-image: url(@theme_image_path@/common/download.png);
+			}
+
+			.lfr-asset-ratings {
+				margin: 0 0 1em;
+			}
+		}
+	}
+
+	.taglib-discussion {
+		width: 90%;
+		margin: 0 auto;
+	}
+
+	.taglib-ratings.stars {
+		border: 1px solid transparent;
+		display: inline-block;
+		margin: 0 3px;
+		padding: 4px;
+		position: relative;
+		vertical-align: middle;
+
+		.liferay-rating-vote {
+			display: none;
+			left: -1px;
+			padding: 4px;
+			position: absolute;
+			right: -1px;
+			top: -1px;
+		}
+
+		&:hover, &:hover .liferay-rating-vote {
+			background: #B0D3F6;
+			border: 1px solid #3F6F9F;
+		}
+
+		&:hover .liferay-rating-vote {
+			display: block;
+		}
+
+		.rating-content, .rating-label-element {
+			display: inline;
+		}
+
+		.rating-label-element {
+			color: #555;
+			font-size: 0.9em;
+			margin-left: 0.5em;
+		}
+
+		.liferay-rating-score {
+			padding-left: 0;
+		}
+	}
+}
+
+.portlet-document-library {
+	.taglib-search-iterator .results-header input {
+		display: none;
+	}
+
+	.lfr-asset-column-details .lfr-panel {
+		margin-bottom: 0.5em;
+		padding-bottom: 0;
+
+		&.lfr-collapsed {
+			margin-bottom: 0;
+
+			.lfr-panel-titlebar {
+				border-bottom-width: 0;
+			}
+		}
+	}
+
+	.upload-drop-active &, .upload-drop-intent & {
+		.document-container {
+			background-color: #EEF4FF;
+		}
+	}
+
+	.upload-multiple-file-permissions {
+		overflow: auto;
+	}
+}
+
+.active-area-proxy {
+	background: #FFFFE0 url(@theme_image_path@/portlet/pop_up.png) no-repeat 10px 50%;
+	font-size: 1.2em;
+	padding: 0.3em 0.3em 0.3em 2em;
+}
+
+.ie6, .ie7 {
+	.portlet-document-library, .portlet-document-library-display {
+		.entry-display-style.display-descriptive, .document-info {
+			zoom: 1;
+		}
+
+		.show-sync-message-icon-container {
+			background-image: url(@theme_image_path@/application/button_bg_selected.png);
+			height: 21px;
+			position: absolute;
+			right: 0px;
+			width: 21px;
+			z-index: 1;
+		}
+	}
+}
+
+.ie6 {
+	.portlet-document-library {
+		.taglib-ratings.stars {
+			border-width: 0;
+		}
+
+		.lfr-header-row {
+			height: 31px;
+
+			.lfr-header-row-content .lfr-search-combobox {
+				width: 250px;
+			}
+		}
+	}
+}
+
+.firefox {
+	.portlet-document-library, .portlet-document-library-display {
+		.audio-node {
+			height: 28px;
+		}
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/display_style_buttons.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/display_style_buttons.jsp
new file mode 100644
index 0000000..b5a0071
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/display_style_buttons.jsp
@@ -0,0 +1,62 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+String navigation = ParamUtil.getString(request, "navigation", "home");
+
+long folderId = GetterUtil.getLong((String)request.getAttribute("view.jsp-folderId"));
+
+long fileEntryTypeId = ParamUtil.getLong(request, "fileEntryTypeId", -1);
+
+String displayStyle = ParamUtil.getString(request, "displayStyle");
+
+if (Validator.isNull(displayStyle)) {
+	displayStyle = portalPreferences.getValue(PortletKeys.DOCUMENT_LIBRARY, "display-style", PropsValues.DL_DEFAULT_DISPLAY_VIEW);
+}
+
+String keywords = ParamUtil.getString(request, "keywords");
+
+Map<String, String> requestParams = new HashMap<String, String>();
+
+requestParams.put("struts_action", Validator.isNull(keywords) ? "/document_library/view" : "/document_library/search");
+requestParams.put("navigation", HtmlUtil.escapeJS(navigation));
+requestParams.put("folderId", String.valueOf(folderId));
+requestParams.put("saveDisplayStyle", Boolean.TRUE.toString());
+requestParams.put("searchType", String.valueOf(DLSearchConstants.FRAGMENT));
+requestParams.put("viewEntriesPage", Boolean.FALSE.toString());
+requestParams.put("viewFolders", Boolean.FALSE.toString());
+
+if (Validator.isNull(keywords)) {
+	requestParams.put("viewEntries", Boolean.TRUE.toString());
+}
+else {
+	requestParams.put("keywords", HtmlUtil.escapeJS(keywords));
+	requestParams.put("searchFolderId", String.valueOf(folderId));
+	requestParams.put("viewEntries", Boolean.FALSE.toString());
+}
+
+if (fileEntryTypeId != -1) {
+	requestParams.put("fileEntryTypeId", String.valueOf(fileEntryTypeId));
+}
+%>
+
+<liferay-ui:app-view-display-style
+	displayStyle="<%= displayStyle %>"
+	displayStyles="<%= displayViews %>"
+	requestParams="<%= requestParams %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/edit_file_entry.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/edit_file_entry.jsp
new file mode 100644
index 0000000..37fc009
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/edit_file_entry.jsp
@@ -0,0 +1,579 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+String cmd = ParamUtil.getString(request, Constants.CMD, Constants.EDIT);
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+String referringPortletResource = ParamUtil.getString(request, "referringPortletResource");
+
+String referringPortletResourceRootPortletId = PortletConstants.getRootPortletId(referringPortletResource);
+
+String uploadProgressId = "dlFileEntryUploadProgress";
+
+FileEntry fileEntry = (FileEntry)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FILE_ENTRY);
+
+long fileEntryId = BeanParamUtil.getLong(fileEntry, request, "fileEntryId");
+
+long repositoryId = BeanParamUtil.getLong(fileEntry, request, "repositoryId");
+
+if (repositoryId <= 0) {
+
+	// add_asset.jspf only passes in groupId
+
+	repositoryId = BeanParamUtil.getLong(fileEntry, request, "groupId");
+}
+
+long folderId = BeanParamUtil.getLong(fileEntry, request, "folderId");
+String extension = BeanParamUtil.getString(fileEntry, request, "extension");
+
+Folder folder = null;
+
+if (fileEntry != null) {
+	folder = fileEntry.getFolder();
+}
+
+if ((folder == null) && (folderId != DLFolderConstants.DEFAULT_PARENT_FOLDER_ID)) {
+	try {
+		folder = DLAppServiceUtil.getFolder(folderId);
+	}
+	catch (NoSuchFolderException nsfe) {
+		folderId = DLFolderConstants.DEFAULT_PARENT_FOLDER_ID;
+	}
+}
+
+FileVersion fileVersion = null;
+
+long fileVersionId = 0;
+
+long fileEntryTypeId = ParamUtil.getLong(request, "fileEntryTypeId", -1);
+
+if (fileEntry != null) {
+	fileVersion = fileEntry.getLatestFileVersion();
+
+	fileVersionId = fileVersion.getFileVersionId();
+
+	if ((fileEntryTypeId == -1) && (fileVersion.getModel() instanceof DLFileVersion)) {
+		DLFileVersion dlFileVersion = (DLFileVersion)fileVersion.getModel();
+
+		fileEntryTypeId = dlFileVersion.getFileEntryTypeId();
+	}
+}
+
+DLFileEntryType dlFileEntryType = null;
+
+if (fileEntryTypeId > 0) {
+	dlFileEntryType = DLFileEntryTypeLocalServiceUtil.getFileEntryType(fileEntryTypeId);
+}
+
+long assetClassPK = 0;
+
+if ((fileVersion != null) && !fileVersion.isApproved() && Validator.isNotNull(fileVersion.getVersion()) && !fileVersion.getVersion().equals(DLFileEntryConstants.VERSION_DEFAULT)) {
+	assetClassPK = fileVersion.getFileVersionId();
+}
+else if (fileEntry != null) {
+	assetClassPK = fileEntry.getFileEntryId();
+}
+
+boolean approved = false;
+boolean checkedOut = false;
+boolean draft = false;
+boolean hasLock = false;
+boolean pending = false;
+
+Lock lock = null;
+
+if (fileEntry != null) {
+	approved = fileVersion.isApproved();
+	checkedOut = fileEntry.isCheckedOut();
+	draft = fileVersion.isDraft();
+	hasLock = fileEntry.hasLock();
+	lock = fileEntry.getLock();
+	pending = fileVersion.isPending();
+}
+
+boolean saveAsDraft = false;
+
+if ((checkedOut || pending) && !PropsValues.DL_FILE_ENTRY_DRAFTS_ENABLED) {
+	saveAsDraft = true;
+}
+%>
+
+<c:if test="<%= Validator.isNull(referringPortletResource) %>">
+	<liferay-util:include page="/html/portlet/document_library/top_links.jsp" />
+</c:if>
+
+<c:if test="<%= checkedOut %>">
+	<c:choose>
+		<c:when test="<%= hasLock %>">
+			<div class="alert alert-success">
+				<c:choose>
+					<c:when test="<%= lock.isNeverExpires() %>">
+						<liferay-ui:message key="you-now-have-an-indefinite-lock-on-this-document" />
+					</c:when>
+					<c:otherwise>
+
+						<%
+						String lockExpirationTime = StringUtil.toLowerCase(LanguageUtil.getTimeDescription(pageContext, DLFileEntryConstants.LOCK_EXPIRATION_TIME));
+						%>
+
+						<%= LanguageUtil.format(pageContext, "you-now-have-a-lock-on-this-document", lockExpirationTime, false) %>
+					</c:otherwise>
+				</c:choose>
+			</div>
+		</c:when>
+		<c:otherwise>
+			<div class="alert alert-error">
+				<%= LanguageUtil.format(pageContext, "you-cannot-modify-this-document-because-it-was-checked-out-by-x-on-x", new Object[] {HtmlUtil.escape(PortalUtil.getUserName(lock.getUserId(), String.valueOf(lock.getUserId()))), dateFormatDateTime.format(lock.getCreateDate())}, false) %>
+			</div>
+		</c:otherwise>
+	</c:choose>
+</c:if>
+
+<c:if test="<%= showHeader %>">
+
+	<%
+	boolean localizeTitle = true;
+	String headerTitle = LanguageUtil.get(pageContext, "new-document");
+
+	if (fileVersion != null) {
+		headerTitle = fileVersion.getTitle();
+		localizeTitle= false;
+	}
+	else if (dlFileEntryType != null) {
+		headerTitle = LanguageUtil.format(pageContext, "new-x", new Object[] {dlFileEntryType.getName(locale)});
+	}
+	%>
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		localizeTitle="<%= localizeTitle %>"
+		title="<%= headerTitle %>"
+	/>
+</c:if>
+
+<%
+PortletURL editFileEntryURL = renderResponse.createActionURL();
+
+editFileEntryURL.setParameter("struts_action", "/document_library/edit_file_entry");
+
+if (Validator.isNotNull(redirect)) {
+	editFileEntryURL.setParameter("redirect", redirect);
+}
+
+if (Validator.isNotNull(referringPortletResource)) {
+	editFileEntryURL.setParameter("referringPortletResource", referringPortletResource);
+}
+
+if (repositoryId > 0) {
+	editFileEntryURL.setParameter("repositoryId", String.valueOf(repositoryId));
+}
+
+if (folderId > 0) {
+	editFileEntryURL.setParameter("folderId", String.valueOf(folderId));
+}
+
+if (fileEntryId > 0) {
+	editFileEntryURL.setParameter("fileEntryId", String.valueOf(fileEntryId));
+}
+
+editFileEntryURL.setParameter("workflowAction", String.valueOf(WorkflowConstants.ACTION_PUBLISH));
+%>
+
+<aui:form action="<%= editFileEntryURL %>" cssClass="lfr-dynamic-form" enctype="multipart/form-data" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveFileEntry(" + saveAsDraft + ");" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="uploadProgressId" type="hidden" value="<%= uploadProgressId %>" />
+	<aui:input name="folderId" type="hidden" value="<%= folderId %>" />
+
+	<liferay-ui:error exception="<%= DuplicateFileException.class %>" message="please-enter-a-unique-document-name" />
+	<liferay-ui:error exception="<%= DuplicateFolderNameException.class %>" message="please-enter-a-unique-document-name" />
+
+	<liferay-ui:error exception="<%= FileExtensionException.class %>">
+		<liferay-ui:message key="document-names-must-end-with-one-of-the-following-extensions" /> <%= StringUtil.merge(PrefsPropsUtil.getStringArray(PropsKeys.DL_FILE_EXTENSIONS, StringPool.COMMA), StringPool.COMMA_AND_SPACE) %>.
+	</liferay-ui:error>
+
+	<liferay-ui:error exception="<%= FileMimeTypeException.class %>">
+		<liferay-ui:message key="media-files-must-be-one-of-the-following-formats" /> <%= StringUtil.merge(DLUtil.getMediaGalleryMimeTypes(portletPreferences, renderRequest), StringPool.COMMA_AND_SPACE) %>.
+	</liferay-ui:error>
+
+	<liferay-ui:error exception="<%= FileNameException.class %>" message="please-enter-a-file-with-a-valid-file-name" />
+	<liferay-ui:error exception="<%= NoSuchFolderException.class %>" message="please-enter-a-valid-folder" />
+
+	<liferay-ui:error exception="<%= SourceFileNameException.class %>">
+		<liferay-ui:message key="the-source-file-does-not-have-the-same-extension-as-the-original-file" />
+	</liferay-ui:error>
+
+	<%
+	long fileMaxSize = PrefsPropsUtil.getLong(PropsKeys.DL_FILE_MAX_SIZE);
+
+	if (fileMaxSize == 0) {
+		fileMaxSize = PrefsPropsUtil.getLong(PropsKeys.UPLOAD_SERVLET_REQUEST_IMPL_MAX_SIZE);
+	}
+
+	fileMaxSize /= 1024;
+	%>
+
+	<liferay-ui:error exception="<%= FileSizeException.class %>">
+		<liferay-ui:message arguments="<%= fileMaxSize %>" key="please-enter-a-file-with-a-valid-file-size-no-larger-than-x" />
+	</liferay-ui:error>
+
+	<liferay-ui:asset-categories-error />
+
+	<liferay-ui:asset-tags-error />
+
+	<aui:model-context bean="<%= fileVersion %>" model="<%= DLFileVersion.class %>" />
+
+	<c:if test="<%= fileVersion != null %>">
+		<aui:workflow-status model="<%= DLFileEntry.class %>" status="<%= fileVersion.getStatus() %>" version="<%= fileVersion.getVersion() %>" />
+	</c:if>
+
+	<aui:fieldset>
+		<aui:field-wrapper>
+			<c:if test="<%= fileMaxSize != 0 %>">
+				<div class="alert alert-info">
+					<%= LanguageUtil.format(pageContext, "upload-documents-no-larger-than-x-k", String.valueOf(fileMaxSize), false) %>
+				</div>
+			</c:if>
+		</aui:field-wrapper>
+
+		<%
+		String folderName = StringPool.BLANK;
+
+		if (folderId > 0) {
+			folder = DLAppLocalServiceUtil.getFolder(folderId);
+
+			folder = folder.toEscapedModel();
+
+			folderId = folder.getFolderId();
+			folderName = folder.getName();
+		}
+		else {
+			folderName = LanguageUtil.get(pageContext, "home");
+		}
+		%>
+
+		<aui:field-wrapper label="folder">
+			<div class="input-append">
+				<liferay-ui:input-resource id="folderName" url="<%= folderName %>" />
+
+				<c:if test="<%= referringPortletResourceRootPortletId.equals(PortletKeys.ASSET_PUBLISHER) && (fileEntryId == 0) %>">
+					<aui:button name="selectFolderButton" value="select" />
+
+					<%
+					String taglibRemoveFolder = "Liferay.Util.removeFolderSelection('folderId', 'folderName', '" + renderResponse.getNamespace() + "');";
+					%>
+
+					<aui:button disabled="<%= folderId <= 0 %>" name="removeFolderButton" onClick="<%= taglibRemoveFolder %>" value="remove" />
+
+					<liferay-portlet:renderURL var="selectFolderURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+						<portlet:param name="struts_action" value='<%= "/document_library/select_folder" %>' />
+					</liferay-portlet:renderURL>
+
+					<aui:script use="aui-base">
+						A.one('#<portlet:namespace />selectFolderButton').on(
+							'click',
+							function(event) {
+								Liferay.Util.selectEntity(
+									{
+										dialog: {
+											constrain: true,
+											modal: true,
+											width: 680
+										},
+										id: '<portlet:namespace />selectFolder',
+										title: '<liferay-ui:message arguments="folder" key="select-x" />',
+										uri: '<%= selectFolderURL.toString() %>'
+									},
+									function(event) {
+										var folderData = {
+											idString: 'folderId',
+											idValue: event.folderid,
+											nameString: 'folderName',
+											nameValue: event.foldername
+										};
+
+										Liferay.Util.selectFolder(folderData, '<portlet:namespace />');
+									}
+								);
+							}
+						);
+					</aui:script>
+				</c:if>
+			</div>
+		</aui:field-wrapper>
+
+		<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" name="file" onChange='<%= renderResponse.getNamespace() + "validateTitle();" %>' style="width: auto;" type="file">
+			<aui:validator name="acceptFiles">
+				'<%= StringUtil.merge(PrefsPropsUtil.getStringArray(PropsKeys.DL_FILE_EXTENSIONS, StringPool.COMMA)) %>'
+			</aui:validator>
+		</aui:input>
+
+		<aui:input name="title">
+			<aui:validator errorMessage="you-must-specify-a-file-or-a-title" name="custom">
+				function(val, fieldNode, ruleValue) {
+					return ((val != '') || A.one('#<portlet:namespace />file').val() != '');
+				}
+			</aui:validator>
+		</aui:input>
+
+		<c:if test="<%= ((folder == null) || folder.isSupportsMetadata()) %>">
+			<aui:input name="description" />
+
+			<c:if test="<%= (folder == null) || (folder.getModel() instanceof DLFolder) %>">
+
+				<%
+				boolean inherited = false;
+
+				if (folder != null) {
+					DLFolder dlFolder = (DLFolder)folder.getModel();
+
+					inherited = !dlFolder.isOverrideFileEntryTypes();
+				}
+
+				List<DLFileEntryType> dlFileEntryTypes = DLFileEntryTypeLocalServiceUtil.getFolderFileEntryTypes(PortalUtil.getSiteAndCompanyGroupIds(themeDisplay), folderId, inherited);
+				%>
+
+				<c:choose>
+					<c:when test="<%= !cmd.equals(Constants.ADD) && (dlFileEntryTypes.size() > 1) %>">
+						<aui:select changesContext="<%= true %>" label="document-type" name="fileEntryTypeId" onChange='<%= renderResponse.getNamespace() + "changeFileEntryType();" %>'>
+
+							<%
+							for (DLFileEntryType curDLFileEntryType : dlFileEntryTypes) {
+								if ((curDLFileEntryType.getFileEntryTypeId() == DLFileEntryTypeConstants.FILE_ENTRY_TYPE_ID_BASIC_DOCUMENT) || (fileEntryTypeId == curDLFileEntryType.getFileEntryTypeId()) || DLFileEntryTypePermission.contains(permissionChecker, curDLFileEntryType, ActionKeys.VIEW)) {
+							%>
+
+								<aui:option label="<%= HtmlUtil.escape(curDLFileEntryType.getName(locale)) %>" selected="<%= (fileEntryTypeId == curDLFileEntryType.getPrimaryKey()) %>" value="<%= curDLFileEntryType.getPrimaryKey() %>" />
+
+							<%
+								}
+							}
+							%>
+
+						</aui:select>
+					</c:when>
+					<c:otherwise>
+						<aui:input name="fileEntryTypeId" type="hidden" value="<%= fileEntryTypeId %>" />
+					</c:otherwise>
+				</c:choose>
+
+				<aui:input name="defaultLanguageId" type="hidden" value="<%= themeDisplay.getLanguageId() %>" />
+
+				<%
+				if (fileEntryTypeId > 0) {
+					try {
+						List<DDMStructure> ddmStructures = dlFileEntryType.getDDMStructures();
+
+						for (DDMStructure ddmStructure : ddmStructures) {
+							Fields fields = null;
+
+							try {
+								DLFileEntryMetadata fileEntryMetadata = DLFileEntryMetadataLocalServiceUtil.getFileEntryMetadata(ddmStructure.getStructureId(), fileVersionId);
+
+								fields = StorageEngineUtil.getFields(fileEntryMetadata.getDDMStorageId());
+							}
+							catch (Exception e) {
+							}
+				%>
+
+							<liferay-ddm:html
+								classNameId="<%= PortalUtil.getClassNameId(DDMStructure.class) %>"
+								classPK="<%= ddmStructure.getPrimaryKey() %>"
+								fields="<%= fields %>"
+								fieldsNamespace="<%= String.valueOf(ddmStructure.getPrimaryKey()) %>"
+								requestedLocale="<%= locale %>"
+							/>
+
+				<%
+						}
+					}
+					catch (Exception e) {
+						_log.error(e, e);
+					}
+				}
+				%>
+
+			</c:if>
+
+			<liferay-ui:custom-attributes-available className="<%= DLFileEntryConstants.getClassName() %>">
+				<liferay-ui:custom-attribute-list
+					className="<%= DLFileEntryConstants.getClassName() %>"
+					classPK="<%= fileVersionId %>"
+					editable="<%= true %>"
+					label="<%= true %>"
+				/>
+			</liferay-ui:custom-attributes-available>
+		</c:if>
+
+		<c:if test="<%= ((folder == null) || folder.isSupportsSocial()) %>">
+			<liferay-ui:panel defaultState="closed" extended="<%= false %>" id="dlFileEntryCategorizationPanel" persistState="<%= true %>" title="categorization">
+				<aui:fieldset>
+					<aui:input classPK="<%= assetClassPK %>" model="<%= DLFileEntry.class %>" name="categories" type="assetCategories" />
+
+					<aui:input classPK="<%= assetClassPK %>" model="<%= DLFileEntry.class %>" name="tags" type="assetTags" />
+				</aui:fieldset>
+			</liferay-ui:panel>
+
+			<liferay-ui:panel defaultState="closed" extended="<%= false %>" id="dlFileEntryAssetLinksPanel" persistState="<%= true %>" title="related-assets">
+				<aui:fieldset>
+					<liferay-ui:input-asset-links
+						className="<%= DLFileEntry.class.getName() %>"
+						classPK="<%= assetClassPK %>"
+					/>
+				</aui:fieldset>
+			</liferay-ui:panel>
+		</c:if>
+
+		<c:if test="<%= fileEntry == null %>">
+			<aui:field-wrapper label="permissions">
+				<liferay-ui:input-permissions
+					modelName="<%= DLFileEntryConstants.getClassName() %>"
+				/>
+			</aui:field-wrapper>
+		</c:if>
+
+		<c:if test="<%= approved %>">
+			<div class="alert alert-info">
+				<liferay-ui:message key="a-new-version-will-be-created-automatically-if-this-content-is-modified" />
+			</div>
+		</c:if>
+
+		<c:if test="<%= pending %>">
+			<div class="alert alert-info">
+				<liferay-ui:message key="there-is-a-publication-workflow-in-process" />
+			</div>
+		</c:if>
+
+		<aui:button-row>
+
+			<%
+			String saveButtonLabel = "save";
+
+			if ((fileVersion == null) || draft || approved) {
+				saveButtonLabel = "save-as-draft";
+			}
+			%>
+
+			<c:if test="<%= PropsValues.DL_FILE_ENTRY_DRAFTS_ENABLED %>">
+				<aui:button disabled="<%= checkedOut && !hasLock %>" name="saveButton" onClick='<%= renderResponse.getNamespace() + "saveFileEntry(true);" %>' value="<%= saveButtonLabel %>" />
+			</c:if>
+
+			<%
+			String publishButtonLabel = "publish";
+
+			if (DLUtil.hasWorkflowDefinitionLink(themeDisplay.getCompanyId(), scopeGroupId, folderId, fileEntryTypeId)) {
+				publishButtonLabel = "submit-for-publication";
+			}
+
+			if (saveAsDraft) {
+				publishButtonLabel = "save";
+			}
+			%>
+
+			<aui:button disabled="<%= checkedOut && !hasLock || (pending && PropsValues.DL_FILE_ENTRY_DRAFTS_ENABLED) %>" name="publishButton" type="submit" value="<%= publishButtonLabel %>" />
+
+			<c:if test="<%= (fileEntry != null) && ((checkedOut && hasLock) || !checkedOut) %>">
+				<c:choose>
+					<c:when test="<%= !hasLock %>">
+						<aui:button onClick='<%= renderResponse.getNamespace() + "checkOut();" %>' value="checkout[document]" />
+					</c:when>
+					<c:otherwise>
+						<aui:button onClick='<%= renderResponse.getNamespace() + "checkIn();" %>' value="save-and-checkin" />
+
+						<aui:button onClick='<%= renderResponse.getNamespace() + "cancelCheckOut();" %>' value="cancel-checkout[document]" />
+					</c:otherwise>
+				</c:choose>
+			</c:if>
+
+			<aui:button href="<%= redirect %>" type="cancel" />
+		</aui:button-row>
+	</aui:fieldset>
+</aui:form>
+
+<liferay-ui:upload-progress
+	id="<%= uploadProgressId %>"
+	message="uploading"
+	redirect="<%= redirect %>"
+/>
+
+<aui:script>
+	function <portlet:namespace />changeFileEntryType() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.PREVIEW %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />cancelCheckOut() {
+		submitForm(document.hrefFm, "<portlet:actionURL><portlet:param name="struts_action" value="/document_library/edit_file_entry" /><portlet:param name="<%= Constants.CMD %>" value="<%= Constants.CANCEL_CHECKOUT %>" /><portlet:param name="redirect" value="<%= redirect %>" /><portlet:param name="fileEntryId" value="<%= String.valueOf(fileEntryId) %>" /></portlet:actionURL>");
+	}
+
+	function <portlet:namespace />checkIn() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.UPDATE_AND_CHECKIN %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />checkOut() {
+		submitForm(document.hrefFm, "<portlet:actionURL><portlet:param name="struts_action" value="/document_library/edit_file_entry" /><portlet:param name="<%= Constants.CMD %>" value="<%= Constants.CHECKOUT %>" /><portlet:param name="redirect" value="<%= redirect %>" /><portlet:param name="fileEntryId" value="<%= String.valueOf(fileEntryId) %>" /></portlet:actionURL>");
+	}
+
+	function <portlet:namespace />getSuggestionsContent() {
+		return document.<portlet:namespace />fm.<portlet:namespace />title.value + ' ' + document.<portlet:namespace />fm.<portlet:namespace />description.value;
+	}
+
+	function <portlet:namespace />saveFileEntry(draft) {
+		<%= HtmlUtil.escape(uploadProgressId) %>.startProgress();
+
+		if (!draft) {
+			document.<portlet:namespace />fm.action = "<%= editFileEntryURL.toString() %>";
+		}
+		else {
+
+			<%
+			editFileEntryURL.setParameter("workflowAction", String.valueOf(WorkflowConstants.ACTION_SAVE_DRAFT));
+			%>
+
+			document.<portlet:namespace />fm.action = "<%= editFileEntryURL.toString() %>";
+		}
+
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (fileEntry == null) ? Constants.ADD : Constants.UPDATE %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />validateTitle() {
+		Liferay.Form.get('<portlet:namespace />fm').formValidator.validateField('<portlet:namespace />title');
+	}
+</aui:script>
+
+<%
+if (fileEntry != null) {
+	DLUtil.addPortletBreadcrumbEntries(fileEntry, request, renderResponse);
+
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit"), currentURL);
+}
+else {
+	DLUtil.addPortletBreadcrumbEntries(folderId, request, renderResponse);
+
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "add-file-entry"), currentURL);
+}
+%>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.document_library.edit_file_entry_jsp");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/edit_file_entry_type.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/edit_file_entry_type.jsp
new file mode 100644
index 0000000..51b8358
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/edit_file_entry_type.jsp
@@ -0,0 +1,225 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+String portletResourceNamespace = ParamUtil.getString(request, "portletResourceNamespace");
+
+DLFileEntryType fileEntryType = (DLFileEntryType)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FILE_ENTRY_TYPE);
+
+long fileEntryTypeId = BeanParamUtil.getLong(fileEntryType, request, "fileEntryTypeId");
+
+DDMStructure ddmStructure = (DDMStructure)request.getAttribute(WebKeys.DYNAMIC_DATA_MAPPING_STRUCTURE);
+
+long ddmStructureId = BeanParamUtil.getLong(ddmStructure, request, "structureId");
+
+String script = BeanParamUtil.getString(ddmStructure, request, "xsd");
+
+JSONArray scriptJSONArray = null;
+
+if (Validator.isNotNull(script)) {
+	scriptJSONArray = DDMXSDUtil.getJSONArray(script);
+}
+
+List<DDMStructure> ddmStructures = null;
+
+if (fileEntryType != null) {
+	ddmStructures = fileEntryType.getDDMStructures();
+
+	if (ddmStructure != null) {
+		ddmStructures = new ArrayList<DDMStructure>(ddmStructures);
+
+		ddmStructures.remove(ddmStructure);
+	}
+}
+
+String scopeAvailableFields = ParamUtil.getString(request, "scopeAvailableFields", "Liferay.FormBuilder.AVAILABLE_FIELDS.DDM_STRUCTURE");
+%>
+
+<liferay-util:buffer var="removeStructureIcon">
+	<liferay-ui:icon
+		image="unlink"
+		label="<%= true %>"
+		message="remove"
+	/>
+</liferay-util:buffer>
+
+<portlet:actionURL var="editFileEntryTypeURL">
+	<portlet:param name="struts_action" value="/document_library/edit_file_entry_type" />
+</portlet:actionURL>
+
+<aui:form action="<%= editFileEntryTypeURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= (fileEntryType == null) ? Constants.ADD : Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="fileEntryTypeId" type="hidden" value="<%= fileEntryTypeId %>" />
+	<aui:input name="ddmStructureId" type="hidden" value="<%= ddmStructureId %>" />
+	<aui:input name="xsd" type="hidden" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		localizeTitle="<%= (fileEntryType == null) %>"
+		title='<%= (fileEntryType == null) ? "new-document-type" : fileEntryType.getName(locale) %>'
+	/>
+
+	<liferay-ui:error exception="<%= DuplicateFileEntryTypeException.class %>" message="please-enter-a-unique-document-type-name" />
+	<liferay-ui:error exception="<%= NoSuchMetadataSetException.class %>" message="please-enter-a-valid-metadata-set-or-enter-a-metadata-field" />
+	<liferay-ui:error exception="<%= StorageFieldRequiredException.class %>" message="please-fill-out-all-required-fields" />
+	<liferay-ui:error exception="<%= StructureDuplicateElementException.class %>" message="please-enter-unique-metadata-field-names-(including-field-names-inherited-from-the-parent)" />
+	<liferay-ui:error exception="<%= StructureNameException.class %>" message="please-enter-a-valid-name" />
+
+	<aui:model-context bean="<%= fileEntryType %>" model="<%= DLFileEntryType.class %>" />
+
+	<aui:fieldset cssClass="edit-file-entry-type">
+		<c:if test="<%= DDMStorageLinkLocalServiceUtil.getStructureStorageLinksCount(ddmStructureId) > 0 %>">
+			<div class="alert alert-warning">
+				<liferay-ui:message key="there-are-content-references-to-this-structure.-you-may-lose-data-if-a-field-name-is-renamed-or-removed" />
+			</div>
+		</c:if>
+
+		<aui:input name="name" />
+
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= false %>" id="detailsMetadataFields" persistState="<%= true %>" title="details">
+			<aui:input name="description" />
+		</liferay-ui:panel>
+
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= false %>" id="mainMetadataFields" persistState="<%= true %>" title="main-metadata-fields">
+			<%@ include file="/html/portlet/dynamic_data_mapping/form_builder.jspf" %>
+		</liferay-ui:panel>
+
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= false %>" id="additionalMetadataFields" persistState="<%= true %>" title="additional-metadata-fields">
+			<liferay-ui:search-container
+				headerNames='<%= (fileEntryType == null) ? "name,null" : "name" %>'
+				total="<%= (ddmStructures != null) ? ddmStructures.size() : 0 %>"
+			>
+				<liferay-ui:search-container-results
+					results="<%= ddmStructures %>"
+				/>
+
+				<liferay-ui:search-container-row
+					className="com.liferay.portlet.dynamicdatamapping.model.DDMStructure"
+					escapedModel="<%= true %>"
+					keyProperty="structureId"
+					modelVar="curDDMStructure"
+				>
+					<liferay-ui:search-container-column-text
+						name="name"
+						value="<%= curDDMStructure.getName(locale) %>"
+					/>
+
+					<liferay-ui:search-container-column-text>
+						<a class="modify-link" data-rowId="<%= curDDMStructure.getStructureId() %>" href="javascript:;"><%= removeStructureIcon %></a>
+					</liferay-ui:search-container-column-text>
+				</liferay-ui:search-container-row>
+
+				<liferay-ui:search-iterator paginate="<%= false %>" />
+			</liferay-ui:search-container>
+
+			<liferay-ui:icon
+				cssClass="modify-link select-metadata"
+				iconCssClass="icon-search"
+				label="<%= true %>"
+				linkCssClass="btn"
+				message="select-metadata-set"
+				url='<%= "javascript:" + renderResponse.getNamespace() + "openDDMStructureSelector();" %>'
+			/>
+		</liferay-ui:panel>
+
+		<c:if test="<%= (fileEntryType == null) %>">
+			<aui:field-wrapper label="permissions">
+				<liferay-ui:input-permissions
+					modelName="<%= DLFileEntryType.class.getName() %>"
+				/>
+			</aui:field-wrapper>
+		</c:if>
+	</aui:fieldset>
+</aui:form>
+
+<aui:button-row>
+	<aui:button onClick='<%= renderResponse.getNamespace() + "saveStructure();" %>' type="submit" />
+
+	<aui:button href="<%= redirect %>" type="cancel" />
+</aui:button-row>
+
+<aui:script>
+	function <portlet:namespace />openDDMStructureSelector() {
+		Liferay.Util.openDDMPortlet(
+			{
+				basePortletURL: '<%= PortletURLFactoryUtil.create(request, PortletKeys.DYNAMIC_DATA_MAPPING, themeDisplay.getPlid(), PortletRequest.RENDER_PHASE) %>',
+				classPK: '<%= ddmStructureId %>',
+				dialog: {
+					destroyOnHide: true
+				},
+				eventName: '<portlet:namespace />selectDDMStructure',
+				refererPortletName: '<%= PortletKeys.DOCUMENT_LIBRARY %>',
+				showGlobalScope: true,
+				showManageTemplates: false,
+				showToolbar: true,
+				struts_action: '/dynamic_data_mapping/select_structure',
+				title: '<%= UnicodeLanguageUtil.get(pageContext, "metadata-sets") %>'
+			},
+			function(event) {
+				var A = AUI();
+
+				var searchContainer = Liferay.SearchContainer.get('<portlet:namespace />ddmStructuresSearchContainer');
+
+				var ddmStructureLink = '<a class="modify-link" data-rowId="' + event.ddmstructureid + '" href="javascript:;"><%= UnicodeFormatter.toString(removeStructureIcon) %></a>';
+
+				searchContainer.addRow([event.name, ddmStructureLink], event.ddmstructureid);
+
+				searchContainer.updateDataStore();
+			}
+		);
+	}
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />saveStructure',
+		function() {
+			document.<portlet:namespace />fm.<portlet:namespace />xsd.value = window.<portlet:namespace />formBuilder.getContentXSD();
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['liferay-portlet-dynamic-data-mapping']
+	);
+</aui:script>
+
+<aui:script use="liferay-search-container">
+	var searchContainer = Liferay.SearchContainer.get('<portlet:namespace />ddmStructuresSearchContainer');
+
+	searchContainer.get('contentBox').delegate(
+		'click',
+		function(event) {
+			var link = event.currentTarget;
+
+			var tr = link.ancestor('tr');
+
+			searchContainer.deleteRow(tr, link.getAttribute('data-rowId'));
+		},
+		'.modify-link'
+	);
+</aui:script>
+
+<%
+if (fileEntryType == null) {
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "add-document-type"), currentURL);
+}
+else {
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit-document-type"), currentURL);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/edit_file_shortcut.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/edit_file_shortcut.jsp
new file mode 100644
index 0000000..c344750
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/edit_file_shortcut.jsp
@@ -0,0 +1,241 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+String strutsAction = ParamUtil.getString(request, "struts_action");
+
+String tabs2 = ParamUtil.getString(request, "tabs2", "version-history");
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+DLFileShortcut fileShortcut = (DLFileShortcut)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FILE_SHORTCUT);
+
+long fileShortcutId = BeanParamUtil.getLong(fileShortcut, request, "fileShortcutId");
+
+long toGroupId = ParamUtil.getLong(request, "toGroupId");
+
+Group toGroup = null;
+
+long repositoryId = BeanParamUtil.getLong(fileShortcut, request, "repositoryId");
+long folderId = BeanParamUtil.getLong(fileShortcut, request, "folderId");
+
+Folder toFolder = null;
+
+long toFileEntryId = BeanParamUtil.getLong(fileShortcut, request, "toFileEntryId");
+
+FileEntry toFileEntry = null;
+
+if (toFileEntryId > 0) {
+	try {
+		toFileEntry = DLAppLocalServiceUtil.getFileEntry(toFileEntryId);
+
+		toFileEntry = toFileEntry.toEscapedModel();
+
+		toFolder = toFileEntry.getFolder();
+
+		toGroupId = toFolder.getRepositoryId();
+
+		toGroup = GroupLocalServiceUtil.getGroup(toGroupId);
+
+		toGroup = toGroup.toEscapedModel();
+	}
+	catch (Exception e) {
+	}
+}
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", strutsAction);
+portletURL.setParameter("tabs2", tabs2);
+portletURL.setParameter("redirect", redirect);
+portletURL.setParameter("fileShortcutId", String.valueOf(fileShortcutId));
+%>
+
+<liferay-util:include page="/html/portlet/document_library/top_links.jsp" />
+
+<portlet:actionURL var="editFileShortcutURL">
+	<portlet:param name="struts_action" value="/document_library/edit_file_shortcut" />
+</portlet:actionURL>
+
+<aui:form action="<%= editFileShortcutURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveFileShortcut();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="fileShortcutId" type="hidden" value="<%= fileShortcutId %>" />
+	<aui:input name="repositoryId" type="hidden" value="<%= repositoryId %>" />
+	<aui:input name="folderId" type="hidden" value="<%= folderId %>" />
+	<aui:input name="toGroupId" type="hidden" value="<%= toGroupId %>" />
+	<aui:input name="toFileEntryId" type="hidden" value="<%= toFileEntryId %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title='<%= (fileShortcut != null)? LanguageUtil.format(pageContext, "shortcut-to-x", fileShortcut.getToTitle()) : "new-file-shortcut" %>'
+	/>
+
+	<liferay-ui:error exception="<%= FileShortcutPermissionException.class %>" message="you-do-not-have-permission-to-create-a-shortcut-to-the-selected-document" />
+	<liferay-ui:error exception="<%= NoSuchFileEntryException.class %>" message="the-document-could-not-be-found" />
+
+	<aui:fieldset>
+		<div class="alert alert-info">
+			<liferay-ui:message key="you-can-create-a-shortcut-to-any-document-that-you-have-read-access-for" />
+		</div>
+
+		<aui:field-wrapper label="site">
+
+			<%
+			String toGroupName = BeanPropertiesUtil.getString(toGroup, "name");
+			%>
+
+			<div class="input-append">
+				<liferay-ui:input-resource id="toGroupName" url="<%= toGroupName %>" />
+
+				<aui:button name="selectGroupButton" value="select" />
+			</div>
+		</aui:field-wrapper>
+
+		<aui:field-wrapper label="document">
+
+			<%
+			String toFileEntryTitle = BeanPropertiesUtil.getString(toFileEntry, "title");
+			%>
+
+			<div class="input-append">
+				<liferay-ui:input-resource id="toFileEntryTitle" url="<%= toFileEntryTitle %>" />
+
+				<aui:button disabled="<%= (toGroup == null) %>" name="selectToFileEntryButton" value="select" />
+			</div>
+		</aui:field-wrapper>
+
+		<c:if test="<%= fileShortcut == null %>">
+			<aui:field-wrapper label="permissions">
+				<liferay-ui:input-permissions
+					modelName="<%= DLFileShortcut.class.getName() %>"
+				/>
+			</aui:field-wrapper>
+		</c:if>
+
+		<aui:button-row>
+			<aui:button type="submit" />
+
+			<aui:button href="<%= redirect %>" type="cancel" />
+		</aui:button-row>
+	</aui:fieldset>
+</aui:form>
+
+<portlet:renderURL var="selectGroupURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+	<portlet:param name="struts_action" value="/document_library/select_group" />
+</portlet:renderURL>
+
+<portlet:renderURL var="selectFileEntryURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+	<portlet:param name="struts_action" value="/document_library/select_file_entry" />
+</portlet:renderURL>
+
+<aui:script use="aui-base,escape">
+	var selectToFileEntryButton = A.one('#<portlet:namespace />selectToFileEntryButton');
+
+	A.one('#<portlet:namespace />selectGroupButton').on(
+		'click',
+		function(event) {
+			Liferay.Util.selectEntity(
+				{
+					dialog: {
+						constrain: true,
+						modal: true,
+						width: 680
+					},
+					id: '<portlet:namespace />selectGroup',
+					title: '<liferay-ui:message arguments="site" key="select-x" />',
+					uri: '<%= selectGroupURL.toString() %>'
+				},
+				function(event) {
+					var A = AUI();
+
+					if (document.<portlet:namespace />fm.<portlet:namespace />toGroupId.value != event.groupid) {
+						<portlet:namespace />selectFileEntry("", "");
+					}
+
+					document.<portlet:namespace />fm.<portlet:namespace />toGroupId.value = event.groupid;
+					document.<portlet:namespace />fm.<portlet:namespace />toFileEntryId.value = 0;
+
+					document.getElementById('<portlet:namespace />toGroupName').value = A.Escape.html(event.groupdescriptivename);
+
+					Liferay.Util.toggleDisabled(selectToFileEntryButton, false);
+				}
+			);
+		}
+	);
+
+	selectToFileEntryButton.on(
+		'click',
+		function(event) {
+			Liferay.Util.selectEntity(
+				{
+					dialog: {
+						constrain: true,
+						modal: true,
+						width: 680
+					},
+					id: <portlet:namespace />createSelectFileEntryId(),
+					title: '<liferay-ui:message arguments="file" key="select-x" />',
+					uri: <portlet:namespace />createSelectFileEntryURL('<%= selectFileEntryURL.toString() %>')
+				},
+				function(event) {
+					<portlet:namespace />selectFileEntry(event.entryid, event.entryname);
+				}
+			);
+		}
+	);
+</aui:script>
+
+<aui:script>
+	function <portlet:namespace />createSelectFileEntryId() {
+		return '<portlet:namespace />selectFileEntry_' + document.<portlet:namespace />fm.<portlet:namespace />toGroupId.value;
+	}
+
+	function <portlet:namespace />createSelectFileEntryURL(url) {
+		url += '&<portlet:namespace />groupId=' + document.<portlet:namespace />fm.<portlet:namespace />toGroupId.value;
+		url += '&<portlet:namespace />fileEntryId=' + document.<portlet:namespace />fm.<portlet:namespace />toFileEntryId.value;
+
+		return url;
+	}
+
+	function <portlet:namespace />saveFileShortcut() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (fileShortcut == null) ? Constants.ADD : Constants.UPDATE %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />selectFileEntry(fileEntryId, title) {
+		document.<portlet:namespace />fm.<portlet:namespace />toFileEntryId.value = fileEntryId;
+
+		document.getElementById('<portlet:namespace />toFileEntryTitle').value = title;
+	}
+</aui:script>
+
+<%
+if (fileShortcut != null) {
+	DLUtil.addPortletBreadcrumbEntries(fileShortcut, request, renderResponse);
+
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit"), currentURL);
+}
+else {
+	DLUtil.addPortletBreadcrumbEntries(folderId, request, renderResponse);
+
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "add-file-shortcut"), currentURL);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/edit_folder.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/edit_folder.jsp
new file mode 100644
index 0000000..0854a0e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/edit_folder.jsp
@@ -0,0 +1,443 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+Folder folder = (Folder)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FOLDER);
+
+long folderId = BeanParamUtil.getLong(folder, request, "folderId");
+
+long repositoryId = BeanParamUtil.getLong(folder, request, "repositoryId");
+
+Folder parentFolder = null;
+
+long parentFolderId = BeanParamUtil.getLong(folder, request, "parentFolderId", DLFolderConstants.DEFAULT_PARENT_FOLDER_ID);
+
+boolean rootFolder = ParamUtil.getBoolean(request, "rootFolder");
+
+boolean workflowEnabled = WorkflowEngineManagerUtil.isDeployed() && (WorkflowHandlerRegistryUtil.getWorkflowHandler(DLFileEntry.class.getName()) != null);
+
+List<WorkflowDefinition> workflowDefinitions = null;
+
+if (workflowEnabled) {
+	workflowDefinitions = WorkflowDefinitionManagerUtil.getActiveWorkflowDefinitions(company.getCompanyId(), 0, 100, null);
+}
+%>
+
+<liferay-util:include page="/html/portlet/document_library/top_links.jsp" />
+
+<portlet:actionURL var="editFolderURL">
+	<portlet:param name="struts_action" value="/document_library/edit_folder" />
+</portlet:actionURL>
+
+<liferay-util:buffer var="removeFileEntryTypeIcon">
+	<liferay-ui:icon
+		image="unlink"
+		label="<%= true %>"
+		message="remove"
+	/>
+</liferay-util:buffer>
+
+<aui:form action="<%= editFolderURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "savePage();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value='<%= rootFolder ? "updateWorkflowDefinitions" : ((folder == null) ? Constants.ADD : Constants.UPDATE) %>' />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="folderId" type="hidden" value="<%= folderId %>" />
+	<aui:input name="repositoryId" type="hidden" value="<%= repositoryId %>" />
+	<aui:input name="parentFolderId" type="hidden" value="<%= parentFolderId %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		localizeTitle="<%= (folder == null) %>"
+		title='<%= (folder == null) ? (rootFolder ? "home" : "new-folder") : folder.getName() %>'
+	/>
+
+	<liferay-ui:error exception="<%= DuplicateFileException.class %>" message="please-enter-a-unique-folder-name" />
+	<liferay-ui:error exception="<%= DuplicateFolderNameException.class %>" message="please-enter-a-unique-folder-name" />
+	<liferay-ui:error exception="<%= FolderNameException.class %>" message="please-enter-a-valid-name" />
+
+	<aui:model-context bean="<%= folder %>" model="<%= DLFolder.class %>" />
+
+	<aui:fieldset>
+		<c:if test="<%= !rootFolder %>">
+
+			<%
+			String parentFolderName = LanguageUtil.get(pageContext, "home");
+
+			try {
+				if (parentFolderId != DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) {
+					parentFolder = DLAppLocalServiceUtil.getFolder(parentFolderId);
+
+					parentFolderName = parentFolder.getName();
+				}
+			}
+			catch (NoSuchFolderException nsfe) {
+			}
+			%>
+
+			<c:if test="<%= folder != null %>">
+				<aui:field-wrapper label="parent-folder">
+					<liferay-ui:input-resource url="<%= parentFolderName %>" />
+				</aui:field-wrapper>
+			</c:if>
+
+			<aui:input name="name" />
+
+			<c:if test="<%= (parentFolder == null) || parentFolder.isSupportsMetadata() %>">
+				<aui:input name="description" />
+
+				<liferay-ui:custom-attributes-available className="<%= DLFolderConstants.getClassName() %>">
+					<liferay-ui:custom-attribute-list
+						className="<%= DLFolderConstants.getClassName() %>"
+						classPK="<%= (folder != null) ? folder.getFolderId() : 0 %>"
+						editable="<%= true %>"
+						label="<%= true %>"
+					/>
+				</liferay-ui:custom-attributes-available>
+			</c:if>
+		</c:if>
+
+		<c:if test="<%= rootFolder || ((folder != null) && (folder.getModel() instanceof DLFolder)) %>">
+
+			<%
+			DLFolder dlFolder = null;
+
+			long defaultFileEntryTypeId = 0;
+
+			if (!rootFolder) {
+				dlFolder = (DLFolder)folder.getModel();
+
+				defaultFileEntryTypeId = dlFolder.getDefaultFileEntryTypeId();
+			}
+
+			List<DLFileEntryType> fileEntryTypes = DLFileEntryTypeLocalServiceUtil.getFolderFileEntryTypes(PortalUtil.getSiteAndCompanyGroupIds(themeDisplay), folderId, false);
+
+			String headerNames = null;
+
+			if (workflowEnabled) {
+				headerNames = "name,workflow,null";
+			}
+			else {
+				headerNames = "name,null";
+			}
+			%>
+
+			<aui:field-wrapper helpMessage='<%= rootFolder ? "" : "document-type-restrictions-help" %>' label='<%= rootFolder ? "" : (workflowEnabled ? "document-type-restrictions-and-workflow" : "document-type-restrictions") %>'>
+				<c:if test="<%= !rootFolder %>">
+					<aui:input checked="<%= !dlFolder.isOverrideFileEntryTypes() %>" id="useFileEntryTypes" label='<%= workflowEnabled ? "use-document-type-restrictions-and-workflow-of-the-parent-folder" : "use-document-type-restrictions-of-the-parent-folder" %>' name="overrideFileEntryTypes" type="radio" value="<%= false %>" />
+
+					<aui:input checked="<%= dlFolder.isOverrideFileEntryTypes() %>" id="overrideFileEntryTypes" label='<%= workflowEnabled ? "define-specific-document-type-restrictions-and-workflow-for-this-folder" : "define-specific-document-type-restrictions-for-this-folder" %>' name="overrideFileEntryTypes" type="radio" value="<%= true %>" />
+				</c:if>
+
+				<div id="<portlet:namespace />overrideParentSettings">
+					<c:if test="<%= workflowEnabled %>">
+						<div class='<%= (rootFolder || fileEntryTypes.isEmpty()) ? StringPool.BLANK : "hide" %>' id="<portlet:namespace />defaultWorkflow">
+							<aui:select label="default-workflow-for-all-document-types" name='<%= "workflowDefinition" + DLFileEntryTypeConstants.FILE_ENTRY_TYPE_ID_ALL %>'>
+
+								<aui:option label="no-workflow" value="" />
+
+								<%
+								WorkflowDefinitionLink workflowDefinitionLink = null;
+
+								try {
+									workflowDefinitionLink = WorkflowDefinitionLinkLocalServiceUtil.getWorkflowDefinitionLink(company.getCompanyId(), repositoryId, DLFolderConstants.getClassName(), folderId, DLFileEntryTypeConstants.FILE_ENTRY_TYPE_ID_ALL, true);
+								}
+								catch (NoSuchWorkflowDefinitionLinkException nswdle) {
+								}
+
+								for (WorkflowDefinition workflowDefinition : workflowDefinitions) {
+									boolean selected = false;
+
+									if ((workflowDefinitionLink != null) && workflowDefinitionLink.getWorkflowDefinitionName().equals(workflowDefinition.getName()) && (workflowDefinitionLink.getWorkflowDefinitionVersion() == workflowDefinition.getVersion())) {
+										selected = true;
+									}
+								%>
+
+									<aui:option label='<%= workflowDefinition.getName() + " (" + LanguageUtil.format(locale, "version-x", workflowDefinition.getVersion()) + ")" %>' selected="<%= selected %>" value="<%= workflowDefinition.getName() + StringPool.AT + workflowDefinition.getVersion() %>" />
+
+								<%
+								}
+								%>
+
+							</aui:select>
+						</div>
+					</c:if>
+
+					<c:if test="<%= !rootFolder %>">
+						<liferay-ui:search-container
+							headerNames="<%= headerNames %>"
+							total="<%= fileEntryTypes.size() %>"
+						>
+							<liferay-ui:search-container-results
+								results="<%= fileEntryTypes %>"
+							/>
+
+							<liferay-ui:search-container-row
+								className="com.liferay.portlet.documentlibrary.model.DLFileEntryType"
+								escapedModel="<%= true %>"
+								keyProperty="fileEntryTypeId"
+								modelVar="dlFileEntryType"
+							>
+								<liferay-ui:search-container-column-text
+									name="name"
+									value="<%= dlFileEntryType.getName(locale) %>"
+								/>
+
+								<c:if test="<%= workflowEnabled %>">
+									<liferay-ui:search-container-column-text name="workflow">
+										<aui:select label="" name='<%= "workflowDefinition" + dlFileEntryType.getFileEntryTypeId() %>'>
+
+											<aui:option label="no-workflow" value="" />
+
+											<%
+											WorkflowDefinitionLink workflowDefinitionLink = null;
+
+											try {
+												workflowDefinitionLink = WorkflowDefinitionLinkLocalServiceUtil.getWorkflowDefinitionLink(company.getCompanyId(), repositoryId, DLFolderConstants.getClassName(), folderId, dlFileEntryType.getFileEntryTypeId(), true);
+											}
+											catch (NoSuchWorkflowDefinitionLinkException nswdle) {
+											}
+
+											for (WorkflowDefinition workflowDefinition : workflowDefinitions) {
+												boolean selected = false;
+
+												if ((workflowDefinitionLink != null) && workflowDefinitionLink.getWorkflowDefinitionName().equals(workflowDefinition.getName()) && (workflowDefinitionLink.getWorkflowDefinitionVersion() == workflowDefinition.getVersion())) {
+													selected = true;
+												}
+											%>
+
+												<aui:option label='<%= workflowDefinition.getName() + " (" + LanguageUtil.format(locale, "version-x", workflowDefinition.getVersion()) + ")" %>' selected="<%= selected %>" value="<%= workflowDefinition.getName() + StringPool.AT + workflowDefinition.getVersion() %>" />
+
+											<%
+											}
+											%>
+
+										</aui:select>
+									</liferay-ui:search-container-column-text>
+								</c:if>
+
+								<liferay-ui:search-container-column-text>
+									<a class="modify-link" data-rowId="<%= dlFileEntryType.getFileEntryTypeId() %>" href="javascript:;"><%= removeFileEntryTypeIcon %></a>
+								</liferay-ui:search-container-column-text>
+							</liferay-ui:search-container-row>
+
+							<liferay-ui:search-iterator paginate="<%= false %>" />
+						</liferay-ui:search-container>
+
+						<liferay-ui:icon
+							cssClass="modify-link select-file-entry-type"
+							iconCssClass="icon-search"
+							label="<%= true %>"
+							linkCssClass="btn"
+							message="select-document-type"
+							url='<%= "javascript:" + renderResponse.getNamespace() + "openFileEntryTypeSelector();" %>'
+						/>
+
+						<aui:select cssClass='<%= !fileEntryTypes.isEmpty() ? "default-document-type" : "default-document-type hide" %>' helpMessage="default-document-type-help" label="default-document-type" name="defaultFileEntryTypeId">
+
+							<%
+							for (DLFileEntryType fileEntryType : fileEntryTypes) {
+							%>
+
+								<aui:option id='<%= renderResponse.getNamespace() + "defaultFileEntryTypeId-" + fileEntryType.getFileEntryTypeId() %>' label="<%= HtmlUtil.escape(fileEntryType.getName(locale)) %>" selected="<%= (fileEntryType.getFileEntryTypeId() == defaultFileEntryTypeId) %>" value="<%= fileEntryType.getFileEntryTypeId() %>" />
+
+							<%
+							}
+							%>
+
+						</aui:select>
+					</c:if>
+				</div>
+			</aui:field-wrapper>
+		</c:if>
+
+		<c:if test="<%= !rootFolder && (folder == null) %>">
+			<aui:field-wrapper label="permissions">
+				<liferay-ui:input-permissions
+					modelName="<%= DLFolderConstants.getClassName() %>"
+				/>
+			</aui:field-wrapper>
+		</c:if>
+
+		<aui:button-row>
+			<aui:button type="submit" />
+
+			<aui:button href="<%= redirect %>" type="cancel" />
+		</aui:button-row>
+	</aui:fieldset>
+</aui:form>
+
+<liferay-util:buffer var="workflowDefinitionsBuffer">
+	<c:if test="<%= workflowEnabled %>">
+		<aui:select label="" name="LIFERAY_WORKFLOW_DEFINITION_FILE_ENTRY_TYPE">
+			<aui:option label="no-workflow" value="" />
+
+			<%
+			for (WorkflowDefinition workflowDefinition : workflowDefinitions) {
+			%>
+
+				<aui:option label='<%= workflowDefinition.getName() + " (" + LanguageUtil.format(locale, "version-x", workflowDefinition.getVersion()) + ")" %>' selected="<% selected %>" value="<%= workflowDefinition.getName() + StringPool.AT + workflowDefinition.getVersion() %>" />
+
+			<%
+			}
+			%>
+
+		</aui:select>
+	</c:if>
+</liferay-util:buffer>
+
+<aui:script>
+	var documentTypesChanged = false;
+
+	function <portlet:namespace />openFileEntryTypeSelector() {
+		Liferay.Util.selectEntity(
+			{
+				dialog: {
+					constrain: true,
+					modal: true,
+					width: 1024
+				},
+				eventName: '<portlet:namespace />selectFileEntryType',
+				id: '<portlet:namespace />fileEntryTypeSelector',
+				title: '<%= UnicodeLanguageUtil.get(pageContext, "document-types") %>',
+				uri: '<portlet:renderURL windowState="<%= LiferayWindowState.POP_UP.toString() %>"><portlet:param name="struts_action" value="/document_library/select_restricted_file_entry_type" /><portlet:param name="includeBasicFileEntryType" value="1" /></portlet:renderURL>'
+			},
+			function(event) {
+				<portlet:namespace />selectFileEntryType(event.fileentrytypeid, event.fileentrytypename);
+			}
+		);
+	}
+
+	function <portlet:namespace />savePage() {
+		var message = '<%= UnicodeLanguageUtil.get(pageContext, workflowEnabled ? "change-document-types-and-workflow-message" : "change-document-types-message") %>';
+
+		var submit = true;
+
+		if (documentTypesChanged) {
+			if (!confirm(message)) {
+				submit = false;
+			}
+		}
+
+		if (submit) {
+			submitForm(document.<portlet:namespace />fm);
+		}
+	}
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />selectFileEntryType',
+		function(fileEntryTypeId, fileEntryTypeName) {
+			var A = AUI();
+
+			var searchContainer = Liferay.SearchContainer.get('<portlet:namespace />dlFileEntryTypesSearchContainer');
+
+			var fileEntryTypeLink = '<a class="modify-link" data-rowId="' + fileEntryTypeId + '" href="javascript:;"><%= UnicodeFormatter.toString(removeFileEntryTypeIcon) %></a>';
+
+			<c:choose>
+				<c:when test="<%= workflowEnabled %>">
+					var defaultWorkflow = A.one('#<portlet:namespace />defaultWorkflow');
+
+					defaultWorkflow.hide();
+
+					var workflowDefinitions = '<%= UnicodeFormatter.toString(workflowDefinitionsBuffer) %>';
+
+					workflowDefinitions = workflowDefinitions.replace(/LIFERAY_WORKFLOW_DEFINITION_FILE_ENTRY_TYPE/g, "workflowDefinition" + fileEntryTypeId);
+
+					documentTypesChanged = true;
+
+					searchContainer.addRow([fileEntryTypeName, workflowDefinitions, fileEntryTypeLink], fileEntryTypeId);
+				</c:when>
+				<c:otherwise>
+					searchContainer.addRow([fileEntryTypeName, fileEntryTypeLink], fileEntryTypeId);
+				</c:otherwise>
+			</c:choose>
+
+			searchContainer.updateDataStore();
+
+			var select = A.one('#<portlet:namespace />defaultFileEntryTypeId');
+
+			var selectContainer = A.one('#<portlet:namespace />overrideParentSettings .default-document-type');
+
+			selectContainer.show();
+
+			var option = A.Node.create('<option id="<portlet:namespace />defaultFileEntryTypeId-' + fileEntryTypeId + '" value="' + fileEntryTypeId + '">' + fileEntryTypeName + '</option>');
+
+			option.show();
+
+			select.append(option);
+		},
+		['liferay-search-container']
+	);
+
+	Liferay.Util.toggleRadio('<portlet:namespace />overrideFileEntryTypes', '<portlet:namespace />overrideParentSettings', '');
+	Liferay.Util.toggleRadio('<portlet:namespace />useFileEntryTypes', '', '<portlet:namespace />overrideParentSettings');
+</aui:script>
+
+<aui:script use="liferay-search-container">
+	var searchContainer = Liferay.SearchContainer.get('<portlet:namespace />dlFileEntryTypesSearchContainer');
+
+	searchContainer.get('contentBox').delegate(
+		'click',
+		function(event) {
+			var A = AUI();
+
+			var link = event.currentTarget;
+
+			var tr = link.ancestor('tr');
+
+			searchContainer.deleteRow(tr, link.getAttribute('data-rowId'));
+
+			A.one('#<portlet:namespace />defaultFileEntryTypeId-' + link.getAttribute('data-rowId')).remove();
+
+			documentTypesChanged = true;
+
+			var select = A.one('#<portlet:namespace />defaultFileEntryTypeId');
+
+			var selectContainer = A.one('#<portlet:namespace />overrideParentSettings .default-document-type')
+
+			var fileEntryTypesCount = select.get('children').size();
+
+			if (fileEntryTypesCount == 0) {
+				selectContainer.hide();
+
+				var defaultWorkflow = A.one('#<portlet:namespace />defaultWorkflow');
+
+				defaultWorkflow.show();
+			}
+			else {
+				selectContainer.show();
+			}
+
+		},
+		'.modify-link'
+	);
+</aui:script>
+
+<%
+if (!rootFolder && (folder == null)) {
+	DLUtil.addPortletBreadcrumbEntries(parentFolderId, request, renderResponse);
+
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "add-folder"), currentURL);
+}
+else {
+	DLUtil.addPortletBreadcrumbEntries(folderId, request, renderResponse);
+
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit"), currentURL);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/edit_repository.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/edit_repository.jsp
new file mode 100644
index 0000000..1eab419
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/edit_repository.jsp
@@ -0,0 +1,242 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+Repository repository = (Repository)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_REPOSITORY);
+
+long repositoryId = BeanParamUtil.getLong(repository, request, "repositoryId");
+
+long folderId = ParamUtil.getLong(request, "folderId");
+%>
+
+<liferay-util:include page="/html/portlet/document_library/top_links.jsp" />
+
+<portlet:actionURL var="editRepositoryURL">
+	<portlet:param name="struts_action" value="/document_library/edit_repository" />
+</portlet:actionURL>
+
+<aui:form action="<%= editRepositoryURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= (repository == null) ? Constants.ADD : Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="repositoryId" type="hidden" value="<%= repositoryId %>" />
+	<aui:input name="folderId" type="hidden" value="<%= folderId %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		localizeTitle="<%= (repository == null) %>"
+		title='<%= (repository == null) ? "new-repository" : repository.getName() %>'
+	/>
+
+	<liferay-ui:error exception="<%= DuplicateFolderNameException.class %>" message="please-enter-a-unique-repository-name" />
+	<liferay-ui:error exception="<%= DuplicateRepositoryNameException.class %>" message="please-enter-a-unique-repository-name" />
+	<liferay-ui:error exception="<%= FolderNameException.class %>" message="please-enter-a-valid-folder-name" />
+	<liferay-ui:error exception="<%= InvalidRepositoryException.class %>" message="please-verify-your-repository-configuration-parameters" />
+	<liferay-ui:error exception="<%= RepositoryNameException.class %>" message="please-enter-a-valid-name" />
+
+	<aui:model-context bean="<%= repository %>" model="<%= Repository.class %>" />
+
+	<aui:fieldset>
+		<aui:input name="name" />
+
+		<aui:input name="description" />
+
+		<c:choose>
+			<c:when test="<%= repository == null %>">
+				<aui:select id="repositoryTypes" label="repository-type" name="className">
+
+					<%
+					for (String dlRepositoryImpl : RepositoryFactoryUtil.getRepositoryClassNames()) {
+					%>
+
+						<aui:option label="<%= ResourceActionsUtil.getModelResource(locale, dlRepositoryImpl) %>" value="<%= dlRepositoryImpl %>" />
+
+					<%
+					}
+					%>
+
+				</aui:select>
+
+				<div id="<portlet:namespace />settingsConfiguration"></div>
+
+				<div id="<portlet:namespace />settingsParameters"></div>
+			</c:when>
+			<c:otherwise>
+				<div class="repository-settings-display">
+					<dt>
+						<liferay-ui:message key="repository-type" />
+					</dt>
+					<dd>
+						<%= ResourceActionsUtil.getModelResource(locale, repository.getClassName()) %>
+					</dd>
+
+					<%
+					UnicodeProperties typeSettingsProperties = repository.getTypeSettingsProperties();
+
+					String configuration = typeSettingsProperties.get("configuration-type");
+
+					String[] supportedParameters = RepositoryServiceUtil.getSupportedParameters(repository.getClassNameId(), configuration);
+
+					for (String supportedParameter : supportedParameters) {
+						String supportedParameterValue = typeSettingsProperties.getProperty(supportedParameter);
+
+						if (Validator.isNotNull(supportedParameterValue)) {
+					%>
+
+							<dt>
+								<%= LanguageUtil.get(pageContext, StringUtil.replace(StringUtil.toLowerCase(supportedParameter), CharPool.UNDERLINE, CharPool.DASH)) %>
+							</dt>
+							<dd>
+								<%= supportedParameterValue %>
+							</dd>
+
+					<%
+						}
+					}
+					%>
+
+				</div>
+			</c:otherwise>
+		</c:choose>
+		<c:if test="<%= repository == null %>">
+			<aui:field-wrapper label="permissions">
+				<liferay-ui:input-permissions
+					modelName="<%= DLFolderConstants.getClassName() %>"
+				/>
+			</aui:field-wrapper>
+		</c:if>
+
+		<aui:button-row>
+			<aui:button type="submit" />
+
+			<aui:button href="<%= redirect %>" type="cancel" />
+		</aui:button-row>
+	</aui:fieldset>
+</aui:form>
+
+<div class="hide" id="<portlet:namespace />settingsSupported">
+
+	<%
+	for (String dlRepositoryImpl : RepositoryFactoryUtil.getRepositoryClassNames()) {
+		String className = dlRepositoryImpl.substring(dlRepositoryImpl.lastIndexOf(StringPool.PERIOD) + 1);
+
+		long classNameId = PortalUtil.getClassNameId(dlRepositoryImpl);
+
+		String[] supportedConfigurations = RepositoryServiceUtil.getSupportedConfigurations(classNameId);
+
+		for (String supportedConfiguration : supportedConfigurations) {
+		%>
+
+			<div class="settings-configuration <%= ((supportedConfigurations.length == 1) ? "hide" : "") %>" id="<portlet:namespace />repository-<%= className %>-wrapper">
+				<aui:select cssClass="repository-configuration" id='<%= "repository-" + className %>' label="repository-configuration" name="settings--configuration-type--">
+					<aui:option label="<%= LanguageUtil.get(pageContext, StringUtil.replace(StringUtil.toLowerCase(supportedConfiguration), CharPool.UNDERLINE, CharPool.DASH)) %>" selected="<%= supportedConfiguration.equals(supportedConfigurations[0]) %>" value="<%= supportedConfiguration %>" />
+				</aui:select>
+			</div>
+			<div class="settings-parameters" id="<portlet:namespace />repository-<%= className %>-configuration-<%= supportedConfiguration %>">
+
+				<%
+				String[] supportedParameters = RepositoryServiceUtil.getSupportedParameters(classNameId, supportedConfiguration);
+
+				for (String supportedParameter : supportedParameters) {
+				%>
+
+					<aui:input label="<%= LanguageUtil.get(pageContext, StringUtil.replace(StringUtil.toLowerCase(supportedParameter), CharPool.UNDERLINE, CharPool.DASH)) %>" name='<%= "settings--" + supportedParameter + "--" %>' type="text" value="" />
+
+				<%
+				}
+				%>
+
+			</div>
+
+	<%
+		}
+	}
+	%>
+
+</div>
+
+<aui:script use="aui-base">
+	var settingsSupported = A.one('#<portlet:namespace />settingsSupported');
+	var settingsConfiguration = A.one('#<portlet:namespace />settingsConfiguration');
+	var settingsParameters = A.one('#<portlet:namespace />settingsParameters');
+
+	var showConfiguration = function(select) {
+		if (settingsConfiguration) {
+			settingsSupported.append(settingsConfiguration.all('.settings-configuration'));
+		}
+
+		if (settingsParameters) {
+			settingsSupported.append(settingsParameters.all('.settings-parameters'));
+		}
+
+		var value = select.val();
+		var className = value.split('.').pop();
+
+		var repositoryConfiguration = A.one('#<portlet:namespace />repository-' + className + '-wrapper');
+		var selectRepositoryConfiguration = A.one('#<portlet:namespace />repository-' + className);
+
+		if (selectRepositoryConfiguration) {
+			var repositoryParameters = A.one('#<portlet:namespace />repository-' + className + '-configuration-' + selectRepositoryConfiguration.val());
+
+			if (settingsConfiguration) {
+				settingsConfiguration.append(repositoryConfiguration);
+			}
+
+			if (settingsParameters) {
+				settingsParameters.append(repositoryParameters);
+			}
+		}
+	};
+
+	var showParameters = function(event) {
+		var select = event.currentTarget;
+
+		var repositoryParameters = A.one('#' + select.attr('id') + '-configuration-' + select.val());
+
+		var settingsParametersChildren = settingsParameters.all('.settings-parameters');
+
+		settingsSupported.append(settingsParametersChildren);
+		settingsParameters.append(repositoryParameters);
+	}
+
+	var selectRepositoryTypes = A.one('#<portlet:namespace />repositoryTypes');
+
+	if (selectRepositoryTypes) {
+		selectRepositoryTypes.on(
+			'change',
+			function(event) {
+				showConfiguration(event.currentTarget);
+			}
+		);
+
+		showConfiguration(selectRepositoryTypes);
+	}
+
+	var selectConfiguration = A.all('.repository-configuration');
+
+	selectConfiguration.on('change', showParameters);
+</aui:script>
+
+<%
+if (repository != null) {
+	DLUtil.addPortletBreadcrumbEntries(folderId, request, renderResponse);
+
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit"), currentURL);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/error.jsp
new file mode 100644
index 0000000..b2cc169
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/error.jsp
@@ -0,0 +1,40 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= DuplicateLockException.class %>">
+
+	<%
+	Lock lock = (Lock)errorException;
+	%>
+
+	<%= LanguageUtil.format(pageContext, "you-cannot-modify-this-document-because-it-was-locked-by-x-on-x", new Object[] {HtmlUtil.escape(PortalUtil.getUserName(lock.getUserId(), String.valueOf(lock.getUserId()))), dateFormatDateTime.format(lock.getCreateDate())}, false) %>
+</liferay-ui:error>
+
+<liferay-ui:error exception="<%= InvalidFileVersionException.class %>" message="file-version-is-invalid" />
+<liferay-ui:error exception="<%= NoSuchDirectoryException.class %>" message="the-folder-could-not-be-found" />
+<liferay-ui:error exception="<%= NoSuchFileEntryException.class %>" message="the-document-could-not-be-found" />
+<liferay-ui:error exception="<%= NoSuchFileException.class %>" message="the-document-could-not-be-found" />
+<liferay-ui:error exception="<%= NoSuchFolderException.class %>" message="the-folder-could-not-be-found" />
+<liferay-ui:error exception="<%= NoSuchRepositoryException.class %>" message="the-repository-could-not-be-found" />
+<liferay-ui:error exception="<%= NoSuchStructureException.class %>" message="the-structure-could-not-be-found" />
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/file_entries_template.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/file_entries_template.jspf
new file mode 100644
index 0000000..ba3c5a3
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/file_entries_template.jspf
@@ -0,0 +1,40 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<div class="lfr-template" id="<portlet:namespace />appViewEntryTemplates">
+
+	<%
+	String thumbnailSrc = themeDisplay.getPathThemeImages() + "/file_system/large/default.png";
+	%>
+
+	<liferay-ui:app-view-entry
+		displayStyle="icon"
+		showCheckbox="<%= Boolean.FALSE %>"
+		thumbnailSrc="<%= thumbnailSrc %>"
+		thumbnailStyle="<%= DLUtil.getThumbnailStyle() %>"
+		title="{title}"
+		url="<%= uploadURL %>"
+	/>
+
+	<liferay-ui:app-view-entry
+		displayStyle="descriptive"
+		showCheckbox="<%= Boolean.FALSE %>"
+		thumbnailSrc="<%= thumbnailSrc %>"
+		thumbnailStyle="<%= DLUtil.getThumbnailStyle() %>"
+		title="{title}"
+		url="<%= uploadURL %>"
+	/>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/file_entry_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/file_entry_action.jsp
new file mode 100644
index 0000000..d0716b1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/file_entry_action.jsp
@@ -0,0 +1,141 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+FileEntry fileEntry = null;
+DLFileShortcut fileShortcut = null;
+
+boolean showWhenSingleIcon = false;
+
+if (portletId.equals(PortletKeys.DOCUMENT_LIBRARY)) {
+	showWhenSingleIcon = true;
+}
+
+if (row != null) {
+	Object result = row.getObject();
+
+	if (result instanceof AssetEntry) {
+		AssetEntry assetEntry = (AssetEntry)result;
+
+		if (assetEntry.getClassName().equals(DLFileEntryConstants.getClassName())) {
+			fileEntry = DLAppLocalServiceUtil.getFileEntry(assetEntry.getClassPK());
+		}
+		else {
+			fileShortcut = DLAppLocalServiceUtil.getFileShortcut(assetEntry.getClassPK());
+		}
+	}
+	else if (result instanceof FileEntry) {
+		fileEntry = (FileEntry)result;
+	}
+	else if (result instanceof TrashEntry) {
+		TrashEntry trashEntry = (TrashEntry)result;
+
+		String className = trashEntry.getClassName();
+
+		if (className.equals(DLFileEntryConstants.getClassName())) {
+			fileEntry = DLAppLocalServiceUtil.getFileEntry(trashEntry.getClassPK());
+		}
+		else {
+			fileShortcut = DLAppLocalServiceUtil.getFileShortcut(trashEntry.getClassPK());
+		}
+	}
+	else {
+		fileShortcut = (DLFileShortcut)result;
+	}
+}
+else {
+	if (portletName.equals(PortletKeys.DOCUMENT_LIBRARY_DISPLAY)) {
+		if (request.getAttribute("view_file_entry.jsp-fileEntry") != null) {
+			fileEntry = (FileEntry)request.getAttribute("view_file_entry.jsp-fileEntry");
+
+			if (request.getAttribute("view_file_entry.jsp-fileShortcut") != null) {
+				fileShortcut = (DLFileShortcut)request.getAttribute("view_file_entry.jsp-fileShortcut");
+			}
+		}
+		else {
+			fileShortcut = (DLFileShortcut)request.getAttribute("view_file_shortcut.jsp-fileShortcut");
+		}
+	}
+	else {
+		if (request.getAttribute("view_entries.jsp-fileEntry") != null) {
+			fileEntry = (FileEntry)request.getAttribute("view_entries.jsp-fileEntry");
+
+			if (request.getAttribute("view_entries.jsp-fileShortcut") != null) {
+				fileShortcut = (DLFileShortcut)request.getAttribute("view_entries.jsp-fileShortcut");
+			}
+		}
+		else {
+			fileShortcut = (DLFileShortcut)request.getAttribute("view_file_shortcut.jsp-fileShortcut");
+		}
+	}
+}
+
+long folderId = 0;
+
+if (fileShortcut != null) {
+	folderId = fileShortcut.getFolderId();
+
+	fileEntry = DLAppLocalServiceUtil.getFileEntry(fileShortcut.getToFileEntryId());
+}
+else if (fileEntry != null) {
+	folderId = fileEntry.getFolderId();
+}
+
+boolean checkedOut = fileEntry.isCheckedOut();
+boolean hasLock = fileEntry.hasLock();
+boolean restore = false;
+
+PortletURL viewFolderURL = liferayPortletResponse.createRenderURL();
+
+viewFolderURL.setParameter("struts_action", "/document_library/view");
+viewFolderURL.setParameter("folderId", String.valueOf(folderId));
+
+if (fileShortcut != null) {
+	fileEntry = DLAppLocalServiceUtil.getFileEntry(fileShortcut.getToFileEntryId());
+}
+%>
+
+<liferay-util:buffer var="iconMenu">
+	<liferay-ui:icon-menu direction='<%= showMinimalActionButtons ? "down" : "left" %>' extended="<%= showMinimalActionButtons ? false : true %>" icon="<%= showMinimalActionButtons ? StringPool.BLANK : null %>" message='<%= showMinimalActionButtons ? StringPool.BLANK : "actions" %>' showExpanded="<%= false %>" showWhenSingleIcon="<%= showWhenSingleIcon %>" triggerCssClass="btn">
+		<%@ include file="/html/portlet/document_library/action/download.jspf" %>
+		<%@ include file="/html/portlet/document_library/action/open_document.jspf" %>
+		<%@ include file="/html/portlet/document_library/action/view_original.jspf" %>
+		<%@ include file="/html/portlet/document_library/action/edit.jspf" %>
+		<%@ include file="/html/portlet/document_library/action/move.jspf" %>
+		<%@ include file="/html/portlet/document_library/action/lock.jspf" %>
+		<%@ include file="/html/portlet/document_library/action/permissions.jspf" %>
+		<%@ include file="/html/portlet/document_library/action/delete.jspf" %>
+	</liferay-ui:icon-menu>
+</liferay-util:buffer>
+
+<c:choose>
+	<c:when test="<%= portletName.equals(PortletKeys.DOCUMENT_LIBRARY_DISPLAY) && !showMinimalActionButtons %>">
+
+		<%= iconMenu %>
+
+	</c:when>
+	<c:otherwise>
+		<span class="entry-action overlay">
+
+			<%= iconMenu %>
+
+		</span>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/file_entry_columns.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/file_entry_columns.jspf
new file mode 100644
index 0000000..c94c278
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/file_entry_columns.jspf
@@ -0,0 +1,136 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+for (int j = 0; j < fileEntryColumns.length; j++) {
+	String fileEntryColumn = fileEntryColumns[j];
+
+	FileVersion latestFileVersion = fileEntry.getFileVersion();
+
+	if ((user.getUserId() == fileEntry.getUserId()) || permissionChecker.isCompanyAdmin() || permissionChecker.isGroupAdmin(scopeGroupId) || DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.UPDATE)) {
+		latestFileVersion = fileEntry.getLatestFileVersion();
+	}
+
+	int latestFileVersionStatus = latestFileVersion.getStatus();
+%>
+
+	<c:choose>
+		<c:when test='<%= fileEntryColumn.equals("action") %>'>
+
+			<%
+			String align = SearchEntry.DEFAULT_ALIGN;
+
+			if ((j + 1) == fileEntryColumns.length) {
+				align = "right";
+			}
+			%>
+
+			<liferay-ui:search-container-column-jsp
+				align="<%= align %>"
+				index="<%= j %>"
+				path="/html/portlet/document_library/file_entry_action.jsp"
+			/>
+
+		</c:when>
+		<c:when test='<%= fileEntryColumn.equals("downloads") %>'>
+			<liferay-ui:search-container-column-text
+				href="<%= rowHREF %>"
+				index="<%= j %>"
+				name="<%= fileEntryColumn %>"
+				value="<%= String.valueOf(fileEntry.getReadCount()) %>"
+			/>
+		</c:when>
+		<c:when test='<%= fileEntryColumn.equals("locked") %>'>
+			<liferay-ui:search-container-column-text
+				href="<%= rowHREF %>"
+				index="<%= j %>"
+				name="<%= fileEntryColumn %>"
+				value='<%= LanguageUtil.get(pageContext, fileEntry.isCheckedOut() ? "yes" : "no") %>'
+			/>
+		</c:when>
+		<c:when test='<%= fileEntryColumn.equals("name") %>'>
+			<liferay-ui:search-container-column-text
+				href="<%= rowHREF %>"
+				index="<%= j %>"
+				name="<%= fileEntryColumn %>"
+			>
+
+				<%
+				String thumbnailSrc = DLUtil.getThumbnailSrc(fileEntry, latestFileVersion, fileShortcut, themeDisplay);
+				%>
+
+				<span class="entry-thumbnail">
+					<img class="thumbnail" src="<%= thumbnailSrc %>" />
+
+					<c:if test="<%= fileShortcut != null %>">
+						<img alt="<liferay-ui:message key="shortcut" />" class="shortcut-icon" src="<%= themeDisplay.getPathThemeImages() %>/file_system/large/overlay_link.png" />
+					</c:if>
+
+					<c:if test="<%= fileEntry.isCheckedOut() %>">
+						<img alt="<liferay-ui:message key="locked" />" class="locked-icon" src="<%= themeDisplay.getPathThemeImages() %>/file_system/large/overlay_lock.png" />
+					</c:if>
+
+					<c:if test="<%= ((latestFileVersionStatus != WorkflowConstants.STATUS_ANY) && (latestFileVersionStatus != WorkflowConstants.STATUS_APPROVED)) %>">
+						<aui:workflow-status showIcon="<%= false %>" showLabel="<%= false %>" status="<%= latestFileVersionStatus %>" />
+					</c:if>
+				</span>
+
+				<span class="entry-title"><%= HtmlUtil.escape(latestFileVersion.getTitle()) %></span>
+
+				<c:if test="<%= Validator.isNotNull(latestFileVersion.getDescription()) %>">
+					<div class="file-entry-list-description">
+						<%= HtmlUtil.escape(latestFileVersion.getDescription()) %>
+					</div>
+				</c:if>
+			</liferay-ui:search-container-column-text>
+		</c:when>
+		<c:when test='<%= fileEntryColumn.equals("size") %>'>
+			<liferay-ui:search-container-column-text
+				href="<%= rowHREF %>"
+				index="<%= j %>"
+				name="<%= fileEntryColumn %>"
+				value="<%= TextFormatter.formatStorageSize(latestFileVersion.getSize(), locale) %>"
+			/>
+		</c:when>
+		<c:when test='<%= fileEntryColumn.equals("tags") %>'>
+
+			<%
+			long classPK = 0;
+
+			if (!latestFileVersion.getVersion().equals(DLFileEntryConstants.VERSION_DEFAULT) && (latestFileVersion.getStatus() != WorkflowConstants.STATUS_APPROVED)) {
+				classPK = latestFileVersion.getFileVersionId();
+			}
+			else {
+				classPK = fileEntry.getFileEntryId();
+			}
+
+			List<AssetTag> assetTags = AssetTagLocalServiceUtil.getTags(DLFileEntryConstants.getClassName(), classPK);
+
+			AssetUtil.addLayoutTags(request, assetTags);
+			%>
+
+			<liferay-ui:search-container-column-text
+				href="<%= rowHREF %>"
+				index="<%= j %>"
+				name="<%= fileEntryColumn %>"
+				value="<%= ListUtil.toString(assetTags, AssetTag.NAME_ACCESSOR, StringPool.COMMA_AND_SPACE) %>"
+			/>
+		</c:when>
+	</c:choose>
+
+<%
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/file_entry_history_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/file_entry_history_action.jsp
new file mode 100644
index 0000000..e77fcfe
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/file_entry_history_action.jsp
@@ -0,0 +1,94 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+Object[] objArray = (Object[])row.getObject();
+
+FileEntry fileEntry = (FileEntry)objArray[0];
+FileVersion fileVersion = (FileVersion)objArray[1];
+%>
+
+<liferay-ui:icon-menu direction='<%= "down" %>' extended="<%= false %>" icon="<%= StringPool.BLANK %>" message="<%= StringPool.BLANK %>">
+	<liferay-ui:icon
+		image="download"
+		url="<%= DLUtil.getPreviewURL(fileEntry, fileVersion, themeDisplay, StringPool.BLANK) %>"
+	/>
+
+	<portlet:renderURL var="viewFileVersionURL">
+		<c:choose>
+			<c:when test="<%= portletName.equals(PortletKeys.TRASH) %>">
+				<portlet:param name="struts_action" value="/trash/view_content" />
+				<portlet:param name="className" value="<%= DLFileEntryConstants.getClassName() %>" />
+				<portlet:param name="classPK" value="<%= String.valueOf(fileEntry.getFileEntryId()) %>" />
+			</c:when>
+			<c:otherwise>
+				<portlet:param name="struts_action" value="/document_library/view_file_entry" />
+			</c:otherwise>
+		</c:choose>
+
+		<portlet:param name="redirect" value="<%= redirect %>" />
+		<portlet:param name="fileEntryId" value="<%= String.valueOf(fileEntry.getFileEntryId()) %>" />
+		<portlet:param name="version" value="<%= fileVersion.getVersion() %>" />
+	</portlet:renderURL>
+
+	<liferay-ui:icon
+		image="view"
+		url="<%= viewFileVersionURL %>"
+	/>
+
+	<portlet:renderURL var="viewFileEntryURL">
+		<portlet:param name="struts_action" value="/document_library/view_file_entry" />
+		<portlet:param name="redirect" value="<%= redirect %>" />
+		<portlet:param name="fileEntryId" value="<%= String.valueOf(fileEntry.getFileEntryId()) %>" />
+	</portlet:renderURL>
+
+	<c:if test="<%= (fileVersion.getStatus() != WorkflowConstants.STATUS_IN_TRASH) && DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.UPDATE) && (fileVersion.getStatus() == WorkflowConstants.STATUS_APPROVED) && !fileEntry.getLatestFileVersion().getVersion().equals(fileVersion.getVersion()) %>">
+		<portlet:actionURL var="revertURL">
+			<portlet:param name="struts_action" value="/document_library/edit_file_entry" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.REVERT %>" />
+			<portlet:param name="redirect" value="<%= viewFileEntryURL %>" />
+			<portlet:param name="fileEntryId" value="<%= String.valueOf(fileEntry.getFileEntryId()) %>" />
+			<portlet:param name="version" value="<%= String.valueOf(fileVersion.getVersion()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon
+			image="undo"
+			message="revert"
+			url="<%= revertURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= (fileVersion.getStatus() != WorkflowConstants.STATUS_IN_TRASH) && DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.DELETE) && (fileVersion.getStatus() == WorkflowConstants.STATUS_APPROVED) && (fileEntry.getModel() instanceof DLFileEntry) && (((DLFileEntry)fileEntry.getModel()).getFileVersionsCount(WorkflowConstants.STATUS_APPROVED) > 1) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/document_library/edit_file_entry" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= viewFileEntryURL %>" />
+			<portlet:param name="fileEntryId" value="<%= String.valueOf(fileEntry.getFileEntryId()) %>" />
+			<portlet:param name="version" value="<%= String.valueOf(fileVersion.getVersion()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete
+			message="delete-version"
+			url="<%= deleteURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/file_entry_type_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/file_entry_type_action.jsp
new file mode 100644
index 0000000..d7a4465
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/file_entry_type_action.jsp
@@ -0,0 +1,66 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+DLFileEntryType fileEntryType = (DLFileEntryType)row.getObject();
+%>
+
+<liferay-ui:icon-menu showExpanded="<%= false %>" showWhenSingleIcon="<%= false %>">
+	<c:if test="<%= DLFileEntryTypePermission.contains(permissionChecker, fileEntryType, ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/document_library/edit_file_entry_type" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="fileEntryTypeId" value="<%= String.valueOf(fileEntryType.getFileEntryTypeId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= DLFileEntryTypePermission.contains(permissionChecker, fileEntryType, ActionKeys.PERMISSIONS) %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= DLFileEntryType.class.getName() %>"
+			modelResourceDescription="<%= fileEntryType.getName(locale) %>"
+			resourcePrimKey="<%= String.valueOf(fileEntryType.getFileEntryTypeId()) %>"
+			var="permissionsURL"
+			windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			method="get"
+			url="<%= permissionsURL %>"
+			useDialog="<%= true %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= DLFileEntryTypePermission.contains(permissionChecker, fileEntryType, ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/document_library/edit_file_entry_type" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="fileEntryTypeId" value="<%= String.valueOf(fileEntryType.getFileEntryTypeId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete url="<%= deleteURL %>" />
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/file_entry_type_search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/file_entry_type_search.jsp
new file mode 100644
index 0000000..20d3c9b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/file_entry_type_search.jsp
@@ -0,0 +1,21 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<div class="form-search">
+	<liferay-ui:input-search placeholder='<%= LanguageUtil.get(locale, "keywords") %>' title='<%= LanguageUtil.get(locale, "search-documents") %>' />
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/file_entry_type_search_results.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/file_entry_type_search_results.jspf
new file mode 100644
index 0000000..b71b76f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/file_entry_type_search_results.jspf
@@ -0,0 +1,29 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+StructureSearchTerms searchTerms = (StructureSearchTerms)searchContainer.getSearchTerms();
+
+boolean includeBasicFileEntryType = ParamUtil.getBoolean(renderRequest, "includeBasicFileEntryType");
+
+total = DLFileEntryTypeServiceUtil.searchCount(company.getCompanyId(), PortalUtil.getSiteAndCompanyGroupIds(themeDisplay), searchTerms.getKeywords(), includeBasicFileEntryType);
+
+searchContainer.setTotal(total);
+
+results = DLFileEntryTypeServiceUtil.search(company.getCompanyId(), PortalUtil.getSiteAndCompanyGroupIds(themeDisplay), searchTerms.getKeywords(), includeBasicFileEntryType, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+
+searchContainer.setResults(results);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/file_entry_type_toolbar.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/file_entry_type_toolbar.jsp
new file mode 100644
index 0000000..e91719d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/file_entry_type_toolbar.jsp
@@ -0,0 +1,52 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+String strutsAction = ParamUtil.getString(request, "strutsAction", "/document_library/view_file_entry_type");
+
+String toolbarItem = ParamUtil.getString(request, "toolbarItem");
+%>
+
+<aui:nav-bar>
+	<aui:nav>
+		<portlet:renderURL var="viewFileEntryTypesURL">
+			<portlet:param name="struts_action" value="<%= strutsAction %>" />
+		</portlet:renderURL>
+
+		<c:if test="<%= DLPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_DOCUMENT_TYPE) %>">
+			<portlet:renderURL var="addFileEntryTypeURL">
+				<portlet:param name="struts_action" value="/document_library/edit_file_entry_type" />
+				<portlet:param name="redirect" value="<%= viewFileEntryTypesURL %>" />
+			</portlet:renderURL>
+
+			<aui:nav-item href="<%= addFileEntryTypeURL %>" iconCssClass="icon-plus" label="add" selected='<%= toolbarItem.equals("add") %>' />
+		</c:if>
+	</aui:nav>
+
+	<aui:nav-bar-search cssClass="pull-right">
+		<div class="form-search">
+			<liferay-portlet:renderURL varImpl="searchURL">
+				<portlet:param name="struts_action" value="<%= strutsAction %>" />
+			</liferay-portlet:renderURL>
+
+			<aui:form action="<%= searchURL.toString() %>" method="post" name="fm">
+				<liferay-ui:input-search />
+			</aui:form>
+		</div>
+	</aui:nav-bar-search>
+</aui:nav-bar>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/folder_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/folder_action.jsp
new file mode 100644
index 0000000..4e1e199
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/folder_action.jsp
@@ -0,0 +1,524 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+String randomNamespace = null;
+
+if (portletName.equals(PortletKeys.DOCUMENT_LIBRARY)) {
+	randomNamespace = PortalUtil.generateRandomKey(request, "portlet_document_library_folder_action") + StringPool.UNDERLINE;
+}
+else if (portletName.equals(PortletKeys.DOCUMENT_LIBRARY_DISPLAY)) {
+	randomNamespace = PortalUtil.generateRandomKey(request, "portlet_document_library_display_folder_action") + StringPool.UNDERLINE;
+}
+else {
+	randomNamespace = PortalUtil.generateRandomKey(request, "portlet_image_gallery_display_folder_action") + StringPool.UNDERLINE;
+}
+
+String redirect = currentURL;
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+Folder folder = null;
+
+long folderId = 0;
+
+long repositoryId = 0;
+
+if (row != null) {
+	Object result = row.getObject();
+
+	if (result instanceof Folder) {
+		folder = (Folder)result;
+
+		folderId = folder.getFolderId();
+
+		repositoryId = folder.getRepositoryId();
+	}
+}
+else {
+	if (portletName.equals(PortletKeys.DOCUMENT_LIBRARY_DISPLAY) || portletName.equals(PortletKeys.MEDIA_GALLERY_DISPLAY)) {
+		folder = (Folder)request.getAttribute("view.jsp-folder");
+
+		folderId = GetterUtil.getLong((String)request.getAttribute("view.jsp-folderId"));
+
+		repositoryId = GetterUtil.getLong((String)request.getAttribute("view.jsp-repositoryId"));
+	}
+	else {
+		folder = (Folder)request.getAttribute("view_entries.jsp-folder");
+
+		folderId = GetterUtil.getLong((String)request.getAttribute("view_entries.jsp-folderId"));
+
+		repositoryId = GetterUtil.getLong((String)request.getAttribute("view_entries.jsp-repositoryId"));
+	}
+}
+
+int status = WorkflowConstants.STATUS_APPROVED;
+
+if (permissionChecker.isCompanyAdmin() || permissionChecker.isGroupAdmin(scopeGroupId)) {
+	status = WorkflowConstants.STATUS_ANY;
+}
+
+boolean folderSelected = GetterUtil.getBoolean((String)request.getAttribute("view_entries.jsp-folderSelected"));
+
+String modelResource = null;
+String modelResourceDescription = null;
+String resourcePrimKey = null;
+
+boolean showPermissionsURL = false;
+
+if (folder != null) {
+	modelResource = DLFolderConstants.getClassName();
+	modelResourceDescription = folder.getName();
+	resourcePrimKey = String.valueOf(folderId);
+
+	showPermissionsURL = DLFolderPermission.contains(permissionChecker, folder, ActionKeys.PERMISSIONS);
+}
+else {
+	modelResource = "com.liferay.portlet.documentlibrary";
+	modelResourceDescription = themeDisplay.getScopeGroupName();
+	resourcePrimKey = String.valueOf(scopeGroupId);
+
+	showPermissionsURL = DLPermission.contains(permissionChecker, scopeGroupId, ActionKeys.PERMISSIONS);
+}
+
+boolean showWhenSingleIcon = false;
+
+if ((row == null) || portletId.equals(PortletKeys.DOCUMENT_LIBRARY)) {
+	showWhenSingleIcon = true;
+}
+
+boolean view = false;
+
+if ((row == null) && ((portletName.equals(PortletKeys.DOCUMENT_LIBRARY_DISPLAY) && !showMinimalActionButtons) || portletName.equals(PortletKeys.MEDIA_GALLERY_DISPLAY))) {
+	view = true;
+}
+
+String iconMenuId = null;
+%>
+
+<liferay-util:buffer var="iconMenu">
+	<liferay-ui:icon-menu direction='<%= showMinimalActionButtons ? "down" : "left" %>' extended="<%= showMinimalActionButtons ? false : true %>" icon="<%= showMinimalActionButtons ? StringPool.BLANK : null %>" message='<%= showMinimalActionButtons ? StringPool.BLANK : "actions" %>' showExpanded="<%= view %>" showWhenSingleIcon="<%= showWhenSingleIcon %>" triggerCssClass="btn">
+		<c:if test="<%= showActions %>">
+			<c:choose>
+				<c:when test="<%= folder != null %>">
+
+					<%
+					boolean hasDeletePermission = DLFolderPermission.contains(permissionChecker, scopeGroupId, folderId, ActionKeys.DELETE);
+					boolean hasUpdatePermission = DLFolderPermission.contains(permissionChecker, scopeGroupId, folderId, ActionKeys.UPDATE);
+					%>
+
+					<c:if test="<%= hasUpdatePermission && !folder.isMountPoint() %>">
+						<portlet:renderURL var="editURL">
+							<portlet:param name="struts_action" value="/document_library/edit_folder" />
+							<portlet:param name="redirect" value="<%= redirect %>" />
+							<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+							<portlet:param name="repositoryId" value="<%= String.valueOf(repositoryId) %>" />
+						</portlet:renderURL>
+
+						<liferay-ui:icon
+							image="edit"
+							url="<%= editURL %>"
+						/>
+					</c:if>
+
+					<c:if test="<%= hasUpdatePermission && folder.isMountPoint() %>">
+						<portlet:renderURL var="editURL">
+							<portlet:param name="struts_action" value="/document_library/edit_repository" />
+							<portlet:param name="redirect" value="<%= redirect %>" />
+							<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+							<portlet:param name="repositoryId" value="<%= String.valueOf(repositoryId) %>" />
+						</portlet:renderURL>
+
+						<liferay-ui:icon
+							image="edit"
+							url="<%= editURL %>"
+						/>
+					</c:if>
+
+					<c:if test="<%= hasUpdatePermission && !folder.isMountPoint() %>">
+						<portlet:renderURL var="moveURL">
+							<portlet:param name="struts_action" value="/document_library/move_folder" />
+							<portlet:param name="redirect" value="<%= redirect %>" />
+							<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+							<portlet:param name="repositoryId" value="<%= String.valueOf(repositoryId) %>" />
+						</portlet:renderURL>
+
+						<liferay-ui:icon
+							image="submit"
+							message="move"
+							url="<%= moveURL %>"
+						/>
+					</c:if>
+
+					<c:if test="<%= showPermissionsURL %>">
+						<liferay-security:permissionsURL
+							modelResource="<%= modelResource %>"
+							modelResourceDescription="<%= HtmlUtil.escape(modelResourceDescription) %>"
+							redirect="<%= currentURL %>"
+							resourcePrimKey="<%= resourcePrimKey %>"
+							var="permissionsURL"
+							windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+						/>
+
+						<liferay-ui:icon
+							image="permissions"
+							method="get"
+							url="<%= permissionsURL %>"
+							useDialog="<%= true %>"
+						/>
+					</c:if>
+
+					<c:if test="<%= hasDeletePermission && !folder.isMountPoint() %>">
+						<portlet:renderURL var="redirectURL">
+							<portlet:param name="struts_action" value="/document_library/view" />
+							<portlet:param name="folderId" value="<%= String.valueOf(folder.getParentFolderId()) %>" />
+						</portlet:renderURL>
+
+						<portlet:actionURL var="deleteURL">
+							<portlet:param name="struts_action" value="/document_library/edit_folder" />
+							<portlet:param name="<%= Constants.CMD %>" value="<%= ((folder.getModel() instanceof DLFolder) && TrashUtil.isTrashEnabled(scopeGroupId)) ? Constants.MOVE_TO_TRASH : Constants.DELETE %>" />
+							<portlet:param name="redirect" value="<%= (view || folderSelected) ? redirectURL : redirect %>" />
+							<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+						</portlet:actionURL>
+
+						<liferay-ui:icon-delete trash="<%= ((folder.getModel() instanceof DLFolder) && TrashUtil.isTrashEnabled(scopeGroupId)) %>" url="<%= deleteURL %>" />
+					</c:if>
+
+					<c:if test="<%= hasDeletePermission && folder.isMountPoint() %>">
+						<portlet:renderURL var="redirectURL">
+							<portlet:param name="struts_action" value="/document_library/view" />
+							<portlet:param name="folderId" value="<%= String.valueOf(folder.getParentFolderId()) %>" />
+						</portlet:renderURL>
+
+						<portlet:actionURL var="deleteURL">
+							<portlet:param name="struts_action" value="/document_library/edit_repository" />
+							<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+							<portlet:param name="redirect" value="<%= (view || folderSelected) ? redirectURL : redirect %>" />
+							<portlet:param name="repositoryId" value="<%= String.valueOf(repositoryId) %>" />
+						</portlet:actionURL>
+
+						<liferay-ui:icon-delete url="<%= deleteURL %>" />
+					</c:if>
+
+					<c:if test="<%= DLFolderPermission.contains(permissionChecker, scopeGroupId, folderId, ActionKeys.ADD_FOLDER) %>">
+						<portlet:renderURL var="addFolderURL">
+							<portlet:param name="struts_action" value="/document_library/edit_folder" />
+							<portlet:param name="redirect" value="<%= currentURL %>" />
+							<portlet:param name="parentFolderId" value="<%= String.valueOf(folderId) %>" />
+							<portlet:param name="repositoryId" value="<%= String.valueOf(repositoryId) %>" />
+						</portlet:renderURL>
+
+						<liferay-ui:icon
+							image="add_folder"
+							message='<%= (folder != null) ? "add-subfolder" : "add-folder" %>'
+							url="<%= addFolderURL %>"
+						/>
+					</c:if>
+				</c:when>
+				<c:otherwise>
+
+					<%
+					boolean workflowEnabled = WorkflowEngineManagerUtil.isDeployed() && (WorkflowHandlerRegistryUtil.getWorkflowHandler(DLFileEntry.class.getName()) != null);
+					%>
+
+					<c:if test="<%= workflowEnabled && DLFolderPermission.contains(permissionChecker, scopeGroupId, folderId, ActionKeys.UPDATE) %>">
+						<portlet:renderURL var="editURL">
+							<portlet:param name="struts_action" value="/document_library/edit_folder" />
+							<portlet:param name="redirect" value="<%= redirect %>" />
+							<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+							<portlet:param name="repositoryId" value="<%= String.valueOf(repositoryId) %>" />
+							<portlet:param name="rootFolder" value="true" />
+						</portlet:renderURL>
+
+						<liferay-ui:icon
+							image="edit"
+							url="<%= editURL %>"
+						/>
+					</c:if>
+
+					<c:if test="<%= showPermissionsURL %>">
+						<liferay-security:permissionsURL
+							modelResource="<%= modelResource %>"
+							modelResourceDescription="<%= HtmlUtil.escape(modelResourceDescription) %>"
+							redirect="<%= currentURL %>"
+							resourcePrimKey="<%= resourcePrimKey %>"
+							var="permissionsURL"
+						/>
+
+						<liferay-ui:icon
+							image="permissions"
+							url="<%= permissionsURL %>"
+						/>
+					</c:if>
+
+					<c:if test="<%= DLFolderPermission.contains(permissionChecker, scopeGroupId, folderId, ActionKeys.ADD_FOLDER) %>">
+						<portlet:renderURL var="addFolderURL">
+							<portlet:param name="struts_action" value="/document_library/edit_folder" />
+							<portlet:param name="redirect" value="<%= currentURL %>" />
+							<portlet:param name="parentFolderId" value="<%= String.valueOf(folderId) %>" />
+							<portlet:param name="repositoryId" value="<%= String.valueOf(repositoryId) %>" />
+						</portlet:renderURL>
+
+						<liferay-ui:icon
+							image="add_folder"
+							message='<%= (folder != null) ? "add-subfolder" : "add-folder" %>'
+							url="<%= addFolderURL %>"
+						/>
+					</c:if>
+
+					<c:if test="<%= DLFolderPermission.contains(permissionChecker, scopeGroupId, folderId, ActionKeys.ADD_REPOSITORY) %>">
+						<portlet:renderURL var="addRepositoryURL">
+							<portlet:param name="struts_action" value="/document_library/edit_repository" />
+							<portlet:param name="redirect" value="<%= currentURL %>" />
+							<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+						</portlet:renderURL>
+
+						<liferay-ui:icon
+							image="add_drive"
+							message="add-repository"
+							url="<%= addRepositoryURL %>"
+						/>
+					</c:if>
+				</c:otherwise>
+			</c:choose>
+		</c:if>
+
+		<%
+		boolean hasViewPermission = DLFolderPermission.contains(permissionChecker, scopeGroupId, folderId, ActionKeys.VIEW);
+		%>
+
+		<c:choose>
+			<c:when test="<%= portletName.equals(PortletKeys.DOCUMENT_LIBRARY_DISPLAY) || portletName.equals(PortletKeys.MEDIA_GALLERY_DISPLAY) %>">
+				<c:if test="<%= showActions && DLFolderPermission.contains(permissionChecker, scopeGroupId, folderId, ActionKeys.ADD_DOCUMENT) %>">
+					<c:if test="<%= ((folder == null) || folder.isSupportsMultipleUpload()) %>">
+						<portlet:renderURL var="editFileEntryURL">
+							<portlet:param name="struts_action" value="/document_library/upload_multiple_file_entries" />
+							<portlet:param name="redirect" value="<%= currentURL %>" />
+							<portlet:param name="backURL" value="<%= currentURL %>" />
+							<portlet:param name="repositoryId" value="<%= String.valueOf(repositoryId) %>" />
+							<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+						</portlet:renderURL>
+
+						<liferay-ui:icon
+							cssClass="hide upload-multiple-documents"
+							image="../document_library/add_multiple_documents"
+							message='<%= portletName.equals(PortletKeys.MEDIA_GALLERY_DISPLAY) ? "multiple-media" : "multiple-documents" %>'
+							url="<%= editFileEntryURL %>"
+						/>
+					</c:if>
+
+					<%
+					int fileEntryTypesCount = DLFileEntryTypeServiceUtil.getFileEntryTypesCount(PortalUtil.getSiteAndCompanyGroupIds(themeDisplay));
+					%>
+
+					<liferay-portlet:renderURL var="editFileEntryURL" windowState="<%= (((folder == null) || folder.isSupportsMetadata()) && (fileEntryTypesCount > 0)) ? LiferayWindowState.POP_UP.toString() : WindowState.NORMAL.toString() %>">
+						<portlet:param name="struts_action" value='<%= (((folder == null) || folder.isSupportsMetadata()) && (fileEntryTypesCount > 0)) ? "/document_library_display/select_add_file_entry_type" : "/document_library_display/edit_file_entry" %>' />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+						<portlet:param name="backURL" value="<%= currentURL %>" />
+						<portlet:param name="repositoryId" value="<%= String.valueOf(repositoryId) %>" />
+						<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+					</liferay-portlet:renderURL>
+
+					<%
+					String taglibEditURL = "javascript:Liferay.Util.openWindow({id: '" + renderResponse.getNamespace() + "selectFileEntryType', title: '" + UnicodeLanguageUtil.get(pageContext, portletName.equals(PortletKeys.MEDIA_GALLERY_DISPLAY) ? "select-media-type" : "select-document-type") + "', uri:'" + HtmlUtil.escapeURL(editFileEntryURL.toString()) + "'});";
+					%>
+
+					<liferay-ui:icon
+						image="../document_library/add_document"
+						message='<%= portletName.equals(PortletKeys.MEDIA_GALLERY_DISPLAY) ? "add-media" : "add-document" %>'
+						url="<%= (((folder == null) || folder.isSupportsMetadata()) && (fileEntryTypesCount > 0)) ? taglibEditURL : editFileEntryURL %>"
+					/>
+				</c:if>
+
+				<c:if test="<%= hasViewPermission && portletName.equals(PortletKeys.MEDIA_GALLERY_DISPLAY) && (DLAppServiceUtil.getFileEntriesAndFileShortcutsCount(repositoryId, folderId, status) > 0) %>">
+					<liferay-ui:icon
+						cssClass='<%= randomNamespace + "-slide-show" %>'
+						image="../image_gallery_display/slide_show"
+						message="view-slide-show"
+						url="javascript:;"
+					/>
+				</c:if>
+
+				<c:if test="<%= showActions && ((folder == null) || folder.isSupportsShortcuts()) && DLFolderPermission.contains(permissionChecker, scopeGroupId, folderId, ActionKeys.ADD_SHORTCUT) %>">
+					<portlet:renderURL var="editFileShortcutURL">
+						<portlet:param name="struts_action" value="/document_library_display/edit_file_shortcut" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+						<portlet:param name="repositoryId" value="<%= String.valueOf(repositoryId) %>" />
+						<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+					</portlet:renderURL>
+
+					<liferay-ui:icon
+						image="add_instance"
+						message="add-shortcut"
+						url="<%= editFileShortcutURL %>"
+					/>
+				</c:if>
+			</c:when>
+			<c:when test="<%= portletName.equals(PortletKeys.TRASH) %>">
+
+				<%
+				boolean hasUpdatePermission = DLFolderPermission.contains(permissionChecker, scopeGroupId, folderId, ActionKeys.UPDATE);
+				%>
+
+				<c:if test="<%= hasUpdatePermission && !folder.isMountPoint() %>">
+					<liferay-portlet:renderURL portletName="<%= PortletKeys.DOCUMENT_LIBRARY %>" var="moveURL">
+						<portlet:param name="struts_action" value="/document_library/move_folder" />
+						<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.MOVE_FROM_TRASH %>" />
+						<portlet:param name="redirect" value="<%= redirect %>" />
+						<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+						<portlet:param name="parentFolderId" value="<%= String.valueOf(DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) %>" />
+						<portlet:param name="repositoryId" value="<%= String.valueOf(repositoryId) %>" />
+					</liferay-portlet:renderURL>
+
+					<liferay-ui:icon
+						image="submit"
+						message="move"
+						url="<%= moveURL %>"
+					/>
+				</c:if>
+			</c:when>
+		</c:choose>
+
+		<c:if test="<%= hasViewPermission && portletDisplay.isWebDAVEnabled() && ((folder == null) || (folder.getRepositoryId() == scopeGroupId)) %>">
+
+			<%
+			iconMenuId = GetterUtil.getString((String)request.getAttribute("liferay-ui:icon-menu:id"));
+			%>
+
+			<liferay-ui:icon
+				cssClass='<%= randomNamespace + "-webdav-action" %>'
+				image="desktop"
+				message="access-from-desktop"
+				url="javascript:;"
+			/>
+		</c:if>
+	</liferay-ui:icon-menu>
+</liferay-util:buffer>
+
+<c:choose>
+	<c:when test="<%= (portletName.equals(PortletKeys.DOCUMENT_LIBRARY_DISPLAY) || portletName.equals(PortletKeys.MEDIA_GALLERY_DISPLAY)) && !showMinimalActionButtons %>">
+
+		<%= iconMenu %>
+
+	</c:when>
+	<c:otherwise>
+		<span class="entry-action overlay">
+
+			<%= iconMenu %>
+
+		</span>
+	</c:otherwise>
+</c:choose>
+
+<div id="<%= randomNamespace %>webDav" style="display: none;">
+	<div class="portlet-document-library">
+
+		<%
+		String webDavHelpMessage = null;
+
+		if (BrowserSnifferUtil.isWindows(request)) {
+			webDavHelpMessage = LanguageUtil.format(pageContext, "webdav-windows-help", new Object[] {"http://www.microsoft.com/downloads/details.aspx?FamilyId=17C36612-632E-4C04-9382-987622ED1D64", "http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/WebDAV"});
+		}
+		else {
+			webDavHelpMessage = LanguageUtil.format(pageContext, "webdav-help", "http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/WebDAV");
+		}
+		%>
+
+		<liferay-ui:message key="<%= webDavHelpMessage %>" />
+
+		<br /><br />
+
+		<div class="file-entry-field">
+			<label><liferay-ui:message key="webdav-url" /></label>
+
+			<liferay-ui:input-resource
+				cssClass="webdav-url-resource"
+				url="<%= DLUtil.getWebDavURL(themeDisplay, folder, null) %>"
+			/>
+		</div>
+	</div>
+</div>
+
+<portlet:renderURL var="viewSlideShowURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+	<portlet:param name="struts_action" value="/image_gallery_display/view_slide_show" />
+	<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+</portlet:renderURL>
+
+<aui:script use="uploader,liferay-util-window">
+	if (!A.UA.ios && (A.Uploader.TYPE != 'none')) {
+		var uploadMultipleDocumentsIcon = A.all('.upload-multiple-documents:hidden');
+
+		uploadMultipleDocumentsIcon.show();
+	}
+
+	var slideShow = A.one('.<%= randomNamespace %>-slide-show');
+
+	if (slideShow) {
+		slideShow.on(
+			'click',
+			function(event) {
+				var slideShowWindow = window.open('<%= viewSlideShowURL %>', 'slideShow', 'directories=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no');
+
+				slideShowWindow.focus();
+			}
+		);
+	}
+
+	var webdavAction = A.one('.<%= randomNamespace %>-webdav-action');
+
+	if (webdavAction) {
+		webdavAction.on(
+			'click',
+			function(event) {
+				event.preventDefault();
+
+				var webdavDialog = Liferay.Util.Window.getWindow(
+					{
+						dialog: {
+							bodyContent: A.one('#<%= randomNamespace %>webDav').html(),
+							destroyOnHide: true
+						},
+						title: '<%= UnicodeLanguageUtil.get(pageContext, "access-from-desktop") %>'
+					}
+				);
+
+				webdavDialog.after(
+					'render',
+					function(event) {
+						var webdavURLInput = webdavDialog.get('boundingBox').one('.webdav-url-resource');
+
+						webdavURLInput.focus();
+					}
+				);
+
+				webdavDialog.on(
+					'close',
+					function(event) {
+						var trigger = A.one('#<portlet:namespace /><%= iconMenuId %>Button');
+
+						if (trigger) {
+							trigger.focus();
+						}
+					}
+				);
+
+				webdavDialog.render();
+			}
+		);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/folder_columns.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/folder_columns.jspf
new file mode 100644
index 0000000..1d93460
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/folder_columns.jspf
@@ -0,0 +1,204 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+int curFoldersCount = 0;
+int curFileEntriesCount = 0;
+
+boolean repositoryAccess = true;
+
+try {
+	curFoldersCount = DLAppServiceUtil.getFoldersCount(curFolder.getRepositoryId(), curFolder.getFolderId());
+	curFileEntriesCount = DLAppServiceUtil.getFileEntriesAndFileShortcutsCount(curFolder.getRepositoryId(), curFolder.getFolderId(), status);
+}
+catch (RepositoryException re) {
+	_log.error(re.getMessage());
+}
+catch (Exception e) {
+	repositoryAccess = false;
+
+	row.setClassName("repository-error");
+}
+
+for (int j = 0; j < folderColumns.length; j++) {
+	String folderColumn = folderColumns[j];
+%>
+
+	<c:choose>
+		<c:when test='<%= folderColumn.equals("action") && showActions %>'>
+
+			<%
+			String align = SearchEntry.DEFAULT_ALIGN;
+
+			if ((j + 1) == folderColumns.length) {
+				align = "right";
+			}
+			%>
+
+			<liferay-ui:search-container-column-jsp
+				align="<%= align %>"
+				path="/html/portlet/document_library/folder_action.jsp"
+			/>
+		</c:when>
+		<c:when test='<%= folderColumn.equals("downloads") %>'>
+			<liferay-ui:search-container-column-text
+				name="<%= folderColumn %>"
+				value="--"
+			/>
+		</c:when>
+		<c:when test='<%= folderColumn.equals("folder") || folderColumn.equals("name") %>'>
+			<liferay-ui:search-container-column-text
+				buffer="buffer"
+				href="<%= repositoryAccess ? rowURL : null %>"
+				name="<%= folderColumn %>"
+			>
+
+				<%
+				if (repositoryAccess) {
+					buffer.append("<a href=\"");
+					buffer.append(rowURL);
+					buffer.append("\">");
+				}
+
+				buffer.append("<img align=\"left\" border=\"0\" src=\"");
+				buffer.append(themeDisplay.getPathThemeImages());
+
+				if (curFolder.isMountPoint()) {
+					buffer.append(repositoryAccess ? "/common/drive.png\">" : "/common/drive_error.png\">");
+				}
+				else {
+					if ((curFoldersCount + curFileEntriesCount) > 0) {
+						buffer.append("/common/folder_full_document.png\">");
+					}
+					else {
+						buffer.append("/common/folder_empty.png\">");
+					}
+				}
+
+				if (!repositoryAccess) {
+					buffer.append("<span title=\"");
+					buffer.append(LanguageUtil.get(pageContext, "an-unexpected-error-occurred-while-connecting-to-the-repository"));
+					buffer.append("\">");
+				}
+
+				buffer.append("<strong>");
+				buffer.append(curFolder.getName());
+				buffer.append("</strong>");
+
+				if (!repositoryAccess) {
+					buffer.append("</span>");
+				}
+
+				if (Validator.isNotNull(curFolder.getDescription())) {
+					buffer.append("<br />");
+					buffer.append(curFolder.getDescription());
+				}
+
+				if (repositoryAccess) {
+					buffer.append("</a>");
+				}
+
+				if (showSubfolders) {
+					List subfolders = new ArrayList();
+
+					try {
+						subfolders = DLAppServiceUtil.getFolders(curFolder.getRepositoryId(), curFolder.getFolderId(), 0, 5);
+					}
+					catch (Exception e) {
+					}
+
+					if (!subfolders.isEmpty()) {
+						buffer.append("<br /><u>");
+						buffer.append(LanguageUtil.get(pageContext, "subfolders"));
+						buffer.append("</u>: ");
+
+						for (int k = 0; k < subfolders.size(); k++) {
+							Folder subfolder = (Folder)subfolders.get(k);
+
+							rowURL.setParameter("folderId", String.valueOf(subfolder.getFolderId()));
+
+							buffer.append("<a href=\"");
+							buffer.append(rowURL);
+							buffer.append("\">");
+							buffer.append(subfolder.getName());
+							buffer.append("</a>");
+
+							if ((k + 1) < subfolders.size()) {
+								buffer.append(", ");
+							}
+						}
+
+						if (curFoldersCount > subfolders.size()) {
+							rowURL.setParameter("folderId", String.valueOf(curFolder.getFolderId()));
+
+							buffer.append(", <a href=\"");
+							buffer.append(rowURL);
+							buffer.append("\">");
+							buffer.append(LanguageUtil.get(pageContext, "more"));
+							buffer.append(" &raquo;");
+							buffer.append("</a>");
+						}
+
+						rowURL.setParameter("folderId", String.valueOf(curFolder.getFolderId()));
+					}
+				}
+				%>
+
+			</liferay-ui:search-container-column-text>
+		</c:when>
+		<c:when test='<%= folderColumn.equals("locked") %>'>
+
+			<%
+			boolean isLocked = curFolder.isLocked();
+			%>
+
+			<liferay-ui:search-container-column-text
+				href="<%= repositoryAccess ? rowURL : null %>"
+				name="<%= folderColumn %>"
+				value='<%= LanguageUtil.get(pageContext, isLocked ? "yes" : "no") %>'
+			/>
+		</c:when>
+		<c:when test='<%= folderColumn.equals("num-of-documents") %>'>
+			<liferay-ui:search-container-column-text
+				href="<%= repositoryAccess ? rowURL : null %>"
+				name="<%= folderColumn %>"
+				value="<%= String.valueOf(curFileEntriesCount) %>"
+			/>
+		</c:when>
+		<c:when test='<%= folderColumn.equals("num-of-folders") %>'>
+			<liferay-ui:search-container-column-text
+				href="<%= repositoryAccess ? rowURL : null %>"
+				name="<%= folderColumn %>"
+				value="<%= String.valueOf(curFoldersCount) %>"
+			/>
+		</c:when>
+		<c:when test='<%= folderColumn.equals("size") %>'>
+			<liferay-ui:search-container-column-text
+				name="<%= folderColumn %>"
+				value="--"
+			/>
+		</c:when>
+		<c:when test='<%= folderColumn.equals("tags") %>'>
+			<liferay-ui:search-container-column-text
+				name="<%= folderColumn %>"
+				value="--"
+			/>
+		</c:when>
+	</c:choose>
+
+<%
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/init.jsp
new file mode 100644
index 0000000..ab68fed
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/init.jsp
@@ -0,0 +1,165 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.DuplicateLockException" %><%@
+page import="com.liferay.portal.InvalidRepositoryException" %><%@
+page import="com.liferay.portal.NoSuchRepositoryException" %><%@
+page import="com.liferay.portal.NoSuchWorkflowDefinitionLinkException" %><%@
+page import="com.liferay.portal.kernel.repository.RepositoryException" %><%@
+page import="com.liferay.portal.kernel.repository.model.Folder" %><%@
+page import="com.liferay.portal.kernel.search.Document" %><%@
+page import="com.liferay.portal.kernel.search.SearchResult" %><%@
+page import="com.liferay.portal.repository.util.RepositoryFactoryUtil" %><%@
+page import="com.liferay.portlet.documentlibrary.DuplicateFileEntryTypeException" %><%@
+page import="com.liferay.portlet.documentlibrary.DuplicateFileException" %><%@
+page import="com.liferay.portlet.documentlibrary.DuplicateFolderNameException" %><%@
+page import="com.liferay.portlet.documentlibrary.DuplicateRepositoryNameException" %><%@
+page import="com.liferay.portlet.documentlibrary.FileExtensionException" %><%@
+page import="com.liferay.portlet.documentlibrary.FileMimeTypeException" %><%@
+page import="com.liferay.portlet.documentlibrary.FileNameException" %><%@
+page import="com.liferay.portlet.documentlibrary.FileShortcutPermissionException" %><%@
+page import="com.liferay.portlet.documentlibrary.FolderNameException" %><%@
+page import="com.liferay.portlet.documentlibrary.InvalidFileVersionException" %><%@
+page import="com.liferay.portlet.documentlibrary.NoSuchDirectoryException" %><%@
+page import="com.liferay.portlet.documentlibrary.NoSuchFileEntryException" %><%@
+page import="com.liferay.portlet.documentlibrary.NoSuchFileException" %><%@
+page import="com.liferay.portlet.documentlibrary.NoSuchFolderException" %><%@
+page import="com.liferay.portlet.documentlibrary.NoSuchMetadataSetException" %><%@
+page import="com.liferay.portlet.documentlibrary.RepositoryNameException" %><%@
+page import="com.liferay.portlet.documentlibrary.SourceFileNameException" %><%@
+page import="com.liferay.portlet.documentlibrary.action.EditFileEntryAction" %><%@
+page import="com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata" %><%@
+page import="com.liferay.portlet.documentlibrary.model.DLFileEntryType" %><%@
+page import="com.liferay.portlet.documentlibrary.model.DLFileEntryTypeConstants" %><%@
+page import="com.liferay.portlet.documentlibrary.model.DLFileShortcut" %><%@
+page import="com.liferay.portlet.documentlibrary.model.DLFileVersion" %><%@
+page import="com.liferay.portlet.documentlibrary.model.DLFolder" %><%@
+page import="com.liferay.portlet.documentlibrary.model.DLFolderConstants" %><%@
+page import="com.liferay.portlet.documentlibrary.model.DLSearchConstants" %><%@
+page import="com.liferay.portlet.documentlibrary.search.EntriesChecker" %><%@
+page import="com.liferay.portlet.documentlibrary.service.DLAppServiceUtil" %><%@
+page import="com.liferay.portlet.documentlibrary.service.DLFileEntryMetadataLocalServiceUtil" %><%@
+page import="com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalServiceUtil" %><%@
+page import="com.liferay.portlet.documentlibrary.service.DLFileEntryTypeServiceUtil" %><%@
+page import="com.liferay.portlet.documentlibrary.service.permission.DLFileEntryPermission" %><%@
+page import="com.liferay.portlet.documentlibrary.service.permission.DLFileEntryTypePermission" %><%@
+page import="com.liferay.portlet.documentlibrary.service.permission.DLFileShortcutPermission" %><%@
+page import="com.liferay.portlet.documentlibrary.service.permission.DLFolderPermission" %><%@
+page import="com.liferay.portlet.documentlibrary.service.permission.DLPermission" %><%@
+page import="com.liferay.portlet.documentlibrary.util.AudioProcessorUtil" %><%@
+page import="com.liferay.portlet.documentlibrary.util.DLProcessorRegistryUtil" %><%@
+page import="com.liferay.portlet.documentlibrary.util.ImageProcessorUtil" %><%@
+page import="com.liferay.portlet.documentlibrary.util.PDFProcessorUtil" %><%@
+page import="com.liferay.portlet.documentlibrary.util.RawMetadataProcessor" %><%@
+page import="com.liferay.portlet.documentlibrary.util.VideoProcessorUtil" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.RequiredStructureException" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.StorageFieldRequiredException" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.StructureDuplicateElementException" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.StructureNameException" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.search.StructureSearch" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.search.StructureSearchTerms" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.service.DDMStorageLinkLocalServiceUtil" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.storage.Fields" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.storage.StorageEngineUtil" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.util.DDMXSDUtil" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.util.comparator.StructureStructureKeyComparator" %><%@
+page import="com.liferay.portlet.journal.search.FileEntryDisplayTerms" %><%@
+page import="com.liferay.portlet.journal.search.FileEntrySearch" %>
+
+<%
+PortalPreferences portalPreferences = PortletPreferencesFactoryUtil.getPortalPreferences(liferayPortletRequest);
+
+String portletResource = ParamUtil.getString(request, "portletResource");
+
+int entriesPerPage = PrefsParamUtil.getInteger(portletPreferences, request, "entriesPerPage", SearchContainer.DEFAULT_DELTA);
+
+String[] displayViews = StringUtil.split(PrefsParamUtil.getString(portletPreferences, request, "displayViews", StringUtil.merge(PropsValues.DL_DISPLAY_VIEWS)));
+
+long rootFolderId = PrefsParamUtil.getLong(portletPreferences, request, "rootFolderId", DLFolderConstants.DEFAULT_PARENT_FOLDER_ID);
+
+String rootFolderName = StringPool.BLANK;
+
+if (rootFolderId != DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) {
+	try {
+		Folder rootFolder = DLAppLocalServiceUtil.getFolder(rootFolderId);
+
+		rootFolderName = rootFolder.getName();
+	}
+	catch (NoSuchFolderException nsfe) {
+	}
+}
+
+boolean showFoldersSearch = PrefsParamUtil.getBoolean(portletPreferences, request, "showFoldersSearch", true);
+
+String portletId = portletDisplay.getId();
+
+if (portletId.equals(PortletKeys.PORTLET_CONFIGURATION)) {
+	portletId = portletResource;
+	portletName = portletResource;
+}
+
+boolean showActions = PrefsParamUtil.getBoolean(portletPreferences, request, "showActions");
+boolean showAssetMetadata = ParamUtil.getBoolean(request, "showAssetMetadata");
+boolean showAddFolderButton = false;
+boolean showFolderMenu = PrefsParamUtil.getBoolean(portletPreferences, request, "showFolderMenu");
+boolean showHeader = ParamUtil.getBoolean(request, "showHeader", true);
+boolean showMinimalActionButtons = ParamUtil.getBoolean(request, "showMinimalActionButtons");
+boolean showTabs = PrefsParamUtil.getBoolean(portletPreferences, request, "showTabs");
+
+if (portletName.equals(PortletKeys.DOCUMENT_LIBRARY)) {
+	showActions = true;
+	showAssetMetadata = true;
+	showAddFolderButton = true;
+	showFolderMenu = true;
+	showTabs = true;
+	showMinimalActionButtons = true;
+}
+else if (portletName.equals(PortletKeys.MEDIA_GALLERY_DISPLAY) || portletName.equals(PortletKeys.DOCUMENT_LIBRARY_DISPLAY) || portletName.equals(PortletKeys.TRASH)) {
+	showAssetMetadata = true;
+}
+
+boolean enableRelatedAssets = GetterUtil.getBoolean(portletPreferences.getValue("enableRelatedAssets", null), true);
+
+String defaultEntryColumns = "name,size,status";
+
+if (PropsValues.DL_FILE_ENTRY_BUFFERED_INCREMENT_ENABLED) {
+	defaultEntryColumns += ",downloads";
+}
+
+if (showActions) {
+	defaultEntryColumns += ",action";
+}
+
+String allEntryColumns = defaultEntryColumns + ",modified-date,create-date";
+
+String[] entryColumns = StringUtil.split(PrefsParamUtil.getString(portletPreferences, request, "entryColumns", defaultEntryColumns));
+
+if (!showActions) {
+	entryColumns = ArrayUtil.remove(entryColumns, "action");
+}
+else if (!portletId.equals(PortletKeys.DOCUMENT_LIBRARY) && !ArrayUtil.contains(entryColumns, "action")) {
+	entryColumns = ArrayUtil.append(entryColumns, "action");
+}
+
+boolean enableRatings = GetterUtil.getBoolean(portletPreferences.getValue("enableRatings", null), true);
+boolean enableCommentRatings = GetterUtil.getBoolean(portletPreferences.getValue("enableCommentRatings", null), true);
+
+Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(locale, timeZone);
+%>
+
+<%@ include file="/html/portlet/document_library/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/js/main.js b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/js/main.js
new file mode 100644
index 0000000..1c89f2f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/js/main.js
@@ -0,0 +1,622 @@
+AUI.add(
+	'liferay-document-library',
+	function(A) {
+		var AObject = A.Object;
+		var Lang = A.Lang;
+		var History = Liferay.HistoryManager;
+
+		var IE = A.UA.ie;
+
+		var CSS_SYNC_MESSAGE_HIDDEN = 'sync-message-hidden';
+
+		var DEFAULT_FOLDER_ID = 0;
+
+		var DISPLAY_STYLE_TOOLBAR = 'displayStyleToolbar';
+
+		var MESSAGE_TYPE_ERROR = 'error';
+
+		var SEARCH_REPOSITORY_ID = 'searchRepositoryId';
+
+		var SEARCH_TYPE = 'searchType';
+
+		var SEARCH_TYPE_SINGLE = 1;
+
+		var STR_CLICK = 'click';
+
+		var STR_DATA_SEARCH_PROCESSED = 'data-searchProcessed';
+
+		var STR_FOLDER_ID = 'folderId';
+
+		var STR_KEYWORDS = 'keywords';
+
+		var STR_PAGINATION_DATA = 'paginationData';
+
+		var STR_ROW_IDS_FILE_SHORTCUT_CHECKBOX = 'rowIdsDLFileShortcutCheckbox';
+
+		var STR_ROW_IDS_FOLDER_CHECKBOX = 'rowIdsFolderCheckbox';
+
+		var STR_ROW_IDS_FILE_ENTRY_CHECKBOX = 'rowIdsFileEntryCheckbox';
+
+		var STR_SEARCH_FOLDER_ID = 'searchFolderId';
+
+		var STR_SEARCH_RESULTS_CONTAINER = 'searchResultsContainer';
+
+		var STR_SELECTED_FOLDER = 'selectedFolder';
+
+		var STR_SHOW_REPOSITORY_TABS = 'showRepositoryTabs';
+
+		var STR_SHOW_SEARCH_INFO = 'showSearchInfo';
+
+		var STRUTS_ACTION = 'struts_action';
+
+		var SRC_ENTRIES_PAGINATOR = 1;
+
+		var SRC_HISTORY = 2;
+
+		var SRC_SEARCH = 3;
+
+		var TPL_MESSAGE_SEARCHING = '<div class="alert alert-info">{0}</div><div class="loading-animation" />';
+
+		var WIN = A.config.win;
+
+		var DocumentLibrary = A.Component.create(
+			{
+				AUGMENTS: [Liferay.PortletBase, Liferay.DocumentLibraryUpload],
+
+				EXTENDS: A.Base,
+
+				NAME: 'documentlibrary',
+
+				prototype: {
+					initializer: function(config) {
+						var instance = this;
+
+						var documentLibraryContainer = instance.byId('documentLibraryContainer');
+
+						instance._documentLibraryContainer = documentLibraryContainer;
+
+						instance._eventDataProcessed = instance.ns('dataProcessed');
+						instance._eventDataRequest = instance.ns('dataRequest');
+						instance._eventDataRetrieveSuccess = instance.ns('dataRetrieveSuccess');
+						instance._eventOpenDocument = instance.ns('openDocument');
+						instance._eventChangeSearchFolder = instance.ns('changeSearchFolder');
+
+						instance._entriesContainer = instance.byId('entriesContainer');
+
+						instance._eventPageLoaded = instance.ns('pageLoaded');
+
+						instance._keywordsNode = instance.byId(STR_KEYWORDS);
+
+						if (!config.syncMessageDisabled) {
+							instance._syncMessage = new Liferay.Message(
+								{
+									boundingBox: instance.byId('syncNotification'),
+									contentBox: instance.byId('syncNotificationContent'),
+									id: instance.NS + 'show-sync-message',
+									trigger: instance.one('#showSyncMessageIconContainer'),
+									visible: true
+								}
+							).render();
+						}
+
+						var checkBoxesId = [
+							instance.ns(STR_ROW_IDS_FILE_SHORTCUT_CHECKBOX),
+							instance.ns(STR_ROW_IDS_FOLDER_CHECKBOX),
+							instance.ns(STR_ROW_IDS_FILE_ENTRY_CHECKBOX)
+						];
+
+						var displayStyle = config.displayStyle;
+
+						var displayStyleCSSClass = 'entry-display-style';
+
+						var displayStyleToolbar = instance.byId(DISPLAY_STYLE_TOOLBAR);
+
+						var namespace = instance.NS;
+
+						var portletContainerId = instance.ns('documentLibraryContainer');
+
+						var paginatorConfig = config.paginator;
+
+						paginatorConfig.entryPaginationContainer = '.document-entries-pagination';
+						paginatorConfig.folderPaginationContainer = '.folder-pagination';
+						paginatorConfig.namespace = namespace;
+
+						var appViewPaginator = new Liferay.AppViewPaginator(paginatorConfig);
+
+						instance._appViewPaginator = appViewPaginator;
+
+						var selectConfig = config.select;
+
+						selectConfig.checkBoxesId = checkBoxesId;
+						selectConfig.displayStyle = displayStyle;
+						selectConfig.displayStyleCSSClass = displayStyleCSSClass;
+						selectConfig.displayStyleToolbar = displayStyleToolbar;
+						selectConfig.folderContainer = instance.byId('folderContainer');
+						selectConfig.namespace = namespace;
+						selectConfig.portletContainerId = portletContainerId;
+						selectConfig.repositories = config.repositories;
+						selectConfig.selector = 'entry-selector';
+
+						instance._appViewSelect = new Liferay.AppViewSelect(selectConfig);
+
+						var moveConfig = config.move;
+
+						moveConfig.processEntryIds = {
+							checkBoxesIds: checkBoxesId,
+							entryIds: [
+								instance.ns('fileShortcutIds'),
+								instance.ns('folderIds'),
+								instance.ns('fileEntryIds')
+							]
+						};
+
+						moveConfig.displayStyleCSSClass = displayStyleCSSClass;
+						moveConfig.draggableCSSClass = '.entry-link';
+						moveConfig.namespace = namespace;
+						moveConfig.portletContainerId = portletContainerId;
+						moveConfig.portletGroup = 'document-library';
+
+						instance._appViewMove = new Liferay.AppViewMove(moveConfig);
+
+						var foldersConfig = config.folders;
+
+						foldersConfig.displayStyle = displayStyle;
+						foldersConfig.displayStyleCSSClass = displayStyleCSSClass;
+						foldersConfig.displayStyleToolbar = displayStyleToolbar;
+						foldersConfig.namespace = namespace;
+						foldersConfig.portletContainerId = portletContainerId;
+
+						instance._appViewFolders = new Liferay.AppViewFolders(foldersConfig);
+
+						var eventHandles = [
+							Liferay.on(instance._eventDataRetrieveSuccess, instance._onDataRetrieveSuccess, instance),
+							Liferay.on(instance._eventOpenDocument, instance._openDocument, instance),
+							Liferay.on(instance._eventPageLoaded, instance._onPageLoaded, instance),
+							History.after('stateChange', instance._afterStateChange, instance),
+							Liferay.on('showTab', instance._onShowTab, instance),
+							Liferay.on(instance._eventChangeSearchFolder, instance._onChangeSearchFolder, instance)
+						];
+
+						instance._config = config;
+
+						instance._eventHandles = eventHandles;
+
+						instance._repositoriesData = {};
+
+						eventHandles.push(Liferay.on(config.portletId + ':portletRefreshed', A.bind('destructor', instance)));
+
+						var searchFormNode = instance.one('#fm1');
+
+						if (searchFormNode) {
+							searchFormNode.on('submit', instance._onSearchFormSubmit, instance);
+						}
+
+						instance._toggleSyncNotification();
+
+						instance._toggleTrashAction();
+					},
+
+					destructor: function() {
+						var instance = this;
+
+						A.Array.invoke(instance._eventHandles, 'detach');
+
+						instance._appViewFolders.destroy();
+						instance._appViewMove.destroy();
+						instance._appViewPaginator.destroy();
+						instance._appViewSelect.destroy();
+
+						instance._documentLibraryContainer.purge(true);
+					},
+
+					_afterStateChange: function(event) {
+						var instance = this;
+
+						var namespace = instance.NS;
+
+						var requestParams = {};
+
+						var state = History.get();
+
+						AObject.each(
+							state,
+							function(item, index, collection) {
+								if (index.indexOf(namespace) === 0) {
+									requestParams[index] = item;
+								}
+							}
+						);
+
+						instance._tuneStateChangeParams(requestParams);
+
+						if (AObject.isEmpty(requestParams)) {
+							requestParams = instance._getDefaultHistoryState();
+						}
+
+						Liferay.fire(
+							instance._eventDataRequest,
+							{
+								requestParams: requestParams,
+								src: SRC_HISTORY
+							}
+						);
+					},
+
+					_getDefaultHistoryState: function() {
+						var instance = this;
+
+						var initialState = History.get();
+
+						if (AObject.isEmpty(initialState)) {
+							initialState = instance._appViewPaginator.get('defaultParams');
+						}
+
+						return initialState;
+					},
+
+					_getRepositoryName: function(repositoryId) {
+						var instance = this;
+
+						var repositoryName = null;
+
+						var repositories = instance._config.repositories;
+
+						var length = repositories.length;
+
+						for (var i = 0; i < length; i++) {
+							var repository = repositories[i];
+
+							if (repository.id == repositoryId) {
+								repositoryName = repository.name;
+
+								break;
+							}
+						}
+
+						return repositoryName;
+					},
+
+					_onChangeSearchFolder: function(event) {
+						var instance = this;
+
+						var selectedFolder = instance._appViewSelect.get(STR_SELECTED_FOLDER);
+
+						var searchData = {
+							folderId: selectedFolder.id,
+							keywords: instance._keywordsNode.get('value'),
+							repositoryId: selectedFolder.repositoryId,
+							showSearchInfo: true
+						};
+
+						if (event.searchEverywhere) {
+							searchData[SEARCH_REPOSITORY_ID] = instance._config.repositories[0].id;
+							searchData[STR_SEARCH_FOLDER_ID] = DEFAULT_FOLDER_ID;
+							searchData[STR_SHOW_REPOSITORY_TABS] = true;
+						}
+						else {
+							searchData[SEARCH_REPOSITORY_ID] = selectedFolder.repositoryId;
+							searchData[STR_SEARCH_FOLDER_ID] = selectedFolder.id;
+							searchData[STR_SHOW_REPOSITORY_TABS] = false;
+						}
+
+						instance._searchFileEntry(searchData);
+					},
+
+					_onDataRetrieveSuccess: function(event) {
+						var instance = this;
+
+						var responseData = event.responseData;
+
+						instance._documentLibraryContainer.loadingmask.hide();
+
+						var content = A.Node.create(responseData);
+
+						if (content) {
+							instance._setSearchResults(content);
+
+							instance._appViewFolders.processData(content);
+
+							instance._appViewSelect.syncDisplayStyleToolbar();
+						}
+
+						Liferay.fire(instance._eventDataProcessed);
+
+						WIN[instance.ns('toggleActionsButton')]();
+
+						if (event.data[instance.ns('viewEntries')]) {
+							instance._toggleTrashAction();
+						}
+					},
+
+					_onPageLoaded: function(event) {
+						var instance = this;
+
+						var paginationData = event.pagination;
+
+						if (paginationData) {
+							if (event.src == SRC_SEARCH) {
+								var repositoriesData = instance._repositoriesData;
+
+								var repositoryData = repositoriesData[event.repositoryId];
+
+								if (!repositoryData) {
+									repositoryData = {};
+
+									instance._repositoriesData[event.repositoryId] = repositoryData;
+								}
+
+								repositoryData.paginationData = paginationData;
+							}
+
+							instance._appViewPaginator.set(STR_PAGINATION_DATA, paginationData);
+
+							instance._toggleSyncNotification();
+						}
+					},
+
+					_onSearchFormSubmit: function(event) {
+						var instance = this;
+
+						event.preventDefault();
+
+						var selectedFolder = instance._appViewSelect.get(STR_SELECTED_FOLDER);
+
+						var showTabs = (selectedFolder.id == DEFAULT_FOLDER_ID);
+
+						var searchData = {
+							folderId: selectedFolder.id,
+							keywords: instance._keywordsNode.get('value'),
+							repositoryId: selectedFolder.repositoryId,
+							searchFolderId: selectedFolder.id,
+							searchRepositoryId: selectedFolder.repositoryId,
+							showRepositoryTabs: showTabs,
+							showSearchInfo: true
+						};
+
+						instance._searchFileEntry(searchData);
+					},
+
+					_onShowTab: function(event) {
+						var instance = this;
+
+						if (event.namespace.indexOf(instance.NS) === 0) {
+							var tabSection = event.tabSection;
+
+							var searchResultsWrapper = tabSection.one('[data-repositoryId]');
+
+							var repositoryId = searchResultsWrapper.attr('data-repositoryId');
+
+							var repositoryData = instance._repositoriesData[repositoryId];
+
+							if (repositoryData) {
+								var paginationData = repositoryData.paginationData;
+
+								if (paginationData) {
+									instance._appViewPaginator.set(STR_PAGINATION_DATA, paginationData);
+								}
+							}
+
+							if (!searchResultsWrapper.hasAttribute(STR_DATA_SEARCH_PROCESSED)) {
+								searchResultsWrapper.setAttribute(STR_DATA_SEARCH_PROCESSED, true);
+
+								var selectedFolder = instance._appViewSelect.get(STR_SELECTED_FOLDER);
+
+								var searchData = {
+									folderId: selectedFolder.id,
+									keywords: instance._keywordsNode.get('value'),
+									repositoryId: selectedFolder.repositoryId,
+									searchFolderId: DEFAULT_FOLDER_ID,
+									searchRepositoryId: repositoryId
+								};
+
+								instance._searchFileEntry(searchData);
+							}
+							else {
+								instance._documentLibraryContainer.all('.document-entries-pagination').show();
+							}
+						}
+					},
+
+					_openDocument: function(event) {
+						var instance = this;
+
+						Liferay.Util.openDocument(
+							event.webDavUrl,
+							null,
+							function(exception) {
+								var errorMessage = Lang.sub(
+									Liferay.Language.get('cannot-open-the-requested-document-due-to-the-following-reason'),
+									[exception.message]
+								);
+
+								instance._appViewFolders.displayMessage(MESSAGE_TYPE_ERROR, errorMessage);
+							}
+						);
+					},
+
+					_searchFileEntry: function(searchData) {
+						var instance = this;
+
+						instance._documentLibraryContainer.all('.document-entries-pagination').hide();
+
+						var requestParams = {};
+
+						requestParams[instance.ns(STRUTS_ACTION)] = '/document_library/search';
+						requestParams[instance.ns('repositoryId')] = searchData.repositoryId;
+						requestParams[instance.ns(SEARCH_REPOSITORY_ID)] = searchData.searchRepositoryId;
+						requestParams[instance.ns(STR_FOLDER_ID)] = searchData.folderId;
+						requestParams[instance.ns(STR_SEARCH_FOLDER_ID)] = searchData.searchFolderId;
+						requestParams[instance.ns(STR_KEYWORDS)] = searchData.keywords;
+						requestParams[instance.ns(SEARCH_TYPE)] = SEARCH_TYPE_SINGLE;
+						requestParams[instance.ns(STR_SHOW_REPOSITORY_TABS)] = searchData.showRepositoryTabs;
+						requestParams[instance.ns(STR_SHOW_SEARCH_INFO)] = searchData.showSearchInfo;
+
+						Liferay.fire(
+							instance._eventDataRequest,
+							{
+								requestParams: requestParams,
+								src: Liferay.DL_SEARCH
+							}
+						);
+
+						if (searchData.showRepositoryTabs || searchData.showSearchInfo) {
+							var entriesContainer = instance._entriesContainer;
+
+							var searchingTPL = Lang.sub(TPL_MESSAGE_SEARCHING, [Liferay.Language.get('searching,-please-wait')]);
+
+							entriesContainer.html(searchingTPL);
+						}
+					},
+
+					_setSearchResults: function(content) {
+						var instance = this;
+
+						var repositoryId;
+
+						var repositoryIdNode = instance.one('#' + instance.ns(SEARCH_REPOSITORY_ID), content);
+
+						if (repositoryIdNode) {
+							repositoryId = repositoryIdNode.val();
+						}
+
+						var searchInfo = instance.one('#' + instance.ns('searchInfo'), content);
+
+						var entriesContainer = instance._entriesContainer;
+
+						if (searchInfo) {
+							entriesContainer.empty();
+
+							entriesContainer.setContent(searchInfo);
+						}
+
+						var fragmentSearchResults = instance.one('#fragmentSearchResults', content);
+
+						var searchResults;
+
+						if (fragmentSearchResults) {
+							searchResults = instance.one('#' + STR_SEARCH_RESULTS_CONTAINER + repositoryId, entriesContainer);
+
+							if (searchResults) {
+								searchResults.empty();
+
+								searchResults.setContent(fragmentSearchResults.html());
+							}
+						}
+
+						searchResults = instance.one('.local-search-results', content);
+
+						if (searchResults) {
+							var searchResultsContainer = instance.one('#' + STR_SEARCH_RESULTS_CONTAINER, content);
+
+							if (!searchInfo) {
+								entriesContainer.empty();
+							}
+
+							entriesContainer.append(searchResultsContainer);
+						}
+
+						var repositorySearchResults = instance.one('.repository-search-results', content);
+
+						if (repositorySearchResults) {
+							var resultsContainer = instance.one('#' + STR_SEARCH_RESULTS_CONTAINER + repositoryId, entriesContainer);
+
+							if (!resultsContainer) {
+								resultsContainer = entriesContainer;
+							}
+
+							if (!searchInfo) {
+								resultsContainer.empty();
+							}
+
+							resultsContainer.append(repositorySearchResults);
+						}
+
+						if (searchResults || repositorySearchResults) {
+							instance.all('#addButtonContainer, #sortButtonContainer').hide();
+						}
+
+						var repositoryName = instance._getRepositoryName(repositoryId);
+
+						if (repositoryName) {
+							var tabLinkSelector = 'li[id$="' + Liferay.Util.toCharCode(repositoryName) + 'TabsId' + '"] a';
+
+							var tabLink = entriesContainer.one(tabLinkSelector);
+
+							if (tabLink) {
+								tabLink.simulate(STR_CLICK);
+							}
+						}
+					},
+
+					_tuneStateChangeParams: function(requestParams) {
+						var instance = this;
+
+						var entriesContainer = instance._entriesContainer;
+
+						var namespacedShowRepositoryTabs = instance.ns(STR_SHOW_REPOSITORY_TABS);
+
+						if (AObject.owns(requestParams, namespacedShowRepositoryTabs) &&
+							!requestParams[namespacedShowRepositoryTabs] &&
+							!entriesContainer.one('ul.nav-tabs')) {
+
+							requestParams[namespacedShowRepositoryTabs] = true;
+
+							requestParams[instance.ns(SEARCH_TYPE)] = SEARCH_TYPE_SINGLE;
+						}
+
+						var namespacedShowSearchInfo = instance.ns(STR_SHOW_SEARCH_INFO);
+
+						if (AObject.owns(requestParams, namespacedShowSearchInfo) &&
+							!requestParams[namespacedShowSearchInfo] &&
+							!entriesContainer.one('.search-info')) {
+
+							requestParams[namespacedShowSearchInfo] = true;
+
+							requestParams[instance.ns(SEARCH_TYPE)] = SEARCH_TYPE_SINGLE;
+						}
+					},
+
+					_toggleSyncNotification: function() {
+						var instance = this;
+
+						if (instance._syncMessage) {
+							var entryPagination = instance._appViewPaginator.get('entryPagination');
+
+							var syncMessageBoundingBox = instance._syncMessage.get('boundingBox');
+
+							syncMessageBoundingBox.toggleClass(CSS_SYNC_MESSAGE_HIDDEN, entryPagination.get('total') <= 0);
+						}
+					},
+
+					_toggleTrashAction: function() {
+						var instance = this;
+
+						var trashEnabled = instance._config.trashEnabled;
+
+						if (trashEnabled) {
+							var repositoryId = instance._appViewSelect.get(STR_SELECTED_FOLDER).repositoryId;
+
+							var scopeGroupId = themeDisplay.getScopeGroupId();
+
+							trashEnabled = (scopeGroupId === repositoryId);
+						}
+
+						instance.one('#deleteAction').toggle(!trashEnabled);
+
+						instance.one('#moveToTrashAction').toggle(trashEnabled);
+					}
+				}
+			}
+		);
+
+		Liferay.DL_ENTRIES_PAGINATOR = SRC_ENTRIES_PAGINATOR;
+
+		Liferay.DL_SEARCH = SRC_SEARCH;
+
+		Liferay.Portlet.DocumentLibrary = DocumentLibrary;
+	},
+	'',
+	{
+		requires: ['aui-loading-mask-deprecated', 'aui-parse-content', 'document-library-upload', 'event-simulate', 'liferay-app-view-folders', 'liferay-app-view-move', 'liferay-app-view-paginator', 'liferay-app-view-select', 'liferay-history-manager', 'liferay-message', 'liferay-portlet-base', 'querystring-parse-simple']
+	}
+);
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/js/upload.js b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/js/upload.js
new file mode 100644
index 0000000..f2caffd
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/js/upload.js
@@ -0,0 +1,1279 @@
+AUI.add(
+	'document-library-upload',
+	function(A) {
+		var AArray = A.Array;
+		var Lang = A.Lang;
+		var LString = Lang.String;
+		var HistoryManager = Liferay.HistoryManager;
+		var UploaderQueue = A.Uploader.Queue;
+
+		var sub = Lang.sub;
+
+		var DOC = A.config.doc;
+
+		var UA = A.UA;
+
+		var CSS_ACTIVE_AREA = 'active-area';
+
+		var CSS_APP_VIEW_ENTRY = 'app-view-entry-taglib';
+
+		var CSS_COLUMN_CONTENT = '.column-content';
+
+		var CSS_ENTRY_DISPLAY_STYLE = 'entry-display-style';
+
+		var CSS_ICON = 'icon';
+
+		var CSS_TAGLIB_ICON = 'taglib-icon';
+
+		var CSS_TAGLIB_TEXT = 'taglib-text';
+
+		var CSS_UPLOAD_ERROR = 'upload-error';
+
+		var CSS_UPLOAD_SUCCESS = 'upload-success';
+
+		var CSS_UPLOAD_WARNING = 'upload-warning';
+
+		var ERROR_RESULTS_MIXED = 1;
+
+		var PATH_THEME_IMAGES = themeDisplay.getPathThemeImages();
+
+		var REGEX_AUDIO = /\.(aac|auif|bwf|flac|mp3|mp4|m4a|wav|wma)$/i;
+
+		var REGEX_COMPRESSED = /\.(dmg|gz|tar|tgz|zip)$/i;
+
+		var REGEX_IMAGE = /\.(bmp|gif|jpeg|jpg|png|tiff)$/i;
+
+		var REGEX_VIDEO = /\.(avi|flv|mpe|mpg|mpeg|mov|m4v|ogg|wmv)$/i;
+
+		var SELECTOR_DATA_FOLDER = '[data-folder="true"]';
+
+		var SELECTOR_DATA_FOLDER_DATA_TITLE = '[data-folder="true"][data-title]';
+
+		var SELECTOR_DISPLAY_DESCRIPTIVE = '.display-descriptive';
+
+		var SELECTOR_DISPLAY_ICON = '.display-icon';
+
+		var SELECTOR_DOCUMENT_ENTRIES_PAGINATION = '.document-entries-pagination';
+
+		var SELECTOR_ENTRIES_EMPTY = '.entries-empty';
+
+		var SELECTOR_ENTRY_LINK = '.entry-link';
+
+		var SELECTOR_ENTRY_TITLE_TEXT = '.entry-title-text';
+
+		var SELECTOR_HEADER_ROW = '.lfr-header-row';
+
+		var SELECTOR_IMAGE_ICON = 'img.icon';
+
+		var SELECTOR_SEARCH_CONTAINER = '.searchcontainer';
+
+		var STR_DOT = '.';
+
+		var SELECTOR_ENTRY_DISPLAY_STYLE = STR_DOT + CSS_ENTRY_DISPLAY_STYLE;
+
+		var SELECTOR_TAGLIB_ICON = STR_DOT + CSS_TAGLIB_ICON;
+
+		var SIZE_DENOMINATOR = 1024;
+
+		var STR_BOUNDING_BOX = 'boundingBox';
+
+		var STR_CONTENT_BOX = 'contentBox';
+
+		var STR_EXTENSION_PDF = '.pdf';
+
+		var STR_FIRST = 'first';
+
+		var STR_LIST = 'list';
+
+		var STR_NAVIGATION_OVERLAY_BACKGROUND = '#FFF';
+
+		var STR_SIZE_SUFFIX_KB = 'k';
+
+		var STR_SIZE_SUFFIX_MB = 'MB';
+
+		var STR_SIZE_SUFFIX_GB = 'GB';
+
+		var STR_SPACE = ' ';
+
+		var STR_THUMBNAIL_EXTENSION = '.png';
+
+		var STR_THUMBNAIL_DEFAULT = 'default' + STR_THUMBNAIL_EXTENSION;
+
+		var STR_THUMBNAIL_PDF = 'pdf' + STR_THUMBNAIL_EXTENSION;
+
+		var STR_THUMBNAIL_AUDIO = 'music' + STR_THUMBNAIL_EXTENSION;
+
+		var STR_THUMBNAIL_COMPRESSED = 'compressed' + STR_THUMBNAIL_EXTENSION;
+
+		var STR_THUMBNAIL_VIDEO = 'video' + STR_THUMBNAIL_EXTENSION;
+
+		var STR_THUMBNAIL_PATH = PATH_THEME_IMAGES + '/file_system/large/';
+
+		var UPLOADER_TYPE = A.Uploader.TYPE || 'none';
+
+		var TPL_ENTRY_ROW_TITLE = '<span class="' + CSS_APP_VIEW_ENTRY + STR_SPACE + CSS_ENTRY_DISPLAY_STYLE + '">' +
+			'<a class="' + CSS_TAGLIB_ICON + '">' +
+				'<img alt="" class="' + CSS_ICON + '" src="' + PATH_THEME_IMAGES + '/file_system/small/page.png" />' +
+				'<span class="' + CSS_TAGLIB_TEXT + '">{0}</span>' +
+			'</a>' +
+		'</span>';
+
+		var TPL_ERROR_FOLDER = new A.Template(
+			'<span class="lfr-status-success-label">{validFilesLength}</span>',
+			'<span class="lfr-status-error-label">{invalidFilesLength}</span>',
+			'<ul class="unstyled">',
+				'<tpl for="invalidFiles">',
+					'<li><b>{name}</b>: {errorMessage}</li>',
+				'</tpl>',
+			'</ul>'
+		);
+
+		var TPL_IMAGE_THUMBNAIL = themeDisplay.getPathContext() + '/documents/' + themeDisplay.getScopeGroupId() + '/{0}/{1}';
+
+		DocumentLibraryUpload = function() {
+		};
+
+		DocumentLibraryUpload.NAME = 'documentlibraryupload';
+
+		DocumentLibraryUpload.prototype = {
+			initializer: function() {
+				var instance = this;
+
+				if (themeDisplay.isSignedIn() && (UPLOADER_TYPE === 'html5') && !UA.touch && instance.one('#addButtonContainer')) {
+					instance._initDLUpload();
+				}
+			},
+
+			destructor: function() {
+				var instance = this;
+
+				if (instance._dataSet) {
+					instance._dataSet.destroy();
+				}
+
+				if (instance._navigationOverlays) {
+					AArray.invoke(instance._navigationOverlays, 'destroy');
+				}
+
+				if (instance._overlayManager) {
+					instance._overlayManager.destroy();
+				}
+
+				if (instance._uploader) {
+					instance._uploader.destroy();
+				}
+
+				instance._detachSubscriptions();
+
+				if (instance._tooltipDelegate) {
+					instance._tooltipDelegate.destroy();
+				}
+			},
+
+			_addFilesToQueueBottom: function(files) {
+				var instance = this;
+
+				var queue = instance._getUploader().queue;
+
+				AArray.each(
+					files,
+					function(item, index, collection) {
+						queue.addToQueueBottom(item);
+					}
+				);
+			},
+
+			_attachEventHandlers: function() {
+				var instance = this;
+
+				var docElement = A.one(DOC.documentElement);
+
+				var entriesContainer = instance._entriesContainer;
+
+				var folderId = instance.ns('folderId');
+
+				A.getWin()._node.onbeforeunload = A.bind('_confirmUnload', instance);
+
+				Liferay.on(instance.ns('dataRequest'), instance._onDataRequest, instance);
+
+				Liferay.after(
+					'liferay-app-view-folders:dataRequest',
+					function(event) {
+						var requestParams = event.requestParams;
+
+						instance._folderId = requestParams[folderId];
+					},
+					instance
+				);
+
+				var removeCssClassTask = A.debounce(
+					function() {
+						docElement.removeClass('upload-drop-intent');
+						docElement.removeClass('upload-drop-active');
+					},
+					500
+				);
+
+				if (instance._appViewMove.get('updateable')) {
+					var dd = instance._appViewMove._ddHandler.dd;
+
+					dd.addInvalid(STR_DOT + CSS_UPLOAD_ERROR);
+				}
+
+				docElement.on(
+					'dragover',
+					function(event) {
+						var dataTransfer = event._event.dataTransfer;
+
+						if (dataTransfer && dataTransfer.types) {
+							var dataTransferTypes = dataTransfer.types || [];
+
+							if ((AArray.indexOf(dataTransferTypes, 'Files') > -1) && (AArray.indexOf(dataTransferTypes, 'text/html') === -1)) {
+								event.halt();
+
+								dataTransfer.dropEffect = 'copy';
+
+								docElement.addClass('upload-drop-intent');
+
+								var target = event.target;
+
+								docElement.toggleClass('upload-drop-active', (target.compareTo(entriesContainer) || entriesContainer.contains(target)));
+
+								removeCssClassTask();
+							}
+						}
+					}
+				);
+
+				docElement.delegate(
+					'drop',
+					function(event) {
+						var dataTransfer = event._event.dataTransfer;
+
+						if (dataTransfer) {
+							var dataTransferTypes = dataTransfer.types || [];
+
+							if ((AArray.indexOf(dataTransferTypes, 'Files') > -1) && (AArray.indexOf(dataTransferTypes, 'text/html') === -1)) {
+								event.halt();
+
+								var dragDropFiles = AArray(dataTransfer.files);
+
+								event.fileList = AArray.map(
+									dragDropFiles,
+									function(item, index, collection) {
+										return new A.FileHTML5(item);
+									}
+								);
+
+								var uploader = instance._getUploader();
+
+								uploader.fire('fileselect', event);
+							}
+						}
+					},
+					'body, .document-container, .overlaymask, .progressbar, [data-folder="true"]'
+				);
+
+				entriesContainer.delegate(
+					['dragleave', 'dragover'],
+					function(event) {
+						var dataTransfer = event._event.dataTransfer;
+
+						var dataTransferTypes = dataTransfer.types;
+
+						if ((AArray.indexOf(dataTransferTypes, 'Files') > -1) && (AArray.indexOf(dataTransferTypes, 'text/html') === -1)) {
+							var parentElement = event.target.ancestor(SELECTOR_ENTRY_DISPLAY_STYLE);
+
+							parentElement.toggleClass(CSS_ACTIVE_AREA, event.type == 'dragover');
+						}
+					},
+					SELECTOR_DATA_FOLDER
+				);
+
+				entriesContainer.delegate(
+					'click',
+					function(event) {
+						event.preventDefault();
+					},
+					STR_DOT + CSS_UPLOAD_ERROR + STR_SPACE + SELECTOR_ENTRY_LINK
+				);
+			},
+
+			_attachSubscriptions: function(data) {
+				var instance = this;
+
+				var handles = instance._handles;
+
+				var uploader = instance._getUploader();
+				var displayStyle = instance._getDisplayStyle();
+
+				if (data.folder) {
+					handles.push(
+						uploader.on('uploadstart', instance._showFolderUploadStarting, instance, data),
+						uploader.on('totaluploadprogress', instance._showFolderUploadProgress, instance, data),
+						uploader.on('uploadcomplete', instance._detectFolderUploadError, instance, data),
+						uploader.on('alluploadscomplete', instance._showFolderUploadComplete, instance, data, displayStyle)
+					);
+				}
+				else {
+					handles.push(
+						uploader.after('fileuploadstart', instance._showFileUploadStarting, instance),
+						uploader.on('uploadprogress', instance._showFileUploadProgress, instance),
+						uploader.on('uploadcomplete', instance._showFileUploadComplete, instance, displayStyle)
+					);
+				}
+			},
+
+			_combineFileLists: function(fileList, queuedFiles) {
+				var instance = this;
+
+				AArray.each(
+					queuedFiles,
+					function(item, index, collection) {
+						fileList.push(item);
+					}
+				);
+			},
+
+			_confirmUnload: function() {
+				var instance = this;
+
+				if (instance._isUploading()) {
+					return Liferay.Language.get('uploads-are-in-progress-confirmation');
+				}
+			},
+
+			_createEntryNode: function(name, size, displayStyle) {
+				var instance = this;
+
+				var entryNode;
+
+				var entriesContainer;
+
+				if (displayStyle == STR_LIST) {
+					var searchContainer = instance._entriesContainer.one(SELECTOR_SEARCH_CONTAINER);
+
+					entriesContainer = searchContainer.one('tbody');
+
+					entryNode = instance._createEntryRow(name, size);
+				}
+				else {
+					var invisibleEntry = instance._invisibleDescriptiveEntry;
+
+					if (displayStyle === CSS_ICON) {
+						invisibleEntry = instance._invisibleIconEntry;
+					}
+
+					entryNode = invisibleEntry.clone();
+
+					var entryLink = entryNode.one(SELECTOR_ENTRY_LINK);
+
+					var entryTitle = entryLink.one(SELECTOR_ENTRY_TITLE_TEXT);
+
+					entriesContainer = instance._entriesContainer;
+
+					entryLink.attr('title', name);
+
+					entryTitle.setContent(name);
+				}
+
+				entryNode.attr(
+					{
+						'data-title': name,
+						id: A.guid()
+					}
+				);
+
+				entriesContainer.append(entryNode);
+
+				entryNode.show().scrollIntoView();
+
+				return entryNode;
+			},
+
+			_createEntryRow: function(name, size) {
+				var instance = this;
+
+				var storageSize = instance._formatStorageSize(size);
+
+				var searchContainerNode = instance._entriesContainer.one(SELECTOR_SEARCH_CONTAINER);
+
+				var searchContainer = Liferay.SearchContainer.get(searchContainerNode.attr('id'));
+
+				var columnValues = AArray.map(
+					instance._columnNames,
+					function(item, index, collection) {
+						var value = '';
+
+						if (item == 'name') {
+							value = sub(TPL_ENTRY_ROW_TITLE, [name]);
+						}
+						else if (item == 'size') {
+							value = storageSize;
+						}
+						else if (item == 'downloads') {
+							value = '0';
+						}
+
+						return value;
+					}
+				);
+
+				var row = searchContainer.addRow(columnValues, A.guid());
+
+				row.attr('data-draggable', true);
+
+				return row;
+			},
+
+			_createOverlay: function(target, background) {
+				var instance = this;
+
+				var overlay = new A.OverlayMask(
+					{
+						background: background || null,
+						target: target
+					}
+				).render();
+
+				overlay.get(STR_BOUNDING_BOX).addClass('portlet-document-library-upload-mask');
+
+				return overlay;
+			},
+
+			_createProgressBar: function() {
+				var instance = this;
+
+				var dimensions = instance._dimensions;
+
+				var height = dimensions.height / 5;
+
+				var width = dimensions.width / 0.64;
+
+				return new A.ProgressBar(
+					{
+						height: height,
+						on: {
+							complete: function(event) {
+								this.set('label', 'complete!');
+							},
+							valueChange: function(event) {
+								this.set('label', event.newVal + '%');
+							}
+						},
+						width: width
+					}
+				);
+			},
+
+			_createUploadStatus: function(target, file) {
+				var instance = this;
+
+				var overlay = instance._createOverlay(target);
+
+				var progressBar = instance._createProgressBar();
+
+				overlay.show();
+
+				if (file) {
+					file.overlay = overlay;
+					file.progressBar = progressBar;
+					file.target = target;
+				}
+				else {
+					target.overlay = overlay;
+					target.progressBar = progressBar;
+				}
+			},
+
+			_destroyEntry: function() {
+				var instance = this;
+
+				var currentUploadData = instance._getCurrentUploadData();
+
+				var fileList = currentUploadData.fileList;
+
+				if (!currentUploadData.folder) {
+					AArray.each(
+						fileList,
+						function(item, index, collection) {
+							item.overlay.destroy();
+
+							item.progressBar.destroy();
+						}
+					);
+				}
+
+				AArray.invoke(fileList, 'destroy');
+			},
+
+			_detachSubscriptions: function() {
+				var instance = this;
+
+				var handles = instance._handles;
+
+				AArray.invoke(handles, 'detach');
+
+				handles.length = 0;
+			},
+
+			_detectFolderUploadError: function(event, data) {
+				var instance = this;
+
+				var response = instance._getUploadResponse(event.data);
+
+				if (response.error) {
+					var file = event.file;
+
+					file.errorMessage = response.message;
+
+					data.invalidFiles.push(file);
+				}
+			},
+
+			_displayEntryError: function(node, message, displayStyle) {
+				var instance = this;
+
+				if (displayStyle === STR_LIST) {
+					var imageIcon = node.one(SELECTOR_IMAGE_ICON);
+
+					imageIcon.attr('src', PATH_THEME_IMAGES + '/common/close.png');
+				}
+				else {
+					node.addClass(CSS_UPLOAD_ERROR);
+				}
+
+				instance._displayError(node, message);
+			},
+
+			_displayError: function(node, message) {
+				var instance = this;
+
+				node.attr('data-message', message);
+
+				var tooltipDelegate = instance._tooltipDelegate;
+
+				if (!tooltipDelegate) {
+					tooltipDelegate = new A.TooltipDelegate(
+						{
+							formatter: function() {
+								var tooltip = this;
+
+								tooltip.set('zIndex', 2);
+
+								var node = tooltip.get('trigger');
+
+								return node.attr('data-message');
+							},
+							trigger: '.app-view-entry.upload-error',
+							visible: false
+						}
+					);
+
+					instance._tooltipDelegate = tooltipDelegate;
+				}
+
+				return node;
+			},
+
+			_displayResult: function(node, displayStyle, error) {
+				var instance = this;
+
+				var resultsNode = node;
+
+				if (resultsNode) {
+					var uploadResultClass = CSS_UPLOAD_SUCCESS;
+
+					if (error) {
+						resultsNode.removeClass(CSS_UPLOAD_ERROR).removeClass(CSS_UPLOAD_WARNING);
+
+						if (error === true) {
+							uploadResultClass = CSS_UPLOAD_ERROR;
+						}
+						else if (error === ERROR_RESULTS_MIXED) {
+							uploadResultClass = CSS_UPLOAD_WARNING;
+						}
+					}
+
+					resultsNode.addClass(uploadResultClass);
+				}
+			},
+
+			_formatStorageSize: function(size) {
+				var instance = this;
+
+				var suffix = STR_SIZE_SUFFIX_KB;
+
+				size /= SIZE_DENOMINATOR;
+
+				if (size > SIZE_DENOMINATOR) {
+					suffix = STR_SIZE_SUFFIX_MB;
+
+					size /= SIZE_DENOMINATOR;
+				}
+
+				if (size > SIZE_DENOMINATOR) {
+					suffix = STR_SIZE_SUFFIX_GB;
+
+					size /= SIZE_DENOMINATOR;
+				}
+
+				var precision = 1;
+
+				if (suffix == STR_SIZE_SUFFIX_KB) {
+					precision = 0;
+				}
+
+				return LString.round(size, precision) + suffix;
+			},
+
+			_getCurrentUploadData: function() {
+				var instance = this;
+
+				var dataSet = instance._getDataSet();
+
+				var currentUploadData = dataSet.get(STR_FIRST);
+
+				return currentUploadData;
+			},
+
+			_getDataSet: function() {
+				var instance = this;
+
+				var dataSet = instance._dataSet;
+
+				if (!dataSet) {
+					dataSet = new A.DataSet();
+
+					instance._dataSet = dataSet;
+				}
+
+				return dataSet;
+			},
+
+			_getDisplayStyle: function(style) {
+				var instance = this;
+
+				var displayStyleNamespace = instance.ns('displayStyle');
+
+				var displayStyle = HistoryManager.get(displayStyleNamespace) || instance._config.displayStyle;
+
+				if (style) {
+					displayStyle = (style == displayStyle);
+				}
+
+				return displayStyle;
+			},
+
+			_getEmptyMessage: function() {
+				var instance = this;
+
+				var emptyMessage = instance._emptyMessage;
+
+				if (!emptyMessage) {
+					emptyMessage = instance._entriesContainer.one(SELECTOR_ENTRIES_EMPTY);
+
+					instance._emptyMessage = emptyMessage;
+				}
+
+				return emptyMessage;
+			},
+
+			_getFolderEntryNode: function(target) {
+				var instance = this;
+
+				var folderEntry;
+
+				var overlayContentBox = target.hasClass('overlay-content');
+
+				if (overlayContentBox) {
+					var overlay = A.Widget.getByNode(target);
+
+					folderEntry = overlay._originalConfig.target;
+				}
+				else {
+					if (target.attr('data-folder') == 'true') {
+						folderEntry = target;
+					}
+
+					if (!folderEntry) {
+						folderEntry = target.ancestor(SELECTOR_ENTRY_LINK + SELECTOR_DATA_FOLDER);
+					}
+
+					if (!folderEntry) {
+						folderEntry = target.ancestor(SELECTOR_DATA_FOLDER_DATA_TITLE);
+					}
+
+					folderEntry = folderEntry && folderEntry.ancestor();
+				}
+
+				return folderEntry;
+			},
+
+			_getFolderId: function(target) {
+				var instance = this;
+
+				var folderEntry = instance._getFolderEntryNode(target);
+
+				var dataFolder = folderEntry && folderEntry.one('[data-folder-id]');
+
+				return (dataFolder && A.Lang.toInt(dataFolder.attr('data-folder-id')) || instance._folderId);
+			},
+
+			_getMediaThumbnail: function(fileName) {
+				var instance = this;
+
+				var thumbnailName = STR_THUMBNAIL_DEFAULT;
+
+				if (REGEX_IMAGE.test(fileName)) {
+					thumbnailName = sub(TPL_IMAGE_THUMBNAIL, [instance._folderId, fileName]);
+				}
+				else {
+					if (LString.endsWith(fileName.toLowerCase(), STR_EXTENSION_PDF)) {
+						thumbnailName = STR_THUMBNAIL_PDF;
+					}
+					else if (REGEX_AUDIO.test(fileName)) {
+						thumbnailName = STR_THUMBNAIL_AUDIO;
+					}
+					else if (REGEX_VIDEO.test(fileName)) {
+						thumbnailName = STR_THUMBNAIL_VIDEO;
+					}
+					else if (REGEX_COMPRESSED.test(fileName)) {
+						thumbnailName = STR_THUMBNAIL_COMPRESSED;
+					}
+
+					thumbnailName = STR_THUMBNAIL_PATH + thumbnailName;
+				}
+
+				return thumbnailName;
+			},
+
+			_getNavigationOverlays: function() {
+				var instance = this;
+
+				var navigationOverlays = instance._navigationOverlays;
+
+				if (!navigationOverlays) {
+					navigationOverlays = [];
+
+					var createNavigationOverlay = function(target) {
+						if (target) {
+							var overlay = instance._createOverlay(target, STR_NAVIGATION_OVERLAY_BACKGROUND);
+
+							navigationOverlays.push(overlay);
+						}
+					};
+
+					var entriesContainer = instance.one('#documentLibraryContainer');
+
+					createNavigationOverlay(entriesContainer.one(SELECTOR_DOCUMENT_ENTRIES_PAGINATION));
+					createNavigationOverlay(entriesContainer.one('.app-view-taglib.lfr-header-row'));
+					createNavigationOverlay(instance.byId('listViewContainer'));
+
+					instance._navigationOverlays = navigationOverlays;
+				}
+
+				return navigationOverlays;
+			},
+
+			_getUploadResponse: function(responseData) {
+				var instance = this;
+
+				var error;
+				var message;
+
+				try {
+					responseData = A.JSON.parse(responseData);
+				}
+				catch (err) {
+				}
+
+				if (Lang.isObject(responseData)) {
+					error = responseData.status && (responseData.status >= 490 && responseData.status < 500);
+
+					if (error) {
+						message = responseData.message;
+					}
+					else {
+						message = instance.ns('fileEntryId=') + responseData.fileEntryId;
+					}
+				}
+
+				return {
+					error: error,
+					message: message
+				};
+			},
+
+			_getUploader: function() {
+				var instance = this;
+
+				var uploader = instance._uploader;
+
+				if (!uploader) {
+					uploader = new A.Uploader(
+						{
+							appendNewFiles: false,
+							fileFieldName: 'file',
+							multipleFiles: true,
+							simLimit: 1
+						}
+					);
+
+					var navigationOverlays = instance._getNavigationOverlays();
+
+					uploader.on(
+						'uploadstart',
+						function(event) {
+							AArray.invoke(navigationOverlays, 'show');
+						}
+					);
+
+					uploader.after(
+						'alluploadscomplete',
+						function(event) {
+							AArray.invoke(navigationOverlays, 'hide');
+
+							var emptyMessage = instance._getEmptyMessage();
+
+							if (emptyMessage && !emptyMessage.hasClass('hide')) {
+								emptyMessage.hide(true);
+							}
+						}
+					);
+
+					uploader.get('boundingBox').hide();
+
+					uploader.render();
+
+					uploader.after('alluploadscomplete', instance._startNextUpload, instance);
+					uploader.after('fileselect', instance._onFileSelect, instance);
+
+					instance._uploader = uploader;
+				}
+
+				return uploader;
+			},
+
+			_getUploadURL: function(folderId) {
+				var instance = this;
+
+				var uploadURL = instance._uploadURL;
+
+				if (!uploadURL) {
+					var config = instance._config;
+
+					var redirect = config.redirect;
+
+					uploadURL = unescape(config.uploadURL);
+
+					instance._uploadURL = Liferay.Util.addParams(
+						{
+							redirect: redirect,
+							ts: Lang.now()
+						},
+						uploadURL
+					);
+				}
+
+				return sub(
+					uploadURL,
+					{
+						folderId: folderId
+					}
+				);
+			},
+
+			_initDLUpload: function() {
+				var instance = this;
+
+				var config = instance._config;
+
+				var maxFileSize = config.maxFileSize;
+
+				var foldersConfig = config.folders;
+
+				instance._folderId = foldersConfig.defaultParentFolderId;
+
+				instance._attachEventHandlers();
+
+				var columnNames = config.columnNames;
+
+				columnNames.push('');
+				columnNames.unshift('');
+
+				instance._columnNames = columnNames;
+
+				instance._dimensions = foldersConfig.dimensions;
+
+				instance._handles = [];
+				instance._tooltipDelegates = [];
+
+				var appViewEntryTemplates = instance.byId('appViewEntryTemplates');
+
+				instance._invisibleDescriptiveEntry = appViewEntryTemplates.one(SELECTOR_ENTRY_DISPLAY_STYLE + SELECTOR_DISPLAY_DESCRIPTIVE);
+				instance._invisibleIconEntry = appViewEntryTemplates.one(SELECTOR_ENTRY_DISPLAY_STYLE + SELECTOR_DISPLAY_ICON);
+
+				instance._maxFileSize = maxFileSize;
+
+				instance._viewFileEntryURL = config.viewFileEntryURL;
+
+				instance._invalidFileSizeText = Liferay.Language.get('please-enter-a-file-with-a-valid-file-size-no-larger-than-x');
+				instance._invalidFileType = Liferay.Language.get('please-enter-a-file-with-a-valid-file-type');
+				instance._zeroByteFileText = Liferay.Language.get('the-file-contains-no-data-and-cannot-be-uploaded.-please-use-the-classic-uploader');
+			},
+
+			_isUploading: function() {
+				var instance = this;
+
+				var uploader = instance._uploader;
+
+				var queue = uploader && uploader.queue;
+
+				return !!(queue && (queue.queuedFiles.length > 0 || queue.numberOfUploads > 0 || !A.Object.isEmpty(queue.currentFiles)) && queue._currentState === UploaderQueue.UPLOADING);
+			},
+
+			_onDataRequest: function(event) {
+				var instance = this;
+
+				if (instance._isUploading()) {
+					event.halt();
+				}
+			},
+
+			_getUploadStatus: function(key) {
+				var instance = this;
+
+				var dataSet = instance._getDataSet();
+
+				return dataSet.item(String(key));
+			},
+
+			_onFileSelect: function(event) {
+				var instance = this;
+
+				var target = event.details[0].target;
+
+				var filesPartition = instance._validateFiles(event.fileList);
+
+				instance._updateStatusUI(target, filesPartition);
+
+				instance._queueSelectedFiles(target, filesPartition);
+			},
+
+			_positionProgressBar: function(overlay, progressBar) {
+				var instance = this;
+
+				var progressBarBoundingBox = progressBar.get(STR_BOUNDING_BOX);
+
+				progressBar.render(overlay.get(STR_BOUNDING_BOX));
+
+				progressBarBoundingBox.center(overlay.get(STR_CONTENT_BOX));
+			},
+
+			_queueSelectedFiles: function(target, filesPartition) {
+				var instance = this;
+
+				var key = instance._getFolderId(target);
+
+				var keyData = instance._getUploadStatus(key);
+
+				var validFiles = filesPartition.matches;
+
+				if (keyData) {
+					instance._updateDataSetEntry(key, keyData, validFiles);
+				}
+				else {
+					var dataSet = instance._getDataSet();
+
+					var folderNode = null;
+
+					if (key != instance._folderId) {
+						folderNode = instance._getFolderEntryNode(target);
+					}
+
+					dataSet.add(
+						key,
+						{
+							fileList: validFiles,
+							target: folderNode,
+							folder: (key != instance._folderId),
+							folderId: key,
+							invalidFiles: filesPartition.rejects
+						}
+					);
+				}
+
+				if (!instance._isUploading()) {
+					instance._startUpload();
+				}
+			},
+
+			_showFileUploadComplete: function(event, displayStyle) {
+				var instance = this;
+
+				var file = event.file;
+
+				var fileNode = file.target;
+
+				var response = instance._getUploadResponse(event.data);
+
+				if (response) {
+					var hasErrors = !!response.error;
+
+					if (hasErrors) {
+						instance._displayEntryError(fileNode, response.message, displayStyle);
+					}
+					else {
+						var displayStyleList = (displayStyle === STR_LIST);
+
+						if (!displayStyleList) {
+							instance._updateThumbnail(fileNode, file.name);
+						}
+
+						instance._updateFileLink(fileNode, response.message, displayStyleList);
+					}
+
+					instance._displayResult(fileNode, displayStyle, hasErrors);
+				}
+
+				file.overlay.hide();
+			},
+
+			_showFileUploadProgress: function(event) {
+				var instance = this;
+
+				instance._updateProgress(event.file.progressBar, event.percentLoaded);
+			},
+
+			_showFileUploadStarting: function(event) {
+				var instance = this;
+
+				var file = event.file;
+
+				instance._positionProgressBar(file.overlay, file.progressBar);
+			},
+
+			_showFolderUploadComplete: function(event, uploadData, displayStyle) {
+				var instance = this;
+
+				var folderEntry = uploadData.target;
+
+				var invalidFiles = uploadData.invalidFiles;
+
+				var invalidFilesLength = invalidFiles.length;
+				var totalFilesLength = uploadData.fileList.length;
+
+				var hasErrors = (invalidFilesLength !== 0);
+
+				if (hasErrors && invalidFilesLength !== totalFilesLength) {
+					hasErrors = ERROR_RESULTS_MIXED;
+				}
+
+				instance._displayResult(folderEntry, displayStyle, hasErrors);
+
+				if (hasErrors) {
+					instance._displayError(
+						folderEntry,
+						TPL_ERROR_FOLDER.parse(
+							{
+								invalidFiles: invalidFiles,
+								invalidFilesLength: invalidFilesLength,
+								validFilesLength: totalFilesLength - invalidFilesLength
+							}
+						)
+					);
+				}
+
+				folderEntry.overlay.hide();
+			},
+
+			_showFolderUploadProgress: function(event, uploadData) {
+				var instance = this;
+
+				instance._updateProgress(uploadData.target.progressBar, event.percentLoaded);
+			},
+
+			_showFolderUploadStarting: function(event, uploadData) {
+				var instance = this;
+
+				var target = uploadData.target;
+
+				instance._positionProgressBar(target.overlay, target.progressBar);
+			},
+
+			_startNextUpload: function(event) {
+				var instance = this;
+
+				instance._detachSubscriptions();
+
+				instance._destroyEntry();
+
+				var dataSet = instance._getDataSet();
+
+				dataSet.removeAt(0);
+
+				if (dataSet.length) {
+					instance._startUpload();
+				}
+			},
+
+			_startUpload: function() {
+				var instance = this;
+
+				var uploadData = instance._getCurrentUploadData();
+
+				var fileList = uploadData.fileList;
+
+				var uploader = instance._getUploader();
+
+				if (fileList.length) {
+					var uploadURL = instance._getUploadURL(uploadData.folderId);
+
+					instance._attachSubscriptions(uploadData);
+
+					uploader.uploadThese(fileList, uploadURL);
+				}
+				else {
+					uploader.fire('alluploadscomplete');
+				}
+			},
+
+			_updateDataSetEntry: function(key, data, unmergedData) {
+				var instance = this;
+
+				var currentUploadData = instance._getCurrentUploadData();
+
+				if (currentUploadData.folderId == key) {
+					instance._addFilesToQueueBottom(unmergedData);
+				}
+				else {
+					instance._combineFileLists(data.fileList, unmergedData);
+
+					var dataSet = instance._getDataSet();
+
+					dataSet.replace(key, data);
+				}
+			},
+
+			_updateFileLink: function(node, id, displayStyleList) {
+				var instance = this;
+
+				var selector = SELECTOR_ENTRY_LINK;
+
+				if (displayStyleList) {
+					selector = SELECTOR_ENTRY_DISPLAY_STYLE + STR_SPACE + SELECTOR_TAGLIB_ICON;
+				}
+
+				var link = node.one(selector);
+
+				if (link) {
+					link.attr('href', Liferay.Util.addParams(id, instance._viewFileEntryURL));
+				}
+			},
+
+			_updateProgress: function(progressBar, value) {
+				var instance = this;
+
+				progressBar.set('value', Math.ceil(value));
+			},
+
+			_updateThumbnail: function(node, fileName) {
+				var instance = this;
+
+				var imageNode = node.one('img');
+
+				var thumbnailPath = instance._getMediaThumbnail(fileName);
+
+				imageNode.attr('src', thumbnailPath);
+			},
+
+			_updateStatusUI: function(target, filesPartition) {
+				var instance = this;
+
+				var folderId = instance._getFolderId(target);
+
+				var folder = (folderId !== instance._folderId);
+
+				if (folder) {
+					var folderEntryNode = instance._getFolderEntryNode(target);
+
+					var folderEntryNodeOverlay = folderEntryNode.overlay;
+
+					if (folderEntryNodeOverlay) {
+						folderEntryNodeOverlay.show();
+
+						instance._updateProgress(folderEntryNode.progressBar, 0);
+					}
+					else {
+						instance._createUploadStatus(folderEntryNode);
+					}
+
+					folderEntryNode.removeClass(CSS_ACTIVE_AREA);
+				}
+				else {
+					var displayStyle = instance._getDisplayStyle();
+
+					AArray.map(
+						filesPartition.matches,
+						function(file) {
+							var entryNode = instance._createEntryNode(file.name, file.size, displayStyle);
+
+							instance._createUploadStatus(entryNode, file);
+						}
+					);
+
+					AArray.map(
+						filesPartition.rejects,
+						function(file) {
+							var entryNode = instance._createEntryNode(file.name, file.size, displayStyle);
+
+							instance._displayEntryError(entryNode, file.errorMessage, instance._getDisplayStyle());
+						}
+					);
+				}
+			},
+
+			_validateFiles: function(data) {
+				var instance = this;
+
+				var maxFileSize = instance._maxFileSize;
+
+				var invalidSizeText = sub(instance._invalidFileSizeText, [maxFileSize / 1024]);
+
+				return AArray.partition(
+					data,
+					function(item, index, collection) {
+						var errorMessage;
+
+						var size = item.get('size') || 0;
+						var type = item.get('type') || '';
+
+						if ((maxFileSize !== 0) && (size > maxFileSize)) {
+							errorMessage = invalidSizeText;
+						}
+						else if (!type) {
+							errorMessage = instance._invalidFileType;
+						}
+						else if (size === 0) {
+							errorMessage = instance._zeroByteFileText;
+						}
+
+						item.errorMessage = errorMessage;
+						item.size = size;
+
+						item.name = item.get('name');
+
+						return !errorMessage;
+					}
+				);
+			}
+		};
+
+		Liferay.DocumentLibraryUpload = DocumentLibraryUpload;
+	},
+	'',
+	{
+		requires: ['aui-data-set-deprecated', 'aui-overlay-manager-deprecated', 'aui-overlay-mask-deprecated', 'aui-progressbar', 'aui-template-deprecated', 'aui-tooltip', 'liferay-app-view-folders', 'liferay-app-view-move', 'liferay-app-view-paginator', 'liferay-app-view-select', 'liferay-search-container', 'uploader']
+	}
+);
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/move_entries.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/move_entries.jsp
new file mode 100644
index 0000000..8bfe1c9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/move_entries.jsp
@@ -0,0 +1,375 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+String referringPortletResource = ParamUtil.getString(request, "referringPortletResource");
+
+long newFolderId = ParamUtil.getLong(request, "newFolderId");
+
+String fileShortcutIds = ParamUtil.getString(request, "fileShortcutIds");
+
+List<Folder> folders = (List<Folder>)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FOLDERS);
+
+List<Folder> invalidMoveFolders = new ArrayList<Folder>();
+List<Folder> validMoveFolders = new ArrayList<Folder>();
+
+for (Folder curFolder : folders) {
+	boolean movePermission = DLFolderPermission.contains(permissionChecker, curFolder, ActionKeys.UPDATE) && (!curFolder.isLocked() || curFolder.hasLock());
+
+	if (movePermission) {
+		validMoveFolders.add(curFolder);
+	}
+	else {
+		invalidMoveFolders.add(curFolder);
+	}
+}
+
+FileEntry fileEntry = (FileEntry)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FILE_ENTRY);
+
+List<FileEntry> fileEntries = null;
+
+if (fileEntry != null) {
+	fileEntries = new ArrayList<FileEntry>();
+
+	fileEntries.add(fileEntry);
+}
+else {
+	fileEntries = (List<FileEntry>)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FILE_ENTRIES);
+}
+
+List<FileEntry> validMoveFileEntries = new ArrayList<FileEntry>();
+List<FileEntry> invalidMoveFileEntries = new ArrayList<FileEntry>();
+
+for (FileEntry curFileEntry : fileEntries) {
+	boolean movePermission = DLFileEntryPermission.contains(permissionChecker, curFileEntry, ActionKeys.UPDATE) && (!curFileEntry.isCheckedOut() || curFileEntry.hasLock());
+
+	if (movePermission) {
+		validMoveFileEntries.add(curFileEntry);
+	}
+	else {
+		invalidMoveFileEntries.add(curFileEntry);
+	}
+}
+
+List<DLFileShortcut> fileShortcuts = (List<DLFileShortcut>)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FILE_SHORTCUTS);
+
+List<DLFileShortcut> invalidShortcutEntries = new ArrayList<DLFileShortcut>();
+List<DLFileShortcut> validShortcutEntries = new ArrayList<DLFileShortcut>();
+
+for (DLFileShortcut curFileShortcut : fileShortcuts) {
+	boolean movePermission = DLFileShortcutPermission.contains(permissionChecker, curFileShortcut, ActionKeys.UPDATE);
+
+	if (movePermission) {
+		validShortcutEntries.add(curFileShortcut);
+	}
+	else {
+		invalidShortcutEntries.add(curFileShortcut);
+	}
+}
+%>
+
+<c:if test="<%= Validator.isNull(referringPortletResource) %>">
+	<liferay-util:include page="/html/portlet/document_library/top_links.jsp" />
+</c:if>
+
+<portlet:actionURL var="moveFileEntryURL">
+	<portlet:param name="struts_action" value="/document_library/move_entry" />
+</portlet:actionURL>
+
+<aui:form action="<%= moveFileEntryURL %>" enctype="multipart/form-data" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveFileEntry(false);" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.MOVE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="newFolderId" type="hidden" value="<%= newFolderId %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title="move-files"
+	/>
+
+	<liferay-ui:error exception="<%= DuplicateFileException.class %>" message="the-folder-you-selected-already-has-an-entry-with-this-name.-please-select-a-different-folder" />
+	<liferay-ui:error exception="<%= DuplicateFolderNameException.class %>" message="the-folder-you-selected-already-has-an-entry-with-this-name.-please-select-a-different-folder" />
+	<liferay-ui:error exception="<%= NoSuchFolderException.class %>" message="please-enter-a-valid-folder" />
+
+	<c:if test="<%= !validMoveFolders.isEmpty() %>">
+		<div class="move-list-info">
+			<h4><%= LanguageUtil.format(pageContext, "x-folders-ready-to-be-moved", validMoveFolders.size()) %></h4>
+		</div>
+
+		<div class="move-list">
+			<ul class="unstyled">
+
+				<%
+				for (Folder folder : validMoveFolders) {
+				%>
+
+					<li class="move-folder">
+						<span class="folder-title">
+							<%= folder.getName() %>
+						</span>
+					</li>
+
+				<%
+				}
+				%>
+
+			</ul>
+		</div>
+	</c:if>
+
+	<c:if test="<%= !invalidMoveFolders.isEmpty() %>">
+		<div class="move-list-info">
+			<h4><%= LanguageUtil.format(pageContext, "x-folders-cannot-be-moved", invalidMoveFolders.size()) %></h4>
+		</div>
+
+		<div class="move-list">
+			<ul class="unstyled">
+
+				<%
+				for (Folder folder : invalidMoveFolders) {
+				%>
+
+					<li class="move-folder move-error">
+						<span class="folder-title">
+							<%= folder.getName() %>
+						</span>
+
+						<span class="error-message">
+							<c:choose>
+								<c:when test="<%= folder.isLocked() && !folder.hasLock() %>">
+									<%= LanguageUtil.get(pageContext, "you-cannot-modify-this-folder-because-it-was-locked") %>
+								</c:when>
+								<c:otherwise>
+									<%= LanguageUtil.get(pageContext, "you-do-not-have-the-required-permissions") %>
+								</c:otherwise>
+							</c:choose>
+						</span>
+					</li>
+
+				<%
+				}
+				%>
+
+			</ul>
+		</div>
+	</c:if>
+
+	<aui:input name="folderIds" type="hidden" value="<%= ListUtil.toString(validMoveFolders, Folder.FOLDER_ID_ACCESSOR) %>" />
+
+	<c:if test="<%= !validMoveFileEntries.isEmpty() %>">
+		<div class="move-list-info">
+			<h4><%= LanguageUtil.format(pageContext, "x-files-ready-to-be-moved", validMoveFileEntries.size()) %></h4>
+		</div>
+
+		<div class="move-list">
+			<ul class="unstyled">
+
+				<%
+				for (FileEntry validMoveFileEntry : validMoveFileEntries) {
+				%>
+
+					<li class="move-file">
+						<span class="file-title" title="<%= validMoveFileEntry.getTitle() %>">
+							<%= validMoveFileEntry.getTitle() %>
+						</span>
+					</li>
+
+				<%
+				}
+				%>
+
+			</ul>
+		</div>
+	</c:if>
+
+	<c:if test="<%= !invalidMoveFileEntries.isEmpty() %>">
+		<div class="move-list-info">
+			<h4><%= LanguageUtil.format(pageContext, "x-files-cannot-be-moved", invalidMoveFileEntries.size()) %></h4>
+		</div>
+
+		<div class="move-list">
+			<ul class="unstyled">
+
+				<%
+				for (FileEntry invalidMoveFileEntry : invalidMoveFileEntries) {
+					Lock lock = invalidMoveFileEntry.getLock();
+				%>
+
+					<li class="move-file move-error">
+						<span class="file-title" title="<%= invalidMoveFileEntry.getTitle() %>">
+							<%= invalidMoveFileEntry.getTitle() %>
+						</span>
+
+						<span class="error-message">
+							<c:choose>
+								<c:when test="<%= invalidMoveFileEntry.isCheckedOut() && !invalidMoveFileEntry.hasLock() %>">
+									<%= LanguageUtil.format(pageContext, "you-cannot-modify-this-document-because-it-was-checked-out-by-x-on-x", new Object[] {HtmlUtil.escape(PortalUtil.getUserName(lock.getUserId(), String.valueOf(lock.getUserId()))), dateFormatDateTime.format(lock.getCreateDate())}, false) %>
+								</c:when>
+								<c:otherwise>
+									<%= LanguageUtil.get(pageContext, "you-do-not-have-the-required-permissions") %>
+								</c:otherwise>
+							</c:choose>
+						</span>
+					</li>
+
+				<%
+				}
+				%>
+
+			</ul>
+		</div>
+	</c:if>
+
+	<aui:input name="fileEntryIds" type="hidden" value="<%= ListUtil.toString(validMoveFileEntries, FileEntry.FILE_ENTRY_ID_ACCESSOR) %>" />
+
+	<c:if test="<%= !validShortcutEntries.isEmpty() %>">
+		<div class="move-list-info">
+			<h4><%= LanguageUtil.format(pageContext, "x-shortcuts-ready-to-be-moved", validShortcutEntries.size()) %></h4>
+		</div>
+
+		<div class="move-list">
+			<ul class="unstyled">
+
+				<%
+				for (DLFileShortcut fileShortcut : validShortcutEntries) {
+				%>
+
+					<li class="move-file">
+						<span class="file-title">
+							<%= fileShortcut.getToTitle() + " (" + LanguageUtil.get(themeDisplay.getLocale(), "shortcut") + ")" %>
+						</span>
+					</li>
+
+				<%
+				}
+				%>
+
+			</ul>
+		</div>
+	</c:if>
+
+	<c:if test="<%= !invalidShortcutEntries.isEmpty() %>">
+		<div class="move-list-info">
+			<h4><%= LanguageUtil.format(pageContext, "x-shortcuts-cannot-be-moved", invalidShortcutEntries.size()) %></h4>
+		</div>
+
+		<div class="move-list">
+			<ul class="unstyled">
+
+				<%
+				for (DLFileShortcut fileShortcut : invalidShortcutEntries) {
+				%>
+
+					<li class="move-file move-error">
+						<span class="file-title">
+							<%= fileShortcut.getToTitle() + " (" + LanguageUtil.get(themeDisplay.getLocale(), "shortcut") + ")" %>
+						</span>
+
+						<span class="error-message">
+							<%= LanguageUtil.get(pageContext, "you-do-not-have-the-required-permissions") %>
+						</span>
+					</li>
+
+				<%
+				}
+				%>
+
+			</ul>
+		</div>
+	</c:if>
+
+	<aui:input name="fileShortcutIds" type="hidden" value="<%= fileShortcutIds %>" />
+
+	<aui:fieldset>
+
+		<%
+		String folderName = StringPool.BLANK;
+
+		if (newFolderId > 0) {
+			Folder folder = DLAppLocalServiceUtil.getFolder(newFolderId);
+
+			folder = folder.toEscapedModel();
+
+			folderName = folder.getName();
+		}
+		else {
+			folderName = LanguageUtil.get(pageContext, "home");
+		}
+		%>
+
+		<aui:field-wrapper label="new-folder">
+			<div class="input-append">
+				<liferay-ui:input-resource id="folderName" url="<%= folderName %>" />
+
+				<aui:button name="selectFolderButton" value="select" />
+			</div>
+		</aui:field-wrapper>
+
+		<aui:button-row>
+			<aui:button type="submit" value="move" />
+
+			<aui:button href="<%= redirect %>" type="cancel" />
+		</aui:button-row>
+	</aui:fieldset>
+</aui:form>
+
+<portlet:renderURL var="selectFolderURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+	<portlet:param name="struts_action" value="/document_library/select_folder" />
+	<portlet:param name="folderId" value="<%= String.valueOf(newFolderId) %>" />
+</portlet:renderURL>
+
+<aui:script use="aui-base">
+	A.one('#<portlet:namespace />selectFolderButton').on(
+		'click',
+		function(event) {
+			Liferay.Util.selectEntity(
+				{
+					dialog: {
+						constrain: true,
+						modal: true,
+						width: 680
+					},
+					id: '<portlet:namespace />selectFolder',
+					title: '<liferay-ui:message arguments="folder" key="select-x" />',
+					uri: '<%= selectFolderURL.toString() %>'
+				},
+				function(event) {
+					var folderData = {
+						idString: 'newFolderId',
+						idValue: event.folderid,
+						nameString: 'folderName',
+						nameValue: event.foldername
+					};
+
+					Liferay.Util.selectFolder(folderData, '<portlet:namespace />');
+				}
+			);
+		}
+	);
+</aui:script>
+
+<aui:script>
+	function <portlet:namespace />saveFileEntry() {
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
+
+<%
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "move-files"), currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/move_file_entry.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/move_file_entry.jsp
new file mode 100644
index 0000000..72084d6
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/move_file_entry.jsp
@@ -0,0 +1,189 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+String strutsAction = ParamUtil.getString(request, "struts_action");
+
+String cmd = ParamUtil.getString(request, Constants.CMD);
+
+String tabs2 = ParamUtil.getString(request, "tabs2", "version-history");
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+String referringPortletResource = ParamUtil.getString(request, "referringPortletResource");
+
+FileEntry fileEntry = (FileEntry)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FILE_ENTRY);
+
+long fileEntryId = BeanParamUtil.getLong(fileEntry, request, "fileEntryId");
+
+long folderId = BeanParamUtil.getLong(fileEntry, request, "folderId");
+
+Lock lock = fileEntry.getLock();
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", strutsAction);
+portletURL.setParameter("tabs2", tabs2);
+portletURL.setParameter("redirect", redirect);
+portletURL.setParameter("fileEntryId", String.valueOf(fileEntryId));
+%>
+
+<c:if test="<%= Validator.isNull(referringPortletResource) %>">
+	<liferay-util:include page="/html/portlet/document_library/top_links.jsp" />
+</c:if>
+
+<c:if test="<%= fileEntry.isCheckedOut() %>">
+	<c:choose>
+		<c:when test="<%= fileEntry.hasLock() %>">
+			<div class="alert alert-success">
+				<c:choose>
+					<c:when test="<%= lock.isNeverExpires() %>">
+						<liferay-ui:message key="you-now-have-an-indefinite-lock-on-this-document" />
+					</c:when>
+					<c:otherwise>
+
+						<%
+						String lockExpirationTime = StringUtil.toLowerCase(LanguageUtil.getTimeDescription(pageContext, DLFileEntryConstants.LOCK_EXPIRATION_TIME));
+						%>
+
+						<%= LanguageUtil.format(pageContext, "you-now-have-a-lock-on-this-document", lockExpirationTime, false) %>
+					</c:otherwise>
+				</c:choose>
+			</div>
+		</c:when>
+		<c:otherwise>
+			<div class="alert alert-error">
+				<%= LanguageUtil.format(pageContext, "you-cannot-modify-this-document-because-it-was-checked-out-by-x-on-x", new Object[] {HtmlUtil.escape(PortalUtil.getUserName(lock.getUserId(), String.valueOf(lock.getUserId()))), dateFormatDateTime.format(lock.getCreateDate())}, false) %>
+			</div>
+		</c:otherwise>
+	</c:choose>
+</c:if>
+
+<c:if test="<%= cmd.equals(Constants.MOVE_FROM_TRASH) %>">
+	<div class="alert alert-block">
+		<liferay-ui:message arguments="<%= fileEntry.getTitle() %>" key="the-original-folder-does-not-exist-anymore" />
+	</div>
+</c:if>
+
+<portlet:actionURL var="moveFileEntryURL">
+	<portlet:param name="struts_action" value="/document_library/move_file_entry" />
+</portlet:actionURL>
+
+<aui:form action="<%= moveFileEntryURL %>" enctype="multipart/form-data" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveFileEntry(false);" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= cmd.equals(Constants.MOVE_FROM_TRASH) ? Constants.MOVE_FROM_TRASH : Constants.MOVE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="fileEntryId" type="hidden" value="<%= fileEntryId %>" />
+	<aui:input name="newFolderId" type="hidden" value="<%= folderId %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title='<%= LanguageUtil.get(pageContext, "move") + StringPool.SPACE + fileEntry.getTitle() %>'
+	/>
+
+	<liferay-ui:error exception="<%= DuplicateFileException.class %>" message="the-folder-you-selected-already-has-an-entry-with-this-name.-please-select-a-different-folder" />
+	<liferay-ui:error exception="<%= DuplicateFolderNameException.class %>" message="the-folder-you-selected-already-has-an-entry-with-this-name.-please-select-a-different-folder" />
+	<liferay-ui:error exception="<%= NoSuchFolderException.class %>" message="please-enter-a-valid-folder" />
+
+	<aui:model-context bean="<%= fileEntry %>" model="<%= DLFileEntry.class %>" />
+
+	<aui:fieldset>
+
+		<%
+		String folderName = StringPool.BLANK;
+
+		if (folderId > 0) {
+			Folder folder = DLAppLocalServiceUtil.getFolder(folderId);
+
+			folder = folder.toEscapedModel();
+
+			folderId = folder.getFolderId();
+			folderName = folder.getName();
+		}
+		else {
+			folderName = LanguageUtil.get(pageContext, "home");
+		}
+		%>
+
+		<c:if test="<%= !cmd.equals(Constants.MOVE_FROM_TRASH) %>">
+			<aui:field-wrapper label="current-folder">
+				<liferay-ui:input-resource url="<%= folderName %>" />
+			</aui:field-wrapper>
+		</c:if>
+
+		<aui:field-wrapper label="new-folder">
+			<div class="input-append">
+				<liferay-ui:input-resource id="folderName" url="<%= folderName %>" />
+
+				<aui:button name="selectFolderButton" value="select" />
+			</div>
+		</aui:field-wrapper>
+
+		<aui:button-row>
+			<aui:button disabled="<%= fileEntry.isCheckedOut() && !fileEntry.hasLock() %>" type="submit" value="move" />
+
+			<aui:button href="<%= redirect %>" type="cancel" />
+		</aui:button-row>
+	</aui:fieldset>
+</aui:form>
+
+<portlet:renderURL var="selectFolderURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+	<portlet:param name="struts_action" value="/document_library/select_folder" />
+	<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+</portlet:renderURL>
+
+<aui:script use="aui-base">
+	A.one('#<portlet:namespace />selectFolderButton').on(
+		'click',
+		function(event) {
+			Liferay.Util.selectEntity(
+				{
+					dialog: {
+						constrain: true,
+						modal: true,
+						width: 680
+					},
+					id: '<portlet:namespace />selectFolder',
+					title: '<liferay-ui:message arguments="folder" key="select-x" />',
+					uri: '<%= selectFolderURL.toString() %>'
+				},
+				function(event) {
+					var folderData = {
+						idString: 'newFolderId',
+						idValue: event.folderid,
+						nameString: 'folderName',
+						nameValue: event.foldername
+					};
+
+					Liferay.Util.selectFolder(folderData, '<portlet:namespace />');
+				}
+			);
+		}
+	);
+</aui:script>
+
+<aui:script>
+	function <portlet:namespace />saveFileEntry() {
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
+
+<%
+DLUtil.addPortletBreadcrumbEntries(fileEntry, request, renderResponse);
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "move"), currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/move_file_shortcut.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/move_file_shortcut.jsp
new file mode 100644
index 0000000..4176276
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/move_file_shortcut.jsp
@@ -0,0 +1,147 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+String cmd = ParamUtil.getString(request, Constants.CMD);
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+String referringPortletResource = ParamUtil.getString(request, "referringPortletResource");
+
+DLFileShortcut fileShortcut = (DLFileShortcut)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FILE_SHORTCUT);
+
+long fileShortcutId = BeanParamUtil.getLong(fileShortcut, request, "fileShortcutId");
+
+long folderId = BeanParamUtil.getLong(fileShortcut, request, "folderId");
+%>
+
+<c:if test="<%= Validator.isNull(referringPortletResource) %>">
+	<liferay-util:include page="/html/portlet/document_library/top_links.jsp" />
+</c:if>
+
+<c:if test="<%= cmd.equals(Constants.MOVE_FROM_TRASH) %>">
+	<div class="alert alert-block">
+		<liferay-ui:message arguments='<%= fileShortcut.getToTitle() + " (" + LanguageUtil.get(pageContext, "shortcut") + ")" %>' key="the-original-folder-does-not-exist-anymore" />
+	</div>
+</c:if>
+
+<portlet:actionURL var="moveFileShortcutURL">
+	<portlet:param name="struts_action" value="/document_library/move_file_shortcut" />
+</portlet:actionURL>
+
+<aui:form action="<%= moveFileShortcutURL %>" enctype="multipart/form-data" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveFileShortcut(false);" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= cmd.equals(Constants.MOVE_FROM_TRASH) ? Constants.MOVE_FROM_TRASH : Constants.MOVE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="fileShortcutId" type="hidden" value="<%= fileShortcutId %>" />
+	<aui:input name="newFolderId" type="hidden" value="<%= folderId %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title='<%= LanguageUtil.get(pageContext, "move") + StringPool.SPACE + fileShortcut.getToTitle() + " (" + LanguageUtil.get(pageContext, "shortcut") + ")" %>'
+	/>
+
+	<liferay-ui:error exception="<%= NoSuchFolderException.class %>" message="please-enter-a-valid-folder" />
+
+	<aui:model-context bean="<%= fileShortcut %>" model="<%= DLFileShortcut.class %>" />
+
+	<aui:fieldset>
+
+		<%
+		String folderName = null;
+
+		if (folderId > 0) {
+			Folder folder = DLAppLocalServiceUtil.getFolder(folderId);
+
+			folder = folder.toEscapedModel();
+
+			folderId = folder.getFolderId();
+			folderName = folder.getName();
+		}
+		else {
+			folderName = LanguageUtil.get(pageContext, "home");
+		}
+		%>
+
+		<c:if test="<%= !cmd.equals(Constants.MOVE_FROM_TRASH) %>">
+			<aui:field-wrapper label="current-folder">
+				<liferay-ui:input-resource url="<%= folderName %>" />
+			</aui:field-wrapper>
+		</c:if>
+
+		<aui:field-wrapper label="new-folder">
+			<div class="input-append">
+				<liferay-ui:input-resource id="folderName" url="<%= folderName %>" />
+
+				<aui:button name="selectFolderButton" value="select" />
+			</div>
+		</aui:field-wrapper>
+
+		<aui:button-row>
+			<aui:button type="submit" value="move" />
+
+			<aui:button href="<%= redirect %>" type="cancel" />
+		</aui:button-row>
+	</aui:fieldset>
+</aui:form>
+
+<portlet:renderURL var="selectFolderURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+	<portlet:param name="struts_action" value="/document_library/select_folder" />
+	<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+</portlet:renderURL>
+
+<aui:script use="aui-base">
+	A.one('#<portlet:namespace />selectFolderButton').on(
+		'click',
+		function(event) {
+			Liferay.Util.selectEntity(
+				{
+					dialog: {
+						constrain: true,
+						modal: true,
+						width: 680
+					},
+					id: '<portlet:namespace />selectFolder',
+					title: '<liferay-ui:message arguments="folder" key="select-x" />',
+					uri: '<%= selectFolderURL.toString() %>'
+				},
+				function(event) {
+					var folderData = {
+						idString: 'newFolderId',
+						idValue: event.folderid,
+						nameString: 'folderName',
+						nameValue: event.foldername
+					};
+
+					Liferay.Util.selectFolder(folderData, '<portlet:namespace />');
+				}
+			);
+		}
+	);
+</aui:script>
+
+<aui:script>
+	function <portlet:namespace />saveFileShortcut() {
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
+
+<%
+DLUtil.addPortletBreadcrumbEntries(fileShortcut, request, renderResponse);
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "move"), currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/move_folder.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/move_folder.jsp
new file mode 100644
index 0000000..853516d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/move_folder.jsp
@@ -0,0 +1,143 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+String cmd = ParamUtil.getString(request, Constants.CMD, Constants.MOVE);
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+Folder folder = (Folder)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FOLDER);
+
+long folderId = BeanParamUtil.getLong(folder, request, "folderId");
+
+long repositoryId = BeanParamUtil.getLong(folder, request, "repositoryId");
+long parentFolderId = BeanParamUtil.getLong(folder, request, "parentFolderId", DLFolderConstants.DEFAULT_PARENT_FOLDER_ID);
+%>
+
+<liferay-util:include page="/html/portlet/document_library/top_links.jsp" />
+
+<c:if test="<%= cmd.equals(Constants.MOVE_FROM_TRASH) %>">
+	<div class="alert alert-block">
+		<liferay-ui:message arguments="<%= folder.getName() %>" key="the-original-folder-does-not-exist-anymore" />
+	</div>
+</c:if>
+
+<portlet:actionURL var="moveFolderURL">
+	<portlet:param name="struts_action" value="/document_library/move_folder" />
+</portlet:actionURL>
+
+<aui:form action="<%= moveFolderURL %>" enctype="multipart/form-data" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveFolder(false);" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= cmd %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="folderId" type="hidden" value="<%= folderId %>" />
+	<aui:input name="parentFolderId" type="hidden" value="<%= parentFolderId %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title='<%= LanguageUtil.get(pageContext, "move") + StringPool.SPACE + folder.getName() %>'
+	/>
+
+	<liferay-ui:error exception="<%= DuplicateFileException.class %>" message="the-folder-you-selected-already-has-an-entry-with-this-name.-please-select-a-different-folder" />
+	<liferay-ui:error exception="<%= DuplicateFolderNameException.class %>" message="the-folder-you-selected-already-has-an-entry-with-this-name.-please-select-a-different-folder" />
+	<liferay-ui:error exception="<%= NoSuchFolderException.class %>" message="please-enter-a-valid-folder" />
+
+	<aui:model-context bean="<%= folder %>" model="<%= DLFolder.class %>" />
+
+	<aui:fieldset>
+		<aui:field-wrapper label="parent-folder">
+
+			<%
+			String parentFolderName = "";
+
+			try {
+				if (parentFolderId != DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) {
+					Folder parentFolder = DLAppLocalServiceUtil.getFolder(parentFolderId);
+
+					parentFolderName = parentFolder.getName();
+				}
+			}
+			catch (NoSuchFolderException nsfe) {
+			}
+			%>
+
+			<div class="input-append">
+				<liferay-ui:input-resource id="parentFolderName" url="<%= parentFolderName %>" />
+
+				<aui:button name="selectFolderButton" value="select" />
+
+				<%
+				String taglibRemoveFolder = "Liferay.Util.removeFolderSelection('parentFolderId', 'parentFolderName', '" + renderResponse.getNamespace() + "');";
+				%>
+
+				<aui:button disabled="<%= (parentFolderId <= 0) %>" name="removeFolderButton" onClick="<%= taglibRemoveFolder %>" value="remove" />
+			</div>
+		</aui:field-wrapper>
+		<aui:button-row>
+			<aui:button type="submit" value="move" />
+
+			<aui:button href="<%= redirect %>" type="cancel" />
+		</aui:button-row>
+	</aui:fieldset>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />saveFolder() {
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
+
+<portlet:renderURL var="selectFolderURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+	<portlet:param name="struts_action" value="/document_library/select_folder" />
+	<portlet:param name="folderId" value="<%= String.valueOf(parentFolderId) %>" />
+</portlet:renderURL>
+
+<aui:script use="aui-base">
+	A.one('#<portlet:namespace />selectFolderButton').on(
+		'click',
+		function(event) {
+			Liferay.Util.selectEntity(
+				{
+					dialog: {
+						constrain: true,
+						modal: true,
+						width: 680
+					},
+					id: '<portlet:namespace />selectFolder',
+					title: '<liferay-ui:message arguments="folder" key="select-x" />',
+					uri: '<%= selectFolderURL.toString() %>'
+				},
+				function(event) {
+					var folderData = {
+						idString: 'parentFolderId',
+						idValue: event.folderid,
+						nameString: 'parentFolderName',
+						nameValue: event.foldername
+					};
+
+					Liferay.Util.selectFolder(folderData, '<portlet:namespace />');
+				}
+			);
+		}
+	);
+</aui:script>
+
+<%
+DLUtil.addPortletBreadcrumbEntries(folder, request, renderResponse);
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "move"), currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/player.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/player.jsp
new file mode 100644
index 0000000..117176a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/player.jsp
@@ -0,0 +1,93 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+boolean supportedAudio = GetterUtil.getBoolean((String)request.getAttribute("view_file_entry.jsp-supportedAudio"));
+boolean supportedVideo = GetterUtil.getBoolean((String)request.getAttribute("view_file_entry.jsp-supportedVideo"));
+
+String[] previewFileURLs = (String[])request.getAttribute("view_file_entry.jsp-previewFileURLs");
+String videoThumbnailURL = (String)request.getAttribute("view_file_entry.jsp-videoThumbnailURL");
+
+String mp3PreviewFileURL = null;
+String mp4PreviewFileURL = null;
+String oggPreviewFileURL = null;
+String ogvPreviewFileURL = null;
+
+for (String previewFileURL : previewFileURLs) {
+	if (previewFileURL.endsWith("mp3")) {
+		mp3PreviewFileURL = previewFileURL;
+	}
+	else if (previewFileURL.endsWith("mp4")) {
+		mp4PreviewFileURL = previewFileURL;
+	}
+	else if (previewFileURL.endsWith("ogg")) {
+		oggPreviewFileURL = previewFileURL;
+	}
+	else if (previewFileURL.endsWith("ogv")) {
+		ogvPreviewFileURL = previewFileURL;
+	}
+}
+%>
+
+<c:choose>
+	<c:when test="<%= supportedAudio %>">
+		<aui:script use="aui-audio">
+			var audio = new A.Audio(
+				{
+					contentBox: '#<portlet:namespace />previewFileContent',
+					fixedAttributes: {
+						allowfullscreen: 'true',
+						wmode: 'opaque'
+					}
+
+					<c:if test="<%= Validator.isNotNull(oggPreviewFileURL) %>">
+						, oggUrl: '<%= HtmlUtil.escapeJS(oggPreviewFileURL) %>'
+					</c:if>
+
+					<c:if test="<%= Validator.isNotNull(mp3PreviewFileURL) %>">
+						, url: '<%= HtmlUtil.escapeJS(mp3PreviewFileURL) %>'
+					</c:if>
+				}
+			).render();
+		</aui:script>
+	</c:when>
+	<c:when test="<%= supportedVideo %>">
+		<aui:script use="aui-base,aui-video">
+			new A.Video(
+				{
+					contentBox: '#<portlet:namespace />previewFileContent',
+					fixedAttributes: {
+						allowfullscreen: 'true',
+						bgColor: '#000000',
+						wmode: 'opaque'
+					},
+
+					<c:if test="<%= Validator.isNotNull(ogvPreviewFileURL) %>">
+						ogvUrl: '<%= HtmlUtil.escapeJS(ogvPreviewFileURL) %>',
+					</c:if>
+
+					poster: '<%= HtmlUtil.escapeJS(videoThumbnailURL) %>'
+
+					<c:if test="<%= Validator.isNotNull(mp4PreviewFileURL) %>">
+						, url: '<%= HtmlUtil.escapeJS(mp4PreviewFileURL) %>'
+					</c:if>
+				}
+			).render();
+		</aui:script>
+	</c:when>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/search_resources.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/search_resources.jsp
new file mode 100644
index 0000000..2e6eb2c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/search_resources.jsp
@@ -0,0 +1,443 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+long breadcrumbsFolderId = ParamUtil.getLong(request, "breadcrumbsFolderId");
+
+long repositoryId = ParamUtil.getLong(request, "repositoryId");
+
+if (repositoryId == 0) {
+	repositoryId = scopeGroupId;
+}
+
+long searchRepositoryId = ParamUtil.getLong(request, "searchRepositoryId");
+
+if (searchRepositoryId == 0) {
+	searchRepositoryId = scopeGroupId;
+}
+
+long folderId = ParamUtil.getLong(request, "folderId");
+
+long searchFolderId = ParamUtil.getLong(request, "searchFolderId");
+long searchFolderIds = ParamUtil.getLong(request, "searchFolderIds");
+
+long[] folderIdsArray = null;
+
+Folder folder = null;
+
+if (searchFolderId > 0) {
+	folderIdsArray = new long[] {searchFolderId};
+
+	folder = DLAppServiceUtil.getFolder(searchFolderId);
+}
+else {
+	long defaultFolderId = DLFolderConstants.getFolderId(scopeGroupId, DLFolderConstants.getDataRepositoryId(scopeGroupId, searchFolderIds));
+
+	List<Folder> folders = DLAppServiceUtil.getFolders(scopeGroupId, searchFolderIds);
+
+	List<Long> folderIds = new ArrayList<Long>(folders.size() + 1);
+
+	folderIds.add(defaultFolderId);
+
+	for (Folder subFolder : folders) {
+		folderIds.add(subFolder.getFolderId());
+	}
+
+	folderIdsArray = StringUtil.split(StringUtil.merge(folderIds), 0L);
+}
+
+List<Folder> mountFolders = DLAppServiceUtil.getMountFolders(scopeGroupId, DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, QueryUtil.ALL_POS, QueryUtil.ALL_POS);
+
+String keywords = ParamUtil.getString(request, "keywords");
+
+int searchType = ParamUtil.getInteger(request, "searchType");
+
+int entryStart = ParamUtil.getInteger(request, "entryStart");
+int entryEnd = ParamUtil.getInteger(request, "entryEnd", entriesPerPage);
+
+int total = 0;
+
+boolean ajax = ParamUtil.getBoolean(request, "ajax");
+
+boolean showRepositoryTabs = ParamUtil.getBoolean(request, "showRepositoryTabs");
+
+boolean showSearchInfo = ParamUtil.getBoolean(request, "showSearchInfo");
+
+if (searchType == DLSearchConstants.FRAGMENT) {
+	if (ajax) {
+		showRepositoryTabs = false;
+
+		showSearchInfo = false;
+	}
+	else {
+		searchType = DLSearchConstants.SINGLE;
+
+		showSearchInfo = true;
+
+		if (folderId == DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) {
+			showRepositoryTabs = true;
+		}
+	}
+}
+else if ((searchType == DLSearchConstants.SINGLE) && !ajax) {
+	showSearchInfo = true;
+
+	if (folderId == DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) {
+		showRepositoryTabs = true;
+	}
+}
+%>
+
+<aui:input name="repositoryId" type="hidden" value="<%= repositoryId %>" />
+<aui:input name="searchRepositoryId" type="hidden" value="<%= searchRepositoryId %>" />
+
+<c:if test="<%= showSearchInfo %>">
+	<liferay-util:buffer var="searchInfo">
+		<div class="search-info">
+			<span class="keywords">
+				<%= (folder != null) ? LanguageUtil.format(pageContext, "searched-for-x-in-x", new Object[] {HtmlUtil.escape(keywords), folder.getName()}) : LanguageUtil.format(pageContext, "searched-for-x-everywhere", HtmlUtil.escape(keywords)) %>
+			</span>
+
+			<c:if test="<%= folderId != DLFolderConstants.DEFAULT_PARENT_FOLDER_ID %>">
+				<span class="change-search-folder">
+
+					<%
+					String taglibOnClick = "Liferay.fire('" + liferayPortletResponse.getNamespace() + "changeSearchFolder', {searchEverywhere: " + (folder != null) + "});";
+					%>
+
+					<aui:button onClick="<%= taglibOnClick %>" value='<%= (folder != null) ? "search-everywhere" : "search-in-the-current-folder" %>' />
+				</span>
+			</c:if>
+
+			<liferay-ui:icon cssClass="close-search" id="closeSearch" image="../aui/remove" url="javascript:;" />
+		</div>
+
+		<c:if test="<%= windowState.equals(WindowState.MAXIMIZED) %>">
+			<aui:script>
+				Liferay.Util.focusFormField(document.getElementById('<portlet:namespace />keywords'));
+			</aui:script>
+		</c:if>
+
+		<aui:script use="aui-base">
+			A.one('#<portlet:namespace />closeSearch').on(
+				'click',
+				function(event) {
+					Liferay.fire(
+						'<portlet:namespace />dataRequest',
+						{
+							requestParams: {
+								'<portlet:namespace />struts_action': '/document_library/view',
+								'<portlet:namespace />folderId': '<%= String.valueOf(folderId) %>',
+								'<portlet:namespace />viewEntries': <%= Boolean.TRUE.toString() %>
+							},
+							src: Liferay.DL_SEARCH_END
+						}
+					);
+				}
+			);
+		</aui:script>
+	</liferay-util:buffer>
+
+	<div id="<portlet:namespace />searchInfo">
+		<%= searchInfo %>
+	</div>
+</c:if>
+
+<liferay-util:buffer var="searchResults">
+	<liferay-portlet:renderURL varImpl="searchURL">
+		<portlet:param name="struts_action" value="/document_library/search" />
+	</liferay-portlet:renderURL>
+
+	<div class="document-container" id="<portlet:namespace />entriesContainer">
+		<aui:form action="<%= searchURL %>" method="get" name="fm">
+			<liferay-portlet:renderURLParams varImpl="searchURL" />
+			<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+			<aui:input name="breadcrumbsFolderId" type="hidden" value="<%= breadcrumbsFolderId %>" />
+			<aui:input name="searchFolderId" type="hidden" value="<%= searchFolderId %>" />
+			<aui:input name="searchFolderIds" type="hidden" value="<%= searchFolderIds %>" />
+
+			<%
+			PortletURL portletURL = liferayPortletResponse.createRenderURL();
+
+			portletURL.setParameter("struts_action", "/document_library/search");
+			portletURL.setParameter("redirect", redirect);
+			portletURL.setParameter("breadcrumbsFolderId", String.valueOf(breadcrumbsFolderId));
+			portletURL.setParameter("searchFolderId", String.valueOf(searchFolderId));
+			portletURL.setParameter("searchFolderIds", String.valueOf(searchFolderIds));
+			portletURL.setParameter("keywords", keywords);
+
+			try {
+				SearchContext searchContext = SearchContextFactory.getInstance(request);
+
+				searchContext.setAttribute("paginationType", "regular");
+				searchContext.setEnd(entryEnd);
+				searchContext.setFolderIds(folderIdsArray);
+				searchContext.setIncludeDiscussions(true);
+				searchContext.setKeywords(keywords);
+
+				QueryConfig queryConfig = new QueryConfig();
+
+				queryConfig.setHighlightEnabled(true);
+				queryConfig.setSearchSubfolders(true);
+
+				searchContext.setQueryConfig(queryConfig);
+
+				searchContext.setStart(entryStart);
+
+				Hits hits = DLAppServiceUtil.search(searchRepositoryId, searchContext);
+
+				total = hits.getLength();
+
+				request.setAttribute("view.jsp-total", String.valueOf(total));
+
+				PortletURL hitURL = liferayPortletResponse.createRenderURL();
+
+				List<SearchResult> searchResultsList = SearchResultUtil.getSearchResults(hits, locale, hitURL);
+
+				for (int i = 0; i < searchResultsList.size(); i++) {
+					SearchResult searchResult = searchResultsList.get(i);
+
+					Summary summary = searchResult.getSummary();
+
+					FileEntry fileEntry = null;
+					Folder curFolder = null;
+
+					String className = searchResult.getClassName();
+
+					if (className.equals(DLFileEntry.class.getName()) || FileEntry.class.isAssignableFrom(Class.forName(className))) {
+						fileEntry = DLAppLocalServiceUtil.getFileEntry(searchResult.getClassPK());
+					}
+					else if (className.equals(DLFolder.class.getName())) {
+						curFolder = DLAppLocalServiceUtil.getFolder(searchResult.getClassPK());
+					}
+			%>
+
+					<c:choose>
+						<c:when test="<%= (fileEntry != null) && DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.VIEW) %>">
+
+							<%
+							PortletURL tempRowURL = liferayPortletResponse.createRenderURL();
+
+							tempRowURL.setParameter("struts_action", "/document_library/view_file_entry");
+							tempRowURL.setParameter("redirect", HttpUtil.removeParameter(currentURL, liferayPortletResponse.getNamespace() + "ajax"));
+							tempRowURL.setParameter("fileEntryId", String.valueOf(fileEntry.getFileEntryId()));
+
+							FileVersion latestFileVersion = fileEntry.getFileVersion();
+
+							if ((user.getUserId() == fileEntry.getUserId()) || permissionChecker.isCompanyAdmin() || permissionChecker.isGroupAdmin(scopeGroupId) || DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.UPDATE)) {
+								latestFileVersion = fileEntry.getLatestFileVersion();
+							}
+
+							request.setAttribute("view_entries.jsp-fileEntry", fileEntry);
+							%>
+
+							<liferay-ui:app-view-search-entry
+								actionJsp="/html/portlet/document_library/file_entry_action.jsp"
+								containerName="<%= DLUtil.getAbsolutePath(liferayPortletRequest, fileEntry.getFolderId()) %>"
+								cssClass='<%= MathUtil.isEven(i) ? "alt" : StringPool.BLANK %>'
+								description="<%= (summary != null) ? HtmlUtil.escape(summary.getContent()) : fileEntry.getDescription() %>"
+								locked="<%= fileEntry.isCheckedOut() %>"
+								mbMessages="<%= searchResult.getMBMessages() %>"
+								queryTerms="<%= hits.getQueryTerms() %>"
+								rowCheckerId="<%= String.valueOf(fileEntry.getFileEntryId()) %>"
+								rowCheckerName="<%= FileEntry.class.getSimpleName() %>"
+								showCheckbox="<%= DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.DELETE) || DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.UPDATE) %>"
+								status="<%= latestFileVersion.getStatus() %>"
+								thumbnailSrc="<%= DLUtil.getThumbnailSrc(fileEntry, null, themeDisplay) %>"
+								title="<%= (summary != null) ? HtmlUtil.escape(summary.getTitle()) : fileEntry.getTitle() %>"
+								url="<%= tempRowURL.toString() %>"
+							/>
+						</c:when>
+
+						<c:when test="<%= (curFolder != null) && DLFolderPermission.contains(permissionChecker, curFolder, ActionKeys.VIEW) %>">
+
+							<%
+							int status = WorkflowConstants.STATUS_APPROVED;
+
+							if (permissionChecker.isCompanyAdmin() || permissionChecker.isGroupAdmin(curFolder.getGroupId())) {
+								status = WorkflowConstants.STATUS_ANY;
+							}
+
+							String folderImage = "folder_empty_document";
+
+							if (DLAppServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(curFolder.getRepositoryId(), curFolder.getFolderId(), status, true) > 0) {
+								folderImage = "folder_full_document";
+							}
+
+							PortletURL tempRowURL = liferayPortletResponse.createRenderURL();
+
+							tempRowURL.setParameter("struts_action", "/document_library/view");
+							tempRowURL.setParameter("redirect", HttpUtil.removeParameter(currentURL, liferayPortletResponse.getNamespace() + "ajax"));
+							tempRowURL.setParameter("folderId", String.valueOf(curFolder.getFolderId()));
+
+							request.setAttribute("view_entries.jsp-folder", curFolder);
+							request.setAttribute("view_entries.jsp-folderId", String.valueOf(curFolder.getFolderId()));
+							request.setAttribute("view_entries.jsp-repositoryId", String.valueOf(curFolder.getRepositoryId()));
+							%>
+
+							<liferay-ui:app-view-search-entry
+								actionJsp="/html/portlet/document_library/folder_action.jsp"
+								containerName="<%= DLUtil.getAbsolutePath(liferayPortletRequest, curFolder.getParentFolderId()) %>"
+								cssClass='<%= MathUtil.isEven(i) ? "alt" : StringPool.BLANK %>'
+								description="<%= (summary != null) ? HtmlUtil.escape(summary.getContent()) : curFolder.getDescription() %>"
+								queryTerms="<%= hits.getQueryTerms() %>"
+								rowCheckerId="<%= String.valueOf(curFolder.getFolderId()) %>"
+								rowCheckerName="<%= Folder.class.getSimpleName() %>"
+								showCheckbox="<%= DLFolderPermission.contains(permissionChecker, curFolder, ActionKeys.DELETE) || DLFolderPermission.contains(permissionChecker, curFolder, ActionKeys.UPDATE) %>"
+								thumbnailSrc='<%= themeDisplay.getPathThemeImages() + "/file_system/large/" + folderImage + ".png" %>'
+								title="<%= (summary != null) ? HtmlUtil.escape(summary.getTitle()) : curFolder.getName() %>"
+								url="<%= tempRowURL.toString() %>"
+							/>
+						</c:when>
+
+						<c:otherwise>
+							<div style="float: left; margin: 100px 10px 0px;">
+								<img alt="<liferay-ui:message key="image" />" border="no" src="<%= themeDisplay.getPathThemeImages() %>/application/forbidden_action.png" />
+							</div>
+						</c:otherwise>
+					</c:choose>
+
+				<%
+				}
+				%>
+
+				<c:if test="<%= searchResultsList.isEmpty() %>">
+					<div class="alert alert-info">
+						<%= LanguageUtil.format(pageContext, "no-documents-were-found-that-matched-the-keywords-x", "<strong>" + HtmlUtil.escape(keywords) + "</strong>") %>
+					</div>
+				</c:if>
+
+			<%
+			}
+			catch (Exception e) {
+				_log.error(e, e);
+			}
+			%>
+
+		</aui:form>
+	</div>
+
+	<aui:script>
+		Liferay.fire(
+			'<portlet:namespace />pageLoaded',
+			{
+				pagination: {
+					name: 'entryPagination',
+					state: {
+						page: <%= (total == 0) ? 0 : entryEnd / (entryEnd - entryStart) %>,
+						rowsPerPage: <%= (entryEnd - entryStart) %>,
+						total: <%= total %>
+					}
+				},
+				repositoryId: '<%= searchRepositoryId %>',
+				src: Liferay.DL_SEARCH
+			}
+		);
+	</aui:script>
+</liferay-util:buffer>
+
+<c:choose>
+	<c:when test="<%= searchType == DLSearchConstants.SINGLE %>">
+		<c:choose>
+			<c:when test="<%= showRepositoryTabs %>">
+
+			<%
+			String selectedTab = LanguageUtil.get(pageContext, "local");
+
+			for (Folder mountFolder : mountFolders) {
+				if (mountFolder.getRepositoryId() == searchRepositoryId) {
+					selectedTab = mountFolder.getName();
+				}
+			}
+			%>
+
+				<div class="search-results-container" id="<portlet:namespace />searchResultsContainer">
+					<liferay-ui:tabs
+						names='<%= LanguageUtil.get(pageContext, "local") + "," + ListUtil.toString(mountFolders, "name") %>'
+						refresh="<%= false %>"
+						value="<%= selectedTab %>"
+					>
+						<liferay-ui:section>
+							<div class="local-search-results" data-repositoryId="<%= scopeGroupId %>" <%= scopeGroupId == searchRepositoryId ? "data-searchProcessed" : "" %> id="<portlet:namespace />searchResultsContainer<%= scopeGroupId %>">
+								<c:choose>
+									<c:when test="<%= scopeGroupId == searchRepositoryId %>">
+										<%= searchResults %>
+									</c:when>
+									<c:otherwise>
+										<div class="alert alert-info">
+											<%= LanguageUtil.get(pageContext, "searching,-please-wait") %>
+										</div>
+										<div class="loading-animation"></div>
+									</c:otherwise>
+								</c:choose>
+							</div>
+						</liferay-ui:section>
+
+						<%
+						for (Folder mountFolder : mountFolders) {
+						%>
+
+							<liferay-ui:section>
+								<div data-repositoryId="<%= mountFolder.getRepositoryId() %>" <%= mountFolder.getRepositoryId() == searchRepositoryId ? "data-searchProcessed" : "" %> id="<portlet:namespace />searchResultsContainer<%= mountFolder.getRepositoryId() %>">
+									<c:choose>
+										<c:when test="<%= mountFolder.getRepositoryId() == searchRepositoryId %>">
+											<%= searchResults %>
+										</c:when>
+										<c:otherwise>
+											<div class="alert alert-info">
+												<%= LanguageUtil.get(pageContext, "searching,-please-wait") %>
+											</div>
+											<div class="loading-animation"></div>
+										</c:otherwise>
+									</c:choose>
+								</div>
+							</liferay-ui:section>
+
+						<%
+						}
+						%>
+
+					</liferay-ui:tabs>
+				</div>
+			</c:when>
+			<c:otherwise>
+				<div class="repository-search-results" data-repositoryId="<%= searchRepositoryId %>" id='<%= liferayPortletResponse.getNamespace() + "searchResultsContainer" + searchRepositoryId %>'>
+					<%= searchResults %>
+				</div>
+			</c:otherwise>
+		</c:choose>
+	</c:when>
+	<c:when test="<%= searchType == DLSearchConstants.FRAGMENT %>">
+		<div data-repositoryId="<%= searchRepositoryId %>" id="<portlet:namespace />fragmentSearchResults">
+			<%= searchResults %>
+		</div>
+	</c:when>
+</c:choose>
+
+<%
+request.setAttribute("view.jsp-folderId", String.valueOf(folderId));
+%>
+
+<span id="<portlet:namespace />displayStyleButtons">
+</span>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.document_library.search_resources_jsp");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/select_file_entry.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/select_file_entry.jsp
new file mode 100644
index 0000000..428b913
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/select_file_entry.jsp
@@ -0,0 +1,205 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+Folder folder = (Folder)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FOLDER);
+
+long folderId = BeanParamUtil.getLong(folder, request, "folderId", DLFolderConstants.DEFAULT_PARENT_FOLDER_ID);
+
+long groupId = BeanParamUtil.getLong(folder, request, "groupId");
+String eventName = ParamUtil.getString(request, "eventName", liferayPortletResponse.getNamespace() + "selectFileEntry_" + groupId);
+
+if (folder != null) {
+	DLUtil.addPortletBreadcrumbEntries(folder, request, renderResponse);
+}
+%>
+
+<aui:form method="post" name="selectFileEntryFm">
+	<liferay-ui:header
+		title="home"
+	/>
+
+	<liferay-ui:breadcrumb showGuestGroup="<%= false %>" showLayout="<%= false %>" showParentGroups="<%= false %>" />
+
+	<%
+	PortletURL portletURL = renderResponse.createRenderURL();
+
+	portletURL.setParameter("struts_action", "/document_library/select_file_entry");
+	portletURL.setParameter("groupId", String.valueOf(groupId));
+	portletURL.setParameter("folderId", String.valueOf(folderId));
+	%>
+
+	<liferay-ui:search-container
+		iteratorURL="<%= portletURL %>"
+		total="<%= DLAppServiceUtil.getFoldersCount(groupId, folderId) %>"
+	>
+		<liferay-ui:search-container-results
+			results="<%= DLAppServiceUtil.getFolders(groupId, folderId, searchContainer.getStart(), searchContainer.getEnd()) %>"
+		/>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.kernel.repository.model.Folder"
+			keyProperty="folderId"
+			modelVar="curFolder"
+			rowVar="row"
+		>
+			<liferay-portlet:renderURL varImpl="rowURL">
+				<portlet:param name="struts_action" value="/document_library/select_file_entry" />
+				<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+				<portlet:param name="folderId" value="<%= String.valueOf(curFolder.getFolderId()) %>" />
+			</liferay-portlet:renderURL>
+
+			<%
+			int fileEntriesCount = 0;
+			int foldersCount = 0;
+
+			try{
+				List<Long> subfolderIds = DLAppServiceUtil.getSubfolderIds(groupId, curFolder.getFolderId(), false);
+
+				foldersCount = subfolderIds.size();
+
+				subfolderIds.clear();
+				subfolderIds.add(curFolder.getFolderId());
+
+				fileEntriesCount = DLAppServiceUtil.getFoldersFileEntriesCount(groupId, subfolderIds, WorkflowConstants.STATUS_APPROVED);
+			}
+			catch (com.liferay.portal.kernel.repository.RepositoryException re) {
+				rowURL = null;
+			}
+			catch (com.liferay.portal.security.auth.PrincipalException pe) {
+				rowURL = null;
+			}
+
+			String image = null;
+
+			if ((foldersCount + fileEntriesCount) > 0) {
+				image = "folder_full_document";
+			}
+			else {
+				image = "folder_empty";
+			}
+			%>
+
+			<liferay-ui:search-container-column-text
+				name="folder"
+			>
+				<liferay-ui:icon image="<%= image %>" label="<%= true %>" message="<%= HtmlUtil.escape(curFolder.getName()) %>" url="<%= rowURL.toString() %>" />
+			</liferay-ui:search-container-column-text>
+
+			<liferay-ui:search-container-column-text
+				href="<%= rowURL %>"
+				name="num-of-folders"
+				value="<%= String.valueOf(foldersCount) %>"
+			/>
+
+			<liferay-ui:search-container-column-text
+				href="<%= rowURL %>"
+				name="num-of-documents"
+				value="<%= String.valueOf(fileEntriesCount) %>"
+			/>
+
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+
+	<br />
+
+	<liferay-ui:header
+		title="documents"
+	/>
+
+	<liferay-ui:search-container
+		iteratorURL="<%= portletURL %>"
+		total="<%= DLAppServiceUtil.getFileEntriesCount(groupId, folderId) %>"
+	>
+		<liferay-ui:search-container-results
+			results="<%= DLAppServiceUtil.getFileEntries(groupId, folderId, searchContainer.getStart(), searchContainer.getEnd()) %>"
+		/>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.kernel.repository.model.FileEntry"
+			keyProperty="fileEntryId"
+			modelVar="curFile"
+			rowVar="row"
+		>
+
+			<%
+			String icon = "../file_system/small/" + curFile.getIcon();
+			%>
+
+			<liferay-ui:search-container-column-text
+				name="document"
+			>
+				<liferay-ui:icon image="<%= icon %>" label="<%= true %>" message="<%= HtmlUtil.escape(curFile.getTitle()) %>" />
+
+				<c:if test="<%= Validator.isNotNull(curFile.getDescription()) %>">
+					<br />
+					<%= curFile.getDescription() %>
+				</c:if>
+			</liferay-ui:search-container-column-text>
+
+			<liferay-ui:search-container-column-text
+				name="size"
+				value="<%= TextFormatter.formatStorageSize(curFile.getSize(), locale) %>"
+			/>
+
+			<c:if test="<%= PropsValues.DL_FILE_ENTRY_BUFFERED_INCREMENT_ENABLED %>">
+				<liferay-ui:search-container-column-text
+					name="downloads"
+					value="<%= String.valueOf(curFile.getReadCount()) %>"
+				/>
+			</c:if>
+
+			<liferay-ui:search-container-column-text
+				name="locked"
+				value='<%= LanguageUtil.get(pageContext, curFile.isCheckedOut() ? "yes" : "no") %>'
+			/>
+
+			<liferay-ui:search-container-column-text>
+
+				<%
+				Map<String, Object> data = new HashMap<String, Object>();
+
+				data.put("entryid", curFile.getFileEntryId());
+				data.put("entryname", curFile.getTitle());
+				%>
+
+				<aui:button cssClass="selector-button" data="<%= data %>" value="choose" />
+			</liferay-ui:search-container-column-text>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script use="aui-base">
+	var Util = Liferay.Util;
+
+	A.one('#<portlet:namespace />selectFileEntryFm').delegate(
+		'click',
+		function(event) {
+			var result = Util.getAttributes(event.currentTarget, 'data-');
+
+			Util.getOpener().Liferay.fire('<%= HtmlUtil.escapeJS(eventName) %>', result);
+
+			Util.getWindow().hide();
+		},
+		'.selector-button'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/select_folder.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/select_folder.jsp
new file mode 100644
index 0000000..aacbfe1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/select_folder.jsp
@@ -0,0 +1,189 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+Folder folder = (Folder)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FOLDER);
+
+long folderId = BeanParamUtil.getLong(folder, request, "folderId", DLFolderConstants.DEFAULT_PARENT_FOLDER_ID);
+
+String eventName = ParamUtil.getString(request, "eventName", liferayPortletResponse.getNamespace() + "selectFolder");
+
+long repositoryId = scopeGroupId;
+String folderName = LanguageUtil.get(pageContext, "home");
+
+if (folder != null) {
+	repositoryId = folder.getRepositoryId();
+	folderName = folder.getName();
+
+	DLUtil.addPortletBreadcrumbEntries(folder, request, renderResponse);
+}
+%>
+
+<aui:form method="post" name="selectFolderFm">
+	<liferay-ui:header
+		title="home"
+	/>
+
+	<liferay-ui:breadcrumb showGuestGroup="<%= false %>" showLayout="<%= false %>" showParentGroups="<%= false %>" />
+
+	<aui:button-row>
+		<c:if test="<%= showAddFolderButton && DLFolderPermission.contains(permissionChecker, repositoryId, folderId, ActionKeys.ADD_FOLDER) %>">
+			<portlet:renderURL var="editFolderURL">
+				<portlet:param name="struts_action" value="/document_library/edit_folder" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="repositoryId" value="<%= String.valueOf(repositoryId) %>" />
+				<portlet:param name="parentFolderId" value="<%= String.valueOf(folderId) %>" />
+			</portlet:renderURL>
+
+			<aui:button href="<%= editFolderURL %>" value='<%= (folder == null) ? "add-folder" : "add-subfolder" %>' />
+		</c:if>
+
+		<%
+		Map<String, Object> data = new HashMap<String, Object>();
+
+		data.put("folderid", folderId);
+		data.put("folderissupportsmetadata", ((folder != null) ? folder.isSupportsMetadata() : Boolean.TRUE.toString()));
+		data.put("folderissupportssocial", ((folder != null) ? folder.isSupportsSocial() : Boolean.TRUE.toString()));
+		data.put("foldername", HtmlUtil.escapeAttribute(folderName));
+		%>
+
+		<aui:button cssClass="selector-button" data="<%= data %>" value="choose-this-folder" />
+	</aui:button-row>
+
+	<%
+	PortletURL portletURL = renderResponse.createRenderURL();
+
+	portletURL.setParameter("struts_action", "/document_library/select_folder");
+	portletURL.setParameter("folderId", String.valueOf(folderId));
+	%>
+
+	<liferay-ui:search-container
+		iteratorURL="<%= portletURL %>"
+		total="<%= DLAppServiceUtil.getFoldersCount(repositoryId, folderId) %>"
+	>
+
+		<liferay-ui:search-container-results
+			results="<%= DLAppServiceUtil.getFolders(repositoryId, folderId, searchContainer.getStart(), searchContainer.getEnd()) %>"
+		/>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.kernel.repository.model.Folder"
+			keyProperty="folderId"
+			modelVar="curFolder"
+			rowVar="row"
+		>
+			<liferay-portlet:renderURL varImpl="rowURL">
+				<portlet:param name="struts_action" value="/document_library/select_folder" />
+				<portlet:param name="folderId" value="<%= String.valueOf(curFolder.getFolderId()) %>" />
+			</liferay-portlet:renderURL>
+
+			<%
+			int foldersCount = 0;
+			int fileEntriesCount = 0;
+
+			try {
+				List<Long> subfolderIds = DLAppServiceUtil.getSubfolderIds(curFolder.getRepositoryId(), curFolder.getFolderId(), false);
+
+				foldersCount = subfolderIds.size();
+
+				subfolderIds.clear();
+				subfolderIds.add(curFolder.getFolderId());
+
+				fileEntriesCount = DLAppServiceUtil.getFoldersFileEntriesCount(curFolder.getRepositoryId(), subfolderIds, WorkflowConstants.STATUS_APPROVED);
+			}
+			catch (com.liferay.portal.kernel.repository.RepositoryException re) {
+				rowURL = null;
+			}
+			catch (com.liferay.portal.security.auth.PrincipalException pe) {
+				rowURL = null;
+			}
+
+			String image = null;
+
+			if (curFolder.isMountPoint()) {
+				if (rowURL != null) {
+					image = "drive";
+				}
+				else {
+					image = "drive_error";
+				}
+			}
+			else {
+				if ((foldersCount + fileEntriesCount) > 0) {
+					image = "folder_full_document";
+				}
+				else {
+					image = "folder_empty";
+				}
+			}
+			%>
+
+			<liferay-ui:search-container-column-text
+				name="folder"
+			>
+				<liferay-ui:icon image="<%= image %>" label="<%= true %>" message="<%= HtmlUtil.escape(curFolder.getName()) %>" url="<%= (rowURL != null) ? rowURL.toString() : StringPool.BLANK %>" />
+			</liferay-ui:search-container-column-text>
+
+			<liferay-ui:search-container-column-text
+				href="<%= rowURL %>"
+				name="num-of-folders"
+				value="<%= String.valueOf(foldersCount) %>"
+			/>
+
+			<liferay-ui:search-container-column-text
+				href="<%= rowURL %>"
+				name="num-of-documents"
+				value="<%= String.valueOf(fileEntriesCount) %>"
+			/>
+
+			<liferay-ui:search-container-column-text>
+				<c:if test="<%= rowURL != null %>">
+
+					<%
+					Map<String, Object> data = new HashMap<String, Object>();
+
+					data.put("folderid", curFolder.getFolderId());
+					data.put("folderissupportsmetadata", curFolder.isSupportsMetadata());
+					data.put("folderissupportssocial", curFolder.isSupportsSocial());
+					data.put("foldername", HtmlUtil.escapeAttribute(curFolder.getName()));
+					%>
+
+					<aui:button cssClass="selector-button" data="<%= data %>" value="choose" />
+				</c:if>
+			</liferay-ui:search-container-column-text>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script use="aui-base">
+	var Util = Liferay.Util;
+
+	A.one('#<portlet:namespace />selectFolderFm').delegate(
+		'click',
+		function(event) {
+			var result = Util.getAttributes(event.currentTarget, 'data-');
+
+			Util.getOpener().Liferay.fire('<%= HtmlUtil.escapeJS(eventName) %>', result);
+
+			Util.getWindow().hide();
+		},
+		'.selector-button'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/select_group.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/select_group.jsp
new file mode 100644
index 0000000..eb81093
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/select_group.jsp
@@ -0,0 +1,166 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+String eventName = ParamUtil.getString(request, "eventName", liferayPortletResponse.getNamespace() + "selectGroup");
+%>
+
+<aui:form method="post" name="selectGroupFm">
+	<liferay-ui:header
+		title="sites"
+	/>
+
+	<%
+	PortletURL portletURL = renderResponse.createRenderURL();
+
+	portletURL.setParameter("struts_action", "/document_library/select_group");
+	%>
+
+	<liferay-ui:search-container
+		searchContainer="<%= new GroupSearch(renderRequest, portletURL) %>"
+	>
+		<liferay-ui:search-form
+			page="/html/portlet/users_admin/group_search.jsp"
+			searchContainer="<%= searchContainer %>"
+		/>
+
+		<div class="separator"><!-- --></div>
+
+		<%
+		GroupSearchTerms searchTerms = (GroupSearchTerms)searchContainer.getSearchTerms();
+
+		LinkedHashMap<String, Object> groupParams = new LinkedHashMap<String, Object>();
+
+		groupParams.put("active", true);
+		groupParams.put("usersGroups", user.getUserId());
+		%>
+
+		<liferay-ui:search-container-results>
+
+			<%
+			int additionalSites = 0;
+
+			if (!searchTerms.hasSearchTerms() && PortalUtil.isCompanyControlPanelPortlet(PortletKeys.DOCUMENT_LIBRARY, themeDisplay)) {
+				if (searchContainer.getStart() == 0) {
+					results.add(company.getGroup());
+				}
+
+				additionalSites++;
+
+				if (searchContainer.getStart() == 0) {
+					Group userPersonalSite = GroupLocalServiceUtil.getGroup(company.getCompanyId(), GroupConstants.USER_PERSONAL_SITE);
+
+					results.add(userPersonalSite);
+				}
+
+				additionalSites++;
+			}
+
+			if (searchTerms.isAdvancedSearch()) {
+				total = GroupLocalServiceUtil.searchCount(company.getCompanyId(), null, searchTerms.getName(), searchTerms.getDescription(), groupParams, searchTerms.isAndOperator());
+			}
+			else {
+				total = GroupLocalServiceUtil.searchCount(company.getCompanyId(), null, searchTerms.getKeywords(), groupParams);
+			}
+
+			total += additionalSites;
+
+			searchContainer.setTotal(total);
+
+			int start = searchContainer.getStart();
+
+			if (searchContainer.getStart() > additionalSites) {
+				start = searchContainer.getStart() - additionalSites;
+			}
+
+			int end = searchContainer.getEnd() - additionalSites;
+
+			List<Group> sites = null;
+
+			if (searchTerms.isAdvancedSearch()) {
+				sites = GroupLocalServiceUtil.search(company.getCompanyId(), null, searchTerms.getName(), searchTerms.getDescription(), groupParams, searchTerms.isAndOperator(), start, end, searchContainer.getOrderByComparator());
+			}
+			else {
+				sites = GroupLocalServiceUtil.search(company.getCompanyId(), null, searchTerms.getKeywords(), groupParams, start, end, searchContainer.getOrderByComparator());
+			}
+
+			results.addAll(sites);
+
+			searchContainer.setResults(results);
+			%>
+
+		</liferay-ui:search-container-results>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.model.Group"
+			escapedModel="<%= true %>"
+			keyProperty="groupId"
+			modelVar="group"
+			rowIdProperty="friendlyURL"
+		>
+
+			<%
+			String groupDescriptiveName = HtmlUtil.escape(group.getDescriptiveName(locale));
+
+			if (group.isUser()) {
+				groupDescriptiveName = LanguageUtil.get(pageContext, "my-site");
+			}
+			%>
+
+			<liferay-ui:search-container-column-text
+				name="name"
+				value="<%= groupDescriptiveName %>"
+			/>
+
+			<liferay-ui:search-container-column-text
+				name="type"
+				value="<%= LanguageUtil.get(pageContext, group.getTypeLabel()) %>"
+			/>
+
+			<liferay-ui:search-container-column-text>
+
+				<%
+				Map<String, Object> data = new HashMap<String, Object>();
+
+				data.put("groupdescriptivename", HtmlUtil.escape(groupDescriptiveName));
+				data.put("groupid", group.getGroupId());
+				%>
+
+				<aui:button cssClass="selector-button" data="<%= data %>" value="choose" />
+			</liferay-ui:search-container-column-text>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script use="aui-base">
+	var Util = Liferay.Util;
+
+	A.one('#<portlet:namespace />selectGroupFm').delegate(
+		'click',
+		function(event) {
+			var result = Util.getAttributes(event.currentTarget, 'data-');
+
+			Util.getOpener().Liferay.fire('<%= HtmlUtil.escapeJS(eventName) %>', result);
+
+			Util.getWindow().hide();
+		},
+		'.selector-button'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/select_restricted_file_entry_type.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/select_restricted_file_entry_type.jsp
new file mode 100644
index 0000000..4890470
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/select_restricted_file_entry_type.jsp
@@ -0,0 +1,81 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+String eventName = ParamUtil.getString(request, "eventName", liferayPortletResponse.getNamespace() + "selectFileEntryType");
+%>
+
+<liferay-util:include page="/html/portlet/document_library/file_entry_type_toolbar.jsp">
+	<liferay-util:param name="strutsAction" value="/document_library/select_restricted_file_entry_type" />
+</liferay-util:include>
+
+<liferay-portlet:renderURL varImpl="portletURL">
+	<portlet:param name="struts_action" value="/document_library/select_restricted_file_entry_type" />
+	<portlet:param name="includeBasicFileEntryType" value="1" />
+</liferay-portlet:renderURL>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="selectFileEntryTypeFm">
+	<liferay-ui:search-container
+		searchContainer="<%= new StructureSearch(renderRequest, portletURL) %>"
+	>
+		<liferay-ui:search-container-results>
+			<%@ include file="/html/portlet/document_library/file_entry_type_search_results.jspf" %>
+		</liferay-ui:search-container-results>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portlet.documentlibrary.model.DLFileEntryType"
+			keyProperty="fileEntryTypeId"
+			modelVar="fileEntryType"
+		>
+			<liferay-ui:search-container-column-text
+				name="name"
+				value="<%= HtmlUtil.escape(fileEntryType.getName(locale)) %>"
+			/>
+
+			<liferay-ui:search-container-column-text>
+
+				<%
+				Map<String, Object> data = new HashMap<String, Object>();
+
+				data.put("fileentrytypeid", fileEntryType.getFileEntryTypeId());
+				data.put("fileentrytypename", fileEntryType.getName(locale));
+				%>
+
+				<aui:button cssClass="selector-button" data="<%= data %>" value="choose" />
+			</liferay-ui:search-container-column-text>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script use="aui-base">
+	var Util = Liferay.Util;
+
+	A.one('#<portlet:namespace />selectFileEntryTypeFm').delegate(
+		'click',
+		function(event) {
+			var result = Util.getAttributes(event.currentTarget, 'data-');
+
+			Util.getOpener().Liferay.fire('<%= HtmlUtil.escapeJS(eventName) %>', result);
+
+			Util.getWindow().hide();
+		},
+		'.selector-button'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/sort_button.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/sort_button.jsp
new file mode 100644
index 0000000..66829e2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/sort_button.jsp
@@ -0,0 +1,93 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+String navigation = ParamUtil.getString(request, "navigation", "home");
+
+long folderId = GetterUtil.getLong((String)request.getAttribute("view.jsp-folderId"));
+
+long fileEntryTypeId = ParamUtil.getLong(request, "fileEntryTypeId", DLFileEntryTypeConstants.FILE_ENTRY_TYPE_ID_ALL);
+
+String orderByType = ParamUtil.getString(request, "orderByType");
+
+String reverseOrderByType = "asc";
+
+if (orderByType.equals("asc")) {
+	reverseOrderByType = "desc";
+}
+%>
+
+<aui:nav-item dropdown="<%= true %>" id="sortButtonContainer" label="sort-by">
+
+	<%
+	String taglibURL = "javascript:" + liferayPortletResponse.getNamespace() + "sortEntries('" + folderId + "', 'title','" + reverseOrderByType + "')";
+	%>
+
+	<aui:nav-item href="<%= taglibURL %>" label="title" />
+
+	<%
+	taglibURL = "javascript:" + liferayPortletResponse.getNamespace() + "sortEntries('" + folderId + "', 'creationDate','" + reverseOrderByType + "')";
+	%>
+
+	<aui:nav-item href="<%= taglibURL %>" label="create-date" />
+
+	<%
+	taglibURL = "javascript:" + liferayPortletResponse.getNamespace() + "sortEntries('" + folderId + "', 'modifiedDate','" + reverseOrderByType + "')";
+	%>
+
+	<aui:nav-item href="<%= taglibURL %>" label="modified-date" />
+
+	<%
+	taglibURL = "javascript:" + liferayPortletResponse.getNamespace() + "sortEntries('" + folderId + "', 'downloads','" + reverseOrderByType + "')";
+	%>
+
+	<aui:nav-item href="<%= taglibURL %>" label="downloads" />
+
+	<%
+	taglibURL = "javascript:" + liferayPortletResponse.getNamespace() + "sortEntries('" + folderId + "', 'size','" + reverseOrderByType + "')";
+	%>
+
+	<aui:nav-item href="<%= taglibURL %>" label="size" />
+</aui:nav-item>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />sortEntries',
+		function(folderId, orderByCol, reverseOrderByType) {
+			Liferay.fire(
+				'<portlet:namespace />dataRequest',
+				{
+					requestParams: {
+						'<portlet:namespace />folderId': folderId,
+						'<portlet:namespace />navigation': '<%= HtmlUtil.escape(navigation) %>',
+						'<portlet:namespace />struts_action': '/document_library/view',
+						'<portlet:namespace />fileEntryTypeId': <%= fileEntryTypeId %>,
+						'<portlet:namespace />viewEntries': <%= Boolean.FALSE.toString() %>,
+						'<portlet:namespace />viewEntriesPage': <%= Boolean.TRUE.toString() %>,
+						'<portlet:namespace />viewFolders': <%= Boolean.FALSE.toString() %>,
+						'<portlet:namespace />orderByCol': orderByCol,
+						'<portlet:namespace />orderByType': reverseOrderByType,
+						'<portlet:namespace />saveOrderBy': <%= Boolean.TRUE.toString() %>
+					}
+				}
+			);
+		},
+		['aui-base']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/toolbar.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/toolbar.jsp
new file mode 100644
index 0000000..afbdb65
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/toolbar.jsp
@@ -0,0 +1,166 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+String strutsAction = ParamUtil.getString(request, "struts_action");
+
+Folder folder = (Folder)request.getAttribute("view.jsp-folder");
+
+long folderId = GetterUtil.getLong((String)request.getAttribute("view.jsp-folderId"));
+
+long repositoryId = GetterUtil.getLong((String)request.getAttribute("view.jsp-repositoryId"));
+
+Group scopeGroup = themeDisplay.getScopeGroup();
+%>
+
+<aui:nav-bar>
+	<aui:nav collapsible="<%= false %>" cssClass="nav-display-style-buttons pull-right" id="displayStyleButtons">
+		<aui:nav-item>
+			<span class="pull-left display-style-buttons-container" id="<portlet:namespace />displayStyleButtonsContainer">
+				<c:if test='<%= !strutsAction.equals("/document_library/search") %>'>
+					<liferay-util:include page="/html/portlet/document_library/display_style_buttons.jsp" />
+				</c:if>
+			</span>
+		</aui:nav-item>
+	</aui:nav>
+
+	<aui:nav id="toolbarContainer">
+		<aui:nav-item cssClass="hide" dropdown="<%= true %>" id="actionsButtonContainer" label="actions">
+			<c:if test="<%= !scopeGroup.isStaged() || scopeGroup.isStagingGroup() || !scopeGroup.isStagedPortlet(PortletKeys.DOCUMENT_LIBRARY) %>">
+
+				<%
+				String taglibURL = "javascript:Liferay.fire('" + renderResponse.getNamespace() + "editEntry', {action: '" + Constants.CANCEL_CHECKOUT + "'}); void(0);";
+				%>
+
+				<aui:nav-item href="<%= taglibURL %>" label="cancel-checkout[document]" />
+
+				<%
+				taglibURL = "javascript:Liferay.fire('" + renderResponse.getNamespace() + "editEntry', {action: '" + Constants.CHECKIN + "'}); void(0);";
+				%>
+
+				<aui:nav-item href="<%= taglibURL %>" label="checkin" />
+
+				<%
+				taglibURL = "javascript:Liferay.fire('" + renderResponse.getNamespace() + "editEntry', {action: '" + Constants.CHECKOUT + "'}); void(0);";
+				%>
+
+				<aui:nav-item href="<%= taglibURL %>" label="checkout[document]" />
+
+				<%
+				taglibURL = "javascript:Liferay.fire('" + renderResponse.getNamespace() + "editEntry', {action: '" + Constants.MOVE + "'}); void(0);";
+				%>
+
+				<aui:nav-item href="<%= taglibURL %>" label="move" />
+			</c:if>
+
+			<%
+			String taglibURL = "javascript:Liferay.fire('" + renderResponse.getNamespace() + "editEntry', {action: '" + Constants.MOVE_TO_TRASH + "'}); void(0);";
+			%>
+
+			<aui:nav-item href="<%= taglibURL %>" iconCssClass="icon-trash" id="moveToTrashAction" label="move-to-the-recycle-bin" />
+
+			<%
+			taglibURL = "javascript:" + renderResponse.getNamespace() + "deleteEntries();";
+			%>
+
+			<aui:nav-item href="<%= taglibURL %>" iconCssClass="icon-remove" id="deleteAction" label="delete" />
+		</aui:nav-item>
+
+		<liferay-util:include page="/html/portlet/document_library/add_button.jsp" />
+
+		<liferay-util:include page="/html/portlet/document_library/sort_button.jsp" />
+
+		<c:if test="<%= !user.isDefaultUser() %>">
+			<aui:nav-item dropdown="<%= true %>" label="manage">
+
+				<%
+				String taglibURL = "javascript:" + renderResponse.getNamespace() + "openFileEntryTypeView()";
+				%>
+
+				<aui:nav-item href="<%= taglibURL %>" iconCssClass="icon-file" label="document-types" />
+
+				<%
+				taglibURL = "javascript:" + renderResponse.getNamespace() + "openDDMStructureView()";
+				%>
+
+				<aui:nav-item href="<%= taglibURL %>" iconCssClass="icon-file-text" label="metadata-sets" />
+			</aui:nav-item>
+		</c:if>
+	</aui:nav>
+
+	<c:if test="<%= showFoldersSearch %>">
+		<aui:nav-bar-search cssClass="pull-right">
+			<div class="form-search">
+				<liferay-portlet:resourceURL varImpl="searchURL">
+					<portlet:param name="struts_action" value="/document_library/search" />
+					<portlet:param name="repositoryId" value="<%= String.valueOf(repositoryId) %>" />
+					<portlet:param name="searchRepositoryId" value="<%= String.valueOf(folderId) %>" />
+					<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+					<portlet:param name="searchFolderId" value="<%= String.valueOf(folderId) %>" />
+				</liferay-portlet:resourceURL>
+
+				<aui:form action="<%= searchURL.toString() %>" method="get" name="fm1" onSubmit="event.preventDefault();">
+					<liferay-portlet:renderURLParams varImpl="searchURL" />
+					<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+					<aui:input name="breadcrumbsFolderId" type="hidden" value="<%= folderId %>" />
+					<aui:input name="searchFolderIds" type="hidden" value="<%= folderId %>" />
+
+					<liferay-ui:input-search />
+				</aui:form>
+			</div>
+		</aui:nav-bar-search>
+	</c:if>
+</aui:nav-bar>
+
+<aui:script>
+	function <portlet:namespace />deleteEntries() {
+		if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-delete-the-selected-entries") %>')) {
+			Liferay.fire(
+				'<%= renderResponse.getNamespace() %>editEntry',
+				{
+					action: '<%= Constants.DELETE %>'
+				}
+			);
+		}
+	}
+
+	function <portlet:namespace />openFileEntryTypeView() {
+		Liferay.Util.openWindow(
+			{
+				id: '<portlet:namespace />openFileEntryTypeView',
+				title: '<%= UnicodeLanguageUtil.get(pageContext, "document-types") %>',
+				uri: '<liferay-portlet:renderURL windowState="<%= LiferayWindowState.POP_UP.toString() %>"><portlet:param name="struts_action" value="/document_library/view_file_entry_type" /><portlet:param name="redirect" value="<%= currentURL %>" /></liferay-portlet:renderURL>'
+			}
+		);
+	}
+
+	function <portlet:namespace />openDDMStructureView() {
+		Liferay.Util.openDDMPortlet(
+			{
+				basePortletURL: '<%= PortletURLFactoryUtil.create(request, PortletKeys.DYNAMIC_DATA_MAPPING, themeDisplay.getPlid(), PortletRequest.RENDER_PHASE) %>',
+				dialog: {
+					destroyOnHide: true
+				},
+				refererPortletName: '<%= PortletKeys.DOCUMENT_LIBRARY %>',
+				showGlobalScope: true,
+				showManageTemplates: false,
+				title: '<%= UnicodeLanguageUtil.get(pageContext, "metadata-sets") %>'
+			}
+		);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/top_links.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/top_links.jsp
new file mode 100644
index 0000000..d79454d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/top_links.jsp
@@ -0,0 +1,105 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library_display/init.jsp" %>
+
+<c:choose>
+	<c:when test="<%= portletName.equals(PortletKeys.DOCUMENT_LIBRARY_DISPLAY) || portletName.equals(PortletKeys.MEDIA_GALLERY_DISPLAY) %>">
+
+		<%
+		String topLink = ParamUtil.getString(request, "topLink", "home");
+
+		long folderId = GetterUtil.getLong((String)request.getAttribute("view.jsp-folderId"));
+
+		long repositoryId = GetterUtil.getLong((String)request.getAttribute("view.jsp-repositoryId"));
+		%>
+
+		<c:if test="<%= showTabs || showFoldersSearch %>">
+			<aui:nav-bar>
+				<c:if test="<%= showTabs %>">
+					<aui:nav>
+
+						<%
+						PortletURL portletURL = renderResponse.createRenderURL();
+
+						String label = "home";
+						boolean selected = topLink.equals(label);
+
+						portletURL.setParameter("topLink", label);
+						portletURL.setParameter("categoryId", StringPool.BLANK);
+						portletURL.setParameter("tag", StringPool.BLANK);
+						%>
+
+						<aui:nav-item className='<%= selected ? "active" : StringPool.BLANK %>' href="<%= portletURL.toString() %>" label="<%= label %>" selected="<%= selected %>" />
+
+						<%
+						label = "recent";
+						selected = topLink.equals(label);
+
+						portletURL.setParameter("topLink", label);
+						%>
+
+						<aui:nav-item className='<%= selected ? "active" : StringPool.BLANK %>' href="<%= portletURL.toString() %>" label="<%= label %>" selected="<%= selected %>" />
+
+						<c:if test="<%= themeDisplay.isSignedIn() %>">
+
+							<%
+							label = "mine";
+							selected = topLink.equals(label);
+
+							portletURL.setParameter("topLink", label);
+							%>
+
+							<aui:nav-item className='<%= selected ? "active" : StringPool.BLANK %>' href="<%= portletURL.toString() %>" label="<%= label %>" selected="<%= selected %>" />
+						</c:if>
+					</aui:nav>
+				</c:if>
+
+				<c:if test="<%= showFoldersSearch %>">
+					<liferay-portlet:renderURL varImpl="searchURL">
+						<portlet:param name="struts_action" value="/document_library_display/search" />
+					</liferay-portlet:renderURL>
+
+					<aui:nav-bar-search cssClass="pull-right">
+						<div class="form-search">
+							<aui:form action="<%= searchURL %>" method="get" name="searchFm">
+								<liferay-portlet:renderURLParams varImpl="searchURL" />
+								<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+								<aui:input name="repositoryId" type="hidden" value="<%= repositoryId %>" />
+								<aui:input name="folderId" type="hidden" value="<%= folderId %>" />
+								<aui:input name="breadcrumbsFolderId" type="hidden" value="<%= folderId %>" />
+								<aui:input name="searchFolderIds" type="hidden" value="<%= folderId %>" />
+
+								<liferay-ui:input-search id="keywords1" />
+							</aui:form>
+						</div>
+					</aui:nav-bar-search>
+
+					<c:if test="<%= windowState.equals(WindowState.MAXIMIZED) %>">
+						<aui:script>
+							Liferay.Util.focusFormField(document.getElementById('<portlet:namespace />keywords1'));
+						</aui:script>
+					</c:if>
+				</c:if>
+			</aui:nav-bar>
+		</c:if>
+	</c:when>
+	<c:when test="<%= (showTabs || showFoldersSearch) && portletName.equals(PortletKeys.DOCUMENT_LIBRARY_DISPLAY) %>">
+		<liferay-ui:header
+			title="home"
+		/>
+	</c:when>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/upload_multiple_file_entries.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/upload_multiple_file_entries.jsp
new file mode 100644
index 0000000..0e71764
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/upload_multiple_file_entries.jsp
@@ -0,0 +1,215 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+String backURL = ParamUtil.getString(request, "backURL");
+
+String referringPortletResource = ParamUtil.getString(request, "referringPortletResource");
+
+FileEntry fileEntry = (FileEntry)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FILE_ENTRY);
+
+long repositoryId = BeanParamUtil.getLong(fileEntry, request, "repositoryId");
+
+if (repositoryId <= 0) {
+
+	// add_asset.jspf only passes in groupId
+
+	repositoryId = BeanParamUtil.getLong(fileEntry, request, "groupId");
+}
+
+long folderId = BeanParamUtil.getLong(fileEntry, request, "folderId");
+%>
+
+<c:if test="<%= Validator.isNull(referringPortletResource) %>">
+	<liferay-util:include page="/html/portlet/document_library/top_links.jsp" />
+</c:if>
+
+<liferay-ui:header
+	backURL="<%= backURL %>"
+	title='<%= portletName.equals(PortletKeys.MEDIA_GALLERY_DISPLAY) ? "add-multiple-media" : "add-multiple-documents" %>'
+/>
+
+<aui:row>
+	<aui:col width="<%= 50 %>">
+		<aui:form name="fm1">
+			<div class="lfr-dynamic-uploader">
+				<div class="lfr-upload-container" id="<portlet:namespace />fileUpload"></div>
+			</div>
+		</aui:form>
+
+		<%
+		Date expirationDate = new Date(System.currentTimeMillis() + PropsValues.SESSION_TIMEOUT * Time.MINUTE);
+
+		Ticket ticket = TicketLocalServiceUtil.addTicket(user.getCompanyId(), User.class.getName(), user.getUserId(), TicketConstants.TYPE_IMPERSONATE, null, expirationDate, new ServiceContext());
+		%>
+
+		<aui:script use="liferay-upload">
+			new Liferay.Upload(
+				{
+					boundingBox: '#<portlet:namespace />fileUpload',
+					deleteFile: '<liferay-portlet:actionURL doAsUserId="<%= user.getUserId() %>"><portlet:param name="struts_action" value="/document_library/edit_file_entry" /><portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE_TEMP %>" /><portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" /></liferay-portlet:actionURL>&ticketKey=<%= ticket.getKey() %><liferay-ui:input-permissions-params modelName="<%= DLFileEntryConstants.getClassName() %>" />',
+					fileDescription: '<%= StringUtil.merge(PrefsPropsUtil.getStringArray(PropsKeys.DL_FILE_EXTENSIONS, StringPool.COMMA)) %>',
+					maxFileSize: '<%= PrefsPropsUtil.getLong(PropsKeys.DL_FILE_MAX_SIZE) %> B',
+					metadataContainer: '#<portlet:namespace />commonFileMetadataContainer',
+					metadataExplanationContainer: '#<portlet:namespace />metadataExplanationContainer',
+					namespace: '<portlet:namespace />',
+					tempFileURL: {
+						method: Liferay.Service.bind('/dlapp/get-temp-file-entry-names'),
+						params: {
+							groupId: <%= scopeGroupId %>,
+							folderId: <%= folderId %>,
+							tempFolderName: 'com.liferay.portlet.documentlibrary.action.EditFileEntryAction'
+						}
+					},
+					tempRandomSuffix: '<%= EditFileEntryAction.TEMP_RANDOM_SUFFIX %>',
+					uploadFile: '<liferay-portlet:actionURL doAsUserId="<%= user.getUserId() %>"><portlet:param name="struts_action" value="/document_library/edit_file_entry" /><portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ADD_TEMP %>" /><portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" /></liferay-portlet:actionURL>&ticketKey=<%= ticket.getKey() %><liferay-ui:input-permissions-params modelName="<%= DLFileEntryConstants.getClassName() %>" />'
+				}
+			);
+		</aui:script>
+	</aui:col>
+	<aui:col width="<%= 50 %>">
+		<div class="common-file-metadata-container hide selected" id="<portlet:namespace />commonFileMetadataContainer">
+			<liferay-util:include page="/html/portlet/document_library/upload_multiple_file_entries_resources.jsp" />
+		</div>
+
+		<%
+		DLUtil.addPortletBreadcrumbEntries(folderId, request, renderResponse);
+
+		PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "add-multiple-file-entries"), currentURL);
+		%>
+
+		<aui:script>
+			Liferay.provide(
+				window,
+				'<portlet:namespace />updateMultipleFiles',
+				function() {
+					var A = AUI();
+					var Lang = A.Lang;
+
+					var commonFileMetadataContainer = A.one('#<portlet:namespace />commonFileMetadataContainer');
+					var selectedFileNameContainer = A.one('#<portlet:namespace />selectedFileNameContainer');
+
+					var inputTpl = '<input id="<portlet:namespace />selectedFileName{0}" name="<portlet:namespace />selectedFileName" type="hidden" value="{1}" />';
+
+					var values = A.all('input[name=<portlet:namespace />selectUploadedFileCheckbox]:checked').val();
+
+					var buffer = [];
+					var dataBuffer = [];
+					var length = values.length;
+
+					for (var i = 0; i < length; i++) {
+						dataBuffer[0] = i;
+						dataBuffer[1] = values[i];
+
+						buffer[i] = Lang.sub(inputTpl, dataBuffer);
+					}
+
+					selectedFileNameContainer.html(buffer.join(''));
+
+					commonFileMetadataContainer.plug(A.LoadingMask);
+
+					commonFileMetadataContainer.loadingmask.show();
+
+					A.io.request(
+						document.<portlet:namespace />fm2.action,
+						{
+							dataType: 'json',
+							form: {
+								id: document.<portlet:namespace />fm2
+							},
+							after: {
+								success: function(event, id, obj) {
+									var jsonArray = this.get('responseData');
+
+									for (var i = 0; i < jsonArray.length; i++) {
+										var item = jsonArray[i];
+
+										var checkBox = A.one('input[data-fileName="' + item.originalFileName + '"]');
+
+										var li = checkBox.ancestor();
+
+										checkBox.remove(true);
+
+										li.removeClass('selectable').removeClass('selected');
+
+										var cssClass = null;
+										var childHTML = null;
+
+										if (item.added) {
+											cssClass = 'file-saved';
+
+											var originalFileName = item.originalFileName;
+
+											var pos = originalFileName.indexOf('<%= EditFileEntryAction.TEMP_RANDOM_SUFFIX %>');
+
+											if (pos != -1) {
+												originalFileName = originalFileName.substr(0, pos);
+											}
+
+											if (originalFileName === item.fileName) {
+												childHTML = '<span class="success-message"><%= UnicodeLanguageUtil.get(pageContext, "successfully-saved") %></span>';
+											}
+											else {
+												childHTML = '<span class="success-message"><%= UnicodeLanguageUtil.get(pageContext, "successfully-saved") %> (' + item.fileName + ')</span>';
+											}
+										}
+										else {
+											cssClass = 'upload-error';
+
+											childHTML = '<span class="error-message">' + item.errorMessage + '</span>';
+										}
+
+										li.addClass(cssClass);
+										li.append(childHTML);
+									}
+
+									<liferay-portlet:resourceURL copyCurrentRenderParameters="<%= false %>" var="uploadMultipleFileEntries">
+										<portlet:param name="struts_action" value="/document_library/edit_file_entry" />
+										<portlet:param name="repositoryId" value="<%= String.valueOf(repositoryId) %>" />
+										<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+									</liferay-portlet:resourceURL>
+
+									if (commonFileMetadataContainer.io) {
+										commonFileMetadataContainer.io.start();
+									}
+									else {
+										commonFileMetadataContainer.load('<%= uploadMultipleFileEntries %>');
+									}
+
+									Liferay.fire('filesSaved');
+								},
+								failure: function(event, id, obj) {
+									var selectedItems = A.all('#<portlet:namespace />fileUpload li.selected');
+
+									selectedItems.removeClass('selectable').removeClass('selected').addClass('upload-error');
+
+									selectedItems.append('<span class="error-message"><%= UnicodeLanguageUtil.get(pageContext, "an-unexpected-error-occurred-while-deleting-the-file") %></span>');
+
+									selectedItems.all('input').remove(true);
+
+									commonFileMetadataContainer.loadingmask.hide();
+								}
+							}
+						}
+					);
+				},
+				['aui-base']
+			);
+		</aui:script>
+	</aui:col>
+</aui:row>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/upload_multiple_file_entries_resources.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/upload_multiple_file_entries_resources.jsp
new file mode 100644
index 0000000..a9d9400
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/upload_multiple_file_entries_resources.jsp
@@ -0,0 +1,265 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+FileEntry fileEntry = (FileEntry)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FILE_ENTRY);
+
+long repositoryId = BeanParamUtil.getLong(fileEntry, request, "repositoryId");
+
+if (repositoryId <= 0) {
+
+	// add_asset.jspf only passes in groupId
+
+	repositoryId = BeanParamUtil.getLong(fileEntry, request, "groupId");
+}
+
+long folderId = BeanParamUtil.getLong(fileEntry, request, "folderId");
+
+Folder folder = null;
+
+if (folderId > 0) {
+	folder = DLAppLocalServiceUtil.getFolder(folderId);
+}
+
+boolean inherited = true;
+
+if ((folder != null) && (folder.getModel() instanceof DLFolder)) {
+	DLFolder dlFolder = (DLFolder)folder.getModel();
+
+	inherited = !dlFolder.isOverrideFileEntryTypes();
+}
+
+List<DLFileEntryType> fileEntryTypes = DLFileEntryTypeServiceUtil.getFolderFileEntryTypes(PortalUtil.getSiteAndCompanyGroupIds(themeDisplay), folderId, inherited);
+
+FileVersion fileVersion = null;
+
+long fileVersionId = 0;
+
+long fileEntryTypeId = ParamUtil.getLong(request, "fileEntryTypeId", -1);
+
+if (fileEntry != null) {
+	fileVersion = fileEntry.getLatestFileVersion();
+
+	fileVersionId = fileVersion.getFileVersionId();
+
+	if ((fileEntryTypeId == -1) && (fileVersion.getModel() instanceof DLFileVersion)) {
+		DLFileVersion dlFileVersion = (DLFileVersion)fileVersion.getModel();
+
+		fileEntryTypeId = dlFileVersion.getFileEntryTypeId();
+	}
+}
+
+DLFileEntryType fileEntryType = null;
+
+if ((fileEntryTypeId == -1) && !fileEntryTypes.isEmpty()) {
+	fileEntryType = fileEntryTypes.get(0);
+
+	fileEntryTypeId = fileEntryType.getFileEntryTypeId();
+}
+
+if (fileEntryTypeId > 0) {
+	fileEntryType = DLFileEntryTypeLocalServiceUtil.getFileEntryType(fileEntryTypeId);
+}
+
+long assetClassPK = 0;
+%>
+
+<portlet:actionURL var="editMultipleFileEntriesURL">
+	<portlet:param name="struts_action" value="document_library/edit_file_entry" />
+</portlet:actionURL>
+
+<aui:form action="<%= editMultipleFileEntriesURL %>" method="post" name="fm2" onSubmit='<%= "event.preventDefault(); " + liferayPortletResponse.getNamespace() + "updateMultipleFiles();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.ADD_MULTIPLE %>" />
+	<aui:input name="repositoryId" type="hidden" value="<%= String.valueOf(repositoryId) %>" />
+	<aui:input name="folderId" type="hidden" value="<%= String.valueOf(folderId) %>" />
+
+	<div class="no-files-selected-info alert alert-info hide" id="<portlet:namespace />metadataExplanationContainer">
+		<liferay-ui:message key="select-documents-from-the-left-to-add-them-to-the-documents-and-media" />
+	</div>
+
+	<aui:model-context bean="<%= fileVersion %>" model="<%= DLFileVersion.class %>" />
+
+	<liferay-ui:panel-container extended="<%= false %>" id="documentLibraryAssetPanelContainer" persistState="<%= true %>">
+		<div class="selected-files-count">
+			<liferay-ui:message key="no-files-selected" />
+		</div>
+
+		<c:if test="<%= (folder == null) || folder.isSupportsMetadata() %>">
+			<aui:input name="description" />
+
+			<c:if test="<%= !fileEntryTypes.isEmpty() %>">
+				<liferay-ui:panel collapsible="<%= true %>" cssClass="document-type" persistState="<%= true %>" title="document-type">
+					<aui:input name="fileEntryTypeId" type="hidden" value="<%= (fileEntryTypeId > 0) ? fileEntryTypeId : 0 %>" />
+					<aui:input name="defaultLanguageId" type="hidden" value="<%= themeDisplay.getLanguageId() %>" />
+
+					<div class="document-type-selector">
+
+						<liferay-ui:icon-menu direction="down" icon='<%= themeDisplay.getPathThemeImages() + "/common/copy.png" %>' id="groupSelector" message='<%= (fileEntryTypeId > 0) ? HtmlUtil.escape(fileEntryType.getName(locale)) : "basic-document" %>' showWhenSingleIcon="<%= true %>">
+
+							<%
+							for (DLFileEntryType curFileEntryType : fileEntryTypes) {
+							%>
+
+								<liferay-portlet:resourceURL copyCurrentRenderParameters="<%= false %>" var="viewFileEntryTypeURL">
+									<portlet:param name="struts_action" value="/document_library/edit_file_entry" />
+									<portlet:param name="repositoryId" value="<%= String.valueOf(repositoryId) %>" />
+									<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+									<portlet:param name="fileEntryTypeId" value="<%= String.valueOf(curFileEntryType.getFileEntryTypeId()) %>" />
+								</liferay-portlet:resourceURL>
+
+								<liferay-ui:icon
+									cssClass="upload-multiple-document-types"
+									id='<%= "fileEntryType_" + String.valueOf(curFileEntryType.getFileEntryTypeId()) %>'
+									image="copy"
+									message="<%= HtmlUtil.escape(curFileEntryType.getName(locale)) %>"
+									method="get"
+									url="<%= viewFileEntryTypeURL %>"
+								/>
+
+							<%
+							}
+							%>
+
+						</liferay-ui:icon-menu>
+					</div>
+
+					<%
+					if (fileEntryTypeId > 0) {
+						try {
+							List<DDMStructure> ddmStructures = fileEntryType.getDDMStructures();
+
+							for (DDMStructure ddmStructure : ddmStructures) {
+								Fields fields = null;
+
+								try {
+									DLFileEntryMetadata fileEntryMetadata = DLFileEntryMetadataLocalServiceUtil.getFileEntryMetadata(ddmStructure.getStructureId(), fileVersionId);
+
+									fields = StorageEngineUtil.getFields(fileEntryMetadata.getDDMStorageId());
+								}
+								catch (Exception e) {
+								}
+					%>
+
+									<div class="document-type-fields">
+										<liferay-ddm:html
+											classNameId="<%= PortalUtil.getClassNameId(DDMStructure.class) %>"
+											classPK="<%= ddmStructure.getPrimaryKey() %>"
+											fields="<%= fields %>"
+											fieldsNamespace="<%= String.valueOf(ddmStructure.getPrimaryKey()) %>"
+											requestedLocale="<%= locale %>"
+										/>
+									</div>
+
+					<%
+							}
+						}
+						catch (Exception e) {
+						}
+					}
+					%>
+
+					<aui:script use="aui-base">
+						var groupSelectorMenu = A.one('#<portlet:namespace />groupSelector').ancestor().one('.lfr-menu-list');
+
+						if (groupSelectorMenu) {
+							groupSelectorMenu.delegate(
+								'click',
+								function(event) {
+									event.preventDefault();
+
+									var documentTypeForm = A.one('#<portlet:namespace />fm2');
+
+									documentTypeForm.load(
+										event.currentTarget.attr('href'),
+										{
+											where: 'outer'
+										},
+										function() {
+											var selectedFilesCountContainer = A.one('.selected-files-count');
+
+											var totalFiles = A.all('input[name=<portlet:namespace />selectUploadedFileCheckbox]');
+
+											var totalFilesCount = totalFiles.size();
+
+											var selectedFiles = totalFiles.filter(':checked');
+
+											var selectedFilesCount = selectedFiles.size();
+
+											var selectedFilesText = selectedFiles.item(0).attr('data-title');
+
+											if (selectedFilesCount > 1) {
+												if (selectedFilesCount == totalFilesCount) {
+													selectedFilesText = '<%= UnicodeLanguageUtil.get(pageContext, "all-files-selected") %>';
+												}
+												else {
+													selectedFilesText = A.Lang.sub('<%= UnicodeLanguageUtil.get(pageContext, "x-files-selected") %>', [selectedFilesCount]);
+												}
+											}
+
+											selectedFilesCountContainer.setContent(selectedFilesText);
+
+											selectedFilesCountContainer.attr('title', selectedFilesText);
+										}
+									);
+								},
+								'li a'
+							);
+						}
+					</aui:script>
+				</liferay-ui:panel>
+			</c:if>
+
+			<liferay-ui:custom-attributes-available className="<%= DLFileEntryConstants.getClassName() %>">
+				<liferay-ui:custom-attribute-list
+					className="<%= DLFileEntryConstants.getClassName() %>"
+					classPK="<%= fileVersionId %>"
+					editable="<%= true %>"
+					label="<%= true %>"
+				/>
+			</liferay-ui:custom-attributes-available>
+		</c:if>
+
+		<c:if test="<%= (folder == null) || folder.isSupportsSocial() %>">
+			<liferay-ui:panel cssClass="categorization-panel" defaultState="closed" extended="<%= false %>" id="dlFileEntryCategorizationPanel" persistState="<%= true %>" title="categorization">
+				<aui:fieldset>
+					<aui:input classPK="<%= assetClassPK %>" model="<%= DLFileEntry.class %>" name="categories" type="assetCategories" />
+
+					<aui:input classPK="<%= assetClassPK %>" model="<%= DLFileEntry.class %>" name="tags" type="assetTags" />
+				</aui:fieldset>
+			</liferay-ui:panel>
+		</c:if>
+	</liferay-ui:panel-container>
+
+	<aui:field-wrapper cssClass="upload-multiple-file-permissions" label="permissions">
+		<liferay-ui:input-permissions
+			modelName="<%= DLFileEntryConstants.getClassName() %>"
+		/>
+	</aui:field-wrapper>
+
+	<span id="<portlet:namespace />selectedFileNameContainer"></span>
+
+	<aui:button type="submit" />
+</aui:form>
+
+<aui:script>
+	<c:if test="<%= (folder == null) || folder.isSupportsSocial() %>">
+		function <portlet:namespace />getSuggestionsContent() {
+			return document.<portlet:namespace />fm2.<portlet:namespace />description.value;
+		}
+	</c:if>
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view.jsp
new file mode 100644
index 0000000..bf10206
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view.jsp
@@ -0,0 +1,281 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+String strutsAction = ParamUtil.getString(request, "struts_action");
+
+Folder folder = (com.liferay.portal.kernel.repository.model.Folder)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FOLDER);
+
+long folderId = BeanParamUtil.getLong(folder, request, "folderId", rootFolderId);
+
+boolean defaultFolderView = false;
+
+if ((folder == null) && (folderId != DLFolderConstants.DEFAULT_PARENT_FOLDER_ID)) {
+	defaultFolderView = true;
+}
+
+if (defaultFolderView) {
+	try {
+		folder = DLAppLocalServiceUtil.getFolder(folderId);
+	}
+	catch (NoSuchFolderException nsfe) {
+		folderId = DLFolderConstants.DEFAULT_PARENT_FOLDER_ID;
+	}
+}
+
+long repositoryId = scopeGroupId;
+
+if (folder != null) {
+	repositoryId = folder.getRepositoryId();
+}
+
+String displayStyle = ParamUtil.getString(request, "displayStyle");
+
+if (Validator.isNull(displayStyle)) {
+	displayStyle = portalPreferences.getValue(PortletKeys.DOCUMENT_LIBRARY, "display-style", PropsValues.DL_DEFAULT_DISPLAY_VIEW);
+}
+
+if (!ArrayUtil.contains(displayViews, displayStyle)) {
+	displayStyle = displayViews[0];
+}
+
+int entryStart = ParamUtil.getInteger(request, "entryStart");
+int entryEnd = ParamUtil.getInteger(request, "entryEnd", entriesPerPage);
+
+int folderStart = ParamUtil.getInteger(request, "folderStart");
+int folderEnd = ParamUtil.getInteger(request, "folderEnd", SearchContainer.DEFAULT_DELTA);
+
+String orderByCol = ParamUtil.getString(request, "orderByCol");
+String orderByType = ParamUtil.getString(request, "orderByType");
+
+if (Validator.isNotNull(orderByCol) && Validator.isNotNull(orderByType)) {
+	portalPreferences.setValue(PortletKeys.DOCUMENT_LIBRARY, "order-by-col", orderByCol);
+	portalPreferences.setValue(PortletKeys.DOCUMENT_LIBRARY, "order-by-type", orderByType);
+}
+
+request.setAttribute("view.jsp-folder", folder);
+
+request.setAttribute("view.jsp-folderId", String.valueOf(folderId));
+
+request.setAttribute("view.jsp-repositoryId", String.valueOf(repositoryId));
+%>
+
+<liferay-util:buffer var="uploadURL"><liferay-portlet:actionURL><portlet:param name="struts_action" value="/document_library/view_file_entry" /><portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ADD_DYNAMIC %>" /><portlet:param name="folderId" value="{folderId}" /><portlet:param name="repositoryId" value="<%= String.valueOf(repositoryId) %>" /></liferay-portlet:actionURL><liferay-ui:input-permissions-params modelName="<%= DLFileEntryConstants.getClassName() %>" /></liferay-util:buffer>
+
+<portlet:actionURL var="undoTrashURL">
+	<portlet:param name="struts_action" value="/document_library/edit_entry" />
+	<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.RESTORE %>" />
+</portlet:actionURL>
+
+<liferay-ui:trash-undo portletURL="<%= undoTrashURL %>" />
+
+<div id="<portlet:namespace />documentLibraryContainer">
+	<aui:row cssClass="lfr-app-column-view">
+		<aui:col cssClass="navigation-pane" width="<%= 20 %>">
+			<liferay-util:include page="/html/portlet/document_library/view_folders.jsp" />
+
+			<div class="folder-pagination"></div>
+		</aui:col>
+
+		<aui:col cssClass="context-pane" width="<%= showFolderMenu ? 80 : 100 %>">
+			<liferay-ui:app-view-toolbar
+				includeDisplayStyle="<%= true %>"
+				includeSelectAll="<%= true %>"
+			>
+				<liferay-util:include page="/html/portlet/document_library/toolbar.jsp" />
+			</liferay-ui:app-view-toolbar>
+
+			<%
+			boolean showSyncMessage = GetterUtil.getBoolean(SessionClicks.get(request, liferayPortletResponse.getNamespace() + "show-sync-message", "true"));
+
+			String cssClass = "show-sync-message-icon-container";
+
+			if (showSyncMessage || !PropsValues.DL_SHOW_LIFERAY_SYNC_MESSAGE) {
+				cssClass += " hide";
+			}
+			%>
+
+			<div class="<%= cssClass %>" id="<portlet:namespace />showSyncMessageIconContainer">
+				<img alt="<%= LanguageUtil.get(pageContext, "show-liferay-sync-tip") %>" class="show-sync-message" id="<portlet:namespace />showSyncMessageIcon" src="<%= themeDisplay.getPathThemeImages() + "/common/liferay_sync.png" %>" title="<%= LanguageUtil.get(pageContext, "liferay-sync") %>" />
+			</div>
+
+			<div class="document-library-breadcrumb" id="<portlet:namespace />breadcrumbContainer">
+				<liferay-util:include page="/html/portlet/document_library/breadcrumb.jsp" />
+			</div>
+
+			<div class="hide" id="<portlet:namespace />syncNotification">
+				<div class="alert alert-info sync-notification" id="<portlet:namespace />syncNotificationContent">
+					<a href="http://www.liferay.com/products/liferay-sync" target="_blank">
+						<liferay-ui:message key="access-these-files-offline-using-liferay-sync" />
+					</a>
+				</div>
+			</div>
+
+			<liferay-portlet:renderURL varImpl="editFileEntryURL">
+				<portlet:param name="struts_action" value="/document_library/edit_file_entry" />
+			</liferay-portlet:renderURL>
+
+			<aui:form action="<%= editFileEntryURL.toString() %>" method="get" name="fm2">
+				<aui:input name="<%= Constants.CMD %>" type="hidden" />
+				<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+				<aui:input name="repositoryId" type="hidden" value="<%= repositoryId %>" />
+				<aui:input name="newFolderId" type="hidden" />
+				<aui:input name="folderIds" type="hidden" />
+				<aui:input name="fileEntryIds" type="hidden" />
+				<aui:input name="fileShortcutIds" type="hidden" />
+
+				<div class="document-container" id="<portlet:namespace />entriesContainer">
+					<c:choose>
+						<c:when test='<%= strutsAction.equals("/document_library/search") %>'>
+							<liferay-util:include page="/html/portlet/document_library/search_resources.jsp" />
+						</c:when>
+						<c:otherwise>
+							<liferay-util:include page="/html/portlet/document_library/view_entries.jsp" />
+						</c:otherwise>
+					</c:choose>
+
+					<%@ include file="/html/portlet/document_library/file_entries_template.jspf" %>
+				</div>
+
+				<div class="document-entries-pagination"></div>
+			</aui:form>
+		</aui:col>
+	</aui:row>
+</div>
+
+<%
+int entriesTotal = GetterUtil.getInteger((String)request.getAttribute("view.jsp-total"));
+int foldersTotal = GetterUtil.getInteger((String)request.getAttribute("view_folders.jsp-total"));
+
+entryEnd = GetterUtil.getInteger(request.getAttribute("view_entries.jsp-entryEnd"), entryEnd);
+entryStart = GetterUtil.getInteger(request.getAttribute("view_entries.jsp-entryStart"), entryStart);
+
+folderEnd = GetterUtil.getInteger(request.getAttribute("view_folders.jsp-folderEnd"), folderEnd);
+folderStart = GetterUtil.getInteger(request.getAttribute("view_folders.jsp-folderStart"), folderStart);
+
+if (!defaultFolderView && (folder != null) && portletName.equals(PortletKeys.DOCUMENT_LIBRARY)) {
+	PortalUtil.setPageSubtitle(folder.getName(), request);
+	PortalUtil.setPageDescription(folder.getDescription(), request);
+}
+%>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />toggleActionsButton',
+		function() {
+			var A = AUI();
+
+			var actionsButton = A.one('#<portlet:namespace />actionsButtonContainer');
+
+			var hide = (Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm2, '<portlet:namespace /><%= RowChecker.ALL_ROW_IDS %>Checkbox').length == 0);
+
+			if (actionsButton) {
+				actionsButton.toggle(!hide);
+			}
+		},
+		['liferay-util-list-fields']
+	);
+
+	<portlet:namespace />toggleActionsButton();
+</aui:script>
+
+<aui:script use="liferay-document-library">
+	<liferay-portlet:resourceURL copyCurrentRenderParameters="<%= false %>" varImpl="mainURL" />
+
+	new Liferay.Portlet.DocumentLibrary(
+		{
+			columnNames: ['<%= StringUtil.merge(entryColumns, "','") %>'],
+			displayStyle: '<%= HtmlUtil.escapeJS(displayStyle) %>',
+			folders: {
+				defaultParams: {
+					p_p_id: <%= HtmlUtil.escapeJS(portletId) %>,
+					p_p_lifecycle: 0
+				},
+				defaultParentFolderId: '<%= DLFolderConstants.DEFAULT_PARENT_FOLDER_ID %>',
+				dimensions: {
+					height: '<%= PrefsPropsUtil.getLong(PropsKeys.DL_FILE_ENTRY_THUMBNAIL_MAX_HEIGHT) %>',
+					width: '<%= PrefsPropsUtil.getLong(PropsKeys.DL_FILE_ENTRY_THUMBNAIL_MAX_WIDTH) %>'
+				},
+				'listViewConfig.useTransition': false,
+				mainUrl: '<%= mainURL %>',
+				strutsAction: '/document_library/view'
+			},
+			trashEnabled: <%= TrashUtil.isTrashEnabled(scopeGroupId) %>,
+			maxFileSize: <%= PrefsPropsUtil.getLong(PropsKeys.DL_FILE_MAX_SIZE) %>,
+			move: {
+				allRowIds: '<%= RowChecker.ALL_ROW_IDS %>',
+				editEntryUrl: '<portlet:actionURL><portlet:param name="struts_action" value="/document_library/edit_entry" /></portlet:actionURL>',
+				folderIdRegEx: /&?<portlet:namespace />folderId=([\d]+)/i,
+				folderIdHashRegEx: /#.*&?<portlet:namespace />folderId=([\d]+)/i,
+				form: {
+					method: 'post',
+					node: A.one(document.<portlet:namespace />fm2)
+				},
+				moveEntryRenderUrl: '<portlet:renderURL><portlet:param name="struts_action" value="/document_library/move_entry" /></portlet:renderURL>',
+				trashLinkId: '<%= TrashUtil.isTrashEnabled(scopeGroupId) ? "_" + PortletKeys.CONTROL_PANEL_MENU + "_portlet_" + PortletKeys.TRASH : StringPool.BLANK %>',
+				updateable: <%= DLFolderPermission.contains(permissionChecker, scopeGroupId, folderId, ActionKeys.UPDATE) %>
+			},
+			paginator: {
+				entriesTotal: <%= entriesTotal %>,
+				entryEnd: <%= entryEnd %>,
+				entryRowsPerPage: <%= entryEnd - entryStart %>,
+				entryStart: <%= entryStart %>,
+				folderEnd: <%= folderEnd %>,
+				folderId: <%= folderId %>,
+				folderRowsPerPage: <%= folderEnd - folderStart %>,
+				folderStart: <%= folderStart %>,
+				foldersTotal: <%= foldersTotal %>
+			},
+			namespace: '<portlet:namespace />',
+			portletId: '<%= HtmlUtil.escapeJS(portletId) %>',
+			redirect: encodeURIComponent('<%= currentURL %>'),
+			repositories: [
+				{
+					id: '<%= scopeGroupId %>',
+					name: '<%= LanguageUtil.get(pageContext, "local") %>'
+				}
+
+				<%
+				List<Folder> mountFolders = DLAppServiceUtil.getMountFolders(repositoryId, DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, QueryUtil.ALL_POS, QueryUtil.ALL_POS);
+
+				for (Folder mountFolder : mountFolders) {
+				%>
+
+					,{
+						id: '<%= mountFolder.getRepositoryId() %>',
+						name: '<%= mountFolder.getName() %>'
+					}
+
+				<%
+				}
+				%>
+
+			],
+			rowIds: '<%= RowChecker.ROW_IDS %>',
+			select: {
+				displayViews: ['<%= StringUtil.merge(displayViews, "','") %>']
+			},
+			syncMessageDisabled: <%= !PropsValues.DL_SHOW_LIFERAY_SYNC_MESSAGE %>,
+			syncMessageSuppressed: <%= !GetterUtil.getBoolean(SessionClicks.get(request, liferayPortletResponse.getNamespace() + "show-sync-message", "true")) %>,
+			updateable: <%= DLFolderPermission.contains(permissionChecker, scopeGroupId, folderId, ActionKeys.UPDATE) %>,
+			uploadURL: '<%= uploadURL %>',
+			viewFileEntryURL: '<portlet:renderURL><portlet:param name="struts_action" value="/document_library/view_file_entry" /><portlet:param name="redirect" value="<%= currentURL %>" /></portlet:renderURL>'
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_entries.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_entries.jsp
new file mode 100644
index 0000000..990f112
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_entries.jsp
@@ -0,0 +1,636 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+String navigation = ParamUtil.getString(request, "navigation", "home");
+
+Folder folder = (Folder)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FOLDER);
+
+long folderId = GetterUtil.getLong((String)request.getAttribute("view.jsp-folderId"));
+
+long repositoryId = GetterUtil.getLong((String)request.getAttribute("view.jsp-repositoryId"));
+
+long fileEntryTypeId = ParamUtil.getLong(request, "fileEntryTypeId", -1);
+
+String dlFileEntryTypeName = LanguageUtil.get(pageContext, "basic-document");
+
+int status = WorkflowConstants.STATUS_APPROVED;
+
+if (permissionChecker.isCompanyAdmin() || permissionChecker.isGroupAdmin(scopeGroupId)) {
+	status = WorkflowConstants.STATUS_ANY;
+}
+
+long categoryId = ParamUtil.getLong(request, "categoryId");
+String tagName = ParamUtil.getString(request, "tag");
+
+boolean useAssetEntryQuery = (categoryId > 0) || Validator.isNotNull(tagName);
+
+String displayStyle = ParamUtil.getString(request, "displayStyle");
+
+if (Validator.isNull(displayStyle)) {
+	displayStyle = portalPreferences.getValue(PortletKeys.DOCUMENT_LIBRARY, "display-style", PropsValues.DL_DEFAULT_DISPLAY_VIEW);
+}
+else {
+	boolean saveDisplayStyle = ParamUtil.getBoolean(request, "saveDisplayStyle");
+
+	if (saveDisplayStyle && ArrayUtil.contains(displayViews, displayStyle)) {
+		portalPreferences.setValue(PortletKeys.DOCUMENT_LIBRARY, "display-style", displayStyle);
+	}
+}
+
+if (!ArrayUtil.contains(displayViews, displayStyle)) {
+	displayStyle = displayViews[0];
+}
+
+PortletURL portletURL = liferayPortletResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/document_library/view");
+portletURL.setParameter("folderId", String.valueOf(folderId));
+portletURL.setParameter("displayStyle", String.valueOf(displayStyle));
+
+int entryStart = ParamUtil.getInteger(request, "entryStart");
+int entryEnd = ParamUtil.getInteger(request, "entryEnd", entriesPerPage);
+
+SearchContainer searchContainer = new SearchContainer(liferayPortletRequest, null, null, "cur2", entryEnd / (entryEnd - entryStart), entryEnd - entryStart, portletURL, null, null);
+
+List<String> headerNames = new ArrayList<String>();
+
+for (String headerName : entryColumns) {
+	if (headerName.equals("action")) {
+		headerName = StringPool.BLANK;
+	}
+	else if (headerName.equals("name")) {
+		headerName = "title";
+	}
+
+	headerNames.add(headerName);
+}
+
+searchContainer.setHeaderNames(headerNames);
+
+EntriesChecker entriesChecker = new EntriesChecker(liferayPortletRequest, liferayPortletResponse);
+
+entriesChecker.setCssClass("entry-selector");
+
+searchContainer.setRowChecker(entriesChecker);
+
+Map<String, String> orderableHeaders = new HashMap<String, String>();
+
+orderableHeaders.put("title", "title");
+orderableHeaders.put("size", "size");
+orderableHeaders.put("create-date", "creationDate");
+orderableHeaders.put("modified-date", "modifiedDate");
+orderableHeaders.put("downloads", "downloads");
+
+String orderByCol = ParamUtil.getString(request, "orderByCol");
+String orderByType = ParamUtil.getString(request, "orderByType");
+
+if (Validator.isNull(orderByCol)) {
+	orderByCol = portalPreferences.getValue(PortletKeys.DOCUMENT_LIBRARY, "order-by-col", StringPool.BLANK);
+	orderByType = portalPreferences.getValue(PortletKeys.DOCUMENT_LIBRARY, "order-by-type", "asc");
+}
+else {
+	boolean saveOrderBy = ParamUtil.getBoolean(request, "saveOrderBy");
+
+	if (saveOrderBy) {
+		portalPreferences.setValue(PortletKeys.DOCUMENT_LIBRARY, "order-by-col", orderByCol);
+		portalPreferences.setValue(PortletKeys.DOCUMENT_LIBRARY, "order-by-type", orderByType);
+	}
+}
+
+OrderByComparator orderByComparator = DLUtil.getRepositoryModelOrderByComparator(orderByCol, orderByType);
+
+searchContainer.setOrderableHeaders(orderableHeaders);
+searchContainer.setOrderByCol(orderByCol);
+searchContainer.setOrderByComparator(orderByComparator);
+searchContainer.setOrderByJS("javascript:" + liferayPortletResponse.getNamespace() + "sortEntries('" + folderId + "', 'orderKey', 'orderByType');");
+searchContainer.setOrderByType(orderByType);
+
+List results = null;
+int total = 0;
+
+if (fileEntryTypeId >= 0) {
+	Indexer indexer = IndexerRegistryUtil.getIndexer(DLFileEntryConstants.getClassName());
+
+	if (fileEntryTypeId > 0) {
+		DLFileEntryType dlFileEntryType = DLFileEntryTypeLocalServiceUtil.getFileEntryType(fileEntryTypeId);
+
+		dlFileEntryTypeName = dlFileEntryType.getName(locale);
+	}
+
+	SearchContext searchContext = SearchContextFactory.getInstance(request);
+
+	searchContext.setAttribute("paginationType", "none");
+	searchContext.setEnd(entryEnd);
+
+	if (orderByCol.equals("creationDate")) {
+		orderByCol = "createDate";
+	}
+	else if (orderByCol.equals("readCount")) {
+		orderByCol = "downloads";
+	}
+	else if (orderByCol.equals("modifiedDate")) {
+		orderByCol = "modified";
+	}
+
+	Sort sort = new Sort(orderByCol, !StringUtil.equalsIgnoreCase(orderByType, "asc"));
+
+	searchContext.setSorts(sort);
+
+	searchContext.setStart(entryStart);
+
+	Hits hits = indexer.search(searchContext);
+
+	total = hits.getLength();
+
+	searchContainer.setTotal(total);
+
+	Document[] docs = hits.getDocs();
+
+	results = new ArrayList(docs.length);
+
+	for (Document doc : docs) {
+		long fileEntryId = GetterUtil.getLong(doc.get(Field.ENTRY_CLASS_PK));
+
+		FileEntry fileEntry = null;
+
+		try {
+			fileEntry = DLAppLocalServiceUtil.getFileEntry(fileEntryId);
+		}
+		catch (Exception e) {
+			if (_log.isWarnEnabled()) {
+				_log.warn("Documents and Media search index is stale and contains file entry {" + fileEntryId + "}");
+			}
+
+			continue;
+		}
+
+		results.add(fileEntry);
+	}
+}
+else {
+	if (navigation.equals("home")) {
+		if (useAssetEntryQuery) {
+			long[] classNameIds = {PortalUtil.getClassNameId(DLFileEntryConstants.getClassName()), PortalUtil.getClassNameId(DLFileShortcut.class.getName())};
+
+			AssetEntryQuery assetEntryQuery = new AssetEntryQuery(classNameIds, searchContainer);
+
+			assetEntryQuery.setEnd(entryEnd);
+			assetEntryQuery.setExcludeZeroViewCount(false);
+			assetEntryQuery.setStart(entryStart);
+
+			total = AssetEntryServiceUtil.getEntriesCount(assetEntryQuery);
+
+			searchContainer.setTotal(total);
+
+			if (total <= entryStart) {
+				entryStart = (searchContainer.getCur() - 1) * searchContainer.getDelta();
+				entryEnd = entryStart + searchContainer.getDelta();
+
+				assetEntryQuery.setEnd(entryEnd);
+				assetEntryQuery.setStart(entryStart);
+			}
+
+			results = AssetEntryServiceUtil.getEntries(assetEntryQuery);
+		}
+		else {
+			total = DLAppServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(repositoryId, folderId, status, false);
+
+			searchContainer.setTotal(total);
+
+			if (total <= entryStart) {
+				entryStart = (searchContainer.getCur() - 1) * searchContainer.getDelta();
+				entryEnd = entryStart + searchContainer.getDelta();
+			}
+
+			results = DLAppServiceUtil.getFoldersAndFileEntriesAndFileShortcuts(repositoryId, folderId, status, false, entryStart, entryEnd, searchContainer.getOrderByComparator());
+		}
+	}
+	else if (navigation.equals("mine") || navigation.equals("recent")) {
+		long groupFileEntriesUserId = 0;
+
+		if (navigation.equals("mine") && themeDisplay.isSignedIn()) {
+			groupFileEntriesUserId = user.getUserId();
+		}
+
+		total = DLAppServiceUtil.getGroupFileEntriesCount(repositoryId, groupFileEntriesUserId, folderId, null, status);
+
+		searchContainer.setTotal(total);
+
+		if (total <= entryStart) {
+			entryStart = (searchContainer.getCur() - 1) * searchContainer.getDelta();
+			entryEnd = entryStart + searchContainer.getDelta();
+		}
+
+		results = DLAppServiceUtil.getGroupFileEntries(repositoryId, groupFileEntriesUserId, folderId, null, status, entryStart, entryEnd, searchContainer.getOrderByComparator());
+	}
+}
+
+searchContainer.setResults(results);
+
+request.setAttribute("view.jsp-total", String.valueOf(total));
+
+request.setAttribute("view_entries.jsp-entryStart", String.valueOf(searchContainer.getStart()));
+request.setAttribute("view_entries.jsp-entryEnd", String.valueOf(searchContainer.getEnd()));
+%>
+
+<div class="subscribe-action">
+	<c:if test="<%= DLPermission.contains(permissionChecker, scopeGroupId, ActionKeys.SUBSCRIBE) && ((folder == null) || folder.isSupportsSubscribing()) && (DLUtil.getEmailFileEntryAddedEnabled(portletPreferences) || DLUtil.getEmailFileEntryUpdatedEnabled(portletPreferences)) %>">
+
+		<%
+		boolean subscribed = false;
+		boolean unsubscribable = true;
+
+		if (fileEntryTypeId == DLFileEntryTypeConstants.FILE_ENTRY_TYPE_ID_ALL) {
+			subscribed = DLUtil.isSubscribedToFolder(themeDisplay.getCompanyId(), scopeGroupId, user.getUserId(), folderId);
+
+			if (subscribed) {
+				if (!DLUtil.isSubscribedToFolder(themeDisplay.getCompanyId(), scopeGroupId, user.getUserId(), folderId, false)) {
+					unsubscribable = false;
+				}
+			}
+		}
+		else {
+			subscribed = DLUtil.isSubscribedToFileEntryType(themeDisplay.getCompanyId(), scopeGroupId, user.getUserId(), fileEntryTypeId);
+		}
+		%>
+
+		<c:choose>
+			<c:when test="<%= subscribed %>">
+				<c:choose>
+					<c:when test="<%= unsubscribable %>">
+						<portlet:actionURL var="unsubscribeURL">
+							<portlet:param name="struts_action" value='<%= (fileEntryTypeId == DLFileEntryTypeConstants.FILE_ENTRY_TYPE_ID_ALL) ? "/document_library/edit_folder" : "/document_library/edit_file_entry_type" %>' />
+							<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UNSUBSCRIBE %>" />
+							<portlet:param name="redirect" value="<%= currentURL %>" />
+
+							<c:choose>
+								<c:when test="<%= fileEntryTypeId == DLFileEntryTypeConstants.FILE_ENTRY_TYPE_ID_ALL %>">
+									<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+								</c:when>
+								<c:otherwise>
+									<portlet:param name="fileEntryTypeId" value="<%= String.valueOf(fileEntryTypeId) %>" />
+								</c:otherwise>
+							</c:choose>
+						</portlet:actionURL>
+
+						<liferay-ui:icon
+							image="unsubscribe"
+							label="<%= true %>"
+							url="<%= unsubscribeURL %>"
+						/>
+					</c:when>
+					<c:otherwise>
+						<liferay-ui:icon
+							image="unsubscribe"
+							label="<%= true %>"
+							message="subscribed-to-a-parent-folder"
+						/>
+					</c:otherwise>
+				</c:choose>
+			</c:when>
+			<c:otherwise>
+				<portlet:actionURL var="subscribeURL">
+					<portlet:param name="struts_action" value='<%= (fileEntryTypeId == DLFileEntryTypeConstants.FILE_ENTRY_TYPE_ID_ALL) ? "/document_library/edit_folder" : "/document_library/edit_file_entry_type" %>' />
+					<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.SUBSCRIBE %>" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+
+					<c:choose>
+						<c:when test="<%= fileEntryTypeId == DLFileEntryTypeConstants.FILE_ENTRY_TYPE_ID_ALL %>">
+							<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+						</c:when>
+						<c:otherwise>
+							<portlet:param name="fileEntryTypeId" value="<%= String.valueOf(fileEntryTypeId) %>" />
+						</c:otherwise>
+					</c:choose>
+				</portlet:actionURL>
+
+				<liferay-ui:icon
+					image="subscribe"
+					label="<%= true %>"
+					url="<%= subscribeURL %>"
+				/>
+			</c:otherwise>
+		</c:choose>
+	</c:if>
+</div>
+
+<c:if test="<%= results.isEmpty() %>">
+	<div class="entries-empty alert alert-info">
+		<c:choose>
+			<c:when test="<%= (fileEntryTypeId >= 0) %>">
+				<liferay-ui:message arguments="<%= HtmlUtil.escape(dlFileEntryTypeName) %>" key="there-are-no-documents-or-media-files-of-type-x" />
+			</c:when>
+			<c:otherwise>
+				<liferay-ui:message key="there-are-no-documents-or-media-files-in-this-folder" />
+			</c:otherwise>
+		</c:choose>
+	</div>
+</c:if>
+
+<%
+for (int i = 0; i < results.size(); i++) {
+	Object result = results.get(i);
+%>
+
+	<%@ include file="/html/portlet/document_library/cast_result.jspf" %>
+
+	<c:choose>
+		<c:when test="<%= fileEntry != null %>">
+			<c:choose>
+				<c:when test='<%= !displayStyle.equals("list") %>'>
+					<c:choose>
+						<c:when test="<%= DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.VIEW) %>">
+
+							<%
+							PortletURL tempRowURL = liferayPortletResponse.createRenderURL();
+
+							tempRowURL.setParameter("struts_action", "/document_library/view_file_entry");
+							tempRowURL.setParameter("redirect", HttpUtil.removeParameter(currentURL, liferayPortletResponse.getNamespace() + "ajax"));
+							tempRowURL.setParameter("fileEntryId", String.valueOf(fileEntry.getFileEntryId()));
+
+							request.setAttribute("view_entries.jsp-fileEntry", fileEntry);
+							request.setAttribute("view_entries.jsp-fileShortcut", fileShortcut);
+
+							request.setAttribute("view_entries.jsp-tempRowURL", tempRowURL);
+							%>
+
+							<c:choose>
+								<c:when test='<%= displayStyle.equals("icon") %>'>
+									<liferay-util:include page="/html/portlet/document_library/view_file_entry_icon.jsp" />
+								</c:when>
+								<c:otherwise>
+									<liferay-util:include page="/html/portlet/document_library/view_file_entry_descriptive.jsp" />
+								</c:otherwise>
+							</c:choose>
+						</c:when>
+
+						<c:otherwise>
+							<div style="float: left; margin: 100px 10px 0px;">
+								<img alt="<liferay-ui:message key="image" />" border="no" src="<%= themeDisplay.getPathThemeImages() %>/application/forbidden_action.png" />
+							</div>
+						</c:otherwise>
+					</c:choose>
+				</c:when>
+
+				<c:otherwise>
+
+					<%
+					FileVersion latestFileVersion = fileEntry.getFileVersion();
+
+					if ((user.getUserId() == fileEntry.getUserId()) || permissionChecker.isCompanyAdmin() || permissionChecker.isGroupAdmin(scopeGroupId) || DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.UPDATE)) {
+						latestFileVersion = fileEntry.getLatestFileVersion();
+					}
+					%>
+
+					<liferay-util:buffer var="fileEntryTitle">
+
+						<%
+						PortletURL rowURL = liferayPortletResponse.createRenderURL();
+
+						rowURL.setParameter("struts_action", "/document_library/view_file_entry");
+						rowURL.setParameter("redirect", HttpUtil.removeParameter(currentURL, liferayPortletResponse.getNamespace() + "ajax"));
+						rowURL.setParameter("fileEntryId", String.valueOf(fileEntry.getFileEntryId()));
+						%>
+
+						<liferay-ui:app-view-entry
+							displayStyle="list"
+							locked="<%= fileEntry.isCheckedOut() %>"
+							showCheckbox="<%= true %>"
+							thumbnailSrc='<%= themeDisplay.getPathThemeImages() + "/file_system/small/" + DLUtil.getFileIcon(fileEntry.getExtension()) + ".png" %>'
+							title="<%= latestFileVersion.getTitle() %>"
+							url="<%= rowURL.toString() %>"
+						/>
+					</liferay-util:buffer>
+
+					<%
+					List resultRows = searchContainer.getResultRows();
+
+					ResultRow row = null;
+
+					if (fileShortcut == null) {
+						row = new ResultRow(fileEntry, fileEntry.getFileEntryId(), i);
+					}
+					else {
+						row = new ResultRow(fileShortcut, fileShortcut.getFileShortcutId(), i);
+					}
+
+					row.setClassName("app-view-entry-taglib entry-display-style selectable");
+
+					Map<String, Object> data = new HashMap<String, Object>();
+
+					data.put("draggable", DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.DELETE) || DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.UPDATE));
+					data.put("title", fileEntry.getTitle());
+
+					row.setData(data);
+
+					for (String columnName : entryColumns) {
+						if (columnName.equals("action")) {
+							row.addJSP("/html/portlet/document_library/file_entry_action.jsp");
+						}
+
+						if (columnName.equals("create-date")) {
+							row.addDate(fileEntry.getCreateDate());
+						}
+
+						if (columnName.equals("downloads")) {
+							row.addText(String.valueOf(fileEntry.getReadCount()));
+						}
+
+						if (columnName.equals("modified-date")) {
+							row.addDate(latestFileVersion.getModifiedDate());
+						}
+
+						if (columnName.equals("name")) {
+							TextSearchEntry fileEntryTitleSearchEntry = new TextSearchEntry();
+
+							fileEntryTitleSearchEntry.setName(fileEntryTitle);
+
+							row.addSearchEntry(fileEntryTitleSearchEntry);
+						}
+
+						if (columnName.equals("size")) {
+							row.addText(TextFormatter.formatStorageSize(latestFileVersion.getSize(), locale));
+						}
+
+						if (columnName.equals("status")) {
+							row.addStatus(latestFileVersion.getStatus(), latestFileVersion.getStatusByUserId(), latestFileVersion.getStatusDate());
+						}
+					}
+
+					resultRows.add(row);
+					%>
+
+				</c:otherwise>
+			</c:choose>
+		</c:when>
+
+		<c:when test="<%= curFolder != null %>">
+			<c:choose>
+				<c:when test='<%= !displayStyle.equals("list") %>'>
+
+					<%
+					String folderImage = "folder_empty_document";
+
+					if (DLAppServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(curFolder.getRepositoryId(), curFolder.getFolderId(), status, true) > 0) {
+						folderImage = "folder_full_document";
+					}
+
+					PortletURL tempRowURL = liferayPortletResponse.createRenderURL();
+
+					tempRowURL.setParameter("struts_action", "/document_library/view");
+					tempRowURL.setParameter("redirect", currentURL);
+					tempRowURL.setParameter("folderId", String.valueOf(curFolder.getFolderId()));
+
+					request.setAttribute("view_entries.jsp-folder", curFolder);
+					request.setAttribute("view_entries.jsp-folderId", String.valueOf(curFolder.getFolderId()));
+					request.setAttribute("view_entries.jsp-repositoryId", String.valueOf(curFolder.getRepositoryId()));
+
+					request.setAttribute("view_entries.jsp-folderImage", folderImage);
+
+					request.setAttribute("view_entries.jsp-tempRowURL", tempRowURL);
+					%>
+
+					<c:choose>
+						<c:when test='<%= displayStyle.equals("icon") %>'>
+							<liferay-util:include page="/html/portlet/document_library/view_folder_icon.jsp" />
+						</c:when>
+
+						<c:otherwise>
+							<liferay-util:include page="/html/portlet/document_library/view_folder_descriptive.jsp" />
+						</c:otherwise>
+					</c:choose>
+				</c:when>
+				<c:otherwise>
+					<liferay-util:buffer var="folderTitle">
+
+						<%
+						String folderImage = "folder_empty";
+
+						if (DLAppServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(curFolder.getRepositoryId(), curFolder.getFolderId(), status, true) > 0) {
+							folderImage = "folder_full_document";
+						}
+
+						Map<String, Object> data = new HashMap<String, Object>();
+
+						data.put("folder", true);
+						data.put("folder-id", curFolder.getFolderId());
+
+						PortletURL rowURL = liferayPortletResponse.createRenderURL();
+
+						rowURL.setParameter("struts_action", "/document_library/view");
+						rowURL.setParameter("redirect", currentURL);
+						rowURL.setParameter("folderId", String.valueOf(curFolder.getFolderId()));
+						%>
+
+						<liferay-ui:app-view-entry
+							data="<%= data %>"
+							displayStyle="list"
+							folder="<%= true %>"
+							showCheckbox="<%= false %>"
+							thumbnailSrc='<%= themeDisplay.getPathThemeImages() + "/common/" + folderImage + ".png" %>'
+							title="<%= curFolder.getName() %>"
+							url="<%= rowURL.toString() %>"
+						/>
+					</liferay-util:buffer>
+
+					<%
+					List resultRows = searchContainer.getResultRows();
+
+					ResultRow row = new ResultRow(curFolder, curFolder.getPrimaryKey(), i);
+
+					row.setClassName("app-view-entry-taglib entry-display-style selectable");
+
+					Map<String, Object> data = new HashMap<String, Object>();
+
+					data.put("draggable", DLFolderPermission.contains(permissionChecker, curFolder, ActionKeys.DELETE) || DLFolderPermission.contains(permissionChecker, curFolder, ActionKeys.UPDATE));
+					data.put("folder", true);
+					data.put("folder-id", curFolder.getFolderId());
+					data.put("title", curFolder.getName());
+
+					row.setData(data);
+
+					for (String columnName : entryColumns) {
+						if (columnName.equals("action")) {
+							row.addJSP("/html/portlet/document_library/folder_action.jsp");
+						}
+
+						if (columnName.equals("create-date")) {
+							row.addDate(curFolder.getCreateDate());
+						}
+
+						if (columnName.equals("downloads")) {
+							row.addText("--");
+						}
+
+						if (columnName.equals("modified-date")) {
+							row.addDate(curFolder.getModifiedDate());
+						}
+
+						if (columnName.equals("name")) {
+							TextSearchEntry folderTitleSearchEntry = new TextSearchEntry();
+
+							folderTitleSearchEntry.setName(folderTitle);
+
+							row.addSearchEntry(folderTitleSearchEntry);
+						}
+
+						if (columnName.equals("size")) {
+							row.addText("--");
+						}
+
+						if (columnName.equals("status")) {
+							row.addText("--");
+						}
+					}
+
+					resultRows.add(row);
+					%>
+
+				</c:otherwise>
+			</c:choose>
+		</c:when>
+	</c:choose>
+
+<%
+}
+%>
+
+<c:if test='<%= displayStyle.equals("list") %>'>
+	<liferay-ui:search-iterator paginate="<%= false %>" searchContainer="<%= searchContainer %>" />
+</c:if>
+
+<aui:script>
+	Liferay.fire(
+		'<portlet:namespace />pageLoaded',
+		{
+			pagination: {
+				name: 'entryPagination',
+				state: {
+					page: <%= (total == 0) ? 0 : searchContainer.getCur() %>,
+					rowsPerPage: <%= searchContainer.getDelta() %>,
+					total: <%= total %>
+				}
+			}
+		}
+	);
+</aui:script>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.document_library.view_entries_jsp");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_file_entries.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_file_entries.jspf
new file mode 100644
index 0000000..e4316a3
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_file_entries.jspf
@@ -0,0 +1,170 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-portlet:renderURL varImpl="deleteURL">
+	<portlet:param name="struts_action" value="/document_library_display/edit_file_entry" />
+</liferay-portlet:renderURL>
+
+<aui:form action="<%= deleteURL.toString() %>" method="get" name="fm">
+	<liferay-portlet:renderURLParams varImpl="portletURL" />
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+	<aui:input name="fileEntryIds" type="hidden" />
+	<aui:input name="fileShortcutIds" type="hidden" />
+
+	<%
+	EntriesChecker entriesChecker = null;
+
+	boolean showDeleteButton = permissionChecker.hasPermission(scopeGroupId, DLFileEntryConstants.getClassName(), scopeGroupId, ActionKeys.DELETE) && !portletName.equals(PortletKeys.TRASH);
+
+	if (showActions && showDeleteButton) {
+		entriesChecker = new EntriesChecker(liferayPortletRequest, liferayPortletResponse);
+	}
+	%>
+
+	<liferay-ui:search-container
+		curParam="cur2"
+		delta="<%= fileEntriesPerPage %>"
+		deltaConfigurable="<%= false %>"
+		emptyResultsMessage="there-are-no-documents-or-media-files-in-this-folder"
+		headerNames="<%= StringUtil.merge(fileEntryColumns) %>"
+		iteratorURL="<%= portletURL %>"
+		rowChecker="<%= entriesChecker %>"
+	>
+		<liferay-ui:search-container-results>
+
+			<%
+			if (useAssetEntryQuery) {
+				long[] classNameIds = {PortalUtil.getClassNameId(DLFileEntryConstants.getClassName()), PortalUtil.getClassNameId(DLFileShortcut.class.getName())};
+
+				AssetEntryQuery assetEntryQuery = new AssetEntryQuery(classNameIds, searchContainer);
+
+				assetEntryQuery.setExcludeZeroViewCount(false);
+
+				total = AssetEntryServiceUtil.getEntriesCount(assetEntryQuery);
+
+				searchContainer.setTotal(total);
+
+				assetEntryQuery.setEnd(searchContainer.getEnd());
+				assetEntryQuery.setStart(searchContainer.getStart());
+
+				results = AssetEntryServiceUtil.getEntries(assetEntryQuery);
+			}
+			else {
+				if (mergedView) {
+					total = DLAppServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(repositoryId, folderId, status, true);
+
+					searchContainer.setTotal(total);
+
+					results = DLAppServiceUtil.getFoldersAndFileEntriesAndFileShortcuts(repositoryId, folderId, status, true, searchContainer.getStart(), searchContainer.getEnd());
+				}
+				else {
+					total = DLAppServiceUtil.getFileEntriesAndFileShortcutsCount(repositoryId, folderId, status);
+
+					searchContainer.setTotal(total);
+
+					results = DLAppServiceUtil.getFileEntriesAndFileShortcuts(repositoryId, folderId, status, searchContainer.getStart(), searchContainer.getEnd());
+				}
+			}
+
+			searchContainer.setResults(results);
+			%>
+
+		</liferay-ui:search-container-results>
+
+		<liferay-ui:search-container-row
+			className="Object"
+			keyProperty="primaryKey"
+			modelVar="result"
+		>
+			<%@ include file="/html/portlet/document_library/cast_result.jspf" %>
+
+			<%
+			if (curFolder != null) {
+			%>
+
+				<liferay-portlet:renderURL varImpl="rowURL">
+					<portlet:param name="struts_action" value="/document_library_display/view" />
+					<portlet:param name="redirect" value="<%= redirect %>" />
+					<portlet:param name="folderId" value="<%= String.valueOf(curFolder.getFolderId()) %>" />
+				</liferay-portlet:renderURL>
+
+				<%@ include file="/html/portlet/document_library/folder_columns.jspf" %>
+
+			<%
+			}
+			else {
+				String rowHREF = null;
+
+				if (DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.VIEW)) {
+					PortletURL tempRowURL = renderResponse.createRenderURL();
+
+					if (portletName.equals(PortletKeys.TRASH)) {
+						tempRowURL.setParameter("struts_action", "/trash/view_content");
+						tempRowURL.setParameter("redirect", currentURL);
+						tempRowURL.setParameter("className", DLFileEntryConstants.getClassName());
+						tempRowURL.setParameter("classPK", String.valueOf(fileEntry.getPrimaryKey()));
+					}
+					else if (fileShortcut == null) {
+						tempRowURL.setParameter("struts_action", "/document_library_display/view_file_entry");
+						tempRowURL.setParameter("redirect", currentURL);
+						tempRowURL.setParameter("fileEntryId", String.valueOf(fileEntry.getFileEntryId()));
+					}
+					else {
+						tempRowURL.setParameter("struts_action", "/document_library_display/view_file_entry");
+						tempRowURL.setParameter("redirect", currentURL);
+						tempRowURL.setParameter("fileEntryId", String.valueOf(fileShortcut.getToFileEntryId()));
+					}
+
+					rowHREF = tempRowURL.toString();
+				}
+			%>
+
+				<%@ include file="/html/portlet/document_library/file_entry_columns.jspf" %>
+
+			<%
+			}
+			%>
+
+		</liferay-ui:search-container-row>
+
+		<c:if test="<%= (total > 0) && showActions && showDeleteButton %>">
+			<aui:button onClick='<%= renderResponse.getNamespace() + "deleteEntries();" %>' value='<%= ((repositoryId == scopeGroupId) && TrashUtil.isTrashEnabled(scopeGroupId)) ? "move-to-the-recycle-bin" : "delete" %>' />
+
+			<div class="separator"><!-- --></div>
+		</c:if>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />deleteEntries',
+		function() {
+			if (<%= ((repositoryId == scopeGroupId) && TrashUtil.isTrashEnabled(scopeGroupId)) %> || confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-delete-this-entry") %>')) {
+				document.<portlet:namespace />fm.method = "post";
+				document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= ((repositoryId == scopeGroupId) && TrashUtil.isTrashEnabled(scopeGroupId)) ? Constants.MOVE_TO_TRASH : Constants.DELETE %>";
+				document.<portlet:namespace />fm.<portlet:namespace />fileEntryIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds', '<portlet:namespace />rowIdsFileEntryCheckbox');
+				document.<portlet:namespace />fm.<portlet:namespace />fileShortcutIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds', '<portlet:namespace />rowIdsDLFileShortcutCheckbox');
+
+				submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/document_library/edit_entry" /></portlet:actionURL>");
+			}
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_file_entry.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_file_entry.jsp
new file mode 100644
index 0000000..4187e11
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_file_entry.jsp
@@ -0,0 +1,1068 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+String tabs2 = ParamUtil.getString(request, "tabs2", "version-history");
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+String referringPortletResource = ParamUtil.getString(request, "referringPortletResource");
+
+String uploadProgressId = "dlFileEntryUploadProgress";
+
+FileEntry fileEntry = (FileEntry)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FILE_ENTRY);
+
+long fileEntryId = fileEntry.getFileEntryId();
+
+long folderId = fileEntry.getFolderId();
+
+if (Validator.isNull(redirect)) {
+	PortletURL portletURL = renderResponse.createRenderURL();
+
+	portletURL.setParameter("struts_action", "/document_library/view");
+	portletURL.setParameter("folderId", String.valueOf(folderId));
+
+	redirect = portletURL.toString();
+}
+
+Folder folder = fileEntry.getFolder();
+FileVersion fileVersion = (FileVersion)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FILE_VERSION);
+
+boolean versionSpecific = false;
+
+if (fileVersion != null) {
+	versionSpecific = true;
+}
+else if ((user.getUserId() == fileEntry.getUserId()) || permissionChecker.isCompanyAdmin() || permissionChecker.isGroupAdmin(scopeGroupId) || DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.UPDATE)) {
+	fileVersion = fileEntry.getLatestFileVersion();
+}
+else {
+	fileVersion = fileEntry.getFileVersion();
+}
+
+long fileVersionId = fileVersion.getFileVersionId();
+
+long fileEntryTypeId = 0;
+
+if (fileVersion.getModel() instanceof DLFileVersion) {
+	DLFileVersion dlFileVersion = (DLFileVersion)fileVersion.getModel();
+
+	fileEntryTypeId = dlFileVersion.getFileEntryTypeId();
+}
+
+Lock lock = fileEntry.getLock();
+
+String[] conversions = new String[0];
+
+if (PropsValues.DL_FILE_ENTRY_CONVERSIONS_ENABLED && PrefsPropsUtil.getBoolean(PropsKeys.OPENOFFICE_SERVER_ENABLED, PropsValues.OPENOFFICE_SERVER_ENABLED)) {
+	conversions = (String[])DocumentConversionUtil.getConversions(fileVersion.getExtension());
+}
+
+long assetClassPK = 0;
+
+if (!fileVersion.isApproved() && !fileVersion.getVersion().equals(DLFileEntryConstants.VERSION_DEFAULT) && !fileEntry.isInTrash()) {
+	assetClassPK = fileVersion.getFileVersionId();
+}
+else {
+	assetClassPK = fileEntry.getFileEntryId();
+}
+
+String webDavUrl = StringPool.BLANK;
+
+if (portletDisplay.isWebDAVEnabled()) {
+	webDavUrl = DLUtil.getWebDavURL(themeDisplay, folder, fileEntry);
+}
+
+boolean hasAudio = AudioProcessorUtil.hasAudio(fileVersion);
+boolean hasImages = ImageProcessorUtil.hasImages(fileVersion);
+boolean hasPDFImages = PDFProcessorUtil.hasImages(fileVersion);
+boolean hasVideo = VideoProcessorUtil.hasVideo(fileVersion);
+
+AssetEntry layoutAssetEntry = AssetEntryLocalServiceUtil.fetchEntry(DLFileEntryConstants.getClassName(), assetClassPK);
+
+request.setAttribute(WebKeys.LAYOUT_ASSET_ENTRY, layoutAssetEntry);
+
+request.setAttribute("view_file_entry.jsp-fileEntry", fileEntry);
+%>
+
+<portlet:actionURL var="editFileEntry">
+	<portlet:param name="struts_action" value="/document_library/edit_file_entry" />
+</portlet:actionURL>
+
+<aui:form action="<%= editFileEntry %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+	<aui:input name="fileEntryId" type="hidden" value="<%= String.valueOf(fileEntry.getFileEntryId()) %>" />
+</aui:form>
+
+<c:if test="<%= showHeader && (folder != null) %>">
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		localizeTitle="<%= false %>"
+		title="<%= fileVersion.getTitle() %>"
+	/>
+</c:if>
+
+<div class="view">
+	<c:if test="<%= showActions %>">
+		<liferay-ui:app-view-toolbar>
+			<aui:button-row cssClass="edit-toolbar" id='<%= renderResponse.getNamespace() + "fileEntryToolbar" %>' />
+		</liferay-ui:app-view-toolbar>
+	</c:if>
+
+	<aui:row>
+		<aui:col cssClass="lfr-asset-column-details" width="<%= 70 %>">
+			<c:if test="<%= showActions %>">
+				<liferay-ui:app-view-toolbar>
+					<aui:button-row cssClass="edit-toolbar" id='<%= renderResponse.getNamespace() + "fileEntryToolbar" %>' />
+				</liferay-ui:app-view-toolbar>
+			</c:if>
+
+			<div class="alert alert-error hide" id="<portlet:namespace />openMSOfficeError"></div>
+
+			<c:if test="<%= (fileEntry.getLock() != null) && DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.UPDATE) %>">
+				<c:choose>
+					<c:when test="<%= fileEntry.hasLock() %>">
+						<div class="alert alert-success">
+							<c:choose>
+								<c:when test="<%= lock.isNeverExpires() %>">
+									<liferay-ui:message key="you-now-have-an-indefinite-lock-on-this-document" />
+								</c:when>
+								<c:otherwise>
+
+									<%
+									String lockExpirationTime = StringUtil.toLowerCase(LanguageUtil.getTimeDescription(pageContext, DLFileEntryConstants.LOCK_EXPIRATION_TIME));
+									%>
+
+									<%= LanguageUtil.format(pageContext, "you-now-have-a-lock-on-this-document", lockExpirationTime, false) %>
+								</c:otherwise>
+							</c:choose>
+						</div>
+					</c:when>
+					<c:otherwise>
+						<div class="alert alert-error">
+							<%= LanguageUtil.format(pageContext, "you-cannot-modify-this-document-because-it-was-locked-by-x-on-x", new Object[] {HtmlUtil.escape(PortalUtil.getUserName(lock.getUserId(), String.valueOf(lock.getUserId()))), dateFormatDateTime.format(lock.getCreateDate())}, false) %>
+						</div>
+					</c:otherwise>
+				</c:choose>
+			</c:if>
+
+			<liferay-util:buffer var="documentTitle">
+				<%= fileVersion.getTitle() %>
+
+				<c:if test="<%= versionSpecific %>">
+					(<liferay-ui:message key="version" /> <%= HtmlUtil.escape(fileVersion.getVersion()) %>)
+				</c:if>
+			</liferay-util:buffer>
+
+			<div class="body-row">
+				<div class="document-info">
+					<c:if test="<%= showAssetMetadata %>">
+						<h2 class="document-title" title="<%= documentTitle %>">
+							<%= documentTitle %>
+						</h2>
+
+						<span class="document-thumbnail">
+
+							<%
+							String thumbnailSrc = DLUtil.getThumbnailSrc(fileEntry, fileVersion, null, themeDisplay);
+
+							if (layoutAssetEntry != null) {
+								AssetEntry incrementAssetEntry = AssetEntryServiceUtil.incrementViewCounter(layoutAssetEntry.getClassName(), fileEntry.getFileEntryId());
+
+								if (incrementAssetEntry != null) {
+									layoutAssetEntry = incrementAssetEntry;
+								}
+							}
+							%>
+
+							<img alt="" border="no" class="thumbnail" src="<%= thumbnailSrc %>" style="max-height: <%= PropsValues.DL_FILE_ENTRY_THUMBNAIL_MAX_HEIGHT %>px; max-width: <%= PropsValues.DL_FILE_ENTRY_THUMBNAIL_MAX_WIDTH %>px;" />
+						</span>
+
+						<span class="user-date">
+
+							<%
+							String displayURL = StringPool.BLANK;
+
+							User userDisplay = UserLocalServiceUtil.fetchUser(fileEntry.getUserId());
+
+							if (userDisplay != null) {
+								displayURL = userDisplay.getDisplayURL(themeDisplay);
+							}
+							%>
+
+							<liferay-ui:icon image="../document_library/add_document" label="<%= true %>" message='<%= LanguageUtil.format(pageContext, "uploaded-by-x-x", new Object[] {displayURL, HtmlUtil.escape(fileEntry.getUserName()), dateFormatDateTime.format(fileEntry.getCreateDate())}) %>' />
+						</span>
+
+						<c:if test="<%= enableRatings && fileEntry.isSupportsSocial() %>">
+							<span class="lfr-asset-ratings">
+								<liferay-ui:ratings
+									className="<%= DLFileEntryConstants.getClassName() %>"
+									classPK="<%= fileEntryId %>"
+								/>
+							</span>
+						</c:if>
+
+						<c:if test="<%= enableRelatedAssets && fileEntry.isSupportsSocial() %>">
+							<div class="entry-links">
+								<liferay-ui:asset-links
+									assetEntryId="<%= layoutAssetEntry.getEntryId() %>"
+								/>
+							</div>
+						</c:if>
+					</c:if>
+
+					<span class="document-description">
+						<%= HtmlUtil.escape(fileVersion.getDescription()) %>
+					</span>
+
+					<c:if test="<%= showAssetMetadata && fileEntry.isSupportsSocial() %>">
+						<div class="lfr-asset-categories">
+							<liferay-ui:asset-categories-summary
+								className="<%= DLFileEntryConstants.getClassName() %>"
+								classPK="<%= assetClassPK %>"
+							/>
+						</div>
+
+						<div class="lfr-asset-tags">
+							<liferay-ui:asset-tags-summary
+								className="<%= DLFileEntryConstants.getClassName() %>"
+								classPK="<%= assetClassPK %>"
+								message="tags"
+							/>
+						</div>
+					</c:if>
+				</div>
+
+				<aui:model-context bean="<%= fileVersion %>" model="<%= DLFileVersion.class %>" />
+
+				<c:if test="<%= PropsValues.DL_FILE_ENTRY_PREVIEW_ENABLED %>">
+					<div>
+
+						<%
+						int previewFileCount = 0;
+						String previewFileURL = null;
+						String[] previewFileURLs = null;
+						String videoThumbnailURL = null;
+
+						String previewQueryString = null;
+
+						if (hasAudio) {
+							previewQueryString = "&audioPreview=1";
+						}
+						else if (hasImages) {
+							previewQueryString = "&imagePreview=1";
+						}
+						else if (hasPDFImages) {
+							previewFileCount = PDFProcessorUtil.getPreviewFileCount(fileVersion);
+
+							previewQueryString = "&previewFileIndex=";
+
+							previewFileURL = DLUtil.getPreviewURL(fileEntry, fileVersion, themeDisplay, previewQueryString);
+						}
+						else if (hasVideo) {
+							previewQueryString = "&videoPreview=1";
+
+							videoThumbnailURL = DLUtil.getPreviewURL(fileEntry, fileVersion, themeDisplay, "&videoThumbnail=1");
+						}
+
+						if (Validator.isNotNull(previewQueryString)) {
+							if (hasAudio) {
+								previewFileURLs = new String[PropsValues.DL_FILE_ENTRY_PREVIEW_AUDIO_CONTAINERS.length];
+
+								for (int i = 0; i < PropsValues.DL_FILE_ENTRY_PREVIEW_AUDIO_CONTAINERS.length; i++) {
+									previewFileURLs[i] = DLUtil.getPreviewURL(fileEntry, fileVersion, themeDisplay, previewQueryString + "&type=" + PropsValues.DL_FILE_ENTRY_PREVIEW_AUDIO_CONTAINERS[i]);
+								}
+							}
+							else if (hasVideo) {
+								if (PropsValues.DL_FILE_ENTRY_PREVIEW_VIDEO_CONTAINERS.length > 0) {
+									previewFileURLs = new String[PropsValues.DL_FILE_ENTRY_PREVIEW_VIDEO_CONTAINERS.length];
+
+									for (int i = 0; i < PropsValues.DL_FILE_ENTRY_PREVIEW_VIDEO_CONTAINERS.length; i++) {
+										previewFileURLs[i] = DLUtil.getPreviewURL(fileEntry, fileVersion, themeDisplay, previewQueryString + "&type=" + PropsValues.DL_FILE_ENTRY_PREVIEW_VIDEO_CONTAINERS[i]);
+									}
+								}
+								else {
+									previewFileURLs = new String[1];
+
+									previewFileURLs[0] = videoThumbnailURL;
+								}
+							}
+							else {
+								previewFileURLs = new String[1];
+
+								previewFileURLs[0] = DLUtil.getPreviewURL(fileEntry, fileVersion, themeDisplay, previewQueryString);
+							}
+
+							previewFileURL = previewFileURLs[0];
+
+							if (!hasPDFImages) {
+								previewFileCount = 1;
+							}
+						}
+
+						request.setAttribute("view_file_entry.jsp-supportedAudio", String.valueOf(hasAudio));
+						request.setAttribute("view_file_entry.jsp-supportedVideo", String.valueOf(hasVideo));
+
+						request.setAttribute("view_file_entry.jsp-previewFileURLs", previewFileURLs);
+						request.setAttribute("view_file_entry.jsp-videoThumbnailURL", videoThumbnailURL);
+						%>
+
+						<c:choose>
+							<c:when test="<%= previewFileCount == 0 %>">
+								<c:choose>
+									<c:when test="<%= !DLProcessorRegistryUtil.isPreviewableSize(fileVersion) && (AudioProcessorUtil.isAudioSupported(fileVersion.getMimeType()) || ImageProcessorUtil.isImageSupported(fileVersion.getMimeType()) || PDFProcessorUtil.isDocumentSupported(fileVersion.getMimeType()) || VideoProcessorUtil.isVideoSupported(fileVersion.getMimeType())) %>">
+										<div class="alert alert-info">
+											<liferay-ui:message key="file-is-too-large-for-preview-or-thumbnail-generation" />
+										</div>
+									</c:when>
+									<c:when test="<%= AudioProcessorUtil.isAudioSupported(fileVersion) || ImageProcessorUtil.isImageSupported(fileVersion) || PDFProcessorUtil.isDocumentSupported(fileVersion) || VideoProcessorUtil.isVideoSupported(fileVersion) %>">
+										<div class="alert alert-info">
+											<liferay-ui:message key="generating-preview-will-take-a-few-minutes" />
+										</div>
+									</c:when>
+								</c:choose>
+							</c:when>
+							<c:otherwise>
+								<c:choose>
+									<c:when test="<%= hasAudio %>">
+										<div class="lfr-preview-audio" id="<portlet:namespace />previewFile">
+											<div class="lfr-preview-audio-content" id="<portlet:namespace />previewFileContent"></div>
+										</div>
+
+										<liferay-util:include page="/html/portlet/document_library/player.jsp" />
+									</c:when>
+									<c:when test="<%= hasImages %>">
+										<div class="lfr-preview-file lfr-preview-image" id="<portlet:namespace />previewFile">
+											<div class="lfr-preview-file-content lfr-preview-image-content" id="<portlet:namespace />previewFileContent">
+												<div class="lfr-preview-file-image-current-column">
+													<div class="lfr-preview-file-image-container">
+														<img class="lfr-preview-file-image-current" src="<%= previewFileURL %>" />
+													</div>
+												</div>
+											</div>
+										</div>
+									</c:when>
+									<c:when test="<%= hasVideo %>">
+										<div class="lfr-preview-file lfr-preview-video" id="<portlet:namespace />previewFile">
+											<div class="lfr-preview-file-content lfr-preview-video-content">
+												<div class="lfr-preview-file-video-current-column">
+													<div id="<portlet:namespace />previewFileContent"></div>
+												</div>
+											</div>
+										</div>
+
+										<liferay-util:include page="/html/portlet/document_library/player.jsp" />
+									</c:when>
+									<c:otherwise>
+										<div class="lfr-preview-file" id="<portlet:namespace />previewFile">
+											<div class="lfr-preview-file-content" id="<portlet:namespace />previewFileContent">
+												<div class="lfr-preview-file-image-current-column">
+													<div class="lfr-preview-file-image-container">
+														<img class="lfr-preview-file-image-current" id="<portlet:namespace />previewFileImage" src="<%= previewFileURL + "1" %>" />
+													</div>
+													<span class="lfr-preview-file-actions hide" id="<portlet:namespace />previewFileActions">
+														<span class="lfr-preview-file-toolbar" id="<portlet:namespace />previewToolbar"></span>
+
+														<span class="lfr-preview-file-info">
+															<span class="lfr-preview-file-index" id="<portlet:namespace />previewFileIndex">1</span> of <span class="lfr-preview-file-count"><%= previewFileCount %></span>
+														</span>
+													</span>
+												</div>
+
+												<div class="lfr-preview-file-images" id="<portlet:namespace />previewImagesContent">
+													<div class="lfr-preview-file-images-content"></div>
+												</div>
+											</div>
+										</div>
+
+										<aui:script use="liferay-preview">
+											new Liferay.Preview(
+												{
+													actionContent: '#<portlet:namespace />previewFileActions',
+													baseImageURL: '<%= previewFileURL %>',
+													boundingBox: '#<portlet:namespace />previewFile',
+													contentBox: '#<portlet:namespace />previewFileContent',
+													currentPreviewImage: '#<portlet:namespace />previewFileImage',
+													imageListContent: '#<portlet:namespace />previewImagesContent',
+													maxIndex: <%= previewFileCount %>,
+													previewFileIndexNode: '#<portlet:namespace />previewFileIndex',
+													toolbar: '#<portlet:namespace />previewToolbar'
+												}
+											).render();
+										</aui:script>
+									</c:otherwise>
+								</c:choose>
+							</c:otherwise>
+						</c:choose>
+					</div>
+				</c:if>
+
+				<c:if test="<%= showAssetMetadata && PropsValues.DL_FILE_ENTRY_COMMENTS_ENABLED %>">
+					<liferay-ui:panel collapsible="<%= true %>" cssClass="lfr-document-library-comments" extended="<%= true %>" persistState="<%= true %>" title="comments">
+						<portlet:actionURL var="discussionURL">
+							<portlet:param name="struts_action" value="/document_library/edit_file_entry_discussion" />
+						</portlet:actionURL>
+
+						<liferay-ui:discussion
+							className="<%= DLFileEntryConstants.getClassName() %>"
+							classPK="<%= fileEntryId %>"
+							formAction="<%= discussionURL %>"
+							formName="fm2"
+							ratingsEnabled="<%= enableCommentRatings %>"
+							redirect="<%= currentURL %>"
+							userId="<%= fileEntry.getUserId() %>"
+						/>
+					</liferay-ui:panel>
+				</c:if>
+			</div>
+		</aui:col>
+
+		<aui:col cssClass="lfr-asset-column-details context-pane" last="<%= true %>" width="<%= 30 %>">
+			<div class="body-row asset-details">
+				<c:if test="<%= showAssetMetadata %>">
+					<div class="asset-details-content">
+						<h3 class="version <%= fileEntry.isCheckedOut() ? "document-locked" : StringPool.BLANK %>">
+							<liferay-ui:message key="version" /> <%= HtmlUtil.escape(fileVersion.getVersion()) %>
+						</h3>
+
+						<div class="lfr-asset-icon lfr-asset-author">
+							<liferay-ui:message arguments="<%= HtmlUtil.escape(fileVersion.getStatusByUserName()) %>" key="last-updated-by-x" />
+						</div>
+
+						<div class="lfr-asset-icon lfr-asset-date">
+							<%= dateFormatDateTime.format(fileVersion.getModifiedDate()) %>
+						</div>
+
+						<c:if test="<%= !portletId.equals(PortletKeys.TRASH) %>">
+							<div class="lfr-asset-summary">
+								<aui:workflow-status model="<%= DLFileEntry.class %>" status="<%= fileVersion.getStatus() %>" />
+							</div>
+						</c:if>
+
+						<c:if test="<%= Validator.isNotNull(fileVersion.getDescription()) %>">
+							<blockquote class="lfr-asset-description">
+								<%= HtmlUtil.escape(fileVersion.getDescription()) %>
+							</blockquote>
+						</c:if>
+
+						<span class="download-document">
+							<c:if test="<%= DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.VIEW) %>">
+								<liferay-ui:icon
+									image="download"
+									label="<%= true %>"
+									message='<%= LanguageUtil.get(pageContext, "download") + " (" + TextFormatter.formatStorageSize(fileVersion.getSize(), locale) + ")" %>'
+									url="<%= DLUtil.getPreviewURL(fileEntry, fileVersion, themeDisplay, StringPool.BLANK) %>"
+								/>
+							</c:if>
+						</span>
+
+						<span class="conversions">
+
+							<%
+							for (int i = 0; i < conversions.length; i++) {
+								String conversion = conversions[i];
+							%>
+
+								<liferay-ui:icon
+									image='<%= "../file_system/small/" + conversion %>'
+									label="<%= true %>"
+									message="<%= StringUtil.toUpperCase(conversion) %>"
+									url='<%= DLUtil.getPreviewURL(fileEntry, fileVersion, themeDisplay, "&targetExtension=" + conversion) %>'
+								/>
+
+							<%
+							}
+							%>
+
+						</span>
+
+						<span class="webdav-url">
+							<c:choose>
+								<c:when test="<%= portletDisplay.isWebDAVEnabled() && fileEntry.isSupportsSocial() %>">
+									<liferay-ui:message key="get-url-or-webdav-url" />
+								</c:when>
+
+								<c:otherwise>
+									<liferay-ui:message key="get-url" />
+								</c:otherwise>
+							</c:choose>
+						</span>
+
+						<div class="lfr-asset-field url-file-container hide">
+							<aui:field-wrapper name="url">
+								<liferay-ui:input-resource
+									id="url"
+									url="<%= DLUtil.getPreviewURL(fileEntry, fileEntry.getFileVersion(), themeDisplay, StringPool.BLANK, false, true) %>"
+								/>
+							</aui:field-wrapper>
+						</div>
+
+						<c:if test="<%= portletDisplay.isWebDAVEnabled() && fileEntry.isSupportsSocial() %>">
+							<div class="lfr-asset-field webdav-url-file-container hide">
+
+								<%
+								String webDavHelpMessage = null;
+
+								if (BrowserSnifferUtil.isWindows(request)) {
+									webDavHelpMessage = LanguageUtil.format(pageContext, "webdav-windows-help", new Object[] {"http://www.microsoft.com/downloads/details.aspx?FamilyId=17C36612-632E-4C04-9382-987622ED1D64", "http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/WebDAV"});
+								}
+								else {
+									webDavHelpMessage = LanguageUtil.format(pageContext, "webdav-help", "http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/WebDAV");
+								}
+								%>
+
+								<aui:field-wrapper helpMessage="<%= webDavHelpMessage %>" name="webdavUrl">
+									<liferay-ui:input-resource
+										id="webdavUrl"
+										url="<%= webDavUrl %>"
+									/>
+								</aui:field-wrapper>
+							</div>
+						</c:if>
+					</div>
+				</c:if>
+
+				<%
+					request.removeAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+				%>
+
+				<div class="lfr-asset-panels">
+					<liferay-ui:panel-container extended="<%= false %>" id="documentLibraryAssetPanelContainer" persistState="<%= true %>">
+
+						<%
+						if (fileEntryTypeId > 0) {
+							try {
+								DLFileEntryType fileEntryType = DLFileEntryTypeServiceUtil.getFileEntryType(fileEntryTypeId);
+
+								List<DDMStructure> ddmStructures = fileEntryType.getDDMStructures();
+
+								for (DDMStructure ddmStructure : ddmStructures) {
+									Fields fields = null;
+
+									try {
+										DLFileEntryMetadata fileEntryMetadata = DLFileEntryMetadataLocalServiceUtil.getFileEntryMetadata(ddmStructure.getStructureId(), fileVersionId);
+
+										fields = StorageEngineUtil.getFields(fileEntryMetadata.getDDMStorageId());
+									}
+									catch (Exception e) {
+									}
+						%>
+
+									<liferay-ui:panel collapsible="<%= true %>" cssClass="metadata" extended="<%= true %>" id="documentLibraryMetadataPanel" persistState="<%= true %>" title="<%= HtmlUtil.escape(ddmStructure.getName(locale)) %>">
+
+										<liferay-ddm:html
+											classNameId="<%= PortalUtil.getClassNameId(DDMStructure.class) %>"
+											classPK="<%= ddmStructure.getPrimaryKey() %>"
+											fields="<%= fields %>"
+											fieldsNamespace="<%= String.valueOf(ddmStructure.getPrimaryKey()) %>"
+											readOnly="<%= true %>"
+											requestedLocale="<%= locale %>"
+										/>
+
+									</liferay-ui:panel>
+
+						<%
+								}
+							}
+							catch (Exception e) {
+							}
+						}
+						%>
+
+						<liferay-ui:custom-attributes-available className="<%= DLFileEntryConstants.getClassName() %>" classPK="<%= fileVersionId %>" editable="<%= false %>">
+							<liferay-ui:panel collapsible="<%= true %>" cssClass="custom-fields" id="documentLibraryCustomAttributesPanel" persistState="<%= true %>" title="custom-fields">
+								<liferay-ui:custom-attribute-list
+									className="<%= DLFileEntryConstants.getClassName() %>"
+									classPK="<%= fileVersionId %>"
+									editable="<%= false %>"
+									label="<%= true %>"
+								/>
+							</liferay-ui:panel>
+						</liferay-ui:custom-attributes-available>
+
+						<%
+						try {
+							List<DDMStructure> ddmStructures = DDMStructureLocalServiceUtil.getClassStructures(company.getCompanyId(), PortalUtil.getClassNameId(RawMetadataProcessor.class), new StructureStructureKeyComparator(true));
+
+							for (DDMStructure ddmStructure : ddmStructures) {
+								Fields fields = null;
+
+								try {
+									DLFileEntryMetadata fileEntryMetadata = DLFileEntryMetadataLocalServiceUtil.getFileEntryMetadata(ddmStructure.getStructureId(), fileVersionId);
+
+									fields = StorageEngineUtil.getFields(fileEntryMetadata.getDDMStorageId());
+								}
+								catch (Exception e) {
+								}
+
+								if (fields != null) {
+									String name = "metadata." + ddmStructure.getName(locale, true);
+						%>
+
+									<liferay-ui:panel collapsible="<%= true %>" cssClass="lfr-asset-metadata" id="documentLibraryAssetMetadataPanel" persistState="<%= true %>" title="<%= name %>">
+
+										<liferay-ddm:html
+											classNameId="<%= PortalUtil.getClassNameId(DDMStructure.class) %>"
+											classPK="<%= ddmStructure.getPrimaryKey() %>"
+											fields="<%= fields %>"
+											fieldsNamespace="<%= String.valueOf(ddmStructure.getPrimaryKey()) %>"
+											readOnly="<%= true %>"
+											requestedLocale="<%= locale %>"
+										/>
+
+									</liferay-ui:panel>
+
+						<%
+								}
+							}
+						}
+						catch (Exception e) {
+						}
+						%>
+
+						<c:if test="<%= showAssetMetadata %>">
+							<liferay-ui:panel collapsible="<%= true %>" cssClass="version-history" id="documentLibraryVersionHistoryPanel" persistState="<%= true %>" title="version-history">
+
+								<%
+								boolean comparableFileEntry = DocumentConversionUtil.isComparableVersion(fileVersion.getExtension());
+								boolean showNonApprovedDocuments = false;
+
+								if ((user.getUserId() == fileEntry.getUserId()) || permissionChecker.isCompanyAdmin() || permissionChecker.isGroupAdmin(scopeGroupId)) {
+									showNonApprovedDocuments = true;
+								}
+
+								SearchContainer searchContainer = new SearchContainer();
+
+								List<String> headerNames = new ArrayList<String>();
+
+								headerNames.add("version");
+								headerNames.add("date");
+								headerNames.add("size");
+
+								if (showNonApprovedDocuments && !portletId.equals(PortletKeys.TRASH)) {
+									headerNames.add("status");
+								}
+
+								headerNames.add(StringPool.BLANK);
+
+								searchContainer.setHeaderNames(headerNames);
+
+								PortletURL viewFileEntryURL = renderResponse.createRenderURL();
+
+								viewFileEntryURL.setParameter("struts_action", "/document_library/view_file_entry");
+								viewFileEntryURL.setParameter("redirect", currentURL);
+								viewFileEntryURL.setParameter("fileEntryId", String.valueOf(fileEntry.getFileEntryId()));
+
+								searchContainer.setIteratorURL(viewFileEntryURL);
+
+								if (comparableFileEntry) {
+									RowChecker rowChecker = new RowChecker(renderResponse);
+
+									rowChecker.setAllRowIds(null);
+
+									searchContainer.setRowChecker(rowChecker);
+								}
+
+								int status = WorkflowConstants.STATUS_APPROVED;
+
+								if (showNonApprovedDocuments) {
+									status = WorkflowConstants.STATUS_ANY;
+								}
+
+								List results = fileEntry.getFileVersions(status);
+								List resultRows = searchContainer.getResultRows();
+
+								for (int i = 0; i < results.size(); i++) {
+									FileVersion curFileVersion = (FileVersion)results.get(i);
+
+									ResultRow row = new ResultRow(new Object[] {fileEntry, curFileVersion, results.size(), conversions, fileEntry.isCheckedOut(), fileEntry.hasLock()}, String.valueOf(curFileVersion.getVersion()), i);
+
+									// Statistics
+
+									row.addText(String.valueOf(curFileVersion.getVersion()));
+									row.addDate(curFileVersion.getCreateDate());
+									row.addText(TextFormatter.formatStorageSize(curFileVersion.getSize(), locale));
+
+									// Status
+
+									if (showNonApprovedDocuments && !portletId.equals(PortletKeys.TRASH)) {
+										row.addStatus(curFileVersion.getStatus(), curFileVersion.getStatusByUserId(), curFileVersion.getStatusDate());
+									}
+
+									// Action
+
+									row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/document_library/file_entry_history_action.jsp");
+
+									// Add result row
+
+									resultRows.add(row);
+								}
+
+								if (comparableFileEntry && !results.isEmpty()) {
+									FileVersion curFileVersion = (FileVersion)results.get(0);
+								%>
+
+									<portlet:actionURL var="compareVersionsURL">
+										<portlet:param name="struts_action" value="/document_library/compare_versions" />
+									</portlet:actionURL>
+
+									<aui:form action="<%= compareVersionsURL %>" method="post" name="fm1" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "compare();" %>'>
+										<aui:input name="backURL" type="hidden" value="<%= currentURL %>" />
+										<aui:input name="fileEntryId" type="hidden" value="<%= fileEntryId %>" />
+										<aui:input name="sourceVersion" type="hidden" value="<%= curFileVersion.getVersion() %>" />
+										<aui:input name="targetVersion" type="hidden" value="<%= fileEntry.getVersion() %>" />
+
+										<aui:button-row>
+											<aui:button type="submit" value="compare-versions" />
+										</aui:button-row>
+									</aui:form>
+
+								<%
+								}
+								%>
+
+								<liferay-ui:search-iterator paginate="<%= false %>" searchContainer="<%= searchContainer %>" />
+							</liferay-ui:panel>
+						</c:if>
+					</liferay-ui:panel-container>
+				</div>
+			</div>
+		</aui:col>
+	</aui:row>
+</div>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />compare',
+		function() {
+			var A = AUI();
+
+			var rowIds = A.all('input[name=<portlet:namespace />rowIds]:checked');
+			var sourceVersion = A.one('input[name="<portlet:namespace />sourceVersion"]');
+			var targetVersion = A.one('input[name="<portlet:namespace />targetVersion"]');
+
+			var rowIdsSize = rowIds.size();
+
+			if (rowIdsSize == 1) {
+				if (sourceVersion) {
+					sourceVersion.val(rowIds.item(0).val());
+				}
+			}
+			else if (rowIdsSize == 2) {
+				if (sourceVersion) {
+					sourceVersion.val(rowIds.item(1).val());
+				}
+
+				if (targetVersion) {
+					targetVersion.val(rowIds.item(0).val());
+				}
+			}
+
+			submitForm(document.<portlet:namespace />fm1);
+		},
+		['aui-base', 'selector-css3']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />initRowsChecked',
+		function() {
+			var A = AUI();
+
+			var rowIds = A.all('input[name=<portlet:namespace />rowIds]');
+
+			rowIds.each(
+				function(item, index, collection) {
+					if (index >= 2) {
+						item.set('checked', false);
+					}
+				}
+			);
+		},
+		['aui-base']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />updateRowsChecked',
+		function(element) {
+			var A = AUI();
+
+			var rowsChecked = A.all('input[name=<portlet:namespace />rowIds]:checked');
+
+			if (rowsChecked.size() > 2) {
+				var index = 2;
+
+				if (rowsChecked.item(2).compareTo(element)) {
+					index = 1;
+				}
+
+				rowsChecked.item(index).set('checked', false);
+			}
+		},
+		['aui-base', 'selector-css3']
+	);
+</aui:script>
+
+<c:if test="<%= DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.VIEW) && DLUtil.isOfficeExtension(fileVersion.getExtension()) && portletDisplay.isWebDAVEnabled() && BrowserSnifferUtil.isIeOnWin32(request) %>">
+	<%@ include file="/html/portlet/document_library/action/open_document_js.jspf" %>
+</c:if>
+
+<aui:script use="aui-base,aui-toolbar">
+	var showURLFile = A.one('.show-url-file');
+	var showWebDavFile = A.one('.show-webdav-url-file');
+
+	if (showURLFile) {
+		showURLFile.on(
+			'click',
+			function(event) {
+				var URLFileContainer = A.one('.url-file-container');
+
+				URLFileContainer.toggleClass('hide');
+			}
+		);
+	}
+
+	if (showWebDavFile) {
+		showWebDavFile.on(
+			'click',
+			function(event) {
+				var WebDavFileContainer = A.one('.webdav-url-file-container');
+
+				WebDavFileContainer.toggleClass('hide');
+			}
+		);
+	}
+
+	<c:if test="<%= showActions %>">
+		var buttonRow = A.one('#<portlet:namespace />fileEntryToolbar');
+
+		var fileEntryButtonGroup = [];
+
+		<c:if test="<%= DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.VIEW) %>">
+			fileEntryButtonGroup.push(
+				{
+					icon: 'icon-download',
+					label: '<%= UnicodeLanguageUtil.get(pageContext, "download") %>',
+					on: {
+						click: function(event) {
+							location.href = '<%= DLUtil.getPreviewURL(fileEntry, fileVersion, themeDisplay, StringPool.BLANK) %>';
+						}
+					}
+				}
+			);
+
+			<%
+			if (DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.VIEW) && DLUtil.isOfficeExtension(fileVersion.getExtension()) && portletDisplay.isWebDAVEnabled() && BrowserSnifferUtil.isIeOnWin32(request)) {
+			%>
+
+				fileEntryButtonGroup.push(
+					{
+						label: '<%= UnicodeLanguageUtil.get(pageContext, "open-in-ms-office") %>',
+						on: {
+							click: function(event) {
+								<portlet:namespace />openDocument('<%= DLUtil.getWebDavURL(themeDisplay, fileEntry.getFolder(), fileEntry, PropsValues.DL_FILE_ENTRY_OPEN_IN_MS_OFFICE_MANUAL_CHECK_IN_REQUIRED) %>');
+							}
+						}
+					}
+				);
+
+			<%
+			}
+			%>
+
+		</c:if>
+
+		<c:if test="<%= DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.UPDATE) && (!fileEntry.isCheckedOut() || fileEntry.hasLock()) %>">
+			fileEntryButtonGroup.push(
+				{
+
+					<portlet:renderURL var="editURL">
+						<portlet:param name="struts_action" value="/document_library/edit_file_entry" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+						<portlet:param name="fileEntryId" value="<%= String.valueOf(fileEntry.getFileEntryId()) %>" />
+					</portlet:renderURL>
+
+					icon: 'icon-pencil',
+					label: '<%= UnicodeLanguageUtil.get(pageContext, "edit") %>',
+					on: {
+						click: function(event) {
+							location.href = '<%= editURL.toString() %>';
+						}
+					}
+				},
+				{
+
+					<portlet:renderURL var="moveURL">
+						<portlet:param name="struts_action" value="/document_library/move_file_entry" />
+						<portlet:param name="redirect" value="<%= redirect %>" />
+						<portlet:param name="fileEntryId" value="<%= String.valueOf(fileEntry.getFileEntryId()) %>" />
+					</portlet:renderURL>
+
+					icon: 'icon-move',
+					label: '<%= UnicodeLanguageUtil.get(pageContext, "move") %>',
+					on: {
+						click: function(event) {
+							location.href = '<%= moveURL.toString() %>';
+						}
+					}
+				}
+			);
+
+			<c:if test="<%= !fileEntry.isCheckedOut() %>">
+				fileEntryButtonGroup.push(
+					{
+
+						icon: 'icon-lock',
+						label: '<%= UnicodeLanguageUtil.get(pageContext, "checkout[document]") %>',
+						on: {
+							click: function(event) {
+								document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = '<%= Constants.CHECKOUT %>';
+								submitForm(document.<portlet:namespace />fm);
+							}
+						}
+					}
+				);
+			</c:if>
+
+			<c:if test="<%= fileEntry.isCheckedOut() && fileEntry.hasLock() %>">
+				fileEntryButtonGroup.push(
+					{
+
+						icon: 'icon-undo',
+						label: '<%= UnicodeLanguageUtil.get(pageContext, "cancel-checkout[document]") %>',
+						on: {
+							click: function(event) {
+								document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = '<%= Constants.CANCEL_CHECKOUT %>';
+								submitForm(document.<portlet:namespace />fm);
+							}
+						}
+					},
+					{
+
+						icon: 'icon-unlock',
+						label: '<%= UnicodeLanguageUtil.get(pageContext, "checkin") %>',
+						on: {
+							click: function(event) {
+								document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = '<%= Constants.CHECKIN %>';
+								submitForm(document.<portlet:namespace />fm);
+							}
+						}
+					}
+				);
+			</c:if>
+		</c:if>
+
+		<c:if test="<%= DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.PERMISSIONS) %>">
+			fileEntryButtonGroup.push(
+				{
+					<liferay-security:permissionsURL
+						modelResource="<%= DLFileEntryConstants.getClassName() %>"
+						modelResourceDescription="<%= fileEntry.getTitle() %>"
+						resourcePrimKey="<%= String.valueOf(fileEntry.getFileEntryId()) %>"
+						var="permissionsURL"
+						windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+					/>
+
+					icon: 'icon-permissions',
+					label: '<%= UnicodeLanguageUtil.get(pageContext, "permissions") %>',
+					on: {
+						click: function(event) {
+							Liferay.Util.openWindow(
+								{
+									title: '<%= UnicodeLanguageUtil.get(pageContext, "permissions") %>',
+									uri: '<%= permissionsURL.toString() %>',
+								}
+							);
+						}
+					}
+				}
+			);
+		</c:if>
+
+		<c:if test="<%= DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.DELETE) && (fileEntry.getModel() instanceof DLFileEntry) && TrashUtil.isTrashEnabled(scopeGroupId) %>">
+			fileEntryButtonGroup.push(
+				{
+					<portlet:renderURL var="viewFolderURL">
+						<portlet:param name="struts_action" value="/document_library/view" />
+						<portlet:param name="folderId" value="<%= String.valueOf(fileEntry.getFolderId()) %>" />
+					</portlet:renderURL>
+
+					icon: 'icon-trash',
+					label: '<%= UnicodeLanguageUtil.get(pageContext, "move-to-the-recycle-bin") %>',
+					on: {
+						click: function(event) {
+							document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = '<%= Constants.MOVE_TO_TRASH %>';
+							document.<portlet:namespace />fm.<portlet:namespace />redirect.value = '<%= viewFolderURL.toString() %>';
+							submitForm(document.<portlet:namespace />fm);
+						}
+					}
+				}
+			);
+		</c:if>
+
+		<c:if test="<%= DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.DELETE) && (!(fileEntry.getModel() instanceof DLFileEntry) || !TrashUtil.isTrashEnabled(scopeGroupId)) %>">
+			fileEntryButtonGroup.push(
+				{
+					<portlet:renderURL var="viewFolderURL">
+						<portlet:param name="struts_action" value="/document_library/view" />
+						<portlet:param name="folderId" value="<%= String.valueOf(fileEntry.getFolderId()) %>" />
+					</portlet:renderURL>
+
+					icon: 'icon-delete',
+					label: '<%= UnicodeLanguageUtil.get(pageContext, "delete") %>',
+					on: {
+						click: function(event) {
+							if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-delete-this") %>')) {
+								document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = '<%= Constants.DELETE %>';
+								document.<portlet:namespace />fm.<portlet:namespace />redirect.value = '<%= viewFolderURL.toString() %>';
+								submitForm(document.<portlet:namespace />fm);
+							}
+						}
+					}
+				}
+			);
+		</c:if>
+
+		var fileEntryToolbar = new A.Toolbar(
+			{
+				boundingBox: buttonRow,
+				children: [fileEntryButtonGroup]
+			}
+		).render();
+
+		buttonRow.setData('fileEntryToolbar', fileEntryToolbar);
+	</c:if>
+
+	<portlet:namespace />initRowsChecked();
+
+	A.all('input[name=<portlet:namespace />rowIds]').on(
+		'click',
+		function(event) {
+			<portlet:namespace />updateRowsChecked(event.currentTarget);
+		}
+	);
+</aui:script>
+
+<%
+if (!portletId.equals(PortletKeys.TRASH)) {
+	DLUtil.addPortletBreadcrumbEntries(fileEntry, request, renderResponse);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_file_entry_descriptive.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_file_entry_descriptive.jsp
new file mode 100644
index 0000000..af4174b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_file_entry_descriptive.jsp
@@ -0,0 +1,77 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+FileEntry fileEntry = (FileEntry)request.getAttribute("view_entries.jsp-fileEntry");
+
+FileVersion fileVersion = fileEntry.getFileVersion();
+
+FileVersion latestFileVersion = fileVersion;
+
+if ((user.getUserId() == fileEntry.getUserId()) || permissionChecker.isCompanyAdmin() || permissionChecker.isGroupAdmin(scopeGroupId) || DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.UPDATE)) {
+	latestFileVersion = fileEntry.getLatestFileVersion();
+}
+
+DLFileShortcut fileShortcut = (DLFileShortcut)request.getAttribute("view_entries.jsp-fileShortcut");
+
+PortletURL tempRowURL = (PortletURL)request.getAttribute("view_entries.jsp-tempRowURL");
+
+long assetClassPK = 0;
+
+if (!latestFileVersion.getVersion().equals(DLFileEntryConstants.VERSION_DEFAULT) && (latestFileVersion.getStatus() != WorkflowConstants.STATUS_APPROVED)) {
+	assetClassPK = latestFileVersion.getFileVersionId();
+}
+else {
+	assetClassPK = fileEntry.getFileEntryId();
+}
+
+String rowCheckerName = FileEntry.class.getSimpleName();
+long rowCheckerId = fileEntry.getFileEntryId();
+
+if (fileShortcut != null) {
+	rowCheckerName = DLFileShortcut.class.getSimpleName();
+	rowCheckerId = fileShortcut.getFileShortcutId();
+}
+%>
+
+<liferay-ui:app-view-entry
+	actionJsp="/html/portlet/document_library/file_entry_action.jsp"
+	assetCategoryClassName="<%= DLFileEntryConstants.getClassName() %>"
+	assetCategoryClassPK="<%= assetClassPK %>"
+	assetTagClassName="<%= DLFileEntryConstants.getClassName() %>"
+	assetTagClassPK="<%= assetClassPK %>"
+	author="<%= latestFileVersion.getUserName() %>"
+	createDate="<%= latestFileVersion.getCreateDate() %>"
+	description="<%= latestFileVersion.getDescription() %>"
+	displayStyle="descriptive"
+	latestApprovedVersion="<%= fileVersion.getVersion().equals(DLFileEntryConstants.VERSION_DEFAULT) ? null : fileVersion.getVersion() %>"
+	latestApprovedVersionAuthor="<%= fileVersion.getVersion().equals(DLFileEntryConstants.VERSION_DEFAULT) ? null : fileVersion.getUserName() %>"
+	locked="<%= fileEntry.isCheckedOut() %>"
+	modifiedDate="<%= latestFileVersion.getModifiedDate() %>"
+	rowCheckerId="<%= String.valueOf(rowCheckerId) %>"
+	rowCheckerName="<%= rowCheckerName %>"
+	shortcut="<%= fileShortcut != null %>"
+	showCheckbox="<%= DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.DELETE) || DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.UPDATE) %>"
+	status="<%= latestFileVersion.getStatus() %>"
+	thumbnailDivStyle="<%= DLUtil.getThumbnailStyle(false, 4) %>"
+	thumbnailSrc="<%= DLUtil.getThumbnailSrc(fileEntry, latestFileVersion, fileShortcut, themeDisplay) %>"
+	thumbnailStyle="<%= DLUtil.getThumbnailStyle() %>"
+	title="<%= latestFileVersion.getTitle() %>"
+	url="<%= tempRowURL.toString() %>"
+	version="<%= latestFileVersion.getVersion() %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_file_entry_icon.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_file_entry_icon.jsp
new file mode 100644
index 0000000..e2de22a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_file_entry_icon.jsp
@@ -0,0 +1,56 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+FileEntry fileEntry = (FileEntry)request.getAttribute("view_entries.jsp-fileEntry");
+
+FileVersion latestFileVersion = fileEntry.getFileVersion();
+
+if ((user.getUserId() == fileEntry.getUserId()) || permissionChecker.isCompanyAdmin() || permissionChecker.isGroupAdmin(scopeGroupId) || DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.UPDATE)) {
+	latestFileVersion = fileEntry.getLatestFileVersion();
+}
+
+DLFileShortcut fileShortcut = (DLFileShortcut)request.getAttribute("view_entries.jsp-fileShortcut");
+
+PortletURL tempRowURL = (PortletURL)request.getAttribute("view_entries.jsp-tempRowURL");
+
+String rowCheckerName = FileEntry.class.getSimpleName();
+long rowCheckerId = fileEntry.getFileEntryId();
+
+if (fileShortcut != null) {
+	rowCheckerName = DLFileShortcut.class.getSimpleName();
+	rowCheckerId = fileShortcut.getFileShortcutId();
+}
+%>
+
+<liferay-ui:app-view-entry
+	actionJsp="/html/portlet/document_library/file_entry_action.jsp"
+	description="<%= latestFileVersion.getDescription() %>"
+	displayStyle="icon"
+	locked="<%= fileEntry.isCheckedOut() %>"
+	rowCheckerId="<%= String.valueOf(rowCheckerId) %>"
+	rowCheckerName="<%= rowCheckerName %>"
+	shortcut="<%= fileShortcut != null %>"
+	showCheckbox="<%= DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.DELETE) || DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.UPDATE) %>"
+	status="<%= latestFileVersion.getStatus() %>"
+	thumbnailDivStyle="<%= DLUtil.getThumbnailStyle(false, 4) %>"
+	thumbnailSrc="<%= DLUtil.getThumbnailSrc(fileEntry, latestFileVersion, fileShortcut, themeDisplay) %>"
+	thumbnailStyle="<%= DLUtil.getThumbnailStyle() %>"
+	title="<%= latestFileVersion.getTitle() %>"
+	url="<%= tempRowURL.toString() %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_file_entry_type.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_file_entry_type.jsp
new file mode 100644
index 0000000..438ec02
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_file_entry_type.jsp
@@ -0,0 +1,70 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/document_library/view_file_entry_type");
+%>
+
+<liferay-util:include page="/html/portlet/document_library/file_entry_type_toolbar.jsp" />
+
+<liferay-ui:error exception="<%= RequiredStructureException.class %>" message="cannot-delete-a-document-type-that-is-presently-used-by-one-or-more-documents" />
+
+<div class="separator"></div>
+
+<liferay-ui:search-container
+	searchContainer="<%= new StructureSearch(renderRequest, portletURL) %>"
+>
+	<liferay-ui:search-container-results>
+		<%@ include file="/html/portlet/document_library/file_entry_type_search_results.jspf" %>
+	</liferay-ui:search-container-results>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portlet.documentlibrary.model.DLFileEntryType"
+		escapedModel="<%= true %>"
+		keyProperty="fileEntryTypeId"
+		modelVar="fileEntryType"
+	>
+		<liferay-ui:search-container-column-text
+			name="name"
+			value="<%= HtmlUtil.escape(fileEntryType.getName(locale)) %>"
+		/>
+
+		<%
+		Group group = GroupLocalServiceUtil.getGroup(fileEntryType.getGroupId());
+		%>
+
+		<liferay-ui:search-container-column-text
+			name="scope"
+			value="<%= LanguageUtil.get(pageContext, group.getScopeLabel(themeDisplay)) %>"
+		/>
+
+		<liferay-ui:search-container-column-date
+			name="modified-date"
+			value="<%= fileEntryType.getModifiedDate() %>"
+		/>
+
+		<liferay-ui:search-container-column-jsp
+			align="right"
+			path="/html/portlet/document_library/file_entry_type_action.jsp"
+		/>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_folder_descriptive.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_folder_descriptive.jsp
new file mode 100644
index 0000000..70539dc
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_folder_descriptive.jsp
@@ -0,0 +1,42 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+Folder folder = (Folder)request.getAttribute("view_entries.jsp-folder");
+
+String folderImage = (String)request.getAttribute("view_entries.jsp-folderImage");
+
+PortletURL tempRowURL = (PortletURL)request.getAttribute("view_entries.jsp-tempRowURL");
+%>
+
+<liferay-ui:app-view-entry
+	actionJsp="/html/portlet/document_library/folder_action.jsp"
+	author="<%= folder.getUserName() %>"
+	createDate="<%= folder.getCreateDate() %>"
+	description="<%= folder.getDescription() %>"
+	displayStyle="descriptive"
+	folder="<%= true %>"
+	modifiedDate="<%= folder.getModifiedDate() %>"
+	rowCheckerId="<%= String.valueOf(folder.getFolderId()) %>"
+	rowCheckerName="<%= Folder.class.getSimpleName() %>"
+	showCheckbox="<%= DLFolderPermission.contains(permissionChecker, folder, ActionKeys.DELETE) || DLFolderPermission.contains(permissionChecker, folder, ActionKeys.UPDATE) %>"
+	thumbnailSrc='<%= themeDisplay.getPathThemeImages() + "/file_system/large/" + folderImage + ".png" %>'
+	thumbnailStyle="<%= DLUtil.getThumbnailStyle() %>"
+	title="<%= folder.getName() %>"
+	url="<%= tempRowURL.toString() %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_folder_icon.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_folder_icon.jsp
new file mode 100644
index 0000000..817b51f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_folder_icon.jsp
@@ -0,0 +1,40 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+Folder folder = (Folder)request.getAttribute("view_entries.jsp-folder");
+
+String folderImage = (String)request.getAttribute("view_entries.jsp-folderImage");
+
+PortletURL tempRowURL = (PortletURL)request.getAttribute("view_entries.jsp-tempRowURL");
+%>
+
+<liferay-ui:app-view-entry
+	actionJsp="/html/portlet/document_library/folder_action.jsp"
+	description="<%= folder.getDescription() %>"
+	displayStyle="icon"
+	folder="<%= true %>"
+	rowCheckerId="<%= String.valueOf(folder.getFolderId()) %>"
+	rowCheckerName="<%= Folder.class.getSimpleName() %>"
+	showCheckbox="<%= DLFolderPermission.contains(permissionChecker, folder, ActionKeys.DELETE) || DLFolderPermission.contains(permissionChecker, folder, ActionKeys.UPDATE) %>"
+	thumbnailDivStyle="<%= DLUtil.getThumbnailStyle(false, 4) %>"
+	thumbnailSrc='<%= themeDisplay.getPathThemeImages() + "/file_system/large/" + folderImage + ".png" %>'
+	thumbnailStyle="<%= DLUtil.getThumbnailStyle() %>"
+	title="<%= folder.getName() %>"
+	url="<%= tempRowURL.toString() %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_folders.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_folders.jsp
new file mode 100644
index 0000000..c7ce08c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_folders.jsp
@@ -0,0 +1,499 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+Folder folder = (Folder)request.getAttribute("view.jsp-folder");
+
+long folderId = GetterUtil.getLong((String)request.getAttribute("view.jsp-folderId"));
+
+long repositoryId = GetterUtil.getLong((String)request.getAttribute("view.jsp-repositoryId"));
+
+long parentFolderId = DLFolderConstants.DEFAULT_PARENT_FOLDER_ID;
+
+boolean expandFolder = ParamUtil.getBoolean(request, "expandFolder");
+
+Folder parentFolder = null;
+
+if (folder != null) {
+	parentFolderId = folder.getParentFolderId();
+
+	if (expandFolder) {
+		parentFolderId = folderId;
+	}
+
+	if ((parentFolderId == 0) && (repositoryId != scopeGroupId) || (folder.isRoot() && !folder.isDefaultRepository())) {
+		if (folder.isMountPoint()) {
+			parentFolderId = folderId;
+		}
+		else {
+			parentFolderId = DLAppLocalServiceUtil.getMountFolder(repositoryId).getFolderId();
+
+			folderId = parentFolderId;
+
+			folder = DLAppServiceUtil.getFolder(folderId);
+		}
+	}
+
+	if (parentFolderId != DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) {
+		try {
+			parentFolder = DLAppServiceUtil.getFolder(folderId);
+		}
+		catch (NoSuchFolderException nsfe) {
+			parentFolderId = DLFolderConstants.DEFAULT_PARENT_FOLDER_ID;
+		}
+	}
+}
+
+String browseBy = ParamUtil.getString(request, "browseBy");
+long fileEntryTypeId = ParamUtil.getLong(request, "fileEntryTypeId", -1);
+
+int entryStart = ParamUtil.getInteger(request, "entryStart");
+int entryEnd = ParamUtil.getInteger(request, "entryEnd", entriesPerPage);
+
+int folderStart = ParamUtil.getInteger(request, "folderStart");
+int folderEnd = ParamUtil.getInteger(request, "folderEnd", SearchContainer.DEFAULT_DELTA);
+
+int total = 0;
+
+if (browseBy.equals("file-entry-type")) {
+	total = DLFileEntryTypeServiceUtil.getFileEntryTypesCount(PortalUtil.getSiteAndCompanyGroupIds(themeDisplay));
+}
+else if ((folderId != rootFolderId) || expandFolder) {
+	total = DLAppServiceUtil.getFoldersCount(repositoryId, parentFolderId, false);
+}
+
+PortletURL portletURL = liferayPortletResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/document_library/view");
+
+SearchContainer searchContainer = new SearchContainer(liferayPortletRequest, null, null, "cur2", folderEnd / (folderEnd - folderStart), (folderEnd - folderStart), portletURL, null, null);
+
+searchContainer.setTotal(total);
+
+String parentTitle = StringPool.BLANK;
+
+if (browseBy.equals("file-entry-type")) {
+	parentTitle = LanguageUtil.get(pageContext, "browse-by-type");
+}
+else {
+	if ((folderId != rootFolderId) && (parentFolderId > 0) && (folder != null) && (!folder.isMountPoint() || expandFolder)) {
+		Folder grandParentFolder = DLAppServiceUtil.getFolder(parentFolderId);
+
+		parentTitle = grandParentFolder.getName();
+	}
+	else if (((folderId != rootFolderId) && (parentFolderId == 0)) || ((folderId == rootFolderId) && (parentFolderId == 0) && expandFolder)) {
+		parentTitle = LanguageUtil.get(pageContext, "home");
+	}
+}
+%>
+
+<div id="<portlet:namespace />listViewContainer">
+	<div id="<portlet:namespace />folderContainer">
+		<aui:nav cssClass="nav-list well">
+			<c:if test="<%= Validator.isNotNull(parentTitle) %>">
+				<li class="nav-header">
+					<%= parentTitle %>
+				</li>
+			</c:if>
+
+			<c:choose>
+				<c:when test='<%= (((folderId == rootFolderId) && !expandFolder) || ((folder != null) && (folder.isRoot() && !folder.isDefaultRepository() && !expandFolder))) && !browseBy.equals("file-entry-type") %>'>
+					<liferay-portlet:renderURL varImpl="viewDocumentsHomeURL">
+						<portlet:param name="struts_action" value="/document_library/view" />
+						<portlet:param name="folderId" value="<%= String.valueOf(rootFolderId) %>" />
+						<portlet:param name="entryStart" value="0" />
+						<portlet:param name="entryEnd" value="<%= String.valueOf(entryEnd - entryStart) %>" />
+						<portlet:param name="folderStart" value="0" />
+						<portlet:param name="folderEnd" value="<%= String.valueOf(folderEnd - folderStart) %>" />
+					</liferay-portlet:renderURL>
+
+					<%
+					String navigation = ParamUtil.getString(request, "navigation", "home");
+
+					request.setAttribute("view_entries.jsp-folder", folder);
+					request.setAttribute("view_entries.jsp-folderId", String.valueOf(folderId));
+					request.setAttribute("view_entries.jsp-repositoryId", String.valueOf(repositoryId));
+
+					Map<String, Object> dataView = new HashMap<String, Object>();
+
+					dataView.put("folder", true);
+					dataView.put("folder-id", rootFolderId);
+					dataView.put("navigation", "home");
+					dataView.put("title", LanguageUtil.get(pageContext, "home"));
+					%>
+
+					<liferay-ui:app-view-navigation-entry
+						actionJsp="/html/portlet/document_library/folder_action.jsp"
+						dataView="<%= dataView %>"
+						entryTitle='<%= LanguageUtil.get(pageContext, "home") %>'
+						iconImage="icon-home"
+						selected='<%= (navigation.equals("home") && (folderId == rootFolderId) && (fileEntryTypeId == -1)) %>'
+						viewURL="<%= viewDocumentsHomeURL.toString() %>"
+					/>
+
+					<c:if test="<%= rootFolderId == DLFolderConstants.DEFAULT_PARENT_FOLDER_ID %>">
+						<liferay-portlet:renderURL varImpl="viewRecentDocumentsURL">
+							<portlet:param name="struts_action" value="/document_library/view" />
+							<portlet:param name="navigation" value="recent" />
+							<portlet:param name="folderId" value="<%= String.valueOf(DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) %>" />
+							<portlet:param name="entryStart" value="0" />
+							<portlet:param name="entryEnd" value="<%= String.valueOf(entryEnd - entryStart) %>" />
+							<portlet:param name="folderStart" value="0" />
+							<portlet:param name="folderEnd" value="<%= String.valueOf(folderEnd - folderStart) %>" />
+						</liferay-portlet:renderURL>
+
+						<%
+						dataView = new HashMap<String, Object>();
+
+						dataView.put("navigation", "recent");
+						%>
+
+						<liferay-ui:app-view-navigation-entry
+							dataView="<%= dataView %>"
+							entryTitle='<%= LanguageUtil.get(pageContext, "recent") %>'
+							iconImage="icon-time"
+							selected='<%= navigation.equals("recent") %>'
+							viewURL="<%= viewRecentDocumentsURL.toString() %>"
+						/>
+
+						<c:if test="<%= themeDisplay.isSignedIn() %>">
+							<liferay-portlet:renderURL varImpl="viewMyDocumentsURL">
+								<portlet:param name="struts_action" value="/document_library/view" />
+								<portlet:param name="navigation" value="mine" />
+								<portlet:param name="folderId" value="<%= String.valueOf(DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) %>" />
+								<portlet:param name="entryStart" value="0" />
+								<portlet:param name="entryEnd" value="<%= String.valueOf(entryEnd - entryStart) %>" />
+								<portlet:param name="folderStart" value="0" />
+								<portlet:param name="folderEnd" value="<%= String.valueOf(folderEnd - folderStart) %>" />
+							</liferay-portlet:renderURL>
+
+							<%
+							dataView = new HashMap<String, Object>();
+
+							dataView.put("navigation", "mine");
+							%>
+
+							<liferay-ui:app-view-navigation-entry
+								dataView="<%= dataView %>"
+								entryTitle='<%= LanguageUtil.get(pageContext, "mine") %>'
+								iconImage="icon-user"
+								selected='<%= navigation.equals("mine") %>'
+								viewURL="<%= viewMyDocumentsURL.toString() %>"
+							/>
+						</c:if>
+
+						<c:if test="<%= DLFileEntryTypeServiceUtil.getFileEntryTypesCount(PortalUtil.getSiteAndCompanyGroupIds(themeDisplay)) > 0 %>">
+							<liferay-portlet:renderURL varImpl="viewBasicFileEntryTypeURL">
+								<portlet:param name="struts_action" value="/document_library/view" />
+								<portlet:param name="folderId" value="<%= String.valueOf(DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) %>" />
+								<portlet:param name="browseBy" value="file-entry-type" />
+								<portlet:param name="entryStart" value="0" />
+								<portlet:param name="entryEnd" value="<%= String.valueOf(entryEnd - entryStart) %>" />
+								<portlet:param name="folderStart" value="0" />
+								<portlet:param name="folderEnd" value="<%= String.valueOf(folderEnd - folderStart) %>" />
+							</liferay-portlet:renderURL>
+
+							<%
+							dataView = new HashMap<String, Object>();
+
+							dataView.put("browse-by", "file-entry-type");
+							dataView.put("view-entries", Boolean.FALSE);
+							dataView.put("view-folders", Boolean.TRUE);
+							%>
+
+							<liferay-ui:app-view-navigation-entry
+								cssClass="folder file-entry-type"
+								dataView="<%= dataView %>"
+								entryTitle='<%= LanguageUtil.get(pageContext, "browse-by-type") %>'
+								iconImage="icon-file"
+								selected='<%= browseBy.equals("file-entry-type") %>'
+								viewURL="<%= viewBasicFileEntryTypeURL.toString() %>"
+							/>
+						</c:if>
+					</c:if>
+
+					<%
+					List<Folder> mountFolders = DLAppServiceUtil.getMountFolders(scopeGroupId, DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, searchContainer.getStart(), searchContainer.getEnd());
+
+					for (Folder mountFolder : mountFolders) {
+						request.setAttribute("view_entries.jsp-folder", mountFolder);
+						request.setAttribute("view_entries.jsp-folderId", String.valueOf(mountFolder.getFolderId()));
+						request.setAttribute("view_entries.jsp-folderSelected", String.valueOf(folderId == mountFolder.getFolderId()));
+						request.setAttribute("view_entries.jsp-repositoryId", String.valueOf(mountFolder.getRepositoryId()));
+
+						try {
+					%>
+
+							<liferay-portlet:renderURL varImpl="viewURL">
+								<portlet:param name="struts_action" value="/document_library/view" />
+								<portlet:param name="folderId" value="<%= String.valueOf(mountFolder.getFolderId()) %>" />
+								<portlet:param name="entryStart" value="0" />
+								<portlet:param name="entryEnd" value="<%= String.valueOf(entryEnd - entryStart) %>" />
+								<portlet:param name="folderStart" value="0" />
+								<portlet:param name="folderEnd" value="<%= String.valueOf(folderEnd - folderStart) %>" />
+							</liferay-portlet:renderURL>
+
+							<%
+							dataView = new HashMap<String, Object>();
+
+							dataView.put("folder", true);
+							dataView.put("folder-id", mountFolder.getFolderId());
+							dataView.put("repository-id", mountFolder.getRepositoryId());
+							dataView.put("title", mountFolder.getName());
+							%>
+
+							<liferay-ui:app-view-navigation-entry
+								actionJsp="/html/portlet/document_library/folder_action.jsp"
+								dataView="<%= dataView %>"
+								entryTitle="<%= mountFolder.getName() %>"
+								iconImage="icon-hdd"
+								selected="<%= (mountFolder.getFolderId() == folderId) %>"
+								viewURL="<%= viewURL.toString() %>"
+							/>
+
+						<%
+						}
+						catch (Exception e) {
+							if (permissionChecker.isCompanyAdmin() || permissionChecker.isGroupAdmin(scopeGroupId)) {
+								String errorMessage = null;
+
+								if (e instanceof PrincipalException) {
+									errorMessage = "an-authentication-error-occurred-while-connecting-to-the-repository";
+								}
+								else {
+									errorMessage = "an-unexpected-error-occurred-while-connecting-to-the-repository";
+								}
+						%>
+
+								<li class="app-view-navigation-entry folder error" title="<%= LanguageUtil.get(pageContext, errorMessage) %>">
+
+									<%
+									request.removeAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+									%>
+
+									<liferay-util:include page="/html/portlet/document_library/folder_action.jsp" />
+
+									<span class="browse-folder">
+										<liferay-ui:icon alt="drive-error" image="drive_error" />
+
+										<span class="entry-title">
+											<%= mountFolder.getName() %>
+										</span>
+									</span>
+								</li>
+
+					<%
+							}
+						}
+					}
+					%>
+
+				</c:when>
+				<c:when test='<%= browseBy.equals("file-entry-type") %>'>
+					<liferay-portlet:renderURL varImpl="viewURL">
+						<portlet:param name="struts_action" value="/journal/view" />
+						<portlet:param name="structureId" value="<%= String.valueOf(0) %>" />
+						<portlet:param name="entryStart" value="0" />
+						<portlet:param name="entryEnd" value="<%= String.valueOf(entryEnd - entryStart) %>" />
+						<portlet:param name="folderStart" value="0" />
+						<portlet:param name="folderEnd" value="<%= String.valueOf(folderEnd - folderStart) %>" />
+					</liferay-portlet:renderURL>
+
+					<%
+					Map<String, Object> dataView = new HashMap<String, Object>();
+
+					dataView.put("folder-id", parentFolderId);
+					dataView.put("repository-id", repositoryId);
+					dataView.put("view-folders", Boolean.TRUE);
+					%>
+
+					<liferay-ui:app-view-navigation-entry
+						dataView="<%= dataView %>"
+						entryTitle='<%= LanguageUtil.get(pageContext, "up") %>'
+						iconImage="icon-level-up"
+						viewURL="<%= viewURL.toString() %>"
+					/>
+
+					<c:if test="<%= total > 0 %>">
+						<c:if test="<%= searchContainer.getStart() == 0 %>">
+							<liferay-portlet:renderURL varImpl="viewBasicFileEntryTypeURL">
+								<portlet:param name="struts_action" value="/document_library/view" />
+								<portlet:param name="folderId" value="<%= String.valueOf(DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) %>" />
+								<portlet:param name="browseBy" value="file-entry-type" />
+								<portlet:param name="fileEntryTypeId" value="<%= String.valueOf(0) %>" />
+								<portlet:param name="entryStart" value="0" />
+								<portlet:param name="entryEnd" value="<%= String.valueOf(entryEnd - entryStart) %>" />
+								<portlet:param name="folderStart" value="0" />
+								<portlet:param name="folderEnd" value="<%= String.valueOf(folderEnd - folderStart) %>" />
+							</liferay-portlet:renderURL>
+
+							<%
+							dataView = new HashMap<String, Object>();
+
+							dataView.put("browse-by", "file-entry-type");
+							dataView.put("file-entry-type-id", 0);
+							%>
+
+							<liferay-ui:app-view-navigation-entry
+								cssClass="folder file-entry-type"
+								dataView="<%= dataView %>"
+								entryTitle='<%= LanguageUtil.get(pageContext, "basic-document") %>'
+								iconImage="icon-file"
+								selected="<%= (fileEntryTypeId == 0) %>"
+								viewURL="<%= viewBasicFileEntryTypeURL.toString() %>"
+							/>
+						</c:if>
+
+						<%
+						List<DLFileEntryType> fileEntryTypes = DLFileEntryTypeServiceUtil.getFileEntryTypes(PortalUtil.getSiteAndCompanyGroupIds(themeDisplay), searchContainer.getStart(), searchContainer.getEnd());
+
+						for (DLFileEntryType fileEntryType : fileEntryTypes) {
+							request.setAttribute("view_folders.jsp-fileEntryType", fileEntryType);
+						%>
+
+							<liferay-portlet:renderURL varImpl="viewFileEntryTypeURL">
+								<portlet:param name="struts_action" value="/document_library/view" />
+								<portlet:param name="folderId" value="<%= String.valueOf(DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) %>" />
+								<portlet:param name="browseBy" value="file-entry-type" />
+								<portlet:param name="fileEntryTypeId" value="<%= String.valueOf(fileEntryType.getFileEntryTypeId()) %>" />
+								<portlet:param name="entryStart" value="0" />
+								<portlet:param name="entryEnd" value="<%= String.valueOf(entryEnd - entryStart) %>" />
+								<portlet:param name="folderStart" value="0" />
+								<portlet:param name="folderEnd" value="<%= String.valueOf(folderEnd - folderStart) %>" />
+							</liferay-portlet:renderURL>
+
+							<%
+							dataView = new HashMap<String, Object>();
+
+							dataView.put("browse-by", "file-entry-type");
+							dataView.put("file-entry-type-id", fileEntryType.getFileEntryTypeId());
+							%>
+
+							<liferay-ui:app-view-navigation-entry
+								cssClass="folder file-entry-type"
+								dataView="<%= dataView %>"
+								entryTitle="<%= HtmlUtil.escape(fileEntryType.getName(locale)) %>"
+								iconImage="icon-file"
+								selected="<%= (fileEntryTypeId == fileEntryType.getFileEntryTypeId()) %>"
+								viewURL="<%= viewFileEntryTypeURL.toString() %>"
+							/>
+
+						<%
+						}
+						%>
+
+					</c:if>
+				</c:when>
+				<c:otherwise>
+					<liferay-portlet:renderURL varImpl="viewURL">
+						<portlet:param name="struts_action" value="/document_library/view" />
+						<portlet:param name="folderId" value="<%= String.valueOf(parentFolderId) %>" />
+						<portlet:param name="entryStart" value="0" />
+						<portlet:param name="entryEnd" value="<%= String.valueOf(entryEnd - entryStart) %>" />
+						<portlet:param name="folderStart" value="0" />
+						<portlet:param name="folderEnd" value="<%= String.valueOf(folderEnd - folderStart) %>" />
+					</liferay-portlet:renderURL>
+
+					<%
+					Map<String, Object> dataView = new HashMap<String, Object>();
+
+					dataView.put("folder-id", parentFolderId);
+					dataView.put("repository-id", repositoryId);
+					dataView.put("view-folders", Boolean.TRUE);
+					%>
+
+					<liferay-ui:app-view-navigation-entry
+						dataView="<%= dataView %>"
+						entryTitle='<%= LanguageUtil.get(pageContext, "up") %>'
+						iconImage="icon-level-up"
+						viewURL="<%= viewURL.toString() %>"
+					/>
+
+					<%
+					List<Folder> folders = DLAppServiceUtil.getFolders(repositoryId, parentFolderId, false, searchContainer.getStart(), searchContainer.getEnd());
+
+					for (Folder curFolder : folders) {
+						request.setAttribute("view_entries.jsp-folder", curFolder);
+						request.setAttribute("view_entries.jsp-folderId", String.valueOf(curFolder.getFolderId()));
+						request.setAttribute("view_entries.jsp-folderSelected", String.valueOf(folderId == curFolder.getFolderId()));
+						request.setAttribute("view_entries.jsp-repositoryId", String.valueOf(curFolder.getRepositoryId()));
+					%>
+
+						<liferay-portlet:renderURL varImpl="viewURL">
+							<portlet:param name="struts_action" value="/document_library/view" />
+							<portlet:param name="folderId" value="<%= String.valueOf(curFolder.getFolderId()) %>" />
+							<portlet:param name="entryStart" value="0" />
+							<portlet:param name="entryEnd" value="<%= String.valueOf(entryEnd - entryStart) %>" />
+							<portlet:param name="folderStart" value="0" />
+							<portlet:param name="folderEnd" value="<%= String.valueOf(folderEnd - folderStart) %>" />
+						</liferay-portlet:renderURL>
+
+						<%
+						dataView = new HashMap<String, Object>();
+
+						dataView.put("folder-id", curFolder.getFolderId());
+						dataView.put("folder", true);
+						dataView.put("repository-id", curFolder.getRepositoryId());
+						dataView.put("title", curFolder.getName());
+						%>
+
+						<liferay-ui:app-view-navigation-entry
+							actionJsp="/html/portlet/document_library/folder_action.jsp"
+							dataView="<%= dataView %>"
+							entryTitle="<%= curFolder.getName() %>"
+							iconImage='<%= (DLAppServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(curFolder.getRepositoryId(), curFolder.getFolderId(), WorkflowConstants.STATUS_APPROVED, true) > 0) ? "icon-folder-open" : "icon-folder-close" %>'
+							selected="<%= (curFolder.getFolderId() == folderId) %>"
+							viewURL="<%= viewURL.toString() %>"
+						/>
+
+					<%
+					}
+					%>
+
+				</c:otherwise>
+			</c:choose>
+		</aui:nav>
+	</div>
+</div>
+
+<%
+request.setAttribute("view_folders.jsp-total", String.valueOf(total));
+
+request.setAttribute("view_folders.jsp-folderEnd", searchContainer.getEnd());
+request.setAttribute("view_folders.jsp-folderStart", searchContainer.getStart());
+%>
+
+<aui:script>
+	Liferay.fire(
+		'<portlet:namespace />pageLoaded',
+		{
+			pagination: {
+				name: 'folderPagination',
+				state: {
+					page: <%= (total == 0) ? 0 : searchContainer.getCur() %>,
+					rowsPerPage: <%= searchContainer.getDelta() %>,
+					total: <%= total %>
+				}
+			}
+		}
+	);
+</aui:script>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.document_library.view_folders_jsp");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_resources.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_resources.jsp
new file mode 100644
index 0000000..b1a73ea
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library/view_resources.jsp
@@ -0,0 +1,101 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+String navigation = ParamUtil.getString(request, "navigation", "home");
+
+Folder folder = (Folder)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FOLDER);
+
+long folderId = ParamUtil.getLong(request, "folderId", DLFolderConstants.DEFAULT_PARENT_FOLDER_ID);
+
+if ((folder == null) && (folderId != DLFolderConstants.DEFAULT_PARENT_FOLDER_ID)) {
+	try {
+		folder = DLAppLocalServiceUtil.getFolder(folderId);
+	}
+	catch (NoSuchFolderException nsfe) {
+		folderId = DLFolderConstants.DEFAULT_PARENT_FOLDER_ID;
+	}
+}
+
+long repositoryId = scopeGroupId;
+
+if (folder != null) {
+	repositoryId = folder.getRepositoryId();
+}
+
+String browseBy = ParamUtil.getString(request, "browseBy");
+boolean viewEntries = ParamUtil.getBoolean(request, "viewEntries");
+boolean viewEntriesPage = ParamUtil.getBoolean(request, "viewEntriesPage");
+boolean viewFolders = ParamUtil.getBoolean(request, "viewFolders");
+
+request.setAttribute("view.jsp-folder", folder);
+
+request.setAttribute("view.jsp-folderId", String.valueOf(folderId));
+
+request.setAttribute("view.jsp-repositoryId", String.valueOf(repositoryId));
+%>
+
+<div>
+	<c:if test="<%= viewEntries %>">
+
+		<%
+		PortalUtil.addPortletBreadcrumbEntry(request, themeDisplay.getScopeGroup().getDescriptiveName(), null);
+		PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "documents-and-media"), liferayPortletResponse.createRenderURL().toString());
+		%>
+
+		<div id="<portlet:namespace />entries">
+			<liferay-util:include page="/html/portlet/document_library/view_entries.jsp" />
+		</div>
+
+		<span id="<portlet:namespace />addButton">
+			<liferay-util:include page="/html/portlet/document_library/add_button.jsp" />
+		</span>
+
+		<span id="<portlet:namespace />displayStyleButtons">
+			<liferay-util:include page="/html/portlet/document_library/display_style_buttons.jsp" />
+		</span>
+
+		<span id="<portlet:namespace />sortButton">
+			<liferay-util:include page="/html/portlet/document_library/sort_button.jsp" />
+		</span>
+
+		<span id="<portlet:namespace />breadcrumb">
+			<div class="portlet-breadcrumb">
+				<c:if test='<%= !navigation.equals("recent") && !navigation.equals("mine") && Validator.isNull(browseBy) %>'>
+					<liferay-util:include page="/html/portlet/document_library/breadcrumb.jsp" />
+				</c:if>
+			</div>
+		</span>
+	</c:if>
+
+	<c:if test="<%= viewEntriesPage %>">
+		<div id="<portlet:namespace />entries">
+			<liferay-util:include page="/html/portlet/document_library/view_entries.jsp" />
+		</div>
+
+		<span id="<portlet:namespace />sortButton">
+			<liferay-util:include page="/html/portlet/document_library/sort_button.jsp" />
+		</span>
+	</c:if>
+
+	<c:if test="<%= viewFolders %>">
+		<div id="<portlet:namespace />folders">
+			<liferay-util:include page="/html/portlet/document_library/view_folders.jsp" />
+		</div>
+	</c:if>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library_display/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library_display/configuration.jsp
new file mode 100644
index 0000000..20c7549
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library_display/configuration.jsp
@@ -0,0 +1,275 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library_display/init.jsp" %>
+
+<%
+String strutsAction = "/document_library_display";
+
+if (portletResource.equals(PortletKeys.DOCUMENT_LIBRARY)) {
+	strutsAction = "/document_library";
+}
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+String portletNameSpace = PortalUtil.getPortletNamespace(portletResource);
+%>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveConfiguration();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="preferences--rootFolderId--" type="hidden" value="<%= rootFolderId %>" />
+	<aui:input name="preferences--folderColumns--" type="hidden" />
+	<aui:input name="preferences--fileEntryColumns--" type="hidden" />
+
+	<liferay-ui:error key="rootFolderId" message="please-enter-a-valid-root-folder" />
+
+	<liferay-ui:panel-container extended="<%= true %>" id="documentLibrarySettingsPanelContainer" persistState="<%= true %>">
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="documentLibraryDisplay" persistState="<%= true %>" title="display-settings">
+			<aui:input id="showActions" label="show-actions" name="preferences--showActions--" type="checkbox" value="<%= showActions %>" />
+
+			<aui:input label="show-folder-menu" name="preferences--showFolderMenu--" type="checkbox" value="<%= showFolderMenu %>" />
+
+			<aui:input label="show-navigation-links" name="preferences--showTabs--" type="checkbox" value="<%= showTabs %>" />
+
+			<aui:input label="show-search" name="preferences--showFoldersSearch--" type="checkbox" value="<%= showFoldersSearch %>" />
+		</liferay-ui:panel>
+
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="documentLibraryFoldersListingPanel" persistState="<%= true %>" title="folders-listing">
+			<aui:fieldset>
+				<aui:field-wrapper label="root-folder">
+					<div class="input-append">
+						<liferay-ui:input-resource id="rootFolderName" url="<%= rootFolderName %>" />
+
+						<aui:button name="openFolderSelectorButton" value="select" />
+
+						<%
+						String taglibRemoveFolder = "Liferay.Util.removeFolderSelection('rootFolderId', 'rootFolderName', '" + renderResponse.getNamespace() + "');";
+						%>
+
+						<aui:button disabled="<%= rootFolderId <= 0 %>" name="removeFolderButton" onClick="<%= taglibRemoveFolder %>" value="remove" />
+					</div>
+				</aui:field-wrapper>
+
+				<aui:input name="preferences--showSubfolders--" type="checkbox" value="<%= showSubfolders %>" />
+
+				<aui:input name="preferences--foldersPerPage--" size="2" type="text" value="<%= foldersPerPage %>" />
+
+				<aui:field-wrapper label="show-columns">
+
+					<%
+					Set<String> availableFolderColumns = SetUtil.fromArray(StringUtil.split(allFolderColumns));
+
+					// Left list
+
+					List leftList = new ArrayList();
+
+					for (String folderColumn : folderColumns) {
+						leftList.add(new KeyValuePair(folderColumn, LanguageUtil.get(pageContext, folderColumn)));
+					}
+
+					// Right list
+
+					List rightList = new ArrayList();
+
+					Arrays.sort(folderColumns);
+
+					for (String folderColumn : availableFolderColumns) {
+						if (Arrays.binarySearch(folderColumns, folderColumn) < 0) {
+							rightList.add(new KeyValuePair(folderColumn, LanguageUtil.get(pageContext, folderColumn)));
+						}
+					}
+
+					rightList = ListUtil.sort(rightList, new KeyValuePairComparator(false, true));
+					%>
+
+					<liferay-ui:input-move-boxes
+						leftBoxName="currentFolderColumns"
+						leftList="<%= leftList %>"
+						leftReorder="true"
+						leftTitle="current"
+						rightBoxName="availableFolderColumns"
+						rightList="<%= rightList %>"
+						rightTitle="available"
+					/>
+				</aui:field-wrapper>
+			</aui:fieldset>
+		</liferay-ui:panel>
+
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="documentLibraryDocumentsListingPanel" persistState="<%= true %>" title="documents-listing">
+			<aui:fieldset>
+				<aui:input label="documents-per-page" name="preferences--fileEntriesPerPage--" size="2" type="text" value="<%= fileEntriesPerPage %>" />
+
+				<aui:field-wrapper label="show-columns">
+
+					<%
+					Set<String> availableFileEntryColumns = SetUtil.fromArray(StringUtil.split(allFileEntryColumns));
+
+					// Left list
+
+					List leftList = new ArrayList();
+
+					for (String fileEntryColumn : fileEntryColumns) {
+						leftList.add(new KeyValuePair(fileEntryColumn, LanguageUtil.get(pageContext, fileEntryColumn)));
+					}
+
+					// Right list
+
+					List rightList = new ArrayList();
+
+					Arrays.sort(fileEntryColumns);
+
+					for (String fileEntryColumn : availableFileEntryColumns) {
+						if (Arrays.binarySearch(fileEntryColumns, fileEntryColumn) < 0) {
+							rightList.add(new KeyValuePair(fileEntryColumn, LanguageUtil.get(pageContext, fileEntryColumn)));
+						}
+					}
+
+					rightList = ListUtil.sort(rightList, new KeyValuePairComparator(false, true));
+					%>
+
+					<liferay-ui:input-move-boxes
+						leftBoxName="currentFileEntryColumns"
+						leftList="<%= leftList %>"
+						leftReorder="true"
+						leftTitle="current"
+						rightBoxName="availableFileEntryColumns"
+						rightList="<%= rightList %>"
+						rightTitle="available"
+					/>
+				</aui:field-wrapper>
+			</aui:fieldset>
+		</liferay-ui:panel>
+
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="documentLibraryDocumentsRatingsPanel" persistState="<%= true %>" title="ratings">
+			<aui:input name="preferences--enableRatings--" type="checkbox" value="<%= enableRatings %>" />
+			<aui:input name="preferences--enableCommentRatings--" type="checkbox" value="<%= enableCommentRatings %>" />
+		</liferay-ui:panel>
+	</liferay-ui:panel-container>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<liferay-portlet:renderURL portletName="<%= portletResource %>" var="selectFolderURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+	<portlet:param name="struts_action" value='<%= strutsAction + "/select_folder" %>' />
+</liferay-portlet:renderURL>
+
+<aui:script use="aui-base">
+	A.one('#<portlet:namespace />openFolderSelectorButton').on(
+		'click',
+		function(event) {
+			Liferay.Util.selectEntity(
+				{
+					dialog: {
+						constrain: true,
+						modal: true,
+						width: 600
+					},
+					id: '_<%= HtmlUtil.escapeJS(portletResource) %>_selectFolder',
+					title: '<liferay-ui:message arguments="folder" key="select-x" />',
+					uri: '<%= selectFolderURL.toString() %>'
+				},
+				function(event) {
+					var folderData = {
+						idString: 'rootFolderId',
+						idValue: event.folderid,
+						nameString: 'rootFolderName',
+						nameValue: event.foldername
+					};
+
+					Liferay.Util.selectFolder(folderData, '<portlet:namespace />');
+				}
+			);
+		}
+	);
+
+	A.one('#<portlet:namespace />showActionsCheckbox').after(
+		'change',
+		function(event) {
+			var currentFileEntryColumns = A.one('#<portlet:namespace />currentFileEntryColumns');
+			var currentFolderColumns = A.one('#<portlet:namespace />currentFolderColumns');
+			var showActionsInput = A.one('#<portlet:namespace />showActions');
+
+			if (showActionsInput.val() === 'false') {
+				var actionHTML = '<option value="action"><%= UnicodeLanguageUtil.get(pageContext, "action") %></option>';
+
+				currentFileEntryColumns.append(actionHTML);
+				currentFolderColumns.append(actionHTML);
+			}
+			else {
+				var availableFileEntryColumns = A.one('#<portlet:namespace />availableFileEntryColumns');
+				var availableFolderColumns = A.one('#<portlet:namespace />availableFolderColumns');
+
+				A.Array.each(
+					[currentFolderColumns, currentFileEntryColumns, availableFileEntryColumns, availableFolderColumns],
+					function(item, index, collection) {
+						var actionsNode = item.one('option[value="action"]');
+
+						if (actionsNode) {
+							actionsNode.remove();
+						}
+					}
+				);
+			}
+		}
+	);
+
+</aui:script>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />saveConfiguration',
+		function() {
+			document.<portlet:namespace />fm.<portlet:namespace />folderColumns.value = Liferay.Util.listSelect(document.<portlet:namespace />fm.<portlet:namespace />currentFolderColumns);
+			document.<portlet:namespace />fm.<portlet:namespace />fileEntryColumns.value = Liferay.Util.listSelect(document.<portlet:namespace />fm.<portlet:namespace />currentFileEntryColumns);
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
+
+<c:if test="<%= SessionMessages.contains(renderRequest, portletDisplay.getId() + SessionMessages.KEY_SUFFIX_UPDATED_CONFIGURATION) %>">
+	<aui:script position="inline" use="aui-base">
+		var valueMap = {};
+
+		var foldersPerPageInput = A.one('#<portlet:namespace />foldersPerPage');
+
+		if (foldersPerPageInput) {
+			valueMap.delta1 = foldersPerPageInput.val();
+		}
+
+		var fileEntriesPerPageInput = A.one('#<portlet:namespace />fileEntriesPerPage');
+
+		if (fileEntriesPerPageInput) {
+			valueMap.delta2 = fileEntriesPerPageInput.val();
+		}
+
+		var portlet = Liferay.Util.getTop().AUI().one('#p_p_id<%= HtmlUtil.escapeJS(portletNameSpace) %>');
+
+		portlet.refreshURL = portlet.refreshURL.replace(
+			/(cur\d{1}|delta[12])(=|%3D)[^%&]+/g,
+			function(match, param, equals) {
+				return param + equals + (valueMap[param] || 1);
+			}
+		);
+	</aui:script>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library_display/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library_display/css/.sass-cache/main.css
new file mode 100644
index 0000000..035e7f9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library_display/css/.sass-cache/main.css
@@ -0,0 +1,48 @@
+.portlet-document-library-display .entry-title {
+  display: block;
+  font-size: 1.15em;
+  font-weight: bold;
+  padding: 1.4em 0 0; }
+.portlet-document-library-display .view-folders .repository-error {
+  background-color: #FDD;
+  color: #5B677D; }
+  .portlet-document-library-display .view-folders .repository-error td {
+    background-color: #FDD; }
+.portlet-document-library-display .file-entry-list-description {
+  font-style: italic;
+  margin-left: 10px; }
+.portlet-document-library-display .file-entry-tags {
+  margin-top: 5px; }
+.portlet-document-library-display .folder-search {
+  float: right;
+  margin: 0 0 0.5em 0.5em; }
+.portlet-document-library-display .search-root-entry {
+  color: #999;
+  float: right; }
+.portlet-document-library-display .entry-thumbnail {
+  float: left;
+  margin-right: 1em;
+  position: relative; }
+  .portlet-document-library-display .entry-thumbnail .thumbnail {
+    float: left;
+    max-height: 128px;
+    max-width: 128px; }
+.portlet-document-library-display .entry-title {
+  float: left; }
+.portlet-document-library-display .taglib-webdav {
+  margin-top: 3em; }
+.portlet-document-library-display .taglib-workflow-status {
+  margin-bottom: 5px;
+  position: relative; }
+  .portlet-document-library-display .taglib-workflow-status .workflow-status {
+    display: block;
+    position: absolute; }
+    .portlet-document-library-display .taglib-workflow-status .workflow-status .label {
+      position: absolute;
+      top: 1px;
+      left: 1px; }
+
+.ie6 .portlet-document-library-display img.entry-thumbnail {
+  height: expression(this.height > 128 ? '128px' : this.height);
+  width: expression(this.width > 128 ? '128px' : this.width); }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library_display/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library_display/css/main.css
new file mode 100644
index 0000000..d35154c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library_display/css/main.css
@@ -0,0 +1,79 @@
+.portlet-document-library-display {
+	.entry-title {
+		display: block;
+		font-size: 1.15em;
+		font-weight: bold;
+		padding: 1.4em 0 0;
+	}
+
+	.view-folders .repository-error {
+		background-color: #FDD;
+		color: #5B677D;
+
+		td {
+			background-color: #FDD;
+		}
+	}
+
+	.file-entry-list-description {
+		font-style: italic;
+		margin-left: 10px;
+	}
+
+	.file-entry-tags {
+		margin-top: 5px;
+	}
+
+	.folder-search {
+		float: right;
+		margin: 0 0 0.5em 0.5em;
+	}
+
+	.search-root-entry {
+		color: #999;
+		float: right;
+	}
+
+	.entry-thumbnail {
+		float: left;
+		margin-right: 1em;
+		position: relative;
+
+		.thumbnail {
+			float: left;
+			max-height: 128px;
+			max-width: 128px;
+		}
+	}
+
+	.entry-title {
+		float: left;
+	}
+
+	.taglib-webdav {
+		margin-top: 3em;
+	}
+
+	.taglib-workflow-status {
+		margin-bottom: 5px;
+		position: relative;
+
+		.workflow-status {
+			display: block;
+			position: absolute;
+
+			.label {
+				position: absolute;
+				top: 1px;
+				left: 1px;
+			}
+		}
+	}
+}
+
+.ie6 .portlet-document-library-display {
+	img.entry-thumbnail {
+		height: expression(this.height > 128 ? '128px' : this.height);
+		width: expression(this.width > 128 ? '128px' : this.width);
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library_display/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library_display/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library_display/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library_display/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library_display/init.jsp
new file mode 100644
index 0000000..6b7aa0e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library_display/init.jsp
@@ -0,0 +1,123 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.kernel.repository.RepositoryException" %><%@
+page import="com.liferay.portal.kernel.repository.model.Folder" %><%@
+page import="com.liferay.portal.kernel.search.Document" %><%@
+page import="com.liferay.portlet.documentlibrary.NoSuchFolderException" %><%@
+page import="com.liferay.portlet.documentlibrary.model.DLFileEntryType" %><%@
+page import="com.liferay.portlet.documentlibrary.model.DLFileShortcut" %><%@
+page import="com.liferay.portlet.documentlibrary.model.DLFolder" %><%@
+page import="com.liferay.portlet.documentlibrary.model.DLFolderConstants" %><%@
+page import="com.liferay.portlet.documentlibrary.search.EntriesChecker" %><%@
+page import="com.liferay.portlet.documentlibrary.service.DLAppServiceUtil" %><%@
+page import="com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalServiceUtil" %><%@
+page import="com.liferay.portlet.documentlibrary.service.DLFileEntryTypeServiceUtil" %><%@
+page import="com.liferay.portlet.documentlibrary.service.permission.DLFileEntryPermission" %><%@
+page import="com.liferay.portlet.documentlibrary.service.permission.DLFolderPermission" %><%@
+page import="com.liferay.portlet.journal.search.FileEntryDisplayTerms" %><%@
+page import="com.liferay.portlet.journal.search.FileEntrySearch" %><%@
+page import="com.liferay.portlet.journal.search.FileEntrySearchTerms" %>
+
+<%
+String portletResource = ParamUtil.getString(request, "portletResource");
+
+if (layout.isTypeControlPanel()) {
+	portletPreferences = PortletPreferencesLocalServiceUtil.getPreferences(themeDisplay.getCompanyId(), scopeGroupId, PortletKeys.PREFS_OWNER_TYPE_GROUP, 0, PortletKeys.DOCUMENT_LIBRARY, null);
+}
+
+long rootFolderId = PrefsParamUtil.getLong(portletPreferences, request, "rootFolderId", DLFolderConstants.DEFAULT_PARENT_FOLDER_ID);
+String rootFolderName = StringPool.BLANK;
+
+if (rootFolderId != DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) {
+	try {
+		Folder rootFolder = DLAppLocalServiceUtil.getFolder(rootFolderId);
+
+		rootFolderName = rootFolder.getName();
+	}
+	catch (NoSuchFolderException nsfe) {
+	}
+}
+
+boolean showFoldersSearch = PrefsParamUtil.getBoolean(portletPreferences, request, "showFoldersSearch", true);
+boolean showSubfolders = PrefsParamUtil.getBoolean(portletPreferences, request, "showSubfolders", true);
+int foldersPerPage = PrefsParamUtil.getInteger(portletPreferences, request, "foldersPerPage", SearchContainer.DEFAULT_DELTA);
+
+String defaultFolderColumns = "name,num-of-folders,num-of-documents";
+
+String portletId = portletDisplay.getId();
+
+if (portletId.equals(PortletKeys.PORTLET_CONFIGURATION)) {
+	portletId = portletResource;
+}
+
+boolean showActions = PrefsParamUtil.getBoolean(portletPreferences, request, "showActions");
+boolean showAddFolderButton = false;
+boolean showFolderMenu = PrefsParamUtil.getBoolean(portletPreferences, request, "showFolderMenu");
+boolean showTabs = PrefsParamUtil.getBoolean(portletPreferences, request, "showTabs");
+
+if (portletId.equals(PortletKeys.DOCUMENT_LIBRARY)) {
+	showActions = true;
+	showAddFolderButton = true;
+	showFolderMenu = true;
+	showTabs = true;
+}
+
+if (showActions) {
+	defaultFolderColumns += ",action";
+}
+
+String allFolderColumns = defaultFolderColumns;
+
+String[] folderColumns = StringUtil.split(PrefsParamUtil.getString(portletPreferences, request, "folderColumns", defaultFolderColumns));
+
+if (!showActions) {
+	folderColumns = ArrayUtil.remove(folderColumns, "action");
+}
+
+int fileEntriesPerPage = PrefsParamUtil.getInteger(portletPreferences, request, "fileEntriesPerPage", SearchContainer.DEFAULT_DELTA);
+
+String defaultFileEntryColumns = "name,size";
+
+if (PropsValues.DL_FILE_ENTRY_BUFFERED_INCREMENT_ENABLED) {
+	defaultFileEntryColumns += ",downloads";
+}
+
+defaultFileEntryColumns += ",locked";
+
+if (showActions) {
+	defaultFileEntryColumns += ",action";
+}
+
+String allFileEntryColumns = defaultFileEntryColumns;
+
+String[] fileEntryColumns = StringUtil.split(PrefsParamUtil.getString(portletPreferences, request, "fileEntryColumns", defaultFileEntryColumns));
+
+if (!showActions) {
+	fileEntryColumns = ArrayUtil.remove(fileEntryColumns, "action");
+}
+
+boolean enableRatings = GetterUtil.getBoolean(portletPreferences.getValue("enableRatings", null), true);
+boolean enableCommentRatings = GetterUtil.getBoolean(portletPreferences.getValue("enableCommentRatings", null), true);
+
+boolean mergedView = false;
+
+Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(locale, timeZone);
+%>
+
+<%@ include file="/html/portlet/document_library_display/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library_display/search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library_display/search.jsp
new file mode 100644
index 0000000..9316e10
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library_display/search.jsp
@@ -0,0 +1,250 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library_display/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+long repositoryId = ParamUtil.getLong(request, "repositoryId");
+long folderId = ParamUtil.getLong(request, "folderId");
+
+long breadcrumbsFolderId = ParamUtil.getLong(request, "breadcrumbsFolderId");
+
+long searchFolderId = ParamUtil.getLong(request, "searchFolderId");
+long searchFolderIds = ParamUtil.getLong(request, "searchFolderIds");
+
+long[] folderIdsArray = null;
+
+if (searchFolderId > 0) {
+	folderIdsArray = new long[] {searchFolderId};
+}
+else {
+	long dataRepositoryId = DLFolderConstants.getFolderId(scopeGroupId, DLFolderConstants.getDataRepositoryId(scopeGroupId, searchFolderIds));
+
+	List<Long> folderIds = DLAppServiceUtil.getSubfolderIds(scopeGroupId, searchFolderIds);
+
+	folderIds.add(0, dataRepositoryId);
+
+	folderIdsArray = StringUtil.split(StringUtil.merge(folderIds), 0L);
+}
+
+String keywords = ParamUtil.getString(request, "keywords");
+
+int mountFoldersCount = DLAppServiceUtil.getMountFoldersCount(scopeGroupId, DLFolderConstants.DEFAULT_PARENT_FOLDER_ID);
+%>
+
+<liferay-portlet:renderURL varImpl="searchURL">
+	<portlet:param name="struts_action" value="/document_library_display/search" />
+</liferay-portlet:renderURL>
+
+<aui:form action="<%= searchURL %>" method="get" name="fm">
+	<liferay-portlet:renderURLParams varImpl="searchURL" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="repositoryId" type="hidden" value="<%= repositoryId %>" />
+	<aui:input name="folderId" type="hidden" value="<%= folderId %>" />
+	<aui:input name="breadcrumbsFolderId" type="hidden" value="<%= breadcrumbsFolderId %>" />
+	<aui:input name="searchFolderId" type="hidden" value="<%= searchFolderId %>" />
+	<aui:input name="searchFolderIds" type="hidden" value="<%= searchFolderIds %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title="search"
+	/>
+
+	<div class="form-search">
+		<liferay-ui:input-search autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" placeholder='<%= LanguageUtil.get(locale, "keywords") %>' title='<%= LanguageUtil.get(locale, "search-documents") %>' />
+	</div>
+
+	<br /><br />
+
+	<c:if test="<%= (mountFoldersCount > 0) && (folderId == DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) %>">
+
+		<%
+		List<Folder> mountFolders = DLAppServiceUtil.getMountFolders(scopeGroupId, DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, QueryUtil.ALL_POS, QueryUtil.ALL_POS);
+
+		StringBundler sb = new StringBundler((6 * mountFoldersCount) - 1);
+
+		for (int i = 0; i < mountFoldersCount; i++) {
+			Folder mountFolder = mountFolders.get(i);
+
+			PortletURL searchExternalRepositoryURL = renderResponse.createRenderURL();
+
+			searchExternalRepositoryURL.setParameter("struts_action", "/document_library_display/search");
+			searchExternalRepositoryURL.setParameter("redirect", redirect);
+			searchExternalRepositoryURL.setParameter("repositoryId", String.valueOf(mountFolder.getRepositoryId()));
+			searchExternalRepositoryURL.setParameter("folderId", String.valueOf(mountFolder.getFolderId()));
+			searchExternalRepositoryURL.setParameter("breadcrumbsFolderId", String.valueOf(breadcrumbsFolderId));
+			searchExternalRepositoryURL.setParameter("searchFolderId", String.valueOf(searchFolderId));
+			searchExternalRepositoryURL.setParameter("searchFolderIds", String.valueOf(searchFolderIds));
+			searchExternalRepositoryURL.setParameter("keywords", keywords);
+
+			sb.append("<a href=\"");
+			sb.append(searchExternalRepositoryURL.toString());
+			sb.append("\">");
+			sb.append(mountFolder.getName());
+			sb.append("</a>");
+
+			if ((i + 1) < mountFoldersCount) {
+				sb.append(", ");
+			}
+		}
+		%>
+
+		<span class="alert alert-info">
+			<liferay-ui:message arguments="<%= sb.toString() %>" key="results-from-the-local-repository-search-in-x" />
+		</span>
+	</c:if>
+
+	<%
+	PortletURL portletURL = renderResponse.createRenderURL();
+
+	portletURL.setParameter("struts_action", "/document_library_display/search");
+	portletURL.setParameter("redirect", redirect);
+	portletURL.setParameter("repositoryId", String.valueOf(repositoryId));
+	portletURL.setParameter("folderId", String.valueOf(folderId));
+	portletURL.setParameter("breadcrumbsFolderId", String.valueOf(breadcrumbsFolderId));
+	portletURL.setParameter("searchFolderId", String.valueOf(searchFolderId));
+	portletURL.setParameter("searchFolderIds", String.valueOf(searchFolderIds));
+	portletURL.setParameter("keywords", keywords);
+	%>
+
+	<liferay-ui:search-container
+		emptyResultsMessage='<%= LanguageUtil.format(pageContext, "no-documents-were-found-that-matched-the-keywords-x", "<strong>" + HtmlUtil.escape(keywords) + "</strong>") %>'
+		iteratorURL="<%= portletURL %>"
+	>
+
+		<%
+		SearchContext searchContext = SearchContextFactory.getInstance(request);
+
+		searchContext.setAttribute("paginationType", "more");
+		searchContext.setEnd(searchContainer.getEnd());
+		searchContext.setFolderIds(folderIdsArray);
+		searchContext.setIncludeDiscussions(true);
+		searchContext.setKeywords(keywords);
+
+		QueryConfig queryConfig = new QueryConfig();
+
+		queryConfig.setHighlightEnabled(true);
+
+		searchContext.setQueryConfig(queryConfig);
+
+		searchContext.setStart(searchContainer.getStart());
+
+		Hits hits = DLAppServiceUtil.search(repositoryId, searchContext);
+
+		searchContainer.setTotal(hits.getLength());
+
+		PortletURL hitURL = renderResponse.createRenderURL();
+		%>
+
+		<liferay-ui:search-container-results
+			results="<%= SearchResultUtil.getSearchResults(hits, locale, hitURL) %>"
+		/>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.kernel.search.SearchResult"
+			modelVar="searchResult"
+		>
+
+			<%
+			Summary summary = searchResult.getSummary();
+
+			FileEntry fileEntry = null;
+			Folder folder = null;
+
+			String className = searchResult.getClassName();
+
+			if (className.equals(DLFileEntry.class.getName()) || FileEntry.class.isAssignableFrom(Class.forName(className))) {
+				fileEntry = DLAppLocalServiceUtil.getFileEntry(searchResult.getClassPK());
+			}
+			else if (searchResult.getClassName().equals(DLFolder.class.getName())) {
+				folder = DLAppLocalServiceUtil.getFolder(searchResult.getClassPK());
+			}
+
+			request.removeAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+			%>
+
+			<c:choose>
+				<c:when test="<%= fileEntry != null %>">
+
+					<%
+					request.setAttribute("view_file_entry.jsp-fileEntry", fileEntry);
+					%>
+
+					<portlet:renderURL var="rowURL">
+						<portlet:param name="struts_action" value="/document_library_display/view_file_entry" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+						<portlet:param name="fileEntryId" value="<%= String.valueOf(fileEntry.getFileEntryId()) %>" />
+					</portlet:renderURL>
+
+					<liferay-ui:app-view-search-entry
+						actionJsp='<%= (showActions) ? "/html/portlet/document_library/file_entry_action.jsp" : StringPool.BLANK %>'
+						containerName="<%= DLUtil.getAbsolutePath(renderRequest, fileEntry.getFolderId()) %>"
+						cssClass='<%= MathUtil.isEven(index) ? "search" : "search alt" %>'
+						description="<%= (summary != null) ? HtmlUtil.escape(summary.getContent()) : fileEntry.getDescription() %>"
+						mbMessages="<%= searchResult.getMBMessages() %>"
+						queryTerms="<%= hits.getQueryTerms() %>"
+						thumbnailSrc="<%= DLUtil.getThumbnailSrc(fileEntry, null, themeDisplay) %>"
+						title="<%= (summary != null) ? HtmlUtil.escape(summary.getTitle()) : fileEntry.getTitle() %>"
+						url="<%= rowURL %>"
+					/>
+				</c:when>
+				<c:when test="<%= folder != null %>">
+
+					<%
+					String folderImage = "folder_empty_document";
+
+					if (DLAppServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(folder.getRepositoryId(), folder.getFolderId(), WorkflowConstants.STATUS_APPROVED, true) > 0) {
+						folderImage = "folder_full_document";
+					}
+
+					request.setAttribute("view.jsp-folder", folder);
+					request.setAttribute("view.jsp-folderId", String.valueOf(folder.getFolderId()));
+					request.setAttribute("view.jsp-repositoryId", String.valueOf(folder.getRepositoryId()));
+					%>
+
+					<portlet:renderURL var="rowURL">
+						<portlet:param name="struts_action" value="/document_library/view" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+						<portlet:param name="folderId" value="<%= String.valueOf(folder.getFolderId()) %>" />
+					</portlet:renderURL>
+
+					<liferay-ui:app-view-search-entry
+						actionJsp='<%= (showActions) ? "/html/portlet/document_library/folder_action.jsp" : StringPool.BLANK %>'
+						containerName="<%= DLUtil.getAbsolutePath(renderRequest, folder.getParentFolderId()) %>"
+						cssClass='<%= MathUtil.isEven(index) ? "search" : "search alt" %>'
+						description="<%= (summary != null) ? HtmlUtil.escape(summary.getContent()) : folder.getDescription() %>"
+						queryTerms="<%= hits.getQueryTerms() %>"
+						thumbnailSrc='<%= themeDisplay.getPathThemeImages() + "/file_system/large/" + folderImage + ".png" %>'
+						title="<%= (summary != null) ? HtmlUtil.escape(summary.getTitle()) : folder.getName() %>"
+						url="<%= rowURL %>"
+					/>
+				</c:when>
+			</c:choose>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-paginator searchContainer="<%= searchContainer %>" type="more" />
+	</liferay-ui:search-container>
+</aui:form>
+
+<%
+if (searchFolderId > 0) {
+	DLUtil.addPortletBreadcrumbEntries(searchFolderId, request, renderResponse);
+}
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "search") + ": " + keywords, currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library_display/select_add_file_entry_type.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library_display/select_add_file_entry_type.jsp
new file mode 100644
index 0000000..56a0299
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library_display/select_add_file_entry_type.jsp
@@ -0,0 +1,77 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library_display/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+String backURL = ParamUtil.getString(request, "backURL");
+
+long repositoryId = ParamUtil.getLong(request, "repositoryId");
+long folderId = ParamUtil.getLong(request, "folderId");
+
+List<DLFileEntryType> fileEntryTypes = DLFileEntryTypeServiceUtil.getFolderFileEntryTypes(PortalUtil.getSiteAndCompanyGroupIds(themeDisplay), folderId, true);
+%>
+
+<liferay-ui:search-container>
+	<liferay-ui:search-container-results
+		results="<%= fileEntryTypes %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portlet.documentlibrary.model.DLFileEntryType"
+		escapedModel="<%= true %>"
+		keyProperty="fileEntryTypeId"
+		modelVar="fileEntryType"
+	>
+		<liferay-ui:search-container-column-text name="name">
+			<a class="select-file-entry-type" data-rowId="<%= fileEntryType.getFileEntryTypeId() %>" href="javascript:;"><%= HtmlUtil.escape(fileEntryType.getName(locale)) %></a>
+		</liferay-ui:search-container-column-text>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
+
+<aui:script use="liferay-portlet-url,liferay-search-container">
+	var searchContainer = Liferay.SearchContainer.get('<portlet:namespace />dlFileEntryTypesSearchContainer');
+
+	searchContainer.get('contentBox').delegate(
+		'click',
+		function(event) {
+			var link = event.currentTarget;
+
+			var portletURL = Liferay.PortletURL.createURL('<%= PortletURLFactoryUtil.create(request, portletId, themeDisplay.getPlid(), PortletRequest.RENDER_PHASE) %>');
+
+			portletURL.setParameter('<%= Constants.CMD %>', '<%= Constants.ADD %>');
+			portletURL.setParameter('backURL', '<%= HtmlUtil.escape(backURL) %>');
+			portletURL.setParameter('fileEntryTypeId', link.getAttribute('data-rowId'));
+			portletURL.setParameter('folderId', '<%= folderId %>');
+			portletURL.setParameter('redirect', '<%= HtmlUtil.escape(redirect) %>');
+			portletURL.setParameter('repositoryId', '<%= repositoryId %>');
+			portletURL.setParameter('struts_action', '/document_library/edit_file_entry');
+
+			Liferay.Util.getOpener().location.href = portletURL.toString();
+
+			Liferay.fire(
+				'closeWindow',
+				{
+					id: '<portlet:namespace />selectDocumentType'
+				}
+			);
+		},
+		'.select-file-entry-type'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library_display/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library_display/view.jsp
new file mode 100644
index 0000000..00cc641
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/document_library_display/view.jsp
@@ -0,0 +1,290 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library_display/init.jsp" %>
+
+<%
+String topLink = ParamUtil.getString(request, "topLink", "home");
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+Folder folder = (Folder)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FOLDER);
+
+long defaultFolderId = GetterUtil.getLong(portletPreferences.getValue("rootFolderId", StringPool.BLANK), DLFolderConstants.DEFAULT_PARENT_FOLDER_ID);
+
+long folderId = BeanParamUtil.getLong(folder, request, "folderId", defaultFolderId);
+
+boolean defaultFolderView = false;
+
+if ((folder == null) && (defaultFolderId != DLFolderConstants.DEFAULT_PARENT_FOLDER_ID)) {
+	defaultFolderView = true;
+}
+
+if (defaultFolderView) {
+	try {
+		folder = DLAppLocalServiceUtil.getFolder(folderId);
+	}
+	catch (NoSuchFolderException nsfe) {
+		folderId = DLFolderConstants.DEFAULT_PARENT_FOLDER_ID;
+	}
+}
+
+long repositoryId = scopeGroupId;
+
+if (folder != null) {
+	repositoryId = folder.getRepositoryId();
+}
+
+int status = WorkflowConstants.STATUS_APPROVED;
+
+if (permissionChecker.isCompanyAdmin() || permissionChecker.isGroupAdmin(scopeGroupId)) {
+	status = WorkflowConstants.STATUS_ANY;
+}
+
+int foldersCount = DLAppServiceUtil.getFoldersCount(repositoryId, folderId);
+int fileEntriesCount = DLAppServiceUtil.getFileEntriesAndFileShortcutsCount(repositoryId, folderId, status);
+
+long assetCategoryId = ParamUtil.getLong(request, "categoryId");
+String assetTagName = ParamUtil.getString(request, "tag");
+
+boolean useAssetEntryQuery = (assetCategoryId > 0) || Validator.isNotNull(assetTagName);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/document_library_display/view");
+portletURL.setParameter("topLink", topLink);
+portletURL.setParameter("folderId", String.valueOf(folderId));
+
+request.setAttribute("view.jsp-folder", folder);
+
+request.setAttribute("view.jsp-defaultFolderId", String.valueOf(defaultFolderId));
+
+request.setAttribute("view.jsp-folderId", String.valueOf(folderId));
+
+request.setAttribute("view.jsp-repositoryId", String.valueOf(repositoryId));
+
+request.setAttribute("view.jsp-viewFolder", Boolean.TRUE.toString());
+
+request.setAttribute("view.jsp-useAssetEntryQuery", String.valueOf(useAssetEntryQuery));
+%>
+
+<portlet:actionURL var="undoTrashURL">
+	<portlet:param name="struts_action" value="/document_library/edit_entry" />
+	<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.RESTORE %>" />
+</portlet:actionURL>
+
+<liferay-ui:trash-undo portletURL="<%= undoTrashURL %>" />
+
+<liferay-util:include page="/html/portlet/document_library/top_links.jsp" />
+
+<c:choose>
+	<c:when test="<%= useAssetEntryQuery %>">
+		<liferay-ui:categorization-filter
+			assetType="documents"
+			portletURL="<%= portletURL %>"
+		/>
+
+		<%@ include file="/html/portlet/document_library/view_file_entries.jspf" %>
+
+	</c:when>
+	<c:when test='<%= topLink.equals("home") %>'>
+		<aui:row>
+			<c:if test="<%= (folder != null) %>">
+				<liferay-ui:header
+					backURL="<%= redirect %>"
+					localizeTitle="<%= false %>"
+					title="<%= folder.getName() %>"
+				/>
+			</c:if>
+
+			<aui:col cssClass="lfr-asset-column lfr-asset-column-details" width="<%= showFolderMenu ? 75 : 100 %>">
+				<liferay-ui:panel-container extended="<%= false %>" id='<%= renderResponse.getNamespace() + "documentLibraryDisplayInfoPanelContainer" %>' persistState="<%= true %>">
+					<c:if test="<%= folder != null %>">
+						<c:if test="<%= Validator.isNotNull(folder.getDescription()) %>">
+							<div class="lfr-asset-description">
+								<%= HtmlUtil.escape(folder.getDescription()) %>
+							</div>
+						</c:if>
+
+						<div class="lfr-asset-metadata">
+							<div class="lfr-asset-icon lfr-asset-date">
+								<%= LanguageUtil.format(pageContext, "last-updated-x", dateFormatDateTime.format(folder.getModifiedDate())) %>
+							</div>
+
+							<div class="lfr-asset-icon lfr-asset-subfolders">
+								<%= foldersCount %> <liferay-ui:message key='<%= (foldersCount == 1) ? "subfolder" : "subfolders" %>' />
+							</div>
+
+							<div class="lfr-asset-icon lfr-asset-items last">
+								<%= fileEntriesCount %> <liferay-ui:message key='<%= (fileEntriesCount == 1) ? "document" : "documents" %>' />
+							</div>
+						</div>
+
+						<liferay-ui:custom-attributes-available className="<%= DLFolderConstants.getClassName() %>">
+							<liferay-ui:custom-attribute-list
+								className="<%= DLFolderConstants.getClassName() %>"
+								classPK="<%= (folder != null) ? folder.getFolderId() : 0 %>"
+								editable="<%= false %>"
+								label="<%= true %>"
+							/>
+						</liferay-ui:custom-attributes-available>
+					</c:if>
+
+					<c:if test="<%= foldersCount > 0 %>">
+						<liferay-ui:panel collapsible="<%= true %>" cssClass="view-folders" extended="<%= true %>" id='<%= renderResponse.getNamespace() + "documentLibraryDisplayFoldersListingPanel" %>' persistState="<%= true %>" title='<%= (folder != null) ? "subfolders" : "folders" %>'>
+							<liferay-ui:search-container
+								curParam="cur1"
+								delta="<%= foldersPerPage %>"
+								deltaConfigurable="<%= false %>"
+								headerNames="<%= StringUtil.merge(folderColumns) %>"
+								iteratorURL="<%= portletURL %>"
+								total="<%= foldersCount %>"
+							>
+								<liferay-ui:search-container-results
+									results="<%= DLAppServiceUtil.getFolders(repositoryId, folderId, searchContainer.getStart(), searchContainer.getEnd()) %>"
+								/>
+
+								<liferay-ui:search-container-row
+									className="com.liferay.portal.kernel.repository.model.Folder"
+									escapedModel="<%= true %>"
+									keyProperty="folderId"
+									modelVar="curFolder"
+									rowVar="row"
+								>
+									<liferay-portlet:renderURL varImpl="rowURL">
+										<portlet:param name="struts_action" value="/document_library_display/view" />
+										<portlet:param name="redirect" value="<%= currentURL %>" />
+										<portlet:param name="folderId" value="<%= String.valueOf(curFolder.getFolderId()) %>" />
+									</liferay-portlet:renderURL>
+
+									<%@ include file="/html/portlet/document_library/folder_columns.jspf" %>
+								</liferay-ui:search-container-row>
+
+								<liferay-ui:search-iterator />
+							</liferay-ui:search-container>
+						</liferay-ui:panel>
+					</c:if>
+
+					<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id='<%= renderResponse.getNamespace() + "documentLibraryDisplayDocumentsListingPanel" %>' persistState="<%= true %>" title="documents">
+						<%@ include file="/html/portlet/document_library/view_file_entries.jspf" %>
+					</liferay-ui:panel>
+				</liferay-ui:panel-container>
+			</aui:col>
+
+			<c:if test="<%= showFolderMenu %>">
+				<aui:col cssClass="lfr-asset-column lfr-asset-column-actions" last="<%= true %>" width="<%= 25 %>">
+					<div class="lfr-asset-summary">
+						<liferay-ui:icon
+							cssClass="lfr-asset-avatar"
+							image='<%= "../file_system/large/" + (((foldersCount + fileEntriesCount) > 0) ? "folder_full_document" : "folder_empty_document") %>'
+							message=""
+						/>
+
+						<div class="lfr-asset-name">
+							<h4><%= (folder != null) ? folder.getName() : LanguageUtil.get(pageContext, "home") %></h4>
+						</div>
+					</div>
+
+					<%
+					request.removeAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+					%>
+
+					<liferay-util:include page="/html/portlet/document_library/folder_action.jsp" />
+				</aui:col>
+			</c:if>
+		</aui:row>
+
+		<%
+		if (folder != null) {
+			DLUtil.addPortletBreadcrumbEntries(folder, request, renderResponse);
+
+			if (!defaultFolderView) {
+				PortalUtil.setPageSubtitle(folder.getName(), request);
+				PortalUtil.setPageDescription(folder.getDescription(), request);
+			}
+		}
+		%>
+
+	</c:when>
+	<c:when test='<%= topLink.equals("mine") || topLink.equals("recent") %>'>
+		<aui:row>
+			<liferay-ui:header
+				backURL="<%= redirect %>"
+				title="<%= topLink %>"
+			/>
+
+			<%
+			long groupFileEntriesUserId = 0;
+
+			if (topLink.equals("mine") && themeDisplay.isSignedIn()) {
+				groupFileEntriesUserId = user.getUserId();
+			}
+			%>
+
+			<liferay-ui:search-container
+				delta="<%= fileEntriesPerPage %>"
+				deltaConfigurable="<%= false %>"
+				emptyResultsMessage="there-are-no-documents"
+				iteratorURL="<%= portletURL %>"
+				total="<%= DLAppServiceUtil.getGroupFileEntriesCount(repositoryId, groupFileEntriesUserId, defaultFolderId, null, status) %>"
+			>
+
+				<liferay-ui:search-container-results
+					results="<%= DLAppServiceUtil.getGroupFileEntries(repositoryId, groupFileEntriesUserId, defaultFolderId, null, status, searchContainer.getStart(), searchContainer.getEnd(), null) %>"
+				/>
+
+				<liferay-ui:search-container-row
+					className="com.liferay.portal.kernel.repository.model.FileEntry"
+					escapedModel="<%= true %>"
+					keyProperty="fileEntryId"
+					modelVar="fileEntry"
+				>
+
+					<%
+					DLFileShortcut fileShortcut = null;
+
+					String rowHREF = null;
+
+					if (DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.VIEW)) {
+						PortletURL viewFileEntryURL = renderResponse.createRenderURL();
+
+						viewFileEntryURL.setParameter("struts_action", "/document_library_display/view_file_entry");
+						viewFileEntryURL.setParameter("redirect", currentURL);
+						viewFileEntryURL.setParameter("fileEntryId", String.valueOf(fileEntry.getFileEntryId()));
+
+						rowHREF = viewFileEntryURL.toString();
+					}
+					%>
+
+					<%@ include file="/html/portlet/document_library/file_entry_columns.jspf" %>
+				</liferay-ui:search-container-row>
+
+				<liferay-ui:search-iterator />
+			</liferay-ui:search-container>
+		</aui:row>
+
+		<%
+		PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, topLink), currentURL);
+
+		PortalUtil.setPageSubtitle(LanguageUtil.get(pageContext, topLink), request);
+		%>
+
+	</c:when>
+</c:choose>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.document_library.view_jsp");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_list_display/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_list_display/configuration.jsp
new file mode 100644
index 0000000..f7226c1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_list_display/configuration.jsp
@@ -0,0 +1,233 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_list_display/init.jsp" %>
+
+<%
+int cur = ParamUtil.getInteger(request, SearchContainer.DEFAULT_CUR_PARAM);
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+DDLRecordSet selRecordSet = null;
+
+try {
+	if (Validator.isNotNull(recordSetId)) {
+		selRecordSet = DDLRecordSetLocalServiceUtil.getRecordSet(recordSetId);
+
+		if (selRecordSet.getGroupId() != scopeGroupId) {
+			selRecordSet = null;
+		}
+	}
+}
+catch (NoSuchRecordSetException nsrse) {
+}
+
+request.setAttribute("record_set_action.jsp-selRecordSet", selRecordSet);
+%>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationActionURL" />
+<liferay-portlet:renderURL portletConfiguration="true" varImpl="configurationRenderURL" />
+
+<aui:form action="<%= configurationActionURL %>" method="post" name="fm1">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value='<%= configurationRenderURL + StringPool.AMPERSAND + renderResponse.getNamespace() + "cur=" + cur %>' />
+
+	<liferay-ui:error exception="<%= NoSuchRecordSetException.class %>" message="the-list-could-not-be-found" />
+
+	<div class="alert alert-info">
+		<span class="displaying-help-message-holder <%= selRecordSet == null ? StringPool.BLANK : "hide" %>">
+			<liferay-ui:message key="please-select-a-list-entry-from-the-list-below" />
+		</span>
+
+		<span class="displaying-record-set-id-holder <%= selRecordSet == null ? "hide" : StringPool.BLANK %>">
+			<liferay-ui:message key="displaying-list" />: <span class="displaying-record-set-id"><%= selRecordSet != null ? HtmlUtil.escape(selRecordSet.getName(locale)) : StringPool.BLANK %></span>
+		</span>
+	</div>
+
+	<c:if test="<%= selRecordSet != null %>">
+
+		<%
+		long structureClassNameId = PortalUtil.getClassNameId(DDMStructure.class);
+		%>
+
+		<aui:fieldset label="templates">
+			<aui:select helpMessage="select-the-display-template-used-to-diplay-the-list-records" label="display-template" name="displayTemplateId" onChange='<%= "document." + renderResponse.getNamespace() + "fm." + renderResponse.getNamespace() + "displayDDMTemplateId.value = this.value;" %>'>
+				<aui:option label="default" value="<%= 0 %>" />
+
+				<%
+				List<DDMTemplate> templates = DDMTemplateLocalServiceUtil.getTemplates(scopeGroupId, structureClassNameId, selRecordSet.getDDMStructureId(), DDMTemplateConstants.TEMPLATE_TYPE_DISPLAY);
+
+				for (DDMTemplate template : templates) {
+					boolean selected = false;
+
+					if (displayDDMTemplateId == template.getTemplateId()) {
+						selected = true;
+					}
+				%>
+
+					<aui:option label="<%= HtmlUtil.escape(template.getName(locale)) %>" selected="<%= selected %>" value="<%= template.getTemplateId() %>" />
+
+				<%
+				}
+				%>
+
+			</aui:select>
+
+			<aui:select helpMessage="select-the-form-template-used-to-add-records-to-the-list" label="form-template" name="formTemplateId" onChange='<%= "document." + renderResponse.getNamespace() + "fm." + renderResponse.getNamespace() + "formDDMTemplateId.value = this.value;" %>'>
+				<aui:option label="default" value="<%= 0 %>" />
+
+				<%
+				List<DDMTemplate> templates = DDMTemplateLocalServiceUtil.getTemplates(scopeGroupId, structureClassNameId, selRecordSet.getDDMStructureId(), DDMTemplateConstants.TEMPLATE_TYPE_FORM, DDMTemplateConstants.TEMPLATE_MODE_CREATE);
+
+				for (DDMTemplate template : templates) {
+					boolean selected = false;
+
+					if (formDDMTemplateId == template.getTemplateId()) {
+						selected = true;
+					}
+				%>
+
+					<aui:option label="<%= HtmlUtil.escape(template.getName(locale)) %>" selected="<%= selected %>" value="<%= template.getTemplateId() %>" />
+
+				<%
+				}
+				%>
+
+			</aui:select>
+
+			<%
+			String editableHelpMessage = null;
+
+			Group scopeGroup = themeDisplay.getScopeGroup();
+
+			if (scopeGroup.isInStagingPortlet(portletDisplay.getId())) {
+				editableHelpMessage = "check-to-allow-users-to-add-records-to-the-list-once-this-application-is-published-to-live";
+			}
+			else {
+				editableHelpMessage = "check-to-allow-users-to-add-records-to-the-list";
+			}
+			%>
+
+			<aui:input helpMessage="<%= editableHelpMessage %>" name="editable" onChange='<%= "document." + renderResponse.getNamespace() + "fm." + renderResponse.getNamespace() + "editable.value = this.checked;" %>' type="checkbox" value="<%= editable %>" />
+
+			<aui:input helpMessage="check-to-view-the-list-records-in-a-spreadsheet" label="spreadsheet-view" name="spreadsheet" onChange='<%= "document." + renderResponse.getNamespace() + "fm." + renderResponse.getNamespace() + "spreadsheet.value = this.checked;" %>' type="checkbox" value="<%= spreadsheet %>" />
+		</aui:fieldset>
+	</c:if>
+
+	<aui:fieldset label="lists">
+		<liferay-ui:search-container
+			searchContainer="<%= new RecordSetSearch(renderRequest, configurationRenderURL) %>"
+		>
+
+			<%
+			RecordSetSearchTerms searchTerms = (RecordSetSearchTerms)searchContainer.getSearchTerms();
+			%>
+
+			<liferay-ui:search-form
+				page="/html/portlet/dynamic_data_lists/record_set_search.jsp"
+			/>
+
+			<liferay-ui:search-container-results>
+				<%@ include file="/html/portlet/dynamic_data_lists/record_set_search_results.jspf" %>
+			</liferay-ui:search-container-results>
+
+			<liferay-ui:search-container-row
+				className="com.liferay.portlet.dynamicdatalists.model.DDLRecordSet"
+				escapedModel="<%= true %>"
+				keyProperty="recordSetId"
+				modelVar="recordSet"
+			>
+
+				<%
+				StringBundler sb = new StringBundler(7);
+
+				sb.append("javascript:");
+				sb.append(renderResponse.getNamespace());
+				sb.append("selectRecordSet('");
+				sb.append(recordSet.getRecordSetId());
+				sb.append("','");
+				sb.append(recordSet.getName(locale));
+				sb.append("');");
+
+				String rowURL = sb.toString();
+				%>
+
+				<%@ include file="/html/portlet/dynamic_data_lists/search_columns.jspf" %>
+
+				<liferay-ui:search-container-column-jsp
+					align="right"
+					path="/html/portlet/dynamic_data_lists/record_set_action.jsp"
+				/>
+			</liferay-ui:search-container-row>
+
+			<div class="separator"><!-- --></div>
+
+			<liferay-ui:search-iterator />
+		</liferay-ui:search-container>
+	</aui:fieldset>
+</aui:form>
+
+<br />
+
+<aui:form action="<%= configurationActionURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value='<%= configurationRenderURL + StringPool.AMPERSAND + renderResponse.getNamespace() + "cur" + cur %>' />
+	<aui:input name="preferences--recordSetId--" type="hidden" value="<%= recordSetId %>" />
+	<aui:input name="preferences--displayDDMTemplateId--" type="hidden" value="<%= displayDDMTemplateId %>" />
+	<aui:input name="preferences--formDDMTemplateId--" type="hidden" value="<%= formDDMTemplateId %>" />
+	<aui:input name="preferences--editable--" type="hidden" value="<%= editable %>" />
+	<aui:input name="preferences--spreadsheet--" type="hidden" value="<%= spreadsheet %>" />
+
+	<aui:fieldset>
+		<aui:field-wrapper label="portlet-id">
+			<liferay-ui:input-resource url="<%= portletResource %>" />
+		</aui:field-wrapper>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />selectRecordSet',
+		function(recordSetId, recordSetName) {
+			var A = AUI();
+
+			document.<portlet:namespace />fm.<portlet:namespace />recordSetId.value = recordSetId;
+			document.<portlet:namespace />fm.<portlet:namespace />displayDDMTemplateId.value = "";
+			document.<portlet:namespace />fm.<portlet:namespace />formDDMTemplateId.value = "";
+
+			A.one('.displaying-record-set-id-holder').show();
+			A.one('.displaying-help-message-holder').hide();
+
+			var displayRecordSetId = A.one('.displaying-record-set-id');
+
+			displayRecordSetId.html(recordSetName + ' (<liferay-ui:message key="modified" />)');
+
+			displayRecordSetId.addClass('modified');
+
+			var dialog = Liferay.Util.getWindow();
+
+			if (dialog) {
+				dialog.set('title', recordSetName + ' - <liferay-ui:message key="configuration" />');
+			}
+		},
+		['aui-base']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_list_display/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_list_display/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_list_display/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_list_display/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_list_display/init.jsp
new file mode 100644
index 0000000..529e0ff
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_list_display/init.jsp
@@ -0,0 +1,49 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.dynamicdatalists.NoSuchRecordSetException" %><%@
+page import="com.liferay.portlet.dynamicdatalists.model.DDLRecordSet" %><%@
+page import="com.liferay.portlet.dynamicdatalists.model.DDLRecordSetConstants" %><%@
+page import="com.liferay.portlet.dynamicdatalists.search.RecordSetSearch" %><%@
+page import="com.liferay.portlet.dynamicdatalists.search.RecordSetSearchTerms" %><%@
+page import="com.liferay.portlet.dynamicdatalists.service.DDLRecordSetLocalServiceUtil" %><%@
+page import="com.liferay.portlet.dynamicdatalists.service.DDLRecordSetServiceUtil" %><%@
+page import="com.liferay.portlet.dynamicdatalists.service.permission.DDLPermission" %><%@
+page import="com.liferay.portlet.dynamicdatalists.service.permission.DDLRecordSetPermission" %><%@
+page import="com.liferay.portlet.dynamicdatalists.util.DDLUtil" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.service.permission.DDMPermission" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.util.DDMDisplay" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.util.DDMDisplayRegistryUtil" %>
+
+<%
+String portletResource = ParamUtil.getString(request, "portletResource");
+
+long recordSetId = GetterUtil.getLong(portletPreferences.getValue("recordSetId", StringPool.BLANK));
+
+long displayDDMTemplateId = GetterUtil.getLong(portletPreferences.getValue("displayDDMTemplateId", StringPool.BLANK));
+long formDDMTemplateId = GetterUtil.getLong(portletPreferences.getValue("formDDMTemplateId", StringPool.BLANK));
+
+boolean editable = DDLUtil.isEditable(portletPreferences, portletDisplay.getId(), themeDisplay.getScopeGroupId());
+
+boolean spreadsheet = GetterUtil.getBoolean(portletPreferences.getValue("spreadsheet", Boolean.FALSE.toString()));
+
+DDMDisplay ddmDisplay = DDMDisplayRegistryUtil.getDDMDisplay(PortletKeys.DYNAMIC_DATA_LISTS);
+%>
+
+<%@ include file="/html/portlet/dynamic_data_list_display/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_list_display/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_list_display/view.jsp
new file mode 100644
index 0000000..fd4f4cb
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_list_display/view.jsp
@@ -0,0 +1,206 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_list_display/init.jsp" %>
+
+<%
+DDLRecordSet recordSet = null;
+
+try {
+	if (Validator.isNotNull(recordSetId)) {
+		recordSet = DDLRecordSetLocalServiceUtil.getRecordSet(recordSetId);
+
+		if (recordSet.getGroupId() != scopeGroupId) {
+			recordSet = null;
+		}
+	}
+%>
+
+	<c:choose>
+		<c:when test="<%= (recordSet != null) %>">
+			<c:choose>
+				<c:when test="<%= DDLRecordSetPermission.contains(permissionChecker, recordSetId, ActionKeys.VIEW) %>">
+
+					<%
+					renderRequest.setAttribute(WebKeys.DYNAMIC_DATA_LISTS_RECORD_SET, recordSet);
+					%>
+
+					<liferay-util:include page="/html/portlet/dynamic_data_lists/view_record_set.jsp">
+						<liferay-util:param name="displayDDMTemplateId" value="<%= String.valueOf(displayDDMTemplateId) %>" />
+						<liferay-util:param name="formDDMTemplateId" value="<%= String.valueOf(formDDMTemplateId) %>" />
+						<liferay-util:param name="editable" value="<%= String.valueOf(editable) %>" />
+						<liferay-util:param name="spreadsheet" value="<%= String.valueOf(spreadsheet) %>" />
+					</liferay-util:include>
+				</c:when>
+				<c:otherwise>
+
+					<%
+					renderRequest.setAttribute(WebKeys.PORTLET_CONFIGURATOR_VISIBILITY, Boolean.TRUE);
+					%>
+
+					<div class="alert alert-error">
+						<liferay-ui:message key="you-do-not-have-the-roles-required-to-access-this-dynamic-data-list-record-set" />
+					</div>
+				</c:otherwise>
+			</c:choose>
+		</c:when>
+		<c:otherwise>
+
+			<%
+			renderRequest.setAttribute(WebKeys.PORTLET_CONFIGURATOR_VISIBILITY, Boolean.TRUE);
+			%>
+
+			<br />
+
+			<div class="alert alert-info">
+				<liferay-ui:message key="select-an-existing-list-or-add-a-list-to-be-displayed-in-this-portlet" />
+			</div>
+		</c:otherwise>
+	</c:choose>
+
+<%
+}
+catch (NoSuchRecordSetException nsrse) {
+%>
+
+	<div class="alert alert-error">
+		<%= LanguageUtil.get(pageContext, "the-selected-list-no-longer-exists") %>
+	</div>
+
+<%
+}
+
+boolean hasConfigurationPermission = PortletPermissionUtil.contains(permissionChecker, layout, portletDisplay.getId(), ActionKeys.CONFIGURATION);
+
+boolean showAddListIcon = hasConfigurationPermission && DDLPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_RECORD_SET);
+boolean showAddTemplateIcon = (recordSet != null) && DDMPermission.contains(permissionChecker, scopeGroupId, ddmDisplay.getResourceName(), ddmDisplay.getAddTemplateActionId());
+boolean showEditDisplayTemplateIcon = (displayDDMTemplateId != 0) && DDMTemplatePermission.contains(permissionChecker, displayDDMTemplateId, PortletKeys.DYNAMIC_DATA_LISTS, ActionKeys.UPDATE);
+boolean showEditFormTemplateIcon = (formDDMTemplateId != 0) && DDMTemplatePermission.contains(permissionChecker, formDDMTemplateId, PortletKeys.DYNAMIC_DATA_LISTS, ActionKeys.UPDATE);
+%>
+
+<c:if test="<%= themeDisplay.isSignedIn() && !layout.isLayoutPrototypeLinkActive() && (showAddListIcon || showAddTemplateIcon || showEditDisplayTemplateIcon || showEditFormTemplateIcon || hasConfigurationPermission ) %>">
+	<div class="lfr-meta-actions icons-container">
+		<div class="lfr-icon-actions">
+			<c:if test="<%= showAddTemplateIcon %>">
+				<liferay-portlet:renderURL portletName="<%= PortletKeys.DYNAMIC_DATA_MAPPING %>" var="addFormTemplateURL" windowState="<%= WindowState.MAXIMIZED.toString() %>">
+					<portlet:param name="struts_action" value="/dynamic_data_mapping/edit_template" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="portletResource" value="<%= portletDisplay.getId() %>" />
+					<portlet:param name="portletResourceNamespace" value="<%= renderResponse.getNamespace() %>" />
+					<portlet:param name="refererPortletName" value="<%= PortletKeys.DYNAMIC_DATA_LISTS %>" />
+					<portlet:param name="groupId" value="<%= String.valueOf(scopeGroupId) %>" />
+					<portlet:param name="classNameId" value="<%= String.valueOf(PortalUtil.getClassNameId(DDMStructure.class)) %>" />
+					<portlet:param name="classPK" value="<%= String.valueOf(recordSet.getDDMStructureId()) %>" />
+					<portlet:param name="structureAvailableFields" value='<%= renderResponse.getNamespace() + "getAvailableFields" %>' />
+				</liferay-portlet:renderURL>
+
+				<liferay-ui:icon
+					cssClass="lfr-icon-action lfr-icon-action-add"
+					image="add_template_form"
+					label="<%= true %>"
+					message="add-form-template"
+					url="<%= addFormTemplateURL %>"
+				/>
+
+				<liferay-portlet:renderURL portletName="<%= PortletKeys.DYNAMIC_DATA_MAPPING %>" var="addDisplayTemplateURL" windowState="<%= WindowState.MAXIMIZED.toString() %>">
+					<portlet:param name="struts_action" value="/dynamic_data_mapping/edit_template" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="portletResource" value="<%= portletDisplay.getId() %>" />
+					<portlet:param name="refererPortletName" value="<%= PortletKeys.DYNAMIC_DATA_LISTS %>" />
+					<portlet:param name="groupId" value="<%= String.valueOf(scopeGroupId) %>" />
+					<portlet:param name="classNameId" value="<%= String.valueOf(PortalUtil.getClassNameId(DDMStructure.class)) %>" />
+					<portlet:param name="classPK" value="<%= String.valueOf(recordSet.getDDMStructureId()) %>" />
+					<portlet:param name="type" value="<%= DDMTemplateConstants.TEMPLATE_TYPE_DISPLAY %>" />
+				</liferay-portlet:renderURL>
+
+				<liferay-ui:icon
+					cssClass="lfr-icon-action lfr-icon-action-add"
+					image="add_template_display"
+					label="<%= true %>"
+					message="add-display-template"
+					url="<%= addDisplayTemplateURL %>"
+				/>
+			</c:if>
+
+			<c:if test="<%= showEditFormTemplateIcon %>">
+				<liferay-portlet:renderURL portletName="<%= PortletKeys.DYNAMIC_DATA_MAPPING %>" var="editFormTemplateURL" windowState="<%= WindowState.MAXIMIZED.toString() %>">
+					<portlet:param name="struts_action" value="/dynamic_data_mapping/edit_template" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="portletResource" value="<%= portletDisplay.getId() %>" />
+					<portlet:param name="portletResourceNamespace" value="<%= renderResponse.getNamespace() %>" />
+					<portlet:param name="refererPortletName" value="<%= PortletKeys.DYNAMIC_DATA_LISTS %>" />
+					<portlet:param name="templateId" value="<%= String.valueOf(formDDMTemplateId) %>" />
+					<portlet:param name="structureAvailableFields" value='<%= renderResponse.getNamespace() + "getAvailableFields" %>' />
+				</liferay-portlet:renderURL>
+
+				<liferay-ui:icon
+					cssClass="lfr-icon-action lfr-icon-action-edit-template"
+					image="../file_system/small/xml"
+					label="<%= true %>"
+					message="edit-form-template"
+					url="<%= editFormTemplateURL %>"
+				/>
+			</c:if>
+
+			<c:if test="<%= showEditDisplayTemplateIcon %>">
+				<liferay-portlet:renderURL portletName="<%= PortletKeys.DYNAMIC_DATA_MAPPING %>" var="editDisplayTemplateURL" windowState="<%= WindowState.MAXIMIZED.toString() %>">
+					<portlet:param name="struts_action" value="/dynamic_data_mapping/edit_template" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="portletResource" value="<%= portletDisplay.getId() %>" />
+					<portlet:param name="refererPortletName" value="<%= PortletKeys.DYNAMIC_DATA_LISTS %>" />
+					<portlet:param name="templateId" value="<%= String.valueOf(displayDDMTemplateId) %>" />
+				</liferay-portlet:renderURL>
+
+				<liferay-ui:icon
+					cssClass="lfr-icon-action lfr-icon-action-edit-template"
+					image="../file_system/small/xml"
+					label="<%= true %>"
+					message="edit-display-template"
+					url="<%= editDisplayTemplateURL %>"
+				/>
+			</c:if>
+
+			<c:if test="<%= hasConfigurationPermission %>">
+				<liferay-ui:icon
+					cssClass="lfr-icon-action lfr-icon-action-configuration"
+					image="configuration"
+					label="<%= true %>"
+					message="select-list"
+					method="get"
+					onClick="<%= portletDisplay.getURLConfigurationJS() %>"
+					url="<%= portletDisplay.getURLConfiguration() %>"
+				/>
+			</c:if>
+
+			<c:if test="<%= showAddListIcon %>">
+				<liferay-portlet:renderURL portletName="<%= PortletKeys.DYNAMIC_DATA_LISTS %>" var="addListURL" windowState="<%= WindowState.MAXIMIZED.toString() %>">
+					<portlet:param name="struts_action" value="/dynamic_data_lists/edit_record_set" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="portletResource" value="<%= portletDisplay.getId() %>" />
+					<portlet:param name="groupId" value="<%= String.valueOf(scopeGroupId) %>" />
+				</liferay-portlet:renderURL>
+
+				<liferay-ui:icon
+					cssClass="lfr-icon-action lfr-icon-action-add"
+					image="add_article"
+					label="<%= true %>"
+					message="add-list"
+					url="<%= addListURL %>"
+				/>
+			</c:if>
+		</div>
+	</div>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/asset/full_content.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/asset/full_content.jsp
new file mode 100644
index 0000000..2e374cc
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/asset/full_content.jsp
@@ -0,0 +1,37 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_lists/init.jsp" %>
+
+<%
+DDLRecordVersion recordVersion = (DDLRecordVersion)request.getAttribute(WebKeys.DYNAMIC_DATA_LISTS_RECORD_VERSION);
+
+DDLRecord record = (DDLRecord)request.getAttribute(WebKeys.DYNAMIC_DATA_LISTS_RECORD);
+
+DDLRecordSet recordSet = record.getRecordSet();
+
+DDMStructure ddmStructure = recordSet.getDDMStructure();
+
+Fields fields = StorageEngineUtil.getFields(recordVersion.getDDMStorageId());
+%>
+
+<liferay-ddm:html
+	classNameId="<%= PortalUtil.getClassNameId(DDMStructure.class) %>"
+	classPK="<%= ddmStructure.getPrimaryKey() %>"
+	fields="<%= fields %>"
+	readOnly="<%= true %>"
+	requestedLocale="<%= locale %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/css/.sass-cache/main.css
new file mode 100644
index 0000000..e3b49b9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/css/.sass-cache/main.css
@@ -0,0 +1,5 @@
+.portlet-dynamic-data-lists .lfr-spreadsheet-container .table, .portlet-dynamic-data-list-display .lfr-spreadsheet-container .table {
+  overflow: auto; }
+  .portlet-dynamic-data-lists .lfr-spreadsheet-container .table.yui3-datatable td:after, .portlet-dynamic-data-list-display .lfr-spreadsheet-container .table.yui3-datatable td:after {
+    content: '\0000a0'; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/css/main.css
new file mode 100644
index 0000000..235e1f6
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/css/main.css
@@ -0,0 +1,9 @@
+.portlet-dynamic-data-lists, .portlet-dynamic-data-list-display {
+	.lfr-spreadsheet-container .table {
+		overflow: auto;
+
+		&.yui3-datatable td:after {
+			content: '\0000a0';
+		}
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/custom_spreadsheet_editors.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/custom_spreadsheet_editors.jspf
new file mode 100644
index 0000000..5a0daa5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/custom_spreadsheet_editors.jspf
@@ -0,0 +1,40 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<aui:script use="liferay-portlet-dynamic-data-lists">
+	var DEFAULTS_FORM_VALIDATOR = A.config.FormValidator;
+
+	DEFAULTS_FORM_VALIDATOR.RULES.requiredFields = function(value) {
+		var spreadSheet = window.<portlet:namespace />spreadSheet;
+
+		var activeCell = spreadSheet.get('activeCell');
+
+		var activeColumn = spreadSheet.getColumn(activeCell);
+		var activeRecord = spreadSheet.getRecord(activeCell);
+
+		return !A.Array.some(
+			window.<portlet:namespace />structure,
+			function(item, index, collection) {
+				var fieldName = item.name;
+				var fieldValue = activeRecord.get(fieldName);
+
+				return !fieldValue && (activeColumn.key !== fieldName) && (item.required === 'true');
+			}
+		);
+	};
+
+	DEFAULTS_FORM_VALIDATOR.STRINGS.requiredFields = '<%= UnicodeLanguageUtil.get(pageContext, "please-fill-out-all-required-fields") %>';
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/edit_record.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/edit_record.jsp
new file mode 100644
index 0000000..198ea5c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/edit_record.jsp
@@ -0,0 +1,291 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_lists/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+DDLRecord record = (DDLRecord)request.getAttribute(WebKeys.DYNAMIC_DATA_LISTS_RECORD);
+
+long recordId = BeanParamUtil.getLong(record, request, "recordId");
+
+long recordSetId = BeanParamUtil.getLong(record, request, "recordSetId");
+
+long formDDMTemplateId = ParamUtil.getLong(request, "formDDMTemplateId");
+
+DDLRecordVersion recordVersion = null;
+
+if (record != null) {
+	recordVersion = record.getLatestRecordVersion();
+}
+
+DDLRecordSet recordSet = DDLRecordSetServiceUtil.getRecordSet(recordSetId);
+
+DDMStructure ddmStructure = recordSet.getDDMStructure();
+
+Fields fields = null;
+
+if (recordVersion != null) {
+	fields = StorageEngineUtil.getFields(recordVersion.getDDMStorageId());
+}
+
+Locale[] availableLocales = new Locale[0];
+
+if (fields != null) {
+	Set<Locale> availableLocalesSet = fields.getAvailableLocales();
+
+	availableLocales = availableLocalesSet.toArray(new Locale[availableLocalesSet.size()]);
+}
+
+String defaultLanguageId = ParamUtil.getString(request, "defaultLanguageId");
+
+if (Validator.isNull(defaultLanguageId)) {
+	defaultLanguageId = themeDisplay.getLanguageId();
+
+	if (fields != null) {
+		defaultLanguageId = LocaleUtil.toLanguageId(fields.getDefaultLocale());
+	}
+}
+
+String languageId = ParamUtil.getString(request, "languageId", defaultLanguageId);
+
+boolean translating = false;
+
+if (!defaultLanguageId.equals(languageId)) {
+	translating = true;
+}
+
+if (translating) {
+	redirect = currentURL;
+}
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	showBackURL="<%= !translating %>"
+	title='<%= (record != null) ? LanguageUtil.format(pageContext, "edit-x", ddmStructure.getName(locale)) : LanguageUtil.format(pageContext, "new-x", ddmStructure.getName(locale)) %>'
+/>
+
+<portlet:actionURL var="editRecordURL">
+	<portlet:param name="struts_action" value="/dynamic_data_lists/edit_record" />
+</portlet:actionURL>
+
+<aui:form action="<%= editRecordURL %>" cssClass="lfr-dynamic-form" enctype="multipart/form-data" method="post" name="fm" onSubmit='<%= "event.preventDefault(); submitForm(event.target);" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="recordSetId" type="hidden" value="<%= recordSetId %>" />
+	<aui:input name="recordId" type="hidden" value="<%= recordId %>" />
+	<aui:input name="defaultLanguageId" type="hidden" value="<%= defaultLanguageId %>" />
+	<aui:input name="languageId" type="hidden" value="<%= languageId %>" />
+	<aui:input name="workflowAction" type="hidden" value="<%= WorkflowConstants.ACTION_PUBLISH %>" />
+
+	<liferay-ui:error exception="<%= FileSizeException.class %>">
+		<liferay-ui:message arguments="<%= PrefsPropsUtil.getLong(PropsKeys.DL_FILE_MAX_SIZE) / 1024 %>" key="please-enter-a-file-with-a-valid-file-size-no-larger-than-x" />
+	</liferay-ui:error>
+
+	<liferay-ui:error exception="<%= StorageFieldRequiredException.class %>" message="please-fill-out-all-required-fields" />
+
+	<c:if test="<%= !translating %>">
+		<c:if test="<%= recordVersion != null %>">
+			<aui:model-context bean="<%= recordVersion %>" model="<%= DDLRecordVersion.class %>" />
+
+			<aui:workflow-status model="<%= DDLRecord.class %>" status="<%= recordVersion.getStatus() %>" version="<%= recordVersion.getVersion() %>" />
+		</c:if>
+
+		<liferay-util:include page="/html/portlet/dynamic_data_lists/record_toolbar.jsp" />
+	</c:if>
+
+	<aui:fieldset>
+		<c:if test="<%= !translating %>">
+			<aui:translation-manager
+				availableLocales="<%= availableLocales %>"
+				defaultLanguageId="<%= defaultLanguageId %>"
+				id="translationManager"
+				readOnly="<%= recordId <= 0 %>"
+			/>
+
+			<liferay-portlet:renderURL copyCurrentRenderParameters="<%= true %>" var="updateDefaultLanguageURL">
+				<portlet:param name="struts_action" value="/dynamic_data_lists/edit_record" />
+			</liferay-portlet:renderURL>
+
+			<liferay-portlet:renderURL copyCurrentRenderParameters="<%= true %>" var="translateRecordURL" windowState="pop_up">
+				<portlet:param name="struts_action" value="/dynamic_data_lists/edit_record" />
+			</liferay-portlet:renderURL>
+
+			<aui:script use="liferay-translation-manager">
+				var translationManager = Liferay.component('<portlet:namespace />translationManager');
+
+				translationManager.on(
+					'defaultLocaleChange',
+					function(event) {
+						if (!confirm('<%= UnicodeLanguageUtil.get(pageContext, "changing-the-default-language-will-delete-all-unsaved-content") %>')) {
+							event.preventDefault();
+						}
+					}
+				);
+
+				translationManager.after(
+					{
+						defaultLocaleChange: function(event) {
+							var url = '<%= updateDefaultLanguageURL %>' + '&<portlet:namespace />defaultLanguageId=' + event.newVal;
+
+							window.location.href = url;
+						},
+						deleteAvailableLocale: function(event) {
+							var locale = event.locale;
+
+							Liferay.Service(
+								'/ddlrecord/delete-record-locale',
+								{
+									locale: locale,
+									recordId: <%= recordId %>,
+									serviceContext: JSON.stringify(
+										{
+											scopeGroupId: themeDisplay.getScopeGroupId(),
+											userId: themeDisplay.getUserId()
+										}
+									)
+								}
+							);
+						},
+						editingLocaleChange: function(event) {
+							var editingLocale = event.newVal;
+
+							var defaultLocale = translationManager.get('defaultLocale');
+
+							if (editingLocale !== defaultLocale) {
+								Liferay.Util.openWindow(
+									{
+										cache: false,
+										id: event.newVal,
+										title: '<%= UnicodeLanguageUtil.get(pageContext, "web-content-translation") %>',
+										uri: '<%= translateRecordURL %>' + '&<portlet:namespace />languageId=' + editingLocale
+									},
+									function(translationWindow) {
+										translationWindow.once(
+											'visibleChange',
+											function(event) {
+												if (!event.newVal) {
+													translationManager.set('editingLocale', defaultLocale);
+												}
+											}
+										);
+									}
+								);
+							}
+						}
+					}
+				);
+			</aui:script>
+		</c:if>
+
+		<%
+		long classNameId = PortalUtil.getClassNameId(DDMStructure.class);
+
+		long classPK = recordSet.getDDMStructureId();
+
+		if (formDDMTemplateId > 0) {
+			classNameId = PortalUtil.getClassNameId(DDMTemplate.class);
+
+			classPK = formDDMTemplateId;
+		}
+		%>
+
+		<liferay-ddm:html
+			classNameId="<%= classNameId %>"
+			classPK="<%= classPK %>"
+			fields="<%= fields %>"
+			repeatable="<%= translating ? false : true %>"
+			requestedLocale="<%= LocaleUtil.fromLanguageId(languageId) %>"
+		/>
+
+		<%
+		boolean pending = false;
+
+		if (recordVersion != null) {
+			pending = recordVersion.isPending();
+		}
+		%>
+
+		<c:if test="<%= pending %>">
+			<div class="alert alert-info">
+				<liferay-ui:message key="there-is-a-publication-workflow-in-process" />
+			</div>
+		</c:if>
+
+		<aui:button-row>
+			<c:choose>
+				<c:when test="<%= translating %>">
+					<aui:button name="saveTranslationButton" onClick='<%= renderResponse.getNamespace() + "setWorkflowAction(false);" %>' type="submit" value="add-translation" />
+
+					<aui:button href="<%= redirect %>" name="cancelButton" type="cancel" />
+				</c:when>
+				<c:otherwise>
+
+					<%
+					String saveButtonLabel = "save";
+
+					if ((recordVersion == null) || recordVersion.isDraft() || recordVersion.isApproved()) {
+						saveButtonLabel = "save-as-draft";
+					}
+
+					String publishButtonLabel = "publish";
+
+					if (WorkflowDefinitionLinkLocalServiceUtil.hasWorkflowDefinitionLink(themeDisplay.getCompanyId(), scopeGroupId, DDLRecordSet.class.getName(), recordSetId)) {
+						publishButtonLabel = "submit-for-publication";
+					}
+					%>
+
+					<aui:button name="saveButton" onClick='<%= renderResponse.getNamespace() + "setWorkflowAction(true);" %>' primary="<%= false %>" type="submit" value="<%= saveButtonLabel %>" />
+
+					<aui:button disabled="<%= pending %>" name="publishButton" onClick='<%= renderResponse.getNamespace() + "setWorkflowAction(false);" %>' type="submit" value="<%= publishButtonLabel %>" />
+
+					<aui:button href="<%= redirect %>" name="cancelButton" type="cancel" />
+				</c:otherwise>
+			</c:choose>
+		</aui:button-row>
+	</aui:fieldset>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />setWorkflowAction(draft) {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (record == null) ? Constants.ADD : Constants.UPDATE %>";
+
+		if (draft) {
+			document.<portlet:namespace />fm.<portlet:namespace />workflowAction.value = <%= WorkflowConstants.ACTION_SAVE_DRAFT %>;
+		}
+		else {
+			document.<portlet:namespace />fm.<portlet:namespace />workflowAction.value = <%= WorkflowConstants.ACTION_PUBLISH %>;
+		}
+	}
+</aui:script>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/dynamic_data_lists/view_record_set");
+portletURL.setParameter("recordSetId", String.valueOf(recordSetId));
+
+PortalUtil.addPortletBreadcrumbEntry(request, recordSet.getName(locale), portletURL.toString());
+
+if (record != null) {
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.format(pageContext, "edit-x", ddmStructure.getName(locale)), currentURL);
+}
+else {
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.format(pageContext, "add-x", ddmStructure.getName(locale)), currentURL);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/edit_record_set.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/edit_record_set.jsp
new file mode 100644
index 0000000..01490c2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/edit_record_set.jsp
@@ -0,0 +1,197 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_lists/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+String portletResource = ParamUtil.getString(request, "portletResource");
+
+DDLRecordSet recordSet = (DDLRecordSet)request.getAttribute(WebKeys.DYNAMIC_DATA_LISTS_RECORD_SET);
+
+long recordSetId = BeanParamUtil.getLong(recordSet, request, "recordSetId");
+
+long groupId = BeanParamUtil.getLong(recordSet, request, "groupId", scopeGroupId);
+
+long ddmStructureId = ParamUtil.getLong(request, "ddmStructureId");
+
+if (recordSet != null) {
+	ddmStructureId = recordSet.getDDMStructureId();
+}
+
+String ddmStructureName = StringPool.BLANK;
+
+if (ddmStructureId > 0) {
+	try {
+		DDMStructure ddmStructure = DDMStructureLocalServiceUtil.getStructure(ddmStructureId);
+
+		ddmStructureName = HtmlUtil.escape(ddmStructure.getName(locale));
+	}
+	catch (NoSuchStructureException nsse) {
+	}
+}
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	localizeTitle="<%= (recordSet == null) %>"
+	title='<%= (recordSet == null) ? "new-list" : recordSet.getName(locale) %>'
+/>
+
+<portlet:actionURL var="editRecordSetURL">
+	<portlet:param name="struts_action" value="/dynamic_data_lists/edit_record_set" />
+</portlet:actionURL>
+
+<aui:form action="<%= editRecordSetURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveRecordSet();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="portletResource" type="hidden" value="<%= portletResource %>" />
+	<aui:input name="groupId" type="hidden" value="<%= groupId %>" />
+	<aui:input name="recordSetId" type="hidden" value="<%= recordSetId %>" />
+	<aui:input name="ddmStructureId" type="hidden" value="<%= ddmStructureId %>" />
+	<aui:input name="scope" type="hidden" value="<%= DDLRecordSetConstants.SCOPE_DYNAMIC_DATA_LISTS %>" />
+
+	<liferay-ui:error exception="<%= RecordSetDDMStructureIdException.class %>" message="please-enter-a-valid-definition" />
+	<liferay-ui:error exception="<%= RecordSetNameException.class %>" message="please-enter-a-valid-name" />
+
+	<liferay-ui:asset-categories-error />
+
+	<liferay-ui:asset-tags-error />
+
+	<aui:model-context bean="<%= recordSet %>" model="<%= DDLRecordSet.class %>" />
+
+	<aui:fieldset>
+		<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" name="name" />
+
+		<aui:input name="description" />
+
+		<aui:field-wrapper label="data-definition" required="<%= true %>">
+			<liferay-ui:input-resource id="ddmStructureNameDisplay" url="<%= ddmStructureName %>" />
+
+			<liferay-ui:icon
+				iconCssClass="icon-search"
+				label="<%= true %>"
+				linkCssClass="btn"
+				message="select"
+				url='<%= "javascript:" + renderResponse.getNamespace() + "openDDMStructureSelector();" %>'
+			/>
+		</aui:field-wrapper>
+
+		<c:if test="<%= WorkflowEngineManagerUtil.isDeployed() && (WorkflowHandlerRegistryUtil.getWorkflowHandler(DDLRecord.class.getName()) != null) %>">
+			<aui:select label="workflow" name="workflowDefinition">
+
+				<%
+				WorkflowDefinitionLink workflowDefinitionLink = null;
+
+				try {
+					workflowDefinitionLink = WorkflowDefinitionLinkLocalServiceUtil.getWorkflowDefinitionLink(company.getCompanyId(), themeDisplay.getScopeGroupId(), DDLRecordSet.class.getName(), recordSetId, 0, true);
+				}
+				catch (NoSuchWorkflowDefinitionLinkException nswdle) {
+				}
+				%>
+
+				<aui:option><%= LanguageUtil.get(pageContext, "no-workflow") %></aui:option>
+
+				<%
+				List<WorkflowDefinition> workflowDefinitions = WorkflowDefinitionManagerUtil.getActiveWorkflowDefinitions(company.getCompanyId(), 0, 100, null);
+
+				for (WorkflowDefinition workflowDefinition : workflowDefinitions) {
+					boolean selected = false;
+
+					if ((workflowDefinitionLink != null) && workflowDefinitionLink.getWorkflowDefinitionName().equals(workflowDefinition.getName()) && (workflowDefinitionLink.getWorkflowDefinitionVersion() == workflowDefinition.getVersion())) {
+						selected = true;
+					}
+				%>
+
+					<aui:option label='<%= workflowDefinition.getName() + " (" + LanguageUtil.format(locale, "version-x", workflowDefinition.getVersion()) + ")" %>' selected="<%= selected %>" value="<%= workflowDefinition.getName() + StringPool.AT + workflowDefinition.getVersion() %>" />
+
+				<%
+				}
+				%>
+
+			</aui:select>
+		</c:if>
+
+		<c:if test="<%= recordSet == null %>">
+			<aui:field-wrapper label="permissions">
+				<liferay-ui:input-permissions
+					modelName="<%= DDLRecordSet.class.getName() %>"
+				/>
+			</aui:field-wrapper>
+		</c:if>
+
+		<aui:button-row>
+			<aui:button name="saveButton" type="submit" value="save" />
+
+			<aui:button href="<%= redirect %>" name="cancelButton" type="cancel" />
+		</aui:button-row>
+	</aui:fieldset>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />openDDMStructureSelector() {
+		Liferay.Util.openDDMPortlet(
+			{
+				basePortletURL: '<%= PortletURLFactoryUtil.create(request, PortletKeys.DYNAMIC_DATA_MAPPING, themeDisplay.getPlid(), PortletRequest.RENDER_PHASE) %>',
+				classPK: <%= ddmStructureId %>,
+				dialog: {
+					destroyOnHide: true
+				},
+				eventName: '<portlet:namespace />selectDDMStructure',
+				groupId: <%= groupId %>,
+
+				<%
+				Portlet portlet = PortletLocalServiceUtil.getPortletById(portletDisplay.getId());
+				%>
+
+				refererPortletName: '<%= portlet.getPortletName() %>',
+				refererWebDAVToken: '<%= portlet.getWebDAVStorageToken() %>',
+				showGlobalScope: true,
+				struts_action: '/dynamic_data_mapping/select_structure',
+				title: '<%= UnicodeLanguageUtil.get(pageContext, "data-definitions") %>'
+			},
+			function(event) {
+				var A = AUI();
+
+				A.one('#<portlet:namespace />ddmStructureId').val(event.ddmstructureid);
+
+				A.one('#<portlet:namespace />ddmStructureNameDisplay').val(event.name);
+			}
+		);
+	}
+
+	function <portlet:namespace />saveRecordSet() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (recordSet == null) ? Constants.ADD : Constants.UPDATE %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
+
+<%
+if (recordSet != null) {
+	PortletURL portletURL = renderResponse.createRenderURL();
+
+	portletURL.setParameter("struts_action", "/dynamic_data_lists/edit_record_set");
+	portletURL.setParameter("recordSetId", String.valueOf(recordSet.getRecordSetId()));
+
+	PortalUtil.addPortletBreadcrumbEntry(request, recordSet.getName(locale), portletURL.toString());
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit"), currentURL);
+}
+else {
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "add-list"), currentURL);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/error.jsp
new file mode 100644
index 0000000..6492d3e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/error.jsp
@@ -0,0 +1,25 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_lists/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= NoSuchRecordSetException.class %>" message="the-recordSet-could-not-be-found" />
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/init.jsp
new file mode 100644
index 0000000..764c328
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/init.jsp
@@ -0,0 +1,42 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.NoSuchWorkflowDefinitionLinkException" %><%@
+page import="com.liferay.portlet.dynamicdatalists.NoSuchRecordSetException" %><%@
+page import="com.liferay.portlet.dynamicdatalists.RecordSetDDMStructureIdException" %><%@
+page import="com.liferay.portlet.dynamicdatalists.RecordSetNameException" %><%@
+page import="com.liferay.portlet.dynamicdatalists.model.DDLRecord" %><%@
+page import="com.liferay.portlet.dynamicdatalists.model.DDLRecordConstants" %><%@
+page import="com.liferay.portlet.dynamicdatalists.model.DDLRecordSet" %><%@
+page import="com.liferay.portlet.dynamicdatalists.model.DDLRecordSetConstants" %><%@
+page import="com.liferay.portlet.dynamicdatalists.model.DDLRecordVersion" %><%@
+page import="com.liferay.portlet.dynamicdatalists.search.RecordSetDisplayTerms" %><%@
+page import="com.liferay.portlet.dynamicdatalists.search.RecordSetSearch" %><%@
+page import="com.liferay.portlet.dynamicdatalists.search.RecordSetSearchTerms" %><%@
+page import="com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalServiceUtil" %><%@
+page import="com.liferay.portlet.dynamicdatalists.service.DDLRecordSetServiceUtil" %><%@
+page import="com.liferay.portlet.dynamicdatalists.service.permission.DDLPermission" %><%@
+page import="com.liferay.portlet.dynamicdatalists.service.permission.DDLRecordSetPermission" %><%@
+page import="com.liferay.portlet.dynamicdatalists.util.DDLUtil" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.StorageFieldRequiredException" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.storage.FieldConstants" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.storage.Fields" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.storage.StorageEngineUtil" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.util.DDMXSDUtil" %>
+
+<%@ include file="/html/portlet/dynamic_data_lists/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/js/main.js b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/js/main.js
new file mode 100644
index 0000000..87fb2a8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/js/main.js
@@ -0,0 +1,755 @@
+AUI.add(
+	'liferay-portlet-dynamic-data-lists',
+	function(A) {
+		var AArray = A.Array;
+
+		var DateMath = A.DataType.DateMath;
+
+		var Lang = A.Lang;
+
+		var JSON = A.JSON;
+
+		var EMPTY_FN = A.Lang.emptyFn;
+
+		var STR_EMPTY = '';
+
+		var DLFileEntryCellEditor = A.Component.create(
+			{
+				NAME: 'document-library-file-entry-cell-editor',
+
+				EXTENDS: A.BaseCellEditor,
+
+				prototype: {
+					ELEMENT_TEMPLATE: '<input type="hidden" />',
+
+					initializer: function() {
+						var instance = this;
+
+						window[Liferay.Util.getPortletNamespace('166') + 'selectDocumentLibrary'] = A.bind('_selectFileEntry', instance);
+					},
+
+					getElementsValue: function() {
+						var instance = this;
+
+						return instance.get('value');
+					},
+
+					_defInitToolbarFn: function() {
+						var instance = this;
+
+						DLFileEntryCellEditor.superclass._defInitToolbarFn.apply(instance, arguments);
+
+						instance.toolbar.add(
+							{
+								on: {
+									click: A.bind('_onClickChoose', instance)
+								},
+								label: Liferay.Language.get('choose')
+							},
+							1
+						);
+					},
+
+					_onClickChoose: function() {
+						var instance = this;
+
+						var portletURL = Liferay.PortletURL.createURL(themeDisplay.getURLControlPanel());
+
+						portletURL.setParameter('groupId', themeDisplay.getScopeGroupId());
+						portletURL.setParameter('struts_action', '/dynamic_data_mapping/select_document_library');
+
+						portletURL.setPortletId('166');
+
+						portletURL.setWindowState('pop_up');
+
+						Liferay.Util.openWindow(
+							{
+								id: 'selectDocumentLibrary',
+								title: Liferay.Language.get('javax.portlet.title.20'),
+								uri: portletURL.toString()
+							}
+						);
+					},
+
+					_selectFileEntry: function(url, uuid, groupId, title, version) {
+						var instance = this;
+
+						instance.selectedTitle = title;
+						instance.selectedURL = url;
+
+						instance.set(
+							'value',
+							JSON.stringify(
+								{
+									groupId: groupId,
+									title: title,
+									uuid: uuid,
+									version: version
+								}
+							)
+						);
+					},
+
+					_syncFileLabel: function(title, url) {
+						var instance = this;
+
+						var contentBox = instance.get('contentBox');
+
+						var linkNode = contentBox.one('a');
+
+						if (!linkNode) {
+							linkNode = A.Node.create('<a></a>');
+
+							contentBox.prepend(linkNode);
+						}
+
+						linkNode.setAttribute('href', url);
+						linkNode.setContent(title);
+					},
+
+					_uiSetValue: function(val) {
+						var instance = this;
+
+						if (val) {
+							var selectedTitle = instance.selectedTitle;
+							var selectedURL = instance.selectedURL;
+
+							if (selectedTitle && selectedURL) {
+								instance._syncFileLabel(selectedTitle, selectedURL);
+							}
+							else {
+								SpreadSheet.Util.getFileEntry(
+									val,
+									function(fileEntry) {
+										var url = SpreadSheet.Util.getFileEntryURL(fileEntry);
+
+										instance._syncFileLabel(fileEntry.title, url);
+									}
+								);
+							}
+						}
+						else {
+							instance._syncFileLabel(STR_EMPTY, STR_EMPTY);
+
+							val = STR_EMPTY;
+						}
+
+						instance.elements.val(val);
+					}
+				}
+			}
+		);
+
+		var SpreadSheet = A.Component.create(
+			{
+				ATTRS: {
+					portletNamespace: {
+						validator: Lang.isString,
+						value: STR_EMPTY
+					},
+
+					recordsetId: {
+						validator: Lang.isNumber,
+						value: 0
+					},
+
+					structure: {
+						validator: Lang.isArray,
+						value: []
+					}
+				},
+
+				CSS_PREFIX: 'table',
+
+				DATATYPE_VALIDATOR: {
+					'date': 'date',
+					'double': 'number',
+					'integer': 'digits',
+					'long': 'digits'
+				},
+
+				EXTENDS: A.DataTable,
+
+				NAME: A.DataTable.Base.NAME,
+
+				TYPE_EDITOR: {
+					'checkbox': A.CheckboxCellEditor,
+					'ddm-date': A.DateCellEditor,
+					'ddm-decimal': A.TextCellEditor,
+					'ddm-integer': A.TextCellEditor,
+					'ddm-number': A.TextCellEditor,
+					'radio': A.RadioCellEditor,
+					'select': A.DropDownCellEditor,
+					'text': A.TextCellEditor,
+					'textarea': A.TextAreaCellEditor
+				},
+
+				prototype: {
+					initializer: function() {
+						var instance = this;
+
+						instance._setDataStableSort(instance.get('data'));
+
+						instance.on('dataChange', instance._onDataChange);
+						instance.on('model:change', instance._onRecordUpdate);
+					},
+
+					addEmptyRows: function(num) {
+						var instance = this;
+
+						var columns = instance.get('columns');
+						var data = instance.get('data');
+
+						var keys = AArray.map(
+							columns,
+							function(item, index, collection) {
+								return item.key;
+							}
+						);
+
+						data.add(SpreadSheet.buildEmptyRecords(num, keys));
+					},
+
+					updateMinDisplayRows: function(minDisplayRows, callback) {
+						var instance = this;
+
+						callback = (callback && A.bind(callback, instance)) || EMPTY_FN;
+
+						var recordsetId = instance.get('recordsetId');
+
+						Liferay.Service(
+							'/ddlrecordset/update-min-display-rows',
+							{
+								recordSetId: recordsetId,
+								minDisplayRows: minDisplayRows,
+								serviceContext: JSON.stringify(
+									{
+										scopeGroupId: themeDisplay.getScopeGroupId(),
+										userId: themeDisplay.getUserId()
+									}
+								)
+							},
+							callback
+						);
+					},
+
+					_normalizeRecordData: function(record) {
+						var instance = this;
+
+						var structure = instance.get('structure');
+
+						var normalized = {};
+
+						A.each(
+							structure,
+							function(item, index, collection) {
+								var type = item.type;
+								var value = record.get(item.name);
+
+								if ((type === 'radio') || (type === 'select')) {
+									if (!Lang.isArray(value)) {
+										value = AArray(value);
+									}
+
+									value = JSON.stringify(value);
+								}
+
+								normalized[item.name] = instance._normalizeValue(value);
+							}
+						);
+
+						delete normalized.displayIndex;
+						delete normalized.recordId;
+
+						return normalized;
+					},
+
+					_normalizeValue: function(value) {
+						var instance = this;
+
+						return String(value);
+					},
+
+					_onDataChange: function(event) {
+						var instance = this;
+
+						instance._setDataStableSort(event.newVal);
+					},
+
+					_onEditCell: function(event) {
+						var instance = this;
+
+						SpreadSheet.superclass._onEditCell.apply(instance, arguments);
+
+						var activeCell = instance.get('activeCell');
+
+						var alignNode = event.alignNode || activeCell;
+
+						var column = instance.getColumn(alignNode);
+						var record = instance.getRecord(alignNode);
+
+						var data = instance.get('data');
+						var recordsetId = instance.get('recordsetId');
+						var structure = instance.get('structure');
+
+						var editor = instance.getEditor(record, column);
+
+						if (editor) {
+							editor.setAttrs(
+								{
+									data: data,
+									record: record,
+									recordsetId: recordsetId,
+									structure: structure,
+									zIndex: Liferay.zIndex.OVERLAY
+								}
+							);
+						}
+					},
+
+					_onRecordUpdate: function(event) {
+						var instance = this;
+
+						if (!A.Object.owns(event.changed, 'recordId')) {
+							var data = instance.get('data');
+							var recordsetId = instance.get('recordsetId');
+
+							var record = event.target;
+
+							var recordId = record.get('recordId');
+
+							var fieldsMap = instance._normalizeRecordData(record);
+
+							var recordIndex = data.indexOf(record);
+
+							if (recordId > 0) {
+								SpreadSheet.updateRecord(recordId, recordIndex, fieldsMap, true);
+							}
+							else {
+								SpreadSheet.addRecord(
+									recordsetId,
+									recordIndex,
+									fieldsMap,
+									function(json) {
+										if (json.recordId > 0) {
+											record.set(
+												'recordId',
+												json.recordId,
+												{
+													silent: true
+												}
+											);
+										}
+									}
+								);
+							}
+						}
+					},
+
+					_setDataStableSort: function(data) {
+						var instance = this;
+
+						data.sort = function(options) {
+							if (this.comparator) {
+								options = options || {};
+
+								var models = this._items.concat();
+
+								A.ArraySort.stableSort(models, A.bind(this._sort, this));
+
+								var facade = A.merge(
+									options,
+									{
+										models: models,
+										src: 'sort'
+									}
+								);
+
+								if (options.silent) {
+									this._defResetFn(facade);
+								}
+								else {
+									this.fire('reset', facade);
+								}
+							}
+
+							return this;
+						};
+					}
+				},
+
+				addRecord: function(recordsetId, displayIndex, fieldsMap, callback) {
+					var instance = this;
+
+					callback = (callback && A.bind(callback, instance)) || EMPTY_FN;
+
+					Liferay.Service(
+						'/ddlrecord/add-record',
+						{
+							groupId: themeDisplay.getScopeGroupId(),
+							recordSetId: recordsetId,
+							displayIndex: displayIndex,
+							fieldsMap: JSON.stringify(fieldsMap),
+							serviceContext: JSON.stringify(
+								{
+									scopeGroupId: themeDisplay.getScopeGroupId(),
+									userId: themeDisplay.getUserId(),
+									workflowAction: Liferay.Workflow.ACTION_PUBLISH
+								}
+							)
+						},
+						callback
+					);
+				},
+
+				buildDataTableColumns: function(columns, structure, editable) {
+					var instance = this;
+
+					AArray.each(
+						columns,
+						function(item, index, collection) {
+							var dataType = item.dataType;
+							var name = item.name;
+							var type = item.type;
+
+							item.key = name;
+
+							var EditorClass = instance.TYPE_EDITOR[type] || A.TextCellEditor;
+
+							var config = {
+								elementName: name,
+								validator: {
+									rules: {}
+								}
+							};
+
+							var required = item.required;
+
+							var structureField;
+
+							if (required) {
+								item.label += ' (' + Liferay.Language.get('required') + ')';
+							}
+
+							if (type === 'checkbox') {
+								config.options = {
+									'true': Liferay.Language.get('true')
+								};
+
+								config.inputFormatter = function(value) {
+									return String(value.length > 0);
+								};
+
+								item.formatter = function(obj) {
+									var data = obj.data;
+
+									var value = data[name];
+
+									if (value === 'true') {
+										value = Liferay.Language.get('true');
+									}
+									else if (value === 'false') {
+										value = Liferay.Language.get('false');
+									}
+
+									return value;
+								};
+							}
+							else if (type === 'ddm-date') {
+								config.inputFormatter = function(val) {
+									return AArray.map(
+										val,
+										function(item, index, collection) {
+											return item.getTime();
+										}
+									);
+								};
+
+								config.outputFormatter = function(val) {
+									return AArray.map(
+										val,
+										function(item, index, collection) {
+											var date = new Date(Lang.toInt(item));
+
+											date = DateMath.add(date, DateMath.MINUTES, date.getTimezoneOffset());
+
+											return date;
+										}
+									);
+								};
+
+								item.formatter = function(obj) {
+									var data = obj.data;
+
+									var value = data[name];
+
+									if (value !== STR_EMPTY) {
+										var date = new Date(Lang.toInt(value));
+
+										date = DateMath.add(date, DateMath.MINUTES, date.getTimezoneOffset());
+
+										value = A.DataType.Date.format(date);
+									}
+
+									return value;
+								};
+							}
+							else if ((type === 'ddm-decimal') || (type === 'ddm-integer') || (type === 'ddm-number')) {
+								config.outputFormatter = function(value) {
+									var number = A.DataType.Number.parse(value);
+
+									var numberValue = STR_EMPTY;
+
+									if (Lang.isNumber(number)) {
+										numberValue = number;
+									}
+
+									return numberValue;
+								};
+
+								item.formatter = function(obj) {
+									var data = obj.data;
+
+									var value = A.DataType.Number.parse(data[name]);
+
+									if (!Lang.isNumber(value)) {
+										value = STR_EMPTY;
+									}
+
+									return value;
+								};
+							}
+							else if (type === 'ddm-documentlibrary') {
+								item.formatter = function(obj) {
+									var data = obj.data;
+
+									var label = STR_EMPTY;
+									var value = data[name];
+
+									if (value !== STR_EMPTY) {
+										var fileData = SpreadSheet.Util.parseJSON(value);
+
+										if (fileData.title) {
+											label = fileData.title;
+										}
+									}
+
+									return label;
+								};
+							}
+							else if ((type === 'radio') || (type === 'select')) {
+								structureField = instance.findStructureFieldByAttribute(structure, 'name', name);
+
+								var multiple = A.DataType.Boolean.parse(structureField.multiple);
+								var options = instance.getCellEditorOptions(structureField.options);
+
+								item.formatter = function(obj) {
+									var data = obj.data;
+
+									var label = [];
+									var value = data[name];
+
+									AArray.each(
+										value,
+										function(item1, index1, collection1) {
+											label.push(options[item1]);
+										}
+									);
+
+									return label.join(', ');
+								};
+
+								config.inputFormatter = AArray;
+								config.multiple = multiple;
+								config.options = options;
+							}
+
+							var validatorRuleName = instance.DATATYPE_VALIDATOR[dataType];
+
+							var validatorRules = config.validator.rules;
+
+							validatorRules[name] = A.mix(
+								{
+									required: required
+								},
+								validatorRules[name]
+							);
+
+							if (validatorRuleName) {
+								validatorRules[name][validatorRuleName] = true;
+							}
+
+							if (editable && item.editable) {
+								item.editor = new EditorClass(config);
+							}
+						}
+					);
+
+					return columns;
+				},
+
+				buildEmptyRecords: function(num, keys) {
+					var instance = this;
+
+					var emptyRows = [];
+
+					for (var i = 0; i < num; i++) {
+						emptyRows.push(instance.getRecordModel(keys));
+					}
+
+					return emptyRows;
+				},
+
+				findStructureFieldByAttribute: function(structure, attributeName, attributeValue) {
+					var found = null;
+
+					AArray.some(
+						structure,
+						function(item, index, collection) {
+							found = item;
+
+							return (found[attributeName] === attributeValue);
+						}
+					);
+
+					return found;
+				},
+
+				getCellEditorOptions: function(options) {
+					var normalized = {};
+
+					AArray.each(
+						options,
+						function(item, index, collection) {
+							normalized[item.value] = item.label;
+						}
+					);
+
+					return normalized;
+				},
+
+				getRecordModel: function(keys) {
+					var instance = this;
+
+					var recordModel = {};
+
+					AArray.each(
+						keys,
+						function(item, index, collection) {
+							recordModel[item] = STR_EMPTY;
+						}
+					);
+
+					return recordModel;
+				},
+
+				updateRecord: function(recordId, displayIndex, fieldsMap, merge, callback) {
+					var instance = this;
+
+					callback = (callback && A.bind(callback, instance)) || EMPTY_FN;
+
+					Liferay.Service(
+						'/ddlrecord/update-record',
+						{
+							recordId: recordId,
+							displayIndex: displayIndex,
+							fieldsMap: JSON.stringify(fieldsMap),
+							mergeFields: merge,
+							serviceContext: JSON.stringify(
+								{
+									scopeGroupId: themeDisplay.getScopeGroupId(),
+									userId: themeDisplay.getUserId(),
+									workflowAction: Liferay.Workflow.ACTION_PUBLISH
+								}
+							)
+						},
+						callback
+					);
+				}
+			}
+		);
+
+		SpreadSheet.Util = {
+			getFileEntry: function(fileJSON, callback) {
+				var instance = this;
+
+				fileJSON = instance.parseJSON(fileJSON);
+
+				Liferay.Service(
+					'/dlapp/get-file-entry-by-uuid-and-group-id',
+					{
+						uuid: fileJSON.uuid,
+						groupId: fileJSON.groupId
+					},
+					callback
+				);
+			},
+
+			getFileEntryURL: function(fileEntry) {
+				var instance = this;
+
+				var buffer = [
+					themeDisplay.getPathContext(),
+					'documents',
+					fileEntry.groupId,
+					fileEntry.folderId,
+					encodeURIComponent(fileEntry.title)
+				];
+
+				return buffer.join('/');
+			},
+
+			parseJSON: function(value) {
+				var instance = this;
+
+				var data = {};
+
+				try {
+					data = JSON.parse(value);
+				}
+				catch (e) {
+				}
+
+				return data;
+			}
+		};
+
+		SpreadSheet.TYPE_EDITOR['ddm-documentlibrary'] = DLFileEntryCellEditor;
+
+		Liferay.SpreadSheet = SpreadSheet;
+
+		var DDLUtil = {
+			previewDialog: null,
+
+			openPreviewDialog: function(content) {
+				var instance = this;
+
+				var previewDialog = instance.previewDialog;
+
+				if (!previewDialog) {
+					previewDialog = Liferay.Util.Window.getWindow(
+						{
+							dialog: {
+								bodyContent: content
+							},
+							title: Liferay.Language.get('preview')
+						}
+					);
+
+					instance.previewDialog = previewDialog;
+				}
+				else {
+					previewDialog.show();
+
+					previewDialog.set('bodyContent', content);
+				}
+			}
+		};
+
+		Liferay.DDLUtil = DDLUtil;
+	},
+	'',
+	{
+		requires: ['aui-arraysort', 'aui-datatable', 'datatable-sort', 'json', 'liferay-portlet-url', 'liferay-util-window']
+	}
+);
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_action.jsp
new file mode 100644
index 0000000..cc3da52
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_action.jsp
@@ -0,0 +1,80 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_lists/init.jsp" %>
+
+<%
+SearchContainer searchContainer = (SearchContainer)request.getAttribute("liferay-ui:search:searchContainer");
+
+String redirect = searchContainer.getIteratorURL().toString();
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+DDLRecord record = (DDLRecord)row.getObject();
+
+long formDDMTemplateId = GetterUtil.getLong((String)row.getParameter("formDDMTemplateId"));
+
+boolean editable = GetterUtil.getBoolean((String)row.getParameter("editable"));
+
+DDLRecordVersion recordVersion = record.getRecordVersion();
+
+if (editable) {
+	recordVersion = record.getLatestRecordVersion();
+}
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= DDLRecordSetPermission.contains(permissionChecker, record.getRecordSet(), ActionKeys.VIEW) %>">
+		<portlet:renderURL var="viewRecordURL" windowState="<%= WindowState.MAXIMIZED.toString() %>">
+			<portlet:param name="struts_action" value="/dynamic_data_lists/view_record" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="recordId" value="<%= String.valueOf(record.getRecordId()) %>" />
+			<portlet:param name="version" value="<%= recordVersion.getVersion() %>" />
+			<portlet:param name="formDDMTemplateId" value="<%= String.valueOf(formDDMTemplateId) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="view"
+			url="<%= viewRecordURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= DDLRecordSetPermission.contains(permissionChecker, record.getRecordSet(), ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editRecordURL" windowState="<%= WindowState.MAXIMIZED.toString() %>">
+			<portlet:param name="struts_action" value="/dynamic_data_lists/edit_record" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UPDATE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="recordId" value="<%= String.valueOf(record.getRecordId()) %>" />
+			<portlet:param name="formDDMTemplateId" value="<%= String.valueOf(formDDMTemplateId) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editRecordURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= DDLRecordSetPermission.contains(permissionChecker, record.getRecordSet(), ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteRecordURL">
+			<portlet:param name="struts_action" value="/dynamic_data_mapping_list/edit_record" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="recordId" value="<%= String.valueOf(record.getRecordId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete url="<%= deleteRecordURL %>" />
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_row_value.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_row_value.jspf
new file mode 100644
index 0000000..2c8dd2e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_row_value.jspf
@@ -0,0 +1,42 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+String dataType = fields.get(FieldConstants.DATA_TYPE);
+String name = fields.get(FieldConstants.NAME);
+
+String value = null;
+
+if (fieldsModel.contains(name)) {
+	com.liferay.portlet.dynamicdatamapping.storage.Field field = fieldsModel.get(name);
+
+	value = HtmlUtil.escape(field.getRenderedValue(themeDisplay.getLocale()));
+
+	if (dataType.equals(FieldConstants.HTML)) {
+		value = "<a href=\"javascript:Liferay.DDLUtil.openPreviewDialog('" + value + "');\">(" + LanguageUtil.get(pageContext, "preview") + ")</a>";
+	}
+}
+else {
+	value = StringPool.BLANK;
+}
+
+if (editable) {
+	row.addText(value, rowURL);
+}
+else {
+	row.addText(value);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_search.jsp
new file mode 100644
index 0000000..4e2bc69
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_search.jsp
@@ -0,0 +1,34 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_lists/init.jsp" %>
+
+<%
+SearchContainer searchContainer = (SearchContainer)request.getAttribute("liferay-ui:search:searchContainer");
+
+DisplayTerms displayTerms = searchContainer.getDisplayTerms();
+%>
+
+<liferay-ui:search-toggle
+	autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>"
+	buttonLabel="search"
+	displayTerms="<%= displayTerms %>"
+	id="toggle_id_dynamic_data_lists_record_search"
+>
+	<aui:fieldset>
+		<aui:input name="<%= displayTerms.KEYWORDS %>" size="30" value="<%= displayTerms.getKeywords() %>" />
+	</aui:fieldset>
+</liferay-ui:search-toggle>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_search_results.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_search_results.jspf
new file mode 100644
index 0000000..27ecd8e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_search_results.jspf
@@ -0,0 +1,52 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+DisplayTerms displayTerms = searchContainer.getDisplayTerms();
+
+int status = WorkflowConstants.STATUS_APPROVED;
+
+if (DDLRecordSetPermission.contains(permissionChecker, recordSet, ActionKeys.ADD_RECORD)) {
+	status = WorkflowConstants.STATUS_ANY;
+}
+
+if (Validator.isNull(displayTerms.getKeywords())) {
+	total = DDLRecordLocalServiceUtil.getRecordsCount(recordSet.getRecordSetId(), status);
+
+	searchContainer.setTotal(total);
+
+	results = DDLRecordLocalServiceUtil.getRecords(recordSet.getRecordSetId(), status, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+}
+else {
+	SearchContext searchContext = SearchContextFactory.getInstance(request);
+
+	searchContext.setAttribute("recordSetId", recordSet.getRecordSetId());
+	searchContext.setAttribute(Field.STATUS, status);
+	searchContext.setEnd(searchContainer.getEnd());
+	searchContext.setKeywords(displayTerms.getKeywords());
+	searchContext.setStart(searchContainer.getStart());
+
+	Hits hits = DDLRecordLocalServiceUtil.search(searchContext);
+
+	results = DDLUtil.getRecords(hits);
+
+	total = results.size();
+
+	searchContainer.setTotal(total);
+}
+
+searchContainer.setResults(results);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_set_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_set_action.jsp
new file mode 100644
index 0000000..a231d36
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_set_action.jsp
@@ -0,0 +1,126 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_lists/init.jsp" %>
+
+<%
+SearchContainer searchContainer = (SearchContainer)request.getAttribute("liferay-ui:search:searchContainer");
+
+String redirect = searchContainer.getIteratorURL().toString();
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+DDLRecordSet recordSet = (DDLRecordSet)row.getObject();
+
+DDLRecordSet selRecordSet = (DDLRecordSet)request.getAttribute("record_set_action.jsp-selRecordSet");
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= portletName.equals(PortletKeys.DYNAMIC_DATA_LISTS) && DDLRecordSetPermission.contains(permissionChecker, recordSet, ActionKeys.VIEW) %>">
+		<portlet:renderURL var="viewRecordSetURL">
+			<portlet:param name="struts_action" value="/dynamic_data_lists/view_record_set" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.VIEW %>" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="recordSetId" value="<%= String.valueOf(recordSet.getRecordSetId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="view"
+			url="<%= viewRecordSetURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= portletName.equals(PortletKeys.DYNAMIC_DATA_LISTS) && DDLRecordSetPermission.contains(permissionChecker, recordSet, ActionKeys.VIEW) %>">
+		<portlet:renderURL var="viewRecordSetURL">
+			<portlet:param name="struts_action" value="/dynamic_data_lists/view_record_set" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.VIEW %>" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="recordSetId" value="<%= String.valueOf(recordSet.getRecordSetId()) %>" />
+			<portlet:param name="spreadsheet" value="true" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="view_tasks"
+			message="spreadsheet-view"
+			url="<%= viewRecordSetURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= DDLRecordSetPermission.contains(permissionChecker, recordSet, ActionKeys.UPDATE) %>">
+		<liferay-portlet:renderURL portletName="<%= PortletKeys.DYNAMIC_DATA_LISTS %>" var="editRecordSetURL">
+			<portlet:param name="struts_action" value="/dynamic_data_lists/edit_record_set" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UPDATE %>" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="recordSetId" value="<%= String.valueOf(recordSet.getRecordSetId()) %>" />
+		</liferay-portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editRecordSetURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= portletName.equals(PortletKeys.DYNAMIC_DATA_LISTS) && DDLRecordSetPermission.contains(permissionChecker, recordSet, ActionKeys.VIEW) %>">
+		<portlet:resourceURL var="exportRecordSetURL">
+			<portlet:param name="struts_action" value="/dynamic_data_lists/export" />
+			<portlet:param name="recordSetId" value="<%= String.valueOf(recordSet.getRecordSetId()) %>" />
+		</portlet:resourceURL>
+
+		<%
+		StringBundler sb = new StringBundler(6);
+
+		sb.append("javascript:");
+		sb.append(renderResponse.getNamespace());
+		sb.append("exportRecordSet");
+		sb.append("('");
+		sb.append(exportRecordSetURL);
+		sb.append("');");
+		%>
+
+		<liferay-ui:icon
+			image="export"
+			url="<%= sb.toString() %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= DDLRecordSetPermission.contains(permissionChecker, recordSet, ActionKeys.PERMISSIONS) %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= DDLRecordSet.class.getName() %>"
+			modelResourceDescription="<%= recordSet.getName(locale) %>"
+			resourcePrimKey="<%= String.valueOf(recordSet.getRecordSetId()) %>"
+			var="permissionsRecordSetURL"
+			windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			method="get"
+			url="<%= permissionsRecordSetURL %>"
+			useDialog="<%= true %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= ((selRecordSet == null) || (selRecordSet.getRecordSetId() != recordSet.getRecordSetId())) && DDLRecordSetPermission.contains(permissionChecker, recordSet, ActionKeys.DELETE) %>">
+		<liferay-portlet:actionURL portletName="<%= PortletKeys.DYNAMIC_DATA_LISTS %>" var="deleteRecordSetURL">
+			<portlet:param name="struts_action" value="/dynamic_data_lists/edit_record_set" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="recordSetId" value="<%= String.valueOf(recordSet.getRecordSetId()) %>" />
+		</liferay-portlet:actionURL>
+
+		<liferay-ui:icon-delete url="<%= deleteRecordSetURL %>" />
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_set_search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_set_search.jsp
new file mode 100644
index 0000000..d4657ac
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_set_search.jsp
@@ -0,0 +1,35 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_lists/init.jsp" %>
+
+<%
+RecordSetDisplayTerms displayTerms = new RecordSetDisplayTerms(renderRequest);
+%>
+
+<liferay-ui:search-toggle
+	autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>"
+	buttonLabel="search"
+	displayTerms="<%= displayTerms %>"
+	id="toggle_id_dynamic_data_lists_record_set_search"
+>
+
+	<aui:fieldset>
+		<aui:input name="<%= displayTerms.NAME %>" size="20" type="text" value="<%= displayTerms.getName() %>" />
+
+		<aui:input name="<%= displayTerms.DESCRIPTION %>" size="20" type="text" value="<%= displayTerms.getDescription() %>" />
+	</aui:fieldset>
+</liferay-ui:search-toggle>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_set_search_results.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_set_search_results.jspf
new file mode 100644
index 0000000..10a9a63
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_set_search_results.jspf
@@ -0,0 +1,34 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+if (searchTerms.isAdvancedSearch()) {
+	total = DDLRecordSetServiceUtil.searchCount(company.getCompanyId(), scopeGroupId, searchTerms.getName(), searchTerms.getDescription(), DDLRecordSetConstants.SCOPE_DYNAMIC_DATA_LISTS, searchTerms.isAndOperator());
+
+	searchContainer.setTotal(total);
+
+	results = DDLRecordSetServiceUtil.search(company.getCompanyId(), scopeGroupId, searchTerms.getName(), searchTerms.getDescription(), DDLRecordSetConstants.SCOPE_DYNAMIC_DATA_LISTS, searchTerms.isAndOperator(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+}
+else {
+	total = DDLRecordSetServiceUtil.searchCount(company.getCompanyId(), scopeGroupId, searchTerms.getKeywords(), DDLRecordSetConstants.SCOPE_DYNAMIC_DATA_LISTS);
+
+	searchContainer.setTotal(total);
+
+	results = DDLRecordSetServiceUtil.search(company.getCompanyId(), scopeGroupId, searchTerms.getKeywords(), DDLRecordSetConstants.SCOPE_DYNAMIC_DATA_LISTS, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+}
+
+searchContainer.setResults(results);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_toolbar.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_toolbar.jsp
new file mode 100644
index 0000000..ec6de21
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_toolbar.jsp
@@ -0,0 +1,61 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_lists/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+DDLRecord record = (DDLRecord)request.getAttribute(WebKeys.DYNAMIC_DATA_LISTS_RECORD);
+
+long formDDMTemplateId = ParamUtil.getLong(request, "formDDMTemplateId");
+%>
+
+<div class="record-toolbar" id="<portlet:namespace />recordToolbar"></div>
+
+<aui:script use="aui-toolbar,aui-dialog-iframe-deprecated,liferay-util-window">
+	var permissionPopUp = null;
+
+	var toolbarChildren = [
+		<c:if test="<%= record != null %>">
+			<portlet:renderURL var="viewHistoryURL">
+				<portlet:param name="struts_action" value="/dynamic_data_lists/view_record_history" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="recordId" value="<%= String.valueOf(record.getRecordId()) %>" />
+				<portlet:param name="formDDMTemplateId" value="<%= String.valueOf(formDDMTemplateId) %>" />
+			</portlet:renderURL>
+
+			{
+				icon: 'icon-time',
+				label: '<%= UnicodeLanguageUtil.get(pageContext, "view-history") %>',
+				on: {
+					click: function(event) {
+						event.domEvent.preventDefault();
+
+						window.location.href = '<%= viewHistoryURL %>';
+					}
+				}
+			}
+		</c:if>
+	];
+
+	new A.Toolbar(
+		{
+			boundingBox: '#<portlet:namespace />recordToolbar',
+			children: toolbarChildren
+		}
+	).render();
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_version_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_version_action.jsp
new file mode 100644
index 0000000..84f15c8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/record_version_action.jsp
@@ -0,0 +1,54 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_lists/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+DDLRecordVersion recordVersion = (DDLRecordVersion)row.getObject();
+
+long formDDMTemplateId = GetterUtil.getLong((String)row.getParameter("formDDMTemplateId"));
+%>
+
+<liferay-ui:icon-menu>
+	<liferay-portlet:renderURL portletName="<%= PortletKeys.DYNAMIC_DATA_LISTS %>" var="viewRecordVersionURL" windowState="<%= WindowState.MAXIMIZED.toString() %>">
+		<portlet:param name="struts_action" value="/dynamic_data_lists/view_record" />
+		<portlet:param name="redirect" value="<%= currentURL %>" />
+		<portlet:param name="recordId" value="<%= String.valueOf(recordVersion.getRecordId()) %>" />
+		<portlet:param name="version" value="<%= recordVersion.getVersion() %>" />
+		<portlet:param name="formDDMTemplateId" value="<%= String.valueOf(formDDMTemplateId) %>" />
+	</liferay-portlet:renderURL>
+
+	<liferay-ui:icon
+		image="view"
+		url="<%= viewRecordVersionURL %>"
+	/>
+
+	<portlet:actionURL var="revertURL">
+		<portlet:param name="struts_action" value="/dynamic_data_lists/edit_record" />
+		<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.REVERT %>" />
+		<portlet:param name="redirect" value="<%= currentURL %>" />
+		<portlet:param name="recordId" value="<%= String.valueOf(recordVersion.getRecordId()) %>" />
+		<portlet:param name="version" value="<%= String.valueOf(recordVersion.getVersion()) %>" />
+	</portlet:actionURL>
+
+	<liferay-ui:icon
+		image="undo"
+		message="revert"
+		url="<%= revertURL %>"
+	/>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/search_columns.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/search_columns.jspf
new file mode 100644
index 0000000..58ccb39
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/search_columns.jspf
@@ -0,0 +1,51 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="id"
+	orderable="<%= false %>"
+	property="recordSetId"
+/>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="name"
+	orderable="<%= false %>"
+	value="<%= recordSet.getName(locale) %>"
+/>
+
+<liferay-ui:search-container-column-text
+	buffer="buffer"
+	href="<%= rowURL %>"
+	name="description"
+	orderable="<%= false %>"
+>
+
+	<%
+	String description = recordSet.getDescription(locale);
+
+	buffer.append(StringUtil.shorten(description, 100));
+	%>
+
+</liferay-ui:search-container-column-text>
+
+<liferay-ui:search-container-column-date
+	href="<%= rowURL %>"
+	name="modified-date"
+	orderable="<%= false %>"
+	value="<%= recordSet.getModifiedDate() %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/toolbar.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/toolbar.jsp
new file mode 100644
index 0000000..f746d05
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/toolbar.jsp
@@ -0,0 +1,65 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_lists/init.jsp" %>
+
+<%
+String toolbarItem = ParamUtil.getString(request, "toolbarItem");
+%>
+
+<aui:nav-bar>
+	<aui:nav>
+		<portlet:renderURL var="viewRecordsURL">
+			<portlet:param name="struts_action" value="/dynamic_data_lists/view" />
+		</portlet:renderURL>
+
+		<c:if test="<%= DDLPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_RECORD_SET) %>">
+			<portlet:renderURL var="addRecordSetURL">
+				<portlet:param name="struts_action" value="/dynamic_data_lists/edit_record_set" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+			</portlet:renderURL>
+
+			<aui:nav-item href="<%= addRecordSetURL %>" iconCssClass="icon-plus" label="add" selected='<%= toolbarItem.equals("add") %>' />
+
+			<aui:nav-item anchorId="manageDDMStructuresLink" iconCssClass="icon-cog" label="manage-data-definitions" selected='<%= toolbarItem.equals("manage-data-definitions") %>' />
+		</c:if>
+	</aui:nav>
+
+	<aui:nav-bar-search cssClass="pull-right" file="/html/portlet/dynamic_data_lists/record_set_search.jsp" />
+</aui:nav-bar>
+
+<c:if test="<%= DDLPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_RECORD_SET) %>">
+	<aui:script use="aui-base">
+			A.one('#<portlet:namespace />manageDDMStructuresLink').on('click', function() {
+				Liferay.Util.openDDMPortlet(
+					{
+						basePortletURL: '<%= PortletURLFactoryUtil.create(request, PortletKeys.DYNAMIC_DATA_MAPPING, themeDisplay.getPlid(), PortletRequest.RENDER_PHASE) %>',
+						dialog: {
+							destroyOnHide: true
+						},
+
+						<%
+						Portlet portlet = PortletLocalServiceUtil.getPortletById(portletDisplay.getId());
+						%>
+
+						refererPortletName: '<%= portlet.getPortletName() %>',
+						refererWebDAVToken: '<%= portlet.getWebDAVStorageToken() %>',
+						title: '<%= UnicodeLanguageUtil.get(pageContext, "data-definitions") %>'
+					}
+				);
+			});
+	</aui:script>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/view.jsp
new file mode 100644
index 0000000..2893400
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/view.jsp
@@ -0,0 +1,131 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_lists/init.jsp" %>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/dynamic_data_lists/view");
+%>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= portletURL.toString() %>" />
+
+	<liferay-ui:search-container
+		searchContainer="<%= new RecordSetSearch(renderRequest, portletURL) %>"
+	>
+
+		<%
+		RecordSetDisplayTerms displayTerms = (RecordSetDisplayTerms)searchContainer.getDisplayTerms();
+		RecordSetSearchTerms searchTerms = (RecordSetSearchTerms)searchContainer.getSearchTerms();
+		%>
+
+		<liferay-util:include page="/html/portlet/dynamic_data_lists/toolbar.jsp" />
+
+		<liferay-ui:search-container-results>
+			<%@ include file="/html/portlet/dynamic_data_lists/record_set_search_results.jspf" %>
+		</liferay-ui:search-container-results>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portlet.dynamicdatalists.model.DDLRecordSet"
+			escapedModel="<%= true %>"
+			keyProperty="recordSetId"
+			modelVar="recordSet"
+		>
+			<liferay-portlet:renderURL varImpl="rowURL">
+				<portlet:param name="struts_action" value="/dynamic_data_lists/view_record_set" />
+				<portlet:param name="redirect" value="<%= searchContainer.getIteratorURL().toString() %>" />
+				<portlet:param name="recordSetId" value="<%= String.valueOf(recordSet.getRecordSetId()) %>" />
+			</liferay-portlet:renderURL>
+
+			<%
+			if (!DDLRecordSetPermission.contains(permissionChecker, recordSet, ActionKeys.VIEW)) {
+				rowURL = null;
+			}
+			%>
+
+			<%@ include file="/html/portlet/dynamic_data_lists/search_columns.jspf" %>
+
+			<liferay-ui:search-container-column-jsp
+				align="right"
+				path="/html/portlet/dynamic_data_lists/record_set_action.jsp"
+			/>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<div class="hide" id="<portlet:namespace />export-list">
+	<aui:select label="file-extension" name="fileExtension">
+		<aui:option value="csv">CSV</aui:option>
+		<aui:option value="xml">XML</aui:option>
+	</aui:select>
+</div>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />exportRecordSet',
+		function(url) {
+			var A = AUI();
+
+			var form = A.Node.create('<form />');
+
+			form.setAttribute('method', 'POST');
+
+			var content = A.one('#<portlet:namespace />export-list');
+
+			if (content) {
+				form.append(content);
+				content.show();
+			}
+
+			var dialog = Liferay.Util.Window.getWindow(
+				{
+					dialog: {
+						bodyContent: form,
+						toolbars: {
+							footer: [
+								{
+									label: '<%= UnicodeLanguageUtil.get(pageContext, "ok") %>',
+									on: {
+										click: function() {
+											submitForm(form, url, false);
+										}
+									}
+								},
+								{
+									label: '<%= UnicodeLanguageUtil.get(pageContext, "cancel") %>',
+									on: {
+										click: function() {
+											dialog.hide();
+										}
+									}
+								}
+							]
+						}
+					},
+					title: '<%= UnicodeLanguageUtil.get(pageContext, "export") %>'
+				}
+			);
+
+		},
+		['liferay-util-window']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/view_record.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/view_record.jsp
new file mode 100644
index 0000000..821cc25
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/view_record.jsp
@@ -0,0 +1,103 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_lists/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+DDLRecord record = (DDLRecord)request.getAttribute(WebKeys.DYNAMIC_DATA_LISTS_RECORD);
+
+long recordId = BeanParamUtil.getLong(record, request, "recordId");
+
+long recordSetId = BeanParamUtil.getLong(record, request, "recordSetId");
+
+DDLRecordSet recordSet = DDLRecordSetServiceUtil.getRecordSet(recordSetId);
+
+long formDDMTemplateId = ParamUtil.getLong(request, "formDDMTemplateId");
+
+DDMStructure ddmStructure = recordSet.getDDMStructure(formDDMTemplateId);
+
+String version = ParamUtil.getString(request, "version", DDLRecordConstants.VERSION_DEFAULT);
+
+DDLRecordVersion recordVersion = record.getRecordVersion(version);
+
+DDLRecordVersion latestRecordVersion = record.getLatestRecordVersion();
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	title='<%= LanguageUtil.format(pageContext, "view-x", ddmStructure.getName(locale)) %>'
+/>
+
+<c:if test="<%= recordVersion != null %>">
+	<aui:model-context bean="<%= recordVersion %>" model="<%= DDLRecordVersion.class %>" />
+
+	<aui:workflow-status model="<%= DDLRecord.class %>" status="<%= recordVersion.getStatus() %>" version="<%= recordVersion.getVersion() %>" />
+</c:if>
+
+<aui:fieldset>
+
+	<%
+	Fields fields = null;
+
+	if (recordVersion != null) {
+		fields = StorageEngineUtil.getFields(recordVersion.getDDMStorageId());
+	}
+	%>
+
+	<liferay-ddm:html
+		classNameId="<%= PortalUtil.getClassNameId(DDMStructure.class) %>"
+		classPK="<%= ddmStructure.getPrimaryKey() %>"
+		fields="<%= fields %>"
+		readOnly="<%= true %>"
+		requestedLocale="<%= locale %>"
+	/>
+
+	<%
+	boolean pending = false;
+
+	if (recordVersion != null) {
+		pending = recordVersion.isPending();
+	}
+	%>
+
+	<aui:button-row>
+		<c:if test="<%= DDLRecordSetPermission.contains(permissionChecker, record.getRecordSet(), ActionKeys.UPDATE) && version.equals(latestRecordVersion.getVersion()) %>">
+			<portlet:renderURL var="editRecordURL" windowState="<%= WindowState.MAXIMIZED.toString() %>">
+				<portlet:param name="struts_action" value="/dynamic_data_lists/edit_record" />
+				<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UPDATE %>" />
+				<portlet:param name="redirect" value="<%= redirect %>" />
+				<portlet:param name="recordId" value="<%= String.valueOf(record.getRecordId()) %>" />
+				<portlet:param name="formDDMTemplateId" value="<%= String.valueOf(formDDMTemplateId) %>" />
+			</portlet:renderURL>
+
+			<aui:button href="<%= editRecordURL %>" name="edit" value="edit" />
+		</c:if>
+
+		<aui:button href="<%= redirect %>" name="cancelButton" type="cancel" />
+	</aui:button-row>
+</aui:fieldset>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/dynamic_data_lists/view_record_set");
+portletURL.setParameter("recordSetId", String.valueOf(recordSetId));
+
+PortalUtil.addPortletBreadcrumbEntry(request, recordSet.getName(locale), portletURL.toString());
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.format(pageContext, "view-x", ddmStructure.getName(locale)), currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/view_record_history.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/view_record_history.jsp
new file mode 100644
index 0000000..c74f2f4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/view_record_history.jsp
@@ -0,0 +1,109 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_lists/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+DDLRecord record = (DDLRecord)request.getAttribute(WebKeys.DYNAMIC_DATA_LISTS_RECORD);
+
+DDLRecordSet recordSet = record.getRecordSet();
+
+DDMStructure ddmStructure = recordSet.getDDMStructure();
+
+long formDDMTemplateId = ParamUtil.getLong(request, "formDDMTemplateId");
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/dynamic_data_lists/view_record_history");
+portletURL.setParameter("redirect", redirect);
+portletURL.setParameter("recordId", String.valueOf(record.getRecordId()));
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	title='<%= LanguageUtil.format(pageContext, "x-history", ddmStructure.getName(locale)) %>'
+/>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="fm">
+
+	<%
+	SearchContainer searchContainer = new SearchContainer(renderRequest, portletURL, new ArrayList(), null);
+
+	List headerNames = searchContainer.getHeaderNames();
+
+	headerNames.add("id");
+	headerNames.add("version");
+	headerNames.add("status");
+	headerNames.add("author");
+	headerNames.add(StringPool.BLANK);
+
+	int total = DDLRecordLocalServiceUtil.getRecordVersionsCount(record.getRecordId());
+
+	searchContainer.setTotal(total);
+
+	List<DDLRecordVersion> results = DDLRecordLocalServiceUtil.getRecordVersions(record.getRecordId(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+
+	searchContainer.setResults(results);
+
+	List resultRows = searchContainer.getResultRows();
+
+	for (int i = 0; i < results.size(); i++) {
+		DDLRecordVersion recordVersion = results.get(i);
+
+		recordVersion = recordVersion.toEscapedModel();
+
+		ResultRow row = new ResultRow(recordVersion, recordVersion.getRecordVersionId(), i);
+
+		row.setParameter("formDDMTemplateId", String.valueOf(formDDMTemplateId));
+
+		PortletURL rowURL = renderResponse.createRenderURL();
+
+		rowURL.setParameter("struts_action", "/dynamic_data_lists/view_record");
+		rowURL.setParameter("redirect", currentURL);
+		rowURL.setParameter("recordId", String.valueOf(recordVersion.getRecordId()));
+		rowURL.setParameter("version", recordVersion.getVersion());
+		rowURL.setParameter("formDDMTemplateId", String.valueOf(formDDMTemplateId));
+
+		// Record version id
+
+		row.addText(String.valueOf(recordVersion.getRecordVersionId()), rowURL);
+
+		// Version
+
+		row.addText(recordVersion.getVersion(), rowURL);
+
+		// Status
+
+		row.addStatus(recordVersion.getStatus(), recordVersion.getStatusByUserId(), recordVersion.getStatusDate(), rowURL);
+
+		// Author
+
+		row.addText(PortalUtil.getUserName(recordVersion), rowURL);
+
+		// Action
+
+		row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/dynamic_data_lists/record_version_action.jsp");
+
+		// Add result row
+
+		resultRows.add(row);
+	}
+	%>
+
+	<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/view_record_set.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/view_record_set.jsp
new file mode 100644
index 0000000..42543ce
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/view_record_set.jsp
@@ -0,0 +1,58 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_lists/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+DDLRecordSet recordSet = (DDLRecordSet)request.getAttribute(WebKeys.DYNAMIC_DATA_LISTS_RECORD_SET);
+
+long displayDDMTemplateId = ParamUtil.getLong(request, "displayDDMTemplateId");
+
+boolean spreadsheet = ParamUtil.getBoolean(request, "spreadsheet");
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	localizeTitle="<%= false %>"
+	title="<%= recordSet.getName(locale) %>"
+/>
+
+<c:choose>
+	<c:when test="<%= displayDDMTemplateId > 0 %>">
+		<liferay-util:include page="/html/portlet/dynamic_data_lists/view_template_records.jsp" />
+	</c:when>
+	<c:otherwise>
+		<c:choose>
+			<c:when test="<%= spreadsheet %>">
+				<liferay-util:include page="/html/portlet/dynamic_data_lists/view_spreadsheet_records.jsp" />
+			</c:when>
+			<c:otherwise>
+				<liferay-util:include page="/html/portlet/dynamic_data_lists/view_records.jsp" />
+			</c:otherwise>
+		</c:choose>
+	</c:otherwise>
+</c:choose>
+
+<%
+if (portletName.equals(PortletKeys.DYNAMIC_DATA_LISTS)) {
+	PortalUtil.setPageSubtitle(recordSet.getName(locale), request);
+	PortalUtil.setPageDescription(recordSet.getDescription(locale), request);
+}
+
+PortalUtil.addPortletBreadcrumbEntry(request, recordSet.getName(locale), currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/view_records.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/view_records.jsp
new file mode 100644
index 0000000..88be012
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/view_records.jsp
@@ -0,0 +1,157 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_lists/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+DDLRecordSet recordSet = (DDLRecordSet)request.getAttribute(WebKeys.DYNAMIC_DATA_LISTS_RECORD_SET);
+
+long formDDMTemplateId = ParamUtil.getLong(request, "formDDMTemplateId");
+
+boolean editable = false;
+boolean showAddRecordButton = false;
+
+if (DDLUtil.isEditable(request, portletDisplay.getId(), themeDisplay.getScopeGroupId())) {
+	editable = DDLRecordSetPermission.contains(permissionChecker, recordSet.getRecordSetId(), ActionKeys.UPDATE);
+	showAddRecordButton = DDLRecordSetPermission.contains(permissionChecker, recordSet.getRecordSetId(), ActionKeys.ADD_RECORD);
+}
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/dynamic_data_lists/view_record_set");
+portletURL.setParameter("redirect", redirect);
+portletURL.setParameter("recordSetId", String.valueOf(recordSet.getRecordSetId()));
+%>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="fm">
+
+	<%
+	DDMStructure ddmStructure = recordSet.getDDMStructure(formDDMTemplateId);
+
+	String languageId = LanguageUtil.getLanguageId(request);
+
+	Map<String, Map<String, String>> fieldsMap = ddmStructure.getFieldsMap(languageId);
+
+	List<String> headerNames = new ArrayList<String>();
+
+	for (Map<String, String> fields : fieldsMap.values()) {
+		if (GetterUtil.getBoolean(fields.get(FieldConstants.PRIVATE))) {
+			continue;
+		}
+
+		String label = fields.get(FieldConstants.LABEL);
+
+		headerNames.add(label);
+	}
+
+	if (editable) {
+		headerNames.add("status");
+		headerNames.add("modified-date");
+		headerNames.add("author");
+		headerNames.add(StringPool.BLANK);
+	}
+	%>
+
+	<liferay-ui:search-container
+		searchContainer='<%= new SearchContainer(renderRequest, new DisplayTerms(request), null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, portletURL, headerNames, LanguageUtil.format(pageContext, "no-x-records-were-found", HtmlUtil.escape(ddmStructure.getName(locale)))) %>'
+	>
+
+		<aui:nav-bar>
+			<aui:nav>
+				<c:if test="<%= showAddRecordButton %>">
+					<portlet:renderURL var="addRecordURL">
+						<portlet:param name="struts_action" value="/dynamic_data_lists/edit_record" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+						<portlet:param name="recordSetId" value="<%= String.valueOf(recordSet.getRecordSetId()) %>" />
+						<portlet:param name="formDDMTemplateId" value="<%= String.valueOf(formDDMTemplateId) %>" />
+					</portlet:renderURL>
+
+					<aui:nav-item href="<%= addRecordURL %>" iconCssClass="icon-plus" label='<%= LanguageUtil.format(pageContext, "add-x", HtmlUtil.escape(ddmStructure.getName(locale))) %>' />
+				</c:if>
+			</aui:nav>
+
+			<aui:nav-bar-search cssClass="pull-right" file="/html/portlet/dynamic_data_lists/record_search.jsp" searchContainer="<%= searchContainer %>" />
+		</aui:nav-bar>
+
+		<liferay-ui:search-container-results>
+			<%@ include file="/html/portlet/dynamic_data_lists/record_search_results.jspf" %>
+		</liferay-ui:search-container-results>
+
+		<%
+		List resultRows = searchContainer.getResultRows();
+
+		for (int i = 0; i < results.size(); i++) {
+			DDLRecord record = (DDLRecord)results.get(i);
+
+			DDLRecordVersion recordVersion = record.getRecordVersion();
+
+			if (editable) {
+				recordVersion = record.getLatestRecordVersion();
+			}
+
+			Fields fieldsModel = StorageEngineUtil.getFields(recordVersion.getDDMStorageId());
+
+			ResultRow row = new ResultRow(record, record.getRecordId(), i);
+
+			row.setParameter("editable", String.valueOf(editable));
+			row.setParameter("formDDMTemplateId", String.valueOf(formDDMTemplateId));
+
+			PortletURL rowURL = renderResponse.createRenderURL();
+
+			rowURL.setParameter("struts_action", "/dynamic_data_lists/view_record");
+			rowURL.setParameter("redirect", currentURL);
+			rowURL.setParameter("recordId", String.valueOf(record.getRecordId()));
+			rowURL.setParameter("version", recordVersion.getVersion());
+			rowURL.setParameter("formDDMTemplateId", String.valueOf(formDDMTemplateId));
+
+			// Columns
+
+			for (Map<String, String> fields : fieldsMap.values()) {
+				if (GetterUtil.getBoolean(fields.get(FieldConstants.PRIVATE))) {
+					continue;
+				}
+			%>
+
+				<%@ include file="/html/portlet/dynamic_data_lists/record_row_value.jspf" %>
+
+			<%
+			}
+
+			if (editable) {
+				row.addStatus(recordVersion.getStatus(), recordVersion.getStatusByUserId(), recordVersion.getStatusDate(), rowURL);
+				row.addDate(record.getModifiedDate(), rowURL);
+				row.addText(HtmlUtil.escape(PortalUtil.getUserName(recordVersion)), rowURL);
+
+				// Action
+
+				row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/dynamic_data_lists/record_action.jsp");
+			}
+
+			// Add result row
+
+			resultRows.add(row);
+		}
+		%>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script>
+	AUI().use('liferay-portlet-dynamic-data-lists');
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/view_spreadsheet_records.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/view_spreadsheet_records.jsp
new file mode 100644
index 0000000..010bfae
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/view_spreadsheet_records.jsp
@@ -0,0 +1,185 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_lists/init.jsp" %>
+
+<%
+DDLRecordSet recordSet = (DDLRecordSet)request.getAttribute(WebKeys.DYNAMIC_DATA_LISTS_RECORD_SET);
+
+boolean editable = false;
+
+if (DDLRecordSetPermission.contains(permissionChecker, recordSet.getRecordSetId(), ActionKeys.ADD_RECORD) && DDLRecordSetPermission.contains(permissionChecker, recordSet.getRecordSetId(), ActionKeys.UPDATE)) {
+	editable = DDLUtil.isEditable(request, portletDisplay.getId(), themeDisplay.getScopeGroupId());
+}
+
+DDMStructure ddmStructure = recordSet.getDDMStructure();
+%>
+
+<div class="lfr-spreadsheet-container">
+	<div id="<portlet:namespace />spreadsheet">
+		<div class="table-striped yui3-widget yui3-datatable" id="<portlet:namespace />dataTable">
+			<div class="yui3-datatable-scrollable yui3-datatable-content" id="<portlet:namespace />dataTableContent"></div>
+		</div>
+	</div>
+
+	<c:if test="<%= editable %>">
+		<div class="lfr-spreadsheet-add-rows-buttons">
+			<aui:button inlineField="<%= true %>" name="addRecords" value="add" />
+
+			<aui:select inlineField="<%= true %>" label="more-rows-at-bottom" name="numberOfRecords">
+				<aui:option label="1" />
+				<aui:option label="5" />
+				<aui:option label="10" />
+				<aui:option label="20" />
+				<aui:option label="50" />
+			</aui:select>
+		</div>
+	</c:if>
+</div>
+
+<%@ include file="/html/portlet/dynamic_data_lists/custom_spreadsheet_editors.jspf" %>
+
+<aui:script use="liferay-portlet-dynamic-data-lists">
+	var structure = <%= DDMXSDUtil.getJSONArray(ddmStructure.getXsd()) %>;
+	var columns = Liferay.SpreadSheet.buildDataTableColumns(<%= DDLUtil.getRecordSetJSONArray(recordSet) %>, structure, <%= editable %>);
+
+	var ignoreEmptyRecordsNumericSort = function(recA, recB, desc, field) {
+		var a = recA.get(field);
+		var b = recB.get(field);
+
+		return A.ArraySort.compareIgnoreWhiteSpace(
+			a,
+			b,
+			desc,
+			function(a, b, desc) {
+				var num1 = parseFloat(a);
+				var num2 = parseFloat(b);
+
+				var result;
+
+				if (isNaN(num1) || isNaN(num2)) {
+					result = A.ArraySort.compare(a, b, desc);
+				}
+				else {
+					result = desc ? (num2 - num1) : (num1 - num2);
+				}
+
+				return result;
+			}
+		);
+	};
+
+	var ignoreEmptyRecordsStringSort = function(recA, recB, desc, field) {
+		var a = recA.get(field);
+		var b = recB.get(field);
+
+		return A.ArraySort.compareIgnoreWhiteSpace(a, b, desc);
+	};
+
+	var numericData = {
+		'double': 1,
+		integer: 1,
+		number: 1
+	};
+
+	var keys = A.Array.map(
+		columns,
+		function(item, index, collection) {
+			var key = item.key;
+
+			if (!item.sortFn) {
+				if (numericData[item.dataType]) {
+					item.sortFn = A.rbind(ignoreEmptyRecordsNumericSort, item, key);
+				}
+				else {
+					item.sortFn = A.rbind(ignoreEmptyRecordsStringSort, item, key);
+				}
+			}
+
+			return key;
+		}
+	);
+
+	<%
+	int status = WorkflowConstants.STATUS_APPROVED;
+
+	if (DDLRecordSetPermission.contains(permissionChecker, recordSet, ActionKeys.ADD_RECORD)) {
+		status = WorkflowConstants.STATUS_ANY;
+	}
+
+	List<DDLRecord> records = DDLRecordLocalServiceUtil.getRecords(recordSet.getRecordSetId(), status, 0, 1000, null);
+	%>
+
+	var records = <%= DDLUtil.getRecordsJSONArray(records, !editable) %>;
+
+	records.sort(
+		function(a, b) {
+			return (a.displayIndex - b.displayIndex);
+		}
+	);
+
+	var data = Liferay.SpreadSheet.buildEmptyRecords(<%= Math.max(recordSet.getMinDisplayRows(), records.size()) %>, keys);
+
+	A.Array.each(
+		records,
+		function(item, index, collection) {
+			data.splice(item.displayIndex, 0, item);
+		}
+	);
+
+	var spreadSheet = new Liferay.SpreadSheet(
+		{
+			boundingBox: '#<portlet:namespace />dataTable',
+			columns: columns,
+			contentBox: '#<portlet:namespace />dataTableContent',
+			data: data,
+			editEvent: 'dblclick',
+			plugins: [
+				{
+					fn: A.Plugin.DataTableHighlight,
+					cfg: {
+						highlightRange: false
+					}
+				}
+			],
+			recordsetId: <%= recordSet.getRecordSetId() %>,
+			structure: structure,
+			width: '100%'
+		}
+	);
+
+	spreadSheet.render('#<portlet:namespace />spreadsheet');
+
+	spreadSheet.get('boundingBox').unselectable();
+
+	<c:if test="<%= editable %>">
+		var numberOfRecordsNode = A.one('#<portlet:namespace />numberOfRecords');
+
+		A.one('#<portlet:namespace />addRecords').on(
+			'click',
+			function(event) {
+				var numberOfRecords = parseInt(numberOfRecordsNode.val(), 10) || 0;
+
+				spreadSheet.addEmptyRows(numberOfRecords);
+
+				spreadSheet.updateMinDisplayRows(spreadSheet.get('data').size());
+			}
+		);
+	</c:if>
+
+	window.<portlet:namespace />spreadSheet = spreadSheet;
+	window.<portlet:namespace />structure = structure;
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/view_template_records.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/view_template_records.jsp
new file mode 100644
index 0000000..10505bf
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_lists/view_template_records.jsp
@@ -0,0 +1,52 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_list_display/init.jsp" %>
+
+<%
+DDLRecordSet recordSet = (DDLRecordSet)request.getAttribute(WebKeys.DYNAMIC_DATA_LISTS_RECORD_SET);
+
+DDMStructure ddmStructure = recordSet.getDDMStructure();
+
+boolean showAddRecordButton = false;
+
+if (DDLUtil.isEditable(request, portletDisplay.getId(), themeDisplay.getScopeGroupId())) {
+	showAddRecordButton = DDLRecordSetPermission.contains(permissionChecker, recordSet.getRecordSetId(), ActionKeys.ADD_RECORD);
+}
+%>
+
+<portlet:actionURL var="editRecordSetURL">
+	<portlet:param name="struts_action" value="/dynamic_data_lists/edit_record_set" />
+</portlet:actionURL>
+
+<aui:form action="<%= editRecordSetURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveRecordSet();" %>'>
+	<c:if test="<%= showAddRecordButton %>">
+		<aui:nav-bar>
+			<aui:nav>
+				<portlet:renderURL var="addRecordURL">
+					<portlet:param name="struts_action" value="/dynamic_data_lists/edit_record" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="recordSetId" value="<%= String.valueOf(recordSet.getRecordSetId()) %>" />
+					<portlet:param name="formDDMTemplateId" value="<%= String.valueOf(formDDMTemplateId) %>" />
+				</portlet:renderURL>
+
+				<aui:nav-item href="<%= addRecordURL %>" iconCssClass="icon-plus" label='<%= LanguageUtil.format(pageContext, "add-x", HtmlUtil.escape(ddmStructure.getName(locale))) %>' />
+			</aui:nav>
+		</aui:nav-bar>
+	</c:if>
+
+	<%= DDLUtil.getTemplateContent(displayDDMTemplateId, recordSet, themeDisplay, renderRequest, renderResponse) %>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/copy_structure.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/copy_structure.jsp
new file mode 100644
index 0000000..a4a50fc
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/copy_structure.jsp
@@ -0,0 +1,66 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_mapping/init.jsp" %>
+
+<%
+String closeRedirect = ParamUtil.getString(request, "closeRedirect");
+
+DDMStructure structure = (DDMStructure)request.getAttribute(WebKeys.DYNAMIC_DATA_MAPPING_STRUCTURE);
+
+long classNameId = PortalUtil.getClassNameId(DDMStructure.class);
+long classPK = BeanParamUtil.getLong(structure, request, "structureId");
+
+boolean copyFormTemplates = ParamUtil.getBoolean(request, "copyFormTemplates");
+boolean copyDisplayTemplates = ParamUtil.getBoolean(request, "copyDisplayTemplates");
+%>
+
+<portlet:actionURL var="copyStructureURL">
+	<portlet:param name="struts_action" value="/dynamic_data_mapping/copy_structure" />
+</portlet:actionURL>
+
+<aui:form action="<%= copyStructureURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.COPY %>" />
+	<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+	<aui:input name="closeRedirect" type="hidden" value="<%= closeRedirect %>" />
+	<aui:input name="classNameId" type="hidden" value="<%= String.valueOf(classNameId) %>" />
+	<aui:input name="classPK" type="hidden" value="<%= String.valueOf(classPK) %>" />
+	<aui:input name="saveAndContinue" type="hidden" value="<%= true %>" />
+
+	<liferay-ui:error exception="<%= StructureNameException.class %>" message="please-enter-a-valid-name" />
+
+	<aui:model-context bean="<%= structure %>" model="<%= DDMStructure.class %>" />
+
+	<aui:fieldset>
+		<aui:input name="name" />
+
+		<aui:input name="description" />
+
+		<c:if test="<%= Validator.isNull(templateTypeValue) || templateTypeValue.equals(DDMTemplateConstants.TEMPLATE_TYPE_FORM) %>">
+			<aui:input checked="<%= copyFormTemplates %>" label='<%= Validator.isNull(templateTypeValue) ? "copy-form-templates" : "copy-templates" %>' name="copyFormTemplates" type="checkbox" />
+		</c:if>
+
+		<c:if test="<%= Validator.isNull(templateTypeValue) || templateTypeValue.equals(DDMTemplateConstants.TEMPLATE_TYPE_DISPLAY) %>">
+			<aui:input checked="<%= copyDisplayTemplates %>" label='<%= Validator.isNull(templateTypeValue) ? "copy-display-templates" : "copy-templates" %>' name="copyDisplayTemplates" type="checkbox" />
+		</c:if>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" value="copy" />
+
+		<aui:button onClick="Liferay.Util.getWindow().hide();" value="close" />
+	</aui:button-row>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/copy_template.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/copy_template.jsp
new file mode 100644
index 0000000..9a50e23
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/copy_template.jsp
@@ -0,0 +1,53 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_mapping/init.jsp" %>
+
+<%
+String closeRedirect = ParamUtil.getString(request, "closeRedirect");
+
+DDMTemplate template = (DDMTemplate)request.getAttribute(WebKeys.DYNAMIC_DATA_MAPPING_TEMPLATE);
+
+long templateId = BeanParamUtil.getLong(template, request, "templateId");
+%>
+
+<portlet:actionURL var="copyTemplateURL">
+	<portlet:param name="struts_action" value="/dynamic_data_mapping/copy_template" />
+</portlet:actionURL>
+
+<aui:form action="<%= copyTemplateURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.COPY %>" />
+	<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+	<aui:input name="closeRedirect" type="hidden" value="<%= closeRedirect %>" />
+	<aui:input name="templateId" type="hidden" value="<%= String.valueOf(templateId) %>" />
+	<aui:input name="saveAndContinue" type="hidden" value="<%= true %>" />
+
+	<liferay-ui:error exception="<%= TemplateNameException.class %>" message="please-enter-a-valid-name" />
+
+	<aui:model-context bean="<%= template %>" model="<%= DDMTemplate.class %>" />
+
+	<aui:fieldset>
+		<aui:input name="name" />
+
+		<aui:input name="description" />
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" value="copy" />
+
+		<aui:button onClick="Liferay.Util.getWindow().hide();" value="close" />
+	</aui:button-row>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/css/.sass-cache/main.css
new file mode 100644
index 0000000..fc6a1bc
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/css/.sass-cache/main.css
@@ -0,0 +1,90 @@
+.document-library-file-entry-cell-editor-hidden {
+  display: none; }
+
+.portlet-document-library .diagram-builder-drop-container, .portlet-dynamic-data-mapping .diagram-builder-drop-container {
+  overflow: auto; }
+.portlet-document-library .diagram-builder-field-icon, .portlet-dynamic-data-mapping .diagram-builder-field-icon {
+  font-size: 24px; }
+.portlet-document-library .field-labels-inline, .portlet-dynamic-data-mapping .field-labels-inline {
+  clear: both;
+  display: block; }
+  .portlet-document-library .field-labels-inline .field-label, .portlet-dynamic-data-mapping .field-labels-inline .field-label {
+    margin-top: 0; }
+.portlet-document-library .field .field-content, .portlet-dynamic-data-mapping .field .field-content {
+  clear: both; }
+.portlet-document-library .lfr-structure-entry-details-container, .portlet-dynamic-data-mapping .lfr-structure-entry-details-container {
+  margin-top: 10px; }
+.portlet-document-library .lfr-translation-manager, .portlet-dynamic-data-mapping .lfr-translation-manager {
+  margin-bottom: 15px; }
+.portlet-document-library .lfr-ddm-link-to-page a, .portlet-dynamic-data-mapping .lfr-ddm-link-to-page a {
+  clear: both;
+  display: block; }
+.portlet-document-library .lfr-ddm-small-image-preview, .portlet-dynamic-data-mapping .lfr-ddm-small-image-preview {
+  background-color: #FFF;
+  border: 1px solid #CCC;
+  padding: 4px;
+  max-width: 120px; }
+.portlet-document-library .lfr-ddm-small-image-preview div, .portlet-dynamic-data-mapping .lfr-ddm-small-image-preview div {
+  background: #CCC;
+  height: 80px;
+  width: 80px; }
+.portlet-document-library .lfr-ddm-small-image-content, .portlet-dynamic-data-mapping .lfr-ddm-small-image-content {
+  background-color: #F5F5F5;
+  padding: 5px; }
+  .portlet-document-library .lfr-ddm-small-image-content th, .portlet-dynamic-data-mapping .lfr-ddm-small-image-content th {
+    padding: 5px;
+    white-space: nowrap;
+    width: 1%; }
+.portlet-document-library .lfr-ddm-small-image-content img, .portlet-dynamic-data-mapping .lfr-ddm-small-image-content img {
+  margin-right: 1em; }
+.portlet-document-library .lfr-ddm-types-form-column .column-content-first, .portlet-dynamic-data-mapping .lfr-ddm-types-form-column .column-content-first {
+  margin-right: 10px; }
+.portlet-document-library .lfr-ddm-search-form .column, .portlet-dynamic-data-mapping .lfr-ddm-search-form .column {
+  margin-right: 10px; }
+.portlet-document-library .lfr-document-library-add-menu, .portlet-dynamic-data-mapping .lfr-document-library-add-menu {
+  margin-bottom: 10px; }
+.portlet-document-library .lfr-template-editor-container .lfr-template-palette-container, .portlet-dynamic-data-mapping .lfr-template-editor-container .lfr-template-palette-container {
+  width: 275px; }
+  .portlet-document-library .lfr-template-editor-container .lfr-template-palette-container .lfr-template-palette, .portlet-dynamic-data-mapping .lfr-template-editor-container .lfr-template-palette-container .lfr-template-palette {
+    height: 372px;
+    overflow: auto;
+    width: 100%; }
+    .portlet-document-library .lfr-template-editor-container .lfr-template-palette-container .lfr-template-palette .palette-item-header, .portlet-dynamic-data-mapping .lfr-template-editor-container .lfr-template-palette-container .lfr-template-palette .palette-item-header {
+      font-weight: bold; }
+      .portlet-document-library .lfr-template-editor-container .lfr-template-palette-container .lfr-template-palette .palette-item-header .palette-item-header-icon, .portlet-dynamic-data-mapping .lfr-template-editor-container .lfr-template-palette-container .lfr-template-palette .palette-item-header .palette-item-header-icon {
+        background: url() no-repeat 50%;
+        display: inline-block;
+        height: 10px;
+        width: 9px; }
+    .portlet-document-library .lfr-template-editor-container .lfr-template-palette-container .lfr-template-palette .toggler-header-collapsed .palette-item-header-icon, .portlet-dynamic-data-mapping .lfr-template-editor-container .lfr-template-palette-container .lfr-template-palette .toggler-header-collapsed .palette-item-header-icon {
+      background-image: url(@theme_image_path@/arrows/05_right.png); }
+    .portlet-document-library .lfr-template-editor-container .lfr-template-palette-container .lfr-template-palette .toggler-header-expanded .palette-item-header-icon, .portlet-dynamic-data-mapping .lfr-template-editor-container .lfr-template-palette-container .lfr-template-palette .toggler-header-expanded .palette-item-header-icon {
+      background-image: url(@theme_image_path@/arrows/05_down.png);
+      vertical-align: middle; }
+    .portlet-document-library .lfr-template-editor-container .lfr-template-palette-container .lfr-template-palette .palette-item-header, .portlet-dynamic-data-mapping .lfr-template-editor-container .lfr-template-palette-container .lfr-template-palette .palette-item-header {
+      cursor: pointer;
+      margin: 0.5em; }
+    .portlet-document-library .lfr-template-editor-container .lfr-template-palette-container .lfr-template-palette .palette-item-content .palette-item-container, .portlet-dynamic-data-mapping .lfr-template-editor-container .lfr-template-palette-container .lfr-template-palette .palette-item-content .palette-item-container {
+      cursor: pointer;
+      line-height: 1.8em;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap; }
+.portlet-document-library .lfr-template-editor-container .lfr-editor-container, .portlet-dynamic-data-mapping .lfr-template-editor-container .lfr-editor-container {
+  margin-left: 275px; }
+  .portlet-document-library .lfr-template-editor-container .lfr-editor-container .lfr-template-editor .lfr-rich-editor, .portlet-dynamic-data-mapping .lfr-template-editor-container .lfr-editor-container .lfr-template-editor .lfr-rich-editor {
+    padding-left: 0.2em; }
+.portlet-document-library .lfr-template-editor-container .lfr-editor-container-full, .portlet-dynamic-data-mapping .lfr-template-editor-container .lfr-editor-container-full {
+  margin-left: 0; }
+.portlet-document-library .lfr-wcm-image-icon, .portlet-dynamic-data-mapping .lfr-wcm-image-icon {
+  background-position: 50%;
+  padding: 0; }
+.portlet-document-library .form-builder-source-wrapper, .portlet-dynamic-data-mapping .form-builder-source-wrapper {
+  height: 600px;
+  position: relative; }
+  .portlet-document-library .form-builder-source-wrapper .form-builder-source, .portlet-dynamic-data-mapping .form-builder-source-wrapper .form-builder-source {
+    position: relative; }
+
+.ie6 .lfr-editor-container, .ie7 .lfr-editor-container {
+  zoom: 1; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/css/main.css
new file mode 100644
index 0000000..19f1eb8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/css/main.css
@@ -0,0 +1,160 @@
+@import "compass";
+
+.document-library-file-entry-cell-editor-hidden {
+	display: none;
+}
+
+.portlet-document-library, .portlet-dynamic-data-mapping {
+	.diagram-builder-drop-container {
+		overflow: auto;
+	}
+
+	.diagram-builder-field-icon {
+		font-size: 24px;
+	}
+
+	.field-labels-inline {
+		clear: both;
+		display: block;
+
+		.field-label {
+			margin-top: 0;
+		}
+	}
+
+	.field {
+		.field-content {
+			clear: both;
+		}
+	}
+
+	.lfr-structure-entry-details-container {
+		margin-top: 10px;
+	}
+
+	.lfr-translation-manager {
+		margin-bottom: 15px;
+	}
+
+	.lfr-ddm-link-to-page a {
+		clear: both;
+		display: block;
+	}
+
+	.lfr-ddm-small-image-preview {
+		background-color: #FFF;
+		border: 1px solid #CCC;
+		padding: 4px;
+		max-width: 120px;
+	}
+
+	.lfr-ddm-small-image-preview div {
+		background: #CCC;
+		height: 80px;
+		width: 80px;
+	}
+
+	.lfr-ddm-small-image-content {
+		background-color: #F5F5F5;
+		padding: 5px;
+
+		th {
+			padding: 5px;
+			white-space: nowrap;
+			width: 1%;
+		}
+	}
+
+	.lfr-ddm-small-image-content img {
+		margin-right: 1em;
+	}
+
+	.lfr-ddm-types-form-column .column-content-first {
+		margin-right: 10px;
+	}
+
+	.lfr-ddm-search-form .column {
+		margin-right: 10px;
+	}
+
+	.lfr-document-library-add-menu {
+		margin-bottom: 10px;
+	}
+
+	.lfr-template-editor-container {
+		.lfr-template-palette-container {
+			width: 275px;
+
+			.lfr-template-palette {
+				height: 372px;
+				overflow: auto;
+				width: 100%;
+
+				.palette-item-header {
+					font-weight: bold;
+
+					.palette-item-header-icon {
+						background: url() no-repeat 50%;
+						display: inline-block;
+						height: 10px;
+						width: 9px;
+					}
+				}
+
+				.toggler-header-collapsed .palette-item-header-icon {
+					background-image: url(@theme_image_path@/arrows/05_right.png);
+				}
+
+				.toggler-header-expanded .palette-item-header-icon {
+					background-image: url(@theme_image_path@/arrows/05_down.png);
+					vertical-align: middle;
+				}
+
+				.palette-item-header {
+					cursor: pointer;
+					margin: 0.5em;
+				}
+
+				.palette-item-content .palette-item-container {
+					cursor: pointer;
+					line-height: 1.8em;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					white-space: nowrap;
+				}
+			}
+		}
+
+		.lfr-editor-container {
+			margin-left: 275px;
+
+			.lfr-template-editor .lfr-rich-editor {
+				padding-left: 0.2em;
+			}
+		}
+
+		.lfr-editor-container-full {
+			margin-left: 0;
+		}
+	}
+
+	.lfr-wcm-image-icon {
+		background-position: 50%;
+		padding: 0;
+	}
+
+	.form-builder-source-wrapper {
+		height: 600px;
+		position: relative;
+
+		.form-builder-source {
+			position: relative;
+		}
+	}
+}
+
+.ie6, .ie7 {
+	.lfr-editor-container {
+		zoom: 1;
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/custom_fields.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/custom_fields.jspf
new file mode 100644
index 0000000..3bd45bd
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/custom_fields.jspf
@@ -0,0 +1,574 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+Calendar localeCal = CalendarFactoryUtil.getCalendar(timeZone, locale);
+
+int firstDayOfWeek = localeCal.getFirstDayOfWeek() - 1;
+%>
+
+<aui:script>
+	AUI.add(
+		'liferay-portlet-dynamic-data-mapping-custom-fields',
+		function(A) {
+			var FormBuilderTextField = A.FormBuilderTextField;
+			var FormBuilderTypes = A.FormBuilder.types;
+
+			var booleanParse = A.DataType.Boolean.parse;
+			var camelize = Liferay.Util.camelize;
+			var trim = A.Lang.trim;
+
+			var STR_BLANK = '';
+
+			var TPL_BUTTON = '<div class="field-labels-inline">' +
+								'<input type="button" value="<%= UnicodeLanguageUtil.get(pageContext, "select") %>" />' +
+							'<div>';
+
+			var TPL_LINK_TO_PAGE = '<div class="lfr-ddm-link-to-page">' +
+									'<a href="javascript:;"><%= UnicodeLanguageUtil.get(pageContext, "link") %></a>' +
+								'</div>';
+
+			var TPL_PARAGRAPH = '<p></p>';
+
+			var TPL_SEPARATOR = '<div class="separator"></div>';
+
+			var TPL_TEXT_HTML = '<textarea class="form-builder-field-node lfr-ddm-text-html"></textarea>';
+
+			var TPL_WCM_IMAGE = '<div class="lfr-wcm-image"></div>';
+
+			var applyStyles = function(node, styleContent) {
+				var styles = styleContent.replace(/\n/g, STR_BLANK).split(';');
+
+				node.setStyle(STR_BLANK);
+
+				A.Array.each(
+					styles,
+					function(item, index, collection) {
+						var rule = item.split(':');
+
+						if (rule.length == 2) {
+							var key = camelize(rule[0]);
+							var value = trim(rule[1]);
+
+							node.setStyle(key, value);
+						}
+					}
+				);
+			};
+
+			var LiferayFormBuilderField = function() {
+			};
+
+			LiferayFormBuilderField.ATTRS = {
+				autoGeneratedName: {
+					setter: booleanParse,
+					value: true
+				},
+
+				indexType: {
+					value: 'keyword'
+				},
+
+				name: {
+					setter: Liferay.FormBuilder.normalizeKey,
+					valueFn: function() {
+						var instance = this;
+
+						return A.FormBuilderField.buildFieldName(instance.get('label'));
+					}
+				},
+
+				repeatable: {
+					setter: booleanParse,
+					value: false
+				}
+			};
+
+			A.Base.mix(A.FormBuilderField, [LiferayFormBuilderField]);
+
+			var FormBuilderProto = A.FormBuilderField.prototype;
+
+			var originalGetPropertyModel = FormBuilderProto.getPropertyModel;
+
+			FormBuilderProto.getPropertyModel = function() {
+				var instance = this;
+
+				var model = originalGetPropertyModel.call(instance);
+
+				var type = instance.get('type');
+
+				var indexTypeOptions = {
+					'': '<liferay-ui:message key="no" />',
+					'keyword': '<liferay-ui:message key="yes" />'
+				};
+
+				if ((type == 'ddm-text-html') || (type == 'text') || (type == 'textarea')) {
+					indexTypeOptions = {
+						'': '<liferay-ui:message key="not-indexable" />',
+						'keyword': '<liferay-ui:message key="indexable-keyword" />',
+						'text': '<liferay-ui:message key="indexable-text" />'
+					};
+				}
+
+				var repeatableOptions = {
+					'false': '<liferay-ui:message key="no" />',
+					'true': '<liferay-ui:message key="yes" />'
+				};
+
+				return model.concat(
+					[
+						{
+							attributeName: 'indexType',
+							editor: new A.RadioCellEditor(
+								{
+									options: indexTypeOptions
+								}
+							),
+							formatter: function(val) {
+								return indexTypeOptions[val.data.value];
+							},
+							name: '<liferay-ui:message key="indexable" />'
+						},
+						{
+							attributeName: 'repeatable',
+							editor: new A.RadioCellEditor(
+								{
+									options: repeatableOptions
+								}
+							),
+							formatter: function(val) {
+								return repeatableOptions[val.data.value];
+							},
+							name: '<liferay-ui:message key="repeatable" />'
+						}
+					]
+				);
+			};
+
+			var DDMDateField = A.Component.create(
+				{
+					ATTRS: {
+						dataType: {
+							value: 'date'
+						},
+
+						fieldNamespace: {
+							value: 'ddm'
+						}
+					},
+
+					EXTENDS: A.FormBuilderTextField,
+
+					NAME: 'ddm-date',
+
+					prototype: {
+						getPropertyModel: function() {
+							var instance = this;
+
+							var model = DDMDateField.superclass.getPropertyModel.apply(instance, arguments);
+
+							A.Array.each(
+								model,
+								function(item, index, collection) {
+									var attributeName = item.attributeName;
+
+									if (attributeName === 'predefinedValue') {
+										collection[index] = {
+											attributeName: attributeName,
+											editor: new A.DateCellEditor(
+												{
+													dateFormat: '%m/%d/%Y'
+												}
+											),
+											name: '<%= UnicodeLanguageUtil.get(pageContext, "predefined-value") %>'
+										};
+									}
+								}
+							);
+
+							return model;
+						},
+
+						renderUI: function() {
+							var instance = this;
+
+							DDMDateField.superclass.renderUI.apply(instance, arguments);
+
+							instance.datePicker = new A.DatePicker(
+								{
+									trigger: instance.get('templateNode'),
+									calendar: {
+										firstDayOfWeek: <%= firstDayOfWeek %>,
+										locale: '<%= locale %>',
+										strings: {
+											next: '<liferay-ui:message key="next" />',
+											none: '<liferay-ui:message key="none" />',
+											previous: '<liferay-ui:message key="previous" />',
+											today: '<liferay-ui:message key="today" />'
+										}
+									}
+								}
+							).render();
+						}
+					}
+				}
+			);
+
+			var DDMDecimalField = A.Component.create(
+				{
+					ATTRS: {
+						dataType: {
+							value: 'double'
+						},
+
+						fieldNamespace: {
+							value: 'ddm'
+						}
+					},
+
+					EXTENDS: A.FormBuilderTextField,
+
+					NAME: 'ddm-decimal'
+				}
+			);
+
+			var DDMDocumentLibraryField = A.Component.create(
+				{
+					ATTRS: {
+						dataType: {
+							value: 'document-library'
+						},
+
+						fieldNamespace: {
+							value: 'ddm'
+						}
+					},
+
+					EXTENDS: A.FormBuilderField,
+
+					NAME: 'ddm-documentlibrary',
+
+					prototype: {
+						getHTML: function() {
+							return TPL_BUTTON;
+						},
+
+						getPropertyModel: function() {
+							var instance = this;
+
+							var model = DDMDocumentLibraryField.superclass.getPropertyModel.apply(instance, arguments);
+
+							A.Array.each(
+								model,
+								function(item, index, collection) {
+									var attributeName = item.attributeName;
+									var DLFileEntryCellEditor = Liferay.SpreadSheet.TYPE_EDITOR['ddm-documentlibrary'];
+
+									if (attributeName === 'predefinedValue') {
+										item.editor = new DLFileEntryCellEditor();
+
+										item.formatter = function(obj) {
+											var data = obj.data;
+
+											var label = STR_BLANK;
+
+											var value = data.value;
+
+											if (value !== STR_BLANK) {
+												label = '(<%= UnicodeLanguageUtil.get(pageContext, "file") %>)';
+											}
+
+											return label;
+										};
+									}
+									else if (attributeName === 'type') {
+										item.formatter = instance._defaultFormatter;
+									}
+								}
+							);
+
+							return model;
+						},
+
+						_defaultFormatter: function() {
+							var instance = this;
+
+							return 'documents-and-media';
+						},
+
+						_uiSetValue: function() {
+							return '<%= UnicodeLanguageUtil.get(pageContext, "select") %>';
+						}
+
+					}
+
+				}
+			);
+
+			var DDMIntegerField = A.Component.create(
+				{
+					ATTRS: {
+						dataType: {
+							value: 'integer'
+						},
+
+						fieldNamespace: {
+							value: 'ddm'
+						}
+					},
+
+					EXTENDS: A.FormBuilderTextField,
+
+					NAME: 'ddm-integer'
+				}
+			);
+
+			var DDMNumberField = A.Component.create(
+				{
+					ATTRS: {
+						dataType: {
+							value: 'number'
+						},
+
+						fieldNamespace: {
+							value: 'ddm'
+						}
+					},
+
+					EXTENDS: A.FormBuilderTextField,
+
+					NAME: 'ddm-number'
+				}
+			);
+
+			var DDMParagraphField = A.Component.create(
+				{
+					ATTRS: {
+						dataType: {
+							value: undefined
+						},
+
+						fieldNamespace: {
+							value: 'ddm'
+						},
+
+						showLabel: {
+							readOnly: true,
+							value: true
+						},
+
+						style: {
+							value: STR_BLANK
+						}
+					},
+
+					EXTENDS: A.FormBuilderField,
+
+					NAME: 'ddm-paragraph',
+
+					UI_ATTRS: ['label', 'style'],
+
+					prototype: {
+						getHTML: function() {
+							return TPL_PARAGRAPH;
+						},
+
+						getPropertyModel: function() {
+							var instance = this;
+
+							return [
+								{
+									attributeName: 'type',
+									editor: false,
+									name: '<%= UnicodeLanguageUtil.get(pageContext, "type") %>'
+								},
+								{
+									attributeName: 'label',
+									editor: new A.TextAreaCellEditor(),
+									name: '<%= UnicodeLanguageUtil.get(pageContext, "text") %>'
+								},
+								{
+									attributeName: 'style',
+									editor: new A.TextAreaCellEditor(),
+									name: '<%= UnicodeLanguageUtil.get(pageContext, "style") %>'
+								}
+							];
+						},
+
+						_uiSetLabel: function(val) {
+							var instance = this;
+
+							instance.get('templateNode').setContent(val);
+						},
+
+						_uiSetStyle: function(val) {
+							var instance = this;
+
+							var templateNode = instance.get('templateNode');
+
+							applyStyles(templateNode, val);
+						}
+					}
+				}
+			);
+
+			var DDMSeparatorField = A.Component.create(
+				{
+					ATTRS: {
+						dataType: {
+							value: undefined
+						},
+
+						fieldNamespace: {
+							value: 'ddm'
+						},
+
+						showLabel: {
+							readOnly: true,
+							value: false
+						},
+
+						style: {
+							value: STR_BLANK
+						}
+					},
+
+					EXTENDS: A.FormBuilderField,
+
+					NAME: 'ddm-separator',
+
+					UI_ATTRS: ['style'],
+
+					prototype: {
+						getHTML: function() {
+							return TPL_SEPARATOR;
+						},
+
+						getPropertyModel: function() {
+							return [
+								{
+									attributeName: 'type',
+									editor: false,
+									name: '<%= UnicodeLanguageUtil.get(pageContext, "type") %>'
+								},
+								{
+									attributeName: 'style',
+									editor: new A.TextAreaCellEditor(),
+									name: '<%= UnicodeLanguageUtil.get(pageContext, "style") %>'
+								}
+							];
+						},
+
+						_uiSetStyle: function(val) {
+							var instance = this;
+
+							var templateNode = instance.get('templateNode');
+
+							applyStyles(templateNode, val);
+						}
+					}
+				}
+			);
+
+			var DDMHTMLTextField = A.Component.create(
+				{
+					ATTRS: {
+						dataType: {
+							value: 'html'
+						},
+
+						fieldNamespace: {
+							value: 'ddm'
+						}
+					},
+
+					EXTENDS: FormBuilderTextField,
+
+					NAME: 'ddm-text-html',
+
+					prototype: {
+						getHTML: function() {
+							return TPL_TEXT_HTML;
+						}
+					}
+				}
+			);
+
+			var DDMLinkToPageField = A.Component.create(
+				{
+					ATTRS: {
+						dataType: {
+							value: 'link-to-page'
+						},
+
+						fieldNamespace: {
+							value: 'ddm'
+						}
+					},
+
+					EXTENDS: FormBuilderTextField,
+
+					NAME: 'ddm-link-to-page',
+
+					prototype: {
+						getHTML: function() {
+							return TPL_LINK_TO_PAGE;
+						}
+					}
+				}
+			);
+
+			var WCMImageField = A.Component.create(
+				{
+					ATTRS: {
+						dataType: {
+							value: 'image'
+						},
+
+						fieldNamespace: {
+							value: 'wcm'
+						}
+					},
+
+					EXTENDS: A.FormBuilderField,
+
+					NAME: 'wcm-image',
+
+					prototype: {
+						getHTML: function() {
+							return TPL_WCM_IMAGE;
+						}
+					}
+				}
+			);
+
+			FormBuilderTypes['ddm-date'] = DDMDateField;
+			FormBuilderTypes['ddm-decimal'] = DDMDecimalField;
+			FormBuilderTypes['ddm-documentlibrary'] = DDMDocumentLibraryField;
+			FormBuilderTypes['ddm-integer'] = DDMIntegerField;
+			FormBuilderTypes['ddm-link-to-page'] = DDMLinkToPageField;
+			FormBuilderTypes['ddm-number'] = DDMNumberField;
+			FormBuilderTypes['ddm-paragraph'] = DDMParagraphField;
+			FormBuilderTypes['ddm-separator'] = DDMSeparatorField;
+			FormBuilderTypes['ddm-text-html'] = DDMHTMLTextField;
+			FormBuilderTypes['wcm-image'] = WCMImageField;
+		},
+		'',
+		{
+			requires: ['liferay-portlet-dynamic-data-mapping']
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/edit_structure.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/edit_structure.jsp
new file mode 100644
index 0000000..a9d2623
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/edit_structure.jsp
@@ -0,0 +1,281 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_mapping/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+String closeRedirect = ParamUtil.getString(request, "closeRedirect");
+boolean showBackURL = ParamUtil.getBoolean(request, "showBackURL", true);
+
+String portletResourceNamespace = ParamUtil.getString(request, "portletResourceNamespace");
+
+DDMStructure structure = (DDMStructure)request.getAttribute(WebKeys.DYNAMIC_DATA_MAPPING_STRUCTURE);
+
+long groupId = BeanParamUtil.getLong(structure, request, "groupId", scopeGroupId);
+
+long parentStructureId = BeanParamUtil.getLong(structure, request, "parentStructureId", DDMStructureConstants.DEFAULT_PARENT_STRUCTURE_ID);
+
+String parentStructureName = StringPool.BLANK;
+
+try {
+	DDMStructure parentStructure = DDMStructureServiceUtil.getStructure(parentStructureId);
+
+	parentStructureName = parentStructure.getName(locale);
+}
+catch (NoSuchStructureException nsee) {
+}
+
+long classNameId = PortalUtil.getClassNameId(DDMStructure.class);
+long classPK = BeanParamUtil.getLong(structure, request, "structureId");
+String structureKey = BeanParamUtil.getString(structure, request, "structureKey");
+
+String script = BeanParamUtil.getString(structure, request, "xsd");
+
+JSONArray scriptJSONArray = null;
+
+if (Validator.isNotNull(script)) {
+	if (structure != null) {
+		try {
+			scriptJSONArray = DDMXSDUtil.getJSONArray(structure, script);
+		}
+		catch (Exception e) {
+			scriptJSONArray = DDMXSDUtil.getJSONArray(structure.getDocument());
+		}
+	}
+	else {
+		scriptJSONArray = DDMXSDUtil.getJSONArray(script);
+	}
+}
+%>
+
+<portlet:actionURL var="editStructureURL">
+	<portlet:param name="struts_action" value="/dynamic_data_mapping/edit_structure" />
+</portlet:actionURL>
+
+<aui:form action="<%= editStructureURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveStructure();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= (structure != null) ? Constants.UPDATE : Constants.ADD %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="closeRedirect" type="hidden" value="<%= closeRedirect %>" />
+	<aui:input name="groupId" type="hidden" value="<%= groupId %>" />
+	<aui:input name="classNameId" type="hidden" value="<%= String.valueOf(classNameId) %>" />
+	<aui:input name="classPK" type="hidden" value="<%= String.valueOf(classPK) %>" />
+	<aui:input name="xsd" type="hidden" />
+	<aui:input name="saveAndContinue" type="hidden" value="<%= false %>" />
+
+	<liferay-ui:error exception="<%= LocaleException.class %>">
+
+		<%
+		LocaleException le = (LocaleException)errorException;
+		%>
+
+		<c:if test="<%= le.getType() == LocaleException.TYPE_CONTENT %>">
+			<liferay-ui:message arguments="<%= new String[] {StringUtil.merge(le.getSourceAvailableLocales(), StringPool.COMMA_AND_SPACE), StringUtil.merge(le.getTargetAvailableLocales(), StringPool.COMMA_AND_SPACE)} %>" key="the-default-language-x-does-not-match-the-portal's-available-languages-x" />
+		</c:if>
+	</liferay-ui:error>
+
+	<liferay-ui:error exception="<%= StructureDuplicateElementException.class %>" message="please-enter-unique-structure-field-names-(including-field-names-inherited-from-the-parent-structure)" />
+	<liferay-ui:error exception="<%= StructureNameException.class %>" message="please-enter-a-valid-name" />
+	<liferay-ui:error exception="<%= StructureXsdException.class %>" message="please-enter-a-valid-xsd" />
+
+	<%
+	boolean localizeTitle = true;
+	String title = "new-structure";
+
+	if (structure != null) {
+		localizeTitle = false;
+		title = structure.getName(locale);
+	}
+	else {
+		title = LanguageUtil.format(pageContext, "new-x", ddmDisplay.getStructureName(locale));
+	}
+	%>
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		localizeTitle="<%= localizeTitle %>"
+		showBackURL="<%= showBackURL %>"
+		title="<%= title %>"
+	/>
+
+	<aui:model-context bean="<%= structure %>" model="<%= DDMStructure.class %>" />
+
+	<aui:fieldset>
+		<aui:field-wrapper>
+			<c:if test="<%= (DDMStorageLinkLocalServiceUtil.getStructureStorageLinksCount(classPK) > 0) || (JournalArticleLocalServiceUtil.getStructureArticlesCount(groupId, structureKey) > 0) %>">
+				<div class="alert alert-warning">
+					<liferay-ui:message key="there-are-content-references-to-this-structure.-you-may-lose-data-if-a-field-name-is-renamed-or-removed" />
+				</div>
+			</c:if>
+			<c:if test="<%= (classPK > 0) && (DDMTemplateLocalServiceUtil.getTemplatesCount(groupId, classNameId, classPK) > 0) %>">
+				<div class="alert alert-info">
+					<liferay-ui:message key="there-are-template-references-to-this-structure.-please-update-them-if-a-field-name-is-renamed-or-removed" />
+				</div>
+			</c:if>
+		</aui:field-wrapper>
+
+		<aui:input name="name" />
+
+		<liferay-ui:panel-container cssClass="lfr-structure-entry-details-container" extended="<%= false %>" id="structureDetailsPanelContainer" persistState="<%= true %>">
+			<liferay-ui:panel collapsible="<%= true %>" defaultState="closed" extended="<%= false %>" id="structureDetailsSectionPanel" persistState="<%= true %>" title='<%= LanguageUtil.get(pageContext, "details") %>'>
+				<aui:row cssClass="lfr-ddm-types-form-column">
+					<c:choose>
+						<c:when test="<%= scopeClassNameId == 0 %>">
+							<aui:col width="<%= 50 %>">
+								<aui:field-wrapper>
+									<aui:select disabled="<%= structure != null %>" label="type" name="scopeClassNameId">
+										<aui:option label="<%= ResourceActionsUtil.getModelResource(locale, DDLRecordSet.class.getName()) %>" value="<%= PortalUtil.getClassNameId(DDLRecordSet.class.getName()) %>" />
+										<aui:option label="<%= ResourceActionsUtil.getModelResource(locale, DLFileEntryMetadata.class.getName()) %>" value="<%= PortalUtil.getClassNameId(DLFileEntryMetadata.class.getName()) %>" />
+									</aui:select>
+								</aui:field-wrapper>
+							</aui:col>
+						</c:when>
+						<c:otherwise>
+							<aui:input name="scopeClassNameId" type="hidden" value="<%= scopeClassNameId %>" />
+						</c:otherwise>
+					</c:choose>
+
+					<c:choose>
+						<c:when test="<%= Validator.isNull(storageTypeValue) %>">
+							<aui:col width="<%= 50 %>">
+								<aui:field-wrapper>
+									<aui:select disabled="<%= structure != null %>" name="storageType">
+
+									<%
+									for (StorageType storageType : StorageType.values()) {
+									%>
+
+										<aui:option label="<%= storageType %>" value="<%= storageType %>" />
+
+									<%
+									}
+									%>
+
+									</aui:select>
+								</aui:field-wrapper>
+							</aui:col>
+						</c:when>
+						<c:otherwise>
+							<aui:input name="storageType" type="hidden" value="<%= storageTypeValue %>" />
+						</c:otherwise>
+					</c:choose>
+				</aui:row>
+
+				<aui:input name="description" />
+
+				<aui:field-wrapper label='<%= LanguageUtil.format(pageContext, "parent-x", ddmDisplay.getStructureName(locale)) %>'>
+					<aui:input name="parentStructureId" type="hidden" value="<%= parentStructureId %>" />
+
+					<div class="input-append">
+						<c:choose>
+							<c:when test="<%= (structure == null) || Validator.isNotNull(parentStructureId) %>">
+								<portlet:renderURL var="parentStructureURL">
+									<portlet:param name="struts_action" value="/dynamic_data_mapping/edit_structure" />
+									<portlet:param name="redirect" value="<%= currentURL %>" />
+									<portlet:param name="groupId" value="<%= String.valueOf(scopeGroupId) %>" />
+									<portlet:param name="classNameId" value="<%= String.valueOf(classNameId) %>" />
+									<portlet:param name="classPK" value="<%= String.valueOf(parentStructureId) %>" />
+								</portlet:renderURL>
+
+								<liferay-ui:input-resource id="parentStructureName" url="<%= HtmlUtil.escape(parentStructureName) %>" />
+							</c:when>
+							<c:otherwise>
+								<liferay-ui:input-resource id="parentStructureName" url="" />
+							</c:otherwise>
+						</c:choose>
+
+						<aui:button onClick='<%= renderResponse.getNamespace() + "openParentStructureSelector();" %>' value="select" />
+
+						<aui:button name="removeParentStructureButton" onClick='<%= renderResponse.getNamespace() + "removeParentStructure();" %>' value="remove" />
+					</div>
+				</aui:field-wrapper>
+
+				<c:if test="<%= structure != null %>">
+					<aui:field-wrapper label="url">
+						<liferay-ui:input-resource url='<%= themeDisplay.getPortalURL() + themeDisplay.getPathMain() + "/dynamic_data_mapping/get_structure?structureId=" + classPK %>' />
+					</aui:field-wrapper>
+
+					<c:if test="<%= Validator.isNotNull(refererWebDAVToken) %>">
+						<aui:field-wrapper label="webdav-url">
+							<liferay-ui:input-resource url="<%= structure.getWebDavURL(themeDisplay, refererWebDAVToken) %>" />
+						</aui:field-wrapper>
+					</c:if>
+				</c:if>
+			</liferay-ui:panel>
+		</liferay-ui:panel-container>
+	</aui:fieldset>
+</aui:form>
+
+<%@ include file="/html/portlet/dynamic_data_mapping/form_builder.jspf" %>
+
+<aui:button-row>
+	<aui:button onClick='<%= renderResponse.getNamespace() + "saveStructure();" %>' primary="<%= true %>" value='<%= LanguageUtil.get(pageContext, "save") %>' />
+
+	<aui:button href="<%= redirect %>" type="cancel" />
+</aui:button-row>
+
+<aui:script>
+	function <portlet:namespace />openParentStructureSelector() {
+		Liferay.Util.openDDMPortlet(
+			{
+				basePortletURL: '<%= PortletURLFactoryUtil.create(request, PortletKeys.DYNAMIC_DATA_MAPPING, themeDisplay.getPlid(), PortletRequest.RENDER_PHASE) %>',
+				classPK: <%= (structure != null) ? structure.getPrimaryKey() : 0 %>,
+				dialog: {
+					destroyOnHide: true
+				},
+				eventName: '<portlet:namespace />selectParentStructure',
+				showGlobalScope: true,
+				showManageTemplates: false,
+				struts_action: '/dynamic_data_mapping/select_structure',
+				title: '<%= HtmlUtil.escapeJS(scopeTitle) %>'
+			},
+			function(event) {
+				document.<portlet:namespace />fm.<portlet:namespace />parentStructureId.value = event.ddmstructureid;
+
+				var nameEl = document.getElementById('<portlet:namespace />parentStructureName');
+
+				nameEl.href = '<portlet:renderURL><portlet:param name="struts_action" value="/dynamic_data_mapping/edit_structure" /><portlet:param name="redirect" value="<%= currentURL %>" /><portlet:param name="groupId" value="<%= String.valueOf(scopeGroupId) %>" /><portlet:param name="classNameId" value="<%= String.valueOf(classNameId) %>" /></portlet:renderURL>&<portlet:namespace />classPK=' + event.ddmstructureid;
+				nameEl.value = event.name;
+
+				document.getElementById('<portlet:namespace />removeParentStructureButton').disabled = false;
+			}
+		);
+	}
+
+	function <portlet:namespace />removeParentStructure() {
+		document.<portlet:namespace />fm.<portlet:namespace />parentStructureId.value = '';
+
+		var nameEl = document.getElementById('<portlet:namespace />parentStructureName');
+
+		nameEl.href = '#';
+		nameEl.value = '';
+
+		document.getElementById('<portlet:namespace />removeParentStructureButton').disabled = true;
+	}
+</aui:script>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />saveStructure',
+		function() {
+			document.<portlet:namespace />fm.<portlet:namespace />xsd.value = window.<portlet:namespace />formBuilder.getContentXSD();
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['aui-base', 'liferay-portlet-dynamic-data-mapping']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/edit_template.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/edit_template.jsp
new file mode 100644
index 0000000..cb9d31c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/edit_template.jsp
@@ -0,0 +1,443 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_mapping/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+String closeRedirect = ParamUtil.getString(request, "closeRedirect");
+boolean showBackURL = ParamUtil.getBoolean(request, "showBackURL", true);
+
+String portletResource = ParamUtil.getString(request, "portletResource");
+
+String portletResourceNamespace = ParamUtil.getString(request, "portletResourceNamespace");
+
+DDMTemplate template = (DDMTemplate)request.getAttribute(WebKeys.DYNAMIC_DATA_MAPPING_TEMPLATE);
+
+long templateId = BeanParamUtil.getLong(template, request, "templateId");
+
+long groupId = BeanParamUtil.getLong(template, request, "groupId", scopeGroupId);
+long classNameId = BeanParamUtil.getLong(template, request, "classNameId");
+long classPK = BeanParamUtil.getLong(template, request, "classPK");
+
+boolean smallImage = BeanParamUtil.getBoolean(template, request, "smallImage");
+
+DDMStructure structure = (DDMStructure)request.getAttribute(WebKeys.DYNAMIC_DATA_MAPPING_STRUCTURE);
+
+if ((structure == null) && (template != null)) {
+	structure = DDMTemplateHelperUtil.fetchStructure(template);
+}
+
+String type = BeanParamUtil.getString(template, request, "type", DDMTemplateConstants.TEMPLATE_TYPE_FORM);
+String mode = BeanParamUtil.getString(template, request, "mode", DDMTemplateConstants.TEMPLATE_MODE_CREATE);
+String language = BeanParamUtil.getString(template, request, "language", PropsValues.DYNAMIC_DATA_MAPPING_TEMPLATE_LANGUAGE_DEFAULT);
+String script = BeanParamUtil.getString(template, request, "script");
+
+if (Validator.isNull(script)) {
+	TemplateHandler templateHandler = TemplateHandlerRegistryUtil.getTemplateHandler(classNameId);
+
+	if (templateHandler != null) {
+		Class<?> templateHandlerClass = templateHandler.getClass();
+
+		script = ContentUtil.get(templateHandlerClass.getClassLoader(), templateHandler.getTemplatesHelpPath(language));
+	}
+	else if ((structure != null) && Validator.equals(structure.getClassName(), JournalArticle.class.getName())) {
+		script = ContentUtil.get(PropsUtil.get(PropsKeys.JOURNAL_TEMPLATE_LANGUAGE_CONTENT, new Filter(language)));
+	}
+	else if (!type.equals(DDMTemplateConstants.TEMPLATE_TYPE_FORM)) {
+		script = ContentUtil.get(PropsUtil.get(PropsKeys.DYNAMIC_DATA_MAPPING_TEMPLATE_LANGUAGE_CONTENT, new Filter(language)));
+	}
+}
+
+JSONArray scriptJSONArray = null;
+
+if (type.equals(DDMTemplateConstants.TEMPLATE_TYPE_FORM) && Validator.isNotNull(script)) {
+	scriptJSONArray = DDMXSDUtil.getJSONArray(script);
+}
+
+String structureAvailableFields = ParamUtil.getString(request, "structureAvailableFields");
+
+if (Validator.isNotNull(structureAvailableFields)) {
+	scopeAvailableFields = structureAvailableFields;
+}
+%>
+
+<portlet:actionURL var="editTemplateURL">
+	<portlet:param name="struts_action" value="/dynamic_data_mapping/edit_template" />
+</portlet:actionURL>
+
+<aui:form action="<%= editTemplateURL %>" enctype="multipart/form-data" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveTemplate();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= (template != null) ? Constants.UPDATE : Constants.ADD %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="closeRedirect" type="hidden" value="<%= closeRedirect %>" />
+	<aui:input name="portletResource" type="hidden" value="<%= portletResource %>" />
+	<aui:input name="templateId" type="hidden" value="<%= templateId %>" />
+	<aui:input name="groupId" type="hidden" value="<%= groupId %>" />
+	<aui:input name="classNameId" type="hidden" value="<%= classNameId %>" />
+	<aui:input name="classPK" type="hidden" value="<%= classPK %>" />
+	<aui:input name="type" type="hidden" value="<%= type %>" />
+	<aui:input name="structureAvailableFields" type="hidden" value="<%= structureAvailableFields %>" />
+	<aui:input name="saveAndContinue" type="hidden" value="<%= false %>" />
+
+	<liferay-ui:error exception="<%= TemplateNameException.class %>" message="please-enter-a-valid-name" />
+	<liferay-ui:error exception="<%= TemplateScriptException.class %>" message="please-enter-a-valid-script" />
+
+	<liferay-ui:error exception="<%= TemplateSmallImageNameException.class %>">
+
+		<%
+		String[] imageExtensions = PrefsPropsUtil.getStringArray(PropsKeys.DYNAMIC_DATA_MAPPING_IMAGE_EXTENSIONS, ",");
+		%>
+
+		<liferay-ui:message key="image-names-must-end-with-one-of-the-following-extensions" /> <%= StringUtil.merge(imageExtensions, StringPool.COMMA) %>.
+	</liferay-ui:error>
+
+	<liferay-ui:error exception="<%= TemplateSmallImageSizeException.class %>">
+
+		<%
+		long imageMaxSize = PrefsPropsUtil.getLong(PropsKeys.DYNAMIC_DATA_MAPPING_IMAGE_SMALL_MAX_SIZE) / 1024;
+		%>
+
+		<liferay-ui:message arguments="<%= imageMaxSize %>" key="please-enter-a-small-image-with-a-valid-file-size-no-larger-than-x" />
+	</liferay-ui:error>
+
+	<%
+	String title = StringPool.BLANK;
+
+	if ((structure != null) || (template != null)) {
+		title = ddmDisplay.getEditTemplateTitle(structure, template, locale);
+	}
+	else {
+		title = ddmDisplay.getEditTemplateTitle(classNameId, locale);
+	}
+	%>
+
+	<liferay-ui:header
+		backURL="<%= ddmDisplay.getEditTemplateBackURL(liferayPortletRequest, liferayPortletResponse, classNameId, classPK, portletResource) %>"
+		localizeTitle="<%= false %>"
+		showBackURL="<%= showBackURL %>"
+		title="<%= title %>"
+	/>
+
+	<aui:model-context bean="<%= template %>" model="<%= DDMTemplate.class %>" />
+
+	<aui:fieldset>
+		<aui:input name="name" />
+
+		<liferay-ui:panel-container cssClass="lfr-structure-entry-details-container" extended="<%= false %>" id="templateDetailsPanelContainer" persistState="<%= true %>">
+			<liferay-ui:panel collapsible="<%= true %>" defaultState="closed" extended="<%= false %>" id="templateDetailsSectionPanel" persistState="<%= true %>" title="details">
+				<c:if test="<%= ddmDisplay.isShowStructureSelector() %>">
+					<aui:field-wrapper helpMessage="structure-help" label="structure">
+						<liferay-ui:input-resource url="<%= (structure != null) ? structure.getName(locale) : StringPool.BLANK %>" />
+
+						<c:if test="<%= ((template == null) || (template.getClassPK() == 0)) %>">
+							<liferay-ui:icon
+								iconCssClass="icon-search"
+								label="<%= true %>"
+								linkCssClass="btn"
+								message="select"
+								url='<%= "javascript:" + renderResponse.getNamespace() + "openDDMStructureSelector();" %>'
+							/>
+						</c:if>
+					</aui:field-wrapper>
+				</c:if>
+
+				<c:if test="<%= type.equals(DDMTemplateConstants.TEMPLATE_TYPE_DISPLAY) %>">
+					<aui:select changesContext="<%= true %>" helpMessage='<%= (template == null) ? StringPool.BLANK : "changing-the-language-will-not-automatically-translate-the-existing-template-script" %>' label="language" name="language">
+
+						<%
+						for (String curLangType : ddmDisplay.getTemplateLanguageTypes()) {
+							StringBundler sb = new StringBundler(6);
+
+							sb.append(LanguageUtil.get(pageContext, curLangType + "[stands-for]"));
+							sb.append(StringPool.SPACE);
+							sb.append(StringPool.OPEN_PARENTHESIS);
+							sb.append(StringPool.PERIOD);
+							sb.append(curLangType);
+							sb.append(StringPool.CLOSE_PARENTHESIS);
+						%>
+
+							<aui:option label="<%= sb.toString() %>" selected="<%= language.equals(curLangType) %>" value="<%= curLangType %>" />
+
+						<%
+						}
+						%>
+
+					</aui:select>
+				</c:if>
+
+				<aui:input name="description" />
+
+				<c:if test="<%= template != null %>">
+					<aui:field-wrapper helpMessage="template-key-help" label="template-key">
+						<liferay-ui:input-resource url="<%= template.getTemplateKey() %>" />
+					</aui:field-wrapper>
+
+					<aui:field-wrapper label="url">
+						<liferay-ui:input-resource url='<%= themeDisplay.getPortalURL() + themeDisplay.getPathMain() + "/dynamic_data_mapping/get_template?templateId=" + templateId %>' />
+					</aui:field-wrapper>
+
+					<c:if test="<%= Validator.isNotNull(refererWebDAVToken) %>">
+						<aui:field-wrapper label="webdav-url">
+							<liferay-ui:input-resource url="<%= template.getWebDavURL(themeDisplay, refererWebDAVToken) %>" />
+						</aui:field-wrapper>
+					</c:if>
+				</c:if>
+
+				<c:choose>
+					<c:when test="<%= type.equals(DDMTemplateConstants.TEMPLATE_TYPE_FORM) %>">
+						<aui:select helpMessage="only-allow-deleting-required-fields-in-edit-mode" label="mode" name="mode">
+							<aui:option label="create" />
+							<aui:option label="edit" />
+						</aui:select>
+					</c:when>
+					<c:otherwise>
+						<div id="<portlet:namespace />smallImageContainer">
+							<div class="lfr-ddm-small-image-header">
+								<aui:input name="smallImage" />
+							</div>
+
+							<div class="lfr-ddm-small-image-content toggler-content-collapsed">
+								<aui:row>
+									<c:if test="<%= smallImage && (template != null) %>">
+										<aui:col width="<%= 50 %>">
+											<img alt="<liferay-ui:message key="preview" />" class="lfr-ddm-small-image-preview" src="<%= Validator.isNotNull(template.getSmallImageURL()) ? template.getSmallImageURL() : themeDisplay.getPathImage() + "/template?img_id=" + template.getSmallImageId() + "&t=" + WebServerServletTokenUtil.getToken(template.getSmallImageId()) %>" />
+										</aui:col>
+									</c:if>
+
+									<aui:col width="<%= (smallImage && (template != null)) ? 50 : 100 %>">
+										<aui:fieldset>
+											<aui:input cssClass="lfr-ddm-small-image-type" inlineField="<%= true %>" label="small-image-url" name="type" type="radio" />
+
+											<aui:input cssClass="lfr-ddm-small-image-value" inlineField="<%= true %>" label="" name="smallImageURL" />
+										</aui:fieldset>
+
+										<aui:fieldset>
+											<aui:input cssClass="lfr-ddm-small-image-type" inlineField="<%= true %>" label="small-image" name="type" type="radio" />
+
+											<aui:input cssClass="lfr-ddm-small-image-value" inlineField="<%= true %>"  label="" name="smallImageFile" type="file" />
+										</aui:fieldset>
+									</aui:col>
+								</aui:row>
+							</div>
+						</div>
+					</c:otherwise>
+				</c:choose>
+			</liferay-ui:panel>
+		</liferay-ui:panel-container>
+
+		<c:choose>
+			<c:when test="<%= type.equals(DDMTemplateConstants.TEMPLATE_TYPE_FORM) %>">
+				<%@ include file="/html/portlet/dynamic_data_mapping/edit_template_form.jspf" %>
+			</c:when>
+			<c:otherwise>
+				<%@ include file="/html/portlet/dynamic_data_mapping/edit_template_display.jspf" %>
+			</c:otherwise>
+		</c:choose>
+	</aui:fieldset>
+</aui:form>
+
+<c:choose>
+	<c:when test="<%= type.equals(DDMTemplateConstants.TEMPLATE_TYPE_FORM) %>">
+		<%@ include file="/html/portlet/dynamic_data_mapping/form_builder.jspf" %>
+
+		<aui:script>
+			Liferay.provide(
+				window,
+				'<portlet:namespace />attachValueChange',
+				function(mode) {
+					var A = AUI();
+
+					A.one('#<portlet:namespace />mode').on(
+						'change',
+						function(event) {
+							var currentTarget = event.currentTarget;
+
+							<portlet:namespace />toggleMode(currentTarget.get('value'));
+						}
+					);
+				},
+				['aui-base']
+			);
+
+			Liferay.on(
+				'<portlet:namespace />formBuilderLoaded',
+				function(event) {
+					<portlet:namespace />attachValueChange();
+
+					<portlet:namespace />toggleMode('<%= HtmlUtil.escape(mode) %>');
+				}
+			);
+
+			Liferay.provide(
+				window,
+				'<portlet:namespace />setFieldsHiddenAttributes',
+				function(item, index, collection, mode) {
+					var A = AUI();
+
+					var hiddenAttributesMap = window.<portlet:namespace />formBuilder.MAP_HIDDEN_FIELD_ATTRS;
+					var hiddenAttributes = hiddenAttributesMap[item.get('type')] || hiddenAttributesMap.DEFAULT;
+
+					hiddenAttributes = A.Array(hiddenAttributes);
+
+					if (mode === '<%= DDMTemplateConstants.TEMPLATE_MODE_EDIT %>') {
+						A.Array.removeItem(hiddenAttributes, 'readOnly');
+					}
+
+					item.set('hiddenAttributes', hiddenAttributes);
+				},
+				['aui-base']
+			);
+
+			Liferay.provide(
+				window,
+				'<portlet:namespace />toggleMode',
+				function(mode) {
+					var A = AUI();
+
+					var modeEdit = (mode === '<%= DDMTemplateConstants.TEMPLATE_MODE_EDIT %>');
+
+					window.<portlet:namespace />formBuilder.set('allowRemoveRequiredFields', modeEdit);
+
+					window.<portlet:namespace />formBuilder.get('fields').each(A.rbind('<portlet:namespace />setFieldsHiddenAttributes', window, mode));
+
+					A.Array.each(window.<portlet:namespace />formBuilder.get('availableFields'), A.rbind('<portlet:namespace />setFieldsHiddenAttributes', window, mode));
+
+					var editingField = window.<portlet:namespace />formBuilder.editingField;
+
+					if (editingField) {
+						window.<portlet:namespace />formBuilder.propertyList.set('data', window.<portlet:namespace />formBuilder.getFieldProperties(editingField));
+					}
+				},
+				['aui-base']
+			);
+		</aui:script>
+	</c:when>
+	<c:otherwise>
+		<aui:script use="aui-toggler">
+			var container = A.one('#<portlet:namespace />smallImageContainer');
+
+			var types = container.all('.lfr-ddm-small-image-type');
+			var values = container.all('.lfr-ddm-small-image-value');
+
+			var selectSmallImageType = function(index) {
+				types.set('checked', false);
+
+				types.item(index).set('checked', true);
+
+				values.set('disabled', true);
+
+				values.item(index).set('disabled', false);
+			};
+
+			container.delegate(
+				'change',
+				function(event) {
+					var index = types.indexOf(event.currentTarget);
+
+					selectSmallImageType(index);
+				},
+				'.lfr-ddm-small-image-type'
+			);
+
+			new A.Toggler(
+				{
+					animated: true,
+					content: '#<portlet:namespace />smallImageContainer .lfr-ddm-small-image-content',
+					expanded: <%= smallImage %>,
+					header: '#<portlet:namespace />smallImageContainer .lfr-ddm-small-image-header',
+					on: {
+						animatingChange: function(event) {
+							var instance = this;
+
+							var expanded = !instance.get('expanded');
+
+							A.one('#<portlet:namespace />smallImage').set('value', expanded);
+							A.one('#<portlet:namespace />smallImageCheckbox').set('checked', expanded);
+
+							if (expanded) {
+								types.each(
+									function(item, index, collection) {
+										if (item.get('checked')) {
+											values.item(index).set('disabled', false);
+										}
+									}
+								);
+							}
+							else {
+								values.set('disabled', true);
+							}
+						}
+					}
+				}
+			);
+
+			selectSmallImageType('<%= (template != null) && Validator.isNotNull(template.getSmallImageURL()) ? 0 : 1 %>');
+		</aui:script>
+	</c:otherwise>
+</c:choose>
+
+<c:if test="<%= ddmDisplay.isShowStructureSelector() && ((template == null) || (template.getClassPK() == 0)) %>">
+	<aui:script>
+		function <portlet:namespace />openDDMStructureSelector() {
+			Liferay.Util.openDDMPortlet(
+				{
+					basePortletURL: '<%= PortletURLFactoryUtil.create(request, PortletKeys.DYNAMIC_DATA_MAPPING, themeDisplay.getPlid(), PortletRequest.RENDER_PHASE) %>',
+					classNameId: '<%= PortalUtil.getClassNameId(DDMStructure.class) %>',
+					classPK: 0,
+					eventName: '<portlet:namespace />selectStructure',
+					groupId: <%= groupId %>,
+					refererPortletName: '<%= PortletKeys.JOURNAL %>',
+					struts_action: '/dynamic_data_mapping/select_structure',
+					title: '<%= UnicodeLanguageUtil.get(pageContext, "structures") %>'
+				},
+				function(event) {
+					if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "selecting-a-new-structure-will-change-the-available-input-fields-and-available-templates") %>') && (document.<portlet:namespace />fm.<portlet:namespace />classPK.value != event.ddmstructureid)) {
+						document.<portlet:namespace />fm.<portlet:namespace />classPK.value = event.ddmstructureid;
+
+						Liferay.fire('<portlet:namespace />refreshEditor');
+					}
+				}
+			);
+		}
+	</aui:script>
+</c:if>
+
+<aui:button-row>
+	<aui:script>
+		Liferay.after(
+			'<portlet:namespace />saveTemplate',
+			function() {
+				submitForm(document.<portlet:namespace />fm);
+			}
+		);
+
+		function <portlet:namespace />saveAndContinueTemplate() {
+			document.<portlet:namespace />fm.<portlet:namespace />saveAndContinue.value = '1';
+
+			Liferay.fire('<portlet:namespace />saveTemplate');
+		}
+	</aui:script>
+
+	<%
+	String taglibOnClick = "Liferay.fire('" + liferayPortletResponse.getNamespace() + "saveTemplate');";
+	%>
+
+	<aui:button onClick="<%= taglibOnClick %>" primary="<%= true %>" value='<%= LanguageUtil.get(pageContext, "save") %>' />
+
+	<aui:button onClick='<%= renderResponse.getNamespace() + "saveAndContinueTemplate();" %>' value='<%= LanguageUtil.get(pageContext, "save-and-continue") %>' />
+
+	<aui:button href="<%= redirect %>" type="cancel" />
+</aui:button-row>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/edit_template_display.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/edit_template_display.jspf
new file mode 100644
index 0000000..831a872
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/edit_template_display.jspf
@@ -0,0 +1,656 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+String scriptContent = ParamUtil.getString(request, "scriptContent");
+
+if (Validator.isNotNull(scriptContent)) {
+	script = scriptContent;
+}
+%>
+
+<aui:input name="scriptContent" type="hidden" value="<%= script %>" />
+
+<liferay-ui:panel-container extended="<%= false %>" id="templateScriptContainer" persistState="<%= true %>">
+	<liferay-ui:panel collapsible="<%= true %>" extended="<%= false %>" id="templateScriptSectionPanel" persistState="<%= true %>" title="script">
+		<div class="control-group lfr-template-editor-container">
+			<c:if test="<%= DDMTemplateHelperUtil.isAutocompleteEnabled(language) %>">
+				<div class="lfr-template-palette-container pull-left" id="<portlet:namespace />templatePaletteContainer">
+					<div class="search" id="<portlet:namespace />paletteSearchContainer">
+						<input class="field search-query span12" id="<portlet:namespace />paletteSearch" placeholder='<%= LanguageUtil.get(pageContext, "search") %>' type="text">
+					</div>
+
+					<div class="lfr-template-palette" id="<portlet:namespace />paletteDataContainer">
+						<div id="<portlet:namespace />paletteData">
+
+							<%
+							long templateHandlerClassNameId = ddmDisplay.getTemplateHandlerClassNameId(template, classNameId);
+
+							Map<String, TemplateVariableGroup> templateVariableGroups = TemplateContextHelper.getTemplateVariableGroups(templateHandlerClassNameId, classPK, language, locale);
+
+							for (TemplateVariableGroup templateVariableGroup : templateVariableGroups.values()) {
+								if (templateVariableGroup.isEmpty()) {
+									continue;
+								}
+							%>
+
+								<div class="palette-section">
+									<div class="palette-item-header toggler-header-expanded">
+										<span class="palette-item-header-icon"></span>
+
+										<span><liferay-ui:message key="<%= templateVariableGroup.getLabel() %>" /></span>
+									</div>
+
+									<ul class="palette-item-content">
+
+										<%
+										for (TemplateVariableDefinition templateVariableDefinition : templateVariableGroup.getTemplateVariableDefinitions()) {
+											String[] dataContentArray = _getDataContentArray(templateVariableDefinition, language);
+										%>
+
+											<li class="palette-item-container">
+												<span class="palette-item" data-content1="<%= HtmlUtil.escapeAttribute(dataContentArray[0]) %>" <c:if test="<%= Validator.isNotNull(dataContentArray[1]) %>">data-content2="<%= HtmlUtil.escapeAttribute(dataContentArray[1]) %>"</c:if> <c:if test="<%= Validator.isNotNull(dataContentArray[2]) %>">data-content3="<%= HtmlUtil.escapeAttribute(dataContentArray[2]) %>"</c:if> data-title="<%= HtmlUtil.escapeAttribute(_getPaletteItemTitle(pageContext, templateVariableDefinition)) %>">
+													<liferay-ui:message key="<%= templateVariableDefinition.getLabel() %>" /><c:if test="<%= templateVariableDefinition.isCollection() || templateVariableDefinition.isRepeatable() %>">*</c:if>
+												</span>
+											</li>
+
+										<%
+										}
+										%>
+
+									</ul>
+								</div>
+
+							<%
+							}
+							%>
+
+						</div>
+					</div>
+				</div>
+			</c:if>
+
+			<%
+			String editorContainerClass = "lfr-editor-container";
+
+			if (!DDMTemplateHelperUtil.isAutocompleteEnabled(language)) {
+				editorContainerClass += " lfr-editor-container-full";
+			}
+			%>
+
+			<div class="<%= editorContainerClass %>" id="<portlet:namespace />editorContainer">
+				<div class="lfr-rich-editor" id="<portlet:namespace />richEditor"></div>
+			</div>
+		</div>
+
+		<aui:input inlineLabel="left" label="script-file" name="script" type="file" />
+	</liferay-ui:panel>
+</liferay-ui:panel-container>
+
+<aui:script use="aui-ace-autocomplete-freemarker,aui-ace-autocomplete-plugin,aui-ace-autocomplete-velocity,aui-toggler,aui-popover,autocomplete-base,autocomplete-filters,event-mouseenter,event-outside,liferay-util-window,resize,transition">
+	var AArray = A.Array;
+	var ACPlugin = A.Plugin.AceAutoComplete;
+	var AObject = A.Object;
+	var Util = Liferay.Util;
+
+	var STR_EMPTY = '';
+
+	var STR_HEIGHT = 'height';
+
+	var selectLanguageNode = A.one('#<portlet:namespace />language');
+
+	var panelScriptContainer = A.one('#templateScriptContainer');
+
+	var editorContainer = panelScriptContainer.one('#<portlet:namespace />editorContainer');
+
+	if (Liferay.Util.getTop() !== A.config.win) {
+		var dialog = Liferay.Util.getWindow();
+
+		if (dialog && A.Lang.isFunction(dialog._detachUIHandlesAutohide)) {
+			dialog._detachUIHandlesAutohide();
+
+			if (dialog.iframe) {
+				dialog.iframe.set('closeOnEscape', false);
+			}
+		}
+	}
+
+	var prevEditorContent;
+	var richEditor;
+
+	<c:if test="<%= DDMTemplateHelperUtil.isAutocompleteEnabled(language) %>">
+		var paletteContainer = panelScriptContainer.one('#<portlet:namespace />templatePaletteContainer');
+		var paletteDataContainer = panelScriptContainer.one('#<portlet:namespace />paletteDataContainer');
+
+		function createLiveSearch() {
+			var trim = A.Lang.trim;
+
+			var PaletteSearch = A.Component.create(
+				{
+					AUGMENTS: [A.AutoCompleteBase],
+
+					EXTENDS: A.Base,
+
+					NAME: 'searchpalette',
+
+					prototype: {
+						initializer: function() {
+							var instance = this;
+
+							instance._bindUIACBase();
+							instance._syncUIACBase();
+						}
+					}
+				}
+			);
+
+			var getItems = function() {
+				var results = [];
+
+				paletteItems.each(
+					function(item, index, collection) {
+						results.push(
+							{
+								node: item.ancestor(),
+								data: trim(item.text())
+							}
+						);
+					}
+				);
+
+				return results;
+			};
+
+			var getNoResultsNode = function() {
+				if (!noResultsNode) {
+					noResultsNode = A.Node.create('<div class="alert"><%= LanguageUtil.get(pageContext, "there-are-no-results") %></div>');
+				}
+
+				return noResultsNode;
+			};
+
+			var paletteItems = paletteDataContainer.all('.palette-item');
+			var paletteSectionsNode = paletteDataContainer.all('.palette-section');
+
+			var noResultsNode;
+
+			var paletteSearch = new PaletteSearch(
+				{
+					inputNode: '#<portlet:namespace />paletteSearch',
+					minQueryLength: 0,
+					nodes: '.palette-item-container',
+					resultFilters: 'phraseMatch',
+					resultTextLocator: 'data',
+					source: getItems()
+				}
+			);
+
+			paletteSearch.on(
+				'results',
+				function(event) {
+					paletteItems.each(
+						function(item, index, collection) {
+							item.ancestor().addClass('hide');
+						}
+					);
+
+					AArray.each(
+						event.results,
+						function(item, index, collection) {
+							item.raw.node.removeClass('hide');
+						}
+					);
+
+					var foundVisibleSection;
+
+					paletteSectionsNode.each(
+						function(item, index, collection) {
+							var visibleItem = item.one('.palette-item-container:not(.hide)');
+
+							if (visibleItem) {
+								foundVisibleSection = true;
+							}
+
+							item.toggleClass('hide', !visibleItem);
+						}
+					);
+
+					var noResultsNode = getNoResultsNode();
+
+					if (foundVisibleSection) {
+						noResultsNode.remove();
+					}
+					else {
+						paletteDataContainer.appendChild(noResultsNode);
+					}
+				}
+			);
+		}
+
+		function onPaletteItemChosen(event) {
+			var editor = richEditor.getEditor();
+
+			var item = event.currentTarget;
+
+			var contentAttrs = Util.getAttributes(item, 'data-content');
+
+			var cursorPos;
+			var processed;
+
+			var aceAutocomplete = richEditor['ace-autocomplete-plugin'];
+
+			aceAutocomplete._lockEditor = true;
+
+			AObject.each(
+				contentAttrs,
+				function(item, index) {
+					if (processed) {
+						editor.insert('\n');
+
+						cursorPos = editor.getCursorPosition();
+
+						editor.insert('\n');
+					}
+
+					processed = true;
+
+					editor.insert(item);
+				}
+			);
+
+			if (cursorPos) {
+				editor.moveCursorToPosition(cursorPos);
+			}
+
+			editor.focus();
+
+			aceAutocomplete._lockEditor = false;
+		}
+	</c:if>
+
+	function getEditorContent() {
+		var content = richEditor.getSession().getValue();
+
+		return content;
+	}
+
+	function getSelectedLanguage() {
+		return selectLanguageNode.val();
+	}
+
+	function resizeEditor(event) {
+		var info = event.info;
+
+		richEditor.set(STR_HEIGHT, info.offsetHeight);
+		richEditor.set('width', info.offsetWidth);
+
+		paletteDataContainer.setStyle(STR_HEIGHT, info.offsetHeight);
+	}
+
+	function setEditorContent(content) {
+		richEditor.getSession().setValue(content);
+
+		prevEditorContent = content;
+	}
+
+	function setEditorPlugins(event) {
+		var selectedOptionValue = getSelectedLanguage();
+
+		var AutoComplete;
+
+		<c:choose>
+			<c:when test="<%= language.equals(TemplateConstants.LANG_TYPE_FTL) %>">
+				AutoComplete = A.AceEditor.AutoCompleteFreemarker;
+			</c:when>
+			<c:when test="<%= language.equals(TemplateConstants.LANG_TYPE_VM) %>">
+				AutoComplete = A.AceEditor.AutoCompleteVelocity;
+			</c:when>
+		</c:choose>
+
+		if (AutoComplete) {
+			var processor = new AutoComplete(
+				{
+					variables: <%= DDMTemplateHelperUtil.getAutocompleteJSON(request, language) %>
+				}
+			);
+
+			if (processor) {
+				richEditor.unplug(ACPlugin);
+
+				richEditor.plug(
+					ACPlugin,
+					{
+						processor: processor,
+						render: true,
+						visible: false,
+						zIndex: 10000
+					}
+				);
+			}
+			else {
+				richEditor.unplug(ACPlugin);
+			}
+		}
+	}
+
+	<%
+	String langType = ParamUtil.getString(request, "langType");
+	%>
+
+	var editorContentElement = A.one('#<portlet:namespace />scriptContent');
+
+	var editorNode = A.one('#<portlet:namespace />richEditor');
+
+	A.on(
+		'domready',
+		function(event) {
+			richEditor = new A.AceEditor(
+				{
+					boundingBox: editorNode,
+					height: 400,
+					mode: '<%= EditorUtil.getEditorMode(langType) %>',
+					width: '100%'
+				}
+			).render();
+
+			var resize = new A.Resize(
+				{
+					handles: ['br'],
+					node: editorNode,
+					on: {
+						resize: resizeEditor
+					}
+				}
+			);
+
+			if (editorContentElement) {
+				setEditorContent(editorContentElement.val());
+			}
+
+			Liferay.on(
+				'<portlet:namespace />saveTemplate',
+				function(event) {
+					editorContentElement.val(getEditorContent());
+				}
+			);
+
+			selectLanguageNode.on(
+				'change',
+				function(event) {
+					Liferay.fire('<portlet:namespace />refreshEditor');
+				}
+			);
+
+			setEditorPlugins();
+
+			<c:if test="<%= DDMTemplateHelperUtil.isAutocompleteEnabled(language) %>">
+				paletteContainer.delegate('click', onPaletteItemChosen, '.palette-item');
+
+				var togglerDelegate = new A.TogglerDelegate(
+					{
+						animated: true,
+						container: paletteDataContainer,
+						content: '.palette-item-content',
+						header: '.palette-item-header'
+					}
+				);
+
+				var tooltip = new A.Popover(
+					{
+						align: {
+							points: [A.WidgetPositionAlign.LC, A.WidgetPositionAlign.RC]
+						},
+						constrain: true,
+						position: 'right',
+						visible: false,
+						zIndex: 6
+					}
+				).render(paletteContainer);
+
+				tooltip.get('boundingBox').on('clickoutside', tooltip.hide, tooltip);
+
+				paletteContainer.delegate(
+					'mouseenter',
+					function(event) {
+						tooltip.hide();
+
+						var node = event.currentTarget;
+
+						tooltip.set('align.node', node);
+
+						tooltip.setStdModContent(A.WidgetStdMod.BODY, node.attr('data-title'));
+
+						tooltip.show();
+					},
+					'.palette-item'
+				);
+
+				createLiveSearch();
+			</c:if>
+		},
+		'#<portlet:namespace />richEditor'
+	);
+
+	Liferay.on(
+		'<portlet:namespace />refreshEditor',
+		function(event) {
+			var form = A.one('#<portlet:namespace />fm');
+
+			form.one('#<portlet:namespace />cmd').val(STR_EMPTY);
+
+			if (richEditor.getEditor().getSession().getUndoManager().hasUndo()) {
+				Liferay.fire('<portlet:namespace />saveTemplate');
+			}
+			<c:if test="<%= template == null %>">
+				else {
+					editorContentElement.val(STR_EMPTY);
+				}
+			</c:if>
+
+			submitForm(form, null, null, false);
+		}
+	);
+</aui:script>
+
+<%!
+private String _getAccessor(String accessor, String language) {
+	if (StringUtil.equalsIgnoreCase(language, "vm")) {
+		if (!accessor.contains(StringPool.OPEN_PARENTHESIS)) {
+			return accessor;
+		}
+
+		StringTokenizer st = new StringTokenizer(accessor, "(,");
+
+		StringBundler sb = new StringBundler(st.countTokens() * 2);
+
+		sb.append(st.nextToken());
+		sb.append(StringPool.OPEN_PARENTHESIS);
+
+		while (st.hasMoreTokens()) {
+			sb.append(StringPool.DOLLAR);
+			sb.append(st.nextToken());
+		}
+
+		accessor = sb.toString();
+	}
+
+	return accessor;
+}
+
+private String[] _getDataContentArray(TemplateVariableDefinition templateVariableDefinition, String language) {
+	String[] dataContentArray = new String[] {StringPool.BLANK, StringPool.BLANK, StringPool.BLANK};
+
+	String dataType = templateVariableDefinition.getDataType();
+
+	if (dataType.equals("service-locator")) {
+		Class<?> templateVariableDefinitionClass = templateVariableDefinition.getClazz();
+
+		String variableName = templateVariableDefinitionClass.getSimpleName();
+
+		dataContentArray[0] = _getVariableAssignmentCode(variableName, "serviceLocator.findService(\"" + templateVariableDefinition.getName() + "\")", language);
+		dataContentArray[1] = _getVariableReferenceCode(variableName, null, language);
+	}
+	else if (templateVariableDefinition.isCollection()) {
+		TemplateVariableDefinition itemTemplateVariableDefinition = templateVariableDefinition.getItemTemplateVariableDefinition();
+
+		String[] listCodeArray = _getListCodeArray(templateVariableDefinition.getName(), itemTemplateVariableDefinition.getName(), itemTemplateVariableDefinition.getAccessor(), language);
+
+		dataContentArray[0] = listCodeArray[0];
+		dataContentArray[1] = listCodeArray[1];
+	}
+	else if (Validator.isNull(dataType)) {
+		dataContentArray[0] = _getVariableReferenceCode(templateVariableDefinition.getName(), templateVariableDefinition.getAccessor(), language);
+	}
+	else {
+		try {
+			dataContentArray = templateVariableDefinition.generateCode(language);
+		}
+		catch (Exception e) {
+			_log.error(e, e);
+		}
+	}
+
+	return dataContentArray;
+}
+
+private String[] _getListCodeArray(
+	String variableName, String itemName, String accessor, String language) {
+	String[] listCodeArray = new String[2];
+
+	if (StringUtil.equalsIgnoreCase(language, "ftl")) {
+		listCodeArray[0] = "<#if " + variableName + "?has_content>\n\t<#list " + variableName + " as " + itemName + ">\n\t\t" + _getVariableReferenceCode(itemName, accessor, language);
+		listCodeArray[1] = "\n\t</#list>\n</#if>";
+	}
+	else if (StringUtil.equalsIgnoreCase(language, "vm")) {
+		listCodeArray[0] = "#if (!$"+ variableName + ".isEmpty())\n\t#foreach ($" + itemName + " in $" + variableName + ")\n\t\t" + _getVariableReferenceCode(itemName, accessor, language);
+		listCodeArray[1] = "#end\n#end";
+	}
+
+	return listCodeArray;
+}
+
+private String _getPaletteItemTitle(PageContext pageContext, String label, Class<?> clazz) {
+	StringBundler sb = new StringBundler();
+
+	if (clazz == null) {
+		return StringPool.BLANK;
+	}
+
+	String className = clazz.getName();
+
+	sb.append("<br />");
+	sb.append(LanguageUtil.get(pageContext, label));
+	sb.append(StringPool.COLON);
+	sb.append("&nbsp;");
+
+	String javadocURL = null;
+
+	if (className.startsWith("com.liferay")) {
+		javadocURL = "http://docs.liferay.com/portal/6.2/javadocs/";
+	}
+
+	if (Validator.isNotNull(javadocURL)) {
+		sb.append("<a href=\"");
+		sb.append(javadocURL);
+		sb.append(StringUtil.replace(className, StringPool.PERIOD, StringPool.SLASH));
+		sb.append(".html\" target=\"_blank\">");
+	}
+
+	sb.append(clazz.getSimpleName());
+
+	if (Validator.isNull(javadocURL)) {
+		sb.append("</a>");
+	}
+
+	return sb.toString();
+}
+
+private String _getPaletteItemTitle(PageContext pageContext, TemplateVariableDefinition templateVariableDefinition) {
+	StringBundler sb = new StringBundler();
+
+	String help = templateVariableDefinition.getHelp();
+
+	if (Validator.isNotNull(help)) {
+		sb.append("<p>");
+		sb.append(LanguageUtil.get(pageContext, help));
+		sb.append("</p>");
+	}
+
+	if (templateVariableDefinition.isCollection()) {
+		sb.append("<p><i>*");
+		sb.append(LanguageUtil.get(pageContext, "this-is-a-collection-of-fields"));
+		sb.append("</i></p>");
+	}
+	else if (templateVariableDefinition.isRepeatable()) {
+		sb.append("<p><i>*");
+		sb.append(LanguageUtil.get(pageContext, "this-is-a-repeatable-field"));
+		sb.append("</i></p>");
+	}
+
+	if (!Validator.equals(templateVariableDefinition.getDataType(), "service-locator")) {
+		sb.append(LanguageUtil.get(pageContext, "variable"));
+		sb.append(StringPool.COLON);
+		sb.append("&nbsp;");
+		sb.append(templateVariableDefinition.getName());
+	}
+
+	sb.append(_getPaletteItemTitle(pageContext, "class", templateVariableDefinition.getClazz()));
+
+	if (templateVariableDefinition.isCollection()) {
+		TemplateVariableDefinition itemTemplateVariableDefinition = templateVariableDefinition.getItemTemplateVariableDefinition();
+
+		sb.append(_getPaletteItemTitle(pageContext, "items-class", itemTemplateVariableDefinition.getClazz()));
+	}
+
+	return sb.toString();
+}
+
+private String _getVariableAssignmentCode(String variableName, String variableValue, String language) {
+	if (StringUtil.equalsIgnoreCase(language, "ftl")) {
+		return "<#assign " + variableName + " = " + variableValue + ">";
+	}
+	else if (StringUtil.equalsIgnoreCase(language, "vm")) {
+		if (!variableValue.startsWith(StringPool.DOUBLE_QUOTE) && !variableValue.startsWith(StringPool.OPEN_BRACKET) && !variableValue.startsWith(StringPool.OPEN_CURLY_BRACE) && !variableValue.startsWith(StringPool.QUOTE) && !Validator.isNumber(variableValue)) {
+			variableValue = StringPool.DOLLAR + variableValue;
+		}
+
+		return "#set ($" + variableName + " = " + variableValue + ")";
+	}
+
+	return variableName;
+}
+
+private String _getVariableReferenceCode(String variableName, String accessor, String language) {
+	String methodInvocation = StringPool.BLANK;
+
+	if (Validator.isNotNull(accessor)) {
+		methodInvocation = StringPool.PERIOD + _getAccessor(accessor, language);
+	}
+
+	if (StringUtil.equalsIgnoreCase(language, "ftl")) {
+		return "${" + variableName + methodInvocation + "}";
+	}
+	else if (StringUtil.equalsIgnoreCase(language, "vm")) {
+		return "$" + variableName + methodInvocation;
+	}
+
+	return variableName;
+}
+%>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.dynamic_data_mapping.edit_template_display_jspf");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/edit_template_form.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/edit_template_form.jspf
new file mode 100644
index 0000000..2d5e2e5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/edit_template_form.jspf
@@ -0,0 +1,86 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+if (Validator.isNull(script)) {
+	script = structure.getXsd();
+	scriptJSONArray = DDMXSDUtil.getJSONArray(script);
+}
+
+if (scriptJSONArray != null) {
+	scriptJSONArray = _addFormTemplateFieldAttributes(structure, scriptJSONArray);
+}
+
+String namespace = renderResponse.getNamespace();
+
+if (Validator.isNotNull(portletResourceNamespace)) {
+	namespace = portletResourceNamespace;
+}
+%>
+
+<aui:input name="language" type="hidden" value="xsd" />
+<aui:input name="scriptContent" type="hidden" />
+
+<aui:script>
+	window["<%= HtmlUtil.escapeJS(namespace) %>getAvailableFields"] = function(A, FormBuilder) {
+		var availableFields = <%= scriptJSONArray.toString() %>;
+
+		A.Array.each(
+			availableFields,
+			function(item, index, collection) {
+				item.iconCssClass = FormBuilder.DEFAULT_ICON_CLASS;
+			}
+		);
+
+		return availableFields.concat(FormBuilder.AVAILABLE_FIELDS.DDM_TEMPLATE);
+	};
+</aui:script>
+
+<%!
+public JSONArray _addFormTemplateFieldAttributes(DDMStructure structure, JSONArray scriptJSONArray) throws Exception {
+	for (int i = 0; i < scriptJSONArray.length(); i++) {
+		JSONObject jsonObject = scriptJSONArray.getJSONObject(i);
+
+		String fieldName = jsonObject.getString("name");
+
+		try {
+			jsonObject.put("readOnlyAttributes", _getFieldReadOnlyAttributes(structure, fieldName));
+			jsonObject.put("unique", true);
+		}
+		catch (StructureFieldException sfe) {
+		}
+	}
+
+	return scriptJSONArray;
+}
+
+public JSONArray _getFieldReadOnlyAttributes(DDMStructure structure, String fieldName) throws Exception {
+	JSONArray readOnlyAttributesJSONArray = JSONFactoryUtil.createJSONArray();
+
+	readOnlyAttributesJSONArray.put("indexType");
+	readOnlyAttributesJSONArray.put("name");
+	readOnlyAttributesJSONArray.put("options");
+	readOnlyAttributesJSONArray.put("repeatable");
+
+	boolean required = structure.getFieldRequired(fieldName);
+
+	if (required) {
+		readOnlyAttributesJSONArray.put("required");
+	}
+
+	return readOnlyAttributesJSONArray;
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/error.jsp
new file mode 100644
index 0000000..24e494e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/error.jsp
@@ -0,0 +1,25 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_mapping/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= NoSuchStructureException.class %>" message="the-structure-could-not-be-found" />
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/file_entry_search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/file_entry_search.jsp
new file mode 100644
index 0000000..1a8f72e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/file_entry_search.jsp
@@ -0,0 +1,38 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library/init.jsp" %>
+
+<%
+FileEntrySearch searchContainer = (FileEntrySearch)request.getAttribute("liferay-ui:search:searchContainer");
+
+FileEntryDisplayTerms displayTerms = (FileEntryDisplayTerms)searchContainer.getDisplayTerms();
+%>
+
+<liferay-ui:search-toggle
+	buttonLabel="search"
+	displayTerms="<%= displayTerms %>"
+	id="toggle_id_asset_search"
+>
+	<aui:fieldset>
+		<aui:input name="keywords" size="20" type="text" value="" />
+
+		<aui:select label="scope" name="<%= displayTerms.SELECTED_GROUP_ID %>" showEmptyOption="<%= false %>">
+			<aui:option label="global" selected="<%= displayTerms.getSelectedGroupId() == themeDisplay.getCompanyGroupId() %>" value="<%= themeDisplay.getCompanyGroupId() %>" />
+			<aui:option label="<%= themeDisplay.getScopeGroupName() %>" selected="<%= displayTerms.getSelectedGroupId() == scopeGroupId %>" value="<%= scopeGroupId %>" />
+		</aui:select>
+	</aui:fieldset>
+</liferay-ui:search-toggle>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/form_builder.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/form_builder.jspf
new file mode 100644
index 0000000..cd328ea
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/form_builder.jspf
@@ -0,0 +1,321 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_mapping/custom_fields.jspf" %>
+
+<%
+String[] availableLanguageIds = LocalizationUtil.getAvailableLanguageIds(script);
+
+Locale[] availableLocales = new Locale[availableLanguageIds.length];
+
+for (int i = 0; i < availableLanguageIds.length; i++) {
+	availableLocales[i] = LocaleUtil.fromLanguageId(availableLanguageIds[i]);
+}
+
+String defaultLanguageId = LocalizationUtil.getDefaultLanguageId(script);
+%>
+
+<div class="separator"><!-- --></div>
+
+<div class="hide lfr-message-response alert alert-error" id="<portlet:namespace />messageContainer"></div>
+
+<liferay-ui:tabs
+	names='<%= LanguageUtil.get(pageContext, "view") + "," + LanguageUtil.get(pageContext, "source") %>'
+	refresh="<%= false %>"
+>
+	<liferay-ui:section>
+		<div id="<portlet:namespace />formBuilderTab">
+
+			<aui:translation-manager
+				availableLocales="<%= availableLocales %>"
+				defaultLanguageId="<%= defaultLanguageId %>"
+				id="translationManager"
+				initialize="<%= false %>"
+				readOnly="<%= false %>"
+			/>
+
+			<div class="diagram-builder form-builder" id="<portlet:namespace />formBuilder">
+				<div class="diagram-builder-content" id="<portlet:namespace />formBuilderContent">
+					<div class="tabbable">
+						<div class="tabbable-content">
+							<ul class="nav nav-tabs">
+								<li class="active">
+									<a href="javascript:;">
+										<liferay-ui:message key="fields" />
+									</a>
+								</li>
+								<li class="disabled">
+									<a href="javascript:;">
+										<liferay-ui:message key="settings" />
+									</a>
+								</li>
+							</ul>
+							<div class="tab-content">
+								<div class="tab-pane"></div>
+								<div class="tab-pane"></div>
+							</div>
+						</div>
+					</div>
+					<div class="diagram-builder-content-container">
+						<div class="diagram-builder-canvas">
+							<div class="diagram-builder-drop-container"></div>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+	</liferay-ui:section>
+
+	<liferay-ui:section>
+		<div class="form-builder-source-wrapper" id="<portlet:namespace />formBuilderSourceWrapper">
+			<div class="form-builder-source" id="<portlet:namespace />formBuilderEditor"></div>
+		</div>
+	</liferay-ui:section>
+</liferay-ui:tabs>
+
+<%
+JSONArray availableLocalesJSONArray = JSONFactoryUtil.createJSONArray();
+
+for (int i = 0; i < availableLocales.length; i++) {
+	availableLocalesJSONArray.put(LanguageUtil.getLanguageId(availableLocales[i]));
+}
+
+JSONObject localesMapJSONObject = JSONFactoryUtil.createJSONObject();
+
+for (Locale availableLocale : LanguageUtil.getAvailableLocales(themeDisplay.getSiteGroupId())) {
+	localesMapJSONObject.put(LocaleUtil.toLanguageId(availableLocale), availableLocale.getDisplayName(locale));
+}
+%>
+
+<aui:script use="aui-datepicker-deprecated,event-custom-base,json,liferay-portlet-dynamic-data-lists,liferay-portlet-dynamic-data-mapping,liferay-portlet-dynamic-data-mapping-custom-fields,aui-tabview,aui-ace-editor,aui-loading-mask-deprecated,liferay-xml-formatter">
+	var Lang = A.Lang;
+
+	var MESSAGE_FAILURE = 0;
+
+	var MESSAGE_SUCCESS = 1;
+
+	var CSS_MESSAGE_ERROR = 'alert alert-error';
+
+	var CSS_MESSAGE_SUCCESS = 'alert alert-success';
+
+	var STR_VALUE = 'value';
+
+	var availableFields;
+	var formEditor;
+	var xmlFormatter;
+
+	var displayMessage = function(type, message) {
+		var messageContainer = A.one('#<portlet:namespace />messageContainer');
+
+		messageContainer.removeClass(CSS_MESSAGE_SUCCESS).removeClass(CSS_MESSAGE_ERROR);
+
+		var messageClass = CSS_MESSAGE_SUCCESS;
+
+		if (type === MESSAGE_FAILURE) {
+			messageClass = CSS_MESSAGE_ERROR;
+		}
+
+		messageContainer.addClass(messageClass);
+		messageContainer.html(message);
+
+		messageContainer.show();
+	};
+
+	var getContentXSD = function() {
+		var content;
+
+		if (formEditor && !isViewTabActive()) {
+			content = formEditor.get(STR_VALUE);
+		}
+		else {
+			content = formBuilder.getXSD();
+		}
+
+		return content;
+	};
+
+	var getFormEditor = function() {
+		if (!formEditor) {
+			formEditor = new A.AceEditor(
+				{
+					boundingBox: '#<portlet:namespace />formBuilderEditor',
+					height: 600,
+					mode: 'xml',
+					tabSize: 4,
+					width: 600
+				}
+			).render();
+		}
+
+		return formEditor;
+	};
+
+	var getLoadingMask = function(node) {
+		node = node || A.one('#<portlet:namespace />formBuilderTab');
+
+		node.plug(
+			A.LoadingMask,
+			{
+				background: '#000'
+			}
+		);
+
+		return node.loadingmask;
+	};
+
+	var getXMLFormatter = function() {
+		if (!xmlFormatter) {
+			xmlFormatter = new Liferay.XMLFormatter();
+		}
+
+		return xmlFormatter;
+	};
+
+	var isViewTabActive = function() {
+		return !A.one('#<portlet:namespace />formBuilderTab').ancestor().hasClass('hide');
+	};
+
+	var reloadFormBuilderData = function(content) {
+		getLoadingMask().toggle(true);
+
+		if (!Lang.isValue(content)) {
+			content = window.<portlet:namespace />getContentXSD();
+		}
+
+		content = xmlFormatter.minify(content);
+
+		A.io.request(
+			themeDisplay.getPathMain() + '/dynamic_data_mapping/get_structure_json',
+			{
+				data: {
+					xsd: content
+				},
+				dataType: 'json',
+				on: {
+					failure: function(message) {
+						displayMessage(MESSAGE_FAILURE, '<%= UnicodeLanguageUtil.get(pageContext, "your-request-failed-to-complete") %>');
+					},
+					success: function(event) {
+						var responseData = this.get('responseData');
+
+						if (Lang.isArray(responseData)) {
+							formBuilder.set('fields', responseData);
+						}
+						else if (Lang.isObject(responseData)) {
+							displayMessage(MESSAGE_FAILURE, responseData.exception);
+						}
+
+						getLoadingMask().toggle(false);
+					}
+				}
+			}
+		);
+	};
+
+	var setEditorSize = function() {
+		if (!isViewTabActive()) {
+			getFormEditor().set('width', A.one('#<portlet:namespace />formBuilderSourceWrapper').get('clientWidth'));
+		}
+	}
+
+	var switchToSource = function() {
+		setEditorSize();
+
+		var content = formBuilder.getXSD();
+
+		content = getXMLFormatter().format(content);
+
+		getFormEditor().set(STR_VALUE, content);
+	};
+
+	var switchToView = function() {
+		reloadFormBuilderData(formEditor.get(STR_VALUE));
+	};
+
+	<c:if test="<%= Validator.isNotNull(scopeAvailableFields) %>">
+		availableFields = A.Object.getValue(window, '<%= HtmlUtil.escapeJS(scopeAvailableFields) %>'.split('.'));
+
+		if (A.Lang.isFunction(availableFields)) {
+			availableFields = availableFields(A, Liferay.FormBuilder);
+		}
+	</c:if>
+
+	var formBuilder = new Liferay.FormBuilder(
+		{
+			allowRemoveRequiredFields: true,
+			availableFields: availableFields,
+			boundingBox: '#<portlet:namespace />formBuilder',
+			enableEditing: false,
+
+			<c:if test="<%= scriptJSONArray != null %>">
+				fields: <%= scriptJSONArray.toString() %>,
+			</c:if>
+
+			portletNamespace: '<portlet:namespace />',
+			portletResourceNamespace: '<%= HtmlUtil.escapeJS(portletResourceNamespace) %>',
+
+			translationManager: {
+
+				<c:if test="<%= availableLocalesJSONArray.length() > 0 %>">
+					availableLocales: <%= availableLocalesJSONArray.toString() %>,
+				</c:if>
+
+				boundingBox: '#<portlet:namespace />translationManager',
+				defaultLocale: '<%= defaultLanguageId %>',
+				localesMap: <%= localesMapJSONObject.toString() %>,
+				srcNode: '#<portlet:namespace />translationManager .lfr-translation-manager-content'
+			},
+
+			srcNode: '#<portlet:namespace />formBuilderContent'
+		}
+	).render();
+
+	var dialog = Liferay.Util.getWindow();
+
+	if (dialog) {
+		dialog.after('widthChange', setEditorSize);
+	}
+
+	Liferay.after(
+		'showTab',
+		function(event) {
+			if (isViewTabActive()) {
+				switchToView();
+			}
+			else {
+				switchToSource();
+			}
+		}
+	);
+
+	window.<portlet:namespace />formBuilder = formBuilder;
+
+	window.<portlet:namespace />getContentXSD = getContentXSD;
+
+	Liferay.on(
+		'<portlet:namespace />saveTemplate',
+		function(event) {
+			A.one('#<portlet:namespace />scriptContent').val(getContentXSD());
+		}
+	);
+
+	Liferay.fire(
+		'<portlet:namespace />formBuilderLoaded',
+		{
+			formBuilder: formBuilder
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/init.jsp
new file mode 100644
index 0000000..2e841c4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/init.jsp
@@ -0,0 +1,96 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.kernel.editor.EditorUtil" %><%@
+page import="com.liferay.portal.kernel.template.TemplateConstants" %><%@
+page import="com.liferay.portal.kernel.template.TemplateVariableDefinition" %><%@
+page import="com.liferay.portal.kernel.template.TemplateVariableGroup" %><%@
+page import="com.liferay.portal.kernel.template.comparator.TemplateHandlerComparator" %><%@
+page import="com.liferay.portal.template.TemplateContextHelper" %><%@
+page import="com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata" %><%@
+page import="com.liferay.portlet.dynamicdatalists.model.DDLRecordSet" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.RequiredStructureException" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.RequiredTemplateException" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.StructureDuplicateElementException" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.StructureFieldException" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.StructureNameException" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.StructureXsdException" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.TemplateNameException" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.TemplateScriptException" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.TemplateSmallImageNameException" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.TemplateSmallImageSizeException" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.search.StructureDisplayTerms" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.search.StructureSearch" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.search.StructureSearchTerms" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.search.TemplateDisplayTerms" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.search.TemplateSearch" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.search.TemplateSearchTerms" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.service.DDMStorageLinkLocalServiceUtil" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.service.DDMStructureServiceUtil" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.service.DDMTemplateServiceUtil" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.service.permission.DDMPermission" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.service.permission.DDMStructurePermission" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.storage.StorageType" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.util.DDMDisplay" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.util.DDMDisplayRegistryUtil" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.util.DDMTemplateHelperUtil" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.util.DDMUtil" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.util.DDMXSDUtil" %>
+
+<%@ page import="java.util.StringTokenizer" %>
+
+<%
+PortalPreferences portalPreferences = PortletPreferencesFactoryUtil.getPortalPreferences(request);
+
+String refererPortletName = ParamUtil.getString(request, "refererPortletName", portletName);
+String refererWebDAVToken = ParamUtil.getString(request, "refererWebDAVToken", portletConfig.getInitParameter("refererWebDAVToken"));
+String scopeTitle = ParamUtil.getString(request, "scopeTitle");
+boolean showGlobalScope = ParamUtil.getBoolean(request, "showGlobalScope");
+boolean showManageTemplates = ParamUtil.getBoolean(request, "showManageTemplates", true);
+boolean showToolbar = ParamUtil.getBoolean(request, "showToolbar", true);
+
+DDMDisplay ddmDisplay = DDMDisplayRegistryUtil.getDDMDisplay(refererPortletName);
+
+long scopeClassNameId = PortalUtil.getClassNameId(ddmDisplay.getStructureType());
+
+String scopeAvailableFields = ddmDisplay.getAvailableFields();
+String scopeStorageType = ddmDisplay.getStorageType();
+String scopeTemplateType = ddmDisplay.getTemplateType();
+
+String storageTypeValue = StringPool.BLANK;
+
+if (scopeStorageType.equals("expando")) {
+	storageTypeValue = StorageType.EXPANDO.getValue();
+}
+else if (scopeStorageType.equals("xml")) {
+	storageTypeValue = StorageType.XML.getValue();
+}
+
+String templateTypeValue = StringPool.BLANK;
+
+if (scopeTemplateType.equals(DDMTemplateConstants.TEMPLATE_TYPE_DISPLAY)) {
+	templateTypeValue = DDMTemplateConstants.TEMPLATE_TYPE_DISPLAY;
+}
+else if (scopeTemplateType.equals(DDMTemplateConstants.TEMPLATE_TYPE_FORM)) {
+	templateTypeValue = DDMTemplateConstants.TEMPLATE_TYPE_FORM;
+}
+%>
+
+<%@ include file="/html/portlet/dynamic_data_mapping/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/js/main.js b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/js/main.js
new file mode 100644
index 0000000..4cf7503
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/js/main.js
@@ -0,0 +1,842 @@
+AUI.add(
+	'liferay-portlet-dynamic-data-mapping',
+	function(A) {
+		var AArray = A.Array;
+		var Lang = A.Lang;
+		var FormBuilderField = A.FormBuilderField;
+
+		var instanceOf = A.instanceOf;
+		var isObject = Lang.isObject;
+
+		var DEFAULTS_FORM_VALIDATOR = A.config.FormValidator;
+
+		var LOCALIZABLE_FIELD_ATTRS = ['label', 'predefinedValue', 'tip'];
+
+		var MAP_HIDDEN_FIELD_ATTRS = {
+			checkbox: ['readOnly', 'required'],
+
+			DEFAULT: ['readOnly']
+		};
+
+		var STR_BLANK = '';
+
+		var MAP_ELEMENT_DATA = {
+			attributeList: STR_BLANK,
+			nodeName: STR_BLANK
+		};
+
+		var STR_CDATA_CLOSE = ']]>';
+
+		var STR_CDATA_OPEN = '<![CDATA[';
+
+		var STR_SPACE = ' ';
+
+		var TPL_ELEMENT = '<{nodeName}{attributeList}></{nodeName}>';
+
+		var XML_ATTRIBUTES_FIELD_ATTRS = {
+			dataType: 1,
+			indexType: 1,
+			multiple: 1,
+			name: 1,
+			options: 1,
+			readOnly: 1,
+			repeatable: 1,
+			required: 1,
+			showLabel: 1,
+			type: 1,
+			width: 1
+		};
+
+		DEFAULTS_FORM_VALIDATOR.STRINGS.structureFieldName = Liferay.Language.get('please-enter-only-alphanumeric-characters');
+
+		DEFAULTS_FORM_VALIDATOR.RULES.structureFieldName = function(value) {
+			return (/^[\w\-]+$/).test(value);
+		};
+
+		var LiferayAvailableField = A.Component.create(
+			{
+				ATTRS: {
+					localizationMap: {
+						validator: isObject,
+						value: {}
+					}
+				},
+
+				NAME: 'availableField',
+
+				EXTENDS: A.FormBuilderAvailableField
+			}
+		);
+
+		A.LiferayAvailableField = LiferayAvailableField;
+
+		var LiferayFormBuilder = A.Component.create(
+			{
+				ATTRS: {
+					availableFields: {
+						validator: isObject,
+						valueFn: function() {
+							return LiferayFormBuilder.AVAILABLE_FIELDS.DEFAULT;
+						}
+					},
+
+					portletNamespace: {
+						value: STR_BLANK
+					},
+
+					portletResourceNamespace: {
+						value: STR_BLANK
+					},
+
+					translationManager: {
+						validator: isObject,
+						value: {}
+					},
+
+					validator: {
+						setter: function(val) {
+							var instance = this;
+
+							var config = A.merge(
+								{
+									rules: {
+										name: {
+											required: true,
+											structureFieldName: true
+										}
+									},
+									fieldStrings: {
+										name: {
+											required: Liferay.Language.get('this-field-is-required')
+										}
+									}
+								},
+								val
+							);
+
+							return config;
+						},
+						value: {}
+					},
+
+					strings: {
+						value: {
+							addNode: Liferay.Language.get('add-field'),
+							button: Liferay.Language.get('button'),
+							buttonType: Liferay.Language.get('button-type'),
+							close: Liferay.Language.get('close'),
+							deleteFieldsMessage: Liferay.Language.get('are-you-sure-you-want-to-delete-the-selected-entries'),
+							duplicateMessage: Liferay.Language.get('duplicate'),
+							editMessage: Liferay.Language.get('edit'),
+							label: Liferay.Language.get('field-label'),
+							large: Liferay.Language.get('large'),
+							medium: Liferay.Language.get('medium'),
+							multiple: Liferay.Language.get('multiple'),
+							name: Liferay.Language.get('name'),
+							no: Liferay.Language.get('no'),
+							options: Liferay.Language.get('options'),
+							predefinedValue: Liferay.Language.get('predefined-value'),
+							propertyName: Liferay.Language.get('property-name'),
+							required: Liferay.Language.get('required'),
+							reset: Liferay.Language.get('reset'),
+							save: Liferay.Language.get('save'),
+							settings: Liferay.Language.get('settings'),
+							showLabel: Liferay.Language.get('show-label'),
+							small: Liferay.Language.get('small'),
+							submit: Liferay.Language.get('submit'),
+							tip: Liferay.Language.get('tip'),
+							type: Liferay.Language.get('type'),
+							value: Liferay.Language.get('value'),
+							width: Liferay.Language.get('width'),
+							yes: Liferay.Language.get('yes')
+						}
+					}
+				},
+
+				EXTENDS: A.FormBuilder,
+
+				NAME: 'liferayformbuilder',
+
+				prototype: {
+					initializer: function() {
+						var instance = this;
+
+						instance.LOCALIZABLE_FIELD_ATTRS = A.Array(LOCALIZABLE_FIELD_ATTRS);
+						instance.MAP_HIDDEN_FIELD_ATTRS = A.clone(MAP_HIDDEN_FIELD_ATTRS);
+
+						var translationManager = instance.translationManager = new Liferay.TranslationManager(instance.get('translationManager'));
+
+						instance.after(
+							'render',
+							function(event) {
+								translationManager.render();
+							}
+						);
+
+						instance.addTarget(Liferay.Util.getOpener().Liferay);
+					},
+
+					bindUI: function() {
+						var instance = this;
+
+						LiferayFormBuilder.superclass.bindUI.apply(instance, arguments);
+
+						instance.translationManager.after('editingLocaleChange', instance._afterEditingLocaleChange, instance);
+					},
+
+					createField: function() {
+						var instance = this;
+
+						var field = LiferayFormBuilder.superclass.createField.apply(instance, arguments);
+
+						field.set('readOnlyAttributes', instance._getReadOnlyFieldAttributes(field));
+						field.set('strings', instance.get('strings'));
+
+						return field;
+					},
+
+					getContentXSD: function() {
+						var instance = this;
+
+						return window[instance.get('portletNamespace') + 'getContentXSD']();
+					},
+
+					getFieldLocalizedValue: function(field, attribute, locale) {
+						var instance = this;
+
+						var localizationMap = field.get('localizationMap');
+
+						var value = A.Object.getValue(localizationMap, [locale, attribute]) || field.get(attribute);
+
+						return instance.normalizeValue(value);
+					},
+
+					getXSD: function() {
+						var instance = this;
+
+						var buffer = [];
+
+						var translationManager = instance.translationManager;
+
+						var editingLocale = translationManager.get('editingLocale');
+
+						instance._updateFieldsLocalizationMap(editingLocale);
+
+						var root = instance._createDynamicNode(
+							'root',
+							{
+								'available-locales': translationManager.get('availableLocales').join(),
+								'default-locale': translationManager.get('defaultLocale')
+							}
+						);
+
+						buffer.push(root.openTag);
+
+						instance.get('fields').each(
+							function(item, index, collection) {
+								instance._appendStructureTypeElementAndMetaData(item, buffer);
+							}
+						);
+
+						buffer.push(root.closeTag);
+
+						return buffer.join(STR_BLANK);
+					},
+
+					normalizeValue: function(value) {
+						var instance = this;
+
+						if (Lang.isUndefined(value)) {
+							value = STR_BLANK;
+						}
+
+						return value;
+					},
+
+					_afterEditingLocaleChange: function(event) {
+						var instance = this;
+
+						var editingField = instance.editingField;
+
+						if (editingField) {
+							editingField.set('readOnlyAttributes', instance._getReadOnlyFieldAttributes(editingField));
+						}
+
+						instance._updateFieldsLocalizationMap(event.prevVal);
+
+						instance._syncFieldsLocaleUI(event.newVal);
+					},
+
+					_appendStructureChildren: function(field, buffer) {
+						var instance = this;
+
+						field.get('fields').each(
+							function(item, index, collection) {
+								instance._appendStructureTypeElementAndMetaData(item, buffer);
+							}
+						);
+					},
+
+					_appendStructureFieldOptionsBuffer: function(field, buffer) {
+						var instance = this;
+
+						var options = field.get('options');
+
+						if (options) {
+							AArray.each(
+								options,
+								function(item, index, collection) {
+									var name = item.name;
+
+									if (!name) {
+										name = A.FormBuilderField.buildFieldName('option');
+									}
+
+									var typeElementOption = instance._createDynamicNode(
+										'dynamic-element',
+										{
+											name: name,
+											type: 'option',
+											value: Liferay.Util.escapeHTML(item.value)
+										}
+									);
+
+									buffer.push(typeElementOption.openTag);
+
+									instance._appendStructureOptionMetaData(item, buffer);
+
+									buffer.push(typeElementOption.closeTag);
+								}
+							);
+						}
+					},
+
+					_appendStructureOptionMetaData: function(option, buffer) {
+						var instance = this;
+
+						var localizationMap = option.localizationMap;
+
+						var labelTag = instance._createDynamicNode(
+							'entry',
+							{
+								name: 'label'
+							}
+						);
+
+						A.each(
+							localizationMap,
+							function(item, index, collection) {
+								if (isObject(item)) {
+									var metadataTag = instance._createDynamicNode(
+										'meta-data',
+										{
+											locale: index
+										}
+									);
+
+									var labelVal = instance.normalizeValue(item.label);
+
+									buffer.push(
+										metadataTag.openTag,
+										labelTag.openTag,
+										STR_CDATA_OPEN + labelVal + STR_CDATA_CLOSE,
+										labelTag.closeTag,
+										metadataTag.closeTag
+									);
+								}
+							}
+						);
+					},
+
+					_appendStructureTypeElementAndMetaData: function(field, buffer) {
+						var instance = this;
+
+						var typeElement = instance._createDynamicNode(
+							'dynamic-element',
+							{
+								dataType: field.get('dataType'),
+								fieldNamespace: field.get('fieldNamespace'),
+								indexType: field.get('indexType'),
+								multiple: field.get('multiple'),
+								name: field.get('name'),
+								readOnly: field.get('readOnly'),
+								repeatable: field.get('repeatable'),
+								required: field.get('required'),
+								showLabel: field.get('showLabel'),
+								type: field.get('type'),
+								width: field.get('width')
+							}
+						);
+
+						buffer.push(typeElement.openTag);
+
+						instance._appendStructureFieldOptionsBuffer(field, buffer);
+
+						instance._appendStructureChildren(field, buffer);
+
+						var availableLocales = instance.translationManager.get('availableLocales');
+
+						AArray.each(
+							availableLocales,
+							function(item1, index1, collection1) {
+								var metadata = instance._createDynamicNode(
+									'meta-data',
+									{
+										locale: item1
+									}
+								);
+
+								buffer.push(metadata.openTag);
+
+								AArray.each(
+									field.getProperties(),
+									function(item2, index2, collection2) {
+										var attributeName = item2.attributeName;
+
+										if (!XML_ATTRIBUTES_FIELD_ATTRS[attributeName]) {
+											var attributeTag = instance._createDynamicNode(
+												'entry',
+												{
+													name: attributeName
+												}
+											);
+
+											var attributeValue = instance.getFieldLocalizedValue(field, attributeName, item1);
+
+											if ((attributeName === 'predefinedValue') && instanceOf(field, A.FormBuilderMultipleChoiceField)) {
+												attributeValue = A.JSON.stringify(AArray(attributeValue));
+											}
+
+											buffer.push(
+												attributeTag.openTag,
+												STR_CDATA_OPEN + attributeValue + STR_CDATA_CLOSE,
+												attributeTag.closeTag
+											);
+										}
+									}
+								);
+
+								buffer.push(metadata.closeTag);
+							}
+						);
+
+						buffer.push(typeElement.closeTag);
+					},
+
+					_createDynamicNode: function(nodeName, attributeMap) {
+						var instance = this;
+
+						var attrs = [];
+						var typeElement = [];
+
+						if (!nodeName) {
+							nodeName = 'dynamic-element';
+						}
+
+						MAP_ELEMENT_DATA.attributeList = STR_BLANK;
+						MAP_ELEMENT_DATA.nodeName = nodeName;
+
+						if (attributeMap) {
+							A.each(
+								attributeMap,
+								function(item, index, collection) {
+									if (item !== undefined) {
+										attrs.push([index, '="', item, '" '].join(STR_BLANK));
+									}
+								}
+							);
+
+							MAP_ELEMENT_DATA.attributeList = STR_SPACE + attrs.join(STR_BLANK);
+						}
+
+						typeElement = Lang.sub(TPL_ELEMENT, MAP_ELEMENT_DATA);
+						typeElement = typeElement.replace(/\s?(>)(<)/, '$1$1$2$2').split(/></);
+
+						return {
+							closeTag: typeElement[1],
+							openTag: typeElement[0]
+						};
+					},
+
+					_getReadOnlyFieldAttributes: function(field) {
+						var instance = this;
+
+						var translationManager = instance.translationManager;
+
+						var editingLocale = translationManager.get('editingLocale');
+
+						var readOnlyAttributes = field.get('readOnlyAttributes');
+
+						if (editingLocale === translationManager.get('defaultLocale')) {
+							AArray.removeItem(readOnlyAttributes, 'name');
+						}
+						else if (AArray.indexOf(readOnlyAttributes, 'name') === -1) {
+							readOnlyAttributes.push('name');
+						}
+
+						return readOnlyAttributes;
+					},
+
+					_onPropertyModelChange: function(event) {
+						var instance = this;
+
+						var changed = event.changed;
+
+						var attributeName = event.target.get('attributeName');
+
+						var editingField = instance.editingField;
+
+						var readOnlyAttributes = editingField.get('readOnlyAttributes');
+
+						if (changed.hasOwnProperty('value') && (A.Array.indexOf(readOnlyAttributes, 'name') === -1)) {
+							if (attributeName === 'name') {
+								editingField.set('autoGeneratedName', event.autoGeneratedName === true);
+							}
+							else if ((attributeName === 'label') && editingField.get('autoGeneratedName')) {
+								var translationManager = instance.translationManager;
+
+								if (translationManager.get('editingLocale') === translationManager.get('defaultLocale')) {
+									var label = changed.value.newVal;
+
+									editingField.set('name', label);
+
+									var modelList = instance.propertyList.get('data');
+
+									var nameModel = modelList.filter(
+										function(item, index, collection) {
+											return (item.get('attributeName') === 'name');
+										}
+									);
+
+									if (nameModel.length) {
+										nameModel[0].set(
+											'value',
+											editingField.get('name'),
+											{
+												autoGeneratedName: true
+											}
+										);
+									}
+								}
+							}
+						}
+					},
+
+					_renderSettings: function() {
+						var instance = this;
+
+						LiferayFormBuilder.superclass._renderSettings.apply(instance, arguments);
+
+						instance.propertyList.on('model:change', instance._onPropertyModelChange, instance);
+					},
+
+					_setAvailableFields: function(val) {
+						var instance = this;
+
+						var fields = AArray.map(
+							val,
+							function(item, index, collection) {
+								return A.instanceOf(item, A.AvailableField) ? item : new A.LiferayAvailableField(item);
+							}
+						);
+
+						fields.sort(
+							function(a, b) {
+								return A.ArraySort.compare(a.get('label'), b.get('label'));
+							}
+						);
+
+						return fields;
+					},
+
+					_syncFieldOptionsLocaleUI: function(field, locale) {
+						var instance = this;
+
+						var options = field.get('options');
+
+						AArray.each(
+							options,
+							function(item, index, collection) {
+								var localizationMap = item.localizationMap;
+
+								if (isObject(localizationMap)) {
+									var localeMap = localizationMap[locale];
+
+									if (isObject(localeMap)) {
+										item.label = localeMap.label;
+									}
+								}
+							}
+						);
+
+						field.set('options', options);
+					},
+
+					_syncFieldsLocaleUI: function(locale, fields) {
+						var instance = this;
+
+						fields = fields || instance.get('fields');
+
+						fields.each(
+							function(field, index, fields) {
+								if (instanceOf(field, A.FormBuilderMultipleChoiceField)) {
+									instance._syncFieldOptionsLocaleUI(field, locale);
+								}
+
+								var localizationMap = field.get('localizationMap');
+								var localeMap = localizationMap[locale];
+
+								if (isObject(localizationMap) && isObject(localeMap)) {
+									AArray.each(
+										instance.LOCALIZABLE_FIELD_ATTRS,
+										function(item, index, collection) {
+											field.set(item, localeMap[item]);
+										}
+									);
+
+									instance._syncUniqueField(field);
+								}
+
+								if (instance.editingField === field) {
+									instance.propertyList.set('data', field.getProperties());
+								}
+
+								instance._syncFieldsLocaleUI(locale, field.get('fields'));
+							}
+						);
+					},
+
+					_updateFieldOptionsLocalizationMap: function(field, locale) {
+						var instance = this;
+
+						var options = field.get('options');
+
+						AArray.each(
+							options,
+							function(item, index, collection) {
+								var localizationMap = item.localizationMap;
+
+								if (!isObject(localizationMap)) {
+									localizationMap = {};
+								}
+
+								localizationMap[locale] = {
+									label: item.label
+								};
+
+								item.localizationMap = localizationMap;
+							}
+						);
+
+						field.set('options', options);
+					},
+
+					_updateFieldsLocalizationMap: function(locale, fields) {
+						var instance = this;
+
+						fields = fields || instance.get('fields');
+
+						fields.each(
+							function(item, index, collection) {
+								var localizationMap = {};
+
+								localizationMap[locale] = item.getAttrs(instance.LOCALIZABLE_FIELD_ATTRS);
+
+								item.set(
+									'localizationMap',
+									A.mix(
+										localizationMap,
+										item.get('localizationMap')
+									)
+								);
+
+								if (instanceOf(item, A.FormBuilderMultipleChoiceField)) {
+									instance._updateFieldOptionsLocalizationMap(item, locale);
+								}
+
+								instance._updateFieldsLocalizationMap(locale, item.get('fields'));
+							}
+						);
+					}
+				},
+
+				normalizeKey: function(str) {
+					A.each(
+						str,
+						function(item, index, collection) {
+							if (!A.Text.Unicode.test(item, 'L') && !A.Text.Unicode.test(item, 'N') && !A.Text.Unicode.test(item,'Pd')) {
+								str = str.replace(item, STR_SPACE);
+							}
+						}
+					);
+
+					return str.replace(/\s/g, '_');
+				}
+			}
+		);
+
+		LiferayFormBuilder.DEFAULT_ICON_CLASS = 'icon-fb-custom-field';
+
+		var AVAILABLE_FIELDS = {
+			DEFAULT: [
+				{
+					fieldLabel: Liferay.Language.get('button'),
+					iconClass: 'form-builder-field-icon form-builder-field-icon-button',
+					label: Liferay.Language.get('button'),
+					type: 'button'
+				},
+				{
+					fieldLabel: Liferay.Language.get('checkbox'),
+					iconClass: 'icon-fb-boolean',
+					label: Liferay.Language.get('checkbox'),
+					type: 'checkbox'
+				},
+				{
+					fieldLabel: Liferay.Language.get('fieldset'),
+					iconClass: 'form-builder-field-icon form-builder-field-icon-fieldset',
+					label: Liferay.Language.get('fieldset'),
+					type: 'fieldset'
+				},
+				{
+					fieldLabel: Liferay.Language.get('text-box'),
+					iconClass: 'icon-fb-text',
+					label: Liferay.Language.get('text-box'),
+					type: 'text'
+				},
+				{
+					fieldLabel: Liferay.Language.get('text-area'),
+					iconClass: 'icon-fb-text-box',
+					label: Liferay.Language.get('text-area'),
+					type: 'textarea'
+				},
+				{
+					fieldLabel: Liferay.Language.get('radio-buttons'),
+					iconClass: 'icon-fb-radio',
+					label: Liferay.Language.get('radio-buttons'),
+					type: 'radio'
+				},
+				{
+					fieldLabel: Liferay.Language.get('select-option'),
+					iconClass: 'icon-fb-select',
+					label: Liferay.Language.get('select-option'),
+					type: 'select'
+				}
+			],
+
+			DDM_STRUCTURE: [
+				{
+					hiddenAttributes: MAP_HIDDEN_FIELD_ATTRS.checkbox,
+					iconClass: 'icon-fb-boolean',
+					label: Liferay.Language.get('boolean'),
+					type: 'checkbox'
+				},
+				{
+					hiddenAttributes: MAP_HIDDEN_FIELD_ATTRS.DEFAULT,
+					iconClass: 'icon-calendar',
+					label: Liferay.Language.get('date'),
+					type: 'ddm-date'
+				},
+				{
+					hiddenAttributes: MAP_HIDDEN_FIELD_ATTRS.DEFAULT,
+					iconClass: 'icon-fb-decimal',
+					label: Liferay.Language.get('decimal'),
+					type: 'ddm-decimal'
+				},
+				{
+					hiddenAttributes: MAP_HIDDEN_FIELD_ATTRS.DEFAULT,
+					iconClass: 'icon-file-text',
+					label: Liferay.Language.get('documents-and-media'),
+					type: 'ddm-documentlibrary'
+				},
+				{
+					hiddenAttributes: MAP_HIDDEN_FIELD_ATTRS.DEFAULT,
+					iconClass: 'icon-edit-sign',
+					label: Liferay.Language.get('html'),
+					type: 'ddm-text-html'
+				},
+				{
+					hiddenAttributes: MAP_HIDDEN_FIELD_ATTRS.DEFAULT,
+					iconClass: 'icon-fb-integer',
+					label: Liferay.Language.get('integer'),
+					type: 'ddm-integer'
+				},
+				{
+					hiddenAttributes: MAP_HIDDEN_FIELD_ATTRS.DEFAULT,
+					iconClass: 'icon-link',
+					label: Liferay.Language.get('link-to-page'),
+					type: 'ddm-link-to-page'
+				},
+				{
+					hiddenAttributes: MAP_HIDDEN_FIELD_ATTRS.DEFAULT,
+					iconClass: 'icon-fb-number',
+					label: Liferay.Language.get('number'),
+					type: 'ddm-number'
+				},
+				{
+					hiddenAttributes: MAP_HIDDEN_FIELD_ATTRS.DEFAULT,
+					iconClass: 'icon-fb-radio',
+					label: Liferay.Language.get('radio'),
+					type: 'radio'
+				},
+				{
+					hiddenAttributes: MAP_HIDDEN_FIELD_ATTRS.DEFAULT,
+					iconClass: 'icon-fb-select',
+					label: Liferay.Language.get('select'),
+					type: 'select'
+				},
+				{
+					hiddenAttributes: MAP_HIDDEN_FIELD_ATTRS.DEFAULT,
+					iconClass: 'icon-fb-text',
+					label: Liferay.Language.get('text'),
+					type: 'text'
+				},
+				{
+					hiddenAttributes: MAP_HIDDEN_FIELD_ATTRS.DEFAULT,
+					iconClass: 'icon-fb-text-box',
+					label: Liferay.Language.get('text-box'),
+					type: 'textarea'
+				}
+			],
+
+			DDM_TEMPLATE: [
+				{
+					hiddenAttributes: MAP_HIDDEN_FIELD_ATTRS.DEFAULT,
+					iconClass: 'icon-fb-paragraph',
+					label: Liferay.Language.get('paragraph'),
+					type: 'ddm-paragraph'
+				},
+				{
+					hiddenAttributes: MAP_HIDDEN_FIELD_ATTRS.DEFAULT,
+					iconClass: 'icon-fb-separator',
+					label: Liferay.Language.get('separator'),
+					type: 'ddm-separator'
+				},
+				{
+					hiddenAttributes: MAP_HIDDEN_FIELD_ATTRS.DEFAULT,
+					iconClass: 'icon-fb-fieldset',
+					label: Liferay.Language.get('fieldset'),
+					type: 'fieldset'
+				}
+			],
+
+			WCM_STRUCTURE: [
+				{
+					hiddenAttributes: MAP_HIDDEN_FIELD_ATTRS.DEFAULT,
+					iconClass: 'icon-picture',
+					label: Liferay.Language.get('image'),
+					type: 'wcm-image'
+				}
+			]
+		};
+
+		AVAILABLE_FIELDS.WCM_STRUCTURE = AVAILABLE_FIELDS.WCM_STRUCTURE.concat(AVAILABLE_FIELDS.DDM_STRUCTURE);
+
+		LiferayFormBuilder.AVAILABLE_FIELDS = AVAILABLE_FIELDS;
+
+		Liferay.FormBuilder = LiferayFormBuilder;
+	},
+	'',
+	{
+		requires: ['aui-form-builder', 'aui-form-validator', 'aui-text-unicode', 'json', 'liferay-menu', 'liferay-translation-manager', 'text']
+	}
+);
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/select_document_library.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/select_document_library.jsp
new file mode 100644
index 0000000..947e3f7
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/select_document_library.jsp
@@ -0,0 +1,356 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/document_library_display/init.jsp" %>
+
+<%
+long groupId = ParamUtil.getLong(request, FileEntryDisplayTerms.SELECTED_GROUP_ID);
+
+if (groupId == 0) {
+	groupId = ParamUtil.getLong(request, "groupId");
+}
+
+Folder folder = (Folder)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FOLDER);
+
+long folderId = BeanParamUtil.getLong(folder, request, "folderId", DLFolderConstants.DEFAULT_PARENT_FOLDER_ID);
+
+if ((folder != null) && (folder.getGroupId() != groupId)) {
+	folder = null;
+
+	folderId = 0;
+}
+
+long searchFolderIds = ParamUtil.getLong(request, "searchFolderIds");
+
+long[] folderIdsArray = null;
+
+if (folderId > 0) {
+	folderIdsArray = new long[] {folderId};
+
+	folder = DLAppServiceUtil.getFolder(folderId);
+}
+else {
+	long defaultFolderId = DLFolderConstants.getFolderId(groupId, DLFolderConstants.getDataRepositoryId(groupId, searchFolderIds));
+
+	List<Long> folderIds = DLAppServiceUtil.getSubfolderIds(groupId, searchFolderIds);
+
+	folderIds.add(0, defaultFolderId);
+
+	folderIdsArray = StringUtil.split(StringUtil.merge(folderIds), 0L);
+}
+
+long repositoryId = groupId;
+
+if (folder != null) {
+	repositoryId = folder.getRepositoryId();
+
+	DLUtil.addPortletBreadcrumbEntries(folder, request, renderResponse);
+}
+
+int entryStart = ParamUtil.getInteger(request, "entryStart");
+int entryEnd = ParamUtil.getInteger(request, "entryEnd", PropsValues.SEARCH_CONTAINER_PAGE_DEFAULT_DELTA);
+
+String keywords = ParamUtil.getString(request, "keywords");
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/dynamic_data_mapping/select_document_library");
+portletURL.setParameter("groupId", String.valueOf(groupId));
+portletURL.setParameter("folderId", String.valueOf(folderId));
+%>
+
+<aui:form method="post" name="fm">
+
+	<%
+	FileEntrySearch fileEntrySearchContainer = new FileEntrySearch(renderRequest, portletURL);
+
+	FileEntryDisplayTerms displayTerms = (FileEntryDisplayTerms)fileEntrySearchContainer.getDisplayTerms();
+
+	displayTerms.setSelectedGroupId(groupId);
+	%>
+
+	<liferay-ui:search-form
+		page="/html/portlet/dynamic_data_mapping/file_entry_search.jsp"
+		searchContainer="<%= fileEntrySearchContainer %>"
+	/>
+
+	<c:if test="<%= Validator.isNull(displayTerms.getKeywords()) %>">
+		<liferay-ui:header
+			title="folders"
+		/>
+
+		<liferay-ui:breadcrumb showGuestGroup="<%= false %>" showLayout="<%= false %>" showParentGroups="<%= false %>" />
+
+		<div class="helper-clearfix">
+			<liferay-ui:icon-menu cssClass="lfr-document-library-add-menu" icon='<%= themeDisplay.getPathThemeImages() + "/common/add.png" %>' message="add">
+				<c:if test="<%= DLFolderPermission.contains(permissionChecker, scopeGroupId, folderId, ActionKeys.ADD_FOLDER) %>">
+					<liferay-portlet:renderURL portletName="<%= PortletKeys.DOCUMENT_LIBRARY %>" var="addFolderURL">
+						<portlet:param name="struts_action" value="/document_library/edit_folder" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+						<portlet:param name="repositoryId" value="<%= String.valueOf(repositoryId) %>" />
+						<portlet:param name="parentFolderId" value="<%= String.valueOf(folderId) %>" />
+					</liferay-portlet:renderURL>
+
+					<liferay-ui:icon image="folder" message='<%= (folder != null) ? "subfolder" : "folder" %>' url="<%= addFolderURL %>" />
+				</c:if>
+
+				<c:if test="<%= DLFolderPermission.contains(permissionChecker, scopeGroupId, folderId, ActionKeys.ADD_DOCUMENT) %>">
+
+					<%
+					List<DLFileEntryType> fileEntryTypes = Collections.emptyList();
+
+					if ((folder == null) || folder.isSupportsMetadata()) {
+						fileEntryTypes = DLFileEntryTypeLocalServiceUtil.getFolderFileEntryTypes(PortalUtil.getSiteAndCompanyGroupIds(themeDisplay), folderId, true);
+					}
+					%>
+
+					<c:if test="<%= fileEntryTypes.isEmpty() %>">
+						<liferay-portlet:renderURL portletName="<%= PortletKeys.DOCUMENT_LIBRARY %>" var="editFileEntryURL">
+							<portlet:param name="struts_action" value="/document_library/edit_file_entry" />
+							<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ADD %>" />
+							<portlet:param name="redirect" value="<%= currentURL %>" />
+							<portlet:param name="backURL" value="<%= currentURL %>" />
+							<portlet:param name="repositoryId" value="<%= String.valueOf(repositoryId) %>" />
+							<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+						</liferay-portlet:renderURL>
+
+						<liferay-ui:icon image="copy" message="basic-document" url="<%= editFileEntryURL %>" />
+					</c:if>
+
+					<%
+					for (DLFileEntryType fileEntryType : fileEntryTypes) {
+					%>
+
+						<liferay-portlet:renderURL portletName="<%= PortletKeys.DOCUMENT_LIBRARY %>" var="addFileEntryTypeURL">
+							<portlet:param name="struts_action" value="/document_library/edit_file_entry" />
+							<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ADD %>" />
+							<portlet:param name="redirect" value="<%= currentURL %>" />
+							<portlet:param name="repositoryId" value="<%= String.valueOf(repositoryId) %>" />
+							<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+							<portlet:param name="fileEntryTypeId" value="<%= String.valueOf(fileEntryType.getFileEntryTypeId()) %>" />
+						</liferay-portlet:renderURL>
+
+						<liferay-ui:icon image="copy" message="<%= HtmlUtil.escape(fileEntryType.getName(locale)) %>" url="<%= addFileEntryTypeURL %>" />
+
+					<%
+					}
+					%>
+
+				</c:if>
+			</liferay-ui:icon-menu>
+		</div>
+
+		<%
+		List<String> headerNames = new ArrayList<String>();
+
+		headerNames.add("folder");
+		headerNames.add("num-of-folders");
+		headerNames.add("num-of-documents");
+
+		SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, "cur1", SearchContainer.DEFAULT_DELTA, portletURL, headerNames, "there-are-no-folders");
+
+		int total = DLAppServiceUtil.getFoldersCount(groupId, folderId);
+
+		searchContainer.setTotal(total);
+
+		List results = DLAppServiceUtil.getFolders(repositoryId, folderId, searchContainer.getStart(), searchContainer.getEnd());
+
+		searchContainer.setResults(results);
+
+		List resultRows = searchContainer.getResultRows();
+
+		for (int i = 0; i < results.size(); i++) {
+			Folder curFolder = (Folder)results.get(i);
+
+			ResultRow row = new ResultRow(curFolder, curFolder.getFolderId(), i);
+
+			PortletURL rowURL = renderResponse.createRenderURL();
+
+			rowURL.setParameter("struts_action", "/dynamic_data_mapping/select_document_library");
+			rowURL.setParameter("groupId", String.valueOf(groupId));
+			rowURL.setParameter("folderId", String.valueOf(curFolder.getFolderId()));
+
+			// Name
+
+			StringBundler sb = new StringBundler(4);
+
+			sb.append("<img align=\"left\" border=\"0\" src=\"");
+			sb.append(themeDisplay.getPathThemeImages());
+			sb.append("/common/folder.png\">");
+			sb.append(curFolder.getName());
+
+			row.addText(sb.toString(), rowURL);
+
+			// Statistics
+
+			List<Long> subfolderIds = DLAppServiceUtil.getSubfolderIds(curFolder.getRepositoryId(), curFolder.getFolderId(), false);
+
+			int foldersCount = subfolderIds.size();
+
+			subfolderIds.clear();
+			subfolderIds.add(curFolder.getFolderId());
+
+			int fileEntriesCount = DLAppServiceUtil.getFoldersFileEntriesCount(curFolder.getRepositoryId(), subfolderIds, WorkflowConstants.STATUS_APPROVED);
+
+			row.addText(String.valueOf(foldersCount), rowURL);
+			row.addText(String.valueOf(fileEntriesCount), rowURL);
+
+			// Add result row
+
+			resultRows.add(row);
+		}
+		%>
+
+		<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+
+		<br />
+	</c:if>
+
+	<c:choose>
+		<c:when test="<%= Validator.isNull(displayTerms.getKeywords()) %>">
+			<liferay-ui:header
+				title="documents"
+			/>
+		</c:when>
+		<c:otherwise>
+
+			<%
+			PortletURL backURL = renderResponse.createRenderURL();
+
+			backURL.setParameter("struts_action", "/dynamic_data_mapping/select_document_library");
+			backURL.setParameter("groupId", String.valueOf(groupId));
+			%>
+
+			<liferay-ui:header
+				backURL="<%= backURL.toString() %>"
+				title="documents"
+			/>
+		</c:otherwise>
+	</c:choose>
+
+	<%
+	List<String> headerNames = new ArrayList<String>();
+
+	headerNames.add("document");
+	headerNames.add("size");
+
+	if (PropsValues.DL_FILE_ENTRY_BUFFERED_INCREMENT_ENABLED) {
+		headerNames.add("downloads");
+	}
+
+	headerNames.add("locked");
+	headerNames.add(StringPool.BLANK);
+
+	if (Validator.isNull(displayTerms.getKeywords())) {
+		SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, "cur2", SearchContainer.DEFAULT_DELTA, portletURL, headerNames, "there-are-no-documents-in-this-folder");
+
+		int total = DLAppServiceUtil.getFileEntriesCount(groupId, folderId);
+
+		searchContainer.setTotal(total);
+
+		List results = DLAppServiceUtil.getFileEntries(repositoryId, folderId, searchContainer.getStart(), searchContainer.getEnd());
+
+		searchContainer.setResults(results);
+
+		List resultRows = searchContainer.getResultRows();
+	%>
+
+		<%@ include file="/html/portlet/dynamic_data_mapping/select_document_library_search_results.jspf" %>
+
+		<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+
+	<%
+	}
+	else {
+		PortletURL iteratorURL = renderResponse.createRenderURL();
+
+		iteratorURL.setParameter("struts_action", "/dynamic_data_mapping/select_document_library");
+		iteratorURL.setParameter("groupId", String.valueOf(groupId));
+		iteratorURL.setParameter("folderId", String.valueOf(folderId));
+
+		fileEntrySearchContainer = new FileEntrySearch(renderRequest, displayTerms, (FileEntrySearchTerms)fileEntrySearchContainer.getSearchTerms(), "cur2", SearchContainer.DEFAULT_DELTA, iteratorURL, headerNames, "there-are-no-documents-in-this-folder");
+
+		try {
+			SearchContext searchContext = SearchContextFactory.getInstance(request);
+
+			searchContext.setAttribute("groupId", groupId);
+			searchContext.setAttribute("paginationType", "regular");
+			searchContext.setEnd(entryEnd);
+			searchContext.setFolderIds(folderIdsArray);
+			searchContext.setGroupIds(new long[] {groupId});
+			searchContext.setKeywords(keywords);
+			searchContext.setStart(entryStart);
+
+			searchContext.setScopeStrict(false);
+
+			Hits hits = DLAppServiceUtil.search(repositoryId, searchContext);
+
+			fileEntrySearchContainer.setTotal(hits.getLength());
+
+			List results = new ArrayList();
+
+			Document[] docs = hits.getDocs();
+
+			if (docs != null) {
+				for (Document doc : docs) {
+					long fileEntryId = GetterUtil.getLong(doc.get(Field.ENTRY_CLASS_PK));
+
+					FileEntry fileEntry = null;
+
+					try {
+						fileEntry = DLAppLocalServiceUtil.getFileEntry(fileEntryId);
+					}
+					catch (Exception e) {
+						if (_log.isWarnEnabled()) {
+							_log.warn("Documents and Media search index is stale and contains file entry {" + fileEntryId + "}");
+						}
+
+						continue;
+					}
+
+					results.add(fileEntry);
+				}
+
+				if (docs.length == 0) {
+					request.removeAttribute(WebKeys.DOCUMENT_LIBRARY_FOLDER);
+				}
+			}
+
+			fileEntrySearchContainer.setResults(results);
+
+			List resultRows = fileEntrySearchContainer.getResultRows();
+	%>
+
+			<%@ include file="/html/portlet/dynamic_data_mapping/select_document_library_search_results.jspf" %>
+
+	<%
+		}
+		catch (Exception e) {
+			_log.error(e, e);
+		}
+	%>
+
+		<liferay-ui:search-iterator searchContainer="<%= fileEntrySearchContainer %>" />
+
+	<%
+	}
+	%>
+
+</aui:form>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.dynamic_data_mapping.select_document_library_jsp");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/select_document_library_search_results.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/select_document_library_search_results.jspf
new file mode 100644
index 0000000..47d19fd
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/select_document_library_search_results.jspf
@@ -0,0 +1,77 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+for (int i = 0; i < results.size(); i++) {
+	FileEntry fileEntry = (FileEntry)results.get(i);
+
+	ResultRow row = new ResultRow(fileEntry, fileEntry.getFileEntryId(), i);
+
+	String rowHREF = DLUtil.getPreviewURL(fileEntry, fileEntry.getFileVersion(), themeDisplay, StringPool.BLANK, false, true);
+
+	// Title
+
+	StringBundler sb = new StringBundler(13);
+
+	sb.append("<img alt=\"\" align=\"left\" border=\"0\" src=\"");
+
+	DLFileShortcut fileShortcut = null;
+
+	sb.append(DLUtil.getThumbnailSrc(fileEntry, fileShortcut, themeDisplay));
+	sb.append("\" style=\"");
+	sb.append(DLUtil.getThumbnailStyle());
+	sb.append("\">");
+	sb.append(fileEntry.getTitle());
+
+	row.addText(sb.toString(), rowHREF);
+
+	// Statistics
+
+	row.addText(TextFormatter.formatKB(fileEntry.getSize(), locale) + "k", rowHREF);
+
+	if (PropsValues.DL_FILE_ENTRY_BUFFERED_INCREMENT_ENABLED) {
+		row.addText(String.valueOf(fileEntry.getReadCount()), rowHREF);
+	}
+
+	// Locked
+
+	row.addText(LanguageUtil.get(pageContext, fileEntry.isCheckedOut() ? "yes" : "no"), rowHREF);
+
+	// Action
+
+	sb.setIndex(0);
+
+	sb.append("Liferay.Util.getOpener().");
+	sb.append(renderResponse.getNamespace());
+	sb.append("selectDocumentLibrary('");
+	sb.append(DLUtil.getPreviewURL(fileEntry, fileEntry.getFileVersion(), themeDisplay, StringPool.BLANK, false, false));
+	sb.append("', '");
+	sb.append(fileEntry.getUuid());
+	sb.append("', '");
+	sb.append(fileEntry.getGroupId());
+	sb.append("', '");
+	sb.append(HtmlUtil.escapeJS(fileEntry.getTitle()));
+	sb.append("', '");
+	sb.append(fileEntry.getVersion());
+	sb.append("'); Liferay.Util.getWindow().hide();");
+
+	row.addButton("right", SearchEntry.DEFAULT_VALIGN, LanguageUtil.get(pageContext, "choose"), sb.toString());
+
+	// Add result row
+
+	resultRows.add(row);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/select_structure.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/select_structure.jsp
new file mode 100644
index 0000000..bccbfac
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/select_structure.jsp
@@ -0,0 +1,118 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_mapping/init.jsp" %>
+
+<%
+long groupId = ParamUtil.getLong(request, "groupId", scopeGroupId);
+long classPK = ParamUtil.getLong(request, "classPK");
+String eventName = ParamUtil.getString(request, "eventName", "selectStructure");
+%>
+
+<liferay-portlet:renderURL varImpl="portletURL">
+	<portlet:param name="struts_action" value="/dynamic_data_mapping/select_structure" />
+	<portlet:param name="classPK" value="<%= String.valueOf(classPK) %>" />
+	<portlet:param name="eventName" value="<%= eventName %>" />
+</liferay-portlet:renderURL>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="selectStructureFm">
+	<c:if test="<%= !showToolbar %>">
+		<liferay-ui:header
+			localizeTitle="<%= false %>"
+			title="<%= ddmDisplay.getStructureName(locale) %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= showToolbar %>">
+		<liferay-util:include page="/html/portlet/dynamic_data_mapping/structure_toolbar.jsp">
+			<liferay-util:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+		</liferay-util:include>
+	</c:if>
+
+	<div class="separator"><!-- --></div>
+
+	<liferay-ui:search-container
+		searchContainer="<%= new StructureSearch(renderRequest, portletURL) %>"
+	>
+		<liferay-ui:search-container-results>
+			<%@ include file="/html/portlet/dynamic_data_mapping/structure_search_results.jspf" %>
+		</liferay-ui:search-container-results>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portlet.dynamicdatamapping.model.DDMStructure"
+			keyProperty="structureId"
+			modelVar="structure"
+		>
+
+			<liferay-ui:search-container-column-text
+				name="id"
+				value="<%= String.valueOf(structure.getStructureId()) %>"
+			/>
+
+			<liferay-ui:search-container-column-text
+				name="name"
+				value="<%= HtmlUtil.escape(structure.getName(locale)) %>"
+			/>
+
+			<liferay-ui:search-container-column-text
+				name="description"
+				value="<%= HtmlUtil.escape(structure.getDescription(locale)) %>"
+			/>
+
+			<liferay-ui:search-container-column-date
+				name="modified-date"
+				value="<%= structure.getModifiedDate() %>"
+			/>
+
+			<liferay-ui:search-container-column-text>
+				<c:if test="<%= (structure.getStructureId() != classPK) && ((classPK == 0) || (structure.getParentStructureId() == 0) || (structure.getParentStructureId() != classPK)) %>">
+
+					<%
+					Map<String, Object> data = new HashMap<String, Object>();
+
+					data.put("ddmstructureid", structure.getStructureId());
+					data.put("ddmstructurekey", structure.getStructureKey());
+					data.put("name", HtmlUtil.escapeAttribute(structure.getName(locale)));
+					%>
+
+					<aui:button cssClass="selector-button" data="<%= data %>" value="choose" />
+				</c:if>
+			</liferay-ui:search-container-column-text>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script>
+	Liferay.Util.focusFormField(document.<portlet:namespace />selectStructureFm.<portlet:namespace />toggle_id_ddm_structure_searchkeywords);
+</aui:script>
+
+<aui:script use="aui-base">
+	var Util = Liferay.Util;
+
+	A.one('#<portlet:namespace />selectStructureFm').delegate(
+		'click',
+		function(event) {
+			var result = Util.getAttributes(event.currentTarget, 'data-');
+
+			Util.getOpener().Liferay.fire('<%= HtmlUtil.escapeJS(eventName) %>', result);
+
+			Util.getWindow().destroy();
+		},
+		'.selector-button'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/select_template.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/select_template.jsp
new file mode 100644
index 0000000..e0b866f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/select_template.jsp
@@ -0,0 +1,133 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_mapping/init.jsp" %>
+
+<%
+long templateId = ParamUtil.getLong(request, "templateId");
+
+long classNameId = ParamUtil.getLong(request, "classNameId");
+long classPK = ParamUtil.getLong(request, "classPK");
+String eventName = ParamUtil.getString(request, "eventName", "selectStructure");
+
+DDMStructure structure = null;
+
+long structureClassNameId = PortalUtil.getClassNameId(DDMStructure.class);
+
+if ((classPK > 0) && (structureClassNameId == classNameId)) {
+	structure = DDMStructureServiceUtil.getStructure(classPK);
+}
+
+String title = ddmDisplay.getViewTemplatesTitle(structure, locale);
+%>
+
+<c:if test="<%= showToolbar %>">
+	<liferay-util:include page="/html/portlet/dynamic_data_mapping/template_toolbar.jsp">
+		<liferay-util:param name="redirect" value="<%= currentURL %>" />
+		<liferay-util:param name="classNameId" value="<%= String.valueOf(classNameId) %>" />
+		<liferay-util:param name="classPK" value="<%= String.valueOf(classPK) %>" />
+	</liferay-util:include>
+</c:if>
+
+<liferay-portlet:renderURL varImpl="portletURL">
+	<portlet:param name="struts_action" value="/dynamic_data_mapping/select_template" />
+	<portlet:param name="classNameId" value="<%= String.valueOf(classNameId) %>" />
+	<portlet:param name="classPK" value="<%= String.valueOf(classPK) %>" />
+	<portlet:param name="eventName" value="<%= eventName %>" />
+</liferay-portlet:renderURL>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="selectTemplateFm">
+	<c:if test="<%= !showToolbar %>">
+		<liferay-ui:header
+			localizeTitle="<%= false %>"
+			title="<%= title %>"
+		/>
+	</c:if>
+
+	<div class="separator"><!-- --></div>
+
+	<liferay-ui:search-container
+		searchContainer="<%= new TemplateSearch(renderRequest, portletURL) %>"
+	>
+		<liferay-ui:search-container-results>
+			<%@ include file="/html/portlet/dynamic_data_mapping/template_search_results.jspf" %>
+		</liferay-ui:search-container-results>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portlet.dynamicdatamapping.model.DDMTemplate"
+			keyProperty="templateId"
+			modelVar="template"
+		>
+
+			<liferay-ui:search-container-column-text
+				name="id"
+				value="<%= String.valueOf(template.getTemplateId()) %>"
+			/>
+
+			<liferay-ui:search-container-column-text
+				name="name"
+				value="<%= HtmlUtil.escape(template.getName(locale)) %>"
+			/>
+
+			<liferay-ui:search-container-column-text
+				name="description"
+				value="<%= HtmlUtil.escape(template.getDescription(locale)) %>"
+			/>
+
+			<liferay-ui:search-container-column-date
+				name="modified-date"
+				value="<%= template.getModifiedDate() %>"
+			/>
+
+			<liferay-ui:search-container-column-text>
+				<c:if test="<%= template.getTemplateId() != templateId %>">
+
+					<%
+					Map<String, Object> data = new HashMap<String, Object>();
+
+					data.put("ddmtemplateid", template.getTemplateId());
+					data.put("ddmtemplatekey", template.getTemplateKey());
+					data.put("name", HtmlUtil.escapeAttribute(template.getName(locale)));
+					%>
+
+					<aui:button cssClass="selector-button" data="<%= data %>" value="choose" />
+				</c:if>
+			</liferay-ui:search-container-column-text>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script>
+	Liferay.Util.focusFormField(document.<portlet:namespace />selectTemplateFm.<portlet:namespace />toggle_id_ddm_template_searchkeywords);
+</aui:script>
+
+<aui:script use="aui-base">
+	var Util = Liferay.Util;
+
+	A.one('#<portlet:namespace />selectTemplateFm').delegate(
+		'click',
+		function(event) {
+			var result = Util.getAttributes(event.currentTarget, 'data-');
+
+			Util.getOpener().Liferay.fire('<%= HtmlUtil.escapeJS(eventName) %>', result);
+
+			Util.getWindow().hide();
+		},
+		'.selector-button'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/structure_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/structure_action.jsp
new file mode 100644
index 0000000..ac6f75a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/structure_action.jsp
@@ -0,0 +1,116 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_mapping/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+DDMStructure structure = (DDMStructure)row.getObject();
+%>
+
+<liferay-ui:icon-menu showExpanded="<%= false %>" showWhenSingleIcon="<%= false %>">
+	<c:if test="<%= DDMStructurePermission.contains(permissionChecker, structure, refererPortletName, ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/dynamic_data_mapping/edit_structure" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="classNameId" value="<%= String.valueOf(PortalUtil.getClassNameId(DDMStructure.class)) %>" />
+			<portlet:param name="classPK" value="<%= String.valueOf(structure.getStructureId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editURL %>"
+		/>
+	</c:if>
+
+	<%
+	String editStructureDefaultValuesURL = ddmDisplay.getEditStructureDefaultValuesURL(liferayPortletRequest, liferayPortletResponse, structure, currentURL, currentURL);
+	%>
+
+	<c:if test="<%= Validator.isNotNull(editStructureDefaultValuesURL) && DDMStructurePermission.contains(permissionChecker, structure, refererPortletName, ActionKeys.UPDATE) %>">
+		<liferay-ui:icon
+			image="edit"
+			message="edit-default-values"
+			url="<%= editStructureDefaultValuesURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= DDMStructurePermission.contains(permissionChecker, structure, refererPortletName, ActionKeys.VIEW) && showManageTemplates %>">
+		<portlet:renderURL var="manageViewURL">
+			<portlet:param name="struts_action" value="/dynamic_data_mapping/view_template" />
+			<portlet:param name="classNameId" value="<%= String.valueOf(PortalUtil.getClassNameId(DDMStructure.class)) %>" />
+			<portlet:param name="classPK" value="<%= String.valueOf(structure.getStructureId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="view"
+			message="manage-templates"
+			url="<%= manageViewURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= DDMStructurePermission.contains(permissionChecker, structure, refererPortletName, ActionKeys.PERMISSIONS) %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= DDMStructure.class.getName() %>"
+			modelResourceDescription="<%= structure.getName(locale) %>"
+			resourcePrimKey="<%= String.valueOf(structure.getStructureId()) %>"
+			var="permissionsURL"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			url="<%= permissionsURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= DDMPermission.contains(permissionChecker, scopeGroupId, ddmDisplay.getResourceName(), ddmDisplay.getAddStructureActionId()) %>">
+		<portlet:renderURL var="copyURL">
+			<portlet:param name="closeRedirect" value="<%= HttpUtil.encodeURL(currentURL) %>" />
+			<portlet:param name="struts_action" value="/dynamic_data_mapping/copy_structure" />
+			<portlet:param name="classNameId" value="<%= String.valueOf(PortalUtil.getClassNameId(DDMStructure.class)) %>" />
+			<portlet:param name="classPK" value="<%= String.valueOf(structure.getStructureId()) %>" />
+		</portlet:renderURL>
+
+		<%
+		StringBundler sb = new StringBundler(6);
+
+		sb.append("javascript:");
+		sb.append(renderResponse.getNamespace());
+		sb.append("copyStructure");
+		sb.append("('");
+		sb.append(copyURL);
+		sb.append("');");
+		%>
+
+		<liferay-ui:icon
+			image="copy"
+			url="<%= sb.toString() %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= DDMStructurePermission.contains(permissionChecker, structure, refererPortletName, ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/dynamic_data_mapping/edit_structure" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="classNameId" value="<%= String.valueOf(PortalUtil.getClassNameId(DDMStructure.class)) %>" />
+			<portlet:param name="classPK" value="<%= String.valueOf(structure.getStructureId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete url="<%= deleteURL %>" />
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/structure_search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/structure_search.jsp
new file mode 100644
index 0000000..a695821
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/structure_search.jsp
@@ -0,0 +1,66 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_mapping/init.jsp" %>
+
+<%
+StructureDisplayTerms displayTerms = new StructureDisplayTerms(renderRequest);
+%>
+
+<liferay-ui:search-toggle
+	buttonLabel="search"
+	displayTerms="<%= displayTerms %>"
+	id="toggle_id_ddm_structure_search"
+>
+	<aui:fieldset cssClass="lfr-ddm-search-form">
+		<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" name="<%= displayTerms.NAME %>" size="20" value="<%= displayTerms.getName() %>" />
+
+		<aui:input name="<%= displayTerms.DESCRIPTION %>" size="20" value="<%= displayTerms.getDescription() %>" />
+
+		<c:choose>
+			<c:when test="<%= scopeClassNameId == 0 %>">
+				<aui:select label="type" name="<%= displayTerms.CLASS_NAME_ID %>">
+					<aui:option label="<%= ResourceActionsUtil.getModelResource(locale, DDLRecordSet.class.getName()) %>" selected='<%= "datalist".equals(displayTerms.getStorageType()) %>' value="<%= PortalUtil.getClassNameId(DDLRecordSet.class.getName()) %>" />
+					<aui:option label="<%= ResourceActionsUtil.getModelResource(locale, DLFileEntryMetadata.class.getName()) %>" selected='<%= "datalist".equals(displayTerms.getStorageType()) %>' value="<%= PortalUtil.getClassNameId(DLFileEntryMetadata.class.getName()) %>" />
+				</aui:select>
+			</c:when>
+			<c:otherwise>
+				<aui:input name="<%= displayTerms.CLASS_NAME_ID %>" type="hidden" value="<%= scopeClassNameId %>" />
+			</c:otherwise>
+		</c:choose>
+
+		<c:choose>
+			<c:when test="<%= Validator.isNull(storageTypeValue) %>">
+				<aui:select name="storageType">
+
+					<%
+					for (StorageType storageType : StorageType.values()) {
+					%>
+
+						<aui:option label="<%= storageType %>" selected="<%= storageType.equals(displayTerms.getStorageType()) %>" value="<%= storageType %>" />
+
+					<%
+					}
+					%>
+
+				</aui:select>
+			</c:when>
+			<c:otherwise>
+				<aui:input name="storageType" type="hidden" value="<%= storageTypeValue %>" />
+			</c:otherwise>
+		</c:choose>
+	</aui:fieldset>
+</liferay-ui:search-toggle>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/structure_search_results.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/structure_search_results.jspf
new file mode 100644
index 0000000..987ece9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/structure_search_results.jspf
@@ -0,0 +1,54 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+StructureSearchTerms searchTerms = (StructureSearchTerms)searchContainer.getSearchTerms();
+
+long[] groupIds = new long[] {groupId};
+
+if (showGlobalScope) {
+	groupIds = PortalUtil.getSiteAndCompanyGroupIds(groupId);
+}
+
+if (searchTerms.isAdvancedSearch()) {
+	total = DDMStructureServiceUtil.searchCount(company.getCompanyId(), groupIds, new long[] {searchTerms.getClassNameId()}, searchTerms.getName(), searchTerms.getDescription(), searchTerms.getStorageType(), DDMStructureConstants.TYPE_DEFAULT, searchTerms.isAndOperator());
+
+	searchContainer.setTotal(total);
+
+	results = DDMStructureServiceUtil.search(company.getCompanyId(), groupIds, new long[] {searchTerms.getClassNameId()}, searchTerms.getName(), searchTerms.getDescription(), searchTerms.getStorageType(), DDMStructureConstants.TYPE_DEFAULT, searchTerms.isAndOperator(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+}
+else {
+	long[] scopeClassNameIds = null;
+
+	if (scopeClassNameId > 0) {
+		scopeClassNameIds = new long[] {scopeClassNameId};
+	}
+
+	String[] storageTypes = null;
+
+	if (Validator.isNotNull(storageTypeValue)) {
+		storageTypes = new String[] {storageTypeValue};
+	}
+
+	total = DDMStructureServiceUtil.searchCount(company.getCompanyId(), groupIds, scopeClassNameIds, searchTerms.getKeywords());
+
+	searchContainer.setTotal(total);
+
+	results = DDMStructureServiceUtil.search(company.getCompanyId(), groupIds, scopeClassNameIds, searchTerms.getKeywords(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+}
+
+searchContainer.setResults(results);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/structure_toolbar.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/structure_toolbar.jsp
new file mode 100644
index 0000000..5c6a0c1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/structure_toolbar.jsp
@@ -0,0 +1,47 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_mapping/init.jsp" %>
+
+<%
+String toolbarItem = ParamUtil.getString(request, "toolbarItem");
+
+long groupId = ParamUtil.getLong(request, "groupId", scopeGroupId);
+long classPK = ParamUtil.getLong(request, "classPK");
+String eventName = ParamUtil.getString(request, "eventName", "selectStructure");
+%>
+
+<aui:nav-bar>
+	<aui:nav>
+		<portlet:renderURL var="viewStructureURL">
+			<portlet:param name="struts_action" value="/dynamic_data_mapping/select_structure" />
+			<portlet:param name="classPK" value="<%= String.valueOf(classPK) %>" />
+			<portlet:param name="eventName" value="<%= eventName %>" />
+		</portlet:renderURL>
+
+		<c:if test="<%= ddmDisplay.isShowAddStructureButton() && DDMPermission.contains(permissionChecker, groupId, ddmDisplay.getResourceName(), ddmDisplay.getAddStructureActionId()) %>">
+			<portlet:renderURL var="addStructureURL">
+				<portlet:param name="struts_action" value="/dynamic_data_mapping/edit_structure" />
+				<portlet:param name="redirect" value="<%= viewStructureURL %>" />
+				<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+			</portlet:renderURL>
+
+			<aui:nav-item href="<%= addStructureURL %>" iconCssClass="icon-plus" label="add" selected='<%= toolbarItem.equals("add") %>' />
+		</c:if>
+	</aui:nav>
+
+	<aui:nav-bar-search cssClass="pull-right" file="/html/portlet/dynamic_data_mapping/structure_search.jsp" />
+</aui:nav-bar>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/template_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/template_action.jsp
new file mode 100644
index 0000000..a80c625
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/template_action.jsp
@@ -0,0 +1,90 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_mapping/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+DDMTemplate template = (DDMTemplate)row.getObject();
+%>
+
+<liferay-ui:icon-menu showExpanded="<%= false %>" showWhenSingleIcon="<%= false %>">
+	<c:if test="<%= DDMTemplatePermission.contains(permissionChecker, template, refererPortletName, ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/dynamic_data_mapping/edit_template" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(template.getGroupId()) %>" />
+			<portlet:param name="templateId" value="<%= String.valueOf(template.getTemplateId()) %>" />
+			<portlet:param name="type" value="<%= template.getType() %>" />
+			<portlet:param name="structureAvailableFields" value='<%= renderResponse.getNamespace() + "getAvailableFields" %>' />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= DDMTemplatePermission.contains(permissionChecker, template, refererPortletName, ActionKeys.PERMISSIONS) %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= DDMTemplate.class.getName() %>"
+			modelResourceDescription="<%= template.getName(locale) %>"
+			resourcePrimKey="<%= String.valueOf(template.getTemplateId()) %>"
+			var="permissionsURL"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			url="<%= permissionsURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= DDMPermission.contains(permissionChecker, scopeGroupId, ddmDisplay.getResourceName(template.getClassNameId()), ddmDisplay.getAddTemplateActionId()) %>">
+		<portlet:renderURL var="copyURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+			<portlet:param name="closeRedirect" value="<%= HttpUtil.encodeURL(currentURL) %>" />
+			<portlet:param name="struts_action" value="/dynamic_data_mapping/copy_template" />
+			<portlet:param name="templateId" value="<%= String.valueOf(template.getTemplateId()) %>" />
+		</portlet:renderURL>
+
+		<%
+		StringBundler sb = new StringBundler(6);
+
+		sb.append("javascript:");
+		sb.append(renderResponse.getNamespace());
+		sb.append("copyTemplate");
+		sb.append("('");
+		sb.append(copyURL);
+		sb.append("');");
+		%>
+
+		<liferay-ui:icon
+			image="copy"
+			url="<%= sb.toString() %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= DDMTemplatePermission.contains(permissionChecker, template, refererPortletName, ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/dynamic_data_mapping/edit_template" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="templateId" value="<%= String.valueOf(template.getTemplateId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete url="<%= deleteURL %>" />
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/template_description.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/template_description.jsp
new file mode 100644
index 0000000..fefaff7
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/template_description.jsp
@@ -0,0 +1,38 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_mapping/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+DDMTemplate template = (DDMTemplate)row.getObject();
+
+String rowHREF = (String)row.getParameter("rowHREF");
+%>
+
+<a href="<%= rowHREF %>">
+
+<c:choose>
+	<c:when test="<%= template.isSmallImage() %>">
+		<img border="0" src="<%= Validator.isNotNull(template.getSmallImageURL()) ? template.getSmallImageURL() : themeDisplay.getPathImage() + "/template?img_id=" + template.getSmallImageId() + "&t=" + WebServerServletTokenUtil.getToken(template.getSmallImageId()) %>" />
+	</c:when>
+	<c:otherwise>
+		<%= HtmlUtil.escape(template.getDescription(locale)) %>
+	</c:otherwise>
+</c:choose>
+
+</a>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/template_search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/template_search.jsp
new file mode 100644
index 0000000..5b7422f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/template_search.jsp
@@ -0,0 +1,33 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_mapping/init.jsp" %>
+
+<%
+TemplateDisplayTerms displayTerms = new TemplateDisplayTerms(renderRequest);
+%>
+
+<liferay-ui:search-toggle
+	buttonLabel="search"
+	displayTerms="<%= displayTerms %>"
+	id="toggle_id_ddm_template_search"
+>
+	<aui:fieldset cssClass="lfr-ddm-search-form">
+		<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" name="<%= displayTerms.NAME %>" size="20" value="<%= displayTerms.getName() %>" />
+
+		<aui:input name="<%= displayTerms.DESCRIPTION %>" size="20" value="<%= displayTerms.getDescription() %>" />
+	</aui:fieldset>
+</liferay-ui:search-toggle>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/template_search_results.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/template_search_results.jspf
new file mode 100644
index 0000000..767c01a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/template_search_results.jspf
@@ -0,0 +1,40 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+TemplateSearchTerms searchTerms = (TemplateSearchTerms)searchContainer.getSearchTerms();
+
+long[] groupIds = ddmDisplay.getTemplateGroupIds(themeDisplay, showGlobalScope);
+long[] classNameIds = ddmDisplay.getTemplateClassNameIds(classNameId);
+long[] classPKs = ddmDisplay.getTemplateClassPKs(company.getCompanyId(), classNameId, classPK);
+
+if (searchTerms.isAdvancedSearch()) {
+	total = DDMTemplateServiceUtil.searchCount(company.getCompanyId(), groupIds, classNameIds, classPKs, searchTerms.getName(), searchTerms.getDescription(), searchTerms.getType(), null, null, searchTerms.isAndOperator());
+
+	searchContainer.setTotal(total);
+
+	results = DDMTemplateServiceUtil.search(company.getCompanyId(), groupIds, classNameIds, classPKs, searchTerms.getName(), searchTerms.getDescription(), searchTerms.getType(), ddmDisplay.getTemplateMode(), null, searchTerms.isAndOperator(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+}
+else {
+	total = DDMTemplateServiceUtil.searchCount(company.getCompanyId(), groupIds, classNameIds, classPKs, searchTerms.getKeywords(), searchTerms.getType(), ddmDisplay.getTemplateMode());
+
+	searchContainer.setTotal(total);
+
+	results = DDMTemplateServiceUtil.search(company.getCompanyId(), groupIds, classNameIds, classPKs, searchTerms.getKeywords(), searchTerms.getType(), ddmDisplay.getTemplateMode(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+}
+
+searchContainer.setResults(results);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/template_toolbar.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/template_toolbar.jsp
new file mode 100644
index 0000000..23f92a8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/template_toolbar.jsp
@@ -0,0 +1,137 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_mapping/init.jsp" %>
+
+<%
+String toolbarItem = ParamUtil.getString(request, "toolbarItem");
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+long groupId = ParamUtil.getLong(request, "groupId", scopeGroupId);
+long classNameId = ParamUtil.getLong(request, "classNameId");
+long classPK = ParamUtil.getLong(request, "classPK");
+%>
+
+<aui:nav-bar>
+	<aui:nav>
+
+		<%
+		String message = "add";
+		%>
+
+		<c:choose>
+			<c:when test="<%= classNameId == PortalUtil.getClassNameId(DDMStructure.class) %>">
+				<c:if test="<%= DDMPermission.contains(permissionChecker, scopeGroupId, ddmDisplay.getResourceName(), ddmDisplay.getAddTemplateActionId()) && (Validator.isNull(templateTypeValue) || templateTypeValue.equals(DDMTemplateConstants.TEMPLATE_TYPE_FORM)) %>">
+					<portlet:renderURL var="addTemplateURL">
+						<portlet:param name="struts_action" value="/dynamic_data_mapping/edit_template" />
+						<portlet:param name="redirect" value="<%= redirect %>" />
+						<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+						<portlet:param name="classNameId" value="<%= String.valueOf(classNameId) %>" />
+						<portlet:param name="classPK" value="<%= String.valueOf(classPK) %>" />
+						<portlet:param name="structureAvailableFields" value='<%= renderResponse.getNamespace() + "getAvailableFields" %>' />
+					</portlet:renderURL>
+
+					<%
+					if (Validator.isNull(templateTypeValue)) {
+						message = "add-form-template";
+					}
+					%>
+
+					<aui:nav-item href="<%= addTemplateURL %>" iconCssClass="icon-plus" label="<%= message %>" selected='<%= toolbarItem.equals("add-form-template") %>' />
+				</c:if>
+
+				<c:if test="<%= DDMPermission.contains(permissionChecker, scopeGroupId, ddmDisplay.getResourceName(), ddmDisplay.getAddTemplateActionId()) && (Validator.isNull(templateTypeValue) || templateTypeValue.equals(DDMTemplateConstants.TEMPLATE_TYPE_DISPLAY)) %>">
+					<portlet:renderURL var="addTemplateURL">
+						<portlet:param name="struts_action" value="/dynamic_data_mapping/edit_template" />
+						<portlet:param name="redirect" value="<%= redirect %>" />
+						<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+						<portlet:param name="classNameId" value="<%= String.valueOf(classNameId) %>" />
+						<portlet:param name="classPK" value="<%= String.valueOf(classPK) %>" />
+						<portlet:param name="type" value="<%= DDMTemplateConstants.TEMPLATE_TYPE_DISPLAY %>" />
+					</portlet:renderURL>
+
+					<%
+					if (Validator.isNull(templateTypeValue)) {
+						message = "add-display-template";
+					}
+					%>
+
+					<aui:nav-item href="<%= addTemplateURL %>" iconCssClass="icon-plus" label="<%= message %>" selected='<%= toolbarItem.equals("add-display-template") %>' />
+				</c:if>
+			</c:when>
+			<c:otherwise>
+
+				<%
+				List<TemplateHandler> templateHandlers = new ArrayList<TemplateHandler>();
+
+				if (classNameId > 0) {
+					templateHandlers.add(TemplateHandlerRegistryUtil.getTemplateHandler(classNameId));
+				}
+				else {
+					templateHandlers = PortletDisplayTemplateUtil.getPortletDisplayTemplateHandlers();
+
+					Iterator<TemplateHandler> itr = templateHandlers.iterator();
+
+					while (itr.hasNext()) {
+						TemplateHandler templateHandler = itr.next();
+
+						if (!DDMPermission.contains(permissionChecker, scopeGroupId, templateHandler.getResourceName(), ActionKeys.ADD_PORTLET_DISPLAY_TEMPLATE)) {
+							itr.remove();
+						}
+					}
+				}
+
+				if (!templateHandlers.isEmpty()) {
+					ListUtil.sort(templateHandlers, new TemplateHandlerComparator(locale));
+				%>
+
+					<aui:nav-item dropdown="<%= true %>" iconCssClass="icon-plus" label="add">
+						<liferay-portlet:renderURL varImpl="addPortletDisplayTemplateURL">
+							<portlet:param name="struts_action" value="/dynamic_data_mapping/edit_template" />
+							<portlet:param name="redirect" value="<%= redirect %>" />
+							<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+							<portlet:param name="type" value="<%= DDMTemplateConstants.TEMPLATE_TYPE_DISPLAY %>" />
+						</liferay-portlet:renderURL>
+
+						<%
+						for (TemplateHandler templateHandler : templateHandlers) {
+							addPortletDisplayTemplateURL.setParameter("classNameId", String.valueOf(PortalUtil.getClassNameId(templateHandler.getClassName())));
+							addPortletDisplayTemplateURL.setParameter("classPK", String.valueOf(0));
+						%>
+
+							<aui:nav-item
+								href="<%= addPortletDisplayTemplateURL.toString() %>"
+								iconCssClass="icon-list-alt"
+								label="<%= templateHandler.getName(locale) %>"
+							/>
+
+						<%
+						}
+						%>
+
+					</aui:nav-item>
+
+					<%
+					}
+					%>
+
+			</c:otherwise>
+		</c:choose>
+	</aui:nav>
+
+	<aui:nav-bar-search cssClass="pull-right" file="/html/portlet/dynamic_data_mapping/template_search.jsp" />
+</aui:nav-bar>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/toolbar.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/toolbar.jsp
new file mode 100644
index 0000000..e0182f5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/toolbar.jsp
@@ -0,0 +1,44 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_mapping/init.jsp" %>
+
+<%
+String toolbarItem = ParamUtil.getString(request, "toolbarItem");
+
+long groupId = ParamUtil.getLong(request, "groupId", scopeGroupId);
+%>
+
+<aui:nav-bar>
+	<aui:nav>
+		<portlet:renderURL var="viewStructuresURL">
+			<portlet:param name="struts_action" value="/dynamic_data_mapping/view" />
+			<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+		</portlet:renderURL>
+
+		<c:if test="<%= ddmDisplay.isShowAddStructureButton() && DDMPermission.contains(permissionChecker, groupId, ddmDisplay.getResourceName(), ddmDisplay.getAddStructureActionId()) %>">
+			<portlet:renderURL var="addStructureURL">
+				<portlet:param name="struts_action" value="/dynamic_data_mapping/edit_structure" />
+				<portlet:param name="redirect" value="<%= viewStructuresURL %>" />
+				<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+			</portlet:renderURL>
+
+			<aui:nav-item href="<%= addStructureURL %>" iconCssClass="icon-plus" label="add" selected='<%= toolbarItem.equals("add") %>' />
+		</c:if>
+	</aui:nav>
+
+	<aui:nav-bar-search cssClass="pull-right" file="/html/portlet/dynamic_data_mapping/structure_search.jsp" />
+</aui:nav-bar>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/view.jsp
new file mode 100644
index 0000000..275167c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/view.jsp
@@ -0,0 +1,195 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_mapping/init.jsp" %>
+
+<%
+String tabs1 = ParamUtil.getString(request, "tabs1", "structures");
+
+long groupId = ParamUtil.getLong(request, "groupId", themeDisplay.getSiteGroupId());
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/dynamic_data_mapping/view");
+portletURL.setParameter("groupId", String.valueOf(groupId));
+portletURL.setParameter("tabs1", tabs1);
+%>
+
+<liferay-ui:error exception="<%= RequiredStructureException.class %>">
+	<liferay-ui:message key="required-structures-could-not-be-deleted" />
+
+	<%
+	RequiredStructureException rse = (RequiredStructureException)errorException;
+	%>
+
+	<c:if test="<%= rse.getType() == RequiredStructureException.REFERENCED_TEMPLATE %>">
+		<liferay-ui:message key="they-are-referenced-by-templates" />
+	</c:if>
+</liferay-ui:error>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= portletURL.toString() %>" />
+	<aui:input name="deleteStructureIds" type="hidden" />
+
+	<%
+	String orderByCol = ParamUtil.getString(request, "orderByCol");
+	String orderByType = ParamUtil.getString(request, "orderByType");
+
+	if (Validator.isNotNull(orderByCol) && Validator.isNotNull(orderByType)) {
+		portalPreferences.setValue(PortletKeys.DYNAMIC_DATA_MAPPING, "entries-order-by-col", orderByCol);
+		portalPreferences.setValue(PortletKeys.DYNAMIC_DATA_MAPPING, "entries-order-by-type", orderByType);
+	}
+	else {
+		orderByCol = portalPreferences.getValue(PortletKeys.DYNAMIC_DATA_MAPPING, "entries-order-by-col", "id");
+		orderByType = portalPreferences.getValue(PortletKeys.DYNAMIC_DATA_MAPPING, "entries-order-by-type", "asc");
+	}
+
+	OrderByComparator orderByComparator = DDMUtil.getStructureOrderByComparator(orderByCol, orderByType);
+	%>
+
+	<liferay-ui:search-container
+		orderByCol="<%= orderByCol %>"
+		orderByComparator="<%= orderByComparator %>"
+		orderByType="<%= orderByType %>"
+		rowChecker="<%= new RowChecker(renderResponse) %>"
+		searchContainer="<%= new StructureSearch(renderRequest, portletURL) %>"
+	>
+
+		<c:if test="<%= showToolbar %>">
+			<liferay-util:include page="/html/portlet/dynamic_data_mapping/toolbar.jsp">
+				<liferay-util:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+			</liferay-util:include>
+		</c:if>
+
+		<liferay-ui:search-container-results>
+			<%@ include file="/html/portlet/dynamic_data_mapping/structure_search_results.jspf" %>
+		</liferay-ui:search-container-results>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portlet.dynamicdatamapping.model.DDMStructure"
+			keyProperty="structureId"
+			modelVar="structure"
+		>
+
+			<%
+			PortletURL rowURL = renderResponse.createRenderURL();
+
+			rowURL.setParameter("struts_action", "/dynamic_data_mapping/edit_structure");
+			rowURL.setParameter("redirect", currentURL);
+			rowURL.setParameter("classNameId", String.valueOf(PortalUtil.getClassNameId(DDMStructure.class)));
+			rowURL.setParameter("classPK", String.valueOf(structure.getStructureId()));
+
+			String rowHREF = rowURL.toString();
+			%>
+
+			<liferay-ui:search-container-column-text
+				href="<%= rowHREF %>"
+				name="id"
+				orderable="<%= true %>"
+				orderableProperty="id"
+				property="structureId"
+			/>
+
+			<liferay-ui:search-container-column-text
+				href="<%= rowHREF %>"
+				name="name"
+				value="<%= HtmlUtil.escape(structure.getName(locale)) %>"
+			/>
+
+			<liferay-ui:search-container-column-text
+				href="<%= rowHREF %>"
+				name="description"
+				value="<%= HtmlUtil.escape(structure.getDescription(locale)) %>"
+			/>
+
+			<c:if test="<%= Validator.isNull(storageTypeValue) %>">
+				<liferay-ui:search-container-column-text
+					href="<%= rowHREF %>"
+					name="storage-type"
+					value="<%= LanguageUtil.get(pageContext, structure.getStorageType()) %>"
+				/>
+			</c:if>
+
+			<c:if test="<%= scopeClassNameId == 0 %>">
+				<liferay-ui:search-container-column-text
+					buffer="buffer"
+					href="<%= rowHREF %>"
+					name="type"
+				>
+
+					<%
+					buffer.append(ResourceActionsUtil.getModelResource(locale, structure.getClassName()));
+					%>
+
+				</liferay-ui:search-container-column-text>
+			</c:if>
+
+			<liferay-ui:search-container-column-date
+				href="<%= rowHREF %>"
+				name="modified-date"
+				orderable="<%= true %>"
+				orderableProperty="modified-date"
+				value="<%= structure.getModifiedDate() %>"
+			/>
+
+			<liferay-ui:search-container-column-jsp
+				align="right"
+				path="/html/portlet/dynamic_data_mapping/structure_action.jsp"
+			/>
+		</liferay-ui:search-container-row>
+
+		<c:if test="<%= total > 0 %>">
+			<aui:button-row>
+				<aui:button cssClass="delete-structures-button" disabled="<%= true %>" name="delete" onClick='<%= renderResponse.getNamespace() + "deleteStructures();" %>' value="delete" />
+			</aui:button-row>
+
+			<div class="separator"><!-- --></div>
+		</c:if>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script>
+	Liferay.Util.toggleSearchContainerButton('#<portlet:namespace />delete', '#<portlet:namespace /><%= searchContainerReference.getId() %>SearchContainer', document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+	function <portlet:namespace />copyStructure(uri) {
+		Liferay.Util.openWindow(
+			{
+				id: '<portlet:namespace />copyStructure',
+				refreshWindow: window,
+				title: '<%= UnicodeLanguageUtil.format(pageContext, "copy-x", ddmDisplay.getStructureName(locale)) %>',
+				uri: uri
+			}
+		);
+	}
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />deleteStructures',
+		function() {
+			if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-delete-this") %>')) {
+				document.<portlet:namespace />fm.method = "post";
+				document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.DELETE %>";
+				document.<portlet:namespace />fm.<portlet:namespace />deleteStructureIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+				submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/dynamic_data_mapping/edit_structure" /></portlet:actionURL>");
+			}
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/view_template.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/view_template.jsp
new file mode 100644
index 0000000..6bb9e32
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/dynamic_data_mapping/view_template.jsp
@@ -0,0 +1,256 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/dynamic_data_mapping/init.jsp" %>
+
+<%
+String tabs1 = ParamUtil.getString(request, "tabs1", "templates");
+
+long classNameId = ParamUtil.getLong(request, "classNameId");
+long classPK = ParamUtil.getLong(request, "classPK");
+
+DDMStructure structure = null;
+
+long structureClassNameId = PortalUtil.getClassNameId(DDMStructure.class);
+
+if ((classPK > 0) && (structureClassNameId == classNameId)) {
+	structure = DDMStructureServiceUtil.getStructure(classPK);
+}
+
+boolean showHeader = ParamUtil.getBoolean(request, "showHeader", true);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/dynamic_data_mapping/view_template");
+portletURL.setParameter("tabs1", tabs1);
+portletURL.setParameter("classNameId", String.valueOf(classNameId));
+portletURL.setParameter("classPK", String.valueOf(classPK));
+
+boolean controlPanel = false;
+
+if (layout != null) {
+	Group group = layout.getGroup();
+
+	controlPanel = group.isControlPanel();
+}
+
+String title = ddmDisplay.getViewTemplatesTitle(structure, controlPanel, locale);
+%>
+
+<liferay-ui:error exception="<%= RequiredTemplateException.class %>">
+	<liferay-ui:message key="required-templates-could-not-be-deleted" />
+
+	<liferay-ui:message key="they-are-referenced-by-web-contents" />
+</liferay-ui:error>
+
+<c:if test="<%= showHeader %>">
+	<liferay-ui:header
+		backURL="<%= ddmDisplay.getViewTemplatesBackURL(liferayPortletRequest, liferayPortletResponse, classPK) %>"
+		title="<%= title %>"
+	/>
+</c:if>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= portletURL.toString() %>" />
+	<aui:input name="deleteTemplateIds" type="hidden" />
+
+	<%
+	String orderByCol = ParamUtil.getString(request, "orderByCol");
+	String orderByType = ParamUtil.getString(request, "orderByType");
+
+	if (Validator.isNotNull(orderByCol) && Validator.isNotNull(orderByType)) {
+		portalPreferences.setValue(PortletKeys.DYNAMIC_DATA_MAPPING, "entries-order-by-col", orderByCol);
+		portalPreferences.setValue(PortletKeys.DYNAMIC_DATA_MAPPING, "entries-order-by-type", orderByType);
+	}
+	else {
+		orderByCol = portalPreferences.getValue(PortletKeys.DYNAMIC_DATA_MAPPING, "entries-order-by-col", "id");
+		orderByType = portalPreferences.getValue(PortletKeys.DYNAMIC_DATA_MAPPING, "entries-order-by-type", "asc");
+	}
+
+	OrderByComparator orderByComparator = DDMUtil.getTemplateOrderByComparator(orderByCol, orderByType);
+	%>
+
+	<liferay-ui:search-container
+		orderByCol="<%= orderByCol %>"
+		orderByComparator="<%= orderByComparator %>"
+		orderByType="<%= orderByType %>"
+		rowChecker="<%= new RowChecker(renderResponse) %>"
+		searchContainer="<%= new TemplateSearch(renderRequest, portletURL) %>"
+	>
+		<liferay-util:include page="/html/portlet/dynamic_data_mapping/template_toolbar.jsp">
+			<liferay-util:param name="redirect" value="<%= currentURL %>" />
+			<liferay-util:param name="classNameId" value="<%= String.valueOf(classNameId) %>" />
+			<liferay-util:param name="classPK" value="<%= String.valueOf(classPK) %>" />
+		</liferay-util:include>
+
+		<liferay-ui:search-container-results>
+			<%@ include file="/html/portlet/dynamic_data_mapping/template_search_results.jspf" %>
+		</liferay-ui:search-container-results>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portlet.dynamicdatamapping.model.DDMTemplate"
+			keyProperty="templateId"
+			modelVar="template"
+		>
+
+			<%
+			PortletURL rowURL = renderResponse.createRenderURL();
+
+			rowURL.setParameter("struts_action", "/dynamic_data_mapping/edit_template");
+			rowURL.setParameter("redirect", currentURL);
+			rowURL.setParameter("groupId", String.valueOf(template.getGroupId()));
+			rowURL.setParameter("templateId", String.valueOf(template.getTemplateId()));
+			rowURL.setParameter("classNameId", String.valueOf(classNameId));
+			rowURL.setParameter("classPK", String.valueOf(template.getClassPK()));
+			rowURL.setParameter("type", template.getType());
+			rowURL.setParameter("structureAvailableFields", renderResponse.getNamespace() + "getAvailableFields");
+
+			String rowHREF = rowURL.toString();
+			%>
+
+			<liferay-ui:search-container-row-parameter
+				name="rowHREF"
+				value="<%= rowHREF %>"
+			/>
+
+			<%
+			Set<String> excludedColumnNames = ddmDisplay.getViewTemplatesExcludedColumnNames();
+			%>
+
+			<c:if test='<%= !excludedColumnNames.contains("id") %>'>
+				<liferay-ui:search-container-column-text
+					href="<%= rowHREF %>"
+					name="id"
+					orderable="<%= true %>"
+					orderableProperty="id"
+					property="templateId"
+				/>
+			</c:if>
+
+			<c:if test='<%= !excludedColumnNames.contains("name") %>'>
+				<liferay-ui:search-container-column-text
+					href="<%= rowHREF %>"
+					name="name"
+					value="<%= HtmlUtil.escape(LanguageUtil.get(pageContext, template.getName(locale))) %>"
+				/>
+			</c:if>
+
+			<liferay-ui:search-container-column-jsp
+				name="description"
+				path="/html/portlet/dynamic_data_mapping/template_description.jsp"
+			/>
+
+			<c:if test='<%= !excludedColumnNames.contains("structure") && (structure == null) %>'>
+
+				<%
+				String structureName = StringPool.BLANK;
+
+				if (template.getClassPK() > 0) {
+					DDMStructure templateStructure = DDMStructureServiceUtil.getStructure(template.getClassPK());
+
+					structureName = templateStructure.getName();
+				}
+				%>
+
+				<liferay-ui:search-container-column-text
+					href="<%= rowHREF %>"
+					name="structure"
+					value="<%= structureName %>"
+				/>
+			</c:if>
+
+			<c:if test='<%= !excludedColumnNames.contains("type") && (classNameId == 0) %>'>
+				<liferay-ui:search-container-column-text
+					href="<%= rowHREF %>"
+					name="type"
+					value="<%= ddmDisplay.getTemplateType(template, locale) %>"
+				/>
+			</c:if>
+
+			<c:if test='<%= !excludedColumnNames.contains("mode") %>'>
+				<liferay-ui:search-container-column-text
+					href="<%= rowHREF %>"
+					name="mode"
+					value="<%= LanguageUtil.get(pageContext, template.getMode()) %>"
+				/>
+			</c:if>
+
+			<c:if test='<%= !excludedColumnNames.contains("language") %>'>
+				<liferay-ui:search-container-column-text
+					href="<%= rowHREF %>"
+					name="language"
+					value='<%= LanguageUtil.get(pageContext, template.getLanguage() + "[stands-for]") %>'
+				/>
+			</c:if>
+
+			<c:if test='<%= !excludedColumnNames.contains("modified-date") %>'>
+				<liferay-ui:search-container-column-date
+					href="<%= rowHREF %>"
+					name="modified-date"
+					orderable="<%= true %>"
+					orderableProperty="modified-date"
+					value="<%= template.getModifiedDate() %>"
+				/>
+			</c:if>
+
+			<liferay-ui:search-container-column-jsp
+				align="right"
+				path="/html/portlet/dynamic_data_mapping/template_action.jsp"
+			/>
+		</liferay-ui:search-container-row>
+
+		<c:if test="<%= total > 0 %>">
+			<aui:button-row>
+				<aui:button cssClass="delete-templates-button" disabled="<%= true %>" name="delete" onClick='<%= renderResponse.getNamespace() + "deleteTemplates();" %>' value="delete" />
+			</aui:button-row>
+
+			<div class="separator"><!-- --></div>
+		</c:if>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script>
+	Liferay.Util.toggleSearchContainerButton('#<portlet:namespace />delete', '#<portlet:namespace /><%= searchContainerReference.getId() %>SearchContainer', document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+	function <portlet:namespace />copyTemplate(uri) {
+		Liferay.Util.openWindow(
+			{
+				id: '<portlet:namespace />copyTemplate',
+				refreshWindow: window,
+				title: '<%= UnicodeLanguageUtil.get(pageContext, "copy-template") %>',
+				uri: uri
+			}
+		);
+	}
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />deleteTemplates',
+		function() {
+			if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-delete-this") %>')) {
+				document.<portlet:namespace />fm.method = "post";
+				document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.DELETE %>";
+				document.<portlet:namespace />fm.<portlet:namespace />deleteTemplateIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+				submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/dynamic_data_mapping/edit_template" /></portlet:actionURL>");
+			}
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/attribute_columns.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/attribute_columns.jspf
new file mode 100644
index 0000000..a2de028
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/attribute_columns.jspf
@@ -0,0 +1,95 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:search-container-column-text
+	buffer="buffer"
+	name="name"
+>
+
+	<%
+	String localizedName = LanguageUtil.get(pageContext, name);
+
+	if (name.equals(localizedName)) {
+		localizedName = TextFormatter.format(name, TextFormatter.J);
+	}
+
+	buffer.append("<a href=\"");
+	buffer.append(rowURL.toString());
+	buffer.append("\">");
+	buffer.append("<strong>");
+	buffer.append(HtmlUtil.escape(localizedName));
+	buffer.append("</strong>");
+	buffer.append("</a>");
+
+	buffer.append("<br /><span class=\"key\">");
+	buffer.append(LanguageUtil.get(pageContext, "key"));
+	buffer.append("</span>: ");
+
+	buffer.append("<a href=\"");
+	buffer.append(rowURL.toString());
+	buffer.append("\">");
+	buffer.append(HtmlUtil.escape(name));
+	buffer.append("</a>");
+	%>
+
+</liferay-ui:search-container-column-text>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="type"
+	value="<%= LanguageUtil.get(pageContext, ExpandoColumnConstants.getTypeLabel(type)) %>"
+/>
+
+<liferay-ui:search-container-column-text
+	buffer="buffer"
+	href="<%= rowURL %>"
+	name="hidden"
+>
+
+	<%
+	boolean hidden = GetterUtil.getBoolean(typeSettings.getProperty(ExpandoColumnConstants.PROPERTY_HIDDEN));
+
+	buffer.append(LanguageUtil.get(pageContext, String.valueOf(hidden)));
+	%>
+
+</liferay-ui:search-container-column-text>
+
+<liferay-ui:search-container-column-text
+	buffer="buffer"
+	href="<%= rowURL %>"
+	name="searchable"
+>
+
+	<%
+	int indexType = GetterUtil.getInteger(typeSettings.getProperty(ExpandoColumnConstants.INDEX_TYPE));
+
+	if (indexType == ExpandoColumnConstants.INDEX_TYPE_KEYWORD) {
+		buffer.append(LanguageUtil.get(pageContext, "as-keyword"));
+	}
+	else if (indexType == ExpandoColumnConstants.INDEX_TYPE_TEXT) {
+		buffer.append(LanguageUtil.get(pageContext, "as-text"));
+	}
+	else {
+		buffer.append(LanguageUtil.get(pageContext, "not-searchable"));
+	}
+	%>
+
+</liferay-ui:search-container-column-text>
+
+<liferay-ui:search-container-column-jsp
+	align="right"
+	path="/html/portlet/expando/expando_action.jsp"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/css/.sass-cache/main.css
new file mode 100644
index 0000000..9ed8c32
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/css/.sass-cache/main.css
@@ -0,0 +1,3 @@
+.portlet-expando .short-input-text input {
+  width: 25px; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/css/main.css
new file mode 100644
index 0000000..5641ee8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/css/main.css
@@ -0,0 +1,5 @@
+.portlet-expando {
+	.short-input-text input {
+		width: 25px;
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/edit_expando.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/edit_expando.jsp
new file mode 100644
index 0000000..7df6c6a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/edit_expando.jsp
@@ -0,0 +1,288 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/expando/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+String modelResource = ParamUtil.getString(request, "modelResource");
+String modelResourceName = ResourceActionsUtil.getModelResource(pageContext, modelResource);
+
+ExpandoColumn column = (ExpandoColumn)request.getAttribute(WebKeys.EXPANDO_COLUMN);
+
+long columnId = BeanParamUtil.getLong(column, request, "columnId");
+int type = BeanParamUtil.getInteger(column, request, "type");
+
+ExpandoBridge expandoBridge = ExpandoBridgeFactoryUtil.getExpandoBridge(company.getCompanyId(), modelResource);
+
+UnicodeProperties properties = new UnicodeProperties(true);
+Serializable defaultValue = null;
+
+if (column != null) {
+	properties = expandoBridge.getAttributeProperties(column.getName());
+	defaultValue = expandoBridge.getAttributeDefault(column.getName());
+}
+
+boolean propertyHidden = GetterUtil.getBoolean(properties.get(ExpandoColumnConstants.PROPERTY_HIDDEN));
+boolean propertyVisibleWithUpdatePermission = GetterUtil.getBoolean(properties.get(ExpandoColumnConstants.PROPERTY_VISIBLE_WITH_UPDATE_PERMISSION));
+int propertyIndexType = GetterUtil.getInteger(properties.get(ExpandoColumnConstants.INDEX_TYPE));
+boolean propertySecret = GetterUtil.getBoolean(properties.get(ExpandoColumnConstants.PROPERTY_SECRET));
+int propertyHeight = GetterUtil.getInteger(properties.get(ExpandoColumnConstants.PROPERTY_HEIGHT));
+int propertyWidth = GetterUtil.getInteger(properties.get(ExpandoColumnConstants.PROPERTY_WIDTH));
+String propertyDisplayType = GetterUtil.getString(properties.get(ExpandoColumnConstants.PROPERTY_DISPLAY_TYPE));
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/expando/view_attributes");
+portletURL.setParameter("redirect", redirect);
+portletURL.setParameter("modelResource", modelResource);
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	localizeTitle="<%= false %>"
+	title='<%= modelResourceName + ": " + ((column == null) ? LanguageUtil.get(locale, "new-custom-field") : column.getName()) %>'
+/>
+
+<portlet:actionURL var="editExpandoURL">
+	<portlet:param name="struts_action" value="/expando/edit_expando" />
+</portlet:actionURL>
+
+<aui:form action="<%= editExpandoURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveExpando();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="columnId" type="hidden" value="<%= columnId %>" />
+	<aui:input name="modelResource" type="hidden" value="<%= modelResource %>" />
+
+	<liferay-ui:error exception="<%= ColumnNameException.class %>" message="please-enter-a-valid-name" />
+	<liferay-ui:error exception="<%= ColumnTypeException.class %>" message="please-select-a-valid-type" />
+	<liferay-ui:error exception="<%= DuplicateColumnNameException.class %>" message="please-enter-a-unique-name" />
+	<liferay-ui:error exception="<%= ValueDataException.class %>" message="please-enter-a-valid-value" />
+
+	<aui:fieldset>
+		<c:choose>
+			<c:when test="<%= column != null %>">
+				<aui:field-wrapper helpMessage="custom-field-key-help" label="key">
+					<aui:input name="name" type="hidden" value="<%= column.getName() %>" />
+
+					<liferay-ui:input-resource url="<%= column.getName() %>" />
+				</aui:field-wrapper>
+			</c:when>
+			<c:otherwise>
+				<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" helpMessage="custom-field-key-help" label="key" name="name" />
+			</c:otherwise>
+		</c:choose>
+
+		<c:choose>
+			<c:when test="<%= column != null %>">
+				<aui:field-wrapper label="type">
+					<aui:input name="type" type="hidden" value="<%= type %>" />
+
+					<liferay-ui:input-resource url="<%= LanguageUtil.get(pageContext, ExpandoColumnConstants.getTypeLabel(type)) %>" />
+				</aui:field-wrapper>
+			</c:when>
+			<c:otherwise>
+				<aui:select helpMessage="custom-field-type-help" name="type">
+					<optgroup label="<liferay-ui:message key="presets" />">
+						<aui:option label="selection-of-integer-values" value="PresetSelectionIntegerArray()" />
+						<aui:option label="selection-of-decimal-values" value="PresetSelectionDoubleArray()" />
+						<aui:option label="selection-of-text-values" value="PresetSelectionStringArray()" />
+						<aui:option label="text-box" value="PresetTextBox()" />
+						<aui:option label="text-box-indexed" value="PresetTextBoxIndexed()" />
+						<aui:option label="text-field-secret" value="PresetTextFieldSecret()" />
+						<aui:option label="text-field-indexed" selected="<%= true %>" value="PresetTextFieldIndexed()" />
+					</optgroup>
+					<optgroup label="<liferay-ui:message key="primitives" />">
+
+						<%
+						for (int curType : ExpandoColumnConstants.TYPES) {
+							if ((curType == ExpandoColumnConstants.BOOLEAN_ARRAY) || (curType == ExpandoColumnConstants.DATE_ARRAY)) {
+								continue;
+							}
+						%>
+
+							<aui:option label="<%= ExpandoColumnConstants.getTypeLabel(curType) %>" value="<%= curType %>" />
+
+						<%
+						}
+						%>
+
+					</optgroup>
+				</aui:select>
+			</c:otherwise>
+		</c:choose>
+
+		<c:if test="<%= column != null %>">
+			<c:choose>
+				<c:when test="<%= type == ExpandoColumnConstants.BOOLEAN %>">
+
+					<%
+					boolean curValue = ((Boolean)defaultValue).booleanValue();
+					%>
+
+					<aui:select name="defaultValue">
+						<aui:option label="<%= true %>" selected="<%= curValue %>" value="true" />
+						<aui:option label="<%= false %>" selected="<%= !curValue %>" value="false" />
+					</aui:select>
+				</c:when>
+				<c:when test="<%= type == ExpandoColumnConstants.BOOLEAN_ARRAY %>">
+				</c:when>
+				<c:when test="<%= type == ExpandoColumnConstants.DATE %>">
+
+					<%
+					Calendar defaultValueDate = CalendarFactoryUtil.getCalendar(timeZone, locale);
+
+					if (defaultValue != null) {
+						defaultValueDate.setTime((Date)defaultValue);
+					}
+					%>
+
+					<aui:field-wrapper label="default-value">
+						<liferay-ui:input-date
+							dayParam="defaultValueDay"
+							dayValue="<%= defaultValueDate.get(Calendar.DATE) %>"
+							disabled="<%= false %>"
+							firstDayOfWeek="<%= defaultValueDate.getFirstDayOfWeek() - 1 %>"
+							monthParam="defaultValueMonth"
+							monthValue="<%= defaultValueDate.get(Calendar.MONTH) %>"
+							yearParam="defaultValueYear"
+							yearValue="<%= defaultValueDate.get(Calendar.YEAR) %>"
+						/>
+
+						<liferay-ui:input-time
+							amPmParam="defaultValueAmPm"
+							amPmValue="<%= defaultValueDate.get(Calendar.AM_PM) %>"
+							disabled="<%= false %>"
+							hourParam="defaultValueHour"
+							hourValue="<%= defaultValueDate.get(Calendar.HOUR) %>"
+							minuteParam="defaultValueMinute"
+							minuteValue="<%= defaultValueDate.get(Calendar.MINUTE) %>"
+						/>
+					</aui:field-wrapper>
+				</c:when>
+				<c:when test="<%= type == ExpandoColumnConstants.DATE_ARRAY %>">
+				</c:when>
+				<c:when test="<%= type == ExpandoColumnConstants.DOUBLE_ARRAY %>">
+					<aui:input cssClass="lfr-textarea-container" helpMessage="enter-one-value-per-line" label="values" name="defaultValue" required="<%= true %>" type="textarea" value="<%= StringUtil.merge((double[])defaultValue, StringPool.NEW_LINE) %>" />
+				</c:when>
+				<c:when test="<%= type == ExpandoColumnConstants.FLOAT_ARRAY %>">
+					<aui:input cssClass="lfr-textarea-container" helpMessage="enter-one-value-per-line" label="values" name="defaultValue" required="<%= true %>" type="textarea" value="<%= StringUtil.merge((float[])defaultValue, StringPool.NEW_LINE) %>" />
+				</c:when>
+				<c:when test="<%= type == ExpandoColumnConstants.INTEGER_ARRAY %>">
+					<aui:input cssClass="lfr-textarea-container" helpMessage="enter-one-value-per-line" label="values" name="defaultValue" required="<%= true %>" type="textarea" value="<%= StringUtil.merge((int[])defaultValue, StringPool.NEW_LINE) %>" />
+				</c:when>
+				<c:when test="<%= type == ExpandoColumnConstants.LONG_ARRAY %>">
+					<aui:input cssClass="lfr-textarea-container" helpMessage="enter-one-value-per-line" label="values" name="defaultValue" required="<%= true %>" type="textarea" value="<%= StringUtil.merge((long[])defaultValue, StringPool.NEW_LINE) %>" />
+				</c:when>
+				<c:when test="<%= type == ExpandoColumnConstants.NUMBER_ARRAY %>">
+					<aui:input cssClass="lfr-textarea-container" helpMessage="enter-one-value-per-line" label="values" name="defaultValue" required="<%= true %>" type="textarea" value="<%= StringUtil.merge((Number[])defaultValue, StringPool.NEW_LINE) %>" />
+				</c:when>
+				<c:when test="<%= type == ExpandoColumnConstants.SHORT_ARRAY %>">
+					<aui:input cssClass="lfr-textarea-container" helpMessage="enter-one-value-per-line" label="values" name="defaultValue" required="<%= true %>" type="textarea" value="<%= StringUtil.merge((short[])defaultValue, StringPool.NEW_LINE) %>" />
+				</c:when>
+				<c:when test="<%= type == ExpandoColumnConstants.STRING_ARRAY %>">
+					<aui:input cssClass="lfr-textarea-container" helpMessage="enter-one-value-per-line" label="values" name="defaultValue" required="<%= true %>" type="textarea" value="<%= StringUtil.merge((String[])defaultValue, StringPool.NEW_LINE) %>" />
+				</c:when>
+				<c:otherwise>
+					<aui:input cssClass="lfr-input-text-container" name="defaultValue" type="text" value="<%= String.valueOf(defaultValue) %>" />
+				</c:otherwise>
+			</c:choose>
+		</c:if>
+	</aui:fieldset>
+
+	<c:if test="<%= column != null %>">
+		<aui:fieldset label="properties">
+			<aui:input name="PropertyName--hidden--" type="hidden" value="hidden" />
+
+			<aui:select helpMessage="custom-field-hidden-help" label="hidden" name="Property--hidden--">
+				<aui:option label="<%= true %>" selected="<%= propertyHidden %>" value="1" />
+				<aui:option label="<%= false %>" selected="<%= !propertyHidden %>" value="0" />
+			</aui:select>
+
+			<aui:input name="PropertyName--visible-with-update-permission--" type="hidden" value="visible-with-update-permission" />
+
+			<aui:select helpMessage="custom-field-visible-with-update-permission-help" label="visible-with-update-permission" name="Property--visible-with-update-permission--">
+				<aui:option label="<%= true %>" selected="<%= propertyVisibleWithUpdatePermission %>" value="1" />
+				<aui:option label="<%= false %>" selected="<%= !propertyVisibleWithUpdatePermission %>" value="0" />
+			</aui:select>
+
+			<aui:input name="PropertyName--index-type--" type="hidden" value="index-type" />
+
+			<aui:select helpMessage="custom-field-index-type-help" label="searchability" name="Property--index-type--">
+				<aui:option label="not-searchable" selected="<%= propertyIndexType == ExpandoColumnConstants.INDEX_TYPE_NONE %>" value="<%= ExpandoColumnConstants.INDEX_TYPE_NONE %>" />
+
+				<c:if test="<%= (type == ExpandoColumnConstants.STRING) || (type == ExpandoColumnConstants.STRING_ARRAY) %>">
+					<aui:option label="as-text" selected="<%= propertyIndexType == ExpandoColumnConstants.INDEX_TYPE_TEXT %>" value="<%= ExpandoColumnConstants.INDEX_TYPE_TEXT %>" />
+				</c:if>
+
+				<aui:option label="as-keyword" selected="<%= propertyIndexType == ExpandoColumnConstants.INDEX_TYPE_KEYWORD %>" value="<%= ExpandoColumnConstants.INDEX_TYPE_KEYWORD %>" />
+			</aui:select>
+
+			<c:if test="<%= (type == ExpandoColumnConstants.DOUBLE_ARRAY) || (type == ExpandoColumnConstants.FLOAT_ARRAY) || (type == ExpandoColumnConstants.INTEGER_ARRAY) || (type == ExpandoColumnConstants.LONG_ARRAY) || (type == ExpandoColumnConstants.NUMBER_ARRAY) || (type == ExpandoColumnConstants.SHORT_ARRAY) || (type == ExpandoColumnConstants.STRING_ARRAY) %>">
+				<aui:input name="PropertyName--display-type--" type="hidden" value="display-type" />
+
+				<aui:select helpMessage="custom-field-display-type-help" label="display-type" name="Property--display-type--">
+					<aui:option label="checkbox" selected="<%= propertyDisplayType.equals(ExpandoColumnConstants.PROPERTY_DISPLAY_TYPE_CHECKBOX) %>" value="<%= ExpandoColumnConstants.PROPERTY_DISPLAY_TYPE_CHECKBOX %>" />
+					<aui:option label="radio" selected="<%= propertyDisplayType.equals(ExpandoColumnConstants.PROPERTY_DISPLAY_TYPE_RADIO) %>" value="<%= ExpandoColumnConstants.PROPERTY_DISPLAY_TYPE_RADIO %>" />
+					<aui:option label="selection-list" selected="<%= propertyDisplayType.equals(ExpandoColumnConstants.PROPERTY_DISPLAY_TYPE_SELECTION_LIST) %>" value="<%= ExpandoColumnConstants.PROPERTY_DISPLAY_TYPE_SELECTION_LIST %>" />
+					<aui:option label="text-box" selected="<%= propertyDisplayType.equals(ExpandoColumnConstants.PROPERTY_DISPLAY_TYPE_TEXT_BOX) %>" value="<%= ExpandoColumnConstants.PROPERTY_DISPLAY_TYPE_TEXT_BOX %>" />
+				</aui:select>
+			</c:if>
+
+			<c:if test="<%= type == ExpandoColumnConstants.STRING %>">
+				<aui:input name="PropertyName--secret--" type="hidden" value="secret" />
+
+				<aui:select helpMessage="custom-field-secret-help" label="secret" name="Property--secret--">
+					<aui:option label="<%= true %>" selected="<%= propertySecret %>" value="1" />
+					<aui:option label="<%= false %>" selected="<%= !propertySecret %>" value="0" />
+				</aui:select>
+
+				<aui:input name="PropertyName--height--" type="hidden" value="height" />
+
+				<aui:input cssClass="lfr-input-text short-input-text" helpMessage="custom-field-height-help" label="height" name="Property--height--" type="text" value="<%= propertyHeight %>" />
+
+				<aui:input name="PropertyName--width--" type="hidden" value="width" />
+
+				<aui:input cssClass="lfr-input-text short-input-text" helpMessage="custom-field-height-help" label="width" name="Property--width--" type="text" value="<%= propertyWidth %>" />
+			</c:if>
+		</aui:fieldset>
+	</c:if>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />saveExpando(options) {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (column == null) ? Constants.ADD : Constants.UPDATE %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
+
+<%
+PortalUtil.addPortletBreadcrumbEntry(request, modelResourceName, portletURL.toString());
+
+if (column != null) {
+	PortalUtil.addPortletBreadcrumbEntry(request, column.getName(), null);
+}
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, ((column == null) ? "add-attribute" : "edit")), currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/error.jsp
new file mode 100644
index 0000000..c4cd03f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/error.jsp
@@ -0,0 +1,25 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/expando/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= NoSuchColumnException.class %>" message="the-custom-field-could-not-be-found" />
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/expando_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/expando_action.jsp
new file mode 100644
index 0000000..8c0ab60
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/expando_action.jsp
@@ -0,0 +1,74 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/expando/init.jsp" %>
+
+<%
+SearchContainer searchContainer = (SearchContainer)request.getAttribute("liferay-ui:search:searchContainer");
+
+String redirect = searchContainer.getIteratorURL().toString();
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+ExpandoColumn expandoColumn = (ExpandoColumn)row.getParameter("expandoColumn");
+String modelResource = (String)row.getParameter("modelResource");
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= ExpandoColumnPermissionUtil.contains(permissionChecker, expandoColumn, ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/expando/edit_expando" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="columnId" value="<%= String.valueOf(expandoColumn.getColumnId()) %>" />
+			<portlet:param name="modelResource" value="<%= modelResource %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= ExpandoColumnPermissionUtil.contains(permissionChecker, expandoColumn, ActionKeys.PERMISSIONS) %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= ExpandoColumn.class.getName() %>"
+			modelResourceDescription="<%= HtmlUtil.escape(expandoColumn.getName()) %>"
+			resourcePrimKey="<%= String.valueOf(expandoColumn.getColumnId()) %>"
+			var="permissionsURL"
+			windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			method="get"
+			url="<%= permissionsURL %>"
+			useDialog="<%= true %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= ExpandoColumnPermissionUtil.contains(permissionChecker, expandoColumn, ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/expando/edit_expando" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="columnId" value="<%= String.valueOf(expandoColumn.getColumnId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete
+			url="<%= deleteURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/init.jsp
new file mode 100644
index 0000000..5f3476c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/init.jsp
@@ -0,0 +1,32 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.expando.ColumnNameException" %><%@
+page import="com.liferay.portlet.expando.ColumnTypeException" %><%@
+page import="com.liferay.portlet.expando.DuplicateColumnNameException" %><%@
+page import="com.liferay.portlet.expando.NoSuchColumnException" %><%@
+page import="com.liferay.portlet.expando.ValueDataException" %><%@
+page import="com.liferay.portlet.expando.model.CustomAttributesDisplay" %><%@
+page import="com.liferay.portlet.expando.model.ExpandoColumn" %><%@
+page import="com.liferay.portlet.expando.model.ExpandoColumnConstants" %><%@
+page import="com.liferay.portlet.expando.service.ExpandoColumnLocalServiceUtil" %><%@
+page import="com.liferay.portlet.expando.service.permission.ExpandoColumnPermissionUtil" %><%@
+page import="com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil" %><%@
+page import="com.liferay.portlet.expando.util.comparator.CustomAttributesDisplayComparator" %>
+
+<%@ include file="/html/portlet/expando/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/resource_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/resource_action.jsp
new file mode 100644
index 0000000..921dcc2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/resource_action.jsp
@@ -0,0 +1,42 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/expando/init.jsp" %>
+
+<%
+SearchContainer searchContainer = (SearchContainer)request.getAttribute("liferay-ui:search:searchContainer");
+
+String redirect = searchContainer.getIteratorURL().toString();
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+CustomAttributesDisplay customAttributesDisplay = (CustomAttributesDisplay)row.getParameter("customAttributesDisplay");
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= permissionChecker.isCompanyAdmin() %>">
+		<portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/expando/view_attributes" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="modelResource" value="<%= customAttributesDisplay.getClassName() %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/view.jsp
new file mode 100644
index 0000000..d7cee85
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/view.jsp
@@ -0,0 +1,109 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/expando/init.jsp" %>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+List<String> headerNames = new ArrayList<String>();
+
+headerNames.add("resource");
+headerNames.add("custom-fields");
+
+List<CustomAttributesDisplay> customAttributesDisplays = PortletLocalServiceUtil.getCustomAttributesDisplays();
+
+Collections.sort(customAttributesDisplays, new CustomAttributesDisplayComparator(locale));
+%>
+
+<liferay-ui:search-container
+	emptyResultsMessage='<%= LanguageUtil.get(pageContext, "custom-fields-are-not-enabled-for-any-resource") %>'
+	iteratorURL="<%= portletURL %>"
+>
+	<liferay-ui:search-container-results
+		results="<%= customAttributesDisplays %>"
+		total="<%= customAttributesDisplays.size() %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portlet.expando.model.CustomAttributesDisplay"
+		modelVar="customAttributesDisplay"
+		stringKey="<%= true %>"
+	>
+		<portlet:renderURL var="rowURL">
+			<portlet:param name="struts_action" value="/expando/view_attributes" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="modelResource" value="<%= customAttributesDisplay.getClassName() %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:search-container-row-parameter
+			name="customAttributesDisplay"
+			value="<%= customAttributesDisplay %>"
+		/>
+
+		<liferay-ui:search-container-column-text
+			buffer="buffer"
+			href="<%= rowURL %>"
+			name="resource"
+		>
+
+			<%
+			buffer.append("<img align=\"left\" border=\"0\" src=\"");
+			buffer.append(customAttributesDisplay.getIconPath(themeDisplay));
+			buffer.append("\" style=\"margin-right: 5px;\">");
+			buffer.append(ResourceActionsUtil.getModelResource(locale, customAttributesDisplay.getClassName()));
+			%>
+
+		</liferay-ui:search-container-column-text>
+
+		<liferay-ui:search-container-column-text
+			buffer="buffer"
+			href="<%= rowURL %>"
+			name="custom-fields"
+		>
+
+			<%
+			ExpandoBridge expandoBridge = ExpandoBridgeFactoryUtil.getExpandoBridge(company.getCompanyId(), customAttributesDisplay.getClassName());
+
+			List<String> attributeNames = Collections.list(expandoBridge.getAttributeNames());
+
+			for (int i = 0; i < attributeNames.size(); i++) {
+				if (i > 0) {
+					buffer.append(", ");
+				}
+
+				String name = attributeNames.get(i);
+
+				String localizedName = LanguageUtil.get(pageContext, name);
+
+				if (name.equals(localizedName)) {
+					localizedName = TextFormatter.format(name, TextFormatter.J);
+				}
+
+				buffer.append(HtmlUtil.escape(localizedName));
+			}
+			%>
+
+		</liferay-ui:search-container-column-text>
+
+		<liferay-ui:search-container-column-jsp
+			align="right"
+			path="/html/portlet/expando/resource_action.jsp"
+		/>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator paginate="<%= false %>" />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/view_attributes.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/view_attributes.jsp
new file mode 100644
index 0000000..0c98abe
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/expando/view_attributes.jsp
@@ -0,0 +1,106 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/expando/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+String modelResource = ParamUtil.getString(request, "modelResource");
+String modelResourceName = ResourceActionsUtil.getModelResource(pageContext, modelResource);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/expando/view_attributes");
+portletURL.setParameter("redirect", redirect);
+portletURL.setParameter("modelResource", modelResource);
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	localizeTitle="<%= false %>"
+	title="<%= modelResourceName %>"
+/>
+
+<%
+ExpandoBridge expandoBridge = ExpandoBridgeFactoryUtil.getExpandoBridge(company.getCompanyId(), modelResource);
+
+List<String> attributeNames = Collections.list(expandoBridge.getAttributeNames());
+%>
+
+<liferay-ui:search-container
+	emptyResultsMessage='<%= LanguageUtil.format(pageContext, "no-custom-fields-are-defined-for-x", modelResourceName) %>'
+	iteratorURL="<%= portletURL %>"
+>
+	<liferay-ui:search-container-results
+		results="<%= attributeNames %>"
+		total="<%= attributeNames.size() %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="java.lang.String"
+		modelVar="name"
+		stringKey="<%= true %>"
+	>
+
+		<%
+		int type = expandoBridge.getAttributeType(name);
+
+		ExpandoColumn expandoColumn = ExpandoColumnLocalServiceUtil.getDefaultTableColumn(company.getCompanyId(), modelResource, name);
+
+		UnicodeProperties typeSettings = expandoColumn.getTypeSettingsProperties();
+		%>
+
+		<portlet:renderURL var="rowURL">
+			<portlet:param name="struts_action" value="/expando/edit_expando" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="columnId" value="<%= String.valueOf(expandoColumn.getColumnId()) %>" />
+			<portlet:param name="modelResource" value="<%= modelResource %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:search-container-row-parameter
+			name="expandoColumn"
+			value="<%= expandoColumn %>"
+		/>
+
+		<liferay-ui:search-container-row-parameter
+			name="modelResource"
+			value="<%= modelResource %>"
+		/>
+
+		<%@ include file="/html/portlet/expando/attribute_columns.jspf" %>
+	</liferay-ui:search-container-row>
+
+	<c:if test="<%= PortletPermissionUtil.contains(permissionChecker, PortletKeys.EXPANDO, ActionKeys.ADD_EXPANDO) %>">
+		<aui:button-row>
+			<aui:button onClick='<%= renderResponse.getNamespace() + "addExpando();" %>' value="add-custom-field" />
+		</aui:button-row>
+
+		<br />
+	</c:if>
+
+	<liferay-ui:search-iterator paginate="<%= false %>" />
+</liferay-ui:search-container>
+
+<aui:script>
+	function <portlet:namespace />addExpando() {
+		submitForm(document.hrefFm, '<portlet:renderURL><portlet:param name="struts_action" value="/expando/edit_expando" /><portlet:param name="redirect" value="<%= currentURL %>" /><portlet:param name="modelResource" value="<%= modelResource %>" /></portlet:renderURL>');
+	}
+</aui:script>
+
+<%
+PortalUtil.addPortletBreadcrumbEntry(request, modelResourceName, portletURL.toString());
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/flags/edit_entry.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/flags/edit_entry.jsp
new file mode 100644
index 0000000..640997f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/flags/edit_entry.jsp
@@ -0,0 +1,149 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%
+String className = ParamUtil.getString(request, "className");
+long classPK = ParamUtil.getLong(request, "classPK");
+String contentTitle = ParamUtil.getString(request, "contentTitle");
+String contentURL = ParamUtil.getString(request, "contentURL");
+long reportedUserId = ParamUtil.getLong(request, "reportedUserId");
+%>
+
+<style type="text/css">
+	.portlet-flags .form fieldset {
+		border: none;
+		padding: 0;
+		width: 100%;
+	}
+</style>
+
+<div class="portlet-flags" id="<portlet:namespace />flagsPopup">
+	<aui:form method="post" name="flagsForm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "flag();" %>'>
+		<p>
+			<%= LanguageUtil.format(pageContext, "you-are-about-to-report-a-violation-of-our-x-terms-of-use.-all-reports-are-strictly-confidential", themeDisplay.getPathMain() + "/portal/terms_of_use") %>
+		</p>
+
+		<aui:fieldset>
+			<aui:select label="reason-for-the-report" name="reason">
+				<aui:option value="" />
+
+				<%
+				for (String reason : PropsValues.FLAGS_REASONS) {
+				%>
+
+					<aui:option label="<%= reason %>" />
+
+				<%
+				}
+				%>
+
+				<aui:option label="other" />
+			</aui:select>
+
+			<span class="hide" id="<portlet:namespace />otherReasonContainer">
+				<aui:input name="otherReason" />
+			</span>
+
+			<c:if test="<%= !themeDisplay.isSignedIn() %>">
+				<aui:input label="email-address" name="reporterEmailAddress" />
+			</c:if>
+		</aui:fieldset>
+
+		<aui:button-row>
+			<aui:button name="flagsSubmit" type="submit" />
+		</aui:button-row>
+	</aui:form>
+</div>
+
+<div class="hide" id="<portlet:namespace />confirmation">
+	<p><strong><liferay-ui:message key="thank-you-for-your-report" /></strong></p>
+
+	<p><%= LanguageUtil.format(pageContext, "although-we-cannot-disclose-our-final-decision,-we-do-review-every-report-and-appreciate-your-effort-to-make-sure-x-is-a-safe-environment-for-everyone", HtmlUtil.escape(company.getName())) %></p>
+</div>
+
+<div class="hide" id="<portlet:namespace />error">
+	<p><strong><liferay-ui:message key="an-error-occurred-while-sending-the-report.-please-try-again-in-a-few-minutes" /></strong></p>
+</div>
+
+<aui:script use="liferay-util-window">
+	function <portlet:namespace />flag() {
+		var reasonNode = A.one('#<portlet:namespace />reason');
+		var reason = (reasonNode && reasonNode.val()) || '';
+
+		if (reason == 'other') {
+			var otherReasonNode = A.one('#<portlet:namespace />otherReason');
+
+			reason = (otherReasonNode && otherReasonNode.val()) || '<%= UnicodeLanguageUtil.get(pageContext, "no-reason-specified") %>';
+		}
+
+		var reporterEmailAddressNode = A.one('#<portlet:namespace />reporterEmailAddress');
+		var reporterEmailAddress = (reporterEmailAddressNode && reporterEmailAddressNode.val()) || '';
+
+		var flagsPopupNode = A.one('#<portlet:namespace />flagsPopup');
+		var errorMessageNode = A.one('#<portlet:namespace />error');
+		var confirmationMessageNode = A.one('#<portlet:namespace />confirmation');
+
+		var errorMessage = (errorMessageNode && errorMessageNode.html()) || '';
+		var confirmationMessage = (confirmationMessageNode && confirmationMessageNode.html()) || '';
+
+		var setDialogContent = function(message) {
+			var dialog = Liferay.Util.Window.getByChild(flagsPopupNode);
+
+			dialog.setStdModContent('body', message);
+		};
+
+		var data = Liferay.Util.ns(
+			'<portlet:namespace />',
+			{
+				className: '<%= HtmlUtil.escape(className) %>',
+				classPK: '<%= classPK %>',
+				contentTitle: '<%= HtmlUtil.escape(contentTitle) %>',
+				contentURL: '<%= HtmlUtil.escape(contentURL) %>',
+				reason: reason,
+				reportedUserId: '<%= reportedUserId %>',
+				reporterEmailAddress: reporterEmailAddress
+			}
+		);
+
+		A.io.request(
+			'<liferay-portlet:actionURL portletName="<%= PortletKeys.FLAGS %>" windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>"><portlet:param name="struts_action" value="/flags/edit_entry" /></liferay-portlet:actionURL>',
+			{
+				data: data,
+				on: {
+					failure: function() {
+						setDialogContent(errorMessage);
+					},
+					success: function() {
+						setDialogContent(confirmationMessage);
+					}
+				}
+			}
+		);
+	}
+
+	Liferay.Util.toggleSelectBox('<portlet:namespace />reason', 'other', '<portlet:namespace />otherReasonContainer');
+
+	A.one('#<portlet:namespace />flagsSubmit').on(
+		'click',
+		function(event) {
+			<portlet:namespace />flag();
+
+			event.halt();
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/add_activity_counter.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/add_activity_counter.jsp
new file mode 100644
index 0000000..33b9692
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/add_activity_counter.jsp
@@ -0,0 +1,99 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/group_statistics/init.jsp" %>
+
+<%
+int index = ParamUtil.getInteger(request, "index", GetterUtil.getInteger((String)request.getAttribute("configuration.jsp-index")));
+
+String displayActivityCounterName = PrefsParamUtil.getString(portletPreferences, request, "displayActivityCounterName" + index);
+String chartType = PrefsParamUtil.getString(portletPreferences, request, "chartType" + index);
+int chartWidth = PrefsParamUtil.getInteger(portletPreferences, request, "chartWidth" + index, 35);
+String dataRange = PrefsParamUtil.getString(portletPreferences, request, "dataRange" + index);
+
+List<String> activityCounterNames = SocialConfigurationUtil.getActivityCounterNames(SocialActivityCounterConstants.TYPE_ACTOR);
+
+activityCounterNames.addAll(SocialConfigurationUtil.getActivityCounterNames(SocialActivityCounterConstants.TYPE_ASSET));
+
+activityCounterNames.add(SocialActivityCounterConstants.NAME_ASSET_ACTIVITIES);
+activityCounterNames.add(SocialActivityCounterConstants.NAME_USER_ACHIEVEMENTS);
+activityCounterNames.add(SocialActivityCounterConstants.NAME_USER_ACTIVITIES);
+
+Collections.sort(activityCounterNames, new SocialActivityCounterNameComparator(locale));
+%>
+
+<div class="field-row">
+	<span class="field field-inline inline-text">
+		<liferay-ui:message key="group-statistics-add-counter-first-text" />
+	</span>
+
+	<aui:select inlineField="<%= true %>" label="" name='<%= "preferences--displayActivityCounterName" + index + "--" %>'>
+
+		<%
+		for (String activityCounterName : activityCounterNames) {
+			if (activityCounterName.equals(SocialActivityCounterConstants.NAME_CONTRIBUTION) || activityCounterName.equals(SocialActivityCounterConstants.NAME_PARTICIPATION)) {
+				continue;
+			}
+		%>
+
+			<aui:option label='<%= LanguageUtil.get(pageContext, "group.statistics.config."+ activityCounterName) %>' selected="<%= activityCounterName.equals(displayActivityCounterName) %>" value="<%= activityCounterName %>" />
+
+		<%
+		}
+		%>
+
+	</aui:select>
+
+	<span class="field field-inline inline-text">
+		<liferay-ui:message key="group-statistics-add-counter-second-text" />
+	</span>
+
+	<aui:select inlineField="<%= true %>" label="" name='<%= "preferences--chartType" + index + "--" %>'>
+		<aui:option label="group-statistics-chart-type-area-diagram" selected='<%= chartType.equals("area") %>' value="area" />
+		<aui:option label="group-statistics-chart-type-column-diagram" selected='<%= chartType.equals("column") %>' value="column" />
+		<aui:option label="group-statistics-chart-type-activity-distribution" selected='<%= chartType.equals("pie") %>' value="pie" />
+		<aui:option label="group-statistics-chart-type-tag-cloud" selected='<%= chartType.equals("tag-cloud") %>' value="tag-cloud" />
+	</aui:select>
+
+	<span class="field field-inline inline-text">
+		<liferay-ui:message key="group-statistics-add-counter-third-text" />
+	</span>
+
+	<aui:select inlineField="<%= true %>" label="" name='<%= "preferences--dataRange" + index + "--" %>'>
+		<aui:option label="group-statistics-data-range-this-year" selected='<%= dataRange.equals("year") %>' value="year" />
+		<aui:option label="group-statistics-data-range-last-12-months" selected='<%= dataRange.equals("12months") %>' value="12months" />
+	</aui:select>
+</div>
+
+<div class="field-row">
+	<span class="field field-inline inline-text">
+		<liferay-ui:message key="chart-width" />:
+	</span>
+
+	<aui:select inlineField="<%= true %>" label="" name='<%= "preferences--chartWidth" + index + "--" %>'>
+
+		<%
+		for (int i = 5; i < 100; i = i + 5) {
+		%>
+
+			<aui:option label="<%= i + StringPool.PERCENT %>" selected="<%= chartWidth == i %>" value="<%= i %>" />
+
+		<%
+		}
+		%>
+
+	</aui:select>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/chart/other.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/chart/other.jspf
new file mode 100644
index 0000000..d42ee74
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/chart/other.jspf
@@ -0,0 +1,217 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+SocialActivityCounter highestActivityCounter = null;
+SocialActivityCounter lowestActivityCounter = null;
+
+int[] categories = new int[activityCounters.size()];
+int[] values = new int[activityCounters.size()];
+
+int currentValue = 0;
+int totalValue = 0;
+
+int totalDays = 0;
+
+for (int i = 0; i < activityCounters.size(); i++) {
+	SocialActivityCounter activityCounter = activityCounters.get(i);
+
+	if ((highestActivityCounter == null) || (highestActivityCounter.getCurrentValue() < activityCounter.getCurrentValue())) {
+		highestActivityCounter = activityCounter;
+	}
+
+	if ((lowestActivityCounter == null) || (lowestActivityCounter.getCurrentValue() > activityCounter.getCurrentValue())) {
+		lowestActivityCounter = activityCounter;
+	}
+
+	categories[i] = i + 1;
+	values[i] = activityCounter.getCurrentValue();
+
+	totalValue = totalValue + activityCounter.getCurrentValue();
+
+	if (activityCounter.getEndPeriod() == -1) {
+		currentValue = activityCounter.getCurrentValue();
+
+		totalDays = totalDays + SocialCounterPeriodUtil.getActivityDay() - activityCounter.getStartPeriod() + 1;
+	}
+	else {
+		totalDays = totalDays + activityCounter.getEndPeriod() - activityCounter.getStartPeriod() + 1;
+	}
+}
+
+Format format = FastDateFormatFactoryUtil.getSimpleDateFormat("MMM d");
+%>
+
+<aui:row>
+	<aui:col cssClass="chart-column" width="<%= chartWidth %>">
+		<div class="group-statistics-chart" id="groupStatisticsChart<%= displayActivityCounterNameIndex %>" style="height: <%= displayHeight - 2 %>px;"></div>
+	</aui:col>
+
+	<aui:col cssClass="info-column" width="<%= 100 - chartWidth %>">
+		<div class="group-statistics-info">
+			<liferay-ui:message key="current-value" />: <%= currentValue %><br />
+
+			<liferay-ui:message key="average-activities-per-day" />: <%= Math.round(totalValue / totalDays * 100) / 100 %><br />
+
+			<liferay-ui:message key="highest-activity-period" />: <span class="group-statistics-activity-period">
+				<strong>
+					<%= format.format(SocialCounterPeriodUtil.getDate(highestActivityCounter.getStartPeriod())) %>
+						-
+					<c:if test="<%= highestActivityCounter.getEndPeriod() != -1 %>">
+						<%= format.format(SocialCounterPeriodUtil.getDate(highestActivityCounter.getEndPeriod())) %>
+					</c:if>
+
+					<c:if test="<%= highestActivityCounter.getEndPeriod() == -1 %>">
+						<%= format.format(new Date()) %>
+					</c:if>
+				</strong>
+			</span>
+
+			(<%= highestActivityCounter.getCurrentValue() %>)<br />
+
+			<liferay-ui:message key="lowest-activity-period" />: <span class="group-statistics-activity-period">
+				<strong>
+					<%= format.format(SocialCounterPeriodUtil.getDate(lowestActivityCounter.getStartPeriod())) %>
+						-
+					<c:if test="<%= lowestActivityCounter.getEndPeriod() != -1 %>">
+						<%= format.format(SocialCounterPeriodUtil.getDate(lowestActivityCounter.getEndPeriod())) %>
+					</c:if>
+
+					<c:if test="<%= lowestActivityCounter.getEndPeriod() == -1 %>">
+						<%= format.format(new Date()) %>
+					</c:if>
+				</strong>
+			</span>
+
+			(<%= lowestActivityCounter.getCurrentValue() %>)<br />
+		</div>
+	</aui:col>
+</aui:row>
+
+<aui:script use="charts">
+	var categories = [<%= StringUtil.merge(categories) %>];
+	var values = [<%= StringUtil.merge(values) %>];
+
+	var data = [];
+
+	for (var i = 0; i < categories.length; i++) {
+		data.push(
+			{
+				category: categories[i],
+				values: values[i]
+			}
+		);
+	}
+
+	var tooltip = {
+		markerLabelFunction: function(categoryItem, valueItem, itemIndex, series, seriesIndex) {
+			return valueItem.value;
+		},
+
+		styles: {
+			backgroundColor: '#FFF',
+			borderColor: '#4572A7',
+			borderWidth: 1,
+			color: '#000',
+			textAlign: 'center',
+			width: 30
+		}
+	};
+
+	<c:choose>
+		<c:when test='<%= chartType.equals("area") %>'>
+			var chartType = 'combo';
+
+			var customConfig = {
+				showAreaFill: true,
+				showMarkers: true,
+				styles: {
+					series: {
+						values: {
+							area: {
+								color: '#5CC0FF',
+								alpha: 0.4
+							},
+							line: {
+								color: '#4572A7',
+								weight: 2
+							},
+							marker: {
+								fill: {
+									color: '#3CCFFF'
+								},
+								height: 6
+							}
+						}
+					}
+				}
+			};
+		</c:when>
+		<c:otherwise>
+			var chartType = '<%= chartType %>';
+
+			var customConfig = {
+				showAreaFill: true,
+				showMarkers: true
+			};
+		</c:otherwise>
+	</c:choose>
+
+	var chartContainer = A.one('#groupStatisticsChart<%= displayActivityCounterNameIndex %>');
+
+	var defaultConfig = {
+		axes: {
+			category: {
+				styles:
+				{
+					label: {
+						display: 'none'
+					}
+				}
+			},
+			values: {
+				styles: {
+					majorUnit: {
+						count: 6
+					}
+				}
+			}
+		},
+		dataProvider: data,
+		height: <%= displayHeight - 2 %>,
+		horizontalGridlines: true,
+		tooltip: tooltip,
+		type: chartType,
+		width: chartContainer.width()
+	};
+
+	A.mix(defaultConfig, customConfig);
+
+	var chart = new A.Chart(defaultConfig).render(chartContainer);
+
+	Liferay.after(
+		['portletMoved', 'liferaypanel:collapse'],
+		function(event) {
+			var width = chartContainer.width();
+
+			if (width && (event.type == 'portletMoved' && event.portletId == '<%= portletDisplay.getId() %>') ||
+				(event.type == 'liferaypanel:collapse' && event.panelId == 'groupStatisticsPanel<%= displayActivityCounterNameIndex %>')) {
+
+				chart.set('width', width);
+			}
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/chart/pie.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/chart/pie.jspf
new file mode 100644
index 0000000..2e64146
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/chart/pie.jspf
@@ -0,0 +1,170 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+int[] categories = new int[activityCounters.size()];
+int[] values = new int[activityCounters.size()];
+
+int totalValue = 0;
+
+for (int i = 0; i < activityCounters.size(); i++) {
+	SocialActivityCounter activityCounter = activityCounters.get(i);
+
+	categories[i] = i + 1;
+	values[i] = activityCounter.getCurrentValue();
+
+	totalValue = totalValue + activityCounter.getCurrentValue();
+}
+
+DecimalFormat decimalFormat = new DecimalFormat("##.00%");
+%>
+
+<aui:row>
+	<aui:col cssClass="chart-column" width="<%= chartWidth %>">
+		<div class="group-statistics-chart">
+			<div id="groupStatisticsChart<%= displayActivityCounterNameIndex %>"></div>
+		</div>
+	</aui:col>
+
+	<aui:col cssClass="info-column" width="<%= 100 - chartWidth %>">
+		<div class="group-statistics-info">
+			<strong><liferay-ui:message key="activities-by-area" />:</strong>
+
+			<table>
+
+			<%
+			for (int i = 0; i < activityCounters.size(); i++) {
+				SocialActivityCounter activityCounter = activityCounters.get(i);
+			%>
+
+				<tr>
+					<td>
+						<div class="group-statistics-color-marker" style="background-color: <%= _BACKGROUND_COLORS[i % _BACKGROUND_COLORS.length] %>"></div>
+					</td>
+					<td>
+						<%= ResourceActionsUtil.getModelResource(locale, activityCounter.getClassName()) %>
+					</td>
+					<td>
+						:
+					</td>
+					<td align="right">
+
+						<%
+						double percentage = 0;
+
+						if (totalValue > 0) {
+							percentage = (double)activityCounter.getCurrentValue() / (double)totalValue;
+						}
+						%>
+
+						<%= decimalFormat.format(percentage) %>
+					</td>
+				</tr>
+
+			<%
+			}
+			%>
+
+			</table>
+		</div>
+	</aui:col>
+</aui:row>
+
+<aui:script use="charts">
+	var categories = [<%= StringUtil.merge(categories) %>];
+	var values = [<%= StringUtil.merge(values) %>];
+
+	var data = [];
+
+	for (var i = 0; i < categories.length; i++) {
+		data.push(
+			{
+				category: categories[i],
+				values: values[i]
+			}
+		);
+	}
+
+	var tooltip = {
+		markerLabelFunction: function(categoryItem, valueItem, itemIndex, series, seriesIndex) {
+			return valueItem.value;
+		},
+
+		styles: {
+			backgroundColor: '#FFF',
+			borderColor: '#4572A7',
+			borderWidth: 1,
+			color: '#000',
+			textAlign: 'center',
+			width: 30
+		}
+	};
+
+	var chartContainer = A.one('#groupStatisticsChart<%= displayActivityCounterNameIndex %>');
+
+	var getContainerWidth = function(container) {
+		return container.width() * 0.7;
+	};
+
+	var containerWidth = getContainerWidth(chartContainer);
+
+	chartContainer.setStyle('height', containerWidth);
+
+	var chart = new A.Chart(
+		{
+			dataProvider: data,
+			seriesCollection: [
+				{
+					categoryKey: 'category',
+					styles: {
+						fill: {
+							colors: ['<%= StringUtil.merge(_BACKGROUND_COLORS, "', '") %>']
+						},
+						border: {
+							alpha: 0.8,
+							colors: new Array(9).join('#333,').split(','),
+							weight: 1
+						}
+					},
+					valueKey: 'values'
+				}
+			],
+			height: containerWidth,
+			tooltip: tooltip,
+			type: 'pie',
+			width: containerWidth
+		}
+	).render(chartContainer);
+
+	Liferay.after(
+		['portletMoved', 'liferaypanel:collapse'],
+		function(event) {
+			var width = getContainerWidth(chartContainer);
+
+			if (width && (event.type == 'portletMoved' && event.portletId == '<%= portletDisplay.getId() %>') ||
+				(event.type == 'liferaypanel:collapse' && event.panelId == 'groupStatisticsPanel<%= displayActivityCounterNameIndex %>')) {
+
+				chart.set('width', width);
+
+				chartContainer.setStyle('height', width);
+			}
+		}
+	);
+</aui:script>
+
+<%!
+private static final String[] _BACKGROUND_COLORS = new String[] {"#4572A7", "#AA4643", "#89A54E", "#80699B", "#3D96AE", "#DB843D", "#92A8CD", "#A47D7C", "#B5CA92"};
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/chart/tag_cloud.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/chart/tag_cloud.jspf
new file mode 100644
index 0000000..b904ac1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/chart/tag_cloud.jspf
@@ -0,0 +1,75 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+String assetTagName = ParamUtil.getString(request, "tag");
+
+int maxValue = 0;
+int minValue = Integer.MAX_VALUE;
+
+for (AssetTag assetTag : assetTags) {
+	maxValue = Math.max(maxValue, assetTag.getAssetCount());
+	minValue = Math.min(minValue, assetTag.getAssetCount());
+}
+
+double multiplier = 1;
+
+if (maxValue != minValue) {
+	multiplier = (double)5 / (maxValue - minValue);
+}
+
+PortletURL portletURL = renderResponse.createRenderURL();
+%>
+
+<ul class="tag-items tag-cloud">
+
+	<%
+	for (AssetTag assetTag : assetTags) {
+		int popularity = (int)(1 + ((maxValue - (maxValue - (assetTag.getAssetCount() - minValue))) * multiplier));
+	%>
+
+		<li class="tag-popularity-<%= popularity %>">
+			<span>
+
+				<%
+				if (assetTagName.equals(assetTag.getName())) {
+					portletURL.setParameter("tag", StringPool.BLANK);
+				%>
+
+					<a class="tag-selected" href="<%= portletURL %>">
+
+				<%
+				}
+				else {
+					portletURL.setParameter("tag", assetTag.getName());
+				%>
+
+					<a href="<%= portletURL %>">
+
+				<%
+				}
+				%>
+
+					<strong><%= assetTag.getName() %></strong>
+				</a>
+			</span>
+		</li>
+
+	<%
+	}
+	%>
+
+</ul>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/configuration.jsp
new file mode 100644
index 0000000..93a830b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/configuration.jsp
@@ -0,0 +1,70 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/group_statistics/init.jsp" %>
+
+<%
+String tabs2 = ParamUtil.getString(request, "tabs2");
+
+String redirect = ParamUtil.getString(request, "redirect");
+%>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationActionURL" />
+<liferay-portlet:renderURL portletConfiguration="true" varImpl="configurationRenderURL" />
+
+<aui:form action="<%= configurationActionURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
+	<aui:input name="redirect" type="hidden" value="<%= configurationRenderURL.toString() %>" />
+
+	<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="groupStatisticsDisplayActivityCounterNamesPanel" persistState="<%= true %>" title="counters">
+		<div id="<portlet:namespace />displayActivityCounterNames">
+			<aui:fieldset label="">
+
+				<%
+				for (int displayActivityCounterNameIndex : displayActivityCounterNameIndexes) {
+					request.setAttribute("configuration.jsp-index", String.valueOf(displayActivityCounterNameIndex));
+				%>
+
+					<div class="lfr-form-row">
+						<div class="row-fields">
+							<liferay-util:include page="/html/portlet/group_statistics/add_activity_counter.jsp" />
+						</div>
+					</div>
+
+				<%
+				}
+				%>
+
+			</aui:fieldset>
+		</div>
+
+		<aui:script use="liferay-auto-fields">
+			var autoFields = new Liferay.AutoFields(
+				{
+					contentBox: '#<portlet:namespace />displayActivityCounterNames > fieldset',
+					fieldIndexes: '<portlet:namespace />preferences--displayActivityCounterNameIndexes--',
+					namespace: '<portlet:namespace />',
+					url: '<portlet:renderURL windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>"><portlet:param name="struts_action" value="/portlet_configuration/add_group_statistics_activity_counter" /></portlet:renderURL>'
+				}
+			).render();
+		</aui:script>
+	</liferay-ui:panel>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/css/.sass-cache/main.css
new file mode 100644
index 0000000..f4d79b8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/css/.sass-cache/main.css
@@ -0,0 +1,27 @@
+.portlet-group-statistics .group-statistics-body {
+  border-collapse: collapse;
+  border-spacing: 0;
+  clear: both;
+  display: table;
+  table-layout: auto;
+  width: 100%; }
+.portlet-group-statistics .group-statistics-chart {
+  display: inline-block;
+  position: relative;
+  width: 100%;
+  z-index: 0; }
+.portlet-group-statistics .group-statistics-info {
+  padding: 10px;
+  padding-right: 0; }
+  .portlet-group-statistics .group-statistics-info table {
+    margin-left: 10px; }
+  .portlet-group-statistics .group-statistics-info td {
+    padding: 0 3px; }
+.portlet-group-statistics .group-statistics-color-marker {
+  height: 8px;
+  margin-right: 4px;
+  width: 8px; }
+.portlet-group-statistics .field-row .inline-text {
+  margin: 1px 3px 0 0;
+  padding: 1px; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/css/main.css
new file mode 100644
index 0000000..1ebe9d2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/css/main.css
@@ -0,0 +1,41 @@
+.portlet-group-statistics {
+	.group-statistics-body {
+		border-collapse: collapse;
+		border-spacing: 0;
+		clear: both;
+		display: table;
+		table-layout: auto;
+		width: 100%;
+	}
+
+	.group-statistics-chart {
+		display: inline-block;
+		position: relative;
+		width: 100%;
+		z-index: 0;
+	}
+
+	.group-statistics-info {
+		padding: 10px;
+		padding-right: 0;
+
+		table {
+			margin-left: 10px;
+		}
+
+		td {
+			padding: 0 3px;
+		}
+	}
+
+	.group-statistics-color-marker {
+		height: 8px;
+		margin-right: 4px;
+		width: 8px;
+	}
+
+	.field-row .inline-text {
+		margin: 1px 3px 0 0;
+		padding: 1px;
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/init.jsp
new file mode 100644
index 0000000..90c91e9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/init.jsp
@@ -0,0 +1,39 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.social.model.SocialActivityCounter" %><%@
+page import="com.liferay.portlet.social.model.SocialActivityCounterConstants" %><%@
+page import="com.liferay.portlet.social.service.SocialActivityCounterLocalServiceUtil" %><%@
+page import="com.liferay.portlet.social.util.SocialConfigurationUtil" %><%@
+page import="com.liferay.portlet.social.util.SocialCounterPeriodUtil" %><%@
+page import="com.liferay.portlet.social.util.comparator.SocialActivityCounterNameComparator" %>
+
+<%
+int[] displayActivityCounterNameIndexes = null;
+
+String displayActivityCounterNameIndexesParam = PrefsParamUtil.getString(portletPreferences, request, "displayActivityCounterNameIndexes");
+
+if (Validator.isNotNull(displayActivityCounterNameIndexesParam)) {
+	displayActivityCounterNameIndexes = StringUtil.split(displayActivityCounterNameIndexesParam, 0);
+}
+else {
+	displayActivityCounterNameIndexes = new int[] {0};
+}
+%>
+
+<%@ include file="/html/portlet/group_statistics/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/view.jsp
new file mode 100644
index 0000000..221eff0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/group_statistics/view.jsp
@@ -0,0 +1,119 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/group_statistics/init.jsp" %>
+
+<%
+for (int displayActivityCounterNameIndex : displayActivityCounterNameIndexes) {
+	String displayActivityCounterName = PrefsParamUtil.getString(portletPreferences, request, "displayActivityCounterName" + displayActivityCounterNameIndex);
+
+	if (Validator.isNull(displayActivityCounterName)) {
+		continue;
+	}
+
+	String chartType = PrefsParamUtil.getString(portletPreferences, request, "chartType" + displayActivityCounterNameIndex, "area");
+	int chartWidth = PrefsParamUtil.getInteger(portletPreferences, request, "chartWidth" + displayActivityCounterNameIndex, 35);
+	String dataRange = PrefsParamUtil.getString(portletPreferences, request, "dataRange" + displayActivityCounterNameIndex, "year");
+
+	List<AssetTag> assetTags = null;
+
+	List<SocialActivityCounter> activityCounters = null;
+
+	String title = LanguageUtil.get(pageContext, "site-statistics") + StringPool.SPACE;
+
+	int dataSize = 0;
+	int displayHeight = 80;
+
+	if (chartType.equals("tag-cloud")) {
+		if (dataRange.equals("year")) {
+			assetTags = AssetTagLocalServiceUtil.getSocialActivityCounterPeriodTags(scopeGroupId, displayActivityCounterName, SocialCounterPeriodUtil.getFirstActivityDayOfYear(), SocialCounterPeriodUtil.getEndPeriod());
+		}
+		else {
+			assetTags = AssetTagLocalServiceUtil.getSocialActivityCounterOffsetTags(scopeGroupId, displayActivityCounterName, -12, 0);
+		}
+
+		title = title + LanguageUtil.format(pageContext, "tag-cloud-for-x", new Object[] {LanguageUtil.get(pageContext, "group.statistics.title." + displayActivityCounterName)});
+
+		dataSize = assetTags.size();
+	}
+	else {
+		if (chartType.equals("pie")) {
+			if (dataRange.equals("year")) {
+				activityCounters = SocialActivityCounterLocalServiceUtil.getPeriodDistributionActivityCounters(scopeGroupId, displayActivityCounterName, SocialCounterPeriodUtil.getFirstActivityDayOfYear(), SocialCounterPeriodUtil.getEndPeriod());
+			}
+			else {
+				activityCounters = SocialActivityCounterLocalServiceUtil.getOffsetDistributionActivityCounters(scopeGroupId, displayActivityCounterName, -12, 0);
+			}
+
+			displayHeight = Math.max((activityCounters.size() + 1) * 18, displayHeight);
+		}
+		else {
+			if (dataRange.equals("year")) {
+				activityCounters = SocialActivityCounterLocalServiceUtil.getPeriodActivityCounters(scopeGroupId, displayActivityCounterName, SocialCounterPeriodUtil.getFirstActivityDayOfYear(), SocialCounterPeriodUtil.getEndPeriod());
+			}
+			else {
+				activityCounters = SocialActivityCounterLocalServiceUtil.getOffsetActivityCounters(scopeGroupId, displayActivityCounterName, -12, 0);
+			}
+		}
+
+		dataSize = activityCounters.size();
+
+		title = title + LanguageUtil.get(pageContext, "group.statistics.title." + displayActivityCounterName);
+	}
+
+	if (dataSize == 0) {
+		displayHeight = 40;
+	}
+%>
+
+	<div class="group-statistics-container">
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id='<%= "groupStatisticsPanel" + displayActivityCounterNameIndex %>' persistState="<%= true %>" title="<%= title %>">
+			<div class="group-statistics-body chart-<%= chartType %>" style="min-height: <%= displayHeight %>px;">
+				<c:choose>
+					<c:when test="<%= dataSize > 0 %>">
+						<c:choose>
+							<c:when test='<%= chartType.equals("pie") %>'>
+								<%@ include file="/html/portlet/group_statistics/chart/pie.jspf" %>
+							</c:when>
+							<c:when test='<%= chartType.equals("tag-cloud") %>'>
+								<%@ include file="/html/portlet/group_statistics/chart/tag_cloud.jspf" %>
+							</c:when>
+							<c:otherwise>
+								<%@ include file="/html/portlet/group_statistics/chart/other.jspf" %>
+							</c:otherwise>
+						</c:choose>
+					</c:when>
+					<c:otherwise>
+						<div class="alert alert-info portlet-configuration">
+							<liferay-ui:message key="there-is-not-enough-data-to-display-for-this-counter" />
+						</div>
+					</c:otherwise>
+				</c:choose>
+			</div>
+		</liferay-ui:panel>
+	</div>
+
+<%
+}
+%>
+
+<c:if test="<%= Validator.isNull(displayActivityCounterNameIndexesParam) %>">
+	<div class="alert alert-info portlet-configuration">
+		<a href="<%= portletDisplay.getURLConfiguration() %>" onClick="<%= portletDisplay.getURLConfigurationJS() %>">
+			<liferay-ui:message key="please-configure-this-portlet-and-select-at-least-one-activity-counter" />
+		</a>
+	</div>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/hello_velocity/view.vm b/tomcat-7.0.42/webapps/ROOT/html/portlet/hello_velocity/view.vm
new file mode 100644
index 0000000..7dd8b06
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/hello_velocity/view.vm
@@ -0,0 +1,3 @@
+#set ($foo = "Velocity")
+
+Hello $foo
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/iframe/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/iframe/configuration.jsp
new file mode 100644
index 0000000..41a6cb9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/iframe/configuration.jsp
@@ -0,0 +1,147 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/iframe/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+String htmlAttributes =
+	"alt=" + alt + "\n" +
+	"border=" + border + "\n" +
+	"bordercolor=" + bordercolor + "\n" +
+	"frameborder=" + frameborder + "\n" +
+	"hspace=" + hspace + "\n" +
+	"longdesc=" + longdesc + "\n" +
+	"scrolling=" + scrolling + "\n" +
+	"title=" + title + "\n" +
+	"vspace=" + vspace + "\n";
+%>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+
+	<liferay-ui:panel-container extended="<%= true %>" id="iframeSettingsPanelContainer" persistState="<%= true %>">
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="iframeGeneralPanel" persistState="<%= true %>" title="general">
+			<aui:fieldset>
+				<aui:input autoFocus="<%= (windowState.equals(WindowState.MAXIMIZED) || windowState.equals(LiferayWindowState.POP_UP)) %>" cssClass="lfr-input-text-container" label="source-url" name="preferences--src--" prefix="<%= relative ? StringPool.TRIPLE_PERIOD : StringPool.BLANK %>" type="text" value="<%= src %>" />
+
+				<aui:input label="relative-to-context-path" name="preferences--relative--" type="checkbox" value="<%= relative %>" />
+			</aui:fieldset>
+		</liferay-ui:panel>
+
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="iframeAuthenticationPanel" persistState="<%= true %>" title="authenticate">
+			<aui:fieldset>
+				<aui:input label="authenticate" name="preferences--auth--" type="checkbox" value="<%= auth %>" />
+
+				<div id="<portlet:namespace />authenticationOptions">
+					<div class="alert alert-info" id="<portlet:namespace />currentLoginMsg">
+						<c:choose>
+							<c:when test="<%= IFrameUtil.isPasswordTokenEnabled(renderRequest) %>">
+								<liferay-ui:message key="you-may-use-the-tokens-email-address-screen-name-userid-and-password" />
+							</c:when>
+							<c:otherwise>
+								<liferay-ui:message key="you-may-use-the-tokens-email-address-screen-name-userid" />
+							</c:otherwise>
+						</c:choose>
+					</div>
+
+					<aui:select label="authentication-type" name="preferences--authType--">
+						<aui:option label="basic" selected='<%= authType.equals("basic") %>' />
+						<aui:option label="form" selected='<%= authType.equals("form") %>' />
+					</aui:select>
+
+					<div id="<portlet:namespace />formAuthOptions">
+						<aui:select name="preferences--formMethod--">
+							<aui:option label="get" selected='<%= formMethod.equals("get") %>' />
+							<aui:option label="post" selected='<%= formMethod.equals("post") %>' />
+						</aui:select>
+
+						<aui:field-wrapper label="user-name">
+							<table class="lfr-table">
+							<tr>
+								<td>
+									<aui:input cssClass="lfr-input-text-container" label="field-name" name="preferences--userNameField--" type="text" value="<%= userNameField %>" />
+								</td>
+								<td>
+									<aui:input cssClass="lfr-input-text-container" label="value" name="preferences--formUserName--" type="text" value="<%= userName %>" />
+								</td>
+							</tr>
+							</table>
+						</aui:field-wrapper>
+
+						<aui:field-wrapper name="password">
+							<table class="lfr-table">
+							<tr>
+								<td>
+									<aui:input cssClass="lfr-input-text-container" label="field-name" name="preferences--passwordField--" type="text" value="<%= passwordField %>" />
+								</td>
+								<td>
+									<aui:input cssClass="lfr-input-text-container" label="value" name="preferences--formPassword--" type="text" value="<%= password %>" />
+								</td>
+							</tr>
+							</table>
+
+							<aui:input cssClass="lfr-input-text-container" name="preferences--hiddenVariables--" type="text" value="<%= hiddenVariables %>" />
+						</aui:field-wrapper>
+					</div>
+
+					<div id="<portlet:namespace />basicAuthOptions">
+						<aui:input cssClass="lfr-input-text-container" label="user-name" name="preferences--basicUserName--" type="text" value="<%= userName %>" />
+
+						<aui:input cssClass="lfr-input-text-container" label="password" name="preferences--basicPassword--" type="text" value="<%= password %>" />
+					</div>
+				</div>
+			</aui:fieldset>
+		</liferay-ui:panel>
+
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="iframeDisplaySettingsPanel" persistState="<%= true %>" title="display-settings">
+			<aui:fieldset>
+				<aui:input label="resize-automatically" name="preferences--resizeAutomatically--" type="checkbox" value="<%= resizeAutomatically %>" />
+
+				<div id="<portlet:namespace />displaySettings">
+					<aui:input name="preferences--heightMaximized--" type="text" value="<%= heightMaximized %>">
+						<aui:validator name="digits" />
+						<aui:validator name="required" />
+					</aui:input>
+
+					<aui:input name="preferences--heightNormal--" type="text" value="<%= heightNormal %>">
+						<aui:validator name="digits" />
+						<aui:validator name="required" />
+					</aui:input>
+
+					<aui:input name="preferences--width--" type="text" value="<%= width %>" />
+				</div>
+
+				<aui:input cssClass="lfr-textarea-container" name="preferences--htmlAttributes--" onKeyDown="Liferay.Util.checkTab(this); Liferay.Util.disableEsc();" type="textarea" value="<%= htmlAttributes %>" wrap="soft" />
+			</aui:fieldset>
+		</liferay-ui:panel>
+	</liferay-ui:panel-container>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	Liferay.Util.toggleBoxes('<portlet:namespace />authCheckbox','<portlet:namespace />authenticationOptions');
+	Liferay.Util.toggleBoxes('<portlet:namespace />resizeAutomaticallyCheckbox','<portlet:namespace />displaySettings', true);
+	Liferay.Util.toggleSelectBox('<portlet:namespace />authType', 'form', '<portlet:namespace />formAuthOptions');
+	Liferay.Util.toggleSelectBox('<portlet:namespace />authType', 'basic', '<portlet:namespace />basicAuthOptions');
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/iframe/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/iframe/css/.sass-cache/main.css
new file mode 100644
index 0000000..ed7adf0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/iframe/css/.sass-cache/main.css
@@ -0,0 +1,6 @@
+.portlet-configuration fieldset {
+  margin-bottom: 5px; }
+.portlet-configuration .lfr-panel-content {
+  background-color: #F8F8F8;
+  padding: 10px; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/iframe/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/iframe/css/main.css
new file mode 100644
index 0000000..91fdf78
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/iframe/css/main.css
@@ -0,0 +1,10 @@
+.portlet-configuration {
+	fieldset {
+		margin-bottom: 5px;
+	}
+
+	.lfr-panel-content {
+		background-color: #F8F8F8;
+		padding: 10px;
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/iframe/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/iframe/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/iframe/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/iframe/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/iframe/init.jsp
new file mode 100644
index 0000000..108e6af
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/iframe/init.jsp
@@ -0,0 +1,76 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.iframe.util.IFrameUtil" %>
+
+<%
+String src = portletPreferences.getValue("src", StringPool.BLANK);
+boolean relative = GetterUtil.getBoolean(portletPreferences.getValue("relative", StringPool.BLANK));
+
+boolean auth = GetterUtil.getBoolean(portletPreferences.getValue("auth", StringPool.BLANK));
+String authType = portletPreferences.getValue("authType", StringPool.BLANK);
+String formMethod = portletPreferences.getValue("formMethod", StringPool.BLANK);
+String userNameField = portletPreferences.getValue("userNameField", StringPool.BLANK);
+String passwordField = portletPreferences.getValue("passwordField", StringPool.BLANK);
+
+String userName = null;
+String password = null;
+
+if (authType.equals("basic")) {
+	userName = portletPreferences.getValue("basicUserName", StringPool.BLANK);
+	password = portletPreferences.getValue("basicPassword", StringPool.BLANK);
+}
+else {
+	userName = portletPreferences.getValue("formUserName", StringPool.BLANK);
+	password = portletPreferences.getValue("formPassword", StringPool.BLANK);
+}
+
+String hiddenVariables = portletPreferences.getValue("hiddenVariables", StringPool.BLANK);
+boolean resizeAutomatically = GetterUtil.getBoolean(portletPreferences.getValue("resizeAutomatically", StringPool.TRUE));
+String heightMaximized = GetterUtil.getString(portletPreferences.getValue("heightMaximized", "600"));
+String heightNormal = GetterUtil.getString(portletPreferences.getValue("heightNormal", "600"));
+String width = GetterUtil.getString(portletPreferences.getValue("width", "100%"));
+
+String alt = portletPreferences.getValue("alt", StringPool.BLANK);
+String border = portletPreferences.getValue("border", "0");
+String bordercolor = portletPreferences.getValue("bordercolor", "#000000");
+String frameborder = portletPreferences.getValue("frameborder", "0");
+String hspace = portletPreferences.getValue("hspace", "0");
+String longdesc = portletPreferences.getValue("longdesc", StringPool.BLANK);
+String scrolling = portletPreferences.getValue("scrolling", "auto");
+String title = portletPreferences.getValue("title", StringPool.BLANK);
+String vspace = portletPreferences.getValue("vspace", "0");
+
+List<String> iframeVariables = new ArrayList<String>();
+
+Enumeration<String> enu = request.getParameterNames();
+
+while (enu.hasMoreElements()) {
+	String name = enu.nextElement();
+
+	if (name.startsWith(_IFRAME_PREFIX)) {
+		iframeVariables.add(name.substring(_IFRAME_PREFIX.length()).concat(StringPool.EQUAL).concat(request.getParameter(name)));
+	}
+}
+%>
+
+<%@ include file="/html/portlet/iframe/init-ext.jsp" %>
+
+<%!
+private static final String _IFRAME_PREFIX = "iframe_";
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/iframe/proxy.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/iframe/proxy.jsp
new file mode 100644
index 0000000..538787c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/iframe/proxy.jsp
@@ -0,0 +1,106 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/iframe/init.jsp" %>
+
+<%
+List<String> hiddenVariablesList = ListUtil.toList(StringUtil.split(hiddenVariables, CharPool.SEMICOLON));
+
+hiddenVariablesList.addAll(iframeVariables);
+%>
+
+<html dir="<liferay-ui:message key="lang.dir" />">
+
+<head>
+	<meta content="no-cache" http-equiv="Cache-Control" />
+	<meta content="no-cache" http-equiv="Pragma" />
+	<meta content="0" http-equiv="Expires" />
+</head>
+
+<body onLoad="setTimeout('document.fm.submit()', 100);">
+
+<form action="<%= HtmlUtil.escapeAttribute(src) %>" method="<%= HtmlUtil.escapeAttribute(formMethod) %>" name="fm">
+
+<%
+for (String hiddenVariable : hiddenVariablesList) {
+	String hiddenKey = StringPool.BLANK;
+	String hiddenValue = StringPool.BLANK;
+
+	int pos = hiddenVariable.indexOf(StringPool.EQUAL);
+
+	if (pos != -1) {
+		hiddenKey = hiddenVariable.substring(0, pos);
+		hiddenValue = hiddenVariable.substring(pos + 1);
+	}
+%>
+
+	<input name="<%= HtmlUtil.escapeAttribute(hiddenKey) %>" type="hidden" value="<%= HtmlUtil.escapeAttribute(hiddenValue) %>" />
+
+<%
+}
+
+if (Validator.isNull(userNameField)) {
+	int pos = userName.indexOf(StringPool.EQUAL);
+
+	if (pos != -1) {
+		String fieldValuePair = userName;
+
+		userNameField = fieldValuePair.substring(0, pos);
+		userName = fieldValuePair.substring(pos + 1);
+
+		portletPreferences.setValue("userName", userName);
+		portletPreferences.setValue("userNameField", userNameField);
+
+		portletPreferences.store();
+	}
+}
+
+if (Validator.isNotNull(userNameField)) {
+	userName = IFrameUtil.getUserName(renderRequest, userName);
+}
+%>
+
+<input name="<%= HtmlUtil.escapeAttribute(userNameField) %>" type="hidden" value="<%= HtmlUtil.escapeAttribute(userName) %>" />
+
+<%
+if (Validator.isNull(passwordField)) {
+	int pos = password.indexOf(StringPool.EQUAL);
+
+	if (pos != -1) {
+		String fieldValuePair = password;
+
+		passwordField = fieldValuePair.substring(0, pos);
+		password = fieldValuePair.substring(pos + 1);
+
+		portletPreferences.setValue("password", password);
+		portletPreferences.setValue("passwordField", passwordField);
+
+		portletPreferences.store();
+	}
+}
+
+if (Validator.isNotNull(passwordField)) {
+	password = IFrameUtil.getPassword(renderRequest, password);
+}
+%>
+
+<input name="<%= HtmlUtil.escapeAttribute(passwordField) %>" type="hidden" value="<%= HtmlUtil.escapeAttribute(password) %>" />
+
+</form>
+
+</body>
+
+</html>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/iframe/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/iframe/view.jsp
new file mode 100644
index 0000000..e48578c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/iframe/view.jsp
@@ -0,0 +1,208 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/iframe/init.jsp" %>
+
+<%
+String iframeSrc = StringPool.BLANK;
+
+if (relative) {
+	iframeSrc = themeDisplay.getPathContext();
+}
+
+iframeSrc += (String)request.getAttribute(WebKeys.IFRAME_SRC);
+
+if (Validator.isNotNull(iframeVariables)) {
+	if (iframeSrc.contains(StringPool.QUESTION)) {
+		iframeSrc = iframeSrc.concat(StringPool.AMPERSAND).concat(StringUtil.merge(iframeVariables, StringPool.AMPERSAND));
+	}
+	else {
+		iframeSrc = iframeSrc.concat(StringPool.QUESTION).concat(StringUtil.merge(iframeVariables, StringPool.AMPERSAND));
+	}
+}
+
+String baseSrc = iframeSrc;
+
+int lastSlashPos = iframeSrc.substring(7).lastIndexOf(StringPool.SLASH);
+
+if (lastSlashPos != -1) {
+	baseSrc = iframeSrc.substring(0, lastSlashPos + 8);
+}
+
+String iframeHeight = heightNormal;
+
+if (windowState.equals(WindowState.MAXIMIZED)) {
+	iframeHeight = heightMaximized;
+}
+%>
+
+<c:choose>
+	<c:when test="<%= auth && Validator.isNull(userName) && !themeDisplay.isSignedIn() %>">
+		<div class="alert alert-info">
+			<a href="<%= themeDisplay.getURLSignIn() %>" target="_top"><liferay-ui:message key="please-sign-in-to-access-this-application" /></a>
+		</div>
+	</c:when>
+	<c:otherwise>
+		<div>
+			<iframe alt="<%= HtmlUtil.escapeAttribute(alt) %>" border="<%= HtmlUtil.escapeAttribute(border) %>" bordercolor="<%= HtmlUtil.escapeAttribute(bordercolor) %>" frameborder="<%= HtmlUtil.escapeAttribute(frameborder) %>" height="<%= HtmlUtil.escapeAttribute(iframeHeight) %>" hspace="<%= HtmlUtil.escapeAttribute(hspace) %>" id="<portlet:namespace />iframe" longdesc="<%= HtmlUtil.escapeAttribute(longdesc) %>" name="<portlet:namespace />iframe" onload="<portlet:namespace />monitorIframe();" scrolling="<%= HtmlUtil.escapeAttribute(scrolling) %>" src="<%= HtmlUtil.escapeHREF(iframeSrc) %>" title="<%= HtmlUtil.escapeAttribute(title) %>" vspace="<%= HtmlUtil.escapeAttribute(vspace) %>" width="<%= HtmlUtil.escapeAttribute(width) %>">
+				<%= LanguageUtil.format(pageContext, "your-browser-does-not-support-inline-frames-or-is-currently-configured-not-to-display-inline-frames.-content-can-be-viewed-at-actual-source-page-x", HtmlUtil.escape(iframeSrc)) %>
+			</iframe>
+		</div>
+	</c:otherwise>
+</c:choose>
+
+<aui:script>
+	function <portlet:namespace />monitorIframe() {
+		var url = null;
+
+		try {
+			var iframe = document.getElementById('<portlet:namespace />iframe');
+
+			url = iframe.contentWindow.document.location.href;
+		}
+		catch (e) {
+			return true;
+		}
+
+		var baseSrc = '<%= HtmlUtil.escapeJS(baseSrc) %>';
+		var iframeSrc = '<%= HtmlUtil.escapeJS(iframeSrc) %>';
+
+		if ((url == iframeSrc) || (url == (iframeSrc + '/'))) {
+		}
+		else if (Liferay.Util.startsWith(url, baseSrc)) {
+			url = url.substring(baseSrc.length);
+
+			<portlet:namespace />updateHash(url);
+		}
+		else {
+			<portlet:namespace />updateHash(url);
+		}
+
+		return true;
+	}
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />init',
+		function() {
+			var A = AUI();
+
+			var hash = document.location.hash.replace('#', '');
+
+			// LPS-33951
+
+			if (!A.UA.gecko) {
+				hash = A.QueryString.unescape(hash);
+			}
+
+			var hashObj = A.QueryString.parse(hash);
+
+			hash = hashObj['<portlet:namespace />'];
+
+			if (hash) {
+				var src = '';
+
+				if (!(/^https?\:\/\//.test(hash))) {
+					src = '<%= HtmlUtil.escapeJS(baseSrc) %>';
+				}
+
+				src += hash;
+
+				var iframe = A.one('#<portlet:namespace />iframe');
+
+				if (iframe) {
+					iframe.attr('src', src);
+				}
+			}
+		},
+		['aui-base', 'querystring']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />updateHash',
+		function(url) {
+			var A = AUI();
+
+			var hash = document.location.hash.replace('#', '');
+
+			var hashObj = A.QueryString.parse(hash);
+
+			hashObj['<portlet:namespace />'] = url;
+
+			var maximize = A.one('#p_p_id<portlet:namespace /> .portlet-maximize-icon a');
+
+			hash = A.QueryString.stringify(hashObj);
+
+			if (maximize) {
+				var href = maximize.attr('href');
+
+				href = href.split('#')[0];
+
+				maximize.attr('href', href + '#' + hash);
+			}
+
+			var restore = A.one('#p_p_id<portlet:namespace /> a.portlet-icon-back');
+
+			if (restore) {
+				var href = restore.attr('href');
+
+				href = href.split('#')[0];
+
+				restore.attr('href', href + '#' + hash);
+			}
+
+			// LPS-33951
+
+			location.hash = A.QueryString.escape(hash);
+		},
+		['aui-base', 'querystring']
+	);
+
+	<portlet:namespace />init();
+</aui:script>
+
+<aui:script use="aui-autosize-iframe">
+	var iframe = A.one('#<portlet:namespace />iframe');
+
+	if (iframe) {
+		iframe.plug(
+			A.Plugin.AutosizeIframe,
+			{
+				monitorHeight: <%= resizeAutomatically %>
+			}
+		);
+
+		iframe.on(
+			'load',
+			function() {
+				var height = A.Plugin.AutosizeIframe.getContentHeight(iframe);
+
+				if (height == null) {
+					height = '<%= HtmlUtil.escapeJS(heightNormal) %>';
+
+					if (themeDisplay.isStateMaximized()) {
+						height = '<%= HtmlUtil.escapeJS(heightMaximized) %>';
+					}
+
+					iframe.setStyle('height', height);
+
+					iframe.autosizeiframe.set('monitorHeight', false);
+				}
+			}
+		);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/configuration.jsp
new file mode 100644
index 0000000..51b7616
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/configuration.jsp
@@ -0,0 +1,173 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/image_gallery_display/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+%>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveConfiguration();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="preferences--mimeTypes--" type="hidden" />
+	<aui:input name="preferences--rootFolderId--" type="hidden" value="<%= rootFolderId %>" />
+
+	<liferay-ui:error key="rootFolderId" message="please-enter-a-valid-root-folder" />
+
+	<liferay-ui:panel-container extended="<%= true %>" id="imageGalleryDisplaySettingsPanelContainer" persistState="<%= true %>">
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="imageGalleryDisplayDisplay" persistState="<%= true %>" title="display-settings">
+			<aui:fieldset>
+				<aui:input label="show-actions" name="preferences--showActions--" type="checkbox" value="<%= showActions %>" />
+
+				<aui:input label="show-folder-menu" name="preferences--showFolderMenu--" type="checkbox" value="<%= showFolderMenu %>" />
+
+				<aui:input label="show-navigation-links" name="preferences--showTabs--" type="checkbox" value="<%= showTabs %>" />
+
+				<aui:input label="show-search" name="preferences--showFoldersSearch--" type="checkbox" value="<%= showFoldersSearch %>" />
+
+				<aui:field-wrapper label="show-media-type">
+
+					<%
+
+					// Left list
+
+					List leftList = new ArrayList();
+
+					String[] mediaGalleryMimeTypes = DLUtil.getMediaGalleryMimeTypes(portletPreferences, renderRequest);
+
+					for (String mimeType : mediaGalleryMimeTypes) {
+						leftList.add(new KeyValuePair(mimeType, LanguageUtil.get(pageContext, mimeType)));
+					}
+
+					// Right list
+
+					List rightList = new ArrayList();
+
+					Set<String> allMediaGalleryMimeTypes = DLUtil.getAllMediaGalleryMimeTypes();
+
+					for (String mimeType : allMediaGalleryMimeTypes) {
+						if (Arrays.binarySearch(mediaGalleryMimeTypes, mimeType) < 0) {
+							rightList.add(new KeyValuePair(mimeType, LanguageUtil.get(pageContext, mimeType)));
+						}
+					}
+					%>
+
+					<liferay-ui:input-move-boxes
+						leftBoxName="currentMimeTypes"
+						leftList="<%= leftList %>"
+						leftReorder="true"
+						leftTitle="current"
+						rightBoxName="availableMimeTypes"
+						rightList="<%= rightList %>"
+						rightTitle="available"
+					/>
+				</aui:field-wrapper>
+
+				<div class="display-template">
+
+					<%
+					TemplateHandler templateHandler = TemplateHandlerRegistryUtil.getTemplateHandler(FileEntry.class.getName());
+					%>
+
+					<liferay-ui:ddm-template-selector
+						classNameId="<%= PortalUtil.getClassNameId(templateHandler.getClassName()) %>"
+						displayStyle="<%= displayStyle %>"
+						displayStyleGroupId="<%= displayStyleGroupId %>"
+						refreshURL="<%= currentURL %>"
+						showEmptyOption="<%= true %>"
+					/>
+				</div>
+			</aui:fieldset>
+		</liferay-ui:panel>
+
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="imageGalleryDisplayFoldersListingPanel" persistState="<%= true %>" title="folders-listing">
+			<aui:fieldset>
+				<aui:field-wrapper label="root-folder">
+					<div class="input-append">
+						<liferay-ui:input-resource id="rootFolderName" url="<%= rootFolderName %>" />
+
+						<aui:button name="openFolderSelectorButton" value="select" />
+
+						<%
+						String taglibRemoveFolder = "Liferay.Util.removeFolderSelection('rootFolderId', 'rootFolderName', '" + renderResponse.getNamespace() + "');";
+						%>
+
+						<aui:button disabled="<%= rootFolderId <= 0 %>" name="removeFolderButton" onClick="<%= taglibRemoveFolder %>" value="remove" />
+					</div>
+				</aui:field-wrapper>
+			</aui:fieldset>
+		</liferay-ui:panel>
+
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="imageGalleryImagesRatingsPanel" persistState="<%= true %>" title="ratings">
+			<aui:input name="preferences--enableRatings--" type="checkbox" value="<%= enableRatings %>" />
+			<aui:input name="preferences--enableCommentRatings--" type="checkbox" value="<%= enableCommentRatings %>" />
+		</liferay-ui:panel>
+	</liferay-ui:panel-container>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<liferay-portlet:renderURL portletName="<%= portletResource %>" var="selectFolderURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+	<portlet:param name="struts_action" value='<%= "/image_gallery_display/select_folder" %>' />
+</liferay-portlet:renderURL>
+
+<aui:script use="aui-base">
+	A.one('#<portlet:namespace />openFolderSelectorButton').on(
+		'click',
+		function(event) {
+			Liferay.Util.selectEntity(
+				{
+					dialog: {
+						constrain: true,
+						modal: true,
+						width: 680
+					},
+					id: '_<%= HtmlUtil.escapeJS(portletResource) %>_selectFolder',
+					title: '<liferay-ui:message arguments="folder" key="select-x" />',
+					uri: '<%= selectFolderURL.toString() %>'
+				},
+				function(event) {
+					var folderData = {
+						idString: 'rootFolderId',
+						idValue: event.folderid,
+						nameString: 'rootFolderName',
+						nameValue: event.foldername
+					};
+
+					Liferay.Util.selectFolder(folderData, '<portlet:namespace />');
+				}
+			);
+		}
+	);
+</aui:script>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />saveConfiguration',
+		function() {
+			document.<portlet:namespace />fm.<portlet:namespace />mimeTypes.value = Liferay.Util.listSelect(document.<portlet:namespace />fm.<portlet:namespace />currentMimeTypes);
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/css/.sass-cache/main.css
new file mode 100644
index 0000000..e4a5224
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/css/.sass-cache/main.css
@@ -0,0 +1,59 @@
+.lfr-image-gallery-actions {
+  font-size: 11px;
+  text-align: right; }
+
+.portlet-image-gallery-display .lfr-asset-attributes {
+  clear: both; }
+.portlet-image-gallery-display .folder-search {
+  float: right;
+  margin: 0 0 0.5em 0.5em; }
+.portlet-image-gallery-display .image-score {
+  display: block;
+  margin: 0 0 5px 35px;
+  padding-top: 3px; }
+.portlet-image-gallery-display .image-icon {
+  display: block;
+  float: left;
+  height: 170px;
+  margin: 10px 4px;
+  padding: 5px 15px 0;
+  text-align: center; }
+  .portlet-image-gallery-display .image-icon:hover, .portlet-image-gallery-display .image-icon.hover {
+    background-color: #D3E8F1; }
+  .portlet-image-gallery-display .image-icon.error:hover {
+    background-color: #FDD; }
+  .portlet-image-gallery-display .image-icon:hover .image-thumbnail img {
+    background-color: #B0D2E1;
+    border-color: #7ABFDD; }
+  .portlet-image-gallery-display .image-icon a {
+    color: #5B677D; }
+.portlet-image-gallery-display .image-link {
+  text-align: center;
+  text-decoration: none; }
+.portlet-image-gallery-display .image-thumbnail {
+  display: inline-block;
+  position: relative; }
+  .portlet-image-gallery-display .image-thumbnail img {
+    background: #EAEAEA;
+    border: 1px solid #CCC;
+    margin: 0;
+    padding: 5px; }
+.portlet-image-gallery-display img.locked-icon, .portlet-image-gallery-display img.shortcut-icon {
+  bottom: 10px;
+  position: absolute;
+  z-index: 10; }
+.portlet-image-gallery-display img.locked-icon {
+  right: -10px; }
+.portlet-image-gallery-display img.shortcut-icon {
+  left: -5px; }
+.portlet-image-gallery-display .taglib-webdav {
+  margin-top: 3em; }
+.portlet-image-gallery-display .image-title {
+  clear: both;
+  display: block;
+  padding: 0 10px;
+  word-wrap: break-word; }
+
+.firefox .portlet-image-gallery-display .audio-node {
+  height: 35px; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/css/main.css
new file mode 100644
index 0000000..2b023c0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/css/main.css
@@ -0,0 +1,97 @@
+.lfr-image-gallery-actions {
+	font-size: 11px;
+	text-align: right;
+}
+
+.portlet-image-gallery-display {
+	.lfr-asset-attributes {
+		clear: both;
+	}
+
+	.folder-search {
+		float: right;
+		margin: 0 0 0.5em 0.5em;
+	}
+
+	.image-score {
+		display: block;
+		margin: 0 0 5px 35px;
+		padding-top: 3px;
+	}
+
+	.image-icon {
+		display: block;
+		float: left;
+		height: 170px;
+		margin: 10px 4px;
+		padding: 5px 15px 0;
+		text-align: center;
+
+		&:hover, &.hover {
+			background-color: #D3E8F1;
+		}
+
+		&.error:hover {
+			background-color: #FDD;
+		}
+
+		&:hover .image-thumbnail img {
+			background-color: #B0D2E1;
+			border-color: #7ABFDD;
+		}
+
+		a {
+			color: #5B677D;
+		}
+	}
+
+	.image-link {
+		text-align: center;
+		text-decoration: none;
+	}
+
+	.image-thumbnail {
+		display: inline-block;
+		position: relative;
+
+		img {
+			background: #EAEAEA;
+			border: 1px solid #CCC;
+			margin: 0;
+			padding: 5px;
+		}
+	}
+
+	img.locked-icon, img.shortcut-icon {
+		bottom: 10px;
+		position: absolute;
+		z-index: 10;
+	}
+
+	img.locked-icon {
+		right: -10px;
+	}
+
+	img.shortcut-icon {
+		left: -5px;
+	}
+
+	.taglib-webdav {
+		margin-top: 3em;
+	}
+
+	.image-title {
+		clear: both;
+		display: block;
+		padding: 0 10px;
+		word-wrap: break-word;
+	}
+}
+
+.firefox {
+	.portlet-image-gallery-display {
+		.audio-node {
+			height: 35px;
+		}
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/embedded_player.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/embedded_player.jsp
new file mode 100644
index 0000000..4595415
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/embedded_player.jsp
@@ -0,0 +1,75 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/image_gallery_display/init.jsp" %>
+
+<%
+boolean supportedAudio = false;
+boolean supportedVideo = false;
+
+String mp3PreviewURL = ParamUtil.getString(request, "mp3PreviewURL");
+String mp4PreviewURL = ParamUtil.getString(request, "mp4PreviewURL");
+String oggPreviewURL = ParamUtil.getString(request, "oggPreviewURL");
+String ogvPreviewURL = ParamUtil.getString(request, "ogvPreviewURL");
+String videoThumbnailURL = ParamUtil.getString(request, "thumbnailURL");
+
+List<String> previewFileURLs = new ArrayList<String>(4);
+
+if (Validator.isNotNull(mp3PreviewURL)) {
+	previewFileURLs.add(mp3PreviewURL);
+
+	supportedAudio = true;
+}
+
+if (Validator.isNotNull(mp4PreviewURL)) {
+	previewFileURLs.add(mp4PreviewURL);
+
+	supportedVideo = true;
+}
+
+if (Validator.isNotNull(oggPreviewURL)) {
+	previewFileURLs.add(oggPreviewURL);
+
+	supportedAudio = true;
+}
+
+if (Validator.isNotNull(ogvPreviewURL)) {
+	previewFileURLs.add(ogvPreviewURL);
+
+	supportedVideo = true;
+}
+
+request.setAttribute("view_file_entry.jsp-supportedAudio", String.valueOf(supportedAudio));
+request.setAttribute("view_file_entry.jsp-supportedVideo", String.valueOf(supportedVideo));
+
+request.setAttribute("view_file_entry.jsp-previewFileURLs", previewFileURLs.toArray(new String[0]));
+request.setAttribute("view_file_entry.jsp-videoThumbnailURL", videoThumbnailURL);
+%>
+
+<c:choose>
+	<c:when test="<%= supportedAudio %>">
+		<div class="lfr-preview-audio" id="<portlet:namespace />previewFile">
+			<div class="lfr-preview-audio-content" id="<portlet:namespace />previewFileContent"></div>
+		</div>
+	</c:when>
+	<c:when test="<%= supportedVideo %>">
+		<div class="lfr-preview-file lfr-preview-video" id="<portlet:namespace />previewFile">
+			<div class="lfr-preview-file-content lfr-preview-video-content" id="<portlet:namespace />previewFileContent"></div>
+		</div>
+	</c:when>
+</c:choose>
+
+<liferay-util:include page="/html/portlet/document_library/player.jsp" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/image_action.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/image_action.jspf
new file mode 100644
index 0000000..ac16a8b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/image_action.jspf
@@ -0,0 +1,37 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+boolean checkedOut = fileEntry.isCheckedOut();
+boolean hasLock = fileEntry.hasLock();
+%>
+
+<portlet:renderURL var="viewFolderURL">
+	<portlet:param name="struts_action" value="/image_gallery_display/view" />
+	<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+</portlet:renderURL>
+
+<%@ include file="/html/portlet/document_library/action/download.jspf" %>
+
+<%@ include file="/html/portlet/document_library/action/view.jspf" %>
+
+<%@ include file="/html/portlet/document_library/action/view_original.jspf" %>
+
+<%@ include file="/html/portlet/document_library/action/edit.jspf" %>
+
+<%@ include file="/html/portlet/document_library/action/permissions.jspf" %>
+
+<%@ include file="/html/portlet/document_library/action/delete.jspf" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/init.jsp
new file mode 100644
index 0000000..3e39b0c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/init.jsp
@@ -0,0 +1,75 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.kernel.repository.model.Folder" %><%@
+page import="com.liferay.portal.kernel.search.Document" %><%@
+page import="com.liferay.portlet.documentlibrary.NoSuchFolderException" %><%@
+page import="com.liferay.portlet.documentlibrary.model.DLFileShortcut" %><%@
+page import="com.liferay.portlet.documentlibrary.model.DLFolder" %><%@
+page import="com.liferay.portlet.documentlibrary.model.DLFolderConstants" %><%@
+page import="com.liferay.portlet.documentlibrary.service.DLAppServiceUtil" %><%@
+page import="com.liferay.portlet.documentlibrary.service.permission.DLFileEntryPermission" %><%@
+page import="com.liferay.portlet.documentlibrary.service.permission.DLFileShortcutPermission" %><%@
+page import="com.liferay.portlet.documentlibrary.util.AudioProcessorUtil" %><%@
+page import="com.liferay.portlet.documentlibrary.util.ImageProcessorUtil" %><%@
+page import="com.liferay.portlet.documentlibrary.util.PDFProcessorUtil" %><%@
+page import="com.liferay.portlet.documentlibrary.util.VideoProcessorUtil" %><%@
+page import="com.liferay.portlet.imagegallerydisplay.util.IGUtil" %>
+
+<%
+String portletResource = ParamUtil.getString(request, "portletResource");
+
+if (layout.isTypeControlPanel()) {
+	portletPreferences = PortletPreferencesLocalServiceUtil.getPreferences(themeDisplay.getCompanyId(), scopeGroupId, PortletKeys.PREFS_OWNER_TYPE_GROUP, 0, PortletKeys.DOCUMENT_LIBRARY, null);
+}
+
+long rootFolderId = PrefsParamUtil.getLong(portletPreferences, request, "rootFolderId", DLFolderConstants.DEFAULT_PARENT_FOLDER_ID);
+String rootFolderName = StringPool.BLANK;
+
+if (rootFolderId != DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) {
+	try {
+		Folder rootFolder = DLAppLocalServiceUtil.getFolder(rootFolderId);
+
+		rootFolderName = rootFolder.getName();
+	}
+	catch (NoSuchFolderException nsfe) {
+	}
+}
+
+boolean showFoldersSearch = PrefsParamUtil.getBoolean(portletPreferences, request, "showFoldersSearch", true);
+
+String portletId = portletDisplay.getId();
+
+if (portletId.equals(PortletKeys.PORTLET_CONFIGURATION)) {
+	portletId = portletResource;
+}
+
+boolean showActions = PrefsParamUtil.getBoolean(portletPreferences, request, "showActions");
+boolean showFolderMenu = PrefsParamUtil.getBoolean(portletPreferences, request, "showFolderMenu");
+boolean showTabs = PrefsParamUtil.getBoolean(portletPreferences, request, "showTabs");
+
+boolean enableRatings = GetterUtil.getBoolean(portletPreferences.getValue("enableRatings", null), true);
+boolean enableCommentRatings = GetterUtil.getBoolean(portletPreferences.getValue("enableCommentRatings", null), true);
+
+String displayStyle = portletPreferences.getValue("displayStyle", StringPool.BLANK);
+long displayStyleGroupId = GetterUtil.getLong(portletPreferences.getValue("displayStyleGroupId", null), themeDisplay.getScopeGroupId());
+
+Format dateFormatDate = FastDateFormatFactoryUtil.getDate(locale, timeZone);
+%>
+
+<%@ include file="/html/portlet/image_gallery_display/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/search.jsp
new file mode 100644
index 0000000..9d85fff
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/search.jsp
@@ -0,0 +1,153 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/image_gallery_display/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+long repositoryId = ParamUtil.getLong(request, "repositoryId");
+
+long breadcrumbsFolderId = ParamUtil.getLong(request, "breadcrumbsFolderId");
+
+long searchFolderId = ParamUtil.getLong(request, "searchFolderId");
+long searchFolderIds = ParamUtil.getLong(request, "searchFolderIds");
+
+long[] folderIdsArray = null;
+
+if (searchFolderId > 0) {
+	folderIdsArray = new long[] {searchFolderId};
+}
+else {
+	List folderIds = new ArrayList();
+
+	folderIds.add(new Long(searchFolderIds));
+
+	DLAppServiceUtil.getSubfolderIds(repositoryId, folderIds, searchFolderIds);
+
+	folderIdsArray = StringUtil.split(StringUtil.merge(folderIds), 0L);
+}
+
+String keywords = ParamUtil.getString(request, "keywords");
+
+String[] mediaGalleryMimeTypes = DLUtil.getMediaGalleryMimeTypes(portletPreferences, renderRequest);
+%>
+
+<liferay-portlet:renderURL varImpl="searchURL">
+	<portlet:param name="struts_action" value="/image_gallery_display/search" />
+</liferay-portlet:renderURL>
+
+<aui:form action="<%= searchURL %>" method="get" name="fm">
+	<liferay-portlet:renderURLParams varImpl="searchURL" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="repositoryId" type="hidden" value="<%= repositoryId %>" />
+	<aui:input name="breadcrumbsFolderId" type="hidden" value="<%= breadcrumbsFolderId %>" />
+	<aui:input name="searchFolderId" type="hidden" value="<%= searchFolderId %>" />
+	<aui:input name="searchFolderIds" type="hidden" value="<%= searchFolderIds %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title="search"
+	/>
+
+	<%
+	PortletURL portletURL = renderResponse.createRenderURL();
+
+	portletURL.setParameter("struts_action", "/image_gallery_display/search");
+	portletURL.setParameter("redirect", redirect);
+	portletURL.setParameter("breadcrumbsFolderId", String.valueOf(breadcrumbsFolderId));
+	portletURL.setParameter("searchFolderId", String.valueOf(searchFolderId));
+	portletURL.setParameter("searchFolderIds", String.valueOf(searchFolderIds));
+	portletURL.setParameter("keywords", keywords);
+
+	SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, portletURL, null, LanguageUtil.format(pageContext, "no-entries-were-found-that-matched-the-keywords-x", "<strong>" + HtmlUtil.escape(keywords) + "</strong>"));
+
+	try {
+		SearchContext searchContext = SearchContextFactory.getInstance(request);
+
+		searchContext.setAttribute("mimeTypes", mediaGalleryMimeTypes);
+		searchContext.setAttribute("paginationType", "more");
+		searchContext.setEnd(searchContainer.getEnd());
+		searchContext.setFolderIds(folderIdsArray);
+		searchContext.setKeywords(keywords);
+		searchContext.setStart(searchContainer.getStart());
+
+		Hits hits = DLAppServiceUtil.search(repositoryId, searchContext);
+
+		searchContainer.setTotal(hits.getLength());
+
+		List results = new ArrayList(hits.getDocs().length);
+
+		for (int i = 0; i < hits.getDocs().length; i++) {
+			Document doc = hits.doc(i);
+
+			String entryClassName = GetterUtil.getString(doc.get(Field.ENTRY_CLASS_NAME));
+
+			long entryClassPK = GetterUtil.getLong(doc.get(Field.ENTRY_CLASS_PK));
+
+			if (entryClassName.equals(DLFileEntry.class.getName()) || FileEntry.class.isAssignableFrom(Class.forName(entryClassName))) {
+				results.add(DLAppLocalServiceUtil.getFileEntry(entryClassPK));
+			}
+			else if (entryClassName.equals(DLFolder.class.getName())) {
+				results.add(DLAppLocalServiceUtil.getFolder(entryClassPK));
+			}
+		}
+
+		searchContainer.setResults(results);
+	%>
+
+	<div id="<portlet:namespace />imageGalleryAssetInfo">
+			<div class="form-search">
+				<liferay-ui:input-search autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" placeholder='<%= LanguageUtil.get(locale, "keywords") %>' title='<%= LanguageUtil.get(locale, "search-images") %>' />
+			</div>
+
+		<br /><br />
+
+		<%
+		Folder folder = (Folder)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FOLDER);
+
+		long defaultFolderId = GetterUtil.getLong(portletPreferences.getValue("rootFolderId", StringPool.BLANK), DLFolderConstants.DEFAULT_PARENT_FOLDER_ID);
+
+		long folderId = BeanParamUtil.getLong(folder, request, "folderId", defaultFolderId);
+
+		request.setAttribute("view.jsp-folderId", String.valueOf(folderId));
+		request.setAttribute("view.jsp-mediaGalleryMimeTypes", mediaGalleryMimeTypes);
+		request.setAttribute("view.jsp-searchContainer", searchContainer);
+		%>
+
+		<liferay-util:include page="/html/portlet/image_gallery_display/view_images.jsp" />
+	</div>
+
+	<%
+	}
+	catch (Exception e) {
+		_log.error(e.getMessage());
+	}
+	%>
+
+</aui:form>
+
+<%
+if (searchFolderId > 0) {
+	IGUtil.addPortletBreadcrumbEntries(searchFolderId, request, renderResponse);
+}
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "search") + ": " + keywords, currentURL);
+%>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.image_gallery_display.search_jsp");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/view.jsp
new file mode 100644
index 0000000..b768825
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/view.jsp
@@ -0,0 +1,281 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/image_gallery_display/init.jsp" %>
+
+<%
+Folder folder = (Folder)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FOLDER);
+
+long defaultFolderId = GetterUtil.getLong(portletPreferences.getValue("rootFolderId", StringPool.BLANK), DLFolderConstants.DEFAULT_PARENT_FOLDER_ID);
+
+long folderId = BeanParamUtil.getLong(folder, request, "folderId", defaultFolderId);
+
+boolean defaultFolderView = false;
+
+if ((folder == null) && (defaultFolderId != DLFolderConstants.DEFAULT_PARENT_FOLDER_ID)) {
+	defaultFolderView = true;
+}
+
+if (defaultFolderView) {
+	try {
+		folder = DLAppLocalServiceUtil.getFolder(folderId);
+	}
+	catch (NoSuchFolderException nsfe) {
+		folderId = DLFolderConstants.DEFAULT_PARENT_FOLDER_ID;
+	}
+}
+
+long repositoryId = scopeGroupId;
+
+if (folder != null) {
+	repositoryId = folder.getRepositoryId();
+}
+
+int status = WorkflowConstants.STATUS_APPROVED;
+
+if (permissionChecker.isCompanyAdmin() || permissionChecker.isGroupAdmin(scopeGroupId)) {
+	status = WorkflowConstants.STATUS_ANY;
+}
+
+long portletDisplayDDMTemplateId = PortletDisplayTemplateUtil.getPortletDisplayTemplateDDMTemplateId(displayStyleGroupId, displayStyle);
+%>
+
+<c:choose>
+	<c:when test="<%= portletDisplayDDMTemplateId > 0 %>">
+
+		<%
+		String[] mediaGalleryMimeTypes = DLUtil.getMediaGalleryMimeTypes(portletPreferences, renderRequest);
+
+		List fileEntries = DLAppServiceUtil.getGroupFileEntries(scopeGroupId, 0, folderId, mediaGalleryMimeTypes, status, 0, SearchContainer.MAX_DELTA, null);
+		%>
+
+		<%= PortletDisplayTemplateUtil.renderDDMTemplate(pageContext, portletDisplayDDMTemplateId, fileEntries) %>
+	</c:when>
+	<c:otherwise>
+
+		<%
+		String topLink = ParamUtil.getString(request, "topLink", "home");
+
+		long assetCategoryId = ParamUtil.getLong(request, "categoryId");
+		String assetTagName = ParamUtil.getString(request, "tag");
+
+		boolean useAssetEntryQuery = (assetCategoryId > 0) || Validator.isNotNull(assetTagName);
+
+		PortletURL portletURL = renderResponse.createRenderURL();
+
+		portletURL.setParameter("struts_action", "/image_gallery_display/view");
+		portletURL.setParameter("topLink", topLink);
+		portletURL.setParameter("folderId", String.valueOf(folderId));
+
+		request.setAttribute("view.jsp-folder", folder);
+
+		request.setAttribute("view.jsp-defaultFolderId", String.valueOf(defaultFolderId));
+
+		request.setAttribute("view.jsp-folderId", String.valueOf(folderId));
+
+		request.setAttribute("view.jsp-repositoryId", String.valueOf(repositoryId));
+
+		request.setAttribute("view.jsp-viewFolder", Boolean.TRUE.toString());
+
+		request.setAttribute("view.jsp-useAssetEntryQuery", String.valueOf(useAssetEntryQuery));
+
+		request.setAttribute("view.jsp-portletURL", portletURL);
+		%>
+
+		<portlet:actionURL var="undoTrashURL">
+			<portlet:param name="struts_action" value="/document_library/edit_entry" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.RESTORE %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:trash-undo portletURL="<%= undoTrashURL %>" />
+
+		<liferay-util:include page="/html/portlet/document_library/top_links.jsp" />
+
+		<c:choose>
+			<c:when test="<%= useAssetEntryQuery %>">
+				<liferay-ui:categorization-filter
+					assetType="images"
+					portletURL="<%= portletURL %>"
+				/>
+
+				<%
+				SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, "cur2", SearchContainer.DEFAULT_DELTA, portletURL, null, null);
+
+				long[] classNameIds = {PortalUtil.getClassNameId(DLFileEntryConstants.getClassName()), PortalUtil.getClassNameId(DLFileShortcut.class.getName())};
+
+				AssetEntryQuery assetEntryQuery = new AssetEntryQuery(classNameIds, searchContainer);
+
+				assetEntryQuery.setExcludeZeroViewCount(false);
+
+				int total = AssetEntryServiceUtil.getEntriesCount(assetEntryQuery);
+
+				searchContainer.setTotal(total);
+
+				List results = AssetEntryServiceUtil.getEntries(assetEntryQuery);
+
+				searchContainer.setResults(results);
+
+				String[] mediaGalleryMimeTypes = null;
+
+				request.setAttribute("view.jsp-mediaGalleryMimeTypes", mediaGalleryMimeTypes);
+				request.setAttribute("view.jsp-searchContainer", searchContainer);
+				%>
+
+				<liferay-util:include page="/html/portlet/image_gallery_display/view_images.jsp" />
+			</c:when>
+			<c:when test='<%= topLink.equals("home") %>'>
+				<aui:row>
+					<c:if test="<%= folder != null %>">
+						<liferay-ui:header
+							localizeTitle="<%= false %>"
+							title="<%= folder.getName() %>"
+						/>
+					</c:if>
+
+					<%
+					SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, "cur2", SearchContainer.DEFAULT_DELTA, portletURL, null, null);
+
+					String[] mediaGalleryMimeTypes = DLUtil.getMediaGalleryMimeTypes(portletPreferences, renderRequest);
+
+					int foldersCount = DLAppServiceUtil.getFoldersCount(repositoryId, folderId, true);
+
+					int total = DLAppServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(repositoryId, folderId, status, mediaGalleryMimeTypes, true);
+
+					int imagesCount = total - foldersCount;
+
+					searchContainer.setTotal(total);
+
+					List results = DLAppServiceUtil.getFoldersAndFileEntriesAndFileShortcuts(repositoryId, folderId, status, mediaGalleryMimeTypes, true, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+
+					searchContainer.setResults(results);
+
+					request.setAttribute("view.jsp-mediaGalleryMimeTypes", mediaGalleryMimeTypes);
+					request.setAttribute("view.jsp-searchContainer", searchContainer);
+					%>
+
+					<aui:col cssClass="lfr-asset-column lfr-asset-column-details" width="<%= showFolderMenu ? 75 : 100 %>">
+						<div id="<portlet:namespace />imageGalleryAssetInfo">
+							<c:if test="<%= folder != null %>">
+								<div class="lfr-asset-description">
+									<%= HtmlUtil.escape(folder.getDescription()) %>
+								</div>
+
+								<div class="lfr-asset-metadata">
+									<div class="lfr-asset-icon lfr-asset-date">
+										<%= LanguageUtil.format(pageContext, "last-updated-x", dateFormatDate.format(folder.getModifiedDate())) %>
+									</div>
+
+									<div class="lfr-asset-icon lfr-asset-subfolders">
+										<%= foldersCount %> <liferay-ui:message key='<%= (foldersCount == 1) ? "subfolder" : "subfolders" %>' />
+									</div>
+
+									<div class="lfr-asset-icon lfr-asset-items last">
+										<%= imagesCount %> <liferay-ui:message key='<%= (imagesCount == 1) ? "image" : "images" %>' />
+									</div>
+								</div>
+
+								<liferay-ui:custom-attributes-available className="<%= DLFolderConstants.getClassName() %>">
+									<liferay-ui:custom-attribute-list
+										className="<%= DLFolderConstants.getClassName() %>"
+										classPK="<%= (folder != null) ? folder.getFolderId() : 0 %>"
+										editable="<%= false %>"
+										label="<%= true %>"
+									/>
+								</liferay-ui:custom-attributes-available>
+							</c:if>
+
+							<liferay-util:include page="/html/portlet/image_gallery_display/view_images.jsp" />
+						</div>
+					</aui:col>
+
+					<c:if test="<%= showFolderMenu %>">
+						<aui:col cssClass="lfr-asset-column lfr-asset-column-actions" last="<%= true %>" width="<%= 25 %>">
+							<div class="lfr-asset-summary">
+								<liferay-ui:icon
+									cssClass="lfr-asset-avatar"
+									image='<%= "../file_system/large/" + ((total > 0) ? "folder_full_image" : "folder_empty") %>'
+									message='<%= (folder != null) ? folder.getName() : LanguageUtil.get(pageContext, "home") %>'
+								/>
+
+								<div class="lfr-asset-name">
+									<h4><%= (folder != null) ? folder.getName() : LanguageUtil.get(pageContext, "home") %></h4>
+								</div>
+							</div>
+
+							<%
+							request.removeAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+							%>
+
+							<liferay-util:include page="/html/portlet/document_library/folder_action.jsp" />
+						</aui:col>
+					</c:if>
+				</aui:row>
+
+				<%
+				if (folder != null) {
+					IGUtil.addPortletBreadcrumbEntries(folder, request, renderResponse);
+
+					if (!defaultFolderView && portletName.equals(PortletKeys.MEDIA_GALLERY_DISPLAY)) {
+						PortalUtil.setPageSubtitle(folder.getName(), request);
+						PortalUtil.setPageDescription(folder.getDescription(), request);
+					}
+				}
+				%>
+
+			</c:when>
+			<c:when test='<%= topLink.equals("mine") || topLink.equals("recent") %>'>
+
+				<%
+				long groupImagesUserId = 0;
+
+				if (topLink.equals("mine") && themeDisplay.isSignedIn()) {
+					groupImagesUserId = user.getUserId();
+				}
+
+				SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, portletURL, null, null);
+
+				String[] mediaGalleryMimeTypes = DLUtil.getMediaGalleryMimeTypes(portletPreferences, renderRequest);
+
+				int total = DLAppServiceUtil.getGroupFileEntriesCount(repositoryId, groupImagesUserId, defaultFolderId, mediaGalleryMimeTypes, status);
+
+				searchContainer.setTotal(total);
+
+				List results = DLAppServiceUtil.getGroupFileEntries(repositoryId, groupImagesUserId, defaultFolderId, mediaGalleryMimeTypes, status, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+
+				searchContainer.setResults(results);
+
+				request.setAttribute("view.jsp-mediaGalleryMimeTypes", mediaGalleryMimeTypes);
+				request.setAttribute("view.jsp-searchContainer", searchContainer);
+				%>
+
+				<aui:row>
+					<liferay-ui:header
+						title="<%= topLink %>"
+					/>
+
+					<liferay-util:include page="/html/portlet/image_gallery_display/view_images.jsp" />
+				</aui:row>
+
+				<%
+				PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, topLink), currentURL);
+
+				PortalUtil.setPageSubtitle(LanguageUtil.get(pageContext, topLink), request);
+				%>
+
+			</c:when>
+		</c:choose>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/view_folders.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/view_folders.jsp
new file mode 100644
index 0000000..d8308d4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/view_folders.jsp
@@ -0,0 +1,160 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/image_gallery_display/init.jsp" %>
+
+<%
+long folderId = GetterUtil.getLong((String)request.getAttribute("view.jsp-folderId"));
+
+long repositoryId = GetterUtil.getLong((String)request.getAttribute("view.jsp-repositoryId"));
+
+if (folderId != DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) {
+	Folder folder = DLAppServiceUtil.getFolder(folderId);
+
+	repositoryId = folder.getRepositoryId();
+}
+
+int status = WorkflowConstants.STATUS_APPROVED;
+
+if (permissionChecker.isCompanyAdmin() || permissionChecker.isGroupAdmin(scopeGroupId)) {
+	status = WorkflowConstants.STATUS_ANY;
+}
+
+PortletURL portletURL = (PortletURL)request.getAttribute("view.jsp-portletURL");
+%>
+
+<liferay-ui:search-container
+	curParam="cur1"
+	headerNames="folder,num-of-folders,num-of-images"
+	iteratorURL="<%= portletURL %>"
+	total="<%= DLAppServiceUtil.getFoldersCount(repositoryId, folderId) %>"
+>
+	<liferay-ui:search-container-results
+		results="<%= DLAppServiceUtil.getFolders(repositoryId, folderId, searchContainer.getStart(), searchContainer.getEnd()) %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.kernel.repository.model.Folder"
+		escapedModel="<%= true %>"
+		keyProperty="folderId"
+		modelVar="curFolder"
+	>
+		<liferay-portlet:renderURL varImpl="rowURL">
+			<portlet:param name="struts_action" value="/image_gallery_display/view" />
+			<portlet:param name="folderId" value="<%= String.valueOf(curFolder.getFolderId()) %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+		</liferay-portlet:renderURL>
+
+		<liferay-ui:search-container-column-text
+			buffer="buffer"
+			name="folder"
+		>
+
+			<%
+			buffer.append("<a href=\"");
+			buffer.append(rowURL);
+			buffer.append("\">");
+			buffer.append("<img alt=\"");
+			buffer.append(LanguageUtil.get(pageContext, "folder"));
+			buffer.append("\" class=\"label-icon\" src=\"");
+			buffer.append(themeDisplay.getPathThemeImages());
+			buffer.append("/common/folder.png\">");
+			buffer.append("<strong>");
+			buffer.append(curFolder.getName());
+			buffer.append("</strong>");
+
+			if (Validator.isNotNull(curFolder.getDescription())) {
+				buffer.append("<br />");
+				buffer.append(curFolder.getDescription());
+			}
+
+			buffer.append("</a>");
+
+			List subfolders = DLAppServiceUtil.getFolders(repositoryId, curFolder.getFolderId(), 0, 5);
+
+			if (!subfolders.isEmpty()) {
+				int subfoldersCount = DLAppServiceUtil.getFoldersCount(repositoryId, curFolder.getFolderId());
+
+				buffer.append("<br /><u>");
+				buffer.append(LanguageUtil.get(pageContext, "subfolders"));
+				buffer.append("</u>: ");
+
+				for (int j = 0; j < subfolders.size(); j++) {
+					Folder subfolder = (Folder)subfolders.get(j);
+
+					subfolder = subfolder.toEscapedModel();
+
+					rowURL.setParameter("folderId", String.valueOf(subfolder.getFolderId()));
+
+					buffer.append("<a href=\"");
+					buffer.append(rowURL);
+					buffer.append("\">");
+					buffer.append(subfolder.getName());
+					buffer.append("</a>");
+
+					if ((j + 1) < subfolders.size()) {
+						buffer.append(", ");
+					}
+				}
+
+				if (subfoldersCount > subfolders.size()) {
+					rowURL.setParameter("folderId", String.valueOf(curFolder.getFolderId()));
+
+					buffer.append(", <a href=\"");
+					buffer.append(rowURL);
+					buffer.append("\">");
+					buffer.append(LanguageUtil.get(pageContext, "more"));
+					buffer.append(" &raquo;");
+					buffer.append("</a>");
+				}
+
+				rowURL.setParameter("folderId", String.valueOf(curFolder.getFolderId()));
+			}
+			%>
+
+		</liferay-ui:search-container-column-text>
+
+		<%
+		List subfolderIds = new ArrayList();
+
+		subfolderIds.add(new Long(curFolder.getFolderId()));
+
+		DLAppServiceUtil.getSubfolderIds(repositoryId, curFolder.getFolderId());
+
+		int subFoldersCount = subfolderIds.size() - 1;
+		int subEntriesCount = DLAppServiceUtil.getFoldersFileEntriesCount(repositoryId, subfolderIds, status);
+		%>
+
+		<liferay-ui:search-container-column-text
+			href="<%= rowURL %>"
+			name="num-of-folders"
+			value="<%= String.valueOf(subFoldersCount) %>"
+		/>
+
+		<liferay-ui:search-container-column-text
+			href="<%= rowURL %>"
+			name="num-of-entries"
+			value="<%= String.valueOf(subEntriesCount) %>"
+		/>
+
+		<liferay-ui:search-container-column-jsp
+			align="right"
+			path="/html/portlet/document_library/folder_action.jsp"
+		/>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/view_images.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/view_images.jsp
new file mode 100644
index 0000000..dacba35
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/view_images.jsp
@@ -0,0 +1,331 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/image_gallery_display/init.jsp" %>
+
+<%
+Long folderId = GetterUtil.getLong((String)request.getAttribute("view.jsp-folderId"));
+String[] mediaGalleryMimeTypes = (String[])request.getAttribute("view.jsp-mediaGalleryMimeTypes");
+SearchContainer searchContainer = (SearchContainer)request.getAttribute("view.jsp-searchContainer");
+
+List results = searchContainer.getResults();
+%>
+
+<c:choose>
+	<c:when test="<%= results.isEmpty() %>">
+		<div class="alert alert-info">
+			<%= LanguageUtil.get(pageContext, "there-are-no-media-files-in-this-folder") %>
+		</div>
+	</c:when>
+	<c:otherwise>
+		<div class="taglib-search-iterator-page-iterator-top">
+			<liferay-ui:search-paginator id="pageIteratorTop" searchContainer="<%= searchContainer %>" />
+		</div>
+	</c:otherwise>
+</c:choose>
+
+<div>
+
+	<%
+	for (int i = 0; i < results.size(); i++) {
+		Object result = results.get(i);
+	%>
+
+		<%@ include file="/html/portlet/document_library/cast_result.jspf" %>
+
+		<c:choose>
+			<c:when test="<%= fileEntry != null %>">
+
+				<%
+				String thumbnailId = null;
+
+				if (fileShortcut != null) {
+					thumbnailId = "shortcut_" + fileShortcut.getFileShortcutId();
+				}
+				else {
+					thumbnailId = "entry_" + fileEntry.getFileEntryId();
+				}
+				%>
+
+				<c:if test="<%= DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.VIEW) %>">
+
+					<%
+					FileVersion fileVersion = fileEntry.getFileVersion();
+
+					boolean hasAudio = AudioProcessorUtil.hasAudio(fileVersion);
+					boolean hasImages = ImageProcessorUtil.hasImages(fileVersion);
+					boolean hasPDFImages = PDFProcessorUtil.hasImages(fileVersion);
+					boolean hasVideo = VideoProcessorUtil.hasVideo(fileVersion);
+
+					String href = themeDisplay.getPathThemeImages() + "/file_system/large/" + DLUtil.getGenericName(fileEntry.getExtension()) + ".png";
+					String src = DLUtil.getThumbnailSrc(fileEntry, fileVersion, null, themeDisplay);
+
+					int playerHeight = 500;
+
+					String dataOptions = StringPool.BLANK;
+
+					if (PropsValues.DL_FILE_ENTRY_PREVIEW_ENABLED) {
+						if (hasAudio) {
+							href = DLUtil.getPreviewURL(fileEntry, fileVersion, themeDisplay, HtmlUtil.escapeURL("&audioPreview=1") + "&supportedAudio=1&mediaGallery=1");
+
+							for (String audioContainer : PropsValues.DL_FILE_ENTRY_PREVIEW_AUDIO_CONTAINERS) {
+								dataOptions += "&" + audioContainer + "PreviewURL=" + HtmlUtil.escapeURL(DLUtil.getPreviewURL(fileEntry, fileVersion, themeDisplay, "&supportedAudio=1&audioPreview=1&type=" + audioContainer));
+							}
+
+							playerHeight = 43;
+						}
+						else if (hasImages) {
+							href = DLUtil.getPreviewURL(fileEntry, fileVersion, themeDisplay, "&imagePreview=1");
+						}
+						else if (hasPDFImages) {
+							href = DLUtil.getPreviewURL(fileEntry, fileVersion, themeDisplay, "&previewFileIndex=1");
+						}
+						else if (hasVideo) {
+							href = DLUtil.getPreviewURL(fileEntry, fileVersion, themeDisplay, "&supportedVideo=1&mediaGallery=1");
+
+							for (String videoContainer : PropsValues.DL_FILE_ENTRY_PREVIEW_VIDEO_CONTAINERS) {
+								dataOptions += "&" + videoContainer + "PreviewURL=" + HtmlUtil.escapeURL(DLUtil.getPreviewURL(fileEntry, fileVersion, themeDisplay, "&supportedVideo=1&videoPreview=1&type=" + videoContainer));
+							}
+						}
+					}
+					%>
+
+					<div class="image-icon">
+						<a class="image-link preview" <%= (hasAudio || hasVideo) ? "data-options=\"height=" + playerHeight + "&thumbnailURL=" + HtmlUtil.escapeURL(DLUtil.getPreviewURL(fileEntry, fileVersion, themeDisplay, "&videoThumbnail=1")) + "&width=640" + dataOptions + "\"" : StringPool.BLANK %> href="<%= href %>" thumbnailId="<%= thumbnailId %>" title="<%= HtmlUtil.escape(fileEntry.getTitle()) + " - " + HtmlUtil.escape(fileEntry.getDescription()) %>">
+							<span class="image-thumbnail" style="<%= DLUtil.getThumbnailStyle(false, 4) %>">
+								<img alt="<%= HtmlUtil.escape(fileEntry.getTitle()) + " - " + HtmlUtil.escape(fileEntry.getDescription()) %>" border="no" src="<%= src %>" style="max-height: <%= PropsValues.DL_FILE_ENTRY_THUMBNAIL_MAX_HEIGHT %>px; max-width: <%= PropsValues.DL_FILE_ENTRY_THUMBNAIL_MAX_WIDTH %>px;" />
+
+								<c:if test="<%= fileShortcut != null %>">
+									<img alt="<liferay-ui:message key="shortcut" />" class="shortcut-icon" src="<%= themeDisplay.getPathThemeImages() %>/file_system/large/overlay_link.png" />
+								</c:if>
+
+								<c:if test="<%= fileEntry.isCheckedOut() %>">
+									<img alt="<liferay-ui:message key="locked" />" class="locked-icon" src="<%= themeDisplay.getPathThemeImages() %>/file_system/large/overlay_lock.png" />
+								</c:if>
+							</span>
+
+							<span class="image-title"><%= HtmlUtil.escape(fileVersion.getTitle()) %></span>
+						</a>
+					</div>
+
+					<c:if test="<%= showActions %>">
+						<div class="hide" id="<portlet:namespace />buttonsContainer_<%= thumbnailId %>">
+							<div class="buttons-container float-container" id="<portlet:namespace />buttons_<%= thumbnailId %>">
+								<%@ include file="/html/portlet/image_gallery_display/image_action.jspf" %>
+							</div>
+						</div>
+					</c:if>
+
+					<%
+					List assetTags = AssetTagServiceUtil.getTags(DLFileEntryConstants.getClassName(), fileEntry.getFileEntryId());
+					%>
+
+					<div id="<portlet:namespace />categorizationContainer_<%= fileEntry.getFileEntryId() %>" style="display: none;">
+						<span <%= !assetTags.isEmpty() ? "class=\"has-tags\"" : "" %>>
+							<liferay-ui:asset-categories-summary
+								className="<%= DLFileEntryConstants.getClassName() %>"
+								classPK="<%= fileEntry.getFileEntryId() %>"
+							/>
+						</span>
+
+						<liferay-ui:asset-tags-summary
+							className="<%= DLFileEntryConstants.getClassName() %>"
+							classPK="<%= fileEntry.getFileEntryId() %>"
+						/>
+					</div>
+				</c:if>
+			</c:when>
+
+			<c:when test="<%= curFolder != null %>">
+				<portlet:renderURL var="viewFolderURL">
+					<portlet:param name="struts_action" value="/image_gallery_display/view" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="folderId" value="<%= String.valueOf(curFolder.getFolderId()) %>" />
+				</portlet:renderURL>
+
+				<c:choose>
+					<c:when test="<%= curFolder.isMountPoint() %>">
+
+						<%
+						try {
+							int curFoldersCount = DLAppServiceUtil.getFoldersCount(curFolder.getRepositoryId(), curFolder.getFolderId());
+
+							String folderImageSrc = themeDisplay.getPathThemeImages() + "/file_system/large/drive.png";
+						%>
+
+							<div class="image-icon">
+								<a class="image-link" href="<%= viewFolderURL.toString() %>" title="<%= HtmlUtil.escape(curFolder.getName()) + " - " + HtmlUtil.escape(curFolder.getDescription()) %>">
+									<span class="image-thumbnail">
+										<img alt="" border="no" src="<%= folderImageSrc %>" style="max-height: <%= PropsValues.DL_FILE_ENTRY_THUMBNAIL_MAX_HEIGHT %>px; max-width: <%= PropsValues.DL_FILE_ENTRY_THUMBNAIL_MAX_WIDTH %>px;" />
+									</span>
+
+									<span class="image-title"><%= HtmlUtil.escape(StringUtil.shorten(curFolder.getName(), 60)) %></span>
+								</a>
+							</div>
+
+						<%
+						}
+						catch (Exception e) {
+							String folderImageSrc = themeDisplay.getPathThemeImages() + "/file_system/large/drive_error.png";
+						%>
+
+							<div class="image-icon">
+								<span class="image-thumbnail error" title="<%= LanguageUtil.get(pageContext, "an-unexpected-error-occurred-while-connecting-to-the-repository") %>">
+									<img alt="" border="no" src="<%= folderImageSrc %>" style="max-height: <%= PropsValues.DL_FILE_ENTRY_THUMBNAIL_MAX_HEIGHT %>px; max-width: <%= PropsValues.DL_FILE_ENTRY_THUMBNAIL_MAX_WIDTH %>px;" />
+
+									<span class="image-title"><%= HtmlUtil.escape(StringUtil.shorten(curFolder.getName(), 60)) %></span>
+								</span>
+							</div>
+
+						<%
+						}
+						%>
+
+					</c:when>
+					<c:otherwise>
+						<div class="image-icon">
+							<a class="image-link" href="<%= viewFolderURL.toString() %>" title="<%= HtmlUtil.escape(curFolder.getName()) + " - " + HtmlUtil.escape(curFolder.getDescription()) %>">
+
+								<%
+									int curFoldersCount = DLAppServiceUtil.getFoldersCount(curFolder.getRepositoryId(), curFolder.getFolderId());
+
+									int curImagesCount = 0;
+
+									if (mediaGalleryMimeTypes != null) {
+										curImagesCount = DLAppServiceUtil.getFileEntriesAndFileShortcutsCount(curFolder.getRepositoryId(), curFolder.getFolderId(), WorkflowConstants.STATUS_APPROVED, mediaGalleryMimeTypes);
+									}
+									else {
+										curImagesCount = DLAppServiceUtil.getFileEntriesAndFileShortcutsCount(curFolder.getRepositoryId(), curFolder.getFolderId(), WorkflowConstants.STATUS_APPROVED);
+									}
+
+									String folderImageSrc = themeDisplay.getPathThemeImages() + "/file_system/large/folder_empty.png";
+
+									if ((curFoldersCount + curImagesCount) > 0) {
+										folderImageSrc = themeDisplay.getPathThemeImages() + "/file_system/large/folder_full_image.png";
+									}
+								%>
+
+								<span class="image-thumbnail">
+									<img alt="" border="no" src="<%= folderImageSrc %>" style="max-height: <%= PropsValues.DL_FILE_ENTRY_THUMBNAIL_MAX_HEIGHT %>px; max-width: <%= PropsValues.DL_FILE_ENTRY_THUMBNAIL_MAX_WIDTH %>px;" />
+								</span>
+
+								<span class="image-title"><%= HtmlUtil.escape(StringUtil.shorten(curFolder.getName(), 60)) %></span>
+							</a>
+						</div>
+					</c:otherwise>
+				</c:choose>
+			</c:when>
+			<c:otherwise>
+				<div style="float: left; margin: 100px 10px 0px;">
+					<img alt="<liferay-ui:message key="image" />" border="no" src="<%= themeDisplay.getPathThemeImages() %>/application/forbidden_action.png" />
+				</div>
+			</c:otherwise>
+		</c:choose>
+
+	<%
+	}
+	%>
+
+</div>
+
+<c:if test="<%= !results.isEmpty() %>">
+	<div class="taglib-search-iterator-page-iterator-bottom">
+		<liferay-ui:search-paginator id="pageIteratorBottom" searchContainer="<%= searchContainer %>" />
+	</div>
+</c:if>
+
+<%
+PortletURL embeddedPlayerURL = renderResponse.createRenderURL();
+
+embeddedPlayerURL.setParameter("struts_action", "/image_gallery_display/embedded_player");
+embeddedPlayerURL.setWindowState(LiferayWindowState.POP_UP);
+%>
+
+<aui:script use="aui-image-viewer-gallery,aui-image-viewer-media">
+	var viewportRegion = A.getDoc().get('viewportRegion');
+
+	var maxHeight = (viewportRegion.height / 2);
+	var maxWidth = (viewportRegion.width / 2);
+
+	var imageGallery = new A.ImageGallery(
+		{
+			after: {
+				render: function(event) {
+					var instance = this;
+
+					var footerNode = instance.footerNode;
+
+					instance._actions = A.Node.create('<div class="lfr-image-gallery-actions"></div>');
+
+					if (footerNode) {
+						footerNode.append(instance._actions);
+					}
+				}
+
+				<c:if test="<%= showActions %>">
+					, load: function(event) {
+						var instance = this;
+
+						var currentLink = instance.getCurrentLink();
+
+						var thumbnailId = currentLink.attr('thumbnailId');
+
+						var actions = instance._actions;
+
+						if (actions) {
+							var defaultAction = A.one('#<portlet:namespace />buttonsContainer_' + thumbnailId);
+
+							actions.empty();
+
+							var action = defaultAction.clone().show();
+
+							actions.append(action);
+						}
+					}
+				</c:if>
+			},
+			delay: 5000,
+			infoTemplate: '<%= LanguageUtil.format(pageContext, "image-x-of-x", new String[] {"{current}", "{total}"}) %>',
+			links: '#<portlet:namespace />imageGalleryAssetInfo .image-link.preview',
+			maxHeight: maxHeight,
+			maxWidth: maxWidth,
+			playingLabel: '(<liferay-ui:message key="playing" />)',
+			plugins: [
+				{
+					cfg: {
+						'providers.liferay': {
+							container: '<iframe frameborder="0" width="{width}" height="{height}" scrolling="no" src="<%= embeddedPlayerURL.toString() %>&<portlet:namespace />thumbnailURL={thumbnailURL}&<portlet:namespace />mp3PreviewURL={mp3PreviewURL}&<portlet:namespace />mp4PreviewURL={mp4PreviewURL}&<portlet:namespace />oggPreviewURL={oggPreviewURL}&<portlet:namespace />ogvPreviewURL={ogvPreviewURL}"></iframe>',
+							matcher: /(.+)&mediaGallery=1/,
+							options: A.merge(
+								A.MediaViewerPlugin.DEFAULT_OPTIONS,
+								{
+									'thumbnailURL': '',
+									'mp3PreviewURL': '',
+									'mp4PreviewURL': '',
+									'oggPreviewURL': '',
+									'ogvPreviewURL': ''
+								}
+							),
+							mediaRegex: /(.+)&mediaGallery=1/
+						}
+					},
+					fn: A.MediaViewerPlugin
+				}
+			],
+			zIndex: ++Liferay.zIndex.WINDOW
+		}
+	).render();
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/view_slide_show.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/view_slide_show.jsp
new file mode 100644
index 0000000..615a947
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/image_gallery_display/view_slide_show.jsp
@@ -0,0 +1,137 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/image_gallery_display/init.jsp" %>
+
+<%
+Folder folder = (Folder)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FOLDER);
+
+long folderId = (folder == null) ? 0 : folder.getFolderId();
+
+long repositoryId = scopeGroupId;
+
+if (folder != null) {
+	repositoryId = folder.getRepositoryId();
+}
+
+List fileEntries = DLAppServiceUtil.getFileEntries(repositoryId, folderId);
+
+int defaultSpeed = 3000;
+%>
+
+<aui:form>
+	<aui:fieldset column="<%= true %>">
+		<aui:col width="<%= 50 %>">
+			<aui:button onClick='<%= renderResponse.getNamespace() + "showPrevious();" %>' value="previous" />
+			<aui:button onClick='<%= renderResponse.getNamespace() + "play();" %>' value="play" />
+			<aui:button onClick='<%= renderResponse.getNamespace() + "pause();" %>' value="pause" />
+			<aui:button onClick='<%= renderResponse.getNamespace() + "showNext();" %>' value="next" />
+		</aui:col>
+		<aui:col width="<%= 50 %>">
+			<aui:select inlineLabel="left" name="speed" onChange='<%= renderResponse.getNamespace() + "pause();" + renderResponse.getNamespace() + "speed = this[this.selectedIndex].value * 1000;" + renderResponse.getNamespace() + "play();" %>'>
+
+				<%
+				for (int i = 1; i <= 10; i++) {
+				%>
+
+					<aui:option label="<%= i %>" selected="<%= (defaultSpeed / 1000) == i %>" />
+
+				<%
+				}
+				%>
+
+			</aui:select>
+
+		</aui:col>
+	</aui:fieldset>
+</aui:form>
+
+<br />
+
+<table class="lfr-table">
+<tr>
+	<td>
+
+		<%
+		if (!fileEntries.isEmpty()) {
+			FileEntry fileEntry = (FileEntry)fileEntries.get(0);
+
+			String largeSrc = DLUtil.getPreviewURL(fileEntry, fileEntry.getFileVersion(), themeDisplay, StringPool.BLANK);
+		%>
+
+			<img border="0" name="<portlet:namespace />slideShow" src="<%= largeSrc %>" />
+
+		<%
+		}
+		%>
+
+	</td>
+</tr>
+</table>
+
+<aui:script>
+	var <portlet:namespace />imgArray = new Array();
+
+	<%
+	for (int i = 0; i < fileEntries.size(); i++) {
+		FileEntry fileEntry = (FileEntry)fileEntries.get(i);
+
+		String largeSrc = DLUtil.getPreviewURL(fileEntry, fileEntry.getFileVersion(), themeDisplay, StringPool.BLANK);
+	%>
+
+		<portlet:namespace />imgArray[<%= i %>] = "<%= largeSrc %>";
+
+	<%
+	}
+	%>
+
+	var <portlet:namespace />imgArrayPos = 0
+	var <portlet:namespace />speed = <%= defaultSpeed %>;
+	var <portlet:namespace />timeout = 0;
+
+	function <portlet:namespace />pause() {
+		clearInterval(<portlet:namespace />timeout);
+		<portlet:namespace />timeout = 0;
+	}
+
+	function <portlet:namespace />play() {
+		if (<portlet:namespace />timeout == 0) {
+			<portlet:namespace />timeout = setInterval("<portlet:namespace />showNext()", <portlet:namespace />speed);
+		}
+	}
+
+	function <portlet:namespace />showNext() {
+		<portlet:namespace />imgArrayPos++;
+
+		if (<portlet:namespace />imgArrayPos == <portlet:namespace />imgArray.length) {
+			<portlet:namespace />imgArrayPos = 0;
+		}
+
+		document.images.<portlet:namespace />slideShow.src = <portlet:namespace />imgArray[<portlet:namespace />imgArrayPos];
+	}
+
+	function <portlet:namespace />showPrevious() {
+		<portlet:namespace />imgArrayPos--;
+
+		if (<portlet:namespace />imgArrayPos < 0) {
+			<portlet:namespace />imgArrayPos = <portlet:namespace />imgArray.length - 1;
+		}
+
+		document.images.<portlet:namespace />slideShow.src = <portlet:namespace />imgArray[<portlet:namespace />imgArrayPos];
+	}
+
+	<portlet:namespace />play();
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/init.jsp
new file mode 100644
index 0000000..bd88900
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/init.jsp
@@ -0,0 +1,31 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/common/init.jsp" %>
+
+<portlet:defineObjects />
+
+<%
+PortletMode portletMode = liferayPortletRequest.getPortletMode();
+WindowState windowState = liferayPortletRequest.getWindowState();
+
+PortletURL currentURLObj = PortletURLUtil.getCurrent(liferayPortletRequest, liferayPortletResponse);
+
+String currentURL = currentURLObj.toString();
+//String currentURL = PortalUtil.getCurrentURL(request);
+%>
+
+<%@ include file="/html/portlet/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/invitation/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/invitation/configuration.jsp
new file mode 100644
index 0000000..9963bc8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/invitation/configuration.jsp
@@ -0,0 +1,97 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/invitation/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+String emailMessageSubject = ParamUtil.getString(request, "emailMessageSubject", InvitationUtil.getEmailMessageSubject(portletPreferences));
+String emailMessageBody = ParamUtil.getString(request, "emailMessageBody", InvitationUtil.getEmailMessageBody(portletPreferences));
+
+String editorParam = "emailMessageBody";
+String editorContent = emailMessageBody;
+%>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveConfiguration();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+
+	<liferay-ui:error key="emailMessageBody" message="please-enter-a-valid-body" />
+	<liferay-ui:error key="emailMessageSubject" message="please-enter-a-valid-subject" />
+
+	<aui:fieldset>
+		<aui:input cssClass="lfr-input-text-container" label="subject" name="preferences--emailMessageSubject--" type="text" value="<%= emailMessageSubject %>" />
+
+		<aui:field-wrapper label="body">
+			<liferay-ui:input-editor editorImpl="<%= EDITOR_WYSIWYG_IMPL_KEY %>" />
+
+			<aui:input name='<%= "preferences--" + editorParam + "--" %>' type="hidden" />
+		</aui:field-wrapper>
+	</aui:fieldset>
+
+	<div class="definition-of-terms">
+		<h4><liferay-ui:message key="definition-of-terms" /></h4>
+
+		<dl>
+			<dt>
+				[$FROM_ADDRESS$]
+			</dt>
+			<dd>
+				<liferay-ui:message key="the-address-of-the-email-sender" />
+			</dd>
+			<dt>
+				[$FROM_NAME$]
+			</dt>
+			<dd>
+				<liferay-ui:message key="the-name-of-the-email-sender" />
+			</dd>
+			<dt>
+				[$PAGE_URL$]
+			</dt>
+			<dd>
+				<%= PortalUtil.getLayoutFullURL(layout, themeDisplay) %>
+			</dd>
+			<dt>
+				[$PORTAL_URL$]
+			</dt>
+			<dd>
+				<%= company.getVirtualHostname() %>
+			</dd>
+		</dl>
+	</div>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />initEditor() {
+		return "<%= UnicodeFormatter.toString(editorContent) %>";
+	}
+
+	function <portlet:namespace />saveConfiguration() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= editorParam %>.value = window.<portlet:namespace />editor.getHTML();
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
+
+<%!
+public static final String EDITOR_WYSIWYG_IMPL_KEY = "editor.wysiwyg.portal-web.docroot.html.portlet.invitation.configuration.jsp";
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/invitation/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/invitation/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/invitation/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/invitation/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/invitation/init.jsp
new file mode 100644
index 0000000..0328dc0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/invitation/init.jsp
@@ -0,0 +1,21 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.invitation.util.InvitationUtil" %>
+
+<%@ include file="/html/portlet/invitation/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/invitation/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/invitation/view.jsp
new file mode 100644
index 0000000..4b0dce8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/invitation/view.jsp
@@ -0,0 +1,69 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/invitation/init.jsp" %>
+
+<c:choose>
+	<c:when test="<%= windowState.equals(WindowState.NORMAL) %>">
+		<liferay-ui:success key="invitationSent" message="your-invitations-have-been-sent" />
+
+		<portlet:renderURL var="viewURL" windowState="<%= WindowState.MAXIMIZED.toString() %>">
+			<portlet:param name="struts_action" value="/invitation/view" />
+		</portlet:renderURL>
+
+		<aui:a href="<%= viewURL %>" label="invite-friends" />
+	</c:when>
+	<c:otherwise>
+		<portlet:actionURL var="portletURL">
+			<portlet:param name="struts_action" value="/invitation/view" />
+		</portlet:actionURL>
+
+		<portlet:renderURL var="redirectURL" windowState="<%= WindowState.NORMAL.toString() %>" />
+
+		<aui:form action="<%= portletURL %>" method="post" name="fm">
+			<aui:input name="redirect" type="hidden" value="<%= redirectURL %>" />
+
+			<div class="alert alert-info">
+				<liferay-ui:message arguments="<%= InvitationUtil.getEmailMessageMaxRecipients() %>" key="enter-up-to-x-email-addresses-of-friends-you-would-like-to-invite" />
+			</div>
+
+			<%
+			Set invalidEmailAddresses = (Set)SessionErrors.get(renderRequest, "emailAddresses");
+
+			int emailMessageMaxRecipients = InvitationUtil.getEmailMessageMaxRecipients();
+
+			for (int i = 0; i < emailMessageMaxRecipients; i++) {
+				String emailAddress = ParamUtil.getString(request, "emailAddress" + i);
+			%>
+
+				<c:if test='<%= (invalidEmailAddresses != null) && invalidEmailAddresses.contains("emailAddress" + i) %>'>
+					<div class="alert alert-error">
+						<liferay-ui:message key="please-enter-a-valid-email-address" />
+					</div>
+				</c:if>
+
+				<aui:input cssClass="lfr-input-text-container" label="" name='<%= "emailAddress" + i %>' size="65" title='<%= LanguageUtil.get(pageContext, "email-address") + StringPool.SPACE + (i + 1) %>' type="text" value="<%= emailAddress %>" />
+
+			<%
+			}
+			%>
+
+			<aui:button-row>
+				<aui:button type="submit" value="invite-friends" />
+			</aui:button-row>
+		</aui:form>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/add_button.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/add_button.jsp
new file mode 100644
index 0000000..88b2112
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/add_button.jsp
@@ -0,0 +1,68 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+JournalFolder folder = (JournalFolder)request.getAttribute("view.jsp-folder");
+
+long folderId = GetterUtil.getLong((String)request.getAttribute("view.jsp-folderId"));
+
+List<DDMStructure> ddmStructures = DDMStructureLocalServiceUtil.getStructures(PortalUtil.getSiteAndCompanyGroupIds(themeDisplay), PortalUtil.getClassNameId(JournalArticle.class));
+%>
+
+<aui:nav-item dropdown="<%= true %>" id="addButtonContainer" label="add">
+	<c:if test="<%= JournalFolderPermission.contains(permissionChecker, scopeGroupId, folderId, ActionKeys.ADD_FOLDER) %>">
+		<portlet:renderURL var="addFolderURL">
+			<portlet:param name="struts_action" value="/journal/edit_folder" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(scopeGroupId) %>" />
+			<portlet:param name="parentFolderId" value="<%= String.valueOf(folderId) %>" />
+		</portlet:renderURL>
+
+		<aui:nav-item href="<%= addFolderURL %>" iconCssClass="icon-folder-open" label='<%= (folder != null) ? "subfolder" : "folder" %>' />
+	</c:if>
+
+	<c:if test="<%= JournalFolderPermission.contains(permissionChecker, scopeGroupId, folderId, ActionKeys.ADD_ARTICLE) %>">
+		<liferay-portlet:renderURL var="addArticleURL" windowState="<%= LiferayWindowState.MAXIMIZED.toString() %>">
+			<portlet:param name="struts_action" value="/journal/edit_article" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(scopeGroupId) %>" />
+			<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+		</liferay-portlet:renderURL>
+
+		<aui:nav-item href="<%= addArticleURL %>" label="basic-web-content" />
+
+		<%
+		for (DDMStructure ddmStructure : ddmStructures) {
+		%>
+
+			<liferay-portlet:renderURL var="addArticleURL" windowState="<%= LiferayWindowState.MAXIMIZED.toString() %>">
+				<portlet:param name="struts_action" value="/journal/edit_article" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="groupId" value="<%= String.valueOf(scopeGroupId) %>" />
+				<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+				<portlet:param name="structureId" value="<%= ddmStructure.getStructureKey() %>" />
+			</liferay-portlet:renderURL>
+
+			<aui:nav-item href="<%= addArticleURL %>" label="<%= HtmlUtil.escape(ddmStructure.getName(themeDisplay.getLocale())) %>" />
+
+		<%
+		}
+		%>
+
+	</c:if>
+</aui:nav-item>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article/abstract.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article/abstract.jsp
new file mode 100644
index 0000000..984c5a1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article/abstract.jsp
@@ -0,0 +1,148 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+JournalArticle article = (JournalArticle)request.getAttribute(WebKeys.JOURNAL_ARTICLE);
+
+boolean smallImage = BeanParamUtil.getBoolean(article, request, "smallImage");
+String smallImageURL = BeanParamUtil.getString(article, request, "smallImageURL");
+
+String defaultLanguageId = (String)request.getAttribute("edit_article.jsp-defaultLanguageId");
+String toLanguageId = (String)request.getAttribute("edit_article.jsp-toLanguageId");
+%>
+
+<liferay-ui:error-marker key="errorSection" value="abstract" />
+
+<aui:model-context bean="<%= article %>" defaultLanguageId="<%= defaultLanguageId %>" model="<%= JournalArticle.class %>" />
+
+<h3><liferay-ui:message key="abstract" /></h3>
+
+<liferay-ui:error exception="<%= ArticleSmallImageNameException.class %>">
+
+	<%
+	String[] imageExtensions = PrefsPropsUtil.getStringArray(PropsKeys.JOURNAL_IMAGE_EXTENSIONS, StringPool.COMMA);
+	%>
+
+	<liferay-ui:message key="image-names-must-end-with-one-of-the-following-extensions" /> <%= StringUtil.merge(imageExtensions, ", ") %>.
+</liferay-ui:error>
+
+<liferay-ui:error exception="<%= ArticleSmallImageSizeException.class %>">
+
+	<%
+	long imageMaxSize = PrefsPropsUtil.getLong(PropsKeys.JOURNAL_IMAGE_SMALL_MAX_SIZE) / 1024;
+	%>
+
+	<liferay-ui:message arguments="<%= imageMaxSize %>" key="please-enter-a-small-image-with-a-valid-file-size-no-larger-than-x" />
+</liferay-ui:error>
+
+<aui:fieldset>
+	<aui:input label="summary" languageId="<%= Validator.isNotNull(toLanguageId) ? toLanguageId : defaultLanguageId %>" name="description" />
+
+	<c:if test="<%= Validator.isNull(toLanguageId) %>">
+		<div id="<portlet:namespace />smallImageContainer">
+			<div class="lfr-journal-small-image-header">
+				<aui:input label="use-small-image" name="smallImage" />
+			</div>
+
+			<div class="lfr-journal-small-image-content toggler-content-collapsed">
+				<aui:row>
+					<c:if test="<%= smallImage && (article != null) %>">
+						<aui:col width="<%= 50 %>">
+							<img alt="<liferay-ui:message key="preview" />" class="lfr-journal-small-image-preview" src="<%= Validator.isNotNull(article.getSmallImageURL()) ? article.getSmallImageURL() : themeDisplay.getPathImage() + "/template?img_id=" + article.getSmallImageId() + "&t=" + WebServerServletTokenUtil.getToken(article.getSmallImageId()) %>" />
+						</aui:col>
+					</c:if>
+
+					<aui:col width="<%= (smallImage && (article != null)) ? 50 : 100 %>">
+						<aui:fieldset>
+							<aui:input cssClass="lfr-journal-small-image-type" inlineField="<%= true %>" label="small-image-url" name="smallImageType" type="radio" />
+
+							<aui:input cssClass="lfr-journal-small-image-value" inlineField="<%= true %>" label="" name="smallImageURL" />
+						</aui:fieldset>
+
+						<aui:fieldset>
+							<aui:input cssClass="lfr-journal-small-image-type" inlineField="<%= true %>" label="small-image" name="smallImageType" type="radio" />
+
+							<aui:input cssClass="lfr-journal-small-image-value" inlineField="<%= true %>" label="" name="smallFile" type="file" />
+						</aui:fieldset>
+					</aui:col>
+				</aui:row>
+			</div>
+		</div>
+
+		<aui:script use="aui-toggler">
+			var container = A.one('#<portlet:namespace />smallImageContainer');
+
+			var types = container.all('.lfr-journal-small-image-type');
+			var values = container.all('.lfr-journal-small-image-value');
+
+			var selectSmallImageType = function(index) {
+				types.set('checked', false);
+
+				types.item(index).set('checked', true);
+
+				values.set('disabled', true);
+
+				values.item(index).set('disabled', false);
+			};
+
+			container.delegate(
+				'change',
+				function(event) {
+					var index = types.indexOf(event.currentTarget);
+
+					selectSmallImageType(index);
+				},
+				'.lfr-journal-small-image-type'
+			);
+
+			new A.Toggler(
+				{
+					animated: true,
+					content: '#<portlet:namespace />smallImageContainer .lfr-journal-small-image-content',
+					expanded: <%= smallImage %>,
+					header: '#<portlet:namespace />smallImageContainer .lfr-journal-small-image-header',
+					on: {
+						animatingChange: function(event) {
+							var instance = this;
+
+							var expanded = !instance.get('expanded');
+
+							A.one('#<portlet:namespace />smallImage').set('value', expanded);
+							A.one('#<portlet:namespace />smallImageCheckbox').set('checked', expanded);
+
+							if (expanded) {
+								types.each(
+									function(item, index, collection) {
+										if (item.get('checked')) {
+											values.item(index).set('disabled', false);
+										}
+									}
+								);
+							}
+							else {
+								values.set('disabled', true);
+							}
+						}
+					}
+				}
+			);
+
+			selectSmallImageType('<%= (article != null) && Validator.isNotNull(article.getSmallImageURL()) ? 0 : 1 %>');
+		</aui:script>
+	</c:if>
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article/categorization.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article/categorization.jsp
new file mode 100644
index 0000000..dab070f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article/categorization.jsp
@@ -0,0 +1,89 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+String defaultLanguageId = (String)request.getAttribute("edit_article.jsp-defaultLanguageId");
+
+JournalArticle article = (JournalArticle)request.getAttribute(WebKeys.JOURNAL_ARTICLE);
+
+String type = BeanParamUtil.getString(article, request, "type");
+
+if (Validator.isNull(type)) {
+	type = "general";
+}
+
+String toLanguageId = (String)request.getAttribute("edit_article.jsp-toLanguageId");
+%>
+
+<liferay-ui:error-marker key="errorSection" value="categorization" />
+
+<aui:model-context bean="<%= article %>" model="<%= JournalArticle.class %>" />
+
+<h3><liferay-ui:message key="categorization" /></h3>
+
+<c:if test="<%= Validator.isNull(toLanguageId) %>">
+	<liferay-ui:asset-categories-error />
+
+	<liferay-ui:asset-tags-error />
+</c:if>
+
+<liferay-ui:error exception="<%= ArticleTypeException.class %>" message="please-select-a-type" />
+
+<aui:fieldset>
+	<aui:select name="type" showEmptyOption="<%= true %>">
+
+		<%
+		for (int i = 0; i < JournalArticleConstants.TYPES.length; i++) {
+		%>
+
+			<aui:option label="<%= JournalArticleConstants.TYPES[i] %>" selected="<%= type.equals(JournalArticleConstants.TYPES[i]) %>" />
+
+		<%
+		}
+		%>
+
+	</aui:select>
+
+	<%
+	long classPK = 0;
+
+	if (article != null) {
+		classPK = article.getResourcePrimKey();
+
+		if (!article.isApproved() && (article.getVersion() != JournalArticleConstants.VERSION_DEFAULT)) {
+			try {
+				AssetEntryLocalServiceUtil.getEntry(JournalArticle.class.getName(), article.getPrimaryKey());
+
+				classPK = article.getPrimaryKey();
+			}
+			catch (NoSuchEntryException nsee) {
+			}
+		}
+	}
+	%>
+
+	<aui:input classPK="<%= classPK %>" name="categories" type="assetCategories" />
+
+	<aui:input classPK="<%= classPK %>" name="tags" type="assetTags" />
+</aui:fieldset>
+
+<aui:script>
+	function <portlet:namespace />getSuggestionsContent() {
+		return document.<portlet:namespace />fm1.<portlet:namespace />title_<%= defaultLanguageId %>.value;
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article/content.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article/content.jsp
new file mode 100644
index 0000000..5ff681f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article/content.jsp
@@ -0,0 +1,776 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+String redirect = (String)request.getAttribute("edit_article.jsp-redirect");
+
+String portletResource = ParamUtil.getString(request, "portletResource");
+
+JournalArticle article = (JournalArticle)request.getAttribute(WebKeys.JOURNAL_ARTICLE);
+
+long groupId = BeanParamUtil.getLong(article, request, "groupId", scopeGroupId);
+
+long classNameId = ParamUtil.getLong(request, "classNameId");
+String classPK = ParamUtil.getString(request, "classPK");
+
+String articleId = BeanParamUtil.getString(article, request, "articleId");
+String newArticleId = ParamUtil.getString(request, "newArticleId");
+String instanceIdKey = PwdGenerator.KEY1 + PwdGenerator.KEY2 + PwdGenerator.KEY3;
+
+String structureId = StringPool.BLANK;
+
+long ddmStructureGroupId = groupId;
+String ddmStructureName = LanguageUtil.get(pageContext, "default");
+String ddmStructureDescription = StringPool.BLANK;
+
+DDMStructure ddmStructure = (DDMStructure)request.getAttribute("edit_article.jsp-structure");
+
+if (ddmStructure != null) {
+	structureId = ddmStructure.getStructureKey();
+
+	ddmStructureGroupId = ddmStructure.getGroupId();
+	ddmStructureName = ddmStructure.getName(locale);
+	ddmStructureDescription = ddmStructure.getDescription(locale);
+}
+
+List<DDMTemplate> ddmTemplates = new ArrayList<DDMTemplate>();
+
+if (ddmStructure != null) {
+	ddmTemplates.addAll(DDMTemplateServiceUtil.getTemplates(ddmStructureGroupId, PortalUtil.getClassNameId(DDMStructure.class), ddmStructure.getStructureId()));
+
+	if (groupId != ddmStructureGroupId) {
+		ddmTemplates.addAll(DDMTemplateServiceUtil.getTemplates(groupId, PortalUtil.getClassNameId(DDMStructure.class), ddmStructure.getStructureId()));
+	}
+}
+
+String templateId = StringPool.BLANK;
+
+DDMTemplate ddmTemplate = (DDMTemplate)request.getAttribute("edit_article.jsp-template");
+
+if (ddmTemplate != null) {
+	templateId = ddmTemplate.getTemplateKey();
+}
+else if (!ddmTemplates.isEmpty()) {
+	ddmTemplate = ddmTemplates.get(0);
+
+	templateId = ddmTemplate.getTemplateKey();
+}
+
+String defaultLanguageId = (String)request.getAttribute("edit_article.jsp-defaultLanguageId");
+String toLanguageId = (String)request.getAttribute("edit_article.jsp-toLanguageId");
+
+String content = null;
+
+boolean preselectCurrentLayout = false;
+
+if (article != null) {
+	content = ParamUtil.getString(request, "content");
+
+	if (Validator.isNull(content)) {
+		content = article.getContent();
+	}
+
+	if (Validator.isNotNull(toLanguageId)) {
+		content = JournalArticleImpl.getContentByLocale(content, Validator.isNotNull(structureId), toLanguageId);
+	}
+	else {
+		content = JournalArticleImpl.getContentByLocale(content, Validator.isNotNull(structureId), defaultLanguageId);
+	}
+}
+else {
+	content = ParamUtil.getString(request, "content");
+
+	UnicodeProperties typeSettingsProperties = layout.getTypeSettingsProperties();
+
+	long refererPlid = ParamUtil.getLong(request, "refererPlid", LayoutConstants.DEFAULT_PLID);
+
+	if (refererPlid > 0) {
+		Layout refererLayout = LayoutLocalServiceUtil.getLayout(refererPlid);
+
+		typeSettingsProperties = refererLayout.getTypeSettingsProperties();
+
+		String defaultAssetPublisherPortletId = typeSettingsProperties.getProperty(LayoutTypePortletConstants.DEFAULT_ASSET_PUBLISHER_PORTLET_ID);
+
+		if (Validator.isNotNull(defaultAssetPublisherPortletId)) {
+			preselectCurrentLayout = true;
+		}
+	}
+}
+
+Document contentDoc = null;
+
+String[] availableLocales = null;
+
+if (Validator.isNotNull(content)) {
+	try {
+		contentDoc = SAXReaderUtil.read(content);
+
+		Element contentEl = contentDoc.getRootElement();
+
+		availableLocales = StringUtil.split(contentEl.attributeValue("available-locales"));
+
+		if (!ArrayUtil.contains(availableLocales, defaultLanguageId)) {
+			availableLocales = ArrayUtil.append(availableLocales, defaultLanguageId);
+		}
+
+		if (ddmStructure == null) {
+			content = contentDoc.getRootElement().element("static-content").getText();
+		}
+	}
+	catch (Exception e) {
+		contentDoc = null;
+	}
+}
+%>
+
+<liferay-ui:error-marker key="errorSection" value="content" />
+
+<aui:model-context bean="<%= article %>" defaultLanguageId="<%= defaultLanguageId %>" model="<%= JournalArticle.class %>" />
+
+<portlet:renderURL var="editArticleRenderPopUpURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+	<portlet:param name="struts_action" value="/journal/edit_article" />
+	<portlet:param name="articleId" value="<%= articleId %>" />
+	<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+	<portlet:param name="structureId" value="<%= structureId %>" />
+</portlet:renderURL>
+
+<portlet:renderURL var="updateDefaultLanguageURL" windowState="<%= WindowState.MAXIMIZED.toString() %>">
+	<portlet:param name="struts_action" value="/journal/edit_article" />
+	<portlet:param name="redirect" value="<%= redirect %>" />
+	<portlet:param name="portletResource" value="<%= portletResource %>" />
+	<portlet:param name="articleId" value="<%= articleId %>" />
+	<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+	<portlet:param name="classNameId" value="<%= String.valueOf(classNameId) %>" />
+	<portlet:param name="classPK" value="<%= classPK %>" />
+	<portlet:param name="structureId" value="<%= structureId %>" />
+	<portlet:param name="templateId" value="<%= templateId %>" />
+</portlet:renderURL>
+
+<div class="journal-article-body" id="<portlet:namespace />journalArticleBody">
+	<div class="journal-article-body-content">
+		<liferay-ui:error exception="<%= ArticleContentException.class %>" message="please-enter-valid-content" />
+		<liferay-ui:error exception="<%= ArticleIdException.class %>" message="please-enter-a-valid-id" />
+		<liferay-ui:error exception="<%= ArticleTitleException.class %>" message="please-enter-a-valid-name" />
+		<liferay-ui:error exception="<%= ArticleVersionException.class %>" message="another-user-has-made-changes-since-you-started-editing-please-copy-your-changes-and-try-again" />
+		<liferay-ui:error exception="<%= DuplicateArticleIdException.class %>" message="please-enter-a-unique-id" />
+
+		<liferay-ui:error exception="<%= LocaleException.class %>">
+
+			<%
+			LocaleException le = (LocaleException)errorException;
+			%>
+
+			<c:if test="<%= le.getType() == LocaleException.TYPE_CONTENT %>">
+				<liferay-ui:message arguments="<%= new String[] {StringUtil.merge(le.getSourceAvailableLocales(), StringPool.COMMA_AND_SPACE), StringUtil.merge(le.getTargetAvailableLocales(), StringPool.COMMA_AND_SPACE)} %>" key="the-default-language-x-does-not-match-the-portal's-available-languages-x" />
+			</c:if>
+		</liferay-ui:error>
+
+		<div class="journal-article-header-edit" id="<portlet:namespace />articleHeaderEdit">
+			<div class="journal-article-header-id">
+				<c:if test="<%= (article == null) || article.isNew() %>">
+					<c:choose>
+						<c:when test="<%= PropsValues.JOURNAL_ARTICLE_FORCE_AUTOGENERATE_ID || (classNameId != JournalArticleConstants.CLASSNAME_ID_DEFAULT) %>">
+							<aui:input name="newArticleId" type="hidden" />
+							<aui:input name="autoArticleId" type="hidden" value="<%= true %>" />
+						</c:when>
+						<c:otherwise>
+							<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" cssClass="lfr-input-text-container" field="articleId" fieldParam="newArticleId" label="id" name="newArticleId" value="<%= newArticleId %>" />
+
+							<aui:input label="autogenerate-id" name="autoArticleId" type="checkbox" />
+						</c:otherwise>
+					</c:choose>
+				</c:if>
+			</div>
+
+			<c:if test="<%= Validator.isNull(toLanguageId) %>">
+				<div class="article-structure-template-toolbar journal-metadata">
+					<span class="alert alert-block structure-message hide" id="<portlet:namespace />structureMessage">
+						<liferay-ui:message key="this-structure-has-not-been-saved" />
+
+						<liferay-ui:message arguments='<%= new Object[] {"journal-save-structure-trigger", "#"} %>' key="click-here-to-save-it-now" />
+					</span>
+
+					<aui:row>
+						<aui:col cssClass="article-structure" width="<%= 50 %>">
+							<span class="article-structure-label"><liferay-ui:message key="structure" />:</span>
+
+							<aui:fieldset cssClass="article-structure-toolbar">
+								<div class="journal-form-presentation-label">
+									<aui:input name="groupId" type="hidden" value="<%= groupId %>" />
+									<aui:input name="structureId" type="hidden" value="<%= structureId %>" />
+									<aui:input name="structureName" type="hidden" value="<%= ddmStructureName %>" />
+									<aui:input name="structureDescription" type="hidden" value="<%= ddmStructureDescription %>" />
+
+									<span class="structure-name-label" id="<portlet:namespace />structureNameLabel">
+										<%= HtmlUtil.escape(ddmStructureName) %>
+									</span>
+
+									<c:if test="<%= (ddmStructure != null) && DDMStructurePermission.contains(permissionChecker, ddmStructure, PortletKeys.JOURNAL, ActionKeys.UPDATE) %>">
+										<liferay-ui:icon id="editDDMStructure" image="edit" url="javascript:;" />
+									</c:if>
+
+									<c:if test="<%= classNameId == JournalArticleConstants.CLASSNAME_ID_DEFAULT %>">
+										<liferay-ui:icon
+											iconCssClass="icon-search"
+											label="<%= true %>"
+											linkCssClass="btn"
+											message="select"
+											url='<%= "javascript:" + renderResponse.getNamespace() + "openDDMStructureSelector();" %>'
+										/>
+
+										<c:if test="<%= Validator.isNotNull(structureId) %>">
+											<span class="default-link">(<a href="javascript:;" id="<portlet:namespace />loadDefaultStructure"><liferay-ui:message key="use-default" /></a>)</span>
+										</c:if>
+									</c:if>
+								</div>
+							</aui:fieldset>
+						</aui:col>
+
+						<aui:col cssClass="article-template" width="<%= 50 %>">
+							<span class="article-template-label"><liferay-ui:message key="template" />:</span>
+
+							<aui:fieldset cssClass="article-template-toolbar">
+								<div class="journal-form-presentation-label">
+									<aui:input name="templateId" type="hidden" value="<%= templateId %>" />
+
+									<span class="template-name-label" id="<portlet:namespace />templateNameLabel">
+										<%= (ddmTemplate != null) ? HtmlUtil.escape(ddmTemplate.getName(locale)) : LanguageUtil.get(pageContext, "none") %>
+									</span>
+
+									<c:if test="<%= ddmTemplate != null %>">
+										<c:if test="<%= ddmTemplate.isSmallImage() %>">
+											<img class="article-template-image" id="<portlet:namespace />templateImage" src="<%= _getTemplateImage(themeDisplay, ddmTemplate) %>" />
+										</c:if>
+
+										<c:if test="<%= DDMTemplatePermission.contains(permissionChecker, ddmTemplate, PortletKeys.JOURNAL, ActionKeys.UPDATE) %>">
+											<liferay-ui:icon id="editDDMTemplate" image="edit" url="javascript:;" />
+										</c:if>
+									</c:if>
+
+									<c:if test="<%= ddmStructure != null %>">
+										<liferay-ui:icon
+											iconCssClass="icon-search"
+											label="<%= true %>"
+											linkCssClass="btn"
+											message="select"
+											url='<%= "javascript:" + renderResponse.getNamespace() + "openDDMTemplateSelector();" %>'
+										/>
+									</c:if>
+								</div>
+							</aui:fieldset>
+						</aui:col>
+					</aui:row>
+				</div>
+			</c:if>
+
+			<div class="article-translation-toolbar journal-metadata">
+				<div class="alert alert-info hide" id="<portlet:namespace />translationsMessage">
+					<liferay-ui:message key="the-changes-in-your-translations-will-be-available-once-the-content-is-published" />
+				</div>
+
+				<div>
+					<c:choose>
+						<c:when test="<%= Validator.isNull(toLanguageId) %>">
+							<span for="<portlet:namespace />defaultLanguageId"><liferay-ui:message key="web-content-default-language" /></span>:
+
+							<span class="lfr-translation-manager-selector nobr">
+								<span class="article-default-language lfr-token lfr-token-primary" id="<portlet:namespace />textLanguageId">
+									<img alt="" src='<%= HtmlUtil.escapeAttribute(themeDisplay.getPathThemeImages() + "/language/" + defaultLanguageId + ".png") %>' />
+
+									<%= LocaleUtil.fromLanguageId(defaultLanguageId).getDisplayName(locale) %>
+								</span>
+
+								<a href="javascript:;" id="<portlet:namespace />changeLanguageId"><liferay-ui:message key="change" /></a>
+
+								<aui:select cssClass="hide" id="defaultLocale" inlineField="<%= true %>" label="" name="defaultLanguageId">
+
+									<%
+									Locale[] locales = LanguageUtil.getAvailableLocales(themeDisplay.getSiteGroupId());
+
+									for (int i = 0; i < locales.length; i++) {
+									%>
+
+										<aui:option label="<%= locales[i].getDisplayName(locale) %>" selected="<%= defaultLanguageId.equals(LocaleUtil.toLanguageId(locales[i])) %>" value="<%= LocaleUtil.toLanguageId(locales[i]) %>" />
+
+									<%
+									}
+									%>
+
+								</aui:select>
+
+								<liferay-ui:icon-help message="default-language-help" />
+							</span>
+
+							<c:if test="<%= (article != null) && !article.isNew() %>">
+								<span class="lfr-translation-manager-add-menu">
+									<liferay-ui:icon-menu
+										cssClass="add-translations-menu"
+										direction="down"
+										icon='<%= themeDisplay.getPathThemeImages() + "/common/add.png" %>'
+										message='<%= LanguageUtil.get(pageContext, "add-translation") %>'
+										showArrow="<%= true %>"
+										showWhenSingleIcon="<%= true %>"
+									>
+
+										<%
+										Locale[] locales = LanguageUtil.getAvailableLocales(themeDisplay.getSiteGroupId());
+
+										for (int i = 0; i < locales.length; i++) {
+											if (ArrayUtil.contains(article.getAvailableLanguageIds(), LocaleUtil.toLanguageId(locales[i]))) {
+												continue;
+											}
+
+											String taglibEditArticleURL = HttpUtil.addParameter(editArticleRenderPopUpURL.toString(), renderResponse.getNamespace() + "toLanguageId", LocaleUtil.toLanguageId(locales[i]));
+											String taglibEditURL = "javascript:Liferay.Util.openWindow({cache: false, id: '" + renderResponse.getNamespace() + LocaleUtil.toLanguageId(locales[i]) + "', title: '" + UnicodeLanguageUtil.get(pageContext, "web-content-translation") + "', uri: '" + taglibEditArticleURL + "'});";
+										%>
+
+											<liferay-ui:icon
+												image='<%= "../language/" + LocaleUtil.toLanguageId(locales[i]) %>'
+												message="<%= locales[i].getDisplayName(locale) %>"
+												url="<%= taglibEditURL %>"
+											/>
+
+										<%
+										}
+										%>
+
+									</liferay-ui:icon-menu>
+								</span>
+							</c:if>
+						</c:when>
+						<c:otherwise>
+							<aui:input id="defaultLocale" name="defaultLanguageId" type="hidden" value="<%= defaultLanguageId %>" />
+						</c:otherwise>
+					</c:choose>
+				</div>
+
+				<c:if test="<%= article != null %>">
+
+					<%
+					String[] translations = article.getAvailableLanguageIds();
+					%>
+
+					<div class='<%= (Validator.isNull(toLanguageId) && (translations.length > 1)) ? "contains-translations" :"" %>' id="<portlet:namespace />availableTranslationContainer">
+						<c:choose>
+							<c:when test="<%= Validator.isNotNull(toLanguageId) %>">
+								<liferay-util:buffer var="languageLabel">
+									<%= LocaleUtil.fromLanguageId(toLanguageId).getDisplayName(locale) %>
+
+									<img alt="" src='<%= HtmlUtil.escapeAttribute(themeDisplay.getPathThemeImages() + "/language/" + toLanguageId + ".png") %>' />
+								</liferay-util:buffer>
+
+								<%= LanguageUtil.format(pageContext, "translating-web-content-to-x", languageLabel) %>
+
+								<aui:input name="toLanguageId" type="hidden" value="<%= toLanguageId %>" />
+							</c:when>
+							<c:otherwise>
+								<span class='available-translations<%= (translations.length > 1) ? "" : " hide" %>' id="<portlet:namespace />availableTranslationsLinks">
+									<label><liferay-ui:message key="available-translations" /></label>
+
+										<%
+										for (int i = 0; i < translations.length; i++) {
+											if (translations[i].equals(defaultLanguageId)) {
+												continue;
+											}
+
+											String editTranslationURL = HttpUtil.addParameter(editArticleRenderPopUpURL.toString(), renderResponse.getNamespace() + "toLanguageId", translations[i]);
+										%>
+
+										<a class="lfr-token journal-article-translation-<%= translations[i] %>" href="javascript:;" onClick="Liferay.Util.openWindow({cache: false, id: '<portlet:namespace /><%= translations[i] %>', title: '<%= UnicodeLanguageUtil.get(pageContext, "web-content-translation") %>', uri: '<%= editTranslationURL %>'});">
+											<img alt="" src='<%= themeDisplay.getPathThemeImages() + "/language/" + translations[i] + ".png" %>' />
+
+											<%= LocaleUtil.fromLanguageId(translations[i]).getDisplayName(locale) %>
+										</a>
+
+									<%
+									}
+									%>
+
+								</span>
+							</c:otherwise>
+						</c:choose>
+					</div>
+				</c:if>
+			</div>
+		</div>
+
+		<div class="journal-article-general-fields">
+			<aui:input autoFocus="<%= (((article != null) && !article.isNew()) && !PropsValues.JOURNAL_ARTICLE_FORCE_AUTOGENERATE_ID && windowState.equals(WindowState.MAXIMIZED)) %>" defaultLanguageId="<%= Validator.isNotNull(toLanguageId) ? toLanguageId : defaultLanguageId %>" languageId="<%= Validator.isNotNull(toLanguageId) ? toLanguageId : defaultLanguageId %>" name="title">
+				<c:if test="<%= classNameId == JournalArticleConstants.CLASSNAME_ID_DEFAULT %>">
+					<aui:validator name="required" />
+				</c:if>
+			</aui:input>
+		</div>
+
+		<div class="journal-article-container" id="<portlet:namespace />journalArticleContainer">
+			<c:choose>
+				<c:when test="<%= ddmStructure == null %>">
+					<div id="<portlet:namespace />structureTreeWrapper">
+						<ul class="structure-tree" id="<portlet:namespace />structureTree">
+							<li class="structure-field" dataName="<liferay-ui:message key="content" />" dataType="text_area">
+								<span class="journal-article-close"></span>
+
+								<span class="folder">
+									<div class="field-container">
+										<div class="journal-article-move-handler"></div>
+
+										<label class="journal-article-field-label" for="">
+											<span><liferay-ui:message key="content" /></span>
+										</label>
+
+										<div class="journal-article-component-container">
+											<liferay-ui:input-editor contentsLanguageId="<%= Validator.isNotNull(toLanguageId) ? toLanguageId : defaultLanguageId %>" editorImpl="<%= EDITOR_WYSIWYG_IMPL_KEY %>" name="articleContent" toolbarSet="liferay-article" width="100%" />
+										</div>
+
+										<aui:input cssClass="journal-article-localized-checkbox" label="localizable" name="localized" type="hidden" value="<%= true %>" />
+
+										<div class="alert alert-error journal-article-required-message">
+											<liferay-ui:message key="this-field-is-required" />
+										</div>
+
+										<div class="journal-article-buttons">
+											<aui:input cssClass="journal-article-variable-name" id="TextAreaFieldvariableName" inlineField="<%= true %>" label="variable-name" name="variableName" size="25" type="text" value="content" />
+
+											<aui:button cssClass="edit-button" value="edit-options" />
+
+											<aui:button cssClass="repeatable-button hide" value="repeat" />
+										</div>
+									</div>
+
+									<ul class="folder-droppable"></ul>
+								</span>
+							</li>
+						</ul>
+					</div>
+				</c:when>
+				<c:otherwise>
+
+					<%
+					Fields ddmFields = null;
+
+					if ((article != null) && Validator.isNotNull(article.getStructureId()) && Validator.isNotNull(content)) {
+						ddmFields = JournalConverterUtil.getDDMFields(ddmStructure, content);
+					}
+
+					String requestedLanguageId = defaultLanguageId;
+
+					if (Validator.isNotNull(toLanguageId)) {
+						requestedLanguageId = toLanguageId;
+					}
+					%>
+
+					<liferay-ddm:html
+						classNameId="<%= PortalUtil.getClassNameId(DDMStructure.class) %>"
+						classPK="<%= ddmStructure.getStructureId() %>"
+						fields="<%= ddmFields %>"
+						repeatable="<%= Validator.isNull(toLanguageId) %>"
+						requestedLocale="<%= LocaleUtil.fromLanguageId(requestedLanguageId) %>"
+					/>
+
+				</c:otherwise>
+			</c:choose>
+
+			<c:if test="<%= Validator.isNull(toLanguageId) %>">
+				<aui:input label="searchable" name="indexable" />
+			</c:if>
+		</div>
+	</div>
+
+	<c:if test="<%= Validator.isNotNull(toLanguageId) %>">
+		<aui:input name="structureId" type="hidden" value="<%= structureId %>" />
+	</c:if>
+</div>
+
+<aui:script>
+	function <portlet:namespace />initEditor() {
+		return "<%= UnicodeFormatter.toString(content) %>";
+	}
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />postProcessTranslation',
+		function(formDate, cmd, newVersion, newLanguageId, newLanguage, newStatusMessage) {
+			var A = AUI();
+
+			document.<portlet:namespace />fm1.<portlet:namespace />formDate.value = formDate;
+			document.<portlet:namespace />fm1.<portlet:namespace />version.value = newVersion;
+
+			var taglibWorkflowStatus = A.one('#<portlet:namespace />journalArticleWrapper .taglib-workflow-status');
+
+			var statusNode = taglibWorkflowStatus.one('.workflow-status strong');
+
+			statusNode.html(newStatusMessage);
+
+			var versionNode = taglibWorkflowStatus.one('.workflow-version strong');
+
+			versionNode.html(newVersion);
+
+			var availableTranslationContainer = A.one('#<portlet:namespace />availableTranslationContainer');
+
+			var translationLink = availableTranslationContainer.one('.journal-article-translation-' + newLanguageId);
+
+			if (cmd == '<%= Constants.DELETE_TRANSLATION %>') {
+				var availableLocales = A.one('#<portlet:namespace />availableLocales' + newLanguageId);
+
+				if (availableLocales) {
+					availableLocales.remove();
+				}
+
+				if (translationLink) {
+					translationLink.remove();
+				}
+			}
+			else if (!translationLink) {
+				var availableTranslationsLinks = A.one('#<portlet:namespace />availableTranslationsLinks');
+				var translationsMessage = A.one('#<portlet:namespace />translationsMessage');
+
+				statusNode.replaceClass('workflow-status-approved', 'workflow-status-draft');
+
+				statusNode.html('<%= UnicodeLanguageUtil.get(pageContext, "draft") %>');
+
+				availableTranslationContainer.addClass('contains-translations');
+
+				availableTranslationsLinks.show();
+				translationsMessage.show();
+
+				var TPL_TRANSLATION = '<a class="lfr-token journal-article-translation-{newLanguageId}" href="javascript:;"><img alt="" src="<%= themeDisplay.getPathThemeImages() %>/language/{newLanguageId}.png" />{newLanguage}</a>';
+
+				var translationLinkTpl = A.Lang.sub(
+					TPL_TRANSLATION,
+					{
+						newLanguageId: newLanguageId,
+						newLanguage: newLanguage
+					}
+				);
+
+				translationLink = A.Node.create(translationLinkTpl);
+
+				var editTranslationURL = '<%= editArticleRenderPopUpURL %>&<portlet:namespace />toLanguageId=' + newLanguageId;
+
+				translationLink.on(
+					'click',
+					function(event) {
+						Liferay.Util.openWindow(
+							{
+								id: '<portlet:namespace />' + newLanguageId,
+								title: '<%= UnicodeLanguageUtil.get(pageContext, "web-content-translation") %>',
+								uri: editTranslationURL
+							}
+						);
+					}
+				);
+
+				availableTranslationsLinks.append(translationLink);
+
+				var languageInput = A.Node.create('<input name="<portlet:namespace />available_locales" type="hidden" value="' + newLanguageId + '" />');
+
+				A.one('#<portlet:namespace />fm1').append(languageInput);
+			}
+		},
+		['aui-base']
+	);
+
+	Liferay.Util.disableToggleBoxes('<portlet:namespace />autoArticleIdCheckbox','<portlet:namespace />newArticleId', true);
+</aui:script>
+
+<aui:script>
+	function <portlet:namespace />openDDMStructureSelector() {
+		Liferay.Util.openDDMPortlet(
+			{
+				basePortletURL: '<%= PortletURLFactoryUtil.create(request, PortletKeys.DYNAMIC_DATA_MAPPING, themeDisplay.getPlid(), PortletRequest.RENDER_PHASE) %>',
+				classPK: <%= (ddmStructure != null) ? ddmStructure.getPrimaryKey() : 0 %>,
+				dialog: {
+					destroyOnHide: true
+				},
+				eventName: '<portlet:namespace />selectStructure',
+				groupId: <%= groupId %>,
+				refererPortletName: '<%= PortletKeys.JOURNAL_CONTENT %>',
+				showGlobalScope: true,
+				struts_action: '/dynamic_data_mapping/select_structure',
+				title: '<%= UnicodeLanguageUtil.get(pageContext, "structures") %>'
+			},
+			function(event) {
+				if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "selecting-a-new-structure-will-change-the-available-input-fields-and-available-templates") %>') && (document.<portlet:namespace />fm1.<portlet:namespace />ddmStructureId.value != event.ddmstructureid)) {
+					document.<portlet:namespace />fm1.<portlet:namespace />ddmStructureId.value = event.ddmstructureid;
+					document.<portlet:namespace />fm1.<portlet:namespace />structureId.value = event.ddmstructurekey;
+					document.<portlet:namespace />fm1.<portlet:namespace />templateId.value = "";
+
+					submitForm(document.<portlet:namespace />fm1, null, false, false);
+				}
+			}
+		);
+	}
+
+	function <portlet:namespace />openDDMTemplateSelector() {
+		Liferay.Util.openDDMPortlet(
+			{
+				basePortletURL: '<%= PortletURLFactoryUtil.create(request, PortletKeys.DYNAMIC_DATA_MAPPING, themeDisplay.getPlid(), PortletRequest.RENDER_PHASE) %>',
+				classNameId: '<%= PortalUtil.getClassNameId(DDMStructure.class) %>',
+				classPK: <%= (ddmStructure != null) ? ddmStructure.getPrimaryKey() : 0 %>,
+				dialog: {
+					destroyOnHide: true
+				},
+				eventName: '<portlet:namespace />selectTemplate',
+				groupId: <%= groupId %>,
+				refererPortletName: '<%= PortletKeys.JOURNAL_CONTENT %>',
+				struts_action: '/dynamic_data_mapping/select_template',
+				templateId: <%= (ddmTemplate != null) ? ddmTemplate.getTemplateId() : 0 %>,
+				title: '<%= UnicodeLanguageUtil.get(pageContext, "templates") %>'
+			},
+			function(event) {
+				if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "selecting-a-new-template-will-delete-all-unsaved-content") %>')) {
+					document.<portlet:namespace />fm1.<portlet:namespace />ddmTemplateId.value = event.ddmtemplateid;
+
+					submitForm(document.<portlet:namespace />fm1, null, false, false);
+				}
+			}
+		);
+	}
+</aui:script>
+
+<aui:script use="aui-base,aui-dialog-iframe-deprecated,liferay-portlet-journal">
+	var changeLink = A.one('#<portlet:namespace />changeLanguageId');
+	var languageSelector = A.one('#<portlet:namespace />defaultLocale');
+	var textLanguageId = A.one('#<portlet:namespace />textLanguageId');
+
+	if (changeLink) {
+		changeLink.on(
+			'click',
+			function(event) {
+				if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "changing-the-default-language-will-delete-all-unsaved-content") %>')) {
+					languageSelector.show();
+					languageSelector.focus();
+
+					changeLink.hide();
+					textLanguageId.hide();
+				}
+			}
+		);
+	}
+
+	Liferay.Portlet.Journal.PROXY = {};
+	Liferay.Portlet.Journal.PROXY.instanceIdKey = '<%= instanceIdKey %>';
+	Liferay.Portlet.Journal.PROXY.pathThemeCss = '<%= HttpUtil.encodeURL(themeDisplay.getPathThemeCss()) %>';
+	Liferay.Portlet.Journal.PROXY.portletNamespace = '<portlet:namespace />';
+
+	window.<portlet:namespace />journalPortlet = new Liferay.Portlet.Journal(Liferay.Portlet.Journal.PROXY.portletNamespace, '<%= (article != null) ? HtmlUtil.escape(articleId) : StringPool.BLANK %>');
+
+	var defaultLocaleSelector = A.one('#<portlet:namespace/>defaultLocale');
+
+	if (defaultLocaleSelector) {
+		defaultLocaleSelector.on(
+			'change',
+			function(event) {
+				var defaultLanguageId = defaultLocaleSelector.get('value');
+
+				var url = '<%= updateDefaultLanguageURL %>' + '&<portlet:namespace />defaultLanguageId=' + defaultLanguageId;
+
+				window.location.href = url;
+			}
+		);
+	}
+
+	var editDDMTemplate = A.one('#<portlet:namespace />editDDMTemplate');
+
+	if (editDDMTemplate) {
+		var windowId = A.guid();
+
+		editDDMTemplate.on(
+			'click',
+			function(event) {
+				if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "editing-the-current-template-will-delete-all-unsaved-content") %>')) {
+					Liferay.Util.openWindow(
+						{
+							id: windowId,
+							title: '<%= UnicodeLanguageUtil.get(pageContext, "templates") %>',
+
+							<%
+							DDMTemplate curDDMTemplate = DDMTemplateLocalServiceUtil.fetchTemplate(groupId, PortalUtil.getClassNameId(DDMStructure.class), templateId);
+							%>
+
+							<liferay-portlet:renderURL portletName="<%= PortletKeys.DYNAMIC_DATA_MAPPING %>" var="editTemplateURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+								<portlet:param name="struts_action" value="/dynamic_data_mapping/edit_template" />
+								<portlet:param name="closeRedirect" value="<%= currentURL %>" />
+								<portlet:param name="showBackURL" value="<%= Boolean.FALSE.toString() %>" />
+								<portlet:param name="refererPortletName" value="<%= PortletKeys.JOURNAL %>" />
+								<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+								<portlet:param name="classNameId" value="<%= String.valueOf(classNameId) %>" />
+								<portlet:param name="templateId" value="<%= (curDDMTemplate != null) ? String.valueOf(curDDMTemplate.getTemplateId()) : StringPool.BLANK %>" />
+							</liferay-portlet:renderURL>
+
+							uri: '<%= editTemplateURL %>'
+						}
+					);
+				}
+			}
+		);
+	}
+
+	<c:if test="<%= (ddmStructure != null) && DDMStructurePermission.contains(permissionChecker, ddmStructure, PortletKeys.JOURNAL, ActionKeys.UPDATE) %>">
+		var editDDMStructure = A.one('#<portlet:namespace />editDDMStructure');
+
+		if (editDDMStructure) {
+			var windowId = A.guid();
+
+			editDDMStructure.on(
+				'click',
+				function(event) {
+					if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "editing-the-current-structure-will-delete-all-unsaved-content") %>')) {
+						Liferay.Util.openWindow(
+							{
+								id: windowId,
+								title: '<%= UnicodeLanguageUtil.get(pageContext, "structures") %>',
+
+								<liferay-portlet:renderURL portletName="<%= PortletKeys.DYNAMIC_DATA_MAPPING %>" var="editStructureURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+									<portlet:param name="struts_action" value="/dynamic_data_mapping/edit_structure" />
+									<portlet:param name="closeRedirect" value="<%= currentURL %>" />
+									<portlet:param name="showBackURL" value="<%= Boolean.FALSE.toString() %>" />
+									<portlet:param name="refererPortletName" value="<%= PortletKeys.JOURNAL %>" />
+									<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+									<portlet:param name="classNameId" value="<%= String.valueOf(PortalUtil.getClassNameId(DDMStructure.class)) %>" />
+									<portlet:param name="classPK" value="<%= String.valueOf(ddmStructure.getStructureId()) %>" />
+								</liferay-portlet:renderURL>
+
+								uri: '<%= editStructureURL %>'
+							}
+						);
+					}
+				}
+			);
+		}
+	</c:if>
+</aui:script>
+
+<%!
+public static final String EDITOR_WYSIWYG_IMPL_KEY = "editor.wysiwyg.portal-web.docroot.html.portlet.journal.edit_article_content.jsp";
+
+private String _getTemplateImage(ThemeDisplay themeDisplay, DDMTemplate ddmTemplate) {
+	String imageURL = null;
+
+	if (ddmTemplate.isSmallImage()) {
+		if (Validator.isNotNull(ddmTemplate.getSmallImageURL())) {
+			imageURL = ddmTemplate.getSmallImageURL();
+		}
+		else {
+			imageURL = themeDisplay.getPathImage() + "/journal/template?img_id=" + ddmTemplate.getSmallImageId() + "&t=" + WebServerServletTokenUtil.getToken(ddmTemplate.getSmallImageId());
+		}
+	}
+
+	return imageURL;
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article/custom_fields.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article/custom_fields.jsp
new file mode 100644
index 0000000..9680f27
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article/custom_fields.jsp
@@ -0,0 +1,36 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+JournalArticle article = (JournalArticle)request.getAttribute(WebKeys.JOURNAL_ARTICLE);
+%>
+
+<liferay-ui:error-marker key="errorSection" value="custom-fields" />
+
+<aui:model-context bean="<%= article %>" model="<%= JournalArticle.class %>" />
+
+<h3><liferay-ui:message key="custom-fields" /></h3>
+
+<aui:fieldset>
+	<liferay-ui:custom-attribute-list
+		className="<%= JournalArticle.class.getName() %>"
+		classPK="<%= (article != null) ? article.getPrimaryKey() : 0 %>"
+		editable="<%= true %>"
+		label="<%= true %>"
+	/>
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article/display_page.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article/display_page.jsp
new file mode 100644
index 0000000..870dc33
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article/display_page.jsp
@@ -0,0 +1,621 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+JournalArticle article = (JournalArticle)request.getAttribute(WebKeys.JOURNAL_ARTICLE);
+
+String defaultLanguageId = (String)request.getAttribute("edit_article.jsp-defaultLanguageId");
+String toLanguageId = (String)request.getAttribute("edit_article.jsp-toLanguageId");
+
+String layoutUuid = BeanParamUtil.getString(article, request, "layoutUuid");
+
+Layout selLayout = null;
+
+String layoutBreadcrumb = StringPool.BLANK;
+
+if (Validator.isNotNull(layoutUuid)) {
+	try {
+		selLayout = LayoutLocalServiceUtil.getLayoutByUuidAndGroupId(layoutUuid, themeDisplay.getSiteGroupId(), false);
+
+		layoutBreadcrumb = _getLayoutBreadcrumb(selLayout, locale);
+	}
+	catch (NoSuchLayoutException nsle) {
+	}
+
+	if (selLayout == null) {
+		try {
+			selLayout = LayoutLocalServiceUtil.getLayoutByUuidAndGroupId(layoutUuid, themeDisplay.getSiteGroupId(), true);
+
+			layoutBreadcrumb = _getLayoutBreadcrumb(selLayout, locale);
+		}
+		catch (NoSuchLayoutException nsle) {
+		}
+	}
+}
+
+Group parentGroup = themeDisplay.getSiteGroup();
+%>
+
+<liferay-ui:error-marker key="errorSection" value="display-page" />
+
+<h3><liferay-ui:message key="display-page" /><liferay-ui:icon-help message="default-display-page-help" /></h3>
+
+<div id="<portlet:namespace />pagesContainer">
+	<aui:input id="pagesContainerInput" name="layoutUuid" type="hidden" value="<%= layoutUuid %>" />
+
+	<div class="display-page-item-container hide" id="<portlet:namespace />displayPageItemContainer">
+		<span class="display-page-item">
+			<span>
+				<span id="<portlet:namespace />displayPageNameInput"><%= layoutBreadcrumb %></span>
+
+				<span class="display-page-item-remove icon icon-remove" id="<portlet:namespace />displayPageItemRemove" tabindex="0"></span>
+			</span>
+		</span>
+	</div>
+</div>
+
+<div class="display-page-toolbar" id="<portlet:namespace />displayPageToolbar"></div>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />loadDisplayPage',
+		function(event) {
+			var A = AUI();
+
+			var Lang = A.Lang;
+
+			var Util = Liferay.Util;
+
+			var TPL_TAB_CONTENT = '<div id="<portlet:namespace />{tabId}">' +
+				'<div id="<portlet:namespace />{tabContentId}"></div>' +
+			'</div>';
+
+			var TPL_TAB_VIEW = '<div id="<portlet:namespace />{pagesTabViewId}"></div>' +
+				'<div class="alert alert-block selected-page-message" id="<portlet:namespace />selectedPageMessage">' +
+					'<%= UnicodeLanguageUtil.get(pageContext, "there-is-no-selected-page") %>' +
+				'</div>';
+
+			var dialog;
+
+			var displayPageItemContainer = A.one('#<portlet:namespace />displayPageItemContainer');
+			var displayPageNameInput = A.one('#<portlet:namespace />displayPageNameInput');
+			var pagesContainerInput = A.one('#<portlet:namespace />pagesContainerInput');
+
+			var pagesTabViewId = A.guid();
+			var privatePagesTabContentId = A.guid();
+			var privatePagesTabId = A.guid();
+			var publicPagesTabContentId = A.guid();
+			var publicPagesTabId = A.guid();
+
+			var okButton;
+			var privatePagesTabNode;
+			var publicPagesTabNode;
+			var selectedNodeMessage;
+			var tabView;
+			var treeViewPrivate;
+			var treeViewPublic;
+
+			var treePrivatePagesContainerId = '<portlet:namespace />treeContainerPrivatePagesOutput';
+			var treePublicPagesContainerId = '<portlet:namespace />treeContainerPublicPagesOutput';
+
+			<liferay-portlet:resourceURL copyCurrentRenderParameters="<%= false %>" var="treeUrlPublicPages">
+				<portlet:param name="struts_action" value="/journal/select_display_page" />
+				<portlet:param name="<%= Constants.CMD %>" value="<%= ActionKeys.VIEW_TREE %>" />
+				<portlet:param name="groupId" value="<%= String.valueOf(themeDisplay.getSiteGroupId()) %>" />
+
+				<c:if test="<%= selLayout != null && !selLayout.isPrivateLayout() %>">
+					<portlet:param name="selPlid" value="<%= String.valueOf(selLayout.getPlid()) %>" />
+				</c:if>
+
+				<portlet:param name="treeId" value="treeContainerPublicPages" />
+				<portlet:param name="checkContentDisplayPage" value="<%= Boolean.TRUE.toString() %>" />
+				<portlet:param name="draggableTree" value="<%= Boolean.FALSE.toString() %>" />
+				<portlet:param name="expandFirstNode" value="<%= Boolean.TRUE.toString() %>" />
+				<portlet:param name="saveState" value="<%= Boolean.FALSE.toString() %>" />
+			</liferay-portlet:resourceURL>
+
+			<liferay-portlet:resourceURL copyCurrentRenderParameters="<%= false %>" var="treeUrlPrivatePages">
+				<portlet:param name="struts_action" value="/journal/select_display_page" />
+				<portlet:param name="<%= Constants.CMD %>" value="<%= ActionKeys.VIEW_TREE %>" />
+				<portlet:param name="tabs1" value="private-pages" />
+				<portlet:param name="groupId" value="<%= String.valueOf(themeDisplay.getSiteGroupId()) %>" />
+
+				<c:if test="<%= selLayout != null && selLayout.isPrivateLayout() %>">
+					<portlet:param name="selPlid" value="<%= String.valueOf(selLayout.getPlid()) %>" />
+				</c:if>
+
+				<portlet:param name="treeId" value="treeContainerPrivatePages" />
+				<portlet:param name="checkContentDisplayPage" value="<%= Boolean.TRUE.toString() %>" />
+				<portlet:param name="expandFirstNode" value="<%= Boolean.TRUE.toString() %>" />
+				<portlet:param name="saveState" value="<%= Boolean.FALSE.toString() %>" />
+			</liferay-portlet:resourceURL>
+
+			var bindTreeUI = function(treeInstance) {
+				treeInstance.after(
+					'lastSelectedChange',
+					function(event) {
+						setSelectedPage(event.newVal);
+					}
+				);
+			};
+
+			var displayPageMessage = function(html, type) {
+				selectedNodeMessage.html(html);
+
+				var cssClass = 'selected-page-message';
+
+				if (type) {
+					cssClass += ' alert alert-' + type;
+				}
+
+				selectedNodeMessage.attr('className', cssClass);
+			};
+
+			var getChosenPagePath = function(node) {
+				var buffer = [];
+
+				if (A.instanceOf(node, A.TreeNode)) {
+					var labelText = Util.escapeHTML(node.get('labelEl').text());
+
+					buffer.push(labelText);
+
+					node.eachParent(
+						function(treeNode) {
+							var labelEl = treeNode.get('labelEl');
+
+							if (labelEl) {
+								labelText = Util.escapeHTML(labelEl.text());
+
+								buffer.unshift(labelText);
+							}
+						}
+					);
+				}
+
+				return buffer.join(' > ');
+			}
+
+			var getDialog = function() {
+				if (!dialog) {
+					var bodyContent = Lang.sub(
+						TPL_TAB_VIEW,
+						{
+							pagesTabViewId: pagesTabViewId
+						}
+					);
+
+					dialog = Liferay.Util.Window.getWindow(
+						{
+							dialog: {
+								align: {
+									node: A.one('#portlet_<%= portletDisplay.getId() %>'),
+									points: ['tc', 'tc']
+								},
+								bodyContent: bodyContent,
+								cssClass: 'display-page-dialog',
+								toolbars: {
+									footer: [
+										{
+											disabled: true,
+											on: {
+												click: setDisplayPage
+											},
+											label: '<%= UnicodeLanguageUtil.get(pageContext, "ok") %>'
+										},
+										{
+											on: {
+												click: function() {
+													dialog.hide();
+												}
+											},
+											label: '<%= UnicodeLanguageUtil.get(pageContext, "cancel") %>'
+										}
+									]
+								}
+							},
+							title: '<%= UnicodeLanguageUtil.get(pageContext, "choose-a-display-page") %>'
+						}
+					);
+
+					selectedNodeMessage = A.one('#<portlet:namespace />selectedPageMessage');
+
+					var dialogButtons = dialog.buttons;
+
+					okButton = dialog.getToolbar('footer').item(0);
+
+					var tabs = [];
+
+					<c:if test="<%= parentGroup.getPublicLayoutsPageCount() > 0 %>">
+						tabs.push(
+							{
+								label: '<%= UnicodeLanguageUtil.get(pageContext, "public-pages") %>',
+								content: Lang.sub(
+									TPL_TAB_CONTENT,
+									{
+										tabContentId: publicPagesTabContentId,
+										tabId: publicPagesTabId
+									}
+								)
+							}
+						);
+					</c:if>
+
+					<c:if test="<%= parentGroup.getPrivateLayoutsPageCount() > 0 %>">
+						tabs.push(
+							{
+								label: '<%= UnicodeLanguageUtil.get(pageContext, "private-pages") %>',
+								content: Lang.sub(
+									TPL_TAB_CONTENT,
+									{
+										tabContentId: privatePagesTabContentId,
+										tabId: privatePagesTabId
+									}
+								)
+							}
+						);
+					</c:if>
+
+					tabView = new A.TabView(
+						{
+							children: tabs,
+							contentBox: '#<portlet:namespace />' + pagesTabViewId
+						}
+					);
+
+					tabView.render();
+
+					tabView.after(
+						'activeTabChange',
+						function() {
+							displayPageMessage('');
+
+							loadPages();
+						}
+					);
+
+					<c:if test="<%= parentGroup.getPublicLayoutsPageCount() > 0 %>">
+						publicPagesTabNode = A.one('#<portlet:namespace />' + publicPagesTabContentId);
+
+						publicPagesTabNode.plug(A.Plugin.ParseContent);
+					</c:if>
+
+					<c:if test="<%= parentGroup.getPrivateLayoutsPageCount() > 0 %>">
+						privatePagesTabNode = A.one('#<portlet:namespace />' + privatePagesTabContentId);
+
+						privatePagesTabNode.plug(A.Plugin.ParseContent);
+					</c:if>
+
+					dialog.on('visibleChange', onDialogVisibleChange);
+				}
+
+				return dialog;
+			};
+
+			var isPublicPagesTabSelected = function() {
+				var result = <%= parentGroup.getPublicLayoutsPageCount() > 0 %>;
+
+				if (tabView.size() >= 2) {
+					var index = tabView.getTabIndex(tabView.get('activeTab'));
+
+					result = (index == 0);
+				}
+
+				return result;
+			};
+
+			var loadPages = function() {
+				var url;
+
+				var publicPages = isPublicPagesTabSelected();
+
+				if (publicPages && !treeViewPublic) {
+					url = '<%= treeUrlPublicPages %>';
+				}
+				else if (!treeViewPrivate) {
+					url = '<%= treeUrlPrivatePages %>';
+				}
+
+				if (url) {
+					A.io.request(
+						url,
+						{
+							on: {
+								success: function(event, id, obj) {
+									var response = this.get('responseData');
+
+									onPagesLoad(response, publicPages);
+								}
+							}
+						}
+					);
+				}
+				else {
+					var treeInstance = treeViewPrivate;
+
+					if (publicPages) {
+						treeInstance = treeViewPublic;
+					}
+
+					setSelectedPage(treeInstance.get('lastSelected'));
+				}
+			}
+
+			var onDialogVisibleChange = function(event) {
+				if (!event.newVal) {
+					var treeContainer;
+
+					if (treeViewPublic) {
+						treeViewPublic.destroy();
+
+						treeViewPublic = null;
+					}
+
+					if (treeViewPrivate) {
+						treeViewPrivate.destroy();
+
+						treeViewPrivate = null;
+					}
+
+					if (treeContainer) {
+						treeContainer.purge(true);
+					}
+
+					displayPageMessage('<%= UnicodeLanguageUtil.get(pageContext, "there-is-no-selected-page") %>', 'alert');
+				}
+				else {
+					loadPages();
+				}
+			};
+
+			var onPagesLoad = function(response, publicPages) {
+				var treeContainerId;
+				var treeWrapper;
+
+				if (publicPages) {
+					treeContainerId = treePublicPagesContainerId;
+					treeWrapper = publicPagesTabNode;
+				}
+				else {
+					treeContainerId = treePrivatePagesContainerId;
+					treeWrapper = privatePagesTabNode;
+				}
+
+				if (treeWrapper) {
+					treeWrapper.setContent(response);
+
+					var treeContainer = A.one('#' + treeContainerId);
+
+					var processTreeTask = A.debounce(
+						function() {
+							treeViewInstance = treeContainer.getData('treeInstance');
+
+							if (treeViewInstance) {
+								if (publicPages) {
+									treeViewPublic = treeViewInstance;
+								}
+								else {
+									treeViewPrivate = treeViewInstance;
+								}
+
+								bindTreeUI(treeViewInstance);
+
+								treeContainer.swallowEvent('click', true);
+
+								setSelectedPage(treeViewInstance.get('lastSelected'));
+							}
+							else {
+								processTreeTask();
+							}
+						},
+						100
+					);
+
+					processTreeTask();
+				}
+			};
+
+			var onSelectDisplayPage = function(event) {
+				<c:if test="<%= (parentGroup.getPrivateLayoutsPageCount() > 0) || (parentGroup.getPublicLayoutsPageCount() > 0) %>">
+					event.domEvent.preventDefault();
+
+					getDialog().show();
+				</c:if>
+			};
+
+			var setDisplayPage = function() {
+				var publicPages = isPublicPagesTabSelected();
+
+				var tree;
+
+				if (publicPages && treeViewPublic) {
+					tree = treeViewPublic;
+				}
+				else if (treeViewPrivate) {
+					tree = treeViewPrivate;
+				}
+
+				if (tree) {
+					var lastSelected = tree.get('lastSelected');
+
+					if (lastSelected) {
+						var labelEl = lastSelected.get('labelEl');
+
+						var link = labelEl.one('a');
+
+						if (link && !link.hasClass('layout-page-invalid')) {
+							var label = getChosenPagePath(lastSelected);
+
+							var uuid = link.attr('data-uuid');
+
+							pagesContainerInput.val(uuid);
+
+							displayPageNameInput.html(label);
+
+							displayPageItemContainer.show();
+
+							if (A.UA.webkit) {
+								var parentNode = removeDisplayPageItem.get('parentNode');
+
+								removeDisplayPageItem.remove();
+
+								parentNode.appendChild(removeDisplayPageItem);
+							}
+
+							getDialog().hide();
+						}
+					}
+				}
+			};
+
+			var setSelectedPage = function(lastSelectedNode) {
+				var disabled = true;
+
+				var messageText = '<%= UnicodeLanguageUtil.get(pageContext, "there-is-no-selected-page") %>';
+				var messageType = 'alert';
+
+				if (lastSelectedNode) {
+					var labelEl = lastSelectedNode.get('labelEl');
+
+					var link = labelEl.one('a');
+
+					var text = getChosenPagePath(lastSelectedNode);
+
+					if (link && !link.hasClass('layout-page-invalid')) {
+						disabled = false;
+
+						messageText = text;
+						messageType = 'info';
+					}
+					else if (text) {
+						messageText = Lang.sub('<%= UnicodeLanguageUtil.get(pageContext, "x-is-not-a-content-display-page") %>', ['"' + text + '"']);
+					}
+				}
+
+				displayPageMessage(messageText, messageType);
+
+				okButton.set('disabled', disabled);
+			};
+
+			var toolbar = new A.Toolbar(
+				{
+					children: [
+						{
+							<c:if test="<%= (parentGroup.getPrivateLayoutsPageCount() <= 0) && (parentGroup.getPublicLayoutsPageCount() <= 0) %>">
+								disabled: true,
+							</c:if>
+
+							icon: 'icon-search',
+							label: '<%= UnicodeLanguageUtil.get(pageContext, "select") %>',
+							on: {
+								click: onSelectDisplayPage
+							}
+						}
+					]
+				}
+			).render('#<portlet:namespace />displayPageToolbar');
+
+			if (displayPageNameInput.text()) {
+				displayPageItemContainer.show();
+			}
+
+			var removeDisplayPageItem = A.one('#<portlet:namespace />displayPageItemRemove');
+
+			removeDisplayPageItem.on(
+				'click',
+				function(event) {
+					pagesContainerInput.val('');
+
+					displayPageItemContainer.hide();
+				}
+			);
+		},
+		['aui-io-plugin-deprecated', 'aui-io-request', 'aui-tabview', 'aui-tree', 'liferay-util-window']
+	);
+
+	<c:choose>
+		<c:when test="<%= Validator.isNull(toLanguageId) %>">
+			Liferay.once('formNavigator:reveal<portlet:namespace />displayPage', <portlet:namespace />loadDisplayPage);
+		</c:when>
+		<c:otherwise>
+			<portlet:namespace />loadDisplayPage();
+		</c:otherwise>
+	</c:choose>
+</aui:script>
+
+<c:if test="<%= (article != null) && Validator.isNotNull(layoutUuid) %>">
+
+	<%
+	Layout defaultDisplayLayout = null;
+
+	try {
+		defaultDisplayLayout = LayoutLocalServiceUtil.getLayoutByUuidAndGroupId(layoutUuid, scopeGroupId, false);
+	}
+	catch (NoSuchLayoutException nsle) {
+		defaultDisplayLayout = LayoutLocalServiceUtil.getLayoutByUuidAndGroupId(layoutUuid, scopeGroupId, true);
+	}
+
+	defaultDisplayLayout = defaultDisplayLayout.toEscapedModel();
+
+	AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(JournalArticle.class.getName());
+
+	AssetRenderer assetRenderer = assetRendererFactory.getAssetRenderer(article.getResourcePrimKey());
+
+	String urlViewInContext = assetRenderer.getURLViewInContext(liferayPortletRequest, liferayPortletResponse, currentURL);
+	%>
+
+	<c:if test="<%= Validator.isNotNull(urlViewInContext) %>">
+		<a href="<%= urlViewInContext %>" target="blank"><%= LanguageUtil.format(pageContext, "view-content-in-x", defaultDisplayLayout.getName(locale)) %></a>
+	</c:if>
+</c:if>
+
+<%!
+private String _getLayoutBreadcrumb(Layout layout, Locale locale) throws Exception {
+	StringBundler sb = new StringBundler();
+
+	layout = layout.toEscapedModel();
+
+	if (layout.isPrivateLayout()) {
+		sb.append(LanguageUtil.get(locale, "private-pages"));
+	}
+	else {
+		sb.append(LanguageUtil.get(locale, "public-pages"));
+	}
+
+	sb.append(StringPool.SPACE);
+	sb.append(StringPool.GREATER_THAN);
+	sb.append(StringPool.SPACE);
+
+	List<Layout> ancestors = layout.getAncestors();
+
+	Collections.reverse(ancestors);
+
+	for (Layout ancestor : ancestors) {
+		ancestor = ancestor.toEscapedModel();
+
+		sb.append(ancestor.getName(locale));
+		sb.append(StringPool.SPACE);
+		sb.append(StringPool.GREATER_THAN);
+		sb.append(StringPool.SPACE);
+	}
+
+	sb.append(layout.getName(locale));
+
+	return sb.toString();
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article/permissions.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article/permissions.jsp
new file mode 100644
index 0000000..dedd2b6
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article/permissions.jsp
@@ -0,0 +1,35 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+JournalArticle article = (JournalArticle)request.getAttribute(WebKeys.JOURNAL_ARTICLE);
+%>
+
+<liferay-ui:error-marker key="errorSection" value="permissions" />
+
+<aui:model-context bean="<%= article %>" model="<%= JournalArticle.class %>" />
+
+<h3><liferay-ui:message key="permissions" /></h3>
+
+<c:if test="<%= (article == null) || article.isNew() %>">
+	<aui:field-wrapper cssClass="journal-article-permissions" label="permissions">
+		<liferay-ui:input-permissions
+			modelName="<%= JournalArticle.class.getName() %>"
+		/>
+	</aui:field-wrapper>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article/related_assets.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article/related_assets.jsp
new file mode 100644
index 0000000..dca5afe
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article/related_assets.jsp
@@ -0,0 +1,51 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+JournalArticle article = (JournalArticle)request.getAttribute(WebKeys.JOURNAL_ARTICLE);
+
+long assetEntryId = 0;
+long classPK = 0;
+
+if (article != null) {
+	classPK = article.getResourcePrimKey();
+
+	if (!article.isApproved() && (article.getVersion() != JournalArticleConstants.VERSION_DEFAULT)) {
+		AssetEntry assetEntry = AssetEntryLocalServiceUtil.fetchEntry(JournalArticle.class.getName(), article.getPrimaryKey());
+
+		if (assetEntry != null) {
+			assetEntryId = assetEntry.getEntryId();
+			classPK = article.getPrimaryKey();
+		}
+	}
+}
+%>
+
+<liferay-ui:error-marker key="errorSection" value="related-assets" />
+
+<aui:model-context bean="<%= article %>" model="<%= JournalArticle.class %>" />
+
+<h3><liferay-ui:message key="related-assets" /></h3>
+
+<aui:fieldset>
+	<liferay-ui:input-asset-links
+		assetEntryId="<%= assetEntryId %>"
+		className="<%= JournalArticle.class.getName() %>"
+		classPK="<%= classPK %>"
+	/>
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article/schedule.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article/schedule.jsp
new file mode 100644
index 0000000..eab64c9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article/schedule.jsp
@@ -0,0 +1,54 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+JournalArticle article = (JournalArticle)request.getAttribute(WebKeys.JOURNAL_ARTICLE);
+
+boolean neverExpire = ParamUtil.getBoolean(request, "neverExpire", true);
+
+if (article != null) {
+	if ((article.getExpirationDate() != null) && !article.isExpired()) {
+		neverExpire = false;
+	}
+}
+
+boolean neverReview = ParamUtil.getBoolean(request, "neverReview", true);
+
+if (article != null) {
+	if (article.getReviewDate() != null) {
+		neverReview = false;
+	}
+}
+%>
+
+<liferay-ui:error-marker key="errorSection" value="schedule" />
+
+<aui:model-context bean="<%= article %>" model="<%= JournalArticle.class %>" />
+
+<h3><liferay-ui:message key="schedule" /></h3>
+
+<liferay-ui:error exception="<%= ArticleDisplayDateException.class %>" message="please-enter-a-valid-display-date" />
+<liferay-ui:error exception="<%= ArticleExpirationDateException.class %>" message="please-enter-a-valid-expiration-date" />
+
+<aui:fieldset>
+	<aui:input formName="fm1" name="displayDate" />
+
+	<aui:input dateTogglerCheckboxLabel="never-expire" disabled="<%= neverExpire %>" formName="fm1" name="expirationDate" />
+
+	<aui:input dateTogglerCheckboxLabel="never-review" disabled="<%= neverReview %>" formName="fm1" name="reviewDate" />
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_action.jsp
new file mode 100644
index 0000000..b9d0065
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_action.jsp
@@ -0,0 +1,166 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+String referringPortletResource = ParamUtil.getString(request, "referringPortletResource");
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+JournalArticle article = null;
+
+if (row != null) {
+	article = (JournalArticle)row.getObject();
+}
+else {
+	article = (JournalArticle)request.getAttribute("view_entries.jsp-article");
+}
+%>
+
+<span class="entry-action overlay">
+	<liferay-ui:icon-menu direction="down" extended="<%= false %>" icon="<%= StringPool.BLANK %>" message="<%= StringPool.BLANK %>" showWhenSingleIcon="<%= true %>" triggerCssClass="btn">
+		<c:if test="<%= JournalArticlePermission.contains(permissionChecker, article, ActionKeys.UPDATE) %>">
+			<portlet:renderURL var="editURL">
+				<portlet:param name="struts_action" value="/journal/edit_article" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="backURL" value="<%= currentURL %>" />
+				<portlet:param name="referringPortletResource" value="<%= referringPortletResource %>" />
+				<portlet:param name="groupId" value="<%= String.valueOf(article.getGroupId()) %>" />
+				<portlet:param name="folderId" value="<%= String.valueOf(article.getFolderId()) %>" />
+				<portlet:param name="articleId" value="<%= article.getArticleId() %>" />
+				<portlet:param name="version" value="<%= String.valueOf(article.getVersion()) %>" />
+			</portlet:renderURL>
+
+			<liferay-ui:icon
+				image="edit"
+				url="<%= editURL %>"
+			/>
+		</c:if>
+
+		<c:if test="<%= JournalArticlePermission.contains(permissionChecker, article, ActionKeys.UPDATE) %>">
+			<portlet:renderURL var="moveURL">
+				<portlet:param name="struts_action" value="/journal/move_article" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="backURL" value="<%= currentURL %>" />
+				<portlet:param name="referringPortletResource" value="<%= referringPortletResource %>" />
+				<portlet:param name="articleId" value="<%= article.getArticleId() %>" />
+			</portlet:renderURL>
+
+			<liferay-ui:icon
+				image="submit"
+				message="move"
+				url="<%= moveURL %>"
+			/>
+		</c:if>
+
+		<c:if test="<%= JournalArticlePermission.contains(permissionChecker, article, ActionKeys.PERMISSIONS) %>">
+			<liferay-security:permissionsURL
+				modelResource="<%= JournalArticle.class.getName() %>"
+				modelResourceDescription="<%= article.getTitle(locale) %>"
+				resourcePrimKey="<%= String.valueOf(article.getResourcePrimKey()) %>"
+				var="permissionsURL"
+				windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+			/>
+
+			<liferay-ui:icon
+				image="permissions"
+				method="get"
+				url="<%= permissionsURL %>"
+				useDialog="<%= true %>"
+			/>
+		</c:if>
+
+		<c:if test="<%= JournalArticlePermission.contains(permissionChecker, article, ActionKeys.VIEW) %>">
+			<liferay-portlet:renderURL plid="<%= JournalUtil.getPreviewPlid(article, themeDisplay) %>" var="previewArticleContentURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+				<portlet:param name="struts_action" value="/journal/preview_article_content" />
+				<portlet:param name="groupId" value="<%= String.valueOf(article.getGroupId()) %>" />
+				<portlet:param name="articleId" value="<%= article.getArticleId() %>" />
+				<portlet:param name="version" value="<%= String.valueOf(article.getVersion()) %>" />
+			</liferay-portlet:renderURL>
+
+			<%
+			String taglibOnClick = "Liferay.fire('previewArticle', {title: '" + HtmlUtil.escapeJS(article.getTitle(locale)) + "', uri: '" + HtmlUtil.escapeJS(previewArticleContentURL.toString()) + "'});";
+			%>
+
+			<liferay-ui:icon
+				image="preview"
+				onClick="<%= taglibOnClick %>"
+				url="javascript:;"
+			/>
+
+			<c:if test="<%= JournalArticlePermission.contains(permissionChecker, article, ActionKeys.UPDATE) %>">
+				<portlet:renderURL var="viewHistoryURL">
+					<portlet:param name="struts_action" value="/journal/view_article_history" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="referringPortletResource" value="<%= referringPortletResource %>" />
+					<portlet:param name="articleId" value="<%= article.getArticleId() %>" />
+				</portlet:renderURL>
+
+				<liferay-ui:icon
+					image="time"
+					message="view-history"
+					url="<%= viewHistoryURL.toString() %>"
+				/>
+			</c:if>
+
+			<c:if test="<%= JournalPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_ARTICLE) %>">
+				<portlet:renderURL var="copyURL">
+					<portlet:param name="struts_action" value="/journal/copy_article" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="groupId" value="<%= String.valueOf(article.getGroupId()) %>" />
+					<portlet:param name="oldArticleId" value="<%= article.getArticleId() %>" />
+					<portlet:param name="version" value="<%= String.valueOf(article.getVersion()) %>" />
+				</portlet:renderURL>
+
+				<liferay-ui:icon
+					image="copy"
+					url="<%= copyURL.toString() %>"
+				/>
+			</c:if>
+		</c:if>
+
+		<c:if test="<%= JournalArticlePermission.contains(permissionChecker, article, ActionKeys.EXPIRE) && article.hasApprovedVersion() %>">
+			<portlet:actionURL var="expireURL">
+				<portlet:param name="struts_action" value="/journal/edit_article" />
+				<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.EXPIRE %>" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="groupId" value="<%= String.valueOf(article.getGroupId()) %>" />
+				<portlet:param name="articleId" value="<%= article.getArticleId() %>" />
+			</portlet:actionURL>
+
+			<liferay-ui:icon
+				image="expire"
+				url="<%= expireURL %>"
+			/>
+		</c:if>
+
+		<c:if test="<%= JournalArticlePermission.contains(permissionChecker, article, ActionKeys.DELETE) %>">
+			<portlet:actionURL var="deleteURL">
+				<portlet:param name="struts_action" value="/journal/edit_article" />
+				<portlet:param name="<%= Constants.CMD %>" value="<%= TrashUtil.isTrashEnabled(scopeGroupId) ? Constants.MOVE_TO_TRASH : Constants.DELETE %>" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="groupId" value="<%= String.valueOf(article.getGroupId()) %>" />
+				<portlet:param name="articleId" value="<%= article.getArticleId() %>" />
+			</portlet:actionURL>
+
+			<liferay-ui:icon-delete
+				trash="<%= TrashUtil.isTrashEnabled(scopeGroupId) %>"
+				url="<%= deleteURL %>"
+			/>
+		</c:if>
+	</liferay-ui:icon-menu>
+</span>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_columns.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_columns.jspf
new file mode 100644
index 0000000..5c270e9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_columns.jspf
@@ -0,0 +1,50 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+
+// Article id
+
+row.addText(curArticle.getArticleId());
+
+// Title
+
+TextSearchEntry articleTitleTextSearchEntry = new TextSearchEntry();
+
+articleTitleTextSearchEntry.setName(articleTitle);
+
+row.addSearchEntry(articleTitleTextSearchEntry);
+
+// Status
+
+row.addStatus(curArticle.getStatus(), curArticle.getStatusByUserId(), curArticle.getStatusDate());
+
+// Modified date
+
+row.addDate(curArticle.getModifiedDate());
+
+// Display date
+
+row.addDate(curArticle.getDisplayDate());
+
+// Author
+
+row.addText(PortalUtil.getUserName(curArticle));
+
+// Action
+
+row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/journal/article_action.jsp");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_header.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_header.jsp
new file mode 100644
index 0000000..b419394
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_header.jsp
@@ -0,0 +1,56 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+String backURL = ParamUtil.getString(request, "backURL");
+
+JournalArticle article = (JournalArticle)request.getAttribute(WebKeys.JOURNAL_ARTICLE);
+
+long classNameId = BeanParamUtil.getLong(article, request, "classNameId");
+
+String toLanguageId = ParamUtil.getString(request, "toLanguageId");
+
+if ((article != null) && Validator.isNotNull(toLanguageId)) {
+	redirect = null;
+}
+
+boolean localizeTitle = true;
+String title = "new-web-content";
+
+if (classNameId > JournalArticleConstants.CLASSNAME_ID_DEFAULT) {
+	title = "structure-default-values";
+}
+else if ((article != null) && !article.isNew()) {
+	localizeTitle = false;
+
+	if (Validator.isNotNull(toLanguageId)) {
+		title = article.getTitle(toLanguageId);
+	}
+	else {
+		title = article.getTitle(locale);
+	}
+}
+%>
+
+<liferay-ui:header
+	backURL="<%= article == null ? redirect : backURL %>"
+	localizeTitle="<%= localizeTitle %>"
+	title="<%= title %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_search.jsp
new file mode 100644
index 0000000..ff7390b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_search.jsp
@@ -0,0 +1,121 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+long folderId = GetterUtil.getLong((String)liferayPortletRequest.getAttribute("view.jsp-folderId"));
+
+PortletURL portletURL = liferayPortletResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/journal/view");
+portletURL.setParameter("folderId", String.valueOf(folderId));
+
+ArticleSearch searchContainer = new ArticleSearch(liferayPortletRequest, portletURL);
+
+ArticleDisplayTerms displayTerms = (ArticleDisplayTerms)searchContainer.getDisplayTerms();
+%>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="fm1" onSubmit="event.preventDefault();">
+	<liferay-ui:search-toggle
+		autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>"
+		buttonLabel="search"
+		displayTerms="<%= displayTerms %>"
+		id="<%= renderResponse.getNamespace() %>"
+	>
+		<aui:fieldset>
+			<aui:input label="id" name="<%= displayTerms.ARTICLE_ID %>" size="20" value="<%= displayTerms.getArticleId() %>" />
+
+			<aui:input name="<%= displayTerms.TITLE %>" size="20" type="text" value="<%= displayTerms.getTitle() %>" />
+
+			<aui:input name="<%= displayTerms.DESCRIPTION %>" size="20" type="text" value="<%= displayTerms.getDescription() %>" />
+
+			<aui:input name="<%= displayTerms.CONTENT %>" size="20" type="text" value="<%= displayTerms.getContent() %>" />
+
+			<aui:select name="<%= displayTerms.TYPE %>">
+				<aui:option value=""></aui:option>
+
+				<%
+				for (int i = 0; i < JournalArticleConstants.TYPES.length; i++) {
+				%>
+
+					<aui:option label="<%= JournalArticleConstants.TYPES[i] %>" selected="<%= displayTerms.getType().equals(JournalArticleConstants.TYPES[i]) %>" />
+
+				<%
+				}
+				%>
+
+			</aui:select>
+
+			<c:if test="<%= !portletName.equals(PortletKeys.JOURNAL) || ((themeDisplay.getScopeGroupId() == themeDisplay.getCompanyGroupId()) && (Validator.isNotNull(displayTerms.getStructureId()) || Validator.isNotNull(displayTerms.getTemplateId()))) %>">
+
+				<%
+				List<Group> mySiteGroups = user.getMySiteGroups();
+
+				List<Layout> scopeLayouts = new ArrayList<Layout>();
+
+				scopeLayouts.addAll(LayoutLocalServiceUtil.getScopeGroupLayouts(themeDisplay.getSiteGroupId(), false));
+				scopeLayouts.addAll(LayoutLocalServiceUtil.getScopeGroupLayouts(themeDisplay.getSiteGroupId(), true));
+				%>
+
+				<aui:select label="my-sites" name="<%= displayTerms.GROUP_ID %>" showEmptyOption="<%= (themeDisplay.getScopeGroupId() == themeDisplay.getCompanyGroupId()) && (Validator.isNotNull(displayTerms.getStructureId()) || Validator.isNotNull(displayTerms.getTemplateId())) %>">
+					<aui:option label="global" selected="<%= displayTerms.getGroupId() == themeDisplay.getCompanyGroupId() %>" value="<%= themeDisplay.getCompanyGroupId() %>" />
+
+					<%
+					for (Group mySiteGroup : mySiteGroups) {
+						if (mySiteGroup.hasStagingGroup() && !mySiteGroup.isStagedRemotely() && mySiteGroup.isStagedPortlet(PortletKeys.JOURNAL)) {
+							mySiteGroup = mySiteGroup.getStagingGroup();
+						}
+					%>
+
+						<aui:option label='<%= mySiteGroup.isUser() ? "my-site" : HtmlUtil.escape(mySiteGroup.getDescriptiveName(locale)) %>' selected="<%= displayTerms.getGroupId() == mySiteGroup.getGroupId() %>" value="<%= mySiteGroup.getGroupId() %>" />
+
+					<%
+					}
+
+					if (!scopeLayouts.isEmpty()) {
+						for (Layout curScopeLayout : scopeLayouts) {
+							Group scopeGroup = curScopeLayout.getScopeGroup();
+
+							String label = HtmlUtil.escape(curScopeLayout.getName(locale));
+
+							if (curScopeLayout.equals(layout)) {
+								label = LanguageUtil.get(pageContext, "current-page") + " (" + label + ")";
+							}
+							%>
+
+							<aui:option label="<%= label %>" selected="<%= displayTerms.getGroupId() == scopeGroup.getGroupId() %>" value="<%= scopeGroup.getGroupId() %>" />
+
+					<%
+						}
+					}
+					%>
+
+				</aui:select>
+			</c:if>
+
+			<c:if test="<%= portletName.equals(PortletKeys.JOURNAL) %>">
+				<aui:select name="<%= displayTerms.STATUS %>">
+					<aui:option value=""></aui:option>
+					<aui:option label="draft" selected='<%= displayTerms.getStatus().equals("draft") %>' />
+					<aui:option label="pending" selected='<%= displayTerms.getStatus().equals("pending") %>' />
+					<aui:option label="approved" selected='<%= displayTerms.getStatus().equals("approved") %>' />
+					<aui:option label="expired" selected='<%= displayTerms.getStatus().equals("expired") %>' />
+				</aui:select>
+			</c:if>
+		</aui:fieldset>
+	</liferay-ui:search-toggle>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_search_results.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_search_results.jspf
new file mode 100644
index 0000000..c1fe484
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_search_results.jspf
@@ -0,0 +1,17 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/article_search_results_database.jspf" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_search_results_database.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_search_results_database.jspf
new file mode 100644
index 0000000..4bae7e4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_search_results_database.jspf
@@ -0,0 +1,34 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+if (searchTerms.isAdvancedSearch()) {
+	total = JournalArticleServiceUtil.searchCount(company.getCompanyId(), searchTerms.getGroupId(), searchTerms.getFolderIds(), JournalArticleConstants.CLASSNAME_ID_DEFAULT, searchTerms.getArticleId(), searchTerms.getVersionObj(), searchTerms.getTitle(), searchTerms.getDescription(), searchTerms.getContent(), searchTerms.getType(), searchTerms.getStructureId(), searchTerms.getTemplateId(), searchTerms.getDisplayDateGT(), searchTerms.getDisplayDateLT(), searchTerms.getStatusCode(), searchTerms.getReviewDate(), searchTerms.isAndOperator());
+
+	searchContainer.setTotal(total);
+
+	results = JournalArticleServiceUtil.search(company.getCompanyId(), searchTerms.getGroupId(), searchTerms.getFolderIds(), JournalArticleConstants.CLASSNAME_ID_DEFAULT, searchTerms.getArticleId(), searchTerms.getVersionObj(), searchTerms.getTitle(), searchTerms.getDescription(), searchTerms.getContent(), searchTerms.getType(), searchTerms.getStructureId(), searchTerms.getTemplateId(), searchTerms.getDisplayDateGT(), searchTerms.getDisplayDateLT(), searchTerms.getStatusCode(), searchTerms.getReviewDate(), searchTerms.isAndOperator(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+}
+else {
+	total = JournalArticleServiceUtil.searchCount(company.getCompanyId(), searchTerms.getGroupId(), searchTerms.getFolderIds(), JournalArticleConstants.CLASSNAME_ID_DEFAULT, searchTerms.getKeywords(), searchTerms.getVersionObj(), searchTerms.getType(), searchTerms.getStructureId(), searchTerms.getTemplateId(), searchTerms.getDisplayDateGT(), searchTerms.getDisplayDateLT(), searchTerms.getStatusCode(), searchTerms.getReviewDate());
+
+	searchContainer.setTotal(total);
+
+	results = JournalArticleServiceUtil.search(company.getCompanyId(), searchTerms.getGroupId(), searchTerms.getFolderIds(), JournalArticleConstants.CLASSNAME_ID_DEFAULT, searchTerms.getKeywords(), searchTerms.getVersionObj(), searchTerms.getType(), searchTerms.getStructureId(), searchTerms.getTemplateId(), searchTerms.getDisplayDateGT(), searchTerms.getDisplayDateLT(), searchTerms.getStatusCode(), searchTerms.getReviewDate(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+}
+
+searchContainer.setResults(results);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_search_results_index.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_search_results_index.jspf
new file mode 100644
index 0000000..4d257f1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_search_results_index.jspf
@@ -0,0 +1,47 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+LinkedHashMap<String, Object> journalParams = new LinkedHashMap<String, Object>();
+
+journalParams.put("expandoAttributes", searchTerms.getKeywords());
+
+Sort sort = SortFactoryUtil.getSort(JournalArticle.class, searchContainer.getOrderByCol(), searchContainer.getOrderByType());
+
+boolean corruptIndex = false;
+
+Hits hits = null;
+Tuple tuple = null;
+
+do {
+	if (searchTerms.isAdvancedSearch()) {
+		hits = JournalArticleLocalServiceUtil.search(company.getCompanyId(), searchTerms.getGroupId(), searchTerms.getFolderIds(), JournalArticleConstants.CLASSNAME_ID_DEFAULT, searchTerms.getArticleId(), searchTerms.getTitle(), searchTerms.getDescription(), searchTerms.getContent(), searchTerms.getType(), StringUtil.valueOf(searchTerms.getStatusCode()), searchTerms.getStructureId(), searchTerms.getTemplateId(), journalParams, searchTerms.isAndOperator(), searchContainer.getStart(), searchContainer.getEnd(), sort);
+	}
+	else {
+		hits = JournalArticleLocalServiceUtil.search(company.getCompanyId(), searchTerms.getGroupId(), searchTerms.getFolderIds(), JournalArticleConstants.CLASSNAME_ID_DEFAULT, searchTerms.getStructureId(), searchTerms.getTemplateId(), searchTerms.getKeywords(), journalParams, searchContainer.getStart(), searchContainer.getEnd(), sort);
+	}
+
+	tuple = JournalUtil.getArticles(hits);
+
+	corruptIndex = (Boolean)tuple.getObject(1);
+}
+while (corruptIndex);
+
+results = (List<JournalArticle>)tuple.getObject(0);
+
+searchContainer.setResults(results);
+searchContainer.setTotal(hits.getLength());
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_toolbar.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_toolbar.jsp
new file mode 100644
index 0000000..5795c1b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_toolbar.jsp
@@ -0,0 +1,187 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+String referringPortletResource = ParamUtil.getString(request, "referringPortletResource");
+
+JournalArticle article = (JournalArticle)request.getAttribute(WebKeys.JOURNAL_ARTICLE);
+
+long classNameId = BeanParamUtil.getLong(article, request, "classNameId");
+%>
+
+<div class="article-toolbar" id="<portlet:namespace />articleToolbar"></div>
+
+<aui:script use="aui-toolbar,aui-dialog-iframe-deprecated,aui-tooltip,liferay-util-window">
+	var permissionPopUp = null;
+
+	var toolbarButtonGroup = [];
+
+	<c:if test="<%= classNameId == JournalArticleConstants.CLASSNAME_ID_DEFAULT %>">
+		<liferay-portlet:renderURL plid="<%= JournalUtil.getPreviewPlid(article, themeDisplay) %>" var="previewArticleContentURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+			<portlet:param name="struts_action" value="/journal/preview_article_content" />
+			<portlet:param name="groupId" value="<%= String.valueOf(article.getGroupId()) %>" />
+			<portlet:param name="articleId" value="<%= article.getArticleId() %>" />
+			<portlet:param name="version" value="<%= String.valueOf(article.getVersion()) %>" />
+		</liferay-portlet:renderURL>
+
+		var form = A.one(document.<portlet:namespace />fm1);
+
+		var formChanged = false;
+
+		var hasUnsavedChanges = function() {
+			var unsavedChanges = formChanged;
+
+			if (!unsavedChanges && typeof CKEDITOR !== 'undefined') {
+				A.Object.some(
+					CKEDITOR.instances,
+					function(item, index, collection) {
+						var parentForm = A.one('#' + item.element.getId()).ancestor('form');
+
+						if (parentForm.compareTo(form)) {
+							unsavedChanges = item.checkDirty();
+
+							return unsavedChanges;
+						}
+					}
+				);
+			}
+
+			return unsavedChanges;
+		};
+
+		var previewArticleContentURL = '<%= previewArticleContentURL %>';
+
+		form.delegate(
+			'change',
+			function(event) {
+				formChanged = true;
+			},
+			':input'
+		);
+
+		toolbarButtonGroup.push(
+			{
+				icon: 'icon-search',
+				id: '<portlet:namespace/>basicPreviewButton',
+				label: '<%= UnicodeLanguageUtil.get(pageContext, "basic-preview") %>',
+				on: {
+					click: function(event) {
+						event.domEvent.preventDefault();
+
+						if (!hasUnsavedChanges()) {
+							Liferay.fire(
+								'previewArticle',
+								{
+									title: '<%= HtmlUtil.escapeJS(article.getTitle(locale)) %>',
+									uri: '<%= HtmlUtil.escapeJS(previewArticleContentURL.toString()) %>'
+								}
+							);
+						}
+						else if (confirm('<liferay-ui:message key="in-order-to-preview-your-changes,-the-web-content-will-be-saved-as-a-draft" />')) {
+							var hasStructure = window.<portlet:namespace />journalPortlet.hasStructure();
+							var hasTemplate = window.<portlet:namespace />journalPortlet.hasTemplate();
+							var updateStructureDefaultValues = window.<portlet:namespace />journalPortlet.updateStructureDefaultValues();
+
+							if (hasStructure && !hasTemplate && !updateStructureDefaultValues) {
+								window.<portlet:namespace />journalPortlet.displayTemplateMessage();
+							}
+							else {
+								form.one('#<portlet:namespace /><%= Constants.CMD %>').val('<%= Constants.PREVIEW %>');
+
+								submitForm(form);
+							}
+						}
+					},
+					render: function(event) {
+						new A.Tooltip(
+							{
+								trigger: '#<portlet:namespace/>basicPreviewButton'
+							}
+						).render();
+					}
+				},
+				title: '<liferay-ui:message key="this-preview-won't-include-the-theme-context" />'
+			}
+		);
+	</c:if>
+
+	<c:if test="<%= JournalArticlePermission.contains(permissionChecker, article, ActionKeys.PERMISSIONS) %>">
+		<liferay-security:permissionsURL windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+			modelResource="<%= JournalArticle.class.getName() %>"
+			modelResourceDescription="<%= article.getTitle(locale) %>"
+			resourcePrimKey="<%= String.valueOf(article.getResourcePrimKey()) %>"
+			var="permissionsURL"
+		/>
+
+		toolbarButtonGroup.push(
+			{
+				icon: 'icon-lock',
+				label: '<%= UnicodeLanguageUtil.get(pageContext, "permissions") %>',
+				on: {
+					click: function(event) {
+						if (!permissionPopUp) {
+							permissionPopUp = Liferay.Util.openWindow(
+								{
+									dialog: {
+										cssClass: 'portlet-asset-categories-admin-dialog permissions-change'
+									},
+									id: '<portlet:namespace />articlePermissions',
+									title: '<%= UnicodeLanguageUtil.get(pageContext, "permissions") %>',
+									uri: '<%= permissionsURL %>'
+								}
+							);
+						}
+						else {
+							permissionPopUp.iframe.node.get('contentWindow.location').reload(true);
+						}
+
+						event.domEvent.preventDefault();
+					}
+				}
+			}
+		);
+	</c:if>
+
+	<portlet:renderURL var="viewHistoryURL">
+		<portlet:param name="struts_action" value="/journal/view_article_history" />
+		<portlet:param name="redirect" value="<%= currentURL %>" />
+		<portlet:param name="referringPortletResource" value="<%= referringPortletResource %>" />
+		<portlet:param name="articleId" value="<%= article.getArticleId() %>" />
+	</portlet:renderURL>
+
+	toolbarButtonGroup.push(
+		{
+			icon: 'icon-time',
+			label: '<%= UnicodeLanguageUtil.get(pageContext, "view-history") %>',
+			on: {
+				click: function(event) {
+					window.location = '<%= viewHistoryURL %>';
+
+					event.domEvent.preventDefault();
+				}
+			}
+		}
+	);
+
+	new A.Toolbar(
+		{
+			boundingBox: '#<portlet:namespace />articleToolbar',
+			children: [toolbarButtonGroup]
+		}
+	).render();
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_version_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_version_action.jsp
new file mode 100644
index 0000000..ed48883
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/article_version_action.jsp
@@ -0,0 +1,88 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+String referringPortletResource = ParamUtil.getString(request, "referringPortletResource");
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+JournalArticle article = (JournalArticle)row.getObject();
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= JournalArticlePermission.contains(permissionChecker, article, ActionKeys.VIEW) %>">
+		<liferay-portlet:renderURL plid="<%= JournalUtil.getPreviewPlid(article, themeDisplay) %>" var="previewArticleContentURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+			<portlet:param name="struts_action" value="/journal/preview_article_content" />
+			<portlet:param name="groupId" value="<%= String.valueOf(article.getGroupId()) %>" />
+			<portlet:param name="articleId" value="<%= article.getArticleId() %>" />
+			<portlet:param name="version" value="<%= String.valueOf(article.getVersion()) %>" />
+		</liferay-portlet:renderURL>
+
+		<%
+		String taglibOnClick = "Liferay.fire('previewArticle', {title: '" + HtmlUtil.escapeJS(article.getTitle(locale)) + "', uri: '" + HtmlUtil.escapeJS(previewArticleContentURL.toString()) + "'});";
+		%>
+
+		<liferay-ui:icon
+			image="preview"
+			onClick="<%= taglibOnClick %>"
+			url="javascript:;"
+		/>
+
+		<c:if test="<%= JournalPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_ARTICLE) %>">
+			<portlet:renderURL var="copyURL">
+				<portlet:param name="struts_action" value="/journal/copy_article" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="groupId" value="<%= String.valueOf(article.getGroupId()) %>" />
+				<portlet:param name="oldArticleId" value="<%= article.getArticleId() %>" />
+				<portlet:param name="version" value="<%= String.valueOf(article.getVersion()) %>" />
+			</portlet:renderURL>
+
+			<liferay-ui:icon
+				image="copy"
+				url="<%= copyURL.toString() %>"
+			/>
+		</c:if>
+	</c:if>
+
+	<c:if test="<%= JournalArticlePermission.contains(permissionChecker, article, ActionKeys.EXPIRE) && (article.getStatus() == WorkflowConstants.STATUS_APPROVED) %>">
+		<portlet:actionURL var="expireURL">
+			<portlet:param name="struts_action" value="/journal/edit_article" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.EXPIRE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(article.getGroupId()) %>" />
+			<portlet:param name="articleId" value="<%= article.getArticleId() + EditArticleAction.VERSION_SEPARATOR + article.getVersion() %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon image="time" message="expire" url="<%= expireURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= JournalArticlePermission.contains(permissionChecker, article, ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/journal/edit_article" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="referringPortletResource" value="<%= referringPortletResource %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(article.getGroupId()) %>" />
+			<portlet:param name="articleId" value="<%= article.getArticleId() + EditArticleAction.VERSION_SEPARATOR + article.getVersion() %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete url="<%= deleteURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/asset/abstract.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/asset/abstract.jsp
new file mode 100644
index 0000000..4371ca0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/asset/abstract.jsp
@@ -0,0 +1,80 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+AssetRenderer assetRenderer = (AssetRenderer)request.getAttribute(WebKeys.ASSET_RENDERER);
+int abstractLength = (Integer)request.getAttribute(WebKeys.ASSET_PUBLISHER_ABSTRACT_LENGTH);
+String viewURL = (String)request.getAttribute(WebKeys.ASSET_PUBLISHER_VIEW_URL);
+
+JournalArticle article = (JournalArticle)request.getAttribute(WebKeys.JOURNAL_ARTICLE);
+JournalArticleResource articleResource = JournalArticleResourceLocalServiceUtil.getArticleResource(article.getResourcePrimKey());
+
+String languageId = LanguageUtil.getLanguageId(request);
+
+boolean workflowAssetPreview = GetterUtil.getBoolean((Boolean)request.getAttribute(WebKeys.WORKFLOW_ASSET_PREVIEW));
+
+JournalArticleDisplay articleDisplay = null;
+
+if (!workflowAssetPreview && article.isApproved()) {
+	String xmlRequest = PortletRequestUtil.toXML(renderRequest, renderResponse);
+
+	articleDisplay = JournalContentUtil.getDisplay(articleResource.getGroupId(), articleResource.getArticleId(), null, null, languageId, themeDisplay, 1, xmlRequest);
+}
+else {
+	articleDisplay = JournalArticleLocalServiceUtil.getArticleDisplay(article, null, null, languageId, 1, null, themeDisplay);
+}
+%>
+
+<c:if test="<%= articleDisplay.isSmallImage() %>">
+
+	<%
+	String src = StringPool.BLANK;
+
+	if (Validator.isNotNull(articleDisplay.getSmallImageURL())) {
+		src = articleDisplay.getSmallImageURL();
+	}
+	else {
+		src = themeDisplay.getPathImage() + "/journal/article?img_id=" + articleDisplay.getSmallImageId() + "&t=" + WebServerServletTokenUtil.getToken(articleDisplay.getSmallImageId()) ;
+	}
+	%>
+
+	<div class="asset-small-image">
+		<c:choose>
+			<c:when test="<%= Validator.isNotNull(viewURL) %>">
+				<a href="<%= viewURL %>">
+					<img alt="<%= articleDisplay.getTitle() %>" class="asset-small-image" src="<%= HtmlUtil.escape(src) %>" width="150" />
+				</a>
+			</c:when>
+			<c:otherwise>
+				<img alt="" class="asset-small-image" src="<%= HtmlUtil.escape(src) %>" width="150" />
+			</c:otherwise>
+		</c:choose>
+	</div>
+</c:if>
+
+<%
+String summary = HtmlUtil.escape(articleDisplay.getDescription());
+
+summary = HtmlUtil.replaceNewLine(summary);
+
+if (Validator.isNull(summary)) {
+	summary = HtmlUtil.stripHtml(articleDisplay.getContent());
+}
+%>
+
+<%= StringUtil.shorten(summary, abstractLength) %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/asset/add_asset_redirect.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/asset/add_asset_redirect.jsp
new file mode 100644
index 0000000..1658c48
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/asset/add_asset_redirect.jsp
@@ -0,0 +1,34 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+String referringPortletResource = ParamUtil.getString(request, "referringPortletResource");
+
+Portlet selPortlet = PortletLocalServiceUtil.getPortletById(company.getCompanyId(), referringPortletResource);
+%>
+
+<aui:script use="aui-base">
+	Liferay.fire(
+		'closeWindow',
+		{
+			id: '_<%= HtmlUtil.escapeJS(selPortlet.getPortletId()) %>_editAsset',
+			portletAjaxable: <%= selPortlet.isAjaxable() %>,
+			refresh: '<%= HtmlUtil.escapeJS(selPortlet.getPortletId()) %>'
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/asset/folder_full_content.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/asset/folder_full_content.jsp
new file mode 100644
index 0000000..66848cf
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/asset/folder_full_content.jsp
@@ -0,0 +1,68 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+JournalFolder folder = (JournalFolder)request.getAttribute(WebKeys.JOURNAL_FOLDER);
+%>
+
+<c:if test="<%= folder != null %>">
+
+	<%
+	int status = WorkflowConstants.STATUS_APPROVED;
+
+	if (permissionChecker.isCompanyAdmin() || permissionChecker.isGroupAdmin(scopeGroupId)) {
+		status = WorkflowConstants.STATUS_ANY;
+	}
+
+	int foldersCount = JournalFolderServiceUtil.getFoldersCount(scopeGroupId, folder.getFolderId(), status);
+	int entriesCount = JournalArticleServiceUtil.getArticlesCount(scopeGroupId, folder.getFolderId(), status);
+	%>
+
+	<aui:row>
+		<aui:col cssClass="lfr-asset-column lfr-asset-column-details" width="100">
+			<c:if test="<%= Validator.isNotNull(folder.getDescription()) %>">
+				<div class="lfr-asset-description">
+					<%= HtmlUtil.escape(folder.getDescription()) %>
+				</div>
+			</c:if>
+
+			<div class="lfr-asset-metadata">
+				<div class="lfr-asset-icon lfr-asset-date">
+					<%= LanguageUtil.format(pageContext, "last-updated-x", dateFormatDateTime.format(folder.getModifiedDate())) %>
+				</div>
+
+				<div class="lfr-asset-icon lfr-asset-subfolders">
+					<%= foldersCount %> <liferay-ui:message key='<%= (foldersCount == 1) ? "subfolder" : "subfolders" %>' />
+				</div>
+
+				<div class="lfr-asset-icon lfr-asset-items last">
+					<%= entriesCount %> <liferay-ui:message key='<%= (entriesCount == 1) ? "article" : "articles" %>' />
+				</div>
+			</div>
+
+			<liferay-ui:custom-attributes-available className="<%= JournalFolder.class.getName() %>">
+				<liferay-ui:custom-attribute-list
+					className="<%= JournalFolder.class.getName() %>"
+					classPK="<%= (folder != null) ? folder.getFolderId() : 0 %>"
+					editable="<%= false %>"
+					label="<%= true %>"
+				/>
+			</liferay-ui:custom-attributes-available>
+		</aui:col>
+	</aui:row>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/asset/full_content.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/asset/full_content.jsp
new file mode 100644
index 0000000..9db2b2f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/asset/full_content.jsp
@@ -0,0 +1,82 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+AssetRendererFactory assetRendererFactory = (AssetRendererFactory)request.getAttribute(WebKeys.ASSET_RENDERER_FACTORY);
+
+JournalArticle article = (JournalArticle)request.getAttribute(WebKeys.JOURNAL_ARTICLE);
+JournalArticleResource articleResource = JournalArticleResourceLocalServiceUtil.getArticleResource(article.getResourcePrimKey());
+
+String templateId = (String)request.getAttribute(WebKeys.JOURNAL_TEMPLATE_ID);
+String languageId = LanguageUtil.getLanguageId(request);
+int articlePage = ParamUtil.getInteger(request, "page", 1);
+String viewMode = ParamUtil.getString(request, "viewMode", Constants.VIEW);
+
+boolean workflowAssetPreview = ParamUtil.getBoolean(request, "workflowAssetPreview");
+
+JournalArticleDisplay articleDisplay = null;
+
+if (!workflowAssetPreview && article.isApproved()) {
+	String xmlRequest = PortletRequestUtil.toXML(renderRequest, renderResponse);
+
+	articleDisplay = JournalContentUtil.getDisplay(articleResource.getGroupId(), articleResource.getArticleId(), article.getVersion(), templateId, viewMode, languageId, themeDisplay, articlePage, xmlRequest);
+}
+else {
+	articleDisplay = JournalArticleLocalServiceUtil.getArticleDisplay(article, null, viewMode, languageId, 1, null, themeDisplay);
+}
+%>
+
+<div class="journal-content-article">
+	<%= RuntimePageUtil.processXML(request, response, articleDisplay.getContent()) %>
+</div>
+
+<c:if test="<%= articleDisplay.isPaginate() %>">
+
+	<%
+	String pageRedirect = ParamUtil.getString(request, "redirect");
+
+	if (Validator.isNull(pageRedirect)) {
+		pageRedirect = currentURL;
+	}
+
+	int cur = ParamUtil.getInteger(request, "cur");
+
+	PortletURL articlePageURL = renderResponse.createRenderURL();
+
+	articlePageURL.setParameter("struts_action", "/asset_publisher/view_content");
+	articlePageURL.setParameter("type", assetRendererFactory.getType());
+	articlePageURL.setParameter("redirect", pageRedirect);
+	articlePageURL.setParameter("urlTitle", articleDisplay.getUrlTitle());
+	articlePageURL.setParameter("cur", String.valueOf(cur));
+	%>
+
+	<br />
+
+	<liferay-ui:page-iterator
+		cur="<%= articleDisplay.getCurrentPage() %>"
+		curParam="page"
+		delta="<%= 1 %>"
+		id="articleDisplayPages"
+		maxPages="<%= 25 %>"
+		total="<%= articleDisplay.getNumberOfPages() %>"
+		type="article"
+		url="<%= articlePageURL.toString() %>"
+	/>
+
+	<br />
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/breadcrumb.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/breadcrumb.jsp
new file mode 100644
index 0000000..161c060
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/breadcrumb.jsp
@@ -0,0 +1,31 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+JournalFolder folder = (JournalFolder)request.getAttribute("view.jsp-folder");
+
+JournalUtil.addPortletBreadcrumbEntries(folder, request, liferayPortletResponse);
+%>
+
+<liferay-ui:breadcrumb
+	showCurrentGroup="<%= false %>"
+	showCurrentPortlet="<%= false %>"
+	showGuestGroup="<%= false %>"
+	showLayout="<%= false %>"
+	showParentGroups="<%= false %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/cast_result.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/cast_result.jspf
new file mode 100644
index 0000000..b95536e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/cast_result.jspf
@@ -0,0 +1,31 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+JournalArticle curArticle = null;
+JournalFolder curFolder = null;
+
+if (result instanceof JournalFolder) {
+	curFolder = (JournalFolder)result;
+
+	curFolder = curFolder.toEscapedModel();
+}
+else {
+	curArticle = (JournalArticle)result;
+
+	curArticle = curArticle.toEscapedModel();
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/configuration.jsp
new file mode 100644
index 0000000..81f0acc
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/configuration.jsp
@@ -0,0 +1,251 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+String tabs2 = ParamUtil.getString(request, "tabs2", "email-from");
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+String emailFromName = ParamUtil.getString(request, "preferences--emailFromName--", JournalUtil.getEmailFromName(portletPreferences, company.getCompanyId()));
+String emailFromAddress = ParamUtil.getString(request, "preferences--emailFromAddress--", JournalUtil.getEmailFromAddress(portletPreferences, company.getCompanyId()));
+
+boolean emailArticleAddedEnabled = ParamUtil.getBoolean(request, "preferences--emailArticleAddedEnabled--", JournalUtil.getEmailArticleAddedEnabled(portletPreferences));
+boolean emailArticleApprovalDeniedEnabled = ParamUtil.getBoolean(request, "preferences--emailArticleApprovalDeniedEnabled--", JournalUtil.getEmailArticleApprovalDeniedEnabled(portletPreferences));
+boolean emailArticleApprovalGrantedEnabled = ParamUtil.getBoolean(request, "preferences--emailArticleApprovalGrantedEnabled--", JournalUtil.getEmailArticleApprovalGrantedEnabled(portletPreferences));
+boolean emailArticleApprovalRequestedEnabled = ParamUtil.getBoolean(request, "preferences--emailArticleApprovalRequestedEnabled--", JournalUtil.getEmailArticleApprovalRequestedEnabled(portletPreferences));
+boolean emailArticleReviewEnabled = ParamUtil.getBoolean(request, "preferences--emailArticleReviewEnabled--", JournalUtil.getEmailArticleReviewEnabled(portletPreferences));
+boolean emailArticleUpdatedEnabled = ParamUtil.getBoolean(request, "preferences--emailArticleUpdatedEnabled--", JournalUtil.getEmailArticleUpdatedEnabled(portletPreferences));
+
+String emailParam = StringPool.BLANK;
+String defaultEmailSubject = StringPool.BLANK;
+String defaultEmailBody = StringPool.BLANK;
+
+if (tabs2.equals("web-content-added-email")) {
+	emailParam = "emailArticleAdded";
+	defaultEmailSubject = ContentUtil.get(PropsValues.JOURNAL_EMAIL_ARTICLE_ADDED_SUBJECT);
+	defaultEmailBody = ContentUtil.get(PropsValues.JOURNAL_EMAIL_ARTICLE_ADDED_BODY);
+}
+else if (tabs2.equals("web-content-approval-denied-email")) {
+	emailParam = "emailArticleApprovalDenied";
+	defaultEmailSubject = ContentUtil.get(PropsValues.JOURNAL_EMAIL_ARTICLE_APPROVAL_DENIED_SUBJECT);
+	defaultEmailBody = ContentUtil.get(PropsValues.JOURNAL_EMAIL_ARTICLE_APPROVAL_DENIED_BODY);
+}
+else if (tabs2.equals("web-content-approval-granted-email")) {
+	emailParam = "emailArticleApprovalGranted";
+	defaultEmailSubject = ContentUtil.get(PropsValues.JOURNAL_EMAIL_ARTICLE_APPROVAL_GRANTED_SUBJECT);
+	defaultEmailBody = ContentUtil.get(PropsValues.JOURNAL_EMAIL_ARTICLE_APPROVAL_GRANTED_BODY);
+}
+else if (tabs2.equals("web-content-approval-requested-email")) {
+	emailParam = "emailArticleApprovalRequested";
+	defaultEmailSubject = ContentUtil.get(PropsValues.JOURNAL_EMAIL_ARTICLE_APPROVAL_REQUESTED_SUBJECT);
+	defaultEmailBody = ContentUtil.get(PropsValues.JOURNAL_EMAIL_ARTICLE_APPROVAL_REQUESTED_BODY);
+}
+else if (tabs2.equals("web-content-review-email")) {
+	emailParam = "emailArticleReview";
+	defaultEmailSubject = ContentUtil.get(PropsValues.JOURNAL_EMAIL_ARTICLE_REVIEW_SUBJECT);
+	defaultEmailBody = ContentUtil.get(PropsValues.JOURNAL_EMAIL_ARTICLE_REVIEW_BODY);
+}
+else if (tabs2.equals("web-content-updated-email")) {
+	emailParam = "emailArticleUpdated";
+	defaultEmailSubject = ContentUtil.get(PropsValues.JOURNAL_EMAIL_ARTICLE_UPDATED_SUBJECT);
+	defaultEmailBody = ContentUtil.get(PropsValues.JOURNAL_EMAIL_ARTICLE_UPDATED_BODY);
+}
+
+String emailSubjectParam = emailParam + "Subject";
+String emailBodyParam = emailParam + "Body";
+
+String emailSubject = PrefsParamUtil.getString(portletPreferences, request, emailSubjectParam, defaultEmailSubject);
+String emailBody = PrefsParamUtil.getString(portletPreferences, request, emailBodyParam, defaultEmailBody);
+%>
+
+<liferay-portlet:renderURL portletConfiguration="true" var="portletURL">
+	<portlet:param name="tabs2" value="<%= tabs2 %>" />
+	<portlet:param name="redirect" value="<%= redirect %>" />
+</liferay-portlet:renderURL>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveConfiguration();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+
+	<%
+	String tabs1Names = "email-from,web-content-added-email,web-content-review-email,web-content-updated-email";
+
+	if (WorkflowDefinitionLinkLocalServiceUtil.hasWorkflowDefinitionLink(themeDisplay.getCompanyId(), scopeGroupId, JournalArticle.class.getName())) {
+		tabs1Names = tabs1Names.concat(",web-content-approval-denied-email,web-content-approval-granted-email,web-content-approval-requested-email");
+	}
+	%>
+
+	<liferay-ui:tabs
+		names="<%= tabs1Names %>"
+		param="tabs2"
+		url="<%= portletURL %>"
+	/>
+
+	<liferay-ui:error key="emailFromAddress" message="please-enter-a-valid-email-address" />
+	<liferay-ui:error key="emailFromName" message="please-enter-a-valid-name" />
+	<liferay-ui:error key="emailArticleAddedBody" message="please-enter-a-valid-body" />
+	<liferay-ui:error key="emailArticleAddedSubject" message="please-enter-a-valid-subject" />
+	<liferay-ui:error key="emailArticleApprovalDeniedBody" message="please-enter-a-valid-body" />
+	<liferay-ui:error key="emailArticleApprovalDeniedSubject" message="please-enter-a-valid-subject" />
+	<liferay-ui:error key="emailArticleApprovalGrantedBody" message="please-enter-a-valid-body" />
+	<liferay-ui:error key="emailArticleApprovalGrantedSubject" message="please-enter-a-valid-subject" />
+	<liferay-ui:error key="emailArticleApprovalRequestedBody" message="please-enter-a-valid-body" />
+	<liferay-ui:error key="emailArticleApprovalRequestedSubject" message="please-enter-a-valid-subject" />
+	<liferay-ui:error key="emailArticleReviewBody" message="please-enter-a-valid-body" />
+	<liferay-ui:error key="emailArticleReviewSubject" message="please-enter-a-valid-subject" />
+	<liferay-ui:error key="emailArticleUpdatedBody" message="please-enter-a-valid-body" />
+	<liferay-ui:error key="emailArticleUpdatedSubject" message="please-enter-a-valid-subject" />
+
+	<c:choose>
+		<c:when test='<%= tabs2.equals("email-from") %>'>
+			<aui:fieldset>
+				<aui:input cssClass="lfr-input-text-container" label="name" name="preferences--emailFromName--" type="text" value="<%= emailFromName %>" />
+
+				<aui:input cssClass="lfr-input-text-container" label="address" name="preferences--emailFromAddress--" type="text" value="<%= emailFromAddress %>" />
+			</aui:fieldset>
+		</c:when>
+		<c:when test='<%= tabs2.startsWith("web-content-added-") || tabs2.startsWith("web-content-approval-") || tabs2.startsWith("web-content-review-") || tabs2.startsWith("web-content-updated-") %>'>
+			<aui:fieldset>
+				<c:choose>
+					<c:when test='<%= tabs2.equals("web-content-added-email") %>'>
+						<aui:input label="enabled" name="preferences--emailArticleAddedEnabled--" type="checkbox" value="<%= emailArticleAddedEnabled %>" />
+					</c:when>
+					<c:when test='<%= tabs2.equals("web-content-approval-denied-email") %>'>
+						<aui:input label="enabled" name="preferences--emailArticleApprovalDeniedEnabled--" type="checkbox" value="<%= emailArticleApprovalDeniedEnabled %>" />
+					</c:when>
+					<c:when test='<%= tabs2.equals("web-content-approval-granted-email") %>'>
+						<aui:input label="enabled" name="preferences--emailArticleApprovalGrantedEnabled--" type="checkbox" value="<%= emailArticleApprovalGrantedEnabled %>" />
+					</c:when>
+					<c:when test='<%= tabs2.equals("web-content-approval-requested-email") %>'>
+						<aui:input label="enabled" name="preferences--emailArticleApprovalRequestedEnabled--" type="checkbox" value="<%= emailArticleApprovalRequestedEnabled %>" />
+					</c:when>
+					<c:when test='<%= tabs2.equals("web-content-review-email") %>'>
+						<aui:input label="enabled" name="preferences--emailArticleReviewEnabled--" type="checkbox" value="<%= emailArticleReviewEnabled %>" />
+					</c:when>
+					<c:when test='<%= tabs2.equals("web-content-updated-email") %>'>
+						<aui:input label="enabled" name="preferences--emailArticleUpdatedEnabled--" type="checkbox" value="<%= emailArticleUpdatedEnabled %>" />
+					</c:when>
+				</c:choose>
+
+				<aui:input cssClass="lfr-input-text-container" label="subject" name='<%= "preferences--" + emailSubjectParam + "--" %>' value="<%= emailSubject %>" />
+
+				<aui:field-wrapper label="body">
+					<liferay-ui:input-editor editorImpl="<%= EDITOR_WYSIWYG_IMPL_KEY %>" />
+
+					<aui:input name='<%= "preferences--" + emailBodyParam + "--" %>' type="hidden" />
+				</aui:field-wrapper>
+			</aui:fieldset>
+
+			<div class="definition-of-terms">
+				<h4><liferay-ui:message key="definition-of-terms" /></h4>
+
+				<dl>
+					<dt>
+						[$ARTICLE_ID$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-web-content-id" />
+					</dd>
+					<dt>
+						[$ARTICLE_TITLE$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-web-content-title" />
+					</dd>
+
+					<c:if test='<%= tabs2.startsWith("web-content-added-") || tabs2.startsWith("web-content-approval-") || tabs2.startsWith("web-content-review-") || tabs2.startsWith("web-content-updated-") %>'>
+						<dt>
+							[$ARTICLE_URL$]
+						</dt>
+						<dd>
+							<liferay-ui:message key="the-web-content-url" />
+						</dd>
+					</c:if>
+
+					<dt>
+						[$ARTICLE_VERSION$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-web-content-version" />
+					</dd>
+					<dt>
+						[$FROM_ADDRESS$]
+					</dt>
+					<dd>
+						<%= HtmlUtil.escape(emailFromAddress) %>
+					</dd>
+					<dt>
+						[$FROM_NAME$]
+					</dt>
+					<dd>
+						<%= HtmlUtil.escape(emailFromName) %>
+					</dd>
+					<dt>
+						[$PORTAL_URL$]
+					</dt>
+					<dd>
+						<%= company.getVirtualHostname() %>
+					</dd>
+					<dt>
+						[$PORTLET_NAME$]
+					</dt>
+					<dd>
+						<%= PortalUtil.getPortletTitle(renderResponse) %>
+					</dd>
+					<dt>
+						[$TO_ADDRESS$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-address-of-the-email-recipient" />
+					</dd>
+					<dt>
+						[$TO_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-name-of-the-email-recipient" />
+					</dd>
+				</dl>
+			</div>
+		</c:when>
+	</c:choose>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />initEditor() {
+		return "<%= UnicodeFormatter.toString(emailBody) %>";
+	}
+
+	function <portlet:namespace />saveConfiguration() {
+		<c:if test='<%= tabs2.startsWith("web-content-added-") || tabs2.startsWith("web-content-approval-") || tabs2.startsWith("web-content-review-") || tabs2.startsWith("web-content-updated-") %>'>
+			document.<portlet:namespace />fm.<portlet:namespace /><%= emailBodyParam %>.value = window.<portlet:namespace />editor.getHTML();
+		</c:if>
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
+
+<%!
+public static final String EDITOR_WYSIWYG_IMPL_KEY = "editor.wysiwyg.portal-web.docroot.html.portlet.journal.configuration.jsp";
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/copy_article.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/copy_article.jsp
new file mode 100644
index 0000000..805db5b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/copy_article.jsp
@@ -0,0 +1,72 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+long groupId = ParamUtil.getLong(request, "groupId");
+String oldArticleId = ParamUtil.getString(request, "oldArticleId");
+String newArticleId = ParamUtil.getString(request, "newArticleId");
+double version = ParamUtil.getDouble(request, "version");
+%>
+
+<portlet:actionURL var="copyArticleURL">
+	<portlet:param name="struts_action" value="/journal/copy_article" />
+</portlet:actionURL>
+
+<aui:form action="<%= copyArticleURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.COPY %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="groupId" type="hidden" value="<%= groupId %>" />
+	<aui:input name="oldArticleId" type="hidden" value="<%= oldArticleId %>" />
+	<aui:input name="version" type="hidden" value="<%= version %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title="web-content"
+	/>
+
+	<liferay-ui:error exception="<%= ArticleIdException.class %>" message="please-enter-a-valid-id" />
+	<liferay-ui:error exception="<%= DuplicateArticleIdException.class %>" message="please-enter-a-unique-id" />
+
+	<aui:fieldset>
+		<aui:field-wrapper label="id">
+			<liferay-ui:input-resource url="<%= oldArticleId %>" />
+		</aui:field-wrapper>
+
+		<aui:field-wrapper label="new-id">
+			<c:choose>
+				<c:when test="<%= PropsValues.JOURNAL_ARTICLE_FORCE_AUTOGENERATE_ID %>">
+					<liferay-ui:input-resource url='<%= LanguageUtil.get(pageContext, "autogenerate-id") %>' />
+
+					<aui:input name="newArticleId" type="hidden" />
+					<aui:input name="autoArticleId" type="hidden" value="<%= true %>" />
+				</c:when>
+				<c:otherwise>
+					<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" bean="<%= null %>" cssClass="lfr-input-text-container" field="articleId" fieldParam="newArticleId" label="" model="<%= JournalArticle.class %>" name="newArticleId" value="<%= newArticleId %>" />
+				</c:otherwise>
+			</c:choose>
+		</aui:field-wrapper>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" value="copy" />
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/css/.sass-cache/main.css
new file mode 100644
index 0000000..e641f5e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/css/.sass-cache/main.css
@@ -0,0 +1,590 @@
+.journal-article-component-list {
+  margin: 10px 0 0 0; }
+
+.portlet-journal .add-article-selector {
+  display: inline-block;
+  vertical-align: top; }
+  .portlet-journal .add-article-selector .lfr-meta-actions {
+    padding-top: 0; }
+.portlet-journal .add-permission-button-row {
+  float: left; }
+.portlet-journal .article-separator {
+  clear: both; }
+.portlet-journal .article-toolbar {
+  margin-bottom: 1em; }
+  .portlet-journal .article-toolbar .icon-delete {
+    background-image: url(@theme_image_path@/common/delete.png); }
+  .portlet-journal .article-toolbar .icon-download {
+    background-image: url(@theme_image_path@/common/download.png); }
+  .portlet-journal .article-toolbar .icon-expire {
+    background-image: url(@theme_image_path@/common/time.png); }
+  .portlet-journal .article-toolbar .icon-permissions {
+    background-image: url(@theme_image_path@/common/permissions.png); }
+  .portlet-journal .article-toolbar .icon-preview {
+    background-image: url(@theme_image_path@/common/preview.png); }
+  .portlet-journal .article-toolbar .icon-history {
+    background-image: url(@theme_image_path@/common/history.png); }
+.portlet-journal .form-section h3 {
+  border-bottom: 1px solid #666; }
+.portlet-journal .journal-metadata {
+  min-height: 1.8em; }
+.portlet-journal .article-structure-template-toolbar, .portlet-journal .article-translation-toolbar {
+  color: #34404F;
+  display: block;
+  margin: 0 auto;
+  padding: 0; }
+.portlet-journal .article-structure-template-toolbar .article-structure-toolbar, .portlet-journal .article-structure-template-toolbar .article-template-toolbar {
+  display: inline;
+  margin-left: 0.5em;
+  margin-bottom: 0; }
+.portlet-journal .article-structure-template-toolbar .article-template-image {
+  max-height: 50px;
+  max-width: 50px;
+  vertical-align: middle; }
+.portlet-journal .article-translation-toolbar .add-translations-menu {
+  display: inline;
+  float: none;
+  margin-left: 2em;
+  padding: 0.4em 0; }
+  .portlet-journal .article-translation-toolbar .add-translations-menu li {
+    display: inline; }
+    .portlet-journal .article-translation-toolbar .add-translations-menu li strong {
+      display: inline; }
+.portlet-journal .article-translation-toolbar .contains-translations {
+  margin-top: 1em; }
+.portlet-journal .article-translation-toolbar {
+  padding: 1em 0 0 0; }
+.portlet-journal .journal-article-header-edit {
+  background: #FCFCFC;
+  border: solid #DDD;
+  border-width: 1px 0;
+  margin: 0 0 1em;
+  padding: 1em; }
+.portlet-journal .lfr-panel-basic .lfr-panel-title {
+  border-bottom: 1px solid #ccc;
+  float: none;
+  position: relative;
+  top: -0.5em; }
+  .portlet-journal .lfr-panel-basic .lfr-panel-title span {
+    background: #fff;
+    padding: 0 8px 0 4px;
+    position: relative;
+    top: 0.55em; }
+.portlet-journal .lfr-panel-basic .lfr-panel-content {
+  background-color: #F0F5F7;
+  padding: 10px; }
+.portlet-journal .lfr-panel-basic .lfr-tag-selector-input {
+  width: 100%; }
+.portlet-journal .lfr-app-column-view .lfr-app-column-view-content {
+  background-color: #FAFAFA; }
+.portlet-journal .journal-article-container .lfr-ddm-container .field-wrapper .field-wrapper {
+  border: 1px solid #D0D0D0;
+  border-left-width: 10px;
+  margin: 7px 0 0 5px;
+  padding: 7px 10px 10px; }
+.portlet-journal .journal-article-container ul {
+  margin: 0; }
+.portlet-journal .move-list .move-article, .portlet-journal .move-list .move-folder {
+  background: #f0faf0 url() no-repeat 5px 50%;
+  border-bottom: 1px solid #CCC;
+  display: block;
+  font-weight: bold;
+  margin-bottom: 1px;
+  padding: 5px;
+  padding-left: 25px;
+  position: relative; }
+.portlet-journal .move-list .move-article {
+  background-image: url(@theme_image_path@/file_system/small/html.png); }
+.portlet-journal .move-list .move-folder {
+  background-image: url(@theme_image_path@/common/folder.png); }
+.portlet-journal .move-list .move-error {
+  background-color: #FDD;
+  background-image: url(@theme_image_path@/messages/error.png);
+  font-weight: normal;
+  filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=60);
+  opacity: 0.6; }
+  .portlet-journal .move-list .move-error .error-message {
+    position: absolute;
+    right: 5px; }
+.portlet-journal .move-list .unstyled {
+  margin: 0; }
+.portlet-journal .journal-breadcrumb ul {
+  margin-bottom: 0; }
+.portlet-journal .move-list-info {
+  margin: 5px 0; }
+  .portlet-journal .move-list-info h4 {
+    font-size: 1.3em; }
+.portlet-journal .structure-tree {
+  list-style: none;
+  position: relative; }
+  .portlet-journal .structure-tree li {
+    position: relative; }
+  .portlet-journal .structure-tree li.structure-field.repeatable-border {
+    background: #F7FAFB; }
+  .portlet-journal .structure-tree li.structure-field.selected {
+    background: #EBFFEE;
+    border: 1px #C3E7CC solid; }
+  .portlet-journal .structure-tree li.structure-field.repeated-field .journal-article-variable-name {
+    display: none; }
+  .portlet-journal .structure-tree .placeholder {
+    display: none; }
+  .portlet-journal .structure-tree .tree-sub-placeholder {
+    margin-top: 10px; }
+  .portlet-journal .structure-tree .folder .field-container .journal-article-required-message {
+    display: none; }
+  .portlet-journal .structure-tree .folder .field-container.required-field .journal-article-required-message {
+    display: block;
+    margin: 0; }
+  .portlet-journal .structure-tree .folder-droppable {
+    clear: both; }
+  .portlet-journal .structure-tree .journal-subfield input {
+    float: left; }
+  .portlet-journal .structure-tree .journal-subfield .journal-article-field-label {
+    float: left;
+    font-weight: normal;
+    padding: 0 0 0 3px; }
+  .portlet-journal .structure-tree .journal-article-move-handler {
+    display: none; }
+  .portlet-journal .structure-tree .journal-article-localized {
+    font-size: 13px;
+    padding-top: 5px; }
+  .portlet-journal .structure-tree .structure-field .structure-field {
+    border: 1px solid #D0D0D0;
+    border-left-width: 10px;
+    margin: 7px 0 0 5px;
+    padding: 7px 10px 10px; }
+.portlet-journal .component-group .tree-placeholder {
+  display: none; }
+.portlet-journal .journal-article-localized-checkbox {
+  display: block;
+  margin-top: 10px; }
+.portlet-journal .journal-article-header-edit .journal-article-localized-checkbox {
+  margin-bottom: 10px; }
+.portlet-journal .journal-article-variable-name {
+  float: right; }
+  .portlet-journal .journal-article-variable-name .field-label {
+    font-weight: normal;
+    margin-right: 5px; }
+.portlet-journal .component-group-title {
+  font-size: 12px;
+  font-weight: bold;
+  text-decoration: underline;
+  padding: 4px 0 0; }
+.portlet-journal .journal-article-component-container {
+  margin: 3px;
+  overflow: hidden; }
+.portlet-journal .journal-component {
+  color: #0E3F6F;
+  cursor: move;
+  line-height: 25px;
+  padding-left: 30px; }
+  .portlet-journal .journal-component.dragging {
+    font-weight: bold; }
+.portlet-journal .journal-container .group-info dl {
+  margin: 0 0 0 20px; }
+  .portlet-journal .journal-container .group-info dl dt {
+    float: left;
+    margin-right: 3px; }
+.portlet-journal .journal-container .search-info {
+  background-color: #D3E8F1;
+  padding: 10px;
+  padding-right: 50px;
+  position: relative; }
+  .portlet-journal .journal-container .search-info .keywords {
+    float: none;
+    font-size: 1.4em;
+    font-weight: bold; }
+  .portlet-journal .journal-container .search-info .change-search-folder {
+    font-size: 0.8em;
+    font-weight: normal; }
+  .portlet-journal .journal-container .search-info .close-search {
+    margin-top: -8px;
+    position: absolute;
+    right: 15px;
+    top: 50%; }
+.portlet-journal .journal-container, .portlet-journal .article-entries-pagination {
+  clear: both; }
+.portlet-journal .article-entries-pagination {
+  text-align: center;
+  margin: 10px 0; }
+  .portlet-journal .article-entries-pagination .pagination-content {
+    margin: 0; }
+.portlet-journal .lfr-header-row-content {
+  padding-left: 0;
+  padding-top: 0; }
+.portlet-journal .lfr-journal-small-image-content img {
+  margin-right: 1em; }
+.portlet-journal .context-pane .context-pane-content {
+  border-left: 1px solid #7B7B7B;
+  position: relative; }
+.portlet-journal .taglib-search-iterator-page-iterator-top, .portlet-journal .taglib-search-iterator-page-iterator-bottom, .portlet-journal .paginator-container {
+  clear: both;
+  padding: 5px;
+  position: relative; }
+.portlet-journal .taglib-search-iterator-page-iterator-top.page-iterator-bottom, .portlet-journal .lfr-app-column-view .taglib-search-iterator-page-iterator-bottom {
+  bottom: 0;
+  left: 0;
+  position: absolute;
+  right: 0; }
+.portlet-journal .taglib-search-iterator {
+  table-layout: fixed; }
+  .portlet-journal .taglib-search-iterator .align-left {
+    word-wrap: break-word; }
+.portlet-journal .entry-thumbnail .taglib-workflow-status {
+  left: 6px;
+  margin: 0;
+  padding: 0;
+  position: absolute;
+  top: 4px; }
+  .portlet-journal .entry-thumbnail .taglib-workflow-status .workflow-status {
+    margin: 0;
+    padding: 0; }
+.portlet-journal .journal-article-instructions-container {
+  display: normal; }
+.portlet-journal .journal-container {
+  margin-top: 5px; }
+.portlet-journal .journal-field-template {
+  display: none; }
+.portlet-journal .journal-fieldmodel-container {
+  display: none; }
+.portlet-journal .journal-icon-button {
+  cursor: pointer; }
+.portlet-journal .portlet-section-header td {
+  background: #CFE5FF; }
+.portlet-journal .journal-form-presentation-label {
+  color: #0E3F6F;
+  padding-top: 3px; }
+.portlet-journal .journal-edit-field-control, .portlet-journal .journal-list-subfield .journal-icon-button {
+  display: none; }
+.portlet-journal .journal-icon-button span img {
+  margin-bottom: 3px; }
+.portlet-journal .journal-article-instructions-message {
+  margin: 5px 0 0 0; }
+.portlet-journal .structure-links {
+  margin-right: 0.5em; }
+.portlet-journal .taglib-workflow-status {
+  margin: 0 0 1em 0; }
+.portlet-journal .default-link {
+  font-size: 0.9em;
+  font-weight: normal; }
+.portlet-journal .journal-image-preview {
+  border: 1px dotted;
+  margin-top: 2px;
+  overflow: scroll;
+  padding: 4px;
+  width: 500px; }
+.portlet-journal .repeatable-field-image {
+  cursor: pointer;
+  position: absolute;
+  right: 10px;
+  top: 10px; }
+.portlet-journal .repeatable-field-delete {
+  display: none; }
+.portlet-journal .repeated-field .repeatable-field-delete {
+  display: inline; }
+.portlet-journal .lfr-textarea {
+  width: 350px; }
+.portlet-journal .localization-disabled .journal-article-language-options, .portlet-journal .localization-disabled .structure-field .journal-article-localized-checkbox {
+  display: none; }
+.portlet-journal .journal-structure-selection-break .journal-article-field-label, .portlet-journal .journal-structure-selection-break .journal-article-localized-checkbox, .portlet-journal .journal-structure-selection-break .journal-article-buttons {
+  display: none; }
+.portlet-journal .journal-article-buttons {
+  display: none; }
+.portlet-journal .form-navigator .article-info {
+  font-weight: bold;
+  margin-bottom: 15px; }
+  .portlet-journal .form-navigator .article-info .article-name {
+    color: #036;
+    display: block;
+    font-size: 14px; }
+  .portlet-journal .form-navigator .article-info .article-image {
+    float: left;
+    margin-right: 10px;
+    padding: 0;
+    width: 35px; }
+.portlet-journal .display-page-item-container {
+  margin-bottom: 1em;
+  margin-top: 1em; }
+  .portlet-journal .display-page-item-container .display-page-item {
+    background-color: #DEE7F8;
+    border: 1px solid #CAD8F3;
+    padding: 5px 28px 5px 11px;
+    position: relative; }
+    .portlet-journal .display-page-item-container .display-page-item .display-page-item-remove {
+      cursor: pointer;
+      display: block;
+      height: 16px;
+      overflow: hidden;
+      position: absolute;
+      right: 8px;
+      top: 3px;
+      width: 16px; }
+      .portlet-journal .display-page-item-container .display-page-item .display-page-item-remove:hover {
+        background-color: #CAD8F3; }
+.portlet-journal .display-page-toolbar {
+  margin-top: 0.5em; }
+.portlet-journal .wcm-image-preview img {
+  max-width: 600px; }
+
+.portlet-journal-edit-mode .structure-tree li {
+  background: url(@theme_image_path@/journal/form_builder_bg.png);
+  border: 1px solid #C6D9F0;
+  margin: 15px;
+  padding: 10px 10px 10px 22px; }
+  .portlet-journal-edit-mode .structure-tree li.structure-field .structure-field {
+    border-left: 10px solid #C6D9F0; }
+  .portlet-journal-edit-mode .structure-tree li.structure-field.repeated-field {
+    background: #F7FAFB;
+    border: 1px dashed #C6D9F0; }
+    .portlet-journal-edit-mode .structure-tree li.structure-field.repeated-field.selected {
+      border: 1px dashed #C3E7CC; }
+    .portlet-journal-edit-mode .structure-tree li.structure-field.repeated-field .journal-edit-field-control, .portlet-journal-edit-mode .structure-tree li.structure-field.repeated-field .journal-delete-field {
+      display: none; }
+  .portlet-journal-edit-mode .structure-tree li.structure-field.yui3-dd-draggable .journal-article-move-handler {
+    background: transparent url(@theme_image_path@/application/handle_sort_vertical.png) no-repeat scroll right 50%;
+    cursor: move;
+    display: block;
+    height: 20px;
+    left: 7px;
+    position: absolute;
+    top: 8px;
+    width: 16px;
+    z-index: 420; }
+  .portlet-journal-edit-mode .structure-tree li.structure-field .journal-article-close {
+    background: url(@theme_image_path@/journal/form_builder_close.png);
+    cursor: pointer;
+    display: block;
+    height: 29px;
+    position: absolute;
+    right: -10px;
+    top: -9px;
+    width: 29px;
+    z-index: 420; }
+  .portlet-journal-edit-mode .structure-tree li.structure-field .journal-edit-field-control {
+    display: block; }
+  .portlet-journal-edit-mode .structure-tree li.structure-field .journal-article-instructions-container {
+    display: none; }
+  .portlet-journal-edit-mode .structure-tree li.parent-structure-field {
+    background: none;
+    background-color: #FFFFE6;
+    border: 1px dotted #FFE67F;
+    padding-bottom: 30px; }
+    .portlet-journal-edit-mode .structure-tree li.parent-structure-field .journal-article-close, .portlet-journal-edit-mode .structure-tree li.parent-structure-field .journal-delete-field {
+      display: none; }
+.portlet-journal-edit-mode .structure-tree span.folder, .portlet-journal-edit-mode .structure-tree span.file {
+  display: block;
+  padding: 10px;
+  padding-top: 0; }
+.portlet-journal-edit-mode .structure-tree .placeholder, .portlet-journal-edit-mode .structure-tree .tree-placeholder, .portlet-journal-edit-mode .structure-tree .tree-sub-placeholder {
+  background: #fff;
+  border: 1px #cdcdcd dashed;
+  height: 100px;
+  filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=75);
+  opacity: 0.75; }
+.portlet-journal-edit-mode .structure-tree li {
+  margin: 10px;
+  padding-top: 5px;
+  position: relative; }
+.portlet-journal-edit-mode .repeatable-field-delete {
+  display: inline; }
+.portlet-journal-edit-mode .journal-article-buttons {
+  display: block;
+  margin-top: 18px;
+  text-align: right; }
+  .portlet-journal-edit-mode .journal-article-buttons .edit-button, .portlet-journal-edit-mode .journal-article-buttons .repeatable-button {
+    float: left;
+    margin-left: 3px; }
+  .portlet-journal-edit-mode .journal-article-buttons:after {
+    clear: both;
+    content: ".";
+    display: block;
+    height: 0;
+    visibility: hidden; }
+.portlet-journal-edit-mode .journal-list-subfield .journal-icon-button {
+  display: inline; }
+.portlet-journal-edit-mode .portlet-journal .structure-field .journal-article-localized-checkbox {
+  display: none; }
+.portlet-journal-edit-mode .journal-article-header-edit {
+  width: 100%; }
+.portlet-journal-edit-mode .taglib-form-navigator .form-section.selected {
+  width: 100%; }
+.portlet-journal-edit-mode .taglib-form-navigator .form-navigator, .portlet-journal-edit-mode .article-translation-toolbar, .portlet-journal-edit-mode .journal-article-general-fields, .portlet-journal-edit-mode .article-toolbar {
+  display: none; }
+
+.display-page-dialog .tree-label a {
+  color: black; }
+.display-page-dialog .tree-label .layout-page-invalid {
+  color: #AAA;
+  font-style: italic; }
+.display-page-dialog .selected-page-message {
+  margin: 5px 0; }
+
+.ie .journal-article-edit-field-wrapper form {
+  width: auto; }
+.ie .journal-article-helper .not-intersecting .forbidden-action {
+  right: 2px;
+  top: 2px; }
+.ie .portlet-journal .structure-tree li {
+  zoom: 1; }
+
+.journal-component {
+  background: transparent url() no-repeat scroll 3px 3px; }
+
+.journal-component-text {
+  background-image: url(@theme_image_path@/journal/text_field.png);
+  background-position: 3px 9px; }
+
+.journal-component-textbox {
+  background-image: url(@theme_image_path@/journal/textbox.png);
+  background-position: 3px 6px; }
+
+.journal-component-textarea {
+  background-image: url(@theme_image_path@/journal/textarea.png);
+  background-position: 3px 4px; }
+
+.journal-component-image {
+  background-image: url(@theme_image_path@/journal/image_uploader.png);
+  background-position: 3px 7px; }
+
+.journal-component-documentlibrary {
+  background-image: url(@theme_image_path@/journal/document_library.png); }
+
+.journal-component-boolean {
+  background-image: url(@theme_image_path@/journal/checkbox.png);
+  background-position: 3px 7px; }
+
+.journal-component-options {
+  background-image: url(@theme_image_path@/journal/options.png);
+  background-position: 3px 5px; }
+
+.journal-component-list {
+  background-image: url(@theme_image_path@/journal/selectbox.png);
+  background-position: 3px 9px; }
+
+.journal-component-multilist {
+  background-image: url(@theme_image_path@/journal/multiselection_list.png);
+  background-position: 3px 4px; }
+
+.journal-component-linktolayout {
+  background-image: url(@theme_image_path@/journal/link_to_page.png);
+  background-position: 3px 9px; }
+
+.journal-component-formgroup {
+  background-image: url(@theme_image_path@/journal/form_group.png);
+  background-position: 3px 5px; }
+
+.journal-component-selectionbreak {
+  background-image: url(@theme_image_path@/journal/selection_break.png);
+  background-position: 3px 12px; }
+
+.component-group.form-controls {
+  border-top: 1px solid #E0ECFF; }
+.component-group .component-dragging {
+  background-color: #fff !important; }
+
+.journal-article-helper {
+  background: #dedede;
+  border: 1px #555 dashed;
+  cursor: move;
+  filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
+  opacity: 0.8;
+  position: absolute;
+  visibility: hidden;
+  width: 100px; }
+  .journal-article-helper.draggable-dragging {
+    font-size: 15px; }
+  .journal-article-helper.not-intersecting .forbidden-action {
+    background: url(@theme_image_path@/application/forbidden_action.png) no-repeat;
+    height: 32px;
+    position: absolute;
+    right: -15px;
+    top: -15px;
+    width: 32px; }
+  .journal-article-helper .journal-component {
+    height: 25px;
+    line-height: 25px;
+    margin-left: 5px;
+    padding-left: 25px; }
+
+.journal-article-edit-field-wrapper.overlaycontextpanel {
+  margin: 0 13px 0 0;
+  padding: 0;
+  position: relative; }
+.journal-article-edit-field-wrapper.overlaycontextpanel-container, .journal-article-edit-field-wrapper .overlaycontextpanel-container {
+  background-color: #EBFFEE;
+  border-color: #C3E7CC; }
+.journal-article-edit-field-wrapper.overlaycontextpanel-arrow-tl .overlaycontextpanel-pointer-inner {
+  border-bottom: 10px solid #EBFFEE; }
+.journal-article-edit-field-wrapper .container-close {
+  display: none; }
+
+.journal-article-edit-field {
+  padding: 5px;
+  position: relative;
+  width: 180px;
+  z-index: 420; }
+  .journal-article-edit-field .field {
+    padding: 0; }
+    .journal-article-edit-field .field .textarea {
+      height: 6em; }
+  .journal-article-edit-field strong {
+    font-size: 14px;
+    text-decoration: underline; }
+  .journal-article-edit-field .journal-edit-label {
+    margin-top: 10px; }
+
+.journal-article-edit-field-wrapper .cancel-button, .journal-article-edit-field-wrapper .save-button {
+  display: none; }
+.journal-article-edit-field-wrapper.save-mode .close-button {
+  display: none; }
+.journal-article-edit-field-wrapper.save-mode .save-button, .journal-article-edit-field-wrapper.save-mode .cancel-button {
+  display: inline; }
+.journal-article-edit-field-wrapper .user-instructions {
+  border-width: 0;
+  padding: 0;
+  margin-bottom: 1em; }
+.journal-article-edit-field-wrapper .button-holder {
+  margin-top: 1.5em; }
+
+.structure-message {
+  margin-top: 5px; }
+
+.save-structure-template-dialog textarea {
+  height: 150px;
+  width: 450px; }
+
+.save-structure-name {
+  width: 470px; }
+
+.save-structure-description {
+  height: 150px;
+  width: 470px; }
+
+.journal-template-error .scroll-pane {
+  border: 1px solid #BFBFBF;
+  max-height: 200px;
+  min-height: 50px;
+  overflow: auto;
+  width: 100%; }
+  .journal-template-error .scroll-pane .inner-scroll-pane {
+    min-width: 104%; }
+  .journal-template-error .scroll-pane .error-line {
+    background: #fdd; }
+  .journal-template-error .scroll-pane pre {
+    margin: 0;
+    white-space: pre; }
+    .journal-template-error .scroll-pane pre span {
+      background: #B5BFC4;
+      border-right: 1px solid #BFBFBF;
+      display: block;
+      float: left;
+      margin-right: 4px;
+      padding-right: 4px;
+      text-align: right;
+      width: 40px; }
+
+.active-area-proxy {
+  background: lightyellow url(@theme_image_path@/portlet/pop_up.png) no-repeat 10px 50%;
+  font-size: 1.2em;
+  padding: 0.3em 0.3em 0.3em 2em; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/css/main.css
new file mode 100644
index 0000000..b94ff58
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/css/main.css
@@ -0,0 +1,977 @@
+@import "compass";
+
+.journal-article-component-list {
+	margin: 10px 0 0 0;
+}
+
+.portlet-journal {
+	.add-article-selector {
+		display: inline-block;
+		vertical-align: top;
+
+		.lfr-meta-actions {
+			padding-top: 0;
+		}
+	}
+
+	.add-permission-button-row {
+		float: left;
+	}
+
+	.article-separator {
+		clear: both;
+	}
+
+	.article-toolbar {
+		margin-bottom: 1em;
+
+		.icon-delete {
+			background-image: url(@theme_image_path@/common/delete.png);
+		}
+
+		.icon-download {
+			background-image: url(@theme_image_path@/common/download.png);
+		}
+
+		.icon-expire {
+			background-image: url(@theme_image_path@/common/time.png);
+		}
+
+		.icon-permissions {
+			background-image: url(@theme_image_path@/common/permissions.png);
+		}
+
+		.icon-preview {
+			background-image: url(@theme_image_path@/common/preview.png);
+		}
+
+		.icon-history {
+			background-image: url(@theme_image_path@/common/history.png);
+		}
+	}
+
+	.form-section h3 {
+		border-bottom: 1px solid #666;
+	}
+
+	.journal-metadata {
+		min-height: 1.8em;
+	}
+
+	.article-structure-template-toolbar, .article-translation-toolbar {
+		color: #34404F;
+		display: block;
+		margin: 0 auto;
+		padding: 0;
+	}
+
+	.article-structure-template-toolbar {
+		.article-structure-toolbar, .article-template-toolbar {
+			display: inline;
+			margin-left: 0.5em;
+			margin-bottom: 0;
+		}
+
+		.article-template-image {
+			max-height: 50px;
+			max-width: 50px;
+			vertical-align: middle;
+		}
+	}
+
+	.article-translation-toolbar {
+		.add-translations-menu {
+			display: inline;
+			float: none;
+			margin-left: 2em;
+			padding: 0.4em 0;
+
+			li {
+				display: inline;
+
+				strong {
+					display: inline;
+				}
+			}
+		}
+
+		.contains-translations {
+			margin-top: 1em;
+		}
+	}
+
+	.article-translation-toolbar {
+		padding: 1em 0 0 0;
+	}
+
+	.journal-article-header-edit {
+		background: #FCFCFC;
+		border: solid #DDD;
+		border-width: 1px 0;
+		margin: 0 0 1em;
+		padding: 1em;
+	}
+
+	.lfr-panel-basic {
+		.lfr-panel-title {
+			border-bottom: 1px solid #ccc;
+			float: none;
+			position: relative;
+			top: -0.5em;
+
+			span {
+				background: #fff;
+				padding: 0 8px 0 4px;
+				position: relative;
+				top: 0.55em;
+			}
+		}
+
+		.lfr-panel-content {
+			background-color: #F0F5F7;
+			padding: 10px;
+		}
+
+		.lfr-tag-selector-input {
+			width: 100%;
+		}
+	}
+
+	.lfr-app-column-view .lfr-app-column-view-content {
+		background-color: #FAFAFA;
+	}
+
+	.journal-article-container {
+		.lfr-ddm-container .field-wrapper .field-wrapper {
+			border: 1px solid #D0D0D0;
+			border-left-width: 10px;
+			margin: 7px 0 0 5px;
+			padding: 7px 10px 10px;
+		}
+
+		ul {
+			margin: 0;
+		}
+	}
+
+	.move-list {
+		.move-article, .move-folder {
+			background: #F0FAF0 url() no-repeat 5px 50%;
+			border-bottom: 1px solid #CCC;
+			display: block;
+			font-weight: bold;
+			margin-bottom: 1px;
+			padding: 5px;
+			padding-left: 25px;
+			position: relative;
+		}
+
+		.move-article {
+			background-image: url(@theme_image_path@/file_system/small/html.png);
+		}
+
+		.move-folder {
+			background-image: url(@theme_image_path@/common/folder.png);
+		}
+
+		.move-error {
+			background-color: #FDD;
+			background-image: url(@theme_image_path@/messages/error.png);
+			font-weight: normal;
+
+			@include opacity(0.6);
+
+			.error-message {
+				position: absolute;
+				right: 5px;
+			}
+		}
+
+		.unstyled {
+			margin: 0;
+		}
+	}
+
+	.journal-breadcrumb ul {
+		margin-bottom: 0;
+	}
+
+	.move-list-info {
+		margin: 5px 0;
+
+		h4 {
+			font-size: 1.3em;
+		}
+	}
+
+	.structure-tree {
+		list-style: none;
+		position: relative;
+
+		li {
+			position: relative;
+		}
+
+		li.structure-field {
+			&.repeatable-border {
+				background: #F7FAFB;
+			}
+
+			&.selected {
+				background: #EBFFEE;
+				border: 1px #C3E7CC solid;
+			}
+
+			&.repeated-field .journal-article-variable-name {
+				display: none;
+			}
+		}
+
+		.placeholder {
+			display: none;
+		}
+
+		.tree-sub-placeholder {
+			margin-top: 10px;
+		}
+
+		.folder .field-container .journal-article-required-message {
+			display: none;
+		}
+
+		.folder .field-container.required-field .journal-article-required-message {
+			display: block;
+			margin: 0;
+		}
+
+		.folder-droppable {
+			clear: both;
+		}
+
+		.journal-subfield input {
+			float: left;
+		}
+
+		.journal-subfield .journal-article-field-label {
+			float: left;
+			font-weight: normal;
+			padding: 0 0 0 3px;
+		}
+
+		.journal-article-move-handler {
+			display: none;
+		}
+
+		.journal-article-localized {
+			font-size: 13px;
+			padding-top: 5px;
+		}
+
+		.structure-field .structure-field {
+			border: 1px solid #D0D0D0;
+			border-left-width: 10px;
+			margin: 7px 0 0 5px;
+			padding: 7px 10px 10px;
+		}
+	}
+
+	.component-group .tree-placeholder {
+		display: none;
+	}
+
+	.journal-article-localized-checkbox {
+		display: block;
+		margin-top: 10px;
+	}
+
+	.journal-article-header-edit .journal-article-localized-checkbox {
+		margin-bottom: 10px;
+	}
+
+	.journal-article-variable-name {
+		float: right;
+
+		.field-label {
+			font-weight: normal;
+			margin-right: 5px;
+		}
+	}
+
+	.component-group-title {
+		font-size: 12px;
+		font-weight: bold;
+		text-decoration: underline;
+		padding: 4px 0 0;
+	}
+
+	.journal-article-component-container {
+		margin: 3px;
+		overflow: hidden;
+	}
+
+	.journal-component {
+		color: #0E3F6F;
+		cursor: move;
+		line-height: 25px;
+		padding-left: 30px;
+
+		&.dragging {
+			font-weight: bold;
+		}
+	}
+
+	.journal-container {
+		.group-info {
+			dl {
+				margin: 0 0 0 20px;
+
+				dt {
+					float: left;
+					margin-right: 3px;
+				}
+			}
+		}
+
+		.search-info {
+			background-color: #D3E8F1;
+			padding: 10px;
+			padding-right: 50px;
+			position: relative;
+
+			.keywords {
+				float: none;
+				font-size: 1.4em;
+				font-weight: bold;
+			}
+
+			.change-search-folder {
+				font-size: 0.8em;
+				font-weight: normal;
+			}
+
+			.close-search {
+				margin-top: -8px;
+				position: absolute;
+				right: 15px;
+				top: 50%;
+			}
+		}
+	}
+
+	.journal-container, .article-entries-pagination {
+		clear: both;
+	}
+
+	.article-entries-pagination {
+		text-align: center;
+		margin: 10px 0;
+
+		.pagination-content {
+			margin: 0;
+		}
+	}
+
+	.lfr-header-row-content {
+		padding-left: 0;
+		padding-top: 0;
+	}
+
+	.lfr-journal-small-image-content img {
+		margin-right: 1em;
+	}
+
+	.context-pane .context-pane-content {
+		border-left: 1px solid #7B7B7B;
+		position: relative;
+	}
+
+	.taglib-search-iterator-page-iterator-top, .taglib-search-iterator-page-iterator-bottom, .paginator-container {
+		clear: both;
+		padding: 5px;
+		position: relative;
+	}
+
+	.taglib-search-iterator-page-iterator-top.page-iterator-bottom, .lfr-app-column-view .taglib-search-iterator-page-iterator-bottom {
+		bottom: 0;
+		left: 0;
+		position: absolute;
+		right: 0;
+	}
+
+	.taglib-search-iterator {
+		table-layout: fixed;
+
+		.align-left {
+			word-wrap: break-word;
+		}
+	}
+
+	.entry-thumbnail .taglib-workflow-status {
+		left: 6px;
+		margin: 0;
+		padding: 0;
+		position: absolute;
+		top: 4px;
+
+		.workflow-status {
+			margin: 0;
+			padding: 0;
+		}
+	}
+
+	.journal-article-instructions-container {
+		display: normal;
+	}
+
+	.journal-container {
+		margin-top: 5px;
+	}
+
+	.journal-field-template {
+		display: none;
+	}
+
+	.journal-fieldmodel-container {
+		display: none;
+	}
+
+	.journal-icon-button {
+		cursor: pointer;
+	}
+
+	.portlet-section-header td {
+		background: #CFE5FF;
+	}
+
+	.journal-form-presentation-label {
+		color: #0E3F6F;
+		padding-top: 3px;
+	}
+
+	.journal-edit-field-control, .journal-list-subfield .journal-icon-button {
+		display: none;
+	}
+
+	.journal-icon-button span img {
+		margin-bottom: 3px;
+	}
+
+	.journal-article-instructions-message {
+		margin: 5px 0 0 0;
+	}
+
+	.structure-links {
+		margin-right: 0.5em;
+	}
+
+	.taglib-workflow-status {
+		margin: 0 0 1em 0;
+	}
+
+	.default-link {
+		font-size: 0.9em;
+		font-weight: normal;
+	}
+
+	.journal-image-preview {
+		border: 1px dotted;
+		margin-top: 2px;
+		overflow: scroll;
+		padding: 4px;
+		width: 500px;
+	}
+
+	.repeatable-field-image {
+		cursor: pointer;
+		position: absolute;
+		right: 10px;
+		top: 10px;
+	}
+
+	.repeatable-field-delete {
+		display: none;
+	}
+
+	.repeated-field .repeatable-field-delete {
+		display: inline;
+	}
+
+	.lfr-textarea {
+		width: 350px;
+	}
+
+	.localization-disabled {
+		.journal-article-language-options, .structure-field .journal-article-localized-checkbox {
+			display: none;
+		}
+	}
+
+	.journal-structure-selection-break {
+		.journal-article-field-label, .journal-article-localized-checkbox, .journal-article-buttons {
+			display: none;
+		}
+	}
+
+	.journal-article-buttons {
+		display: none;
+	}
+
+	.form-navigator {
+		.article-info {
+			font-weight: bold;
+			margin-bottom: 15px;
+
+			.article-name {
+				color: #036;
+				display: block;
+				font-size: 14px;
+			}
+
+			.article-image {
+				float: left;
+				margin-right: 10px;
+				padding: 0;
+				width: 35px;
+			}
+		}
+	}
+
+	.display-page-item-container {
+		margin-bottom: 1em;
+		margin-top: 1em;
+
+		.display-page-item {
+			background-color: #DEE7F8;
+			border: 1px solid #CAD8F3;
+			padding: 5px 28px 5px 11px;
+			position: relative;
+
+			.display-page-item-remove {
+				cursor: pointer;
+				display: block;
+				height: 16px;
+				overflow: hidden;
+				position: absolute;
+				right: 8px;
+				top: 3px;
+				width: 16px;
+
+				&:hover {
+					background-color: #CAD8F3;
+				}
+			}
+		}
+	}
+
+	.display-page-toolbar {
+		margin-top: 0.5em;
+	}
+
+	.wcm-image-preview img {
+		max-width: 600px;
+	}
+}
+
+.portlet-journal-edit-mode {
+	.structure-tree {
+		li {
+			background: url(@theme_image_path@/journal/form_builder_bg.png);
+			border: 1px solid #C6D9F0;
+			margin: 15px;
+			padding: 10px 10px 10px 22px;
+
+			&.structure-field {
+				.structure-field {
+					border-left: 10px solid #C6D9F0;
+				}
+
+				&.repeated-field {
+					background: #F7FAFB;
+					border: 1px dashed #C6D9F0;
+
+					&.selected {
+						border: 1px dashed #C3E7CC;
+					}
+
+					.journal-edit-field-control, .journal-delete-field {
+						display: none;
+					}
+				}
+
+				&.yui3-dd-draggable .journal-article-move-handler {
+					background: transparent url(@theme_image_path@/application/handle_sort_vertical.png) no-repeat scroll right 50%;
+					cursor: move;
+					display: block;
+					height: 20px;
+					left: 7px;
+					position: absolute;
+					top: 8px;
+					width: 16px;
+					z-index: 420;
+				}
+
+				.journal-article-close {
+					background: url(@theme_image_path@/journal/form_builder_close.png);
+					cursor: pointer;
+					display: block;
+					height: 29px;
+					position: absolute;
+					right: -10px;
+					top: -9px;
+					width: 29px;
+					z-index: 420;
+				}
+
+				.journal-edit-field-control {
+					display: block;
+				}
+
+				.journal-article-instructions-container {
+					display: none;
+				}
+			}
+
+			&.parent-structure-field {
+				background: none;
+				background-color: #FFFFE6;
+				border: 1px dotted #FFE67F;
+				padding-bottom: 30px;
+
+				.journal-article-close, .journal-delete-field {
+					display: none;
+				}
+			}
+		}
+
+		span.folder, span.file {
+			display: block;
+			padding: 10px;
+			padding-top: 0;
+		}
+
+		.placeholder, .tree-placeholder, .tree-sub-placeholder {
+			background: #fff;
+			border: 1px #cdcdcd dashed;
+			height: 100px;
+
+			@include opacity(0.75);
+		}
+
+		li {
+			margin: 10px;
+			padding-top: 5px;
+			position: relative;
+		}
+	}
+
+	.repeatable-field-delete {
+		display: inline;
+	}
+
+	.journal-article-buttons {
+		display: block;
+		margin-top: 18px;
+		text-align: right;
+
+		.edit-button, .repeatable-button {
+			float: left;
+			margin-left: 3px;
+		}
+
+		&:after {
+			clear: both;
+			content: ".";
+			display: block;
+			height: 0;
+			visibility: hidden;
+		}
+	}
+
+	.journal-list-subfield .journal-icon-button {
+		display: inline;
+	}
+
+	.portlet-journal .structure-field .journal-article-localized-checkbox {
+		display: none;
+	}
+
+	.journal-article-header-edit {
+		width: 100%;
+	}
+
+	.taglib-form-navigator .form-section.selected {
+		width: 100%;
+	}
+
+	.taglib-form-navigator .form-navigator, .article-translation-toolbar, .journal-article-general-fields, .article-toolbar {
+		display: none;
+	}
+}
+
+.display-page-dialog {
+	.tree-label {
+		a {
+			color: black;
+		}
+
+		.layout-page-invalid {
+			color: #AAA;
+			font-style: italic;
+		}
+	}
+
+	.selected-page-message {
+		margin: 5px 0;
+	}
+}
+
+.ie {
+	.journal-article-edit-field-wrapper form {
+		width: auto;
+	}
+
+	.journal-article-helper .not-intersecting .forbidden-action {
+		right: 2px;
+		top: 2px;
+	}
+
+	.portlet-journal {
+		.structure-tree li {
+			zoom: 1;
+		}
+	}
+}
+
+.journal-component {
+	background: transparent url() no-repeat scroll 3px 3px;
+}
+
+.journal-component-text {
+	background-image: url(@theme_image_path@/journal/text_field.png);
+	background-position: 3px 9px;
+}
+
+.journal-component-textbox {
+	background-image: url(@theme_image_path@/journal/textbox.png);
+	background-position: 3px 6px;
+}
+
+.journal-component-textarea {
+	background-image: url(@theme_image_path@/journal/textarea.png);
+	background-position: 3px 4px;
+}
+
+.journal-component-image {
+	background-image: url(@theme_image_path@/journal/image_uploader.png);
+	background-position: 3px 7px;
+}
+
+.journal-component-documentlibrary {
+	background-image: url(@theme_image_path@/journal/document_library.png);
+}
+
+.journal-component-boolean {
+	background-image: url(@theme_image_path@/journal/checkbox.png);
+	background-position: 3px 7px;
+}
+
+.journal-component-options {
+	background-image: url(@theme_image_path@/journal/options.png);
+	background-position: 3px 5px;
+}
+
+.journal-component-list {
+	background-image: url(@theme_image_path@/journal/selectbox.png);
+	background-position: 3px 9px;
+}
+
+.journal-component-multilist {
+	background-image: url(@theme_image_path@/journal/multiselection_list.png);
+	background-position: 3px 4px;
+}
+
+.journal-component-linktolayout {
+	background-image: url(@theme_image_path@/journal/link_to_page.png);
+	background-position: 3px 9px;
+}
+
+.journal-component-formgroup {
+	background-image: url(@theme_image_path@/journal/form_group.png);
+	background-position: 3px 5px;
+}
+
+.journal-component-selectionbreak {
+	background-image: url(@theme_image_path@/journal/selection_break.png);
+	background-position: 3px 12px;
+}
+
+.component-group {
+	&.form-controls {
+		border-top: 1px solid #E0ECFF;
+	}
+
+	.component-dragging {
+		background-color: #fff !important;
+	}
+}
+
+.journal-article-helper {
+	background: #dedede;
+	border: 1px #555 dashed;
+	cursor: move;
+
+	@include opacity(0.8);
+
+	position: absolute;
+	visibility: hidden;
+	width: 100px;
+
+	&.draggable-dragging {
+		font-size: 15px;
+	}
+
+	&.not-intersecting .forbidden-action {
+		background: url(@theme_image_path@/application/forbidden_action.png) no-repeat;
+		height: 32px;
+		position: absolute;
+		right: -15px;
+		top: -15px;
+		width: 32px;
+	}
+
+	.journal-component {
+		height: 25px;
+		line-height: 25px;
+		margin-left: 5px;
+		padding-left: 25px;
+	}
+}
+
+.journal-article-edit-field-wrapper {
+	&.overlaycontextpanel {
+		margin: 0 13px 0 0;
+		padding: 0;
+		position: relative;
+	}
+
+	&.overlaycontextpanel-container, .overlaycontextpanel-container {
+		background-color: #EBFFEE;
+		border-color: #C3E7CC;
+	}
+
+	&.overlaycontextpanel-arrow-tl .overlaycontextpanel-pointer-inner {
+		border-bottom: 10px solid #EBFFEE;
+	}
+
+	.container-close {
+		display: none;
+	}
+}
+
+.journal-article-edit-field {
+	padding: 5px;
+	position: relative;
+	width: 180px;
+	z-index: 420;
+
+	.field {
+		padding: 0;
+
+		.textarea {
+			height: 6em;
+		}
+	}
+
+	strong {
+		font-size: 14px;
+		text-decoration: underline;
+	}
+
+	.journal-edit-label {
+		margin-top: 10px;
+	}
+}
+
+.journal-article-edit-field-wrapper {
+	.cancel-button, .save-button {
+		display: none;
+	}
+
+	&.save-mode {
+		.close-button {
+			display: none;
+		}
+
+		.save-button, .cancel-button {
+			display: inline;
+		}
+	}
+
+	.user-instructions {
+		border-width: 0;
+		padding: 0;
+		margin-bottom: 1em;
+	}
+
+	.button-holder {
+		margin-top: 1.5em;
+	}
+}
+
+.structure-message {
+	margin-top: 5px;
+}
+
+.save-structure-template-dialog textarea {
+	height: 150px;
+	width: 450px;
+}
+
+.save-structure-name {
+	width: 470px;
+}
+
+.save-structure-description {
+	height: 150px;
+	width: 470px;
+}
+
+.journal-template-error {
+	.scroll-pane {
+		border: 1px solid #BFBFBF;
+		max-height: 200px;
+		min-height: 50px;
+		overflow: auto;
+		width: 100%;
+
+		.inner-scroll-pane {
+			min-width: 104%;
+		}
+
+		.error-line {
+			background: #fdd;
+		}
+
+		pre {
+			margin: 0;
+			white-space: pre;
+
+			span {
+				background: #B5BFC4;
+				border-right: 1px solid #BFBFBF;
+				display: block;
+				float: left;
+				margin-right: 4px;
+				padding-right: 4px;
+				text-align: right;
+				width: 40px;
+			}
+		}
+	}
+}
+
+.active-area-proxy {
+	background: #FFFFE0 url(@theme_image_path@/portlet/pop_up.png) no-repeat 10px 50%;
+	font-size: 1.2em;
+	padding: 0.3em 0.3em 0.3em 2em;
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/display_style_buttons.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/display_style_buttons.jsp
new file mode 100644
index 0000000..dfedf61
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/display_style_buttons.jsp
@@ -0,0 +1,61 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+String navigation = ParamUtil.getString(request, "navigation", "home");
+
+long folderId = GetterUtil.getLong((String)request.getAttribute("view.jsp-folderId"));
+
+String structureId = ParamUtil.getString(request, "structureId");
+
+String displayStyle = ParamUtil.getString(request, "displayStyle");
+
+if (Validator.isNull(displayStyle)) {
+	displayStyle = portalPreferences.getValue(PortletKeys.JOURNAL, "display-style", PropsValues.JOURNAL_DEFAULT_DISPLAY_VIEW);
+}
+
+String keywords = ParamUtil.getString(request, "keywords");
+
+Map<String, String> requestParams = new HashMap<String, String>();
+
+requestParams.put("struts_action", Validator.isNull(keywords) ? "/journal/view" : "/journal/search");
+requestParams.put("navigation", HtmlUtil.escapeJS(navigation));
+requestParams.put("folderId", String.valueOf(folderId));
+requestParams.put("searchType", String.valueOf(JournalSearchConstants.FRAGMENT));
+requestParams.put("viewEntriesPage", Boolean.FALSE.toString());
+requestParams.put("viewFolders", Boolean.FALSE.toString());
+
+if (Validator.isNull(keywords)) {
+	requestParams.put("viewEntries", Boolean.TRUE.toString());
+}
+else {
+	requestParams.put("keywords", HtmlUtil.escapeJS(keywords));
+	requestParams.put("searchFolderId", String.valueOf(folderId));
+	requestParams.put("viewEntries", Boolean.FALSE.toString());
+}
+
+if (!structureId.equals("0")) {
+	requestParams.put("structureId", structureId);
+}
+%>
+
+<liferay-ui:app-view-display-style
+	displayStyle="<%= displayStyle %>"
+	displayStyles="<%= displayViews %>"
+	requestParams="<%= requestParams %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/edit_article.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/edit_article.jsp
new file mode 100644
index 0000000..f309e8d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/edit_article.jsp
@@ -0,0 +1,412 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+String cmd = ParamUtil.getString(request, Constants.CMD);
+
+String tabs2 = ParamUtil.getString(request, "tabs2");
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+// Make sure the redirect is correct. This is a workaround for a layout that
+// has both the Journal and Journal Content portlets and the user edits an
+// article through the Journal Content portlet and then hits cancel.
+
+/*if (redirect.indexOf("p_p_id=" + PortletKeys.JOURNAL_CONTENT) != -1) {
+	if (layoutTypePortlet.hasPortletId(PortletKeys.JOURNAL)) {
+		PortletURL portletURL = renderResponse.createRenderURL();
+
+		portletURL.setPortletMode(PortletMode.VIEW);
+		portletURL.setWindowState(WindowState.NORMAL);
+
+		redirect = portletURL.toString();
+	}
+}*/
+
+String backURL = ParamUtil.getString(request, "backURL");
+
+String portletResource = ParamUtil.getString(request, "portletResource");
+
+String referringPortletResource = ParamUtil.getString(request, "referringPortletResource");
+
+JournalArticle article = (JournalArticle)request.getAttribute(WebKeys.JOURNAL_ARTICLE);
+
+long groupId = BeanParamUtil.getLong(article, request, "groupId", scopeGroupId);
+
+long folderId = ParamUtil.getLong(request, "folderId", JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID);
+
+long classNameId = BeanParamUtil.getLong(article, request, "classNameId");
+long classPK = BeanParamUtil.getLong(article, request, "classPK");
+
+String articleId = BeanParamUtil.getString(article, request, "articleId");
+
+double version = BeanParamUtil.getDouble(article, request, "version", JournalArticleConstants.VERSION_DEFAULT);
+
+String structureId = BeanParamUtil.getString(article, request, "structureId");
+
+DDMStructure ddmStructure = null;
+
+long ddmStructureId = ParamUtil.getLong(request, "ddmStructureId");
+
+if (ddmStructureId > 0) {
+	try {
+		ddmStructure = DDMStructureLocalServiceUtil.getStructure(ddmStructureId);
+	}
+	catch (NoSuchStructureException nsse) {
+	}
+}
+else if (Validator.isNotNull(structureId)) {
+	try {
+		ddmStructure = DDMStructureLocalServiceUtil.getStructure(themeDisplay.getSiteGroupId(), PortalUtil.getClassNameId(JournalArticle.class), structureId, true);
+	}
+	catch (NoSuchStructureException nsse) {
+	}
+}
+
+String templateId = BeanParamUtil.getString(article, request, "templateId");
+
+DDMTemplate ddmTemplate = null;
+
+long ddmTemplateId = ParamUtil.getLong(request, "ddmTemplateId");
+
+if (ddmTemplateId > 0) {
+	try {
+		ddmTemplate = DDMTemplateLocalServiceUtil.getTemplate(ddmTemplateId);
+	}
+	catch (NoSuchTemplateException nste) {
+	}
+}
+else if (Validator.isNotNull(templateId)) {
+	try {
+		ddmTemplate = DDMTemplateLocalServiceUtil.getTemplate(groupId, PortalUtil.getClassNameId(DDMStructure.class), templateId, true);
+	}
+	catch (NoSuchStructureException nste) {
+	}
+}
+
+String defaultLanguageId = ParamUtil.getString(request, "defaultLanguageId");
+
+String toLanguageId = ParamUtil.getString(request, "toLanguageId");
+
+if (Validator.isNull(defaultLanguageId) || !LanguageUtil.isAvailableLocale(themeDisplay.getSiteGroupId(), defaultLanguageId)) {
+	if (article != null) {
+		defaultLanguageId = article.getDefaultLanguageId();
+	}
+	else {
+		defaultLanguageId = LocaleUtil.toLanguageId(themeDisplay.getSiteDefaultLocale());
+	}
+}
+
+boolean showHeader = ParamUtil.getBoolean(request, "showHeader", true);
+
+String[] mainSections = PropsValues.JOURNAL_ARTICLE_FORM_ADD;
+
+if (Validator.isNotNull(toLanguageId)) {
+	mainSections = PropsValues.JOURNAL_ARTICLE_FORM_TRANSLATE;
+}
+else if ((article != null) && (article.getId() > 0)) {
+	mainSections = PropsValues.JOURNAL_ARTICLE_FORM_UPDATE;
+}
+else if (classNameId > JournalArticleConstants.CLASSNAME_ID_DEFAULT) {
+	mainSections = PropsValues.JOURNAL_ARTICLE_FORM_DEFAULT_VALUES;
+}
+
+String[][] categorySections = {mainSections};
+
+request.setAttribute("edit_article.jsp-redirect", redirect);
+
+request.setAttribute("edit_article.jsp-structure", ddmStructure);
+request.setAttribute("edit_article.jsp-template", ddmTemplate);
+
+request.setAttribute("edit_article.jsp-defaultLanguageId", defaultLanguageId);
+request.setAttribute("edit_article.jsp-toLanguageId", toLanguageId);
+%>
+
+<div class="article-form <%= ((article != null) && !article.isNew()) ? "article-form-edit" : "article-form-add" %>">
+	<c:if test="<%= showHeader %>">
+		<liferay-util:include page="/html/portlet/journal/article_header.jsp" />
+	</c:if>
+
+	<aui:form enctype="multipart/form-data" method="post" name="fm2">
+		<input name="groupId" type="hidden" value="" />
+		<input name="articleId" type="hidden" value="" />
+		<input name="version" type="hidden" value="" />
+		<input name="title" type="hidden" value="" />
+		<input name="xml" type="hidden" value="" />
+	</aui:form>
+
+	<portlet:actionURL var="editArticleActionURL" windowState="<%= WindowState.MAXIMIZED.toString() %>">
+		<portlet:param name="struts_action" value="/journal/edit_article" />
+	</portlet:actionURL>
+
+	<portlet:renderURL var="editArticleRenderURL" windowState="<%= WindowState.MAXIMIZED.toString() %>">
+		<portlet:param name="struts_action" value="/journal/edit_article" />
+	</portlet:renderURL>
+
+	<aui:form action="<%= editArticleActionURL %>" cssClass="lfr-dynamic-form" enctype="multipart/form-data" method="post" name="fm1" onSubmit='<%= renderResponse.getNamespace() + "submitForm(event);" %>'>
+		<aui:input name="<%= Constants.CMD %>" type="hidden" />
+		<aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
+		<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+		<aui:input name="backURL" type="hidden" value="<%= backURL %>" />
+		<aui:input name="portletResource" type="hidden" value="<%= portletResource %>" />
+		<aui:input name="referringPortletResource" type="hidden" value="<%= referringPortletResource %>" />
+		<aui:input name="groupId" type="hidden" value="<%= groupId %>" />
+		<aui:input name="privateLayout" type="hidden" value="<%= layout.isPrivateLayout() %>" />
+		<aui:input name="folderId" type="hidden" value="<%= folderId %>" />
+		<aui:input name="classNameId" type="hidden" value="<%= classNameId %>" />
+		<aui:input name="classPK" type="hidden" value="<%= classPK %>" />
+		<aui:input name="articleId" type="hidden" value="<%= articleId %>" />
+		<aui:input name="articleIds" type="hidden" value="<%= articleId + EditArticleAction.VERSION_SEPARATOR + version %>" />
+		<aui:input name="version" type="hidden" value="<%= ((article == null) || article.isNew()) ? version : article.getVersion() %>" />
+		<aui:input name="languageId" type="hidden" value="<%= Validator.isNotNull(toLanguageId) ? toLanguageId : defaultLanguageId %>" />
+		<aui:input name="articleURL" type="hidden" value="<%= editArticleRenderURL %>" />
+		<aui:input name="ddmStructureId" type="hidden" />
+		<aui:input name="ddmTemplateId" type="hidden" />
+		<aui:input name="workflowAction" type="hidden" value="<%= String.valueOf(WorkflowConstants.ACTION_SAVE_DRAFT) %>" />
+
+		<liferay-ui:error exception="<%= ArticleContentSizeException.class %>" message="you-have-exceeded-the-maximum-web-content-size-allowed" />
+
+		<aui:model-context bean="<%= article %>" defaultLanguageId="<%= defaultLanguageId %>" model="<%= JournalArticle.class %>" />
+
+		<div class="journal-article-wrapper" id="<portlet:namespace />journalArticleWrapper">
+			<div class="journal-article-wrapper-content">
+				<c:if test="<%= Validator.isNull(toLanguageId) %>">
+					<c:if test="<%= (article != null) && !article.isNew() %>">
+						<aui:workflow-status id="<%= String.valueOf(article.getArticleId()) %>" status="<%= article.getStatus() %>" version="<%= String.valueOf(article.getVersion()) %>" />
+
+						<liferay-util:include page="/html/portlet/journal/article_toolbar.jsp" />
+					</c:if>
+				</c:if>
+
+				<liferay-util:buffer var="htmlTop">
+					<c:if test="<%= article != null %>">
+						<div class="article-info">
+							<div class="float-container">
+								<c:if test="<%= article.isSmallImage() %>">
+									<img alt="" class="article-image" src="<%= HtmlUtil.escape(article.getArticleImageURL(themeDisplay)) %>" width="150" />
+								</c:if>
+
+								<c:if test="<%= !article.isNew() %>">
+									<span class="article-name"><%= HtmlUtil.escape(article.getTitle(locale)) %></span>
+								</c:if>
+							</div>
+						</div>
+					</c:if>
+				</liferay-util:buffer>
+
+				<liferay-util:buffer var="htmlBottom">
+
+					<%
+					boolean approved = false;
+					boolean pending = false;
+
+					if ((article != null) && (version > 0)) {
+						approved = article.isApproved();
+
+						if (WorkflowDefinitionLinkLocalServiceUtil.hasWorkflowDefinitionLink(themeDisplay.getCompanyId(), scopeGroupId, JournalArticle.class.getName())) {
+							pending = article.isPending();
+						}
+					}
+					%>
+
+					<c:if test="<%= approved %>">
+						<div class="alert alert-info">
+							<liferay-ui:message key="a-new-version-will-be-created-automatically-if-this-content-is-modified" />
+						</div>
+					</c:if>
+
+					<c:if test="<%= pending %>">
+						<div class="alert alert-info">
+							<liferay-ui:message key="there-is-a-publication-workflow-in-process" />
+						</div>
+					</c:if>
+
+					<aui:button-row cssClass="journal-article-button-row">
+
+						<%
+						boolean hasSavePermission = false;
+
+						if (article != null) {
+							hasSavePermission = JournalArticlePermission.contains(permissionChecker, article, ActionKeys.UPDATE);
+						}
+						else {
+							hasSavePermission = JournalPermission.contains(permissionChecker, groupId, ActionKeys.ADD_ARTICLE);
+						}
+
+						String saveButtonLabel = "save";
+
+						if ((article == null) || article.isDraft() || article.isApproved()) {
+							saveButtonLabel = "save-as-draft";
+						}
+
+						String publishButtonLabel = "publish";
+
+						if (WorkflowDefinitionLinkLocalServiceUtil.hasWorkflowDefinitionLink(themeDisplay.getCompanyId(), groupId, JournalArticle.class.getName())) {
+							publishButtonLabel = "submit-for-publication";
+						}
+
+						if (classNameId > JournalArticleConstants.CLASSNAME_ID_DEFAULT) {
+							publishButtonLabel = "save";
+						}
+						%>
+
+						<c:choose>
+							<c:when test="<%= Validator.isNull(toLanguageId) %>">
+								<c:if test="<%= hasSavePermission %>">
+									<c:if test="<%= classNameId == JournalArticleConstants.CLASSNAME_ID_DEFAULT %>">
+										<aui:button name="saveButton" onClick='<%= renderResponse.getNamespace() + "saveArticle()" %>' primary="<%= false %>" type="submit" value="<%= saveButtonLabel %>" />
+									</c:if>
+
+									<aui:button disabled="<%= pending %>" name="publishButton" onClick='<%= renderResponse.getNamespace() + "publishArticle()" %>' type="submit" value="<%= publishButtonLabel %>" />
+								</c:if>
+							</c:when>
+							<c:otherwise>
+								<aui:button name="translateButton" onClick='<%= renderResponse.getNamespace() + "translateArticle()" %>' type="submit" value="save" />
+
+								<%
+								String[] translations = article.getAvailableLanguageIds();
+								%>
+
+								<aui:button disabled="<%= toLanguageId.equals(defaultLanguageId) || !ArrayUtil.contains(translations, toLanguageId) %>" name="removeArticleLocaleButton" onClick='<%= renderResponse.getNamespace() + "removeArticleLocale();" %>' value="remove-translation" />
+							</c:otherwise>
+						</c:choose>
+						<aui:button href="<%= redirect %>" type="cancel" />
+					</aui:button-row>
+				</liferay-util:buffer>
+
+				<c:choose>
+					<c:when test="<%= Validator.isNull(toLanguageId) %>">
+						<liferay-ui:form-navigator
+							categoryNames="<%= _CATEGORY_NAMES %>"
+							categorySections="<%= categorySections %>"
+							formName="fm1"
+							htmlBottom="<%= htmlBottom %>"
+							htmlTop="<%= htmlTop %>"
+							jspPath="/html/portlet/journal/article/"
+							showButtons="<%= false %>"
+						/>
+					</c:when>
+					<c:otherwise>
+
+						<%
+						for (String section : mainSections) {
+						%>
+
+							<div class="form-section">
+								<liferay-util:include page='<%= "/html/portlet/journal/article/" + _getSectionJsp(section) + ".jsp" %>' />
+							</div>
+
+						<%
+						}
+						%>
+
+						<%= htmlBottom %>
+
+					</c:otherwise>
+				</c:choose>
+			</div>
+		</div>
+	</aui:form>
+</div>
+
+<c:if test="<%= (article != null) && Validator.equals(cmd, Constants.PREVIEW) %>">
+	<aui:script use="liferay-journal-preview">
+		<liferay-portlet:renderURL plid="<%= JournalUtil.getPreviewPlid(article, themeDisplay) %>" var="previewArticleContentURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+			<portlet:param name="struts_action" value="/journal/preview_article_content" />
+			<portlet:param name="groupId" value="<%= String.valueOf(article.getGroupId()) %>" />
+			<portlet:param name="articleId" value="<%= article.getArticleId() %>" />
+			<portlet:param name="version" value="<%= String.valueOf(article.getVersion()) %>" />
+		</liferay-portlet:renderURL>
+
+		Liferay.fire(
+			'previewArticle',
+			{
+				title: '<%= HtmlUtil.escapeJS(article.getTitle(locale)) %>',
+				uri: '<%= HtmlUtil.escapeJS(previewArticleContentURL.toString()) %>'
+			}
+		);
+	</aui:script>
+</c:if>
+
+<aui:script>
+	var <portlet:namespace />documentLibraryInput = null;
+	var <portlet:namespace />imageGalleryInput = null;
+
+	function <portlet:namespace />publishArticle() {
+		document.<portlet:namespace />fm1.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.PUBLISH %>";
+	}
+
+	function <portlet:namespace />removeArticleLocale() {
+		if (confirm("<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-deactivate-this-language") %>")) {
+			document.<portlet:namespace />fm1.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.DELETE_TRANSLATION %>";
+			document.<portlet:namespace />fm1.<portlet:namespace />redirect.value = "<portlet:renderURL><portlet:param name="redirect" value="<%= redirect %>" /><portlet:param name="struts_action" value="/journal/edit_article" /><portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" /><portlet:param name="articleId" value="<%= articleId %>" /><portlet:param name="version" value="<%= String.valueOf(version) %>" /></portlet:renderURL>&<portlet:namespace />languageId=<%= HtmlUtil.escapeJS(defaultLanguageId) %>";
+
+			submitForm(document.<portlet:namespace />fm1);
+		}
+	}
+
+	function <portlet:namespace />saveArticle() {
+		document.<portlet:namespace />fm1.<portlet:namespace /><%= Constants.CMD %>.value = "<%= ((article == null) || Validator.isNull(article.getArticleId())) ? Constants.ADD : Constants.UPDATE %>";
+	}
+
+	function <portlet:namespace />selectDocumentLibrary(url) {
+		document.getElementById(<portlet:namespace />documentLibraryInput).value = url;
+	}
+
+	function <portlet:namespace />selectImageGallery(url) {
+		document.getElementById(<portlet:namespace />imageGalleryInput).value = url;
+	}
+
+	function <portlet:namespace />submitForm(event) {
+		event.preventDefault();
+
+		if (window.<portlet:namespace />journalPortlet) {
+			var cmd = document.<portlet:namespace />fm1.<portlet:namespace /><%= Constants.CMD %>.value;
+
+			if (cmd === '<%= Constants.TRANSLATE %>') {
+				window.<portlet:namespace />journalPortlet.translateArticle();
+			}
+			else {
+				window.<portlet:namespace />journalPortlet.saveArticle(cmd);
+			}
+		}
+	}
+
+	function <portlet:namespace />translateArticle() {
+		document.<portlet:namespace />fm1.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.TRANSLATE %>";
+	}
+
+	<c:if test="<%= windowState.equals(WindowState.MAXIMIZED) %>">
+		<c:choose>
+			<c:when test="<%= PropsValues.JOURNAL_ARTICLE_FORCE_AUTOGENERATE_ID %>">
+				Liferay.Util.focusFormField(document.<portlet:namespace />fm1.<portlet:namespace />title);
+			</c:when>
+			<c:otherwise>
+				Liferay.Util.focusFormField(document.<portlet:namespace />fm1.<portlet:namespace /><%= (article == null) ? "newArticleId" : "title" %>);
+			</c:otherwise>
+		</c:choose>
+	</c:if>
+</aui:script>
+
+<%!
+private String _getSectionJsp(String name) {
+	return TextFormatter.format(name, TextFormatter.N);
+}
+
+private static final String[] _CATEGORY_NAMES = {""};
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/edit_feed.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/edit_feed.jsp
new file mode 100644
index 0000000..9699b4b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/edit_feed.jsp
@@ -0,0 +1,445 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+JournalFeed feed = (JournalFeed)request.getAttribute(WebKeys.JOURNAL_FEED);
+
+long groupId = BeanParamUtil.getLong(feed, request, "groupId", scopeGroupId);
+
+String feedId = BeanParamUtil.getString(feed, request, "feedId");
+String newFeedId = ParamUtil.getString(request, "newFeedId");
+
+String structureId = BeanParamUtil.getString(feed, request, "structureId");
+
+DDMStructure ddmStructure = null;
+
+String ddmStructureName = StringPool.BLANK;
+
+if (Validator.isNotNull(structureId)) {
+	try {
+		ddmStructure = DDMStructureLocalServiceUtil.getStructure(themeDisplay.getSiteGroupId(), PortalUtil.getClassNameId(JournalArticle.class), structureId, true);
+
+		ddmStructureName = ddmStructure.getName(locale);
+	}
+	catch (NoSuchStructureException nsse) {
+	}
+}
+
+List<DDMTemplate> ddmTemplates = new ArrayList<DDMTemplate>();
+
+if (ddmStructure != null) {
+	ddmTemplates.addAll(DDMTemplateLocalServiceUtil.getTemplates(themeDisplay.getCompanyGroupId(), PortalUtil.getClassNameId(DDMStructure.class), ddmStructure.getStructureId()));
+	ddmTemplates.addAll(DDMTemplateLocalServiceUtil.getTemplates(themeDisplay.getSiteGroupId(), PortalUtil.getClassNameId(DDMStructure.class), ddmStructure.getStructureId()));
+}
+
+String templateId = BeanParamUtil.getString(feed, request, "templateId");
+
+if ((ddmStructure == null) && Validator.isNotNull(templateId)) {
+	DDMTemplate ddmTemplate = null;
+
+	try {
+		ddmTemplate = DDMTemplateLocalServiceUtil.getTemplate(themeDisplay.getSiteGroupId(), PortalUtil.getClassNameId(DDMStructure.class), templateId, true);
+	}
+	catch (NoSuchTemplateException nste) {
+	}
+
+	if (ddmTemplate != null) {
+		try {
+			ddmStructure = DDMStructureLocalServiceUtil.getStructure(ddmTemplate.getClassPK());
+
+			structureId = ddmStructure.getStructureKey();
+			ddmStructureName = ddmStructure.getName(locale);
+
+			ddmTemplates = DDMTemplateLocalServiceUtil.getTemplates(themeDisplay.getSiteGroupId(), PortalUtil.getClassNameId(DDMStructure.class), ddmTemplate.getClassPK());
+		}
+		catch (NoSuchStructureException nsse) {
+		}
+	}
+}
+
+String rendererTemplateId = BeanParamUtil.getString(feed, request, "rendererTemplateId");
+
+String contentField = BeanParamUtil.getString(feed, request, "contentField");
+
+if (Validator.isNull(contentField) || ((ddmStructure == null) && !contentField.equals(JournalFeedConstants.WEB_CONTENT_DESCRIPTION) && !contentField.equals(JournalFeedConstants.RENDERED_WEB_CONTENT))) {
+	contentField = JournalFeedConstants.WEB_CONTENT_DESCRIPTION;
+}
+
+String feedFormat = BeanParamUtil.getString(feed, request, "feedFormat", RSSUtil.FORMAT_DEFAULT);
+double feedVersion = BeanParamUtil.getDouble(feed, request, "feedVersion", RSSUtil.VERSION_DEFAULT);
+
+String feedType = RSSUtil.getFeedType(feedFormat, feedVersion);
+
+ResourceURL feedURL = null;
+
+if (feed != null) {
+	long targetLayoutPlid = PortalUtil.getPlidFromFriendlyURL(feed.getCompanyId(), feed.getTargetLayoutFriendlyUrl());
+
+	feedURL = new PortletURLImpl(request, PortletKeys.JOURNAL, targetLayoutPlid, PortletRequest.RESOURCE_PHASE);
+
+	feedURL.setCacheability(ResourceURL.FULL);
+
+	feedURL.setParameter("struts_action", "/journal/rss");
+	feedURL.setParameter("groupId", String.valueOf(groupId));
+	feedURL.setParameter("feedId", String.valueOf(feedId));
+}
+%>
+
+<portlet:actionURL var="editFeedURL">
+	<portlet:param name="struts_action" value="/journal/edit_feed" />
+</portlet:actionURL>
+
+<aui:form action="<%= editFeedURL %>" enctype="multipart/form-data" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveFeed();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="groupId" type="hidden" value="<%= groupId %>" />
+	<aui:input name="feedId" type="hidden" value="<%= feedId %>" />
+	<aui:input name="rendererTemplateId" type="hidden" value="<%= rendererTemplateId %>" />
+	<aui:input name="contentField" type="hidden" value="<%= contentField %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		localizeTitle="<%= (feed == null) %>"
+		title='<%= (feed == null) ? "new-feed" : feed.getName() %>'
+	/>
+
+	<liferay-ui:error exception="<%= DuplicateFeedIdException.class %>" message="please-enter-a-unique-id" />
+	<liferay-ui:error exception="<%= FeedContentFieldException.class %>" message="please-select-a-valid-feed-item-content" />
+	<liferay-ui:error exception="<%= FeedIdException.class %>" message="please-enter-a-valid-id" />
+	<liferay-ui:error exception="<%= FeedNameException.class %>" message="please-enter-a-valid-name" />
+	<liferay-ui:error exception="<%= FeedTargetLayoutFriendlyUrlException.class %>" message="please-enter-a-valid-target-layout-friendly-url" />
+	<liferay-ui:error exception="<%= FeedTargetPortletIdException.class %>" message="please-enter-a-valid-portlet-id" />
+
+	<aui:model-context bean="<%= feed %>" model="<%= JournalFeed.class %>" />
+
+	<aui:fieldset>
+		<c:choose>
+			<c:when test="<%= feed == null %>">
+				<c:choose>
+					<c:when test="<%= PropsValues.JOURNAL_FEED_FORCE_AUTOGENERATE_ID %>">
+						<aui:input name="newFeedId" type="hidden" />
+						<aui:input name="autoFeedId" type="hidden" value="<%= true %>" />
+					</c:when>
+					<c:otherwise>
+						<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" cssClass="lfr-input-text-container" field="feedId" fieldParam="newFeedId" label="id" name="newFeedId" value="<%= newFeedId %>" />
+
+						<aui:input label="autogenerate-id" name="autoFeedId" type="checkbox" />
+					</c:otherwise>
+				</c:choose>
+			</c:when>
+			<c:otherwise>
+				<aui:field-wrapper label="id">
+					<liferay-ui:input-resource url="<%= feedId %>" />
+				</aui:field-wrapper>
+			</c:otherwise>
+		</c:choose>
+
+		<aui:input autoFocus="<%= ((feed != null) && !PropsValues.JOURNAL_FEED_FORCE_AUTOGENERATE_ID && windowState.equals(WindowState.MAXIMIZED)) %>" cssClass="lfr-input-text-container" name="name" />
+
+		<aui:input cssClass="lfr-textarea-container" name="description" />
+
+		<aui:input cssClass="lfr-input-text-container" helpMessage="journal-feed-target-layout-friendly-url-help" name="targetLayoutFriendlyUrl" />
+
+		<aui:input cssClass="lfr-input-text-container" helpMessage="journal-feed-target-portlet-id-help" name="targetPortletId" />
+
+		<c:choose>
+			<c:when test="<%= feed == null %>">
+				<aui:field-wrapper label="permissions">
+					<liferay-ui:input-permissions modelName="<%= JournalFeed.class.getName() %>" />
+				</aui:field-wrapper>
+			</c:when>
+			<c:otherwise>
+				<aui:field-wrapper label="url">
+					<liferay-ui:input-resource url="<%= feedURL.toString() %>" />
+				</aui:field-wrapper>
+			</c:otherwise>
+		</c:choose>
+	</aui:fieldset>
+
+	<liferay-ui:panel-container extended="<%= true %>" id="journalFeedSettingsPanelContainer" persistState="<%= true %>">
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="journalFeedConstraintsPanel" persistState="<%= true %>" title="web-content-contraints">
+			<aui:fieldset>
+				<aui:select label="web-content-type" name="type" showEmptyOption="<%= true %>">
+
+					<%
+					for (String curType : JournalArticleConstants.TYPES) {
+					%>
+
+						<aui:option label="<%= curType %>" />
+
+					<%
+					}
+					%>
+
+				</aui:select>
+
+				<aui:field-wrapper label="structure">
+					<aui:input name="structureId" type="hidden" value="<%= structureId %>" />
+
+					<div class="input-append">
+						<liferay-ui:input-resource url="<%= ddmStructureName %>" />
+
+						<aui:button name="selectStructureButton" onClick='<%= renderResponse.getNamespace() + "openStructureSelector();" %>' value="select" />
+
+						<aui:button disabled="<%= Validator.isNull(structureId) %>" name="removeStructureButton" onClick='<%= renderResponse.getNamespace() + "removeStructure();" %>' value="remove" />
+					</div>
+				</aui:field-wrapper>
+
+				<aui:field-wrapper label="template">
+					<c:choose>
+						<c:when test="<%= ddmTemplates.isEmpty() %>">
+							<aui:input name="templateId" type="hidden" value="<%= templateId %>" />
+						</c:when>
+						<c:otherwise>
+							<liferay-ui:table-iterator
+								list="<%= ddmTemplates %>"
+								listType="com.liferay.portlet.dynamicdatamapping.model.DDMTemplate"
+								rowLength="3"
+								rowPadding="30"
+							>
+
+								<%
+								boolean templateChecked = false;
+
+								if (templateId.equals(tableIteratorObj.getTemplateKey())) {
+									templateChecked = true;
+								}
+								%>
+
+								<aui:input checked="<%= templateChecked %>" label="<%= HtmlUtil.escape(tableIteratorObj.getName(locale)) %>" name="templateId" type="radio" value="<%= tableIteratorObj.getTemplateKey() %>" />
+
+								<c:if test="<%= tableIteratorObj.isSmallImage() %>">
+									<br />
+
+									<img border="0" hspace="0" src="<%= Validator.isNotNull(tableIteratorObj.getSmallImageURL()) ? tableIteratorObj.getSmallImageURL() : themeDisplay.getPathImage() + "/journal/template?img_id=" + tableIteratorObj.getSmallImageId() + "&t=" + WebServerServletTokenUtil.getToken(tableIteratorObj.getSmallImageId()) %>" vspace="0" />
+								</c:if>
+							</liferay-ui:table-iterator>
+						</c:otherwise>
+					</c:choose>
+				</aui:field-wrapper>
+			</aui:fieldset>
+		</liferay-ui:panel>
+
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="journalPresentationSettingsPanel" persistState="<%= true %>" title="presentation-settings">
+			<aui:fieldset>
+				<aui:select label="feed-item-content" name="contentFieldSelector">
+					<aui:option label="<%= JournalFeedConstants.WEB_CONTENT_DESCRIPTION %>" selected="<%= contentField.equals(JournalFeedConstants.WEB_CONTENT_DESCRIPTION) %>" />
+
+					<optgroup label='<liferay-ui:message key="<%= JournalFeedConstants.RENDERED_WEB_CONTENT %>" />'>
+						<aui:option data-contentField="<%= JournalFeedConstants.RENDERED_WEB_CONTENT %>" label="use-default-template" selected="<%= contentField.equals(JournalFeedConstants.RENDERED_WEB_CONTENT) %>" value="" />
+
+						<c:if test="<%= (ddmStructure != null) && (ddmTemplates.size() > 1) %>">
+
+							<%
+							for (DDMTemplate curTemplate : ddmTemplates) {
+							%>
+
+								<aui:option data-contentField="<%= JournalFeedConstants.RENDERED_WEB_CONTENT %>" label='<%= LanguageUtil.format(pageContext, "use-template-x", HtmlUtil.escape(curTemplate.getName(locale))) %>' selected="<%= rendererTemplateId.equals(curTemplate.getTemplateKey()) %>" value="<%= curTemplate.getTemplateKey() %>" />
+
+							<%
+							}
+							%>
+
+						</c:if>
+					</optgroup>
+
+					<c:if test="<%= ddmStructure != null %>">
+						<optgroup label="<liferay-ui:message key="structure-fields" />">
+
+							<%
+							Document doc = SAXReaderUtil.read(ddmStructure.getXsd());
+
+							XPath xpathSelector = SAXReaderUtil.createXPath("//dynamic-element");
+
+							List<Node> nodes = xpathSelector.selectNodes(doc);
+
+							for (Node node : nodes) {
+								Element el = (Element)node;
+
+								String elName = el.attributeValue("name");
+								String elType = StringUtil.replace(el.attributeValue("type"), StringPool.UNDERLINE, StringPool.DASH);
+
+								if (!elType.equals("boolean") && !elType.equals("list") && !elType.equals("multi-list")) {
+							%>
+
+									<aui:option label='<%= TextFormatter.format(elName, TextFormatter.J) + "(" + LanguageUtil.get(pageContext, elType) + ")" %>' selected="<%= contentField.equals(elName) %>" value="<%= elName %>" />
+
+							<%
+								}
+							}
+							%>
+
+						</optgroup>
+					</c:if>
+				</aui:select>
+
+				<aui:select name="feedType">
+
+					<%
+					for (String curFeedType : RSSUtil.FEED_TYPES) {
+					%>
+
+						<aui:option label="<%= RSSUtil.getFeedTypeName(curFeedType) %>" selected="<%= feedType.equals(curFeedType) %>" value="<%= curFeedType %>" />
+
+					<%
+					}
+					%>
+
+				</aui:select>
+
+				<aui:input label="maximum-items-to-display" name="delta" value="10" />
+
+				<aui:select label="order-by-column" name="orderByCol">
+					<aui:option label="modified-date" />
+					<aui:option label="display-date" />
+				</aui:select>
+
+				<aui:select name="orderByType">
+					<aui:option label="ascending" value="asc" />
+					<aui:option label="descending" value="desc" />
+				</aui:select>
+			</aui:fieldset>
+		</liferay-ui:panel>
+	</liferay-ui:panel-container>
+
+	<aui:button-row>
+
+		<%
+		boolean hasSavePermission = false;
+
+		if (feed != null) {
+			hasSavePermission = JournalFeedPermission.contains(permissionChecker, feed, ActionKeys.UPDATE);
+		}
+		else {
+			hasSavePermission = JournalPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_FEED);
+		}
+		%>
+
+		<c:if test="<%= hasSavePermission %>">
+			<aui:button type="submit" />
+
+			<c:if test="<%= feed != null %>">
+
+				<%
+				String taglibPreviewButton = "Liferay.Util.openWindow({id:'" + renderResponse.getNamespace() + "preview', title: '" + UnicodeLanguageUtil.get(pageContext, "feed") + "', uri: '" + feedURL + "'});";
+				%>
+
+				<aui:button onClick="<%= taglibPreviewButton %>" value="preview" />
+			</c:if>
+		</c:if>
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />openStructureSelector() {
+		Liferay.Util.openDDMPortlet(
+			{
+				basePortletURL: '<%= PortletURLFactoryUtil.create(request, PortletKeys.DYNAMIC_DATA_MAPPING, themeDisplay.getPlid(), PortletRequest.RENDER_PHASE) %>',
+				classPK: <%= (ddmStructure != null) ? ddmStructure.getPrimaryKey(): 0 %>,
+				dialog: {
+					destroyOnHide: true
+				},
+				eventName: '<portlet:namespace />selectStructure',
+				groupId: <%= themeDisplay.getSiteGroupId() %>,
+
+				<%
+				Portlet portlet = PortletLocalServiceUtil.getPortletById(portletDisplay.getId());
+				%>
+
+				refererPortletName: '<%= PortletKeys.JOURNAL %>',
+				refererWebDAVToken: '<%= portlet.getWebDAVStorageToken() %>',
+				struts_action: '/dynamic_data_mapping/select_structure',
+				title: '<%= UnicodeLanguageUtil.get(pageContext, "structures") %>'
+			},
+			function(event) {
+				if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "selecting-a-new-structure-will-change-the-available-templates-and-available-feed-item-content") %>') && (document.<portlet:namespace />fm.<portlet:namespace />structureId.value != event.structurekey)) {
+					document.<portlet:namespace />fm.<portlet:namespace />structureId.value = event.ddmstructurekey;
+					document.<portlet:namespace />fm.<portlet:namespace />templateId.value = "";
+					document.<portlet:namespace />fm.<portlet:namespace />rendererTemplateId.value = "";
+					document.<portlet:namespace />fm.<portlet:namespace />contentField.value = "<%= JournalFeedConstants.WEB_CONTENT_DESCRIPTION %>";
+
+					submitForm(document.<portlet:namespace />fm);
+				}
+			}
+		);
+	}
+
+	function <portlet:namespace />removeStructure() {
+		document.<portlet:namespace />fm.<portlet:namespace />structureId.value = "";
+		document.<portlet:namespace />fm.<portlet:namespace />templateId.value = "";
+		document.<portlet:namespace />fm.<portlet:namespace />rendererTemplateId.value = "";
+		document.<portlet:namespace />fm.<portlet:namespace />contentField.value = "<%= JournalFeedConstants.WEB_CONTENT_DESCRIPTION %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />saveFeed() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= feed == null ? Constants.ADD : Constants.UPDATE %>";
+
+		<c:if test="<%= feed == null %>">
+			document.<portlet:namespace />fm.<portlet:namespace />feedId.value = document.<portlet:namespace />fm.<portlet:namespace />newFeedId.value;
+		</c:if>
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />selectRendererTemplate(rendererTemplateId) {
+		document.<portlet:namespace />fm.<portlet:namespace />rendererTemplateId.value = rendererTemplateId;
+	}
+
+	function <portlet:namespace />selectTemplate(structureId, templateId, dialog) {
+		if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "selecting-a-template-will-change-the-structure,-available-input-fields,-and-available-templates") %>')) {
+			document.<portlet:namespace />fm.<portlet:namespace />structureId.value = structureId;
+			document.<portlet:namespace />fm.<portlet:namespace />templateId.value = templateId;
+
+			if (dialog) {
+				dialog.hide();
+			}
+
+			submitForm(document.<portlet:namespace />fm);
+		}
+	}
+
+	Liferay.Util.disableToggleBoxes('<portlet:namespace />autoFeedIdCheckbox','<portlet:namespace />newFeedId', true);
+</aui:script>
+
+<aui:script use="aui-base">
+	var feedItemContentSelector = A.one('select#<portlet:namespace />contentFieldSelector');
+
+	var changeFeedItemContent = function() {
+		var selectedFeedItemOption = feedItemContentSelector.one(':selected');
+
+		var data = selectedFeedItemOption.attr('data-contentField');
+		var value = selectedFeedItemOption.attr('value');
+
+		if (data === '<%= JournalFeedConstants.RENDERED_WEB_CONTENT %>') {
+			document.<portlet:namespace />fm.<portlet:namespace />rendererTemplateId.value = value;
+			document.<portlet:namespace />fm.<portlet:namespace />contentField.value = '<%= JournalFeedConstants.RENDERED_WEB_CONTENT %>';
+		}
+		else {
+			document.<portlet:namespace />fm.<portlet:namespace />rendererTemplateId.value = '';
+			document.<portlet:namespace />fm.<portlet:namespace />contentField.value = value;
+		}
+	}
+
+	feedItemContentSelector.on('change', changeFeedItemContent);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/edit_folder.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/edit_folder.jsp
new file mode 100644
index 0000000..3a5e4f4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/edit_folder.jsp
@@ -0,0 +1,169 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+JournalFolder folder = (JournalFolder)request.getAttribute(WebKeys.JOURNAL_FOLDER);
+
+long folderId = BeanParamUtil.getLong(folder, request, "folderId");
+
+long parentFolderId = BeanParamUtil.getLong(folder, request, "parentFolderId", JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID);
+
+boolean mergeWithParentFolderDisabled = ParamUtil.getBoolean(request, "mergeWithParentFolderDisabled");
+%>
+
+<portlet:actionURL var="editFolderURL">
+	<portlet:param name="struts_action" value="/journal/edit_folder" />
+</portlet:actionURL>
+
+<aui:form action="<%= editFolderURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveFolder();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="folderId" type="hidden" value="<%= folderId %>" />
+	<aui:input name="parentFolderId" type="hidden" value="<%= parentFolderId %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		localizeTitle="<%= (folder == null) %>"
+		title='<%= (folder == null) ? "new-folder" : folder.getName() %>'
+	/>
+
+	<liferay-ui:error exception="<%= DuplicateFolderNameException.class %>" message="please-enter-a-unique-folder-name" />
+	<liferay-ui:error exception="<%= FolderNameException.class %>" message="please-enter-a-valid-name" />
+
+	<aui:model-context bean="<%= folder %>" model="<%= JournalFolder.class %>" />
+
+	<aui:fieldset>
+		<c:if test="<%= folder != null %>">
+			<aui:field-wrapper label="parent-folder">
+
+				<%
+				String parentFolderName = LanguageUtil.get(pageContext, "home");
+
+				try {
+					JournalFolder parentFolder = JournalFolderServiceUtil.getFolder(parentFolderId);
+
+					parentFolderName = parentFolder.getName();
+				}
+				catch (NoSuchFolderException nsfe) {
+				}
+				%>
+
+				<div class="input-append">
+					<liferay-ui:input-resource id="parentFolderName" url="<%= parentFolderName %>" />
+
+					<portlet:renderURL var="selectFolderURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+						<portlet:param name="struts_action" value="/journal/select_folder" />
+						<portlet:param name="folderId" value="<%= String.valueOf(parentFolderId) %>" />
+					</portlet:renderURL>
+
+					<aui:button name="selecFolderButton" value="select" />
+
+					<aui:script use="aui-base">
+						A.one('#<portlet:namespace />selecFolderButton').on(
+							'click',
+							function(event) {
+								Liferay.Util.selectEntity(
+									{
+										dialog: {
+											constrain: true,
+											modal: true,
+											width: 680
+										},
+										id: '<portlet:namespace />selectFolder',
+										title: '<liferay-ui:message arguments="folder" key="select-x" />',
+										uri: '<%= selectFolderURL.toString() %>'
+									},
+									function(event) {
+										var folderData = {
+											idString: 'parentFolderId',
+											idValue: event.folderid,
+											nameString: 'parentFolderName',
+											nameValue: event.foldername
+										};
+
+										Liferay.Util.selectFolder(folderData, '<portlet:namespace />');
+									}
+								);
+							}
+						);
+					</aui:script>
+
+					<%
+					String taglibRemoveFolder = "Liferay.Util.removeFolderSelection('parentFolderId', 'parentFolderName', '" + renderResponse.getNamespace() + "');";
+					%>
+
+					<aui:button disabled="<%= (parentFolderId <= 0) %>" name="removeFolderButton" onClick="<%= taglibRemoveFolder %>" value="remove" />
+				</div>
+
+				<aui:input disabled="<%= mergeWithParentFolderDisabled %>" label="merge-with-parent-folder" name="mergeWithParentFolder" type="checkbox" />
+			</aui:field-wrapper>
+		</c:if>
+
+		<aui:input autoFocus="<%= (windowState.equals(WindowState.MAXIMIZED) || windowState.equals(LiferayWindowState.POP_UP)) %>" name="name" />
+
+		<aui:input name="description" />
+
+		<liferay-ui:custom-attributes-available className="<%= JournalFolder.class.getName() %>">
+			<liferay-ui:custom-attribute-list
+				className="<%= JournalFolder.class.getName() %>"
+				classPK="<%= (folder != null) ? folder.getFolderId() : 0 %>"
+				editable="<%= true %>"
+				label="<%= true %>"
+			/>
+		</liferay-ui:custom-attributes-available>
+
+		<c:if test="<%= folder == null %>">
+			<aui:field-wrapper label="permissions">
+				<liferay-ui:input-permissions
+					modelName="<%= JournalFolder.class.getName() %>"
+				/>
+			</aui:field-wrapper>
+		</c:if>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />saveFolder() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (folder == null) ? Constants.ADD : Constants.UPDATE %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
+
+<%
+if (folder != null) {
+	JournalUtil.addPortletBreadcrumbEntries(folderId, request, renderResponse);
+
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit"), currentURL);
+}
+else {
+	if (parentFolderId > 0) {
+		JournalUtil.addPortletBreadcrumbEntries(parentFolderId, request, renderResponse);
+	}
+
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "add-folder"), currentURL);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/error.jsp
new file mode 100644
index 0000000..e55af92
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/error.jsp
@@ -0,0 +1,27 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= NoSuchArticleException.class %>" message="the-web-content-could-not-be-found" />
+<liferay-ui:error exception="<%= NoSuchStructureException.class %>" message="the-structure-could-not-be-found" />
+<liferay-ui:error exception="<%= NoSuchTemplateException.class %>" message="the-template-could-not-be-found" />
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/feed_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/feed_action.jsp
new file mode 100644
index 0000000..7a47ce5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/feed_action.jsp
@@ -0,0 +1,59 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+JournalFeed feed = (JournalFeed)row.getObject();
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= JournalFeedPermission.contains(permissionChecker, feed, ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editeFeedURL">
+			<portlet:param name="struts_action" value="/journal/edit_feed" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(feed.getGroupId()) %>" />
+			<portlet:param name="feedId" value="<%= feed.getFeedId() %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon image="edit" url="<%= editeFeedURL %>" />
+	</c:if>
+
+	<c:if test="<%= JournalFeedPermission.contains(permissionChecker, feed, ActionKeys.PERMISSIONS) %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= JournalFeed.class.getName() %>"
+			modelResourceDescription="<%= feed.getName() %>"
+			resourcePrimKey="<%= String.valueOf(feed.getId()) %>"
+			var="permissionsFeedURL"
+		/>
+
+		<liferay-ui:icon image="permissions" url="<%= permissionsFeedURL %>" />
+	</c:if>
+
+	<c:if test="<%= JournalFeedPermission.contains(permissionChecker, feed, ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteFeedURL">
+			<portlet:param name="struts_action" value="/journal/edit_feed" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(feed.getGroupId()) %>" />
+			<portlet:param name="deleteFeedIds" value="<%= feed.getFeedId() %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete url="<%= deleteFeedURL %>" />
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/feed_search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/feed_search.jsp
new file mode 100644
index 0000000..63ba097
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/feed_search.jsp
@@ -0,0 +1,80 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+FeedSearch searchContainer = (FeedSearch)request.getAttribute("liferay-ui:search:searchContainer");
+
+FeedDisplayTerms displayTerms = (FeedDisplayTerms)searchContainer.getDisplayTerms();
+%>
+
+<liferay-ui:search-toggle
+	autoFocus="<%= (windowState.equals(WindowState.MAXIMIZED) || windowState.equals(LiferayWindowState.POP_UP)) %>"
+	buttonLabel="search"
+	displayTerms="<%= displayTerms %>"
+	id="toggle_id_journal_feed_search"
+>
+	<aui:fieldset>
+		<aui:input label="id" name="<%= displayTerms.FEED_ID %>" size="20" type="text" value="<%= displayTerms.getFeedId() %>" />
+
+		<aui:input name="<%= displayTerms.NAME %>" size="20" type="text" value="<%= displayTerms.getName() %>" />
+
+		<aui:input name="<%= displayTerms.DESCRIPTION %>" size="20" type="text" value="<%= displayTerms.getDescription() %>" />
+	</aui:fieldset>
+</liferay-ui:search-toggle>
+
+<%
+boolean showAddFeedButtonButton = JournalPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_FEED);
+boolean showPermissionsButton = JournalPermission.contains(permissionChecker, scopeGroupId, ActionKeys.PERMISSIONS);
+%>
+
+<c:if test="<%= showAddFeedButtonButton || showPermissionsButton %>">
+	<aui:button-row>
+		<c:if test="<%= showAddFeedButtonButton %>">
+			<aui:button onClick='<%= renderResponse.getNamespace() + "addFeed();" %>' value="add-feed" />
+		</c:if>
+
+		<c:if test="<%= showPermissionsButton %>">
+			<liferay-security:permissionsURL
+				modelResource="com.liferay.portlet.journal"
+				modelResourceDescription="<%= HtmlUtil.escape(themeDisplay.getScopeGroupName()) %>"
+				resourcePrimKey="<%= String.valueOf(scopeGroupId) %>"
+				var="permissionsURL"
+				windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+			/>
+
+			<aui:button href="<%= permissionsURL %>" useDialog="<%= true %>" value="permissions" />
+		</c:if>
+	</aui:button-row>
+</c:if>
+
+<aui:script>
+	function <portlet:namespace />addFeed() {
+		var url = '<portlet:renderURL><portlet:param name="struts_action" value="/journal/edit_feed" /><portlet:param name="redirect" value="<%= currentURL %>" /></portlet:renderURL>';
+
+		if (document.<portlet:namespace />fm.<portlet:namespace /><%= displayTerms.ADVANCED_SEARCH %>.value == 'false') {
+			url += '&<portlet:namespace /><%= displayTerms.NAME %>=' + document.<portlet:namespace />fm.<portlet:namespace /><%= displayTerms.KEYWORDS %>.value;
+
+			submitForm(document.hrefFm, url);
+		}
+		else {
+			document.<portlet:namespace />fm.method = 'post';
+
+			submitForm(document.<portlet:namespace />fm, url);
+		}
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/feed_search_results.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/feed_search_results.jspf
new file mode 100644
index 0000000..ed31f1a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/feed_search_results.jspf
@@ -0,0 +1,37 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+List results = null;
+int total = 0;
+
+if (searchTerms.isAdvancedSearch()) {
+	total = JournalFeedLocalServiceUtil.searchCount(company.getCompanyId(), searchTerms.getGroupId(), searchTerms.getFeedId(), searchTerms.getName(), searchTerms.getDescription(), searchTerms.isAndOperator());
+
+	searchContainer.setTotal(total);
+
+	results = JournalFeedLocalServiceUtil.search(company.getCompanyId(), searchTerms.getGroupId(), searchTerms.getFeedId(), searchTerms.getName(), searchTerms.getDescription(), searchTerms.isAndOperator(), searchContainer.getStart(), searchContainer.getEnd(), null);
+}
+else {
+	total = JournalFeedLocalServiceUtil.searchCount(company.getCompanyId(), searchTerms.getGroupId(), searchTerms.getKeywords());
+
+	searchContainer.setTotal(total);
+
+	results = JournalFeedLocalServiceUtil.search(company.getCompanyId(), searchTerms.getGroupId(), searchTerms.getKeywords(), searchContainer.getStart(), searchContainer.getEnd(), null);
+}
+
+searchContainer.setResults(results);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/folder_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/folder_action.jsp
new file mode 100644
index 0000000..7001be5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/folder_action.jsp
@@ -0,0 +1,170 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+JournalFolder folder = null;
+
+if (row != null) {
+	folder = (JournalFolder)row.getObject();
+}
+else {
+	folder = (JournalFolder)request.getAttribute("view_entries.jsp-folder");
+}
+
+boolean folderSelected = GetterUtil.getBoolean(request.getAttribute("view_entries.jsp-folderSelected"));
+
+String modelResource = null;
+String modelResourceDescription = null;
+String resourcePrimKey = null;
+
+boolean hasPermissionsPermission = false;
+
+if (folder != null) {
+	modelResource= JournalFolder.class.getName();
+	modelResourceDescription = folder.getName();
+	resourcePrimKey= String.valueOf(folder.getPrimaryKey());
+
+	hasPermissionsPermission = JournalFolderPermission.contains(permissionChecker, folder, ActionKeys.PERMISSIONS);
+}
+else {
+	modelResource= "com.liferay.portlet.journal";
+	modelResourceDescription = HtmlUtil.escape(themeDisplay.getScopeGroupName());
+	resourcePrimKey= String.valueOf(scopeGroupId);
+
+	hasPermissionsPermission = JournalPermission.contains(permissionChecker, scopeGroupId, ActionKeys.PERMISSIONS);
+}
+%>
+
+<span class="entry-action overlay">
+	<liferay-ui:icon-menu direction="down" extended="<%= false %>" icon="<%= StringPool.BLANK %>" message="<%= StringPool.BLANK %>" showWhenSingleIcon="<%= true %>" triggerCssClass="btn">
+		<c:choose>
+			<c:when test="<%= folder != null %>">
+				<c:if test="<%= JournalFolderPermission.contains(permissionChecker, folder, ActionKeys.UPDATE) %>">
+					<portlet:renderURL var="editURL">
+						<portlet:param name="struts_action" value="/journal/edit_folder" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+						<portlet:param name="groupId" value="<%= String.valueOf(folder.getGroupId()) %>" />
+						<portlet:param name="folderId" value="<%= String.valueOf(folder.getFolderId()) %>" />
+						<portlet:param name="mergeWithParentFolderDisabled" value="<%= String.valueOf(folderSelected) %>" />
+					</portlet:renderURL>
+
+					<liferay-ui:icon
+						image="edit"
+						url="<%= editURL %>"
+					/>
+
+					<portlet:renderURL var="moveURL">
+						<portlet:param name="struts_action" value="/journal/move_folder" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+						<portlet:param name="folderId" value="<%= String.valueOf(folder.getFolderId()) %>" />
+					</portlet:renderURL>
+
+					<liferay-ui:icon
+						image="submit"
+						message="move"
+						url="<%= moveURL %>"
+					/>
+				</c:if>
+				<c:if test="<%= JournalFolderPermission.contains(permissionChecker, folder, ActionKeys.DELETE) %>">
+					<portlet:actionURL var="deleteURL">
+						<portlet:param name="struts_action" value="/journal/edit_folder" />
+						<portlet:param name="<%= Constants.CMD %>" value="<%= TrashUtil.isTrashEnabled(scopeGroupId) ? Constants.MOVE_TO_TRASH : Constants.DELETE %>" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+						<portlet:param name="groupId" value="<%= String.valueOf(folder.getGroupId()) %>" />
+						<portlet:param name="folderId" value="<%= String.valueOf(folder.getFolderId()) %>" />
+					</portlet:actionURL>
+
+					<liferay-ui:icon-delete trash="<%= TrashUtil.isTrashEnabled(scopeGroupId) %>" url="<%= deleteURL %>" />
+				</c:if>
+
+				<c:if test="<%= JournalFolderPermission.contains(permissionChecker, folder, ActionKeys.ADD_FOLDER) %>">
+					<portlet:renderURL var="addFolderURL">
+						<portlet:param name="struts_action" value="/journal/edit_folder" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+						<portlet:param name="groupId" value="<%= String.valueOf(folder.getGroupId()) %>" />
+						<portlet:param name="parentFolderId" value="<%= String.valueOf(folder.getFolderId()) %>" />
+					</portlet:renderURL>
+
+					<liferay-ui:icon
+						image="add_folder"
+						message='<%= (folder != null) ? "add-subfolder" : "add-folder" %>'
+						url="<%= addFolderURL %>"
+					/>
+				</c:if>
+			</c:when>
+			<c:otherwise>
+				<c:if test="<%= JournalPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_FOLDER) %>">
+					<portlet:renderURL var="addFolderURL">
+						<portlet:param name="struts_action" value="/journal/edit_folder" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+						<portlet:param name="groupId" value="<%= String.valueOf(scopeGroupId) %>" />
+						<portlet:param name="parentFolderId" value="<%= String.valueOf(JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID) %>" />
+					</portlet:renderURL>
+
+					<liferay-ui:icon
+						image="add_folder"
+						message='<%= (folder != null) ? "add-subfolder" : "add-folder" %>'
+						url="<%= addFolderURL %>"
+					/>
+				</c:if>
+
+				<c:if test="<%= JournalPermission.contains(permissionChecker, scopeGroupId, ActionKeys.SUBSCRIBE) && (JournalUtil.getEmailArticleAddedEnabled(portletPreferences) || JournalUtil.getEmailArticleApprovalDeniedEnabled(portletPreferences) || JournalUtil.getEmailArticleApprovalGrantedEnabled(portletPreferences) || JournalUtil.getEmailArticleApprovalRequestedEnabled(portletPreferences) || JournalUtil.getEmailArticleReviewEnabled(portletPreferences) || JournalUtil.getEmailArticleUpdatedEnabled(portletPreferences)) %>">
+					<c:choose>
+						<c:when test="<%= SubscriptionLocalServiceUtil.isSubscribed(company.getCompanyId(), user.getUserId(), JournalArticle.class.getName(), scopeGroupId) %>">
+							<portlet:actionURL var="unsubscribeURL">
+								<portlet:param name="struts_action" value="/journal/edit_article" />
+								<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UNSUBSCRIBE %>" />
+								<portlet:param name="redirect" value="<%= currentURL %>" />
+							</portlet:actionURL>
+
+							<liferay-ui:icon cssClass="subscribe-link" image="unsubscribe" label="<%= true %>" url="<%= unsubscribeURL %>" />
+						</c:when>
+						<c:otherwise>
+							<portlet:actionURL var="subscribeURL">
+								<portlet:param name="struts_action" value="/journal/edit_article" />
+								<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.SUBSCRIBE %>" />
+								<portlet:param name="redirect" value="<%= currentURL %>" />
+							</portlet:actionURL>
+
+							<liferay-ui:icon cssClass="subscribe-link" image="subscribe" label="<%= true %>" url="<%= subscribeURL %>" />
+						</c:otherwise>
+					</c:choose>
+				</c:if>
+			</c:otherwise>
+		</c:choose>
+
+		<c:if test="<%= hasPermissionsPermission %>">
+			<liferay-security:permissionsURL
+				modelResource="<%= modelResource %>"
+				modelResourceDescription="<%= modelResourceDescription %>"
+				resourcePrimKey="<%= resourcePrimKey %>"
+				var="permissionsURL"
+				windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+			/>
+
+			<liferay-ui:icon
+				image="permissions"
+				method="get"
+				url="<%= permissionsURL %>"
+				useDialog="<%= true %>"
+			/>
+		</c:if>
+	</liferay-ui:icon-menu>
+</span>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/folder_columns.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/folder_columns.jspf
new file mode 100644
index 0000000..263cdd5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/folder_columns.jspf
@@ -0,0 +1,50 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+
+// Article id
+
+row.addText(String.valueOf(curFolder.getFolderId()));
+
+// Title
+
+TextSearchEntry folderTitleTextSearchEntry = new TextSearchEntry();
+
+folderTitleTextSearchEntry.setName(folderTitle);
+
+row.addSearchEntry(folderTitleTextSearchEntry);
+
+// Status
+
+row.addText("--");
+
+// Modified date
+
+row.addDate(curFolder.getModifiedDate());
+
+// Display date
+
+row.addText("--");
+
+// Author
+
+row.addText(PortalUtil.getUserName(curFolder));
+
+// Action
+
+row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/journal/folder_action.jsp");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/init.jsp
new file mode 100644
index 0000000..ad4f5d7
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/init.jsp
@@ -0,0 +1,84 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.kernel.search.SearchResult" %><%@
+page import="com.liferay.portal.kernel.xml.Document" %><%@
+page import="com.liferay.portal.kernel.xml.Element" %><%@
+page import="com.liferay.portal.kernel.xml.Node" %><%@
+page import="com.liferay.portal.kernel.xml.SAXReaderUtil" %><%@
+page import="com.liferay.portal.kernel.xml.XPath" %><%@
+page import="com.liferay.portlet.asset.NoSuchEntryException" %><%@
+page import="com.liferay.portlet.documentlibrary.util.JournalSearcher" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.service.DDMTemplateServiceUtil" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.service.permission.DDMStructurePermission" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.storage.Fields" %><%@
+page import="com.liferay.portlet.journal.ArticleContentException" %><%@
+page import="com.liferay.portlet.journal.ArticleContentSizeException" %><%@
+page import="com.liferay.portlet.journal.ArticleDisplayDateException" %><%@
+page import="com.liferay.portlet.journal.ArticleExpirationDateException" %><%@
+page import="com.liferay.portlet.journal.ArticleIdException" %><%@
+page import="com.liferay.portlet.journal.ArticleSmallImageNameException" %><%@
+page import="com.liferay.portlet.journal.ArticleSmallImageSizeException" %><%@
+page import="com.liferay.portlet.journal.ArticleTitleException" %><%@
+page import="com.liferay.portlet.journal.ArticleTypeException" %><%@
+page import="com.liferay.portlet.journal.ArticleVersionException" %><%@
+page import="com.liferay.portlet.journal.DuplicateArticleIdException" %><%@
+page import="com.liferay.portlet.journal.DuplicateFeedIdException" %><%@
+page import="com.liferay.portlet.journal.DuplicateFolderNameException" %><%@
+page import="com.liferay.portlet.journal.FeedContentFieldException" %><%@
+page import="com.liferay.portlet.journal.FeedIdException" %><%@
+page import="com.liferay.portlet.journal.FeedNameException" %><%@
+page import="com.liferay.portlet.journal.FeedTargetLayoutFriendlyUrlException" %><%@
+page import="com.liferay.portlet.journal.FeedTargetPortletIdException" %><%@
+page import="com.liferay.portlet.journal.FolderNameException" %><%@
+page import="com.liferay.portlet.journal.NoSuchArticleException" %><%@
+page import="com.liferay.portlet.journal.NoSuchFolderException" %><%@
+page import="com.liferay.portlet.journal.model.JournalArticleResource" %><%@
+page import="com.liferay.portlet.journal.model.JournalFeed" %><%@
+page import="com.liferay.portlet.journal.model.JournalFeedConstants" %><%@
+page import="com.liferay.portlet.journal.model.JournalFolder" %><%@
+page import="com.liferay.portlet.journal.model.JournalFolderConstants" %><%@
+page import="com.liferay.portlet.journal.model.JournalSearchConstants" %><%@
+page import="com.liferay.portlet.journal.model.impl.JournalArticleImpl" %><%@
+page import="com.liferay.portlet.journal.search.ArticleDisplayTerms" %><%@
+page import="com.liferay.portlet.journal.search.EntriesChecker" %><%@
+page import="com.liferay.portlet.journal.search.FeedDisplayTerms" %><%@
+page import="com.liferay.portlet.journal.search.FeedSearch" %><%@
+page import="com.liferay.portlet.journal.search.FeedSearchTerms" %><%@
+page import="com.liferay.portlet.journal.service.JournalArticleResourceLocalServiceUtil" %><%@
+page import="com.liferay.portlet.journal.service.JournalFeedLocalServiceUtil" %><%@
+page import="com.liferay.portlet.journal.service.JournalFolderLocalServiceUtil" %><%@
+page import="com.liferay.portlet.journal.service.JournalFolderServiceUtil" %><%@
+page import="com.liferay.portlet.journal.service.permission.JournalArticlePermission" %><%@
+page import="com.liferay.portlet.journal.service.permission.JournalFeedPermission" %><%@
+page import="com.liferay.portlet.journal.service.permission.JournalFolderPermission" %><%@
+page import="com.liferay.portlet.journal.service.permission.JournalPermission" %><%@
+page import="com.liferay.portlet.journal.util.JournalConverterUtil" %><%@
+page import="com.liferay.portlet.journal.util.JournalUtil" %><%@
+page import="com.liferay.util.RSSUtil" %>
+
+<%
+PortalPreferences portalPreferences = PortletPreferencesFactoryUtil.getPortalPreferences(liferayPortletRequest);
+
+String[] displayViews = StringUtil.split(PrefsParamUtil.getString(portletPreferences, liferayPortletRequest, "displayViews", StringUtil.merge(PropsValues.JOURNAL_DISPLAY_VIEWS)));
+
+Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(locale, timeZone);
+%>
+
+<%@ include file="/html/portlet/journal/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/js/main.js b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/js/main.js
new file mode 100644
index 0000000..e7f33f0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/js/main.js
@@ -0,0 +1,1945 @@
+AUI.add(
+	'liferay-portlet-journal',
+	function(A) {
+		var D = A.DataType;
+		var JSON = A.JSON;
+		var Lang = A.Lang;
+
+		var generateInstanceId = function() {
+			var instanceId = '';
+
+			var key = Liferay.Portlet.Journal.PROXY.instanceIdKey;
+
+			for (var i = 0; i < 8; i++) {
+				var pos = Math.floor(Math.random() * key.length);
+
+				instanceId += key.substring(pos, pos + 1);
+			}
+
+			return instanceId;
+		};
+
+		var getUID = function() {
+			return (++ A.Env._uidx);
+		};
+
+		var TPL_FIELD_CONTAINER = '<div><li class="structure-field {cssClass}">' +
+				'<span class="journal-article-close"></span>' +
+				'<span class="folder">' +
+					'<div class="field-container">' +
+						'<input class="journal-article-localized" type="hidden" value="false" />' +
+						'<div class="journal-article-move-handler"></div>' +
+						'<label for="" class="journal-article-field-label"><span>{fieldLabel}</span></label>' +
+						'<div class="journal-article-component-container"></div>' +
+						'<span class="field field-choice journal-article-localized-checkbox">' +
+							'<span class="field-content">' +
+								'<span class="field-element field-label-right">' +
+									'<input type="hidden" value="false" name="{portletNamespace}{instanceId}localized-checkbox">' +
+									'<input type="checkbox" onclick="Liferay.Util.updateCheckboxValue(this); " name="{portletNamespace}{instanceId}localized-checkboxCheckbox" id="{portletNamespace}{instanceId}localized-checkboxCheckbox"> </span>' +
+									'<label for="{portletNamespace}{instanceId}localized-checkboxCheckbox">{localizedLabelLanguage}</label>' +
+								'</span>' +
+							'</span>' +
+						'<div class="alert alert-error journal-article-required-message">{requiredFieldLanguage}</div>' +
+						'<div class="journal-article-buttons {articleButtonsRowCSSClass}">' +
+							'<span class="field field-inline field-text journal-article-variable-name">' +
+								'<span class="field-content">' +
+									'<label for="{portletNamespace}{instanceId}variableName">{variableNameLanguage}</label>' +
+									'<span class="field-element ">' +
+										'<input type="text" size="25" value="{variableName}" name="{portletNamespace}variableName" id="{portletNamespace}{instanceId}variableName">' +
+									'</span>' +
+								'</span>' +
+							'</span>' +
+							'{editButtonTemplateHTML}' +
+							'{repeatableButtonTemplateHTML}' +
+						'</div>' +
+					'</div>' +
+					'<ul class="folder-droppable"></ul>' +
+				'</span>' +
+			'</li></div>';
+
+		var TPL_HELPER = '<div id="{0}" class="journal-article-helper not-intersecting">' +
+			'<div class="journal-component"></div>' +
+			'<div class="forbidden-action"></div>' +
+		'</div>';
+
+		var TPL_INSTRUCTIONS_CONTAINER = '<div class="alert alert-info journal-article-instructions-container journal-article-instructions-message"></div>';
+
+		var TPL_STRUCTURE_FIELD_INPUT = '<input class="lfr-input-text" type="text" value="" size="40"/>';
+
+		var TPL_TOOLTIP_IMAGE = '<img align="top" class="journal-article-instructions-container" src="' + themeDisplay.getPathThemeImages() + '/portlet/help.png" />';
+
+		var fieldsDataSet = new A.DataSet();
+
+		var Journal = function(portletNamespace, articleId) {
+			var instance = this;
+
+			instance.articleId = articleId;
+			instance.timers = {};
+			instance.portletNamespace = portletNamespace;
+
+			instance._helperId = instance._getNamespacedId('journalArticleHelper', instance.portletNamespace, '');
+
+			var helperHTML = Lang.sub(TPL_HELPER, [instance._helperId]);
+
+			instance._helper = A.Node.create(helperHTML);
+
+			instance._helper.appendTo(document.body);
+
+			instance.acceptChildren = true;
+
+			instance._attachDelegatedEvents();
+			instance._attachEvents();
+		};
+
+		Journal.prototype = {
+			canDrop: function(source) {
+				var instance = this;
+
+				var componentType = instance.getComponentType(source);
+
+				var canDrop = true;
+
+				if ((componentType == 'list') || (componentType == 'multi-list')) {
+					canDrop = false;
+				}
+				else if (source.hasClass('repeated-field') || source.hasClass('parent-structure-field')) {
+					canDrop = false;
+				}
+
+				return canDrop;
+			},
+
+			displayTemplateMessage: function() {
+				var instance = this;
+
+				var templateMessage = Liferay.Language.get('please-add-a-template-to-render-this-structure');
+
+				alert(templateMessage);
+
+				instance.showMessage(
+					instance.getById('selectTemplateMessage'),
+					'info',
+					templateMessage,
+					30000
+				);
+
+				var selectTemplateButton = instance.getById('selectTemplateButton');
+
+				if (selectTemplateButton) {
+					selectTemplateButton.focus();
+				}
+			},
+
+			getById: function(id, namespace) {
+				var instance = this;
+
+				return A.one(
+					instance._getNamespacedId(id, namespace)
+				);
+			},
+
+			getByName: function(currentForm, name, withoutNamespace) {
+				var instance = this;
+
+				var inputName = withoutNamespace ? name : instance.portletNamespace + name;
+
+				return A.one(currentForm).one('[name=' + inputName + ']');
+			},
+
+			getComponentType: function(source) {
+				return source.attr('dataType');
+			},
+
+			getDefaultLocale: function() {
+				var instance = this;
+
+				var defaultLocale = instance.getById('defaultLocale');
+
+				if (defaultLocale) {
+					defaultLocale = defaultLocale.val();
+				}
+
+				return defaultLocale;
+			},
+
+			getFieldInstance: function(source) {
+				var instance = this;
+
+				var id = source.get('id');
+
+				return fieldsDataSet.item(id);
+			},
+
+			getFields: function() {
+				var instance = this;
+
+				var structureTreeId = instance._getNamespacedId('#structureTree');
+
+				return A.all(structureTreeId + ' li');
+			},
+
+			getGroupId: function() {
+				var instance = this;
+
+				var groupId = themeDisplay.getScopeGroupId();
+
+				if (instance.articleId) {
+					var form = instance.getPrincipalForm();
+
+					var inputGroupId = instance.getByName(form, 'groupId');
+					var inputGroupIdVal = inputGroupId.val();
+
+					if (inputGroupIdVal) {
+						groupId = inputGroupIdVal;
+					}
+				}
+
+				return groupId;
+			},
+
+			getRepeatedSiblings: function(fieldInstance) {
+				var instance = this;
+
+				var structureTreeId = instance._getNamespacedId('#structureTree');
+				var selector = structureTreeId + ' li[dataName=' + fieldInstance.get('variableName') + '].repeated-field';
+
+				return A.all(selector);
+			},
+
+			getSaveDialog: function(openCallback) {
+				var instance = this;
+
+				if (!instance._saveDialog) {
+					var saveStructureTemplateDialog = instance.getById('saveStructureTemplateDialog');
+					var htmlTemplate = saveStructureTemplateDialog.html();
+					var title = Liferay.Language.get('editing-structure-details');
+
+					var form = instance.getPrincipalForm();
+
+					var groupId = instance.getByName(form, 'groupId');
+					var structureIdInput = instance.getByName(form, 'structureId');
+					var structureNameInput = instance.getByName(form, 'structureName');
+					var structureDescriptionInput = instance.getByName(form, 'structureDescription');
+					var storedStructureXSD = instance.getByName(form, 'structureXSD');
+
+					var saveCallback = function() {
+						var dialogFields = instance._saveDialog.fields;
+
+						instance.showMessage(
+							dialogFields.messageElement,
+							'info',
+							Liferay.Language.get('waiting-for-an-answer')
+						);
+
+						var form = instance.getPrincipalForm();
+
+						var structureIdInput = instance.getByName(form, 'structureId');
+						var structureId = structureIdInput.val();
+
+						if (!structureId) {
+							var autoGenerateId = dialogFields.saveStructureAutogenerateIdCheckbox.get('checked');
+
+							instance.addStructure(
+								groupId.val(),
+								dialogFields.dialogStructureId.val(),
+								autoGenerateId,
+								dialogFields.dialogStructureName.val(),
+								dialogFields.dialogDescription.val(),
+								dialogFields.contentXSD,
+								serviceCallback
+							);
+						}
+						else {
+							instance.updateStructure(
+								dialogFields.dialogStructureGroupId.val(),
+								dialogFields.dialogStructureId.val(),
+								instance.getParentStructureId(),
+								dialogFields.dialogStructureName.val(),
+								dialogFields.dialogDescription.val(),
+								dialogFields.contentXSD,
+								serviceCallback
+							);
+						}
+					};
+
+					instance._saveDialog = Liferay.Util.Window.getWindow(
+						{
+							dialog: {
+								bodyContent: htmlTemplate,
+								toolbars: {
+									footer: [
+										{
+											label: Liferay.Language.get('save'),
+											on: {
+												click: saveCallback
+											}
+										},
+										{
+											label: Liferay.Language.get('cancel'),
+											on: {
+												click: function() {
+													instance._saveDialog.hide();
+												}
+											}
+										}
+									]
+								}
+							},
+							title: title
+						}
+					);
+
+					instance._saveDialog.fields = {
+						autoGenerateIdMessage: Liferay.Language.get('autogenerate-id'),
+						contentXSD: '',
+						dialogDescription: instance.getById('saveStructureStructureDescription'),
+						dialogStructureGroupId: instance.getById('saveStructureStructureGroupId'),
+						dialogStructureId: instance.getById('saveStructureStructureId'),
+						dialogStructureName: instance.getById('saveStructureStructureName'),
+						idInput: instance.getById('saveStructureStructureId'),
+						loadDefaultStructure: instance.getById('loadDefaultStructure'),
+						messageElement: instance.getById('saveStructureMessage'),
+						saveStructureAutogenerateId: instance.getById('saveStructureAutogenerateId'),
+						saveStructureAutogenerateIdCheckbox: instance.getById('saveStructureAutogenerateIdCheckbox'),
+						showStructureIdContainer: instance.getById('showStructureIdContainer'),
+						structureIdContainer: instance.getById('structureIdContainer'),
+						structureNameLabel: instance.getById('structureNameLabel')
+					};
+
+					var dialogFields = instance._saveDialog.fields;
+
+					var serviceCallback = function(message) {
+						var exception = message.exception;
+
+						if (!exception) {
+							structureDescriptionInput.val(dialogFields.dialogDescription.val());
+							structureIdInput.val(message.structureId);
+							structureNameInput.val(dialogFields.dialogStructureName.val());
+							storedStructureXSD.val(dialogFields.contentXSD);
+
+							dialogFields.dialogStructureGroupId.val(message.structureGroupId);
+							dialogFields.dialogStructureId.val(message.structureId);
+							dialogFields.structureNameLabel.html(Liferay.Util.escapeHTML(dialogFields.dialogStructureName.val()));
+							dialogFields.saveStructureAutogenerateIdCheckbox.hide();
+
+							if (dialogFields.loadDefaultStructure) {
+								dialogFields.loadDefaultStructure.show();
+							}
+
+							dialogFields.dialogStructureId.attr('disabled', 'disabled');
+
+							instance.showMessage(
+								dialogFields.messageElement,
+								'success',
+								Liferay.Language.get('your-request-processed-successfully')
+							);
+
+							var structureMessage = instance.getById('structureMessage');
+
+							structureMessage.hide();
+						}
+						else {
+							var errorMessage = instance._translateErrorMessage(exception);
+
+							instance.showMessage(
+								dialogFields.messageElement,
+								'error',
+								errorMessage
+							);
+						}
+					};
+
+					dialogFields.saveStructureAutogenerateIdCheckbox.on(
+						'click',
+						function(event) {
+							var checkbox = event.target;
+							var value = checkbox.get('checked');
+
+							dialogFields.saveStructureAutogenerateId.val(value);
+
+							if (value) {
+								dialogFields.dialogStructureId.attr('disabled', 'disabled').val(dialogFields.autoGenerateIdMessage);
+							}
+							else {
+								dialogFields.dialogStructureId.attr('disabled', '').val('');
+							}
+						}
+					);
+
+					dialogFields.showStructureIdContainer.on(
+						'click',
+						function(event) {
+							dialogFields.structureIdContainer.toggle();
+
+							event.halt();
+						}
+					);
+
+					dialogFields.dialogStructureName.focus();
+				}
+				else {
+					instance._saveDialog.show();
+				}
+
+				if (openCallback) {
+					openCallback.apply(instance, [instance._saveDialog]);
+				}
+			},
+
+			getSelectedField: function() {
+				var instance = this;
+
+				var selected = null;
+				var fields = instance.getFields();
+
+				if (fields) {
+					selected = fields.filter('.selected');
+				}
+
+				return selected ? selected.item(0) : null;
+			},
+
+			getSourceByNode: function(node) {
+				var instance = this;
+
+				return node.ancestor('li', true);
+			},
+
+			getPrincipalFieldElement: function(source) {
+				var instance = this;
+
+				var componentContainer = source.one('div.journal-article-component-container');
+
+				return componentContainer.one('input');
+			},
+
+			getPrincipalForm: function(formName) {
+				var instance = this;
+
+				return A.one('form[name=' + instance.portletNamespace + (formName || 'fm1') + ']');
+			},
+
+			getNodeTypeContent: function() {
+				var instance = this;
+
+				return instance.hasStructure() ? 'dynamic-content' : 'static-content';
+			},
+
+			hasStructure: function() {
+				var instance = this;
+
+				var form = instance.getPrincipalForm();
+
+				var structureId = instance.getByName(form, 'structureId');
+
+				return structureId && structureId.val();
+			},
+
+			hasTemplate: function() {
+				var instance = this;
+
+				var form = instance.getPrincipalForm();
+
+				var templateId = instance.getByName(form, 'templateId');
+
+				return templateId && templateId.val();
+			},
+
+			loadDefaultStructure: function() {
+				var instance = this;
+
+				var form = instance.getPrincipalForm();
+
+				var structureIdInput = instance.getByName(form, 'structureId');
+				var templateIdInput = instance.getByName(form, 'templateId');
+
+				structureIdInput.val('');
+				templateIdInput.val('');
+
+				submitForm(form, null, false, false);
+			},
+
+			normalizeValue: function(value) {
+				var instance = this;
+
+				if (Lang.isUndefined(value)) {
+					value = '';
+				}
+
+				return value;
+			},
+
+			openPopupWindow: function(url, title, id) {
+				var instance = this;
+
+				Liferay.Util.openWindow(
+					{
+						id: instance.portletNamespace + id,
+						title: title,
+						uri: url
+					}
+				);
+			},
+
+			openSaveStructureDialog: function() {
+				var instance = this;
+
+				var form = instance.getPrincipalForm();
+
+				var structureIdInput = instance.getByName(form, 'structureId');
+				var structureNameInput = instance.getByName(form, 'structureName');
+				var structureDescriptionInput = instance.getByName(form, 'structureDescription');
+
+				var structureId = structureIdInput.val();
+
+				instance.getSaveDialog(
+					function(dialog) {
+						var dialogFields = dialog.fields;
+
+						dialogFields.dialogStructureName.val(structureNameInput.val());
+						dialogFields.dialogDescription.val(structureDescriptionInput.val());
+						dialogFields.dialogStructureId.attr('disabled', 'disabled').val(dialogFields.autoGenerateIdMessage);
+
+						if (structureId) {
+							dialogFields.saveStructureAutogenerateId.hide();
+							dialogFields.dialogStructureId.val(structureIdInput.val());
+						}
+
+						dialog.show();
+
+						dialog._setAlignCenter(true);
+					}
+				);
+			},
+
+			saveArticle: function(cmd) {
+				var instance = this;
+
+				var form = instance.getPrincipalForm();
+
+				if (instance.hasStructure() && !instance.hasTemplate() && !instance.updateStructureDefaultValues()) {
+					instance.displayTemplateMessage();
+				}
+				else {
+					if (!cmd) {
+						cmd = instance.articleId ? 'update' : 'add';
+					}
+
+					var articleIdInput = instance.getByName(form, 'articleId');
+					var classNameIdInput = instance.getByName(form, 'classNameId');
+					var cmdInput = instance.getByName(form, 'cmd');
+					var contentInput = instance.getByName(form, 'content');
+					var newArticleIdInput = instance.getByName(form, 'newArticleId');
+					var workflowActionInput = instance.getByName(form, 'workflowAction');
+
+					var classNameId = Liferay.Util.toNumber(classNameIdInput.val());
+
+					var canSubmit = classNameId || instance.validateRequiredFields();
+
+					if (canSubmit) {
+						if (cmd == 'publish') {
+							workflowActionInput.val(Liferay.Workflow.ACTION_PUBLISH);
+
+							cmd = instance.articleId ? 'update' : 'add';
+						}
+
+						cmdInput.val(cmd);
+
+						if (!instance.articleId) {
+							articleIdInput.val(newArticleIdInput.val());
+						}
+
+						submitForm(form);
+					}
+				}
+			},
+
+			showMessage: function(selector, type, message, delay) {
+				var instance = this;
+
+				var journalMessage = A.one(selector);
+				var className = 'save-structure-message alert alert-' + (type || 'success');
+
+				journalMessage.attr('className', className);
+				journalMessage.show();
+
+				if (instance.editContainerContextPanel) {
+					instance.editContainerContextPanel.refreshAlign();
+				}
+
+				if (message) {
+					journalMessage.html(message);
+				}
+
+				instance.timers[selector] = A.later(
+					delay || 5000,
+					instance,
+					function() {
+						journalMessage.hide();
+
+						if (instance.editContainerContextPanel) {
+							instance.editContainerContextPanel.refreshAlign();
+						}
+					}
+				);
+			},
+
+			translateArticle: function() {
+				var instance = this;
+
+				var form = instance.getPrincipalForm();
+
+				var cmdInput = instance.getByName(form, 'cmd');
+
+				cmdInput.val('translate');
+
+				submitForm(form);
+			},
+
+			unselectFields: function() {
+				var instance = this;
+
+				var selected = instance.getSelectedField();
+
+				if (selected) {
+					selected.removeClass('selected');
+				}
+			},
+
+			updateStructureDefaultValues: function() {
+				var instance = this;
+
+				var form = instance.getPrincipalForm();
+
+				var classNameId = instance.getByName(form, 'classNameId');
+
+				return (classNameId && classNameId.val() > 0);
+			},
+
+			validateRequiredFields: function() {
+				var instance = this;
+
+				var canSubmit = true;
+				var firstEmptyField = null;
+
+				var structureTreeId = instance._getNamespacedId('#structureTree');
+				var fields = A.all(structureTreeId + ' li');
+				var requiredFields = fields.filter('[dataRequired=true]');
+				var fieldsConatainer = A.all(structureTreeId + ' li .field-container');
+
+				fieldsConatainer.removeClass('required-field');
+
+				A.each(
+					requiredFields,
+					function(item, index, collection) {
+						var fieldInstance = instance.getFieldInstance(item);
+						var content = fieldInstance.getContent(item);
+
+						if (!content) {
+							var fieldConatainer = item.one('.field-container');
+
+							fieldConatainer.addClass('required-field');
+
+							if (canSubmit) {
+								firstEmptyField = instance.getPrincipalFieldElement(item);
+							}
+
+							canSubmit = false;
+						}
+					}
+				);
+
+				if (firstEmptyField) {
+					firstEmptyField.focus();
+				}
+
+				return canSubmit;
+			},
+
+			_appendStructureChildren: function(source, buffer, generateArticleContent) {
+				var instance = this;
+
+				var selector = '> span.folder > ul > li';
+
+				if (!generateArticleContent) {
+					selector += '.structure-field:not(.repeated-field):not(.parent-structure-field)';
+				}
+
+				var children = source.all(selector);
+
+				A.each(
+					children,
+					function(item, index, collection) {
+						instance._appendStructureTypeElementAndMetaData(item, buffer, generateArticleContent);
+					}
+				);
+			},
+
+			_appendStructureTypeElementAndMetaData: function(source, buffer, generateArticleContent) {
+				var instance = this;
+
+				var fieldInstance = instance.getFieldInstance(source);
+
+				if (fieldInstance) {
+					var typeElement;
+					var type = fieldInstance.get('fieldType');
+					var indexType = fieldInstance.get('indexType');
+
+					if (generateArticleContent) {
+						var instanceId = fieldInstance.get('instanceId');
+
+						if (!instanceId) {
+							instanceId = generateInstanceId();
+							fieldInstance.set('instanceId', instanceId);
+						}
+
+						typeElement = instance._createDynamicNode(
+							'dynamic-element',
+							{
+								'instance-id': instanceId,
+								name: Liferay.Util.escapeHTML(fieldInstance.get('variableName')),
+								type: Liferay.Util.escapeHTML(type),
+								'index-type': indexType
+							}
+						);
+					}
+					else {
+						typeElement = instance._createDynamicNode(
+							'dynamic-element',
+							{
+								name: Liferay.Util.escapeHTML(fieldInstance.get('variableName')),
+								type: Liferay.Util.escapeHTML(type),
+								'index-type': indexType,
+								repeatable: fieldInstance.get('repeatable')
+							}
+						);
+					}
+
+					var dynamicContentAttrs = null;
+
+					if (fieldInstance.get('localized')) {
+						var localizedValue = fieldInstance.get('localizedValue');
+
+						if (localizedValue !== 'false') {
+							dynamicContentAttrs = {
+								'language-id': localizedValue
+							};
+						}
+					}
+
+					var nodeTypeContent = instance.getNodeTypeContent();
+					var typeContent = instance._createDynamicNode(nodeTypeContent, dynamicContentAttrs);
+					var metadata = instance._createDynamicNode('meta-data');
+
+					var entryInstructions = instance._createDynamicNode(
+						'entry',
+						{
+							name: 'instructions'
+						}
+					);
+
+					var entryRequired = instance._createDynamicNode(
+						'entry',
+						{
+							name: 'required'
+						}
+					);
+
+					var displayAsTooltip = instance._createDynamicNode(
+						'entry',
+						{
+							name: 'displayAsTooltip'
+						}
+					);
+
+					var label = instance._createDynamicNode(
+						'entry',
+						{
+							name: 'label'
+						}
+					);
+
+					var predefinedValue = instance._createDynamicNode(
+						'entry',
+						{
+							name: 'predefinedValue'
+						}
+					);
+
+					buffer.push(typeElement.openTag);
+
+					if (!generateArticleContent) {
+						instance._appendStructureFieldOptionsBuffer(source, buffer);
+					}
+
+					instance._appendStructureChildren(source, buffer, generateArticleContent);
+
+					if (!generateArticleContent) {
+						buffer.push(metadata.openTag);
+
+						var displayAsTooltipVal = instance.normalizeValue(
+							fieldInstance.get('displayAsTooltip')
+						);
+
+						buffer.push(
+							displayAsTooltip.openTag,
+							'<![CDATA[' + displayAsTooltipVal + ']]>',
+							displayAsTooltip.closeTag
+						);
+
+						var requiredVal = instance.normalizeValue(
+							fieldInstance.get('required')
+						);
+
+						buffer.push(
+							entryRequired.openTag,
+							'<![CDATA[' + requiredVal + ']]>',
+							entryRequired.closeTag
+						);
+
+						var instructionsVal = instance.normalizeValue(
+							fieldInstance.get('instructions')
+						);
+
+						buffer.push(
+							entryInstructions.openTag,
+							'<![CDATA[' + instructionsVal + ']]>',
+							entryInstructions.closeTag
+						);
+
+						var fieldLabelVal = instance.normalizeValue(
+							fieldInstance.get('fieldLabel')
+						);
+
+						buffer.push(
+							label.openTag,
+							'<![CDATA[' + fieldLabelVal + ']]>',
+							label.closeTag
+						);
+
+						var predefinedValueVal = instance.normalizeValue(
+							fieldInstance.get('predefinedValue')
+						);
+
+						buffer.push(
+							predefinedValue.openTag,
+							'<![CDATA[' + predefinedValueVal + ']]>',
+							predefinedValue.closeTag,
+							metadata.closeTag
+						);
+					}
+					else if (generateArticleContent) {
+						buffer.push(typeContent.openTag);
+
+						var appendOptions = (type == 'list') || (type == 'multi-list');
+
+						if (appendOptions) {
+							instance._appendStructureFieldOptionsBuffer(source, buffer, generateArticleContent);
+						}
+						else {
+							var content = fieldInstance.getContent(source) || '';
+
+							buffer.push('<![CDATA[' + content + ']]>');
+						}
+
+						buffer.push(typeContent.closeTag);
+					}
+
+					buffer.push(typeElement.closeTag);
+				}
+			},
+
+			_appendStructureFieldOptionsBuffer: function(source, buffer, generateArticleContent) {
+				var instance = this;
+
+				var fieldInstance = instance.getFieldInstance(source);
+				var type = fieldInstance.get('fieldType');
+				var optionsList = source.all('> .folder > .field-container > .journal-article-component-container > .journal-list-subfield option');
+
+				if (optionsList) {
+					A.each(
+						optionsList,
+						function(item, index, collection) {
+							var optionKey = item.text();
+							var optionValue = item.val();
+
+							if (!generateArticleContent) {
+								var typeElementOption = instance._createDynamicNode(
+									'dynamic-element',
+									{
+										name: Liferay.Util.escapeHTML(optionKey),
+										type: Liferay.Util.escapeHTML(optionValue),
+										'repeatable': fieldInstance.get('repeatable')
+									}
+								);
+
+								buffer.push(typeElementOption.openTag + typeElementOption.closeTag);
+							}
+							else {
+								if (item.get('selected')) {
+									var multiList = (type == 'multi-list');
+									var option = instance._createDynamicNode('option');
+
+									if (multiList) {
+										buffer.push(option.openTag);
+									}
+
+									buffer.push('<![CDATA[' + Liferay.Util.escapeCDATA(optionValue) + ']]>');
+
+									if (multiList) {
+										buffer.push(option.closeTag);
+									}
+								}
+							}
+						}
+					);
+				}
+			},
+
+			_attachDelegatedEvents: function() {
+				var instance = this;
+
+				var container = instance.getById('journalArticleContainer');
+
+				var addListItem = function(event) {
+					var icon = event.currentTarget;
+					var iconParent = icon.get('parentNode');
+					var select = iconParent.get('parentNode').one('select');
+					var keyInput = iconParent.one('input.journal-list-key');
+					var key = keyInput.val();
+					var valueInput = iconParent.one('input.journal-list-value');
+					var value = valueInput.val();
+
+					if (key && value) {
+						var options = select.all('option');
+
+						options.each(
+							function(item, index, collection) {
+								var keyText = Lang.trim(key);
+								var itemText = Lang.trim(item.text());
+
+								if (itemText.toLowerCase() == keyText.toLowerCase()) {
+									item.remove();
+								}
+							}
+						);
+
+						var option = A.Node.create(TPL_OPTION).val(value).text(key);
+
+						select.append(option);
+						option.attr('selected', 'selected');
+						keyInput.val('').focus();
+						valueInput.val('value');
+					}
+					else {
+						keyInput.focus();
+					}
+				};
+
+				var keyPressAddItem = function(event) {
+					var btnScope = event.currentTarget.get('parentNode').one('span.journal-add-field');
+
+					if (event.isKey('ENTER')) {
+						event.currentTarget = btnScope;
+
+						addListItem.apply(event.currentTarget, arguments);
+					}
+				};
+
+				var removeListItem = function(event) {
+					var icon = event.currentTarget;
+					var select = icon.get('parentNode').one('select').focus();
+					var options = select.all('option');
+
+					options.each(
+						function(item, index, collection) {
+							if (item.attr('selected')) {
+								item.remove();
+							}
+						}
+					);
+				};
+
+				container.delegate(
+					'click',
+					function(event) {
+						var checkbox = event.currentTarget;
+						var source = instance.getSourceByNode(checkbox);
+
+						instance._updateLocaleState(source, checkbox);
+					},
+					'.journal-article-localized-checkbox input'
+				);
+
+				container.delegate('keypress', keyPressAddItem, '.journal-list-key, .journal-list-value');
+				container.delegate('click', addListItem, '.journal-add-field');
+				container.delegate('click', removeListItem, '.journal-delete-field');
+
+				container.delegate(
+					'click',
+					function(event) {
+						var button = event.currentTarget;
+						var buttonValue = null;
+						var imagePreview = button.ancestor('.journal-image-preview');
+						var imageWrapper = imagePreview.one('.journal-image-wrapper');
+						var imageDelete = instance.getByName(imagePreview, 'journalImageDelete');
+
+						if (imageDelete.val() == '') {
+							imageDelete.val('delete');
+							imageWrapper.hide();
+
+							buttonValue = Liferay.Language.get('cancel');
+						}
+						else {
+							imageDelete.val('');
+							imageWrapper.show();
+
+							buttonValue = Liferay.Language.get('delete');
+						}
+
+						button.val(buttonValue);
+					},
+					'#' + instance.portletNamespace + 'journalImageDeleteButton'
+				);
+
+				container.delegate(
+					'click',
+					function(event) {
+						var link = event.currentTarget;
+						var imagePreviewDiv = link.get('parentNode').get('parentNode').one('.journal-image-preview');
+
+						var showLabel = link.one('.show-label').show();
+						var hideLabel = link.one('.hide-label').show();
+
+						var visible = imagePreviewDiv.hasClass('hide');
+
+						if (visible) {
+							showLabel.hide();
+							hideLabel.show();
+						}
+						else {
+							showLabel.show();
+							hideLabel.hide();
+						}
+
+						imagePreviewDiv.toggle();
+					},
+					'.journal-image-link'
+				);
+
+				container.delegate(
+					'click',
+					function(event) {
+						var button = event.currentTarget;
+						var input = button.ancestor('.journal-article-component-container').one('input');
+						var selectUrl = button.attr('data-documentlibraryUrl');
+
+						window[instance.portletNamespace + 'selectDocumentLibrary'] = function(url) {
+							input.val(url);
+						};
+
+						instance.openPopupWindow(selectUrl, Liferay.Language.get('javax.portlet.title.20'), 'selectDocumentLibrary');
+					},
+					'.journal-documentlibrary-button'
+				);
+
+				container.delegate(
+					'mouseover',
+					function(event) {
+						var image = event.currentTarget;
+						var source = instance.getSourceByNode(image);
+						var fieldInstance = instance.getFieldInstance(source);
+
+						if (fieldInstance) {
+							var instructions = fieldInstance.get('instructions');
+
+							Liferay.Portal.ToolTip.show(this, Liferay.Util.escapeHTML(instructions));
+						}
+					},
+					'img.journal-article-instructions-container'
+				);
+
+				var variableNameSelector = '[name="' + instance.portletNamespace + 'variableName"]';
+
+				container.delegate('keypress', A.bind('_onKeypressVariableName', instance), variableNameSelector);
+				container.delegate('keyup', A.bind('_onKeyupVariableName', instance), variableNameSelector);
+
+				instance._attachDelegatedEvents = Lang.emptyFn;
+			},
+
+			_attachEvents: function() {
+				var instance = this;
+
+				var changeStructureButton = instance.getById('changeStructureButton');
+				var editStructureLink = instance.getById('editStructureLink');
+				var loadDefaultStructureButton = instance.getById('loadDefaultStructure');
+				var publishButton = instance.getById('publishButton');
+				var saveButton = instance.getById('saveButton');
+				var translateButton = instance.getById('translateButton');
+
+				if (changeStructureButton) {
+					changeStructureButton.detach('click');
+
+					changeStructureButton.on(
+						'click',
+						function(event) {
+							event.preventDefault();
+
+							var url = event.currentTarget.attr('href');
+
+							instance.openPopupWindow(url, 'ChangeStructure', 'changeStruture');
+						}
+					);
+				}
+
+				if (editStructureLink) {
+					editStructureLink.detach('click');
+
+					editStructureLink.on(
+						'click',
+						function(event) {
+							Liferay.set('controlPanelSidebarHidden', true);
+
+							instance._attachEditContainerEvents();
+
+							instance.enableEditMode();
+						}
+					);
+				}
+
+				if (loadDefaultStructureButton) {
+					loadDefaultStructureButton.detach('click');
+
+					loadDefaultStructureButton.on(
+						'click',
+						function() {
+							instance.loadDefaultStructure();
+						}
+					);
+				}
+			},
+
+			_createDynamicNode: function(nodeName, attributeMap) {
+				var instance = this;
+
+				var attrs = [];
+
+				if (!nodeName) {
+					nodeName = 'dynamic-element';
+				}
+
+				var typeElementModel = ['<', nodeName, (attributeMap ? ' ' : ''), , '>', ,'</', nodeName, '>'];
+
+				A.each(
+					attributeMap || {},
+					function(item, index, collection) {
+						if (item !== undefined) {
+							attrs.push([index, '="', item, '" '].join(''));
+						}
+					}
+				);
+
+				typeElementModel[3] = attrs.join('').replace(/[\s]+$/g, '');
+				typeElement = typeElementModel.join('').replace(/></, '>><<').replace(/ +>/, '>').split(/></);
+
+				return {
+					closeTag: typeElement[1],
+					openTag: typeElement[0]
+				};
+			},
+
+			_getNamespacedId: function(id, namespace, prefix) {
+				var instance = this;
+
+				if (!Lang.isString(namespace)) {
+					namespace = instance.portletNamespace;
+				}
+
+				if (!Lang.isString(prefix)) {
+					prefix = '#';
+				}
+
+				id = id.replace(/^#/, '');
+
+				return prefix + namespace + id;
+			},
+
+			_updateLocaleState: function(source, checkbox) {
+				var instance = this;
+
+				var isLocalized = checkbox.get('checked');
+				var defaultLocale = instance.getDefaultLocale();
+				var localizedValue = source.one('.journal-article-localized');
+
+				var selectedLocale = defaultLocale;
+
+				var setLocalizedValue = function(value) {
+					if (localizedValue) {
+						localizedValue.val(value);
+					}
+				};
+
+				if (isLocalized) {
+					setLocalizedValue(selectedLocale);
+				}
+				else if (!confirm(Liferay.Language.get('unchecking-this-field-will-remove-localized-data-for-languages-not-shown-in-this-view'))) {
+					checkbox.attr('checked', true);
+
+					setLocalizedValue(selectedLocale);
+				}
+				else {
+					setLocalizedValue(false);
+				}
+
+				var fieldInstance = instance.getFieldInstance(source);
+
+				fieldInstance.set('localized', checkbox.get('checked'));
+
+				fieldInstance.setInstanceId(fieldInstance.get('instanceId'));
+			}
+		};
+
+		A.augment(Journal, A.EventTarget);
+
+		var StructureField = A.Component.create(
+			{
+				ATTRS: {
+					content: {
+						validator: Lang.isString,
+						value: ''
+					},
+
+					displayAsTooltip: {
+						setter: function(v) {
+							var instance = this;
+
+							return instance.setAttribute('displayAsTooltip', D.Boolean.parse(v));
+						},
+						valueFn: function() {
+							var instance = this;
+
+							return instance.getAttribute('displayAsTooltip', true);
+						}
+					},
+
+					fieldLabel: {
+						setter: function(v) {
+							var instance = this;
+
+							return instance.setFieldLabel(v);
+						},
+						valueFn: function() {
+							var instance = this;
+
+							return instance.getAttribute('fieldLabel', '');
+						}
+					},
+
+					fieldType: {
+						setter: function(v) {
+							var instance = this;
+
+							return instance.setAttribute('fieldType', v);
+						},
+						validator: Lang.isString,
+						value: ''
+					},
+
+					localized: {
+						valueFn: function() {
+							var instance = this;
+
+							var localizedValue = instance.getLocalizedValue();
+
+							return (String(localizedValue) == 'true');
+						}
+					},
+
+					localizedValue: {
+						getter: function() {
+							var instance = this;
+
+							return instance.getLocalizedValue();
+						}
+					},
+
+					indexType: {
+						setter: function(v) {
+							var instance = this;
+
+							return instance.setAttribute('IndexType', v);
+						},
+						valueFn: function() {
+							var instance = this;
+
+							return instance.getAttribute('IndexType', '');
+						}
+					},
+
+					innerHTML: {
+						validator: Lang.isString,
+						value: TPL_STRUCTURE_FIELD_INPUT
+					},
+
+					instructions: {
+						setter: function(v) {
+							var instance = this;
+
+							return instance.setInstructions(v);
+						},
+						valueFn: function() {
+							var instance = this;
+
+							return instance.getAttribute('instructions', '');
+						}
+					},
+
+					instanceId: {
+						setter: function(v) {
+							var instance = this;
+
+							return instance.setInstanceId(v);
+						},
+						valueFn: function() {
+							var instance = this;
+
+							var randomInstanceId = generateInstanceId();
+
+							return instance.getAttribute('instanceId', randomInstanceId);
+						}
+					},
+
+					optionsEditable: {
+						validator: Lang.isBoolean,
+						value: true
+					},
+
+					parentStructureId: {
+						setter: function(v) {
+							var instance = this;
+
+							return instance.setAttribute('parentStructureId', v);
+						},
+						valueFn: function() {
+							var instance = this;
+
+							return instance.getAttribute('parentStructureId', '');
+						}
+					},
+
+					predefinedValue: {
+						setter: function(v) {
+							var instance = this;
+
+							return instance.setAttribute('predefinedValue', v);
+						},
+						valueFn: function() {
+							var instance = this;
+
+							return instance.getAttribute('predefinedValue', '');
+						}
+					},
+
+					repeatable: {
+						setter: function(v) {
+							var instance = this;
+
+							return instance.setRepeatable(D.Boolean.parse(v));
+						},
+						valueFn: function() {
+							var instance = this;
+
+							return instance.getAttribute('repeatable', false);
+						}
+					},
+
+					repeated: {
+						getter: function() {
+							var instance = this;
+
+							return instance.get('source').hasClass('repeated-field');
+						}
+					},
+
+					required: {
+						setter: function(v) {
+							var instance = this;
+
+							return instance.setAttribute('required', D.Boolean.parse(v));
+						},
+						valueFn: function() {
+							var instance = this;
+
+							return instance.getAttribute('required', false);
+						}
+					},
+
+					source: {
+						value: null
+					},
+
+					variableName: {
+						setter: function(v) {
+							var instance = this;
+
+							return instance.setVariableName(v);
+						},
+						validator: Lang.isString,
+						valueFn: function() {
+							var instance = this;
+
+							return instance.getAttribute('name');
+						}
+					}
+				},
+
+				EXTENDS: A.Widget,
+
+				NAME: 'structurefield',
+
+				constructor: function(config, portletNamespace) {
+					var instance = this;
+
+					instance._lazyAddAttrs = false;
+
+					instance.portletNamespace = portletNamespace;
+
+					StructureField.superclass.constructor.apply(this, arguments);
+				},
+
+				UI_ATTRS: ['optionsEditable'],
+
+				prototype: {
+					cloneableAttrs: [
+						'displayAsTooltip',
+						'fieldLabel',
+						'fieldType',
+						'indexType',
+						'innerHTML',
+						'instructions',
+						'localized',
+						'localizedValue',
+						'predefinedValue',
+						'repeatable',
+						'required',
+						'variableName'
+					],
+
+					initializer: function() {
+						var instance = this;
+
+						var propagateAttr = instance.propagateAttr;
+
+						A.each(
+							instance.cloneableAttrs,
+							function(item, index, collection) {
+								instance.after(item + 'Change', propagateAttr);
+							}
+						);
+					},
+
+					destructor: function() {
+						var instance = this;
+
+						var source = instance.get('source');
+
+						var children = source.all('.structure-field');
+
+						children.each(
+							function(item, index, collection) {
+								var fieldInstance = instance.getFieldInstance(item);
+
+								if (fieldInstance) {
+									fieldInstance.destroy();
+								}
+							}
+						);
+
+						var fieldType = instance.get('fieldType');
+
+						if (fieldType == 'text_area') {
+							var textarea = source.one('textarea');
+
+							if (textarea) {
+								var editorName = textarea.attr('name');
+								var editorReference = window[editorName];
+
+								if (editorReference && Lang.isFunction(editorReference.destroy)) {
+									editorReference.destroy();
+								}
+							}
+						}
+					},
+
+					canDrop: function() {
+						var instance = this;
+
+						return Journal.prototype.canDrop.apply(instance, arguments);
+					},
+
+					clone: function() {
+						var instance = this;
+
+						var options = {};
+						var portletNamespace = instance.portletNamespace;
+
+						A.each(
+							instance.cloneableAttrs,
+							function(item, index, collection) {
+								options[item] = instance.get(item);
+							}
+						);
+
+						options.source = null;
+
+						return new StructureField(options, portletNamespace);
+					},
+
+					createInstructionsContainer: function(value) {
+						return A.Node.create(TPL_INSTRUCTIONS_CONTAINER).html(Liferay.Util.escapeHTML(value));
+					},
+
+					createTooltipImage: function() {
+						return A.Node.create(TPL_TOOLTIP_IMAGE);
+					},
+
+					getAttribute: function(key, defaultValue) {
+						var instance = this;
+
+						var value;
+						var source = instance.get('source');
+
+						if (source) {
+							value = source.attr('data' + key);
+						}
+
+						if (Lang.isUndefined(value) && !Lang.isUndefined(defaultValue)) {
+							value = defaultValue;
+						}
+
+						return value;
+					},
+
+					getByName: function() {
+						var instance = this;
+
+						return Journal.prototype.getByName.apply(instance, arguments);
+					},
+
+					getComponentType: function() {
+						var instance = this;
+
+						return Journal.prototype.getComponentType.apply(instance, arguments);
+					},
+
+					getContent: function(source) {
+						var instance = this;
+
+						var content;
+						var type = instance.get('fieldType');
+						var componentContainer = source.one('div.journal-article-component-container');
+
+						var principalElement = componentContainer.one('input');
+
+						if (type == 'boolean') {
+							content = principalElement.attr('checked');
+						}
+						else if (type == 'text_area') {
+							var editorName = source.one('textarea').attr('name');
+							var editorReference = window[editorName];
+
+							if (editorReference && Lang.isFunction(editorReference.getHTML)) {
+								content = editorReference.getHTML();
+							}
+						}
+						else if (type == 'multi-list') {
+							var output = [];
+							var options = principalElement.all('option');
+
+							options.each(
+								function(item, index, collection) {
+									if (item.get('selected')) {
+										var value = item.val();
+
+										output.push(value);
+									}
+								}
+							);
+
+							content = output.join(',');
+						}
+						else if (type == 'image') {
+							var imageDelete = instance.getByName(componentContainer, 'journalImageDelete');
+
+							if (imageDelete && (imageDelete.val() == 'delete')) {
+								content = 'delete';
+							}
+							else {
+								var imageInput = componentContainer.one('.journal-image-field input');
+
+								var imageInputValue = imageInput.val() || false;
+
+								if (imageInputValue) {
+									content = imageInputValue;
+								}
+								else {
+									var imageContent = componentContainer.one('.journal-image-preview input.journal-image-preview-content');
+
+									if (imageContent) {
+										content = imageContent.val();
+									}
+								}
+							}
+						}
+						else {
+							if (principalElement) {
+								content = principalElement.val();
+							}
+						}
+
+						if ((type == 'list') || (type == 'multi-list') || (type == 'text') || (type == 'text_box')) {
+							content = Liferay.Util.escapeCDATA(content);
+						}
+
+						instance.set('content', content);
+
+						return content;
+					},
+
+					getFieldContainer: function() {
+						var instance = this;
+
+						if (!instance.fieldContainer) {
+							var htmlTemplate = [];
+							var fieldLabel = Liferay.Language.get('field');
+							var localizedLabelLanguage = Liferay.Language.get('localizable');
+							var requiredFieldLanguage = Liferay.Language.get('this-field-is-required');
+							var variableNameLanguage = Liferay.Language.get('variable-name');
+
+							var optionsEditable = instance.get('optionsEditable');
+
+							var editButtonTemplate = instance.getById('editButtonTemplate');
+							var editButtonTemplateHTML = '';
+
+							if (editButtonTemplate) {
+								editButtonTemplateHTML = editButtonTemplate.html();
+							}
+
+							var articleButtonsRowCSSClass = '';
+
+							if (!optionsEditable) {
+								articleButtonsRowCSSClass = 'hide';
+							}
+
+							var repeatableButtonTemplate = instance.getById('repeatableButtonTemplate');
+							var repeatableButtonTemplateHTML = '';
+
+							if (repeatableButtonTemplate) {
+								repeatableButtonTemplateHTML = repeatableButtonTemplate.html();
+							}
+
+							var fieldType = instance.get('fieldType');
+							var required = instance.get('required');
+							var variableName = instance.get('variableName') + getUID();
+							var randomInstanceId = generateInstanceId();
+
+							htmlTemplate = Lang.sub(
+								TPL_FIELD_CONTAINER,
+								{
+									articleButtonsRowCSSClass: articleButtonsRowCSSClass,
+									cssClass: 'journal-structure-' + fieldType.replace(/_/g, '-'),
+									editButtonTemplateHTML: editButtonTemplateHTML,
+									fieldLabel: fieldLabel,
+									localizedLabelLanguage: localizedLabelLanguage,
+									instanceId: randomInstanceId,
+									portletNamespace: instance.portletNamespace,
+									repeatableButtonTemplateHTML: repeatableButtonTemplateHTML,
+									requiredFieldLanguage: requiredFieldLanguage,
+									variableName: variableName,
+									variableNameLanguage: variableNameLanguage
+								}
+							);
+
+							instance.fieldContainer = A.Node.create(htmlTemplate);
+
+							var source = instance.fieldContainer.one('li');
+
+							source.setAttribute('dataName', variableName);
+							source.setAttribute('dataRequired', required);
+							source.setAttribute('dataType', fieldType);
+							source.setAttribute('dataInstanceId', randomInstanceId);
+
+							if (!instance.canDrop(source)) {
+								instance.fieldContainer.one('.folder-droppable').remove();
+							}
+						}
+
+						return instance.fieldContainer;
+					},
+
+					getFieldInstance: function() {
+						var instance = this;
+
+						return Journal.prototype.getFieldInstance.apply(instance, arguments);
+					},
+
+					getFieldLabelElement: function() {
+						var instance = this;
+
+						var source = instance.get('source');
+
+						if (!source) {
+							source = instance.getFieldContainer().one('li');
+						}
+
+						return source.one('> .folder > .field-container .journal-article-field-label');
+					},
+
+					getLocalizedValue: function() {
+						var instance = this;
+
+						var source = instance.get('source');
+
+						var input;
+
+						if (source) {
+							input = source.one('.journal-article-localized');
+						}
+
+						return input ? input.val() : 'false';
+					},
+
+					getRepeatedSiblings: function() {
+						var instance = this;
+
+						return Journal.prototype.getRepeatedSiblings.apply(instance, [instance]);
+					},
+
+					propagateAttr: function(event) {
+						var instance = this;
+
+						var siblings = instance.getRepeatedSiblings();
+
+						if (siblings) {
+							siblings.each(
+								function(item, index, collection) {
+									var fieldInstance = instance.getFieldInstance(item);
+
+									if (fieldInstance) {
+										fieldInstance.set(event.attrName, event.newVal);
+									}
+								}
+							);
+						}
+					},
+
+					setFieldLabel: function(value) {
+						var instance = this;
+
+						var fieldLabel = instance.getFieldLabelElement();
+
+						if (!value) {
+							value = instance.get('variableName');
+						}
+
+						if (fieldLabel) {
+							fieldLabel.one('span').html(Liferay.Util.escapeHTML(value));
+
+							instance.setAttribute('fieldLabel', value);
+						}
+
+						return value;
+					},
+
+					setInstanceId: function(value) {
+						var instance = this;
+
+						instance.setAttribute('instanceId', value);
+
+						var type = instance.get('fieldType');
+						var source = instance.get('source');
+
+						if ((type == 'image') && source) {
+							var isLocalized = instance.get('localized');
+							var inputFileName = instance.portletNamespace + 'structure_image_' + value + '_' + instance.get('variableName');
+							var inputFile = source.one('.journal-article-component-container [type=file]');
+
+							if (isLocalized) {
+								inputFileName += '_' + instance.get('localizedValue');
+							}
+
+							inputFile.attr('name', inputFileName);
+						}
+
+						return value;
+					},
+
+					setInstructions: function(value) {
+						var instance = this;
+
+						var source = instance.get('source');
+
+						if (source) {
+							var fieldInstance = instance.getFieldInstance(source);
+
+							instance.setAttribute('instructions', value);
+
+							if (fieldInstance) {
+								var fieldContainer = source.one('> .folder > .field-container');
+								var label = fieldInstance.getFieldLabelElement();
+								var tooltipIcon = label.one('.journal-article-instructions-container');
+								var journalInstructionsMessage = fieldContainer.one('.journal-article-instructions-message');
+								var displayAsTooltip = fieldInstance.get('displayAsTooltip');
+
+								if (tooltipIcon) {
+									tooltipIcon.remove();
+								}
+
+								if (journalInstructionsMessage) {
+									journalInstructionsMessage.remove();
+								}
+
+								if (value) {
+									if (!displayAsTooltip) {
+										var instructionsMessage = fieldInstance.createInstructionsContainer(value);
+										var requiredMessage = fieldContainer.one('.journal-article-required-message');
+
+										requiredMessage.placeAfter(instructionsMessage);
+									}
+									else {
+										if (label) {
+											label.append(fieldInstance.createTooltipImage());
+										}
+									}
+								}
+							}
+						}
+
+						return value;
+					},
+
+					setRepeatable: function(value) {
+						var instance = this;
+
+						var source = instance.get('source');
+
+						instance.setAttribute('repeatable', value);
+
+						if (source) {
+							var fieldInstance = instance.getFieldInstance(source);
+							var fieldContainer = source.one('> .folder > .field-container');
+							var repeatableFieldImage = fieldContainer.one('.repeatable-field-image');
+							var repeatableAddIcon = source.one('.journal-article-buttons .repeatable-button');
+
+							if (repeatableFieldImage) {
+								repeatableFieldImage.remove();
+							}
+
+							if (value) {
+								var repeatableFieldImageModel = A.Node.create(
+									A.one('#repeatable-field-image-model').html()
+								);
+
+								fieldContainer.append(repeatableFieldImageModel);
+
+								if (repeatableAddIcon) {
+									repeatableAddIcon.show();
+								}
+							}
+							else {
+								if (repeatableAddIcon) {
+									repeatableAddIcon.hide();
+								}
+							}
+						}
+
+						return value;
+					},
+
+					setVariableName: function(value) {
+						var instance = this;
+
+						var fieldLabel = instance.getFieldLabelElement();
+
+						if (fieldLabel) {
+							var input = fieldLabel.get('parentNode').one('.journal-article-component-container input');
+
+							if (input) {
+								input.attr('id', value);
+
+								fieldLabel.setAttribute('for', value);
+							}
+
+							instance.setAttribute('name', value);
+						}
+
+						return value;
+					},
+
+					setAttribute: function(key, value) {
+						var instance = this;
+
+						var source = instance.get('source');
+
+						if (Lang.isArray(value)) {
+							value = value[0];
+						}
+
+						if (source) {
+							source.setAttribute('data' + key, value);
+						}
+
+						return value;
+					},
+
+					_getNamespacedId: Journal.prototype._getNamespacedId,
+
+					getById: Journal.prototype.getById
+				}
+			}
+		);
+
+		Journal.StructureField = StructureField;
+
+		Journal.FieldModel = {};
+
+		var fieldModel = Journal.FieldModel;
+
+		var registerFieldModel = function(namespace, type, variableName, optionsEditable) {
+			var instance = this;
+
+			var typeEl = A.one('#journalFieldModelContainer div[dataType="' + type + '"]');
+
+			var innerHTML;
+
+			if (typeEl) {
+				innerHTML = typeEl.html();
+			}
+
+			fieldModel[namespace] = {
+				fieldLabel: variableName,
+				fieldType: type,
+				innerHTML: innerHTML,
+				optionsEditable: optionsEditable,
+				variableName: variableName
+			};
+		};
+
+		registerFieldModel('Text', 'text', 'TextField', true);
+		registerFieldModel('TextArea', 'text_area', 'TextAreaField', true);
+		registerFieldModel('TextBox', 'text_box', 'TextBoxField', true);
+		registerFieldModel('Image', 'image', 'ImageField', true);
+		registerFieldModel('DocumentLibrary', 'document_library', 'DocumentLibraryField', true);
+		registerFieldModel('Boolean', 'boolean', 'BooleanField', true);
+		registerFieldModel('List', 'list', 'ListField', true);
+		registerFieldModel('MultiList', 'multi-list', 'MultiListField', true);
+		registerFieldModel('LinkToPage', 'link_to_layout', 'LinkToPageField', true);
+		registerFieldModel('SelectionBreak', 'selection_break', 'SelectionBreakField', false);
+
+		Liferay.Portlet.Journal = Journal;
+	},
+	'',
+	{
+		requires: ['aui-base', 'aui-data-set-deprecated', 'aui-datatype', 'aui-dialog-iframe-deprecated', 'aui-io-request', 'aui-nested-list', 'aui-overlay-context-panel-deprecated', 'json', 'liferay-util-window']
+	}
+);
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/js/navigation.js b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/js/navigation.js
new file mode 100644
index 0000000..6dace1a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/js/navigation.js
@@ -0,0 +1,469 @@
+AUI.add(
+	'liferay-journal-navigation',
+	function(A) {
+		var AObject = A.Object;
+		var Lang = A.Lang;
+		var History = Liferay.HistoryManager;
+
+		var DISPLAY_STYLE_TOOLBAR = 'displayStyleToolbar';
+
+		var SEARCH_TYPE = 'searchType';
+
+		var SEARCH_TYPE_SINGLE = 1;
+
+		var STR_ADVANCED_SEARCH = 'advancedSearch';
+
+		var STR_AND_OPERATOR = 'andOperator';
+
+		var STR_CLICK = 'click';
+
+		var STR_CONTENT = 'content';
+
+		var STR_DESCRIPTION = 'description';
+
+		var STR_FOLDER_ID = 'folderId';
+
+		var STR_KEYWORDS = 'keywords';
+
+		var STR_PAGINATION_DATA = 'paginationData';
+
+		var STR_ROW_IDS_JOURNAL_FOLDER_CHECKBOX = 'rowIdsJournalFolderCheckbox';
+
+		var STR_ROW_IDS_JOURNAL_ARTICLE_CHECKBOX = 'rowIdsJournalArticleCheckbox';
+
+		var STR_SEARCH_ARTICLE_ID = 'searchArticleId';
+
+		var STR_SEARCH_FOLDER_ID = 'searchFolderId';
+
+		var STR_SEARCH_RESULTS_CONTAINER = 'searchResultsContainer';
+
+		var STR_SELECTED_FOLDER = 'selectedFolder';
+
+		var STR_SHOW_SEARCH_INFO = 'showSearchInfo';
+
+		var STR_STATUS = 'status';
+
+		var STR_TITLE = 'title';
+
+		var STR_TYPE = 'type';
+
+		var STRUTS_ACTION = 'struts_action';
+
+		var SRC_ENTRIES_PAGINATOR = 1;
+
+		var SRC_HISTORY = 2;
+
+		var SRC_SEARCH = 3;
+
+		var SRC_SEARCH_END = 4;
+
+		var TPL_MESSAGE_SEARCHING = '<div class="alert alert-info">{0}</div><div class="loading-animation" />';
+
+		var JournalNavigation = A.Component.create(
+			{
+				AUGMENTS: [Liferay.PortletBase],
+
+				EXTENDS: A.Base,
+
+				NAME: 'journalnavigation',
+
+				prototype: {
+					initializer: function(config) {
+						var instance = this;
+
+						var journalContainer = instance.byId('journalContainer');
+
+						instance._journalContainer = journalContainer;
+
+						instance._eventDataRequest = instance.ns('dataRequest');
+						instance._eventDataRetrieveSuccess = instance.ns('dataRetrieveSuccess');
+						instance._eventOpenAdvancedSearch = instance.ns('openAdvancedSearch');
+						instance._eventChangeSearchFolder = instance.ns('changeSearchFolder');
+
+						instance._entriesContainer = instance.byId('entriesContainer');
+
+						instance._eventPageLoaded = instance.ns('pageLoaded');
+
+						instance._advancedSearchNode = instance.byId(STR_ADVANCED_SEARCH);
+						instance._andOperatorNode = instance.byId(STR_AND_OPERATOR);
+						instance._contentNode = instance.byId(STR_CONTENT);
+						instance._descriptionNode = instance.byId(STR_DESCRIPTION);
+						instance._keywordsNode = instance.byId(STR_KEYWORDS);
+						instance._searchArticleIdNode = instance.byId(STR_SEARCH_ARTICLE_ID);
+						instance._statusNode = instance.byId(STR_STATUS);
+						instance._titleNode = instance.byId(STR_TITLE);
+						instance._typeNode = instance.byId(STR_TYPE);
+
+						var checkBoxesId = [
+							instance.ns(STR_ROW_IDS_JOURNAL_ARTICLE_CHECKBOX),
+							instance.ns(STR_ROW_IDS_JOURNAL_FOLDER_CHECKBOX)
+						];
+
+						var displayStyle = config.displayStyle;
+
+						var displayStyleCSSClass = 'entry-display-style';
+
+						var displayStyleToolbar = instance.byId(DISPLAY_STYLE_TOOLBAR);
+
+						var namespace = instance.NS;
+
+						var portletContainerId = instance.ns('journalContainer');
+
+						var paginatorConfig = config.paginator;
+
+						paginatorConfig.entryPaginationContainer = '.article-entries-pagination';
+						paginatorConfig.folderPaginationContainer = '.folder-pagination';
+						paginatorConfig.namespace = namespace;
+
+						var appViewPaginator = new Liferay.AppViewPaginator(paginatorConfig);
+
+						instance._appViewPaginator = appViewPaginator;
+
+						var selectConfig = config.select;
+
+						selectConfig.checkBoxesId = checkBoxesId;
+						selectConfig.displayStyle = displayStyle;
+						selectConfig.displayStyleCSSClass = displayStyleCSSClass;
+						selectConfig.displayStyleToolbar = displayStyleToolbar;
+						selectConfig.folderContainer = instance.byId('folderContainer');
+						selectConfig.namespace = namespace;
+						selectConfig.portletContainerId = portletContainerId;
+						selectConfig.selector = 'entry-selector';
+
+						instance._appViewSelect = new Liferay.AppViewSelect(selectConfig);
+
+						var moveConfig = config.move;
+
+						moveConfig.processEntryIds = {
+							checkBoxesIds: checkBoxesId,
+							entryIds: [
+								instance.ns('articleIds'),
+								instance.ns('folderIds')
+							]
+						};
+
+						moveConfig.displayStyleCSSClass = displayStyleCSSClass;
+						moveConfig.draggableCSSClass = '.entry-link';
+						moveConfig.namespace = namespace;
+						moveConfig.portletContainerId = portletContainerId;
+						moveConfig.portletGroup = 'journal';
+
+						instance._appViewMove = new Liferay.AppViewMove(moveConfig);
+
+						var foldersConfig = config.folders;
+
+						foldersConfig.displayStyle = displayStyle;
+						foldersConfig.displayStyleCSSClass = displayStyleCSSClass;
+						foldersConfig.displayStyleToolbar = displayStyleToolbar;
+						foldersConfig.entry = {
+							paramName: 'structureId',
+							typeId: 'data-structure-id'
+						};
+						foldersConfig.namespace = namespace;
+						foldersConfig.portletContainerId = portletContainerId;
+
+						instance._appViewFolders = new Liferay.AppViewFolders(foldersConfig);
+
+						var eventHandles = [
+							Liferay.on(instance._eventDataRetrieveSuccess, instance._onDataRetrieveSuccess, instance),
+							Liferay.on(instance._eventPageLoaded, instance._onPageLoaded, instance),
+							History.after('stateChange', instance._afterStateChange, instance),
+							Liferay.on(instance._eventChangeSearchFolder, instance._onChangeSearchFolder, instance)
+						];
+
+						instance._config = config;
+
+						instance._eventHandles = eventHandles;
+
+						eventHandles.push(Liferay.on(config.portletId + ':portletRefreshed', A.bind('destructor', instance)));
+
+						var searchFormNode = instance.one('#fm1');
+
+						if (searchFormNode) {
+							searchFormNode.on('submit', instance._onSearchFormSubmit, instance);
+						}
+					},
+
+					destructor: function() {
+						var instance = this;
+
+						A.Array.invoke(instance._eventHandles, 'detach');
+
+						instance._appViewFolders.destroy();
+						instance._appViewMove.destroy();
+						instance._appViewPaginator.destroy();
+						instance._appViewSelect.destroy();
+
+						instance._journalContainer.purge(true);
+					},
+
+					_afterStateChange: function(event) {
+						var instance = this;
+
+						var namespace = instance.NS;
+
+						var requestParams = {};
+
+						var state = History.get();
+
+						AObject.each(
+							state,
+							function(item, index, collection) {
+								if (index.indexOf(namespace) === 0) {
+									requestParams[index] = item;
+								}
+							}
+						);
+
+						if (AObject.isEmpty(requestParams)) {
+							requestParams = instance._getDefaultHistoryState();
+						}
+
+						Liferay.fire(
+							instance._eventDataRequest,
+							{
+								requestParams: requestParams,
+								src: SRC_HISTORY
+							}
+						);
+					},
+
+					_getDefaultHistoryState: function() {
+						var instance = this;
+
+						var initialState = History.get();
+
+						if (AObject.isEmpty(initialState)) {
+							initialState = instance._appViewPaginator.get('defaultParams');
+						}
+
+						return initialState;
+					},
+
+					_onAdvancedSearchFormSubmit: function(event) {
+						var instance = this;
+
+						var selectedFolder = instance._appViewSelect._getSelectedFolder();
+
+						var searchFolderId = selectedFolder.id;
+
+						if (searchFolderId === 0) {
+							searchFolderId = -1;
+						}
+
+						var searchData = {
+							advancedSearch: true,
+							andOperator: instance._andOperatorNode.get('value'),
+							folderId: selectedFolder.id,
+							content: instance._contentNode.get('value'),
+							description: instance._descriptionNode.get('value'),
+							keywords: '',
+							searchArticleId: instance._searchArticleIdNode.get('value'),
+							searchFolderId: searchFolderId,
+							showSearchInfo: true,
+							status: instance._statusNode.get('value'),
+							title: instance._titleNode.get('value'),
+							type: instance._typeNode.get('value')
+						};
+
+						instance._searchArticle(searchData);
+					},
+
+					_onChangeSearchFolder: function(event) {
+						var instance = this;
+
+						var selectedFolder = instance._appViewSelect.get(STR_SELECTED_FOLDER);
+
+						var searchData = {
+							advancedSearch: instance._advancedSearchNode.get('value'),
+							andOperator: instance._andOperatorNode.get('value'),
+							folderId: selectedFolder.id,
+							content: instance._contentNode.get('value'),
+							description: instance._descriptionNode.get('value'),
+							keywords: instance._keywordsNode.get('value'),
+							searchArticleId: instance._searchArticleIdNode.get('value'),
+							showSearchInfo: true,
+							status: instance._statusNode.get('value'),
+							title: instance._titleNode.get('value'),
+							type: instance._typeNode.get('value')
+						};
+
+						if (event.searchEverywhere) {
+							searchData[STR_SEARCH_FOLDER_ID] = -1;
+						}
+						else {
+							searchData[STR_SEARCH_FOLDER_ID] = selectedFolder.id;
+						}
+
+						instance._searchArticle(searchData);
+					},
+
+					_onDataRetrieveSuccess: function(event) {
+						var instance = this;
+
+						var responseData = event.responseData;
+
+						instance._journalContainer.loadingmask.hide();
+
+						var content = A.Node.create(responseData);
+
+						if (content) {
+							instance._setSearchResults(content);
+
+							instance._appViewFolders.processData(content);
+
+							instance._appViewSelect.syncDisplayStyleToolbar();
+						}
+					},
+
+					_onPageLoaded: function(event) {
+						var instance = this;
+
+						var paginationData = event.pagination;
+
+						if (paginationData) {
+							instance._appViewPaginator.set(STR_PAGINATION_DATA, paginationData);
+						}
+					},
+
+					_onSearchFormSubmit: function(event) {
+						var instance = this;
+
+						event.preventDefault();
+
+						if (instance._advancedSearchNode.get('value') === 'true') {
+							instance._onAdvancedSearchFormSubmit(event);
+						}
+						else {
+							instance._onSimpleSearchFormSubmit(event)
+						}
+					},
+
+					_onSimpleSearchFormSubmit: function(event) {
+						var instance = this;
+
+						var selectedFolder = instance._appViewSelect.get(STR_SELECTED_FOLDER);
+
+						var searchFolderId = selectedFolder.id;
+
+						if (searchFolderId === 0) {
+							searchFolderId = -1;
+						}
+
+						var searchData = {
+							advancedSearch: false,
+							andOperator: '',
+							folderId: selectedFolder.id,
+							content: '',
+							description: '',
+							keywords: instance._keywordsNode.get('value'),
+							searchArticleId: '',
+							searchFolderId: searchFolderId,
+							showSearchInfo: true,
+							status: '',
+							title: '',
+							type: ''
+						};
+
+						instance._searchArticle(searchData);
+					},
+
+					_searchArticle: function(searchData) {
+						var instance = this;
+
+						if (searchData.showSearchInfo) {
+							var entriesContainer = instance._entriesContainer;
+
+							entriesContainer.empty();
+
+							var searchingTPL = Lang.sub(TPL_MESSAGE_SEARCHING, [Liferay.Language.get('searching,-please-wait')]);
+
+							entriesContainer.html(searchingTPL);
+						}
+
+						instance._journalContainer.all('.article-entries-pagination').hide();
+
+						var requestParams = {};
+
+						requestParams[instance.ns(STRUTS_ACTION)] = '/journal/search';
+						requestParams[instance.ns(STR_ADVANCED_SEARCH)] = searchData.advancedSearch;
+						requestParams[instance.ns(STR_AND_OPERATOR)] = searchData.andOperator;
+						requestParams[instance.ns(STR_CONTENT)] = searchData.content;
+						requestParams[instance.ns(STR_DESCRIPTION)] = searchData.description;
+						requestParams[instance.ns(STR_FOLDER_ID)] = searchData.folderId;
+						requestParams[instance.ns(STR_SEARCH_FOLDER_ID)] = searchData.searchFolderId;
+						requestParams[instance.ns(STR_SEARCH_ARTICLE_ID)] = searchData.searchArticleId;
+						requestParams[instance.ns(STR_STATUS)] = searchData.status;
+						requestParams[instance.ns(STR_TITLE)] = searchData.title;
+						requestParams[instance.ns(STR_TYPE)] = searchData.type;
+						requestParams[instance.ns(SEARCH_TYPE)] = SEARCH_TYPE_SINGLE;
+						requestParams[instance.ns(STR_KEYWORDS)] = searchData.keywords;
+						requestParams[instance.ns(STR_SHOW_SEARCH_INFO)] = searchData.showSearchInfo;
+
+						Liferay.fire(
+							instance._eventDataRequest,
+							{
+								requestParams: requestParams,
+								src: Liferay.JOURNAL_SEARCH
+							}
+						);
+					},
+
+					_setSearchResults: function(content) {
+						var instance = this;
+
+						var searchInfo = instance.one('#' + instance.ns('searchInfo'), content);
+
+						var entriesContainer = instance._entriesContainer;
+
+						if (searchInfo) {
+							entriesContainer.empty();
+
+							entriesContainer.setContent(searchInfo);
+						}
+
+						var fragmentSearchResults = instance.one('#fragmentSearchResults', content);
+
+						var searchResults;
+
+						if (fragmentSearchResults) {
+							searchResults = instance.one('#' + STR_SEARCH_RESULTS_CONTAINER, entriesContainer);
+
+							if (searchResults) {
+								searchResults.empty();
+
+								searchResults.setContent(fragmentSearchResults.html());
+							}
+						}
+
+						var searchResultsContainer = instance.one('#' + STR_SEARCH_RESULTS_CONTAINER, content);
+
+						if (searchResultsContainer) {
+							if (!searchInfo) {
+								entriesContainer.empty();
+							}
+
+							entriesContainer.append(searchResultsContainer);
+						}
+
+						if (searchResultsContainer || fragmentSearchResults) {
+							instance.all('#addButtonContainer').hide();
+						}
+					}
+				}
+			}
+		);
+
+		Liferay.JOURNAL_SEARCH = SRC_SEARCH;
+
+		Liferay.JOURNAL_SEARCH_END = SRC_SEARCH_END;
+
+		Liferay.JOURNAL_ENTRIES_PAGINATOR = SRC_ENTRIES_PAGINATOR;
+
+		Liferay.Portlet.JournalNavigation = JournalNavigation;
+	},
+	'',
+	{
+		requires: ['aui-loading-mask-deprecated', 'aui-pagination', 'aui-parse-content', 'event-simulate', 'liferay-app-view-folders', 'liferay-app-view-move', 'liferay-app-view-paginator', 'liferay-app-view-select', 'liferay-history-manager', 'liferay-list-view', 'liferay-message', 'liferay-portlet-base', 'liferay-util-list-fields', 'querystring-parse-simple']
+	}
+);
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/move_article.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/move_article.jsp
new file mode 100644
index 0000000..5b294ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/move_article.jsp
@@ -0,0 +1,140 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+String strutsAction = ParamUtil.getString(request, "struts_action");
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+JournalArticle article = (JournalArticle)request.getAttribute(WebKeys.JOURNAL_ARTICLE);
+
+String articleId = BeanParamUtil.getString(article, request, "articleId");
+
+long folderId = BeanParamUtil.getLong(article, request, "folderId");
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", strutsAction);
+portletURL.setParameter("redirect", redirect);
+portletURL.setParameter("articleId", String.valueOf(articleId));
+%>
+
+<portlet:actionURL var="moveArticleURL">
+	<portlet:param name="struts_action" value="/journal/move_article" />
+</portlet:actionURL>
+
+<aui:form action="<%= moveArticleURL %>" enctype="multipart/form-data" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveArticle(false);" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.MOVE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="articleId" type="hidden" value="<%= articleId %>" />
+	<aui:input name="newFolderId" type="hidden" value="<%= folderId %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title='<%= LanguageUtil.get(pageContext, "move") + StringPool.SPACE + article.getTitle(locale) %>'
+	/>
+
+	<liferay-ui:error exception="<%= DuplicateFolderNameException.class %>" message="the-folder-you-selected-already-has-an-entry-with-this-name.-please-select-a-different-folder" />
+	<liferay-ui:error exception="<%= NoSuchFolderException.class %>" message="please-enter-a-valid-folder" />
+
+	<aui:model-context bean="<%= article %>" model="<%= JournalArticle.class %>" />
+
+	<aui:fieldset>
+
+		<%
+		String folderName = StringPool.BLANK;
+
+		if (folderId > 0) {
+			JournalFolder folder = JournalFolderServiceUtil.getFolder(folderId);
+
+			folder = folder.toEscapedModel();
+
+			folderId = folder.getFolderId();
+			folderName = folder.getName();
+		}
+		else {
+			folderName = LanguageUtil.get(pageContext, "home");
+		}
+		%>
+
+		<aui:field-wrapper label="current-folder">
+			<liferay-ui:input-resource url="<%= folderName %>" />
+		</aui:field-wrapper>
+
+		<aui:field-wrapper label="new-folder">
+			<div class="input-append">
+				<liferay-ui:input-resource id="folderName" url="<%= folderName %>" />
+
+				<aui:button name="selectFolderButton" value="select" />
+			</div>
+		</aui:field-wrapper>
+
+		<aui:button-row>
+			<aui:button type="submit" value="move" />
+
+			<aui:button href="<%= redirect %>" type="cancel" />
+		</aui:button-row>
+	</aui:fieldset>
+</aui:form>
+
+<portlet:renderURL var="selectFolderURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+	<portlet:param name="struts_action" value="/journal/select_folder" />
+	<portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" />
+</portlet:renderURL>
+
+<aui:script use="aui-base">
+	A.one('#<portlet:namespace />selectFolderButton').on(
+		'click',
+		function(event) {
+			Liferay.Util.selectEntity(
+				{
+					dialog: {
+						constrain: true,
+						modal: true,
+						width: 680
+					},
+					id: '<portlet:namespace />selectFolder',
+					title: '<liferay-ui:message arguments="folder" key="select-x" />',
+					uri: '<%= selectFolderURL.toString() %>'
+				},
+				function(event) {
+					var folderData = {
+						idString: 'newFolderId',
+						idValue: event.folderid,
+						nameString: 'folderName',
+						nameValue: event.foldername
+					};
+
+					Liferay.Util.selectFolder(folderData, '<portlet:namespace />');
+				}
+			);
+		}
+	);
+</aui:script>
+
+<aui:script>
+	function <portlet:namespace />saveArticle() {
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
+
+<%
+JournalUtil.addPortletBreadcrumbEntries(article, request, renderResponse);
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "move"), currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/move_entries.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/move_entries.jsp
new file mode 100644
index 0000000..753df13
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/move_entries.jsp
@@ -0,0 +1,277 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+long newFolderId = ParamUtil.getLong(request, "newFolderId");
+
+List<JournalFolder> folders = (List<JournalFolder>)request.getAttribute(WebKeys.JOURNAL_FOLDERS);
+
+List<JournalFolder> invalidMoveFolders = new ArrayList<JournalFolder>();
+List<JournalFolder> validMoveFolders = new ArrayList<JournalFolder>();
+
+for (JournalFolder curFolder : folders) {
+	boolean hasUpdatePermission = JournalFolderPermission.contains(permissionChecker, curFolder, ActionKeys.UPDATE);
+
+	if (hasUpdatePermission) {
+		validMoveFolders.add(curFolder);
+	}
+	else {
+		invalidMoveFolders.add(curFolder);
+	}
+}
+
+JournalArticle article = (JournalArticle)request.getAttribute(WebKeys.JOURNAL_ARTICLE);
+
+List<JournalArticle> articles = null;
+
+if (article != null) {
+	articles = new ArrayList<JournalArticle>();
+
+	articles.add(article);
+}
+else {
+	articles = (List<JournalArticle>)request.getAttribute(WebKeys.JOURNAL_ARTICLES);
+}
+
+List<JournalArticle> validMoveArticles = new ArrayList<JournalArticle>();
+List<JournalArticle> invalidMoveArticles = new ArrayList<JournalArticle>();
+
+for (JournalArticle curArticle : articles) {
+	boolean hasUpdatePermission = JournalArticlePermission.contains(permissionChecker, curArticle, ActionKeys.UPDATE);
+
+	if (hasUpdatePermission) {
+		validMoveArticles.add(curArticle);
+	}
+	else {
+		invalidMoveArticles.add(curArticle);
+	}
+}
+%>
+
+<portlet:actionURL var="moveArticleURL">
+	<portlet:param name="struts_action" value="/journal/move_entry" />
+</portlet:actionURL>
+
+<aui:form action="<%= moveArticleURL %>" enctype="multipart/form-data" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveArticle(false);" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.MOVE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="newFolderId" type="hidden" value="<%= newFolderId %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title="move-web-content"
+	/>
+
+	<liferay-ui:error exception="<%= DuplicateFolderNameException.class %>" message="the-folder-you-selected-already-has-an-entry-with-this-name.-please-select-a-different-folder" />
+	<liferay-ui:error exception="<%= NoSuchFolderException.class %>" message="please-enter-a-valid-folder" />
+
+	<c:if test="<%= !validMoveFolders.isEmpty() %>">
+		<div class="move-list-info">
+			<h4><%= LanguageUtil.format(pageContext, "x-folders-ready-to-be-moved", validMoveFolders.size()) %></h4>
+		</div>
+
+		<div class="move-list">
+			<ul class="unstyled">
+
+				<%
+				for (JournalFolder folder : validMoveFolders) {
+				%>
+
+					<li class="move-folder">
+						<span class="folder-title">
+							<%= folder.getName() %>
+						</span>
+					</li>
+
+				<%
+				}
+				%>
+
+			</ul>
+		</div>
+	</c:if>
+
+	<c:if test="<%= !invalidMoveFolders.isEmpty() %>">
+		<div class="move-list-info">
+			<h4><%= LanguageUtil.format(pageContext, "x-folders-cannot-be-moved", invalidMoveFolders.size()) %></h4>
+		</div>
+
+		<div class="move-list">
+			<ul class="unstyled">
+
+				<%
+				for (JournalFolder folder : invalidMoveFolders) {
+				%>
+
+					<li class="move-folder move-error">
+						<span class="folder-title">
+							<%= folder.getName() %>
+						</span>
+
+						<span class="error-message">
+							<%= LanguageUtil.get(pageContext, "you-do-not-have-the-required-permissions") %>
+						</span>
+					</li>
+
+				<%
+				}
+				%>
+
+			</ul>
+		</div>
+	</c:if>
+
+	<aui:input name="folderIds" type="hidden" value="<%= ListUtil.toString(validMoveFolders, JournalFolder.FOLDER_ID_ACCESSOR) %>" />
+
+	<c:if test="<%= !validMoveArticles.isEmpty() %>">
+		<div class="move-list-info">
+			<h4><%= LanguageUtil.format(pageContext, "x-web-content-instances-are-ready-to-be-moved", validMoveArticles.size()) %></h4>
+		</div>
+
+		<div class="move-list">
+			<ul class="unstyled">
+
+				<%
+				for (JournalArticle validMoveArticle : validMoveArticles) {
+				%>
+
+					<li class="move-article">
+						<span class="article-title" title="<%= validMoveArticle.getTitle(locale) %>">
+							<%= validMoveArticle.getTitle(locale) %>
+						</span>
+					</li>
+
+				<%
+				}
+				%>
+
+			</ul>
+		</div>
+	</c:if>
+
+	<c:if test="<%= !invalidMoveArticles.isEmpty() %>">
+		<div class="move-list-info">
+			<h4><%= LanguageUtil.format(pageContext, "x-web-content-instances-cannot-be-moved", invalidMoveArticles.size()) %></h4>
+		</div>
+
+		<div class="move-list">
+			<ul class="unstyled">
+
+				<%
+				for (JournalArticle invalidMoveArticle : invalidMoveArticles) {
+				%>
+
+					<li class="move-article move-error">
+						<span class="article-title" title="<%= invalidMoveArticle.getTitle() %>">
+							<%= invalidMoveArticle.getTitle() %>
+						</span>
+
+						<span class="error-message">
+							<%= LanguageUtil.get(pageContext, "you-do-not-have-the-required-permissions") %>
+						</span>
+					</li>
+
+				<%
+				}
+				%>
+
+			</ul>
+		</div>
+	</c:if>
+
+	<aui:input name="articleIds" type="hidden" value="<%= ListUtil.toString(validMoveArticles, JournalArticle.ARTICLE_ID_ACCESSOR) %>" />
+
+	<aui:fieldset>
+
+		<%
+		String folderName = StringPool.BLANK;
+
+		if (newFolderId > 0) {
+			JournalFolder folder = JournalFolderLocalServiceUtil.getFolder(newFolderId);
+
+			folder = folder.toEscapedModel();
+
+			folderName = folder.getName();
+		}
+		else {
+			folderName = LanguageUtil.get(pageContext, "home");
+		}
+		%>
+
+		<aui:field-wrapper label="new-folder">
+			<div class="input-append">
+				<liferay-ui:input-resource id="folderName" url="<%= folderName %>" />
+
+				<aui:button name="selectFolderButton" value="select" />
+			</div>
+		</aui:field-wrapper>
+
+		<aui:button-row>
+			<aui:button type="submit" value="move" />
+
+			<aui:button href="<%= redirect %>" type="cancel" />
+		</aui:button-row>
+	</aui:fieldset>
+</aui:form>
+
+<portlet:renderURL var="selectFolderURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+	<portlet:param name="struts_action" value="/journal/select_folder" />
+	<portlet:param name="folderId" value="<%= String.valueOf(newFolderId) %>" />
+</portlet:renderURL>
+
+<aui:script use="aui-base">
+	A.one('#<portlet:namespace />selectFolderButton').on(
+		'click',
+		function(event) {
+			Liferay.Util.selectEntity(
+				{
+					dialog: {
+						constrain: true,
+						modal: true,
+						width: 680
+					},
+					id: '<portlet:namespace />selectFolder',
+					title: '<liferay-ui:message arguments="folder" key="select-x" />',
+					uri: '<%= selectFolderURL.toString() %>'
+				},
+				function(event) {
+					var folderData = {
+						idString: 'newFolderId',
+						idValue: event.folderid,
+						nameString: 'folderName',
+						nameValue: event.foldername
+					};
+
+					Liferay.Util.selectFolder(folderData, '<portlet:namespace />');
+				}
+			);
+		}
+	);
+</aui:script>
+
+<aui:script>
+	function <portlet:namespace />saveArticle() {
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
+
+<%
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "move-web-content"), currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/move_folder.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/move_folder.jsp
new file mode 100644
index 0000000..f590d5d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/move_folder.jsp
@@ -0,0 +1,132 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+JournalFolder folder = (JournalFolder)request.getAttribute(WebKeys.JOURNAL_FOLDER);
+
+long folderId = BeanParamUtil.getLong(folder, request, "folderId");
+
+long parentFolderId = BeanParamUtil.getLong(folder, request, "parentFolderId", JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID);
+%>
+
+<portlet:actionURL var="moveFolderURL">
+	<portlet:param name="struts_action" value="/journal/move_folder" />
+</portlet:actionURL>
+
+<aui:form action="<%= moveFolderURL %>" enctype="multipart/form-data" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveFolder(false);" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.MOVE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="folderId" type="hidden" value="<%= folderId %>" />
+	<aui:input name="parentFolderId" type="hidden" value="<%= parentFolderId %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title='<%= LanguageUtil.get(pageContext, "move") + StringPool.SPACE + folder.getName() %>'
+	/>
+
+	<liferay-ui:error exception="<%= DuplicateFolderNameException.class %>" message="the-folder-you-selected-already-has-an-entry-with-this-name.-please-select-a-different-folder" />
+	<liferay-ui:error exception="<%= NoSuchFolderException.class %>" message="please-enter-a-valid-folder" />
+
+	<aui:model-context bean="<%= folder %>" model="<%= JournalFolder.class %>" />
+
+	<aui:fieldset>
+		<aui:field-wrapper label="parent-folder">
+
+			<%
+			String parentFolderName = "";
+
+			try {
+				if (parentFolderId != JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID) {
+					JournalFolder parentFolder = JournalFolderLocalServiceUtil.getFolder(parentFolderId);
+
+					parentFolderName = parentFolder.getName();
+				}
+			}
+			catch (NoSuchFolderException nsfe) {
+			}
+			%>
+
+			<div class="input-append">
+				<liferay-ui:input-resource id="parentFolderName" url="<%= parentFolderName %>" />
+
+				<aui:button name="selectFolderButton" value="select" />
+
+				<%
+				String taglibRemoveFolder = "Liferay.Util.removeFolderSelection('parentFolderId', 'parentFolderName', '" + renderResponse.getNamespace() + "');";
+				%>
+
+				<aui:button disabled="<%= (parentFolderId <= 0) %>" name="removeFolderButton" onClick="<%= taglibRemoveFolder %>" value="remove" />
+			</div>
+		</aui:field-wrapper>
+
+		<aui:button-row>
+			<aui:button type="submit" value="move" />
+
+			<aui:button href="<%= redirect %>" type="cancel" />
+		</aui:button-row>
+	</aui:fieldset>
+</aui:form>
+
+<portlet:renderURL var="selectFolderURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+	<portlet:param name="struts_action" value="/journal/select_folder" />
+	<portlet:param name="folderId" value="<%= String.valueOf(parentFolderId) %>" />
+</portlet:renderURL>
+
+<aui:script use="aui-base">
+	A.one('#<portlet:namespace />selectFolderButton').on(
+		'click',
+		function(event) {
+			Liferay.Util.selectEntity(
+				{
+					dialog: {
+						constrain: true,
+						modal: true,
+						width: 680
+					},
+					id: '<portlet:namespace />selectFolder',
+					title: '<liferay-ui:message arguments="folder" key="select-x" />',
+					uri: '<%= selectFolderURL.toString() %>'
+				},
+				function(event) {
+					var folderData = {
+						idString: 'parentFolderId',
+						idValue: event.folderid,
+						nameString: 'parentFolderName',
+						nameValue: event.foldername
+					};
+
+					Liferay.Util.selectFolder(folderData, '<portlet:namespace />');
+				}
+			);
+		}
+	);
+</aui:script>
+
+<aui:script>
+	function <portlet:namespace />saveFolder() {
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
+
+<%
+JournalUtil.addPortletBreadcrumbEntries(folder, request, renderResponse);
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "move"), currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/preview_article_content.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/preview_article_content.jsp
new file mode 100644
index 0000000..69657bf
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/preview_article_content.jsp
@@ -0,0 +1,25 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+JournalArticle article = (JournalArticle)request.getAttribute(WebKeys.JOURNAL_ARTICLE);
+%>
+
+<%= JournalArticleLocalServiceUtil.getArticleContent(article, article.getTemplateId(), null, themeDisplay.getLanguageId(), themeDisplay) %>
+
+<liferay-util:include page="/html/common/themes/bottom.jsp" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/raw_article_content.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/raw_article_content.jsp
new file mode 100644
index 0000000..c4ec912
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/raw_article_content.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%><%@ page contentType="text/xml; charset=UTF-8" %><%= request.getAttribute(com.liferay.portal.util.WebKeys.JOURNAL_ARTICLE_CONTENT) %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/search_resources.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/search_resources.jsp
new file mode 100644
index 0000000..2e1063a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/search_resources.jsp
@@ -0,0 +1,499 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+long breadcrumbsFolderId = ParamUtil.getLong(request, "breadcrumbsFolderId");
+
+long folderId = ParamUtil.getLong(request, "folderId");
+
+long searchFolderId = ParamUtil.getLong(request, "searchFolderId");
+long searchFolderIds = ParamUtil.getLong(request, "searchFolderIds");
+
+long[] folderIdsArray = null;
+
+JournalFolder folder = null;
+
+if (searchFolderId > 0) {
+	folderIdsArray = new long[] {searchFolderId};
+
+	folder = JournalFolderServiceUtil.getFolder(searchFolderId);
+}
+else {
+	long defaultFolderId = JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID;
+
+	List<Long> folderIds = JournalFolderServiceUtil.getSubfolderIds(scopeGroupId, searchFolderIds, true);
+
+	folderIds.add(0, defaultFolderId);
+
+	folderIdsArray = StringUtil.split(StringUtil.merge(folderIds), 0L);
+}
+
+String keywords = ParamUtil.getString(request, "keywords");
+
+int searchType = ParamUtil.getInteger(request, "searchType");
+
+int entryStart = ParamUtil.getInteger(request, "entryStart");
+int entryEnd = ParamUtil.getInteger(request, "entryEnd", SearchContainer.DEFAULT_DELTA);
+
+boolean ajax = ParamUtil.getBoolean(request, "ajax");
+
+boolean showSearchInfo = ParamUtil.getBoolean(request, "showSearchInfo");
+
+if (searchType == JournalSearchConstants.FRAGMENT) {
+	if (ajax) {
+		showSearchInfo = false;
+	}
+	else {
+		searchType = JournalSearchConstants.SINGLE;
+
+		showSearchInfo = true;
+	}
+}
+else if ((searchType == JournalSearchConstants.SINGLE) && !ajax) {
+	showSearchInfo = true;
+}
+
+int total = 0;
+
+boolean advancedSearch = ParamUtil.getBoolean(liferayPortletRequest, ArticleDisplayTerms.ADVANCED_SEARCH);
+
+PortletURL portletURL = liferayPortletResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/journal/search");
+portletURL.setParameter("redirect", redirect);
+portletURL.setParameter("breadcrumbsFolderId", String.valueOf(breadcrumbsFolderId));
+portletURL.setParameter("searchFolderId", String.valueOf(searchFolderId));
+portletURL.setParameter("searchFolderIds", String.valueOf(searchFolderIds));
+portletURL.setParameter("keywords", keywords);
+
+ArticleSearch searchContainer = new ArticleSearch(liferayPortletRequest, entryEnd / (entryEnd - entryStart), entryEnd - entryStart, portletURL);
+%>
+
+<c:if test="<%= showSearchInfo %>">
+	<liferay-util:buffer var="searchInfo">
+		<div class="search-info">
+			<span class="keywords">
+
+				<%
+				String message = StringPool.BLANK;
+
+				if (advancedSearch) {
+					if (folder != null) {
+						message = LanguageUtil.format(pageContext, "advanced-search-in-x", new Object[] {folder.getName()});
+					}
+					else {
+						message = LanguageUtil.get(pageContext, "advanced-search-everywhere");
+					}
+				}
+				else {
+					if (folder != null) {
+						message = LanguageUtil.format(pageContext, "searched-for-x-in-x", new Object[] {HtmlUtil.escape(keywords), folder.getName()});
+					}
+					else {
+						message = LanguageUtil.format(pageContext, "searched-for-x-everywhere", HtmlUtil.escape(keywords));
+					}
+				}
+				%>
+
+				<%= message %>
+			</span>
+
+			<c:if test="<%= folderId != JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID %>">
+				<span class="change-search-folder">
+
+					<%
+					String taglibOnClick = "Liferay.fire('" + liferayPortletResponse.getNamespace() + "changeSearchFolder', {searchEverywhere: " + (folder != null) + "});";
+					%>
+
+					<aui:button onClick="<%= taglibOnClick %>" value='<%= (folder != null) ? "search-everywhere" : "search-in-the-current-folder" %>' />
+				</span>
+			</c:if>
+
+			<liferay-ui:icon cssClass="close-search" id="closeSearch" image="../aui/remove" url="javascript:;" />
+		</div>
+
+		<aui:script use="aui-base">
+			A.one('#<portlet:namespace />closeSearch').on(
+				'click',
+				function(event) {
+					Liferay.fire(
+						'<portlet:namespace />dataRequest',
+						{
+							requestParams: {
+								'<portlet:namespace />struts_action': '/journal/view',
+								'<portlet:namespace />folderId': '<%= String.valueOf(folderId) %>',
+								'<portlet:namespace />viewEntries': <%= Boolean.TRUE.toString() %>
+							},
+							src: Liferay.JOURNAL_SEARCH_END
+						}
+					);
+				}
+			);
+		</aui:script>
+	</liferay-util:buffer>
+
+	<div id="<portlet:namespace />searchInfo">
+		<%= searchInfo %>
+	</div>
+</c:if>
+
+<liferay-util:buffer var="searchResults">
+	<liferay-portlet:renderURL varImpl="searchURL">
+		<portlet:param name="struts_action" value="/journal/search" />
+	</liferay-portlet:renderURL>
+
+	<div class="journal-container" id="<portlet:namespace />entriesContainer">
+		<aui:form action="<%= searchURL %>" method="get" name="fm">
+			<liferay-portlet:renderURLParams varImpl="searchURL" />
+			<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+			<aui:input name="breadcrumbsFolderId" type="hidden" value="<%= breadcrumbsFolderId %>" />
+			<aui:input name="searchFolderId" type="hidden" value="<%= searchFolderId %>" />
+			<aui:input name="searchFolderIds" type="hidden" value="<%= searchFolderIds %>" />
+
+			<%
+			searchContainer.setRowChecker(new EntriesChecker(liferayPortletRequest, liferayPortletResponse));
+
+			ArticleSearchTerms searchTerms = (ArticleSearchTerms)searchContainer.getSearchTerms();
+
+			List<Long> folderIds = new ArrayList<Long>(1);
+
+			folderIds.add(searchFolderId);
+
+			searchTerms.setFolderIds(folderIds);
+
+			if (searchFolderId <= 0) {
+				searchTerms.setFolderIds(new ArrayList<Long>());
+			}
+
+			try {
+				boolean emptySearchResults = false;
+			%>
+
+				<c:choose>
+					<c:when test="<%= PropsValues.JOURNAL_ARTICLES_SEARCH_WITH_INDEX %>">
+
+						<%
+						SearchContext searchContext = SearchContextFactory.getInstance(request);
+
+						Indexer indexer = null;
+
+						if (searchTerms.isAdvancedSearch()) {
+							indexer = IndexerRegistryUtil.nullSafeGetIndexer(JournalArticle.class);
+
+							searchContext.setAndSearch(searchTerms.isAndOperator());
+							searchContext.setAttribute(Field.CONTENT, searchTerms.getContent());
+							searchContext.setAttribute(Field.DESCRIPTION, searchTerms.getDescription());
+							searchContext.setAttribute(Field.STATUS, searchTerms.getStatusCode());
+							searchContext.setAttribute(Field.TITLE, searchTerms.getTitle());
+							searchContext.setAttribute(Field.TYPE, searchTerms.getType());
+							searchContext.setAttribute("articleId", searchTerms.getArticleId());
+						}
+						else {
+							indexer = JournalSearcher.getInstance();
+
+							searchContext.setAttribute(Field.STATUS, WorkflowConstants.STATUS_ANY);
+
+							if (Validator.isNotNull(keywords)) {
+								searchContext.setAttribute(Field.CONTENT, keywords);
+								searchContext.setAttribute(Field.DESCRIPTION, keywords);
+								searchContext.setAttribute(Field.TITLE, keywords);
+								searchContext.setAttribute("articleId", keywords);
+								searchContext.setKeywords(keywords);
+							}
+							else {
+								searchContext.setAndSearch(true);
+							}
+
+							searchContext.setIncludeDiscussions(true);
+						}
+
+						LinkedHashMap<String, Object> params = new LinkedHashMap<String, Object>();
+
+						params.put("expandoAttributes", searchTerms.getKeywords());
+
+						searchContext.setAttribute("head", Boolean.FALSE.toString());
+						searchContext.setAttribute("params", params);
+						searchContext.setEnd(searchContainer.getEnd());
+						searchContext.setFolderIds(searchTerms.getFolderIds());
+
+						QueryConfig queryConfig = new QueryConfig();
+
+						queryConfig.setHighlightEnabled(true);
+
+						searchContext.setQueryConfig(queryConfig);
+
+						searchContext.setStart(searchContainer.getStart());
+
+						Hits hits = indexer.search(searchContext);
+
+						total = hits.getLength();
+
+						searchContainer.setTotal(total);
+
+						PortletURL hitURL = liferayPortletResponse.createRenderURL();
+
+						List<SearchResult> searchResultsList = SearchResultUtil.getSearchResults(hits, locale, hitURL);
+
+						emptySearchResults = searchResultsList.isEmpty();
+
+						for (int i = 0; i < searchResultsList.size(); i++) {
+							SearchResult searchResult = searchResultsList.get(i);
+
+							Summary summary = searchResult.getSummary();
+
+							JournalArticle article = null;
+							JournalFolder curFolder = null;
+
+							String className = searchResult.getClassName();
+
+							if (className.equals(JournalArticle.class.getName())) {
+								article = JournalArticleLocalServiceUtil.fetchLatestArticle(searchResult.getClassPK(), WorkflowConstants.STATUS_ANY, false);
+							}
+							else if (className.equals(JournalFolder.class.getName())) {
+								curFolder = JournalFolderLocalServiceUtil.getFolder(searchResult.getClassPK());
+							}
+						%>
+
+							<c:choose>
+								<c:when test="<%= (article != null) && JournalArticlePermission.contains(permissionChecker, article, ActionKeys.VIEW) %>">
+
+									<%
+									PortletURL rowURL = liferayPortletResponse.createRenderURL();
+
+									rowURL.setParameter("struts_action", "/journal/edit_article");
+									rowURL.setParameter("redirect", currentURL);
+									rowURL.setParameter("groupId", String.valueOf(article.getGroupId()));
+									rowURL.setParameter("folderId", String.valueOf(article.getFolderId()));
+									rowURL.setParameter("articleId", article.getArticleId());
+
+									List<String> versions = searchResult.getVersions();
+
+									Collections.sort(versions);
+
+									request.setAttribute("view_entries.jsp-article", article);
+									%>
+
+									<liferay-ui:app-view-search-entry
+										actionJsp="/html/portlet/journal/article_action.jsp"
+										containerName="<%= JournalUtil.getAbsolutePath(liferayPortletRequest, article.getFolderId()) %>"
+										cssClass='<%= MathUtil.isEven(i) ? "alt" : StringPool.BLANK %>'
+										description="<%= (summary != null) ? HtmlUtil.escape(summary.getContent()) : article.getDescription(locale) %>"
+										mbMessages="<%= searchResult.getMBMessages() %>"
+										queryTerms="<%= hits.getQueryTerms() %>"
+										rowCheckerId="<%= String.valueOf(article.getArticleId()) %>"
+										rowCheckerName="<%= JournalArticle.class.getSimpleName() %>"
+										showCheckbox="<%= JournalArticlePermission.contains(permissionChecker, article, ActionKeys.DELETE) || JournalArticlePermission.contains(permissionChecker, article, ActionKeys.UPDATE) %>"
+										status="<%= article.getStatus() %>"
+										thumbnailSrc='<%= Validator.isNotNull(article.getArticleImageURL(themeDisplay)) ? article.getArticleImageURL(themeDisplay) : themeDisplay.getPathThemeImages() + "/file_system/large/article.png" %>'
+										title="<%= (summary != null) ? HtmlUtil.escape(summary.getTitle()) : article.getTitle(locale) %>"
+										url="<%= rowURL.toString() %>"
+										versions="<%= versions %>"
+									/>
+								</c:when>
+
+								<c:when test="<%= curFolder != null %>">
+
+									<%
+									String folderImage = "folder_empty_article";
+
+									if (JournalFolderServiceUtil.getFoldersAndArticlesCount(scopeGroupId, curFolder.getFolderId()) > 0) {
+										folderImage = "folder_full_article";
+									}
+
+									PortletURL rowURL = liferayPortletResponse.createRenderURL();
+
+									rowURL.setParameter("struts_action", "/journal/view");
+									rowURL.setParameter("redirect", currentURL);
+									rowURL.setParameter("groupId", String.valueOf(curFolder.getGroupId()));
+									rowURL.setParameter("folderId", String.valueOf(curFolder.getFolderId()));
+
+									request.setAttribute("view_entries.jsp-folder", curFolder);
+									%>
+
+									<liferay-ui:app-view-search-entry
+										actionJsp="/html/portlet/journal/folder_action.jsp"
+										containerName="<%= JournalUtil.getAbsolutePath(liferayPortletRequest, curFolder.getParentFolderId()) %>"
+										cssClass='<%= MathUtil.isEven(i) ? "alt" : StringPool.BLANK %>'
+										description="<%= (summary != null) ? HtmlUtil.escape(summary.getContent()) : curFolder.getDescription() %>"
+										queryTerms="<%= hits.getQueryTerms() %>"
+										rowCheckerId="<%= String.valueOf(curFolder.getFolderId()) %>"
+										rowCheckerName="<%= JournalFolder.class.getSimpleName() %>"
+										showCheckbox="<%= JournalFolderPermission.contains(permissionChecker, curFolder, ActionKeys.DELETE) || JournalFolderPermission.contains(permissionChecker, curFolder, ActionKeys.UPDATE) %>"
+										thumbnailSrc='<%= themeDisplay.getPathThemeImages() + "/file_system/large/" + folderImage + ".png" %>'
+										title="<%= (summary != null) ? HtmlUtil.escape(summary.getTitle()) : curFolder.getName() %>"
+										url="<%= rowURL.toString() %>"
+									/>
+								</c:when>
+
+								<c:otherwise>
+									<div style="float: left; margin: 100px 10px 0px;">
+										<img alt="<liferay-ui:message key="image" />" border="no" src="<%= themeDisplay.getPathThemeImages() %>/application/forbidden_action.png" />
+									</div>
+								</c:otherwise>
+							</c:choose>
+
+						<%
+						}
+						%>
+
+					</c:when>
+					<c:otherwise>
+
+						<%
+						List results = null;
+						%>
+
+						<%@ include file="/html/portlet/journal/article_search_results_database.jspf" %>
+
+						<%
+						emptySearchResults = results.isEmpty();
+
+						String[] queryTerms = StringUtil.split(keywords);
+
+						for (int i = 0; i < results.size(); i++) {
+							Object result = results.get(i);
+						%>
+
+							<%@ include file="/html/portlet/journal/cast_result.jspf" %>
+
+							<c:choose>
+								<c:when test="<%= (curArticle != null) && JournalArticlePermission.contains(permissionChecker, curArticle, ActionKeys.VIEW) %>">
+
+									<%
+									String articleImageURL = curArticle.getArticleImageURL(themeDisplay);
+
+									PortletURL rowURL = liferayPortletResponse.createRenderURL();
+
+									rowURL.setParameter("struts_action", "/journal/edit_article");
+									rowURL.setParameter("redirect", currentURL);
+									rowURL.setParameter("groupId", String.valueOf(curArticle.getGroupId()));
+									rowURL.setParameter("folderId", String.valueOf(curArticle.getFolderId()));
+									rowURL.setParameter("articleId", curArticle.getArticleId());
+
+									request.setAttribute("view_entries.jsp-article", curArticle);
+									%>
+
+									<liferay-ui:app-view-search-entry
+										actionJsp="/html/portlet/journal/article_action.jsp"
+										containerName="<%= JournalUtil.getAbsolutePath(liferayPortletRequest, curArticle.getFolderId()) %>"
+										cssClass='<%= MathUtil.isEven(i) ? "alt" : StringPool.BLANK %>'
+										description="<%= curArticle.getDescription(locale) %>"
+										queryTerms="<%= queryTerms %>"
+										rowCheckerId="<%= String.valueOf(curArticle.getArticleId()) %>"
+										rowCheckerName="<%= JournalArticle.class.getSimpleName() %>"
+										showCheckbox="<%= JournalArticlePermission.contains(permissionChecker, curArticle, ActionKeys.DELETE) || JournalArticlePermission.contains(permissionChecker, curArticle, ActionKeys.UPDATE) %>"
+										status="<%= curArticle.getStatus() %>"
+										thumbnailSrc='<%= Validator.isNotNull(articleImageURL) ? articleImageURL : themeDisplay.getPathThemeImages() + "/file_system/large/article.png" %>'
+										title="<%= curArticle.getTitle(locale) %>"
+										url="<%= rowURL.toString() %>"
+									/>
+								</c:when>
+
+								<c:otherwise>
+									<div style="float: left; margin: 100px 10px 0px;">
+										<img alt="<liferay-ui:message key="image" />" border="no" src="<%= themeDisplay.getPathThemeImages() %>/application/forbidden_action.png" />
+									</div>
+								</c:otherwise>
+							</c:choose>
+
+						<%
+						}
+						%>
+
+					</c:otherwise>
+				</c:choose>
+
+				<c:if test="<%= emptySearchResults %>">
+					<div class="alert alert-info">
+
+						<%
+						String message = LanguageUtil.get(pageContext, "no-web-content-was-found-that-matched-the-specified-filters");
+
+						if (!advancedSearch) {
+							message = LanguageUtil.format(pageContext, "no-web-content-was-found-that-matched-the-keywords-x", "<strong>" + HtmlUtil.escape(keywords) + "</strong>");
+						}
+						%>
+
+						<%= message %>
+					</div>
+				</c:if>
+
+			<%
+			}
+			catch (Exception e) {
+				_log.error(e, e);
+			}
+			%>
+
+		</aui:form>
+	</div>
+
+	<%
+	request.setAttribute("view.jsp-total", String.valueOf(total));
+
+	request.setAttribute("view_entries.jsp-entryStart", String.valueOf(searchContainer.getStart()));
+	request.setAttribute("view_entries.jsp-entryEnd", String.valueOf(searchContainer.getEnd()));
+	%>
+
+	<aui:script>
+		Liferay.fire(
+			'<portlet:namespace />pageLoaded',
+			{
+				pagination: {
+					name: 'entryPagination',
+					state: {
+						page: <%= searchContainer.getCur() %>,
+						rowsPerPage: <%= searchContainer.getDelta() %>,
+						total: <%= total %>
+					}
+				},
+				src: Liferay.JOURNAL_SEARCH
+			}
+		);
+	</aui:script>
+</liferay-util:buffer>
+
+<c:choose>
+	<c:when test="<%= searchType == JournalSearchConstants.SINGLE %>">
+		<div class="search-results-container" id="<portlet:namespace />searchResultsContainer">
+
+			<%= searchResults %>
+
+		</div>
+	</c:when>
+	<c:when test="<%= searchType == JournalSearchConstants.FRAGMENT %>">
+		<div class="aa">
+		<div id="<portlet:namespace />fragmentSearchResults">
+			<%= searchResults %>
+		</div>
+		</div>
+	</c:when>
+</c:choose>
+
+<%
+request.setAttribute("view.jsp-folderId", String.valueOf(folderId));
+%>
+
+<span id="<portlet:namespace />displayStyleButtons">
+</span>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.journal.search_resources_jsp");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/select_folder.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/select_folder.jsp
new file mode 100644
index 0000000..e6cffb0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/select_folder.jsp
@@ -0,0 +1,173 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+JournalFolder folder = (JournalFolder)request.getAttribute(WebKeys.JOURNAL_FOLDER);
+
+long folderId = BeanParamUtil.getLong(folder, request, "folderId", JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID);
+
+String eventName = ParamUtil.getString(request, "eventName", liferayPortletResponse.getNamespace() + "selectFolder");
+
+String folderName = LanguageUtil.get(pageContext, "home");
+
+if (folder != null) {
+	folderName = folder.getName();
+
+	JournalUtil.addPortletBreadcrumbEntries(folder, request, renderResponse);
+}
+%>
+
+<aui:form method="post" name="selectFolderFm">
+	<liferay-ui:header
+		title="home"
+	/>
+
+	<liferay-ui:breadcrumb showGuestGroup="<%= false %>" showLayout="<%= false %>" showParentGroups="<%= false %>" />
+
+	<%
+	PortletURL portletURL = renderResponse.createRenderURL();
+
+	portletURL.setParameter("struts_action", "/journal/select_folder");
+	portletURL.setParameter("folderId", String.valueOf(folderId));
+	%>
+
+	<%
+	boolean hasAddFolderPermission = JournalFolderPermission.contains(permissionChecker, scopeGroupId, folderId, ActionKeys.ADD_FOLDER);
+	%>
+
+	<aui:button-row>
+		<c:if test="<%= hasAddFolderPermission %>">
+			<portlet:renderURL var="editFolderURL">
+				<portlet:param name="struts_action" value="/journal/edit_folder" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="parentFolderId" value="<%= String.valueOf(folderId) %>" />
+			</portlet:renderURL>
+
+			<aui:button href="<%= editFolderURL %>" value='<%= (folder == null) ? "add-folder" : "add-subfolder" %>' />
+		</c:if>
+
+		<%
+		Map<String, Object> data = new HashMap<String, Object>();
+
+		data.put("folderid", String.valueOf(folderId));
+		data.put("foldername", HtmlUtil.escape(folderName));
+		%>
+
+		<aui:button cssClass="selector-button" data="<%= data %>" value="choose-this-folder" />
+	</aui:button-row>
+
+	<br />
+
+	<liferay-ui:search-container
+		iteratorURL="<%= portletURL %>"
+		total="<%= JournalFolderServiceUtil.getFoldersCount(scopeGroupId, folderId) %>"
+	>
+		<liferay-ui:search-container-results
+			results="<%= JournalFolderServiceUtil.getFolders(scopeGroupId, folderId, searchContainer.getStart(), searchContainer.getEnd()) %>"
+		/>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portlet.journal.model.JournalFolderModel"
+			keyProperty="folderId"
+			modelVar="curFolder"
+			rowVar="row"
+		>
+			<liferay-portlet:renderURL varImpl="rowURL">
+				<portlet:param name="struts_action" value="/journal/select_folder" />
+				<portlet:param name="folderId" value="<%= String.valueOf(curFolder.getFolderId()) %>" />
+			</liferay-portlet:renderURL>
+
+			<%
+			int foldersCount = 0;
+			int articlesCount = 0;
+
+			try {
+				List<Long> subfolderIds = JournalFolderServiceUtil.getSubfolderIds(scopeGroupId, curFolder.getFolderId(), false);
+
+				foldersCount = subfolderIds.size();
+
+				subfolderIds.clear();
+				subfolderIds.add(curFolder.getFolderId());
+
+				articlesCount = JournalArticleServiceUtil.getFoldersAndArticlesCount(scopeGroupId, subfolderIds);
+			}
+			catch (com.liferay.portal.kernel.repository.RepositoryException re) {
+				rowURL = null;
+			}
+
+			String image = null;
+
+			if ((foldersCount + articlesCount) > 0) {
+				image = "folder_full_document";
+			}
+			else {
+				image = "folder_empty";
+			}
+			%>
+
+			<liferay-ui:search-container-column-text
+				name="folder"
+			>
+				<liferay-ui:icon image="<%= image %>" label="<%= true %>" message="<%= HtmlUtil.escape(curFolder.getName()) %>" url="<%= (rowURL != null) ? rowURL.toString() : StringPool.BLANK %>" />
+			</liferay-ui:search-container-column-text>
+
+			<liferay-ui:search-container-column-text
+				name="num-of-folders"
+				value="<%= String.valueOf(foldersCount) %>"
+			/>
+
+			<liferay-ui:search-container-column-text
+				name="num-of-web-content-instances"
+				value="<%= String.valueOf(articlesCount) %>"
+			/>
+
+			<c:if test="<%= rowURL != null %>">
+				<liferay-ui:search-container-column-text>
+
+					<%
+					Map<String, Object> data = new HashMap<String, Object>();
+
+					data.put("folderid", curFolder.getFolderId());
+					data.put("foldername", HtmlUtil.escape(curFolder.getName()));
+					%>
+
+					<aui:button cssClass="selector-button" data="<%= data %>" value="choose" />
+				</liferay-ui:search-container-column-text>
+			</c:if>
+
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script use="aui-base">
+	var Util = Liferay.Util;
+
+	A.one('#<portlet:namespace />selectFolderFm').delegate(
+		'click',
+		function(event) {
+			var result = Util.getAttributes(event.currentTarget, 'data-');
+
+			Util.getOpener().Liferay.fire('<%= HtmlUtil.escapeJS(eventName) %>', result);
+
+			Util.getWindow().hide();
+		},
+		'.selector-button'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/sort_button.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/sort_button.jsp
new file mode 100644
index 0000000..561e1d4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/sort_button.jsp
@@ -0,0 +1,74 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+String navigation = ParamUtil.getString(request, "navigation", "home");
+
+long folderId = GetterUtil.getLong((String)request.getAttribute("view.jsp-folderId"));
+
+String structureId = ParamUtil.getString(request, "structureId");
+
+String orderByType = ParamUtil.getString(request, "orderByType");
+
+String reverseOrderByType = "asc";
+
+if (orderByType.equals("asc")) {
+	reverseOrderByType = "desc";
+}
+%>
+
+<aui:nav-item dropdown="<%= true %>" id="sortButtonContainer" label="sort-by">
+
+	<%
+	String taglibURL = "javascript:" + liferayPortletResponse.getNamespace() + "sortEntries('" + folderId + "', 'display-date','" + reverseOrderByType + "')";
+	%>
+
+	<aui:nav-item href="<%= taglibURL %>" label="display-date" />
+
+	<%
+	taglibURL = "javascript:" + liferayPortletResponse.getNamespace() + "sortEntries('" + folderId + "', 'modified-date','" + reverseOrderByType + "')";
+	%>
+
+	<aui:nav-item href="<%= taglibURL %>" label="modified-date" />
+</aui:nav-item>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />sortEntries',
+		function(folderId, orderByCol, reverseOrderByType) {
+			Liferay.fire(
+				'<portlet:namespace />dataRequest',
+				{
+					requestParams: {
+						'<portlet:namespace />folderId': folderId,
+						'<portlet:namespace />navigation': '<%= HtmlUtil.escape(navigation) %>',
+						'<portlet:namespace />struts_action': '/journal/view',
+						'<portlet:namespace />structureId': '<%= HtmlUtil.escape(structureId) %>',
+						'<portlet:namespace />viewEntries': <%= Boolean.TRUE.toString() %>,
+						'<portlet:namespace />viewFolders': <%= Boolean.FALSE.toString() %>,
+						'<portlet:namespace />orderByCol': orderByCol,
+						'<portlet:namespace />orderByType': reverseOrderByType,
+						'<portlet:namespace />saveOrderBy': <%= Boolean.TRUE.toString() %>
+					}
+				}
+			);
+		},
+		['aui-base']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/toolbar.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/toolbar.jsp
new file mode 100644
index 0000000..592eacb
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/toolbar.jsp
@@ -0,0 +1,157 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+String strutsAction = ParamUtil.getString(request, "struts_action");
+%>
+
+<aui:nav-bar>
+	<aui:nav collapsible="<%= false %>" cssClass="nav-display-style-buttons pull-right" id="displayStyleButtons">
+		<aui:nav-item>
+			<span class="pull-left display-style-buttons-container" id="<portlet:namespace />displayStyleButtonsContainer">
+				<c:if test='<%= !strutsAction.equals("/journal/search") %>'>
+					<liferay-util:include page="/html/portlet/journal/display_style_buttons.jsp" />
+				</c:if>
+			</span>
+		</aui:nav-item>
+	</aui:nav>
+
+	<aui:nav id="toolbarContainer">
+		<aui:nav-item cssClass="hide" dropdown="<%= true %>" id="actionsButtonContainer" label="actions">
+
+			<%
+			String taglibURL = "javascript:Liferay.fire('" + renderResponse.getNamespace() + "editEntry', {action: '" + Constants.EXPIRE + "'}); void(0);";
+			%>
+
+			<aui:nav-item href="<%= taglibURL %>" label="expire" />
+
+			<%
+			taglibURL = "javascript:Liferay.fire('" + renderResponse.getNamespace() + "editEntry', {action: '" + Constants.MOVE + "'}); void(0);";
+			%>
+
+			<aui:nav-item href="<%= taglibURL %>" label="move" />
+
+			<%
+			taglibURL = "javascript:" + renderResponse.getNamespace() + "deleteEntries();";
+			%>
+
+			<aui:nav-item href="<%= taglibURL %>" iconCssClass='<%= TrashUtil.isTrashEnabled(scopeGroupId) ? "icon-trash" : "icon-remove" %>' label='<%= TrashUtil.isTrashEnabled(scopeGroupId) ? "move-to-the-recycle-bin" : "delete" %>' />
+		</aui:nav-item>
+
+		<liferay-util:include page="/html/portlet/journal/add_button.jsp" />
+
+		<liferay-util:include page="/html/portlet/journal/sort_button.jsp" />
+
+		<c:if test="<%= !user.isDefaultUser() %>">
+			<aui:nav-item dropdown="<%= true %>" label="manage">
+
+				<%
+				String taglibURL = "javascript:" + renderResponse.getNamespace() + "openStructuresView()";
+				%>
+
+				<aui:nav-item href="<%= taglibURL %>" iconCssClass="icon-tasks" label="structures" />
+
+				<%
+				taglibURL = "javascript:" + renderResponse.getNamespace() + "openTemplatesView()";
+				%>
+
+				<aui:nav-item href="<%= taglibURL %>" iconCssClass="icon-list-alt" label="templates" />
+
+				<%
+				taglibURL = "javascript:" + renderResponse.getNamespace() + "openFeedsView()";
+				%>
+
+				<c:if test="<%= PortalUtil.isRSSFeedsEnabled() %>">
+					<aui:nav-item href="<%= taglibURL %>" iconCssClass="icon-rss" label="feeds" />
+				</c:if>
+			</aui:nav-item>
+		</c:if>
+	</aui:nav>
+
+	<aui:nav-bar-search cssClass="pull-right" file="/html/portlet/journal/article_search.jsp" />
+</aui:nav-bar>
+
+<aui:script>
+	<c:if test="<%= PortalUtil.isRSSFeedsEnabled() %>">
+		function <portlet:namespace />openFeedsView() {
+			Liferay.Util.openWindow(
+				{
+					id: '<portlet:namespace />openFeedsView',
+					title: '<%= UnicodeLanguageUtil.get(pageContext, "feeds") %>',
+					uri: '<liferay-portlet:renderURL windowState="<%= LiferayWindowState.POP_UP.toString() %>"><portlet:param name="struts_action" value="/journal/view_feeds" /></liferay-portlet:renderURL>'
+				}
+			);
+		}
+	</c:if>
+
+	<%
+	Portlet portlet = PortletLocalServiceUtil.getPortletById(portletDisplay.getId());
+	%>
+
+	function <portlet:namespace />deleteEntries() {
+		if (<%= TrashUtil.isTrashEnabled(scopeGroupId) %> || confirm(' <%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-delete-the-selected-entries") %>')) {
+			Liferay.fire(
+				'<%= renderResponse.getNamespace() %>editEntry',
+				{
+					action: '<%= TrashUtil.isTrashEnabled(scopeGroupId) ? Constants.MOVE_TO_TRASH : Constants.DELETE %>'
+				}
+			);
+		}
+	}
+
+	function <portlet:namespace />openStructuresView() {
+		Liferay.Util.openDDMPortlet(
+			{
+				basePortletURL: '<%= PortletURLFactoryUtil.create(request, PortletKeys.DYNAMIC_DATA_MAPPING, themeDisplay.getPlid(), PortletRequest.RENDER_PHASE) %>',
+				dialog: {
+					destroyOnHide: true,
+					on: {
+						visibleChange: function(event) {
+							if (!event.newVal) {
+								Liferay.Portlet.refresh('#p_p_id_' + <%= portletDisplay.getId() %> + '_');
+							}
+						}
+					}
+				},
+				refererPortletName: '<%= PortletKeys.JOURNAL %>',
+				refererWebDAVToken: '<%= portlet.getWebDAVStorageToken() %>',
+				showGlobalScope: false,
+				showManageTemplates: true,
+				title: '<%= UnicodeLanguageUtil.get(pageContext, "structures") %>'
+			}
+		);
+	}
+
+	function <portlet:namespace />openTemplatesView() {
+		Liferay.Util.openDDMPortlet(
+			{
+				basePortletURL: '<%= PortletURLFactoryUtil.create(request, PortletKeys.DYNAMIC_DATA_MAPPING, themeDisplay.getPlid(), PortletRequest.RENDER_PHASE) %>',
+				classNameId: '<%= PortalUtil.getClassNameId(DDMStructure.class) %>',
+				dialog: {
+					destroyOnHide: true
+				},
+				groupId: <%= scopeGroupId %>,
+				refererPortletName: '<%= PortletKeys.JOURNAL %>',
+				refererWebDAVToken: '<%= portlet.getWebDAVStorageToken() %>',
+				showHeader: false,
+				struts_action: '/dynamic_data_mapping/view_template',
+				title: '<%= UnicodeLanguageUtil.get(pageContext, "templates") %>'
+			}
+		);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/update_translation_redirect.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/update_translation_redirect.jsp
new file mode 100644
index 0000000..e98bda6
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/update_translation_redirect.jsp
@@ -0,0 +1,46 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+String cmd = ParamUtil.getString(request, Constants.CMD);
+
+JournalArticle article = (JournalArticle)request.getAttribute(WebKeys.JOURNAL_ARTICLE);
+
+String toLanguageId = ParamUtil.getString(request, "toLanguageId");
+
+String toLanguageDisplayName = StringPool.BLANK;
+
+if (cmd.equals(Constants.TRANSLATE)) {
+	Locale toLocale = LocaleUtil.fromLanguageId(toLanguageId);
+
+	toLanguageDisplayName = toLocale.getDisplayName(locale);
+}
+%>
+
+<aui:script use="aui-base">
+	var openingWindow = Liferay.Util.getOpener();
+
+	openingWindow.<portlet:namespace />postProcessTranslation('<%= System.currentTimeMillis() %>', '<%= HtmlUtil.escapeJS(cmd) %>', '<%= article.getVersion() %>', '<%= HtmlUtil.escapeJS(toLanguageId) %>', '<%= toLanguageDisplayName %>', '<%= WorkflowConstants.getStatusLabel(article.getStatus()) %>');
+
+	Liferay.fire(
+		'closeWindow',
+		{
+			id: '<%= HtmlUtil.escapeJS(renderResponse.getNamespace() + toLanguageId) %>'
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view.jsp
new file mode 100644
index 0000000..f4ef749
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view.jsp
@@ -0,0 +1,190 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+String navigation = ParamUtil.getString(request, "navigation");
+
+JournalFolder folder = (JournalFolder)request.getAttribute(WebKeys.JOURNAL_FOLDER);
+
+long folderId = BeanParamUtil.getLong(folder, request, "folderId", JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID);
+
+if ((folder == null) && (folderId != JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID)) {
+	try {
+		folder = JournalFolderLocalServiceUtil.getFolder(folderId);
+	}
+	catch (NoSuchFolderException nsfe) {
+		folderId = JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID;
+	}
+}
+
+String displayStyle = ParamUtil.getString(request, "displayStyle");
+
+if (Validator.isNull(displayStyle)) {
+	displayStyle = portalPreferences.getValue(PortletKeys.JOURNAL, "display-style", PropsValues.JOURNAL_DEFAULT_DISPLAY_VIEW);
+}
+
+if (!ArrayUtil.contains(displayViews, displayStyle)) {
+	displayStyle = displayViews[0];
+}
+
+int entryStart = ParamUtil.getInteger(request, "entryStart");
+int entryEnd = ParamUtil.getInteger(request, "entryEnd", SearchContainer.DEFAULT_DELTA);
+
+int folderStart = ParamUtil.getInteger(request, "folderStart");
+int folderEnd = ParamUtil.getInteger(request, "folderEnd", SearchContainer.DEFAULT_DELTA);
+
+request.setAttribute("view.jsp-folder", folder);
+
+request.setAttribute("view.jsp-folderId", String.valueOf(folderId));
+%>
+
+<portlet:actionURL var="undoTrashURL">
+	<portlet:param name="struts_action" value="/journal/edit_entry" />
+	<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.RESTORE %>" />
+</portlet:actionURL>
+
+<liferay-ui:trash-undo portletURL="<%= undoTrashURL %>" />
+
+<div id="<portlet:namespace />journalContainer">
+	<aui:row cssClass="lfr-app-column-view">
+		<aui:col cssClass="navigation-pane" width="<%= 20 %>">
+			<liferay-util:include page="/html/portlet/journal/view_folders.jsp" />
+
+			<div class="folder-pagination"></div>
+		</aui:col>
+
+		<aui:col cssClass="context-pane" last="<%= true %>" width="<%= 80 %>">
+			<liferay-ui:app-view-toolbar
+				includeDisplayStyle="<%= true %>"
+				includeSelectAll="<%= true %>"
+			>
+				<liferay-util:include page="/html/portlet/journal/toolbar.jsp" />
+			</liferay-ui:app-view-toolbar>
+
+			<div class="journal-breadcrumb" id="<portlet:namespace />breadcrumbContainer">
+				<liferay-util:include page="/html/portlet/journal/breadcrumb.jsp" />
+			</div>
+
+			<%
+			PortletURL portletURL = liferayPortletResponse.createRenderURL();
+
+			portletURL.setParameter("struts_action", "/journal/edit_article");
+			portletURL.setParameter("folderId", String.valueOf(folderId));
+			%>
+
+			<aui:form action="<%= portletURL.toString() %>" method="get" name="fm">
+				<aui:input name="<%= Constants.CMD %>" type="hidden" />
+				<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+				<aui:input name="folderIds" type="hidden" />
+				<aui:input name="articleIds" type="hidden" />
+				<aui:input name="newFolderId" type="hidden" />
+
+				<div class="journal-container" id="<portlet:namespace />entriesContainer">
+					<liferay-util:include page="/html/portlet/journal/view_entries.jsp" />
+				</div>
+
+				<div class="article-entries-pagination"></div>
+			</aui:form>
+		</aui:col>
+	</aui:row>
+</div>
+
+<%
+int entriesTotal = GetterUtil.getInteger((String)request.getAttribute("view.jsp-total"));
+int foldersTotal = GetterUtil.getInteger((String)request.getAttribute("view_folders.jsp-total"));
+
+entryEnd = GetterUtil.getInteger(request.getAttribute("view_entries.jsp-entryEnd"), entryEnd);
+entryStart = GetterUtil.getInteger(request.getAttribute("view_entries.jsp-entryStart"), entryStart);
+
+folderEnd = GetterUtil.getInteger(request.getAttribute("view_folders.jsp-folderEnd"), folderEnd);
+folderStart = GetterUtil.getInteger(request.getAttribute("view_folders.jsp-folderStart"), folderStart);
+%>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />toggleActionsButton',
+		function() {
+			var A = AUI();
+
+			var actionsButton = A.one('#<portlet:namespace />actionsButtonContainer');
+
+			var hide = (Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace /><%= RowChecker.ALL_ROW_IDS %>Checkbox').length == 0);
+
+			if (actionsButton) {
+				actionsButton.toggle(!hide);
+			}
+		},
+		['liferay-util-list-fields']
+	);
+
+	<portlet:namespace />toggleActionsButton();
+</aui:script>
+
+<aui:script use="liferay-journal-navigation">
+	<liferay-portlet:resourceURL copyCurrentRenderParameters="<%= false %>" varImpl="mainURL" />
+
+	new Liferay.Portlet.JournalNavigation(
+		{
+			advancedSearch: '<%= DisplayTerms.ADVANCED_SEARCH %>',
+			displayStyle: '<%= HtmlUtil.escapeJS(displayStyle) %>',
+			folders: {
+				defaultParams: {
+					p_p_id: '<%= portletDisplay.getId() %>',
+					p_p_lifecycle: 0
+				},
+				defaultParentFolderId: '<%= JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID %>',
+				'listViewConfig.useTransition': false,
+				mainUrl: '<%= mainURL %>',
+				strutsAction: '/journal/view'
+			},
+			move: {
+				allRowIds: '<%= RowChecker.ALL_ROW_IDS %>',
+				editEntryUrl: '<portlet:actionURL><portlet:param name="struts_action" value="/journal/edit_entry" /></portlet:actionURL>',
+				folderIdRegEx: /&?<portlet:namespace />folderId=([\d]+)/i,
+				folderIdHashRegEx: /#.*&?<portlet:namespace />folderId=([\d]+)/i,
+				form: {
+					method: 'post',
+					node: A.one(document.<portlet:namespace />fm)
+				},
+				moveEntryRenderUrl: '<portlet:renderURL><portlet:param name="struts_action" value="/journal/move_entry" /></portlet:renderURL>',
+				trashLinkId: '<%= TrashUtil.isTrashEnabled(scopeGroupId) ? "_" + PortletKeys.CONTROL_PANEL_MENU + "_portlet_" + PortletKeys.TRASH : StringPool.BLANK %>',
+				updateable: true
+			},
+			paginator: {
+				entriesTotal: <%= entriesTotal %>,
+				entryEnd: <%= entryEnd %>,
+				entryRowsPerPage: <%= entryEnd - entryStart %>,
+				entryRowsPerPageOptions: [<%= StringUtil.merge(PropsValues.SEARCH_CONTAINER_PAGE_DELTA_VALUES) %>],
+				entryStart: <%= entryStart %>,
+				folderEnd: <%= folderEnd %>,
+				folderId: <%= folderId %>,
+				folderRowsPerPage: <%= folderEnd - folderStart %>,
+				folderRowsPerPageOptions: [<%= StringUtil.merge(PropsValues.SEARCH_CONTAINER_PAGE_DELTA_VALUES) %>],
+				folderStart: <%= folderStart %>,
+				foldersTotal: <%= foldersTotal %>
+			},
+			namespace: '<portlet:namespace />',
+			portletId: '<%= portletDisplay.getId() %>',
+			rowIds: '<%= RowChecker.ROW_IDS %>',
+			select: {
+				displayViews: ['<%= StringUtil.merge(displayViews, "','") %>']
+			}
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_article.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_article.jsp
new file mode 100644
index 0000000..61b703a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_article.jsp
@@ -0,0 +1,69 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+JournalArticle article = (JournalArticle)request.getAttribute(WebKeys.JOURNAL_ARTICLE);
+
+long groupId = BeanParamUtil.getLong(article, request, "groupId", scopeGroupId);
+String articleId = ParamUtil.getString(request, "articleId");
+String languageId = LanguageUtil.getLanguageId(request);
+int articlePage = ParamUtil.getInteger(renderRequest, "page", 1);
+String xmlRequest = PortletRequestUtil.toXML(renderRequest, renderResponse);
+
+JournalArticleDisplay articleDisplay = JournalContentUtil.getDisplay(groupId, articleId, null, null, languageId, themeDisplay, articlePage, xmlRequest);
+
+try {
+	article = JournalArticleLocalServiceUtil.getLatestArticle(groupId, articleId, WorkflowConstants.STATUS_ANY);
+
+	boolean expired = article.isExpired();
+
+	if (!expired) {
+		Date expirationDate = article.getExpirationDate();
+
+		if ((expirationDate != null) && expirationDate.before(new Date())) {
+			expired = true;
+		}
+	}
+%>
+
+	<c:choose>
+		<c:when test="<%= (articleDisplay != null) && !expired %>">
+
+			<div class="journal-content-article">
+				<%= RuntimePageUtil.processXML(request, response, articleDisplay.getContent()) %>
+			</div>
+
+		</c:when>
+		<c:otherwise>
+			<div class="alert alert-error">
+				<liferay-ui:message key="this-content-has-expired-or-you-do-not-have-the-required-permissions-to-access-it" />
+			</div>
+		</c:otherwise>
+	</c:choose>
+
+<%
+} catch (NoSuchArticleException nsae) {
+%>
+
+	<div class="alert alert-error">
+		<%= LanguageUtil.get(pageContext, "the-selected-web-content-no-longer-exists") %>
+	</div>
+
+<%
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_article_content.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_article_content.jsp
new file mode 100644
index 0000000..4ca4082
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_article_content.jsp
@@ -0,0 +1,33 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<html>
+
+<head>
+	<liferay-util:include page="/html/common/themes/top_head.jsp" />
+</head>
+
+<body>
+
+<%= request.getAttribute(WebKeys.JOURNAL_ARTICLE_CONTENT) %>
+
+<liferay-util:include page="/html/common/themes/bottom.jsp" />
+
+</body>
+
+</html>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_article_descriptive.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_article_descriptive.jsp
new file mode 100644
index 0000000..c397839
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_article_descriptive.jsp
@@ -0,0 +1,68 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+JournalArticle article = (JournalArticle)request.getAttribute("view_entries.jsp-article");
+
+PortletURL tempRowURL = (PortletURL)request.getAttribute("view_entries.jsp-tempRowURL");
+
+JournalArticle latestApprovedArticleVersion = null;
+
+Date createDate = article.getCreateDate();
+
+if (article.getVersion() > JournalArticleConstants.VERSION_DEFAULT) {
+	JournalArticle firstArticleVersion = JournalArticleLocalServiceUtil.getArticle(article.getGroupId(), article.getArticleId(), JournalArticleConstants.VERSION_DEFAULT);
+
+	createDate = firstArticleVersion.getCreateDate();
+
+	if (article.getStatus() > WorkflowConstants.STATUS_APPROVED) {
+		latestApprovedArticleVersion = JournalArticleLocalServiceUtil.fetchLatestArticle(article.getGroupId(), article.getArticleId(), WorkflowConstants.STATUS_APPROVED);
+	}
+}
+
+String articleImageURL = article.getArticleImageURL(themeDisplay);
+%>
+
+<liferay-ui:app-view-entry
+	actionJsp="/html/portlet/journal/article_action.jsp"
+	assetCategoryClassName="<%= JournalArticle.class.getName() %>"
+	assetCategoryClassPK="<%= article.getResourcePrimKey() %>"
+	assetTagClassName="<%= JournalArticle.class.getName() %>"
+	assetTagClassPK="<%= article.getResourcePrimKey() %>"
+	author="<%= article.getUserName() %>"
+	createDate="<%= createDate %>"
+	description="<%= article.getDescription(locale) %>"
+	displayDate="<%= article.getDisplayDate() %>"
+	displayStyle="descriptive"
+	expirationDate="<%= article.getExpirationDate() %>"
+	groupId="<%= article.getGroupId() %>"
+	latestApprovedVersion="<%= (latestApprovedArticleVersion != null) ? String.valueOf(latestApprovedArticleVersion.getVersion()) : null %>"
+	latestApprovedVersionAuthor="<%= (latestApprovedArticleVersion != null) ? String.valueOf(latestApprovedArticleVersion.getUserName()) : null %>"
+	modifiedDate="<%= article.getModifiedDate() %>"
+	reviewDate="<%= article.getReviewDate() %>"
+	rowCheckerId="<%= String.valueOf(article.getArticleId()) %>"
+	rowCheckerName="<%= JournalArticle.class.getSimpleName() %>"
+	showCheckbox="<%= JournalArticlePermission.contains(permissionChecker, article, ActionKeys.DELETE) || JournalArticlePermission.contains(permissionChecker, article, ActionKeys.EXPIRE) || JournalArticlePermission.contains(permissionChecker, article, ActionKeys.UPDATE) %>"
+	status="<%= article.getStatus() %>"
+	thumbnailDivStyle="height: 136px; width: 136px;"
+	thumbnailSrc='<%= Validator.isNotNull(articleImageURL) ? articleImageURL : themeDisplay.getPathThemeImages() + "/file_system/large/article.png" %>'
+	thumbnailStyle="max-height: 128px; max-width: 128px;"
+	title="<%= article.getTitle(locale) %>"
+	url="<%= tempRowURL.toString() %>"
+	version="<%= String.valueOf(article.getVersion()) %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_article_history.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_article_history.jsp
new file mode 100644
index 0000000..01ec0b5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_article_history.jsp
@@ -0,0 +1,218 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+String tabs1 = ParamUtil.getString(request, "tabs1", "web-content");
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+String referringPortletResource = ParamUtil.getString(request, "referringPortletResource");
+
+String orderByCol = ParamUtil.getString(request, "orderByCol");
+
+JournalArticle article = (JournalArticle)request.getAttribute(WebKeys.JOURNAL_ARTICLE);
+%>
+
+<c:choose>
+	<c:when test="<%= article == null %>">
+		<div class="alert alert-error">
+			<%= LanguageUtil.get(pageContext, "the-selected-web-content-no-longer-exists") %>
+		</div>
+	</c:when>
+	<c:otherwise>
+
+		<%
+		PortletURL portletURL = renderResponse.createRenderURL();
+
+		portletURL.setParameter("struts_action", "/journal/view_article_history");
+		portletURL.setParameter("tabs1", tabs1);
+		portletURL.setParameter("redirect", redirect);
+		portletURL.setParameter("referringPortletResource", referringPortletResource);
+		portletURL.setParameter("groupId", String.valueOf(article.getGroupId()));
+		portletURL.setParameter("articleId", article.getArticleId());
+		%>
+
+		<liferay-util:include page="/html/portlet/journal/article_header.jsp" />
+
+		<aui:form action="<%= portletURL.toString() %>" method="post" name="fm">
+			<aui:input name="<%= Constants.CMD %>" type="hidden" />
+			<aui:input name="referringPortletResource" type="hidden" value="<%= referringPortletResource %>" />
+			<aui:input name="groupId" type="hidden" />
+			<aui:input name="articleId" type="hidden" value="<%= article.getArticleId() %>" />
+			<aui:input name="articleIds" type="hidden" />
+			<aui:input name="expireArticleIds" type="hidden" />
+
+			<%
+			ArticleSearch searchContainer = new ArticleSearch(renderRequest, portletURL);
+
+			List<String> headerNames = new ArrayList<String>();
+
+			headerNames.add("id");
+			headerNames.add("title");
+			headerNames.add("version");
+			headerNames.add("status");
+			headerNames.add("modified-date");
+
+			if (article.getDisplayDate() != null) {
+				headerNames.add("display-date");
+			}
+
+			headerNames.add("author");
+			headerNames.add(StringPool.BLANK);
+
+			searchContainer.setHeaderNames(headerNames);
+
+			Map<String, String> orderableHeaders = new HashMap<String, String>();
+
+			orderableHeaders.put("modified-date", "modified-date");
+
+			if (article.getDisplayDate() != null) {
+				orderableHeaders.put("display-date", "display-date");
+			}
+
+			orderableHeaders.put("version", "version");
+
+			searchContainer.setOrderableHeaders(orderableHeaders);
+
+			if (Validator.isNull(orderByCol)) {
+				searchContainer.setOrderByCol("version");
+			}
+
+			searchContainer.setRowChecker(new RowChecker(renderResponse));
+
+			ArticleSearchTerms searchTerms = (ArticleSearchTerms)searchContainer.getSearchTerms();
+
+			searchTerms.setAdvancedSearch(true);
+			searchTerms.setArticleId(article.getArticleId());
+
+			int total = JournalArticleServiceUtil.getArticlesCountByArticleId(searchTerms.getGroupId(), searchTerms.getArticleId());
+
+			searchContainer.setTotal(total);
+
+			List<JournalArticle> results = JournalArticleServiceUtil.getArticlesByArticleId(searchTerms.getGroupId(), searchTerms.getArticleId(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+
+			searchContainer.setResults(results);
+			%>
+
+			<c:if test="<%= !results.isEmpty() %>">
+				<aui:button-row>
+					<c:if test="<%= JournalArticlePermission.contains(permissionChecker, article, ActionKeys.EXPIRE) %>">
+						<aui:button disabled="<%= true %>" name="expire" onClick='<%= renderResponse.getNamespace() + "expireArticles();" %>' value="expire" />
+					</c:if>
+
+					<c:if test="<%= JournalArticlePermission.contains(permissionChecker, article, ActionKeys.DELETE) %>">
+						<aui:button disabled="<%= true %>" name="delete" onClick='<%= renderResponse.getNamespace() + "deleteArticles();" %>' value="delete" />
+					</c:if>
+				</aui:button-row>
+			</c:if>
+
+			<%
+			List resultRows = searchContainer.getResultRows();
+
+			for (int i = 0; i < results.size(); i++) {
+				JournalArticle articleVersion = results.get(i);
+
+				articleVersion = articleVersion.toEscapedModel();
+
+				ResultRow row = new ResultRow(articleVersion, articleVersion.getArticleId() + EditArticleAction.VERSION_SEPARATOR + articleVersion.getVersion(), i);
+
+				// Article id
+
+				row.addText(articleVersion.getArticleId());
+
+				// Title
+
+				row.addText(articleVersion.getTitle(locale));
+
+				// Version
+
+				row.addText(String.valueOf(articleVersion.getVersion()));
+
+				// Status
+
+				row.addStatus(articleVersion.getStatus(), articleVersion.getStatusByUserId(), articleVersion.getStatusDate());
+
+				// Modified date
+
+				row.addDate(articleVersion.getModifiedDate());
+
+				// Display date
+
+				if (articleVersion.getDisplayDate() != null) {
+					row.addDate(articleVersion.getDisplayDate());
+				}
+
+				// Author
+
+				row.addText(PortalUtil.getUserName(articleVersion));
+
+				// Action
+
+				row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/journal/article_version_action.jsp");
+
+				// Add result row
+
+				resultRows.add(row);
+			}
+			%>
+
+			<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+		</aui:form>
+
+		<aui:script>
+			Liferay.Util.toggleSearchContainerButton('#<portlet:namespace />delete', '#<portlet:namespace /><%= searchContainerReference.getId() %>SearchContainer', document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+			Liferay.Util.toggleSearchContainerButton('#<portlet:namespace />expire', '#<portlet:namespace /><%= searchContainerReference.getId() %>SearchContainer', document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+			<c:if test="<%= JournalArticlePermission.contains(permissionChecker, article, ActionKeys.DELETE) %>">
+				Liferay.provide(
+					window,
+					'<portlet:namespace />deleteArticles',
+					function() {
+						if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-delete-the-selected-version") %>')) {
+							document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.DELETE %>";
+							document.<portlet:namespace />fm.<portlet:namespace />groupId.value = "<%= scopeGroupId %>";
+							document.<portlet:namespace />fm.<portlet:namespace />articleId.value = "";
+							document.<portlet:namespace />fm.<portlet:namespace />articleIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+							submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/journal/edit_article" /><portlet:param name="redirect" value="<%= currentURL %>" /></portlet:actionURL>");
+						}
+					},
+					['liferay-util-list-fields']
+				);
+			</c:if>
+
+			<c:if test="<%= JournalArticlePermission.contains(permissionChecker, article, ActionKeys.EXPIRE) %>">
+				Liferay.provide(
+					window,
+					'<portlet:namespace />expireArticles',
+					function() {
+						if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-expire-the-selected-version") %>')) {
+							document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.EXPIRE %>";
+							document.<portlet:namespace />fm.<portlet:namespace />groupId.value = "<%= scopeGroupId %>";
+							document.<portlet:namespace />fm.<portlet:namespace />articleId.value = "";
+							document.<portlet:namespace />fm.<portlet:namespace />expireArticleIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+							submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/journal/edit_article" /><portlet:param name="redirect" value="<%= currentURL %>" /></portlet:actionURL>");
+						}
+					},
+					['liferay-util-list-fields']
+				);
+			</c:if>
+		</aui:script>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_article_icon.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_article_icon.jsp
new file mode 100644
index 0000000..4f4c74c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_article_icon.jsp
@@ -0,0 +1,41 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+JournalArticle article = (JournalArticle)request.getAttribute("view_entries.jsp-article");
+
+PortletURL tempRowURL = (PortletURL)request.getAttribute("view_entries.jsp-tempRowURL");
+
+String articleImageURL = article.getArticleImageURL(themeDisplay);
+%>
+
+<liferay-ui:app-view-entry
+	actionJsp="/html/portlet/journal/article_action.jsp"
+	description="<%= article.getDescription(locale) %>"
+	displayStyle="icon"
+	groupId="<%= article.getGroupId() %>"
+	rowCheckerId="<%= String.valueOf(article.getArticleId()) %>"
+	rowCheckerName="<%= JournalArticle.class.getSimpleName() %>"
+	showCheckbox="<%= JournalArticlePermission.contains(permissionChecker, article, ActionKeys.DELETE) || JournalArticlePermission.contains(permissionChecker, article, ActionKeys.EXPIRE) || JournalArticlePermission.contains(permissionChecker, article, ActionKeys.UPDATE) %>"
+	status="<%= article.getStatus() %>"
+	thumbnailDivStyle="height: 136px; width: 136px;"
+	thumbnailSrc='<%= Validator.isNotNull(articleImageURL) ? articleImageURL : themeDisplay.getPathThemeImages() + "/file_system/large/article.png" %>'
+	thumbnailStyle="max-height: 128px; max-width: 128px;"
+	title="<%= article.getTitle(locale) %>"
+	url="<%= tempRowURL.toString() %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_entries.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_entries.jsp
new file mode 100644
index 0000000..2ed2862
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_entries.jsp
@@ -0,0 +1,490 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+long folderId = GetterUtil.getLong((String)request.getAttribute("view.jsp-folderId"));
+
+String displayStyle = ParamUtil.getString(request, "displayStyle");
+
+if (Validator.isNull(displayStyle)) {
+	displayStyle = portalPreferences.getValue(PortletKeys.JOURNAL, "display-style", PropsValues.JOURNAL_DEFAULT_DISPLAY_VIEW);
+}
+else {
+	boolean saveDisplayStyle = ParamUtil.getBoolean(request, "saveDisplayStyle");
+
+	if (saveDisplayStyle && ArrayUtil.contains(displayViews, displayStyle)) {
+		portalPreferences.setValue(PortletKeys.JOURNAL, "display-style", displayStyle);
+	}
+}
+
+if (!ArrayUtil.contains(displayViews, displayStyle)) {
+	displayStyle = displayViews[0];
+}
+
+String ddmStructureName = LanguageUtil.get(pageContext, "basic-web-content");
+
+PortletURL portletURL = liferayPortletResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/journal/view");
+
+int entryStart = ParamUtil.getInteger(request, "entryStart");
+int entryEnd = ParamUtil.getInteger(request, "entryEnd", SearchContainer.DEFAULT_DELTA);
+
+ArticleSearch searchContainer = new ArticleSearch(liferayPortletRequest, entryEnd / (entryEnd - entryStart), entryEnd - entryStart, portletURL);
+
+String orderByCol = ParamUtil.getString(request, "orderByCol");
+String orderByType = ParamUtil.getString(request, "orderByType");
+
+if (Validator.isNull(orderByCol)) {
+	orderByCol = portalPreferences.getValue(PortletKeys.JOURNAL, "order-by-col", "modified-date");
+	orderByType = portalPreferences.getValue(PortletKeys.JOURNAL, "order-by-type", "asc");
+}
+else {
+	boolean saveOrderBy = ParamUtil.getBoolean(request, "saveOrderBy");
+
+	if (saveOrderBy) {
+		portalPreferences.setValue(PortletKeys.JOURNAL, "order-by-col", orderByCol);
+		portalPreferences.setValue(PortletKeys.JOURNAL, "order-by-type", orderByType);
+	}
+}
+
+OrderByComparator orderByComparator = JournalUtil.getArticleOrderByComparator(orderByCol, orderByType);
+
+searchContainer.setOrderByCol(orderByCol);
+searchContainer.setOrderByComparator(orderByComparator);
+searchContainer.setOrderByJS("javascript:" + liferayPortletResponse.getNamespace() + "sortEntries('" + folderId + "', 'orderKey', 'orderByType');");
+searchContainer.setOrderByType(orderByType);
+
+EntriesChecker entriesChecker = new EntriesChecker(liferayPortletRequest, liferayPortletResponse);
+
+entriesChecker.setCssClass("entry-selector");
+
+searchContainer.setRowChecker(entriesChecker);
+
+ArticleDisplayTerms displayTerms = (ArticleDisplayTerms)searchContainer.getDisplayTerms();
+%>
+
+<c:if test="<%= Validator.isNotNull(displayTerms.getStructureId()) %>">
+	<aui:input name="<%= displayTerms.STRUCTURE_ID %>" type="hidden" value="<%= displayTerms.getStructureId() %>" />
+
+	<%
+	if (!displayTerms.getStructureId().equals("0")) {
+		DDMStructure ddmStructure = null;
+
+		try {
+			ddmStructure = DDMStructureLocalServiceUtil.getStructure(themeDisplay.getSiteGroupId(), PortalUtil.getClassNameId(JournalArticle.class), displayTerms.getStructureId(), true);
+
+			ddmStructureName = ddmStructure.getName(locale);
+		}
+		catch (NoSuchStructureException nsse) {
+		}
+	}
+	%>
+
+</c:if>
+
+<c:if test="<%= Validator.isNotNull(displayTerms.getTemplateId()) %>">
+	<aui:input name="<%= displayTerms.TEMPLATE_ID %>" type="hidden" value="<%= displayTerms.getTemplateId() %>" />
+</c:if>
+
+<c:if test="<%= portletName.equals(PortletKeys.JOURNAL) && !((themeDisplay.getScopeGroupId() == themeDisplay.getCompanyGroupId()) && (Validator.isNotNull(displayTerms.getStructureId()) || Validator.isNotNull(displayTerms.getTemplateId()))) %>">
+	<aui:input name="groupId" type="hidden" />
+</c:if>
+
+<%
+ArticleSearchTerms searchTerms = (ArticleSearchTerms)searchContainer.getSearchTerms();
+
+if (folderId != JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID) {
+	List<Long> folderIds = new ArrayList<Long>(1);
+
+	folderIds.add(folderId);
+
+	searchTerms.setFolderIds(folderIds);
+}
+else {
+	searchTerms.setFolderIds(new ArrayList<Long>());
+}
+
+if (Validator.isNotNull(displayTerms.getStructureId())) {
+	searchTerms.setStructureId(displayTerms.getStructureId());
+}
+
+searchTerms.setVersion(-1);
+
+if (displayTerms.isNavigationRecent()) {
+	searchContainer.setOrderByCol("create-date");
+	searchContainer.setOrderByType(orderByType);
+}
+
+boolean advancedSearch = ParamUtil.getBoolean(request, displayTerms.ADVANCED_SEARCH);
+
+String keywords = ParamUtil.getString(request, "keywords");
+
+int status = WorkflowConstants.STATUS_ANY;
+
+List results = null;
+int total = 0;
+%>
+
+<c:choose>
+	<c:when test='<%= displayTerms.getNavigation().equals("mine") || displayTerms.isNavigationRecent() %>'>
+
+		<%
+		long userId = 0;
+
+		if (displayTerms.getNavigation().equals("mine")) {
+			userId = themeDisplay.getUserId();
+		}
+		else if (!permissionChecker.isCompanyAdmin() || !permissionChecker.isGroupAdmin(scopeGroupId)) {
+			status = WorkflowConstants.STATUS_APPROVED;
+		}
+
+		total = JournalArticleServiceUtil.getGroupArticlesCount(scopeGroupId, userId, folderId, status);
+
+		searchContainer.setTotal(total);
+
+		results = JournalArticleServiceUtil.getGroupArticles(scopeGroupId, userId, folderId, status, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+		%>
+
+	</c:when>
+	<c:when test="<%= Validator.isNotNull(displayTerms.getStructureId()) %>">
+
+		<%
+		total = JournalArticleServiceUtil.getArticlesCountByStructureId(displayTerms.getGroupId(), searchTerms.getStructureId());
+
+		searchContainer.setTotal(total);
+
+		results = JournalArticleServiceUtil.getArticlesByStructureId(displayTerms.getGroupId(), displayTerms.getStructureId(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+		%>
+
+	</c:when>
+	<c:when test="<%= Validator.isNotNull(displayTerms.getTemplateId()) %>">
+
+		<%
+		total = JournalArticleServiceUtil.searchCount(company.getCompanyId(), searchTerms.getGroupId(), searchTerms.getFolderIds(), JournalArticleConstants.CLASSNAME_ID_DEFAULT, searchTerms.getKeywords(), searchTerms.getVersionObj(), null, searchTerms.getStructureId(), searchTerms.getTemplateId(), searchTerms.getDisplayDateGT(), searchTerms.getDisplayDateLT(), searchTerms.getStatusCode(), searchTerms.getReviewDate());
+
+		searchContainer.setTotal(total);
+
+		results = JournalArticleServiceUtil.search(company.getCompanyId(), searchTerms.getGroupId(), searchTerms.getFolderIds(), JournalArticleConstants.CLASSNAME_ID_DEFAULT, searchTerms.getKeywords(), searchTerms.getVersionObj(), null, searchTerms.getStructureId(), searchTerms.getTemplateId(), searchTerms.getDisplayDateGT(), searchTerms.getDisplayDateLT(), searchTerms.getStatusCode(), searchTerms.getReviewDate(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+		%>
+
+	</c:when>
+	<c:otherwise>
+
+		<%
+		if (!permissionChecker.isCompanyAdmin() || !permissionChecker.isGroupAdmin(scopeGroupId)) {
+			status = WorkflowConstants.STATUS_APPROVED;
+		}
+
+		total = JournalFolderServiceUtil.getFoldersAndArticlesCount(scopeGroupId, folderId, status);
+
+		searchContainer.setTotal(total);
+
+		results = JournalFolderServiceUtil.getFoldersAndArticles(scopeGroupId, folderId, status, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+		%>
+
+	</c:otherwise>
+</c:choose>
+
+<%
+searchContainer.setResults(results);
+
+request.setAttribute("view.jsp-total", String.valueOf(total));
+
+request.setAttribute("view_entries.jsp-entryStart", String.valueOf(searchContainer.getStart()));
+request.setAttribute("view_entries.jsp-entryEnd", String.valueOf(searchContainer.getEnd()));
+%>
+
+<c:if test="<%= results.isEmpty() %>">
+	<div class="entries-empty alert alert-info">
+		<c:choose>
+			<c:when test="<%= Validator.isNotNull(displayTerms.getStructureId()) %>">
+				<c:if test="<%= total == 0 %>">
+					<liferay-ui:message arguments="<%= HtmlUtil.escape(ddmStructureName) %>" key="there-is-no-web-content-with-structure-x" />
+				</c:if>
+			</c:when>
+			<c:otherwise>
+				<c:if test="<%= total == 0 %>">
+					<liferay-ui:message key="no-web-content-was-found" />
+				</c:if>
+			</c:otherwise>
+		</c:choose>
+	</div>
+</c:if>
+
+<%
+for (int i = 0; i < results.size(); i++) {
+	Object result = results.get(i);
+%>
+
+	<%@ include file="/html/portlet/journal/cast_result.jspf" %>
+
+	<c:choose>
+		<c:when test="<%= curArticle != null %>">
+			<c:choose>
+				<c:when test='<%= !displayStyle.equals("list") %>'>
+
+					<%
+					PortletURL tempRowURL = liferayPortletResponse.createRenderURL();
+
+					tempRowURL.setParameter("struts_action", "/journal/edit_article");
+					tempRowURL.setParameter("redirect", currentURL);
+					tempRowURL.setParameter("groupId", String.valueOf(curArticle.getGroupId()));
+					tempRowURL.setParameter("folderId", String.valueOf(curArticle.getFolderId()));
+					tempRowURL.setParameter("articleId", curArticle.getArticleId());
+
+					request.setAttribute("view_entries.jsp-article", curArticle);
+
+					request.setAttribute("view_entries.jsp-tempRowURL", tempRowURL);
+					%>
+
+					<c:choose>
+						<c:when test='<%= displayStyle.equals("icon") %>'>
+							<liferay-util:include page="/html/portlet/journal/view_article_icon.jsp" />
+						</c:when>
+						<c:otherwise>
+							<liferay-util:include page="/html/portlet/journal/view_article_descriptive.jsp" />
+						</c:otherwise>
+					</c:choose>
+				</c:when>
+				<c:otherwise>
+					<liferay-util:buffer var="articleTitle">
+
+						<%
+						PortletURL rowURL = liferayPortletResponse.createRenderURL();
+
+						rowURL.setParameter("struts_action", "/journal/edit_article");
+						rowURL.setParameter("redirect", currentURL);
+						rowURL.setParameter("groupId", String.valueOf(curArticle.getGroupId()));
+						rowURL.setParameter("folderId", String.valueOf(curArticle.getFolderId()));
+						rowURL.setParameter("articleId", curArticle.getArticleId());
+
+						if (!permissionChecker.isCompanyAdmin() || !permissionChecker.isGroupAdmin(scopeGroupId)) {
+							status = WorkflowConstants.STATUS_APPROVED;
+						}
+
+						rowURL.setParameter("status", String.valueOf(status));
+						%>
+
+						<liferay-ui:icon
+							cssClass="entry-display-style selectable"
+							image="../file_system/small/html"
+							label="<%= true %>"
+							message="<%= curArticle.getTitle(locale) %>"
+							method="get"
+							url="<%= rowURL.toString() %>"
+						/>
+
+						<c:if test="<%= curArticle.getGroupId() != scopeGroupId %>">
+							<small class="group-info">
+								<dl>
+
+									<%
+									Group group = GroupLocalServiceUtil.getGroup(curArticle.getGroupId());
+									%>
+
+									<c:if test="<%= !group.isLayout() || (group.getParentGroupId() != scopeGroupId) %>">
+										<dt>
+											<liferay-ui:message key="site" />:
+										</dt>
+
+										<dd>
+
+											<%
+											String groupDescriptiveName = null;
+
+											if (group.isLayout()) {
+												Group parentGroup = group.getParentGroup();
+
+												groupDescriptiveName = parentGroup.getDescriptiveName(locale);
+											}
+											else {
+												groupDescriptiveName = group.getDescriptiveName(locale);
+											}
+											%>
+
+											<%= HtmlUtil.escape(groupDescriptiveName) %>
+										</dd>
+									</c:if>
+
+									<c:if test="<%= group.isLayout() %>">
+										<dt>
+											<liferay-ui:message key="scope" />:
+										</dt>
+
+										<dd>
+											<%= group.getDescriptiveName(locale) %>
+										</dd>
+									</c:if>
+								</dl>
+							</small>
+						</c:if>
+					</liferay-util:buffer>
+
+					<%
+					List resultRows = searchContainer.getResultRows();
+
+					ResultRow row = new ResultRow(curArticle, curArticle.getArticleId(), i);
+
+					row.setClassName("entry-display-style");
+
+					Map<String, Object> data = new HashMap<String, Object>();
+
+					data.put("draggable", JournalArticlePermission.contains(permissionChecker, curArticle, ActionKeys.DELETE) || JournalArticlePermission.contains(permissionChecker, curArticle, ActionKeys.UPDATE));
+					data.put("title", curArticle.getTitle(locale));
+
+					row.setData(data);
+					%>
+
+					<%@ include file="/html/portlet/journal/article_columns.jspf" %>
+
+					<%
+
+					// Add result row
+
+					resultRows.add(row);
+					%>
+
+				</c:otherwise>
+			</c:choose>
+		</c:when>
+		<c:when test="<%= curFolder != null %>">
+			<c:choose>
+				<c:when test='<%= !displayStyle.equals("list") %>'>
+
+					<%
+					String folderImage = "folder_empty_article";
+
+					if (JournalFolderServiceUtil.getFoldersAndArticlesCount(scopeGroupId, curFolder.getFolderId()) > 0) {
+						folderImage = "folder_full_article";
+					}
+
+					PortletURL tempRowURL = liferayPortletResponse.createRenderURL();
+
+					tempRowURL.setParameter("struts_action", "/journal/view");
+					tempRowURL.setParameter("redirect", currentURL);
+					tempRowURL.setParameter("groupId", String.valueOf(curFolder.getGroupId()));
+					tempRowURL.setParameter("folderId", String.valueOf(curFolder.getFolderId()));
+
+					request.setAttribute("view_entries.jsp-folder", curFolder);
+
+					request.setAttribute("view_entries.jsp-folderImage", folderImage);
+
+					request.setAttribute("view_entries.jsp-tempRowURL", tempRowURL);
+					%>
+
+					<c:choose>
+						<c:when test='<%= displayStyle.equals("icon") %>'>
+							<liferay-util:include page="/html/portlet/journal/view_folder_icon.jsp" />
+						</c:when>
+						<c:otherwise>
+							<liferay-util:include page="/html/portlet/journal/view_folder_descriptive.jsp" />
+						</c:otherwise>
+					</c:choose>
+				</c:when>
+				<c:otherwise>
+					<liferay-util:buffer var="folderTitle">
+
+						<%
+						String folderImage = "folder_empty";
+
+						if (JournalFolderServiceUtil.getFoldersAndArticlesCount(scopeGroupId, curFolder.getFolderId()) > 0) {
+							folderImage = "folder_full_document";
+						}
+
+						Map<String, Object> data = new HashMap<String, Object>();
+
+						data.put("folder", true);
+						data.put("folder-id", curFolder.getFolderId());
+
+						PortletURL rowURL = liferayPortletResponse.createRenderURL();
+
+						rowURL.setParameter("struts_action", "/journal/view");
+						rowURL.setParameter("redirect", currentURL);
+						rowURL.setParameter("groupId", String.valueOf(curFolder.getGroupId()));
+						rowURL.setParameter("folderId", String.valueOf(curFolder.getFolderId()));
+						%>
+
+						<liferay-ui:icon
+							data="<%= data %>"
+							image="<%= folderImage %>"
+							label="<%= true %>"
+							message="<%= curFolder.getName() %>"
+							method="get"
+							url="<%= rowURL.toString() %>"
+						/>
+					</liferay-util:buffer>
+
+					<%
+					List resultRows = searchContainer.getResultRows();
+
+					ResultRow row = new ResultRow(curFolder, curFolder.getPrimaryKey(), i);
+
+					row.setClassName("entry-display-style");
+
+					Map<String, Object> data = new HashMap<String, Object>();
+
+					data.put("draggable", JournalFolderPermission.contains(permissionChecker, curFolder, ActionKeys.DELETE) || JournalFolderPermission.contains(permissionChecker, curFolder, ActionKeys.UPDATE));
+					data.put("folder", true);
+					data.put("folder-id", curFolder.getFolderId());
+					data.put("title", curFolder.getName());
+
+					row.setData(data);
+					%>
+
+					<%@ include file="/html/portlet/journal/folder_columns.jspf" %>
+
+					<%
+
+					// Add result row
+
+					resultRows.add(row);
+					%>
+
+				</c:otherwise>
+			</c:choose>
+		</c:when>
+	</c:choose>
+
+<%
+}
+%>
+
+<c:if test='<%= displayStyle.equals("list") %>'>
+	<liferay-ui:search-iterator paginate="<%= false %>" searchContainer="<%= searchContainer %>" />
+</c:if>
+
+<aui:script>
+	Liferay.fire(
+		'<portlet:namespace />pageLoaded',
+		{
+			pagination: {
+				name: 'entryPagination',
+				state: {
+					page: <%= (total == 0) ? 0 : searchContainer.getCur() %>,
+					rowsPerPage: <%= searchContainer.getDelta() %>,
+					total: <%= total %>
+				}
+			}
+		}
+	);
+</aui:script>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.journal.view_entries_jsp");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_feeds.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_feeds.jsp
new file mode 100644
index 0000000..bac6c91
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_feeds.jsp
@@ -0,0 +1,118 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/journal/view_feeds");
+%>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+
+	<aui:input name="groupId" type="hidden" />
+	<aui:input name="deleteFeedIds" type="hidden" />
+
+	<%
+	FeedSearch searchContainer = new FeedSearch(renderRequest, portletURL);
+
+	List headerNames = searchContainer.getHeaderNames();
+
+	headerNames.add(StringPool.BLANK);
+
+	searchContainer.setRowChecker(new RowChecker(renderResponse));
+	%>
+
+	<liferay-ui:search-form
+		page="/html/portlet/journal/feed_search.jsp"
+		searchContainer="<%= searchContainer %>"
+	/>
+
+	<%
+	FeedSearchTerms searchTerms = (FeedSearchTerms)searchContainer.getSearchTerms();
+	%>
+
+	<%@ include file="/html/portlet/journal/feed_search_results.jspf" %>
+
+	<div class="separator"><!-- --></div>
+
+	<aui:button disabled="<%= true %>" name="delete" onClick='<%= renderResponse.getNamespace() + "deleteFeeds();" %>' value="delete" />
+
+	<%
+	List resultRows = searchContainer.getResultRows();
+
+	for (int i = 0; i < results.size(); i++) {
+		JournalFeed feed = (JournalFeed)results.get(i);
+
+		feed = feed.toEscapedModel();
+
+		ResultRow row = new ResultRow(feed, feed.getFeedId(), i);
+
+		PortletURL rowURL = renderResponse.createRenderURL();
+
+		rowURL.setParameter("struts_action", "/journal/edit_feed");
+		rowURL.setParameter("redirect", currentURL);
+		rowURL.setParameter("groupId", String.valueOf(feed.getGroupId()));
+		rowURL.setParameter("feedId", feed.getFeedId());
+
+		row.setParameter("rowHREF", rowURL.toString());
+
+		// Feed id
+
+		row.addText(feed.getFeedId(), rowURL);
+
+		// Name and description
+
+		if (Validator.isNotNull(feed.getDescription())) {
+			row.addText(feed.getName().concat("<br />").concat(feed.getDescription()), rowURL);
+		}
+		else {
+			row.addText(feed.getName(), rowURL);
+		}
+
+		// Action
+
+		row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/journal/feed_action.jsp");
+
+		// Add result row
+
+		resultRows.add(row);
+	}
+	%>
+
+	<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+</aui:form>
+
+<aui:script>
+	Liferay.Util.toggleSearchContainerButton('#<portlet:namespace />delete', '#<portlet:namespace /><%= searchContainerReference.getId() %>SearchContainer', document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />deleteFeeds',
+		function() {
+			if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-delete-the-selected-feeds") %>')) {
+				document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.DELETE %>";
+				document.<portlet:namespace />fm.<portlet:namespace />groupId.value = "<%= scopeGroupId %>";
+				document.<portlet:namespace />fm.<portlet:namespace />deleteFeedIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+				submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/journal/edit_feed" /><portlet:param name="redirect" value="<%= currentURL %>" /></portlet:actionURL>");
+			}
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_folder_descriptive.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_folder_descriptive.jsp
new file mode 100644
index 0000000..d87c75b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_folder_descriptive.jsp
@@ -0,0 +1,42 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+JournalFolder folder = (JournalFolder)request.getAttribute("view_entries.jsp-folder");
+
+String folderImage = (String)request.getAttribute("view_entries.jsp-folderImage");
+
+PortletURL tempRowURL = (PortletURL)request.getAttribute("view_entries.jsp-tempRowURL");
+%>
+
+<liferay-ui:app-view-entry
+	actionJsp="/html/portlet/journal/folder_action.jsp"
+	author="<%= folder.getUserName() %>"
+	createDate="<%= folder.getCreateDate() %>"
+	description="<%= folder.getDescription() %>"
+	displayStyle="descriptive"
+	folder="<%= true %>"
+	modifiedDate="<%= folder.getModifiedDate() %>"
+	rowCheckerId="<%= String.valueOf(folder.getFolderId()) %>"
+	rowCheckerName="<%= JournalFolder.class.getSimpleName() %>"
+	showCheckbox="<%= JournalFolderPermission.contains(permissionChecker, folder, ActionKeys.DELETE) || JournalFolderPermission.contains(permissionChecker, folder, ActionKeys.UPDATE) %>"
+	thumbnailSrc='<%= themeDisplay.getPathThemeImages() + "/file_system/large/" + folderImage + ".png" %>'
+	thumbnailStyle="max-height: 128px; max-width: 128px;"
+	title="<%= folder.getName() %>"
+	url="<%= tempRowURL.toString() %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_folder_icon.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_folder_icon.jsp
new file mode 100644
index 0000000..c0415e1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_folder_icon.jsp
@@ -0,0 +1,39 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+JournalFolder folder = (JournalFolder)request.getAttribute("view_entries.jsp-folder");
+
+String folderImage = (String)request.getAttribute("view_entries.jsp-folderImage");
+
+PortletURL tempRowURL = (PortletURL)request.getAttribute("view_entries.jsp-tempRowURL");
+%>
+
+<liferay-ui:app-view-entry
+	actionJsp="/html/portlet/journal/folder_action.jsp"
+	description="<%= folder.getDescription() %>"
+	displayStyle="icon"
+	folder="<%= true %>"
+	rowCheckerId="<%= String.valueOf(folder.getFolderId()) %>"
+	rowCheckerName="<%= JournalFolder.class.getSimpleName() %>"
+	showCheckbox="<%= JournalFolderPermission.contains(permissionChecker, folder, ActionKeys.DELETE) || JournalFolderPermission.contains(permissionChecker, folder, ActionKeys.UPDATE) %>"
+	thumbnailSrc='<%= themeDisplay.getPathThemeImages() + "/file_system/large/" + folderImage + ".png" %>'
+	thumbnailStyle="max-height: 128px; max-width: 128px;"
+	title="<%= folder.getName() %>"
+	url="<%= tempRowURL.toString() %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_folders.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_folders.jsp
new file mode 100644
index 0000000..b8d8bd6
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_folders.jsp
@@ -0,0 +1,391 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+JournalFolder folder = (JournalFolder)request.getAttribute("view.jsp-folder");
+
+long folderId = GetterUtil.getLong((String)request.getAttribute("view.jsp-folderId"));
+
+long parentFolderId = JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID;
+
+boolean expandFolder = ParamUtil.getBoolean(request, "expandFolder");
+
+if (folder != null) {
+	parentFolderId = folder.getParentFolderId();
+
+	if (expandFolder) {
+		parentFolderId = folderId;
+	}
+
+	if (parentFolderId != JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID) {
+		try {
+			JournalFolderServiceUtil.getFolder(folderId);
+		}
+		catch (NoSuchFolderException nsfe) {
+			parentFolderId = JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID;
+		}
+	}
+}
+
+String browseBy = ParamUtil.getString(request, "browseBy");
+String structureId = ParamUtil.getString(request, "structureId");
+
+int entryStart = ParamUtil.getInteger(request, "entryStart");
+int entryEnd = ParamUtil.getInteger(request, "entryEnd", SearchContainer.DEFAULT_DELTA);
+
+int folderStart = ParamUtil.getInteger(request, "folderStart");
+int folderEnd = ParamUtil.getInteger(request, "folderEnd", SearchContainer.DEFAULT_DELTA);
+
+int total = 0;
+
+if (browseBy.equals("structure")) {
+	total = DDMStructureLocalServiceUtil.getStructuresCount(PortalUtil.getSiteAndCompanyGroupIds(themeDisplay), PortalUtil.getClassNameId(JournalArticle.class));
+}
+else if ((folderId != JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID) || expandFolder) {
+	total = JournalFolderServiceUtil.getFoldersCount(scopeGroupId, parentFolderId);
+}
+
+PortletURL portletURL = liferayPortletResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/journal/view");
+
+SearchContainer searchContainer = new SearchContainer(liferayPortletRequest, null, null, "cur2", folderEnd / (folderEnd - folderStart), (folderEnd - folderStart), portletURL, null, null);
+
+searchContainer.setTotal(total);
+
+String parentTitle = StringPool.BLANK;
+
+if (browseBy.equals("structure")) {
+	parentTitle = LanguageUtil.get(pageContext, "browse-by-structure");
+}
+else {
+	if ((folderId != JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID) && (parentFolderId > 0)) {
+		JournalFolder grandParentFolder = JournalFolderServiceUtil.getFolder(parentFolderId);
+
+		parentTitle = grandParentFolder.getName();
+	}
+	else if (((folderId != JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID) && (parentFolderId == 0)) || ((folderId == JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID) && (parentFolderId == 0) && expandFolder)) {
+		parentTitle = LanguageUtil.get(pageContext, "home");
+	}
+}
+%>
+
+<div id="<portlet:namespace />listViewContainer">
+	<div id="<portlet:namespace />folderContainer">
+		<aui:nav cssClass="nav-list well">
+			<c:if test="<%= Validator.isNotNull(parentTitle) %>">
+				<li class="nav-header">
+					<%= parentTitle %>
+				</li>
+			</c:if>
+
+			<c:choose>
+				<c:when test='<%= ((folderId == JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID) && !expandFolder) && !browseBy.equals("structure") %>'>
+					<liferay-portlet:renderURL varImpl="viewArticlesHomeURL">
+						<portlet:param name="struts_action" value="/journal/view" />
+						<portlet:param name="folderId" value="<%= String.valueOf(JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID) %>" />
+						<portlet:param name="entryStart" value="0" />
+						<portlet:param name="entryEnd" value="<%= String.valueOf(entryEnd - entryStart) %>" />
+						<portlet:param name="folderStart" value="0" />
+						<portlet:param name="folderEnd" value="<%= String.valueOf(folderEnd - folderStart) %>" />
+					</liferay-portlet:renderURL>
+
+					<%
+					String navigation = ParamUtil.getString(request, "navigation", "home");
+
+					request.setAttribute("view_entries.jsp-folder", folder);
+					request.setAttribute("view_entries.jsp-folderId", String.valueOf(folderId));
+
+					Map<String, Object> dataView = new HashMap<String, Object>();
+
+					dataView.put("folder-id", JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID);
+					dataView.put("navigation", "home");
+					dataView.put("title", LanguageUtil.get(pageContext, "home"));
+					%>
+
+					<liferay-ui:app-view-navigation-entry
+						actionJsp="/html/portlet/journal/folder_action.jsp"
+						dataView="<%= dataView %>"
+						entryTitle='<%= LanguageUtil.get(pageContext, "home") %>'
+						iconImage="icon-home"
+						selected='<%= (navigation.equals("home") && (folderId == JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID)) && Validator.isNull(structureId) %>'
+						viewURL="<%= viewArticlesHomeURL.toString() %>"
+					/>
+
+					<liferay-portlet:renderURL varImpl="viewRecentArticlesURL">
+						<portlet:param name="struts_action" value="/journal/view" />
+						<portlet:param name="navigation" value="recent" />
+						<portlet:param name="folderId" value="<%= String.valueOf(JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID) %>" />
+						<portlet:param name="entryStart" value="0" />
+						<portlet:param name="entryEnd" value="<%= String.valueOf(entryEnd - entryStart) %>" />
+						<portlet:param name="folderStart" value="0" />
+						<portlet:param name="folderEnd" value="<%= String.valueOf(folderEnd - folderStart) %>" />
+					</liferay-portlet:renderURL>
+
+					<%
+					dataView = new HashMap<String, Object>();
+
+					dataView.put("navigation", "recent");
+					%>
+
+					<liferay-ui:app-view-navigation-entry
+						dataView="<%= dataView %>"
+						entryTitle='<%= LanguageUtil.get(pageContext, "recent") %>'
+						iconImage="icon-time"
+						selected='<%= navigation.equals("recent") %>'
+						viewURL="<%= viewRecentArticlesURL.toString() %>"
+					/>
+
+					<c:if test="<%= themeDisplay.isSignedIn() %>">
+						<liferay-portlet:renderURL varImpl="viewMyArticlesURL">
+							<portlet:param name="struts_action" value="/journal/view" />
+							<portlet:param name="navigation" value="mine" />
+							<portlet:param name="folderId" value="<%= String.valueOf(JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID) %>" />
+							<portlet:param name="entryStart" value="0" />
+							<portlet:param name="entryEnd" value="<%= String.valueOf(entryEnd - entryStart) %>" />
+							<portlet:param name="folderStart" value="0" />
+							<portlet:param name="folderEnd" value="<%= String.valueOf(folderEnd - folderStart) %>" />
+						</liferay-portlet:renderURL>
+
+						<%
+						dataView = new HashMap<String, Object>();
+
+						dataView.put("navigation", "mine");
+						%>
+
+						<liferay-ui:app-view-navigation-entry
+							dataView="<%= dataView %>"
+							entryTitle='<%= LanguageUtil.get(pageContext, "mine") %>'
+							iconImage="icon-user"
+							selected='<%= navigation.equals("mine") %>'
+							viewURL="<%= viewMyArticlesURL.toString() %>"
+						/>
+					</c:if>
+
+					<c:if test="<%= DDMStructureLocalServiceUtil.getStructuresCount(PortalUtil.getSiteAndCompanyGroupIds(themeDisplay), PortalUtil.getClassNameId(JournalArticle.class)) > 0 %>">
+						<liferay-portlet:renderURL varImpl="filterDDMStructureArticlesURL">
+							<portlet:param name="struts_action" value="/journal/view" />
+							<portlet:param name="folderId" value="<%= String.valueOf(JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID) %>" />
+							<portlet:param name="browseBy" value="structure" />
+							<portlet:param name="entryStart" value="0" />
+							<portlet:param name="entryEnd" value="<%= String.valueOf(entryEnd - entryStart) %>" />
+							<portlet:param name="folderStart" value="0" />
+							<portlet:param name="folderEnd" value="<%= String.valueOf(folderEnd - folderStart) %>" />
+						</liferay-portlet:renderURL>
+
+						<%
+						dataView = new HashMap<String, Object>();
+
+						dataView.put("browse-by", "structure");
+						dataView.put("view-entries", Boolean.FALSE);
+						dataView.put("view-folders", Boolean.TRUE);
+						%>
+
+						<liferay-ui:app-view-navigation-entry
+							cssClass="folder structure"
+							dataView="<%= dataView %>"
+							entryTitle='<%= LanguageUtil.get(pageContext, "browse-by-structure") %>'
+							iconImage="icon-tasks"
+							selected='<%= browseBy.equals("structure") %>'
+							viewURL="<%= filterDDMStructureArticlesURL.toString() %>"
+						/>
+					</c:if>
+				</c:when>
+				<c:when test='<%= browseBy.equals("structure") %>'>
+					<liferay-portlet:renderURL varImpl="viewURL">
+						<portlet:param name="struts_action" value="/journal/view" />
+						<portlet:param name="structureId" value="<%= String.valueOf(0) %>" />
+						<portlet:param name="entryStart" value="0" />
+						<portlet:param name="entryEnd" value="<%= String.valueOf(entryEnd - entryStart) %>" />
+						<portlet:param name="folderStart" value="0" />
+						<portlet:param name="folderEnd" value="<%= String.valueOf(folderEnd - folderStart) %>" />
+					</liferay-portlet:renderURL>
+
+					<%
+					Map<String, Object> dataView = new HashMap<String, Object>();
+
+					dataView.put("folder-id", parentFolderId);
+					dataView.put("view-folders", Boolean.TRUE);
+					%>
+
+					<liferay-ui:app-view-navigation-entry
+						dataView="<%= dataView %>"
+						entryTitle='<%= LanguageUtil.get(pageContext, "up") %>'
+						iconImage="icon-level-up"
+						viewURL="<%= viewURL.toString() %>"
+					/>
+
+					<c:if test="<%= total > 0 %>">
+						<c:if test="<%= searchContainer.getStart() == 0 %>">
+							<liferay-portlet:renderURL varImpl="viewBasicDDMStructureArticlesURL">
+								<portlet:param name="struts_action" value="/journal/view" />
+								<portlet:param name="folderId" value="<%= String.valueOf(JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID) %>" />
+								<portlet:param name="browseBy" value="structure" />
+								<portlet:param name="structureId" value="0" />
+								<portlet:param name="entryStart" value="0" />
+								<portlet:param name="entryEnd" value="<%= String.valueOf(entryEnd - entryStart) %>" />
+								<portlet:param name="folderStart" value="0" />
+								<portlet:param name="folderEnd" value="<%= String.valueOf(folderEnd - folderStart) %>" />
+							</liferay-portlet:renderURL>
+
+							<%
+							dataView = new HashMap<String, Object>();
+
+							dataView.put("browse-by", "structure");
+							dataView.put("structure-id", 0);
+							%>
+
+							<liferay-ui:app-view-navigation-entry
+								cssClass="folder structure"
+								dataView="<%= dataView %>"
+								entryTitle='<%= LanguageUtil.get(pageContext, "basic-web-content") %>'
+								iconImage="icon-tasks"
+								selected='<%= structureId.equals("0") %>'
+								viewURL="<%= viewBasicDDMStructureArticlesURL.toString() %>"
+							/>
+						</c:if>
+
+						<%
+						List<DDMStructure> ddmStructures = DDMStructureLocalServiceUtil.getStructures(PortalUtil.getSiteAndCompanyGroupIds(themeDisplay), PortalUtil.getClassNameId(JournalArticle.class), searchContainer.getStart(), searchContainer.getEnd());
+
+						for (DDMStructure ddmStructure : ddmStructures) {
+						%>
+
+							<liferay-portlet:renderURL varImpl="viewDDMStructureArticlesURL">
+								<portlet:param name="struts_action" value="/journal/view" />
+								<portlet:param name="folderId" value="<%= String.valueOf(JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID) %>" />
+								<portlet:param name="browseBy" value="structure" />
+								<portlet:param name="structureId" value="<%= ddmStructure.getStructureKey() %>" />
+								<portlet:param name="entryStart" value="0" />
+								<portlet:param name="entryEnd" value="<%= String.valueOf(entryEnd - entryStart) %>" />
+								<portlet:param name="folderStart" value="0" />
+								<portlet:param name="folderEnd" value="<%= String.valueOf(folderEnd - folderStart) %>" />
+							</liferay-portlet:renderURL>
+
+							<%
+							dataView = new HashMap<String, Object>();
+
+							dataView.put("browse-by", "structure");
+							dataView.put("structure-id", ddmStructure.getStructureKey());
+							%>
+
+							<liferay-ui:app-view-navigation-entry
+								cssClass="folder structure"
+								dataView="<%= dataView %>"
+								entryTitle="<%= HtmlUtil.escape(ddmStructure.getName(locale)) %>"
+								iconImage="icon-tasks"
+								selected="<%= structureId.equals(ddmStructure.getStructureKey()) %>"
+								viewURL="<%= viewDDMStructureArticlesURL.toString() %>"
+							/>
+
+						<%
+						}
+						%>
+
+					</c:if>
+				</c:when>
+				<c:otherwise>
+					<liferay-portlet:renderURL varImpl="viewURL">
+						<portlet:param name="struts_action" value="/journal/view" />
+						<portlet:param name="folderId" value="<%= String.valueOf(parentFolderId) %>" />
+						<portlet:param name="entryStart" value="0" />
+						<portlet:param name="entryEnd" value="<%= String.valueOf(entryEnd - entryStart) %>" />
+						<portlet:param name="folderStart" value="0" />
+						<portlet:param name="folderEnd" value="<%= String.valueOf(folderEnd - folderStart) %>" />
+					</liferay-portlet:renderURL>
+
+					<%
+					Map<String, Object> dataView = new HashMap<String, Object>();
+
+					dataView.put("folder-id", parentFolderId);
+					dataView.put("view-folders", Boolean.TRUE);
+					%>
+
+					<liferay-ui:app-view-navigation-entry
+						dataView="<%= dataView %>"
+						entryTitle='<%= LanguageUtil.get(pageContext, "up") %>'
+						iconImage="icon-level-up"
+						viewURL="<%= viewURL.toString() %>"
+					/>
+
+					<%
+					List<JournalFolder> folders = JournalFolderServiceUtil.getFolders(scopeGroupId, parentFolderId, searchContainer.getStart(), searchContainer.getEnd());
+
+					for (JournalFolder curFolder : folders) {
+						request.setAttribute("view_entries.jsp-folder", curFolder);
+						request.setAttribute("view_entries.jsp-folderId", String.valueOf(curFolder.getFolderId()));
+						request.setAttribute("view_entries.jsp-folderSelected", String.valueOf(folderId == curFolder.getFolderId()));
+					%>
+
+						<liferay-portlet:renderURL varImpl="viewURL">
+							<portlet:param name="struts_action" value="/journal/view" />
+							<portlet:param name="folderId" value="<%= String.valueOf(curFolder.getFolderId()) %>" />
+							<portlet:param name="entryStart" value="0" />
+							<portlet:param name="entryEnd" value="<%= String.valueOf(entryEnd - entryStart) %>" />
+							<portlet:param name="folderStart" value="0" />
+							<portlet:param name="folderEnd" value="<%= String.valueOf(folderEnd - folderStart) %>" />
+						</liferay-portlet:renderURL>
+
+						<%
+						dataView = new HashMap<String, Object>();
+
+						dataView.put("folder-id", curFolder.getFolderId());
+						dataView.put("title", curFolder.getName());
+						%>
+
+						<liferay-ui:app-view-navigation-entry
+							actionJsp="/html/portlet/journal/folder_action.jsp"
+							dataView="<%= dataView %>"
+							entryTitle="<%= curFolder.getName() %>"
+							iconImage='<%= (JournalFolderServiceUtil.getFoldersAndArticlesCount(scopeGroupId, curFolder.getFolderId()) > 0) ? "icon-folder-open" : "icon-folder-close" %>'
+							selected="<%= (curFolder.getFolderId() == folderId) %>"
+							viewURL="<%= viewURL.toString() %>"
+						/>
+
+					<%
+					}
+					%>
+
+				</c:otherwise>
+			</c:choose>
+		</aui:nav>
+	</div>
+</div>
+
+<%
+request.setAttribute("view_folders.jsp-total", String.valueOf(total));
+
+request.setAttribute("view_folders.jsp-folderEnd", searchContainer.getEnd());
+request.setAttribute("view_folders.jsp-folderStart", searchContainer.getStart());
+%>
+
+<aui:script>
+	Liferay.fire(
+		'<portlet:namespace />pageLoaded',
+		{
+			pagination: {
+				name: 'folderPagination',
+				state: {
+					page: <%= (total == 0) ? 0 : searchContainer.getCur() %>,
+					rowsPerPage: <%= searchContainer.getDelta() %>,
+					total: <%= total %>
+				}
+			}
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_recent.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_recent.jsp
new file mode 100644
index 0000000..845d36c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_recent.jsp
@@ -0,0 +1,143 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%= LanguageUtil.format(pageContext, "this-page-displays-the-last-x-web-content,-structures,-and-templates-that-you-accessed", String.valueOf(JournalUtil.MAX_STACK_SIZE), false) %>
+
+<table class="lfr-table" width="100%">
+<tr>
+	<td class="lfr-top" width="33%">
+		<table class="table table-bordered table-hover table-striped">
+			<thead class="table-columns">
+			<tr>
+				<td class="table-cell" colspan="2">
+					<%= LanguageUtil.format(pageContext, "last-x-web-content", String.valueOf(JournalUtil.MAX_STACK_SIZE), false) %>
+				</td>
+			</tr>
+			</thead>
+
+			<tbody class="table-data">
+
+				<%
+				Stack recentArticles = JournalUtil.getRecentArticles(renderRequest);
+
+				int recentArticlesSize = recentArticles.size();
+
+				for (int i = recentArticlesSize - 1; i >= 0; i--) {
+					JournalArticle article = (JournalArticle)recentArticles.get(i);
+
+					article = article.toEscapedModel();
+				%>
+
+					<portlet:renderURL var="editArticleURL">
+						<portlet:param name="struts_action" value="/journal/edit_article" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+						<portlet:param name="groupId" value="<%= String.valueOf(article.getGroupId()) %>" />
+						<portlet:param name="articleId" value="<%= article.getArticleId() %>" />
+						<portlet:param name="version" value="<%= String.valueOf(article.getVersion()) %>" />
+					</portlet:renderURL>
+
+				<tr>
+					<td class="table-cell">
+						<aui:a href="<%= editArticleURL %>"><%= article.getArticleId() %></aui:a>
+					</td>
+					<td class="table-cell">
+						<aui:a href="<%= editArticleURL %>"><%= article.getTitle(locale) %></aui:a>
+					</td>
+				</tr>
+
+			<%
+			}
+			%>
+
+			</tbody>
+		</table>
+	</td>
+	<td width="33%">
+		<table class="table table-bordered table-hover table-striped">
+			<thead class="table-columns">
+				<tr>
+					<td class="table-cell" colspan="2">
+						<%= LanguageUtil.format(pageContext, "last-x-structures", String.valueOf(JournalUtil.MAX_STACK_SIZE), false) %>
+					</td>
+				</tr>
+			</thead>
+
+			<tbody class="table-data">
+
+			<%
+			Stack recentDDMStructures = JournalUtil.getRecentDDMStructures(renderRequest);
+
+			int recentDDMStructuresSize = recentDDMStructures.size();
+
+			for (int i = recentDDMStructuresSize - 1; i >= 0; i--) {
+				DDMStructure ddmStructure = (DDMStructure)recentDDMStructures.get(i);
+
+				ddmStructure = ddmStructure.toEscapedModel();
+			%>
+
+				<tr>
+					<td class="table-cell">
+						<%= ddmStructure.getName(locale) %>
+					</td>
+				</tr>
+
+			<%
+			}
+			%>
+
+		</tbody>
+		</table>
+	</td>
+	<td width="33%">
+		<table class="table table-bordered table-hover table-striped">
+			<thead class="table-columns">
+				<tr>
+					<td class="table-cell" colspan="2">
+						<%= LanguageUtil.format(pageContext, "last-x-templates", String.valueOf(JournalUtil.MAX_STACK_SIZE), false) %>
+					</td>
+				</tr>
+			</thead>
+
+			<tbody class="table-data">
+
+			<%
+			Stack recentDDMTemplates = JournalUtil.getRecentDDMTemplates(renderRequest);
+
+			int recentDDMTemplatesSize = recentDDMTemplates.size();
+
+			for (int i = recentDDMTemplatesSize - 1; i >= 0; i--) {
+				DDMTemplate ddmTemplate = (DDMTemplate)recentDDMTemplates.get(i);
+
+				ddmTemplate = ddmTemplate.toEscapedModel();
+			%>
+
+				<tr>
+					<td class="table-cell">
+						<%= ddmTemplate.getName(locale) %>
+					</td>
+				</tr>
+
+			<%
+			}
+			%>
+
+		</tbody>
+		</table>
+	</td>
+</tr>
+</table>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_resources.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_resources.jsp
new file mode 100644
index 0000000..99c28c2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal/view_resources.jsp
@@ -0,0 +1,93 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal/init.jsp" %>
+
+<%
+String navigation = ParamUtil.getString(request, "navigation", "home");
+
+JournalFolder folder = (JournalFolder)request.getAttribute(WebKeys.JOURNAL_FOLDER);
+
+long folderId = ParamUtil.getLong(request, "folderId", JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID);
+
+if ((folder == null) && (folderId != JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID)) {
+	try {
+		folder = JournalFolderLocalServiceUtil.getFolder(folderId);
+	}
+	catch (NoSuchFolderException nsfe) {
+		folderId = JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID;
+	}
+}
+
+String browseBy = ParamUtil.getString(request, "browseBy");
+boolean viewEntries = ParamUtil.getBoolean(request, "viewEntries");
+boolean viewEntriesPage = ParamUtil.getBoolean(request, "viewEntriesPage");
+boolean viewFolders = ParamUtil.getBoolean(request, "viewFolders");
+
+request.setAttribute("view.jsp-folder", folder);
+
+request.setAttribute("view.jsp-folderId", String.valueOf(folderId));
+%>
+
+<div>
+	<c:if test="<%= viewEntries %>">
+
+		<%
+		PortalUtil.addPortletBreadcrumbEntry(request, themeDisplay.getScopeGroup().getDescriptiveName(), null);
+		PortalUtil.addPortletBreadcrumbEntry(request, "Web Content", liferayPortletResponse.createRenderURL().toString());
+		%>
+
+		<div id="<portlet:namespace />entries">
+			<liferay-util:include page="/html/portlet/journal/view_entries.jsp" />
+		</div>
+
+		<span id="<portlet:namespace />addButton">
+			<liferay-util:include page="/html/portlet/journal/add_button.jsp" />
+		</span>
+
+		<span id="<portlet:namespace />displayStyleButtons">
+			<liferay-util:include page="/html/portlet/journal/display_style_buttons.jsp" />
+		</span>
+
+		<span id="<portlet:namespace />sortButton">
+			<liferay-util:include page="/html/portlet/journal/sort_button.jsp" />
+		</span>
+
+		<span id="<portlet:namespace />breadcrumb">
+			<div class="portlet-breadcrumb">
+				<c:if test='<%= !navigation.equals("recent") && !navigation.equals("mine") && Validator.isNull(browseBy) %>'>
+					<liferay-util:include page="/html/portlet/journal/breadcrumb.jsp" />
+				</c:if>
+			</div>
+		</span>
+	</c:if>
+
+	<c:if test="<%= viewEntriesPage %>">
+		<div id="<portlet:namespace />entries">
+			<liferay-util:include page="/html/portlet/journal/view_entries.jsp" />
+		</div>
+
+		<span id="<portlet:namespace />sortButton">
+			<liferay-util:include page="/html/portlet/journal/sort_button.jsp" />
+		</span>
+	</c:if>
+
+	<c:if test="<%= viewFolders %>">
+		<div id="<portlet:namespace />folders">
+			<liferay-util:include page="/html/portlet/journal/view_folders.jsp" />
+		</div>
+	</c:if>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_articles/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_articles/configuration.jsp
new file mode 100644
index 0000000..800248a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_articles/configuration.jsp
@@ -0,0 +1,191 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal_articles/init.jsp" %>
+
+<%
+int cur = ParamUtil.getInteger(request, SearchContainer.DEFAULT_CUR_PARAM);
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+groupId = ParamUtil.getLong(request, "groupId", groupId);
+%>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationActionURL" />
+<liferay-portlet:renderURL portletConfiguration="true" var="configurationRenderURL" />
+
+<aui:form action="<%= configurationActionURL %>" method="post" name="fm1">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value='<%= configurationRenderURL + StringPool.AMPERSAND + renderResponse.getNamespace() + "cur=" + cur %>' />
+	<aui:input name="preferences--ddmStructureKey--" type="hidden" value="<%= ddmStructureKey %>" />
+
+	<liferay-ui:panel-container extended="<%= true %>" id="journalArticlesSettingsPanelContainer" persistState="<%= true %>">
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="journalArticlesFilterPanel" persistState="<%= true %>" title="filter">
+			<aui:fieldset>
+				<aui:select label="site" name="preferences--groupId--">
+					<aui:option label="global" selected="<%= groupId == themeDisplay.getCompanyGroupId() %>" value="<%= themeDisplay.getCompanyGroupId() %>" />
+
+					<%
+					List<Group> mySiteGroups = user.getMySiteGroups();
+
+					for (int i = 0; i < mySiteGroups.size(); i++) {
+						Group group = mySiteGroups.get(i);
+
+						String groupDescriptiveName = HtmlUtil.escape(group.getDescriptiveName(locale));
+
+						if (group.isUser()) {
+							groupDescriptiveName = LanguageUtil.get(pageContext, "my-site");
+						}
+					%>
+
+						<aui:option label="<%= groupDescriptiveName %>" selected="<%= groupId == group.getGroupId() %>" value="<%= group.getGroupId() %>" />
+
+					<%
+					}
+					%>
+
+				</aui:select>
+
+				<aui:select label="web-content-type" name="preferences--type--">
+					<aui:option value="" />
+
+					<%
+					for (int i = 0; i < JournalArticleConstants.TYPES.length; i++) {
+					%>
+
+						<aui:option label="<%= JournalArticleConstants.TYPES[i] %>" selected="<%= type.equals(JournalArticleConstants.TYPES[i]) %>" />
+
+					<%
+					}
+					%>
+
+				</aui:select>
+
+				<aui:field-wrapper label="structure">
+
+					<%
+					String ddmStructureName = StringPool.BLANK;
+					String ddmStructureDescription = StringPool.BLANK;
+
+					if (ddmStructure != null) {
+						ddmStructureName = HtmlUtil.escape(ddmStructure.getName(locale));
+						ddmStructureDescription = HtmlUtil.escape(ddmStructure.getDescription(locale));
+					}
+					else {
+						ddmStructureName = LanguageUtil.get(pageContext, "any");
+					}
+
+					if (Validator.isNotNull(ddmStructureDescription)) {
+						ddmStructureName = ddmStructureName + " (" + ddmStructureDescription+ ")";
+					}
+					%>
+
+					<div class="input-append">
+						<liferay-ui:input-resource id="structure" url="<%= ddmStructureName %>" />
+
+						<aui:button onClick='<%= renderResponse.getNamespace() + "openStructureSelector();" %>' value="select" />
+
+						<aui:button name="removeStructureButton" onClick='<%= renderResponse.getNamespace() + "removeStructure();" %>' value="remove" />
+					</div>
+				</aui:field-wrapper>
+			</aui:fieldset>
+		</liferay-ui:panel>
+
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="journalArticlesDisplaySettings" persistState="<%= true %>" title="display-settings">
+			<aui:fieldset>
+				<aui:select label="display-url" name="preferences--pageUrl--">
+					<aui:option label="maximized" selected='<%= pageUrl.equals("maximized") %>' />
+					<aui:option label="normal" selected='<%= pageUrl.equals("normal") %>' />
+					<aui:option label="pop-up" selected='<%= pageUrl.equals("popUp") %>' value="popUp" />
+					<aui:option label="view-in-context" selected='<%= pageUrl.equals("viewInContext") %>' value="viewInContext" />
+				</aui:select>
+
+				<aui:select label="display-per-page" name="preferences--pageDelta--">
+
+					<%
+					for (int pageDeltaValue : PropsValues.JOURNAL_ARTICLES_PAGE_DELTA_VALUES) {
+					%>
+
+						<aui:option label="<%= pageDeltaValue %>" selected="<%= pageDelta == pageDeltaValue %>" />
+
+					<%
+					}
+					%>
+
+				</aui:select>
+
+				<aui:field-wrapper label="order-by-column">
+					<aui:select inlineField="<%= true %>" label="" name="preferences--orderByCol--">
+						<aui:option label="display-date" selected='<%= orderByCol.equals("display-date") %>' />
+						<aui:option label="create-date" selected='<%= orderByCol.equals("create-date") %>' />
+						<aui:option label="modified-date" selected='<%= orderByCol.equals("modified-date") %>' />
+						<aui:option label="title" selected='<%= orderByCol.equals("title") %>' />
+						<aui:option label="id" selected='<%= orderByCol.equals("id") %>' />
+					</aui:select>
+
+					<aui:select label="" name="preferences--orderByType--">
+						<aui:option label="ascending" selected='<%= orderByType.equals("asc") %>' value="asc" />
+						<aui:option label="descending" selected='<%= orderByType.equals("desc") %>' value="desc" />
+					</aui:select>
+				</aui:field-wrapper>
+			</aui:fieldset>
+		</liferay-ui:panel>
+	</liferay-ui:panel-container>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />openStructureSelector() {
+		Liferay.Util.openDDMPortlet(
+			{
+				basePortletURL: '<%= PortletURLFactoryUtil.create(request, PortletKeys.DYNAMIC_DATA_MAPPING, themeDisplay.getPlid(), PortletRequest.RENDER_PHASE) %>',
+				classPK: <%= (ddmStructure != null) ? ddmStructure.getPrimaryKey() : 0 %>,
+				dialog: {
+					destroyOnHide: true
+				},
+				eventName: '<portlet:namespace />selectStructure',
+				groupId: <%= groupId %>,
+				refererPortletName: '<%= PortletKeys.JOURNAL %>',
+				showGlobalScope: true,
+				struts_action: '/dynamic_data_mapping/select_structure',
+				title: '<%= UnicodeLanguageUtil.get(pageContext, "structures") %>'
+			},
+			function(event) {
+				var A = AUI();
+
+				document.<portlet:namespace />fm1.<portlet:namespace />ddmStructureKey.value = event.ddmstructurekey;
+
+				A.one('#<portlet:namespace />structure').val(event.name + ' (' + event.ddmstructureid + ')');
+			}
+		);
+	}
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />removeStructure',
+		function() {
+			var A = AUI();
+
+			document.<portlet:namespace />fm1.<portlet:namespace />ddmStructureKey.value = "";
+
+			A.one('#<portlet:namespace />structure').val('<%= UnicodeLanguageUtil.get(pageContext, "any") %>');
+		},
+		['aui-base']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_articles/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_articles/css/.sass-cache/main.css
new file mode 100644
index 0000000..31c0a11
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_articles/css/.sass-cache/main.css
@@ -0,0 +1,9 @@
+.portlet-journal-articles .journal-content-article:after {
+  clear: both;
+  content: "";
+  display: block;
+  height: 0; }
+
+.ie .portlet-journal-articles .journal-content-article {
+  zoom: 1; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_articles/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_articles/css/main.css
new file mode 100644
index 0000000..e3e8669
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_articles/css/main.css
@@ -0,0 +1,10 @@
+.portlet-journal-articles .journal-content-article:after {
+	clear: both;
+	content: "";
+	display: block;
+	height: 0;
+}
+
+.ie .portlet-journal-articles .journal-content-article {
+	zoom: 1;
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_articles/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_articles/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_articles/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_articles/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_articles/init.jsp
new file mode 100644
index 0000000..14ae37e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_articles/init.jsp
@@ -0,0 +1,42 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.journal.NoSuchArticleException" %><%@
+page import="com.liferay.portlet.journal.util.JournalUtil" %>
+
+<%
+long groupId = GetterUtil.getLong(portletPreferences.getValue("groupId", String.valueOf(themeDisplay.getScopeGroupId())));
+String ddmStructureKey = portletPreferences.getValue("ddmStructureKey", StringPool.BLANK);
+String type = portletPreferences.getValue("type", StringPool.BLANK);
+String pageUrl = portletPreferences.getValue("pageUrl", "maximized");
+int pageDelta = GetterUtil.getInteger(portletPreferences.getValue("pageDelta", StringPool.BLANK));
+String orderByCol = portletPreferences.getValue("orderByCol", StringPool.BLANK);
+String orderByType = portletPreferences.getValue("orderByType", StringPool.BLANK);
+
+OrderByComparator orderByComparator = JournalUtil.getArticleOrderByComparator(orderByCol, orderByType);
+
+DDMStructure ddmStructure = null;
+
+if (Validator.isNotNull(ddmStructureKey)) {
+	ddmStructure = DDMStructureLocalServiceUtil.fetchStructure(groupId, PortalUtil.getClassNameId(JournalArticle.class), ddmStructureKey);
+}
+
+Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(locale, timeZone);
+%>
+
+<%@ include file="/html/portlet/journal_articles/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_articles/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_articles/view.jsp
new file mode 100644
index 0000000..7c1a215
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_articles/view.jsp
@@ -0,0 +1,296 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal_articles/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+String articleId = ParamUtil.getString(request, "articleId");
+double version = ParamUtil.getDouble(request, "version");
+%>
+
+<c:choose>
+	<c:when test="<%= Validator.isNull(articleId) %>">
+
+		<%
+		if (Validator.isNull(type)) {
+			type = null;
+		}
+
+		String status = "approved";
+
+		PortletURL portletURL = renderResponse.createRenderURL();
+
+		portletURL.setParameter("struts_action", "/journal_articles/view");
+
+		if (pageUrl.equals("normal")) {
+			portletURL.setWindowState(WindowState.NORMAL);
+		}
+		else {
+			portletURL.setWindowState(WindowState.MAXIMIZED);
+		}
+
+		PortletURL articleURL = PortletURLUtil.clone(portletURL, renderResponse);
+
+		ArticleSearch searchContainer = new ArticleSearch(renderRequest, portletURL);
+
+		searchContainer.setDelta(pageDelta);
+		searchContainer.setDeltaConfigurable(false);
+		searchContainer.setOrderByCol(orderByCol);
+		searchContainer.setOrderByType(orderByType);
+		searchContainer.setOrderByComparator(orderByComparator);
+
+		List headerNames = searchContainer.getHeaderNames();
+
+		headerNames.clear();
+
+		headerNames.add("title");
+		headerNames.add("display-date");
+		headerNames.add("author");
+
+		searchContainer.setOrderableHeaders(null);
+
+		ArticleSearchTerms searchTerms = (ArticleSearchTerms)searchContainer.getSearchTerms();
+
+		searchTerms.setGroupId(groupId);
+		searchTerms.setType(type);
+
+		if (ddmStructure != null) {
+			searchTerms.setStructureId(ddmStructure.getStructureKey());
+		}
+
+		searchTerms.setDisplayDateLT(new Date());
+		searchTerms.setStatus(status);
+		searchTerms.setVersion(version);
+		searchTerms.setAdvancedSearch(true);
+
+		List<JournalArticle> results = null;
+		int total = 0;
+		%>
+
+		<c:choose>
+			<c:when test="<%= PropsValues.JOURNAL_ARTICLES_SEARCH_WITH_INDEX %>">
+				<%@ include file="/html/portlet/journal/article_search_results_index.jspf" %>
+			</c:when>
+			<c:otherwise>
+				<%@ include file="/html/portlet/journal/article_search_results_database.jspf" %>
+			</c:otherwise>
+		</c:choose>
+
+		<%
+		List resultRows = searchContainer.getResultRows();
+
+		for (int i = 0; i < results.size(); i++) {
+			JournalArticle article = results.get(i);
+
+			article = article.toEscapedModel();
+
+			ResultRow row = new ResultRow(article, article.getArticleId() + EditArticleAction.VERSION_SEPARATOR + article.getVersion(), i);
+
+			String rowHREF = null;
+
+			if (pageUrl.equals("popUp")) {
+				StringBundler sb = new StringBundler(7);
+
+				sb.append(themeDisplay.getPathMain());
+				sb.append("/journal_articles/view_article_content?groupId=");
+				sb.append(article.getGroupId());
+				sb.append("&articleId=");
+				sb.append(article.getArticleId());
+				sb.append("&version=");
+				sb.append(article.getVersion());
+
+				rowHREF = sb.toString();
+			}
+			else {
+				articleURL.setParameter("returnToFullPageURL", currentURL);
+				articleURL.setParameter("groupId", String.valueOf(article.getGroupId()));
+				articleURL.setParameter("articleId", article.getArticleId());
+				articleURL.setParameter("version", String.valueOf(article.getVersion()));
+
+				if (pageUrl.equals("viewInContext")) {
+					AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(JournalArticle.class.getName());
+
+					AssetRenderer assetRenderer = assetRendererFactory.getAssetRenderer(article.getId());
+
+					String viewFullContentURLString = articleURL.toString();
+
+					viewFullContentURLString = HttpUtil.setParameter(viewFullContentURLString, "redirect", currentURL);
+
+					rowHREF = assetRenderer.getURLViewInContext(liferayPortletRequest, liferayPortletResponse, viewFullContentURLString);
+
+					rowHREF = HttpUtil.setParameter(rowHREF, "redirect", currentURL);
+
+					if (Validator.isNull(rowHREF)) {
+						rowHREF = articleURL.toString();
+					}
+				}
+				else {
+					rowHREF = articleURL.toString();
+				}
+			}
+
+			String target = null;
+
+			if (pageUrl.equals("popUp")) {
+				target = "_blank";
+			}
+
+			TextSearchEntry rowTextEntry = new TextSearchEntry();
+
+			rowTextEntry.setHref(rowHREF);
+			rowTextEntry.setName(article.getArticleId());
+			rowTextEntry.setTarget(target);
+
+			/*// Article id
+
+			row.addText(rowTextEntry);
+
+			// Version
+
+			rowTextEntry = (TextSearchEntry)rowTextEntry.clone();
+
+			rowTextEntry.setName(String.valueOf(article.getVersion()));
+
+			row.addText(rowTextEntry);*/
+
+			// Title
+
+			rowTextEntry = (TextSearchEntry)rowTextEntry.clone();
+
+			rowTextEntry.setName(article.getTitle(locale));
+
+			row.addText(rowTextEntry);
+
+			// Display date
+
+			rowTextEntry = (TextSearchEntry)rowTextEntry.clone();
+
+			rowTextEntry.setName(dateFormatDateTime.format(article.getDisplayDate()));
+
+			row.addText(rowTextEntry);
+
+			// Author
+
+			rowTextEntry = (TextSearchEntry)rowTextEntry.clone();
+
+			rowTextEntry.setName(PortalUtil.getUserName(article));
+
+			row.addText(rowTextEntry);
+
+			// Add result row
+
+			resultRows.add(row);
+		}
+		%>
+
+		<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+	</c:when>
+	<c:otherwise>
+
+		<%
+		String languageId = LanguageUtil.getLanguageId(request);
+		int articlePage = ParamUtil.getInteger(renderRequest, "page", 1);
+		String xmlRequest = PortletRequestUtil.toXML(renderRequest, renderResponse);
+
+		JournalArticleDisplay articleDisplay = JournalContentUtil.getDisplay(groupId, articleId, null, null, languageId, themeDisplay, articlePage, xmlRequest);
+
+		JournalArticle article = null;
+
+		try {
+			article = JournalArticleLocalServiceUtil.getArticle(groupId, articleId, version);
+
+			boolean expired = article.isExpired();
+
+			if (!expired) {
+				Date expirationDate = article.getExpirationDate();
+
+				if ((expirationDate != null) && expirationDate.before(new Date())) {
+					expired = true;
+				}
+			}
+			%>
+
+			<c:choose>
+				<c:when test="<%= (articleDisplay != null) && !expired %>">
+					<c:if test='<%= pageUrl.equals("normal") %>'>
+						<portlet:renderURL var="backURL">
+							<portlet:param name="struts_action" value="/journal_articles/view" />
+							<portlet:param name="redirect" value="<%= redirect %>" />
+						</portlet:renderURL>
+
+						<liferay-ui:header
+							backURL="<%= backURL %>"
+							localizeTitle="<%= false %>"
+							title="<%= article.getTitle(locale) %>"
+						/>
+					</c:if>
+
+					<%
+					AssetEntryServiceUtil.incrementViewCounter(JournalArticle.class.getName(), articleDisplay.getResourcePrimKey());
+					%>
+
+					<div class="journal-content-article">
+						<%= RuntimePageUtil.processXML(request, response, articleDisplay.getContent()) %>
+					</div>
+
+					<c:if test="<%= articleDisplay.isPaginate() %>">
+
+						<%
+						PortletURL portletURL = renderResponse.createRenderURL();
+
+						portletURL.setParameter("articleId", articleId);
+						portletURL.setParameter("version", String.valueOf(version));
+						%>
+
+						<br />
+
+						<liferay-ui:page-iterator
+							cur="<%= articleDisplay.getCurrentPage() %>"
+							curParam='<%= "page" %>'
+							delta="<%= 1 %>"
+							id="articleDisplayPages"
+							maxPages="<%= 25 %>"
+							total="<%= articleDisplay.getNumberOfPages() %>"
+							type="article"
+							url="<%= portletURL.toString() %>"
+						/>
+
+						<br />
+					</c:if>
+				</c:when>
+				<c:otherwise>
+					<div class="alert alert-error">
+						<liferay-ui:message key="this-content-has-expired-or-you-do-not-have-the-required-permissions-to-access-it" />
+					</div>
+				</c:otherwise>
+			</c:choose>
+
+		<%
+		} catch (NoSuchArticleException nsae) {
+		%>
+
+			<div class="alert alert-error">
+				<%= LanguageUtil.get(pageContext, "the-selected-web-content-no-longer-exists") %>
+			</div>
+
+		<%
+		}
+		%>
+
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content/configuration.jsp
new file mode 100644
index 0000000..46decd0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content/configuration.jsp
@@ -0,0 +1,309 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal_content/init.jsp" %>
+
+<%
+int cur = ParamUtil.getInteger(request, SearchContainer.DEFAULT_CUR_PARAM);
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+JournalArticle article = null;
+
+String type = ParamUtil.getString(request, "type");
+
+try {
+	if (Validator.isNotNull(articleId)) {
+		article = JournalArticleLocalServiceUtil.getLatestArticle(articleGroupId, articleId);
+
+		article = article.toEscapedModel();
+
+		articleGroupId = article.getGroupId();
+		type = article.getType();
+	}
+}
+catch (NoSuchArticleException nsae) {
+}
+%>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationActionURL" />
+<liferay-portlet:renderURL portletConfiguration="true" varImpl="configurationRenderURL" />
+
+<aui:form action="<%= configurationActionURL %>" method="post" name="fm1">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value='<%= configurationRenderURL + StringPool.AMPERSAND + renderResponse.getNamespace() + "cur=" + cur %>' />
+
+	<liferay-ui:error exception="<%= NoSuchArticleException.class %>" message="the-web-content-could-not-be-found" />
+
+	<div class="alert alert-info">
+		<span class="displaying-help-message-holder <%= article == null ? StringPool.BLANK : "hide" %>">
+			<liferay-ui:message key="please-select-a-web-content-from-the-list-below" />
+		</span>
+
+		<span class="displaying-article-id-holder <%= article == null ? "hide" : StringPool.BLANK %>">
+			<liferay-ui:message key="displaying-content" />: <span class="displaying-article-id"><%= article != null ? article.getTitle(locale) : StringPool.BLANK %></span>
+		</span>
+	</div>
+
+	<c:if test="<%= article != null %>">
+
+		<%
+		if (Validator.isNotNull(article.getStructureId())) {
+			DDMStructure ddmStructure = DDMStructureLocalServiceUtil.fetchStructure(article.getGroupId(), PortalUtil.getClassNameId(JournalArticle.class), article.getStructureId(), true);
+
+			List<DDMTemplate> ddmTemplates = new ArrayList<DDMTemplate>();
+
+			if (ddmStructure != null) {
+				ddmTemplates.addAll(DDMTemplateLocalServiceUtil.getTemplates(ddmStructure.getGroupId(), PortalUtil.getClassNameId(DDMStructure.class), ddmStructure.getStructureId()));
+
+				if (article.getGroupId() != ddmStructure.getGroupId()) {
+					ddmTemplates.addAll(DDMTemplateLocalServiceUtil.getTemplates(article.getGroupId(), PortalUtil.getClassNameId(DDMStructure.class), ddmStructure.getStructureId()));
+				}
+			}
+
+			if (!ddmTemplates.isEmpty()) {
+				if (Validator.isNull(ddmTemplateKey)) {
+					ddmTemplateKey = article.getTemplateId();
+				}
+		%>
+
+				<aui:fieldset>
+					<liferay-ui:message key="override-default-template" />
+
+					<liferay-ui:table-iterator
+						list="<%= ddmTemplates %>"
+						listType="com.liferay.portlet.dynamicdatamapping.model.DDMTemplate"
+						rowLength="3"
+						rowPadding="30"
+					>
+
+						<%
+						boolean templateChecked = false;
+
+						if (ddmTemplateKey.equals(tableIteratorObj.getTemplateKey())) {
+							templateChecked = true;
+						}
+
+						if ((tableIteratorPos.intValue() == 0) && Validator.isNull(ddmTemplateKey)) {
+							templateChecked = true;
+						}
+						%>
+
+						<liferay-portlet:renderURL portletName="<%= PortletKeys.DYNAMIC_DATA_MAPPING %>" var="editTemplateURL">
+							<portlet:param name="struts_action" value="/dynamic_data_mapping/edit_template" />
+							<portlet:param name="redirect" value="<%= currentURL %>" />
+							<portlet:param name="refererPortletName" value="<%= PortletKeys.JOURNAL_CONTENT %>" />
+							<portlet:param name="groupId" value="<%= String.valueOf(tableIteratorObj.getGroupId()) %>" />
+							<portlet:param name="templateId" value="<%= String.valueOf(tableIteratorObj.getTemplateId()) %>" />
+						</liferay-portlet:renderURL>
+
+						<liferay-util:buffer var="linkContent">
+							<aui:a href="<%= editTemplateURL %>" id="tableIteratorObjName"><%= tableIteratorObj.getName() %></aui:a>
+						</liferay-util:buffer>
+
+						<aui:input checked="<%= templateChecked %>" label="<%= linkContent %>" name="overideTemplateId" onChange='<%= "if (this.checked) {document." + renderResponse.getNamespace() + "fm." + renderResponse.getNamespace() + "ddmTemplateKey.value = this.value;}" %>' type="radio" value="<%= tableIteratorObj.getTemplateKey() %>" />
+
+						<c:if test="<%= tableIteratorObj.isSmallImage() %>">
+							<br />
+
+							<img border="0" hspace="0" src="<%= Validator.isNotNull(tableIteratorObj.getSmallImageURL()) ? tableIteratorObj.getSmallImageURL() : themeDisplay.getPathImage() + "/journal/template?img_id=" + tableIteratorObj.getSmallImageId() + "&t=" + WebServerServletTokenUtil.getToken(tableIteratorObj.getSmallImageId()) %>" vspace="0" />
+						</c:if>
+					</liferay-ui:table-iterator>
+
+					<br />
+				</aui:fieldset>
+
+		<%
+			}
+		}
+		%>
+
+	</c:if>
+
+	<%
+	long groupId = ParamUtil.getLong(request, "groupId", themeDisplay.getScopeGroupId());
+
+	DynamicRenderRequest dynamicRenderRequest = new DynamicRenderRequest(renderRequest);
+
+	dynamicRenderRequest.setParameter("type", type);
+	dynamicRenderRequest.setParameter("groupId", String.valueOf(groupId));
+
+	ArticleSearch searchContainer = new ArticleSearch(dynamicRenderRequest, configurationRenderURL);
+
+	List<String> headerNames = searchContainer.getHeaderNames();
+
+	headerNames.clear();
+
+	headerNames.add("id");
+	headerNames.add("title");
+	headerNames.add("modified-date");
+	headerNames.add("display-date");
+	headerNames.add("author");
+	%>
+
+	<liferay-ui:search-form
+		page="/html/portlet/journal/article_search.jsp"
+		searchContainer="<%= searchContainer %>"
+	>
+		<liferay-ui:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+		<liferay-ui:param name="type" value="<%= HtmlUtil.escape(type) %>" />
+	</liferay-ui:search-form>
+
+	<br />
+
+	<%
+	ArticleSearchTerms searchTerms = (ArticleSearchTerms)searchContainer.getSearchTerms();
+
+	searchTerms.setFolderIds(new ArrayList<Long>());
+	searchTerms.setVersion(-1);
+
+	List<JournalArticle> results = null;
+	int total = 0;
+	%>
+
+	<%@ include file="/html/portlet/journal/article_search_results.jspf" %>
+
+	<%
+	List resultRows = searchContainer.getResultRows();
+
+	for (int i = 0; i < results.size(); i++) {
+		JournalArticle curArticle = results.get(i);
+
+		ResultRow row = new ResultRow(null, HtmlUtil.escapeAttribute(curArticle.getArticleId()) + EditArticleAction.VERSION_SEPARATOR + curArticle.getVersion(), i);
+
+		StringBundler sb = new StringBundler(9);
+
+		sb.append("javascript:");
+		sb.append(renderResponse.getNamespace());
+		sb.append("selectArticle('");
+		sb.append(HtmlUtil.escapeJS(String.valueOf(curArticle.getGroupId())));
+		sb.append("','");
+		sb.append(HtmlUtil.escapeJS(curArticle.getArticleId()));
+		sb.append("','");
+		sb.append(HtmlUtil.escapeJS(curArticle.getTitle(locale)));
+		sb.append("');");
+
+		String rowHREF = sb.toString();
+
+		// Article id
+
+		row.addText(HtmlUtil.escape(curArticle.getArticleId()), rowHREF);
+
+		// Title
+
+		row.addText(HtmlUtil.escape(curArticle.getTitle(locale)), rowHREF);
+
+		// Modified date
+
+		row.addDate(curArticle.getModifiedDate(), rowHREF);
+
+		// Display date
+
+		row.addDate(curArticle.getDisplayDate(), rowHREF);
+
+		// Author
+
+		row.addText(HtmlUtil.escape(PortalUtil.getUserName(curArticle)), rowHREF);
+
+		// Add result row
+
+		resultRows.add(row);
+	}
+	%>
+
+	<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+</aui:form>
+
+<aui:form action="<%= configurationActionURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value='<%= configurationRenderURL + StringPool.AMPERSAND + renderResponse.getNamespace() + "cur" + cur %>' />
+	<aui:input name="preferences--groupId--" type="hidden" value="<%= articleGroupId %>" />
+	<aui:input name="preferences--articleId--" type="hidden" value="<%= articleId %>" />
+	<aui:input name="preferences--ddmTemplateKey--" type="hidden" value="<%= ddmTemplateKey %>" />
+
+	<aui:fieldset>
+		<aui:field-wrapper label="portlet-id">
+			<liferay-ui:input-resource url="<%= portletResource %>" />
+		</aui:field-wrapper>
+	</aui:fieldset>
+
+	<aui:fieldset>
+		<aui:field-wrapper>
+			<aui:input name="preferences--showAvailableLocales--" type="checkbox" value="<%= showAvailableLocales %>" />
+		</aui:field-wrapper>
+
+		<aui:field-wrapper helpMessage='<%= !openOfficeServerEnabled ? "enabling-openoffice-integration-provides-document-conversion-functionality" : StringPool.BLANK %>' label="enable-conversion-to">
+
+			<%
+			for (String conversion : conversions) {
+			%>
+
+				<label class="checkbox inline">
+					<input <%= ArrayUtil.contains(extensions, conversion) ? "checked": "" %> <%= openOfficeServerEnabled ? "" : "disabled" %> name="<portlet:namespace />extensions" type="checkbox" value="<%= conversion %>" />
+
+					<%= StringUtil.toUpperCase(conversion) %>
+				</label>
+
+			<%
+			}
+			%>
+
+		</aui:field-wrapper>
+
+		<aui:field-wrapper>
+			<aui:input name="preferences--enablePrint--" type="checkbox" value="<%= enablePrint %>" />
+
+			<aui:input name="preferences--enableRelatedAssets--" type="checkbox" value="<%= enableRelatedAssets %>" />
+
+			<aui:input name="preferences--enableRatings--" type="checkbox" value="<%= enableRatings %>" />
+
+			<c:if test="<%= PropsValues.JOURNAL_ARTICLE_COMMENTS_ENABLED %>">
+				<aui:input name="preferences--enableComments--" type="checkbox" value="<%= enableComments %>" />
+
+				<aui:input name="preferences--enableCommentRatings--" type="checkbox" value="<%= enableCommentRatings %>" />
+			</c:if>
+
+			<aui:input name="preferences--enableViewCountIncrement--" type="checkbox" value="<%= enableViewCountIncrement %>" />
+		</aui:field-wrapper>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />selectArticle',
+		function(articleGroupId, articleId, articleTitle) {
+			var A = AUI();
+
+			document.<portlet:namespace />fm.<portlet:namespace />groupId.value = articleGroupId;
+			document.<portlet:namespace />fm.<portlet:namespace />articleId.value = articleId;
+			document.<portlet:namespace />fm.<portlet:namespace />ddmTemplateKey.value = "";
+
+			A.one('.displaying-article-id-holder').show();
+			A.one('.displaying-help-message-holder').hide();
+
+			var displayArticleId = A.one('.displaying-article-id');
+
+			displayArticleId.set('innerHTML', articleTitle + ' (<%= UnicodeLanguageUtil.get(pageContext, "modified") %>)');
+			displayArticleId.addClass('modified');
+		},
+		['aui-base']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content/css/.sass-cache/main.css
new file mode 100644
index 0000000..cd24443
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content/css/.sass-cache/main.css
@@ -0,0 +1,43 @@
+.portlet-journal-content .journal-content-article {
+  clear: right; }
+  .portlet-journal-content .journal-content-article:after {
+    clear: both;
+    content: "";
+    display: block;
+    height: 0; }
+.portlet-journal-content .taglib-discussion {
+  margin-top: 18px; }
+.portlet-journal-content .taglib-ratings-wrapper {
+  margin-top: 1em; }
+.portlet-journal-content .tabview-list {
+  margin: 18px 0; }
+.portlet-journal-content .user-actions {
+  padding-bottom: 2.5em; }
+  .portlet-journal-content .user-actions .export-actions, .portlet-journal-content .user-actions .print-action, .portlet-journal-content .user-actions .locale-actions {
+    float: right; }
+  .portlet-journal-content .user-actions .print-action {
+    margin-left: 1em; }
+  .portlet-journal-content .user-actions .locale-separator {
+    border-right: 1px solid #CCC;
+    float: right;
+    margin-right: 1em;
+    padding: 0.8em 0.5em; }
+
+.portlet-configuration .displaying-article-id.modified {
+  color: #4DCF0C; }
+
+.ie .portlet-journal-content .journal-content-article {
+  zoom: 1; }
+.ie .portlet-journal-content .lfr-icon-actions {
+  filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=20);
+  opacity: 0.2; }
+.ie .portlet-journal-content:hover .lfr-icon-actions {
+  filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
+  opacity: 1; }
+
+.ie6 .portlet-journal-content .icons-container {
+  height: 1%; }
+.ie6 .portlet-journal-content .lfr-icon-actions {
+  filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=90);
+  opacity: 0.9; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content/css/main.css
new file mode 100644
index 0000000..8e86172
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content/css/main.css
@@ -0,0 +1,79 @@
+@import "compass";
+
+.portlet-journal-content {
+	.journal-content-article {
+		clear: right;
+
+		&:after {
+			clear: both;
+			content: "";
+			display: block;
+			height: 0;
+		}
+	}
+
+	.taglib-discussion {
+		margin-top: 18px;
+	}
+
+	.taglib-ratings-wrapper {
+		margin-top: 1em;
+	}
+
+	.tabview-list {
+		margin: 18px 0;
+	}
+
+	.user-actions {
+		padding-bottom: 2.5em;
+
+		.export-actions, .print-action, .locale-actions {
+			float: right;
+		}
+
+		.print-action {
+			margin-left: 1em;
+		}
+
+		.locale-separator {
+			border-right: 1px solid #CCC;
+			float: right;
+			margin-right: 1em;
+			padding: 0.8em 0.5em;
+		}
+	}
+}
+
+.portlet-configuration {
+	.displaying-article-id.modified {
+		color: #4DCF0C;
+	}
+}
+
+.ie {
+	.portlet-journal-content {
+		.journal-content-article {
+			zoom: 1;
+		}
+
+		.lfr-icon-actions {
+			@include opacity(0.2);
+		}
+
+		&:hover .lfr-icon-actions {
+			@include opacity(1);
+		}
+	}
+}
+
+.ie6 {
+	.portlet-journal-content {
+		.icons-container {
+			height: 1%;
+		}
+
+		.lfr-icon-actions {
+			@include opacity(0.9);
+		}
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content/error.jsp
new file mode 100644
index 0000000..01debf6
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content/error.jsp
@@ -0,0 +1,24 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal_content/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content/init.jsp
new file mode 100644
index 0000000..bb1dd44
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content/init.jsp
@@ -0,0 +1,55 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.journal.NoSuchArticleException" %><%@
+page import="com.liferay.portlet.journal.service.permission.JournalArticlePermission" %><%@
+page import="com.liferay.portlet.journal.service.permission.JournalPermission" %>
+
+<%
+String portletResource = ParamUtil.getString(request, "portletResource");
+
+long articleGroupId = ParamUtil.getLong(renderRequest, "articleGroupId");
+
+if (articleGroupId <= 0) {
+	articleGroupId = GetterUtil.getLong(portletPreferences.getValue("groupId", String.valueOf(scopeGroupId)));
+}
+
+String articleId = ParamUtil.getString(renderRequest, "articleId");
+String ddmTemplateKey = ParamUtil.getString(renderRequest, "ddmTemplateKey");
+
+if (Validator.isNull(articleId)) {
+	articleId = GetterUtil.getString(portletPreferences.getValue("articleId", StringPool.BLANK));
+	ddmTemplateKey = GetterUtil.getString(portletPreferences.getValue("ddmTemplateKey", StringPool.BLANK));
+}
+
+boolean showAvailableLocales = GetterUtil.getBoolean(portletPreferences.getValue("showAvailableLocales", StringPool.BLANK));
+String[] extensions = portletPreferences.getValues("extensions", null);
+boolean enablePrint = GetterUtil.getBoolean(portletPreferences.getValue("enablePrint", null));
+boolean enableRelatedAssets = GetterUtil.getBoolean(portletPreferences.getValue("enableRelatedAssets", null), true);
+boolean enableRatings = GetterUtil.getBoolean(portletPreferences.getValue("enableRatings", null));
+boolean enableComments = PropsValues.JOURNAL_ARTICLE_COMMENTS_ENABLED && GetterUtil.getBoolean(portletPreferences.getValue("enableComments", null));
+boolean enableCommentRatings = GetterUtil.getBoolean(portletPreferences.getValue("enableCommentRatings", null));
+boolean enableViewCountIncrement = GetterUtil.getBoolean(portletPreferences.getValue("enableViewCountIncrement", null), PropsValues.ASSET_ENTRY_BUFFERED_INCREMENT_ENABLED);
+
+String[] conversions = DocumentConversionUtil.getConversions("html");
+
+boolean openOfficeServerEnabled = PrefsPropsUtil.getBoolean(PropsKeys.OPENOFFICE_SERVER_ENABLED, PropsValues.OPENOFFICE_SERVER_ENABLED);
+boolean enableConversions = openOfficeServerEnabled && (extensions != null) && (extensions.length > 0);
+%>
+
+<%@ include file="/html/portlet/journal_content/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content/view.jsp
new file mode 100644
index 0000000..27c5e75
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content/view.jsp
@@ -0,0 +1,425 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal_content/init.jsp" %>
+
+<%
+JournalArticle article = (JournalArticle)request.getAttribute(WebKeys.JOURNAL_ARTICLE);
+JournalArticleDisplay articleDisplay = (JournalArticleDisplay)request.getAttribute(WebKeys.JOURNAL_ARTICLE_DISPLAY);
+
+boolean print = ParamUtil.getString(request, "viewMode").equals(Constants.PRINT);
+
+boolean hasViewPermission = true;
+
+String title = StringPool.BLANK;
+boolean approved = false;
+boolean expired = true;
+%>
+
+<c:choose>
+	<c:when test="<%= article == null %>">
+		<c:choose>
+			<c:when test="<%= Validator.isNull(articleId) %>">
+
+				<%
+				renderRequest.setAttribute(WebKeys.PORTLET_CONFIGURATOR_VISIBILITY, Boolean.TRUE);
+				%>
+
+				<div class="alert alert-info">
+					<liferay-ui:message key="select-existing-web-content-or-add-some-web-content-to-be-displayed-in-this-portlet" />
+				</div>
+			</c:when>
+			<c:otherwise>
+				<div class="alert alert-error">
+					<%= LanguageUtil.get(pageContext, "the-selected-web-content-no-longer-exists") %>
+				</div>
+			</c:otherwise>
+		</c:choose>
+	</c:when>
+	<c:otherwise>
+
+		<%
+		hasViewPermission = JournalArticlePermission.contains(permissionChecker, article.getGroupId(), article.getArticleId(), ActionKeys.VIEW);
+		%>
+
+		<c:choose>
+			<c:when test="<%= !hasViewPermission %>">
+
+				<%
+				renderRequest.setAttribute(WebKeys.PORTLET_CONFIGURATOR_VISIBILITY, Boolean.TRUE);
+				%>
+
+				<div class="alert alert-error">
+					<liferay-ui:message key="you-do-not-have-the-roles-required-to-access-this-web-content-entry" />
+				</div>
+			</c:when>
+			<c:otherwise>
+
+				<%
+				title = article.getTitle(locale);
+				approved = article.isApproved();
+				expired = article.isExpired();
+
+				if (!expired) {
+					Date expirationDate = article.getExpirationDate();
+
+					if ((expirationDate != null) && expirationDate.before(new Date())) {
+						expired = true;
+					}
+				}
+				%>
+
+				<c:choose>
+					<c:when test="<%= (articleDisplay != null) && !expired %>">
+
+						<%
+						if (enableViewCountIncrement) {
+							AssetEntryServiceUtil.incrementViewCounter(JournalArticle.class.getName(), articleDisplay.getResourcePrimKey());
+						}
+
+						if (themeDisplay.isStateExclusive()) {
+							out.print(RuntimePageUtil.processXML(request, response, articleDisplay.getContent()));
+
+							return;
+						}
+
+						PortletURL portletURL = renderResponse.createRenderURL();
+						%>
+
+						<c:if test="<%= enableConversions || enablePrint || (showAvailableLocales && (articleDisplay.getAvailableLocales().length > 1)) %>">
+							<div class="user-actions">
+								<c:if test="<%= enablePrint %>">
+									<c:choose>
+										<c:when test="<%= print %>">
+											<div class="print-action">
+												<liferay-ui:icon
+													image="print"
+													label="<%= true %>"
+													message='<%= LanguageUtil.format(pageContext, "print-x-x", new Object[] {"hide-accessible", articleDisplay.getTitle()}) %>'
+													url="javascript:print();"
+												/>
+											</div>
+
+											<aui:script>
+												print();
+											</aui:script>
+										</c:when>
+										<c:otherwise>
+
+											<%
+											PortletURL printPageURL = renderResponse.createRenderURL();
+
+											printPageURL.setParameter("struts_action", "/journal_content/view");
+											printPageURL.setParameter("groupId", String.valueOf(articleDisplay.getGroupId()));
+											printPageURL.setParameter("articleId", articleDisplay.getArticleId());
+											printPageURL.setParameter("page", String.valueOf(articleDisplay.getCurrentPage()));
+											printPageURL.setParameter("viewMode", Constants.PRINT);
+											printPageURL.setWindowState(LiferayWindowState.POP_UP);
+											%>
+
+											<div class="print-action">
+												<liferay-ui:icon
+													image="print"
+													label="<%= true %>"
+													message='<%= LanguageUtil.format(pageContext, "print-x-x", new Object[] {"hide-accessible", articleDisplay.getTitle()}) %>'
+													url='<%= "javascript:" + renderResponse.getNamespace() + "printPage();" %>'
+												/>
+											</div>
+
+											<aui:script>
+												function <portlet:namespace />printPage() {
+													window.open('<%= printPageURL %>', '', "directories=0,height=480,left=80,location=1,menubar=1,resizable=1,scrollbars=yes,status=0,toolbar=0,top=180,width=640");
+												}
+											</aui:script>
+										</c:otherwise>
+									</c:choose>
+								</c:if>
+
+								<c:if test="<%= enableConversions && !print %>">
+
+									<%
+									PortletURL exportArticleURL = renderResponse.createActionURL();
+
+									exportArticleURL.setParameter("struts_action", "/journal_content/export_article");
+									exportArticleURL.setParameter("groupId", String.valueOf(articleDisplay.getGroupId()));
+									exportArticleURL.setParameter("articleId", articleDisplay.getArticleId());
+									exportArticleURL.setWindowState(LiferayWindowState.EXCLUSIVE);
+									%>
+
+									<div class="export-actions">
+										<liferay-ui:icon-list>
+
+											<%
+											for (String extension : extensions) {
+												exportArticleURL.setParameter("targetExtension", extension);
+											%>
+
+												<liferay-ui:icon
+													image='<%= "../file_system/small/" + extension %>'
+													label="<%= true %>"
+													message='<%= LanguageUtil.format(pageContext, "x-convert-x-to-x", new Object[] {"hide-accessible", articleDisplay.getTitle(), StringUtil.toUpperCase(extension)}) %>'
+													method="get"
+													url="<%= exportArticleURL.toString() %>"
+												/>
+
+											<%
+											}
+											%>
+
+										</liferay-ui:icon-list>
+									</div>
+								</c:if>
+
+								<c:if test="<%= showAvailableLocales && !print %>">
+
+									<%
+									String[] availableLocales = articleDisplay.getAvailableLocales();
+									%>
+
+									<c:if test="<%= availableLocales.length > 1 %>">
+										<c:if test="<%= enableConversions || enablePrint %>">
+											<div class="locale-separator"> </div>
+										</c:if>
+
+										<div class="locale-actions">
+											<liferay-ui:language displayStyle="<%= 0 %>" formAction="<%= currentURL %>" languageId="<%= LanguageUtil.getLanguageId(request) %>" languageIds="<%= availableLocales %>" />
+										</div>
+									</c:if>
+								</c:if>
+							</div>
+						</c:if>
+
+						<div class="journal-content-article">
+							<%= RuntimePageUtil.processXML(request, response, articleDisplay.getContent()) %>
+						</div>
+
+						<c:if test="<%= articleDisplay.isPaginate() %>">
+							<liferay-ui:page-iterator
+								cur="<%= articleDisplay.getCurrentPage() %>"
+								curParam='<%= "page" %>'
+								delta="<%= 1 %>"
+								id="articleDisplayPages"
+								maxPages="<%= 25 %>"
+								total="<%= articleDisplay.getNumberOfPages() %>"
+								type="article"
+								url="<%= portletURL.toString() %>"
+							/>
+
+							<br />
+						</c:if>
+					</c:when>
+					<c:otherwise>
+
+					<%
+					renderRequest.setAttribute(WebKeys.PORTLET_CONFIGURATOR_VISIBILITY, Boolean.TRUE);
+					%>
+
+					<br />
+						<c:choose>
+							<c:when test="<%= Validator.isNull(articleId) %>">
+							</c:when>
+							<c:otherwise>
+
+								<%
+								if (expired) {
+								%>
+
+									<div class="alert alert-block">
+										<%= LanguageUtil.format(pageContext, "x-is-expired", title) %>
+									</div>
+
+								<%
+								}
+								else if (!approved) {
+								%>
+
+									<c:choose>
+										<c:when test="<%= JournalArticlePermission.contains(permissionChecker, article.getGroupId(), article.getArticleId(), ActionKeys.UPDATE) %>">
+											<liferay-portlet:renderURL portletName="<%= PortletKeys.JOURNAL %>" var="editURL" windowState="<%= WindowState.MAXIMIZED.toString() %>">
+												<portlet:param name="struts_action" value="/journal/edit_article" />
+												<portlet:param name="redirect" value="<%= currentURL %>" />
+												<portlet:param name="groupId" value="<%= String.valueOf(article.getGroupId()) %>" />
+												<portlet:param name="articleId" value="<%= article.getArticleId() %>" />
+												<portlet:param name="version" value="<%= String.valueOf(article.getVersion()) %>" />
+											</liferay-portlet:renderURL>
+
+											<div class="alert alert-block">
+												<a href="<%= editURL %>">
+													<%= LanguageUtil.format(pageContext, "x-is-not-approved", HtmlUtil.escape(title)) %>
+												</a>
+											</div>
+										</c:when>
+										<c:otherwise>
+											<div class="alert alert-block">
+												<%= LanguageUtil.format(pageContext, "x-is-not-approved", HtmlUtil.escape(title)) %>
+											</div>
+										</c:otherwise>
+									</c:choose>
+
+								<%
+								}
+								%>
+
+							</c:otherwise>
+						</c:choose>
+					</c:otherwise>
+				</c:choose>
+			</c:otherwise>
+		</c:choose>
+	</c:otherwise>
+</c:choose>
+
+<%
+JournalArticle latestArticle = null;
+
+try {
+	if (articleDisplay != null) {
+		latestArticle = JournalArticleLocalServiceUtil.getLatestArticle(articleDisplay.getGroupId(), articleDisplay.getArticleId(), WorkflowConstants.STATUS_ANY);
+	}
+}
+catch (NoSuchArticleException nsae) {
+}
+
+DDMTemplate ddmTemplate = null;
+
+if ((articleDisplay != null) && Validator.isNotNull(articleDisplay.getDDMTemplateKey())) {
+	ddmTemplate = DDMTemplateLocalServiceUtil.fetchTemplate(articleDisplay.getGroupId(), PortalUtil.getClassNameId(DDMStructure.class), articleDisplay.getDDMTemplateKey());
+}
+
+boolean showEditArticleIcon = (latestArticle != null) && JournalArticlePermission.contains(permissionChecker, latestArticle.getGroupId(), latestArticle.getArticleId(), ActionKeys.UPDATE);
+boolean showEditTemplateIcon = (ddmTemplate != null) && DDMTemplatePermission.contains(permissionChecker, ddmTemplate, PortletKeys.JOURNAL, ActionKeys.UPDATE);
+boolean showSelectArticleIcon = PortletPermissionUtil.contains(permissionChecker, layout, portletDisplay.getId(), ActionKeys.CONFIGURATION);
+boolean showAddArticleIcon = showSelectArticleIcon && JournalPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_ARTICLE);
+boolean showIconsActions = themeDisplay.isSignedIn() && !layout.isLayoutPrototypeLinkActive() && (showEditArticleIcon || showEditTemplateIcon || showSelectArticleIcon || showAddArticleIcon);
+%>
+
+<c:if test="<%= showIconsActions && !print && hasViewPermission %>">
+	<div class="lfr-meta-actions icons-container">
+		<div class="lfr-icon-actions">
+			<c:if test="<%= showEditArticleIcon %>">
+				<liferay-portlet:renderURL portletName="<%= PortletKeys.JOURNAL %>" var="editURL" windowState="<%= WindowState.MAXIMIZED.toString() %>">
+					<portlet:param name="struts_action" value="/journal/edit_article" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="groupId" value="<%= String.valueOf(latestArticle.getGroupId()) %>" />
+					<portlet:param name="articleId" value="<%= latestArticle.getArticleId() %>" />
+					<portlet:param name="version" value="<%= String.valueOf(latestArticle.getVersion()) %>" />
+				</liferay-portlet:renderURL>
+
+				<liferay-ui:icon
+					cssClass="lfr-icon-action lfr-icon-action-edit"
+					image="edit"
+					label="<%= true %>"
+					message="edit"
+					url="<%= editURL %>"
+				/>
+			</c:if>
+
+			<c:if test="<%= showEditTemplateIcon %>">
+				<liferay-portlet:renderURL portletName="<%= PortletKeys.DYNAMIC_DATA_MAPPING %>" var="editTemplateURL" windowState="<%= WindowState.MAXIMIZED.toString() %>">
+					<portlet:param name="struts_action" value="/dynamic_data_mapping/edit_template" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="refererPortletName" value="<%= PortletKeys.JOURNAL_CONTENT %>" />
+					<portlet:param name="groupId" value="<%= String.valueOf(ddmTemplate.getGroupId()) %>" />
+					<portlet:param name="templateId" value="<%= String.valueOf(ddmTemplate.getTemplateId()) %>" />
+				</liferay-portlet:renderURL>
+
+				<liferay-ui:icon
+					cssClass="lfr-icon-action lfr-icon-action-edit-template"
+					image="../file_system/small/xml"
+					label="<%= true %>"
+					message="edit-template"
+					url="<%= editTemplateURL %>"
+				/>
+			</c:if>
+
+			<c:if test="<%= showSelectArticleIcon %>">
+				<liferay-ui:icon
+					cssClass="lfr-icon-action lfr-icon-action-configuration"
+					image="configuration"
+					label="<%= true %>"
+					message="select-web-content"
+					method="get"
+					onClick="<%= portletDisplay.getURLConfigurationJS() %>"
+					url="<%= portletDisplay.getURLConfiguration() %>"
+				/>
+			</c:if>
+
+			<c:if test="<%= showAddArticleIcon %>">
+				<liferay-portlet:renderURL portletName="<%= PortletKeys.JOURNAL %>" var="addArticleURL" windowState="<%= WindowState.MAXIMIZED.toString() %>">
+					<portlet:param name="struts_action" value="/journal/edit_article" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="portletResource" value="<%= portletDisplay.getId() %>" />
+					<portlet:param name="groupId" value="<%= String.valueOf(scopeGroupId) %>" />
+				</liferay-portlet:renderURL>
+
+				<liferay-ui:icon
+					cssClass="lfr-icon-action lfr-icon-action-add"
+					image="add_article"
+					label="<%= true %>"
+					message="add"
+					url="<%= addArticleURL %>"
+				/>
+			</c:if>
+		</div>
+	</div>
+</c:if>
+
+<c:if test="<%= (articleDisplay != null) && hasViewPermission %>">
+	<c:if test="<%= enableRelatedAssets %>">
+		<div class="entry-links">
+			<liferay-ui:asset-links
+				className="<%= JournalArticle.class.getName() %>"
+				classPK="<%= articleDisplay.getResourcePrimKey() %>"
+			/>
+		</div>
+	</c:if>
+
+	<c:if test="<%= enableRatings && !print %>">
+		<div class="taglib-ratings-wrapper">
+			<liferay-ui:ratings
+				className="<%= JournalArticle.class.getName() %>"
+				classPK="<%= articleDisplay.getResourcePrimKey() %>"
+			/>
+		</div>
+	</c:if>
+
+	<c:if test="<%= enableComments %>">
+
+		<%
+		int discussionMessagesCount = MBMessageLocalServiceUtil.getDiscussionMessagesCount(PortalUtil.getClassNameId(JournalArticle.class.getName()), articleDisplay.getResourcePrimKey(), WorkflowConstants.STATUS_APPROVED);
+		%>
+
+		<c:if test="<%= discussionMessagesCount > 0 %>">
+			<liferay-ui:header
+				title="comments"
+			/>
+		</c:if>
+
+		<portlet:actionURL var="discussionURL">
+			<portlet:param name="struts_action" value="/journal_content/edit_article_discussion" />
+		</portlet:actionURL>
+
+		<liferay-ui:discussion
+			className="<%= JournalArticle.class.getName() %>"
+			classPK="<%= articleDisplay.getResourcePrimKey() %>"
+			formAction="<%= discussionURL %>"
+			hideControls="<%= print %>"
+			ratingsEnabled="<%= enableCommentRatings && !print %>"
+			redirect="<%= currentURL %>"
+			userId="<%= articleDisplay.getUserId() %>"
+		/>
+	</c:if>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content_search/article_content.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content_search/article_content.jsp
new file mode 100644
index 0000000..5f4534c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content_search/article_content.jsp
@@ -0,0 +1,93 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal_content_search/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+Object[] objArray = (Object[])row.getObject();
+
+String[] queryTerms = (String[])objArray[0];
+Document doc = (Document)objArray[1];
+Summary summary = (Summary)objArray[2];
+
+String content = StringUtil.highlight(summary.getContent(), queryTerms);
+
+long articleGroupId = GetterUtil.getLong(doc.get(Field.GROUP_ID));
+String articleId = doc.get("articleId");
+
+List hitLayoutIds = JournalContentSearchLocalServiceUtil.getLayoutIds(layout.getGroupId(), layout.isPrivateLayout(), articleId);
+%>
+
+<%= content %><br />
+
+<c:choose>
+	<c:when test="<%= !hitLayoutIds.isEmpty() %>">
+		<span style="font-size: xx-small;">
+
+		<%
+		for (int i = 0; i < hitLayoutIds.size(); i++) {
+			Long hitLayoutId = (Long)hitLayoutIds.get(i);
+
+			Layout hitLayout = null;
+
+			try {
+				hitLayout = LayoutLocalServiceUtil.getLayout(layout.getGroupId(), layout.isPrivateLayout(), hitLayoutId.longValue());
+			}
+			catch (Exception e) {
+				if (_log.isWarnEnabled()) {
+					_log.warn("Journal content search is stale and contains layout {" + layout.getGroupId() + ", " + layout.isPrivateLayout() + ", " + hitLayoutId.longValue() + "}");
+				}
+
+				continue;
+			}
+
+			String hitLayoutURL = PortalUtil.getLayoutFullURL(hitLayout, themeDisplay);
+		%>
+
+			<br /><a href="<%= hitLayoutURL %>"><%= StringUtil.shorten(hitLayoutURL, 100) %></a>
+
+		<%
+		}
+		%>
+
+		</span>
+	</c:when>
+	<c:otherwise>
+		<span style="font-size: xx-small;">
+
+		<%
+		if (Validator.isNull(targetPortletId)) {
+			targetPortletId = PortletKeys.JOURNAL_CONTENT;
+		}
+
+		PortletURL webContentPortletURL = PortletURLFactoryUtil.create(request, targetPortletId, plid, PortletRequest.RENDER_PHASE);
+
+		webContentPortletURL.setParameter("struts_action", "/journal_content/view");
+		webContentPortletURL.setParameter("groupId", String.valueOf(articleGroupId));
+		webContentPortletURL.setParameter("articleId", articleId);
+		%>
+
+		<br /><a href="<%= webContentPortletURL.toString() %>"><%= StringUtil.shorten(webContentPortletURL.toString(), 100) %></a>
+
+		</span>
+	</c:otherwise>
+</c:choose>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.journal_content_search.article_content_jsp");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content_search/article_language.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content_search/article_language.jsp
new file mode 100644
index 0000000..7e42923
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content_search/article_language.jsp
@@ -0,0 +1,31 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal_content_search/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+Object[] objArray = (Object[])row.getObject();
+
+Locale snippetLocale = ((Summary)objArray[2]).getLocale();
+
+String languageId = LocaleUtil.toLanguageId(snippetLocale);
+%>
+
+<c:if test="<%= languageId.length() > 0 %>">
+	<liferay-ui:icon image='<%= "../language/" + languageId %>' />
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content_search/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content_search/configuration.jsp
new file mode 100644
index 0000000..d870303
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content_search/configuration.jsp
@@ -0,0 +1,63 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal_content_search/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+%>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+
+	<div class="alert alert-info">
+		<liferay-ui:message key="define-the-behavior-of-this-search" />
+	</div>
+
+	<aui:fieldset>
+		<aui:select label="web-content-type" name="preferences--type--">
+			<aui:option value="" />
+
+			<%
+			for (int i = 0; i < JournalArticleConstants.TYPES.length; i++) {
+			%>
+
+				<aui:option label="<%= JournalArticleConstants.TYPES[i] %>" selected="<%= type.equals(JournalArticleConstants.TYPES[i]) %>" />
+
+			<%
+			}
+			%>
+
+		</aui:select>
+
+		<aui:input label="only-show-results-for-web-content-listed-in-a-web-content-display-portlet" name="preferences--showListed--" type="checkbox" value="<%= showListed %>" />
+
+		<div class="<%= !showListed ? StringPool.BLANK : " hide" %>" id="<portlet:namespace />webContentDisplay">
+			<aui:input cssClass="lfr-input-text-container" name="preferences--targetPortletId--" value="<%= targetPortletId %>" />
+		</div>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	Liferay.Util.toggleBoxes('<portlet:namespace />showListedCheckbox','<portlet:namespace />webContentDisplay', true);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content_search/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content_search/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content_search/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content_search/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content_search/init.jsp
new file mode 100644
index 0000000..600511a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content_search/init.jsp
@@ -0,0 +1,41 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.kernel.search.Document" %><%@
+page import="com.liferay.portlet.journal.service.JournalContentSearchLocalServiceUtil" %><%@
+page import="com.liferay.portlet.journalcontentsearch.util.ContentHits" %>
+
+<%
+boolean showListedDefault = true;
+
+if (portletName.equals(PortletKeys.JOURNAL_CONTENT_SEARCH)) {
+	showListedDefault = PropsValues.JOURNAL_CONTENT_SEARCH_SHOW_LISTED;
+}
+
+boolean showListed = PrefsParamUtil.getBoolean(portletPreferences, request, "showListed", showListedDefault);
+
+String targetPortletId = StringPool.BLANK;
+
+if (!showListed) {
+	targetPortletId = PrefsParamUtil.getString(portletPreferences, request, "targetPortletId", StringPool.BLANK);
+}
+
+String type = PrefsParamUtil.getString(portletPreferences, request, "type", StringPool.BLANK);
+%>
+
+<%@ include file="/html/portlet/journal_content_search/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content_search/search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content_search/search.jsp
new file mode 100644
index 0000000..2a895ab
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content_search/search.jsp
@@ -0,0 +1,159 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal_content_search/init.jsp" %>
+
+<c:choose>
+	<c:when test="<%= windowState.equals(WindowState.MAXIMIZED) %>">
+		<style type="text/css">
+			.portlet-journal-content-search .search-results {
+				margin-top: 1em;
+			}
+		</style>
+
+		<%
+		String defaultKeywords = LanguageUtil.get(pageContext, "search") + StringPool.TRIPLE_PERIOD;
+		String unicodeDefaultKeywords = UnicodeFormatter.toString(defaultKeywords);
+
+		String keywords = ParamUtil.getString(request, "keywords", defaultKeywords);
+		%>
+
+		<portlet:renderURL var="searchURL">
+			<portlet:param name="struts_action" value="/journal_content_search/search" />
+			<portlet:param name="showListed" value="<%= String.valueOf(showListed) %>" />
+			<portlet:param name="targetPortletId" value="<%= targetPortletId %>" />
+			<portlet:param name="type" value="<%= type %>" />
+		</portlet:renderURL>
+
+		<aui:form action="<%= searchURL %>" method="post" name="fm">
+
+			<%
+			PortletURL portletURL = renderResponse.createRenderURL();
+
+			portletURL.setParameter("struts_action", "/journal_content_search/search");
+			portletURL.setParameter("keywords", keywords);
+
+			List<String> headerNames = new ArrayList<String>();
+
+			headerNames.add("#");
+			headerNames.add("language");
+			headerNames.add("name");
+			headerNames.add("content");
+
+			SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, portletURL, headerNames, LanguageUtil.format(pageContext, "no-pages-were-found-that-matched-the-keywords-x", "<strong>" + HtmlUtil.escape(keywords) + "</strong>"));
+
+			try {
+				Indexer indexer = IndexerRegistryUtil.getIndexer(JournalArticle.class);
+
+				SearchContext searchContext = SearchContextFactory.getInstance(request);
+
+				searchContext.setAttribute("articleType", type);
+				searchContext.setGroupIds(null);
+				searchContext.setKeywords(keywords);
+
+				QueryConfig queryConfig = new QueryConfig();
+
+				queryConfig.setHighlightEnabled(true);
+
+				searchContext.setQueryConfig(queryConfig);
+
+				Hits hits = indexer.search(searchContext);
+
+				String[] queryTerms = hits.getQueryTerms();
+
+				ContentHits contentHits = new ContentHits();
+
+				contentHits.setShowListed(showListed);
+
+				contentHits.recordHits(hits, layout.getGroupId(), layout.isPrivateLayout(), searchContainer.getStart(), searchContainer.getEnd());
+
+				int total = hits.getLength();
+
+				searchContainer.setTotal(total);
+
+				List<Document> results = ListUtil.toList(hits.getDocs());
+
+				List resultRows = searchContainer.getResultRows();
+
+				for (int i = 0; i < results.size(); i++) {
+					Document doc = results.get(i);
+
+					PortletURL summaryURL = PortletURLUtil.clone(portletURL, renderResponse);
+
+					Summary summary = indexer.getSummary(doc, locale, StringPool.BLANK, summaryURL);
+
+					ResultRow row = new ResultRow(new Object[] {queryTerms, doc, summary}, i, i);
+
+					// Position
+
+					row.addText(searchContainer.getStart() + i + 1 + StringPool.PERIOD);
+
+					row.addJSP("/html/portlet/journal_content_search/article_language.jsp");
+
+					// Title
+
+					String title = HtmlUtil.escape(summary.getTitle());
+
+					title = StringUtil.highlight(title, queryTerms);
+
+					row.addText(title);
+
+					// Content
+
+					row.addJSP("/html/portlet/journal_content_search/article_content.jsp");
+
+					// Add result row
+
+					resultRows.add(row);
+				}
+			%>
+
+			<%
+			String taglibOnBlur = "if (this.value == '') { this.value = '" + unicodeDefaultKeywords + "'; }";
+			String taglibOnFocus = "if (this.value == '" + unicodeDefaultKeywords + "') { this.value = ''; }";
+			%>
+
+			<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" cssClass="lfr-search-keywords" inlineField="<%= true %>" label="" name="keywords" onBlur="<%= taglibOnBlur %>" onFocus="<%= taglibOnFocus %>" size="30" title="search-web-content" type="text" value="<%= HtmlUtil.escape(keywords) %>" />
+
+			<aui:input align="absmiddle" alt='<%= LanguageUtil.get(pageContext, "search") %>' border="0" cssClass="lfr-search-button" inlineField="<%= true %>" label="" name="search" src='<%= themeDisplay.getPathThemeImages() + "/common/search.png" %>' title="search" type="image" />
+
+			<div class="search-results">
+				<liferay-ui:search-speed hits="<%= hits %>" searchContainer="<%= searchContainer %>" />
+
+				<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+			</div>
+
+			<%
+			}
+			catch (Exception e) {
+				_log.error(e.getMessage());
+			}
+			%>
+
+		</aui:form>
+	</c:when>
+	<c:otherwise>
+		<liferay-ui:journal-content-search
+			showListed="<%= showListed %>"
+			targetPortletId="<%= targetPortletId %>"
+			type="<%= type %>"
+		/>
+	</c:otherwise>
+</c:choose>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.journal_content_search.search_jsp");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content_search/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content_search/view.jsp
new file mode 100644
index 0000000..d204c67
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/journal_content_search/view.jsp
@@ -0,0 +1,23 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/journal_content_search/init.jsp" %>
+
+<liferay-ui:journal-content-search
+	showListed="<%= showListed %>"
+	targetPortletId="<%= targetPortletId %>"
+	type="<%= type %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/language/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/language/configuration.jsp
new file mode 100644
index 0000000..0887c5e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/language/configuration.jsp
@@ -0,0 +1,96 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/language/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+%>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveConfiguration();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+
+	<aui:fieldset label="languages">
+		<aui:input name="preferences--languageIds--" type="hidden" />
+
+		<%
+		Set<String> availableLanguageIdsSet = SetUtil.fromArray(availableLanguageIds);
+
+		// Left list
+
+		List leftList = new ArrayList();
+
+		for (String languageId : languageIds) {
+			leftList.add(new KeyValuePair(languageId, LocaleUtil.fromLanguageId(languageId).getDisplayName(locale)));
+		}
+
+		// Right list
+
+		List rightList = new ArrayList();
+
+		Arrays.sort(languageIds);
+
+		for (String languageId : availableLanguageIdsSet) {
+			if (Arrays.binarySearch(languageIds, languageId) < 0) {
+				rightList.add(new KeyValuePair(languageId, LocaleUtil.fromLanguageId(languageId).getDisplayName(locale)));
+			}
+		}
+
+		rightList = ListUtil.sort(rightList, new KeyValuePairComparator(false, true));
+		%>
+
+		<liferay-ui:input-move-boxes
+			leftBoxName="currentLanguageIds"
+			leftList="<%= leftList %>"
+			leftReorder="true"
+			leftTitle="current"
+			rightBoxName="availableLanguageIds"
+			rightList="<%= rightList %>"
+			rightTitle="available"
+		/>
+	</aui:fieldset>
+
+	<aui:fieldset>
+		<aui:select name="preferences--displayStyle--">
+			<aui:option label="icon" selected="<%= displayStyle == LanguageTag.LIST_ICON %>" value="<%= LanguageTag.LIST_ICON %>" />
+			<aui:option label="long-text" selected="<%= displayStyle == LanguageTag.LIST_LONG_TEXT %>" value="<%= LanguageTag.LIST_LONG_TEXT %>" />
+			<aui:option label="short-text" selected="<%= displayStyle == LanguageTag.LIST_SHORT_TEXT %>" value="<%= LanguageTag.LIST_SHORT_TEXT %>" />
+			<aui:option label="select-box" selected="<%= displayStyle == LanguageTag.SELECT_BOX %>" value="<%= LanguageTag.SELECT_BOX %>" />
+		</aui:select>
+	</aui:fieldset>
+
+	<aui:input name="preferences--displayCurrentLocale--" type="checkbox" value="<%= displayCurrentLocale %>" />
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />saveConfiguration',
+		function() {
+			document.<portlet:namespace />fm.<portlet:namespace />languageIds.value = Liferay.Util.listSelect(document.<portlet:namespace />fm.<portlet:namespace />currentLanguageIds);
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/language/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/language/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/language/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/language/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/language/init.jsp
new file mode 100644
index 0000000..262600a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/language/init.jsp
@@ -0,0 +1,31 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.taglib.ui.LanguageTag" %>
+
+<%
+Locale[] availableLocales = LanguageUtil.getAvailableLocales(themeDisplay.getSiteGroupId());
+
+String[] availableLanguageIds = LocaleUtil.toLanguageIds(availableLocales);
+
+String[] languageIds = StringUtil.split(portletPreferences.getValue("languageIds", StringUtil.merge(availableLanguageIds)));
+boolean displayCurrentLocale = GetterUtil.getBoolean(portletPreferences.getValue("displayCurrentLocale", null), true);
+int displayStyle = GetterUtil.getInteger(portletPreferences.getValue("displayStyle", StringPool.BLANK));
+%>
+
+<%@ include file="/html/portlet/language/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/language/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/language/view.jsp
new file mode 100644
index 0000000..b87a56c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/language/view.jsp
@@ -0,0 +1,19 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/language/init.jsp" %>
+
+<liferay-ui:language displayCurrentLocale="<%= displayCurrentLocale %>" displayStyle="<%= displayStyle %>" languageIds="<%= languageIds %>" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_prototypes/edit_layout_prototype.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_prototypes/edit_layout_prototype.jsp
new file mode 100644
index 0000000..5f75792
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_prototypes/edit_layout_prototype.jsp
@@ -0,0 +1,109 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layout_prototypes/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+String backURL = ParamUtil.getString(request, "backURL", redirect);
+
+LayoutPrototype layoutPrototype = (LayoutPrototype)request.getAttribute(WebKeys.LAYOUT_PROTOTYPE);
+
+if (layoutPrototype == null) {
+	layoutPrototype = new LayoutPrototypeImpl();
+
+	layoutPrototype.setNew(true);
+	layoutPrototype.setActive(true);
+}
+
+long layoutPrototypeId = BeanParamUtil.getLong(layoutPrototype, request, "layoutPrototypeId");
+%>
+
+<liferay-util:include page="/html/portlet/layout_prototypes/toolbar.jsp">
+	<liferay-util:param name="toolbarItem" value='<%= layoutPrototype.isNew() ? "add" : StringPool.BLANK %>' />
+</liferay-util:include>
+
+<liferay-ui:header
+	backURL="<%= backURL %>"
+	localizeTitle="<%= layoutPrototype.isNew() %>"
+	title='<%= layoutPrototype.isNew() ? "new-page-template" : layoutPrototype.getName(locale) %>'
+/>
+
+<%
+request.setAttribute("edit_layout_prototype.jsp-layoutPrototype", layoutPrototype);
+request.setAttribute("edit_layout_prototype.jsp-redirect", redirect);
+%>
+
+<liferay-util:include page="/html/portlet/layout_prototypes/merge_alert.jsp" />
+
+<aui:form method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveLayoutPrototype();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="layoutPrototypeId" type="hidden" value="<%= layoutPrototypeId %>" />
+
+	<aui:model-context bean="<%= layoutPrototype %>" model="<%= LayoutPrototype.class %>" />
+
+	<aui:fieldset>
+		<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" name="name" />
+
+		<aui:input name="description" />
+
+		<aui:input name="active" />
+
+		<c:if test="<%= !layoutPrototype.isNew() %>">
+			<aui:field-wrapper label="configuration">
+				<liferay-portlet:actionURL portletName="<%= PortletKeys.SITE_REDIRECTOR %>" var="viewURL">
+					<portlet:param name="struts_action" value="/my_sites/view" />
+					<portlet:param name="groupId" value="<%= String.valueOf(layoutPrototype.getGroupId()) %>" />
+					<portlet:param name="privateLayout" value="<%= Boolean.TRUE.toString() %>" />
+				</liferay-portlet:actionURL>
+
+				<liferay-ui:icon
+					image="view"
+					label="<%= true %>"
+					message="open-page-template"
+					method="get"
+					target="_blank"
+					url="<%= viewURL %>"
+				/>
+			</aui:field-wrapper>
+		</c:if>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />saveLayoutPrototype() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (layoutPrototype == null) ? Constants.ADD : Constants.UPDATE %>";
+
+		submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/layout_prototypes/edit_layout_prototype" /></portlet:actionURL>");
+	}
+</aui:script>
+
+<%
+if (!layoutPrototype.isNew()) {
+	PortalUtil.addPortletBreadcrumbEntry(request, layoutPrototype.getName(locale), currentURL);
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit"), currentURL);
+}
+else {
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "add-page"), currentURL);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_prototypes/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_prototypes/error.jsp
new file mode 100644
index 0000000..edfe915
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_prototypes/error.jsp
@@ -0,0 +1,25 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layout_prototypes/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= NoSuchLayoutPrototypeException.class %>" message="the-page-template-could-not-be-found" />
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_prototypes/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_prototypes/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_prototypes/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_prototypes/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_prototypes/init.jsp
new file mode 100644
index 0000000..4b80a64
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_prototypes/init.jsp
@@ -0,0 +1,23 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.NoSuchLayoutPrototypeException" %><%@
+page import="com.liferay.portal.RequiredLayoutPrototypeException" %><%@
+page import="com.liferay.portal.service.LayoutPrototypeLocalServiceUtil" %>
+
+<%@ include file="/html/portlet/layout_prototypes/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_prototypes/layout_prototype_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_prototypes/layout_prototype_action.jsp
new file mode 100644
index 0000000..4761898
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_prototypes/layout_prototype_action.jsp
@@ -0,0 +1,107 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layout_prototypes/init.jsp" %>
+
+<%
+SearchContainer searchContainer = (SearchContainer)request.getAttribute("liferay-ui:search:searchContainer");
+
+String redirect = searchContainer.getIteratorURL().toString();
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+LayoutPrototype layoutPrototype = (LayoutPrototype)row.getObject();
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= LayoutPrototypePermissionUtil.contains(permissionChecker, layoutPrototype.getLayoutPrototypeId(), ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/layout_prototypes/edit_layout_prototype" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="layoutPrototypeId" value="<%= String.valueOf(layoutPrototype.getLayoutPrototypeId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= LayoutPrototypePermissionUtil.contains(permissionChecker, layoutPrototype.getLayoutPrototypeId(), ActionKeys.PERMISSIONS) %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= LayoutPrototype.class.getName() %>"
+			modelResourceDescription="<%= layoutPrototype.getName(locale) %>"
+			resourcePrimKey="<%= String.valueOf(layoutPrototype.getLayoutPrototypeId()) %>"
+			var="permissionsURL"
+			windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			method="get"
+			url="<%= permissionsURL %>"
+			useDialog="<%= true %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= LayoutPrototypePermissionUtil.contains(permissionChecker, layoutPrototype.getLayoutPrototypeId(), ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/layout_prototypes/edit_layout_prototype" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="layoutPrototypeIds" value="<%= String.valueOf(layoutPrototype.getLayoutPrototypeId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete
+			url="<%= deleteURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= GroupPermissionUtil.contains(permissionChecker, layoutPrototype.getGroup(), ActionKeys.EXPORT_IMPORT_LAYOUTS) %>">
+		<portlet:renderURL var="exportURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+			<portlet:param name="struts_action" value="/layout_prototypes/export_layouts" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.EXPORT %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(layoutPrototype.getGroupId()) %>" />
+			<portlet:param name="privateLayout" value="<%= Boolean.TRUE.toString() %>" />
+			<portlet:param name="rootNodeName" value="<%= layoutPrototype.getName(locale) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			cssClass="export-layout-prototype layout-prototype-action"
+			image="export"
+			method="get"
+			url="<%= exportURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= GroupPermissionUtil.contains(permissionChecker, layoutPrototype.getGroup(), ActionKeys.EXPORT_IMPORT_LAYOUTS) %>">
+		<portlet:renderURL var="importURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+			<portlet:param name="struts_action" value="/layout_prototypes/import_layouts" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.IMPORT %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(layoutPrototype.getGroupId()) %>" />
+			<portlet:param name="privateLayout" value="<%= Boolean.TRUE.toString() %>" />
+			<portlet:param name="rootNodeName" value="<%= layoutPrototype.getName(locale) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			cssClass="import-layout-prototype layout-prototype-action"
+			image="add"
+			message="import"
+			method="get"
+			url="<%= importURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_prototypes/merge_alert.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_prototypes/merge_alert.jsp
new file mode 100644
index 0000000..a0a514c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_prototypes/merge_alert.jsp
@@ -0,0 +1,70 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layout_prototypes/init.jsp" %>
+
+<%
+LayoutPrototype layoutPrototype = (LayoutPrototype)request.getAttribute("edit_layout_prototype.jsp-layoutPrototype");
+String redirect = (String)request.getAttribute("edit_layout_prototype.jsp-redirect");
+long selPlid = GetterUtil.getLong((String)request.getAttribute("edit_layout_prototype.jsp-selPlid"));
+
+int mergeFailCount = SitesUtil.getMergeFailCount(layoutPrototype);
+%>
+
+<c:if test="<%= mergeFailCount > PropsValues.LAYOUT_PROTOTYPE_MERGE_FAIL_THRESHOLD %>">
+
+	<%
+	boolean merge = false;
+
+	String randomNamespace = PortalUtil.generateRandomKey(request, "portlet_layout_prototypes_merge_alert") + StringPool.UNDERLINE;
+
+	PortletURL portletURL = liferayPortletResponse.createActionURL();
+
+	portletURL.setParameter("redirect", redirect);
+	portletURL.setParameter("layoutPrototypeId",String.valueOf(layoutPrototype.getLayoutPrototypeId()));
+
+	if (selPlid > 0) {
+		portletURL.setParameter("struts_action", "/layouts_admin/edit_layouts");
+		portletURL.setParameter(Constants.CMD, "reset_merge_fail_count_and_merge");
+		portletURL.setParameter("selPlid", String.valueOf(selPlid));
+
+		merge = true;
+	}
+	else {
+		portletURL.setParameter("struts_action", "/layout_prototypes/edit_layout_prototype");
+		portletURL.setParameter(Constants.CMD, "reset_merge_fail_count");
+	}
+	%>
+
+	<span class="alert alert-block">
+		<liferay-ui:message arguments='<%= new Object[] {mergeFailCount, "page-template"} %>' key="the-propagation-of-changes-from-the-x-has-been-disabled-temporarily-after-x-errors" />
+
+		<liferay-ui:message arguments="page-template" key='<%= merge ? "click-reset-and-propagate-to-reset-the-failure-count-and-propagate-changes-from-the-x" : "click-reset-to-reset-the-failure-count-and-reenable-propagation" %>' />
+
+		<aui:button id='<%= randomNamespace + "resetButton" %>' value='<%= merge ? "reset-and-propagate" : "reset" %>' />
+	</span>
+
+	<aui:script use="aui-base">
+		var resetButton= A.one('#<%= randomNamespace %>resetButton');
+
+		resetButton.on(
+			'click',
+			function(event) {
+				submitForm(document.hrefFm, '<%= portletURL.toString() %>');
+			}
+		);
+	</aui:script>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_prototypes/toolbar.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_prototypes/toolbar.jsp
new file mode 100644
index 0000000..af2dd7d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_prototypes/toolbar.jsp
@@ -0,0 +1,39 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layout_prototypes/init.jsp" %>
+
+<%
+String toolbarItem = ParamUtil.getString(request, "toolbarItem");
+%>
+
+<aui:nav-bar>
+	<aui:nav>
+		<portlet:renderURL var="viewLayoutPrototypesURL">
+			<portlet:param name="struts_action" value="/layout_prototypes/view" />
+		</portlet:renderURL>
+
+		<c:if test="<%= PortalPermissionUtil.contains(permissionChecker, ActionKeys.ADD_LAYOUT_PROTOTYPE) %>">
+			<portlet:renderURL var="addLayoutPrototypeURL">
+				<portlet:param name="struts_action" value="/layout_prototypes/edit_layout_prototype" />
+				<portlet:param name="redirect" value="<%= viewLayoutPrototypesURL %>" />
+				<portlet:param name="backURL" value="<%= viewLayoutPrototypesURL %>" />
+			</portlet:renderURL>
+
+			<aui:nav-item href="<%= addLayoutPrototypeURL %>" iconCssClass="icon-plus" label="add" selected='<%= toolbarItem.equals("add") %>' />
+		</c:if>
+	</aui:nav>
+</aui:nav-bar>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_prototypes/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_prototypes/view.jsp
new file mode 100644
index 0000000..6d75e73
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_prototypes/view.jsp
@@ -0,0 +1,114 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layout_prototypes/init.jsp" %>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/layout_prototypes/view");
+%>
+
+<liferay-ui:error exception="<%= RequiredLayoutPrototypeException.class %>" message="you-cannot-delete-page-templates-that-are-used-by-a-page" />
+
+<liferay-util:include page="/html/portlet/layout_prototypes/toolbar.jsp" />
+
+<aui:form action="<%= portletURL.toString() %>" method="get" name="fm">
+	<liferay-portlet:renderURLParams varImpl="portletURL" />
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= portletURL.toString() %>" />
+
+	<liferay-ui:search-container
+		emptyResultsMessage="no-page-templates-were-found"
+		headerNames="name"
+		iteratorURL="<%= portletURL %>"
+		total="<%= LayoutPrototypeLocalServiceUtil.searchCount(company.getCompanyId(), null) %>"
+	>
+		<aui:input name="deleteLayoutPrototypesIds" type="hidden" />
+
+		<liferay-ui:search-container-results
+			results="<%= LayoutPrototypeLocalServiceUtil.search(company.getCompanyId(), null, searchContainer.getStart(), searchContainer.getEnd(), null) %>"
+		/>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.model.LayoutPrototype"
+			escapedModel="<%= true %>"
+			keyProperty="layoutPrototypeId"
+			modelVar="layoutPrototype"
+		>
+			<liferay-portlet:renderURL varImpl="rowURL">
+				<portlet:param name="struts_action" value="/layout_prototypes/edit_layout_prototype" />
+				<portlet:param name="redirect" value="<%= searchContainer.getIteratorURL().toString() %>" />
+				<portlet:param name="backURL" value="<%= searchContainer.getIteratorURL().toString() %>" />
+				<portlet:param name="layoutPrototypeId" value="<%= String.valueOf(layoutPrototype.getLayoutPrototypeId()) %>" />
+			</liferay-portlet:renderURL>
+
+			<liferay-ui:search-container-column-text
+				name="name"
+				orderable="<%= true %>"
+			>
+
+				<aui:a href="<%= rowURL.toString() %>"><%= layoutPrototype.getName(locale) %></aui:a>
+
+				<%
+				int mergeFailCount = SitesUtil.getMergeFailCount(layoutPrototype);
+				%>
+
+				<c:if test="<%= mergeFailCount > PropsValues.LAYOUT_PROTOTYPE_MERGE_FAIL_THRESHOLD %>">
+					<liferay-ui:icon
+						image="../messages/alert"
+						message='<%= LanguageUtil.format(pageContext, "the-propagation-of-changes-from-the-x-has-been-disabled-temporarily-after-x-errors", new Object[] {mergeFailCount, "page-template"}) %>'
+					/>
+				</c:if>
+			</liferay-ui:search-container-column-text>
+
+			<liferay-ui:search-container-column-text
+				href="<%= rowURL %>"
+				name="active"
+			>
+				<%= LanguageUtil.get(pageContext, layoutPrototype.isActive()? "yes" : "no") %>
+			</liferay-ui:search-container-column-text>
+
+			<liferay-ui:search-container-column-jsp
+				align="right"
+				path="/html/portlet/layout_prototypes/layout_prototype_action.jsp"
+			/>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script use="aui-base,liferay-util-window">
+	A.getBody().delegate(
+		'click',
+		function(event) {
+			event.preventDefault();
+
+			var link = event.currentTarget;
+			var title = link.get('text');
+
+			Liferay.Util.openWindow(
+				{
+					id: '<portlet:namespace />' + title,
+					title: title,
+					uri: link.attr('href')
+				}
+			);
+		},
+		'.layout-prototype-action a'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_set_prototypes/edit_layout_set_prototype.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_set_prototypes/edit_layout_set_prototype.jsp
new file mode 100644
index 0000000..ff49880
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_set_prototypes/edit_layout_set_prototype.jsp
@@ -0,0 +1,127 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layout_set_prototypes/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+String backURL = ParamUtil.getString(request, "backURL", redirect);
+
+LayoutSetPrototype layoutSetPrototype = (LayoutSetPrototype)request.getAttribute(WebKeys.LAYOUT_PROTOTYPE);
+
+if (layoutSetPrototype == null) {
+	layoutSetPrototype = new LayoutSetPrototypeImpl();
+
+	layoutSetPrototype.setNew(true);
+	layoutSetPrototype.setActive(true);
+}
+
+long layoutSetPrototypeId = BeanParamUtil.getLong(layoutSetPrototype, request, "layoutSetPrototypeId");
+
+boolean layoutsUpdateable = GetterUtil.getBoolean(layoutSetPrototype.getSettingsProperty("layoutsUpdateable"), true);
+
+Group group = themeDisplay.getSiteGroup();
+%>
+
+<c:if test="<%= !group.isLayoutSetPrototype() %>">
+	<liferay-util:include page="/html/portlet/layout_set_prototypes/toolbar.jsp">
+		<liferay-util:param name="toolbarItem" value='<%= layoutSetPrototype.isNew() ? "add" : StringPool.BLANK %>' />
+	</liferay-util:include>
+
+	<liferay-ui:header
+		backURL="<%= backURL %>"
+		localizeTitle="<%= layoutSetPrototype.isNew() %>"
+		title='<%= layoutSetPrototype.isNew() ? "new-site-template" : layoutSetPrototype.getName(locale) %>'
+	/>
+</c:if>
+
+<%
+request.setAttribute("edit_layout_set_prototype.jsp-layoutSetPrototype", layoutSetPrototype);
+request.setAttribute("edit_layout_set_prototype.jsp-redirect", currentURL);
+%>
+
+<liferay-util:include page="/html/portlet/layout_set_prototypes/merge_alert.jsp" />
+
+<aui:form method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveLayoutSetPrototype();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="layoutSetPrototypeId" type="hidden" value="<%= layoutSetPrototypeId %>" />
+
+	<aui:model-context bean="<%= layoutSetPrototype %>" model="<%= LayoutSetPrototype.class %>" />
+
+	<aui:fieldset>
+		<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" name="name" />
+
+		<aui:input name="description" />
+
+		<aui:input name="active" />
+
+		<aui:input helpMessage="allow-site-administrators-to-modify-pages-associated-with-this-site-template-help" label="allow-site-administrators-to-modify-pages-associated-with-this-site-template" name="layoutsUpdateable" type="checkbox" value="<%= layoutsUpdateable %>" />
+
+		<%
+		Set<String> servletContextNames = CustomJspRegistryUtil.getServletContextNames();
+
+		String customJspServletContextName = StringPool.BLANK;
+
+		if (layoutSetPrototype != null) {
+			UnicodeProperties settingsProperties = layoutSetPrototype.getSettingsProperties();
+
+			customJspServletContextName = GetterUtil.getString(settingsProperties.get("customJspServletContextName"));
+		}
+		%>
+
+		<c:if test="<%= !servletContextNames.isEmpty() %>">
+			<aui:select label="application-adapter" name="customJspServletContextName">
+				<aui:option label="none" />
+
+				<%
+				for (String servletContextName : servletContextNames) {
+				%>
+
+					<aui:option selected="<%= customJspServletContextName.equals(servletContextName) %>" value="<%= servletContextName %>"><%= CustomJspRegistryUtil.getDisplayName(servletContextName) %></aui:option>
+
+				<%
+				}
+				%>
+
+			</aui:select>
+		</c:if>
+
+		<aui:button-row>
+			<aui:button type="submit" />
+
+			<aui:button href="<%= redirect %>" type="cancel" />
+		</aui:button-row>
+	</aui:fieldset>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />saveLayoutSetPrototype() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (layoutSetPrototype.isNew()) ? Constants.ADD : Constants.UPDATE %>";
+
+		submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/layout_set_prototypes/edit_layout_set_prototype" /></portlet:actionURL>");
+	}
+</aui:script>
+
+<%
+if (!layoutSetPrototype.isNew()) {
+	PortalUtil.addPortletBreadcrumbEntry(request, layoutSetPrototype.getName(locale), null);
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit"), currentURL);
+}
+else {
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "add-page"), currentURL);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_set_prototypes/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_set_prototypes/error.jsp
new file mode 100644
index 0000000..bec3b9b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_set_prototypes/error.jsp
@@ -0,0 +1,25 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layout_set_prototypes/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= NoSuchLayoutSetPrototypeException.class %>" message="the-page-template-could-not-be-found" />
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_set_prototypes/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_set_prototypes/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_set_prototypes/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_set_prototypes/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_set_prototypes/init.jsp
new file mode 100644
index 0000000..2a54dcd
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_set_prototypes/init.jsp
@@ -0,0 +1,24 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.NoSuchLayoutSetPrototypeException" %><%@
+page import="com.liferay.portal.RequiredLayoutSetPrototypeException" %><%@
+page import="com.liferay.portal.service.LayoutSetPrototypeLocalServiceUtil" %><%@
+page import="com.liferay.portal.util.CustomJspRegistryUtil" %>
+
+<%@ include file="/html/portlet/layout_set_prototypes/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_set_prototypes/layout_set_prototype_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_set_prototypes/layout_set_prototype_action.jsp
new file mode 100644
index 0000000..1f584d4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_set_prototypes/layout_set_prototype_action.jsp
@@ -0,0 +1,130 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layout_set_prototypes/init.jsp" %>
+
+<%
+SearchContainer searchContainer = (SearchContainer)request.getAttribute("liferay-ui:search:searchContainer");
+
+String redirect = searchContainer.getIteratorURL().toString();
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+LayoutSetPrototype layoutSetPrototype = (LayoutSetPrototype)row.getObject();
+
+long layoutSetPrototypeId = layoutSetPrototype.getLayoutSetPrototypeId();
+
+Group group = layoutSetPrototype.getGroup();
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= LayoutSetPrototypePermissionUtil.contains(permissionChecker, layoutSetPrototypeId, ActionKeys.UPDATE) %>">
+
+		<%
+		ThemeDisplay siteThemeDisplay = (ThemeDisplay)themeDisplay.clone();
+
+		siteThemeDisplay.setScopeGroupId(group.getGroupId());
+
+		PortletURL siteAdministrationURL = PortalUtil.getSiteAdministrationURL(renderResponse, siteThemeDisplay);
+		%>
+
+		<c:if test="<%= siteAdministrationURL != null %>">
+			<liferay-ui:icon
+				image="edit"
+				message="manage"
+				method="get"
+				url="<%= siteAdministrationURL.toString() %>"
+			/>
+		</c:if>
+
+		<c:if test="<%= group.getPrivateLayoutsPageCount() > 0 %>">
+			<liferay-portlet:actionURL portletName="<%= PortletKeys.SITE_REDIRECTOR %>" var="viewPagesURL">
+				<portlet:param name="struts_action" value="/my_sites/view" />
+				<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+				<portlet:param name="privateLayout" value="<%= Boolean.TRUE.toString() %>" />
+			</liferay-portlet:actionURL>
+
+			<liferay-ui:icon
+				image="view"
+				message="view-pages"
+				target="_blank"
+				url="<%= viewPagesURL %>"
+			/>
+		</c:if>
+	</c:if>
+
+	<c:if test="<%= LayoutSetPrototypePermissionUtil.contains(permissionChecker, layoutSetPrototypeId, ActionKeys.PERMISSIONS) %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= LayoutSetPrototype.class.getName() %>"
+			modelResourceDescription="<%= layoutSetPrototype.getName(locale) %>"
+			resourcePrimKey="<%= String.valueOf(layoutSetPrototypeId) %>"
+			var="permissionsURL"
+			windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			method="get"
+			url="<%= permissionsURL %>"
+			useDialog="<%= true %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= LayoutSetPrototypePermissionUtil.contains(permissionChecker, layoutSetPrototypeId, ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/layout_set_prototypes/edit_layout_set_prototype" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="layoutSetPrototypeIds" value="<%= String.valueOf(layoutSetPrototypeId) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete
+			url="<%= deleteURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= GroupPermissionUtil.contains(permissionChecker, group.getGroupId(), ActionKeys.EXPORT_IMPORT_LAYOUTS) %>">
+		<portlet:renderURL var="exportPagesURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+			<portlet:param name="struts_action" value="/layouts_admin/export_layouts" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.EXPORT %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+			<portlet:param name="privateLayout" value="<%= Boolean.TRUE.toString() %>" />
+			<portlet:param name="rootNodeName" value="<%= layoutSetPrototype.getName(locale) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			cssClass="export-layoutset-prototype layoutset-prototype-action"
+			image="export"
+			method="get"
+			url="<%= exportPagesURL %>"
+		/>
+
+		<portlet:renderURL var="importPagesURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+			<portlet:param name="struts_action" value="/layouts_admin/import_layouts" />
+			<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+			<portlet:param name="privateLayout" value="<%= Boolean.TRUE.toString() %>" />
+			<portlet:param name="rootNodeName" value="<%= layoutSetPrototype.getName(locale) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			cssClass="import-layoutset-prototype layoutset-prototype-action"
+			image="../aui/arrow-up"
+			message="import"
+			method="get"
+			url="<%= importPagesURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_set_prototypes/merge_alert.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_set_prototypes/merge_alert.jsp
new file mode 100644
index 0000000..135dc7b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_set_prototypes/merge_alert.jsp
@@ -0,0 +1,111 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layout_set_prototypes/init.jsp" %>
+
+<%
+long groupId = GetterUtil.getLong((String)request.getAttribute("edit_layout_set_prototype.jsp-groupId"));
+LayoutSet layoutSet = (LayoutSet)request.getAttribute("edit_layout_set_prototype.jsp-layoutSet");
+LayoutSetPrototype layoutSetPrototype = (LayoutSetPrototype)request.getAttribute("edit_layout_set_prototype.jsp-layoutSetPrototype");
+String redirect = (String)request.getAttribute("edit_layout_set_prototype.jsp-redirect");
+
+int mergeFailCount = SitesUtil.getMergeFailCount(layoutSetPrototype);
+%>
+
+<c:if test="<%= mergeFailCount > PropsValues.LAYOUT_SET_PROTOTYPE_MERGE_FAIL_THRESHOLD %>">
+
+	<%
+	boolean merge = false;
+
+	String randomNamespace = PortalUtil.generateRandomKey(request, "portlet_layout_set_prototypes_merge_alert") + StringPool.UNDERLINE;
+
+	PortletURL portletURL = liferayPortletResponse.createActionURL();
+
+	portletURL.setParameter("redirect", redirect);
+	portletURL.setParameter("layoutSetPrototypeId",String.valueOf(layoutSetPrototype.getLayoutSetPrototypeId()));
+
+	if (groupId > 0) {
+		portletURL.setParameter("struts_action", "/sites_admin/edit_site");
+		portletURL.setParameter(Constants.CMD, "reset_merge_fail_count_and_merge");
+		portletURL.setParameter("groupId", String.valueOf(groupId));
+		portletURL.setParameter("privateLayoutSet", String.valueOf(layoutSet.isPrivateLayout()));
+
+		merge = true;
+	}
+	else {
+		portletURL.setParameter("struts_action", "/layout_set_prototypes/edit_layout_set_prototype");
+		portletURL.setParameter(Constants.CMD, "reset_merge_fail_count");
+	}
+	%>
+
+	<div class="alert alert-block">
+		<liferay-ui:message arguments='<%= new Object[] {mergeFailCount, "site-template"} %>' key="the-propagation-of-changes-from-the-x-has-been-disabled-temporarily-after-x-errors" />
+
+		<liferay-ui:message arguments="site-template" key='<%= merge ? "click-reset-and-propagate-to-reset-the-failure-count-and-propagate-changes-from-the-x" : "click-reset-to-reset-the-failure-count-and-reenable-propagation" %>' />
+
+		<aui:button id='<%= randomNamespace + "resetButton" %>' value='<%= merge ? "reset-and-propagate" : "reset" %>' />
+	</div>
+
+	<aui:script use="aui-base">
+		var resetButton= A.one('#<%= randomNamespace %>resetButton');
+
+		resetButton.on(
+			'click',
+			function(event) {
+				submitForm(document.hrefFm, '<%= portletURL.toString() %>');
+			}
+		);
+	</aui:script>
+</c:if>
+
+<%
+List<Layout> mergeFailFriendlyURLLayouts = SitesUtil.getMergeFailFriendlyURLLayouts(layoutSet);
+%>
+
+<c:if test="<%= !mergeFailFriendlyURLLayouts.isEmpty() %>">
+	<div class="alert alert-block">
+		<liferay-ui:message key="some-pages-from-the-site-template-cannot-be-propagated-because-their-friendly-urls-conflict-with-the-following-pages" />
+
+		<liferay-ui:message key="modify-the-friendly-url-of-the-pages-to-allow-their-propagation-from-the-site-template" />
+
+		<ul>
+			<liferay-portlet:renderURL portletName="<%= PortletKeys.GROUP_PAGES %>" varImpl="editLayoutsURL">
+				<portlet:param name="struts_action" value="/group_pages/edit_layouts" />
+				<portlet:param name="tabs1" value='<%= layoutSet.isPrivateLayout() ? "private-pages" : "public-pages" %>' />
+				<portlet:param name="redirect" value="<%= redirect %>" />
+				<portlet:param name="closeRedirect" value="<%= redirect %>" />
+				<portlet:param name="backURL" value="<%= redirect %>" />
+				<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+			</liferay-portlet:renderURL>
+
+			<%
+			for (Layout mergeFailFriendlyURLLayout : mergeFailFriendlyURLLayouts) {
+				editLayoutsURL.setParameter("selPlid", String.valueOf(mergeFailFriendlyURLLayout.getPlid()));
+			%>
+
+				<li>
+					<aui:a href="<%= editLayoutsURL.toString() %>">
+						<%= mergeFailFriendlyURLLayout.getName(locale) %>
+					</aui:a>
+				</li>
+
+			<%
+			}
+			%>
+
+		</ul>
+	</div>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_set_prototypes/toolbar.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_set_prototypes/toolbar.jsp
new file mode 100644
index 0000000..f97c9f2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_set_prototypes/toolbar.jsp
@@ -0,0 +1,39 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layout_set_prototypes/init.jsp" %>
+
+<%
+String toolbarItem = ParamUtil.getString(request, "toolbarItem");
+%>
+
+<aui:nav-bar>
+	<aui:nav>
+		<portlet:renderURL var="viewLayoutSetPrototypesURL">
+			<portlet:param name="struts_action" value="/layout_set_prototypes/view" />
+		</portlet:renderURL>
+
+		<c:if test="<%= PortalPermissionUtil.contains(permissionChecker, ActionKeys.ADD_LAYOUT_SET_PROTOTYPE) %>">
+			<portlet:renderURL var="addLayoutSetPrototypeURL">
+				<portlet:param name="struts_action" value="/layout_set_prototypes/edit_layout_set_prototype" />
+				<portlet:param name="redirect" value="<%= viewLayoutSetPrototypesURL %>" />
+				<portlet:param name="backURL" value="<%= viewLayoutSetPrototypesURL %>" />
+			</portlet:renderURL>
+
+			<aui:nav-item href="<%= addLayoutSetPrototypeURL %>" iconCssClass="icon-plus" label="add" selected='<%= toolbarItem.equals("add") %>' />
+		</c:if>
+	</aui:nav>
+</aui:nav-bar>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_set_prototypes/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_set_prototypes/view.jsp
new file mode 100644
index 0000000..e319264
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layout_set_prototypes/view.jsp
@@ -0,0 +1,122 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layout_set_prototypes/init.jsp" %>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/layout_set_prototypes/view");
+%>
+
+<liferay-ui:error exception="<%= RequiredLayoutSetPrototypeException.class %>" message="you-cannot-delete-site-templates-that-are-used-by-a-site" />
+
+<liferay-util:include page="/html/portlet/layout_set_prototypes/toolbar.jsp" />
+
+<aui:form action="<%= portletURL.toString() %>" method="get" name="fm">
+	<liferay-portlet:renderURLParams varImpl="portletURL" />
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= portletURL.toString() %>" />
+
+	<liferay-ui:search-container
+		emptyResultsMessage="no-site-templates-were-found"
+		headerNames="name"
+		iteratorURL="<%= portletURL %>"
+		total="<%= LayoutSetPrototypeLocalServiceUtil.searchCount(company.getCompanyId(), null) %>"
+	>
+		<aui:input name="deleteLayoutSetPrototypesIds" type="hidden" />
+
+		<liferay-ui:search-container-results
+			results="<%= LayoutSetPrototypeLocalServiceUtil.search(company.getCompanyId(), null, searchContainer.getStart(), searchContainer.getEnd(), null) %>"
+		/>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.model.LayoutSetPrototype"
+			escapedModel="<%= true %>"
+			keyProperty="layoutSetPrototypeId"
+			modelVar="layoutSetPrototype"
+		>
+
+			<%
+			String rowURL = null;
+
+			ThemeDisplay siteThemeDisplay = (ThemeDisplay)themeDisplay.clone();
+
+			siteThemeDisplay.setScopeGroupId(layoutSetPrototype.getGroupId());
+
+			PortletURL siteAdministrationURL = PortalUtil.getSiteAdministrationURL(renderResponse, siteThemeDisplay);
+
+			if (siteAdministrationURL != null) {
+				rowURL = siteAdministrationURL.toString();
+			}
+			%>
+
+			<liferay-ui:search-container-column-text
+				name="name"
+				orderable="<%= true %>"
+			>
+
+				<aui:a href="<%= rowURL.toString() %>"><%= layoutSetPrototype.getName(locale) %></aui:a>
+
+				<%
+				int mergeFailCount = SitesUtil.getMergeFailCount(layoutSetPrototype);
+				%>
+
+				<c:if test="<%= mergeFailCount > PropsValues.LAYOUT_SET_PROTOTYPE_MERGE_FAIL_THRESHOLD %>">
+					<liferay-ui:icon
+						image="../messages/alert"
+						message='<%= LanguageUtil.format(pageContext, "the-propagation-of-changes-from-the-x-has-been-disabled-temporarily-after-x-errors", new Object[] {mergeFailCount, "site-template"}) %>'
+					/>
+				</c:if>
+			</liferay-ui:search-container-column-text>
+
+			<liferay-ui:search-container-column-text
+				href="<%= rowURL %>"
+				name="active"
+			>
+				<%= LanguageUtil.get(pageContext, layoutSetPrototype.isActive()? "yes" : "no") %>
+			</liferay-ui:search-container-column-text>
+
+			<liferay-ui:search-container-column-jsp
+				align="right"
+				path="/html/portlet/layout_set_prototypes/layout_set_prototype_action.jsp"
+			/>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script use="aui-base,liferay-util-window">
+	A.getBody().delegate(
+		'click',
+		function(event) {
+			event.preventDefault();
+
+			var link = event.currentTarget;
+			var title = link.get('text');
+
+			Liferay.Util.openWindow(
+				{
+					id: '<portlet:namespace />' + title,
+					title: title,
+					uri: link.attr('href')
+				}
+			);
+		},
+		'.layoutset-prototype-action a'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/add_layout.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/add_layout.jsp
new file mode 100644
index 0000000..16c009d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/add_layout.jsp
@@ -0,0 +1,255 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%@ include file="/html/portlet/layouts_admin/init_attributes.jspf" %>
+
+<%
+long parentPlid = LayoutConstants.DEFAULT_PLID;
+long parentLayoutId = LayoutConstants.DEFAULT_PARENT_LAYOUT_ID;
+
+if (layout.isTypeControlPanel()) {
+	if (selPlid != 0) {
+		selLayout = LayoutLocalServiceUtil.getLayout(selPlid);
+
+		privateLayout = selLayout.isPrivateLayout();
+		parentPlid = selLayout.getPlid();
+		parentLayoutId = selLayout.getLayoutId();
+	}
+	else {
+		privateLayout = GetterUtil.getBoolean(request.getAttribute("edit_pages.jsp-privateLayout"));
+	}
+}
+else {
+	selLayout = layout;
+
+	privateLayout = selLayout.isPrivateLayout();
+	parentPlid = layout.getParentPlid();
+	parentLayoutId = layout.getParentLayoutId();
+}
+%>
+
+<portlet:actionURL var="editLayoutActionURL" windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>">
+	<portlet:param name="struts_action" value="/layouts_admin/edit_layouts" />
+</portlet:actionURL>
+
+<portlet:renderURL var="editLayoutRenderURL" windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>">
+	<portlet:param name="struts_action" value="/layouts_admin/edit_layouts" />
+</portlet:renderURL>
+
+<aui:form action="<%= editLayoutActionURL %>" enctype="multipart/form-data" method="post" name="addPageFm" onSubmit="event.preventDefault()">
+	<aui:input id="addLayoutCMD" name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.ADD %>" />
+	<aui:input id="addLayoutRedirect" name="redirect" type="hidden" value="<%= layout.isTypeControlPanel() ? currentURL : editLayoutRenderURL.toString() %>" />
+	<aui:input id="addLayoutGroupId" name="groupId" type="hidden" value="<%= groupId %>" />
+	<aui:input id="addLayoutPrivateLayout" name="privateLayout" type="hidden" value="<%= privateLayout %>" />
+	<aui:input id="addLayoutParentPlid" name="parentPlid" type="hidden" value="<%= parentPlid %>" />
+	<aui:input id="addLayoutParentLayoutId" name="parentLayoutId" type="hidden" value="<%= parentLayoutId %>" />
+	<aui:input id="addLayoutType" name="type" type="hidden" value="portlet" />
+	<aui:input id="addLayoutPrototypeId" name="layoutPrototypeId" type="hidden" value="" />
+	<aui:input id="addLayoutExplicitCreation" name="explicitCreation" type="hidden" value="<%= true %>" />
+
+	<liferay-ui:error exception="<%= LayoutTypeException.class %>">
+
+		<%
+		LayoutTypeException lte = (LayoutTypeException)errorException;
+
+		String type = BeanParamUtil.getString(selLayout, request, "type");
+		%>
+
+		<c:if test="<%= lte.getType() == LayoutTypeException.FIRST_LAYOUT %>">
+			<liferay-ui:message arguments='<%= Validator.isNull(lte.getLayoutType()) ? type : "layout.types." + lte.getLayoutType() %>' key="the-first-page-cannot-be-of-type-x" />
+		</c:if>
+
+		<c:if test="<%= lte.getType() == LayoutTypeException.NOT_PARENTABLE %>">
+			<liferay-ui:message arguments="<%= type %>" key="pages-of-type-x-cannot-have-child-pages" />
+		</c:if>
+	</liferay-ui:error>
+
+	<liferay-ui:error exception="<%= LayoutNameException.class %>" message="please-enter-a-valid-name" />
+
+	<liferay-ui:error exception="<%= RequiredLayoutException.class %>">
+
+		<%
+		RequiredLayoutException rle = (RequiredLayoutException)errorException;
+		%>
+
+		<c:if test="<%= rle.getType() == RequiredLayoutException.AT_LEAST_ONE %>">
+			<liferay-ui:message key="you-must-have-at-least-one-page" />
+		</c:if>
+	</liferay-ui:error>
+
+	<aui:model-context model="<%= Layout.class %>" />
+
+	<aui:fieldset>
+		<div class="row-fluid">
+			<div class="span12">
+				<aui:input id="addLayoutName" name="name" />
+
+				<aui:input id="addLayoutHidden" label="hide-from-navigation-menu" name="hidden" />
+
+				<aui:fieldset cssClass="template-selector" label="type">
+					<aui:nav cssClass="nav-list" id="templateList">
+						<c:if test='<%= ArrayUtil.contains(PropsValues.LAYOUT_TYPES, "portlet") %>'>
+							<aui:nav-item cssClass="lfr-page-template" data-search='<%= HtmlUtil.escape(LanguageUtil.get(pageContext, "empty-page")) %>'>
+								<div class="active lfr-page-template-title toggler-header toggler-header-expanded" data-type="portlet">
+									<aui:input checked="<%= true %>" id="addLayoutSelectedPageTemplateBlank" label="empty-page" name="selectedPageTemplate" type="radio" />
+
+									<div class="lfr-page-template-description">
+										<small><%= LanguageUtil.get(pageContext, "empty-page-description" ) %></small>
+									</div>
+								</div>
+
+								<div class="lfr-page-template-options toggler-content toggler-content-expanded">
+
+									<%
+									String layoutTemplateId = PropsValues.DEFAULT_LAYOUT_TEMPLATE_ID;
+									String layoutTemplateIdPrefix = "addLayout";
+
+									Theme selTheme = layout.getTheme();
+
+									List<LayoutTemplate> layoutTemplates = LayoutTemplateLocalServiceUtil.getLayoutTemplates(selTheme.getThemeId());
+									%>
+
+									<%@ include file="/html/portlet/layouts_admin/layout/layout_templates_list.jspf" %>
+								</div>
+							</aui:nav-item>
+						</c:if>
+
+						<%
+						List<LayoutPrototype> layoutPrototypes = LayoutPrototypeServiceUtil.search(company.getCompanyId(), Boolean.TRUE, null);
+
+						for (LayoutPrototype layoutPrototype : layoutPrototypes) {
+							String name = HtmlUtil.escape(layoutPrototype.getName(user.getLanguageId()));
+						%>
+
+							<aui:nav-item cssClass="lfr-page-template" data-search="<%= name %>">
+								<div class="lfr-page-template-title toggler-header toggler-header-collapsed" data-prototype-id="<%= layoutPrototype.getLayoutPrototypeId() %>">
+									<aui:input id='<%= "addLayoutSelectedPageTemplate" + layoutPrototype.getUuid() %>' label="<%= name %>" name="selectedPageTemplate" type="radio" />
+
+									<div class="lfr-page-template-description">
+										<small><%= HtmlUtil.escape(layoutPrototype.getDescription()) %></small>
+									</div>
+								</div>
+
+								<div class="lfr-page-template-options toggler-content toggler-content-collapsed">
+									<aui:input id='<%= "addLayoutLayoutPrototypeLinkEnabled" + layoutPrototype.getUuid() %>' label="automatically-apply-changes-done-to-the-page-template" name="layoutPrototypeLinkEnabled" type="checkbox" />
+								</div>
+							</aui:nav-item>
+
+						<%
+						}
+						%>
+
+						<%
+						liferayPortletRequest.setAttribute(WebKeys.LAYOUT_LISTER_LIST, layoutView.getList());
+
+						for (int i = 0; i < PropsValues.LAYOUT_TYPES.length; i++) {
+							if (PropsValues.LAYOUT_TYPES[i].equals("portlet")) {
+								continue;
+							}
+						%>
+
+							<aui:nav-item cssClass="lfr-page-template" data-search='<%= LanguageUtil.get(pageContext, "layout.types." + PropsValues.LAYOUT_TYPES[i]) %>'>
+								<div class="lfr-page-template-title toggler-header toggler-header-collapsed" data-type="<%= PropsValues.LAYOUT_TYPES[i] %>">
+									<aui:input id='<%= "addLayoutSelectedPageTemplate" + PropsValues.LAYOUT_TYPES[i] %>' label='<%= "layout.types." + PropsValues.LAYOUT_TYPES[i] %>' name="selectedPageTemplate" type="radio" />
+
+									<div class="lfr-page-template-description">
+										<small><%= LanguageUtil.get(pageContext, "layout.types." + PropsValues.LAYOUT_TYPES[i] + ".description" ) %></small>
+									</div>
+								</div>
+
+								<div class="lfr-page-template-options toggler-content toggler-content-collapsed">
+									<liferay-util:include page="<%= StrutsUtil.TEXT_HTML_DIR + PortalUtil.getLayoutEditPage(PropsValues.LAYOUT_TYPES[i]) %>" />
+								</div>
+							</aui:nav-item>
+
+						<%
+						}
+						%>
+
+						<c:if test='<%= ArrayUtil.contains(PropsValues.LAYOUT_TYPES, "portlet") %>'>
+							<aui:nav-item cssClass="lfr-page-template" data-search="portlet">
+								<div class="lfr-page-template-title toggler-header toggler-header-collapsed" data-type="portlet">
+									<aui:input id="addLayoutSelectedPageTemplateCopyOfPage" label="copy-of-a-page" name="selectedPageTemplate" type="radio" />
+
+									<div class="lfr-page-template-description">
+										<small><%= LanguageUtil.get(pageContext, "copy-of-a-page-description" ) %></small>
+									</div>
+								</div>
+
+								<div class="lfr-page-template-options toggler-content toggler-content-collapsed">
+									<liferay-util:include page="/html/portal/layout/edit/portlet_applications.jsp">
+										<liferay-util:param name="copyLayoutIdPrefix" value="addLayout" />
+									</liferay-util:include>
+								</div>
+							</aui:nav-item>
+						</c:if>
+					</aui:nav>
+				</aui:fieldset>
+			</div>
+		<div>
+	</aui:fieldset>
+
+	<aui:button-row cssClass="lfr-add-page-toolbar">
+		<aui:button id="addLayoutSubmit" type="submit" value="add-page" />
+
+		<aui:button id="addLayoutCancel" name="cancelAddOperation" value="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<c:if test="<%= portletName.equals(PortletKeys.DOCKBAR) %>">
+
+	<%
+	Layout addedLayout = (Layout)SessionMessages.get(liferayPortletRequest, portletDisplay.getId() + "pageAdded");
+	%>
+
+	<c:if test="<%= addedLayout != null && !addedLayout.isHidden() %>">
+
+		<%
+		NavItem navItem = new NavItem(request, addedLayout, null);
+		%>
+
+		<aui:script use="aui-base">
+			Liferay.fire('dockbaraddpage:addPage',
+				{
+					data: {
+						layoutId: <%= addedLayout.getLayoutId() %>,
+						parentLayoutId: <%= addedLayout.getParentLayoutId() %>,
+						title: A.Lang.String.escapeHTML('<%= navItem.getName() %>'),
+						url: '<%= navItem.getURL() %>'
+					}
+				}
+			);
+		</aui:script>
+	</c:if>
+</c:if>
+
+<aui:script use="liferay-dockbar-add-page">
+	new Liferay.Dockbar.AddPage(
+		{
+			createPageMessage: '<%= LanguageUtil.get(pageContext, "loading") %>',
+			focusItem: A.one('#<portlet:namespace />addLayoutName'),
+			namespace: '<portlet:namespace />',
+			nodeList: A.one('#<portlet:namespace />templateList'),
+			nodeSelector: '.lfr-page-template',
+			parentLayoutId: <%= parentLayoutId %>,
+			refresh: <%= layout.isTypeControlPanel() %>,
+			selected: !A.one('#<portlet:namespace />addPageFm').ancestor().hasClass('hide'),
+			toggleOnCancel: <%= portletName.equals(PortletKeys.DOCKBAR) %>
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/asset/full_content.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/asset/full_content.jsp
new file mode 100644
index 0000000..10b7507
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/asset/full_content.jsp
@@ -0,0 +1,37 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+LayoutRevision layoutRevision = (LayoutRevision)request.getAttribute(WebKeys.LAYOUT_REVISION);
+
+LayoutBranch layoutBranch = layoutRevision.getLayoutBranch();
+
+LayoutSetBranch layoutSetBranch = LayoutSetBranchLocalServiceUtil.getLayoutSetBranch(layoutRevision.getLayoutSetBranchId());
+
+Layout targetLayout = LayoutLocalServiceUtil.getLayout(layoutRevision.getPlid());
+
+String layoutFriendlyURL = PortalUtil.getLayoutFriendlyURL(targetLayout, themeDisplay);
+%>
+
+<strong><liferay-ui:message key="page" />:</strong> <a href="<%= layoutFriendlyURL + "?layoutSetBranchId=" + layoutRevision.getLayoutSetBranchId() + "&layoutRevisionId=" + layoutRevision.getLayoutRevisionId() %>"><%= targetLayout.getHTMLTitle(locale) %></a><br />
+
+<strong><liferay-ui:message key="site-pages-variation" />:</strong> <%= LanguageUtil.get(locale, HtmlUtil.escape(layoutSetBranch.getName())) %><br />
+
+<strong><liferay-ui:message key="page-variation" />:</strong> <%= LanguageUtil.get(locale, HtmlUtil.escape(layoutBranch.getName())) %><br />
+
+<strong><liferay-ui:message key="revision-id" />:</strong> <%= layoutRevision.getLayoutRevisionId() %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/css/.sass-cache/main.css
new file mode 100644
index 0000000..4fcc742
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/css/.sass-cache/main.css
@@ -0,0 +1,267 @@
+.portlet-communities .lfr-theme-list li, .portlet-users-admin .lfr-theme-list li {
+  float: left;
+  margin: 0 1.3em 1.3em 0;
+  text-align: center; }
+.portlet-communities .layout-set-results, .portlet-users-admin .layout-set-results {
+  min-height: 300px; }
+.portlet-communities .theme-title .field-content, .portlet-users-admin .theme-title .field-content {
+  margin: 0; }
+.portlet-communities .theme-entry, .portlet-users-admin .theme-entry {
+  cursor: pointer;
+  float: left;
+  height: 96px;
+  margin: 2px;
+  padding: 0.3em;
+  text-align: center;
+  text-decoration: none; }
+  .portlet-communities .theme-entry:hover, .portlet-communities .theme-entry:hover label, .portlet-users-admin .theme-entry:hover, .portlet-users-admin .theme-entry:hover label {
+    color: #369; }
+  .portlet-communities .theme-entry:hover .theme-thumbnail, .portlet-users-admin .theme-entry:hover .theme-thumbnail {
+    border-color: #369; }
+.portlet-communities .theme-thumbnail, .portlet-users-admin .theme-thumbnail {
+  border: 1px solid #CCC;
+  height: 68px;
+  width: 85px; }
+.portlet-communities .lfr-available-themes h3, .portlet-users-admin .lfr-available-themes h3 {
+  margin: 0;
+  overflow: hidden; }
+.portlet-communities .lfr-available-themes .lfr-theme-list, .portlet-users-admin .lfr-available-themes .lfr-theme-list {
+  margin-top: 0.7em; }
+.portlet-communities .lfr-available-themes .install-themes, .portlet-users-admin .lfr-available-themes .install-themes {
+  float: right;
+  font-size: 11px; }
+.portlet-communities .lfr-theme-list .theme-details dd, .portlet-users-admin .lfr-theme-list .theme-details dd {
+  margin: 0; }
+.portlet-communities .theme-details dl, .portlet-users-admin .theme-details dl {
+  margin-bottom: 1em; }
+.portlet-communities .theme-details dt, .portlet-users-admin .theme-details dt {
+  font-weight: bold;
+  margin-top: 1em; }
+.portlet-communities .color-schemes, .portlet-users-admin .color-schemes {
+  clear: both; }
+  .portlet-communities .color-schemes .lfr-panel-content, .portlet-users-admin .color-schemes .lfr-panel-content {
+    overflow: hidden; }
+.portlet-communities .selected-color-scheme img, .portlet-users-admin .selected-color-scheme img {
+  border: 3px solid #369; }
+.portlet-communities .lfr-header-row, .portlet-users-admin .lfr-header-row {
+  margin-bottom: 0.5em; }
+  .portlet-communities .lfr-header-row .icon-add, .portlet-communities .lfr-header-row .icon-copy, .portlet-communities .lfr-header-row .icon-delete, .portlet-communities .lfr-header-row .icon-export, .portlet-communities .lfr-header-row .icon-permissions, .portlet-communities .lfr-header-row .icon-search, .portlet-users-admin .lfr-header-row .icon-add, .portlet-users-admin .lfr-header-row .icon-copy, .portlet-users-admin .lfr-header-row .icon-delete, .portlet-users-admin .lfr-header-row .icon-export, .portlet-users-admin .lfr-header-row .icon-permissions, .portlet-users-admin .lfr-header-row .icon-search {
+    background: url() no-repeat 0 0; }
+  .portlet-communities .lfr-header-row .icon-add, .portlet-users-admin .lfr-header-row .icon-add {
+    background-image: url(@theme_image_path@/common/add.png); }
+  .portlet-communities .lfr-header-row .icon-copy, .portlet-users-admin .lfr-header-row .icon-copy {
+    background-image: url(@theme_image_path@/common/copy.png); }
+  .portlet-communities .lfr-header-row .icon-delete, .portlet-users-admin .lfr-header-row .icon-delete {
+    background-image: url(@theme_image_path@/common/delete.png); }
+  .portlet-communities .lfr-header-row .icon-export, .portlet-users-admin .lfr-header-row .icon-export {
+    background-image: url(@theme_image_path@/common/export.png); }
+  .portlet-communities .lfr-header-row .icon-permissions, .portlet-users-admin .lfr-header-row .icon-permissions {
+    background-image: url(@theme_image_path@/common/permissions.png); }
+  .portlet-communities .lfr-header-row .icon-search, .portlet-users-admin .lfr-header-row .icon-search {
+    background-image: url(@theme_image_path@/common/search.png); }
+.portlet-communities .button-holder.edit-toolbar, .portlet-users-admin .button-holder.edit-toolbar {
+  margin: 0; }
+.portlet-communities .manage-layout-content, .portlet-communities .manage-sitemap-content, .portlet-users-admin .manage-layout-content, .portlet-users-admin .manage-sitemap-content {
+  padding: 0; }
+.portlet-communities .edit-layout-form, .portlet-communities .edit-layoutset-form, .portlet-users-admin .edit-layout-form, .portlet-users-admin .edit-layoutset-form {
+  padding: 0.5em; }
+  .portlet-communities .edit-layout-form .layout-description textarea, .portlet-communities .edit-layoutset-form .layout-description textarea, .portlet-users-admin .edit-layout-form .layout-description textarea, .portlet-users-admin .edit-layoutset-form .layout-description textarea {
+    height: 100px;
+    width: 350px; }
+.portlet-communities .customization-settings .portlet-column, .portlet-users-admin .customization-settings .portlet-column {
+  border: 1px solid #CCC;
+  margin: 2px; }
+  .portlet-communities .customization-settings .portlet-column .portlet-column-content, .portlet-users-admin .customization-settings .portlet-column .portlet-column-content {
+    text-align: center; }
+  .portlet-communities .customization-settings .portlet-column h1, .portlet-users-admin .customization-settings .portlet-column h1 {
+    font-size: 2em;
+    font-weight: bold; }
+.portlet-communities .layoutset-branch, .portlet-users-admin .layoutset-branch {
+  color: #FFFFFF;
+  display: inline-block;
+  font-weight: bold;
+  padding: 0.3em;
+  text-shadow: 1px 1px #000; }
+.portlet-communities .site-membership-type, .portlet-users-admin .site-membership-type {
+  font-weight: bold;
+  margin-bottom: 10px; }
+.portlet-communities .membership-info, .portlet-communities .description, .portlet-users-admin .membership-info, .portlet-users-admin .description {
+  margin-bottom: 20px; }
+.portlet-communities .membership-info .members-info a, .portlet-users-admin .membership-info .members-info a {
+  padding-right: 5px; }
+.portlet-communities .membership-info .membership-requests, .portlet-users-admin .membership-info .membership-requests {
+  padding-left: 10px; }
+.portlet-communities .membership-info dl, .portlet-communities .membership-info dt, .portlet-communities .membership-info dd, .portlet-users-admin .membership-info dl, .portlet-users-admin .membership-info dt, .portlet-users-admin .membership-info dd {
+  display: inline;
+  margin: 0; }
+.portlet-communities .membership-info dt, .portlet-users-admin .membership-info dt {
+  font-weight: bold;
+  margin-left: 10px; }
+  .portlet-communities .membership-info dt.first, .portlet-users-admin .membership-info dt.first {
+    margin-left: 0; }
+.portlet-communities .membership-info dd, .portlet-users-admin .membership-info dd {
+  border-right: 1px solid #999;
+  padding-right: 10px; }
+  .portlet-communities .membership-info dd.last, .portlet-users-admin .membership-info dd.last {
+    border-width: 0; }
+.portlet-communities .site-categorization, .portlet-users-admin .site-categorization {
+  margin-bottom: 20px; }
+.portlet-communities .taglib-asset-categories-summary, .portlet-communities .taglib-asset-tags-summary, .portlet-users-admin .taglib-asset-categories-summary, .portlet-users-admin .taglib-asset-tags-summary {
+  display: block; }
+.portlet-communities .layout-set-info, .portlet-users-admin .layout-set-info {
+  margin-bottom: 15px; }
+.portlet-communities .organizations-msg-info, .portlet-users-admin .organizations-msg-info {
+  background-color: #FEFEFE;
+  background-image: url(@theme_image_path@/common/organization_icon.png);
+  border-color: #BBB; }
+.portlet-communities .process-list .background-task-status-column, .portlet-users-admin .process-list .background-task-status-column {
+  width: 700px; }
+  .portlet-communities .process-list .background-task-status-column .background-task-status-message, .portlet-users-admin .process-list .background-task-status-column .background-task-status-message {
+    margin-top: 1em; }
+    .portlet-communities .process-list .background-task-status-column .background-task-status-message .error-list-items li, .portlet-users-admin .process-list .background-task-status-column .background-task-status-message .error-list-items li {
+      list-style: disc inside; }
+  .portlet-communities .process-list .background-task-status-column .details-link, .portlet-users-admin .process-list .background-task-status-column .details-link {
+    margin-left: 1em; }
+  .portlet-communities .process-list .background-task-status-column .publish-error, .portlet-users-admin .process-list .background-task-status-column .publish-error {
+    margin-bottom: 0; }
+  .portlet-communities .process-list .background-task-status-column .toggler-header-collapsed:after, .portlet-users-admin .process-list .background-task-status-column .toggler-header-collapsed:after {
+    content: " ?"; }
+  .portlet-communities .process-list .background-task-status-column .toggler-header-expanded:after, .portlet-users-admin .process-list .background-task-status-column .toggler-header-expanded:after {
+    content: " ?"; }
+  .portlet-communities .process-list .background-task-status-column .background-task-status-in-progress, .portlet-users-admin .process-list .background-task-status-column .background-task-status-in-progress {
+    float: left;
+    margin-right: 1em; }
+  .portlet-communities .process-list .background-task-status-column .progress, .portlet-users-admin .process-list .background-task-status-column .progress {
+    margin-bottom: 0.3em; }
+  .portlet-communities .process-list .background-task-status-column .progress-current-item, .portlet-users-admin .process-list .background-task-status-column .progress-current-item {
+    font-size: 0.7em; }
+
+.tree-node-content .layout-branch-name {
+  color: #AAA; }
+.tree-node-content .incomplete-layout {
+  color: #CCC; }
+
+.tree-drag-helper a {
+  text-decoration: none; }
+
+.tree-drag-helper-label {
+  margin-top: -1px; }
+
+.tree-pages .tree-node-selected .tree-label a {
+  color: #0090D9;
+  cursor: move; }
+
+.lfr-page-locked .tree-icon {
+  background-image: url(@theme_image_path@/trees/page_locked.png); }
+
+.export-dialog-tree .content-options {
+  margin-bottom: 1em; }
+  .export-dialog-tree .content-options legend {
+    border-top: solid #E5E5E5;
+    border-width: 1px 0 0;
+    font-size: 1em;
+    font-weight: normal;
+    line-height: 1em;
+    margin-bottom: 0.5em;
+    padding-top: 0.75em; }
+.export-dialog-tree input.file-selector {
+  display: block;
+  margin: 0.5em 0 1.5em; }
+.export-dialog-tree .import-file-details {
+  margin: 0 1em 0 1.5em; }
+  .export-dialog-tree .import-file-details dt {
+    clear: left;
+    float: left;
+    font-weight: bold;
+    margin-right: 1em; }
+.export-dialog-tree .layout-variation-name {
+  color: #999; }
+.export-dialog-tree .modify-link {
+  text-decoration: underline; }
+.export-dialog-tree .options-group .options {
+  background-color: #FAFAFA;
+  border: solid #E4E4E4;
+  border-width: 1px 0;
+  margin-top: 20px; }
+.export-dialog-tree .options-group .select-options {
+  margin-left: 20px;
+  margin-top: 20px; }
+.export-dialog-tree .page-not-exportable {
+  color: #933; }
+.export-dialog-tree .portlet-list {
+  padding: 10px 0; }
+  .export-dialog-tree .portlet-list li.tree-item > ul {
+    margin-bottom: 1em; }
+.export-dialog-tree .options ul.portlet-list > li.tree-item {
+  padding-left: 0; }
+.export-dialog-tree .selected-labels {
+  color: #999;
+  font-style: italic;
+  margin-left: 0.5em;
+  margin-right: 0.5em; }
+.export-dialog-tree .selected-pages td.col-1 {
+  padding-top: 5px; }
+.export-dialog-tree .selected-pages th.col-3 {
+  text-align: left;
+  width: 74%; }
+.export-dialog-tree .selected-pages-option .field-content {
+  display: inline; }
+.export-dialog-tree ul.unstyled ul {
+  list-style: none; }
+
+.lfr-export-dialog .portlet-data-section .control-label, .lfr-export-dialog .portlet-type-data-section .control-label {
+  font-weight: bold; }
+.lfr-export-dialog .portlet-data-section .date-range-options, .lfr-export-dialog .portlet-type-data-section .date-range-options {
+  margin-bottom: 1em; }
+  .lfr-export-dialog .portlet-data-section .date-range-options legend, .lfr-export-dialog .portlet-type-data-section .date-range-options legend {
+    border: 0;
+    display: block;
+    font-size: 1em;
+    font-weight: normal;
+    line-height: 1em;
+    margin-bottom: 0.2em;
+    padding-top: 1em; }
+.lfr-export-dialog .portlet-data-section .relative-range, .lfr-export-dialog .portlet-type-data-section .relative-range {
+  width: 165px; }
+.lfr-export-dialog .portlet-data-section legend, .lfr-export-dialog .portlet-type-data-section legend {
+  display: none; }
+.lfr-export-dialog .upload-list li {
+  list-style: disc inside; }
+.lfr-export-dialog .upload-list .error-info {
+  font-size: 0.8em;
+  font-style: italic;
+  margin-left: 0.5em; }
+
+.lfr-root-node .tree-icon a, .lfr-root-node .tree-label a {
+  cursor: pointer; }
+
+.lfr-tree-loading-icon {
+  margin: 0 auto;
+  padding-top: 5px; }
+
+.lfr-tree-controls {
+  width: 165px; }
+  .lfr-tree-controls div, .lfr-tree-controls a {
+    float: left; }
+
+.lfr-tree-controls-label {
+  line-height: 17px;
+  padding: 0 2px;
+  text-decoration: none; }
+
+.lfr-tree-controls-item {
+  padding: 0 0 6px 6px; }
+
+.lfr-tree-controls-expand {
+  background-image: url(@theme_image_path@/trees/expand_all.png); }
+
+.lfr-tree-controls-collapse {
+  background-image: url(@theme_image_path@/trees/collapse_all.png); }
+
+.ie6 .theme-thumbnail, .ie6 .no-png-fix {
+  behavior: none; }
+.ie6 .lfr-available-themes h3 {
+  height: 1%; }
+.ie6 .lfr-page-layouts .lfr-layout-template-column {
+  width: 30%; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/css/main.css
new file mode 100644
index 0000000..8dcfadb
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/css/main.css
@@ -0,0 +1,489 @@
+.portlet-communities, .portlet-users-admin {
+	.lfr-theme-list {
+		li {
+			float: left;
+			margin: 0 1.3em 1.3em 0;
+			text-align: center;
+		}
+	}
+
+	.layout-set-results {
+		min-height: 300px;
+	}
+
+	.theme-title {
+		.field-content {
+			margin: 0;
+		}
+	}
+
+	.theme-entry {
+		cursor: pointer;
+		float: left;
+		height: 96px;
+		margin: 2px;
+		padding: 0.3em;
+		text-align: center;
+		text-decoration: none;
+
+		&:hover label, &:hover {
+
+		}
+
+		&:hover {
+			&, & label {
+				color: #369;
+			}
+
+			.theme-thumbnail {
+				border-color: #369;
+			}
+		}
+	}
+
+	.theme-thumbnail {
+		border: 1px solid #CCC;
+		height: 68px;
+		width: 85px;
+	}
+
+	.lfr-available-themes {
+		h3 {
+			margin: 0;
+			overflow: hidden;
+		}
+
+		.lfr-theme-list {
+			margin-top: 0.7em;
+		}
+
+		.install-themes {
+			float: right;
+			font-size: 11px;
+		}
+	}
+
+	.lfr-theme-list .theme-details dd {
+		margin: 0;
+	}
+
+	.theme-details {
+		dl {
+			margin-bottom: 1em;
+		}
+
+		dt {
+			font-weight: bold;
+			margin-top: 1em;
+		}
+	}
+
+	.color-schemes {
+		clear: both;
+
+		.lfr-panel-content {
+			overflow: hidden;
+		}
+	}
+
+	.selected-color-scheme img {
+		border: 3px solid #369;
+	}
+
+	.lfr-header-row {
+		margin-bottom: 0.5em;
+
+		.icon-add, .icon-copy, .icon-delete, .icon-export, .icon-permissions, .icon-search {
+			background: url() no-repeat 0 0;
+		}
+
+		.icon-add {
+			background-image: url(@theme_image_path@/common/add.png);
+		}
+
+		.icon-copy {
+			background-image: url(@theme_image_path@/common/copy.png);
+		}
+
+		.icon-delete {
+			background-image: url(@theme_image_path@/common/delete.png);
+		}
+
+		.icon-export {
+			background-image: url(@theme_image_path@/common/export.png);
+		}
+
+		.icon-permissions {
+			background-image: url(@theme_image_path@/common/permissions.png);
+		}
+
+		.icon-search {
+			background-image: url(@theme_image_path@/common/search.png);
+		}
+	}
+
+	.button-holder.edit-toolbar {
+		margin: 0;
+	}
+
+	.manage-layout-content, .manage-sitemap-content {
+		padding: 0;
+	}
+
+	.manage-layout-content {
+	}
+
+	.edit-layout-form, .edit-layoutset-form {
+		padding: 0.5em;
+
+		.layout-description textarea {
+			height: 100px;
+			width: 350px;
+		}
+	}
+
+	.customization-settings {
+		.portlet-column {
+			border: 1px solid #CCC;
+			margin: 2px;
+
+			.portlet-column-content {
+				text-align: center;
+			}
+
+			h1 {
+				font-size: 2em;
+				font-weight: bold;
+			}
+		}
+	}
+
+	.layoutset-branch {
+		color: #FFFFFF;
+		display: inline-block;
+		font-weight: bold;
+		padding: 0.3em;
+		text-shadow: 1px 1px #000;
+	}
+
+	.site-membership-type {
+		font-weight: bold;
+		margin-bottom: 10px;
+	}
+
+	.membership-info, .description {
+		margin-bottom: 20px;
+	}
+
+	.membership-info {
+		.members-info a {
+			padding-right: 5px;
+		}
+
+		.membership-requests {
+			padding-left: 10px;
+		}
+
+		dl, dt, dd {
+			display: inline;
+			margin: 0;
+		}
+
+		dt {
+			font-weight: bold;
+			margin-left: 10px;
+
+			&.first {
+				margin-left: 0;
+			}
+		}
+
+		dd {
+			border-right: 1px solid #999;
+			padding-right: 10px;
+
+			&.last {
+				border-width: 0;
+			}
+		}
+	}
+
+	.site-categorization {
+		margin-bottom: 20px;
+	}
+
+	.taglib-asset-categories-summary, .taglib-asset-tags-summary {
+		display: block;
+	}
+
+	.layout-set-info {
+		margin-bottom: 15px;
+	}
+
+	.organizations-msg-info {
+		background-color: #FEFEFE;
+		background-image: url(@theme_image_path@/common/organization_icon.png);
+		border-color: #BBB;
+	}
+
+	.process-list {
+		.background-task-status-column {
+			width: 700px;
+
+			.background-task-status-message {
+				margin-top: 1em;
+
+				.error-list-items li {
+					list-style: disc inside;
+				}
+			}
+
+			.details-link {
+				margin-left: 1em;
+			}
+
+			.publish-error {
+				margin-bottom: 0;
+			}
+
+			.toggler-header-collapsed:after {
+				content: " »";
+			}
+
+			.toggler-header-expanded:after {
+				content: " «";
+			}
+
+			.background-task-status-in-progress {
+				float: left;
+				margin-right: 1em;
+			}
+
+			.progress {
+				margin-bottom: 0.3em;
+			}
+
+			.progress-current-item {
+				font-size: 0.7em;
+			}
+		}
+	}
+}
+
+.tree-node-content {
+	.layout-branch-name {
+		color: #AAA;
+	}
+
+	.incomplete-layout {
+		color: #CCC;
+	}
+}
+
+.tree-drag-helper a {
+	text-decoration: none;
+}
+
+.tree-drag-helper-label {
+	margin-top: -1px;
+}
+
+.tree-pages {
+	.tree-node-selected {
+		.tree-label a {
+			color: #0090D9;
+			cursor: move;
+		}
+	}
+}
+
+.lfr-page-locked .tree-icon {
+	background-image: url(@theme_image_path@/trees/page_locked.png);
+}
+
+.export-dialog-tree {
+	.content-options {
+		margin-bottom: 1em;
+
+		legend {
+			border-top: solid #E5E5E5;
+			border-width: 1px 0 0;
+			font-size: 1em;
+			font-weight: normal;
+			line-height: 1em;
+			margin-bottom: 0.5em;
+			padding-top: 0.75em;
+		}
+	}
+
+	input.file-selector {
+		display: block;
+		margin: 0.5em 0 1.5em;
+	}
+
+	.import-file-details {
+		margin: 0 1em 0 1.5em;
+
+		dt {
+			clear: left;
+			float: left;
+			font-weight: bold;
+			margin-right: 1em;
+		}
+	}
+
+	.layout-variation-name {
+		color: #999;
+	}
+
+	.modify-link {
+		text-decoration: underline;
+	}
+
+	.options-group {
+		.options {
+			background-color: #FAFAFA;
+			border: solid #E4E4E4;
+			border-width: 1px 0;
+			margin-top: 20px;
+		}
+
+		.select-options {
+			margin-left: 20px ;
+			margin-top: 20px;
+		}
+	}
+
+	.page-not-exportable {
+		color: #933;
+	}
+
+	.portlet-list {
+		padding: 10px 0;
+
+		li.tree-item > ul {
+			margin-bottom: 1em;
+		}
+	}
+
+	.options ul.portlet-list > li.tree-item {
+		padding-left: 0;
+	}
+
+	.selected-labels {
+		color: #999;
+		font-style: italic;
+		margin-left: 0.5em;
+		margin-right: 0.5em;
+	}
+
+	.selected-pages {
+		td.col-1 {
+			padding-top: 5px;
+		}
+
+		th.col-3 {
+			text-align: left;
+			width: 74%;
+		}
+	}
+
+	.selected-pages-option .field-content {
+		display: inline;
+	}
+
+	ul.unstyled ul {
+		list-style: none;
+	}
+}
+
+.lfr-export-dialog {
+	.portlet-data-section, .portlet-type-data-section {
+		.control-label {
+			font-weight: bold;
+		}
+
+		.date-range-options {
+			margin-bottom: 1em;
+
+			legend {
+				border: 0;
+				display: block;
+				font-size: 1em;
+				font-weight: normal;
+				line-height: 1em;
+				margin-bottom: 0.2em;
+				padding-top: 1em;
+			}
+		}
+
+		.relative-range {
+			width: 165px;
+		}
+
+		legend {
+			display: none;
+		}
+	}
+
+	.upload-list li {
+		list-style: disc inside;
+	}
+
+	.upload-list .error-info {
+		font-size: 0.8em;
+		font-style: italic;
+		margin-left: 0.5em;
+	}
+}
+
+.lfr-root-node {
+	.tree-icon a, .tree-label a {
+		cursor: pointer;
+	}
+}
+
+.lfr-tree-loading-icon {
+	margin: 0 auto;
+	padding-top: 5px;
+}
+
+.lfr-tree-controls {
+	width: 165px;
+
+	div, a {
+		float: left;
+	}
+}
+
+.lfr-tree-controls-label {
+	line-height: 17px;
+	padding: 0 2px;
+	text-decoration: none;
+}
+
+.lfr-tree-controls-item {
+	padding: 0 0 6px 6px;
+}
+
+.lfr-tree-controls-expand {
+	background-image: url(@theme_image_path@/trees/expand_all.png);
+}
+
+.lfr-tree-controls-collapse {
+	background-image: url(@theme_image_path@/trees/collapse_all.png);
+}
+
+.ie6 {
+	.theme-thumbnail, .no-png-fix {
+		behavior: none;
+	}
+
+	.lfr-available-themes h3 {
+		height: 1%;
+	}
+
+	.lfr-page-layouts .lfr-layout-template-column {
+		width: 30%;
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/edit_layout.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/edit_layout.jsp
new file mode 100644
index 0000000..35055e4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/edit_layout.jsp
@@ -0,0 +1,365 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+String closeRedirect = ParamUtil.getString(request, "closeRedirect");
+
+Group selGroup = (Group)request.getAttribute(WebKeys.GROUP);
+
+Group group = (Group)request.getAttribute("edit_pages.jsp-group");
+Group liveGroup = (Group)request.getAttribute("edit_pages.jsp-liveGroup");
+
+long groupId = ((Long)request.getAttribute("edit_pages.jsp-groupId")).longValue();
+long liveGroupId = ((Long)request.getAttribute("edit_pages.jsp-liveGroupId")).longValue();
+long stagingGroupId = ((Long)request.getAttribute("edit_pages.jsp-stagingGroupId")).longValue();
+
+Layout selLayout = (Layout)request.getAttribute("edit_pages.jsp-selLayout");
+long selPlid = ((Long)request.getAttribute("edit_pages.jsp-selPlid")).longValue();
+long layoutId = ((Long)request.getAttribute("edit_pages.jsp-layoutId")).longValue();
+boolean privateLayout = ((Boolean)request.getAttribute("edit_pages.jsp-privateLayout")).booleanValue();
+
+PortletURL portletURL = (PortletURL)request.getAttribute("edit_pages.jsp-portletURL");
+PortletURL redirectURL = (PortletURL)request.getAttribute("edit_pages.jsp-redirectURL");
+
+long refererPlid = ParamUtil.getLong(request, "refererPlid", LayoutConstants.DEFAULT_PLID);
+
+Set<Long> parentPlids = new HashSet<Long>();
+
+long parentPlid = refererPlid;
+
+while (parentPlid > 0) {
+	try {
+		Layout parentLayout = LayoutLocalServiceUtil.getLayout(parentPlid);
+
+		if (parentLayout.isRootLayout()) {
+			break;
+		}
+
+		parentPlid = parentLayout.getParentPlid();
+
+		parentPlids.add(parentPlid);
+	}
+	catch (Exception e) {
+		break;
+	}
+}
+
+LayoutRevision layoutRevision = LayoutStagingUtil.getLayoutRevision(selLayout);
+
+String layoutSetBranchName = StringPool.BLANK;
+
+boolean incomplete = false;
+
+if (layoutRevision != null) {
+	long layoutSetBranchId = layoutRevision.getLayoutSetBranchId();
+
+	incomplete = StagingUtil.isIncomplete(selLayout, layoutSetBranchId);
+
+	if (incomplete) {
+		LayoutSetBranch layoutSetBranch = LayoutSetBranchLocalServiceUtil.getLayoutSetBranch(layoutSetBranchId);
+
+		layoutSetBranchName = layoutSetBranch.getName();
+	}
+}
+
+String[] mainSections = PropsValues.LAYOUT_FORM_UPDATE;
+
+if (selLayout.isSupportsEmbeddedPortlets()) {
+	List<Portlet> embeddedPortlets = new ArrayList<Portlet>();
+
+	LayoutTypePortlet selLayoutTypePortlet = (LayoutTypePortlet)selLayout.getLayoutType();
+
+	List<String> portletIds = selLayoutTypePortlet.getPortletIds();
+
+	for (Portlet portlet : selLayoutTypePortlet.getAllPortlets(false)) {
+		if (!portletIds.contains(portlet.getPortletId())) {
+			embeddedPortlets.add(portlet);
+		}
+	}
+
+	if (!embeddedPortlets.isEmpty()) {
+		request.setAttribute("edit_pages.jsp-embeddedPortlets", embeddedPortlets);
+
+		mainSections = ArrayUtil.append(mainSections, "embedded-portlets");
+	}
+}
+
+if (!group.isUser() && selLayout.isTypePortlet()) {
+	mainSections = ArrayUtil.append(mainSections, "customization-settings");
+}
+
+String[][] categorySections = {mainSections};
+
+String displayStyle = ParamUtil.getString(request, "displayStyle");
+boolean showAddAction = ParamUtil.getBoolean(request, "showAddAction", true);
+%>
+
+<c:if test="<%= !portletName.equals(PortletKeys.DOCKBAR) %>">
+	<div class="add-content-menu hide" id="<portlet:namespace />addLayout">
+		<liferay-util:include page="/html/portlet/layouts_admin/add_layout.jsp" />
+	</div>
+</c:if>
+
+<aui:nav-bar>
+	<aui:nav id="layoutsNav">
+		<c:if test="<%= LayoutPermissionUtil.contains(permissionChecker, selPlid, ActionKeys.ADD_LAYOUT) && showAddAction %>">
+			<aui:nav-item data-value="add-child-page" iconCssClass="icon-plus" label="add-child-page" />
+		</c:if>
+		<c:if test="<%= LayoutPermissionUtil.contains(permissionChecker, selPlid, ActionKeys.PERMISSIONS) %>">
+			<aui:nav-item data-value="permissions" iconCssClass="icon-lock" label="permissions" />
+		</c:if>
+		<c:if test="<%= LayoutPermissionUtil.contains(permissionChecker, selPlid, ActionKeys.DELETE) %>">
+			<aui:nav-item data-value="delete" iconCssClass="icon-remove" label="delete" />
+		</c:if>
+		<c:if test="<%= LayoutPermissionUtil.contains(permissionChecker, selLayout, ActionKeys.UPDATE) %>">
+			<aui:nav-item data-value="copy-applications" iconCssClass="icon-list-alt" label="copy-applications" />
+		</c:if>
+	</aui:nav>
+</aui:nav-bar>
+
+<portlet:actionURL var="editLayoutURL">
+	<portlet:param name="struts_action" value="/layouts_admin/edit_layouts" />
+</portlet:actionURL>
+
+<aui:form action='<%= HttpUtil.addParameter(editLayoutURL, "refererPlid", plid) %>' cssClass="edit-layout-form" enctype="multipart/form-data" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + liferayPortletResponse.getNamespace() + "saveLayout();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value='<%= HttpUtil.addParameter(redirectURL.toString(), liferayPortletResponse.getNamespace() + "selPlid", selPlid) %>' />
+	<aui:input name="closeRedirect" type="hidden" value="<%= closeRedirect %>" />
+	<aui:input name="groupId" type="hidden" value="<%= selGroup.getGroupId() %>" />
+	<aui:input name="liveGroupId" type="hidden" value="<%= liveGroupId %>" />
+	<aui:input name="stagingGroupId" type="hidden" value="<%= stagingGroupId %>" />
+	<aui:input name="selPlid" type="hidden" value="<%= selPlid %>" />
+	<aui:input name="privateLayout" type="hidden" value="<%= privateLayout %>" />
+	<aui:input name="layoutId" type="hidden" value="<%= layoutId %>" />
+	<aui:input name="<%= PortletDataHandlerKeys.SELECTED_LAYOUTS %>" type="hidden" />
+
+	<c:if test="<%= layoutRevision != null && !incomplete %>">
+		<aui:input name="layoutSetBranchId" type="hidden" value="<%= layoutRevision.getLayoutSetBranchId() %>" />
+	</c:if>
+
+	<c:choose>
+		<c:when test="<%= incomplete %>">
+			<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(selLayout.getName(locale)), HtmlUtil.escape(layoutSetBranchName)} %>" key="the-page-x-is-not-enabled-in-x,-but-is-available-in-other-pages-variations" />
+
+			<aui:input name="incompleteLayoutRevisionId" type="hidden" value="<%= layoutRevision.getLayoutRevisionId() %>" />
+
+			<%
+			String taglibEnableOnClick = "event.preventDefault(); " + liferayPortletResponse.getNamespace() + "saveLayout('enable');";
+
+			String taglibDeleteOnClick = "event.preventDefault(); " + liferayPortletResponse.getNamespace() + "saveLayout('" + Constants.DELETE + "');";
+			%>
+
+			<aui:button-row>
+				<aui:button name="enableLayout" onClick="<%= taglibEnableOnClick %>" value='<%= LanguageUtil.format(pageContext, "enable-in-x", HtmlUtil.escape(layoutSetBranchName)) %>' />
+
+				<aui:button name="deleteLayout" onClick="<%= taglibDeleteOnClick %>" value="delete-in-all-pages-variations" />
+			</aui:button-row>
+		</c:when>
+		<c:otherwise>
+			<c:if test="<%= !group.isLayoutPrototype() && (selLayout != null) %>">
+				<c:if test="<%= selGroup.isStagingGroup() %>">
+					<%@ include file="/html/portlet/layouts_admin/error_auth_exception.jspf" %>
+
+					<%@ include file="/html/portlet/layouts_admin/error_remote_export_exception.jspf" %>
+
+					<div class="alert alert-block">
+						<liferay-ui:message key="the-staging-environment-is-activated-changes-have-to-be-published-to-make-them-available-to-end-users" />
+					</div>
+				</c:if>
+
+				<c:if test="<%= selGroup.hasLocalOrRemoteStagingGroup() && !selGroup.isStagingGroup() %>">
+					<div class="alert alert-block">
+						<liferay-ui:message key="changes-are-immediately-available-to-end-users" />
+					</div>
+				</c:if>
+
+				<liferay-security:permissionsURL
+					modelResource="<%= Layout.class.getName() %>"
+					modelResourceDescription="<%= selLayout.getName(locale) %>"
+					resourcePrimKey="<%= String.valueOf(selLayout.getPlid()) %>"
+					var="permissionURL"
+					windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+				/>
+
+				<%
+				Group selLayoutGroup = selLayout.getGroup();
+				%>
+
+				<c:choose>
+					<c:when test="<%= !SitesUtil.isLayoutUpdateable(selLayout) %>">
+						<div class="alert alert-block">
+							<liferay-ui:message key="this-page-cannot-be-modified-because-it-is-associated-to-a-site-template-does-not-allow-modifications-to-it" />
+						</div>
+					</c:when>
+					<c:when test="<%= !SitesUtil.isLayoutDeleteable(selLayout) %>">
+						<div class="alert alert-block">
+							<liferay-ui:message key="this-page-cannot-be-deleted-and-cannot-have-child-pages-because-it-is-associated-to-a-site-template" />
+						</div>
+					</c:when>
+				</c:choose>
+
+				<c:if test="<%= (selLayout.getGroupId() != groupId) && (selLayoutGroup.isUserGroup()) %>">
+
+					<%
+					UserGroup userGroup = UserGroupLocalServiceUtil.getUserGroup(selLayoutGroup.getClassPK());
+					%>
+
+					<div class="alert alert-block">
+						<liferay-ui:message arguments="<%= HtmlUtil.escape(userGroup.getName()) %>" key="this-page-cannot-be-modified-because-it-belongs-to-the-user-group-x" />
+					</div>
+				</c:if>
+
+				<aui:script use="liferay-util-window">
+					var content;
+					var popup;
+
+					var clickHandler = function(event) {
+						var target = event.target;
+
+						var dataValue = target.ancestor('li').attr('data-value') || target.attr('data-value');
+
+						if (dataValue === 'add-child-page') {
+							content = A.one('#<portlet:namespace />addLayout');
+
+							if (!popup) {
+								popup = Liferay.Util.Window.getWindow(
+									{
+										dialog: {
+											bodyContent: content.show(),
+											cssClass: 'lfr-add-dialog',
+											width: 600
+										},
+										title: '<%= UnicodeLanguageUtil.get(pageContext, "add-child-page") %>'
+									}
+								);
+							}
+
+							popup.show();
+
+							var cancelButton = popup.get('contentBox').one('#<portlet:namespace />cancelAddOperation');
+
+							if (cancelButton) {
+								cancelButton.on(
+									'click',
+									function(event) {
+										popup.hide();
+									}
+								);
+							}
+
+							Liferay.Util.focusFormField(content.one('input:text'));
+						}
+						else if (dataValue === 'permissions') {
+							<liferay-security:permissionsURL
+								modelResource="<%= Layout.class.getName() %>"
+								modelResourceDescription="<%= selLayout.getName(locale) %>"
+								resourcePrimKey="<%= String.valueOf(selLayout.getPlid()) %>"
+								var="permissionURL"
+								windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+							/>
+
+							Liferay.Util.openWindow(
+								{
+									cache: false,
+									id: '<portlet:namespace /><%= selLayout.getFriendlyURL().substring(1) %>_permissions',
+									title: '<%= UnicodeLanguageUtil.get(pageContext, "permissions") %>',
+									uri: '<%= permissionURL %>'
+								}
+							);
+						}
+						else if (dataValue === 'delete') {
+							<portlet:namespace />saveLayout('<%= Constants.DELETE %>');
+						}
+						else if (dataValue == 'copy-applications') {
+							content = A.one('#<portlet:namespace />copyPortletsFromPage');
+
+							popUp = Liferay.Util.Window.getWindow(
+								{
+									dialog: {
+										bodyContent: content.show()
+									},
+									title: '<%= UnicodeLanguageUtil.get(pageContext, "copy-applications") %>'
+								}
+							);
+
+							popUp.show();
+
+							var submitButton = popUp.get('contentBox').one('#<portlet:namespace />copySubmitButton');
+
+							if (submitButton) {
+								submitButton.on(
+									'click',
+									function(event) {
+										popUp.hide();
+
+										var form = A.one('#<portlet:namespace />fm');
+
+										if (form) {
+											form.append(content);
+										}
+
+										<portlet:namespace />saveLayout();
+									}
+								);
+							}
+						}
+					};
+
+					A.one('#<portlet:namespace />layoutsNav').delegate('click', clickHandler, 'li a');
+				</aui:script>
+			</c:if>
+
+			<liferay-ui:form-navigator
+				categoryNames="<%= _CATEGORY_NAMES %>"
+				categorySections="<%= categorySections %>"
+				displayStyle="<%= displayStyle %>"
+				jspPath="/html/portlet/layouts_admin/layout/"
+				showButtons="<%= (selLayout.getGroupId() == groupId) && SitesUtil.isLayoutUpdateable(selLayout) && LayoutPermissionUtil.contains(permissionChecker, selPlid, ActionKeys.UPDATE) %>"
+			/>
+		</c:otherwise>
+	</c:choose>
+</aui:form>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />saveLayout',
+		function(action) {
+			var A = AUI();
+
+			action = action || '<%= Constants.UPDATE %>';
+
+			if (action == '<%= Constants.DELETE %>') {
+				if (!confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-delete-the-selected-page") %>')) {
+					return false;
+				}
+
+				document.<portlet:namespace />fm.<portlet:namespace />redirect.value = '<%= HttpUtil.setParameter(redirectURL.toString(), liferayPortletResponse.getNamespace() + "selPlid", selLayout.getParentPlid()) %>';
+			}
+
+			document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = action;
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['aui-base']
+	);
+</aui:script>
+
+<%!
+private static final String[] _CATEGORY_NAMES = {""};
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/edit_layout_set.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/edit_layout_set.jsp
new file mode 100644
index 0000000..e59aa60
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/edit_layout_set.jsp
@@ -0,0 +1,302 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+String closeRedirect = ParamUtil.getString(request, "closeRedirect");
+
+Group selGroup = (Group)request.getAttribute(WebKeys.GROUP);
+
+Group group = (Group)request.getAttribute("edit_pages.jsp-group");
+Group liveGroup = (Group)request.getAttribute("edit_pages.jsp-liveGroup");
+long groupId = (Long)request.getAttribute("edit_pages.jsp-groupId");
+long liveGroupId = (Long)request.getAttribute("edit_pages.jsp-liveGroupId");
+long stagingGroupId = (Long)request.getAttribute("edit_pages.jsp-stagingGroupId");
+long selPlid = ((Long)request.getAttribute("edit_pages.jsp-selPlid")).longValue();
+boolean privateLayout = ((Boolean)request.getAttribute("edit_pages.jsp-privateLayout")).booleanValue();
+UnicodeProperties liveGroupTypeSettings = (UnicodeProperties)request.getAttribute("edit_pages.jsp-liveGroupTypeSettings");
+LayoutSet selLayoutSet = ((LayoutSet)request.getAttribute("edit_pages.jsp-selLayoutSet"));
+
+String rootNodeName = (String)request.getAttribute("edit_pages.jsp-rootNodeName");
+
+PortletURL redirectURL = (PortletURL)request.getAttribute("edit_pages.jsp-redirectURL");
+
+int pagesCount = 0;
+
+if (selGroup.isLayoutSetPrototype()) {
+	privateLayout = true;
+}
+
+if (privateLayout) {
+	if (group != null) {
+		pagesCount = group.getPrivateLayoutsPageCount();
+	}
+}
+else {
+	if (group != null) {
+		pagesCount = group.getPublicLayoutsPageCount();
+	}
+}
+
+String[] mainSections = PropsValues.LAYOUT_SET_FORM_UPDATE;
+
+if (!company.isSiteLogo()) {
+	mainSections = ArrayUtil.remove(mainSections, "logo");
+}
+
+if (group.isGuest()) {
+	mainSections = ArrayUtil.remove(mainSections, "advanced");
+}
+
+String[][] categorySections = {mainSections};
+
+boolean hasExportImportLayoutsPermission = GroupPermissionUtil.contains(permissionChecker, liveGroupId, ActionKeys.EXPORT_IMPORT_LAYOUTS);
+
+boolean hasAddPageLayoutsPermission = GroupPermissionUtil.contains(permissionChecker, groupId, ActionKeys.ADD_LAYOUT);
+
+boolean hasViewPagesPermission = (pagesCount > 0) && (liveGroup.isStaged() || selGroup.isLayoutSetPrototype() || selGroup.isStagingGroup() || portletName.equals(PortletKeys.MY_SITES) || portletName.equals(PortletKeys.GROUP_PAGES) || portletName.equals(PortletKeys.SITES_ADMIN) || portletName.equals(PortletKeys.USERS_ADMIN));
+%>
+
+<div class="add-content-menu hide" id="<portlet:namespace />addLayout">
+	<liferay-util:include page="/html/portlet/layouts_admin/add_layout.jsp" />
+</div>
+
+<aui:nav-bar>
+	<aui:nav id="layoutsNav">
+		<c:if test="<%= hasViewPagesPermission %>">
+			<aui:nav-item data-value="view-pages" iconCssClass="icon-file" label="view-pages" />
+		</c:if>
+		<c:if test="<%= hasAddPageLayoutsPermission %>">
+			<aui:nav-item data-value="add-page" iconCssClass="icon-plus" label="add-page" />
+		</c:if>
+		<c:if test="<%= hasExportImportLayoutsPermission %>">
+			<aui:nav-item data-value="export" iconCssClass="icon-arrow-down" label="export" />
+			<aui:nav-item data-value="import" iconCssClass="icon-arrow-up" label="import" />
+		</c:if>
+	</aui:nav>
+</aui:nav-bar>
+
+<c:if test="<%= liveGroup.isStaged() %>">
+	<%@ include file="/html/portlet/layouts_admin/error_auth_exception.jspf" %>
+
+	<%@ include file="/html/portlet/layouts_admin/error_remote_export_exception.jspf" %>
+
+	<div class="alert alert-block">
+		<liferay-ui:message key="the-staging-environment-is-activated-changes-have-to-be-published-to-make-them-available-to-end-users" />
+	</div>
+</c:if>
+
+<portlet:actionURL var="editLayoutSetURL">
+	<portlet:param name="struts_action" value="/layouts_admin/edit_layout_set" />
+</portlet:actionURL>
+
+<aui:form action="<%= editLayoutSetURL %>" cssClass="edit-layoutset-form" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + liferayPortletResponse.getNamespace() + "saveLayoutset();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= redirectURL.toString() %>" />
+	<aui:input name="closeRedirect" type="hidden" value="<%= closeRedirect %>" />
+	<aui:input name="groupId" type="hidden" value="<%= groupId %>" />
+	<aui:input name="liveGroupId" type="hidden" value="<%= liveGroupId %>" />
+	<aui:input name="stagingGroupId" type="hidden" value="<%= stagingGroupId %>" />
+	<aui:input name="selPlid" type="hidden" value="<%= selPlid %>" />
+	<aui:input name="privateLayout" type="hidden" value="<%= privateLayout %>" />
+	<aui:input name="layoutSetId" type="hidden" value="<%= selLayoutSet.getLayoutSetId() %>" />
+	<aui:input name="<%= PortletDataHandlerKeys.SELECTED_LAYOUTS %>" type="hidden" />
+
+	<liferay-ui:form-navigator
+		categoryNames="<%= _CATEGORY_NAMES %>"
+		categorySections="<%= categorySections %>"
+		jspPath="/html/portlet/layouts_admin/layout_set/"
+		showButtons="<%= GroupPermissionUtil.contains(permissionChecker, groupId, ActionKeys.MANAGE_LAYOUTS) && SitesUtil.isLayoutSetPrototypeUpdateable(selLayoutSet) %>"
+	/>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />saveLayoutset(action) {
+		document.<portlet:namespace />fm.encoding = 'multipart/form-data';
+
+		if (action) {
+			document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = action;
+		}
+		else {
+			document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = 'update';
+		}
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />updateLogo() {
+		document.<portlet:namespace />fm.encoding = 'multipart/form-data';
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = 'logo';
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />updateRobots() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = 'robots';
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />removePage',
+		function(box) {
+			var A = AUI();
+
+			var selectEl = A.one(box);
+
+			var currentValue = selectEl.val() || null;
+
+			Liferay.Util.removeItem(box);
+		},
+		['aui-base']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />updateDisplayOrder',
+		function() {
+			document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = 'display_order';
+			document.<portlet:namespace />fm.<portlet:namespace />layoutIds.value = Liferay.Util.listSelect(document.<portlet:namespace />fm.<portlet:namespace />layoutIdsBox);
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['liferay-util-list-fields']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />updateStaging',
+		function() {
+			var A = AUI();
+
+			var selectEl = A.one('#<portlet:namespace />stagingType');
+
+			var currentValue = selectEl.val() || null;
+
+			var ok = false;
+
+			if (currentValue == 0) {
+				ok = confirm('<%= UnicodeLanguageUtil.format(pageContext, "are-you-sure-you-want-to-deactivate-staging-for-x", liveGroup.getDescriptiveName(locale)) %>');
+			}
+			else if (currentValue == 1) {
+				ok = confirm('<%= UnicodeLanguageUtil.format(pageContext, "are-you-sure-you-want-to-activate-local-staging-for-x", liveGroup.getDescriptiveName(locale)) %>');
+			}
+			else if (currentValue == 2) {
+				ok = confirm('<%= UnicodeLanguageUtil.format(pageContext, "are-you-sure-you-want-to-activate-remote-staging-for-x", liveGroup.getDescriptiveName(locale)) %>');
+			}
+
+			if (ok) {
+				document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = 'staging';
+
+				submitForm(document.<portlet:namespace />fm);
+			}
+		},
+		['aui-base']
+	);
+</aui:script>
+
+<aui:script use="liferay-util-window">
+	var popup;
+
+	var clickHandler = function(event) {
+		var dataValue = event.target.ancestor('li').attr('data-value');
+
+		if (dataValue === 'add-page' || dataValue === 'add-child-page') {
+			var content = A.one('#<portlet:namespace />addLayout');
+
+			if (!popup) {
+				popup = Liferay.Util.Window.getWindow(
+					{
+						dialog: {
+							bodyContent: content.show(),
+							cssClass: 'lfr-add-dialog',
+							width: 600
+						},
+						title: '<%= UnicodeLanguageUtil.get(pageContext, "add-page") %>'
+					}
+				);
+			}
+
+			popup.show();
+
+			var cancelButton = popup.get('contentBox').one('#<portlet:namespace />cancelAddOperation');
+
+			if (cancelButton) {
+				cancelButton.on(
+					'click',
+					function(event) {
+						popup.hide();
+					}
+				);
+			}
+
+			Liferay.Util.focusFormField(content.one('input:text'));
+		}
+		else if (dataValue === 'view-pages') {
+			<liferay-portlet:actionURL plid="<%= selPlid %>" portletName="<%= PortletKeys.SITE_REDIRECTOR %>" var="viewPagesURL">
+				<portlet:param name="struts_action" value="/my_sites/view" />
+				<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+				<portlet:param name="privateLayout" value="<%= String.valueOf(privateLayout) %>" />
+			</liferay-portlet:actionURL>
+
+			window.open('<%= viewPagesURL %>').focus();
+		}
+		else if (dataValue === 'import') {
+			<portlet:renderURL var="importPagesURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+				<portlet:param name="struts_action" value="/layouts_admin/import_layouts" />
+				<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.VALIDATE %>" />
+				<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+				<portlet:param name="liveGroupId" value="<%= String.valueOf(liveGroupId) %>" />
+				<portlet:param name="privateLayout" value="<%= String.valueOf(privateLayout) %>" />
+				<portlet:param name="rootNodeName" value="<%= rootNodeName %>" />
+			</portlet:renderURL>
+
+			Liferay.Util.openWindow(
+				{
+					id: '<portlet:namespace />importDialog',
+					title: '<%= UnicodeLanguageUtil.get(pageContext, "import") %>',
+					uri: '<%= importPagesURL.toString() %>'
+				}
+			);
+		}
+		else if (dataValue === 'export') {
+			<portlet:renderURL var="exportPagesURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+				<portlet:param name="struts_action" value="/layouts_admin/export_layouts" />
+				<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.EXPORT %>" />
+				<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+				<portlet:param name="liveGroupId" value="<%= String.valueOf(liveGroupId) %>" />
+				<portlet:param name="privateLayout" value="<%= String.valueOf(privateLayout) %>" />
+				<portlet:param name="rootNodeName" value="<%= rootNodeName %>" />
+			</portlet:renderURL>
+
+			Liferay.Util.openWindow(
+				{
+					id: '<portlet:namespace />exportDialog',
+					title: '<%= UnicodeLanguageUtil.get(pageContext, "export") %>',
+					uri: '<%= exportPagesURL.toString() %>'
+				}
+			);
+		}
+	};
+
+	A.one('#<portlet:namespace />layoutsNav').delegate('click', clickHandler, 'li a');
+</aui:script>
+
+<%!
+private static final String[] _CATEGORY_NAMES = {""};
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/edit_pages_children.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/edit_pages_children.jsp
new file mode 100644
index 0000000..01b5b11
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/edit_pages_children.jsp
@@ -0,0 +1,277 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+String tabs4 = (String)request.getAttribute("edit_pages.jsp-tab4");
+
+Group group = (Group)request.getAttribute("edit_pages.jsp-group");
+Group liveGroup = (Group)request.getAttribute("edit_pages.jsp-liveGroup");
+long groupId = ((Long)request.getAttribute("edit_pages.jsp-groupId")).longValue();
+long selPlid = ((Long)request.getAttribute("edit_pages.jsp-selPlid")).longValue();
+boolean privateLayout = ((Boolean)request.getAttribute("edit_pages.jsp-privateLayout")).booleanValue();
+UnicodeProperties groupTypeSettings = (UnicodeProperties)request.getAttribute("edit_pages.jsp-groupTypeSettings");
+Layout selLayout = (Layout)request.getAttribute("edit_pages.jsp-selLayout");
+
+PortletURL redirectURL = (PortletURL)request.getAttribute("edit_pages.jsp-redirectURL");
+
+List selLayoutChildren = null;
+
+if (selLayout != null) {
+	selLayoutChildren = selLayout.getChildren();
+}
+else {
+	selLayoutChildren = LayoutLocalServiceUtil.getLayouts(groupId, privateLayout, LayoutConstants.DEFAULT_PARENT_LAYOUT_ID);
+}
+
+String tabs4Names = "new-page";
+
+if ((selLayoutChildren != null) && !selLayoutChildren.isEmpty()) {
+	tabs4Names += ",display-order";
+}
+
+if (!StringUtil.contains(tabs4Names, tabs4)) {
+	tabs4 = "new-page";
+}
+%>
+
+<liferay-ui:tabs
+	names="<%= tabs4Names %>"
+	param="tabs4"
+	url='<%= redirectURL.toString() + "&" + renderResponse.getNamespace() + "selPlid=" + selPlid %>'
+/>
+
+<aui:input name="parentLayoutId" type="hidden" value="<%= (selLayout != null) ? selLayout.getLayoutId() : LayoutConstants.DEFAULT_PARENT_LAYOUT_ID %>" />
+<aui:input name="layoutIds" type="hidden" />
+
+<c:choose>
+	<c:when test='<%= tabs4.equals("new-page") %>'>
+
+		<%
+		String name = ParamUtil.getString(request, "name");
+		String type = ParamUtil.getString(request, "type");
+		boolean hidden = ParamUtil.getBoolean(request, "hidden");
+
+		String defaultLanguageId = LocaleUtil.toLanguageId(themeDisplay.getSiteDefaultLocale());
+		%>
+
+		<liferay-ui:message key="add-child-pages" />
+
+		<br /><br />
+
+		<table class="lfr-table">
+		<tr>
+			<td class="lfr-label">
+				<liferay-ui:message key="name" />
+			</td>
+			<td>
+				<input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" name="<portlet:namespace />name_<%= defaultLanguageId %>" size="30" type="text" value="<%= HtmlUtil.escape(name) %>" />
+			</td>
+		</tr>
+		<tr>
+			<td colspan="2">
+				<br />
+			</td>
+		</tr>
+
+		<%
+		List<LayoutPrototype> layoutPrototypes = LayoutPrototypeServiceUtil.search(company.getCompanyId(), Boolean.TRUE, null);
+		%>
+
+		<c:if test="<%= !layoutPrototypes.isEmpty() %>">
+			<tr>
+				<td>
+					<liferay-ui:message key="template" />
+				</td>
+				<td colspan="2">
+					<select id="<portlet:namespace />layoutPrototypeId" name="<portlet:namespace />layoutPrototypeId">
+						<option selected value="">(<liferay-ui:message key="none" />)</option>
+
+						<%
+						for (LayoutPrototype layoutPrototype : layoutPrototypes) {
+						%>
+
+							<option value="<%= layoutPrototype.getLayoutPrototypeId() %>"><%= HtmlUtil.escape(layoutPrototype.getName(user.getLanguageId())) %></option>
+
+						<%
+						}
+						%>
+
+					</select>
+				</td>
+			</tr>
+		</c:if>
+
+		<tr class="hidden-field">
+			<td class="lfr-label">
+				<liferay-ui:message key="type" />
+			</td>
+			<td>
+				<select name="<portlet:namespace />type">
+
+					<%
+					for (int i = 0; i < PropsValues.LAYOUT_TYPES.length; i++) {
+						if (PropsValues.LAYOUT_TYPES[i].equals("article") && (group.isLayoutPrototype() || group.isLayoutSetPrototype())) {
+							continue;
+						}
+					%>
+
+						<option <%= type.equals(PropsValues.LAYOUT_TYPES[i]) ? "selected" : "" %> value="<%= PropsValues.LAYOUT_TYPES[i] %>"><%= LanguageUtil.get(pageContext, "layout.types." + PropsValues.LAYOUT_TYPES[i]) %></option>
+
+					<%
+					}
+					%>
+
+				</select>
+			</td>
+		</tr>
+		<tr class="hidden-field">
+			<td class="lfr-label">
+				<liferay-ui:message key="hidden" />
+			</td>
+			<td>
+				<liferay-ui:input-checkbox defaultValue="<%= hidden %>" param="hidden" />
+			</td>
+		</tr>
+
+		<c:if test="<%= (selLayout != null) && selLayout.isTypePortlet() %>">
+			<tr class="hidden-field">
+				<td class="lfr-label">
+					<liferay-ui:message key="copy-parent" />
+				</td>
+				<td>
+					<liferay-ui:input-checkbox defaultValue="false" param="inheritFromParentLayoutId" />
+				</td>
+			</tr>
+		</c:if>
+
+		</table>
+
+		<br />
+
+		<input type="submit" value="<liferay-ui:message key="add-page" />" /><br />
+
+		<c:if test="<%= windowState.equals(WindowState.MAXIMIZED) %>">
+			<c:if test="<%= !layoutPrototypes.isEmpty() %>">
+				<aui:script use="aui-base">
+					var layoutPrototypeIdSelect = A.one('#<portlet:namespace />layoutPrototypeId');
+
+					function showHiddenFields() {
+						var hiddenFields = A.all('.hidden-field');
+
+						hiddenFields.hide();
+
+						if (layoutPrototypeIdSelect && (layoutPrototypeIdSelect.val() == '')) {
+							hiddenFields.show();
+						}
+						else {
+							hiddenFields.hide();
+						}
+					}
+
+					showHiddenFields();
+
+					if (layoutPrototypeIdSelect) {
+						layoutPrototypeIdSelect.on(
+							'change',
+							function(event) {
+								showHiddenFields();
+							}
+						);
+					}
+				</aui:script>
+			</c:if>
+		</c:if>
+	</c:when>
+	<c:when test='<%= tabs4.equals("display-order") %>'>
+		<liferay-ui:error exception="<%= RequiredLayoutException.class %>">
+
+			<%
+			RequiredLayoutException rle = (RequiredLayoutException)errorException;
+			%>
+
+			<c:if test="<%= rle.getType() == RequiredLayoutException.AT_LEAST_ONE %>">
+				<liferay-ui:message key="you-must-have-at-least-one-page" />
+			</c:if>
+
+			<c:if test="<%= rle.getType() == RequiredLayoutException.FIRST_LAYOUT_TYPE %>">
+				<liferay-ui:message key="your-first-page-must-have-one-of-the-following-types" />: <%= PortalUtil.getFirstPageLayoutTypes(pageContext) %>
+			</c:if>
+		</liferay-ui:error>
+
+		<liferay-ui:message key="set-the-display-order-of-child-pages" />
+
+		<br /><br />
+
+		<table class="lfr-table">
+		<tr>
+			<td>
+				<select name="<portlet:namespace />layoutIdsBox" size="7">
+
+				<%
+				for (int i = 0; i < selLayoutChildren.size(); i++) {
+					Layout selLayoutChild = (Layout)selLayoutChildren.get(i);
+				%>
+
+					<option value="<%= selLayoutChild.getLayoutId() %>"><%= HtmlUtil.escape(selLayoutChild.getName(locale)) %></option>
+
+				<%
+				}
+				%>
+
+				</select>
+			</td>
+			<td class="lfr-top">
+				<a href="javascript:Liferay.Util.reorder(document.<portlet:namespace />fm.<portlet:namespace />layoutIdsBox, 0);"><img border="0" height="16" hspace="0" src="<%= themeDisplay.getPathThemeImages() %>/arrows/02_up.png" vspace="2" width="16" /></a><br />
+
+				<a href="javascript:Liferay.Util.reorder(document.<portlet:namespace />fm.<portlet:namespace />layoutIdsBox, 1);"><img border="0" height="16" hspace="0" src="<%= themeDisplay.getPathThemeImages() %>/arrows/02_down.png" vspace="2" width="16" /></a><br />
+
+				<a href="javascript:<portlet:namespace />removePage(document.<portlet:namespace />fm.<portlet:namespace />layoutIdsBox);"><img border="0" height="16" hspace="0" src="<%= themeDisplay.getPathThemeImages() %>/arrows/02_x.png" vspace="2" width="16" /></a><br />
+			</td>
+		</tr>
+		</table>
+
+		<br />
+
+		<input onClick="<portlet:namespace />updateDisplayOrder();" type="button" value="<liferay-ui:message key="update-display-order" />" />
+	</c:when>
+	<c:when test='<%= tabs4.equals("merge-pages") %>'>
+
+		<%
+		boolean mergeGuestPublicPages = PropertiesParamUtil.getBoolean(groupTypeSettings, request, "mergeGuestPublicPages");
+		%>
+
+		<liferay-ui:message arguments="<%= HtmlUtil.escape(company.getGroup().getDescriptiveName(locale)) %>" key="you-can-configure-the-top-level-pages-of-this-public-site-to-merge-with-the-top-level-pages-of-the-public-x-site" />
+
+		<br /><br />
+
+		<table class="lfr-table">
+		<tr>
+			<td class="lfr-label">
+				<liferay-ui:message arguments="<%= HtmlUtil.escape(company.getGroup().getDescriptiveName(locale)) %>" key="merge-x-public-pages" />
+			</td>
+			<td>
+				<liferay-ui:input-checkbox defaultValue="<%= mergeGuestPublicPages %>" param="mergeGuestPublicPages" />
+			</td>
+		</tr>
+		</table>
+
+		<br />
+
+		<input type="submit" value="<liferay-ui:message key="save" />" />
+	</c:when>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/error.jsp
new file mode 100644
index 0000000..2a86f1b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/error.jsp
@@ -0,0 +1,26 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+<liferay-ui:error exception="<%= NoSuchGroupException.class %>" message="the-site-could-not-be-found" />
+<liferay-ui:error exception="<%= NoSuchLayoutException.class %>" message="the-page-could-not-be-found" />
+<liferay-ui:error exception="<%= NoSuchRoleException.class %>" message="the-role-could-not-be-found" />
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/error_auth_exception.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/error_auth_exception.jspf
new file mode 100644
index 0000000..d8eccbc
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/error_auth_exception.jspf
@@ -0,0 +1,47 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:error exception="<%= AuthException.class %>">
+
+	<%
+	AuthException ae = (AuthException)errorException;
+	%>
+
+	<c:if test="<%= ae instanceof RemoteAuthException %>">
+
+		<%
+		RemoteAuthException rae = (RemoteAuthException)errorException;
+		%>
+
+		<liferay-ui:message arguments='<%= "<em>" + rae.getURL() + "</em>" %>' key="an-unexpected-error-occurred-in-the-remote-server-at-x" />
+	</c:if>
+
+	<c:if test="<%= ae.getType() == AuthException.INTERNAL_SERVER_ERROR %>">
+		<liferay-ui:message key="internal-server-error" />
+	</c:if>
+
+	<c:if test="<%= ae.getType() == AuthException.INVALID_SHARED_SECRET %>">
+		<liferay-ui:message key="the-tunneling-servlet-shared-secret-must-be-16,-32,-or-64-characters-long" />
+	</c:if>
+
+	<c:if test="<%= ae.getType() == AuthException.NO_SHARED_SECRET %>">
+		<liferay-ui:message key="the-tunneling-servlet-shared-secret-is-not-set" />
+	</c:if>
+
+	<c:if test="<%= ae.getType() == RemoteAuthException.WRONG_SHARED_SECRET %>">
+		<liferay-ui:message key="the-tunneling-servlet-shared-secrets-do-not-match" />
+	</c:if>
+</liferay-ui:error>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/error_remote_export_exception.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/error_remote_export_exception.jspf
new file mode 100644
index 0000000..2a438c6
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/error_remote_export_exception.jspf
@@ -0,0 +1,34 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:error exception="<%= RemoteExportException.class %>">
+
+	<%
+	RemoteExportException ree = (RemoteExportException)errorException;
+	%>
+
+	<c:if test="<%= ree.getType() == RemoteExportException.BAD_CONNECTION %>">
+		<liferay-ui:message arguments='<%= "<em>" + ree.getURL() + "</em>" %>' key="could-not-connect-to-address-x.-please-verify-that-the-specified-port-is-correct-and-that-the-remote-server-is-configured-to-accept-requests-from-this-server" />
+	</c:if>
+
+	<c:if test="<%= ree.getType() == RemoteExportException.NO_GROUP %>">
+		<liferay-ui:message arguments="<%= ree.getGroupId() %>" key="no-site-exists-on-the-remote-server-with-site-id-x" />
+	</c:if>
+
+	<c:if test="<%= ree.getType() == RemoteExportException.NO_PERMISSIONS %>">
+		<liferay-ui:message arguments="<%= ree.getGroupId() %>" key="you-do-not-have-permissions-to-edit-the-site-with-id-x-on-the-remote-server" />
+	</c:if>
+</liferay-ui:error>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/error_remote_options_exception.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/error_remote_options_exception.jspf
new file mode 100644
index 0000000..2b1c3d4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/error_remote_options_exception.jspf
@@ -0,0 +1,38 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:error exception="<%= RemoteOptionsException.class %>">
+
+	<%
+	RemoteOptionsException roe = (RemoteOptionsException)errorException;
+	%>
+
+	<c:if test="<%= roe.getType() == RemoteOptionsException.REMOTE_ADDRESS %>">
+		<liferay-ui:message arguments="<%= roe.getRemoteAddress() %>" key="the-remote-address-x-is-not-valid" />
+	</c:if>
+
+	<c:if test="<%= roe.getType() == RemoteOptionsException.REMOTE_GROUP_ID %>">
+		<liferay-ui:message arguments="<%= roe.getRemoteGroupId() %>" key="the-remote-site-id-x-is-not-valid" />
+	</c:if>
+
+	<c:if test="<%= roe.getType() == RemoteOptionsException.REMOTE_PATH_CONTEXT %>">
+		<liferay-ui:message arguments="<%= roe.getRemotePathContext() %>" key="the-remote-path-context-x-is-not-valid" />
+	</c:if>
+
+	<c:if test="<%= roe.getType() == RemoteOptionsException.REMOTE_PORT %>">
+		<liferay-ui:message arguments="<%= roe.getRemotePort() %>" key="the-remote-port-x-is-not-valid" />
+	</c:if>
+</liferay-ui:error>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/export_layouts.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/export_layouts.jsp
new file mode 100644
index 0000000..1f07096
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/export_layouts.jsp
@@ -0,0 +1,632 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+long groupId = ParamUtil.getLong(request, "groupId");
+
+Group group = null;
+
+if (groupId > 0) {
+	group = GroupLocalServiceUtil.getGroup(groupId);
+}
+else {
+	group = (Group)request.getAttribute(WebKeys.GROUP);
+}
+
+Group liveGroup = group;
+
+if (group.isStagingGroup()) {
+	liveGroup = group.getLiveGroup();
+}
+
+long liveGroupId = ParamUtil.getLong(request, "liveGroupId", liveGroup.getGroupId());
+
+boolean privateLayout = ParamUtil.getBoolean(request, "privateLayout");
+
+String rootNodeName = ParamUtil.getString(request, "rootNodeName");
+
+DateRange dateRange = ExportImportHelperUtil.getDateRange(renderRequest, groupId, privateLayout, 0, null, "all");
+
+Date startDate = dateRange.getStartDate();
+Date endDate = dateRange.getEndDate();
+
+String treeId = "layoutsExportTree" + liveGroupId + privateLayout;
+
+long[] selectedLayoutIds = GetterUtil.getLongValues(StringUtil.split(SessionTreeJSClicks.getOpenNodes(request, treeId + "SelectedNode"), ','));
+
+List<Layout> selectedLayouts = new ArrayList<Layout>();
+
+for (int i = 0; i < selectedLayoutIds.length; i++) {
+	try {
+		selectedLayouts.add(LayoutLocalServiceUtil.getLayout(groupId, privateLayout, selectedLayoutIds[i]));
+	}
+	catch (NoSuchLayoutException nsle) {
+	}
+}
+
+if (selectedLayouts.isEmpty()) {
+	selectedLayouts = LayoutLocalServiceUtil.getLayouts(groupId, privateLayout);
+}
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/layouts_admin/export_layouts");
+portletURL.setParameter("tabs2", "current-and-previous");
+portletURL.setParameter("groupId", String.valueOf(groupId));
+portletURL.setParameter("liveGroupId", String.valueOf(liveGroupId));
+portletURL.setParameter("privateLayout", String.valueOf(privateLayout));
+portletURL.setParameter("rootNodeName", rootNodeName);
+%>
+
+<liferay-ui:tabs
+	names="new-export-process,current-and-previous"
+	param="tabs2"
+	refresh="<%= false %>"
+>
+	<liferay-ui:section>
+		<div id="<portlet:namespace />exportImportOptions">
+
+			<%
+			int incompleteBackgroundTaskCount = BackgroundTaskLocalServiceUtil.getBackgroundTasksCount(groupId, LayoutExportBackgroundTaskExecutor.class.getName(), false);
+			%>
+
+			<div class="<%= (incompleteBackgroundTaskCount == 0) ? "hide" : "in-progress" %>" id="<portlet:namespace />incompleteProcessMessage">
+				<liferay-util:include page="/html/portlet/layouts_admin/incomplete_processes_message.jsp">
+					<liferay-util:param name="incompleteBackgroundTaskCount" value="<%= String.valueOf(incompleteBackgroundTaskCount) %>" />
+				</liferay-util:include>
+			</div>
+
+			<portlet:actionURL var="exportPagesURL">
+				<portlet:param name="struts_action" value="/layouts_admin/export_layouts" />
+				<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+				<portlet:param name="privateLayout" value="<%= String.valueOf(privateLayout) %>" />
+				<portlet:param name="exportLAR" value="<%= Boolean.TRUE.toString() %>" />
+			</portlet:actionURL>
+
+			<aui:form action='<%= exportPagesURL + "&etag=0&strip=0" %>' cssClass="lfr-export-dialog" method="post" name="fm1">
+				<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.EXPORT %>" />
+				<aui:input name="redirect" type="hidden" value="<%= portletURL.toString() %>" />
+
+				<div class="export-dialog-tree">
+					<aui:input cssClass="file-selector" label="export-the-selected-data-to-the-given-lar-file-name" name="exportFileName" size="50" value='<%= HtmlUtil.escape(StringUtil.replace(rootNodeName, " ", "_")) + "-" + Time.getShortTimestamp() + ".lar" %>' />
+
+					<aui:input name="layoutIds" type="hidden" />
+
+					<c:if test="<%= !group.isLayoutPrototype() && !group.isCompany() %>">
+						<aui:fieldset cssClass="options-group" label="pages">
+							<span class="selected-labels" id="<portlet:namespace />selectedPages"></span>
+
+							<aui:a cssClass="modify-link" href="javascript:;" id="pagesLink" label="change" method="get" />
+
+							<div class="hide" id="<portlet:namespace />pages">
+								<aui:fieldset cssClass="portlet-data-section" label="pages-to-export">
+									<liferay-util:include page="/html/portlet/layouts_admin/tree_js.jsp">
+										<liferay-util:param name="tabs1" value='<%= privateLayout ? "private-pages" : "public-pages" %>' />
+										<liferay-util:param name="treeId" value="<%= treeId %>" />
+										<liferay-util:param name="defaultStateChecked" value="1" />
+										<liferay-util:param name="selectableTree" value="1" />
+									</liferay-util:include>
+
+									<aui:input label="site-pages-settings" name="<%= PortletDataHandlerKeys.LAYOUT_SET_SETTINGS %>" type="checkbox" value="<%= true %>" />
+								</aui:fieldset>
+
+								<aui:fieldset cssClass="portlet-data-section" label="look-and-feel">
+									<aui:input helpMessage="export-import-theme-settings-help" label="theme-settings" name="<%= PortletDataHandlerKeys.THEME_REFERENCE %>" type="checkbox" value="<%= true %>" />
+
+									<aui:input label="logo" name="<%= PortletDataHandlerKeys.LOGO %>" type="checkbox" value="<%= true %>" />
+								</aui:fieldset>
+							</div>
+						</aui:fieldset>
+					</c:if>
+
+					<%
+					List<Portlet> portletDataHandlerPortlets = LayoutExporter.getPortletDataHandlerPortlets(selectedLayouts);
+					%>
+
+					<c:if test="<%= !portletDataHandlerPortlets.isEmpty() %>">
+						<aui:fieldset cssClass="options-group" label="application-configuration">
+							<ul class="lfr-tree unstyled">
+								<li class="tree-item">
+									<aui:input checked="<%= true %>" helpMessage="all-applications-export-help" id="allApplications" label="all-applications" name="<%= PortletDataHandlerKeys.PORTLET_CONFIGURATION_ALL %>" type="radio" value="<%= true %>" />
+
+									<div class="hide" id="<portlet:namespace />globalConfiguration">
+										<aui:fieldset cssClass="portlet-data-section" label="all-applications">
+											<aui:input label="setup" name="<%= PortletDataHandlerKeys.PORTLET_SETUP_ALL %>" type="checkbox" value="<%= true %>" />
+
+											<aui:input label="archived-setups" name="<%= PortletDataHandlerKeys.PORTLET_ARCHIVED_SETUPS_ALL %>" type="checkbox" value="<%= true %>" />
+
+											<aui:input helpMessage="import-user-preferences-help" label="user-preferences" name="<%= PortletDataHandlerKeys.PORTLET_USER_PREFERENCES_ALL %>" type="checkbox" value="<%= true %>" />
+										</aui:fieldset>
+									</div>
+
+									<ul class="hide" id="<portlet:namespace />showChangeGlobalConfiguration">
+										<li class="tree-item">
+											<span class="selected-labels" id="<portlet:namespace />selectedGlobalConfiguration"></span>
+
+											<aui:a cssClass="modify-link" href="javascript:;" id="globalConfigurationLink" label="change" method="get" />
+										</li>
+									</ul>
+
+									<aui:input helpMessage="choose-applications-export-help" id="chooseApplications" label="choose-applications" name="<%= PortletDataHandlerKeys.PORTLET_CONFIGURATION_ALL %>" type="radio" value="<%= false %>" />
+
+									<c:if test="<%= !group.isLayoutPrototype() %>">
+										<ul class="hide options portlet-list select-options" id="<portlet:namespace />selectApplications">
+											<aui:input name="<%= PortletDataHandlerKeys.PORTLET_CONFIGURATION %>" type="hidden" value="<%= true %>" />
+
+											<%
+											portletDataHandlerPortlets = ListUtil.sort(portletDataHandlerPortlets, new PortletTitleComparator(application, locale));
+
+											for (Portlet portlet : portletDataHandlerPortlets) {
+												PortletDataHandler portletDataHandler = portlet.getPortletDataHandlerInstance();
+
+												PortletDataHandlerControl[] configurationControls = portletDataHandler.getExportConfigurationControls(company.getCompanyId(), groupId, portlet, privateLayout);
+
+												String portletTitle = PortalUtil.getPortletTitle(portlet, application, locale);
+											%>
+
+												<li class="tree-item">
+													<aui:input label="<%= portletTitle %>" name="<%= PortletDataHandlerKeys.PORTLET_CONFIGURATION + StringPool.UNDERLINE + portlet.getRootPortletId() %>" type="checkbox" value="<%= true %>" />
+
+													<div class="hide" id="<portlet:namespace />configuration_<%= portlet.getRootPortletId() %>">
+														<aui:fieldset cssClass="portlet-type-data-section" label="<%= portletTitle %>">
+															<ul class="lfr-tree unstyled">
+
+																<%
+																request.setAttribute("render_controls.jsp-action", Constants.EXPORT);
+																request.setAttribute("render_controls.jsp-controls", configurationControls);
+																request.setAttribute("render_controls.jsp-portletId", portlet.getRootPortletId());
+																%>
+
+																<liferay-util:include page="/html/portlet/layouts_admin/render_controls.jsp" />
+															</ul>
+														</aui:fieldset>
+													</div>
+
+													<ul class="hide" id="<portlet:namespace />showChangeConfiguration_<%= portlet.getRootPortletId() %>">
+														<li>
+															<span class="selected-labels" id="<portlet:namespace />selectedConfiguration_<%= portlet.getRootPortletId() %>"></span>
+
+															<%
+															Map<String,Object> data = new HashMap<String,Object>();
+
+															data.put("portletid", portlet.getRootPortletId());
+															data.put("portlettitle", portletTitle);
+															%>
+
+															<aui:a cssClass="configuration-link modify-link" data="<%= data %>" href="javascript:;" label="change" method="get" />
+														</li>
+													</ul>
+
+													<aui:script>
+														Liferay.Util.toggleBoxes('<portlet:namespace /><%= PortletDataHandlerKeys.PORTLET_CONFIGURATION + StringPool.UNDERLINE + portlet.getRootPortletId() %>Checkbox', '<portlet:namespace />showChangeConfiguration<%= StringPool.UNDERLINE + portlet.getRootPortletId() %>');
+													</aui:script>
+												</li>
+
+											<%
+											}
+											%>
+
+										</ul>
+									</c:if>
+								</li>
+							</ul>
+						</aui:fieldset>
+					</c:if>
+
+					<%
+					List<Portlet> dataSiteLevelPortlets = LayoutExporter.getDataSiteLevelPortlets(company.getCompanyId());
+
+					PortletDataContext portletDataContext = PortletDataContextFactoryUtil.createPreparePortletDataContext(themeDisplay, startDate, endDate);
+
+					ManifestSummary manifestSummary = portletDataContext.getManifestSummary();
+					%>
+
+					<c:if test="<%= !dataSiteLevelPortlets.isEmpty() %>">
+						<aui:fieldset cssClass="options-group" label="content">
+							<ul class="lfr-tree unstyled">
+								<li class="tree-item">
+									<aui:input checked="<%= true %>" helpMessage="all-content-export-help" id="allContent" label="all-content" name="<%= PortletDataHandlerKeys.PORTLET_DATA_ALL %>" type="radio" value="<%= true %>" />
+
+									<aui:input helpMessage="choose-content-export-help" id="chooseContent" label="choose-content" name="<%= PortletDataHandlerKeys.PORTLET_DATA_ALL %>" type="radio" value="<%= false %>" />
+
+									<ul class="hide select-options" id="<portlet:namespace />selectContents">
+										<li>
+											<aui:input name="<%= PortletDataHandlerKeys.PORTLET_DATA_CONTROL_DEFAULT %>" type="hidden" value="<%= true %>" />
+
+											<aui:input name="<%= PortletDataHandlerKeys.PORTLET_DATA %>" type="hidden" value="<%= true %>" />
+
+											<div class="hide" id="<portlet:namespace />range">
+												<ul class="lfr-tree unstyled">
+													<li class="tree-item">
+														<aui:fieldset cssClass="portlet-data-section" label="date-range">
+															<aui:input checked="<%= true %>" id="rangeAll" label="all" name="range" type="radio" value="all" />
+
+															<aui:input helpMessage="export-date-range-help" id="rangeDateRange" label="date-range" name="range" type="radio" value="dateRange" />
+
+															<%
+															Calendar endCalendar = CalendarFactoryUtil.getCalendar(timeZone, locale);
+
+															if (endDate != null) {
+																endCalendar.setTime(endDate);
+															}
+
+															Calendar startCalendar = CalendarFactoryUtil.getCalendar(timeZone, locale);
+
+															if (startDate != null) {
+																startCalendar.setTime(startDate);
+															}
+															else {
+																startCalendar.add(Calendar.DATE, -1);
+															}
+															%>
+
+															<ul class="date-range-options hide unstyled" id="<portlet:namespace />startEndDate">
+																<li>
+																	<aui:fieldset label="start-date">
+																		<liferay-ui:input-date
+																			dayParam="startDateDay"
+																			dayValue="<%= startCalendar.get(Calendar.DATE) %>"
+																			disabled="<%= false %>"
+																			firstDayOfWeek="<%= startCalendar.getFirstDayOfWeek() - 1 %>"
+																			monthParam="startDateMonth"
+																			monthValue="<%= startCalendar.get(Calendar.MONTH) %>"
+																			name="startDate"
+																			yearParam="startDateYear"
+																			yearValue="<%= startCalendar.get(Calendar.YEAR) %>"
+																		/>
+
+																		&nbsp;
+
+																		<liferay-ui:input-time
+																			amPmParam='<%= "startDateAmPm" %>'
+																			amPmValue="<%= startCalendar.get(Calendar.AM_PM) %>"
+																			dateParam="startDateTime"
+																			dateValue="<%= startCalendar.getTime() %>"
+																			disabled="<%= false %>"
+																			hourParam='<%= "startDateHour" %>'
+																			hourValue="<%= startCalendar.get(Calendar.HOUR) %>"
+																			minuteParam='<%= "startDateMinute" %>'
+																			minuteValue="<%= startCalendar.get(Calendar.MINUTE) %>"
+																			name="startTime"
+																		/>
+																	</aui:fieldset>
+																</li>
+
+																<li>
+																	<aui:fieldset label="end-date">
+																		<liferay-ui:input-date
+																			dayParam="endDateDay"
+																			dayValue="<%= endCalendar.get(Calendar.DATE) %>"
+																			disabled="<%= false %>"
+																			firstDayOfWeek="<%= endCalendar.getFirstDayOfWeek() - 1 %>"
+																			monthParam="endDateMonth"
+																			monthValue="<%= endCalendar.get(Calendar.MONTH) %>"
+																			name="endDate"
+																			yearParam="endDateYear"
+																			yearValue="<%= endCalendar.get(Calendar.YEAR) %>"
+																		/>
+
+																		&nbsp;
+
+																		<liferay-ui:input-time
+																			amPmParam='<%= "endDateAmPm" %>'
+																			amPmValue="<%= endCalendar.get(Calendar.AM_PM) %>"
+																			dateParam="startDateTime"
+																			dateValue="<%= endCalendar.getTime() %>"
+																			disabled="<%= false %>"
+																			hourParam='<%= "endDateHour" %>'
+																			hourValue="<%= endCalendar.get(Calendar.HOUR) %>"
+																			minuteParam='<%= "endDateMinute" %>'
+																			minuteValue="<%= endCalendar.get(Calendar.MINUTE) %>"
+																			name="endTime"
+																		/>
+																	</aui:fieldset>
+																</li>
+															</ul>
+
+															<aui:input id="rangeLast" label='<%= LanguageUtil.get(pageContext, "last") + StringPool.TRIPLE_PERIOD %>' name="range" type="radio" value="last" />
+
+															<ul class="hide unstyled" id="<portlet:namespace />rangeLastInputs">
+																<li>
+																	<aui:select cssClass="relative-range" label="" name="last">
+																		<aui:option label='<%= LanguageUtil.format(pageContext, "x-hours", "12") %>' value="12" />
+																		<aui:option label='<%= LanguageUtil.format(pageContext, "x-hours", "24") %>' value="24" />
+																		<aui:option label='<%= LanguageUtil.format(pageContext, "x-hours", "48") %>' value="48" />
+																		<aui:option label='<%= LanguageUtil.format(pageContext, "x-days", "7") %>' value="168" />
+																	</aui:select>
+																</li>
+															</ul>
+														</aui:fieldset>
+													</li>
+												</ul>
+											</div>
+
+											<liferay-util:buffer var="selectedLabelsHTML">
+												<span class="selected-labels" id="<portlet:namespace />selectedRange"></span>
+
+												<aui:a cssClass="modify-link" href="javascript:;" id="rangeLink" label="change" method="get" />
+											</liferay-util:buffer>
+
+											<liferay-ui:icon
+												image="calendar"
+												label="<%= true %>"
+												message='<%= LanguageUtil.get(locale, "date-range") + selectedLabelsHTML %>'
+											/>
+										</li>
+
+										<li class="options">
+											<ul class="portlet-list">
+												<li class="tree-item">
+													<aui:input helpMessage="export-import-categories-help" label="categories" name="<%= PortletDataHandlerKeys.CATEGORIES %>" type="checkbox" value="<%= true %>" />
+												</li>
+
+												<%
+												Set<String> displayedControls = new HashSet<String>();
+												Set<String> portletDataHandlerClasses = new HashSet<String>();
+
+												dataSiteLevelPortlets = ListUtil.sort(dataSiteLevelPortlets, new PortletTitleComparator(application, locale));
+
+												for (Portlet portlet : dataSiteLevelPortlets) {
+													String portletDataHandlerClass = portlet.getPortletDataHandlerClass();
+
+													if (!portletDataHandlerClasses.contains(portletDataHandlerClass)) {
+														portletDataHandlerClasses.add(portletDataHandlerClass);
+													}
+													else {
+														continue;
+													}
+
+													String portletTitle = PortalUtil.getPortletTitle(portlet, application, locale);
+
+													PortletDataHandler portletDataHandler = portlet.getPortletDataHandlerInstance();
+
+													portletDataHandler.prepareManifestSummary(portletDataContext);
+
+													long exportModelCount = portletDataHandler.getExportModelCount(manifestSummary);
+
+													long modelDeletionCount = manifestSummary.getModelDeletionCount(portletDataHandler.getDeletionSystemEventStagedModelTypes());
+												%>
+
+													<c:if test="<%= (exportModelCount != 0) || (modelDeletionCount != 0) %>">
+														<li class="tree-item">
+															<liferay-util:buffer var="badgeHTML">
+																<span class="badge badge-info"><%= exportModelCount > 0 ? exportModelCount : StringPool.BLANK %></span>
+																<span class="badge badge-warning deletions"><%= modelDeletionCount > 0 ? (modelDeletionCount + StringPool.SPACE + LanguageUtil.get(pageContext, "deletions")) : StringPool.BLANK %></span>
+															</liferay-util:buffer>
+
+															<aui:input checked="<%= portletDataHandler.isPublishToLiveByDefault() %>" label="<%= portletTitle + badgeHTML %>" name="<%= PortletDataHandlerKeys.PORTLET_DATA + StringPool.UNDERLINE + portlet.getPortletId() %>" type="checkbox" />
+
+															<%
+															PortletDataHandlerControl[] exportControls = portletDataHandler.getExportControls();
+															PortletDataHandlerControl[] metadataControls = portletDataHandler.getExportMetadataControls();
+
+															if (ArrayUtil.isNotEmpty(exportControls) || ArrayUtil.isNotEmpty(metadataControls)) {
+															%>
+
+																<div class="hide" id="<portlet:namespace />content_<%= portlet.getPortletId() %>">
+																	<ul class="lfr-tree unstyled">
+																		<li class="tree-item">
+																			<aui:fieldset cssClass="portlet-type-data-section" label="<%= portletTitle %>">
+
+																				<%
+																				if (exportControls != null) {
+																					request.setAttribute("render_controls.jsp-action", Constants.EXPORT);
+																					request.setAttribute("render_controls.jsp-controls", exportControls);
+																					request.setAttribute("render_controls.jsp-manifestSummary", manifestSummary);
+																					request.setAttribute("render_controls.jsp-portletDisabled", !portletDataHandler.isPublishToLiveByDefault());
+																				%>
+
+																					<aui:field-wrapper label='<%= ArrayUtil.isNotEmpty(metadataControls) ? "content" : StringPool.BLANK %>'>
+																						<ul class="lfr-tree unstyled">
+																							<liferay-util:include page="/html/portlet/layouts_admin/render_controls.jsp" />
+																						</ul>
+																					</aui:field-wrapper>
+
+																				<%
+																				}
+
+																				if (metadataControls != null) {
+																					for (PortletDataHandlerControl metadataControl : metadataControls) {
+																						if (!displayedControls.contains(metadataControl.getControlName())) {
+																							displayedControls.add(metadataControl.getControlName());
+																						}
+																						else {
+																							continue;
+																						}
+
+																						PortletDataHandlerBoolean control = (PortletDataHandlerBoolean)metadataControl;
+
+																						PortletDataHandlerControl[] childrenControls = control.getChildren();
+
+																						if (ArrayUtil.isNotEmpty(childrenControls)) {
+																							request.setAttribute("render_controls.jsp-controls", childrenControls);
+																						%>
+
+																						<aui:field-wrapper label="content-metadata">
+																							<ul class="lfr-tree unstyled">
+																								<liferay-util:include page="/html/portlet/layouts_admin/render_controls.jsp" />
+																							</ul>
+																						</aui:field-wrapper>
+
+																						<%
+																						}
+																					}
+																				}
+																				%>
+
+																			</aui:fieldset>
+																		</li>
+																	</ul>
+																</div>
+
+																<ul class="hide" id="<portlet:namespace />showChangeContent_<%= portlet.getPortletId() %>">
+																	<li>
+																		<span class="selected-labels" id="<portlet:namespace />selectedContent_<%= portlet.getPortletId() %>"></span>
+
+																		<%
+																		Map<String,Object> data = new HashMap<String,Object>();
+
+																		data.put("portletid", portlet.getPortletId());
+																		data.put("portlettitle", portletTitle);
+																		%>
+
+																		<aui:a cssClass="content-link modify-link" data="<%= data %>" href="javascript:;" id='<%= "contentLink_" + portlet.getPortletId() %>' label="change" method="get" />
+																	</li>
+																</ul>
+
+																<aui:script>
+																	Liferay.Util.toggleBoxes('<portlet:namespace /><%= PortletDataHandlerKeys.PORTLET_DATA + StringPool.UNDERLINE + portlet.getPortletId() %>Checkbox', '<portlet:namespace />showChangeContent<%= StringPool.UNDERLINE + portlet.getPortletId() %>');
+																</aui:script>
+
+															<%
+															}
+															%>
+
+														</li>
+													</c:if>
+
+												<%
+												}
+												%>
+
+											</ul>
+
+											<aui:fieldset cssClass="content-options" label="for-each-of-the-selected-content-types,-export-their">
+												<span class="selected-labels" id="<portlet:namespace />selectedContentOptions"></span>
+
+												<aui:a cssClass="modify-link" href="javascript:;" id="contentOptionsLink" label="change" method="get" />
+
+												<div class="hide" id="<portlet:namespace />contentOptions">
+													<ul class="lfr-tree unstyled">
+														<li class="tree-item">
+															<aui:input label="comments" name="<%= PortletDataHandlerKeys.COMMENTS %>" type="checkbox" value="<%= true %>" />
+
+															<aui:input label="ratings" name="<%= PortletDataHandlerKeys.RATINGS %>" type="checkbox" value="<%= true %>" />
+
+															<%
+															long modelDeletionCount = manifestSummary.getModelDeletionCount();
+															%>
+
+															<c:if test="<%= modelDeletionCount != 0 %>">
+
+																<%
+																String deletionsLabel = LanguageUtil.get(pageContext, "deletions") + (modelDeletionCount > 0 ? " (" + modelDeletionCount + ")" : StringPool.BLANK);
+																%>
+
+																<aui:input data-name="<%= deletionsLabel %>" helpMessage="deletions-help" label="<%= deletionsLabel %>" name="<%= PortletDataHandlerKeys.DELETIONS %>" type="checkbox" />
+															</c:if>
+														</li>
+													</ul>
+												</div>
+											</aui:fieldset>
+										</li>
+									</ul>
+								</li>
+							</ul>
+						</aui:fieldset>
+					</c:if>
+
+					<aui:fieldset cssClass="options-group" label="permissions">
+						<ul class="lfr-tree unstyled">
+							<li class="tree-item">
+								<aui:input label="permissions" name="<%= PortletDataHandlerKeys.PERMISSIONS %>" type="checkbox" />
+
+								<ul id="<portlet:namespace />selectPermissions">
+									<li>
+										<aui:input label="permissions-assigned-to-roles" name="permissionsAssignedToRoles" type="checkbox" value="<%= true %>" />
+									</li>
+								</ul>
+
+								<aui:script>
+									Liferay.Util.toggleBoxes('<portlet:namespace /><%= PortletDataHandlerKeys.PERMISSIONS %>Checkbox', '<portlet:namespace />selectPermissions');
+								</aui:script>
+							</li>
+						</ul>
+					</aui:fieldset>
+				</div>
+
+				<aui:button-row>
+					<aui:button type="submit" value="export" />
+
+					<aui:button href="<%= currentURL %>" type="cancel" />
+				</aui:button-row>
+			</aui:form>
+		</div>
+	</liferay-ui:section>
+
+	<liferay-ui:section>
+		<div class="process-list" id="<portlet:namespace />exportProcesses">
+			<liferay-util:include page="/html/portlet/layouts_admin/export_layouts_processes.jsp" />
+		</div>
+	</liferay-ui:section>
+</liferay-ui:tabs>
+
+<aui:script use="liferay-export-import">
+	<liferay-portlet:resourceURL copyCurrentRenderParameters="<%= false %>" var="exportProcessesURL">
+		<portlet:param name="struts_action" value="/layouts_admin/export_layouts" />
+		<portlet:param name="<%= SearchContainer.DEFAULT_CUR_PARAM %>" value="<%= ParamUtil.getString(request, SearchContainer.DEFAULT_CUR_PARAM) %>" />
+		<portlet:param name="<%= SearchContainer.DEFAULT_DELTA_PARAM %>" value="<%= ParamUtil.getString(request, SearchContainer.DEFAULT_DELTA_PARAM) %>" />
+		<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+	</liferay-portlet:resourceURL>
+
+	new Liferay.ExportImport(
+		{
+			archivedSetupsNode: '#<%= PortletDataHandlerKeys.PORTLET_ARCHIVED_SETUPS_ALL %>Checkbox',
+			commentsNode: '#<%= PortletDataHandlerKeys.COMMENTS %>Checkbox',
+			deletionsNode: '#<%= PortletDataHandlerKeys.DELETIONS %>Checkbox',
+			form: document.<portlet:namespace />fm1,
+			incompleteProcessMessageNode: '#<portlet:namespace />incompleteProcessMessage',
+			layoutSetSettingsNode: '#<%= PortletDataHandlerKeys.LAYOUT_SET_SETTINGS %>Checkbox',
+			logoNode: '#<%= PortletDataHandlerKeys.LOGO %>Checkbox',
+			namespace: '<portlet:namespace />',
+			pageTreeId: '<%= treeId %>',
+			processesNode: '#exportProcesses',
+			processesResourceURL: '<%= exportProcessesURL.toString() %>',
+			rangeAllNode: '#rangeAll',
+			rangeDateRangeNode: '#rangeDateRange',
+			rangeLastNode: '#rangeLast',
+			ratingsNode: '#<%= PortletDataHandlerKeys.RATINGS %>Checkbox',
+			setupNode: '#<%= PortletDataHandlerKeys.PORTLET_SETUP_ALL %>Checkbox',
+			themeReferenceNode: '#<%= PortletDataHandlerKeys.THEME_REFERENCE %>Checkbox',
+			userPreferencesNode: '#<%= PortletDataHandlerKeys.PORTLET_USER_PREFERENCES_ALL %>Checkbox'
+		}
+	);
+
+	var form = A.one('#<portlet:namespace />fm1');
+
+	form.on(
+		'submit',
+		function(event) {
+			event.preventDefault();
+
+			submitForm(form, form.attr('action'), false);
+		}
+	);
+</aui:script>
+
+<aui:script>
+	Liferay.Util.toggleRadio('<portlet:namespace />chooseApplications', '<portlet:namespace />selectApplications', ['<portlet:namespace />showChangeGlobalConfiguration']);
+	Liferay.Util.toggleRadio('<portlet:namespace />allApplications', '<portlet:namespace />showChangeGlobalConfiguration', ['<portlet:namespace />selectApplications']);
+
+	Liferay.Util.toggleRadio('<portlet:namespace />rangeAll', '', ['<portlet:namespace />startEndDate', '<portlet:namespace />rangeLastInputs']);
+	Liferay.Util.toggleRadio('<portlet:namespace />rangeDateRange', '<portlet:namespace />startEndDate', '<portlet:namespace />rangeLastInputs');
+	Liferay.Util.toggleRadio('<portlet:namespace />rangeLast', '<portlet:namespace />rangeLastInputs', ['<portlet:namespace />startEndDate']);
+
+	Liferay.Util.toggleRadio('<portlet:namespace />chooseContent', '<portlet:namespace />selectContents', ['<portlet:namespace />showChangeGlobalContent']);
+	Liferay.Util.toggleRadio('<portlet:namespace />allContent', '<portlet:namespace />showChangeGlobalContent', ['<portlet:namespace />selectContents']);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/export_layouts_processes.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/export_layouts_processes.jsp
new file mode 100644
index 0000000..6bce215
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/export_layouts_processes.jsp
@@ -0,0 +1,167 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+long groupId = ParamUtil.getLong(request, "groupId");
+
+PortletURL portletURL = liferayPortletResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/layouts_admin/export_layouts");
+portletURL.setParameter("tabs2", "current-and-previous");
+portletURL.setParameter("groupId", String.valueOf(groupId));
+
+String orderByCol = ParamUtil.getString(request, "orderByCol");
+String orderByType = ParamUtil.getString(request, "orderByType");
+
+if (Validator.isNotNull(orderByCol) && Validator.isNotNull(orderByType)) {
+	portalPreferences.setValue(PortletKeys.BACKGROUND_TASK, "entries-order-by-col", orderByCol);
+	portalPreferences.setValue(PortletKeys.BACKGROUND_TASK, "entries-order-by-type", orderByType);
+}
+else {
+	orderByCol = portalPreferences.getValue(PortletKeys.BACKGROUND_TASK, "entries-order-by-col", "create-date");
+	orderByType = portalPreferences.getValue(PortletKeys.BACKGROUND_TASK, "entries-order-by-type", "desc");
+}
+
+OrderByComparator orderByComparator = BackgroundTaskComparatorFactoryUtil.getBackgroundTaskOrderByComparator(orderByCol, orderByType);
+%>
+
+<liferay-ui:search-container
+	emptyResultsMessage="no-export-processes-were-found"
+	iteratorURL="<%= portletURL %>"
+	orderByCol="<%= orderByCol %>"
+	orderByComparator="<%= orderByComparator %>"
+	orderByType="<%= orderByType %>"
+	total="<%= BackgroundTaskLocalServiceUtil.getBackgroundTasksCount(groupId, LayoutExportBackgroundTaskExecutor.class.getName()) %>"
+>
+	<liferay-ui:search-container-results
+		results="<%= BackgroundTaskLocalServiceUtil.getBackgroundTasks(groupId, LayoutExportBackgroundTaskExecutor.class.getName(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator()) %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.BackgroundTask"
+		keyProperty="backgroundTaskId"
+		modelVar="backgroundTask"
+	>
+		<liferay-ui:search-container-column-text
+			name="user-name"
+			value="<%= HtmlUtil.escape(backgroundTask.getUserName()) %>"
+		/>
+
+		<liferay-ui:search-container-column-jsp
+			cssClass="background-task-status-column"
+			name="status"
+			path="/html/portlet/layouts_admin/publish_process_message.jsp"
+		/>
+
+		<liferay-ui:search-container-column-date
+			name="create-date"
+			orderable="<%= true %>"
+			value="<%= backgroundTask.getCreateDate() %>"
+		/>
+
+		<liferay-ui:search-container-column-date
+			name="completion-date"
+			orderable="<%= true %>"
+			value="<%= backgroundTask.getCompletionDate() %>"
+		/>
+
+		<liferay-ui:search-container-column-text
+			name="download"
+		>
+
+			<%
+			List<FileEntry> attachmentsFileEntries = backgroundTask.getAttachmentsFileEntries();
+			%>
+
+			<c:choose>
+				<c:when test="<%= !attachmentsFileEntries.isEmpty() %>">
+
+					<%
+					for (FileEntry fileEntry : attachmentsFileEntries) {
+					%>
+
+						<%
+						StringBundler sb = new StringBundler(4);
+
+						sb.append(fileEntry.getTitle());
+						sb.append(StringPool.OPEN_PARENTHESIS);
+						sb.append(TextFormatter.formatStorageSize(fileEntry.getSize(), locale));
+						sb.append(StringPool.CLOSE_PARENTHESIS);
+						%>
+
+						<liferay-ui:icon
+							image="download"
+							label="<%= true %>"
+							message="<%= sb.toString() %>"
+							url="<%= PortletFileRepositoryUtil.getPortletFileEntryURL(themeDisplay, fileEntry, StringPool.BLANK) %>"
+						/>
+
+					<%
+					}
+					%>
+
+				</c:when>
+				<c:otherwise>
+
+					<%
+					Map taskContextMap = backgroundTask.getTaskContextMap();
+					%>
+
+					<liferay-ui:icon
+						image="download"
+						label="<%= true %>"
+						message='<%= HtmlUtil.escape(MapUtil.getString(taskContextMap, "fileName")) %>'
+					/>
+				</c:otherwise>
+			</c:choose>
+
+		</liferay-ui:search-container-column-text>
+
+		<liferay-ui:search-container-column-text>
+			<c:if test="<%= !backgroundTask.isInProgress() %>">
+				<portlet:actionURL var="deleteBackgroundTaskURL">
+					<portlet:param name="struts_action" value="/group_pages/delete_background_task" />
+					<portlet:param name="redirect" value="<%= portletURL.toString() %>" />
+					<portlet:param name="backgroundTaskId" value="<%= String.valueOf(backgroundTask.getBackgroundTaskId()) %>" />
+				</portlet:actionURL>
+
+				<%
+				Date completionDate = backgroundTask.getCompletionDate();
+				%>
+
+				<liferay-ui:icon-delete
+					label="true"
+					message='<%= ((completionDate != null) && completionDate.before(new Date())) ? "clear" : "cancel" %>'
+					url="<%= deleteBackgroundTaskURL %>"
+				/>
+			</c:if>
+		</liferay-ui:search-container-column-text>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
+
+<%
+int incompleteBackgroundTaskCount = BackgroundTaskLocalServiceUtil.getBackgroundTasksCount(groupId, LayoutExportBackgroundTaskExecutor.class.getName(), false);
+%>
+
+<div class="hide incomplete-process-message">
+	<liferay-util:include page="/html/portlet/layouts_admin/incomplete_processes_message.jsp">
+		<liferay-util:param name="incompleteBackgroundTaskCount" value="<%= String.valueOf(incompleteBackgroundTaskCount) %>" />
+	</liferay-util:include>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/import_layouts.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/import_layouts.jsp
new file mode 100644
index 0000000..cd99627
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/import_layouts.jsp
@@ -0,0 +1,80 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+long groupId = ParamUtil.getLong(request, "groupId");
+boolean validate = ParamUtil.getBoolean(request, "validate", true);
+
+String[] tempFileEntryNames = LayoutServiceUtil.getTempFileEntryNames(groupId, ExportImportHelper.TEMP_FOLDER_NAME);
+%>
+
+<liferay-ui:tabs
+	names="new-import-process,current-and-previous"
+	param="tabs2"
+	refresh="<%= false %>"
+>
+	<liferay-ui:section>
+		<div id="<portlet:namespace />exportImportOptions">
+
+			<%
+			int incompleteBackgroundTaskCount = BackgroundTaskLocalServiceUtil.getBackgroundTasksCount(groupId, LayoutImportBackgroundTaskExecutor.class.getName(), false);
+			%>
+
+			<div class="<%= (incompleteBackgroundTaskCount == 0) ? "hide" : "in-progress" %>" id="<portlet:namespace />incompleteProcessMessage">
+				<liferay-util:include page="/html/portlet/layouts_admin/incomplete_processes_message.jsp">
+					<liferay-util:param name="incompleteBackgroundTaskCount" value="<%= String.valueOf(incompleteBackgroundTaskCount) %>" />
+				</liferay-util:include>
+			</div>
+
+			<c:choose>
+				<c:when test="<%= (tempFileEntryNames.length > 0) && !validate %>">
+					<liferay-util:include page="/html/portlet/layouts_admin/import_layouts_resources.jsp" />
+				</c:when>
+				<c:otherwise>
+					<liferay-util:include page="/html/portlet/layouts_admin/import_layouts_validation.jsp" />
+				</c:otherwise>
+			</c:choose>
+		</div>
+	</liferay-ui:section>
+
+	<liferay-ui:section>
+		<div class="process-list" id="<portlet:namespace />importProcesses">
+			<liferay-util:include page="/html/portlet/layouts_admin/import_layouts_processes.jsp" />
+		</div>
+	</liferay-ui:section>
+</liferay-ui:tabs>
+
+<aui:script use="liferay-export-import">
+	<liferay-portlet:resourceURL copyCurrentRenderParameters="<%= false %>" var="importProcessesURL">
+		<portlet:param name="struts_action" value="/layouts_admin/import_layouts" />
+		<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.IMPORT %>" />
+		<portlet:param name="<%= SearchContainer.DEFAULT_CUR_PARAM %>" value="<%= ParamUtil.getString(request, SearchContainer.DEFAULT_CUR_PARAM) %>" />
+		<portlet:param name="<%= SearchContainer.DEFAULT_DELTA_PARAM %>" value="<%= ParamUtil.getString(request, SearchContainer.DEFAULT_DELTA_PARAM) %>" />
+		<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+	</liferay-portlet:resourceURL>
+
+	new Liferay.ExportImport(
+		{
+			form: document.<portlet:namespace />fm1,
+			incompleteProcessMessageNode: '#<portlet:namespace />incompleteProcessMessage',
+			namespace: '<portlet:namespace />',
+			processesNode: '#importProcesses',
+			processesResourceURL: '<%= importProcessesURL.toString() %>'
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/import_layouts_processes.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/import_layouts_processes.jsp
new file mode 100644
index 0000000..f8a1646
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/import_layouts_processes.jsp
@@ -0,0 +1,117 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+long groupId = ParamUtil.getLong(request, "groupId");
+boolean privateLayout = ParamUtil.getBoolean(request, "privateLayout");
+
+PortletURL portletURL = liferayPortletResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/layouts_admin/import_layouts");
+portletURL.setParameter("tabs2", "current-and-previous");
+portletURL.setParameter("groupId", String.valueOf(groupId));
+portletURL.setParameter("privateLayout", String.valueOf(privateLayout));
+
+String orderByCol = ParamUtil.getString(request, "orderByCol");
+String orderByType = ParamUtil.getString(request, "orderByType");
+
+if (Validator.isNotNull(orderByCol) && Validator.isNotNull(orderByType)) {
+	portalPreferences.setValue(PortletKeys.BACKGROUND_TASK, "entries-order-by-col", orderByCol);
+	portalPreferences.setValue(PortletKeys.BACKGROUND_TASK, "entries-order-by-type", orderByType);
+}
+else {
+	orderByCol = portalPreferences.getValue(PortletKeys.BACKGROUND_TASK, "entries-order-by-col", "create-date");
+	orderByType = portalPreferences.getValue(PortletKeys.BACKGROUND_TASK, "entries-order-by-type", "desc");
+}
+
+OrderByComparator orderByComparator = BackgroundTaskComparatorFactoryUtil.getBackgroundTaskOrderByComparator(orderByCol, orderByType);
+%>
+
+<liferay-ui:search-container
+	emptyResultsMessage="no-import-processes-were-found"
+	iteratorURL="<%= portletURL %>"
+	orderByCol="<%= orderByCol %>"
+	orderByComparator="<%= orderByComparator %>"
+	orderByType="<%= orderByType %>"
+	total="<%= BackgroundTaskLocalServiceUtil.getBackgroundTasksCount(groupId, LayoutImportBackgroundTaskExecutor.class.getName()) %>"
+>
+	<liferay-ui:search-container-results
+		results="<%= BackgroundTaskLocalServiceUtil.getBackgroundTasks(groupId, LayoutImportBackgroundTaskExecutor.class.getName(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator()) %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.BackgroundTask"
+		keyProperty="backgroundTaskId"
+		modelVar="backgroundTask"
+	>
+		<liferay-ui:search-container-column-text
+			name="user-name"
+			value="<%= HtmlUtil.escape(backgroundTask.getUserName()) %>"
+		/>
+
+		<liferay-ui:search-container-column-jsp
+			cssClass="background-task-status-column"
+			name="status"
+			path="/html/portlet/layouts_admin/publish_process_message.jsp"
+		/>
+
+		<liferay-ui:search-container-column-date
+			name="create-date"
+			orderable="<%= true %>"
+			value="<%= backgroundTask.getCreateDate() %>"
+		/>
+
+		<liferay-ui:search-container-column-date
+			name="completion-date"
+			orderable="<%= true %>"
+			value="<%= backgroundTask.getCompletionDate() %>"
+		/>
+
+		<liferay-ui:search-container-column-text>
+			<c:if test="<%= !backgroundTask.isInProgress() %>">
+				<portlet:actionURL var="deleteBackgroundTaskURL">
+					<portlet:param name="struts_action" value="/group_pages/delete_background_task" />
+					<portlet:param name="redirect" value="<%= portletURL.toString() %>" />
+					<portlet:param name="backgroundTaskId" value="<%= String.valueOf(backgroundTask.getBackgroundTaskId()) %>" />
+				</portlet:actionURL>
+
+				<%
+				Date completionDate = backgroundTask.getCompletionDate();
+				%>
+
+				<liferay-ui:icon-delete
+					label="true"
+					message='<%= ((completionDate != null) && completionDate.before(new Date())) ? "clear" : "cancel" %>'
+					url="<%= deleteBackgroundTaskURL %>"
+				/>
+			</c:if>
+		</liferay-ui:search-container-column-text>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
+
+<%
+int incompleteBackgroundTaskCount = BackgroundTaskLocalServiceUtil.getBackgroundTasksCount(groupId, LayoutImportBackgroundTaskExecutor.class.getName(), false);
+%>
+
+<div class="hide incomplete-process-message">
+	<liferay-util:include page="/html/portlet/layouts_admin/incomplete_processes_message.jsp">
+		<liferay-util:param name="incompleteBackgroundTaskCount" value="<%= String.valueOf(incompleteBackgroundTaskCount) %>" />
+	</liferay-util:include>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/import_layouts_resources.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/import_layouts_resources.jsp
new file mode 100644
index 0000000..ac2797d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/import_layouts_resources.jsp
@@ -0,0 +1,596 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+long groupId = ParamUtil.getLong(request, "groupId");
+
+Group group = null;
+
+if (groupId > 0) {
+	group = GroupLocalServiceUtil.getGroup(groupId);
+}
+else {
+	group = (Group)request.getAttribute(WebKeys.GROUP);
+}
+
+Group liveGroup = group;
+
+if (group.isStagingGroup()) {
+	liveGroup = group.getLiveGroup();
+}
+
+boolean privateLayout = ParamUtil.getBoolean(request, "privateLayout");
+
+FileEntry fileEntry = ExportImportHelperUtil.getTempFileEntry(groupId, themeDisplay.getUserId(), ExportImportHelper.TEMP_FOLDER_NAME);
+
+ManifestSummary manifestSummary = ExportImportHelperUtil.getManifestSummary(user.getUserId(), themeDisplay.getSiteGroupId(), new HashMap<String, String[]>(), fileEntry);
+%>
+
+<liferay-ui:error exception="<%= LARFileException.class %>" message="please-specify-a-lar-file-to-import" />
+
+<liferay-ui:error exception="<%= LARFileSizeException.class %>">
+	<liferay-ui:message arguments="<%= PrefsPropsUtil.getLong(PropsKeys.UPLOAD_SERVLET_REQUEST_IMPL_MAX_SIZE) / 1024 %>" key="please-enter-a-file-with-a-valid-file-size-no-larger-than-x" />
+</liferay-ui:error>
+
+<liferay-ui:error exception="<%= LARTypeException.class %>">
+
+	<%
+	LARTypeException lpe = (LARTypeException)errorException;
+	%>
+
+	<liferay-ui:message arguments="<%= lpe.getMessage() %>" key="please-import-a-lar-file-of-the-correct-type-x-is-not-valid" />
+</liferay-ui:error>
+
+<liferay-ui:error exception="<%= LayoutImportException.class %>" message="an-unexpected-error-occurred-while-importing-your-file" />
+
+<liferay-ui:error exception="<%= LayoutPrototypeException.class %>">
+
+	<%
+	LayoutPrototypeException lpe = (LayoutPrototypeException)errorException;
+	%>
+
+	<liferay-ui:message key="the-lar-file-could-not-be-imported-because-it-requires-page-templates-or-site-templates-that-could-not-be-found.-please-import-the-following-templates-manually" />
+
+	<ul>
+
+		<%
+		List<Tuple> missingLayoutPrototypes = lpe.getMissingLayoutPrototypes();
+
+		for (Tuple missingLayoutPrototype : missingLayoutPrototypes) {
+			String layoutPrototypeClassName = (String)missingLayoutPrototype.getObject(0);
+			String layoutPrototypeUuid = (String)missingLayoutPrototype.getObject(1);
+			String layoutPrototypeName = (String)missingLayoutPrototype.getObject(2);
+		%>
+
+			<li>
+				<%= ResourceActionsUtil.getModelResource(locale, layoutPrototypeClassName) %>: <strong><%= layoutPrototypeName %></strong> (<%= layoutPrototypeUuid %>)
+			</li>
+
+		<%
+		}
+		%>
+
+	</ul>
+</liferay-ui:error>
+
+<liferay-ui:error exception="<%= LocaleException.class %>">
+
+	<%
+	LocaleException le = (LocaleException)errorException;
+	%>
+
+	<c:if test="<%= le.getType() == LocaleException.TYPE_EXPORT_IMPORT %>">
+		<liferay-ui:message arguments="<%= new String[] {StringUtil.merge(le.getSourceAvailableLocales(), StringPool.COMMA_AND_SPACE), StringUtil.merge(le.getTargetAvailableLocales(), StringPool.COMMA_AND_SPACE)} %>" key="the-available-languages-in-the-lar-file-x-do-not-match-the-site's-available-languages-x" />
+	</c:if>
+</liferay-ui:error>
+
+<liferay-ui:error exception="<%= RecordSetDuplicateRecordSetKeyException.class %>">
+
+	<%
+	RecordSetDuplicateRecordSetKeyException rsdrske = (RecordSetDuplicateRecordSetKeyException)errorException;
+	%>
+
+	<liferay-ui:message arguments="<%= rsdrske.getRecordSetKey() %>" key="dynamic-data-list-record-set-with-record-set-key-x-already-exists" />
+</liferay-ui:error>
+
+<liferay-ui:error exception="<%= StructureDuplicateStructureKeyException.class %>">
+
+	<%
+	StructureDuplicateStructureKeyException sdske = (StructureDuplicateStructureKeyException)errorException;
+	%>
+
+	<liferay-ui:message arguments="<%= sdske.getStructureKey() %>" key="dynamic-data-mapping-structure-with-structure-key-x-already-exists" />
+</liferay-ui:error>
+
+<portlet:actionURL var="importPagesURL">
+	<portlet:param name="struts_action" value="/layouts_admin/import_layouts" />
+	<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.IMPORT %>" />
+	<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+	<portlet:param name="privateLayout" value="<%= String.valueOf(privateLayout) %>" />
+</portlet:actionURL>
+
+<aui:form action="<%= importPagesURL %>" cssClass="lfr-export-dialog" method="post" name="fm1">
+	<portlet:renderURL var="portletURL">
+		<portlet:param name="struts_action" value="/layouts_admin/import_layouts" />
+		<portlet:param name="tabs2" value="current-and-previous" />
+		<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+		<portlet:param name="privateLayout" value="<%= String.valueOf(privateLayout) %>" />
+	</portlet:renderURL>
+
+	<aui:input name="redirect" type="hidden" value="<%= portletURL.toString() %>" />
+
+	<div class="export-dialog-tree">
+		<div id="<portlet:namespace />importConfiguration">
+			<aui:fieldset cssClass="options-group" label="file">
+				<dl class="import-file-details options">
+					<dt>
+						<liferay-ui:message key="name" />
+					</dt>
+					<dd>
+						<%= fileEntry.getTitle() %>
+					</dd>
+					<dt>
+						<liferay-ui:message key="export" />
+					</dt>
+					<dd>
+
+						<%
+						Date exportDate = manifestSummary.getExportDate();
+						%>
+
+						<span onmouseover="Liferay.Portal.ToolTip.show(this, '<%= dateFormatDateTime.format(exportDate) %>')">
+							<liferay-ui:message arguments="<%= LanguageUtil.getTimeDescription(pageContext, System.currentTimeMillis() - exportDate.getTime(), true) %>" key="x-ago" />
+						</span>
+					</dd>
+					<dt>
+						<liferay-ui:message key="author" />
+					</dt>
+					<dd>
+						<%= fileEntry.getUserName() %>
+					</dd>
+					<dt>
+						<liferay-ui:message key="size" />
+					</dt>
+					<dd>
+						<%= fileEntry.getSize() / 1024 %>k
+					</dd>
+				</dl>
+			</aui:fieldset>
+
+			<c:if test="<%= !group.isLayoutPrototype() && !group.isCompany() %>">
+				<aui:fieldset cssClass="options-group" label="pages">
+					<span class="selected-labels" id="<portlet:namespace />selectedPages"></span>
+
+					<aui:a cssClass="modify-link" href="javascript:;" id="pagesLink" label="change" method="get" />
+
+					<div class="hide" id="<portlet:namespace />pages">
+						<aui:fieldset cssClass="portlet-data-section" label="pages">
+							<aui:input helpMessage="delete-missing-layouts-help" label="delete-missing-layouts" name="<%= PortletDataHandlerKeys.DELETE_MISSING_LAYOUTS %>" type="checkbox" value="<%= false %>" />
+
+							<aui:input label="site-pages-settings" name="<%= PortletDataHandlerKeys.LAYOUT_SET_SETTINGS %>" type="checkbox" value="<%= true %>" />
+
+							<aui:input helpMessage="export-import-theme-settings-help" label="theme-settings" name="<%= PortletDataHandlerKeys.THEME_REFERENCE %>" type="checkbox" value="<%= true %>" />
+
+							<aui:input label="logo" name="<%= PortletDataHandlerKeys.LOGO %>" type="checkbox" value="<%= true %>" />
+						</aui:fieldset>
+					</div>
+				</aui:fieldset>
+			</c:if>
+
+			<%
+			List<Portlet> setupPortlets = ListUtil.sort(manifestSummary.getConfigurationPortlets(), new PortletTitleComparator(application, locale));
+			%>
+
+			<c:if test="<%= !setupPortlets.isEmpty() %>">
+				<aui:fieldset cssClass="options-group" label="application-configuration">
+					<ul class="lfr-tree unstyled">
+						<li class="tree-item">
+							<aui:input checked="<%= true %>" helpMessage="all-applications-import-help" id="allApplications" label="all-applications" name="<%= PortletDataHandlerKeys.PORTLET_CONFIGURATION_ALL %>" type="radio" value="<%= true %>" />
+
+							<ul id="<portlet:namespace />showGlobalConfiguration">
+								<li class="tree-item">
+									<span class="selected-labels" id="<portlet:namespace />selectedGlobalConfiguration"></span>
+
+									<aui:a cssClass="modify-link" href="javascript:;" id="globalConfigurationLink" label="change" method="get" />
+								</li>
+							</ul>
+
+							<aui:script>
+								Liferay.Util.toggleBoxes('<portlet:namespace /><%= PortletDataHandlerKeys.PORTLET_CONFIGURATION_ALL %>Checkbox', '<portlet:namespace />showGlobalConfiguration');
+							</aui:script>
+
+							<div class="hide" id="<portlet:namespace />globalConfiguration">
+								<aui:fieldset cssClass="portlet-data-section" label="all-applications">
+									<aui:input label="setup" name="<%= PortletDataHandlerKeys.PORTLET_SETUP_ALL %>" type="checkbox" value="<%= true %>" />
+
+									<aui:input label="archived-setups" name="<%= PortletDataHandlerKeys.PORTLET_ARCHIVED_SETUPS_ALL %>" type="checkbox" value="<%= true %>" />
+
+									<aui:input helpMessage="import-user-preferences-help" label="user-preferences" name="<%= PortletDataHandlerKeys.PORTLET_USER_PREFERENCES_ALL %>" type="checkbox" value="<%= true %>" />
+								</aui:fieldset>
+							</div>
+
+							<aui:input id="chooseApplications" label="choose-applications" name="<%= PortletDataHandlerKeys.PORTLET_CONFIGURATION_ALL %>" type="radio" value="<%= false %>" />
+
+							<c:if test="<%= !group.isLayoutPrototype() %>">
+								<ul class="hide options portlet-list select-options" id="<portlet:namespace />selectApplications">
+									<aui:input name="<%= PortletDataHandlerKeys.PORTLET_CONFIGURATION %>" type="hidden" value="<%= true %>" />
+
+									<%
+									for (Portlet portlet : setupPortlets) {
+										PortletDataHandler portletDataHandler = portlet.getPortletDataHandlerInstance();
+
+										PortletDataHandlerControl[] portletDataHandlerControls = portletDataHandler.getImportConfigurationControls(portlet, manifestSummary);
+
+										String portletTitle = PortalUtil.getPortletTitle(portlet, application, locale);
+									%>
+
+										<li class="tree-item">
+											<aui:input label="<%= portletTitle %>" name="<%= PortletDataHandlerKeys.PORTLET_CONFIGURATION + StringPool.UNDERLINE + portlet.getRootPortletId() %>" type="checkbox" value="<%= true %>" />
+
+											<div class="hide" id="<portlet:namespace />configuration_<%= portlet.getRootPortletId() %>">
+												<aui:fieldset cssClass="portlet-type-data-section" label="<%= portletTitle %>">
+													<ul class="lfr-tree unstyled">
+
+														<%
+														request.setAttribute("render_controls.jsp-action", Constants.IMPORT);
+														request.setAttribute("render_controls.jsp-controls", portletDataHandlerControls);
+														request.setAttribute("render_controls.jsp-portletId", portlet.getRootPortletId());
+														%>
+
+														<liferay-util:include page="/html/portlet/layouts_admin/render_controls.jsp" />
+													</ul>
+												</aui:fieldset>
+											</div>
+
+											<ul class="hide" id="<portlet:namespace />showChangeConfiguration_<%= portlet.getRootPortletId() %>">
+												<li>
+													<span class="selected-labels" id="<portlet:namespace />selectedConfiguration_<%= portlet.getRootPortletId() %>"></span>
+
+													<%
+													Map<String,Object> data = new HashMap<String,Object>();
+
+													data.put("portletid", portlet.getRootPortletId());
+													data.put("portlettitle", portletTitle);
+													%>
+
+													<aui:a cssClass="configuration-link modify-link" data="<%= data %>" href="javascript:;" label="change" method="get" />
+												</li>
+											</ul>
+
+											<aui:script>
+												Liferay.Util.toggleBoxes('<portlet:namespace /><%= PortletDataHandlerKeys.PORTLET_CONFIGURATION + StringPool.UNDERLINE + portlet.getRootPortletId() %>Checkbox', '<portlet:namespace />showChangeConfiguration<%= StringPool.UNDERLINE + portlet.getRootPortletId() %>');
+											</aui:script>
+										</li>
+
+									<%
+									}
+									%>
+
+								</ul>
+							</c:if>
+						</li>
+					</ul>
+				</aui:fieldset>
+			</c:if>
+
+			<%
+			List<Portlet> dataPortlets = ListUtil.sort(manifestSummary.getDataPortlets(), new PortletTitleComparator(application, locale));
+			%>
+
+			<c:if test="<%= !dataPortlets.isEmpty() %>">
+				<aui:fieldset cssClass="options-group" label="content">
+					<ul class="lfr-tree unstyled">
+						<li class="tree-item">
+							<aui:input checked="<%= true %>" helpMessage="all-content-import-help" id="allContent" label="all-content" name="<%= PortletDataHandlerKeys.PORTLET_DATA_ALL %>" type="radio" value="<%= true %>" />
+
+							<ul id="<portlet:namespace />showChangeGlobalContent">
+								<li>
+									<span class="selected-labels" id="<portlet:namespace />selectedGlobalContent"></span>
+
+									<aui:a cssClass="modify-link" href="javascript:;" id="globalContentLink" label="change" method="get" />
+								</li>
+							</ul>
+
+							<aui:script>
+								Liferay.Util.toggleBoxes('<portlet:namespace /><%= PortletDataHandlerKeys.PORTLET_DATA_ALL %>Checkbox', '<portlet:namespace />showChangeGlobalContent');
+							</aui:script>
+
+							<div class="hide" id="<portlet:namespace />globalContent">
+								<aui:fieldset cssClass="portlet-data-section" label="all-content">
+									<aui:input label="delete-portlet-data-before-importing" name="<%= PortletDataHandlerKeys.DELETE_PORTLET_DATA %>" type="checkbox" />
+
+									<ul class="unstyled" id="<portlet:namespace />showDeleteContentWarning">
+										<li>
+											<div class="alert alert-block">
+												<liferay-ui:message key="delete-content-before-importing-warning" />
+
+												<liferay-ui:message key="delete-content-before-importing-suggestion" />
+											</div>
+										</li>
+									</ul>
+								</aui:fieldset>
+
+								<aui:script>
+									Liferay.Util.toggleBoxes('<portlet:namespace /><%= PortletDataHandlerKeys.DELETE_PORTLET_DATA %>Checkbox', '<portlet:namespace />showDeleteContentWarning');
+								</aui:script>
+							</div>
+
+							<aui:input id="chooseContent" label="choose-content" name="<%= PortletDataHandlerKeys.PORTLET_DATA_ALL %>" type="radio" value="<%= false %>" />
+
+							<ul class="hide select-options" id="<portlet:namespace />selectContents">
+								<li class="options">
+									<ul class="portlet-list">
+										<aui:input name="<%= PortletDataHandlerKeys.PORTLET_DATA_CONTROL_DEFAULT %>" type="hidden" value="<%= true %>" />
+
+										<aui:input name="<%= PortletDataHandlerKeys.PORTLET_DATA %>" type="hidden" value="<%= true %>" />
+
+										<aui:input helpMessage="export-import-categories-help" label="categories" name="<%= PortletDataHandlerKeys.CATEGORIES %>" type="checkbox" value="<%= true %>" />
+
+										<%
+										Set<String> displayedControls = new HashSet<String>();
+
+										for (Portlet portlet : dataPortlets) {
+											String portletTitle = PortalUtil.getPortletTitle(portlet, application, locale);
+
+											PortletDataHandler portletDataHandler = portlet.getPortletDataHandlerInstance();
+
+											long importModelCount = portletDataHandler.getExportModelCount(manifestSummary);
+
+											long modelDeletionCount = manifestSummary.getModelDeletionCount(portletDataHandler.getDeletionSystemEventStagedModelTypes());
+										%>
+
+											<c:if test="<%= (importModelCount != 0) || (modelDeletionCount != 0) %>">
+												<li class="tree-item">
+													<liferay-util:buffer var="badgeHTML">
+														<span class="badge badge-info"><%= importModelCount > 0 ? importModelCount : StringPool.BLANK %></span>
+														<span class="badge badge-warning deletions"><%= modelDeletionCount > 0 ? (modelDeletionCount + StringPool.SPACE + LanguageUtil.get(pageContext, "deletions")) : StringPool.BLANK %></span>
+													</liferay-util:buffer>
+
+													<aui:input checked="<%= true %>" label="<%= portletTitle + badgeHTML %>" name="<%= PortletDataHandlerKeys.PORTLET_DATA + StringPool.UNDERLINE + portlet.getRootPortletId() %>" type="checkbox" />
+
+													<%
+													PortletDataHandlerControl[] importControls = portletDataHandler.getImportControls();
+													PortletDataHandlerControl[] importMetadataControls = portletDataHandler.getImportMetadataControls();
+
+													if (ArrayUtil.isNotEmpty(importControls) || ArrayUtil.isNotEmpty(importMetadataControls)) {
+													%>
+
+														<div class="hide" id="<portlet:namespace />content_<%= portlet.getRootPortletId() %>">
+															<ul class="lfr-tree unstyled">
+																<li class="tree-item">
+																	<aui:fieldset cssClass="portlet-type-data-section" label="<%= portletTitle %>">
+
+																		<%
+																		if (importControls != null) {
+																			request.setAttribute("render_controls.jsp-action", Constants.EXPORT);
+																			request.setAttribute("render_controls.jsp-controls", importControls);
+																			request.setAttribute("render_controls.jsp-manifestSummary", manifestSummary);
+																			request.setAttribute("render_controls.jsp-portletDisabled", !portletDataHandler.isPublishToLiveByDefault());
+																		%>
+
+																			<aui:field-wrapper label='<%= ArrayUtil.isNotEmpty(importMetadataControls) ? "content" : StringPool.BLANK %>'>
+																				<ul class="lfr-tree unstyled">
+																					<liferay-util:include page="/html/portlet/layouts_admin/render_controls.jsp" />
+																				</ul>
+																			</aui:field-wrapper>
+
+																		<%
+																		}
+
+																		if (importMetadataControls != null) {
+																			for (PortletDataHandlerControl metadataControl : importMetadataControls) {
+																				if (!displayedControls.contains(metadataControl.getControlName())) {
+																					displayedControls.add(metadataControl.getControlName());
+																				}
+																				else {
+																					continue;
+																				}
+
+																				PortletDataHandlerBoolean control = (PortletDataHandlerBoolean)metadataControl;
+
+																				PortletDataHandlerControl[] childrenControls = control.getChildren();
+
+																				if (ArrayUtil.isNotEmpty(childrenControls)) {
+																					request.setAttribute("render_controls.jsp-controls", childrenControls);
+																				%>
+
+																				<aui:field-wrapper label="content-metadata">
+																					<ul class="lfr-tree unstyled">
+																						<liferay-util:include page="/html/portlet/layouts_admin/render_controls.jsp" />
+																					</ul>
+																				</aui:field-wrapper>
+
+																				<%
+																				}
+																			}
+																		}
+																		%>
+
+																	</aui:fieldset>
+																</li>
+															</ul>
+														</div>
+
+														<ul class="hide" id="<portlet:namespace />showChangeContent_<%= portlet.getRootPortletId() %>">
+															<li>
+																<span class="selected-labels" id="<portlet:namespace />selectedContent_<%= portlet.getRootPortletId() %>"></span>
+
+																<%
+																Map<String,Object> data = new HashMap<String,Object>();
+
+																data.put("portletid", portlet.getRootPortletId());
+																data.put("portlettitle", portletTitle);
+																%>
+
+																<aui:a cssClass="content-link modify-link" data="<%= data %>" href="javascript:;" id='<%= "contentLink_" + portlet.getRootPortletId() %>' label="change" method="get" />
+															</li>
+														</ul>
+
+														<aui:script>
+															Liferay.Util.toggleBoxes('<portlet:namespace /><%= PortletDataHandlerKeys.PORTLET_DATA + StringPool.UNDERLINE + portlet.getRootPortletId() %>Checkbox', '<portlet:namespace />showChangeContent<%= StringPool.UNDERLINE + portlet.getRootPortletId() %>');
+														</aui:script>
+
+													<%
+													}
+													%>
+
+												</li>
+											</c:if>
+
+										<%
+										}
+										%>
+
+									</ul>
+
+									<aui:fieldset cssClass="content-options" label="for-each-of-the-selected-content-types,-import-their">
+										<span class="selected-labels" id="<portlet:namespace />selectedContentOptions"></span>
+
+										<aui:a cssClass="modify-link" href="javascript:;" id="contentOptionsLink" label="change" method="get" />
+
+										<div class="hide" id="<portlet:namespace />contentOptions">
+											<ul class="lfr-tree unstyled">
+												<li class="tree-item">
+													<aui:input label="comments" name="<%= PortletDataHandlerKeys.COMMENTS %>" type="checkbox" value="<%= true %>" />
+
+													<aui:input label="ratings" name="<%= PortletDataHandlerKeys.RATINGS %>" type="checkbox" value="<%= true %>" />
+
+													<%
+													long modelDeletionCount = manifestSummary.getModelDeletionCount();
+													%>
+
+													<c:if test="<%= modelDeletionCount != 0 %>">
+
+														<%
+														String deletionsLabel = LanguageUtil.get(pageContext, "deletions") + (modelDeletionCount > 0 ? " (" + modelDeletionCount + ")" : StringPool.BLANK);
+														%>
+
+														<aui:input data-name="<%= deletionsLabel %>" helpMessage="deletions-help" label="<%= deletionsLabel %>" name="<%= PortletDataHandlerKeys.DELETIONS %>" type="checkbox" />
+													</c:if>
+												</li>
+											</ul>
+										</div>
+									</aui:fieldset>
+								</li>
+							</ul>
+						</li>
+					</ul>
+				</aui:fieldset>
+			</c:if>
+
+			<aui:fieldset cssClass="options-group" label="permissions">
+				<ul class="lfr-tree unstyled">
+					<li class="tree-item">
+						<aui:input label="permissions" name="<%= PortletDataHandlerKeys.PERMISSIONS %>" type="checkbox" />
+
+						<ul id="<portlet:namespace />selectPermissions">
+							<li class="tree-item">
+								<aui:input label="permissions-assigned-to-roles" name="permissionsAssignedToRoles" type="checkbox" value="<%= true %>" />
+							</li>
+						</ul>
+
+						<aui:script>
+							Liferay.Util.toggleBoxes('<portlet:namespace /><%= PortletDataHandlerKeys.PERMISSIONS %>Checkbox', '<portlet:namespace />selectPermissions');
+						</aui:script>
+					</li>
+				</ul>
+			</aui:fieldset>
+
+			<aui:button-row>
+				<portlet:renderURL var="importPagesURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+					<portlet:param name="struts_action" value="/layouts_admin/import_layouts" />
+					<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.VALIDATE %>" />
+					<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+					<portlet:param name="liveGroupId" value="<%= String.valueOf(liveGroup.getGroupId()) %>" />
+					<portlet:param name="privateLayout" value="<%= String.valueOf(privateLayout) %>" />
+				</portlet:renderURL>
+
+				<aui:button href="<%= importPagesURL %>" name="back1" value="back" />
+
+				<aui:button name="continue" primary="<%= true %>" value="continue" />
+			</aui:button-row>
+		</div>
+
+		<div class="hide" id="<portlet:namespace />importStrategy">
+			<aui:fieldset cssClass="options-group" label="update-data">
+				<aui:input checked="<%= true %>" helpMessage="import-data-strategy-mirror-help" id="mirror" label="mirror" name="<%= PortletDataHandlerKeys.DATA_STRATEGY %>" type="radio" value="<%= PortletDataHandlerKeys.DATA_STRATEGY_MIRROR %>" />
+
+				<aui:input helpMessage="import-data-strategy-mirror-with-overwriting-help" id="mirrorWithOverwriting" label="mirror-with-overwriting" name="<%= PortletDataHandlerKeys.DATA_STRATEGY %>" type="radio" value="<%= PortletDataHandlerKeys.DATA_STRATEGY_MIRROR_OVERWRITE %>" />
+
+				<aui:input helpMessage="import-data-strategy-copy-as-new-help" id="copyAsNew" label="copy-as-new" name="<%= PortletDataHandlerKeys.DATA_STRATEGY %>" type="radio" value="<%= PortletDataHandlerKeys.DATA_STRATEGY_COPY_AS_NEW %>" />
+			</aui:fieldset>
+
+			<aui:fieldset cssClass="options-group" label="authorship-of-the-content">
+				<aui:input checked="<%= true %>" helpMessage="use-the-original-author-help" id="currentUserId" label="use-the-original-author" name="<%= PortletDataHandlerKeys.USER_ID_STRATEGY %>" type="radio" value="<%= UserIdStrategy.CURRENT_USER_ID %>" />
+
+				<aui:input helpMessage="use-the-current-user-as-author-help" id="alwaysCurrentUserId" label="use-the-current-user-as-author" name="<%= PortletDataHandlerKeys.USER_ID_STRATEGY %>" type="radio" value="<%= UserIdStrategy.ALWAYS_CURRENT_USER_ID %>" />
+			</aui:fieldset>
+
+			<aui:button-row>
+				<aui:button name="back" value="back" />
+
+				<aui:button type="submit" value="import" />
+			</aui:button-row>
+		</div>
+	</div>
+</aui:form>
+
+<aui:script>
+	Liferay.Util.toggleRadio('<portlet:namespace />allContent', '<portlet:namespace />showChangeGlobalContent', ['<portlet:namespace />selectContents']);
+	Liferay.Util.toggleRadio('<portlet:namespace />allApplications', '', ['<portlet:namespace />selectApplications']);
+	Liferay.Util.toggleRadio('<portlet:namespace />chooseApplications', '<portlet:namespace />selectApplications', '');
+	Liferay.Util.toggleRadio('<portlet:namespace />chooseContent', '<portlet:namespace />selectContents', ['<portlet:namespace />showChangeGlobalContent']);
+</aui:script>
+
+<aui:script use="aui-base">
+	A.one('#<portlet:namespace />continue').on(
+		'click',
+		function() {
+			A.one('#<portlet:namespace />importConfiguration').hide()
+			A.one('#<portlet:namespace />importStrategy').show();
+		}
+	);
+
+	A.one('#<portlet:namespace />back').on(
+		'click',
+		function() {
+			A.one('#<portlet:namespace />importConfiguration').show()
+			A.one('#<portlet:namespace />importStrategy').hide();
+		}
+	);
+</aui:script>
+
+<aui:script use="liferay-export-import">
+	new Liferay.ExportImport(
+		{
+			archivedSetupsNode: '#<%= PortletDataHandlerKeys.PORTLET_ARCHIVED_SETUPS_ALL %>Checkbox',
+			commentsNode: '#<%= PortletDataHandlerKeys.COMMENTS %>Checkbox',
+			deleteMissingLayoutsNode: '#<%= PortletDataHandlerKeys.DELETE_MISSING_LAYOUTS %>Checkbox',
+			deletePortletDataNode: '#<%= PortletDataHandlerKeys.DELETE_PORTLET_DATA %>Checkbox',
+			deletionsNode: '#<%= PortletDataHandlerKeys.DELETIONS %>Checkbox',
+			form: document.<portlet:namespace />fm1,
+			layoutSetSettingsNode: '#<%= PortletDataHandlerKeys.LAYOUT_SET_SETTINGS %>Checkbox',
+			logoNode: '#<%= PortletDataHandlerKeys.LOGO %>Checkbox',
+			namespace: '<portlet:namespace />',
+			ratingsNode: '#<%= PortletDataHandlerKeys.RATINGS %>Checkbox',
+			setupNode: '#<%= PortletDataHandlerKeys.PORTLET_SETUP_ALL %>Checkbox',
+			themeReferenceNode: '#<%= PortletDataHandlerKeys.THEME_REFERENCE %>Checkbox',
+			userPreferencesNode: '#<%= PortletDataHandlerKeys.PORTLET_USER_PREFERENCES_ALL %>Checkbox'
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/import_layouts_validation.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/import_layouts_validation.jsp
new file mode 100644
index 0000000..032629f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/import_layouts_validation.jsp
@@ -0,0 +1,133 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+long groupId = ParamUtil.getLong(request, "groupId");
+boolean privateLayout = ParamUtil.getBoolean(request, "privateLayout");
+%>
+
+<aui:form cssClass="lfr-export-dialog" method="post" name="fm1">
+	<c:choose>
+		<c:when test="<%= (layout.getGroupId() == groupId) && (layout.isPrivateLayout() == privateLayout) %>">
+			<liferay-ui:message key="import-from-within-the-target-site-can-cause-conflicts" />
+		</c:when>
+		<c:otherwise>
+			<div class="lfr-dynamic-uploader">
+				<div class="lfr-upload-container" id="<portlet:namespace />fileUpload"></div>
+			</div>
+
+			<%
+			FileEntry fileEntry = ExportImportHelperUtil.getTempFileEntry(groupId, themeDisplay.getUserId(), ExportImportHelper.TEMP_FOLDER_NAME);
+			%>
+
+			<aui:button-row>
+				<aui:button cssClass='<%= fileEntry == null ? "hide" : StringPool.BLANK %>' name="continueButton" type="submit" value="continue" />
+			</aui:button-row>
+
+			<%
+			Date expirationDate = new Date(System.currentTimeMillis() + PropsValues.SESSION_TIMEOUT * Time.MINUTE);
+
+			Ticket ticket = TicketLocalServiceUtil.addTicket(user.getCompanyId(), User.class.getName(), user.getUserId(), TicketConstants.TYPE_IMPERSONATE, null, expirationDate, new ServiceContext());
+			%>
+
+			<aui:script use="liferay-upload">
+				var liferayUpload = new Liferay.Upload(
+					{
+						boundingBox: '#<portlet:namespace />fileUpload',
+						deleteFile: '<liferay-portlet:actionURL doAsUserId="<%= user.getUserId() %>"><portlet:param name="struts_action" value="/layouts_admin/import_layouts" /><portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE_TEMP %>" /></liferay-portlet:actionURL>&ticketKey=<%= ticket.getKey() %><liferay-ui:input-permissions-params modelName="<%= Group.class.getName() %>" />',
+						fileDescription: '<%= StringUtil.merge(PrefsPropsUtil.getStringArray(PropsKeys.DL_FILE_EXTENSIONS, StringPool.COMMA)) %>',
+						maxFileSize: '<%= PrefsPropsUtil.getLong(PropsKeys.UPLOAD_SERVLET_REQUEST_IMPL_MAX_SIZE) %> B',
+						metadataContainer: '#<portlet:namespace />commonFileMetadataContainer',
+						metadataExplanationContainer: '#<portlet:namespace />metadataExplanationContainer',
+						multipleFiles: false,
+						namespace: '<portlet:namespace />',
+						'strings.dropFileText': '<liferay-ui:message key="drop-a-lar-file-here-to-import" />',
+						'strings.fileCannotBeSavedText': '<liferay-ui:message key="the-file-x-cannot-be-imported" />',
+						'strings.pendingFileText': '<liferay-ui:message key="this-file-was-previously-uploaded-but-not-actually-imported" />',
+						'strings.uploadsCompleteText': '<liferay-ui:message key="the-file-is-ready-to-be-imported" />',
+						tempFileURL: {
+							method: Liferay.Service.bind('/layout/get-temp-file-entry-names'),
+							params: {
+								groupId: <%= groupId %>,
+								tempFolderName: '<%= ExportImportHelper.TEMP_FOLDER_NAME %>'
+							}
+						},
+						uploadFile: '<liferay-portlet:actionURL doAsUserId="<%= user.getUserId() %>"><portlet:param name="struts_action" value="/layouts_admin/import_layouts" /><portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ADD_TEMP %>" /><portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" /><portlet:param name="privateLayout" value="<%= String.valueOf(privateLayout) %>" /></liferay-portlet:actionURL>&ticketKey=<%= ticket.getKey() %><liferay-ui:input-permissions-params modelName="<%= Group.class.getName() %>" />'
+					}
+				);
+
+				var continueButton = A.one('#<portlet:namespace />continueButton');
+
+				liferayUpload._uploader.on(
+					'alluploadscomplete',
+					function(event) {
+						toggleContinueButton();
+					}
+				);
+
+				Liferay.on(
+					'tempFileRemoved',
+					function(event) {
+						toggleContinueButton();
+					}
+				);
+
+				function toggleContinueButton() {
+					var uploadedFiles = liferayUpload._fileListContent.all('.upload-file.upload-complete');
+
+					if (uploadedFiles.size() == 1) {
+						continueButton.show();
+					}
+					else {
+						continueButton.hide();
+					}
+				}
+			</aui:script>
+		</c:otherwise>
+	</c:choose>
+</aui:form>
+
+<aui:script use="aui-base,aui-io-plugin-deprecated,aui-loading-mask-deprecated">
+	var form = A.one('#<portlet:namespace />fm1');
+
+	form.on(
+		'submit',
+		function(event) {
+			event.halt();
+
+			<liferay-portlet:resourceURL copyCurrentRenderParameters="<%= false %>" var="importPagesURL">
+				<portlet:param name="struts_action" value="/layouts_admin/import_layouts" />
+				<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+				<portlet:param name="privateLayout" value="<%= String.valueOf(privateLayout) %>" />
+				<portlet:param name="validate" value="<%= String.valueOf(Boolean.FALSE) %>" />
+			</liferay-portlet:resourceURL>
+
+			var exportImportOptions = A.one('#<portlet:namespace />exportImportOptions');
+
+			exportImportOptions.plug(
+				A.Plugin.IO,
+				{
+					form: {
+						id: '<portlet:namespace />fm1'
+					},
+					uri: '<%= importPagesURL %>'
+				}
+			);
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/incomplete_processes_message.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/incomplete_processes_message.jsp
new file mode 100644
index 0000000..465dd4e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/incomplete_processes_message.jsp
@@ -0,0 +1,35 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+int incompleteBackgroundTaskCount = ParamUtil.getInteger(request, "incompleteBackgroundTaskCount");
+%>
+
+<div class="alert alert-info">
+	<c:choose>
+		<c:when test="<%= incompleteBackgroundTaskCount == 1 %>">
+			<liferay-ui:message key="there-is-currently-1-process-in-progress" />
+		</c:when>
+		<c:when test="<%= incompleteBackgroundTaskCount > 1 %>">
+			<liferay-ui:message arguments="<%= incompleteBackgroundTaskCount - 1 %>" key="there-is-currently-1-process-in-progress-and-x-pending" />
+		</c:when>
+		<c:otherwise>
+			<liferay-ui:message key="there-are-no-processes-in-progress-anymore" />
+		</c:otherwise>
+	</c:choose>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/init.jsp
new file mode 100644
index 0000000..f6646fb
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/init.jsp
@@ -0,0 +1,85 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.DuplicateLockException" %><%@
+page import="com.liferay.portal.ImageTypeException" %><%@
+page import="com.liferay.portal.LARFileException" %><%@
+page import="com.liferay.portal.LARFileSizeException" %><%@
+page import="com.liferay.portal.LARTypeException" %><%@
+page import="com.liferay.portal.LayoutFriendlyURLException" %><%@
+page import="com.liferay.portal.LayoutImportException" %><%@
+page import="com.liferay.portal.LayoutNameException" %><%@
+page import="com.liferay.portal.LayoutPrototypeException" %><%@
+page import="com.liferay.portal.LayoutTypeException" %><%@
+page import="com.liferay.portal.NoSuchGroupException" %><%@
+page import="com.liferay.portal.NoSuchLayoutSetBranchException" %><%@
+page import="com.liferay.portal.RemoteExportException" %><%@
+page import="com.liferay.portal.RemoteOptionsException" %><%@
+page import="com.liferay.portal.RequiredLayoutException" %><%@
+page import="com.liferay.portal.SitemapChangeFrequencyException" %><%@
+page import="com.liferay.portal.SitemapIncludeException" %><%@
+page import="com.liferay.portal.SitemapPagePriorityException" %><%@
+page import="com.liferay.portal.kernel.backgroundtask.BackgroundTaskConstants" %><%@
+page import="com.liferay.portal.kernel.backgroundtask.BackgroundTaskStatus" %><%@
+page import="com.liferay.portal.kernel.backgroundtask.BackgroundTaskStatusRegistryUtil" %><%@
+page import="com.liferay.portal.kernel.lar.ExportImportHelper" %><%@
+page import="com.liferay.portal.kernel.lar.ExportImportHelperUtil" %><%@
+page import="com.liferay.portal.kernel.lar.ManifestSummary" %><%@
+page import="com.liferay.portal.kernel.lar.PortletDataContext" %><%@
+page import="com.liferay.portal.kernel.lar.PortletDataContextFactoryUtil" %><%@
+page import="com.liferay.portal.kernel.lar.PortletDataException" %><%@
+page import="com.liferay.portal.kernel.lar.PortletDataHandler" %><%@
+page import="com.liferay.portal.kernel.lar.PortletDataHandlerBoolean" %><%@
+page import="com.liferay.portal.kernel.lar.PortletDataHandlerChoice" %><%@
+page import="com.liferay.portal.kernel.lar.PortletDataHandlerControl" %><%@
+page import="com.liferay.portal.kernel.lar.PortletDataHandlerKeys" %><%@
+page import="com.liferay.portal.kernel.lar.UserIdStrategy" %><%@
+page import="com.liferay.portal.kernel.scheduler.SchedulerEngineHelperUtil" %><%@
+page import="com.liferay.portal.kernel.scheduler.StorageType" %><%@
+page import="com.liferay.portal.kernel.scheduler.messaging.SchedulerResponse" %><%@
+page import="com.liferay.portal.kernel.staging.StagingUtil" %><%@
+page import="com.liferay.portal.kernel.util.DateRange" %><%@
+page import="com.liferay.portal.lar.LayoutExporter" %><%@
+page import="com.liferay.portal.lar.backgroundtask.LayoutExportBackgroundTaskExecutor" %><%@
+page import="com.liferay.portal.lar.backgroundtask.LayoutImportBackgroundTaskExecutor" %><%@
+page import="com.liferay.portal.lar.backgroundtask.LayoutRemoteStagingBackgroundTaskExecutor" %><%@
+page import="com.liferay.portal.lar.backgroundtask.LayoutStagingBackgroundTaskExecutor" %><%@
+page import="com.liferay.portal.security.auth.AuthException" %><%@
+page import="com.liferay.portal.security.auth.RemoteAuthException" %><%@
+page import="com.liferay.portal.theme.NavItem" %><%@
+page import="com.liferay.portlet.backgroundtask.util.comparator.BackgroundTaskComparatorFactoryUtil" %><%@
+page import="com.liferay.portlet.dynamicdatalists.RecordSetDuplicateRecordSetKeyException" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.StructureDuplicateStructureKeyException" %><%@
+page import="com.liferay.portlet.layoutsadmin.util.LayoutsTreeUtil" %><%@
+page import="com.liferay.portlet.mobiledevicerules.model.MDRAction" %><%@
+page import="com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup" %><%@
+page import="com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance" %><%@
+page import="com.liferay.portlet.mobiledevicerules.service.MDRActionLocalServiceUtil" %><%@
+page import="com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceServiceUtil" %><%@
+page import="com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupLocalServiceUtil" %><%@
+page import="com.liferay.portlet.mobiledevicerules.service.permission.MDRPermissionUtil" %><%@
+page import="com.liferay.portlet.mobiledevicerules.service.permission.MDRRuleGroupInstancePermissionUtil" %><%@
+page import="com.liferay.portlet.mobiledevicerules.util.RuleGroupInstancePriorityComparator" %>
+
+<%
+PortalPreferences portalPreferences = PortletPreferencesFactoryUtil.getPortalPreferences(request);
+
+Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(locale, timeZone);
+%>
+
+<%@ include file="/html/portlet/layouts_admin/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/init_attributes.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/init_attributes.jspf
new file mode 100644
index 0000000..ab31aa5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/init_attributes.jspf
@@ -0,0 +1,237 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+String tabs1 = ParamUtil.getString(request, "tabs1", "public-pages");
+
+String redirect = ParamUtil.getString(request, "redirect");
+String closeRedirect = ParamUtil.getString(request, "closeRedirect");
+String backURL = ParamUtil.getString(request, "backURL", redirect);
+
+if (portletName.equals(PortletKeys.LAYOUTS_ADMIN) || portletName.equals(PortletKeys.MY_ACCOUNT)) {
+	portletDisplay.setURLBack(backURL);
+}
+
+Group selGroup = (Group)request.getAttribute(WebKeys.GROUP);
+
+Group liveGroup = null;
+Group stagingGroup = null;
+
+if (selGroup.isStagingGroup()) {
+	liveGroup = selGroup.getLiveGroup();
+	stagingGroup = selGroup;
+}
+else {
+	liveGroup = selGroup;
+
+	if (selGroup.isStaged()) {
+		if (selGroup.isStagedRemotely()) {
+			stagingGroup = selGroup;
+		}
+		else {
+			stagingGroup = selGroup.getStagingGroup();
+		}
+	}
+}
+
+Group group = null;
+
+if (stagingGroup != null) {
+	group = stagingGroup;
+}
+else {
+	group = liveGroup;
+}
+
+long groupId = liveGroup.getGroupId();
+
+if (group != null) {
+	groupId = group.getGroupId();
+}
+
+long liveGroupId = liveGroup.getGroupId();
+
+long stagingGroupId = 0;
+
+if (stagingGroup != null) {
+	stagingGroupId = stagingGroup.getGroupId();
+}
+
+long selPlid = ParamUtil.getLong(request, "selPlid", LayoutConstants.DEFAULT_PLID);
+long refererPlid = ParamUtil.getLong(request, "refererPlid", LayoutConstants.DEFAULT_PLID);
+
+boolean privateLayout = tabs1.equals("my-dashboard") || tabs1.equals("private-pages");
+long layoutId = LayoutConstants.DEFAULT_PARENT_LAYOUT_ID;
+
+UnicodeProperties groupTypeSettings = null;
+
+if (group != null) {
+	groupTypeSettings = group.getTypeSettingsProperties();
+}
+else {
+	groupTypeSettings = new UnicodeProperties();
+}
+
+UnicodeProperties liveGroupTypeSettings = liveGroup.getTypeSettingsProperties();
+
+Layout selLayout = null;
+
+try {
+	if (selPlid != LayoutConstants.DEFAULT_PLID) {
+		selLayout = LayoutLocalServiceUtil.getLayout(selPlid);
+
+		privateLayout = selLayout.isPrivateLayout();
+		layoutId = selLayout.getLayoutId();
+	}
+}
+catch (NoSuchLayoutException nsle) {
+}
+
+Layout refererLayout = null;
+
+try {
+	if (refererPlid != LayoutConstants.DEFAULT_PLID) {
+		refererLayout = LayoutLocalServiceUtil.getLayout(refererPlid);
+	}
+}
+catch (NoSuchLayoutException nsle) {
+}
+
+Organization organization = null;
+User selUser = null;
+UserGroup userGroup = null;
+
+if (liveGroup.isOrganization()) {
+	organization = OrganizationLocalServiceUtil.getOrganization(liveGroup.getOrganizationId());
+}
+else if (liveGroup.isUser()) {
+	selUser = UserLocalServiceUtil.getUserById(liveGroup.getClassPK());
+}
+else if (liveGroup.isUserGroup()) {
+	userGroup = UserGroupLocalServiceUtil.getUserGroup(liveGroup.getClassPK());
+}
+
+String tabs1Names = "public-pages,private-pages";
+
+if (liveGroup.isUser()) {
+	boolean hasPowerUserRole = RoleLocalServiceUtil.hasUserRole(selUser.getUserId(), company.getCompanyId(), RoleConstants.POWER_USER, true);
+
+	boolean privateLayoutsModifiable = (!PropsValues.LAYOUT_USER_PRIVATE_LAYOUTS_POWER_USER_REQUIRED || hasPowerUserRole) && PropsValues.LAYOUT_USER_PRIVATE_LAYOUTS_ENABLED;
+	boolean publicLayoutsModifiable = (!PropsValues.LAYOUT_USER_PUBLIC_LAYOUTS_POWER_USER_REQUIRED || hasPowerUserRole) && PropsValues.LAYOUT_USER_PUBLIC_LAYOUTS_ENABLED;
+
+	if (privateLayoutsModifiable && publicLayoutsModifiable) {
+		tabs1Names = "my-profile,my-dashboard";
+	}
+	else if (privateLayoutsModifiable) {
+		tabs1Names = "my-dashboard";
+	}
+	else if (publicLayoutsModifiable) {
+		tabs1Names = "my-profile";
+	}
+
+	if (!publicLayoutsModifiable && privateLayoutsModifiable && !privateLayout) {
+		tabs1 = "my-dashboard";
+
+		privateLayout = true;
+	}
+}
+
+if (selGroup.isLayoutSetPrototype()) {
+	privateLayout = true;
+}
+
+LayoutSet selLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(groupId, privateLayout);
+
+LayoutLister layoutLister = new LayoutLister();
+
+String pagesName = null;
+
+if (liveGroup.isLayoutPrototype() || liveGroup.isLayoutSetPrototype() || liveGroup.isUserGroup()) {
+	pagesName = "pages";
+}
+else if (privateLayout) {
+	if (liveGroup.isUser()) {
+		pagesName = "my-dashboard";
+	}
+	else {
+		pagesName = "private-pages";
+	}
+}
+else {
+	if (liveGroup.isUser()) {
+		pagesName = "my-profile";
+	}
+	else {
+		pagesName = "public-pages";
+	}
+}
+
+String rootNodeName = liveGroup.getLayoutRootNodeName(privateLayout, locale);
+
+LayoutView layoutView = layoutLister.getLayoutView(groupId, privateLayout, rootNodeName, locale);
+
+List layoutList = layoutView.getList();
+
+request.setAttribute(WebKeys.LAYOUT_LISTER_LIST, layoutList);
+%>
+
+<liferay-portlet:renderURL varImpl="redirectURL">
+	<portlet:param name="struts_action" value="/layouts_admin/edit_layouts" />
+	<portlet:param name="tabs1" value="<%= tabs1 %>" />
+	<portlet:param name="redirect" value="<%= redirect %>" />
+
+	<c:if test="<%= (portletName.equals(PortletKeys.LAYOUTS_ADMIN) || portletName.equals(PortletKeys.MY_ACCOUNT) || portletName.equals(PortletKeys.USERS_ADMIN)) %>">
+		<portlet:param name="backURL" value="<%= backURL %>" />
+	</c:if>
+
+	<portlet:param name="groupId" value="<%= String.valueOf(liveGroupId) %>" />
+</liferay-portlet:renderURL>
+
+<liferay-portlet:resourceURL copyCurrentRenderParameters="<%= false %>" varImpl="portletURL">
+	<portlet:param name="struts_action" value="/layouts_admin/edit_layouts" />
+	<portlet:param name="tabs1" value="<%= tabs1 %>" />
+	<portlet:param name="redirect" value="<%= redirect %>" />
+	<portlet:param name="closeRedirect" value="<%= closeRedirect %>" />
+
+	<c:if test="<%= (portletName.equals(PortletKeys.LAYOUTS_ADMIN) || portletName.equals(PortletKeys.MY_ACCOUNT) || portletName.equals(PortletKeys.USERS_ADMIN)) %>">
+		<portlet:param name="backURL" value="<%= backURL %>" />
+	</c:if>
+
+	<portlet:param name="groupId" value="<%= String.valueOf(liveGroupId) %>" />
+	<portlet:param name="viewLayout" value="<%= Boolean.TRUE.toString() %>" />
+</liferay-portlet:resourceURL>
+
+<%
+request.setAttribute("edit_pages.jsp-group", group);
+request.setAttribute("edit_pages.jsp-selGroup", selGroup);
+request.setAttribute("edit_pages.jsp-liveGroup", liveGroup);
+request.setAttribute("edit_pages.jsp-stagingGroup", stagingGroup);
+request.setAttribute("edit_pages.jsp-groupId", new Long(groupId));
+request.setAttribute("edit_pages.jsp-liveGroupId", new Long(liveGroupId));
+request.setAttribute("edit_pages.jsp-stagingGroupId", new Long(stagingGroupId));
+request.setAttribute("edit_pages.jsp-selPlid", new Long(selPlid));
+request.setAttribute("edit_pages.jsp-privateLayout", new Boolean(privateLayout));
+request.setAttribute("edit_pages.jsp-layoutId", new Long(layoutId));
+request.setAttribute("edit_pages.jsp-groupTypeSettings", groupTypeSettings);
+request.setAttribute("edit_pages.jsp-liveGroupTypeSettings", liveGroupTypeSettings);
+request.setAttribute("edit_pages.jsp-selLayout", selLayout);
+request.setAttribute("edit_pages.jsp-selLayoutSet", selLayoutSet);
+
+request.setAttribute("edit_pages.jsp-rootNodeName", rootNodeName);
+
+request.setAttribute("edit_pages.jsp-portletURL", portletURL);
+request.setAttribute("edit_pages.jsp-redirectURL", redirectURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/js/main.js b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/js/main.js
new file mode 100644
index 0000000..dd9d7b7
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/js/main.js
@@ -0,0 +1,1258 @@
+AUI.add(
+	'liferay-export-import',
+	function(A) {
+		var Lang = A.Lang;
+
+		var ADate = A.Date;
+
+		var FAILURE_TIMEOUT = 10000;
+
+		var REGEX_LAYOUT_ID = /plid_(\d+)/;
+
+		var RENDER_INTERVAL_IDLE = 60000;
+
+		var RENDER_INTERVAL_IN_PROGRESS = 2000;
+
+		var STR_CHECKED = 'checked';
+
+		var STR_CLICK = 'click';
+
+		var STR_EMPTY = '';
+
+		var defaultConfig = {
+			setter: '_setNode'
+		};
+
+		var ExportImport = A.Component.create(
+			{
+				ATTRS: {
+					archivedSetupsNode: defaultConfig,
+					commentsNode: defaultConfig,
+					deleteMissingLayoutsNode: defaultConfig,
+					deletePortletDataNode: defaultConfig,
+					deletionsNode: defaultConfig,
+					form: defaultConfig,
+					incompleteProcessMessageNode: defaultConfig,
+					layoutSetSettingsNode: defaultConfig,
+					logoNode: defaultConfig,
+					processesNode: defaultConfig,
+					rangeAllNode: defaultConfig,
+					rangeDateRangeNode: defaultConfig,
+					rangeLastNode: defaultConfig,
+					rangeLastPublishNode: defaultConfig,
+					ratingsNode: defaultConfig,
+					remoteAddressNode: defaultConfig,
+					remoteDeletePortletDataNode: defaultConfig,
+					remotePortNode: defaultConfig,
+					remotePathContextNode: defaultConfig,
+					remoteGroupIdNode: defaultConfig,
+					secureConnectionNode: defaultConfig,
+					setupNode: defaultConfig,
+					themeReferenceNode: defaultConfig,
+					userPreferencesNode: defaultConfig
+				},
+
+				AUGMENTS: [Liferay.PortletBase],
+
+				EXTENDS: A.Base,
+
+				NAME: 'exportimport',
+
+				prototype: {
+					initializer: function(config) {
+						var instance = this;
+
+						instance._bindUI();
+
+						instance._layoutsExportTreeOutput = instance.byId(config.pageTreeId + 'Output');
+
+						instance._initLabels();
+
+						instance._processesResourceURL = config.processesResourceURL;
+
+						A.later(RENDER_INTERVAL_IN_PROGRESS, instance, instance._renderProcesses);
+					},
+
+					destructor: function() {
+						var instance = this;
+
+						if (instance._contentOptionsDialog) {
+							instance._contentOptionsDialog.destroy();
+						}
+
+						if (instance._globalConfigurationDialog) {
+							instance._globalConfigurationDialog.destroy();
+						}
+
+						if (instance._globalContentDialog) {
+							instance._globalContentDialog.destroy();
+						}
+
+						if (instance._pagesDialog) {
+							instance._pagesDialog.destroy();
+						}
+
+						if (instance._rangeDialog) {
+							instance._rangeDialog.destroy();
+						}
+
+						if (instance._remoteDialog) {
+							instance._remoteDialog.destroy();
+						}
+
+						if (instance._scheduledPublishingEventsDialog) {
+							instance._scheduledPublishingEventsDialog.destroy();
+						}
+					},
+
+					_bindUI: function() {
+						var instance = this;
+
+						var form = instance.get('form');
+
+						if (form) {
+							form.delegate(
+								STR_CLICK,
+								function(event) {
+									var portletId = event.currentTarget.attr('data-portletid');
+
+									var portletTitle = event.currentTarget.attr('data-portlettitle');
+
+									if (!portletTitle) {
+										portletTitle = Liferay.Language.get('configuration');
+									}
+
+									var configurationDialog = instance._getConfigurationDialog(portletId, portletTitle);
+
+									configurationDialog.show();
+								},
+								'.configuration-link'
+							);
+
+							form.delegate(
+								STR_CLICK,
+								function(event) {
+									var portletId = event.currentTarget.attr('data-portletid');
+
+									var portletTitle = event.currentTarget.attr('data-portlettitle');
+
+									if (!portletTitle) {
+										portletTitle = Liferay.Language.get('content');
+									}
+
+									var contentDialog = instance._getContentDialog(portletId, portletTitle);
+
+									contentDialog.show();
+								},
+								'.content-link'
+							);
+						}
+
+						var contentOptionsLink = instance.byId('contentOptionsLink');
+
+						if (contentOptionsLink) {
+							contentOptionsLink.on(
+								STR_CLICK,
+								function(event) {
+									var contentOptionsDialog = instance._getContentOptionsDialog();
+
+									contentOptionsDialog.show();
+								}
+							);
+						}
+
+						var globalConfigurationLink = instance.byId('globalConfigurationLink');
+
+						if (globalConfigurationLink) {
+							globalConfigurationLink.on(
+								STR_CLICK,
+								function(event) {
+									var globalConfigurationDialog = instance._getGlobalConfigurationDialog();
+
+									globalConfigurationDialog.show();
+								}
+							);
+						}
+
+						var globalContentLink = instance.byId('globalContentLink');
+
+						if (globalContentLink) {
+							globalContentLink.on(
+								STR_CLICK,
+								function(event) {
+									var globalContentDialog = instance._getGlobalContentDialog();
+
+									globalContentDialog.show();
+								}
+							);
+						}
+
+						var pagesLink = instance.byId('pagesLink');
+
+						if (pagesLink) {
+							pagesLink.on(
+								STR_CLICK,
+								function(event) {
+									var pagesDialog = instance._getPagesDialog();
+
+									pagesDialog.show();
+								}
+							);
+						}
+
+						var rangeLink = instance.byId('rangeLink');
+
+						if (rangeLink) {
+							rangeLink.on(
+								STR_CLICK,
+								function(event) {
+									var rangeDialog = instance._getRangeDialog();
+
+									rangeDialog.show();
+								}
+							);
+						}
+
+						var remoteLink = instance.byId('remoteLink');
+
+						if (remoteLink) {
+							remoteLink.on(
+								STR_CLICK,
+								function(event) {
+									var remoteDialog = instance._getRemoteDialog();
+
+									remoteDialog.show();
+								}
+							);
+						}
+
+						var scheduledPublishingEventsLink = instance.byId('scheduledPublishingEventsLink');
+
+						if (scheduledPublishingEventsLink) {
+							scheduledPublishingEventsLink.on(
+								STR_CLICK,
+								function(event) {
+									var scheduledPublishingEventsDialog = instance._getScheduledPublishingEventsDialog();
+
+									scheduledPublishingEventsDialog.show();
+								}
+							);
+						}
+					},
+
+					_getConfigurationDialog: function(portletId, portletTitle) {
+						var instance = this;
+
+						var configurationNode = instance.byId('configuration_' + portletId);
+
+						var configurationDialog = configurationNode.getData('configurationDialog');
+
+						if (!configurationDialog) {
+							configurationNode.show();
+
+							configurationDialog = Liferay.Util.Window.getWindow(
+								{
+									dialog: {
+										bodyContent: configurationNode,
+										centered: true,
+										height: 300,
+										modal: true,
+										render: instance.get('form'),
+										toolbars: {
+											footer: [
+												{
+													on: {
+														click: function(event) {
+															event.domEvent.preventDefault();
+
+															instance._setConfigurationLabels(portletId);
+
+															configurationDialog.hide();
+														}
+													},
+													label: Liferay.Language.get('ok'),
+													primary: true
+												},
+												{
+													on: {
+														click: function(event) {
+															event.domEvent.preventDefault();
+
+															configurationDialog.hide();
+														}
+													},
+													label: Liferay.Language.get('cancel')
+												}
+											]
+										},
+										width: 400
+									},
+									title: portletTitle
+								}
+							);
+
+							configurationNode.setData('configurationDialog', configurationDialog);
+						}
+
+						return configurationDialog;
+					},
+
+					_getContentDialog: function(portletId, portletTitle) {
+						var instance = this;
+
+						var contentNode = instance.byId('content_' + portletId);
+
+						var contentDialog = contentNode.getData('contentDialog');
+
+						if (!contentDialog) {
+							contentNode.show();
+
+							contentDialog = Liferay.Util.Window.getWindow(
+								{
+									dialog: {
+										bodyContent: contentNode,
+										centered: true,
+										height: 300,
+										modal: true,
+										render: instance.get('form'),
+										toolbars: {
+											footer: [
+												{
+													on: {
+														click: function(event) {
+															event.domEvent.preventDefault();
+
+															instance._setContentLabels(portletId);
+
+															contentDialog.hide();
+														}
+													},
+													label: Liferay.Language.get('ok'),
+													primary: true
+												},
+												{
+													on: {
+														click: function(event) {
+															event.domEvent.preventDefault();
+
+															contentDialog.hide();
+														}
+													},
+													label: Liferay.Language.get('cancel')
+												}
+											]
+										},
+										width: 400
+									},
+									title: portletTitle
+								}
+							);
+
+							contentNode.setData('contentDialog', contentDialog);
+						}
+
+						return contentDialog;
+					},
+
+					_getContentOptionsDialog: function() {
+						var instance = this;
+
+						var contentOptionsDialog = instance._contentOptionsDialog;
+
+						if (!contentOptionsDialog) {
+							var contentOptionsNode = instance.byId('contentOptions');
+
+							contentOptionsNode.show();
+
+							contentOptionsDialog = Liferay.Util.Window.getWindow(
+								{
+									dialog: {
+										bodyContent: contentOptionsNode,
+										centered: true,
+										height: 300,
+										modal: true,
+										render: instance.get('form'),
+										toolbars: {
+											footer: [
+												{
+													on: {
+														click: function(event) {
+															event.domEvent.preventDefault();
+
+															instance._setContentOptionsLabels();
+
+															contentOptionsDialog.hide();
+														}
+													},
+													label: Liferay.Language.get('ok'),
+													primary: true
+												},
+												{
+													on: {
+														click: function(event) {
+															event.domEvent.preventDefault();
+
+															contentOptionsDialog.hide();
+														}
+													},
+													label: Liferay.Language.get('cancel')
+												}
+											]
+										},
+										width: 400
+									},
+									title: Liferay.Language.get('comments,-ratings-and-deletions')
+								}
+							);
+
+							instance._contentOptionsDialog = contentOptionsDialog;
+						}
+
+						return contentOptionsDialog;
+					},
+
+					_getGlobalConfigurationDialog: function() {
+						var instance = this;
+
+						var globalConfigurationDialog = instance._globalConfigurationDialog;
+
+						if (!globalConfigurationDialog) {
+							var globalConfigurationNode = instance.byId('globalConfiguration');
+
+							globalConfigurationNode.show();
+
+							globalConfigurationDialog = Liferay.Util.Window.getWindow(
+								{
+									dialog: {
+										bodyContent: globalConfigurationNode,
+										centered: true,
+										height: 300,
+										modal: true,
+										render: instance.get('form'),
+										toolbars: {
+											footer: [
+												{
+													on: {
+														click: function(event) {
+															event.domEvent.preventDefault();
+
+															instance._setGlobalConfigurationLabels();
+
+															globalConfigurationDialog.hide();
+														}
+													},
+													label: Liferay.Language.get('ok'),
+													primary: true
+												},
+												{
+													on: {
+														click: function(event) {
+															event.domEvent.preventDefault();
+
+															globalConfigurationDialog.hide();
+														}
+													},
+													label: Liferay.Language.get('cancel')
+												}
+											]
+										},
+										width: 400
+									},
+									title: Liferay.Language.get('application-configuration')
+								}
+							);
+
+							instance._globalConfigurationDialog = globalConfigurationDialog;
+						}
+
+						return globalConfigurationDialog;
+					},
+
+					_getGlobalContentDialog: function() {
+						var instance = this;
+
+						var globalContentDialog = instance._globalContentDialog;
+
+						if (!globalContentDialog) {
+							var globalContentNode = instance.byId('globalContent');
+
+							globalContentNode.show();
+
+							globalContentDialog = Liferay.Util.Window.getWindow(
+								{
+									dialog: {
+										bodyContent: globalContentNode,
+										centered: true,
+										height: 300,
+										modal: true,
+										render: instance.get('form'),
+										toolbars: {
+											footer: [
+												{
+													on: {
+														click: function(event) {
+															event.domEvent.preventDefault();
+
+															instance._setGlobalContentLabels();
+
+															globalContentDialog.hide();
+														}
+													},
+													label: Liferay.Language.get('ok'),
+													primary: true
+												},
+												{
+													on: {
+														click: function(event) {
+															event.domEvent.preventDefault();
+
+															globalContentDialog.hide();
+														}
+													},
+													label: Liferay.Language.get('cancel')
+												}
+											]
+										},
+										width: 400
+									},
+									title: Liferay.Language.get('all-content')
+								}
+							);
+
+							instance._globalContentDialog = globalContentDialog;
+						}
+
+						return globalContentDialog;
+					},
+
+					_getPagesDialog: function() {
+						var instance = this;
+
+						var pagesDialog = instance._pagesDialog;
+
+						if (!pagesDialog) {
+							var pagesNode = instance.byId('pages');
+
+							pagesNode.show();
+
+							pagesDialog = Liferay.Util.Window.getWindow(
+								{
+									dialog: {
+										bodyContent: pagesNode,
+										centered: true,
+										height: 300,
+										modal: true,
+										render: instance.get('form'),
+										toolbars: {
+											footer: [
+												{
+													on: {
+														click: function(event) {
+															event.domEvent.preventDefault();
+
+															if (instance._layoutsExportTreeOutput) {
+																instance._reloadForm();
+															}
+
+															pagesDialog.hide();
+														}
+													},
+													label: Liferay.Language.get('ok'),
+													primary: true
+												},
+												{
+													on: {
+														click: function(event) {
+															event.domEvent.preventDefault();
+
+															pagesDialog.hide();
+														}
+													},
+													label: Liferay.Language.get('cancel')
+												}
+											]
+										},
+										width: 400
+									},
+									title: Liferay.Language.get('pages')
+								}
+							);
+
+							instance._pagesDialog = pagesDialog;
+						}
+
+						return pagesDialog;
+					},
+
+					_getRangeDialog: function() {
+						var instance = this;
+
+						var rangeDialog = instance._rangeDialog;
+
+						if (!rangeDialog) {
+							var rangeNode = instance.byId('range');
+
+							rangeNode.show();
+
+							rangeDialog = Liferay.Util.Window.getWindow(
+								{
+									dialog: {
+										bodyContent: rangeNode,
+										centered: true,
+										height: 375,
+										modal: true,
+										render: instance.get('form'),
+										toolbars: {
+											footer: [
+												{
+													on: {
+														click: function(event) {
+															event.domEvent.preventDefault();
+
+															var endsLater = true;
+															var endsInPast = true;
+															var startsInPast = true;
+
+															if (instance._isChecked('rangeDateRangeNode')) {
+																var startDatePicker = Liferay.component(instance.ns('startDateDatePicker'));
+																var startTimePicker = Liferay.component(instance.ns('startTimeTimePicker'));
+
+																var endDatePicker = Liferay.component(instance.ns('endDateDatePicker'));
+																var endTimePicker = Liferay.component(instance.ns('endTimeTimePicker'));
+
+																var startDate = startDatePicker.getDate();
+																var startTime = startTimePicker.getTime();
+
+																startDate.setHours(startTime.getHours());
+																startDate.setMinutes(startTime.getMinutes());
+																startDate.setSeconds(0);
+																startDate.setMilliseconds(0);
+
+																var endDate = endDatePicker.getDate();
+																var endTime = endTimePicker.getTime();
+
+																endDate.setHours(endTime.getHours());
+																endDate.setMinutes(endTime.getMinutes());
+																endDate.setSeconds(0);
+																endDate.setMilliseconds(0);
+
+																endsLater = ADate.isGreater(endDate, startDate);
+
+																var today = new Date();
+
+																endsInPast = ADate.isGreaterOrEqual(today, endDate);
+																startsInPast = ADate.isGreaterOrEqual(today, startDate);
+															}
+
+															if (endsLater && endsInPast && startsInPast) {
+																instance._reloadForm();
+
+																rangeDialog.hide();
+															}
+															else {
+																var message;
+
+																if (!endsLater) {
+																	message = Liferay.Language.get('end-date-must-be-greater-than-start-date');
+																}
+																else if (!endsInPast || !startsInPast) {
+																	message = Liferay.Language.get('selected-dates-cannot-be-in-the-future');
+																}
+
+																if (instance._notice) {
+																	instance._notice.remove();
+																}
+
+																instance._notice = new Liferay.Notice(
+																	{
+																		closeText: false,
+																		content: message + '<button type="button" class="close">&times;</button>',
+																		timeout: 10000,
+																		toggleText: false,
+																		type: 'warning'
+																	}
+																);
+
+																instance._notice.show();
+															}
+														}
+													},
+													label: Liferay.Language.get('ok'),
+													primary: true
+												},
+												{
+													on: {
+														click: function(event) {
+															event.domEvent.preventDefault();
+
+															rangeDialog.hide();
+														}
+													},
+													label: Liferay.Language.get('cancel')
+												}
+											]
+										},
+										width: 400
+									},
+									title: Liferay.Language.get('date-range')
+								}
+							);
+
+							instance._rangeDialog = rangeDialog;
+						}
+
+						return rangeDialog;
+					},
+
+					_getRemoteDialog: function() {
+						var instance = this;
+
+						var remoteDialog = instance._remoteDialog;
+
+						if (!remoteDialog) {
+							var remoteNode = instance.byId('remote');
+
+							remoteNode.show();
+
+							remoteDialog = Liferay.Util.Window.getWindow(
+								{
+									dialog: {
+										bodyContent: remoteNode,
+										centered: true,
+										height: 300,
+										modal: true,
+										render: instance.get('form'),
+										toolbars: {
+											footer: [
+												{
+													on: {
+														click: function(event) {
+															event.domEvent.preventDefault();
+
+															instance._setRemoteLabels();
+
+															remoteDialog.hide();
+														}
+													},
+													label: Liferay.Language.get('ok'),
+													primary: true
+												},
+												{
+													on: {
+														click: function(event) {
+															event.domEvent.preventDefault();
+
+															remoteDialog.hide();
+														}
+													},
+													label: Liferay.Language.get('cancel')
+												}
+											]
+										},
+										width: 400
+									},
+									title: Liferay.Language.get('remote-live-connection-settings')
+								}
+							);
+
+							instance._remoteDialog = remoteDialog;
+						}
+
+						return remoteDialog;
+					},
+
+					_getScheduledPublishingEventsDialog: function() {
+						var instance = this;
+
+						var scheduledPublishingEventsDialog = instance._scheduledPublishingEventsDialog;
+
+						if (!scheduledPublishingEventsDialog) {
+							var scheduledPublishingEventsNode = instance.byId('scheduledPublishingEvents');
+
+							scheduledPublishingEventsNode.show();
+
+							scheduledPublishingEventsDialog = Liferay.Util.Window.getWindow(
+								{
+									dialog: {
+										bodyContent: scheduledPublishingEventsNode,
+										height: 300,
+										centered: true,
+										modal: true,
+										render: instance.get('form'),
+										toolbars: {
+											footer: [
+												{
+													on: {
+														click: function(event) {
+															event.domEvent.preventDefault();
+
+															scheduledPublishingEventsDialog.hide();
+														}
+													},
+													label: Liferay.Language.get('close')
+												}
+											]
+										},
+										width: 400
+									},
+									title: Liferay.Language.get('scheduled-events')
+								}
+							);
+
+							instance._scheduledPublishingEventsDialog = scheduledPublishingEventsDialog;
+						}
+
+						return scheduledPublishingEventsDialog;
+					},
+
+					_getValue: function(nodeName) {
+						var instance = this;
+
+						var value = STR_EMPTY;
+
+						var node = instance.get(nodeName);
+
+						if (node) {
+							value = node.val();
+						}
+
+						return value;
+					},
+
+					_initLabels: function() {
+						var instance = this;
+
+						instance.all('.configuration-link').each(
+							function(item, index, collection) {
+								instance._setConfigurationLabels(item.attr('data-portletid'));
+							}
+						);
+
+						instance.all('.content-link').each(
+							function(item, index, collection) {
+								instance._setContentLabels(item.attr('data-portletid'));
+							}
+						);
+
+						instance._setContentOptionsLabels();
+						instance._setGlobalConfigurationLabels();
+						instance._setGlobalContentLabels();
+						instance._setPageLabels();
+						instance._setRangeLabels();
+						instance._setRemoteLabels();
+					},
+
+					_isChecked: function(nodeName) {
+						var instance = this;
+
+						var node = instance.get(nodeName);
+
+						return (node && node.attr(STR_CHECKED));
+					},
+
+					_reloadForm: function() {
+						var instance = this;
+
+						var cmdNode = instance.byId('cmd');
+
+						if (cmdNode) {
+							cmdNode.val(STR_EMPTY);
+
+							submitForm(instance.get('form'));
+						}
+					},
+
+					_renderProcesses: function() {
+						var instance = this;
+
+						var processesNode = instance.get('processesNode');
+
+						if (processesNode) {
+							new A.TogglerDelegate(
+								{
+									animated: true,
+									closeAllOnExpand: true,
+									container: processesNode,
+									content: '.background-task-status-message',
+									expanded: false,
+									header: '.details-link',
+									on: {
+										'toggler:expandedChange': function(event) {
+											var header = event.target.get('header');
+
+											var persistId = 0;
+
+											if (!header.hasClass('toggler-header-collapsed')) {
+												persistId = header.getData('persist-id');
+											}
+
+											Liferay.Store(
+												{
+													'background-task-ids' : persistId
+												}
+											);
+										}
+									},
+									transition: {
+										duration: 0.3
+									}
+								}
+							);
+						}
+
+						if (processesNode && instance._processesResourceURL) {
+							A.io.request(
+								instance._processesResourceURL,
+								{
+									on: {
+										failure: function() {
+											new Liferay.Notice(
+												{
+													closeText: false,
+													content: Liferay.Language.get('your-request-failed-to-complete') + '<button type="button" class="close">&times;</button>',
+													noticeClass: 'hide',
+													timeout: FAILURE_TIMEOUT,
+													toggleText: false,
+													type: 'warning',
+													useAnimation: true
+												}
+											).show();
+										},
+										success: function(event, id, obj) {
+											processesNode.empty();
+
+											processesNode.plug(A.Plugin.ParseContent);
+
+											processesNode.setContent(this.get('responseData'));
+
+											var renderInterval = RENDER_INTERVAL_IDLE;
+
+											var inProgress = !!processesNode.one('.background-task-status-in-progress');
+
+											if (inProgress) {
+												renderInterval = RENDER_INTERVAL_IN_PROGRESS;
+											}
+
+											instance._updateincompleteProcessMessage(inProgress, processesNode.one('.incomplete-process-message'));
+
+											A.later(renderInterval, instance, instance._renderProcesses);
+										}
+									}
+								}
+							);
+						}
+					},
+
+					_setConfigurationLabels: function(portletId) {
+						var instance = this;
+
+						var configurationNode = instance.byId('configuration_' + portletId);
+
+						var inputs = configurationNode.all('.field');
+
+						var selectedConfiguration = [];
+
+						inputs.each(
+							function(item, index, collection) {
+								var checked = item.attr(STR_CHECKED);
+
+								if (checked) {
+									selectedConfiguration.push(item.attr('data-name'));
+								}
+							}
+						);
+
+						if (selectedConfiguration.length === 0) {
+							instance.byId('PORTLET_CONFIGURATION_' + portletId + 'Checkbox').set('checked', false);
+
+							instance.byId('showChangeConfiguration_' + portletId).hide();
+						}
+
+						instance._setLabels('configurationLink_' + portletId, 'selectedConfiguration_' + portletId, selectedConfiguration.join(', '));
+					},
+
+					_setContentLabels: function(portletId) {
+						var instance = this;
+
+						var contentNode = instance.byId('content_' + portletId);
+
+						var inputs = contentNode.all('.field');
+
+						var selectedContent = [];
+
+						inputs.each(
+							function(item, index, collection) {
+								var checked = item.attr(STR_CHECKED);
+
+								if (checked) {
+									selectedContent.push(item.attr('data-name'));
+								}
+							}
+						);
+
+						if (selectedContent.length === 0) {
+							instance.byId('PORTLET_DATA_' + portletId + 'Checkbox').set('checked', false);
+
+							instance.byId('showChangeContent_' + portletId).hide();
+						}
+
+						instance._setLabels('contentLink_' + portletId, 'selectedContent_' + portletId, selectedContent.join(', '));
+					},
+
+					_setContentOptionsLabels: function() {
+						var instance = this;
+
+						var selectedContentOptions = [];
+
+						if (instance._isChecked('commentsNode')) {
+							selectedContentOptions.push(Liferay.Language.get('comments'));
+						}
+
+						if (instance._isChecked('deletionsNode')) {
+							var deletionsNode = instance.get('deletionsNode');
+
+							selectedContentOptions.push(deletionsNode.attr('data-name'));
+
+							instance.all('.deletions').each(
+								function(item, index, collection) {
+									item.show();
+								}
+							);
+						}
+						else {
+							instance.all('.deletions').each(
+								function(item, index, collection) {
+									item.hide();
+								}
+							);
+						}
+
+						if (instance._isChecked('ratingsNode')) {
+							selectedContentOptions.push(Liferay.Language.get('ratings'));
+						}
+
+						instance._setLabels('contentOptionsLink', 'selectedContentOptions', selectedContentOptions.join(', '));
+					},
+
+					_setGlobalConfigurationLabels: function() {
+						var instance = this;
+
+						var selectedGlobalConfiguration = [];
+
+						if (instance._isChecked('setupNode')) {
+							selectedGlobalConfiguration.push(Liferay.Language.get('setup'));
+						}
+
+						if (instance._isChecked('archivedSetupsNode')) {
+							selectedGlobalConfiguration.push(Liferay.Language.get('archived-setups'));
+						}
+
+						if (instance._isChecked('userPreferencesNode')) {
+							selectedGlobalConfiguration.push(Liferay.Language.get('user-preferences'));
+						}
+
+						instance._setLabels('globalConfigurationLink', 'selectedGlobalConfiguration', selectedGlobalConfiguration.join(', '));
+					},
+
+					_setGlobalContentLabels: function() {
+						var instance = this;
+
+						var selectedGlobalContent = [];
+
+						if (instance._isChecked('deletePortletDataNode')) {
+							selectedGlobalContent.push(Liferay.Language.get('delete-portlet-data-before-importing'));
+						}
+
+						instance._setLabels('globalContentLink', 'selectedGlobalContent', selectedGlobalContent.join(', '));
+					},
+
+					_setLabels: function(linkId, labelDivId, label) {
+						var instance = this;
+
+						var linkNode = instance.byId(linkId);
+
+						if (linkNode) {
+							if (label !== STR_EMPTY) {
+								linkNode.html(Liferay.Language.get('change'));
+							}
+							else {
+								linkNode.html(Liferay.Language.get('select'));
+							}
+						}
+
+						var labelNode = instance.byId(labelDivId);
+
+						if (labelNode) {
+							labelNode.html(label);
+						}
+					},
+
+					_setNode: function(val) {
+						var instance = this;
+
+						if (Lang.isString(val)) {
+							val = instance.one(val);
+						}
+						else {
+							val = A.one(val);
+						}
+
+						return val;
+					},
+
+					_setPageLabels: function() {
+						var instance = this;
+
+						var selectedPages = [];
+
+						if (instance._layoutsExportTreeOutput) {
+							var layoutIdsInput = instance.byId('layoutIds');
+
+							var treeView = instance._layoutsExportTreeOutput.getData('treeInstance');
+
+							var rootNode = treeView.item(0);
+
+							if (rootNode.isChecked()) {
+								layoutIdsInput.val(STR_EMPTY);
+
+								selectedPages.push(Liferay.Language.get('all-pages'));
+							}
+							else {
+								var layoutIds = [];
+
+								treeView.eachChildren(
+									function(item, index, collection) {
+										if (item.isChecked()) {
+											var match = REGEX_LAYOUT_ID.exec(item.get('id'));
+
+											if (match) {
+												layoutIds.push(
+													{
+														includeChildren: !item.hasChildNodes(),
+														plid: match[1]
+													}
+												);
+											}
+										}
+									},
+									true
+								);
+
+								if (layoutIdsInput) {
+									layoutIdsInput.val(A.JSON.stringify(layoutIds));
+								}
+
+								selectedPages.push(Liferay.Language.get('selected-pages'));
+							}
+						}
+
+						if (instance._isChecked('deleteMissingLayoutsNode')) {
+							selectedPages.push(Liferay.Language.get('delete-missing-layouts'));
+						}
+
+						if (instance._isChecked('layoutSetSettingsNode')) {
+							selectedPages.push(Liferay.Language.get('site-pages-settings'));
+						}
+
+						if (instance._isChecked('themeReferenceNode')) {
+							selectedPages.push(Liferay.Language.get('theme-settings'));
+						}
+
+						if (instance._isChecked('logoNode')) {
+							selectedPages.push(Liferay.Language.get('logo'));
+						}
+
+						instance._setLabels('pagesLink', 'selectedPages', selectedPages.join(', '));
+					},
+
+					_setRangeLabels: function() {
+						var instance = this;
+
+						var selectedRange = STR_EMPTY;
+
+						if (instance._isChecked('rangeAllNode')) {
+							selectedRange = Liferay.Language.get('all');
+						}
+						else if (instance._isChecked('rangeLastPublishNode')) {
+							selectedRange = Liferay.Language.get('from-last-publish-date');
+						}
+						else if (instance._isChecked('rangeDateRangeNode')) {
+							selectedRange = Liferay.Language.get('date-range');
+						}
+						else if (instance._isChecked('rangeLastNode')) {
+							selectedRange = Liferay.Language.get('last');
+						}
+
+						instance._setLabels('rangeLink', 'selectedRange', selectedRange);
+					},
+
+					_setRemoteLabels: function() {
+						var instance = this;
+
+						var selectedRemote = [];
+
+						var remoteAddressValue = instance._getValue('remoteAddressNode');
+
+						if (remoteAddressValue !== STR_EMPTY) {
+							selectedRemote.push(remoteAddressValue);
+						}
+
+						var remotePortValue = instance._getValue('remotePortNode');
+
+						if (remotePortValue !== STR_EMPTY) {
+							selectedRemote.push(remotePortValue);
+						}
+
+						var remotePathContextValue = instance._getValue('remotePathContextNode');
+
+						if (remotePathContextValue !== STR_EMPTY) {
+							selectedRemote.push(remotePathContextValue);
+						}
+
+						var remoteGroupIdValue = instance._getValue('remoteGroupIdNode');
+
+						if (remoteGroupIdValue !== STR_EMPTY) {
+							selectedRemote.push(remoteGroupIdValue);
+						}
+
+						if (instance._isChecked('secureConnectionNode')) {
+							selectedRemote.push(Liferay.Language.get('use-a-secure-network-connection'));
+						}
+
+						if (instance._isChecked('remoteDeletePortletDataNode')) {
+							selectedRemote.push(Liferay.Language.get('delete-portlet-data-before-importing'));
+						}
+
+						instance._setLabels('remoteLink', 'selectedRemote', selectedRemote.join(', '));
+					},
+
+					_updateincompleteProcessMessage: function(inProgress, content) {
+						var instance = this;
+
+						var incompleteProcessMessageNode = instance.get('incompleteProcessMessageNode');
+
+						if (incompleteProcessMessageNode) {
+							content.show();
+
+							if (inProgress || incompleteProcessMessageNode.hasClass('in-progress')) {
+								incompleteProcessMessageNode.setContent(content);
+
+								if (inProgress) {
+									incompleteProcessMessageNode.addClass('in-progress');
+
+									incompleteProcessMessageNode.show();
+								}
+							}
+						}
+					}
+				}
+			}
+		);
+
+		Liferay.ExportImport = ExportImport;
+	},
+	'',
+	{
+		requires: ['aui-dialog-iframe-deprecated', 'aui-io-request', 'aui-modal', 'aui-parse-content', 'aui-toggler', 'aui-tree-view', 'liferay-notice', 'liferay-portlet-base', 'liferay-store', 'liferay-util-window']
+	}
+);
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/advanced.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/advanced.jsp
new file mode 100644
index 0000000..b25d847
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/advanced.jsp
@@ -0,0 +1,94 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+Group group = (Group)request.getAttribute("edit_pages.jsp-group");
+Layout selLayout = (Layout)request.getAttribute("edit_pages.jsp-selLayout");
+
+UnicodeProperties layoutTypeSettings = selLayout.getTypeSettingsProperties();
+%>
+
+<liferay-ui:error-marker key="errorSection" value="advanced" />
+
+<aui:model-context bean="<%= selLayout %>" model="<%= Layout.class %>" />
+
+<h3><liferay-ui:message key="advanced" /></h3>
+
+<liferay-ui:error exception="<%= ImageTypeException.class %>" message="please-enter-a-file-with-a-valid-file-type" />
+
+<aui:fieldset>
+	<c:if test="<%= !group.isLayoutPrototype() %>">
+
+		<%
+		String queryString = GetterUtil.getString(layoutTypeSettings.getProperty("query-string"));
+		%>
+
+		<aui:input helpMessage="query-string-help" label="query-string" name="TypeSettingsProperties--query-string--" size="30" type="text" value="<%= queryString %>" />
+	</c:if>
+
+	<%
+	String curTarget = GetterUtil.getString(layoutTypeSettings.getProperty("target"));
+	%>
+
+	<aui:input label="target" name="TypeSettingsProperties--target--" size="15" type="text" value="<%= HtmlUtil.escapeAttribute(curTarget) %>" />
+
+	<aui:input name="iconImage" type="hidden" value="<%= selLayout.isIconImage() %>" />
+
+	<aui:field-wrapper helpMessage="this-icon-will-be-shown-in-the-navigation-menu" label="icon" name="iconFileName">
+		<aui:input inlineField="<%= true %>" label="" name="iconFileName" type="file" />
+
+		<c:if test="<%= selLayout.getIconImage() %>">
+			<liferay-ui:icon
+				cssClass="modify-link"
+				id="deleteIconLink"
+				image="delete"
+				label="<%= true %>"
+				url="javascript:;"
+			/>
+
+			<div id="<portlet:namespace />layoutIconContainer">
+				<liferay-theme:layout-icon layout="<%= selLayout %>" />
+			</div>
+		</c:if>
+	</aui:field-wrapper>
+</aui:fieldset>
+
+<aui:script use="aui-base">
+	var panel = A.one('#<portlet:namespace />advanced');
+
+	var deleteLogoLink = panel.one('#<portlet:namespace />deleteIconLink');
+	var iconFileNameInput = panel.one('#<portlet:namespace />iconFileName');
+	var iconImageInput = panel.one('#<portlet:namespace />iconImage');
+	var layoutIconContainer = panel.one('#<portlet:namespace />layoutIconContainer');
+
+	var changeLogo = function(event) {
+		var changeLogo = (event.type == 'change');
+
+		iconImageInput.val(changeLogo);
+
+		if (layoutIconContainer) {
+			layoutIconContainer.hide();
+		}
+	};
+
+	if (deleteLogoLink) {
+		deleteLogoLink.on('click', changeLogo);
+	}
+
+	iconFileNameInput.on('change', changeLogo);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/custom_fields.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/custom_fields.jsp
new file mode 100644
index 0000000..471d614
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/custom_fields.jsp
@@ -0,0 +1,36 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+Layout selLayout = (Layout)request.getAttribute("edit_pages.jsp-selLayout");
+%>
+
+<liferay-ui:error-marker key="errorSection" value="custom-fields" />
+
+<aui:model-context bean="<%= selLayout %>" model="<%= Layout.class %>" />
+
+<h3><liferay-ui:message key="custom-fields" /></h3>
+
+<aui:fieldset>
+	<liferay-ui:custom-attribute-list
+		className="<%= Layout.class.getName() %>"
+		classPK="<%= (selLayout != null) ? selLayout.getPlid() : 0 %>"
+		editable="<%= true %>"
+		label="<%= true %>"
+	/>
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/customization_settings.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/customization_settings.jsp
new file mode 100644
index 0000000..570314c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/customization_settings.jsp
@@ -0,0 +1,121 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+Layout selLayout = (Layout)request.getAttribute("edit_pages.jsp-selLayout");
+
+boolean curFreeformLayout = false;
+boolean prototypeGroup = false;
+
+String velocityTemplateId = null;
+
+String velocityTemplateContent = null;
+
+Group group = null;
+
+if (selLayout != null) {
+	group = selLayout.getGroup();
+
+	Theme curTheme = selLayout.getTheme();
+
+	String themeId = curTheme.getThemeId();
+
+	LayoutTypePortlet curLayoutTypePortlet = (LayoutTypePortlet)selLayout.getLayoutType();
+
+	String layoutTemplateId = curLayoutTypePortlet.getLayoutTemplateId();
+
+	if (Validator.isNull(layoutTemplateId)) {
+		layoutTemplateId = PropsValues.DEFAULT_LAYOUT_TEMPLATE_ID;
+	}
+
+	curFreeformLayout = layoutTemplateId.equals("freeform");
+
+	if (group.isLayoutPrototype() || group.isLayoutSetPrototype()) {
+		prototypeGroup = true;
+	}
+
+	if (!curFreeformLayout && !prototypeGroup) {
+		LayoutTemplate layoutTemplate = LayoutTemplateLocalServiceUtil.getLayoutTemplate(layoutTemplateId, false, themeId);
+
+		if (layoutTemplate != null) {
+			themeId = layoutTemplate.getThemeId();
+
+			velocityTemplateId = themeId + LayoutTemplateConstants.CUSTOM_SEPARATOR + curLayoutTypePortlet.getLayoutTemplateId();
+
+			velocityTemplateContent = LayoutTemplateLocalServiceUtil.getContent(curLayoutTypePortlet.getLayoutTemplateId(), false, themeId);
+		}
+	}
+}
+%>
+
+<liferay-ui:error-marker key="errorSection" value="customization-settings" />
+
+<aui:model-context bean="<%= selLayout %>" model="<%= Layout.class %>" />
+
+<h3><liferay-ui:message key="customization-settings" /></h3>
+
+<c:choose>
+	<c:when test="<%= curFreeformLayout %>">
+		<div class="alert alert-block">
+			<liferay-ui:message key="it-is-not-possible-to-specify-customization-settings-for-freeform-layouts" />
+		</div>
+	</c:when>
+	<c:when test="<%= prototypeGroup %>">
+		<div class="alert alert-block">
+			<liferay-ui:message key="it-is-not-possible-to-specify-customization-settings-for-pages-in-site-templates-or-page-templates" />
+		</div>
+	</c:when>
+	<c:otherwise>
+		<div class="alert alert-info">
+			<liferay-ui:message key="customizable-help" />
+		</div>
+	</c:otherwise>
+</c:choose>
+
+<div class="customization-settings">
+	<c:choose>
+		<c:when test="<%= themeDisplay.isStateExclusive() %>">
+			<aui:button name="manageCustomization" value="show-customizable-sections" />
+
+			<div class="hide layout-customizable-controls" id="<portlet:namespace />layoutCustomizableControls">
+				<span title="<liferay-ui:message key="customizable-help" />">
+					<aui:input cssClass="layout-customizable-checkbox" helpMessage='<%= group.isLayoutPrototype() ? "modifiable-help" : "customizable-help" %>' id="TypeSettingsProperties--[COLUMN_ID]-customizable--" label='<%= (group.isLayoutSetPrototype() || group.isLayoutPrototype()) ? "modifiable" : "customizable" %>' name="TypeSettingsProperties--[COLUMN_ID]-customizable--" type="checkbox" useNamespace="<%= false %>" />
+				</span>
+			</div>
+		</c:when>
+		<c:otherwise>
+
+			<%
+			if (Validator.isNotNull(velocityTemplateId) && Validator.isNotNull(velocityTemplateContent)) {
+				RuntimePageUtil.processCustomizationSettings(pageContext, new StringTemplateResource(velocityTemplateId, velocityTemplateContent));
+			}
+			%>
+
+		</c:otherwise>
+	</c:choose>
+</div>
+
+<c:if test="<%= themeDisplay.isStateExclusive() %>">
+	<aui:script use="liferay-layout-customization-settings">
+		new Liferay.LayoutCustomizationSettings(
+			{
+				namespace: '<portlet:namespace />'
+			}
+		);
+	</aui:script>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/details.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/details.jsp
new file mode 100644
index 0000000..39ad46f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/details.jsp
@@ -0,0 +1,273 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+Group group = (Group)request.getAttribute("edit_pages.jsp-group");
+boolean privateLayout = ((Boolean)request.getAttribute("edit_pages.jsp-privateLayout")).booleanValue();
+Layout selLayout = (Layout)request.getAttribute("edit_pages.jsp-selLayout");
+
+LayoutTypePortletImpl selLayoutTypePortlet = new LayoutTypePortletImpl(selLayout);
+
+Locale defaultLocale = LocaleUtil.getDefault();
+String defaultLanguageId = LocaleUtil.toLanguageId(defaultLocale);
+%>
+
+<liferay-ui:error-marker key="errorSection" value="details" />
+
+<aui:model-context bean="<%= selLayout %>" model="<%= Layout.class %>" />
+
+<h3><liferay-ui:message key="details" /></h3>
+
+<%
+StringBuilder friendlyURLBase = new StringBuilder();
+%>
+
+<c:if test="<%= !group.isLayoutPrototype() && PortalUtil.isLayoutFriendliable(selLayout) %>">
+
+	<%
+	friendlyURLBase.append(themeDisplay.getPortalURL());
+
+	LayoutSet layoutSet = selLayout.getLayoutSet();
+
+	String virtualHostname = layoutSet.getVirtualHostname();
+
+	if (Validator.isNull(virtualHostname) || (friendlyURLBase.indexOf(virtualHostname) == -1)) {
+		friendlyURLBase.append(group.getPathFriendlyURL(privateLayout, themeDisplay));
+		friendlyURLBase.append(group.getFriendlyURL());
+	}
+	%>
+
+	<liferay-ui:error exception="<%= LayoutFriendlyURLException.class %>">
+
+		<%
+		LayoutFriendlyURLException lfurle = (LayoutFriendlyURLException)errorException;
+		%>
+
+		<c:if test="<%= lfurle.getType() == LayoutFriendlyURLException.ADJACENT_SLASHES %>">
+			<liferay-ui:message key="please-enter-a-friendly-url-that-does-not-have-adjacent-slashes" />
+		</c:if>
+
+		<c:if test="<%= lfurle.getType() == LayoutFriendlyURLException.DOES_NOT_START_WITH_SLASH %>">
+			<liferay-ui:message key="please-enter-a-friendly-url-that-begins-with-a-slash" />
+		</c:if>
+
+		<c:if test="<%= lfurle.getType() == LayoutFriendlyURLException.DUPLICATE %>">
+			<liferay-ui:message key="please-enter-a-unique-friendly-url" />
+		</c:if>
+
+		<c:if test="<%= lfurle.getType() == LayoutFriendlyURLException.ENDS_WITH_SLASH %>">
+			<liferay-ui:message key="please-enter-a-friendly-url-that-does-not-end-with-a-slash" />
+		</c:if>
+
+		<c:if test="<%= lfurle.getType() == LayoutFriendlyURLException.INVALID_CHARACTERS %>">
+			<liferay-ui:message key="please-enter-a-friendly-url-with-valid-characters" />
+		</c:if>
+
+		<c:if test="<%= lfurle.getType() == LayoutFriendlyURLException.KEYWORD_CONFLICT %>">
+			<%= LanguageUtil.format(pageContext, "please-enter-a-friendly-url-that-does-not-conflict-with-the-keyword-x", lfurle.getKeywordConflict()) %>
+		</c:if>
+
+		<c:if test="<%= lfurle.getType() == LayoutFriendlyURLException.POSSIBLE_DUPLICATE %>">
+			<liferay-ui:message key="the-friendly-url-may-conflict-with-another-page" />
+		</c:if>
+
+		<c:if test="<%= lfurle.getType() == LayoutFriendlyURLException.TOO_DEEP %>">
+			<liferay-ui:message key="the-friendly-url-has-too-many-slashes" />
+		</c:if>
+
+		<c:if test="<%= lfurle.getType() == LayoutFriendlyURLException.TOO_SHORT %>">
+			<liferay-ui:message key="please-enter-a-friendly-url-that-is-at-least-two-characters-long" />
+		</c:if>
+	</liferay-ui:error>
+</c:if>
+
+<liferay-ui:error key="resetMergeFailCountAndMerge" message="unable-to-reset-the-failure-counter-and-propagate-the-changes" />
+
+<aui:fieldset>
+	<c:choose>
+		<c:when test="<%= !group.isLayoutPrototype() %>">
+			<aui:input name="name" />
+
+			<div class="control-group">
+				<aui:input helpMessage="if-checked-this-page-wont-show-up-in-the-navigation-menu" label="hide-from-navigation-menu" name="hidden" />
+			</div>
+
+			<c:choose>
+				<c:when test="<%= PortalUtil.isLayoutFriendliable(selLayout) %>">
+					<aui:field-wrapper cssClass="input-append input-flex-add-on input-prepend" helpMessage='<%= LanguageUtil.format(pageContext, "for-example-x", "<em>/news</em>") %>' label="friendly-url" name="friendlyURL">
+						<span class="add-on" id="<portlet:namespace />urlBase"><liferay-ui:message key="<%= StringUtil.shorten(friendlyURLBase.toString(), 40) %>" /></span>
+
+						<liferay-ui:input-localized availableLocales="<%= LanguageUtil.getAvailableLocales(themeDisplay.getSiteGroupId()) %>" cssClass="input-medium" name="friendlyURL" xml="<%= selLayout.getFriendlyURLsXML() %>" />
+					</aui:field-wrapper>
+				</c:when>
+				<c:otherwise>
+					<aui:input name="friendlyURL" type="hidden" value="<%= (selLayout != null) ? selLayout.getFriendlyURL() : StringPool.BLANK %>" />
+				</c:otherwise>
+			</c:choose>
+
+			<c:if test="<%= group.isLayoutSetPrototype() %>">
+
+				<%
+				LayoutSetPrototype layoutSetPrototype = LayoutSetPrototypeLocalServiceUtil.getLayoutSetPrototype(group.getClassPK());
+
+				boolean layoutSetPrototypeUpdateable = GetterUtil.getBoolean(layoutSetPrototype.getSettingsProperty("layoutsUpdateable"), true);
+				boolean layoutUpdateable = GetterUtil.getBoolean(selLayoutTypePortlet.getTypeSettingsProperty("layoutUpdateable"), true);
+				%>
+
+				<aui:input disabled="<%= !layoutSetPrototypeUpdateable %>" helpMessage="allow-site-administrators-to-modify-this-page-for-their-site-help" label="allow-site-administrators-to-modify-this-page-for-their-site" name="layoutUpdateable" type="checkbox" value="<%= layoutUpdateable %>" />
+			</c:if>
+		</c:when>
+		<c:otherwise>
+			<aui:input name='<%= "name_" + defaultLanguageId %>' type="hidden" value="<%= selLayout.getName(defaultLocale) %>" />
+			<aui:input name="friendlyURL" type="hidden" value="<%= (selLayout != null) ? selLayout.getFriendlyURL() : StringPool.BLANK %>" />
+		</c:otherwise>
+	</c:choose>
+
+	<c:if test="<%= Validator.isNotNull(selLayout.getLayoutPrototypeUuid()) %>">
+
+		<%
+		LayoutPrototype layoutPrototype = LayoutPrototypeLocalServiceUtil.getLayoutPrototypeByUuidAndCompanyId(selLayout.getLayoutPrototypeUuid(), company.getCompanyId());
+		%>
+
+		<aui:input name="layoutPrototypeUuid" type="hidden" value="<%= selLayout.getLayoutPrototypeUuid() %>" />
+
+		<aui:input label='<%= LanguageUtil.format(pageContext, "automatically-apply-changes-done-to-the-page-template-x", HtmlUtil.escape(layoutPrototype.getName(user.getLocale()))) %>' name="layoutPrototypeLinkEnabled" type="checkbox" value="<%= selLayout.isLayoutPrototypeLinkEnabled() %>" />
+
+		<div class='<%= selLayout.isLayoutPrototypeLinkEnabled() ? "" : "hide" %>' id="<portlet:namespace/>layoutPrototypeMergeAlert">
+
+			<%
+			request.setAttribute("edit_layout_prototype.jsp-layoutPrototype", layoutPrototype);
+			request.setAttribute("edit_layout_prototype.jsp-redirect", currentURL);
+			request.setAttribute("edit_layout_prototype.jsp-selPlid", String.valueOf(selLayout.getPlid()));
+			%>
+
+			<liferay-util:include page="/html/portlet/layout_prototypes/merge_alert.jsp" />
+		</div>
+	</c:if>
+
+	<div class="<%= selLayout.isLayoutPrototypeLinkEnabled() ? "hide" : StringPool.BLANK %>" id="<portlet:namespace />typeOptions">
+		<aui:select name="type">
+
+			<%
+			for (int i = 0; i < PropsValues.LAYOUT_TYPES.length; i++) {
+				if (PropsValues.LAYOUT_TYPES[i].equals("article") && (group.isLayoutPrototype() || group.isLayoutSetPrototype())) {
+					continue;
+				}
+			%>
+
+				<aui:option disabled="<%= selLayout.isFirstParent() && !PortalUtil.isLayoutFirstPageable(PropsValues.LAYOUT_TYPES[i]) %>" label='<%= "layout.types." + PropsValues.LAYOUT_TYPES[i] %>' selected="<%= selLayout.getType().equals(PropsValues.LAYOUT_TYPES[i]) %>" value="<%= PropsValues.LAYOUT_TYPES[i] %>" />
+
+			<%
+			}
+			%>
+
+		</aui:select>
+
+		<div id="<portlet:namespace />layoutTypeForm">
+
+			<%
+			for (int i = 0; i < PropsValues.LAYOUT_TYPES.length; i++) {
+				String curLayoutType = PropsValues.LAYOUT_TYPES[i];
+
+				if (PropsValues.LAYOUT_TYPES[i].equals("article") && (group.isLayoutPrototype() || group.isLayoutSetPrototype())) {
+					continue;
+				}
+			%>
+
+				<div class="layout-type-form layout-type-form-<%= curLayoutType %> <%= selLayout.getType().equals(PropsValues.LAYOUT_TYPES[i]) ? "" : "hide" %>">
+
+					<%
+					request.setAttribute(WebKeys.SEL_LAYOUT, selLayout);
+					%>
+
+					<liferay-util:include page="<%= StrutsUtil.TEXT_HTML_DIR + PortalUtil.getLayoutEditPage(curLayoutType) %>">
+						<liferay-util:param name="idPrefix" value="details" />
+					</liferay-util:include>
+				</div>
+
+			<%
+			}
+			%>
+
+		</div>
+	</div>
+</aui:fieldset>
+
+<aui:script>
+	Liferay.Util.toggleBoxes('<portlet:namespace />layoutPrototypeLinkEnabledCheckbox','<portlet:namespace />layoutPrototypeMergeAlert');
+	Liferay.Util.toggleBoxes('<portlet:namespace />layoutPrototypeLinkEnabledCheckbox','<portlet:namespace />typeOptions', true);
+</aui:script>
+
+<aui:script use="aui-base">
+	var templateLink = A.one('#templateLink');
+
+	function toggleLayoutTypeFields(type) {
+		var currentType = 'layout-type-form-' + type;
+
+		var typeFormContainer = A.one('#<portlet:namespace />layoutTypeForm');
+
+		typeFormContainer.all('.layout-type-form').each(
+			function(item, index, collection) {
+				var visible = item.hasClass(currentType);
+
+				var disabled = !visible;
+
+				item.toggle(visible);
+
+				item.all('input, select, textarea').set('disabled', disabled);
+			}
+		);
+
+		if (templateLink) {
+			templateLink.toggle(type == 'portlet');
+		}
+	}
+
+	toggleLayoutTypeFields('<%= selLayout.getType() %>');
+
+	var typeSelector = A.one('#<portlet:namespace />type');
+
+	if (typeSelector) {
+		typeSelector.on(
+			'change',
+			function(event) {
+				var type = event.currentTarget.val();
+
+				toggleLayoutTypeFields(type);
+
+				Liferay.fire(
+					'<portlet:namespace />toggleLayoutTypeFields',
+					{
+						type: type
+					}
+				);
+			}
+		);
+	}
+
+	var friendlyURLBase = '<%= friendlyURLBase.toString() %>';
+
+	if (friendlyURLBase.length > 40) {
+		A.one('#<portlet:namespace />urlBase').on(
+			'mouseenter',
+			function(event) {
+				Liferay.Portal.ToolTip.show(event.currentTarget, '<%= friendlyURLBase.toString() %>');
+			}
+		);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/embedded_portlets.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/embedded_portlets.jsp
new file mode 100644
index 0000000..b3db52a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/embedded_portlets.jsp
@@ -0,0 +1,93 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+Layout selLayout = (Layout)request.getAttribute("edit_pages.jsp-selLayout");
+
+List<Portlet> embeddedPortlets = (List<Portlet>)request.getAttribute("edit_pages.jsp-embeddedPortlets");
+
+RowChecker rowChecker = new RowChecker(liferayPortletResponse);
+
+rowChecker.setRowIds("removeEmbeddedPortletIds");
+%>
+
+<h3><liferay-ui:message key="embedded-portlets" /></h3>
+
+<c:choose>
+	<c:when test="<%= selLayout.isLayoutPrototypeLinkActive() %>">
+
+		<%
+		rowChecker = null;
+		%>
+
+		<div class="alert alert-info">
+			<liferay-ui:message key="layout-inherits-from-a-prototype-portlets-cannot-be-manipulated" />
+		</div>
+	</c:when>
+	<c:otherwise>
+		<div class="alert alert-block">
+			<liferay-ui:message key="warning-preferences-of-selected-portlets-will-be-reset-or-deleted" />
+		</div>
+	</c:otherwise>
+</c:choose>
+
+<liferay-ui:search-container
+	deltaConfigurable="<%= false %>"
+	rowChecker="<%= rowChecker %>"
+>
+	<liferay-ui:search-container-results results="<%= embeddedPortlets %>" />
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.Portlet"
+		escapedModel="<%= true %>"
+		keyProperty="portletId"
+		modelVar="portlet"
+	>
+		<liferay-ui:search-container-column-text
+			name="portlet-id"
+			property="portletId"
+		/>
+
+		<liferay-ui:search-container-column-text
+			name="title"
+		>
+			<%= PortalUtil.getPortletTitle(portlet, application, locale) %>
+		</liferay-ui:search-container-column-text>
+
+		<liferay-ui:search-container-column-text
+			name="status"
+		>
+			<c:choose>
+				<c:when test="<%= !portlet.isActive() %>">
+					<liferay-ui:message key="inactive" />
+				</c:when>
+				<c:when test="<%= !portlet.isReady() %>">
+					<liferay-ui:message arguments="portlet" key="is-not-ready" />
+				</c:when>
+				<c:when test="<%= portlet.isUndeployedPortlet() %>">
+					<liferay-ui:message key="undeployed" />
+				</c:when>
+				<c:otherwise>
+					<liferay-ui:message key="active" />
+				</c:otherwise>
+			</c:choose>
+		</liferay-ui:search-container-column-text>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator type="none" />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/javascript.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/javascript.jsp
new file mode 100644
index 0000000..8f8280c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/javascript.jsp
@@ -0,0 +1,37 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+Layout selLayout = (Layout)request.getAttribute("edit_pages.jsp-selLayout");
+
+UnicodeProperties layoutTypeSettings = null;
+
+if (selLayout != null) {
+	layoutTypeSettings = selLayout.getTypeSettingsProperties();
+}
+%>
+
+<liferay-ui:error-marker key="errorSection" value="javascript" />
+
+<aui:model-context bean="<%= selLayout %>" model="<%= Layout.class %>" />
+
+<h3><liferay-ui:message key="javascript" /></h3>
+
+<aui:fieldset>
+	<aui:input cssClass="lfr-textarea-container" label="paste-javascript-code-that-will-be-executed-at-the-bottom-of-the-page" name="TypeSettingsProperties--javascript--" style="height: 300px" type="textarea" value='<%= layoutTypeSettings.getProperty("javascript") %>' wrap="soft" />
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/layout_templates_list.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/layout_templates_list.jspf
new file mode 100644
index 0000000..6466d89
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/layout_templates_list.jspf
@@ -0,0 +1,42 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<aui:fieldset>
+	<aui:row cssClass="lfr-page-layouts">
+
+		<%
+		layoutTemplates = PluginUtil.restrictPlugins(layoutTemplates, user);
+
+		for (int i = 0; i < layoutTemplates.size(); i++) {
+			LayoutTemplate layoutTemplate = layoutTemplates.get(i);
+		%>
+
+			<div class="lfr-layout-template">
+				<label class="radio" for="<portlet:namespace /><%= layoutTemplateIdPrefix + "layoutTemplateId" + i %>">
+					<aui:input checked="<%= layoutTemplateId.equals(layoutTemplate.getLayoutTemplateId()) %>" id='<%= layoutTemplateIdPrefix + "layoutTemplateId" + i %>' label="" name="layoutTemplateId" type="radio" value="<%= layoutTemplate.getLayoutTemplateId() %>" />
+
+					<img alt="" class="layout-template-entry modify-link <%= layoutTemplateId.equals(layoutTemplate.getLayoutTemplateId()) ? "layout-selected" : StringPool.BLANK %>" height="25" onclick="document.getElementById('<portlet:namespace /><%= layoutTemplateIdPrefix + "layoutTemplateId" + i %>').checked = true;" src="<%= layoutTemplate.getStaticResourcePath() %><%= layoutTemplate.getThumbnailPath() %>" width="25" />
+
+					<span><%= layoutTemplate.getName() %></span>
+				</label>
+			</div>
+
+		<%
+		}
+		%>
+
+	</aui:row>
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/look_and_feel.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/look_and_feel.jsp
new file mode 100644
index 0000000..25c471d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/look_and_feel.jsp
@@ -0,0 +1,122 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+Group group = (Group)request.getAttribute("edit_pages.jsp-group");
+long groupId = ((Long)request.getAttribute("edit_pages.jsp-groupId")).longValue();
+long liveGroupId = ((Long)request.getAttribute("edit_pages.jsp-liveGroupId")).longValue();
+boolean privateLayout = ((Boolean)request.getAttribute("edit_pages.jsp-privateLayout")).booleanValue();
+Layout selLayout = (Layout)request.getAttribute("edit_pages.jsp-selLayout");
+
+String rootNodeName = (String)request.getAttribute("edit_pages.jsp-rootNodeName");
+
+PortletURL redirectURL = (PortletURL)request.getAttribute("edit_pages.jsp-redirectURL");
+
+Theme selTheme = null;
+ColorScheme selColorScheme = null;
+
+Theme selWapTheme = null;
+ColorScheme selWapColorScheme = null;
+
+LayoutSet layoutSet = LayoutSetLocalServiceUtil.getLayoutSet(groupId, privateLayout);
+
+if (selLayout != null) {
+	selTheme = selLayout.getTheme();
+	selColorScheme = selLayout.getColorScheme();
+
+	selWapTheme = selLayout.getWapTheme();
+	selWapColorScheme = selLayout.getWapColorScheme();
+}
+else {
+	selTheme = layoutSet.getTheme();
+	selColorScheme = layoutSet.getColorScheme();
+
+	selWapTheme = layoutSet.getWapTheme();
+	selWapColorScheme = layoutSet.getWapColorScheme();
+}
+
+String cssText = null;
+
+if ((selLayout != null) && !selLayout.isInheritLookAndFeel()) {
+	cssText = selLayout.getCssText();
+}
+else {
+	cssText = layoutSet.getCss();
+}
+%>
+
+<liferay-ui:error-marker key="errorSection" value="look-and-feel" />
+
+<aui:model-context bean="<%= selLayout %>" model="<%= Layout.class %>" />
+
+<h3><liferay-ui:message key="look-and-feel" /></h3>
+
+<aui:fieldset>
+	<aui:input name="devices" type="hidden" value='<%= PropsValues.MOBILE_DEVICE_STYLING_WAP_ENABLED ? "regular,wap" : "regular" %>' />
+
+	<liferay-util:buffer var="rootNodeNameLink">
+		<c:choose>
+			<c:when test="<%= themeDisplay.isStateExclusive() %>">
+				<%= HtmlUtil.escape(rootNodeName) %>
+			</c:when>
+			<c:otherwise>
+				<aui:a href="<%= redirectURL.toString() %>">
+					<%= HtmlUtil.escape(rootNodeName) %>
+				</aui:a>
+			</c:otherwise>
+		</c:choose>
+	</liferay-util:buffer>
+
+	<%
+	String taglibLabel = null;
+
+	if (group.isLayoutPrototype()) {
+		taglibLabel = LanguageUtil.get(pageContext, "use-the-same-look-and-feel-of-the-pages-in-which-this-template-is-used");
+	}
+	else {
+		taglibLabel = LanguageUtil.format(pageContext, "use-the-same-look-and-feel-of-the-x", rootNodeNameLink);
+	}
+	%>
+
+	<c:choose>
+		<c:when test="<%= PropsValues.MOBILE_DEVICE_STYLING_WAP_ENABLED %>">
+			<liferay-ui:tabs
+				names="regular-browsers,mobile-devices"
+				refresh="<%= false %>"
+			>
+				<liferay-ui:section>
+					<%@ include file="/html/portlet/layouts_admin/layout/look_and_feel_regular_browser.jspf" %>
+				</liferay-ui:section>
+
+				<liferay-ui:section>
+					<%@ include file="/html/portlet/layouts_admin/layout/look_and_feel_wap_browser.jspf" %>
+				</liferay-ui:section>
+			</liferay-ui:tabs>
+		</c:when>
+		<c:otherwise>
+			<%@ include file="/html/portlet/layouts_admin/layout/look_and_feel_regular_browser.jspf" %>
+		</c:otherwise>
+	</c:choose>
+</aui:fieldset>
+
+<aui:script>
+	Liferay.Util.toggleRadio('<portlet:namespace />regularInheritLookAndFeel', '<portlet:namespace />inheritThemeOptions', '<portlet:namespace />themeOptions');
+	Liferay.Util.toggleRadio('<portlet:namespace />regularUniqueLookAndFeel', '<portlet:namespace />themeOptions', '<portlet:namespace />inheritThemeOptions');
+	Liferay.Util.toggleRadio('<portlet:namespace />wapInheritLookAndFeel', '<portlet:namespace />inheritWapThemeOptions', '<portlet:namespace />wapThemeOptions');
+	Liferay.Util.toggleRadio('<portlet:namespace />wapUniqueLookAndFeel', '<portlet:namespace />wapThemeOptions', '<portlet:namespace />inheritWapThemeOptions');
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/look_and_feel_regular_browser.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/look_and_feel_regular_browser.jspf
new file mode 100644
index 0000000..21103f4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/look_and_feel_regular_browser.jspf
@@ -0,0 +1,50 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<aui:input checked="<%= selLayout.isInheritLookAndFeel() %>" id="regularInheritLookAndFeel" label="<%= taglibLabel %>" name="regularInheritLookAndFeel" type="radio" value="<%= true %>" />
+
+<aui:input checked="<%= !selLayout.isInheritLookAndFeel() %>" id="regularUniqueLookAndFeel" label="define-a-specific-look-and-feel-for-this-page" name="regularInheritLookAndFeel" type="radio" value="<%= false %>" />
+
+<%
+List<Theme> themes = ThemeLocalServiceUtil.getThemes(company.getCompanyId(), liveGroupId, user.getUserId(), false);
+List<ColorScheme> colorSchemes = selTheme.getColorSchemes();
+
+request.setAttribute("edit_pages.jsp-themes", themes);
+request.setAttribute("edit_pages.jsp-colorSchemes", colorSchemes);
+request.setAttribute("edit_pages.jsp-selTheme", selTheme);
+request.setAttribute("edit_pages.jsp-selColorScheme", selColorScheme);
+request.setAttribute("edit_pages.jsp-device", "regular");
+request.setAttribute("edit_pages.jsp-editable", Boolean.FALSE);
+%>
+
+<div class="lfr-inherit-theme-options" id="<portlet:namespace />inheritThemeOptions">
+	<c:if test="<%= !group.isLayoutPrototype() %>">
+		<liferay-util:include page="/html/portlet/layouts_admin/look_and_feel_themes.jsp" />
+	</c:if>
+</div>
+
+<div class="lfr-theme-options" id="<portlet:namespace />themeOptions">
+
+	<%
+	request.setAttribute("edit_pages.jsp-editable", Boolean.TRUE);
+	%>
+
+	<liferay-util:include page="/html/portlet/layouts_admin/look_and_feel_themes.jsp" />
+
+	<legend><liferay-ui:message key="css" /></legend>
+
+	<aui:input cssClass="lfr-textarea-container" label="insert-custom-css-that-will-be-loaded-after-the-theme" name="regularCss" type="textarea" value="<%= cssText %>" />
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/look_and_feel_wap_browser.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/look_and_feel_wap_browser.jspf
new file mode 100644
index 0000000..77687d2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/look_and_feel_wap_browser.jspf
@@ -0,0 +1,46 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<aui:input checked="<%= selLayout.isInheritWapLookAndFeel() %>" id="wapInheritLookAndFeel" label="<%= taglibLabel %>" name="wapInheritLookAndFeel" type="radio" value="<%= true %>" />
+
+<aui:input checked="<%= !selLayout.isInheritWapLookAndFeel() %>" id="wapUniqueLookAndFeel" label="define-a-specific-look-and-feel-for-this-page" name="wapInheritLookAndFeel" type="radio" value="<%= false %>" />
+
+<%
+List<Theme> themes = ThemeLocalServiceUtil.getThemes(company.getCompanyId(), liveGroupId, user.getUserId(), true);
+List<ColorScheme> colorSchemes = selWapTheme.getColorSchemes();
+
+request.setAttribute("edit_pages.jsp-themes", themes);
+request.setAttribute("edit_pages.jsp-colorSchemes", colorSchemes);
+request.setAttribute("edit_pages.jsp-selTheme", selWapTheme);
+request.setAttribute("edit_pages.jsp-selColorScheme", selWapColorScheme);
+request.setAttribute("edit_pages.jsp-device", "wap");
+request.setAttribute("edit_pages.jsp-editable", Boolean.FALSE);
+%>
+
+<div id="<portlet:namespace />inheritWapThemeOptions">
+	<c:if test="<%= !group.isLayoutPrototype() %>">
+		<liferay-util:include page="/html/portlet/layouts_admin/look_and_feel_themes.jsp" />
+	</c:if>
+</div>
+
+<div id="<portlet:namespace />wapThemeOptions">
+
+	<%
+	request.setAttribute("edit_pages.jsp-editable", Boolean.TRUE);
+	%>
+
+	<liferay-util:include page="/html/portlet/layouts_admin/look_and_feel_themes.jsp" />
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/mobile_device_rules.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/mobile_device_rules.jsp
new file mode 100644
index 0000000..f6d1cce
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/mobile_device_rules.jsp
@@ -0,0 +1,69 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+Layout selLayout = (Layout)request.getAttribute("edit_pages.jsp-selLayout");
+
+long groupId = selLayout.getGroupId();
+String className = Layout.class.getName();
+long classPK = selLayout.getPlid();
+%>
+
+<%@ include file="/html/portlet/layouts_admin/layout/mobile_device_rules_header.jspf" %>
+
+<%
+String rootNodeName = (String)request.getAttribute("edit_pages.jsp-rootNodeName");
+
+PortletURL redirectURL = (PortletURL)request.getAttribute("edit_pages.jsp-redirectURL");
+
+int mdrRuleGroupInstancesCount = MDRRuleGroupInstanceServiceUtil.getRuleGroupInstancesCount(className, classPK);
+%>
+
+<liferay-util:buffer var="rootNodeNameLink">
+	<c:choose>
+		<c:when test="<%= themeDisplay.isStateExclusive() %>">
+			<%= HtmlUtil.escape(rootNodeName) %>
+		</c:when>
+		<c:otherwise>
+			<aui:a href='<%= redirectURL.toString() + "#tab=mobileDeviceRules" %>'>
+				<%= HtmlUtil.escape(rootNodeName) %>
+			</aui:a>
+		</c:otherwise>
+	</c:choose>
+</liferay-util:buffer>
+
+<aui:input checked="<%= mdrRuleGroupInstancesCount == 0 %>" disabled="<%= mdrRuleGroupInstancesCount > 0 %>" id="inheritRuleGroupInstances" label='<%= LanguageUtil.format(pageContext, "use-the-same-mobile-device-rules-of-the-x", rootNodeNameLink) %>' name="inheritRuleGroupInstances" type="radio" value="<%= true %>" />
+
+<aui:input checked="<%= mdrRuleGroupInstancesCount > 0 %>" id="uniqueRuleGroupInstances" label="define-specific-mobile-device-rules-for-this-page" name="inheritRuleGroupInstances" type="radio" value="<%= false %>" />
+
+<div class="<%= (mdrRuleGroupInstancesCount == 0) ? StringPool.BLANK : "hide" %>" id="<portlet:namespace />inheritRuleGroupInstancesContainer">
+	<div class="alert alert-info">
+		<liferay-ui:message arguments="<%= rootNodeNameLink %>" key="mobile-device-rules-will-be-inhertited-from-x" />
+	</div>
+</div>
+
+<div class="<%= (mdrRuleGroupInstancesCount > 0) ? StringPool.BLANK : "hide" %>" id="<portlet:namespace />uniqueRuleGroupInstancesContainer">
+	<%@ include file="/html/portlet/layouts_admin/layout/mobile_device_rules_toolbar.jspf" %>
+
+	<%@ include file="/html/portlet/layouts_admin/layout/mobile_device_rules_rule_group_instances.jspf" %>
+</div>
+
+<aui:script>
+	Liferay.Util.toggleRadio('<portlet:namespace />inheritRuleGroupInstances', '<portlet:namespace />inheritRuleGroupInstancesContainer', '<portlet:namespace />uniqueRuleGroupInstancesContainer');
+	Liferay.Util.toggleRadio('<portlet:namespace />uniqueRuleGroupInstances', '<portlet:namespace />uniqueRuleGroupInstancesContainer', '<portlet:namespace />inheritRuleGroupInstancesContainer');
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/mobile_device_rules_header.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/mobile_device_rules_header.jspf
new file mode 100644
index 0000000..67886b1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/mobile_device_rules_header.jspf
@@ -0,0 +1,30 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+long selPlid = ((Long)request.getAttribute("edit_pages.jsp-selPlid")).longValue();
+
+PortletURL portletURL = liferayPortletResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/layouts_admin/edit_layouts");
+portletURL.setParameter("selPlid", String.valueOf(selPlid));
+portletURL.setParameter("className", className);
+portletURL.setParameter("classPK", String.valueOf(classPK));
+%>
+
+<liferay-ui:error-marker key="errorSection" value="device" />
+
+<h3><liferay-ui:message key="mobile-device-rules" /></h3>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/mobile_device_rules_rule_group_instance_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/mobile_device_rules_rule_group_instance_action.jsp
new file mode 100644
index 0000000..27b3e2a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/mobile_device_rules_rule_group_instance_action.jsp
@@ -0,0 +1,80 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+SearchContainer searchContainer = (SearchContainer)request.getAttribute("liferay-ui:search:searchContainer");
+
+String redirect = searchContainer.getIteratorURL().toString();
+
+String closeRedirect = ParamUtil.getString(request, "closeRedirect");
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+MDRRuleGroupInstance mdrRuleGroupInstance = (MDRRuleGroupInstance)row.getObject();
+
+MDRRuleGroup mdrRuleGroup = MDRRuleGroupLocalServiceUtil.getMDRRuleGroup(mdrRuleGroupInstance.getRuleGroupId());
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= MDRRuleGroupInstancePermissionUtil.contains(permissionChecker, mdrRuleGroupInstance.getRuleGroupInstanceId(), ActionKeys.UPDATE) %>">
+		<liferay-portlet:renderURL portletName="<%= PortletKeys.MOBILE_DEVICE_SITE_ADMIN %>" varImpl="viewRuleGroupInstanceActionsURL" windowState="<%= themeDisplay.isStateExclusive() ? LiferayWindowState.POP_UP.toString() : windowState.toString() %>">
+			<portlet:param name="struts_action" value="/mobile_device_rules/view_actions" />
+			<portlet:param name="redirect" value='<%= HttpUtil.setParameter(redirect, liferayPortletResponse.getNamespace() + "historyKey", "mobileDeviceRules") %>' />
+			<portlet:param name="ruleGroupInstanceId" value="<%= String.valueOf(mdrRuleGroupInstance.getRuleGroupInstanceId()) %>" />
+		</liferay-portlet:renderURL>
+
+		<%
+		String taglibActionHandler = renderResponse.getNamespace() + "mobileDeviceActionHandler('" + viewRuleGroupInstanceActionsURL.toString() + "');";
+		%>
+
+		<liferay-ui:icon image="manage_nodes" message="manage-actions" url='<%= "javascript:" + taglibActionHandler + ";" %>' />
+
+	</c:if>
+
+	<c:if test="<%= MDRRuleGroupInstancePermissionUtil.contains(permissionChecker, mdrRuleGroupInstance.getRuleGroupInstanceId(), ActionKeys.PERMISSIONS) %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= MDRRuleGroupInstance.class.getName() %>"
+			modelResourceDescription="<%= mdrRuleGroup.getName(locale) %>"
+			resourcePrimKey="<%= String.valueOf(mdrRuleGroupInstance.getRuleGroupInstanceId()) %>"
+			var="permissionsURL"
+			windowState="<%= themeDisplay.isStateExclusive() ? LiferayWindowState.POP_UP.toString() : windowState.toString() %>"
+		/>
+
+		<%
+		String taglibActionHandler = renderResponse.getNamespace() + "mobileDeviceActionHandler('" + permissionsURL + "');";
+		%>
+
+		<liferay-ui:icon image="permissions" url='<%= "javascript:" + taglibActionHandler + ";" %>' useDialog="<%= true %>" />
+	</c:if>
+
+	<c:if test="<%= MDRRuleGroupInstancePermissionUtil.contains(permissionChecker, mdrRuleGroupInstance.getRuleGroupInstanceId(), ActionKeys.DELETE) %>">
+
+		<%
+		redirect = themeDisplay.isStateExclusive() ? closeRedirect : HttpUtil.setParameter(redirect, liferayPortletResponse.getNamespace() + "historyKey", "mobileDeviceRules");
+		%>
+
+		<liferay-portlet:actionURL portletName="<%= PortletKeys.MOBILE_DEVICE_SITE_ADMIN %>" var="deleteURL">
+			<portlet:param name="struts_action" value="/mobile_device_rules/edit_rule_group_instance" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="ruleGroupInstanceId" value="<%= String.valueOf(mdrRuleGroupInstance.getRuleGroupInstanceId()) %>" />
+		</liferay-portlet:actionURL>
+
+		<liferay-ui:icon-delete url="<%= deleteURL %>" />
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/mobile_device_rules_rule_group_instance_columns.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/mobile_device_rules_rule_group_instance_columns.jspf
new file mode 100644
index 0000000..dae2261
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/mobile_device_rules_rule_group_instance_columns.jspf
@@ -0,0 +1,71 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+MDRRuleGroup mdrRuleGroup = MDRRuleGroupLocalServiceUtil.fetchRuleGroup(mdrRuleGroupInstance.getRuleGroupId());
+%>
+
+<liferay-ui:search-container-column-text
+	cssClass="mobile-device-rule"
+	href="<%= rowURL %>"
+	name="name"
+>
+
+	<%= mdrRuleGroup.getName(locale) %>
+
+	<c:if test="<%= Validator.isNotNull(mdrRuleGroup.getDescription(locale)) %>">
+		<liferay-ui:icon-help message="<%= mdrRuleGroup.getDescription(locale) %>" />
+	</c:if>
+</liferay-ui:search-container-column-text>
+
+<liferay-ui:search-container-column-text
+	cssClass="mobile-device-rule"
+	href="<%= rowURL %>"
+	name="actions"
+>
+
+	<%
+	List<MDRAction> mdrActions = MDRActionLocalServiceUtil.getActions(mdrRuleGroupInstance.getRuleGroupInstanceId(), 0, 10);
+
+	StringBundler sb = new StringBundler(mdrActions.size() * 2);
+
+	for (int i = 0; i < mdrActions.size(); i++) {
+		MDRAction mdrAction = mdrActions.get(i);
+
+		sb.append(mdrAction.getName(locale));
+
+		if (i < (mdrActions.size() -1)) {
+			sb.append(", ");
+		}
+	}
+	%>
+
+	<%= sb.toString() %>
+
+</liferay-ui:search-container-column-text>
+
+<c:if test="<%= MDRRuleGroupInstanceServiceUtil.getRuleGroupInstancesCount(className, classPK) > 1 %>">
+	<liferay-ui:search-container-column-text
+		cssClass="mobile-device-rule"
+		href="<%= rowURL %>"
+		property="priority"
+	/>
+</c:if>
+
+<liferay-ui:search-container-column-jsp
+	align="right"
+	path="/html/portlet/layouts_admin/layout/mobile_device_rules_rule_group_instance_action.jsp"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/mobile_device_rules_rule_group_instances.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/mobile_device_rules_rule_group_instances.jspf
new file mode 100644
index 0000000..3db3c84
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/mobile_device_rules_rule_group_instances.jspf
@@ -0,0 +1,95 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:search-container
+	deltaConfigurable="<%= false %>"
+	emptyResultsMessage="no-device-rules-are-configured"
+	headerNames="name,description,priority"
+	iteratorURL="<%= portletURL %>"
+	total="<%= MDRRuleGroupInstanceServiceUtil.getRuleGroupInstancesCount(className, classPK) %>"
+>
+	<liferay-ui:search-container-results
+		results="<%= MDRRuleGroupInstanceServiceUtil.getRuleGroupInstances(className, classPK, searchContainer.getStart(), searchContainer.getEnd(), new RuleGroupInstancePriorityComparator()) %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance"
+		escapedModel="<%= true %>"
+		keyProperty="ruleGroupInstanceId"
+		modelVar="mdrRuleGroupInstance"
+	>
+		<liferay-portlet:renderURL portletName="<%= PortletKeys.MOBILE_DEVICE_SITE_ADMIN %>" varImpl="rowURL" windowState="<%= themeDisplay.isStateExclusive() ? LiferayWindowState.POP_UP.toString() : windowState.toString() %>">
+			<portlet:param name="struts_action" value="/mobile_device_rules/view_actions" />
+			<portlet:param name="redirect" value='<%= portletURL.toString() + "#tab=mobileDeviceRules" %>' />
+			<portlet:param name="ruleGroupInstanceId" value="<%= String.valueOf(mdrRuleGroupInstance.getRuleGroupInstanceId()) %>" />
+		</liferay-portlet:renderURL>
+
+		<%@ include file="/html/portlet/layouts_admin/layout/mobile_device_rules_rule_group_instance_columns.jspf" %>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator type="more" />
+</liferay-ui:search-container>
+
+<aui:script>
+	function <portlet:namespace />mobileDeviceActionHandler(href) {
+		if (<%= themeDisplay.isStateExclusive() %>) {
+			<portlet:namespace />mobileDeviceOpenWindow(
+				{
+					uri: href
+				}
+			);
+		}
+		else {
+			location.href = href;
+		}
+	}
+
+	function <portlet:namespace />mobileDeviceOpenWindow(config) {
+		var data = AUI().mix(
+			config,
+			{
+				dialog: {
+					width: 1024
+				},
+				title: Liferay.Language.get('javax.portlet.title.178')
+			}
+		);
+
+		Liferay.Util.openWindow(data);
+	}
+</aui:script>
+
+<c:if test="<%= themeDisplay.isStateExclusive() %>">
+	<aui:script use="aui-base">
+		var uniqueRuleGroupInstancesContainer = A.one('#<portlet:namespace />uniqueRuleGroupInstancesContainer');
+
+		uniqueRuleGroupInstancesContainer.delegate(
+			'click',
+			function(event) {
+				event.preventDefault();
+
+				var href = event.target.attr('href');
+
+				<portlet:namespace />mobileDeviceOpenWindow(
+					{
+						uri: href
+					}
+				);
+			},
+			'.mobile-device-rule a'
+		);
+	</aui:script>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/mobile_device_rules_toolbar.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/mobile_device_rules_toolbar.jspf
new file mode 100644
index 0000000..f04eb98
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/mobile_device_rules_toolbar.jspf
@@ -0,0 +1,131 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<c:if test="<%= MDRPermissionUtil.contains(permissionChecker, groupId, ActionKeys.ADD_RULE_GROUP_INSTANCE) %>">
+	<div class="btn-toolbar">
+		<aui:button name="saveInstance" value="select-device-family" />
+
+		<c:if test="<%= MDRRuleGroupInstanceServiceUtil.getRuleGroupInstancesCount(className, classPK) > 1 %>">
+			<aui:button name="managePriorities" value="manage-rule-priorities" />
+		</c:if>
+	</div>
+</c:if>
+
+<liferay-portlet:renderURL portletName="<%= PortletKeys.MOBILE_DEVICE_SITE_ADMIN %>" varImpl="selectRuleGroupURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+	<portlet:param name="struts_action" value="/mobile_device_rules/view" />
+	<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+	<portlet:param name="className" value="<%= className %>" />
+	<portlet:param name="classPK" value="<%= String.valueOf(classPK) %>" />
+	<portlet:param name="chooseCallback" value='<%= liferayPortletResponse.getNamespace() + "saveRuleGroupInstance" %>' />
+</liferay-portlet:renderURL>
+
+<liferay-portlet:renderURL portletName="<%= PortletKeys.MOBILE_DEVICE_SITE_ADMIN %>" varImpl="managePrioritiesURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+	<portlet:param name="struts_action" value="/mobile_device_rules/edit_rule_group_instance" />
+	<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+	<portlet:param name="className" value="<%= className %>" />
+	<portlet:param name="classPK" value="<%= String.valueOf(classPK) %>" />
+	<portlet:param name="saveCallback" value='<%= liferayPortletResponse.getNamespace() + "saveRuleGroupsPriorities" %>' />
+</liferay-portlet:renderURL>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />processDialog',
+		function(dialog) {
+			var A = AUI();
+
+			if (dialog) {
+				if (Liferay.Util.getTop() == window) {
+					dialog.plug(A.LoadingMask).render();
+				}
+				else {
+					dialog.hide();
+				}
+			}
+		},
+		['aui-loading-mask-deprecated']
+	);
+
+	function <portlet:namespace />saveRuleGroupsPriorities(dialog) {
+		<portlet:namespace />processDialog(dialog);
+	}
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />saveRuleGroupInstance',
+		function(ruleGroupId, ruleGroupName, dialog) {
+			var A = AUI();
+
+			<portlet:namespace />processDialog(dialog);
+
+			Liferay.Service(
+				'/mdrrulegroupinstance/add-rule-group-instance',
+				{
+					groupId: <%= groupId %>,
+					className: '<%= className %>',
+					classPK: <%= classPK %>,
+					ruleGroupId: ruleGroupId,
+					serviceContext: A.JSON.stringify(
+						{
+							scopeGroupId: themeDisplay.getScopeGroupId(),
+							userId: themeDisplay.getUserId()
+						}
+					)
+				},
+				function(response, xhr) {
+					window.location.reload();
+				}
+			);
+		},
+		['aui-loading-mask-deprecated']
+	);
+</aui:script>
+
+<aui:script use="aui-base">
+	var saveInstance = A.one('#<portlet:namespace />saveInstance');
+
+	if (saveInstance) {
+		saveInstance.on(
+			'click',
+			function(event) {
+				Liferay.Util.openWindow(
+					{
+						id: '<portlet:namespace />ruleGroups',
+						title: '<%= UnicodeLanguageUtil.get(pageContext, "device-families") %>',
+						uri: '<%= selectRuleGroupURL %>'
+					}
+				);
+			}
+		);
+	}
+
+	var managePriorities = A.one('#<portlet:namespace />managePriorities');
+
+	if (managePriorities) {
+		managePriorities.on(
+			'click',
+			function(event) {
+				Liferay.Util.openWindow(
+					{
+						id: '<portlet:namespace />ruleGroupsPriorities',
+						title: '<%= UnicodeLanguageUtil.get(pageContext, "rule-priorities") %>',
+						uri: '<%= managePrioritiesURL %>'
+					}
+				);
+			}
+		);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/mobile_rule_groups.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/mobile_rule_groups.jsp
new file mode 100644
index 0000000..90c3fab
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/mobile_rule_groups.jsp
@@ -0,0 +1,17 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/layout/mobile_device_rules.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/seo.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/seo.jsp
new file mode 100644
index 0000000..2197cea
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout/seo.jsp
@@ -0,0 +1,84 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+Layout selLayout = (Layout)request.getAttribute("edit_pages.jsp-selLayout");
+
+UnicodeProperties layoutTypeSettings = null;
+
+if (selLayout != null) {
+	layoutTypeSettings = selLayout.getTypeSettingsProperties();
+}
+%>
+
+<liferay-ui:error-marker key="errorSection" value="seo" />
+
+<aui:model-context bean="<%= selLayout %>" model="<%= Layout.class %>" />
+
+<h3><liferay-ui:message key="seo" /></h3>
+
+<aui:input label="html-title" name="title" />
+
+<h4><liferay-ui:message key="meta-tags" /></h4>
+
+<aui:fieldset>
+	<aui:input name="description" />
+
+	<aui:input name="keywords" />
+
+	<aui:input name="robots" />
+</aui:fieldset>
+
+<c:if test="<%= PortalUtil.isLayoutSitemapable(selLayout) %>">
+	<h4><liferay-ui:message key="sitemap" /></h4>
+
+	<aui:fieldset>
+		<liferay-ui:error exception="<%= SitemapChangeFrequencyException.class %>" message="please-select-a-valid-change-frequency" />
+		<liferay-ui:error exception="<%= SitemapIncludeException.class %>" message="please-select-a-valid-include-value" />
+		<liferay-ui:error exception="<%= SitemapPagePriorityException.class %>" message="please-enter-a-valid-page-priority" />
+
+		<%
+		boolean sitemapInclude = GetterUtil.getBoolean(layoutTypeSettings.getProperty("sitemap-include"), true);
+		%>
+
+		<aui:select label="include" name="TypeSettingsProperties--sitemap-include--">
+			<aui:option label="yes" selected="<%= sitemapInclude %>" value="1" />
+			<aui:option label="no" selected="<%= !sitemapInclude %>" value="0" />
+		</aui:select>
+
+		<%
+		String sitemapPriority = layoutTypeSettings.getProperty("sitemap-priority", PropsValues.SITES_SITEMAP_DEFAULT_PRIORITY);
+		%>
+
+		<aui:input helpMessage="(0.0 - 1.0)" label="page-priority" name="TypeSettingsProperties--sitemap-priority--" size="3" type="text" value="<%= sitemapPriority %>" />
+
+		<%
+		String siteMapChangeFrequency = layoutTypeSettings.getProperty("sitemap-changefreq", PropsValues.SITES_SITEMAP_DEFAULT_CHANGE_FREQUENCY);
+		%>
+
+		<aui:select label="change-frequency" name="TypeSettingsProperties--sitemap-changefreq--">
+			<aui:option label="always" selected='<%= siteMapChangeFrequency.equals("always") %>' />
+			<aui:option label="hourly" selected='<%= siteMapChangeFrequency.equals("hourly") %>' />
+			<aui:option label="daily" selected='<%= siteMapChangeFrequency.equals("daily") %>' />
+			<aui:option label="weekly" selected='<%= siteMapChangeFrequency.equals("weekly") %>' />
+			<aui:option label="monthly" selected='<%= siteMapChangeFrequency.equals("monthly") %>' />
+			<aui:option label="yearly" selected='<%= siteMapChangeFrequency.equals("yearly") %>' />
+			<aui:option label="never" selected='<%= siteMapChangeFrequency.equals("never") %>' />
+		</aui:select>
+	</aui:fieldset>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout_set/advanced.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout_set/advanced.jsp
new file mode 100644
index 0000000..6309d45
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout_set/advanced.jsp
@@ -0,0 +1,50 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+Group liveGroup = (Group)request.getAttribute("edit_pages.jsp-liveGroup");
+boolean privateLayout = ((Boolean)request.getAttribute("edit_pages.jsp-privateLayout")).booleanValue();
+UnicodeProperties groupTypeSettings = (UnicodeProperties)request.getAttribute("edit_pages.jsp-groupTypeSettings");
+
+Group guestGroup = GroupLocalServiceUtil.getGroup(company.getCompanyId(), GroupConstants.GUEST);
+
+boolean mergeGuestPublicPages = PropertiesParamUtil.getBoolean(groupTypeSettings, request, "mergeGuestPublicPages");
+%>
+
+<liferay-ui:error-marker key="errorSection" value="advanced" />
+
+<h3><liferay-ui:message key="advanced" /></h3>
+
+<aui:fieldset>
+	<c:choose>
+		<c:when test="<%= !privateLayout && (liveGroup.getGroupId() != guestGroup.getGroupId()) %>">
+
+			<%
+			String taglibLabel = LanguageUtil.format(pageContext, "merge-x-public-pages", HtmlUtil.escape(guestGroup.getDescriptiveName(locale)));
+			String taglibHelpMessage = LanguageUtil.format(pageContext, "you-can-configure-the-top-level-pages-of-this-public-site-to-merge-with-the-top-level-pages-of-the-public-x-site", HtmlUtil.escape(guestGroup.getDescriptiveName(locale)));
+			%>
+
+			<aui:input helpMessage="<%= taglibHelpMessage %>" label="<%= taglibLabel %>" name="mergeGuestPublicPages" type="checkbox" value="<%= mergeGuestPublicPages %>" />
+		</c:when>
+		<c:otherwise>
+			<div class="alert alert-info">
+				<liferay-ui:message key="there-are-no-available-advanced-settings-for-these-pages" />
+			</div>
+		</c:otherwise>
+	</c:choose>
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout_set/javascript.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout_set/javascript.jsp
new file mode 100644
index 0000000..e6b24ec
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout_set/javascript.jsp
@@ -0,0 +1,31 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+LayoutSet selLayoutSet = ((LayoutSet)request.getAttribute("edit_pages.jsp-selLayoutSet"));
+
+UnicodeProperties layoutSetTypeSettings = selLayoutSet.getSettingsProperties();
+%>
+
+<liferay-ui:error-marker key="errorSection" value="javascript" />
+
+<h3><liferay-ui:message key="javascript" /></h3>
+
+<aui:fieldset>
+	<aui:input cssClass="lfr-textarea-container" label="paste-javascript-code-that-will-be-executed-at-the-bottom-of-every-page" name="TypeSettingsProperties--javascript--" style="width: 300px; height: 300px" type="textarea" value='<%= layoutSetTypeSettings.getProperty("javascript") %>' wrap="soft" />
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout_set/logo.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout_set/logo.jsp
new file mode 100644
index 0000000..d5ba7b2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout_set/logo.jsp
@@ -0,0 +1,120 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+Group liveGroup = (Group)request.getAttribute("edit_pages.jsp-liveGroup");
+boolean privateLayout = ((Boolean)request.getAttribute("edit_pages.jsp-privateLayout")).booleanValue();
+UnicodeProperties groupTypeSettings = (UnicodeProperties)request.getAttribute("edit_pages.jsp-groupTypeSettings");
+LayoutSet selLayoutSet = ((LayoutSet)request.getAttribute("edit_pages.jsp-selLayoutSet"));
+%>
+
+<liferay-ui:error-marker key="errorSection" value="logo" />
+
+<h3><liferay-ui:message key="logo" /></h3>
+
+<aui:fieldset>
+	<liferay-ui:error exception="<%= FileSizeException.class %>">
+
+		<%
+		long fileMaxSize = PrefsPropsUtil.getLong(PropsKeys.DL_FILE_MAX_SIZE);
+
+		if (fileMaxSize == 0) {
+			fileMaxSize = PrefsPropsUtil.getLong(PropsKeys.UPLOAD_SERVLET_REQUEST_IMPL_MAX_SIZE);
+		}
+
+		fileMaxSize /= 1024;
+		%>
+
+		<liferay-ui:message arguments="<%= fileMaxSize %>" key="please-enter-a-file-with-a-valid-file-size-no-larger-than-x" />
+	</liferay-ui:error>
+
+	<liferay-ui:error exception="<%= ImageTypeException.class %>" message="please-enter-a-file-with-a-valid-file-type" />
+	<liferay-ui:error exception="<%= UploadException.class %>" message="an-unexpected-error-occurred-while-uploading-your-file" />
+
+	<aui:input name="useLogo" type="hidden" value="<%= selLayoutSet.isLogo() %>" />
+
+	<p><%= LanguageUtil.get(pageContext, "upload-a-logo-for-the-" + (privateLayout ? "private" : "public") + "-pages-that-will-be-used-instead-of-the-default-enterprise-logo") %></p>
+
+	<aui:input inlineField="<%= true %>" label="" name="logoFileName" type="file" />
+
+	<c:if test="<%= selLayoutSet.getLogo() %>">
+		<liferay-ui:icon
+			cssClass="modify-link"
+			id="deleteLogoLink"
+			image="delete"
+			label="<%= true %>"
+			url="javascript:;"
+		/>
+
+		<%
+		long logoId = selLayoutSet.getLogoId();
+
+		if (logoId == 0) {
+			logoId = selLayoutSet.getLiveLogoId();
+		}
+		%>
+
+		<div class="lfr-change-logo" id="<portlet:namespace />logoContainer">
+			<img alt="<liferay-ui:message key="logo" />" src="<%= themeDisplay.getPathImage() %>/layout_set_logo?img_id=<%= logoId %>&t=<%= WebServerServletTokenUtil.getToken(selLayoutSet.getLogoId()) %>" />
+		</div>
+	</c:if>
+
+	<%
+	Group guestGroup = GroupLocalServiceUtil.getGroup(company.getCompanyId(), GroupConstants.GUEST);
+	%>
+
+	<c:if test="<%= liveGroup.getGroupId() != guestGroup.getGroupId() %>">
+
+		<%
+		boolean showSiteNameSupported = GetterUtil.getBoolean(selLayoutSet.getTheme().getSetting("show-site-name-supported"), true);
+
+		boolean showSiteNameDefault = GetterUtil.getBoolean(selLayoutSet.getTheme().getSetting("show-site-name-default"), showSiteNameSupported);
+
+		boolean showSiteName = GetterUtil.getBoolean(selLayoutSet.getSettingsProperty("showSiteName"), showSiteNameDefault);
+		%>
+
+		<aui:input checked="<%= showSiteName %>" disabled="<%= !showSiteNameSupported %>" helpMessage='<%= showSiteNameSupported ? StringPool.BLANK : "the-theme-selected-for-the-site-does-not-support-displaying-the-title" %>' label="show-site-name" name="TypeSettingsProperties--showSiteName--" type="checkbox" />
+	</c:if>
+</aui:fieldset>
+
+<aui:script use="aui-base">
+	var deleteLogoLink = A.one('#<portlet:namespace />deleteLogoLink');
+	var useLogoInput = A.one('#<portlet:namespace />useLogo');
+	var logoContainer = A.one('#<portlet:namespace />logoContainer');
+	var logoFileNameInput = A.one('#<portlet:namespace />logoFileName');
+
+	var changeLogo = function(event) {
+		var changeLogo = (event.type == 'change');
+
+		if (useLogoInput) {
+			useLogoInput.val(changeLogo);
+		}
+
+		if (logoContainer) {
+			logoContainer.hide();
+		}
+	};
+
+	if (deleteLogoLink) {
+		deleteLogoLink.on('click', changeLogo);
+	}
+
+	if (logoFileNameInput) {
+		logoFileNameInput.on('change', changeLogo);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout_set/look_and_feel.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout_set/look_and_feel.jsp
new file mode 100644
index 0000000..af00683
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout_set/look_and_feel.jsp
@@ -0,0 +1,61 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+long groupId = ((Long)request.getAttribute("edit_pages.jsp-groupId")).longValue();
+long liveGroupId = ((Long)request.getAttribute("edit_pages.jsp-liveGroupId")).longValue();
+boolean privateLayout = ((Boolean)request.getAttribute("edit_pages.jsp-privateLayout")).booleanValue();
+LayoutSet layoutSet = ((LayoutSet)request.getAttribute("edit_pages.jsp-selLayoutSet"));
+
+Theme selTheme = layoutSet.getTheme();
+ColorScheme selColorScheme = layoutSet.getColorScheme();
+
+Theme selWapTheme = layoutSet.getWapTheme();
+ColorScheme selWapColorScheme = layoutSet.getWapColorScheme();
+%>
+
+<liferay-ui:error-marker key="errorSection" value="look-and-feel" />
+
+<aui:model-context bean="<%= layoutSet %>" model="<%= Layout.class %>" />
+
+<h3><liferay-ui:message key="look-and-feel" /></h3>
+
+<aui:fieldset>
+	<aui:input name="devices" type="hidden" value='<%= PropsValues.MOBILE_DEVICE_STYLING_WAP_ENABLED? "regular,wap" : "regular" %>' />
+
+	<c:choose>
+		<c:when test="<%= PropsValues.MOBILE_DEVICE_STYLING_WAP_ENABLED %>">
+
+		<liferay-ui:tabs
+			names="regular-browsers,mobile-devices"
+			refresh="<%= false %>"
+		>
+			<liferay-ui:section>
+				<%@ include file="/html/portlet/layouts_admin/layout_set/look_and_feel_regular_browser.jspf" %>
+			</liferay-ui:section>
+
+			<liferay-ui:section>
+				<%@ include file="/html/portlet/layouts_admin/layout_set/look_and_feel_wap_browser.jspf" %>
+			</liferay-ui:section>
+		</liferay-ui:tabs>
+		</c:when>
+		<c:otherwise>
+			<%@ include file="/html/portlet/layouts_admin/layout_set/look_and_feel_regular_browser.jspf" %>
+		</c:otherwise>
+	</c:choose>
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout_set/look_and_feel_regular_browser.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout_set/look_and_feel_regular_browser.jspf
new file mode 100644
index 0000000..ceccd28
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout_set/look_and_feel_regular_browser.jspf
@@ -0,0 +1,33 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+List<Theme> themes = ThemeLocalServiceUtil.getThemes(company.getCompanyId(), liveGroupId, user.getUserId(), false);
+List<ColorScheme> colorSchemes = selTheme.getColorSchemes();
+
+request.setAttribute("edit_pages.jsp-themes", themes);
+request.setAttribute("edit_pages.jsp-colorSchemes", colorSchemes);
+request.setAttribute("edit_pages.jsp-selTheme", selTheme);
+request.setAttribute("edit_pages.jsp-selColorScheme", selColorScheme);
+request.setAttribute("edit_pages.jsp-device", "regular");
+request.setAttribute("edit_pages.jsp-editable", true);
+%>
+
+<liferay-util:include page="/html/portlet/layouts_admin/look_and_feel_themes.jsp" />
+
+<legend><liferay-ui:message key="css" /></legend>
+
+<aui:input label="insert-custom-css-that-will-be-loaded-after-the-theme" name="regularCss" type="textarea" value="<%= layoutSet.getCss() %>" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout_set/look_and_feel_wap_browser.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout_set/look_and_feel_wap_browser.jspf
new file mode 100644
index 0000000..bc80978
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout_set/look_and_feel_wap_browser.jspf
@@ -0,0 +1,29 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+List<Theme> themes = ThemeLocalServiceUtil.getThemes(company.getCompanyId(), liveGroupId, user.getUserId(), true);
+List<ColorScheme> colorSchemes = selWapTheme.getColorSchemes();
+
+request.setAttribute("edit_pages.jsp-themes", themes);
+request.setAttribute("edit_pages.jsp-colorSchemes", colorSchemes);
+request.setAttribute("edit_pages.jsp-selTheme", selWapTheme);
+request.setAttribute("edit_pages.jsp-selColorScheme", selWapColorScheme);
+request.setAttribute("edit_pages.jsp-device", "wap");
+request.setAttribute("edit_pages.jsp-editable", true);
+%>
+
+<liferay-util:include page="/html/portlet/layouts_admin/look_and_feel_themes.jsp" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout_set/mobile_device_rules.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout_set/mobile_device_rules.jsp
new file mode 100644
index 0000000..f6bbb5e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout_set/mobile_device_rules.jsp
@@ -0,0 +1,31 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+LayoutSet selLayoutSet = ((LayoutSet)request.getAttribute("edit_pages.jsp-selLayoutSet"));
+
+long groupId = selLayoutSet.getGroupId();
+String className = LayoutSet.class.getName();
+long classPK = selLayoutSet.getLayoutSetId();
+%>
+
+<%@ include file="/html/portlet/layouts_admin/layout/mobile_device_rules_header.jspf" %>
+
+<%@ include file="/html/portlet/layouts_admin/layout/mobile_device_rules_toolbar.jspf" %>
+
+<%@ include file="/html/portlet/layouts_admin/layout/mobile_device_rules_rule_group_instances.jspf" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout_set/mobile_rule_groups.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout_set/mobile_rule_groups.jsp
new file mode 100644
index 0000000..a4d0017
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/layout_set/mobile_rule_groups.jsp
@@ -0,0 +1,17 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/layout_set/mobile_device_rules.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/look_and_feel_themes.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/look_and_feel_themes.jsp
new file mode 100644
index 0000000..a0fb8ce
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/look_and_feel_themes.jsp
@@ -0,0 +1,334 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+Layout selLayout = (Layout)request.getAttribute("edit_pages.jsp-selLayout");
+LayoutSet selLayoutSet = (LayoutSet)request.getAttribute("edit_pages.jsp-selLayoutSet");
+
+List<Theme> themes = (List<Theme>)request.getAttribute("edit_pages.jsp-themes");
+List<ColorScheme> colorSchemes = (List<ColorScheme>)request.getAttribute("edit_pages.jsp-colorSchemes");
+Theme selTheme = (Theme)request.getAttribute("edit_pages.jsp-selTheme");
+ColorScheme selColorScheme = (ColorScheme)request.getAttribute("edit_pages.jsp-selColorScheme");
+String device = (String)request.getAttribute("edit_pages.jsp-device");
+boolean editable = (Boolean)request.getAttribute("edit_pages.jsp-editable");
+
+Map<String, ThemeSetting> configurableSettings = selTheme.getConfigurableSettings();
+%>
+
+<div class="lfr-theme-list">
+	<div class="float-container lfr-current-theme" id="<%= editable ? device : StringPool.BLANK %>LookAndFeel">
+		<legend><liferay-ui:message key="current-theme" /></legend>
+
+		<div>
+			<img alt="<%= selTheme.getName() %>" class="img-polaroid theme-screenshot" onclick="<portlet:namespace /><%= device %>selectTheme('SelTheme', false);" src="<%= themeDisplay.getCDNBaseURL() %><%= selTheme.getStaticResourcePath() %><%= selTheme.getImagesPath() %>/thumbnail.png" title="<%= selTheme.getName() %>" />
+
+			<div class="theme-details">
+				<c:choose>
+					<c:when test="<%= editable %>">
+						<aui:input checked="<%= true %>" cssClass="selected-theme theme-title" id='<%= device + "SelTheme" %>' label="<%= selTheme.getName() %>" name='<%= device + "ThemeId" %>' type="radio" value="<%= selTheme.getThemeId() %>" />
+					</c:when>
+					<c:otherwise>
+						<div class="selected-theme theme-title"><%= selTheme.getName() %></div>
+					</c:otherwise>
+				</c:choose>
+
+				<dl class="theme-fields">
+
+					<%
+					PluginPackage selPluginPackage = selTheme.getPluginPackage();
+					%>
+
+					<c:if test="<%= (selPluginPackage != null) && Validator.isNotNull(selPluginPackage.getShortDescription()) %>">
+						<dt>
+							<liferay-ui:message key="description" />
+						</dt>
+						<dd>
+							<%= selPluginPackage.getShortDescription() %>
+						</dd>
+					</c:if>
+
+					<c:if test="<%= editable && (selPluginPackage != null) && Validator.isNotNull(selPluginPackage.getAuthor()) %>">
+						<dt>
+							<liferay-ui:message key="author" />
+						</dt>
+						<dd>
+							<a href="<%= selPluginPackage.getPageURL() %>"><%= selPluginPackage.getAuthor() %></a>
+						</dd>
+					</c:if>
+
+					<c:if test="<%= !editable && !colorSchemes.isEmpty() && Validator.isNotNull(selColorScheme) %>">
+						<dt class="current-color-scheme">
+							<liferay-ui:message key="color-scheme" />
+						</dt>
+						<dd>
+							<%= selColorScheme.getName() %>
+						</dd>
+					</c:if>
+
+					<c:if test="<%= !editable && !configurableSettings.isEmpty() %>">
+
+						<%
+						for (String name : configurableSettings.keySet()) {
+						%>
+
+							<dt class="theme-setting">
+								<liferay-ui:message key="<%= name %>" />
+							</dt>
+							<dd>
+								<%= selLayoutSet.getThemeSetting(name, device) %>
+							</dd>
+
+						<%
+						}
+						%>
+
+					</c:if>
+				</dl>
+			</div>
+		</div>
+
+		<c:if test="<%= editable %>">
+			<c:if test="<%= !colorSchemes.isEmpty() || !configurableSettings.isEmpty() %>">
+				<c:if test="<%= !colorSchemes.isEmpty() %>">
+					<liferay-ui:panel collapsible="<%= true %>" extended="<%= false %>" id='<%= device + "layoutsAdminLookAndFeelColorsPanel" %>' persistState="<%= true %>" title='<%= LanguageUtil.format(pageContext, "color-schemes-x", colorSchemes.size()) %>'>
+						<aui:fieldset cssCclass="color-schemes">
+							<div class="lfr-theme-list unstyled">
+
+								<%
+								for (int i = 0; i < colorSchemes.size(); i++) {
+									ColorScheme curColorScheme = colorSchemes.get(i);
+
+									String cssClass = StringPool.BLANK;
+
+									if (selColorScheme.getColorSchemeId().equals(curColorScheme.getColorSchemeId())) {
+										cssClass = "selected-color-scheme";
+									}
+								%>
+
+								<div class="<%= cssClass %> theme-entry">
+									<img alt="" class="modify-link theme-thumbnail" onclick="<portlet:namespace /><%= device %>selectColorScheme('#<portlet:namespace /><%= device %>ColorSchemeId<%= i %>');" src="<%= themeDisplay.getCDNBaseURL() %><%= selTheme.getStaticResourcePath() %><%= curColorScheme.getColorSchemeThumbnailPath() %>/thumbnail.png" title="<%= curColorScheme.getName() %>" />
+
+									<aui:input checked="<%= selColorScheme.getColorSchemeId().equals(curColorScheme.getColorSchemeId()) %>" cssClass="theme-title" id='<%= device + "ColorSchemeId" + i %>' label="<%= curColorScheme.getName() %>" name='<%= device + "ColorSchemeId" %>' type="radio" value="<%= curColorScheme.getColorSchemeId() %>" />
+								</div>
+
+								<%
+								}
+								%>
+
+							</div>
+						</aui:fieldset>
+					</liferay-ui:panel>
+				</c:if>
+
+				<c:if test="<%= !configurableSettings.isEmpty() %>">
+					<liferay-ui:panel collapsible="<%= true %>" extended="<%= false %>" id='<%= device + "layoutsAdminLookAndFeelSettingsPanel" %>' persistState="<%= true %>" title="settings">
+						<aui:fieldset>
+
+							<%
+							for (String name : configurableSettings.keySet()) {
+								ThemeSetting themeSetting = configurableSettings.get(name);
+
+								String type = GetterUtil.getString(themeSetting.getType(), "text");
+								String value = StringPool.BLANK;
+
+								if (selLayout != null) {
+									value = selLayout.getThemeSetting(name, device);
+								}
+								else {
+									value = selLayoutSet.getThemeSetting(name, device);
+								}
+
+								String propertyName = device + "ThemeSettingsProperties--" + name + StringPool.DOUBLE_DASH;
+							%>
+
+								<c:choose>
+									<c:when test='<%= type.equals("checkbox") || type.equals("text") || type.equals("textarea") %>'>
+										<aui:input label="<%= name %>" name="<%= propertyName %>" type="<%= type %>" value="<%= value %>" />
+									</c:when>
+									<c:when test='<%= type.equals("select") %>'>
+										<aui:select label="<%= name %>" name="<%= propertyName %>">
+
+											<%
+											for (String option : themeSetting.getOptions()) {
+											%>
+
+												<aui:option label="<%= option %>" selected="<%= option.equals(value) %>" />
+
+											<%
+											}
+											%>
+
+										</aui:select>
+									</c:when>
+								</c:choose>
+
+								<c:if test="<%= Validator.isNotNull(themeSetting.getScript()) %>">
+									<aui:script position="inline">
+										<%= StringUtil.replace(themeSetting.getScript(), "[@NAMESPACE@]", liferayPortletResponse.getNamespace()) %>
+									</aui:script>
+								</c:if>
+
+							<%
+							}
+							%>
+
+						</aui:fieldset>
+					</liferay-ui:panel>
+				</c:if>
+			</c:if>
+		</c:if>
+	</div>
+
+	<c:if test="<%= editable %>">
+		<div class="float-container lfr-available-themes" id="<%= device %>availableThemes">
+			<legend>
+				<span class="header-title">
+					<%= LanguageUtil.format(pageContext, "available-themes-x", (themes.size() - 1)) %>
+				</span>
+
+				<c:if test="<%= permissionChecker.isOmniadmin() && PortletLocalServiceUtil.hasPortlet(themeDisplay.getCompanyId(), PortletKeys.MARKETPLACE_STORE) && PrefsPropsUtil.getBoolean(PropsKeys.AUTO_DEPLOY_ENABLED, PropsValues.AUTO_DEPLOY_ENABLED) %>">
+
+					<%
+					long controlPanelPlid = PortalUtil.getControlPanelPlid(company.getCompanyId());
+
+					PortletURL marketplaceURL = PortletURLFactoryUtil.create(request, PortletKeys.MARKETPLACE_STORE, controlPanelPlid, PortletRequest.RENDER_PHASE);
+					%>
+
+					<liferay-ui:icon
+						cssClass="manage-layout-set-branches-link pull-right"
+						iconCssClass="icon-inbox"
+						id="installMore"
+						label="<%= true %>"
+						linkCssClass="btn"
+						message="install-more"
+						url='<%= HttpUtil.removeParameter(marketplaceURL.toString(), "controlPanelCategory") %>'
+					/>
+				</c:if>
+			</legend>
+
+			<c:if test="<%= themes.size() > 1 %>">
+				<ul class="lfr-theme-list unstyled">
+
+					<%
+					for (int i = 0; i < themes.size(); i++) {
+						Theme curTheme = themes.get(i);
+
+						if (!selTheme.getThemeId().equals(curTheme.getThemeId())) {
+					%>
+
+							<li>
+								<div class="theme-entry">
+									<img alt="" class="modify-link theme-thumbnail" onclick="<portlet:namespace /><%= device %>selectTheme('ThemeId<%= i %>', true);" src="<%= themeDisplay.getCDNBaseURL() %><%= curTheme.getStaticResourcePath() %><%= curTheme.getImagesPath() %>/thumbnail.png" title="<%= curTheme.getName() %>" />
+
+									<aui:input cssClass="theme-title" id='<%= device + "ThemeId" + i %>' label="<%= curTheme.getName() %>" name='<%= device + "ThemeId" %>' type="radio" value="<%= curTheme.getThemeId() %>" />
+								</div>
+							</li>
+
+					<%
+						}
+					}
+					%>
+
+				</ul>
+			</c:if>
+		</div>
+	</c:if>
+</div>
+
+<c:if test="<%= editable %>">
+	<aui:script use="aui-base">
+		var availableThemes = A.one('#<%= device %>availableThemes');
+		var colorSchemePanel = A.one('#<%= device %>layoutsAdminLookAndFeelColorsPanel');
+		var lookAndFeelForm = A.one('#<%= device %>LookAndFeel');
+
+		var toggleDisabled = function(disabled) {
+			colorSchemePanel.all('input[name=<portlet:namespace /><%= device %>ColorSchemeId]').set('disabled', disabled);
+		};
+
+		if (colorSchemePanel) {
+			if (availableThemes) {
+				availableThemes.all('input[name=<portlet:namespace /><%= device %>ThemeId]').on(
+					'change',
+					function() {
+						toggleDisabled(true);
+					}
+				);
+			}
+
+			lookAndFeelForm.one('#<portlet:namespace /><%= device %>SelTheme').on(
+				'change',
+				function() {
+					toggleDisabled(false);
+				}
+			);
+		}
+	</aui:script>
+
+	<aui:script>
+		Liferay.provide(
+			window,
+			'<portlet:namespace /><%= device %>selectColorScheme',
+			function(id) {
+				var A = AUI();
+
+				var colorSchemeInput = A.one(id);
+
+				if (!colorSchemeInput.get('disabled')) {
+					colorSchemeInput.set('checked', true);
+				}
+			},
+			['aui-base']
+		);
+
+		Liferay.provide(
+			window,
+			'<portlet:namespace /><%= device %>selectTheme',
+			function(themeId, colorSchemesDisabled) {
+				var A = AUI();
+
+				A.one('#<portlet:namespace /><%= device %>' + themeId).set('checked', true);
+
+				var colorSchemePanel = A.one('#<%= device %>layoutsAdminLookAndFeelColorsPanel');
+
+				if (colorSchemePanel) {
+					colorSchemePanel.all('input[name=<portlet:namespace /><%= device %>ColorSchemeId]').set('disabled', colorSchemesDisabled);
+				}
+			},
+			['aui-base']
+		);
+	</aui:script>
+</c:if>
+
+<c:if test="<%= editable && permissionChecker.isOmniadmin() && PrefsPropsUtil.getBoolean(PropsKeys.AUTO_DEPLOY_ENABLED, PropsValues.AUTO_DEPLOY_ENABLED) %>">
+	<aui:script use="aui-base">
+		if (window.parent) {
+			var installMoreLink = A.one('#<portlet:namespace />installMore');
+
+			if (installMoreLink) {
+				installMoreLink.on(
+					'click',
+					function(event) {
+						event.preventDefault();
+
+						window.parent.location = installMoreLink.attr('href');
+					}
+				);
+			}
+		}
+	</aui:script>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_layouts.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_layouts.jsp
new file mode 100644
index 0000000..b524644
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_layouts.jsp
@@ -0,0 +1,470 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+String cmd = ParamUtil.getString(request, Constants.CMD);
+
+if (Validator.isNull(cmd)) {
+	cmd = ParamUtil.getString(request, "originalCmd", "publish_to_live");
+}
+
+String tabs1 = ParamUtil.getString(request, "tabs1", "public-pages");
+
+String closeRedirect = ParamUtil.getString(request, "closeRedirect");
+
+Group selGroup = (Group)request.getAttribute(WebKeys.GROUP);
+
+Group liveGroup = null;
+Group stagingGroup = null;
+
+int pagesCount = 0;
+
+if (selGroup.isStagingGroup()) {
+	liveGroup = selGroup.getLiveGroup();
+	stagingGroup = selGroup;
+}
+else if (selGroup.isStaged()) {
+	liveGroup = selGroup;
+
+	if (selGroup.isStagedRemotely()) {
+		stagingGroup = selGroup;
+	}
+	else {
+		stagingGroup = selGroup.getStagingGroup();
+	}
+}
+
+long liveGroupId = 0;
+
+if (liveGroup != null) {
+	liveGroupId = liveGroup.getGroupId();
+}
+
+long stagingGroupId = 0;
+
+if (stagingGroup != null) {
+	stagingGroupId = stagingGroup.getGroupId();
+}
+
+long layoutSetBranchId = ParamUtil.getLong(request, "layoutSetBranchId");
+String layoutSetBranchName = ParamUtil.getString(request, "layoutSetBranchName");
+
+boolean localPublishing = true;
+
+if (liveGroup.isStaged()) {
+	if (liveGroup.isStagedRemotely()) {
+		localPublishing = false;
+	}
+}
+else if (cmd.equals("publish_to_remote")) {
+	localPublishing = false;
+}
+
+String treeId = "liveLayoutsTree";
+
+if (liveGroup.isStaged()) {
+	if (!liveGroup.isStagedRemotely()) {
+		treeId = "stageLayoutsTree";
+	}
+	else {
+		treeId = "remoteLayoutsTree";
+	}
+}
+
+treeId = treeId + liveGroupId;
+
+String publishActionKey = "copy";
+
+if (liveGroup.isStaged()) {
+	publishActionKey = "publish";
+}
+else if (cmd.equals("publish_to_remote")) {
+	publishActionKey = "publish";
+}
+
+long selPlid = ParamUtil.getLong(request, "selPlid", LayoutConstants.DEFAULT_PARENT_LAYOUT_ID);
+
+Layout selLayout = null;
+
+try {
+	selLayout = LayoutLocalServiceUtil.getLayout(selPlid);
+
+	if (selLayout.isPrivateLayout()) {
+		tabs1 = "private-pages";
+	}
+}
+catch (NoSuchLayoutException nsle) {
+}
+
+boolean privateLayout = ParamUtil.getBoolean(request, "privateLayout", tabs1.equals("private-pages"));
+
+treeId = treeId + privateLayout + layoutSetBranchId;
+
+long[] selectedLayoutIds = GetterUtil.getLongValues(StringUtil.split(SessionTreeJSClicks.getOpenNodes(request, treeId + "SelectedNode"), ','));
+
+List<Layout> selectedLayouts = new ArrayList<Layout>();
+
+long selectedLayoutsGroupId = selGroup.getGroupId();
+
+if (stagingGroupId > 0) {
+	selectedLayoutsGroupId = stagingGroupId;
+}
+
+for (int i = 0; i < selectedLayoutIds.length; i++) {
+	try {
+		selectedLayouts.add(LayoutLocalServiceUtil.getLayout(selectedLayoutsGroupId, privateLayout, selectedLayoutIds[i]));
+	}
+	catch (NoSuchLayoutException nsle) {
+	}
+}
+
+if (privateLayout) {
+	pagesCount = selGroup.getPrivateLayoutsPageCount();
+}
+else {
+	pagesCount = selGroup.getPublicLayoutsPageCount();
+}
+
+UnicodeProperties groupTypeSettings = selGroup.getTypeSettingsProperties();
+UnicodeProperties liveGroupTypeSettings = liveGroup.getTypeSettingsProperties();
+
+Organization organization = null;
+User user2 = null;
+
+if (liveGroup.isOrganization()) {
+	organization = OrganizationLocalServiceUtil.getOrganization(liveGroup.getOrganizationId());
+}
+else if (liveGroup.isUser()) {
+	user2 = UserLocalServiceUtil.getUserById(liveGroup.getClassPK());
+}
+
+String rootNodeName = liveGroup.getDescriptiveName(locale);
+
+if (liveGroup.isOrganization()) {
+	rootNodeName = organization.getName();
+}
+else if (liveGroup.isUser()) {
+	rootNodeName = user2.getFullName();
+}
+
+PortletURL portletURL = renderResponse.createActionURL();
+
+if (selGroup.isStaged() && selGroup.isStagedRemotely()) {
+	cmd = "publish_to_remote";
+}
+
+portletURL.setParameter("struts_action", "/layouts_admin/publish_layouts");
+portletURL.setParameter("closeRedirect", closeRedirect);
+portletURL.setParameter("groupId", String.valueOf(liveGroupId));
+portletURL.setParameter("stagingGroupId", String.valueOf(stagingGroupId));
+portletURL.setParameter("privateLayout", String.valueOf(privateLayout));
+
+PortletURL renderURL = renderResponse.createRenderURL();
+
+renderURL.setParameter("struts_action", "/layouts_admin/publish_layouts");
+renderURL.setParameter("tabs2", "current-and-previous");
+renderURL.setParameter("closeRedirect", closeRedirect);
+renderURL.setParameter("groupId", String.valueOf(stagingGroupId));
+renderURL.setParameter("privateLayout", String.valueOf(privateLayout));
+
+response.setHeader("Ajax-ID", request.getHeader("Ajax-ID"));
+%>
+
+<c:if test='<%= SessionMessages.contains(renderRequest, "requestProcessed") %>'>
+
+	<%
+	String successMessage = (String)SessionMessages.get(renderRequest, "requestProcessed");
+	%>
+
+	<c:if test='<%= Validator.isNotNull(successMessage) && !successMessage.equals("request_processed") %>'>
+		<div class="alert alert-success">
+			<%= HtmlUtil.escape(successMessage) %>
+		</div>
+	</c:if>
+</c:if>
+
+<%
+String tabs2Names = StringPool.BLANK;
+
+if (cmd.equals("view_processes")) {
+	tabs2Names = "current-and-previous";
+}
+else {
+	tabs2Names = "new-publication-process,current-and-previous,scheduled";
+}
+%>
+
+<liferay-ui:tabs
+	names="<%= tabs2Names %>"
+	param="tabs2"
+	refresh="<%= false %>"
+>
+	<c:if test='<%= !cmd.equals("view_processes") %>'>
+		<liferay-ui:section>
+			<aui:form action='<%= portletURL.toString() + "&etag=0&strip=0" %>' cssClass="lfr-export-dialog" method="post" name="exportPagesFm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "publishPages();" %>' >
+				<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= cmd %>" />
+				<aui:input name="originalCmd" type="hidden" value="<%= cmd %>" />
+				<aui:input name="tabs1" type="hidden" value="<%= tabs1 %>" />
+				<aui:input name="redirect" type="hidden" value="<%= renderURL.toString() %>" />
+				<aui:input name="stagingGroupId" type="hidden" value="<%= stagingGroupId %>" />
+				<aui:input name="layoutSetBranchName" type="hidden" value="<%= layoutSetBranchName %>" />
+				<aui:input name="lastImportUserName" type="hidden" value="<%= user.getFullName() %>" />
+				<aui:input name="lastImportUserUuid" type="hidden" value="<%= String.valueOf(user.getUserUuid()) %>" />
+
+				<liferay-ui:error exception="<%= DuplicateLockException.class %>" message="another-publishing-process-is-in-progress,-please-try-again-later" />
+
+				<liferay-ui:error exception="<%= LayoutPrototypeException.class %>">
+
+					<%
+					LayoutPrototypeException lpe = (LayoutPrototypeException)errorException;
+					%>
+
+					<liferay-ui:message key="the-pages-could-not-be-published-because-one-or-more-required-page-templates-could-not-be-found-on-the-remote-system.-please-import-the-following-templates-manually" />
+
+					<ul>
+
+						<%
+						List<Tuple> missingLayoutPrototypes = lpe.getMissingLayoutPrototypes();
+
+						for (Tuple missingLayoutPrototype : missingLayoutPrototypes) {
+							String layoutPrototypeClassName = (String)missingLayoutPrototype.getObject(0);
+							String layoutPrototypeUuid = (String)missingLayoutPrototype.getObject(1);
+							String layoutPrototypeName = (String)missingLayoutPrototype.getObject(2);
+						%>
+
+						<li>
+							<%= ResourceActionsUtil.getModelResource(locale, layoutPrototypeClassName) %>: <strong><%= HtmlUtil.escape(layoutPrototypeName) %></strong> (<%= layoutPrototypeUuid %>)
+						</li>
+
+						<%
+						}
+						%>
+
+					</ul>
+				</liferay-ui:error>
+
+				<%@ include file="/html/portlet/layouts_admin/error_auth_exception.jspf" %>
+
+				<%@ include file="/html/portlet/layouts_admin/error_remote_export_exception.jspf" %>
+
+				<%@ include file="/html/portlet/layouts_admin/error_remote_options_exception.jspf" %>
+
+				<liferay-ui:error exception="<%= SystemException.class %>">
+
+					<%
+					SystemException se = (SystemException)errorException;
+					%>
+
+					<liferay-ui:message key="<%= se.getMessage() %>" />
+				</liferay-ui:error>
+
+				<div id="<portlet:namespace />publishOptions">
+					<div class="export-dialog-tree">
+
+						<%
+						String scheduleCMD = StringPool.BLANK;
+						String unscheduleCMD = StringPool.BLANK;
+
+						if (cmd.equals("copy_from_live")) {
+							scheduleCMD = "schedule_copy_from_live";
+							unscheduleCMD = "unschedule_copy_from_live";
+						}
+						else if (cmd.equals("publish_to_live")) {
+							scheduleCMD = "schedule_publish_to_live";
+							unscheduleCMD = "unschedule_publish_to_live";
+						}
+						else if (cmd.equals("publish_to_remote")) {
+							scheduleCMD = "schedule_publish_to_remote";
+							unscheduleCMD = "unschedule_publish_to_remote";
+						}
+
+						String taskExecutorClassName = localPublishing ? LayoutStagingBackgroundTaskExecutor.class.getName() : LayoutRemoteStagingBackgroundTaskExecutor.class.getName();
+
+						int incompleteBackgroundTaskCount = BackgroundTaskLocalServiceUtil.getBackgroundTasksCount(stagingGroupId, taskExecutorClassName, false);
+
+						incompleteBackgroundTaskCount += BackgroundTaskLocalServiceUtil.getBackgroundTasksCount(liveGroupId, taskExecutorClassName, false);
+						%>
+
+						<div class="<%= incompleteBackgroundTaskCount == 0 ? "hide" : "in-progress" %>" id="<portlet:namespace />incompleteProcessMessage">
+							<liferay-util:include page="/html/portlet/layouts_admin/incomplete_processes_message.jsp">
+								<liferay-util:param name="incompleteBackgroundTaskCount" value="<%= String.valueOf(incompleteBackgroundTaskCount) %>" />
+							</liferay-util:include>
+						</div>
+
+						<aui:fieldset cssClass="options-group" label="date">
+							<%@ include file="/html/portlet/layouts_admin/publish_layouts_scheduler.jspf" %>
+						</aui:fieldset>
+
+						<c:if test="<%= !selGroup.isCompany() %>">
+							<aui:fieldset cssClass="options-group" label="pages">
+								<%@ include file="/html/portlet/layouts_admin/publish_layouts_select_pages.jspf" %>
+							</aui:fieldset>
+						</c:if>
+
+						<%
+						List<Layout> exportLayouts = new ArrayList<Layout>();
+
+						if (selLayout != null) {
+							exportLayouts.add(selLayout);
+						}
+						else if (!selectedLayouts.isEmpty()) {
+							exportLayouts = selectedLayouts;
+						}
+						else {
+							exportLayouts = LayoutLocalServiceUtil.getLayouts(selGroup.getGroupId(), privateLayout);
+						}
+
+						List<Portlet> portletDataHandlerPortlets = LayoutExporter.getPortletDataHandlerPortlets(exportLayouts);
+						%>
+
+						<c:if test="<%= !portletDataHandlerPortlets.isEmpty() %>">
+							<aui:fieldset cssClass="options-group" label="application-configuration">
+								<%@ include file="/html/portlet/layouts_admin/publish_layouts_portlets_setup.jspf" %>
+							</aui:fieldset>
+						</c:if>
+
+						<%
+						List<Portlet> dataSiteLevelPortlets = LayoutExporter.getDataSiteLevelPortlets(company.getCompanyId());
+						%>
+
+						<c:if test="<%= !dataSiteLevelPortlets.isEmpty() %>">
+							<aui:fieldset cssClass="options-group" label="content">
+								<%@ include file="/html/portlet/layouts_admin/publish_layouts_portlets_data.jspf" %>
+							</aui:fieldset>
+						</c:if>
+
+						<c:if test="<%= !selGroup.isCompany() %>">
+							<aui:fieldset cssClass="options-group" label="permissions">
+								<%@ include file="/html/portlet/layouts_admin/publish_layouts_permissions.jspf" %>
+							</aui:fieldset>
+						</c:if>
+
+						<c:if test="<%= !localPublishing %>">
+							<aui:fieldset cssClass="options-group" label="remote-live-connection-settings">
+								<%@ include file="/html/portlet/layouts_admin/publish_layouts_remote_options.jspf" %>
+							</aui:fieldset>
+						</c:if>
+					</div>
+
+					<aui:button-row>
+						<aui:button id="addButton" name="addButton" onClick='<%= renderResponse.getNamespace() + "schedulePublishEvent();" %>' value="add-event" />
+
+						<aui:button id="publishButton" name="publishButton" type="submit" value="<%= publishActionKey %>" />
+					</aui:button-row>
+				</div>
+			</aui:form>
+		</liferay-ui:section>
+	</c:if>
+
+	<liferay-ui:section>
+		<div class="process-list" id="<portlet:namespace />publishProcesses">
+			<liferay-util:include page="/html/portlet/layouts_admin/publish_layouts_processes.jsp">
+				<liferay-util:param name="groupId" value="<%= String.valueOf(stagingGroupId) %>" />
+				<liferay-util:param name="liveGroupId" value="<%= String.valueOf(liveGroupId) %>" />
+				<liferay-util:param name="closeRedirect" value="<%= closeRedirect %>" />
+				<liferay-util:param name="localPublishing" value="<%= String.valueOf(localPublishing) %>" />
+			</liferay-util:include>
+		</div>
+	</liferay-ui:section>
+
+	<c:if test='<%= !cmd.equals("view_processes") %>'>
+		<liferay-ui:section>
+
+			<%
+			long targetGroupId = liveGroupId;
+
+			if (cmd.equals("copy_from_live")) {
+				targetGroupId = stagingGroupId;
+			}
+			%>
+
+			<liferay-util:include page="/html/portlet/layouts_admin/scheduled_publishing_events.jsp">
+				<liferay-util:param name="groupId" value="<%= String.valueOf(targetGroupId) %>" />
+				<liferay-util:param name="privateLayout" value="<%= String.valueOf(privateLayout) %>" />
+				<liferay-util:param name="destinationName" value="<%= localPublishing ? DestinationNames.LAYOUTS_LOCAL_PUBLISHER : DestinationNames.LAYOUTS_REMOTE_PUBLISHER %>" />
+			</liferay-util:include>
+		</liferay-ui:section>
+	</c:if>
+
+</liferay-ui:tabs>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />publishPages',
+		function() {
+			if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-" + publishActionKey + "-these-pages") %>')) {
+				submitForm(document.<portlet:namespace />exportPagesFm);
+			}
+		}
+	);
+
+	Liferay.Util.toggleRadio('<portlet:namespace />allApplications', '<portlet:namespace />showChangeGlobalConfiguration', ['<portlet:namespace />selectApplications']);
+	Liferay.Util.toggleRadio('<portlet:namespace />allContent', '<portlet:namespace />showChangeGlobalContent', ['<portlet:namespace />selectContents']);
+	Liferay.Util.toggleRadio('<portlet:namespace />chooseApplications', '<portlet:namespace />selectApplications', ['<portlet:namespace />showChangeGlobalConfiguration']);
+	Liferay.Util.toggleRadio('<portlet:namespace />chooseContent', '<portlet:namespace />selectContents', ['<portlet:namespace />showChangeGlobalContent']);
+	Liferay.Util.toggleRadio('<portlet:namespace />publishingEventNow', '<portlet:namespace />publishButton', ['<portlet:namespace />selectSchedule', '<portlet:namespace />addButton']);
+	Liferay.Util.toggleRadio('<portlet:namespace />publishingEventSchedule', ['<portlet:namespace />selectSchedule', '<portlet:namespace />addButton'], '<portlet:namespace />publishButton');
+	Liferay.Util.toggleRadio('<portlet:namespace />rangeAll', '', ['<portlet:namespace />startEndDate', '<portlet:namespace />rangeLastInputs']);
+	Liferay.Util.toggleRadio('<portlet:namespace />rangeDateRange', '<portlet:namespace />startEndDate', '<portlet:namespace />rangeLastInputs');
+	Liferay.Util.toggleRadio('<portlet:namespace />rangeLastPublish', '', ['<portlet:namespace />startEndDate', '<portlet:namespace />rangeLastInputs']);
+	Liferay.Util.toggleRadio('<portlet:namespace />rangeLast', '<portlet:namespace />rangeLastInputs', ['<portlet:namespace />startEndDate']);
+</aui:script>
+
+<aui:script use="liferay-export-import">
+	<liferay-portlet:resourceURL copyCurrentRenderParameters="<%= false %>" var="publishProcessesURL">
+		<portlet:param name="struts_action" value="/layouts_admin/publish_layouts" />
+		<portlet:param name="<%= SearchContainer.DEFAULT_CUR_PARAM %>" value="<%= ParamUtil.getString(request, SearchContainer.DEFAULT_CUR_PARAM) %>" />
+		<portlet:param name="<%= SearchContainer.DEFAULT_DELTA_PARAM %>" value="<%= ParamUtil.getString(request, SearchContainer.DEFAULT_DELTA_PARAM) %>" />
+		<portlet:param name="closeRedirect" value="<%= closeRedirect %>" />
+		<portlet:param name="groupId" value="<%= String.valueOf(stagingGroupId) %>" />
+		<portlet:param name="liveGroupId" value="<%= String.valueOf(liveGroupId) %>" />
+		<portlet:param name="localPublishing" value="<%= String.valueOf(localPublishing) %>" />
+	</liferay-portlet:resourceURL>
+
+	new Liferay.ExportImport(
+		{
+			commentsNode: '#<%= PortletDataHandlerKeys.COMMENTS %>Checkbox',
+			deleteMissingLayoutsNode: '#<%= PortletDataHandlerKeys.DELETE_MISSING_LAYOUTS %>Checkbox',
+			deletePortletDataNode: '#<%= PortletDataHandlerKeys.DELETE_PORTLET_DATA %>Checkbox',
+			deletionsNode: '#<%= PortletDataHandlerKeys.DELETIONS %>Checkbox',
+			form: document.<portlet:namespace />exportPagesFm,
+			incompleteProcessMessageNode: '#<portlet:namespace />incompleteProcessMessage',
+			layoutSetSettingsNode: '#<%= PortletDataHandlerKeys.LAYOUT_SET_SETTINGS %>Checkbox',
+			logoNode: '#<%= PortletDataHandlerKeys.LOGO %>Checkbox',
+			namespace: '<portlet:namespace />',
+			pageTreeId: '<%= treeId %>',
+			processesNode: '#publishProcesses',
+			processesResourceURL: '<%= publishProcessesURL.toString() %>',
+			rangeAllNode: '#rangeAll',
+			rangeDateRangeNode: '#rangeDateRange',
+			rangeLastNode: '#rangeLast',
+			rangeLastPublishNode: '#rangeLastPublish',
+			ratingsNode: '#<%= PortletDataHandlerKeys.RATINGS %>Checkbox',
+			remoteAddressNode: '#<portlet:namespace />remoteAddress',
+			remoteDeletePortletDataNode: '#remoteDeletePortletDataCheckbox',
+			remotePortNode: '#<portlet:namespace />remotePort',
+			remotePathContextNode: '#<portlet:namespace />remotePathContext',
+			remoteGroupIdNode: '#<portlet:namespace />remoteGroupId',
+			secureConnectionNode: '#secureConnectionCheckbox',
+			setupNode: '#<%= PortletDataHandlerKeys.PORTLET_SETUP_ALL %>Checkbox',
+			themeReferenceNode: '#<%= PortletDataHandlerKeys.THEME_REFERENCE %>Checkbox',
+			userPreferencesNode: '#<%= PortletDataHandlerKeys.PORTLET_USER_PREFERENCES_ALL %>Checkbox'
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_layouts_permissions.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_layouts_permissions.jspf
new file mode 100644
index 0000000..11df518
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_layouts_permissions.jspf
@@ -0,0 +1,31 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<ul class="lfr-tree unstyled">
+	<li class="tree-item">
+		<aui:input helpMessage="export-import-permissions-help" label="permissions" name="<%= PortletDataHandlerKeys.PERMISSIONS %>" type="checkbox" />
+
+		<ul id="<portlet:namespace />permissionsUl">
+			<li class="tree-item">
+				<aui:input name="permissionsAssignedToRoles" type="checkbox" value="<%= true %>" />
+			</li>
+		</ul>
+	</li>
+</ul>
+
+<aui:script>
+	Liferay.Util.toggleBoxes('<portlet:namespace /><%= PortletDataHandlerKeys.PERMISSIONS %>Checkbox', '<portlet:namespace />permissionsUl');
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_layouts_portlets_data.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_layouts_portlets_data.jspf
new file mode 100644
index 0000000..88eb42c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_layouts_portlets_data.jspf
@@ -0,0 +1,363 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+DateRange dateRange = ExportImportHelperUtil.getDateRange(renderRequest, stagingGroupId, privateLayout, 0, null, "fromLastPublishDate");
+
+Date startDate = dateRange.getStartDate();
+Date endDate = dateRange.getEndDate();
+
+PortletDataContext portletDataContext = PortletDataContextFactoryUtil.createPreparePortletDataContext(themeDisplay, startDate, endDate);
+
+ManifestSummary manifestSummary = portletDataContext.getManifestSummary();
+%>
+
+<ul class="lfr-tree unstyled">
+	<li class="tree-item">
+		<aui:input name="<%= PortletDataHandlerKeys.PORTLET_DATA_CONTROL_DEFAULT %>" type="hidden" value="false" />
+
+		<aui:input checked="<%= true %>" helpMessage="all-content-publish-help" id="allContent" label="all-content" name="<%= PortletDataHandlerKeys.PORTLET_DATA_ALL %>" type="radio" value="<%= true %>" />
+
+		<c:if test="<%= selGroup.isStagingGroup() && localPublishing %>">
+			<div class="hide" id="<portlet:namespace />globalContent">
+				<aui:fieldset cssClass="portlet-data-section" label="all-content">
+					<aui:input label="delete-portlet-data-before-importing" name="<%= PortletDataHandlerKeys.DELETE_PORTLET_DATA %>" type="checkbox" />
+
+					<ul class="unstyled" id="<portlet:namespace />showDeleteContentWarning">
+						<li>
+							<div class="alert alert-block">
+								<liferay-ui:message key="delete-content-before-importing-warning" />
+
+								<liferay-ui:message key="delete-content-before-importing-suggestion" />
+							</div>
+						</li>
+					</ul>
+
+					<aui:script>
+						Liferay.Util.toggleBoxes('<portlet:namespace /><%= PortletDataHandlerKeys.DELETE_PORTLET_DATA %>Checkbox', '<portlet:namespace />showDeleteContentWarning');
+					</aui:script>
+				</aui:fieldset>
+			</div>
+
+			<ul class="hide" id="<portlet:namespace />showChangeGlobalContent">
+				<li>
+					<span class="selected-labels" id="<portlet:namespace />selectedGlobalContent"></span>
+
+					<aui:a cssClass="modify-link" href="javascript:;" id="globalContentLink" label="change" method="get" />
+				</li>
+			</ul>
+		</c:if>
+
+		<aui:input helpMessage="choose-content-publish-help" id="chooseContent" label="choose-content" name="<%= PortletDataHandlerKeys.PORTLET_DATA_ALL %>" type="radio" value="<%= false %>" />
+
+		<ul class="hide select-options" id="<portlet:namespace />selectContents">
+			<aui:input name="<%= PortletDataHandlerKeys.PORTLET_DATA_CONTROL_DEFAULT %>" type="hidden" value="<%= false %>" />
+
+			<aui:input name="<%= PortletDataHandlerKeys.PORTLET_DATA %>" type="hidden" value="<%= true %>" />
+
+			<li>
+				<div class="hide" id="<portlet:namespace />range">
+					<ul class="lfr-tree unstyled">
+						<li class="tree-item">
+							<aui:fieldset cssClass="portlet-data-section" label="date-range">
+								<aui:input id="rangeAll" label="all" name="range" type="radio" value="all" />
+
+								<aui:input checked="<%= true %>"  id="rangeLastPublish" label="from-last-publish-date" name="range" type="radio" value="fromLastPublishDate" />
+
+								<aui:input helpMessage="export-date-range-help" id="rangeDateRange" label="date-range" name="range" type="radio" value="dateRange" />
+
+								<%
+								Calendar endCalendar = CalendarFactoryUtil.getCalendar(timeZone, locale);
+
+								if (endDate != null) {
+									endCalendar.setTime(endDate);
+								}
+
+								Calendar startCalendar = CalendarFactoryUtil.getCalendar(timeZone, locale);
+
+								if (startDate != null) {
+									startCalendar.setTime(startDate);
+								}
+								else {
+									startCalendar.add(Calendar.DATE, -1);
+								}
+								%>
+
+								<ul class="date-range-options hide unstyled" id="<portlet:namespace />startEndDate">
+									<li>
+										<aui:fieldset label="start-date">
+											<liferay-ui:input-date
+												dayParam="startDateDay"
+												dayValue="<%= startCalendar.get(Calendar.DATE) %>"
+												disabled="<%= false %>"
+												firstDayOfWeek="<%= startCalendar.getFirstDayOfWeek() - 1 %>"
+												monthParam="startDateMonth"
+												monthValue="<%= startCalendar.get(Calendar.MONTH) %>"
+												name="startDate"
+												yearParam="startDateYear"
+												yearValue="<%= startCalendar.get(Calendar.YEAR) %>"
+											/>
+
+											&nbsp;
+
+											<liferay-ui:input-time
+												amPmParam='<%= "startDateAmPm" %>'
+												amPmValue="<%= startCalendar.get(Calendar.AM_PM) %>"
+												dateParam="startDateTime"
+												dateValue="<%= startCalendar.getTime() %>"
+												disabled="<%= false %>"
+												hourParam='<%= "startDateHour" %>'
+												hourValue="<%= startCalendar.get(Calendar.HOUR) %>"
+												minuteParam='<%= "startDateMinute" %>'
+												minuteValue="<%= startCalendar.get(Calendar.MINUTE) %>"
+												name="startTime"
+											/>
+										</aui:fieldset>
+									</li>
+
+									<li>
+										<aui:fieldset label="end-date">
+											<liferay-ui:input-date
+												dayParam="endDateDay"
+												dayValue="<%= endCalendar.get(Calendar.DATE) %>"
+												disabled="<%= false %>"
+												firstDayOfWeek="<%= endCalendar.getFirstDayOfWeek() - 1 %>"
+												monthParam="endDateMonth"
+												monthValue="<%= endCalendar.get(Calendar.MONTH) %>"
+												name="endDate"
+												yearParam="endDateYear"
+												yearValue="<%= endCalendar.get(Calendar.YEAR) %>"
+											/>
+
+											&nbsp;
+
+											<liferay-ui:input-time
+												amPmParam='<%= "endDateAmPm" %>'
+												amPmValue="<%= endCalendar.get(Calendar.AM_PM) %>"
+												dateParam="startDateTime"
+												dateValue="<%= endCalendar.getTime() %>"
+												disabled="<%= false %>"
+												hourParam='<%= "endDateHour" %>'
+												hourValue="<%= endCalendar.get(Calendar.HOUR) %>"
+												minuteParam='<%= "endDateMinute" %>'
+												minuteValue="<%= endCalendar.get(Calendar.MINUTE) %>"
+												name="endTime"
+											/>
+										</aui:fieldset>
+									</li>
+								</ul>
+
+								<aui:input id="rangeLast" label='<%= LanguageUtil.get(pageContext, "last") + StringPool.TRIPLE_PERIOD %>' name="range" type="radio" value="last" />
+
+								<ul class="hide unstyled" id="<portlet:namespace />rangeLastInputs">
+									<li>
+										<aui:select cssClass="relative-range" label="" name="last">
+											<aui:option label='<%= LanguageUtil.format(pageContext, "x-hours", "12") %>' value="12" />
+											<aui:option label='<%= LanguageUtil.format(pageContext, "x-hours", "24") %>' value="24" />
+											<aui:option label='<%= LanguageUtil.format(pageContext, "x-hours", "48") %>' value="48" />
+											<aui:option label='<%= LanguageUtil.format(pageContext, "x-days", "7") %>' value="168" />
+										</aui:select>
+									</li>
+								</ul>
+							</aui:fieldset>
+						</li>
+					</ul>
+				</div>
+
+				<liferay-util:buffer var="selectedLabelsHTML">
+					<span class="selected-labels" id="<portlet:namespace />selectedRange"></span>
+
+					<aui:a cssClass="modify-link" href="javascript:;" id="rangeLink" label="change" method="get" />
+				</liferay-util:buffer>
+
+				<liferay-ui:icon
+					image="calendar"
+					label="<%= true %>"
+					message='<%= LanguageUtil.get(locale, "date-range") + selectedLabelsHTML %>'
+				/>
+			</li>
+
+			<li class="options">
+				<ul class="portlet-list">
+					<li class="tree-item">
+						<aui:input helpMessage="export-import-categories-help" label="categories" name="<%= PortletDataHandlerKeys.CATEGORIES %>" type="checkbox" value="<%= true %>" />
+					</li>
+
+					<%
+					Set<String> displayedControls = new HashSet<String>();
+					Set<String> portletDataHandlerClasses = new HashSet<String>();
+
+					dataSiteLevelPortlets = ListUtil.sort(dataSiteLevelPortlets, new PortletTitleComparator(application, locale));
+
+					for (Portlet portlet : dataSiteLevelPortlets) {
+						String portletDataHandlerClass = portlet.getPortletDataHandlerClass();
+
+						if (!portletDataHandlerClasses.contains(portletDataHandlerClass)) {
+							portletDataHandlerClasses.add(portletDataHandlerClass);
+						}
+						else {
+							continue;
+						}
+
+						String portletTitle = PortalUtil.getPortletTitle(portlet, application, locale);
+
+						PortletDataHandler portletDataHandler = portlet.getPortletDataHandlerInstance();
+
+						portletDataHandler.prepareManifestSummary(portletDataContext);
+
+						long exportModelCount = portletDataHandler.getExportModelCount(manifestSummary);
+
+						long modelDeletionCount = manifestSummary.getModelDeletionCount(portletDataHandler.getDeletionSystemEventStagedModelTypes());
+					%>
+
+						<c:if test="<%= GetterUtil.getBoolean(liveGroupTypeSettings.getProperty(StagingUtil.getStagedPortletId(portlet.getRootPortletId())), portletDataHandler.isPublishToLiveByDefault()) && ((exportModelCount != 0) || (modelDeletionCount !=0)) %>">
+							<li class="tree-item">
+								<liferay-util:buffer var="badgeHTML">
+									<span class="badge badge-info"><%= exportModelCount > 0 ? exportModelCount : StringPool.BLANK %></span>
+									<span class="badge badge-warning deletions"><%= modelDeletionCount > 0 ? (modelDeletionCount + StringPool.SPACE + LanguageUtil.get(pageContext, "deletions")) : StringPool.BLANK %></span>
+								</liferay-util:buffer>
+
+								<aui:input label="<%= portletTitle + badgeHTML %>" name="<%= PortletDataHandlerKeys.PORTLET_DATA + StringPool.UNDERLINE + portlet.getRootPortletId() %>" type="checkbox" value="<%= true %>" />
+
+								<%
+								PortletDataHandlerControl[] exportControls = portletDataHandler.getExportControls();
+								PortletDataHandlerControl[] metadataControls = portletDataHandler.getExportMetadataControls();
+
+								if (ArrayUtil.isNotEmpty(exportControls) || ArrayUtil.isNotEmpty(metadataControls)) {
+								%>
+
+									<div class="hide" id="<portlet:namespace />content_<%= portlet.getRootPortletId() %>">
+										<ul class="lfr-tree unstyled">
+											<li class="tree-item">
+												<aui:fieldset cssClass="portlet-type-data-section" label="<%= portletTitle %>">
+
+													<%
+													if (exportControls != null) {
+														if (liveGroup.isStagedPortlet(portlet.getRootPortletId())) {
+															request.setAttribute("render_controls.jsp-action", Constants.PUBLISH);
+															request.setAttribute("render_controls.jsp-controls", exportControls);
+															request.setAttribute("render_controls.jsp-manifestSummary", manifestSummary);
+															request.setAttribute("render_controls.jsp-portletDisabled", !portletDataHandler.isPublishToLiveByDefault());
+														%>
+
+															<aui:field-wrapper label='<%= ArrayUtil.isNotEmpty(metadataControls) ? "content" : StringPool.BLANK %>'>
+																<ul class="lfr-tree unstyled">
+																	<liferay-util:include page="/html/portlet/layouts_admin/render_controls.jsp" />
+																</ul>
+															</aui:field-wrapper>
+
+														<%
+														}
+													}
+
+													if (metadataControls != null) {
+														for (PortletDataHandlerControl metadataControl : metadataControls) {
+															if (!displayedControls.contains(metadataControl.getControlName())) {
+																displayedControls.add(metadataControl.getControlName());
+															}
+															else {
+																continue;
+															}
+
+															PortletDataHandlerBoolean control = (PortletDataHandlerBoolean)metadataControl;
+
+															PortletDataHandlerControl[] childrenControls = control.getChildren();
+
+															if (ArrayUtil.isNotEmpty(childrenControls)) {
+																request.setAttribute("render_controls.jsp-controls", childrenControls);
+															%>
+
+															<aui:field-wrapper label="content-metadata">
+																<ul class="lfr-tree unstyled">
+																	<liferay-util:include page="/html/portlet/layouts_admin/render_controls.jsp" />
+																</ul>
+															</aui:field-wrapper>
+
+															<%
+															}
+														}
+													}
+													%>
+
+												</aui:fieldset>
+											</li>
+										</ul>
+									</div>
+
+									<ul class="hide" id="<portlet:namespace />showChangeContent_<%= portlet.getRootPortletId() %>">
+										<li>
+											<span class="selected-labels" id="<portlet:namespace />selectedContent_<%= portlet.getRootPortletId() %>"></span>
+
+											<%
+											Map<String,Object> data = new HashMap<String,Object>();
+
+											data.put("portletid", portlet.getRootPortletId());
+											data.put("portlettitle", portletTitle);
+											%>
+
+											<aui:a cssClass="content-link modify-link" data="<%= data %>" href="javascript:;" id='<%= "contentLink_" + portlet.getRootPortletId() %>' label="change" method="get" />
+										</li>
+									</ul>
+
+									<aui:script>
+										Liferay.Util.toggleBoxes('<portlet:namespace /><%= PortletDataHandlerKeys.PORTLET_DATA + StringPool.UNDERLINE + portlet.getRootPortletId() %>Checkbox', '<portlet:namespace />showChangeContent<%= StringPool.UNDERLINE + portlet.getRootPortletId() %>');
+									</aui:script>
+
+								<%
+								}
+								%>
+
+							</li>
+						</c:if>
+
+					<%
+					}
+					%>
+
+				</ul>
+
+				<aui:fieldset cssClass="content-options" label="for-each-of-the-selected-content-types,-publish-their">
+					<span class="selected-labels" id="<portlet:namespace />selectedContentOptions"></span>
+
+					<aui:a cssClass="modify-link" href="javascript:;" id="contentOptionsLink" label="change" method="get" />
+
+					<div class="hide" id="<portlet:namespace />contentOptions">
+						<ul class="lfr-tree unstyled">
+							<li class="tree-item">
+								<aui:input label="comments" name="<%= PortletDataHandlerKeys.COMMENTS %>" type="checkbox" value="<%= true %>" />
+
+								<aui:input label="ratings" name="<%= PortletDataHandlerKeys.RATINGS %>" type="checkbox" value="<%= true %>" />
+
+								<%
+								long modelDeletionCount = manifestSummary.getModelDeletionCount();
+								%>
+
+								<c:if test="<%= modelDeletionCount != 0 %>">
+
+									<%
+									String deletionsLabel = LanguageUtil.get(pageContext, "deletions") + (modelDeletionCount > 0 ? " (" + modelDeletionCount + ")" : StringPool.BLANK);
+									%>
+
+									<aui:input data-name="<%= deletionsLabel %>" helpMessage="deletions-help" label="<%= deletionsLabel %>" name="<%= PortletDataHandlerKeys.DELETIONS %>" type="checkbox" value="<%= true %>" />
+								</c:if>
+							</li>
+						</ul>
+					</div>
+				</aui:fieldset>
+			</li>
+		</ul>
+	</li>
+</ul>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_layouts_portlets_setup.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_layouts_portlets_setup.jspf
new file mode 100644
index 0000000..b1ed23f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_layouts_portlets_setup.jspf
@@ -0,0 +1,114 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<ul class="lfr-tree unstyled">
+	<li class="tree-item">
+		<aui:input checked="<%= true %>" helpMessage="all-applications-publish-help" id="allApplications" label="all-applications" name="<%= PortletDataHandlerKeys.PORTLET_CONFIGURATION_ALL %>" type="radio" value="<%= true %>" />
+
+		<div class="hide" id="<portlet:namespace />globalConfiguration">
+			<aui:fieldset cssClass="portlet-data-section" label="all-applications">
+				<aui:input label="setup" name="<%= PortletDataHandlerKeys.PORTLET_SETUP_ALL %>" type="checkbox" value="<%= true %>" />
+
+				<aui:input helpMessage="import-user-preferences-help" label="user-preferences" name="<%= PortletDataHandlerKeys.PORTLET_USER_PREFERENCES_ALL %>" type="checkbox" value="<%= true %>" />
+			</aui:fieldset>
+		</div>
+
+		<ul class="hide" id="<portlet:namespace />showChangeGlobalConfiguration">
+			<li class="tree-item">
+				<span class="selected-labels" id="<portlet:namespace />selectedGlobalConfiguration"></span>
+
+				<aui:a cssClass="modify-link" href="javascript:;" id="globalConfigurationLink" label="change" method="get" />
+			</li>
+		</ul>
+
+		<aui:input helpMessage="choose-applications-publish-help" id="chooseApplications" label="choose-applications" name="<%= PortletDataHandlerKeys.PORTLET_CONFIGURATION_ALL %>" type="radio" value="<%= false %>" />
+
+		<ul class="hide options portlet-list select-options" id="<portlet:namespace />selectApplications">
+			<aui:input name="<%= PortletDataHandlerKeys.PORTLET_CONFIGURATION %>" type="hidden" value="<%= true %>" />
+
+			<%
+			portletDataHandlerPortlets = ListUtil.sort(portletDataHandlerPortlets, new PortletTitleComparator(application, locale));
+
+			for (Portlet portlet : portletDataHandlerPortlets) {
+				PortletDataHandler portletDataHandler = portlet.getPortletDataHandlerInstance();
+
+				PortletDataHandlerControl[] configurationControls = portletDataHandler.getExportConfigurationControls(company.getCompanyId(), stagingGroupId, portlet, privateLayout);
+
+				try {
+					String portletTitle = PortalUtil.getPortletTitle(portlet, application, locale);
+			%>
+
+					<li class="tree-item">
+						<aui:input label="<%= portletTitle %>" name="<%= PortletDataHandlerKeys.PORTLET_CONFIGURATION + StringPool.UNDERLINE + portlet.getRootPortletId() %>" type="checkbox" value="<%= true %>" />
+
+						<div class="hide" id="<portlet:namespace />configuration_<%= portlet.getRootPortletId() %>">
+							<ul class="lfr-tree unstyled">
+								<li class="tree-item">
+									<aui:fieldset cssClass="portlet-type-data-section" label="<%= portletTitle %>">
+										<ul class="lfr-tree unstyled">
+
+											<%
+											request.setAttribute("render_controls.jsp-action", Constants.PUBLISH);
+											request.setAttribute("render_controls.jsp-controls", configurationControls);
+											request.setAttribute("render_controls.jsp-portletId", portlet.getRootPortletId());
+											%>
+
+											<liferay-util:include page="/html/portlet/layouts_admin/render_controls.jsp" />
+										</ul>
+									</aui:fieldset>
+								</li>
+							</ul>
+						</div>
+
+						<ul class="hide" id="<portlet:namespace />showChangeConfiguration_<%= portlet.getRootPortletId() %>">
+							<li>
+								<span class="selected-labels" id="<portlet:namespace />selectedConfiguration_<%= portlet.getRootPortletId() %>"></span>
+
+								<%
+								Map<String,Object> data = new HashMap<String,Object>();
+
+								data.put("portletid", portlet.getRootPortletId());
+								data.put("portlettitle", portletTitle);
+								%>
+
+								<aui:a cssClass="configuration-link modify-link" data="<%= data %>" href="javascript:;" label="change" method="get" />
+							</li>
+						</ul>
+
+						<aui:script>
+							Liferay.Util.toggleBoxes('<portlet:namespace /><%= PortletDataHandlerKeys.PORTLET_CONFIGURATION + StringPool.UNDERLINE + portlet.getRootPortletId() %>Checkbox', '<portlet:namespace />showChangeConfiguration<%= StringPool.UNDERLINE + portlet.getRootPortletId() %>');
+						</aui:script>
+					</li>
+
+			<%
+				}
+				catch (PortletDataException pde) {
+			%>
+
+					<li class="tree-item">
+						<div class="alert alert-error">
+							<%= PortalUtil.getPortletTitle(portlet, application, locale) %>: <%= LanguageUtil.get(pageContext, "error-initializing-import-controls") %>
+						</div>
+					</li>
+
+			<%
+				}
+			}
+			%>
+
+		</ul>
+	</li>
+</ul>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_layouts_processes.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_layouts_processes.jsp
new file mode 100644
index 0000000..45bfd1a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_layouts_processes.jsp
@@ -0,0 +1,163 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+String closeRedirect = ParamUtil.getString(request, "closeRedirect");
+
+long groupId = ParamUtil.getLong(request, "groupId");
+long liveGroupId = ParamUtil.getLong(request, "liveGroupId");
+boolean localPublishing = ParamUtil.getBoolean(request, "localPublishing");
+
+PortletURL renderURL = liferayPortletResponse.createRenderURL();
+
+renderURL.setParameter("struts_action", "/layouts_admin/publish_layouts");
+renderURL.setParameter("tabs2", "current-and-previous");
+renderURL.setParameter("closeRedirect", closeRedirect);
+renderURL.setParameter("groupId", String.valueOf(groupId));
+renderURL.setParameter("localPublishing", String.valueOf(localPublishing));
+
+String orderByCol = ParamUtil.getString(request, "orderByCol");
+String orderByType = ParamUtil.getString(request, "orderByType");
+
+if (Validator.isNotNull(orderByCol) && Validator.isNotNull(orderByType)) {
+	portalPreferences.setValue(PortletKeys.BACKGROUND_TASK, "entries-order-by-col", orderByCol);
+	portalPreferences.setValue(PortletKeys.BACKGROUND_TASK, "entries-order-by-type", orderByType);
+}
+else {
+	orderByCol = portalPreferences.getValue(PortletKeys.BACKGROUND_TASK, "entries-order-by-col", "create-date");
+	orderByType = portalPreferences.getValue(PortletKeys.BACKGROUND_TASK, "entries-order-by-type", "desc");
+}
+
+OrderByComparator orderByComparator = BackgroundTaskComparatorFactoryUtil.getBackgroundTaskOrderByComparator(orderByCol, orderByType);
+
+String taskExecutorClassName = localPublishing ? LayoutStagingBackgroundTaskExecutor.class.getName() : LayoutRemoteStagingBackgroundTaskExecutor.class.getName();
+%>
+
+<liferay-ui:search-container
+	emptyResultsMessage="no-publication-processes-were-found"
+	iteratorURL="<%= renderURL %>"
+	orderByCol="<%= orderByCol %>"
+	orderByComparator="<%= orderByComparator %>"
+	orderByType="<%= orderByType %>"
+>
+	<liferay-ui:search-container-results>
+
+		<%
+		List<BackgroundTask> backgroundTasks = BackgroundTaskLocalServiceUtil.getBackgroundTasks(groupId, taskExecutorClassName, QueryUtil.ALL_POS, QueryUtil.ALL_POS, orderByComparator);
+
+		results.addAll(backgroundTasks);
+
+		if (localPublishing) {
+			results.addAll(BackgroundTaskLocalServiceUtil.getBackgroundTasks(liveGroupId, taskExecutorClassName, QueryUtil.ALL_POS, QueryUtil.ALL_POS, orderByComparator));
+		}
+
+		searchContainer.setTotal(results.size());
+
+		results = ListUtil.subList(results, searchContainer.getStart(), searchContainer.getEnd());
+
+		searchContainer.setResults(results);
+		%>
+
+	</liferay-ui:search-container-results>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.BackgroundTask"
+		keyProperty="backgroundTaskId"
+		modelVar="backgroundTask"
+	>
+		<liferay-ui:search-container-column-text
+			name="user-name"
+			value="<%= HtmlUtil.escape(backgroundTask.getUserName()) %>"
+		/>
+
+		<liferay-ui:search-container-column-jsp
+			cssClass="background-task-status-column"
+			name="status"
+			path="/html/portlet/layouts_admin/publish_process_message.jsp"
+		/>
+
+		<c:if test="<%= localPublishing %>">
+			<liferay-ui:search-container-column-text name="type">
+				<c:if test="<%= backgroundTask.getGroupId() == liveGroupId %>">
+					<strong class="label label-info">
+						<liferay-ui:message key="initial-publication" />
+					</strong>
+				</c:if>
+
+				<strong class="label label-default">
+					<c:choose>
+						<c:when test='<%= MapUtil.getBoolean(backgroundTask.getTaskContextMap(), "privateLayout") %>'>
+							<liferay-ui:message key="private-pages" />
+						</c:when>
+						<c:otherwise>
+							<liferay-ui:message key="public-pages" />
+						</c:otherwise>
+					</c:choose>
+				</strong>
+			</liferay-ui:search-container-column-text>
+		</c:if>
+
+		<liferay-ui:search-container-column-date
+			name="create-date"
+			orderable="<%= true %>"
+			value="<%= backgroundTask.getCreateDate() %>"
+		/>
+
+		<liferay-ui:search-container-column-date
+			name="completion-date"
+			orderable="<%= true %>"
+			value="<%= backgroundTask.getCompletionDate() %>"
+		/>
+
+		<liferay-ui:search-container-column-text>
+			<c:if test="<%= !backgroundTask.isInProgress() %>">
+				<portlet:actionURL var="deleteBackgroundTaskURL">
+					<portlet:param name="struts_action" value="/group_pages/delete_background_task" />
+					<portlet:param name="redirect" value="<%= renderURL.toString() %>" />
+					<portlet:param name="backgroundTaskId" value="<%= String.valueOf(backgroundTask.getBackgroundTaskId()) %>" />
+				</portlet:actionURL>
+
+				<%
+				Date completionDate = backgroundTask.getCompletionDate();
+				%>
+
+				<liferay-ui:icon-delete
+					label="true"
+					message='<%= ((completionDate != null) && completionDate.before(new Date())) ? "clear" : "cancel" %>'
+					url="<%= deleteBackgroundTaskURL %>"
+				/>
+			</c:if>
+		</liferay-ui:search-container-column-text>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
+
+<%
+int incompleteBackgroundTaskCount = BackgroundTaskLocalServiceUtil.getBackgroundTasksCount(groupId, taskExecutorClassName, false);
+
+if (localPublishing) {
+	incompleteBackgroundTaskCount += BackgroundTaskLocalServiceUtil.getBackgroundTasksCount(liveGroupId, taskExecutorClassName, false);
+}
+%>
+
+<div class="hide incomplete-process-message">
+	<liferay-util:include page="/html/portlet/layouts_admin/incomplete_processes_message.jsp">
+		<liferay-util:param name="incompleteBackgroundTaskCount" value="<%= String.valueOf(incompleteBackgroundTaskCount) %>" />
+	</liferay-util:include>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_layouts_remote_options.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_layouts_remote_options.jspf
new file mode 100644
index 0000000..2b3b371
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_layouts_remote_options.jspf
@@ -0,0 +1,43 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<span class="selected-labels" id="<portlet:namespace />selectedRemote"></span>
+
+<aui:a cssClass="modify-link" href="javascript:;" id="remoteLink" label="change" method="get" />
+
+<div class="hide" id="<portlet:namespace />remote">
+	<div class="alert alert-info">
+		<liferay-ui:message key="export-the-selected-data-to-the-site-of-a-remote-portal-or-to-another-site-in-the-same-portal" />
+	</div>
+
+	<aui:fieldset>
+		<aui:input label="remote-host-ip" name="remoteAddress" size="20" type="text" value='<%= liveGroupTypeSettings.getProperty("remoteAddress") %>' />
+
+		<aui:input label="remote-port" name="remotePort" size="10" type="text" value='<%= liveGroupTypeSettings.getProperty("remotePort") %>' />
+
+		<aui:input label="remote-path-context" name="remotePathContext" size="10" type="text" value='<%= liveGroupTypeSettings.getProperty("remotePathContext") %>' />
+
+		<aui:input label='<%= LanguageUtil.get(pageContext, "remote-site-id" ) %>' name="remoteGroupId" size="10" type="text" value='<%= liveGroupTypeSettings.getProperty("remoteGroupId") %>' />
+
+		<aui:input name="remotePrivateLayout" type="hidden" value="<%= privateLayout %>" />
+	</aui:fieldset>
+
+	<aui:fieldset>
+		<aui:input label="use-a-secure-network-connection" name="secureConnection" type="checkbox" value='<%= liveGroupTypeSettings.getProperty("secureConnection") %>' />
+
+		<aui:input helpMessage="delete-portlet-data-help" id="remoteDeletePortletData" label="delete-portlet-data-before-importing" name="<%= PortletDataHandlerKeys.DELETE_PORTLET_DATA %>" type="checkbox" />
+	</aui:fieldset>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_layouts_scheduler.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_layouts_scheduler.jspf
new file mode 100644
index 0000000..f610dee
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_layouts_scheduler.jspf
@@ -0,0 +1,68 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<ul class="lfr-tree unstyled">
+	<li class="tree-item">
+		<aui:input checked="<%= true %>" id="publishingEventNow" label="now" name="schedule" type="radio" value="<%= false %>" />
+
+		<aui:input id="publishingEventSchedule" label="schedule" name="schedule" type="radio" value="<%= true %>" />
+
+		<ul class="hide options portlet-list select-options" id="<portlet:namespace />selectSchedule">
+			<li>
+				<aui:input name="jobName" type="hidden" />
+
+				<aui:input label="title" name="description" type="text" />
+
+				<liferay-ui:input-scheduler />
+			</li>
+		</ul>
+	</li>
+</ul>
+
+<aui:script>
+	<portlet:renderURL var="scheduledEventsURL">
+		<portlet:param name="struts_action" value="/layouts_admin/publish_layouts" />
+		<portlet:param name="tabs2" value="scheduled" />
+		<portlet:param name="closeRedirect" value="<%= closeRedirect %>" />
+		<portlet:param name="groupId" value="<%= String.valueOf(stagingGroupId) %>" />
+		<portlet:param name="privateLayout" value="<%= String.valueOf(privateLayout) %>" />
+	</portlet:renderURL>
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />schedulePublishEvent',
+		function() {
+			document.<portlet:namespace />exportPagesFm.<portlet:namespace /><%= Constants.CMD %>.value = '<%= scheduleCMD %>';
+			document.<portlet:namespace />exportPagesFm.<portlet:namespace />redirect.value = '<%= scheduledEventsURL %>';
+
+			submitForm(document.<portlet:namespace />exportPagesFm);
+		}
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />unschedulePublishEvent',
+		function(jobName) {
+			if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-delete-the-scheduled-event") %>')) {
+				document.<portlet:namespace />exportPagesFm.<portlet:namespace /><%= Constants.CMD %>.value = '<%= unscheduleCMD %>';
+				document.<portlet:namespace />exportPagesFm.<portlet:namespace />redirect.value = '<%= scheduledEventsURL %>';
+				document.<portlet:namespace />exportPagesFm.<portlet:namespace />jobName.value = jobName;
+
+				submitForm(document.<portlet:namespace />exportPagesFm);
+			}
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_layouts_select_pages.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_layouts_select_pages.jspf
new file mode 100644
index 0000000..ea1d93e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_layouts_select_pages.jspf
@@ -0,0 +1,83 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<aui:input name="layoutIds" type="hidden" />
+
+<span class="selected-labels" id="<portlet:namespace />selectedPages"></span>
+
+<aui:a cssClass="modify-link" href="javascript:;" id="pagesLink" label="change" method="get" />
+
+<div class="hide" id="<portlet:namespace />pages">
+	<aui:fieldset cssClass="portlet-data-section" label="pages-to-publish">
+		<div class="alert alert-info">
+			<liferay-ui:message key="note-that-selecting-no-pages-from-tree-reverts-to-implicit-selection-of-all-pages" />
+		</div>
+
+		<div class="selected-pages" id="<portlet:namespace />pane">
+			<liferay-util:include page="/html/portlet/layouts_admin/tree_js.jsp">
+				<liferay-util:param name="tabs1" value='<%= (privateLayout) ? "private-pages" : "public-pages" %>' />
+				<liferay-util:param name="incomplete" value="<%= Boolean.FALSE.toString() %>" />
+				<liferay-util:param name="treeId" value="<%= treeId %>" />
+				<liferay-util:param name="selectableTree" value="1" />
+			</liferay-util:include>
+		</div>
+
+		<aui:input name="scope" type="hidden" value='<%= (selectedLayouts.isEmpty() ? "all-pages" : "selected-pages") %>' />
+
+		<c:choose>
+			<c:when test="<%= layoutSetBranchId > 0 %>">
+				<aui:input name="layoutSetBranchId" type="hidden" value="<%= layoutSetBranchId %>" />
+			</c:when>
+			<c:otherwise>
+				<c:if test="<%= LayoutStagingUtil.isBranchingLayoutSet(selGroup, privateLayout) %>">
+
+					<%
+					List<LayoutSetBranch> layoutSetBranches = LayoutSetBranchLocalServiceUtil.getLayoutSetBranches(stagingGroup.getGroupId(), privateLayout);
+					%>
+
+					<aui:select label="site-pages-variation" name="layoutSetBranchId">
+
+						<%
+						for (LayoutSetBranch layoutSetBranch : layoutSetBranches) {
+							boolean selected = false;
+
+							if (layoutSetBranch.isMaster()) {
+								selected = true;
+							}
+						%>
+
+							<aui:option label="<%= HtmlUtil.escape(layoutSetBranch.getName()) %>" selected="<%= selected %>" value="<%= layoutSetBranch.getLayoutSetBranchId() %>" />
+
+						<%
+						}
+						%>
+
+					</aui:select>
+				</c:if>
+			</c:otherwise>
+		</c:choose>
+
+		<aui:input helpMessage="delete-missing-layouts-staging-help" label="delete-missing-layouts" name="<%= PortletDataHandlerKeys.DELETE_MISSING_LAYOUTS %>" type="checkbox" />
+
+		<aui:input inlineLabel="right" label="site-pages-settings" name="<%= PortletDataHandlerKeys.LAYOUT_SET_SETTINGS %>" type="checkbox" value="<%= true %>" />
+	</aui:fieldset>
+
+	<aui:fieldset cssClass="portlet-data-section" label="look-and-feel">
+		<aui:input helpMessage="export-import-theme-settings-help" label="theme-settings" name="<%= PortletDataHandlerKeys.THEME_REFERENCE %>" type="checkbox" value="<%= true %>" />
+
+		<aui:input inlineLabel="right" label="logo" name="<%= PortletDataHandlerKeys.LOGO %>" type="checkbox" value="<%= true %>" />
+	</aui:fieldset>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_process_message.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_process_message.jsp
new file mode 100644
index 0000000..a094864
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_process_message.jsp
@@ -0,0 +1,98 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+BackgroundTask backgroundTask = (BackgroundTask)row.getObject();
+%>
+
+<strong class="label background-task-status-<%= BackgroundTaskConstants.getStatusLabel(backgroundTask.getStatus()) %> <%= BackgroundTaskConstants.getStatusCssClass(backgroundTask.getStatus()) %>">
+	<liferay-ui:message key="<%= backgroundTask.getStatusLabel() %>" />
+</strong>
+
+<c:if test="<%= backgroundTask.isInProgress() %>">
+
+	<%
+	BackgroundTaskStatus backgroundTaskStatus = BackgroundTaskStatusRegistryUtil.getBackgroundTaskStatus(backgroundTask.getBackgroundTaskId());
+	%>
+
+	<c:if test="<%= backgroundTaskStatus != null %>">
+
+		<%
+		double percentage = 100;
+
+		long allModelAdditionCountersTotal = GetterUtil.getLong(backgroundTaskStatus.getAttribute("allModelAdditionCountersTotal"));
+		long currentModelAdditionCountersTotal = GetterUtil.getLong(backgroundTaskStatus.getAttribute("currentModelAdditionCountersTotal"));
+
+		if (allModelAdditionCountersTotal > 0) {
+			percentage = Math.round((double)currentModelAdditionCountersTotal / allModelAdditionCountersTotal * 100);
+		}
+		%>
+
+		<div class="progress progress-striped active">
+			<div class="bar" style="width: <%= percentage %>%;">
+				<c:if test="<%= allModelAdditionCountersTotal > 0 %>">
+					<%= currentModelAdditionCountersTotal %> / <%= allModelAdditionCountersTotal %>
+				</c:if>
+			</div>
+		</div>
+
+		<%
+		String stagedModelName = (String)backgroundTaskStatus.getAttribute("stagedModelName");
+		String stagedModelType = (String)backgroundTaskStatus.getAttribute("stagedModelType");
+		%>
+
+		<c:if test="<%= Validator.isNotNull(stagedModelName) && Validator.isNotNull(stagedModelType) %>">
+
+			<%
+			String messageKey = "exporting";
+
+			Map<String, Serializable> taskContextMap = backgroundTask.getTaskContextMap();
+
+			String cmd = (String)taskContextMap.get(Constants.CMD);
+
+			if (Validator.equals(cmd, Constants.IMPORT)) {
+				messageKey = "importing";
+			}
+			else if (Validator.equals(cmd, Constants.PUBLISH)) {
+				messageKey = "publishing";
+			}
+			%>
+
+			<div class="progress-current-item">
+				<strong><liferay-ui:message key="<%= messageKey %>" /><%= StringPool.TRIPLE_PERIOD %></strong> <%= ResourceActionsUtil.getModelResource(locale, stagedModelType) %> <em><%= stagedModelName %></em>
+			</div>
+		</c:if>
+	</c:if>
+</c:if>
+
+<c:if test="<%= Validator.isNotNull(backgroundTask.getStatusMessage()) %>">
+
+	<%
+	long[] expandedBackgroundTaskIds = StringUtil.split(GetterUtil.getString(SessionClicks.get(request, "background-task-ids", null)), 0L);
+	%>
+
+	<a class="details-link toggler-header-<%= ArrayUtil.contains(expandedBackgroundTaskIds, backgroundTask.getBackgroundTaskId()) ? "expanded" : "collapsed" %>" data-persist-id="<%= backgroundTask.getBackgroundTaskId() %>" href="#"><liferay-ui:message key="details" /></a>
+
+	<div class="background-task-status-message toggler-content-<%= ArrayUtil.contains(expandedBackgroundTaskIds, backgroundTask.getBackgroundTaskId()) ? "expanded" : "collapsed" %>">
+		<liferay-util:include page="/html/portlet/layouts_admin/publish_process_message_task_details.jsp">
+			<liferay-util:param name="backgroundTaskId" value="<%= String.valueOf(backgroundTask.getBackgroundTaskId()) %>" />
+		</liferay-util:include>
+	</div>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_process_message_task_details.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_process_message_task_details.jsp
new file mode 100644
index 0000000..fbcf412
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/publish_process_message_task_details.jsp
@@ -0,0 +1,126 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+long backgroundTaskId = ParamUtil.getLong(request, "backgroundTaskId");
+
+BackgroundTask backgroundTask = BackgroundTaskLocalServiceUtil.fetchBackgroundTask(backgroundTaskId);
+
+JSONObject jsonObject = null;
+
+try {
+	jsonObject = JSONFactoryUtil.createJSONObject(backgroundTask.getStatusMessage());
+}
+catch (Exception e) {
+}
+%>
+
+<c:choose>
+	<c:when test="<%= jsonObject == null %>">
+		<div class="alert <%= backgroundTask.getStatus() == BackgroundTaskConstants.STATUS_FAILED ? "alert-error" : StringPool.BLANK %> publish-error">
+			<liferay-ui:message arguments="<%= backgroundTask.getStatusMessage() %>" key="unable-to-execute-process-x" />
+		</div>
+	</c:when>
+	<c:otherwise>
+		<div class="alert alert-error publish-error">
+			<h4 class="upload-error-message">
+
+				<%
+				boolean exported = MapUtil.getBoolean(backgroundTask.getTaskContextMap(), "exported");
+				boolean validated = MapUtil.getBoolean(backgroundTask.getTaskContextMap(), "validated");
+				%>
+
+				<c:choose>
+					<c:when test="<%= exported && !validated %>">
+						<liferay-ui:message key="the-publication-process-did-not-start-due-to-validation-errors" /></h4>
+					</c:when>
+					<c:otherwise>
+						<liferay-ui:message key="an-unexpected-error-occurred-with-the-publication-process.-please-check-your-portal-and-publishing-configuration" /></h4>
+					</c:otherwise>
+				</c:choose>
+
+			<span class="error-message"><%= jsonObject.getString("message") %></span>
+
+			<%
+			JSONArray messageListItemsJSONArray = jsonObject.getJSONArray("messageListItems");
+			%>
+
+			<c:if test="<%= (messageListItemsJSONArray != null) && (messageListItemsJSONArray.length() > 0) %>">
+				<ul class="error-list-items">
+
+					<%
+					for (int i = 0; i < messageListItemsJSONArray.length(); i++) {
+						JSONObject messageListItemJSONArray = messageListItemsJSONArray.getJSONObject(i);
+
+						String info = messageListItemJSONArray.getString("info");
+					%>
+
+						<li>
+							<%= messageListItemJSONArray.getString("type") %>:
+
+							<strong><%= messageListItemJSONArray.getString("name") %></strong>
+
+							<c:if test="<%= Validator.isNotNull(info) %>">
+								<span class="error-info">(<%= messageListItemJSONArray.getString("info") %>)</span>
+							</c:if>
+						</li>
+
+					<%
+					}
+					%>
+
+				</ul>
+			</c:if>
+		</div>
+
+		<%
+		JSONArray warningMessagesJSONArray = jsonObject.getJSONArray("warningMessages");
+		%>
+
+		<c:if test="<%= (warningMessagesJSONArray != null) && (warningMessagesJSONArray.length() > 0) %>">
+			<div class="alert upload-error">
+				<span class="error-message"><liferay-ui:message key='<%= ((messageListItemsJSONArray != null) && (messageListItemsJSONArray.length() > 0)) ? "consider-that-the-following-data-would-not-have-been-published-either" : "the-following-data-has-not-been-published" %>' /></span>
+
+				<ul class="error-list-items">
+
+					<%
+					for (int i = 0; i < warningMessagesJSONArray.length(); i++) {
+						JSONObject warningMessageJSONArray = warningMessagesJSONArray.getJSONObject(i);
+
+						String info = warningMessageJSONArray.getString("info");
+					%>
+
+						<li>
+							<%= warningMessageJSONArray.getString("type") %>:
+
+							<strong><%= warningMessageJSONArray.getString("size") %></strong>
+
+							<c:if test="<%= Validator.isNotNull(info) %>">
+								<span class="error-info">(<%= warningMessageJSONArray.getString("info") %>)</span>
+							</c:if>
+						</li>
+
+					<%
+					}
+					%>
+
+				</ul>
+			</div>
+		</c:if>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/render_controls.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/render_controls.jsp
new file mode 100644
index 0000000..a22c24c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/render_controls.jsp
@@ -0,0 +1,105 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+String action = (String)request.getAttribute("render_controls.jsp-action");
+PortletDataHandlerControl[] controls = (PortletDataHandlerControl[])request.getAttribute("render_controls.jsp-controls");
+ManifestSummary manifestSummary = (ManifestSummary)request.getAttribute("render_controls.jsp-manifestSummary");
+String portletId =(String)request.getAttribute("render_controls.jsp-portletId");
+
+for (int i = 0; i < controls.length; i++) {
+%>
+
+	<li class="handler-control">
+		<c:choose>
+			<c:when test="<%= controls[i] instanceof PortletDataHandlerBoolean %>">
+
+				<%
+				Map<String, Object> data = new HashMap<String, Object>();
+
+				PortletDataHandlerBoolean control = (PortletDataHandlerBoolean)controls[i];
+
+				String controlLabel = LanguageUtil.get(pageContext, control.getControlLabel());
+
+				String className = controls[i].getClassName();
+
+				if (Validator.isNotNull(className) && (manifestSummary != null)) {
+					long modelAdditionCount = manifestSummary.getModelAdditionCount(className, controls[i].getReferrerClassName());
+
+					if (modelAdditionCount != 0) {
+						controlLabel += modelAdditionCount > 0 ? " (" + modelAdditionCount + ")" : StringPool.BLANK;
+					}
+					else {
+						continue;
+					}
+				}
+
+				data.put("name", controlLabel);
+
+				PortletDataHandlerControl[] children = control.getChildren();
+				%>
+
+				<aui:input data="<%= data %>" disabled="<%= controls[i].isDisabled() %>" helpMessage="<%= control.getHelpMessage(locale, action) %>" label="<%= controlLabel %>" name="<%= Validator.isNotNull(control.getNamespace()) ? control.getNamespacedControlName() : control.getControlName() + StringPool.UNDERLINE + portletId %>" type="checkbox" value="<%= control.getDefaultState() %>" />
+
+				<c:if test="<%= children != null %>">
+					<ul class="unstyled" id="<portlet:namespace /><%= control.getNamespacedControlName() %>Controls">
+
+						<%
+						request.setAttribute("render_controls.jsp-controls", children);
+						%>
+
+						<liferay-util:include page="/html/portlet/layouts_admin/render_controls.jsp" />
+					</ul>
+
+					<aui:script>
+						Liferay.Util.toggleBoxes('<portlet:namespace /><%= control.getNamespacedControlName() %>Checkbox','<portlet:namespace /><%= control.getNamespacedControlName() %>Controls', false, true);
+					</aui:script>
+				</c:if>
+			</c:when>
+			<c:when test="<%= controls[i] instanceof PortletDataHandlerChoice %>">
+				<aui:field-wrapper label='<%= "&#9632" + LanguageUtil.get(pageContext, controls[i].getControlLabel()) %>'>
+
+					<%
+					PortletDataHandlerChoice control = (PortletDataHandlerChoice)controls[i];
+
+					String[] choices = control.getChoices();
+
+					for (int j = 0; j < choices.length; j++) {
+						String choice = choices[j];
+
+						Map<String, Object> data = new HashMap<String, Object>();
+
+						String controlName = LanguageUtil.get(pageContext, choice);
+
+						data.put("name", controlName);
+					%>
+
+						<aui:input checked="<%= control.getDefaultChoiceIndex() == j %>" data="<%= data %>" helpMessage="<%= control.getHelpMessage(locale, action) %>" label="<%= choice %>" name="<%= control.getNamespacedControlName() %>" type="radio" value="<%= choices[j] %>" />
+
+					<%
+					}
+					%>
+
+				</aui:field-wrapper>
+			</c:when>
+		</c:choose>
+	</li>
+
+<%
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/scheduled_publishing_events.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/scheduled_publishing_events.jsp
new file mode 100644
index 0000000..7af3711
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/scheduled_publishing_events.jsp
@@ -0,0 +1,79 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%
+long groupId = ParamUtil.getLong(request, "groupId");
+
+String destinationName = ParamUtil.getString(request, "destinationName");
+
+SearchContainer searchContainer = new SearchContainer();
+
+List<String> headerNames = new ArrayList<String>();
+
+headerNames.add("title");
+headerNames.add("start-date");
+headerNames.add("end-date");
+headerNames.add(StringPool.BLANK);
+
+searchContainer.setHeaderNames(headerNames);
+searchContainer.setEmptyResultsMessage("there-are-no-scheduled-publication-processes");
+
+List<SchedulerResponse> scheduledJobs = SchedulerEngineHelperUtil.getScheduledJobs(StagingUtil.getSchedulerGroupName(destinationName, groupId), StorageType.PERSISTED);
+
+List resultRows = searchContainer.getResultRows();
+
+for (int i = 0; i < scheduledJobs.size(); i++) {
+	SchedulerResponse schedulerResponse = scheduledJobs.get(i);
+
+	ResultRow row = new ResultRow(schedulerResponse, schedulerResponse.getJobName(), i);
+
+	// Title
+
+	row.addText(schedulerResponse.getDescription());
+
+	// Start date
+
+	row.addDate(SchedulerEngineHelperUtil.getStartTime(schedulerResponse));
+
+	// End date
+
+	Date endDate = SchedulerEngineHelperUtil.getEndTime(schedulerResponse);
+
+	if (endDate != null) {
+		row.addDate(endDate);
+	}
+	else {
+		row.addText(LanguageUtil.get(pageContext, "no-end-date"));
+	}
+
+	// Action
+
+	StringBundler sb = new StringBundler(4);
+
+	sb.append(portletDisplay.getNamespace());
+	sb.append("unschedulePublishEvent('");
+	sb.append(schedulerResponse.getJobName());
+	sb.append("');");
+
+	row.addButton("right", SearchEntry.DEFAULT_VALIGN, LanguageUtil.get(pageContext, "delete"), sb.toString());
+
+	resultRows.add(row);
+}
+%>
+
+<liferay-ui:search-iterator paginate="<%= false %>" searchContainer="<%= searchContainer %>" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/tree_js.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/tree_js.jsp
new file mode 100644
index 0000000..de1ed46
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/tree_js.jsp
@@ -0,0 +1,848 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%@ include file="/html/portlet/layouts_admin/init_attributes.jspf" %>
+
+<%
+boolean incomplete = ParamUtil.getBoolean(request, "incomplete", true);
+
+String treeLoading = PortalUtil.generateRandomKey(request, "treeLoading");
+
+String treeId = ParamUtil.getString(request, "treeId");
+boolean checkContentDisplayPage = ParamUtil.getBoolean(request, "checkContentDisplayPage", false);
+boolean defaultStateChecked = ParamUtil.getBoolean(request, "defaultStateChecked", false);
+boolean draggableTree = ParamUtil.getBoolean(request, "draggableTree", true);
+boolean expandFirstNode = ParamUtil.getBoolean(request, "expandFirstNode", true);
+boolean saveState = ParamUtil.getBoolean(request, "saveState", true);
+boolean selectableTree = ParamUtil.getBoolean(request, "selectableTree");
+
+String modules = "aui-io-request,aui-tree-view,dataschema-xml,datatype-xml,liferay-store";
+
+if (!selectableTree) {
+	modules += ",liferay-history-manager";
+}
+%>
+
+<aui:script use="<%= modules %>">
+	var Lang = A.Lang;
+	var AArray = A.Array;
+
+	var Util = Liferay.Util;
+
+	var GET_LAYOUTS_URL = themeDisplay.getPathMain() + '/layouts_admin/get_layouts';
+
+	var LAYOUT_URL = '<%= portletURL + StringPool.AMPERSAND + portletDisplay.getNamespace() + "selPlid={selPlid}" + StringPool.AMPERSAND + portletDisplay.getNamespace() + "historyKey={historyKey}" %>';
+	var STR_CHILDREN = 'children';
+
+	var TREE_CSS_CLASSES = {
+		pages: {
+			iconCheck: 'tree-icon icon-check',
+			iconCollapsed: 'icon-file',
+			iconExpanded: 'icon-file',
+			iconHitAreaCollapsed: 'tree-hitarea icon-plus',
+			iconHitAreaExpanded: 'tree-hitarea icon-minus',
+			iconLeaf: 'icon-leaf',
+			iconLoading: 'icon-refresh',
+			iconUncheck: 'icon-check'
+		}
+	};
+
+	<%
+	JSONArray checkedNodesJSONArray = JSONFactoryUtil.createJSONArray();
+
+	String checkedLayoutIds = SessionTreeJSClicks.getOpenNodes(request, treeId + "SelectedNode");
+
+	if (Validator.isNotNull(checkedLayoutIds)) {
+		for (long checkedLayoutId : StringUtil.split(checkedLayoutIds, 0L)) {
+			try {
+				Layout checkedLayout = LayoutLocalServiceUtil.getLayout(groupId, privateLayout, checkedLayoutId);
+
+				checkedNodesJSONArray.put(String.valueOf(checkedLayout.getPlid()));
+			}
+			catch (NoSuchLayoutException nsle) {
+			}
+		}
+	}
+	%>
+
+	var TreeUtil = {
+		CHECKED_NODES: <%= checkedNodesJSONArray.toString() %>,
+		DEFAULT_PARENT_LAYOUT_ID: <%= LayoutConstants.DEFAULT_PARENT_LAYOUT_ID %>,
+		PAGINATION_LIMIT: <%= PropsValues.LAYOUT_MANAGE_PAGES_INITIAL_CHILDREN %>,
+		PREFIX_GROUP_ID: '_groupId_',
+		PREFIX_LAYOUT: '_layout_',
+		PREFIX_LAYOUT_ID: '_layoutId_',
+		PREFIX_PLID: '_plid_',
+
+		afterRenderTree: function(event) {
+			var rootNode = event.target.item(0);
+
+			var loadingEl = A.one('#<portlet:namespace />treeLoading<%= treeLoading %>');
+
+			loadingEl.hide();
+
+			<c:choose>
+				<c:when test="<%= saveState && selectableTree %>">
+					TreeUtil.restoreCheckedNode(rootNode);
+				</c:when>
+				<c:when test="<%= expandFirstNode %>">
+					rootNode.expand();
+				</c:when>
+			</c:choose>
+
+			TreeUtil.restoreSelectedNode(rootNode);
+
+			rootNode.eachChildren(TreeUtil.restoreSelectedNode);
+		},
+
+		createLabel: function(data) {
+			return '<span class="' + data.cssClass + '" title="' + data.title + '">' + data.label + '</span>';
+		},
+
+		createListItemId: function(groupId, layoutId, plid) {
+			return '<%= HtmlUtil.escape(treeId) %>' + TreeUtil.PREFIX_LAYOUT_ID + layoutId + TreeUtil.PREFIX_PLID + plid + TreeUtil.PREFIX_GROUP_ID + groupId;
+		},
+
+		createLinkId: function(friendlyURL) {
+			return '<%= HtmlUtil.escape(treeId) %>' + TreeUtil.PREFIX_LAYOUT + friendlyURL.substring(1);
+		},
+
+		createLink: function(data) {
+			var className = 'layout-tree';
+
+			if (data.cssClass) {
+				className += ' ' + data.cssClass;
+			}
+
+			if (<%= checkContentDisplayPage %> && !data.contentDisplayPage) {
+				className += ' layout-page-invalid';
+			}
+
+			var href = Lang.sub(
+				LAYOUT_URL,
+				{
+					historyKey: data.historyKey,
+					selPlid: data.plid
+				}
+			);
+
+			return '<a class="' + className + '" data-uuid="' + data.uuid + '" href="' + href + '" id="' + data.id + '" title="' + data.title + '">' + data.label + '</a>';
+		},
+
+		extractGroupId: function(node) {
+			return node.get('id').match(/groupId_(\d+)/)[1];
+		},
+
+		extractLayoutId: function(node) {
+			return node.get('id').match(/layoutId_(\d+)/)[1];
+		},
+
+		extractPlid: function(node) {
+			return node.get('id').match(/plid_(\d+)/)[1];
+		},
+
+		formatJSONResults: function(json) {
+			var output = [];
+
+			A.each(
+				json.layouts,
+				function(node) {
+					var childLayouts = [];
+					var cssIcons = {};
+					var total = 0;
+
+					var iconCssClassName = 'icon-link';
+
+					var hasChildren = node.hasChildren;
+					var nodeChildren = node.children;
+					var nodeType = node.type;
+
+					if ((nodeType === 'embedded') ||
+						(nodeType === 'link_to_layout') ||
+						(nodeType === 'url')) {
+
+						cssIcons.pages = {
+							iconCollapsed: iconCssClassName,
+							iconExpanded: iconCssClassName,
+							iconLeaf: iconCssClassName
+						};
+					}
+
+					if (nodeChildren) {
+						childLayouts = nodeChildren.layouts;
+						total = nodeChildren.total;
+					}
+
+					var expanded = (total > 0);
+
+					var type = 'task';
+
+					<c:if test="<%= !selectableTree %>">
+						type = (nodeChildren && expanded) ? 'node' : 'io';
+					</c:if>
+
+					var newNode = {
+						<c:if test="<%= saveState %>">
+							after: {
+								<c:if test="<%= selectableTree %>">
+									checkedChange: function(event) {
+										if (this === event.originalTarget) {
+											var newVal = event.newVal;
+											var target = event.target;
+
+											var plid = TreeUtil.extractPlid(target);
+
+											TreeUtil.updateSessionTreeCheckedState('<%= HtmlUtil.escape(treeId) %>SelectedNode', plid, newVal);
+
+											TreeUtil.updateCheckedNodes(target, newVal);
+										}
+									},
+								</c:if>
+
+								childrenChange: function(event) {
+									var target = event.target;
+
+									target.set('alwaysShowHitArea', (event.newVal.length > 0));
+
+									target.eachChildren(TreeUtil.restoreSelectedNode);
+
+									<c:if test="<%= selectableTree %>">
+										if (target.get('checked')) {
+											TreeUtil.updateCheckedNodes(target, true);
+										}
+
+										TreeUtil.restoreCheckedNode(target);
+									</c:if>
+								},
+
+								expandedChange: function(event) {
+									var layoutId = TreeUtil.extractLayoutId(event.target);
+
+									TreeUtil.updateSessionTreeOpenedState('<%= HtmlUtil.escape(treeId) %>', layoutId, event.newVal);
+								}
+							},
+						</c:if>
+
+						alwaysShowHitArea: hasChildren,
+
+						<c:if test="<%= !saveState && defaultStateChecked %>">
+							checked: true,
+						</c:if>
+
+						cssClasses: A.merge(TREE_CSS_CLASSES, cssIcons),
+						draggable: node.sortable,
+						expanded: expanded,
+						id: TreeUtil.createListItemId(node.groupId, node.layoutId, node.plid),
+						io: {
+							cfg: {
+								data: function(node) {
+									return {
+										groupId: TreeUtil.extractGroupId(node),
+										incomplete: <%= incomplete %>,
+										p_auth: Liferay.authToken,
+										parentLayoutId: TreeUtil.extractLayoutId(node),
+										privateLayout: <%= privateLayout %>,
+										selPlid: '<%= selPlid %>',
+										treeId: '<%= HtmlUtil.escape(treeId) %>'
+									};
+								},
+								method: A.config.io.method,
+								on: {
+									success: function(event, id, xhr) {
+										var instance = this;
+
+										var response;
+
+										try {
+											response = A.JSON.parse(xhr.responseText);
+										}
+										catch (e) {
+										}
+
+										if (response) {
+											instance.get('paginator').total = response.total;
+
+											instance.syncUI();
+										}
+
+										<c:if test="<%= saveState %>">
+											TreeUtil.updatePagination(instance);
+										</c:if>
+									}
+								}
+							},
+							formatter: TreeUtil.formatJSONResults,
+							url: GET_LAYOUTS_URL
+						},
+						leaf: !node.parentable,
+						paginator: {
+							limit: TreeUtil.PAGINATION_LIMIT,
+							offsetParam: 'start',
+							start: Math.max(childLayouts.length - TreeUtil.PAGINATION_LIMIT, 0),
+							total: total
+						},
+						type: type
+					};
+
+					if (nodeChildren && expanded) {
+						newNode.children = TreeUtil.formatJSONResults(nodeChildren);
+					}
+
+					var cssClass = '';
+					var title = '';
+
+					newNode.label = Util.escapeHTML(node.name);
+
+					if (node.layoutRevisionId) {
+						if (!node.layoutRevisionHead) {
+							title = '<%= UnicodeLanguageUtil.get(pageContext, "there-is-not-a-version-of-this-page-marked-as-ready-for-publication") %>';
+						}
+						else if (node.layoutBranchName) {
+							node.layoutBranchName = Util.escapeHTML(node.layoutBranchName);
+
+							newNode.label += Lang.sub(' <span class="layout-branch-name" title="<%= UnicodeLanguageUtil.get(pageContext, "this-is-the-page-variation-that-is-marked-as-ready-for-publication") %>">[{layoutBranchName}]</span>', node);
+						}
+
+						if (node.incomplete) {
+							cssClass = 'incomplete-layout';
+
+							title = '<%= UnicodeLanguageUtil.get(pageContext, "this-page-is-not-enabled-in-this-site-pages-variation,-but-is-available-in-other-variations") %>';
+						}
+					}
+
+					if (!node.sortable) {
+						newNode.cssClass = 'lfr-page-locked';
+					}
+
+					if (!<%= selectableTree %>) {
+						newNode.label = TreeUtil.createLink(
+							{
+								contentDisplayPage: node.contentDisplayPage,
+								cssClass: cssClass,
+								id: TreeUtil.createLinkId(node.friendlyURL),
+								label: newNode.label,
+								plid: node.plid,
+								title: title,
+								uuid: node.uuid
+							}
+						);
+					}
+					else {
+						newNode.label = TreeUtil.createLabel(
+							{
+								cssClass: cssClass,
+								label: newNode.label,
+								title: title
+							}
+						);
+					}
+
+					output.push(newNode);
+				}
+			);
+
+			return output;
+		},
+
+		restoreCheckedNode: function(node) {
+			var instance = this;
+
+			var plid = TreeUtil.extractPlid(node);
+
+			var tree = node.get('ownerTree');
+
+			var treeNodeTaskSuperClass = A.TreeNodeTask.superclass;
+
+			if (AArray.indexOf(TreeUtil.CHECKED_NODES, plid) > -1) {
+				treeNodeTaskSuperClass.check.call(node, tree);
+			}
+			else {
+				treeNodeTaskSuperClass.uncheck.call(node, tree);
+			}
+
+			AArray.each(node.get(STR_CHILDREN), TreeUtil.restoreCheckedNode);
+		},
+
+		restoreSelectedNode: function(node) {
+			var plid = TreeUtil.extractPlid(node);
+
+			if (plid == '<%= selPlid %>') {
+				node.select();
+			}
+			else {
+				node.unselect();
+			}
+		},
+
+		updateLayout: function(data) {
+			A.io.request(
+				themeDisplay.getPathMain() + '/layouts_admin/update_page',
+				{
+					data: A.mix(
+						data,
+						{
+							p_auth: Liferay.authToken
+						}
+					)
+				}
+			);
+		},
+
+		updateLayoutParent: function(dragPlid, dropPlid, index) {
+			TreeUtil.updateLayout(
+				{
+					cmd: 'parent_layout_id',
+					parentPlid: dropPlid,
+					plid: dragPlid,
+					priority: index
+				}
+			);
+		}
+
+		<c:if test="<%= saveState %>">
+			, invokeSessionClick: function(data, callback) {
+				A.mix(
+					data,
+					{
+						useHttpSession: true
+					}
+				);
+
+				A.io.request(
+					themeDisplay.getPathMain() + '/portal/session_click',
+					{
+						after: {
+							success: function(event) {
+								var responseData = this.get('responseData');
+
+								if (callback && responseData) {
+									callback(responseData);
+								}
+							}
+						},
+						data: data
+					}
+				);
+			},
+
+			updatePagination: function(node) {
+				var paginationMap = {};
+
+				var updatePaginationMap = function(map, curNode) {
+					if (A.instanceOf(curNode, A.TreeNodeIO)) {
+						var paginationLimit = TreeUtil.PAGINATION_LIMIT;
+
+						var layoutId = TreeUtil.extractLayoutId(curNode);
+
+						var children = curNode.get(STR_CHILDREN);
+
+						map[layoutId] = Math.ceil(children.length / paginationLimit) * paginationLimit;
+					}
+				}
+
+				TreeUtil.invokeSessionClick(
+					{
+						cmd: 'get',
+						key: '<%= HtmlUtil.escape(treeId) %>:<%= groupId %>:<%= privateLayout %>:Pagination'
+					},
+					function(responseData) {
+						try {
+							paginationMap = A.JSON.parse(responseData);
+						}
+						catch (e) {
+						}
+
+						updatePaginationMap(paginationMap, node)
+
+						node.eachParent(
+							function(parent) {
+								updatePaginationMap(paginationMap, parent);
+							}
+						);
+
+						TreeUtil.invokeSessionClick(
+							{
+								'<%= HtmlUtil.escape(treeId) %>:<%= groupId %>:<%= privateLayout %>:Pagination': A.JSON.stringify(paginationMap)
+							}
+						);
+					}
+				);
+			},
+
+			updateCheckedNodes: function(node, state) {
+				var plid = TreeUtil.extractPlid(node);
+
+				var checkedNodes = TreeUtil.CHECKED_NODES;
+
+				var index = AArray.indexOf(checkedNodes, plid);
+
+				if (state) {
+					if (index == -1) {
+						checkedNodes.push(plid);
+					}
+				}
+				else if (index > -1) {
+					AArray.remove(checkedNodes, index);
+				}
+			},
+
+			updateSessionTreeCheckedState: function(treeId, nodeId, state) {
+				var data = {
+					cmd: state ? 'layoutCheck' : 'layoutUncheck',
+					plid: nodeId
+				};
+
+				TreeUtil.updateSessionTreeClick(treeId, data);
+			},
+
+			updateSessionTreeClick: function(treeId, data) {
+				data = A.merge(
+					{
+						groupId: <%= groupId %>,
+						privateLayout: <%= privateLayout %>,
+						recursive: true,
+						treeId: treeId
+					},
+					data
+				);
+
+				A.io.request(
+					themeDisplay.getPathMain() + '/portal/session_tree_js_click',
+					{
+						data: data
+					}
+				);
+			},
+
+			updateSessionTreeOpenedState: function(treeId, nodeId, state) {
+				var data = {
+					nodeId: nodeId,
+					openNode: state
+				};
+
+				TreeUtil.updateSessionTreeClick(treeId, data);
+			}
+		</c:if>
+	};
+
+	var rootLabel = '<%= HtmlUtil.escapeJS(rootNodeName) %>';
+	var treeElId = '<portlet:namespace /><%= HtmlUtil.escape(treeId) %>Output';
+
+	var RootNodeType = A.TreeNodeTask;
+	var TreeViewType = A.TreeView;
+
+	<c:if test="<%= !selectableTree %>">
+		RootNodeType = A.TreeNodeIO;
+
+		<c:if test="<%= draggableTree %>">
+			TreeViewType = A.TreeViewDD;
+		</c:if>
+
+		<c:if test="<%= !checkContentDisplayPage %>">
+			rootLabel = TreeUtil.createLink(
+				{
+					label: Util.escapeHTML(rootLabel),
+					plid: TreeUtil.DEFAULT_PARENT_LAYOUT_ID
+				}
+			);
+		</c:if>
+	</c:if>
+
+	var rootNode = new RootNodeType(
+		{
+			<c:if test="<%= saveState %>">
+				after: {
+					<c:if test="<%= selectableTree %>">
+						checkedChange: function(event) {
+							var newVal = event.newVal;
+
+							TreeUtil.updateSessionTreeCheckedState('<%= HtmlUtil.escape(treeId) %>SelectedNode', <%= LayoutConstants.DEFAULT_PLID %>, newVal);
+
+							TreeUtil.updateCheckedNodes(event.target, newVal);
+						},
+					</c:if>
+
+					expandedChange: function(event) {
+						Liferay.Store('<%= HtmlUtil.escape(treeId) %>RootNode', event.newVal);
+					}
+				},
+			</c:if>
+
+			alwaysShowHitArea: true,
+
+			<c:if test="<%= !saveState && defaultStateChecked %>">
+				checked: true,
+			</c:if>
+
+			<%
+			long[] openNodes = StringUtil.split(SessionTreeJSClicks.getOpenNodes(request, treeId), 0L);
+
+			JSONObject layoutsJSON = JSONFactoryUtil.createJSONObject(LayoutsTreeUtil.getLayoutsJSON(request, groupId, privateLayout, LayoutConstants.DEFAULT_PARENT_LAYOUT_ID, openNodes, true));
+			%>
+
+			children: TreeUtil.formatJSONResults(<%= layoutsJSON %>),
+			cssClasses: TREE_CSS_CLASSES,
+			draggable: false,
+
+			<c:choose>
+				<c:when test="<%= saveState %>">
+
+					<%
+					boolean rootNodeExpanded = GetterUtil.getBoolean(SessionClicks.get(request, treeId + "RootNode", null), true);
+					%>
+
+					expanded: <%= rootNodeExpanded %>,
+				</c:when>
+				<c:otherwise>
+					expanded: <%= expandFirstNode %>,
+				</c:otherwise>
+			</c:choose>
+
+			id: TreeUtil.createListItemId(<%= groupId %>, TreeUtil.DEFAULT_PARENT_LAYOUT_ID, 0),
+			label: rootLabel,
+			leaf: false,
+			paginator: {
+				limit: TreeUtil.PAGINATION_LIMIT,
+				offsetParam: 'start',
+				start: Math.max(<%= layoutsJSON.getJSONArray("layouts").length() %> - TreeUtil.PAGINATION_LIMIT, 0),
+				total: <%= layoutsJSON.getInt("total") %>
+			}
+		}
+	);
+
+	rootNode.get('contentBox').addClass('lfr-root-node');
+
+	var treeview = new TreeViewType(
+		{
+			after: {
+				render: TreeUtil.afterRenderTree
+			},
+			boundingBox: '#' + treeElId,
+			children: [rootNode],
+			io: {
+				cfg: {
+					data: function(node) {
+						return {
+							groupId: TreeUtil.extractGroupId(node),
+							incomplete: <%= incomplete %>,
+							p_auth: Liferay.authToken,
+							parentLayoutId: TreeUtil.extractLayoutId(node),
+							privateLayout: <%= privateLayout %>,
+							selPlid: '<%= selPlid %>',
+							treeId: '<%= HtmlUtil.escape(treeId) %>'
+						};
+					},
+					method: A.config.io.method,
+					on: {
+						success: function(event, id, xhr) {
+							var instance = this;
+
+							var response;
+
+							try {
+								response = A.JSON.parse(xhr.responseText);
+							}
+							catch (e) {
+							}
+
+							if (response) {
+								instance.get('paginator').total = response.total;
+
+								instance.syncUI();
+							}
+
+							<c:if test="<%= saveState %>">
+								TreeUtil.updatePagination(instance);
+							</c:if>
+						}
+					}
+				},
+				formatter: TreeUtil.formatJSONResults,
+				url: GET_LAYOUTS_URL
+			},
+			on: {
+				<c:if test="<%= saveState && selectableTree %>">
+					append: function(event) {
+						TreeUtil.restoreCheckedNode(event.tree.node);
+					},
+				</c:if>
+
+				'drop:hit': function(event) {
+					var dropNode = event.drop.get('node').get('parentNode');
+
+					var dropTreeNode = dropNode.getData('tree-node');
+
+					if (!dropTreeNode.get('draggable')) {
+						event.halt();
+					}
+				},
+				dropAppend: function(event) {
+					var tree = event.tree;
+
+					var index = tree.dragNode.get('parentNode').getChildrenLength() - 1;
+
+					TreeUtil.updateLayoutParent(
+						TreeUtil.extractPlid(tree.dragNode),
+						TreeUtil.extractPlid(tree.dropNode),
+						index
+					);
+				},
+				dropInsert: function(event) {
+					var tree = event.tree;
+
+					var index = tree.dragNode.get('parentNode').indexOf(tree.dragNode);
+
+					TreeUtil.updateLayoutParent(
+						TreeUtil.extractPlid(tree.dragNode),
+						TreeUtil.extractPlid(tree.dropNode.get('parentNode')),
+						index
+					);
+				}
+			},
+			type: 'pages'
+		}
+	).render();
+
+	<c:if test="<%= !saveState && checkContentDisplayPage %>">
+		treeview.on(
+			'append',
+			function(event) {
+				var node = event.tree.node;
+
+				TreeUtil.restoreSelectedNode(node);
+
+				node.eachChildren(TreeUtil.restoreSelectedNode);
+			}
+		);
+	</c:if>
+
+	A.one('#' + treeElId).setData('treeInstance', treeview);
+
+	<c:if test="<%= !selectableTree %>">
+		var History = Liferay.HistoryManager;
+
+		var DEFAULT_PLID = '0';
+
+		var HISTORY_SELECTED_PLID = '<portlet:namespace />selPlid';
+
+		var layoutsContainer = A.one('#<portlet:namespace />layoutsContainer');
+
+		treeview.after(
+			'lastSelectedChange',
+			function(event) {
+				var node = event.newVal;
+
+				var plid = TreeUtil.extractPlid(node);
+
+				var currentValue = History.get(HISTORY_SELECTED_PLID);
+
+				if (plid != currentValue) {
+					if ((plid == DEFAULT_PLID) && Lang.isValue(currentValue)) {
+						plid = null;
+					}
+
+					History.add(
+						{
+							'<portlet:namespace />selPlid': plid
+						}
+					);
+				}
+			}
+		);
+
+		function compareItemId(item, id) {
+			return (TreeUtil.extractPlid(item) == id);
+		}
+
+		function findNodeByPlid(node, plid) {
+			var foundItem = null;
+
+			if (node) {
+				if (compareItemId(node, plid)) {
+					foundItem = node;
+				}
+			}
+
+			if (!foundItem) {
+				var children = (node || treeview).get(STR_CHILDREN);
+
+				var length = children.length;
+
+				for (var i = 0; i < length; i++) {
+					var item = children[i];
+
+					if (item.isLeaf()) {
+						if (compareItemId(item, plid)) {
+							foundItem = item;
+						}
+					}
+					else {
+						foundItem = findNodeByPlid(item, plid);
+					}
+
+					if (foundItem) {
+						break;
+					}
+				}
+			}
+
+			return foundItem;
+		}
+
+		History.after(
+			'stateChange',
+			function(event) {
+				var nodePlid = event.newVal[HISTORY_SELECTED_PLID];
+
+				if (Lang.isValue(nodePlid)) {
+					var node = findNodeByPlid(null, nodePlid);
+
+					if (node) {
+						var lastSelected = treeview.get('lastSelected');
+
+						if (lastSelected) {
+							lastSelected.unselect();
+						}
+
+						node.select();
+
+						var io = layoutsContainer.io;
+
+						var uri = Lang.sub(
+							LAYOUT_URL,
+							{
+								historyKey: '',
+								selPlid: nodePlid
+							}
+						);
+
+						io.set('uri', uri);
+
+						io.start();
+					}
+				}
+			}
+		);
+	</c:if>
+</aui:script>
+
+<div class="lfr-tree-loading" id="<portlet:namespace />treeLoading<%= treeLoading %>">
+	<span class="icon icon-loading lfr-tree-loading-icon"></span>
+</div>
+
+<div class="lfr-tree" id="<portlet:namespace /><%= HtmlUtil.escape(treeId) %>Output"></div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/view.jsp
new file mode 100644
index 0000000..2b3b33c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/view.jsp
@@ -0,0 +1,243 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%@ include file="/html/portlet/layouts_admin/init_attributes.jspf" %>
+
+<%
+SitesUtil.addPortletBreadcrumbEntries(group, pagesName, redirectURL, request, renderResponse);
+%>
+
+<liferay-ui:error exception="<%= LayoutTypeException.class %>">
+
+	<%
+	LayoutTypeException lte = (LayoutTypeException)errorException;
+
+	String type = BeanParamUtil.getString(selLayout, request, "type");
+	%>
+
+	<c:if test="<%= lte.getType() == LayoutTypeException.FIRST_LAYOUT %>">
+		<liferay-ui:message arguments='<%= Validator.isNull(lte.getLayoutType()) ? type : "layout.types." + lte.getLayoutType() %>' key="the-first-page-cannot-be-of-type-x" />
+	</c:if>
+
+	<c:if test="<%= lte.getType() == LayoutTypeException.FIRST_LAYOUT_PERMISSION %>">
+		<liferay-ui:message key="you-cannot-delete-this-page-because-the-next-page-is-not-vieweable-by-unathenticated-users-and-so-cannot-be-the-first-page" />
+	</c:if>
+
+	<c:if test="<%= lte.getType() == LayoutTypeException.NOT_PARENTABLE %>">
+		<liferay-ui:message arguments="<%= type %>" key="pages-of-type-x-cannot-have-child-pages" />
+	</c:if>
+</liferay-ui:error>
+
+<liferay-ui:error exception="<%= LayoutNameException.class %>" message="please-enter-a-valid-name" />
+
+<liferay-ui:error exception="<%= RequiredLayoutException.class %>">
+
+	<%
+	RequiredLayoutException rle = (RequiredLayoutException)errorException;
+	%>
+
+	<c:if test="<%= rle.getType() == RequiredLayoutException.AT_LEAST_ONE %>">
+		<liferay-ui:message key="you-must-have-at-least-one-page" />
+	</c:if>
+</liferay-ui:error>
+
+<c:choose>
+	<c:when test="<%= !selGroup.isLayoutSetPrototype() && (portletName.equals(PortletKeys.MY_SITES) || portletName.equals(PortletKeys.GROUP_PAGES) || portletName.equals(PortletKeys.MY_PAGES) || portletName.equals(PortletKeys.SITES_ADMIN) || portletName.equals(PortletKeys.USER_GROUPS_ADMIN) || portletName.equals(PortletKeys.USERS_ADMIN)) %>">
+		<c:if test="<%= portletName.equals(PortletKeys.MY_SITES) || (portletName.equals(PortletKeys.GROUP_PAGES) && !layout.isTypeControlPanel()) || portletName.equals(PortletKeys.SITES_ADMIN) || portletName.equals(PortletKeys.USER_GROUPS_ADMIN) || portletName.equals(PortletKeys.USERS_ADMIN) %>">
+			<liferay-ui:header
+				backURL="<%= backURL %>"
+				escapeXml="<%= false %>"
+				localizeTitle="<%= false %>"
+				title="<%= HtmlUtil.escape(liveGroup.getDescriptiveName(locale)) %>"
+			/>
+		</c:if>
+
+		<%
+		String tabs1URL = redirectURL.toString();
+
+		if (liveGroup.isUser()) {
+			PortletURL userTabs1URL = renderResponse.createRenderURL();
+
+			userTabs1URL.setParameter("struts_action", "/my_pages/edit_layouts");
+			userTabs1URL.setParameter("tabs1", tabs1);
+			userTabs1URL.setParameter("backURL", backURL);
+			userTabs1URL.setParameter("groupId", String.valueOf(liveGroupId));
+
+			tabs1URL = userTabs1URL.toString();
+		}
+		%>
+
+		<liferay-ui:tabs
+			names="<%= tabs1Names %>"
+			param="tabs1"
+			url="<%= tabs1URL %>"
+			value="<%= tabs1 %>"
+		/>
+
+		<%
+		PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, TextFormatter.format(tabs1, TextFormatter.O)), redirectURL.toString());
+		%>
+
+	</c:when>
+	<c:otherwise>
+		<liferay-ui:breadcrumb showGuestGroup="<%= false %>" showLayout="<%= false %>" showParentGroups="<%= false %>" showPortletBreadcrumb="<%= true %>" />
+	</c:otherwise>
+</c:choose>
+
+<div class="container-fluid">
+	<div class="lfr-app-column-view manage-view row-fluid">
+		<c:if test="<%= !group.isLayoutPrototype() %>">
+			<div class="span3">
+				<c:if test="<%= stagingGroup != null %>">
+
+					<%
+					long layoutSetBranchId = ParamUtil.getLong(request, "layoutSetBranchId");
+
+					if (layoutSetBranchId <= 0) {
+						layoutSetBranchId = StagingUtil.getRecentLayoutSetBranchId(user, selLayoutSet.getLayoutSetId());
+					}
+
+					LayoutSetBranch layoutSetBranch = null;
+
+					if (layoutSetBranchId > 0) {
+						try {
+							layoutSetBranch = LayoutSetBranchLocalServiceUtil.getLayoutSetBranch(layoutSetBranchId);
+						}
+						catch (NoSuchLayoutSetBranchException nslsbe) {
+						}
+					}
+
+					if (layoutSetBranch == null) {
+						try {
+							layoutSetBranch = LayoutSetBranchLocalServiceUtil.getMasterLayoutSetBranch(stagingGroup.getGroupId(), privateLayout);
+						}
+						catch (NoSuchLayoutSetBranchException nslsbe) {
+						}
+					}
+
+					List<LayoutSetBranch> layoutSetBranches = LayoutSetBranchLocalServiceUtil.getLayoutSetBranches(stagingGroup.getGroupId(), privateLayout);
+					%>
+
+					<c:choose>
+						<c:when test="<%= layoutSetBranches.size() > 1 %>">
+							<aui:nav-bar>
+								<aui:nav>
+									<aui:nav-item dropdown="<%= true %>" label="<%= HtmlUtil.escape(layoutSetBranch.getName()) %>">
+
+										<%
+										for (int i = 0; i < layoutSetBranches.size(); i++) {
+											LayoutSetBranch curLayoutSetBranch = layoutSetBranches.get(i);
+
+											boolean selected = (curLayoutSetBranch.getLayoutSetBranchId() == layoutSetBranch.getLayoutSetBranchId());
+										%>
+
+											<portlet:actionURL var="layoutSetBranchURL">
+												<portlet:param name="struts_action" value="/dockbar/edit_layouts" />
+												<portlet:param name="<%= Constants.CMD %>" value="select_layout_set_branch" />
+												<portlet:param name="redirect" value="<%= redirectURL.toString() %>" />
+												<portlet:param name="groupId" value="<%= String.valueOf(curLayoutSetBranch.getGroupId()) %>" />
+												<portlet:param name="privateLayout" value="<%= String.valueOf(privateLayout) %>" />
+												<portlet:param name="layoutSetBranchId" value="<%= String.valueOf(curLayoutSetBranch.getLayoutSetBranchId()) %>" />
+											</portlet:actionURL>
+
+											<aui:nav-item cssClass='<%= selected ? "disabled" : StringPool.BLANK %>' href="<%= selected ? null : layoutSetBranchURL %>" label="<%= HtmlUtil.escape(curLayoutSetBranch.getName()) %>" />
+
+										<%
+										}
+										%>
+
+									</aui:nav-item>
+								</aui:nav>
+							</aui:nav-bar>
+						</c:when>
+					</c:choose>
+
+					<liferay-ui:staging cssClass="manage-pages-branch-menu" extended="<%= true %>" groupId="<%= groupId %>" icon="/common/tool.png" message="" privateLayout="<%= privateLayout %>" selPlid="<%= selPlid %>" showManageBranches="<%= true %>"  />
+				</c:if>
+
+				<liferay-util:include page="/html/portlet/layouts_admin/tree_js.jsp">
+					<liferay-util:param name="treeId" value="layoutsTree" />
+				</liferay-util:include>
+			</div>
+		</c:if>
+
+		<div class='<%= !group.isLayoutPrototype() ? "span9" : "span12" %>'>
+			<div id="<portlet:namespace />layoutsContainer">
+				<c:choose>
+					<c:when test="<%= selPlid > 0 %>">
+						<liferay-util:include page="/html/portlet/layouts_admin/edit_layout.jsp" />
+					</c:when>
+					<c:otherwise>
+						<liferay-util:include page="/html/portlet/layouts_admin/edit_layout_set.jsp" />
+					</c:otherwise>
+				</c:choose>
+			</div>
+		</div>
+	</div>
+</div>
+
+<c:if test="<%= !group.isLayoutPrototype() %>">
+	<aui:script use="aui-io-plugin-deprecated">
+		var layoutsContainer = A.one('#<portlet:namespace />layoutsContainer');
+
+		layoutsContainer.plug(
+			A.Plugin.IO,
+			{
+				autoLoad: false
+			}
+		);
+
+		A.one('#<portlet:namespace />layoutsTreeOutput').delegate(
+			'click',
+			function(event) {
+				event.preventDefault();
+
+				var link = event.currentTarget.one('a');
+
+				if (link && !event.target.hasClass('tree-hitarea')) {
+					var href = link.attr('href');
+
+					var hash = location.hash;
+
+					var prefix = '#_LFR_FN_<portlet:namespace />';
+					var historyKey = '';
+
+					if (hash.indexOf(prefix) != -1) {
+						historyKey = hash.replace(prefix, '');
+					}
+
+					var requestUri = A.Lang.sub(
+						href,
+						{
+							historyKey: historyKey
+						}
+					);
+
+					layoutsContainer.io.set('uri', requestUri);
+
+					if (layoutsContainer.ParseContent) {
+						layoutsContainer.ParseContent.get('queue').stop();
+					}
+
+					layoutsContainer.io.start();
+				}
+			},
+			'.tree-node-content'
+		);
+	</aui:script>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/view_resources.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/view_resources.jsp
new file mode 100644
index 0000000..45dbeda
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/layouts_admin/view_resources.jsp
@@ -0,0 +1,51 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/layouts_admin/init.jsp" %>
+
+<%@ include file="/html/portlet/layouts_admin/init_attributes.jspf" %>
+
+<%
+boolean viewTree = ParamUtil.getBoolean(request, "viewTree");
+boolean viewLayout = ParamUtil.getBoolean(request, "viewLayout");
+
+SitesUtil.addPortletBreadcrumbEntries(group, pagesName, redirectURL, request, renderResponse);
+%>
+
+<c:if test="<%= viewTree %>">
+	<div id="<portlet:namespace />viewTree">
+		<liferay-util:include page="/html/portlet/layouts_admin/tree_js.jsp">
+			<liferay-util:param name="treeId" value="layoutsTree" />
+		</liferay-util:include>
+	</div>
+</c:if>
+
+<c:if test="<%= viewLayout %>">
+	<div id="<portlet:namespace />viewLayout">
+		<c:choose>
+			<c:when test="<%= (selPlid > 0) && LayoutPermissionUtil.contains(permissionChecker, selPlid, ActionKeys.VIEW) %>">
+				<liferay-util:include page="/html/portlet/layouts_admin/edit_layout.jsp">
+					<c:if test="<%= !SitesUtil.isLayoutDeleteable(selLayout) || !SitesUtil.isLayoutUpdateable(selLayout) %>">
+						<liferay-util:param name="showAddAction" value="<%= Boolean.FALSE.toString() %>" />
+					</c:if>
+				</liferay-util:include>
+			</c:when>
+			<c:when test="<%= (liveGroupId > 0) && GroupPermissionUtil.contains(permissionChecker, liveGroupId, ActionKeys.VIEW) %>">
+				<liferay-util:include page="/html/portlet/layouts_admin/edit_layout_set.jsp" />
+			</c:when>
+		</c:choose>
+	</div>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/license_manager/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/license_manager/view.jsp
new file mode 100644
index 0000000..8dfb81f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/license_manager/view.jsp
@@ -0,0 +1,27 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<iframe allowTransparency="true" frameborder="0" id="<portlet:namespace />iframe" scrolling="no" src="<%= themeDisplay.getPathMain() %>/portal/license?p_p_state=pop_up" style="border: none; width: 100%;"></iframe>
+
+<aui:script use="aui-autosize-iframe">
+	var iframe = A.one('#<portlet:namespace />iframe');
+
+	if (iframe) {
+		iframe.plug(A.Plugin.AutosizeIframe);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/loan_calculator/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/loan_calculator/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/loan_calculator/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/loan_calculator/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/loan_calculator/init.jsp
new file mode 100644
index 0000000..de6dfe1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/loan_calculator/init.jsp
@@ -0,0 +1,19 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ include file="/html/portlet/loan_calculator/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/loan_calculator/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/loan_calculator/view.jsp
new file mode 100644
index 0000000..75b9b32
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/loan_calculator/view.jsp
@@ -0,0 +1,140 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/loan_calculator/init.jsp" %>
+
+<%
+String loanAmountString = ParamUtil.get(request, "loanAmount", "200000");
+String interestString = ParamUtil.get(request, "interest", "7.00");
+int years = ParamUtil.get(request, "years", 30);
+int paymentsPerYear = ParamUtil.get(request, "paymentsPerYear", 12);
+
+int loanAmount = 0;
+double interest = 0.0;
+
+NumberFormat doubleFormat = NumberFormat.getNumberInstance(locale);
+
+doubleFormat.setMaximumFractionDigits(2);
+doubleFormat.setMinimumFractionDigits(2);
+
+NumberFormat integerFormat = NumberFormat.getNumberInstance(locale);
+
+integerFormat.setMaximumFractionDigits(0);
+integerFormat.setMinimumFractionDigits(0);
+
+try {
+	loanAmount = GetterUtil.getInteger(integerFormat.parse(loanAmountString));
+	interest = GetterUtil.getDouble(doubleFormat.parse(interestString));
+}
+catch (Exception e) {
+}
+
+double tempValue = Math.pow((1 + (interest / 100 / paymentsPerYear)), (years * paymentsPerYear));
+double amountPerPayment = (loanAmount * tempValue * (interest / 100 / paymentsPerYear)) / (tempValue - 1);
+double totalPaid = amountPerPayment * years * paymentsPerYear;
+double interestPaid = totalPaid - loanAmount;
+%>
+
+<form action="<liferay-portlet:renderURL windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>"><portlet:param name="struts_action" value="/loan_calculator/view" /></liferay-portlet:renderURL>" id="<portlet:namespace />fm" method="post" name="<portlet:namespace />fm">
+
+<table class="lfr-table">
+<tr>
+	<td>
+		<liferay-ui:message key="loan-amount" />
+	</td>
+	<td>
+		<input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" name="<portlet:namespace />loanAmount" size="5" type="text" value="<%= integerFormat.format(loanAmount) %>" />
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="interest-rate" />
+	</td>
+	<td>
+		<input name="<portlet:namespace />interest" size="5" type="text" value="<%= doubleFormat.format(interest) %>" />
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="years" />
+	</td>
+	<td>
+		<input name="<portlet:namespace />years" size="5" type="text" value="<%= years %>" />
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="monthly-payment" />
+	</td>
+	<td>
+		<strong><%= integerFormat.format(amountPerPayment) %></strong>
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="interest-paid" />
+	</td>
+	<td>
+		<strong><%= integerFormat.format(interestPaid) %></strong>
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="total-paid" />
+	</td>
+	<td>
+		<strong><%= integerFormat.format(totalPaid) %></strong>
+	</td>
+</tr>
+</table>
+
+<br />
+
+<input type="submit" value="<liferay-ui:message key="calculate" />" />
+
+</form>
+
+<aui:script use="aui-io-request,aui-parse-content">
+	var form = A.one('#<portlet:namespace />fm');
+	var parentNode = form.get('parentNode');
+
+	parentNode.plug(A.Plugin.ParseContent);
+
+	form.on(
+		'submit',
+		function(event) {
+			var uri = form.getAttribute('action');
+
+			A.io.request(
+				uri,
+				{
+					form: {
+						id: form
+					},
+					on: {
+						success: function(event, id, obj) {
+							var responseData = this.get('responseData');
+
+							parentNode.setContent(responseData);
+						}
+					}
+				}
+			);
+
+			event.halt();
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/login/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/configuration.jsp
new file mode 100644
index 0000000..6f1475a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/configuration.jsp
@@ -0,0 +1,259 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/login/init.jsp" %>
+
+<%
+String tabs1 = ParamUtil.getString(request, "tabs1", "general");
+String tabs2 = ParamUtil.getString(request, "tabs2", "general");
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+String emailFromName = ParamUtil.getString(request, "preferences--emailFromName--", LoginUtil.getEmailFromName(portletPreferences, company.getCompanyId()));
+String emailFromAddress = ParamUtil.getString(request, "preferences--emailFromAddress--", LoginUtil.getEmailFromAddress(portletPreferences, company.getCompanyId()));
+
+String emailParam = "emailPasswordSent";
+String defaultEmailSubject = StringPool.BLANK;
+String defaultEmailBody = StringPool.BLANK;
+
+if (tabs2.equals("password-reset-notification")) {
+	emailParam = "emailPasswordReset";
+	defaultEmailSubject = ContentUtil.get(PropsValues.ADMIN_EMAIL_PASSWORD_RESET_SUBJECT);
+	defaultEmailBody = ContentUtil.get(PropsValues.ADMIN_EMAIL_PASSWORD_RESET_BODY);
+}
+else if (tabs2.equals("password-changed-notification")) {
+	defaultEmailSubject = ContentUtil.get(PropsValues.ADMIN_EMAIL_PASSWORD_SENT_SUBJECT);
+	defaultEmailBody = ContentUtil.get(PropsValues.ADMIN_EMAIL_PASSWORD_SENT_BODY);
+}
+
+String currentLanguageId = LanguageUtil.getLanguageId(request);
+
+String emailSubjectParam = emailParam + "Subject_" + currentLanguageId;
+String emailBodyParam = emailParam + "Body_" + currentLanguageId;
+
+String emailSubject = PrefsParamUtil.getString(portletPreferences, request, emailSubjectParam, defaultEmailSubject);
+String emailBody = PrefsParamUtil.getString(portletPreferences, request, emailBodyParam, defaultEmailBody);
+%>
+
+<liferay-portlet:renderURL portletConfiguration="true" var="portletURL">
+	<portlet:param name="tabs1" value="<%= tabs1 %>" />
+	<portlet:param name="tabs2" value="<%= tabs2 %>" />
+	<portlet:param name="redirect" value="<%= redirect %>" />
+</liferay-portlet:renderURL>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm" onSubmit='<%= renderResponse.getNamespace() + "saveConfiguration();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="tabs1" type="hidden" value="<%= tabs1 %>" />
+	<aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
+
+	<liferay-ui:tabs
+		names="general,email-notifications"
+		param="tabs1"
+		url="<%= portletURL %>"
+	/>
+
+	<c:choose>
+		<c:when test='<%= tabs1.equals("email-notifications") %>'>
+
+			<liferay-ui:tabs
+				names="general,password-changed-notification,password-reset-notification"
+				param="tabs2"
+				url="<%= portletURL %>"
+			/>
+
+			<liferay-ui:error key="emailFromAddress" message="please-enter-a-valid-email-address" />
+			<liferay-ui:error key="emailFromName" message="please-enter-a-valid-name" />
+
+			<c:choose>
+				<c:when test='<%= tabs2.equals("password-changed-notification") || tabs2.equals("password-reset-notification") %>'>
+					<div class="alert alert-info">
+						<liferay-ui:message key="enter-custom-values-or-leave-it-blank-to-use-the-default-portal-settings" />
+					</div>
+
+					<aui:fieldset>
+						<aui:select label="language" name="languageId" onChange='<%= renderResponse.getNamespace() + "updateLanguage(this);" %>'>
+
+							<%
+							Locale[] locales = LanguageUtil.getAvailableLocales(themeDisplay.getSiteGroupId());
+
+							for (int i = 0; i < locales.length; i++) {
+								String style = StringPool.BLANK;
+
+								if (Validator.isNotNull(portletPreferences.getValue(emailParam + "Subject_" + LocaleUtil.toLanguageId(locales[i]), StringPool.BLANK)) ||
+									Validator.isNotNull(portletPreferences.getValue(emailParam + "Body_" + LocaleUtil.toLanguageId(locales[i]), StringPool.BLANK))) {
+
+									style = "font-weight: bold;";
+								}
+							%>
+
+								<aui:option label="<%= locales[i].getDisplayName(locale) %>" selected="<%= currentLanguageId.equals(LocaleUtil.toLanguageId(locales[i])) %>" style="<%= style %>" value="<%= LocaleUtil.toLanguageId(locales[i]) %>" />
+
+							<%
+							}
+							%>
+
+						</aui:select>
+
+						<aui:input cssClass="lfr-input-text-container" label="subject" name='<%= "preferences--" + emailSubjectParam + "--" %>' value="<%= emailSubject %>" />
+
+						<aui:field-wrapper label="body">
+							<liferay-ui:input-editor editorImpl="<%= EDITOR_WYSIWYG_IMPL_KEY %>" />
+
+							<aui:input name='<%= "preferences--" + emailBodyParam + "--" %>' type="hidden" />
+						</aui:field-wrapper>
+					</aui:fieldset>
+
+					<div class="definition-of-terms">
+						<h4><liferay-ui:message key="definition-of-terms" /></h4>
+
+						<dl>
+							<dt>
+								[$FROM_ADDRESS$]
+							</dt>
+							<dd>
+								<%= HtmlUtil.escape(emailFromAddress) %>
+							</dd>
+							<dt>
+								[$FROM_NAME$]
+							</dt>
+							<dd>
+								<%= HtmlUtil.escape(emailFromName) %>
+							</dd>
+
+							<c:if test='<%= tabs2.equals("password-reset-notification") %>'>
+								<dt>
+									[$PASSWORD_RESET_URL$]
+								</dt>
+								<dd>
+									<liferay-ui:message key="the-password-reset-url" />
+								</dd>
+							</c:if>
+
+							<dt>
+								[$PORTAL_URL$]
+							</dt>
+							<dd>
+								<%= company.getVirtualHostname() %>
+							</dd>
+							<dt>
+								[$REMOTE_ADDRESS$]
+							</dt>
+							<dd>
+								<liferay-ui:message key="the-browser's-remote-address" />
+							</dd>
+							<dt>
+								[$REMOTE_HOST$]
+							</dt>
+							<dd>
+								<liferay-ui:message key="the-browser's-remote-host" />
+							</dd>
+
+							<dt>
+								[$TO_ADDRESS$]
+							</dt>
+							<dd>
+								<liferay-ui:message key="the-address-of-the-email-recipient" />
+							</dd>
+							<dt>
+								[$TO_NAME$]
+							</dt>
+							<dd>
+								<liferay-ui:message key="the-name-of-the-email-recipient" />
+							</dd>
+
+							<dt>
+								[$USER_AGENT$]
+							</dt>
+							<dd>
+								<liferay-ui:message key="the-browser's-user-agent" />
+							</dd>
+
+							<dt>
+								[$USER_ID$]
+							</dt>
+							<dd>
+								<liferay-ui:message key="the-user-id" />
+							</dd>
+
+							<c:if test='<%= tabs2.equals("password-changed-notification") %>'>
+								<dt>
+									[$USER_PASSWORD$]
+								</dt>
+								<dd>
+									<liferay-ui:message key="the-user-password" />
+								</dd>
+							</c:if>
+
+							<dt>
+								[$USER_SCREENNAME$]
+							</dt>
+							<dd>
+								<liferay-ui:message key="the-user-screen-name" />
+							</dd>
+						</dl>
+					</div>
+				</c:when>
+				<c:otherwise>
+					<aui:fieldset>
+						<aui:input cssClass="lfr-input-text-container" label="name" name="preferences--emailFromName--" value="<%= emailFromName %>" />
+
+						<aui:input cssClass="lfr-input-text-container" label="address" name="preferences--emailFromAddress--" value="<%= emailFromAddress %>" />
+					</aui:fieldset>
+				</c:otherwise>
+			</c:choose>
+
+			<aui:script>
+				function <portlet:namespace />initEditor() {
+					return "<%= UnicodeFormatter.toString(emailBody) %>";
+				}
+
+				function <portlet:namespace />saveConfiguration() {
+					<c:if test='<%= tabs2.endsWith("-notification") %>'>
+						document.<portlet:namespace />fm.<portlet:namespace /><%= emailBodyParam %>.value = window.<portlet:namespace />editor.getHTML();
+					</c:if>
+
+					submitForm(document.<portlet:namespace />fm);
+				}
+
+				function <portlet:namespace />updateLanguage() {
+					document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = '';
+					submitForm(document.<portlet:namespace />fm);
+				}
+			</aui:script>
+		</c:when>
+		<c:otherwise>
+			<aui:fieldset>
+				<aui:select label="authentication-type" name="preferences--authType--">
+					<aui:option label="default" value="" />
+					<aui:option label="by-email-address" selected="<%= authType.equals(CompanyConstants.AUTH_TYPE_EA) %>" value="<%= CompanyConstants.AUTH_TYPE_EA %>" />
+					<aui:option label="by-screen-name" selected="<%= authType.equals(CompanyConstants.AUTH_TYPE_SN) %>" value="<%= CompanyConstants.AUTH_TYPE_SN %>" />
+					<aui:option label="by-user-id" selected="<%= authType.equals(CompanyConstants.AUTH_TYPE_ID) %>" value="<%= CompanyConstants.AUTH_TYPE_ID %>" />
+				</aui:select>
+			</aui:fieldset>
+		</c:otherwise>
+	</c:choose>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<%!
+public static final String EDITOR_WYSIWYG_IMPL_KEY = "editor.wysiwyg.portal-web.docroot.html.portlet.login.configuration.jsp";
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/login/create_account.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/create_account.jsp
new file mode 100644
index 0000000..cb7ff15
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/create_account.jsp
@@ -0,0 +1,182 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/login/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+String openId = ParamUtil.getString(request, "openId");
+boolean male = ParamUtil.getBoolean(request, "male", true);
+
+Calendar birthdayCalendar = CalendarFactoryUtil.getCalendar();
+
+birthdayCalendar.set(Calendar.MONTH, Calendar.JANUARY);
+birthdayCalendar.set(Calendar.DATE, 1);
+birthdayCalendar.set(Calendar.YEAR, 1970);
+%>
+
+<portlet:actionURL secure="<%= PropsValues.COMPANY_SECURITY_AUTH_REQUIRES_HTTPS || request.isSecure() %>" var="createAccountURL">
+	<portlet:param name="struts_action" value="/login/create_account" />
+</portlet:actionURL>
+
+<aui:form action="<%= createAccountURL %>" method="post" name="fm">
+	<aui:input name="saveLastPath" type="hidden" value="<%= false %>" />
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.ADD %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="openId" type="hidden" value="<%= openId %>" />
+
+	<liferay-ui:error exception="<%= AddressCityException.class %>" message="please-enter-a-valid-city" />
+	<liferay-ui:error exception="<%= AddressStreetException.class %>" message="please-enter-a-valid-street" />
+	<liferay-ui:error exception="<%= AddressZipException.class %>" message="please-enter-a-valid-postal-code" />
+	<liferay-ui:error exception="<%= CaptchaMaxChallengesException.class %>" message="maximum-number-of-captcha-attempts-exceeded" />
+	<liferay-ui:error exception="<%= CaptchaTextException.class %>" message="text-verification-failed" />
+	<liferay-ui:error exception="<%= CompanyMaxUsersException.class %>" message="unable-to-create-user-account-because-the-maximum-number-of-users-has-been-reached" />
+	<liferay-ui:error exception="<%= ContactFirstNameException.class %>" message="please-enter-a-valid-first-name" />
+	<liferay-ui:error exception="<%= ContactFullNameException.class %>" message="please-enter-a-valid-first-middle-and-last-name" />
+	<liferay-ui:error exception="<%= ContactLastNameException.class %>" message="please-enter-a-valid-last-name" />
+	<liferay-ui:error exception="<%= DuplicateOpenIdException.class %>" message="a-user-with-that-open-id-already-exists" />
+	<liferay-ui:error exception="<%= DuplicateUserEmailAddressException.class %>" message="the-email-address-you-requested-is-already-taken" />
+	<liferay-ui:error exception="<%= DuplicateUserIdException.class %>" message="the-user-id-you-requested-is-already-taken" />
+	<liferay-ui:error exception="<%= DuplicateUserScreenNameException.class %>" message="the-screen-name-you-requested-is-already-taken" />
+	<liferay-ui:error exception="<%= EmailAddressException.class %>" message="please-enter-a-valid-email-address" />
+
+	<liferay-ui:error exception="<%= GroupFriendlyURLException.class %>">
+
+		<%
+		GroupFriendlyURLException gfurle = (GroupFriendlyURLException)errorException;
+		%>
+
+		<c:if test="<%= gfurle.getType() == GroupFriendlyURLException.DUPLICATE %>">
+			<liferay-ui:message key="the-screen-name-you-requested-is-associated-with-an-existing-friendly-url" />
+		</c:if>
+	</liferay-ui:error>
+
+	<liferay-ui:error exception="<%= NoSuchCountryException.class %>" message="please-select-a-country" />
+	<liferay-ui:error exception="<%= NoSuchListTypeException.class %>" message="please-select-a-type" />
+	<liferay-ui:error exception="<%= NoSuchRegionException.class %>" message="please-select-a-region" />
+	<liferay-ui:error exception="<%= PhoneNumberException.class %>" message="please-enter-a-valid-phone-number" />
+	<liferay-ui:error exception="<%= RequiredFieldException.class %>" message="please-fill-out-all-required-fields" />
+	<liferay-ui:error exception="<%= ReservedUserEmailAddressException.class %>" message="the-email-address-you-requested-is-reserved" />
+	<liferay-ui:error exception="<%= ReservedUserIdException.class %>" message="the-user-id-you-requested-is-reserved" />
+	<liferay-ui:error exception="<%= ReservedUserScreenNameException.class %>" message="the-screen-name-you-requested-is-reserved" />
+	<liferay-ui:error exception="<%= TermsOfUseException.class %>" message="you-must-agree-to-the-terms-of-use" />
+	<liferay-ui:error exception="<%= UserEmailAddressException.class %>" message="please-enter-a-valid-email-address" />
+	<liferay-ui:error exception="<%= UserIdException.class %>" message="please-enter-a-valid-user-id" />
+
+	<liferay-ui:error exception="<%= UserPasswordException.class %>">
+
+		<%
+		UserPasswordException upe = (UserPasswordException)errorException;
+		%>
+
+		<c:if test="<%= upe.getType() == UserPasswordException.PASSWORD_CONTAINS_TRIVIAL_WORDS %>">
+			<liferay-ui:message key="that-password-uses-common-words-please-enter-in-a-password-that-is-harder-to-guess-i-e-contains-a-mix-of-numbers-and-letters" />
+		</c:if>
+
+		<c:if test="<%= upe.getType() == UserPasswordException.PASSWORD_INVALID %>">
+			<liferay-ui:message key="that-password-is-invalid-please-enter-in-a-different-password" />
+		</c:if>
+
+		<c:if test="<%= upe.getType() == UserPasswordException.PASSWORD_LENGTH %>">
+
+			<%
+			PasswordPolicy passwordPolicy = PasswordPolicyLocalServiceUtil.getDefaultPasswordPolicy(company.getCompanyId());
+			%>
+
+			<%= LanguageUtil.format(pageContext, "that-password-is-too-short-or-too-long-please-make-sure-your-password-is-between-x-and-512-characters", String.valueOf(passwordPolicy.getMinLength()), false) %>
+		</c:if>
+
+		<c:if test="<%= upe.getType() == UserPasswordException.PASSWORD_TOO_TRIVIAL %>">
+			<liferay-ui:message key="that-password-is-too-trivial" />
+		</c:if>
+
+		<c:if test="<%= upe.getType() == UserPasswordException.PASSWORDS_DO_NOT_MATCH %>">
+			<liferay-ui:message key="the-passwords-you-entered-do-not-match-each-other-please-re-enter-your-password" />
+		</c:if>
+	</liferay-ui:error>
+
+	<liferay-ui:error exception="<%= UserScreenNameException.class %>" message="please-enter-a-valid-screen-name" />
+	<liferay-ui:error exception="<%= WebsiteURLException.class %>" message="please-enter-a-valid-url" />
+
+	<c:if test='<%= SessionMessages.contains(request, "openIdUserInformationMissing") %>'>
+		<div class="alert alert-info">
+			<liferay-ui:message key="you-have-successfully-authenticated-please-provide-the-following-required-information-to-access-the-portal" />
+		</div>
+	</c:if>
+
+	<aui:model-context model="<%= Contact.class %>" />
+
+	<aui:fieldset column="<%= true %>">
+		<aui:col width="<%= 50 %>">
+			<%@ include file="/html/portlet/login/create_account_user_name.jspf" %>
+
+			<c:if test="<%= !PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.USERS_SCREEN_NAME_ALWAYS_AUTOGENERATE) %>">
+				<aui:input model="<%= User.class %>" name="screenName" />
+			</c:if>
+
+			<aui:input autoFocus="<%= true %>" model="<%= User.class %>" name="emailAddress">
+				<c:if test="<%= PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.USERS_EMAIL_ADDRESS_REQUIRED) %>">
+					<aui:validator name="required" />
+				</c:if>
+			</aui:input>
+		</aui:col>
+
+		<aui:col width="<%= 50 %>">
+			<c:if test="<%= PropsValues.LOGIN_CREATE_ACCOUNT_ALLOW_CUSTOM_PASSWORD %>">
+				<aui:input label="password" name="password1" size="30" type="password" value="" />
+
+				<aui:input label="enter-again" name="password2" size="30" type="password" value="">
+					<aui:validator name="equalTo">
+						'#<portlet:namespace />password1'
+					</aui:validator>
+				</aui:input>
+			</c:if>
+
+			<c:choose>
+				<c:when test="<%= PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.FIELD_ENABLE_COM_LIFERAY_PORTAL_MODEL_CONTACT_BIRTHDAY) %>">
+					<aui:input name="birthday" value="<%= birthdayCalendar %>" />
+				</c:when>
+				<c:otherwise>
+					<aui:input name="birthdayMonth" type="hidden" value="<%= Calendar.JANUARY %>" />
+					<aui:input name="birthdayDay" type="hidden" value="1" />
+					<aui:input name="birthdayYear" type="hidden" value="1970" />
+				</c:otherwise>
+			</c:choose>
+
+			<c:if test="<%= PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.FIELD_ENABLE_COM_LIFERAY_PORTAL_MODEL_CONTACT_MALE) %>">
+				<aui:select label="gender" name="male">
+					<aui:option label="male" value="1" />
+					<aui:option label="female" selected="<%= !male %>" value="0" />
+				</aui:select>
+			</c:if>
+
+			<c:if test="<%= PropsValues.CAPTCHA_CHECK_PORTAL_CREATE_ACCOUNT %>">
+				<portlet:resourceURL var="captchaURL">
+					<portlet:param name="struts_action" value="/login/captcha" />
+				</portlet:resourceURL>
+
+				<liferay-ui:captcha url="<%= captchaURL %>" />
+			</c:if>
+		</aui:col>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<liferay-util:include page="/html/portlet/login/navigation.jsp" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/login/create_account_user_name.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/create_account_user_name.jspf
new file mode 100644
index 0000000..2a476d9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/create_account_user_name.jspf
@@ -0,0 +1,25 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" model="<%= User.class %>" name="firstName" />
+
+<aui:input model="<%= User.class %>" name="middleName" />
+
+<aui:input model="<%= User.class %>" name="lastName">
+	<c:if test="<%= PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.USERS_LAST_NAME_REQUIRED, PropsValues.USERS_LAST_NAME_REQUIRED) %>">
+		<aui:validator name="required" />
+	</c:if>
+</aui:input>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/login/create_anonymous_account.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/create_anonymous_account.jsp
new file mode 100644
index 0000000..93c8e3c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/create_anonymous_account.jsp
@@ -0,0 +1,83 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/login/init.jsp" %>
+
+<portlet:actionURL var="createAnonymousAccountURL">
+	<portlet:param name="struts_action" value="/login/create_anonymous_account" />
+</portlet:actionURL>
+
+<aui:form action="<%= createAnonymousAccountURL %>" method="post" name="fm">
+	<aui:input name="saveLastPath" type="hidden" value="<%= false %>" />
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.ADD %>" />
+
+	<liferay-ui:error exception="<%= CaptchaTextException.class %>" message="text-verification-failed" />
+	<liferay-ui:error exception="<%= CompanyMaxUsersException.class %>" message="unable-to-create-user-account-because-the-maximum-number-of-users-has-been-reached" />
+	<liferay-ui:error exception="<%= ContactFirstNameException.class %>" message="please-enter-a-valid-first-name" />
+	<liferay-ui:error exception="<%= ContactFullNameException.class %>" message="please-enter-a-valid-first-middle-and-last-name" />
+	<liferay-ui:error exception="<%= ContactLastNameException.class %>" message="please-enter-a-valid-last-name" />
+	<liferay-ui:error exception="<%= DuplicateUserEmailAddressException.class %>" message="the-email-address-you-requested-is-already-taken" />
+	<liferay-ui:error exception="<%= EmailAddressException.class %>" message="please-enter-a-valid-email-address" />
+
+	<liferay-ui:error exception="<%= GroupFriendlyURLException.class %>">
+
+		<%
+		GroupFriendlyURLException gfurle = (GroupFriendlyURLException)errorException;
+		%>
+
+		<c:if test="<%= gfurle.getType() == GroupFriendlyURLException.POSSIBLE_DUPLICATE %>">
+			<liferay-ui:message key="the-friendly-url-generated-by-the-email-address-you-requested-may-conflict-with-an-existing-friendly-url" />
+		</c:if>
+	</liferay-ui:error>
+
+	<liferay-ui:error exception="<%= RequiredFieldException.class %>" message="please-fill-out-all-required-fields" />
+	<liferay-ui:error exception="<%= ReservedUserEmailAddressException.class %>" message="the-email-address-you-requested-is-reserved" />
+	<liferay-ui:error exception="<%= UserEmailAddressException.class %>" message="please-enter-a-valid-email-address" />
+
+	<aui:fieldset column="<%= true %>">
+		<aui:col width="<%= 50 %>">
+			<aui:input model="<%= User.class %>" name="firstName" />
+
+			<c:if test="<%= PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.USERS_LAST_NAME_REQUIRED, PropsValues.USERS_LAST_NAME_REQUIRED) %>">
+				<aui:input model="<%= User.class %>" name="lastName">
+					<aui:validator name="required" />
+				</aui:input>
+			</c:if>
+
+			<aui:input autoFocus="<%= true %>" model="<%= User.class %>" name="emailAddress">
+				<c:if test="<%= PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.USERS_EMAIL_ADDRESS_REQUIRED, PropsValues.USERS_EMAIL_ADDRESS_REQUIRED) %>">
+					<aui:validator name="required" />
+				</c:if>
+			</aui:input>
+		</aui:col>
+
+		<aui:col width="<%= 50 %>">
+			<c:if test="<%= PropsValues.CAPTCHA_CHECK_PORTAL_CREATE_ACCOUNT %>">
+				<portlet:resourceURL var="captchaURL">
+					<portlet:param name="struts_action" value="/login/captcha" />
+				</portlet:resourceURL>
+
+				<liferay-ui:captcha url="<%= captchaURL %>" />
+			</c:if>
+		</aui:col>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<liferay-util:include page="/html/portlet/login/navigation.jsp" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/login/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/css/.sass-cache/main.css
new file mode 100644
index 0000000..d3bccea
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/css/.sass-cache/main.css
@@ -0,0 +1,21 @@
+.portlet-login .form fieldset {
+  border-width: 0;
+  margin-bottom: 0;
+  padding: 0; }
+.portlet-login .form .button-holder, .portlet-login .form .form-column {
+  margin-bottom: 10px; }
+.portlet-login .facebook-login-button .button-content {
+  background: url(@theme_image_path@/login/facebook_login_button.png) no-repeat scroll 0 50%;
+  padding: 5px 5px 5px 30px; }
+.portlet-login .facebook-login-button .button-input {
+  background: transparent none;
+  border-width: 0;
+  color: #FFF;
+  font-family: "lucida grande", Tahoma, Verdana, Arial, sans-serif;
+  padding: 0;
+  text-shadow: none; }
+.portlet-login .navigation {
+  background: #eee;
+  border-top: 1px solid #BFBFBF;
+  padding: 10px; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/login/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/css/main.css
new file mode 100644
index 0000000..8f6f401
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/css/main.css
@@ -0,0 +1,35 @@
+.portlet-login {
+	.form {
+		fieldset {
+			border-width: 0;
+			margin-bottom: 0;
+			padding: 0;
+		}
+
+		.button-holder, .form-column {
+			margin-bottom: 10px;
+		}
+	}
+
+	.facebook-login-button {
+		.button-content {
+			background: url(@theme_image_path@/login/facebook_login_button.png) no-repeat scroll 0 50%;
+			padding: 5px 5px 5px 30px;
+		}
+
+		.button-input {
+			background: transparent none;
+			border-width: 0;
+			color: #FFF;
+			font-family: "lucida grande", Tahoma, Verdana, Arial, sans-serif;
+			padding: 0;
+			text-shadow: none;
+		}
+	}
+
+	.navigation {
+		background: #eee;
+		border-top: 1px solid #BFBFBF;
+		padding: 10px;
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/login/forgot_password.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/forgot_password.jsp
new file mode 100644
index 0000000..a1d2b92
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/forgot_password.jsp
@@ -0,0 +1,153 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/login/init.jsp" %>
+
+<%
+User user2 = (User)request.getAttribute(WebKeys.FORGOT_PASSWORD_REMINDER_USER);
+
+if (Validator.isNull(authType)) {
+	authType = company.getAuthType();
+}
+
+Integer reminderAttempts = (Integer)portletSession.getAttribute(WebKeys.FORGOT_PASSWORD_REMINDER_ATTEMPTS);
+
+if (reminderAttempts == null) {
+	reminderAttempts = 0;
+}
+%>
+
+<portlet:actionURL var="forgotPasswordURL">
+	<portlet:param name="struts_action" value="/login/forgot_password" />
+</portlet:actionURL>
+
+<aui:form action="<%= forgotPasswordURL %>" method="post" name="fm">
+	<aui:input name="saveLastPath" type="hidden" value="<%= false %>" />
+
+	<portlet:renderURL var="redirectURL" />
+
+	<aui:input name="redirect" type="hidden" value="<%= redirectURL %>" />
+
+	<liferay-ui:error exception="<%= CaptchaTextException.class %>" message="text-verification-failed" />
+
+	<liferay-ui:error exception="<%= NoSuchUserException.class %>" message='<%= "the-" + TextFormatter.format(authType, TextFormatter.K) + "-you-requested-is-not-registered-in-our-database" %>' />
+	<liferay-ui:error exception="<%= RequiredReminderQueryException.class %>" message="you-have-not-configured-a-reminder-query" />
+	<liferay-ui:error exception="<%= SendPasswordException.class %>" message="your-password-can-only-be-sent-to-an-external-email-address" />
+	<liferay-ui:error exception="<%= UserActiveException.class %>" message="your-account-is-not-active" />
+	<liferay-ui:error exception="<%= UserEmailAddressException.class %>" message="please-enter-a-valid-email-address" />
+	<liferay-ui:error exception="<%= UserReminderQueryException.class %>" message="your-answer-does-not-match-what-is-in-our-database" />
+
+	<aui:fieldset>
+		<c:choose>
+			<c:when test="<%= user2 == null %>">
+
+				<%
+				String loginParameter = null;
+				String loginLabel = null;
+
+				if (authType.equals(CompanyConstants.AUTH_TYPE_EA)) {
+					loginParameter = "emailAddress";
+					loginLabel = "email-address";
+				}
+				else if (authType.equals(CompanyConstants.AUTH_TYPE_SN)) {
+					loginParameter = "screenName";
+					loginLabel = "screen-name";
+				}
+				else if (authType.equals(CompanyConstants.AUTH_TYPE_ID)) {
+					loginParameter = "userId";
+					loginLabel = "id";
+				}
+
+				String loginValue = ParamUtil.getString(request, loginParameter);
+				%>
+
+				<aui:input name="step" type="hidden" value="1" />
+
+				<aui:input label="<%= loginLabel %>" name="<%= loginParameter %>" size="30" type="text" value="<%= loginValue %>">
+					<aui:validator name="required" />
+				</aui:input>
+
+				<c:if test="<%= PropsValues.CAPTCHA_CHECK_PORTAL_SEND_PASSWORD %>">
+					<portlet:resourceURL var="captchaURL">
+						<portlet:param name="struts_action" value="/login/captcha" />
+					</portlet:resourceURL>
+
+					<liferay-ui:captcha url="<%= captchaURL %>" />
+				</c:if>
+
+				<aui:button-row>
+					<aui:button type="submit" value='<%= PropsValues.USERS_REMINDER_QUERIES_ENABLED ? "next" : "send-new-password" %>' />
+				</aui:button-row>
+
+			</c:when>
+			<c:when test="<%= (user2 != null) && Validator.isNotNull(user2.getEmailAddress()) %>">
+				<aui:input name="step" type="hidden" value="2" />
+				<aui:input name="emailAddress" type="hidden" value="<%= user2.getEmailAddress() %>" />
+
+				<c:if test="<%= Validator.isNotNull(user2.getReminderQueryQuestion()) && Validator.isNotNull(user2.getReminderQueryAnswer()) %>">
+
+					<%
+					String login = null;
+
+					if (authType.equals(CompanyConstants.AUTH_TYPE_EA)) {
+						login = user2.getEmailAddress();
+					}
+					else if (authType.equals(CompanyConstants.AUTH_TYPE_SN)) {
+						login = user2.getScreenName();
+					}
+					else if (authType.equals(CompanyConstants.AUTH_TYPE_ID)) {
+						login = String.valueOf(user2.getUserId());
+					}
+					%>
+
+					<div class="alert alert-info">
+						<%= LanguageUtil.format(pageContext, "a-new-password-will-be-sent-to-x-if-you-can-correctly-answer-the-following-question", login) %>
+					</div>
+
+					<aui:input autoFocus="<%= true %>" label="<%= HtmlUtil.escape(user2.getReminderQueryQuestion()) %>" name="answer" type="text" />
+				</c:if>
+
+				<c:choose>
+					<c:when test="<%= PropsValues.USERS_REMINDER_QUERIES_REQUIRED && !user2.hasReminderQuery() %>">
+						<div class="alert alert-info">
+							<liferay-ui:message key="the-password-cannot-be-reset-because-you-have-not-configured-a-reminder-query" />
+						</div>
+					</c:when>
+					<c:otherwise>
+						<c:if test="<%= reminderAttempts >= 3 %>">
+							<portlet:resourceURL var="captchaURL">
+								<portlet:param name="struts_action" value="/login/captcha" />
+							</portlet:resourceURL>
+
+							<liferay-ui:captcha url="<%= captchaURL %>" />
+						</c:if>
+
+						<aui:button-row>
+							<aui:button type="submit" value='<%= company.isSendPasswordResetLink() ? "send-password-reset-link" : "send-new-password" %>' />
+						</aui:button-row>
+					</c:otherwise>
+				</c:choose>
+			</c:when>
+			<c:otherwise>
+				<div class="alert alert-block">
+					<liferay-ui:message key="the-system-cannot-send-you-a-new-password-because-you-have-not-provided-an-email-address" />
+				</div>
+			</c:otherwise>
+		</c:choose>
+	</aui:fieldset>
+</aui:form>
+
+<liferay-util:include page="/html/portlet/login/navigation.jsp" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/login/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/login/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/init.jsp
new file mode 100644
index 0000000..bf3bbca
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/init.jsp
@@ -0,0 +1,67 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.AddressCityException" %><%@
+page import="com.liferay.portal.AddressStreetException" %><%@
+page import="com.liferay.portal.AddressZipException" %><%@
+page import="com.liferay.portal.CompanyMaxUsersException" %><%@
+page import="com.liferay.portal.ContactFirstNameException" %><%@
+page import="com.liferay.portal.ContactFullNameException" %><%@
+page import="com.liferay.portal.ContactLastNameException" %><%@
+page import="com.liferay.portal.CookieNotSupportedException" %><%@
+page import="com.liferay.portal.DuplicateOpenIdException" %><%@
+page import="com.liferay.portal.DuplicateUserEmailAddressException" %><%@
+page import="com.liferay.portal.DuplicateUserIdException" %><%@
+page import="com.liferay.portal.DuplicateUserScreenNameException" %><%@
+page import="com.liferay.portal.EmailAddressException" %><%@
+page import="com.liferay.portal.GroupFriendlyURLException" %><%@
+page import="com.liferay.portal.NoSuchCountryException" %><%@
+page import="com.liferay.portal.NoSuchListTypeException" %><%@
+page import="com.liferay.portal.NoSuchRegionException" %><%@
+page import="com.liferay.portal.PasswordExpiredException" %><%@
+page import="com.liferay.portal.PhoneNumberException" %><%@
+page import="com.liferay.portal.RequiredFieldException" %><%@
+page import="com.liferay.portal.RequiredReminderQueryException" %><%@
+page import="com.liferay.portal.ReservedUserEmailAddressException" %><%@
+page import="com.liferay.portal.ReservedUserIdException" %><%@
+page import="com.liferay.portal.ReservedUserScreenNameException" %><%@
+page import="com.liferay.portal.SendPasswordException" %><%@
+page import="com.liferay.portal.TermsOfUseException" %><%@
+page import="com.liferay.portal.UserActiveException" %><%@
+page import="com.liferay.portal.UserEmailAddressException" %><%@
+page import="com.liferay.portal.UserIdException" %><%@
+page import="com.liferay.portal.UserLockoutException" %><%@
+page import="com.liferay.portal.UserPasswordException" %><%@
+page import="com.liferay.portal.UserReminderQueryException" %><%@
+page import="com.liferay.portal.UserScreenNameException" %><%@
+page import="com.liferay.portal.WebsiteURLException" %><%@
+page import="com.liferay.portal.kernel.facebook.FacebookConnectUtil" %><%@
+page import="com.liferay.portal.security.auth.AuthException" %><%@
+page import="com.liferay.portal.util.OpenIdUtil" %><%@
+page import="com.liferay.portlet.login.util.LoginUtil" %>
+
+<%@ page import="org.openid4java.association.AssociationException" %><%@
+page import="org.openid4java.consumer.ConsumerException" %><%@
+page import="org.openid4java.discovery.DiscoveryException" %><%@
+page import="org.openid4java.message.MessageException" %>
+
+<%
+String authType = portletPreferences.getValue("authType", StringPool.BLANK);
+%>
+
+<%@ include file="/html/portlet/login/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/login/login.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/login.jsp
new file mode 100644
index 0000000..88ce006
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/login.jsp
@@ -0,0 +1,164 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/login/init.jsp" %>
+
+<c:choose>
+	<c:when test="<%= themeDisplay.isSignedIn() %>">
+
+		<%
+		String signedInAs = HtmlUtil.escape(user.getFullName());
+
+		if (themeDisplay.isShowMyAccountIcon() && (themeDisplay.getURLMyAccount() != null)) {
+			String myAccountURL = String.valueOf(themeDisplay.getURLMyAccount());
+
+			if (PropsValues.DOCKBAR_ADMINISTRATIVE_LINKS_SHOW_IN_POP_UP) {
+				signedInAs = "<a href=\"javascript:Liferay.Util.openWindow({dialog: {destroyOnHide: true}, title: '" + LanguageUtil.get(pageContext, "my-account") + "', uri: '" + HtmlUtil.escape(myAccountURL) + "'});\">" + signedInAs + "</a>";
+			}
+			else {
+				myAccountURL = HttpUtil.setParameter(myAccountURL, "controlPanelCategory", PortletCategoryKeys.MY);
+
+				signedInAs = "<a href=\"" + HtmlUtil.escape(myAccountURL) + "\">" + signedInAs + "</a>";
+			}
+		}
+		%>
+
+		<%= LanguageUtil.format(pageContext, "you-are-signed-in-as-x", signedInAs, false) %>
+	</c:when>
+	<c:otherwise>
+
+		<%
+		String redirect = ParamUtil.getString(request, "redirect");
+
+		String login = LoginUtil.getLogin(request, "login", company);
+		String password = StringPool.BLANK;
+		boolean rememberMe = ParamUtil.getBoolean(request, "rememberMe");
+
+		if (Validator.isNull(authType)) {
+			authType = company.getAuthType();
+		}
+		%>
+
+		<portlet:actionURL secure="<%= PropsValues.COMPANY_SECURITY_AUTH_REQUIRES_HTTPS || request.isSecure() %>" var="loginURL">
+			<portlet:param name="struts_action" value="/login/login" />
+		</portlet:actionURL>
+
+		<aui:form action="<%= loginURL %>" autocomplete='<%= PropsValues.COMPANY_SECURITY_LOGIN_FORM_AUTOCOMPLETE ? "on" : "off" %>' cssClass="sign-in-form" method="post" name="fm">
+			<aui:input name="saveLastPath" type="hidden" value="<%= false %>" />
+			<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+			<aui:input name="doActionAfterLogin" type="hidden" value="<%= portletName.equals(PortletKeys.FAST_LOGIN) ? true : false %>" />
+
+			<c:choose>
+				<c:when test='<%= SessionMessages.contains(request, "userAdded") %>'>
+
+					<%
+					String userEmailAddress = (String)SessionMessages.get(request, "userAdded");
+					String userPassword = (String)SessionMessages.get(request, "userAddedPassword");
+					%>
+
+					<div class="alert alert-success">
+						<c:choose>
+							<c:when test="<%= company.isStrangersVerify() || Validator.isNull(userPassword) %>">
+								<%= LanguageUtil.get(pageContext, "thank-you-for-creating-an-account") %>
+
+								<c:if test="<%= company.isStrangersVerify() %>">
+									<%= LanguageUtil.format(pageContext, "your-email-verification-code-has-been-sent-to-x", userEmailAddress) %>
+								</c:if>
+							</c:when>
+							<c:otherwise>
+								<%= LanguageUtil.format(pageContext, "thank-you-for-creating-an-account.-your-password-is-x", userPassword, false) %>
+							</c:otherwise>
+						</c:choose>
+
+						<c:if test="<%= PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.ADMIN_EMAIL_USER_ADDED_ENABLED) %>">
+							<%= LanguageUtil.format(pageContext, "your-password-has-been-sent-to-x", userEmailAddress) %>
+						</c:if>
+					</div>
+				</c:when>
+				<c:when test='<%= SessionMessages.contains(request, "userPending") %>'>
+
+					<%
+					String userEmailAddress = (String)SessionMessages.get(request, "userPending");
+					%>
+
+					<div class="alert alert-success">
+						<%= LanguageUtil.format(pageContext, "thank-you-for-creating-an-account.-you-will-be-notified-via-email-at-x-when-your-account-has-been-approved", userEmailAddress) %>
+					</div>
+				</c:when>
+			</c:choose>
+
+			<liferay-ui:error exception="<%= AuthException.class %>" message="authentication-failed" />
+			<liferay-ui:error exception="<%= CompanyMaxUsersException.class %>" message="unable-to-login-because-the-maximum-number-of-users-has-been-reached" />
+			<liferay-ui:error exception="<%= CookieNotSupportedException.class %>" message="authentication-failed-please-enable-browser-cookies" />
+			<liferay-ui:error exception="<%= NoSuchUserException.class %>" message="authentication-failed" />
+			<liferay-ui:error exception="<%= PasswordExpiredException.class %>" message="your-password-has-expired" />
+			<liferay-ui:error exception="<%= UserEmailAddressException.class %>" message="authentication-failed" />
+			<liferay-ui:error exception="<%= UserLockoutException.class %>" message="this-account-has-been-locked" />
+			<liferay-ui:error exception="<%= UserPasswordException.class %>" message="authentication-failed" />
+			<liferay-ui:error exception="<%= UserScreenNameException.class %>" message="authentication-failed" />
+
+			<aui:fieldset>
+
+				<%
+				String loginLabel = null;
+
+				if (authType.equals(CompanyConstants.AUTH_TYPE_EA)) {
+					loginLabel = "email-address";
+				}
+				else if (authType.equals(CompanyConstants.AUTH_TYPE_SN)) {
+					loginLabel = "screen-name";
+				}
+				else if (authType.equals(CompanyConstants.AUTH_TYPE_ID)) {
+					loginLabel = "id";
+				}
+				%>
+
+				<aui:input autoFocus="<%= windowState.equals(LiferayWindowState.EXCLUSIVE) || windowState.equals(WindowState.MAXIMIZED) %>" cssClass="clearable" label="<%= loginLabel %>" name="login" showRequiredLabel="<%= false %>" type="text" value="<%= login %>">
+					<aui:validator name="required" />
+				</aui:input>
+
+				<aui:input name="password" showRequiredLabel="<%= false %>" type="password" value="<%= password %>">
+					<aui:validator name="required" />
+				</aui:input>
+
+				<span id="<portlet:namespace />passwordCapsLockSpan" style="display: none;"><liferay-ui:message key="caps-lock-is-on" /></span>
+
+				<c:if test="<%= company.isAutoLogin() && !PropsValues.SESSION_DISABLED %>">
+					<aui:input checked="<%= rememberMe %>" name="rememberMe" type="checkbox" />
+				</c:if>
+			</aui:fieldset>
+
+			<aui:button-row>
+				<aui:button type="submit" value="sign-in" />
+			</aui:button-row>
+		</aui:form>
+
+		<liferay-util:include page="/html/portlet/login/navigation.jsp" />
+
+		<aui:script use="aui-base">
+			var password = A.one('#<portlet:namespace />password');
+
+			if (password) {
+				password.on(
+					'keypress',
+					function(event) {
+						Liferay.Util.showCapsLock(event, '<portlet:namespace />passwordCapsLockSpan');
+					}
+				);
+			}
+		</aui:script>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/login/login_redirect.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/login_redirect.jsp
new file mode 100644
index 0000000..41bf5b8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/login_redirect.jsp
@@ -0,0 +1,193 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/login/init.jsp" %>
+
+<%
+String emailAddress = ParamUtil.getString(request, "emailAddress");
+
+boolean anonymousAccount = ParamUtil.getBoolean(request, "anonymousUser");
+%>
+
+<c:if test="<%= anonymousAccount && company.isStrangers() %>">
+	<div class="hide lfr-message-response" id="<portlet:namespace />login-status-messages"></div>
+
+	<div class="anonymous-account">
+		<portlet:actionURL var="updateIncompleteUserURL">
+			<portlet:param name="struts_action" value="/login/create_anonymous_account" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UPDATE %>" />
+			<portlet:param name="emailAddress" value="<%= emailAddress %>" />
+		</portlet:actionURL>
+
+		<aui:form action="<%= updateIncompleteUserURL %>" method="post" name="fm">
+			<div class="alert alert-success">
+				<liferay-ui:message key="your-comment-has-already-been-posted.-would-you-like-to-create-an-account-with-the-provided-information" />
+			</div>
+
+			<aui:button onClick='<%= renderResponse.getNamespace() + "activateAccount();" %>' value="activate-account" />
+
+			<aui:button onClick='<%= renderResponse.getNamespace() + "closeDialog();" %>' value="cancel" />
+		</aui:form>
+	</div>
+</c:if>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />activateAccount',
+		function() {
+			var A = AUI();
+
+			var form = A.one(document.<portlet:namespace />fm);
+
+			var uri = form.getAttribute('action');
+
+			A.io.request(
+				uri,
+				{
+					dataType: 'json',
+					form: {
+						id: form
+					},
+					on: {
+						failure: function(event, id, obj) {
+							message = '<%= UnicodeLanguageUtil.get(pageContext, "your-request-failed-to-complete") %>';
+
+							<portlet:namespace />showStatusMessage('error', message);
+
+							A.one('.anonymous-account').hide();
+						},
+						success: function(event, id, obj) {
+							var response = this.get('responseData');
+
+							var exception = response.exception;
+
+							var message;
+
+							if (!exception) {
+								var userStatus = response.userStatus;
+
+								if (userStatus == 'user_added') {
+									message = '<%= UnicodeLanguageUtil.format(pageContext, "thank-you-for-creating-an-account-your-password-has-been-sent-to-x", new Object[] {emailAddress}) %>';
+								}
+								else if (userStatus == 'user_pending') {
+									message = '<%= UnicodeLanguageUtil.format(pageContext, "thank-you-for-creating-an-account.-you-will-be-notified-via-email-at-x-when-your-account-has-been-approved", new Object[] {emailAddress}) %>';
+								}
+
+								<portlet:namespace />showStatusMessage('success', message);
+
+								A.one('.anonymous-account').hide();
+							}
+							else {
+								message = '<%= UnicodeLanguageUtil.get(pageContext, "your-request-failed-to-complete") %>';
+
+								<portlet:namespace />showStatusMessage('error', message);
+
+								A.one('.anonymous-account').hide();
+							}
+						}
+					}
+				}
+			);
+		},
+		['aui-io']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />closeDialog',
+		function(type, message) {
+			var namespace = window.parent.namespace;
+
+			Liferay.fire(
+				'closeWindow',
+				{
+					id: namespace + "signInDialog"
+				}
+			);
+		},
+		['aui-base']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />showStatusMessage',
+		function(type, message) {
+			var A = AUI();
+
+			var messageContainer = A.one('#<portlet:namespace />login-status-messages');
+
+			messageContainer.removeClass('alert-error').removeClass('alert-success');
+
+			messageContainer.addClass('alert alert-' + type);
+
+			messageContainer.html(message);
+
+			messageContainer.show();
+		},
+		['aui-base']
+	);
+
+	<c:if test="<%= !company.isStrangers() %>">
+		<portlet:namespace />closeDialog();
+	</c:if>
+</aui:script>
+
+<aui:script use="aui-base">
+	if (window.opener) {
+		var namespace = window.opener.parent.namespace;
+		var randomNamespace = window.opener.parent.randomNamespace;
+
+		var afterLogin = window.opener.parent[randomNamespace + 'afterLogin'];
+
+		if (typeof(afterLogin) == 'function') {
+			afterLogin('<%= HtmlUtil.escape(emailAddress) %>', <%= anonymousAccount %>);
+
+			if (<%= !anonymousAccount %>) {
+				window.opener.parent.Liferay.fire(
+					'closeWindow',
+					{
+						id: namespace + "signInDialog"
+					}
+				);
+
+				window.close();
+			}
+		}
+		else {
+			window.opener.parent.location.href = "<%= HtmlUtil.escapeJS(PortalUtil.getPortalURL(renderRequest) + themeDisplay.getURLSignIn()) %>";
+
+			window.close();
+		}
+	}
+	else {
+		var namespace = window.parent.namespace;
+		var randomNamespace = window.parent.randomNamespace;
+
+		var afterLogin = window.parent[randomNamespace + 'afterLogin'];
+
+		afterLogin('<%= HtmlUtil.escape(emailAddress) %>', <%= anonymousAccount %>);
+
+		if (<%= !anonymousAccount %>) {
+			Liferay.fire(
+				'closeWindow',
+				{
+					id: namespace + "signInDialog"
+				}
+			);
+		}
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/login/navigation.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/navigation.jsp
new file mode 100644
index 0000000..ed6c903
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/navigation.jsp
@@ -0,0 +1,57 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/login/init.jsp" %>
+
+<liferay-util:buffer var="navigation">
+	<liferay-ui:icon-list>
+
+		<%
+		for (String section : PropsValues.LOGIN_FORM_NAVIGATION_PRE) {
+		%>
+
+			<liferay-util:include page='<%= "/html/portlet/login/navigation/" + _getSectionJsp(section) + ".jsp" %>' portletId="<%= portletDisplay.getRootPortletId() %>" />
+
+		<%
+		}
+
+		for (String section : PropsValues.LOGIN_FORM_NAVIGATION_POST) {
+		%>
+
+			<liferay-util:include page='<%= "/html/portlet/login/navigation/" + _getSectionJsp(section) + ".jsp" %>' portletId="<%= portletDisplay.getRootPortletId() %>" />
+
+		<%
+		}
+		%>
+
+	</liferay-ui:icon-list>
+</liferay-util:buffer>
+
+<%
+navigation = navigation.trim();
+%>
+
+<c:if test="<%= Validator.isNotNull(navigation) %>">
+	<div class="navigation">
+		<%= navigation %>
+	</div>
+</c:if>
+
+<%!
+private String _getSectionJsp(String name) {
+	return TextFormatter.format(name, TextFormatter.N);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/login/navigation/anonymous.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/navigation/anonymous.jsp
new file mode 100644
index 0000000..4c0ca7f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/navigation/anonymous.jsp
@@ -0,0 +1,39 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/login/init.jsp" %>
+
+<%
+String strutsAction = ParamUtil.getString(request, "struts_action");
+
+boolean showAnonymousIcon = false;
+
+if (!strutsAction.startsWith("/login/create_anonymous_account") && portletName.equals(PortletKeys.FAST_LOGIN)) {
+	showAnonymousIcon = true;
+}
+%>
+
+<c:if test="<%= showAnonymousIcon %>">
+	<portlet:renderURL var="anonymousURL">
+		<portlet:param name="struts_action" value="/login/create_anonymous_account" />
+	</portlet:renderURL>
+
+	<liferay-ui:icon
+		message="guest"
+		src='<%= themeDisplay.getPathThemeImages() + "/common/user_icon.png" %>'
+		url="<%= anonymousURL %>"
+	/>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/login/navigation/create_account.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/navigation/create_account.jsp
new file mode 100644
index 0000000..c9bbca2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/navigation/create_account.jsp
@@ -0,0 +1,35 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/login/init.jsp" %>
+
+<%
+String strutsAction = ParamUtil.getString(request, "struts_action");
+
+boolean showCreateAccountIcon = false;
+
+if (!strutsAction.equals("/login/create_account") && company.isStrangers() && !portletName.equals(PortletKeys.FAST_LOGIN)) {
+	showCreateAccountIcon = true;
+}
+%>
+
+<c:if test="<%= showCreateAccountIcon %>">
+	<liferay-ui:icon
+		image="add_user"
+		message="create-account"
+		url="<%= PortalUtil.getCreateAccountURL(request, themeDisplay) %>"
+	/>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/login/navigation/facebook.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/navigation/facebook.jsp
new file mode 100644
index 0000000..0dea3f2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/navigation/facebook.jsp
@@ -0,0 +1,53 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/login/init.jsp" %>
+
+<%
+String strutsAction = ParamUtil.getString(request, "struts_action");
+
+boolean showFacebookConnectIcon = false;
+
+if (!strutsAction.startsWith("/login/facebook_connect") && FacebookConnectUtil.isEnabled(company.getCompanyId())) {
+	showFacebookConnectIcon = true;
+}
+%>
+
+<c:if test="<%= showFacebookConnectIcon %>">
+	<portlet:renderURL var="loginRedirectURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+		<portlet:param name="struts_action" value="/login/login_redirect" />
+	</portlet:renderURL>
+
+	<%
+	String facebookAuthRedirectURL = FacebookConnectUtil.getRedirectURL(themeDisplay.getCompanyId());
+
+	facebookAuthRedirectURL = HttpUtil.addParameter(facebookAuthRedirectURL, "redirect", HttpUtil.encodeURL(loginRedirectURL.toString()));
+
+	String facebookAuthURL = FacebookConnectUtil.getAuthURL(themeDisplay.getCompanyId());
+
+	facebookAuthURL = HttpUtil.addParameter(facebookAuthURL, "client_id", FacebookConnectUtil.getAppId(themeDisplay.getCompanyId()));
+	facebookAuthURL = HttpUtil.addParameter(facebookAuthURL, "redirect_uri", facebookAuthRedirectURL);
+	facebookAuthURL = HttpUtil.addParameter(facebookAuthURL, "scope", "email");
+
+	String taglibOpenFacebookConnectLoginWindow = "javascript:var facebookConnectLoginWindow = window.open('" + facebookAuthURL.toString() + "', 'facebook', 'align=center,directories=no,height=560,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=1000'); void(''); facebookConnectLoginWindow.focus();";
+	%>
+
+	<liferay-ui:icon
+		image="../social_bookmarks/facebook"
+		message="facebook"
+		url="<%= taglibOpenFacebookConnectLoginWindow %>"
+	/>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/login/navigation/forgot_password.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/navigation/forgot_password.jsp
new file mode 100644
index 0000000..8de6281
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/navigation/forgot_password.jsp
@@ -0,0 +1,39 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/login/init.jsp" %>
+
+<%
+String strutsAction = ParamUtil.getString(request, "struts_action");
+
+boolean showForgotPasswordIcon = false;
+
+if (!strutsAction.equals("/login/forgot_password") && (company.isSendPassword() || company.isSendPasswordResetLink())) {
+	showForgotPasswordIcon = true;
+}
+%>
+
+<c:if test="<%= showForgotPasswordIcon %>">
+	<portlet:renderURL var="forgotPasswordURL">
+		<portlet:param name="struts_action" value="/login/forgot_password" />
+	</portlet:renderURL>
+
+	<liferay-ui:icon
+		image="help"
+		message="forgot-password"
+		url="<%= forgotPasswordURL %>"
+	/>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/login/navigation/open_id.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/navigation/open_id.jsp
new file mode 100644
index 0000000..55a6c87
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/navigation/open_id.jsp
@@ -0,0 +1,39 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/login/init.jsp" %>
+
+<%
+String strutsAction = ParamUtil.getString(request, "struts_action");
+
+boolean showOpenIdIcon = false;
+
+if (!strutsAction.equals("/login/open_id") && OpenIdUtil.isEnabled(company.getCompanyId())) {
+	showOpenIdIcon = true;
+}
+%>
+
+<c:if test="<%= showOpenIdIcon %>">
+	<portlet:renderURL var="openIdURL">
+		<portlet:param name="struts_action" value="/login/open_id" />
+	</portlet:renderURL>
+
+	<liferay-ui:icon
+		message="open-id"
+		src='<%= themeDisplay.getPathThemeImages() + "/common/openid.gif" %>'
+		url="<%= openIdURL %>"
+	/>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/login/navigation/sign_in.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/navigation/sign_in.jsp
new file mode 100644
index 0000000..7617ce7
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/navigation/sign_in.jsp
@@ -0,0 +1,44 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/login/init.jsp" %>
+
+<%
+String strutsAction = ParamUtil.getString(request, "struts_action");
+
+boolean showSignInIcon = false;
+
+if (Validator.isNotNull(strutsAction) && !strutsAction.equals("/login/login")) {
+	showSignInIcon = true;
+}
+%>
+
+<c:if test="<%= showSignInIcon %>">
+
+	<%
+	String signInURL = themeDisplay.getURLSignIn();
+
+	if (portletName.equals(PortletKeys.FAST_LOGIN)) {
+		signInURL = HttpUtil.addParameter(signInURL, "windowState", LiferayWindowState.POP_UP.toString());
+	}
+	%>
+
+	<liferay-ui:icon
+		image="status_online"
+		message="sign-in"
+		url="<%= signInURL %>"
+	/>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/login/open_id.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/open_id.jsp
new file mode 100644
index 0000000..37e8a80
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/open_id.jsp
@@ -0,0 +1,46 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/login/init.jsp" %>
+
+<%
+String openId = ParamUtil.getString(request, "openId");
+%>
+
+<portlet:actionURL var="openIdURL">
+	<portlet:param name="struts_action" value="/login/open_id" />
+</portlet:actionURL>
+
+<aui:form action="<%= openIdURL %>" method="post" name="fm">
+	<aui:input name="saveLastPath" type="hidden" value="<%= false %>" />
+
+	<liferay-ui:error exception="<%= AssociationException.class %>" message="an-error-occurred-while-establishing-an-association-with-the-open-id-provider" />
+	<liferay-ui:error exception="<%= ConsumerException.class %>" message="an-error-occurred-while-initializing-the-open-id-consumer" />
+	<liferay-ui:error exception="<%= DiscoveryException.class %>" message="an-error-occurred-while-discovering-the-open-id-provider" />
+	<liferay-ui:error exception="<%= DuplicateOpenIdException.class %>" message="a-user-with-that-open-id-already-exists" />
+	<liferay-ui:error exception="<%= DuplicateUserEmailAddressException.class %>" message="the-email-address-associated-with-your-open-id-account-is-already-being-used" />
+	<liferay-ui:error exception="<%= MessageException.class %>" message="an-error-occurred-while-communicating-with-the-open-id-provider" />
+
+	<aui:fieldset>
+		<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" cssClass="openid-login" name="openId" type="text" value="<%= openId %>" />
+
+		<aui:button-row>
+			<aui:button type="submit" value="sign-in" />
+		</aui:button-row>
+	</aui:fieldset>
+</aui:form>
+
+<liferay-util:include page="/html/portlet/login/navigation.jsp" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/login/update_account.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/update_account.jsp
new file mode 100644
index 0000000..605d098
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/login/update_account.jsp
@@ -0,0 +1,115 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/login/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+User selUser = null;
+
+Contact selContact = null;
+
+long userId = ParamUtil.getLong(request, "userId");
+
+if (userId > 0) {
+	selUser = UserLocalServiceUtil.getUser(userId);
+
+	if (selUser.getStatus() != WorkflowConstants.STATUS_INCOMPLETE) {
+		throw new PrincipalException();
+	}
+
+	selContact = selUser.getContact();
+}
+
+String screenName = BeanParamUtil.getString(selUser, request, "screenName");
+String emailAddress = BeanParamUtil.getString(selUser, request, "emailAddress");
+String openId = BeanParamUtil.getString(selUser, request, "openId");
+String firstName = BeanParamUtil.getString(selUser, request, "firstName");
+String middleName = BeanParamUtil.getString(selUser, request, "middleName");
+String lastName = BeanParamUtil.getString(selUser, request, "lastName");
+int prefixId = BeanParamUtil.getInteger(selContact, request, "prefixId");
+int suffixId = BeanParamUtil.getInteger(selContact, request, "suffixId");
+
+Calendar birthdayCalendar = CalendarFactoryUtil.getCalendar();
+
+int birthdayDay = ParamUtil.getInteger(request, "birthdayDay");
+int birthdayMonth = ParamUtil.getInteger(request, "birthdayMonth");
+int birthdayYear = ParamUtil.getInteger(request, "birthdayYear");
+
+Date birthdayDate = PortalUtil.getDate(birthdayMonth, birthdayDay, birthdayYear);
+
+if (birthdayDate != null) {
+	birthdayCalendar.setTime(birthdayDate);
+}
+else if (selUser != null) {
+	birthdayCalendar.setTime(selContact.getBirthday());
+}
+
+boolean male = BeanParamUtil.getBoolean(selUser, request, "male", true);
+String jobTitle = BeanParamUtil.getString(selUser, request, "jobTitle");
+%>
+
+<div class="anonymous-account">
+	<portlet:actionURL var="createAccountURL">
+		<portlet:param name="struts_action" value="/login/create_account" />
+	</portlet:actionURL>
+
+	<aui:form action="<%= createAccountURL %>" method="post" name="fm">
+		<aui:input name="saveLastPath" type="hidden" value="<%= false %>" />
+		<aui:input name="<%= Constants.CMD %>" type="hidden" />
+
+		<c:if test="<%= Validator.isNotNull(redirect) %>">
+			<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+		</c:if>
+
+		<aui:input name="screenName" type="hidden" value="<%= screenName %>" />
+		<aui:input name="emailAddress" type="hidden" value="<%= emailAddress %>" />
+		<aui:input name="openId" type="hidden" value="<%= openId %>" />
+		<aui:input name="firstName" type="hidden" value="<%= firstName %>" />
+		<aui:input name="middleName" type="hidden" value="<%= middleName %>" />
+		<aui:input name="lastName" type="hidden" value="<%= lastName %>" />
+		<aui:input name="prefixId" type="hidden" value="<%= String.valueOf(prefixId) %>" />
+		<aui:input name="suffixId" type="hidden" value="<%= String.valueOf(suffixId) %>" />
+		<aui:input name="male" type="hidden" value="<%= String.valueOf(male) %>" />
+		<aui:input name="birthdayDay" type="hidden" value="<%= String.valueOf(birthdayCalendar.get(Calendar.DAY_OF_MONTH)) %>" />
+		<aui:input name="birthdayMonth" type="hidden" value="<%= String.valueOf(birthdayCalendar.get(Calendar.MONTH)) %>" />
+		<aui:input name="birthdayYear" type="hidden" value="<%= String.valueOf(birthdayCalendar.get(Calendar.YEAR)) %>" />
+		<aui:input name="jobTitle" type="hidden" value="<%= jobTitle %>" />
+	</aui:form>
+
+	<div class="alert alert-block">
+		<liferay-ui:message arguments="<%= emailAddress %>" key="an-account-with-x-as-the-email-address-already-exists-in-the-portal.-do-you-want-to-associate-this-activity-with-that-account" />
+	</div>
+
+	<aui:button name="updateUser" onClick='<%= renderResponse.getNamespace() + "updateUser();" %>' value="associate-account" />
+
+	<aui:button name="resetUser" onClick='<%= renderResponse.getNamespace() + "resetUser();" %>' value="create-new-account" />
+</div>
+
+<aui:script>
+	function <portlet:namespace />resetUser() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.RESET %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />updateUser() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.UPDATE %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/asset/abstract.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/asset/abstract.jsp
new file mode 100644
index 0000000..6b6bc80
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/asset/abstract.jsp
@@ -0,0 +1,32 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+int abstractLength = (Integer)request.getAttribute(WebKeys.ASSET_PUBLISHER_ABSTRACT_LENGTH);
+
+MBMessage message = (MBMessage)request.getAttribute(WebKeys.MESSAGE_BOARDS_MESSAGE);
+
+String summary = StringUtil.shorten(message.getBody(), abstractLength);
+
+if (message.isFormatBBCode()) {
+	summary = BBCodeTranslatorUtil.getHTML(summary);
+	summary = StringUtil.replace(summary, "@theme_images_path@/emoticons", themeDisplay.getPathThemeImages() + "/emoticons");
+}
+%>
+
+<%= summary %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/asset/discussion_abstract.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/asset/discussion_abstract.jsp
new file mode 100644
index 0000000..f1ddb38
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/asset/discussion_abstract.jsp
@@ -0,0 +1,27 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+int abstractLength = (Integer)request.getAttribute(WebKeys.ASSET_PUBLISHER_ABSTRACT_LENGTH);
+
+MBMessage message = (MBMessage)request.getAttribute(WebKeys.MESSAGE_BOARDS_MESSAGE);
+
+String summary = StringUtil.shorten(message.getBody(), abstractLength);
+%>
+
+<%= HtmlUtil.escape(summary) %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/asset/discussion_full_content.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/asset/discussion_full_content.jsp
new file mode 100644
index 0000000..2c949ed
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/asset/discussion_full_content.jsp
@@ -0,0 +1,76 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+String randomNamespace = PortalUtil.generateRandomKey(request, "discussion_full_content") + StringPool.UNDERLINE;
+
+MBMessage message = (MBMessage)request.getAttribute(WebKeys.MESSAGE_BOARDS_MESSAGE);
+
+MBThread thread = message.getThread();
+
+MBMessage rootMessage = MBMessageLocalServiceUtil.getMessage(thread.getRootMessageId());
+MBMessage parentMessage = MBMessageLocalServiceUtil.getMessage(message.getParentMessageId());
+%>
+
+<table class="lfr-grid lfr-table">
+<tr>
+	<td colspan="2" id="<%= randomNamespace %>messageScroll<%= message.getMessageId() %>">
+		<a name="<%= randomNamespace %>message_<%= message.getMessageId() %>"></a>
+	</td>
+</tr>
+<tr>
+	<td class="lfr-center lfr-top">
+		<liferay-ui:user-display
+			displayStyle="<%= 2 %>"
+			userId="<%= message.getUserId() %>"
+			userName="<%= HtmlUtil.escape(message.getUserName()) %>"
+		/>
+	</td>
+	<td class="lfr-top stretch">
+		<c:if test="<%= (message != null) && !message.isApproved() %>">
+			<aui:model-context bean="<%= message %>" model="<%= MBMessage.class %>" />
+
+			<div>
+				<aui:workflow-status status="<%= message.getStatus() %>" />
+			</div>
+		</c:if>
+
+		<div>
+			<%= message.getBody() %>
+		</div>
+
+		<br />
+
+		<div>
+			<c:if test="<%= message.getParentMessageId() == rootMessage.getMessageId() %>">
+				<%= LanguageUtil.format(pageContext, "posted-on-x", dateFormatDateTime.format(message.getModifiedDate())) %>
+			</c:if>
+		</div>
+	</td>
+</tr>
+</table>
+
+<c:if test="<%= (parentMessage != null) && !parentMessage.isRoot() %>">
+	<h3><liferay-ui:message key="replying-to" />:</h3>
+
+	<%
+	request.setAttribute(WebKeys.MESSAGE_BOARDS_MESSAGE, parentMessage);
+	%>
+
+	<liferay-util:include page="/html/portlet/message_boards/asset/discussion_full_content.jsp" />
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/asset/full_content.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/asset/full_content.jsp
new file mode 100644
index 0000000..5ad0202
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/asset/full_content.jsp
@@ -0,0 +1,52 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+MBMessage message = (MBMessage)request.getAttribute(WebKeys.MESSAGE_BOARDS_MESSAGE);
+
+request.setAttribute("edit_message.jsp-category", message.getCategory());
+request.setAttribute("edit_message.jsp-className", message.getClassName());
+request.setAttribute("edit_message.jsp-depth", 0);
+request.setAttribute("edit_message.jsp-editable", Boolean.FALSE);
+request.setAttribute("edit_message.jsp-message", message);
+request.setAttribute("edit-message.jsp-showPermanentLink", Boolean.FALSE);
+request.setAttribute("edit_message.jsp-thread", message.getThread());
+%>
+
+<liferay-util:include page="/html/portlet/message_boards/view_thread_message.jsp" />
+
+<c:if test="<%= portletName.equals(PortletKeys.TRASH) %>">
+
+	<%
+	MBThread thread = message.getThread();
+
+	PortletURL viewContentURL = renderResponse.createRenderURL();
+
+	viewContentURL.setParameter("struts_action", "/trash/view_content");
+	viewContentURL.setParameter("redirect", currentURL);
+	viewContentURL.setParameter("className", MBThread.class.getName());
+	viewContentURL.setParameter("classPK", String.valueOf(thread.getPrimaryKey()));
+	viewContentURL.setParameter("showActions", Boolean.FALSE.toString());
+	viewContentURL.setParameter("showAssetMetadata", Boolean.TRUE.toString());
+	viewContentURL.setParameter("showEditURL", Boolean.FALSE.toString());
+	%>
+
+	<div class="asset-more">
+		<a href="<%= viewContentURL.toString() %>"><liferay-ui:message key="view-in-context" /> &raquo;</a>
+	</div>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/ban_user_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/ban_user_action.jsp
new file mode 100644
index 0000000..f7e0c87
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/ban_user_action.jsp
@@ -0,0 +1,40 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+MBBan ban = (MBBan)row.getObject();
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= MBPermission.contains(permissionChecker, scopeGroupId, ActionKeys.BAN_USER) %>">
+		<portlet:actionURL var="unbanUserURL">
+			<portlet:param name="struts_action" value="/message_boards/ban_user" />
+			<portlet:param name="<%= Constants.CMD %>" value="unban" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="banUserId" value="<%= String.valueOf(ban.getBanUserId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon
+			image="../message_boards/unban_user"
+			message="unban-this-user"
+			url="<%= unbanUserURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/bbcode_editor.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/bbcode_editor.jspf
new file mode 100644
index 0000000..3a05f62
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/bbcode_editor.jspf
@@ -0,0 +1,56 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+Map<String,String> configParams = new HashMap();
+
+configParams.put("emoticonsPath", themeDisplay.getPathThemeImages() + "/emoticons");
+
+if (quote && Validator.isNull(body) && (curParentMessage != null)) {
+	StringBundler sb = new StringBundler(5);
+
+	sb.append("[quote=");
+	sb.append(StringUtil.replace(parentAuthor, new String[] {"[", "]", "(", ")"}, new String[] {"&#91;", "&#93;", "&#40;", "&#41;"}));
+	sb.append("]");
+	sb.append(curParentMessage.getBody(false));
+	sb.append("[/quote]\n\n\n");
+
+	body = sb.toString();
+}
+else if (splitThread && Validator.isNull(body)) {
+	StringBundler sb = new StringBundler(5);
+
+	sb.append("[url=");
+	sb.append(MBThreadConstants.NEW_THREAD_URL);
+	sb.append("]");
+	sb.append(MBThreadConstants.NEW_THREAD_URL);
+	sb.append("[/url]");
+
+	body = LanguageUtil.format(pageContext, "the-new-thread-can-be-found-at-x", sb.toString(), false);
+}
+%>
+
+<liferay-ui:input-editor configParams="<%= configParams %>" editorImpl="<%= MBUtil.BB_CODE_EDITOR_WYSIWYG_IMPL_KEY %>" toolbarSet="bbcode" />
+
+<aui:script>
+	function <portlet:namespace />getHTML() {
+		return window.<portlet:namespace />editor.getHTML();
+	}
+
+	function <portlet:namespace />initEditor() {
+		return "<%= UnicodeFormatter.toString(body) %>";
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/cast_result.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/cast_result.jspf
new file mode 100644
index 0000000..645b30a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/cast_result.jspf
@@ -0,0 +1,30 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+MBThread thread = null;
+
+if (result instanceof AssetEntry) {
+	AssetEntry assetEntry = (AssetEntry)result;
+
+	MBMessage message = MBMessageLocalServiceUtil.getMessage(assetEntry.getClassPK());
+
+	thread = message.getThread();
+}
+else {
+	thread = (MBThread)result;
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/category_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/category_action.jsp
new file mode 100644
index 0000000..3d0aa98
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/category_action.jsp
@@ -0,0 +1,136 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+MBCategory category = (MBCategory)row.getObject();
+
+Set<Long> categorySubscriptionClassPKs = (Set<Long>)row.getParameter("categorySubscriptionClassPKs");
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= MBCategoryPermission.contains(permissionChecker, category, ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/message_boards/edit_category" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="mbCategoryId" value="<%= String.valueOf(category.getCategoryId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editURL %>"
+		/>
+
+		<portlet:renderURL var="moveURL">
+			<portlet:param name="struts_action" value="/message_boards/move_category" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="mbCategoryId" value="<%= String.valueOf(category.getCategoryId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="submit"
+			message="move"
+			url="<%= moveURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= MBCategoryPermission.contains(permissionChecker, category, ActionKeys.PERMISSIONS) %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= MBCategory.class.getName() %>"
+			modelResourceDescription="<%= category.getName() %>"
+			resourcePrimKey="<%= String.valueOf(category.getCategoryId()) %>"
+			var="permissionsURL"
+			windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			method="get"
+			url="<%= permissionsURL %>"
+			useDialog="<%= true %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= portletName.equals(PortletKeys.MESSAGE_BOARDS) %>">
+
+		<c:if test="<%= enableRSS %>">
+
+			<%
+			if (category.getCategoryId() > 0) {
+				rssURL.setParameter("mbCategoryId", String.valueOf(category.getCategoryId()));
+			}
+			else {
+				rssURL.setParameter("groupId", String.valueOf(scopeGroupId));
+			}
+			%>
+
+			<liferay-ui:rss
+				delta="<%= rssDelta %>"
+				displayStyle="<%= rssDisplayStyle %>"
+				feedType="<%= rssFeedType %>"
+				resourceURL="<%= rssURL %>"
+			/>
+		</c:if>
+
+		<c:if test="<%= MBCategoryPermission.contains(permissionChecker, category, ActionKeys.SUBSCRIBE) && (MBUtil.getEmailMessageAddedEnabled(portletPreferences) || MBUtil.getEmailMessageUpdatedEnabled(portletPreferences)) %>">
+			<c:choose>
+				<c:when test="<%= (categorySubscriptionClassPKs != null) && categorySubscriptionClassPKs.contains(category.getCategoryId()) %>">
+					<portlet:actionURL var="unsubscribeURL">
+						<portlet:param name="struts_action" value="/message_boards/edit_category" />
+						<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UNSUBSCRIBE %>" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+						<portlet:param name="mbCategoryId" value="<%= String.valueOf(category.getCategoryId()) %>" />
+					</portlet:actionURL>
+
+					<liferay-ui:icon
+						image="unsubscribe"
+						url="<%= unsubscribeURL %>"
+					/>
+				</c:when>
+				<c:otherwise>
+					<portlet:actionURL var="subscribeURL">
+						<portlet:param name="struts_action" value="/message_boards/edit_category" />
+						<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.SUBSCRIBE %>" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+						<portlet:param name="mbCategoryId" value="<%= String.valueOf(category.getCategoryId()) %>" />
+					</portlet:actionURL>
+
+					<liferay-ui:icon
+						image="subscribe"
+						url="<%= subscribeURL %>"
+					/>
+				</c:otherwise>
+			</c:choose>
+		</c:if>
+	</c:if>
+
+	<c:if test="<%= MBCategoryPermission.contains(permissionChecker, category, ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/message_boards/edit_category" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= TrashUtil.isTrashEnabled(scopeGroupId) ? Constants.MOVE_TO_TRASH : Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="mbCategoryId" value="<%= String.valueOf(category.getCategoryId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete
+			trash="<%= TrashUtil.isTrashEnabled(scopeGroupId) %>"
+			url="<%= deleteURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/category_columns.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/category_columns.jspf
new file mode 100644
index 0000000..e35376c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/category_columns.jspf
@@ -0,0 +1,97 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:search-container-column-text
+	buffer="buffer"
+	name="category[message-board]"
+>
+
+	<%
+	buffer.append("<a href=\"");
+	buffer.append(rowURL);
+	buffer.append("\">");
+	buffer.append("<strong>");
+	buffer.append(curCategory.getName());
+	buffer.append("</strong>");
+
+	if (Validator.isNotNull(curCategory.getDescription())) {
+		buffer.append("<br />");
+		buffer.append(curCategory.getDescription());
+	}
+
+	buffer.append("</a>");
+
+	List subcategories = MBCategoryServiceUtil.getCategories(scopeGroupId, curCategory.getCategoryId(), WorkflowConstants.STATUS_APPROVED, 0, 5);
+
+	int subcategoriesCount = MBCategoryServiceUtil.getCategoriesCount(scopeGroupId, curCategory.getCategoryId(), WorkflowConstants.STATUS_APPROVED);
+
+	if (subcategoriesCount > 0) {
+		buffer.append("<br /><span class=\"subcategories\">");
+		buffer.append(LanguageUtil.get(pageContext, "subcategories[message-board]"));
+		buffer.append("</span>: ");
+
+		for (int j = 0; j < subcategories.size(); j++) {
+			MBCategory subcategory = (MBCategory)subcategories.get(j);
+
+			rowURL.setParameter("mbCategoryId", String.valueOf(subcategory.getCategoryId()));
+
+			buffer.append("<a href=\"");
+			buffer.append(rowURL);
+			buffer.append("\">");
+			buffer.append(HtmlUtil.escape(subcategory.getName()));
+			buffer.append("</a>");
+
+			if ((j + 1) < subcategories.size()) {
+				buffer.append(", ");
+			}
+		}
+
+		if (subcategoriesCount > subcategories.size()) {
+			rowURL.setParameter("mbCategoryId", String.valueOf(curCategory.getCategoryId()));
+
+			buffer.append(", <a href=\"");
+			buffer.append(rowURL);
+			buffer.append("\">");
+			buffer.append(LanguageUtil.get(pageContext, "more"));
+			buffer.append(" &raquo;");
+			buffer.append("</a>");
+		}
+
+		rowURL.setParameter("mbCategoryId", String.valueOf(curCategory.getCategoryId()));
+	}
+	%>
+
+</liferay-ui:search-container-column-text>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="categories[message-board]"
+	value="<%= String.valueOf(categoryDisplay.getSubcategoriesCount(curCategory)) %>"
+/>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="threads"
+	value="<%= String.valueOf(categoryDisplay.getSubcategoriesThreadsCount(curCategory)) %>"
+/>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="posts"
+	value="<%= String.valueOf(categoryDisplay.getSubcategoriesMessagesCount(curCategory)) %>"
+/>
+
+<%@ include file="/html/portlet/message_boards/category_columns_action.jspf" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/category_columns_action.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/category_columns_action.jspf
new file mode 100644
index 0000000..29711b0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/category_columns_action.jspf
@@ -0,0 +1,20 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:search-container-column-jsp
+	align="right"
+	path="/html/portlet/message_boards/category_action.jsp"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/category_subscriptions.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/category_subscriptions.jspf
new file mode 100644
index 0000000..df037ba
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/category_subscriptions.jspf
@@ -0,0 +1,63 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<c:if test="<%= category == null %>">
+	<div class="category-subscriptions">
+		<div class="category-subscription-types">
+			<c:if test="<%= enableRSS %>">
+				<liferay-ui:rss
+					delta="<%= rssDelta %>"
+					displayStyle="<%= rssDisplayStyle %>"
+					feedType="<%= rssFeedType %>"
+					resourceURL="<%= rssURL %>"
+				/>
+			</c:if>
+
+			<c:if test="<%= MBPermission.contains(permissionChecker, scopeGroupId, ActionKeys.SUBSCRIBE) && (MBUtil.getEmailMessageAddedEnabled(portletPreferences) || MBUtil.getEmailMessageUpdatedEnabled(portletPreferences)) %>">
+				<c:choose>
+					<c:when test="<%= SubscriptionLocalServiceUtil.isSubscribed(user.getCompanyId(), user.getUserId(), MBCategory.class.getName(), scopeGroupId) %>">
+						<portlet:actionURL var="unsubscribeURL">
+							<portlet:param name="struts_action" value="/message_boards/edit_category" />
+							<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UNSUBSCRIBE %>" />
+							<portlet:param name="redirect" value="<%= currentURL %>" />
+							<portlet:param name="mbCategoryId" value="<%= String.valueOf(MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID) %>" />
+						</portlet:actionURL>
+
+						<liferay-ui:icon
+							image="unsubscribe"
+							label="<%= true %>"
+							url="<%= unsubscribeURL %>"
+						/>
+					</c:when>
+					<c:otherwise>
+						<portlet:actionURL var="subscribeURL">
+							<portlet:param name="struts_action" value="/message_boards/edit_category" />
+							<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.SUBSCRIBE %>" />
+							<portlet:param name="redirect" value="<%= currentURL %>" />
+							<portlet:param name="mbCategoryId" value="<%= String.valueOf(MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID) %>" />
+						</portlet:actionURL>
+
+						<liferay-ui:icon
+							image="subscribe"
+							label="<%= true %>"
+							url="<%= subscribeURL %>"
+						/>
+					</c:otherwise>
+				</c:choose>
+			</c:if>
+		</div>
+	</div>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/configuration.jsp
new file mode 100644
index 0000000..126f4b4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/configuration.jsp
@@ -0,0 +1,742 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+String tabs2 = ParamUtil.getString(request, "tabs2", "general");
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+String emailFromName = ParamUtil.getString(request, "preferences--emailFromName--", MBUtil.getEmailFromName(portletPreferences, company.getCompanyId()));
+String emailFromAddress = ParamUtil.getString(request, "preferences--emailFromAddress--", MBUtil.getEmailFromAddress(portletPreferences, company.getCompanyId()));
+
+boolean emailMessageAddedEnabled = ParamUtil.getBoolean(request, "preferences--emailMessageAddedEnabled--", MBUtil.getEmailMessageAddedEnabled(portletPreferences));
+boolean emailMessageUpdatedEnabled = ParamUtil.getBoolean(request, "preferences--emailMessageUpdatedEnabled--", MBUtil.getEmailMessageUpdatedEnabled(portletPreferences));
+
+String emailParam = StringPool.BLANK;
+String defaultEmailSubject = StringPool.BLANK;
+String defaultEmailBody = StringPool.BLANK;
+String defaultEmailSignature = StringPool.BLANK;
+
+if (tabs2.equals("message-added-email")) {
+	emailParam = "emailMessageAdded";
+	defaultEmailSubject = ContentUtil.get(PropsValues.MESSAGE_BOARDS_EMAIL_MESSAGE_ADDED_SUBJECT);
+	defaultEmailBody = ContentUtil.get(PropsValues.MESSAGE_BOARDS_EMAIL_MESSAGE_ADDED_BODY);
+	defaultEmailSignature = ContentUtil.get(PropsValues.MESSAGE_BOARDS_EMAIL_MESSAGE_ADDED_SIGNATURE);
+}
+else if (tabs2.equals("message-updated-email")) {
+	emailParam = "emailMessageUpdated";
+	defaultEmailSubject = ContentUtil.get(PropsValues.MESSAGE_BOARDS_EMAIL_MESSAGE_UPDATED_SUBJECT);
+	defaultEmailBody = ContentUtil.get(PropsValues.MESSAGE_BOARDS_EMAIL_MESSAGE_UPDATED_BODY);
+	defaultEmailSignature = ContentUtil.get(PropsValues.MESSAGE_BOARDS_EMAIL_MESSAGE_UPDATED_SIGNATURE);
+}
+
+String emailSubjectParam = emailParam + "Subject";
+String emailBodyParam = emailParam + "Body";
+String emailSignatureParam = emailParam + "Signature";
+
+String emailSubject = PrefsParamUtil.getString(portletPreferences, request, emailSubjectParam, defaultEmailSubject);
+String emailBody = PrefsParamUtil.getString(portletPreferences, request, emailBodyParam, defaultEmailBody);
+String emailSignature = PrefsParamUtil.getString(portletPreferences, request, emailSignatureParam, defaultEmailSignature);
+%>
+
+<liferay-portlet:renderURL portletConfiguration="<%= true %>" var="portletURL">
+	<portlet:param name="tabs2" value="<%= tabs2 %>" />
+	<portlet:param name="redirect" value="<%= redirect %>" />
+</liferay-portlet:renderURL>
+
+<liferay-portlet:actionURL portletConfiguration="<%= true %>" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveConfiguration();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+
+	<%
+	String tabs2Names = "general,email-from,message-added-email,message-updated-email,thread-priorities,user-ranks";
+
+	if (PortalUtil.isRSSFeedsEnabled()) {
+		tabs2Names += ",rss";
+	}
+	%>
+
+	<liferay-ui:tabs
+		names="<%= tabs2Names %>"
+		param="tabs2"
+		url="<%= portletURL %>"
+	/>
+
+	<liferay-ui:error key="emailFromAddress" message="please-enter-a-valid-email-address" />
+	<liferay-ui:error key="emailFromName" message="please-enter-a-valid-name" />
+	<liferay-ui:error key="emailMessageAddedBody" message="please-enter-a-valid-body" />
+	<liferay-ui:error key="emailMessageAddedSignature" message="please-enter-a-valid-signature" />
+	<liferay-ui:error key="emailMessageAddedSubject" message="please-enter-a-valid-subject" />
+	<liferay-ui:error key="emailMessageUpdatedBody" message="please-enter-a-valid-body" />
+	<liferay-ui:error key="emailMessageUpdatedSignature" message="please-enter-a-valid-signature" />
+	<liferay-ui:error key="emailMessageUpdatedSubject" message="please-enter-a-valid-subject" />
+	<liferay-ui:error key="userRank" message="please-enter-valid-user-ranks" />
+
+	<c:choose>
+		<c:when test='<%= tabs2.equals("general") %>'>
+			<aui:fieldset>
+				<aui:input name="preferences--allowAnonymousPosting--" type="checkbox" value="<%= MBUtil.isAllowAnonymousPosting(portletPreferences) %>" />
+
+				<aui:input helpMessage="message-boards-message-subscribe-by-default-help" label="subscribe-by-default" name="preferences--subscribeByDefault--" type="checkbox" value="<%= subscribeByDefault %>" />
+
+				<aui:select name="preferences--messageFormat--">
+
+					<%
+					for (int i = 0; i < MBMessageConstants.FORMATS.length; i++) {
+					%>
+
+						<c:if test="<%= MBUtil.isValidMessageFormat(MBMessageConstants.FORMATS[i]) %>">
+							<aui:option label='<%= LanguageUtil.get(pageContext,"message-boards.message-formats." + MBMessageConstants.FORMATS[i]) %>' selected="<%= messageFormat.equals(MBMessageConstants.FORMATS[i]) %>" value="<%= MBMessageConstants.FORMATS[i] %>" />
+						</c:if>
+
+					<%
+					}
+					%>
+
+				</aui:select>
+
+				<aui:input name="preferences--enableFlags--" type="checkbox" value="<%= enableFlags %>" />
+
+				<aui:input name="preferences--enableRatings--" type="checkbox" value="<%= enableRatings %>" />
+
+				<aui:input name="preferences--threadAsQuestionByDefault--" type="checkbox" value="<%= threadAsQuestionByDefault %>" />
+
+				<aui:select label="show-recent-posts-from-last" name="preferences--recentPostsDateOffset--">
+					<aui:option label='<%= LanguageUtil.format(pageContext, "x-hours", 24) %>' selected='<%= recentPostsDateOffset.equals("1") %>' value="1" />
+					<aui:option label='<%= LanguageUtil.format(pageContext, "x-days", 7) %>' selected='<%= recentPostsDateOffset.equals("7") %>' value="7" />
+					<aui:option label='<%= LanguageUtil.format(pageContext, "x-days", 30) %>' selected='<%= recentPostsDateOffset.equals("30") %>' value="30" />
+					<aui:option label='<%= LanguageUtil.format(pageContext, "x-days", 365) %>' selected='<%= recentPostsDateOffset.equals("365") %>' value="365" />
+				</aui:select>
+			</aui:fieldset>
+		</c:when>
+		<c:when test='<%= tabs2.equals("email-from") %>'>
+			<aui:fieldset>
+				<aui:input cssClass="lfr-input-text-container" label="name" name="preferences--emailFromName--" value="<%= emailFromName %>" />
+
+				<aui:input cssClass="lfr-input-text-container" label="address" name="preferences--emailFromAddress--" value="<%= emailFromAddress %>" />
+
+				<aui:input label="html-format" name="preferences--emailHtmlFormat--" type="checkbox" value="<%= MBUtil.getEmailHtmlFormat(portletPreferences) %>" />
+			</aui:fieldset>
+
+			<div class="definition-of-terms">
+				<h4><liferay-ui:message key="definition-of-terms" /></h4>
+
+				<dl>
+					<dt>
+						[$COMPANY_ID$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-company-id-associated-with-the-message-board" />
+					</dd>
+					<dt>
+						[$COMPANY_MX$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-company-mx-associated-with-the-message-board" />
+					</dd>
+					<dt>
+						[$COMPANY_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-company-name-associated-with-the-message-board" />
+					</dd>
+
+					<c:if test="<%= PropsValues.POP_SERVER_NOTIFICATIONS_ENABLED %>">
+						<dt>
+							[$MAILING_LIST_ADDRESS$]
+						</dt>
+						<dd>
+							<liferay-ui:message key="the-email-address-of-the-mailing-list" />
+						</dd>
+					</c:if>
+
+					<dt>
+						[$MESSAGE_USER_ADDRESS$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-email-address-of-the-user-who-added-the-message" />
+					</dd>
+					<dt>
+						[$MESSAGE_USER_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-user-who-added-the-message" />
+					</dd>
+					<dt>
+						[$PORTLET_NAME$]
+					</dt>
+					<dd>
+						<%= PortalUtil.getPortletTitle(renderResponse) %>
+					</dd>
+					<dt>
+						[$SITE_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-site-name-associated-with-the-message-board" />
+					</dd>
+				</dl>
+			</div>
+		</c:when>
+		<c:when test='<%= tabs2.startsWith("message-") %>'>
+			<aui:fieldset>
+				<c:choose>
+					<c:when test='<%= tabs2.equals("message-added-email") %>'>
+						<aui:input label="enabled" name="preferences--emailMessageAddedEnabled--" type="checkbox" value="<%= emailMessageAddedEnabled %>" />
+					</c:when>
+					<c:when test='<%= tabs2.equals("message-updated-email") %>'>
+						<aui:input label="enabled" name="preferences--emailMessageUpdatedEnabled--" type="checkbox" value="<%= emailMessageUpdatedEnabled %>" />
+					</c:when>
+				</c:choose>
+
+				<aui:input cssClass="lfr-input-text-container" label="subject" name='<%= "preferences--" + emailSubjectParam + "--" %>' value="<%= emailSubject %>" />
+
+				<aui:input cssClass="lfr-textarea-container" label="body" name='<%= "preferences--" + emailBodyParam + "--" %>' type="textarea" value="<%= emailBody %>" warp="soft" />
+
+				<aui:input cssClass="lfr-textarea-container" label="signature" name='<%= "preferences--" + emailSignatureParam + "--" %>' type="textarea" value="<%= emailSignature %>" wrap="soft" />
+			</aui:fieldset>
+
+			<div class="definition-of-terms">
+				<h4><liferay-ui:message key="definition-of-terms" /></h4>
+
+				<dl>
+					<dt>
+						[$CATEGORY_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-category-in-which-the-message-has-been-posted" />
+					</dd>
+					<dt>
+						[$COMPANY_ID$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-company-id-associated-with-the-message-board" />
+					</dd>
+					<dt>
+						[$COMPANY_MX$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-company-mx-associated-with-the-message-board" />
+					</dd>
+					<dt>
+						[$COMPANY_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-company-name-associated-with-the-message-board" />
+					</dd>
+					<dt>
+						[$FROM_ADDRESS$]
+					</dt>
+					<dd>
+						<%= HtmlUtil.escape(emailFromAddress) %>
+					</dd>
+					<dt>
+						[$FROM_NAME$]
+					</dt>
+					<dd>
+						<%= HtmlUtil.escape(emailFromName) %>
+					</dd>
+
+					<c:if test="<%= PropsValues.POP_SERVER_NOTIFICATIONS_ENABLED %>">
+						<dt>
+							[$MAILING_LIST_ADDRESS$]
+						</dt>
+						<dd>
+							<liferay-ui:message key="the-email-address-of-the-mailing-list" />
+						</dd>
+					</c:if>
+
+					<dt>
+						[$MESSAGE_BODY$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-message-body" />
+					</dd>
+					<dt>
+						[$MESSAGE_ID$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-message-id" />
+					</dd>
+					<dt>
+						[$MESSAGE_SUBJECT$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-message-subject" />
+					</dd>
+					<dt>
+						[$MESSAGE_URL$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-message-url" />
+					</dd>
+					<dt>
+						[$MESSAGE_USER_ADDRESS$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-email-address-of-the-user-who-added-the-message" />
+					</dd>
+					<dt>
+						[$MESSAGE_USER_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-user-who-added-the-message" />
+					</dd>
+					<dt>
+						[$PORTAL_URL$]
+					</dt>
+					<dd>
+						<%= company.getVirtualHostname() %>
+					</dd>
+					<dt>
+						[$PORTLET_NAME$]
+					</dt>
+					<dd>
+						<%= PortalUtil.getPortletTitle(renderResponse) %>
+					</dd>
+					<dt>
+						[$SITE_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-site-name-associated-with-the-message-board" />
+					</dd>
+
+					<c:if test="<%= !PropsValues.MESSAGE_BOARDS_EMAIL_BULK %>">
+						<dt>
+							[$TO_ADDRESS$]
+						</dt>
+						<dd>
+							<liferay-ui:message key="the-address-of-the-email-recipient" />
+						</dd>
+						<dt>
+							[$TO_NAME$]
+						</dt>
+						<dd>
+							<liferay-ui:message key="the-name-of-the-email-recipient" />
+						</dd>
+					</c:if>
+				</dl>
+			</div>
+		</c:when>
+		<c:when test='<%= tabs2.equals("thread-priorities") %>'>
+			<div class="alert alert-info">
+				<liferay-ui:message key="enter-the-name,-image,-and-priority-level-in-descending-order" />
+			</div>
+
+			<br /><br />
+
+			<table class="lfr-table">
+			<tr>
+				<td>
+					<aui:field-wrapper label="default-language">
+						<liferay-ui:input-resource url="<%= defaultLocale.getDisplayName(defaultLocale) %>" />
+					</aui:field-wrapper>
+				</td>
+				<td>
+					<aui:select label="localized-language" name="languageId" onClick='<%= renderResponse.getNamespace() + "updateLanguage();" %>' showEmptyOption="<%= true %>">
+
+						<%
+						for (int i = 0; i < locales.length; i++) {
+							if (locales[i].equals(defaultLocale)) {
+								continue;
+							}
+						%>
+
+							<aui:option label="<%= locales[i].getDisplayName(locale) %>" selected="<%= currentLanguageId.equals(LocaleUtil.toLanguageId(locales[i])) %>" value="<%= LocaleUtil.toLanguageId(locales[i]) %>" />
+
+						<%
+						}
+						%>
+
+					</aui:select>
+				</td>
+			</tr>
+			<tr>
+				<td colspan="2">
+					<br />
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<table class="lfr-table">
+					<tr>
+						<td class="lfr-label">
+							<liferay-ui:message key="name" />
+						</td>
+						<td class="lfr-label">
+							<liferay-ui:message key="image" />
+						</td>
+						<td class="lfr-label">
+							<liferay-ui:message key="priority" />
+						</td>
+					</tr>
+
+					<%
+					priorities = LocalizationUtil.getPreferencesValues(portletPreferences, "priorities", defaultLanguageId);
+
+					for (int i = 0; i < 10; i++) {
+						String name = StringPool.BLANK;
+						String image = StringPool.BLANK;
+						String value = StringPool.BLANK;
+
+						if (priorities.length > i) {
+							String[] priority = StringUtil.split(priorities[i]);
+
+							try {
+								name = priority[0];
+								image = priority[1];
+								value = priority[2];
+							}
+							catch (Exception e) {
+							}
+
+							if (Validator.isNull(name) && Validator.isNull(image)) {
+								value = StringPool.BLANK;
+							}
+						}
+					%>
+
+						<tr>
+							<td>
+								<aui:input label="" name='<%= "priorityName" + i + "_" + defaultLanguageId %>' size="15" value="<%= name %>" />
+							</td>
+							<td>
+								<aui:input label="" name='<%= "priorityImage" + i + "_" + defaultLanguageId %>' size="40" value="<%= image %>" />
+							</td>
+							<td>
+								<aui:input label="" name='<%= "priorityValue" + i + "_" + defaultLanguageId %>' size="4" value="<%= value %>" />
+							</td>
+						</tr>
+
+					<%
+					}
+					%>
+
+					</table>
+				</td>
+				<td>
+					<table class='<%= (currentLocale.equals(defaultLocale) ? "hide" : "") + " lfr-table" %>' id="<portlet:namespace />localized-priorities-table">
+					<tr>
+						<td class="lfr-label">
+							<liferay-ui:message key="name" />
+						</td>
+						<td class="lfr-label">
+							<liferay-ui:message key="image" />
+						</td>
+						<td class="lfr-label">
+							<liferay-ui:message key="priority" />
+						</td>
+					</tr>
+
+					<%
+					for (int i = 0; i < 10; i++) {
+					%>
+
+						<tr>
+							<td>
+								<aui:input label="" name='<%= "priorityName" + i + "_temp" %>' onChange='<%= renderResponse.getNamespace() + "onChanged();" %>' size="15" />
+							</td>
+							<td>
+								<aui:input label="" name='<%= "priorityImage" + i + "_temp" %>' onChange='<%= renderResponse.getNamespace() + "onChanged();" %>' size="40" />
+							</td>
+							<td>
+								<aui:input label="" name='<%= "priorityValue" + i + "_temp" %>' onChange='<%= renderResponse.getNamespace() + "onChanged();" %>' size="4" />
+							</td>
+						</tr>
+
+					<%
+					}
+					%>
+
+					</table>
+
+					<%
+					for (int i = 0; i < locales.length; i++) {
+						if (locales[i].equals(defaultLocale)) {
+							continue;
+						}
+
+						String[] tempPriorities = LocalizationUtil.getPreferencesValues(portletPreferences, "priorities", LocaleUtil.toLanguageId(locales[i]));
+
+						for (int j = 0; j < 10; j++) {
+							String name = StringPool.BLANK;
+							String image = StringPool.BLANK;
+							String value = StringPool.BLANK;
+
+							if (tempPriorities.length > j) {
+								String[] priority = StringUtil.split(tempPriorities[j]);
+
+								try {
+									name = priority[0];
+									image = priority[1];
+									value = priority[2];
+								}
+								catch (Exception e) {
+								}
+
+								if (Validator.isNull(name) && Validator.isNull(image)) {
+									value = StringPool.BLANK;
+								}
+							}
+					%>
+
+							<aui:input name='<%= "priorityName" + j + "_" + LocaleUtil.toLanguageId(locales[i]) %>' type="hidden" value="<%= name %>" />
+							<aui:input name='<%= "priorityImage" + j + "_" + LocaleUtil.toLanguageId(locales[i]) %>' type="hidden" value="<%= image %>" />
+							<aui:input name='<%= "priorityValue" + j + "_" + LocaleUtil.toLanguageId(locales[i]) %>' type="hidden" value="<%= value %>" />
+
+					<%
+						}
+					}
+					%>
+
+				</td>
+			</tr>
+			</table>
+
+			<br />
+
+			<aui:script>
+				var changed = false;
+				var lastLanguageId = "<%= currentLanguageId %>";
+
+				function <portlet:namespace />onChanged() {
+					changed = true;
+				}
+
+				Liferay.provide(
+					window,
+					'<portlet:namespace />updateLanguage',
+					function() {
+						var A = AUI();
+
+						if (lastLanguageId != '<%= defaultLanguageId %>') {
+							if (changed) {
+								for (var i = 0; i < 10; i++) {
+									var priorityName = A.one('#<portlet:namespace />priorityName' + i + '_temp').val();
+									var priorityImage = A.one('#<portlet:namespace />priorityImage' + i + '_temp').val();
+									var priorityValue = A.one('#<portlet:namespace />priorityValue' + i + '_temp').val();
+
+									A.one('#<portlet:namespace />priorityName' + i + '_' + lastLanguageId).val(priorityName);
+									A.one('#<portlet:namespace />priorityImage' + i + '_' + lastLanguageId).val(priorityImage);
+									A.one('#<portlet:namespace />priorityValue' + i + '_' + lastLanguageId).val(priorityValue);
+								}
+
+								changed = false;
+							}
+						}
+
+						var selLanguageId = A.one(document.<portlet:namespace />fm.<portlet:namespace />languageId).val();
+
+						var localizedPriorityTable = A.one('#<portlet:namespace />localized-priorities-table');
+
+						if ((selLanguageId != '') && (selLanguageId != 'null')) {
+							<portlet:namespace />updateLanguageTemps(selLanguageId);
+
+							localizedPriorityTable.show();
+						}
+						else {
+							localizedPriorityTable.hide();
+						}
+
+						lastLanguageId = selLanguageId;
+					},
+					['aui-base']
+				);
+
+				Liferay.provide(
+					window,
+					'<portlet:namespace />updateLanguageTemps',
+					function(lang) {
+						var A = AUI();
+
+						if (lang != '<%= defaultLanguageId %>') {
+							for (var i = 0; i < 10; i++) {
+								var defaultName = A.one('#<portlet:namespace />priorityName' + i + '_' + '<%= defaultLanguageId %>').val();
+								var defaultImage = A.one('#<portlet:namespace />priorityImage' + i + '_' + '<%= defaultLanguageId %>').val();
+								var defaultValue = A.one('#<portlet:namespace />priorityValue' + i + '_' + '<%= defaultLanguageId %>').val();
+
+								var priorityName = A.one('#<portlet:namespace />priorityName' + i + '_' + lang).val();
+								var priorityImage = A.one('#<portlet:namespace />priorityImage' + i + '_' + lang).val();
+								var priorityValue = A.one('#<portlet:namespace />priorityValue' + i + '_' + lang).val();
+
+								var name = priorityName || defaultName;
+								var image = priorityImage || defaultImage;
+								var value = priorityValue || defaultValue;
+
+								A.one('#<portlet:namespace />priorityName' + i + '_temp').val(name);
+								A.one('#<portlet:namespace />priorityImage' + i + '_temp').val(image);
+								A.one('#<portlet:namespace />priorityValue' + i + '_temp').val(value);
+							}
+						}
+					},
+					['aui-base']
+				);
+
+				<portlet:namespace />updateLanguageTemps(lastLanguageId);
+			</aui:script>
+		</c:when>
+		<c:when test='<%= tabs2.equals("user-ranks") %>'>
+			<div class="alert alert-info">
+				<liferay-ui:message key="enter-rank-and-minimum-post-pairs-per-line" />
+			</div>
+
+			<aui:fieldset>
+				<table class="lfr-table">
+				<tr>
+					<td class="lfr-label">
+						<aui:field-wrapper label="default-language">
+							<liferay-ui:input-resource url="<%= defaultLocale.getDisplayName(defaultLocale) %>" />
+						</aui:field-wrapper>
+					</td>
+					<td class="lfr-label">
+						<aui:select label="localized-language" name="languageId" onChange='<%= renderResponse.getNamespace() + "updateLanguage();" %>' showEmptyOption="<%= true %>">
+
+							<%
+							for (int i = 0; i < locales.length; i++) {
+								if (locales[i].equals(defaultLocale)) {
+									continue;
+								}
+							%>
+
+								<aui:option label="<%= locales[i].getDisplayName(locale) %>" selected="<%= currentLanguageId.equals(LocaleUtil.toLanguageId(locales[i])) %>" value="<%= LocaleUtil.toLanguageId(locales[i]) %>" />
+
+							<%
+							}
+							%>
+
+						</aui:select>
+					</td>
+				</tr>
+				<tr>
+					<td>
+						<aui:input cssClass="lfr-textarea-container" label="" name='<%= "ranks_" + defaultLanguageId %>' type="textarea" value='<%= StringUtil.merge(LocalizationUtil.getPreferencesValues(portletPreferences, "ranks", defaultLanguageId), StringPool.NEW_LINE) %>' />
+					</td>
+					<td>
+
+						<%
+						for (int i = 0; i < locales.length; i++) {
+							if (locales[i].equals(defaultLocale)) {
+								continue;
+							}
+						%>
+
+							<aui:input name='<%= "ranks_" + LocaleUtil.toLanguageId(locales[i]) %>' type="hidden" value='<%= StringUtil.merge(LocalizationUtil.getPreferencesValues(portletPreferences, "ranks", LocaleUtil.toLanguageId(locales[i]), false), StringPool.NEW_LINE) %>' />
+
+						<%
+						}
+						%>
+
+						<aui:input cssClass="lfr-textarea-container" label="" name="ranks_temp" onChange='<%= renderResponse.getNamespace() + "onRanksChanged();" %>' type="textarea" />
+					</td>
+				</tr>
+				</table>
+			</aui:fieldset>
+
+			<aui:script>
+				var ranksChanged = false;
+				var lastLanguageId = '<%= currentLanguageId %>';
+
+				function <portlet:namespace />onRanksChanged() {
+					ranksChanged = true;
+				}
+
+				Liferay.provide(
+					window,
+					'<portlet:namespace />updateLanguage',
+					function() {
+						var A = AUI();
+
+						if (lastLanguageId != '<%= defaultLanguageId %>') {
+							if (ranksChanged) {
+								var ranksValue = A.one('#<portlet:namespace />ranks_temp').val();
+
+								if (ranksValue == null) {
+									ranksValue = '';
+								}
+
+								A.one('#<portlet:namespace />ranks_' + lastLanguageId).val(ranksValue);
+
+								ranksChanged = false;
+							}
+						}
+
+						var selLanguageId = A.one(document.<portlet:namespace />fm.<portlet:namespace />languageId).val();
+
+						var ranksTemp = A.one('#<portlet:namespace />ranks_temp');
+
+						if ((selLanguageId != '') && (selLanguageId != 'null')) {
+							<portlet:namespace />updateLanguageTemps(selLanguageId);
+
+							ranksTemp.show();
+						}
+						else {
+							ranksTemp.hide();
+						}
+
+						lastLanguageId = selLanguageId;
+					},
+					['aui-base']
+				);
+
+				Liferay.provide(
+					window,
+					'<portlet:namespace />updateLanguageTemps',
+					function(lang) {
+						var A = AUI();
+
+						if (lang != '<%= defaultLanguageId %>') {
+							var ranksValue = A.one('#<portlet:namespace />ranks_' + lang).val();
+							var defaultRanksValue = A.one('#<portlet:namespace />ranks_<%= defaultLanguageId %>').val();
+
+							var value = ranksValue || defaultRanksValue;
+
+							A.one('#<portlet:namespace />ranks_temp').val(value);
+						}
+					},
+					['aui-base']
+				);
+
+				<portlet:namespace />updateLanguageTemps(lastLanguageId);
+			</aui:script>
+		</c:when>
+		<c:when test='<%= tabs2.equals("rss") %>'>
+			<liferay-ui:rss-settings
+				delta="<%= rssDelta %>"
+				displayStyle="<%= rssDisplayStyle %>"
+				enabled="<%= enableRSS %>"
+				feedType="<%= rssFeedType %>"
+			/>
+		</c:when>
+	</c:choose>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />saveConfiguration() {
+		<c:if test='<%= tabs2.equals("user-ranks") || tabs2.equals("thread-priorities") %>'>
+			<portlet:namespace />updateLanguage();
+		</c:if>
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/css/.sass-cache/main.css
new file mode 100644
index 0000000..e93c15c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/css/.sass-cache/main.css
@@ -0,0 +1,227 @@
+.portlet-asset-publisher .category-buttons, .portlet-message-boards .category-buttons, .portlet-trash .category-buttons {
+  clear: both;
+  margin-bottom: 1em; }
+.portlet-asset-publisher .category-subscriptions, .portlet-message-boards .category-subscriptions, .portlet-trash .category-subscriptions {
+  clear: both;
+  margin-bottom: 1em;
+  overflow: hidden; }
+.portlet-asset-publisher .category-subscription-types, .portlet-message-boards .category-subscription-types, .portlet-trash .category-subscription-types {
+  float: right;
+  margin-bottom: 0; }
+.portlet-asset-publisher .quote, .portlet-message-boards .quote, .portlet-trash .quote {
+  background: white url(@theme_image_path@/message_boards/quoteleft.png) left top no-repeat;
+  border: 1px solid #777;
+  padding: 5px 0px 0px 5px; }
+.portlet-asset-publisher .quote-content, .portlet-message-boards .quote-content, .portlet-trash .quote-content {
+  background: transparent url(@theme_image_path@/message_boards/quoteright.png) right bottom no-repeat;
+  padding: 5px 30px 10px 30px; }
+.portlet-asset-publisher .quote-title, .portlet-message-boards .quote-title, .portlet-trash .quote-title {
+  font-weight: bold;
+  padding: 5px 0px 5px 0px; }
+.portlet-asset-publisher .title, .portlet-message-boards .title, .portlet-trash .title {
+  border-bottom: 1px solid #CCC;
+  font-size: large;
+  font-weight: normal;
+  padding: 5px; }
+.portlet-asset-publisher .trash-attachments, .portlet-message-boards .trash-attachments, .portlet-trash .trash-attachments {
+  float: right; }
+.portlet-asset-publisher #messageBoardsPanelContainer, .portlet-message-boards #messageBoardsPanelContainer, .portlet-trash #messageBoardsPanelContainer {
+  border-width: 0; }
+.portlet-asset-publisher .message-attachments h3, .portlet-message-boards .message-attachments h3, .portlet-trash .message-attachments h3 {
+  color: #333;
+  font-size: 1em; }
+.portlet-asset-publisher .message-attachments ul, .portlet-message-boards .message-attachments ul, .portlet-trash .message-attachments ul {
+  list-style: none; }
+.portlet-asset-publisher .message-attachments .message-attachment, .portlet-message-boards .message-attachments .message-attachment, .portlet-trash .message-attachments .message-attachment {
+  padding: 0.5em; }
+.portlet-asset-publisher .message-attachments .deleted-input, .portlet-message-boards .message-attachments .deleted-input, .portlet-trash .message-attachments .deleted-input {
+  list-style: none;
+  margin-left: -2em;
+  padding: 0; }
+.portlet-asset-publisher .message-attachments .undo, .portlet-message-boards .message-attachments .undo, .portlet-trash .message-attachments .undo {
+  font-weight: bold; }
+.portlet-asset-publisher .message-container, .portlet-message-boards .message-container, .portlet-trash .message-container {
+  border: 1px solid #CCC;
+  margin: 5px 0 0 0;
+  overflow: auto; }
+  .portlet-asset-publisher .message-container table, .portlet-message-boards .message-container table, .portlet-trash .message-container table {
+    border-collapse: collapse;
+    table-layout: fixed; }
+  .portlet-asset-publisher .message-container .lfr-code table, .portlet-message-boards .message-container .lfr-code table, .portlet-trash .message-container .lfr-code table {
+    table-layout: auto; }
+  .portlet-asset-publisher .message-container td, .portlet-message-boards .message-container td, .portlet-trash .message-container td {
+    border-width: 0; }
+.portlet-asset-publisher .thread-top, .portlet-message-boards .thread-top, .portlet-trash .thread-top {
+  border-bottom: 1px solid #CCC;
+  padding: 3px 5px; }
+.portlet-asset-publisher .thread-bottom, .portlet-message-boards .thread-bottom, .portlet-trash .thread-bottom {
+  padding: 3px 5px;
+  vertical-align: bottom; }
+.portlet-asset-publisher .taglib-ratings.thumbs .total-rating, .portlet-message-boards .taglib-ratings.thumbs .total-rating, .portlet-trash .taglib-ratings.thumbs .total-rating {
+  padding: 0 5px 0 10px; }
+.portlet-asset-publisher td.user-info, .portlet-message-boards td.user-info, .portlet-trash td.user-info {
+  border-right: 1px solid #CCC;
+  width: 150px; }
+.portlet-asset-publisher .subject, .portlet-message-boards .subject, .portlet-trash .subject {
+  float: left; }
+.portlet-asset-publisher .edit-controls, .portlet-message-boards .edit-controls, .portlet-trash .edit-controls {
+  float: right; }
+  .portlet-asset-publisher .edit-controls li, .portlet-message-boards .edit-controls li, .portlet-trash .edit-controls li {
+    float: left;
+    margin-right: 10px; }
+.portlet-asset-publisher .thread-body, .portlet-message-boards .thread-body, .portlet-trash .thread-body {
+  overflow: hidden;
+  padding: 15px; }
+  .portlet-asset-publisher .thread-body td, .portlet-message-boards .thread-body td, .portlet-trash .thread-body td {
+    border: 1px solid #CCC; }
+.portlet-asset-publisher .message-container .user-info, .portlet-message-boards .message-container .user-info, .portlet-trash .message-container .user-info {
+  border-right: 1px solid #CCC;
+  padding: 5px; }
+.portlet-asset-publisher .clear, .portlet-message-boards .clear, .portlet-trash .clear {
+  clear: both; }
+.portlet-asset-publisher .taglib-custom-attributes-list, .portlet-message-boards .taglib-custom-attributes-list, .portlet-trash .taglib-custom-attributes-list {
+  margin-bottom: 1em; }
+.portlet-asset-publisher .message-boards-panels, .portlet-message-boards .message-boards-panels, .portlet-trash .message-boards-panels {
+  border-width: 0; }
+.portlet-asset-publisher .statistics-panel, .portlet-message-boards .statistics-panel, .portlet-trash .statistics-panel {
+  border-width: 0; }
+.portlet-asset-publisher .statistics-panel-content, .portlet-message-boards .statistics-panel-content, .portlet-trash .statistics-panel-content {
+  margin: 1em; }
+  .portlet-asset-publisher .statistics-panel-content dt, .portlet-message-boards .statistics-panel-content dt, .portlet-trash .statistics-panel-content dt {
+    float: left;
+    font-weight: bold;
+    margin-right: 1em; }
+.portlet-asset-publisher .question-details, .portlet-message-boards .question-details, .portlet-trash .question-details {
+  float: left;
+  white-space: nowrap; }
+.portlet-asset-publisher .views, .portlet-message-boards .views, .portlet-trash .views {
+  color: #999;
+  clear: both;
+  float: left;
+  padding: 5px 0;
+  text-align: center;
+  width: 100%; }
+  .portlet-asset-publisher .views .count, .portlet-message-boards .views .count, .portlet-trash .views .count {
+    display: inline;
+    font-size: 1em; }
+.portlet-asset-publisher .status, .portlet-asset-publisher .votes, .portlet-message-boards .status, .portlet-message-boards .votes, .portlet-trash .status, .portlet-trash .votes {
+  display: inline-block;
+  height: 38px;
+  margin: 0 3px 0 0;
+  padding: 5px;
+  text-align: center; }
+.portlet-asset-publisher .votes, .portlet-message-boards .votes, .portlet-trash .votes {
+  color: #555;
+  width: 40px; }
+.portlet-asset-publisher .status, .portlet-message-boards .status, .portlet-trash .status {
+  width: 48px; }
+.portlet-asset-publisher .answered, .portlet-message-boards .answered, .portlet-trash .answered {
+  background-color: #5BA018;
+  color: #FFF; }
+.portlet-asset-publisher .unanswered, .portlet-message-boards .unanswered, .portlet-trash .unanswered {
+  background-color: #CF4937;
+  color: #FFF; }
+.portlet-asset-publisher .count, .portlet-message-boards .count, .portlet-trash .count {
+  display: block;
+  font-size: 190%;
+  font-weight: bold;
+  height: 25px; }
+.portlet-asset-publisher .toggle_id_message_boards_view_message_thread, .portlet-message-boards .toggle_id_message_boards_view_message_thread, .portlet-trash .toggle_id_message_boards_view_message_thread {
+  border: 1px solid #CCC;
+  clear: both;
+  margin: 5px 0 0 0;
+  width: 100%; }
+.portlet-asset-publisher .thread-controls, .portlet-message-boards .thread-controls, .portlet-trash .thread-controls {
+  border: 1px solid #CCC;
+  margin-bottom: 5px;
+  padding: 3px 5px; }
+.portlet-asset-publisher .thread-navigation, .portlet-message-boards .thread-navigation, .portlet-trash .thread-navigation {
+  float: left; }
+.portlet-asset-publisher .thread-actions, .portlet-message-boards .thread-actions, .portlet-trash .thread-actions {
+  float: right; }
+.portlet-asset-publisher .thread-user-rank, .portlet-message-boards .thread-user-rank, .portlet-trash .thread-user-rank {
+  display: block; }
+.portlet-asset-publisher .thread-priority, .portlet-message-boards .thread-priority, .portlet-trash .thread-priority {
+  border-width: 0;
+  float: left; }
+.portlet-asset-publisher .message-container .thread-message-view, .portlet-asset-publisher .thread-view, .portlet-message-boards .message-container .thread-message-view, .portlet-message-boards .thread-view, .portlet-trash .message-container .thread-message-view, .portlet-trash .thread-view {
+  border-collapse: collapse;
+  min-width: 400px;
+  padding: 0;
+  width: 100%; }
+.portlet-asset-publisher .thread-view-controls, .portlet-message-boards .thread-view-controls, .portlet-trash .thread-view-controls {
+  list-style: none;
+  margin: 0;
+  text-align: right; }
+  .portlet-asset-publisher .thread-view-controls li, .portlet-message-boards .thread-view-controls li, .portlet-trash .thread-view-controls li {
+    display: inline-block; }
+.portlet-asset-publisher .emoticons, .portlet-message-boards .emoticons, .portlet-trash .emoticons {
+  border: 1px solid #CCC;
+  margin-left: 10px; }
+.portlet-asset-publisher .tree, .portlet-message-boards .tree, .portlet-trash .tree {
+  vertical-align: middle; }
+.portlet-asset-publisher .message-scroll, .portlet-message-boards .message-scroll, .portlet-trash .message-scroll {
+  margin: 5px 0 0 0; }
+.portlet-asset-publisher .lfr-textarea.message-edit, .portlet-message-boards .lfr-textarea.message-edit, .portlet-trash .lfr-textarea.message-edit {
+  height: 100%;
+  width: 100%; }
+  .portlet-asset-publisher .lfr-textarea.message-edit textarea, .portlet-message-boards .lfr-textarea.message-edit textarea, .portlet-trash .lfr-textarea.message-edit textarea {
+    height: 378px;
+    min-height: 100%;
+    width: 99.5%; }
+.portlet-asset-publisher .subcategories, .portlet-message-boards .subcategories, .portlet-trash .subcategories {
+  text-decoration: underline; }
+.portlet-asset-publisher .taglib-flags, .portlet-message-boards .taglib-flags, .portlet-trash .taglib-flags {
+  float: left;
+  margin-left: 20px; }
+.portlet-asset-publisher .threads-panel, .portlet-message-boards .threads-panel, .portlet-trash .threads-panel {
+  margin-top: 1em; }
+.portlet-asset-publisher .displayStyle-question .action-question .taglib-text, .portlet-message-boards .displayStyle-question .action-question .taglib-text, .portlet-trash .displayStyle-question .action-question .taglib-text {
+  display: none; }
+.portlet-asset-publisher .displayStyle-question .last-post, .portlet-message-boards .displayStyle-question .last-post, .portlet-trash .displayStyle-question .last-post {
+  margin-left: 1em;
+  width: 15%; }
+.portlet-asset-publisher .displayStyle-question .stats, .portlet-message-boards .displayStyle-question .stats, .portlet-trash .displayStyle-question .stats {
+  width: 20%; }
+.portlet-asset-publisher .displayStyle-question .question, .portlet-message-boards .displayStyle-question .question, .portlet-trash .displayStyle-question .question {
+  vertical-align: top;
+  width: 65%; }
+.portlet-asset-publisher .displayStyle-question .last-post .portrait, .portlet-message-boards .displayStyle-question .last-post .portrait, .portlet-trash .displayStyle-question .last-post .portrait {
+  text-align: center; }
+.portlet-asset-publisher .displayStyle-question .username, .portlet-message-boards .displayStyle-question .username, .portlet-trash .displayStyle-question .username {
+  text-align: center; }
+.portlet-asset-publisher .displayStyle-question .time, .portlet-message-boards .displayStyle-question .time, .portlet-trash .displayStyle-question .time {
+  color: #777;
+  font-size: 0.9em;
+  font-weight: bold;
+  margin-top: 0.5em;
+  text-align: center; }
+.portlet-asset-publisher .displayStyle-question .tags, .portlet-message-boards .displayStyle-question .tags, .portlet-trash .displayStyle-question .tags {
+  float: left;
+  margin-top: 0.5em; }
+.portlet-asset-publisher .displayStyle-question .question-subject, .portlet-message-boards .displayStyle-question .question-subject, .portlet-trash .displayStyle-question .question-subject {
+  font-size: 125%; }
+  .portlet-asset-publisher .displayStyle-question .question-subject #a, .portlet-message-boards .displayStyle-question .question-subject #a, .portlet-trash .displayStyle-question .question-subject #a {
+    color: #06C; }
+.portlet-asset-publisher .displayStyle-question .summary, .portlet-message-boards .displayStyle-question .summary, .portlet-trash .displayStyle-question .summary {
+  color: #444;
+  font-size: 120%; }
+.portlet-asset-publisher .search-root-entry, .portlet-message-boards .search-root-entry, .portlet-trash .search-root-entry {
+  color: #999;
+  float: right; }
+
+.ie .portlet-message-boards .message-container, .ie .portlet-trash .message-container {
+  width: 100%; }
+  .ie .portlet-message-boards .message-container .thread-body table, .ie .portlet-trash .message-container .thread-body table {
+    table-layout: auto; }
+
+.ie6 .portlet-message-boards .code, .ie6 .portlet-trash .code {
+  width: 100%; }
+
+.ie8 .question-details {
+  white-space: normal; }
+
+.trash-restore-popup .form fieldset {
+  margin-bottom: 0;
+  padding: 0 15px; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/css/main.css
new file mode 100644
index 0000000..afe5b4c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/css/main.css
@@ -0,0 +1,399 @@
+.portlet-asset-publisher, .portlet-message-boards, .portlet-trash {
+	.category-buttons {
+		clear: both;
+		margin-bottom: 1em;
+	}
+
+	.category-subscriptions {
+		clear: both;
+		margin-bottom: 1em;
+		overflow: hidden;
+	}
+
+	.category-subscription-types {
+		float: right;
+		margin-bottom: 0;
+	}
+
+	.quote {
+		background: #FFF url(@theme_image_path@/message_boards/quoteleft.png) left top no-repeat;
+		border: 1px solid #777;
+		padding: 5px 0px 0px 5px;
+	}
+
+	.quote-content {
+		background: transparent url(@theme_image_path@/message_boards/quoteright.png) right bottom no-repeat;
+		padding: 5px 30px 10px 30px;
+	}
+
+	.quote-title {
+		font-weight: bold;
+		padding: 5px 0px 5px 0px;
+	}
+
+	.title {
+		border-bottom: 1px solid #CCC;
+		font-size: large;
+		font-weight: normal;
+		padding: 5px;
+	}
+
+	.trash-attachments {
+		float: right;
+	}
+
+	#messageBoardsPanelContainer {
+		border-width: 0;
+	}
+
+	.message-attachments {
+		h3 {
+			color: #333;
+			font-size: 1em;
+		}
+
+		ul {
+			list-style: none;
+		}
+
+		.message-attachment {
+			padding: 0.5em;
+		}
+
+		.deleted-input {
+			list-style: none;
+			margin-left: -2em;
+			padding: 0;
+		}
+
+		.undo {
+			font-weight: bold;
+		}
+	}
+
+	.message-container {
+		border: 1px solid #CCC;
+		margin: 5px 0 0 0;
+		overflow: auto;
+
+		table {
+			border-collapse: collapse;
+			table-layout: fixed;
+		}
+
+		.lfr-code table {
+			table-layout: auto;
+		}
+
+		td {
+			border-width: 0;
+		}
+	}
+
+	.thread-top {
+		border-bottom: 1px solid #CCC;
+		padding: 3px 5px;
+	}
+
+	.thread-bottom {
+		padding: 3px 5px;
+		vertical-align: bottom;
+	}
+
+	.taglib-ratings.thumbs .total-rating {
+		padding: 0 5px 0 10px;
+	}
+
+	td.user-info {
+		border-right: 1px solid #CCC;
+		width: 150px;
+	}
+
+	.subject {
+		float: left;
+	}
+
+	.edit-controls {
+		float: right;
+
+		li {
+			float: left;
+			margin-right: 10px;
+		}
+	}
+
+	.thread-body {
+		overflow: hidden;
+		padding: 15px;
+
+		td {
+			border: 1px solid #CCC;
+		}
+	}
+
+	.message-container .user-info {
+		border-right: 1px solid #CCC;
+		padding: 5px;
+	}
+
+	.clear {
+		clear: both;
+	}
+
+	.taglib-custom-attributes-list {
+		margin-bottom: 1em;
+	}
+
+	.message-boards-panels {
+		border-width: 0;
+	}
+
+	.statistics-panel {
+		border-width: 0;
+	}
+
+	.statistics-panel-content {
+		margin: 1em;
+
+		dt {
+			float: left;
+			font-weight: bold;
+			margin-right: 1em;
+		}
+	}
+
+	.question-details {
+		float: left;
+		white-space: nowrap;
+	}
+
+	.views {
+		color: #999;
+		clear: both;
+		float: left;
+		padding: 5px 0;
+		text-align: center;
+		width: 100%;
+
+		.count {
+			display: inline;
+			font-size: 1em;
+		}
+	}
+
+	.status, .votes {
+		display: inline-block;
+		height: 38px;
+		margin: 0 3px 0 0;
+		padding: 5px;
+		text-align: center;
+	}
+
+	.votes {
+		color: #555;
+		width: 40px;
+	}
+
+	.status {
+		width: 48px;
+	}
+
+	.answered {
+		background-color: #5BA018;
+		color: #FFF;
+	}
+
+	.unanswered {
+		background-color: #CF4937;
+		color: #FFF;
+	}
+
+	.count {
+		display: block;
+		font-size: 190%;
+		font-weight: bold;
+		height: 25px;
+	}
+
+	.toggle_id_message_boards_view_message_thread {
+		border: 1px solid #CCC;
+		clear: both;
+		margin: 5px 0 0 0;
+		width: 100%;
+	}
+
+	.thread-controls {
+		border: 1px solid #CCC;
+		margin-bottom: 5px;
+		padding: 3px 5px;
+	}
+
+	.thread-navigation {
+		float: left;
+	}
+
+	.thread-actions {
+		float: right;
+	}
+
+	.thread-user-rank {
+		display: block;
+	}
+
+	.thread-priority {
+		border-width: 0;
+		float: left;
+	}
+
+	.message-container .thread-message-view, .thread-view {
+		border-collapse: collapse;
+		min-width: 400px;
+		padding: 0;
+		width: 100%;
+	}
+
+	.thread-view-controls {
+		list-style: none;
+		margin: 0;
+		text-align: right;
+
+		li {
+			display: inline-block;
+		}
+	}
+
+	.emoticons {
+		border: 1px solid #CCC;
+		margin-left: 10px;
+	}
+
+	.tree {
+		vertical-align: middle;
+	}
+
+	.message-scroll {
+		margin: 5px 0 0 0;
+	}
+
+	.lfr-textarea {
+		&.message-edit {
+			height: 100%;
+			width: 100%;
+
+			textarea {
+				height: 378px;
+				min-height: 100%;
+				width: 99.5%;
+			}
+		}
+	}
+
+	.subcategories {
+		text-decoration: underline;
+	}
+
+	.taglib-flags {
+		float: left;
+		margin-left: 20px;
+	}
+
+	.threads-panel {
+		margin-top: 1em;
+	}
+
+	.displayStyle-question {
+		.action-question {
+			.taglib-text {
+				display: none;
+			}
+		}
+
+		.last-post {
+			margin-left: 1em;
+			width: 15%;
+		}
+
+		.stats {
+			width: 20%;
+		}
+
+		.question {
+			vertical-align: top;
+			width: 65%;
+		}
+
+		.last-post .portrait {
+			text-align: center;
+		}
+
+		.username {
+			text-align: center;
+		}
+
+		.time {
+			color: #777;
+			font-size: 0.9em;
+			font-weight: bold;
+			margin-top: 0.5em;
+			text-align: center;
+		}
+
+		.tags {
+			float: left;
+			margin-top: 0.5em;
+		}
+
+		.question-subject {
+			font-size: 125%;
+
+			#a {
+				color: #06C;
+			}
+		}
+
+		.summary {
+			color: #444;
+			font-size: 120%;
+		}
+	}
+
+	.search-root-entry {
+		color: #999;
+		float: right;
+	}
+}
+
+.ie {
+	.portlet-message-boards, .portlet-trash {
+		.message-container {
+			width: 100%;
+
+			.thread-body table {
+				table-layout: auto;
+			}
+		}
+	}
+}
+
+.ie6 {
+	.portlet-message-boards, .portlet-trash {
+		.code {
+			width: 100%;
+		}
+	}
+}
+
+.ie8 {
+	.question-details {
+		white-space: normal;
+	}
+}
+
+.trash-restore-popup {
+	.form {
+		fieldset {
+			margin-bottom: 0;
+			padding: 0 15px;
+		}
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/deleted_message_attachment_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/deleted_message_attachment_action.jsp
new file mode 100644
index 0000000..d27edd5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/deleted_message_attachment_action.jsp
@@ -0,0 +1,64 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+FileEntry fileEntry = (FileEntry)row.getObject();
+
+MBMessage message = MBMessageAttachmentsUtil.getMessage(fileEntry.getFileEntryId());
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= MBCategoryPermission.contains(permissionChecker, scopeGroupId, message.getCategoryId(), ActionKeys.ADD_FILE) %>">
+
+		<%
+		TrashEntry trashEntry = TrashEntryLocalServiceUtil.getEntry(DLFileEntry.class.getName(), fileEntry.getFileEntryId());
+		%>
+
+		<portlet:actionURL var="restoreEntryURL">
+			<portlet:param name="struts_action" value="/message_boards/restore_message_attachment" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.RESTORE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="trashEntryId" value="<%= String.valueOf(trashEntry.getEntryId()) %>" />
+		</portlet:actionURL>
+
+		<%
+		String taglibOnClick = "Liferay.fire('" + renderResponse.getNamespace() + "checkEntry', {trashEntryId: " + trashEntry.getEntryId() + ", uri: '" + restoreEntryURL.toString() + "'});";
+		%>
+
+		<liferay-ui:icon
+			image="undo"
+			message="restore"
+			onClick="<%= taglibOnClick %>"
+			url="javascript:;"
+		/>
+
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/message_boards/edit_message_attachments" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="messageId" value="<%= String.valueOf(message.getMessageId()) %>" />
+			<portlet:param name="fileName" value="<%= fileEntry.getTitle() %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete
+			url="<%= deleteURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/edit_category.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/edit_category.jsp
new file mode 100644
index 0000000..85eebe5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/edit_category.jsp
@@ -0,0 +1,251 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+MBCategory category = (MBCategory)request.getAttribute(WebKeys.MESSAGE_BOARDS_CATEGORY);
+
+long categoryId = MBUtil.getCategoryId(request, category);
+
+long parentCategoryId = BeanParamUtil.getLong(category, request, "parentCategoryId", MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID);
+
+String defaultDisplayStyle = MBCategoryConstants.DEFAULT_DISPLAY_STYLE;
+
+if ((category == null) && (parentCategoryId > 0)) {
+	MBCategory parentCategory = MBCategoryLocalServiceUtil.getCategory(parentCategoryId);
+
+	defaultDisplayStyle = parentCategory.getDisplayStyle();
+}
+
+String displayStyle = BeanParamUtil.getString(category, request, "displayStyle", defaultDisplayStyle);
+
+MBMailingList mailingList = null;
+
+try {
+	if (categoryId > 0) {
+		mailingList = MBMailingListLocalServiceUtil.getCategoryMailingList(scopeGroupId, categoryId);
+	}
+}
+catch (NoSuchMailingListException nsmle) {
+}
+
+if ((category == null) && (mailingList == null)) {
+	try {
+		if (parentCategoryId > 0) {
+			mailingList = MBMailingListLocalServiceUtil.getCategoryMailingList(scopeGroupId, parentCategoryId);
+		}
+	}
+	catch (NoSuchMailingListException nsmle) {
+	}
+}
+
+if (category != null) {
+	MBUtil.addPortletBreadcrumbEntries(category, request, renderResponse);
+
+	if (!layout.isTypeControlPanel()) {
+		PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit"), currentURL);
+	}
+}
+else {
+	if (parentCategoryId > 0) {
+		MBUtil.addPortletBreadcrumbEntries(parentCategoryId, request, renderResponse);
+	}
+
+	if (!layout.isTypeControlPanel()) {
+		PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "add-category[message-board]"), currentURL);
+	}
+}
+%>
+
+<liferay-util:include page="/html/portlet/message_boards/top_links.jsp" />
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	localizeTitle="<%= (category == null) %>"
+	title='<%= (category == null) ? "add-category[message-board]" : LanguageUtil.format(pageContext, "edit-x", category.getName()) %>'
+/>
+
+<portlet:actionURL var="editCategoryURL">
+	<portlet:param name="struts_action" value="/message_boards/edit_category" />
+</portlet:actionURL>
+
+<aui:form action="<%= editCategoryURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveCategory();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="mbCategoryId" type="hidden" value="<%= categoryId %>" />
+	<aui:input name="parentCategoryId" type="hidden" value="<%= parentCategoryId %>" />
+
+	<liferay-ui:error exception="<%= CaptchaMaxChallengesException.class %>" message="maximum-number-of-captcha-attempts-exceeded" />
+	<liferay-ui:error exception="<%= CaptchaTextException.class %>" message="text-verification-failed" />
+	<liferay-ui:error exception="<%= CategoryNameException.class %>" message="please-enter-a-valid-name" />
+	<liferay-ui:error exception="<%= MailingListEmailAddressException.class %>" message="please-enter-a-valid-email-address" />
+	<liferay-ui:error exception="<%= MailingListInServerNameException.class %>" message="please-enter-a-valid-incoming-server-name" />
+	<liferay-ui:error exception="<%= MailingListInUserNameException.class %>" message="please-enter-a-valid-incoming-user-name" />
+	<liferay-ui:error exception="<%= MailingListOutEmailAddressException.class %>" message="please-enter-a-valid-outgoing-email-address" />
+	<liferay-ui:error exception="<%= MailingListOutServerNameException.class %>" message="please-enter-a-valid-outgoing-server-name" />
+	<liferay-ui:error exception="<%= MailingListOutUserNameException.class %>" message="please-enter-a-valid-outgoing-user-name" />
+
+	<aui:model-context bean="<%= category %>" model="<%= MBCategory.class %>" />
+
+	<aui:fieldset>
+		<c:if test="<%= parentCategoryId != MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID %>">
+
+			<%
+			String parentCategoryName = StringPool.BLANK;
+
+			try {
+				MBCategory parentCategory = MBCategoryLocalServiceUtil.getCategory(parentCategoryId);
+
+				parentCategoryName = parentCategory.getName();
+			}
+			catch (NoSuchCategoryException nsce) {
+			}
+			%>
+
+			<c:if test="<%= category != null %>">
+				<aui:field-wrapper label="parent-category[message-board]">
+					<liferay-ui:input-resource id="parentCategoryName" url="<%= parentCategoryName %>" />
+				</aui:field-wrapper>
+			</c:if>
+		</c:if>
+
+		<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" name="name" />
+
+		<aui:input name="description" />
+
+		<aui:select name="displayStyle">
+
+			<%
+			for (int i = 0; i < MBCategoryConstants.DISPLAY_STYLES.length; i++) {
+			%>
+
+				<aui:option label="<%= MBCategoryConstants.DISPLAY_STYLES[i] %>" selected="<%= displayStyle.equals(MBCategoryConstants.DISPLAY_STYLES[i]) %>" />
+
+			<%
+			}
+			%>
+
+		</aui:select>
+
+		<liferay-ui:custom-attributes-available className="<%= MBCategory.class.getName() %>">
+			<liferay-ui:custom-attribute-list
+				className="<%= MBCategory.class.getName() %>"
+				classPK="<%= (category != null) ? category.getCategoryId() : 0 %>"
+				editable="<%= true %>"
+				label="<%= true %>"
+			/>
+		</liferay-ui:custom-attributes-available>
+
+		<c:if test="<%= category == null %>">
+			<aui:field-wrapper label="permissions">
+				<liferay-ui:input-permissions
+					modelName="<%= MBCategory.class.getName() %>"
+				/>
+			</aui:field-wrapper>
+		</c:if>
+
+		<br />
+
+		<liferay-ui:panel-container extended="<%= true %>" id="messageBoardsCategoryPanelContainer" persistState="<%= true %>">
+			<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="messageBoardsMailingListPanel" persistState="<%= true %>" title="mailing-list">
+
+				<aui:model-context bean="<%= mailingList %>" model="<%= MBMailingList.class %>" />
+
+				<aui:input fieldParam="mailingListActive" name="active" />
+
+				<aui:input label="allow-anonymous-emails" name="allowAnonymous" />
+
+				<div id="<portlet:namespace />mailingListSettings">
+					<aui:input name="emailAddress" />
+
+					<br />
+
+					<aui:fieldset label="incoming">
+
+						<%
+						String protocol = BeanParamUtil.getString(mailingList, request, "inProtocol", "pop3");
+						%>
+
+						<aui:field-wrapper label="protocol">
+							<aui:input checked='<%= protocol.startsWith("pop3") %>' label="pop" name="inProtocol" type="radio" value="pop3" />
+							<aui:input checked='<%= protocol.startsWith("imap") %>' label="imap" name="inProtocol" type="radio" value="imap" />
+						</aui:field-wrapper>
+
+						<aui:input label="server-name" name="inServerName" />
+
+						<aui:input label="server-port" name="inServerPort" value="110" />
+
+						<aui:input label="use-a-secure-network-connection" name="inUseSSL" />
+
+						<aui:input label="user-name" name="inUserName" />
+
+						<aui:input label="password" name="inPassword" />
+
+						<aui:input label="read-interval-minutes" name="inReadInterval" value="5" />
+					</aui:fieldset>
+
+					<aui:fieldset label="outgoing">
+						<aui:input label="email-address" name="outEmailAddress" />
+
+						<aui:input label="use-custom-outgoing-server" name="outCustom" />
+
+						<div id="<portlet:namespace />outCustomSettings">
+							<aui:input label="server-name" name="outServerName" />
+
+							<aui:input label="server-port" name="outServerPort" value="25" />
+
+							<aui:input label="use-a-secure-network-connection" name="outUseSSL" />
+
+							<aui:input label="user-name" name="outUserName" />
+
+							<aui:input label="password" name="outPassword" />
+						</div>
+					</aui:fieldset>
+				</div>
+			</liferay-ui:panel>
+		</liferay-ui:panel-container>
+	</aui:fieldset>
+
+	<br />
+
+	<c:if test="<%= (category == null) && PropsValues.CAPTCHA_CHECK_PORTLET_MESSAGE_BOARDS_EDIT_CATEGORY %>">
+		<portlet:resourceURL var="captchaURL">
+			<portlet:param name="struts_action" value="/message_boards/captcha" />
+		</portlet:resourceURL>
+
+		<liferay-ui:captcha url="<%= captchaURL %>" />
+	</c:if>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />saveCategory() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (category == null) ? Constants.ADD : Constants.UPDATE %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	Liferay.Util.toggleBoxes('<portlet:namespace />mailingListActiveCheckbox', '<portlet:namespace />mailingListSettings');
+	Liferay.Util.toggleBoxes('<portlet:namespace />outCustomCheckbox', '<portlet:namespace />outCustomSettings');
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/edit_discussion.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/edit_discussion.jsp
new file mode 100644
index 0000000..b8581f0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/edit_discussion.jsp
@@ -0,0 +1,128 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+MBMessage message = (MBMessage)request.getAttribute(WebKeys.MESSAGE_BOARDS_MESSAGE);
+
+long messageId = BeanParamUtil.getLong(message, request, "messageId");
+
+long threadId = BeanParamUtil.getLong(message, request, "threadId");
+long parentMessageId = BeanParamUtil.getLong(message, request, "parentMessageId", MBMessageConstants.DEFAULT_PARENT_MESSAGE_ID);
+
+MBMessage curParentMessage = null;
+
+if (threadId > 0) {
+	try {
+		curParentMessage = MBMessageLocalServiceUtil.getMessage(parentMessageId);
+	}
+	catch (Exception e) {
+	}
+
+	if (curParentMessage.isRoot() && curParentMessage.isDiscussion()) {
+		curParentMessage = null;
+	}
+}
+
+boolean pending = false;
+
+if (message != null) {
+	pending = message.isPending();
+}
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	localizeTitle="<%= (message == null) %>"
+	title='<%= (message == null) ? "new-message" : message.getSubject() %>'
+/>
+
+<portlet:actionURL var="editMessageURL">
+	<portlet:param name="struts_action" value="/message_boards/edit_discussion" />
+</portlet:actionURL>
+
+<aui:form action="<%= editMessageURL %>" enctype="multipart/form-data" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveMessage(" + pending + ");" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="messageId" type="hidden" value="<%= messageId %>" />
+	<aui:input name="threadId" type="hidden" value="<%= threadId %>" />
+	<aui:input name="parentMessageId" type="hidden" value="<%= parentMessageId %>" />
+	<aui:input name="workflowAction" type="hidden" value="<%= String.valueOf(WorkflowConstants.ACTION_SAVE_DRAFT) %>" />
+
+	<liferay-ui:error exception="<%= CaptchaTextException.class %>" message="text-verification-failed" />
+	<liferay-ui:error exception="<%= MessageBodyException.class %>" message="please-enter-a-valid-message" />
+
+	<aui:model-context bean="<%= message %>" model="<%= MBMessage.class %>" />
+
+	<aui:fieldset>
+		<c:if test="<%= message != null %>">
+			<aui:workflow-status status="<%= message.getStatus() %>" />
+		</c:if>
+
+		<aui:input autoFocus="<%= (windowState.equals(WindowState.MAXIMIZED) && !themeDisplay.isFacebook()) %>" name="body" style='<%= "height: " + ModelHintsConstants.TEXTAREA_DISPLAY_HEIGHT + "px; width: " + ModelHintsConstants.TEXTAREA_DISPLAY_WIDTH + "px;" %>' type="textarea" wrap="soft" />
+	</aui:fieldset>
+
+	<c:if test="<%= curParentMessage != null %>">
+		<liferay-ui:message key="replying-to" />:
+
+		<%
+		request.setAttribute(WebKeys.MESSAGE_BOARDS_MESSAGE, curParentMessage);
+		%>
+
+		<liferay-util:include page="/html/portlet/message_boards/asset/discussion_full_content.jsp" />
+	</c:if>
+
+	<c:if test="<%= pending %>">
+		<div class="alert alert-info">
+			<liferay-ui:message key="there-is-a-publication-workflow-in-process" />
+		</div>
+	</c:if>
+
+	<aui:button-row>
+		<c:if test="<%= (message == null) || !message.isApproved() %>">
+			<aui:button type="submit" />
+		</c:if>
+
+		<c:if test="<%= (message != null) && message.isApproved() && WorkflowDefinitionLinkLocalServiceUtil.hasWorkflowDefinitionLink(message.getCompanyId(), message.getGroupId(), MBMessage.class.getName()) %>">
+			<div class="alert alert-info">
+				<%= LanguageUtil.format(pageContext, "this-x-is-approved.-publishing-these-changes-will-cause-it-to-be-unpublished-and-go-through-the-approval-process-again", ResourceActionsUtil.getModelResource(locale, MBMessage.class.getName())) %>
+			</div>
+		</c:if>
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />saveMessage(pending) {
+		if (!pending) {
+			document.<portlet:namespace />fm.<portlet:namespace />workflowAction.value = <%= WorkflowConstants.ACTION_PUBLISH %>;
+		}
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
+
+<%
+if (message != null) {
+	MBUtil.addPortletBreadcrumbEntries(message, request, renderResponse);
+
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "update-message"), currentURL);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/edit_message.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/edit_message.jsp
new file mode 100644
index 0000000..a066020
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/edit_message.jsp
@@ -0,0 +1,602 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+MBMessage message = (MBMessage)request.getAttribute(WebKeys.MESSAGE_BOARDS_MESSAGE);
+
+long messageId = BeanParamUtil.getLong(message, request, "messageId");
+
+long categoryId = MBUtil.getCategoryId(request, message);
+long threadId = BeanParamUtil.getLong(message, request, "threadId");
+long parentMessageId = BeanParamUtil.getLong(message, request, "parentMessageId", MBMessageConstants.DEFAULT_PARENT_MESSAGE_ID);
+
+String subject = BeanParamUtil.getString(message, request, "subject");
+
+MBThread thread = null;
+
+MBMessage curParentMessage = null;
+String parentAuthor = null;
+
+if (threadId > 0) {
+	try {
+		curParentMessage = MBMessageLocalServiceUtil.getMessage(parentMessageId);
+
+		if (Validator.isNull(subject)) {
+			if (curParentMessage.getSubject().startsWith("RE: ")) {
+				subject = curParentMessage.getSubject();
+			}
+			else {
+				subject = "RE: " + curParentMessage.getSubject();
+			}
+		}
+
+		parentAuthor = curParentMessage.isAnonymous() ? LanguageUtil.get(pageContext, "anonymous") : HtmlUtil.escape(PortalUtil.getUserName(curParentMessage));
+	}
+	catch (Exception e) {
+	}
+}
+
+String body = BeanParamUtil.getString(message, request, "body");
+boolean preview = ParamUtil.getBoolean(request, "preview");
+boolean quote = ParamUtil.getBoolean(request, "quote");
+boolean splitThread = ParamUtil.getBoolean(request, "splitThread");
+
+List<FileEntry> existingAttachmentsFileEntries = new ArrayList<FileEntry>();
+
+if (message != null) {
+	existingAttachmentsFileEntries = message.getAttachmentsFileEntries();
+}
+
+boolean allowPingbacks = PropsValues.MESSAGE_BOARDS_PINGBACK_ENABLED && BeanParamUtil.getBoolean(message, request, "allowPingbacks", true);
+
+if (Validator.isNull(redirect)) {
+	PortletURL viewMessageURL = renderResponse.createRenderURL();
+
+	viewMessageURL.setParameter("struts_action", "/message_boards/view_message");
+	viewMessageURL.setParameter("messageId", String.valueOf(messageId));
+
+	redirect = viewMessageURL.toString();
+}
+
+if (curParentMessage != null) {
+
+	MBUtil.addPortletBreadcrumbEntries(curParentMessage, request, renderResponse);
+
+	if (!layout.isTypeControlPanel()) {
+		PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "reply"), currentURL);
+	}
+}
+else if (message != null) {
+	MBUtil.addPortletBreadcrumbEntries(message, request, renderResponse);
+
+	if (!layout.isTypeControlPanel()) {
+		PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit"), currentURL);
+	}
+}
+else {
+	MBUtil.addPortletBreadcrumbEntries(categoryId, request, renderResponse);
+
+	if (!layout.isTypeControlPanel()) {
+		PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "add-message"), currentURL);
+	}
+}
+%>
+
+<liferay-util:include page="/html/portlet/message_boards/top_links.jsp" />
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	localizeTitle="<%= (message == null) %>"
+	title='<%= (curParentMessage != null) ? LanguageUtil.format(pageContext, "reply-to-x", curParentMessage.getSubject()) : (message == null) ? "add-message" : LanguageUtil.format(pageContext, "edit-x", message.getSubject()) %>'
+/>
+
+<c:if test="<%= preview %>">
+	<liferay-ui:message key="preview" />:
+
+	<%
+	MBMessage previewMessage = message;
+
+	if (message == null) {
+		previewMessage = new MBMessageImpl();
+
+		previewMessage.setMessageId(messageId);
+		previewMessage.setCompanyId(user.getCompanyId());
+		previewMessage.setUserId(user.getUserId());
+		previewMessage.setUserName(user.getFullName());
+		previewMessage.setCreateDate(new Date());
+		previewMessage.setModifiedDate(new Date());
+		previewMessage.setThreadId(threadId);
+		previewMessage.setFormat(messageFormat);
+		previewMessage.setAnonymous(ParamUtil.getBoolean(request, "anonymous"));
+	}
+
+	previewMessage.setSubject(subject);
+	previewMessage.setBody(body);
+
+	MBCategory category = null;
+
+	int depth = 0;
+
+	request.setAttribute("edit_message.jsp-assetTagNames", ParamUtil.getString(request, "assetTagNames"));
+	request.setAttribute("edit_message.jsp-category", category);
+	request.setAttribute("edit_message.jsp-depth", depth);
+	request.setAttribute("edit_message.jsp-editable", Boolean.FALSE);
+	request.setAttribute("edit_message.jsp-message", previewMessage);
+	request.setAttribute("edit-message.jsp-showPermanentLink", Boolean.TRUE);
+	request.setAttribute("edit_message.jsp-thread", thread);
+	%>
+
+	<liferay-util:include page="/html/portlet/message_boards/view_thread_message.jsp" />
+
+	<%
+	request.removeAttribute("edit_message.jsp-assetTagNames");
+	%>
+
+	<br />
+</c:if>
+
+<portlet:actionURL var="editMessageURL">
+	<portlet:param name="struts_action" value="/message_boards/edit_message" />
+</portlet:actionURL>
+
+<aui:form action="<%= editMessageURL %>" enctype="multipart/form-data" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveMessage(false);" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="messageId" type="hidden" value="<%= messageId %>" />
+	<aui:input name="mbCategoryId" type="hidden" value="<%= categoryId %>" />
+	<aui:input name="threadId" type="hidden" value="<%= threadId %>" />
+	<aui:input name="parentMessageId" type="hidden" value="<%= parentMessageId %>" />
+	<aui:input name="preview" type="hidden" />
+	<aui:input name="workflowAction" type="hidden" value="<%= String.valueOf(WorkflowConstants.ACTION_SAVE_DRAFT) %>" />
+
+	<liferay-ui:error exception="<%= CaptchaMaxChallengesException.class %>" message="maximum-number-of-captcha-attempts-exceeded" />
+	<liferay-ui:error exception="<%= CaptchaTextException.class %>" message="text-verification-failed" />
+	<liferay-ui:error exception="<%= LockedThreadException.class %>" message="thread-is-locked" />
+	<liferay-ui:error exception="<%= MessageBodyException.class %>" message="please-enter-a-valid-message" />
+	<liferay-ui:error exception="<%= MessageSubjectException.class %>" message="please-enter-a-valid-subject" />
+
+	<liferay-ui:error exception="<%= FileExtensionException.class %>">
+		<liferay-ui:message key="document-names-must-end-with-one-of-the-following-extensions" /><%= StringUtil.merge(PrefsPropsUtil.getStringArray(PropsKeys.DL_FILE_EXTENSIONS, StringPool.COMMA), StringPool.COMMA_AND_SPACE) %>.
+	</liferay-ui:error>
+
+	<liferay-ui:error exception="<%= FileNameException.class %>" message="please-enter-a-file-with-a-valid-file-name" />
+
+	<liferay-ui:error exception="<%= FileSizeException.class %>">
+
+		<%
+		long fileMaxSize = PrefsPropsUtil.getLong(PropsKeys.DL_FILE_MAX_SIZE);
+
+		if (fileMaxSize == 0) {
+			fileMaxSize = PrefsPropsUtil.getLong(PropsKeys.UPLOAD_SERVLET_REQUEST_IMPL_MAX_SIZE);
+		}
+
+		fileMaxSize /= 1024;
+		%>
+
+		<liferay-ui:message arguments="<%= fileMaxSize %>" key="please-enter-a-file-with-a-valid-file-size-no-larger-than-x" />
+	</liferay-ui:error>
+
+	<liferay-ui:asset-categories-error />
+
+	<liferay-ui:asset-tags-error />
+
+	<aui:model-context bean="<%= message %>" model="<%= MBMessage.class %>" />
+
+	<aui:fieldset>
+		<c:if test="<%= message != null %>">
+			<aui:workflow-status status="<%= message.getStatus() %>" />
+		</c:if>
+
+		<aui:input autoFocus="<%= (windowState.equals(WindowState.MAXIMIZED) && !themeDisplay.isFacebook()) %>" name="subject" value="<%= subject %>" />
+
+		<aui:field-wrapper label="body">
+			<c:choose>
+				<c:when test='<%= ((messageId != 0) && message.isFormatBBCode()) || ((messageId == 0) && messageFormat.equals("bbcode")) %>'>
+					<%@ include file="/html/portlet/message_boards/bbcode_editor.jspf" %>
+				</c:when>
+				<c:otherwise>
+					<%@ include file="/html/portlet/message_boards/html_editor.jspf" %>
+				</c:otherwise>
+			</c:choose>
+			<aui:input name="body" type="hidden" />
+		</aui:field-wrapper>
+
+		<liferay-ui:custom-attributes-available className="<%= MBMessage.class.getName() %>">
+			<liferay-ui:custom-attribute-list
+				className="<%= MBMessage.class.getName() %>"
+				classPK="<%= messageId %>"
+				editable="<%= true %>"
+				label="<%= true %>"
+			/>
+		</liferay-ui:custom-attributes-available>
+
+		<c:if test="<%= curParentMessage == null %>">
+
+			<%
+			boolean disabled = false;
+			boolean question = threadAsQuestionByDefault;
+
+			if (message != null) {
+				thread = MBThreadLocalServiceUtil.getThread(threadId);
+
+				if (thread.isQuestion() || message.isAnswer()) {
+					question = true;
+				}
+			}
+			else {
+				MBCategory category = MBCategoryLocalServiceUtil.getCategory(categoryId);
+
+				if ((category != null) && category.getDisplayStyle().equals("question")) {
+					disabled = true;
+					question = true;
+				}
+			}
+			%>
+
+			<aui:input disabled="<%= disabled %>" helpMessage="message-boards-message-question-help" label="mark-as-a-question" name="question" type="checkbox" value="<%= question %>" />
+		</c:if>
+
+		<c:if test="<%= (message == null) && themeDisplay.isSignedIn() && allowAnonymousPosting %>">
+			<aui:input helpMessage="message-boards-message-anonymous-help" name="anonymous" type="checkbox" />
+		</c:if>
+
+		<c:if test="<%= (message == null) && themeDisplay.isSignedIn() && !SubscriptionLocalServiceUtil.isSubscribed(themeDisplay.getCompanyId(), user.getUserId(), MBThread.class.getName(), threadId) && !SubscriptionLocalServiceUtil.isSubscribed(themeDisplay.getCompanyId(), user.getUserId(), MBCategory.class.getName(), categoryId) %>">
+			<aui:input helpMessage="message-boards-message-subscribe-me-help" label="subscribe-me" name="subscribe" type='<%= (MBUtil.getEmailMessageAddedEnabled(portletPreferences) || MBUtil.getEmailMessageUpdatedEnabled(portletPreferences)) ? "checkbox" : "hidden" %>' value="<%= subscribeByDefault %>" />
+		</c:if>
+
+		<c:if test="<%= (priorities.length > 0) && MBCategoryPermission.contains(permissionChecker, scopeGroupId, categoryId, ActionKeys.UPDATE_THREAD_PRIORITY) %>">
+
+			<%
+			double threadPriority = BeanParamUtil.getDouble(message, request, "priority");
+			%>
+
+			<aui:select name="priority">
+				<aui:option value="" />
+
+				<%
+				for (int i = 0; i < priorities.length; i++) {
+					String[] priority = StringUtil.split(priorities[i]);
+
+					try {
+						String priorityName = priority[0];
+						String priorityImage = priority[1];
+						double priorityValue = GetterUtil.getDouble(priority[2]);
+
+						if (priorityValue > 0) {
+				%>
+
+							<aui:option label="<%= priorityName %>" selected="<%= (threadPriority == priorityValue) %>" value="<%= priorityValue %>" />
+
+				<%
+						}
+					}
+					catch (Exception e) {
+					}
+				}
+				%>
+
+			</aui:select>
+		</c:if>
+
+		<c:if test="<%= PropsValues.MESSAGE_BOARDS_PINGBACK_ENABLED %>">
+			<aui:input helpMessage="to-allow-pingbacks,-please-also-ensure-the-entry's-guest-view-permission-is-enabled" label="allow-pingbacks" name="allowPingbacks" value="<%= allowPingbacks %>" />
+		</c:if>
+
+		<c:if test="<%= message == null %>">
+			<aui:field-wrapper label="permissions">
+				<liferay-ui:input-permissions
+					modelName="<%= MBMessage.class.getName() %>"
+				/>
+			</aui:field-wrapper>
+		</c:if>
+
+		<c:if test="<%= MBCategoryPermission.contains(permissionChecker, scopeGroupId, categoryId, ActionKeys.ADD_FILE) %>">
+			<liferay-ui:panel cssClass="message-attachments" defaultState="closed" extended="<%= false %>" id="mbMessageAttachmentsPanel" persistState="<%= true %>" title="attachments">
+				<c:if test="<%= existingAttachmentsFileEntries.size() > 0 %>">
+					<ul>
+
+						<%
+						for (int i = 0; i < existingAttachmentsFileEntries.size(); i++) {
+							FileEntry fileEntry = existingAttachmentsFileEntries.get(i);
+
+							String taglibDeleteAttachment = "javascript:;";
+
+							if (!TrashUtil.isTrashEnabled(scopeGroupId)) {
+								taglibDeleteAttachment = "javascript:" + renderResponse.getNamespace() + "deleteAttachment(" + (i + 1) + ");";
+							}
+						%>
+
+							<li class="message-attachment">
+								<span id="<portlet:namespace />existingFile<%= i + 1 %>">
+									<aui:input id='<%= "existingPath" + (i + 1) %>' name='<%= "existingPath" + (i + 1) %>' type="hidden" value="<%= fileEntry.getFileEntryId() %>" />
+
+									<liferay-ui:icon
+										image='<%= "../file_system/small/" + DLUtil.getFileIcon(fileEntry.getExtension()) %>'
+										label="<%= true %>"
+										message="<%= fileEntry.getTitle() %>"
+									/>
+								</span>
+
+								<aui:input cssClass="hide" label="" name='<%= "msgFile" + (i + 1) %>' size="70" type="file" />
+
+								<liferay-ui:icon-delete
+									id='<%= "removeExisting" + (i + 1) %>'
+									label="<%= true %>"
+									message='<%= TrashUtil.isTrashEnabled(scopeGroupId) ? "remove" : "delete" %>'
+									method="get"
+									trash="<%= TrashUtil.isTrashEnabled(scopeGroupId) %>"
+									url="<%= taglibDeleteAttachment %>"
+								/>
+
+								<c:if test="<%= TrashUtil.isTrashEnabled(scopeGroupId) %>">
+
+									<%
+									StringBundler sb = new StringBundler(7);
+
+									sb.append("javascript:");
+									sb.append(renderResponse.getNamespace());
+									sb.append("trashAttachment(");
+									sb.append(i + 1);
+									sb.append(", '");
+									sb.append(Constants.RESTORE);
+									sb.append("');");
+									%>
+
+									<span class="hide" id="<portlet:namespace />undoFile<%= i + 1 %>">
+										<aui:input id='<%= "undoPath" + (i + 1) %>' name='<%= "undoPath" + (i + 1) %>' type="hidden" value="<%= fileEntry.getFileEntryId() %>" />
+
+										<span class="undo">(<liferay-ui:message key="marked-as-removed" />)</span> <a class="trash-undo-link" href="<%= sb.toString() %>" id="<portlet:namespace />undo"><liferay-ui:message key="undo" /></a>
+									</span>
+								</c:if>
+							</li>
+
+						<%
+						}
+						%>
+
+					</ul>
+				</c:if>
+
+				<%
+				for (int i = existingAttachmentsFileEntries.size() + 1; i <= 5; i++) {
+				%>
+
+					<div>
+						<aui:input label="" name='<%= "msgFile" + i %>' size="70" type="file" />
+					</div>
+
+				<%
+				}
+				%>
+
+			</liferay-ui:panel>
+		</c:if>
+
+		<c:if test="<%= (curParentMessage == null) || childrenMessagesTaggable %>">
+			<liferay-ui:panel defaultState="closed" extended="<%= false %>" id="mbMessageCategorizationPanel" persistState="<%= true %>" title="categorization">
+				<aui:input name="tags" type="assetTags" />
+			</liferay-ui:panel>
+		</c:if>
+
+		<liferay-ui:panel defaultState="closed" extended="<%= false %>" id="mbMessageAssetLinksPanel" persistState="<%= true %>" title="related-assets">
+			<aui:fieldset>
+				<liferay-ui:input-asset-links
+					className="<%= MBMessage.class.getName() %>"
+					classPK="<%= (message != null) ? message.getMessageId() : 0 %>"
+				/>
+			</aui:fieldset>
+		</liferay-ui:panel>
+	</aui:fieldset>
+
+	<c:if test="<%= (message == null) && PropsValues.CAPTCHA_CHECK_PORTLET_MESSAGE_BOARDS_EDIT_MESSAGE %>">
+		<portlet:resourceURL var="captchaURL">
+			<portlet:param name="struts_action" value="/message_boards/captcha" />
+		</portlet:resourceURL>
+
+		<liferay-ui:captcha url="<%= captchaURL %>" />
+	</c:if>
+
+	<%
+	boolean pending = false;
+
+	if (message != null) {
+		pending = message.isPending();
+	}
+	%>
+
+	<c:if test="<%= pending %>">
+		<div class="alert alert-info">
+			<liferay-ui:message key="there-is-a-publication-workflow-in-process" />
+		</div>
+	</c:if>
+
+	<aui:button-row>
+
+		<%
+		String saveButtonLabel = "save";
+
+		if ((message == null) || message.isDraft() || message.isApproved()) {
+			saveButtonLabel = "save-as-draft";
+		}
+
+		String publishButtonLabel = "publish";
+
+		if (WorkflowDefinitionLinkLocalServiceUtil.hasWorkflowDefinitionLink(themeDisplay.getCompanyId(), scopeGroupId, MBMessage.class.getName())) {
+			publishButtonLabel = "submit-for-publication";
+		}
+		%>
+
+		<c:if test="<%= (message != null) && message.isApproved() && WorkflowDefinitionLinkLocalServiceUtil.hasWorkflowDefinitionLink(message.getCompanyId(), message.getGroupId(), MBMessage.class.getName()) %>">
+			<div class="alert alert-info">
+				<%= LanguageUtil.format(pageContext, "this-x-is-approved.-publishing-these-changes-will-cause-it-to-be-unpublished-and-go-through-the-approval-process-again", ResourceActionsUtil.getModelResource(locale, MBMessage.class.getName())) %>
+			</div>
+		</c:if>
+
+		<c:if test="<%= themeDisplay.isSignedIn() %>">
+			<aui:button name="saveButton" onClick='<%= renderResponse.getNamespace() + "saveMessage(true);" %>' value="<%= saveButtonLabel %>" />
+		</c:if>
+
+		<aui:button onClick='<%= renderResponse.getNamespace() + "previewMessage();" %>' value="preview" />
+
+		<aui:button disabled="<%= pending %>" name="publishButton" type="submit" value="<%= publishButtonLabel %>" />
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+
+	<c:if test="<%= curParentMessage != null %>">
+		<br /><br />
+
+		<liferay-ui:message key="replying-to" />:
+
+		<%
+		message = curParentMessage;
+		MBCategory category = null;
+
+		int depth = 0;
+
+		request.setAttribute("edit_message.jsp-category", category);
+		request.setAttribute("edit_message.jsp-depth", depth);
+		request.setAttribute("edit_message.jsp-editable", Boolean.FALSE);
+		request.setAttribute("edit_message.jsp-message", message);
+		request.setAttribute("edit-message.jsp-showPermanentLink", Boolean.TRUE);
+		request.setAttribute("edit_message.jsp-thread", thread);
+		%>
+
+		<liferay-util:include page="/html/portlet/message_boards/view_thread_message.jsp" />
+	</c:if>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />getSuggestionsContent() {
+		return document.<portlet:namespace />fm.<portlet:namespace />subject.value + ' ' + <portlet:namespace />getHTML();
+	}
+
+	function <portlet:namespace />previewMessage() {
+		document.<portlet:namespace />fm.<portlet:namespace />body.value = <portlet:namespace />getHTML();
+		document.<portlet:namespace />fm.<portlet:namespace />preview.value = 'true';
+
+		<portlet:namespace />saveMessage(true);
+	}
+
+	function <portlet:namespace />saveMessage(draft) {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (message == null) ? Constants.ADD : Constants.UPDATE %>";
+		document.<portlet:namespace />fm.<portlet:namespace />body.value = <portlet:namespace />getHTML();
+
+		if (!draft) {
+			document.<portlet:namespace />fm.<portlet:namespace />preview.value = <%= preview %>;
+			document.<portlet:namespace />fm.<portlet:namespace />workflowAction.value = <%= WorkflowConstants.ACTION_PUBLISH %>;
+		}
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />selectCategory(categoryId, categoryName) {
+		document.<portlet:namespace />fm.<portlet:namespace />mbCategoryId.value = categoryId;
+
+		var nameEl = document.getElementById("<portlet:namespace />categoryName");
+
+		nameEl.href = "<portlet:renderURL><portlet:param name="struts_action" value="/message_boards/view" /></portlet:renderURL>&<portlet:namespace />mbCategoryId=" + categoryId;
+		nameEl.innerHTML = categoryName + "&nbsp;";
+	}
+
+	<c:choose>
+		<c:when test="<%= TrashUtil.isTrashEnabled(scopeGroupId) %>">
+			Liferay.provide(
+				window,
+				'<portlet:namespace />trashAttachment',
+				function(index, action) {
+					var A = AUI();
+
+					var existingPath = A.one('#<portlet:namespace />existingPath' + index);
+					var removeExisting = A.one('#<portlet:namespace />removeExisting' + index);
+					var undoFile = A.one('#<portlet:namespace />undoFile' + index);
+					var undoPath = A.one('#<portlet:namespace />undoPath' + index);
+
+					if (action == '<%= Constants.MOVE_TO_TRASH %>') {
+						removeExisting.hide();
+						undoFile.show();
+
+						existingPath.set('value', '');
+					}
+					else {
+						removeExisting.show();
+						undoFile.hide();
+
+						existingPath.set('value', undoPath.get('value'));
+					}
+				},
+				['aui-base']
+			);
+		</c:when>
+		<c:otherwise>
+			Liferay.provide(
+				window,
+				'<portlet:namespace />deleteAttachment',
+				function(index) {
+					var A = AUI();
+
+					var button = A.one('#<portlet:namespace />removeExisting' + index);
+					var span = A.one('#<portlet:namespace />existingFile' + index);
+					var file = A.one('#<portlet:namespace />msgFile' + index);
+
+					if (button) {
+						button.remove();
+					}
+
+					if (span) {
+						span.remove();
+					}
+
+					if (file) {
+						file.ancestor('.field').show();
+
+						file.ancestor('li').addClass('deleted-input');
+					}
+				},
+				['aui-base']
+			);
+		</c:otherwise>
+	</c:choose>
+</aui:script>
+
+<c:if test="<%= TrashUtil.isTrashEnabled(scopeGroupId) %>">
+	<aui:script use="aui-base">
+
+		<%
+		for (int i = 1; i <= existingAttachmentsFileEntries.size(); i++) {
+		%>
+
+			var removeExisting = A.one('#<portlet:namespace />removeExisting' + <%= i %>);
+
+			if (removeExisting) {
+				removeExisting.on(
+					'click',
+					function(event) {
+						<portlet:namespace />trashAttachment(<%= i %>, '<%= Constants.MOVE_TO_TRASH %>');
+					}
+				);
+			}
+
+		<%
+		}
+		%>
+
+	</aui:script>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/edit_message_quick.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/edit_message_quick.jspf
new file mode 100644
index 0000000..86b66e7
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/edit_message_quick.jspf
@@ -0,0 +1,129 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+MBMessage replyMessage = null;
+
+long messageId = 0;
+
+long categoryId = messageDisplay.getMessage().getCategoryId();
+long threadId = messageDisplay.getMessage().getThreadId();
+long parentMessageId = messageDisplay.getMessage().getMessageId();
+
+String subject = BeanParamUtil.getString(replyMessage, request, "subject");
+
+MBMessage curParentMessage = null;
+String parentAuthor = null;
+
+if (threadId > 0) {
+	try {
+		curParentMessage = MBMessageLocalServiceUtil.getMessage(parentMessageId);
+
+		if (Validator.isNull(subject)) {
+			if (curParentMessage.getSubject().startsWith("RE: ")) {
+				subject = curParentMessage.getSubject();
+			}
+			else {
+				subject = "RE: " + curParentMessage.getSubject();
+			}
+		}
+
+		parentAuthor = curParentMessage.isAnonymous() ? LanguageUtil.get(pageContext, "anonymous") : HtmlUtil.escape(PortalUtil.getUserName(curParentMessage.getUserId(), curParentMessage.getUserName(), StringPool.BLANK));
+	}
+	catch (Exception e) {
+	}
+}
+
+String body = BeanParamUtil.getString(replyMessage, request, "body");
+boolean quote = ParamUtil.getBoolean(request, "quote");
+boolean splitThread = ParamUtil.getBoolean(request, "splitThread");
+%>
+
+<portlet:actionURL var="editMessageURL">
+	<portlet:param name="struts_action" value="/message_boards/edit_message" />
+</portlet:actionURL>
+
+<aui:form action="<%= editMessageURL %>" method="post" name="addQuickReplyFm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveMessage();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.ADD %>" />
+	<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+	<aui:input name="messageId" type="hidden" value="<%= messageId %>" />
+	<aui:input name="mbCategoryId" type="hidden" value="<%= categoryId %>" />
+	<aui:input name="threadId" type="hidden" value="<%= threadId %>" />
+	<aui:input name="parentMessageId" type="hidden" value="<%= parentMessageId %>" />
+	<aui:input name="subject" type="hidden" value="<%= subject %>" />
+	<aui:input name="workflowAction" type="hidden" value="<%= String.valueOf(WorkflowConstants.ACTION_PUBLISH) %>" />
+	<aui:input name="addGuestPermissions" type="hidden" value="true" />
+	<aui:input name="addGroupPermissions" type="hidden" value="true" />
+
+	<aui:model-context bean="<%= message %>" model="<%= MBMessage.class %>" />
+
+	<aui:fieldset>
+		<aui:field-wrapper label="quick-reply">
+			<c:choose>
+				<c:when test='<%= messageFormat.equals("bbcode") %>'>
+					<%@ include file="/html/portlet/message_boards/bbcode_editor.jspf" %>
+				</c:when>
+				<c:otherwise>
+					<%@ include file="/html/portlet/message_boards/html_editor.jspf" %>
+				</c:otherwise>
+			</c:choose>
+			<aui:input name="body" type="hidden" />
+		</aui:field-wrapper>
+
+		<c:if test="<%= themeDisplay.isSignedIn() && !SubscriptionLocalServiceUtil.isSubscribed(themeDisplay.getCompanyId(), user.getUserId(), MBThread.class.getName(), threadId) && !SubscriptionLocalServiceUtil.isSubscribed(themeDisplay.getCompanyId(), user.getUserId(), MBCategory.class.getName(), categoryId) %>">
+			<aui:input helpMessage="message-boards-message-subscribe-me-help" label="subscribe-me" name="subscribe" type='<%= (MBUtil.getEmailMessageAddedEnabled(portletPreferences) || MBUtil.getEmailMessageUpdatedEnabled(portletPreferences)) ? "checkbox" : "hidden" %>' value="<%= subscribeByDefault %>" />
+		</c:if>
+
+		<liferay-ui:custom-attributes-available className="<%= MBMessage.class.getName() %>">
+			<liferay-ui:custom-attribute-list
+				className="<%= MBMessage.class.getName() %>"
+				classPK="<%= (message != null) ? message.getMessageId() : 0 %>"
+				editable="<%= true %>"
+				label="<%= true %>"
+			/>
+		</liferay-ui:custom-attributes-available>
+	</aui:fieldset>
+
+	<aui:button-row>
+
+		<%
+		String publishButtonLabel = "publish";
+
+		if (WorkflowDefinitionLinkLocalServiceUtil.hasWorkflowDefinitionLink(themeDisplay.getCompanyId(), scopeGroupId, MBMessage.class.getName())) {
+			publishButtonLabel = "submit-for-publication";
+		}
+		%>
+
+		<aui:button name="publishButton" type="submit" value="publish" />
+
+		<%
+		String taglibCancelReply = renderResponse.getNamespace() + "addQuickReply('cancel', '');";
+		%>
+
+		<aui:button onClick="<%= taglibCancelReply %>" type="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />saveMessage() {
+		document.<portlet:namespace />addQuickReplyFm.<portlet:namespace /><%= Constants.CMD %>.value;
+		document.<portlet:namespace />addQuickReplyFm.<portlet:namespace />body.value = <portlet:namespace />getHTML();
+
+		submitForm(document.<portlet:namespace />addQuickReplyFm);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/error.jsp
new file mode 100644
index 0000000..a690a08
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/error.jsp
@@ -0,0 +1,29 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= BannedUserException.class %>" message="you-have-been-banned-by-the-moderator" />
+<liferay-ui:error exception="<%= LockedThreadException.class %>" message="thread-is-locked" />
+<liferay-ui:error exception="<%= NoSuchCategoryException.class %>" message="the-category-could-not-be-found" />
+<liferay-ui:error exception="<%= NoSuchMessageException.class %>" message="the-message-could-not-be-found" />
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
+<liferay-ui:error exception="<%= RequiredMessageException.class %>" message="you-cannot-delete-a-root-message-that-has-more-than-one-immediate-reply" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/html_editor.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/html_editor.jspf
new file mode 100644
index 0000000..3d2e63d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/html_editor.jspf
@@ -0,0 +1,58 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+if (Validator.isNull(body)) {
+	if (quote && (curParentMessage != null)) {
+		StringBundler sb = new StringBundler(5);
+
+		sb.append("<blockquote><div class=\"quote-title\">");
+		sb.append(parentAuthor);
+		sb.append(": </div><div class=\"quote\"><div class=\"quote-content\">");
+		sb.append(curParentMessage.getBody(false));
+		sb.append("</div></blockquote><br /><br /><br />");
+
+		body = sb.toString();
+	}
+	else if (splitThread) {
+		StringBundler sb = new StringBundler(5);
+
+		sb.append("<a href=");
+		sb.append(MBThreadConstants.NEW_THREAD_URL);
+		sb.append(">");
+		sb.append(MBThreadConstants.NEW_THREAD_URL);
+		sb.append("</a>");
+
+		body = LanguageUtil.format(pageContext, "the-new-thread-can-be-found-at-x", sb.toString(), false);
+	}
+}
+%>
+
+<liferay-ui:input-editor editorImpl="<%= HTML_EDITOR_WYSIWYG_IMPL_KEY %>" />
+
+<aui:script>
+	function <portlet:namespace />getHTML() {
+		return window.<portlet:namespace />editor.getHTML();
+	}
+
+	function <portlet:namespace />initEditor() {
+		return "<%= UnicodeFormatter.toString(body) %>";
+	}
+</aui:script>
+
+<%!
+public static final String HTML_EDITOR_WYSIWYG_IMPL_KEY = "editor.wysiwyg.portal-web.docroot.html.portlet.message_boards.edit_message.html.jsp";
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/init.jsp
new file mode 100644
index 0000000..5bf2336
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/init.jsp
@@ -0,0 +1,117 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.kernel.parsers.bbcode.BBCodeTranslatorUtil" %><%@
+page import="com.liferay.portal.kernel.util.MimeTypesUtil" %><%@
+page import="com.liferay.portlet.documentlibrary.FileExtensionException" %><%@
+page import="com.liferay.portlet.documentlibrary.FileNameException" %><%@
+page import="com.liferay.portlet.messageboards.BannedUserException" %><%@
+page import="com.liferay.portlet.messageboards.CategoryNameException" %><%@
+page import="com.liferay.portlet.messageboards.LockedThreadException" %><%@
+page import="com.liferay.portlet.messageboards.MailingListEmailAddressException" %><%@
+page import="com.liferay.portlet.messageboards.MailingListInServerNameException" %><%@
+page import="com.liferay.portlet.messageboards.MailingListInUserNameException" %><%@
+page import="com.liferay.portlet.messageboards.MailingListOutEmailAddressException" %><%@
+page import="com.liferay.portlet.messageboards.MailingListOutServerNameException" %><%@
+page import="com.liferay.portlet.messageboards.MailingListOutUserNameException" %><%@
+page import="com.liferay.portlet.messageboards.MessageBodyException" %><%@
+page import="com.liferay.portlet.messageboards.MessageSubjectException" %><%@
+page import="com.liferay.portlet.messageboards.NoSuchCategoryException" %><%@
+page import="com.liferay.portlet.messageboards.NoSuchMailingListException" %><%@
+page import="com.liferay.portlet.messageboards.NoSuchMessageException" %><%@
+page import="com.liferay.portlet.messageboards.RequiredMessageException" %><%@
+page import="com.liferay.portlet.messageboards.SplitThreadException" %><%@
+page import="com.liferay.portlet.messageboards.model.MBBan" %><%@
+page import="com.liferay.portlet.messageboards.model.MBCategory" %><%@
+page import="com.liferay.portlet.messageboards.model.MBCategoryConstants" %><%@
+page import="com.liferay.portlet.messageboards.model.MBCategoryDisplay" %><%@
+page import="com.liferay.portlet.messageboards.model.MBMailingList" %><%@
+page import="com.liferay.portlet.messageboards.model.MBMessageConstants" %><%@
+page import="com.liferay.portlet.messageboards.model.MBMessageDisplay" %><%@
+page import="com.liferay.portlet.messageboards.model.MBStatsUser" %><%@
+page import="com.liferay.portlet.messageboards.model.MBThread" %><%@
+page import="com.liferay.portlet.messageboards.model.MBThreadConstants" %><%@
+page import="com.liferay.portlet.messageboards.model.MBThreadFlag" %><%@
+page import="com.liferay.portlet.messageboards.model.MBTreeWalker" %><%@
+page import="com.liferay.portlet.messageboards.model.impl.MBCategoryDisplayImpl" %><%@
+page import="com.liferay.portlet.messageboards.model.impl.MBMessageImpl" %><%@
+page import="com.liferay.portlet.messageboards.service.MBBanLocalServiceUtil" %><%@
+page import="com.liferay.portlet.messageboards.service.MBCategoryLocalServiceUtil" %><%@
+page import="com.liferay.portlet.messageboards.service.MBCategoryServiceUtil" %><%@
+page import="com.liferay.portlet.messageboards.service.MBMailingListLocalServiceUtil" %><%@
+page import="com.liferay.portlet.messageboards.service.MBMessageServiceUtil" %><%@
+page import="com.liferay.portlet.messageboards.service.MBStatsUserLocalServiceUtil" %><%@
+page import="com.liferay.portlet.messageboards.service.MBThreadFlagLocalServiceUtil" %><%@
+page import="com.liferay.portlet.messageboards.service.MBThreadLocalServiceUtil" %><%@
+page import="com.liferay.portlet.messageboards.service.MBThreadServiceUtil" %><%@
+page import="com.liferay.portlet.messageboards.service.permission.MBCategoryPermission" %><%@
+page import="com.liferay.portlet.messageboards.service.permission.MBMessagePermission" %><%@
+page import="com.liferay.portlet.messageboards.service.permission.MBPermission" %><%@
+page import="com.liferay.portlet.messageboards.util.MBMessageAttachmentsUtil" %><%@
+page import="com.liferay.portlet.messageboards.util.MBUtil" %><%@
+page import="com.liferay.portlet.messageboards.util.comparator.MessageCreateDateComparator" %><%@
+page import="com.liferay.portlet.ratings.model.RatingsStats" %><%@
+page import="com.liferay.portlet.ratings.service.RatingsStatsLocalServiceUtil" %><%@
+page import="com.liferay.portlet.trash.service.TrashEntryLocalServiceUtil" %><%@
+page import="com.liferay.util.RSSUtil" %>
+
+<%
+String currentLanguageId = LanguageUtil.getLanguageId(request);
+Locale currentLocale = LocaleUtil.fromLanguageId(currentLanguageId);
+Locale defaultLocale = themeDisplay.getSiteDefaultLocale();
+String defaultLanguageId = LocaleUtil.toLanguageId(defaultLocale);
+
+Locale[] locales = LanguageUtil.getAvailableLocales(themeDisplay.getSiteGroupId());
+
+String[] priorities = LocalizationUtil.getPreferencesValues(portletPreferences, "priorities", currentLanguageId);
+
+boolean allowAnonymousPosting = MBUtil.isAllowAnonymousPosting(portletPreferences);
+boolean subscribeByDefault = GetterUtil.getBoolean(portletPreferences.getValue("subscribeByDefault", null), PropsValues.MESSAGE_BOARDS_SUBSCRIBE_BY_DEFAULT);
+String messageFormat = MBUtil.getMessageFormat(portletPreferences);
+boolean enableFlags = GetterUtil.getBoolean(portletPreferences.getValue("enableFlags", null), true);
+boolean enableRatings = GetterUtil.getBoolean(portletPreferences.getValue("enableRatings", null), true);
+boolean threadAsQuestionByDefault = GetterUtil.getBoolean(portletPreferences.getValue("threadAsQuestionByDefault", null));
+String recentPostsDateOffset = portletPreferences.getValue("recentPostsDateOffset", "7");
+
+boolean enableRSS = !PortalUtil.isRSSFeedsEnabled() ? false : GetterUtil.getBoolean(portletPreferences.getValue("enableRss", null), true);
+int rssDelta = GetterUtil.getInteger(portletPreferences.getValue("rssDelta", StringPool.BLANK), SearchContainer.DEFAULT_DELTA);
+String rssDisplayStyle = portletPreferences.getValue("rssDisplayStyle", RSSUtil.DISPLAY_STYLE_DEFAULT);
+String rssFeedType = portletPreferences.getValue("rssFeedType", RSSUtil.FEED_TYPE_DEFAULT);
+
+ResourceURL rssURL = liferayPortletResponse.createResourceURL();
+
+rssURL.setParameter("struts_action", "/message_boards/rss");
+rssURL.setParameter("p_l_id", String.valueOf(plid));
+rssURL.setParameter("mbCategoryId", String.valueOf(scopeGroupId));
+
+boolean categoriesPanelCollapsible = true;
+boolean categoriesPanelExtended = true;
+boolean threadsPanelCollapsible = true;
+boolean threadsPanelExtended = true;
+
+boolean childrenMessagesTaggable = true;
+boolean includeFormTag = true;
+boolean showSearch = true;
+
+Format dateFormatDate = FastDateFormatFactoryUtil.getDate(locale, timeZone);
+Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(locale, timeZone);
+
+NumberFormat numberFormat = NumberFormat.getNumberInstance(locale);
+%>
+
+<%@ include file="/html/portlet/message_boards/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/js/main.js b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/js/main.js
new file mode 100644
index 0000000..4aa3dac
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/js/main.js
@@ -0,0 +1,586 @@
+AUI.add(
+	'liferay-bbcode-editor',
+	function(A) {
+		var bbCode = function(options) {
+			var instance = this;
+			options = options || {};
+
+			instance._textarea = A.one(options.textarea);
+			instance._location = A.one(options.location);
+
+			instance._createEmoticons(
+				function() {
+					instance._createToolbar();
+
+					if (options.onLoad) {
+						options.onLoad();
+					}
+				}
+			);
+		};
+
+		bbCode.prototype = {
+			getHTML: function(content) {
+				var instance = this;
+
+				return instance._textarea.val();
+			},
+
+			insertTag: function(tag, param, content) {
+				var instance = this;
+
+				var begTag;
+
+				if (param) {
+					begTag = '[' + tag + '=' + param + ']';
+				}
+				else {
+					begTag = '[' + tag + ']';
+				}
+
+				var endTag = '[/' + tag + ']';
+
+				var textarea = instance._textarea;
+				var field = textarea.getDOM();
+				var value = textarea.val();
+
+				if (Liferay.Browser.isIe()) {
+					instance._setSelectionRange();
+
+					if (content != null) {
+						instance._selectionRange.text = begTag + content + endTag;
+					}
+					else {
+						instance._selectionRange.text = begTag + instance._selectionRange.text + endTag;
+					}
+
+					instance._selectionRange.moveEnd('character', -endTag.length);
+					instance._selectionRange.select();
+
+					instance._selectionRange = null;
+				}
+				else if (field.selectionStart || field.selectionStart == 0) {
+					var startPos = field.selectionStart;
+					var endPos = field.selectionEnd;
+
+					var preSel = value.substring(0, startPos);
+					var sel = value.substring(startPos, endPos);
+					var postSel = value.substring(endPos, field.value.length);
+
+					var caretPos = startPos + begTag.length;
+
+					if (content != null) {
+						field.value = preSel + begTag + content + endTag + postSel;
+					}
+					else {
+						field.value = preSel + begTag + sel + endTag + postSel;
+						field.setSelectionRange(caretPos, caretPos);
+					}
+				}
+				else {
+					field.value += begTag + content + endTag;
+				}
+
+				textarea.focus();
+			},
+
+			setHTML: function(content) {
+				var instance = this;
+
+				instance._textarea.val(content);
+			},
+
+			_createEmoticons: function(callback) {
+				var instance = this;
+
+				A.io.request(
+					themeDisplay.getPathMain() + '/portal/emoticons',
+					{
+						on: {
+							success: function(event, id, obj) {
+								var responseData = this.get('responseData');
+								var emoticonsContainer = A.Node.create('<div class="lfr-emoticon-container"></div>');
+
+								instance._emoticons = emoticonsContainer.html(responseData);
+
+								var emoticons = instance._emoticons.all('.emoticon');
+
+								if (emoticons) {
+									emoticons.on(
+										'click',
+										function(event) {
+											var emoticonCode = event.currentTarget.getAttribute('emoticonCode');
+
+											if (emoticonCode) {
+												instance._insertEmoticon(emoticonCode);
+											}
+										}
+									);
+								}
+
+								if (callback) {
+									callback.apply(instance, []);
+								}
+							}
+						}
+					}
+				);
+			},
+
+			_createToolbar: function() {
+				var instance = this;
+
+				var html = '';
+
+				instance._buttons = {
+					fontType: {
+						onChange: function(event) {
+							var target = event.target;
+							var value = target.val();
+
+							if (value != Liferay.Language.get('font')) {
+								instance.insertTag('font', value);
+
+								target.set('selectedIndex', 0);
+							}
+						},
+						options: [Liferay.Language.get('font'), 'Arial', 'Comic Sans', 'Courier New', 'Tahoma', 'Times New Roman', 'Verdana', 'Wingdings']
+					},
+
+					fontSize: {
+						groupEnd: true,
+						onChange: function(event) {
+							var target = event.target;
+							var value = target.val();
+
+							if (value != Liferay.Language.get('size')) {
+								instance.insertTag('size', value);
+
+								target.set('selectedIndex', 0);
+							}
+						},
+						options: [Liferay.Language.get('size'), 1, 2, 3, 4, 5, 6, 7]
+					},
+
+					b: {
+						image: 'message_boards/bold.png',
+						onClick: function(event) {
+							instance.insertTag('b');
+						},
+						text: Liferay.Language.get('bold')
+					},
+
+					i: {
+						image: 'message_boards/italic.png',
+						onClick: function(event) {
+							instance.insertTag('i');
+						},
+						text: Liferay.Language.get('italic')
+					},
+
+					u: {
+						image: 'message_boards/underline.png',
+						onClick: function(event) {
+							instance.insertTag('u');
+						},
+						text: Liferay.Language.get('underline')
+					},
+
+					s: {
+						image: 'message_boards/strike.png',
+						onClick: function(event) {
+							instance.insertTag('s');
+						},
+						text: Liferay.Language.get('strikethrough')
+					},
+
+					fontColor: {
+						className: 'use-colorpicker',
+						groupEnd: true,
+						image: 'message_boards/color.png',
+						text: Liferay.Language.get('font-color')
+					},
+
+					url: {
+						image: 'message_boards/hyperlink.png',
+						onClick: function(event) {
+							instance._insertURL();
+						},
+						text: Liferay.Language.get('url')
+					},
+
+					email: {
+						image: 'message_boards/email.png',
+						onClick: function(event) {
+							instance._insertEmail();
+						},
+						text: Liferay.Language.get('email-address')
+					},
+
+					image: {
+						image: 'message_boards/image.png',
+						onClick: function(event) {
+							instance._insertImage();
+						},
+						text: Liferay.Language.get('image')
+					},
+
+					ol: {
+						image: 'message_boards/ordered_list.png',
+						onClick: function(event) {
+							instance._insertList('1');
+						},
+						text: Liferay.Language.get('ordered-list')
+					},
+
+					ul: {
+						image: 'message_boards/unordered_list.png',
+						onClick: function(event) {
+							instance._insertList('');
+						},
+						text: Liferay.Language.get('unordered-list')
+					},
+
+					left: {
+						image: 'message_boards/justify_left.png',
+						onClick: function(event) {
+							instance.insertTag('left');
+						},
+						text: Liferay.Language.get('left')
+					},
+
+					center: {
+						image: 'message_boards/justify_center.png',
+						onClick: function(event) {
+							instance.insertTag('center');
+						},
+						text: Liferay.Language.get('center')
+					},
+
+					right: {
+						image: 'message_boards/justify_right.png',
+						onClick: function(event) {
+							instance.insertTag('right');
+						},
+						text: Liferay.Language.get('right')
+					},
+
+					indent: {
+						text: Liferay.Language.get('indent'),
+						image: 'message_boards/indent.png',
+						onClick: function(event) {
+							instance.insertTag('indent');
+						}
+					},
+
+					quote: {
+						image: 'message_boards/quote.png',
+						onClick: function(event) {
+							instance.insertTag('quote');
+						},
+						text: Liferay.Language.get('quote')
+					},
+
+					code: {
+						image: 'message_boards/code.png',
+						onClick: function(event) {
+							instance.insertTag('code');
+						},
+						text: Liferay.Language.get('code')
+					},
+
+					emoticons: {
+						image: 'emoticons/smile.gif',
+						text: Liferay.Language.get('emoticons')
+					}
+				};
+
+				A.each(
+					instance._buttons,
+					function(n, i) {
+						var buttonClass = ' ' + (n.className || '');
+						var buttonText = n.text || '';
+
+						if (i != 'insert' && !n.options) {
+							var imagePath = themeDisplay.getPathThemeImages() + '/' + n.image;
+
+							html +=
+								'<a buttonId="' + i + '" class="lfr-button ' + buttonClass + '" href="javascript:;" title="' + buttonText + '">' +
+								'<img alt="' + buttonText + '" buttonId="' + i + '" src="' + imagePath + '" >' +
+								'</a>';
+						}
+						else if (n.options && n.options.length) {
+							html += '<select class="' + buttonClass + '" selectId="' + i + '" title="' + buttonText + '">';
+
+							A.each(
+								n.options,
+								function(v, i) {
+									html += '<option value="' + v + '">' + v + '</option>';
+								}
+							);
+
+							html += '</select>';
+						}
+
+						if (n.groupEnd) {
+							html += '<span class="lfr-separator"></span>';
+						}
+					}
+				);
+
+				if (!instance._location) {
+					instance._location = A.Node.create('<div class="lfr-toolbar">' + html + '</div>');
+					instance._textarea.placeBefore(instance._location);
+				}
+				else {
+					instance._location.html(html);
+				}
+
+				var emoticonButton = instance._location.all('.lfr-button[buttonId=emoticons]');
+				var hoveringOver = false;
+				var offsetHeight = 0;
+				var offsetWidth = 0;
+				var boxWidth = 0;
+
+				var emoticonOverlay = new A.OverlayContext(
+					{
+						align: {
+							points: ['tr', 'br']
+						},
+						contentBox: instance._emoticons,
+						hideDelay: 500,
+						trigger: emoticonButton.item(0)
+					}
+				);
+
+				emoticonOverlay.render();
+
+				instance._location.on(
+					'click',
+					function(event) {
+						instance._setSelectionRange();
+
+						var target = event.target;
+						var buttonId = event.target.getAttribute('buttonId');
+
+						if (buttonId && instance._buttons[buttonId].onClick) {
+							instance._buttons[buttonId].onClick.apply(target, [event]);
+						}
+					}
+				);
+
+				var selects = instance._location.all('select');
+
+				if (selects) {
+					selects.on(
+						'change',
+						function(event) {
+							var selectId = event.target.getAttribute('selectId');
+
+							if (selectId && instance._buttons[selectId].onChange) {
+								instance._buttons[selectId].onChange.apply(this, [event]);
+							}
+						}
+					);
+				}
+
+				instance._fontColorInput = A.Node.create('<input type="hidden" val="" />');
+
+				var colorpicker = instance._location.one('.use-colorpicker');
+
+				var colorpicker = instance._location.one('.use-colorpicker');
+
+				if (colorpicker) {
+					instance._fontColorInput.placeBefore(colorpicker);
+
+					new A.ColorPicker(
+						{
+							after: {
+								colorChange: function() {
+									instance._fontColorInput.val('#' + this.get('hex'));
+								},
+								visibleChange: function(event) {
+									if (!event.newVal) {
+										instance._insertColor();
+									}
+								}
+							},
+							trigger: colorpicker,
+							zIndex: 9999
+						}
+					).render();
+				}
+			},
+
+			_insertColor: function() {
+				var instance = this;
+
+				var color = instance._fontColorInput.val();
+				instance.insertTag('color', color);
+			},
+
+			_insertEmail: function() {
+				var instance = this;
+
+				var addy = prompt(Liferay.Language.get('enter-an-email-address'), '');
+
+				if (addy) {
+					var name = prompt(Liferay.Language.get('enter-a-name-for-the-email-address'), '');
+
+					instance._resetSelection();
+
+					if (!name) {
+						name = addy;
+						addy = null;
+					}
+
+					instance.insertTag('email', addy, name);
+				}
+			},
+
+			_getSelection: function() {
+				var instance = this;
+
+				var textarea = instance._textarea;
+				var field = textarea.getDOM();
+				var value = textarea.val();
+				var selection;
+
+				if (Liferay.Browser.isIe()) {
+					instance._setSelectionRange();
+
+					selection = instance._selectionRange.text;
+				}
+				else if (field.selectionStart || field.selectionStart == 0) {
+					selection = value.substring(field.selectionStart, field.selectionEnd);
+				}
+
+				return selection;
+			},
+
+			_insertEmoticon: function(emoticon) {
+				var instance = this;
+
+				var textarea = instance._textarea;
+				var field = textarea.getDOM();
+
+				textarea.focus();
+
+				if (Liferay.Browser.isIe()) {
+					field.focus();
+
+					var sel = document.selection.createRange();
+
+					sel.text = emoticon;
+				}
+				else if (field.selectionStart || field.selectionStart == "0") {
+					var startPos = field.selectionStart;
+					var endPos = field.selectionEnd;
+
+					var preSel = field.value.substring(0, startPos);
+					var postSel = field.value.substring(endPos, field.value.length);
+
+					field.value = preSel + emoticon + postSel;
+				}
+				else {
+					field.value += emoticon;
+				}
+			},
+
+			_insertImage: function() {
+				var instance = this;
+
+				var url = prompt(Liferay.Language.get('enter-an-address-for-the-image'), 'http://');
+
+				if (url) {
+					instance._resetSelection();
+					instance.insertTag('img', null, url);
+				}
+			},
+
+			_insertList: function(ordered) {
+				var instance = this;
+
+				var list = "\n";
+				var entry;
+
+				while (entry = prompt(Liferay.Language.get('enter-a-list-item-click-cancel-or-leave-blank-to-end-the-list'), '')) {
+					if (!entry) {
+						break;
+					}
+
+					list += '[*]' + entry + '\n';
+				}
+
+				if (list != '\n') {
+					instance._resetSelection();
+					instance.insertTag('list', ordered, list);
+				}
+			},
+
+			_insertURL: function() {
+				var instance = this;
+
+				var url = prompt(Liferay.Language.get('enter-an-address'), 'http://');
+
+				if (url != null) {
+					var title;
+					var selection = instance._getSelection();
+
+					if (selection) {
+						title = selection;
+					}
+					else {
+						title = prompt(Liferay.Language.get('enter-a-title-for-the-address'), '');
+					}
+
+					if (title) {
+						instance.insertTag('url', url, title);
+					}
+					else {
+						instance.insertTag('url', url);
+					}
+				}
+			},
+
+			_resetSelection: function() {
+				var instance = this;
+
+				var textarea = instance._textarea;
+				var field = textarea.getDOM();
+
+				if (Liferay.Browser.isIe()) {
+					field.focus();
+
+					var selection = document.selection.createRange();
+
+					selection.collapse(false);
+					selection.select();
+				}
+				else if (field.setSelectionRange) {
+					var selectionStart = field.selectionStart;
+
+					field.setSelectionRange(selectionStart, selectionStart);
+				}
+			},
+
+			_setSelectionRange: function() {
+				var instance = this;
+
+				if (Liferay.Browser.isIe() && (instance._selectionRange == null)) {
+					instance._textarea.focus();
+
+					instance._selectionRange = document.selection.createRange();
+				}
+			}
+		};
+
+		Liferay.namespace('Editor');
+
+		Liferay.Editor.bbCode = bbCode;
+	},
+	'',
+	{
+		requires: ['aui-color-picker-deprecated', 'aui-io-request', 'aui-overlay-context-deprecated']
+	}
+);
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/last_post_question.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/last_post_question.jsp
new file mode 100644
index 0000000..06f8f1d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/last_post_question.jsp
@@ -0,0 +1,54 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+Object[] objArray = (Object[])row.getObject();
+
+MBMessage message = (MBMessage)objArray[0];
+
+MBThread thread = message.getThread();
+
+User userDisplay = UserLocalServiceUtil.getUserById(thread.getLastPostByUserId());
+%>
+
+<div class="user-info">
+	<div class="portrait">
+		<a href="<%= userDisplay.getDisplayURL(themeDisplay) %>"><img alt="<%= (userDisplay != null) ? HtmlUtil.escapeAttribute(userDisplay.getFullName()) : LanguageUtil.get(pageContext, "generic-portrait") %>" class="avatar" src=" <%= userDisplay.getPortraitURL(themeDisplay) %>" width="60" /></a>
+	</div>
+
+	<div class="username">
+		<a href="<%= userDisplay.getDisplayURL(themeDisplay) %>"><%= HtmlUtil.escape(PortalUtil.getUserName(thread.getLastPostByUserId(), StringPool.BLANK)) %></a>
+	</div>
+
+	<div class="time">
+
+		<%
+		Date now = new Date();
+
+		long lastPostAgo = now.getTime() - thread.getLastPostDate().getTime();
+		%>
+
+		<liferay-ui:icon
+			image="../aui/time"
+			label="<%= true %>"
+			message='<%= LanguageUtil.format(pageContext, "x-ago", LanguageUtil.getTimeDescription(pageContext, lastPostAgo, true)) %>'
+		/>
+	</div>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/message_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/message_action.jsp
new file mode 100644
index 0000000..eb1e941
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/message_action.jsp
@@ -0,0 +1,177 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+Object[] objArray = (Object[])row.getObject();
+
+MBMessage message = (MBMessage)objArray[0];
+
+Set<Long> threadSubscriptionClassPKs = null;
+
+if (portletName.equals(PortletKeys.MESSAGE_BOARDS)) {
+	threadSubscriptionClassPKs = (Set<Long>)objArray[1];
+}
+
+MBCategory category = message.getCategory();
+MBThread thread = message.getThread();
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= MBMessagePermission.contains(permissionChecker, message, ActionKeys.UPDATE) && !thread.isLocked() %>">
+		<portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/message_boards/edit_message" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="messageId" value="<%= String.valueOf(message.getMessageId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= MBMessagePermission.contains(permissionChecker, message, ActionKeys.PERMISSIONS) && !thread.isLocked() %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= MBMessage.class.getName() %>"
+			modelResourceDescription="<%= message.getSubject() %>"
+			resourcePrimKey="<%= String.valueOf(message.getMessageId()) %>"
+			var="permissionsURL"
+			windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			method="get"
+			url="<%= permissionsURL %>"
+			useDialog="<%= true %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= portletName.equals(PortletKeys.MESSAGE_BOARDS) %>">
+		<c:if test="<%= enableRSS && MBMessagePermission.contains(permissionChecker, message, ActionKeys.VIEW) %>">
+
+			<%
+			rssURL.setParameter("mbCategoryId", StringPool.BLANK);
+			rssURL.setParameter("threadId", String.valueOf(message.getThreadId()));
+			%>
+
+			<liferay-ui:rss
+				delta="<%= rssDelta %>"
+				displayStyle="<%= rssDisplayStyle %>"
+				feedType="<%= rssFeedType %>"
+				resourceURL="<%= rssURL %>"
+			/>
+		</c:if>
+
+		<c:if test="<%= MBMessagePermission.contains(permissionChecker, message, ActionKeys.SUBSCRIBE) && (MBUtil.getEmailMessageAddedEnabled(portletPreferences) || MBUtil.getEmailMessageUpdatedEnabled(portletPreferences)) %>">
+			<c:choose>
+				<c:when test="<%= (threadSubscriptionClassPKs != null) && threadSubscriptionClassPKs.contains(message.getThreadId()) %>">
+					<portlet:actionURL var="unsubscribeURL">
+						<portlet:param name="struts_action" value="/message_boards/edit_message" />
+						<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UNSUBSCRIBE %>" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+						<portlet:param name="messageId" value="<%= String.valueOf(message.getMessageId()) %>" />
+					</portlet:actionURL>
+
+					<liferay-ui:icon
+						image="unsubscribe"
+						url="<%= unsubscribeURL %>"
+					/>
+				</c:when>
+				<c:otherwise>
+					<portlet:actionURL var="subscribeURL">
+						<portlet:param name="struts_action" value="/message_boards/edit_message" />
+						<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.SUBSCRIBE %>" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+						<portlet:param name="messageId" value="<%= String.valueOf(message.getMessageId()) %>" />
+					</portlet:actionURL>
+
+					<liferay-ui:icon
+						image="subscribe"
+						url="<%= subscribeURL %>"
+					/>
+				</c:otherwise>
+			</c:choose>
+		</c:if>
+	</c:if>
+
+	<c:if test="<%= MBCategoryPermission.contains(permissionChecker, message.getGroupId(), message.getCategoryId(), ActionKeys.LOCK_THREAD) %>">
+		<c:choose>
+			<c:when test="<%= thread.isLocked() %>">
+				<portlet:actionURL var="unlockThreadURL">
+					<portlet:param name="struts_action" value="/message_boards/edit_message" />
+					<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UNLOCK %>" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="threadId" value="<%= String.valueOf(message.getThreadId()) %>" />
+				</portlet:actionURL>
+
+				<liferay-ui:icon
+					image="unlock"
+					message="unlock-thread"
+					url="<%= unlockThreadURL %>"
+				/>
+			</c:when>
+			<c:otherwise>
+				<portlet:actionURL var="lockThreadURL">
+					<portlet:param name="struts_action" value="/message_boards/edit_message" />
+					<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.LOCK %>" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="messageId" value="<%= String.valueOf(message.getMessageId()) %>" />
+					<portlet:param name="threadId" value="<%= String.valueOf(message.getThreadId()) %>" />
+				</portlet:actionURL>
+
+				<liferay-ui:icon
+					image="lock"
+					message="lock-thread"
+					url="<%= lockThreadURL %>"
+				/>
+			</c:otherwise>
+		</c:choose>
+	</c:if>
+
+	<c:if test="<%= MBCategoryPermission.contains(permissionChecker, message.getGroupId(), message.getCategoryId(), ActionKeys.MOVE_THREAD) %>">
+		<portlet:renderURL var="moveThreadURL">
+			<portlet:param name="struts_action" value="/message_boards/move_thread" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="mbCategoryId" value="<%= String.valueOf(category.getCategoryId()) %>" />
+			<portlet:param name="threadId" value="<%= String.valueOf(message.getThreadId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="submit"
+			message="move"
+			url="<%= moveThreadURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= MBMessagePermission.contains(permissionChecker, message, ActionKeys.DELETE) && !thread.isLocked() %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/message_boards/delete_thread" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= TrashUtil.isTrashEnabled(themeDisplay.getScopeGroupId()) ? Constants.MOVE_TO_TRASH : Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="threadId" value="<%= String.valueOf(message.getThreadId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete
+			trash="<%= TrashUtil.isTrashEnabled(themeDisplay.getScopeGroupId()) %>"
+			url="<%= deleteURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/message_summary_question.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/message_summary_question.jsp
new file mode 100644
index 0000000..a1cb876
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/message_summary_question.jsp
@@ -0,0 +1,55 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+Object[] objArray = (Object[])row.getObject();
+
+MBMessage message = (MBMessage)objArray[0];
+%>
+
+<liferay-portlet:renderURL varImpl="viewMessage">
+	<portlet:param name="struts_action" value="/message_boards/view_message" />
+	<portlet:param name="messageId" value="<%= String.valueOf(message.getMessageId()) %>" />
+</liferay-portlet:renderURL>
+
+<div class="question-subject">
+	<a class="question-subject" href="<%= viewMessage.toString() %>"><%= HtmlUtil.escape(message.getSubject()) %></a>
+</div>
+
+<div class="summary">
+
+	<%
+	String msgBody = message.getBody();
+
+	if (message.isFormatBBCode()) {
+		msgBody = BBCodeTranslatorUtil.getHTML(msgBody);
+		msgBody = StringUtil.replace(msgBody, "@theme_images_path@/emoticons", themeDisplay.getPathThemeImages() + "/emoticons");
+	}
+	%>
+
+	<%= StringUtil.shorten(msgBody, 250) %>
+</div>
+
+<div class="tags">
+	<liferay-ui:asset-tags-summary
+		className="<%= MBMessage.class.getName() %>"
+		classPK="<%= message.getMessageId() %>"
+	/>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/move_category.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/move_category.jsp
new file mode 100644
index 0000000..7b1de6f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/move_category.jsp
@@ -0,0 +1,123 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+MBCategory category = (MBCategory)request.getAttribute(WebKeys.MESSAGE_BOARDS_CATEGORY);
+
+long categoryId = MBUtil.getCategoryId(request, category);
+
+long parentCategoryId = BeanParamUtil.getLong(category, request, "parentCategoryId", MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID);
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	localizeTitle="<%= (category == null) %>"
+	title='<%= LanguageUtil.format(pageContext, "move-x", category.getName()) %>'
+/>
+
+<portlet:actionURL var="moveCategoryURL">
+	<portlet:param name="struts_action" value="/message_boards/move_category" />
+</portlet:actionURL>
+
+<aui:form action="<%= moveCategoryURL %>" method="post" name="fm">
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="mbCategoryId" type="hidden" value="<%= categoryId %>" />
+	<aui:input name="parentCategoryId" type="hidden" value="<%= parentCategoryId %>" />
+
+	<aui:model-context bean="<%= category %>" model="<%= MBCategory.class %>" />
+
+	<aui:fieldset>
+		<aui:field-wrapper label="parent-category[message-board]">
+
+			<%
+			String parentCategoryName = StringPool.BLANK;
+
+			try {
+				MBCategory parentCategory = MBCategoryLocalServiceUtil.getCategory(parentCategoryId);
+
+				parentCategoryName = parentCategory.getName();
+			}
+			catch (NoSuchCategoryException nsce) {
+			}
+			%>
+
+			<div class="input-append">
+				<liferay-ui:input-resource id="parentCategoryName" url="<%= parentCategoryName %>" />
+
+				<aui:button name="selectCategoryButton" value="select" />
+
+				<aui:button disabled="<%= (parentCategoryId <= 0) %>" name="removeCategoryButton" onClick='<%= renderResponse.getNamespace() + "removeCategory();" %>' value="remove" />
+			</div>
+
+			<aui:input label="merge-with-parent-category" name="mergeWithParentCategory" type="checkbox" />
+		</aui:field-wrapper>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" value="move" />
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />removeCategory() {
+		document.<portlet:namespace />fm.<portlet:namespace />parentCategoryId.value = "<%= MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID %>";
+
+		document.getElementById('<portlet:namespace />parentCategoryName').value = "";
+
+		Liferay.Util.toggleDisabled('#<portlet:namespace />removeCategoryButton', true);
+	}
+</aui:script>
+
+<%
+if (category != null) {
+	MBUtil.addPortletBreadcrumbEntries(category, request, renderResponse);
+
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "move"), currentURL);
+}
+%>
+
+<aui:script use="aui-base">
+	A.one('#<portlet:namespace />selectCategoryButton').on(
+		'click',
+		function(event) {
+			Liferay.Util.selectEntity(
+				{
+					dialog: {
+						constrain: true,
+						modal: true,
+						width: 680
+					},
+					id: '<portlet:namespace />selectCategory',
+					title: '<liferay-ui:message arguments="category" key="select-x" />',
+					uri: '<portlet:renderURL windowState="<%= LiferayWindowState.POP_UP.toString() %>"><portlet:param name="struts_action" value="/message_boards/select_category" /><portlet:param name="mbCategoryId" value="<%= String.valueOf((category == null) ? MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID : category.getParentCategoryId()) %>" /></portlet:renderURL>'
+				},
+				function(event) {
+					document.<portlet:namespace />fm.<portlet:namespace />parentCategoryId.value = event.categoryid;
+
+					document.getElementById('<portlet:namespace />parentCategoryName').value = event.name;
+
+					Liferay.Util.toggleDisabled('#<portlet:namespace />removeCategoryButton', false);
+				}
+			);
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/move_thread.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/move_thread.jsp
new file mode 100644
index 0000000..952007c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/move_thread.jsp
@@ -0,0 +1,144 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+MBMessage message = (MBMessage)request.getAttribute(WebKeys.MESSAGE_BOARDS_MESSAGE);
+
+long messageId = message.getMessageId();
+
+long categoryId = MBUtil.getCategoryId(request, message);
+
+MBCategory category = MBCategoryLocalServiceUtil.getCategory(categoryId);
+
+category = category.toEscapedModel();
+
+MBThread thread = message.getThread();
+
+MBMessage curParentMessage = null;
+String parentAuthor = null;
+
+String body = StringPool.BLANK;
+boolean quote = false;
+boolean splitThread = false;
+%>
+
+<portlet:actionURL var="moveThreadURL">
+	<portlet:param name="struts_action" value="/message_boards/move_thread" />
+</portlet:actionURL>
+
+<aui:form action="<%= moveThreadURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "moveThread();" %>'>
+	<aui:input name="threadId" type="hidden" value="<%= thread.getThreadId() %>" />
+	<aui:input name="mbCategoryId" type="hidden" value="<%= categoryId %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title="move-thread"
+	/>
+
+	<liferay-ui:error exception="<%= MessageBodyException.class %>" message="please-enter-a-valid-message" />
+	<liferay-ui:error exception="<%= MessageSubjectException.class %>" message="please-enter-a-valid-subject" />
+	<liferay-ui:error exception="<%= NoSuchCategoryException.class %>" message="please-enter-a-valid-category" />
+
+	<%
+	long breadcrumbsMessageId = message.getMessageId();
+	%>
+
+	<aui:fieldset>
+		<aui:field-wrapper label="category[message-board]">
+			<div class="input-append">
+				<liferay-ui:input-resource id="categoryName" url='<%= ((categoryId != MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID) && (categoryId != MBCategoryConstants.DISCUSSION_CATEGORY_ID)) ? category.getName() : LanguageUtil.get(pageContext, "message-boards-home") %>' />
+
+				<aui:button name="selectCategoryButton" value="select" />
+			</div>
+		</aui:field-wrapper>
+
+		<aui:input disabled="<%= thread.isLocked() %>" helpMessage='<%= thread.isLocked() ? LanguageUtil.get(pageContext, "unlock-thread-to-add-an-explanation-post") : StringPool.BLANK %>' label="add-explanation-post" name="addExplanationPost" onClick='<%= renderResponse.getNamespace() + "toggleExplanationPost();" %>' type="checkbox" />
+
+		<div id="<portlet:namespace />explanationPost" style="display: none;">
+			<aui:input maxlength="75" name="subject" style="width: 350px;" value="">
+				<aui:validator name="required">
+					function() {
+						return A.one('#<portlet:namespace />addExplanationPostCheckbox').get('checked');
+					}
+				</aui:validator>
+			</aui:input>
+
+			<aui:field-wrapper label="body">
+				<%@ include file="/html/portlet/message_boards/bbcode_editor.jspf" %>
+
+				<aui:input name="body" type="hidden" />
+			</aui:field-wrapper>
+		</div>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" value="move-thread" />
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />moveThread() {
+		document.<portlet:namespace />fm.<portlet:namespace />body.value = <portlet:namespace />getHTML();
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />toggleExplanationPost() {
+		if (document.getElementById('<portlet:namespace />addExplanationPostCheckbox').checked) {
+			document.getElementById('<portlet:namespace />explanationPost').style.display = "";
+		}
+		else {
+			document.getElementById('<portlet:namespace />explanationPost').style.display = "none";
+		}
+	}
+</aui:script>
+
+<%
+MBUtil.addPortletBreadcrumbEntries(message, request, renderResponse);
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "move-thread"), currentURL);
+%>
+
+<aui:script use="aui-base">
+	A.one('#<portlet:namespace />selectCategoryButton').on(
+		'click',
+		function(event) {
+			Liferay.Util.selectEntity(
+				{
+					dialog: {
+						constrain: true,
+						modal: true,
+						width: 680
+					},
+					id: '<portlet:namespace />selectCategory',
+					title: '<liferay-ui:message arguments="category" key="select-x" />',
+					uri: '<portlet:renderURL windowState="<%= LiferayWindowState.POP_UP.toString() %>"><portlet:param name="struts_action" value="/message_boards/select_category" /><portlet:param name="mbCategoryId" value="<%= String.valueOf(category.getParentCategoryId()) %>" /></portlet:renderURL>'
+				},
+				function(event) {
+					document.<portlet:namespace />fm.<portlet:namespace />mbCategoryId.value = event.categoryid;
+
+					document.getElementById('<portlet:namespace />categoryName').value = event.name;
+				}
+			);
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/search.jsp
new file mode 100644
index 0000000..d7994be
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/search.jsp
@@ -0,0 +1,158 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+long breadcrumbsCategoryId = ParamUtil.getLong(request, "breadcrumbsCategoryId");
+long breadcrumbsMessageId = ParamUtil.getLong(request, "breadcrumbsMessageId");
+
+long searchCategoryId = ParamUtil.getLong(request, "searchCategoryId");
+
+long[] categoryIdsArray = null;
+
+List categoryIds = new ArrayList();
+
+categoryIds.add(new Long(searchCategoryId));
+
+MBCategoryServiceUtil.getSubcategoryIds(categoryIds, scopeGroupId, searchCategoryId);
+
+categoryIdsArray = StringUtil.split(StringUtil.merge(categoryIds), 0L);
+
+long threadId = ParamUtil.getLong(request, "threadId");
+String keywords = ParamUtil.getString(request, "keywords");
+%>
+
+<liferay-portlet:renderURL varImpl="searchURL">
+	<portlet:param name="struts_action" value="/message_boards/search" />
+</liferay-portlet:renderURL>
+
+<aui:form action="<%= searchURL %>" method="get" name="fm">
+	<liferay-portlet:renderURLParams varImpl="searchURL" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="breadcrumbsCategoryId" type="hidden" value="<%= breadcrumbsCategoryId %>" />
+	<aui:input name="breadcrumbsMessageId" type="hidden" value="<%= breadcrumbsMessageId %>" />
+	<aui:input name="searchCategoryId" type="hidden" value="<%= searchCategoryId %>" />
+	<aui:input name="threadId" type="hidden" value="<%= threadId %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title="search"
+	/>
+
+	<div class="form-search">
+		<liferay-ui:input-search autoFocus="<%= (windowState.equals(WindowState.MAXIMIZED) && !themeDisplay.isFacebook()) %>" placeholder='<%= LanguageUtil.get(locale, "keywords") %>' title='<%= LanguageUtil.get(locale, "search-messages") %>' />
+	</div>
+
+	<%
+	PortletURL portletURL = renderResponse.createRenderURL();
+
+	portletURL.setParameter("struts_action", "/message_boards/search");
+	portletURL.setParameter("redirect", redirect);
+	portletURL.setParameter("breadcrumbsCategoryId", String.valueOf(breadcrumbsCategoryId));
+	portletURL.setParameter("breadcrumbsMessageId", String.valueOf(breadcrumbsMessageId));
+	portletURL.setParameter("searchCategoryId", String.valueOf(searchCategoryId));
+	portletURL.setParameter("threadId", String.valueOf(threadId));
+	portletURL.setParameter("keywords", keywords);
+	%>
+
+	<liferay-ui:search-container
+		emptyResultsMessage='<%= LanguageUtil.format(pageContext, "no-messages-were-found-that-matched-the-keywords-x", "<strong>" + HtmlUtil.escape(keywords) + "</strong>") %>'
+		iteratorURL="<%= portletURL %>"
+	>
+
+		<%
+		Hits hits = null;
+		%>
+
+		<liferay-ui:search-container-results>
+
+			<%
+			Indexer indexer = IndexerRegistryUtil.getIndexer(MBMessage.class);
+
+			SearchContext searchContext = SearchContextFactory.getInstance(request);
+
+			searchContext.setAttribute("paginationType", "more");
+			searchContext.setCategoryIds(categoryIdsArray);
+			searchContext.setEnd(searchContainer.getEnd());
+			searchContext.setIncludeAttachments(true);
+			searchContext.setKeywords(keywords);
+
+			QueryConfig queryConfig = new QueryConfig();
+
+			queryConfig.setHighlightEnabled(true);
+
+			searchContext.setQueryConfig(queryConfig);
+
+			searchContext.setStart(searchContainer.getStart());
+
+			hits = indexer.search(searchContext);
+
+			searchContainer.setTotal(hits.getLength());
+
+			PortletURL hitURL = renderResponse.createRenderURL();
+
+			results = SearchResultUtil.getSearchResults(hits, locale, hitURL);
+
+			searchContainer.setResults(results);
+			%>
+
+		</liferay-ui:search-container-results>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.kernel.search.SearchResult"
+			modelVar="searchResult"
+		>
+
+			<%
+			MBMessage message = MBMessageLocalServiceUtil.getMessage(searchResult.getClassPK());
+
+			Summary summary = searchResult.getSummary();
+			%>
+
+			<portlet:renderURL var="rowURL">
+				<portlet:param name="struts_action" value="/message_boards/view_message" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="messageId" value="<%= String.valueOf(message.getMessageId()) %>" />
+			</portlet:renderURL>
+
+			<liferay-ui:app-view-search-entry
+				containerIcon="../common/conversation"
+				containerName="<%= MBUtil.getAbsolutePath(renderRequest, message.getCategoryId()) %>"
+				containerType='<%= LanguageUtil.get(locale, "category[message-board]") %>'
+				cssClass='<%= MathUtil.isEven(index) ? "search" : "search alt" %>'
+				description="<%= (summary != null) ? HtmlUtil.escape(summary.getContent()) : StringPool.BLANK %>"
+				fileEntryTuples="<%= searchResult.getFileEntryTuples() %>"
+				queryTerms="<%= hits.getQueryTerms() %>"
+				title="<%= (summary != null) ? HtmlUtil.escape(summary.getTitle()) : HtmlUtil.escape(message.getSubject()) %>"
+				url="<%= rowURL %>"
+			/>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-paginator searchContainer="<%= searchContainer %>" type="more" />
+	</liferay-ui:search-container>
+
+</aui:form>
+
+<%
+if (breadcrumbsCategoryId > 0) {
+	MBUtil.addPortletBreadcrumbEntries(breadcrumbsCategoryId, request, renderResponse);
+}
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "search") + ": " + keywords, currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/select_category.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/select_category.jsp
new file mode 100644
index 0000000..6a60be1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/select_category.jsp
@@ -0,0 +1,153 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+MBCategory category = (MBCategory)request.getAttribute(WebKeys.MESSAGE_BOARDS_CATEGORY);
+
+long categoryId = MBUtil.getCategoryId(request, category);
+
+String eventName = ParamUtil.getString(request, "eventName", liferayPortletResponse.getNamespace() + "selectCategory");
+
+MBCategoryDisplay categoryDisplay = new MBCategoryDisplayImpl(scopeGroupId, categoryId);
+
+String categoryName = null;
+
+if (category != null) {
+	MBUtil.addPortletBreadcrumbEntries(category, request, renderResponse);
+
+	categoryName = category.getName();
+}
+else {
+	categoryName = LanguageUtil.get(pageContext, "message-boards-home");
+}
+%>
+
+<aui:form method="post" name="selectCategoryFm">
+	<liferay-ui:header
+		title="message-boards-home"
+	/>
+
+	<liferay-ui:breadcrumb showGuestGroup="<%= false %>" showLayout="<%= false %>" showParentGroups="<%= false %>" />
+
+	<%
+	PortletURL portletURL = renderResponse.createRenderURL();
+
+	portletURL.setParameter("struts_action", "/message_boards/select_category");
+	portletURL.setParameter("mbCategoryId", String.valueOf(categoryId));
+	%>
+
+	<liferay-ui:search-container
+		headerNames="category[message-board],num-of-categories,num-of-threads,num-of-posts,"
+		iteratorURL="<%= portletURL %>"
+		total="<%= MBCategoryServiceUtil.getCategoriesCount(scopeGroupId, categoryId, WorkflowConstants.STATUS_APPROVED) %>"
+	>
+		<liferay-ui:search-container-results
+			results="<%= MBCategoryServiceUtil.getCategories(scopeGroupId, categoryId, WorkflowConstants.STATUS_APPROVED, searchContainer.getStart(), searchContainer.getEnd()) %>"
+		/>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portlet.messageboards.model.MBCategory"
+			escapedModel="<%= true %>"
+			keyProperty="categoryId"
+			modelVar="curCategory"
+		>
+
+			<portlet:renderURL var="rowURL">
+				<portlet:param name="struts_action" value="/message_boards/select_category" />
+				<portlet:param name="mbCategoryId" value="<%= String.valueOf(curCategory.getCategoryId()) %>" />
+			</portlet:renderURL>
+
+			<liferay-ui:search-container-column-text
+				buffer="buffer"
+				href="<%= rowURL %>"
+				name="category[message-board]"
+			>
+
+				<%
+				buffer.append(curCategory.getName());
+
+				if (Validator.isNotNull(curCategory.getDescription())) {
+					buffer.append("<br />");
+					buffer.append(curCategory.getDescription());
+				}
+				%>
+
+			</liferay-ui:search-container-column-text>
+
+			<liferay-ui:search-container-column-text
+				href="<%= rowURL %>"
+				name="num-of-categories"
+				value="<%= String.valueOf(categoryDisplay.getSubcategoriesCount(curCategory)) %>"
+			/>
+
+			<liferay-ui:search-container-column-text
+				href="<%= rowURL %>"
+				name="num-of-threads"
+				value="<%= String.valueOf(categoryDisplay.getSubcategoriesThreadsCount(curCategory)) %>"
+			/>
+
+			<liferay-ui:search-container-column-text
+				href="<%= rowURL %>"
+				name="num-of-posts"
+				value="<%= String.valueOf(categoryDisplay.getSubcategoriesMessagesCount(curCategory)) %>"
+			/>
+
+			<liferay-ui:search-container-column-text>
+
+				<%
+				Map<String, Object> data = new HashMap<String, Object>();
+
+				data.put("categoryId", curCategory.getCategoryId());
+				data.put("name", HtmlUtil.escapeAttribute(curCategory.getName()));
+				%>
+
+				<aui:button cssClass="selector-button" data="<%= data %>" value="choose" />
+			</liferay-ui:search-container-column-text>
+		</liferay-ui:search-container-row>
+
+		<aui:button-row>
+
+			<%
+			Map<String, Object> data = new HashMap<String, Object>();
+
+			data.put("categoryId", categoryId);
+			data.put("name", HtmlUtil.escapeAttribute(categoryName));
+			%>
+
+			<aui:button cssClass="selector-button"  data="<%= data %>" value="choose-this-category" />
+		</aui:button-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script use="aui-base">
+	var Util = Liferay.Util;
+
+	A.one('#<portlet:namespace />selectCategoryFm').delegate(
+		'click',
+		function(event) {
+			var result = Util.getAttributes(event.currentTarget, 'data-');
+
+			Util.getOpener().Liferay.fire('<%= HtmlUtil.escapeJS(eventName) %>', result);
+
+			Util.getWindow().hide();
+		},
+		'.selector-button'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/split_thread.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/split_thread.jsp
new file mode 100644
index 0000000..0d78cbc
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/split_thread.jsp
@@ -0,0 +1,163 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+MBMessage message = (MBMessage)request.getAttribute(WebKeys.MESSAGE_BOARDS_MESSAGE);
+
+MBCategory category = message.getCategory();
+
+MBThread thread = MBThreadLocalServiceUtil.getThread(message.getThreadId());
+
+long messageId = message.getMessageId();
+
+long categoryId = message.getCategoryId();
+long threadId = message.getThreadId();
+
+MBMessage curParentMessage = null;
+String parentAuthor = null;
+
+String body = StringPool.BLANK;
+boolean quote = false;
+boolean splitThread = true;
+%>
+
+<portlet:actionURL var="splitThreadURL">
+	<portlet:param name="struts_action" value="/message_boards/split_thread" />
+</portlet:actionURL>
+
+<aui:form action="<%= splitThreadURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "splitThread();" %>'>
+	<aui:input name="messageId" type="hidden" value="<%= messageId %>" />
+	<aui:input name="mbCategoryId" type="hidden" value="<%= categoryId %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title="message"
+	/>
+
+	<liferay-ui:error exception="<%= MessageBodyException.class %>" message="please-enter-a-valid-message" />
+	<liferay-ui:error exception="<%= MessageSubjectException.class %>" message="please-enter-a-valid-subject" />
+	<liferay-ui:error exception="<%= NoSuchCategoryException.class %>" message="please-enter-a-valid-category" />
+	<liferay-ui:error exception="<%= SplitThreadException.class %>" message="a-thread-cannot-be-split-at-its-root-message" />
+
+	<%
+	long breadcrumbsMessageId = message.getMessageId();
+	%>
+
+	<div class="alert alert-info">
+		<liferay-ui:message key="click-ok-to-create-a-new-thread-with-the-following-messages" />
+	</div>
+
+	<%
+	MBMessageDisplay messageDisplay = MBMessageServiceUtil.getMessageDisplay(messageId, WorkflowConstants.STATUS_APPROVED, MBThreadConstants.THREAD_VIEW_TREE, false);
+
+	MBTreeWalker treeWalker = messageDisplay.getTreeWalker();
+
+	List messages = new ArrayList();
+
+	messages.addAll(treeWalker.getMessages());
+
+	messages = ListUtil.sort(messages, new MessageCreateDateComparator(true));
+	%>
+
+	<table class="toggle_id_message_boards_view_message_thread" id="toggle_id_message_boards_view_message_thread" style="display: <liferay-ui:toggle-value id="toggle_id_message_boards_view_message_thread" />;">
+
+	<%
+	request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER, treeWalker);
+	request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_CATEGORY, category);
+	request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_CUR_MESSAGE, message);
+	request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_DEPTH, new Integer(0));
+	request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_LAST_NODE, Boolean.valueOf(false));
+	request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_SEL_MESSAGE, message);
+	request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_THREAD, thread);
+	%>
+
+	<liferay-util:include page="/html/portlet/message_boards/view_thread_shortcut.jsp" />
+
+	</table>
+
+	<br />
+
+	<aui:fieldset>
+		<div id="<portlet:namespace />splitThreadSubject">
+			<aui:input fieldParam="splitThreadSubject" label="subject-of-the-new-thread" model="<%= MBMessage.class %>" name="subject" value="<%= message.getSubject() %>" />
+		</div>
+
+		<aui:input disabled="<%= thread.isLocked() %>" helpMessage='<%= thread.isLocked() ? LanguageUtil.get(pageContext, "unlock-thread-to-add-an-explanation-post") : StringPool.BLANK %>' label="add-explanation-post-to-the-source-thread" name="addExplanationPost" onClick='<%= renderResponse.getNamespace() + "toggleExplanationPost();" %>' type="checkbox" />
+
+		<div id="<portlet:namespace />explanationPost" style="display: none;">
+			<div class="alert alert-info">
+				<liferay-ui:message key="the-following-post-will-be-added-in-place-of-the-moved-message" />
+			</div>
+
+			<aui:input model="<%= MBMessage.class %>" name="subject" value='<%= LanguageUtil.get(pageContext, "thread-split") %>' />
+
+			<aui:field-wrapper label="body">
+				<c:choose>
+					<c:when test="<%= message.isFormatBBCode() %>">
+						<%@ include file="/html/portlet/message_boards/bbcode_editor.jspf" %>
+					</c:when>
+					<c:otherwise>
+						<%@ include file="/html/portlet/message_boards/html_editor.jspf" %>
+					</c:otherwise>
+				</c:choose>
+
+				<aui:input name="body" type="hidden" />
+			</aui:field-wrapper>
+		</div>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" value="ok" />
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />splitThread() {
+		document.<portlet:namespace />fm.<portlet:namespace />body.value = <portlet:namespace />getHTML();
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />selectCategory(categoryId, categoryName) {
+		document.<portlet:namespace />fm.<portlet:namespace />mbCategoryId.value = categoryId;
+
+		var nameEl = document.getElementById("<portlet:namespace />categoryName");
+
+		nameEl.href = "<portlet:renderURL><portlet:param name="struts_action" value="/message_boards/view" /></portlet:renderURL>&<portlet:namespace />mbCategoryId=" + categoryId;
+		nameEl.innerHTML = categoryName + "&nbsp;";
+	}
+
+	function <portlet:namespace />toggleExplanationPost() {
+		if (document.getElementById("<portlet:namespace />addExplanationPostCheckbox").checked) {
+			document.getElementById("<portlet:namespace />explanationPost").style.display = "";
+		}
+		else {
+			document.getElementById("<portlet:namespace />explanationPost").style.display = "none";
+		}
+	}
+</aui:script>
+
+<%
+MBUtil.addPortletBreadcrumbEntries(message, request, renderResponse);
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "split-thread"), currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/subscribed_category_columns.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/subscribed_category_columns.jspf
new file mode 100644
index 0000000..e321fc9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/subscribed_category_columns.jspf
@@ -0,0 +1,109 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:search-container-column-text name="category">
+
+<%
+StringBundler sb = new StringBundler();
+
+_buildCategoryBreadcrumb(request, curCategory, sb);
+%>
+
+<%= sb.toString() %>
+
+</liferay-ui:search-container-column-text>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="categories"
+	value="<%= String.valueOf(categoryDisplay.getSubcategoriesCount(curCategory)) %>"
+/>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="threads"
+	value="<%= String.valueOf(categoryDisplay.getSubcategoriesThreadsCount(curCategory)) %>"
+/>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="posts"
+	value="<%= String.valueOf(categoryDisplay.getSubcategoriesMessagesCount(curCategory)) %>"
+/>
+
+<%@ include file="/html/portlet/message_boards/subscribed_category_columns_action.jspf" %>
+
+<%!
+private void _buildCategoryBreadcrumb(HttpServletRequest request, MBCategory category, StringBundler sb) throws Exception {
+	ThemeDisplay themeDisplay = (ThemeDisplay)request.getAttribute(WebKeys.THEME_DISPLAY);
+
+	List<MBCategory> ancestorCategories = category.getAncestors();
+
+	Collections.reverse(ancestorCategories);
+
+	sb.append("<ul class=\"breadcrumb\">");
+
+	for (int i = 0; i < ancestorCategories.size(); i++) {
+		MBCategory ancestorCategory = ancestorCategories.get(i);
+
+		PortletURL portletURL = PortletURLFactoryUtil.create(request, PortletKeys.MESSAGE_BOARDS, themeDisplay.getPlid(), PortletRequest.RENDER_PHASE);
+
+		portletURL.setParameter("struts_action", "/message_boards/view");
+		portletURL.setParameter("mbCategoryId", String.valueOf(ancestorCategory.getCategoryId()));
+
+		String cssClass = StringPool.BLANK;
+
+		if (i == 0) {
+			cssClass = "first";
+		}
+
+		sb.append("<li");
+		sb.append(" class=\"");
+		sb.append(cssClass);
+		sb.append("\">");
+		sb.append("<a href=\"");
+		sb.append(HtmlUtil.escape(portletURL.toString()));
+		sb.append("\">");
+		sb.append(ancestorCategory.getName());
+		sb.append("</a>");
+		sb.append("<span class=\"divider\">/</span>");
+		sb.append("</li>");
+	}
+
+	PortletURL portletURL = PortletURLFactoryUtil.create(request, PortletKeys.MESSAGE_BOARDS, themeDisplay.getPlid(), PortletRequest.RENDER_PHASE);
+
+	portletURL.setParameter("struts_action", "/message_boards/view");
+	portletURL.setParameter("mbCategoryId", String.valueOf(category.getCategoryId()));
+
+	sb.append("<li class=\"active last\">");
+	sb.append("<strong>");
+	sb.append("<a href=\"");
+	sb.append(HtmlUtil.escape(portletURL.toString()));
+	sb.append("\">");
+	sb.append(category.getName());
+	sb.append("</strong>");
+	sb.append("</a>");
+
+	if (Validator.isNotNull(category.getDescription())) {
+		sb.append("<p>");
+		sb.append(category.getDescription());
+		sb.append("</p>");
+	}
+
+	sb.append("</li>");
+	sb.append("</ul>");
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/subscribed_category_columns_action.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/subscribed_category_columns_action.jspf
new file mode 100644
index 0000000..29711b0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/subscribed_category_columns_action.jspf
@@ -0,0 +1,20 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:search-container-column-jsp
+	align="right"
+	path="/html/portlet/message_boards/category_action.jsp"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/thread_columns.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/thread_columns.jspf
new file mode 100644
index 0000000..e292453
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/thread_columns.jspf
@@ -0,0 +1,88 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:search-container-column-text
+	buffer="buffer"
+	href="<%= rowURL %>"
+	name="thread"
+>
+
+	<%
+	String[] threadPriority = MBUtil.getThreadPriority(portletPreferences, themeDisplay.getLanguageId(), thread.getPriority(), themeDisplay);
+
+	if ((threadPriority != null) && (thread.getPriority() > 0)) {
+		buffer.append("<img class=\"thread-priority\" alt=\"");
+		buffer.append(threadPriority[0]);
+		buffer.append("\" src=\"");
+		buffer.append(threadPriority[1]);
+		buffer.append("\" title=\"");
+		buffer.append(threadPriority[0]);
+		buffer.append("\" />");
+	}
+
+	if (thread.isLocked()) {
+		buffer.append("<img class=\"thread-priority\" alt=\"");
+		buffer.append(LanguageUtil.get(pageContext, "thread-locked"));
+		buffer.append("\" src=\"");
+		buffer.append(themeDisplay.getPathThemeImages() + "/common/lock.png");
+		buffer.append("\" title=\"");
+		buffer.append(LanguageUtil.get(pageContext, "thread-locked"));
+		buffer.append("\" />");
+	}
+
+	buffer.append(message.getSubject());
+	%>
+
+</liferay-ui:search-container-column-text>
+
+<liferay-ui:search-container-column-text
+	buffer="buffer"
+	href="<%= rowURL %>"
+	name="flag"
+>
+
+	<%
+	if (MBThreadLocalServiceUtil.hasAnswerMessage(thread.getThreadId())) {
+		buffer.append(LanguageUtil.get(pageContext, "resolved"));
+	}
+	else if (thread.isQuestion()) {
+		buffer.append(LanguageUtil.get(pageContext, "waiting-for-an-answer"));
+	}
+	%>
+
+</liferay-ui:search-container-column-text>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="started-by"
+	value='<%= message.isAnonymous() ? LanguageUtil.get(pageContext, "anonymous") : HtmlUtil.escape(PortalUtil.getUserName(message.getUserId(), message.getUserName())) %>'
+/>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="posts"
+	value="<%= String.valueOf(thread.getMessageCount()) %>"
+/>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="views"
+	value="<%= String.valueOf(thread.getViewCount()) %>"
+/>
+
+<%@ include file="/html/portlet/message_boards/thread_columns_last_post.jspf" %>
+
+<%@ include file="/html/portlet/message_boards/thread_columns_action.jspf" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/thread_columns_action.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/thread_columns_action.jspf
new file mode 100644
index 0000000..95ed2bb
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/thread_columns_action.jspf
@@ -0,0 +1,20 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:search-container-column-jsp
+	align="right"
+	path="/html/portlet/message_boards/message_action.jsp"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/thread_columns_last_post.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/thread_columns_last_post.jspf
new file mode 100644
index 0000000..1624ab2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/thread_columns_last_post.jspf
@@ -0,0 +1,43 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:search-container-column-text
+	buffer="buffer"
+	href="<%= rowURL %>"
+	name="last-post"
+>
+
+	<%
+	if (thread.getLastPostDate() == null) {
+		buffer.append(LanguageUtil.get(pageContext, "none"));
+	}
+	else {
+		buffer.append(LanguageUtil.get(pageContext, "date"));
+		buffer.append(": ");
+		buffer.append(dateFormatDateTime.format(thread.getLastPostDate()));
+
+		String lastPostByUserName = HtmlUtil.escape(PortalUtil.getUserName(thread.getLastPostByUserId(), StringPool.BLANK));
+
+		if (Validator.isNotNull(lastPostByUserName)) {
+			buffer.append("<br />");
+			buffer.append(LanguageUtil.get(pageContext, "by"));
+			buffer.append(": ");
+			buffer.append(lastPostByUserName);
+		}
+	}
+	%>
+
+</liferay-ui:search-container-column-text>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/top_links.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/top_links.jsp
new file mode 100644
index 0000000..9489393
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/top_links.jsp
@@ -0,0 +1,125 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+String topLink = ParamUtil.getString(request, "topLink", "message-boards-home");
+
+MBCategory category = (MBCategory)request.getAttribute(WebKeys.MESSAGE_BOARDS_CATEGORY);
+
+long categoryId = MBUtil.getCategoryId(request, category);
+
+boolean viewCategory = GetterUtil.getBoolean((String)request.getAttribute("view.jsp-viewCategory"));
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/message_boards/view");
+%>
+
+<aui:nav-bar>
+	<aui:nav>
+
+		<%
+		String label = "message-boards-home";
+
+		portletURL.setParameter("topLink", label);
+		portletURL.setParameter("tag", StringPool.BLANK);
+		%>
+
+		<aui:nav-item cssClass='<%= topLink.equals(label) ? "active" : StringPool.BLANK %>' href="<%= portletURL.toString() %>" label="<%= label %>" selected="<%= topLink.equals(label) %>" />
+
+		<%
+		label = "recent-posts";
+
+		portletURL.setParameter("topLink", label);
+		%>
+
+		<aui:nav-item cssClass='<%= topLink.equals(label) ? "active" : StringPool.BLANK %>' href="<%= portletURL.toString() %>" label="<%= label %>" selected="<%= topLink.equals(label) %>" />
+
+		<c:if test="<%= themeDisplay.isSignedIn() && !portletName.equals(PortletKeys.MESSAGE_BOARDS_ADMIN) %>">
+
+			<%
+			label = "my-posts";
+
+			portletURL.setParameter("topLink", label);
+			%>
+
+			<aui:nav-item cssClass='<%= topLink.equals(label) ? "active" : StringPool.BLANK %>' href="<%= portletURL.toString() %>" label="<%= label %>" selected="<%= topLink.equals(label) %>" />
+
+			<c:if test="<%= MBUtil.getEmailMessageAddedEnabled(portletPreferences) || MBUtil.getEmailMessageUpdatedEnabled(portletPreferences) %>">
+
+				<%
+				label = "my-subscriptions";
+
+				portletURL.setParameter("topLink", label);
+				%>
+
+				<aui:nav-item cssClass='<%= topLink.equals(label) ? "active" : StringPool.BLANK %>' href="<%= portletURL.toString() %>" label="<%= label %>" selected="<%= topLink.equals(label) %>" />
+			</c:if>
+		</c:if>
+
+		<%
+		label = "statistics";
+
+		portletURL.setParameter("topLink", label);
+		%>
+
+		<aui:nav-item cssClass='<%= topLink.equals(label) ? "active" : StringPool.BLANK %>' href="<%= portletURL.toString() %>" label="<%= label %>" selected="<%= topLink.equals(label) %>" />
+
+		<c:if test="<%= MBPermission.contains(permissionChecker, scopeGroupId, ActionKeys.BAN_USER) %>">
+
+			<%
+			label = "banned-users";
+
+			portletURL.setParameter("topLink", label);
+			%>
+
+			<aui:nav-item cssClass='<%= topLink.equals(label) ? "active" : StringPool.BLANK %>' href="<%= portletURL.toString() %>" label="<%= label %>" selected="<%= topLink.equals(label) %>" />
+		</c:if>
+	</aui:nav>
+
+	<c:if test="<%= showSearch %>">
+		<liferay-portlet:renderURL varImpl="searchURL">
+			<portlet:param name="struts_action" value="/message_boards/search" />
+		</liferay-portlet:renderURL>
+
+		<aui:nav-bar-search cssClass="pull-right">
+			<div class="form-search">
+				<aui:form action="<%= searchURL %>" method="get" name="searchFm">
+					<liferay-portlet:renderURLParams varImpl="searchURL" />
+					<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+					<aui:input name="breadcrumbsCategoryId" type="hidden" value="<%= categoryId %>" />
+					<aui:input name="searchCategoryId" type="hidden" value="<%= categoryId %>" />
+
+					<liferay-ui:input-search id="keywords1" />
+				</aui:form>
+			</div>
+		</aui:nav-bar-search>
+
+		<c:if test="<%= windowState.equals(WindowState.MAXIMIZED) && !themeDisplay.isFacebook() %>">
+			<aui:script>
+				Liferay.Util.focusFormField(document.getElementById('<portlet:namespace />keywords1'));
+			</aui:script>
+		</c:if>
+	</c:if>
+</aui:nav-bar>
+
+<c:if test="<%= layout.isTypeControlPanel() %>">
+	<div id="breadcrumb">
+		<liferay-ui:breadcrumb showCurrentGroup="<%= false %>" showCurrentPortlet="<%= false %>" showGuestGroup="<%= false %>" showLayout="<%= false %>" showPortletBreadcrumb="<%= true %>" />
+	</div>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/top_posters_user_display.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/top_posters_user_display.jsp
new file mode 100644
index 0000000..096e606
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/top_posters_user_display.jsp
@@ -0,0 +1,47 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+MBStatsUser statsUser = (MBStatsUser)row.getObject();
+
+String[] ranks = MBUtil.getUserRank(portletPreferences, themeDisplay.getLanguageId(), statsUser);
+%>
+
+<liferay-ui:user-display userId="<%= statsUser.getUserId() %>">
+	<c:if test="<%= Validator.isNotNull(ranks[0]) %>">
+		<div class="thread-user-rank">
+			<span><liferay-ui:message key="rank" />:</span> <%= ranks[0] %>
+		</div>
+	</c:if>
+
+	<div class="thread-user-post-count">
+		<span><liferay-ui:message key="posts" />:</span> <%= statsUser.getMessageCount() %>
+	</div>
+
+	<div class="thread-user-join-date">
+		<span><liferay-ui:message key="join-date" />:</span> <%= dateFormatDate.format(userDisplay.getCreateDate()) %>
+	</div>
+
+	<c:if test="<%= statsUser.getLastPostDate() != null %>">
+		<div class="thread-user-last-post-date">
+			<span><liferay-ui:message key="last-post-date" />:</span> <%= dateFormatDate.format(statsUser.getLastPostDate()) %>
+		</div>
+	</c:if>
+</liferay-ui:user-display>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/user_thread_columns.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/user_thread_columns.jspf
new file mode 100644
index 0000000..c0fbdd0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/user_thread_columns.jspf
@@ -0,0 +1,72 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:search-container-column-text
+	buffer="buffer"
+	href="<%= rowURL %>"
+	name="thread"
+>
+
+	<%
+	String[] threadPriority = MBUtil.getThreadPriority(portletPreferences, themeDisplay.getLanguageId(), thread.getPriority(), themeDisplay);
+
+	if ((threadPriority != null) && (thread.getPriority() > 0)) {
+		buffer.append("<img class=\"thread-priority\" alt=\"");
+		buffer.append(threadPriority[0]);
+		buffer.append("\" src=\"");
+		buffer.append(threadPriority[1]);
+		buffer.append("\" title=\"");
+		buffer.append(threadPriority[0]);
+		buffer.append("\" />");
+	}
+
+	buffer.append(message.getSubject());
+	%>
+
+</liferay-ui:search-container-column-text>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="started-by"
+	value='<%= message.isAnonymous() ? LanguageUtil.get(pageContext, "anonymous") : PortalUtil.getUserName(message) %>'
+/>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="posts"
+	value="<%= String.valueOf(thread.getMessageCount()) %>"
+/>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="views"
+	value="<%= String.valueOf(thread.getViewCount()) %>"
+/>
+
+<%@ include file="/html/portlet/message_boards/user_thread_columns_last_post.jspf" %>
+
+<c:if test='<%= topLink.equals("my-posts") %>'>
+	<liferay-ui:search-container-column-status
+		href="<%= rowURL %>"
+		name="status"
+	/>
+</c:if>
+
+<%
+row.setObject(new Object[] {message, threadSubscriptionClassPKs});
+%>
+
+<%@ include file="/html/portlet/message_boards/user_thread_columns_action.jspf" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/user_thread_columns_action.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/user_thread_columns_action.jspf
new file mode 100644
index 0000000..95ed2bb
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/user_thread_columns_action.jspf
@@ -0,0 +1,20 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:search-container-column-jsp
+	align="right"
+	path="/html/portlet/message_boards/message_action.jsp"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/user_thread_columns_last_post.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/user_thread_columns_last_post.jspf
new file mode 100644
index 0000000..1624ab2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/user_thread_columns_last_post.jspf
@@ -0,0 +1,43 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:search-container-column-text
+	buffer="buffer"
+	href="<%= rowURL %>"
+	name="last-post"
+>
+
+	<%
+	if (thread.getLastPostDate() == null) {
+		buffer.append(LanguageUtil.get(pageContext, "none"));
+	}
+	else {
+		buffer.append(LanguageUtil.get(pageContext, "date"));
+		buffer.append(": ");
+		buffer.append(dateFormatDateTime.format(thread.getLastPostDate()));
+
+		String lastPostByUserName = HtmlUtil.escape(PortalUtil.getUserName(thread.getLastPostByUserId(), StringPool.BLANK));
+
+		if (Validator.isNotNull(lastPostByUserName)) {
+			buffer.append("<br />");
+			buffer.append(LanguageUtil.get(pageContext, "by"));
+			buffer.append(": ");
+			buffer.append(lastPostByUserName);
+		}
+	}
+	%>
+
+</liferay-ui:search-container-column-text>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view.jsp
new file mode 100644
index 0000000..d1e97f7
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view.jsp
@@ -0,0 +1,462 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+String topLink = ParamUtil.getString(request, "topLink", "message-boards-home");
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+MBCategory category = (MBCategory)request.getAttribute(WebKeys.MESSAGE_BOARDS_CATEGORY);
+
+long categoryId = MBUtil.getCategoryId(request, category);
+
+String displayStyle = BeanPropertiesUtil.getString(category, "displayStyle", MBCategoryConstants.DEFAULT_DISPLAY_STYLE);
+
+MBCategoryDisplay categoryDisplay = new MBCategoryDisplayImpl(scopeGroupId, categoryId);
+
+Set<Long> categorySubscriptionClassPKs = null;
+Set<Long> threadSubscriptionClassPKs = null;
+
+if (themeDisplay.isSignedIn()) {
+	categorySubscriptionClassPKs = MBUtil.getCategorySubscriptionClassPKs(user.getUserId());
+	threadSubscriptionClassPKs = MBUtil.getThreadSubscriptionClassPKs(user.getUserId());
+}
+
+long groupThreadsUserId = ParamUtil.getLong(request, "groupThreadsUserId");
+
+String assetTagName = ParamUtil.getString(request, "tag");
+
+boolean useAssetEntryQuery = Validator.isNotNull(assetTagName);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/message_boards/view");
+portletURL.setParameter("topLink", topLink);
+portletURL.setParameter("mbCategoryId", String.valueOf(categoryId));
+
+request.setAttribute("view.jsp-categoryDisplay", categoryDisplay);
+
+request.setAttribute("view.jsp-categorySubscriptionClassPKs", categorySubscriptionClassPKs);
+request.setAttribute("view.jsp-threadSubscriptionClassPKs", threadSubscriptionClassPKs);
+
+request.setAttribute("view.jsp-viewCategory", Boolean.TRUE.toString());
+
+request.setAttribute("view.jsp-portletURL", portletURL);
+%>
+
+<portlet:actionURL var="undoTrashURL">
+	<portlet:param name="struts_action" value="/message_boards/edit_entry" />
+	<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.RESTORE %>" />
+</portlet:actionURL>
+
+<liferay-ui:trash-undo portletURL="<%= undoTrashURL %>" />
+
+<liferay-util:include page="/html/portlet/message_boards/top_links.jsp" />
+
+<c:choose>
+	<c:when test="<%= useAssetEntryQuery %>">
+		<liferay-ui:categorization-filter
+			assetType="threads"
+			portletURL="<%= portletURL %>"
+		/>
+
+		<%@ include file="/html/portlet/message_boards/view_threads.jspf" %>
+
+	</c:when>
+	<c:when test='<%= topLink.equals("message-boards-home") %>'>
+
+		<%
+		boolean showAddCategoryButton = MBCategoryPermission.contains(permissionChecker, scopeGroupId, categoryId, ActionKeys.ADD_CATEGORY);
+		boolean showAddMessageButton = MBCategoryPermission.contains(permissionChecker, scopeGroupId, categoryId, ActionKeys.ADD_MESSAGE);
+		boolean showPermissionsButton = MBPermission.contains(permissionChecker, scopeGroupId, ActionKeys.PERMISSIONS);
+
+		if (showAddMessageButton && !themeDisplay.isSignedIn()) {
+			if (!allowAnonymousPosting) {
+				showAddMessageButton = false;
+			}
+		}
+		%>
+
+		<c:if test="<%= showAddCategoryButton || showAddMessageButton || showPermissionsButton %>">
+			<div class="category-buttons">
+				<c:if test="<%= showAddCategoryButton %>">
+					<portlet:renderURL var="editCategoryURL">
+						<portlet:param name="struts_action" value="/message_boards/edit_category" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+						<portlet:param name="parentCategoryId" value="<%= String.valueOf(categoryId) %>" />
+					</portlet:renderURL>
+
+					<aui:button href="<%= editCategoryURL %>" value='<%= (category == null) ? "add-category[message-board]" : "add-subcategory[message-board]" %>' />
+				</c:if>
+
+				<c:if test="<%= showAddMessageButton %>">
+					<portlet:renderURL var="editMessageURL">
+						<portlet:param name="struts_action" value="/message_boards/edit_message" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+						<portlet:param name="mbCategoryId" value="<%= String.valueOf(categoryId) %>" />
+					</portlet:renderURL>
+
+					<aui:button href="<%= editMessageURL %>" value="post-new-thread" />
+				</c:if>
+
+				<c:if test="<%= showPermissionsButton %>">
+
+					<%
+					String modelResource = "com.liferay.portlet.messageboards";
+					String modelResourceDescription = themeDisplay.getScopeGroupName();
+					String resourcePrimKey = String.valueOf(scopeGroupId);
+
+					if (category != null) {
+						modelResource = MBCategory.class.getName();
+						modelResourceDescription = category.getName();
+						resourcePrimKey = String.valueOf(category.getCategoryId());
+					}
+					%>
+
+					<liferay-security:permissionsURL
+						modelResource="<%= modelResource %>"
+						modelResourceDescription="<%= HtmlUtil.escape(modelResourceDescription) %>"
+						resourcePrimKey="<%= resourcePrimKey %>"
+						var="permissionsURL"
+						windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+					/>
+
+					<aui:button href="<%= permissionsURL %>" useDialog="<%= true %>" value="permissions" />
+				</c:if>
+			</div>
+
+			<%@ include file="/html/portlet/message_boards/category_subscriptions.jspf" %>
+		</c:if>
+
+		<c:if test="<%= category != null %>">
+			<div class="category-subscription category-subscription-types">
+				<c:if test="<%= enableRSS %>">
+
+					<%
+					if (category.getCategoryId() > 0) {
+						rssURL.setParameter("mbCategoryId", String.valueOf(category.getCategoryId()));
+					}
+					else {
+						rssURL.setParameter("groupId", String.valueOf(scopeGroupId));
+					}
+					%>
+
+					<liferay-ui:rss
+						delta="<%= rssDelta %>"
+						displayStyle="<%= rssDisplayStyle %>"
+						feedType="<%= rssFeedType %>"
+						resourceURL="<%= rssURL %>"
+					/>
+				</c:if>
+
+				<c:if test="<%= MBCategoryPermission.contains(permissionChecker, category, ActionKeys.SUBSCRIBE) && (MBUtil.getEmailMessageAddedEnabled(portletPreferences) || MBUtil.getEmailMessageUpdatedEnabled(portletPreferences)) %>">
+					<c:choose>
+						<c:when test="<%= (categorySubscriptionClassPKs != null) && categorySubscriptionClassPKs.contains(category.getCategoryId()) %>">
+							<portlet:actionURL var="unsubscribeURL">
+								<portlet:param name="struts_action" value="/message_boards/edit_category" />
+								<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UNSUBSCRIBE %>" />
+								<portlet:param name="redirect" value="<%= currentURL %>" />
+								<portlet:param name="mbCategoryId" value="<%= String.valueOf(category.getCategoryId()) %>" />
+							</portlet:actionURL>
+
+							<liferay-ui:icon
+								image="unsubscribe"
+								label="<%= true %>"
+								url="<%= unsubscribeURL %>"
+							/>
+						</c:when>
+						<c:otherwise>
+							<portlet:actionURL var="subscribeURL">
+								<portlet:param name="struts_action" value="/message_boards/edit_category" />
+								<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.SUBSCRIBE %>" />
+								<portlet:param name="redirect" value="<%= currentURL %>" />
+								<portlet:param name="mbCategoryId" value="<%= String.valueOf(category.getCategoryId()) %>" />
+							</portlet:actionURL>
+
+							<liferay-ui:icon
+								image="subscribe"
+								label="<%= true %>"
+								url="<%= subscribeURL %>"
+							/>
+						</c:otherwise>
+					</c:choose>
+				</c:if>
+			</div>
+
+			<%
+			long parentCategoryId = category.getParentCategoryId();
+			String parentCategoryName = LanguageUtil.get(pageContext, "message-boards-home");
+
+			if (!category.isRoot()) {
+				MBCategory parentCategory = MBCategoryLocalServiceUtil.getCategory(parentCategoryId);
+
+				parentCategoryId = parentCategory.getCategoryId();
+				parentCategoryName = parentCategory.getName();
+			}
+			%>
+
+			<portlet:renderURL var="backURL">
+				<portlet:param name="struts_action" value="/message_boards/view" />
+				<portlet:param name="mbCategoryId" value="<%= String.valueOf(parentCategoryId) %>" />
+			</portlet:renderURL>
+
+			<liferay-ui:header
+				backLabel="<%= parentCategoryName %>"
+				backURL="<%= backURL.toString() %>"
+				localizeTitle="<%= false %>"
+				title="<%= category.getName() %>"
+			/>
+		</c:if>
+
+		<div class="displayStyle-<%= displayStyle %>">
+			<liferay-util:include page='<%= "/html/portlet/message_boards/view_category_" + displayStyle + ".jsp" %>' />
+		</div>
+
+		<%
+		if (category != null) {
+			PortalUtil.setPageSubtitle(category.getName(), request);
+			PortalUtil.setPageDescription(category.getDescription(), request);
+
+			MBUtil.addPortletBreadcrumbEntries(category, request, renderResponse);
+		}
+		%>
+
+	</c:when>
+	<c:when test='<%= topLink.equals("my-posts") || topLink.equals("my-subscriptions") || topLink.equals("recent-posts") %>'>
+
+		<%
+		if ((topLink.equals("my-posts") || topLink.equals("my-subscriptions")) && themeDisplay.isSignedIn()) {
+			groupThreadsUserId = user.getUserId();
+		}
+
+		if (groupThreadsUserId > 0) {
+			portletURL.setParameter("groupThreadsUserId", String.valueOf(groupThreadsUserId));
+		}
+		%>
+
+		<c:if test='<%= topLink.equals("recent-posts") && (groupThreadsUserId > 0) %>'>
+			<div class="alert alert-info">
+				<liferay-ui:message key="filter-by-user" />: <%= HtmlUtil.escape(PortalUtil.getUserName(groupThreadsUserId, StringPool.BLANK)) %>
+			</div>
+		</c:if>
+
+		<c:if test='<%= topLink.equals("my-subscriptions") %>'>
+			<liferay-ui:search-container
+				curParam="cur1"
+				deltaConfigurable="<%= false %>"
+				emptyResultsMessage="you-are-not-subscribed-to-any-categories"
+				headerNames="category,categories,threads,posts"
+				iteratorURL="<%= portletURL %>"
+				total="<%= MBCategoryServiceUtil.getSubscribedCategoriesCount(scopeGroupId, user.getUserId()) %>"
+			>
+				<liferay-ui:search-container-results
+					results="<%= MBCategoryServiceUtil.getSubscribedCategories(scopeGroupId, user.getUserId(), searchContainer.getStart(), searchContainer.getEnd()) %>"
+				/>
+
+				<liferay-ui:search-container-row
+					className="com.liferay.portlet.messageboards.model.MBCategory"
+					escapedModel="<%= true %>"
+					keyProperty="categoryId"
+					modelVar="curCategory"
+				>
+					<liferay-ui:search-container-row-parameter name="categorySubscriptionClassPKs" value="<%= categorySubscriptionClassPKs %>" />
+
+					<liferay-portlet:renderURL varImpl="rowURL">
+						<portlet:param name="struts_action" value="/message_boards/view" />
+						<portlet:param name="mbCategoryId" value="<%= String.valueOf(curCategory.getCategoryId()) %>" />
+					</liferay-portlet:renderURL>
+
+					<%@ include file="/html/portlet/message_boards/subscribed_category_columns.jspf" %>
+				</liferay-ui:search-container-row>
+
+				<liferay-ui:search-iterator type="more" />
+			</liferay-ui:search-container>
+		</c:if>
+
+		<%@ include file="/html/portlet/message_boards/view_threads.jspf" %>
+
+		<c:if test='<%= enableRSS && topLink.equals("recent-posts") %>'>
+
+			<%
+			rssURL.setParameter("groupId", String.valueOf(scopeGroupId));
+
+			if (groupThreadsUserId > 0) {
+				rssURL.setParameter("userId", String.valueOf(groupThreadsUserId));
+			}
+
+			rssURL.setParameter("mbCategoryId", StringPool.BLANK);
+			%>
+
+			<br />
+
+			<liferay-ui:rss
+				delta="<%= rssDelta %>"
+				displayStyle="<%= rssDisplayStyle %>"
+				feedType="<%= rssFeedType %>"
+				message="subscribe-to-recent-posts"
+				resourceURL="<%= rssURL %>"
+			/>
+		</c:if>
+
+		<%
+		PortalUtil.setPageSubtitle(LanguageUtil.get(pageContext, StringUtil.replace(topLink, StringPool.UNDERLINE, StringPool.DASH)), request);
+		PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, TextFormatter.format(topLink, TextFormatter.O)), portletURL.toString());
+		%>
+
+	</c:when>
+	<c:when test='<%= topLink.equals("statistics") %>'>
+		<liferay-ui:panel-container cssClass="statistics-panel" extended="<%= false %>" id="messageBoardsStatisticsPanelContainer" persistState="<%= true %>">
+			<liferay-ui:panel collapsible="<%= true %>" cssClass="statistics-panel-content" extended="<%= true %>" id="messageBoardsGeneralStatisticsPanel" persistState="<%= true %>" title="general">
+				<dl>
+					<dt>
+						<liferay-ui:message key="num-of-categories" />:
+					</dt>
+					<dd>
+						<%= numberFormat.format(categoryDisplay.getAllCategoriesCount()) %>
+					</dd>
+					<dt>
+						<liferay-ui:message key="num-of-posts" />:
+					</dt>
+					<dd>
+						<%= numberFormat.format(MBStatsUserLocalServiceUtil.getMessageCountByGroupId(scopeGroupId)) %>
+					</dd>
+					<dt>
+						<liferay-ui:message key="num-of-participants" />:
+					</dt>
+					<dd>
+						<%= numberFormat.format(MBStatsUserLocalServiceUtil.getStatsUsersByGroupIdCount(scopeGroupId)) %>
+					</dd>
+				</dl>
+			</liferay-ui:panel>
+
+			<liferay-ui:panel collapsible="<%= true %>" cssClass="statistics-panel-content" extended="<%= true %>" id="messageBoardsTopPostersPanel" persistState="<%= true %>" title="top-posters">
+				<liferay-ui:search-container
+					emptyResultsMessage="there-are-no-top-posters"
+					iteratorURL="<%= portletURL %>"
+					total="<%= MBStatsUserLocalServiceUtil.getStatsUsersByGroupIdCount(scopeGroupId) %>"
+				>
+					<liferay-ui:search-container-results
+						results="<%= MBStatsUserLocalServiceUtil.getStatsUsersByGroupId(scopeGroupId, searchContainer.getStart(), searchContainer.getEnd()) %>"
+					/>
+
+					<liferay-ui:search-container-row
+						className="com.liferay.portlet.messageboards.model.MBStatsUser"
+						keyProperty="statsUserId"
+						modelVar="statsUser"
+					>
+						<liferay-ui:search-container-column-jsp
+							path="/html/portlet/message_boards/top_posters_user_display.jsp"
+						/>
+					</liferay-ui:search-container-row>
+
+					<liferay-ui:search-iterator />
+				</liferay-ui:search-container>
+			</liferay-ui:panel>
+		</liferay-ui:panel-container>
+
+		<%
+		PortalUtil.setPageSubtitle(LanguageUtil.get(pageContext, StringUtil.replace(topLink, StringPool.UNDERLINE, StringPool.DASH)), request);
+		PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, TextFormatter.format(topLink, TextFormatter.O)), portletURL.toString());
+		%>
+
+	</c:when>
+	<c:when test='<%= topLink.equals("banned-users") %>'>
+		<liferay-ui:search-container
+			emptyResultsMessage="there-are-no-banned-users"
+			headerNames="banned-user,banned-by,ban-date"
+			iteratorURL="<%= portletURL %>"
+			total="<%= MBBanLocalServiceUtil.getBansCount(scopeGroupId) %>"
+		>
+			<liferay-ui:search-container-results
+				results="<%= MBBanLocalServiceUtil.getBans(scopeGroupId, searchContainer.getStart(), searchContainer.getEnd()) %>"
+			/>
+
+			<liferay-ui:search-container-row
+				className="com.liferay.portlet.messageboards.model.MBBan"
+				keyProperty="banId"
+				modelVar="ban"
+			>
+
+				<%
+				String bannedUserDisplayURL = StringPool.BLANK;
+
+				try {
+					User bannedUser = UserLocalServiceUtil.getUser(ban.getBanUserId());
+
+					bannedUserDisplayURL = bannedUser.getDisplayURL(themeDisplay);
+				}
+				catch (NoSuchUserException nsue) {
+				}
+				%>
+
+				<liferay-ui:search-container-column-text
+					href="<%= bannedUserDisplayURL %>"
+					name="banned-user"
+					value="<%= HtmlUtil.escape(PortalUtil.getUserName(ban.getBanUserId(), StringPool.BLANK)) %>"
+				/>
+
+				<%
+				String bannedByUserDisplayURL = StringPool.BLANK;
+
+				try {
+					User bannedByUser = UserLocalServiceUtil.getUser(ban.getUserId());
+
+					bannedByUserDisplayURL = bannedByUser.getDisplayURL(themeDisplay);
+				}
+				catch (NoSuchUserException nsue) {
+				}
+				%>
+
+				<liferay-ui:search-container-column-text
+					href="<%= bannedByUserDisplayURL %>"
+					name="banned-by"
+					value="<%= HtmlUtil.escape(PortalUtil.getUserName(ban.getUserId(), StringPool.BLANK)) %>"
+				/>
+
+				<liferay-ui:search-container-column-date
+					name="ban-date"
+					value="<%= ban.getCreateDate() %>"
+				/>
+
+				<c:if test="<%= PropsValues.MESSAGE_BOARDS_EXPIRE_BAN_INTERVAL > 0 %>">
+					<liferay-ui:search-container-column-date
+						name="unban-date"
+						value="<%= MBUtil.getUnbanDate(ban, PropsValues.MESSAGE_BOARDS_EXPIRE_BAN_INTERVAL) %>"
+					/>
+				</c:if>
+
+				<liferay-ui:search-container-column-jsp
+					align="right"
+					path="/html/portlet/message_boards/ban_user_action.jsp"
+				/>
+			</liferay-ui:search-container-row>
+
+			<liferay-ui:search-iterator />
+		</liferay-ui:search-container>
+
+		<%
+		PortalUtil.setPageSubtitle(LanguageUtil.get(pageContext, StringUtil.replace(topLink, StringPool.UNDERLINE, StringPool.DASH)), request);
+		PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, TextFormatter.format(topLink, TextFormatter.O)), portletURL.toString());
+		%>
+
+	</c:when>
+</c:choose>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.message_boards.view_jsp");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_category_default.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_category_default.jsp
new file mode 100644
index 0000000..4481ce0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_category_default.jsp
@@ -0,0 +1,130 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+MBCategory category = (MBCategory)request.getAttribute(WebKeys.MESSAGE_BOARDS_CATEGORY);
+
+long categoryId = MBUtil.getCategoryId(request, category);
+
+MBCategoryDisplay categoryDisplay = (MBCategoryDisplay)request.getAttribute("view.jsp-categoryDisplay");
+
+Set<Long> categorySubscriptionClassPKs = (Set<Long>)request.getAttribute("view.jsp-categorySubscriptionClassPKs");
+Set<Long> threadSubscriptionClassPKs = (Set<Long>)request.getAttribute("view.jsp-threadSubscriptionClassPKs");
+
+PortletURL portletURL = (PortletURL)request.getAttribute("view.jsp-portletURL");
+
+if ((category != null) && layout.isTypeControlPanel()) {
+	MBUtil.addPortletBreadcrumbEntries(category, request, renderResponse);
+}
+%>
+
+<liferay-ui:panel-container cssClass="message-boards-panels" extended="<%= false %>" id="messageBoardsPanelContainer" persistState="<%= true %>">
+
+	<%
+	int categoriesCount = MBCategoryServiceUtil.getCategoriesCount(scopeGroupId, categoryId, WorkflowConstants.STATUS_APPROVED);
+	%>
+
+	<c:if test="<%= categoriesCount > 0 %>">
+		<liferay-ui:panel collapsible="<%= categoriesPanelCollapsible %>" extended="<%= categoriesPanelExtended %>" id="messageBoardsCategoriesPanel" persistState="<%= true %>" title='<%= LanguageUtil.get(pageContext, (category != null) ? "subcategories[message-board]" : "categories[message-board]") %>'>
+			<liferay-ui:search-container
+				curParam="cur1"
+				deltaConfigurable="<%= false %>"
+				headerNames="category[message-board],categories[message-board],threads,posts"
+				iteratorURL="<%= portletURL %>"
+				total="<%= categoriesCount %>"
+			>
+				<liferay-ui:search-container-results
+					results="<%= MBCategoryServiceUtil.getCategories(scopeGroupId, categoryId, WorkflowConstants.STATUS_APPROVED, searchContainer.getStart(), searchContainer.getEnd()) %>"
+				/>
+
+				<liferay-ui:search-container-row
+					className="com.liferay.portlet.messageboards.model.MBCategory"
+					escapedModel="<%= true %>"
+					keyProperty="categoryId"
+					modelVar="curCategory"
+				>
+					<liferay-ui:search-container-row-parameter name="categorySubscriptionClassPKs" value="<%= categorySubscriptionClassPKs %>" />
+
+					<liferay-portlet:renderURL varImpl="rowURL">
+						<portlet:param name="struts_action" value="/message_boards/view" />
+						<portlet:param name="mbCategoryId" value="<%= String.valueOf(curCategory.getCategoryId()) %>" />
+					</liferay-portlet:renderURL>
+
+					<%@ include file="/html/portlet/message_boards/category_columns.jspf" %>
+				</liferay-ui:search-container-row>
+
+				<liferay-ui:search-iterator />
+			</liferay-ui:search-container>
+		</liferay-ui:panel>
+	</c:if>
+
+	<liferay-ui:panel collapsible="<%= threadsPanelCollapsible %>" cssClass="threads-panel" extended="<%= threadsPanelExtended %>" id="messageBoardsThreadsPanel" persistState="<%= true %>" title='<%= LanguageUtil.get(pageContext, "threads") %>'>
+		<liferay-ui:search-container
+			curParam="cur2"
+			emptyResultsMessage="there-are-no-threads-in-this-category"
+			headerNames="thread,flag,started-by,posts,views,last-post"
+			iteratorURL="<%= portletURL %>"
+			total="<%= MBThreadServiceUtil.getThreadsCount(scopeGroupId, categoryId, WorkflowConstants.STATUS_APPROVED) %>"
+		>
+			<liferay-ui:search-container-results
+				results="<%= MBThreadServiceUtil.getThreads(scopeGroupId, categoryId, WorkflowConstants.STATUS_APPROVED, searchContainer.getStart(), searchContainer.getEnd()) %>"
+			/>
+
+			<liferay-ui:search-container-row
+				className="com.liferay.portlet.messageboards.model.MBThread"
+				keyProperty="threadId"
+				modelVar="thread"
+			>
+
+				<%
+				MBMessage message = null;
+
+				try {
+					message = MBMessageLocalServiceUtil.getMessage(thread.getRootMessageId());
+				}
+				catch (NoSuchMessageException nsme) {
+					_log.error("Thread requires missing root message id " + thread.getRootMessageId());
+
+					message = new MBMessageImpl();
+
+					row.setSkip(true);
+				}
+
+				message = message.toEscapedModel();
+
+				row.setBold(!MBThreadFlagLocalServiceUtil.hasThreadFlag(themeDisplay.getUserId(), thread));
+				row.setObject(new Object[] {message, threadSubscriptionClassPKs});
+				row.setRestricted(!MBMessagePermission.contains(permissionChecker, message, ActionKeys.VIEW));
+				%>
+
+				<liferay-portlet:renderURL varImpl="rowURL">
+					<portlet:param name="struts_action" value="/message_boards/view_message" />
+					<portlet:param name="messageId" value="<%= String.valueOf(message.getMessageId()) %>" />
+				</liferay-portlet:renderURL>
+
+				<%@ include file="/html/portlet/message_boards/thread_columns.jspf" %>
+			</liferay-ui:search-container-row>
+
+			<liferay-ui:search-iterator />
+		</liferay-ui:search-container>
+	</liferay-ui:panel>
+</liferay-ui:panel-container>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.message_boards.view_category_default_jsp");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_category_question.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_category_question.jsp
new file mode 100644
index 0000000..103b8e4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_category_question.jsp
@@ -0,0 +1,175 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+String topLink = ParamUtil.getString(request, "topLink", "message-boards-home");
+
+MBCategory category = (MBCategory)request.getAttribute(WebKeys.MESSAGE_BOARDS_CATEGORY);
+
+long categoryId = MBUtil.getCategoryId(request, category);
+
+MBCategoryDisplay categoryDisplay = (MBCategoryDisplay)request.getAttribute("view.jsp-categoryDisplay");
+
+Set<Long> categorySubscriptionClassPKs = (Set<Long>)request.getAttribute("view.jsp-threadSubscriptionClassPKs");
+Set<Long> threadSubscriptionClassPKs = (Set<Long>)request.getAttribute("view.jsp-threadSubscriptionClassPKs");
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/message_boards/view");
+portletURL.setParameter("topLink", topLink);
+portletURL.setParameter("mbCategoryId", String.valueOf(categoryId));
+%>
+
+<liferay-ui:panel-container cssClass="message-boards-panels" extended="<%= false %>" id="messageBoardsPanelContainer" persistState="<%= true %>">
+
+	<%
+	int categoriesCount = MBCategoryServiceUtil.getCategoriesCount(scopeGroupId, categoryId, WorkflowConstants.STATUS_APPROVED);
+	%>
+
+	<c:if test="<%= categoriesCount > 0 %>">
+		<liferay-ui:panel collapsible="<%= categoriesPanelCollapsible %>" extended="<%= categoriesPanelExtended %>" id="messageBoardsCategoriesPanel" persistState="<%= true %>" title='<%= LanguageUtil.get(pageContext, (category != null) ? "subcategories" : "categories") %>'>
+			<liferay-ui:search-container
+				curParam="cur1"
+				deltaConfigurable="<%= false %>"
+				headerNames="category,categories,threads,posts"
+				iteratorURL="<%= portletURL %>"
+				total="<%= categoriesCount %>"
+			>
+				<liferay-ui:search-container-results
+					results="<%= MBCategoryServiceUtil.getCategories(scopeGroupId, categoryId, WorkflowConstants.STATUS_APPROVED, searchContainer.getStart(), searchContainer.getEnd()) %>"
+				/>
+
+				<liferay-ui:search-container-row
+					className="com.liferay.portlet.messageboards.model.MBCategory"
+					escapedModel="<%= true %>"
+					keyProperty="categoryId"
+					modelVar="curCategory"
+				>
+					<liferay-ui:search-container-row-parameter name="categorySubscriptionClassPKs" value="<%= categorySubscriptionClassPKs %>" />
+
+					<liferay-portlet:renderURL varImpl="rowURL">
+						<portlet:param name="struts_action" value="/message_boards/view" />
+						<portlet:param name="mbCategoryId" value="<%= String.valueOf(curCategory.getCategoryId()) %>" />
+					</liferay-portlet:renderURL>
+
+					<%@ include file="/html/portlet/message_boards/category_columns.jspf" %>
+				</liferay-ui:search-container-row>
+
+				<liferay-ui:search-iterator />
+			</liferay-ui:search-container>
+		</liferay-ui:panel>
+	</c:if>
+</liferay-ui:panel-container>
+
+<liferay-ui:search-container
+	curParam="cur2"
+	emptyResultsMessage="there-are-no-questions-in-this-category"
+	headerNames="stats,question,last-post"
+	iteratorURL="<%= portletURL %>"
+	total="<%= MBThreadServiceUtil.getThreadsCount(scopeGroupId, categoryId, WorkflowConstants.STATUS_APPROVED) %>"
+>
+	<liferay-ui:search-container-results
+		results="<%= MBThreadServiceUtil.getThreads(scopeGroupId, categoryId, WorkflowConstants.STATUS_APPROVED, searchContainer.getStart(), searchContainer.getEnd()) %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portlet.messageboards.model.MBThread"
+		keyProperty="threadId"
+		modelVar="thread"
+	>
+
+		<%
+		MBMessage message = null;
+
+		try {
+			message = MBMessageLocalServiceUtil.getMessage(thread.getRootMessageId());
+		}
+		catch (NoSuchMessageException nsme) {
+			_log.error("Thread requires missing root message id " + thread.getRootMessageId());
+
+			message = new MBMessageImpl();
+
+			row.setSkip(true);
+		}
+
+		row.setBold(!MBThreadFlagLocalServiceUtil.hasThreadFlag(themeDisplay.getUserId(), thread));
+		row.setObject(new Object[] {message, threadSubscriptionClassPKs});
+		row.setRestricted(!MBMessagePermission.contains(permissionChecker, message, ActionKeys.VIEW));
+		%>
+
+		<liferay-portlet:renderURL varImpl="rowURL">
+			<portlet:param name="struts_action" value="/message_boards/view_message" />
+			<portlet:param name="messageId" value="<%= String.valueOf(message.getMessageId()) %>" />
+		</liferay-portlet:renderURL>
+
+		<liferay-ui:search-container-column-text
+			cssClass="stats"
+			href="<%= rowURL %>"
+			name="statistics"
+		>
+
+			<%
+			int answers = MBMessageServiceUtil.getThreadAnswersCount(scopeGroupId, categoryId, thread.getThreadId());
+
+			RatingsStats ratingsStats = RatingsStatsLocalServiceUtil.getStats(MBMessage.class.getName(), message.getMessageId());
+
+			int ratingScore = (int)ratingsStats.getTotalScore();
+			%>
+
+			<span class="question-details">
+				<span class="votes">
+					<span class="count"><%= String.valueOf(ratingScore) %></span> <span><%= LanguageUtil.get(pageContext, "votes") %></span>
+				</span>
+
+				<span class="status <%= (answers != 0) ? "answered" : " unanswered" %> ">
+					<span class="count"><%= answers %></span> <span><%= LanguageUtil.get(pageContext, (answers != 1) ? "answers" : "answer") %></span>
+				</span>
+
+				<span class="views">
+					<span class="count"><%= thread.getViewCount() %></span> <span><%= LanguageUtil.get(pageContext, "views") %></span>
+				</span>
+			</span>
+		</liferay-ui:search-container-column-text>
+
+		<liferay-ui:search-container-column-jsp
+			cssClass="question"
+			name="question"
+			path="/html/portlet/message_boards/message_summary_question.jsp"
+		/>
+
+		<liferay-ui:search-container-column-jsp
+			cssClass="last-post"
+			name="last-post"
+			path="/html/portlet/message_boards/last_post_question.jsp"
+		/>
+
+		<c:if test="<%= MBMessagePermission.contains(permissionChecker, message, ActionKeys.UPDATE) %>">
+			<liferay-ui:search-container-column-jsp
+				align="right"
+				cssClass="action-question"
+				path="/html/portlet/message_boards/message_action.jsp"
+			/>
+		</c:if>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.message_boards.view_category_question_jsp");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_deleted_message_attachments.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_deleted_message_attachments.jsp
new file mode 100644
index 0000000..9b2d150
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_deleted_message_attachments.jsp
@@ -0,0 +1,116 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+MBMessage message = (MBMessage)request.getAttribute(WebKeys.MESSAGE_BOARDS_MESSAGE);
+
+long messageId = BeanParamUtil.getLong(message, request, "messageId");
+
+long categoryId = MBUtil.getCategoryId(request, message);
+
+MBUtil.addPortletBreadcrumbEntries(message, request, renderResponse);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/message_boards/edit_message");
+portletURL.setParameter("messageId", String.valueOf(message.getMessageId()));
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit"), portletURL.toString());
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "removed-attachments"), currentURL);
+
+PortletURL iteratorURL = renderResponse.createRenderURL();
+
+iteratorURL.setParameter("struts_action", "/message_boards/view_deleted_message_attachments");
+iteratorURL.setParameter("redirect", currentURL);
+iteratorURL.setParameter("messageId", String.valueOf(messageId));
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	title="removed-attachments"
+/>
+
+<portlet:actionURL var="emptyTrashURL">
+	<portlet:param name="struts_action" value="/message_boards/edit_message_attachments" />
+	<portlet:param name="messageId" value="<%= String.valueOf(message.getMessageId()) %>" />
+</portlet:actionURL>
+
+<liferay-ui:trash-empty
+	confirmMessage="are-you-sure-you-want-to-remove-the-attachments-for-this-message"
+	emptyMessage="remove-the-attachments-for-this-message"
+	infoMessage="attachments-that-have-been-removed-for-more-than-x-will-be-automatically-deleted"
+	portletURL="<%= emptyTrashURL.toString() %>"
+	totalEntries="<%= message.getDeletedAttachmentsFileEntriesCount() %>"
+/>
+
+<liferay-ui:search-container
+	emptyResultsMessage="this-message-does-not-have-file-attachments-in-the-recycle-bin"
+	iteratorURL="<%= iteratorURL %>"
+	total="<%= message.getDeletedAttachmentsFileEntriesCount() %>"
+>
+
+	<liferay-ui:search-container-results
+		results="<%= message.getDeletedAttachmentsFileEntries(searchContainer.getStart(), searchContainer.getEnd()) %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.kernel.repository.model.FileEntry"
+		escapedModel="<%= true %>"
+		keyProperty="fileEntryId"
+		modelVar="fileEntry"
+	>
+
+		<%
+		String rowHREF = PortletFileRepositoryUtil.getPortletFileEntryURL(themeDisplay, fileEntry, "status=" + WorkflowConstants.STATUS_IN_TRASH);
+		%>
+
+		<liferay-ui:search-container-column-text
+			href="<%= rowHREF %>"
+			name="file-name"
+		>
+			<liferay-ui:icon
+				image='<%= "../file_system/small/" + DLUtil.getFileIcon(fileEntry.getExtension()) %>'
+				label="<%= true %>"
+				message="<%= TrashUtil.getOriginalTitle(fileEntry.getTitle()) %>"
+			/>
+		</liferay-ui:search-container-column-text>
+
+		<liferay-ui:search-container-column-text
+			href="<%= rowHREF %>"
+			name="size"
+			value="<%= TextFormatter.formatStorageSize(fileEntry.getSize(), locale) %>"
+		/>
+
+		<liferay-ui:search-container-column-jsp
+			align="right"
+			path="/html/portlet/message_boards/deleted_message_attachment_action.jsp"
+		/>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
+
+<liferay-ui:restore-entry
+	duplicateEntryAction="/message_boards/restore_entry"
+	overrideMessage="overwrite-the-existing-attachment-with-the-removed-one"
+	renameMessage="keep-both-attachments-and-rename-the-removed-attachment-as"
+	restoreEntryAction="/message_boards/restore_message_attachment"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_message.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_message.jsp
new file mode 100644
index 0000000..5e1a44a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_message.jsp
@@ -0,0 +1,41 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+MBMessageDisplay messageDisplay = (MBMessageDisplay)request.getAttribute(WebKeys.MESSAGE_BOARDS_MESSAGE);
+
+MBMessage message = messageDisplay.getMessage();
+
+MBCategory category = messageDisplay.getCategory();
+
+String displayStyle = BeanPropertiesUtil.getString(category, "displayStyle", MBCategoryConstants.DEFAULT_DISPLAY_STYLE);
+
+if (Validator.isNull(displayStyle)) {
+	displayStyle = MBCategoryConstants.DEFAULT_DISPLAY_STYLE;
+}
+
+if ((message != null) && layout.isTypeControlPanel()) {
+	MBUtil.addPortletBreadcrumbEntries(message, request, renderResponse);
+}
+%>
+
+<liferay-util:include page="/html/portlet/message_boards/top_links.jsp" />
+
+<div class="displayStyle-<%= displayStyle %>">
+	<liferay-util:include page='<%= "/html/portlet/message_boards/view_message_" + displayStyle + ".jsp" %>' />
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_message_content.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_message_content.jsp
new file mode 100644
index 0000000..df497f4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_message_content.jsp
@@ -0,0 +1,393 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+MBMessageDisplay messageDisplay = (MBMessageDisplay)request.getAttribute(WebKeys.MESSAGE_BOARDS_MESSAGE);
+
+MBMessage message = messageDisplay.getMessage();
+
+MBCategory category = messageDisplay.getCategory();
+
+MBThread thread = messageDisplay.getThread();
+
+MBThread previousThread = messageDisplay.getPreviousThread();
+MBThread nextThread = messageDisplay.getNextThread();
+
+String threadView = messageDisplay.getThreadView();
+
+MBThreadFlag threadFlag = MBThreadFlagLocalServiceUtil.getThreadFlag(themeDisplay.getUserId(), thread);
+%>
+
+<c:choose>
+	<c:when test="<%= Validator.isNull(redirect) %>">
+		<portlet:renderURL var="backURL">
+			<portlet:param name="struts_action" value="/message_boards/view" />
+			<portlet:param name="mbCategoryId" value="<%= (category != null) ? String.valueOf(category.getCategoryId()) : String.valueOf(MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:header
+			backLabel='<%= (category != null) ? category.getName() : "message-boards-home" %>'
+			backURL="<%= backURL.toString() %>"
+			localizeTitle="<%= false %>"
+			title="<%= message.getSubject() %>"
+		/>
+	</c:when>
+	<c:otherwise>
+		<liferay-ui:header
+			backURL="<%= redirect %>"
+			localizeTitle="<%= false %>"
+			title="<%= message.getSubject() %>"
+		/>
+	</c:otherwise>
+</c:choose>
+
+<ul class="thread-view-controls">
+	<c:if test="<%= PropsValues.MESSAGE_BOARDS_THREAD_VIEWS.length > 1 %>">
+		<c:if test="<%= ArrayUtil.contains(PropsValues.MESSAGE_BOARDS_THREAD_VIEWS, MBThreadConstants.THREAD_VIEW_COMBINATION) %>">
+			<li class="thread-icon">
+
+				<%
+				currentURLObj.setParameter("threadView", MBThreadConstants.THREAD_VIEW_COMBINATION);
+				%>
+
+				<liferay-ui:icon
+					image="../message_boards/thread_view_combination"
+					message="combination-view"
+					method="get"
+					url="<%= currentURLObj.toString() %>"
+				/>
+			</li>
+		</c:if>
+
+		<c:if test="<%= ArrayUtil.contains(PropsValues.MESSAGE_BOARDS_THREAD_VIEWS, MBThreadConstants.THREAD_VIEW_FLAT) %>">
+			<li class="thread-icon">
+
+				<%
+				currentURLObj.setParameter("threadView", MBThreadConstants.THREAD_VIEW_FLAT);
+				%>
+
+				<liferay-ui:icon
+					image="../message_boards/thread_view_flat"
+					message="flat-view"
+					method="get"
+					url="<%= currentURLObj.toString() %>"
+				/>
+			</li>
+		</c:if>
+
+		<c:if test="<%= ArrayUtil.contains(PropsValues.MESSAGE_BOARDS_THREAD_VIEWS, MBThreadConstants.THREAD_VIEW_TREE) %>">
+			<li class="thread-icon">
+
+				<%
+				currentURLObj.setParameter("threadView", MBThreadConstants.THREAD_VIEW_TREE);
+				%>
+
+				<liferay-ui:icon
+					image="../message_boards/thread_view_tree"
+					message="tree-view"
+					method="get"
+					url="<%= currentURLObj.toString() %>"
+				/>
+			</li>
+		</c:if>
+	</c:if>
+</ul>
+
+<div class="thread-controls">
+	<c:if test="<%= PropsValues.MESSAGE_BOARDS_THREAD_PREVIOUS_AND_NEXT_NAVIGATION_ENABLED %>">
+		<div class="thread-navigation">
+			<liferay-ui:message key="threads" />
+
+			[
+
+			<c:choose>
+				<c:when test="<%= previousThread != null %>">
+					<portlet:renderURL var="previousThreadURL">
+						<portlet:param name="struts_action" value="/message_boards/view_message" />
+						<portlet:param name="messageId" value="<%= String.valueOf(previousThread.getRootMessageId()) %>" />
+					</portlet:renderURL>
+
+					<aui:a href="<%= previousThreadURL %>" label="previous" />
+				</c:when>
+				<c:otherwise>
+					<liferay-ui:message key="previous" />
+				</c:otherwise>
+			</c:choose>
+
+			|
+
+			<c:choose>
+				<c:when test="<%= nextThread != null %>">
+					<portlet:renderURL var="nextThreadURL">
+						<portlet:param name="struts_action" value="/message_boards/view_message" />
+						<portlet:param name="messageId" value="<%= String.valueOf(nextThread.getRootMessageId()) %>" />
+					</portlet:renderURL>
+
+					<aui:a href="<%= nextThreadURL %>" label="next" />
+				</c:when>
+				<c:otherwise>
+					<liferay-ui:message key="next" />
+				</c:otherwise>
+			</c:choose>
+
+			]
+		</div>
+	</c:if>
+
+	<div class="thread-actions">
+		<liferay-ui:icon-list>
+			<c:if test="<%= MBCategoryPermission.contains(permissionChecker, scopeGroupId, (category != null) ? category.getCategoryId() : MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID, ActionKeys.ADD_MESSAGE) %>">
+				<portlet:renderURL var="addMessageURL">
+					<portlet:param name="struts_action" value="/message_boards/edit_message" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="mbCategoryId" value="<%= (category != null) ? String.valueOf(category.getCategoryId()) : String.valueOf(MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID) %>" />
+				</portlet:renderURL>
+
+				<liferay-ui:icon
+					image="post"
+					message="post-new-thread"
+					url="<%= addMessageURL %>"
+				/>
+			</c:if>
+
+			<c:if test="<%= !thread.isLocked() && MBMessagePermission.contains(permissionChecker, message, ActionKeys.PERMISSIONS) %>">
+
+				<%
+				MBMessage rootMessage = null;
+
+				if (message.isRoot()) {
+					rootMessage = message;
+				}
+				else {
+					rootMessage = MBMessageLocalServiceUtil.getMessage(message.getRootMessageId());
+				}
+				%>
+
+				<liferay-security:permissionsURL
+					modelResource="<%= MBMessage.class.getName() %>"
+					modelResourceDescription="<%= rootMessage.getSubject() %>"
+					resourcePrimKey="<%= String.valueOf(thread.getRootMessageId()) %>"
+					var="permissionsURL"
+					windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+				/>
+
+				<liferay-ui:icon
+					image="permissions"
+					method="get"
+					url="<%= permissionsURL %>"
+					useDialog="<%= true %>"
+				/>
+			</c:if>
+
+			<c:if test="<%= enableRSS && MBMessagePermission.contains(permissionChecker, message, ActionKeys.VIEW) %>">
+
+				<%
+				rssURL.setParameter("mbCategoryId", StringPool.BLANK);
+				rssURL.setParameter("threadId", String.valueOf(message.getThreadId()));
+				%>
+
+				<liferay-ui:rss
+					delta="<%= rssDelta %>"
+					displayStyle="<%= rssDisplayStyle %>"
+					feedType="<%= rssFeedType %>"
+					resourceURL="<%= rssURL %>"
+				/>
+			</c:if>
+
+			<c:if test="<%= MBMessagePermission.contains(permissionChecker, message, ActionKeys.SUBSCRIBE) && (MBUtil.getEmailMessageAddedEnabled(portletPreferences) || MBUtil.getEmailMessageUpdatedEnabled(portletPreferences)) %>">
+				<c:choose>
+					<c:when test="<%= SubscriptionLocalServiceUtil.isSubscribed(user.getCompanyId(), user.getUserId(), MBThread.class.getName(), message.getThreadId()) %>">
+						<portlet:actionURL var="unsubscribeURL">
+							<portlet:param name="struts_action" value="/message_boards/edit_message" />
+							<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UNSUBSCRIBE %>" />
+							<portlet:param name="redirect" value="<%= currentURL %>" />
+							<portlet:param name="messageId" value="<%= String.valueOf(message.getMessageId()) %>" />
+						</portlet:actionURL>
+
+						<liferay-ui:icon
+							image="unsubscribe"
+							url="<%= unsubscribeURL %>"
+						/>
+					</c:when>
+					<c:otherwise>
+						<portlet:actionURL var="subscribeURL">
+							<portlet:param name="struts_action" value="/message_boards/edit_message" />
+							<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.SUBSCRIBE %>" />
+							<portlet:param name="redirect" value="<%= currentURL %>" />
+							<portlet:param name="messageId" value="<%= String.valueOf(message.getMessageId()) %>" />
+						</portlet:actionURL>
+
+						<liferay-ui:icon
+							image="subscribe"
+							url="<%= subscribeURL %>"
+						/>
+					</c:otherwise>
+				</c:choose>
+			</c:if>
+
+			<c:if test="<%= MBCategoryPermission.contains(permissionChecker, scopeGroupId, (category != null) ? category.getCategoryId() : MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID, ActionKeys.LOCK_THREAD) %>">
+				<c:choose>
+					<c:when test="<%= thread.isLocked() %>">
+						<portlet:actionURL var="unlockThreadURL">
+							<portlet:param name="struts_action" value="/message_boards/edit_message" />
+							<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UNLOCK %>" />
+							<portlet:param name="redirect" value="<%= currentURL %>" />
+							<portlet:param name="threadId" value="<%= String.valueOf(message.getThreadId()) %>" />
+						</portlet:actionURL>
+
+						<liferay-ui:icon
+							image="unlock"
+							message="unlock-thread"
+							url="<%= unlockThreadURL %>"
+						/>
+					</c:when>
+					<c:otherwise>
+						<portlet:actionURL var="lockThreadURL">
+							<portlet:param name="struts_action" value="/message_boards/edit_message" />
+							<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.LOCK %>" />
+							<portlet:param name="redirect" value="<%= currentURL %>" />
+							<portlet:param name="threadId" value="<%= String.valueOf(message.getThreadId()) %>" />
+						</portlet:actionURL>
+
+						<liferay-ui:icon
+							image="lock"
+							message="lock-thread"
+							url="<%= lockThreadURL %>"
+						/>
+					</c:otherwise>
+				</c:choose>
+			</c:if>
+
+			<c:if test="<%= MBCategoryPermission.contains(permissionChecker, scopeGroupId, (category != null) ? category.getCategoryId() : MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID, ActionKeys.MOVE_THREAD) %>">
+				<portlet:renderURL var="editThreadURL">
+					<portlet:param name="struts_action" value="/message_boards/move_thread" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="mbCategoryId" value="<%= (category != null) ? String.valueOf(category.getCategoryId()) : String.valueOf(MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID) %>" />
+					<portlet:param name="threadId" value="<%= String.valueOf(message.getThreadId()) %>" />
+				</portlet:renderURL>
+
+				<liferay-ui:icon
+					image="forward"
+					message="move-thread"
+					url="<%= editThreadURL %>"
+				/>
+			</c:if>
+
+			<c:if test="<%= MBMessagePermission.contains(permissionChecker, message, ActionKeys.DELETE) && !thread.isLocked() %>">
+				<portlet:renderURL var="parentCategoryURL">
+					<portlet:param name="struts_action" value="/message_boards/view" />
+					<portlet:param name="mbCategoryId" value="<%= (category != null) ? String.valueOf(category.getCategoryId()) : String.valueOf(MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID) %>" />
+				</portlet:renderURL>
+
+				<portlet:actionURL var="deleteURL">
+					<portlet:param name="struts_action" value="/message_boards/delete_thread" />
+					<portlet:param name="<%= Constants.CMD %>" value="<%= TrashUtil.isTrashEnabled(themeDisplay.getScopeGroupId()) ? Constants.MOVE_TO_TRASH : Constants.DELETE %>" />
+					<portlet:param name="redirect" value="<%= parentCategoryURL %>" />
+					<portlet:param name="threadId" value="<%= String.valueOf(message.getThreadId()) %>" />
+				</portlet:actionURL>
+
+				<liferay-ui:icon-delete
+					trash="<%= TrashUtil.isTrashEnabled(themeDisplay.getScopeGroupId()) %>"
+					url="<%= deleteURL %>"
+				/>
+			</c:if>
+		</liferay-ui:icon-list>
+	</div>
+
+	<div class="clear"></div>
+</div>
+
+<div>
+
+	<%
+	MBTreeWalker treeWalker = messageDisplay.getTreeWalker();
+
+	List<MBMessage> messages = null;
+
+	if (treeWalker != null) {
+		messages = new ArrayList<MBMessage>();
+
+		messages.addAll(treeWalker.getMessages());
+
+		messages = ListUtil.sort(messages, new MessageCreateDateComparator(true));
+	}
+
+	AssetUtil.addLayoutTags(request, AssetTagLocalServiceUtil.getTags(MBMessage.class.getName(), thread.getRootMessageId()));
+	%>
+
+	<div class="message-scroll" id="<portlet:namespace />message_0"></div>
+
+	<c:if test="<%= threadView.equals(MBThreadConstants.THREAD_VIEW_COMBINATION) && (messages.size() > 1) %>">
+		<liferay-ui:toggle-area id="toggle_id_message_boards_view_message_thread">
+			<table class="toggle_id_message_boards_view_message_thread">
+
+			<%
+			request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER, treeWalker);
+			request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_CATEGORY, category);
+			request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_CUR_MESSAGE, treeWalker.getRoot());
+			request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_DEPTH, new Integer(0));
+			request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_LAST_NODE, Boolean.valueOf(false));
+			request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_SEL_MESSAGE, message);
+			request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_THREAD, thread);
+			request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_THREAD_FLAG, threadFlag);
+			%>
+
+			<liferay-util:include page="/html/portlet/message_boards/view_thread_shortcut.jsp" />
+
+			</table>
+		</liferay-ui:toggle-area>
+	</c:if>
+
+	<%
+	boolean viewableThread = false;
+	%>
+
+	<c:choose>
+		<c:when test="<%= threadView.equals(MBThreadConstants.THREAD_VIEW_TREE) %>">
+
+			<%
+			request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER, treeWalker);
+			request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_CATEGORY, category);
+			request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_CUR_MESSAGE, treeWalker.getRoot());
+			request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_DEPTH, new Integer(0));
+			request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_LAST_NODE, Boolean.valueOf(false));
+			request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_SEL_MESSAGE, message);
+			request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_THREAD, thread);
+			request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_VIEWABLE_THREAD, Boolean.FALSE.toString());
+			%>
+
+			<liferay-util:include page="/html/portlet/message_boards/view_thread_tree.jsp" />
+
+			<%
+			viewableThread = GetterUtil.getBoolean((String)request.getAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_VIEWABLE_THREAD));
+			%>
+
+		</c:when>
+		<c:otherwise>
+			<%@ include file="/html/portlet/message_boards/view_thread_flat.jspf" %>
+		</c:otherwise>
+	</c:choose>
+
+	<c:if test="<%= !viewableThread %>">
+		<div class="alert alert-error">
+			<liferay-ui:message key="you-do-not-have-permission-to-access-the-requested-resource" />
+		</div>
+	</c:if>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_message_default.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_message_default.jsp
new file mode 100644
index 0000000..163027c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_message_default.jsp
@@ -0,0 +1,201 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+MBMessageDisplay messageDisplay = (MBMessageDisplay)request.getAttribute(WebKeys.MESSAGE_BOARDS_MESSAGE);
+
+MBMessage message = messageDisplay.getMessage();
+
+MBCategory category = messageDisplay.getCategory();
+
+MBThread thread = messageDisplay.getThread();
+%>
+
+<div id="<portlet:namespace />addAnswerFlagDiv" style="display: none;">
+	<liferay-ui:icon
+		image="checked"
+		label="<%= true %>"
+		message="answer"
+	/>
+
+	<c:if test="<%= !MBMessagePermission.contains(permissionChecker, message.getRootMessageId(), ActionKeys.UPDATE) %>">
+
+		<%
+		String taglibHREF = "javascript:" + renderResponse.getNamespace() + "deleteAnswerFlag('@MESSAGE_ID@');";
+		%>
+
+		(<aui:a href="<%= taglibHREF %>"><liferay-ui:message key="unmark" /></aui:a>)
+	</c:if>
+</div>
+
+<div id="<portlet:namespace />deleteAnswerFlagDiv" style="display: none;">
+
+	<%
+	String taglibMarkAsAnAnswerURL = "javascript:" + renderResponse.getNamespace() + "addAnswerFlag('@MESSAGE_ID@');";
+	%>
+
+	<liferay-ui:icon
+		image="checked"
+		label="<%= true %>"
+		message="mark-as-an-answer"
+		url="<%= taglibMarkAsAnAnswerURL %>"
+	/>
+</div>
+
+<c:choose>
+	<c:when test="<%= includeFormTag %>">
+		<aui:form>
+			<aui:input name="breadcrumbsCategoryId" type="hidden" value="<%= category.getCategoryId() %>" />
+			<aui:input name="breadcrumbsMessageId" type="hidden" value="<%= message.getMessageId() %>" />
+			<aui:input name="threadId" type="hidden" value="<%= message.getThreadId() %>" />
+
+			<liferay-util:include page="/html/portlet/message_boards/view_message_content.jsp" />
+		</aui:form>
+	</c:when>
+	<c:otherwise>
+		<liferay-util:include page="/html/portlet/message_boards/view_message_content.jsp" />
+	</c:otherwise>
+</c:choose>
+
+<c:if test="<%= MBCategoryPermission.contains(permissionChecker, scopeGroupId, message.getCategoryId(), ActionKeys.REPLY_TO_MESSAGE) && !thread.isLocked() %>">
+	<div class="hide" id="<portlet:namespace />addQuickReplyDiv">
+		<%@ include file="/html/portlet/message_boards/edit_message_quick.jspf" %>
+	</div>
+</c:if>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />addAnswerFlag',
+		function(messageId) {
+			var A = AUI();
+
+			Liferay.Service(
+				'/mbmessage/update-answer',
+				{
+					messageId: messageId,
+					answer: true,
+					cascade: false
+				}
+			);
+
+			var addAnswerFlagDiv = A.one('#<portlet:namespace />addAnswerFlagDiv').clone();
+
+			var html = addAnswerFlagDiv.html();
+
+			html = '<div class="answer" id="<portlet:namespace />deleteAnswerFlag_' + messageId + '">' + html + '</div>';
+			html = html.replace(/@MESSAGE_ID@/g, messageId);
+
+			var tags = A.one('#<portlet:namespace />message_' + messageId).one('div.tags');
+
+			if (tags) {
+				tags.html(html);
+			}
+
+			A.one('#<portlet:namespace />addAnswerFlag_' + messageId).hide();
+			A.one('#<portlet:namespace />deleteAnswerFlag_' + messageId).show();
+		},
+		['aui-base']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />addQuickReply',
+		function(cmd, messageId) {
+			var A = AUI();
+
+			var addQuickReplyDiv = A.one('#<portlet:namespace />addQuickReplyDiv');
+
+			if (cmd == 'reply') {
+				addQuickReplyDiv.show();
+
+				addQuickReplyDiv.one('#<portlet:namespace />parentMessageId').val(messageId);
+
+				var editorInput = addQuickReplyDiv.one('textarea');
+
+				if (editorInput) {
+					var editorId = editorInput.get('id');
+
+					var editorInstance = window[editorId];
+
+					if (editorInstance) {
+						A.setTimeout(editorInstance.focus, 50, editorInstance);
+					}
+				}
+			}
+			else {
+				addQuickReplyDiv.hide();
+			}
+		},
+		['aui-base']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />deleteAnswerFlag',
+		function(messageId) {
+			var A = AUI();
+
+			Liferay.Service(
+				'/mbmessage/update-answer',
+				{
+					messageId: messageId,
+					answer: false,
+					cascade: false
+				}
+			);
+
+			var deleteAnswerFlagDiv = A.one('#<portlet:namespace />deleteAnswerFlagDiv').clone();
+
+			var html = deleteAnswerFlagDiv.html();
+
+			html = '<li id="<portlet:namespace />addAnswerFlag_' + messageId + '">' + html + '</li>';
+			html = html.replace(/@MESSAGE_ID@/g, messageId);
+
+			var editControls = A.one('#<portlet:namespace />message_' + messageId).one('ul.edit-controls');
+
+			if (editControls) {
+				editControls.prepend(html);
+			}
+
+			A.one('#<portlet:namespace />deleteAnswerFlag_' + messageId).hide();
+
+			A.one('#<portlet:namespace />addAnswerFlag_' + messageId).show();
+		},
+		['aui-base']
+	);
+
+	<c:if test="<%= thread.getRootMessageId() != message.getMessageId() %>">
+		document.getElementById("<portlet:namespace />message_" + <%= message.getMessageId() %>).scrollIntoView(true);
+	</c:if>
+</aui:script>
+
+<%
+MBThreadFlagLocalServiceUtil.addThreadFlag(themeDisplay.getUserId(), thread, new ServiceContext());
+
+message = messageDisplay.getMessage();
+
+PortalUtil.setPageSubtitle(message.getSubject(), request);
+PortalUtil.setPageDescription(message.getSubject(), request);
+
+List<AssetTag> assetTags = AssetTagLocalServiceUtil.getTags(MBMessage.class.getName(), message.getMessageId());
+
+PortalUtil.setPageKeywords(ListUtil.toString(assetTags, AssetTag.NAME_ACCESSOR), request);
+
+MBUtil.addPortletBreadcrumbEntries(message, request, renderResponse);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_message_question.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_message_question.jsp
new file mode 100644
index 0000000..d4780f1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_message_question.jsp
@@ -0,0 +1,189 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+MBMessageDisplay messageDisplay = (MBMessageDisplay)request.getAttribute(WebKeys.MESSAGE_BOARDS_MESSAGE);
+
+MBMessage message = messageDisplay.getMessage();
+
+MBCategory category = messageDisplay.getCategory();
+
+MBThread thread = messageDisplay.getThread();
+%>
+
+<div id="<portlet:namespace />addAnswerFlagDiv" style="display: none;">
+	<liferay-ui:icon
+		image="checked"
+		label="<%= true %>"
+		message="answer"
+	/>
+
+	<c:if test="<%= !MBMessagePermission.contains(permissionChecker, message.getRootMessageId(), ActionKeys.UPDATE) %>">
+
+		<%
+		String taglibHREF = "javascript:" + renderResponse.getNamespace() + "deleteAnswerFlag('@MESSAGE_ID@');";
+		%>
+
+		(<aui:a href="<%= taglibHREF %>"><liferay-ui:message key="unmark" /></aui:a>)
+	</c:if>
+</div>
+
+<div id="<portlet:namespace />deleteAnswerFlagDiv" style="display: none;">
+
+	<%
+	String taglibMarkAsAnAnswerURL = "javascript:" + renderResponse.getNamespace() + "addAnswerFlag('@MESSAGE_ID@');";
+	%>
+
+	<liferay-ui:icon
+		image="checked"
+		label="<%= true %>"
+		message="mark-as-an-answer"
+		url="<%= taglibMarkAsAnAnswerURL %>"
+	/>
+</div>
+
+<c:choose>
+	<c:when test="<%= includeFormTag %>">
+		<aui:form>
+			<aui:input name="breadcrumbsCategoryId" type="hidden" value="<%= category.getCategoryId() %>" />
+			<aui:input name="breadcrumbsMessageId" type="hidden" value="<%= message.getMessageId() %>" />
+			<aui:input name="threadId" type="hidden" value="<%= message.getThreadId() %>" />
+
+			<liferay-util:include page="/html/portlet/message_boards/view_message_content.jsp" />
+		</aui:form>
+	</c:when>
+	<c:otherwise>
+		<liferay-util:include page="/html/portlet/message_boards/view_message_content.jsp" />
+	</c:otherwise>
+</c:choose>
+
+<c:if test="<%= MBCategoryPermission.contains(permissionChecker, scopeGroupId, message.getCategoryId(), ActionKeys.REPLY_TO_MESSAGE) && !thread.isLocked() %>">
+	<div class="hide" id="<portlet:namespace />addQuickReplyDiv">
+		<%@ include file="/html/portlet/message_boards/edit_message_quick.jspf" %>
+	</div>
+</c:if>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />addAnswerFlag',
+		function(messageId) {
+			var A = AUI();
+
+			Liferay.Service(
+				'/mbmessage/update-answer',
+				{
+					messageId: messageId,
+					answer: true,
+					cascade: false
+				}
+			);
+
+			var addAnswerFlagDiv = A.one('#<portlet:namespace />addAnswerFlagDiv').clone();
+
+			var html = addAnswerFlagDiv.html();
+
+			html = '<div class="answer" id="<portlet:namespace />deleteAnswerFlag_' + messageId + '">' + html + '</div>';
+			html = html.replace(/@MESSAGE_ID@/g, messageId);
+
+			var tags = A.one('#<portlet:namespace />message_' + messageId).one('div.tags');
+
+			if (tags) {
+				tags.html(html);
+			}
+
+			A.one('#<portlet:namespace />addAnswerFlag_' + messageId).hide();
+			A.one('#<portlet:namespace />deleteAnswerFlag_' + messageId).show();
+		},
+		['aui-base']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />addQuickReply',
+		function(cmd, messageId) {
+			var A = AUI();
+
+			var addQuickReplyDiv = A.one('#<portlet:namespace />addQuickReplyDiv');
+
+			if (cmd == 'reply') {
+				addQuickReplyDiv.show();
+				addQuickReplyDiv.one('#<portlet:namespace />parentMessageId').val(messageId);
+				addQuickReplyDiv.one('textarea').focus();
+			}
+			else {
+				addQuickReplyDiv.hide();
+			}
+		},
+		['aui-base']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />deleteAnswerFlag',
+		function(messageId) {
+			var A = AUI();
+
+			Liferay.Service(
+				'/mbmessage/update-answer',
+				{
+					messageId: messageId,
+					answer: false,
+					cascade: false
+				}
+			);
+
+			var deleteAnswerFlagDiv = A.one('#<portlet:namespace />deleteAnswerFlagDiv').clone();
+
+			var html = deleteAnswerFlagDiv.html();
+
+			html = '<li id="<portlet:namespace />addAnswerFlag_' + messageId + '">' + html + '</li>';
+			html = html.replace(/@MESSAGE_ID@/g, messageId);
+
+			var editControls = A.one('#<portlet:namespace />message_' + messageId).one('ul.edit-controls');
+
+			if (editControls) {
+				editControls.prepend(html);
+			}
+
+			A.one('#<portlet:namespace />deleteAnswerFlag_' + messageId).hide();
+
+			A.one('#<portlet:namespace />addAnswerFlag_' + messageId).show();
+		},
+		['aui-base']
+	);
+
+	<c:if test="<%= thread.getRootMessageId() != message.getMessageId() %>">
+		document.getElementById("<portlet:namespace />message_" + <%= message.getMessageId() %>).scrollIntoView(true);
+	</c:if>
+</aui:script>
+
+<%
+MBThreadFlagLocalServiceUtil.addThreadFlag(themeDisplay.getUserId(), thread, new ServiceContext());
+
+message = messageDisplay.getMessage();
+
+PortalUtil.setPageSubtitle(message.getSubject(), request);
+PortalUtil.setPageDescription(message.getSubject(), request);
+
+List<AssetTag> assetTags = AssetTagLocalServiceUtil.getTags(MBMessage.class.getName(), message.getMessageId());
+
+PortalUtil.setPageKeywords(ListUtil.toString(assetTags, AssetTag.NAME_ACCESSOR), request);
+
+MBUtil.addPortletBreadcrumbEntries(message, request, renderResponse);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_thread_flat.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_thread_flat.jspf
new file mode 100644
index 0000000..739d167
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_thread_flat.jspf
@@ -0,0 +1,88 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/message_boards/view_message");
+portletURL.setParameter("messageId", String.valueOf(message.getMessageId()));
+
+SearchContainer searchContainer = null;
+
+if (threadView.equals(MBThreadConstants.THREAD_VIEW_FLAT)) {
+	int cur = 0;
+	int delta = SearchContainer.DEFAULT_DELTA;
+
+	if (request.getParameter(SearchContainer.DEFAULT_CUR_PARAM) == null) {
+		int positionInThread = MBMessageLocalServiceUtil.getPositionInThread(message.getMessageId());
+
+		if (positionInThread > delta) {
+			cur = (int)Math.ceil(((double)positionInThread) / delta);
+		}
+		else {
+			cur = SearchContainer.DEFAULT_CUR;
+		}
+	}
+
+	searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, cur, delta, portletURL, null, null);
+
+	int total = MBMessageServiceUtil.getThreadMessagesCount(message.getGroupId(), category.getCategoryId(), message.getThreadId(), WorkflowConstants.STATUS_ANY);
+
+	searchContainer.setTotal(total);
+
+	messages = MBMessageServiceUtil.getThreadMessages(message.getGroupId(), category.getCategoryId(), message.getThreadId(), WorkflowConstants.STATUS_ANY, searchContainer.getStart(), searchContainer.getEnd());
+
+	searchContainer.setResults(messages);
+}
+%>
+
+<c:if test="<%= threadView.equals(MBThreadConstants.THREAD_VIEW_FLAT) && (searchContainer.getTotal() > searchContainer.getDelta()) %>">
+	<div class="taglib-search-iterator-page-iterator-top">
+		<liferay-ui:search-paginator id="pageIteratorTop" searchContainer="<%= searchContainer %>" />
+	</div>
+</c:if>
+
+<%
+int depth = 0;
+
+for (int i = 0; i < messages.size(); i++) {
+	message = messages.get(i);
+
+	if (!MBUtil.isViewableMessage(themeDisplay, message)) {
+		continue;
+	}
+
+	viewableThread = true;
+
+	request.setAttribute("edit_message.jsp-category", category);
+	request.setAttribute("edit_message.jsp-depth", depth);
+	request.setAttribute("edit_message.jsp-editable", Boolean.TRUE);
+	request.setAttribute("edit_message.jsp-message", message);
+	request.setAttribute("edit-message.jsp-showPermanentLink", Boolean.TRUE);
+	request.setAttribute("edit_message.jsp-thread", thread);
+%>
+
+	<liferay-util:include page="/html/portlet/message_boards/view_thread_message.jsp" />
+
+<%
+}
+%>
+
+<c:if test="<%= threadView.equals(MBThreadConstants.THREAD_VIEW_FLAT) && (searchContainer.getTotal() > searchContainer.getDelta()) %>">
+	<div class="taglib-search-iterator-page-iterator-bottom">
+		<liferay-ui:search-paginator id="pageIteratorBottom" searchContainer="<%= searchContainer %>" />
+	</div>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_thread_message.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_thread_message.jsp
new file mode 100644
index 0000000..f7a9952
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_thread_message.jsp
@@ -0,0 +1,508 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+MBCategory category = (MBCategory)request.getAttribute("edit_message.jsp-category");
+String className = (String)request.getAttribute("edit_message.jsp-className");
+Integer depth = (Integer)request.getAttribute("edit_message.jsp-depth");
+Boolean editable = (Boolean)request.getAttribute("edit_message.jsp-editable");
+MBMessage message = (MBMessage)request.getAttribute("edit_message.jsp-message");
+Boolean showPermanentLink = (Boolean)request.getAttribute("edit-message.jsp-showPermanentLink");
+MBThread thread = (MBThread)request.getAttribute("edit_message.jsp-thread");
+%>
+
+<div class="message-container" style="margin-left: <%= depth * 10 %>px;">
+	<a id="<portlet:namespace />message_<%= message.getMessageId() %>"></a>
+
+	<table class="thread-message-view <%= className %>" id="<portlet:namespace />message_<%= message.getMessageId() %>">
+	<tr>
+		<td class="lfr-top user-info" <%= editable ? "rowspan=\"2\"" : StringPool.BLANK %>>
+			<c:choose>
+				<c:when test="<%= message.isAnonymous() %>">
+					<liferay-ui:message key="anonymous" />
+				</c:when>
+				<c:otherwise>
+					<liferay-ui:user-display
+						displayStyle="<%= 2 %>"
+						userId="<%= message.getUserId() %>"
+						userName="<%= HtmlUtil.escape(message.getUserName()) %>"
+					>
+
+						<%
+						MBStatsUser statsUser = MBStatsUserLocalServiceUtil.getStatsUser(scopeGroupId, message.getUserId());
+
+						int posts = statsUser.getMessageCount();
+						String[] ranks = MBUtil.getUserRank(portletPreferences, themeDisplay.getLanguageId(), statsUser);
+						%>
+
+						<c:if test="<%= Validator.isNotNull(ranks[1]) %>">
+							<div class="thread-user-role thread-user-role-<%= StringUtil.toLowerCase(ranks[1]) %>"><%= ranks[1] %></div>
+						</c:if>
+
+						<c:if test="<%= Validator.isNotNull(ranks[0]) %>">
+							<div class="thread-user-rank">
+								<span><liferay-ui:message key="rank" />:</span> <%= ranks[0] %>
+							</div>
+						</c:if>
+
+						<div class="thread-user-post-count">
+							<span><liferay-ui:message key="posts" />:</span> <%= posts %>
+						</div>
+
+						<div class="thread-user-join-date">
+							<span><liferay-ui:message key="join-date" />:</span> <%= dateFormatDate.format(userDisplay.getCreateDate()) %>
+						</div>
+
+						<portlet:renderURL var="recentPostsURL">
+							<portlet:param name="struts_action" value="/message_boards/view" />
+							<portlet:param name="topLink" value="recent-posts" />
+							<portlet:param name="groupThreadsUserId" value="<%= String.valueOf(userDisplay.getUserId()) %>" />
+						</portlet:renderURL>
+
+						<liferay-ui:icon
+							image="view"
+							label="<%= true %>"
+							message="recent-posts"
+							method="get"
+							url="<%= recentPostsURL.toString() %>"
+						/>
+
+						<c:if test="<%= (userDisplay != null) && (user.getUserId() != userDisplay.getUserId()) && !PortalUtil.isGroupAdmin(userDisplay, scopeGroupId) && MBPermission.contains(permissionChecker, scopeGroupId, ActionKeys.BAN_USER) %>">
+							<br />
+
+							<c:choose>
+								<c:when test="<%= MBBanLocalServiceUtil.hasBan(scopeGroupId, userDisplay.getUserId()) %>">
+									<portlet:actionURL var="unbanUserURL">
+										<portlet:param name="struts_action" value="/message_boards/ban_user" />
+										<portlet:param name="<%= Constants.CMD %>" value="unban" />
+										<portlet:param name="redirect" value="<%= currentURL %>" />
+										<portlet:param name="banUserId" value="<%= String.valueOf(userDisplay.getUserId()) %>" />
+									</portlet:actionURL>
+
+									<liferay-ui:icon
+										image="../message_boards/unban_user"
+										label="<%= true %>"
+										message="unban-this-user"
+										url="<%= unbanUserURL.toString() %>"
+									/>
+								</c:when>
+								<c:otherwise>
+									<portlet:actionURL var="banUserURL">
+										<portlet:param name="struts_action" value="/message_boards/ban_user" />
+										<portlet:param name="<%= Constants.CMD %>" value="ban" />
+										<portlet:param name="redirect" value="<%= currentURL %>" />
+										<portlet:param name="banUserId" value="<%= String.valueOf(userDisplay.getUserId()) %>" />
+									</portlet:actionURL>
+
+									<liferay-ui:icon
+										image="../message_boards/ban_user"
+										label="<%= true %>"
+										message="ban-this-user"
+										url="<%= banUserURL.toString() %>"
+									/>
+								</c:otherwise>
+							</c:choose>
+						</c:if>
+					</liferay-ui:user-display>
+				</c:otherwise>
+			</c:choose>
+		</td>
+		<td class="lfr-top">
+			<div class="thread-top float-container">
+				<div class="subject">
+					<c:choose>
+						<c:when test="<%= showPermanentLink %>">
+							<a href="#<portlet:namespace />message_<%= message.getMessageId() %>" title="<liferay-ui:message key="permanent-link-to-this-item" />"><strong><%= HtmlUtil.escape(message.getSubject()) %></strong></a>
+						</c:when>
+						<c:otherwise>
+							<strong><%= HtmlUtil.escape(message.getSubject()) %></strong>
+						</c:otherwise>
+					</c:choose>
+
+					<br />
+
+					<%
+					String assetTagNames = (String)request.getAttribute("edit_message.jsp-assetTagNames");
+					%>
+
+					<div class="tags">
+						<liferay-ui:asset-tags-summary
+							assetTagNames="<%= assetTagNames %>"
+							className="<%= MBMessage.class.getName() %>"
+							classPK="<%= message.getMessageId() %>"
+						/>
+					</div>
+
+					<div class="answer <%= !message.isRoot() && message.isAnswer() ? "" : "hide" %>" id="<portlet:namespace />deleteAnswerFlag_<%= message.getMessageId() %>">
+						<liferay-ui:icon
+							image="checked"
+							label="<%= true %>"
+							message="answer"
+						/>
+
+						<c:if test="<%= (message.getRootMessageId() != MBMessageConstants.DEFAULT_PARENT_MESSAGE_ID) && MBMessagePermission.contains(permissionChecker, message.getRootMessageId(), ActionKeys.UPDATE) %>">
+							(<a href="javascript:<portlet:namespace />deleteAnswerFlag('<%= message.getMessageId() %>');"><liferay-ui:message key="unmark" /></a>)
+						</c:if>
+					</div>
+
+					<%= dateFormatDateTime.format(message.getModifiedDate()) %>
+
+					<c:if test="<%= (message != null) && !message.isApproved() %>">
+						<aui:model-context bean="<%= message %>" model="<%= MBMessage.class %>" />
+
+						<aui:workflow-status status="<%= message.getStatus() %>" />
+					</c:if>
+
+					<%
+					MBMessage parentMessage = null;
+
+					try {
+						parentMessage = MBMessageLocalServiceUtil.getMessage(message.getParentMessageId());
+					}
+					catch (Exception e) {}
+					%>
+
+					<c:if test="<%= parentMessage != null %>">
+
+						<%
+						PortletURL parentMessageURL = renderResponse.createRenderURL();
+
+						parentMessageURL.setParameter("struts_action", "/message_boards/view_message");
+						parentMessageURL.setParameter("messageId", String.valueOf(parentMessage.getMessageId()));
+
+						String author = parentMessage.isAnonymous() ? LanguageUtil.get(pageContext, "anonymous") : HtmlUtil.escape(PortalUtil.getUserName(parentMessage.getUserId(), parentMessage.getUserName()));
+						%>
+
+						<%= LanguageUtil.format(pageContext, "posted-as-a-reply-to", author) %>
+					</c:if>
+				</div>
+
+				<c:if test="<%= editable %>">
+
+					<%
+					boolean showAnswerFlag = false;
+					boolean hasReplyPermission = MBCategoryPermission.contains(permissionChecker, scopeGroupId, message.getCategoryId(), ActionKeys.REPLY_TO_MESSAGE);
+
+					if (!message.isRoot()) {
+						MBMessage rootMessage = MBMessageLocalServiceUtil.getMessage(thread.getRootMessageId());
+
+						showAnswerFlag = MBMessagePermission.contains(permissionChecker, rootMessage, ActionKeys.UPDATE) && !message.isAnswer() && (thread.isQuestion() || MBThreadLocalServiceUtil.hasAnswerMessage(thread.getThreadId()));
+					}
+					%>
+
+					<c:if test="<%= showAnswerFlag || hasReplyPermission %>">
+						<ul class="edit-controls unstyled">
+							<li class="<%= showAnswerFlag ? "" : "hide" %>" id="<portlet:namespace />addAnswerFlag_<%= message.getMessageId() %>">
+
+								<%
+								String taglibMarkAsAnswerURL = "javascript:" + renderResponse.getNamespace() + "addAnswerFlag('" + message.getMessageId() + "');";
+								%>
+
+								<liferay-ui:icon
+									image="checked"
+									label="<%= true %>"
+									message="mark-as-an-answer"
+									url="<%= taglibMarkAsAnswerURL %>"
+								/>
+							</li>
+
+							<c:if test="<%= hasReplyPermission && !thread.isLocked() %>">
+								<li>
+									<portlet:renderURL var="replyURL">
+										<portlet:param name="struts_action" value="/message_boards/edit_message" />
+										<portlet:param name="redirect" value="<%= currentURL %>" />
+										<portlet:param name="mbCategoryId" value="<%= String.valueOf(message.getCategoryId()) %>" />
+										<portlet:param name="threadId" value="<%= String.valueOf(message.getThreadId()) %>" />
+										<portlet:param name="parentMessageId" value="<%= String.valueOf(message.getMessageId()) %>" />
+									</portlet:renderURL>
+
+									<liferay-ui:icon
+										image="reply"
+										label="<%= true %>"
+										url="<%= replyURL %>"
+									/>
+								</li>
+								<li>
+									<portlet:renderURL var="quoteURL">
+										<portlet:param name="struts_action" value="/message_boards/edit_message" />
+										<portlet:param name="redirect" value="<%= currentURL %>" />
+										<portlet:param name="mbCategoryId" value="<%= String.valueOf(message.getCategoryId()) %>" />
+										<portlet:param name="threadId" value="<%= String.valueOf(message.getThreadId()) %>" />
+										<portlet:param name="parentMessageId" value="<%= String.valueOf(message.getMessageId()) %>" />
+										<portlet:param name="quote" value="<%= Boolean.TRUE.toString() %>" />
+									</portlet:renderURL>
+
+									<liferay-ui:icon
+										image="quote"
+										label="<%= true %>"
+										message="reply-with-quote"
+										url="<%= quoteURL %>"
+									/>
+								</li>
+								<li>
+
+									<%
+									String taglibQuickReplyURL = "javascript:" + renderResponse.getNamespace() + "addQuickReply('reply', '" + message.getMessageId() + "');";
+									%>
+
+									<liferay-ui:icon
+										image="bottom"
+										label="<%= true %>"
+										message="quick-reply"
+										url="<%= taglibQuickReplyURL %>"
+									/>
+								</li>
+							</c:if>
+						</ul>
+					</c:if>
+				</c:if>
+			</div>
+
+			<div class="thread-body">
+
+				<%
+				String msgBody = message.getBody();
+
+				if (message.isFormatBBCode()) {
+					msgBody = BBCodeTranslatorUtil.getHTML(msgBody);
+					msgBody = StringUtil.replace(msgBody, "@theme_images_path@/emoticons", themeDisplay.getPathThemeImages() + "/emoticons");
+				}
+				%>
+
+				<%= msgBody %>
+
+				<liferay-ui:custom-attributes-available className="<%= MBMessage.class.getName() %>">
+					<div class="custom-attributes">
+						<liferay-ui:custom-attribute-list
+							className="<%= MBMessage.class.getName() %>"
+							classPK="<%= (message != null) ? message.getMessageId() : 0 %>"
+							editable="<%= false %>"
+							label="<%= true %>"
+						/>
+					</div>
+				</liferay-ui:custom-attributes-available>
+
+				<c:if test="<%= message.getMessageId() > 0 %>">
+
+					<%
+					int attachmentsFileEntriesCount = message.getAttachmentsFileEntriesCount();
+					int deletedAttachmentsFileEntriesCount = message.getDeletedAttachmentsFileEntriesCount();
+					%>
+
+					<c:if test="<%= ((attachmentsFileEntriesCount > 0) || ((deletedAttachmentsFileEntriesCount > 0) && TrashUtil.isTrashEnabled(scopeGroupId) && MBMessagePermission.contains(permissionChecker, message, ActionKeys.UPDATE))) %>">
+						<div class="message-attachments">
+							<h3><liferay-ui:message key="attachments" />:</h3>
+
+							<%
+							List<FileEntry> attachmentsFileEntries = message.getAttachmentsFileEntries();
+
+							for (FileEntry fileEntry : attachmentsFileEntries) {
+								if (MimeTypesUtil.isWebImage(fileEntry.getMimeType())) {
+							%>
+
+									<div>
+										<img alt="<liferay-ui:message key="attachment" />" src="<%= themeDisplay.getPathMain() %>/message_boards/get_message_attachment?messageId=<%= message.getMessageId() %>&attachment=<%= HttpUtil.encodeURL(fileEntry.getTitle()) %>" />
+									</div>
+
+									<br />
+
+							<%
+								}
+							}
+							%>
+
+							<ul>
+
+								<%
+								for (FileEntry fileEntry : attachmentsFileEntries) {
+								%>
+
+									<li class="message-attachment">
+
+										<%
+										StringBundler sb = new StringBundler(4);
+
+										sb.append(fileEntry.getTitle());
+										sb.append(StringPool.OPEN_PARENTHESIS);
+										sb.append(TextFormatter.formatStorageSize(fileEntry.getSize(), locale));
+										sb.append(StringPool.CLOSE_PARENTHESIS);
+										%>
+
+										<liferay-ui:icon
+											image='<%= "../file_system/small/" + DLUtil.getFileIcon(fileEntry.getExtension()) %>'
+											label="<%= true %>"
+											message="<%= sb.toString() %>"
+											url="<%= PortletFileRepositoryUtil.getPortletFileEntryURL(themeDisplay, fileEntry, StringPool.BLANK) %>"
+										/>
+									</li>
+
+								<%
+								}
+								%>
+
+								<c:if test="<%= (deletedAttachmentsFileEntriesCount > 0) && TrashUtil.isTrashEnabled(scopeGroupId) && MBMessagePermission.contains(permissionChecker, message, ActionKeys.UPDATE) %>">
+									<li class="message-attachment">
+										<portlet:renderURL var="viewTrashAttachmentsURL">
+											<portlet:param name="struts_action" value="/message_boards/view_deleted_message_attachments" />
+											<portlet:param name="redirect" value="<%= currentURL %>" />
+											<portlet:param name="messageId" value="<%= String.valueOf(message.getMessageId()) %>" />
+										</portlet:renderURL>
+
+										<liferay-ui:icon
+											image="delete_attachment"
+											label="<%= true %>"
+											message='<%= LanguageUtil.format(pageContext, (deletedAttachmentsFileEntriesCount == 1) ? "x-recently-removed-attachment" : "x-recently-removed-attachments", deletedAttachmentsFileEntriesCount) %>'
+											url="<%= viewTrashAttachmentsURL %>"
+										/>
+									</li>
+								</c:if>
+							</ul>
+						</div>
+					</c:if>
+				</c:if>
+			</div>
+		</td>
+	</tr>
+
+	<c:if test="<%= editable %>">
+		<tr>
+			<td class="thread-bottom">
+				<c:if test="<%= enableRatings %>">
+					<liferay-ui:ratings
+						className="<%= MBMessage.class.getName() %>"
+						classPK="<%= message.getMessageId() %>"
+						type="thumbs"
+					/>
+				</c:if>
+
+				<c:if test="<%= enableFlags %>">
+					<liferay-ui:flags
+						className="<%= MBMessage.class.getName() %>"
+						classPK="<%= message.getMessageId() %>"
+						contentTitle="<%= message.getSubject() %>"
+						reportedUserId="<%= message.getUserId() %>"
+					/>
+				</c:if>
+
+				<br />
+
+				<div class="entry-links">
+					<liferay-ui:asset-links
+						className="<%= MBMessage.class.getName() %>"
+						classPK="<%= message.getMessageId() %>"
+					/>
+				</div>
+
+				<ul class="edit-controls unstyled">
+					<li>
+
+						<%
+						String topHREF = "#" + renderResponse.getNamespace() + "message_0";
+						%>
+
+						<liferay-ui:icon
+							image="top"
+							label="<%= true %>"
+							url="<%= topHREF %>"
+						/>
+					</li>
+
+					<c:if test="<%= !thread.isLocked() && MBMessagePermission.contains(permissionChecker, message, ActionKeys.UPDATE) %>">
+						<li>
+							<portlet:renderURL var="editURL">
+								<portlet:param name="struts_action" value="/message_boards/edit_message" />
+								<portlet:param name="redirect" value="<%= currentURL %>" />
+								<portlet:param name="messageId" value="<%= String.valueOf(message.getMessageId()) %>" />
+							</portlet:renderURL>
+
+							<liferay-ui:icon
+								image="edit"
+								label="<%= true %>"
+								url="<%= editURL %>"
+							/>
+						</li>
+					</c:if>
+
+					<c:if test="<%= !thread.isLocked() && !message.isRoot() && MBMessagePermission.contains(permissionChecker, message, ActionKeys.PERMISSIONS) %>">
+						<li>
+							<liferay-security:permissionsURL
+								modelResource="<%= MBMessage.class.getName() %>"
+								modelResourceDescription="<%= HtmlUtil.escape(message.getSubject()) %>"
+								resourcePrimKey="<%= String.valueOf(message.getMessageId()) %>"
+								var="permissionsURL"
+								windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+							/>
+
+							<liferay-ui:icon
+								image="permissions"
+								label="<%= true %>"
+								method="get"
+								url="<%= permissionsURL %>"
+								useDialog="<%= true %>"
+							/>
+						</li>
+					</c:if>
+
+					<c:if test="<%= (message.getParentMessageId() != MBMessageConstants.DEFAULT_PARENT_MESSAGE_ID) && MBCategoryPermission.contains(permissionChecker, scopeGroupId, category.getCategoryId(), ActionKeys.MOVE_THREAD) %>">
+						<li>
+							<portlet:renderURL var="splitThreadURL">
+								<portlet:param name="struts_action" value="/message_boards/split_thread" />
+								<portlet:param name="redirect" value="<%= currentURL %>" />
+								<portlet:param name="messageId" value="<%= String.valueOf(message.getMessageId()) %>" />
+								<portlet:param name="splitThread" value="<%= Boolean.TRUE.toString() %>" />
+							</portlet:renderURL>
+
+							<liferay-ui:icon
+								image="unlink"
+								label="<%= true %>"
+								message="split-thread"
+								url="<%= splitThreadURL %>"
+							/>
+						</li>
+					</c:if>
+
+					<c:if test="<%= !thread.isLocked() && (thread.getMessageCount() > 1) && MBMessagePermission.contains(permissionChecker, message, ActionKeys.DELETE) %>">
+						<li>
+
+							<%
+							PortletURL categoryURL = renderResponse.createRenderURL();
+
+							categoryURL.setParameter("struts_action", "/message_boards/view");
+							categoryURL.setParameter("mbCategoryId", String.valueOf(message.getCategoryId()));
+							%>
+
+							<portlet:actionURL var="deleteURL">
+								<portlet:param name="struts_action" value="/message_boards/edit_message" />
+								<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+								<portlet:param name="redirect" value="<%= categoryURL.toString() %>" />
+								<portlet:param name="messageId" value="<%= String.valueOf(message.getMessageId()) %>" />
+							</portlet:actionURL>
+
+							<liferay-ui:icon-delete
+								label="<%= true %>"
+								url="<%= deleteURL %>"
+							/>
+						</li>
+					</c:if>
+				</ul>
+			</td>
+		</tr>
+	</c:if>
+
+	</table>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_thread_shortcut.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_thread_shortcut.jsp
new file mode 100644
index 0000000..e4a5800
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_thread_shortcut.jsp
@@ -0,0 +1,151 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+boolean editable = true;
+
+MBTreeWalker treeWalker = (MBTreeWalker)request.getAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER);
+MBMessage selMessage = (MBMessage)request.getAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_SEL_MESSAGE);
+MBMessage message = (MBMessage)request.getAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_CUR_MESSAGE);
+MBCategory category = (MBCategory)request.getAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_CATEGORY);
+MBThread thread = (MBThread)request.getAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_THREAD);
+MBThreadFlag threadFlag = (MBThreadFlag)request.getAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_THREAD_FLAG);
+boolean lastNode = ((Boolean)request.getAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_LAST_NODE)).booleanValue();
+int depth = ((Integer)request.getAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_DEPTH)).intValue();
+
+long threadFlagModifiedTime = 0;
+
+if (threadFlag != null) {
+	Date threadFlagModifiedDate = threadFlag.getModifiedDate();
+
+	threadFlagModifiedTime = threadFlagModifiedDate.getTime();
+}
+%>
+
+<c:if test="<%= (message.getMessageId() != selMessage.getMessageId()) || MBUtil.isViewableMessage(themeDisplay, message) %>">
+	<tr>
+		<td class="table-cell" style="padding-left: <%= depth > 0 ? depth * 10 : 5 %>px; width: 90%;" valign="middle">
+			<c:if test="<%= !message.isRoot() %>">
+				<c:choose>
+					<c:when test="<%= !lastNode %>">
+						<img alt="" src="<%= themeDisplay.getPathThemeImages() %>/message_boards/t.png" />
+					</c:when>
+					<c:otherwise>
+						<img alt="" src="<%= themeDisplay.getPathThemeImages() %>/message_boards/l.png" />
+					</c:otherwise>
+				</c:choose>
+			</c:if>
+
+			<%
+			String layoutFullURL = PortalUtil.getLayoutFullURL(themeDisplay);
+
+			String messageURL = layoutFullURL + Portal.FRIENDLY_URL_SEPARATOR + "message_boards/view_message/" + selMessage.getMessageId();
+
+			if (windowState.equals(WindowState.MAXIMIZED)) {
+				messageURL += "/maximized";
+			}
+
+			String rowHREF = "#" + renderResponse.getNamespace() + "message_" + message.getMessageId();
+
+			if (!themeDisplay.isFacebook()) {
+				rowHREF = messageURL + rowHREF;
+			}
+
+			boolean readThread = true;
+
+			if (themeDisplay.isSignedIn()) {
+				Date messageModifiedDate = message.getModifiedDate();
+
+				if (threadFlagModifiedTime < messageModifiedDate.getTime()) {
+					readThread = false;
+				}
+			}
+			%>
+
+			<a href="<%= rowHREF %>">
+				<c:if test="<%= !readThread %>">
+					<strong>
+				</c:if>
+
+				<%= HtmlUtil.escape(message.getSubject()) %>
+
+				<c:if test="<%= !readThread %>">
+					</strong>
+				</c:if>
+			</a>
+		</td>
+		<td class="table-cell" style="white-space: nowrap;">
+			<a href="<%= rowHREF %>">
+				<c:if test="<%= !readThread %>">
+					<strong>
+				</c:if>
+
+				<c:choose>
+					<c:when test="<%= message.isAnonymous() %>">
+						<liferay-ui:message key="anonymous" />
+					</c:when>
+					<c:otherwise>
+						<%= HtmlUtil.escape(PortalUtil.getUserName(message)) %>
+					</c:otherwise>
+				</c:choose>
+
+				<c:if test="<%= !readThread %>">
+					</strong>
+				</c:if>
+			</a>
+		</td>
+		<td class="table-cell" style="white-space: nowrap;">
+			<a href="<%= rowHREF %>"><%= dateFormatDateTime.format(message.getModifiedDate()) %></a>
+		</td>
+	</tr>
+</c:if>
+
+<%
+List messages = treeWalker.getMessages();
+int[] range = treeWalker.getChildrenRange(message);
+
+depth++;
+
+for (int i = range[0]; i < range[1]; i++) {
+	MBMessage curMessage = (MBMessage)messages.get(i);
+
+	if (!MBUtil.isViewableMessage(themeDisplay, curMessage, message)) {
+		continue;
+	}
+
+	boolean lastChildNode = false;
+
+	if ((i + 1) == range[1]) {
+		lastChildNode = true;
+	}
+
+	request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER, treeWalker);
+	request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_CATEGORY, category);
+	request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_CUR_MESSAGE, curMessage);
+	request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_DEPTH, new Integer(depth));
+	request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_SEL_MESSAGE, selMessage);
+	request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_LAST_NODE, Boolean.valueOf(lastChildNode));
+	request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_THREAD, thread);
+	request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_THREAD_FLAG, threadFlag);
+%>
+
+	<liferay-util:include page="/html/portlet/message_boards/view_thread_shortcut.jsp" />
+
+<%
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_thread_tree.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_thread_tree.jsp
new file mode 100644
index 0000000..4f9d83e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_thread_tree.jsp
@@ -0,0 +1,80 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+MBTreeWalker treeWalker = (MBTreeWalker)request.getAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER);
+MBMessage selMessage = (MBMessage)request.getAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_SEL_MESSAGE);
+MBMessage message = (MBMessage)request.getAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_CUR_MESSAGE);
+MBCategory category = (MBCategory)request.getAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_CATEGORY);
+MBThread thread = (MBThread)request.getAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_THREAD);
+boolean lastNode = ((Boolean)request.getAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_LAST_NODE)).booleanValue();
+int depth = ((Integer)request.getAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_DEPTH)).intValue();
+%>
+
+<c:if test="<%= (message.getMessageId() != selMessage.getMessageId()) || MBUtil.isViewableMessage(themeDisplay, message) %>">
+
+	<%
+	request.setAttribute("edit_message.jsp-category", category);
+	request.setAttribute("edit_message.jsp-depth", depth);
+	request.setAttribute("edit_message.jsp-editable", Boolean.TRUE);
+	request.setAttribute("edit_message.jsp-message", message);
+	request.setAttribute("edit-message.jsp-showPermanentLink", Boolean.TRUE);
+	request.setAttribute("edit_message.jsp-thread", thread);
+	%>
+
+	<liferay-util:include page="/html/portlet/message_boards/view_thread_message.jsp" />
+
+	<%
+	request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_VIEWABLE_THREAD, Boolean.TRUE.toString());
+	%>
+
+</c:if>
+
+<%
+List messages = treeWalker.getMessages();
+int[] range = treeWalker.getChildrenRange(message);
+
+depth++;
+
+for (int i = range[0]; i < range[1]; i++) {
+	MBMessage curMessage = (MBMessage)messages.get(i);
+
+	if (!MBUtil.isViewableMessage(themeDisplay, curMessage, message)) {
+		continue;
+	}
+
+	boolean lastChildNode = false;
+
+	if ((i + 1) == range[1]) {
+		lastChildNode = true;
+	}
+
+	request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER, treeWalker);
+	request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_CATEGORY, category);
+	request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_CUR_MESSAGE, curMessage);
+	request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_DEPTH, new Integer(depth));
+	request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_LAST_NODE, Boolean.valueOf(lastChildNode));
+	request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_SEL_MESSAGE, selMessage);
+	request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_THREAD, thread);
+%>
+
+	<liferay-util:include page="/html/portlet/message_boards/view_thread_tree.jsp" />
+
+<%
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_threads.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_threads.jspf
new file mode 100644
index 0000000..371d48c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards/view_threads.jspf
@@ -0,0 +1,128 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:search-container
+	headerNames="thread,started-by,posts,views,last-post"
+	iteratorURL="<%= portletURL %>"
+>
+
+	<%
+	String emptyResultsMessage = null;
+
+	if (topLink.equals("my-posts")) {
+		emptyResultsMessage = "you-do-not-have-any-posts";
+	}
+	else if (topLink.equals("my-subscriptions")) {
+		emptyResultsMessage = "you-are-not-subscribed-to-any-threads";
+	}
+	else if (topLink.equals("recent-posts")) {
+		emptyResultsMessage = "there-are-no-recent-posts";
+	}
+	else {
+		emptyResultsMessage = "there-are-no-threads-in-this-category";
+	}
+
+	searchContainer.setEmptyResultsMessage(emptyResultsMessage);
+	%>
+
+	<liferay-ui:search-container-results>
+
+		<%
+		if (useAssetEntryQuery) {
+			AssetEntryQuery assetEntryQuery = new AssetEntryQuery(MBMessage.class.getName(), searchContainer);
+
+			assetEntryQuery.setExcludeZeroViewCount(false);
+
+			total = AssetEntryServiceUtil.getEntriesCount(assetEntryQuery);
+
+			searchContainer.setTotal(total);
+
+			assetEntryQuery.setEnd(searchContainer.getEnd());
+			assetEntryQuery.setStart(searchContainer.getStart());
+
+			results = AssetEntryServiceUtil.getEntries(assetEntryQuery);
+		}
+		else if (topLink.equals("my-posts")) {
+			total = MBThreadServiceUtil.getGroupThreadsCount(scopeGroupId, groupThreadsUserId, WorkflowConstants.STATUS_ANY);
+
+			searchContainer.setTotal(total);
+
+			results = MBThreadServiceUtil.getGroupThreads(scopeGroupId, groupThreadsUserId, WorkflowConstants.STATUS_ANY, searchContainer.getStart(), searchContainer.getEnd());
+		}
+		else if (topLink.equals("my-subscriptions")) {
+			total = MBThreadServiceUtil.getGroupThreadsCount(scopeGroupId, groupThreadsUserId, WorkflowConstants.STATUS_APPROVED, true);
+
+			searchContainer.setTotal(total);
+
+			results = MBThreadServiceUtil.getGroupThreads(scopeGroupId, groupThreadsUserId, WorkflowConstants.STATUS_APPROVED, true, searchContainer.getStart(), searchContainer.getEnd());
+		}
+		else if (topLink.equals("recent-posts")) {
+			Calendar calendar = Calendar.getInstance();
+
+			int offset = GetterUtil.getInteger(recentPostsDateOffset);
+
+			calendar.add(Calendar.DATE, -offset);
+
+			total = MBThreadServiceUtil.getGroupThreadsCount(scopeGroupId, groupThreadsUserId, calendar.getTime(), WorkflowConstants.STATUS_APPROVED);
+
+			searchContainer.setTotal(total);
+
+			results = MBThreadServiceUtil.getGroupThreads(scopeGroupId, groupThreadsUserId, calendar.getTime(), WorkflowConstants.STATUS_APPROVED, searchContainer.getStart(), searchContainer.getEnd());
+		}
+
+		searchContainer.setResults(results);
+		%>
+
+	</liferay-ui:search-container-results>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.BaseModel"
+		keyProperty="primaryKeyObj"
+		modelVar="result"
+	>
+
+		<%@ include file="/html/portlet/message_boards/cast_result.jspf" %>
+
+		<%
+		MBMessage message = null;
+
+		try {
+			message = MBMessageLocalServiceUtil.getMessage(thread.getRootMessageId());
+		}
+		catch (NoSuchMessageException nsme) {
+			_log.error("Thread requires missing root message id " + thread.getRootMessageId());
+
+			message = new MBMessageImpl();
+
+			row.setSkip(true);
+		}
+
+		message = message.toEscapedModel();
+
+		row.setBold(!MBThreadFlagLocalServiceUtil.hasThreadFlag(themeDisplay.getUserId(), thread));
+		row.setRestricted(!MBMessagePermission.contains(permissionChecker, message, ActionKeys.VIEW));
+		%>
+
+		<liferay-portlet:renderURL varImpl="rowURL">
+			<portlet:param name="struts_action" value="/message_boards/view_message" />
+			<portlet:param name="messageId" value="<%= String.valueOf(message.getMessageId()) %>" />
+		</liferay-portlet:renderURL>
+
+		<%@ include file="/html/portlet/message_boards/user_thread_columns.jspf" %>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards_admin/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards_admin/view.jsp
new file mode 100644
index 0000000..584bd12
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/message_boards_admin/view.jsp
@@ -0,0 +1,746 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/message_boards/init.jsp" %>
+
+<%
+String topLink = ParamUtil.getString(request, "topLink", "message-boards-home");
+
+MBCategory category = (MBCategory)request.getAttribute(WebKeys.MESSAGE_BOARDS_CATEGORY);
+
+long categoryId = MBUtil.getCategoryId(request, category);
+
+MBCategoryDisplay categoryDisplay = new MBCategoryDisplayImpl(scopeGroupId, categoryId);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/message_boards/view");
+portletURL.setParameter("topLink", topLink);
+portletURL.setParameter("mbCategoryId", String.valueOf(categoryId));
+
+request.setAttribute("view.jsp-viewCategory", Boolean.TRUE.toString());
+
+if ((category != null) && layout.isTypeControlPanel()) {
+	MBUtil.addPortletBreadcrumbEntries(category, request, renderResponse);
+}
+%>
+
+<portlet:actionURL var="undoTrashURL">
+	<portlet:param name="struts_action" value="/message_boards_admin/edit_entry" />
+	<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.RESTORE %>" />
+</portlet:actionURL>
+
+<liferay-ui:trash-undo portletURL="<%= undoTrashURL %>" />
+
+<liferay-util:include page="/html/portlet/message_boards/top_links.jsp" />
+
+<c:choose>
+	<c:when test='<%= topLink.equals("message-boards-home") %>'>
+
+		<%
+		boolean showAddCategoryButton = MBCategoryPermission.contains(permissionChecker, scopeGroupId, categoryId, ActionKeys.ADD_CATEGORY);
+		boolean showAddMessageButton = MBCategoryPermission.contains(permissionChecker, scopeGroupId, categoryId, ActionKeys.ADD_MESSAGE);
+		boolean showPermissionsButton = MBCategoryPermission.contains(permissionChecker, scopeGroupId, categoryId, ActionKeys.PERMISSIONS);
+
+		if (showAddMessageButton && !themeDisplay.isSignedIn()) {
+			if (!allowAnonymousPosting) {
+				showAddMessageButton = false;
+			}
+		}
+		%>
+
+		<c:if test="<%= showAddCategoryButton || showAddMessageButton || showPermissionsButton %>">
+			<div class="category-buttons">
+				<c:if test="<%= showAddCategoryButton %>">
+					<portlet:renderURL var="editCategoryURL">
+						<portlet:param name="struts_action" value="/message_boards/edit_category" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+						<portlet:param name="parentCategoryId" value="<%= String.valueOf(categoryId) %>" />
+					</portlet:renderURL>
+
+					<aui:button href="<%= editCategoryURL %>" value='<%= (category == null) ? "add-category" : "add-subcategory" %>' />
+				</c:if>
+
+				<c:if test="<%= showAddMessageButton %>">
+					<portlet:renderURL var="editMessageURL">
+						<portlet:param name="struts_action" value="/message_boards/edit_message" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+						<portlet:param name="mbCategoryId" value="<%= String.valueOf(categoryId) %>" />
+					</portlet:renderURL>
+
+					<aui:button href="<%= editMessageURL %>" value="post-new-thread" />
+				</c:if>
+
+				<c:if test="<%= showPermissionsButton %>">
+
+					<%
+					String modelResource = "com.liferay.portlet.messageboards";
+					String modelResourceDescription = themeDisplay.getScopeGroupName();
+					String resourcePrimKey = String.valueOf(scopeGroupId);
+
+					if (category != null) {
+						modelResource = MBCategory.class.getName();
+						modelResourceDescription = category.getName();
+						resourcePrimKey = String.valueOf(category.getCategoryId());
+					}
+					%>
+
+					<liferay-security:permissionsURL
+						modelResource="<%= modelResource %>"
+						modelResourceDescription="<%= HtmlUtil.escape(modelResourceDescription) %>"
+						resourcePrimKey="<%= resourcePrimKey %>"
+						var="permissionsURL"
+						windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+					/>
+
+					<aui:button href="<%= permissionsURL %>" useDialog="<%= true %>" value="permissions" />
+				</c:if>
+			</div>
+		</c:if>
+
+		<c:if test="<%= category != null %>">
+
+			<%
+			long parentCategoryId = category.getParentCategoryId();
+			String parentCategoryName = LanguageUtil.get(pageContext, "message-boards-home");
+
+			if (!category.isRoot()) {
+				MBCategory parentCategory = MBCategoryLocalServiceUtil.getCategory(parentCategoryId);
+
+				parentCategoryId = parentCategory.getCategoryId();
+				parentCategoryName = parentCategory.getName();
+			}
+			%>
+
+			<portlet:renderURL var="backURL">
+				<portlet:param name="struts_action" value="/message_boards/view" />
+				<portlet:param name="mbCategoryId" value="<%= String.valueOf(parentCategoryId) %>" />
+			</portlet:renderURL>
+
+			<liferay-ui:header
+				backLabel="<%= parentCategoryName %>"
+				backURL="<%= backURL.toString() %>"
+				localizeTitle="<%= false %>"
+				title="<%= category.getName() %>"
+			/>
+		</c:if>
+
+		<liferay-ui:panel-container cssClass="message-boards-panels" extended="<%= false %>" id="messageBoardsPanelContainer" persistState="<%= true %>">
+
+			<%
+			int categoriesCount = MBCategoryServiceUtil.getCategoriesCount(scopeGroupId, categoryId, WorkflowConstants.STATUS_APPROVED);
+			%>
+
+			<c:if test="<%= categoriesCount > 0 %>">
+				<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="messageBoardsCategoriesPanel" persistState="<%= true %>" title='<%= (category != null) ? "subcategories" : "categories" %>'>
+					<aui:form action="<%= portletURL.toString() %>" method="get" name="fm">
+						<aui:input name="<%= Constants.CMD %>" type="hidden" />
+						<aui:input name="redirect" type="hidden" value="<%= portletURL.toString() %>" />
+						<aui:input name="deleteCategoryIds" type="hidden" />
+
+						<liferay-ui:search-container
+							curParam="cur1"
+							deltaConfigurable="<%= false %>"
+							headerNames="category,categories,threads,posts"
+							iteratorURL="<%= portletURL %>"
+							rowChecker="<%= new RowChecker(renderResponse) %>"
+							total="<%= categoriesCount %>"
+							var="categorySearchContainer"
+						>
+							<liferay-ui:search-container-results
+								results="<%= MBCategoryServiceUtil.getCategories(scopeGroupId, categoryId, WorkflowConstants.STATUS_APPROVED, categorySearchContainer.getStart(), categorySearchContainer.getEnd()) %>"
+							/>
+
+							<liferay-ui:search-container-row
+								className="com.liferay.portlet.messageboards.model.MBCategory"
+								escapedModel="<%= true %>"
+								keyProperty="categoryId"
+								modelVar="curCategory"
+							>
+								<liferay-portlet:renderURL varImpl="rowURL">
+									<portlet:param name="struts_action" value="/message_boards/view" />
+									<portlet:param name="mbCategoryId" value="<%= String.valueOf(curCategory.getCategoryId()) %>" />
+								</liferay-portlet:renderURL>
+
+								<%@ include file="/html/portlet/message_boards/category_columns.jspf" %>
+							</liferay-ui:search-container-row>
+
+							<br>
+
+							<aui:button disabled="<%= true %>" name="deleteCategory" onClick='<%= renderResponse.getNamespace() + "deleteCategories();" %>' value='<%= TrashUtil.isTrashEnabled(scopeGroupId) ? "move-to-the-recycle-bin" : "delete" %>' />
+
+							<div class="separator"><!-- --></div>
+
+							<liferay-ui:search-iterator />
+						</liferay-ui:search-container>
+					</aui:form>
+				</liferay-ui:panel>
+			</c:if>
+
+			<liferay-ui:panel collapsible="<%= true %>" cssClass="threads-panel" extended="<%= true %>" id="messageBoardsThreadsPanel" persistState="<%= true %>" title="threads">
+				<aui:form action="<%= portletURL.toString() %>" method="get" name="fm1">
+
+					<%
+					int status = WorkflowConstants.STATUS_APPROVED;
+
+					if (permissionChecker.isCompanyAdmin() || permissionChecker.isGroupAdmin(scopeGroupId)) {
+						status = WorkflowConstants.STATUS_ANY;
+					}
+					%>
+
+					<aui:input name="<%= Constants.CMD %>" type="hidden" />
+					<aui:input name="redirect" type="hidden" value="<%= portletURL.toString() %>" />
+					<aui:input name="threadIds" type="hidden" />
+
+					<liferay-ui:search-container
+						curParam="cur2"
+						emptyResultsMessage="there-are-no-threads-in-this-category"
+						headerNames="thread,flag,started-by,posts,views,last-post"
+						iteratorURL="<%= portletURL %>"
+						rowChecker="<%= new RowChecker(renderResponse) %>"
+						total="<%= MBThreadServiceUtil.getThreadsCount(scopeGroupId, categoryId, status) %>"
+						var="threadSearchContainer"
+					>
+						<liferay-ui:search-container-results
+							results="<%= MBThreadServiceUtil.getThreads(scopeGroupId, categoryId, status, threadSearchContainer.getStart(), threadSearchContainer.getEnd()) %>"
+						/>
+
+						<liferay-ui:search-container-row
+							className="com.liferay.portlet.messageboards.model.MBThread"
+							keyProperty="threadId"
+							modelVar="thread"
+						>
+
+							<%
+							MBMessage message = null;
+
+							try {
+								message = MBMessageLocalServiceUtil.getMessage(thread.getRootMessageId());
+							}
+							catch (NoSuchMessageException nsme) {
+								_log.error("Thread requires missing root message id " + thread.getRootMessageId());
+
+								message = new MBMessageImpl();
+
+								row.setSkip(true);
+							}
+
+							message = message.toEscapedModel();
+
+							row.setBold(!MBThreadFlagLocalServiceUtil.hasThreadFlag(themeDisplay.getUserId(), thread));
+							row.setRestricted(!MBMessagePermission.contains(permissionChecker, message, ActionKeys.VIEW));
+							%>
+
+							<liferay-portlet:renderURL varImpl="rowURL">
+								<portlet:param name="struts_action" value="/message_boards/view_message" />
+								<portlet:param name="messageId" value="<%= String.valueOf(message.getMessageId()) %>" />
+							</liferay-portlet:renderURL>
+
+							<liferay-ui:search-container-column-text
+								buffer="buffer"
+								href="<%= rowURL %>"
+								name="thread"
+							>
+
+								<%
+								String[] threadPriority = MBUtil.getThreadPriority(portletPreferences, themeDisplay.getLanguageId(), thread.getPriority(), themeDisplay);
+
+								if ((threadPriority != null) && (thread.getPriority() > 0)) {
+									buffer.append("<img class=\"thread-priority\" alt=\"");
+									buffer.append(threadPriority[0]);
+									buffer.append("\" src=\"");
+									buffer.append(threadPriority[1]);
+									buffer.append("\" title=\"");
+									buffer.append(threadPriority[0]);
+									buffer.append("\" />");
+								}
+
+								if (thread.isLocked()) {
+									buffer.append("<img class=\"thread-priority\" alt=\"");
+									buffer.append(LanguageUtil.get(pageContext, "thread-locked"));
+									buffer.append("\" src=\"");
+									buffer.append(themeDisplay.getPathThemeImages() + "/common/lock.png");
+									buffer.append("\" title=\"");
+									buffer.append(LanguageUtil.get(pageContext, "thread-locked"));
+									buffer.append("\" />");
+								}
+
+								buffer.append(message.getSubject());
+								%>
+
+							</liferay-ui:search-container-column-text>
+
+							<liferay-ui:search-container-column-text
+								buffer="buffer"
+								href="<%= rowURL %>"
+								name="flag"
+							>
+
+								<%
+								if (MBThreadLocalServiceUtil.hasAnswerMessage(thread.getThreadId())) {
+									buffer.append(LanguageUtil.get(pageContext, "resolved"));
+								}
+								else if (thread.isQuestion()) {
+									buffer.append(LanguageUtil.get(pageContext, "waiting-for-an-answer"));
+								}
+								%>
+
+							</liferay-ui:search-container-column-text>
+
+							<liferay-ui:search-container-column-text
+								href="<%= rowURL %>"
+								name="started-by"
+								value='<%= message.isAnonymous() ? LanguageUtil.get(pageContext, "anonymous") : PortalUtil.getUserName(message) %>'
+							/>
+
+							<liferay-ui:search-container-column-text
+								href="<%= rowURL %>"
+								name="posts"
+								value="<%= String.valueOf(thread.getMessageCount()) %>"
+							/>
+
+							<liferay-ui:search-container-column-text
+								href="<%= rowURL %>"
+								name="views"
+								value="<%= String.valueOf(thread.getViewCount()) %>"
+							/>
+
+							<liferay-ui:search-container-column-text
+								buffer="buffer"
+								href="<%= rowURL %>"
+								name="last-post"
+							>
+
+								<%
+								if (thread.getLastPostDate() == null) {
+									buffer.append(LanguageUtil.get(pageContext, "none"));
+								}
+								else {
+									buffer.append(LanguageUtil.get(pageContext, "date"));
+									buffer.append(": ");
+									buffer.append(dateFormatDateTime.format(thread.getLastPostDate()));
+
+									String lastPostByUserName = HtmlUtil.escape(PortalUtil.getUserName(thread.getLastPostByUserId(), StringPool.BLANK));
+
+									if (Validator.isNotNull(lastPostByUserName)) {
+										buffer.append("<br />");
+										buffer.append(LanguageUtil.get(pageContext, "by"));
+										buffer.append(": ");
+										buffer.append(lastPostByUserName);
+									}
+								}
+								%>
+
+							</liferay-ui:search-container-column-text>
+
+							<liferay-ui:search-container-column-status
+								href="<%= rowURL %>"
+								name="status"
+								status="<%= thread.getStatus() %>"
+							/>
+
+							<%
+							row.setObject(new Object[] {message});
+							%>
+
+							<liferay-ui:search-container-column-jsp
+								align="right"
+								path="/html/portlet/message_boards/message_action.jsp"
+							/>
+						</liferay-ui:search-container-row>
+
+						<br>
+
+						<aui:button disabled="<%= true %>" name="delete" onClick='<%= renderResponse.getNamespace() + "deleteThreads();" %>' value='<%= TrashUtil.isTrashEnabled(scopeGroupId) ? "move-to-the-recycle-bin" : "delete" %>' />
+
+						<aui:button disabled="<%= true %>" name="lockThread" onClick='<%= renderResponse.getNamespace() + "lockThreads();" %>' value="lock" />
+
+						<aui:button disabled="<%= true %>" name="unlockThread" onClick='<%= renderResponse.getNamespace() + "unlockThreads();" %>' value="unlock" />
+
+						<div class="separator"><!-- --></div>
+
+						<liferay-ui:search-iterator />
+					</liferay-ui:search-container>
+				</aui:form>
+			</liferay-ui:panel>
+		</liferay-ui:panel-container>
+
+		<%
+		if (category != null) {
+			PortalUtil.setPageSubtitle(category.getName(), request);
+			PortalUtil.setPageDescription(category.getDescription(), request);
+
+			MBUtil.addPortletBreadcrumbEntries(category, request, renderResponse);
+		}
+		%>
+
+	</c:when>
+	<c:when test='<%= topLink.equals("recent-posts") %>'>
+
+		<%
+		long groupThreadsUserId = ParamUtil.getLong(request, "groupThreadsUserId");
+
+		if (groupThreadsUserId > 0) {
+			portletURL.setParameter("groupThreadsUserId", String.valueOf(groupThreadsUserId));
+		}
+		%>
+
+		<c:if test="<%= (groupThreadsUserId > 0) %>">
+			<div class="alert alert-info">
+				<liferay-ui:message key="filter-by-user" />: <%= HtmlUtil.escape(PortalUtil.getUserName(groupThreadsUserId, StringPool.BLANK)) %>
+			</div>
+		</c:if>
+
+		<aui:form action="<%= portletURL.toString() %>" method="get" name="fm1">
+
+			<%
+			portletURL.setParameter("topLink", ParamUtil.getString(request, "topLink"));
+			%>
+
+			<aui:input name="<%= Constants.CMD %>" type="hidden" />
+			<aui:input name="redirect" type="hidden" value="<%= portletURL.toString() %>" />
+			<aui:input name="threadIds" type="hidden" />
+
+			<liferay-ui:search-container
+				emptyResultsMessage="there-are-no-recent-posts"
+				headerNames="thread,started-by,posts,views,last-post"
+				iteratorURL="<%= portletURL %>"
+				rowChecker="<%= new RowChecker(renderResponse) %>"
+			>
+				<liferay-ui:search-container-results>
+
+					<%
+					Calendar calendar = Calendar.getInstance();
+
+					int offset = GetterUtil.getInteger(recentPostsDateOffset);
+
+					calendar.add(Calendar.DATE, -offset);
+
+					total = MBThreadServiceUtil.getGroupThreadsCount(scopeGroupId, groupThreadsUserId, calendar.getTime(), WorkflowConstants.STATUS_APPROVED);
+
+					searchContainer.setTotal(total);
+
+					results = MBThreadServiceUtil.getGroupThreads(scopeGroupId, groupThreadsUserId, calendar.getTime(), WorkflowConstants.STATUS_APPROVED, searchContainer.getStart(), searchContainer.getEnd());
+
+					searchContainer.setResults(results);
+					%>
+
+				</liferay-ui:search-container-results>
+
+				<liferay-ui:search-container-row
+					className="com.liferay.portlet.messageboards.model.MBThread"
+					keyProperty="threadId"
+					modelVar="thread"
+				>
+
+					<%
+					MBMessage message = null;
+
+					try {
+						message = MBMessageLocalServiceUtil.getMessage(thread.getRootMessageId());
+					}
+					catch (NoSuchMessageException nsme) {
+						_log.error("Thread requires missing root message id " + thread.getRootMessageId());
+
+						continue;
+					}
+
+					message = message.toEscapedModel();
+
+					row.setBold(!MBThreadFlagLocalServiceUtil.hasThreadFlag(themeDisplay.getUserId(), thread));
+					row.setObject(new Object[] {message});
+					row.setRestricted(!MBMessagePermission.contains(permissionChecker, message, ActionKeys.VIEW));
+					%>
+
+					<liferay-portlet:renderURL varImpl="rowURL">
+						<portlet:param name="struts_action" value="/message_boards/view_message" />
+						<portlet:param name="messageId" value="<%= String.valueOf(message.getMessageId()) %>" />
+					</liferay-portlet:renderURL>
+
+					<liferay-ui:search-container-column-text
+						buffer="buffer"
+						href="<%= rowURL %>"
+						name="thread"
+					>
+
+						<%
+						String[] threadPriority = MBUtil.getThreadPriority(portletPreferences, themeDisplay.getLanguageId(), thread.getPriority(), themeDisplay);
+
+						if ((threadPriority != null) && (thread.getPriority() > 0)) {
+							buffer.append("<img class=\"thread-priority\" alt=\"");
+							buffer.append(threadPriority[0]);
+							buffer.append("\" src=\"");
+							buffer.append(threadPriority[1]);
+							buffer.append("\" title=\"");
+							buffer.append(threadPriority[0]);
+							buffer.append("\" />");
+						}
+
+						buffer.append(message.getSubject());
+						%>
+
+					</liferay-ui:search-container-column-text>
+
+					<liferay-ui:search-container-column-text
+						href="<%= rowURL %>"
+						name="started-by"
+						value='<%= message.isAnonymous() ? LanguageUtil.get(pageContext, "anonymous") : PortalUtil.getUserName(message) %>'
+					/>
+
+					<liferay-ui:search-container-column-text
+						href="<%= rowURL %>"
+						name="posts"
+						value="<%= String.valueOf(thread.getMessageCount()) %>"
+					/>
+
+					<liferay-ui:search-container-column-text
+						href="<%= rowURL %>"
+						name="views"
+						value="<%= String.valueOf(thread.getViewCount()) %>"
+					/>
+
+					<liferay-ui:search-container-column-text
+						buffer="buffer"
+						href="<%= rowURL %>"
+						name="last-post"
+					>
+
+						<%
+						if (thread.getLastPostDate() == null) {
+							buffer.append(LanguageUtil.get(pageContext, "none"));
+						}
+						else {
+							buffer.append(LanguageUtil.get(pageContext, "date"));
+							buffer.append(": ");
+							buffer.append(dateFormatDateTime.format(thread.getLastPostDate()));
+
+							String lastPostByUserName = HtmlUtil.escape(PortalUtil.getUserName(thread.getLastPostByUserId(), StringPool.BLANK));
+
+							if (Validator.isNotNull(lastPostByUserName)) {
+								buffer.append("<br />");
+								buffer.append(LanguageUtil.get(pageContext, "by"));
+								buffer.append(": ");
+								buffer.append(lastPostByUserName);
+							}
+						}
+						%>
+
+					</liferay-ui:search-container-column-text>
+
+					<liferay-ui:search-container-column-jsp
+						align="right"
+						path="/html/portlet/message_boards/message_action.jsp"
+					/>
+				</liferay-ui:search-container-row>
+
+				<br>
+
+				<aui:button onClick='<%= renderResponse.getNamespace() + "deleteThreads();" %>' value='<%= TrashUtil.isTrashEnabled(scopeGroupId) ? "move-to-the-recycle-bin" : "delete" %>' />
+
+				<aui:button onClick='<%= renderResponse.getNamespace() + "lockThreads();" %>' value="lock" />
+
+				<aui:button onClick='<%= renderResponse.getNamespace() + "unlockThreads();" %>' value="unlock" />
+
+				<div class="separator"><!-- --></div>
+
+				<liferay-ui:search-iterator />
+			</liferay-ui:search-container>
+		</aui:form>
+
+		<%
+		PortalUtil.setPageSubtitle(LanguageUtil.get(pageContext, StringUtil.replace(topLink, StringPool.UNDERLINE, StringPool.DASH)), request);
+		PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, TextFormatter.format(topLink, TextFormatter.O)), portletURL.toString());
+		%>
+
+	</c:when>
+	<c:when test='<%= topLink.equals("statistics") %>'>
+		<liferay-ui:panel-container cssClass="statistics-panel" extended="<%= false %>" id="messageBoardsStatisticsPanelContainer" persistState="<%= true %>">
+			<liferay-ui:panel collapsible="<%= true %>" cssClass="statistics-panel-content" extended="<%= true %>" id="messageBoardsGeneralStatisticsPanel" persistState="<%= true %>" title="general">
+				<dl>
+					<dt>
+						<liferay-ui:message key="num-of-categories" />:
+					</dt>
+					<dd>
+						<%= numberFormat.format(categoryDisplay.getAllCategoriesCount()) %>
+					</dd>
+					<dt>
+						<liferay-ui:message key="num-of-posts" />:
+					</dt>
+					<dd>
+						<%= numberFormat.format(MBStatsUserLocalServiceUtil.getMessageCountByGroupId(scopeGroupId)) %>
+					</dd>
+					<dt>
+						<liferay-ui:message key="num-of-participants" />:
+					</dt>
+					<dd>
+						<%= numberFormat.format(MBStatsUserLocalServiceUtil.getStatsUsersByGroupIdCount(scopeGroupId)) %>
+					</dd>
+				</dl>
+			</liferay-ui:panel>
+
+			<liferay-ui:panel collapsible="<%= true %>" cssClass="statistics-panel-content" extended="<%= true %>" id="messageBoardsTopPostersPanel" persistState="<%= true %>" title="top-posters">
+				<liferay-ui:search-container
+					emptyResultsMessage="there-are-no-top-posters"
+					iteratorURL="<%= portletURL %>"
+					total="<%= MBStatsUserLocalServiceUtil.getStatsUsersByGroupIdCount(scopeGroupId) %>"
+				>
+					<liferay-ui:search-container-results
+						results="<%= MBStatsUserLocalServiceUtil.getStatsUsersByGroupId(scopeGroupId, searchContainer.getStart(), searchContainer.getEnd()) %>"
+					/>
+
+					<liferay-ui:search-container-row
+						className="com.liferay.portlet.messageboards.model.MBStatsUser"
+						keyProperty="statsUserId"
+						modelVar="statsUser"
+					>
+						<liferay-ui:search-container-column-jsp
+							path="/html/portlet/message_boards/top_posters_user_display.jsp"
+						/>
+					</liferay-ui:search-container-row>
+
+					<liferay-ui:search-iterator />
+				</liferay-ui:search-container>
+			</liferay-ui:panel>
+		</liferay-ui:panel-container>
+
+		<%
+		PortalUtil.setPageSubtitle(LanguageUtil.get(pageContext, StringUtil.replace(topLink, StringPool.UNDERLINE, StringPool.DASH)), request);
+		PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, TextFormatter.format(topLink, TextFormatter.O)), portletURL.toString());
+		%>
+
+	</c:when>
+	<c:when test='<%= topLink.equals("banned-users") %>'>
+		<liferay-ui:search-container
+			emptyResultsMessage="there-are-no-banned-users"
+			headerNames="banned-user,banned-by,ban-date"
+			iteratorURL="<%= portletURL %>"
+			total="<%= MBBanLocalServiceUtil.getBansCount(scopeGroupId) %>"
+		>
+			<liferay-ui:search-container-results
+				results="<%= MBBanLocalServiceUtil.getBans(scopeGroupId, searchContainer.getStart(), searchContainer.getEnd()) %>"
+			/>
+
+			<liferay-ui:search-container-row
+				className="com.liferay.portlet.messageboards.model.MBBan"
+				keyProperty="banId"
+				modelVar="ban"
+			>
+				<liferay-ui:search-container-column-text
+					name="banned-user"
+					value="<%= HtmlUtil.escape(PortalUtil.getUserName(ban.getBanUserId(), StringPool.BLANK)) %>"
+				/>
+
+				<liferay-ui:search-container-column-text
+					name="banned-by"
+					value="<%= HtmlUtil.escape(PortalUtil.getUserName(ban.getUserId(), StringPool.BLANK)) %>"
+				/>
+
+				<liferay-ui:search-container-column-date
+					name="ban-date"
+					value="<%= ban.getCreateDate() %>"
+				/>
+
+				<c:if test="<%= PropsValues.MESSAGE_BOARDS_EXPIRE_BAN_INTERVAL > 0 %>">
+					<liferay-ui:search-container-column-text
+						name="unban-date"
+						value="<%= dateFormatDateTime.format(MBUtil.getUnbanDate(ban, PropsValues.MESSAGE_BOARDS_EXPIRE_BAN_INTERVAL)) %>"
+					/>
+				</c:if>
+
+				<liferay-ui:search-container-column-jsp
+					align="right"
+					path="/html/portlet/message_boards/ban_user_action.jsp"
+				/>
+			</liferay-ui:search-container-row>
+
+			<liferay-ui:search-iterator />
+		</liferay-ui:search-container>
+
+		<%
+		PortalUtil.setPageSubtitle(LanguageUtil.get(pageContext, StringUtil.replace(topLink, StringPool.UNDERLINE, StringPool.DASH)), request);
+		PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, TextFormatter.format(topLink, TextFormatter.O)), portletURL.toString());
+		%>
+
+	</c:when>
+</c:choose>
+
+<aui:script>
+	Liferay.Util.toggleSearchContainerButton('#<portlet:namespace />deleteCategory', '#<portlet:namespace /><%= searchContainerReference.getId("categorySearchContainer") %>SearchContainer', document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+	Liferay.Util.toggleSearchContainerButton('#<portlet:namespace />delete', '#<portlet:namespace /><%= searchContainerReference.getId("threadSearchContainer") %>SearchContainer', document.<portlet:namespace />fm1, '<portlet:namespace />allRowIds');
+	Liferay.Util.toggleSearchContainerButton('#<portlet:namespace />lockThread', '#<portlet:namespace /><%= searchContainerReference.getId("threadSearchContainer") %>SearchContainer', document.<portlet:namespace />fm1, '<portlet:namespace />allRowIds');
+	Liferay.Util.toggleSearchContainerButton('#<portlet:namespace />unlockThread', '#<portlet:namespace /><%= searchContainerReference.getId("threadSearchContainer") %>SearchContainer', document.<portlet:namespace />fm1, '<portlet:namespace />allRowIds');
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />deleteCategories',
+		function() {
+			if (<%= TrashUtil.isTrashEnabled(scopeGroupId) %> || confirm('<%= UnicodeLanguageUtil.get(pageContext, TrashUtil.isTrashEnabled(scopeGroupId) ? "are-you-sure-you-want-to-move-the-selected-entries-to-the-recycle-bin" : "are-you-sure-you-want-to-delete-the-selected-entries") %>')) {
+				document.<portlet:namespace />fm.method = "post";
+				document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= TrashUtil.isTrashEnabled(scopeGroupId) ? Constants.MOVE_TO_TRASH : Constants.DELETE %>";
+				document.<portlet:namespace />fm.<portlet:namespace />deleteCategoryIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+				submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/message_boards_admin/edit_category" /></portlet:actionURL>");
+			}
+		},
+		['liferay-util-list-fields']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />deleteThreads',
+		function() {
+			if (<%= TrashUtil.isTrashEnabled(scopeGroupId) %> || confirm('<%= UnicodeLanguageUtil.get(pageContext, TrashUtil.isTrashEnabled(scopeGroupId) ? "are-you-sure-you-want-to-move-the-selected-entries-to-the-recycle-bin" : "are-you-sure-you-want-to-delete-the-selected-entries") %>')) {
+				document.<portlet:namespace />fm1.method = "post";
+				document.<portlet:namespace />fm1.<portlet:namespace /><%= Constants.CMD %>.value = "<%= TrashUtil.isTrashEnabled(scopeGroupId) ? Constants.MOVE_TO_TRASH : Constants.DELETE %>";
+				document.<portlet:namespace />fm1.<portlet:namespace />threadIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm1, '<portlet:namespace />allRowIds');
+
+				submitForm(document.<portlet:namespace />fm1, "<portlet:actionURL><portlet:param name="struts_action" value="/message_boards_admin/delete_thread" /></portlet:actionURL>");
+			}
+		},
+		['liferay-util-list-fields']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />lockThreads',
+		function() {
+			document.<portlet:namespace />fm1.method = "post";
+			document.<portlet:namespace />fm1.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.LOCK %>";
+			document.<portlet:namespace />fm1.<portlet:namespace />threadIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm1, '<portlet:namespace />allRowIds');
+
+			submitForm(document.<portlet:namespace />fm1, "<portlet:actionURL><portlet:param name="struts_action" value="/message_boards_admin/edit_message" /></portlet:actionURL>");
+		},
+		['liferay-util-list-fields']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />unlockThreads',
+		function() {
+			document.<portlet:namespace />fm1.method = "post";
+			document.<portlet:namespace />fm1.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.UNLOCK %>";
+			document.<portlet:namespace />fm1.<portlet:namespace />threadIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm1, '<portlet:namespace />allRowIds');
+
+			submitForm(document.<portlet:namespace />fm1, "<portlet:actionURL><portlet:param name="struts_action" value="/message_boards_admin/edit_message" /></portlet:actionURL>");
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.message_boards.view_jsp");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/action/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/action/init.jsp
new file mode 100644
index 0000000..8ee5465
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/action/init.jsp
@@ -0,0 +1,30 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/mobile_device_rules/init.jsp" %>
+
+<%
+MDRAction action = (MDRAction)request.getAttribute(WebKeys.MOBILE_DEVICE_RULES_RULE_GROUP_ACTION);
+
+UnicodeProperties typeSettingsProperties = null;
+
+if (action != null) {
+	typeSettingsProperties = action.getTypeSettingsProperties();
+}
+else {
+	typeSettingsProperties = new UnicodeProperties();
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/action/layout_tpl.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/action/layout_tpl.jsp
new file mode 100644
index 0000000..8047b89
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/action/layout_tpl.jsp
@@ -0,0 +1,35 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/mobile_device_rules/action/init.jsp" %>
+
+<%
+String layoutTemplateId = GetterUtil.getString(typeSettingsProperties.getProperty("layoutTemplateId"));
+
+if (Validator.isNull(layoutTemplateId)) {
+	layoutTemplateId = PropsValues.DEFAULT_LAYOUT_TEMPLATE_ID;
+}
+
+String layoutTemplateIdPrefix = StringPool.BLANK;
+
+List<LayoutTemplate> layoutTemplates = LayoutTemplateLocalServiceUtil.getLayoutTemplates();
+%>
+
+<liferay-ui:error-marker key="errorSection" value="layout" />
+
+<h5><%= LanguageUtil.get(pageContext, "layout-template") %></h5>
+
+<%@ include file="/html/portlet/layouts_admin/layout/layout_templates_list.jspf" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/action/simple_url.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/action/simple_url.jsp
new file mode 100644
index 0000000..c2cde6d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/action/simple_url.jsp
@@ -0,0 +1,45 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/mobile_device_rules/action/init.jsp" %>
+
+<%
+String url = GetterUtil.getString(typeSettingsProperties.get("url"));
+boolean ajax = GetterUtil.getBoolean(request.getParameter("ajax"));
+%>
+
+<aui:input cssClass="lfr-input-text-container" name="url" type="text" value="<%= url %>">
+	<aui:validator name="required" />
+</aui:input>
+
+<c:if test="<%= ajax %>">
+	<aui:script use="liferay-form">
+		var form = Liferay.Form.get('<portlet:namespace />fm');
+
+		if (form) {
+			var rules = form.formValidator.get('rules');
+
+			var fieldName = '<portlet:namespace />url';
+
+			if (!(fieldName in rules)) {
+				rules[fieldName] = {
+					custom: false,
+					required: true
+				};
+			}
+		}
+	</aui:script>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/action/site_url.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/action/site_url.jsp
new file mode 100644
index 0000000..3d48a10
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/action/site_url.jsp
@@ -0,0 +1,48 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/mobile_device_rules/action/init.jsp" %>
+
+<%
+long actionGroupId = GetterUtil.getLong(typeSettingsProperties.getProperty("groupId"));
+%>
+
+<aui:select label="site" name="groupId" onChange='<%= liferayPortletResponse.getNamespace() + "changeDisplay();" %>' required="<%= true %>">
+	<aui:option disabled="<%= true %>" label="select-a-site" selected="<%= actionGroupId == 0 %>" value="" />
+
+	<%
+	int count = 0;
+
+	for (Group group : GroupServiceUtil.getUserSitesGroups()) {
+		if (!group.isUser() && !group.isControlPanel()) {
+			count++;
+	%>
+
+			<aui:option label="<%= group.getName() %>" selected="<%= group.getGroupId() == actionGroupId %>" value="<%= group.getGroupId() %>" />
+
+	<%
+		}
+	}
+	%>
+
+	<c:if test="<%= count == 0 %>">
+		<aui:option disabled="<%= true %>" label="no-available-sites" value="0" />
+	</c:if>
+</aui:select>
+
+<div id="<portlet:namespace />layouts">
+	<liferay-util:include page="/html/portlet/mobile_device_rules/action/site_url_layouts.jsp" />
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/action/site_url_layouts.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/action/site_url_layouts.jsp
new file mode 100644
index 0000000..d1c22c0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/action/site_url_layouts.jsp
@@ -0,0 +1,85 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/mobile_device_rules/action/init.jsp" %>
+
+<%
+long actionGroupId = 0;
+
+if (action != null) {
+	actionGroupId = GetterUtil.getLong(typeSettingsProperties.getProperty("groupId"));
+}
+else {
+	actionGroupId = ParamUtil.getLong(request, "actionGroupId");
+}
+
+long actionPlid = 0;
+
+if (action != null) {
+	actionPlid = GetterUtil.getLong(typeSettingsProperties.getProperty("plid"));
+}
+else {
+	actionPlid = ParamUtil.getLong(request, "actionPlid");
+}
+%>
+
+<aui:input name="actionPlid" type="hidden" value="<%= actionPlid %>" />
+
+<aui:select label="page" name="plid" required="<%= true %>">
+	<aui:option disabled="<%= true %>" label="select-a-page" selected="<%= actionPlid == 0 %>" value="" />
+
+	<%
+	List<Layout> publicLayouts = LayoutServiceUtil.getLayouts(actionGroupId, false);
+	%>
+
+	<c:if test="<%= !publicLayouts.isEmpty() %>">
+		<aui:option disabled="<%= true %>" label="public-pages" value="0" />
+
+		<%
+		for (Layout publicLayout : publicLayouts) {
+		%>
+
+			<aui:option label="<%= publicLayout.getName(locale) %>" selected="<%= publicLayout.getPlid() == actionPlid %>" value="<%= publicLayout.getPlid() %>" />
+
+		<%
+		}
+		%>
+
+	</c:if>
+
+	<%
+	List<Layout> privateLayouts = LayoutServiceUtil.getLayouts(actionGroupId, true);
+	%>
+
+	<c:if test="<%= !privateLayouts.isEmpty() %>">
+		<aui:option disabled="<%= true %>" label="private-pages" value="0" />
+
+		<%
+		for (Layout privateLayout : privateLayouts) {
+		%>
+
+			<aui:option label="<%= privateLayout.getName(locale) %>" selected="<%= privateLayout.getPlid() == actionPlid %>" value="<%= privateLayout.getPlid() %>" />
+
+		<%
+		}
+		%>
+
+	</c:if>
+
+	<c:if test="<%= publicLayouts.isEmpty() && privateLayouts.isEmpty() %>">
+		<aui:option disabled="<%= true %>" label="no-available-pages" value="0" />
+	</c:if>
+</aui:select>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/action/theme.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/action/theme.jsp
new file mode 100644
index 0000000..c705f13
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/action/theme.jsp
@@ -0,0 +1,164 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/mobile_device_rules/action/init.jsp" %>
+
+<%
+String selThemeId = GetterUtil.getString(typeSettingsProperties.get("themeId"));
+String selColorSchemeId = GetterUtil.getString(typeSettingsProperties.get("colorSchemeId"));
+
+if (Validator.isNull(selThemeId)) {
+	String className = BeanParamUtil.getString(action, request, "className");
+	long classPK = BeanParamUtil.getLong(action, request, "classPK");
+
+	if (className.equals(Layout.class.getName())) {
+		Layout selLayout = LayoutLocalServiceUtil.getLayout(classPK);
+
+		groupId = selLayout.getGroupId();
+
+		selThemeId = selLayout.getThemeId();
+		selColorSchemeId = selLayout.getColorSchemeId();
+	}
+	else if (className.equals(LayoutSet.class.getName())) {
+		LayoutSet selLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(classPK);
+
+		groupId = selLayoutSet.getGroupId();
+
+		selThemeId = selLayoutSet.getThemeId();
+		selColorSchemeId = selLayoutSet.getColorSchemeId();
+	}
+}
+
+Theme selTheme = ThemeLocalServiceUtil.getTheme(company.getCompanyId(), selThemeId, false);
+ColorScheme selColorScheme = ThemeLocalServiceUtil.getColorScheme(company.getCompanyId(), selThemeId, selColorSchemeId, false);
+%>
+
+<div class="lfr-theme-list">
+	<div class="float-container lfr-current-theme">
+		<h3><liferay-ui:message key="current-theme" /></h3>
+
+		<div class="lfr-current-theme-body">
+			<img alt="<%= selTheme.getName() %>" class="img-polaroid theme-screenshot" onclick="document.getElementById('<portlet:namespace />SelTheme').checked = true;" src="<%= selTheme.getStaticResourcePath() %><%= selTheme.getImagesPath() %>/thumbnail.png" title="<%= selTheme.getName() %>" />
+
+			<div class="theme-details">
+				<aui:input checked="<%= true %>" cssClass="selected-theme theme-title" id="SelTheme" label="<%= selTheme.getName() %>" name="themeId" type="radio" value="<%= selTheme.getThemeId() %>" />
+
+				<dl class="theme-fields">
+
+					<%
+					PluginPackage selPluginPackage = selTheme.getPluginPackage();
+					%>
+
+					<c:if test="<%= (selPluginPackage != null) && Validator.isNotNull(selPluginPackage.getShortDescription()) %>">
+						<dt>
+							<liferay-ui:message key="description" />
+						</dt>
+						<dd>
+							<%= selPluginPackage.getShortDescription() %>
+						</dd>
+					</c:if>
+
+					<c:if test="<%= (selPluginPackage != null) && Validator.isNotNull(selPluginPackage.getAuthor()) %>">
+						<dt>
+							<liferay-ui:message key="author" />
+						</dt>
+						<dd>
+							<a href="<%= selPluginPackage.getPageURL() %>"><%= selPluginPackage.getAuthor() %></a>
+						</dd>
+					</c:if>
+				</dl>
+			</div>
+		</div>
+
+		<%
+		List<ColorScheme> colorSchemes = selTheme.getColorSchemes();
+		%>
+
+		<c:if test="<%= !colorSchemes.isEmpty() %>">
+			<liferay-ui:panel-container extended="<%= true %>" id="mobileDeviceRulesColorSchemesPanelContainer" persistState="<%= true %>">
+				<c:if test="<%= !colorSchemes.isEmpty() %>">
+					<liferay-ui:panel collapsible="<%= true %>" extended="<%= false %>" id="mobileDeviceRulesColorSchemesPanel" persistState="<%= true %>" title='<%= LanguageUtil.format(pageContext, "color-schemes-x", colorSchemes.size()) %>'>
+						<aui:fieldset cssClass="color-schemes">
+							<div class="lfr-theme-list unstyled">
+
+								<%
+								for (int i = 0; i < colorSchemes.size(); i++) {
+									ColorScheme curColorScheme = colorSchemes.get(i);
+
+									String cssClass = StringPool.BLANK;
+
+									if (selColorScheme.getColorSchemeId().equals(curColorScheme.getColorSchemeId())) {
+										cssClass = "selected-color-scheme";
+									}
+								%>
+
+								<div class="<%= cssClass %> theme-entry">
+									<img alt="" class="modify-link theme-thumbnail" onclick="document.getElementById('<portlet:namespace />ColorSchemeId<%= i %>').checked = true;" src="<%= selTheme.getStaticResourcePath() %><%= curColorScheme.getColorSchemeThumbnailPath() %>/thumbnail.png" title="<%= curColorScheme.getName() %>" />
+
+									<aui:input checked="<%= selColorScheme.getColorSchemeId().equals(curColorScheme.getColorSchemeId()) %>" cssClass="theme-title" id='<%= "ColorSchemeId" + i %>' label="<%= curColorScheme.getName() %>" name="colorSchemeId" type="radio" value="<%= curColorScheme.getColorSchemeId() %>" />
+								</div>
+
+								<%
+								}
+								%>
+
+							</div>
+						</aui:fieldset>
+					</liferay-ui:panel>
+				</c:if>
+			</liferay-ui:panel-container>
+		</c:if>
+	</div>
+
+	<div class="float-container lfr-available-themes">
+		<h3>
+			<span class="header-title">
+
+				<%
+				List<Theme> themes = ThemeLocalServiceUtil.getThemes(company.getCompanyId(), groupId, user.getUserId(), false);
+				%>
+
+				<%= LanguageUtil.format(pageContext, "available-themes-x", (themes.size() - 1)) %>
+			</span>
+		</h3>
+
+		<c:if test="<%= themes.size() > 1 %>">
+			<ul class="lfr-theme-list unstyled">
+
+				<%
+				for (int i = 0; i < themes.size(); i++) {
+					Theme curTheme = themes.get(i);
+
+					if (!selTheme.getThemeId().equals(curTheme.getThemeId())) {
+				%>
+
+						<li>
+							<div class="theme-entry">
+								<img alt="" class="modify-link theme-thumbnail" onclick="document.getElementById('<portlet:namespace />ThemeId<%= i %>').checked = true;" src="<%= curTheme.getStaticResourcePath() %><%= curTheme.getImagesPath() %>/thumbnail.png" title="<%= curTheme.getName() %>" />
+
+								<aui:input cssClass="theme-title" id='<%= "ThemeId" + i %>' label="<%= curTheme.getName() %>" name="themeId" type="radio" value="<%= curTheme.getThemeId() %>" />
+							</div>
+						</li>
+
+				<%
+					}
+				}
+				%>
+
+			</ul>
+		</c:if>
+	</div>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/action_actions.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/action_actions.jsp
new file mode 100644
index 0000000..6802326
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/action_actions.jsp
@@ -0,0 +1,48 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/mobile_device_rules/init.jsp" %>
+
+<%
+SearchContainer searchContainer = (SearchContainer)request.getAttribute("liferay-ui:search:searchContainer");
+
+String redirect = searchContainer.getIteratorURL().toString();
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+MDRAction action = (MDRAction)row.getObject();
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= MDRRuleGroupInstancePermissionUtil.contains(permissionChecker, action.getRuleGroupInstanceId(), ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editActionURL">
+			<portlet:param name="struts_action" value="/mobile_device_rules/edit_action" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="actionId" value="<%= String.valueOf(action.getActionId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon image="edit" url="<%= editActionURL %>" />
+
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/mobile_device_rules/edit_action" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="actionId" value="<%= String.valueOf(action.getActionId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete url="<%= deleteURL.toString() %>" />
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/action_columns.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/action_columns.jspf
new file mode 100644
index 0000000..3092883
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/action_columns.jspf
@@ -0,0 +1,55 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+Group group = GroupLocalServiceUtil.getGroup(action.getGroupId());
+%>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="scope"
+	value="<%= LanguageUtil.get(pageContext, group.getScopeLabel(themeDisplay)) %>"
+/>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="name"
+	value="<%= action.getName(locale) %>"
+/>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="description"
+	value="<%= action.getDescription(locale) %>"
+/>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="type"
+	translate="<%= true %>"
+	value="<%= action.getType() %>"
+/>
+
+<liferay-ui:search-container-column-date
+	href="<%= rowURL %>"
+	name="modified-date"
+	value="<%= action.getModifiedDate() %>"
+/>
+
+<liferay-ui:search-container-column-jsp
+	align="right"
+	path="/html/portlet/mobile_device_rules/action_actions.jsp"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/css/.sass-cache/main.css
new file mode 100644
index 0000000..6f29316
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/css/.sass-cache/main.css
@@ -0,0 +1,107 @@
+.lfr-theme-list h3 {
+  background: #D3DADD;
+  padding: 0.5em; }
+.lfr-theme-list li {
+  float: left;
+  margin: 0 1.3em 1.3em 0;
+  text-align: center; }
+
+.theme-title .field-content {
+  margin: 0; }
+
+.lfr-current-theme {
+  background: #F0F5F7;
+  border: 1px solid #828F95;
+  margin-bottom: 1em;
+  padding: 3px 3px 1em; }
+  .lfr-current-theme h3 {
+    margin: 0 0 0.5em; }
+  .lfr-current-theme .selected-theme {
+    border-bottom: 1px solid #CCC;
+    font-size: 1.5em; }
+    .lfr-current-theme .selected-theme .field-content {
+      display: inline-block; }
+  .lfr-current-theme .theme-details {
+    padding: 0 2px 0 170px; }
+  .lfr-current-theme .theme-fields {
+    margin-left: 0.5em; }
+  .lfr-current-theme .theme-screenshot {
+    border: 1px solid #CCC;
+    float: left;
+    height: 120px;
+    margin: 0 0.5em;
+    width: 150px; }
+
+.theme-entry {
+  cursor: pointer;
+  float: left;
+  height: 96px;
+  margin: 2px;
+  padding: 0.3em;
+  text-align: center;
+  text-decoration: none; }
+  .theme-entry:hover, .theme-entry:hover label {
+    color: #369; }
+  .theme-entry:hover .theme-thumbnail {
+    border-color: #369; }
+
+.theme-thumbnail {
+  border: 1px solid #CCC;
+  height: 68px;
+  width: 85px; }
+
+.lfr-available-themes h3 {
+  margin: 0;
+  overflow: hidden; }
+.lfr-available-themes .lfr-theme-list {
+  margin-top: 0.7em; }
+.lfr-available-themes .install-themes {
+  float: right;
+  font-size: 11px; }
+
+.lfr-theme-list .theme-details dd {
+  margin: 0; }
+
+.theme-details dl {
+  margin-bottom: 1em; }
+.theme-details dt {
+  font-weight: bold;
+  margin-top: 1em; }
+
+.color-schemes {
+  clear: both; }
+  .color-schemes .lfr-panel-content {
+    overflow: hidden; }
+
+.selected-color-scheme img {
+  border: 3px solid #369; }
+
+.rule-group-instance-container .rule-group-instance {
+  border-bottom: 1px solid #D7D7D7;
+  cursor: move;
+  display: block;
+  margin: 3px 0;
+  padding: 10px; }
+  .rule-group-instance-container .rule-group-instance .rule-group-instance-handle {
+    float: left; }
+  .rule-group-instance-container .rule-group-instance .rule-group-instance-priority {
+    float: right; }
+.rule-group-instance-container .rule-group-instance:hover {
+  background-color: #F5F8FB; }
+
+.rule-group-instance-container.yui3-dd-drop-active-valid .rule-group-instance-priority {
+  display: none; }
+
+.rule-group-instance-dragging {
+  background-color: #F5F8FB;
+  height: 18px !important;
+  width: 402px !important; }
+  .rule-group-instance-dragging .rule-group-instance-priority {
+    display: block !important; }
+
+.rule-group-instance-dragging:hover {
+  background-color: #F5F8FB; }
+
+.screen-physical-size-field, screen-resolution-field {
+  width: 50px; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/css/main.css
new file mode 100644
index 0000000..bfd6805
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/css/main.css
@@ -0,0 +1,167 @@
+.lfr-theme-list {
+	h3 {
+		background: #D3DADD;
+		padding: 0.5em;
+	}
+
+	li {
+		float: left;
+		margin: 0 1.3em 1.3em 0;
+		text-align: center;
+	}
+}
+
+.theme-title {
+	.field-content {
+		margin: 0;
+	}
+}
+
+.lfr-current-theme {
+	background: #F0F5F7;
+	border: 1px solid #828F95;
+	margin-bottom: 1em;
+	padding: 3px 3px 1em;
+
+	h3 {
+		margin: 0 0 0.5em;
+	}
+
+	.selected-theme {
+		border-bottom: 1px solid #CCC;
+		font-size: 1.5em;
+
+		.field-content {
+			display: inline-block;
+		}
+	}
+
+	.theme-details {
+		padding: 0 2px 0 170px;
+	}
+
+	.theme-fields {
+		margin-left: 0.5em;
+	}
+
+	.theme-screenshot {
+		border: 1px solid #CCC;
+		float: left;
+		height: 120px;
+		margin: 0 0.5em;
+		width: 150px;
+	}
+}
+
+.theme-entry {
+	cursor: pointer;
+	float: left;
+	height: 96px;
+	margin: 2px;
+	padding: 0.3em;
+	text-align: center;
+	text-decoration: none;
+
+	&:hover {
+		&, & label {
+			color: #369;
+		}
+
+		.theme-thumbnail {
+			border-color: #369;
+		}
+	}
+}
+
+.theme-thumbnail {
+	border: 1px solid #CCC;
+	height: 68px;
+	width: 85px;
+}
+
+.lfr-available-themes {
+	h3 {
+		margin: 0;
+		overflow: hidden;
+	}
+
+	.lfr-theme-list {
+		margin-top: 0.7em;
+	}
+
+	.install-themes {
+		float: right;
+		font-size: 11px;
+	}
+}
+
+.lfr-theme-list .theme-details dd {
+	margin: 0;
+}
+
+.theme-details {
+	dl {
+		margin-bottom: 1em;
+	}
+
+	dt {
+		font-weight: bold;
+		margin-top: 1em;
+	}
+}
+
+.color-schemes {
+	clear: both;
+
+	.lfr-panel-content {
+		overflow: hidden;
+	}
+}
+
+.selected-color-scheme img {
+	border: 3px solid #369;
+}
+
+.rule-group-instance-container {
+	.rule-group-instance {
+		border-bottom: 1px solid #D7D7D7;
+		cursor: move;
+		display: block;
+		margin: 3px 0;
+		padding: 10px;
+
+		.rule-group-instance-handle {
+			float: left;
+		}
+
+		.rule-group-instance-priority {
+			float: right;
+		}
+	}
+
+	.rule-group-instance:hover {
+		background-color: #F5F8FB;
+	}
+}
+
+.rule-group-instance-container.yui3-dd-drop-active-valid .rule-group-instance-priority {
+	display: none;
+}
+
+.rule-group-instance-dragging {
+	background-color: #F5F8FB;
+	height: 18px !important;
+	width: 402px !important;
+
+	.rule-group-instance-priority {
+		display: block !important;
+	}
+}
+
+.rule-group-instance-dragging:hover {
+	background-color: #F5F8FB;
+}
+
+.screen-physical-size-field, screen-resolution-field {
+	width: 50px;
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/edit_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/edit_action.jsp
new file mode 100644
index 0000000..66a4bf7
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/edit_action.jsp
@@ -0,0 +1,179 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/mobile_device_rules/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+MDRAction action = (MDRAction)renderRequest.getAttribute(WebKeys.MOBILE_DEVICE_RULES_RULE_GROUP_ACTION);
+
+long actionId = BeanParamUtil.getLong(action, request, "actionId");
+
+String editorJSP = (String)renderRequest.getAttribute(WebKeys.MOBILE_DEVICE_RULES_RULE_GROUP_ACTION_EDITOR_JSP);
+String type = (String)renderRequest.getAttribute(WebKeys.MOBILE_DEVICE_RULES_RULE_GROUP_ACTION_TYPE);
+
+MDRRuleGroupInstance ruleGroupInstance = (MDRRuleGroupInstance)renderRequest.getAttribute(WebKeys.MOBILE_DEVICE_RULES_RULE_GROUP_INSTANCE);
+MDRRuleGroup ruleGroup = (MDRRuleGroup)renderRequest.getAttribute(WebKeys.MOBILE_DEVICE_RULES_RULE_GROUP);
+
+String title = null;
+
+if (action == null) {
+	title = LanguageUtil.format(pageContext, "new-action-for-x", ruleGroup.getName(locale), false);
+}
+else {
+	StringBundler sb = new StringBundler(5);
+
+	sb.append(action.getName(locale));
+	sb.append(StringPool.SPACE);
+	sb.append(StringPool.OPEN_PARENTHESIS);
+	sb.append(ruleGroup.getName(locale));
+	sb.append(StringPool.CLOSE_PARENTHESIS);
+
+	title = sb.toString();
+}
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	localizeTitle="<%= (action == null) %>"
+	title="<%= title %>"
+/>
+
+<c:if test="<%= action == null %>">
+	<div class="alert alert-info">
+		<liferay-ui:message key="action-help" />
+	</div>
+</c:if>
+
+<portlet:actionURL var="editActionURL">
+	<portlet:param name="struts_action" value="/mobile_device_rules/edit_action" />
+</portlet:actionURL>
+
+<aui:form action="<%= editActionURL %>" enctype="multipart/form-data" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= (action == null) ? Constants.ADD : Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="actionId" type="hidden" value="<%= actionId %>" />
+	<aui:input name="ruleGroupInstanceId" type="hidden" value="<%= ruleGroupInstance.getRuleGroupInstanceId() %>" />
+
+	<liferay-ui:error exception="<%= ActionTypeException.class %>" message="please-select-a-valid-action-type" />
+	<liferay-ui:error exception="<%= NoSuchActionException.class %>" message="action-does-not-exist" />
+	<liferay-ui:error exception="<%= NoSuchRuleGroupException.class %>" message="device-family-does-not-exist" />
+	<liferay-ui:error exception="<%= NoSuchRuleGroupInstanceException.class %>" message="device-rule-does-not-exist" />
+
+	<aui:model-context bean="<%= action %>" model="<%= MDRAction.class %>" />
+
+	<aui:fieldset>
+		<aui:input name="name" />
+
+		<aui:input name="description" />
+
+		<aui:select changesContext="<%= true %>" name="type" onChange='<%= renderResponse.getNamespace() + "changeType();" %>' required="<%= true %>" showEmptyOption="<%= true %>">
+
+			<%
+			for (ActionHandler actionHandler : ActionHandlerManagerUtil.getActionHandlers()) {
+			%>
+
+				<aui:option label="<%= actionHandler.getType() %>" selected="<%= type.equals(actionHandler.getType()) %>" />
+
+			<%
+			}
+			%>
+
+		</aui:select>
+
+		<div id="<%= renderResponse.getNamespace() %>typeSettings">
+			<c:if test="<%= Validator.isNotNull(editorJSP) %>">
+				<liferay-util:include page="<%= editorJSP %>" />
+			</c:if>
+		</div>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+
+		<aui:button href="<%= redirect %>" value="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />changeDisplay',
+		function() {
+			var A = AUI();
+
+			A.io.request(
+				<portlet:resourceURL var="siteURLLayoutsURL">
+					<portlet:param name="struts_action" value="/mobile_device_rules/site_url_layouts" />
+				</portlet:resourceURL>
+
+				'<%= siteURLLayoutsURL.toString() %>',
+				{
+					data: {
+						<portlet:namespace />actionGroupId: document.<portlet:namespace />fm.<portlet:namespace />groupId.value,
+						<portlet:namespace />actionPlid: document.<portlet:namespace />fm.<portlet:namespace />actionPlid.value
+					},
+					on: {
+						success: function(id, obj) {
+							var layouts = A.one('#<portlet:namespace />layouts');
+
+							if (layouts) {
+								layouts.html(this.get('responseData'));
+							}
+						}
+					}
+				}
+			);
+		},
+		['aui-io']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />changeType',
+		function() {
+			var A = AUI();
+
+			A.io.request(
+				<liferay-portlet:resourceURL copyCurrentRenderParameters="<%= false %>" var="editorURL">
+					<portlet:param name="struts_action" value="/mobile_device_rules/edit_action_editor" />
+					<portlet:param name="ajax" value="true" />
+				</liferay-portlet:resourceURL>
+
+				'<%= editorURL.toString() %>',
+				{
+					data: {
+						<portlet:namespace />type: document.<portlet:namespace />fm.<portlet:namespace />type.value,
+						<portlet:namespace /><%= "actionId" %>: <%= actionId %>
+					},
+					on: {
+						success: function(id, obj) {
+							var typeSettings = A.one('#<portlet:namespace />typeSettings');
+
+							if (typeSettings) {
+								typeSettings.plug(A.Plugin.ParseContent);
+
+								typeSettings.setContent(this.get('responseData'));
+							}
+						}
+					}
+				}
+			);
+		},
+		['aui-io', 'aui-parse-content']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/edit_rule.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/edit_rule.jsp
new file mode 100644
index 0000000..66bca27
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/edit_rule.jsp
@@ -0,0 +1,166 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/mobile_device_rules/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+String backURL = ParamUtil.getString(request, "backURL");
+
+MDRRule rule = (MDRRule)renderRequest.getAttribute(WebKeys.MOBILE_DEVICE_RULES_RULE);
+
+long ruleId = BeanParamUtil.getLong(rule, request, "ruleId");
+
+String type = (String)renderRequest.getAttribute(WebKeys.MOBILE_DEVICE_RULES_RULE_TYPE);
+String editorJSP = (String)renderRequest.getAttribute(WebKeys.MOBILE_DEVICE_RULES_RULE_EDITOR_JSP);
+
+MDRRuleGroup ruleGroup = (MDRRuleGroup)renderRequest.getAttribute(WebKeys.MOBILE_DEVICE_RULES_RULE_GROUP);
+
+long ruleGroupId = BeanParamUtil.getLong(ruleGroup, request, "ruleGroupId");
+
+String title = StringPool.BLANK;
+
+if (ruleGroup != null) {
+	title = LanguageUtil.format(pageContext, "new-classification-rule-for-x", ruleGroup.getName(locale), false);
+
+	if (rule != null) {
+		title = rule.getName(locale) + " (" + ruleGroup.getName(locale) + ")";
+	}
+}
+
+Collection<String> ruleHandlerTypes = RuleGroupProcessorUtil.getRuleHandlerTypes();
+%>
+
+<liferay-ui:header
+	backURL="<%= backURL %>"
+	localizeTitle="<%= false %>"
+	title="<%= title %>"
+/>
+
+<c:if test="<%= rule == null %>">
+	<div class="alert alert-info">
+		<liferay-ui:message key="classification-rule-help" />
+	</div>
+</c:if>
+
+<portlet:actionURL var="editRuleURL">
+	<portlet:param name="struts_action" value="/mobile_device_rules/edit_rule" />
+</portlet:actionURL>
+
+<aui:form action="<%= editRuleURL %>" enctype="multipart/form-data" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= (rule == null) ? Constants.ADD : Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="ruleGroupId" type="hidden" value="<%= ruleGroupId %>" />
+	<aui:input name="ruleId" type="hidden" value="<%= ruleId %>" />
+
+	<liferay-ui:error exception="<%= NoSuchRuleException.class %>" message="rule-does-not-exist" />
+	<liferay-ui:error exception="<%= NoSuchRuleGroupException.class %>" message="device-family-does-not-exist" />
+	<liferay-ui:error exception="<%= UnknownRuleHandlerException.class %>" message="please-select-a-rule-type" />
+
+	<aui:model-context bean="<%= rule %>" model="<%= MDRRule.class %>" />
+
+	<c:if test='<%= !PluginPackageUtil.isInstalled("wurfl-web") %>'>
+		<div class="alert alert-block">
+			<liferay-ui:message key="there-is-no-device-recognition-provider-installed" />
+		</div>
+	</c:if>
+
+	<aui:fieldset>
+		<aui:input name="name" />
+
+		<aui:input name="description" />
+
+		<c:choose>
+			<c:when test="<%= ruleHandlerTypes.size() == 1 %>">
+
+				<%
+				String ruleHandlerType = ruleHandlerTypes.iterator().next();
+				%>
+
+				<aui:input name="type" type="hidden" value="<%= ruleHandlerType %>" />
+
+			</c:when>
+			<c:otherwise>
+				<aui:select changesContext="<%= true %>" name="type" showEmptyOption="<%= true %>">
+
+					<%
+					for (String ruleHandlerType : ruleHandlerTypes) {
+					%>
+
+						<aui:option label="<%= ruleHandlerType %>" selected="<%= type.equals(ruleHandlerType) %>" />
+
+					<%
+					}
+					%>
+
+				</aui:select>
+			</c:otherwise>
+		</c:choose>
+
+		<div id="<%= renderResponse.getNamespace() %>typeSettings">
+			<c:if test="<%= Validator.isNotNull(editorJSP) %>">
+				<liferay-util:include page="<%= editorJSP %>" />
+			</c:if>
+		</div>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+		<aui:button href="<%= redirect %>" value="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script use="aui-io">
+	var typeNode = A.one('#<portlet:namespace />type');
+	var typeSettings = A.one('#<portlet:namespace />typeSettings');
+
+	var loadTypeFields = function() {
+		A.io.request(
+			<portlet:resourceURL var="editorURL">
+				<portlet:param name="struts_action" value="/mobile_device_rules/edit_rule_editor" />
+			</portlet:resourceURL>
+
+			'<%= editorURL.toString() %>',
+			{
+				data: {
+					<portlet:namespace />ruleId: <%= ruleId %>,
+					<portlet:namespace />type: typeNode.val(),
+				},
+				on: {
+					success: function(event, id, obj) {
+						var response = this.get('responseData');
+
+						if (typeSettings) {
+							typeSettings.html(response);
+						}
+					}
+				}
+			}
+		);
+	}
+
+	<c:choose>
+		<c:when test="<%= ruleHandlerTypes.size() == 1 %>">
+			loadTypeFields();
+		</c:when>
+		<c:otherwise>
+			typeNode.on(
+				'change',
+				loadTypeFields
+			);
+		</c:otherwise>
+	</c:choose>
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/edit_rule_group.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/edit_rule_group.jsp
new file mode 100644
index 0000000..6ae1575
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/edit_rule_group.jsp
@@ -0,0 +1,89 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/mobile_device_rules/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+String backURL = ParamUtil.getString(request, "backURL");
+
+MDRRuleGroup ruleGroup = (MDRRuleGroup)renderRequest.getAttribute(WebKeys.MOBILE_DEVICE_RULES_RULE_GROUP);
+
+long ruleGroupId = BeanParamUtil.getLong(ruleGroup, request, "ruleGroupId");
+%>
+
+<liferay-ui:header
+	backURL="<%= backURL %>"
+	localizeTitle="<%= (ruleGroup == null) %>"
+	title='<%= (ruleGroup == null) ? "new-device-family" : ruleGroup.getName(locale) %>'
+/>
+
+<c:if test="<%= ruleGroup == null %>">
+	<div class="alert alert-info">
+		<liferay-ui:message key="device-family-help" />
+	</div>
+</c:if>
+
+<portlet:actionURL var="editRuleGroupURL">
+	<portlet:param name="struts_action" value="/mobile_device_rules/edit_rule_group" />
+</portlet:actionURL>
+
+<aui:form action="<%= editRuleGroupURL %>" enctype="multipart/form-data" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= (ruleGroup == null) ? Constants.ADD : Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="backURL" type="hidden" value="<%= backURL %>" />
+	<aui:input name="ruleGroupId" type="hidden" value="<%= ruleGroupId %>" />
+	<aui:input name="groupId" type="hidden" value="<%= groupId %>" />
+
+	<liferay-ui:error exception="<%= NoSuchRuleGroupException.class %>" message="device-family-does-not-exist" />
+
+	<aui:model-context bean="<%= ruleGroup %>" model="<%= MDRRuleGroup.class %>" />
+
+	<aui:fieldset>
+		<aui:input name="name" />
+
+		<aui:input name="description" />
+	</aui:fieldset>
+
+	<c:if test="<%= ruleGroup != null %>">
+		<aui:fieldset>
+			<c:if test="<%= MDRRuleLocalServiceUtil.getRulesCount(ruleGroupId) == 0 %>">
+				<div class="alert alert-info">
+					<liferay-ui:message key="no-classification-rules-are-configured-for-this-device-family" />
+				</div>
+			</c:if>
+
+			<liferay-portlet:renderURL var="editRulesURL">
+				<portlet:param name="struts_action" value="/mobile_device_rules/view_rules" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="ruleGroupId" value="<%= String.valueOf(ruleGroupId) %>" />
+			</liferay-portlet:renderURL>
+
+			<liferay-ui:icon
+				image="manage_nodes"
+				label="<%= true %>"
+				message="manage-classification-rules"
+				url="<%= editRulesURL.toString() %>"
+			/>
+		</aui:fieldset>
+	</c:if>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+
+		<aui:button href="<%= redirect %>" value="cancel" />
+	</aui:button-row>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/edit_rule_group_instance_priorities.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/edit_rule_group_instance_priorities.jsp
new file mode 100644
index 0000000..7318875
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/edit_rule_group_instance_priorities.jsp
@@ -0,0 +1,195 @@
+<%--
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/mobile_device_rules/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+String saveCallback = ParamUtil.getString(request, "saveCallback");
+
+if (Validator.isNotNull(saveCallback)) {
+	saveCallback = "Liferay.Util.getOpener()." + saveCallback + "(Liferay.Util.getWindow());";
+
+	redirect = null;
+}
+
+String className = ParamUtil.getString(request, "className");
+long classPK = ParamUtil.getLong(request, "classPK");
+
+List<MDRRuleGroupInstance> ruleGroupInstances = MDRRuleGroupInstanceServiceUtil.getRuleGroupInstances(className, classPK, QueryUtil.ALL_POS, QueryUtil.ALL_POS, new RuleGroupInstancePriorityComparator());
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	title="manage-rule-priorities"
+/>
+
+<div class="alert alert-info">
+	<liferay-ui:message key="to-manage-priorities,-drag-the-rule-to-the-desired-position" />
+</div>
+
+<div class="separator"><!-- --></div>
+
+<portlet:actionURL var="editRuleGroupInstancesURL">
+	<portlet:param name="struts_action" value="/mobile_device_rules/edit_rule_group_instance" />
+</portlet:actionURL>
+
+<aui:form action="<%= editRuleGroupInstancesURL %>" method="post" name="fm" onSubmit='<%= renderResponse.getNamespace() + "saveRuleGroupInstancesPriorities()" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+	<aui:input name="ruleGroupsInstancesJSON" type="hidden" />
+
+	<div class="rule-group-instance-container" id="<portlet:namespace />ruleGroupInstancesPriorities">
+
+		<%
+		for (int i = 0; i < ruleGroupInstances.size(); i++) {
+			MDRRuleGroupInstance ruleGroupInstance = ruleGroupInstances.get(i);
+
+			MDRRuleGroup ruleGroup = ruleGroupInstance.getRuleGroup();
+		%>
+
+			<div class="rule-group-instance <%= (i == 0) ? "rule-group-instance-first" : StringPool.BLANK %>" data-rule-group-instance-id="<%= ruleGroupInstance.getRuleGroupInstanceId() %>">
+				<span class="rule-group-instance-handle icon icon-grip-dotted-vertical"></span>
+
+				<span class="rule-group-instance-label"><%= ruleGroup.getName(locale) %></span>
+
+				<span class="rule-group-instance-priority">
+					<liferay-ui:message key="priority" />:
+
+					<span class="rule-group-instance-priority-value"><%= ruleGroupInstance.getPriority() %></span>
+				</span>
+			</div>
+
+		<%
+		}
+		%>
+
+	</div>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+
+		<aui:button onClick="<%= saveCallback %>" value="close" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />saveRuleGroupInstancesPriorities',
+		function() {
+			var A = AUI();
+
+			var nodes = A.all('#<portlet:namespace />ruleGroupInstancesPriorities .rule-group-instance');
+
+			var ruleGroupInstances = [];
+
+			nodes.each(
+				function(item, index, collection) {
+					ruleGroupInstances.push(
+						{
+							priority: index,
+							ruleGroupInstanceId: item.getAttribute('data-rule-group-instance-id')
+						}
+					);
+				}
+			);
+
+			var ruleGroupsInstancesJSON = A.one('#<portlet:namespace />ruleGroupsInstancesJSON');
+
+			if (ruleGroupsInstancesJSON) {
+				ruleGroupsInstancesJSON.val(A.JSON.stringify(ruleGroupInstances));
+			}
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['json']
+	);
+</aui:script>
+
+<aui:script use="aui-base,dd-constrain,sortable">
+	var container = A.one('#<portlet:namespace />ruleGroupInstancesPriorities');
+
+	if (container) {
+		var sortable = new A.Sortable(
+			{
+				container: container,
+				handles: ['.rule-group-instance'],
+				nodes: '.rule-group-instance',
+				opacity: '.4',
+				on: {
+					moved: function(event) {
+						var instance = this;
+
+						var delegate = instance.delegate;
+
+						var nodes = container.all('.rule-group-instance');
+
+						var dragNode = event.drag.get('dragNode');
+
+						var priorityNode = dragNode.one('.rule-group-instance-priority-value');
+
+						if (priorityNode) {
+							var currentNode = delegate.get('currentNode');
+
+							priorityNode.html(nodes.indexOf(currentNode));
+						}
+					}
+				}
+			}
+		);
+
+		var sortableDD = sortable.delegate.dd;
+
+		sortableDD.after(
+			{
+				'drag:end': function(event) {
+					var drag = event.target;
+					var dragNode = drag.get('dragNode');
+
+					var nodes = container.all('.rule-group-instance');
+
+					nodes.each(
+						function(item, index, collection) {
+							var priorityNode = item.one('.rule-group-instance-priority-value');
+
+							priorityNode.html(index);
+						}
+					);
+
+					dragNode.removeClass('rule-group-instance-dragging');
+				},
+				'drag:start': function(event) {
+					var drag = event.target;
+					var dragNode = drag.get('dragNode');
+
+					dragNode.addClass('rule-group-instance-dragging');
+				}
+			}
+
+		);
+
+		sortableDD.plug(
+			A.Plugin.DDConstrained,
+			{
+				constrain: container,
+				stickY: true
+			}
+		);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/init.jsp
new file mode 100644
index 0000000..eae0086
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/init.jsp
@@ -0,0 +1,58 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.kernel.mobile.device.DeviceDetectionUtil" %><%@
+page import="com.liferay.portal.kernel.mobile.device.VersionableName" %><%@
+page import="com.liferay.portal.kernel.mobile.device.rulegroup.ActionHandlerManagerUtil" %><%@
+page import="com.liferay.portal.kernel.mobile.device.rulegroup.RuleGroupProcessorUtil" %><%@
+page import="com.liferay.portal.kernel.mobile.device.rulegroup.action.ActionHandler" %><%@
+page import="com.liferay.portal.kernel.mobile.device.rulegroup.rule.UnknownRuleHandlerException" %><%@
+page import="com.liferay.portal.mobile.device.rulegroup.rule.impl.SimpleRuleHandler" %><%@
+page import="com.liferay.portal.plugin.PluginPackageUtil" %><%@
+page import="com.liferay.portlet.mobiledevicerules.ActionTypeException" %><%@
+page import="com.liferay.portlet.mobiledevicerules.NoSuchActionException" %><%@
+page import="com.liferay.portlet.mobiledevicerules.NoSuchRuleException" %><%@
+page import="com.liferay.portlet.mobiledevicerules.NoSuchRuleGroupException" %><%@
+page import="com.liferay.portlet.mobiledevicerules.NoSuchRuleGroupInstanceException" %><%@
+page import="com.liferay.portlet.mobiledevicerules.model.MDRAction" %><%@
+page import="com.liferay.portlet.mobiledevicerules.model.MDRRule" %><%@
+page import="com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup" %><%@
+page import="com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance" %><%@
+page import="com.liferay.portlet.mobiledevicerules.search.RuleGroupChecker" %><%@
+page import="com.liferay.portlet.mobiledevicerules.search.RuleGroupDisplayTerms" %><%@
+page import="com.liferay.portlet.mobiledevicerules.search.RuleGroupSearch" %><%@
+page import="com.liferay.portlet.mobiledevicerules.search.RuleGroupSearchTerms" %><%@
+page import="com.liferay.portlet.mobiledevicerules.service.MDRActionLocalServiceUtil" %><%@
+page import="com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceLocalServiceUtil" %><%@
+page import="com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceServiceUtil" %><%@
+page import="com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupLocalServiceUtil" %><%@
+page import="com.liferay.portlet.mobiledevicerules.service.MDRRuleLocalServiceUtil" %><%@
+page import="com.liferay.portlet.mobiledevicerules.service.permission.MDRPermissionUtil" %><%@
+page import="com.liferay.portlet.mobiledevicerules.service.permission.MDRRuleGroupInstancePermissionUtil" %><%@
+page import="com.liferay.portlet.mobiledevicerules.service.permission.MDRRuleGroupPermissionUtil" %><%@
+page import="com.liferay.portlet.mobiledevicerules.util.RuleGroupInstancePriorityComparator" %>
+
+<%
+long groupId = ParamUtil.getLong(request, "groupId");
+
+if (groupId == 0) {
+	groupId = themeDisplay.getSiteGroupId();
+}
+%>
+
+<%@ include file="/html/portlet/mobile_device_rules/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/rule/simple_rule.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/rule/simple_rule.jsp
new file mode 100644
index 0000000..f26ff5a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/rule/simple_rule.jsp
@@ -0,0 +1,192 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/mobile_device_rules/init.jsp" %>
+
+<%
+MDRRule rule = (MDRRule)request.getAttribute(WebKeys.MOBILE_DEVICE_RULES_RULE);
+
+Set<String> operatingSystems = Collections.emptySet();
+int tablet = 0;
+
+String screenPhysicalHeightMax = StringPool.BLANK;
+String screenPhysicalHeightMin = StringPool.BLANK;
+String screenPhysicalWidthMax = StringPool.BLANK;
+String screenPhysicalWidthMin = StringPool.BLANK;
+
+String screenResolutionHeightMax = StringPool.BLANK;
+String screenResolutionHeightMin = StringPool.BLANK;
+String screenResolutionWidthMax = StringPool.BLANK;
+String screenResolutionWidthMin = StringPool.BLANK;
+
+if (rule != null) {
+	UnicodeProperties typeSettingsProperties = rule.getTypeSettingsProperties();
+
+	operatingSystems = SetUtil.fromArray(StringUtil.split(typeSettingsProperties.get(SimpleRuleHandler.PROPERTY_OS)));
+
+	String tabletString = GetterUtil.getString(typeSettingsProperties.get(SimpleRuleHandler.PROPERTY_TABLET));
+
+	if (tabletString.equals(StringPool.TRUE)) {
+		tablet = 1;
+	}
+	else if (tabletString.equals(StringPool.FALSE)) {
+		tablet = 2;
+	}
+
+	screenPhysicalHeightMax = GetterUtil.getString(typeSettingsProperties.get(SimpleRuleHandler.PROPERTY_SCREEN_PHYSICAL_HEIGHT_MAX));
+	screenPhysicalHeightMin = GetterUtil.getString(typeSettingsProperties.get(SimpleRuleHandler.PROPERTY_SCREEN_PHYSICAL_HEIGHT_MIN));
+	screenPhysicalWidthMax = GetterUtil.getString(typeSettingsProperties.get(SimpleRuleHandler.PROPERTY_SCREEN_PHYSICAL_WIDTH_MAX));
+	screenPhysicalWidthMin = GetterUtil.getString(typeSettingsProperties.get(SimpleRuleHandler.PROPERTY_SCREEN_PHYSICAL_WIDTH_MIN));
+
+	screenResolutionHeightMax = GetterUtil.getString(typeSettingsProperties.get(SimpleRuleHandler.PROPERTY_SCREEN_RESOLUTION_HEIGHT_MAX));
+	screenResolutionHeightMin = GetterUtil.getString(typeSettingsProperties.get(SimpleRuleHandler.PROPERTY_SCREEN_RESOLUTION_HEIGHT_MIN));
+	screenResolutionWidthMax = GetterUtil.getString(typeSettingsProperties.get(SimpleRuleHandler.PROPERTY_SCREEN_RESOLUTION_WIDTH_MAX));
+	screenResolutionWidthMin = GetterUtil.getString(typeSettingsProperties.get(SimpleRuleHandler.PROPERTY_SCREEN_RESOLUTION_WIDTH_MIN));
+}
+%>
+
+<aui:fieldset label="operating-system-and-type">
+	<aui:select multiple="<%= true %>" name="os">
+		<aui:option label="any-os" selected="<%= operatingSystems.isEmpty() %>" value="" />
+
+		<%
+		Set<VersionableName> knownOperationSystems = DeviceDetectionUtil.getKnownOperatingSystems();
+
+		for (VersionableName knownOperationSystem : knownOperationSystems) {
+		%>
+
+			<aui:option label="<%= knownOperationSystem.getName() %>" selected="<%= operatingSystems.contains(knownOperationSystem.getName()) %>" />
+
+		<%
+		}
+		%>
+
+	</aui:select>
+
+	<aui:select label="device-type" name="tablet">
+		<aui:option label="any" selected="<%= tablet == 0 %>" value="" />
+		<aui:option label="tablets" selected="<%= tablet == 1 %>" value="<%= true %>" />
+		<aui:option label="other-devices" selected="<%= tablet == 2 %>" value="<%= false %>" />
+	</aui:select>
+</aui:fieldset>
+
+<aui:fieldset label="physical-screen-size">
+	<div class="row-fields">
+		<liferay-ui:message key="minimum" />
+
+		<aui:input
+			cssClass="physical-screen-size-field aui-field-digits"
+			id="<%= SimpleRuleHandler.PROPERTY_SCREEN_PHYSICAL_WIDTH_MIN %>"
+			inlineField="<%= true %>"
+			label="width"
+			name="<%= SimpleRuleHandler.PROPERTY_SCREEN_PHYSICAL_WIDTH_MIN %>"
+			placeholder="mm"
+			value="<%= screenPhysicalWidthMin %>"
+		/>
+
+		x
+
+		<aui:input
+			cssClass="physical-screen-size-field-field aui-field-digits"
+			id="<%= SimpleRuleHandler.PROPERTY_SCREEN_PHYSICAL_HEIGHT_MIN %>"
+			inlineField="<%= true %>"
+			label="height"
+			name="<%= SimpleRuleHandler.PROPERTY_SCREEN_PHYSICAL_HEIGHT_MIN %>"
+			placeholder="mm"
+			value="<%= screenPhysicalHeightMin %>"
+		/>
+	</div>
+
+	<div class="row-fields">
+		<liferay-ui:message key="maximum" />
+
+		<aui:input
+			cssClass="physical-physical-screen-size-field-field aui-field-digits"
+			id="<%= SimpleRuleHandler.PROPERTY_SCREEN_PHYSICAL_WIDTH_MAX %>"
+			inlineField="<%= true %>"
+			label="width"
+			name="<%= SimpleRuleHandler.PROPERTY_SCREEN_PHYSICAL_WIDTH_MAX %>"
+			placeholder="mm"
+			value="<%= screenPhysicalWidthMax %>"
+		/>
+
+		x
+
+		<aui:input
+			cssClass="screen-physical-size-field-field aui-field-digits"
+			id="<%= SimpleRuleHandler.PROPERTY_SCREEN_PHYSICAL_HEIGHT_MAX %>"
+			inlineField="<%= true %>"
+			label="height"
+			name="<%= SimpleRuleHandler.PROPERTY_SCREEN_PHYSICAL_HEIGHT_MAX %>"
+			placeholder="mm"
+			value="<%= screenPhysicalHeightMax %>"
+		/>
+	</div>
+</aui:fieldset>
+
+<aui:fieldset label="screen-resolution">
+	<div class="row-fields">
+		<liferay-ui:message key="minimum" />
+
+		<aui:input
+			cssClass="screen-resolution-field aui-field-digits"
+			id="<%= SimpleRuleHandler.PROPERTY_SCREEN_RESOLUTION_WIDTH_MIN %>"
+			inlineField="<%= true %>"
+			label="width"
+			name="<%= SimpleRuleHandler.PROPERTY_SCREEN_RESOLUTION_WIDTH_MIN %>"
+			placeholder="px"
+			value="<%= screenResolutionWidthMin %>"
+		/>
+
+		x
+
+		<aui:input
+			cssClass="screen-resolution-field aui-field-digits"
+			id="<%= SimpleRuleHandler.PROPERTY_SCREEN_RESOLUTION_HEIGHT_MIN %>"
+			inlineField="<%= true %>"
+			label="height"
+			name="<%= SimpleRuleHandler.PROPERTY_SCREEN_RESOLUTION_HEIGHT_MIN %>"
+			placeholder="px"
+			value="<%= screenResolutionHeightMin %>"
+		/>
+	</div>
+
+	<div class="row-fields">
+		<liferay-ui:message key="maximum" />
+
+		<aui:input
+			cssClass="screen-resolution-field aui-field-digits"
+			id="<%= SimpleRuleHandler.PROPERTY_SCREEN_RESOLUTION_WIDTH_MAX %>"
+			inlineField="<%= true %>"
+			label="width"
+			name="<%= SimpleRuleHandler.PROPERTY_SCREEN_RESOLUTION_WIDTH_MAX %>"
+			placeholder="px"
+			value="<%= screenResolutionWidthMax %>"
+		/>
+
+		x
+
+		<aui:input
+			cssClass="screen-resolution-field aui-field-digits"
+			id="<%= SimpleRuleHandler.PROPERTY_SCREEN_RESOLUTION_HEIGHT_MAX %>"
+			inlineField="<%= true %>"
+			label="height"
+			name="<%= SimpleRuleHandler.PROPERTY_SCREEN_RESOLUTION_HEIGHT_MAX %>"
+			placeholder="px"
+			value="<%= screenResolutionHeightMax %>"
+		/>
+	</div>
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/rule_actions.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/rule_actions.jsp
new file mode 100644
index 0000000..0de3ff1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/rule_actions.jsp
@@ -0,0 +1,46 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/mobile_device_rules/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+MDRRule rule = (MDRRule)row.getObject();
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= MDRRuleGroupPermissionUtil.contains(permissionChecker, rule.getRuleGroupId(), ActionKeys.UPDATE) %>">
+		<liferay-portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/mobile_device_rules/edit_rule" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="backURL" value="<%= currentURL %>" />
+			<portlet:param name="ruleId" value="<%= String.valueOf(rule.getRuleId()) %>" />
+		</liferay-portlet:renderURL>
+
+		<liferay-ui:icon image="edit" url="<%= editURL %>" />
+
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/mobile_device_rules/edit_rule" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="backURL" value="<%= currentURL %>" />
+			<portlet:param name="ruleId" value="<%= String.valueOf(rule.getRuleId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete url="<%= deleteURL %>" />
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/rule_columns.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/rule_columns.jspf
new file mode 100644
index 0000000..6c28adc
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/rule_columns.jspf
@@ -0,0 +1,39 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="name"
+	value="<%= rule.getName(locale) %>"
+/>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="description"
+	value="<%= rule.getDescription(locale) %>"
+/>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="type"
+	translate="<%= true %>"
+	value="<%= rule.getType() %>"
+/>
+
+<liferay-ui:search-container-column-jsp
+	align="right"
+	path="/html/portlet/mobile_device_rules/rule_actions.jsp"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/rule_group_actions.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/rule_group_actions.jsp
new file mode 100644
index 0000000..2523ca4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/rule_group_actions.jsp
@@ -0,0 +1,88 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/mobile_device_rules/init.jsp" %>
+
+<%
+SearchContainer searchContainer = (SearchContainer)request.getAttribute("liferay-ui:search:searchContainer");
+
+String redirect = searchContainer.getIteratorURL().toString();
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+MDRRuleGroup ruleGroup = (MDRRuleGroup)row.getObject();
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= MDRRuleGroupPermissionUtil.contains(permissionChecker, ruleGroup.getRuleGroupId(), ActionKeys.UPDATE) %>">
+		<liferay-portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/mobile_device_rules/edit_rule_group" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="ruleGroupId" value="<%= String.valueOf(ruleGroup.getRuleGroupId()) %>" />
+		</liferay-portlet:renderURL>
+
+		<liferay-ui:icon image="edit" url="<%= editURL %>" />
+	</c:if>
+
+	<c:if test="<%= MDRRuleGroupPermissionUtil.contains(permissionChecker, ruleGroup.getRuleGroupId(), ActionKeys.PERMISSIONS) %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= MDRRuleGroup.class.getName() %>"
+			modelResourceDescription="<%= ruleGroup.getName(locale) %>"
+			resourcePrimKey="<%= String.valueOf(ruleGroup.getRuleGroupId()) %>"
+			var="permissionsURL"
+			windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			method="get"
+			url="<%= permissionsURL %>"
+			useDialog="<%= true %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= MDRRuleGroupPermissionUtil.contains(permissionChecker, ruleGroup.getRuleGroupId(), ActionKeys.VIEW) && MDRPermissionUtil.contains(permissionChecker, groupId, ActionKeys.ADD_RULE_GROUP) %>">
+		<portlet:renderURL var="editRulesURL">
+			<portlet:param name="struts_action" value="/mobile_device_rules/view_rules" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="ruleGroupId" value="<%= String.valueOf(ruleGroup.getRuleGroupId()) %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon image="manage_nodes" message="manage-classification-rules" url="<%= editRulesURL.toString() %>" />
+
+		<portlet:actionURL var="copyURL">
+			<portlet:param name="struts_action" value="/mobile_device_rules/edit_rule_group" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.COPY %>" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="ruleGroupId" value="<%= String.valueOf(ruleGroup.getRuleGroupId()) %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon image="copy" url="<%= copyURL.toString() %>" />
+	</c:if>
+
+	<c:if test="<%= MDRRuleGroupPermissionUtil.contains(permissionChecker, ruleGroup.getRuleGroupId(), ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/mobile_device_rules/edit_rule_group" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="ruleGroupId" value="<%= String.valueOf(ruleGroup.getRuleGroupId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete url="<%= deleteURL %>" />
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/rule_group_columns.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/rule_group_columns.jspf
new file mode 100644
index 0000000..4a35631
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/rule_group_columns.jspf
@@ -0,0 +1,57 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+Group group = GroupLocalServiceUtil.getGroup(ruleGroup.getGroupId());
+%>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowHREF %>"
+	name="scope"
+	value="<%= LanguageUtil.get(pageContext, group.getScopeLabel(themeDisplay)) %>"
+/>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowHREF %>"
+	name="name"
+	value="<%= ruleGroup.getName(locale) %>"
+/>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowHREF %>"
+	name="description"
+	value="<%= ruleGroup.getDescription(locale) %>"
+/>
+
+<liferay-ui:search-container-column-date
+	href="<%= rowHREF %>"
+	name="modified-date"
+	value="<%= ruleGroup.getModifiedDate() %>"
+/>
+
+<c:choose>
+	<c:when test="<%= Validator.isNull(chooseCallback) %>">
+		<liferay-ui:search-container-column-jsp
+			align="right"
+			path="/html/portlet/mobile_device_rules/rule_group_actions.jsp"
+		/>
+	</c:when>
+	<c:otherwise>
+		<liferay-ui:search-container-column-text>
+			<aui:button disabled="<%= Validator.isNull(taglibOnClick) %>" onClick="<%= taglibOnClick %>" value="choose" />
+		</liferay-ui:search-container-column-text>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/rule_group_search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/rule_group_search.jsp
new file mode 100644
index 0000000..a1dd60d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/rule_group_search.jsp
@@ -0,0 +1,35 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/mobile_device_rules/init.jsp" %>
+
+<%
+String chooseCallback = ParamUtil.getString(request, "chooseCallback");
+
+RuleGroupSearch searchContainer = (RuleGroupSearch)request.getAttribute("liferay-ui:search:searchContainer");
+
+RuleGroupDisplayTerms displayTerms = (RuleGroupDisplayTerms)searchContainer.getDisplayTerms();
+%>
+
+<liferay-ui:search-toggle
+	buttonLabel="search"
+	displayTerms="<%= displayTerms %>"
+	id="toggle_id_mobile_device_rules_rule_group_search"
+>
+	<aui:fieldset>
+		<aui:input label="name" name="<%= displayTerms.NAME %>" size="20" type="text" value="<%= displayTerms.getName() %>" />
+	</aui:fieldset>
+</liferay-ui:search-toggle>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/rule_group_search_results.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/rule_group_search_results.jspf
new file mode 100644
index 0000000..8d83cdb
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/rule_group_search_results.jspf
@@ -0,0 +1,38 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+LinkedHashMap<String, Object> params = new LinkedHashMap<String, Object>();
+
+params.put("includeGlobalScope", Boolean.TRUE);
+
+if (Validator.isNotNull(searchTerms.getName())) {
+	total = MDRRuleGroupLocalServiceUtil.searchCount(searchTerms.getGroupId(), searchTerms.getName(), params, searchTerms.isAndOperator());
+
+	searchContainer.setTotal(total);
+
+	results = MDRRuleGroupLocalServiceUtil.search(searchTerms.getGroupId(), searchTerms.getName(), params, searchTerms.isAndOperator(), searchContainer.getStart(), searchContainer.getEnd());
+}
+else {
+	total = MDRRuleGroupLocalServiceUtil.searchByKeywordsCount(searchTerms.getGroupId(), searchTerms.getKeywords(), params, searchTerms.isAndOperator());
+
+	searchContainer.setTotal(total);
+
+	results = MDRRuleGroupLocalServiceUtil.searchByKeywords(searchTerms.getGroupId(), searchTerms.getKeywords(), params, searchTerms.isAndOperator(), searchContainer.getStart(), searchContainer.getEnd());
+}
+
+searchContainer.setResults(results);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/toolbar.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/toolbar.jsp
new file mode 100644
index 0000000..d675b84
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/toolbar.jsp
@@ -0,0 +1,42 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/mobile_device_rules/init.jsp" %>
+
+<%
+String toolbarItem = ParamUtil.getString(request, "toolbarItem", "add");
+%>
+
+<c:if test="<%= MDRPermissionUtil.contains(permissionChecker, groupId, ActionKeys.ADD_RULE_GROUP) %>">
+	<portlet:renderURL var="viewRulesURL">
+		<portlet:param name="struts_action" value="/mobile_device_rules/view" />
+	</portlet:renderURL>
+
+	<liferay-portlet:renderURL var="addRuleGroupURL">
+		<portlet:param name="struts_action" value="/mobile_device_rules/edit_rule_group" />
+		<portlet:param name="redirect" value="<%= viewRulesURL %>" />
+		<portlet:param name="backURL" value="<%= viewRulesURL %>" />
+		<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+	</liferay-portlet:renderURL>
+
+	<aui:nav-bar>
+		<aui:nav>
+			<aui:nav-item href="<%= addRuleGroupURL %>" iconCssClass="icon-plus" label="add-device-family" selected='<%= toolbarItem.equals("add") %>' />
+		</aui:nav>
+
+		<aui:nav-bar-search cssClass="pull-right" file="/html/portlet/mobile_device_rules/rule_group_search.jsp" />
+	</aui:nav-bar>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/view.jsp
new file mode 100644
index 0000000..f071bec
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/view.jsp
@@ -0,0 +1,166 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/mobile_device_rules/init.jsp" %>
+
+<%
+String className = ParamUtil.getString(request, "className");
+long classPK = ParamUtil.getLong(request, "classPK");
+String chooseCallback = ParamUtil.getString(request, "chooseCallback");
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/mobile_device_rules/view");
+portletURL.setParameter("groupId", String.valueOf(groupId));
+portletURL.setParameter("chooseCallback", chooseCallback);
+%>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= portletURL.toString() %>" />
+	<aui:input name="ruleGroupIds" type="hidden" />
+
+	<%
+	RuleGroupSearch ruleGroupSearch = new RuleGroupSearch(liferayPortletRequest, portletURL);
+
+	RowChecker rowChecker = null;
+
+	if (Validator.isNull(chooseCallback)) {
+		rowChecker = new RuleGroupChecker(renderResponse);
+	}
+	%>
+
+	<liferay-ui:search-container
+		rowChecker="<%= rowChecker %>"
+		searchContainer="<%= ruleGroupSearch %>"
+	>
+		<aui:nav-bar>
+			<c:if test="<%= MDRPermissionUtil.contains(permissionChecker, groupId, ActionKeys.ADD_RULE_GROUP) %>">
+				<portlet:renderURL var="viewRulesURL">
+					<portlet:param name="struts_action" value="/mobile_device_rules/view" />
+					<portlet:param name="className" value="<%= className %>" />
+					<portlet:param name="classPK" value="<%= String.valueOf(classPK) %>" />
+					<portlet:param name="chooseCallback" value="<%= chooseCallback %>" />
+				</portlet:renderURL>
+
+				<liferay-portlet:renderURL var="addRuleGroupURL">
+					<portlet:param name="struts_action" value="/mobile_device_rules/edit_rule_group" />
+					<portlet:param name="redirect" value="<%= viewRulesURL %>" />
+					<portlet:param name="backURL" value="<%= viewRulesURL %>" />
+					<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+				</liferay-portlet:renderURL>
+
+				<aui:nav>
+					<aui:nav-item href="<%= addRuleGroupURL %>" iconCssClass="icon-plus" label="add-device-family" />
+				</aui:nav>
+			</c:if>
+
+			<aui:nav-bar-search cssClass="pull-right" file="/html/portlet/mobile_device_rules/rule_group_search.jsp" searchContainer="<%= ruleGroupSearch %>" />
+		</aui:nav-bar>
+
+		<%
+		RuleGroupDisplayTerms displayTerms = (RuleGroupDisplayTerms)searchContainer.getDisplayTerms();
+		RuleGroupSearchTerms searchTerms = (RuleGroupSearchTerms)searchContainer.getSearchTerms();
+
+		if (displayTerms.getGroupId() == 0) {
+			displayTerms.setGroupId(groupId);
+			searchTerms.setGroupId(groupId);
+		}
+		%>
+
+		<liferay-ui:search-container-results>
+			<%@ include file="/html/portlet/mobile_device_rules/rule_group_search_results.jspf" %>
+		</liferay-ui:search-container-results>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup"
+			escapedModel="<%= true %>"
+			keyProperty="ruleGroupId"
+			modelVar="ruleGroup"
+		>
+
+			<%
+			String rowHREF = null;
+			String taglibOnClick = null;
+
+			if (Validator.isNull(chooseCallback)) {
+				if (MDRRuleGroupPermissionUtil.contains(permissionChecker, ruleGroup, ActionKeys.UPDATE)) {
+			%>
+
+					<liferay-portlet:renderURL var="editURL">
+						<portlet:param name="struts_action" value="/mobile_device_rules/edit_rule_group" />
+						<portlet:param name="redirect" value="<%= portletURL.toString() %>" />
+						<portlet:param name="ruleGroupId" value="<%= String.valueOf(ruleGroup.getRuleGroupId()) %>" />
+					</liferay-portlet:renderURL>
+
+			<%
+					rowHREF = editURL;
+				}
+			}
+			else {
+				MDRRuleGroupInstance ruleGroupInstance = MDRRuleGroupInstanceLocalServiceUtil.fetchRuleGroupInstance(className, classPK, ruleGroup.getRuleGroupId());
+
+				if (ruleGroupInstance == null) {
+					StringBundler sb = new StringBundler(7);
+
+					sb.append("javascript:Liferay.Util.getOpener()['");
+					sb.append(HtmlUtil.escapeJS(chooseCallback));
+					sb.append("'](");
+					sb.append(ruleGroup.getRuleGroupId());
+					sb.append(",'");
+					sb.append(ruleGroup.getName(locale));
+					sb.append("', Liferay.Util.getWindow());");
+
+					rowHREF = sb.toString();
+
+					taglibOnClick = StringUtil.replaceFirst(sb.toString(), "javascript:", StringPool.BLANK);
+				}
+			}
+			%>
+
+			<%@ include file="/html/portlet/mobile_device_rules/rule_group_columns.jspf" %>
+		</liferay-ui:search-container-row>
+
+		<c:if test="<%= ((total > 0) && (Validator.isNull(chooseCallback))) %>">
+			<aui:button-row>
+				<aui:button cssClass="delete-rules-button" disabled="<%= true %>" name="delete" onClick='<%= renderResponse.getNamespace() + "deleteRules();" %>' value="delete" />
+			</aui:button-row>
+
+			<div class="separator"><!-- --></div>
+		</c:if>
+
+		<liferay-ui:search-iterator type="more" />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script>
+	Liferay.Util.toggleSearchContainerButton('#<portlet:namespace />delete', '#<portlet:namespace /><%= searchContainerReference.getId() %>SearchContainer', document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />deleteRules',
+		function() {
+			if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-delete-this") %>')) {
+				document.<portlet:namespace />fm.method = "post";
+				document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.DELETE %>";
+				document.<portlet:namespace />fm.<portlet:namespace />ruleGroupIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+				submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/mobile_device_rules/edit_rule_group" /></portlet:actionURL>");
+			}
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/view_actions.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/view_actions.jsp
new file mode 100644
index 0000000..0af51da
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/view_actions.jsp
@@ -0,0 +1,117 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/mobile_device_rules/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+long ruleGroupInstanceId = ParamUtil.getLong(request, "ruleGroupInstanceId");
+
+MDRRuleGroupInstance ruleGroupInstance = MDRRuleGroupInstanceLocalServiceUtil.getRuleGroupInstance(ruleGroupInstanceId);
+
+MDRRuleGroup ruleGroup = ruleGroupInstance.getRuleGroup();
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/mobile_device_rules/view_actions");
+portletURL.setParameter("redirect", redirect);
+portletURL.setParameter("ruleGroupInstanceId", String.valueOf(ruleGroupInstanceId));
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	localizeTitle="<%= false %>"
+	showBackURL="<%= !windowState.equals(LiferayWindowState.POP_UP) %>"
+	title='<%= LanguageUtil.format(pageContext, "actions-for-x", ruleGroup.getName(locale), false) %>'
+/>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= portletURL.toString() %>" />
+	<aui:input name="actionIds" type="hidden" />
+
+	<liferay-ui:search-container
+		delta="<%= 5 %>"
+		deltaConfigurable="<%= false %>"
+		emptyResultsMessage="no-actions-are-configured-for-this-device-family"
+		headerNames="name,description,type"
+		iteratorURL="<%= portletURL %>"
+		rowChecker="<%= new RowChecker(renderResponse) %>"
+		total="<%= MDRActionLocalServiceUtil.getActionsCount(ruleGroupInstanceId) %>"
+	>
+		<liferay-ui:search-container-results
+			results="<%= MDRActionLocalServiceUtil.getActions(ruleGroupInstanceId, searchContainer.getStart(), searchContainer.getEnd()) %>"
+		/>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portlet.mobiledevicerules.model.MDRAction"
+			escapedModel="<%= true %>"
+			keyProperty="actionId"
+			modelVar="action"
+		>
+			<liferay-portlet:renderURL var="rowURL">
+				<portlet:param name="struts_action" value="/mobile_device_rules/edit_action" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="actionId" value="<%= String.valueOf(action.getActionId()) %>" />
+			</liferay-portlet:renderURL>
+
+			<%@ include file="/html/portlet/mobile_device_rules/action_columns.jspf" %>
+		</liferay-ui:search-container-row>
+
+		<c:if test="<%= MDRPermissionUtil.contains(permissionChecker, groupId, ActionKeys.ADD_RULE_GROUP) %>">
+			<liferay-portlet:renderURL var="addURL">
+				<portlet:param name="struts_action" value="/mobile_device_rules/edit_action" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="ruleGroupInstanceId" value="<%= String.valueOf(ruleGroupInstanceId) %>" />
+			</liferay-portlet:renderURL>
+
+			<aui:nav-bar>
+				<aui:nav>
+					<aui:nav-item href="<%= addURL %>" iconCssClass="icon-plus" label="add-action" />
+				</aui:nav>
+			</aui:nav-bar>
+		</c:if>
+		<c:if test="<%= total > 0 %>">
+			<aui:button-row>
+				<aui:button cssClass="delete-rule-actions-button" disabled="<%= true %>" name="delete" onClick='<%= renderResponse.getNamespace() + "deleteActions();" %>' value="delete" />
+			</aui:button-row>
+
+			<div class="separator"><!-- --></div>
+		</c:if>
+
+		<liferay-ui:search-iterator type="more" />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script>
+	Liferay.Util.toggleSearchContainerButton('#<portlet:namespace />delete', '#<portlet:namespace /><%= searchContainerReference.getId() %>SearchContainer', document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />deleteActions',
+		function() {
+			if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-delete-this") %>')) {
+				document.<portlet:namespace />fm.method = "post";
+				document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.DELETE %>";
+				document.<portlet:namespace />fm.<portlet:namespace />actionIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+				submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/mobile_device_rules/edit_action" /></portlet:actionURL>");
+			}
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/view_rules.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/view_rules.jsp
new file mode 100644
index 0000000..3b8f298
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/mobile_device_rules/view_rules.jsp
@@ -0,0 +1,94 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/mobile_device_rules/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+String backURL = ParamUtil.getString(request, "backURL");
+
+if (Validator.isNull(redirect) && Validator.isNull(backURL)) {
+	PortletURL portletURL = renderResponse.createRenderURL();
+
+	portletURL.setParameter("struts_action", "/mobile_device_rules/view");
+	portletURL.setParameter("groupId", String.valueOf(groupId));
+
+	backURL = portletURL.toString();
+}
+
+long ruleGroupId = ParamUtil.getLong(request, "ruleGroupId");
+
+MDRRuleGroup ruleGroup = MDRRuleGroupLocalServiceUtil.getRuleGroup(ruleGroupId);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/mobile_device_rules/view_rules");
+portletURL.setParameter("ruleGroupId", String.valueOf(ruleGroupId));
+portletURL.setParameter("groupId", String.valueOf(groupId));
+portletURL.setParameter("redirect", redirect);
+%>
+
+<liferay-ui:header
+	backURL="<%= backURL %>"
+	localizeTitle="<%= false %>"
+	title='<%= LanguageUtil.format(pageContext, "classification-rules-for-x", ruleGroup.getName(locale), false) %>'
+/>
+
+<aui:nav-bar>
+	<aui:nav>
+		<liferay-portlet:renderURL var="addURL">
+			<portlet:param name="struts_action" value="/mobile_device_rules/edit_rule" />
+			<portlet:param name="redirect" value="<%= portletURL.toString() %>" />
+			<portlet:param name="ruleGroupId" value="<%= String.valueOf(ruleGroupId) %>" />
+		</liferay-portlet:renderURL>
+
+		<aui:nav-item href="<%= addURL %>" iconCssClass="icon-plus" label="add-classification-rule" />
+	</aui:nav>
+</aui:nav-bar>
+
+<div class="separator"><!-- --></div>
+
+<liferay-ui:search-container
+	delta="<%= 5 %>"
+	deltaConfigurable="<%= false %>"
+	emptyResultsMessage="no-classification-rules-are-configured-for-this-device-family"
+	headerNames="name,type"
+	iteratorURL="<%= portletURL %>"
+	total="<%= MDRRuleLocalServiceUtil.getRulesCount(ruleGroupId) %>"
+>
+	<liferay-ui:search-container-results
+		results="<%= MDRRuleLocalServiceUtil.getRules(ruleGroupId, searchContainer.getStart(), searchContainer.getEnd()) %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portlet.mobiledevicerules.model.MDRRule"
+		escapedModel="<%= true %>"
+		keyProperty="ruleId"
+		modelVar="rule"
+	>
+		<liferay-portlet:renderURL var="rowURL">
+			<portlet:param name="struts_action" value="/mobile_device_rules/edit_rule" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="backURL" value="<%= currentURL %>" />
+			<portlet:param name="ruleId" value="<%= String.valueOf(rule.getRuleId()) %>" />
+		</liferay-portlet:renderURL>
+
+		<%@ include file="/html/portlet/mobile_device_rules/rule_columns.jspf" %>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator type="more" />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/monitoring/edit_session.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/monitoring/edit_session.jsp
new file mode 100644
index 0000000..1873420
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/monitoring/edit_session.jsp
@@ -0,0 +1,192 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/monitoring/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+String sessionId = ParamUtil.getString(request, "sessionId");
+
+UserTracker userTracker = LiveUsers.getUserTracker(company.getCompanyId(), sessionId);
+
+List<UserTrackerPath> paths = userTracker.getPaths();
+int numHits = userTracker.getHits();
+
+userTracker = userTracker.toEscapedModel();
+%>
+
+<portlet:actionURL var="editSessionURL">
+	<portlet:param name="struts_action" value="/monitoring/edit_session" />
+</portlet:actionURL>
+
+<aui:form action="<%= editSessionURL %>" method="post" name="fm">
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="sessionId" type="hidden" value="<%= sessionId %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title="live-session"
+	/>
+
+	<c:choose>
+		<c:when test="<%= userTracker == null %>">
+			<liferay-ui:message key="session-id-not-found" />
+
+			<aui:button href="<%= redirect %>" type="cancel" />
+		</c:when>
+		<c:otherwise>
+
+			<%
+			User user2 = null;
+
+			try {
+				user2 = UserLocalServiceUtil.getUserById(userTracker.getUserId());
+			}
+			catch (NoSuchUserException nsue) {
+			}
+
+			boolean userSessionAlive = false;
+			%>
+
+			<liferay-ui:panel-container extended="<%= true %>" id="monitoringSessionHistoryPanelContainer" persistState="<%= true %>">
+				<liferay-ui:panel collapsible="<%= true %>" extended="<%= false %>" id="monitoringSessionPanel" persistState="<%= false %>" title="session">
+					<dl>
+						<dt>
+							<liferay-ui:message key="session-id" />
+						</dt>
+						<dd>
+							<%= HtmlUtil.escape(sessionId) %>
+						</dd>
+						<dt>
+							<liferay-ui:message key="user-id" />
+						</dt>
+						<dd>
+							<%= userTracker.getUserId() %>
+						</dd>
+						<dt>
+							<liferay-ui:message key="name" />
+						</dt>
+						<dd>
+							<%= (user2 != null) ? HtmlUtil.escape(user2.getFullName()) : LanguageUtil.get(pageContext, "not-available") %>
+						</dd>
+						<dt>
+							<liferay-ui:message key="email-address" />
+						</dt>
+						<dd>
+							<%= (user2 != null) ? user2.getEmailAddress() : LanguageUtil.get(pageContext, "not-available") %>
+						</dd>
+						<dt>
+							<liferay-ui:message key="last-request" />
+						</dt>
+						<dd>
+							<%= dateFormatDateTime.format(userTracker.getModifiedDate()) %>
+						</dd>
+						<dt>
+							<liferay-ui:message key="num-of-hits" />
+						</dt>
+						<dd>
+							<%= numHits %>
+						</dd>
+						<dt>
+							<liferay-ui:message key="browser-os-type" />
+						</dt>
+						<dd>
+							<%= userTracker.getUserAgent() %>
+						</dd>
+						<dt>
+							<liferay-ui:message key="remote-host-ip" />
+						</dt>
+						<dd>
+							<%= userTracker.getRemoteAddr() %> / <%= userTracker.getRemoteHost() %>
+						</dd>
+					</dl>
+				</liferay-ui:panel>
+
+				<liferay-ui:panel collapsible="<%= true %>" extended="<%= false %>" id="sessionAccessedURLsPanels" persistState="<%= true %>" title="accessed-urls">
+					<dl>
+
+						<%
+						for (int i = 0; i < paths.size(); i++) {
+							UserTrackerPath userTrackerPath = paths.get(i);
+						%>
+
+						<dt>
+							<%= StringUtil.replace(userTrackerPath.getPath(), "&", "& ") %>
+						</dt>
+						<dd>
+							<%= dateFormatDateTime.format(userTrackerPath.getPathDate()) %>
+						</dd>
+
+						<%
+						}
+						%>
+
+					</dl>
+				</liferay-ui:panel>
+
+				<liferay-ui:panel collapsible="<%= true %>" extended="<%= false %>" id="monitoringSessionAttributesPanel" persistState="<%= true %>" title="session-attributes">
+					<dl>
+
+						<%
+						userSessionAlive = true;
+
+						HttpSession userSession = PortalSessionContext.get(sessionId);
+
+						if (userSession != null) {
+							try {
+								Set<String> sortedAttrNames = new TreeSet<String>();
+
+								Enumeration<String> enu = userSession.getAttributeNames();
+
+								while (enu.hasMoreElements()) {
+									String attrName = enu.nextElement();
+
+									sortedAttrNames.add(attrName);
+								}
+
+								for (String attrName : sortedAttrNames) {
+						%>
+
+									<dt>
+										<%= attrName %>
+									</dt>
+
+						<%
+								}
+							}
+							catch (Exception e) {
+								userSessionAlive = false;
+
+								e.printStackTrace();
+							}
+						}
+						%>
+
+					</dl>
+				</liferay-ui:panel>
+			</liferay-ui:panel-container>
+
+			<aui:button-row>
+				<c:if test="<%= userSessionAlive && !session.getId().equals(sessionId) %>">
+					<aui:button type="submit" value="kill-session" />
+				</c:if>
+
+				<aui:button href="<%= redirect %>" type="cancel" />
+			</aui:button-row>
+		</c:otherwise>
+	</c:choose>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/monitoring/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/monitoring/error.jsp
new file mode 100644
index 0000000..caa6124
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/monitoring/error.jsp
@@ -0,0 +1,24 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/monitoring/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/monitoring/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/monitoring/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/monitoring/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/monitoring/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/monitoring/init.jsp
new file mode 100644
index 0000000..682f1d6
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/monitoring/init.jsp
@@ -0,0 +1,27 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.kernel.servlet.PortalSessionContext" %><%@
+page import="com.liferay.portal.liveusers.LiveUsers" %><%@
+page import="com.liferay.portal.util.comparator.UserTrackerModifiedDateComparator" %>
+
+<%
+Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(locale, timeZone);
+%>
+
+<%@ include file="/html/portlet/monitoring/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/monitoring/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/monitoring/view.jsp
new file mode 100644
index 0000000..a80db5a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/monitoring/view.jsp
@@ -0,0 +1,116 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/monitoring/init.jsp" %>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/monitoring/view");
+%>
+
+<c:choose>
+	<c:when test="<%= PropsValues.LIVE_USERS_ENABLED && PropsValues.SESSION_TRACKER_MEMORY_ENABLED %>">
+		<liferay-ui:header
+			title="live-sessions"
+		/>
+
+		<%
+		Map<String, UserTracker> sessionUsers = LiveUsers.getSessionUsers(company.getCompanyId());
+
+		List<UserTracker> userTrackers = new ArrayList<UserTracker>(sessionUsers.values());
+
+		userTrackers = ListUtil.sort(userTrackers, new UserTrackerModifiedDateComparator());
+		%>
+
+		<liferay-ui:search-container
+			emptyResultsMessage="there-are-no-live-sessions"
+			headerNames="session-id,user-id,name,screen-name,last-request,num-of-hits"
+			total="<%= userTrackers.size() %>"
+		>
+			<liferay-ui:search-container-results
+				results="<%= ListUtil.subList(userTrackers, searchContainer.getStart(), searchContainer.getEnd()) %>"
+			/>
+
+			<liferay-ui:search-container-row
+				className="com.liferay.portal.model.UserTracker"
+				keyProperty="userTrackerId"
+				modelVar="userTracker"
+			>
+				<portlet:renderURL var="rowURL">
+					<portlet:param name="struts_action" value="/monitoring/edit_session" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="sessionId" value="<%= userTracker.getSessionId() %>" />
+				</portlet:renderURL>
+
+				<%
+				User user2 = null;
+
+				try {
+					user2 = UserLocalServiceUtil.getUserById(userTracker.getUserId());
+				}
+				catch (NoSuchUserException nsue) {
+				}
+				%>
+
+				<liferay-ui:search-container-column-text
+					href="<%= rowURL %>"
+					name="session-id"
+					property="sessionId"
+				/>
+
+				<liferay-ui:search-container-column-text
+					href="<%= rowURL %>"
+					name="user-id"
+					property="userId"
+				/>
+
+				<liferay-ui:search-container-column-text
+					href="<%= rowURL %>"
+					name="user-id"
+					value='<%= ((user2 != null) ? HtmlUtil.escape(user2.getFullName()) : LanguageUtil.get(pageContext, "not-available")) %>'
+				/>
+
+				<liferay-ui:search-container-column-text
+					href="<%= rowURL %>"
+					name="screen-name"
+					value='<%= ((user2 != null) ? user2.getScreenName() : LanguageUtil.get(pageContext, "not-available")) %>'
+				/>
+
+				<liferay-ui:search-container-column-date
+					href="<%= rowURL %>"
+					name="last-request"
+					value="<%= userTracker.getModifiedDate() %>"
+				/>
+
+				<liferay-ui:search-container-column-text
+					href="<%= rowURL %>"
+					name="num-of-hits"
+					property="hits"
+				/>
+
+			</liferay-ui:search-container-row>
+
+			<liferay-ui:search-iterator />
+		</liferay-ui:search-container>
+	</c:when>
+	<c:when test="<%= !PropsValues.LIVE_USERS_ENABLED %>">
+		<%= LanguageUtil.format(pageContext, "display-of-live-session-data-is-disabled", PropsKeys.LIVE_USERS_ENABLED) %>
+	</c:when>
+	<c:otherwise>
+		<%= LanguageUtil.format(pageContext, "display-of-live-session-data-is-disabled", PropsKeys.SESSION_TRACKER_MEMORY_ENABLED) %>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/my_account/edit_user.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/my_account/edit_user.jsp
new file mode 100644
index 0000000..4b5321d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/my_account/edit_user.jsp
@@ -0,0 +1,17 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/edit_user.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/my_account/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/my_account/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/my_account/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/my_account/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/my_account/init.jsp
new file mode 100644
index 0000000..55c59fe
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/my_account/init.jsp
@@ -0,0 +1,19 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ include file="/html/portlet/my_account/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/my_account/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/my_account/view.jsp
new file mode 100644
index 0000000..1b6317e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/my_account/view.jsp
@@ -0,0 +1,17 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/my_account/init.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/my_places/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/my_places/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/my_places/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/my_places/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/my_places/init.jsp
new file mode 100644
index 0000000..9fb50d6
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/my_places/init.jsp
@@ -0,0 +1,19 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ include file="/html/portlet/my_places/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/my_places/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/my_places/view.jsp
new file mode 100644
index 0000000..f30bd92
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/my_places/view.jsp
@@ -0,0 +1,19 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/my_places/init.jsp" %>
+
+<liferay-ui:my-sites />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/my_sites/site_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/my_sites/site_action.jsp
new file mode 100644
index 0000000..fe59aff
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/my_sites/site_action.jsp
@@ -0,0 +1,135 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+Group group = (Group)row.getObject();
+
+String tabs1 = (String)request.getAttribute("view.jsp-tabs1");
+%>
+
+<liferay-ui:icon-menu showWhenSingleIcon='<%= tabs1.equals("my-sites") %>'>
+	<c:choose>
+		<c:when test='<%= tabs1.equals("my-sites") %>'>
+			<c:if test="<%= group.getPublicLayoutsPageCount() > 0 %>">
+				<portlet:actionURL var="viewPublicPagesURL">
+					<portlet:param name="struts_action" value="/sites_admin/page" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+					<portlet:param name="privateLayout" value="<%= Boolean.FALSE.toString() %>" />
+				</portlet:actionURL>
+
+				<liferay-ui:icon
+					image="view"
+					message="go-to-public-pages"
+					target="_blank"
+					url="<%= viewPublicPagesURL %>"
+				/>
+			</c:if>
+
+			<c:if test="<%= group.getPrivateLayoutsPageCount() > 0 %>">
+				<portlet:actionURL var="viewPrivatePagesURL">
+					<portlet:param name="struts_action" value="/sites_admin/page" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+					<portlet:param name="privateLayout" value="<%= Boolean.TRUE.toString() %>" />
+				</portlet:actionURL>
+
+				<liferay-ui:icon
+					image="view"
+					message="go-to-private-pages"
+					target="_blank"
+					url="<%= viewPrivatePagesURL %>"
+				/>
+			</c:if>
+
+			<c:if test="<%= ((group.getType() == GroupConstants.TYPE_SITE_OPEN) || (group.getType() == GroupConstants.TYPE_SITE_RESTRICTED)) && GroupLocalServiceUtil.hasUserGroup(user.getUserId(), group.getGroupId(), false) && !SiteMembershipPolicyUtil.isMembershipRequired(user.getUserId(), group.getGroupId()) && group.isManualMembership() %>">
+				<portlet:actionURL var="leaveURL">
+					<portlet:param name="struts_action" value="/sites_admin/edit_site_assignments" />
+					<portlet:param name="<%= Constants.CMD %>" value="group_users" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+					<portlet:param name="removeUserIds" value="<%= String.valueOf(user.getUserId()) %>" />
+				</portlet:actionURL>
+
+				<liferay-ui:icon
+					image="leave"
+					url="<%= leaveURL %>"
+				/>
+			</c:if>
+		</c:when>
+		<c:when test="<%= group.isManualMembership() %>">
+			<c:choose>
+				<c:when test="<%= !GroupLocalServiceUtil.hasUserGroup(user.getUserId(), group.getGroupId()) && SiteMembershipPolicyUtil.isMembershipAllowed(user.getUserId(), group.getGroupId()) %>">
+					<c:choose>
+						<c:when test="<%= group.getType() == GroupConstants.TYPE_SITE_OPEN %>">
+							<portlet:actionURL var="joinURL">
+								<portlet:param name="struts_action" value="/sites_admin/edit_site_assignments" />
+								<portlet:param name="<%= Constants.CMD %>" value="group_users" />
+								<portlet:param name="redirect" value="<%= currentURL %>" />
+								<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+								<portlet:param name="addUserIds" value="<%= String.valueOf(user.getUserId()) %>" />
+							</portlet:actionURL>
+
+							<liferay-ui:icon
+								image="join"
+								url="<%= joinURL %>"
+							/>
+						</c:when>
+						<c:when test="<%= (group.getType() == GroupConstants.TYPE_SITE_RESTRICTED) && !MembershipRequestLocalServiceUtil.hasMembershipRequest(user.getUserId(), group.getGroupId(), MembershipRequestConstants.STATUS_PENDING) && SiteMembershipPolicyUtil.isMembershipAllowed(user.getUserId(), group.getGroupId()) %>">
+							<portlet:renderURL var="membershipRequestURL">
+								<portlet:param name="struts_action" value="/sites_admin/post_membership_request" />
+								<portlet:param name="redirect" value="<%= currentURL %>" />
+								<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+							</portlet:renderURL>
+
+							<liferay-ui:icon
+								image="post"
+								message="request-membership"
+								url="<%= membershipRequestURL %>"
+							/>
+						</c:when>
+						<c:when test="<%= MembershipRequestLocalServiceUtil.hasMembershipRequest(user.getUserId(), group.getGroupId(), MembershipRequestConstants.STATUS_PENDING) %>">
+							<liferay-ui:icon
+								image="checked"
+								message="membership-requested"
+							/>
+						</c:when>
+					</c:choose>
+				</c:when>
+				<c:otherwise>
+					<c:if test="<%= ((group.getType() == GroupConstants.TYPE_SITE_OPEN) || (group.getType() == GroupConstants.TYPE_SITE_RESTRICTED)) && GroupLocalServiceUtil.hasUserGroup(user.getUserId(), group.getGroupId(), false) && !SiteMembershipPolicyUtil.isMembershipRequired(user.getUserId(), group.getGroupId()) %>">
+						<portlet:actionURL var="leaveURL">
+							<portlet:param name="struts_action" value="/sites_admin/edit_site_assignments" />
+							<portlet:param name="<%= Constants.CMD %>" value="group_users" />
+							<portlet:param name="redirect" value="<%= currentURL %>" />
+							<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+							<portlet:param name="removeUserIds" value="<%= String.valueOf(user.getUserId()) %>" />
+						</portlet:actionURL>
+
+						<liferay-ui:icon
+							image="leave"
+							url="<%= leaveURL %>"
+						/>
+					</c:if>
+				</c:otherwise>
+			</c:choose>
+		</c:when>
+	</c:choose>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/my_sites/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/my_sites/view.jsp
new file mode 100644
index 0000000..b4dad55
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/my_sites/view.jsp
@@ -0,0 +1,210 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String tabs1 = ParamUtil.getString(request, "tabs1", "my-sites");
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/my_sites/view");
+portletURL.setParameter("tabs1", tabs1);
+
+pageContext.setAttribute("portletURL", portletURL);
+
+request.setAttribute("view.jsp-tabs1", tabs1);
+%>
+
+<liferay-ui:success key="membershipRequestSent" message="your-request-was-sent-you-will-receive-a-reply-by-email" />
+
+<aui:form action="<%= portletURL.toString() %>" method="get" name="fm">
+	<liferay-portlet:renderURLParams varImpl="portletURL" />
+
+	<liferay-ui:tabs
+		names="my-sites,available-sites"
+		url="<%= portletURL.toString() %>"
+	/>
+
+	<liferay-ui:search-container
+		searchContainer="<%= new GroupSearch(renderRequest, portletURL) %>"
+	>
+
+		<%
+		GroupSearchTerms searchTerms = (GroupSearchTerms)searchContainer.getSearchTerms();
+
+		LinkedHashMap<String, Object> groupParams = new LinkedHashMap<String, Object>();
+
+		groupParams.put("site", Boolean.TRUE);
+
+		if (tabs1.equals("my-sites")) {
+			groupParams.put("usersGroups", new Long(user.getUserId()));
+			groupParams.put("active", Boolean.TRUE);
+		}
+		else if (tabs1.equals("available-sites")) {
+			List types = new ArrayList();
+
+			types.add(new Integer(GroupConstants.TYPE_SITE_OPEN));
+			types.add(new Integer(GroupConstants.TYPE_SITE_RESTRICTED));
+
+			groupParams.put("types", types);
+			groupParams.put("active", Boolean.TRUE);
+		}
+		%>
+
+		<liferay-ui:search-container-results>
+
+			<%
+			if (searchTerms.isAdvancedSearch()) {
+				total = GroupLocalServiceUtil.searchCount(company.getCompanyId(), searchTerms.getName(), searchTerms.getDescription(), groupParams, searchTerms.isAndOperator());
+
+				searchContainer.setTotal(total);
+
+				results = GroupLocalServiceUtil.search(company.getCompanyId(), searchTerms.getName(), searchTerms.getDescription(), groupParams, searchTerms.isAndOperator(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+			}
+			else {
+				total = GroupLocalServiceUtil.searchCount(company.getCompanyId(), searchTerms.getKeywords(), groupParams);
+
+				searchContainer.setTotal(total);
+
+				results = GroupLocalServiceUtil.search(company.getCompanyId(), searchTerms.getKeywords(), groupParams, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+			}
+
+			searchContainer.setResults(results);
+			%>
+
+		</liferay-ui:search-container-results>
+
+		<aui:nav-bar>
+			<aui:nav-bar-search cssClass="pull-right" file="/html/portlet/users_admin/group_search.jsp" searchContainer="<%= searchContainer %>" />
+		</aui:nav-bar>
+
+		<liferay-ui:error exception="<%= RequiredGroupException.class %>">
+
+			<%
+			RequiredGroupException rge = (RequiredGroupException)errorException;
+			%>
+
+			<c:if test="<%= rge.getType() == RequiredGroupException.CURRENT_GROUP %>">
+				<liferay-ui:message key="you-cannot-delete-this-site-because-you-are-currently-accessing-this-site" />
+			</c:if>
+
+			<c:if test="<%= rge.getType() == RequiredGroupException.PARENT_GROUP %>">
+				<liferay-ui:message key="you-cannot-delete-sites-that-have-subsites" />
+			</c:if>
+
+			<c:if test="<%= rge.getType() == RequiredGroupException.SYSTEM_GROUP %>">
+				<liferay-ui:message key="the-site-cannot-be-deleted-or-deactivated-because-it-is-a-required-system-site" />
+			</c:if>
+		</liferay-ui:error>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.model.Group"
+			keyProperty="groupId"
+			modelVar="group"
+			rowIdProperty="friendlyURL"
+		>
+
+			<%
+			PortletURL rowURL = null;
+
+			if (group.getPublicLayoutsPageCount() > 0) {
+				rowURL = renderResponse.createActionURL();
+
+				rowURL.setParameter("struts_action", "/sites_admin/page");
+				rowURL.setParameter("redirect", currentURL);
+				rowURL.setParameter("groupId", String.valueOf(group.getGroupId()));
+				rowURL.setParameter("privateLayout", Boolean.FALSE.toString());
+				rowURL.setWindowState(WindowState.NORMAL);
+			}
+			else if (tabs1.equals("my-sites") && (group.getPrivateLayoutsPageCount() > 0)) {
+				rowURL = renderResponse.createActionURL();
+
+				rowURL.setParameter("struts_action", "/sites_admin/page");
+				rowURL.setParameter("redirect", currentURL);
+				rowURL.setParameter("groupId", String.valueOf(group.getGroupId()));
+				rowURL.setParameter("privateLayout", Boolean.TRUE.toString());
+				rowURL.setWindowState(WindowState.NORMAL);
+			}
+			%>
+
+			<liferay-ui:search-container-column-text
+				buffer="buffer"
+				name="name"
+				orderable="<%= true %>"
+			>
+
+			<%
+			if (rowURL != null) {
+				buffer.append("<a href=\"");
+				buffer.append(rowURL.toString());
+				buffer.append("\" target=\"_blank\"><strong>");
+				buffer.append(HtmlUtil.escape(group.getDescriptiveName(locale)));
+				buffer.append("</strong></a>");
+			}
+			else {
+				buffer.append("<strong>");
+				buffer.append(HtmlUtil.escape(group.getDescriptiveName(locale)));
+				buffer.append("</strong>");
+			}
+
+			if (!tabs1.equals("my-sites") && Validator.isNotNull(group.getDescription())) {
+				buffer.append("<br /><em>");
+				buffer.append(HtmlUtil.escape(group.getDescription()));
+				buffer.append("</em>");
+			}
+			%>
+
+			</liferay-ui:search-container-column-text>
+
+			<%
+			LinkedHashMap<String, Object> userParams = new LinkedHashMap<String, Object>();
+
+			userParams.put("inherit", Boolean.TRUE);
+			userParams.put("usersGroups", new Long(group.getGroupId()));
+			%>
+
+			<liferay-ui:search-container-column-text
+				name="members"
+				value="<%= String.valueOf(UserLocalServiceUtil.searchCount(company.getCompanyId(), null, WorkflowConstants.STATUS_APPROVED, userParams)) %>"
+			/>
+
+			<c:if test='<%= tabs1.equals("my-sites") && PropsValues.LIVE_USERS_ENABLED %>'>
+				<liferay-ui:search-container-column-text
+					name="online-now"
+					value="<%= String.valueOf(LiveUsers.getGroupUsersCount(company.getCompanyId(), group.getGroupId())) %>"
+				/>
+			</c:if>
+
+			<liferay-ui:search-container-column-text
+				name="tags"
+			>
+				<liferay-ui:asset-tags-summary
+					className="<%= Group.class.getName() %>"
+					classPK="<%= group.getGroupId() %>"
+				/>
+			</liferay-ui:search-container-column-text>
+
+			<liferay-ui:search-container-column-jsp
+				align="right"
+				path="/html/portlet/my_sites/site_action.jsp"
+			/>
+
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/navigation/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/navigation/configuration.jsp
new file mode 100644
index 0000000..fe21a6a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/navigation/configuration.jsp
@@ -0,0 +1,176 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/navigation/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+%>
+
+<aui:row>
+	<aui:col width="<%= 50 %>">
+		<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+		<aui:form action="<%= configurationURL %>" method="post" name="fm">
+			<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+			<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+
+			<aui:fieldset column="<%= true %>">
+				<aui:select name="preferences--displayStyle--">
+					<aui:option label="custom" selected='<%= displayStyle.equals("[custom]") %>' value="[custom]" />
+
+					<optgroup label="<liferay-ui:message key="predefined" />">
+
+						<%
+						for (String displayStyleOption : PropsValues.NAVIGATION_DISPLAY_STYLE_OPTIONS) {
+						%>
+
+							<aui:option label="<%= displayStyleOption %>" selected="<%= displayStyle.equals(displayStyleOption) %>" />
+
+						<%
+						}
+						%>
+
+					</optgroup>
+				</aui:select>
+
+				<aui:select name="preferences--bulletStyle--">
+
+					<%
+					String[] bulletStyleOptions = theme.getSettingOptions("bullet-style");
+					%>
+
+					<c:choose>
+						<c:when test="<%= ArrayUtil.isEmpty(bulletStyleOptions) %>">
+							<aui:option label="default" value="" />
+						</c:when>
+						<c:otherwise>
+
+							<%
+							for (String bulletStyleOption : bulletStyleOptions) {
+							%>
+
+								<aui:option label="<%= bulletStyleOption %>" selected="<%= bulletStyle.equals(bulletStyleOption) %>" />
+
+							<%
+							}
+							%>
+
+						</c:otherwise>
+					</c:choose>
+				</aui:select>
+			</aui:fieldset>
+
+			<aui:fieldset column="<%= true %>">
+				<div id="<portlet:namespace />customDisplayOptions">
+					<aui:select label="header" name="preferences--headerType--">
+						<aui:option label="none" selected='<%= headerType.equals("none") %>' />
+						<aui:option label="portlet-title" selected='<%= headerType.equals("portlet-title") %>' />
+						<aui:option label="root-layout" selected='<%= headerType.equals("root-layout") %>' />
+						<aui:option label="breadcrumb" selected='<%= headerType.equals("breadcrumb") %>' />
+					</aui:select>
+
+					<aui:select label="root-layout" name="preferences--rootLayoutType--">
+						<aui:option label="parent-at-level" selected='<%= rootLayoutType.equals("absolute") %>' value="absolute" />
+						<aui:option label="relative-parent-up-by" selected='<%= rootLayoutType.equals("relative") %>' value="relative" />
+					</aui:select>
+
+					<aui:select name="preferences--rootLayoutLevel--">
+
+						<%
+						for (int i = 0; i <= 4; i++) {
+						%>
+
+							<aui:option label="<%= i %>" selected="<%= rootLayoutLevel == i %>" />
+
+						<%
+						}
+						%>
+
+					</aui:select>
+
+					<aui:select name="preferences--includedLayouts--">
+						<aui:option label="auto" selected='<%= includedLayouts.equals("auto") %>' />
+						<aui:option label="all" selected='<%= includedLayouts.equals("all") %>' />
+					</aui:select>
+
+					<aui:select name="preferences--nestedChildren--">
+						<aui:option label="yes" selected="<%= nestedChildren %>" value="1" />
+						<aui:option label="no" selected="<%= !nestedChildren %>" value="0" />
+					</aui:select>
+				</div>
+			</aui:fieldset>
+
+			<aui:button-row>
+				<aui:button type="submit" />
+			</aui:button-row>
+		</aui:form>
+	</aui:col>
+	<aui:col width="<%= 50 %>">
+		<liferay-portlet:preview
+			portletName="<%= portletResource %>"
+			queryString="struts_action=/navigation/view"
+			showBorders="<%= true %>"
+		/>
+	</aui:col>
+</aui:row>
+
+<aui:script use="aui-base">
+	var customDisplayOptions = A.one('#<portlet:namespace />customDisplayOptions');
+	var selectBulletStyle = A.one('#<portlet:namespace />bulletStyle');
+	var selectDisplayStyle = A.one('#<portlet:namespace />displayStyle');
+	var selectHeaderType = A.one('#<portlet:namespace />headerType');
+	var selectIncludedLayouts = A.one('#<portlet:namespace />includedLayouts');
+	var selectNestedChildren = A.one('#<portlet:namespace />nestedChildren');
+	var selectRootLayoutLevel = A.one('#<portlet:namespace />rootLayoutLevel');
+	var selectRootLayoutType = A.one('#<portlet:namespace />rootLayoutType');
+
+	var selects = A.all('#<portlet:namespace />fm select');
+
+	var curPortletBoundaryId = '#p_p_id_<%= HtmlUtil.escapeJS(portletResource) %>_';
+
+	var toggleCustomFields = function() {
+		if (customDisplayOptions) {
+			var data = {};
+
+			var action = 'hide';
+
+			var displayStyle = selectDisplayStyle.val();
+
+			if (displayStyle == '[custom]') {
+				action = 'show';
+
+				data['_<%= HtmlUtil.escapeJS(portletResource) %>_headerType'] = selectHeaderType.val();
+				data['_<%= HtmlUtil.escapeJS(portletResource) %>_includedLayouts'] = selectIncludedLayouts.val();
+				data['_<%= HtmlUtil.escapeJS(portletResource) %>_nestedChildren'] = selectNestedChildren.val();
+				data['_<%= HtmlUtil.escapeJS(portletResource) %>_rootLayoutLevel'] = selectRootLayoutLevel.val();
+				data['_<%= HtmlUtil.escapeJS(portletResource) %>_rootLayoutType'] = selectRootLayoutType.val();
+			}
+
+			customDisplayOptions[action]();
+
+			data['_<%= HtmlUtil.escapeJS(portletResource) %>_bulletStyle'] = selectBulletStyle.val();
+			data['_<%= HtmlUtil.escapeJS(portletResource) %>_displayStyle'] = selectDisplayStyle.val();
+			data['_<%= HtmlUtil.escapeJS(portletResource) %>_preview'] = true;
+
+			Liferay.Portlet.refresh(curPortletBoundaryId, data);
+		}
+	}
+
+	selects.on('change', toggleCustomFields);
+
+	toggleCustomFields();
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/navigation/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/navigation/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/navigation/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/navigation/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/navigation/init.jsp
new file mode 100644
index 0000000..2cdd9a8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/navigation/init.jsp
@@ -0,0 +1,32 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%
+String portletResource = ParamUtil.getString(request, "portletResource");
+
+String bulletStyle = PrefsParamUtil.getString(portletPreferences, renderRequest, "bulletStyle", GetterUtil.getString(themeDisplay.getThemeSetting("bullet-style"), "dots"));
+String displayStyle = PrefsParamUtil.getString(portletPreferences, renderRequest, "displayStyle", PropsValues.NAVIGATION_DISPLAY_STYLE_DEFAULT);
+String headerType = PrefsParamUtil.getString(portletPreferences, renderRequest, "headerType", "root-layout");
+String includedLayouts = PrefsParamUtil.getString(portletPreferences, renderRequest, "includedLayouts", "current");
+boolean nestedChildren = PrefsParamUtil.getBoolean(portletPreferences, renderRequest, "nestedChildren", true);
+boolean preview = PrefsParamUtil.getBoolean(portletPreferences, renderRequest, "preview");
+int rootLayoutLevel = PrefsParamUtil.getInteger(portletPreferences, renderRequest, "rootLayoutLevel", 1);
+String rootLayoutType = PrefsParamUtil.getString(portletPreferences, renderRequest, "rootLayoutType", "absolute");
+%>
+
+<%@ include file="/html/portlet/navigation/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/navigation/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/navigation/view.jsp
new file mode 100644
index 0000000..74a5231
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/navigation/view.jsp
@@ -0,0 +1,28 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/navigation/init.jsp" %>
+
+<liferay-ui:navigation
+	bulletStyle="<%= bulletStyle %>"
+	displayStyle="<%= displayStyle %>"
+	headerType="<%= headerType %>"
+	includedLayouts="<%= includedLayouts %>"
+	nestedChildren="<%= nestedChildren %>"
+	preview="<%= preview %>"
+	rootLayoutLevel="<%= rootLayoutLevel %>"
+	rootLayoutType="<%= rootLayoutType %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/nested_portlets/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/nested_portlets/configuration.jsp
new file mode 100644
index 0000000..5fa1cae
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/nested_portlets/configuration.jsp
@@ -0,0 +1,85 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/nested_portlets/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+%>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+
+	<aui:fieldset label="layout-template">
+		<table border="0" cellpadding="0" cellspacing="10" style="margin-top: 10px;" width="100%">
+
+		<%
+		int CELLS_PER_ROW = 4;
+
+		String layoutTemplateId = portletPreferences.getValue("layoutTemplateId", PropsValues.NESTED_PORTLETS_LAYOUT_TEMPLATE_DEFAULT);
+
+		List<LayoutTemplate> layoutTemplates = LayoutTemplateLocalServiceUtil.getLayoutTemplates(theme.getThemeId());
+
+		layoutTemplates = PluginUtil.restrictPlugins(layoutTemplates, user);
+
+		List<String> unsupportedLayoutTemplates = ListUtil.fromArray(PropsUtil.getArray(PropsKeys.NESTED_PORTLETS_LAYOUT_TEMPLATE_UNSUPPORTED));
+
+		int i = 0;
+
+		for (LayoutTemplate layoutTemplate : layoutTemplates) {
+			if (!unsupportedLayoutTemplates.contains(layoutTemplate.getLayoutTemplateId())) {
+		%>
+
+				<c:if test="<%= (i % CELLS_PER_ROW) == 0 %>">
+					<tr>
+				</c:if>
+
+				<td align="center" width="<%= 100 / CELLS_PER_ROW %>%">
+					<img onclick="document.getElementById('<portlet:namespace />layoutTemplateId<%= i %>').checked = true;" src="<%= layoutTemplate.getStaticResourcePath() %><%= layoutTemplate.getThumbnailPath() %>" /><br />
+
+					<aui:input checked="<%= layoutTemplateId.equals(layoutTemplate.getLayoutTemplateId()) %>" id='<%= "layoutTemplateId" + i %>' label="<%= layoutTemplate.getName() %>" name="preferences--layoutTemplateId--" type="radio" value="<%= layoutTemplate.getLayoutTemplateId() %>" />
+				</td>
+
+				<c:if test="<%= (i % CELLS_PER_ROW) == (CELLS_PER_ROW - 1) %>">
+					</tr>
+				</c:if>
+
+		<%
+				i++;
+			}
+		}
+		%>
+
+		</table>
+	</aui:fieldset>
+
+	<%
+	boolean portletDecorateDefault = GetterUtil.getBoolean(themeDisplay.getThemeSetting("portlet-setup-show-borders-default"), true);
+
+	boolean portletSetupShowBorders = GetterUtil.getBoolean(portletPreferences.getValue("portletSetupShowBorders", String.valueOf(portletDecorateDefault)));
+	%>
+
+	<aui:fieldset label="display-settings">
+		<aui:input label="show-borders" name="preferences--portletSetupShowBorders--" type="checkbox" value="<%= portletSetupShowBorders %>" />
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/nested_portlets/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/nested_portlets/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/nested_portlets/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/nested_portlets/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/nested_portlets/init.jsp
new file mode 100644
index 0000000..3229a47
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/nested_portlets/init.jsp
@@ -0,0 +1,19 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ include file="/html/portlet/nested_portlets/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/nested_portlets/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/nested_portlets/view.jsp
new file mode 100644
index 0000000..d250279
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/nested_portlets/view.jsp
@@ -0,0 +1,60 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/nested_portlets/init.jsp" %>
+
+<c:if test="<%= LayoutPermissionUtil.contains(permissionChecker, layout, ActionKeys.UPDATE) %>">
+	<div class="alert alert-info hide" id="<portlet:namespace />nested-portlets-msg">
+		<liferay-ui:message key="drag-portlets-below-to-nest-them" />
+	</div>
+
+	<aui:script use="aui-base">
+		var portletWrapper = A.one('#portlet-wrapper-<%= portletDisplay.getId() %>');
+
+		if (portletWrapper) {
+			var message = portletWrapper.one('#<portlet:namespace />nested-portlets-msg');
+
+			var nestedPortlet = portletWrapper.one('.portlet, .portlet-borderless-container');
+
+			if (!nestedPortlet) {
+				message.show();
+			}
+		}
+	</aui:script>
+</c:if>
+
+<%
+try {
+	String velocityTemplateId = (String)request.getAttribute(WebKeys.NESTED_PORTLET_VELOCITY_TEMPLATE_ID);
+	String velocityTemplateContent = (String)request.getAttribute(WebKeys.NESTED_PORTLET_VELOCITY_TEMPLATE_CONTENT);
+
+	if (Validator.isNotNull(velocityTemplateId) && Validator.isNotNull(velocityTemplateContent)) {
+		RuntimePageUtil.processTemplate(pageContext, new StringTemplateResource(velocityTemplateId, velocityTemplateContent));
+	}
+}
+catch (Exception e) {
+	_log.error("Cannot render Nested Portlets portlet", e);
+}
+finally {
+	RenderRequestImpl renderRequestImpl = (RenderRequestImpl)renderRequest;
+
+	renderRequestImpl.defineObjects(portletConfig, renderResponse);
+}
+%>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.nested_portlets.view_jsp");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/network/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/network/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/network/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/network/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/network/init.jsp
new file mode 100644
index 0000000..0f1f64d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/network/init.jsp
@@ -0,0 +1,23 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.network.model.DNSLookup" %><%@
+page import="com.liferay.portlet.network.model.Whois" %><%@
+page import="com.liferay.portlet.network.util.NetworkUtil" %>
+
+<%@ include file="/html/portlet/network/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/network/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/network/view.jsp
new file mode 100644
index 0000000..f364ee2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/network/view.jsp
@@ -0,0 +1,100 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/network/init.jsp" %>
+
+<%
+String cmd = ParamUtil.getString(request, Constants.CMD);
+
+String tabs1 = ParamUtil.getString(request, "tabs1", "dns-lookup");
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/network/view");
+portletURL.setParameter("tabs1", tabs1);
+%>
+
+<form action="<portlet:renderURL><portlet:param name="struts_action" value="/network/view" /></portlet:renderURL>" method="post" name="<portlet:namespace />fm" onSubmit="submitForm(this); return false;">
+<input name="<portlet:namespace /><%= Constants.CMD %>" type="hidden" value="<%= Constants.SEARCH %>" />
+<input name="<portlet:namespace />tabs1" type="hidden" value="<%= HtmlUtil.escapeAttribute(tabs1) %>" />
+
+<liferay-ui:tabs
+	names="dns-lookup,whois"
+	url="<%= portletURL.toString() %>"
+/>
+
+<c:choose>
+	<c:when test='<%= tabs1.equals("dns-lookup") %>'>
+
+		<%
+		String domain = ParamUtil.getString(request, "domain");
+
+		DNSLookup dnsLookup = null;
+
+		if (cmd.equals(Constants.SEARCH)) {
+			dnsLookup = NetworkUtil.getDNSLookup(domain);
+
+			if (dnsLookup == null) {
+				SessionErrors.add(renderRequest, DNSLookup.class.getName());
+			}
+		}
+		%>
+
+		<liferay-ui:error exception="<%= DNSLookup.class %>" message="please-enter-a-valid-host-name-or-ip" />
+
+		<input name="<portlet:namespace />domain" size="30" type="text" value="<%= HtmlUtil.escape(domain) %>" /> <input type="submit" value="<liferay-ui:message key="search" />" />
+
+		<c:if test="<%= dnsLookup != null %>">
+<pre>
+<%= dnsLookup.getResults() %>
+</pre>
+		</c:if>
+	</c:when>
+	<c:when test='<%= tabs1.equals("whois") %>'>
+
+		<%
+		String domain = ParamUtil.getString(request, "domain");
+
+		Whois whois = null;
+
+		if (cmd.equals(Constants.SEARCH)) {
+			whois = NetworkUtil.getWhois(domain);
+
+			if (whois == null) {
+				SessionErrors.add(renderRequest, Whois.class.getName());
+			}
+		}
+		%>
+
+		<liferay-ui:error exception="<%= Whois.class %>" message="an-unexpected-error-occurred" />
+
+		<input name="<portlet:namespace />domain" size="30" type="text" value="<%= HtmlUtil.escape(domain) %>" /> <input type="submit" value="<liferay-ui:message key="search" />" />
+
+		<c:if test="<%= whois != null %>">
+<pre>
+<%= whois.getResults() %>
+</pre>
+		</c:if>
+	</c:when>
+</c:choose>
+
+</form>
+
+<c:if test='<%= windowState.equals(WindowState.MAXIMIZED) && (tabs1.equals("dns-lookup") || tabs1.equals("whois")) %>'>
+	<aui:script>
+		Liferay.Util.focusFormField(document.<portlet:namespace />fm.<portlet:namespace />domain);
+	</aui:script>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/page_comments/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/page_comments/error.jsp
new file mode 100644
index 0000000..06f304e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/page_comments/error.jsp
@@ -0,0 +1,24 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/page_comments/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/page_comments/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/page_comments/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/page_comments/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/page_comments/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/page_comments/init.jsp
new file mode 100644
index 0000000..622dda4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/page_comments/init.jsp
@@ -0,0 +1,19 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ include file="/html/portlet/page_comments/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/page_comments/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/page_comments/view.jsp
new file mode 100644
index 0000000..e25002f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/page_comments/view.jsp
@@ -0,0 +1,32 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/page_comments/init.jsp" %>
+
+<c:if test="<%= LayoutPermissionUtil.contains(permissionChecker, layout, ActionKeys.VIEW) %>">
+	<portlet:actionURL var="discussionURL">
+		<portlet:param name="struts_action" value="/page_comments/edit_page_discussion" />
+	</portlet:actionURL>
+
+	<liferay-ui:discussion
+		className="<%= Layout.class.getName() %>"
+		classPK="<%= layout.getPlid() %>"
+		formAction="<%= discussionURL %>"
+		formName="fm"
+		redirect="<%= currentURL %>"
+		userId="<%= user.getUserId() %>"
+	/>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/page_flags/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/page_flags/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/page_flags/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/page_flags/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/page_flags/init.jsp
new file mode 100644
index 0000000..5db26e6
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/page_flags/init.jsp
@@ -0,0 +1,19 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ include file="/html/portlet/page_flags/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/page_flags/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/page_flags/view.jsp
new file mode 100644
index 0000000..9ac8949
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/page_flags/view.jsp
@@ -0,0 +1,35 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/page_ratings/init.jsp" %>
+
+<%
+long reportedUserId = themeDisplay.getDefaultUserId();
+
+Group group = layout.getGroup();
+
+if (group.isUser()) {
+	reportedUserId = group.getClassPK();
+}
+%>
+
+<liferay-ui:flags
+	className="<%= Layout.class.getName() %>"
+	classPK="<%= layout.getPlid() %>"
+	contentTitle="<%= layout.getHTMLTitle(LocaleUtil.getDefault()) %>"
+	message="flag-this-page"
+	reportedUserId="<%= reportedUserId %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/page_ratings/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/page_ratings/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/page_ratings/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/page_ratings/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/page_ratings/init.jsp
new file mode 100644
index 0000000..f3e8eb0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/page_ratings/init.jsp
@@ -0,0 +1,19 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ include file="/html/portlet/page_ratings/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/page_ratings/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/page_ratings/view.jsp
new file mode 100644
index 0000000..c164d6f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/page_ratings/view.jsp
@@ -0,0 +1,22 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/page_ratings/init.jsp" %>
+
+<liferay-ui:ratings
+	className="<%= Layout.class.getName() %>"
+	classPK="<%= layout.getPlid() %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/password_generator/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/password_generator/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/password_generator/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/password_generator/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/password_generator/init.jsp
new file mode 100644
index 0000000..d66b655
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/password_generator/init.jsp
@@ -0,0 +1,19 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ include file="/html/portlet/password_generator/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/password_generator/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/password_generator/view.jsp
new file mode 100644
index 0000000..c78e63c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/password_generator/view.jsp
@@ -0,0 +1,140 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/password_generator/init.jsp" %>
+
+<%
+int length = ParamUtil.get(request, "length", 8);
+boolean numbers = ParamUtil.get(request, "numbers", true);
+boolean lowerCaseLetters = ParamUtil.get(request, "lowerCaseLetters", true);
+boolean upperCaseLetters = ParamUtil.get(request, "upperCaseLetters", true);
+
+String key = StringPool.BLANK;
+
+if (numbers) {
+	key += PwdGenerator.KEY1;
+}
+
+if (lowerCaseLetters) {
+	key += PwdGenerator.KEY3;
+}
+
+if (upperCaseLetters) {
+	key += PwdGenerator.KEY2;
+}
+
+String newPassword = StringPool.BLANK;
+
+try {
+	newPassword = PwdGenerator.getPassword(key, length);
+}
+catch (Exception e) {
+}
+%>
+
+<form action="<liferay-portlet:renderURL windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>"><portlet:param name="struts_action" value="/password_generator/view" /></liferay-portlet:renderURL>" id="<portlet:namespace />fm" method="post" name="<portlet:namespace />fm">
+
+<table class="lfr-table">
+<tr>
+	<td>
+		<liferay-ui:message key="numbers" />
+	</td>
+	<td>
+		<select name="<portlet:namespace />numbers">
+			<option <%= numbers ? "selected" : "" %> value="1"><liferay-ui:message key="yes" /></option>
+			<option <%= !numbers ? "selected" : "" %> value="0"><liferay-ui:message key="no" /></option>
+		</select>
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="lower-case-letters" />
+	</td>
+	<td>
+		<liferay-ui:input-checkbox defaultValue="<%= lowerCaseLetters %>" param="lowerCaseLetters" />
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="upper-case-letters" />
+	</td>
+	<td>
+		<liferay-ui:input-checkbox defaultValue="<%= upperCaseLetters %>" param="upperCaseLetters" />
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="length" />
+	</td>
+	<td>
+		<select name="<portlet:namespace />length">
+
+			<%
+			for (int i = 4; i <= 16; i++) {
+			%>
+
+				<option <%= (i == length) ? "selected" : "" %> value="<%= i %>"><%= i %></option>
+
+			<%
+			}
+			%>
+
+		</select>
+	</td>
+</tr>
+</table>
+
+<br />
+
+<strong><%= newPassword %></strong>
+
+<br /><br />
+
+<input type="submit" value="<liferay-ui:message key="generate" />" />
+
+</form>
+
+<aui:script use="aui-io-request,aui-parse-content">
+	var form = A.one('#<portlet:namespace />fm');
+	var parentNode = form.get('parentNode');
+
+	parentNode.plug(A.Plugin.ParseContent);
+
+	form.on(
+		'submit',
+		function(event) {
+			var uri = form.getAttribute('action');
+
+			A.io.request(
+				uri,
+				{
+					form: {
+						id: form
+					},
+					on: {
+						success: function(event, id, obj) {
+							var responseData = this.get('responseData');
+
+							parentNode.setContent(responseData);
+						}
+					}
+				}
+			);
+
+			event.halt();
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/password_policies_admin/edit_password_policy.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/password_policies_admin/edit_password_policy.jsp
new file mode 100644
index 0000000..341135e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/password_policies_admin/edit_password_policy.jsp
@@ -0,0 +1,254 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/password_policies_admin/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+String backURL = ParamUtil.getString(request, "backURL", redirect);
+
+PasswordPolicy passwordPolicy = (PasswordPolicy)request.getAttribute(WebKeys.PASSWORD_POLICY);
+
+long passwordPolicyId = BeanParamUtil.getLong(passwordPolicy, request, "passwordPolicyId");
+
+boolean defaultPolicy = BeanParamUtil.getBoolean(passwordPolicy, request, "defaultPolicy");
+%>
+
+<liferay-ui:header
+	backURL="<%= backURL %>"
+	localizeTitle="<%= (passwordPolicy == null) %>"
+	title='<%= (passwordPolicy == null) ? "new-password-policy" : passwordPolicy.getName() %>'
+/>
+
+<portlet:actionURL var="editPasswordPolicyURL">
+	<portlet:param name="struts_action" value="/password_policies_admin/edit_password_policy" />
+</portlet:actionURL>
+
+<aui:form action="<%= editPasswordPolicyURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= (passwordPolicy == null) ? Constants.ADD : Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="passwordPolicyId" type="hidden" value="<%= passwordPolicyId %>" />
+
+	<liferay-ui:error exception="<%= DuplicatePasswordPolicyException.class %>" message="please-enter-a-unique-name" />
+	<liferay-ui:error exception="<%= PasswordPolicyNameException.class %>" message="please-enter-a-valid-name" />
+
+	<aui:model-context bean="<%= passwordPolicy %>" model="<%= PasswordPolicy.class %>" />
+
+	<liferay-ui:panel-container extended="<%= true %>" id="passwordPoliciesAdminPasswordPolicyPanelContainer" persistState="<%= true %>">
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="passwordPoliciesAdminPasswordPolicyGeneralPanel" persistState="<%= true %>" title="general">
+			<aui:fieldset>
+				<aui:input autoFocus="<%= (!defaultPolicy && windowState.equals(WindowState.MAXIMIZED)) %>" disabled="<%= defaultPolicy %>" name="name" />
+
+				<aui:input autoFocus="<%= (defaultPolicy && windowState.equals(WindowState.MAXIMIZED)) %>" name="description" />
+
+				<aui:input helpMessage="changeable-help" name="changeable" />
+
+				<div class="password-policy-options" id="<portlet:namespace />changeableSettings">
+					<aui:input helpMessage="change-required-help" name="changeRequired" />
+
+					<aui:select helpMessage="minimum-age-help" label="minimum-age" name="minAge">
+						<aui:option label="none" value="0" />
+
+						<%
+						for (int i = 0; i < 15; i++) {
+						%>
+
+							<aui:option label="<%= LanguageUtil.getTimeDescription(pageContext, _DURATIONS[i] * 1000) %>" value="<%= _DURATIONS[i] %>" />
+
+						<%
+						}
+						%>
+
+					</aui:select>
+				</div>
+
+				<aui:select helpMessage="reset-ticket-max-age-help" name="resetTicketMaxAge">
+					<aui:option label="eternal" value="0" />
+
+					<%
+					for (int i = 0; i < 15; i++) {
+					%>
+
+						<aui:option label="<%= LanguageUtil.getTimeDescription(pageContext, _DURATIONS[i] * 1000) %>" value="<%= _DURATIONS[i] %>" />
+
+					<%
+					}
+					%>
+
+				</aui:select>
+			</aui:fieldset>
+		</liferay-ui:panel>
+
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="passwordPoliciesAdminPasswordPolicySyntaxPanel" persistState="<%= true %>" title="password-syntax-checking">
+			<aui:fieldset>
+
+				<aui:input helpMessage="syntax-checking-enabled-help" label="syntax-checking-enabled" name="checkSyntax" />
+
+				<div class="password-policy-options" id="<portlet:namespace />syntaxSettings">
+					<aui:input helpMessage="allow-dictionary-words-help" name="allowDictionaryWords" />
+
+					<aui:input helpMessage="minimum-alpha-numeric-help" label="minimum-alpha-numeric" name="minAlphanumeric" />
+
+					<aui:input helpMessage="minimum-length-help" label="minimum-length" name="minLength" />
+
+					<aui:input helpMessage="minimum-lower-case-help" label="minimum-lower-case" name="minLowerCase" />
+
+					<aui:input helpMessage="minimum-numbers-help" label="minimum-numbers" name="minNumbers" />
+
+					<aui:input helpMessage="minimum-symbols-help" label="minimum-symbols" name="minSymbols" />
+
+					<aui:input helpMessage="minimum-upper-case-help" label="minimum-upper-case" name="minUpperCase" />
+
+					<%
+					String taglinbHelpMessage = LanguageUtil.format(pageContext, "regular-expression-help", new Object[] {"<a href=\"http://docs.oracle.com/javase/tutorial/essential/regex\" target=\"_blank\">", "</a>"});
+					%>
+
+					<aui:input helpMessage="<%= taglinbHelpMessage %>" label="regular-expression" name="regex" />
+				</div>
+			</aui:fieldset>
+		</liferay-ui:panel>
+
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="passwordPoliciesAdminPasswordPolicyHistoryPanel" persistState="<%= true %>" title="password-history">
+			<aui:fieldset>
+
+				<aui:input helpMessage="history-enabled-help" label="history-enabled" name="history" />
+
+				<div class="password-policy-options" id="<portlet:namespace />historySettings">
+					<aui:select helpMessage="history-count-help" name="historyCount">
+
+						<%
+						for (int i = 2; i < 25; i++) {
+						%>
+
+							<aui:option label="<%= i %>" />
+
+						<%
+						}
+						%>
+
+					</aui:select>
+				</div>
+			</aui:fieldset>
+		</liferay-ui:panel>
+
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="passwordPoliciesAdminPasswordPolicyExpirationPanel" persistState="<%= true %>" title="password-expiration">
+			<aui:fieldset>
+
+				<aui:input helpMessage="expiration-enabled-help" label="expiration-enabled" name="expireable" />
+
+				<div class="password-policy-options" id="<portlet:namespace />expirationSettings">
+					<aui:select helpMessage="maximum-age-help" label="maximum-age" name="maxAge">
+
+						<%
+						for (int i = 15; i < _DURATIONS.length; i++) {
+						%>
+
+							<aui:option label="<%= LanguageUtil.getTimeDescription(pageContext, _DURATIONS[i] * 1000) %>" value="<%= _DURATIONS[i] %>" />
+
+						<%
+						}
+						%>
+
+					</aui:select>
+
+					<aui:select helpMessage="warning-time-help" name="warningTime">
+
+						<%
+						for (int i = 7; i < 16; i++) {
+						%>
+
+							<aui:option label="<%= LanguageUtil.getTimeDescription(pageContext, _DURATIONS[i] * 1000) %>" value="<%= _DURATIONS[i] %>" />
+
+						<%
+						}
+						%>
+
+						<aui:option label="do-not-warn" value="<%= 0 %>" />
+					</aui:select>
+
+					<aui:input helpMessage="grace-limit-help" name="graceLimit" />
+				</div>
+			</aui:fieldset>
+		</liferay-ui:panel>
+
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="passwordPoliciesAdminPasswordPolicyLockoutPanel" persistState="<%= true %>" title="lockout">
+			<aui:fieldset>
+				<aui:input helpMessage="lockout-enabled-help" label="lockout-enabled" name="lockout" />
+
+				<div class="password-policy-options" id="<portlet:namespace />lockoutSettings">
+					<aui:input helpMessage="maximum-failure-help" label="maximum-failure" name="maxFailure" />
+
+					<aui:select helpMessage="reset-failure-count-help" name="resetFailureCount">
+
+						<%
+						for (int i = 0; i < 15; i++) {
+						%>
+
+							<aui:option label="<%= LanguageUtil.getTimeDescription(pageContext, _DURATIONS[i] * 1000) %>" value="<%= _DURATIONS[i] %>" />
+
+						<%
+						}
+						%>
+
+					</aui:select>
+
+					<aui:select helpMessage="lockout-duration-help" name="lockoutDuration">
+						<aui:option label="until-unlocked-by-an-administrator" value="0" />
+
+						<%
+						for (int i = 0; i < 15; i++) {
+						%>
+
+							<aui:option label="<%= LanguageUtil.getTimeDescription(pageContext, _DURATIONS[i] * 1000) %>" value="<%= _DURATIONS[i] %>" />
+
+						<%
+						}
+						%>
+
+					</aui:select>
+				</div>
+			</aui:fieldset>
+		</liferay-ui:panel>
+	</liferay-ui:panel-container>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	Liferay.Util.toggleBoxes('<portlet:namespace />changeableCheckbox', '<portlet:namespace />changeableSettings');
+	Liferay.Util.toggleBoxes('<portlet:namespace />checkSyntaxCheckbox', '<portlet:namespace />syntaxSettings');
+	Liferay.Util.toggleBoxes('<portlet:namespace />historyCheckbox', '<portlet:namespace />historySettings');
+	Liferay.Util.toggleBoxes('<portlet:namespace />expireableCheckbox', '<portlet:namespace />expirationSettings');
+	Liferay.Util.toggleBoxes('<portlet:namespace />lockoutCheckbox', '<portlet:namespace />lockoutSettings');
+</aui:script>
+
+<%
+if (passwordPolicy != null) {
+	PortalUtil.addPortletBreadcrumbEntry(request, passwordPolicy.getName(), null);
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit"), currentURL);
+}
+else {
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "add-user"), currentURL);
+}
+%>
+
+<%!
+private static final long[] _DURATIONS = {300, 600, 1800, 3600, 7200, 10800, 21600, 43200, 86400, 172800, 259200, 345600, 432000, 518400, 604800, 1209600, 1814400, 2419200, 4838400, 7862400, 15724800, 31449600};
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/password_policies_admin/edit_password_policy_assignments.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/password_policies_admin/edit_password_policy_assignments.jsp
new file mode 100644
index 0000000..8341996
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/password_policies_admin/edit_password_policy_assignments.jsp
@@ -0,0 +1,267 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/password_policies_admin/init.jsp" %>
+
+<%
+String tabs1 = ParamUtil.getString(request, "tabs1");
+String tabs2 = ParamUtil.getString(request, "tabs2", "users");
+String tabs3 = ParamUtil.getString(request, "tabs3", "current");
+
+int cur = ParamUtil.getInteger(request, SearchContainer.DEFAULT_CUR_PARAM);
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+PasswordPolicy passwordPolicy = (PasswordPolicy)request.getAttribute(WebKeys.PASSWORD_POLICY);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/password_policies_admin/edit_password_policy_assignments");
+portletURL.setParameter("tabs1", tabs1);
+portletURL.setParameter("redirect", redirect);
+portletURL.setParameter("passwordPolicyId", String.valueOf(passwordPolicy.getPasswordPolicyId()));
+
+PortalUtil.addPortletBreadcrumbEntry(request, passwordPolicy.getName(), null);
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "assign-members"), portletURL.toString());
+
+portletURL.setParameter("tabs2", tabs2);
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, tabs2), portletURL.toString());
+
+portletURL.setParameter("tabs3", tabs3);
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	localizeTitle="<%= false %>"
+	title="<%= passwordPolicy.getName() %>"
+/>
+
+<liferay-ui:tabs
+	names="users,organizations"
+	param="tabs2"
+	url="<%= portletURL.toString() %>"
+/>
+
+<portlet:actionURL var="editAssignmentsURL">
+	<portlet:param name="struts_action" value="/password_policies_admin/edit_password_policy_assignments" />
+</portlet:actionURL>
+
+<aui:form action="<%= editAssignmentsURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="tabs1" type="hidden" value="<%= tabs1 %>" />
+	<aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
+	<aui:input name="tabs3" type="hidden" value="<%= tabs3 %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="assignmentsRedirect" type="hidden" />
+	<aui:input name="passwordPolicyId" type="hidden" value="<%= String.valueOf(passwordPolicy.getPasswordPolicyId()) %>" />
+
+	<c:choose>
+		<c:when test='<%= tabs2.equals("users") %>'>
+			<aui:input name="addUserIds" type="hidden" />
+			<aui:input name="removeUserIds" type="hidden" />
+
+			<liferay-ui:tabs
+				names="current,available"
+				param="tabs3"
+				url="<%= portletURL.toString() %>"
+			/>
+
+			<liferay-ui:search-container
+				rowChecker="<%= new UserPasswordPolicyChecker(renderResponse, passwordPolicy) %>"
+				searchContainer="<%= new UserSearch(renderRequest, portletURL) %>"
+				var="userSearchContainer"
+			>
+				<liferay-ui:search-form
+					page="/html/portlet/users_admin/user_search.jsp"
+				/>
+
+				<%
+				UserSearchTerms searchTerms = (UserSearchTerms)userSearchContainer.getSearchTerms();
+
+				LinkedHashMap<String, Object> userParams = new LinkedHashMap<String, Object>();
+
+				if (tabs3.equals("current")) {
+					userParams.put("usersPasswordPolicies", new Long(passwordPolicy.getPasswordPolicyId()));
+				}
+				%>
+
+				<liferay-ui:search-container-results>
+					<%@ include file="/html/portlet/users_admin/user_search_results.jspf" %>
+				</liferay-ui:search-container-results>
+
+				<liferay-ui:search-container-row
+					className="com.liferay.portal.model.User"
+					escapedModel="<%= true %>"
+					keyProperty="userId"
+					modelVar="user2"
+					rowIdProperty="screenName"
+				>
+					<liferay-ui:search-container-column-text
+						name="name"
+						value="<%= HtmlUtil.escape(user2.getFullName()) %>"
+					/>
+
+					<liferay-ui:search-container-column-text
+						name="screen-name"
+						value="<%= HtmlUtil.escape(user2.getScreenName()) %>"
+					/>
+				</liferay-ui:search-container-row>
+
+				<div class="separator"><!-- --></div>
+
+				<%
+				String taglibOnClick = renderResponse.getNamespace() + "updatePasswordPolicyUsers('" + portletURL.toString() + StringPool.AMPERSAND + renderResponse.getNamespace() + "cur=" + cur + "');";
+				%>
+
+				<aui:button onClick="<%= taglibOnClick %>" value="update-associations" />
+
+				<liferay-ui:search-iterator />
+			</liferay-ui:search-container>
+		</c:when>
+		<c:when test='<%= tabs2.equals("organizations") %>'>
+			<aui:input name="addOrganizationIds" type="hidden" />
+			<aui:input name="removeOrganizationIds" type="hidden" />
+
+			<liferay-ui:tabs
+				names="current,available"
+				param="tabs3"
+				url="<%= portletURL.toString() %>"
+			/>
+
+			<liferay-ui:search-container
+				rowChecker="<%= new OrganizationPasswordPolicyChecker(renderResponse, passwordPolicy) %>"
+				searchContainer="<%= new OrganizationSearch(renderRequest, portletURL) %>"
+				var="organizationSearchContainer"
+			>
+				<liferay-ui:search-form
+					page="/html/portlet/users_admin/organization_search.jsp"
+				/>
+
+				<%
+				OrganizationSearchTerms searchTerms = (OrganizationSearchTerms)organizationSearchContainer.getSearchTerms();
+
+				long parentOrganizationId = OrganizationConstants.ANY_PARENT_ORGANIZATION_ID;
+
+				LinkedHashMap<String, Object> organizationParams = new LinkedHashMap<String, Object>();
+
+				if (tabs3.equals("current")) {
+					organizationParams.put("organizationsPasswordPolicies", new Long(passwordPolicy.getPasswordPolicyId()));
+				}
+				%>
+
+				<liferay-ui:search-container-results>
+					<%@ include file="/html/portlet/users_admin/organization_search_results.jspf" %>
+				</liferay-ui:search-container-results>
+
+				<liferay-ui:search-container-row
+					className="com.liferay.portal.model.Organization"
+					escapedModel="<%= true %>"
+					keyProperty="organizationId"
+					modelVar="organization"
+				>
+					<liferay-ui:search-container-column-text
+						name="name"
+						orderable="<%= true %>"
+						property="name"
+					/>
+
+					<liferay-ui:search-container-column-text
+						buffer="buffer"
+						name="parent-organization"
+					>
+
+						<%
+						if (organization.getParentOrganizationId() > 0) {
+							try {
+								Organization parentOrganization = OrganizationLocalServiceUtil.getOrganization(organization.getParentOrganizationId());
+
+								buffer.append(HtmlUtil.escape(parentOrganization.getName()));
+							}
+							catch (Exception e) {
+							}
+						}
+						%>
+
+					</liferay-ui:search-container-column-text>
+
+					<liferay-ui:search-container-column-text
+						name="type"
+						orderable="<%= true %>"
+						value="<%= LanguageUtil.get(pageContext, organization.getType()) %>"
+					/>
+
+					<liferay-ui:search-container-column-text
+						name="city"
+						value="<%= HtmlUtil.escape(organization.getAddress().getCity()) %>"
+					/>
+
+					<liferay-ui:search-container-column-text
+						name="region"
+					>
+						<liferay-ui:write bean="<%= organization %>" property="region" />
+					</liferay-ui:search-container-column-text>
+
+					<liferay-ui:search-container-column-text
+						name="country"
+					>
+						<liferay-ui:write bean="<%= organization %>" property="country" />
+					</liferay-ui:search-container-column-text>
+				</liferay-ui:search-container-row>
+
+				<div class="separator"><!-- --></div>
+
+				<%
+				String taglibOnClick = renderResponse.getNamespace() + "updatePasswordPolicyOrganizations('" + portletURL.toString() + StringPool.AMPERSAND + renderResponse.getNamespace() + "cur=" + cur + "');";
+				%>
+
+				<aui:button onClick="<%= taglibOnClick %>" value="update-associations" />
+
+				<liferay-ui:search-iterator />
+			</liferay-ui:search-container>
+		</c:when>
+	</c:choose>
+</aui:form>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />updatePasswordPolicyOrganizations',
+		function(assignmentsRedirect) {
+			document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "password_policy_organizations";
+			document.<portlet:namespace />fm.<portlet:namespace />assignmentsRedirect.value = assignmentsRedirect;
+			document.<portlet:namespace />fm.<portlet:namespace />addOrganizationIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+			document.<portlet:namespace />fm.<portlet:namespace />removeOrganizationIds.value = Liferay.Util.listUncheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['liferay-util-list-fields']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />updatePasswordPolicyUsers',
+		function(assignmentsRedirect) {
+			document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "password_policy_users";
+			document.<portlet:namespace />fm.<portlet:namespace />assignmentsRedirect.value = assignmentsRedirect;
+			document.<portlet:namespace />fm.<portlet:namespace />addUserIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+			document.<portlet:namespace />fm.<portlet:namespace />removeUserIds.value = Liferay.Util.listUncheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/password_policies_admin/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/password_policies_admin/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/password_policies_admin/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/password_policies_admin/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/password_policies_admin/init.jsp
new file mode 100644
index 0000000..0965147
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/password_policies_admin/init.jsp
@@ -0,0 +1,28 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.DuplicatePasswordPolicyException" %><%@
+page import="com.liferay.portal.PasswordPolicyNameException" %><%@
+page import="com.liferay.portal.security.ldap.LDAPSettingsUtil" %><%@
+page import="com.liferay.portal.service.permission.PasswordPolicyPermissionUtil" %><%@
+page import="com.liferay.portlet.passwordpoliciesadmin.search.OrganizationPasswordPolicyChecker" %><%@
+page import="com.liferay.portlet.passwordpoliciesadmin.search.PasswordPolicyDisplayTerms" %><%@
+page import="com.liferay.portlet.passwordpoliciesadmin.search.PasswordPolicySearch" %><%@
+page import="com.liferay.portlet.passwordpoliciesadmin.search.UserPasswordPolicyChecker" %>
+
+<%@ include file="/html/portlet/password_policies_admin/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/password_policies_admin/password_policy_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/password_policies_admin/password_policy_action.jsp
new file mode 100644
index 0000000..270398f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/password_policies_admin/password_policy_action.jsp
@@ -0,0 +1,84 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/password_policies_admin/init.jsp" %>
+
+<%
+PasswordPolicySearch searchContainer = (PasswordPolicySearch)request.getAttribute("liferay-ui:search:searchContainer");
+
+String redirect = searchContainer.getIteratorURL().toString();
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+PasswordPolicy passwordPolicy = (PasswordPolicy)row.getObject();
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= PasswordPolicyPermissionUtil.contains(permissionChecker, passwordPolicy.getPasswordPolicyId(), ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/password_policies_admin/edit_password_policy" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="passwordPolicyId" value="<%= String.valueOf(passwordPolicy.getPasswordPolicyId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= PasswordPolicyPermissionUtil.contains(permissionChecker, passwordPolicy.getPasswordPolicyId(), ActionKeys.PERMISSIONS) %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= PasswordPolicy.class.getName() %>"
+			modelResourceDescription="<%= HtmlUtil.escape(passwordPolicy.getName()) %>"
+			resourcePrimKey="<%= String.valueOf(passwordPolicy.getPasswordPolicyId()) %>"
+			var="permissionsURL"
+			windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			method="get"
+			url="<%= permissionsURL %>"
+			useDialog="<%= true %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= PasswordPolicyPermissionUtil.contains(permissionChecker, passwordPolicy.getPasswordPolicyId(), ActionKeys.ASSIGN_MEMBERS) %>">
+		<portlet:renderURL var="assignMembersURL">
+			<portlet:param name="struts_action" value="/password_policies_admin/edit_password_policy_assignments" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="passwordPolicyId" value="<%= String.valueOf(passwordPolicy.getPasswordPolicyId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="assign"
+			message="assign-members"
+			url="<%= assignMembersURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= !passwordPolicy.getDefaultPolicy() && PasswordPolicyPermissionUtil.contains(permissionChecker, passwordPolicy.getPasswordPolicyId(), ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/password_policies_admin/edit_password_policy" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="passwordPolicyId" value="<%= String.valueOf(passwordPolicy.getPasswordPolicyId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete url="<%= deleteURL %>" />
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/password_policies_admin/password_policy_search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/password_policies_admin/password_policy_search.jsp
new file mode 100644
index 0000000..62d71df
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/password_policies_admin/password_policy_search.jsp
@@ -0,0 +1,27 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/password_policies_admin/init.jsp" %>
+
+<%
+PasswordPolicySearch searchContainer = (PasswordPolicySearch)request.getAttribute("liferay-ui:search:searchContainer");
+
+PasswordPolicyDisplayTerms displayTerms = (PasswordPolicyDisplayTerms)searchContainer.getDisplayTerms();
+%>
+
+<div class="form-search">
+	<liferay-ui:input-search autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" name="<%= displayTerms.NAME %>" placeholder='<%= LanguageUtil.get(locale, "keywords") %>' />
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/password_policies_admin/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/password_policies_admin/view.jsp
new file mode 100644
index 0000000..142a52d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/password_policies_admin/view.jsp
@@ -0,0 +1,123 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/password_policies_admin/init.jsp" %>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/password_policies_admin/view");
+
+pageContext.setAttribute("portletURL", portletURL);
+
+String portletURLString = portletURL.toString();
+
+boolean passwordPolicyEnabled = LDAPSettingsUtil.isPasswordPolicyEnabled(company.getCompanyId());
+%>
+
+<aui:form action="<%= portletURLString %>" method="get" name="fm">
+	<liferay-portlet:renderURLParams varImpl="portletURL" />
+
+	<c:if test="<%= passwordPolicyEnabled %>">
+		<div class="alert alert-info">
+			<liferay-ui:message key="you-are-using-ldaps-password-policy" />
+		</div>
+	</c:if>
+
+	<%
+	PasswordPolicySearch searchContainer = new PasswordPolicySearch(renderRequest, portletURL);
+
+	List headerNames = searchContainer.getHeaderNames();
+
+	headerNames.add(StringPool.BLANK);
+	%>
+
+	<aui:nav-bar>
+		<aui:nav>
+			<portlet:renderURL var="viewPasswordPoliciesURL">
+				<portlet:param name="struts_action" value="/password_policies_admin/view" />
+			</portlet:renderURL>
+
+			<c:if test="<%= PortalPermissionUtil.contains(permissionChecker, ActionKeys.ADD_PASSWORD_POLICY) %>">
+				<portlet:renderURL var="addPasswordPolicyURL">
+					<portlet:param name="struts_action" value="/password_policies_admin/edit_password_policy" />
+					<portlet:param name="redirect" value="<%= viewPasswordPoliciesURL %>" />
+				</portlet:renderURL>
+
+				<aui:nav-item href="<%= addPasswordPolicyURL %>" iconCssClass="icon-plus" label="add" />
+			</c:if>
+		</aui:nav>
+
+		<c:if test="<%= !passwordPolicyEnabled %>">
+			<aui:nav-bar-search cssClass="pull-right" file="/html/portlet/password_policies_admin/password_policy_search.jsp" searchContainer="<%= searchContainer %>" />
+		</c:if>
+	</aui:nav-bar>
+
+	<c:if test="<%= !passwordPolicyEnabled && windowState.equals(WindowState.MAXIMIZED) %>">
+
+		<%
+		PasswordPolicyDisplayTerms searchTerms = (PasswordPolicyDisplayTerms)searchContainer.getSearchTerms();
+
+		int total = PasswordPolicyLocalServiceUtil.searchCount(company.getCompanyId(), searchTerms.getName());
+
+		searchContainer.setTotal(total);
+
+		List results = PasswordPolicyLocalServiceUtil.search(company.getCompanyId(), searchTerms.getName(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+
+		searchContainer.setResults(results);
+
+		PortletURL passwordPoliciesRedirectURL = PortletURLUtil.clone(portletURL, renderResponse);
+
+		passwordPoliciesRedirectURL.setParameter(searchContainer.getCurParam(), String.valueOf(searchContainer.getCur()));
+		%>
+
+		<aui:input name="passwordPoliciesRedirect" type="hidden" value="<%= passwordPoliciesRedirectURL.toString() %>" />
+
+		<%
+		List resultRows = searchContainer.getResultRows();
+
+		for (int i = 0; i < results.size(); i++) {
+			PasswordPolicy passwordPolicy = (PasswordPolicy)results.get(i);
+
+			ResultRow row = new ResultRow(passwordPolicy, passwordPolicy.getPasswordPolicyId(), i);
+
+			PortletURL rowURL = renderResponse.createRenderURL();
+
+			rowURL.setParameter("struts_action", "/password_policies_admin/edit_password_policy");
+			rowURL.setParameter("redirect", searchContainer.getIteratorURL().toString());
+			rowURL.setParameter("passwordPolicyId", String.valueOf(passwordPolicy.getPasswordPolicyId()));
+
+			// Name
+
+			row.addText(HtmlUtil.escape(passwordPolicy.getName()), rowURL);
+
+			// Description
+
+			row.addText(HtmlUtil.escape(passwordPolicy.getDescription()), rowURL);
+
+			// Action
+
+			row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/password_policies_admin/password_policy_action.jsp");
+
+			// Add result row
+
+			resultRows.add(row);
+		}
+		%>
+
+		<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+	</c:if>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/edit_plugin.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/edit_plugin.jsp
new file mode 100644
index 0000000..076b1f7
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/edit_plugin.jsp
@@ -0,0 +1,228 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/plugins_admin/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+String moduleId = ParamUtil.getString(request, "moduleId");
+String pluginId = ParamUtil.getString(request, "pluginId");
+String pluginType = ParamUtil.getString(request, "pluginType");
+String title = ParamUtil.getString(request, "title", pluginType);
+
+PluginSetting pluginSetting = PluginSettingLocalServiceUtil.getPluginSetting(company.getCompanyId(), pluginId, pluginType);
+
+boolean active = pluginSetting.isActive();
+String[] rolesArray = pluginSetting.getRolesArray();
+
+Portlet portlet = null;
+
+if (pluginType.equals(Plugin.TYPE_PORTLET)) {
+	String portletId = pluginId;
+
+	portlet = PortletLocalServiceUtil.getPortletById(company.getCompanyId(), portletId);
+
+	active = portlet.isActive();
+	rolesArray = portlet.getRolesArray();
+}
+%>
+
+<portlet:actionURL var="editPluginURL">
+	<portlet:param name="struts_action" value="/plugins_admin/edit_plugin" />
+</portlet:actionURL>
+
+<aui:form action="<%= editPluginURL %>" method="post" name="fm">
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="pluginId" type="hidden" value="<%= pluginId %>" />
+	<aui:input name="pluginType" type="hidden" value="<%= pluginType %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		localizeTitle="<%= false %>"
+		title="<%= title %>"
+	/>
+
+	<aui:fieldset>
+		<aui:field-wrapper label="module-id">
+			<liferay-ui:input-resource url="<%= moduleId %>" />
+		</aui:field-wrapper>
+
+		<aui:field-wrapper label="plugin-id">
+			<liferay-ui:input-resource url="<%= pluginId %>" />
+		</aui:field-wrapper>
+
+		<aui:input name="active" type="checkbox" value="<%= active %>" />
+
+		<c:choose>
+			<c:when test="<%= pluginType.equals(Plugin.TYPE_PORTLET) %>">
+				<aui:field-wrapper helpMessage="edit-plugin-permissions-help" label="permissions">
+
+					<%
+					List curActions = ResourceActionsUtil.getResourceActions(portlet.getPortletId(), null);
+
+					int maxNumberOfRolesChecked = 500;
+
+					List<Role> roles = RoleLocalServiceUtil.search(company.getCompanyId(), null, null, (Integer[])null, 0, maxNumberOfRolesChecked, new RoleRoleIdComparator(true));
+					int rolesCount = RoleLocalServiceUtil.searchCount(company.getCompanyId(), null, null, (Integer[])null);
+
+					List<Role> addToPageRoles = null;
+					List<Role> accessInControlPanelRoles = null;
+
+					if (curActions.contains(ActionKeys.ADD_TO_PAGE)) {
+						addToPageRoles = _filterRoles(roles, portlet.getPortletId(), ActionKeys.ADD_TO_PAGE);
+					}
+					else {
+						addToPageRoles = new ArrayList<Role>();
+					}
+
+					if (curActions.contains(ActionKeys.ACCESS_IN_CONTROL_PANEL)) {
+						accessInControlPanelRoles = _filterRoles(roles, portlet.getPortletId(), ActionKeys.ACCESS_IN_CONTROL_PANEL);
+					}
+					else {
+						accessInControlPanelRoles = new ArrayList<Role>();
+					}
+					%>
+
+					<c:if test="<%= rolesCount > maxNumberOfRolesChecked %>">
+						<div class="alert alert-block">
+							<%= LanguageUtil.format(pageContext, "the-portal-has-more-roles-than-the-maximum-that-can-be-checked-x", maxNumberOfRolesChecked) %>
+						</div>
+					</c:if>
+
+					<c:if test="<%= !addToPageRoles.isEmpty() %>">
+						<div class="permission-group">
+							<b><liferay-ui:message key="action.ADD_TO_PAGE" /></b>: <liferay-ui:message key="the-users-with-the-following-roles-can-add-this-portlet-to-the-pages-they-manage" />
+
+							<liferay-ui:search-container >
+								<liferay-ui:search-container-results
+									results="<%= addToPageRoles %>"
+								/>
+
+								<liferay-ui:search-container-row
+									className="com.liferay.portal.model.Role"
+									keyProperty="name"
+									modelVar="role"
+
+								>
+									<liferay-util:param name="className" value="<%= RolesAdminUtil.getCssClassName(role) %>" />
+									<liferay-util:param name="classHoverName" value="<%= RolesAdminUtil.getCssClassName(role) %>" />
+
+									<liferay-ui:search-container-column-text
+										name="name"
+										property="name"
+									/>
+
+									<liferay-ui:search-container-column-text
+										align="right"
+									>
+										<liferay-portlet:renderURL portletName="<%= PortletKeys.ROLES_ADMIN %>" var="editURL">
+											<portlet:param name="struts_action" value="/roles_admin/edit_role_permissions" />
+											<portlet:param name="<%= Constants.CMD %>" value="edit" />
+											<portlet:param name="tabs1" value="roles" />
+											<portlet:param name="roleId" value="<%= String.valueOf(role.getRoleId()) %>" />
+											<portlet:param name="portletResource" value="<%= portlet.getPortletId() %>" />
+										</liferay-portlet:renderURL>
+
+										<liferay-ui:icon image="edit" label="<%= true %>" message="change" url="<%= editURL %>" />
+									</liferay-ui:search-container-column-text>
+								</liferay-ui:search-container-row>
+
+								<liferay-ui:search-iterator type="more" />
+							</liferay-ui:search-container>
+						</div>
+					</c:if>
+
+					<c:if test="<%= !accessInControlPanelRoles.isEmpty() %>">
+						<div class="permission-group">
+							<strong><liferay-ui:message key="action.ACCESS_IN_CONTROL_PANEL" /></strong>: <liferay-ui:message key="the-users-with-the-following-roles-can-access-this-portlet-in-the-control-panel" />
+
+							<liferay-ui:search-container >
+								<liferay-ui:search-container-results
+									results="<%= accessInControlPanelRoles %>"
+								/>
+
+								<liferay-ui:search-container-row
+									className="com.liferay.portal.model.Role"
+									keyProperty="name"
+									modelVar="role"
+								>
+									<liferay-util:param name="className" value="<%= RolesAdminUtil.getCssClassName(role) %>" />
+									<liferay-util:param name="classHoverName" value="<%= RolesAdminUtil.getCssClassName(role) %>" />
+
+									<liferay-ui:search-container-column-text
+										name="name"
+										property="name"
+									/>
+
+									<liferay-ui:search-container-column-text
+										align="right"
+									>
+										<liferay-portlet:renderURL portletName="<%= PortletKeys.ROLES_ADMIN %>" var="editURL">
+											<portlet:param name="struts_action" value="/roles_admin/edit_role_permissions" />
+											<portlet:param name="<%= Constants.CMD %>" value="edit" />
+											<portlet:param name="tabs1" value="roles" />
+											<portlet:param name="roleId" value="<%= String.valueOf(role.getRoleId()) %>" />
+											<portlet:param name="portletResource" value="<%= portlet.getPortletId() %>" />
+										</liferay-portlet:renderURL>
+
+										<liferay-ui:icon image="edit" label="<%= true %>" message="change" url="<%= editURL %>" />
+									</liferay-ui:search-container-column-text>
+								</liferay-ui:search-container-row>
+
+								<liferay-ui:search-iterator type="more" />
+							</liferay-ui:search-container>
+						</div>
+					</c:if>
+
+					<c:if test="<%= addToPageRoles.isEmpty() && accessInControlPanelRoles.isEmpty() %>">
+						<liferay-ui:message key="only-administrators-can-use-this-portlet" />
+					</c:if>
+				</aui:field-wrapper>
+			</c:when>
+			<c:otherwise>
+				<aui:input cssClass="lfr-textarea-container" helpMessage="enter-one-role-name-per-line-a-user-must-belong-to-one-of-these-roles-in-order-to-add-this-plugin-to-a-page" name="roles" type="textarea" value='<%= StringUtil.merge(rolesArray, "\n") %>' />
+			</c:otherwise>
+		</c:choose>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<%!
+private List<Role> _filterRoles(List<Role> roles, String portletId, String actionId) throws Exception {
+	List<Role> filteredRoles = new ArrayList<Role>(0);
+
+	for (Role role : roles) {
+		if ((role.getType() == RoleConstants.TYPE_REGULAR) && _hasPermission(role, actionId, portletId, ResourceConstants.SCOPE_COMPANY) || _hasPermission(role, actionId, portletId, ResourceConstants.SCOPE_GROUP)) {
+			filteredRoles.add(role);
+		}
+		else if (_hasPermission(role, actionId, portletId, ResourceConstants.SCOPE_GROUP_TEMPLATE)) {
+			filteredRoles.add(role);
+		}
+	}
+
+	return filteredRoles;
+}
+
+private boolean _hasPermission(Role role, String actionId, String resourceName, Integer scope) throws Exception {
+	return ResourcePermissionLocalServiceUtil.hasScopeResourcePermission(role.getCompanyId(), resourceName, scope, role.getRoleId(), actionId);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/error.jsp
new file mode 100644
index 0000000..73ef6a8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/error.jsp
@@ -0,0 +1,24 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/plugins_admin/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/init.jsp
new file mode 100644
index 0000000..ba8c867
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/init.jsp
@@ -0,0 +1,21 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.util.comparator.RoleRoleIdComparator" %>
+
+<%@ include file="/html/portlet/plugins_admin/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/layout_templates.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/layout_templates.jspf
new file mode 100644
index 0000000..a58cb07
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/layout_templates.jspf
@@ -0,0 +1,123 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<c:if test="<%= marketplaceURL != null %>">
+
+	<%
+	String taglibOnClick = "submitForm(document." + renderResponse.getNamespace() + "fm , '" + marketplaceURL.toString() +"');";
+	%>
+
+	<aui:button onClick="<%= taglibOnClick %>" value="install-more-layout-templates" />
+
+	<br /><br />
+</c:if>
+
+<%
+List<String> headerNames = new ArrayList<String>();
+
+headerNames.add("layout-template");
+headerNames.add("active");
+headerNames.add("roles");
+
+SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, portletURL, headerNames, null);
+
+List layoutTemplates = layoutTemplates = LayoutTemplateLocalServiceUtil.getLayoutTemplates();
+
+int total = layoutTemplates.size();
+
+searchContainer.setTotal(total);
+
+List results = ListUtil.subList(layoutTemplates, searchContainer.getStart(), searchContainer.getEnd());
+
+searchContainer.setResults(results);
+
+List resultRows = searchContainer.getResultRows();
+
+for (int i = 0; i < results.size(); i++) {
+	LayoutTemplate layoutTemplate = (LayoutTemplate)results.get(i);
+
+	PluginPackage pluginPackage = layoutTemplate.getPluginPackage();
+	PluginSetting pluginSetting = PluginSettingLocalServiceUtil.getPluginSetting(company.getCompanyId(), layoutTemplate.getLayoutTemplateId(), Plugin.TYPE_LAYOUT_TEMPLATE);
+
+	ResultRow row = new ResultRow(layoutTemplate, layoutTemplate.getLayoutTemplateId(), i);
+
+	PortletURL rowURL = renderResponse.createRenderURL();
+
+	rowURL.setParameter("struts_action", "/plugins_admin/edit_plugin");
+	rowURL.setParameter("redirect", currentURL);
+
+	if (pluginPackage != null) {
+		rowURL.setParameter("moduleId", pluginPackage.getModuleId());
+	}
+
+	rowURL.setParameter("pluginId", layoutTemplate.getLayoutTemplateId());
+	rowURL.setParameter("pluginType", Plugin.TYPE_LAYOUT_TEMPLATE);
+	rowURL.setParameter("title", layoutTemplate.getName());
+
+	// Name and thumbnail
+
+	StringBundler sb = new StringBundler();
+
+	if (showEditPluginHREF) {
+		sb.append("<a href=\"");
+		sb.append(rowURL.toString());
+		sb.append("\">");
+	}
+
+	sb.append("<img align=\"left\" src=\"");
+	sb.append(layoutTemplate.getStaticResourcePath());
+	sb.append(layoutTemplate.getThumbnailPath());
+	sb.append("\" style=\"margin-right: 10px\" />");
+	sb.append(layoutTemplate.getName());
+
+	if (showEditPluginHREF) {
+		sb.append("</a>");
+	}
+
+	sb.append("<br />");
+	sb.append(LanguageUtil.get(pageContext, "package"));
+	sb.append(": ");
+
+	if (pluginPackage == null) {
+		sb.append(LanguageUtil.get(pageContext, "unknown"));
+	}
+	else {
+		sb.append(pluginPackage.getName());
+
+		if (pluginPackage.getContext() != null) {
+			sb.append(" (");
+			sb.append(pluginPackage.getContext());
+			sb.append(StringPool.CLOSE_PARENTHESIS);
+		}
+	}
+
+	row.addText(sb.toString());
+
+	// Active
+
+	row.addText(LanguageUtil.get(pageContext, (pluginSetting.isActive() ? "yes" : "no")));
+
+	// Roles
+
+	row.addText(StringUtil.merge(pluginSetting.getRolesArray(), ", "));
+
+	// Add result row
+
+	resultRows.add(row);
+}
+%>
+
+<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/plugins.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/plugins.jspf
new file mode 100644
index 0000000..68f5f01
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/plugins.jspf
@@ -0,0 +1,37 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:tabs
+	names="portlet-plugins,theme-plugins,layout-template-plugins"
+	param="tabs2"
+	url="<%= portletURL.toString() %>"
+/>
+
+<c:choose>
+	<c:when test='<%= tabs2.equals("theme-plugins") %>'>
+		<%@ include file="/html/portlet/plugins_admin/themes.jspf" %>
+	</c:when>
+	<c:when test='<%= tabs2.equals("layout-template-plugins") %>'>
+		<%@ include file="/html/portlet/plugins_admin/layout_templates.jspf" %>
+	</c:when>
+	<c:when test='<%= tabs2.equals("hook-plugins") %>'>
+	</c:when>
+	<c:when test='<%= tabs2.equals("web-plugins") %>'>
+	</c:when>
+	<c:otherwise>
+		<%@ include file="/html/portlet/plugins_admin/portlets.jspf" %>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/portlets.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/portlets.jspf
new file mode 100644
index 0000000..8f3f3ff
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/portlets.jspf
@@ -0,0 +1,161 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<c:if test="<%= marketplaceURL != null %>">
+
+	<%
+	String taglibOnClick = "submitForm(document." + renderResponse.getNamespace() + "fm , '" + marketplaceURL.toString() +"');";
+	%>
+
+	<aui:button onClick="<%= taglibOnClick %>" value="install-more-portlets" />
+
+	<br /><br />
+</c:if>
+
+<%
+List<String> headerNames = new ArrayList<String>();
+
+headerNames.add("portlet");
+headerNames.add("active");
+
+if (showReindexButton) {
+	headerNames.add("search-index");
+}
+
+SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, portletURL, headerNames, null);
+
+List<Portlet> portlets = PortletLocalServiceUtil.getPortlets(company.getCompanyId(), false, false);
+
+portlets = ListUtil.sort(portlets, new PortletTitleComparator(application, locale));
+
+int total = portlets.size();
+
+searchContainer.setTotal(total);
+
+List<Portlet> results = ListUtil.subList(portlets, searchContainer.getStart(), searchContainer.getEnd());
+
+searchContainer.setResults(results);
+
+List resultRows = searchContainer.getResultRows();
+
+for (int i = 0; i < results.size(); i++) {
+	Portlet portlet = results.get(i);
+
+	PluginPackage pluginPackage = portlet.getPluginPackage();
+
+	ResultRow row = new ResultRow(portlet, portlet.getId(), i);
+
+	PortletURL rowURL = renderResponse.createRenderURL();
+
+	rowURL.setParameter("struts_action", "/plugins_admin/edit_plugin");
+	rowURL.setParameter("redirect", currentURL);
+
+	if (pluginPackage != null) {
+		rowURL.setParameter("moduleId", pluginPackage.getModuleId());
+	}
+
+	rowURL.setParameter("pluginId", portlet.getPortletId());
+	rowURL.setParameter("pluginType", Plugin.TYPE_PORTLET);
+
+	String title = PortalUtil.getPortletTitle(portlet, application, locale);
+
+	rowURL.setParameter("title", title);
+
+	// Name and description
+
+	StringBundler sb = new StringBundler();
+
+	String displayName = portlet.getDisplayName();
+
+	if (showEditPluginHREF) {
+		sb.append("<a href=\"");
+		sb.append(rowURL.toString());
+		sb.append("\">");
+	}
+
+	sb.append(title);
+
+	if (showEditPluginHREF) {
+		sb.append("</a>");
+	}
+
+	sb.append("<br />");
+	sb.append(LanguageUtil.get(pageContext, "package"));
+	sb.append(": ");
+
+	if (pluginPackage == null) {
+		sb.append(LanguageUtil.get(pageContext, "unknown"));
+	}
+	else {
+		sb.append(pluginPackage.getName());
+
+		if (pluginPackage.getContext() != null) {
+			sb.append(" (");
+			sb.append(pluginPackage.getContext());
+			sb.append(StringPool.CLOSE_PARENTHESIS);
+		}
+	}
+
+	if (Validator.isNotNull(displayName) && !title.equals(displayName)) {
+		sb.append("<br />");
+		sb.append(portlet.getDisplayName());
+	}
+
+	row.addText(sb.toString());
+
+	// Active
+
+	row.addText(LanguageUtil.get(pageContext, (portlet.isActive() ? "yes" : "no")));
+
+	// Search index
+
+	if (showReindexButton) {
+		List<String> indexerClasses = portlet.getIndexerClasses();
+
+		if (!indexerClasses.isEmpty()) {
+			sb.setIndex(0);
+
+			sb.append("<input onclick=\"");
+			sb.append(renderResponse.getNamespace());
+			sb.append("reindexPortlet('");
+			sb.append(portlet.getPortletId());
+			sb.append("');\" type=\"button\" value=\"");
+			sb.append(LanguageUtil.get(pageContext, "reindex"));
+			sb.append("\" />");
+
+			row.addText(sb.toString());
+		}
+		else {
+			row.addText(StringPool.BLANK);
+		}
+	}
+
+	// Add result row
+
+	resultRows.add(row);
+}
+%>
+
+<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+
+<c:if test="<%= showReindexButton %>">
+	<aui:script>
+		function <portlet:namespace />reindexPortlet(portletId) {
+			document.<portlet:namespace />fm.<portlet:namespace />portletId.value = portletId;
+			<portlet:namespace />saveServer('reindex');
+		}
+	</aui:script>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/themes.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/themes.jspf
new file mode 100644
index 0000000..ffa725a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/themes.jspf
@@ -0,0 +1,141 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<c:if test="<%= marketplaceURL != null %>">
+
+	<%
+	String taglibOnClick = "submitForm(document." + renderResponse.getNamespace() + "fm , '" + marketplaceURL.toString() +"');";
+	%>
+
+	<aui:button onClick="<%= taglibOnClick %>" value="install-more-themes" />
+
+	<br /><br />
+</c:if>
+
+<%
+List<String> headerNames = new ArrayList<String>();
+
+headerNames.add("theme");
+headerNames.add("active");
+headerNames.add("roles");
+
+SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, portletURL, headerNames, null);
+
+List themes = ThemeLocalServiceUtil.getThemes(company.getCompanyId());
+
+int total = themes.size();
+
+searchContainer.setTotal(total);
+
+List results = ListUtil.subList(themes, searchContainer.getStart(), searchContainer.getEnd());
+
+searchContainer.setResults(results);
+
+List resultRows = searchContainer.getResultRows();
+
+for (int i = 0; i < results.size(); i++) {
+	Theme theme2 = (Theme)results.get(i);
+
+	PluginPackage pluginPackage = theme2.getPluginPackage();
+	PluginSetting pluginSetting = PluginSettingLocalServiceUtil.getPluginSetting(company.getCompanyId(), theme2.getThemeId(), Plugin.TYPE_THEME);
+
+	ResultRow row = new ResultRow(theme2, theme2.getThemeId(), i);
+
+	PortletURL rowURL = renderResponse.createRenderURL();
+
+	rowURL.setParameter("struts_action", "/plugins_admin/edit_plugin");
+	rowURL.setParameter("redirect", currentURL);
+
+	if (pluginPackage != null) {
+		rowURL.setParameter("moduleId", pluginPackage.getModuleId());
+	}
+
+	rowURL.setParameter("pluginId", theme2.getThemeId());
+	rowURL.setParameter("pluginType", Plugin.TYPE_THEME);
+	rowURL.setParameter("title", theme2.getName());
+
+	// Name and thumbnail
+
+	StringBundler sb = new StringBundler();
+
+	if (showEditPluginHREF) {
+		sb.append("<a href=\"");
+		sb.append(rowURL.toString());
+		sb.append("\">");
+	}
+
+	sb.append("<img align=\"left\" src=\"");
+	sb.append(theme2.getStaticResourcePath());
+	sb.append(theme2.getImagesPath());
+	sb.append("/thumbnail.png\" style=\"margin-right: 10px\" />");
+	sb.append(theme2.getName());
+
+	if (showEditPluginHREF) {
+		sb.append("</a>");
+	}
+
+	sb.append("<br />");
+	sb.append(LanguageUtil.get(pageContext, "package"));
+	sb.append(": ");
+
+	if (pluginPackage == null) {
+		sb.append(LanguageUtil.get(pageContext, "unknown"));
+	}
+	else {
+		sb.append(pluginPackage.getName());
+
+		if (pluginPackage.getContext() != null) {
+			sb.append(" (");
+			sb.append(pluginPackage.getContext());
+			sb.append(StringPool.CLOSE_PARENTHESIS);
+		}
+	}
+
+	List colorSchemes = theme2.getColorSchemes();
+
+	if (!colorSchemes.isEmpty()) {
+		sb.append("<br />");
+		sb.append(LanguageUtil.get(pageContext, "color-schemes"));
+		sb.append(": ");
+
+		for (int j = 0; j < colorSchemes.size(); j++) {
+			ColorScheme colorScheme2 = (ColorScheme)colorSchemes.get(j);
+
+			sb.append(colorScheme2.getName());
+
+			if ((j + 1) < colorSchemes.size()) {
+				sb.append(", ");
+			}
+		}
+	}
+
+	row.addText(sb.toString());
+
+	// Active
+
+	row.addText(LanguageUtil.get(pageContext, (pluginSetting.isActive() ? "yes" : "no")));
+
+	// Roles
+
+	row.addText(StringUtil.merge(pluginSetting.getRolesArray(), ", "));
+
+	// Add result row
+
+	resultRows.add(row);
+}
+%>
+
+<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/view.jsp
new file mode 100644
index 0000000..9fb3e03
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/plugins_admin/view.jsp
@@ -0,0 +1,33 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/plugins_admin/init.jsp" %>
+
+<%
+String tabs2 = ParamUtil.getString(request, "tabs2");
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/plugins_admin/view");
+portletURL.setParameter("tabs2", tabs2);
+
+PortletURL marketplaceURL = null;
+
+boolean showEditPluginHREF = true;
+boolean showReindexButton = false;
+%>
+
+<%@ include file="/html/portlet/plugins_admin/plugins.jspf" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/css/.sass-cache/main.css
new file mode 100644
index 0000000..de825f9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/css/.sass-cache/main.css
@@ -0,0 +1,15 @@
+.portlet-polls .choice {
+  margin-bottom: 30px; }
+  .portlet-polls .choice:after {
+    clear: both;
+    content: ".";
+    display: block;
+    height: 0;
+    visibility: hidden; }
+  .portlet-polls .choice.last-choice {
+    margin-bottom: 10px; }
+  .portlet-polls .choice .btn-delete, .portlet-polls .choice .input-localized {
+    float: left; }
+  .portlet-polls .choice .btn-delete {
+    margin-left: 10px; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/css/main.css
new file mode 100644
index 0000000..74c3682
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/css/main.css
@@ -0,0 +1,25 @@
+.portlet-polls {
+	.choice {
+		margin-bottom: 30px;
+
+		&:after {
+			clear: both;
+			content: ".";
+			display: block;
+			height: 0;
+			visibility: hidden;
+		}
+
+		&.last-choice {
+			margin-bottom: 10px;
+		}
+
+		.btn-delete, .input-localized {
+			float: left;
+		}
+
+		.btn-delete {
+			margin-left: 10px;
+		}
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/edit_question.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/edit_question.jsp
new file mode 100644
index 0000000..6c6395e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/edit_question.jsp
@@ -0,0 +1,186 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/polls/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+String referringPortletResource = ParamUtil.getString(request, "referringPortletResource");
+
+PollsQuestion question = (PollsQuestion)request.getAttribute(WebKeys.POLLS_QUESTION);
+
+long questionId = BeanParamUtil.getLong(question, request, "questionId");
+
+boolean neverExpire = ParamUtil.getBoolean(request, "neverExpire", true);
+
+if (question != null) {
+	if (question.getExpirationDate() != null) {
+		neverExpire = false;
+	}
+}
+
+List choices = new ArrayList();
+
+int oldChoicesCount = 0;
+
+if (question != null) {
+	choices = PollsChoiceLocalServiceUtil.getChoices(questionId);
+
+	oldChoicesCount = choices.size();
+}
+
+int choicesCount = ParamUtil.getInteger(request, "choicesCount", choices.size());
+
+if (choicesCount < 2) {
+	choicesCount = 2;
+}
+
+int choiceName = ParamUtil.getInteger(request, "choiceName");
+
+boolean deleteChoice = false;
+
+if (choiceName > 0) {
+	deleteChoice = true;
+}
+%>
+
+<liferay-portlet:actionURL refererPlid="<%= themeDisplay.getRefererPlid() %>" var="editQuestionURL">
+	<portlet:param name="struts_action" value="/polls/edit_question" />
+</liferay-portlet:actionURL>
+
+<aui:form action="<%= editQuestionURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveQuestion();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="referringPortletResource" type="hidden" value="<%= referringPortletResource %>" />
+	<aui:input name="questionId" type="hidden" value="<%= questionId %>" />
+	<aui:input name="choicesCount" type="hidden" value="<%= choicesCount %>" />
+	<aui:input name="choiceName" type="hidden" value="" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		localizeTitle="<%= (question == null) %>"
+		title='<%= (question == null) ? "new-question" : question.getTitle(locale) %>'
+	/>
+
+	<liferay-ui:error exception="<%= QuestionChoiceException.class %>" message="please-enter-valid-choices" />
+	<liferay-ui:error exception="<%= QuestionDescriptionException.class %>" message="please-enter-a-valid-description" />
+	<liferay-ui:error exception="<%= QuestionExpirationDateException.class %>" message="please-enter-a-valid-expiration-date" />
+	<liferay-ui:error exception="<%= QuestionTitleException.class %>" message="please-enter-a-valid-title" />
+
+	<aui:model-context bean="<%= question %>" model="<%= PollsQuestion.class %>" />
+
+	<aui:fieldset>
+		<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" name="title" />
+
+		<aui:input label="polls-question" name="description" />
+
+		<aui:input dateTogglerCheckboxLabel="never-expire" disabled="<%= neverExpire %>" name="expirationDate" />
+
+		<aui:field-wrapper label="choices">
+
+			<%
+			for (int i = 1; i <= choicesCount; i++) {
+				char c = (char)(96 + i);
+
+				PollsChoice choice = null;
+
+				String paramName = null;
+
+				if (deleteChoice && (i >= choiceName)) {
+					paramName = EditQuestionAction.CHOICE_DESCRIPTION_PREFIX + ((char)(96 + i + 1));
+				}
+				else {
+					paramName = EditQuestionAction.CHOICE_DESCRIPTION_PREFIX + c;
+				}
+
+				if ((question != null) && ((i - 1) < choices.size())) {
+					choice = (PollsChoice)choices.get(i - 1);
+				}
+			%>
+
+				<div class="choice <%= (i == choicesCount) ? "last-choice" : StringPool.BLANK %>">
+					<aui:model-context bean="<%= choice %>" model="<%= PollsChoice.class %>" />
+
+					<aui:input name="<%= EditQuestionAction.CHOICE_NAME_PREFIX + c %>" type="hidden" value="<%= c %>" />
+
+					<aui:input fieldParam="<%= paramName %>" label="<%= c + StringPool.PERIOD %>" name="description" />
+
+					<c:if test="<%= (((question == null) && (choicesCount > 2)) || ((question != null) && (choicesCount > oldChoicesCount))) && (i == choicesCount) %>">
+						<aui:button cssClass="btn-delete" onClick='<%= renderResponse.getNamespace() + "deletePollChoice(" + i + ");" %>' value="delete" />
+					</c:if>
+				</div>
+
+			<%
+			}
+			%>
+
+			<aui:button-row>
+				<aui:button cssClass="add-choice" onClick='<%= renderResponse.getNamespace() + "addPollChoice();" %>' value="add-choice" />
+			</aui:button-row>
+		</aui:field-wrapper>
+
+		<c:if test="<%= question == null %>">
+			<aui:field-wrapper label="permissions">
+				<liferay-ui:input-permissions
+					modelName="<%= PollsQuestion.class.getName() %>"
+				/>
+			</aui:field-wrapper>
+		</c:if>
+
+		<aui:button-row>
+			<aui:button type="submit" />
+
+			<aui:button href="<%= redirect %>" type="cancel" />
+		</aui:button-row>
+	</aui:fieldset>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />addPollChoice() {
+		<liferay-portlet:actionURL allowEmptyParam="<%= true %>" var="addPollChoiceURL">
+			<liferay-portlet:param name="struts_action" value="/polls/edit_question" />
+			<liferay-portlet:param name="<%= EditQuestionAction.CHOICE_DESCRIPTION_PREFIX + (char)(96 + choicesCount + 1) %>" value="" />
+		</liferay-portlet:actionURL>
+
+		document.<portlet:namespace />fm.<portlet:namespace />choicesCount.value = '<%= choicesCount + 1 %>';
+
+		submitForm(document.<portlet:namespace />fm, '<%= addPollChoiceURL %>');
+	}
+
+	function <portlet:namespace />deletePollChoice(choiceName) {
+		document.<portlet:namespace />fm.<portlet:namespace />choicesCount.value = '<%= choicesCount - 1 %>';
+		document.<portlet:namespace />fm.<portlet:namespace />choiceName.value = '<%= choiceName %>';
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />saveQuestion() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (question == null) ? Constants.ADD : Constants.UPDATE %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
+
+<%
+if (question != null) {
+	PortalUtil.addPortletBreadcrumbEntry(request, question.getTitle(locale), null);
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit"), currentURL);
+}
+else {
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "add-question"), currentURL);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/error.jsp
new file mode 100644
index 0000000..0d9e9b2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/error.jsp
@@ -0,0 +1,25 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/polls/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= NoSuchQuestionException.class %>" message="the-question-could-not-be-found" />
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/init.jsp
new file mode 100644
index 0000000..e7b5aaa
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/init.jsp
@@ -0,0 +1,41 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.polls.DuplicateVoteException" %><%@
+page import="com.liferay.portlet.polls.NoSuchChoiceException" %><%@
+page import="com.liferay.portlet.polls.NoSuchQuestionException" %><%@
+page import="com.liferay.portlet.polls.QuestionChoiceException" %><%@
+page import="com.liferay.portlet.polls.QuestionDescriptionException" %><%@
+page import="com.liferay.portlet.polls.QuestionExpirationDateException" %><%@
+page import="com.liferay.portlet.polls.QuestionTitleException" %><%@
+page import="com.liferay.portlet.polls.action.EditQuestionAction" %><%@
+page import="com.liferay.portlet.polls.model.PollsChoice" %><%@
+page import="com.liferay.portlet.polls.model.PollsQuestion" %><%@
+page import="com.liferay.portlet.polls.model.PollsVote" %><%@
+page import="com.liferay.portlet.polls.service.PollsChoiceLocalServiceUtil" %><%@
+page import="com.liferay.portlet.polls.service.PollsQuestionLocalServiceUtil" %><%@
+page import="com.liferay.portlet.polls.service.PollsVoteLocalServiceUtil" %><%@
+page import="com.liferay.portlet.polls.service.permission.PollsPermission" %><%@
+page import="com.liferay.portlet.polls.service.permission.PollsQuestionPermission" %><%@
+page import="com.liferay.portlet.polls.util.PollsUtil" %>
+
+<%
+Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(locale, timeZone);
+%>
+
+<%@ include file="/html/portlet/polls/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/question_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/question_action.jsp
new file mode 100644
index 0000000..958b2f9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/question_action.jsp
@@ -0,0 +1,68 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/polls/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+PollsQuestion question = (PollsQuestion)row.getObject();
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= PollsQuestionPermission.contains(permissionChecker, question, ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/polls/edit_question" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="questionId" value="<%= String.valueOf(question.getQuestionId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= PollsQuestionPermission.contains(permissionChecker, question, ActionKeys.PERMISSIONS) %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= PollsQuestion.class.getName() %>"
+			modelResourceDescription="<%= question.getTitle(locale) %>"
+			resourcePrimKey="<%= String.valueOf(question.getQuestionId()) %>"
+			var="permissionsURL"
+			windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			method="get"
+			url="<%= permissionsURL %>"
+			useDialog="<%= true %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= PollsQuestionPermission.contains(permissionChecker, question, ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/polls/edit_question" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="questionId" value="<%= String.valueOf(question.getQuestionId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete
+			url="<%= deleteURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/view.jsp
new file mode 100644
index 0000000..07e1ade
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/view.jsp
@@ -0,0 +1,128 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/polls/init.jsp" %>
+
+<aui:form method="post" name="fm">
+
+	<%
+	PortletURL portletURL = renderResponse.createRenderURL();
+
+	portletURL.setParameter("struts_action", "/polls/view");
+
+	List<String> headerNames = new ArrayList<String>();
+
+	headerNames.add("question");
+	headerNames.add("num-of-votes");
+	headerNames.add("last-vote-date");
+	headerNames.add("expiration-date");
+	headerNames.add(StringPool.BLANK);
+
+	SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, portletURL, headerNames, null);
+
+	int total = PollsQuestionLocalServiceUtil.getQuestionsCount(scopeGroupId);
+
+	searchContainer.setTotal(total);
+
+	List results = PollsQuestionLocalServiceUtil.getQuestions(scopeGroupId, searchContainer.getStart(), searchContainer.getEnd());
+
+	searchContainer.setResults(results);
+
+	List resultRows = searchContainer.getResultRows();
+
+	for (int i = 0; i < results.size(); i++) {
+		PollsQuestion question = (PollsQuestion)results.get(i);
+
+		question = question.toEscapedModel();
+
+		ResultRow row = new ResultRow(question, question.getQuestionId(), i);
+
+		PortletURL rowURL = renderResponse.createRenderURL();
+
+		rowURL.setParameter("struts_action", "/polls/view_question");
+		rowURL.setParameter("redirect", currentURL);
+		rowURL.setParameter("questionId", String.valueOf(question.getQuestionId()));
+
+		// Title
+
+		row.addText(question.getTitle(locale), rowURL);
+
+		// Number of votes
+
+		int votesCount = PollsVoteLocalServiceUtil.getQuestionVotesCount(question.getQuestionId());
+
+		row.addText(String.valueOf(votesCount), rowURL);
+
+		// Last vote date
+
+		if (question.getLastVoteDate() == null) {
+			row.addText(LanguageUtil.get(pageContext, "never"), rowURL);
+		}
+		else {
+			row.addDate(question.getLastVoteDate(), rowURL);
+		}
+
+		// Expiration date
+
+		if (question.getExpirationDate() == null) {
+			row.addText(LanguageUtil.get(pageContext, "never"), rowURL);
+		}
+		else {
+			row.addDate(question.getExpirationDate(), rowURL);
+		}
+
+		// Action
+
+		row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/polls/question_action.jsp");
+
+		// Add result row
+
+		resultRows.add(row);
+	}
+
+	boolean showAddPollButton = PollsPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_QUESTION);
+	boolean showPermissionsButton = PollsPermission.contains(permissionChecker, scopeGroupId, ActionKeys.PERMISSIONS);
+	%>
+
+	<aui:fieldset>
+		<c:if test="<%= showAddPollButton || showPermissionsButton %>">
+			<aui:button-row>
+				<c:if test="<%= showAddPollButton %>">
+					<portlet:renderURL var="editQuestionURL">
+						<portlet:param name="struts_action" value="/polls/edit_question" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+					</portlet:renderURL>
+
+					<aui:button href="<%= editQuestionURL %>" value="add-question" />
+				</c:if>
+
+				<c:if test="<%= showPermissionsButton %>">
+					<liferay-security:permissionsURL
+						modelResource="com.liferay.portlet.polls"
+						modelResourceDescription="<%= HtmlUtil.escape(themeDisplay.getScopeGroupName()) %>"
+						resourcePrimKey="<%= String.valueOf(scopeGroupId) %>"
+						var="permissionsURL"
+						windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+					/>
+
+					<aui:button href="<%= permissionsURL %>" useDialog="<%= true %>" value="permissions" />
+				</c:if>
+			</aui:button-row>
+		</c:if>
+
+		<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+	</aui:fieldset>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/view_question.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/view_question.jsp
new file mode 100644
index 0000000..702e622
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/view_question.jsp
@@ -0,0 +1,138 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/polls/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+PollsQuestion question = (PollsQuestion)request.getAttribute(WebKeys.POLLS_QUESTION);
+
+question = question.toEscapedModel();
+
+List<PollsChoice> choices = PollsChoiceLocalServiceUtil.getChoices(question.getQuestionId());
+
+boolean hasVoted = PollsUtil.hasVoted(request, question.getQuestionId());
+
+boolean viewResults = ParamUtil.getBoolean(request, "viewResults");
+
+if (viewResults && !PollsQuestionPermission.contains(permissionChecker, question, ActionKeys.UPDATE)) {
+	viewResults = false;
+}
+%>
+
+<portlet:actionURL var="viewQuestionActionURL">
+	<portlet:param name="struts_action" value="/polls/view_question" />
+</portlet:actionURL>
+
+<aui:form action="<%= viewQuestionActionURL %>" method="post" name="fm">
+	<portlet:renderURL var="viewQuestionRenderURL">
+		<portlet:param name="struts_action" value="/polls/view_question" />
+		<portlet:param name="redirect" value="<%= redirect %>" />
+		<portlet:param name="questionId" value="<%= String.valueOf(question.getQuestionId()) %>" />
+	</portlet:renderURL>
+
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.VOTE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= viewQuestionRenderURL %>" />
+	<aui:input name="questionId" type="hidden" value="<%= question.getQuestionId() %>" />
+
+	<liferay-ui:error exception="<%= DuplicateVoteException.class %>" message="you-may-only-vote-once" />
+	<liferay-ui:error exception="<%= NoSuchChoiceException.class %>" message="please-select-an-option" />
+
+	<aui:fieldset>
+		<liferay-ui:header
+			backURL="<%= redirect %>"
+			escapeXml="<%= false %>"
+			localizeTitle="<%= false %>"
+			title="<%= question.getTitle(locale) %>"
+		/>
+
+		<span style="font-size: x-small;">
+			<%= StringUtil.replace(question.getDescription(locale), StringPool.NEW_LINE, "<br />") %>
+		</span>
+
+		<br /><br />
+
+		<c:choose>
+			<c:when test="<%= !viewResults && !question.isExpired() && !hasVoted && PollsQuestionPermission.contains(permissionChecker, question, ActionKeys.ADD_VOTE) %>">
+				<aui:field-wrapper>
+
+					<%
+					for (PollsChoice choice : choices) {
+						choice = choice.toEscapedModel();
+					%>
+
+						<aui:input label='<%= "<strong>" + choice.getName() + ".</strong> " + choice.getDescription(locale) %>' name="choiceId" type="radio" value="<%= choice.getChoiceId() %>" />
+
+					<%
+					}
+					%>
+
+				</aui:field-wrapper>
+
+				<c:if test="<%= PollsQuestionPermission.contains(permissionChecker, question, ActionKeys.UPDATE) %>">
+					<portlet:renderURL var="viewResultsURL">
+						<portlet:param name="struts_action" value="/polls/view_question" />
+						<portlet:param name="redirect" value="<%= redirect %>" />
+						<portlet:param name="questionId" value="<%= String.valueOf(question.getQuestionId()) %>" />
+						<portlet:param name="viewResults" value="1" />
+					</portlet:renderURL>
+
+					<liferay-ui:icon
+						image="view"
+						label="<%= true %>"
+						message="view-results"
+						url="<%= viewResultsURL %>"
+					/>
+				</c:if>
+
+				<aui:button-row>
+					<aui:button type="submit" value="vote[action]" />
+
+					<aui:button href="<%= redirect %>" type="cancel" />
+				</aui:button-row>
+
+				<%
+				PortalUtil.addPortletBreadcrumbEntry(request, HtmlUtil.unescape(question.getTitle(locale)), currentURL);
+				%>
+
+			</c:when>
+			<c:otherwise>
+				<%@ include file="/html/portlet/polls/view_question_results.jspf" %>
+
+				<portlet:renderURL var="viewQuestionURL">
+					<portlet:param name="struts_action" value="/polls/view_question" />
+					<portlet:param name="redirect" value="<%= redirect %>" />
+					<portlet:param name="questionId" value="<%= String.valueOf(question.getQuestionId()) %>" />
+				</portlet:renderURL>
+
+				<aui:button-row>
+					<c:choose>
+						<c:when test="<%= !question.isExpired() && !hasVoted && PollsQuestionPermission.contains(permissionChecker, question, ActionKeys.ADD_VOTE) %>">
+							<aui:button href="<%= viewQuestionURL %>" value="back-to-vote" />
+						</c:when>
+					</c:choose>
+				</aui:button-row>
+
+				<%
+				PortalUtil.addPortletBreadcrumbEntry(request, HtmlUtil.unescape(question.getTitle(locale)), viewQuestionURL.toString());
+				PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "results"), currentURL);
+				%>
+
+			</c:otherwise>
+		</c:choose>
+	</aui:fieldset>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/view_question_results.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/view_question_results.jspf
new file mode 100644
index 0000000..7c6393c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls/view_question_results.jspf
@@ -0,0 +1,206 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+NumberFormat numberFormat = NumberFormat.getNumberInstance(locale);
+NumberFormat percentFormat = NumberFormat.getPercentInstance(locale);
+%>
+
+<table class="table table-bordered table-hover table-striped">
+<thead class="table-columns">
+<tr>
+	<td class="table-cell">
+		%
+	</td>
+	<td class="table-cell" colspan="4">
+		<liferay-ui:message key="votes" />
+	</td>
+</tr>
+</thead>
+
+<%
+int totalVotes = question.getVotesCount();
+
+for (int i = 0; i < choices.size(); i++) {
+	PollsChoice choice = (PollsChoice)choices.get(i);
+
+	choice = choice.toEscapedModel();
+
+	int choiceVotes = choice.getVotesCount();
+
+	double votesPercent = 0.0;
+
+	if (totalVotes > 0) {
+		votesPercent = (double)choiceVotes / totalVotes;
+	}
+
+	int votesPixelWidth = 35;
+
+	if (windowState.equals(WindowState.MAXIMIZED)) {
+		votesPixelWidth = 100;
+	}
+
+	int votesPercentWidth = (int)Math.floor(votesPercent * 100);
+%>
+
+<tbody class="table-data">
+<tr>
+	<td class="table-cell">
+		<%= percentFormat.format(votesPercent) %>
+	</td>
+	<td class="table-cell">
+		<%= numberFormat.format(choiceVotes) %>
+	</td>
+
+	<td class="table-cell">
+		<div class="progress-bar progress-bar-horizontal <%= votesPercentWidth == 0 ? "no-progress" : StringPool.BLANK %>" style="height: 1.4em; width: <%= votesPixelWidth %>px;">
+			<div class="progress-bar-content">
+				<div class="progress-bar-status" style="height: 100%; top: auto; width: <%= votesPercentWidth %>%; "></div>
+			</div>
+		</div>
+	</td>
+
+	<td class="table-cell">
+		<strong><%= choice.getName() %>.</strong>
+	</td>
+	<td class="table-cell">
+		<%= choice.getDescription(locale) %>
+	</td>
+</tr>
+
+<%
+}
+%>
+
+</tbody>
+</table>
+
+<br />
+
+<div>
+	<strong><liferay-ui:message key="total-votes" />:</strong> <%= numberFormat.format(totalVotes) %>
+</div>
+
+<c:if test="<%= portletName.equals(PortletKeys.POLLS) %>">
+	<br />
+
+	<div>
+		<strong><liferay-ui:message key="charts" />:</strong>
+
+		<%
+		for (int i = 0; i < _CHARTS.length; i++) {
+			String chart = _CHARTS[i];
+
+			String hrefTaglib = "javascript:var viewChartWindow = window.open('" + themeDisplay.getPathMain() + "/polls/view_chart?questionId=" + question.getQuestionId() +"&chartType=" + TextFormatter.format(chart, TextFormatter.N) + "', 'viewChart', 'directories=no,height=430,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,width=420'); void(''); viewChartWindow.focus();";
+		%>
+
+			<aui:a href="<%= hrefTaglib %>"><liferay-ui:message key="<%= chart %>" /></aui:a><%= (i != (_CHARTS.length - 1)) ? StringPool.COMMA_AND_SPACE : StringPool.BLANK %>
+
+		<%
+			}
+		%>
+
+	</div>
+
+	<c:if test="<%= PollsQuestionPermission.contains(permissionChecker, question, ActionKeys.UPDATE) %>">
+		<br />
+
+		<liferay-ui:header
+			showBackURL="<%= false %>"
+			title="actual-votes"
+		/>
+
+		<%
+		PortletURL portletURL = renderResponse.createRenderURL();
+
+		portletURL.setParameter("struts_action", "/polls/view_question");
+		portletURL.setParameter("redirect", redirect);
+		portletURL.setParameter("questionId", String.valueOf(question.getQuestionId()));
+		portletURL.setParameter("viewResults", Boolean.TRUE.toString());
+
+		List<String> headerNames = new ArrayList<String>();
+
+		headerNames.add("user");
+		headerNames.add("choice");
+		headerNames.add("vote-date");
+
+		SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, portletURL, headerNames, null);
+
+		int total = PollsVoteLocalServiceUtil.getQuestionVotesCount(question.getQuestionId());
+
+		searchContainer.setTotal(total);
+
+		List results = PollsVoteLocalServiceUtil.getQuestionVotes(question.getQuestionId(), searchContainer.getStart(), searchContainer.getEnd());
+
+		searchContainer.setResults(results);
+
+		List resultRows = searchContainer.getResultRows();
+
+		for (int i = 0; i < results.size(); i++) {
+			PollsVote vote = (PollsVote)results.get(i);
+
+			ResultRow row = new ResultRow(vote, vote.getVoteId(), i);
+
+			// User
+
+			User user2 = null;
+
+			try {
+				user2 = UserLocalServiceUtil.getUserById(vote.getUserId());
+			}
+			catch (Exception e) {
+			}
+
+			if (user2 != null) {
+				row.addText(user2.getFullName(), user2.getDisplayURL(themeDisplay));
+			}
+			else {
+				row.addText(String.valueOf(vote.getUserId()));
+			}
+
+			// Choice
+
+			PollsChoice choice = vote.getChoice();
+
+			choice = choice.toEscapedModel();
+
+			row.addText(choice.getName() + ". " + choice.getDescription(locale));
+
+			// Vote date
+
+			row.addDate(vote.getVoteDate());
+
+			// Add result row
+
+			resultRows.add(row);
+		}
+		%>
+
+		<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+	</c:if>
+</c:if>
+
+<c:if test="<%= question.isExpired() %>">
+	<br />
+
+	<div style="font-size: xx-small;">
+		<%= LanguageUtil.format(pageContext, "voting-is-disabled-because-this-poll-expired-on-x", dateFormatDateTime.format(question.getExpirationDate())) %>
+	</div>
+</c:if>
+
+<%!
+private static final String[] _CHARTS = {"area", "horizontal-bar", "line", "pie", "vertical-bar"};
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/polls_display/add_question_redirect.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls_display/add_question_redirect.jsp
new file mode 100644
index 0000000..2b31696
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls_display/add_question_redirect.jsp
@@ -0,0 +1,32 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/polls_display/init.jsp" %>
+
+<%
+Portlet portlet = PortletLocalServiceUtil.getPortletById(company.getCompanyId(), portletDisplay.getId());
+%>
+
+<aui:script use="aui-base">
+	Liferay.fire(
+		'closeWindow',
+		{
+			id: '<portlet:namespace />editQuestion',
+			portletAjaxable: <%= portlet.isAjaxable() %>,
+			refresh: '<%= portletDisplay.getId() %>'
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/polls_display/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls_display/configuration.jsp
new file mode 100644
index 0000000..977ae55
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls_display/configuration.jsp
@@ -0,0 +1,71 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/polls_display/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+questionId = ParamUtil.getLong(request, "questionId", questionId);
+
+List<PollsQuestion> questions = PollsQuestionLocalServiceUtil.getQuestions(scopeGroupId);
+
+if (scopeGroupId != themeDisplay.getCompanyGroupId()) {
+	questions = ListUtil.copy(questions);
+
+	questions.addAll(PollsQuestionLocalServiceUtil.getQuestions(themeDisplay.getCompanyGroupId()));
+}
+%>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+
+	<liferay-ui:error exception="<%= NoSuchQuestionException.class %>" message="the-question-could-not-be-found" />
+
+	<c:choose>
+		<c:when test="<%= !questions.isEmpty() %>">
+			<aui:fieldset>
+				<aui:select label="question" name="preferences--questionId--">
+					<aui:option value="" />
+
+					<%
+					for (PollsQuestion question : questions) {
+						question = question.toEscapedModel();
+					%>
+
+						<aui:option label="<%= question.getTitle(locale) %>" selected="<%= questionId == question.getQuestionId() %>" value="<%= question.getQuestionId() %>" />
+
+					<%
+					}
+					%>
+
+				</aui:select>
+			</aui:fieldset>
+		</c:when>
+		<c:otherwise>
+			<div class="alert alert-info">
+				<liferay-ui:message key="there-are-no-available-questions-for-selection" />
+			</div>
+		</c:otherwise>
+	</c:choose>
+
+	<aui:button-row>
+		<aui:button disabled="<%= questions.isEmpty() %>" type="submit" />
+	</aui:button-row>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/polls_display/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls_display/css/.sass-cache/main.css
new file mode 100644
index 0000000..bb2ffd1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls_display/css/.sass-cache/main.css
@@ -0,0 +1,6 @@
+.portlet-polls-display .no-progress {
+  filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
+  opacity: 0.4; }
+  .portlet-polls-display .no-progress .progress-bar-status {
+    display: none; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/polls_display/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls_display/css/main.css
new file mode 100644
index 0000000..6b761e4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls_display/css/main.css
@@ -0,0 +1,11 @@
+@import "compass";
+
+.portlet-polls-display {
+	.no-progress {
+		@include opacity(0.4);
+
+		.progress-bar-status {
+			display: none;
+		}
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/polls_display/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls_display/error.jsp
new file mode 100644
index 0000000..5c46885
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls_display/error.jsp
@@ -0,0 +1,19 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/polls_display/init.jsp" %>
+
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/polls_display/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls_display/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls_display/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/polls_display/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls_display/init.jsp
new file mode 100644
index 0000000..3a23748
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls_display/init.jsp
@@ -0,0 +1,37 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.polls.DuplicateVoteException" %><%@
+page import="com.liferay.portlet.polls.NoSuchChoiceException" %><%@
+page import="com.liferay.portlet.polls.NoSuchQuestionException" %><%@
+page import="com.liferay.portlet.polls.model.PollsChoice" %><%@
+page import="com.liferay.portlet.polls.model.PollsQuestion" %><%@
+page import="com.liferay.portlet.polls.model.PollsVote" %><%@
+page import="com.liferay.portlet.polls.service.PollsQuestionLocalServiceUtil" %><%@
+page import="com.liferay.portlet.polls.service.PollsVoteLocalServiceUtil" %><%@
+page import="com.liferay.portlet.polls.service.permission.PollsPermission" %><%@
+page import="com.liferay.portlet.polls.service.permission.PollsQuestionPermission" %><%@
+page import="com.liferay.portlet.polls.util.PollsUtil" %>
+
+<%
+long questionId = GetterUtil.getLong(portletPreferences.getValue("questionId", StringPool.BLANK));
+
+Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(locale, timeZone);
+%>
+
+<%@ include file="/html/portlet/polls_display/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/polls_display/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls_display/view.jsp
new file mode 100644
index 0000000..b82a3ff
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/polls_display/view.jsp
@@ -0,0 +1,179 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/polls_display/init.jsp" %>
+
+<%
+PollsQuestion question = (PollsQuestion)request.getAttribute(WebKeys.POLLS_QUESTION);
+%>
+
+<c:choose>
+	<c:when test="<%= question == null %>">
+
+		<%
+		renderRequest.setAttribute(WebKeys.PORTLET_CONFIGURATOR_VISIBILITY, Boolean.TRUE);
+		%>
+
+		<div class="alert alert-info portlet-configuration">
+			<a href="<%= portletDisplay.getURLConfiguration() %>" onClick="<%= portletDisplay.getURLConfigurationJS() %>">
+				<liferay-ui:message key="please-configure-this-portlet-to-make-it-visible-to-all-users" />
+			</a>
+		</div>
+	</c:when>
+	<c:otherwise>
+
+		<%
+		String redirect = StringPool.BLANK;
+
+		question = question.toEscapedModel();
+
+		List<PollsChoice> choices = question.getChoices();
+
+		boolean hasVoted = PollsUtil.hasVoted(request, question.getQuestionId());
+		%>
+
+		<portlet:actionURL var="voteQuestionURL">
+			<portlet:param name="struts_action" value="/polls_display/vote_question" />
+		</portlet:actionURL>
+
+		<aui:form action="<%= voteQuestionURL %>" method="post" name="fm">
+			<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.VOTE %>" />
+			<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+			<aui:input name="questionId" type="hidden" value="<%= question.getQuestionId() %>" />
+			<aui:input name="successMessage" type="hidden" value='<%= LanguageUtil.get(pageContext, "thank-you-for-your-vote") %>' />
+
+			<liferay-ui:error exception="<%= DuplicateVoteException.class %>" message="you-may-only-vote-once" />
+			<liferay-ui:error exception="<%= NoSuchChoiceException.class %>" message="please-select-an-option" />
+
+			<%= StringUtil.replace(question.getDescription(locale), StringPool.NEW_LINE, "<br />") %>
+
+			<c:choose>
+				<c:when test="<%= !question.isExpired() && !hasVoted && PollsQuestionPermission.contains(permissionChecker, question, ActionKeys.ADD_VOTE) %>">
+					<aui:fieldset>
+						<aui:field-wrapper>
+
+							<%
+							for (PollsChoice choice : choices) {
+								choice = choice.toEscapedModel();
+							%>
+
+								<aui:input label='<%= "<strong>" + choice.getName() + ".</strong> " + choice.getDescription(locale) %>' name="choiceId" type="radio" value="<%= choice.getChoiceId() %>" />
+
+							<%
+							}
+							%>
+
+						</aui:field-wrapper>
+
+						<aui:button type="submit" value="vote[action]" />
+					</aui:fieldset>
+				</c:when>
+				<c:otherwise>
+					<%@ include file="/html/portlet/polls/view_question_results.jspf" %>
+
+					<c:if test="<%= !themeDisplay.isSignedIn() && !question.isExpired() && !PollsQuestionPermission.contains(permissionChecker, question, ActionKeys.ADD_VOTE) %>">
+						<div class="alert alert-info">
+							<a href="<%= themeDisplay.getURLSignIn() %>" target="_top"><liferay-ui:message key="please-sign-in-to-vote" /></a>
+						</div>
+					</c:if>
+				</c:otherwise>
+			</c:choose>
+		</aui:form>
+	</c:otherwise>
+</c:choose>
+
+<%
+boolean hasConfigurationPermission = PortletPermissionUtil.contains(permissionChecker, layout, portletDisplay.getId(), ActionKeys.CONFIGURATION);
+
+boolean hasViewPermission = true;
+
+if (question != null) {
+	hasViewPermission = PollsQuestionPermission.contains(permissionChecker, question, ActionKeys.VIEW);
+}
+
+boolean showAddPollIcon = hasConfigurationPermission && PollsPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_QUESTION);
+boolean showEditPollIcon = (question != null) && PollsQuestionPermission.contains(permissionChecker, question, ActionKeys.UPDATE);
+boolean showIconsActions = themeDisplay.isSignedIn() && (hasConfigurationPermission || showEditPollIcon || showAddPollIcon);
+%>
+
+<c:if test="<%= hasViewPermission && showIconsActions %>">
+
+	<%
+	long controlPanelPlid = PortalUtil.getControlPanelPlid(company.getCompanyId());
+
+	PortletURL redirectURL = liferayPortletResponse.createRenderURL();
+
+	redirectURL.setParameter("struts_action", "/polls_display/add_question_redirect");
+	redirectURL.setWindowState(LiferayWindowState.POP_UP);
+	%>
+
+	<div class="lfr-meta-actions icons-container">
+		<div class="lfr-icon-actions">
+			<c:if test="<%= showEditPollIcon %>">
+				<liferay-portlet:renderURL doAsGroupId="<%= scopeGroupId %>" plid="<%= controlPanelPlid %>" portletName="<%= PortletKeys.POLLS %>" refererPlid="<%= plid %>" var="editPollURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+					<liferay-portlet:param name="struts_action" value="/polls/edit_question" />
+					<liferay-portlet:param name="redirect" value="<%= redirectURL.toString() %>" />
+					<liferay-portlet:param name="referringPortletResource" value="<%= portletDisplay.getId() %>" />
+					<liferay-portlet:param name="questionId" value="<%= String.valueOf(question.getQuestionId()) %>" />
+				</liferay-portlet:renderURL>
+
+				<%
+				String editQuestionURL = "javascript:Liferay.Util.openWindow({id: '" + liferayPortletResponse.getNamespace() + "editQuestion', title: '" + UnicodeFormatter.toString(ResourceActionsUtil.getModelResource(locale, PollsQuestion.class.getName())) + "', uri:'" + HtmlUtil.escapeURL(editPollURL.toString()) + "'});";
+				%>
+
+				<liferay-ui:icon
+					cssClass="lfr-icon-action lfr-icon-action-edit"
+					image="edit"
+					label="<%= true %>"
+					message="edit-question"
+					url="<%= editQuestionURL %>"
+				/>
+			</c:if>
+
+			<c:if test="<%= hasConfigurationPermission %>">
+				<liferay-ui:icon
+					cssClass="lfr-icon-action lfr-icon-action-configuration"
+					image="configuration"
+					label="<%= true %>"
+					message="select-question"
+					method="get"
+					onClick="<%= portletDisplay.getURLConfigurationJS() %>"
+					url="<%= portletDisplay.getURLConfiguration() %>"
+				/>
+			</c:if>
+
+			<c:if test="<%= showAddPollIcon %>">
+				<liferay-portlet:renderURL doAsGroupId="<%= scopeGroupId %>" plid="<%= controlPanelPlid %>" portletName="<%= PortletKeys.POLLS %>" refererPlid="<%= plid %>" var="addPollURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+					<liferay-portlet:param name="struts_action" value="/polls/edit_question" />
+					<liferay-portlet:param name="redirect" value="<%= redirectURL.toString() %>" />
+					<liferay-portlet:param name="referringPortletResource" value="<%= portletDisplay.getId() %>" />
+				</liferay-portlet:renderURL>
+
+				<%
+				String addQuestionURL = "javascript:Liferay.Util.openWindow({id: '" + liferayPortletResponse.getNamespace() + "editQuestion', title: '" + UnicodeFormatter.toString(ResourceActionsUtil.getModelResource(locale, PollsQuestion.class.getName())) + "', uri:'" + HtmlUtil.escapeURL(addPollURL.toString()) + "'});";
+				%>
+
+				<liferay-ui:icon
+					cssClass="lfr-icon-action lfr-icon-action-add"
+					image="add_article"
+					label="<%= true %>"
+					message="add-question"
+					url="<%= addQuestionURL %>"
+				/>
+			</c:if>
+		</div>
+	</div>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/additional_email_addresses.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/additional_email_addresses.jsp
new file mode 100644
index 0000000..38948c2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/additional_email_addresses.jsp
@@ -0,0 +1,17 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/common/additional_email_addresses.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/addresses.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/addresses.jsp
new file mode 100644
index 0000000..c8b08c8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/addresses.jsp
@@ -0,0 +1,17 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/common/addresses.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/analytics.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/analytics.jsp
new file mode 100644
index 0000000..69ee77a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/analytics.jsp
@@ -0,0 +1,27 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<%
+String adminAnalyticsTypes = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.ADMIN_ANALYTICS_TYPES);
+%>
+
+<h3><liferay-ui:message key="analytics" /></h3>
+
+<aui:fieldset>
+	<aui:input label="enter-one-analytics-system-name-per-line" name='<%= "settings--" + PropsKeys.ADMIN_ANALYTICS_TYPES + "--" %>' type="textarea" value="<%= adminAnalyticsTypes %>" />
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication.jsp
new file mode 100644
index 0000000..8f64f8f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication.jsp
@@ -0,0 +1,46 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<liferay-ui:error-marker key="errorSection" value="authentication" />
+
+<h3><liferay-ui:message key="authentication" /></h3>
+
+<liferay-ui:tabs
+	names="<%= StringUtil.merge(PropsValues.COMPANY_SETTINGS_FORM_AUTHENTICATION) %>"
+	refresh="<%= false %>"
+>
+
+	<%
+	for (String section : PropsValues.COMPANY_SETTINGS_FORM_AUTHENTICATION) {
+	%>
+
+		<liferay-ui:section>
+			<liferay-util:include page='<%= "/html/portlet/portal_settings/authentication/" + _getSectionJsp(section) + ".jsp" %>' portletId="<%= portletDisplay.getRootPortletId() %>" />
+		</liferay-ui:section>
+
+	<%
+	}
+	%>
+
+</liferay-ui:tabs>
+
+<%!
+private String _getSectionJsp(String name) {
+	return TextFormatter.format(name, TextFormatter.N);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication/cas.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication/cas.jsp
new file mode 100644
index 0000000..2c3d99f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication/cas.jsp
@@ -0,0 +1,101 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<%
+boolean casAuthEnabled = PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.CAS_AUTH_ENABLED, PropsValues.CAS_AUTH_ENABLED);
+boolean casImportFromLdap = PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.CAS_IMPORT_FROM_LDAP, PropsValues.CAS_IMPORT_FROM_LDAP);
+String casLoginURL = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.CAS_LOGIN_URL, PropsValues.CAS_LOGIN_URL);
+String casLogoutURL = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.CAS_LOGOUT_URL, PropsValues.CAS_LOGOUT_URL);
+String casServerName = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.CAS_SERVER_NAME, PropsValues.CAS_SERVER_NAME);
+String casServerURL = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.CAS_SERVER_URL, PropsValues.CAS_SERVER_URL);
+String casServiceURL = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.CAS_SERVICE_URL, PropsValues.CAS_SERVICE_URL);
+String casNoSuchUserRedirectURL = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.CAS_NO_SUCH_USER_REDIRECT_URL, PropsValues.CAS_NO_SUCH_USER_REDIRECT_URL);
+%>
+
+<aui:fieldset>
+	<liferay-ui:error key="casServerNameInvalid" message="the-cas-server-name-is-invalid" />
+	<liferay-ui:error key="casServerURLInvalid" message="the-cas-server-url-is-invalid" />
+	<liferay-ui:error key="casServiceURLInvalid" message="the-cas-service-url-is-invalid" />
+	<liferay-ui:error key="casLoginURLInvalid" message="the-cas-login-url-is-invalid" />
+	<liferay-ui:error key="casLogoutURLInvalid" message="the-cas-logout-url-is-invalid" />
+	<liferay-ui:error key="casNoSuchUserURLInvalid" message="the-cas-no-such-user-url-is-invalid" />
+	<liferay-ui:error key="casServerURLAndServiceURLConflict" message="the-cas-server-url-and-cas-service-url-cannot-both-be-set" />
+	<liferay-ui:error key="casServerURLAndServiceURLNotSet" message="either-the-cas-server-url-or-the-cas-service-url-must-be-set" />
+
+	<aui:input label="enabled" name='<%= "settings--" + PropsKeys.CAS_AUTH_ENABLED + "--" %>' type="checkbox" value="<%= casAuthEnabled %>" />
+
+	<aui:input helpMessage="import-cas-users-from-ldap-help" label="import-cas-users-from-ldap" name='<%= "settings--" + PropsKeys.CAS_IMPORT_FROM_LDAP + "--" %>' type="checkbox" value="<%= casImportFromLdap %>" />
+
+	<aui:input cssClass="lfr-input-text-container" helpMessage="cas-login-url-help" label="login-url" name='<%= "settings--" + PropsKeys.CAS_LOGIN_URL + "--" %>' type="text" value="<%= casLoginURL %>" />
+
+	<aui:input cssClass="lfr-input-text-container" helpMessage="cas-logout-url-help" label="logout-url" name='<%= "settings--" + PropsKeys.CAS_LOGOUT_URL + "--" %>' type="text" value="<%= casLogoutURL %>" />
+
+	<aui:input cssClass="lfr-input-text-container" helpMessage="cas-server-name-help" label="server-name" name='<%= "settings--" + PropsKeys.CAS_SERVER_NAME + "--" %>' type="text" value="<%= casServerName %>" />
+
+	<aui:input cssClass="lfr-input-text-container" helpMessage="cas-server-url-help" label="server-url" name='<%= "settings--" + PropsKeys.CAS_SERVER_URL + "--" %>' type="text" value="<%= casServerURL %>" />
+
+	<aui:input cssClass="lfr-input-text-container" helpMessage="cas-service-url-help" label="service-url" name='<%= "settings--" + PropsKeys.CAS_SERVICE_URL + "--" %>' type="text" value="<%= casServiceURL %>" />
+
+	<aui:input cssClass="lfr-input-text-container" helpMessage="cas-no-such-user-redirect-url-help" label="no-such-user-redirect-url" name='<%= "settings--" + PropsKeys.CAS_NO_SUCH_USER_REDIRECT_URL + "--" %>' type="text" value="<%= casNoSuchUserRedirectURL %>" />
+
+	<aui:button-row>
+
+		<%
+		String taglibOnClick = renderResponse.getNamespace() + "testCasSettings();";
+		%>
+
+		<aui:button onClick="<%= taglibOnClick %>" value="test-cas-configuration" />
+	</aui:button-row>
+</aui:fieldset>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />testCasSettings',
+		function() {
+			var A = AUI();
+
+			var data = {};
+
+			data.<portlet:namespace />casLoginURL = document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.CAS_LOGIN_URL %>--'].value;
+			data.<portlet:namespace />casLogoutURL = document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.CAS_LOGOUT_URL %>--'].value;
+			data.<portlet:namespace />casServerURL = document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.CAS_SERVER_URL %>--'].value;
+			data.<portlet:namespace />casServiceURL = document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.CAS_SERVICE_URL %>--'].value;
+
+			var url = "<portlet:renderURL windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>"><portlet:param name="struts_action" value="/portal_settings/test_cas_configuration" /></portlet:renderURL>";
+
+			var dialog = Liferay.Util.Window.getWindow(
+				{
+					dialog: {
+						destroyOnHide: true
+					},
+					title: '<%= UnicodeLanguageUtil.get(pageContext, "cas") %>'
+				}
+			);
+
+			dialog.plug(
+				A.Plugin.IO,
+				{
+					data: data,
+					uri: url
+				}
+			);
+		},
+		['aui-io-plugin-deprecated', 'aui-io-request', 'liferay-util-window']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication/facebook.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication/facebook.jsp
new file mode 100644
index 0000000..2539656
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication/facebook.jsp
@@ -0,0 +1,46 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<%
+boolean facebookConnectAuthEnabled = FacebookConnectUtil.isEnabled(company.getCompanyId());
+boolean facebookConnectVerifiedAccountRequired = FacebookConnectUtil.isVerifiedAccountRequired(company.getCompanyId());
+String facebookConnectAppId = FacebookConnectUtil.getAppId(company.getCompanyId());
+String facebookConnectAppSecret = FacebookConnectUtil.getAppSecret(company.getCompanyId());
+String facebookConnectGraphURL = FacebookConnectUtil.getGraphURL(company.getCompanyId());
+String facebookConnectOauthAuthURL = FacebookConnectUtil.getAuthURL(company.getCompanyId());
+String facebookConnectOauthTokenURL = FacebookConnectUtil.getAccessTokenURL(company.getCompanyId());
+String facebookConnectRedirectURL = FacebookConnectUtil.getRedirectURL(company.getCompanyId());
+%>
+
+<aui:fieldset>
+	<aui:input label="enabled" name='<%= "settings--" + PropsKeys.FACEBOOK_CONNECT_AUTH_ENABLED + "--" %>' type="checkbox" value="<%= facebookConnectAuthEnabled %>" />
+
+	<aui:input label="verified-account-required" name='<%= "settings--" + PropsKeys.FACEBOOK_CONNECT_VERIFIED_ACCOUNT_REQUIRED + "--" %>' type="checkbox" value="<%= facebookConnectVerifiedAccountRequired %>" />
+
+	<aui:input cssClass="lfr-input-text-container" label="application-id" name='<%= "settings--" + PropsKeys.FACEBOOK_CONNECT_APP_ID + "--" %>' type="text" value="<%= facebookConnectAppId %>" />
+
+	<aui:input cssClass="lfr-input-text-container" label="application-secret" name='<%= "settings--" + PropsKeys.FACEBOOK_CONNECT_APP_SECRET + "--" %>' type="text" value="<%= facebookConnectAppSecret %>" />
+
+	<aui:input cssClass="lfr-input-text-container" label="graph-url" name='<%= "settings--" + PropsKeys.FACEBOOK_CONNECT_GRAPH_URL + "--" %>' type="text" value="<%= facebookConnectGraphURL %>" />
+
+	<aui:input cssClass="lfr-input-text-container" label="oauth-authentication-url" name='<%= "settings--" + PropsKeys.FACEBOOK_CONNECT_OAUTH_AUTH_URL + "--" %>' type="text" value="<%= facebookConnectOauthAuthURL %>" />
+
+	<aui:input cssClass="lfr-input-text-container" label="oauth-token-url" name='<%= "settings--" + PropsKeys.FACEBOOK_CONNECT_OAUTH_TOKEN_URL + "--" %>' type="text" value="<%= facebookConnectOauthTokenURL %>" />
+
+	<aui:input cssClass="lfr-input-text-container" label="redirect-url" name='<%= "settings--" + PropsKeys.FACEBOOK_CONNECT_OAUTH_REDIRECT_URL + "--" %>' type="text" value="<%= facebookConnectRedirectURL %>" />
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication/general.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication/general.jsp
new file mode 100644
index 0000000..cc80f54
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication/general.jsp
@@ -0,0 +1,47 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<%
+String companySecurityAuthType = company.getAuthType();
+boolean companySecurityAutoLogin = company.isAutoLogin();
+boolean companySecuritySendPassword = company.isSendPassword();
+boolean companySecuritySendPasswordResetLink = company.isSendPasswordResetLink();
+boolean companySecurityStrangers = company.isStrangers();
+boolean companySecurityStrangersWithMx = company.isStrangersWithMx();
+boolean companySecurityStrangersVerify = company.isStrangersVerify();
+%>
+
+<aui:fieldset>
+	<aui:select label="how-do-users-authenticate" name='<%= "settings--" + PropsKeys.COMPANY_SECURITY_AUTH_TYPE + "--" %>'>
+		<aui:option label="by-email-address" selected="<%= companySecurityAuthType.equals(CompanyConstants.AUTH_TYPE_EA) %>" value="<%= CompanyConstants.AUTH_TYPE_EA %>" />
+		<aui:option label="by-screen-name" selected="<%= companySecurityAuthType.equals(CompanyConstants.AUTH_TYPE_SN) %>" value="<%= CompanyConstants.AUTH_TYPE_SN %>" />
+		<aui:option label="by-user-id" selected="<%= companySecurityAuthType.equals(CompanyConstants.AUTH_TYPE_ID) %>" value="<%= CompanyConstants.AUTH_TYPE_ID %>" />
+	</aui:select>
+
+	<aui:input label="allow-users-to-automatically-login" name='<%= "settings--" + PropsKeys.COMPANY_SECURITY_AUTO_LOGIN + "--" %>' type="checkbox" value="<%= companySecurityAutoLogin %>" />
+
+	<aui:input helpMessage="allow-users-to-request-forgotten-passwords-help" label="allow-users-to-request-forgotten-passwords" name='<%= "settings--" + PropsKeys.COMPANY_SECURITY_SEND_PASSWORD + "--" %>' type="checkbox" value="<%= companySecuritySendPassword %>" />
+
+	<aui:input helpMessage="allow-users-to-request-password-reset-links-help" label="allow-users-to-request-password-reset-links" name='<%= "settings--" + PropsKeys.COMPANY_SECURITY_SEND_PASSWORD_RESET_LINK + "--" %>' type="checkbox" value="<%= companySecuritySendPasswordResetLink %>" />
+
+	<aui:input label="allow-strangers-to-create-accounts" name='<%= "settings--" + PropsKeys.COMPANY_SECURITY_STRANGERS + "--" %>' type="checkbox" value="<%= companySecurityStrangers %>" />
+
+	<aui:input label="allow-strangers-to-create-accounts-with-a-company-email-address" name='<%= "settings--" + PropsKeys.COMPANY_SECURITY_STRANGERS_WITH_MX + "--" %>' type="checkbox" value="<%= companySecurityStrangersWithMx %>" />
+
+	<aui:input label="require-strangers-to-verify-their-email-address" name='<%= "settings--" + PropsKeys.COMPANY_SECURITY_STRANGERS_VERIFY + "--" %>' type="checkbox" value="<%= companySecurityStrangersVerify %>" />
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication/ldap.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication/ldap.jsp
new file mode 100644
index 0000000..7e6e6cb
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication/ldap.jsp
@@ -0,0 +1,335 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<%
+String authenticationURL = currentURL + "#_LFR_FN_authentication";
+
+boolean ldapAuthEnabled = AuthSettingsUtil.isLDAPAuthEnabled(company.getCompanyId());
+boolean ldapAuthRequired = PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.LDAP_AUTH_REQUIRED);
+boolean ldapImportEnabled = PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.LDAP_IMPORT_ENABLED, PropsValues.LDAP_IMPORT_ENABLED);
+boolean ldapImportOnStartup = PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.LDAP_IMPORT_ON_STARTUP);
+boolean ldapExportEnabled = !(PropsValues.LDAP_IMPORT_USER_PASSWORD_AUTOGENERATED && ldapImportEnabled) && PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.LDAP_EXPORT_ENABLED, PropsValues.LDAP_EXPORT_ENABLED);
+boolean ldapPasswordPolicyEnabled = PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.LDAP_PASSWORD_POLICY_ENABLED);
+long[] ldapServerIds = StringUtil.split(PrefsPropsUtil.getString(company.getCompanyId(), "ldap.server.ids"), 0L);
+
+if (ldapAuthEnabled && (ldapServerIds.length <= 0) && Validator.isNull(PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_BASE_PROVIDER_URL + ".0", StringPool.BLANK))) {
+	String ldapServerName = themeDisplay.translate("default");
+	String ldapBaseProviderUrl = ParamUtil.getString(request, "settings--" + PropsKeys.LDAP_BASE_PROVIDER_URL + "--", PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_BASE_PROVIDER_URL, StringPool.BLANK));
+	String ldapBaseDN = ParamUtil.getString(request, "settings--" + PropsKeys.LDAP_BASE_DN + "--", PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_BASE_DN));
+	String ldapSecurityPrincipal = ParamUtil.getString(request, "settings--" + PropsKeys.LDAP_SECURITY_PRINCIPAL + "--", PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_SECURITY_PRINCIPAL));
+	String ldapSecurityCredentials = ParamUtil.getString(request, "settings--" + PropsKeys.LDAP_SECURITY_CREDENTIALS + "--", PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_SECURITY_CREDENTIALS));
+	String ldapAuthSearchFilter = ParamUtil.getString(request, "settings--" + PropsKeys.LDAP_AUTH_SEARCH_FILTER + "--", PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_AUTH_SEARCH_FILTER));
+	String ldapImportUserSearchFilter = ParamUtil.getString(request, "settings--" + PropsKeys.LDAP_IMPORT_USER_SEARCH_FILTER + "--", PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_IMPORT_USER_SEARCH_FILTER));
+	String ldapImportGroupSearchFilter = ParamUtil.getString(request, "settings--" + PropsKeys.LDAP_IMPORT_GROUP_SEARCH_FILTER + "--", PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_IMPORT_GROUP_SEARCH_FILTER));
+	String ldapUsersDN = ParamUtil.getString(request, "settings--" + PropsKeys.LDAP_USERS_DN + "--", PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_USERS_DN));
+	String ldapUserDefaultObjectClasses = ParamUtil.getString(request, "settings--" + PropsKeys.LDAP_USER_DEFAULT_OBJECT_CLASSES + "--", PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_USER_DEFAULT_OBJECT_CLASSES));
+	String ldapGroupsDN = ParamUtil.getString(request, "settings--" + PropsKeys.LDAP_GROUPS_DN + "--", PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_GROUPS_DN));
+	String ldapGroupDefaultObjectClasses = ParamUtil.getString(request, "settings--" + PropsKeys.LDAP_GROUP_DEFAULT_OBJECT_CLASSES + "--", PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_GROUP_DEFAULT_OBJECT_CLASSES));
+	String ldapUserMappings = ParamUtil.getString(request, "settings--" + PropsKeys.LDAP_USER_MAPPINGS + "--", PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_USER_MAPPINGS));
+	String ldapGroupMappings = ParamUtil.getString(request, "settings--" + PropsKeys.LDAP_GROUP_MAPPINGS + "--", PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_GROUP_MAPPINGS));
+
+	if (Validator.isNotNull(ldapBaseProviderUrl)) {
+		long ldapServerId = CounterLocalServiceUtil.increment();
+
+		String postfix = StringPool.PERIOD + ldapServerId;
+
+		ldapServerIds = new long[] {ldapServerId};
+
+		UnicodeProperties properties = new UnicodeProperties();
+
+		properties.put("ldap.server.name" + postfix, ldapServerName);
+		properties.put(PropsKeys.LDAP_BASE_PROVIDER_URL + postfix, ldapBaseProviderUrl);
+		properties.put(PropsKeys.LDAP_BASE_DN + postfix, ldapBaseDN);
+		properties.put(PropsKeys.LDAP_SECURITY_PRINCIPAL + postfix, ldapSecurityPrincipal);
+		properties.put(PropsKeys.LDAP_SECURITY_CREDENTIALS + postfix, ldapSecurityCredentials);
+		properties.put(PropsKeys.LDAP_AUTH_SEARCH_FILTER + postfix, ldapAuthSearchFilter);
+		properties.put(PropsKeys.LDAP_IMPORT_USER_SEARCH_FILTER + postfix, ldapImportUserSearchFilter);
+		properties.put(PropsKeys.LDAP_IMPORT_GROUP_SEARCH_FILTER + postfix, ldapImportGroupSearchFilter);
+		properties.put(PropsKeys.LDAP_USERS_DN + postfix, ldapUsersDN);
+		properties.put(PropsKeys.LDAP_USER_DEFAULT_OBJECT_CLASSES + postfix, ldapUserDefaultObjectClasses);
+		properties.put(PropsKeys.LDAP_GROUPS_DN + postfix, ldapGroupsDN);
+		properties.put(PropsKeys.LDAP_GROUP_DEFAULT_OBJECT_CLASSES + postfix, ldapGroupDefaultObjectClasses);
+		properties.put(PropsKeys.LDAP_USER_MAPPINGS + postfix, ldapUserMappings);
+		properties.put(PropsKeys.LDAP_GROUP_MAPPINGS + postfix, ldapGroupMappings);
+		properties.put("ldap.server.ids", StringUtil.merge(ldapServerIds));
+
+		List<String> keys = new ArrayList<String>();
+
+		keys.add("ldap.server.name");
+		keys.add(PropsKeys.LDAP_BASE_PROVIDER_URL);
+		keys.add(PropsKeys.LDAP_BASE_DN);
+		keys.add(PropsKeys.LDAP_SECURITY_PRINCIPAL);
+		keys.add(PropsKeys.LDAP_SECURITY_CREDENTIALS);
+		keys.add(PropsKeys.LDAP_AUTH_SEARCH_FILTER);
+		keys.add(PropsKeys.LDAP_IMPORT_USER_SEARCH_FILTER);
+		keys.add(PropsKeys.LDAP_IMPORT_GROUP_SEARCH_FILTER);
+		keys.add(PropsKeys.LDAP_USERS_DN);
+		keys.add(PropsKeys.LDAP_USER_DEFAULT_OBJECT_CLASSES);
+		keys.add(PropsKeys.LDAP_GROUPS_DN);
+		keys.add(PropsKeys.LDAP_GROUP_DEFAULT_OBJECT_CLASSES);
+		keys.add(PropsKeys.LDAP_USER_MAPPINGS);
+		keys.add(PropsKeys.LDAP_GROUP_MAPPINGS);
+
+		try {
+			CompanyServiceUtil.updatePreferences(company.getCompanyId(), properties);
+
+			CompanyServiceUtil.removePreferences(company.getCompanyId(), keys.toArray(new String[keys.size()]));
+		}
+		catch (Exception e) {
+		}
+	}
+}
+%>
+
+<aui:fieldset>
+	<liferay-ui:error key="ldapExportAndImportOnPasswordAutogeneration" message="ldap-export-must-not-be-enabled-when-autogeneration-of-user-passwords-is-enabled-for-ldap-import" />
+
+	<aui:input label="enabled" name='<%= "settings--" + PropsKeys.LDAP_AUTH_ENABLED + "--" %>' type="checkbox" value="<%= ldapAuthEnabled %>" />
+
+	<aui:input label="required" name='<%= "settings--" + PropsKeys.LDAP_AUTH_REQUIRED + "--" %>' type="checkbox" value="<%= ldapAuthRequired %>" />
+</aui:fieldset>
+
+<h3><liferay-ui:message key="ldap-servers" /></h3>
+
+<c:if test="<%= ldapAuthEnabled && (ldapServerIds.length <= 0) %>">
+	<div class="alert alert-info">
+		<liferay-ui:message key="default-ldap-server-settings-are-in-use-please-add-an-ldap-server-to-override-the-default-settings" />
+	</div>
+</c:if>
+
+<aui:button-row>
+
+	<%
+	PortletURL addServerURL = renderResponse.createRenderURL();
+
+	addServerURL.setParameter("struts_action", "portal_settings/edit_ldap_server");
+	addServerURL.setParameter("redirect", authenticationURL);
+	%>
+
+	<aui:button href="<%= addServerURL.toString() %>" name="addButton" value="add" />
+</aui:button-row>
+
+<aui:fieldset>
+	<aui:input name="settings--ldap.server.ids--" type="hidden" value="<%= StringUtil.merge(ldapServerIds) %>" />
+
+	<c:if test="<%= ldapServerIds.length > 0 %>">
+		<br /><br />
+
+		<div class="searchcontainer-content ldap-servers">
+			<table class="table table-bordered table-hover table-striped">
+			<thead class="table-columns">
+			<tr>
+				<td class="table-header">
+					<liferay-ui:message key="ldap-server-id" />
+				</th>
+				<td class="table-header">
+					<liferay-ui:message key="ldap-server-name" />
+				</th>
+				<td class="table-header"></th>
+			</tr>
+			</thead>
+
+			<tbody class="table-data">
+
+			<%
+			for (int i = 0; i < ldapServerIds.length; i++) {
+				long ldapServerId = ldapServerIds[i];
+
+				String ldapServerName = PrefsPropsUtil.getString(company.getCompanyId(), "ldap.server.name." + ldapServerId);
+			%>
+
+				<tr data-ldapServerId="<%= ldapServerId %>">
+					<td class="table-cell">
+						<%= ldapServerId %>
+					</td>
+					<td class="table-cell">
+						<%= ldapServerName %>
+					</td>
+					<td align="right" class="table-cell">
+						<div class="control">
+							<c:if test="<%= ldapServerIds.length > 1 %>">
+
+								<%
+								String taglibUpURL = "javascript:" + renderResponse.getNamespace() + "raiseLDAPServerPriority(" + ldapServerId + ");";
+								%>
+
+								<liferay-ui:icon
+									image="top"
+									message="up"
+									url="<%= taglibUpURL %>"
+								/>
+
+								<%
+								String taglibDownURL = "javascript:" + renderResponse.getNamespace() + "lowerLDAPServerPriority(" + ldapServerId + ");";
+								%>
+
+								<liferay-ui:icon
+									image="bottom"
+									message="down"
+									url="<%= taglibDownURL %>"
+								/>
+							</c:if>
+
+							<portlet:renderURL var="editURL">
+								<portlet:param name="struts_action" value="/portal_settings/edit_ldap_server" />
+								<portlet:param name="redirect" value="<%= authenticationURL %>" />
+								<portlet:param name="ldapServerId" value="<%= String.valueOf(ldapServerId) %>" />
+							</portlet:renderURL>
+
+							<liferay-ui:icon
+								image="edit"
+								url="<%= editURL %>"
+							/>
+
+							<portlet:actionURL var="deleteURL">
+								<portlet:param name="struts_action" value="/portal_settings/edit_ldap_server" />
+								<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+								<portlet:param name="redirect" value="<%= authenticationURL %>" />
+								<portlet:param name="ldapServerId" value="<%= String.valueOf(ldapServerId) %>" />
+							</portlet:actionURL>
+
+							<liferay-ui:icon-delete url="<%= deleteURL %>" />
+						</div>
+					</td>
+				</tr>
+
+			<%
+			}
+			%>
+
+			</tbody>
+			</table>
+		</div>
+	</c:if>
+</aui:fieldset>
+
+<h3><liferay-ui:message key="import-export" /></h3>
+
+<aui:fieldset>
+	<c:choose>
+		<c:when test="<%= PropsValues.LDAP_IMPORT_USER_PASSWORD_AUTOGENERATED %>">
+			<aui:input helpMessage="import-enabled-user-password-autogenerated-help" id="ldapImportEnabled" label="import-enabled" name='<%= "settings--" + PropsKeys.LDAP_IMPORT_ENABLED + "--" %>' onClick='<%= renderResponse.getNamespace() + "enableExport()" %>' type="checkbox" value="<%= ldapImportEnabled %>" />
+		</c:when>
+		<c:otherwise>
+			<aui:input id="ldapImportEnabled" label="import-enabled" name='<%= "settings--" + PropsKeys.LDAP_IMPORT_ENABLED + "--" %>' type="checkbox" value="<%= ldapImportEnabled %>" />
+		</c:otherwise>
+	</c:choose>
+
+	<div id="<portlet:namespace />importEnabledSettings">
+		<aui:input label="import-on-startup-enabled" name='<%= "settings--" + PropsKeys.LDAP_IMPORT_ON_STARTUP + "--" %>' type="checkbox" value="<%= ldapImportOnStartup %>" />
+	</div>
+
+	<aui:input disabled="<%= PropsValues.LDAP_IMPORT_USER_PASSWORD_AUTOGENERATED && ldapImportEnabled %>" id="ldapExportEnabled" label="export-enabled" name='<%= "settings--" + PropsKeys.LDAP_EXPORT_ENABLED + "--" %>' type="checkbox" value="<%= ldapExportEnabled %>" />
+</aui:fieldset>
+
+<h3><liferay-ui:message key="password-policy" /></h3>
+
+<aui:fieldset>
+	<aui:input label="use-ldap-password-policy" name='<%= "settings--" + PropsKeys.LDAP_PASSWORD_POLICY_ENABLED + "--" %>' type="checkbox" value="<%= ldapPasswordPolicyEnabled %>" />
+</aui:fieldset>
+
+<c:if test="<%= PropsValues.LDAP_IMPORT_USER_PASSWORD_AUTOGENERATED %>">
+	<aui:script>
+		Liferay.provide(
+			window,
+			'<portlet:namespace />enableExport',
+			function() {
+				var A = AUI();
+
+				var exportCheckbox = A.one('#<portlet:namespace />ldapExportEnabledCheckbox');
+				var importCheckbox = A.one('#<portlet:namespace />ldapImportEnabledCheckbox');
+
+				var checked = importCheckbox.attr('checked');
+
+				if (checked) {
+					exportCheckbox.attr('checked', false);
+
+					Liferay.Util.updateCheckboxValue(exportCheckbox);
+				}
+
+				exportCheckbox.attr('disabled', checked);
+			},
+			['aui-base']
+		);
+	</aui:script>
+</c:if>
+
+<aui:script>
+	function <portlet:namespace />changePriority(ldapServer, swapLdapServer) {
+		var ldapServerId = ldapServer.getAttribute('data-ldapServerId');
+		var swapLdapServerId = swapLdapServer.getAttribute('data-ldapServerId');
+
+		var ldapServerHTML = ldapServer.html();
+		var swapLdapServerHTML = swapLdapServer.html();
+
+		ldapServer.setContent(swapLdapServerHTML);
+		swapLdapServer.setContent(ldapServerHTML);
+
+		ldapServer.setAttribute('data-ldapServerId', swapLdapServerId);
+		swapLdapServer.setAttribute('data-ldapServerId', ldapServerId);
+	}
+
+	function <portlet:namespace />lowerLDAPServerPriority(ldapServerId) {
+		<portlet:namespace />changeLDAPServerPriority(ldapServerId, 'next');
+	}
+
+	function <portlet:namespace />raiseLDAPServerPriority(ldapServerId) {
+		<portlet:namespace />changeLDAPServerPriority(ldapServerId, 'previous');
+	}
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />changeLDAPServerPriority',
+		function(ldapServerId, action) {
+			var A = AUI();
+
+			var ldapServer = A.one('.ldap-servers tr[data-ldapServerId="' + ldapServerId + '"]');
+
+			if (ldapServer) {
+				var swapLdapServer = ldapServer[action]();
+
+				if (swapLdapServer) {
+					<portlet:namespace />changePriority(ldapServer, swapLdapServer);
+				}
+			}
+		},
+		['aui-base']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />saveLdap',
+		function() {
+			var A = AUI();
+
+			var ldapServerIds = [];
+
+			A.all('.ldap-servers .table-data tr').each(
+				function(item, index, collection) {
+					ldapServerIds.push(item.getAttribute('data-ldapServerId'));
+				}
+			);
+
+			document.<portlet:namespace />fm['<portlet:namespace />settings--ldap.server.ids--'].value = ldapServerIds.join(',');
+		},
+		['aui-base']
+	);
+
+	Liferay.Util.toggleBoxes('<portlet:namespace />ldapImportEnabledCheckbox', '<portlet:namespace />importEnabledSettings');
+	Liferay.Util.toggleBoxes('<portlet:namespace />ldapExportEnabledCheckbox', '<portlet:namespace />exportEnabledSettings');
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication/ntlm.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication/ntlm.jsp
new file mode 100644
index 0000000..22a79ed
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication/ntlm.jsp
@@ -0,0 +1,40 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<%
+boolean ntlmAuthEnabled = PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.NTLM_AUTH_ENABLED, PropsValues.NTLM_AUTH_ENABLED);
+String ntlmDomainController = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.NTLM_DOMAIN_CONTROLLER, PropsValues.NTLM_DOMAIN_CONTROLLER);
+String ntlmDomainControllerName = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.NTLM_DOMAIN_CONTROLLER_NAME, PropsValues.NTLM_DOMAIN_CONTROLLER_NAME);
+String ntlmDomain = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.NTLM_DOMAIN, PropsValues.NTLM_DOMAIN);
+String ntlmServiceAccount = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.NTLM_SERVICE_ACCOUNT, PropsValues.NTLM_SERVICE_ACCOUNT);
+String ntlmServicePassword = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.NTLM_SERVICE_PASSWORD, PropsValues.NTLM_SERVICE_PASSWORD);
+%>
+
+<aui:fieldset>
+	<aui:input label="enabled" name='<%= "settings--" + PropsKeys.NTLM_AUTH_ENABLED + "--" %>' type="checkbox" value="<%= ntlmAuthEnabled %>" />
+
+	<aui:input cssClass="lfr-input-text-container" label="domain-controller" name='<%= "settings--" + PropsKeys.NTLM_DOMAIN_CONTROLLER + "--" %>' type="text" value="<%= ntlmDomainController %>" />
+
+	<aui:input cssClass="lfr-input-text-container" helpMessage="domain-controller-name-help" label="domain-controller-name" name='<%= "settings--" + PropsKeys.NTLM_DOMAIN_CONTROLLER_NAME + "--" %>' type="text" value="<%= ntlmDomainControllerName %>" />
+
+	<aui:input cssClass="lfr-input-text-container" label="domain" name='<%= "settings--" + PropsKeys.NTLM_DOMAIN + "--" %>' type="text" value="<%= ntlmDomain %>" />
+
+	<aui:input cssClass="lfr-input-text-container" label="service-account" name='<%= "settings--" + PropsKeys.NTLM_SERVICE_ACCOUNT + "--" %>' type="text" value="<%= ntlmServiceAccount %>" />
+
+	<aui:input cssClass="lfr-input-text-container" label="service-password" name='<%= "settings--" + PropsKeys.NTLM_SERVICE_PASSWORD + "--" %>' type="text" value="<%= ntlmServicePassword %>" />
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication/open_id.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication/open_id.jsp
new file mode 100644
index 0000000..5941350
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication/open_id.jsp
@@ -0,0 +1,25 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<%
+boolean openIdAuthEnabled = PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.OPEN_ID_AUTH_ENABLED, PropsValues.OPEN_ID_AUTH_ENABLED);
+%>
+
+<aui:fieldset>
+	<aui:input label="enabled" name='<%= "settings--" + PropsKeys.OPEN_ID_AUTH_ENABLED + "--" %>' type="checkbox" value="<%= openIdAuthEnabled %>" />
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication/open_sso.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication/open_sso.jsp
new file mode 100644
index 0000000..b2b59b4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication/open_sso.jsp
@@ -0,0 +1,98 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<%
+boolean openSsoAuthEnabled = PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.OPEN_SSO_AUTH_ENABLED, PropsValues.OPEN_SSO_AUTH_ENABLED);
+boolean openSsoLdapImportEnabled = PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.OPEN_SSO_LDAP_IMPORT_ENABLED, PropsValues.OPEN_SSO_LDAP_IMPORT_ENABLED);
+String openSsoLoginURL = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.OPEN_SSO_LOGIN_URL, PropsValues.OPEN_SSO_LOGIN_URL);
+String openSsoLogoutURL = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.OPEN_SSO_LOGOUT_URL, PropsValues.OPEN_SSO_LOGOUT_URL);
+String openSsoServiceURL = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.OPEN_SSO_SERVICE_URL, PropsValues.OPEN_SSO_SERVICE_URL);
+String openSsoScreenNameAttr = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.OPEN_SSO_SCREEN_NAME_ATTR, PropsValues.OPEN_SSO_SCREEN_NAME_ATTR);
+String openSsoEmailAddressAttr = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.OPEN_SSO_EMAIL_ADDRESS_ATTR, PropsValues.OPEN_SSO_EMAIL_ADDRESS_ATTR);
+String openSsoFirstNameAttr = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.OPEN_SSO_FIRST_NAME_ATTR, PropsValues.OPEN_SSO_FIRST_NAME_ATTR);
+String openSsoLastNameAttr = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.OPEN_SSO_LAST_NAME_ATTR, PropsValues.OPEN_SSO_LAST_NAME_ATTR);
+%>
+
+<aui:fieldset>
+	<aui:input label="enabled" name='<%= "settings--" + PropsKeys.OPEN_SSO_AUTH_ENABLED + "--" %>' type="checkbox" value="<%= openSsoAuthEnabled %>" />
+
+	<aui:input helpMessage="import-open-sso-users-from-ldap-help" label="import-open-sso-users-from-ldap" name='<%= "settings--" + PropsKeys.OPEN_SSO_LDAP_IMPORT_ENABLED + "--" %>' type="checkbox" value="<%= openSsoLdapImportEnabled %>" />
+
+	<aui:input cssClass="lfr-input-text-container" helpMessage="login-url-for-opensso-help" label="login-url" name='<%= "settings--" + PropsKeys.OPEN_SSO_LOGIN_URL + "--" %>' type="text" value="<%= openSsoLoginURL %>" />
+
+	<aui:input cssClass="lfr-input-text-container" helpMessage="logout-url-for-opensso-help" label="logout-url" name='<%= "settings--" + PropsKeys.OPEN_SSO_LOGOUT_URL + "--" %>' type="text" value="<%= openSsoLogoutURL %>" />
+
+	<aui:input cssClass="lfr-input-text-container" helpMessage="service-url-for-opensso-help" label="service-url" name='<%= "settings--" + PropsKeys.OPEN_SSO_SERVICE_URL + "--" %>' type="text" value="<%= openSsoServiceURL %>" />
+
+	<aui:input cssClass="lfr-input-text-container" helpMessage="mappings-for-opensso-help" label="screen-name-attribute" name='<%= "settings--" + PropsKeys.OPEN_SSO_SCREEN_NAME_ATTR + "--" %>' type="text" value="<%= openSsoScreenNameAttr %>" />
+
+	<aui:input cssClass="lfr-input-text-container" label="email-address-attribute" name='<%= "settings--" + PropsKeys.OPEN_SSO_EMAIL_ADDRESS_ATTR + "--" %>' type="text" value="<%= openSsoEmailAddressAttr %>" />
+
+	<aui:input cssClass="lfr-input-text-container" label="first-name-attribute" name='<%= "settings--" + PropsKeys.OPEN_SSO_FIRST_NAME_ATTR + "--" %>' type="text" value="<%= openSsoFirstNameAttr %>" />
+
+	<aui:input cssClass="lfr-input-text-container" label="last-name-attribute" name='<%= "settings--" + PropsKeys.OPEN_SSO_LAST_NAME_ATTR + "--" %>' type="text" value="<%= openSsoLastNameAttr %>" />
+
+	<aui:button-row>
+
+		<%
+		String taglibOnClick = renderResponse.getNamespace() + "testOpenSSOSettings();";
+		%>
+
+		<aui:button onClick="<%= taglibOnClick %>" value="test-opensso-configuration" />
+	</aui:button-row>
+</aui:fieldset>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />testOpenSSOSettings',
+		function() {
+			var A = AUI();
+
+			var data = {};
+
+			data.<portlet:namespace />openSsoLoginURL = document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.OPEN_SSO_LOGIN_URL %>--'].value;
+			data.<portlet:namespace />openSsoLogoutURL = document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.OPEN_SSO_LOGOUT_URL %>--'].value;
+			data.<portlet:namespace />openSsoServiceURL = document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.OPEN_SSO_SERVICE_URL %>--'].value;
+			data.<portlet:namespace />openSsoScreenNameAttr = document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.OPEN_SSO_SCREEN_NAME_ATTR %>--'].value;
+			data.<portlet:namespace />openSsoEmailAddressAttr = document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.OPEN_SSO_EMAIL_ADDRESS_ATTR %>--'].value;
+			data.<portlet:namespace />openSsoFirstNameAttr = document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.OPEN_SSO_FIRST_NAME_ATTR %>--'].value;
+			data.<portlet:namespace />openSsoLastNameAttr = document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.OPEN_SSO_LAST_NAME_ATTR %>--'].value;
+
+			var url = "<portlet:renderURL windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>"><portlet:param name="struts_action" value="/portal_settings/test_opensso_configuration" /></portlet:renderURL>";
+
+			var dialog = Liferay.Util.Window.getWindow(
+				{
+					dialog: {
+						destroyOnHide: true
+					},
+					title: '<%= UnicodeLanguageUtil.get(pageContext, "open-sso") %>'
+				}
+			);
+
+			dialog.plug(
+				A.Plugin.IO,
+				{
+					data: data,
+					uri: url
+				}
+			);
+		},
+		['aui-io-plugin-deprecated', 'aui-io-request', 'liferay-util-window']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication/siteminder.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication/siteminder.jsp
new file mode 100644
index 0000000..76fcebb
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/authentication/siteminder.jsp
@@ -0,0 +1,31 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<%
+boolean siteminderAuthEnabled = PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.SITEMINDER_AUTH_ENABLED, PropsValues.SITEMINDER_AUTH_ENABLED);
+boolean siteminderImportFromLdap = PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.SITEMINDER_IMPORT_FROM_LDAP, PropsValues.SITEMINDER_IMPORT_FROM_LDAP);
+String siteminderUserHeader = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.SITEMINDER_USER_HEADER, PropsValues.SITEMINDER_USER_HEADER);
+%>
+
+<aui:fieldset>
+	<aui:input label="enabled" name='<%= "settings--" + PropsKeys.SITEMINDER_AUTH_ENABLED + "--" %>' type="checkbox" value="<%= siteminderAuthEnabled %>" />
+
+	<aui:input helpMessage="import-siteminder-users-from-ldap-help" label="import-siteminder-users-from-ldap" name='<%= "settings--" + PropsKeys.SITEMINDER_IMPORT_FROM_LDAP + "--" %>' type="checkbox" value="<%= siteminderImportFromLdap %>" />
+
+	<aui:input cssClass="lfr-input-text-container" label="user-header" name='<%= "settings--" + PropsKeys.SITEMINDER_USER_HEADER + "--" %>' type="text" value="<%= siteminderUserHeader %>" />
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/content_sharing.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/content_sharing.jsp
new file mode 100644
index 0000000..a3baea0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/content_sharing.jsp
@@ -0,0 +1,34 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<%
+boolean contentSharingWithSiteAdministratorsEnabled = PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.SITES_CONTENT_SHARING_THROUGH_ADMINISTRATORS_ENABLED);
+int contentSharingWithChildrenEnabled = PrefsPropsUtil.getInteger(company.getCompanyId(), PropsKeys.SITES_CONTENT_SHARING_WITH_CHILDREN_ENABLED);
+%>
+
+<h3><liferay-ui:message key="content-sharing" /></h3>
+
+<aui:fieldset>
+	<aui:input label="allow-site-administrators-to-display-content-from-other-sites-they-administer" name='<%= "settings--" + PropsKeys.SITES_CONTENT_SHARING_THROUGH_ADMINISTRATORS_ENABLED + "--" %>' type="checkbox" value="<%= contentSharingWithSiteAdministratorsEnabled %>" />
+
+	<aui:select label="allow-subsites-to-display-content-from-parent-sites" name='<%= "settings--" + PropsKeys.SITES_CONTENT_SHARING_WITH_CHILDREN_ENABLED + "--" %>'>
+		<aui:option label="enabled-by-default" selected="<%= contentSharingWithChildrenEnabled == Sites.CONTENT_SHARING_WITH_CHILDREN_ENABLED_BY_DEFAULT %>" value="<%= Sites.CONTENT_SHARING_WITH_CHILDREN_ENABLED_BY_DEFAULT %>" />
+		<aui:option label="disabled-by-default" selected="<%= contentSharingWithChildrenEnabled == Sites.CONTENT_SHARING_WITH_CHILDREN_DISABLED_BY_DEFAULT %>" value="<%= Sites.CONTENT_SHARING_WITH_CHILDREN_DISABLED_BY_DEFAULT %>" />
+		<aui:option label="disabled" selected="<%= contentSharingWithChildrenEnabled == Sites.CONTENT_SHARING_WITH_CHILDREN_DISABLED %>" value="<%= Sites.CONTENT_SHARING_WITH_CHILDREN_DISABLED %>" />
+	</aui:select>
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/css/.sass-cache/main.css
new file mode 100644
index 0000000..2b14237
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/css/.sass-cache/main.css
@@ -0,0 +1,10 @@
+.portlet-users-admin .available-languages {
+  margin-top: 1em; }
+  .portlet-users-admin .available-languages .fieldset-legend {
+    font-size: 100%; }
+  .portlet-users-admin .available-languages .legend {
+    border-bottom-width: 0; }
+  .portlet-users-admin .available-languages legend {
+    padding: 0;
+    padding-bottom: 0.5em; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/css/main.css
new file mode 100644
index 0000000..ef91458
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/css/main.css
@@ -0,0 +1,18 @@
+.portlet-users-admin {
+	.available-languages {
+		margin-top: 1em;
+
+		.fieldset-legend {
+			font-size: 100%;
+		}
+
+		.legend {
+			border-bottom-width: 0;
+		}
+
+		legend {
+			padding: 0;
+			padding-bottom: 0.5em;
+		}
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/definition_of_terms.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/definition_of_terms.jspf
new file mode 100644
index 0000000..4f7f69c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/definition_of_terms.jspf
@@ -0,0 +1,114 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<h4><liferay-ui:message key="definition-of-terms" /></h4>
+
+<dl>
+	<c:if test='<%= sectionName.equals("email-verification-notification") %>'>
+		<dt>
+			[$EMAIL_VERIFICATION_CODE$]
+		</dt>
+		<dd>
+			<liferay-ui:message key="the-email-verification-code" />
+		</dd>
+		<dt>
+			[$EMAIL_VERIFICATION_URL$]
+		</dt>
+		<dd>
+			<liferay-ui:message key="the-email-verification-url" />
+		</dd>
+	</c:if>
+	<dt>
+		[$FROM_ADDRESS$]
+	</dt>
+	<dd>
+		<%= HtmlUtil.escape(adminEmailFromAddress) %>
+	</dd>
+	<dt>
+		[$FROM_NAME$]
+	</dt>
+	<dd>
+		<%= HtmlUtil.escape(adminEmailFromName) %>
+	</dd>
+
+	<c:if test='<%= sectionName.equals("password-reset-notification") %>'>
+		<dt>
+			[$PASSWORD_RESET_URL$]
+		</dt>
+		<dd>
+			<liferay-ui:message key="the-password-reset-url" />
+		</dd>
+	</c:if>
+
+	<dt>
+		[$PORTAL_URL$]
+	</dt>
+	<dd>
+		<%= company.getVirtualHostname() %>
+	</dd>
+	<dt class="password-changed-notification">
+		[$REMOTE_ADDRESS$]
+	</dt>
+	<dd class="password-changed-notification">
+		<liferay-ui:message key="the-browser's-remote-address" />
+	</dd>
+	<dt class="password-changed-notification">
+		[$REMOTE_HOST$]
+	</dt>
+	<dd class="password-changed-notification">
+		<liferay-ui:message key="the-browser's-remote-host" />
+	</dd>
+	<dt>
+		[$TO_ADDRESS$]
+	</dt>
+	<dd>
+		<liferay-ui:message key="the-address-of-the-email-recipient" />
+	</dd>
+	<dt>
+		[$TO_NAME$]
+	</dt>
+	<dd>
+		<liferay-ui:message key="the-name-of-the-email-recipient" />
+	</dd>
+	<dt class="password-changed-notification">
+		[$USER_AGENT$]
+	</dt>
+	<dd class="password-changed-notification">
+		<liferay-ui:message key="the-browser's-user-agent" />
+	</dd>
+	<dt>
+		[$USER_ID$]
+	</dt>
+	<dd>
+		<liferay-ui:message key="the-user-id" />
+	</dd>
+
+	<c:if test='<%= !(sectionName.equals("email-verification-notification") || sectionName.equals("password-reset-notification")) %>'>
+		<dt>
+			[$USER_PASSWORD$]
+		</dt>
+		<dd>
+			<liferay-ui:message key="the-user-password" />
+		</dd>
+	</c:if>
+
+	<dt>
+		[$USER_SCREENNAME$]
+	</dt>
+	<dd>
+		<liferay-ui:message key="the-user-screen-name" />
+	</dd>
+</dl>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/display_settings.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/display_settings.jsp
new file mode 100644
index 0000000..6b6f36b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/display_settings.jsp
@@ -0,0 +1,225 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<liferay-ui:error-marker key="errorSection" value="displaySettings" />
+
+<h3><liferay-ui:message key="language-and-time-zone" /></h3>
+
+<aui:fieldset>
+	<liferay-ui:error exception="<%= LocaleException.class %>">
+
+		<%
+		LocaleException le = (LocaleException)errorException;
+		%>
+
+		<c:if test="<%= le.getType() == LocaleException.TYPE_DISPLAY_SETTINGS %>">
+			<liferay-ui:message key="please-enter-a-valid-locale" />
+		</c:if>
+	</liferay-ui:error>
+
+	<aui:select label="default-language" name="languageId">
+
+		<%
+		User defaultUser = company.getDefaultUser();
+
+		String languageId = ParamUtil.getString(request, "languageId", defaultUser.getLanguageId());
+
+		Locale companyLocale = LocaleUtil.fromLanguageId(languageId);
+
+		for (Locale availableLocale : LanguageUtil.getAvailableLocales()) {
+		%>
+
+			<aui:option label="<%= availableLocale.getDisplayName(locale) %>" lang="<%= LocaleUtil.toW3cLanguageId(availableLocale) %>" selected="<%= Validator.equals(companyLocale.getLanguage(), availableLocale.getLanguage()) && Validator.equals(companyLocale.getCountry(), availableLocale.getCountry()) %>" value="<%= LocaleUtil.toLanguageId(availableLocale) %>" />
+
+		<%
+		}
+		%>
+
+	</aui:select>
+
+	<aui:fieldset cssClass="available-languages" label="available-languages">
+
+		<%
+		String[] availableLanguageIds = LocaleUtil.toLanguageIds(LanguageUtil.getAvailableLocales());
+		%>
+
+		<aui:input name='<%= "settings--" + PropsKeys.LOCALES + "--" %>' type="hidden" value="<%= StringUtil.merge(availableLanguageIds) %>" />
+
+		<%
+
+		// Left list
+
+		List leftList = new ArrayList();
+
+		for (Locale availableLocale : LanguageUtil.getAvailableLocales()) {
+			leftList.add(new KeyValuePair(LocaleUtil.toLanguageId(availableLocale), availableLocale.getDisplayName(locale)));
+		}
+
+		// Right list
+
+		List rightList = new ArrayList();
+
+		for (String propsValuesLanguageId : SetUtil.fromArray(PropsValues.LOCALES)) {
+			if (!ArrayUtil.contains(availableLanguageIds, propsValuesLanguageId)) {
+				Locale propsValuesLocale = LocaleUtil.fromLanguageId(propsValuesLanguageId);
+
+				rightList.add(new KeyValuePair(propsValuesLanguageId, propsValuesLocale.getDisplayName(locale)));
+			}
+		}
+
+		rightList = ListUtil.sort(rightList, new KeyValuePairComparator(false, true));
+		%>
+
+		<liferay-ui:input-move-boxes
+			leftBoxName="currentLanguageIds"
+			leftList="<%= leftList %>"
+			leftReorder="true"
+			leftTitle="current"
+			rightBoxName="availableLanguageIds"
+			rightList="<%= rightList %>"
+			rightTitle="available"
+		/>
+	</aui:fieldset>
+
+	<%
+	User defaultUser = company.getDefaultUser();
+
+	String timeZoneId = ParamUtil.getString(request, "timeZoneId", defaultUser.getTimeZoneId());
+	%>
+
+	<aui:input label="time-zone" name="timeZoneId" type="timeZone" value="<%= timeZoneId %>" />
+</aui:fieldset>
+
+<h3><liferay-ui:message key="logo" /></h3>
+
+<aui:fieldset>
+	<aui:input label="allow-site-administrators-to-use-their-own-logo" name='<%= "settings--" + PropsKeys.COMPANY_SECURITY_SITE_LOGO + "--" %>' type="checkbox" value="<%= company.isSiteLogo() %>" />
+
+	<portlet:renderURL var="editCompanyLogoURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+		<portlet:param name="struts_action" value="/portal_settings/edit_company_logo" />
+		<portlet:param name="redirect" value="<%= currentURL %>" />
+	</portlet:renderURL>
+
+	<liferay-ui:logo-selector
+		defaultLogoURL='<%= themeDisplay.getPathImage() + "/company_logo?img_id=0" %>'
+		editLogoURL="<%= editCompanyLogoURL %>"
+		imageId="<%= company.getLogoId() %>"
+		logoDisplaySelector=".company-logo"
+	/>
+</aui:fieldset>
+
+<h3><liferay-ui:message key="look-and-feel" /></h3>
+
+<aui:fieldset>
+	<aui:select label='<%= PropsValues.MOBILE_DEVICE_STYLING_WAP_ENABLED? "default-regular-theme" : "default-theme" %>' name='<%= "settings--" + PropsKeys.DEFAULT_REGULAR_THEME_ID + "--" %>'>
+
+		<%
+		String defaultRegularThemeId = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.DEFAULT_REGULAR_THEME_ID, PropsValues.DEFAULT_REGULAR_THEME_ID);
+
+		boolean deployed = false;
+
+		List<Theme> themes = ThemeLocalServiceUtil.getThemes(company.getCompanyId(), 0, user.getUserId(), false);
+
+		for (Theme curTheme: themes) {
+			if (Validator.equals(defaultRegularThemeId, curTheme.getThemeId())) {
+				deployed = true;
+			}
+		%>
+
+			<aui:option label="<%= curTheme.getName() %>" selected="<%= Validator.equals(defaultRegularThemeId, curTheme.getThemeId()) %>" value="<%= curTheme.getThemeId() %>" />
+
+		<%
+		}
+		%>
+
+		<c:if test="<%= !deployed %>">
+			<aui:option label='<%= defaultRegularThemeId + "(" + LanguageUtil.get(pageContext, "undeployed") + ")" %>' selected="<%= true %>" value="<%= defaultRegularThemeId %>" />
+		</c:if>
+	</aui:select>
+
+	<c:if test="<%= PropsValues.MOBILE_DEVICE_STYLING_WAP_ENABLED %>">
+		<aui:select helpMessage="default-mobile-theme-help" label="default-mobile-theme" name='<%= "settings--" + PropsKeys.DEFAULT_WAP_THEME_ID + "--" %>'>
+
+			<%
+			String defaultWapThemeId = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.DEFAULT_WAP_THEME_ID, PropsValues.DEFAULT_WAP_THEME_ID);
+
+			boolean deployed = false;
+
+			List<Theme> themes = ThemeLocalServiceUtil.getThemes(company.getCompanyId(), 0, user.getUserId(), true);
+
+			for (Theme curTheme: themes) {
+				if (Validator.equals(defaultWapThemeId, curTheme.getThemeId())) {
+					deployed = true;
+				}
+			%>
+
+				<aui:option label="<%= curTheme.getName() %>" selected="<%= Validator.equals(defaultWapThemeId, curTheme.getThemeId()) %>" value="<%= curTheme.getThemeId() %>" />
+
+			<%
+			}
+			%>
+
+			<c:if test="<%= !deployed %>">
+				<aui:option label='<%= defaultWapThemeId + "(" + LanguageUtil.get(pageContext, "undeployed") + ")" %>' selected="<%= true %>" value="<%= defaultWapThemeId %>" />
+			</c:if>
+		</aui:select>
+	</c:if>
+
+	<aui:select label="default-control-panel-theme" name='<%= "settings--" + PropsKeys.CONTROL_PANEL_LAYOUT_REGULAR_THEME_ID + "--" %>'>
+
+		<%
+		String defaultControlPanelThemeId = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.CONTROL_PANEL_LAYOUT_REGULAR_THEME_ID, PropsValues.CONTROL_PANEL_LAYOUT_REGULAR_THEME_ID);
+
+		boolean deployed = false;
+
+		List<Theme> themes = ThemeLocalServiceUtil.getThemes(company.getCompanyId(), 0, user.getUserId(), false);
+
+		Theme controlPanelTheme = ThemeLocalServiceUtil.getTheme(company.getCompanyId(), "controlpanel", false);
+
+		if (controlPanelTheme != null) {
+			themes.add(controlPanelTheme);
+		}
+
+		for (Theme curTheme: themes) {
+			if (Validator.equals(defaultControlPanelThemeId, curTheme.getThemeId())) {
+				deployed = true;
+			}
+		%>
+
+			<aui:option label="<%= curTheme.getName() %>" selected="<%= Validator.equals(defaultControlPanelThemeId, curTheme.getThemeId()) %>" value="<%= curTheme.getThemeId() %>" />
+
+		<%
+		}
+		%>
+
+		<c:if test="<%= !deployed %>">
+			<aui:option label='<%= defaultControlPanelThemeId + "(" + LanguageUtil.get(pageContext, "undeployed") + ")" %>' selected="<%= true %>" value="<%= defaultControlPanelThemeId %>" />
+		</c:if>
+	</aui:select>
+</aui:fieldset>
+
+<aui:script use="liferay-util-list-fields">
+	Liferay.provide(
+		window,
+		'<portlet:namespace />saveLocales',
+		function() {
+			document.<portlet:namespace />fm.<portlet:namespace /><%= PropsKeys.LOCALES %>.value = Liferay.Util.listSelect(document.<portlet:namespace />fm.<portlet:namespace />currentLanguageIds);
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/edit_company.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/edit_company.jsp
new file mode 100644
index 0000000..715bd09
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/edit_company.jsp
@@ -0,0 +1,82 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<%
+String[] configurationSections = PropsValues.COMPANY_SETTINGS_FORM_CONFIGURATION;
+String[] identificationSections = PropsValues.COMPANY_SETTINGS_FORM_IDENTIFICATION;
+String[] miscellaneousSections = PropsValues.COMPANY_SETTINGS_FORM_MISCELLANEOUS;
+
+String[][] categorySections = {configurationSections, identificationSections, miscellaneousSections};
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/portal_settings/view");
+
+request.setAttribute("addresses.className", Account.class.getName());
+request.setAttribute("emailAddresses.className", Account.class.getName());
+request.setAttribute("phones.className", Account.class.getName());
+request.setAttribute("websites.className", Account.class.getName());
+
+request.setAttribute("addresses.classPK", company.getAccountId());
+request.setAttribute("emailAddresses.classPK", company.getAccountId());
+request.setAttribute("phones.classPK", company.getAccountId());
+request.setAttribute("websites.classPK", company.getAccountId());
+%>
+
+<portlet:actionURL var="editCompanyURL">
+	<portlet:param name="struts_action" value="/portal_settings/edit_company" />
+</portlet:actionURL>
+
+<aui:form action="<%= editCompanyURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveCompany();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" />
+
+	<liferay-util:buffer var="htmlTop">
+		<div class="company-info">
+			<p class="float-container">
+				<img alt="<liferay-ui:message key="logo" />" class="company-logo" src="<%= themeDisplay.getPathImage() %>/company_logo?img_id=<%= company.getLogoId() %>&t=<%= WebServerServletTokenUtil.getToken(company.getLogoId()) %>" /><br />
+
+				<span class="company-name"><%= HtmlUtil.escape(company.getName()) %></span>
+			</p>
+		</div>
+	</liferay-util:buffer>
+
+	<liferay-ui:form-navigator
+		categoryNames="<%= _CATEGORY_NAMES %>"
+		categorySections="<%= categorySections %>"
+		htmlTop="<%= htmlTop %>"
+		jspPath="/html/portlet/portal_settings/"
+	/>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />saveCompany() {
+		document.<portlet:namespace />fm.method = "post";
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.UPDATE %>";
+
+		<portlet:namespace />saveEmails();
+		<portlet:namespace />saveLdap();
+		<portlet:namespace />saveLocales();
+
+		submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/portal_settings/edit_company" /></portlet:actionURL>");
+	}
+</aui:script>
+
+<%!
+private static final String[] _CATEGORY_NAMES = {"configuration", "identification", "miscellaneous"};
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/edit_company_logo.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/edit_company_logo.jsp
new file mode 100644
index 0000000..cb14796
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/edit_company_logo.jsp
@@ -0,0 +1,68 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<%
+String logoURL = themeDisplay.getPathImage() + "/company_logo?img_id=" + company.getLogoId() + "&t=" + WebServerServletTokenUtil.getToken(company.getLogoId());
+%>
+
+<c:choose>
+	<c:when test='<%= SessionMessages.contains(renderRequest, "requestProcessed") %>'>
+		<aui:script>
+			Liferay.Util.getOpener().<portlet:namespace />changeLogo('<%= logoURL %>');
+
+			Liferay.Util.getWindow().hide();
+		</aui:script>
+	</c:when>
+	<c:otherwise>
+		<portlet:actionURL var="editCompanyLogoURL">
+			<portlet:param name="struts_action" value="/portal_settings/edit_company_logo" />
+		</portlet:actionURL>
+
+		<aui:form action="<%= editCompanyLogoURL %>" enctype="multipart/form-data" method="post" name="fm">
+			<aui:input name="cropRegion" type="hidden" />
+
+			<liferay-ui:error exception="<%= NoSuchFileException.class %>" message="an-unexpected-error-occurred-while-uploading-your-file" />
+			<liferay-ui:error exception="<%= UploadException.class %>" message="an-unexpected-error-occurred-while-uploading-your-file" />
+
+			<aui:fieldset cssClass="lfr-portrait-editor">
+				<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" label="" name="fileName" size="50" type="file" />
+
+				<div class="lfr-change-logo lfr-portrait-preview" id="<portlet:namespace />portraitPreview">
+					<img class="lfr-portrait-preview-img" id="<portlet:namespace />portraitPreviewImg" src="<%= HtmlUtil.escape(logoURL) %>" />
+				</div>
+
+				<aui:button-row>
+					<aui:button name="submitButton" type="submit" />
+
+					<aui:button onClick="window.close();" type="cancel" value="close" />
+				</aui:button-row>
+			</aui:fieldset>
+		</aui:form>
+
+		<aui:script use="liferay-logo-editor">
+			new Liferay.LogoEditor(
+				{
+					maxFileSize: '<%= PrefsPropsUtil.getLong(PropsKeys.UPLOAD_SERVLET_REQUEST_IMPL_MAX_SIZE) / 1024 %>',
+					namespace: '<portlet:namespace />',
+					previewURL: '<portlet:resourceURL><portlet:param name="struts_action" value="/users_admin/edit_company_logo" /><portlet:param name="<%= Constants.CMD %>" value="<%= Constants.GET_TEMP %>" /></portlet:resourceURL>',
+					uploadURL: '<portlet:actionURL><portlet:param name="struts_action" value="/users_admin/edit_company_logo" /><portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ADD_TEMP %>" /></portlet:actionURL>'
+				}
+			);
+		</aui:script>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/edit_ldap_server.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/edit_ldap_server.jsp
new file mode 100644
index 0000000..e90048e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/edit_ldap_server.jsp
@@ -0,0 +1,629 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+String backURL = ParamUtil.getString(request, "backURL", redirect);
+
+long ldapServerId = ParamUtil.getLong(request, "ldapServerId", 0);
+
+String postfix = LDAPSettingsUtil.getPropertyPostfix(ldapServerId);
+
+String ldapServerName = PrefsPropsUtil.getString(company.getCompanyId(), "ldap.server.name" + postfix, StringPool.BLANK);
+String ldapBaseProviderUrl = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_BASE_PROVIDER_URL + postfix);
+String ldapBaseDN = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_BASE_DN + postfix);
+String ldapSecurityPrincipal = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_SECURITY_PRINCIPAL + postfix);
+
+String ldapSecurityCredentials = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_SECURITY_CREDENTIALS + postfix);
+
+if (Validator.isNotNull(ldapSecurityCredentials)) {
+	ldapSecurityCredentials = Portal.TEMP_OBFUSCATION_VALUE;
+}
+
+String ldapAuthSearchFilter = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_AUTH_SEARCH_FILTER + postfix);
+String ldapImportUserSearchFilter = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_IMPORT_USER_SEARCH_FILTER + postfix);
+String ldapImportGroupSearchFilter = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_IMPORT_GROUP_SEARCH_FILTER + postfix);
+String ldapUsersDN = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_USERS_DN + postfix);
+String ldapUserDefaultObjectClasses = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_USER_DEFAULT_OBJECT_CLASSES + postfix);
+String ldapGroupsDN = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_GROUPS_DN + postfix);
+String ldapGroupDefaultObjectClasses = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_GROUP_DEFAULT_OBJECT_CLASSES + postfix);
+
+String ldapUserMappings = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_USER_MAPPINGS + postfix);
+
+String[] userMappingArray = new String[0];
+
+if (ldapUserMappings != null) {
+	userMappingArray = ldapUserMappings.split("\n");
+}
+
+String userMappingEmailAddress = StringPool.BLANK;
+String userMappingFirstName = StringPool.BLANK;
+String userMappingFullName = StringPool.BLANK;
+String userMappingGroup = StringPool.BLANK;
+String userMappingJobTitle = StringPool.BLANK;
+String userMappingLastName = StringPool.BLANK;
+String userMappingMiddleName = StringPool.BLANK;
+String userMappingPassword = StringPool.BLANK;
+String userMappingPortrait= StringPool.BLANK;
+String userMappingScreenName = StringPool.BLANK;
+String userMappingStatus = StringPool.BLANK;
+String userMappingUuid = StringPool.BLANK;
+
+for (int i = 0 ; i < userMappingArray.length ; i++) {
+	if (!userMappingArray[i].contains("=")) {
+		continue;
+	}
+
+	String[] mapping = userMappingArray[i].split("=");
+
+	if (mapping.length != 2) {
+		continue;
+	}
+
+	if (mapping[0].equals("emailAddress")) {
+		userMappingEmailAddress = mapping[1];
+	}
+	else if (mapping[0].equals("firstName")) {
+		userMappingFirstName = mapping[1];
+	}
+	else if (mapping[0].equals("fullName")) {
+		userMappingFullName = mapping[1];
+	}
+	else if (mapping[0].equals("group")) {
+		userMappingGroup = mapping[1];
+	}
+	else if (mapping[0].equals("jobTitle")) {
+		userMappingJobTitle = mapping[1];
+	}
+	else if (mapping[0].equals("lastName")) {
+		userMappingLastName = mapping[1];
+	}
+	else if (mapping[0].equals("middleName")) {
+		userMappingMiddleName = mapping[1];
+	}
+	else if (mapping[0].equals("password")) {
+		userMappingPassword = mapping[1];
+	}
+	else if (mapping[0].equals("portrait")) {
+		userMappingPortrait = mapping[1];
+	}
+	else if (mapping[0].equals("screenName")) {
+		userMappingScreenName = mapping[1];
+	}
+	else if (mapping[0].equals("status")) {
+		userMappingStatus = mapping[1];
+	}
+	else if (mapping[0].equals("uuid")) {
+		userMappingUuid = mapping[1];
+	}
+
+	mapping[1] = "";
+}
+
+String ldapGroupMappings = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_GROUP_MAPPINGS + postfix);
+
+String[] groupMappingArray = new String[0];
+
+if (ldapGroupMappings != null) {
+	groupMappingArray = ldapGroupMappings.split("\n");
+}
+
+String groupMappingDescription = StringPool.BLANK;
+String groupMappingGroupName = StringPool.BLANK;
+String groupMappingUser = StringPool.BLANK;
+
+for (int i = 0 ; i < groupMappingArray.length ; i++) {
+	if (!groupMappingArray[i].contains("=")) {
+		continue;
+	}
+
+	String[] mapping = groupMappingArray[i].split("=");
+
+	if (mapping.length != 2) {
+		continue;
+	}
+
+	if (mapping[0].equals("description")) {
+		groupMappingDescription = mapping[1];
+	}
+	else if (mapping[0].equals("groupName")) {
+		groupMappingGroupName = mapping[1];
+	}
+	else if (mapping[0].equals("user")) {
+		groupMappingUser = mapping[1];
+	}
+}
+%>
+
+<liferay-ui:header
+	backURL="<%= backURL %>"
+	title='<%= (ldapServerId == 0) ? "add-ldap-server" : "edit-ldap-server" %>'
+/>
+
+<portlet:actionURL var="editLDAPServerURL">
+	<portlet:param name="struts_action" value="/portal_settings/edit_ldap_server" />
+</portlet:actionURL>
+
+<aui:form action="<%= editLDAPServerURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveEntry(false);" %>'>
+	<liferay-ui:error exception="<%= DuplicateLDAPServerNameException.class %>" message="please-enter-a-unique-ldap-server-name" />
+	<liferay-ui:error exception="<%= LDAPFilterException.class %>" message="please-enter-a-valid-ldap-search-filter" />
+	<liferay-ui:error exception="<%= LDAPServerNameException.class %>" message="please-enter-a-valid-ldap-server-name" />
+
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="ldapServerId" type="hidden" value="<%= ldapServerId %>" />
+
+	<liferay-ui:error key="ldapAuthentication" message="failed-to-bind-to-the-ldap-server-with-given-values" />
+
+	<aui:fieldset>
+		<aui:input cssClass="lfr-input-text-container" label="server-name" name='<%= "settings--ldap.server.name" + postfix + "--" %>' type="text" value="<%= ldapServerName %>" />
+	</aui:fieldset>
+
+	<h3><liferay-ui:message key="default-values" /></h3>
+
+	<aui:fieldset>
+		<aui:field-wrapper>
+			<aui:input label="Apache Directory Server" name="defaultLdap" type="radio" value="apache" />
+			<aui:input label="Fedora Directory Server" name="defaultLdap" type="radio" value="fedora" />
+			<aui:input label="Microsoft Active Directory Server" name="defaultLdap" type="radio" value="microsoft" />
+			<aui:input label="Novell eDirectory" name="defaultLdap" type="radio" value="novell" />
+			<aui:input label="OpenLDAP" name="defaultLdap" type="radio" value="open" />
+			<aui:input label="other-directory-server" name="defaultLdap" type="radio" value="other" />
+		</aui:field-wrapper>
+
+		<aui:button-row>
+			<aui:button onClick='<%= renderResponse.getNamespace() + "updateDefaultLdap();" %>' value="reset-values" />
+		</aui:button-row>
+	</aui:fieldset>
+
+	<h3><liferay-ui:message key="connection" /></h3>
+
+	<aui:fieldset>
+		<aui:input cssClass="lfr-input-text-container" helpMessage="the-ldap-url-format-is" label="base-provider-url" name='<%= "settings--" + PropsKeys.LDAP_BASE_PROVIDER_URL + postfix + "--" %>' type="text" value="<%= ldapBaseProviderUrl %>" />
+
+		<aui:input cssClass="lfr-input-text-container" helpMessage="the-ldap-url-format-is" label="base-dn" name='<%= "settings--" + PropsKeys.LDAP_BASE_DN + postfix + "--" %>' type="text" value="<%= ldapBaseDN %>" />
+
+		<aui:input cssClass="lfr-input-text-container" label="principal" name='<%= "settings--" + PropsKeys.LDAP_SECURITY_PRINCIPAL + postfix + "--" %>' type="text" value="<%= ldapSecurityPrincipal %>" />
+
+		<aui:input cssClass="lfr-input-text-container" label="credentials" name='<%= "settings--" + PropsKeys.LDAP_SECURITY_CREDENTIALS + postfix + "--" %>' type="password" value="<%= ldapSecurityCredentials %>" />
+
+		<aui:button-row>
+
+			<%
+			String taglibOnClick = renderResponse.getNamespace() + "testSettings('ldapConnection');";
+			%>
+
+			<aui:button onClick="<%= taglibOnClick %>" value="test-ldap-connection" />
+		</aui:button-row>
+	</aui:fieldset>
+
+	<h3><liferay-ui:message key="users" /></h3>
+
+	<aui:fieldset>
+		<aui:input cssClass="lfr-input-text-container" helpMessage="enter-the-search-filter-that-will-be-used-to-test-the-validity-of-a-user" label="authentication-search-filter" name='<%= "settings--" + PropsKeys.LDAP_AUTH_SEARCH_FILTER + postfix + "--" %>' type="text" value="<%= ldapAuthSearchFilter %>" />
+
+		<aui:input cssClass="lfr-input-text-container" label="import-search-filter" name='<%= "settings--" + PropsKeys.LDAP_IMPORT_USER_SEARCH_FILTER + postfix + "--" %>' type="text" value="<%= ldapImportUserSearchFilter %>" />
+
+		<h4><liferay-ui:message key="user-mapping" /></h4>
+
+		<aui:input cssClass="lfr-input-text-container" label="uuid" name="userMappingUuid" type="text" value="<%= userMappingUuid %>" />
+
+		<aui:input cssClass="lfr-input-text-container" label="screen-name" name="userMappingScreenName" type="text" value="<%= userMappingScreenName %>" />
+
+		<aui:input cssClass="lfr-input-text-container" label="email-address" name="userMappingEmailAddress" type="text" value="<%= userMappingEmailAddress %>" />
+
+		<aui:input cssClass="lfr-input-text-container" label="password" name="userMappingPassword" type="text" value="<%= userMappingPassword %>" />
+
+		<aui:input cssClass="lfr-input-text-container" label="first-name" name="userMappingFirstName" type="text" value="<%= userMappingFirstName %>" />
+
+		<aui:input cssClass="lfr-input-text-container" label="middle-name" name="userMappingMiddleName" type="text" value="<%= userMappingMiddleName %>" />
+
+		<aui:input cssClass="lfr-input-text-container" label="last-name" name="userMappingLastName" type="text" value="<%= userMappingLastName %>" />
+
+		<aui:input cssClass="lfr-input-text-container" helpMessage="ldap-full-name-attribute-help" label="full-name" name="userMappingFullName" type="text" value="<%= userMappingFullName %>" />
+
+		<aui:input cssClass="lfr-input-text-container" label="job-title" name="userMappingJobTitle" type="text" value="<%= userMappingJobTitle %>" />
+
+		<aui:input cssClass="lfr-input-text-container" label="status" name="userMappingStatus" type="text" value="<%= userMappingStatus %>" />
+
+		<aui:input cssClass="lfr-input-text-container" label="group" name="userMappingGroup" type="text" value="<%= userMappingGroup %>" />
+
+		<aui:input cssClass="lfr-input-text-container" label="portrait" name="userMappingPortrait" type="text" value="<%= userMappingPortrait %>" />
+
+		<aui:input name='<%= "settings--" + PropsKeys.LDAP_USER_MAPPINGS + postfix + "--" %>' type="hidden" />
+
+		<aui:input name='<%= "settings--" + PropsKeys.LDAP_USER_CUSTOM_MAPPINGS + postfix + "--" %>' type="hidden" value="<%= PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_USER_CUSTOM_MAPPINGS + postfix, PropsUtil.get(PropsKeys.LDAP_USER_CUSTOM_MAPPINGS)) %>" />
+
+		<aui:input name='<%= "settings--" + PropsKeys.LDAP_CONTACT_MAPPINGS + postfix + "--" %>' type="hidden" value="<%= PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_CONTACT_MAPPINGS + postfix, PropsUtil.get(PropsKeys.LDAP_CONTACT_MAPPINGS)) %>" />
+
+		<aui:input name='<%= "settings--" + PropsKeys.LDAP_CONTACT_CUSTOM_MAPPINGS + postfix + "--" %>' type="hidden" value="<%= PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_CONTACT_CUSTOM_MAPPINGS + postfix, PropsUtil.get(PropsKeys.LDAP_CONTACT_CUSTOM_MAPPINGS)) %>" />
+
+		<aui:button-row>
+
+			<%
+			String taglibOnClick = renderResponse.getNamespace() + "testSettings('ldapUsers');";
+			%>
+
+			<aui:button onClick="<%= taglibOnClick %>" value="test-ldap-users" />
+		</aui:button-row>
+	</aui:fieldset>
+
+	<h3><liferay-ui:message key="groups" /></h3>
+
+	<aui:fieldset>
+		<aui:input cssClass="lfr-input-text-container" label="import-search-filter" name='<%= "settings--" + PropsKeys.LDAP_IMPORT_GROUP_SEARCH_FILTER + postfix + "--" %>' type="text" value="<%= ldapImportGroupSearchFilter %>" />
+
+		<h4><liferay-ui:message key="group-mapping" /></h4>
+
+		<aui:input cssClass="lfr-input-text-container" label="group-name" name="groupMappingGroupName" type="text" value="<%= groupMappingGroupName %>" />
+
+		<aui:input cssClass="lfr-input-text-container" label="description" name="groupMappingDescription" type="text" value="<%= groupMappingDescription %>" />
+
+		<aui:input cssClass="lfr-input-text-container" label="user" name="groupMappingUser" type="text" value="<%= groupMappingUser %>" />
+
+		<aui:input name='<%= "settings--" + PropsKeys.LDAP_GROUP_MAPPINGS + postfix + "--" %>' type="hidden" />
+
+		<aui:button-row>
+
+			<%
+			String taglibOnClick = renderResponse.getNamespace() + "testSettings('ldapGroups');";
+			%>
+
+			<aui:button onClick="<%= taglibOnClick %>" value="test-ldap-groups" />
+		</aui:button-row>
+	</aui:fieldset>
+
+	<h3><liferay-ui:message key="export" /></h3>
+
+	<aui:fieldset>
+		<aui:input cssClass="lfr-input-text-container" label="users-dn" name='<%= "settings--" + PropsKeys.LDAP_USERS_DN + postfix + "--" %>' type="text" value="<%= ldapUsersDN %>" />
+
+		<aui:input cssClass="lfr-input-text-container" label="user-default-object-classes" name='<%= "settings--" + PropsKeys.LDAP_USER_DEFAULT_OBJECT_CLASSES + postfix + "--" %>' type="text" value="<%= ldapUserDefaultObjectClasses %>" />
+
+		<aui:input cssClass="lfr-input-text-container" label="groups-dn" name='<%= "settings--" + PropsKeys.LDAP_GROUPS_DN + postfix + "--" %>' type="text" value="<%= ldapGroupsDN %>" />
+
+		<aui:input cssClass="lfr-input-text-container" label="group-default-object-classes" name='<%= "settings--" + PropsKeys.LDAP_GROUP_DEFAULT_OBJECT_CLASSES + postfix + "--" %>' type="text" value="<%= ldapGroupDefaultObjectClasses %>" />
+	</aui:fieldset>
+
+	<aui:button-row>
+
+		<%
+		String taglibOnClick = renderResponse.getNamespace() + "saveLdap();";
+		%>
+
+		<aui:button name="saveButton" onClick="<%= taglibOnClick %>" value="save" />
+
+		<aui:button href="<%= redirect %>" name="cancelButton" type="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />saveLdap() {
+		var userMappingFields = ['emailAddress', 'firstName', 'fullName', 'group', 'jobTitle', 'lastName', 'middleName', 'password', 'portrait', 'screenName', 'status', 'uuid'];
+		var userMappingFieldValues = ['userMappingEmailAddress', 'userMappingFirstName', 'userMappingFullName', 'userMappingGroup', 'userMappingJobTitle', 'userMappingLastName', 'userMappingMiddleName', 'userMappingPassword', 'userMappingPortrait', 'userMappingScreenName', 'userMappingStatus', 'userMappingUuid'];
+		var userMappingInput = document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.LDAP_USER_MAPPINGS + postfix %>--'];
+
+		userMappingInput.value = '';
+
+		for (var i = 0; i < userMappingFields.length; i++) {
+			var userMappingField = userMappingFields[i];
+			var userMappingValue = document.<portlet:namespace />fm['<portlet:namespace />' + userMappingFieldValues[i]].value;
+
+			if (userMappingValue) {
+				userMappingInput.value += userMappingFields[i] + '=' + userMappingValue + '\n';
+			}
+		}
+
+		var groupMappingFields = ['description', 'groupName', 'user'];
+		var groupMappingFieldValues = ['groupMappingDescription', 'groupMappingGroupName', 'groupMappingUser'];
+		var groupMappingInput = document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.LDAP_GROUP_MAPPINGS + postfix %>--'];
+
+		groupMappingInput.value = '';
+
+		for (var i = 0; i<groupMappingFields.length; i++) {
+			var groupMappingField = groupMappingFields[i];
+			var groupMappingValue = document.<portlet:namespace />fm['<portlet:namespace />' + groupMappingFieldValues[i]].value;
+
+			if (groupMappingValue) {
+				groupMappingInput.value += groupMappingFields[i] + '=' + groupMappingValue + '\n';
+			}
+		}
+
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= ldapServerId <= 0 ? Constants.ADD : Constants.UPDATE %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />testSettings',
+		function(type) {
+			var A = AUI();
+
+			var url = null;
+
+			var data = {};
+
+			if (type == "ldapConnection") {
+				url = "<portlet:renderURL windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>"><portlet:param name="struts_action" value="/portal_settings/test_ldap_connection" /></portlet:renderURL>";
+			}
+			else if (type == "ldapGroups") {
+				url = "<portlet:renderURL windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>"><portlet:param name="struts_action" value="/portal_settings/test_ldap_groups" /></portlet:renderURL>";
+
+				data.<portlet:namespace />importGroupSearchFilter = document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.LDAP_IMPORT_GROUP_SEARCH_FILTER + postfix %>--'].value;
+				data.<portlet:namespace />groupMappingDescription = document.<portlet:namespace />fm['<portlet:namespace />groupMappingDescription'].value;
+				data.<portlet:namespace />groupMappingGroupName = document.<portlet:namespace />fm['<portlet:namespace />groupMappingGroupName'].value;
+				data.<portlet:namespace />groupMappingUser = document.<portlet:namespace />fm['<portlet:namespace />groupMappingUser'].value;
+			}
+			else if (type == "ldapUsers") {
+				url = "<portlet:renderURL windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>"><portlet:param name="struts_action" value="/portal_settings/test_ldap_users" /></portlet:renderURL>";
+
+				data.<portlet:namespace />importUserSearchFilter = document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.LDAP_IMPORT_USER_SEARCH_FILTER + postfix %>--'].value;
+				data.<portlet:namespace />userMappingEmailAddress = document.<portlet:namespace />fm['<portlet:namespace />userMappingEmailAddress'].value;
+				data.<portlet:namespace />userMappingFirstName = document.<portlet:namespace />fm['<portlet:namespace />userMappingFirstName'].value;
+				data.<portlet:namespace />userMappingFullName = document.<portlet:namespace />fm['<portlet:namespace />userMappingFullName'].value;
+				data.<portlet:namespace />userMappingGroup = document.<portlet:namespace />fm['<portlet:namespace />userMappingGroup'].value;
+				data.<portlet:namespace />userMappingJobTitle = document.<portlet:namespace />fm['<portlet:namespace />userMappingJobTitle'].value;
+				data.<portlet:namespace />userMappingLastName = document.<portlet:namespace />fm['<portlet:namespace />userMappingLastName'].value;
+				data.<portlet:namespace />userMappingMiddleName = document.<portlet:namespace />fm['<portlet:namespace />userMappingMiddleName'].value;
+				data.<portlet:namespace />userMappingPassword = document.<portlet:namespace />fm['<portlet:namespace />userMappingPassword'].value;
+				data.<portlet:namespace />userMappingPortrait = document.<portlet:namespace />fm['<portlet:namespace />userMappingPortrait'].value;
+				data.<portlet:namespace />userMappingScreenName = document.<portlet:namespace />fm['<portlet:namespace />userMappingScreenName'].value;
+				data.<portlet:namespace />userMappingStatus = document.<portlet:namespace />fm['<portlet:namespace />userMappingStatus'].value;
+				data.<portlet:namespace />userMappingUuid = document.<portlet:namespace />fm['<portlet:namespace />userMappingUuid'].value;
+			}
+
+			if (url != null) {
+				data.<portlet:namespace />ldapServerId = document.<portlet:namespace />fm['<portlet:namespace />ldapServerId'].value;
+				data.<portlet:namespace />baseProviderURL = document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.LDAP_BASE_PROVIDER_URL + postfix %>--'].value;
+				data.<portlet:namespace />baseDN = document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.LDAP_BASE_DN + postfix %>--'].value;
+				data.<portlet:namespace />principal = document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.LDAP_SECURITY_PRINCIPAL + postfix %>--'].value;
+				data.<portlet:namespace />credentials = document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.LDAP_SECURITY_CREDENTIALS + postfix %>--'].value;
+
+				var dialog = Liferay.Util.Window.getWindow(
+					{
+						dialog: {
+							destroyOnHide: true
+						},
+						title: '<%= UnicodeLanguageUtil.get(pageContext, "ldap") %>'
+					}
+				);
+
+				dialog.plug(
+					A.Plugin.IO,
+					{
+						data: data,
+						uri: url
+					}
+				);
+			}
+		},
+		['aui-io-plugin-deprecated', 'aui-io', 'liferay-util-window']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />updateDefaultLdap',
+		function(ldapType) {
+			var A = AUI();
+
+			var baseProviderURL = "";
+			var baseDN = "";
+			var principal = "";
+			var credentials = "";
+			var searchFilter = "";
+			var importUserSearchFilter = "";
+			var userMappingEmailAddress = "";
+			var userMappingFirstName = "";
+			var userMappingFullName = "";
+			var userMappingGroup = "";
+			var userMappingJobTitle = "";
+			var userMappingLastName = "";
+			var userMappingMiddleName = "";
+			var userMappingPassword = "";
+			var userMappingPortrait = "";
+			var userMappingScreenName = "";
+			var userMappingStatus = "";
+			var userMappingUuid = "";
+			var importGroupSearchFilter = "";
+			var groupMappingDescription = "";
+			var groupMappingGroupName = "";
+			var groupMappingUser = "";
+			var exportMappingUserDefaultObjectClass = "";
+			var exportMappingGroupDefaultObjectClass = "";
+
+			if (!ldapType) {
+				A.all(document.<portlet:namespace />fm.<portlet:namespace />defaultLdap).some(
+					function(item, index, collection) {
+						var checked = item.get('checked');
+
+						if (checked) {
+							ldapType = item.val();
+						}
+
+						return checked;
+					}
+				);
+			}
+
+			if (ldapType == "apache") {
+				baseProviderURL = "ldap://localhost:10389";
+				baseDN = "dc=example,dc=com";
+				principal = "uid=admin,ou=system";
+				credentials = "secret";
+				searchFilter = "(mail=@email_address@)";
+				importUserSearchFilter = "(objectClass=person)";
+				userMappingEmailAddress = "mail";
+				userMappingFirstName = "givenName";
+				userMappingFullName = "";
+				userMappingGroup = "";
+				userMappingJobTitle = "title";
+				userMappingLastName = "sn";
+				userMappingMiddleName = "";
+				userMappingPassword = "userPassword";
+				userMappingPortrait = "";
+				userMappingScreenName = "cn";
+				userMappingStatus = "";
+				userMappingUuid = "";
+				importGroupSearchFilter = "(objectClass=groupOfUniqueNames)";
+				groupMappingDescription = "description";
+				groupMappingGroupName = "cn";
+				groupMappingUser = "uniqueMember";
+				exportMappingUserDefaultObjectClass = "top,person,inetOrgPerson,organizationalPerson";
+				exportMappingGroupDefaultObjectClass = "top,groupOfUniqueNames";
+			}
+			else if (ldapType == "fedora") {
+				baseProviderURL = "ldap://localhost:19389";
+				baseDN = "dc=localdomain";
+				principal = "cn=Directory Manager";
+				credentials = "";
+				searchFilter = "(mail=@email_address@)";
+				importUserSearchFilter = "(objectClass=inetOrgPerson)";
+				userMappingEmailAddress = "mail";
+				userMappingFirstName = "givenName";
+				userMappingFullName = "cn";
+				userMappingGroup = "";
+				userMappingJobTitle = "title";
+				userMappingLastName = "sn";
+				userMappingMiddleName = "";
+				userMappingPassword = "userPassword";
+				userMappingPortrait = "";
+				userMappingScreenName = "uid";
+				userMappingStatus = "";
+				userMappingUuid = "";
+				importGroupSearchFilter = "";
+				groupMappingDescription = "";
+				groupMappingGroupName = "";
+				groupMappingUser = "";
+				exportMappingUserDefaultObjectClass = "";
+				exportMappingGroupDefaultObjectClass = "";
+			}
+			else if (ldapType == "microsoft") {
+				baseProviderURL = "ldap://localhost:389";
+				baseDN = "dc=example,dc=com";
+				principal = "admin";
+				credentials = "secret";
+				searchFilter = "(&(objectCategory=person)(sAMAccountName=@user_id@))";
+				importUserSearchFilter = "(objectClass=person)";
+				userMappingEmailAddress = "userprincipalname";
+				userMappingFirstName = "givenName";
+				userMappingFullName = "cn";
+				userMappingGroup = "memberOf";
+				userMappingJobTitle = "";
+				userMappingLastName = "sn";
+				userMappingMiddleName = "middleName";
+				userMappingPassword = "userPassword";
+				userMappingPortrait = "";
+				userMappingScreenName = "sAMAccountName";
+				userMappingStatus = "";
+				userMappingUuid = "";
+				importGroupSearchFilter = "(objectClass=group)";
+				groupMappingDescription = "sAMAccountName";
+				groupMappingGroupName = "cn";
+				groupMappingUser = "member";
+				exportMappingUserDefaultObjectClass = "";
+				exportMappingGroupDefaultObjectClass = "";
+			}
+			else if (ldapType == "novell") {
+				url = "ldap://localhost:389";
+				baseDN = "";
+				principal = "cn=admin,ou=test";
+				credentials = "secret";
+				searchFilter = "(mail=@email_address@)";
+				importUserSearchFilter = "";
+				userMappingEmailAddress = "mail";
+				userMappingFirstName = "givenName";
+				userMappingFullName = "";
+				userMappingGroup = "";
+				userMappingJobTitle = "title";
+				userMappingLastName = "sn";
+				userMappingMiddleName = "";
+				userMappingPassword = "userPassword";
+				userMappingPortrait = "";
+				userMappingScreenName = "cn";
+				userMappingStatus = "";
+				userMappingUuid = "";
+				importGroupSearchFilter = "";
+				groupMappingDescription = "";
+				groupMappingGroupName = "";
+				groupMappingUser = "";
+				exportMappingUserDefaultObjectClass = "";
+				exportMappingGroupDefaultObjectClass = "";
+			}
+			else if (ldapType == "open") {
+				url = "ldap://localhost:389";
+				baseDN = "dc=example,dc=com";
+				principal = "cn=admin,ou=test";
+				credentials = "secret";
+				searchFilter = "(mail=@email_address@)";
+				importUserSearchFilter = "(objectClass=inetOrgPerson)";
+				userMappingEmailAddress = "mail";
+				userMappingFirstName = "givenName";
+				userMappingFullName = "";
+				userMappingGroup = "";
+				userMappingJobTitle = "title";
+				userMappingLastName = "sn";
+				userMappingMiddleName = "";
+				userMappingPassword = "userPassword";
+				userMappingPortrait = "";
+				userMappingScreenName = "cn";
+				userMappingStatus = "";
+				userMappingUuid = "";
+				importGroupSearchFilter = "(objectClass=groupOfUniqueNames)";
+				groupMappingGroupName = "cn";
+				groupMappingDescription = "description";
+				groupMappingUser = "uniqueMember";
+				exportMappingUserDefaultObjectClass = "";
+				exportMappingGroupDefaultObjectClass = "";
+			}
+
+			document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.LDAP_BASE_PROVIDER_URL + postfix %>--'].value = baseProviderURL;
+			document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.LDAP_BASE_DN + postfix %>--'].value = baseDN;
+			document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.LDAP_SECURITY_PRINCIPAL + postfix %>--'].value = principal;
+			document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.LDAP_SECURITY_CREDENTIALS + postfix %>--'].value = credentials;
+			document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.LDAP_AUTH_SEARCH_FILTER + postfix %>--'].value = searchFilter;
+			document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.LDAP_IMPORT_USER_SEARCH_FILTER + postfix %>--'].value = importUserSearchFilter;
+			document.<portlet:namespace />fm['<portlet:namespace />userMappingEmailAddress'].value = userMappingEmailAddress;
+			document.<portlet:namespace />fm['<portlet:namespace />userMappingFirstName'].value = userMappingFirstName;
+			document.<portlet:namespace />fm['<portlet:namespace />userMappingFullName'].value = userMappingFullName;
+			document.<portlet:namespace />fm['<portlet:namespace />userMappingGroup'].value = userMappingGroup;
+			document.<portlet:namespace />fm['<portlet:namespace />userMappingJobTitle'].value = userMappingJobTitle;
+			document.<portlet:namespace />fm['<portlet:namespace />userMappingLastName'].value = userMappingLastName;
+			document.<portlet:namespace />fm['<portlet:namespace />userMappingMiddleName'].value = userMappingMiddleName;
+			document.<portlet:namespace />fm['<portlet:namespace />userMappingPassword'].value = userMappingPassword;
+			document.<portlet:namespace />fm['<portlet:namespace />userMappingPortrait'].value = userMappingPortrait;
+			document.<portlet:namespace />fm['<portlet:namespace />userMappingScreenName'].value = userMappingScreenName;
+			document.<portlet:namespace />fm['<portlet:namespace />userMappingStatus'].value = userMappingStatus;
+			document.<portlet:namespace />fm['<portlet:namespace />userMappingUuid'].value = userMappingUuid;
+			document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.LDAP_IMPORT_GROUP_SEARCH_FILTER + postfix %>--'].value = importGroupSearchFilter;
+			document.<portlet:namespace />fm['<portlet:namespace />groupMappingDescription'].value = groupMappingDescription;
+			document.<portlet:namespace />fm['<portlet:namespace />groupMappingGroupName'].value = groupMappingGroupName;
+			document.<portlet:namespace />fm['<portlet:namespace />groupMappingUser'].value = groupMappingUser;
+			document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.LDAP_USERS_DN + postfix %>--'].value = baseDN;
+			document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.LDAP_USER_DEFAULT_OBJECT_CLASSES + postfix %>--'].value = exportMappingUserDefaultObjectClass;
+			document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.LDAP_GROUPS_DN + postfix %>--'].value = baseDN;
+			document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.LDAP_GROUP_DEFAULT_OBJECT_CLASSES + postfix %>--'].value = exportMappingGroupDefaultObjectClass;
+		},
+		['aui-base']
+	);
+
+</aui:script>
+
+<%
+PortalUtil.addPortletBreadcrumbEntry(request, (ldapServerId == 0) ? LanguageUtil.get(pageContext, "add-ldap-server") : ldapServerName, currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/email_notifications.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/email_notifications.jsp
new file mode 100644
index 0000000..3bc41c8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/email_notifications.jsp
@@ -0,0 +1,201 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<h3><liferay-ui:message key="email-notifications" /></h3>
+
+<%
+String adminEmailFromName = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.ADMIN_EMAIL_FROM_NAME);
+String adminEmailFromAddress = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.ADMIN_EMAIL_FROM_ADDRESS);
+
+boolean adminEmailUserAddedEnable = PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.ADMIN_EMAIL_USER_ADDED_ENABLED);
+String adminEmailUserAddedSubject = PrefsPropsUtil.getContent(company.getCompanyId(), PropsKeys.ADMIN_EMAIL_USER_ADDED_SUBJECT);
+String adminEmailUserAddedBody = PrefsPropsUtil.getContent(company.getCompanyId(), PropsKeys.ADMIN_EMAIL_USER_ADDED_BODY);
+String adminEmailUserAddedNoPasswordBody = PrefsPropsUtil.getContent(company.getCompanyId(), PropsKeys.ADMIN_EMAIL_USER_ADDED_NO_PASSWORD_BODY);
+
+String adminEmailPasswordSentSubject = PrefsPropsUtil.getContent(company.getCompanyId(), PropsKeys.ADMIN_EMAIL_PASSWORD_SENT_SUBJECT);
+String adminEmailPasswordSentBody = PrefsPropsUtil.getContent(company.getCompanyId(), PropsKeys.ADMIN_EMAIL_PASSWORD_SENT_BODY);
+
+String adminEmailPasswordResetSubject = PrefsPropsUtil.getContent(company.getCompanyId(), PropsKeys.ADMIN_EMAIL_PASSWORD_RESET_SUBJECT);
+String adminEmailPasswordResetBody = PrefsPropsUtil.getContent(company.getCompanyId(), PropsKeys.ADMIN_EMAIL_PASSWORD_RESET_BODY);
+
+String adminEmailVerificationSubject = PrefsPropsUtil.getContent(company.getCompanyId(), PropsKeys.ADMIN_EMAIL_VERIFICATION_SUBJECT);
+String adminEmailVerificationBody = PrefsPropsUtil.getContent(company.getCompanyId(), PropsKeys.ADMIN_EMAIL_VERIFICATION_BODY);
+%>
+
+<liferay-ui:error-marker key="errorSection" value="email_notifications" />
+
+<liferay-ui:tabs
+	names="sender,account-created-notification,email-verification-notification,password-changed-notification,password-reset-notification"
+	refresh="<%= false %>"
+>
+	<liferay-ui:section>
+		<aui:fieldset>
+			<liferay-ui:error key="emailFromName" message="please-enter-a-valid-name" />
+
+			<aui:input cssClass="lfr-input-text-container" label="name" name='<%= "settings--" + PropsKeys.ADMIN_EMAIL_FROM_NAME + "--" %>' type="text" value="<%= adminEmailFromName %>" />
+
+			<liferay-ui:error key="emailFromAddress" message="please-enter-a-valid-email-address" />
+
+			<aui:input cssClass="lfr-input-text-container" label="address" name='<%= "settings--" + PropsKeys.ADMIN_EMAIL_FROM_ADDRESS + "--" %>' type="text" value="<%= adminEmailFromAddress %>" />
+		</aui:fieldset>
+	</liferay-ui:section>
+	<liferay-ui:section>
+		<aui:fieldset>
+			<aui:input label="enabled" name='<%= "settings--" + PropsKeys.ADMIN_EMAIL_USER_ADDED_ENABLED + "--" %>' type="checkbox" value="<%= adminEmailUserAddedEnable %>" />
+
+			<liferay-ui:error key="emailUserAddedSubject" message="please-enter-a-valid-subject" />
+
+			<aui:input cssClass="lfr-input-text-container" label="subject" name='<%= "settings--" + PropsKeys.ADMIN_EMAIL_USER_ADDED_SUBJECT + "--" %>' type="text" value="<%= adminEmailUserAddedSubject %>" />
+
+			<liferay-ui:error key="emailUserAddedBody" message="please-enter-a-valid-body" />
+
+			<aui:field-wrapper helpMessage="account-created-notification-body-with-password-help" label="body-with-password">
+				<liferay-ui:input-editor editorImpl="<%= EDITOR_WYSIWYG_IMPL_KEY %>" initMethod='<%= "initEmailUserAddedBodyEditor" %>' name="emailUserAddedBody" toolbarSet="email" width="470" />
+
+				<aui:input name='<%= "settings--" + PropsKeys.ADMIN_EMAIL_USER_ADDED_BODY + "--" %>' type="hidden" value="<%= adminEmailUserAddedBody %>" />
+			</aui:field-wrapper>
+
+			<liferay-ui:error key="emailUserAddedNoPasswordBody" message="please-enter-a-valid-body" />
+
+			<aui:field-wrapper helpMessage="account-created-notification-body-without-password-help" label="body-without-password">
+				<liferay-ui:input-editor editorImpl="<%= EDITOR_WYSIWYG_IMPL_KEY %>" initMethod='<%= "initEmailUserAddedNoPasswordBodyEditor" %>' name="emailUserAddedNoPasswordBody" toolbarSet="email" width="470" />
+
+				<aui:input name='<%= "settings--" + PropsKeys.ADMIN_EMAIL_USER_ADDED_NO_PASSWORD_BODY + "--" %>' type="hidden" value="<%= adminEmailUserAddedNoPasswordBody %>" />
+			</aui:field-wrapper>
+
+			<div class="terms email-user-add definition-of-terms">
+				<%@ include file="/html/portlet/portal_settings/definition_of_terms.jspf" %>
+			</div>
+		</aui:fieldset>
+	</liferay-ui:section>
+	<liferay-ui:section>
+		<aui:fieldset>
+			<liferay-ui:error key="emailVerificationSubject" message="please-enter-a-valid-subject" />
+
+			<aui:input cssClass="lfr-input-text-container" label="subject" name='<%= "settings--" + PropsKeys.ADMIN_EMAIL_VERIFICATION_SUBJECT + "--" %>' type="text" value="<%= adminEmailVerificationSubject %>" />
+
+			<liferay-ui:error key="emailVerificationBody" message="please-enter-a-valid-body" />
+
+			<aui:field-wrapper label="body">
+				<liferay-ui:input-editor editorImpl="<%= EDITOR_WYSIWYG_IMPL_KEY %>" initMethod='<%= "initEmailVerificationBodyEditor" %>' name="emailVerificationBody" toolbarSet="email" width="470" />
+
+				<aui:input name='<%= "settings--" + PropsKeys.ADMIN_EMAIL_VERIFICATION_BODY + "--" %>' type="hidden" value="<%= adminEmailPasswordResetBody %>" />
+			</aui:field-wrapper>
+
+			<div class="terms email-verification definition-of-terms">
+				<%@ include file="/html/portlet/portal_settings/definition_of_terms.jspf" %>
+			</div>
+		</aui:fieldset>
+	</liferay-ui:section>
+	<liferay-ui:section>
+		<aui:fieldset>
+			<liferay-ui:error key="emailPasswordSentSubject" message="please-enter-a-valid-subject" />
+
+			<aui:input cssClass="lfr-input-text-container" label="subject" name='<%= "settings--" + PropsKeys.ADMIN_EMAIL_PASSWORD_SENT_SUBJECT + "--" %>' type="text" value="<%= adminEmailPasswordSentSubject %>" />
+
+			<liferay-ui:error key="emailPasswordSentBody" message="please-enter-a-valid-body" />
+
+			<aui:field-wrapper label="body">
+				<liferay-ui:input-editor editorImpl="<%= EDITOR_WYSIWYG_IMPL_KEY %>" initMethod='<%= "initEmailPasswordSentBodyEditor" %>' name="emailPasswordSentBody" toolbarSet="email" width="470" />
+
+				<aui:input name='<%= "settings--" + PropsKeys.ADMIN_EMAIL_PASSWORD_SENT_BODY + "--" %>' type="hidden" value="<%= adminEmailPasswordSentBody %>" />
+			</aui:field-wrapper>
+
+			<div class="terms email-password-sent definition-of-terms">
+				<%@ include file="/html/portlet/portal_settings/definition_of_terms.jspf" %>
+			</div>
+		</aui:fieldset>
+	</liferay-ui:section>
+	<liferay-ui:section>
+		<aui:fieldset>
+			<liferay-ui:error key="emailPasswordResetSubject" message="please-enter-a-valid-subject" />
+
+			<aui:input cssClass="lfr-input-text-container" label="subject" name='<%= "settings--" + PropsKeys.ADMIN_EMAIL_PASSWORD_RESET_SUBJECT + "--" %>' type="text" value="<%= adminEmailPasswordResetSubject %>" />
+
+			<liferay-ui:error key="emailPasswordResetBody" message="please-enter-a-valid-body" />
+
+			<aui:field-wrapper label="body">
+				<liferay-ui:input-editor editorImpl="<%= EDITOR_WYSIWYG_IMPL_KEY %>" initMethod='<%= "initEmailPasswordResetBodyEditor" %>' name="emailPasswordResetBody" toolbarSet="email" width="470" />
+
+				<aui:input name='<%= "settings--" + PropsKeys.ADMIN_EMAIL_PASSWORD_RESET_BODY + "--" %>' type="hidden" value="<%= adminEmailPasswordResetBody %>" />
+			</aui:field-wrapper>
+
+			<div class="terms email-password-sent definition-of-terms">
+				<%@ include file="/html/portlet/portal_settings/definition_of_terms.jspf" %>
+			</div>
+		</aui:fieldset>
+	</liferay-ui:section>
+</liferay-ui:tabs>
+
+<aui:script>
+	function <portlet:namespace />initEmailUserAddedBodyEditor() {
+		return "<%= UnicodeFormatter.toString(adminEmailUserAddedBody) %>";
+	}
+
+	function <portlet:namespace />initEmailUserAddedNoPasswordBodyEditor() {
+		return "<%= UnicodeFormatter.toString(adminEmailUserAddedNoPasswordBody) %>";
+	}
+
+	function <portlet:namespace />initEmailPasswordSentBodyEditor() {
+		return "<%= UnicodeFormatter.toString(adminEmailPasswordSentBody) %>";
+	}
+
+	function <portlet:namespace />initEmailPasswordResetBodyEditor() {
+		return "<%= UnicodeFormatter.toString(adminEmailPasswordResetBody) %>";
+	}
+
+	function <portlet:namespace />initEmailVerificationBodyEditor() {
+		return "<%= UnicodeFormatter.toString(adminEmailVerificationBody) %>";
+	}
+
+	function <portlet:namespace />saveEmails() {
+		try {
+			document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.ADMIN_EMAIL_USER_ADDED_BODY %>--'].value = window['<portlet:namespace />emailUserAddedBody'].getHTML();
+		}
+		catch (e) {
+		}
+
+		try {
+			document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.ADMIN_EMAIL_USER_ADDED_NO_PASSWORD_BODY %>--'].value = window['<portlet:namespace />emailUserAddedNoPasswordBody'].getHTML();
+		}
+		catch (e) {
+		}
+
+		try {
+			document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.ADMIN_EMAIL_PASSWORD_SENT_BODY %>--'].value = window['<portlet:namespace />emailPasswordSentBody'].getHTML();
+		}
+		catch (e) {
+		}
+
+		try {
+			document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.ADMIN_EMAIL_PASSWORD_RESET_BODY %>--'].value = window['<portlet:namespace />emailPasswordResetBody'].getHTML();
+		}
+		catch (e) {
+		}
+
+		try {
+			document.<portlet:namespace />fm['<portlet:namespace />settings--<%= PropsKeys.ADMIN_EMAIL_VERIFICATION_BODY %>--'].value = window['<portlet:namespace />emailVerificationBody'].getHTML();
+		}
+		catch (e) {
+		}
+	}
+</aui:script>
+
+<%!
+public static final String EDITOR_WYSIWYG_IMPL_KEY = "editor.wysiwyg.portal-web.docroot.html.portlet.portal_settings.email_notifications.jsp";
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/error.jsp
new file mode 100644
index 0000000..fc95c33
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/error.jsp
@@ -0,0 +1,24 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/general.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/general.jsp
new file mode 100644
index 0000000..8cb3846
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/general.jsp
@@ -0,0 +1,97 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<%
+VirtualHost virtualHost = null;
+
+try {
+	virtualHost = VirtualHostLocalServiceUtil.getVirtualHost(company.getCompanyId(), 0);
+}
+catch (Exception e) {
+}
+
+String cdnHostHttp = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.CDN_HOST_HTTP, PropsValues.CDN_HOST_HTTP);
+String cdnHostHttps = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.CDN_HOST_HTTPS, PropsValues.CDN_HOST_HTTPS);
+boolean cdnDynamicResourcesEnabled = PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.CDN_DYNAMIC_RESOURCES_ENABLED, PropsValues.CDN_DYNAMIC_RESOURCES_ENABLED);
+
+String defaultLandingPagePath = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.DEFAULT_LANDING_PAGE_PATH, PropsValues.DEFAULT_LANDING_PAGE_PATH);
+String defaultLogoutPagePath = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.DEFAULT_LOGOUT_PAGE_PATH, PropsValues.DEFAULT_LOGOUT_PAGE_PATH);
+%>
+
+<liferay-ui:error-marker key="errorSection" value="general" />
+
+<h3><liferay-ui:message key="main-configuration" /></h3>
+
+<aui:model-context bean="<%= account %>" model="<%= Account.class %>" />
+
+<aui:row>
+	<aui:col width="<%= 50 %>">
+		<liferay-ui:error exception="<%= AccountNameException.class %>" message="please-enter-a-valid-name" />
+
+		<aui:input name="name" />
+
+		<liferay-ui:error exception="<%= CompanyMxException.class %>" message="please-enter-a-valid-mail-domain" />
+
+		<aui:input bean="<%= company %>" disabled="<%= !PropsValues.MAIL_MX_UPDATE %>" label="mail-domain" model="<%= Company.class %>" name="mx" />
+
+		<liferay-ui:error exception="<%= CompanyVirtualHostException.class %>" message="please-enter-a-valid-virtual-host" />
+
+		<aui:input bean="<%= virtualHost %>" fieldParam="virtualHostname" label="virtual-host" model="<%= VirtualHost.class %>" name="hostname" />
+	</aui:col>
+	<aui:col width="<%= 50 %>">
+		<aui:input label="cdn-host-http" name='<%= "settings--" + PropsKeys.CDN_HOST_HTTP + "--" %>' type="text" value="<%= cdnHostHttp %>" />
+
+		<aui:input label="cdn-host-https" name='<%= "settings--" + PropsKeys.CDN_HOST_HTTPS + "--" %>' type="text" value="<%= cdnHostHttps %>" />
+
+		<aui:input label="cdn-dynamic-resources-enabled" name='<%= "settings--" + PropsKeys.CDN_DYNAMIC_RESOURCES_ENABLED + "--" %>' type="checkbox" value="<%= cdnDynamicResourcesEnabled %>" />
+	</aui:col>
+</aui:row>
+
+<h3><liferay-ui:message key="navigation" /></h3>
+
+<aui:row>
+	<aui:col width="<%= 50 %>">
+		<aui:input bean="<%= company %>" helpMessage="home-url-help" label="home-url" model="<%= Company.class %>" name="homeURL" />
+	</aui:col>
+	<aui:col width="<%= 50 %>">
+		<aui:input helpMessage="default-landing-page-help" label="default-landing-page" name='<%= "settings--" + PropsKeys.DEFAULT_LANDING_PAGE_PATH + "--" %>' type="text" value="<%= defaultLandingPagePath %>" />
+
+		<aui:input helpMessage="default-logout-page-help" label="default-logout-page" name='<%= "settings--" + PropsKeys.DEFAULT_LOGOUT_PAGE_PATH + "--" %>' type="text" value="<%= defaultLogoutPagePath %>" />
+	</aui:col>
+</aui:row>
+
+<h3><liferay-ui:message key="additional-information" /></h3>
+
+<aui:row>
+	<aui:col width="<%= 50 %>">
+		<aui:input name="legalName" />
+
+		<aui:input name="legalId" />
+
+		<aui:input name="legalType" />
+	</aui:col>
+	<aui:col width="<%= 50 %>">
+		<aui:input name="sicCode" />
+
+		<aui:input name="tickerSymbol" />
+
+		<aui:input name="industry" />
+
+		<aui:input name="type" />
+	</aui:col>
+</aui:row>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/google_apps.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/google_apps.jsp
new file mode 100644
index 0000000..42f209c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/google_apps.jsp
@@ -0,0 +1,35 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<%
+String googleAppsUsername = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.GOOGLE_APPS_USERNAME);
+
+String googleAppsPassword = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.GOOGLE_APPS_PASSWORD);
+
+if (Validator.isNotNull(googleAppsPassword)) {
+	googleAppsPassword = Portal.TEMP_OBFUSCATION_VALUE;
+}
+%>
+
+<h3><liferay-ui:message key="google-apps" /></h3>
+
+<aui:fieldset>
+	<aui:input autocomplete="off" cssClass="lfr-input-text-container" label="user-name" name='<%= "settings--" + PropsKeys.GOOGLE_APPS_USERNAME + "--" %>' type="text" value="<%= googleAppsUsername %>" />
+
+	<aui:input autocomplete="off" cssClass="lfr-input-text-container" label="password" name='<%= "settings--" + PropsKeys.GOOGLE_APPS_PASSWORD + "--" %>' type="password" value="<%= googleAppsPassword %>" />
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/init.jsp
new file mode 100644
index 0000000..7c0275b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/init.jsp
@@ -0,0 +1,42 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.AccountNameException" %><%@
+page import="com.liferay.portal.CompanyMxException" %><%@
+page import="com.liferay.portal.CompanyVirtualHostException" %><%@
+page import="com.liferay.portal.kernel.facebook.FacebookConnectUtil" %><%@
+page import="com.liferay.portal.kernel.ldap.DuplicateLDAPServerNameException" %><%@
+page import="com.liferay.portal.kernel.ldap.LDAPFilterException" %><%@
+page import="com.liferay.portal.kernel.ldap.LDAPServerNameException" %><%@
+page import="com.liferay.portal.security.auth.AuthSettingsUtil" %><%@
+page import="com.liferay.portal.security.ldap.LDAPSettingsUtil" %><%@
+page import="com.liferay.portal.security.ldap.PortalLDAPUtil" %><%@
+page import="com.liferay.portal.servlet.filters.sso.opensso.OpenSSOUtil" %><%@
+page import="com.liferay.portlet.documentlibrary.NoSuchFileException" %><%@
+page import="com.liferay.util.ldap.LDAPUtil" %>
+
+<%@ page import="java.net.HttpURLConnection" %><%@
+page import="java.net.MalformedURLException" %><%@
+page import="java.net.URL" %>
+
+<%@ page import="javax.naming.directory.Attribute" %><%@
+page import="javax.naming.directory.Attributes" %><%@
+page import="javax.naming.directory.SearchResult" %><%@
+page import="javax.naming.ldap.LdapContext" %>
+
+<%@ include file="/html/portlet/portal_settings/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/mail_host_names.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/mail_host_names.jsp
new file mode 100644
index 0000000..a883c40
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/mail_host_names.jsp
@@ -0,0 +1,27 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<%
+String adminMailHostNames = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.ADMIN_MAIL_HOST_NAMES);
+%>
+
+<h3><liferay-ui:message key="mail-host-names" /></h3>
+
+<aui:fieldset>
+	<aui:input label='<%= LanguageUtil.format(pageContext, "enter-one-mail-host-name-per-line-for-all-additional-mail-host-names-besides-x", company.getMx(), false) %>' name='<%= "settings--" + PropsKeys.ADMIN_MAIL_HOST_NAMES + "--" %>' type="textarea" value="<%= adminMailHostNames %>" />
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/phone_numbers.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/phone_numbers.jsp
new file mode 100644
index 0000000..43c6c75
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/phone_numbers.jsp
@@ -0,0 +1,17 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/common/phone_numbers.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/recycle_bin.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/recycle_bin.jsp
new file mode 100644
index 0000000..28ff350
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/recycle_bin.jsp
@@ -0,0 +1,50 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<%
+boolean trashEnabled = PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.TRASH_ENABLED);
+%>
+
+<h3><liferay-ui:message key="recycle-bin" /></h3>
+
+<aui:fieldset>
+	<aui:input helpMessage="enable-recycle-bin-default" id="trashEnabled" label="enable-recycle-bin" name='<%= "settings--" + PropsKeys.TRASH_ENABLED + "--" %>' type="checkbox" value="<%= trashEnabled %>" />
+</aui:fieldset>
+
+<aui:script use="aui-base">
+	var trashEnabledCheckbox = A.one('#<portlet:namespace />trashEnabledCheckbox');
+
+	var trashEnabledDefault = trashEnabledCheckbox.attr('checked');
+
+	trashEnabledCheckbox.on(
+		'change',
+		function(event) {
+			var currentTarget = event.currentTarget;
+
+			var trashEnabled = currentTarget.attr('checked');
+
+			if (!trashEnabled && trashEnabledDefault) {
+				if (!confirm('<%= HtmlUtil.escapeJS(LanguageUtil.get(pageContext, "disabling-the-recycle-bin-will-prevent-the-restoring-of-content-that-has-been-moved-to-the-recycle-bin")) %>')) {
+					currentTarget.attr('checked', true);
+
+					trashEnabled = true;
+				}
+			}
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/test_cas_configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/test_cas_configuration.jsp
new file mode 100644
index 0000000..c8d478a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/test_cas_configuration.jsp
@@ -0,0 +1,134 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<%
+String casLoginURL = ParamUtil.getString(request, "casLoginURL");
+String casLogoutURL = ParamUtil.getString(request, "casLogoutURL");
+String casServerURL = ParamUtil.getString(request, "casServerURL");
+String casServiceURL = ParamUtil.getString(request, "casServiceURL");
+%>
+
+<table class="lfr-table lfr-table-grid">
+<tr>
+	<td class="lfr-label">
+		<liferay-ui:message key="login-url" />:
+	</td>
+	<td>
+
+		<%
+		String casLoginURLResult = _testURL(casLoginURL);
+		String casLoginURLCssClass = _getCssClass(casLoginURLResult);
+		%>
+
+		<span class="<%= casLoginURLCssClass %>"><liferay-ui:message key="<%= casLoginURLResult %>" /></span> <span class="field-hint"><%= HtmlUtil.escape(casLoginURL) %></span>
+	</td>
+</tr>
+<tr>
+	<td class="lfr-label">
+		<liferay-ui:message key="logout-url" />:
+	</td>
+	<td>
+
+		<%
+		String casLogoutURLResult = _testURL(casLogoutURL);
+		String casLogoutURLCssClass = _getCssClass(casLogoutURLResult);
+		%>
+
+		<span class="<%= casLogoutURLCssClass %>"><liferay-ui:message key="<%= casLogoutURLResult %>" /></span> <span class="field-hint"><%= HtmlUtil.escape(casLogoutURL) %></span>
+	</td>
+</tr>
+
+<c:if test="<%= Validator.isNotNull(casServerURL) %>">
+	<tr>
+		<td class="lfr-label">
+			<liferay-ui:message key="server-url" />:
+		</td>
+		<td>
+
+			<%
+			String casServerURLResult = _testURL(casServerURL);
+			String casServerURLCssClass = _getCssClass(casServerURLResult);
+			%>
+
+			<span class="<%= casServerURLCssClass %>"><liferay-ui:message key="<%= casServerURLResult %>" /></span> <span class="field-hint"><%= HtmlUtil.escape(casServerURL) %></span>
+		</td>
+	</tr>
+</c:if>
+
+<c:if test="<%= Validator.isNotNull(casServiceURL) %>">
+	<tr>
+		<td class="lfr-label">
+			<liferay-ui:message key="service-url" />:
+		</td>
+		<td>
+
+			<%
+			String casServiceURLResult = _testURL(casServiceURL);
+			String casServiceURLCssClass = _getCssClass(casServiceURLResult);
+			%>
+
+			<span class="<%= casServiceURLCssClass %>"><liferay-ui:message key="<%= casServiceURLResult %>" /></span> <span class="field-hint"><%= HtmlUtil.escape(casServiceURL) %></span>
+		</td>
+	</tr>
+</c:if>
+
+</table>
+
+<%!
+private String _getCssClass(String result) {
+	String cssClass = "alert alert-";
+
+	if (result.equals("pass")) {
+		cssClass += "success";
+	}
+	else {
+		cssClass += "error";
+	}
+
+	cssClass += "-label";
+
+	return cssClass;
+}
+
+private String _testURL(String url) {
+	try {
+		URL urlObj = new URL(url);
+
+		HttpURLConnection httpURLConnection = (HttpURLConnection)urlObj.openConnection();
+
+		httpURLConnection.setConnectTimeout(3000);
+
+		httpURLConnection.getResponseCode();
+	}
+	catch (MalformedURLException murle) {
+		return "fail";
+	}
+	catch (Exception e) {
+		String message = GetterUtil.getString(e.getMessage());
+
+		if (message.contains("PKIX")) {
+			return "ssl-error";
+		}
+		else {
+			return "unreachable";
+		}
+	}
+
+	return "pass";
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/test_ldap_connection.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/test_ldap_connection.jsp
new file mode 100644
index 0000000..de8f351
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/test_ldap_connection.jsp
@@ -0,0 +1,49 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<%
+long ldapServerId = ParamUtil.getLong(request, "ldapServerId", 0);
+
+String postfix = LDAPSettingsUtil.getPropertyPostfix(ldapServerId);
+
+String baseProviderURL = ParamUtil.getString(request, "baseProviderURL");
+String principal = ParamUtil.getString(request, "principal");
+
+String credentials = request.getParameter("credentials");
+
+if (credentials.equals(Portal.TEMP_OBFUSCATION_VALUE)) {
+	credentials = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_SECURITY_CREDENTIALS + postfix);
+}
+
+LdapContext ldapContext = PortalLDAPUtil.getContext(themeDisplay.getCompanyId(), baseProviderURL, principal, credentials);
+%>
+
+<c:choose>
+	<c:when test="<%= ldapContext != null %>">
+		<liferay-ui:message key="liferay-has-successfully-connected-to-the-ldap-server" />
+	</c:when>
+	<c:otherwise>
+		<liferay-ui:message key="liferay-has-failed-to-connect-to-the-ldap-server" />
+	</c:otherwise>
+</c:choose>
+
+<%
+if (ldapContext != null) {
+	ldapContext.close();
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/test_ldap_groups.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/test_ldap_groups.jsp
new file mode 100644
index 0000000..55ae099
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/test_ldap_groups.jsp
@@ -0,0 +1,184 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<%
+long ldapServerId = ParamUtil.getLong(request, "ldapServerId", 0);
+
+String postfix = LDAPSettingsUtil.getPropertyPostfix(ldapServerId);
+
+String baseProviderURL = ParamUtil.getString(request, "baseProviderURL");
+String baseDN = ParamUtil.getString(request, "baseDN");
+String principal = ParamUtil.getString(request, "principal");
+
+String credentials = request.getParameter("credentials");
+
+if (credentials.equals(Portal.TEMP_OBFUSCATION_VALUE)) {
+	credentials = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_SECURITY_CREDENTIALS + postfix);
+}
+
+LdapContext ldapContext = PortalLDAPUtil.getContext(themeDisplay.getCompanyId(), baseProviderURL, principal, credentials);
+
+if (ldapContext == null) {
+%>
+
+	<liferay-ui:message key="liferay-has-failed-to-connect-to-the-ldap-server" />
+
+<%
+	return;
+}
+
+if (Validator.isNull(ParamUtil.getString(request, "groupMappingGroupName")) ||
+	Validator.isNull(ParamUtil.getString(request, "groupMappingUser"))) {
+%>
+
+	<liferay-ui:message key="please-map-each-of-the-group-properties-group-name-and-user-to-an-ldap-attribute" />
+
+<%
+	return;
+}
+
+String groupFilter = ParamUtil.getString(request, "importGroupSearchFilter");
+
+String groupMappingsParam =
+	"groupName=" + ParamUtil.getString(request, "groupMappingGroupName") +
+	"\ndescription=" + ParamUtil.getString(request, "groupMappingDescription") +
+	"\nuser=" + ParamUtil.getString(request, "groupMappingUser");
+
+Properties groupMappings = PropertiesUtil.load(groupMappingsParam);
+
+String[] attributeIds = StringUtil.split(StringUtil.merge(groupMappings.values()));
+
+List<SearchResult> searchResults = new ArrayList<SearchResult>();
+
+PortalLDAPUtil.getGroups(themeDisplay.getCompanyId(), ldapContext, new byte[0], 20, baseDN, groupFilter, attributeIds, searchResults);
+%>
+
+<liferay-ui:message key="test-ldap-groups" />
+
+<br /><br />
+
+<liferay-ui:message key="a-subset-of-groups-has-been-displayed-for-you-to-review" />
+
+<br /><br />
+
+<table class="lfr-table" width="100%">
+
+<%
+boolean showMissingAttributeMessage = false;
+
+int counter = 0;
+
+for (SearchResult searchResult : searchResults) {
+	Attributes attributes = searchResult.getAttributes();
+
+	String name = StringUtil.toLowerCase(LDAPUtil.getAttributeString(attributes, groupMappings.getProperty("groupName")));
+	String description = LDAPUtil.getAttributeString(attributes, groupMappings.getProperty("description"));
+	Attribute attribute = attributes.get(groupMappings.getProperty("user"));
+
+	if (Validator.isNull(name)) {
+		showMissingAttributeMessage = true;
+	}
+
+	if (attribute != null) {
+		StringBundler sb = new StringBundler(7);
+
+		sb.append("(&");
+		sb.append(groupFilter);
+		sb.append(StringPool.OPEN_PARENTHESIS);
+		sb.append(groupMappings.getProperty("groupName"));
+		sb.append("=");
+		sb.append(name);
+		sb.append("))");
+
+		String filter = sb.toString();
+
+		attribute = PortalLDAPUtil.getMultivaluedAttribute(themeDisplay.getCompanyId(), ldapContext, baseDN, filter, attribute);
+	}
+
+	if (counter == 0) {
+%>
+
+		<tr>
+			<th>
+				#
+			</th>
+			<th>
+				<liferay-ui:message key="name" />
+			</th>
+			<th>
+				<liferay-ui:message key="description" />
+			</th>
+			<th>
+				<liferay-ui:message key="members" />
+			</th>
+		</tr>
+
+<%
+	}
+
+	counter++;
+%>
+
+	<tr>
+		<td>
+			<%= counter %>
+		</td>
+		<td>
+			<%= name %>
+		</td>
+		<td>
+			<%= description %>
+		</td>
+		<td>
+			<%= (attribute == null) ? "0" : String.valueOf(attribute.size()) %>
+		</td>
+	</tr>
+
+<%
+}
+
+if (counter == 0) {
+%>
+
+	<tr>
+		<td colspan="4">
+			<liferay-ui:message key="no-groups-were-found" />
+		</td>
+	</tr>
+
+<%
+}
+%>
+
+</table>
+
+<%
+if (showMissingAttributeMessage) {
+%>
+
+	<div class="alert alert-info">
+		<liferay-ui:message key="the-above-results-include-groups-which-are-missing-the-required-attributes-(group-name-and-user).-these-groups-will-not-be-imported-until-these-attributes-are-filled-in" />
+	</div>
+
+<%
+}
+
+if (ldapContext != null) {
+	ldapContext.close();
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/test_ldap_users.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/test_ldap_users.jsp
new file mode 100644
index 0000000..f1056a5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/test_ldap_users.jsp
@@ -0,0 +1,217 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<%
+long ldapServerId = ParamUtil.getLong(request, "ldapServerId", 0);
+
+String postfix = LDAPSettingsUtil.getPropertyPostfix(ldapServerId);
+
+String baseProviderURL = ParamUtil.getString(request, "baseProviderURL");
+String baseDN = ParamUtil.getString(request, "baseDN");
+String principal = ParamUtil.getString(request, "principal");
+
+String credentials = request.getParameter("credentials");
+
+if (credentials.equals(Portal.TEMP_OBFUSCATION_VALUE)) {
+	credentials = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.LDAP_SECURITY_CREDENTIALS + postfix);
+}
+
+LdapContext ldapContext = PortalLDAPUtil.getContext(themeDisplay.getCompanyId(), baseProviderURL, principal, credentials);
+
+if (ldapContext == null) {
+%>
+
+	<liferay-ui:message key="liferay-has-failed-to-connect-to-the-ldap-server" />
+
+<%
+	return;
+}
+
+if (Validator.isNull(ParamUtil.getString(request, "userMappingScreenName")) ||
+	Validator.isNull(ParamUtil.getString(request, "userMappingPassword")) ||
+	Validator.isNull(ParamUtil.getString(request, "userMappingEmailAddress")) ||
+	Validator.isNull(ParamUtil.getString(request, "userMappingFirstName")) ||
+	Validator.isNull(ParamUtil.getString(request, "userMappingLastName"))) {
+%>
+
+	<liferay-ui:message key="please-map-each-of-the-user-properties-screen-name,-password,-email-address,-first-name,-and-last-name-to-an-ldap-attribute" />
+
+<%
+	return;
+}
+
+String userFilter = ParamUtil.getString(request, "importUserSearchFilter");
+
+if (!LDAPUtil.isValidFilter(userFilter)) {
+%>
+
+	<liferay-ui:message key="please-enter-a-valid-ldap-search-filter" />
+
+<%
+	return;
+}
+
+String userMappingsParams =
+	"screenName=" + ParamUtil.getString(request, "userMappingScreenName") +
+	"\npassword=" + ParamUtil.getString(request, "userMappingPassword") +
+	"\nemailAddress=" + ParamUtil.getString(request, "userMappingEmailAddress") +
+	"\nfullName=" + ParamUtil.getString(request, "userMappingFullName") +
+	"\nfirstName=" + ParamUtil.getString(request, "userMappingFirstName") +
+	"\nlastName=" + ParamUtil.getString(request, "userMappingLastName") +
+	"\njobTitle=" + ParamUtil.getString(request, "userMappingJobTitle") +
+	"\ngroup=" + ParamUtil.getString(request, "userMappingGroup");
+
+Properties userMappings = PropertiesUtil.load(userMappingsParams);
+
+String[] attributeIds = StringUtil.split(StringUtil.merge(userMappings.values()));
+
+List<SearchResult> searchResults = new ArrayList<SearchResult>();
+
+if (Validator.isNotNull(userFilter) && !userFilter.equals(StringPool.STAR)) {
+	PortalLDAPUtil.getUsers(themeDisplay.getCompanyId(), ldapContext, new byte[0], 20, baseDN, userFilter, attributeIds, searchResults);
+}
+%>
+
+<liferay-ui:message key="test-ldap-users" />
+
+<br /><br />
+
+<liferay-ui:message key="a-subset-of-users-has-been-displayed-for-you-to-review" />
+
+<br /><br />
+
+<table class="lfr-table" width="100%">
+
+<%
+boolean showMissingAttributeMessage = false;
+
+int counter = 0;
+
+for (SearchResult searchResult : searchResults) {
+	Attributes attributes = searchResult.getAttributes();
+
+	String screenName = StringUtil.toLowerCase(LDAPUtil.getAttributeString(attributes, userMappings.getProperty("screenName")));
+	String password = StringUtil.toLowerCase(LDAPUtil.getAttributeString(attributes, userMappings.getProperty("password")));
+	String emailAddress = LDAPUtil.getAttributeString(attributes, userMappings.getProperty("emailAddress"));
+	String firstName = LDAPUtil.getAttributeString(attributes, userMappings.getProperty("firstName"));
+	String lastName = LDAPUtil.getAttributeString(attributes, userMappings.getProperty("lastName"));
+	String jobTitle = LDAPUtil.getAttributeString(attributes, userMappings.getProperty("jobTitle"));
+	Attribute attribute = attributes.get(userMappings.getProperty("group"));
+
+	if (Validator.isNull(screenName) || Validator.isNull(password) || Validator.isNull(emailAddress) || Validator.isNull(firstName) || Validator.isNull(lastName)) {
+		showMissingAttributeMessage = true;
+	}
+
+	if (counter == 0) {
+%>
+
+		<tr>
+			<th>
+				#
+			</th>
+			<th>
+				<liferay-ui:message key="screen-name" />
+			</th>
+			<th>
+				<liferay-ui:message key="email-address" />
+			</th>
+			<th>
+				<liferay-ui:message key="first-name" />
+			</th>
+			<th>
+				<liferay-ui:message key="last-name" />
+			</th>
+			<th>
+				<liferay-ui:message key="password" />
+			</th>
+			<th>
+				<liferay-ui:message key="job-title" />
+			</th>
+			<th>
+				<liferay-ui:message key="group" />
+			</th>
+		</tr>
+
+<%
+	}
+
+	counter++;
+%>
+
+	<tr>
+		<td>
+			<%= counter %>
+		</td>
+		<td>
+			<%= screenName %>
+		</td>
+		<td>
+			<%= emailAddress %>
+		</td>
+		<td>
+			<%= firstName %>
+		</td>
+		<td>
+			<%= lastName %>
+		</td>
+		<td>
+			<c:if test="<%= Validator.isNotNull(password) %>">
+				********
+			</c:if>
+		</td>
+		<td>
+			<%= jobTitle %>
+		</td>
+		<td>
+			<%= (attribute == null) ? "0" : String.valueOf(attribute.size()) %>
+		</td>
+	</tr>
+
+<%
+}
+
+if (counter == 0) {
+%>
+
+	<tr>
+		<td colspan="7">
+			<liferay-ui:message key="no-users-were-found" />
+		</td>
+	</tr>
+
+<%
+}
+%>
+
+</table>
+
+<%
+if (showMissingAttributeMessage) {
+%>
+
+	<div class="alert alert-info">
+		<liferay-ui:message key="the-above-results-include-users-which-are-missing-the-required-attributes-(screen-name,-password,-email-address,-first-name,-and-last-name).-these-users-will-not-be-imported-until-these-attributes-are-filled-in" />
+	</div>
+
+<%
+}
+
+if (ldapContext != null) {
+	ldapContext.close();
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/test_opensso_configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/test_opensso_configuration.jsp
new file mode 100644
index 0000000..795179e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/test_opensso_configuration.jsp
@@ -0,0 +1,48 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<%
+String openSsoLoginURL = ParamUtil.getString(request, "openSsoLoginURL");
+String openSsoLogoutURL = ParamUtil.getString(request, "openSsoLogoutURL");
+String openSsoServiceURL = ParamUtil.getString(request, "openSsoServiceURL");
+String openSsoScreenNameAttr = ParamUtil.getString(request, "openSsoScreenNameAttr");
+String openSsoEmailAddressAttr = ParamUtil.getString(request, "openSsoEmailAddressAttr");
+String openSsoFirstNameAttr = ParamUtil.getString(request, "openSsoFirstNameAttr");
+String openSsoLastNameAttr = ParamUtil.getString(request, "openSsoLastNameAttr");
+
+List<String> urls = new ArrayList<String>();
+
+urls.add(openSsoLoginURL);
+urls.add(openSsoLogoutURL);
+urls.add(openSsoServiceURL);
+%>
+
+<c:choose>
+	<c:when test="<%= !OpenSSOUtil.isValidUrls(urls.toArray(new String[urls.size()])) %>">
+		<liferay-ui:message key="liferay-has-failed-to-connect-to-the-opensso-server" />
+	</c:when>
+	<c:when test="<%= !OpenSSOUtil.isValidServiceUrl(openSsoServiceURL) %>">
+		<liferay-ui:message key="liferay-has-failed-to-connect-to-the-opensso-services" />
+	</c:when>
+	<c:when test="<%= Validator.isNull(openSsoScreenNameAttr) || Validator.isNull(openSsoEmailAddressAttr) || Validator.isNull(openSsoFirstNameAttr) || Validator.isNull(openSsoLastNameAttr) %>">
+		<liferay-ui:message key="please-map-each-of-the-user-properties-screen-name,-email-address,-first-name,-and-last-name-to-an-opensso-attribute" />
+	</c:when>
+	<c:otherwise>
+		<liferay-ui:message key="liferay-has-successfully-connected-to-the-opensso-server" />
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/users.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/users.jsp
new file mode 100644
index 0000000..2527d09
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/users.jsp
@@ -0,0 +1,75 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<%
+boolean termsOfUseRequired = PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.TERMS_OF_USE_REQUIRED, PropsValues.TERMS_OF_USE_REQUIRED);
+boolean usersScreenNameAlwaysAutogenerate = PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.USERS_SCREEN_NAME_ALWAYS_AUTOGENERATE, PropsValues.USERS_SCREEN_NAME_ALWAYS_AUTOGENERATE);
+boolean usersLastNameRequired = PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.USERS_LAST_NAME_REQUIRED, PropsValues.USERS_LAST_NAME_REQUIRED);
+boolean fieldEnableMale = PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.FIELD_ENABLE_COM_LIFERAY_PORTAL_MODEL_CONTACT_MALE, PropsValues.FIELD_ENABLE_COM_LIFERAY_PORTAL_MODEL_CONTACT_MALE);
+boolean fieldEnableBirthday = PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.FIELD_ENABLE_COM_LIFERAY_PORTAL_MODEL_CONTACT_BIRTHDAY, PropsValues.FIELD_ENABLE_COM_LIFERAY_PORTAL_MODEL_CONTACT_BIRTHDAY);
+
+String adminReservedScreenNames = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.ADMIN_RESERVED_SCREEN_NAMES);
+String adminReservedEmailAddresses = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.ADMIN_RESERVED_EMAIL_ADDRESSES);
+
+String adminDefaultGroupNames = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.ADMIN_DEFAULT_GROUP_NAMES);
+String adminDefaultOrganizationGroupNames = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.ADMIN_DEFAULT_ORGANIZATION_GROUP_NAMES);
+String adminDefaultRoleNames = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.ADMIN_DEFAULT_ROLE_NAMES);
+String adminDefaultUserGroupNames = PrefsPropsUtil.getString(company.getCompanyId(), PropsKeys.ADMIN_DEFAULT_USER_GROUP_NAMES);
+boolean adminSyncDefaultAssociations = PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.ADMIN_SYNC_DEFAULT_ASSOCIATIONS, PropsValues.ADMIN_SYNC_DEFAULT_ASSOCIATIONS);
+%>
+
+<h3><liferay-ui:message key="users" /></h3>
+
+<liferay-ui:tabs
+	names="fields,reserved-credentials,default-user-associations"
+	refresh="<%= false %>"
+>
+	<liferay-ui:section>
+		<aui:fieldset>
+			<aui:input label="terms-of-use-required" name='<%= "settings--" + PropsKeys.TERMS_OF_USE_REQUIRED + "--" %>' type="checkbox" value="<%= termsOfUseRequired %>" />
+
+			<aui:input label="autogenerate-user-screen-names" name='<%= "settings--" + PropsKeys.USERS_SCREEN_NAME_ALWAYS_AUTOGENERATE + "--" %>' type="checkbox" value="<%= usersScreenNameAlwaysAutogenerate %>" />
+
+			<aui:input label="last-name-required" name='<%= "settings--" + PropsKeys.USERS_LAST_NAME_REQUIRED + "--" %>' type="checkbox" value="<%= usersLastNameRequired %>" />
+
+			<aui:input label="enable-birthday" name='<%= "settings--" + PropsKeys.FIELD_ENABLE_COM_LIFERAY_PORTAL_MODEL_CONTACT_BIRTHDAY + "--" %>' type="checkbox" value="<%= fieldEnableBirthday %>" />
+
+			<aui:input label="enable-gender" name='<%= "settings--" + PropsKeys.FIELD_ENABLE_COM_LIFERAY_PORTAL_MODEL_CONTACT_MALE + "--" %>' type="checkbox" value="<%= fieldEnableMale %>" />
+		</aui:fieldset>
+	</liferay-ui:section>
+	<liferay-ui:section>
+		<aui:fieldset>
+			<aui:input helpMessage="enter-one-screen-name-per-line-to-reserve-the-screen-name" label="screen-names" name='<%= "settings--" + PropsKeys.ADMIN_RESERVED_SCREEN_NAMES + "--" %>' type="textarea" value="<%= adminReservedScreenNames %>" />
+
+			<aui:input helpMessage="enter-one-user-email-address-per-line-to-reserve-the-user-email-address" label="email-addresses" name='<%= "settings--" + PropsKeys.ADMIN_RESERVED_EMAIL_ADDRESSES + "--" %>' type="textarea" value="<%= adminReservedEmailAddresses %>" />
+		</aui:fieldset>
+	</liferay-ui:section>
+	<liferay-ui:section>
+		<aui:fieldset>
+			<aui:input helpMessage="check-to-apply-the-changes-to-existing-users" label="apply-to-existing-users" name='<%= "settings--" + PropsKeys.ADMIN_SYNC_DEFAULT_ASSOCIATIONS + "--" %>' type="checkbox" value="<%= adminSyncDefaultAssociations %>" />
+
+			<aui:input helpMessage="enter-the-default-site-names-per-line-that-are-associated-with-newly-created-users" label="sites" name='<%= "settings--" + PropsKeys.ADMIN_DEFAULT_GROUP_NAMES + "--" %>' type="textarea" value="<%= adminDefaultGroupNames %>" />
+
+			<aui:input helpMessage="enter-the-default-organization-site-names-per-line-that-are-associated-with-newly-created-users" label="organization-sites" name='<%= "settings--" + PropsKeys.ADMIN_DEFAULT_ORGANIZATION_GROUP_NAMES + "--" %>' type="textarea" value="<%= adminDefaultOrganizationGroupNames %>" />
+
+			<aui:input helpMessage="enter-the-default-role-names-per-line-that-are-associated-with-newly-created-users" label="roles" name='<%= "settings--" + PropsKeys.ADMIN_DEFAULT_ROLE_NAMES + "--" %>' type="textarea" value="<%= adminDefaultRoleNames %>" />
+
+			<aui:input helpMessage="enter-the-default-user-group-names-per-line-that-are-associated-with-newly-created-users" label="user-groups" name='<%= "settings--" + PropsKeys.ADMIN_DEFAULT_USER_GROUP_NAMES + "--" %>' type="textarea" value="<%= adminDefaultUserGroupNames %>" />
+		</aui:fieldset>
+	</liferay-ui:section>
+</liferay-ui:tabs>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/websites.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/websites.jsp
new file mode 100644
index 0000000..f2960ed
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portal_settings/websites.jsp
@@ -0,0 +1,17 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/common/websites.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/archived_setup_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/archived_setup_action.jsp
new file mode 100644
index 0000000..5adc9cc
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/archived_setup_action.jsp
@@ -0,0 +1,54 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portlet_configuration/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+Object[] objects = (Object[])row.getObject();
+
+PortletItem portletItem = (PortletItem)objects[0];
+portletResource = (String)objects[1];
+%>
+
+<liferay-ui:icon-menu>
+	<portlet:actionURL var="restoreURL">
+		<portlet:param name="struts_action" value="/portlet_configuration/edit_archived_setups" />
+		<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.RESTORE %>" />
+		<portlet:param name="redirect" value="<%= currentURL %>" />
+		<portlet:param name="portletResource" value="<%= portletResource %>" />
+		<portlet:param name="name" value="<%= portletItem.getName() %>" />
+	</portlet:actionURL>
+
+	<liferay-ui:icon
+		image="undo"
+		message="restore"
+		url="<%= restoreURL %>"
+	/>
+
+	<portlet:actionURL var="deleteURL">
+		<portlet:param name="struts_action" value="/portlet_configuration/edit_archived_setups" />
+		<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+		<portlet:param name="redirect" value="<%= currentURL %>" />
+		<portlet:param name="portletResource" value="<%= portletResource %>" />
+		<portlet:param name="portletItemId" value="<%= String.valueOf(portletItem.getPortletItemId()) %>" />
+	</portlet:actionURL>
+
+	<liferay-ui:icon-delete
+		url="<%= deleteURL %>"
+	/>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/css/.sass-cache/main.css
new file mode 100644
index 0000000..02804dc
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/css/.sass-cache/main.css
@@ -0,0 +1,44 @@
+.portlet-configuration .archived-setups {
+  margin-bottom: 1em;
+  margin-right: 0.5em;
+  text-align: right; }
+.portlet-configuration .edit-permissions form:after {
+  clear: both;
+  content: ".";
+  display: block;
+  height: 0;
+  visibility: hidden; }
+.portlet-configuration .edit-permissions .assign-permissions {
+  float: left; }
+  .portlet-configuration .edit-permissions .assign-permissions .button-holder {
+    position: relative; }
+    .portlet-configuration .edit-permissions .assign-permissions .button-holder .finished {
+      position: absolute;
+      right: 0; }
+.portlet-configuration .relative-range {
+  width: 165px; }
+.portlet-configuration .process-list .background-task-status-column {
+  width: 700px; }
+  .portlet-configuration .process-list .background-task-status-column .background-task-status-message {
+    margin-top: 1em; }
+    .portlet-configuration .process-list .background-task-status-column .background-task-status-message .error-list-items li {
+      list-style: disc inside; }
+  .portlet-configuration .process-list .background-task-status-column .details-link {
+    margin-left: 1em; }
+  .portlet-configuration .process-list .background-task-status-column .publish-error {
+    margin-bottom: 0; }
+  .portlet-configuration .process-list .background-task-status-column .toggler-header-collapsed:after {
+    content: " ?"; }
+  .portlet-configuration .process-list .background-task-status-column .toggler-header-expanded:after {
+    content: " ?"; }
+  .portlet-configuration .process-list .background-task-status-column .background-task-status-in-progress {
+    float: left;
+    margin-right: 1em; }
+  .portlet-configuration .process-list .background-task-status-column .progress {
+    margin-bottom: 0.3em; }
+  .portlet-configuration .process-list .background-task-status-column .progress-current-item {
+    font-size: 0.7em; }
+
+.ie .portlet-configuration .edit-permissions form {
+  height: 1%; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/css/main.css
new file mode 100644
index 0000000..29280bd
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/css/main.css
@@ -0,0 +1,85 @@
+.portlet-configuration {
+	.archived-setups {
+		margin-bottom: 1em;
+		margin-right: 0.5em;
+		text-align: right;
+	}
+
+	.edit-permissions {
+		form:after {
+			clear: both;
+			content: ".";
+			display: block;
+			height: 0;
+			visibility: hidden;
+		}
+
+		.assign-permissions {
+			float: left;
+
+			.button-holder {
+				position: relative;
+
+				.finished {
+					position: absolute;
+					right: 0;
+				}
+			}
+		}
+	}
+
+	.relative-range {
+		width: 165px;
+	}
+
+	.process-list {
+		.background-task-status-column {
+			width: 700px;
+
+			.background-task-status-message {
+				margin-top: 1em;
+
+				.error-list-items li {
+					list-style: disc inside;
+				}
+			}
+
+			.details-link {
+				margin-left: 1em;
+			}
+
+			.publish-error {
+				margin-bottom: 0;
+			}
+
+			.toggler-header-collapsed:after {
+				content: " »";
+			}
+
+			.toggler-header-expanded:after {
+				content: " «";
+			}
+
+			.background-task-status-in-progress {
+				float: left;
+				margin-right: 1em;
+			}
+
+			.progress {
+				margin-bottom: 0.3em;
+			}
+
+			.progress-current-item {
+				font-size: 0.7em;
+			}
+		}
+	}
+}
+
+.ie {
+	.portlet-configuration {
+		.edit-permissions form {
+			height: 1%;
+		}
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/edit_archived_setups.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/edit_archived_setups.jsp
new file mode 100644
index 0000000..5dc9a06
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/edit_archived_setups.jsp
@@ -0,0 +1,124 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portlet_configuration/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+String returnToFullPageURL = ParamUtil.getString(request, "returnToFullPageURL");
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/portlet_configuration/edit_archived_setups");
+portletURL.setParameter("redirect", redirect);
+portletURL.setParameter("returnToFullPageURL", returnToFullPageURL);
+portletURL.setParameter("portletResource", portletResource);
+%>
+
+<liferay-util:include page="/html/portlet/portlet_configuration/tabs1.jsp">
+	<liferay-util:param name="tabs1" value="setup" />
+</liferay-util:include>
+
+<portlet:renderURL var="backURL">
+	<portlet:param name="struts_action" value="/portlet_configuration/edit_configuration" />
+	<portlet:param name="redirect" value="<%= redirect %>" />
+	<portlet:param name="returnToFullPageURL" value="<%= returnToFullPageURL %>" />
+	<portlet:param name="portletResource" value="<%= portletResource %>" />
+</portlet:renderURL>
+
+<liferay-ui:header
+	backURL="<%= backURL %>"
+	title="archived-setups"
+/>
+
+<liferay-ui:error exception="<%= NoSuchPortletItemException.class %>" message="the-setup-could-not-be-found" />
+<liferay-ui:error exception="<%= PortletItemNameException.class %>" message="please-enter-a-valid-setup-name" />
+
+<portlet:actionURL var="editArchivedSetupsURL">
+	<portlet:param name="struts_action" value="/portlet_configuration/edit_archived_setups" />
+</portlet:actionURL>
+
+<aui:form action="<%= editArchivedSetupsURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.SAVE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+	<aui:input name="returnToFullPageURL" type="hidden" value="<%= returnToFullPageURL %>" />
+	<aui:input name="portletResource" type="hidden" value="<%= portletResource %>" />
+
+	<%
+	List<String> headerNames = new ArrayList<String>();
+
+	headerNames.add("name");
+	headerNames.add("user");
+	headerNames.add("modified-date");
+	headerNames.add(StringPool.BLANK);
+
+	SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, portletURL, headerNames, "there-are-no-archived-setups");
+
+	List archivedSetups = PortletItemLocalServiceUtil.getPortletItems(scopeGroupId, selPortlet.getRootPortletId(), com.liferay.portal.model.PortletPreferences.class.getName());
+
+	int total = archivedSetups.size();
+
+	searchContainer.setTotal(total);
+
+	List results = ListUtil.subList(archivedSetups, searchContainer.getStart(), searchContainer.getEnd());
+
+	searchContainer.setResults(results);
+
+	List resultRows = searchContainer.getResultRows();
+
+	for (int i = 0; i < results.size(); i++) {
+		PortletItem portletItem = (PortletItem)results.get(i);
+
+		portletItem = portletItem.toEscapedModel();
+
+		ResultRow row = new ResultRow(new Object[] {portletItem, portletResource}, portletItem.getName(), i);
+
+		// Name
+
+		row.addText(portletItem.getName());
+
+		// User
+
+		row.addText(PortalUtil.getUserName(portletItem));
+
+		// Date
+
+		row.addDate(portletItem.getModifiedDate());
+
+		// Action
+
+		row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/portlet_configuration/archived_setup_action.jsp");
+
+		// Add result row
+
+		resultRows.add(row);
+	}
+	%>
+
+	<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+
+	<div class="separator"><!-- --></div>
+
+	<aui:input label="archive-name-for-current-setup" name="name" size="20" type="text" />
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<%
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "archived"), currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/edit_configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/edit_configuration.jsp
new file mode 100644
index 0000000..ac0b8c5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/edit_configuration.jsp
@@ -0,0 +1,52 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portlet_configuration/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+String returnToFullPageURL = ParamUtil.getString(request, "returnToFullPageURL");
+
+String path = (String)request.getAttribute(WebKeys.CONFIGURATION_ACTION_PATH);
+%>
+
+<c:if test="<%= !layout.isTypeControlPanel() && !windowState.equals(LiferayWindowState.EXCLUSIVE) %>">
+	<liferay-util:include page="/html/portlet/portlet_configuration/tabs1.jsp">
+		<liferay-util:param name="tabs1" value="setup" />
+	</liferay-util:include>
+</c:if>
+
+<c:if test="<%= GroupPermissionUtil.contains(permissionChecker, layout.getGroupId(), ActionKeys.MANAGE_ARCHIVED_SETUPS) && !windowState.equals(LiferayWindowState.EXCLUSIVE) %>">
+	<portlet:renderURL var="archivedSetupsURL">
+		<portlet:param name="struts_action" value="/portlet_configuration/edit_archived_setups" />
+		<portlet:param name="redirect" value="<%= redirect %>" />
+		<portlet:param name="returnToFullPageURL" value="<%= returnToFullPageURL %>" />
+		<portlet:param name="portletResource" value="<%= portletResource %>" />
+	</portlet:renderURL>
+
+	<div class="archived-setups">
+		<liferay-ui:icon
+			image="export"
+			label="<%= true %>"
+			message="archive-restore-setup"
+			url="<%= archivedSetupsURL %>"
+		/>
+	</div>
+</c:if>
+
+<c:if test="<%= Validator.isNotNull(portletResource) && Validator.isNotNull(path) %>">
+	<liferay-util:include page="<%= path %>" portletId="<%= portletResource %>" />
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/edit_permissions.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/edit_permissions.jsp
new file mode 100644
index 0000000..78f1398
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/edit_permissions.jsp
@@ -0,0 +1,441 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portlet_configuration/init.jsp" %>
+
+<%
+String tabs2 = ParamUtil.getString(request, "tabs2", "regular-roles");
+
+String redirect = ParamUtil.getString(request, "redirect");
+String returnToFullPageURL = ParamUtil.getString(request, "returnToFullPageURL");
+
+String modelResource = ParamUtil.getString(request, "modelResource");
+String modelResourceDescription = ParamUtil.getString(request, "modelResourceDescription");
+String modelResourceName = ResourceActionsUtil.getModelResource(pageContext, modelResource);
+
+long resourceGroupId = ParamUtil.getLong(request, "resourceGroupId");
+
+String resourcePrimKey = ParamUtil.getString(request, "resourcePrimKey");
+
+if (Validator.isNull(resourcePrimKey)) {
+	throw new ResourcePrimKeyException();
+}
+
+String selResource = modelResource;
+String selResourceDescription = modelResourceDescription;
+String selResourceName = modelResourceName;
+
+if (Validator.isNull(modelResource)) {
+	PortletURL portletURL = new PortletURLImpl(request, portletResource, plid, PortletRequest.ACTION_PHASE);
+
+	portletURL.setPortletMode(PortletMode.VIEW);
+	portletURL.setWindowState(WindowState.NORMAL);
+
+	redirect = portletURL.toString();
+
+	Portlet portlet = PortletLocalServiceUtil.getPortletById(company.getCompanyId(), portletResource);
+
+	selResource = portlet.getRootPortletId();
+	selResourceDescription = PortalUtil.getPortletTitle(portlet, application, locale);
+	selResourceName = LanguageUtil.get(pageContext, "portlet");
+}
+else {
+	PortalUtil.addPortletBreadcrumbEntry(request, HtmlUtil.unescape(selResourceDescription), null);
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "permissions"), currentURL);
+}
+
+long groupId = themeDisplay.getScopeGroupId();
+
+if (resourceGroupId > 0) {
+	groupId = resourceGroupId;
+}
+
+Group group = GroupLocalServiceUtil.getGroup(groupId);
+
+Layout selLayout = null;
+
+if (modelResource.equals(Layout.class.getName())) {
+	selLayout = LayoutLocalServiceUtil.getLayout(GetterUtil.getLong(resourcePrimKey));
+
+	group = selLayout.getGroup();
+	groupId = group.getGroupId();
+}
+
+Resource resource = null;
+
+try {
+	if (ResourceBlockLocalServiceUtil.isSupported(selResource)) {
+		ResourceBlockLocalServiceUtil.verifyResourceBlockId(company.getCompanyId(), selResource, Long.valueOf(resourcePrimKey));
+	}
+	else {
+		if (ResourcePermissionLocalServiceUtil.getResourcePermissionsCount(company.getCompanyId(), selResource, ResourceConstants.SCOPE_INDIVIDUAL, resourcePrimKey) == 0) {
+			throw new NoSuchResourceException();
+		}
+	}
+	resource = ResourceLocalServiceUtil.getResource(company.getCompanyId(), selResource, ResourceConstants.SCOPE_INDIVIDUAL, resourcePrimKey);
+}
+catch (NoSuchResourceException nsre) {
+	boolean portletActions = Validator.isNull(modelResource);
+
+	ResourceLocalServiceUtil.addResources(company.getCompanyId(), groupId, 0, selResource, resourcePrimKey, portletActions, true, true);
+
+	resource = ResourceLocalServiceUtil.getResource(company.getCompanyId(), selResource, ResourceConstants.SCOPE_INDIVIDUAL, resourcePrimKey);
+}
+
+String roleTypesParam = ParamUtil.getString(request, "roleTypes");
+
+int[] roleTypes = null;
+
+if (Validator.isNotNull(roleTypesParam)) {
+	roleTypes = StringUtil.split(roleTypesParam, 0);
+}
+
+if (group.isCompany()) {
+	roleTypes = new int[] {RoleConstants.TYPE_REGULAR};
+}
+
+PortletURL actionPortletURL = renderResponse.createActionURL();
+
+actionPortletURL.setParameter("struts_action", "/portlet_configuration/edit_permissions");
+actionPortletURL.setParameter("tabs2", tabs2);
+actionPortletURL.setParameter("redirect", redirect);
+actionPortletURL.setParameter("returnToFullPageURL", returnToFullPageURL);
+actionPortletURL.setParameter("portletResource", portletResource);
+actionPortletURL.setParameter("modelResource", modelResource);
+actionPortletURL.setParameter("modelResourceDescription", modelResourceDescription);
+actionPortletURL.setParameter("resourceGroupId", String.valueOf(resourceGroupId));
+actionPortletURL.setParameter("resourcePrimKey", resourcePrimKey);
+actionPortletURL.setParameter("roleTypes", roleTypesParam);
+
+PortletURL renderPortletURL = renderResponse.createRenderURL();
+
+renderPortletURL.setParameter("struts_action", "/portlet_configuration/edit_permissions");
+renderPortletURL.setParameter("tabs2", tabs2);
+renderPortletURL.setParameter("redirect", redirect);
+renderPortletURL.setParameter("returnToFullPageURL", returnToFullPageURL);
+renderPortletURL.setParameter("portletResource", portletResource);
+renderPortletURL.setParameter("modelResource", modelResource);
+renderPortletURL.setParameter("modelResourceDescription", modelResourceDescription);
+renderPortletURL.setParameter("resourceGroupId", String.valueOf(resourceGroupId));
+renderPortletURL.setParameter("resourcePrimKey", resourcePrimKey);
+renderPortletURL.setParameter("roleTypes", roleTypesParam);
+
+long controlPanelPlid = PortalUtil.getControlPanelPlid(company.getCompanyId());
+
+PortletURLImpl definePermissionsURL = new PortletURLImpl(request, PortletKeys.ROLES_ADMIN, controlPanelPlid, PortletRequest.RENDER_PHASE);
+
+definePermissionsURL.setParameter("struts_action", "/roles_admin/edit_role_permissions");
+definePermissionsURL.setParameter(Constants.CMD, Constants.VIEW);
+definePermissionsURL.setPortletMode(PortletMode.VIEW);
+definePermissionsURL.setRefererPlid(plid);
+%>
+
+<div class="edit-permissions">
+	<aui:form action="<%= actionPortletURL.toString() %>" method="post" name="fm">
+		<aui:input name="<%= Constants.CMD %>" type="hidden" value="role_permissions" />
+		<aui:input name="resourceId" type="hidden" value="<%= resource.getResourceId() %>" />
+
+		<c:choose>
+			<c:when test="<%= Validator.isNull(modelResource) %>">
+				<liferay-util:include page="/html/portlet/portlet_configuration/tabs1.jsp">
+					<liferay-util:param name="tabs1" value="permissions" />
+				</liferay-util:include>
+			</c:when>
+			<c:otherwise>
+				<liferay-ui:header
+						backURL="<%= redirect %>"
+						localizeTitle="<%= false %>"
+						title="<%= HtmlUtil.unescape(selResourceDescription) %>"
+						/>
+			</c:otherwise>
+		</c:choose>
+
+		<%
+		List<String> actions = ResourceActionsUtil.getResourceActions(portletResource, modelResource);
+
+		if (modelResource.equals(Group.class.getName())) {
+			long modelResourceGroupId = GetterUtil.getLong(resourcePrimKey);
+
+			Group modelResourceGroup = GroupLocalServiceUtil.getGroup(modelResourceGroupId);
+
+			if (modelResourceGroup.isLayoutPrototype() || modelResourceGroup.isLayoutSetPrototype() || modelResourceGroup.isUserGroup()) {
+				actions = new ArrayList<String>(actions);
+
+				actions.remove(ActionKeys.ADD_LAYOUT_BRANCH);
+				actions.remove(ActionKeys.ADD_LAYOUT_SET_BRANCH);
+				actions.remove(ActionKeys.ASSIGN_MEMBERS);
+				actions.remove(ActionKeys.ASSIGN_USER_ROLES);
+				actions.remove(ActionKeys.MANAGE_ANNOUNCEMENTS);
+				actions.remove(ActionKeys.MANAGE_STAGING);
+				actions.remove(ActionKeys.MANAGE_TEAMS);
+				actions.remove(ActionKeys.PUBLISH_STAGING);
+				actions.remove(ActionKeys.PUBLISH_TO_REMOTE);
+				actions.remove(ActionKeys.VIEW_MEMBERS);
+				actions.remove(ActionKeys.VIEW_STAGING);
+			}
+		}
+		else if (modelResource.equals(Role.class.getName())) {
+			long modelResourceRoleId = GetterUtil.getLong(resourcePrimKey);
+
+			Role modelResourceRole = RoleLocalServiceUtil.getRole(modelResourceRoleId);
+
+			String name = modelResourceRole.getName();
+
+			if (name.equals(RoleConstants.GUEST) || name.equals(RoleConstants.USER)) {
+				actions = new ArrayList<String>(actions);
+
+				actions.remove(ActionKeys.ASSIGN_MEMBERS);
+				actions.remove(ActionKeys.DEFINE_PERMISSIONS);
+				actions.remove(ActionKeys.DELETE);
+				actions.remove(ActionKeys.PERMISSIONS);
+				actions.remove(ActionKeys.UPDATE);
+				actions.remove(ActionKeys.VIEW);
+			}
+		}
+
+		List<Role> roles = ListUtil.copy(ResourceActionsUtil.getRoles(company.getCompanyId(), group, modelResource, roleTypes));
+
+		Role administratorRole = RoleLocalServiceUtil.getRole(company.getCompanyId(), RoleConstants.ADMINISTRATOR);
+
+		roles.remove(administratorRole);
+
+		if (!ResourceActionsUtil.isPortalModelResource(modelResource)) {
+			Role organizationAdministratorRole = RoleLocalServiceUtil.getRole(company.getCompanyId(), RoleConstants.ORGANIZATION_ADMINISTRATOR);
+
+			roles.remove(organizationAdministratorRole);
+
+			Role organizationOwnerRole = RoleLocalServiceUtil.getRole(company.getCompanyId(), RoleConstants.ORGANIZATION_OWNER);
+
+			roles.remove(organizationOwnerRole);
+
+			Role siteAdministratorRole = RoleLocalServiceUtil.getRole(company.getCompanyId(), RoleConstants.SITE_ADMINISTRATOR);
+
+			roles.remove(siteAdministratorRole);
+
+			Role siteOwnerRole = RoleLocalServiceUtil.getRole(company.getCompanyId(), RoleConstants.SITE_OWNER);
+
+			roles.remove(siteOwnerRole);
+		}
+
+		long modelResourceRoleId = 0;
+
+		if (modelResource.equals(Role.class.getName())) {
+			modelResourceRoleId = GetterUtil.getLong(resourcePrimKey);
+
+			Role role = RoleLocalServiceUtil.getRole(modelResourceRoleId);
+
+			roles.remove(role);
+		}
+
+		roles.addAll(RoleLocalServiceUtil.getTeamRoles(groupId, new long[] {modelResourceRoleId}));
+
+		Iterator<Role> itr = roles.iterator();
+
+		while (itr.hasNext()) {
+			Role role = itr.next();
+
+			String name = role.getName();
+
+			if (!name.equals(RoleConstants.GUEST) && !RolePermissionUtil.contains(permissionChecker, groupId, role.getRoleId(), ActionKeys.VIEW) && (!role.isTeam() || !TeamPermissionUtil.contains(permissionChecker, role.getClassPK(), ActionKeys.PERMISSIONS))) {
+				itr.remove();
+			}
+
+			if (name.equals(RoleConstants.GUEST) && modelResource.equals(Layout.class.getName())) {
+				Layout resourceLayout = LayoutLocalServiceUtil.getLayout(GetterUtil.getLong(resourcePrimKey));
+
+				if (resourceLayout.isPrivateLayout()) {
+					Group resourceLayoutGroup = resourceLayout.getGroup();
+
+					if (!resourceLayoutGroup.isLayoutSetPrototype()) {
+						itr.remove();
+					}
+				}
+			}
+
+			if (name.equals(RoleConstants.GUEST) && Validator.isNotNull(portletResource)) {
+				int pos = resourcePrimKey.indexOf(PortletConstants.LAYOUT_SEPARATOR);
+
+				if (pos > 0) {
+					long resourcePlid = GetterUtil.getLong(resourcePrimKey.substring(0, pos));
+
+					Layout resourceLayout = LayoutLocalServiceUtil.getLayout(resourcePlid);
+
+					if (resourceLayout.isPrivateLayout()) {
+						Group resourceLayoutGroup = resourceLayout.getGroup();
+
+						if (!resourceLayoutGroup.isLayoutPrototype() && !resourceLayoutGroup.isLayoutSetPrototype()) {
+							itr.remove();
+						}
+					}
+				}
+			}
+		}
+		%>
+
+		<liferay-ui:search-container>
+			<liferay-ui:search-container-results
+				results="<%= roles %>"
+				total="<%= roles.size() %>"
+			/>
+
+			<liferay-ui:search-container-row
+				className="com.liferay.portal.model.Role"
+				escapedModel="<%= true %>"
+				keyProperty="roleId"
+				modelVar="role"
+			>
+				<liferay-util:param name="className" value="<%= RolesAdminUtil.getCssClassName(role) %>" />
+				<liferay-util:param name="classHoverName" value="<%= RolesAdminUtil.getCssClassName(role) %>" />
+
+				<%
+				String definePermissionsHREF = null;
+
+				String name = role.getName();
+
+				if (!name.equals(RoleConstants.ADMINISTRATOR) && !name.equals(RoleConstants.ORGANIZATION_ADMINISTRATOR) && !name.equals(RoleConstants.ORGANIZATION_OWNER) && !name.equals(RoleConstants.OWNER) && !name.equals(RoleConstants.SITE_ADMINISTRATOR) && !name.equals(RoleConstants.SITE_OWNER) && RolePermissionUtil.contains(permissionChecker, role.getRoleId(), ActionKeys.DEFINE_PERMISSIONS)) {
+					definePermissionsURL.setParameter("roleId", String.valueOf(role.getRoleId()));
+
+					definePermissionsHREF = definePermissionsURL.toString();
+				}
+				%>
+
+				<liferay-ui:search-container-column-text
+					href="<%= definePermissionsHREF %>"
+					name="role"
+					value="<%= role.getTitle(locale) %>"
+				/>
+
+				<%
+
+				// Actions
+
+				List<String> currentIndividualActions = new ArrayList<String>();
+				List<String> currentGroupActions = new ArrayList<String>();
+				List<String> currentGroupTemplateActions = new ArrayList<String>();
+				List<String> currentCompanyActions = new ArrayList<String>();
+
+				ResourcePermissionUtil.populateResourcePermissionActionIds(groupId, role, resource, actions, currentIndividualActions, currentGroupActions, currentGroupTemplateActions, currentCompanyActions);
+
+				List<String> guestUnsupportedActions = ResourceActionsUtil.getResourceGuestUnsupportedActions(portletResource, modelResource);
+
+				// LPS-32515
+
+				if ((selLayout != null) && group.isGuest() && SitesUtil.isFirstLayout(selLayout.getGroupId(), selLayout.isPrivateLayout(), selLayout.getLayoutId())) {
+					guestUnsupportedActions = new ArrayList<String>(guestUnsupportedActions);
+
+					guestUnsupportedActions.add(ActionKeys.VIEW);
+				}
+
+				for (String action : actions) {
+					boolean checked = false;
+					boolean disabled = false;
+					String preselectedMsg = StringPool.BLANK;
+
+					if (currentIndividualActions.contains(action)) {
+						checked = true;
+					}
+
+					if (currentGroupActions.contains(action) || currentGroupTemplateActions.contains(action)) {
+						checked = true;
+						preselectedMsg = "x-is-allowed-to-do-action-x-in-all-items-of-type-x-in-x";
+					}
+
+					if (currentCompanyActions.contains(action)) {
+						checked = true;
+						preselectedMsg = "x-is-allowed-to-do-action-x-in-all-items-of-type-x-in-this-portal-instance";
+					}
+
+					if (name.equals(RoleConstants.GUEST) && guestUnsupportedActions.contains(action)) {
+						disabled = true;
+					}
+
+					if (action.equals(ActionKeys.ACCESS_IN_CONTROL_PANEL)) {
+						disabled = true;
+					}
+				%>
+
+					<liferay-ui:search-container-column-text
+						buffer="buffer"
+						name="<%= ResourceActionsUtil.getAction(pageContext, action) %>"
+					>
+
+						<%
+						buffer.append("<input ");
+
+						if (checked) {
+							buffer.append("checked ");
+						}
+
+						if (Validator.isNotNull(preselectedMsg)) {
+							buffer.append("class=\"lfr-checkbox-preselected\" ");
+						}
+
+						if (disabled) {
+							buffer.append("disabled ");
+						}
+
+						buffer.append("id=\"");
+						buffer.append(FriendlyURLNormalizerUtil.normalize(role.getName()));
+
+						if (Validator.isNotNull(preselectedMsg)) {
+							buffer.append(ActionUtil.PRESELECTED);
+						}
+						else {
+							buffer.append(ActionUtil.ACTION);
+						}
+
+						buffer.append(action);
+						buffer.append("\" ");
+
+						buffer.append("name=\"");
+						buffer.append(renderResponse.getNamespace());
+						buffer.append(role.getRoleId());
+
+						if (Validator.isNotNull(preselectedMsg)) {
+							buffer.append(ActionUtil.PRESELECTED);
+						}
+						else {
+							buffer.append(ActionUtil.ACTION);
+						}
+
+						buffer.append(action);
+						buffer.append("\" ");
+
+						if (Validator.isNotNull(preselectedMsg)) {
+							buffer.append("onclick=\"return false;\" onmouseover=\"Liferay.Portal.ToolTip.show(this, '");
+							buffer.append(UnicodeLanguageUtil.format(pageContext, preselectedMsg, new Object[] {role.getTitle(locale), ResourceActionsUtil.getAction(pageContext, action), Validator.isNull(modelResource) ? selResourceDescription : ResourceActionsUtil.getModelResource(locale, resource.getName()), HtmlUtil.escape(group.getDescriptiveName(locale))}));
+							buffer.append("'); return false;\" ");
+						}
+
+						buffer.append("type=\"checkbox\" />");
+						%>
+
+					</liferay-ui:search-container-column-text>
+
+				<%
+				}
+				%>
+
+			</liferay-ui:search-container-row>
+
+			<liferay-ui:search-iterator paginate="<%= false %>" searchContainer="<%= searchContainer %>" />
+		</liferay-ui:search-container>
+
+		<aui:button-row>
+			<aui:button type="submit" />
+		</aui:button-row>
+	</aui:form>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/edit_public_render_parameters.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/edit_public_render_parameters.jsp
new file mode 100644
index 0000000..618574e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/edit_public_render_parameters.jsp
@@ -0,0 +1,121 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portlet_configuration/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+String returnToFullPageURL = ParamUtil.getString(request, "returnToFullPageURL");
+
+List<PublicRenderParameterConfiguration> publicRenderParameterConfigurations = (List<PublicRenderParameterConfiguration>)request.getAttribute(WebKeys.PUBLIC_RENDER_PARAMETER_CONFIGURATIONS);
+Set<PublicRenderParameter> publicRenderParameters = (Set<PublicRenderParameter>)request.getAttribute(WebKeys.PUBLIC_RENDER_PARAMETERS);
+
+PortletURL editPublicRenderParameterURL = renderResponse.createRenderURL();
+
+editPublicRenderParameterURL.setParameter("struts_action", "/portlet_configuration/edit_public_render_parameters");
+editPublicRenderParameterURL.setParameter("redirect", redirect);
+editPublicRenderParameterURL.setParameter("returnToFullPageURL", returnToFullPageURL);
+editPublicRenderParameterURL.setParameter("portletResource", portletResource);
+%>
+
+<liferay-util:include page="/html/portlet/portlet_configuration/tabs1.jsp">
+	<liferay-util:param name="tabs1" value="communication" />
+</liferay-util:include>
+
+<liferay-ui:error key="duplicateMapping" message="several-shared-parameters-are-mapped-to-the-same-parameter" />
+
+<portlet:actionURL var="editPRPURL">
+	<portlet:param name="struts_action" value="/portlet_configuration/edit_public_render_parameters" />
+</portlet:actionURL>
+
+<div class="alert alert-info">
+	<liferay-ui:message arguments='<%= "http://www.liferay.com/community/wiki/-/wiki/Main/Portlet+Communication+Configuration" %>' key="set-up-the-communication-among-the-portlets-that-use-public-render-parameters" />
+</div>
+
+<aui:form action="<%= editPRPURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.SAVE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= editPublicRenderParameterURL.toString() %>" />
+	<aui:input name="returnToFullPageURL" type="hidden" value="<%= returnToFullPageURL %>" />
+	<aui:input name="portletResource" type="hidden" value="<%= portletResource %>" />
+
+	<liferay-ui:search-container
+		total="<%= publicRenderParameterConfigurations.size() %>"
+	>
+		<liferay-ui:search-container-results
+			results="<%= ListUtil.subList(publicRenderParameterConfigurations, searchContainer.getStart(), searchContainer.getEnd()) %>"
+		/>
+
+		<liferay-ui:search-container-row
+			className="PublicRenderParameterConfiguration"
+			modelVar="publicRenderParameterConfiguration"
+		>
+			<liferay-ui:search-container-column-text
+				name="shared-parameter"
+				value="<%= publicRenderParameterConfiguration.getPublicRenderParameter().getIdentifier() %>"
+			/>
+
+			<liferay-ui:search-container-column-text
+				name="ignore"
+			>
+				<aui:input label="" name="<%= publicRenderParameterConfiguration.getIgnoreKey() %>" type="checkbox" value="<%= publicRenderParameterConfiguration.getIgnoreValue() %>" />
+			</liferay-ui:search-container-column-text>
+
+			<liferay-ui:search-container-column-text
+				name="read-value-from-parameter"
+			>
+				<aui:select label="" name="<%= publicRenderParameterConfiguration.getMappingKey() %>">
+					<aui:option label="<%= publicRenderParameterConfiguration.getPublicRenderParameter().getIdentifier() %>" value="" />
+
+					<%
+					for (PublicRenderParameter publicRenderParameter : publicRenderParameters) {
+						String publicRenderParameterName = PortletQNameUtil.getPublicRenderParameterName(publicRenderParameter.getQName());
+
+						if (publicRenderParameterName.equals(publicRenderParameterConfiguration.getPublicRenderParameterName())) {
+							continue;
+						}
+					%>
+
+						<aui:option label="<%= publicRenderParameter.getIdentifier() %>" selected="<%= publicRenderParameterName.equals(publicRenderParameterConfiguration.getMappingValue()) %>" value="<%= publicRenderParameterName %>" />
+
+					<%
+					}
+					%>
+
+				</aui:select>
+			</liferay-ui:search-container-column-text>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator paginate="<%= false %>" />
+	</liferay-ui:search-container>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script use="aui-base">
+
+	<%
+	for (PublicRenderParameterConfiguration publicRenderParameterConfiguration : publicRenderParameterConfigurations) {
+	%>
+
+		Liferay.Util.disableToggleBoxes('<portlet:namespace /><%= PublicRenderParameterConfiguration.IGNORE_PREFIX + publicRenderParameterConfiguration.getPublicRenderParameterName() %>' + 'Checkbox', '<portlet:namespace /><%= PublicRenderParameterConfiguration.MAPPING_PREFIX + publicRenderParameterConfiguration.getPublicRenderParameterName() %>', true);
+
+	<%
+	}
+	%>
+
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/edit_scope.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/edit_scope.jsp
new file mode 100644
index 0000000..069c1af
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/edit_scope.jsp
@@ -0,0 +1,122 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portlet_configuration/init.jsp" %>
+
+<%
+String scopeType = GetterUtil.getString(portletPreferences.getValue("lfrScopeType", null));
+String scopeLayoutUuid = GetterUtil.getString(portletPreferences.getValue("lfrScopeLayoutUuid", null));
+
+Group group = null;
+
+if (Validator.isNull(scopeType)) {
+	group = themeDisplay.getSiteGroup();
+}
+else if (scopeType.equals("company")) {
+	group = GroupLocalServiceUtil.getGroup(themeDisplay.getCompanyGroupId());
+}
+else if (scopeType.equals("layout")) {
+	for (Layout scopeGroupLayout : LayoutLocalServiceUtil.getScopeGroupLayouts(layout.getGroupId(), layout.isPrivateLayout())) {
+		if (scopeLayoutUuid.equals(scopeGroupLayout.getUuid())) {
+			group = GroupLocalServiceUtil.getLayoutGroup(scopeGroupLayout.getCompanyId(), scopeGroupLayout.getPlid());
+
+			break;
+		}
+	}
+
+	if (group == null) {
+		group = themeDisplay.getSiteGroup();
+	}
+}
+
+Set<Group> availableGroups = new LinkedHashSet<Group>();
+
+availableGroups.add(group);
+availableGroups.add(themeDisplay.getSiteGroup());
+availableGroups.add(company.getGroup());
+
+for (Layout scopeGroupLayout : LayoutLocalServiceUtil.getScopeGroupLayouts(layout.getGroupId(), layout.isPrivateLayout())) {
+	availableGroups.add(scopeGroupLayout.getScopeGroup());
+}
+%>
+
+<liferay-util:include page="/html/portlet/portlet_configuration/tabs1.jsp">
+	<liferay-util:param name="tabs1" value="scope" />
+</liferay-util:include>
+
+<aui:fieldset>
+	<aui:field-wrapper label="scope" name="scopeId">
+		<liferay-ui:icon-menu direction="down" icon="<%= group.getIconURL(themeDisplay) %>" message="<%= group.getDescriptiveName(locale) %>" showWhenSingleIcon="<%= true %>">
+
+			<%
+			for (Group availableGroup : availableGroups) {
+				String availableGroupScopeType = StringPool.BLANK;
+				String availableGroupScopeLayoutUuid = StringPool.BLANK;
+
+				if (availableGroup.isCompany()) {
+					availableGroupScopeType = "company";
+				}
+				else if (availableGroup.isLayout()) {
+					availableGroupScopeType = "layout";
+
+					Layout availableGroupLayout = LayoutLocalServiceUtil.getLayout(availableGroup.getClassPK());
+
+					availableGroupScopeLayoutUuid = availableGroupLayout.getUuid();
+				}
+			%>
+
+				<liferay-portlet:actionURL var="setScopeURL">
+					<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.SAVE %>" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="portletResource" value="<%= portletResource %>" />
+					<portlet:param name="struts_action" value="/portlet_configuration/edit_scope" />
+					<portlet:param name="scopeType" value="<%= availableGroupScopeType %>" />
+					<portlet:param name="scopeLayoutUuid" value="<%= availableGroupScopeLayoutUuid %>" />
+				</liferay-portlet:actionURL>
+
+				<liferay-ui:icon
+					id='<%= "scope" + availableGroup.getGroupId() %>'
+					message="<%= availableGroup.getDescriptiveName(locale) %>"
+					method="post"
+					src="<%= availableGroup.getIconURL(themeDisplay) %>"
+					url="<%= setScopeURL %>"
+				/>
+
+			<%
+			}
+			%>
+
+			<c:if test="<%= !layout.hasScopeGroup() %>">
+				<liferay-portlet:actionURL var="createNewScopeURL">
+					<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.SAVE %>" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="portletResource" value="<%= portletResource %>" />
+					<portlet:param name="struts_action" value="/portlet_configuration/edit_scope" />
+					<portlet:param name="scopeType" value="layout" />
+					<portlet:param name="scopeLayoutUuid" value="<%= layout.getUuid() %>" />
+				</liferay-portlet:actionURL>
+
+				<liferay-ui:icon
+					id="scopeCurLayout"
+					image="add"
+					message='<%= HtmlUtil.escape(layout.getName(locale)) + " (" + LanguageUtil.get(pageContext, "create-new") + ")" %>'
+					method="post"
+					url="<%= createNewScopeURL %>"
+				/>
+			</c:if>
+		</liferay-ui:icon-menu>
+	</aui:field-wrapper>
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/edit_sharing.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/edit_sharing.jsp
new file mode 100644
index 0000000..1069871
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/edit_sharing.jsp
@@ -0,0 +1,177 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portlet_configuration/init.jsp" %>
+
+<%
+String tabs2 = ParamUtil.getString(request, "tabs2", "any-website");
+
+String redirect = ParamUtil.getString(request, "redirect");
+String returnToFullPageURL = ParamUtil.getString(request, "returnToFullPageURL");
+
+Portlet portlet = PortletLocalServiceUtil.getPortletById(company.getCompanyId(), portletResource);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/portlet_configuration/edit_sharing");
+portletURL.setParameter("redirect", redirect);
+portletURL.setParameter("returnToFullPageURL", returnToFullPageURL);
+portletURL.setParameter("portletResource", portletResource);
+
+String widgetURL = PortalUtil.getWidgetURL(portlet, themeDisplay);
+%>
+
+<liferay-util:include page="/html/portlet/portlet_configuration/tabs1.jsp">
+	<liferay-util:param name="tabs1" value="sharing" />
+</liferay-util:include>
+
+<liferay-ui:tabs
+	names="any-website,facebook,opensocial-gadget,netvibes,friends"
+	param="tabs2"
+	url="<%= portletURL.toString() %>"
+/>
+
+<portlet:actionURL var="editSharingURL">
+	<portlet:param name="struts_action" value="/portlet_configuration/edit_sharing" />
+</portlet:actionURL>
+
+<aui:form action="<%= editSharingURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.SAVE %>" />
+	<aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
+	<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+	<aui:input name="returnToFullPageURL" type="hidden" value="<%= returnToFullPageURL %>" />
+	<aui:input name="portletResource" type="hidden" value="<%= portletResource %>" />
+
+	<aui:fieldset>
+		<c:choose>
+			<c:when test='<%= tabs2.equals("any-website") %>'>
+
+				<%
+				boolean widgetShowAddAppLink = GetterUtil.getBoolean(portletPreferences.getValue("lfrWidgetShowAddAppLink", null), PropsValues.THEME_PORTLET_SHARING_DEFAULT);
+				%>
+
+				<div class="alert alert-info">
+					<liferay-ui:message key="share-this-application-on-any-website" />
+				</div>
+
+				<liferay-util:buffer var="textAreaContent">
+<script src="<%= themeDisplay.getPortalURL() %><%= themeDisplay.getPathContext() %>/html/js/liferay/widget.js" type="text/javascript"></script>
+<script type="text/javascript">
+	Liferay.Widget({ url: '<%= widgetURL %>'});
+</script></liferay-util:buffer>
+
+				<aui:field-wrapper>
+					<textarea class="lfr-textarea-container" onClick="Liferay.Util.selectAndCopy(this);"><%= HtmlUtil.escape(textAreaContent) %></textarea>
+				</aui:field-wrapper>
+
+				<aui:input label='<%= LanguageUtil.format(pageContext, "allow-users-to-add-x-to-any-website", portletDisplay.getTitle()) %>' name="widgetShowAddAppLink" type="checkbox" value="<%= widgetShowAddAppLink %>" />
+			</c:when>
+			<c:when test='<%= tabs2.equals("facebook") %>'>
+
+				<%
+				String facebookAPIKey = GetterUtil.getString(portletPreferences.getValue("lfrFacebookApiKey", null));
+				String facebookCanvasPageURL = GetterUtil.getString(portletPreferences.getValue("lfrFacebookCanvasPageUrl", null));
+				boolean facebookShowAddAppLink = GetterUtil.getBoolean(portletPreferences.getValue("lfrFacebookShowAddAppLink", null), true);
+
+				String callbackURL = widgetURL;
+
+				if (portlet.getFacebookIntegration().equals(PortletConstants.FACEBOOK_INTEGRATION_FBML)) {
+					callbackURL = PortalUtil.getFacebookURL(portlet, facebookCanvasPageURL, themeDisplay);
+				}
+				%>
+
+				<div class="alert alert-info">
+					<aui:a href="http://www.facebook.com/developers/editapp.php?new" target="_blank"><liferay-ui:message key="get-the-api-key-and-canvas-page-url-from-facebook" /></aui:a>
+				</div>
+
+				<aui:input cssClass="lfr-input-text-container" label="api-key" name="facebookAPIKey" value="<%= HtmlUtil.toInputSafe(facebookAPIKey) %>" />
+
+				<aui:input cssClass="lfr-input-text-container flexible" label="canvas-page-url" name="facebookCanvasPageURL" prefix="http://apps.facebook.com/" suffix="/" value="<%= HtmlUtil.toInputSafe(facebookCanvasPageURL) %>" />
+
+				<c:if test="<%= Validator.isNotNull(facebookCanvasPageURL) %>">
+					<br />
+
+					<div class="alert alert-info">
+						<liferay-ui:message key="copy-the-callback-url-and-specify-it-in-facebook" />
+
+						<c:choose>
+							<c:when test="<%= portlet.getFacebookIntegration().equals(PortletConstants.FACEBOOK_INTEGRATION_FBML) %>">
+								<liferay-ui:message key="this-application-is-exposed-to-facebook-via-fbml" />
+							</c:when>
+							<c:otherwise>
+								<liferay-ui:message key="this-application-is-exposed-to-facebook-via-an-iframe" />
+							</c:otherwise>
+						</c:choose>
+					</div>
+
+					<label><liferay-ui:message key="callback-url" /></label>
+
+					<liferay-ui:input-resource url="<%= callbackURL %>" />
+
+					<aui:input label='<%= LanguageUtil.format(pageContext, "allow-users-to-add-x-to-facebook", portletDisplay.getTitle()) %>' name="facebookShowAddAppLink" type="checkbox" value="<%= facebookShowAddAppLink %>" />
+				</c:if>
+			</c:when>
+			<c:when test='<%= tabs2.equals("opensocial-gadget") %>'>
+
+				<%
+				boolean iGoogleShowAddAppLink = PrefsParamUtil.getBoolean(portletPreferences, request, "lfrIgoogleShowAddAppLink");
+				%>
+
+				<div class="alert alert-info">
+					<liferay-ui:message key="use-the-opensocial-gadget-url-to-create-an-opensocial-gadget" />
+				</div>
+
+				<label><liferay-ui:message key="opensocial-gadget-url" /></label>
+
+				<liferay-ui:input-resource url="<%= PortalUtil.getGoogleGadgetURL(portlet, themeDisplay) %>" />
+
+				<aui:input label='<%= LanguageUtil.format(pageContext, "allow-users-to-add-x-to-igoogle", portletDisplay.getTitle()) %>' name="iGoogleShowAddAppLink" type="checkbox" value="<%= iGoogleShowAddAppLink %>" />
+			</c:when>
+			<c:when test='<%= tabs2.equals("netvibes") %>'>
+
+				<%
+				boolean netvibesShowAddAppLink = PrefsParamUtil.getBoolean(portletPreferences, request, "lfrNetvibesShowAddAppLink");
+				%>
+
+				<div class="alert alert-info">
+					<liferay-ui:message key="use-the-netvibes-widget-url-to-create-a-netvibes-widget" />
+				</div>
+
+				<label><liferay-ui:message key="netvibes-widget-url" /></label>
+
+				<liferay-ui:input-resource url="<%= PortalUtil.getNetvibesURL(portlet, themeDisplay) %>" />
+
+				<aui:input label='<%= LanguageUtil.format(pageContext, "allow-users-to-add-x-to-netvibes-pages", portletDisplay.getTitle()) %>' name="netvibesShowAddAppLink" type="checkbox" value="<%= netvibesShowAddAppLink %>" />
+			</c:when>
+			<c:when test='<%= tabs2.equals("friends") %>'>
+
+				<%
+				boolean appShowShareWithFriendsLink = GetterUtil.getBoolean(portletPreferences.getValue("lfrAppShowShareWithFriendsLink", null));
+				%>
+
+				<aui:input label='<%= LanguageUtil.format(pageContext, "allow-users-to-share-x-with-friends", portletDisplay.getTitle()) %>' name="appShowShareWithFriendsLink" type="checkbox" value="<%= appShowShareWithFriendsLink %>" />
+			</c:when>
+		</c:choose>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<%
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, tabs2), currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/edit_supported_clients.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/edit_supported_clients.jsp
new file mode 100644
index 0000000..53ea38f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/edit_supported_clients.jsp
@@ -0,0 +1,60 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portlet_configuration/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+String returnToFullPageURL = ParamUtil.getString(request, "returnToFullPageURL");
+
+Set<String> allPortletModes = selPortlet.getAllPortletModes();
+%>
+
+<liferay-util:include page="/html/portlet/portlet_configuration/tabs1.jsp">
+	<liferay-util:param name="tabs1" value="supported-clients" />
+</liferay-util:include>
+
+<portlet:actionURL var="editSupportedClientsURL">
+	<portlet:param name="struts_action" value="/portlet_configuration/edit_supported_clients" />
+</portlet:actionURL>
+
+<aui:form action="<%= editSupportedClientsURL %>" method="post" name=">fm">
+	<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+	<aui:input name="returnToFullPageURL" type="hidden" value="<%= returnToFullPageURL %>" />
+	<aui:input name="portletResource" type="hidden" value="<%= portletResource %>" />
+
+	<%
+	for (String curPortletMode : allPortletModes) {
+		String mobileDevicesParam = "portletSetupSupportedClientsMobileDevices_" + curPortletMode;
+		boolean mobileDevicesDefault = selPortlet.hasPortletMode(ContentTypes.XHTML_MP, PortletModeFactory.getPortletMode(curPortletMode));
+
+		boolean mobileDevices = GetterUtil.getBoolean(portletPreferences.getValue(mobileDevicesParam, String.valueOf(mobileDevicesDefault)));
+	%>
+
+		<aui:fieldset label='<%= LanguageUtil.get(pageContext, "portlet-mode") + ": " + LanguageUtil.get(pageContext, curPortletMode) %>'>
+			<aui:input disabled="<%= true %>" label="regular-browsers" name='<%= "regularBrowsersEnabled" + curPortletMode %>' type="checkbox" value="<%= true %>" />
+
+			<aui:input label="mobile-devices" name="<%= mobileDevicesParam %>" type="checkbox" value="<%= mobileDevices %>" />
+		</aui:fieldset>
+
+	<%
+	}
+	%>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/error.jsp
new file mode 100644
index 0000000..0d5a334
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/error.jsp
@@ -0,0 +1,28 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portlet_configuration/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= LARFileSizeException.class %>">
+	<liferay-ui:message arguments="<%= PrefsPropsUtil.getLong(PropsKeys.UPLOAD_SERVLET_REQUEST_IMPL_MAX_SIZE) / 1024 %>" key="please-enter-a-file-with-a-valid-file-size-no-larger-than-x" />
+</liferay-ui:error>
+
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/export_import.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/export_import.jsp
new file mode 100644
index 0000000..ef8fc02
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/export_import.jsp
@@ -0,0 +1,128 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portlet_configuration/init.jsp" %>
+
+<%
+String tabs2 = ParamUtil.getString(request, "tabs2", "export");
+
+String redirect = ParamUtil.getString(request, "redirect");
+String returnToFullPageURL = ParamUtil.getString(request, "returnToFullPageURL");
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/portlet_configuration/export_import");
+portletURL.setParameter("redirect", redirect);
+portletURL.setParameter("returnToFullPageURL", returnToFullPageURL);
+portletURL.setParameter("portletResource", portletResource);
+
+String tabs2Names = "export,import";
+
+Group scopeGroup = themeDisplay.getScopeGroup();
+
+if (scopeGroup.isStagingGroup()) {
+	tabs2Names += ",staging";
+}
+else if (scopeGroup.isLayout()) {
+	Group parentScopeGroup = GroupServiceUtil.getGroup(scopeGroup.getParentGroupId());
+
+	if (parentScopeGroup.isStagingGroup()) {
+		tabs2Names += ",staging";
+	}
+}
+%>
+
+<liferay-ui:tabs
+	names="<%= tabs2Names %>"
+	param="tabs2"
+	portletURL="<%= portletURL %>"
+/>
+
+<liferay-ui:error exception="<%= LARFileException.class %>" message="please-specify-a-lar-file-to-import" />
+
+<liferay-ui:error exception="<%= LARTypeException.class %>">
+
+	<%
+	LARTypeException lpe = (LARTypeException)errorException;
+	%>
+
+	<liferay-ui:message arguments="<%= lpe.getMessage() %>" key="please-import-a-lar-file-of-the-correct-type-x-is-not-valid" />
+</liferay-ui:error>
+
+<liferay-ui:error exception="<%= ExportImportAction.class %>" message="an-unexpected-error-occurred-while-importing-your-file" />
+
+<liferay-ui:error exception="<%= LocaleException.class %>">
+
+	<%
+	LocaleException le = (LocaleException)errorException;
+	%>
+
+	<c:if test="<%= le.getType() == LocaleException.TYPE_EXPORT_IMPORT %>">
+		<liferay-ui:message arguments="<%= new String[] {StringUtil.merge(le.getSourceAvailableLocales(), StringPool.COMMA_AND_SPACE), StringUtil.merge(le.getTargetAvailableLocales(), StringPool.COMMA_AND_SPACE)} %>" key="the-available-languages-in-the-lar-file-x-do-not-match-the-site's-available-languages-x" />
+	</c:if>
+</liferay-ui:error>
+
+<liferay-ui:error exception="<%= NoSuchLayoutException.class %>" message="an-error-occurred-because-the-live-group-does-not-have-the-current-page" />
+<liferay-ui:error exception="<%= PortletIdException.class %>" message="please-import-a-lar-file-for-the-current-portlet" />
+
+<liferay-ui:error exception="<%= PortletDataException.class %>">
+
+	<%
+	PortletDataException pde = (PortletDataException)errorException;
+	%>
+
+	<c:if test="<%= pde.getType() == PortletDataException.FUTURE_END_DATE %>">
+		<liferay-ui:message key="please-enter-a-valid-end-date-that-is-in-the-past" />
+	</c:if>
+
+	<c:if test="<%= pde.getType() == PortletDataException.FUTURE_START_DATE %>">
+		<liferay-ui:message key="please-enter-a-valid-start-date-that-is-in-the-past" />
+	</c:if>
+
+	<c:if test="<%= pde.getType() == PortletDataException.START_DATE_AFTER_END_DATE %>">
+		<liferay-ui:message key="please-enter-a-start-date-that-comes-before-the-end-date" />
+	</c:if>
+</liferay-ui:error>
+
+<liferay-ui:error exception="<%= RecordSetDuplicateRecordSetKeyException.class %>">
+
+	<%
+	RecordSetDuplicateRecordSetKeyException rsdrske = (RecordSetDuplicateRecordSetKeyException)errorException;
+	%>
+
+	<liferay-ui:message arguments="<%= rsdrske.getRecordSetKey() %>" key="dynamic-data-list-record-set-with-record-set-key-x-already-exists" />
+</liferay-ui:error>
+
+<liferay-ui:error exception="<%= StructureDuplicateStructureKeyException.class %>">
+
+	<%
+	StructureDuplicateStructureKeyException sdske = (StructureDuplicateStructureKeyException)errorException;
+	%>
+
+	<liferay-ui:message arguments="<%= sdske.getStructureKey() %>" key="dynamic-data-mapping-structure-with-structure-key-x-already-exists" />
+</liferay-ui:error>
+
+<c:choose>
+	<c:when test='<%= tabs2.equals("export") %>'>
+		<liferay-util:include page="/html/portlet/portlet_configuration/export_portlet.jsp" />
+	</c:when>
+	<c:when test='<%= tabs2.equals("import") %>'>
+		<liferay-util:include page="/html/portlet/portlet_configuration/import_portlet.jsp" />
+	</c:when>
+	<c:when test='<%= tabs2.equals("staging") %>'>
+		<liferay-util:include page="/html/portlet/portlet_configuration/publish_portlet.jsp" />
+	</c:when>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/export_portlet.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/export_portlet.jsp
new file mode 100644
index 0000000..bf9e70f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/export_portlet.jsp
@@ -0,0 +1,459 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portlet_configuration/init.jsp" %>
+
+<%
+Layout exportableLayout = ExportImportHelperUtil.getExportableLayout(themeDisplay);
+
+PortletURL portletURL = currentURLObj;
+
+portletURL.setParameter("tabs3", "current-and-previous");
+%>
+
+<liferay-ui:tabs
+	names="new-export-process,current-and-previous"
+	param="tabs3"
+	refresh="<%= false %>"
+>
+	<liferay-ui:section>
+
+		<%
+		int incompleteBackgroundTaskCount = BackgroundTaskLocalServiceUtil.getBackgroundTasksCount(themeDisplay.getScopeGroupId(), selPortlet.getPortletId(), PortletExportBackgroundTaskExecutor.class.getName(), false);
+		%>
+
+		<div class="<%= (incompleteBackgroundTaskCount == 0) ? "hide" : "in-progress" %>" id="<portlet:namespace />incompleteProcessMessage">
+			<liferay-util:include page="/html/portlet/layouts_admin/incomplete_processes_message.jsp">
+				<liferay-util:param name="incompleteBackgroundTaskCount" value="<%= String.valueOf(incompleteBackgroundTaskCount) %>" />
+			</liferay-util:include>
+		</div>
+
+		<portlet:actionURL var="exportPortletURL">
+			<portlet:param name="struts_action" value="/portlet_configuration/export_import" />
+		</portlet:actionURL>
+
+		<aui:form action='<%= exportPortletURL + "&etag=0&strip=0" %>' cssClass="lfr-export-dialog" method="post" name="fm1">
+			<aui:input name="tabs1" type="hidden" value="export_import" />
+			<aui:input name="tabs2" type="hidden" value="export" />
+			<aui:input name="redirect" type="hidden" value="<%= portletURL.toString() %>" />
+			<aui:input name="plid" type="hidden" value="<%= exportableLayout.getPlid() %>" />
+			<aui:input name="groupId" type="hidden" value="<%= themeDisplay.getScopeGroupId() %>" />
+			<aui:input name="portletResource" type="hidden" value="<%= portletResource %>" />
+
+			<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.EXPORT %>" />
+
+			<div class="export-dialog-tree">
+				<aui:input label="export-the-selected-data-to-the-given-lar-file-name" name="exportFileName" size="50" value='<%= StringUtil.replace(selPortlet.getDisplayName(), " ", "_") + "-" + Time.getShortTimestamp() + ".portlet.lar" %>' />
+
+				<%
+				PortletDataHandler portletDataHandler = selPortlet.getPortletDataHandlerInstance();
+
+				PortletDataHandlerControl[] configurationControls = portletDataHandler.getExportConfigurationControls(company.getCompanyId(), themeDisplay.getScopeGroupId(), selPortlet, exportableLayout.getPlid(), false);
+				%>
+
+				<c:if test="<%= ArrayUtil.isNotEmpty(configurationControls) %>">
+					<aui:fieldset cssClass="options-group" label="application">
+						<ul class="lfr-tree select-options unstyled">
+							<li class="options">
+								<ul class="portlet-list">
+									<li class="tree-item">
+										<aui:input name="<%= PortletDataHandlerKeys.PORTLET_CONFIGURATION %>" type="hidden" value="<%= true %>" />
+
+										<aui:input label="configuration" name="<%= PortletDataHandlerKeys.PORTLET_CONFIGURATION + StringPool.UNDERLINE + selPortlet.getRootPortletId() %>" type="checkbox" value="<%= true %>" />
+
+										<div class="hide" id="<portlet:namespace />configuration_<%= selPortlet.getRootPortletId() %>">
+											<ul class="lfr-tree unstyled">
+												<li class="tree-item">
+													<aui:fieldset cssClass="portlet-type-data-section" label="configuration">
+														<ul class="lfr-tree unstyled">
+
+															<%
+															request.setAttribute("render_controls.jsp-action", Constants.EXPORT);
+															request.setAttribute("render_controls.jsp-controls", configurationControls);
+															request.setAttribute("render_controls.jsp-portletId", selPortlet.getRootPortletId());
+															%>
+
+															<liferay-util:include page="/html/portlet/layouts_admin/render_controls.jsp" />
+														</ul>
+													</aui:fieldset>
+												</li>
+											</ul>
+										</div>
+
+										<ul class="hide" id="<portlet:namespace />showChangeConfiguration_<%= selPortlet.getRootPortletId() %>">
+											<li>
+												<span class="selected-labels" id="<portlet:namespace />selectedConfiguration_<%= selPortlet.getRootPortletId() %>"></span>
+
+												<%
+												Map<String,Object> data = new HashMap<String,Object>();
+
+												data.put("portletid", selPortlet.getRootPortletId());
+												%>
+
+												<aui:a cssClass="configuration-link modify-link" data="<%= data %>" href="javascript:;" label="change" method="get" />
+											</li>
+										</ul>
+
+										<aui:script>
+											Liferay.Util.toggleBoxes('<portlet:namespace /><%= PortletDataHandlerKeys.PORTLET_CONFIGURATION + StringPool.UNDERLINE + selPortlet.getRootPortletId() %>Checkbox', '<portlet:namespace />showChangeConfiguration<%= StringPool.UNDERLINE + selPortlet.getRootPortletId() %>');
+										</aui:script>
+									</li>
+								</ul>
+							</li>
+						</ul>
+					</aui:fieldset>
+				</c:if>
+
+				<c:if test="<%= !portletDataHandler.isDisplayPortlet() %>">
+
+					<%
+					DateRange dateRange = ExportImportHelperUtil.getDateRange(renderRequest, themeDisplay.getScopeGroupId(), false, plid, selPortlet.getPortletId(), "all");
+
+					Date startDate = dateRange.getStartDate();
+					Date endDate = dateRange.getEndDate();
+
+					PortletDataContext portletDataContext = PortletDataContextFactoryUtil.createPreparePortletDataContext(themeDisplay, startDate, endDate);
+
+					portletDataHandler.prepareManifestSummary(portletDataContext, portletPreferences);
+
+					ManifestSummary manifestSummary = portletDataContext.getManifestSummary();
+
+					long exportModelCount = portletDataHandler.getExportModelCount(manifestSummary);
+
+					long modelDeletionCount = manifestSummary.getModelDeletionCount(portletDataHandler.getDeletionSystemEventStagedModelTypes());
+					%>
+
+					<c:if test="<%= (exportModelCount != 0) || (modelDeletionCount != 0) || (startDate != null) || (endDate != null) %>">
+						<aui:fieldset cssClass="options-group" label="content">
+							<ul class="lfr-tree select-options unstyled">
+								<li class="tree-item">
+									<div class="hide" id="<portlet:namespace />range">
+										<aui:fieldset cssClass="portlet-data-section" label="date-range">
+											<aui:input data-name='<%= LanguageUtil.get(pageContext, "all") %>' id="rangeAll" label="all" name="range" type="radio" value="all" />
+
+											<aui:input data-name='<%= LanguageUtil.get(pageContext, "date-range") %>' helpMessage="export-date-range-help" id="rangeDateRange" label="date-range" name="range" type="radio" value="dateRange" />
+
+											<%
+											Calendar endCalendar = CalendarFactoryUtil.getCalendar(timeZone, locale);
+
+											if (endDate != null) {
+												endCalendar.setTime(endDate);
+											}
+
+											Calendar startCalendar = CalendarFactoryUtil.getCalendar(timeZone, locale);
+
+											if (startDate != null) {
+												startCalendar.setTime(startDate);
+											}
+											else {
+												startCalendar.add(Calendar.DATE, -1);
+											}
+											%>
+
+											<ul class="date-range-options hide unstyled" id="<portlet:namespace />startEndDate">
+												<li>
+													<aui:fieldset label="start-date">
+														<liferay-ui:input-date
+															dayParam="startDateDay"
+															dayValue="<%= startCalendar.get(Calendar.DATE) %>"
+															disabled="<%= false %>"
+															firstDayOfWeek="<%= startCalendar.getFirstDayOfWeek() - 1 %>"
+															monthParam="startDateMonth"
+															monthValue="<%= startCalendar.get(Calendar.MONTH) %>"
+															name="startDate"
+															yearParam="startDateYear"
+															yearValue="<%= startCalendar.get(Calendar.YEAR) %>"
+														/>
+
+														&nbsp;
+
+														<liferay-ui:input-time
+															amPmParam='<%= "startDateAmPm" %>'
+															amPmValue="<%= startCalendar.get(Calendar.AM_PM) %>"
+															dateParam="startDateTime"
+															dateValue="<%= startCalendar.getTime() %>"
+															disabled="<%= false %>"
+															hourParam='<%= "startDateHour" %>'
+															hourValue="<%= startCalendar.get(Calendar.HOUR) %>"
+															minuteParam='<%= "startDateMinute" %>'
+															minuteValue="<%= startCalendar.get(Calendar.MINUTE) %>"
+															name="startTime"
+														/>
+													</aui:fieldset>
+												</li>
+
+												<li>
+													<aui:fieldset label="end-date">
+														<liferay-ui:input-date
+															dayParam="endDateDay"
+															dayValue="<%= endCalendar.get(Calendar.DATE) %>"
+															disabled="<%= false %>"
+															firstDayOfWeek="<%= endCalendar.getFirstDayOfWeek() - 1 %>"
+															monthParam="endDateMonth"
+															monthValue="<%= endCalendar.get(Calendar.MONTH) %>"
+															name="endDate"
+															yearParam="endDateYear"
+															yearValue="<%= endCalendar.get(Calendar.YEAR) %>"
+														/>
+
+														&nbsp;
+
+														<liferay-ui:input-time
+															amPmParam='<%= "endDateAmPm" %>'
+															amPmValue="<%= endCalendar.get(Calendar.AM_PM) %>"
+															dateParam="startDateTime"
+															dateValue="<%= endCalendar.getTime() %>"
+															disabled="<%= false %>"
+															hourParam='<%= "endDateHour" %>'
+															hourValue="<%= endCalendar.get(Calendar.HOUR) %>"
+															minuteParam='<%= "endDateMinute" %>'
+															minuteValue="<%= endCalendar.get(Calendar.MINUTE) %>"
+															name="endTime"
+														/>
+													</aui:fieldset>
+												</li>
+											</ul>
+
+											<aui:input id="rangeLast" label='<%= LanguageUtil.get(pageContext, "last") + StringPool.TRIPLE_PERIOD %>' name="range" type="radio" value="last" />
+
+											<ul class="hide unstyled" id="<portlet:namespace />rangeLastInputs">
+												<li>
+													<aui:select cssClass="relative-range" label="" name="last">
+														<aui:option label='<%= LanguageUtil.format(pageContext, "x-hours", "12") %>' value="12" />
+														<aui:option label='<%= LanguageUtil.format(pageContext, "x-hours", "24") %>' value="24" />
+														<aui:option label='<%= LanguageUtil.format(pageContext, "x-hours", "48") %>' value="48" />
+														<aui:option label='<%= LanguageUtil.format(pageContext, "x-days", "7") %>' value="168" />
+													</aui:select>
+												</li>
+											</ul>
+										</aui:fieldset>
+									</div>
+
+									<liferay-util:buffer var="selectedLabelsHTML">
+										<span class="selected-labels" id="<portlet:namespace />selectedRange"></span>
+
+										<aui:a cssClass="modify-link" href="javascript:;" id="rangeLink" label="change" method="get" />
+									</liferay-util:buffer>
+
+									<liferay-ui:icon
+										image="calendar"
+										label="<%= true %>"
+										message='<%= LanguageUtil.get(locale, "date-range") + selectedLabelsHTML %>'
+									/>
+								</li>
+
+								<c:if test="<%= (exportModelCount != 0) || (modelDeletionCount != 0) %>">
+									<li class="options">
+										<ul class="portlet-list">
+											<li class="tree-item">
+												<aui:input name="<%= PortletDataHandlerKeys.PORTLET_DATA_CONTROL_DEFAULT %>" type="hidden" value="<%= false %>" />
+
+												<liferay-util:buffer var="badgeHTML">
+													<span class="badge badge-info"><%= exportModelCount > 0 ? exportModelCount : StringPool.BLANK %></span>
+													<span class="badge badge-warning deletions"><%= modelDeletionCount > 0 ? (modelDeletionCount + StringPool.SPACE + LanguageUtil.get(pageContext, "deletions")) : StringPool.BLANK %></span>
+												</liferay-util:buffer>
+
+												<aui:input label='<%= LanguageUtil.get(pageContext, "content") + badgeHTML %>' name="<%= PortletDataHandlerKeys.PORTLET_DATA + StringPool.UNDERLINE + selPortlet.getRootPortletId() %>" type="checkbox" value="<%= true %>" />
+
+												<%
+												PortletDataHandlerControl[] exportControls = portletDataHandler.getExportControls();
+												PortletDataHandlerControl[] metadataControls = portletDataHandler.getExportMetadataControls();
+
+												if (ArrayUtil.isNotEmpty(exportControls) || ArrayUtil.isNotEmpty(metadataControls)) {
+												%>
+
+													<div class="hide" id="<portlet:namespace />content_<%= selPortlet.getRootPortletId() %>">
+														<ul class="lfr-tree unstyled">
+															<li class="tree-item">
+																<aui:fieldset cssClass="portlet-type-data-section" label="content">
+																	<c:if test="<%= exportControls != null %>">
+
+																		<%
+																		request.setAttribute("render_controls.jsp-action", Constants.EXPORT);
+																		request.setAttribute("render_controls.jsp-controls", exportControls);
+																		request.setAttribute("render_controls.jsp-manifestSummary", manifestSummary);
+																		request.setAttribute("render_controls.jsp-portletDisabled", !portletDataHandler.isPublishToLiveByDefault());
+																		%>
+
+																		<aui:field-wrapper label='<%= ArrayUtil.isNotEmpty(metadataControls) ? "content" : StringPool.BLANK %>'>
+																			<ul class="lfr-tree unstyled">
+																				<liferay-util:include page="/html/portlet/layouts_admin/render_controls.jsp" />
+																			</ul>
+																		</aui:field-wrapper>
+																	</c:if>
+
+																	<c:if test="<%= metadataControls != null %>">
+
+																		<%
+																		for (PortletDataHandlerControl metadataControl : metadataControls) {
+																			PortletDataHandlerBoolean control = (PortletDataHandlerBoolean)metadataControl;
+
+																			PortletDataHandlerControl[] childrenControls = control.getChildren();
+
+																			if (ArrayUtil.isNotEmpty(childrenControls)) {
+																				request.setAttribute("render_controls.jsp-controls", childrenControls);
+																			%>
+
+																				<aui:field-wrapper label="content-metadata">
+																					<ul class="lfr-tree unstyled">
+																						<liferay-util:include page="/html/portlet/layouts_admin/render_controls.jsp" />
+																					</ul>
+																				</aui:field-wrapper>
+
+																			<%
+																			}
+																		}
+																		%>
+
+																	</c:if>
+																</aui:fieldset>
+															</li>
+														</ul>
+													</div>
+
+													<ul id="<portlet:namespace />showChangeContent_<%= selPortlet.getRootPortletId() %>">
+														<li>
+															<span class="selected-labels" id="<portlet:namespace />selectedContent_<%= selPortlet.getRootPortletId() %>"></span>
+
+															<%
+															Map<String,Object> data = new HashMap<String,Object>();
+
+															data.put("portletid", selPortlet.getRootPortletId());
+															%>
+
+															<aui:a cssClass="content-link modify-link" data="<%= data %>" href="javascript:;" id='<%= "contentLink_" + selPortlet.getRootPortletId() %>' label="change" method="get" />
+														</li>
+													</ul>
+
+													<aui:script>
+														Liferay.Util.toggleBoxes('<portlet:namespace /><%= PortletDataHandlerKeys.PORTLET_DATA + StringPool.UNDERLINE + selPortlet.getRootPortletId() %>Checkbox', '<portlet:namespace />showChangeContent<%= StringPool.UNDERLINE + selPortlet.getRootPortletId() %>');
+													</aui:script>
+
+												<%
+												}
+												%>
+
+											</li>
+										</ul>
+
+										<ul>
+											<aui:fieldset cssClass="content-options" label="for-each-of-the-selected-content-types,-export-their">
+												<span class="selected-labels" id="<portlet:namespace />selectedContentOptions"></span>
+
+												<aui:a cssClass="modify-link" href="javascript:;" id="contentOptionsLink" label="change" method="get" />
+
+												<div class="hide" id="<portlet:namespace />contentOptions">
+													<ul class="lfr-tree unstyled">
+														<li class="tree-item">
+															<aui:input label="comments" name="<%= PortletDataHandlerKeys.COMMENTS %>" type="checkbox" value="<%= true %>" />
+
+															<aui:input label="ratings" name="<%= PortletDataHandlerKeys.RATINGS %>" type="checkbox" value="<%= true %>" />
+
+															<c:if test="<%= modelDeletionCount != 0 %>">
+
+																<%
+																String deletionsLabel = LanguageUtil.get(pageContext, "deletions") + (modelDeletionCount > 0 ? " (" + modelDeletionCount + ")" : StringPool.BLANK);
+																%>
+
+																<aui:input data-name="<%= deletionsLabel %>" helpMessage="deletions-help" label="<%= deletionsLabel %>" name="<%= PortletDataHandlerKeys.DELETIONS %>" type="checkbox" />
+															</c:if>
+														</li>
+													</ul>
+												</div>
+											</aui:fieldset>
+										</ul>
+									</li>
+								</c:if>
+							</ul>
+						</aui:fieldset>
+					</c:if>
+
+					<aui:fieldset cssClass="options-group" label="permissions">
+						<ul class="lfr-tree unstyled">
+							<li class="tree-item">
+								<aui:input helpMessage="export-import-portlet-permissions-help" label="permissions" name="<%= PortletDataHandlerKeys.PERMISSIONS %>" type="checkbox" />
+
+								<ul id="<portlet:namespace />permissionsUl">
+									<li class="tree-item">
+										<aui:input label="permissions-assigned-to-roles" name="permissionsAssignedToRoles" type="checkbox" value="<%= true %>" />
+									</li>
+								</ul>
+							</li>
+						</ul>
+					</aui:fieldset>
+				</c:if>
+
+				<aui:button-row>
+					<aui:button type="submit" value="export" />
+
+					<aui:button href="<%= currentURL %>" type="cancel" />
+				</aui:button-row>
+			</div>
+		</aui:form>
+	</liferay-ui:section>
+
+	<liferay-ui:section>
+		<div class="process-list" id="<portlet:namespace />exportProcesses">
+			<liferay-util:include page="/html/portlet/portlet_configuration/export_portlet_processes.jsp" />
+		</div>
+	</liferay-ui:section>
+</liferay-ui:tabs>
+
+<aui:script use="liferay-export-import">
+	<liferay-portlet:resourceURL copyCurrentRenderParameters="<%= false %>" var="exportProcessesURL">
+		<portlet:param name="struts_action" value="/portlet_configuration/export_import" />
+		<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.EXPORT %>" />
+		<portlet:param name="<%= SearchContainer.DEFAULT_CUR_PARAM %>" value="<%= ParamUtil.getString(request, SearchContainer.DEFAULT_CUR_PARAM) %>" />
+		<portlet:param name="<%= SearchContainer.DEFAULT_DELTA_PARAM %>" value="<%= ParamUtil.getString(request, SearchContainer.DEFAULT_DELTA_PARAM) %>" />
+		<portlet:param name="groupId" value="<%= String.valueOf(themeDisplay.getScopeGroupId()) %>" />
+		<portlet:param name="portletResource" value="<%= portletResource %>" />
+	</liferay-portlet:resourceURL>
+
+	new Liferay.ExportImport(
+		{
+			commentsNode: '#<%= PortletDataHandlerKeys.COMMENTS %>Checkbox',
+			deletionsNode: '#<%= PortletDataHandlerKeys.DELETIONS %>Checkbox',
+			form: document.<portlet:namespace />fm1,
+			incompleteProcessMessageNode: '#<portlet:namespace />incompleteProcessMessage',
+			namespace: '<portlet:namespace />',
+			processesNode: '#exportProcesses',
+			processesResourceURL: '<%= exportProcessesURL.toString() %>',
+			rangeAllNode: '#rangeAll',
+			rangeDateRangeNode: '#rangeDateRange',
+			rangeLastNode: '#rangeLast',
+			ratingsNode: '#<%= PortletDataHandlerKeys.RATINGS %>Checkbox'
+		}
+	);
+
+	var form = A.one('#<portlet:namespace />fm1');
+
+	form.on(
+		'submit',
+		function(event) {
+			event.preventDefault();
+
+			submitForm(form, form.attr('action'), false);
+		}
+	);
+</aui:script>
+
+<aui:script>
+	Liferay.Util.toggleBoxes('<portlet:namespace /><%= PortletDataHandlerKeys.PERMISSIONS %>Checkbox', '<portlet:namespace />permissionsUl');
+
+	Liferay.Util.toggleRadio('<portlet:namespace />rangeAll', '', ['<portlet:namespace />startEndDate', '<portlet:namespace />rangeLastInputs']);
+	Liferay.Util.toggleRadio('<portlet:namespace />rangeDateRange', '<portlet:namespace />startEndDate', '<portlet:namespace />rangeLastInputs');
+	Liferay.Util.toggleRadio('<portlet:namespace />rangeLast', '<portlet:namespace />rangeLastInputs', ['<portlet:namespace />startEndDate']);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/export_portlet_processes.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/export_portlet_processes.jsp
new file mode 100644
index 0000000..c566b5a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/export_portlet_processes.jsp
@@ -0,0 +1,165 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portlet_configuration/init.jsp" %>
+
+<%
+long groupId = ParamUtil.getLong(request, "groupId", themeDisplay.getScopeGroupId());
+
+PortletURL portletURL = currentURLObj;
+
+portletURL.setParameter("tabs3", "current-and-previous");
+
+String orderByCol = ParamUtil.getString(request, "orderByCol");
+String orderByType = ParamUtil.getString(request, "orderByType");
+
+if (Validator.isNotNull(orderByCol) && Validator.isNotNull(orderByType)) {
+	portalPreferences.setValue(PortletKeys.BACKGROUND_TASK, "entries-order-by-col", orderByCol);
+	portalPreferences.setValue(PortletKeys.BACKGROUND_TASK, "entries-order-by-type", orderByType);
+}
+else {
+	orderByCol = portalPreferences.getValue(PortletKeys.BACKGROUND_TASK, "entries-order-by-col", "create-date");
+	orderByType = portalPreferences.getValue(PortletKeys.BACKGROUND_TASK, "entries-order-by-type", "desc");
+}
+
+OrderByComparator orderByComparator = BackgroundTaskComparatorFactoryUtil.getBackgroundTaskOrderByComparator(orderByCol, orderByType);
+%>
+
+<liferay-ui:search-container
+	emptyResultsMessage="no-export-processes-were-found"
+	iteratorURL="<%= portletURL %>"
+	orderByCol="<%= orderByCol %>"
+	orderByComparator="<%= orderByComparator %>"
+	orderByType="<%= orderByType %>"
+	total="<%= BackgroundTaskLocalServiceUtil.getBackgroundTasksCount(groupId, selPortlet.getPortletId(), PortletExportBackgroundTaskExecutor.class.getName()) %>"
+>
+	<liferay-ui:search-container-results
+		results="<%= BackgroundTaskLocalServiceUtil.getBackgroundTasks(groupId, selPortlet.getPortletId(), PortletExportBackgroundTaskExecutor.class.getName(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator()) %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.BackgroundTask"
+		keyProperty="backgroundTaskId"
+		modelVar="backgroundTask"
+	>
+		<liferay-ui:search-container-column-text
+			name="user-name"
+			value="<%= HtmlUtil.escape(backgroundTask.getUserName()) %>"
+		/>
+
+		<liferay-ui:search-container-column-jsp
+			cssClass="background-task-status-column"
+			name="status"
+			path="/html/portlet/layouts_admin/publish_process_message.jsp"
+		/>
+
+		<liferay-ui:search-container-column-date
+			name="create-date"
+			orderable="<%= true %>"
+			value="<%= backgroundTask.getCreateDate() %>"
+		/>
+
+		<liferay-ui:search-container-column-date
+			name="completion-date"
+			orderable="<%= true %>"
+			value="<%= backgroundTask.getCompletionDate() %>"
+		/>
+
+		<liferay-ui:search-container-column-text
+			name="download"
+		>
+
+			<%
+			List<FileEntry> attachmentsFileEntries = backgroundTask.getAttachmentsFileEntries();
+			%>
+
+			<c:choose>
+				<c:when test="<%= !attachmentsFileEntries.isEmpty() %>">
+
+					<%
+					for (FileEntry fileEntry : attachmentsFileEntries) {
+					%>
+
+						<%
+						StringBundler sb = new StringBundler(4);
+
+						sb.append(fileEntry.getTitle());
+						sb.append(StringPool.OPEN_PARENTHESIS);
+						sb.append(TextFormatter.formatStorageSize(fileEntry.getSize(), locale));
+						sb.append(StringPool.CLOSE_PARENTHESIS);
+						%>
+
+						<liferay-ui:icon
+							image="download"
+							label="<%= true %>"
+							message="<%= sb.toString() %>"
+							url="<%= PortletFileRepositoryUtil.getPortletFileEntryURL(themeDisplay, fileEntry, StringPool.BLANK) %>"
+						/>
+
+					<%
+					}
+					%>
+
+				</c:when>
+				<c:otherwise>
+
+					<%
+					Map taskContextMap = backgroundTask.getTaskContextMap();
+					%>
+
+					<liferay-ui:icon
+						image="download"
+						label="<%= true %>"
+						message='<%= HtmlUtil.escape(MapUtil.getString(taskContextMap, "fileName")) %>'
+					/>
+				</c:otherwise>
+			</c:choose>
+
+		</liferay-ui:search-container-column-text>
+
+		<liferay-ui:search-container-column-text>
+			<c:if test="<%= !backgroundTask.isInProgress() %>">
+				<portlet:actionURL var="deleteBackgroundTaskURL">
+					<portlet:param name="struts_action" value="/group_pages/delete_background_task" />
+					<portlet:param name="redirect" value="<%= portletURL.toString() %>" />
+					<portlet:param name="backgroundTaskId" value="<%= String.valueOf(backgroundTask.getBackgroundTaskId()) %>" />
+				</portlet:actionURL>
+
+				<%
+				Date completionDate = backgroundTask.getCompletionDate();
+				%>
+
+				<liferay-ui:icon-delete
+					label="true"
+					message='<%= ((completionDate != null) && completionDate.before(new Date())) ? "clear" : "cancel" %>'
+					url="<%= deleteBackgroundTaskURL %>"
+				/>
+			</c:if>
+		</liferay-ui:search-container-column-text>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
+
+<%
+int incompleteBackgroundTaskCount = BackgroundTaskLocalServiceUtil.getBackgroundTasksCount(groupId, selPortlet.getPortletId(), PortletExportBackgroundTaskExecutor.class.getName(), false);
+%>
+
+<div class="hide incomplete-process-message">
+	<liferay-util:include page="/html/portlet/layouts_admin/incomplete_processes_message.jsp">
+		<liferay-util:param name="incompleteBackgroundTaskCount" value="<%= String.valueOf(incompleteBackgroundTaskCount) %>" />
+	</liferay-util:include>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/import_portlet.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/import_portlet.jsp
new file mode 100644
index 0000000..d0c42f0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/import_portlet.jsp
@@ -0,0 +1,80 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portlet_configuration/init.jsp" %>
+
+<%
+boolean validate = ParamUtil.getBoolean(request, "validate", true);
+
+String[] tempFileEntryNames = LayoutServiceUtil.getTempFileEntryNames(scopeGroupId, ExportImportHelper.TEMP_FOLDER_NAME + portletDisplay.getId());
+%>
+
+<liferay-ui:tabs
+	names="new-import-process,current-and-previous"
+	param="tabs3"
+	refresh="<%= false %>"
+>
+	<liferay-ui:section>
+		<div id="<portlet:namespace />exportImportOptions">
+
+			<%
+			int incompleteBackgroundTaskCount = BackgroundTaskLocalServiceUtil.getBackgroundTasksCount(themeDisplay.getScopeGroupId(), selPortlet.getPortletId(), PortletImportBackgroundTaskExecutor.class.getName(), false);
+			%>
+
+			<div class="<%= (incompleteBackgroundTaskCount == 0) ? "hide" : "in-progress" %>" id="<portlet:namespace />incompleteProcessMessage">
+				<liferay-util:include page="/html/portlet/layouts_admin/incomplete_processes_message.jsp">
+					<liferay-util:param name="incompleteBackgroundTaskCount" value="<%= String.valueOf(incompleteBackgroundTaskCount) %>" />
+				</liferay-util:include>
+			</div>
+
+			<c:choose>
+				<c:when test="<%= (tempFileEntryNames.length > 0) && !validate %>">
+					<liferay-util:include page="/html/portlet/portlet_configuration/import_portlet_resources.jsp" />
+				</c:when>
+				<c:otherwise>
+					<liferay-util:include page="/html/portlet/portlet_configuration/import_portlet_validation.jsp" />
+				</c:otherwise>
+			</c:choose>
+		</div>
+	</liferay-ui:section>
+
+	<liferay-ui:section>
+		<div class="process-list" id="<portlet:namespace />importProcesses">
+			<liferay-util:include page="/html/portlet/portlet_configuration/import_portlet_processes.jsp" />
+		</div>
+	</liferay-ui:section>
+</liferay-ui:tabs>
+
+<aui:script use="liferay-export-import">
+	<liferay-portlet:resourceURL copyCurrentRenderParameters="<%= false %>" var="importProcessesURL">
+		<portlet:param name="struts_action" value="/portlet_configuration/export_import" />
+		<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.IMPORT %>" />
+		<portlet:param name="<%= SearchContainer.DEFAULT_CUR_PARAM %>" value="<%= ParamUtil.getString(request, SearchContainer.DEFAULT_CUR_PARAM) %>" />
+		<portlet:param name="<%= SearchContainer.DEFAULT_DELTA_PARAM %>" value="<%= ParamUtil.getString(request, SearchContainer.DEFAULT_DELTA_PARAM) %>" />
+		<portlet:param name="groupId" value="<%= String.valueOf(themeDisplay.getScopeGroupId()) %>" />
+		<portlet:param name="portletResource" value="<%= portletResource %>" />
+	</liferay-portlet:resourceURL>
+
+	new Liferay.ExportImport(
+		{
+			form: document.<portlet:namespace />fm1,
+			incompleteProcessMessageNode: '#<portlet:namespace />incompleteProcessMessage',
+			namespace: '<portlet:namespace />',
+			processesNode: '#importProcesses',
+			processesResourceURL: '<%= importProcessesURL.toString() %>'
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/import_portlet_processes.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/import_portlet_processes.jsp
new file mode 100644
index 0000000..a9cbc95
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/import_portlet_processes.jsp
@@ -0,0 +1,113 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portlet_configuration/init.jsp" %>
+
+<%
+long groupId = ParamUtil.getLong(request, "groupId", themeDisplay.getScopeGroupId());
+
+PortletURL portletURL = currentURLObj;
+
+portletURL.setParameter("tabs3", "current-and-previous");
+
+String orderByCol = ParamUtil.getString(request, "orderByCol");
+String orderByType = ParamUtil.getString(request, "orderByType");
+
+if (Validator.isNotNull(orderByCol) && Validator.isNotNull(orderByType)) {
+	portalPreferences.setValue(PortletKeys.BACKGROUND_TASK, "entries-order-by-col", orderByCol);
+	portalPreferences.setValue(PortletKeys.BACKGROUND_TASK, "entries-order-by-type", orderByType);
+}
+else {
+	orderByCol = portalPreferences.getValue(PortletKeys.BACKGROUND_TASK, "entries-order-by-col", "create-date");
+	orderByType = portalPreferences.getValue(PortletKeys.BACKGROUND_TASK, "entries-order-by-type", "desc");
+}
+
+OrderByComparator orderByComparator = BackgroundTaskComparatorFactoryUtil.getBackgroundTaskOrderByComparator(orderByCol, orderByType);
+%>
+
+<liferay-ui:search-container
+	emptyResultsMessage="no-import-processes-were-found"
+	iteratorURL="<%= portletURL %>"
+	orderByCol="<%= orderByCol %>"
+	orderByComparator="<%= orderByComparator %>"
+	orderByType="<%= orderByType %>"
+	total="<%= BackgroundTaskLocalServiceUtil.getBackgroundTasksCount(groupId, selPortlet.getPortletId(), PortletImportBackgroundTaskExecutor.class.getName()) %>"
+>
+	<liferay-ui:search-container-results
+		results="<%= BackgroundTaskLocalServiceUtil.getBackgroundTasks(groupId, selPortlet.getPortletId(), PortletImportBackgroundTaskExecutor.class.getName(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator()) %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.BackgroundTask"
+		keyProperty="backgroundTaskId"
+		modelVar="backgroundTask"
+	>
+		<liferay-ui:search-container-column-text
+			name="user-name"
+			value="<%= HtmlUtil.escape(backgroundTask.getUserName()) %>"
+		/>
+
+		<liferay-ui:search-container-column-jsp
+			cssClass="background-task-status-column"
+			name="status"
+			path="/html/portlet/layouts_admin/publish_process_message.jsp"
+		/>
+
+		<liferay-ui:search-container-column-date
+			name="create-date"
+			orderable="<%= true %>"
+			value="<%= backgroundTask.getCreateDate() %>"
+		/>
+
+		<liferay-ui:search-container-column-date
+			name="completion-date"
+			orderable="<%= true %>"
+			value="<%= backgroundTask.getCompletionDate() %>"
+		/>
+
+		<liferay-ui:search-container-column-text>
+			<c:if test="<%= !backgroundTask.isInProgress() %>">
+				<portlet:actionURL var="deleteBackgroundTaskURL">
+					<portlet:param name="struts_action" value="/group_pages/delete_background_task" />
+					<portlet:param name="redirect" value="<%= portletURL.toString() %>" />
+					<portlet:param name="backgroundTaskId" value="<%= String.valueOf(backgroundTask.getBackgroundTaskId()) %>" />
+				</portlet:actionURL>
+
+				<%
+				Date completionDate = backgroundTask.getCompletionDate();
+				%>
+
+				<liferay-ui:icon-delete
+					label="true"
+					message='<%= ((completionDate != null) && completionDate.before(new Date())) ? "clear" : "cancel" %>'
+					url="<%= deleteBackgroundTaskURL %>"
+				/>
+			</c:if>
+		</liferay-ui:search-container-column-text>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
+
+<%
+int incompleteBackgroundTaskCount = BackgroundTaskLocalServiceUtil.getBackgroundTasksCount(groupId, selPortlet.getPortletId(), PortletImportBackgroundTaskExecutor.class.getName(), false);
+%>
+
+<div class="hide incomplete-process-message">
+	<liferay-util:include page="/html/portlet/layouts_admin/incomplete_processes_message.jsp">
+		<liferay-util:param name="incompleteBackgroundTaskCount" value="<%= String.valueOf(incompleteBackgroundTaskCount) %>" />
+	</liferay-util:include>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/import_portlet_resources.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/import_portlet_resources.jsp
new file mode 100644
index 0000000..3e29096
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/import_portlet_resources.jsp
@@ -0,0 +1,379 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portlet_configuration/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+Layout exportableLayout = ExportImportHelperUtil.getExportableLayout(themeDisplay);
+
+long groupId = ParamUtil.getLong(request, "groupId", scopeGroupId);
+
+FileEntry fileEntry = ExportImportHelperUtil.getTempFileEntry(groupId, themeDisplay.getUserId(), ExportImportHelper.TEMP_FOLDER_NAME + selPortlet.getPortletId());
+
+ManifestSummary manifestSummary = ExportImportHelperUtil.getManifestSummary(themeDisplay.getUserId(), groupId, new HashMap<String, String[]>(), fileEntry);
+%>
+
+<portlet:actionURL var="importPortletActionURL">
+	<portlet:param name="struts_action" value="/portlet_configuration/export_import" />
+</portlet:actionURL>
+
+<portlet:renderURL var="importPortletRenderURL">
+	<portlet:param name="struts_action" value="/portlet_configuration/export_import" />
+	<portlet:param name="tabs2" value="import" />
+	<portlet:param name="tabs3" value="current-and-previous" />
+	<portlet:param name="redirect" value="<%= redirect %>" />
+	<portlet:param name="portletResource" value="<%= portletResource %>" />
+</portlet:renderURL>
+
+<aui:form action="<%= importPortletActionURL %>" cssClass="lfr-export-dialog" method="post" name="fm1">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.IMPORT %>" />
+	<aui:input name="tabs1" type="hidden" value="export_import" />
+	<aui:input name="tabs2" type="hidden" value="import" />
+	<aui:input name="redirect" type="hidden" value="<%= importPortletRenderURL %>" />
+	<aui:input name="plid" type="hidden" value="<%= exportableLayout.getPlid() %>" />
+	<aui:input name="groupId" type="hidden" value="<%= groupId %>" />
+	<aui:input name="portletResource" type="hidden" value="<%= portletResource %>" />
+
+	<div class="export-dialog-tree">
+		<div id="<portlet:namespace />importConfiguration">
+			<aui:fieldset cssClass="options-group" label="file">
+				<dl class="import-file-details options">
+					<dt>
+						<liferay-ui:message key="name" />
+					</dt>
+					<dd>
+						<%= fileEntry.getTitle() %>
+					</dd>
+					<dt>
+						<liferay-ui:message key="export" />
+					</dt>
+					<dd>
+
+						<%
+						Date exportDate = manifestSummary.getExportDate();
+						%>
+
+						<span onmouseover="Liferay.Portal.ToolTip.show(this, '<%= dateFormatDateTime.format(exportDate) %>')">
+							<liferay-ui:message arguments="<%= LanguageUtil.getTimeDescription(pageContext, System.currentTimeMillis() - exportDate.getTime(), true) %>" key="x-ago" />
+						</span>
+					</dd>
+					<dt>
+						<liferay-ui:message key="author" />
+					</dt>
+					<dd>
+						<%= fileEntry.getUserName() %>
+					</dd>
+					<dt>
+						<liferay-ui:message key="size" />
+					</dt>
+					<dd>
+						<%= fileEntry.getSize() / 1024 %>k
+					</dd>
+				</dl>
+			</aui:fieldset>
+
+			<%
+			PortletDataHandler portletDataHandler = selPortlet.getPortletDataHandlerInstance();
+
+			PortletDataHandlerControl[] configurationControls = portletDataHandler.getImportConfigurationControls(selPortlet, manifestSummary);
+			%>
+
+			<c:if test="<%= ArrayUtil.isNotEmpty(configurationControls) %>">
+				<aui:fieldset cssClass="options-group" label="application">
+					<ul class="lfr-tree select-options unstyled">
+						<li class="options">
+							<ul class="portlet-list">
+								<li class="tree-item">
+									<aui:input name="<%= PortletDataHandlerKeys.PORTLET_CONFIGURATION %>" type="hidden" value="<%= true %>" />
+
+									<aui:input label="configuration" name="<%= PortletDataHandlerKeys.PORTLET_CONFIGURATION + StringPool.UNDERLINE + selPortlet.getRootPortletId() %>" type="checkbox" value="<%= true %>" />
+
+									<div class="hide" id="<portlet:namespace />configuration_<%= selPortlet.getRootPortletId() %>">
+										<aui:fieldset cssClass="portlet-type-data-section" label="configuration">
+											<ul class="lfr-tree unstyled">
+
+												<%
+												request.setAttribute("render_controls.jsp-action", Constants.IMPORT);
+												request.setAttribute("render_controls.jsp-controls", configurationControls);
+												request.setAttribute("render_controls.jsp-portletId", selPortlet.getRootPortletId());
+												%>
+
+												<liferay-util:include page="/html/portlet/layouts_admin/render_controls.jsp" />
+											</ul>
+										</aui:fieldset>
+									</div>
+
+									<ul class="hide" id="<portlet:namespace />showChangeConfiguration_<%= selPortlet.getRootPortletId() %>">
+										<li>
+											<span class="selected-labels" id="<portlet:namespace />selectedConfiguration_<%= selPortlet.getRootPortletId() %>"></span>
+
+											<%
+											Map<String,Object> data = new HashMap<String,Object>();
+
+											data.put("portletid", selPortlet.getRootPortletId());
+											%>
+
+											<aui:a cssClass="configuration-link modify-link" data="<%= data %>" href="javascript:;" label="change" method="get" />
+										</li>
+									</ul>
+
+									<aui:script>
+										Liferay.Util.toggleBoxes('<portlet:namespace /><%= PortletDataHandlerKeys.PORTLET_CONFIGURATION + StringPool.UNDERLINE + selPortlet.getRootPortletId() %>Checkbox', '<portlet:namespace />showChangeConfiguration<%= StringPool.UNDERLINE + selPortlet.getRootPortletId() %>');
+									</aui:script>
+								</li>
+							</ul>
+						</li>
+					</ul>
+				</aui:fieldset>
+			</c:if>
+
+			<%
+			long importModelCount = portletDataHandler.getExportModelCount(manifestSummary);
+
+			long modelDeletionCount = manifestSummary.getModelDeletionCount(portletDataHandler.getDeletionSystemEventStagedModelTypes());
+			%>
+
+			<c:if test="<%= !portletDataHandler.isDisplayPortlet() && ((importModelCount != 0) || (modelDeletionCount != 0)) %>">
+				<aui:fieldset cssClass="options-group" label="content">
+					<ul class="lfr-tree select-options unstyled">
+						<li class="options">
+							<ul class="portlet-list">
+								<li class="tree-item">
+									<aui:input name="<%= PortletDataHandlerKeys.PORTLET_DATA_CONTROL_DEFAULT %>" type="hidden" value="<%= false %>" />
+
+									<liferay-util:buffer var="badgeHTML">
+										<span class="badge badge-info"><%= importModelCount > 0 ? importModelCount : StringPool.BLANK %></span>
+										<span class="badge badge-warning deletions"><%= modelDeletionCount > 0 ? (modelDeletionCount + StringPool.SPACE + LanguageUtil.get(pageContext, "deletions")) : StringPool.BLANK %></span>
+									</liferay-util:buffer>
+
+									<aui:input label='<%= LanguageUtil.get(pageContext, "content") + badgeHTML %>' name="<%= PortletDataHandlerKeys.PORTLET_DATA + StringPool.UNDERLINE + selPortlet.getRootPortletId() %>" type="checkbox" value="<%= true %>" />
+
+									<%
+									PortletDataHandlerControl[] importControls = portletDataHandler.getImportControls();
+									PortletDataHandlerControl[] metadataControls = portletDataHandler.getImportMetadataControls();
+
+									if (ArrayUtil.isNotEmpty(importControls) || ArrayUtil.isNotEmpty(metadataControls)) {
+									%>
+
+										<div class="hide" id="<portlet:namespace />content_<%= selPortlet.getRootPortletId() %>">
+											<ul class="lfr-tree unstyled">
+												<li class="tree-item">
+													<aui:fieldset cssClass="portlet-type-data-section" label="content">
+														<aui:field-wrapper label='<%= ArrayUtil.isNotEmpty(metadataControls) ? "content" : StringPool.BLANK %>'>
+															<ul class="lfr-tree unstyled">
+																<li class="tree-item">
+																	<aui:input data-name='<%= LanguageUtil.get(locale, "delete-portlet-data") %>' label="delete-portlet-data-before-importing" name="<%= PortletDataHandlerKeys.DELETE_PORTLET_DATA %>" type="checkbox" />
+
+																	<div id="<portlet:namespace />showDeleteContentWarning">
+																		<div class="alert alert-block">
+																			<liferay-ui:message key="delete-content-before-importing-warning" />
+
+																			<liferay-ui:message key="delete-content-before-importing-suggestion" />
+																		</div>
+																	</div>
+																</li>
+															</ul>
+
+															<aui:script>
+																Liferay.Util.toggleBoxes('<portlet:namespace /><%= PortletDataHandlerKeys.DELETE_PORTLET_DATA %>Checkbox', '<portlet:namespace />showDeleteContentWarning');
+															</aui:script>
+
+															<c:if test="<%= importControls != null %>">
+
+																<%
+																request.setAttribute("render_controls.jsp-action", Constants.IMPORT);
+																request.setAttribute("render_controls.jsp-controls", importControls);
+																request.setAttribute("render_controls.jsp-manifestSummary", manifestSummary);
+																request.setAttribute("render_controls.jsp-portletDisabled", !portletDataHandler.isPublishToLiveByDefault());
+																%>
+
+																<ul class="lfr-tree unstyled">
+																	<liferay-util:include page="/html/portlet/layouts_admin/render_controls.jsp" />
+																</ul>
+															</c:if>
+														</aui:field-wrapper>
+
+														<c:if test="<%= metadataControls != null %>">
+
+															<%
+															for (PortletDataHandlerControl metadataControl : metadataControls) {
+																PortletDataHandlerBoolean control = (PortletDataHandlerBoolean)metadataControl;
+
+																PortletDataHandlerControl[] childrenControls = control.getChildren();
+
+																if (ArrayUtil.isNotEmpty(childrenControls)) {
+																	request.setAttribute("render_controls.jsp-controls", childrenControls);
+																%>
+
+																	<aui:field-wrapper label="content-metadata">
+																		<ul class="lfr-tree unstyled">
+																			<liferay-util:include page="/html/portlet/layouts_admin/render_controls.jsp" />
+																		</ul>
+																	</aui:field-wrapper>
+
+																<%
+																}
+															}
+															%>
+
+														</c:if>
+													</aui:fieldset>
+												</li>
+											</ul>
+										</div>
+
+										<ul id="<portlet:namespace />showChangeContent_<%= selPortlet.getRootPortletId() %>">
+											<li class="tree-item">
+												<span class="selected-labels" id="<portlet:namespace />selectedContent_<%= selPortlet.getRootPortletId() %>"></span>
+
+												<%
+												Map<String,Object> data = new HashMap<String,Object>();
+
+												data.put("portletid", selPortlet.getRootPortletId());
+												%>
+
+												<aui:a cssClass="content-link modify-link" data="<%= data %>" href="javascript:;" id='<%= "contentLink_" + selPortlet.getRootPortletId() %>' label="change" method="get" />
+											</li>
+										</ul>
+
+										<aui:script>
+											Liferay.Util.toggleBoxes('<portlet:namespace /><%= PortletDataHandlerKeys.PORTLET_DATA + StringPool.UNDERLINE + selPortlet.getRootPortletId() %>Checkbox', '<portlet:namespace />showChangeContent<%= StringPool.UNDERLINE + selPortlet.getRootPortletId() %>');
+										</aui:script>
+
+									<%
+									}
+									%>
+
+								</li>
+							</ul>
+
+							<ul>
+								<aui:fieldset cssClass="comments-and-ratings" label="for-each-of-the-selected-content-types,-import-their">
+									<span class="selected-labels" id="<portlet:namespace />selectedContentOptions"></span>
+
+									<aui:a cssClass="modify-link" href="javascript:;" id="contentOptionsLink" label="change" method="get" />
+
+									<div class="hide" id="<portlet:namespace />contentOptions">
+										<ul class="lfr-tree unstyled">
+											<li class="tree-item">
+												<aui:input label="comments" name="<%= PortletDataHandlerKeys.COMMENTS %>" type="checkbox" value="<%= true %>" />
+
+												<aui:input label="ratings" name="<%= PortletDataHandlerKeys.RATINGS %>" type="checkbox" value="<%= true %>" />
+
+												<c:if test="<%= modelDeletionCount != 0 %>">
+
+													<%
+													String deletionsLabel = LanguageUtil.get(pageContext, "deletions") + (modelDeletionCount > 0 ? " (" + modelDeletionCount + ")" : StringPool.BLANK);
+													%>
+
+													<aui:input data-name="<%= deletionsLabel %>" helpMessage="deletions-help" label="<%= deletionsLabel %>" name="<%= PortletDataHandlerKeys.DELETIONS %>" type="checkbox" />
+												</c:if>
+											</li>
+										</ul>
+									</div>
+								</aui:fieldset>
+							</ul>
+						</li>
+					</ul>
+				</aui:fieldset>
+
+				<aui:fieldset cssClass="options-group" label="permissions">
+					<ul class="lfr-tree unstyled">
+						<li class="tree-item">
+							<aui:input helpMessage="export-import-portlet-permissions-help" label="permissions" name="<%= PortletDataHandlerKeys.PERMISSIONS %>" type="checkbox" />
+
+							<ul id="<portlet:namespace />permissionsUl">
+								<li class="tree-item">
+									<aui:input label="permissions-assigned-to-roles" name="permissionsAssignedToRoles" type="checkbox" value="<%= true %>" />
+								</li>
+							</ul>
+						</li>
+					</ul>
+				</aui:fieldset>
+			</c:if>
+
+			<portlet:renderURL var="importPortletURL">
+				<portlet:param name="struts_action" value="/portlet_configuration/export_import" />
+				<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.VALIDATE %>" />
+				<portlet:param name="tabs2" value="import" />
+				<portlet:param name="portletResource" value="<%= String.valueOf(portletResource) %>" />
+			</portlet:renderURL>
+
+			<aui:button href="<%= importPortletURL %>" name="back1" value="back" />
+
+			<aui:button name="continue" primary="<%= true %>" value="continue" />
+		</div>
+
+		<div class="hide" id="<portlet:namespace />importStrategy">
+			<aui:fieldset cssClass="options-group" label="update-data">
+				<aui:input checked="<%= true %>" data-name='<%= LanguageUtil.get(locale, "mirror") %>' helpMessage="import-data-strategy-mirror-help" id="mirror" label="mirror" name="<%= PortletDataHandlerKeys.DATA_STRATEGY %>" type="radio" value="<%= PortletDataHandlerKeys.DATA_STRATEGY_MIRROR %>" />
+
+				<aui:input data-name='<%= LanguageUtil.get(locale, "mirror-with-overwriting") %>' helpMessage="import-data-strategy-mirror-with-overwriting-help" id="mirrorWithOverwriting" label="mirror-with-overwriting" name="<%= PortletDataHandlerKeys.DATA_STRATEGY %>" type="radio" value="<%= PortletDataHandlerKeys.DATA_STRATEGY_MIRROR_OVERWRITE %>" />
+
+				<aui:input data-name='<%= LanguageUtil.get(locale, "copy-as-new") %>' disabled="<%= !portletDataHandler.isSupportsDataStrategyCopyAsNew() %>" helpMessage='<%= portletDataHandler.isSupportsDataStrategyCopyAsNew() ? "import-data-strategy-copy-as-new-help" : "not-supported" %>' id="copyAsNew" label="copy-as-new" name="<%= PortletDataHandlerKeys.DATA_STRATEGY %>" type="radio" value="<%= PortletDataHandlerKeys.DATA_STRATEGY_COPY_AS_NEW %>" />
+			</aui:fieldset>
+
+			<aui:fieldset cssClass="options-group" label="authorship-of-the-content">
+				<aui:input checked="<%= true %>" data-name='<%= LanguageUtil.get(locale, "use-the-original-author") %>' helpMessage="use-the-original-author-help"  id="currentUserId" label="use-the-original-author" name="<%= PortletDataHandlerKeys.USER_ID_STRATEGY %>" type="radio" value="<%= UserIdStrategy.CURRENT_USER_ID %>" />
+
+				<aui:input data-name='<%= LanguageUtil.get(locale, "always-use-my-user-id") %>' helpMessage="use-the-current-user-as-author-help" id="alwaysCurrentUserId" label="use-the-current-user-as-author" name="<%= PortletDataHandlerKeys.USER_ID_STRATEGY %>" type="radio" value="<%= UserIdStrategy.ALWAYS_CURRENT_USER_ID %>" />
+			</aui:fieldset>
+
+			<aui:button-row>
+				<aui:button name="back" value="back" />
+
+				<aui:button type="submit" value="import" />
+			</aui:button-row>
+		</div>
+	</aui:form>
+</div>
+
+<aui:script>
+	Liferay.Util.toggleBoxes('<portlet:namespace /><%= PortletDataHandlerKeys.PERMISSIONS %>Checkbox', '<portlet:namespace />permissionsUl');
+</aui:script>
+
+<aui:script use="aui-base">
+	A.one('#<portlet:namespace />continue').on(
+		'click',
+		function() {
+			A.one('#<portlet:namespace />importConfiguration').hide()
+			A.one('#<portlet:namespace />importStrategy').show();
+		}
+	);
+
+	A.one('#<portlet:namespace />back').on(
+		'click',
+		function() {
+			A.one('#<portlet:namespace />importConfiguration').show()
+			A.one('#<portlet:namespace />importStrategy').hide();
+		}
+	);
+</aui:script>
+
+<aui:script use="liferay-export-import">
+	new Liferay.ExportImport(
+		{
+			commentsNode: '#<%= PortletDataHandlerKeys.COMMENTS %>Checkbox',
+			deletePortletDataNode: '#<%= PortletDataHandlerKeys.DELETE_PORTLET_DATA %>Checkbox',
+			deletionsNode: '#<%= PortletDataHandlerKeys.DELETIONS %>Checkbox',
+			form: document.<portlet:namespace />fm1,
+			namespace: '<portlet:namespace />',
+			ratingsNode: '#<%= PortletDataHandlerKeys.RATINGS %>Checkbox'
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/import_portlet_validation.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/import_portlet_validation.jsp
new file mode 100644
index 0000000..137fdc9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/import_portlet_validation.jsp
@@ -0,0 +1,128 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portlet_configuration/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+Layout exportableLayout = ExportImportHelperUtil.getExportableLayout(themeDisplay);
+%>
+
+<aui:form cssClass="lfr-export-dialog" method="post" name="fm1">
+	<div class="lfr-dynamic-uploader">
+		<div class="lfr-upload-container" id="<portlet:namespace />fileUpload"></div>
+	</div>
+
+	<%
+	FileEntry fileEntry = ExportImportHelperUtil.getTempFileEntry(scopeGroupId, themeDisplay.getUserId(), ExportImportHelper.TEMP_FOLDER_NAME + selPortlet.getPortletId());
+	%>
+
+	<aui:button-row>
+		<aui:button cssClass='<%= fileEntry == null ? "hide" : StringPool.BLANK %>' name="continueButton" type="submit" value="continue" />
+	</aui:button-row>
+
+	<%
+	Date expirationDate = new Date(System.currentTimeMillis() + PropsValues.SESSION_TIMEOUT * Time.MINUTE);
+
+	Ticket ticket = TicketLocalServiceUtil.addTicket(user.getCompanyId(), User.class.getName(), user.getUserId(), TicketConstants.TYPE_IMPERSONATE, null, expirationDate, new ServiceContext());
+	%>
+
+	<aui:script use="liferay-upload">
+		var liferayUpload = new Liferay.Upload(
+			{
+				boundingBox: '#<portlet:namespace />fileUpload',
+				deleteFile: '<liferay-portlet:actionURL doAsUserId="<%= user.getUserId() %>"><portlet:param name="struts_action" value="/portlet_configuration/export_import" /><portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE_TEMP %>" /><portlet:param name="redirect" value="<%= redirect %>" /><portlet:param name="portletResource" value="<%= portletResource %>" /></liferay-portlet:actionURL>&ticketKey=<%= ticket.getKey() %><liferay-ui:input-permissions-params modelName="<%= Group.class.getName() %>" />',
+				fileDescription: '<%= StringUtil.merge(PrefsPropsUtil.getStringArray(PropsKeys.DL_FILE_EXTENSIONS, StringPool.COMMA)) %>',
+				maxFileSize: '<%= PrefsPropsUtil.getLong(PropsKeys.UPLOAD_SERVLET_REQUEST_IMPL_MAX_SIZE) %> B',
+				metadataContainer: '#<portlet:namespace />commonFileMetadataContainer',
+				metadataExplanationContainer: '#<portlet:namespace />metadataExplanationContainer',
+				multipleFiles: false,
+				namespace: '<portlet:namespace />',
+				'strings.dropFileText': '<liferay-ui:message key="drop-a-lar-file-here-to-import" />',
+				'strings.fileCannotBeSavedText': '<liferay-ui:message key="the-file-x-cannot-be-imported" />',
+				'strings.pendingFileText': '<liferay-ui:message key="this-file-was-previously-uploaded-but-not-actually-imported" />',
+				'strings.uploadsCompleteText': '<liferay-ui:message key="the-file-is-ready-to-be-imported" />',
+				tempFileURL: {
+					method: Liferay.Service.bind('/layout/get-temp-file-entry-names'),
+					params: {
+						groupId: <%= scopeGroupId %>,
+						tempFolderName: '<%= HtmlUtil.escapeJS(ExportImportHelper.TEMP_FOLDER_NAME + selPortlet.getPortletId()) %>'
+					}
+				},
+				uploadFile: '<liferay-portlet:actionURL doAsUserId="<%= user.getUserId() %>"><portlet:param name="struts_action" value="/portlet_configuration/export_import" /><portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ADD_TEMP %>" /><portlet:param name="redirect" value="<%= redirect %>" /><portlet:param name="plid" value="<%= String.valueOf(exportableLayout.getPlid()) %>" /><portlet:param name="groupId" value="<%= String.valueOf(themeDisplay.getScopeGroupId()) %>" /><portlet:param name="portletResource" value="<%= portletResource %>" /></liferay-portlet:actionURL>&ticketKey=<%= ticket.getKey() %><liferay-ui:input-permissions-params modelName="<%= Group.class.getName() %>" />'
+			}
+		);
+
+		var continueButton = A.one('#<portlet:namespace />continueButton');
+
+		liferayUpload._uploader.on(
+			'alluploadscomplete',
+			function(event) {
+				toggleContinueButton();
+			}
+		);
+
+		Liferay.on(
+			'tempFileRemoved',
+			function(event) {
+				toggleContinueButton();
+			}
+		);
+
+		function toggleContinueButton() {
+			var uploadedFiles = liferayUpload._fileListContent.all('.upload-file.upload-complete');
+
+			if (uploadedFiles.size() == 1) {
+				continueButton.show();
+			}
+			else {
+				continueButton.hide();
+			}
+		}
+	</aui:script>
+</aui:form>
+
+<aui:script use="aui-base,aui-io-plugin-deprecated,aui-loading-mask-deprecated">
+	var form = A.one('#<portlet:namespace />fm1');
+
+	form.on(
+		'submit',
+		function(event) {
+			event.halt();
+
+			<liferay-portlet:resourceURL copyCurrentRenderParameters="<%= false %>" var="importPortletURL">
+				<portlet:param name="struts_action" value="/portlet_configuration/export_import" />
+				<portlet:param name="redirect" value="<%= redirect %>" />
+				<portlet:param name="portletResource" value="<%= portletResource %>" />
+				<portlet:param name="groupId" value="<%= String.valueOf(scopeGroupId) %>" />
+				<portlet:param name="validate" value="<%= String.valueOf(Boolean.FALSE) %>" />
+			</liferay-portlet:resourceURL>
+
+			var exportImportOptions = A.one('#<portlet:namespace />exportImportOptions');
+
+			exportImportOptions.plug(
+				A.Plugin.IO,
+				{
+					form: {
+						id: '<portlet:namespace />fm1'
+					},
+					uri: '<%= importPortletURL %>'
+				}
+			);
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/init.jsp
new file mode 100644
index 0000000..36b2f51
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/init.jsp
@@ -0,0 +1,64 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.LARFileException" %><%@
+page import="com.liferay.portal.LARFileSizeException" %><%@
+page import="com.liferay.portal.LARTypeException" %><%@
+page import="com.liferay.portal.NoSuchPortletItemException" %><%@
+page import="com.liferay.portal.NoSuchResourceException" %><%@
+page import="com.liferay.portal.PortletIdException" %><%@
+page import="com.liferay.portal.PortletItemNameException" %><%@
+page import="com.liferay.portal.ResourcePrimKeyException" %><%@
+page import="com.liferay.portal.kernel.lar.ExportImportHelper" %><%@
+page import="com.liferay.portal.kernel.lar.ExportImportHelperUtil" %><%@
+page import="com.liferay.portal.kernel.lar.ManifestSummary" %><%@
+page import="com.liferay.portal.kernel.lar.PortletDataContext" %><%@
+page import="com.liferay.portal.kernel.lar.PortletDataContextFactoryUtil" %><%@
+page import="com.liferay.portal.kernel.lar.PortletDataException" %><%@
+page import="com.liferay.portal.kernel.lar.PortletDataHandler" %><%@
+page import="com.liferay.portal.kernel.lar.PortletDataHandlerBoolean" %><%@
+page import="com.liferay.portal.kernel.lar.PortletDataHandlerControl" %><%@
+page import="com.liferay.portal.kernel.lar.PortletDataHandlerKeys" %><%@
+page import="com.liferay.portal.kernel.lar.UserIdStrategy" %><%@
+page import="com.liferay.portal.kernel.portlet.PortletModeFactory" %><%@
+page import="com.liferay.portal.kernel.util.DateRange" %><%@
+page import="com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil" %><%@
+page import="com.liferay.portal.lar.backgroundtask.PortletExportBackgroundTaskExecutor" %><%@
+page import="com.liferay.portal.lar.backgroundtask.PortletImportBackgroundTaskExecutor" %><%@
+page import="com.liferay.portal.lar.backgroundtask.PortletStagingBackgroundTaskExecutor" %><%@
+page import="com.liferay.portal.service.permission.TeamPermissionUtil" %><%@
+page import="com.liferay.portal.util.ResourcePermissionUtil" %><%@
+page import="com.liferay.portlet.PortletQNameUtil" %><%@
+page import="com.liferay.portlet.backgroundtask.util.comparator.BackgroundTaskComparatorFactoryUtil" %><%@
+page import="com.liferay.portlet.dynamicdatalists.RecordSetDuplicateRecordSetKeyException" %><%@
+page import="com.liferay.portlet.dynamicdatamapping.StructureDuplicateStructureKeyException" %><%@
+page import="com.liferay.portlet.portletconfiguration.action.ActionUtil" %><%@
+page import="com.liferay.portlet.portletconfiguration.action.ExportImportAction" %><%@
+page import="com.liferay.portlet.portletconfiguration.util.PublicRenderParameterConfiguration" %>
+
+<%
+PortalPreferences portalPreferences = PortletPreferencesFactoryUtil.getPortalPreferences(request);
+
+String portletResource = ParamUtil.getString(request, "portletResource");
+
+Portlet selPortlet = PortletLocalServiceUtil.getPortletById(company.getCompanyId(), portletResource);
+
+Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(locale, timeZone);
+%>
+
+<%@ include file="/html/portlet/portlet_configuration/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/publish_portlet.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/publish_portlet.jsp
new file mode 100644
index 0000000..e5078a2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/publish_portlet.jsp
@@ -0,0 +1,540 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portlet_configuration/init.jsp" %>
+
+<%
+String tabs2 = ParamUtil.getString(request, "tabs2", "export");
+
+Layout exportableLayout = ExportImportHelperUtil.getExportableLayout(themeDisplay);
+
+String errorMessageKey = StringPool.BLANK;
+
+Group stagingGroup = themeDisplay.getScopeGroup();
+Group liveGroup = stagingGroup.getLiveGroup();
+
+Layout targetLayout = null;
+
+if (!layout.isTypeControlPanel()) {
+	if (liveGroup == null) {
+		errorMessageKey = "this-portlet-is-placed-in-a-page-that-does-not-exist-in-the-live-site-publish-the-page-first";
+	}
+	else {
+		try {
+			if (stagingGroup.isLayout()) {
+				targetLayout = LayoutLocalServiceUtil.getLayout(liveGroup.getClassPK());
+			}
+			else {
+				targetLayout = LayoutLocalServiceUtil.getLayoutByUuidAndGroupId(exportableLayout.getUuid(), liveGroup.getGroupId(), exportableLayout.isPrivateLayout());
+			}
+		}
+		catch (NoSuchLayoutException nsle) {
+			errorMessageKey = "this-portlet-is-placed-in-a-page-that-does-not-exist-in-the-live-site-publish-the-page-first";
+		}
+
+		if (targetLayout != null) {
+			LayoutType layoutType = targetLayout.getLayoutType();
+
+			if (!(layoutType instanceof LayoutTypePortlet) || !((LayoutTypePortlet)layoutType).hasPortletId(selPortlet.getPortletId())) {
+				errorMessageKey = "this-portlet-has-not-been-added-to-the-live-page-publish-the-page-first";
+			}
+		}
+	}
+}
+else if (stagingGroup.isLayout()) {
+	if (liveGroup == null) {
+		errorMessageKey = "a-portlet-is-placed-in-this-page-of-scope-that-does-not-exist-in-the-live-site-publish-the-page-first";
+	}
+	else {
+		try {
+			targetLayout = LayoutLocalServiceUtil.getLayout(liveGroup.getClassPK());
+		}
+		catch (NoSuchLayoutException nsle) {
+			errorMessageKey = "a-portlet-is-placed-in-this-page-of-scope-that-does-not-exist-in-the-live-site-publish-the-page-first";
+		}
+	}
+}
+
+PortletURL portletURL = currentURLObj;
+
+portletURL.setParameter("tabs3", "current-and-previous");
+%>
+
+<c:choose>
+	<c:when test="<%= (themeDisplay.getURLPublishToLive() == null) && !layout.isTypeControlPanel() %>">
+	</c:when>
+	<c:when test="<%= Validator.isNotNull(errorMessageKey) %>">
+		<liferay-ui:message key="<%= errorMessageKey %>" />
+	</c:when>
+	<c:otherwise>
+		<liferay-ui:tabs
+			names="new-publication-process,current-and-previous"
+			param="tabs3"
+			refresh="<%= false %>"
+		>
+			<liferay-ui:section>
+
+				<%
+				int incompleteBackgroundTaskCount = BackgroundTaskLocalServiceUtil.getBackgroundTasksCount(themeDisplay.getScopeGroupId(), selPortlet.getPortletId(), PortletStagingBackgroundTaskExecutor.class.getName(), false);
+				%>
+
+				<div class="<%= (incompleteBackgroundTaskCount == 0) ? "hide" : "in-progress" %>" id="<portlet:namespace />incompleteProcessMessage">
+					<liferay-util:include page="/html/portlet/layouts_admin/incomplete_processes_message.jsp">
+						<liferay-util:param name="incompleteBackgroundTaskCount" value="<%= String.valueOf(incompleteBackgroundTaskCount) %>" />
+					</liferay-util:include>
+				</div>
+
+				<portlet:actionURL var="publishPortletURL">
+					<portlet:param name="struts_action" value="/portlet_configuration/export_import" />
+				</portlet:actionURL>
+
+				<aui:form action="<%= publishPortletURL %>" cssClass="lfr-export-dialog" method="post" name="fm1" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "publishToLive();" %>'>
+					<aui:input name="<%= Constants.CMD %>" type="hidden" value="publish_to_live" />
+					<aui:input name="tabs1" type="hidden" value="export_import" />
+					<aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
+					<aui:input name="redirect" type="hidden" value="<%= portletURL %>" />
+					<aui:input name="plid" type="hidden" value="<%= exportableLayout.getPlid() %>" />
+					<aui:input name="groupId" type="hidden" value="<%= themeDisplay.getScopeGroupId() %>" />
+					<aui:input name="portletResource" type="hidden" value="<%= portletResource %>" />
+
+					<div class="export-dialog-tree">
+
+						<%
+						PortletDataHandler portletDataHandler = selPortlet.getPortletDataHandlerInstance();
+
+						PortletDataHandlerControl[] configurationControls = portletDataHandler.getExportConfigurationControls(company.getCompanyId(), themeDisplay.getScopeGroupId(), selPortlet, exportableLayout.getPlid(), false);
+						%>
+
+						<c:if test="<%= ArrayUtil.isNotEmpty(configurationControls) %>">
+							<aui:fieldset cssClass="options-group" label="application">
+								<ul class="lfr-tree select-options unstyled">
+									<li class="options">
+										<ul class="portlet-list">
+											<li class="tree-item">
+												<aui:input name="<%= PortletDataHandlerKeys.PORTLET_CONFIGURATION %>" type="hidden" value="<%= true %>" />
+
+												<aui:input label="configuration" name="<%= PortletDataHandlerKeys.PORTLET_CONFIGURATION + StringPool.UNDERLINE + selPortlet.getRootPortletId() %>" type="checkbox" value="<%= true %>" />
+
+												<div class="hide" id="<portlet:namespace />configuration_<%= selPortlet.getRootPortletId() %>">
+													<aui:fieldset cssClass="portlet-type-data-section" label="configuration">
+														<ul class="lfr-tree unstyled">
+
+															<%
+															request.setAttribute("render_controls.jsp-action", Constants.PUBLISH);
+															request.setAttribute("render_controls.jsp-controls", configurationControls);
+															request.setAttribute("render_controls.jsp-portletId", selPortlet.getRootPortletId());
+															%>
+
+															<liferay-util:include page="/html/portlet/layouts_admin/render_controls.jsp" />
+														</ul>
+													</aui:fieldset>
+												</div>
+
+												<ul class="hide" id="<portlet:namespace />showChangeConfiguration_<%= selPortlet.getRootPortletId() %>">
+													<li>
+														<span class="selected-labels" id="<portlet:namespace />selectedConfiguration_<%= selPortlet.getRootPortletId() %>"></span>
+
+														<%
+														Map<String,Object> data = new HashMap<String,Object>();
+
+														data.put("portletid", selPortlet.getRootPortletId());
+														%>
+
+														<aui:a cssClass="configuration-link modify-link" data="<%= data %>" href="javascript:;" label="change" method="get" />
+													</li>
+												</ul>
+
+												<aui:script>
+													Liferay.Util.toggleBoxes('<portlet:namespace /><%= PortletDataHandlerKeys.PORTLET_CONFIGURATION + StringPool.UNDERLINE + selPortlet.getRootPortletId() %>Checkbox', '<portlet:namespace />showChangeConfiguration<%= StringPool.UNDERLINE + selPortlet.getRootPortletId() %>');
+												</aui:script>
+											</li>
+										</ul>
+									</li>
+								</ul>
+							</aui:fieldset>
+						</c:if>
+
+						<c:if test="<%= !portletDataHandler.isDisplayPortlet() %>">
+
+							<%
+							DateRange dateRange = ExportImportHelperUtil.getDateRange(renderRequest, themeDisplay.getScopeGroupId(), false, plid, selPortlet.getPortletId(), "fromLastPublishDate");
+
+							Date startDate = dateRange.getStartDate();
+							Date endDate = dateRange.getEndDate();
+
+							PortletDataContext portletDataContext = PortletDataContextFactoryUtil.createPreparePortletDataContext(themeDisplay, startDate, endDate);
+
+							portletDataHandler.prepareManifestSummary(portletDataContext, portletPreferences);
+
+							ManifestSummary manifestSummary = portletDataContext.getManifestSummary();
+
+							long exportModelCount = portletDataHandler.getExportModelCount(manifestSummary);
+
+							long modelDeletionCount = manifestSummary.getModelDeletionCount(portletDataHandler.getDeletionSystemEventStagedModelTypes());
+							%>
+
+							<c:if test="<%= (exportModelCount != 0) || (modelDeletionCount != 0) || (startDate != null) || (endDate != null) %>">
+								<aui:fieldset cssClass="options-group" label="content">
+									<ul class="lfr-tree select-options unstyled">
+										<li class="tree-item">
+											<div class="hide" id="<portlet:namespace />range">
+												<aui:fieldset cssClass="date-range-options" label="date-range">
+													<aui:input data-name='<%= LanguageUtil.get(pageContext, "all") %>' id="rangeAll" label="all" name="range" type="radio" value="all" />
+
+													<aui:input checked="<%= true %>" data-name='<%= LanguageUtil.get(pageContext, "from-last-publish-date") %>' id="rangeLastPublish" label="from-last-publish-date" name="range" type="radio" value="fromLastPublishDate" />
+
+													<aui:input data-name='<%= LanguageUtil.get(pageContext, "date-range") %>' helpMessage="export-date-range-help" id="rangeDateRange" label="date-range" name="range" type="radio" value="dateRange" />
+
+													<%
+													Calendar endCalendar = CalendarFactoryUtil.getCalendar(timeZone, locale);
+
+													if (endDate != null) {
+														endCalendar.setTime(endDate);
+													}
+
+													Calendar startCalendar = CalendarFactoryUtil.getCalendar(timeZone, locale);
+
+													if (startDate != null) {
+														startCalendar.setTime(startDate);
+													}
+													else {
+														startCalendar.add(Calendar.DATE, -1);
+													}
+													%>
+
+													<ul class="date-range-options hide unstyled" id="<portlet:namespace />startEndDate">
+														<li>
+															<aui:fieldset label="start-date">
+																<liferay-ui:input-date
+																	dayParam="startDateDay"
+																	dayValue="<%= startCalendar.get(Calendar.DATE) %>"
+																	disabled="<%= false %>"
+																	firstDayOfWeek="<%= startCalendar.getFirstDayOfWeek() - 1 %>"
+																	monthParam="startDateMonth"
+																	monthValue="<%= startCalendar.get(Calendar.MONTH) %>"
+																	name="startDate"
+																	yearParam="startDateYear"
+																	yearValue="<%= startCalendar.get(Calendar.YEAR) %>"
+																/>
+
+																&nbsp;
+
+																<liferay-ui:input-time
+																	amPmParam='<%= "startDateAmPm" %>'
+																	amPmValue="<%= startCalendar.get(Calendar.AM_PM) %>"
+																	dateParam="startDateTime"
+																	dateValue="<%= startCalendar.getTime() %>"
+																	disabled="<%= false %>"
+																	hourParam='<%= "startDateHour" %>'
+																	hourValue="<%= startCalendar.get(Calendar.HOUR) %>"
+																	minuteParam='<%= "startDateMinute" %>'
+																	minuteValue="<%= startCalendar.get(Calendar.MINUTE) %>"
+																	name="startTime"
+																/>
+															</aui:fieldset>
+														</li>
+
+														<li>
+															<aui:fieldset label="end-date">
+																<liferay-ui:input-date
+																	dayParam="endDateDay"
+																	dayValue="<%= endCalendar.get(Calendar.DATE) %>"
+																	disabled="<%= false %>"
+																	firstDayOfWeek="<%= endCalendar.getFirstDayOfWeek() - 1 %>"
+																	monthParam="endDateMonth"
+																	monthValue="<%= endCalendar.get(Calendar.MONTH) %>"
+																	name="endDate"
+																	yearParam="endDateYear"
+																	yearValue="<%= endCalendar.get(Calendar.YEAR) %>"
+																/>
+
+																&nbsp;
+
+																<liferay-ui:input-time
+																	amPmParam='<%= "endDateAmPm" %>'
+																	amPmValue="<%= endCalendar.get(Calendar.AM_PM) %>"
+																	dateParam="startDateTime"
+																	dateValue="<%= endCalendar.getTime() %>"
+																	disabled="<%= false %>"
+																	hourParam='<%= "endDateHour" %>'
+																	hourValue="<%= endCalendar.get(Calendar.HOUR) %>"
+																	minuteParam='<%= "endDateMinute" %>'
+																	minuteValue="<%= endCalendar.get(Calendar.MINUTE) %>"
+																	name="endTime"
+																/>
+															</aui:fieldset>
+														</li>
+													</ul>
+
+													<aui:input id="rangeLast" label='<%= LanguageUtil.get(pageContext, "last") + StringPool.TRIPLE_PERIOD %>' name="range" type="radio" value="last" />
+
+													<ul class="hide unstyled" id="<portlet:namespace />rangeLastInputs">
+														<li>
+															<aui:select cssClass="relative-range" label="" name="last">
+																<aui:option label='<%= LanguageUtil.format(pageContext, "x-hours", "12") %>' value="12" />
+																<aui:option label='<%= LanguageUtil.format(pageContext, "x-hours", "24") %>' value="24" />
+																<aui:option label='<%= LanguageUtil.format(pageContext, "x-hours", "48") %>' value="48" />
+																<aui:option label='<%= LanguageUtil.format(pageContext, "x-days", "7") %>' value="168" />
+															</aui:select>
+														</li>
+													</ul>
+												</aui:fieldset>
+											</div>
+
+											<liferay-util:buffer var="selectedLabelsHTML">
+												<span class="selected-labels" id="<portlet:namespace />selectedRange"></span>
+
+												<aui:a cssClass="modify-link" href="javascript:;" id="rangeLink" label="change" method="get" />
+											</liferay-util:buffer>
+
+											<liferay-ui:icon
+												image="calendar"
+												label="<%= true %>"
+												message='<%= LanguageUtil.get(locale, "date-range") + selectedLabelsHTML %>'
+											/>
+										</li>
+
+										<c:if test="<%= (exportModelCount != 0) || (modelDeletionCount != 0) %>">
+											<li class="options">
+												<ul class="portlet-list">
+													<li class="tree-item">
+														<aui:input name="<%= PortletDataHandlerKeys.PORTLET_DATA_CONTROL_DEFAULT %>" type="hidden" value="<%= false %>" />
+
+														<liferay-util:buffer var="badgeHTML">
+															<span class="badge badge-info"><%= exportModelCount > 0 ? exportModelCount : StringPool.BLANK %></span>
+															<span class="badge badge-warning" id="<portlet:namespace />deletions"><%= modelDeletionCount > 0 ? (modelDeletionCount + StringPool.SPACE + LanguageUtil.get(pageContext, "deletions")) : StringPool.BLANK %></span>
+														</liferay-util:buffer>
+
+														<aui:input label='<%= LanguageUtil.get(pageContext, "content") + badgeHTML %>' name="<%= PortletDataHandlerKeys.PORTLET_DATA + StringPool.UNDERLINE + selPortlet.getRootPortletId() %>" type="checkbox" value="<%= true %>" />
+
+														<%
+														PortletDataHandlerControl[] exportControls = portletDataHandler.getExportControls();
+														PortletDataHandlerControl[] metadataControls = portletDataHandler.getExportMetadataControls();
+
+														if (ArrayUtil.isNotEmpty(exportControls) || ArrayUtil.isNotEmpty(metadataControls)) {
+														%>
+
+															<div class="hide" id="<portlet:namespace />content_<%= selPortlet.getRootPortletId() %>">
+																<ul class="lfr-tree unstyled">
+																	<li class="tree-item">
+																		<aui:fieldset cssClass="portlet-type-data-section" label="content">
+																			<aui:field-wrapper label='<%= ArrayUtil.isNotEmpty(metadataControls) ? "content" : StringPool.BLANK %>'>
+																				<ul class="lfr-tree unstyled">
+																					<li class="tree-item">
+																						<aui:input data-name='<%= LanguageUtil.get(locale, "delete-portlet-data") %>' label="delete-portlet-data-before-importing" name="<%= PortletDataHandlerKeys.DELETE_PORTLET_DATA %>" type="checkbox" />
+
+																						<div id="<portlet:namespace />showDeleteContentWarning">
+																							<div class="alert alert-block">
+																								<liferay-ui:message key="delete-content-before-importing-warning" />
+
+																								<liferay-ui:message key="delete-content-before-importing-suggestion" />
+																							</div>
+																						</div>
+																					</li>
+																				</ul>
+
+																				<aui:script>
+																					Liferay.Util.toggleBoxes('<portlet:namespace /><%= PortletDataHandlerKeys.DELETE_PORTLET_DATA %>Checkbox', '<portlet:namespace />showDeleteContentWarning');
+																				</aui:script>
+
+																				<c:if test="<%= exportControls != null %>">
+
+																					<%
+																					request.setAttribute("render_controls.jsp-action", Constants.PUBLISH);
+																					request.setAttribute("render_controls.jsp-controls", exportControls);
+																					request.setAttribute("render_controls.jsp-manifestSummary", manifestSummary);
+																					request.setAttribute("render_controls.jsp-portletDisabled", !portletDataHandler.isPublishToLiveByDefault());
+																					%>
+
+																					<ul class="lfr-tree unstyled">
+																						<liferay-util:include page="/html/portlet/layouts_admin/render_controls.jsp" />
+																					</ul>
+																				</c:if>
+																			</aui:field-wrapper>
+
+																			<c:if test="<%= metadataControls != null %>">
+
+																				<%
+																				for (PortletDataHandlerControl metadataControl : metadataControls) {
+																					PortletDataHandlerBoolean control = (PortletDataHandlerBoolean)metadataControl;
+
+																					PortletDataHandlerControl[] childrenControls = control.getChildren();
+
+																					if (ArrayUtil.isNotEmpty(childrenControls)) {
+																						request.setAttribute("render_controls.jsp-controls", childrenControls);
+																					%>
+
+																						<aui:field-wrapper label="content-metadata">
+																							<ul class="lfr-tree unstyled">
+																								<liferay-util:include page="/html/portlet/layouts_admin/render_controls.jsp" />
+																							</ul>
+																						</aui:field-wrapper>
+
+																					<%
+																					}
+																				}
+																				%>
+
+																			</c:if>
+																		</aui:fieldset>
+																	</li>
+																</ul>
+															</div>
+
+															<ul id="<portlet:namespace />showChangeContent_<%= selPortlet.getRootPortletId() %>">
+																<li>
+																	<span class="selected-labels" id="<portlet:namespace />selectedContent_<%= selPortlet.getRootPortletId() %>"></span>
+
+																	<%
+																	Map<String,Object> data = new HashMap<String,Object>();
+
+																	data.put("portletid", selPortlet.getRootPortletId());
+																	%>
+
+																	<aui:a cssClass="content-link modify-link" data="<%= data %>" href="javascript:;" id='<%= "contentLink_" + selPortlet.getRootPortletId() %>' label="change" method="get" />
+																</li>
+															</ul>
+
+															<aui:script>
+																Liferay.Util.toggleBoxes('<portlet:namespace /><%= PortletDataHandlerKeys.PORTLET_DATA + StringPool.UNDERLINE + selPortlet.getRootPortletId() %>Checkbox', '<portlet:namespace />showChangeContent<%= StringPool.UNDERLINE + selPortlet.getRootPortletId() %>');
+															</aui:script>
+
+														<%
+														}
+														%>
+
+													</li>
+												</ul>
+
+												<ul>
+													<aui:fieldset cssClass="content-options" label="for-each-of-the-selected-content-types,-publish-their">
+														<span class="selected-labels" id="<portlet:namespace />selectedContentOptions"></span>
+
+														<aui:a cssClass="modify-link" href="javascript:;" id="contentOptionsLink" label="change" method="get" />
+
+														<div class="hide" id="<portlet:namespace />contentOptions">
+															<ul class="lfr-tree unstyled">
+																<li class="tree-item">
+																	<aui:input label="comments" name="<%= PortletDataHandlerKeys.COMMENTS %>" type="checkbox" value="<%= true %>" />
+
+																	<aui:input label="ratings" name="<%= PortletDataHandlerKeys.RATINGS %>" type="checkbox" value="<%= true %>" />
+
+																	<c:if test="<%= modelDeletionCount != 0 %>">
+
+																		<%
+																		String deletionsLabel = LanguageUtil.get(pageContext, "deletions") + (modelDeletionCount > 0 ? " (" + modelDeletionCount + ")" : StringPool.BLANK);
+																		%>
+
+																		<aui:input data-name="<%= deletionsLabel %>" helpMessage="deletions-help" label="<%= deletionsLabel %>" name="<%= PortletDataHandlerKeys.DELETIONS %>" type="checkbox" value="<%= true %>" />
+																	</c:if>
+																</li>
+															</ul>
+														</div>
+													</aui:fieldset>
+												</ul>
+											</li>
+										</c:if>
+									</ul>
+								</aui:fieldset>
+							</c:if>
+
+							<aui:fieldset cssClass="options-group" label="permissions">
+								<ul class="lfr-tree unstyled">
+									<li class="tree-item">
+										<aui:input helpMessage="export-import-portlet-permissions-help" label="permissions" name="<%= PortletDataHandlerKeys.PERMISSIONS %>" type="checkbox" />
+
+										<ul id="<portlet:namespace />permissionsUl">
+											<li class="tree-item">
+												<aui:input label="permissions-assigned-to-roles" name="permissionsAssignedToRoles" type="checkbox" value="<%= true %>" />
+											</li>
+										</ul>
+									</li>
+								</ul>
+							</aui:fieldset>
+						</c:if>
+
+						<aui:button-row>
+							<aui:button type="submit" value="publish-to-live" />
+
+							<aui:button onClick='<%= renderResponse.getNamespace() + "copyFromLive();" %>' value="copy-from-live" />
+						</aui:button-row>
+					</div>
+				</aui:form>
+			</liferay-ui:section>
+
+			<liferay-ui:section>
+				<div class="process-list" id="<portlet:namespace />publishProcesses">
+					<liferay-util:include page="/html/portlet/portlet_configuration/publish_portlet_processes.jsp" />
+				</div>
+			</liferay-ui:section>
+		</liferay-ui:tabs>
+
+		<aui:script use="liferay-export-import">
+			<liferay-portlet:resourceURL copyCurrentRenderParameters="<%= false %>" var="publishProcessesURL">
+				<portlet:param name="struts_action" value="/portlet_configuration/export_import" />
+				<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.PUBLISH %>" />
+				<portlet:param name="<%= SearchContainer.DEFAULT_CUR_PARAM %>" value="<%= ParamUtil.getString(request, SearchContainer.DEFAULT_CUR_PARAM) %>" />
+				<portlet:param name="<%= SearchContainer.DEFAULT_DELTA_PARAM %>" value="<%= ParamUtil.getString(request, SearchContainer.DEFAULT_DELTA_PARAM) %>" />
+				<portlet:param name="groupId" value="<%= String.valueOf(themeDisplay.getScopeGroupId()) %>" />
+				<portlet:param name="portletResource" value="<%= portletResource %>" />
+			</liferay-portlet:resourceURL>
+
+			new Liferay.ExportImport(
+				{
+					commentsNode: '#<%= PortletDataHandlerKeys.COMMENTS %>Checkbox',
+					deletePortletDataNode: '#<%= PortletDataHandlerKeys.DELETE_PORTLET_DATA %>Checkbox',
+					deletionsNode: '#<%= PortletDataHandlerKeys.DELETIONS %>Checkbox',
+					form: document.<portlet:namespace />fm1,
+					incompleteProcessMessageNode: '#<portlet:namespace />incompleteProcessMessage',
+					namespace: '<portlet:namespace />',
+					processesNode: '#publishProcesses',
+					processesResourceURL: '<%= publishProcessesURL.toString() %>',
+					rangeAllNode: '#rangeAll',
+					rangeDateRangeNode: '#rangeDateRange',
+					rangeLastNode: '#rangeLast',
+					rangeLastPublishNode: '#rangeLastPublish',
+					ratingsNode: '#<%= PortletDataHandlerKeys.RATINGS %>Checkbox'
+				}
+			);
+		</aui:script>
+
+		<aui:script>
+			function <portlet:namespace />copyFromLive() {
+				if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-copy-from-live-and-update-the-existing-staging-portlet-information") %>')) {
+					document.<portlet:namespace />fm1.<portlet:namespace /><%= Constants.CMD %>.value = "copy_from_live";
+
+					submitForm(document.<portlet:namespace />fm1);
+				}
+			}
+
+			function <portlet:namespace />publishToLive() {
+				if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-publish-to-live-and-update-the-existing-portlet-data") %>')) {
+					submitForm(document.<portlet:namespace />fm1);
+				}
+			}
+
+			Liferay.Util.toggleBoxes('<portlet:namespace /><%= PortletDataHandlerKeys.PERMISSIONS %>Checkbox', '<portlet:namespace />permissionsUl');
+
+			Liferay.Util.toggleRadio('<portlet:namespace />portletMetaDataFilter', '<portlet:namespace />portletMetaDataList');
+			Liferay.Util.toggleRadio('<portlet:namespace />portletMetaDataAll', '', ['<portlet:namespace />portletMetaDataList']);
+
+			Liferay.Util.toggleRadio('<portlet:namespace />rangeAll', '', ['<portlet:namespace />startEndDate', '<portlet:namespace />rangeLastInputs']);
+			Liferay.Util.toggleRadio('<portlet:namespace />rangeDateRange', '<portlet:namespace />startEndDate', '<portlet:namespace />rangeLastInputs');
+			Liferay.Util.toggleRadio('<portlet:namespace />rangeLastPublish', '', ['<portlet:namespace />startEndDate', '<portlet:namespace />rangeLastInputs']);
+			Liferay.Util.toggleRadio('<portlet:namespace />rangeLast', '<portlet:namespace />rangeLastInputs', ['<portlet:namespace />startEndDate']);
+		</aui:script>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/publish_portlet_processes.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/publish_portlet_processes.jsp
new file mode 100644
index 0000000..b580b81
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/publish_portlet_processes.jsp
@@ -0,0 +1,113 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portlet_configuration/init.jsp" %>
+
+<%
+long groupId = ParamUtil.getLong(request, "groupId", themeDisplay.getScopeGroupId());
+
+PortletURL portletURL = currentURLObj;
+
+portletURL.setParameter("tabs3", "current-and-previous");
+
+String orderByCol = ParamUtil.getString(request, "orderByCol");
+String orderByType = ParamUtil.getString(request, "orderByType");
+
+if (Validator.isNotNull(orderByCol) && Validator.isNotNull(orderByType)) {
+	portalPreferences.setValue(PortletKeys.BACKGROUND_TASK, "entries-order-by-col", orderByCol);
+	portalPreferences.setValue(PortletKeys.BACKGROUND_TASK, "entries-order-by-type", orderByType);
+}
+else {
+	orderByCol = portalPreferences.getValue(PortletKeys.BACKGROUND_TASK, "entries-order-by-col", "create-date");
+	orderByType = portalPreferences.getValue(PortletKeys.BACKGROUND_TASK, "entries-order-by-type", "desc");
+}
+
+OrderByComparator orderByComparator = BackgroundTaskComparatorFactoryUtil.getBackgroundTaskOrderByComparator(orderByCol, orderByType);
+%>
+
+<liferay-ui:search-container
+	emptyResultsMessage="no-publication-processes-were-found"
+	iteratorURL="<%= portletURL %>"
+	orderByCol="<%= orderByCol %>"
+	orderByComparator="<%= orderByComparator %>"
+	orderByType="<%= orderByType %>"
+	total="<%= BackgroundTaskLocalServiceUtil.getBackgroundTasksCount(groupId, selPortlet.getPortletId(), PortletStagingBackgroundTaskExecutor.class.getName()) %>"
+>
+	<liferay-ui:search-container-results
+		results="<%= BackgroundTaskLocalServiceUtil.getBackgroundTasks(groupId, selPortlet.getPortletId(), PortletStagingBackgroundTaskExecutor.class.getName(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator()) %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.BackgroundTask"
+		keyProperty="backgroundTaskId"
+		modelVar="backgroundTask"
+	>
+		<liferay-ui:search-container-column-text
+			name="user-name"
+			value="<%= HtmlUtil.escape(backgroundTask.getUserName()) %>"
+		/>
+
+		<liferay-ui:search-container-column-jsp
+			cssClass="background-task-status-column"
+			name="status"
+			path="/html/portlet/layouts_admin/publish_process_message.jsp"
+		/>
+
+		<liferay-ui:search-container-column-date
+			name="create-date"
+			orderable="<%= true %>"
+			value="<%= backgroundTask.getCreateDate() %>"
+		/>
+
+		<liferay-ui:search-container-column-date
+			name="completion-date"
+			orderable="<%= true %>"
+			value="<%= backgroundTask.getCompletionDate() %>"
+		/>
+
+		<liferay-ui:search-container-column-text>
+			<c:if test="<%= !backgroundTask.isInProgress() %>">
+				<portlet:actionURL var="deleteBackgroundTaskURL">
+					<portlet:param name="struts_action" value="/group_pages/delete_background_task" />
+					<portlet:param name="redirect" value="<%= portletURL.toString() %>" />
+					<portlet:param name="backgroundTaskId" value="<%= String.valueOf(backgroundTask.getBackgroundTaskId()) %>" />
+				</portlet:actionURL>
+
+				<%
+				Date completionDate = backgroundTask.getCompletionDate();
+				%>
+
+				<liferay-ui:icon-delete
+					label="true"
+					message='<%= ((completionDate != null) && completionDate.before(new Date())) ? "clear" : "cancel" %>'
+					url="<%= deleteBackgroundTaskURL %>"
+				/>
+			</c:if>
+		</liferay-ui:search-container-column-text>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
+
+<%
+int incompleteBackgroundTaskCount = BackgroundTaskLocalServiceUtil.getBackgroundTasksCount(groupId, selPortlet.getPortletId(), PortletStagingBackgroundTaskExecutor.class.getName(), false);
+%>
+
+<div class="hide incomplete-process-message">
+	<liferay-util:include page="/html/portlet/layouts_admin/incomplete_processes_message.jsp">
+		<liferay-util:param name="incompleteBackgroundTaskCount" value="<%= String.valueOf(incompleteBackgroundTaskCount) %>" />
+	</liferay-util:include>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/tabs1.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/tabs1.jsp
new file mode 100644
index 0000000..d9ee03c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_configuration/tabs1.jsp
@@ -0,0 +1,127 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portlet_configuration/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+String returnToFullPageURL = ParamUtil.getString(request, "returnToFullPageURL");
+
+// Configuration
+
+PortletURL configurationURL = renderResponse.createRenderURL();
+
+configurationURL.setParameter("struts_action", "/portlet_configuration/edit_configuration");
+configurationURL.setParameter("redirect", redirect);
+configurationURL.setParameter("returnToFullPageURL", returnToFullPageURL);
+configurationURL.setParameter("portletResource", portletResource);
+
+// Supported clients
+
+PortletURL supportedClientsURL = renderResponse.createRenderURL();
+
+supportedClientsURL.setParameter("struts_action", "/portlet_configuration/edit_supported_clients");
+supportedClientsURL.setParameter("redirect", redirect);
+supportedClientsURL.setParameter("returnToFullPageURL", returnToFullPageURL);
+supportedClientsURL.setParameter("portletResource", portletResource);
+
+// Permissions
+
+PortletURL permissionsURL = renderResponse.createRenderURL();
+
+permissionsURL.setParameter("struts_action", "/portlet_configuration/edit_permissions");
+permissionsURL.setParameter("redirect", redirect);
+permissionsURL.setParameter("returnToFullPageURL", returnToFullPageURL);
+permissionsURL.setParameter("portletResource", portletResource);
+permissionsURL.setParameter("resourcePrimKey", PortletPermissionUtil.getPrimaryKey(layout.getPlid(), portletResource));
+
+// Public render parameters
+
+PortletURL publicRenderParametersURL = renderResponse.createRenderURL();
+
+publicRenderParametersURL.setParameter("struts_action", "/portlet_configuration/edit_public_render_parameters");
+publicRenderParametersURL.setParameter("redirect", redirect);
+publicRenderParametersURL.setParameter("returnToFullPageURL", returnToFullPageURL);
+publicRenderParametersURL.setParameter("portletResource", portletResource);
+
+// Sharing
+
+PortletURL sharingURL = renderResponse.createRenderURL();
+
+sharingURL.setParameter("struts_action", "/portlet_configuration/edit_sharing");
+sharingURL.setParameter("redirect", redirect);
+sharingURL.setParameter("returnToFullPageURL", returnToFullPageURL);
+sharingURL.setParameter("portletResource", portletResource);
+
+// Scope
+
+PortletURL scopeURL = renderResponse.createRenderURL();
+
+scopeURL.setParameter("struts_action", "/portlet_configuration/edit_scope");
+scopeURL.setParameter("redirect", redirect);
+scopeURL.setParameter("returnToFullPageURL", returnToFullPageURL);
+scopeURL.setParameter("portletResource", portletResource);
+
+int pos = 0;
+
+String tabs1Names = StringPool.BLANK;
+
+if (Validator.isNotNull(selPortlet.getConfigurationActionClass())) {
+	tabs1Names += ",setup";
+
+	request.setAttribute("liferay-ui:tabs:url" + pos++, configurationURL.toString());
+}
+
+if (selPortlet.hasMultipleMimeTypes()) {
+	tabs1Names += ",supported-clients";
+
+	request.setAttribute("liferay-ui:tabs:url" + pos++, supportedClientsURL.toString());
+}
+
+if (PortletPermissionUtil.contains(permissionChecker, layout, portletResource, ActionKeys.PERMISSIONS)) {
+	tabs1Names += ",permissions";
+
+	request.setAttribute("liferay-ui:tabs:url" + pos++, permissionsURL.toString());
+}
+
+if (!selPortlet.getPublicRenderParameters().isEmpty()) {
+	tabs1Names += ",communication";
+
+	request.setAttribute("liferay-ui:tabs:url" + pos++, publicRenderParametersURL.toString());
+}
+
+tabs1Names += ",sharing";
+
+request.setAttribute("liferay-ui:tabs:url" + pos++, sharingURL.toString());
+
+if (selPortlet.isScopeable()) {
+	tabs1Names += ",scope";
+
+	request.setAttribute("liferay-ui:tabs:url" + pos++, scopeURL.toString());
+}
+
+if (tabs1Names.startsWith(",")) {
+	tabs1Names = tabs1Names.substring(1);
+}
+
+String tabs1 = ParamUtil.getString(request, "tabs1");
+
+PortalUtil.addPortletBreadcrumbEntry(request, PortalUtil.getPortletTitle(renderResponse), null);
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "configuration"), null);
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, tabs1), currentURL);
+%>
+
+<liferay-ui:tabs names="<%= tabs1Names %>" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_css/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_css/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_css/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_css/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_css/init.jsp
new file mode 100644
index 0000000..5117ad4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_css/init.jsp
@@ -0,0 +1,19 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ include file="/html/portlet/portlet_css/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_css/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_css/view.jsp
new file mode 100644
index 0000000..942ee1d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_css/view.jsp
@@ -0,0 +1,485 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portlet_css/init.jsp" %>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+String tabs1Names = "portlet-configuration,text-styles,background-styles,border-styles,margin-and-padding,advanced-styling";
+
+if (PropsValues.MOBILE_DEVICE_STYLING_WAP_ENABLED) {
+	tabs1Names = tabs1Names + ",wap-styling";
+}
+%>
+
+<div id="lfr-look-and-feel">
+	<div class="tabbable-content" id="portlet-set-properties">
+		<liferay-ui:tabs
+			names="<%= tabs1Names %>"
+			url="<%= portletURL.toString() %>"
+		/>
+
+		<aui:form method="post">
+			<input id="portlet-area" name="portlet-area" type="hidden" />
+			<input id="portlet-boundary-id" name="portlet-boundary-id" type="hidden" />
+
+			<div class="tab-pane">
+				<aui:fieldset id="portlet-config">
+					<span class="field-row">
+						<aui:input inlineField="<%= true %>" label="portlet-title" name="custom-title" />
+
+						<aui:select inlineField="<%= true %>" label="portlet-title" name="lfr-portlet-language">
+
+							<%
+							Locale[] locales = LanguageUtil.getAvailableLocales(themeDisplay.getSiteGroupId());
+
+							for (int i = 0; i < locales.length; i++) {
+							%>
+
+								<aui:option label="<%= locales[i].getDisplayName(locale) %>" value="<%= LocaleUtil.toLanguageId(locales[i]) %>" />
+
+							<%
+							}
+							%>
+
+						</aui:select>
+					</span>
+
+					<aui:input name="use-custom-title" type="checkbox" />
+
+					<aui:select label="link-portlet-urls-to-page" name="lfr-point-links">
+						<aui:option label="current-page" value="" />
+
+						<%
+						String linkToLayoutUuid = StringPool.BLANK;
+
+						LayoutLister layoutLister = new LayoutLister();
+
+						Group group = layout.getGroup();
+
+						LayoutView layoutView = layoutLister.getLayoutView(layout.getGroup().getGroupId(), layout.isPrivateLayout(), group.getName(), locale);
+
+						List layoutList = layoutView.getList();
+
+						for (int i = 0; i < layoutList.size(); i++) {
+
+							// id | parentId | ls | obj id | name | img | depth
+
+							String layoutDesc = (String)layoutList.get(i);
+
+							String[] nodeValues = StringUtil.split(layoutDesc, '|');
+
+							long objId = GetterUtil.getLong(nodeValues[3]);
+							String name = nodeValues[4];
+
+							int depth = 0;
+
+							if (i != 0) {
+								depth = GetterUtil.getInteger(nodeValues[6]);
+							}
+
+							for (int j = 0; j < depth; j++) {
+								name = "-&nbsp;" + name;
+							}
+
+							Layout linkableLayout = null;
+
+							try {
+								if (objId > 0) {
+									linkableLayout = LayoutLocalServiceUtil.getLayout(objId);
+								}
+							}
+							catch (Exception e) {
+							}
+
+							if (linkableLayout != null) {
+						%>
+
+								<aui:option label="<%= name %>" selected="<%= linkableLayout.getUuid().equals(linkToLayoutUuid) %>" value="<%= linkableLayout.getUuid() %>" />
+
+						<%
+							}
+						}
+						%>
+
+					</aui:select>
+
+					<aui:select label="show-borders" name="show-borders" showEmptyOption="<%= true %>">
+						<aui:option label="yes" value="true" />
+						<aui:option label="no" value="false" />
+					</aui:select>
+
+					<span class="alert alert-info hide form-hint" id="border-note">
+						<liferay-ui:message key="this-change-will-only-be-shown-after-you-refresh-the-page" />
+					</span>
+				</aui:fieldset>
+
+				<aui:fieldset id="text-styles">
+					<aui:row>
+						<aui:col width="<%= 33 %>">
+							<aui:select label="font" name="lfr-font-family" showEmptyOption="<%= true %>">
+								<aui:option label="Arial" />
+								<aui:option label="Georgia" />
+								<aui:option label="Times New Roman" />
+								<aui:option label="Tahoma" />
+								<aui:option label="Trebuchet MS" />
+								<aui:option label="Verdana" />
+							</aui:select>
+
+							<aui:input label="bold" name="lfr-font-bold" type="checkbox" />
+
+							<aui:input label="italic" name="lfr-font-italic" type="checkbox" />
+
+							<aui:select label="size" name="lfr-font-size" showEmptyOption="<%= true %>">
+
+								<%
+								DecimalFormat decimalFormat = new DecimalFormat("#.##em");
+
+								for (double i = 0.1; i <= 12; i += 0.1) {
+									String value = decimalFormat.format(i);
+								%>
+
+									<aui:option label="<%= value %>" />
+
+								<%
+								}
+								%>
+
+							</aui:select>
+
+							<aui:input label="color" name="lfr-font-color" />
+
+							<aui:select label="alignment" name="lfr-font-align" showEmptyOption="<%= true %>">
+								<aui:option label="justify" />
+								<aui:option label="left" />
+								<aui:option label="right" />
+								<aui:option label="center" />
+							</aui:select>
+
+							<aui:select label="text-decoration" name="lfr-font-decoration" showEmptyOption="<%= true %>">
+								<aui:option label="none" />
+								<aui:option label="underline" />
+								<aui:option label="overline" />
+								<aui:option label="strikethrough" value="line-through" />
+							</aui:select>
+						</aui:col>
+
+						<aui:col last="<%= true %>" width="<%= 60 %>">
+							<aui:select label="word-spacing" name="lfr-font-space" showEmptyOption="<%= true %>">
+
+								<%
+								DecimalFormat decimalFormat = new DecimalFormat("#.##em");
+
+								for (double i = -1; i <= 1; i += 0.05) {
+									String value = decimalFormat.format(i);
+
+									if (value.equals("0em")) {
+										value = "normal";
+									}
+								%>
+
+									<aui:option label="<%= value %>" />
+
+								<%
+								}
+								%>
+
+							</aui:select>
+
+							<aui:select label="line-height" name="lfr-font-leading" showEmptyOption="<%= true %>">
+
+								<%
+								DecimalFormat decimalFormat = new DecimalFormat("#.##em");
+
+								for (double i = 0.1; i <= 12; i += 0.1) {
+									String value = decimalFormat.format(i);
+								%>
+
+									<aui:option label="<%= value %>" />
+
+								<%
+								}
+								%>
+
+							</aui:select>
+
+							<aui:select label="letter-spacing" name="lfr-font-tracking" showEmptyOption="<%= true %>">
+
+								<%
+									for (int i = -10; i <= 50; i++) {
+										String value = i + "px";
+
+										if (i == 0) {
+											value = "0";
+										}
+									%>
+
+										<aui:option label="<%= value %>" />
+
+									<%
+									}
+								%>
+
+							</aui:select>
+						</aui:col>
+					</aui:row>
+				</aui:fieldset>
+
+				<aui:fieldset id="background-styles">
+					<aui:input label="background-color" name="lfr-bg-color" />
+				</aui:fieldset>
+
+				<aui:fieldset id="border-styles">
+					<aui:row>
+						<aui:col cssClass="lfr-border-width use-for-all-column" width="<%= 33 %>">
+							<aui:fieldset label="border-width">
+								<aui:input checked="checked" cssClass="lfr-use-for-all" label="same-for-all" name="lfr-use-for-all-width" type="checkbox" />
+
+								<span class="field-row">
+									<aui:input inlineField="<%= true %>" label="top" name="lfr-border-width-top" />
+
+									<aui:select inlineField="<%= true %>" label="" name="lfr-border-width-top-unit">
+										<aui:option label="%" />
+										<aui:option label="px" />
+										<aui:option label="em" />
+									</aui:select>
+								</span>
+
+								<span class="field-row">
+									<aui:input inlineField="<%= true %>" label="right" name="lfr-border-width-right" />
+
+									<aui:select inlineField="<%= true %>" label="" name="lfr-border-width-right-unit">
+										<aui:option label="%" />
+										<aui:option label="px" />
+										<aui:option label="em" />
+									</aui:select>
+								</span>
+
+								<span class="field-row">
+									<aui:input inlineField="<%= true %>" label="bottom" name="lfr-border-width-bottom" />
+
+									<aui:select inlineField="<%= true %>" label="" name="lfr-border-width-bottom-unit">
+										<aui:option label="%" />
+										<aui:option label="px" />
+										<aui:option label="em" />
+									</aui:select>
+								</span>
+
+								<span class="field-row">
+									<aui:input inlineField="<%= true %>" label="left" name="lfr-border-width-left" />
+
+									<aui:select inlineField="<%= true %>" label="" name="lfr-border-width-left-unit">
+										<aui:option label="%" />
+										<aui:option label="px" />
+										<aui:option label="em" />
+									</aui:select>
+								</span>
+							</aui:fieldset>
+						</aui:col>
+
+						<aui:col cssClass="lfr-border-style" width="<%= 33 %>">
+							<aui:fieldset label="border-style">
+								<aui:input checked="checked" cssClass="lfr-use-for-all use-for-all-column" label="same-for-all" name="lfr-use-for-all-style" type="checkbox" />
+
+								<aui:select label="top" name="lfr-border-style-top" showEmptyOption="<%= true %>">
+									<aui:option label="dashed" />
+									<aui:option label="double" />
+									<aui:option label="dotted" />
+									<aui:option label="groove" />
+									<aui:option label="hidden[css]" value="hidden" />
+									<aui:option label="inset" />
+									<aui:option label="outset" />
+									<aui:option label="ridge" />
+									<aui:option label="solid" />
+								</aui:select>
+
+								<aui:select label="right" name="lfr-border-style-right" showEmptyOption="<%= true %>">
+									<aui:option label="dashed" />
+									<aui:option label="double" />
+									<aui:option label="dotted" />
+									<aui:option label="groove" />
+									<aui:option label="hidden[css]" value="hidden" />
+									<aui:option label="inset" />
+									<aui:option label="outset" />
+									<aui:option label="ridge" />
+									<aui:option label="solid" />
+								</aui:select>
+
+								<aui:select label="bottom" name="lfr-border-style-bottom" showEmptyOption="<%= true %>">
+									<aui:option label="dashed" />
+									<aui:option label="double" />
+									<aui:option label="dotted" />
+									<aui:option label="groove" />
+									<aui:option label="hidden[css]" value="hidden" />
+									<aui:option label="inset" />
+									<aui:option label="outset" />
+									<aui:option label="ridge" />
+									<aui:option label="solid" />
+								</aui:select>
+
+								<aui:select label="left" name="lfr-border-style-left" showEmptyOption="<%= true %>">
+									<aui:option label="dashed" />
+									<aui:option label="double" />
+									<aui:option label="dotted" />
+									<aui:option label="groove" />
+									<aui:option label="hidden[css]" value="hidden" />
+									<aui:option label="inset" />
+									<aui:option label="outset" />
+									<aui:option label="ridge" />
+									<aui:option label="solid" />
+								</aui:select>
+							</aui:fieldset>
+						</aui:col>
+
+						<aui:col cssClass="lfr-border-color" last="<%= true %>" width="<%= 33 %>">
+							<aui:fieldset label="border-color">
+								<aui:input checked="checked" cssClass="lfr-use-for-all use-for-all-column" label="same-for-all" name="lfr-use-for-all-color" type="checkbox" />
+
+								<aui:input label="top" name="lfr-border-color-top" />
+
+								<aui:input label="right" name="lfr-border-color-right" />
+
+								<aui:input label="bottom" name="lfr-border-color-bottom" />
+
+								<aui:input label="left" name="lfr-border-color-left" />
+							</aui:fieldset>
+						</aui:col>
+					</aui:row>
+				</aui:fieldset>
+
+				<aui:fieldset cssClass="spacing fieldset" id="spacing-styles">
+					<aui:row>
+						<aui:col cssClass="lfr-padding use-for-all-column" width="<%= 50 %>">
+							<aui:fieldset label="padding">
+								<aui:input checked="checked" cssClass="lfr-use-for-all" label="same-for-all" name="lfr-use-for-all-padding" type="checkbox" />
+
+								<span class="field-row">
+									<aui:input inlineField="<%= true %>" label="top" name="lfr-padding-top" />
+
+									<aui:select inlineField="<%= true %>" label="" name="lfr-padding-top-unit">
+										<aui:option label="%" />
+										<aui:option label="px" />
+										<aui:option label="em" />
+									</aui:select>
+								</span>
+
+								<span class="field-row">
+									<aui:input inlineField="<%= true %>" label="right" name="lfr-padding-right" />
+
+									<aui:select inlineField="<%= true %>" label="" name="lfr-padding-right-unit">
+										<aui:option label="%" />
+										<aui:option label="px" />
+										<aui:option label="em" />
+									</aui:select>
+								</span>
+
+								<span class="field-row">
+									<aui:input inlineField="<%= true %>" label="bottom" name="lfr-padding-bottom" />
+
+									<aui:select inlineField="<%= true %>" label="" name="lfr-padding-bottom-unit">
+										<aui:option label="%" />
+										<aui:option label="px" />
+										<aui:option label="em" />
+									</aui:select>
+								</span>
+
+								<span class="field-row">
+									<aui:input inlineField="<%= true %>" label="left" name="lfr-padding-left" />
+
+									<aui:select inlineField="<%= true %>" label="" name="lfr-padding-left-unit">
+										<aui:option label="%" />
+										<aui:option label="px" />
+										<aui:option label="em" />
+									</aui:select>
+								</span>
+							</aui:fieldset>
+						</aui:col>
+
+						<aui:col cssClass="lfr-margin use-for-all-column" last="<%= true %>" width="<%= 50 %>">
+							<aui:fieldset label="margin">
+								<aui:input checked="checked" cssClass="lfr-use-for-all" label="same-for-all" name="lfr-use-for-all-margin" type="checkbox" />
+
+								<span class="field-row">
+									<aui:input inlineField="<%= true %>" label="top" name="lfr-margin-top" />
+
+									<aui:select inlineField="<%= true %>" label="" name="lfr-margin-top-unit">
+										<aui:option label="%" />
+										<aui:option label="px" />
+										<aui:option label="em" />
+									</aui:select>
+								</span>
+
+								<span class="field-row">
+									<aui:input inlineField="<%= true %>" label="right" name="lfr-margin-right" />
+
+									<aui:select inlineField="<%= true %>" label="" name="lfr-margin-right-unit">
+										<aui:option label="%" />
+										<aui:option label="px" />
+										<aui:option label="em" />
+									</aui:select>
+								</span>
+
+								<span class="field-row">
+									<aui:input inlineField="<%= true %>" label="bottom" name="lfr-margin-bottom" />
+
+									<aui:select inlineField="<%= true %>" label="" name="lfr-margin-bottom-unit">
+										<aui:option label="%" />
+										<aui:option label="px" />
+										<aui:option label="em" />
+									</aui:select>
+								</span>
+
+								<span class="field-row">
+									<aui:input inlineField="<%= true %>" label="left" name="lfr-margin-left" />
+
+									<aui:select inlineField="<%= true %>" label="" name="lfr-margin-left-unit">
+										<aui:option label="%" />
+										<aui:option label="px" />
+										<aui:option label="em" />
+									</aui:select>
+								</span>
+							</aui:fieldset>
+						</aui:col>
+					</aui:row>
+				</aui:fieldset>
+
+				<aui:fieldset id="css-styling">
+					<aui:input label="enter-your-custom-css-class-names" name="lfr-custom-css-class-name" type="text" />
+
+					<aui:input cssClass="lfr-textarea-container" label="enter-your-custom-css" name="lfr-custom-css" type="textarea" />
+				</aui:fieldset>
+
+				<c:if test="<%= PropsValues.MOBILE_DEVICE_STYLING_WAP_ENABLED %>">
+					<aui:fieldset id="wap-styling">
+						<aui:input label="title" name="lfr-wap-title" />
+
+						<aui:select label="initial-window-state" name="lfr-wap-initial-window-state">
+							<aui:option label="minimized" value="MINIMIZED" />
+							<aui:option label="normal" value="NORMAL" />
+						</aui:select>
+					</aui:fieldset>
+				</c:if>
+
+				<aui:button-row>
+					<aui:button name="lfr-lookfeel-save" primary="<%= true %>" value="save" />
+
+					<aui:button name="lfr-lookfeel-reset" value="reset" />
+				</aui:button-row>
+			</div>
+		</aui:form>
+	</div>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_sharing/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_sharing/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_sharing/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_sharing/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_sharing/init.jsp
new file mode 100644
index 0000000..418b470
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_sharing/init.jsp
@@ -0,0 +1,19 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ include file="/html/portlet/portlet_sharing/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_sharing/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_sharing/view.jsp
new file mode 100644
index 0000000..8c512cf
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/portlet_sharing/view.jsp
@@ -0,0 +1,42 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portlet_sharing/init.jsp" %>
+
+<%
+String netvibesURL = ParamUtil.getString(request, "netvibesURL");
+String widgetURL = ParamUtil.getString(request, "widgetURL");
+%>
+
+<c:choose>
+	<c:when test="<%= Validator.isNotNull(widgetURL) %>">
+		<p>
+			<liferay-ui:message key="share-this-application-on-any-website" />
+		</p>
+
+		<textarea class="lfr-textarea" onClick="Liferay.Util.selectAndCopy(this);">&lt;script src=&quot;<%= themeDisplay.getPortalURL() %><%= themeDisplay.getPathContext() %>/html/js/liferay/widget.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;script type=&quot;text/javascript&quot;&gt;
+Liferay.Widget({ url: &#x27;<%= HtmlUtil.escape(widgetURL) %>&#x27;});
+&lt;/script&gt;</textarea>
+	</c:when>
+	<c:when test="<%= Validator.isNotNull(netvibesURL) %>">
+		<p>
+			<aui:a href="http://eco.netvibes.com/submit/widget" target="_blank"><liferay-ui:message key="add-this-application-to-netvibes" /></aui:a>
+		</p>
+
+		<liferay-ui:input-resource url="<%= netvibesURL %>" />
+	</c:when>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/quick_note/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/quick_note/css/.sass-cache/main.css
new file mode 100644
index 0000000..e5e8546
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/quick_note/css/.sass-cache/main.css
@@ -0,0 +1,37 @@
+.portlet-quick-note {
+  margin: 2px;
+  padding: 5px; }
+  .portlet-quick-note textarea {
+    min-height: 100px;
+    padding: 3px;
+    width: 95%; }
+  .portlet-quick-note .portlet-title-default {
+    float: none;
+    width: 100%; }
+  .portlet-quick-note .note-color {
+    border: 1px solid;
+    cursor: pointer;
+    float: right;
+    font-size: 0;
+    height: 10px;
+    margin: 3px 5px;
+    width: 10px; }
+    .portlet-quick-note .note-color.yellow {
+      background-color: #FFC;
+      border-color: #FC0;
+      margin-left: 0; }
+    .portlet-quick-note .note-color.green {
+      background-color: #CFC;
+      border-color: #0C0; }
+    .portlet-quick-note .note-color.blue {
+      background-color: #CCF;
+      border-color: #309; }
+    .portlet-quick-note .note-color.red {
+      background-color: #FCC;
+      border-color: #F00; }
+  .portlet-quick-note a.close-note {
+    float: right; }
+
+.ie6 .portlet-quick-note textarea {
+  height: expression(this.height < 100 ? '100px' : this.height); }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/quick_note/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/quick_note/css/main.css
new file mode 100644
index 0000000..5fe41f2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/quick_note/css/main.css
@@ -0,0 +1,58 @@
+.portlet-quick-note {
+	margin: 2px;
+	padding: 5px;
+
+	textarea {
+		min-height: 100px;
+		padding: 3px;
+		width: 95%;
+	}
+
+	.portlet-title-default {
+		float: none;
+		width: 100%;
+	}
+
+	.note-color {
+		border: 1px solid;
+		cursor: pointer;
+		float: right;
+		font-size: 0;
+		height: 10px;
+		margin: 3px 5px;
+		width: 10px;
+
+		&.yellow {
+			background-color: #FFC;
+			border-color: #FC0;
+			margin-left: 0;
+		}
+
+		&.green {
+			background-color: #CFC;
+			border-color: #0C0;
+		}
+
+		&.blue {
+			background-color: #CCF;
+			border-color: #309;
+		}
+
+		&.red {
+			background-color: #FCC;
+			border-color: #F00;
+		}
+	}
+
+	a.close-note {
+		float: right;
+	}
+}
+
+.ie6 {
+	.portlet-quick-note {
+		textarea {
+			height: expression(this.height < 100 ? '100px' : this.height);
+		}
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/quick_note/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/quick_note/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/quick_note/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/quick_note/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/quick_note/init.jsp
new file mode 100644
index 0000000..25bc6f7
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/quick_note/init.jsp
@@ -0,0 +1,24 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%
+String color = portletPreferences.getValue("color", "#FFFFCC");
+String data = portletPreferences.getValue("data", LanguageUtil.get(pageContext, "click-to-edit-me"));
+%>
+
+<%@ include file="/html/portlet/quick_note/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/quick_note/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/quick_note/view.jsp
new file mode 100644
index 0000000..f571c3d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/quick_note/view.jsp
@@ -0,0 +1,102 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/quick_note/init.jsp" %>
+
+<div id="<portlet:namespace />pad" style="background: <%= color %>;">
+	<c:if test="<%= portletDisplay.isShowConfigurationIcon() %>">
+		<table width="100%">
+		<tr>
+			<td width="60%">
+				<div class="portlet-title-default">&nbsp;</div>
+			</td>
+			<td>
+				<c:if test="<%= portletDisplay.isShowCloseIcon() %>">
+					<a border="0" class="close-note" href="<%= portletDisplay.getURLClose() %>"><img alt="<liferay-ui:message key="close" />" src="<%= themeDisplay.getPathThemeImages() %>/portlet/close.png" /></a>
+				</c:if>
+
+				<span class="note-color yellow"></span>
+				<span class="note-color green"></span>
+				<span class="note-color blue"></span>
+				<span class="note-color red"></span>
+			</td>
+		</tr>
+		</table>
+	</c:if>
+
+	<div id="<portlet:namespace />note"><%= StringUtil.replace(HtmlUtil.escape(data), "&lt;br /&gt;", "<br />") %></div>
+</div>
+
+<c:if test="<%= portletDisplay.isShowConfigurationIcon() %>">
+	<aui:script use="aui-editable-deprecated,aui-io-request">
+		var quickNotePad = A.one('#<portlet:namespace />pad');
+
+		if (quickNotePad) {
+			quickNotePad.all('.note-color').on(
+				'click',
+				function(event) {
+					var box = event.currentTarget;
+
+					var bgColor = box.getStyle('backgroundColor');
+
+					quickNotePad.setStyle('backgroundColor', bgColor);
+
+					A.io.request(
+						'<%= themeDisplay.getPathMain() %>/quick_note/save',
+						{
+							data: {
+								color: bgColor,
+								p_auth: Liferay.authToken,
+								p_l_id: '<%= plid %>',
+								portletId: '<%= portletDisplay.getId() %>'
+							}
+						}
+					);
+				}
+			);
+		}
+
+		new A.Editable(
+			{
+				inputType: 'textarea',
+				node: '#<portlet:namespace />note',
+				on: {
+					contentTextChange: function(event) {
+						var instance = this;
+
+						if (!event.initial) {
+							var newValue = event.newVal.replace(/\n/gi, '<br />');
+
+							event.newVal = instance._toText(event.newVal);
+
+							A.io.request(
+								'<%= themeDisplay.getPathMain() %>/quick_note/save',
+								{
+									data: {
+										data: newValue,
+										p_auth: '<%= AuthTokenUtil.getToken(request) %>',
+										p_l_id: '<%= plid %>',
+										portletId: '<%= portletDisplay.getId() %>'
+									}
+								}
+							);
+						}
+					}
+				}
+			}
+		);
+	</aui:script>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/recent_bloggers/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/recent_bloggers/configuration.jsp
new file mode 100644
index 0000000..3f605e4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/recent_bloggers/configuration.jsp
@@ -0,0 +1,125 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/recent_bloggers/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+String organizationName = StringPool.BLANK;
+
+Organization organization = null;
+
+if (organizationId > 0) {
+	organization = OrganizationLocalServiceUtil.getOrganization(organizationId);
+
+	organizationName = organization.getName();
+}
+%>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="preferences--organizationId--" type="hidden" value="<%= organizationId %>" />
+
+	<aui:fieldset>
+		<aui:select name="preferences--selectionMethod--">
+			<aui:option label="users" selected='<%= selectionMethod.equals("users") %>' />
+			<aui:option label="scope" selected='<%= selectionMethod.equals("scope") %>' />
+		</aui:select>
+
+		<div id="<portlet:namespace />UsersSelectionOptions">
+			<aui:field-wrapper label="organization">
+				<div class="input-append">
+					<liferay-ui:input-resource id="organizationName" url="<%= HtmlUtil.escape(organizationName) %>" />
+
+					<aui:button name="selectOrganizationButton" value="select" />
+
+					<aui:button disabled="<%= organizationId <= 0 %>" name="removeOrganizationButton" onClick='<%= renderResponse.getNamespace() + "removeOrganization();" %>' value="remove" />
+				</div>
+			</aui:field-wrapper>
+		</div>
+
+		<aui:select name="preferences--displayStyle--">
+			<aui:option label="user-name-and-image" selected='<%= displayStyle.equals("user-name-and-image") %>' />
+			<aui:option label="user-name" selected='<%= displayStyle.equals("user-name") %>' />
+		</aui:select>
+
+		<aui:select label="maximum-bloggers-to-display" name="preferences--max--">
+			<aui:option label="1" selected="<%= max == 1 %>" />
+			<aui:option label="2" selected="<%= max == 2 %>" />
+			<aui:option label="3" selected="<%= max == 3 %>" />
+			<aui:option label="4" selected="<%= max == 4 %>" />
+			<aui:option label="5" selected="<%= max == 5 %>" />
+			<aui:option label="10" selected="<%= max == 10 %>" />
+			<aui:option label="15" selected="<%= max == 15 %>" />
+			<aui:option label="20" selected="<%= max == 20 %>" />
+			<aui:option label="25" selected="<%= max == 25 %>" />
+			<aui:option label="30" selected="<%= max == 30 %>" />
+			<aui:option label="40" selected="<%= max == 40 %>" />
+			<aui:option label="50" selected="<%= max == 50 %>" />
+			<aui:option label="60" selected="<%= max == 60 %>" />
+			<aui:option label="70" selected="<%= max == 70 %>" />
+			<aui:option label="80" selected="<%= max == 80 %>" />
+			<aui:option label="90" selected="<%= max == 90 %>" />
+			<aui:option label="100" selected="<%= max == 100 %>" />
+		</aui:select>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script use="aui-base">
+	A.one('#<portlet:namespace />selectOrganizationButton').on(
+		'click',
+		function(event) {
+			Liferay.Util.selectEntity(
+				{
+					dialog: {
+						constrain: true,
+						modal: true
+					},
+					id: '<portlet:namespace />selectOrganization',
+					title: '<liferay-ui:message arguments="organization" key="select-x" />',
+					uri: '<portlet:renderURL windowState="<%= LiferayWindowState.POP_UP.toString() %>"><portlet:param name="struts_action" value="/portlet_configuration/select_organization" /><portlet:param name="tabs1" value="organizations" /></portlet:renderURL>'
+				},
+				function(event) {
+					document.<portlet:namespace />fm.<portlet:namespace />organizationId.value = event.organizationid;
+
+					document.getElementById('<portlet:namespace />organizationName').value = event.name;
+
+					Liferay.Util.toggleDisabled('#<portlet:namespace />removeOrganizationButton', false);
+				}
+			);
+		}
+	);
+</aui:script>
+
+<aui:script>
+	function <portlet:namespace />removeOrganization() {
+		document.<portlet:namespace />fm.<portlet:namespace />organizationId.value = "";
+
+		document.getElementById('<portlet:namespace />organizationName').value = "";
+
+		Liferay.Util.toggleDisabled('#<portlet:namespace />removeOrganizationButton', true);
+	}
+
+	Liferay.Util.toggleSelectBox('<portlet:namespace />selectionMethod', 'users', '<portlet:namespace />UsersSelectionOptions');
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/recent_bloggers/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/recent_bloggers/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/recent_bloggers/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/recent_bloggers/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/recent_bloggers/init.jsp
new file mode 100644
index 0000000..e3aaa99
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/recent_bloggers/init.jsp
@@ -0,0 +1,41 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.blogs.model.BlogsStatsUser" %><%@
+page import="com.liferay.portlet.blogs.service.BlogsEntryLocalServiceUtil" %><%@
+page import="com.liferay.portlet.blogs.service.BlogsStatsUserLocalServiceUtil" %><%@
+page import="com.liferay.portlet.blogs.util.comparator.StatsUserLastPostDateComparator" %>
+
+<%
+String selectionMethod = portletPreferences.getValue("selectionMethod", "users");
+long organizationId = GetterUtil.getLong(portletPreferences.getValue("organizationId", "0"));
+String displayStyle = portletPreferences.getValue("displayStyle", "user-name-and-image");
+int max = GetterUtil.getInteger(portletPreferences.getValue("max", "10"));
+
+if (organizationId == 0) {
+	Group group = GroupLocalServiceUtil.getGroup(scopeGroupId);
+
+	if (group.isOrganization()) {
+		organizationId = group.getOrganizationId();
+	}
+}
+
+Format dateFormatDate = FastDateFormatFactoryUtil.getDate(locale, timeZone);
+%>
+
+<%@ include file="/html/portlet/recent_bloggers/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/recent_bloggers/user_display.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/recent_bloggers/user_display.jsp
new file mode 100644
index 0000000..de45f1f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/recent_bloggers/user_display.jsp
@@ -0,0 +1,40 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/recent_bloggers/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+Object[] objArray = (Object[])row.getObject();
+
+BlogsStatsUser statsUser = (BlogsStatsUser)objArray[0];
+String rowHREF = (String)objArray[1];
+%>
+
+<liferay-ui:user-display url="<%= rowHREF %>" userId="<%= statsUser.getUserId() %>">
+	<div class="blogger-post-count">
+		<span><liferay-ui:message key="posts" />:</span> <%= statsUser.getEntryCount() %>
+	</div>
+
+	<div class="blogger-stars">
+		<span><liferay-ui:message key="stars" />:</span> <%= statsUser.getRatingsTotalEntries() %>
+	</div>
+
+	<div class="blogger-date">
+		<span><liferay-ui:message key="date" />:</span> <%= dateFormatDate.format(statsUser.getLastPostDate()) %>
+	</div>
+</liferay-ui:user-display>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/recent_bloggers/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/recent_bloggers/view.jsp
new file mode 100644
index 0000000..a644a9c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/recent_bloggers/view.jsp
@@ -0,0 +1,116 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/recent_bloggers/init.jsp" %>
+
+<%
+List statsUsers = null;
+
+if (selectionMethod.equals("users")) {
+	if (organizationId > 0) {
+		statsUsers = BlogsStatsUserLocalServiceUtil.getOrganizationStatsUsers(organizationId, 0, max, new StatsUserLastPostDateComparator());
+	}
+	else {
+		statsUsers = BlogsStatsUserLocalServiceUtil.getGroupsStatsUsers(company.getCompanyId(), scopeGroupId, 0, max);
+	}
+}
+else {
+	statsUsers = BlogsStatsUserLocalServiceUtil.getGroupStatsUsers(scopeGroupId, 0, max);
+}
+%>
+
+<c:choose>
+	<c:when test="<%= statsUsers.isEmpty() %>">
+		<liferay-ui:message key="there-are-no-recent-bloggers" />
+	</c:when>
+	<c:otherwise>
+
+		<%
+		SearchContainer searchContainer = new SearchContainer();
+
+		List<String> headerNames = new ArrayList<String>();
+
+		headerNames.add("user");
+		headerNames.add("posts");
+		headerNames.add("date");
+
+		if (displayStyle.equals("user-name")) {
+			searchContainer.setHeaderNames(headerNames);
+		}
+
+		List resultRows = searchContainer.getResultRows();
+
+		for (int i = 0; i < statsUsers.size(); i++) {
+			BlogsStatsUser statsUser = (BlogsStatsUser)statsUsers.get(i);
+
+			try {
+				Group group = GroupLocalServiceUtil.getGroup(statsUser.getGroupId());
+				User user2 = UserLocalServiceUtil.getUserById(statsUser.getUserId());
+
+				Date now = new Date();
+
+				int entryCount = BlogsEntryLocalServiceUtil.getGroupUserEntriesCount(group.getGroupId(), user2.getUserId(), now, WorkflowConstants.STATUS_APPROVED);
+
+				List entries = BlogsEntryLocalServiceUtil.getGroupUserEntries(group.getGroupId(), user2.getUserId(), now, WorkflowConstants.STATUS_APPROVED, 0, 1);
+
+				if (entries.size() == 1) {
+					BlogsEntry entry = (BlogsEntry)entries.get(0);
+
+					StringBundler sb = new StringBundler(4);
+
+					sb.append(themeDisplay.getPathMain());
+					sb.append("/blogs/find_entry?entryId=");
+					sb.append(entry.getEntryId());
+					sb.append("&showAllEntries=0");
+
+					String rowHREF = sb.toString();
+
+					ResultRow row = new ResultRow(new Object[] {statsUser, rowHREF}, statsUser.getStatsUserId(), i);
+
+					if (displayStyle.equals("user-name")) {
+
+						// User
+
+						row.addText(HtmlUtil.escape(user2.getFullName()), rowHREF);
+
+						// Number of posts
+
+						row.addText(String.valueOf(entryCount), rowHREF);
+
+						// Last post date
+
+						row.addDate(entry.getModifiedDate(), rowHREF);
+					}
+					else {
+
+						// User display
+
+						row.addJSP("/html/portlet/recent_bloggers/user_display.jsp");
+					}
+
+					// Add result row
+
+					resultRows.add(row);
+				}
+			}
+			catch (Exception e) {
+			}
+		}
+		%>
+
+		<liferay-ui:search-iterator paginate="<%= false %>" searchContainer="<%= searchContainer %>" />
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/recent_documents/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/recent_documents/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/recent_documents/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/recent_documents/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/recent_documents/init.jsp
new file mode 100644
index 0000000..0382ad3
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/recent_documents/init.jsp
@@ -0,0 +1,21 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.documentlibrary.model.DLFileRank" %>
+
+<%@ include file="/html/portlet/recent_documents/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/recent_documents/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/recent_documents/view.jsp
new file mode 100644
index 0000000..39154f1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/recent_documents/view.jsp
@@ -0,0 +1,61 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/recent_documents/init.jsp" %>
+
+<%
+List fileRanks = DLAppLocalServiceUtil.getFileRanks(scopeGroupId, user.getUserId());
+%>
+
+<c:choose>
+	<c:when test="<%= fileRanks.isEmpty() %>">
+		<liferay-ui:message key="there-are-no-recent-downloads" />
+	</c:when>
+	<c:otherwise>
+		<table class="lfr-table">
+
+		<%
+		for (int i = 0; i < fileRanks.size(); i++) {
+			DLFileRank fileRank = (DLFileRank)fileRanks.get(i);
+
+			try {
+				FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(fileRank.getFileEntryId());
+
+				fileEntry = fileEntry.toEscapedModel();
+
+				PortletURL rowURL = renderResponse.createActionURL();
+
+				rowURL.setParameter("struts_action", "/recent_documents/get_file");
+				rowURL.setParameter("fileEntryId", String.valueOf(fileRank.getFileEntryId()));
+				rowURL.setWindowState(LiferayWindowState.EXCLUSIVE);
+		%>
+
+				<tr>
+					<td>
+						<a href="<%= rowURL.toString() %>"><img align="left" alt="" border="0" src="<%= themeDisplay.getPathThemeImages() %>/file_system/small/<%= fileEntry.getIcon() %>.png" /><%= fileEntry.getTitle() %></a>
+					</td>
+				</tr>
+
+		<%
+			}
+			catch (Exception e) {
+			}
+		}
+		%>
+
+		</table>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/requests/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/requests/error.jsp
new file mode 100644
index 0000000..71ff907
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/requests/error.jsp
@@ -0,0 +1,25 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/requests/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= NoSuchRequestException.class %>" message="the-request-could-not-be-found" />
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/requests/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/requests/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/requests/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/requests/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/requests/init.jsp
new file mode 100644
index 0000000..7e53338
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/requests/init.jsp
@@ -0,0 +1,25 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.social.NoSuchRequestException" %><%@
+page import="com.liferay.portlet.social.model.SocialRequest" %><%@
+page import="com.liferay.portlet.social.model.SocialRequestConstants" %><%@
+page import="com.liferay.portlet.social.model.SocialRequestFeedEntry" %><%@
+page import="com.liferay.portlet.social.service.SocialRequestInterpreterLocalServiceUtil" %>
+
+<%@ include file="/html/portlet/requests/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/requests/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/requests/view.jsp
new file mode 100644
index 0000000..941d007
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/requests/view.jsp
@@ -0,0 +1,115 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/requests/init.jsp" %>
+
+<%
+List<SocialRequest> requests = (List<SocialRequest>)request.getAttribute(WebKeys.SOCIAL_REQUESTS);
+%>
+
+<c:choose>
+	<c:when test="<%= (requests == null) || requests.isEmpty() %>">
+
+		<%
+		renderRequest.setAttribute(WebKeys.PORTLET_CONFIGURATOR_VISIBILITY, Boolean.TRUE);
+		%>
+
+	</c:when>
+	<c:otherwise>
+
+		<%
+		PortletURL portletURL = renderResponse.createActionURL();
+
+		portletURL.setParameter("struts_action", "/requests/update_request");
+		portletURL.setParameter("redirect", currentURL);
+
+		for (int i = 0; i < requests.size(); i++) {
+			SocialRequest socialRequest = requests.get(i);
+
+			SocialRequestFeedEntry requestFeedEntry = SocialRequestInterpreterLocalServiceUtil.interpret(socialRequest, themeDisplay);
+		%>
+
+			<aui:row>
+				<aui:col width="<%= 50 %>">
+					<liferay-ui:user-display
+						displayStyle="<%= 2 %>"
+						userId="<%= socialRequest.getUserId() %>"
+					/>
+				</aui:col>
+				<aui:col width="<%= 50 %>">
+					<c:choose>
+						<c:when test="<%= requestFeedEntry == null %>">
+							<div class="alert alert-error">
+								<liferay-ui:message key="request-cannot-be-interpreted-because-it-does-not-have-an-associated-interpreter" />
+							</div>
+						</c:when>
+						<c:otherwise>
+
+							<%
+							portletURL.setParameter("requestId", String.valueOf(socialRequest.getRequestId()));
+							%>
+
+							<div class="request-title">
+								<%= requestFeedEntry.getTitle() %>
+							</div>
+
+							<br />
+
+							<c:if test="<%= Validator.isNotNull(requestFeedEntry.getBody()) %>">
+								<div class="request-body">
+									<%= requestFeedEntry.getBody() %>
+								</div>
+
+								<br />
+							</c:if>
+
+							<liferay-ui:icon-list>
+
+								<%
+								portletURL.setParameter("status", String.valueOf(SocialRequestConstants.STATUS_CONFIRM));
+								%>
+
+								<liferay-ui:icon
+									image="activate"
+									message="confirm"
+									url="<%= portletURL.toString() %>"
+								/>
+
+								<%
+								portletURL.setParameter("status", String.valueOf(SocialRequestConstants.STATUS_IGNORE));
+								%>
+
+								<liferay-ui:icon
+									image="deactivate"
+									message="ignore"
+									url="<%= portletURL.toString() %>"
+								/>
+							</liferay-ui:icon-list>
+						</c:otherwise>
+					</c:choose>
+				</aui:col>
+			</aui:row>
+
+			<c:if test="<%= (i + 1) < requests.size() %>">
+				<div class="separator"><!-- --></div>
+			</c:if>
+
+		<%
+		}
+		%>
+
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role.jsp
new file mode 100644
index 0000000..c03d8a3
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role.jsp
@@ -0,0 +1,152 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/roles_admin/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+String backURL = ParamUtil.getString(request, "backURL", redirect);
+
+Role role = (Role)request.getAttribute(WebKeys.ROLE);
+
+long roleId = BeanParamUtil.getLong(role, request, "roleId");
+
+int type = ParamUtil.getInteger(request, "type");
+String subtype = BeanParamUtil.getString(role, request, "subtype");
+%>
+
+<liferay-ui:header
+	backURL="<%= backURL %>"
+	localizeTitle="<%= (role == null) %>"
+	title='<%= (role == null) ? "new-role" : role.getTitle(locale) %>'
+/>
+
+<c:if test="<%= role != null %>">
+	<liferay-util:include page="/html/portlet/roles_admin/edit_role_tabs.jsp">
+		<liferay-util:param name="tabs1" value="edit" />
+		<liferay-util:param name="backURL" value="<%= backURL %>" />
+	</liferay-util:include>
+</c:if>
+
+<portlet:actionURL var="editRoleActionURL">
+	<portlet:param name="struts_action" value="/roles_admin/edit_role" />
+	<portlet:param name="backURL" value="<%= backURL %>" />
+</portlet:actionURL>
+
+<aui:form action="<%= editRoleActionURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= (role == null) ? Constants.ADD : Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="roleId" type="hidden" value="<%= roleId %>" />
+
+	<liferay-ui:error exception="<%= DuplicateRoleException.class %>" message="please-enter-a-unique-name" />
+	<liferay-ui:error exception="<%= RequiredRoleException.class %>" message="old-role-name-is-a-required-system-role" />
+	<liferay-ui:error exception="<%= RoleNameException.class %>" message="please-enter-a-valid-name" />
+
+	<aui:model-context bean="<%= role %>" model="<%= Role.class %>" />
+
+	<aui:fieldset>
+		<c:choose>
+			<c:when test="<%= ((role == null) && (type == 0)) %>">
+				<aui:select name="type">
+					<aui:option label="regular" value="<%= RoleConstants.TYPE_REGULAR %>" />
+					<aui:option label="site" value="<%= RoleConstants.TYPE_SITE %>" />
+					<aui:option label="organization" value="<%= RoleConstants.TYPE_ORGANIZATION %>" />
+				</aui:select>
+			</c:when>
+			<c:when test="<%= (role == null) %>">
+				<aui:field-wrapper label="type">
+					<liferay-ui:input-resource url="<%= LanguageUtil.get(pageContext, RoleConstants.getTypeLabel(type)) %>" />
+				</aui:field-wrapper>
+
+				<aui:input name="type" type="hidden" value="<%= String.valueOf(type) %>" />
+			</c:when>
+			<c:otherwise>
+				<aui:field-wrapper label="type">
+					<liferay-ui:input-resource url="<%= LanguageUtil.get(pageContext, role.getTypeLabel()) %>" />
+				</aui:field-wrapper>
+			</c:otherwise>
+		</c:choose>
+
+		<c:choose>
+			<c:when test="<%= (role != null) && PortalUtil.isSystemRole(role.getName()) %>">
+				<aui:input name="name" type="hidden" value="<%= role.getName() %>" />
+			</c:when>
+			<c:otherwise>
+				<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" label='<%= (role != null) ? "new-name" : "name" %>' name="name" />
+			</c:otherwise>
+		</c:choose>
+
+		<aui:input name="title" />
+
+		<aui:input name="description" />
+
+		<c:if test="<%= role != null %>">
+
+			<%
+			String[] subtypes = null;
+
+			if (role.getType() == RoleConstants.TYPE_ORGANIZATION) {
+				subtypes = PropsValues.ROLES_ORGANIZATION_SUBTYPES;
+			}
+			else if (role.getType() == RoleConstants.TYPE_REGULAR) {
+				subtypes = PropsValues.ROLES_REGULAR_SUBTYPES;
+			}
+			else if (role.getType() == RoleConstants.TYPE_SITE) {
+				subtypes = PropsValues.ROLES_SITE_SUBTYPES;
+			}
+			else {
+				subtypes = new String[0];
+			}
+			%>
+
+			<c:if test="<%= subtypes.length > 0 %>">
+				<aui:select name="subtype">
+					<aui:option value="" />
+
+					<%
+					for (String curSubtype : subtypes) {
+					%>
+
+						<aui:option label="<%= curSubtype %>" selected="<%= subtype.equals(curSubtype) %>" />
+
+					<%
+					}
+					%>
+
+				</aui:select>
+			</c:if>
+		</c:if>
+
+		<aui:fieldset>
+			<liferay-ui:custom-attribute-list
+				className="<%= Role.class.getName() %>"
+				classPK="<%= (role != null) ? role.getRoleId() : 0 %>"
+				editable="<%= true %>"
+				label="<%= true %>"
+			/>
+		</aui:fieldset>
+
+		<aui:button-row>
+			<aui:button type="submit" />
+
+			<aui:button href="<%= redirect %>" type="cancel" />
+		</aui:button-row>
+	</aui:fieldset>
+</aui:form>
+
+<%
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, ((role == null) ? "add-role" : "edit")), currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role_assignments.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role_assignments.jsp
new file mode 100644
index 0000000..df7117b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role_assignments.jsp
@@ -0,0 +1,136 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/roles_admin/init.jsp" %>
+
+<%
+String tabs1 = ParamUtil.getString(request, "tabs1");
+String tabs2 = ParamUtil.getString(request, "tabs2", "users");
+String tabs3 = ParamUtil.getString(request, "tabs3", "current");
+
+int cur = ParamUtil.getInteger(request, SearchContainer.DEFAULT_CUR_PARAM);
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+Role role = (Role)request.getAttribute(WebKeys.ROLE);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/roles_admin/edit_role_assignments");
+portletURL.setParameter("tabs1", tabs1);
+portletURL.setParameter("tabs2", tabs2);
+portletURL.setParameter("tabs3", tabs3);
+portletURL.setParameter("redirect", redirect);
+portletURL.setParameter("roleId", String.valueOf(role.getRoleId()));
+
+request.setAttribute("edit_role_assignments.jsp-tabs3", tabs3);
+
+request.setAttribute("edit_role_assignments.jsp-cur", cur);
+
+request.setAttribute("edit_role_assignments.jsp-role", role);
+
+request.setAttribute("edit_role_assignments.jsp-portletURL", portletURL);
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	localizeTitle="<%= false %>"
+	title="<%= role.getTitle(locale) %>"
+/>
+
+<liferay-util:include page="/html/portlet/roles_admin/edit_role_tabs.jsp">
+	<liferay-util:param name="tabs1" value="assign-members" />
+	<liferay-util:param name="backURL" value="<%= redirect %>" />
+</liferay-util:include>
+
+<portlet:actionURL var="editAssignmentsURL">
+	<portlet:param name="struts_action" value="/roles_admin/edit_role_assignments" />
+</portlet:actionURL>
+
+<aui:form action="<%= editAssignmentsURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="tabs1" type="hidden" value="<%= tabs1 %>" />
+	<aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
+	<aui:input name="tabs3" type="hidden" value="<%= tabs3 %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="assignmentsRedirect" type="hidden" />
+	<aui:input name="roleId" type="hidden" value="<%= role.getRoleId() %>" />
+
+	<liferay-ui:tabs
+		names="users,sites,organizations,user-groups"
+		param="tabs2"
+		url="<%= portletURL.toString() %>"
+	/>
+
+	<c:choose>
+		<c:when test='<%= tabs2.equals("users") %>'>
+			<liferay-util:include page="/html/portlet/users_admin/edit_role_assignments_users.jsp" />
+		</c:when>
+		<c:when test='<%= tabs2.equals("sites") %>'>
+			<liferay-util:include page="/html/portlet/sites_admin/edit_role_assignments_sites.jsp" />
+		</c:when>
+		<c:when test='<%= tabs2.equals("organizations") %>'>
+			<liferay-util:include page="/html/portlet/users_admin/edit_role_assignments_organizations.jsp" />
+		</c:when>
+		<c:when test='<%= tabs2.equals("user-groups") %>'>
+			<liferay-util:include page="/html/portlet/users_admin/edit_role_assignments_user_groups.jsp" />
+		</c:when>
+	</c:choose>
+</aui:form>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />updateRoleGroups',
+		function(assignmentsRedirect) {
+			document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "role_groups";
+			document.<portlet:namespace />fm.<portlet:namespace />assignmentsRedirect.value = assignmentsRedirect;
+			document.<portlet:namespace />fm.<portlet:namespace />addGroupIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+			document.<portlet:namespace />fm.<portlet:namespace />removeGroupIds.value = Liferay.Util.listUncheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['liferay-util-list-fields']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />updateRoleUsers',
+		function(assignmentsRedirect) {
+			document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "role_users";
+			document.<portlet:namespace />fm.<portlet:namespace />assignmentsRedirect.value = assignmentsRedirect;
+			document.<portlet:namespace />fm.<portlet:namespace />addUserIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+			document.<portlet:namespace />fm.<portlet:namespace />removeUserIds.value = Liferay.Util.listUncheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
+
+<%
+PortletURL assignMembersURL = renderResponse.createRenderURL();
+
+assignMembersURL.setParameter("struts_action", "/roles_admin/edit_role_assignments");
+assignMembersURL.setParameter("redirect", redirect);
+assignMembersURL.setParameter("roleId", String.valueOf(role.getRoleId()));
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "assign-members"), assignMembersURL.toString());
+
+assignMembersURL.setParameter("tabs2", tabs2);
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, tabs2), assignMembersURL.toString());
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role_permissions.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role_permissions.jsp
new file mode 100644
index 0000000..2b63eee
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role_permissions.jsp
@@ -0,0 +1,400 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/roles_admin/init.jsp" %>
+
+<%
+String cmd = ParamUtil.getString(request, Constants.CMD);
+
+String tabs1 = "roles";
+String tabs2 = ParamUtil.getString(request, "tabs2", "current");
+
+String redirect = ParamUtil.getString(request, "redirect");
+String backURL = ParamUtil.getString(request, "backURL", redirect);
+
+Role role = (Role)request.getAttribute(WebKeys.ROLE);
+
+String portletResource = ParamUtil.getString(request, "portletResource");
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/roles_admin/edit_role_permissions");
+portletURL.setParameter(Constants.CMD, Constants.VIEW);
+portletURL.setParameter("tabs1", tabs1);
+portletURL.setParameter("tabs2", tabs2);
+portletURL.setParameter("backURL", backURL);
+portletURL.setParameter("roleId", String.valueOf(role.getRoleId()));
+%>
+
+<liferay-portlet:resourceURL copyCurrentRenderParameters="<%= false %>" varImpl="editPermissionsURL">
+	<portlet:param name="struts_action" value="/roles_admin/edit_role_permissions" />
+	<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.EDIT %>" />
+	<portlet:param name="tabs1" value="roles" />
+	<portlet:param name="redirect" value="<%= backURL %>" />
+	<portlet:param name="roleId" value="<%= String.valueOf(role.getRoleId()) %>" />
+</liferay-portlet:resourceURL>
+
+<c:choose>
+	<c:when test="<%= !portletName.equals(PortletKeys.ADMIN_SERVER) %>">
+		<liferay-ui:header
+			backURL="<%= backURL %>"
+			localizeTitle="<%= false %>"
+			title="<%= role.getTitle(locale) %>"
+		/>
+
+		<liferay-util:include page="/html/portlet/roles_admin/edit_role_tabs.jsp">
+			<liferay-util:param name="tabs1" value="define-permissions" />
+			<liferay-util:param name="backURL" value="<%= backURL %>" />
+		</liferay-util:include>
+	</c:when>
+	<c:otherwise>
+
+		<%
+		request.setAttribute("edit_role_permissions.jsp-role", role);
+
+		request.setAttribute("edit_role_permissions.jsp-portletResource", portletResource);
+		%>
+
+	</c:otherwise>
+</c:choose>
+
+<liferay-ui:success key="permissionDeleted" message="the-permission-was-deleted" />
+<liferay-ui:success key="permissionsUpdated" message="the-role-permissions-were-updated" />
+
+<aui:container id="permissionContainer">
+	<aui:row>
+		<c:if test="<%= !portletName.equals(PortletKeys.ADMIN_SERVER) %>">
+			<aui:col width="<%= 25 %>">
+				<%@ include file="/html/portlet/roles_admin/edit_role_permissions_navigation.jspf" %>
+			</aui:col>
+		</c:if>
+
+		<aui:col id="permissionContentContainer" width="<%= portletName.equals(PortletKeys.ADMIN_SERVER) ? 100 : 75 %>">
+			<c:choose>
+				<c:when test="<%= cmd.equals(Constants.VIEW) %>">
+					<liferay-util:include page="/html/portlet/roles_admin/edit_role_permissions_summary.jsp" />
+
+					<c:if test="<%= portletName.equals(PortletKeys.ADMIN_SERVER) %>">
+						<br />
+
+						<aui:button href="<%= redirect %>" type="cancel" />
+					</c:if>
+				</c:when>
+				<c:otherwise>
+					<liferay-util:include page="/html/portlet/roles_admin/edit_role_permissions_form.jsp" />
+				</c:otherwise>
+			</c:choose>
+		</aui:col>
+	</aui:row>
+</aui:container>
+
+<aui:script>
+	function <portlet:namespace />removeGroup(pos, target) {
+		var selectedGroupIds = document.<portlet:namespace />fm['<portlet:namespace />groupIds' + target].value.split(",");
+		var selectedGroupNames = document.<portlet:namespace />fm['<portlet:namespace />groupNames' + target].value.split("@@");
+
+		selectedGroupIds.splice(pos, 1);
+		selectedGroupNames.splice(pos, 1);
+
+		<portlet:namespace />updateGroups(selectedGroupIds, selectedGroupNames, target);
+	}
+
+	function <portlet:namespace />selectOrganization(organizationId, groupId, name, type, target) {
+		<portlet:namespace />selectGroup(groupId, name, target);
+	}
+
+	function <portlet:namespace />updateGroups(selectedGroupIds, selectedGroupNames, target) {
+		document.<portlet:namespace />fm['<portlet:namespace />groupIds' + target].value = selectedGroupIds.join(',');
+		document.<portlet:namespace />fm['<portlet:namespace />groupNames' + target].value = selectedGroupNames.join('@@');
+
+		var nameEl = document.getElementById("<portlet:namespace />groupHTML" + target);
+
+		var groupsHTML = '';
+
+		for (var i = 0; i < selectedGroupIds.length; i++) {
+			var id = selectedGroupIds[i];
+			var name = selectedGroupNames[i];
+
+			groupsHTML += '<span class="lfr-token"><span class="lfr-token-text">' + name + '</span><a class="icon icon-remove lfr-token-close" href="javascript:<portlet:namespace />removeGroup(' + i + ', \'' + target + '\' );"></a></span>';
+		}
+
+		if (groupsHTML == '') {
+			groupsHTML = '<%= UnicodeLanguageUtil.get(pageContext, "all-sites") %>';
+		}
+
+		nameEl.innerHTML = groupsHTML;
+	}
+</aui:script>
+
+<aui:script use="aui-io-request,aui-loading-mask-deprecated,aui-parse-content,aui-toggler,autocomplete-base,autocomplete-filters,liferay-notice">
+	var AArray = A.Array;
+	var AParseContent = A.Plugin.ParseContent;
+
+	var notification;
+
+	var permissionNavigationDataContainer = A.one('#<portlet:namespace />permissionNavigationDataContainer');
+
+	var togglerDelegate;
+
+	function createLiveSearch() {
+		var instance = this;
+
+		var trim = A.Lang.trim;
+
+		var PermissionNavigationSearch = A.Component.create (
+			{
+				AUGMENTS: [A.AutoCompleteBase],
+
+				EXTENDS: A.Base,
+
+				NAME: 'searchpermissioNnavigation',
+
+				prototype: {
+					initializer: function() {
+						var instance = this;
+
+						instance._bindUIACBase();
+						instance._syncUIACBase();
+					}
+				}
+			}
+		);
+
+		var getItems = function() {
+			var results = [];
+
+			permissionNavigationItems.each(
+				function(item, index, collection) {
+					results.push(
+						{
+							node: item.ancestor(),
+							data: trim(item.text())
+						}
+					);
+				}
+			);
+
+			return results;
+		};
+
+		var getNoResultsNode = function() {
+			if (!noResultsNode) {
+				noResultsNode = A.Node.create('<div class="alert"><%= LanguageUtil.get(pageContext, "there-are-no-results") %></div>');
+			}
+
+			return noResultsNode;
+		};
+
+		var permissionNavigationItems = permissionNavigationDataContainer.all('.permission-navigation-item');
+
+		var permissionNavigationSectionsNode = permissionNavigationDataContainer.all('.permission-navigation-section');
+
+		var noResultsNode;
+
+		var permissionNavigationSearch = new PermissionNavigationSearch(
+			{
+				inputNode: '#<portlet:namespace />permissionNavigationSearch',
+				minQueryLength: 0,
+				nodes: '.permission-navigation-item-container',
+				resultFilters: 'phraseMatch',
+				resultTextLocator: 'data',
+				source: getItems()
+			}
+		);
+
+		permissionNavigationSearch.on(
+			'query',
+			function(event) {
+				if (event.query) {
+					togglerDelegate.expandAll();
+				}
+				else {
+					togglerDelegate.collapseAll();
+				}
+			}
+		);
+
+		permissionNavigationSearch.on(
+			'results',
+			function(event) {
+				permissionNavigationItems.each(
+					function(item, index, collection) {
+						item.ancestor().addClass('hide');
+					}
+				);
+
+				AArray.each(
+					event.results,
+					function(item, index, collection) {
+						item.raw.node.removeClass('hide');
+					}
+				);
+
+				var foundVisibleSection;
+
+				permissionNavigationSectionsNode.each(
+					function(item, index, collection) {
+						var action = 'addClass';
+
+						var visibleItem = item.one('.permission-navigation-item-container:not(.hide)');
+
+						if (visibleItem) {
+							action = 'removeClass';
+
+							foundVisibleSection = true;
+						}
+
+						item[action]('hide');
+					}
+				);
+
+				var noResultsNode = getNoResultsNode();
+
+				if (foundVisibleSection) {
+					noResultsNode.remove();
+				}
+				else {
+					permissionNavigationDataContainer.appendChild(noResultsNode);
+				}
+			}
+		);
+	}
+
+	function getNotification() {
+		if (!notification) {
+			notification = new Liferay.Notice(
+				{
+					closeText: false,
+					content: '<%= UnicodeLanguageUtil.get(pageContext, "sorry,-we-were-not-able-to-access-the-server") %>' + '<button type="button" class="close">&times;</button>',
+					noticeClass: 'hide',
+					timeout: 10000,
+					toggleText: false,
+					type: 'warning',
+					useAnimation: true
+				}
+			);
+		}
+
+		return notification;
+	}
+
+	function processNavigationLinks() {
+		var permissionContainerNode = A.one('#<portlet:namespace />permissionContainer');
+
+		var permissionContentContainerNode = permissionContainerNode.one('#<portlet:namespace />permissionContentContainer');
+
+		var navigationLink = permissionContainerNode.delegate(
+			'click',
+			function(event) {
+				event.preventDefault();
+
+				permissionContentContainerNode.plug(A.LoadingMask);
+
+				permissionContentContainerNode.loadingmask.show();
+
+				permissionContentContainerNode.unplug(AParseContent);
+
+				A.io.request(
+					event.currentTarget.attr('href'),
+					{
+						on: {
+							failure: function() {
+								permissionContentContainerNode.loadingmask.hide();
+
+								getNotification().show();
+							},
+							success: function(event, id, obj) {
+								if (notification) {
+									notification.hide();
+								}
+
+								permissionContentContainerNode.unplug(A.LoadingMask);
+
+								permissionContentContainerNode.plug(AParseContent);
+
+								var responseData = this.get('responseData');
+
+								permissionContentContainerNode.empty();
+
+								permissionContentContainerNode.setContent(responseData);
+							}
+						}
+					}
+				);
+			},
+			'.permission-navigation-link'
+		);
+	}
+
+	Liferay.on(
+		'<portlet:namespace />selectGroup',
+		function(event) {
+			var selectedGroupIds = [];
+
+			var selectedGroupIdsField = document.<portlet:namespace />fm['<portlet:namespace />groupIds' + event.grouptarget].value;
+
+			if (selectedGroupIdsField) {
+				selectedGroupIds = selectedGroupIdsField.split(',');
+			}
+
+			var selectedGroupNames = [];
+			var selectedGroupNamesField = document.<portlet:namespace />fm['<portlet:namespace />groupNames' + event.grouptarget].value;
+
+			if (selectedGroupNamesField) {
+				selectedGroupNames = selectedGroupNamesField.split('@@');
+			}
+
+			if (AUI().Array.indexOf(selectedGroupIds, event.groupid) == -1) {
+				selectedGroupIds.push(event.groupid);
+				selectedGroupNames.push(event.groupdescriptivename);
+			}
+
+			<portlet:namespace />updateGroups(selectedGroupIds, selectedGroupNames, event.grouptarget);
+		}
+	);
+
+	A.on(
+		'domready',
+		function(event) {
+			togglerDelegate = new A.TogglerDelegate(
+				{
+					animated: true,
+					container: <portlet:namespace />permissionNavigationDataContainer,
+					content: '.permission-navigation-item-content',
+					header: '.permission-navigation-item-header'
+				}
+			);
+
+			createLiveSearch();
+			processNavigationLinks();
+		}
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />updateActions',
+		function() {
+			var selectedTargets = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+			document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "actions";
+			document.<portlet:namespace />fm.<portlet:namespace />redirect.value = "<%= portletURL.toString() %>";
+			document.<portlet:namespace />fm.<portlet:namespace />selectedTargets.value = selectedTargets;
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role_permissions_form.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role_permissions_form.jsp
new file mode 100644
index 0000000..6d16301
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role_permissions_form.jsp
@@ -0,0 +1,203 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/roles_admin/init.jsp" %>
+
+<%
+String tabs1 = "roles";
+String tabs2 = ParamUtil.getString(request, "tabs2", "current");
+
+String redirect = ParamUtil.getString(request, "redirect");
+String backURL = ParamUtil.getString(request, "backURL", redirect);
+
+Role role = (Role)request.getAttribute(WebKeys.ROLE);
+
+String portletResource = ParamUtil.getString(request, "portletResource");
+
+Portlet portlet = null;
+String portletResourceLabel = null;
+
+if (Validator.isNotNull(portletResource)) {
+	portlet = PortletLocalServiceUtil.getPortletById(company.getCompanyId(), portletResource);
+
+	String portletId = portlet.getPortletId();
+
+	if (portletId.equals(PortletKeys.PORTAL)) {
+		portletResourceLabel = LanguageUtil.get(pageContext, "general-permissions");
+	}
+	else {
+		portletResourceLabel = PortalUtil.getPortletLongTitle(portlet, application, locale);
+	}
+}
+
+List modelResources = null;
+
+if (Validator.isNotNull(portletResource)) {
+	modelResources = ResourceActionsUtil.getPortletModelResources(portletResource);
+}
+%>
+
+<portlet:actionURL var="editRolePermissionsURL">
+	<portlet:param name="struts_action" value="/roles_admin/edit_role_permissions" />
+</portlet:actionURL>
+
+<aui:form action="<%= editRolePermissionsURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
+	<aui:input name="redirect" type="hidden" />
+	<aui:input name="roleId" type="hidden" value="<%= role.getRoleId() %>" />
+	<aui:input name="portletResource" type="hidden" value="<%= portletResource %>" />
+	<aui:input name="modelResources" type="hidden" value='<%= (modelResources == null) ? "" : StringUtil.merge(modelResources) %>' />
+	<aui:input name="selectedTargets" type="hidden" />
+
+	<h3><%= HtmlUtil.escape(portletResourceLabel) %></h3>
+
+	<%
+	request.setAttribute("edit_role_permissions.jsp-curPortletResource", portletResource);
+
+	String applicationPermissionsLabel = "application-permissions";
+
+	if (portletResource.equals(PortletKeys.PORTAL)) {
+		applicationPermissionsLabel = StringPool.BLANK;
+	}
+	else if ((portlet != null) && Validator.isNotNull(portlet.getControlPanelEntryCategory())) {
+		applicationPermissionsLabel = "general-permissions";
+	}
+	%>
+
+	<c:if test="<%= Validator.isNotNull(applicationPermissionsLabel) %>">
+		<h4><liferay-ui:message key="<%= applicationPermissionsLabel %>" /> <liferay-ui:icon-help message='<%= applicationPermissionsLabel + "-help" %>' /></h4>
+	</c:if>
+
+	<liferay-util:include page="/html/portlet/roles_admin/edit_role_permissions_resource.jsp" />
+
+	<c:if test="<%= (modelResources != null) && !modelResources.isEmpty() %>">
+		<h4><liferay-ui:message key="resource-permissions" /> <liferay-ui:icon-help message="resource-permissions-help" /></h4>
+
+		<div class="permission-group">
+
+			<%
+			modelResources = ListUtil.sort(modelResources, new ModelResourceWeightComparator());
+
+			for (int i = 0; i < modelResources.size(); i++) {
+				String curModelResource = (String)modelResources.get(i);
+
+				String curModelResourceName = ResourceActionsUtil.getModelResource(pageContext, curModelResource);
+			%>
+
+				<h5 id="<%= _getResourceHtmlId(curModelResource) %>"><%= curModelResourceName %></h5>
+
+				<%
+				request.setAttribute("edit_role_permissions.jsp-curModelResource", curModelResource);
+				request.setAttribute("edit_role_permissions.jsp-curModelResourceName", curModelResourceName);
+				%>
+
+				<liferay-util:include page="/html/portlet/roles_admin/edit_role_permissions_resource.jsp" />
+
+			<%
+			}
+			%>
+
+		</div>
+	</c:if>
+
+	<c:if test="<%= portletResource.equals(PortletKeys.PORTLET_DISPLAY_TEMPLATES) %>">
+		<h4><liferay-ui:message key="related-application-permissions" /></h4>
+
+		<div>
+
+			<%
+			Set<String> relatedPortletResources = new HashSet<String>();
+
+			List<String> headerNames = new ArrayList<String>();
+
+			headerNames.add("permissions");
+			headerNames.add("sites");
+
+			SearchContainer searchContainer = new SearchContainer(liferayPortletRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, liferayPortletResponse.createRenderURL(), headerNames, "there-are-no-applications-that-support-application-display-templates");
+
+			searchContainer.setRowChecker(new ResourceActionRowChecker(liferayPortletResponse));
+
+			List resultRows = searchContainer.getResultRows();
+
+			List <TemplateHandler> templateHandlers = PortletDisplayTemplateUtil.getPortletDisplayTemplateHandlers();
+
+			ListUtil.sort(templateHandlers, new TemplateHandlerComparator(locale));
+
+			for (TemplateHandler templateHandler : templateHandlers) {
+				String actionId = ActionKeys.ADD_PORTLET_DISPLAY_TEMPLATE;
+				String resource = templateHandler.getResourceName();
+				int scope = ResourceConstants.SCOPE_COMPANY;
+				boolean supportsFilterByGroup = true;
+				String target = resource + actionId;
+				List<Group> groups = Collections.emptyList();
+				String groupIds = ParamUtil.getString(request, "groupIds" + target, null);
+				long[] groupIdsArray = StringUtil.split(groupIds, 0L);
+				List<String> groupNames = new ArrayList<String>();
+
+				Portlet curPortlet = PortletLocalServiceUtil.getPortletById(company.getCompanyId(), resource);
+
+				if (portlet.isSystem()) {
+					continue;
+				}
+
+				ResultRow row = new ResultRow(new Object[] {role, actionId, resource, target, scope, supportsFilterByGroup, groups, groupIdsArray, groupNames}, target, relatedPortletResources.size());
+
+				relatedPortletResources.add(curPortlet.getPortletId());
+
+				row.addText(PortalUtil.getPortletLongTitle(curPortlet, application, locale) + ": " + _getActionLabel(pageContext, themeDisplay, resource, actionId));
+
+				row.addJSP("/html/portlet/roles_admin/edit_role_permissions_resource_scope.jsp");
+
+				resultRows.add(row);
+			}
+
+			searchContainer.setTotal(relatedPortletResources.size());
+			%>
+
+			<aui:input name="relatedPortletResources" type="hidden" value="<%= StringUtil.merge(relatedPortletResources) %>" />
+
+			<liferay-ui:search-iterator paginate="<%= false %>" searchContainer="<%= searchContainer %>" />
+
+		</div>
+	</c:if>
+
+	<aui:button-row>
+		<aui:button onClick='<%= liferayPortletResponse.getNamespace() + "updateActions();" %>' value="save" />
+	</aui:button-row>
+</aui:form>
+
+<%
+PortletURL definePermissionsURL = liferayPortletResponse.createRenderURL();
+
+definePermissionsURL.setParameter("struts_action", "/roles_admin/edit_role_permissions");
+definePermissionsURL.setParameter(Constants.CMD, Constants.VIEW);
+definePermissionsURL.setParameter("redirect", backURL);
+definePermissionsURL.setParameter("roleId", String.valueOf(role.getRoleId()));
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "define-permissions"), definePermissionsURL.toString());
+
+if (Validator.isNotNull(portletResource)) {
+	PortletURL resourceURL = liferayPortletResponse.createRenderURL();
+
+	resourceURL.setParameter("struts_action", "/roles_admin/edit_role");
+	resourceURL.setParameter(Constants.CMD, Constants.EDIT);
+	resourceURL.setParameter("tabs1", tabs1);
+	resourceURL.setParameter("portletResource", portletResource);
+
+	PortalUtil.addPortletBreadcrumbEntry(request, portletResourceLabel, resourceURL.toString());
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role_permissions_navigation.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role_permissions_navigation.jspf
new file mode 100644
index 0000000..7ebc180
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role_permissions_navigation.jspf
@@ -0,0 +1,261 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<div class="lfr-permission-navigation-container" id="<portlet:namespace />permissionNavigationContainer">
+	<div class="search" id="<portlet:namespace />permissionNavigationSearchContainer">
+		<input class="field search-query span10" id="<portlet:namespace />permissionNavigationSearch" placeholder='<%= LanguageUtil.get(pageContext, "search") %>' type="text">
+	</div>
+
+	<div class="lfr-permission-navigation" id="<portlet:namespace />permissionNavigationDataContainer">
+		<div id="<portlet:namespace />permissionNavigationData">
+
+			<%
+			ResourceURL viewPermissionsURL = renderResponse.createResourceURL();
+
+			viewPermissionsURL.setParameter("struts_action", "/roles_admin/edit_role_permissions");
+			viewPermissionsURL.setParameter(Constants.CMD, Constants.VIEW);
+			viewPermissionsURL.setParameter("tabs1", "roles");
+			viewPermissionsURL.setParameter("roleId", String.valueOf(role.getRoleId()));
+			%>
+
+			<div class='permission-navigation-item-summary <%= Validator.isNull(portletResource)? "selected" : "" %>'>
+				<aui:a cssClass="permission-navigation-link" href="<%= viewPermissionsURL.toString() %>">
+					<liferay-ui:message key="summary" />
+				</aui:a>
+			</div>
+
+			<c:choose>
+				<c:when test="<%= role.getType() == RoleConstants.TYPE_ORGANIZATION %>">
+
+					<%
+					Portlet usersAdminPortlet = PortletLocalServiceUtil.getPortletById(company.getCompanyId(), PortletKeys.USERS_ADMIN);
+
+					editPermissionsURL.setParameter("portletResource", usersAdminPortlet.getPortletId());
+					%>
+
+					<div class='permission-navigation-item-users-admin <%= portletResource.equals(usersAdminPortlet.getPortletId())? "selected" : "" %>'>
+						<aui:a cssClass="permission-navigation-link" href="<%= editPermissionsURL.toString() %>">
+							<%= PortalUtil.getPortletLongTitle(usersAdminPortlet, application, locale) %>
+						</aui:a>
+					</div>
+				</c:when>
+				<c:when test="<%= role.getType() == RoleConstants.TYPE_REGULAR %>">
+
+					<%
+					editPermissionsURL.setParameter("portletResource", PortletKeys.PORTAL);
+					%>
+
+					<div class="permission-navigation-section">
+						<div class="permission-navigation-item-header toggler-header toggler-header-expanded">
+							<span class="permission-navigation-item-header-icon"></span>
+
+							<span><liferay-ui:message key="control-panel" /></span>
+						</div>
+
+						<div class="permission-navigation-item-content toggler-content toggler-content-expanded">
+
+							<div class="permission-navigation-section">
+								<ul class="permission-navigation-item-content">
+									<li class="permission-navigation-item-container">
+										<span class='permission-navigation-item <%= portletResource.equals(PortletKeys.PORTAL)? "selected" : "" %>'>
+											<aui:a cssClass="permission-navigation-link" href="<%= editPermissionsURL.toString() %>">
+												<liferay-ui:message key="general-permissions" />
+											</aui:a>
+										</span>
+									</li>
+								</ul>
+							</div>
+
+							<%
+							for (String category : PortletCategoryKeys.ALL) {
+								Set<Portlet> categoryPortlets = PortalUtil.getControlPanelPortlets(company.getCompanyId(), category);
+							%>
+
+								<c:if test="<%= !categoryPortlets.isEmpty() %>">
+									<div class="permission-navigation-section">
+										<div class='permission-navigation-item-header toggler-header toggler-header-<%= category.equals(PortletCategoryKeys.ALL[0])? "expanded" : "collapsed" %>'>
+											<span class="permission-navigation-item-header-icon"></span>
+
+											<span><liferay-ui:message key='<%= "category." + category %>' /></span>
+										</div>
+
+										<ul class='permission-navigation-item-content toggler-content toggler-content-<%= category.equals(PortletCategoryKeys.ALL[0])? "expanded" : "collapsed" %>'>
+
+											<%
+											for (Portlet categoryPortlet : categoryPortlets) {
+												editPermissionsURL.setParameter("portletResource", categoryPortlet.getPortletId());
+											%>
+
+												<li class="permission-navigation-item-container">
+													<span class='permission-navigation-item <%= portletResource.equals(categoryPortlet.getPortletId())? "selected" : "" %>'>
+														<aui:a cssClass="permission-navigation-link" href="<%= editPermissionsURL.toString() %>">
+															<%= PortalUtil.getPortletLongTitle(categoryPortlet, application, locale) %>
+														</aui:a>
+													</span>
+												</li>
+
+											<%
+											}
+											%>
+
+										</ul>
+									</div>
+								</c:if>
+
+							<%
+							}
+							%>
+
+						</div>
+					</div>
+				</c:when>
+			</c:choose>
+
+			<div class="permission-navigation-section">
+				<div class="permission-navigation-item-header toggler-header toggler-header-collapsed">
+					<span class="permission-navigation-item-header-icon"></span>
+
+					<span><liferay-ui:message key="site-administration" /></span>
+				</div>
+
+				<div class="permission-navigation-item-content toggler-content toggler-content-collapsed">
+
+					<%
+					for (String category : PortletCategoryKeys.SITE_ADMINISTRATION_ALL) {
+						Set<Portlet> categoryPortlets = PortalUtil.getControlPanelPortlets(company.getCompanyId(), category);
+					%>
+
+						<c:if test="<%= !categoryPortlets.isEmpty() %>">
+							<div class="permission-navigation-section">
+								<div class="permission-navigation-item-header toggler-header toggler-header-collapsed">
+									<span class="permission-navigation-item-header-icon"></span>
+
+									<span><liferay-ui:message key='<%= "category." + category %>' /></span>
+								</div>
+
+								<ul class="permission-navigation-item-content toggler-content toggler-content-collapsed">
+
+									<%
+									for (Portlet categoryPortlet : categoryPortlets) {
+										editPermissionsURL.setParameter("portletResource", categoryPortlet.getPortletId());
+									%>
+
+										<li class="permission-navigation-item-container">
+											<span class='permission-navigation-item <%= portletResource.equals(categoryPortlet.getPortletId())? "selected" : "" %>'>
+												<aui:a cssClass="permission-navigation-link" href="<%= editPermissionsURL.toString() %>">
+													<%= PortalUtil.getPortletLongTitle(categoryPortlet, application, locale) %>
+												</aui:a>
+											</span>
+										</li>
+
+									<%
+									}
+									%>
+
+								</ul>
+							</div>
+						</c:if>
+
+					<%
+					}
+
+					Set<String> hiddenPortletIds = Collections.emptySet();
+
+					PortletCategory portletCategory = (PortletCategory)WebAppPool.get(company.getCompanyId(), WebKeys.PORTLET_CATEGORY);
+
+					PortletCategory hiddentPortletCategory = portletCategory.getCategory(PortletCategoryConstants.NAME_HIDDEN);
+
+					if (hiddentPortletCategory != null) {
+						hiddenPortletIds = hiddentPortletCategory.getPortletIds();
+					}
+					%>
+
+					<div class="permission-navigation-section">
+						<div class="permission-navigation-item-header toggler-header toggler-header-collapsed">
+							<span class="permission-navigation-item-header-icon"></span>
+
+							<span><liferay-ui:message key="applications" /></span>
+						</div>
+
+						<ul class="permission-navigation-item-content toggler-content toggler-content-collapsed">
+
+							<%
+							boolean includeSystemPortlets = false;
+
+							List<Portlet> portlets = PortletLocalServiceUtil.getPortlets(company.getCompanyId(), includeSystemPortlets, false);
+
+							portlets = ListUtil.sort(portlets, new PortletTitleComparator(application, locale));
+
+							for (Portlet curPortlet : portlets) {
+								if (Validator.isNull(curPortlet.getPortletId()) || hiddenPortletIds.contains(curPortlet.getPortletId())) {
+									continue;
+								}
+
+								editPermissionsURL.setParameter("portletResource", curPortlet.getPortletId());
+							%>
+
+								<li class="permission-navigation-item-container">
+									<span class='permission-navigation-item <%= portletResource.equals(curPortlet.getPortletId())? "selected" : "" %>'>
+										<aui:a cssClass="permission-navigation-link" href="<%= editPermissionsURL.toString() %>">
+											<%= PortalUtil.getPortletLongTitle(curPortlet, application, locale) %>
+										</aui:a>
+									</span>
+								</li>
+
+							<%
+							}
+							%>
+
+						</ul>
+					</div>
+				</div>
+			</div>
+
+			<c:if test="<%= role.getType() == RoleConstants.TYPE_REGULAR %>">
+				<div class="permission-navigation-section">
+					<div class="permission-navigation-item-header toggler-header toggler-header-collapsed">
+						<span class="permission-navigation-item-header-icon"></span>
+
+						<span><liferay-ui:message key="my-account" /></span>
+					</div>
+
+					<ul class="permission-navigation-item-content toggler-content toggler-content-collapsed">
+
+						<%
+						Set<Portlet> myAccountPortlets = PortalUtil.getControlPanelPortlets(company.getCompanyId(), PortletCategoryKeys.MY);
+
+						for (Portlet myAccountPortlet : myAccountPortlets) {
+							editPermissionsURL.setParameter("portletResource", myAccountPortlet.getPortletId());
+						%>
+
+							<li class="permission-navigation-item-container">
+								<span class='permission-navigation-item <%= portletResource.equals(myAccountPortlet.getPortletId())? "selected" : "" %>'>
+									<aui:a cssClass="permission-navigation-link" href="<%= editPermissionsURL.toString() %>">
+										<%= PortalUtil.getPortletLongTitle(myAccountPortlet, application, locale) %>
+									</aui:a>
+								</span>
+							</li>
+
+						<%
+						}
+						%>
+
+					</ul>
+				</div>
+			</c:if>
+		</div>
+	</div>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role_permissions_resource.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role_permissions_resource.jsp
new file mode 100644
index 0000000..611b1c3
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role_permissions_resource.jsp
@@ -0,0 +1,174 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/roles_admin/init.jsp" %>
+
+<%
+Role role = (Role)request.getAttribute("edit_role_permissions.jsp-role");
+
+String portletResource = (String)request.getAttribute("edit_role_permissions.jsp-portletResource");
+
+String curPortletResource = (String)request.getAttribute("edit_role_permissions.jsp-curPortletResource");
+String curModelResource = (String)request.getAttribute("edit_role_permissions.jsp-curModelResource");
+String curModelResourceName = (String)request.getAttribute("edit_role_permissions.jsp-curModelResourceName");
+
+Portlet curPortlet = null;
+String curPortletId = StringPool.BLANK;
+String curPortletControlPanelEntryCategory = StringPool.BLANK;
+
+if (Validator.isNotNull(curPortletResource)) {
+	curPortlet = PortletLocalServiceUtil.getPortletById(themeDisplay.getCompanyId(), curPortletResource);
+	curPortletId = curPortlet.getPortletId();
+	curPortletControlPanelEntryCategory = curPortlet.getControlPanelEntryCategory();
+}
+
+List curActions = ResourceActionsUtil.getResourceActions(curPortletResource, curModelResource);
+
+curActions = ListUtil.sort(curActions, new ActionComparator(locale));
+
+List guestUnsupportedActions = ResourceActionsUtil.getResourceGuestUnsupportedActions(curPortletResource, curModelResource);
+
+List<String> headerNames = new ArrayList<String>();
+
+headerNames.add("action");
+
+boolean showScope = _isShowScope(role, curModelResource, curPortletId);
+
+if (showScope) {
+	headerNames.add("sites");
+}
+
+SearchContainer searchContainer = new SearchContainer(liferayPortletRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, liferayPortletResponse.createRenderURL(), headerNames, "there-are-no-actions");
+
+searchContainer.setRowChecker(new ResourceActionRowChecker(liferayPortletResponse));
+
+int total = curActions.size();
+
+searchContainer.setTotal(total);
+
+List results = curActions;
+
+searchContainer.setResults(results);
+
+List resultRows = searchContainer.getResultRows();
+
+for (int i = 0; i < results.size(); i++) {
+	String actionId = (String)results.get(i);
+
+	if (role.getName().equals(RoleConstants.GUEST) && guestUnsupportedActions.contains(actionId)) {
+		continue;
+	}
+
+	if (Validator.isNotNull(curPortletResource)) {
+		if (actionId.equals(ActionKeys.ACCESS_IN_CONTROL_PANEL) && Validator.isNull(curPortlet.getControlPanelEntryCategory())) {
+			continue;
+		}
+
+		if (actionId.equals(ActionKeys.ADD_TO_PAGE) && _hasHiddenPortletCategory(curPortlet)) {
+			continue;
+		}
+	}
+
+	String curResource = null;
+
+	if (Validator.isNull(curModelResource)) {
+		curResource = curPortletResource;
+	}
+	else {
+		curResource = curModelResource;
+	}
+
+	String target = curResource + actionId;
+	int scope = ResourceConstants.SCOPE_COMPANY;
+	boolean supportsFilterByGroup = false;
+	List<Group> groups = Collections.emptyList();
+	String groupIds = ParamUtil.getString(request, "groupIds" + target, null);
+	long[] groupIdsArray = StringUtil.split(groupIds, 0L);
+	List<String> groupNames = new ArrayList<String>();
+
+	if (role.getType() == RoleConstants.TYPE_REGULAR) {
+		if (Validator.isNotNull(portletResource)) {
+			Portlet portlet = PortletLocalServiceUtil.getPortletById(company.getCompanyId(), portletResource);
+
+			if (Validator.isNotNull(portlet.getControlPanelEntryCategory()) && portlet.getControlPanelEntryCategory().startsWith(PortletCategoryKeys.SITE_ADMINISTRATION)) {
+				supportsFilterByGroup = true;
+			}
+		}
+
+		if (!supportsFilterByGroup && !ResourceActionsUtil.isPortalModelResource(curResource) && !portletResource.equals(PortletKeys.PORTAL)) {
+			supportsFilterByGroup = true;
+		}
+
+		LinkedHashMap<String, Object> groupParams = new LinkedHashMap<String, Object>();
+
+		List<Object> rolePermissions = new ArrayList<Object>();
+
+		rolePermissions.add(curResource);
+		rolePermissions.add(new Integer(ResourceConstants.SCOPE_GROUP));
+		rolePermissions.add(actionId);
+		rolePermissions.add(new Long(role.getRoleId()));
+
+		groupParams.put("rolePermissions", rolePermissions);
+
+		groups = GroupLocalServiceUtil.search(company.getCompanyId(), new long[] {PortalUtil.getClassNameId(Company.class), PortalUtil.getClassNameId(Group.class), PortalUtil.getClassNameId(Organization.class), PortalUtil.getClassNameId(UserPersonalSite.class)}, null, null, groupParams, true, QueryUtil.ALL_POS, QueryUtil.ALL_POS);
+
+		groupIdsArray = new long[groups.size()];
+
+		for (int j = 0; j < groups.size(); j++) {
+			Group group = (Group)groups.get(j);
+
+			groupIdsArray[j] = group.getGroupId();
+
+			groupNames.add(HtmlUtil.escape(group.getDescriptiveName(locale)));
+		}
+
+		if (!groups.isEmpty()) {
+			scope = ResourceConstants.SCOPE_GROUP;
+		}
+	}
+	else {
+		scope = ResourceConstants.SCOPE_GROUP_TEMPLATE;
+	}
+
+	ResultRow row = new ResultRow(new Object[] {role, actionId, curResource, target, scope, supportsFilterByGroup, groups, groupIdsArray, groupNames}, target, i);
+
+	row.addText(_getActionLabel(pageContext, themeDisplay, curResource, actionId));
+
+	if (showScope) {
+		row.addJSP("/html/portlet/roles_admin/edit_role_permissions_resource_scope.jsp");
+	}
+
+	resultRows.add(row);
+}
+%>
+
+<liferay-ui:search-iterator paginate="<%= false %>" searchContainer="<%= searchContainer %>" />
+
+<%!
+private boolean _hasHiddenPortletCategory(Portlet portlet) {
+	PortletCategory portletCategory = (PortletCategory)WebAppPool.get(portlet.getCompanyId(), WebKeys.PORTLET_CATEGORY);
+
+	PortletCategory hiddenPortletCategory = portletCategory.getCategory("category.hidden");
+
+	Set<String> portletIds = hiddenPortletCategory.getPortletIds();
+
+	if (portletIds.contains(portlet.getPortletId())) {
+		return true;
+	}
+
+	return false;
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role_permissions_resource_scope.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role_permissions_resource_scope.jsp
new file mode 100644
index 0000000..6782531
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role_permissions_resource_scope.jsp
@@ -0,0 +1,106 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/roles_admin/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+Object[] objArray = (Object[])row.getObject();
+
+Role role = (Role)objArray[0];
+String target = (String)objArray[3];
+Boolean supportsFilterByGroup = (Boolean)objArray[5];
+List groups = (List)objArray[6];
+long[] groupIdsArray = (long[])objArray[7];
+List groupNames = (List)objArray[8];
+%>
+
+<aui:input name='<%= "groupIds" + target %>' type="hidden" value="<%= StringUtil.merge(groupIdsArray) %>" />
+<aui:input name='<%= "groupNames" + target %>' type="hidden" value='<%= StringUtil.merge(groupNames, "@@") %>' />
+
+<div id="<portlet:namespace />groupDiv<%= target %>">
+	<span class="permission-scopes" id="<portlet:namespace />groupHTML<%= target %>">
+
+		<%
+		if (supportsFilterByGroup && !groups.isEmpty()) {
+			for (int i = 0; i < groups.size(); i++) {
+				Group group = (Group)groups.get(i);
+
+				String taglibHREF = "javascript:" + liferayPortletResponse.getNamespace() + "removeGroup(" + i + ", '" + target + "');";
+		%>
+
+				<span class="lfr-token">
+					<span class="lfr-token-text"><%= HtmlUtil.escape(group.getDescriptiveName(locale)) %></span>
+
+					<aui:a cssClass="icon icon-remove lfr-token-close" href="<%= taglibHREF %>" />
+				</span>
+
+		<%
+			}
+		}
+		else if (role.getType() == RoleConstants.TYPE_REGULAR) {
+		%>
+
+			<%= LanguageUtil.get(pageContext, "all-sites") %>
+
+		<%
+		}
+		%>
+
+	</span>
+
+	<%
+	String targetId = target.replace(".", "");
+	%>
+
+	<c:if test="<%= supportsFilterByGroup %>">
+		<portlet:renderURL var="selectCommunityURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+			<portlet:param name="struts_action" value="/roles_admin/select_site" />
+			<portlet:param name="includeCompany" value="<%= Boolean.TRUE.toString() %>" />
+			<portlet:param name="includeUserPersonalSite" value="<%= Boolean.TRUE.toString() %>" />
+			<portlet:param name="target" value="<%= target %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			id="<%= targetId %>"
+			image="configuration"
+			label="<%= true %>"
+			message="change"
+			url="javascript:;"
+		/>
+
+		<aui:script use="aui-base">
+			A.one('#<portlet:namespace /><%= targetId %>').on(
+				'click',
+				function(event) {
+					Liferay.Util.selectEntity(
+						{
+							dialog: {
+								constrain: true,
+								modal: true,
+								width: 600
+							},
+							id: '<portlet:namespace />selectGroup<%= targetId %>',
+							title: '<liferay-ui:message arguments="site" key="select-x" />',
+							uri: '<%= selectCommunityURL.toString() %>'
+						}
+					);
+				}
+			);
+		</aui:script>
+	</c:if>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role_permissions_summary.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role_permissions_summary.jsp
new file mode 100644
index 0000000..9dae1e9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role_permissions_summary.jsp
@@ -0,0 +1,224 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/roles_admin/init.jsp" %>
+
+<h3><liferay-ui:message key="summary" /></h3>
+
+<%
+Role role = (Role)request.getAttribute("edit_role_permissions.jsp-role");
+
+PortletURL permissionsAllURL = liferayPortletResponse.createRenderURL();
+
+permissionsAllURL.setParameter("struts_action", "/roles_admin/edit_role_permissions");
+permissionsAllURL.setParameter(Constants.CMD, Constants.VIEW);
+permissionsAllURL.setParameter("tabs1", "roles");
+permissionsAllURL.setParameter("roleId", String.valueOf(role.getRoleId()));
+
+List<String> headerNames = new ArrayList<String>();
+
+headerNames.add("permissions");
+
+if (role.getType() == RoleConstants.TYPE_REGULAR) {
+	headerNames.add("sites");
+}
+
+headerNames.add(StringPool.BLANK);
+
+SearchContainer searchContainer = new SearchContainer(liferayPortletRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, 50, permissionsAllURL, headerNames, "this-role-does-not-have-any-permissions");
+
+List<Permission> permissions = PermissionConverterUtil.convertPermissions(role);
+
+List<PermissionDisplay> permissionDisplays = new ArrayList<PermissionDisplay>(permissions.size());
+
+for (int i = 0; i < permissions.size(); i++) {
+	Permission permission = permissions.get(i);
+
+	Resource resource = new ResourceImpl();
+
+	resource.setCompanyId(themeDisplay.getCompanyId());
+	resource.setName(permission.getName());
+	resource.setScope(permission.getScope());
+	resource.setPrimKey(permission.getPrimKey());
+
+	String curPortletName = null;
+	String curPortletLabel = null;
+	String curModelName = null;
+	String curModelLabel = null;
+	String actionId = permission.getActionId();
+	String actionLabel = _getActionLabel(pageContext, themeDisplay, resource.getName(), actionId);
+
+	if (PortletLocalServiceUtil.hasPortlet(company.getCompanyId(), resource.getName())) {
+		curPortletName = resource.getName();
+		curModelName = StringPool.BLANK;
+		curModelLabel = StringPool.BLANK;
+	}
+	else {
+		curModelName = resource.getName();
+		curModelLabel = ResourceActionsUtil.getModelResource(pageContext, curModelName);
+
+		List portletResources = ResourceActionsUtil.getModelPortletResources(curModelName);
+
+		if (!portletResources.isEmpty()) {
+			curPortletName = (String)portletResources.get(0);
+		}
+	}
+
+	if (curPortletName == null) {
+		continue;
+	}
+
+	Portlet portlet = PortletLocalServiceUtil.getPortletById(company.getCompanyId(), curPortletName);
+
+	curPortletLabel = PortalUtil.getPortletLongTitle(portlet, application, locale);
+
+	PermissionDisplay permissionDisplay = new PermissionDisplay(permission, resource, curPortletName, curPortletLabel, curModelName, curModelLabel, actionId, actionLabel);
+
+	if (!permissionDisplays.contains(permissionDisplay)) {
+		permissionDisplays.add(permissionDisplay);
+	}
+}
+
+permissionDisplays = ListUtil.sort(permissionDisplays);
+
+int total = permissionDisplays.size();
+
+searchContainer.setTotal(total);
+
+List results = ListUtil.subList(permissionDisplays, searchContainer.getStart(), searchContainer.getEnd());
+
+searchContainer.setResults(results);
+
+List resultRows = searchContainer.getResultRows();
+
+for (int i = 0; i < results.size(); i++) {
+	PermissionDisplay permissionDisplay = (PermissionDisplay)results.get(i);
+
+	Permission permission = permissionDisplay.getPermission();
+	Resource resource = permissionDisplay.getResource();
+	String curResource = resource.getName();
+	String curPortletName = permissionDisplay.getPortletName();
+	String curPortletLabel = permissionDisplay.getPortletLabel();
+	String curModelLabel = permissionDisplay.getModelLabel();
+	String actionId = permissionDisplay.getActionId();
+	String actionLabel = permissionDisplay.getActionLabel();
+
+	ResultRow row = new ResultRow(new Object[] {permission, role}, actionId, i);
+
+	List groups = Collections.emptyList();
+
+	int scope;
+
+	if (role.getType() == RoleConstants.TYPE_REGULAR) {
+		LinkedHashMap<String, Object> groupParams = new LinkedHashMap<String, Object>();
+
+		List rolePermissions = new ArrayList();
+
+		rolePermissions.add(curResource);
+		rolePermissions.add(new Integer(ResourceConstants.SCOPE_GROUP));
+		rolePermissions.add(actionId);
+		rolePermissions.add(new Long(role.getRoleId()));
+
+		groupParams.put("rolePermissions", rolePermissions);
+
+		groups = GroupLocalServiceUtil.search(company.getCompanyId(), new long[] {PortalUtil.getClassNameId(Company.class), PortalUtil.getClassNameId(Group.class), PortalUtil.getClassNameId(Organization.class), PortalUtil.getClassNameId(UserPersonalSite.class)}, null, null, groupParams, true, QueryUtil.ALL_POS, QueryUtil.ALL_POS);
+
+		if (groups.isEmpty()) {
+			scope = ResourceConstants.SCOPE_COMPANY;
+		}
+		else {
+			scope = ResourceConstants.SCOPE_GROUP;
+		}
+	}
+	else {
+		scope = ResourceConstants.SCOPE_GROUP_TEMPLATE;
+	}
+
+	boolean selected = false;
+
+	if (ResourceBlockLocalServiceUtil.isSupported(curResource)) {
+		selected = ResourceTypePermissionLocalServiceUtil.hasEitherScopePermission(company.getCompanyId(), curResource, role.getRoleId(), actionId);
+	}
+	else {
+		selected = ResourcePermissionLocalServiceUtil.hasScopeResourcePermission(company.getCompanyId(), curResource, scope, role.getRoleId(), actionId);
+	}
+
+	if (!selected) {
+		continue;
+	}
+
+	ResourceURL editPermissionsURL = liferayPortletResponse.createResourceURL();
+
+	editPermissionsURL.setParameter("struts_action", "/roles_admin/edit_role_permissions");
+	editPermissionsURL.setParameter(Constants.CMD, Constants.EDIT);
+	editPermissionsURL.setParameter("tabs1", "roles");
+	editPermissionsURL.setParameter("roleId", String.valueOf(role.getRoleId()));
+	editPermissionsURL.setParameter("redirect", permissionsAllURL.toString());
+	editPermissionsURL.setParameter("portletResource", curPortletName);
+
+	StringBundler sb = new StringBundler();
+
+	sb.append("<a class=\"permission-navigation-link\" href=\"");
+	sb.append(editPermissionsURL);
+	sb.append(StringPool.POUND);
+	sb.append(_getResourceHtmlId(curResource));
+	sb.append("\">");
+	sb.append(curPortletLabel);
+
+	if (Validator.isNotNull(curModelLabel)) {
+		sb.append(StringPool.SPACE);
+		sb.append(StringPool.GREATER_THAN);
+		sb.append(StringPool.SPACE);
+		sb.append(curModelLabel);
+	}
+
+	sb.append("</a>: <strong>");
+	sb.append(actionLabel);
+	sb.append("</strong>");
+
+	row.addText(sb.toString());
+
+	if (scope == ResourceConstants.SCOPE_COMPANY) {
+		row.addText(LanguageUtil.get(pageContext, _isShowScope(role, curResource, curPortletName)? "all-sites" : StringPool.BLANK));
+	}
+	else if (scope == ResourceConstants.SCOPE_GROUP_TEMPLATE) {
+	}
+	else if (scope == ResourceConstants.SCOPE_GROUP) {
+		sb = new StringBundler(groups.size() * 3 - 2);
+
+		for (int j = 0; j < groups.size(); j++) {
+			Group group = (Group)groups.get(j);
+
+			sb.append(HtmlUtil.escape(group.getDescriptiveName(locale)));
+
+			if (j < (groups.size() - 1)) {
+				sb.append(StringPool.COMMA);
+				sb.append(StringPool.SPACE);
+			}
+		}
+
+		row.addText(sb.toString());
+	}
+
+	// Action
+
+	row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/roles_admin/permission_action.jsp");
+
+	resultRows.add(row);
+}
+%>
+
+<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role_tabs.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role_tabs.jsp
new file mode 100644
index 0000000..2897d2c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/edit_role_tabs.jsp
@@ -0,0 +1,108 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/roles_admin/init.jsp" %>
+
+<%
+String cmd = ParamUtil.getString(request, Constants.CMD);
+
+String tabs1 = ParamUtil.getString(request, "tabs1");
+
+String redirect = ParamUtil.getString(request, "redirect");
+String backURL = ParamUtil.getString(request, "backURL", redirect);
+
+Role role = (Role)request.getAttribute(WebKeys.ROLE);
+
+String portletResource = ParamUtil.getString(request, "portletResource");
+
+String portletResourceLabel = null;
+
+if (Validator.isNotNull(portletResource)) {
+	Portlet portlet = PortletLocalServiceUtil.getPortletById(company.getCompanyId(), portletResource);
+
+	portletResourceLabel = PortalUtil.getPortletLongTitle(portlet, application, locale);
+}
+
+// Edit
+
+PortletURL editRoleURL = renderResponse.createRenderURL();
+
+editRoleURL.setParameter("struts_action", "/roles_admin/edit_role");
+editRoleURL.setParameter("redirect", backURL);
+editRoleURL.setParameter(Constants.CMD, Constants.VIEW);
+editRoleURL.setParameter("roleId", String.valueOf(role.getRoleId()));
+
+// Define permissions
+
+PortletURL definePermissionsURL = renderResponse.createRenderURL();
+
+definePermissionsURL.setParameter("struts_action", "/roles_admin/edit_role_permissions");
+definePermissionsURL.setParameter("redirect", backURL);
+definePermissionsURL.setParameter(Constants.CMD, Constants.VIEW);
+definePermissionsURL.setParameter("roleId", String.valueOf(role.getRoleId()));
+
+// Assign members
+
+PortletURL assignMembersURL = renderResponse.createRenderURL();
+
+assignMembersURL.setParameter("struts_action", "/roles_admin/edit_role_assignments");
+assignMembersURL.setParameter("redirect", backURL);
+assignMembersURL.setParameter("roleId", String.valueOf(role.getRoleId()));
+
+int pos = 0;
+
+String tabs1Names = StringPool.BLANK;
+
+if (RolePermissionUtil.contains(permissionChecker, role.getRoleId(), ActionKeys.UPDATE)) {
+	tabs1Names += ",edit";
+
+	request.setAttribute("liferay-ui:tabs:url" + pos++, editRoleURL.toString());
+}
+
+String name = role.getName();
+
+if (!name.equals(RoleConstants.ADMINISTRATOR) && !name.equals(RoleConstants.ORGANIZATION_ADMINISTRATOR) && !name.equals(RoleConstants.ORGANIZATION_OWNER) && !name.equals(RoleConstants.OWNER) && !name.equals(RoleConstants.SITE_ADMINISTRATOR) && !name.equals(RoleConstants.SITE_OWNER) && RolePermissionUtil.contains(permissionChecker, role.getRoleId(), ActionKeys.DEFINE_PERMISSIONS)) {
+	tabs1Names += ",define-permissions";
+
+	request.setAttribute("liferay-ui:tabs:url" + pos++, definePermissionsURL.toString());
+}
+
+boolean unassignableRole = false;
+
+if (name.equals(RoleConstants.GUEST) || name.equals(RoleConstants.OWNER) || name.equals(RoleConstants.USER)) {
+	unassignableRole = true;
+}
+
+if (!unassignableRole && (role.getType() == RoleConstants.TYPE_REGULAR) && RolePermissionUtil.contains(permissionChecker, role.getRoleId(), ActionKeys.ASSIGN_MEMBERS)) {
+	tabs1Names += ",assign-members";
+
+	request.setAttribute("liferay-ui:tabs:url" + pos++, assignMembersURL.toString());
+}
+
+if (tabs1Names.startsWith(",")) {
+	tabs1Names = tabs1Names.substring(1);
+}
+
+// Breadcrumbs
+
+PortalUtil.addPortletBreadcrumbEntry(request, role.getTitle(locale), null);
+
+request.setAttribute("edit_role_permissions.jsp-role", role);
+
+request.setAttribute("edit_role_permissions.jsp-portletResource", portletResource);
+%>
+
+<liferay-ui:tabs names="<%= tabs1Names %>" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/error.jsp
new file mode 100644
index 0000000..394d25a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/error.jsp
@@ -0,0 +1,27 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/roles_admin/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= NoSuchRoleException.class %>" message="the-role-could-not-be-found" />
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
+<liferay-ui:error exception="<%= RoleAssignmentException.class %>" message="you-cannot-assign-groups-or-users-to-this-role" />
+<liferay-ui:error exception="<%= RolePermissionsException.class %>" message="you-cannot-edit-the-permissions-of-this-role" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/init.jsp
new file mode 100644
index 0000000..703f9de
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/init.jsp
@@ -0,0 +1,110 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.DuplicateRoleException" %><%@
+page import="com.liferay.portal.RequiredRoleException" %><%@
+page import="com.liferay.portal.RoleAssignmentException" %><%@
+page import="com.liferay.portal.RoleNameException" %><%@
+page import="com.liferay.portal.RolePermissionsException" %><%@
+page import="com.liferay.portal.kernel.template.comparator.TemplateHandlerComparator" %><%@
+page import="com.liferay.portal.security.membershippolicy.OrganizationMembershipPolicyUtil" %><%@
+page import="com.liferay.portal.security.membershippolicy.RoleMembershipPolicyUtil" %><%@
+page import="com.liferay.portal.security.membershippolicy.SiteMembershipPolicyUtil" %><%@
+page import="com.liferay.portal.security.permission.PermissionConverterUtil" %><%@
+page import="com.liferay.portal.security.permission.comparator.ActionComparator" %><%@
+page import="com.liferay.portal.security.permission.comparator.ModelResourceWeightComparator" %><%@
+page import="com.liferay.portlet.rolesadmin.search.ResourceActionRowChecker" %><%@
+page import="com.liferay.portlet.rolesadmin.search.RoleSearch" %><%@
+page import="com.liferay.portlet.rolesadmin.search.RoleSearchTerms" %>
+
+<%
+boolean filterManageableGroups = true;
+boolean filterManageableOrganizations = true;
+boolean filterManageableRoles = true;
+
+if (permissionChecker.isCompanyAdmin()) {
+	filterManageableGroups = false;
+	filterManageableOrganizations = false;
+}
+%>
+
+<%@ include file="/html/portlet/roles_admin/init-ext.jsp" %>
+
+<%!
+private String _getActionLabel(PageContext pageContext, ThemeDisplay themeDisplay, String resourceName, String actionId) throws SystemException {
+	String actionLabel = null;
+
+	if (actionId.equals(ActionKeys.ACCESS_IN_CONTROL_PANEL)) {
+		Portlet portlet = PortletLocalServiceUtil.getPortletById(themeDisplay.getCompanyId(), resourceName);
+
+		String controlPanelCategory = portlet.getControlPanelEntryCategory();
+
+		if (Validator.isNull(controlPanelCategory)) {
+		}
+		else if (controlPanelCategory.startsWith(PortletCategoryKeys.SITE_ADMINISTRATION)) {
+			actionLabel = LanguageUtil.get(pageContext, "access-in-site-administration");
+		}
+		else if (controlPanelCategory.equals(PortletCategoryKeys.MY)) {
+			actionLabel = LanguageUtil.get(pageContext, "access-in-my-account");
+		}
+	}
+
+	if (actionLabel == null) {
+		actionLabel = ResourceActionsUtil.getAction(pageContext, actionId);
+	}
+
+	return actionLabel;
+}
+
+private StringBundler _getResourceHtmlId(String resource) {
+	StringBundler sb = new StringBundler(2);
+
+	sb.append("resource_");
+	sb.append(resource.replace('.', '_'));
+
+	return sb;
+}
+
+private boolean _isShowScope(Role role, String curModelResource, String curPortletResource) throws SystemException {
+	boolean showScope = true;
+
+	Portlet curPortlet = null;
+	String curPortletControlPanelEntryCategory = StringPool.BLANK;
+
+	if (Validator.isNotNull(curPortletResource)) {
+		curPortlet = PortletLocalServiceUtil.getPortletById(role.getCompanyId(), curPortletResource);
+		curPortletControlPanelEntryCategory = curPortlet.getControlPanelEntryCategory();
+	}
+
+	if (curPortletResource.equals(PortletKeys.PORTAL)) {
+		showScope = false;
+	}
+	else if (role.getType() != RoleConstants.TYPE_REGULAR) {
+		showScope = false;
+	}
+	else if (Validator.isNotNull(curPortletControlPanelEntryCategory) && !curPortletControlPanelEntryCategory.startsWith(PortletCategoryKeys.SITE_ADMINISTRATION)) {
+		showScope = false;
+	}
+
+	if (Validator.isNotNull(curModelResource) && curModelResource.equals(Group.class.getName())) {
+		showScope = true;
+	}
+
+	return showScope;
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/permission_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/permission_action.jsp
new file mode 100644
index 0000000..4fac838
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/permission_action.jsp
@@ -0,0 +1,45 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/roles_admin/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+Object[] objArray = (Object[])row.getObject();
+
+Permission permission = (Permission)objArray[0];
+Role role = (Role)objArray[1];
+%>
+
+<liferay-ui:icon-menu>
+	<portlet:actionURL var="deletePermissionURL">
+		<portlet:param name="struts_action" value="/roles_admin/edit_role_permissions" />
+		<portlet:param name="<%= Constants.CMD %>" value="delete_permission" />
+		<portlet:param name="redirect" value="<%= currentURL %>" />
+		<portlet:param name="roleId" value="<%= String.valueOf(role.getRoleId()) %>" />
+		<portlet:param name="name" value="<%= permission.getName() %>" />
+		<portlet:param name="scope" value="<%= String.valueOf(permission.getScope()) %>" />
+		<portlet:param name="primKey" value="<%= permission.getPrimKey() %>" />
+		<portlet:param name="actionId" value="<%= String.valueOf(permission.getActionId()) %>" />
+	</portlet:actionURL>
+
+	<liferay-ui:icon-delete
+		confirmation="are-your-sure-you-want-to-remove-this-permission"
+		message="remove"
+		url="<%= deletePermissionURL %>"
+	/>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/role_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/role_action.jsp
new file mode 100644
index 0000000..715fc72
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/role_action.jsp
@@ -0,0 +1,131 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/roles_admin/init.jsp" %>
+
+<%
+RoleSearch searchContainer = (RoleSearch)request.getAttribute("liferay-ui:search:searchContainer");
+
+String redirect = searchContainer.getIteratorURL().toString();
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+Role role = (Role)row.getObject();
+
+String name = role.getName();
+
+boolean unassignableRole = false;
+
+if (name.equals(RoleConstants.GUEST) || name.equals(RoleConstants.OWNER) || name.equals(RoleConstants.USER)) {
+	unassignableRole = true;
+}
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= RolePermissionUtil.contains(permissionChecker, role.getRoleId(), ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/roles_admin/edit_role" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="roleId" value="<%= String.valueOf(role.getRoleId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= !name.equals(RoleConstants.OWNER) && RolePermissionUtil.contains(permissionChecker, role.getRoleId(), ActionKeys.PERMISSIONS) %>">
+
+		<%
+		int[] roleTypes = {role.getType()};
+
+		if (role.getType() != RoleConstants.TYPE_REGULAR) {
+			roleTypes = new int[] {RoleConstants.TYPE_REGULAR, role.getType()};
+		}
+		%>
+
+		<liferay-security:permissionsURL
+			modelResource="<%= Role.class.getName() %>"
+			modelResourceDescription="<%= role.getTitle(locale) %>"
+			resourcePrimKey="<%= String.valueOf(role.getRoleId()) %>"
+			roleTypes="<%= roleTypes %>"
+			var="permissionsURL"
+			windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			method="get"
+			url="<%= permissionsURL %>"
+			useDialog="<%= true %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= !name.equals(RoleConstants.ADMINISTRATOR) && !name.equals(RoleConstants.SITE_OWNER) && !name.equals(RoleConstants.ORGANIZATION_ADMINISTRATOR) && !name.equals(RoleConstants.ORGANIZATION_OWNER) && !name.equals(RoleConstants.OWNER) && !name.equals(RoleConstants.SITE_ADMINISTRATOR) && RolePermissionUtil.contains(permissionChecker, role.getRoleId(), ActionKeys.DEFINE_PERMISSIONS) %>">
+		<portlet:renderURL var="editRolePermissionsURL">
+			<portlet:param name="struts_action" value="/roles_admin/edit_role_permissions" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.VIEW %>" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="roleId" value="<%= String.valueOf(role.getRoleId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon image="define_permissions" url="<%= editRolePermissionsURL %>" />
+	</c:if>
+
+	<c:if test="<%= !unassignableRole && (role.getType() == RoleConstants.TYPE_REGULAR) && RolePermissionUtil.contains(permissionChecker, role.getRoleId(), ActionKeys.ASSIGN_MEMBERS) %>">
+		<portlet:renderURL var="assignMembersURL">
+			<portlet:param name="struts_action" value="/roles_admin/edit_role_assignments" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="roleId" value="<%= String.valueOf(role.getRoleId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon image="assign" message="assign-members" url="<%= assignMembersURL %>" />
+	</c:if>
+
+	<c:if test="<%= !unassignableRole && (role.getType() == RoleConstants.TYPE_REGULAR) && RolePermissionUtil.contains(permissionChecker, role.getRoleId(), ActionKeys.VIEW) %>">
+		<portlet:renderURL var="viewUsersURL">
+			<portlet:param name="struts_action" value="/roles_admin/view_users" />
+			<portlet:param name="viewUsersRedirect" value="<%= currentURL %>" />
+			<portlet:param name="roleId" value="<%= String.valueOf(role.getRoleId()) %>" />
+			<portlet:param name="usersListView" value="<%= UserConstants.LIST_VIEW_FLAT_USERS %>" />
+			<portlet:param name="saveUsersListView" value="<%= Boolean.FALSE.toString() %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon image="view_users" message="view-users" method="get" url="<%= viewUsersURL %>" />
+	</c:if>
+
+	<c:if test="<%= !PortalUtil.isSystemRole(name) && RolePermissionUtil.contains(permissionChecker, role.getRoleId(), ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/roles_admin/edit_role" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="roleId" value="<%= String.valueOf(role.getRoleId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete url="<%= deleteURL %>" />
+	</c:if>
+	
+	<c:if test="<%= RolePermissionUtil.contains(permissionChecker, role.getRoleId(), ActionKeys.UPDATE) %>">
+	<portlet:renderURL var="cmsURL">
+			<portlet:param name="struts_action" value="/roles_admin/cms_role_edit" />
+			<portlet:param name="processUrl" value="/role/v_edit.do" />
+			<portlet:param name="roleId" value="1" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon image="view_users" message="cms.role.edit" method="get" url="<%= cmsURL %>" />
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/role_search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/role_search.jsp
new file mode 100644
index 0000000..6f8426c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/role_search.jsp
@@ -0,0 +1,21 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/roles_admin/init.jsp" %>
+
+<div class="form-search">
+	<liferay-ui:input-search autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" placeholder='<%= LanguageUtil.get(locale, "keywords") %>' />
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/select_organization_role.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/select_organization_role.jsp
new file mode 100644
index 0000000..6bfe4b0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/select_organization_role.jsp
@@ -0,0 +1,300 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/roles_admin/init.jsp" %>
+
+<%
+String p_u_i_d = ParamUtil.getString(request, "p_u_i_d");
+int step = ParamUtil.getInteger(request, "step");
+String eventName = ParamUtil.getString(request, "eventName", liferayPortletResponse.getNamespace() + "selectOrganizationRole");
+
+User selUser = PortalUtil.getSelectedUser(request);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/roles_admin/select_organization_role");
+
+if (selUser != null) {
+	portletURL.setParameter("p_u_i_d", String.valueOf(selUser.getUserId()));
+}
+
+portletURL.setParameter("eventName", eventName);
+
+long uniqueOrganizationId = 0;
+
+List<Organization> organizations = null;
+
+String organizationIds = ParamUtil.getString(request, "organizationIds");
+
+portletURL.setParameter("organizationIds", organizationIds);
+
+if (step == 1) {
+	organizations = OrganizationLocalServiceUtil.getOrganizations(StringUtil.split(organizationIds, 0L));
+
+	if (filterManageableOrganizations) {
+		organizations = UsersAdminUtil.filterOrganizations(permissionChecker, organizations);
+	}
+
+	if (organizations.size() == 1) {
+		step = 2;
+
+		uniqueOrganizationId = organizations.get(0).getOrganizationId();
+	}
+}
+%>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="selectOrganizationRoleFm">
+	<c:choose>
+		<c:when test="<%= step == 1 %>">
+			<aui:input name="organizationId" type="hidden" />
+
+			<liferay-ui:header
+				title="organization-roles"
+			/>
+
+			<div class="alert alert-info">
+				<liferay-ui:message key="please-select-an-organization-to-which-you-will-assign-an-organization-role" />
+			</div>
+
+			<%
+			portletURL.setParameter("step", "1");
+			%>
+
+			<liferay-ui:search-container
+				searchContainer="<%= new OrganizationSearch(renderRequest, portletURL) %>"
+				total="<%= organizations.size() %>"
+			>
+				<liferay-ui:search-container-results
+					results="<%= ListUtil.subList(organizations, searchContainer.getStart(), searchContainer.getEnd()) %>"
+				/>
+
+				<liferay-ui:search-container-row
+					className="com.liferay.portal.model.Organization"
+					escapedModel="<%= true %>"
+					keyProperty="organizationId"
+					modelVar="organization"
+				>
+
+					<liferay-ui:search-container-column-text
+						name="name"
+						orderable="<%= true %>"
+						property="name"
+					/>
+
+					<liferay-ui:search-container-column-text
+						buffer="buffer"
+						name="parent-organization"
+					>
+
+						<%
+						String parentOrganizationName = StringPool.BLANK;
+
+						if (organization.getParentOrganizationId() > 0) {
+							try {
+								Organization parentOrganization = OrganizationLocalServiceUtil.getOrganization(organization.getParentOrganizationId());
+
+								parentOrganizationName = parentOrganization.getName();
+							}
+							catch (Exception e) {
+							}
+						}
+
+						buffer.append(HtmlUtil.escape(parentOrganizationName));
+						%>
+
+					</liferay-ui:search-container-column-text>
+
+					<liferay-ui:search-container-column-text
+						name="type"
+						orderable="<%= true %>"
+						value="<%= LanguageUtil.get(pageContext, organization.getType()) %>"
+					/>
+
+					<liferay-ui:search-container-column-text
+						name="city"
+						property="address.city"
+					/>
+
+					<liferay-ui:search-container-column-text
+						name="region"
+						property="address.region.name"
+					/>
+
+					<liferay-ui:search-container-column-text
+						name="country"
+						property="address.country.name"
+					/>
+
+					<liferay-ui:search-container-column-text>
+
+						<%
+						Map<String, Object> data = new HashMap<String, Object>();
+
+						Group group = organization.getGroup();
+
+						data.put("groupid", group.getGroupId());
+
+						data.put("organizationid", organization.getOrganizationId());
+						%>
+
+						<aui:button cssClass="organization-selector-button" data="<%= data %>" value="choose" />
+					</liferay-ui:search-container-column-text>
+				</liferay-ui:search-container-row>
+
+				<liferay-ui:search-iterator />
+			</liferay-ui:search-container>
+
+			<aui:script use="aui-base">
+				A.one('#<portlet:namespace />selectOrganizationRoleFm').delegate(
+					'click',
+					function(event) {
+						var organizationId = event.currentTarget.attr('data-organizationid');
+
+						document.<portlet:namespace />selectOrganizationRoleFm.<portlet:namespace />organizationId.value = organizationId;
+
+						<%
+						portletURL.setParameter("resetCur", Boolean.TRUE.toString());
+						portletURL.setParameter("step", "2");
+						%>
+
+						submitForm(document.<portlet:namespace />selectOrganizationRoleFm, "<%= portletURL.toString() %>");
+					},
+					'.organization-selector-button'
+				);
+			</aui:script>
+		</c:when>
+
+		<c:when test="<%= step == 2 %>">
+
+			<%
+			long organizationId = ParamUtil.getLong(request, "organizationId", uniqueOrganizationId);
+			%>
+
+			<aui:input name="step" type="hidden" value="2" />
+			<aui:input name="organizationId" type="hidden" value="<%= String.valueOf(organizationId) %>" />
+
+			<liferay-ui:header
+				title="organization-roles"
+			/>
+
+			<%
+			Organization organization = OrganizationServiceUtil.getOrganization(organizationId);
+
+			portletURL.setParameter("step", "1");
+
+			String breadcrumbs = "<a href=\"" + portletURL.toString() + "\">" + LanguageUtil.get(pageContext, "organizations") + "</a> &raquo; " + HtmlUtil.escape(organization.getName());
+			%>
+
+			<div class="breadcrumbs">
+				<%= breadcrumbs %>
+			</div>
+
+			<%
+			portletURL.setParameter("step", "2");
+			portletURL.setParameter("organizationId", String.valueOf(organizationId));
+			%>
+
+			<liferay-ui:search-container
+				headerNames="name"
+				searchContainer="<%= new RoleSearch(renderRequest, portletURL) %>"
+			>
+				<liferay-ui:search-form
+					page="/html/portlet/roles_admin/role_search.jsp"
+				/>
+
+				<%
+				RoleSearchTerms searchTerms = (RoleSearchTerms)searchContainer.getSearchTerms();
+				%>
+
+				<liferay-ui:search-container-results>
+
+					<%
+					if (filterManageableRoles) {
+						List<Role> roles = RoleLocalServiceUtil.search(company.getCompanyId(), searchTerms.getKeywords(), new Integer[] {RoleConstants.TYPE_ORGANIZATION}, QueryUtil.ALL_POS, QueryUtil.ALL_POS, searchContainer.getOrderByComparator());
+
+						roles = UsersAdminUtil.filterGroupRoles(permissionChecker, organization.getGroup().getGroupId(), roles);
+
+						total = roles.size();
+
+						searchContainer.setTotal(total);
+
+						results = ListUtil.subList(roles, searchContainer.getStart(), searchContainer.getEnd());
+					}
+					else {
+						total = RoleLocalServiceUtil.searchCount(company.getCompanyId(), searchTerms.getKeywords(), new Integer[] {RoleConstants.TYPE_ORGANIZATION});
+
+						searchContainer.setTotal(total);
+
+						results = RoleLocalServiceUtil.search(company.getCompanyId(), searchTerms.getKeywords(), new Integer[] {RoleConstants.TYPE_ORGANIZATION}, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+					}
+
+					searchContainer.setResults(results);
+					%>
+
+				</liferay-ui:search-container-results>
+
+				<liferay-ui:search-container-row
+					className="com.liferay.portal.model.Role"
+					keyProperty="roleId"
+					modelVar="role"
+				>
+					<liferay-util:param name="className" value="<%= RolesAdminUtil.getCssClassName(role) %>" />
+					<liferay-util:param name="classHoverName" value="<%= RolesAdminUtil.getCssClassName(role) %>" />
+
+					<liferay-ui:search-container-column-text
+						name="title"
+						value="<%= HtmlUtil.escape(role.getTitle(locale)) %>"
+					/>
+
+					<liferay-ui:search-container-column-text>
+						<c:if test="<%= Validator.isNull(p_u_i_d) || OrganizationMembershipPolicyUtil.isRoleAllowed((selUser != null) ? selUser.getUserId() : 0, organization.getOrganizationId(), role.getRoleId()) %>">
+
+							<%
+							Map<String, Object> data = new HashMap<String, Object>();
+
+							data.put("groupdescriptivename", HtmlUtil.escapeAttribute(organization.getGroup().getDescriptiveName(locale)));
+							data.put("groupid", organization.getGroupId());
+							data.put("roleid", role.getRoleId());
+							data.put("roletitle", HtmlUtil.escapeAttribute(role.getTitle(locale)));
+							data.put("searchcontainername", "organizationRoles");
+							%>
+
+							<aui:button cssClass="selector-button" data="<%= data %>" value="choose" />
+						</c:if>
+					</liferay-ui:search-container-column-text>
+				</liferay-ui:search-container-row>
+
+				<liferay-ui:search-iterator />
+			</liferay-ui:search-container>
+		</c:when>
+	</c:choose>
+</aui:form>
+
+<aui:script use="aui-base">
+	var Util = Liferay.Util;
+
+	A.one('#<portlet:namespace />selectOrganizationRoleFm').delegate(
+		'click',
+		function(event) {
+			var result = Util.getAttributes(event.currentTarget, 'data-');
+
+			Util.getOpener().Liferay.fire('<%= HtmlUtil.escapeJS(eventName) %>', result);
+
+			Util.getWindow().hide();
+		},
+		'.selector-button'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/select_regular_role.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/select_regular_role.jsp
new file mode 100644
index 0000000..8cd515b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/select_regular_role.jsp
@@ -0,0 +1,127 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/roles_admin/init.jsp" %>
+
+<%
+String p_u_i_d = ParamUtil.getString(request, "p_u_i_d");
+String eventName = ParamUtil.getString(request, "eventName", liferayPortletResponse.getNamespace() + "selectRegularRole");
+
+User selUser = PortalUtil.getSelectedUser(request);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/roles_admin/select_regular_role");
+
+if (selUser != null) {
+	portletURL.setParameter("p_u_i_d", String.valueOf(selUser.getUserId()));
+}
+
+portletURL.setParameter("eventName", eventName);
+%>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="selectRegularRoleFm">
+	<liferay-ui:header
+		title="roles"
+	/>
+
+	<liferay-ui:search-container
+		headerNames="name"
+		searchContainer="<%= new RoleSearch(renderRequest, portletURL) %>"
+	>
+		<liferay-ui:search-form
+			page="/html/portlet/roles_admin/role_search.jsp"
+		/>
+
+		<%
+		RoleSearchTerms searchTerms = (RoleSearchTerms)searchContainer.getSearchTerms();
+		%>
+
+		<liferay-ui:search-container-results>
+
+			<%
+			if (filterManageableRoles) {
+				List<Role> roles = RoleLocalServiceUtil.search(company.getCompanyId(), searchTerms.getKeywords(), new Integer[] {RoleConstants.TYPE_REGULAR}, QueryUtil.ALL_POS, QueryUtil.ALL_POS, searchContainer.getOrderByComparator());
+
+				roles = UsersAdminUtil.filterRoles(permissionChecker, roles);
+
+				total = roles.size();
+
+				searchContainer.setTotal(total);
+
+				results = ListUtil.subList(roles, searchContainer.getStart(), searchContainer.getEnd());
+			}
+			else {
+				total = RoleLocalServiceUtil.searchCount(company.getCompanyId(), searchTerms.getKeywords(), new Integer[] {RoleConstants.TYPE_REGULAR});
+
+				searchContainer.setTotal(total);
+
+				results = RoleLocalServiceUtil.search(company.getCompanyId(), searchTerms.getKeywords(), new Integer[] {RoleConstants.TYPE_REGULAR}, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+			}
+
+			searchContainer.setResults(results);
+			%>
+
+		</liferay-ui:search-container-results>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.model.Role"
+			keyProperty="roleId"
+			modelVar="role"
+		>
+			<liferay-util:param name="className" value="<%= RolesAdminUtil.getCssClassName(role) %>" />
+			<liferay-util:param name="classHoverName" value="<%= RolesAdminUtil.getCssClassName(role) %>" />
+
+			<liferay-ui:search-container-column-text
+				name="title"
+				value="<%= HtmlUtil.escape(role.getTitle(locale)) %>"
+			/>
+
+			<liferay-ui:search-container-column-text>
+				<c:if test="<%= Validator.isNull(p_u_i_d)|| RoleMembershipPolicyUtil.isRoleAllowed((selUser != null) ? selUser.getUserId() : 0, role.getRoleId()) %>">
+
+					<%
+					Map<String, Object> data = new HashMap<String, Object>();
+
+					data.put("roleid", role.getRoleId());
+					data.put("roletitle", HtmlUtil.escapeAttribute(role.getTitle(locale)));
+					data.put("searchcontainername", "roles");
+					%>
+
+					<aui:button cssClass="selector-button" data="<%= data %>" value="choose" />
+				</c:if>
+			</liferay-ui:search-container-column-text>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script use="aui-base">
+	var Util = Liferay.Util;
+
+	A.one('#<portlet:namespace />selectRegularRoleFm').delegate(
+		'click',
+		function(event) {
+			var result = Util.getAttributes(event.currentTarget, 'data-');
+
+			Util.getOpener().Liferay.fire('<%= HtmlUtil.escapeJS(eventName) %>', result);
+
+			Util.getWindow().hide();
+		},
+		'.selector-button'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/select_site_role.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/select_site_role.jsp
new file mode 100644
index 0000000..56687f9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/select_site_role.jsp
@@ -0,0 +1,258 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/roles_admin/init.jsp" %>
+
+<%
+String p_u_i_d = ParamUtil.getString(request, "p_u_i_d");
+int step = ParamUtil.getInteger(request, "step");
+String eventName = ParamUtil.getString(request, "eventName", liferayPortletResponse.getNamespace() + "selectSiteRole");
+
+User selUser = PortalUtil.getSelectedUser(request);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/roles_admin/select_site_role");
+
+if (selUser != null) {
+	portletURL.setParameter("p_u_i_d", String.valueOf(selUser.getUserId()));
+}
+
+portletURL.setParameter("eventName", eventName);
+
+long uniqueGroupId = 0;
+
+List<Group> groups = null;
+
+if (step == 1) {
+	groups = selUser.getGroups();
+
+	if (filterManageableGroups) {
+		groups = UsersAdminUtil.filterGroups(permissionChecker, groups);
+	}
+
+	if (groups.size() == 1) {
+		step = 2;
+
+		uniqueGroupId = groups.get(0).getGroupId();
+	}
+}
+%>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="selectSiteRoleFm">
+	<c:choose>
+		<c:when test="<%= step == 1 %>">
+			<aui:input name="groupId" type="hidden" />
+
+			<liferay-ui:header
+				title="site-roles"
+			/>
+
+			<div class="alert alert-info">
+				<liferay-ui:message key="please-select-a-site-to-which-you-will-assign-a-site-role" />
+			</div>
+
+			<%
+			portletURL.setParameter("step", "1");
+			%>
+
+			<liferay-ui:search-container
+				searchContainer="<%= new GroupSearch(renderRequest, portletURL) %>"
+				total="<%= groups.size() %>"
+			>
+				<liferay-ui:search-container-results
+					results="<%= ListUtil.subList(groups, searchContainer.getStart(), searchContainer.getEnd()) %>"
+				/>
+
+				<liferay-ui:search-container-row
+					className="com.liferay.portal.model.Group"
+					escapedModel="<%= true %>"
+					keyProperty="groupId"
+					modelVar="group"
+					rowIdProperty="friendlyURL"
+				>
+
+					<liferay-ui:search-container-column-text
+						name="name"
+						value="<%= HtmlUtil.escape(group.getDescriptiveName(locale)) %>"
+					/>
+
+					<liferay-ui:search-container-column-text
+						name="type"
+						value="<%= LanguageUtil.get(pageContext, group.getTypeLabel()) %>"
+					/>
+
+					<liferay-ui:search-container-column-text>
+
+						<%
+						Map<String, Object> data = new HashMap<String, Object>();
+
+						data.put("groupid", group.getGroupId());
+						%>
+
+						<aui:button cssClass="group-selector-button" data="<%= data %>" value="choose" />
+					</liferay-ui:search-container-column-text>
+				</liferay-ui:search-container-row>
+
+				<liferay-ui:search-iterator />
+			</liferay-ui:search-container>
+
+			<aui:script use="aui-base">
+				A.one('#<portlet:namespace />selectSiteRoleFm').delegate(
+					'click',
+					function(event) {
+						var groupId = event.currentTarget.attr('data-groupid');
+
+						document.<portlet:namespace />selectSiteRoleFm.<portlet:namespace />groupId.value = groupId;
+
+						<%
+						portletURL.setParameter("resetCur", Boolean.TRUE.toString());
+						portletURL.setParameter("step", "2");
+						%>
+
+						submitForm(document.<portlet:namespace />selectSiteRoleFm, "<%= portletURL.toString() %>");
+					},
+					'.group-selector-button'
+				);
+			</aui:script>
+		</c:when>
+
+		<c:when test="<%= step == 2 %>">
+
+			<%
+			long groupId = ParamUtil.getLong(request, "groupId", uniqueGroupId);
+			%>
+
+			<aui:input name="step" type="hidden" value="2" />
+			<aui:input name="groupId" type="hidden" value="<%= String.valueOf(groupId) %>" />
+
+			<liferay-ui:header
+				title="site-roles"
+			/>
+
+			<%
+			Group group = GroupServiceUtil.getGroup(groupId);
+
+			portletURL.setParameter("step", "1");
+			%>
+
+			<c:if test="<%= selUser != null %>">
+
+				<%
+				String breadcrumbs = "<a href=\"" + portletURL.toString() + "\">" + LanguageUtil.get(pageContext, "sites") + "</a> &raquo; " + HtmlUtil.escape(group.getDescriptiveName(locale));
+				%>
+
+				<div class="breadcrumbs">
+					<%= breadcrumbs %>
+				</div>
+			</c:if>
+
+			<%
+			portletURL.setParameter("step", "2");
+			portletURL.setParameter("groupId", String.valueOf(groupId));
+			%>
+
+			<liferay-ui:search-container
+				headerNames="name"
+				searchContainer="<%= new RoleSearch(renderRequest, portletURL) %>"
+			>
+				<liferay-ui:search-form
+					page="/html/portlet/roles_admin/role_search.jsp"
+				/>
+
+				<%
+				RoleSearchTerms searchTerms = (RoleSearchTerms)searchContainer.getSearchTerms();
+				%>
+
+				<div class="separator"><!-- --></div>
+
+				<liferay-ui:search-container-results>
+
+					<%
+					if (filterManageableRoles) {
+						List<Role> roles = RoleLocalServiceUtil.search(company.getCompanyId(), searchTerms.getKeywords(), new Integer[] {RoleConstants.TYPE_SITE}, QueryUtil.ALL_POS, QueryUtil.ALL_POS, searchContainer.getOrderByComparator());
+
+						roles = UsersAdminUtil.filterGroupRoles(permissionChecker, groupId, roles);
+
+						searchContainer.setTotal(roles.size());
+
+						results = ListUtil.subList(roles, searchContainer.getStart(), searchContainer.getEnd());
+					}
+					else {
+						total = RoleLocalServiceUtil.searchCount(company.getCompanyId(), searchTerms.getKeywords(), new Integer[] {RoleConstants.TYPE_SITE});
+
+						searchContainer.setTotal(total);
+
+						results = RoleLocalServiceUtil.search(company.getCompanyId(), searchTerms.getKeywords(), new Integer[] {RoleConstants.TYPE_SITE}, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+					}
+
+					searchContainer.setResults(results);
+					%>
+
+				</liferay-ui:search-container-results>
+
+				<liferay-ui:search-container-row
+					className="com.liferay.portal.model.Role"
+					keyProperty="roleId"
+					modelVar="role"
+				>
+					<liferay-util:param name="className" value="<%= RolesAdminUtil.getCssClassName(role) %>" />
+					<liferay-util:param name="classHoverName" value="<%= RolesAdminUtil.getCssClassName(role) %>" />
+
+					<liferay-ui:search-container-column-text
+						name="title"
+						value="<%= HtmlUtil.escape(role.getTitle(locale)) %>"
+					/>
+
+					<liferay-ui:search-container-column-text>
+						<c:if test="<%= Validator.isNull(p_u_i_d) || SiteMembershipPolicyUtil.isRoleAllowed((selUser != null) ? selUser.getUserId() : 0, group.getGroupId(), role.getRoleId()) %>">
+
+							<%
+							Map<String, Object> data = new HashMap<String, Object>();
+
+							data.put("groupdescriptivename", HtmlUtil.escapeAttribute(group.getDescriptiveName(locale)));
+							data.put("groupid", group.getGroupId());
+							data.put("roleid", role.getRoleId());
+							data.put("roletitle", HtmlUtil.escapeAttribute(role.getTitle(locale)));
+							data.put("searchcontainername", "siteRoles");
+							%>
+
+							<aui:button cssClass="selector-button" data="<%= data %>" value="choose" />
+						</c:if>
+					</liferay-ui:search-container-column-text>
+				</liferay-ui:search-container-row>
+
+				<liferay-ui:search-iterator />
+			</liferay-ui:search-container>
+
+			<aui:script use="aui-base">
+				var Util = Liferay.Util;
+
+				A.one('#<portlet:namespace />selectSiteRoleFm').delegate(
+					'click',
+					function(event) {
+						var result = Util.getAttributes(event.currentTarget, 'data-');
+
+						Util.getOpener().Liferay.fire('<%= HtmlUtil.escapeJS(eventName) %>', result);
+
+						Util.getWindow().hide();
+					},
+					'.selector-button'
+				);
+			</aui:script>
+		</c:when>
+	</c:choose>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/view.jsp
new file mode 100644
index 0000000..c933c25
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/view.jsp
@@ -0,0 +1,155 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/roles_admin/init.jsp" %>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/roles_admin/view");
+
+pageContext.setAttribute("portletURL", portletURL);
+
+String portletURLString = portletURL.toString();
+%>
+
+<liferay-ui:error exception="<%= RequiredRoleException.class %>" message="you-cannot-delete-a-system-role" />
+
+<aui:form action="<%= portletURLString %>" method="get" name="fm">
+	<liferay-portlet:renderURLParams varImpl="portletURL" />
+
+	<%
+	String toolbarItem = ParamUtil.getString(request, "toolbarItem");
+
+	RoleSearch searchContainer = new RoleSearch(renderRequest, portletURL);
+
+	List headerNames = searchContainer.getHeaderNames();
+
+	headerNames.add(StringPool.BLANK);
+	%>
+
+	<aui:nav-bar>
+		<aui:nav>
+			<portlet:renderURL var="viewRolesURL">
+				<portlet:param name="struts_action" value="/roles_admin/view" />
+			</portlet:renderURL>
+
+			<c:if test="<%= PortalPermissionUtil.contains(permissionChecker, ActionKeys.ADD_ROLE) %>">
+				<liferay-portlet:renderURL varImpl="addRoleURL">
+					<portlet:param name="struts_action" value="/roles_admin/edit_role" />
+					<portlet:param name="redirect" value="<%= viewRolesURL %>" />
+				</liferay-portlet:renderURL>
+
+				<aui:nav-item dropdown="<%= true %>" label="add" selected='<%= toolbarItem.equals("add") %>'>
+
+					<%
+					addRoleURL.setParameter("type", String.valueOf(RoleConstants.TYPE_REGULAR));
+					%>
+
+					<aui:nav-item href="<%= addRoleURL.toString() %>" label="regular-role" />
+
+					<%
+					addRoleURL.setParameter("type", String.valueOf(RoleConstants.TYPE_SITE));
+					%>
+
+					<aui:nav-item href="<%= addRoleURL.toString() %>" label="site-role" />
+
+					<%
+					addRoleURL.setParameter("type", String.valueOf(RoleConstants.TYPE_ORGANIZATION));
+					%>
+
+					<aui:nav-item href="<%= addRoleURL.toString() %>" label="organization-role" />
+				</aui:nav-item>
+			</c:if>
+		</aui:nav>
+
+		<aui:nav-bar-search cssClass="pull-right" file="/html/portlet/roles_admin/role_search.jsp" searchContainer="<%= searchContainer %>" />
+	</aui:nav-bar>
+
+	<%
+	RoleSearchTerms searchTerms = (RoleSearchTerms)searchContainer.getSearchTerms();
+
+	int total = RoleLocalServiceUtil.searchCount(company.getCompanyId(), searchTerms.getKeywords(), searchTerms.getTypesObj());
+
+	searchContainer.setTotal(total);
+
+	List results = RoleLocalServiceUtil.search(company.getCompanyId(), searchTerms.getKeywords(), searchTerms.getTypesObj(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+
+	searchContainer.setResults(results);
+
+	portletURL.setParameter(searchContainer.getCurParam(), String.valueOf(searchContainer.getCur()));
+	%>
+
+	<aui:input name="rolesRedirect" type="hidden" value="<%= portletURL.toString() %>" />
+
+	<%
+	List resultRows = searchContainer.getResultRows();
+
+	for (int i = 0; i < results.size(); i++) {
+		Role role = (Role)results.get(i);
+
+		role = role.toEscapedModel();
+
+		ResultRow row = new ResultRow(role, role.getRoleId(), i);
+
+		PortletURL rowURL = null;
+
+		if (RolePermissionUtil.contains(permissionChecker, role.getRoleId(), ActionKeys.UPDATE)) {
+			rowURL = renderResponse.createRenderURL();
+
+			rowURL.setParameter("struts_action", "/roles_admin/edit_role");
+			rowURL.setParameter("redirect", searchContainer.getIteratorURL().toString());
+			rowURL.setParameter("roleId", String.valueOf(role.getRoleId()));
+		}
+
+		// Name
+
+		row.addText(role.getTitle(locale), rowURL);
+
+		// Type
+
+		row.addText(LanguageUtil.get(pageContext, role.getTypeLabel()), rowURL);
+
+		// Subtype
+
+		if ((PropsValues.ROLES_ORGANIZATION_SUBTYPES.length > 0) ||
+			(PropsValues.ROLES_REGULAR_SUBTYPES.length > 0) ||
+			(PropsValues.ROLES_SITE_SUBTYPES.length > 0)) {
+
+			row.addText(LanguageUtil.get(pageContext, role.getSubtype()), rowURL);
+		}
+
+		// Description
+
+		row.addText(role.getDescription(locale), rowURL);
+
+		// Action
+
+		row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/roles_admin/role_action.jsp");
+
+		// CSS
+
+		row.setClassName(RolesAdminUtil.getCssClassName(role));
+		row.setClassHoverName(RolesAdminUtil.getCssClassName(role));
+
+		// Add result row
+
+		resultRows.add(row);
+	}
+	%>
+
+	<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/view_resources.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/view_resources.jsp
new file mode 100644
index 0000000..4df7e9a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/roles_admin/view_resources.jsp
@@ -0,0 +1,37 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/roles_admin/init.jsp" %>
+
+<%
+String cmd = ParamUtil.getString(request, Constants.CMD);
+
+Role role = (Role)request.getAttribute(WebKeys.ROLE);
+
+String portletResource = ParamUtil.getString(request, "portletResource");
+
+request.setAttribute("edit_role_permissions.jsp-role", role);
+request.setAttribute("edit_role_permissions.jsp-portletResource", portletResource);
+%>
+
+<c:choose>
+	<c:when test="<%= cmd.equals(Constants.EDIT) %>">
+		<liferay-util:include page="/html/portlet/roles_admin/edit_role_permissions_form.jsp" />
+	</c:when>
+	<c:otherwise>
+		<liferay-util:include page="/html/portlet/roles_admin/edit_role_permissions_summary.jsp" />
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/article.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/article.jsp
new file mode 100644
index 0000000..1d057cc
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/article.jsp
@@ -0,0 +1,75 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/rss/init.jsp" %>
+
+<%
+String url = ParamUtil.getString(request, "url");
+int index = ParamUtil.getInteger(request, "index");
+
+SyndFeed feed = null;
+
+try {
+	ObjectValuePair ovp = RSSUtil.getFeed(url);
+
+	feed = (SyndFeed)ovp.getValue();
+}
+catch (Exception e) {
+}
+%>
+
+<c:if test="<%= (url != null) && (feed != null) %>">
+	<div style="padding: 10px 10px 10px 10px;">
+
+		<%
+		List entries = feed.getEntries();
+
+		if (index < entries.size()) {
+			SyndEntry entry = (SyndEntry)entries.get(index);
+
+			SyndContent description = entry.getDescription();
+
+			String contentString = description.getValue();
+
+			SyndContent content = null;
+
+			try {
+				content = (SyndContent)entry.getContents().get(0);
+
+				if (Validator.isNotNull(content.getValue().trim())) {
+					contentString = content.getValue();
+				}
+			}
+			catch (Throwable t) {
+			}
+		%>
+
+			<aui:a cssClass="font-large" href="<%= entry.getLink() %>" style="font-weight: bold;" target="_blank"><%= entry.getTitle() %></aui:a><br />
+
+			<c:if test="<%= entry.getPublishedDate() != null %>">
+				<%= dateFormatDateTime.format(entry.getPublishedDate()) %><br />
+			</c:if>
+
+			<div class="font-small">
+				<%= contentString %>
+			</div>
+
+		<%
+		}
+		%>
+
+	</div>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/configuration.jsp
new file mode 100644
index 0000000..8d8d4a9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/configuration.jsp
@@ -0,0 +1,295 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/rss/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+String typeSelection = ParamUtil.getString(request, "typeSelection");
+
+int assetOrder = ParamUtil.getInteger(request, "assetOrder", -1);
+%>
+
+<liferay-portlet:renderURL portletConfiguration="true" var="configurationURL" />
+
+<%
+PortletURL configurationActionURL = renderResponse.createActionURL();
+
+configurationActionURL.setParameter("struts_action", "/portlet_configuration/edit_configuration");
+configurationActionURL.setParameter("redirect", configurationURL.toString());
+configurationActionURL.setParameter("backURL", redirect);
+configurationActionURL.setParameter("portletResource", portletResource);
+
+PortletURL configurationRenderURL = renderResponse.createRenderURL();
+
+configurationRenderURL.setParameter("struts_action", "/portlet_configuration/edit_configuration");
+configurationRenderURL.setParameter("redirect", configurationURL.toString());
+configurationRenderURL.setParameter("backURL", redirect);
+configurationRenderURL.setParameter("portletResource", portletResource);
+%>
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= configurationURL.toString() %>" />
+	<aui:input name="typeSelection" type="hidden" />
+	<aui:input name="articleGroupId" type="hidden" />
+	<aui:input name="articleId" type="hidden" />
+	<aui:input name="assetOrder" type="hidden" />
+
+	<c:choose>
+		<c:when test="<%= typeSelection.equals(StringPool.BLANK) %>">
+			<liferay-ui:panel-container extended="<%= true %>" id="rssFeedsSettingsPanelContainer" persistState="<%= true %>">
+				<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="rssFeedsSettingsPanel" persistState="<%= true %>" title="feeds">
+					<liferay-ui:error exception="<%= ValidatorException.class %>">
+
+					<%
+					ValidatorException ve = (ValidatorException)errorException;
+					%>
+
+					<liferay-ui:message key="the-following-are-invalid-urls" />
+
+					<%
+					Enumeration enu = ve.getFailedKeys();
+
+					while (enu.hasMoreElements()) {
+						String url = (String)enu.nextElement();
+					%>
+
+						<strong><%= url %></strong><%= (enu.hasMoreElements()) ? ", " : "." %>
+
+					<%
+					}
+					%>
+
+					</liferay-ui:error>
+
+					<aui:fieldset cssClass="subscriptions">
+
+						<%
+						if (urls.length == 0) {
+							urls = new String[1];
+							urls [0] = StringPool.BLANK;
+						}
+
+						for (int i = 0; i < urls.length; i++) {
+							String title = StringPool.BLANK;
+
+							if (i < titles.length) {
+								title = titles[i];
+							}
+						%>
+
+							<div class="lfr-form-row lfr-form-row-inline">
+								<div class="row-fields">
+									<aui:input cssClass="lfr-input-text-container" label="title" name='<%= "title" + i %>' value="<%= title %>" />
+
+									<aui:input cssClass="lfr-input-text-container" label="url" name='<%= "url" + i %>' value="<%= urls[i] %>" />
+								</div>
+							</div>
+
+						<%
+						}
+						%>
+
+					</aui:fieldset>
+				</liferay-ui:panel>
+
+				<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="rssFeedsDisplaySettingsPanel" persistState="<%= true %>" title="display-settings">
+					<aui:fieldset>
+						<aui:input name="preferences--showFeedTitle--" type="checkbox" value="<%= showFeedTitle %>" />
+
+						<aui:input name="preferences--showFeedPublishedDate--" type="checkbox" value="<%= showFeedPublishedDate %>" />
+
+						<aui:input name="preferences--showFeedDescription--" type="checkbox" value="<%= showFeedDescription %>" />
+
+						<%
+						String taglibShowFeedImageOnClick = "if (this.checked) {document." + renderResponse.getNamespace() + "fm." + renderResponse.getNamespace() + "feedImageAlignment.disabled = '';} else {document." + renderResponse.getNamespace() + "fm." + renderResponse.getNamespace() + "feedImageAlignment.disabled = 'disabled';}";
+						%>
+
+						<aui:input name="preferences--showFeedImage--" onClick="<%= taglibShowFeedImageOnClick %>" type="checkbox" value="<%= showFeedImage %>" />
+
+						<aui:input name="preferences--showFeedItemAuthor--" type="checkbox" value="<%= showFeedItemAuthor %>" />
+
+						<aui:select label="num-of-entries-per-feed" name="preferences--entriesPerFeed--">
+
+							<%
+							for (int i = 1; i < 10; i++) {
+							%>
+
+								<aui:option label="<%= i %>" selected="<%= i == entriesPerFeed %>" />
+
+							<%
+							}
+							%>
+
+						</aui:select>
+
+						<aui:select label="num-of-expanded-entries-per-feed" name="preferences--expandedEntriesPerFeed--">
+
+							<%
+							for (int i = 0; i < 10; i++) {
+							%>
+
+								<aui:option label="<%= i %>" selected="<%= i == expandedEntriesPerFeed %>" />
+
+							<%
+							}
+							%>
+
+						</aui:select>
+
+						<aui:select disabled="<%= !showFeedImage %>" name="preferences--feedImageAlignment--">
+							<aui:option label="left" selected='<%= feedImageAlignment.equals("left") %>' />
+							<aui:option label="right" selected='<%= feedImageAlignment.equals("right") %>' />
+						</aui:select>
+
+						<aui:field-wrapper label="header-web-content">
+							<div class="input-append">
+								<c:choose>
+									<c:when test="<%= Validator.isNotNull(headerArticleId) %>">
+
+										<%
+										JournalArticle headerArticle = JournalArticleLocalServiceUtil.getArticle(headerArticleGroupId, headerArticleId);
+										%>
+
+										<liferay-ui:input-resource url="<%= headerArticle.getTitle(locale) %>" />
+									</c:when>
+									<c:otherwise>
+										<liferay-ui:input-resource url="" />
+									</c:otherwise>
+								</c:choose>
+
+								<aui:button name="selectButton" onClick='<%= renderResponse.getNamespace() + "selectionForHeader();" %>' value="select" />
+
+								<aui:button name="removeButton" onClick='<%= renderResponse.getNamespace() + "removeSelectionForHeader();" %>' value="remove" />
+							</div>
+						</aui:field-wrapper>
+
+						<aui:field-wrapper label="footer-web-content">
+							<div class="input-append">
+								<c:choose>
+									<c:when test="<%= Validator.isNotNull(footerArticleId) %>">
+
+										<%
+										JournalArticle footerArticle = JournalArticleLocalServiceUtil.getArticle(footerArticleGroupId, footerArticleId);
+										%>
+
+										<liferay-ui:input-resource url="<%= footerArticle.getTitle(locale) %>" />
+									</c:when>
+									<c:otherwise>
+										<liferay-ui:input-resource url="" />
+									</c:otherwise>
+								</c:choose>
+
+								<aui:button name="selectButton" onClick='<%= renderResponse.getNamespace() + "selectionForFooter();" %>' value="select" />
+
+								<aui:button name="removeButton" onClick='<%= renderResponse.getNamespace() + "removeSelectionForFooter();" %>' value="remove" />
+							</div>
+						</aui:field-wrapper>
+					</aui:fieldset>
+				</liferay-ui:panel>
+			</liferay-ui:panel-container>
+
+			<aui:button-row>
+				<aui:button onClick='<%= renderResponse.getNamespace() + "saveSettings();" %>' type="submit" />
+			</aui:button-row>
+
+			<aui:script use="aui-base">
+				var subscriptionsTable = A.one('#<portlet:namespace />subscriptions');
+
+				if (subscriptionsTable) {
+					subscriptionsTable.delegate(
+						'click',
+						function(event) {
+							event.currentTarget.get('parentNode.parentNode').remove();
+						},
+						'.remove-subscription'
+					);
+				}
+			</aui:script>
+		</c:when>
+		<c:when test="<%= typeSelection.equals(JournalArticle.class.getName()) %>">
+			<aui:input name="assetType" type="hidden" value="<%= JournalArticle.class.getName() %>" />
+
+			<liferay-ui:message key="select" />: <%= ResourceActionsUtil.getModelResource(locale, JournalArticle.class.getName()) %>
+
+			<br /><br />
+
+			<%@ include file="/html/portlet/rss/select_journal_article.jspf" %>
+		</c:when>
+	</c:choose>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />removeSelectionForFooter() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = 'remove-footer-article';
+
+		submitForm(document.<portlet:namespace />fm, '<%= configurationActionURL.toString() %>');
+	}
+
+	function <portlet:namespace />removeSelectionForHeader() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = 'remove-header-article';
+
+		submitForm(document.<portlet:namespace />fm, '<%= configurationActionURL.toString() %>');
+	}
+
+	function <portlet:namespace />selectAsset(articleGroupId, articleId, assetOrder) {
+		if (assetOrder == 1) {
+			document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = 'set-footer-article';
+		}
+		else {
+			document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = 'set-header-article';
+		}
+
+		document.<portlet:namespace />fm.<portlet:namespace />articleGroupId.value = articleGroupId;
+		document.<portlet:namespace />fm.<portlet:namespace />articleId.value = articleId;
+		document.<portlet:namespace />fm.<portlet:namespace />typeSelection.value = '';
+
+		submitForm(document.<portlet:namespace />fm, '<%= configurationActionURL.toString() %>');
+	}
+
+	function <portlet:namespace />saveSettings() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = '<%= Constants.UPDATE %>';
+		document.<portlet:namespace />fm.<portlet:namespace />typeSelection.value = '';
+
+		submitForm(document.<portlet:namespace />fm, '<%= configurationActionURL.toString() %>');
+	}
+
+	function <portlet:namespace />selectionForHeader() {
+		document.<portlet:namespace />fm.<portlet:namespace />typeSelection.value = '<%= JournalArticle.class.getName() %>';
+		document.<portlet:namespace />fm.<portlet:namespace />assetOrder.value = 0;
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />selectionForFooter() {
+		document.<portlet:namespace />fm.<portlet:namespace />typeSelection.value = '<%= JournalArticle.class.getName() %>';
+		document.<portlet:namespace />fm.<portlet:namespace />assetOrder.value = 1;
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
+
+<aui:script use="liferay-auto-fields">
+	new Liferay.AutoFields(
+		{
+			contentBox: 'fieldset.subscriptions',
+			fieldIndexes: '<portlet:namespace />subscriptionIndexes',
+			namespace: '<portlet:namespace />'
+		}
+	).render();
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/css/.sass-cache/main.css
new file mode 100644
index 0000000..1c20297
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/css/.sass-cache/main.css
@@ -0,0 +1,55 @@
+.portlet-rss .feed-date {
+  background: url(@theme_image_path@/common/time.png) no-repeat 0 50%;
+  margin: 0.3em 0;
+  padding-left: 20px; }
+.portlet-rss .feed-description {
+  margin: 0 0 5px 0; }
+.portlet-rss .feed-entries {
+  font-size: 1.1em; }
+.portlet-rss .feed-entry {
+  margin-bottom: 4px; }
+.portlet-rss .feed-entry-author {
+  display: block;
+  font-size: 0.9em; }
+.portlet-rss .feed-entry-content {
+  padding-left: 1.8em; }
+  .portlet-rss .feed-entry-content img {
+    margin-right: 0.5em; }
+.portlet-rss .feed-entry-enclosure {
+  display: block;
+  font-size: 0.9em; }
+.portlet-rss .feed-entry-expander {
+  cursor: pointer;
+  float: left;
+  padding-right: 5px; }
+.portlet-rss .feed-entry-title {
+  display: block;
+  font-weight: bold; }
+.portlet-rss .feed-image-left {
+  margin: 4px 0 4px 20px;
+  text-align: left; }
+.portlet-rss .feed-image-right {
+  float: right;
+  margin: 0 0 4px 4px; }
+.portlet-rss .feed-published-date.feed-date {
+  background-image: url(@theme_image_path@/common/date.png); }
+.portlet-rss .feed-published-date a {
+  font-weight: bold;
+  text-decoration: none; }
+.portlet-rss .feed-title {
+  font-size: 1.2em;
+  font-weight: bold;
+  margin: 0 0 0.5em -20px; }
+  .portlet-rss .feed-title a {
+    background: url(@theme_image_path@/common/news.png) no-repeat 0 50%;
+    padding-left: 20px; }
+.portlet-rss .feed {
+  padding-left: 20px; }
+  .portlet-rss .feed .separator {
+    margin-left: -20px; }
+.portlet-rss .header {
+  cursor: default;
+  font-weight: bold;
+  margin-top: 2px;
+  padding: 2px 5px; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/css/main.css
new file mode 100644
index 0000000..d63588d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/css/main.css
@@ -0,0 +1,95 @@
+.portlet-rss {
+	.feed-date {
+		background: url(@theme_image_path@/common/time.png) no-repeat 0 50%;
+		margin: 0.3em 0;
+		padding-left: 20px;
+	}
+
+	.feed-description {
+		margin: 0 0 5px 0;
+	}
+
+	.feed-entries {
+		font-size: 1.1em;
+	}
+
+	.feed-entry {
+		margin-bottom: 4px;
+	}
+
+	.feed-entry-author {
+		display: block;
+		font-size: 0.9em;
+	}
+
+	.feed-entry-content {
+		padding-left: 1.8em;
+
+		img {
+			margin-right: 0.5em;
+		}
+	}
+
+	.feed-entry-enclosure {
+		display: block;
+		font-size: 0.9em;
+	}
+
+	.feed-entry-expander {
+		cursor: pointer;
+		float: left;
+		padding-right: 5px;
+	}
+
+	.feed-entry-title {
+		display: block;
+		font-weight: bold;
+	}
+
+	.feed-image-left {
+		margin: 4px 0 4px 20px;
+		text-align: left;
+	}
+
+	.feed-image-right {
+		float: right;
+		margin: 0 0 4px 4px;
+	}
+
+	.feed-published-date {
+		&.feed-date {
+			background-image: url(@theme_image_path@/common/date.png)
+		}
+
+		a {
+			font-weight: bold;
+			text-decoration: none;
+		}
+	}
+
+	.feed-title {
+		font-size: 1.2em;
+		font-weight: bold;
+		margin: 0 0 0.5em -20px;
+
+		a {
+			background: url(@theme_image_path@/common/news.png) no-repeat 0 50%;
+			padding-left: 20px;
+		}
+	}
+
+	.feed {
+		padding-left: 20px;
+
+		.separator {
+			margin-left: -20px;
+		}
+	}
+
+	.header {
+		cursor: default;
+		font-weight: bold;
+		margin-top: 2px;
+		padding: 2px 5px;
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/feed.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/feed.jspf
new file mode 100644
index 0000000..158f789
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/feed.jspf
@@ -0,0 +1,228 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+SyndFeed feed = null;
+
+try {
+	ObjectValuePair ovp = RSSUtil.getFeed(url);
+
+	feed = (SyndFeed)ovp.getValue();
+
+	if (Validator.isNull(title)) {
+		title = feed.getTitle();
+	}
+}
+catch (Exception e) {
+}
+%>
+
+<c:choose>
+	<c:when test="<%= (Validator.isNotNull(url)) && (feed != null) %>">
+		<div class="feed">
+
+			<%
+			String baseURL = null;
+
+			String feedLink = feed.getLink();
+
+			if (Validator.isNull(feedLink) || !HttpUtil.hasDomain(feedLink)) {
+				baseURL = HttpUtil.getProtocol(url).concat(Http.PROTOCOL_DELIMITER).concat(HttpUtil.getDomain(url));
+
+				if (Validator.isNotNull(feedLink)) {
+					feedLink = baseURL.concat(feedLink);
+				}
+				else {
+					feedLink = baseURL;
+				}
+			}
+			else {
+				baseURL = HttpUtil.getProtocol(feedLink).concat(Http.PROTOCOL_DELIMITER).concat(HttpUtil.getDomain(feedLink));
+			}
+
+			Date publishedDate = feed.getPublishedDate();
+			String description = feed.getDescription();
+
+			SyndImage feedImage = feed.getImage();
+
+			String feedImageLink = StringPool.BLANK;
+			String feedImageURL = StringPool.BLANK;
+
+			if (feedImage != null) {
+				feedImageLink = feedImage.getLink();
+
+				if (!HttpUtil.hasDomain(feedImageLink)) {
+					feedImageLink = baseURL + feedImageLink;
+				}
+
+				feedImageURL = feedImage.getUrl();
+
+				if (!HttpUtil.hasDomain(feedImageURL)) {
+					feedImageURL = baseURL + feedImageURL;
+				}
+			}
+			%>
+
+			<c:if test="<%= showFeedTitle %>">
+				<div class="feed-title">
+					<aui:a href="<%= feedLink %>" target="_new"><%= HtmlUtil.escape(title) %></aui:a>
+				</div>
+			</c:if>
+
+			<c:if test="<%= (publishedDate != null) && showFeedPublishedDate %>">
+				<div class="feed-published-date feed-date">
+					<aui:a href="<%= feedLink %>" target="_new"><%= dateFormatDateTime.format(publishedDate) %></aui:a>
+				</div>
+			</c:if>
+
+			<c:if test="<%= Validator.isNotNull(description) && showFeedDescription %>">
+				<div class="feed-description">
+					<%= HtmlUtil.escape(description) %>
+				</div>
+			</c:if>
+
+			<c:if test="<%= (feedImage != null) && showFeedImage %>">
+				<div class="feed-image-<%= feedImageAlignment %>">
+					<aui:a href="<%= feedImageLink %>" target="_new" title="<%= feedImage.getTitle() %>"><img alt="<%= feedImage.getDescription() %>" src="<%= feedImageURL %>" /></aui:a>
+				</div>
+			</c:if>
+
+			<div class="feed-entries">
+
+				<%
+				List entries = feed.getEntries();
+
+				for (int j = 0; j < entries.size(); j++) {
+					SyndEntry entry = (SyndEntry)entries.get(j);
+
+					String entryLink = entry.getLink();
+
+					if (Validator.isNotNull(entryLink) && !HttpUtil.hasDomain(entryLink)) {
+						entryLink = baseURL + entryLink;
+					}
+
+					String author = entry.getAuthor();
+
+					SyndContent content = entry.getDescription();
+
+					List contents = new ArrayList();
+
+					if (content == null) {
+						contents = entry.getContents();
+					}
+					else {
+						contents.add(content);
+					}
+
+					List<SyndEnclosure> enclosures = (List<SyndEnclosure>)entry.getEnclosures();
+
+					String enclosureLink = StringPool.BLANK;
+					String enclosureLinkTitle = entry.getTitle();
+
+					for (SyndEnclosure enclosure : enclosures) {
+						if (Validator.isNotNull(enclosure.getUrl())) {
+							enclosureLink = enclosure.getUrl();
+
+							int pos = enclosureLink.lastIndexOf(StringPool.FORWARD_SLASH);
+
+							if (pos > -1) {
+								enclosureLinkTitle = enclosureLink.substring(pos + 1);
+							}
+							else {
+								enclosureLinkTitle = enclosureLink;
+							}
+
+							break;
+						}
+					}
+				%>
+
+					<div class="feed-entry">
+						<img alt="<%= (windowState.equals(WindowState.MAXIMIZED) || (j < expandedEntriesPerFeed)) ? LanguageUtil.get(pageContext, "collapse") : LanguageUtil.get(pageContext, "expande") %>" class="<portlet:namespace />entry-expander feed-entry-expander" src='<%= themeDisplay.getPathThemeImage() %>/arrows/01_<%= (windowState.equals(WindowState.MAXIMIZED) || (j < expandedEntriesPerFeed)) ? "minus" : "plus" %>.png' />
+
+						<span class="feed-entry-title"><aui:a href="<%= entryLink %>" target="_new"><%= HtmlUtil.escape(entry.getTitle()) %></aui:a></span>
+
+						<div class="feed-entry-content <%= (windowState.equals(WindowState.MAXIMIZED) || (j < expandedEntriesPerFeed)) ? "" : "hide" %>">
+							<c:if test="<%= entry.getPublishedDate() != null %>">
+								<div class="feed-date">
+									<%= dateFormatDateTime.format(entry.getPublishedDate()) %>
+								</div>
+							</c:if>
+
+							<c:if test="<%= showFeedItemAuthor && Validator.isNotNull(author) %>">
+								<span class="feed-entry-author"><%= author %></span>
+							</c:if>
+
+							<c:if test="<%= Validator.isNotNull(enclosureLink) %>">
+								<span class="feed-entry-enclosure"><aui:a href="<%= enclosureLink %>" target="_new"><%= enclosureLinkTitle %></aui:a></span>
+							</c:if>
+
+							<%
+							for (int k = 0; k < contents.size(); k++) {
+								content = (SyndContent)contents.get(k);
+
+								if ((content != null) && Validator.isNotNull(content.getValue())) {
+									String value = StringUtil.replace(
+										content.getValue(),
+										new String[] {
+											"src=\"/",
+											"href=\"/"
+										},
+										new String[] {
+											"src=\"" + baseURL + "/",
+											"href=\"" + baseURL + "/"
+										});
+
+									String sanitizedValue = null;
+
+									try {
+										sanitizedValue = SanitizerUtil.sanitize(company.getCompanyId(), scopeGroupId, user.getUserId(), null, 0, ContentTypes.TEXT_HTML, Sanitizer.MODE_XSS, value, null);
+									}
+									catch (SanitizerException se) {
+										sanitizedValue = StringPool.BLANK;
+									}
+							%>
+
+									<%= sanitizedValue %>
+
+							<%
+								}
+							}
+							%>
+
+						</div>
+					</div>
+
+				<%
+					if ((j + 1) >= entriesPerFeed) {
+						break;
+					}
+				}
+				%>
+
+			</div>
+
+			<c:if test="<%= !last %>">
+				<div class="separator"><!-- --></div>
+			</c:if>
+		</div>
+	</c:when>
+	<c:otherwise>
+		<div class="alert alert-error">
+			<%= LanguageUtil.format(pageContext, "cannot-be-found", HtmlUtil.escape(urls[i]), false) %>
+		</div>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/init.jsp
new file mode 100644
index 0000000..cf76e48
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/init.jsp
@@ -0,0 +1,57 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.kernel.sanitizer.Sanitizer" %><%@
+page import="com.liferay.portal.kernel.sanitizer.SanitizerException" %><%@
+page import="com.liferay.portal.kernel.sanitizer.SanitizerUtil" %><%@
+page import="com.liferay.portlet.rss.util.RSSUtil" %>
+
+<%@ page import="com.sun.syndication.feed.synd.SyndContent" %><%@
+page import="com.sun.syndication.feed.synd.SyndEnclosure" %><%@
+page import="com.sun.syndication.feed.synd.SyndEntry" %><%@
+page import="com.sun.syndication.feed.synd.SyndFeed" %><%@
+page import="com.sun.syndication.feed.synd.SyndImage" %>
+
+<%
+String portletResource = ParamUtil.getString(request, "portletResource");
+
+String[] urls = portletPreferences.getValues("urls", new String[0]);
+String[] titles = portletPreferences.getValues("titles", new String[0]);
+int entriesPerFeed = GetterUtil.getInteger(portletPreferences.getValue("entriesPerFeed", "8"));
+int expandedEntriesPerFeed = GetterUtil.getInteger(portletPreferences.getValue("expandedEntriesPerFeed", "1"));
+boolean showFeedTitle = GetterUtil.getBoolean(portletPreferences.getValue("showFeedTitle", Boolean.TRUE.toString()));
+boolean showFeedPublishedDate = GetterUtil.getBoolean(portletPreferences.getValue("showFeedPublishedDate", Boolean.TRUE.toString()));
+boolean showFeedDescription = GetterUtil.getBoolean(portletPreferences.getValue("showFeedDescription", Boolean.TRUE.toString()));
+boolean showFeedImage = GetterUtil.getBoolean(portletPreferences.getValue("showFeedImage", Boolean.TRUE.toString()));
+String feedImageAlignment = portletPreferences.getValue("feedImageAlignment", "right");
+boolean showFeedItemAuthor = GetterUtil.getBoolean(portletPreferences.getValue("showFeedItemAuthor", Boolean.TRUE.toString()));
+
+String[] headerArticleValues = portletPreferences.getValues("headerArticleValues", new String[] {"0", ""});
+
+long headerArticleGroupId = GetterUtil.getLong(headerArticleValues[0]);
+String headerArticleId = headerArticleValues[1];
+
+String[] footerArticleValues = portletPreferences.getValues("footerArticleValues", new String[] {"0", ""});
+
+long footerArticleGroupId = GetterUtil.getLong(footerArticleValues[0]);
+String footerArticleId = footerArticleValues[1];
+
+Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(locale, timeZone);
+%>
+
+<%@ include file="/html/portlet/rss/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/select_journal_article.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/select_journal_article.jspf
new file mode 100644
index 0000000..50de45c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/select_journal_article.jspf
@@ -0,0 +1,107 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/portlet_configuration/edit_configuration");
+portletURL.setParameter("redirect", redirect);
+portletURL.setParameter("backURL", redirect);
+portletURL.setParameter("portletResource", portletResource);
+portletURL.setParameter("typeSelection", JournalArticle.class.getName());
+portletURL.setParameter("assetOrder", String.valueOf(assetOrder));
+%>
+
+<liferay-ui:header
+	backURL="<%= configurationRenderURL.toString() %>"
+	title="web-content"
+/>
+
+<%
+ArticleSearch searchContainer = new ArticleSearch(renderRequest, portletURL);
+%>
+
+<liferay-ui:search-form
+	page="/html/portlet/journal/article_search.jsp"
+	searchContainer="<%= searchContainer %>"
+/>
+
+<%
+ArticleSearchTerms searchTerms = (ArticleSearchTerms)searchContainer.getSearchTerms();
+
+searchTerms.setVersion(-1);
+
+List<JournalArticle> results = null;
+int total = 0;
+%>
+
+<%@ include file="/html/portlet/journal/article_search_results.jspf" %>
+
+<%
+List resultRows = searchContainer.getResultRows();
+
+for (int i = 0; i < results.size(); i++) {
+	JournalArticle article = results.get(i);
+
+	ResultRow row = new ResultRow(article, article.getArticleId() + EditArticleAction.VERSION_SEPARATOR + article.getVersion(), i);
+
+	StringBundler sb = new StringBundler(9);
+
+	sb.append("javascript:");
+	sb.append(renderResponse.getNamespace());
+	sb.append("selectAsset('");
+	sb.append(article.getGroupId());
+	sb.append("', '");
+	sb.append(article.getArticleId());
+	sb.append("', '");
+	sb.append(assetOrder);
+	sb.append("');");
+
+	String rowHREF = sb.toString();
+
+	// Article id
+
+	row.addText(article.getArticleId(), rowHREF);
+
+	// Title
+
+	row.addText(HtmlUtil.escape(article.getTitle(locale)), rowHREF);
+
+	// Version
+
+	row.addText(String.valueOf(article.getVersion()), rowHREF);
+
+	// Modified date
+
+	row.addDate(article.getModifiedDate(), rowHREF);
+
+	// Display date
+
+	row.addDate(article.getDisplayDate(), rowHREF);
+
+	// Author
+
+	row.addText(HtmlUtil.escape(PortalUtil.getUserName(article)), rowHREF);
+
+	// Add result row
+
+	resultRows.add(row);
+}
+%>
+
+<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+
+<br />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/view.jsp
new file mode 100644
index 0000000..d251837
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/rss/view.jsp
@@ -0,0 +1,92 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/rss/init.jsp" %>
+
+<%
+String url = ParamUtil.getString(request, "url");
+String title = StringPool.BLANK;
+%>
+
+<c:if test="<%= Validator.isNotNull(headerArticleId) %>">
+	<p>
+		<liferay-ui:journal-article articleId="<%= headerArticleId %>" groupId="<%= headerArticleGroupId %>" />
+	</p>
+</c:if>
+
+<%
+for (int i = 0; i < urls.length; i++) {
+	url = urls[i];
+
+	if (i < titles.length) {
+		title = titles[i];
+	}
+	else {
+		title = StringPool.BLANK;
+	}
+
+	boolean last = false;
+
+	if (i == (urls.length - 1)) {
+		last = true;
+	}
+%>
+
+	<%@ include file="/html/portlet/rss/feed.jspf" %>
+
+<%
+}
+%>
+
+<c:if test="<%= Validator.isNotNull(footerArticleId) %>">
+	<p>
+		<liferay-ui:journal-article articleId="<%= footerArticleId %>" groupId="<%= footerArticleGroupId %>" />
+	</p>
+</c:if>
+
+<aui:script use="aui-base">
+	var minusAlt = '<%= UnicodeLanguageUtil.get(pageContext, "collapse") %>';
+	var minusImage = '01_minus.png';
+	var plusAlt = '<%= UnicodeLanguageUtil.get(pageContext, "expand") %>';
+	var plusImage = '01_plus.png';
+
+	A.all('.<portlet:namespace />entry-expander').on(
+		'click',
+		function(event) {
+			var expander = event.currentTarget;
+			var feedContent = expander.get('parentNode').one('.feed-entry-content');
+
+			if (feedContent) {
+				var altText = expander.attr('alt');
+				var src = expander.attr('src');
+
+				if (src.indexOf('minus.png') > -1) {
+					altText = altText.replace(minusAlt, plusAlt);
+					src = src.replace(minusImage, plusImage);
+				}
+				else {
+					altText = altText.replace(plusAlt, minusAlt);
+					src = src.replace(plusImage, minusImage);
+				}
+
+				feedContent.toggle();
+
+				expander.attr('alt', altText);
+				expander.attr('src', src);
+			}
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/configuration.jsp
new file mode 100644
index 0000000..d475143
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/configuration.jsp
@@ -0,0 +1,115 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/search/init.jsp" %>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationActionURL" />
+<liferay-portlet:renderURL portletConfiguration="true" var="configurationRenderURL" />
+
+<aui:form action="<%= configurationActionURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= configurationRenderURL %>" />
+
+	<aui:fieldset label="display-settings">
+		<div class="configuration-style" id="<portlet:namespace />configurationStyle">
+			<aui:field-wrapper>
+				<aui:input checked="<%= !advancedConfiguration %>" id="basic" label="basic" name="preferences--advancedConfiguration--" type="radio" value="false" />
+				<aui:input checked="<%= advancedConfiguration %>" id="advanced" label="advanced" name="preferences--advancedConfiguration--" type="radio" value="true" />
+			</aui:field-wrapper>
+		</div>
+
+		<div class="basic-configuration <%= (advancedConfiguration ? "hide" : StringPool.BLANK) %>" id="<portlet:namespace />basicConfiguration">
+			<aui:input name="preferences--displayScopeFacet--" type="checkbox" value="<%= displayScopeFacet %>" />
+
+			<aui:input name="preferences--displayAssetTypeFacet--" type="checkbox" value="<%= displayAssetTypeFacet %>" />
+
+			<aui:input name="preferences--displayAssetTagsFacet--" type="checkbox" value="<%= displayAssetTagsFacet %>" />
+
+			<aui:input name="preferences--displayAssetCategoriesFacet--" type="checkbox" value="<%= displayAssetCategoriesFacet %>" />
+
+			<aui:input name="preferences--displayFolderFacet--" type="checkbox" value="<%= displayFolderFacet %>" />
+
+			<aui:input name="preferences--displayUserFacet--" type="checkbox" value="<%= displayUserFacet %>" />
+
+			<aui:input name="preferences--displayModifiedRangeFacet--" type="checkbox" value="<%= displayModifiedRangeFacet %>" />
+		</div>
+
+		<div class="advanced-configuration <%= (!advancedConfiguration ? "hide" : StringPool.BLANK) %>" id="<portlet:namespace />advancedConfiguration">
+
+			<%
+			JSONObject searchConfigurationJSONObject = JSONFactoryUtil.createJSONObject(searchConfiguration);
+			%>
+
+			<aui:input cssClass="search-configuration-text" helpMessage="search-configuration-help" name="preferences--searchConfiguration--" type="textarea" value="<%= searchConfigurationJSONObject.toString(4) %>" />
+		</div>
+	</aui:fieldset>
+
+	<br />
+
+	<aui:fieldset label="spell-check-settings">
+		<aui:input helpMessage="collated-spell-check-result-enabled-help" id="collatedSpellCheckResultEnabled" label="display-did-you-mean-if-the-number-of-search-results-does-not-meet-the-threshold" name="preferences--collatedSpellCheckResultEnabled--" type="checkbox" value="<%= collatedSpellCheckResultEnabled %>" />
+
+		<div class="options-container <%= !collatedSpellCheckResultEnabled ? "hide" : StringPool.BLANK %>" id="<portlet:namespace />collatedSpellCheckResultOptionsContainer">
+			<liferay-ui:toggle-area align="none" defaultShowContent="<%= collatedSpellCheckResultEnabled %>" hideMessage='<%= "&laquo; " + LanguageUtil.get(pageContext, "hide-options") %>' id="toggle_id_search_configuration_collated_spell_check_result" showMessage='<%= LanguageUtil.get(pageContext, "show-options") + " &raquo;" %>'>
+				<aui:input disabled="<%= !collatedSpellCheckResultEnabled %>" helpMessage="collated-spell-check-result-display-threshold-help" label="threshold-for-displaying-did-you-mean" name="preferences--collatedSpellCheckResultDisplayThreshold--" size="10" type="text" value="<%= collatedSpellCheckResultDisplayThreshold %>" />
+			</liferay-ui:toggle-area>
+		</div>
+
+		<aui:input helpMessage="query-suggestions-enabled-help" id="querySuggestionsEnabled" label="display-related-queries" name="preferences--querySuggestionsEnabled--" type="checkbox" value="<%= querySuggestionsEnabled %>" />
+
+		<div class="options-container <%= !querySuggestionsEnabled ? "hide" : StringPool.BLANK %>" id="<portlet:namespace />querySuggestionsOptionsContainer">
+			<liferay-ui:toggle-area align="none" defaultShowContent="<%= querySuggestionsEnabled %>" hideMessage='<%= "&laquo; " + LanguageUtil.get(pageContext, "hide-options") %>' id="toggle_id_search_configuration_query_suggestions" showMessage='<%= LanguageUtil.get(pageContext, "show-options") + " &raquo;" %>'>
+				<aui:input disabled="<%= !querySuggestionsEnabled %>" label="maximum-number-of-related-queries" name="preferences--querySuggestionsMax--" size="10" type="text" value="<%= querySuggestionsMax %>" />
+
+				<aui:input disabled="<%= !querySuggestionsEnabled %>" helpMessage="query-suggestions-display-threshold-help" label="threshold-for-displaying-related-queries" name="preferences--querySuggestionsDisplayThreshold--" size="10" type="text" value="<%= querySuggestionsDisplayThreshold %>" />
+			</liferay-ui:toggle-area>
+		</div>
+
+		<aui:input helpMessage="query-indexing-enabled-help" id="queryIndexingEnabled" label="add-new-related-queries-based-on-successful-queries" name="preferences--queryIndexingEnabled--" type="checkbox" value="<%= queryIndexingEnabled %>" />
+
+		<div class="options-container <%= !queryIndexingEnabled ? "hide" : StringPool.BLANK %>" id="<portlet:namespace />queryIndexingOptionsContainer">
+			<liferay-ui:toggle-area align="none" defaultShowContent="<%= queryIndexingEnabled %>" hideMessage='<%= "&laquo; " + LanguageUtil.get(pageContext, "hide-options") %>' id="toggle_id_search_configuration_query_indexing" showMessage='<%= LanguageUtil.get(pageContext, "show-options") + " &raquo;" %>'>
+				<aui:input disabled="<%= !queryIndexingEnabled %>" helpMessage="query-indexing-threshold-help" name="preferences--queryIndexingThreshold--" size="10" type="text" value="<%= queryIndexingThreshold %>" />
+			</liferay-ui:toggle-area>
+		</div>
+	</aui:fieldset>
+
+	<br />
+
+	<aui:fieldset label="other-settings">
+		<c:if test="<%= permissionChecker.isCompanyAdmin() %>">
+			<aui:input helpMessage="display-results-in-document-form-help" name="preferences--displayResultsInDocumentForm--" type="checkbox" value="<%= displayResultsInDocumentForm %>" />
+		</c:if>
+
+		<aui:input name="preferences--viewInContext--" type="checkbox" value="<%= viewInContext %>" />
+
+		<aui:input helpMessage="display-main-query-help" name="preferences--displayMainQuery--" type="checkbox" value="<%= displayMainQuery %>" />
+
+		<aui:input helpMessage="display-open-search-results-help" name="preferences--displayOpenSearchResults--" type="checkbox" value="<%= displayOpenSearchResults %>" />
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script use="aui-base">
+	Liferay.Util.toggleRadio('<portlet:namespace />advanced', '<portlet:namespace />advancedConfiguration', '<portlet:namespace />basicConfiguration');
+	Liferay.Util.toggleRadio('<portlet:namespace />basic', '<portlet:namespace />basicConfiguration', '<portlet:namespace />advancedConfiguration');
+	Liferay.Util.toggleBoxes('<portlet:namespace />collatedSpellCheckResultEnabledCheckbox', '<portlet:namespace />collatedSpellCheckResultOptionsContainer');
+	Liferay.Util.toggleBoxes('<portlet:namespace />queryIndexingEnabledCheckbox', '<portlet:namespace />queryIndexingOptionsContainer');
+	Liferay.Util.toggleBoxes('<portlet:namespace />querySuggestionsEnabledCheckbox', '<portlet:namespace />querySuggestionsOptionsContainer');
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/css/.sass-cache/main.css
new file mode 100644
index 0000000..b38f090
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/css/.sass-cache/main.css
@@ -0,0 +1,139 @@
+.portlet-search .entry-tags {
+  margin: 3px 0 0; }
+.portlet-search .menu-column .search-layout-content {
+  padding-left: 24em; }
+  .portlet-search .menu-column .search-layout-content .menu {
+    margin-left: -24em;
+    position: relative;
+    width: 24em; }
+  .portlet-search .menu-column .search-layout-content .result {
+    display: inline-block;
+    float: none;
+    width: 100%; }
+.portlet-search .more-results {
+  font-size: 1.1em;
+  padding: 5px 0; }
+.portlet-search .no-results {
+  font-size: 1.3em;
+  margin: 10px 0 0; }
+.portlet-search .open-search-panel {
+  margin-top: 1em; }
+.portlet-search .search-layout .lfr-panel-container {
+  border-width: 0; }
+.portlet-search .search-layout .search-facet {
+  border-top: 1px solid #CCC;
+  padding: 8px 0; }
+  .portlet-search .search-layout .search-facet .field-wrapper-content {
+    margin: 0 0 1em; }
+  .portlet-search .search-layout .search-facet .facet-value.active .frequency {
+    display: none; }
+  .portlet-search .search-layout .search-facet .date .calendar {
+    margin: 0 auto; }
+  .portlet-search .search-layout .search-facet .keywords {
+    margin-top: 6px;
+    width: 18em; }
+  .portlet-search .search-layout .search-facet .modified-custom-range {
+    padding-left: 10px; }
+    .portlet-search .search-layout .search-facet .modified-custom-range .field-content {
+      margin: 5px 0; }
+    .portlet-search .search-layout .search-facet .modified-custom-range .button {
+      margin-right: 5px; }
+  .portlet-search .search-layout .search-facet ul {
+    margin: 0; }
+  .portlet-search .search-layout .search-facet.search-asset-tags .lfr-panel-content ul {
+    padding: 0; }
+  .portlet-search .search-layout .search-facet.search-asset-vocabulary li {
+    list-style-type: none;
+    margin: 0;
+    padding: 0; }
+  .portlet-search .search-layout .search-facet.search-asset-vocabulary ul {
+    list-style-type: none;
+    margin: 0;
+    padding: 0; }
+.portlet-search .search-layout .result .asset-entry .asset-entry-content {
+  margin-top: 0.8em; }
+.portlet-search .search-layout .result .asset-entry .asset-entry-categories, .portlet-search .search-layout .result .asset-entry .asset-entry-tags {
+  float: left;
+  margin-bottom: 0.5em;
+  padding-right: 6px; }
+.portlet-search .search-layout .result .asset-entry .asset-entry-fields {
+  table-layout: fixed;
+  width: 100%; }
+  .portlet-search .search-layout .result .asset-entry .asset-entry-fields th {
+    background-color: #CCC;
+    padding: 2px; }
+    .portlet-search .search-layout .result .asset-entry .asset-entry-fields th.key {
+      width: 240px; }
+  .portlet-search .search-layout .result .asset-entry .asset-entry-fields td {
+    border-bottom: 1px solid #CCC;
+    padding: 2px; }
+    .portlet-search .search-layout .result .asset-entry .asset-entry-fields td.value .container {
+      max-height: 100px;
+      overflow: auto; }
+      .portlet-search .search-layout .result .asset-entry .asset-entry-fields td.value .container code {
+        word-wrap: break-word; }
+.portlet-search .search-layout .result .asset-entry .asset-entry-summary {
+  display: block;
+  margin-bottom: 1em; }
+.portlet-search .search-layout .result .asset-entry .asset-entry-title {
+  color: #5B677D;
+  display: block;
+  font-size: 1.5em;
+  font-weight: bold; }
+  .portlet-search .search-layout .result .asset-entry .asset-entry-title a {
+    text-decoration: none; }
+    .portlet-search .search-layout .result .asset-entry .asset-entry-title a img {
+      position: relative;
+      top: 0.1em; }
+.portlet-search .search-layout .result .asset-entry .asset-entry-type {
+  float: right;
+  font-size: 0.8em;
+  color: #777; }
+.portlet-search .search-layout .result .asset-entry .toggle-details {
+  cursor: pointer;
+  float: left;
+  font-family: monospace;
+  font-weight: bold; }
+.portlet-search .search-layout .result .full-query {
+  border: 1px solid #CCC;
+  table-layout: fixed;
+  width: 100%; }
+  .portlet-search .search-layout .result .full-query .container {
+    max-height: 100px;
+    overflow: auto; }
+    .portlet-search .search-layout .result .full-query .container code {
+      word-wrap: break-word; }
+.portlet-search .search-msg {
+  border-bottom: 1px solid #DEDEDE;
+  color: #777;
+  margin: 15px 0;
+  padding: 2px 5px;
+  text-align: right; }
+.portlet-search .search-paginator-container {
+  padding: 5px 0; }
+.portlet-search .search-suggested-spelling {
+  margin: 0; }
+  .portlet-search .search-suggested-spelling .suggested-keywords a {
+    font-size: 1.3em; }
+  .portlet-search .search-suggested-spelling .changed-keyword {
+    font-weight: bold;
+    font-style: italic; }
+.portlet-search .section-title {
+  font-size: 1.3em;
+  font-weight: bold;
+  margin: 10px 0; }
+.portlet-search .taglib-asset-categories-summary .asset-vocabulary {
+  background: url(@theme_image_path@/common/folder.png) no-repeat 0 50%;
+  padding: 2px 5px 2px 20px; }
+
+.portlet-search.portlet-configuration .fieldset-content {
+  padding-top: 0.5em; }
+.portlet-search.portlet-configuration .options-container {
+  margin-left: 1.8em; }
+.portlet-search.portlet-configuration .search-configuration-text {
+  height: 15em;
+  width: 100%; }
+
+.ie .portlet-search .full-query .container, .ie .portlet-search .result td.value .container {
+  height: expression(this.scrollHeight > 100 ? "100px" : "auto"); }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/css/main.css
new file mode 100644
index 0000000..18ae96d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/css/main.css
@@ -0,0 +1,250 @@
+.portlet-search {
+	.entry-tags {
+		margin: 3px 0 0;
+	}
+
+	.menu-column .search-layout-content {
+		padding-left: 24em;
+
+		.menu {
+			margin-left: -24em;
+			position: relative;
+			width: 24em;
+		}
+
+		.result {
+			display: inline-block;
+			float: none;
+			width: 100%;
+		}
+	}
+
+	.more-results {
+		font-size: 1.1em;
+		padding: 5px 0;
+	}
+
+	.no-results {
+		font-size: 1.3em;
+		margin: 10px 0 0;
+	}
+
+	.open-search-panel {
+		margin-top: 1em;
+	}
+
+	.search-layout {
+		.lfr-panel-container {
+			border-width: 0;
+		}
+
+		.search-facet {
+			border-top: 1px solid #CCC;
+			padding: 8px 0;
+
+			.field-wrapper-content {
+				margin: 0 0 1em;
+			}
+
+			.facet-value.active .frequency {
+				display: none;
+			}
+
+			.date .calendar {
+				margin: 0 auto;
+			}
+
+			.keywords {
+				margin-top: 6px;
+				width: 18em;
+			}
+
+			.modified-custom-range {
+				padding-left: 10px;
+
+				.field-content {
+					margin: 5px 0;
+				}
+
+				.button {
+					margin-right: 5px;
+				}
+			}
+
+			ul {
+				margin: 0;
+			}
+
+			&.search-asset-tags .lfr-panel-content ul {
+				padding: 0;
+			}
+
+			&.search-asset-vocabulary {
+				li {
+					list-style-type: none;
+					margin: 0;
+					padding: 0;
+				}
+
+				ul {
+					list-style-type: none;
+					margin: 0;
+					padding: 0;
+				}
+			}
+		}
+
+		.result {
+			.asset-entry {
+				.asset-entry-content {
+					margin-top: 0.8em;
+				}
+
+				.asset-entry-categories, .asset-entry-tags {
+					float: left;
+					margin-bottom: 0.5em;
+					padding-right: 6px;
+				}
+
+				.asset-entry-fields {
+					table-layout: fixed;
+					width: 100%;
+
+					th {
+						background-color: #CCC;
+						padding: 2px;
+
+						&.key {
+							width: 240px;
+						}
+					}
+
+					td {
+						border-bottom: 1px solid #CCC;
+						padding: 2px;
+
+						&.key {
+						}
+
+						&.value {
+							.container {
+								max-height: 100px;
+								overflow: auto;
+
+								code {
+									word-wrap: break-word;
+								}
+							}
+						}
+					}
+				}
+
+				.asset-entry-summary {
+					display: block;
+					margin-bottom: 1em;
+				}
+
+				.asset-entry-title {
+					color: #5B677D;
+					display: block;
+					font-size: 1.5em;
+					font-weight: bold;
+
+					a {
+						text-decoration: none;
+
+						img {
+							position: relative;
+							top: 0.1em;
+						}
+					}
+				}
+
+				.asset-entry-type {
+					float: right;
+					font-size: 0.8em;
+					color: #777;
+				}
+
+				.toggle-details {
+					cursor: pointer;
+					float: left;
+					font-family: monospace;
+					font-weight: bold;
+				}
+			}
+
+			.full-query {
+				border: 1px solid #CCC;
+				table-layout: fixed;
+				width: 100%;
+
+				.container {
+					max-height: 100px;
+					overflow: auto;
+
+					code {
+						word-wrap: break-word;
+					}
+				}
+			}
+		}
+	}
+
+	.search-msg {
+		border-bottom: 1px solid #DEDEDE;
+		color: #777;
+		margin: 15px 0;
+		padding: 2px 5px;
+		text-align: right;
+	}
+
+	.search-paginator-container {
+		padding: 5px 0;
+	}
+
+	.search-suggested-spelling {
+		margin: 0;
+
+		.suggested-keywords a {
+			font-size: 1.3em;
+		}
+
+		.changed-keyword {
+			font-weight: bold;
+			font-style: italic;
+		}
+	}
+
+	.section-title {
+		font-size: 1.3em;
+		font-weight: bold;
+		margin: 10px 0;
+	}
+
+	.taglib-asset-categories-summary .asset-vocabulary {
+		background: url(@theme_image_path@/common/folder.png) no-repeat 0 50%;
+		padding: 2px 5px 2px 20px;
+	}
+}
+
+.portlet-search.portlet-configuration {
+	.fieldset-content {
+		padding-top: 0.5em;
+	}
+
+	.options-container {
+		margin-left: 1.8em;
+	}
+
+	.search-configuration-text {
+		height: 15em;
+		width: 100%;
+	}
+}
+
+.ie .portlet-search {
+	.full-query .container, .result td.value .container {
+		height: expression(this.scrollHeight > 100 ? "100px" : "auto");
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/asset_categories.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/asset_categories.jsp
new file mode 100644
index 0000000..fd53cba
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/asset_categories.jsp
@@ -0,0 +1,126 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/search/facets/init.jsp" %>
+
+<%
+if (termCollectors.isEmpty()) {
+	return;
+}
+
+String displayStyle = dataJSONObject.getString("displayStyle", "cloud");
+int frequencyThreshold = dataJSONObject.getInt("frequencyThreshold");
+int maxTerms = dataJSONObject.getInt("maxTerms", 10);
+boolean showAssetCount = dataJSONObject.getBoolean("showAssetCount", true);
+%>
+
+<div class="asset-tags <%= cssClass %>" data-facetFieldName="<%= facet.getFieldId() %>" id="<%= randomNamespace %>facet">
+	<aui:input name="<%= facet.getFieldId() %>" type="hidden" value="<%= fieldParam %>" />
+
+	<ul class="<%= (showAssetCount && displayStyle.equals("cloud")) ? "tag-cloud" : "tag-list" %> nav nav-pills nav-stacked">
+		<li class="facet-value default <%= Validator.isNull(fieldParam) ? "active" : StringPool.BLANK %>">
+			<a data-value="" href="javascript:;"><aui:icon image="tags" /> <liferay-ui:message key="any" /> <liferay-ui:message key="<%= facetConfiguration.getLabel() %>" /></a>
+		</li>
+
+		<%
+		int maxCount = 1;
+		int minCount = 1;
+
+		if (showAssetCount && displayStyle.equals("cloud")) {
+
+			// The cloud style may not list tags in the order of frequency,
+			// so keep looking through the results until we reach the maximum
+			// number of terms or we run out of terms.
+
+			for (int i = 0, j = 0; i < termCollectors.size(); i++, j++) {
+				if (j >= maxTerms) {
+					break;
+				}
+
+				TermCollector termCollector = termCollectors.get(i);
+
+				int frequency = termCollector.getFrequency();
+
+				if (frequencyThreshold > frequency) {
+					j--;
+
+					continue;
+				}
+
+				maxCount = Math.max(maxCount, frequency);
+				minCount = Math.min(minCount, frequency);
+			}
+		}
+
+		double multiplier = 1;
+
+		if (maxCount != minCount) {
+			multiplier = (double)5 / (maxCount - minCount);
+		}
+
+		for (int i = 0, j = 0; i < termCollectors.size(); i++, j++) {
+			if (j >= maxTerms) {
+				break;
+			}
+
+			TermCollector termCollector = termCollectors.get(i);
+
+			long assetCategoryId = GetterUtil.getLong(termCollector.getTerm());
+
+			if (assetCategoryId == 0) {
+				continue;
+			}
+
+			AssetCategory curAssetCategory = AssetCategoryLocalServiceUtil.getAssetCategory(assetCategoryId);
+		%>
+
+				<c:if test="<%= fieldParam.equals(termCollector.getTerm()) %>">
+					<aui:script use="liferay-token-list">
+						Liferay.Search.tokenList.add(
+							{
+								clearFields: '<%= renderResponse.getNamespace() + facet.getFieldId() %>',
+								text: '<%= HtmlUtil.escapeJS(curAssetCategory.getTitle(locale)) %>'
+							}
+						);
+					</aui:script>
+				</c:if>
+
+		<%
+			int popularity = (int)(1 + ((maxCount - (maxCount - (termCollector.getFrequency() - minCount))) * multiplier));
+
+			if (frequencyThreshold > termCollector.getFrequency()) {
+				j--;
+
+				continue;
+			}
+		%>
+
+			<li class="facet-value tag-popularity-<%= popularity %> <%= fieldParam.equals(termCollector.getTerm()) ? "active" : StringPool.BLANK %>">
+				<a data-value="<%= HtmlUtil.escapeAttribute(String.valueOf(assetCategoryId)) %>" href="javascript:;">
+					<%= HtmlUtil.escape(curAssetCategory.getTitle(locale)) %>
+
+					<c:if test="<%= showAssetCount %>">
+						<span class="badge badge-info frequency"><%= termCollector.getFrequency() %></span>
+					</c:if>
+				</a>
+			</li>
+
+		<%
+		}
+		%>
+
+	</ul>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/asset_entries.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/asset_entries.jsp
new file mode 100644
index 0000000..11a9709
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/asset_entries.jsp
@@ -0,0 +1,107 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/search/facets/init.jsp" %>
+
+<%
+int frequencyThreshold = dataJSONObject.getInt("frequencyThreshold");
+boolean showAssetCount = dataJSONObject.getBoolean("showAssetCount", true);
+
+String[] values = new String[0];
+
+if (dataJSONObject.has("values")) {
+	JSONArray valuesJSONArray = dataJSONObject.getJSONArray("values");
+
+	values = new String[valuesJSONArray.length()];
+
+	for (int i = 0; i < valuesJSONArray.length(); i++) {
+		values[i] = valuesJSONArray.getString(i);
+	}
+}
+%>
+
+<div class="<%= cssClass %>" data-facetFieldName="<%= facet.getFieldId() %>" id="<%= randomNamespace %>facet">
+	<aui:input name="<%= facet.getFieldId() %>" type="hidden" value="<%= fieldParam %>" />
+
+	<ul class="asset-type nav nav-pills nav-stacked">
+		<li class="facet-value default <%= Validator.isNull(fieldParam) ? "active" : StringPool.BLANK %>">
+			<a data-value="" href="javascript:;"><aui:icon image="search" /> <liferay-ui:message key="everything" /></a>
+		</li>
+
+		<%
+		List<String> assetTypes = new SortedArrayList<String>(new ModelResourceComparator(locale));
+
+		for (String className : values) {
+			if (assetTypes.contains(className)) {
+				continue;
+			}
+
+			if (!ArrayUtil.contains(values, className)) {
+				continue;
+			}
+
+			assetTypes.add(className);
+		}
+
+		for (String assetType : assetTypes) {
+			TermCollector termCollector = facetCollector.getTermCollector(assetType);
+		%>
+
+			<c:if test="<%= fieldParam.equals(termCollector.getTerm()) %>">
+				<aui:script use="liferay-token-list">
+					Liferay.Search.tokenList.add(
+						{
+							clearFields: '<%= renderResponse.getNamespace() + facet.getFieldId() %>',
+							text: '<%= HtmlUtil.escapeJS(ResourceActionsUtil.getModelResource(locale, assetType)) %>'
+						}
+					);
+				</aui:script>
+			</c:if>
+
+		<%
+			int frequency = 0;
+
+			if (termCollector != null) {
+				frequency = termCollector.getFrequency();
+			}
+
+			if (frequencyThreshold > frequency) {
+				continue;
+			}
+
+			AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(assetType);
+		%>
+
+			<li class="facet-value <%= fieldParam.equals(termCollector.getTerm()) ? "active" : StringPool.BLANK %>">
+				<a data-value="<%= HtmlUtil.escapeAttribute(assetType) %>" href="javascript:;">
+					<c:if test="<%= assetRendererFactory != null %>">
+						<img alt="" src="<%= assetRendererFactory.getIconPath(renderRequest) %>" />
+					</c:if>
+
+					<%= assetRendererFactory.getTypeName(locale, false) %>
+
+					<c:if test="<%= showAssetCount %>">
+						<span class="badge badge-info frequency"><%= frequency %></span>
+					</c:if>
+				</a>
+			</li>
+
+		<%
+		}
+		%>
+
+	</ul>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/asset_tags.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/asset_tags.jsp
new file mode 100644
index 0000000..4c872c9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/asset_tags.jsp
@@ -0,0 +1,118 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/search/facets/init.jsp" %>
+
+<%
+if (termCollectors.isEmpty()) {
+	return;
+}
+
+String displayStyle = dataJSONObject.getString("displayStyle", "cloud");
+int frequencyThreshold = dataJSONObject.getInt("frequencyThreshold");
+int maxTerms = dataJSONObject.getInt("maxTerms", 10);
+boolean showAssetCount = dataJSONObject.getBoolean("showAssetCount", true);
+%>
+
+<div class="asset-tags <%= cssClass %>" data-facetFieldName="<%= facet.getFieldId() %>" id="<%= randomNamespace %>facet">
+	<aui:input name="<%= facet.getFieldId() %>" type="hidden" value="<%= fieldParam %>" />
+
+	<ul class="<%= (showAssetCount && displayStyle.equals("cloud")) ? "tag-cloud" : "tag-list" %> nav nav-pills nav-stacked">
+		<li class="facet-value default <%= Validator.isNull(fieldParam) ? "active" : StringPool.BLANK %>">
+			<a data-value="" href="javascript:;"><aui:icon image="tag" /> <liferay-ui:message key="any" /> <liferay-ui:message key="<%= facetConfiguration.getLabel() %>" /></a>
+		</li>
+
+		<%
+		int maxCount = 1;
+		int minCount = 1;
+
+		if (showAssetCount && displayStyle.equals("cloud")) {
+
+			// The cloud style may not list tags in the order of frequency,
+			// so keep looking through the results until we reach the maximum
+			// number of terms or we run out of terms.
+
+			for (int i = 0, j = 0; i < termCollectors.size(); i++, j++) {
+				if (j >= maxTerms) {
+					break;
+				}
+
+				TermCollector termCollector = termCollectors.get(i);
+
+				int frequency = termCollector.getFrequency();
+
+				if (frequencyThreshold > frequency) {
+					j--;
+
+					continue;
+				}
+
+				maxCount = Math.max(maxCount, frequency);
+				minCount = Math.min(minCount, frequency);
+			}
+		}
+
+		double multiplier = 1;
+
+		if (maxCount != minCount) {
+			multiplier = (double)5 / (maxCount - minCount);
+		}
+
+		for (int i = 0, j = 0; i < termCollectors.size(); i++, j++) {
+			if (j >= maxTerms) {
+				break;
+			}
+
+			TermCollector termCollector = termCollectors.get(i);
+		%>
+
+				<c:if test="<%= fieldParam.equals(termCollector.getTerm()) %>">
+					<aui:script use="liferay-token-list">
+						Liferay.Search.tokenList.add(
+							{
+								clearFields: '<%= renderResponse.getNamespace() + facet.getFieldId() %>',
+								text: '<%= HtmlUtil.escapeJS(termCollector.getTerm()) %>'
+							}
+						);
+					</aui:script>
+				</c:if>
+
+		<%
+			int popularity = (int)(1 + ((maxCount - (maxCount - (termCollector.getFrequency() - minCount))) * multiplier));
+
+			if (frequencyThreshold > termCollector.getFrequency()) {
+				j--;
+
+				continue;
+			}
+		%>
+
+			<li class="facet-value tag-popularity-<%= popularity %> <%= fieldParam.equals(termCollector.getTerm()) ? "active" : StringPool.BLANK %>">
+				<a data-value="<%= HtmlUtil.escapeAttribute(termCollector.getTerm()) %>" href="javascript:;">
+					<%= HtmlUtil.escape(termCollector.getTerm()) %>
+
+					<c:if test="<%= showAssetCount %>">
+						<span class="badge badge-info frequency"><%= termCollector.getFrequency() %></span>
+					</c:if>
+				</a>
+			</li>
+
+		<%
+		}
+		%>
+
+	</ul>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/asset_vocabulary.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/asset_vocabulary.jsp
new file mode 100644
index 0000000..b54d550
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/asset_vocabulary.jsp
@@ -0,0 +1,123 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/search/facets/init.jsp" %>
+
+<%
+String[] assetCategoryIdsOrNames = StringUtil.split(fieldParam);
+
+long assetVocabularyId = dataJSONObject.getLong("assetVocabularyId");
+boolean matchByName = dataJSONObject.getBoolean("matchByName");
+
+List<AssetVocabulary> assetVocabularies = new ArrayList<AssetVocabulary>();
+
+if (assetVocabularyId > 0) {
+	AssetVocabulary assetVocabulary = AssetVocabularyServiceUtil.getVocabulary(assetVocabularyId);
+
+	assetVocabularies.add(assetVocabulary);
+}
+else {
+	assetVocabularies = AssetVocabularyServiceUtil.getGroupsVocabularies(new long[] {themeDisplay.getScopeGroupId(), themeDisplay.getSiteGroupId()});
+}
+
+if (assetVocabularies.isEmpty()) {
+	return;
+}
+%>
+
+<div class="asset-vocabulary <%= cssClass %>" data-facetFieldName="<%= facet.getFieldId() %>" id="<%= randomNamespace %>facet">
+	<aui:input name="<%= facet.getFieldId() %>" type="hidden" value="<%= StringUtil.merge(assetCategoryIdsOrNames) %>" />
+
+	<%
+	for (AssetVocabulary assetVocabulary : assetVocabularies) {
+		List<AssetCategory> assetCategories = AssetCategoryServiceUtil.getVocabularyRootCategories(assetVocabulary.getVocabularyId(), QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
+
+		if (assetCategories.isEmpty()) {
+			continue;
+		}
+	%>
+
+		<div class="search-asset-vocabulary-list-container">
+			<ul class="nav nav-pills nav-stacked search-asset-vocabulary-list">
+
+				<%
+				StringBundler sb = new StringBundler();
+
+				String clearFields = renderResponse.getNamespace() + facet.getFieldId();
+
+				_buildCategoriesNavigation(assetCategoryIdsOrNames, matchByName, facetCollector, assetCategories, clearFields, pageContext, sb);
+				%>
+
+				<%= sb.toString() %>
+
+			</ul>
+		</div>
+
+	<%
+	}
+	%>
+
+</div>
+
+<%!
+private void _buildCategoriesNavigation(String[] assetCategoryIdsOrNames, boolean matchByName, FacetCollector facetCollector, List<AssetCategory> assetCategories, String clearFields, PageContext pageContext, StringBundler sb) throws Exception {
+	for (AssetCategory assetCategory : assetCategories) {
+		String term = String.valueOf(assetCategory.getCategoryId());
+
+		String assetCategoryName = HtmlUtil.escape(assetCategory.getName());
+
+		if (matchByName) {
+			term = assetCategoryName;
+		}
+
+		int frequency = 0;
+
+		TermCollector termCollector = facetCollector.getTermCollector(term);
+
+		if (termCollector != null) {
+			frequency = termCollector.getFrequency();
+		}
+
+		sb.append("<li class=\"facet-value");
+
+		if (ArrayUtil.contains(assetCategoryIdsOrNames, term)) {
+			sb.append(" active");
+
+			ScriptTag.doTag(null, "liferay-token-list", "Liferay.Search.tokenList.add({clearFields: '" + clearFields + "', text: '" + HtmlUtil.escapeJS(assetCategoryName) + "'});", null, pageContext);
+		}
+
+		sb.append("\"><a href=\"#\" data-value=\"");
+		sb.append(HtmlUtil.escapeAttribute(term));
+		sb.append("\">");
+		sb.append(assetCategoryName);
+		sb.append("</a> <span class=\"frequency\">(");
+		sb.append(frequency);
+		sb.append(")</span>");
+
+		List<AssetCategory> childAssetCategories = AssetCategoryServiceUtil.getChildCategories(assetCategory.getCategoryId(), QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
+
+		if (!childAssetCategories.isEmpty()) {
+			sb.append("<ul>");
+
+			_buildCategoriesNavigation(assetCategoryIdsOrNames, matchByName, facetCollector, childAssetCategories, clearFields, pageContext, sb);
+
+			sb.append("</ul>");
+		}
+
+		sb.append("</li>");
+	}
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/calendar.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/calendar.jsp
new file mode 100644
index 0000000..13d1473
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/calendar.jsp
@@ -0,0 +1,192 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/search/facets/init.jsp" %>
+
+<%
+String fieldParamFrom = ParamUtil.getString(request, facet.getFieldId() + "from");
+String fieldParamTo = ParamUtil.getString(request, facet.getFieldId() + "to");
+
+String dateString = StringPool.BLANK;
+
+Calendar cal = Calendar.getInstance();
+
+if (Validator.isNotNull(fieldParam)) {
+	DateFormat dateFormat = DateFormatFactoryUtil.getSimpleDateFormat("yyyyMMddHHmmss", timeZone);
+
+	String[] range = RangeParserUtil.parserRange(fieldParam);
+
+	Date date = dateFormat.parse(range[0]);
+
+	cal.setTime(date);
+
+	dateString = "new Date(" + cal.get(Calendar.YEAR) + "," + cal.get(Calendar.MONTH) + "," + (cal.get(Calendar.DAY_OF_MONTH) + 1) + ")";
+
+	if (range[1].equals(StringPool.STAR)) {
+		date = new Date();
+	}
+	else {
+		date = dateFormat.parse(range[1]);
+	}
+
+	Calendar endCal = Calendar.getInstance();
+
+	endCal.setTime(date);
+
+	if ((cal.get(Calendar.YEAR) == endCal.get(Calendar.YEAR)) &&
+		(cal.get(Calendar.MONTH) == endCal.get(Calendar.MONTH)) &&
+		((cal.get(Calendar.DAY_OF_MONTH) + 1) == endCal.get(Calendar.DAY_OF_MONTH))) {
+
+		dateString += ",new Date(" + cal.get(Calendar.YEAR) + "," + cal.get(Calendar.MONTH) + "," + (cal.get(Calendar.DAY_OF_MONTH) + 1) + ",23,59,0,0)";
+	}
+	else {
+		dateString += ",new Date(" + endCal.get(Calendar.YEAR) + "," + endCal.get(Calendar.MONTH) + "," + endCal.get(Calendar.DAY_OF_MONTH) + ",23,59,0,0)";
+	}
+}
+
+Calendar localeCal = CalendarFactoryUtil.getCalendar(timeZone, locale);
+
+int firstDayOfWeek = localeCal.getFirstDayOfWeek() - 1;
+%>
+
+<c:if test="<%= Validator.isNotNull(fieldParamFrom) && Validator.isNotNull(fieldParamTo) %>">
+	<aui:script use="liferay-token-list">
+		Liferay.Search.tokenList.add(
+			{
+				clearFields: '<%= renderResponse.getNamespace() + facet.getFieldId() %>',
+				html: '<%= UnicodeLanguageUtil.format(pageContext, "from-x-to-x", new Object[] {"<strong>" + HtmlUtil.escape(fieldParamFrom) + "</strong>", "<strong>" + HtmlUtil.escape(fieldParamTo) + "</strong>"}) %>'
+			}
+		);
+	</aui:script>
+</c:if>
+
+<div class="<%= cssClass %>" data-facetFieldName="<%= facet.getFieldId() %>" id="<%= randomNamespace %>facet">
+	<aui:input name="<%= facet.getFieldId() %>" type="hidden" value="<%= fieldParam %>" />
+	<aui:input name='<%= facet.getFieldId() + "from" %>' type="hidden" />
+	<aui:input name='<%= facet.getFieldId() + "to" %>' type="hidden" />
+
+	<div class="date" id="<portlet:namespace /><%= facet.getFieldId() %>PlaceHolder"></div>
+</div>
+
+<aui:script use="aui-calendar-deprecated">
+	var now = new Date();
+
+	var checkDateRange = function(event) {
+		var dates = this.get('dates');
+
+		var minDate = null;
+		var maxDate = null;
+
+		if (dates.length >= 2) {
+			var firstSelected = dates[0];
+			var lastSelected = dates[dates.length-1];
+
+			if (A.DataType.DateMath.before(dates[0], dates[1])) {
+				minDate = firstSelected;
+				maxDate = lastSelected;
+			}
+			else {
+				minDate = lastSelected;
+				maxDate = firstSelected;
+			}
+		}
+
+		this.set('minDate', minDate);
+		this.set('maxDate', maxDate);
+
+		this._syncMonthDays();
+	};
+
+	var dateSelection = new A.Calendar(
+		{
+			after: {
+				select: function(event) {
+					var instance = this;
+
+					var format = instance.get('dateFormat');
+
+					var dates = instance.get('dates');
+
+					if (dates.length == 0) {
+						document.<portlet:namespace />fm.<portlet:namespace /><%= facet.getFieldId() %>.value = null;
+
+						document.<portlet:namespace />fm.<portlet:namespace /><%= facet.getFieldId() %>from.value = null;
+						document.<portlet:namespace />fm.<portlet:namespace /><%= facet.getFieldId() %>to.value = null;
+					}
+					else {
+						var firstSelected = dates[0];
+						var lastSelected = dates[0];
+
+						if (dates.length > 1) {
+							firstSelected = dates[0];
+							lastSelected = dates[dates.length-1];
+
+							if (firstSelected > lastSelected) {
+								firstSelected = dates[dates.length-1];
+								lastSelected = dates[0];
+							}
+						}
+
+						var fromDate = A.DataType.Date.format(
+							firstSelected,
+							{
+								format: format
+							}
+						);
+
+						var toDate = A.DataType.Date.format(
+							lastSelected,
+							{
+								format: '%Y%m%d235900'
+							}
+						);
+
+						document.<portlet:namespace />fm.<portlet:namespace /><%= facet.getFieldId() %>.value = '[' + fromDate + ' TO ' + toDate + ']';
+
+						var displayFormat = {
+							format: '%Y-%m-%d'
+						};
+
+						document.<portlet:namespace />fm.<portlet:namespace /><%= facet.getFieldId() %>from.value = A.DataType.Date.format(firstSelected, displayFormat);
+						document.<portlet:namespace />fm.<portlet:namespace /><%= facet.getFieldId() %>to.value = A.DataType.Date.format(lastSelected, displayFormat);
+					}
+
+					checkDateRange.call(instance, event);
+
+					if (dates.length > 1) {
+						submitForm(document.<portlet:namespace />fm);
+					}
+				}
+			},
+			allowNone: true,
+			dateFormat: '%Y%m%d000000',
+			dates: [<%= dateString %>],
+			firstDayOfWeek: <%= firstDayOfWeek %>,
+			locale: '<%= locale %>',
+			maxDate: now,
+			minDate: A.DataType.DateMath.subtract(now, A.DataType.DateMath.YEAR, 2),
+			selectMultipleDates: true,
+			setValue: true,
+			showToday: true,
+			strings: {
+				next: '<liferay-ui:message key="next" />',
+				none: '<liferay-ui:message key="none" />',
+				previous: '<liferay-ui:message key="previous" />',
+				today: '<liferay-ui:message key="today" />'
+			}
+		}
+	).render('#<portlet:namespace /><%= facet.getFieldId() %>PlaceHolder');
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/folders.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/folders.jsp
new file mode 100644
index 0000000..ba06946
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/folders.jsp
@@ -0,0 +1,100 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/search/facets/init.jsp" %>
+
+<%
+if (termCollectors.isEmpty()) {
+	return;
+}
+
+int frequencyThreshold = dataJSONObject.getInt("frequencyThreshold");
+int maxTerms = dataJSONObject.getInt("maxTerms", 10);
+boolean showAssetCount = dataJSONObject.getBoolean("showAssetCount", true);
+
+Indexer indexer = FolderSearcher.getInstance();
+
+SearchContext searchContext = SearchContextFactory.getInstance(request);
+%>
+
+<div class="<%= cssClass %>" data-facetFieldName="<%= facet.getFieldId() %>" id="<%= randomNamespace %>facet">
+	<aui:input name="<%= facet.getFieldId() %>" type="hidden" value="<%= fieldParam %>" />
+
+	<ul class="folders nav nav-pills nav-stacked">
+		<li class="facet-value default <%= Validator.isNull(fieldParam) ? "active" : StringPool.BLANK %>">
+			<a data-value="" href="javascript:;"><aui:icon image="folder-open" /> <liferay-ui:message key="any" /> <liferay-ui:message key="<%= facetConfiguration.getLabel() %>" /></a>
+		</li>
+
+		<%
+		long folderId = GetterUtil.getLong(fieldParam);
+
+		for (int i = 0; i < termCollectors.size(); i++) {
+			TermCollector termCollector = termCollectors.get(i);
+
+			long curFolderId = GetterUtil.getLong(termCollector.getTerm());
+
+			if (curFolderId == 0) {
+				continue;
+			}
+
+			searchContext.setFolderIds(new long[] {curFolderId});
+			searchContext.setKeywords(StringPool.BLANK);
+
+			Hits results = indexer.search(searchContext);
+
+			if (results.getLength() == 0) {
+				continue;
+			}
+
+			Document document = results.doc(0);
+
+			Field title = document.getField(Field.TITLE);
+		%>
+
+			<c:if test="<%= folderId == curFolderId %>">
+				<aui:script use="liferay-token-list">
+					Liferay.Search.tokenList.add(
+						{
+							clearFields: '<%= renderResponse.getNamespace() + facet.getFieldId() %>',
+							fieldValues: '<%= curFolderId %>',
+							text: '<%= HtmlUtil.escapeJS(title.getValue()) %>'
+						}
+					);
+				</aui:script>
+			</c:if>
+
+			<%
+			if (((maxTerms > 0) && (i >= maxTerms)) || ((frequencyThreshold > 0) && (frequencyThreshold > termCollector.getFrequency()))) {
+				break;
+			}
+			%>
+
+			<li class="facet-value <%= (folderId == curFolderId) ? "active" : StringPool.BLANK %>">
+				<a data-value="<%= curFolderId %>" href="javascript:;">
+					<%= HtmlUtil.escape(title.getValue()) %>
+
+					<c:if test="<%= showAssetCount %>">
+						<span class="badge badge-info frequency"><%= termCollector.getFrequency() %></span>
+					</c:if>
+				</a>
+			</li>
+
+		<%
+		}
+		%>
+
+	</ul>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/init.jsp
new file mode 100644
index 0000000..fa97375
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/init.jsp
@@ -0,0 +1,39 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/search/init.jsp" %>
+
+<%
+String randomNamespace = PortalUtil.generateRandomKey(request, _RANDOM_KEY_INPUT) + StringPool.UNDERLINE;
+
+Facet facet = (Facet)request.getAttribute("search.jsp-facet");
+
+String fieldParam = ParamUtil.getString(request, facet.getFieldId());
+
+FacetConfiguration facetConfiguration = facet.getFacetConfiguration();
+
+JSONObject dataJSONObject = facetConfiguration.getData();
+
+FacetCollector facetCollector = facet.getFacetCollector();
+
+List<TermCollector> termCollectors = facetCollector.getTermCollectors();
+
+String cssClass = "search-facet search-".concat(facetConfiguration.getDisplayStyle());
+%>
+
+<%!
+private static final String _RANDOM_KEY_INPUT = "portlet_search_facets_" + StringUtil.randomString();
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/modified.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/modified.jsp
new file mode 100644
index 0000000..641ea83
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/modified.jsp
@@ -0,0 +1,372 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/search/facets/init.jsp" %>
+
+<%
+String fieldParamSelection = ParamUtil.getString(request, facet.getFieldId() + "selection", "0");
+String fieldParamFrom = ParamUtil.getString(request, facet.getFieldId() + "from");
+String fieldParamTo = ParamUtil.getString(request, facet.getFieldId() + "to");
+
+JSONArray rangesJSONArray = dataJSONObject.getJSONArray("ranges");
+
+String modifiedLabel = StringPool.BLANK;
+
+int index = 0;
+
+if (fieldParamSelection.equals("0")) {
+	modifiedLabel = LanguageUtil.get(pageContext, "any-time");
+}
+
+Calendar localeCal = CalendarFactoryUtil.getCalendar(timeZone, locale);
+
+int firstDayOfWeek = localeCal.getFirstDayOfWeek() - 1;
+%>
+
+<div class="<%= cssClass %>" data-facetFieldName="<%= facet.getFieldId() %>" id="<%= randomNamespace %>facet">
+	<aui:input name="<%= facet.getFieldId() %>" type="hidden" value="<%= fieldParam %>" />
+	<aui:input name='<%= facet.getFieldId() + "selection" %>' type="hidden" value="<%= fieldParamSelection %>" />
+
+	<aui:field-wrapper cssClass='<%= randomNamespace + "calendar calendar_" %>' label="" name="<%= facet.getFieldId() %>">
+		<ul class="modified nav nav-pills nav-stacked">
+			<li class="facet-value default<%= (fieldParamSelection.equals("0") ? " active" : StringPool.BLANK) %>">
+				<aui:a href="javascript:;" onClick='<%= renderResponse.getNamespace() + facet.getFieldId() + "clearFacet(0);" %>'>
+					<aui:icon image="time" /> <liferay-ui:message key="any-time" />
+				</aui:a>
+			</li>
+
+			<%
+			for (int i = 0; i < rangesJSONArray.length(); i++) {
+				JSONObject rangesJSONObject = rangesJSONArray.getJSONObject(i);
+
+				String label = rangesJSONObject.getString("label");
+				String range = rangesJSONObject.getString("range");
+
+				index = (i + 1);
+
+				if (fieldParamSelection.equals(String.valueOf(index))) {
+					modifiedLabel = LanguageUtil.get(pageContext, label);
+				}
+			%>
+
+				<li class="facet-value<%= fieldParamSelection.equals(String.valueOf(index)) ? " active" : StringPool.BLANK %>">
+
+					<%
+					String taglibSetRange = renderResponse.getNamespace() + facet.getFieldId() + "setRange(" + index + ", '" + range + "');";
+					%>
+
+					<aui:a href="javascript:;" onClick="<%= taglibSetRange %>">
+						<liferay-ui:message key="<%= label %>" />
+
+						<%
+						TermCollector termCollector = facetCollector.getTermCollector(range);
+						%>
+
+						<c:if test="<%= termCollector != null %>">
+							<span class="badge badge-info frequency"><%= termCollector.getFrequency() %></span>
+						</c:if>
+					</aui:a>
+				</li>
+
+			<%
+			}
+			%>
+
+			<li class="facet-value<%= fieldParamSelection.equals(String.valueOf(index + 1)) ? " active" : StringPool.BLANK %>">
+
+				<%
+				TermCollector termCollector = null;
+
+				if (fieldParamSelection.equals(String.valueOf(index + 1))) {
+					modifiedLabel = LanguageUtil.get(pageContext, "custom-range");
+
+					termCollector = facetCollector.getTermCollector(fieldParam);
+				}
+				%>
+
+				<aui:a cssClass='<%= randomNamespace + "custom-range-toggle" %>' href="javascript:;">
+					<liferay-ui:message key="custom-range" />&hellip;
+
+					<c:if test="<%= termCollector != null %>">
+						<span class="badge badge-info frequency"><%= termCollector.getFrequency() %></span>
+					</c:if>
+				</aui:a>
+			</li>
+
+			<div class="<%= !fieldParamSelection.equals(String.valueOf(index + 1)) ? "hide" : StringPool.BLANK %> modified-custom-range" id="<%= randomNamespace %>custom-range">
+				<div id="<%= randomNamespace %>custom-range-from">
+					<aui:input label="from" name='<%= facet.getFieldId() + "from" %>' size="14" />
+				</div>
+
+				<div id="<%= randomNamespace %>custom-range-to">
+					<aui:input label="to" name='<%= facet.getFieldId() + "to" %>' size="14" />
+				</div>
+
+				<aui:button disabled="<%= Validator.isNull(fieldParamFrom) || Validator.isNull(fieldParamTo) %>" name="searchCustomRangeButton" onClick='<%= renderResponse.getNamespace() + facet.getFieldId() + "searchCustomRange(" + (index + 1) + ");" %>' value="search" />
+			</div>
+		</ul>
+	</aui:field-wrapper>
+</div>
+
+<c:if test='<%= !fieldParamSelection.equals("0") %>'>
+
+	<%
+	String fieldName = renderResponse.getNamespace() + facet.getFieldId();
+	%>
+
+	<aui:script use="liferay-token-list">
+
+		<%
+		String tokenLabel = modifiedLabel;
+
+		if (fieldParamSelection.equals(String.valueOf(index + 1))) {
+			String fromDateLabel = HtmlUtil.escape(fieldParamFrom);
+			String toDateLabel = HtmlUtil.escape(fieldParamTo);
+
+			tokenLabel = UnicodeLanguageUtil.format(pageContext, "from-x-to-x", new Object[] {"<strong>" + fromDateLabel + "</strong>", "<strong>" + toDateLabel + "</strong>"});
+		}
+		%>
+
+		Liferay.Search.tokenList.add(
+			{
+				clearFields: '<%= fieldName %>',
+				fieldValues: '<%= fieldName + "selection|0" %>',
+				html: '<%= tokenLabel %>'
+			}
+		);
+	</aui:script>
+</c:if>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace /><%= facet.getFieldId() %>clearFacet',
+		function(selection) {
+			document.<portlet:namespace />fm['<portlet:namespace /><%= facet.getFieldId() %>'].value = '';
+			document.<portlet:namespace />fm['<portlet:namespace /><%= facet.getFieldId() %>selection'].value = selection;
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['aui-base']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace /><%= facet.getFieldId() %>searchCustomRange',
+		function(selection) {
+			var fromDate = document.<portlet:namespace />fm['<portlet:namespace /><%= facet.getFieldId() %>from'].value;
+			var toDate = document.<portlet:namespace />fm['<portlet:namespace /><%= facet.getFieldId() %>to'].value;
+
+			if (fromDate && toDate) {
+				if (fromDate > toDate) {
+					fromDate = document.<portlet:namespace />fm['<portlet:namespace /><%= facet.getFieldId() %>to'].value;
+					toDate = document.<portlet:namespace />fm['<portlet:namespace /><%= facet.getFieldId() %>from'].value;
+
+					document.<portlet:namespace />fm['<portlet:namespace /><%= facet.getFieldId() %>to'].value = toDate;
+					document.<portlet:namespace />fm['<portlet:namespace /><%= facet.getFieldId() %>from'].value = fromDate;
+				}
+
+				var range = '[' + fromDate.replace(/-/g, '') + '000000 TO ' + toDate.replace(/-/g, '') + '235959]';
+
+				document.<portlet:namespace />fm['<portlet:namespace /><%= facet.getFieldId() %>'].value = range;
+				document.<portlet:namespace />fm['<portlet:namespace /><%= facet.getFieldId() %>selection'].value = selection;
+
+				submitForm(document.<portlet:namespace />fm);
+			}
+		},
+		['aui-base']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace /><%= facet.getFieldId() %>setRange',
+		function(selection, range) {
+			document.<portlet:namespace />fm['<portlet:namespace /><%= facet.getFieldId() %>'].value = range;
+			document.<portlet:namespace />fm['<portlet:namespace /><%= facet.getFieldId() %>selection'].value = selection;
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['aui-base']
+	);
+</aui:script>
+
+<aui:script use="aui-datepicker-deprecated,aui-form-validator">
+	var Util = Liferay.Util;
+
+	var DEFAULTS_FORM_VALIDATOR = A.config.FormValidator;
+
+	var REGEX_DATE = /^\d{4}(-)(0[1-9]|1[012])\1(0[1-9]|[12][0-9]|3[01])$/;
+
+	var customRangeFrom = A.one('#<portlet:namespace /><%= facet.getFieldId() %>from');
+	var customRangeTo = A.one('#<portlet:namespace /><%= facet.getFieldId() %>to');
+
+	var dateFrom = null;
+	var dateTo = null;
+
+	var searchButton = A.one('#<portlet:namespace />searchCustomRangeButton');
+
+	A.mix(
+		DEFAULTS_FORM_VALIDATOR.STRINGS,
+		{
+			<portlet:namespace />dateFormat: '<%= UnicodeLanguageUtil.get(pageContext, "search-custom-range-date-format") %>',
+			<portlet:namespace />dateRange: '<%= UnicodeLanguageUtil.get(pageContext, "search-custom-range-invalid-date-range") %>'
+		},
+		true
+	);
+
+	A.mix(
+		DEFAULTS_FORM_VALIDATOR.RULES,
+		{
+			<portlet:namespace />dateFormat: function(val, fieldNode, ruleValue) {
+				var validDate = (REGEX_DATE.test(val) === true);
+
+				if (validDate) {
+					var dateValue = A.Date.parse(val);
+
+					if (fieldNode === customRangeFrom) {
+						dateFrom = dateValue;
+					}
+					else if (fieldNode === customRangeTo) {
+						dateTo = dateValue;
+					}
+				}
+
+				return validDate;
+			},
+
+			<portlet:namespace />dateRange: function(val, fieldNode, ruleValue) {
+				return A.Date.isGreaterOrEqual(dateTo, dateFrom);
+			}
+		},
+		true
+	);
+
+	var customRangeValidator = new A.FormValidator(
+		{
+			boundingBox: document.<portlet:namespace />fm,
+			fieldContainer: 'div',
+			on: {
+				errorField: function(event) {
+					var field = event.validator.field;
+
+					if (field === customRangeFrom) {
+						dateFrom = null;
+					}
+					else if (field === customRangeTo) {
+						dateTo = null;
+					}
+
+					Util.toggleDisabled(searchButton, true);
+				},
+				validField: function(event) {
+					if (A.Date.isValidDate(dateFrom) && A.Date.isValidDate(dateTo)) {
+						Util.toggleDisabled(searchButton, false);
+					}
+				}
+			},
+			rules: {
+				<portlet:namespace /><%= facet.getFieldId() %>from: {
+					<portlet:namespace />dateFormat: true
+				},
+				<portlet:namespace /><%= facet.getFieldId() %>to: {
+					<portlet:namespace />dateFormat: true,
+					<portlet:namespace />dateRange: true
+				}
+			}
+		}
+	);
+
+	var fromDatepicker = new A.DatePicker(
+		{
+			after: {
+				'calendar:dateChange': function(e) {
+					customRangeValidator.validateField(customRangeFrom);
+				}
+			},
+			calendar: {
+				dateFormat: '%Y-%m-%d',
+				firstDayOfWeek: <%= firstDayOfWeek %>,
+				locale: '<%= locale %>',
+
+				<c:if test='<%= fieldParamSelection.equals("6") && Validator.isNotNull(fieldParamFrom) %>'>
+					selectedDates: [
+
+						<%
+						String[] fieldParamFromParts = StringUtil.split(fieldParamFrom, "-");
+						%>
+
+						new Date(<%= fieldParamFromParts[0] %>,<%= GetterUtil.getInteger(fieldParamFromParts[1]) - 1 %>,<%= fieldParamFromParts[2] %>)
+					],
+				</c:if>
+
+				selectionMode: 'single',
+
+				strings: {
+					next: '<liferay-ui:message key="next" />',
+					none: '<liferay-ui:message key="none" />',
+					previous: '<liferay-ui:message key="previous" />',
+					today: '<liferay-ui:message key="today" />'
+				}
+			},
+			trigger: '#<portlet:namespace /><%= facet.getFieldId() %>from'
+		}
+	).render('#<%= randomNamespace %>custom-range-from');
+
+	var toDatepicker = new A.DatePicker(
+		{
+			after: {
+				'calendar:dateChange': function(e) {
+					customRangeValidator.validateField(customRangeTo);
+				}
+			},
+			calendar: {
+				dateFormat: '%Y-%m-%d',
+				firstDayOfWeek: <%= firstDayOfWeek %>,
+				locale: '<%= locale %>',
+
+				<c:if test='<%= fieldParamSelection.equals("6") && Validator.isNotNull(fieldParamTo) %>'>
+					selectedDates: [
+
+						<%
+						String[] fieldParamToParts = StringUtil.split(fieldParamTo, "-");
+						%>
+
+						new Date(<%= fieldParamToParts[0] %>,<%= GetterUtil.getInteger(fieldParamToParts[1]) - 1 %>,<%= fieldParamToParts[2] %>)
+					],
+				</c:if>
+
+				selectionMode: 'single',
+
+				strings: {
+					next: '<liferay-ui:message key="next" />',
+					none: '<liferay-ui:message key="none" />',
+					previous: '<liferay-ui:message key="previous" />',
+					today: '<liferay-ui:message key="today" />'
+				}
+			},
+			trigger: '#<portlet:namespace /><%= facet.getFieldId() %>to'
+		}
+	).render('#<%= randomNamespace %>custom-range-to');
+
+	A.one('.<%= randomNamespace %>custom-range-toggle').on(
+		'click',
+		function(event) {
+			event.halt();
+
+			A.one('#<%= randomNamespace + "custom-range" %>').toggle();
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/range.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/range.jsp
new file mode 100644
index 0000000..0fc882f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/range.jsp
@@ -0,0 +1,82 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/search/facets/init.jsp" %>
+
+<%
+if (termCollectors.isEmpty()) {
+	return;
+}
+
+int frequencyThreshold = dataJSONObject.getInt("frequencyThreshold");
+JSONArray rangesJSONArray = dataJSONObject.getJSONArray("ranges");
+%>
+
+<div class="<%= cssClass %>" data-facetFieldName="<%= facet.getFieldId() %>" id="<%= randomNamespace %>facet">
+	<aui:input name="<%= facet.getFieldId() %>" type="hidden" value="<%= fieldParam %>" />
+
+	<ul class="nav nav-pills nav-stacked range">
+		<li class="facet-value default <%= Validator.isNull(fieldParam) ? "active" : StringPool.BLANK %>">
+			<a data-value="" href="javascript:;"><liferay-ui:message key="any-range" /></a>
+		</li>
+
+		<%
+		for (int i = 0; i < rangesJSONArray.length(); i++) {
+			JSONObject rangeJSONObject = rangesJSONArray.getJSONObject(i);
+
+			String label = rangeJSONObject.getString("label");
+			String range = rangeJSONObject.getString("range");
+
+			TermCollector termCollector = facetCollector.getTermCollector(range);
+		%>
+
+			<c:if test="<%= fieldParam.equals(range) %>">
+				<aui:script use="liferay-token-list">
+					Liferay.Search.tokenList.add(
+						{
+							clearFields: '<%= renderResponse.getNamespace() + facet.getFieldId() %>',
+							text: '<%= UnicodeLanguageUtil.get(pageContext, HtmlUtil.escape(label)) %>'
+						}
+					);
+				</aui:script>
+			</c:if>
+
+		<%
+			int frequency = 0;
+
+			if (termCollector != null) {
+				frequency = termCollector.getFrequency();
+			}
+
+			if (frequencyThreshold > frequency) {
+				continue;
+			}
+		%>
+
+			<li class="facet-value <%= fieldParam.equals(range) ? "active" : StringPool.BLANK %>">
+				<a data-value="<%= HtmlUtil.escapeAttribute(range) %>" href="javascript:;">
+					<liferay-ui:message key="<%= label %>" />
+
+					<span class="badge badge-info frequency"><%= frequency %></span>
+				</a>
+			</li>
+
+		<%
+		}
+		%>
+
+	</ul>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/scopes.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/scopes.jsp
new file mode 100644
index 0000000..7df8895
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/scopes.jsp
@@ -0,0 +1,89 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/search/facets/init.jsp" %>
+
+<%
+if (termCollectors.isEmpty()) {
+%>
+
+	<aui:input name="<%= facet.getFieldName() %>" type="hidden" value="0" />
+
+<%
+	return;
+}
+
+int frequencyThreshold = dataJSONObject.getInt("frequencyThreshold");
+int maxTerms = dataJSONObject.getInt("maxTerms");
+boolean showAssetCount = dataJSONObject.getBoolean("showAssetCount", true);
+%>
+
+<div class="<%= cssClass %>" data-facetFieldName="<%= facet.getFieldId() %>" id="<%= randomNamespace %>facet">
+	<aui:input name="<%= facet.getFieldId() %>" type="hidden" value="<%= fieldParam %>" />
+
+	<ul class="nav nav-pills nav-stacked scopes">
+		<li class="facet-value default <%= fieldParam.equals("0") ? "active" : StringPool.BLANK %>">
+			<a data-value="0" href="javascript:;"><aui:icon image="sitemap" /> <liferay-ui:message key="any" /> <liferay-ui:message key="<%= facetConfiguration.getLabel() %>" /></a>
+		</li>
+
+		<%
+		long groupId = GetterUtil.getInteger(fieldParam);
+
+		for (int i = 0; i < termCollectors.size(); i++) {
+			TermCollector termCollector = termCollectors.get(i);
+
+			long curGroupId = GetterUtil.getInteger(termCollector.getTerm());
+
+			Group group = GroupLocalServiceUtil.fetchGroup(curGroupId);
+
+			if (group == null) {
+				continue;
+			}
+		%>
+
+			<c:if test="<%= groupId == curGroupId %>">
+				<aui:script use="liferay-token-list">
+					Liferay.Search.tokenList.add(
+						{
+							fieldValues: '<%= renderResponse.getNamespace() + facet.getFieldId() + "|0" %>',
+							text: '<%= HtmlUtil.escapeJS(group.getDescriptiveName(locale)) %>'
+						}
+					);
+				</aui:script>
+			</c:if>
+
+			<%
+			if (((maxTerms > 0) && (i >= maxTerms)) || ((frequencyThreshold > 0) && (frequencyThreshold > termCollector.getFrequency()))) {
+				break;
+			}
+			%>
+
+			<li class="facet-value <%= groupId == curGroupId ? "active" : StringPool.BLANK %>">
+				<a data-value="<%= curGroupId %>" href="javascript:;">
+					<%= HtmlUtil.escape(group.getDescriptiveName(locale)) %>
+
+					<c:if test="<%= showAssetCount %>">
+						<span class="badge badge-info frequency"><%= termCollector.getFrequency() %></span>
+					</c:if>
+				</a>
+			</li>
+
+		<%
+		}
+		%>
+
+	</ul>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/simple.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/simple.jsp
new file mode 100644
index 0000000..e8cd1c4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/simple.jsp
@@ -0,0 +1,21 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/search/facets/init.jsp" %>
+
+<div class="<%= cssClass %>" id="<%= randomNamespace %>facet">
+	<aui:input label="" name="<%= facet.getFieldId() %>" type="text" value="<%= fieldParam %>" />
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/term_list.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/term_list.jsp
new file mode 100644
index 0000000..740c638
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/term_list.jsp
@@ -0,0 +1,71 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/search/facets/init.jsp" %>
+
+<%
+if (termCollectors.isEmpty()) {
+	return;
+}
+
+int frequencyThreshold = dataJSONObject.getInt("frequencyThreshold");
+int maxTerms = dataJSONObject.getInt("maxTerms");
+%>
+
+<div class="<%= cssClass %>" data-facetFieldName="<%= facet.getFieldId() %>" id="<%= randomNamespace %>facet">
+	<aui:input name="<%= facet.getFieldId() %>" type="hidden" value="<%= fieldParam %>" />
+
+	<ul class="nav nav-pills nav-stacked term-list">
+		<li class="facet-value default <%= Validator.isNull(fieldParam) ? "active" : StringPool.BLANK %>">
+			<a data-value="" href="javascript:;"><liferay-ui:message key="any-term" /></a>
+		</li>
+
+		<%
+		for (int i = 0; i < termCollectors.size(); i++) {
+			TermCollector termCollector = termCollectors.get(i);
+		%>
+
+			<c:if test="<%= fieldParam.equals(termCollector.getTerm()) %>">
+				<aui:script use="liferay-token-list">
+					Liferay.Search.tokenList.add(
+						{
+							clearFields: '<%= renderResponse.getNamespace() + facet.getFieldId() %>',
+							text: '<%= HtmlUtil.escapeJS(termCollector.getTerm()) %>'
+						}
+					);
+				</aui:script>
+			</c:if>
+
+		<%
+			if (((maxTerms > 0) && (i >= maxTerms)) || ((frequencyThreshold > 0) && (frequencyThreshold > termCollector.getFrequency()))) {
+				break;
+			}
+		%>
+
+			<li class="facet-value <%= fieldParam.equals(termCollector.getTerm()) ? "active" : StringPool.BLANK %>">
+				<a data-value="<%= HtmlUtil.escapeAttribute(termCollector.getTerm()) %>" href="javascript:;">
+					<%= HtmlUtil.escape(termCollector.getTerm()) %>
+
+					<span class="badge badge-info frequency"><%= termCollector.getFrequency() %></span>
+				</a>
+			</li>
+
+		<%
+		}
+		%>
+
+	</ul>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/users.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/users.jsp
new file mode 100644
index 0000000..1d34eaa
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/facets/users.jsp
@@ -0,0 +1,80 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/search/facets/init.jsp" %>
+
+<%
+if (termCollectors.isEmpty()) {
+	return;
+}
+
+int frequencyThreshold = dataJSONObject.getInt("frequencyThreshold");
+int maxTerms = dataJSONObject.getInt("maxTerms", 10);
+boolean showAssetCount = dataJSONObject.getBoolean("showAssetCount", true);
+%>
+
+<div class="<%= cssClass %>" data-facetFieldName="<%= facet.getFieldId() %>" id="<%= randomNamespace %>facet">
+	<aui:input name="<%= facet.getFieldId() %>" type="hidden" value="<%= fieldParam %>" />
+
+	<ul class="nav nav-pills nav-stacked users">
+		<li class="facet-value default <%= Validator.isNull(fieldParam) ? "active" : StringPool.BLANK %>">
+			<a data-value="" href="javascript:;"><aui:icon image="user" /> <liferay-ui:message key="any" /> <liferay-ui:message key="<%= facetConfiguration.getLabel() %>" /></a>
+		</li>
+
+		<%
+		long userId = GetterUtil.getLong(fieldParam);
+
+		for (int i = 0; i < termCollectors.size(); i++) {
+			TermCollector termCollector = termCollectors.get(i);
+
+			long curUserId = GetterUtil.getLong(termCollector.getTerm());
+
+			User curUser = UserLocalServiceUtil.getUser(curUserId);
+		%>
+
+			<c:if test="<%= userId == curUserId %>">
+				<aui:script use="liferay-token-list">
+					Liferay.Search.tokenList.add(
+						{
+							clearFields: '<%= renderResponse.getNamespace() + facet.getFieldId() %>',
+							text: '<%= HtmlUtil.escapeJS(curUser.getFullName()) %>'
+						}
+					);
+				</aui:script>
+			</c:if>
+
+			<%
+			if (((maxTerms > 0) && (i >= maxTerms)) || ((frequencyThreshold > 0) && (frequencyThreshold > termCollector.getFrequency()))) {
+				break;
+			}
+			%>
+
+			<li class="facet-value <%= (userId == curUserId) ? "active" : StringPool.BLANK %>">
+				<a data-value="<%= curUserId %>" href="javascript:;">
+					<%= HtmlUtil.escape(curUser.getFullName()) %>
+
+					<c:if test="<%= showAssetCount %>">
+						<span class="badge badge-info frequency"><%= termCollector.getFrequency() %></span>
+					</c:if>
+				</a>
+			</li>
+
+		<%
+		}
+		%>
+
+	</ul>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/init.jsp
new file mode 100644
index 0000000..17253ea
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/init.jsp
@@ -0,0 +1,178 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.kernel.search.Document" %><%@
+page import="com.liferay.portal.kernel.search.FacetedSearcher" %><%@
+page import="com.liferay.portal.kernel.search.FolderSearcher" %><%@
+page import="com.liferay.portal.kernel.search.HitsOpenSearchImpl" %><%@
+page import="com.liferay.portal.kernel.search.KeywordsSuggestionHolder" %><%@
+page import="com.liferay.portal.kernel.search.OpenSearch" %><%@
+page import="com.liferay.portal.kernel.search.OpenSearchUtil" %><%@
+page import="com.liferay.portal.kernel.search.facet.AssetEntriesFacet" %><%@
+page import="com.liferay.portal.kernel.search.facet.Facet" %><%@
+page import="com.liferay.portal.kernel.search.facet.ScopeFacet" %><%@
+page import="com.liferay.portal.kernel.search.facet.collector.FacetCollector" %><%@
+page import="com.liferay.portal.kernel.search.facet.collector.TermCollector" %><%@
+page import="com.liferay.portal.kernel.search.facet.config.FacetConfiguration" %><%@
+page import="com.liferay.portal.kernel.search.facet.config.FacetConfigurationUtil" %><%@
+page import="com.liferay.portal.kernel.search.facet.util.FacetFactoryUtil" %><%@
+page import="com.liferay.portal.kernel.search.facet.util.RangeParserUtil" %><%@
+page import="com.liferay.portal.kernel.util.DateFormatFactoryUtil" %><%@
+page import="com.liferay.portal.kernel.xml.Element" %><%@
+page import="com.liferay.portal.kernel.xml.SAXReaderUtil" %><%@
+page import="com.liferay.portal.security.permission.comparator.ModelResourceComparator" %><%@
+page import="com.liferay.portal.service.PortletLocalServiceUtil" %><%@
+page import="com.liferay.portlet.asset.NoSuchCategoryException" %><%@
+page import="com.liferay.taglib.aui.ScriptTag" %><%@
+page import="com.liferay.util.PropertyComparator" %>
+
+<%@ page import="java.util.Comparator" %><%@
+page import="java.util.LinkedList" %>
+
+<%
+PortalPreferences portalPreferences = PortletPreferencesFactoryUtil.getPortalPreferences(request);
+
+boolean advancedConfiguration = GetterUtil.getBoolean(portletPreferences.getValue("advancedConfiguration", null));
+
+int collatedSpellCheckResultDisplayThreshold = GetterUtil.getInteger(portletPreferences.getValue("collatedSpellCheckResultDisplayThreshold", null), PropsValues.INDEX_SEARCH_COLLATED_SPELL_CHECK_RESULT_SCORES_THRESHOLD);
+
+if (collatedSpellCheckResultDisplayThreshold < 0) {
+	collatedSpellCheckResultDisplayThreshold = PropsValues.INDEX_SEARCH_COLLATED_SPELL_CHECK_RESULT_SCORES_THRESHOLD;
+}
+
+boolean collatedSpellCheckResultEnabled = GetterUtil.getBoolean(portletPreferences.getValue("collatedSpellCheckResultEnabled", null), PropsValues.INDEX_SEARCH_COLLATED_SPELL_CHECK_RESULT_ENABLED);
+boolean dlLinkToViewURL = false;
+boolean displayAssetCategoriesFacet = GetterUtil.getBoolean(portletPreferences.getValue("displayAssetCategoriesFacet", null), true);
+boolean displayAssetTagsFacet = GetterUtil.getBoolean(portletPreferences.getValue("displayAssetTagsFacet", null), true);
+boolean displayAssetTypeFacet = GetterUtil.getBoolean(portletPreferences.getValue("displayAssetTypeFacet", null), true);
+boolean displayFolderFacet = GetterUtil.getBoolean(portletPreferences.getValue("displayFolderFacet", null), true);
+boolean displayMainQuery = GetterUtil.getBoolean(portletPreferences.getValue("displayMainQuery", null));
+boolean displayModifiedRangeFacet = GetterUtil.getBoolean(portletPreferences.getValue("displayModifiedRangeFacet", null), true);
+boolean displayOpenSearchResults = GetterUtil.getBoolean(portletPreferences.getValue("displayOpenSearchResults", null));
+
+boolean displayResultsInDocumentForm = GetterUtil.getBoolean(portletPreferences.getValue("displayResultsInDocumentForm", null));
+
+if (!permissionChecker.isCompanyAdmin()) {
+	displayResultsInDocumentForm = false;
+}
+
+boolean displayScopeFacet = GetterUtil.getBoolean(portletPreferences.getValue("displayScopeFacet", null), true);
+boolean displayUserFacet = GetterUtil.getBoolean(portletPreferences.getValue("displayUserFacet", null), true);
+boolean includeSystemPortlets = false;
+boolean queryIndexingEnabled = GetterUtil.getBoolean(portletPreferences.getValue("queryIndexingEnabled", null), PropsValues.INDEX_SEARCH_QUERY_INDEXING_ENABLED);
+
+int queryIndexingThreshold = GetterUtil.getInteger(portletPreferences.getValue("queryIndexingThreshold", null), PropsValues.INDEX_SEARCH_QUERY_INDEXING_THRESHOLD);
+
+if (queryIndexingThreshold < 0) {
+	queryIndexingThreshold = PropsValues.INDEX_SEARCH_QUERY_INDEXING_THRESHOLD;
+}
+
+int querySuggestionsDisplayThreshold = GetterUtil.getInteger(portletPreferences.getValue("querySuggestionsDisplayThreshold", null), PropsValues.INDEX_SEARCH_QUERY_SUGGESTION_SCORES_THRESHOLD);
+
+if (querySuggestionsDisplayThreshold < 0) {
+	querySuggestionsDisplayThreshold = PropsValues.INDEX_SEARCH_QUERY_SUGGESTION_SCORES_THRESHOLD;
+}
+
+boolean querySuggestionsEnabled = GetterUtil.getBoolean(portletPreferences.getValue("querySuggestionsEnabled", null), PropsValues.INDEX_SEARCH_QUERY_SUGGESTION_ENABLED);
+
+int querySuggestionsMax = GetterUtil.getInteger(portletPreferences.getValue("querySuggestionsMax", null), PropsValues.INDEX_SEARCH_QUERY_SUGGESTION_MAX);
+
+if (querySuggestionsMax <= 0) {
+	querySuggestionsMax = PropsValues.INDEX_SEARCH_QUERY_SUGGESTION_MAX;
+}
+
+String searchConfiguration = portletPreferences.getValue("searchConfiguration", StringPool.BLANK);
+
+if (!advancedConfiguration && Validator.isNull(searchConfiguration)) {
+	searchConfiguration = ContentUtil.get(PropsValues.SEARCH_FACET_CONFIGURATION);
+}
+
+boolean viewInContext = GetterUtil.getBoolean(portletPreferences.getValue("viewInContext", null), true);
+%>
+
+<%@ include file="/html/portlet/search/init-ext.jsp" %>
+
+<%!
+private String _buildAssetCategoryPath(AssetCategory assetCategory, Locale locale) throws Exception {
+	List<AssetCategory> assetCategories = assetCategory.getAncestors();
+
+	if (assetCategories.isEmpty()) {
+		return HtmlUtil.escape(assetCategory.getName());
+	}
+
+	Collections.reverse(assetCategories);
+
+	StringBundler sb = new StringBundler(assetCategories.size() * 2 + 1);
+
+	for (AssetCategory curAssetCategory : assetCategories) {
+		sb.append(HtmlUtil.escape(curAssetCategory.getTitle(locale)));
+		sb.append(" &raquo; ");
+	}
+
+	sb.append(HtmlUtil.escape(assetCategory.getName()));
+
+	return sb.toString();
+}
+
+private String _checkViewURL(ThemeDisplay themeDisplay, String viewURL, String currentURL, boolean inheritRedirect) {
+	if (Validator.isNotNull(viewURL) && viewURL.startsWith(themeDisplay.getURLPortal())) {
+		viewURL = HttpUtil.setParameter(viewURL, "inheritRedirect", inheritRedirect);
+
+		if (!inheritRedirect) {
+			viewURL = HttpUtil.setParameter(viewURL, "redirect", currentURL);
+		}
+	}
+
+	return viewURL;
+}
+
+private PortletURL _getViewFullContentURL(HttpServletRequest request, ThemeDisplay themeDisplay, String portletId, Document document) throws Exception {
+	long groupId = GetterUtil.getLong(document.get(Field.GROUP_ID));
+
+	if (groupId == 0) {
+		Layout layout = themeDisplay.getLayout();
+
+		groupId = layout.getGroupId();
+	}
+
+	long scopeGroupId = GetterUtil.getLong(document.get(Field.SCOPE_GROUP_ID));
+
+	if (scopeGroupId == 0) {
+		scopeGroupId = themeDisplay.getScopeGroupId();
+	}
+
+	long plid = LayoutConstants.DEFAULT_PLID;
+
+	Layout layout = (Layout)request.getAttribute(WebKeys.LAYOUT);
+
+	if (layout != null) {
+		plid = layout.getPlid();
+	}
+
+	if (plid == 0) {
+		plid = LayoutServiceUtil.getDefaultPlid(groupId, scopeGroupId, portletId);
+	}
+
+	PortletURL portletURL = PortletURLFactoryUtil.create(request, portletId, plid, PortletRequest.RENDER_PHASE);
+
+	portletURL.setPortletMode(PortletMode.VIEW);
+	portletURL.setWindowState(WindowState.MAXIMIZED);
+
+	return portletURL;
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/main_search.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/main_search.jspf
new file mode 100644
index 0000000..1ed99db
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/main_search.jspf
@@ -0,0 +1,190 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+SearchContainer mainSearchSearchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, portletURL, null, null);
+
+SearchContext searchContext = SearchContextFactory.getInstance(request);
+
+mainSearchSearchContainer.setEmptyResultsMessage(LanguageUtil.format(pageContext, "no-results-were-found-that-matched-the-keywords-x", "<strong>" + HtmlUtil.escape(searchContext.getKeywords()) + "</strong>"));
+
+searchContext.setAttribute("paginationType", "more");
+searchContext.setEnd(mainSearchSearchContainer.getEnd());
+
+QueryConfig queryConfig = new QueryConfig();
+
+queryConfig.setCollatedSpellCheckResultEnabled(collatedSpellCheckResultEnabled);
+queryConfig.setCollatedSpellCheckResultScoresThreshold(collatedSpellCheckResultDisplayThreshold);
+queryConfig.setHighlightEnabled(true);
+queryConfig.setQueryIndexingEnabled(queryIndexingEnabled);
+queryConfig.setQueryIndexingThreshold(queryIndexingThreshold);
+queryConfig.setQuerySuggestionEnabled(querySuggestionsEnabled);
+queryConfig.setQuerySuggestionScoresThreshold(querySuggestionsDisplayThreshold);
+queryConfig.setQuerySuggestionsMax(querySuggestionsMax);
+
+searchContext.setQueryConfig(queryConfig);
+
+searchContext.setStart(mainSearchSearchContainer.getStart());
+
+Facet assetEntriesFacet = new AssetEntriesFacet(searchContext);
+
+assetEntriesFacet.setStatic(true);
+
+searchContext.addFacet(assetEntriesFacet);
+
+Facet scopeFacet = new ScopeFacet(searchContext);
+
+scopeFacet.setStatic(true);
+
+searchContext.addFacet(scopeFacet);
+
+List<FacetConfiguration> facetConfigurations = FacetConfigurationUtil.load(searchConfiguration);
+
+for (FacetConfiguration facetConfiguration : facetConfigurations) {
+	Facet facet = FacetFactoryUtil.create(searchContext, facetConfiguration);
+
+	searchContext.addFacet(facet);
+}
+
+Indexer indexer = FacetedSearcher.getInstance();
+
+Hits hits = indexer.search(searchContext);
+
+String[] queryTerms = hits.getQueryTerms();
+
+request.setAttribute("search.jsp-queryTerms", queryTerms);
+
+boolean showMenu = advancedConfiguration || displayScopeFacet || displayAssetTypeFacet || displayAssetTagsFacet || displayAssetCategoriesFacet || displayFolderFacet || displayUserFacet || displayModifiedRangeFacet;
+%>
+
+<aui:row cssClass='<%= "search-layout" + (showMenu ? " menu-column" : StringPool.BLANK) %>'>
+	<c:if test="<%= showMenu %>">
+		<aui:col id="facetNavigation" span="2">
+
+			<%
+			Map<String, Facet> facets = searchContext.getFacets();
+
+			List<Facet> facetsList = ListUtil.fromCollection(facets.values());
+
+			facetsList = ListUtil.sort(facetsList, new PropertyComparator("facetConfiguration.weight", false, false));
+
+			for (Facet facet : facetsList) {
+				if (facet.isStatic()) {
+					continue;
+				}
+
+				FacetConfiguration facetConfiguration = facet.getFacetConfiguration();
+
+				request.setAttribute("search.jsp-facet", facet);
+			%>
+
+				<liferay-util:include page='<%= "/html/portlet/search/facets/" + facetConfiguration.getDisplayStyle() + ".jsp" %>' />
+
+			<%
+			}
+			%>
+
+			<aui:script use="aui-base">
+				var container = A.one('#<portlet:namespace />facetNavigation');
+
+				if (container) {
+					container.delegate(
+						'click',
+						function(event) {
+							var term = event.currentTarget;
+
+							var facetValue = term.ancestor('.facet-value');
+
+							if (facetValue) {
+								var currentTerm = facetValue.hasClass('active');
+
+								facetValue.radioClass('active');
+
+								if (!currentTerm) {
+									facetValue.radioClass('active');
+
+									var searchFacet = facetValue.ancestor('.search-facet');
+
+									if (searchFacet) {
+										var field = document.<portlet:namespace />fm['<portlet:namespace />' + searchFacet.attr('data-facetFieldName')];
+
+										if (field) {
+											field.value = term.attr('data-value');
+
+											document.<portlet:namespace />fm.<portlet:namespace /><%= SearchContainer.DEFAULT_CUR_PARAM %>.value = 1;
+
+											submitForm(document.<portlet:namespace />fm);
+										}
+									}
+								}
+
+								event.preventDefault();
+							}
+						},
+						'.facet-value a'
+					);
+				}
+			</aui:script>
+		</aui:col>
+	</c:if>
+
+	<aui:col cssClass="result" first="<%= !showMenu %>" span="10">
+		<%@ include file="/html/portlet/search/main_search_suggest.jspf" %>
+
+		<liferay-ui:search-container
+			searchContainer="<%= mainSearchSearchContainer %>"
+			total="<%= hits.getLength() %>"
+		>
+			<liferay-ui:search-container-results
+				results="<%= hits.toList() %>"
+			/>
+
+			<liferay-ui:search-container-row
+				className="com.liferay.portal.kernel.search.Document"
+				escapedModel="<%= false %>"
+				keyProperty="UID"
+				modelVar="document"
+				stringKey="<%= true %>"
+			>
+				<liferay-ui:search-container-column-jsp path='<%= displayResultsInDocumentForm ? "/html/portlet/search/main_search_document_form.jsp" : "/html/portlet/search/main_search_result_form.jsp" %>' />
+			</liferay-ui:search-container-row>
+
+			<%
+			String[] entryClassNames = searchContext.getEntryClassNames();
+
+			if (entryClassNames.length == 1) {
+				portletURL.setParameter("entryClassName", entryClassNames[0]);
+			}
+			%>
+
+			<liferay-ui:search-iterator type="more" />
+
+			<c:if test="<%= displayMainQuery && (hits.getQuery() != null) %>">
+				<table class="full-query">
+					<tr>
+						<td valign="top">
+							<div class="container">
+								<code>
+									<%= HtmlUtil.escape(hits.getQuery().toString()) %>
+								</code>
+							</div>
+						</td>
+					</tr>
+				</table>
+			</c:if>
+		</liferay-ui:search-container>
+	</aui:col>
+</aui:row>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/main_search_document_form.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/main_search_document_form.jsp
new file mode 100644
index 0000000..b9fe78e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/main_search_document_form.jsp
@@ -0,0 +1,226 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/search/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+Document document = (Document)row.getObject();
+
+String entryClassName = document.get(Field.ENTRY_CLASS_NAME);
+
+AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(entryClassName);
+
+AssetRenderer assetRenderer = null;
+
+if (assetRendererFactory != null) {
+	long classPK = GetterUtil.getLong(document.get(Field.ENTRY_CLASS_PK));
+
+	long resourcePrimKey = GetterUtil.getLong(document.get(Field.ROOT_ENTRY_CLASS_PK));
+
+	if (resourcePrimKey > 0) {
+		classPK = resourcePrimKey;
+	}
+
+	assetRenderer = assetRendererFactory.getAssetRenderer(classPK);
+}
+
+String[] queryTerms = (String[])request.getAttribute("search.jsp-queryTerms");
+
+PortletURL portletURL = (PortletURL)request.getAttribute("search.jsp-portletURL");
+%>
+
+<span class="asset-entry">
+	<span class="asset-entry-type">
+		<%= ResourceActionsUtil.getModelResource(locale, entryClassName) %>
+	</span>
+
+	<span class="toggle-details">[+]</span>
+
+	<span class="asset-entry-title">
+		<c:if test="<%= assetRenderer != null %>">
+			<img alt="" src="<%= assetRenderer.getIconPath(renderRequest) %>" />
+		</c:if>
+
+		<%
+		String name = document.get(locale, Field.NAME);
+
+		if (Validator.isNull(name)) {
+			name = document.get(locale, Field.TITLE);
+		}
+
+		if (Validator.isNull(name)) {
+			name = document.get(locale, "fullName");
+		}
+		%>
+
+		<%= HtmlUtil.escape(name) %>
+	</span>
+
+	<%
+	String[] assetCategoryIds = document.getValues(Field.ASSET_CATEGORY_IDS);
+	String[] assetTagNames = document.getValues(Field.ASSET_TAG_NAMES);
+	%>
+
+	<c:if test="<%= Validator.isNotNull(assetCategoryIds[0]) || Validator.isNotNull(assetTagNames[0]) %>">
+		<div class="asset-entry-content">
+			<c:if test="<%= Validator.isNotNull(assetTagNames[0]) %>">
+				<div class="asset-entry-tags">
+
+					<%
+					for (int i = 0; i < assetTagNames.length; i++) {
+						String assetTagName = assetTagNames[i].trim();
+
+						PortletURL tagURL = PortletURLUtil.clone(portletURL, renderResponse);
+
+						tagURL.setParameter(Field.ASSET_TAG_NAMES, assetTagName);
+					%>
+
+						<c:if test="<%= i == 0 %>">
+							<div class="taglib-asset-tags-summary">
+						</c:if>
+
+						<a class="tag" href="<%= tagURL.toString() %>"><%= assetTagName %></a>
+
+						<c:if test="<%= (i + 1) == assetTagNames.length %>">
+							</div>
+						</c:if>
+
+					<%
+					}
+					%>
+
+				</div>
+			</c:if>
+
+			<c:if test="<%= Validator.isNotNull(assetCategoryIds[0]) %>">
+				<div class="asset-entry-categories">
+
+					<%
+					for (int i = 0; i < assetCategoryIds.length; i++) {
+						long assetCategoryId = GetterUtil.getLong(assetCategoryIds[i]);
+
+						AssetCategory assetCategory = null;
+
+						try {
+							assetCategory = AssetCategoryLocalServiceUtil.getCategory(assetCategoryId);
+						}
+						catch (NoSuchCategoryException nsce) {
+						}
+
+						if (assetCategory == null) {
+							continue;
+						}
+
+						AssetVocabulary assetVocabulary = AssetVocabularyLocalServiceUtil.getVocabulary(assetCategory.getVocabularyId());
+
+						PortletURL categoryURL = PortletURLUtil.clone(portletURL, renderResponse);
+
+						categoryURL.setParameter(Field.ASSET_CATEGORY_TITLES, assetCategory.getTitle(LocaleUtil.getDefault()));
+					%>
+
+						<c:if test="<%= i == 0 %>">
+							<div class="taglib-asset-categories-summary">
+								<span class="asset-vocabulary">
+									<%= HtmlUtil.escape(assetVocabulary.getTitle(locale)) %>:
+								</span>
+						</c:if>
+
+						<a class="asset-category" href="<%= categoryURL.toString() %>">
+							<%= _buildAssetCategoryPath(assetCategory, locale) %>
+						</a>
+
+						<c:if test="<%= (i + 1) == assetCategoryIds.length %>">
+							</div>
+						</c:if>
+
+					<%
+					}
+					%>
+
+				</div>
+			</c:if>
+		</div>
+	</c:if>
+
+	<table class="lfr-table asset-entry-fields hide">
+		<thead>
+			<tr>
+				<th class="key">
+					<liferay-ui:message key="key" />
+				</th>
+				<th class="value">
+					<liferay-ui:message key="value" />
+				</th>
+			</tr>
+		</thead>
+		<tbody>
+
+			<%
+			List<Map.Entry<String, Field>> fields = new LinkedList(document.getFields().entrySet());
+
+			Collections.sort(
+				fields,
+				new Comparator<Map.Entry<String, Field>>() {
+
+					public int compare(Map.Entry<String, Field> entry1, Map.Entry<String, Field> entry2) {
+						return entry1.getKey().compareTo(entry2.getKey());
+					}
+
+				}
+			);
+
+			for (Map.Entry<String, Field> entry : fields) {
+				Field field = entry.getValue();
+
+				String fieldName = field.getName();
+
+				if (fieldName.equals(Field.UID)) {
+					continue;
+				}
+
+				String[] values = field.getValues();
+			%>
+
+				<tr>
+					<td class="key" valign="top">
+						<strong><%= HtmlUtil.escape(field.getName()) %></strong>
+
+						<br />
+
+						<em>
+							<liferay-ui:message key="array" /> = <%= values.length > 1 %>, <liferay-ui:message key="boost" /> = <%= field.getBoost() %>,<br />
+
+							<liferay-ui:message key="numeric" /> = <%= field.isNumeric() %>, <liferay-ui:message key="tokenized" /> = <%= field.isTokenized() %>
+						</em>
+					</td>
+					<td class="value" valign="top">
+						<div class="container">
+							<code>
+								<c:if test="<%= values.length > 1 %>">[</c:if><%for (int i = 0; i < values.length; i++) {%><c:if test="<%= i > 0 %>">, </c:if><c:if test="<%= !field.isNumeric() %>">"</c:if><%= HtmlUtil.escape(values[i]) %><c:if test="<%= !field.isNumeric() %>">"</c:if><%}%><c:if test="<%= values.length > 1 %>">]</c:if>
+							</code>
+						</div>
+					</td>
+				</tr>
+
+			<%
+			}
+			%>
+
+		</tbody>
+	</table>
+</span>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/main_search_result_form.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/main_search_result_form.jsp
new file mode 100644
index 0000000..19f5583
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/main_search_result_form.jsp
@@ -0,0 +1,234 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/search/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+Document document = (Document)row.getObject();
+
+String className = document.get(Field.ENTRY_CLASS_NAME);
+
+String entryTitle = null;
+String entrySummary = null;
+String downloadURL = null;
+String returnToFullPageURL = (String)request.getAttribute("search.jsp-returnToFullPageURL");
+PortletURL viewFullContentURL = null;
+String viewURL = null;
+
+AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(className);
+
+AssetRenderer assetRenderer = null;
+
+boolean inheritRedirect = false;
+
+if (assetRendererFactory != null) {
+	long classPK = GetterUtil.getLong(document.get(Field.ENTRY_CLASS_PK));
+
+	long resourcePrimKey = GetterUtil.getLong(document.get(Field.ROOT_ENTRY_CLASS_PK));
+
+	if (resourcePrimKey > 0) {
+		classPK = resourcePrimKey;
+	}
+
+	AssetEntry assetEntry = AssetEntryLocalServiceUtil.getEntry(className, classPK);
+
+	assetRenderer = assetRendererFactory.getAssetRenderer(classPK);
+
+	downloadURL = assetRenderer.getURLDownload(themeDisplay);
+
+	viewFullContentURL = _getViewFullContentURL(request, themeDisplay, PortletKeys.ASSET_PUBLISHER, document);
+
+	viewFullContentURL.setParameter("struts_action", "/asset_publisher/view_content");
+
+	if (Validator.isNotNull(returnToFullPageURL)) {
+		viewFullContentURL.setParameter("returnToFullPageURL", returnToFullPageURL);
+	}
+
+	viewFullContentURL.setParameter("assetEntryId", String.valueOf(assetEntry.getEntryId()));
+	viewFullContentURL.setParameter("type", assetRendererFactory.getType());
+
+	if (Validator.isNotNull(assetRenderer.getUrlTitle())) {
+		if ((assetRenderer.getGroupId() > 0) && (assetRenderer.getGroupId() != scopeGroupId)) {
+			viewFullContentURL.setParameter("groupId", String.valueOf(assetRenderer.getGroupId()));
+		}
+
+		viewFullContentURL.setParameter("urlTitle", assetRenderer.getUrlTitle());
+	}
+
+	if (viewInContext) {
+		inheritRedirect = true;
+
+		String viewFullContentURLString = viewFullContentURL.toString();
+
+		viewFullContentURLString = HttpUtil.setParameter(viewFullContentURLString, "redirect", currentURL);
+
+		viewURL = assetRenderer.getURLViewInContext(liferayPortletRequest, liferayPortletResponse, viewFullContentURLString);
+	}
+	else {
+		viewURL = viewFullContentURL.toString();
+	}
+}
+else {
+	String portletId = document.get(Field.PORTLET_ID);
+
+	viewFullContentURL = _getViewFullContentURL(request, themeDisplay, portletId, document);
+
+	if (Validator.isNotNull(returnToFullPageURL)) {
+		viewFullContentURL.setParameter("returnToFullPageURL", returnToFullPageURL);
+	}
+
+	viewURL = viewFullContentURL.toString();
+}
+
+Indexer indexer = IndexerRegistryUtil.getIndexer(className);
+
+if (indexer != null) {
+	String snippet = document.get(Field.SNIPPET);
+
+	Summary summary = indexer.getSummary(document, locale, snippet, viewFullContentURL);
+
+	entryTitle = summary.getTitle();
+	entrySummary = summary.getContent();
+}
+else if (assetRenderer != null) {
+	entryTitle = assetRenderer.getTitle(locale);
+	entrySummary = assetRenderer.getSearchSummary(locale);
+}
+
+if ((assetRendererFactory == null) && viewInContext) {
+	viewURL = viewFullContentURL.toString();
+}
+
+viewURL = _checkViewURL(themeDisplay, viewURL, currentURL, inheritRedirect);
+
+String[] queryTerms = (String[])request.getAttribute("search.jsp-queryTerms");
+
+PortletURL portletURL = (PortletURL)request.getAttribute("search.jsp-portletURL");
+%>
+
+<span class="asset-entry">
+	<span class="asset-entry-type">
+		<%= ResourceActionsUtil.getModelResource(themeDisplay.getLocale(), className) %>
+	</span>
+
+	<span class="asset-entry-title">
+		<a href="<%= viewURL %>">
+			<c:if test="<%= assetRenderer != null %>">
+				<img alt="" src="<%= assetRenderer.getIconPath(renderRequest) %>" />
+			</c:if>
+
+			<%= StringUtil.highlight(HtmlUtil.escape(entryTitle), queryTerms) %>
+		</a>
+
+		<c:if test="<%= Validator.isNotNull(downloadURL) %>">
+			<liferay-ui:icon image="../arrows/01_down" label="<%= false %>" message='<%= LanguageUtil.format(pageContext, "download-x", HtmlUtil.escape(entryTitle)) %>' url="<%= downloadURL %>" />
+		</c:if>
+	</span>
+
+	<%
+	String[] assetCategoryIds = document.getValues(Field.ASSET_CATEGORY_IDS);
+	String[] assetTagNames = document.getValues(Field.ASSET_TAG_NAMES);
+	%>
+
+	<c:if test="<%= Validator.isNotNull(entrySummary) || Validator.isNotNull(assetCategoryIds[0]) || Validator.isNotNull(assetTagNames[0]) %>">
+		<div class="asset-entry-content">
+			<c:if test="<%= Validator.isNotNull(entrySummary) %>">
+				<span class="asset-entry-summary">
+					<%= StringUtil.highlight(HtmlUtil.escape(entrySummary), queryTerms) %>
+				</span>
+			</c:if>
+
+			<c:if test="<%= Validator.isNotNull(assetTagNames[0]) %>">
+				<div class="asset-entry-tags">
+
+					<%
+					for (int i = 0; i < assetTagNames.length; i++) {
+						String assetTagName = assetTagNames[i].trim();
+
+						PortletURL tagURL = PortletURLUtil.clone(portletURL, renderResponse);
+
+						tagURL.setParameter(Field.ASSET_TAG_NAMES, assetTagName);
+					%>
+
+						<c:if test="<%= i == 0 %>">
+							<div class="taglib-asset-tags-summary">
+						</c:if>
+
+						<a class="tag" href="<%= tagURL.toString() %>"><%= assetTagName %></a>
+
+						<c:if test="<%= (i + 1) == assetTagNames.length %>">
+							</div>
+						</c:if>
+
+					<%
+					}
+					%>
+
+				</div>
+			</c:if>
+
+			<c:if test="<%= Validator.isNotNull(assetCategoryIds[0]) %>">
+				<div class="asset-entry-categories">
+
+					<%
+					for (int i = 0; i < assetCategoryIds.length; i++) {
+						long assetCategoryId = GetterUtil.getLong(assetCategoryIds[i]);
+
+						AssetCategory assetCategory = null;
+
+						try {
+							assetCategory = AssetCategoryLocalServiceUtil.getCategory(assetCategoryId);
+						}
+						catch (NoSuchCategoryException nsce) {
+						}
+
+						if (assetCategory == null) {
+							continue;
+						}
+
+						AssetVocabulary assetVocabulary = AssetVocabularyLocalServiceUtil.getVocabulary(assetCategory.getVocabularyId());
+
+						PortletURL categoryURL = PortletURLUtil.clone(portletURL, renderResponse);
+
+						categoryURL.setParameter(Field.ASSET_CATEGORY_TITLES, assetCategory.getTitle(LocaleUtil.getDefault()));
+					%>
+
+						<c:if test="<%= i == 0 %>">
+							<div class="taglib-asset-categories-summary">
+								<span class="asset-vocabulary">
+									<%= HtmlUtil.escape(assetVocabulary.getTitle(locale)) %>:
+								</span>
+						</c:if>
+
+						<a class="asset-category" href="<%= categoryURL.toString() %>">
+							<%= _buildAssetCategoryPath(assetCategory, locale) %>
+						</a>
+
+						<c:if test="<%= (i + 1) == assetCategoryIds.length %>">
+							</div>
+						</c:if>
+
+					<%
+					}
+					%>
+
+				</div>
+			</c:if>
+		</div>
+	</c:if>
+</span>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/main_search_suggest.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/main_search_suggest.jspf
new file mode 100644
index 0000000..031bd13
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/main_search_suggest.jspf
@@ -0,0 +1,106 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<div class="search-suggested-spelling">
+	<c:if test="<%= collatedSpellCheckResultEnabled && Validator.isNotNull(hits.getCollatedSpellCheckResult()) && !Validator.equals(hits.getCollatedSpellCheckResult(), searchContext.getKeywords()) %>">
+		<ul class="inline suggested-keywords">
+			<li class="label">
+				<liferay-ui:message key="did-you-mean" />:
+			</li>
+			<li>
+
+				<%
+				String taglibSearchCollatedKeywords = renderResponse.getNamespace() + "searchKeywords('" + HtmlUtil.escapeJS(hits.getCollatedSpellCheckResult()) + "')";
+				%>
+
+				<aui:a href="javascript:;" onclick="<%= taglibSearchCollatedKeywords %>">
+
+					<%
+					KeywordsSuggestionHolder keywordsSuggestionHolder = new KeywordsSuggestionHolder(hits.getCollatedSpellCheckResult(), searchContext.getKeywords());
+
+					for (String suggestedKeyword : keywordsSuggestionHolder.getSuggestedKeywords()) {
+					%>
+
+						<span class="<%= keywordsSuggestionHolder.hasChanged(suggestedKeyword) ? "changed-keyword" : "unchanged-keyword" %>">
+							<%= HtmlUtil.escape(suggestedKeyword) %>
+						</span>
+
+					<%
+					}
+					%>
+
+				</aui:a>
+			</li>
+		</ul>
+	</c:if>
+
+	<c:if test="<%= querySuggestionsEnabled && Validator.isNotNull(hits.getQuerySuggestions()) %>">
+		<ul class="inline related-queries">
+			<li class="label">
+				<liferay-ui:message key="related-queries" />:
+			</li>
+
+			<%
+			for (String querySuggestion : hits.getQuerySuggestions()) {
+			%>
+
+				<c:if test="<%= Validator.isNotNull(querySuggestion) && !querySuggestion.equals(searchContext.getKeywords()) %>">
+					<li>
+
+						<%
+						String taglibOnClick = renderResponse.getNamespace() + "searchKeywords('" + HtmlUtil.escapeJS(querySuggestion) + "')";
+						%>
+
+						<aui:a href="javascript:;" onClick="<%= taglibOnClick %>">
+
+							<%
+							KeywordsSuggestionHolder keywordsSuggestionHolder = new KeywordsSuggestionHolder(querySuggestion, searchContext.getKeywords());
+
+							for (String suggestedKeyword : keywordsSuggestionHolder.getSuggestedKeywords()) {
+							%>
+
+								<span class="<%= keywordsSuggestionHolder.hasChanged(suggestedKeyword) ? "changed-keyword" : "unchanged-keyword" %>">
+									<%= HtmlUtil.escape(suggestedKeyword) %>
+								</span>
+
+							<%
+							}
+							%>
+
+						</aui:a>
+					</li>
+				</c:if>
+
+			<%
+			}
+			%>
+
+		</ul>
+	</c:if>
+</div>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />searchKeywords',
+		function(newKeywords) {
+			document.<portlet:namespace />fm.<portlet:namespace />keywords.value = newKeywords;
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['aui-base']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/open_search.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/open_search.jspf
new file mode 100644
index 0000000..8e97013
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/open_search.jspf
@@ -0,0 +1,374 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<aui:button-row>
+	<aui:button onClick='<%= renderResponse.getNamespace() + "addSearchProvider();" %>' value='<%= LanguageUtil.format(pageContext, "add-x-as-a-search-provider", HtmlUtil.escape(company.getName()), false) %>' />
+</aui:button-row>
+
+<%
+LinkedHashMap<String, Object> groupParams = new LinkedHashMap<String, Object>();
+
+groupParams.put("active", Boolean.FALSE);
+
+int inactiveGroupsCount = GroupLocalServiceUtil.searchCount(themeDisplay.getCompanyId(), null, null, groupParams);
+
+List<Portlet> portlets = PortletLocalServiceUtil.getPortlets(company.getCompanyId(), includeSystemPortlets, false);
+
+portlets = ListUtil.sort(portlets, new PortletTitleComparator(application, locale));
+
+Iterator<Portlet> itr = portlets.iterator();
+
+while (itr.hasNext()) {
+	Portlet portlet = itr.next();
+
+	if (Validator.isNull(portlet.getOpenSearchClass())) {
+		itr.remove();
+
+		continue;
+	}
+	else {
+		try {
+			ClassLoader classLoader = ClassLoaderUtil.getPortalClassLoader();
+
+			classLoader.loadClass(portlet.getOpenSearchClass());
+
+			itr.remove();
+
+			continue;
+		}
+		catch (ClassNotFoundException cnfe) {
+		}
+	}
+
+	OpenSearch openSearch = portlet.getOpenSearchInstance();
+
+	if (!openSearch.isEnabled()) {
+		itr.remove();
+
+		continue;
+	}
+
+	portletTitles.add(PortalUtil.getPortletTitle(portlet, application, locale));
+}
+
+if (Validator.isNotNull(primarySearch)) {
+	for (int i = 0; i < portlets.size(); i++) {
+		Portlet portlet = (Portlet)portlets.get(i);
+
+		if (primarySearch.equals(portlet.getOpenSearchClass())) {
+			if (i != 0) {
+				portlets.remove(i);
+
+				portlets.add(0, portlet);
+			}
+
+			break;
+		}
+	}
+}
+%>
+
+<div class="search-msg">
+	<c:choose>
+		<c:when test="<%= portletTitles.isEmpty() %>">
+			<liferay-ui:message key="no-portlets-were-searched" />
+		</c:when>
+		<c:otherwise>
+			<liferay-ui:message key="searched" /> <%= StringUtil.merge(portletTitles, StringPool.COMMA_AND_SPACE) %>
+		</c:otherwise>
+	</c:choose>
+</div>
+
+<%
+int totalResults = 0;
+
+for (int i = 0; i < portlets.size(); i++) {
+	Portlet portlet = (Portlet)portlets.get(i);
+
+	OpenSearch openSearch = portlet.getOpenSearchInstance();
+
+	//List<String> headerNames = new ArrayList<String>();
+
+	//headerNames.add("#");
+	//headerNames.add("summary");
+	//headerNames.add("tags");
+	//headerNames.add("score");
+
+	SearchContainer openSearchSearchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM + i, 5, portletURL, null, LanguageUtil.format(pageContext, "no-results-were-found-that-matched-the-keywords-x", "<strong>" + HtmlUtil.escape(keywords) + "</strong>"));
+
+	if (Validator.isNotNull(primarySearch) && primarySearch.equals(portlet.getOpenSearchClass())) {
+		int delta = ParamUtil.getInteger(request, SearchContainer.DEFAULT_DELTA_PARAM + i);
+
+		if (delta > 0) {
+			openSearchSearchContainer.setDelta(delta);
+		}
+		else {
+			openSearchSearchContainer.setDelta(SearchContainer.DEFAULT_DELTA);
+		}
+	}
+
+	String portletTitle = PortalUtil.getPortletTitle(portlet, application, locale);
+
+	boolean filterSearch = false;
+
+	if (openSearch instanceof HitsOpenSearchImpl) {
+		HitsOpenSearchImpl hitsOpenSearchImpl = (HitsOpenSearchImpl)openSearch;
+
+		Indexer hitsOpenSearchImplIndexer = hitsOpenSearchImpl.getIndexer();
+
+		filterSearch = hitsOpenSearchImplIndexer.isFilterSearch();
+	}
+
+	List resultRows = new ArrayList();
+
+	try {
+		String xml = openSearch.search(request, groupId, themeDisplay.getUserId(), keywords, openSearchSearchContainer.getCur(), openSearchSearchContainer.getDelta(), format);
+
+		xml = XMLFormatter.stripInvalidChars(xml);
+
+		com.liferay.portal.kernel.xml.Document document = SAXReaderUtil.read(xml);
+
+		Element rootElement = document.getRootElement();
+
+		//portletTitle = rootElement.elementText("title");
+
+		queryTerms = StringUtil.split(rootElement.elementText("queryTerms"), StringPool.COMMA_AND_SPACE);
+
+		List<Element> entries = rootElement.elements("entry");
+
+		int openSearchSearchContainerTotal = GetterUtil.getInteger(rootElement.elementText(OpenSearchUtil.getQName("totalResults", OpenSearchUtil.OS_NAMESPACE)));
+
+		resultRows = openSearchSearchContainer.getResultRows();
+
+		for (int j = 0; j < entries.size(); j++) {
+			try {
+				Element element = entries.get(j);
+
+				ResultRow row = new ResultRow(document, String.valueOf(j), j);
+
+				// Position
+
+				//row.addText(SearchEntry.DEFAULT_ALIGN, "top", openSearchSearchContainer.getStart() + j + 1 + StringPool.PERIOD);
+
+				// Summary
+
+				String entryClassName = element.elementText("entryClassName");
+				String entryTitle = element.elementText("title");
+				String entryHref = element.element("link").attributeValue("href");
+				String summary = element.elementText("summary");
+
+				// Group id
+
+				long entryScopeGroupId = GetterUtil.getLong(element.elementText(OpenSearchUtil.getQName("scopeGroupId", OpenSearchUtil.LIFERAY_NAMESPACE)));
+
+				if (Validator.isNotNull(entryScopeGroupId) && (inactiveGroupsCount > 0)) {
+					Group entryGroup = GroupServiceUtil.getGroup(entryScopeGroupId);
+
+					if (entryGroup.isLayout()) {
+						entryGroup = GroupLocalServiceUtil.getGroup(entryGroup.getParentGroupId());
+					}
+
+					if (!entryGroup.isActive()) {
+						openSearchSearchContainerTotal--;
+
+						continue;
+					}
+				}
+
+				String portletId = portlet.getPortletId();
+
+				if (portletId.equals(PortletKeys.DOCUMENT_LIBRARY) || (portletId.equals(PortletKeys.SEARCH) && entryClassName.equals(DLFileEntryConstants.getClassName()))) {
+					long fileEntryId = GetterUtil.getLong(HttpUtil.getParameter(entryHref, "_20_fileEntryId", false));
+
+					FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(fileEntryId);
+
+					entryTitle = fileEntry.getTitle();
+
+					if (portletId.equals(PortletKeys.SEARCH)) {
+						entryTitle = PortalUtil.getPortletTitle(PortletKeys.DOCUMENT_LIBRARY, locale) + " " + CharPool.RAQUO + " " + entryTitle;
+					}
+
+					if (dlLinkToViewURL) {
+						long dlPlid = PortalUtil.getPlidFromPortletId(fileEntry.getRepositoryId(), PortletKeys.DOCUMENT_LIBRARY);
+
+						PortletURL viewURL = new PortletURLImpl(request, PortletKeys.DOCUMENT_LIBRARY, dlPlid, PortletRequest.RENDER_PHASE);
+
+						viewURL.setParameter("struts_action", "/document_library/view_file_entry");
+						viewURL.setParameter("redirect", currentURL);
+						viewURL.setParameter("fileEntryId", String.valueOf(fileEntry.getFileEntryId()));
+
+						entryHref = viewURL.toString();
+					}
+				}
+
+				StringBundler rowSB = new StringBundler();
+
+				rowSB.append("<a class=\"entry-title\" href=\"");
+				rowSB.append(entryHref);
+				rowSB.append("\">");
+				rowSB.append(StringUtil.highlight(HtmlUtil.escape(entryTitle), queryTerms));
+				rowSB.append("</a>");
+
+				if (Validator.isNotNull(summary)) {
+					rowSB.append("<br />");
+					rowSB.append(StringUtil.highlight(HtmlUtil.escape(summary), queryTerms));
+				}
+
+				rowSB.append("<br />");
+
+				// Tags
+
+				String tagsString = element.elementText("tags");
+
+				tagsString = tagsString.replaceAll("[\\[\\]]","");
+
+				String[] tags = StringUtil.split(tagsString);
+
+				String[] tagsQueryTerms = queryTerms;
+
+				if (StringUtil.startsWith(keywords, Field.ASSET_TAG_NAMES + StringPool.COLON)) {
+					tagsQueryTerms = new String[] {StringUtil.replace(keywords, Field.ASSET_TAG_NAMES + StringPool.COLON, StringPool.BLANK)};
+				}
+
+				for (int k = 0; k < tags.length; k++) {
+					String tag = tags[k];
+
+					String newKeywords = tag.trim();
+
+					if (newKeywords.matches(".+\\s.+")) {
+						newKeywords = StringPool.QUOTE + tag + StringPool.QUOTE;
+					}
+
+					PortletURL tagURL = PortletURLUtil.clone(portletURL, renderResponse);
+
+					tagURL.setParameter("keywords", Field.ASSET_TAG_NAMES + StringPool.COLON + newKeywords);
+					tagURL.setParameter("format", format);
+
+					if (k == 0) {
+						rowSB.append("<div class=\"entry-tags\">");
+						rowSB.append("<div class=\"taglib-asset-tags-summary\">");
+					}
+
+					rowSB.append("<a class=\"tag\" href=\"");
+					rowSB.append(tagURL.toString());
+					rowSB.append("\">");
+					rowSB.append(StringUtil.highlight(tag, tagsQueryTerms));
+					rowSB.append("</a>");
+
+					if ((k + 1) == tags.length) {
+						rowSB.append("</div>");
+						rowSB.append("</div>");
+					}
+				}
+
+				row.addText(rowSB.toString());
+
+				// Ratings
+
+				//String ratings = element.elementText("ratings");
+
+				//row.addText(ratings);
+
+				// Score
+
+				//String score = element.elementText(OpenSearchUtil.getQName("score", OpenSearchUtil.RELEVANCE_NAMESPACE));
+
+				//row.addText(score);
+
+				// Add result row
+
+				resultRows.add(row);
+			}
+			catch (Exception e) {
+				_log.error("Error retrieving individual search result of type " + portlet.getOpenSearchClass(), e);
+
+				openSearchSearchContainerTotal--;
+			}
+		}
+
+		openSearchSearchContainer.setTotal(openSearchSearchContainerTotal);
+	}
+	catch (Exception e) {
+		_log.error("Error displaying content of type " + portlet.getOpenSearchClass(), e);
+	}
+%>
+
+	<c:if test="<%= !resultRows.isEmpty() %>">
+
+		<%
+		totalResults = totalResults + openSearchSearchContainer.getTotal();
+
+		StringBundler sb = new StringBundler(7);
+
+		sb.append(portletTitle);
+
+		// When the total is <= to the delta, we know the result is accurate
+		// since we've filtered the entire result set. Otherwise, we simply
+		// indicate that there are possibly many more. (� la Google)
+
+		if (filterSearch && (openSearchSearchContainer.getTotal() > openSearchSearchContainer.getDelta())) {
+			sb.append(StringPool.SPACE);
+			sb.append(StringPool.OPEN_PARENTHESIS);
+			sb.append(openSearchSearchContainer.getDelta());
+			sb.append(StringPool.SPACE);
+			sb.append(LanguageUtil.get(pageContext, "of-many"));
+			sb.append(StringPool.CLOSE_PARENTHESIS);
+		}
+		else {
+			sb.append(StringPool.SPACE);
+			sb.append(StringPool.OPEN_PARENTHESIS);
+			sb.append(openSearchSearchContainer.getTotal());
+			sb.append(StringPool.CLOSE_PARENTHESIS);
+		}
+		%>
+
+		<div class="section-title">
+			<%= sb.toString() %>
+		</div>
+
+		<liferay-ui:search-iterator paginate="<%= false %>" searchContainer="<%= openSearchSearchContainer %>" />
+
+		<c:choose>
+			<c:when test="<%= (openSearchSearchContainer.getTotal() == resultRows.size()) || (Validator.isNotNull(primarySearch) && portlet.getOpenSearchClass().equals(primarySearch)) %>">
+				<div class="search-paginator-container">
+					<liferay-ui:search-paginator searchContainer="<%= openSearchSearchContainer %>" type="more" />
+				</div>
+			</c:when>
+			<c:otherwise>
+				<div class="more-results">
+					<portlet:renderURL var="moreResultsURL">
+						<portlet:param name="struts_action" value="/search/search" />
+						<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+						<portlet:param name="primarySearch" value="<%= portlet.getOpenSearchClass() %>" />
+						<portlet:param name="keywords" value="<%= HtmlUtil.escape(keywords) %>" />
+						<portlet:param name="format" value="<%= format %>" />
+					</portlet:renderURL>
+
+					<aui:a href="<%= moreResultsURL %>"><%= LanguageUtil.format(pageContext, "more-x-results", portletTitle) %> &raquo;</aui:a>
+				</div>
+			</c:otherwise>
+		</c:choose>
+	</c:if>
+
+<%
+}
+%>
+
+<c:if test="<%= totalResults == 0 %>">
+	<div class="no-results">
+		<%= LanguageUtil.format(pageContext, "no-results-were-found-that-matched-the-keywords-x", "<strong>" + HtmlUtil.escape(keywords) + "</strong>") %>
+	</div>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/open_search_description.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/open_search_description.jsp
new file mode 100644
index 0000000..1bb9119
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/open_search_description.jsp
@@ -0,0 +1,38 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/common/init.jsp" %>
+
+<%
+long groupId = ParamUtil.getLong(request, "groupId");
+
+PortletURLImpl searchURL = new PortletURLImpl(request, PortletKeys.SEARCH, themeDisplay.getPlid(), PortletRequest.RENDER_PHASE);
+
+searchURL.setEscapeXml(true);
+
+searchURL.setParameter("struts_action", "/search/search");
+searchURL.setParameter("groupId", String.valueOf(groupId));
+
+response.setContentType(ContentTypes.TEXT_XML_UTF8);
+%>
+
+<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
+	<ShortName><%= LanguageUtil.format(pageContext, "x-search", HtmlUtil.escape(company.getName()), false) %></ShortName>
+	<Description><%= LanguageUtil.format(pageContext, "x-search-provider", HtmlUtil.escape(company.getName()), false) %></Description>
+	<Url template="<%= searchURL.toString() %>&amp;keywords={searchTerms}" type="text/html" />
+	<Url template="<%= themeDisplay.getPortalURL() %><%= PortalUtil.getPathMain() %>/search/open_search?keywords={searchTerms}&amp;p={startPage?}&amp;c={count?}&amp;format=atom" type="application/atom+xml" />
+	<Url template="<%= themeDisplay.getPortalURL() %><%= PortalUtil.getPathMain() %>/search/open_search?keywords={searchTerms}&amp;p={startPage?}&amp;c={count?}&amp;format=rss" type="application/rss+xml" />
+</OpenSearchDescription>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/search.jsp
new file mode 100644
index 0000000..50a8330
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/search.jsp
@@ -0,0 +1,256 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/search/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+if (Validator.isNotNull(redirect)) {
+	portletDisplay.setURLBack(redirect);
+}
+
+String primarySearch = ParamUtil.getString(request, "primarySearch");
+
+if (Validator.isNotNull(primarySearch)) {
+	portalPreferences.setValue(PortletKeys.SEARCH, "primary-search", primarySearch);
+}
+else {
+	primarySearch = portalPreferences.getValue(PortletKeys.SEARCH, "primary-search", StringPool.BLANK);
+}
+
+long groupId = ParamUtil.getLong(request, "groupId");
+
+String keywords = ParamUtil.getString(request, "keywords");
+
+String format = ParamUtil.getString(request, "format");
+
+List<String> portletTitles = new ArrayList<String>();
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/search/search");
+portletURL.setParameter("groupId", String.valueOf(groupId));
+portletURL.setParameter("keywords", keywords);
+portletURL.setParameter("format", format);
+
+request.setAttribute("search.jsp-portletURL", portletURL);
+request.setAttribute("search.jsp-returnToFullPageURL", portletDisplay.getURLBack());
+%>
+
+<liferay-portlet:renderURL varImpl="searchURL">
+	<portlet:param name="struts_action" value="/search/search" />
+</liferay-portlet:renderURL>
+
+<aui:form action="<%= searchURL %>" method="get" name="fm" onSubmit="event.preventDefault();">
+	<liferay-portlet:renderURLParams varImpl="searchURL" />
+	<aui:input name="<%= SearchContainer.DEFAULT_CUR_PARAM %>" type="hidden" value="<%= ParamUtil.getInteger(request, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_CUR) %>" />
+	<aui:input name="format" type="hidden" value="<%= format %>" />
+
+	<aui:fieldset id="searchContainer">
+		<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" inlineField="<%= true %>" label="" name="keywords" size="30" value="<%= HtmlUtil.escape(keywords) %>" />
+
+		<aui:input inlineField="<%= true %>" label="" name="search" src='<%= themeDisplay.getPathThemeImages() + "/common/search.png" %>' title="search" type="image" />
+
+		<aui:input inlineField="<%= true %>" label="" name="clearSearch" src='<%= themeDisplay.getPathThemeImages() + "/common/close.png" %>' title="clear-search" type="image" />
+	</aui:fieldset>
+
+	<div class="lfr-token-list" id="<portlet:namespace />searchTokens">
+		<div class="lfr-token-list-content" id="<portlet:namespace />searchTokensContent"></div>
+	</div>
+
+	<aui:script use="liferay-token-list">
+		Liferay.namespace('Search').tokenList = new Liferay.TokenList(
+			{
+				after: {
+					close: function(event) {
+						var item = event.item;
+
+						var fieldValues = item.attr('data-fieldValues').split();
+
+						A.Array.each(
+							fieldValues,
+							function(item, index, collection) {
+								var values = item.split('|');
+
+								var field = A.one('#' + values[0]);
+
+								if (field) {
+									field.val(values[1]);
+								}
+							}
+						);
+
+						var clearFields = A.all('#' + event.item.attr('data-clearFields').split().join(',#'));
+
+						clearFields.remove();
+
+						if (fieldValues.length || clearFields.size()) {
+							submitForm(document.<portlet:namespace />fm);
+						}
+					}
+				},
+				boundingBox: '#<portlet:namespace />searchTokens',
+				contentBox: '#<portlet:namespace />searchTokensContent'
+			}
+		).render();
+	</aui:script>
+
+	<%@ include file="/html/portlet/search/main_search.jspf" %>
+
+	<c:if test="<%= displayOpenSearchResults %>">
+		<liferay-ui:panel collapsible="<%= true %>" cssClass="open-search-panel" extended="<%= true %>" id="searchOpenSearchPanelContainer" persistState="<%= true %>" title="open-search">
+			<%@ include file="/html/portlet/search/open_search.jspf" %>
+		</liferay-ui:panel>
+	</c:if>
+</aui:form>
+
+<aui:script use="aui-base">
+	A.on(
+		'click',
+		function(event) {
+			var targetId = event.target.get('id');
+
+			if (targetId === '<portlet:namespace />search') {
+				<portlet:namespace />search();
+			}
+			else if (targetId === '<portlet:namespace />clearSearch') {
+				<portlet:renderURL copyCurrentRenderParameters="<%= false %>" var="clearSearchURL">
+					<portlet:param name="groupId" value="0" />
+				</portlet:renderURL>
+
+				window.location.href = '<%= clearSearchURL %>';
+			}
+		},
+		'#<portlet:namespace />searchContainer'
+	);
+
+	var searchContainer = A.one('.portlet-search .result .lfr-search-container');
+
+	if (searchContainer) {
+		searchContainer.delegate(
+			'click',
+			function(event) {
+				document.<portlet:namespace />fm.<portlet:namespace /><%= SearchContainer.DEFAULT_CUR_PARAM %>.value = 1;
+
+				submitForm(document.<portlet:namespace />fm);
+
+				event.preventDefault();
+			},
+			'.page-links a.first'
+		);
+
+		searchContainer.delegate(
+			'click',
+			function(event) {
+				document.<portlet:namespace />fm.<portlet:namespace /><%= SearchContainer.DEFAULT_CUR_PARAM %>.value = parseInt(document.<portlet:namespace />fm.<portlet:namespace /><%= SearchContainer.DEFAULT_CUR_PARAM %>.value) - 1;
+
+				submitForm(document.<portlet:namespace />fm);
+
+				event.preventDefault();
+			},
+			'.page-links a.previous'
+		);
+
+		searchContainer.delegate(
+			'click',
+			function(event) {
+				document.<portlet:namespace />fm.<portlet:namespace /><%= SearchContainer.DEFAULT_CUR_PARAM %>.value = parseInt(document.<portlet:namespace />fm.<portlet:namespace /><%= SearchContainer.DEFAULT_CUR_PARAM %>.value) + 1;
+
+				submitForm(document.<portlet:namespace />fm);
+
+				event.preventDefault();
+			},
+			'.page-links a.next'
+		);
+	}
+
+	var resultsGrid = A.one('.portlet-search .result .searchcontainer-content');
+
+	if (resultsGrid) {
+		resultsGrid.delegate(
+			'click',
+			function(event) {
+				var handle = event.currentTarget;
+				var rowTD = handle.ancestor('.table-cell');
+
+				var documentFields = rowTD.one('.asset-entry .asset-entry-fields');
+
+				if (handle.text() == '[+]') {
+					documentFields.show();
+					handle.text('[-]');
+				}
+				else if (handle.text() == '[-]') {
+					documentFields.hide();
+					handle.text('[+]');
+				}
+			},
+			'.table-cell .asset-entry .toggle-details'
+		);
+	}
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />addSearchProvider',
+		function() {
+			window.external.AddSearchProvider("<%= themeDisplay.getPortalURL() %><%= PortalUtil.getPathMain() %>/search/open_search_description.xml?p_l_id=<%= themeDisplay.getPlid() %>&groupId=<%= groupId %>");
+		},
+		['aui-base']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />search',
+		function() {
+			document.<portlet:namespace />fm.<portlet:namespace /><%= SearchContainer.DEFAULT_CUR_PARAM %>.value = 1;
+
+			var keywords = document.<portlet:namespace />fm.<portlet:namespace />keywords.value;
+
+			keywords = keywords.replace(/^\s+|\s+$/, '');
+
+			if (keywords != '') {
+				submitForm(document.<portlet:namespace />fm);
+			}
+		},
+		['aui-base']
+	);
+</aui:script>
+
+<%
+String pageSubtitle = LanguageUtil.get(pageContext, "search-results");
+String pageDescription = LanguageUtil.get(pageContext, "search-results");
+String pageKeywords = LanguageUtil.get(pageContext, "search");
+
+if (!portletTitles.isEmpty()) {
+	pageDescription = LanguageUtil.get(pageContext, "searched") + StringPool.SPACE + StringUtil.merge(portletTitles, StringPool.COMMA_AND_SPACE);
+}
+
+if (Validator.isNotNull(keywords)) {
+	pageKeywords = keywords;
+
+	if (StringUtil.startsWith(pageKeywords, Field.ASSET_TAG_NAMES + StringPool.COLON)) {
+		pageKeywords = StringUtil.replace(pageKeywords, Field.ASSET_TAG_NAMES + StringPool.COLON, StringPool.BLANK);
+	}
+}
+
+PortalUtil.setPageSubtitle(pageSubtitle, request);
+PortalUtil.setPageDescription(pageDescription, request);
+PortalUtil.setPageKeywords(pageKeywords, request);
+%>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.search.search_jsp");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/search/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/view.jsp
new file mode 100644
index 0000000..59e5b25
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/search/view.jsp
@@ -0,0 +1,19 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/search/init.jsp" %>
+
+<liferay-ui:search />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/add_book_items.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/add_book_items.jsp
new file mode 100644
index 0000000..7fe9a85
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/add_book_items.jsp
@@ -0,0 +1,60 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/shopping/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+long categoryId = ParamUtil.getLong(request, "categoryId", ShoppingCategoryConstants.DEFAULT_PARENT_CATEGORY_ID);
+%>
+
+<portlet:actionURL var="addBookItemsURL">
+	<portlet:param name="struts_action" value="/shopping/add_book_items" />
+</portlet:actionURL>
+
+<aui:form action="<%= addBookItemsURL %>" method="post" name="fm" onSubmit='<%= renderResponse.getNamespace() + "saveBookItem();" %>'>
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="categoryId" type="hidden" value="<%= categoryId %>" />
+
+	<liferay-util:include page="/html/portlet/shopping/tabs1.jsp">
+		<liferay-util:param name="tabs1" value="categories" />
+	</liferay-util:include>
+
+	<liferay-ui:error exception="<%= AmazonException.class %>" />
+
+	<div class="breadcrumbs">
+		<%= ShoppingUtil.getBreadcrumbs(categoryId, pageContext, renderRequest, renderResponse) %>
+	</div>
+
+	<aui:fieldset>
+		<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" cssClass="lfr-textarea-container" label="add-all-isbn-numbers-separated-by-spaces" name="isbns" type="textarea" wrap="soft" />
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />saveBookItem() {
+		alert('<%= UnicodeLanguageUtil.get(pageContext, "please-be-patient") %>');
+
+		submitForm(this);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/cart.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/cart.jsp
new file mode 100644
index 0000000..85017ed
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/cart.jsp
@@ -0,0 +1,558 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/shopping/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+ShoppingCart cart = ShoppingUtil.getCart(renderRequest);
+
+Map<ShoppingCartItem, Integer> items = cart.getItems();
+
+ShoppingCoupon coupon = cart.getCoupon();
+
+boolean minQuantityMultiple = PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.SHOPPING_CART_MIN_QTY_MULTIPLE);
+%>
+
+<aui:script position="inline">
+	var itemsInStock = true;
+
+	function <portlet:namespace />checkout() {
+		if (<%= ShoppingUtil.meetsMinOrder(shoppingPrefs, items) ? "true" : "false" %>) {
+			if (!itemsInStock) {
+				if (confirm("<%= UnicodeLanguageUtil.get(pageContext, "your-cart-has-items-that-are-out-of-stock") %>")) {
+					document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.CHECKOUT %>";
+					document.<portlet:namespace />fm.<portlet:namespace />redirect.value = "<portlet:actionURL><portlet:param name="struts_action" value="/shopping/checkout" /></portlet:actionURL>";
+					<portlet:namespace />updateCart();
+				}
+			}
+			else {
+				document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.CHECKOUT %>";
+				document.<portlet:namespace />fm.<portlet:namespace />redirect.value = "<portlet:actionURL><portlet:param name="struts_action" value="/shopping/checkout" /></portlet:actionURL>";
+				<portlet:namespace />updateCart();
+			}
+		}
+		else {
+			alert("<%= UnicodeLanguageUtil.format(pageContext, "your-order-cannot-be-processed-because-it-falls-below-the-minimum-required-amount-of-x", currencyFormat.format(shoppingPrefs.getMinOrder()), false) %>");
+		}
+	}
+
+	function <portlet:namespace />emptyCart() {
+		document.<portlet:namespace />fm.<portlet:namespace />itemIds.value = "";
+		document.<portlet:namespace />fm.<portlet:namespace />couponCodes.value = "";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />updateCart() {
+		var itemIds = "";
+		var count = 0;
+		var invalidSKUs = "";
+
+		<%
+		int itemsCount= 0;
+
+		for (ShoppingCartItem cartItem : items.keySet()) {
+			ShoppingItem item = cartItem.getItem();
+
+			ShoppingItemPrice[] itemPrices = (ShoppingItemPrice[])ShoppingItemPriceLocalServiceUtil.getItemPrices(item.getItemId()).toArray(new ShoppingItemPrice[0]);
+
+			int maxQuantity = _getMaxQuantity(itemPrices);
+		%>
+
+			count = document.<portlet:namespace />fm.<portlet:namespace />item_<%= item.getItemId() %>_<%= itemsCount %>_count.value;
+
+			if ((count == "") || isNaN(count) || (count < 0) || ((count > <%= maxQuantity %>) && (<%= maxQuantity %> > 0))) {
+				if (invalidSKUs != "") {
+					invalidSKUs += ", ";
+				}
+
+				invalidSKUs += "<%= item.getSku() %>";
+			}
+
+			for (var i = 0; i < count; i++) {
+				itemIds += "<%= cartItem.getCartItemId() %>,";
+			}
+
+			count = 0;
+
+		<%
+			itemsCount++;
+		}
+		%>
+
+		document.<portlet:namespace />fm.<portlet:namespace />itemIds.value = itemIds;
+
+		if (invalidSKUs == "") {
+			submitForm(document.<portlet:namespace />fm);
+		}
+		else {
+			alert("<%= UnicodeLanguageUtil.get(pageContext, "please-enter-valid-quantities-for-the-following-skus") %>" + invalidSKUs);
+		}
+	}
+</aui:script>
+
+<portlet:actionURL var="cartURL">
+	<portlet:param name="struts_action" value="/shopping/cart" />
+</portlet:actionURL>
+
+<aui:form action="<%= cartURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveCart();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+	<aui:input name="itemIds" type="hidden" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title="cart"
+	/>
+
+	<liferay-ui:error exception="<%= CartMinQuantityException.class %>">
+
+		<%
+		CartMinQuantityException cmqe = (CartMinQuantityException)errorException;
+
+		long[] badItemIds = StringUtil.split(cmqe.getMessage(), 0L);
+		%>
+
+		<liferay-ui:message key="all-quantities-must-be-greater-than-the-minimum-quantity-of-the-item" /><br />
+
+		<c:if test="<%= minQuantityMultiple %>">
+			<br />
+
+			<liferay-ui:message key="all-quantities-must-be-a-multiple-of-the-minimum-quantity-of-the-item" /><br />
+		</c:if>
+
+		<br />
+
+		<liferay-ui:message key="please-reenter-your-quantity-for-the-items-with-the-following-skus" />
+
+		<%
+		for (int i = 0; i < badItemIds.length; i++) {
+			ShoppingItem item = ShoppingItemServiceUtil.getItem(badItemIds[i]);
+		%>
+
+			<strong><%= item.getSku() %></strong><c:if test="<%= i + 1 < badItemIds.length %>">,</c:if>
+
+		<%
+		}
+		%>
+
+	</liferay-ui:error>
+
+	<liferay-ui:error exception="<%= CouponActiveException.class %>" message="the-specified-coupon-is-not-active" />
+	<liferay-ui:error exception="<%= CouponEndDateException.class %>" message="the-specified-coupon-is-no-longer-available" />
+	<liferay-ui:error exception="<%= CouponStartDateException.class %>" message="the-specified-coupon-is-no-yet-available" />
+	<liferay-ui:error exception="<%= NoSuchCouponException.class %>" message="please-enter-a-valid-coupon-code" />
+
+	<%
+	SearchContainer searchContainer = new SearchContainer();
+
+	List<String> headerNames = new ArrayList<String>();
+
+	headerNames.add("sku");
+	headerNames.add("description");
+	headerNames.add("quantity");
+	headerNames.add("price");
+
+	searchContainer.setHeaderNames(headerNames);
+	searchContainer.setEmptyResultsMessage("your-cart-is-empty");
+	searchContainer.setHover(false);
+
+	int total = items.size();
+
+	searchContainer.setTotal(total);
+
+	List resultRows = searchContainer.getResultRows();
+
+	int itemsCount = 0;
+
+	for (Map.Entry<ShoppingCartItem, Integer> entry : items.entrySet()) {
+		ShoppingCartItem cartItem = entry.getKey();
+		Integer count = entry.getValue();
+
+		ShoppingItem item = cartItem.getItem();
+
+		item = item.toEscapedModel();
+
+		String[] fieldsArray = cartItem.getFieldsArray();
+
+		ShoppingItemField[] itemFields = (ShoppingItemField[])ShoppingItemFieldLocalServiceUtil.getItemFields(item.getItemId()).toArray(new ShoppingItemField[0]);
+		ShoppingItemPrice[] itemPrices = (ShoppingItemPrice[])ShoppingItemPriceLocalServiceUtil.getItemPrices(item.getItemId()).toArray(new ShoppingItemPrice[0]);
+
+		if (!SessionErrors.isEmpty(renderRequest)) {
+			count = new Integer(ParamUtil.getInteger(request, "item_" + item.getItemId() + "_" + itemsCount + "_count"));
+		}
+
+		ResultRow row = new ResultRow(item, item.getItemId(), itemsCount);
+
+		PortletURL rowURL = renderResponse.createRenderURL();
+
+		rowURL.setParameter("struts_action", "/shopping/view_item");
+		rowURL.setParameter("itemId", String.valueOf(item.getItemId()));
+
+		// SKU and small image
+
+		StringBundler sb = new StringBundler();
+
+		if (item.isSmallImage()) {
+			sb.append("<br />");
+			sb.append("<img alt=\"");
+			sb.append(item.getSku());
+			sb.append("\" border=\"0\" src=\"");
+
+			if (Validator.isNotNull(item.getSmallImageURL())) {
+				sb.append(item.getSmallImageURL());
+			}
+			else {
+				sb.append(themeDisplay.getPathImage());
+				sb.append("/shopping/item?img_id=");
+				sb.append(item.getSmallImageId());
+				sb.append("&t=");
+				sb.append(WebServerServletTokenUtil.getToken(item.getSmallImageId()));
+			}
+
+			sb.append("\">");
+		}
+		else {
+			sb.append(item.getSku());
+		}
+
+		row.addText(sb.toString(), rowURL);
+
+		// Description
+
+		sb = new StringBundler();
+
+		sb.append(item.getName());
+
+		if (Validator.isNotNull(item.getDescription())) {
+			sb.append("<br />");
+			sb.append(item.getDescription());
+		}
+
+		/*Properties props = new OrderedProperties();
+
+		PropertiesUtil.load(props, item.getProperties());
+
+		Enumeration enu = props.propertyNames();
+
+		while (enu.hasMoreElements()) {
+			String propsKey = (String)enu.nextElement();
+			String propsValue = props.getProperty(propsKey, StringPool.BLANK);
+
+			sb.append("<br />");
+			sb.append(propsKey);
+			sb.append(": ");
+			sb.append(propsValue);
+		}*/
+
+		if (PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.SHOPPING_ITEM_SHOW_AVAILABILITY)) {
+			sb.append("<br /><br />");
+
+			if (ShoppingUtil.isInStock(item, itemFields, fieldsArray, count)) {
+				sb.append(LanguageUtil.get(pageContext, "availability"));
+				sb.append(": ");
+				sb.append("<div class=\"alert alert-success\">");
+				sb.append(LanguageUtil.get(pageContext, "in-stock"));
+				sb.append("</div>");
+			}
+			else {
+				sb.append(LanguageUtil.get(pageContext, "availability"));
+				sb.append(": ");
+				sb.append("<div class=\"alert alert-error\">");
+				sb.append(LanguageUtil.get(pageContext, "out-of-stock"));
+				sb.append("</div>");
+
+				sb.append("<script type=\"text/javascript\">");
+				sb.append("itemsInStock = false;");
+				sb.append("</script>");
+			}
+		}
+
+		if (fieldsArray.length > 0) {
+			sb.append("<br />");
+		}
+
+		for (int j = 0; j < fieldsArray.length; j++) {
+			int pos = fieldsArray[j].indexOf("=");
+
+			String fieldName = fieldsArray[j].substring(0, pos);
+			String fieldValue = fieldsArray[j].substring(pos + 1);
+
+			sb.append("<br />");
+			sb.append(fieldName);
+			sb.append(": ");
+			sb.append(fieldValue);
+		}
+
+		if (itemPrices.length > 0) {
+			sb.append("<br />");
+		}
+
+		for (int j = 0; j < itemPrices.length; j++) {
+			ShoppingItemPrice itemPrice = itemPrices[j];
+
+			if (itemPrice.getStatus() == ShoppingItemPriceConstants.STATUS_INACTIVE) {
+				continue;
+			}
+
+			sb.append("<br />");
+
+			if ((itemPrice.getMinQuantity() == 0) && (itemPrice.getMaxQuantity() == 0)) {
+				sb.append(LanguageUtil.get(pageContext, "price"));
+				sb.append(": ");
+			}
+			else if (itemPrice.getMaxQuantity() != 0) {
+				sb.append(LanguageUtil.format(pageContext, "price-for-x-to-x-items", new Object[] {"<strong>" + new Integer(itemPrice.getMinQuantity()) + "</strong>", "<strong>" + new Integer(itemPrice.getMaxQuantity()) + "</strong>"}, false));
+			}
+			else if (itemPrice.getMaxQuantity() == 0) {
+				sb.append(LanguageUtil.format(pageContext, "price-for-x-items-and-above", "<strong>" + new Integer(itemPrice.getMinQuantity()) + "</strong>", false));
+			}
+
+			if (itemPrice.getDiscount() <= 0) {
+				sb.append(currencyFormat.format(itemPrice.getPrice()));
+			}
+			else {
+				sb.append("<strike>");
+				sb.append(currencyFormat.format(itemPrice.getPrice()));
+				sb.append("</strike> ");
+				sb.append("<div class=\"alert alert-success\">");
+				sb.append(currencyFormat.format(ShoppingUtil.calculateActualPrice(itemPrice)));
+				sb.append("</div> / ");
+				sb.append(LanguageUtil.get(pageContext, "you-save"));
+				sb.append(": ");
+				sb.append("<div class=\"alert alert-error\">");
+				sb.append(currencyFormat.format(ShoppingUtil.calculateDiscountPrice(itemPrice)));
+				sb.append(" (");
+				sb.append(percentFormat.format(itemPrice.getDiscount()));
+				sb.append(StringPool.CLOSE_PARENTHESIS);
+				sb.append("</div>");
+			}
+		}
+
+		row.addText(sb.toString(), rowURL);
+
+		// Quantity
+
+		sb.setIndex(0);
+
+		int maxQuantity = _getMaxQuantity(itemPrices);
+
+		if (minQuantityMultiple && (item.getMinQuantity() > 1) && (maxQuantity != 0)) {
+			sb.append("<select name=\"");
+			sb.append(renderResponse.getNamespace());
+			sb.append("item_");
+			sb.append(item.getItemId());
+			sb.append("_");
+			sb.append(itemsCount);
+			sb.append("_count\">");
+
+			sb.append("<option value=\"0\">0</option>");
+
+			for (int j = 1; j <= (maxQuantity / item.getMinQuantity()); j++) {
+				int curQuantity = item.getMinQuantity() * j;
+
+				sb.append("<option ");
+
+				if (curQuantity == count.intValue()) {
+					sb.append("selected ");
+				}
+
+				sb.append("value=\"");
+				sb.append(curQuantity);
+				sb.append("\">");
+				sb.append(curQuantity);
+				sb.append("</option>");
+			}
+
+			sb.append("</select>");
+		}
+		else {
+			sb.append("<input name=\"");
+			sb.append(renderResponse.getNamespace());
+			sb.append("item_");
+			sb.append(item.getItemId());
+			sb.append("_");
+			sb.append(itemsCount);
+			sb.append("_count\" size=\"2\" type=\"text\" value=\"");
+			sb.append(count);
+			sb.append("\">");
+		}
+
+		row.addText(sb.toString());
+
+		// Price
+
+		row.addText(currencyFormat.format(ShoppingUtil.calculateActualPrice(item, count.intValue()) / count.intValue()), rowURL);
+
+		// Add result row
+
+		resultRows.add(row);
+
+		itemsCount++;
+	}
+	%>
+
+	<liferay-ui:search-iterator paginate="<%= false %>" searchContainer="<%= searchContainer %>" />
+
+	<aui:fieldset>
+
+		<%
+		double subtotal = ShoppingUtil.calculateSubtotal(items);
+		double actualSubtotal = ShoppingUtil.calculateActualSubtotal(items);
+		double discountSubtotal = ShoppingUtil.calculateDiscountSubtotal(items);
+		%>
+
+		<aui:field-wrapper label="subtotal">
+			<c:choose>
+				<c:when test="<%= subtotal == actualSubtotal %>">
+					<liferay-ui:input-resource url="<%= currencyFormat.format(subtotal) %>" />
+				</c:when>
+				<c:otherwise>
+					<div class="alert alert-success">
+						<strike><%= currencyFormat.format(subtotal) %></strike> <%= currencyFormat.format(actualSubtotal) %>
+					</div>
+				</c:otherwise>
+			</c:choose>
+		</aui:field-wrapper>
+
+		<c:if test="<%= subtotal != actualSubtotal %>">
+			<aui:field-wrapper label="you-save">
+				<div class="alert alert-error">
+					<%= currencyFormat.format(discountSubtotal) %> (<%= percentFormat.format(ShoppingUtil.calculateDiscountPercent(items)) %>)
+				</div>
+			</aui:field-wrapper>
+		</c:if>
+
+		<c:choose>
+			<c:when test="<%= !shoppingPrefs.useAlternativeShipping() %>">
+				<aui:field-wrapper label="shipping">
+					<liferay-ui:input-resource url="<%= currencyFormat.format(ShoppingUtil.calculateShipping(items)) %>" />
+				</aui:field-wrapper>
+			</c:when>
+			<c:otherwise>
+				<aui:select label="shipping" name="alternativeShipping">
+
+					<%
+					String[][] alternativeShipping = shoppingPrefs.getAlternativeShipping();
+
+					for (int i = 0; i < 10; i++) {
+						String altShippingName = alternativeShipping[0][i];
+						String altShippingDelta = alternativeShipping[1][i];
+
+						if (Validator.isNotNull(altShippingName) && Validator.isNotNull(altShippingDelta)) {
+					%>
+
+							<aui:option label='<%= LanguageUtil.get(pageContext, altShippingName) + "(" + currencyFormat.format(ShoppingUtil.calculateAlternativeShipping(items, i)) + ")" %>' selected="<%= i == cart.getAltShipping() %>" value="<%= i %>" />
+
+					<%
+						}
+					}
+					%>
+
+				</aui:select>
+			</c:otherwise>
+		</c:choose>
+
+		<%
+		double insurance = ShoppingUtil.calculateInsurance(items);
+		%>
+
+		<c:if test="<%= insurance > 0 %>">
+			<aui:select label="insurance" name="insure">
+				<aui:option label="none" selected="<%= !cart.isInsure() %>" value="0" />
+				<aui:option label="<%= currencyFormat.format(insurance) %>" selected="<%= cart.isInsure() %>" value="1" />
+			</aui:select>
+		</c:if>
+
+		<aui:input label="coupon-code" name="couponCodes" size="30" style="text-transform: uppercase;" type="text" value="<%= cart.getCouponCodes() %>" />
+
+		<c:if test="<%= coupon != null %>">
+
+			<portlet:renderURL var="viewCouponURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+				<portlet:param name="struts_action" value="/shopping/view_coupon" />
+				<portlet:param name="couponId" value="<%= String.valueOf(coupon.getCouponId()) %>" />
+			</portlet:renderURL>
+
+			<%
+			String taglibOpenCouponWindow = "var viewCouponWindow = window.open('" + viewCouponURL + "', 'viewCoupon', 'directories=no,height=200,location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no,width=280'); void(''); viewCouponWindow.focus();";
+			%>
+
+			<aui:a href='<%= "javascript:" + taglibOpenCouponWindow %>' label='<%= "(" + LanguageUtil.get(pageContext, "description") + ")" %>' style="font-size: xx-small;" />
+
+			<aui:field-wrapper label="coupon-discount">
+				<div class="alert alert-error">
+					<%= currencyFormat.format(ShoppingUtil.calculateCouponDiscount(items, coupon)) %>
+				</div>
+			</aui:field-wrapper>
+		</c:if>
+	</aui:fieldset>
+
+	<%
+	String[] ccTypes = shoppingPrefs.getCcTypes();
+
+	if (shoppingPrefs.usePayPal()) {
+	%>
+
+		<img alt="paypal" src="<%= themeDisplay.getPathThemeImages() %>/shopping/cc_paypal.png" />
+
+		<br /><br />
+
+	<%
+	}
+	else if (!shoppingPrefs.usePayPal() && (ccTypes.length > 0)) {
+		for (int i = 0; i < ccTypes.length; i++) {
+	%>
+
+			<img alt="<%= ccTypes[i] %>" src="<%= themeDisplay.getPathThemeImages() %>/shopping/cc_<%= ccTypes[i] %>.png" />
+
+	<%
+		}
+	%>
+
+		<br /><br />
+
+	<%
+	}
+	%>
+
+	<aui:button-row>
+		<aui:button onClick='<%= renderResponse.getNamespace() + "updateCart();" %>' value="update-cart" />
+
+		<aui:button onClick='<%= renderResponse.getNamespace() + "emptyCart();" %>' value="empty-cart" />
+
+		<aui:button onClick='<%= renderResponse.getNamespace() + "checkout();" %>' value="checkout" />
+	</aui:button-row>
+</aui:form>
+
+<%!
+private static int _getMaxQuantity(ShoppingItemPrice[] itemPrices) {
+	int maxQuantity = 0;
+
+	for (ShoppingItemPrice itemPrice : itemPrices) {
+		if (itemPrice.getMaxQuantity() == 0) {
+			return 0;
+		}
+
+		if (maxQuantity < itemPrice.getMaxQuantity()) {
+			maxQuantity = itemPrice.getMaxQuantity();
+		}
+	}
+
+	return maxQuantity;
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/categories.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/categories.jspf
new file mode 100644
index 0000000..153f7e5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/categories.jspf
@@ -0,0 +1,362 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+ShoppingCategory category = (ShoppingCategory)request.getAttribute(WebKeys.SHOPPING_CATEGORY);
+
+long categoryId = BeanParamUtil.getLong(category, request, "categoryId", ShoppingCategoryConstants.DEFAULT_PARENT_CATEGORY_ID);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/shopping/view");
+portletURL.setParameter("tabs1", tabs1);
+portletURL.setParameter("categoryId", String.valueOf(categoryId));
+%>
+
+<liferay-portlet:renderURL varImpl="searchURL">
+	<portlet:param name="struts_action" value="/shopping/search" />
+</liferay-portlet:renderURL>
+
+<liferay-ui:panel-container extended="<%= true %>" persistState="<%= true %>">
+	<aui:form action="<%= searchURL %>" method="get" name="fm1">
+		<liferay-portlet:renderURLParams varImpl="searchURL" />
+		<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+		<aui:input name="breadcrumbsCategoryId" type="hidden" value="<%= categoryId %>" />
+		<aui:input name="searchCategoryIds" type="hidden" value="<%= categoryId %>" />
+
+		<div class="breadcrumbs">
+			<%= ShoppingUtil.getBreadcrumbs(category, pageContext, renderRequest, renderResponse) %>
+		</div>
+
+		<%
+		List<String> headerNames = new ArrayList<String>();
+
+		headerNames.add("category");
+		headerNames.add("num-of-categories");
+		headerNames.add("num-of-items");
+		headerNames.add(StringPool.BLANK);
+
+		SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, "cur1", SearchContainer.DEFAULT_DELTA, portletURL, headerNames, null);
+
+		int total = ShoppingCategoryServiceUtil.getCategoriesCount(scopeGroupId, categoryId);
+
+		searchContainer.setTotal(total);
+
+		List results = ShoppingCategoryServiceUtil.getCategories(scopeGroupId, categoryId, searchContainer.getStart(), searchContainer.getEnd());
+
+		searchContainer.setResults(results);
+
+		List resultRows = searchContainer.getResultRows();
+
+		for (int i = 0; i < results.size(); i++) {
+			ShoppingCategory curCategory = (ShoppingCategory)results.get(i);
+
+			curCategory = curCategory.toEscapedModel();
+
+			ResultRow row = new ResultRow(curCategory, curCategory.getCategoryId(), i);
+
+			PortletURL rowURL = renderResponse.createRenderURL();
+
+			rowURL.setParameter("struts_action", "/shopping/view");
+			rowURL.setParameter("categoryId", String.valueOf(curCategory.getCategoryId()));
+
+			// Name and description
+
+			if (Validator.isNotNull(curCategory.getDescription())) {
+				row.addText(curCategory.getName().concat("<br />").concat(curCategory.getDescription()), rowURL);
+			}
+			else {
+				row.addText(curCategory.getName(), rowURL);
+			}
+
+			// Statistics
+
+			List subcategoryIds = new ArrayList();
+
+			subcategoryIds.add(new Long(curCategory.getCategoryId()));
+
+			ShoppingCategoryServiceUtil.getSubcategoryIds(subcategoryIds, scopeGroupId, curCategory.getCategoryId());
+
+			int categoriesCount = subcategoryIds.size() - 1;
+			int itemsCount = ShoppingItemServiceUtil.getCategoriesItemsCount(scopeGroupId, subcategoryIds);
+
+			row.addText(String.valueOf(categoriesCount), rowURL);
+			row.addText(String.valueOf(itemsCount), rowURL);
+
+			// Action
+
+			row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/shopping/category_action.jsp");
+
+			// Add result row
+
+			resultRows.add(row);
+		}
+
+		boolean showAddCategoryButton = ShoppingCategoryPermission.contains(permissionChecker, scopeGroupId, categoryId, ActionKeys.ADD_CATEGORY);
+		boolean showPermissionsButton = ShoppingCategoryPermission.contains(permissionChecker, scopeGroupId, categoryId, ActionKeys.PERMISSIONS);
+		boolean showSearch = !results.isEmpty();
+		%>
+
+		<liferay-ui:panel-container extended="<%= true %>" id="shoppingCategoriesPanelContainer" persistState="<%= true %>">
+			<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="shoppingCategoriesPanel" persistState="<%= true %>" title="categories">
+				<c:if test="<%= showAddCategoryButton || showPermissionsButton || showSearch %>">
+					<aui:fieldset>
+						<c:if test="<%= showSearch %>">
+							<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" id="keywords1" label="search" name="keywords" size="30" type="text" />
+						</c:if>
+					</aui:fieldset>
+
+					<aui:button-row>
+						<c:if test="<%= showSearch %>">
+							<aui:button type="submit" value="search-categories" />
+						</c:if>
+
+						<c:if test="<%= showAddCategoryButton %>">
+							<portlet:renderURL var="addCategoriesURL">
+								<portlet:param name="struts_action" value="/shopping/edit_category" />
+								<portlet:param name="redirect" value="<%= currentURL %>" />
+								<portlet:param name="parentCategoryId" value="<%= String.valueOf(categoryId) %>" />
+							</portlet:renderURL>
+
+							<aui:button href="<%= addCategoriesURL %>" value='<%= (category == null) ? "add-category" : "add-subcategory" %>' />
+						</c:if>
+
+						<c:if test="<%= showPermissionsButton %>">
+
+							<%
+							String modelResource = "com.liferay.portlet.shopping";
+							String modelResourceDescription = themeDisplay.getScopeGroupName();
+							String resourcePrimKey = String.valueOf(scopeGroupId);
+
+							if (category != null) {
+								modelResource = ShoppingCategory.class.getName();
+								modelResourceDescription = category.getName();
+								resourcePrimKey = String.valueOf(category.getCategoryId());
+							}
+							%>
+
+							<liferay-security:permissionsURL
+								modelResource="<%= modelResource %>"
+								modelResourceDescription="<%= HtmlUtil.escape(modelResourceDescription) %>"
+								resourcePrimKey="<%= resourcePrimKey %>"
+								var="permissionsURL"
+								windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+							/>
+
+							<aui:button href="<%= permissionsURL %>" useDialog="<%= true %>" value="permissions" />
+						</c:if>
+					</aui:button-row>
+				</c:if>
+
+				<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+			</liferay-ui:panel>
+		</liferay-ui:panel-container>
+	</aui:form>
+
+	<aui:form action="<%= searchURL %>" method="get" name="fm2">
+		<liferay-portlet:renderURLParams varImpl="searchURL" />
+		<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+		<aui:input name="breadcrumbsCategoryId" type="hidden" value="<%= categoryId %>" />
+		<aui:input name="searchCategoryId" type="hidden" value="<%= categoryId %>" />
+
+		<%
+		String orderByCol = ParamUtil.getString(request, "orderByCol");
+		String orderByType = ParamUtil.getString(request, "orderByType");
+
+		if (Validator.isNotNull(orderByCol) && Validator.isNotNull(orderByType)) {
+			portalPreferences.setValue(PortletKeys.SHOPPING, "items-order-by-col", orderByCol);
+			portalPreferences.setValue(PortletKeys.SHOPPING, "items-order-by-type", orderByType);
+		}
+		else {
+			orderByCol = portalPreferences.getValue(PortletKeys.SHOPPING, "items-order-by-col", "sku");
+			orderByType = portalPreferences.getValue(PortletKeys.SHOPPING, "items-order-by-type", "asc");
+		}
+
+		OrderByComparator orderByComparator = ShoppingUtil.getItemOrderByComparator(orderByCol, orderByType);
+
+		List<String> headerNames = new ArrayList<String>();
+
+		headerNames.add("sku");
+		headerNames.add("description");
+		headerNames.add("min-qty");
+		headerNames.add("price");
+		headerNames.add(StringPool.BLANK);
+
+		Map orderableHeaders = new HashMap();
+
+		orderableHeaders.put("sku", "sku");
+		orderableHeaders.put("description", "name");
+		orderableHeaders.put("min-qty", "min-qty");
+		orderableHeaders.put("price", "price");
+
+		SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, "cur2", SearchContainer.DEFAULT_DELTA, portletURL, headerNames, null);
+
+		searchContainer.setOrderableHeaders(orderableHeaders);
+		searchContainer.setOrderByCol(orderByCol);
+		searchContainer.setOrderByType(orderByType);
+
+		int total = ShoppingItemServiceUtil.getItemsCount(scopeGroupId, categoryId);
+
+		searchContainer.setTotal(total);
+
+		List results = ShoppingItemServiceUtil.getItems(scopeGroupId, categoryId, searchContainer.getStart(), searchContainer.getEnd(), orderByComparator);
+
+		searchContainer.setResults(results);
+
+		List resultRows = searchContainer.getResultRows();
+
+		for (int i = 0; i < results.size(); i++) {
+			ShoppingItem item = (ShoppingItem)results.get(i);
+
+			item = item.toEscapedModel();
+
+			ResultRow row = new ResultRow(item, item.getItemId(), i);
+
+			PortletURL rowURL = renderResponse.createRenderURL();
+
+			rowURL.setParameter("struts_action", "/shopping/view_item");
+			rowURL.setParameter("redirect", currentURL);
+			rowURL.setParameter("itemId", String.valueOf(item.getItemId()));
+
+			// SKU and small image
+
+			StringBundler sb = new StringBundler();
+
+			if (item.isSmallImage()) {
+				sb.append("<br />");
+				sb.append("<img alt=\"");
+				sb.append(item.getSku());
+				sb.append("\" border=\"0\" src=\"");
+
+				if (Validator.isNotNull(item.getSmallImageURL())) {
+					sb.append(item.getSmallImageURL());
+				}
+				else {
+					sb.append(themeDisplay.getPathImage());
+					sb.append("/shopping/item?img_id=");
+					sb.append(item.getSmallImageId());
+					sb.append("&t=");
+					sb.append(WebServerServletTokenUtil.getToken(item.getSmallImageId()));
+				}
+
+				sb.append("\">");
+			}
+			else {
+				sb.append(item.getSku());
+			}
+
+			row.addText(sb.toString(), rowURL);
+
+			// Description
+
+			sb = new StringBundler();
+
+			sb.append(item.getName());
+
+			if (Validator.isNotNull(item.getDescription())) {
+				sb.append("<br />");
+				sb.append(item.getDescription());
+			}
+
+			Properties props = new OrderedProperties();
+
+			PropertiesUtil.load(props, item.getProperties());
+
+			Enumeration enu = props.propertyNames();
+
+			while (enu.hasMoreElements()) {
+				String propsKey = (String)enu.nextElement();
+				String propsValue = props.getProperty(propsKey, StringPool.BLANK);
+
+				sb.append("<br />");
+				sb.append(propsKey);
+				sb.append(": ");
+				sb.append(propsValue);
+			}
+
+			row.addText(sb.toString(), rowURL);
+
+			// Minimum quantity
+
+			row.addText(String.valueOf(item.getMinQuantity()), rowURL);
+
+			// Price
+
+			if (item.getDiscount() <= 0) {
+				row.addText(currencyFormat.format(item.getPrice()), rowURL);
+			}
+			else {
+				row.addText(
+					"<div class=\"alert alert-success\">" +
+						currencyFormat.format(ShoppingUtil.calculateActualPrice(item)) +
+							"</div>",
+					rowURL);
+			}
+
+			// Action
+
+			row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/shopping/item_action.jsp");
+
+			// Add result row
+
+			resultRows.add(row);
+		}
+
+		boolean showAddItemButton = ShoppingCategoryPermission.contains(permissionChecker, scopeGroupId, categoryId, ActionKeys.ADD_ITEM);
+		boolean showSearch = !results.isEmpty();
+		%>
+
+		<liferay-ui:panel-container extended="<%= true %>" id="shoppingItemsPanelContainer" persistState="<%= true %>">
+			<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="shoppingItemsPanel" persistState="<%= true %>" title="items">
+				<c:if test="<%= showAddItemButton || showSearch %>">
+					<aui:fieldset>
+						<c:if test="<%= showSearch %>">
+							<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" id="keywords2" label="search" name="keywords" size="30" type="text" />
+						</c:if>
+					</aui:fieldset>
+
+					<aui:button-row>
+						<c:if test="<%= showSearch %>">
+							<aui:button type="submit" value="search-this-category" />
+						</c:if>
+
+						<c:if test="<%= showAddItemButton %>">
+							<portlet:renderURL var="addItemURL">
+								<portlet:param name="struts_action" value="/shopping/edit_item" />
+								<portlet:param name="redirect" value="<%= currentURL %>" />
+								<portlet:param name="categoryId" value="<%= String.valueOf(categoryId) %>" />
+							</portlet:renderURL>
+
+							<aui:button href="<%= addItemURL %>" value="add-item" />
+
+							<c:if test="<%= AmazonRankingsUtil.isEnabled() %>">
+								<portlet:renderURL var="addBooksURL">
+									<portlet:param name="struts_action" value="/shopping/add_book_items" />
+									<portlet:param name="redirect" value="<%= currentURL %>" />
+									<portlet:param name="categoryId" value="<%= String.valueOf(categoryId) %>" />
+								</portlet:renderURL>
+
+								<aui:button href="<%= addBooksURL %>" value="add-books" />
+							</c:if>
+						</c:if>
+					</aui:button-row>
+				</c:if>
+
+				<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+			</liferay-ui:panel>
+		</liferay-ui:panel-container>
+	</aui:form>
+</liferay-ui:panel-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/category_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/category_action.jsp
new file mode 100644
index 0000000..66b17f2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/category_action.jsp
@@ -0,0 +1,66 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/shopping/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+ShoppingCategory category = (ShoppingCategory)row.getObject();
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= ShoppingCategoryPermission.contains(permissionChecker, category, ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/shopping/edit_category" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="categoryId" value="<%= String.valueOf(category.getCategoryId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= ShoppingCategoryPermission.contains(permissionChecker, category, ActionKeys.PERMISSIONS) %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= ShoppingCategory.class.getName() %>"
+			modelResourceDescription="<%= category.getName() %>"
+			resourcePrimKey="<%= String.valueOf(category.getCategoryId()) %>"
+			var="permissionsURL"
+			windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			method="get"
+			url="<%= permissionsURL %>"
+			useDialog="<%= true %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= ShoppingCategoryPermission.contains(permissionChecker, category, ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/shopping/edit_category" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="categoryId" value="<%= String.valueOf(category.getCategoryId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete url="<%= deleteURL %>" />
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/checkout_first.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/checkout_first.jsp
new file mode 100644
index 0000000..5e715ed
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/checkout_first.jsp
@@ -0,0 +1,367 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/shopping/init.jsp" %>
+
+<%
+ShoppingOrder order = (ShoppingOrder)request.getAttribute(WebKeys.SHOPPING_ORDER);
+
+String billingState = BeanParamUtil.getString(order, request, "billingState");
+String billingStateSel = ParamUtil.getString(request, "billingStateSel");
+
+if (StateUtil.isStateId(billingState)) {
+	billingStateSel = billingState;
+	billingState = StringPool.BLANK;
+}
+
+String shippingState = BeanParamUtil.getString(order, request, "shippingState");
+String shippingStateSel = ParamUtil.getString(request, "shippingStateSel");
+
+if (StateUtil.isStateId(shippingState)) {
+	shippingStateSel = shippingState;
+	shippingState = StringPool.BLANK;
+}
+
+String ccType = ParamUtil.getString(request, "ccType");
+String ccNumber = ParamUtil.getString(request, "ccNumber");
+
+Calendar cal = CalendarFactoryUtil.getCalendar();
+
+int ccExpMonth = ParamUtil.getInteger(request, "ccExpMonth", cal.get(Calendar.MONTH));
+int ccExpYear = ParamUtil.getInteger(request, "ccExpYear", cal.get(Calendar.YEAR));
+
+if (request.getParameter("ccExpMonth") == null) {
+	if (ccExpMonth == Calendar.DECEMBER) {
+		ccExpMonth = Calendar.JANUARY;
+		ccExpYear++;
+	}
+	else {
+		ccExpMonth++;
+	}
+}
+
+String ccVerNumber = ParamUtil.getString(request, "ccVerNumber");
+
+List addresses = AddressServiceUtil.getAddresses(Contact.class.getName(), contact.getContactId());
+%>
+
+<portlet:actionURL var="checkoutURL">
+	<portlet:param name="struts_action" value="/shopping/checkout" />
+</portlet:actionURL>
+
+<aui:form action="<%= checkoutURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+
+	<liferay-util:include page="/html/portlet/shopping/tabs1.jsp">
+		<liferay-util:param name="tabs1" value="cart" />
+	</liferay-util:include>
+
+	<aui:model-context bean="<%= order %>" model="<%= ShoppingOrder.class %>" />
+
+	<liferay-ui:panel-container extended="<%= true %>" id="shoppingCheckoutPanelContainer" persistState="<%= true %>">
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="shoppingCheckoutBillingAddressPanel" persistState="<%= true %>" title="billing-address">
+			<liferay-ui:error exception="<%= BillingCityException.class %>" message="please-enter-a-valid-city" />
+			<liferay-ui:error exception="<%= BillingCountryException.class %>" message="please-enter-a-valid-country" />
+			<liferay-ui:error exception="<%= BillingEmailAddressException.class %>" message="please-enter-a-valid-email-address" />
+			<liferay-ui:error exception="<%= BillingFirstNameException.class %>" message="please-enter-a-valid-first-name" />
+			<liferay-ui:error exception="<%= BillingLastNameException.class %>" message="please-enter-a-valid-last-name" />
+			<liferay-ui:error exception="<%= BillingPhoneException.class %>" message="please-enter-a-valid-phone" />
+			<liferay-ui:error exception="<%= BillingStateException.class %>" message="please-enter-a-valid-state" />
+			<liferay-ui:error exception="<%= BillingStreetException.class %>" message="please-enter-a-valid-street" />
+			<liferay-ui:error exception="<%= BillingZipException.class %>" message="please-enter-a-valid-postal-code" />
+
+			<aui:fieldset column="<%= true %>">
+				<c:if test="<%= !addresses.isEmpty() %>">
+
+					<%
+					String taglibUpdateBillingAddress = renderResponse.getNamespace() + "updateAddress(this[this.selectedIndex].value, 'billing');";
+					%>
+
+					<aui:select label="" name="addressBilling" onChange="<%= taglibUpdateBillingAddress %>">
+						<aui:option label='<%= "--" + LanguageUtil.get(pageContext,"my-addresses") + "--" %>' />
+
+						<%
+						for (int i = 0; addresses != null && i < addresses.size(); i++) {
+							Address address = (Address)addresses.get(i);
+						%>
+
+							<aui:option label="<%= address.getStreet1() %>" value="<%= address.getAddressId() %>" />
+
+						<%
+						}
+						%>
+
+					</aui:select>
+				</c:if>
+
+				<aui:col width="<%= 50 %>">
+					<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" label="first-name" name="billingFirstName" />
+
+					<aui:input label="last-name" name="billingLastName" />
+
+					<aui:input label="email-address" name="billingEmailAddress" />
+
+					<aui:input label="company" name="billingCompany" />
+
+					<aui:input label="street" name="billingStreet" />
+
+					<aui:input label="city" name="billingCity" />
+				</aui:col>
+
+				<aui:col width="<%= 50 %>">
+					<aui:select label="state" name="billingStateSel">
+						<aui:option label="outside-us" />
+
+						<%
+						for (int i = 0; i < StateUtil.STATES.length; i++) {
+						%>
+
+							<aui:option label="<%= StateUtil.STATES[i].getName() %>" selected="<%= billingStateSel.equals(StateUtil.STATES[i].getId()) %>" value="<%= StateUtil.STATES[i].getId() %>" />
+
+						<%
+						}
+						%>
+
+					</aui:select>
+
+					<aui:input bean="<%= null %>" label="other-state" name="billingState" value="<%= billingState %>" />
+
+					<aui:input label="postal-code" name="billingZip" />
+
+					<aui:input label="country" name="billingCountry" />
+
+					<aui:input label="phone" name="billingPhone" />
+				</aui:col>
+			</aui:fieldset>
+		</liferay-ui:panel>
+
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="shoppingCheckoutShippingAddressPanel" persistState="<%= true %>" title="shipping-address">
+			<liferay-ui:error exception="<%= ShippingCityException.class %>" message="please-enter-a-valid-city" />
+			<liferay-ui:error exception="<%= ShippingCountryException.class %>" message="please-enter-a-valid-country" />
+			<liferay-ui:error exception="<%= ShippingEmailAddressException.class %>" message="please-enter-a-valid-email-address" />
+			<liferay-ui:error exception="<%= ShippingFirstNameException.class %>" message="please-enter-a-valid-first-name" />
+			<liferay-ui:error exception="<%= ShippingLastNameException.class %>" message="please-enter-a-valid-last-name" />
+			<liferay-ui:error exception="<%= ShippingPhoneException.class %>" message="please-enter-a-valid-phone" />
+			<liferay-ui:error exception="<%= ShippingStateException.class %>" message="please-enter-a-valid-state" />
+			<liferay-ui:error exception="<%= ShippingStreetException.class %>" message="please-enter-a-valid-street" />
+			<liferay-ui:error exception="<%= ShippingZipException.class %>" message="please-enter-a-valid-postal-code" />
+
+			<aui:fieldset column="<%= true %>">
+				<c:if test="<%= !addresses.isEmpty() %>">
+
+					<%
+					String taglibUpdateShippingAddress = renderResponse.getNamespace() + "updateAddress(this[this.selectedIndex].value, 'shipping');";
+					%>
+
+					<aui:select label="" name="addressShipping" onChange="<%= taglibUpdateShippingAddress %>">
+						<aui:option label='<%= "--" + LanguageUtil.get(pageContext,"my-addresses") + "--" %>' />
+
+						<%
+						for (int i = 0; addresses != null && i < addresses.size(); i++) {
+							Address address = (Address)addresses.get(i);
+						%>
+
+							<aui:option label="<%= address.getStreet1() %>" value="<%= address.getAddressId() %>" />
+
+						<%
+						}
+						%>
+
+					</aui:select>
+				</c:if>
+
+				<aui:col width="<%= 50 %>">
+					<aui:input label="first-name" name="shippingFirstName" />
+
+					<aui:input label="last-name" name="shippingLastName" />
+
+					<aui:input label="email-address" name="shippingEmailAddress" />
+
+					<aui:input label="company" name="shippingCompany" />
+
+					<aui:input label="street" name="shippingStreet" />
+
+					<aui:input label="city" name="shippingCity" />
+
+					<aui:input label="same-as-billing" name="shipToBilling" />
+				</aui:col>
+
+				<aui:col width="<%= 50 %>">
+					<aui:select label="state" name="shippingStateSel">
+						<aui:option label="outside-us" />
+
+						<%
+						for (int i = 0; i < StateUtil.STATES.length; i++) {
+						%>
+
+							<aui:option label="<%= StateUtil.STATES[i].getName() %>" selected="<%= shippingStateSel.equals(StateUtil.STATES[i].getId()) %>" value="<%= StateUtil.STATES[i].getId() %>" />
+
+						<%
+						}
+						%>
+
+					</aui:select>
+
+					<aui:input bean="<%= null %>" label="other-state" name="shippingState" value="<%= shippingState %>" />
+
+					<aui:input label="postal-code" name="shippingZip" />
+
+					<aui:input label="country" name="shippingCountry" />
+
+					<aui:input label="phone" name="shippingPhone" />
+				</aui:col>
+			</aui:fieldset>
+		</liferay-ui:panel>
+
+		<%
+		String[] ccTypes = shoppingPrefs.getCcTypes();
+		%>
+
+		<c:if test="<%= !shoppingPrefs.usePayPal() && (ccTypes.length > 0) %>">
+			<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="shoppingCheckoutCreditCardPanel" persistState="<%= true %>" title="credit-card">
+				<liferay-ui:error exception="<%= CCExpirationException.class %>" message="please-enter-a-valid-credit-card-expiration-date" />
+				<liferay-ui:error exception="<%= CCNameException.class %>" message="please-enter-the-full-name-exactly-as-it-is-appears-on-your-credit-card" />
+				<liferay-ui:error exception="<%= CCNumberException.class %>" message="please-enter-a-valid-credit-card-number" />
+				<liferay-ui:error exception="<%= CCTypeException.class %>" message="please-enter-a-valid-credit-card-type" />
+
+				<aui:fieldset column="<%= true %>">
+
+					<%
+					for (int i = 0; i < ccTypes.length; i++) {
+					%>
+
+						<img alt="<%= ccTypes[i] %>" src="<%= themeDisplay.getPathThemeImages() %>/shopping/cc_<%= ccTypes[i] %>.png" />
+
+					<%
+					}
+					%>
+
+					<aui:input label="full-name" name="ccName" />
+
+					<aui:select label="type" name="ccType" showEmptyOption="<%= true %>">
+
+						<%
+						for (int i = 0; i < ccTypes.length; i++) {
+						%>
+
+							<aui:option label='<%= "cc_" + ccTypes[i] %>' selected="<%= ccTypes[i].equals(ccType) %>" value="<%= ccTypes[i] %>" />
+
+						<%
+						}
+						%>
+
+					</aui:select>
+
+					<aui:input bean="<%= null %>" label="number" name="ccNumber" />
+
+					<aui:field-wrapper label="expiration-date">
+						<aui:col width="<%= 50 %>">
+							<aui:select label="" name="ccExpMonth">
+
+								<%
+								String[] months = CalendarUtil.getMonths(locale);
+
+								for (int i = 0; i < months.length; i++) {
+								%>
+
+									<aui:option label="<%= months[i] %>" selected="<%= (i == ccExpMonth) %>" value="<%= i %>" />
+
+								<%
+								}
+								%>
+
+							</aui:select>
+						</aui:col>
+
+						<aui:col width="<%= 50 %>">
+							<aui:select label="" name="ccExpYear">
+
+								<%
+								int currentYear = cal.get(Calendar.YEAR);
+
+								for (int i = currentYear; i <= currentYear + 5; i++) {
+								%>
+
+									<aui:option label="<%= i %>" selected="<%= i == ccExpYear %>" />
+
+								<%
+								}
+								%>
+
+							</aui:select>
+						</aui:col>
+					</aui:field-wrapper>
+
+					<img alt="" src="<%= themeDisplay.getPathThemeImages() %>/shopping/cc_ver_number.png" />
+
+					<aui:input bean="<%= null %>" label="verification-number" name="ccVerNumber" />
+				</aui:fieldset>
+			</liferay-ui:panel>
+		</c:if>
+
+		<c:if test="<%= PropsValues.SHOPPING_ORDER_COMMENTS_ENABLED %>">
+			<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="shoppingCheckoutCommentsPanel" persistState="<%= true %>" title="comments">
+				<aui:fieldset>
+					<aui:input label="" name="comments" />
+				</aui:fieldset>
+			</liferay-ui:panel>
+		</c:if>
+	</liferay-ui:panel-container>
+
+	<aui:button-row>
+		<aui:button type="submit" value="continue" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />updateAddress(addressId, type) {
+
+		<%
+		for (int i = 0; addresses != null && i < addresses.size(); i++) {
+			Address address = (Address)addresses.get(i);
+
+			Region region = address.getRegion();
+			Country country = address.getCountry();
+		%>
+
+			if ("<%= address.getAddressId() %>" == addressId) {
+				//document.getElementById("<portlet:namespace />" + type + "FirstName").value = "<%= user.getFirstName() %>";
+				//document.getElementById("<portlet:namespace />" + type + "LastName").value = "<%= user.getLastName() %>";
+				//document.getElementById("<portlet:namespace />" + type + "EmailAddress").value = "<%= user.getEmailAddress() %>";
+				document.getElementById("<portlet:namespace />" + type + "Street").value = "<%= address.getStreet1() %>";
+				document.getElementById("<portlet:namespace />" + type + "City").value = "<%= address.getCity() %>";
+
+				var stateSel = document.getElementById("<portlet:namespace />" + type + "StateSel");
+				var stateSelValue = "<%= region.getRegionCode() %>";
+
+				for (var i = 0; i < stateSel.length; i++) {
+					if (stateSel[i].value == stateSelValue) {
+						stateSel.selectedIndex = i;
+
+						break;
+					}
+				}
+
+				document.getElementById("<portlet:namespace />" + type + "Zip").value = "<%= address.getZip() %>";
+				document.getElementById("<portlet:namespace />" + type + "Country").value = "<%= country.getName() %>";
+			}
+
+		<%
+		}
+		%>
+
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/checkout_second.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/checkout_second.jsp
new file mode 100644
index 0000000..102cb17
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/checkout_second.jsp
@@ -0,0 +1,496 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/shopping/init.jsp" %>
+
+<%
+ShoppingCart cart = ShoppingUtil.getCart(renderRequest);
+
+Map<ShoppingCartItem, Integer> items = cart.getItems();
+
+ShoppingCoupon coupon = cart.getCoupon();
+
+int altShipping = cart.getAltShipping();
+String altShippingName = shoppingPrefs.getAlternativeShippingName(altShipping);
+
+ShoppingOrder order = (ShoppingOrder)request.getAttribute(WebKeys.SHOPPING_ORDER);
+%>
+
+<portlet:actionURL var="checkoutSecondURL">
+	<portlet:param name="struts_action" value="/shopping/checkout" />
+</portlet:actionURL>
+
+<aui:form action="<%= checkoutSecondURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.SAVE %>" />
+	<aui:input name="billingFirstName" type="hidden" value="<%= order.getBillingFirstName() %>" />
+	<aui:input name="billingLastName" type="hidden" value="<%= order.getBillingLastName() %>" />
+	<aui:input name="billingEmailAddress" type="hidden" value="<%= order.getBillingEmailAddress() %>" />
+	<aui:input name="billingCompany" type="hidden" value="<%= order.getBillingCompany() %>" />
+	<aui:input name="billingStreet" type="hidden" value="<%= order.getBillingStreet() %>" />
+	<aui:input name="billingCity" type="hidden" value="<%= order.getBillingCity() %>" />
+	<aui:input name="billingState" type="hidden" value="<%= order.getBillingState() %>" />
+	<aui:input name="billingZip" type="hidden" value="<%= order.getBillingZip() %>" />
+	<aui:input name="billingCountry" type="hidden" value="<%= order.getBillingCountry() %>" />
+	<aui:input name="billingPhone" type="hidden" value="<%= order.getBillingPhone() %>" />
+	<aui:input name="shipToBilling" type="hidden" value="<%= order.isShipToBilling() %>" />
+	<aui:input name="shippingFirstName" type="hidden" value="<%= order.getShippingFirstName() %>" />
+	<aui:input name="shippingLastName" type="hidden" value="<%= order.getShippingLastName() %>" />
+	<aui:input name="shippingEmailAddress" type="hidden" value="<%= order.getShippingEmailAddress() %>" />
+	<aui:input name="shippingCompany" type="hidden" value="<%= order.getShippingCompany() %>" />
+	<aui:input name="shippingStreet" type="hidden" value="<%= order.getShippingStreet() %>" />
+	<aui:input name="shippingCity" type="hidden" value="<%= order.getShippingCity() %>" />
+	<aui:input name="shippingState" type="hidden" value="<%= order.getShippingState() %>" />
+	<aui:input name="shippingZip" type="hidden" value="<%= order.getShippingZip() %>" />
+	<aui:input name="shippingCountry" type="hidden" value="<%= order.getShippingCountry() %>" />
+	<aui:input name="shippingPhone" type="hidden" value="<%= order.getShippingPhone() %>" />
+	<aui:input name="ccName" type="hidden" value="<%= order.getCcName() %>" />
+	<aui:input name="ccType" type="hidden" value="<%= order.getCcType() %>" />
+	<aui:input name="ccNumber" type="hidden" value="<%= order.getCcNumber() %>" />
+	<aui:input name="ccExpMonth" type="hidden" value="<%= order.getCcExpMonth() %>" />
+	<aui:input name="ccExpYear" type="hidden" value="<%= order.getCcExpYear() %>" />
+	<aui:input name="ccVerNumber" type="hidden" value="<%= order.getCcVerNumber() %>" />
+	<aui:input name="comments" type="hidden" value="<%= order.getComments() %>" />
+
+	<liferay-util:include page="/html/portlet/shopping/tabs1.jsp">
+		<liferay-util:param name="tabs1" value="cart" />
+	</liferay-util:include>
+
+	<div class="row-fluid">
+		<div class="span6">
+			<div class="well">
+				<h4><liferay-ui:message key="billing-address" /></h4>
+
+				<table class="lfr-table">
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="first-name" />:
+					</th>
+					<td>
+						<%= HtmlUtil.escape(order.getBillingFirstName()) %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="last-name" />:
+					</th>
+					<td>
+						<%= HtmlUtil.escape(order.getBillingLastName()) %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="email-address" />:
+					</th>
+					<td>
+						<%= HtmlUtil.escape(order.getBillingEmailAddress()) %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="company" />:
+					</th>
+					<td>
+						<%= HtmlUtil.escape(order.getBillingCompany()) %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="street" />:
+					</th>
+					<td>
+						<%= HtmlUtil.escape(order.getBillingStreet()) %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="city" />:
+					</th>
+					<td>
+						<%= HtmlUtil.escape(order.getBillingCity()) %>:
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="state" />:
+					</th>
+					<td>
+						<%= HtmlUtil.escape(order.getBillingState()) %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="postal-code" />:
+					</th>
+					<td>
+						<%= HtmlUtil.escape(order.getBillingZip()) %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+					<liferay-ui:message key="country" />:
+					</th>
+					<td>
+						<%= HtmlUtil.escape(order.getBillingCountry()) %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="phone" />:
+					</th>
+					<td>
+						<%= HtmlUtil.escape(order.getBillingPhone()) %>
+					</td>
+				</tr>
+				</table>
+			</div>
+		</div>
+
+		<div class="span6">
+			<div class="well">
+				<h4><liferay-ui:message key="shipping-address" /></h4>
+
+				<table class="lfr-table">
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="first-name" />:
+					</th>
+					<td>
+						<%= HtmlUtil.escape(order.getShippingFirstName()) %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="last-name" />:
+					</th>
+					<td>
+						<%= HtmlUtil.escape(order.getShippingLastName()) %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="email-address" />:
+					</th>
+					<td>
+						<%= HtmlUtil.escape(order.getShippingEmailAddress()) %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="company" />:
+					</th>
+					<td>
+						<%= HtmlUtil.escape(order.getShippingCompany()) %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="street" />:
+					</th>
+					<td>
+						<%= HtmlUtil.escape(order.getShippingStreet()) %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="city" />:
+					</th>
+					<td>
+						<%= HtmlUtil.escape(order.getShippingCity()) %>:
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="state" />:
+					</th>
+					<td>
+						<%= HtmlUtil.escape(order.getShippingState()) %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="postal-code" />:
+					</th>
+					<td>
+						<%= HtmlUtil.escape(order.getShippingZip()) %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="country" />:
+					</th>
+					<td>
+						<%= HtmlUtil.escape(order.getShippingCountry()) %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="phone" />:
+					</th>
+					<td>
+						<%= HtmlUtil.escape(order.getShippingPhone()) %>
+					</td>
+				</tr>
+				</table>
+			</div>
+		</div>
+	</div>
+
+	<c:if test="<%= !shoppingPrefs.usePayPal() %>">
+		<div class="well">
+			<h4><liferay-ui:message key="credit-card" /></h4>
+
+			<table class="lfr-table">
+			<tr>
+				<th class="text-left">
+					<liferay-ui:message key="full-name" />:
+				</th>
+				<td>
+					<%= HtmlUtil.escape(order.getCcName()) %>
+				</td>
+			</tr>
+			<tr>
+				<th class="text-left">
+					<liferay-ui:message key="type" />:
+				</th>
+				<td>
+					<liferay-ui:message key='<%= "cc_" + HtmlUtil.escape(order.getCcType()) %>' />
+				</td>
+			</tr>
+			<tr>
+				<th class="text-left">
+					<liferay-ui:message key="number" />:
+				</th>
+				<td>
+					<%= CreditCard.hide(order.getCcNumber()) %>
+				</td>
+			</tr>
+			<tr>
+				<th class="text-left">
+					<liferay-ui:message key="expiration-date" />:
+				</th>
+				<td>
+					<%= CalendarUtil.getMonths(locale)[order.getCcExpMonth()] %>, <%= order.getCcExpYear() %>
+				</td>
+			</tr>
+
+			<c:if test="<%= Validator.isNotNull(order.getCcVerNumber()) %>">
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="verification-number" />:
+					</th>
+					<td>
+						<%= HtmlUtil.escape(order.getCcVerNumber()) %>
+					</td>
+				</tr>
+			</c:if>
+
+			</table>
+		</div>
+	</c:if>
+
+	<c:if test="<%= Validator.isNotNull(order.getComments()) %>">
+		<div class="well">
+			<h4><liferay-ui:message key="comments" /></h4>
+
+			<%= HtmlUtil.escape(order.getComments()) %>
+		</div>
+	</c:if>
+
+	<%
+	boolean showAvailability = PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.SHOPPING_ITEM_SHOW_AVAILABILITY);
+
+	StringBundler itemIds = new StringBundler();
+
+	SearchContainer searchContainer = new SearchContainer();
+
+	List<String> headerNames = new ArrayList<String>();
+
+	headerNames.add("sku");
+	headerNames.add("description");
+
+	if (showAvailability) {
+		headerNames.add("availability");
+	}
+
+	headerNames.add("quantity");
+	headerNames.add("price");
+	headerNames.add("total");
+
+	searchContainer.setHeaderNames(headerNames);
+	searchContainer.setHover(false);
+
+	int total = items.size();
+
+	searchContainer.setTotal(total);
+
+	List resultRows = searchContainer.getResultRows();
+
+	int i = 0;
+
+	for (Map.Entry<ShoppingCartItem, Integer> entry : items.entrySet()) {
+		ShoppingCartItem cartItem = entry.getKey();
+		Integer count = entry.getValue();
+
+		ShoppingItem item = cartItem.getItem();
+		String[] fieldsArray = cartItem.getFieldsArray();
+
+		ShoppingItemField[] itemFields = (ShoppingItemField[])ShoppingItemFieldLocalServiceUtil.getItemFields(item.getItemId()).toArray(new ShoppingItemField[0]);
+
+		for (int j = 0; j < count.intValue(); j++) {
+			itemIds.append(cartItem.getCartItemId());
+			itemIds.append(",");
+		}
+
+		ResultRow row = new ResultRow(item, item.getItemId(), i);
+
+		PortletURL rowURL = renderResponse.createRenderURL();
+
+		rowURL.setParameter("struts_action", "/shopping/view_item");
+		rowURL.setParameter("itemId", String.valueOf(item.getItemId()));
+
+		// SKU
+
+		row.addText(item.getSku(), rowURL);
+
+		// Description
+
+		if (item.isFields()) {
+			StringBundler sb = new StringBundler(4);
+
+			sb.append(HtmlUtil.escape(item.getName()));
+			sb.append(" (");
+			sb.append(StringUtil.replace(StringUtil.merge(cartItem.getFieldsArray(), ", "), "=", ": "));
+			sb.append(StringPool.CLOSE_PARENTHESIS);
+
+			row.addText(sb.toString(), rowURL);
+		}
+		else {
+			row.addText(HtmlUtil.escape(item.getName()), rowURL);
+		}
+
+		// Availability
+
+		if (ShoppingUtil.isInStock(item, itemFields, fieldsArray, count)) {
+			row.addText("<div class=\"alert alert-success\">".concat(LanguageUtil.get(pageContext, "in-stock")).concat("</div>"), rowURL);
+		}
+		else {
+			row.addText("<div class=\"alert alert-error\">".concat(LanguageUtil.get(pageContext, "out-of-stock")).concat("</div>"), rowURL);
+		}
+
+		// Quantity
+
+		row.addText(count.toString(), rowURL);
+
+		// Price
+
+		row.addText(currencyFormat.format(ShoppingUtil.calculateActualPrice(item, count.intValue()) / count.intValue()), rowURL);
+
+		// Total
+
+		row.addText(currencyFormat.format(ShoppingUtil.calculateActualPrice(item, count.intValue())), rowURL);
+
+		// Add result row
+
+		resultRows.add(row);
+
+		i++;
+	}
+	%>
+
+	<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+
+	<aui:input name="itemIds" type="hidden" value="<%= itemIds %>" />
+	<aui:input name="couponCodes" type="hidden" value="<%= cart.getCouponCodes() %>" />
+
+	<div class="well">
+		<table class="lfr-table">
+		<tr>
+			<th class="text-left">
+				<liferay-ui:message key="subtotal" />:
+			</th>
+			<td>
+				<%= currencyFormat.format(ShoppingUtil.calculateActualSubtotal(items)) %>
+			</td>
+		</tr>
+		<tr>
+			<th class="text-left">
+				<liferay-ui:message key="tax" />:
+			</th>
+			<td>
+				<%= currencyFormat.format(ShoppingUtil.calculateTax(items, order.getBillingState())) %>
+			</td>
+		</tr>
+		<tr>
+			<th class="text-left">
+				<liferay-ui:message key="shipping" /> <%= Validator.isNotNull(altShippingName) ? "(" + altShippingName + ")" : StringPool.BLANK %>:
+			</th>
+			<td>
+				<%= currencyFormat.format(ShoppingUtil.calculateAlternativeShipping(items, altShipping)) %>
+			</td>
+		</tr>
+
+		<%
+		double insurance = ShoppingUtil.calculateInsurance(items);
+		%>
+
+		<c:if test="<%= cart.isInsure() && (insurance > 0) %>">
+			<tr>
+				<th class="text-left">
+					<liferay-ui:message key="insurance" />:
+				</th>
+				<td>
+					<%= currencyFormat.format(insurance) %>
+				</td>
+			</tr>
+		</c:if>
+
+		<c:if test="<%= coupon != null %>">
+			<tr>
+				<th class="text-left">
+					<liferay-ui:message key="coupon-discount" />:
+				</th>
+				<td>
+					<%= currencyFormat.format(ShoppingUtil.calculateCouponDiscount(items, order.getBillingState(), coupon)) %>
+
+					<portlet:renderURL var="viewCouponURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+						<portlet:param name="struts_action" value="/shopping/view_coupon" />
+						<portlet:param name="couponId" value="<%= String.valueOf(coupon.getCouponId()) %>" />
+					</portlet:renderURL>
+
+					<%
+					String taglibOpenCouponWindow = "var viewCouponWindow = window.open('" + viewCouponURL + "', 'viewCoupon', 'directories=no,height=200,location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no,width=280'); void(''); viewCouponWindow.focus();";
+					%>
+
+					<aui:a href="<%= taglibOpenCouponWindow %>" label='<%= "(" + coupon.getCouponId() + ")" %>' />
+				</td>
+			</tr>
+		</c:if>
+
+		<tr>
+			<th class="text-left">
+				<liferay-ui:message key="total" />:
+			</th>
+			<td>
+			<%= currencyFormat.format(ShoppingUtil.calculateTotal(items, order.getBillingState(), coupon, altShipping, cart.isInsure())) %>
+			</td>
+		</tr>
+		</table>
+	</div>
+
+	<aui:button-row>
+		<aui:button type="submit" value='<%= shoppingPrefs.usePayPal() ? "continue" : "finished" %>' />
+	</aui:button-row>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/checkout_third.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/checkout_third.jsp
new file mode 100644
index 0000000..8defd3f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/checkout_third.jsp
@@ -0,0 +1,39 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/shopping/init.jsp" %>
+
+<%
+String orderId = ParamUtil.getString(request, "orderId");
+
+try {
+	ShoppingCart cart = ShoppingUtil.getCart(renderRequest);
+
+	ShoppingCartLocalServiceUtil.updateCart(cart.getUserId(), cart.getGroupId(), StringPool.BLANK, StringPool.BLANK, 0, false);
+}
+catch (Exception e) {
+}
+%>
+
+<liferay-util:include page="/html/portlet/shopping/tabs1.jsp">
+	<liferay-util:param name="tabs1" value="cart" />
+</liferay-util:include>
+
+<div class="alert alert-success">
+	<liferay-ui:message key="thank-you-for-your-purchase" />
+</div>
+
+<liferay-ui:message key="your-order-number-is" /> <strong><%= HtmlUtil.escape(orderId) %></strong>. <liferay-ui:message key="you-will-receive-an-email-shortly-with-your-order-summary-and-further-details" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/configuration.jsp
new file mode 100644
index 0000000..15377d0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/configuration.jsp
@@ -0,0 +1,386 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/shopping/init.jsp" %>
+
+<%
+String tabs2 = ParamUtil.getString(request, "tabs2", "payment-settings");
+String tabs3 = ParamUtil.getString(request, "tabs3", "email-from");
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+String emailFromName = ParamUtil.getString(request, "emailFromName", shoppingPrefs.getEmailFromName(company.getCompanyId()));
+String emailFromAddress = ParamUtil.getString(request, "emailFromAddress", shoppingPrefs.getEmailFromAddress(company.getCompanyId()));
+
+String emailOrderConfirmationSubject = ParamUtil.getString(request, "emailOrderConfirmationSubject", shoppingPrefs.getEmailOrderConfirmationSubject());
+String emailOrderConfirmationBody = ParamUtil.getString(request, "emailOrderConfirmationBody", shoppingPrefs.getEmailOrderConfirmationBody());
+
+String emailOrderShippingSubject = ParamUtil.getString(request, "emailOrderShippingSubject", shoppingPrefs.getEmailOrderShippingSubject());
+String emailOrderShippingBody = ParamUtil.getString(request, "emailOrderShippingBody", shoppingPrefs.getEmailOrderShippingBody());
+
+String editorParam = StringPool.BLANK;
+String editorContent = StringPool.BLANK;
+
+if (tabs3.equals("confirmation-email")) {
+	editorParam = "emailOrderConfirmationBody";
+	editorContent = emailOrderConfirmationBody;
+}
+else if (tabs3.equals("shipping-email")) {
+	editorParam = "emailOrderShippingBody";
+	editorContent = emailOrderShippingBody;
+}
+%>
+
+<liferay-portlet:renderURL portletConfiguration="true" var="portletURL">
+	<portlet:param name="tabs2" value="<%= tabs2 %>" />
+	<portlet:param name="redirect" value="<%= redirect %>" />
+</liferay-portlet:renderURL>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveConfiguration();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
+	<aui:input name="tabs3" type="hidden" value="<%= tabs3 %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="ccTypes" type="hidden" />
+
+	<liferay-ui:tabs
+		names="payment-settings,shipping-calculation,insurance-calculation,emails"
+		param="tabs2"
+		url="<%= portletURL %>"
+	/>
+
+	<c:choose>
+		<c:when test='<%= tabs2.equals("payment-settings") %>'>
+			<div class="alert alert-info">
+				<liferay-ui:message key="enter-a-paypal-email-address-to-send-all-payments-to-paypal" />
+
+				<liferay-ui:message arguments='<%= "<strong>" + themeDisplay.getPortalURL() + themeDisplay.getPathMain() + "/shopping/notify</strong>" %>' key="go-to-paypal-and-set-up-ipn-to-post-to-x" translateArguments="<%= false %>" />
+			</div>
+
+			<div class="alert alert-info">
+				<liferay-ui:message key="enter-a-blank-paypal-email-address-to-disable-paypal" />
+			</div>
+
+			<aui:fieldset>
+				<aui:input cssClass="lfr-input-text-container" label="paypal-email-address" name="payPalEmailAddress" type="text" value="<%= shoppingPrefs.getPayPalEmailAddress() %>" />
+
+				<aui:field-wrapper label="credit-cards">
+
+					<%
+					String[] ccTypes1 = ShoppingPreferences.CC_TYPES;
+					String[] ccTypes2 = shoppingPrefs.getCcTypes();
+
+					// Left list
+
+					List leftList = new ArrayList();
+
+					for (String ccType : ccTypes2) {
+						leftList.add(new KeyValuePair(ccType, LanguageUtil.get(pageContext, "cc_" + ccType)));
+					}
+
+					// Right list
+
+					List rightList = new ArrayList();
+
+					for (String ccType : ccTypes1) {
+						if (!ArrayUtil.contains(ccTypes2, ccType)) {
+							rightList.add(new KeyValuePair(ccType, LanguageUtil.get(pageContext, "cc_" + ccType)));
+						}
+					}
+					%>
+
+					<liferay-ui:input-move-boxes
+						leftBoxName="current_cc_types"
+						leftList="<%= leftList %>"
+						leftReorder="true"
+						leftTitle="current"
+						rightBoxName="available_cc_types"
+						rightList="<%= rightList %>"
+						rightTitle="available"
+					/>
+				</aui:field-wrapper>
+
+				<aui:select label="currency" name="currencyId">
+
+					<%
+					for (int i = 0; i < ShoppingPreferences.CURRENCY_IDS.length; i++) {
+					%>
+
+						<aui:option label="<%= ShoppingPreferences.CURRENCY_IDS[i] %>" selected="<%= shoppingPrefs.getCurrencyId().equals(ShoppingPreferences.CURRENCY_IDS[i]) %>" />
+
+					<%
+					}
+					%>
+
+				</aui:select>
+
+				<aui:select name="taxState">
+
+					<%
+					for (int i = 0; i < StateUtil.STATES.length; i++) {
+					%>
+
+						<aui:option label="<%= StateUtil.STATES[i].getName() %>" selected="<%= shoppingPrefs.getTaxState().equals(StateUtil.STATES[i].getId()) %>" value="<%= StateUtil.STATES[i].getId() %>" />
+
+					<%
+					}
+					%>
+
+				</aui:select>
+
+				<aui:input maxlength="7" name="taxRate" size="7" type="text" value="<%= taxFormat.format(shoppingPrefs.getTaxRate()) %>" />
+
+				<aui:input label="minimum-order" maxlength="7" name="minOrder" size="7" type="text" value="<%= doubleFormat.format(shoppingPrefs.getMinOrder()) %>" />
+			</aui:fieldset>
+		</c:when>
+		<c:when test='<%= tabs2.equals("shipping-calculation") %>'>
+			<div class="alert alert-info">
+				<liferay-ui:message key="calculate-a-flat-shipping-amount-based-on-the-total-amount-of-the-purchase" /> <span style="font-size: xx-small;">-- <%= StringUtil.toUpperCase(LanguageUtil.get(pageContext, "or")) %> --</span> <liferay-ui:message key="calculate-the-shipping-based-on-a-percentage-of-the-total-amount-of-the-purchase" />
+			</div>
+
+			<aui:fieldset>
+				<aui:select label="formula" name="shippingFormula">
+					<aui:option label="flat-amount" selected='<%= shoppingPrefs.getShippingFormula().equals("flat") %>' value="flat" />
+					<aui:option label="percentage" selected='<%= shoppingPrefs.getShippingFormula().equals("percentage") %>' />
+				</aui:select>
+
+				<aui:field-wrapper label="values">
+
+					<%
+					int shippingRange = 0;
+
+					for (int i = 0; i < 5; i++) {
+						double shippingRangeA = ShoppingPreferences.INSURANCE_RANGE[shippingRange++];
+						double shippingRangeB = ShoppingPreferences.INSURANCE_RANGE[shippingRange++];
+					%>
+
+					<%= currencyFormat.format(shippingRangeA) %>
+
+					<c:if test="<%= !Double.isInfinite(shippingRangeB) %>">
+						- <%= currencyFormat.format(shippingRangeB) %>
+					</c:if>
+
+					<c:if test="<%= Double.isInfinite(shippingRangeB) %>">
+						and over
+					</c:if>
+
+					<aui:input label="" maxlength="6" name='<%= "shipping" + i %>' size="6" type="text" value="<%= GetterUtil.getString(shoppingPrefs.getShipping()[i]) %>" />
+
+					<%
+					}
+					%>
+
+				</aui:field-wrapper>
+			</aui:fieldset>
+		</c:when>
+		<c:when test='<%= tabs2.equals("insurance-calculation") %>'>
+			<div class="alert alert-info">
+				<liferay-ui:message key="calculate-a-flat-insurance-amount-based-on-the-total-amount-of-the-purchase" /> <span style="font-size: xx-small;">-- <%= StringUtil.toUpperCase(LanguageUtil.get(pageContext, "or")) %> --</span> <liferay-ui:message key="calculate-the-insurance-based-on-a-percentage-of-the-total-amount-of-the-purchase" />
+			</div>
+
+			<aui:fieldset>
+				<aui:select label="formula" name="insuranceFormula">
+					<aui:option label="flat-amount" selected='<%= shoppingPrefs.getInsuranceFormula().equals("flat") %>' value="flat" />
+					<aui:option label="percentage" selected='<%= shoppingPrefs.getInsuranceFormula().equals("percentage") %>' />
+				</aui:select>
+
+				<aui:field-wrapper label="values">
+
+					<%
+					int insuranceRange = 0;
+
+					for (int i = 0; i < 5; i++) {
+						double insuranceRangeA = ShoppingPreferences.INSURANCE_RANGE[insuranceRange++];
+						double insuranceRangeB = ShoppingPreferences.INSURANCE_RANGE[insuranceRange++];
+					%>
+
+					<%= currencyFormat.format(insuranceRangeA) %>
+
+					<c:if test="<%= !Double.isInfinite(insuranceRangeB) %>">
+						- <%= currencyFormat.format(insuranceRangeB) %>
+					</c:if>
+
+					<c:if test="<%= Double.isInfinite(insuranceRangeB) %>">
+						and over
+					</c:if>
+
+					<aui:input label="" maxlength="6" name='<%= "insurance" + i %>' size="6" type="text" value="<%= GetterUtil.getString(shoppingPrefs.getInsurance()[i]) %>" />
+
+					<%
+					}
+					%>
+
+				</aui:field-wrapper>
+			</aui:fieldset>
+		</c:when>
+		<c:when test='<%= tabs2.equals("emails") %>'>
+			<liferay-ui:tabs
+				names="email-from,confirmation-email,shipping-email"
+				param="tabs3"
+				url="<%= portletURL.toString() %>"
+			/>
+
+			<liferay-ui:error key="emailFromAddress" message="please-enter-a-valid-email-address" />
+			<liferay-ui:error key="emailFromName" message="please-enter-a-valid-name" />
+			<liferay-ui:error key="emailOrderShippingBody" message="please-enter-a-valid-body" />
+			<liferay-ui:error key="emailOrderShippingSubject" message="please-enter-a-valid-subject" />
+			<liferay-ui:error key="emailOrderConfirmationBody" message="please-enter-a-valid-body" />
+			<liferay-ui:error key="emailOrderConfirmationSubject" message="please-enter-a-valid-subject" />
+
+			<c:choose>
+				<c:when test='<%= tabs3.endsWith("-email") %>'>
+					<aui:fieldset>
+						<c:choose>
+							<c:when test='<%= tabs3.equals("confirmation-email") %>'>
+								<aui:input label="enabled" name="emailOrderConfirmationEnabled" type="checkbox" value="<%= shoppingPrefs.getEmailOrderConfirmationEnabled() %>" />
+							</c:when>
+							<c:when test='<%= tabs3.equals("shipping-email") %>'>
+								<aui:input label="enabled" name="emailOrderShippingEnabled" type="checkbox" value="<%= shoppingPrefs.getEmailOrderShippingEnabled() %>" />
+							</c:when>
+						</c:choose>
+						<c:choose>
+							<c:when test='<%= tabs3.equals("confirmation-email") %>'>
+								<aui:input cssClass="lfr-input-text-container" label="subject" name="emailOrderConfirmationSubject" type="text" value="<%= emailOrderConfirmationSubject %>" />
+							</c:when>
+							<c:when test='<%= tabs3.equals("shipping-email") %>'>
+								<aui:input cssClass="lfr-input-text-container" label="subject" name="emailOrderShippingSubject" type="text" value="<%= emailOrderShippingSubject %>" />
+							</c:when>
+						</c:choose>
+
+						<aui:field-wrapper label="body">
+							<liferay-ui:input-editor editorImpl="<%= EDITOR_WYSIWYG_IMPL_KEY %>" />
+
+							<aui:input name="<%= editorParam %>" type="hidden" value="" />
+						</aui:field-wrapper>
+
+						<div class="definition-of-terms">
+							<h4><liferay-ui:message key="definition-of-terms" /></h4>
+
+							<dl>
+								<dt>
+									[$FROM_ADDRESS$]
+								</dt>
+								<dd>
+									<%= HtmlUtil.escape(emailFromAddress) %>
+								</dd>
+								<dt>
+									[$FROM_NAME$]
+								</dt>
+								<dd>
+									<%= HtmlUtil.escape(emailFromName) %>
+								</dd>
+								<dt>
+									[$ORDER_BILLING_ADDRESS$]
+								</dt>
+								<dd>
+									<liferay-ui:message key="the-order-billing-address" />
+								</dd>
+								<dt>
+									[$ORDER_CURRENCY$]
+								</dt>
+								<dd>
+									<liferay-ui:message key="the-order-currency" />
+								</dd>
+								<dt>
+									[$ORDER_NUMBER$]
+								</dt>
+								<dd>
+									<liferay-ui:message key="the-order-id" />
+								</dd>
+								<dt>
+									[$ORDER_SHIPPING_ADDRESS$]
+								</dt>
+								<dd>
+									<liferay-ui:message key="the-order-shipping-address" />
+								</dd>
+								<dt>
+									[$ORDER_TOTAL$]
+								</dt>
+								<dd>
+									<liferay-ui:message key="the-order-total" />
+								</dd>
+								<dt>
+									[$PORTAL_URL$]
+								</dt>
+								<dd>
+									<%= company.getVirtualHostname() %>
+								</dd>
+								<dt>
+									[$PORTLET_NAME$]
+								</dt>
+								<dd>
+									<%= PortalUtil.getPortletTitle(renderResponse) %>
+								</dd>
+								<dt>
+									[$TO_ADDRESS$]
+								</dt>
+								<dd>
+									<liferay-ui:message key="the-address-of-the-email-recipient" />
+								</dd>
+								<dt>
+									[$TO_NAME$]
+								</dt>
+								<dd>
+									<liferay-ui:message key="the-name-of-the-email-recipient" />
+								</dd>
+							</dl>
+						</div>
+					</aui:fieldset>
+				</c:when>
+				<c:otherwise>
+					<aui:fieldset>
+						<aui:input cssClass="lfr-input-text-container" label="name" name="emailFromName" type="text" value="<%= emailFromName %>" />
+
+						<aui:input cssClass="lfr-input-text-container" label="address" name="emailFromAddress" type="text" value="<%= emailFromAddress %>" />
+					</aui:fieldset>
+				</c:otherwise>
+			</c:choose>
+		</c:when>
+	</c:choose>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />initEditor() {
+		return "<%= UnicodeFormatter.toString(editorContent) %>";
+	}
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />saveConfiguration',
+		function() {
+			<c:if test='<%= tabs2.equals("payment-settings") %>'>
+				document.<portlet:namespace />fm.<portlet:namespace />ccTypes.value = Liferay.Util.listSelect(document.<portlet:namespace />fm.<portlet:namespace />current_cc_types);
+			</c:if>
+
+			<c:if test='<%= tabs3.endsWith("-email") %>'>
+				document.<portlet:namespace />fm.<portlet:namespace /><%= editorParam %>.value = window.<portlet:namespace />editor.getHTML();
+			</c:if>
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
+
+<%!
+public static final String EDITOR_WYSIWYG_IMPL_KEY = "editor.wysiwyg.portal-web.docroot.html.portlet.shopping.configuration.jsp";
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/coupon_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/coupon_action.jsp
new file mode 100644
index 0000000..7b46521
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/coupon_action.jsp
@@ -0,0 +1,45 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/shopping/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+ShoppingCoupon coupon = (ShoppingCoupon)row.getObject();
+%>
+
+<liferay-ui:icon-menu>
+	<portlet:renderURL var="editURL">
+		<portlet:param name="struts_action" value="/shopping/edit_coupon" />
+		<portlet:param name="redirect" value="<%= currentURL %>" />
+		<portlet:param name="couponId" value="<%= String.valueOf(coupon.getCouponId()) %>" />
+	</portlet:renderURL>
+
+	<liferay-ui:icon
+		image="edit"
+		url="<%= editURL %>"
+	/>
+
+	<portlet:actionURL var="deleteURL">
+		<portlet:param name="struts_action" value="/shopping/edit_coupon" />
+		<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+		<portlet:param name="redirect" value="<%= currentURL %>" />
+		<portlet:param name="deleteCouponIds" value="<%= String.valueOf(coupon.getCouponId()) %>" />
+	</portlet:actionURL>
+
+	<liferay-ui:icon-delete url="<%= deleteURL %>" />
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/coupon_search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/coupon_search.jsp
new file mode 100644
index 0000000..7c4736a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/coupon_search.jsp
@@ -0,0 +1,71 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/shopping/init.jsp" %>
+
+<%
+CouponSearch searchContainer = (CouponSearch)request.getAttribute("liferay-ui:search:searchContainer");
+
+CouponDisplayTerms displayTerms = (CouponDisplayTerms)searchContainer.getDisplayTerms();
+%>
+
+<aui:fieldset column="<%= true %>">
+	<aui:col width="<%= 33 %>">
+		<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" name="<%= displayTerms.CODE %>" size="20" type="text" value="<%= displayTerms.getCode() %>" />
+
+		<aui:select label="" name="<%= displayTerms.AND_OPERATOR %>">
+			<aui:option label="and" selected="<%= displayTerms.isAndOperator() %>" value="1" />
+			<aui:option label="or" selected="<%= !displayTerms.isAndOperator() %>" value="0" />
+		</aui:select>
+	</aui:col>
+
+	<aui:col width="<%= 33 %>">
+		<aui:select name="<%= displayTerms.DISCOUNT_TYPE %>" showEmptyOption="<%= true %>">
+
+			<%
+			for (int i = 0; i < ShoppingCouponConstants.DISCOUNT_TYPES.length; i++) {
+			%>
+
+				<aui:option label="<%= ShoppingCouponConstants.DISCOUNT_TYPES[i] %>" selected="<%= displayTerms.getDiscountType().equals(ShoppingCouponConstants.DISCOUNT_TYPES[i]) %>" />
+
+			<%
+			}
+			%>
+
+		</aui:select>
+	</aui:col>
+
+	<aui:col width="<%= 33 %>">
+		<aui:select name="<%= displayTerms.ACTIVE %>">
+			<aui:option label="yes" selected="<%= displayTerms.isActive() %>" value="1" />
+			<aui:option label="no" selected="<%= !displayTerms.isActive() %>" value="0" />
+		</aui:select>
+	</aui:col>
+</aui:fieldset>
+
+<aui:button-row>
+	<aui:button type="submit" value="search" />
+
+	<aui:button onClick='<%= renderResponse.getNamespace() + "addCoupon();" %>' value="add-coupon" />
+</aui:button-row>
+
+<aui:script>
+	function <portlet:namespace />addCoupon() {
+		document.<portlet:namespace />fm.method = 'post';
+
+		submitForm(document.<portlet:namespace />fm, '<portlet:renderURL><portlet:param name="struts_action" value="/shopping/edit_coupon" /><portlet:param name="redirect" value="<%= currentURL %>" /></portlet:renderURL>');
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/coupons.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/coupons.jspf
new file mode 100644
index 0000000..62b14eb
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/coupons.jspf
@@ -0,0 +1,136 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/shopping/view");
+portletURL.setParameter("tabs1", tabs1);
+%>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="deleteCouponIds" type="hidden" />
+
+	<%
+	CouponSearch searchContainer = new CouponSearch(renderRequest, portletURL);
+
+	List headerNames = searchContainer.getHeaderNames();
+
+	headerNames.add(StringPool.BLANK);
+
+	searchContainer.setRowChecker(new RowChecker(renderResponse));
+	%>
+
+	<liferay-ui:search-form
+		page="/html/portlet/shopping/coupon_search.jsp"
+		searchContainer="<%= searchContainer %>"
+	/>
+
+	<%
+	CouponDisplayTerms searchTerms = (CouponDisplayTerms)searchContainer.getSearchTerms();
+
+	int total = ShoppingCouponLocalServiceUtil.searchCount(scopeGroupId, company.getCompanyId(), searchTerms.getCode(), searchTerms.isActive(), searchTerms.getDiscountType(), searchTerms.isAndOperator());
+
+	searchContainer.setTotal(total);
+
+	List results = ShoppingCouponServiceUtil.search(scopeGroupId, company.getCompanyId(), searchTerms.getCode(), searchTerms.isActive(), searchTerms.getDiscountType(), searchTerms.isAndOperator(), searchContainer.getStart(), searchContainer.getEnd());
+
+	searchContainer.setResults(results);
+	%>
+
+	<div class="separator"><!-- --></div>
+
+	<aui:button-row>
+		<aui:button disabled="<%= true %>" name="delete" onClick='<%= renderResponse.getNamespace() + "deleteCoupons();" %>' value="delete" />
+	</aui:button-row>
+
+	<%
+	List resultRows = searchContainer.getResultRows();
+
+	for (int i = 0; i < results.size(); i++) {
+		ShoppingCoupon coupon = (ShoppingCoupon)results.get(i);
+
+		coupon = coupon.toEscapedModel();
+
+		ResultRow row = new ResultRow(coupon, coupon.getCouponId(), i);
+
+		PortletURL rowURL = renderResponse.createRenderURL();
+
+		rowURL.setParameter("struts_action", "/shopping/edit_coupon");
+		rowURL.setParameter("redirect", currentURL);
+		rowURL.setParameter("couponId", String.valueOf(coupon.getCouponId()));
+
+		// Code
+
+		row.addText(coupon.getCode(), rowURL);
+
+		// Name and description
+
+		if (Validator.isNotNull(coupon.getDescription())) {
+			row.addText(coupon.getName().concat("<br />").concat(coupon.getDescription()), rowURL);
+		}
+		else {
+			row.addText(coupon.getName(), rowURL);
+		}
+
+		// Start date
+
+		row.addDate(coupon.getStartDate(), rowURL);
+
+		// End date
+
+		if (coupon.getEndDate() == null) {
+			row.addText(LanguageUtil.get(pageContext, "never"), rowURL);
+		}
+		else {
+			row.addDate(coupon.getEndDate(), rowURL);
+		}
+
+		// Discount type
+
+		row.addText(LanguageUtil.get(pageContext, coupon.getDiscountType()), rowURL);
+
+		// Action
+
+		row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/shopping/coupon_action.jsp");
+
+		// Add result row
+
+		resultRows.add(row);
+	}
+	%>
+
+	<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+</aui:form>
+
+<aui:script>
+	Liferay.Util.toggleSearchContainerButton('#<portlet:namespace />delete', '#<portlet:namespace /><%= searchContainerReference.getId() %>SearchContainer', document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />deleteCoupons',
+		function() {
+			if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-delete-the-selected-coupons") %>')) {
+				document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.DELETE %>";
+				document.<portlet:namespace />fm.<portlet:namespace />deleteCouponIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+				submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/shopping/edit_coupon" /><portlet:param name="redirect" value="<%= currentURL %>" /></portlet:actionURL>");
+			}
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/edit_category.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/edit_category.jsp
new file mode 100644
index 0000000..9f5bd20
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/edit_category.jsp
@@ -0,0 +1,173 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/shopping/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+ShoppingCategory category = (ShoppingCategory)request.getAttribute(WebKeys.SHOPPING_CATEGORY);
+
+long categoryId = BeanParamUtil.getLong(category, request, "categoryId");
+
+long parentCategoryId = BeanParamUtil.getLong(category, request, "parentCategoryId", ShoppingCategoryConstants.DEFAULT_PARENT_CATEGORY_ID);
+%>
+
+<portlet:actionURL var="editCategoryURL">
+	<portlet:param name="struts_action" value="/shopping/edit_category" />
+</portlet:actionURL>
+
+<aui:form action="<%= editCategoryURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveCategory();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="categoryId" type="hidden" value="<%= categoryId %>" />
+	<aui:input name="parentCategoryId" type="hidden" value="<%= parentCategoryId %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title="category"
+	/>
+
+	<liferay-ui:error exception="<%= CategoryNameException.class %>" message="please-enter-a-valid-name" />
+
+	<c:if test="<%= parentCategoryId != ShoppingCategoryConstants.DEFAULT_PARENT_CATEGORY_ID %>">
+		<div class="breadcrumbs">
+			<%= ShoppingUtil.getBreadcrumbs(parentCategoryId, pageContext, renderRequest, renderResponse) %>
+		</div>
+	</c:if>
+
+	<aui:model-context bean="<%= category %>" model="<%= ShoppingCategory.class %>" />
+
+	<aui:fieldset>
+		<c:if test="<%= category != null %>">
+			<aui:field-wrapper label="parent-category">
+
+				<%
+				String parentCategoryName = "";
+
+				try {
+					ShoppingCategory parentCategory = ShoppingCategoryServiceUtil.getCategory(parentCategoryId);
+
+					parentCategoryName = parentCategory.getName();
+				}
+				catch (NoSuchCategoryException nsce) {
+				}
+				%>
+
+				<portlet:renderURL var="viewCategoryURL">
+					<portlet:param name="struts_action" value="/shopping/view" />
+					<portlet:param name="categoryId" value="<%= String.valueOf(parentCategoryId) %>" />
+				</portlet:renderURL>
+
+				<div class="input-append">
+					<liferay-ui:input-resource id="parentCategoryName" url="<%= parentCategoryName %>" />
+
+					<portlet:renderURL var="selectCategoryURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+						<portlet:param name="struts_action" value="/shopping/select_category" />
+						<portlet:param name="categoryId" value="<%= String.valueOf(parentCategoryId) %>" />
+					</portlet:renderURL>
+
+					<%
+					String taglibOpenCategoryWindow = "var categoryWindow = window.open('" + selectCategoryURL + "', 'category', 'directories=no,height=640,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=680'); void('');categoryWindow.focus();";
+					%>
+
+					<aui:button onClick="<%= taglibOpenCategoryWindow %>" value="select" />
+
+					<aui:button onClick='<%= renderResponse.getNamespace() + "removeCategory();" %>' value="remove" />
+				</div>
+
+				<div id="<portlet:namespace />merge-with-parent-checkbox-div"
+					<c:if test="<%= category.getParentCategoryId() == ShoppingCategoryConstants.DEFAULT_PARENT_CATEGORY_ID %>">
+						style="display: none;"
+					</c:if>
+				>
+					<aui:input name="mergeWithParentCategory" type="checkbox" />
+				</div>
+			</aui:field-wrapper>
+		</c:if>
+
+		<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" cssClass="lfr-input-text-container" name="name" />
+
+		<aui:input cssClass="lfr-textarea-container" name="description" />
+
+		<c:if test="<%= category == null %>">
+			<aui:field-wrapper label="permissions">
+				<liferay-ui:input-permissions
+					modelName="<%= ShoppingCategory.class.getName() %>"
+				/>
+			</aui:field-wrapper>
+		</c:if>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />saveCategory() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (category == null) ? Constants.ADD : Constants.UPDATE %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />removeCategory',
+		function() {
+			var A = AUI();
+
+			document.<portlet:namespace />fm.<portlet:namespace />parentCategoryId.value = "<%= ShoppingCategoryConstants.DEFAULT_PARENT_CATEGORY_ID %>";
+
+			document.getElementById('<portlet:namespace />parentCategoryName').value = '';
+
+			var mergeWithParent = A.one('#<portlet:namespace />merge-with-parent-checkbox-div');
+			var mergeWithParentCategory = A.one('#<portlet:namespace />mergeWithParentCategoryCheckbox');
+
+			if (mergeWithParent) {
+				mergeWithParent.hide();
+			}
+
+			if (mergeWithParentCategory) {
+				mergeWithParentCategory.set('checked', false);
+			}
+		},
+		['aui-base']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />selectCategory',
+		function(parentCategoryId, parentCategoryName) {
+			var A = AUI();
+
+			document.<portlet:namespace />fm.<portlet:namespace />parentCategoryId.value = parentCategoryId;
+
+			document.getElementById('<portlet:namespace />parentCategoryName').value = parentCategoryName;
+
+			if (parentCategoryId != <%= ShoppingCategoryConstants.DEFAULT_PARENT_CATEGORY_ID %>) {
+				var mergeWithParent = A.one('#<portlet:namespace />merge-with-parent-checkbox-div');
+
+				if (mergeWithParent) {
+					mergeWithParent.show();
+				}
+			}
+		},
+		['aui-base']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/edit_coupon.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/edit_coupon.jsp
new file mode 100644
index 0000000..e542049
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/edit_coupon.jsp
@@ -0,0 +1,169 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/shopping/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+ShoppingCoupon coupon = (ShoppingCoupon)request.getAttribute(WebKeys.SHOPPING_COUPON);
+
+long couponId = BeanParamUtil.getLong(coupon, request, "couponId");
+
+String code = BeanParamUtil.getString(coupon, request, "code");
+
+boolean neverExpire = ParamUtil.getBoolean(request, "neverExpire", true);
+
+if (coupon != null) {
+	if (coupon.getEndDate() != null) {
+		neverExpire = false;
+	}
+}
+
+String limitCategories = BeanParamUtil.getString(coupon, request, "limitCategories");
+String limitSkus = BeanParamUtil.getString(coupon, request, "limitSkus");
+double minOrder = BeanParamUtil.getDouble(coupon, request, "minOrder");
+double discount = BeanParamUtil.getDouble(coupon, request, "discount");
+String discountType = BeanParamUtil.getString(coupon, request, "discountType");
+%>
+
+<portlet:actionURL var="editCouponURL">
+	<portlet:param name="struts_action" value="/shopping/edit_coupon" />
+</portlet:actionURL>
+
+<aui:form action="<%= editCouponURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveCoupon();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="couponId" type="hidden" value="<%= couponId %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title="coupon"
+	/>
+
+	<liferay-ui:error exception="<%= CouponCodeException.class %>" message="please-enter-a-valid-code" />
+	<liferay-ui:error exception="<%= CouponDateException.class %>" message="please-enter-a-start-date-that-comes-before-the-expiration-date" />
+	<liferay-ui:error exception="<%= CouponDescriptionException.class %>" message="please-enter-a-valid-description" />
+	<liferay-ui:error exception="<%= CouponDiscountException.class %>" message="please-enter-a-valid-number" />
+	<liferay-ui:error exception="<%= CouponEndDateException.class %>" message="please-enter-a-valid-expiration-date" />
+	<liferay-ui:error exception="<%= CouponMinimumOrderException.class %>" message="please-enter-a-valid-number" />
+	<liferay-ui:error exception="<%= CouponNameException.class %>" message="please-enter-a-valid-name" />
+	<liferay-ui:error exception="<%= CouponStartDateException.class %>" message="please-enter-a-valid-start-date" />
+	<liferay-ui:error exception="<%= DuplicateCouponCodeException.class %>" message="please-enter-a-unique-code" />
+
+	<aui:model-context bean="<%= coupon %>" model="<%= ShoppingCoupon.class %>" />
+
+	<aui:fieldset>
+		<c:choose>
+			<c:when test="<%= coupon == null %>">
+				<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" name="code" />
+
+				<aui:input label="autogenerate-code" name="autoCode" type="checkbox" />
+			</c:when>
+			<c:otherwise>
+				<aui:field-wrapper label="code">
+					<liferay-ui:input-resource url="<%= code %>" />
+				</aui:field-wrapper>
+			</c:otherwise>
+		</c:choose>
+
+		<aui:input autoFocus="<%= (windowState.equals(WindowState.MAXIMIZED) && Validator.isNotNull(coupon)) %>" name="name" />
+
+		<aui:input name="description" />
+
+		<aui:input name="startDate" />
+
+		<aui:input dateTogglerCheckboxLabel="never-expire" disabled="<%= neverExpire %>" label="expiration-date" name="endDate" />
+
+		<aui:input name="active" value="<%= Boolean.TRUE %>" />
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+
+	<liferay-ui:panel-container extended="<%= true %>" id="shoppingEditCouponPanelContainer" persistState="<%= true %>">
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="shoppingEditCouponDiscountPanel" persistState="<%= true %>" title="discount">
+			<liferay-ui:message arguments="<%= currencyFormat.format(0) %>" key="coupons-can-be-set-to-only-apply-to-orders-above-a-minimum-amount" translateArguments="<%= false %>" />
+
+			<br /><br />
+
+			<liferay-ui:message key="set-the-discount-amount-and-the-discount-type" />
+
+			<br /><br />
+
+			<liferay-ui:message key="if-the-discount-type-is-free-shipping,-then-shipping-charges-are-subtracted-from-the-order" />
+
+			<aui:fieldset>
+				<aui:input ignoreRequestValue="<%= true %>" label="minimum-order" name="minOrder" size="4" type="text" value="<%= doubleFormat.format(minOrder) %>" />
+
+				<aui:input ignoreRequestValue="<%= true %>" name="discount" size="4" type="text" value="<%= doubleFormat.format(discount) %>" />
+
+				<aui:select name="discountType">
+
+					<%
+					for (int i = 0; i < ShoppingCouponConstants.DISCOUNT_TYPES.length; i++) {
+					%>
+
+						<aui:option label="<%= ShoppingCouponConstants.DISCOUNT_TYPES[i] %>" selected="<%= discountType.equals(ShoppingCouponConstants.DISCOUNT_TYPES[i]) %>" />
+
+					<%
+					}
+					%>
+
+				</aui:select>
+			</aui:fieldset>
+		</liferay-ui:panel>
+
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="shoppingEditCouponLimitsPanel" persistState="<%= true %>" title="limits">
+			<liferay-ui:error exception="<%= CouponLimitCategoriesException.class %>">
+
+				<%
+				List categoryIds = (List)errorException;
+				%>
+
+				<liferay-ui:message key="the-following-are-invalid-category-ids" /> <%= StringUtil.merge((String[])categoryIds.toArray(new String[0])) %>
+			</liferay-ui:error>
+
+			<liferay-ui:error exception="<%= CouponLimitSKUsException.class %>">
+
+				<%
+				List skus = (List)errorException;
+				%>
+
+				<liferay-ui:message key="the-following-are-invalid-item-skus" /> <%= StringUtil.merge((String[])skus.toArray(new String[0])) %>
+			</liferay-ui:error>
+
+			<aui:fieldset>
+				<aui:input label='<%= LanguageUtil.get(pageContext, "this-coupon-only-applies-to-items-that-are-children-of-this-comma-delimited-list-of-categories") + StringPool.SPACE + LanguageUtil.get(pageContext, "leave-this-blank-if-the-coupon-does-not-check-for-the-parent-categories-of-an-item") %>' name="limitCategories" />
+
+				<aui:input label='<%= LanguageUtil.get(pageContext, "this-coupon-only-applies-to-items-with-a-sku-that-corresponds-to-this-comma-delimited-list-of-item-skus") + StringPool.SPACE + LanguageUtil.get(pageContext, "leave-this-blank-if-the-coupon-does-not-check-for-the-item-sku") %>' name="limitSkus" />
+			</aui:fieldset>
+		</liferay-ui:panel>
+	</liferay-ui:panel-container>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />saveCoupon() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (coupon == null) ? Constants.ADD : Constants.UPDATE %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	Liferay.Util.disableToggleBoxes('<portlet:namespace />autoCodeCheckbox', '<portlet:namespace />code', true);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/edit_item.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/edit_item.jsp
new file mode 100644
index 0000000..1207113
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/edit_item.jsp
@@ -0,0 +1,589 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/shopping/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+ShoppingItem item = (ShoppingItem)request.getAttribute(WebKeys.SHOPPING_ITEM);
+
+long itemId = BeanParamUtil.getLong(item, request, "itemId");
+
+long categoryId = BeanParamUtil.getLong(item, request, "categoryId", ShoppingCategoryConstants.DEFAULT_PARENT_CATEGORY_ID);
+
+// Fields
+
+ShoppingItemField[] itemFields = null;
+
+int fieldsCount = ParamUtil.getInteger(request, "fieldsCount");
+String fieldsCountParam = request.getParameter("fieldsCount");
+if ((fieldsCountParam == null) || fieldsCountParam.equals(StringPool.NULL)) {
+	if (item != null) {
+		itemFields = (ShoppingItemField[])ShoppingItemFieldLocalServiceUtil.getItemFields(itemId).toArray(new ShoppingItemField[0]);
+		fieldsCount = itemFields.length;
+	}
+	else {
+		itemFields = new ShoppingItemField[0];
+	}
+}
+else {
+	itemFields = new ShoppingItemField[fieldsCount];
+}
+
+int fieldId = ParamUtil.getInteger(request, "fieldId", -1);
+
+String fieldsQuantities = "";
+
+if (item != null) {
+	fieldsQuantities = GetterUtil.getString(item.getFieldsQuantities());
+}
+
+// Prices
+
+ShoppingItemPrice[] itemPrices = null;
+
+int pricesCount = ParamUtil.getInteger(request, "pricesCount", 1);
+String pricesCountParam = request.getParameter("pricesCount");
+if ((pricesCountParam == null) || pricesCountParam.equals(StringPool.NULL)) {
+	if (item != null) {
+		itemPrices = (ShoppingItemPrice[])ShoppingItemPriceLocalServiceUtil.getItemPrices(itemId).toArray(new ShoppingItemPrice[0]);
+		pricesCount = itemPrices.length;
+	}
+	else {
+		itemPrices = new ShoppingItemPrice[1];
+	}
+}
+else {
+	itemPrices = new ShoppingItemPrice[pricesCount];
+}
+
+int priceId = ParamUtil.getInteger(request, "priceId", -1);
+%>
+
+<portlet:actionURL var="editItemURL">
+	<portlet:param name="struts_action" value="/shopping/edit_item" />
+</portlet:actionURL>
+
+<aui:form action="<%= editItemURL %>" enctype="multipart/form-data" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveItem();" %>'>
+	<input name="scroll" type="hidden" value="" />
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="categoryId" type="hidden" value="<%= categoryId %>" />
+	<aui:input name="itemId" type="hidden" value="<%= itemId %>" />
+	<aui:input name="fieldsCount" type="hidden" value="<%= fieldsCount %>" />
+	<aui:input name="fieldId" type="hidden" />
+	<aui:input name='<%= "fieldName" + fieldsCount %>' type="hidden" />
+	<aui:input name='<%= "fieldValues" + fieldsCount %>' type="hidden" />
+	<aui:input name='<%= "fieldDescription" + fieldsCount %>' type="hidden" />
+	<aui:input name="fieldsQuantities" type="hidden" value="<%= fieldsQuantities %>" />
+	<aui:input name="pricesCount" type="hidden" value="<%= pricesCount %>" />
+	<aui:input name="priceId" type="hidden" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title="item"
+	/>
+
+	<liferay-ui:error exception="<%= DuplicateItemSKUException.class %>" message="the-item-sku-you-requested-is-already-taken" />
+	<liferay-ui:error exception="<%= ItemNameException.class %>" message="please-enter-a-valid-name" />
+	<liferay-ui:error exception="<%= ItemSKUException.class %>" message="please-enter-a-valid-item-sku" />
+
+	<div class="breadcrumbs">
+		<%= ShoppingUtil.getBreadcrumbs(categoryId, pageContext, renderRequest, renderResponse) %>
+	</div>
+
+	<aui:fieldset>
+		<c:if test="<%= item != null %>">
+			<aui:field-wrapper label="category">
+
+				<%
+				String categoryName = "";
+
+				if (categoryId != ShoppingCategoryConstants.DEFAULT_PARENT_CATEGORY_ID) {
+					ShoppingCategory category = ShoppingCategoryServiceUtil.getCategory(categoryId);
+
+					category = category.toEscapedModel();
+
+					categoryName = category.getName();
+				}
+				%>
+
+				<portlet:renderURL var="viewCategoryURL">
+					<portlet:param name="struts_action" value="/shopping/view" />
+					<portlet:param name="categoryId" value="<%= String.valueOf(categoryId) %>" />
+				</portlet:renderURL>
+
+				<div class="input-append">
+					<liferay-ui:input-resource id="categoryName" url="<%= categoryName %>" />
+
+					<portlet:renderURL var="selectCateforyURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+						<portlet:param name="struts_action" value="/shopping/select_category" />
+						<portlet:param name="categoryId" value="<%= String.valueOf(categoryId) %>" />
+					</portlet:renderURL>
+
+					<%
+					String taglibOpenCategoryWindow = "var categoryWindow = window.open('" + selectCateforyURL + "', 'category', 'directories=no,height=640,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=680'); void(''); categoryWindow.focus();";
+					%>
+
+					<aui:button onClick="<%= taglibOpenCategoryWindow %>" value="select" />
+
+					<aui:button onClick='<%= renderResponse.getNamespace() + "removeCategory();" %>' value="remove" />
+				</div>
+			</aui:field-wrapper>
+		</c:if>
+
+		<aui:input bean="<%= item %>" model="<%= ShoppingItem.class %>" name="sku" />
+
+		<aui:input bean="<%= item %>" model="<%= ShoppingItem.class %>" name="name" />
+
+		<aui:input bean="<%= item %>" model="<%= ShoppingItem.class %>" name="description" />
+
+		<aui:input bean="<%= item %>" model="<%= ShoppingItem.class %>" name="properties" />
+
+		<aui:input bean="<%= item %>" model="<%= ShoppingItem.class %>" name="requiresShipping" />
+
+		<aui:input bean="<%= item %>" model="<%= ShoppingItem.class %>" name="featured" />
+
+		<c:if test="<%= fieldsCount == 0 %>">
+			<aui:input bean="<%= item %>" model="<%= ShoppingItem.class %>" name="stockQuantity" />
+		</c:if>
+
+		<c:if test="<%= item == null %>">
+			<aui:field-wrapper label="permissions">
+				<liferay-ui:input-permissions
+					modelName="<%= ShoppingItem.class.getName() %>"
+				/>
+			</aui:field-wrapper>
+		</c:if>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+
+	<liferay-ui:panel-container extended="<%= true %>" id="shoppingEditItemPanelContainer" persistState="<%= true %>">
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="shoppingEditItemFieldsPanel"  persistState="<%= true %>" title="fields">
+			<aui:input name="fields" type="hidden" />
+
+			<liferay-ui:message key="fields-are-added-if-you-need-to-distinguish-items-based-on-criteria-chosen-by-the-user" />
+
+			<br /><br />
+
+			<table class="lfr-table">
+
+			<%
+			for (int i = 0; i < fieldsCount; i++) {
+				int curFieldId = i;
+
+				if ((fieldId > -1) && (i >= fieldId)) {
+					curFieldId++;
+				}
+
+				String fieldName = ParamUtil.getString(request, "fieldName" + curFieldId);
+				String fieldNameParam = request.getParameter("fieldName" + curFieldId);
+				if ((fieldNameParam == null) || fieldNameParam.equals(StringPool.NULL)) {
+					if (itemFields[curFieldId] != null) {
+						fieldName = itemFields[curFieldId].getName();
+					}
+				}
+
+				String[] fieldValues = StringUtil.split(ParamUtil.getString(request, "fieldValues" + curFieldId));
+				String fieldValuesParam = request.getParameter("fieldValues" + curFieldId);
+				if ((fieldValuesParam == null) || fieldValuesParam.equals(StringPool.NULL)) {
+					if (itemFields[curFieldId] != null) {
+						fieldValues = itemFields[curFieldId].getValuesArray();
+					}
+				}
+
+				String fieldDescription = ParamUtil.getString(request, "fieldDescription" + curFieldId);
+				String fieldDescriptionParam = request.getParameter("fieldDescription" + curFieldId);
+				if ((fieldDescriptionParam == null) || fieldDescriptionParam.equals(StringPool.NULL)) {
+					if (itemFields[curFieldId] != null) {
+						fieldDescription = itemFields[curFieldId].getDescription();
+					}
+				}
+			%>
+
+				<tr>
+					<td>
+						<aui:input cssClass="lfr-input-text-container" label="name" name='<%= "fieldName" + i %>' style="width: 100px;" type="text" value="<%= fieldName %>" />
+					</td>
+					<td>
+						<aui:input cssClass="lfr-input-text-container" label="values" name='<%= "fieldValues" + i %>' style="width: 100px;" type="text" value='<%= StringUtil.merge(fieldValues, ", ") %>' />
+					</td>
+					<td>
+						<aui:input cssClass="lfr-input-text-container" label="description" name='<%= "fieldDescription" + i %>' style="width: 150px;" type="text" value="<%= fieldDescription %>" />
+					</td>
+
+					<c:if test="<%= fieldsCount > 0 %>">
+						<td>
+							<aui:button onClick='<%= renderResponse.getNamespace() + "deleteField(" + i + ");" %>' value="delete" />
+						</td>
+					</c:if>
+				</tr>
+
+			<%
+			}
+			%>
+
+			</table>
+
+			<c:if test="<%= fieldsCount > 0 %>">
+				<br />
+			</c:if>
+
+			<aui:button onClick='<%= renderResponse.getNamespace() + "addField();" %>' value="add-field" />
+
+			<c:if test="<%= fieldsCount > 0 %>">
+				<aui:button onClick='<%= renderResponse.getNamespace() + "editItemQuantities();" %>' value="edit-stock-quantity" />
+			</c:if>
+
+			<br /><br />
+
+		</liferay-ui:panel>
+
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>"  id="shoppingEditItemPricesPanel"  persistState="<%= true %>" title="prices">
+			<aui:input name="prices" type="hidden" />
+
+			<aui:fieldset>
+				<table class="lfr-table">
+
+				<%
+				for (int i = 0; i < pricesCount; i++) {
+					int curPriceId = i;
+
+					if ((priceId > -1) && (i >= priceId)) {
+						curPriceId++;
+					}
+
+					int minQuantity = ParamUtil.getInteger(request, "minQuantity" + curPriceId, 0);
+					String minQuantityParam = request.getParameter("minQuantity" + curPriceId);
+					if ((minQuantityParam == null) || minQuantityParam.equals(StringPool.NULL)) {
+						if (itemPrices[curPriceId] != null) {
+							minQuantity = itemPrices[curPriceId].getMinQuantity();
+						}
+					}
+
+					int maxQuantity = ParamUtil.getInteger(request, "maxQuantity" + curPriceId);
+					String maxQuantityParam = request.getParameter("maxQuantity" + curPriceId);
+					if ((maxQuantityParam == null) || maxQuantityParam.equals(StringPool.NULL)) {
+						if (itemPrices[curPriceId] != null) {
+							maxQuantity = itemPrices[curPriceId].getMaxQuantity();
+						}
+					}
+
+					double price = ParamUtil.getDouble(request, "price" + curPriceId);
+					String priceParam = request.getParameter("price" + curPriceId);
+					if ((priceParam == null) || priceParam.equals(StringPool.NULL)) {
+						if (itemPrices[curPriceId] != null) {
+							price = itemPrices[curPriceId].getPrice();
+						}
+					}
+
+					double discount = ParamUtil.getDouble(request, "discount" + curPriceId) / 100;
+					String discountParam = request.getParameter("discount" + curPriceId);
+					if ((discountParam == null) || discountParam.equals(StringPool.NULL)) {
+						if (itemPrices[curPriceId] != null) {
+							discount = itemPrices[curPriceId].getDiscount();
+						}
+					}
+
+					boolean taxable = ParamUtil.getBoolean(request, "taxable" + curPriceId, true);
+					String taxableParam = request.getParameter("taxable" + curPriceId);
+					if ((taxableParam == null) || taxableParam.equals(StringPool.NULL)) {
+						if (itemPrices[curPriceId] != null) {
+							taxable = itemPrices[curPriceId].isTaxable();
+						}
+					}
+
+					double shipping = ParamUtil.getDouble(request, "shipping" + curPriceId);
+					String shippingParam = request.getParameter("shipping" + curPriceId);
+					if ((shippingParam == null) || shippingParam.equals(StringPool.NULL)) {
+						if (itemPrices[curPriceId] != null) {
+							shipping = itemPrices[curPriceId].getShipping();
+						}
+					}
+
+					boolean useShippingFormula = ParamUtil.getBoolean(request, "useShippingFormula" + curPriceId, true);
+					String useShippingFormulaParam = request.getParameter("useShippingFormula" + curPriceId);
+					if ((useShippingFormulaParam == null) || useShippingFormulaParam.equals(StringPool.NULL)) {
+						if (itemPrices[curPriceId] != null) {
+							useShippingFormula = itemPrices[curPriceId].isUseShippingFormula();
+						}
+					}
+
+					boolean active = ParamUtil.getBoolean(request, "active" + curPriceId, true);
+					String activeParam = request.getParameter("active" + curPriceId);
+					if ((activeParam == null) || activeParam.equals(StringPool.NULL)) {
+						if (itemPrices[curPriceId] != null) {
+							int status = itemPrices[curPriceId].getStatus();
+
+							if ((status == ShoppingItemPriceConstants.STATUS_ACTIVE_DEFAULT) || (status == ShoppingItemPriceConstants.STATUS_ACTIVE)) {
+								active = true;
+							}
+							else {
+								active = false;
+							}
+						}
+					}
+
+					String defaultPriceParam = request.getParameter("defaultPrice");
+					boolean defaultPrice = (curPriceId == 0 ? true : false);
+					if (Validator.isNotNull(defaultPriceParam)) {
+						if (ParamUtil.getInteger(request, "defaultPrice") == curPriceId) {
+							defaultPrice = true;
+						}
+						else {
+							defaultPrice = false;
+						}
+					}
+					else {
+						if (itemPrices[curPriceId] != null) {
+							int status = itemPrices[curPriceId].getStatus();
+
+							if (status == ShoppingItemPriceConstants.STATUS_ACTIVE_DEFAULT) {
+								defaultPrice = true;
+							}
+							else {
+								defaultPrice = false;
+							}
+						}
+					}
+				%>
+
+					<tr>
+						<td>
+							<table class="lfr-table">
+							<tr>
+								<td>
+									<aui:input field="minQuantity" fieldParam='<%= "minQuantity" + i %>' label="min-qty" model="<%= ShoppingItemPrice.class %>" name="minQuantity" value="<%= String.valueOf(minQuantity) %>" />
+								</td>
+								<td>
+									<aui:input field="maxQuantity" fieldParam='<%= "maxQuantity" + i %>' label="max-qty" model="<%= ShoppingItemPrice.class %>" name="maxQuantity" value="<%= String.valueOf(maxQuantity) %>" />
+								</td>
+								<td>
+									<aui:input field="price" fieldParam='<%= "price" + i %>' format="<%= doubleFormat %>" label="price" model="<%= ShoppingItemPrice.class %>" name="price" value="<%= String.valueOf(price) %>" />
+								</td>
+								<td>
+									<aui:input field="discount" fieldParam='<%= "discount" + i %>' label="discount" model="<%= ShoppingItemPrice.class %>" name="discount" value="<%= percentFormat.format(discount) %>" />
+								</td>
+								<td>
+									<aui:input label="taxable" name='<%= "taxable" + i %>' param='<%= "taxable" + i %>' type="checkbox" value="<%= taxable %>" />
+								</td>
+							</tr>
+							</table>
+
+							<table class="lfr-table">
+							<tr>
+								<td>
+									<aui:input field="shipping" fieldParam='<%= "shipping" + i %>' format="<%= doubleFormat %>" model="<%= ShoppingItemPrice.class %>" name="shipping" value="<%= String.valueOf(shipping) %>" />
+								</td>
+								<td>
+									<aui:input label="use-shipping-formula" name='<%= "useShippingFormula" + i %>' type="checkbox" value="<%= useShippingFormula %>" />
+								</td>
+								<td>
+									<aui:input label="active" name='<%= "active" + i %>' type="checkbox" value="<%= active %>" />
+								</td>
+								<td>
+									<aui:input checked="<%= defaultPrice %>" label="default" name="defaultPrice" onClick='<%= "document." + renderResponse.getNamespace() + "fm." + renderResponse.getNamespace() + "active" + i + ".checked = true;" %>' type="radio" value="<% i %>" />
+								</td>
+
+								<c:if test="<%= pricesCount > 1 %>">
+									<td>
+										<aui:button onClick='<%= renderResponse.getNamespace() + "deletePrice(" + i + ");" %>' value="delete" />
+									</td>
+								</c:if>
+							</tr>
+							</table>
+
+							<c:if test="<%= (i + 1) < pricesCount %>">
+								<br />
+							</c:if>
+						</td>
+					</tr>
+
+				<%
+				}
+				%>
+
+				</table>
+			</aui:fieldset>
+
+			<aui:button onClick='<%= renderResponse.getNamespace() + "addPrice();" %>' value="add-price" />
+		</liferay-ui:panel>
+
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>"  id="shoppingEditItemImagesPanel" persistState="<%= true %>" title="images">
+			<liferay-ui:error exception="<%= ItemLargeImageNameException.class %>">
+
+				<%
+				String[] imageExtensions = PrefsPropsUtil.getStringArray(PropsKeys.SHOPPING_IMAGE_EXTENSIONS, StringPool.COMMA);
+				%>
+
+				<liferay-ui:message key="image-names-must-end-with-one-of-the-following-extensions" /> <%= StringUtil.merge(imageExtensions, ", ") %>.
+			</liferay-ui:error>
+
+			<liferay-ui:error exception="<%= ItemLargeImageSizeException.class %>">
+
+				<%
+				long imageMaxSize = PrefsPropsUtil.getLong(PropsKeys.SHOPPING_IMAGE_LARGE_MAX_SIZE) / 1024;
+				%>
+
+				<liferay-ui:message arguments="<%= imageMaxSize %>" key="please-enter-a-file-with-a-valid-file-size-no-larger-than-x" />
+			</liferay-ui:error>
+
+			<liferay-ui:error exception="<%= ItemMediumImageNameException.class %>">
+
+				<%
+				String[] imageExtensions = PrefsPropsUtil.getStringArray(PropsKeys.SHOPPING_IMAGE_EXTENSIONS, StringPool.COMMA);
+				%>
+
+				<liferay-ui:message key="image-names-must-end-with-one-of-the-following-extensions" /> <%= StringUtil.merge(imageExtensions, ", ") %>.
+			</liferay-ui:error>
+
+			<liferay-ui:error exception="<%= ItemMediumImageSizeException.class %>">
+
+				<%
+				long imageMaxSize = PrefsPropsUtil.getLong(PropsKeys.SHOPPING_IMAGE_MEDIUM_MAX_SIZE) / 1024;
+				%>
+
+				<liferay-ui:message arguments="<%= imageMaxSize %>" key="please-enter-a-file-with-a-valid-file-size-no-larger-than-x" />
+			</liferay-ui:error>
+
+			<liferay-ui:error exception="<%= ItemSmallImageNameException.class %>">
+
+				<%
+				String[] imageExtensions = PrefsPropsUtil.getStringArray(PropsKeys.SHOPPING_IMAGE_EXTENSIONS, StringPool.COMMA);
+				%>
+
+				<liferay-ui:message key="image-names-must-end-with-one-of-the-following-extensions" /> <%= StringUtil.merge(imageExtensions, ", ") %>.
+			</liferay-ui:error>
+
+			<liferay-ui:error exception="<%= ItemSmallImageSizeException.class %>">
+
+				<%
+				long imageMaxSize = PrefsPropsUtil.getLong(PropsKeys.SHOPPING_IMAGE_SMALL_MAX_SIZE) / 1024;
+				%>
+
+				<liferay-ui:message arguments="<%= imageMaxSize %>" key="please-enter-a-file-with-a-valid-file-size-no-larger-than-x" />
+			</liferay-ui:error>
+
+			<aui:fieldset>
+				<aui:input label="small-image-url" name="smallImageURL" />
+
+				<span style="font-size: xx-small;">-- <%= StringUtil.toUpperCase(LanguageUtil.get(pageContext, "or")) %> --</span> <liferay-ui:message key="small-image" />
+
+				<aui:input label="" name="smallFile" type="file" />
+
+				<aui:input checked="<%= ((item != null) && item.isSmallImage()) ? true : false %>" label="use-small-image" name="smallImage" type="checkbox" />
+
+				<aui:input label="medium-image-url" name="mediumImageURL" />
+
+				<span style="font-size: xx-small;">-- <%= StringUtil.toUpperCase(LanguageUtil.get(pageContext, "or")) %> --</span> <liferay-ui:message key="medium-image" />
+
+				<aui:input label="" name="mediumFile" type="file" />
+
+				<aui:input checked="<%= ((item != null) && item.isMediumImage()) ? true : false %>" label="use-medium-image" name="mediumImage" type="checkbox" />
+
+				<aui:input label="large-image-url" name="largeImageURL" />
+
+				<span style="font-size: xx-small;">-- <%= StringUtil.toUpperCase(LanguageUtil.get(pageContext, "or")) %> --</span> <liferay-ui:message key="large-image" />
+
+				<aui:input label="" name="largeFile" type="file" />
+
+				<aui:input checked="<%= ((item != null) && item.isLargeImage()) ? true : false %>" label="use-large-image" name="largeImage" type="checkbox" />
+			</aui:fieldset>
+		</liferay-ui:panel>
+	</liferay-ui:panel-container>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />addField() {
+		document.<portlet:namespace />fm.scroll.value = "<portlet:namespace />fields";
+		document.<portlet:namespace />fm.<portlet:namespace />fieldsCount.value = <%= fieldsCount + 1 %>;
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />addPrice() {
+		document.<portlet:namespace />fm.scroll.value = "<portlet:namespace />prices";
+		document.<portlet:namespace />fm.<portlet:namespace />pricesCount.value = <%= pricesCount + 1 %>;
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />deleteField(i) {
+		document.<portlet:namespace />fm.scroll.value = "<portlet:namespace />fields";
+		document.<portlet:namespace />fm.<portlet:namespace />fieldsCount.value = <%= fieldsCount - 1 %>;
+		document.<portlet:namespace />fm.<portlet:namespace />fieldId.value = i;
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />deletePrice(i) {
+		if (document.<portlet:namespace />fm.<portlet:namespace />defaultPrice[i].checked) {
+			alert("<%= UnicodeLanguageUtil.get(pageContext, "you-cannot-delete-or-deactivate-a-default-price") %>");
+		}
+		else if (document.<portlet:namespace />fm.<portlet:namespace />pricesCount.value > 1) {
+			document.<portlet:namespace />fm.scroll.value = "<portlet:namespace />prices";
+			document.<portlet:namespace />fm.<portlet:namespace />pricesCount.value = <%= pricesCount - 1 %>;
+			document.<portlet:namespace />fm.<portlet:namespace />priceId.value = i;
+
+			submitForm(document.<portlet:namespace />fm);
+		}
+	}
+
+	function <portlet:namespace />editItemQuantities() {
+		var itemQuantitiesURL = "<liferay-portlet:renderURL windowState="<%= LiferayWindowState.POP_UP.toString() %>" anchor="false"><portlet:param name="struts_action" value="/shopping/edit_item_quantities" /></liferay-portlet:renderURL>&<portlet:namespace />fieldsQuantities=" + document.<portlet:namespace />fm.<portlet:namespace />fieldsQuantities.value;
+
+		<%
+		for (int i = 0; i < fieldsCount; i++) {
+		%>
+
+			itemQuantitiesURL += "&<portlet:namespace />n<%= i %>=" + encodeURIComponent(document.<portlet:namespace />fm.<portlet:namespace />fieldName<%= i %>.value);
+			itemQuantitiesURL += "&<portlet:namespace />v<%= i %>=" + encodeURIComponent(document.<portlet:namespace />fm.<portlet:namespace />fieldValues<%= i %>.value);
+
+		<%
+		}
+		%>
+
+		var itemQuantitiesWindow = window.open(itemQuantitiesURL, "itemQuantities", "directories=no,height=400,location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no,width=300");
+
+		void("");
+
+		itemQuantitiesWindow.focus();
+	}
+
+	function <portlet:namespace />removeCategory() {
+		document.<portlet:namespace />fm.<portlet:namespace />categoryId.value = "<%= ShoppingCategoryConstants.DEFAULT_PARENT_CATEGORY_ID %>";
+
+		document.getElementById('<portlet:namespace />categoryName').value = '';
+	}
+
+	function <portlet:namespace />saveItem() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (item == null) ? Constants.ADD : Constants.UPDATE %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />selectCategory(categoryId, categoryName) {
+		document.<portlet:namespace />fm.<portlet:namespace />categoryId.value = categoryId;
+
+		document.getElementById('<portlet:namespace />categoryName').value = categoryName;
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/edit_item_quantities.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/edit_item_quantities.jsp
new file mode 100644
index 0000000..84a2d90
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/edit_item_quantities.jsp
@@ -0,0 +1,141 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/shopping/init.jsp" %>
+
+<%
+String[] fieldsQuantities = StringUtil.split(ParamUtil.getString(request, "fieldsQuantities"));
+
+List<String> names = new ArrayList<String>();
+List<String[]> values = new ArrayList<String[]>();
+
+for (int i = 0; i < 9; i++) {
+	String n = request.getParameter("n" + i);
+	String v = request.getParameter("v" + i);
+
+	if ((n == null) || (v == null)) {
+		break;
+	}
+
+	names.add(n);
+	values.add(StringUtil.split(v));
+}
+
+int rowsCount = 1;
+
+for (String[] vArray : values) {
+	rowsCount = rowsCount * vArray.length;
+}
+%>
+
+<aui:form method="post" name="fm">
+	<aui:fieldset>
+		<table border="1" cellpadding="4" cellspacing="0">
+		<tr>
+
+			<%
+			for (String name : names) {
+			%>
+
+				<td>
+					<strong><%= HtmlUtil.escape(name) %></strong>
+				</td>
+
+			<%
+			}
+			%>
+
+			<td>
+				<strong><liferay-ui:message key="quantity" /></strong>
+			</td>
+		</tr>
+
+		<%
+		for (int i = 0; i < rowsCount; i++) {
+		%>
+
+			<tr>
+
+				<%
+				for (int j = 0; j < names.size(); j++) {
+					int numOfRepeats = 1;
+
+					for (int k = j + 1; k < values.size(); k++) {
+						String[] vArray = values.get(k);
+
+						numOfRepeats = numOfRepeats * vArray.length;
+					}
+
+					String[] vArray = values.get(j);
+
+					int arrayPos;
+
+					for (arrayPos = i / numOfRepeats; arrayPos >= vArray.length; arrayPos = arrayPos - vArray.length) {
+					}
+				%>
+
+					<td>
+						<%= HtmlUtil.escape(vArray[arrayPos]) %>
+					</td>
+
+				<%
+				}
+
+				int fieldsQuantity = 0;
+
+				if (i < fieldsQuantities.length) {
+					fieldsQuantity = GetterUtil.getInteger(fieldsQuantities[i]);
+				}
+				%>
+
+				<td>
+					<aui:input label="" name='<%= "fieldsQuantity" + i %>' size="4" type="text" value="<%= fieldsQuantity %>" />
+				</td>
+			</tr>
+
+		<%
+		}
+		%>
+
+		</table>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button onClick='<%= renderResponse.getNamespace() + "updateItemQuantities();" %>' value="update" />
+
+		<aui:button onClick="self.close();" type="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />updateItemQuantities() {
+		var itemQuantities = "";
+
+		<%
+		for (int i = 0; i < rowsCount; i++) {
+		%>
+
+			itemQuantities = itemQuantities + document.<portlet:namespace />fm.<portlet:namespace />fieldsQuantity<%= i %>.value + ",";
+
+		<%
+		}
+		%>
+
+		opener.document.<portlet:namespace />fm.<portlet:namespace />fieldsQuantities.value = itemQuantities;
+
+		self.close();
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/edit_order.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/edit_order.jsp
new file mode 100644
index 0000000..02c7aff
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/edit_order.jsp
@@ -0,0 +1,606 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/shopping/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+ShoppingOrder order = (ShoppingOrder)request.getAttribute(WebKeys.SHOPPING_ORDER);
+
+order = order.toEscapedModel();
+
+long orderId = BeanParamUtil.getLong(order, request, "orderId");
+%>
+
+<portlet:actionURL var="editOrderURL">
+	<portlet:param name="struts_action" value="/shopping/edit_order" />
+</portlet:actionURL>
+
+<aui:form action="<%= editOrderURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+	<aui:input name="orderId" type="hidden" value="<%= orderId %>" />
+	<aui:input name="number" type="hidden" value="<%= order.getNumber() %>" />
+	<aui:input name="emailType" type="hidden" />
+	<aui:input name="deleteOrderIds" type="hidden" value="<%= orderId %>" />
+
+	<c:choose>
+		<c:when test="<%= windowState.equals(LiferayWindowState.POP_UP) %>">
+			<h3 class="header-title">
+				<aui:a href="<%= themeDisplay.getURLHome() %>"><img alt="<liferay-ui:message key="logo" />" src="<%= themeDisplay.getCompanyLogo() %>" /></aui:a>
+
+				<liferay-ui:message key="invoice" />
+			</h3>
+		</c:when>
+		<c:otherwise>
+			<liferay-ui:header
+				backURL="<%= redirect %>"
+				title="order"
+			/>
+		</c:otherwise>
+	</c:choose>
+
+	<div class="well">
+		<table class="lfr-table">
+		<tr>
+			<th class="text-left">
+				<liferay-ui:message key="order" /> #:
+			</th>
+			<td>
+				<strong><%= order.getNumber() %></strong>
+			</td>
+		</tr>
+		<tr>
+			<th class="text-left">
+				<liferay-ui:message key="order-date" />:
+			</th>
+			<td>
+				<%= dateFormatDateTime.format(order.getCreateDate()) %>
+			</td>
+		</tr>
+		<tr>
+			<th class="text-left">
+				<liferay-ui:message key="last-modified" />:
+			</th>
+			<td>
+				<%= dateFormatDateTime.format(order.getModifiedDate()) %>
+			</td>
+		</tr>
+		</table>
+	</div>
+
+	<div class="row-fluid">
+		<div class="span6">
+			<div class="well">
+				<h4><liferay-ui:message key="billing-address" /></h4>
+
+				<table class="lfr-table">
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="first-name" />:
+					</th>
+					<td>
+						<%= order.getBillingFirstName() %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="last-name" />:
+					</th>
+					<td>
+						<%= order.getBillingLastName() %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="email-address" />:
+					</th>
+					<td>
+						<%= order.getBillingEmailAddress() %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="company" />:
+					</th>
+					<td>
+						<%= order.getBillingCompany() %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="street" />:
+					</th>
+					<td>
+						<%= order.getBillingStreet() %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="city" />
+					</th>
+					<td>
+						<%= order.getBillingCity() %>:
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="state" />:
+					</th>
+					<td>
+						<%= order.getBillingState() %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="postal-code" />:
+					</th>
+					<td>
+						<%= order.getBillingZip() %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="country" />:
+					</th>
+					<td>
+						<%= order.getBillingCountry() %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="phone" />:
+					</th>
+					<td>
+						<%= order.getBillingPhone() %>
+					</td>
+				</tr>
+				</table>
+			</div>
+		</div>
+
+		<div class="span6">
+			<div class="well">
+				<h4><liferay-ui:message key="shipping-address" /></h4>
+
+				<table class="lfr-table">
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="first-name" />:
+					</th>
+					<td>
+						<%= order.getShippingFirstName() %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="last-name" />:
+					</th>
+					<td>
+						<%= order.getShippingLastName() %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="email-address" />:
+					</th>
+					<td>
+						<%= order.getShippingEmailAddress() %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="company" />:
+					</th>
+					<td>
+						<%= order.getShippingCompany() %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="street" />:
+					</th>
+					<td>
+						<%= order.getShippingStreet() %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="city" />
+					</th>
+					<td>
+						<%= order.getShippingCity() %>:
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="state" />:
+					</th>
+					<td>
+						<%= order.getShippingState() %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="postal-code" />:
+					</th>
+					<td>
+						<%= order.getShippingZip() %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="country" />:
+					</th>
+					<td>
+						<%= order.getShippingCountry() %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="phone" />:
+					</th>
+					<td>
+						<%= order.getShippingPhone() %>
+					</td>
+				</tr>
+				</table>
+			</div>
+		</div>
+	</div>
+
+	<div class="well">
+		<c:choose>
+			<c:when test="<%= shoppingPrefs.usePayPal() %>">
+				<aui:model-context bean="<%= order %>" model="<%= ShoppingOrder.class %>" />
+
+				<aui:fieldset label="PayPal">
+					<aui:select label="status" name="ppPaymentStatus">
+
+						<%
+						for (int i = 0; i < ShoppingOrderConstants.STATUSES.length; i++) {
+						%>
+
+							<aui:option label="<%= ShoppingOrderConstants.STATUSES[i] %>" selected="<%= ShoppingUtil.getPpPaymentStatus(ShoppingOrderConstants.STATUSES[i]).equals(order.getPpPaymentStatus()) %>" />
+
+						<%
+						}
+						%>
+
+					</aui:select>
+
+					<aui:input label="transaction-id" name="ppTxnId" />
+
+					<aui:input label="payment-gross" name="ppPaymentGross" value="<%= doubleFormat.format(order.getPpPaymentGross()) %>" />
+
+					<aui:input label="receiver-email-address" name="ppReceiverEmail" />
+
+					<aui:input label="payer-email-address" name="ppPayerEmail" />
+
+					<c:if test="<%= order.getPpPaymentStatus().equals(ShoppingOrderConstants.STATUS_CHECKOUT) %>">
+						<aui:field-wrapper label="paypal-order">
+
+							<%
+							String payPalLinkOpen = "<a href=\"" + ShoppingUtil.getPayPalRedirectURL(shoppingPrefs, order, ShoppingUtil.calculateTotal(order), ShoppingUtil.getPayPalReturnURL(renderResponse.createActionURL(), order), ShoppingUtil.getPayPalNotifyURL(themeDisplay)) + "\"><strong><u>";
+							String payPalLinkClose = "</u></strong></a>";
+							%>
+
+							<liferay-ui:message arguments="<%= new Object[] {payPalLinkOpen, payPalLinkClose} %>" key="please-complete-your-order" translateArguments="<%= false %>" />
+						</aui:field-wrapper>
+					</c:if>
+				</aui:fieldset>
+			</c:when>
+			<c:otherwise>
+				<h4><liferay-ui:message key="credit-card" /></h4>
+
+				<table class="lfr-table">
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="full-name" />:
+					</th>
+					<td>
+						<%= order.getCcName() %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="type" />:
+					</th>
+					<td>
+						<liferay-ui:message key='<%= "cc_" + order.getCcType() %>' />
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="number" />:
+					</th>
+					<td>
+						<%= CreditCard.hide(order.getCcNumber()) %>
+					</td>
+				</tr>
+				<tr>
+					<th class="text-left">
+						<liferay-ui:message key="expiration-date" />:
+					</th>
+					<td>
+						<%= CalendarUtil.getMonths(locale)[order.getCcExpMonth()] %>, <%= order.getCcExpYear() %>
+					</td>
+				</tr>
+
+				<c:if test="<%= Validator.isNotNull(order.getCcVerNumber()) %>">
+					<tr>
+						<th class="text-left">
+							<liferay-ui:message key="verification-number" />:
+						</th>
+						<td>
+							<%= order.getCcVerNumber() %>
+						</td>
+					</tr>
+				</c:if>
+
+				</table>
+			</c:otherwise>
+		</c:choose>
+	</div>
+
+	<c:if test="<%= Validator.isNotNull(order.getComments()) %>">
+		<div class="well">
+			<h4><liferay-ui:message key="comments" /></h4>
+
+			<%= HtmlUtil.escape(order.getComments()) %>
+		</div>
+	</c:if>
+
+	<%
+	StringBuilder itemIds = new StringBuilder();
+
+	SearchContainer searchContainer = new SearchContainer();
+
+	List<String> headerNames = new ArrayList<String>();
+
+	headerNames.add("sku");
+	headerNames.add("description");
+	headerNames.add("quantity");
+	headerNames.add("price");
+	headerNames.add("total");
+
+	searchContainer.setHeaderNames(headerNames);
+	searchContainer.setHover(false);
+
+	List<ShoppingOrderItem> results = ShoppingOrderItemLocalServiceUtil.getOrderItems(order.getOrderId());
+
+	int total = results.size();
+
+	searchContainer.setTotal(total);
+
+	List resultRows = searchContainer.getResultRows();
+
+	for (int i = 0; i < total; i++) {
+		ShoppingOrderItem orderItem = results.get(i);
+
+		ShoppingItem item = null;
+
+		try {
+			item = ShoppingItemServiceUtil.getItem(ShoppingUtil.getItemId(orderItem.getItemId()));
+		}
+		catch (Exception e) {
+		}
+
+		String[] fieldsArray = StringUtil.split(ShoppingUtil.getItemFields(orderItem.getItemId()), '&');
+
+		int quantity = orderItem.getQuantity();
+
+		ResultRow row = new ResultRow(item, orderItem.getOrderItemId(), i);
+
+		PortletURL rowURL = null;
+
+		if (item != null) {
+			rowURL = renderResponse.createRenderURL();
+
+			rowURL.setParameter("struts_action", "/shopping/view_item");
+			rowURL.setParameter("itemId", String.valueOf(item.getItemId()));
+		}
+
+		// SKU
+
+		row.addText(orderItem.getSku(), rowURL);
+
+		// Description
+
+		if (fieldsArray.length > 0) {
+			StringBundler sb = new StringBundler(4);
+
+			sb.append(HtmlUtil.escape(orderItem.getName()));
+			sb.append(" (");
+			sb.append(StringUtil.replace(StringUtil.merge(fieldsArray, ", "), "=", ": "));
+			sb.append(StringPool.CLOSE_PARENTHESIS);
+
+			row.addText(sb.toString(), rowURL);
+		}
+		else {
+			row.addText(HtmlUtil.escape(orderItem.getName()), rowURL);
+		}
+
+		// Quantity
+
+		row.addText(String.valueOf(quantity), rowURL);
+
+		// Price
+
+		row.addText(currencyFormat.format(orderItem.getPrice()), rowURL);
+
+		// Total
+
+		row.addText(currencyFormat.format(orderItem.getPrice() * quantity), rowURL);
+
+		// Add result row
+
+		resultRows.add(row);
+	}
+	%>
+
+	<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+
+	<div class="well">
+		<table class="lfr-table">
+		<tr>
+			<th class="text-left">
+				<liferay-ui:message key="subtotal" />:
+			</th>
+			<td>
+				<%= currencyFormat.format(ShoppingUtil.calculateActualSubtotal(results)) %>
+			</td>
+		</tr>
+		<tr>
+			<th class="text-left">
+				<liferay-ui:message key="tax" />:
+			</th>
+			<td>
+				<%= currencyFormat.format(order.getTax()) %>
+			</td>
+		</tr>
+		<tr>
+			<th class="text-left">
+				<liferay-ui:message key="shipping" /> <%= Validator.isNotNull(order.getAltShipping()) ? "(" + order.getAltShipping() + ")" : StringPool.BLANK %>
+			</th>
+			<td>
+				<%= currencyFormat.format(order.getShipping()) %>
+			</td>
+		</tr>
+
+		<c:if test="<%= order.isInsure() %>">
+			<tr>
+				<th class="text-left">
+					<liferay-ui:message key="insurance" />:
+				</th>
+				<td>
+					<%= currencyFormat.format(order.getInsurance()) %>
+				</td>
+			</tr>
+		</c:if>
+
+		<c:if test="<%= Validator.isNotNull(order.getCouponCodes()) %>">
+			<tr>
+				<th class="text-left">
+					<liferay-ui:message key="coupon-discount" />:
+				</th>
+				<td>
+					<%= currencyFormat.format(order.getCouponDiscount()) %>
+
+					<portlet:renderURL var="viewCouponURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+						<portlet:param name="struts_action" value="/shopping/view_coupon" />
+						<portlet:param name="code" value="<%= order.getCouponCodes() %>" />
+					</portlet:renderURL>
+
+					<%
+					String taglibOpenCouponWindow = "var viewCouponWindow = window.open('" + viewCouponURL + "', 'viewCoupon', 'directories=no,height=200,location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no,width=280'); void(''); viewCouponWindow.focus();";
+					%>
+
+					<aui:a href='<%= "javascript:" + taglibOpenCouponWindow %>' label='<%= "(" + LanguageUtil.get(pageContext, order.getCouponCodes()) + ")" %>' />
+				</td>
+			</tr>
+		</c:if>
+
+		<tr>
+			<th class="text-left">
+				<liferay-ui:message key="total" />:
+			</th>
+			<td>
+				<%= currencyFormat.format(ShoppingUtil.calculateTotal(order)) %>
+			</td>
+		</tr>
+		</table>
+	</div>
+
+	<c:if test="<%= !windowState.equals(LiferayWindowState.POP_UP) %>">
+		<aui:button-row>
+			<c:if test="<%= shoppingPrefs.usePayPal() %>">
+				<aui:button onClick='<%= renderResponse.getNamespace() + "saveOrder();" %>' value="save" />
+			</c:if>
+
+			<portlet:renderURL var="viewInvoiceURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+				<portlet:param name="struts_action" value="/shopping/edit_order" />
+				<portlet:param name="orderId" value="<%= String.valueOf(orderId) %>" />
+			</portlet:renderURL>
+
+			<%
+			String taglibOpenInvoiceWindow = "window.open('" + viewInvoiceURL + "');";
+			%>
+
+			<aui:button onClick="<%= taglibOpenInvoiceWindow %>" value="invoice" />
+
+			<%
+			String taglibSendEmailConfirmation = renderResponse.getNamespace() + "sendEmail('confirmation');";
+			%>
+
+			<aui:button onClick="<%= taglibSendEmailConfirmation %>" value='<%= LanguageUtil.get(pageContext, (order.isSendOrderEmail() ? "" : "re") + "send-confirmation-email") %>' />
+
+			<%
+			String taglibSendEmailShipping = renderResponse.getNamespace() + "sendEmail('shipping');";
+			%>
+
+			<aui:button onClick="<%= taglibSendEmailShipping %>" value='<%= LanguageUtil.get(pageContext, (order.isSendShippingEmail() ? "" : "re") + "send-shipping-email") %>' />
+
+			<c:if test="<%= ShoppingOrderPermission.contains(permissionChecker, scopeGroupId, order, ActionKeys.DELETE) %>">
+				<aui:button onClick='<%= renderResponse.getNamespace() + "deleteOrder();" %>' value="delete" />
+			</c:if>
+
+			<aui:button href="<%= redirect %>" type="cancel" />
+		</aui:button-row>
+	</c:if>
+</aui:form>
+
+<c:if test="<%= PropsValues.SHOPPING_ORDER_COMMENTS_ENABLED && !windowState.equals(LiferayWindowState.POP_UP) %>">
+	<liferay-ui:panel-container extended="<%= true %>"  id="shoppingEditOrderPanelContainer" persistState="<%= true %>">
+		<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="shoppingEditOrderCommentsPanel" persistState="<%= true %>" title="comments">
+			<portlet:actionURL var="discussionURL">
+				<portlet:param name="struts_action" value="/shopping/edit_order_discussion" />
+			</portlet:actionURL>
+
+			<liferay-ui:discussion
+				className="<%= ShoppingOrder.class.getName() %>"
+				classPK="<%= order.getOrderId() %>"
+				formAction="<%= discussionURL %>"
+				formName="fm2"
+				redirect="<%= currentURL %>"
+				userId="<%= order.getUserId() %>"
+			/>
+		</liferay-ui:panel>
+	</liferay-ui:panel-container>
+</c:if>
+
+<aui:script>
+	function <portlet:namespace />deleteOrder() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.DELETE %>";
+		document.<portlet:namespace />fm.<portlet:namespace />redirect.value = "<%= HtmlUtil.escapeURL(redirect) %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />saveOrder() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.UPDATE %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />sendEmail(emailType) {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "sendEmail";
+		document.<portlet:namespace />fm.<portlet:namespace />emailType.value = emailType;
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/error.jsp
new file mode 100644
index 0000000..34dc9df
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/error.jsp
@@ -0,0 +1,28 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/shopping/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= NoSuchCategoryException.class %>" message="the-category-could-not-be-found" />
+<liferay-ui:error exception="<%= NoSuchCouponException.class %>" message="the-coupon-could-not-be-found" />
+<liferay-ui:error exception="<%= NoSuchItemException.class %>" message="the-item-could-not-be-found" />
+<liferay-ui:error exception="<%= NoSuchOrderException.class %>" message="the-order-could-not-be-found" />
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/init.jsp
new file mode 100644
index 0000000..626fc2f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/init.jsp
@@ -0,0 +1,130 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.amazonrankings.util.AmazonRankingsUtil" %><%@
+page import="com.liferay.portlet.shopping.AmazonException" %><%@
+page import="com.liferay.portlet.shopping.BillingCityException" %><%@
+page import="com.liferay.portlet.shopping.BillingCountryException" %><%@
+page import="com.liferay.portlet.shopping.BillingEmailAddressException" %><%@
+page import="com.liferay.portlet.shopping.BillingFirstNameException" %><%@
+page import="com.liferay.portlet.shopping.BillingLastNameException" %><%@
+page import="com.liferay.portlet.shopping.BillingPhoneException" %><%@
+page import="com.liferay.portlet.shopping.BillingStateException" %><%@
+page import="com.liferay.portlet.shopping.BillingStreetException" %><%@
+page import="com.liferay.portlet.shopping.BillingZipException" %><%@
+page import="com.liferay.portlet.shopping.CCExpirationException" %><%@
+page import="com.liferay.portlet.shopping.CCNameException" %><%@
+page import="com.liferay.portlet.shopping.CCNumberException" %><%@
+page import="com.liferay.portlet.shopping.CCTypeException" %><%@
+page import="com.liferay.portlet.shopping.CartMinQuantityException" %><%@
+page import="com.liferay.portlet.shopping.CategoryNameException" %><%@
+page import="com.liferay.portlet.shopping.CouponActiveException" %><%@
+page import="com.liferay.portlet.shopping.CouponCodeException" %><%@
+page import="com.liferay.portlet.shopping.CouponDateException" %><%@
+page import="com.liferay.portlet.shopping.CouponDescriptionException" %><%@
+page import="com.liferay.portlet.shopping.CouponDiscountException" %><%@
+page import="com.liferay.portlet.shopping.CouponEndDateException" %><%@
+page import="com.liferay.portlet.shopping.CouponLimitCategoriesException" %><%@
+page import="com.liferay.portlet.shopping.CouponLimitSKUsException" %><%@
+page import="com.liferay.portlet.shopping.CouponMinimumOrderException" %><%@
+page import="com.liferay.portlet.shopping.CouponNameException" %><%@
+page import="com.liferay.portlet.shopping.CouponStartDateException" %><%@
+page import="com.liferay.portlet.shopping.DuplicateCouponCodeException" %><%@
+page import="com.liferay.portlet.shopping.DuplicateItemSKUException" %><%@
+page import="com.liferay.portlet.shopping.ItemLargeImageNameException" %><%@
+page import="com.liferay.portlet.shopping.ItemLargeImageSizeException" %><%@
+page import="com.liferay.portlet.shopping.ItemMediumImageNameException" %><%@
+page import="com.liferay.portlet.shopping.ItemMediumImageSizeException" %><%@
+page import="com.liferay.portlet.shopping.ItemNameException" %><%@
+page import="com.liferay.portlet.shopping.ItemSKUException" %><%@
+page import="com.liferay.portlet.shopping.ItemSmallImageNameException" %><%@
+page import="com.liferay.portlet.shopping.ItemSmallImageSizeException" %><%@
+page import="com.liferay.portlet.shopping.NoSuchCategoryException" %><%@
+page import="com.liferay.portlet.shopping.NoSuchCouponException" %><%@
+page import="com.liferay.portlet.shopping.NoSuchItemException" %><%@
+page import="com.liferay.portlet.shopping.NoSuchOrderException" %><%@
+page import="com.liferay.portlet.shopping.ShippingCityException" %><%@
+page import="com.liferay.portlet.shopping.ShippingCountryException" %><%@
+page import="com.liferay.portlet.shopping.ShippingEmailAddressException" %><%@
+page import="com.liferay.portlet.shopping.ShippingFirstNameException" %><%@
+page import="com.liferay.portlet.shopping.ShippingLastNameException" %><%@
+page import="com.liferay.portlet.shopping.ShippingPhoneException" %><%@
+page import="com.liferay.portlet.shopping.ShippingStateException" %><%@
+page import="com.liferay.portlet.shopping.ShippingStreetException" %><%@
+page import="com.liferay.portlet.shopping.ShippingZipException" %><%@
+page import="com.liferay.portlet.shopping.model.ShoppingCart" %><%@
+page import="com.liferay.portlet.shopping.model.ShoppingCartItem" %><%@
+page import="com.liferay.portlet.shopping.model.ShoppingCategory" %><%@
+page import="com.liferay.portlet.shopping.model.ShoppingCategoryConstants" %><%@
+page import="com.liferay.portlet.shopping.model.ShoppingCoupon" %><%@
+page import="com.liferay.portlet.shopping.model.ShoppingCouponConstants" %><%@
+page import="com.liferay.portlet.shopping.model.ShoppingItem" %><%@
+page import="com.liferay.portlet.shopping.model.ShoppingItemField" %><%@
+page import="com.liferay.portlet.shopping.model.ShoppingItemPrice" %><%@
+page import="com.liferay.portlet.shopping.model.ShoppingItemPriceConstants" %><%@
+page import="com.liferay.portlet.shopping.model.ShoppingOrder" %><%@
+page import="com.liferay.portlet.shopping.model.ShoppingOrderConstants" %><%@
+page import="com.liferay.portlet.shopping.model.ShoppingOrderItem" %><%@
+page import="com.liferay.portlet.shopping.search.CouponDisplayTerms" %><%@
+page import="com.liferay.portlet.shopping.search.CouponSearch" %><%@
+page import="com.liferay.portlet.shopping.search.OrderDisplayTerms" %><%@
+page import="com.liferay.portlet.shopping.search.OrderSearch" %><%@
+page import="com.liferay.portlet.shopping.search.OrderSearchTerms" %><%@
+page import="com.liferay.portlet.shopping.service.ShoppingCartLocalServiceUtil" %><%@
+page import="com.liferay.portlet.shopping.service.ShoppingCategoryServiceUtil" %><%@
+page import="com.liferay.portlet.shopping.service.ShoppingCouponLocalServiceUtil" %><%@
+page import="com.liferay.portlet.shopping.service.ShoppingCouponServiceUtil" %><%@
+page import="com.liferay.portlet.shopping.service.ShoppingItemFieldLocalServiceUtil" %><%@
+page import="com.liferay.portlet.shopping.service.ShoppingItemLocalServiceUtil" %><%@
+page import="com.liferay.portlet.shopping.service.ShoppingItemPriceLocalServiceUtil" %><%@
+page import="com.liferay.portlet.shopping.service.ShoppingItemServiceUtil" %><%@
+page import="com.liferay.portlet.shopping.service.ShoppingOrderItemLocalServiceUtil" %><%@
+page import="com.liferay.portlet.shopping.service.ShoppingOrderLocalServiceUtil" %><%@
+page import="com.liferay.portlet.shopping.service.permission.ShoppingCategoryPermission" %><%@
+page import="com.liferay.portlet.shopping.service.permission.ShoppingItemPermission" %><%@
+page import="com.liferay.portlet.shopping.service.permission.ShoppingOrderPermission" %><%@
+page import="com.liferay.portlet.shopping.service.permission.ShoppingPermission" %><%@
+page import="com.liferay.portlet.shopping.util.ShoppingPreferences" %><%@
+page import="com.liferay.portlet.shopping.util.ShoppingUtil" %>
+
+<%
+PortalPreferences portalPreferences = PortletPreferencesFactoryUtil.getPortalPreferences(request);
+
+ShoppingPreferences shoppingPrefs = ShoppingPreferences.getInstance(company.getCompanyId(), scopeGroupId);
+
+Currency currency = Currency.getInstance(shoppingPrefs.getCurrencyId());
+
+NumberFormat currencyFormat = NumberFormat.getCurrencyInstance(locale);
+
+currencyFormat.setCurrency(currency);
+
+Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(locale, timeZone);
+
+NumberFormat doubleFormat = NumberFormat.getNumberInstance(locale);
+
+doubleFormat.setMaximumFractionDigits(2);
+doubleFormat.setMinimumFractionDigits(2);
+
+NumberFormat percentFormat = NumberFormat.getPercentInstance(locale);
+
+NumberFormat taxFormat = NumberFormat.getPercentInstance(locale);
+
+taxFormat.setMinimumFractionDigits(3);
+%>
+
+<%@ include file="/html/portlet/shopping/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/item_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/item_action.jsp
new file mode 100644
index 0000000..6bb9f5b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/item_action.jsp
@@ -0,0 +1,66 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/shopping/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+ShoppingItem item = (ShoppingItem)row.getObject();
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= ShoppingItemPermission.contains(permissionChecker, item, ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/shopping/edit_item" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="itemId" value="<%= String.valueOf(item.getItemId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= ShoppingItemPermission.contains(permissionChecker, item, ActionKeys.PERMISSIONS) %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= ShoppingItem.class.getName() %>"
+			modelResourceDescription="<%= item.getSku() %>"
+			resourcePrimKey="<%= String.valueOf(item.getItemId()) %>"
+			var="permissionsURL"
+			windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			method="get"
+			url="<%= permissionsURL %>"
+			useDialog="<%= true %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= ShoppingItemPermission.contains(permissionChecker, item, ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/shopping/edit_item" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="itemId" value="<%= String.valueOf(item.getItemId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete url="<%= deleteURL %>" />
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/order_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/order_action.jsp
new file mode 100644
index 0000000..1b2c082
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/order_action.jsp
@@ -0,0 +1,49 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/shopping/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+ShoppingOrder order = (ShoppingOrder)row.getObject();
+%>
+
+<liferay-ui:icon-menu>
+	<portlet:renderURL var="editURL">
+		<portlet:param name="struts_action" value="/shopping/edit_order" />
+		<portlet:param name="redirect" value="<%= currentURL %>" />
+		<portlet:param name="orderId" value="<%= String.valueOf(order.getOrderId()) %>" />
+	</portlet:renderURL>
+
+	<liferay-ui:icon
+		image="edit"
+		url="<%= editURL %>"
+	/>
+
+	<c:if test="<%= ShoppingOrderPermission.contains(permissionChecker, scopeGroupId, order, ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/shopping/edit_order" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="deleteOrderIds" value="<%= String.valueOf(order.getOrderId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete
+			url="<%= deleteURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/order_search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/order_search.jsp
new file mode 100644
index 0000000..4fbb998
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/order_search.jsp
@@ -0,0 +1,60 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/shopping/init.jsp" %>
+
+<%
+OrderSearch searchContainer = (OrderSearch)request.getAttribute("liferay-ui:search:searchContainer");
+
+OrderDisplayTerms displayTerms = (OrderDisplayTerms)searchContainer.getDisplayTerms();
+%>
+
+<aui:fieldset column="<%= true %>">
+	<aui:col width="<%= 33 %>">
+		<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" name="<%= displayTerms.NUMBER %>" size="20" type="text" value="<%= displayTerms.getNumber() %>" />
+
+		<aui:select label="" name="<%= displayTerms.AND_OPERATOR %>">
+			<aui:option label="and" selected="<%= displayTerms.isAndOperator() %>" value="1" />
+			<aui:option label="or" selected="<%= !displayTerms.isAndOperator() %>" value="0" />
+		</aui:select>
+	</aui:col>
+
+	<aui:col width="<%= 33 %>">
+		<%@ include file="/html/portlet/shopping/order_search_user_name.jspf" %>
+	</aui:col>
+
+	<aui:col width="<%= 33 %>">
+		<aui:select name="<%= displayTerms.STATUS %>" showEmptyOption="<%= true %>">
+
+			<%
+			for (int i = 0; i < ShoppingOrderConstants.STATUSES.length; i++) {
+			%>
+
+				<aui:option label="<%= ShoppingOrderConstants.STATUSES[i] %>" selected="<%= displayTerms.getStatus().equals(ShoppingOrderConstants.STATUSES[i]) %>" />
+
+			<%
+			}
+			%>
+
+		</aui:select>
+
+		<aui:input name="<%= displayTerms.EMAIL_ADDRESS %>" size="20" type="text" value="<%= displayTerms.getEmailAddress() %>" />
+	</aui:col>
+</aui:fieldset>
+
+<aui:button-row>
+	<aui:button type="submit" value="search" />
+</aui:button-row>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/order_search_user_name.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/order_search_user_name.jspf
new file mode 100644
index 0000000..3750402
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/order_search_user_name.jspf
@@ -0,0 +1,19 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<aui:input name="<%= displayTerms.FIRST_NAME %>" size="20" type="text" value="<%= displayTerms.getFirstName() %>" />
+
+<aui:input name="<%= displayTerms.LAST_NAME %>" size="20" type="text" value="<%= displayTerms.getLastName() %>" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/orders.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/orders.jspf
new file mode 100644
index 0000000..872b13a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/orders.jspf
@@ -0,0 +1,128 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/shopping/view");
+portletURL.setParameter("tabs1", tabs1);
+%>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="deleteOrderIds" type="hidden" />
+
+	<%
+	OrderSearch searchContainer = new OrderSearch(renderRequest, portletURL);
+
+	List headerNames = searchContainer.getHeaderNames();
+
+	headerNames.add(StringPool.BLANK);
+
+	searchContainer.setRowChecker(new RowChecker(renderResponse));
+	%>
+
+	<liferay-ui:search-form
+		page="/html/portlet/shopping/order_search.jsp"
+		searchContainer="<%= searchContainer %>"
+	/>
+
+	<%
+	OrderSearchTerms searchTerms = (OrderSearchTerms)searchContainer.getSearchTerms();
+
+	long searchUserId = user.getUserId();
+
+	if (ShoppingPermission.contains(permissionChecker, scopeGroupId, ActionKeys.MANAGE_ORDERS)) {
+		searchUserId = 0;
+	}
+
+	int total = ShoppingOrderLocalServiceUtil.searchCount(scopeGroupId, company.getCompanyId(), searchUserId, searchTerms.getNumber(), searchTerms.getFirstName(), searchTerms.getLastName(), searchTerms.getEmailAddress(), searchTerms.getFirstName(), searchTerms.getLastName(), searchTerms.getEmailAddress(), searchTerms.getStatus(), searchTerms.isAndOperator());
+
+	searchContainer.setTotal(total);
+
+	List results = ShoppingOrderLocalServiceUtil.search(scopeGroupId, company.getCompanyId(), searchUserId, searchTerms.getNumber(), searchTerms.getFirstName(), searchTerms.getLastName(), searchTerms.getEmailAddress(), searchTerms.getFirstName(), searchTerms.getLastName(), searchTerms.getEmailAddress(), searchTerms.getStatus(), searchTerms.isAndOperator(), searchContainer.getStart(), searchContainer.getEnd());
+
+	searchContainer.setResults(results);
+	%>
+
+	<div class="separator"><!-- --></div>
+
+	<aui:button-row>
+		<aui:button disabled="<%= true %>" name="delete" onClick='<%= renderResponse.getNamespace() + "deleteOrders();" %>' value="delete" />
+	</aui:button-row>
+
+	<%
+	List resultRows = searchContainer.getResultRows();
+
+	for (int i = 0; i < results.size(); i++) {
+		ShoppingOrder order = (ShoppingOrder)results.get(i);
+
+		order = order.toEscapedModel();
+
+		ResultRow row = new ResultRow(order, order.getOrderId(), i);
+
+		PortletURL rowURL = renderResponse.createRenderURL();
+
+		rowURL.setParameter("struts_action", "/shopping/edit_order");
+		rowURL.setParameter("redirect", currentURL);
+		rowURL.setParameter("orderId", String.valueOf(order.getOrderId()));
+
+		// Number
+
+		row.addText(order.getNumber(), rowURL);
+
+		// Date
+
+		row.addDate(order.getCreateDate(), rowURL);
+
+		// Status
+
+		row.addText(ShoppingUtil.getPpPaymentStatus(order, pageContext), rowURL);
+
+		// Customer
+
+		row.addText(HtmlUtil.escape(PortalUtil.getUserName(order.getUserId(), order.getBillingFirstName() + StringPool.SPACE + order.getBillingLastName())));
+
+		// Action
+
+		row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/shopping/order_action.jsp");
+
+		// Add result row
+
+		resultRows.add(row);
+	}
+	%>
+
+	<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+</aui:form>
+
+<aui:script>
+	Liferay.Util.toggleSearchContainerButton('#<portlet:namespace />delete', '#<portlet:namespace /><%= searchContainerReference.getId() %>SearchContainer', document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />deleteOrders',
+		function() {
+			if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-delete-the-selected-orders") %>')) {
+				document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.DELETE %>";
+				document.<portlet:namespace />fm.<portlet:namespace />deleteOrderIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+				submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/shopping/edit_order" /><portlet:param name="redirect" value="<%= currentURL %>" /></portlet:actionURL>");
+			}
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/search.jsp
new file mode 100644
index 0000000..603d208
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/search.jsp
@@ -0,0 +1,194 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/shopping/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+long breadcrumbsCategoryId = ParamUtil.getLong(request, "breadcrumbsCategoryId");
+
+long searchCategoryId = ParamUtil.getLong(request, "searchCategoryId");
+long searchCategoryIds = ParamUtil.getLong(request, "searchCategoryIds");
+
+long[] categoryIdsArray = null;
+
+if (searchCategoryId > 0) {
+	categoryIdsArray = new long[] {searchCategoryId};
+}
+else {
+	List categoryIds = new ArrayList();
+
+	categoryIds.add(new Long(searchCategoryIds));
+
+	ShoppingCategoryServiceUtil.getSubcategoryIds(categoryIds, scopeGroupId, searchCategoryIds);
+
+	categoryIdsArray = StringUtil.split(StringUtil.merge(categoryIds), 0L);
+}
+
+String keywords = ParamUtil.getString(request, "keywords");
+%>
+
+<liferay-portlet:renderURL varImpl="searchURL">
+	<portlet:param name="struts_action" value="/shopping/search" />
+</liferay-portlet:renderURL>
+
+<aui:form action="<%= searchURL %>" method="get" name="fm">
+	<liferay-portlet:renderURLParams varImpl="searchURL" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="breadcrumbsCategoryId" type="hidden" value="<%= breadcrumbsCategoryId %>" />
+	<aui:input name="searchCategoryId" type="hidden" value="<%= searchCategoryId %>" />
+	<aui:input name="searchCategoryIds" type="hidden" value="<%= searchCategoryIds %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title="search"
+	/>
+
+	<%
+	PortletURL portletURL = renderResponse.createRenderURL();
+
+	portletURL.setParameter("struts_action", "/shopping/search");
+	portletURL.setParameter("redirect", redirect);
+	portletURL.setParameter("breadcrumbsCategoryId", String.valueOf(breadcrumbsCategoryId));
+	portletURL.setParameter("searchCategoryId", String.valueOf(searchCategoryId));
+	portletURL.setParameter("searchCategoryIds", String.valueOf(searchCategoryIds));
+	portletURL.setParameter("keywords", keywords);
+
+	List<String> headerNames = new ArrayList<String>();
+
+	headerNames.add("sku");
+	headerNames.add("description");
+	headerNames.add("min-qty");
+	headerNames.add("price");
+	headerNames.add(StringPool.BLANK);
+
+	SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, portletURL, headerNames, LanguageUtil.format(pageContext, "no-entries-were-found-that-matched-the-keywords-x", "<strong>" + HtmlUtil.escape(keywords) + "</strong>"));
+
+	int total = ShoppingItemLocalServiceUtil.searchCount(scopeGroupId, categoryIdsArray, keywords);
+
+	searchContainer.setTotal(total);
+
+	List results = ShoppingItemLocalServiceUtil.search(scopeGroupId, categoryIdsArray, keywords, searchContainer.getStart(), searchContainer.getEnd());
+
+	searchContainer.setResults(results);
+
+	List resultRows = searchContainer.getResultRows();
+
+	for (int i = 0; i < results.size(); i++) {
+		ShoppingItem item = (ShoppingItem)results.get(i);
+
+		item = item.toEscapedModel();
+
+		ResultRow row = new ResultRow(item, item.getItemId(), i);
+
+		PortletURL rowURL = renderResponse.createRenderURL();
+
+		rowURL.setParameter("struts_action", "/shopping/view_item");
+		rowURL.setParameter("redirect", currentURL);
+		rowURL.setParameter("itemId", String.valueOf(item.getItemId()));
+
+		// SKU and small image
+
+		StringBundler sb = new StringBundler();
+
+		if (item.isSmallImage()) {
+			sb.append("<br />");
+			sb.append("<img alt=\"");
+			sb.append(item.getSku());
+			sb.append("\" border=\"0\" src=\"");
+
+			if (Validator.isNotNull(item.getSmallImageURL())) {
+				sb.append(item.getSmallImageURL());
+			}
+			else {
+				sb.append(themeDisplay.getPathImage());
+				sb.append("/shopping/item?img_id=");
+				sb.append(item.getSmallImageId());
+				sb.append("&t=");
+				sb.append(WebServerServletTokenUtil.getToken(item.getSmallImageId()));
+			}
+
+			sb.append("\">");
+		}
+		else {
+			sb.append(item.getSku());
+		}
+
+		row.addText(sb.toString(), rowURL);
+
+		// Description
+
+		sb = new StringBundler();
+
+		sb.append(item.getName());
+
+		if (Validator.isNotNull(item.getDescription())) {
+			sb.append("<br />");
+			sb.append(item.getDescription());
+		}
+
+		Properties props = new OrderedProperties();
+
+		PropertiesUtil.load(props, item.getProperties());
+
+		Enumeration enu = props.propertyNames();
+
+		while (enu.hasMoreElements()) {
+			String propsKey = (String)enu.nextElement();
+			String propsValue = props.getProperty(propsKey, StringPool.BLANK);
+
+			sb.append("<br />");
+			sb.append(propsKey);
+			sb.append(": ");
+			sb.append(propsValue);
+		}
+
+		row.addText(sb.toString(), rowURL);
+
+		// Minimum quantity
+
+		row.addText(String.valueOf(item.getMinQuantity()), rowURL);
+
+		// Price
+
+		if (item.getDiscount() <= 0) {
+			row.addText(currencyFormat.format(item.getPrice()), rowURL);
+		}
+		else {
+			row.addText("<div class=\"alert alert-success\">" + currencyFormat.format(ShoppingUtil.calculateActualPrice(item)) + "</div>", rowURL);
+		}
+
+		// Action
+
+		row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/shopping/item_action.jsp");
+
+		// Add result row
+
+		resultRows.add(row);
+	}
+	%>
+
+	<aui:fieldset>
+		<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" label="" name="keywords" size="30" title="search" value="<%= keywords %>" />
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" value="search" />
+	</aui:button-row>
+
+	<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/select_category.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/select_category.jsp
new file mode 100644
index 0000000..3722a5f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/select_category.jsp
@@ -0,0 +1,117 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/shopping/init.jsp" %>
+
+<%
+ShoppingCategory category = (ShoppingCategory)request.getAttribute(WebKeys.SHOPPING_CATEGORY);
+
+long categoryId = BeanParamUtil.getLong(category, request, "categoryId", ShoppingCategoryConstants.DEFAULT_PARENT_CATEGORY_ID);
+%>
+
+<aui:form method="post" name="fm">
+	<liferay-ui:header
+		title="categories"
+	/>
+
+	<c:if test="<%= category != null %>">
+		<div class="breadcrumbs">
+			<%= ShoppingUtil.getBreadcrumbs(category, pageContext, renderRequest, renderResponse) %>
+		</div>
+	</c:if>
+
+	<%
+	PortletURL portletURL = renderResponse.createRenderURL();
+
+	portletURL.setParameter("struts_action", "/shopping/select_category");
+	portletURL.setParameter("categoryId", String.valueOf(categoryId));
+
+	List<String> headerNames = new ArrayList<String>();
+
+	headerNames.add("category");
+	headerNames.add("num-of-categories");
+	headerNames.add("num-of-items");
+	headerNames.add(StringPool.BLANK);
+
+	SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, portletURL, headerNames, null);
+
+	int total = ShoppingCategoryServiceUtil.getCategoriesCount(scopeGroupId, categoryId);
+
+	searchContainer.setTotal(total);
+
+	List results = ShoppingCategoryServiceUtil.getCategories(scopeGroupId, categoryId, searchContainer.getStart(), searchContainer.getEnd());
+
+	searchContainer.setResults(results);
+
+	List resultRows = searchContainer.getResultRows();
+
+	for (int i = 0; i < results.size(); i++) {
+		ShoppingCategory curCategory = (ShoppingCategory)results.get(i);
+
+		curCategory = curCategory.toEscapedModel();
+
+		ResultRow row = new ResultRow(curCategory, curCategory.getCategoryId(), i);
+
+		PortletURL rowURL = renderResponse.createRenderURL();
+
+		rowURL.setParameter("struts_action", "/shopping/select_category");
+		rowURL.setParameter("categoryId", String.valueOf(curCategory.getCategoryId()));
+
+		// Name and description
+
+		if (Validator.isNotNull(curCategory.getDescription())) {
+			row.addText(curCategory.getName().concat("<br />").concat(curCategory.getDescription()), rowURL);
+		}
+		else {
+			row.addText(curCategory.getName(), rowURL);
+		}
+
+		// Statistics
+
+		List subcategoryIds = new ArrayList();
+
+		subcategoryIds.add(new Long(curCategory.getCategoryId()));
+
+		ShoppingCategoryServiceUtil.getSubcategoryIds(subcategoryIds, scopeGroupId, curCategory.getCategoryId());
+
+		int categoriesCount = subcategoryIds.size() - 1;
+		int itemsCount = ShoppingItemServiceUtil.getCategoriesItemsCount(scopeGroupId, subcategoryIds);
+
+		row.addText(String.valueOf(categoriesCount), rowURL);
+		row.addText(String.valueOf(itemsCount), rowURL);
+
+		// Action
+
+		StringBundler sb = new StringBundler(7);
+
+		sb.append("opener.");
+		sb.append(renderResponse.getNamespace());
+		sb.append("selectCategory('");
+		sb.append(curCategory.getCategoryId());
+		sb.append("', '");
+		sb.append(UnicodeFormatter.toString(curCategory.getName()));
+		sb.append("'); window.close();");
+
+		row.addButton("right", SearchEntry.DEFAULT_VALIGN, LanguageUtil.get(pageContext, "choose"), sb.toString());
+
+		// Add result row
+
+		resultRows.add(row);
+	}
+	%>
+
+	<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/tabs1.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/tabs1.jsp
new file mode 100644
index 0000000..aada25f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/tabs1.jsp
@@ -0,0 +1,58 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/shopping/init.jsp" %>
+
+<%
+String tabs1 = ParamUtil.getString(request, "tabs1", "categories");
+
+String tabs1Names = "categories,cart";
+
+if (!user.isDefaultUser()) {
+	tabs1Names += ",orders";
+}
+
+if (ShoppingPermission.contains(permissionChecker, scopeGroupId, ActionKeys.MANAGE_COUPONS)) {
+	tabs1Names += ",coupons";
+}
+
+// View
+
+PortletURL viewURL = renderResponse.createRenderURL();
+
+viewURL.setParameter("struts_action", "/shopping/view");
+
+// Cart
+
+PortletURL cartURL = renderResponse.createRenderURL();
+
+cartURL.setParameter("struts_action", "/shopping/cart");
+
+if (!tabs1.equals("cart")) {
+	cartURL.setParameter("redirect", currentURL);
+}
+
+// Back URL
+
+String backURL = ParamUtil.getString(request, "backURL");
+%>
+
+<liferay-ui:tabs
+	backURL="<%= backURL %>"
+	names="<%= tabs1Names %>"
+	url="<%= viewURL.toString() %>"
+	url1="<%= cartURL.toString() %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/view.jsp
new file mode 100644
index 0000000..27f21e3
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/view.jsp
@@ -0,0 +1,35 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/shopping/init.jsp" %>
+
+<%
+String tabs1 = ParamUtil.getString(request, "tabs1", "categories");
+%>
+
+<liferay-util:include page="/html/portlet/shopping/tabs1.jsp" />
+
+<c:choose>
+	<c:when test='<%= tabs1.equals("categories") %>'>
+		<%@ include file="/html/portlet/shopping/categories.jspf" %>
+	</c:when>
+	<c:when test='<%= tabs1.equals("orders") && !user.isDefaultUser() %>'>
+		<%@ include file="/html/portlet/shopping/orders.jspf" %>
+	</c:when>
+	<c:when test='<%= tabs1.equals("coupons") %>'>
+		<%@ include file="/html/portlet/shopping/coupons.jspf" %>
+	</c:when>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/view_coupon.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/view_coupon.jsp
new file mode 100644
index 0000000..435ddb9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/view_coupon.jsp
@@ -0,0 +1,33 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/shopping/init.jsp" %>
+
+<%
+ShoppingCoupon coupon = (ShoppingCoupon)request.getAttribute(WebKeys.SHOPPING_COUPON);
+
+coupon = coupon.toEscapedModel();
+%>
+
+<strong><%= coupon.getCouponId() %></strong>
+
+<br /><br />
+
+<%= coupon.getName() %>
+
+<br /><br />
+
+<%= coupon.getDescription() %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/view_item.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/view_item.jsp
new file mode 100644
index 0000000..09fdce3
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/shopping/view_item.jsp
@@ -0,0 +1,248 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/shopping/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+ShoppingItem item = (ShoppingItem)request.getAttribute(WebKeys.SHOPPING_ITEM);
+
+item = item.toEscapedModel();
+
+ShoppingItemField[] itemFields = (ShoppingItemField[])ShoppingItemFieldLocalServiceUtil.getItemFields(item.getItemId()).toArray(new ShoppingItemField[0]);
+ShoppingItemPrice[] itemPrices = (ShoppingItemPrice[])ShoppingItemPriceLocalServiceUtil.getItemPrices(item.getItemId()).toArray(new ShoppingItemPrice[0]);
+
+String orderByCol = portalPreferences.getValue(PortletKeys.SHOPPING, "items-order-by-col", "sku");
+String orderByType = portalPreferences.getValue(PortletKeys.SHOPPING, "items-order-by-type", "asc");
+
+OrderByComparator orderByComparator = ShoppingUtil.getItemOrderByComparator(orderByCol, orderByType);
+
+ShoppingItem[] prevAndNext = ShoppingItemServiceUtil.getItemsPrevAndNext(item.getItemId(), orderByComparator);
+%>
+
+<portlet:actionURL var="cartURL">
+	<portlet:param name="struts_action" value="/shopping/cart" />
+</portlet:actionURL>
+
+<portlet:renderURL var="redirectURL">
+	<portlet:param name="struts_action" value="/shopping/cart" />
+	<portlet:param name="redirect" value="<%= currentURL %>" />
+</portlet:renderURL>
+
+<aui:form action="<%= cartURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.ADD %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirectURL %>" />
+	<aui:input name="itemId" type="hidden" value="<%= item.getItemId() %>" />
+	<aui:input name="fields" type="hidden" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title="item"
+	/>
+
+	<div class="breadcrumbs">
+		<%= ShoppingUtil.getBreadcrumbs(item.getCategoryId(), pageContext, renderRequest, renderResponse) %>
+	</div>
+
+	<table border="0" cellpadding="0" cellspacing="0">
+	<tr>
+		<td class="lfr-top">
+			<strong><%= item.getSku() %></strong>
+
+			<br /><br />
+
+			<c:if test="<%= item.isMediumImage() %>">
+				<img alt="<liferay-ui:message key="image" />" src='<%= Validator.isNotNull(item.getMediumImageURL()) ? item.getMediumImageURL() : themeDisplay.getPathImage() + "/shopping/item?img_id=" + item.getMediumImageId() + "&t=" + WebServerServletTokenUtil.getToken(item.getMediumImageId()) %>' vspace="0" />
+			</c:if>
+
+			<c:if test="<%= item.isLargeImage() %>">
+				<br />
+
+				<aui:a href='<%= Validator.isNotNull(item.getLargeImageURL()) ? item.getLargeImageURL() : themeDisplay.getPathImage() + "/shopping/item?img_id=" + item.getLargeImageId() + "&t=" + WebServerServletTokenUtil.getToken(item.getLargeImageId()) %>' style="font-size: xx-small;" target="_blank"><liferay-ui:message key="see-large-photo" /></aui:a>
+			</c:if>
+		</td>
+		<td style="padding-left: 30px;"></td>
+		<td class="lfr-top">
+			<span style="font-size: small;">
+			<strong><%= item.getName() %></strong><br />
+			</span>
+
+			<c:if test="<%= Validator.isNotNull(item.getDescription()) %>">
+				<br />
+
+				<%= item.getDescription() %>
+			</c:if>
+
+			<%
+			Properties props = new OrderedProperties();
+
+			PropertiesUtil.load(props, item.getProperties());
+
+			Enumeration enu = props.propertyNames();
+
+			while (enu.hasMoreElements()) {
+				String propsKey = (String)enu.nextElement();
+				String propsValue = props.getProperty(propsKey, StringPool.BLANK);
+			%>
+
+				<br />
+
+				<%= propsKey %>: <%= propsValue %>
+
+			<%
+			}
+			%>
+
+			<br /><br />
+
+			<%
+			for (int i = 0; i < itemPrices.length; i++) {
+				ShoppingItemPrice itemPrice = itemPrices[i];
+
+				if (itemPrice.getStatus() == ShoppingItemPriceConstants.STATUS_INACTIVE) {
+					continue;
+				}
+			%>
+
+				<c:choose>
+					<c:when test="<%= (itemPrice.getMinQuantity()) == 0 && (itemPrice.getMaxQuantity() == 0) %>">
+						<liferay-ui:message key="price" />:
+					</c:when>
+					<c:when test="<%= itemPrice.getMaxQuantity() != 0 %>">
+						<liferay-ui:message arguments='<%= new Object[] {"<strong>" + itemPrice.getMinQuantity() + "</strong>", "<strong>" + itemPrice.getMaxQuantity() + "</strong>"} %>' key="price-for-x-to-x-items" translateArguments="<%= false %>" />
+					</c:when>
+					<c:when test="<%= itemPrice.getMaxQuantity() == 0 %>">
+						<liferay-ui:message arguments='<%= "<strong>" + itemPrice.getMinQuantity() + "</strong>" %>' key="price-for-x-items-and-above" translateArguments="<%= false %>" />
+					</c:when>
+				</c:choose>
+
+				<c:if test="<%= itemPrice.getDiscount() <= 0 %>">
+					<%= currencyFormat.format(itemPrice.getPrice()) %><br />
+				</c:if>
+
+				<c:if test="<%= itemPrice.getDiscount() > 0 %>">
+					<strike><%= currencyFormat.format(itemPrice.getPrice()) %></strike> <div class="alert alert-success"><%= currencyFormat.format(ShoppingUtil.calculateActualPrice(itemPrice)) %></div> / <liferay-ui:message key="you-save" />: <div class="alert alert-error"><%= currencyFormat.format(ShoppingUtil.calculateDiscountPrice(itemPrice)) %> (<%= percentFormat.format(itemPrice.getDiscount()) %>)</div><br />
+				</c:if>
+
+			<%
+			}
+			%>
+
+			<br />
+
+			<c:if test="<%= PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.SHOPPING_ITEM_SHOW_AVAILABILITY) %>">
+				<c:choose>
+					<c:when test="<%= ShoppingUtil.isInStock(item) %>">
+						<liferay-ui:message key="availability" />: <div class="alert alert-success"><liferay-ui:message key="in-stock" /></div><br />
+					</c:when>
+					<c:otherwise>
+						<liferay-ui:message key="availability" />: <div class="alert alert-error"><liferay-ui:message key="out-of-stock" /></div><br />
+					</c:otherwise>
+				</c:choose>
+
+				<br />
+			</c:if>
+
+			<%
+			for (int i = 0; i < itemFields.length; i++) {
+				ShoppingItemField itemField = itemFields[i];
+
+				String fieldName = itemField.getName();
+				String[] fieldValues = itemField.getValuesArray();
+				String fieldDescription = itemField.getDescription();
+			%>
+
+				<aui:fieldset>
+					<aui:select label="<%= fieldName %>" name='<%= "fieldName" + fieldName %>'>
+						<aui:option label="select-option" value="" />
+
+						<%
+						for (int j = 0; j < fieldValues.length; j++) {
+						%>
+
+							<aui:option label="<%= fieldValues[j] %>" />
+
+						<%
+						}
+						%>
+
+					</aui:select>
+
+					<c:if test="<%= Validator.isNotNull(fieldDescription) %>">
+						<%= fieldDescription %>
+					</c:if>
+				</aui:fieldset>
+
+			<%
+			}
+			%>
+
+			<aui:button onClick='<%= renderResponse.getNamespace() + "addToCart();" %>' value="add-to-shopping-cart" />
+
+			<aui:button-row>
+				<c:if test="<%= (prevAndNext[0] != null) || (prevAndNext[2] != null) %>">
+					<c:if test="<%= prevAndNext[0] != null %>">
+						<portlet:renderURL var="viewPreviousPageURL">
+							<portlet:param name="struts_action" value="/shopping/view_item" />
+							<portlet:param name="itemId" value="<%= String.valueOf(prevAndNext[0].getItemId()) %>" />
+						</portlet:renderURL>
+
+						<aui:button href="<%= viewPreviousPageURL %>" value="previous" />
+					</c:if>
+
+					<c:if test="<%= prevAndNext[2] != null %>">
+						<portlet:renderURL var="viewNextPageURL">
+							<portlet:param name="struts_action" value="/shopping/view_item" />
+							<portlet:param name="itemId" value="<%= String.valueOf(prevAndNext[2].getItemId()) %>" />
+						</portlet:renderURL>
+
+						<aui:button href="<%= viewNextPageURL %>" value="next" />
+					</c:if>
+				</c:if>
+			</aui:button-row>
+		</td>
+	</tr>
+	</table>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />addToCart() {
+		document.<portlet:namespace />fm.<portlet:namespace />fields.value = "";
+
+		<%
+		for (int i = 0; i < itemFields.length; i++) {
+			ShoppingItemField itemField = itemFields[i];
+
+			String fieldName = itemField.getName();
+			String[] fieldValues = itemField.getValuesArray();
+		%>
+
+			if (document.<portlet:namespace />fm.<portlet:namespace />fieldName<%= fieldName %>.value == "") {
+				alert("<%= UnicodeLanguageUtil.get(pageContext, "please-select-all-options") %>");
+
+				return;
+			}
+
+			document.<portlet:namespace />fm.<portlet:namespace />fields.value = document.<portlet:namespace />fm.<portlet:namespace />fields.value + '<%= fieldName %>=' + document.<portlet:namespace />fm.<portlet:namespace />fieldName<%= fieldName %>.value + '&';
+
+		<%
+		}
+		%>
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/site_browser/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/site_browser/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/site_browser/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/site_browser/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/site_browser/init.jsp
new file mode 100644
index 0000000..206cb7b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/site_browser/init.jsp
@@ -0,0 +1,29 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.assetpublisher.util.AssetPublisherUtil" %>
+
+<%
+boolean filterManageableGroups = true;
+
+if (permissionChecker.isCompanyAdmin()) {
+	filterManageableGroups = false;
+}
+%>
+
+<%@ include file="/html/portlet/site_browser/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/site_browser/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/site_browser/view.jsp
new file mode 100644
index 0000000..ea147b5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/site_browser/view.jsp
@@ -0,0 +1,257 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/site_browser/init.jsp" %>
+
+<%
+long groupId = ParamUtil.getLong(request, "groupId");
+long[] selectedGroupIds = StringUtil.split(ParamUtil.getString(request, "selectedGroupIds"), 0L);
+
+String type = ParamUtil.getString(request, "type");
+String[] types = ParamUtil.getParameterValues(request, "types");
+
+if (Validator.isNull(type)) {
+	if (types.length > 0) {
+		type = types[0];
+	}
+	else {
+		type = "sites-that-i-administer";
+	}
+}
+
+if (types.length == 0) {
+	types = new String[] {type};
+}
+
+String filter = ParamUtil.getString(request, "filter");
+boolean includeCompany = ParamUtil.getBoolean(request, "includeCompany");
+boolean includeUserPersonalSite = ParamUtil.getBoolean(request, "includeUserPersonalSite");
+String eventName = ParamUtil.getString(request, "eventName", liferayPortletResponse.getNamespace() + "selectSite");
+String target = ParamUtil.getString(request, "target");
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/site_browser/view");
+portletURL.setParameter("groupId", String.valueOf(groupId));
+portletURL.setParameter("selectedGroupIds", StringUtil.merge(selectedGroupIds));
+portletURL.setParameter("type", type);
+portletURL.setParameter("types", types);
+portletURL.setParameter("filter", filter);
+portletURL.setParameter("includeCompany", String.valueOf(includeCompany));
+portletURL.setParameter("includeUserPersonalSite", String.valueOf(includeUserPersonalSite));
+portletURL.setParameter("eventName", eventName);
+portletURL.setParameter("target", target);
+%>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="selectSiteFm">
+	<liferay-ui:search-container
+		searchContainer="<%= new GroupSearch(renderRequest, portletURL) %>"
+	>
+		<c:if test='<%= !type.equals("parent-sites") || (types.length > 1) %>'>
+			<aui:nav-bar>
+				<c:if test="<%= types.length > 1 %>">
+					<aui:nav>
+
+						<%
+						for (String curType : types) {
+							portletURL.setParameter("type", curType);
+						%>
+
+							<aui:nav-item href="<%= portletURL.toString() %>" label="<%= curType %>" selected="<%= curType.equals(type) %>" />
+
+						<%
+						}
+						%>
+
+					</aui:nav>
+				</c:if>
+
+				<c:if test='<%= !type.equals("parent-sites") %>'>
+					<aui:nav-bar-search cssClass="pull-right" file="/html/portlet/users_admin/group_search.jsp" searchContainer="<%= searchContainer %>" />
+				</c:if>
+			</aui:nav-bar>
+		</c:if>
+
+		<%
+		GroupSearchTerms searchTerms = (GroupSearchTerms)searchContainer.getSearchTerms();
+
+		LinkedHashMap<String, Object> groupParams = new LinkedHashMap<String, Object>();
+		%>
+
+		<liferay-ui:search-container-results>
+
+			<%
+			results.clear();
+
+			int additionalSites = 0;
+
+			if (includeCompany) {
+				if (searchContainer.getStart() == 0) {
+					results.add(company.getGroup());
+				}
+
+				additionalSites++;
+			}
+
+			if (includeUserPersonalSite) {
+				if (searchContainer.getStart() == 0) {
+					Group userPersonalSite = GroupLocalServiceUtil.getGroup(company.getCompanyId(), GroupConstants.USER_PERSONAL_SITE);
+
+					results.add(userPersonalSite);
+				}
+
+				additionalSites++;
+			}
+
+			if (type.equals("child-sites")) {
+				Group parentGroup = GroupLocalServiceUtil.getGroup(groupId);
+
+				List<Group> parentGroups = new ArrayList<Group>();
+
+				parentGroups.add(parentGroup);
+
+				groupParams.put("groupsTree", parentGroups);
+			}
+			else if (filterManageableGroups) {
+				groupParams.put("usersGroups", user.getUserId());
+			}
+
+			groupParams.put("site", Boolean.TRUE);
+
+			if (type.equals("layoutScopes")) {
+				total = GroupLocalServiceUtil.getGroupsCount(company.getCompanyId(), Layout.class.getName(), groupId);
+			}
+			else if (type.equals("parent-sites")) {
+			}
+			else if (searchTerms.isAdvancedSearch()) {
+				total = GroupLocalServiceUtil.searchCount(company.getCompanyId(), null, searchTerms.getName(), searchTerms.getDescription(), groupParams, searchTerms.isAndOperator());
+			}
+			else {
+				total = GroupLocalServiceUtil.searchCount(company.getCompanyId(), null, searchTerms.getKeywords(), groupParams, searchTerms.isAndOperator());
+			}
+
+			total += additionalSites;
+
+			searchContainer.setTotal(total);
+
+			int start = searchContainer.getStart();
+
+			if (searchContainer.getStart() > additionalSites) {
+				start = searchContainer.getStart() - additionalSites;
+			}
+
+			int end = searchContainer.getEnd() - additionalSites;
+
+			List<Group> groups = null;
+
+			if (type.equals("layoutScopes")) {
+				groups = GroupLocalServiceUtil.getGroups(company.getCompanyId(), Layout.class.getName(), groupId, start, end);
+			}
+			else if (type.equals("parent-sites")) {
+				Group group = GroupLocalServiceUtil.getGroup(groupId);
+
+				groups = group.getAncestors();
+
+				if (Validator.isNotNull(filter)) {
+					groups = _filterGroups(groups, filter);
+				}
+
+				total = groups.size();
+
+				total += additionalSites;
+
+				searchContainer.setTotal(total);
+			}
+			else if (searchTerms.isAdvancedSearch()) {
+				groups = GroupLocalServiceUtil.search(company.getCompanyId(), null, searchTerms.getName(), searchTerms.getDescription(), groupParams, searchTerms.isAndOperator(), start, end, searchContainer.getOrderByComparator());
+			}
+			else {
+				groups = GroupLocalServiceUtil.search(company.getCompanyId(), null, searchTerms.getKeywords(), groupParams, start, end, searchContainer.getOrderByComparator());
+			}
+
+			results.addAll(groups);
+
+			searchContainer.setResults(results);
+			%>
+
+		</liferay-ui:search-container-results>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.model.Group"
+			escapedModel="<%= true %>"
+			keyProperty="groupId"
+			modelVar="group"
+			rowIdProperty="friendlyURL"
+		>
+			<liferay-ui:search-container-column-text
+				name="name"
+				value="<%= HtmlUtil.escape(group.getDescriptiveName(locale)) %>"
+			/>
+
+			<liferay-ui:search-container-column-text
+				name="type"
+				value="<%= LanguageUtil.get(pageContext, group.getScopeLabel(themeDisplay)) %>"
+			/>
+
+			<liferay-ui:search-container-column-text>
+
+				<%
+				Map<String, Object> data = new HashMap<String, Object>();
+
+				data.put("groupdescriptivename", HtmlUtil.escape(group.getDescriptiveName(locale)));
+				data.put("groupid", group.getGroupId());
+				data.put("scopeid", HtmlUtil.escape(AssetPublisherUtil.getScopeId(group, scopeGroupId)));
+				data.put("target", target);
+				%>
+
+				<aui:button cssClass="selector-button" data="<%= data %>" disabled="<%= ArrayUtil.contains(selectedGroupIds, group.getGroupId()) %>" value="choose" />
+			</liferay-ui:search-container-column-text>
+
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<%!
+private List<Group> _filterGroups(List<Group> groups, String filter) throws Exception {
+	List<Group> filteredGroups = new ArrayList();
+
+	for (Group group : groups) {
+		if (filter.equals("contentSharingWithChildrenEnabled") && SitesUtil.isContentSharingWithChildrenEnabled(group)) {
+			filteredGroups.add(group);
+		}
+	}
+
+	return filteredGroups;
+}
+%>
+
+<aui:script use="aui-base">
+	var Util = Liferay.Util;
+
+	A.one('#<portlet:namespace />selectSiteFm').delegate(
+		'click',
+		function(event) {
+			var result = Util.getAttributes(event.currentTarget, 'data-');
+
+			Util.getOpener().Liferay.fire('<%= HtmlUtil.escapeJS(eventName) %>', result);
+
+			Util.getWindow().hide();
+		},
+		'.selector-button'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/site_map/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/site_map/configuration.jsp
new file mode 100644
index 0000000..2bcd30f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/site_map/configuration.jsp
@@ -0,0 +1,124 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/site_map/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+LayoutLister layoutLister = new LayoutLister();
+
+String rootNodeName = StringPool.BLANK;
+LayoutView layoutView = layoutLister.getLayoutView(layout.getGroupId(), layout.isPrivateLayout(), rootNodeName, locale);
+
+List layoutList = layoutView.getList();
+%>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+
+	<aui:fieldset>
+		<aui:select label="root-layout" name="preferences--rootLayoutUuid--">
+			<aui:option value="" />
+
+			<%
+			for (int i = 0; i < layoutList.size(); i++) {
+
+				// id | parentId | ls | obj id | name | img | depth
+
+				String layoutDesc = (String)layoutList.get(i);
+
+				String[] nodeValues = StringUtil.split(layoutDesc, '|');
+
+				long objId = GetterUtil.getLong(nodeValues[3]);
+				String name = nodeValues[4];
+
+				int depth = 0;
+
+				if (i != 0) {
+					depth = GetterUtil.getInteger(nodeValues[6]);
+				}
+
+				for (int j = 0; j < depth; j++) {
+					name = "-&nbsp;" + name;
+				}
+
+				Layout curRootLayout = null;
+
+				try {
+					curRootLayout = LayoutLocalServiceUtil.getLayout(objId);
+				}
+				catch (Exception e) {
+				}
+
+				if (curRootLayout != null) {
+			%>
+
+				<aui:option label="<%= name %>" selected="<%= curRootLayout.getUuid().equals(rootLayoutUuid) %>" value="<%= curRootLayout.getUuid() %>" />
+
+			<%
+				}
+			}
+			%>
+
+		</aui:select>
+
+		<aui:select name="preferences--displayDepth--">
+			<aui:option label="unlimited" value="0" />
+
+			<%
+			for (int i = 1; i <= 20; i++) {
+			%>
+
+				<aui:option label="<%= i %>" selected="<%= displayDepth == i %>" />
+
+			<%
+			}
+			%>
+
+		</aui:select>
+
+		<aui:input name="preferences--includeRootInTree--" type="checkbox" value="<%= includeRootInTree %>" />
+
+		<aui:input name="preferences--showCurrentPage--" type="checkbox" value="<%= showCurrentPage %>" />
+
+		<aui:input name="preferences--useHtmlTitle--" type="checkbox" value="<%= useHtmlTitle %>" />
+
+		<aui:input name="preferences--showHiddenPages--" type="checkbox" value="<%= showHiddenPages %>" />
+
+		<div class="display-template">
+
+			<%
+			TemplateHandler templateHandler = TemplateHandlerRegistryUtil.getTemplateHandler(LayoutSet.class.getName());
+			%>
+
+			<liferay-ui:ddm-template-selector
+				classNameId="<%= PortalUtil.getClassNameId(templateHandler.getClassName()) %>"
+				displayStyle="<%= displayStyle %>"
+				displayStyleGroupId="<%= displayStyleGroupId %>"
+				refreshURL="<%= currentURL %>"
+				showEmptyOption="<%= true %>"
+			/>
+		</div>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/site_map/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/site_map/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/site_map/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/site_map/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/site_map/init.jsp
new file mode 100644
index 0000000..d90ecc7
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/site_map/init.jsp
@@ -0,0 +1,49 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%
+String rootLayoutUuid = GetterUtil.getString(portletPreferences.getValue("rootLayoutUuid", StringPool.BLANK));
+int displayDepth = GetterUtil.getInteger(portletPreferences.getValue("displayDepth", StringPool.BLANK));
+String displayStyle = GetterUtil.getString(portletPreferences.getValue("displayStyle", StringPool.BLANK));
+long displayStyleGroupId = GetterUtil.getLong(portletPreferences.getValue("displayStyleGroupId", null), themeDisplay.getScopeGroupId());
+boolean includeRootInTree = GetterUtil.getBoolean(portletPreferences.getValue("includeRootInTree", StringPool.BLANK));
+boolean showCurrentPage = GetterUtil.getBoolean(portletPreferences.getValue("showCurrentPage", StringPool.BLANK));
+boolean useHtmlTitle = GetterUtil.getBoolean(portletPreferences.getValue("useHtmlTitle", StringPool.BLANK));
+boolean showHiddenPages = GetterUtil.getBoolean(portletPreferences.getValue("showHiddenPages", StringPool.BLANK));
+
+Layout rootLayout = null;
+
+long rootLayoutId = LayoutConstants.DEFAULT_PARENT_LAYOUT_ID;
+
+if (Validator.isNotNull(rootLayoutUuid)) {
+	rootLayout = LayoutLocalServiceUtil.getLayoutByUuidAndGroupId(rootLayoutUuid, scopeGroupId, layout.isPrivateLayout());
+
+	if (rootLayout != null) {
+		rootLayoutId = rootLayout.getLayoutId();
+	}
+}
+else {
+	includeRootInTree = false;
+}
+
+if (rootLayoutId == LayoutConstants.DEFAULT_PARENT_LAYOUT_ID) {
+	includeRootInTree = false;
+}
+%>
+
+<%@ include file="/html/portlet/site_map/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/site_map/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/site_map/view.jsp
new file mode 100644
index 0000000..ec6908d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/site_map/view.jsp
@@ -0,0 +1,120 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/site_map/init.jsp" %>
+
+<%
+List<Layout> rootLayouts = LayoutLocalServiceUtil.getLayouts(layout.getGroupId(), layout.isPrivateLayout(), rootLayoutId);
+
+long portletDisplayDDMTemplateId = PortletDisplayTemplateUtil.getPortletDisplayTemplateDDMTemplateId(displayStyleGroupId, displayStyle);
+%>
+
+<c:choose>
+	<c:when test="<%= portletDisplayDDMTemplateId > 0 %>">
+		<%= PortletDisplayTemplateUtil.renderDDMTemplate(pageContext, portletDisplayDDMTemplateId, rootLayouts) %>
+	</c:when>
+	<c:otherwise>
+
+		<%
+		StringBundler sb = new StringBundler();
+
+		_buildSiteMap(layout, rootLayouts, rootLayout, includeRootInTree, displayDepth, showCurrentPage, useHtmlTitle, showHiddenPages, 1, themeDisplay, sb);
+		%>
+
+		<%= sb.toString() %>
+	</c:otherwise>
+</c:choose>
+
+<%!
+private void _buildLayoutView(Layout layout, String cssClass, boolean useHtmlTitle, ThemeDisplay themeDisplay, StringBundler sb) throws Exception {
+	String layoutURL = PortalUtil.getLayoutURL(layout, themeDisplay);
+	String target = PortalUtil.getLayoutTarget(layout);
+
+	sb.append("<a href=\"");
+	sb.append(layoutURL);
+	sb.append("\" ");
+	sb.append(target);
+
+	if (Validator.isNotNull(cssClass)) {
+		sb.append(" class=\"");
+		sb.append(cssClass);
+		sb.append("\" ");
+	}
+
+	sb.append("> ");
+
+	String layoutName = layout.getName(themeDisplay.getLocale());
+
+	if (useHtmlTitle) {
+		layoutName = layout.getHTMLTitle(themeDisplay.getLocale());
+	}
+
+	sb.append(layoutName);
+	sb.append("</a>");
+}
+
+private void _buildSiteMap(Layout layout, List<Layout> layouts, Layout rootLayout, boolean includeRootInTree, int displayDepth, boolean showCurrentPage, boolean useHtmlTitle, boolean showHiddenPages, int curDepth, ThemeDisplay themeDisplay, StringBundler sb) throws Exception {
+	if (layouts.isEmpty()) {
+		return;
+	}
+
+	sb.append("<ul>");
+
+	if (includeRootInTree && (rootLayout != null) && (curDepth == 1)) {
+		sb.append("<li>");
+
+		String cssClass = "root";
+
+		if (rootLayout.getPlid() == layout.getPlid()) {
+			cssClass += " current";
+		}
+
+		_buildLayoutView(rootLayout, cssClass, useHtmlTitle, themeDisplay, sb);
+
+		_buildSiteMap(layout, layouts, rootLayout, includeRootInTree, displayDepth, showCurrentPage, useHtmlTitle, showHiddenPages, curDepth +1, themeDisplay, sb);
+
+		sb.append("</li>");
+	}
+	else {
+		for (Layout curLayout : layouts) {
+			if ((showHiddenPages || !curLayout.isHidden()) && LayoutPermissionUtil.contains(themeDisplay.getPermissionChecker(), curLayout, ActionKeys.VIEW)) {
+				sb.append("<li>");
+
+				String cssClass = StringPool.BLANK;
+
+				if (curLayout.getPlid() == layout.getPlid()) {
+					cssClass = "current";
+				}
+
+				_buildLayoutView(curLayout, cssClass, useHtmlTitle, themeDisplay, sb);
+
+				if ((displayDepth == 0) || (displayDepth > curDepth)) {
+					if (showHiddenPages) {
+						_buildSiteMap(layout, curLayout.getChildren(), rootLayout, includeRootInTree, displayDepth, showCurrentPage, useHtmlTitle, showHiddenPages, curDepth + 1, themeDisplay, sb);
+					}
+					else {
+						_buildSiteMap(layout, curLayout.getChildren(themeDisplay.getPermissionChecker()), rootLayout, includeRootInTree, displayDepth, showCurrentPage, useHtmlTitle, showHiddenPages, curDepth + 1, themeDisplay, sb);
+					}
+				}
+
+				sb.append("</li>");
+			}
+		}
+	}
+
+	sb.append("</ul>");
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/css/.sass-cache/main.css
new file mode 100644
index 0000000..c63553e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/css/.sass-cache/main.css
@@ -0,0 +1,9 @@
+.portlet-site-settings .trash-entries-max-age {
+  margin-left: 1.5em; }
+.portlet-site-settings .staging-section {
+  margin-left: 1.5em; }
+.portlet-site-settings .staging-types .field-choice label {
+  font-weight: normal; }
+.portlet-site-settings .membership-restriction-container {
+  margin-top: 1em; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/css/main.css
new file mode 100644
index 0000000..b10128b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/css/main.css
@@ -0,0 +1,17 @@
+.portlet-site-settings {
+	.trash-entries-max-age {
+		margin-left: 1.5em;
+	}
+
+	.staging-section {
+		margin-left: 1.5em;
+	}
+
+	.staging-types .field-choice label {
+		font-weight: normal;
+	}
+
+	.membership-restriction-container {
+		margin-top: 1em;
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_role_assignments_sites.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_role_assignments_sites.jsp
new file mode 100644
index 0000000..fa9ec07
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_role_assignments_sites.jsp
@@ -0,0 +1,96 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String tabs3 = (String)request.getAttribute("edit_role_assignments.jsp-tabs3");
+
+int cur = (Integer)request.getAttribute("edit_role_assignments.jsp-cur");
+
+Role role = (Role)request.getAttribute("edit_role_assignments.jsp-role");
+
+PortletURL portletURL = (PortletURL)request.getAttribute("edit_role_assignments.jsp-portletURL");
+%>
+
+<aui:input name="addGroupIds" type="hidden" />
+<aui:input name="removeGroupIds" type="hidden" />
+
+<liferay-ui:tabs
+	names="current,available"
+	param="tabs3"
+	url="<%= portletURL.toString() %>"
+/>
+
+<liferay-ui:search-container
+	rowChecker="<%= new GroupRoleChecker(renderResponse, role) %>"
+	searchContainer="<%= new GroupSearch(renderRequest, portletURL) %>"
+>
+
+	<%
+	GroupSearchTerms searchTerms = (GroupSearchTerms)searchContainer.getSearchTerms();
+
+	LinkedHashMap<String, Object> groupParams = new LinkedHashMap<String, Object>();
+
+	groupParams.put("site", Boolean.TRUE);
+
+	if (tabs3.equals("current")) {
+		groupParams.put("groupsRoles", new Long(role.getRoleId()));
+	}
+
+	total = GroupLocalServiceUtil.searchCount(company.getCompanyId(), searchTerms.getName(), searchTerms.getDescription(), groupParams, searchTerms.isAndOperator());
+
+	searchContainer.setTotal(total);
+	%>
+
+	<liferay-ui:search-container-results
+		results="<%= GroupLocalServiceUtil.search(company.getCompanyId(), searchTerms.getName(), searchTerms.getDescription(), groupParams, searchTerms.isAndOperator(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator()) %>"
+	/>
+
+	<liferay-ui:search-form
+		page="/html/portlet/users_admin/group_search.jsp"
+		searchContainer="<%= searchContainer %>"
+	/>
+
+	<div class="separator"><!-- --></div>
+
+	<%
+	String taglibOnClick = renderResponse.getNamespace() + "updateRoleGroups('" + portletURL.toString() + StringPool.AMPERSAND + renderResponse.getNamespace() + "cur=" + cur + "');";
+	%>
+
+	<aui:button onClick="<%= taglibOnClick %>" value="update-associations" />
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.Group"
+		escapedModel="<%= true %>"
+		keyProperty="groupId"
+		modelVar="group"
+		rowIdProperty="friendlyURL"
+	>
+
+		<liferay-ui:search-container-column-text
+			name="name"
+			value="<%= HtmlUtil.escape(group.getDescriptiveName(locale)) %>"
+		/>
+
+		<liferay-ui:search-container-column-text
+			name="type"
+			value="<%= LanguageUtil.get(pageContext, group.getTypeLabel()) %>"
+		/>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_site.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_site.jsp
new file mode 100644
index 0000000..28d738e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_site.jsp
@@ -0,0 +1,296 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String viewOrganizationsRedirect = ParamUtil.getString(request, "viewOrganizationsRedirect", themeDisplay.getURLControlPanel());
+String redirect = ParamUtil.getString(request, "redirect", viewOrganizationsRedirect);
+String closeRedirect = ParamUtil.getString(request, "closeRedirect");
+String backURL = ParamUtil.getString(request, "backURL", redirect);
+boolean showBackURL = ParamUtil.getBoolean(request, "showBackURL", true);
+
+Group group = (Group)request.getAttribute(WebKeys.GROUP);
+
+long groupId = BeanParamUtil.getLong(group, request, "groupId");
+
+long parentGroupId = ParamUtil.getLong(request, "parentGroupSearchContainerPrimaryKeys", GroupConstants.DEFAULT_PARENT_GROUP_ID);
+
+Group liveGroup = null;
+
+long liveGroupId = 0;
+
+Group stagingGroup = null;
+
+long stagingGroupId = 0;
+
+UnicodeProperties liveGroupTypeSettings = null;
+
+if (group != null) {
+	if (group.isStagingGroup()) {
+		liveGroup = group.getLiveGroup();
+
+		stagingGroup = group;
+	}
+	else {
+		liveGroup = group;
+
+		if (group.hasStagingGroup()) {
+			stagingGroup = group.getStagingGroup();
+		}
+	}
+
+	liveGroupId = liveGroup.getGroupId();
+
+	if (stagingGroup != null) {
+		stagingGroupId = stagingGroup.getGroupId();
+	}
+
+	liveGroupTypeSettings = liveGroup.getTypeSettingsProperties();
+}
+else {
+	liveGroupTypeSettings = new UnicodeProperties();
+}
+
+LayoutSetPrototype layoutSetPrototype = null;
+
+long layoutSetPrototypeId = ParamUtil.getLong(request, "layoutSetPrototypeId");
+
+if (layoutSetPrototypeId > 0) {
+	layoutSetPrototype = LayoutSetPrototypeServiceUtil.getLayoutSetPrototype(layoutSetPrototypeId);
+}
+
+boolean showPrototypes = ParamUtil.getBoolean(request, "showPrototypes", true);
+
+String[] mainSections = PropsValues.SITES_FORM_ADD_MAIN;
+String[] seoSections = PropsValues.SITES_FORM_ADD_SEO;
+String[] advancedSections = PropsValues.SITES_FORM_ADD_ADVANCED;
+String[] miscellaneousSections = PropsValues.SITES_FORM_ADD_MISCELLANEOUS;
+
+if (group != null) {
+	mainSections = PropsValues.SITES_FORM_UPDATE_MAIN;
+	seoSections = PropsValues.SITES_FORM_UPDATE_SEO;
+	advancedSections = PropsValues.SITES_FORM_UPDATE_ADVANCED;
+	miscellaneousSections = PropsValues.SITES_FORM_UPDATE_MISCELLANEOUS;
+}
+
+String[] analyticsTypes = PrefsPropsUtil.getStringArray(company.getCompanyId(), PropsKeys.ADMIN_ANALYTICS_TYPES, StringPool.NEW_LINE);
+
+if ((analyticsTypes.length == 0) && ArrayUtil.contains(advancedSections, "analytics")) {
+	advancedSections = ArrayUtil.remove(advancedSections, "analytics");
+}
+
+int contentSharingWithChildrenEnabledEnabled = PrefsPropsUtil.getInteger(company.getCompanyId(), PropsKeys.SITES_CONTENT_SHARING_WITH_CHILDREN_ENABLED);
+
+if ((contentSharingWithChildrenEnabledEnabled == 0) && ArrayUtil.contains(advancedSections, "content-sharing")) {
+	advancedSections = ArrayUtil.remove(advancedSections, "content-sharing");
+}
+
+boolean trashEnabled = PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.TRASH_ENABLED);
+
+if (!trashEnabled && ArrayUtil.contains(advancedSections, "recycle-bin")) {
+	advancedSections = ArrayUtil.remove(advancedSections, "recycle-bin");
+}
+
+if ((group != null) && group.isCompany()) {
+	mainSections = ArrayUtil.remove(mainSections, "categorization");
+	mainSections = ArrayUtil.remove(mainSections, "site-url");
+	mainSections = ArrayUtil.remove(mainSections, "site-template");
+
+	seoSections = new String[0];
+
+	advancedSections = ArrayUtil.remove(advancedSections, "default-user-associations");
+	advancedSections = ArrayUtil.remove(advancedSections, "analytics");
+	advancedSections = ArrayUtil.remove(advancedSections, "content-sharing");
+
+	miscellaneousSections = new String[0];
+}
+
+if ((group != null) && group.hasLocalOrRemoteStagingGroup()) {
+	advancedSections = ArrayUtil.remove(advancedSections, "staging");
+}
+
+String[][] categorySections = {mainSections, seoSections, advancedSections, miscellaneousSections};
+%>
+
+<c:if test="<%= !portletName.equals(PortletKeys.SITE_SETTINGS) %>">
+
+	<%
+	if (group != null) {
+		PortalUtil.addPortletBreadcrumbEntry(request, group.getDescriptiveName(locale), null);
+		PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit"), currentURL);
+	}
+	else if (parentGroupId != GroupConstants.DEFAULT_PARENT_GROUP_ID) {
+		Group parentGroup = GroupLocalServiceUtil.getGroup(parentGroupId);
+
+		PortalUtil.addPortletBreadcrumbEntry(request, parentGroup.getDescriptiveName(locale), null);
+	}
+	%>
+
+</c:if>
+
+<c:if test="<%= (group == null) || !layout.isTypeControlPanel() %>">
+
+	<%
+	boolean localizeTitle = true;
+	String title = "new-site";
+
+	if (group != null) {
+		localizeTitle= false;
+		title = group.getDescriptiveName(locale);
+	}
+	else if (layoutSetPrototype != null) {
+		localizeTitle= false;
+		title = layoutSetPrototype.getName(locale);
+	}
+	else if (parentGroupId != GroupConstants.DEFAULT_PARENT_GROUP_ID) {
+		title = "new-child-site";
+	%>
+
+		<div id="breadcrumb">
+			<liferay-ui:breadcrumb showCurrentGroup="<%= false %>" showCurrentPortlet="<%= false %>" showGuestGroup="<%= false %>" showLayout="<%= false %>" showPortletBreadcrumb="<%= true %>" />
+		</div>
+
+	<%
+	}
+	%>
+
+	<liferay-ui:header
+		backURL="<%= backURL %>"
+		escapeXml="<%= false %>"
+		localizeTitle="<%= localizeTitle %>"
+		showBackURL="<%= showBackURL %>"
+		title="<%= HtmlUtil.escape(title) %>"
+	/>
+</c:if>
+
+<portlet:actionURL var="editSiteURL">
+	<portlet:param name="struts_action" value="/sites_admin/edit_site" />
+</portlet:actionURL>
+
+<aui:form action="<%= editSiteURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveGroup();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+	<aui:input name="closeRedirect" type="hidden" value="<%= closeRedirect %>" />
+	<aui:input name="backURL" type="hidden" value="<%= backURL %>" />
+	<aui:input name="groupId" type="hidden" value="<%= groupId %>" />
+	<aui:input name="liveGroupId" type="hidden" value="<%= liveGroupId %>" />
+	<aui:input name="stagingGroupId" type="hidden" value="<%= stagingGroupId %>" />
+
+	<%
+	request.setAttribute("site.group", group);
+	request.setAttribute("site.liveGroup", liveGroup);
+	request.setAttribute("site.liveGroupId", new Long(liveGroupId));
+	request.setAttribute("site.stagingGroup", stagingGroup);
+	request.setAttribute("site.stagingGroupId", new Long(stagingGroupId));
+	request.setAttribute("site.liveGroupTypeSettings", liveGroupTypeSettings);
+	request.setAttribute("site.layoutSetPrototype", layoutSetPrototype);
+	request.setAttribute("site.showPrototypes", String.valueOf(showPrototypes));
+	%>
+
+	<liferay-ui:form-navigator
+		backURL="<%= backURL %>"
+		categoryNames="<%= _CATEGORY_NAMES %>"
+		categorySections="<%= categorySections %>"
+		jspPath="/html/portlet/sites_admin/site/"
+		showButtons="<%= true %>"
+	/>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />saveGroup() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (group == null) ? Constants.ADD : Constants.UPDATE %>";
+
+		var ok = true;
+
+		<c:if test="<%= liveGroup != null %>">
+			A = AUI();
+
+			var stagingTypeEl = A.one('input[name=<portlet:namespace />stagingType]:checked');
+
+			<c:choose>
+				<c:when test="<%= liveGroup.isStaged() && !liveGroup.isStagedRemotely() %>">
+					var oldValue = 1;
+				</c:when>
+				<c:when test="<%= liveGroup.isStaged() && liveGroup.isStagedRemotely() %>">
+					var oldValue = 2;
+				</c:when>
+				<c:otherwise>
+					var oldValue = 0;
+				</c:otherwise>
+			</c:choose>
+
+			if (stagingTypeEl && (stagingTypeEl.val() != oldValue)) {
+				var currentValue = stagingTypeEl.val();
+
+				ok = false;
+
+				if (0 == currentValue) {
+					ok = confirm('<%= UnicodeLanguageUtil.format(pageContext, "are-you-sure-you-want-to-deactivate-staging-for-x", liveGroup.getDescriptiveName(locale)) %>');
+				}
+				else if (1 == currentValue) {
+					ok = confirm('<%= UnicodeLanguageUtil.format(pageContext, "are-you-sure-you-want-to-activate-local-staging-for-x", liveGroup.getDescriptiveName(locale)) %>');
+				}
+				else if (2 == currentValue) {
+					ok = confirm('<%= UnicodeLanguageUtil.format(pageContext, "are-you-sure-you-want-to-activate-remote-staging-for-x", liveGroup.getDescriptiveName(locale)) %>');
+				}
+			}
+		</c:if>
+
+		if (ok) {
+			<c:if test="<%= (group != null) && !group.isCompany() %>">
+				<portlet:namespace />saveLocales();
+			</c:if>
+
+			submitForm(document.<portlet:namespace />fm);
+		}
+	}
+</aui:script>
+
+<aui:script use="aui-base">
+	var applicationAdapter = A.one('#<portlet:namespace />customJspServletContextName');
+
+	if (applicationAdapter) {
+		var publicPages = A.one('#<portlet:namespace />publicLayoutSetPrototypeId');
+		var privatePages = A.one('#<portlet:namespace />privateLayoutSetPrototypeId');
+
+		var toggleCompatibleSiteTemplates = function(event) {
+			var siteTemplate = applicationAdapter.val();
+
+			var options = A.all([]);
+
+			if (publicPages) {
+				options = options.concat(publicPages.all('option[data-servletContextName]'));
+			}
+
+			if (privatePages) {
+				options = options.concat(privatePages.all('option[data-servletContextName]'));
+			}
+
+			options.attr('disabled', false);
+
+			options.filter(':not([data-servletContextName=' + siteTemplate + '])').attr('disabled', true);
+		};
+
+		applicationAdapter.on('change', toggleCompatibleSiteTemplates);
+
+		toggleCompatibleSiteTemplates();
+	}
+</aui:script>
+
+<%!
+private static final String[] _CATEGORY_NAMES = {"basic-information", "search-engine-optimization", "advanced", "miscellaneous"};
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_site_assignments.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_site_assignments.jsp
new file mode 100644
index 0000000..9ca769d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_site_assignments.jsp
@@ -0,0 +1,280 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String tabs1 = ParamUtil.getString(request, "tabs1", "summary");
+String tabs2 = ParamUtil.getString(request, "tabs2", "current");
+
+int cur = ParamUtil.getInteger(request, SearchContainer.DEFAULT_CUR_PARAM);
+
+String redirect = ParamUtil.getString(request, "redirect");
+boolean showBackURL = ParamUtil.getBoolean(request, "showBackURL", true);
+
+Group group = (Group)request.getAttribute(WebKeys.GROUP);
+
+if (group != null) {
+	group = StagingUtil.getLiveGroup(group.getGroupId());
+}
+
+User selUser = PortalUtil.getSelectedUser(request, false);
+
+long userGroupId = ParamUtil.getLong(request, "userGroupId");
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/sites_admin/edit_site_assignments");
+portletURL.setParameter("tabs1", tabs1);
+portletURL.setParameter("tabs2", tabs2);
+portletURL.setParameter("redirect", redirect);
+portletURL.setParameter("groupId", String.valueOf(group.getGroupId()));
+
+PortletURL tabsURL = renderResponse.createRenderURL();
+
+tabsURL.setParameter("struts_action", "/sites_admin/edit_site_assignments");
+tabsURL.setParameter("tabs1", tabs1);
+tabsURL.setParameter("tabs2", "current");
+tabsURL.setParameter("redirect", redirect);
+tabsURL.setParameter("showBackURL", String.valueOf(showBackURL));
+
+request.setAttribute("edit_site_assignments.jsp-tabs1", tabs1);
+request.setAttribute("edit_site_assignments.jsp-tabs2", tabs2);
+
+request.setAttribute("edit_site_assignments.jsp-cur", cur);
+
+request.setAttribute("edit_site_assignments.jsp-redirect", redirect);
+
+request.setAttribute("edit_site_assignments.jsp-group", group);
+request.setAttribute("edit_site_assignments.jsp-selUser", selUser);
+
+request.setAttribute("edit_site_assignments.jsp-portletURL", portletURL);
+%>
+
+<c:choose>
+	<c:when test="<%= (selUser == null) && (userGroupId == 0) %>">
+		<c:choose>
+			<c:when test='<%= tabs2.equals("available") %>'>
+				<liferay-ui:header
+					backURL="<%= redirect %>"
+					escapeXml="<%= false %>"
+					localizeTitle="<%= false %>"
+					title='<%= LanguageUtil.get(pageContext, "add-members") + ": " + LanguageUtil.get(pageContext, tabs1) %>'
+				/>
+			</c:when>
+			<c:otherwise>
+				<liferay-util:include page="/html/portlet/sites_admin/edit_site_assignments_toolbar.jsp">
+					<liferay-util:param name="toolbarItem" value='<%= tabs2.equals("available") ? "add-role" : null %>' />
+				</liferay-util:include>
+			</c:otherwise>
+		</c:choose>
+
+		<c:if test='<%= tabs1.equals("summary") || tabs2.equals("current") %>'>
+			<liferay-ui:tabs
+				names="summary,users,organizations,user-groups"
+				param="tabs1"
+				url="<%= tabsURL.toString() %>"
+			/>
+		</c:if>
+	</c:when>
+</c:choose>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "submit();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="tabs1" type="hidden" value="<%= tabs1 %>" />
+	<aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
+	<aui:input name="assignmentsRedirect" type="hidden" />
+	<aui:input name="groupId" type="hidden" value="<%= String.valueOf(group.getGroupId()) %>" />
+
+	<c:choose>
+		<c:when test='<%= tabs1.equals("summary") %>'>
+			<aui:input name="keywords" type="hidden" value="" />
+
+			<div class="site-membership-type">
+				<liferay-ui:icon
+					image="assign"
+					label="<%= true %>"
+					message='<%= LanguageUtil.get(pageContext, "membership-type") + StringPool.COLON + StringPool.SPACE + LanguageUtil.get(pageContext, GroupConstants.getTypeLabel(group.getType())) %>'
+				/>
+
+				<liferay-ui:icon-help message='<%= LanguageUtil.get(pageContext, "membership-type-" + GroupConstants.getTypeLabel(group.getType()) + "-help") %>' />
+
+				<c:if test="<%= group.getType() == GroupConstants.TYPE_SITE_RESTRICTED %>">
+
+					<%
+					int pendingRequests = MembershipRequestLocalServiceUtil.searchCount(group.getGroupId(), MembershipRequestConstants.STATUS_PENDING);
+					%>
+
+					<c:if test="<%= pendingRequests > 0 %>">
+						<portlet:renderURL var="viewMembershipRequestsURL">
+							<portlet:param name="struts_action" value="/sites_admin/view_membership_requests" />
+							<portlet:param name="redirect" value="<%= currentURL %>" />
+							<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+						</portlet:renderURL>
+
+						<br />
+
+						<liferay-ui:icon
+							image="manage_task"
+							label="<%= true %>"
+							message='<%= LanguageUtil.format(pageContext, "there-are-x-membership-requests-pending", String.valueOf(pendingRequests)) %>'
+							url="<%= viewMembershipRequestsURL %>"
+						/>
+					</c:if>
+				</c:if>
+			</div>
+
+			<liferay-util:include page="/html/portlet/sites_admin/edit_site_assignments_users.jsp" />
+
+			<liferay-util:include page="/html/portlet/sites_admin/edit_site_assignments_organizations.jsp" />
+
+			<liferay-util:include page="/html/portlet/sites_admin/edit_site_assignments_user_groups.jsp" />
+		</c:when>
+		<c:when test='<%= tabs1.equals("users") %>'>
+			<c:choose>
+				<c:when test="<%= selUser == null %>">
+					<liferay-util:include page="/html/portlet/sites_admin/edit_site_assignments_users.jsp" />
+				</c:when>
+				<c:otherwise>
+					<liferay-util:include page="/html/portlet/sites_admin/edit_site_assignments_users_roles.jsp" />
+				</c:otherwise>
+			</c:choose>
+		</c:when>
+		<c:when test='<%= tabs1.equals("organizations") %>'>
+			<liferay-util:include page="/html/portlet/sites_admin/edit_site_assignments_organizations.jsp" />
+		</c:when>
+		<c:when test='<%= tabs1.equals("user-groups") %>'>
+			<c:choose>
+				<c:when test="<%= userGroupId == 0 %>">
+					<liferay-util:include page="/html/portlet/sites_admin/edit_site_assignments_user_groups.jsp" />
+				</c:when>
+				<c:otherwise>
+					<liferay-util:include page="/html/portlet/sites_admin/edit_site_assignments_user_groups_roles.jsp" />
+				</c:otherwise>
+			</c:choose>
+		</c:when>
+	</c:choose>
+</aui:form>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />submit',
+		function() {
+			var organizationKeywords = document.<portlet:namespace />fm.<portlet:namespace /><%= DisplayTerms.KEYWORDS %>_organizations;
+
+			if (organizationKeywords && organizationKeywords.value) {
+				document.<portlet:namespace />fm.<portlet:namespace /><%= DisplayTerms.KEYWORDS %>.value = organizationKeywords.value;
+
+				submitForm(document.<portlet:namespace />fm, "<portlet:renderURL><portlet:param name="struts_action" value="/sites_admin/edit_site_assignments" /><portlet:param name="tabs1" value="organizations" /><portlet:param name="redirect" value="<%= redirect %>" /><portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" /></portlet:renderURL>");
+			}
+
+			var userKeywords = document.<portlet:namespace />fm.<portlet:namespace /><%= DisplayTerms.KEYWORDS %>_users;
+
+			if (userKeywords && userKeywords.value) {
+				document.<portlet:namespace />fm.<portlet:namespace /><%= DisplayTerms.KEYWORDS %>.value = userKeywords.value;
+
+				submitForm(document.<portlet:namespace />fm, "<portlet:renderURL><portlet:param name="struts_action" value="/sites_admin/edit_site_assignments" /><portlet:param name="tabs1" value="users" /><portlet:param name="redirect" value="<%= redirect %>" /><portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" /></portlet:renderURL>");
+			}
+
+			var userGroupKeywords = document.<portlet:namespace />fm.<portlet:namespace /><%= DisplayTerms.KEYWORDS %>_user_groups;
+
+			if (userGroupKeywords && userGroupKeywords.value) {
+				document.<portlet:namespace />fm.<portlet:namespace /><%= DisplayTerms.KEYWORDS %>.value = userGroupKeywords.value;
+
+				submitForm(document.<portlet:namespace />fm, "<portlet:renderURL><portlet:param name="struts_action" value="/sites_admin/edit_site_assignments" /><portlet:param name="tabs1" value="user-groups" /><portlet:param name="redirect" value="<%= redirect %>" /><portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" /></portlet:renderURL>");
+			}
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['liferay-util-list-fields']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />updateGroupOrganizations',
+		function(assignmentsRedirect) {
+			document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "group_organizations";
+			document.<portlet:namespace />fm.<portlet:namespace />assignmentsRedirect.value = assignmentsRedirect;
+			document.<portlet:namespace />fm.<portlet:namespace />addOrganizationIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+			document.<portlet:namespace />fm.<portlet:namespace />removeOrganizationIds.value = Liferay.Util.listUncheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+			submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/sites_admin/edit_site_assignments" /></portlet:actionURL>");
+		},
+		['liferay-util-list-fields']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />updateGroupUserGroups',
+		function(assignmentsRedirect) {
+			document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "group_user_groups";
+			document.<portlet:namespace />fm.<portlet:namespace />assignmentsRedirect.value = assignmentsRedirect;
+			document.<portlet:namespace />fm.<portlet:namespace />addUserGroupIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+			document.<portlet:namespace />fm.<portlet:namespace />removeUserGroupIds.value = Liferay.Util.listUncheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+			submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/sites_admin/edit_site_assignments" /></portlet:actionURL>");
+		},
+		['liferay-util-list-fields']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />updateGroupUsers',
+		function(assignmentsRedirect) {
+			document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "group_users";
+			document.<portlet:namespace />fm.<portlet:namespace />assignmentsRedirect.value = assignmentsRedirect;
+			document.<portlet:namespace />fm.<portlet:namespace />addUserIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+			document.<portlet:namespace />fm.<portlet:namespace />removeUserIds.value = Liferay.Util.listUncheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+			submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/sites_admin/edit_site_assignments" /></portlet:actionURL>");
+		},
+		['liferay-util-list-fields']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />updateUserGroupGroupRole',
+		function(assignmentsRedirect) {
+			document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "user_group_group_role";
+			document.<portlet:namespace />fm.<portlet:namespace />assignmentsRedirect.value = assignmentsRedirect;
+			document.<portlet:namespace />fm.<portlet:namespace />addRoleIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+			document.<portlet:namespace />fm.<portlet:namespace />removeRoleIds.value = Liferay.Util.listUncheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+			submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/sites_admin/edit_site_assignments" /></portlet:actionURL>");
+		},
+		['liferay-util-list-fields']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />updateUserGroupRole',
+		function(assignmentsRedirect) {
+			document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "user_group_role";
+			document.<portlet:namespace />fm.<portlet:namespace />assignmentsRedirect.value = assignmentsRedirect;
+			document.<portlet:namespace />fm.<portlet:namespace />addRoleIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+			document.<portlet:namespace />fm.<portlet:namespace />removeRoleIds.value = Liferay.Util.listUncheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+			submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/sites_admin/edit_site_assignments" /></portlet:actionURL>");
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
+
+<%
+PortalUtil.addPortletBreadcrumbEntry(request, group.getDescriptiveName(locale), null);
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "assign-members"), currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_site_assignments_organizations.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_site_assignments_organizations.jsp
new file mode 100644
index 0000000..4862512
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_site_assignments_organizations.jsp
@@ -0,0 +1,208 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String tabs1 = (String)request.getAttribute("edit_site_assignments.jsp-tabs1");
+String tabs2 = (String)request.getAttribute("edit_site_assignments.jsp-tabs2");
+
+int cur = (Integer)request.getAttribute("edit_site_assignments.jsp-cur");
+
+Group group = (Group)request.getAttribute("edit_site_assignments.jsp-group");
+
+PortletURL portletURL = (PortletURL)request.getAttribute("edit_site_assignments.jsp-portletURL");
+
+PortletURL viewOrganizationsURL = renderResponse.createRenderURL();
+
+viewOrganizationsURL.setParameter("struts_action", "/sites_admin/edit_site_assignments");
+viewOrganizationsURL.setParameter("tabs1", "organizations");
+viewOrganizationsURL.setParameter("tabs2", tabs2);
+viewOrganizationsURL.setParameter("redirect", currentURL);
+viewOrganizationsURL.setParameter("groupId", String.valueOf(group.getGroupId()));
+
+OrganizationGroupChecker organizationGroupChecker = null;
+
+if (!tabs1.equals("summary") && !tabs2.equals("current")) {
+	organizationGroupChecker = new OrganizationGroupChecker(renderResponse, group);
+}
+
+String emptyResultsMessage = OrganizationSearch.EMPTY_RESULTS_MESSAGE;
+
+if (tabs2.equals("current")) {
+	emptyResultsMessage ="no-organization-was-found-that-is-a-member-of-this-site";
+}
+
+SearchContainer searchContainer = new OrganizationSearch(renderRequest, viewOrganizationsURL);
+
+searchContainer.setEmptyResultsMessage(emptyResultsMessage);
+%>
+
+<aui:input name="tabs1" type="hidden" value="organizations" />
+<aui:input name="addOrganizationIds" type="hidden" />
+<aui:input name="removeOrganizationIds" type="hidden" />
+
+<liferay-ui:search-container
+	rowChecker="<%= organizationGroupChecker %>"
+	searchContainer="<%= searchContainer %>"
+	var="organizationSearchContainer"
+>
+	<c:if test='<%= !tabs1.equals("summary") %>'>
+		<liferay-ui:search-form
+			page="/html/portlet/users_admin/organization_search.jsp"
+		/>
+
+		<div class="separator"><!-- --></div>
+	</c:if>
+
+	<%
+	OrganizationSearchTerms searchTerms = (OrganizationSearchTerms)organizationSearchContainer.getSearchTerms();
+
+	long parentOrganizationId = OrganizationConstants.ANY_PARENT_ORGANIZATION_ID;
+
+	LinkedHashMap<String, Object> organizationParams = new LinkedHashMap<String, Object>();
+
+	if (tabs1.equals("summary") || tabs2.equals("current")) {
+		organizationParams.put("groupOrganization", new Long(group.getGroupId()));
+		organizationParams.put("organizationsGroups", new Long(group.getGroupId()));
+	}
+	%>
+
+	<liferay-ui:search-container-results>
+		<%@ include file="/html/portlet/users_admin/organization_search_results.jspf" %>
+	</liferay-ui:search-container-results>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.Organization"
+		escapedModel="<%= true %>"
+		keyProperty="organizationId"
+		modelVar="organization"
+	>
+		<liferay-ui:search-container-column-text
+			name="name"
+			orderable="<%= true %>"
+		>
+
+			<%= organization.getName() %>
+
+			<c:if test="<%= group.getOrganizationId() == organization.getOrganizationId() %>">
+				<liferay-ui:icon-help message='<%= LanguageUtil.format(pageContext, "this-site-belongs-to-x-which-is-an-organization-of-type-x", new String[] {organization.getName(), LanguageUtil.get(pageContext, organization.getType())}) + StringPool.SPACE + LanguageUtil.format(pageContext, "all-users-of-x-are-automatically-members-of-the-site", organization.getName()) %>' />
+			</c:if>
+		</liferay-ui:search-container-column-text>
+
+		<liferay-ui:search-container-column-text
+			buffer="buffer"
+			name="parent-organization"
+		>
+
+			<%
+			if (organization.getParentOrganizationId() > 0) {
+				try {
+					Organization parentOrganization = OrganizationLocalServiceUtil.getOrganization(organization.getParentOrganizationId());
+
+					buffer.append(HtmlUtil.escape(parentOrganization.getName()));
+				}
+				catch (Exception e) {
+				}
+			}
+			%>
+
+		</liferay-ui:search-container-column-text>
+
+		<liferay-ui:search-container-column-text
+			name="type"
+			orderable="<%= true %>"
+			value="<%= LanguageUtil.get(pageContext, organization.getType()) %>"
+		/>
+
+		<liferay-ui:search-container-column-text
+			name="city"
+			value="<%= HtmlUtil.escape(organization.getAddress().getCity()) %>"
+		/>
+
+		<liferay-ui:search-container-column-text
+			name="region"
+		>
+			<liferay-ui:write bean="<%= organization %>" property="region" />
+		</liferay-ui:search-container-column-text>
+
+		<liferay-ui:search-container-column-text
+			name="country"
+		>
+			<liferay-ui:write bean="<%= organization %>" property="country" />
+		</liferay-ui:search-container-column-text>
+	</liferay-ui:search-container-row>
+
+	<liferay-util:buffer var="formButton">
+		<c:choose>
+			<c:when test='<%= tabs2.equals("current") %>'>
+
+				<%
+				viewOrganizationsURL.setParameter("tabs2", "available");
+				%>
+
+				<liferay-ui:icon
+					image="../aui/globe"
+					label="<%= true %>"
+					message="assign-organizations"
+					url="<%= viewOrganizationsURL.toString() %>"
+				/>
+
+				<%
+				viewOrganizationsURL.setParameter("tabs2", "current");
+				%>
+
+			</c:when>
+			<c:otherwise>
+
+				<%
+				portletURL.setParameter("tabs2", "current");
+
+				String taglibOnClick = renderResponse.getNamespace() + "updateGroupOrganizations('" + portletURL.toString() + StringPool.AMPERSAND + renderResponse.getNamespace() + "cur=" + cur + "');";
+				%>
+
+				<aui:button-row>
+					<aui:button onClick="<%= taglibOnClick %>" primary="<%= true %>" value="save" />
+				</aui:button-row>
+			</c:otherwise>
+		</c:choose>
+	</liferay-util:buffer>
+
+	<c:choose>
+		<c:when test='<%= tabs1.equals("summary") && (total > 0) %>'>
+			<liferay-ui:panel collapsible="<%= true %>" extended="<%= false %>" persistState="<%= true %>" title='<%= LanguageUtil.format(pageContext, (total > 1) ? "x-organizations" : "x-organization", total) %>'>
+				<span class="form-search">
+					<liferay-ui:input-search name='<%= DisplayTerms.KEYWORDS + "_organizations" %>' />
+				</span>
+
+				<liferay-ui:search-iterator paginate="<%= false %>" />
+
+				<c:if test="<%= total > searchContainer.getDelta() %>">
+					<a href="<%= viewOrganizationsURL %>"><liferay-ui:message key="view-more" /> &raquo;</a>
+				</c:if>
+			</liferay-ui:panel>
+		</c:when>
+		<c:when test='<%= !tabs1.equals("summary") %>'>
+			<c:if test="<%= total > searchContainer.getDelta() %>">
+				<%= formButton %>
+			</c:if>
+
+			<liferay-ui:search-iterator />
+
+			<%= formButton %>
+		</c:when>
+	</c:choose>
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_site_assignments_toolbar.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_site_assignments_toolbar.jsp
new file mode 100644
index 0000000..39e20ae
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_site_assignments_toolbar.jsp
@@ -0,0 +1,91 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String toolbarItem = ParamUtil.getString(request, "toolbarItem", "view-members");
+
+Group group = (Group)request.getAttribute(WebKeys.GROUP);
+
+if (group == null) {
+	long groupId = ParamUtil.getLong(request, "groupId");
+
+	group = GroupServiceUtil.getGroup(groupId);
+}
+%>
+
+<liferay-portlet:renderURL varImpl="assignMembersURL">
+	<liferay-portlet:param name="struts_action" value="/sites_admin/edit_site_assignments" />
+	<liferay-portlet:param name="redirect" value="<%= currentURL %>" />
+</liferay-portlet:renderURL>
+
+<aui:nav-bar>
+	<aui:nav>
+		<c:if test="<%= GroupPermissionUtil.contains(permissionChecker, group.getGroupId(), ActionKeys.ASSIGN_MEMBERS) %>">
+			<aui:nav-item dropdown="<%= true %>" iconCssClass="icon-plus" label="add-members" selected='<%= toolbarItem.equals("add-members") %>'>
+
+				<%
+				assignMembersURL.setParameter("tabs1", "users");
+				assignMembersURL.setParameter("tabs2", "available");
+				%>
+
+				<aui:nav-item href="<%= assignMembersURL.toString() %>" iconCssClass="icon-user" label="user" />
+
+				<%
+				assignMembersURL.setParameter("tabs1", "organizations");
+				assignMembersURL.setParameter("tabs2", "available");
+				%>
+
+				<aui:nav-item href="<%= assignMembersURL.toString() %>" iconCssClass="icon-globe" label="organization" />
+
+				<%
+				assignMembersURL.setParameter("tabs1", "user-groups");
+				assignMembersURL.setParameter("tabs2", "available");
+				%>
+
+				<aui:nav-item href="<%= assignMembersURL.toString() %>" iconCssClass="icon-globe" label="user-group" />
+			</aui:nav-item>
+		</c:if>
+
+		<c:if test="<%= permissionChecker.isGroupOwner(group.getGroupId()) || GroupPermissionUtil.contains(permissionChecker, group.getGroupId(), ActionKeys.ASSIGN_USER_ROLES) %>">
+			<aui:nav-item dropdown="<%= true %>" iconCssClass="icon-plus" label="add-site-roles-to" selected='<%= toolbarItem.equals("assign-user-roles") %>'>
+				<portlet:renderURL var="assignUserRolesURL">
+					<portlet:param name="struts_action" value="/sites_admin/edit_user_roles" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+				</portlet:renderURL>
+
+				<aui:nav-item href="<%= assignUserRolesURL %>" iconCssClass="icon-user" label="users" />
+
+				<portlet:renderURL var="assignUserGroupRolesURL">
+					<portlet:param name="struts_action" value="/sites_admin/edit_user_group_roles" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+				</portlet:renderURL>
+
+				<aui:nav-item href="<%= assignUserGroupRolesURL %>" iconCssClass="icon-globe" label="user-groups" />
+			</aui:nav-item>
+		</c:if>
+
+		<c:if test="<%= group.getType() == GroupConstants.TYPE_SITE_RESTRICTED %>">
+			<portlet:renderURL var="viewMembershipRequestsURL">
+				<portlet:param name="struts_action" value="/sites_admin/view_membership_requests" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+			</portlet:renderURL>
+
+			<aui:nav-item href="<%= viewMembershipRequestsURL %>" label="view-membership-requests" selected='<%= toolbarItem.equals("view-membership-requests") %>' />
+		</c:if>
+	</aui:nav>
+</aui:nav-bar>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_site_assignments_user_groups.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_site_assignments_user_groups.jsp
new file mode 100644
index 0000000..3249371
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_site_assignments_user_groups.jsp
@@ -0,0 +1,201 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String tabs1 = (String)request.getAttribute("edit_site_assignments.jsp-tabs1");
+String tabs2 = (String)request.getAttribute("edit_site_assignments.jsp-tabs2");
+
+int cur = (Integer)request.getAttribute("edit_site_assignments.jsp-cur");
+
+Group group = (Group)request.getAttribute("edit_site_assignments.jsp-group");
+
+PortletURL portletURL = (PortletURL)request.getAttribute("edit_site_assignments.jsp-portletURL");
+
+PortletURL viewUserGroupsURL = renderResponse.createRenderURL();
+
+viewUserGroupsURL.setParameter("struts_action", "/sites_admin/edit_site_assignments");
+viewUserGroupsURL.setParameter("tabs1", "user-groups");
+viewUserGroupsURL.setParameter("tabs2", tabs2);
+viewUserGroupsURL.setParameter("redirect", currentURL);
+viewUserGroupsURL.setParameter("groupId", String.valueOf(group.getGroupId()));
+
+UserGroupGroupChecker userGroupGroupChecker = null;
+
+if (!tabs1.equals("summary") && !tabs2.equals("current")) {
+	userGroupGroupChecker = new UserGroupGroupChecker(renderResponse, group);
+}
+
+String emptyResultsMessage = UserGroupSearch.EMPTY_RESULTS_MESSAGE;
+
+if (tabs2.equals("current")) {
+	emptyResultsMessage ="no-user-group-was-found-that-is-a-member-of-this-site";
+}
+
+UserGroupSearch userGroupSearch = new UserGroupSearch(renderRequest, viewUserGroupsURL);
+
+userGroupSearch.setEmptyResultsMessage(emptyResultsMessage);
+%>
+
+<aui:input name="tabs1" type="hidden" value="user-groups" />
+<aui:input name="addUserGroupIds" type="hidden" />
+<aui:input name="removeUserGroupIds" type="hidden" />
+
+<liferay-ui:search-container
+	rowChecker="<%= userGroupGroupChecker %>"
+	searchContainer="<%= userGroupSearch %>"
+>
+	<c:if test='<%= !tabs1.equals("summary") %>'>
+		<liferay-ui:search-form
+			page="/html/portlet/user_groups_admin/user_group_search.jsp"
+		/>
+
+		<div class="separator"><!-- --></div>
+	</c:if>
+
+	<%
+	UserGroupDisplayTerms searchTerms = (UserGroupDisplayTerms)searchContainer.getSearchTerms();
+
+	LinkedHashMap<String, Object> userGroupParams = new LinkedHashMap<String, Object>();
+
+	if (tabs1.equals("summary") || tabs2.equals("current")) {
+		userGroupParams.put("userGroupsGroups", new Long(group.getGroupId()));
+	}
+
+	total = UserGroupLocalServiceUtil.searchCount(company.getCompanyId(), searchTerms.getKeywords(), userGroupParams);
+
+	searchContainer.setTotal(total);
+	%>
+
+	<liferay-ui:search-container-results
+		results="<%= UserGroupLocalServiceUtil.search(company.getCompanyId(), searchTerms.getKeywords(), userGroupParams, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator()) %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.UserGroup"
+		escapedModel="<%= true %>"
+		keyProperty="userGroupId"
+		modelVar="userGroup"
+	>
+		<liferay-ui:search-container-row-parameter
+			name="group"
+			value="<%= group %>"
+		/>
+
+		<liferay-ui:search-container-column-text
+			name="name"
+			orderable="<%= true %>"
+			property="name"
+		/>
+
+		<liferay-ui:search-container-column-text
+			name="description"
+			orderable="<%= true %>"
+			property="description"
+		/>
+
+		<c:if test='<%= tabs1.equals("summary") || tabs2.equals("current") %>'>
+			<liferay-ui:search-container-column-text
+				buffer="buffer"
+				name="site-roles"
+			>
+
+				<%
+				List<UserGroupGroupRole> userGroupGroupRoles = UserGroupGroupRoleLocalServiceUtil.getUserGroupGroupRoles(userGroup.getUserGroupId(), group.getGroupId());
+
+				for (int i = 0; i < userGroupGroupRoles.size(); i++) {
+					UserGroupGroupRole userGroupGroupRole = userGroupGroupRoles.get(i);
+
+					Role role = RoleLocalServiceUtil.getRole(userGroupGroupRole.getRoleId());
+
+					buffer.append(HtmlUtil.escape(role.getTitle(locale)));
+
+					if ((i + 1) < userGroupGroupRoles.size()) {
+						buffer.append(StringPool.COMMA_AND_SPACE);
+					}
+				}
+				%>
+
+			</liferay-ui:search-container-column-text>
+
+			<liferay-ui:search-container-column-jsp
+				align="right"
+				path="/html/portlet/sites_admin/user_group_action.jsp"
+			/>
+		</c:if>
+	</liferay-ui:search-container-row>
+
+	<liferay-util:buffer var="formButton">
+		<c:choose>
+			<c:when test='<%= tabs2.equals("current") %>'>
+
+				<%
+				viewUserGroupsURL.setParameter("tabs2", "available");
+				%>
+
+				<liferay-ui:icon
+					image="../aui/globe"
+					label="<%= true %>"
+					message="assign-user-groups"
+					url="<%= viewUserGroupsURL.toString() %>"
+				/>
+
+				<%
+				viewUserGroupsURL.setParameter("tabs2", "current");
+				%>
+
+			</c:when>
+			<c:otherwise>
+
+				<%
+				portletURL.setParameter("tabs2", "current");
+
+				String taglibOnClick = renderResponse.getNamespace() + "updateGroupUserGroups('" + portletURL.toString() + StringPool.AMPERSAND + renderResponse.getNamespace() + "cur=" + cur + "');";
+				%>
+
+				<aui:button-row>
+					<aui:button onClick="<%= taglibOnClick %>" primary="<%= true %>" value="save" />
+				</aui:button-row>
+			</c:otherwise>
+		</c:choose>
+	</liferay-util:buffer>
+
+	<c:choose>
+		<c:when test='<%= tabs1.equals("summary") && (total > 0) %>'>
+			<liferay-ui:panel collapsible="<%= true %>" extended="<%= false %>" persistState="<%= true %>" title='<%= LanguageUtil.format(pageContext, (total > 1) ? "x-user-groups" : "x-user-group", total) %>'>
+				<span class="form-search">
+					<liferay-ui:input-search name='<%= DisplayTerms.KEYWORDS + "_user_groups" %>' />
+				</span>
+
+				<liferay-ui:search-iterator paginate="<%= false %>" />
+
+				<c:if test="<%= total > userGroupSearch.getDelta() %>">
+					<a href="<%= viewUserGroupsURL %>"><liferay-ui:message key="view-more" /> &raquo;</a>
+				</c:if>
+			</liferay-ui:panel>
+		</c:when>
+		<c:when test='<%= !tabs1.equals("summary") %>'>
+			<c:if test="<%= total > userGroupSearch.getDelta() %>">
+				<%= formButton %>
+			</c:if>
+
+			<liferay-ui:search-iterator />
+
+			<%= formButton %>
+		</c:when>
+	</c:choose>
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_site_assignments_user_groups_roles.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_site_assignments_user_groups_roles.jsp
new file mode 100644
index 0000000..3c5b7c5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_site_assignments_user_groups_roles.jsp
@@ -0,0 +1,126 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String tabs1 = (String)request.getAttribute("edit_site_assignments.jsp-tabs1");
+String tabs2 = (String)request.getAttribute("edit_site_assignments.jsp-tabs2");
+
+String redirect = (String)request.getAttribute("edit_site_assignments.jsp-redirect");
+
+int cur = (Integer)request.getAttribute("edit_site_assignments.jsp-cur");
+
+Group group = (Group)request.getAttribute("edit_site_assignments.jsp-group");
+
+long userGroupId = ParamUtil.getLong(request, "userGroupId");
+
+UserGroup userGroup = UserGroupLocalServiceUtil.getUserGroup(userGroupId);
+
+PortletURL portletURL = (PortletURL)request.getAttribute("edit_site_assignments.jsp-portletURL");
+
+portletURL.setParameter("userGroupId", String.valueOf(userGroupId));
+%>
+
+<aui:input name="userGroupId" type="hidden" value="<%= userGroupId %>" />
+<aui:input name="addRoleIds" type="hidden" />
+<aui:input name="removeRoleIds" type="hidden" />
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	escapeXml="<%= false %>"
+	localizeTitle="<%= false %>"
+	title='<%= LanguageUtil.get(pageContext, "edit-site-roles-for-user-group") + ": " + HtmlUtil.escape(userGroup.getName()) %>'
+/>
+
+<%
+RoleSearch searchContainer = new RoleSearch(renderRequest, portletURL);
+
+searchContainer.setRowChecker(new UserGroupGroupRoleRoleChecker(renderResponse, userGroup, group));
+%>
+
+<liferay-ui:search-form
+	page="/html/portlet/roles_admin/role_search.jsp"
+	searchContainer="<%= searchContainer %>"
+/>
+
+<%
+RoleSearchTerms searchTerms = (RoleSearchTerms)searchContainer.getSearchTerms();
+
+List<Role> roles = RoleLocalServiceUtil.search(company.getCompanyId(), searchTerms.getKeywords(), new Integer[] {RoleConstants.TYPE_SITE}, QueryUtil.ALL_POS, QueryUtil.ALL_POS, searchContainer.getOrderByComparator());
+
+roles = UsersAdminUtil.filterGroupRoles(permissionChecker, group.getGroupId(), roles);
+
+int total = roles.size();
+
+searchContainer.setTotal(total);
+
+List<Role> results = ListUtil.subList(roles, searchContainer.getStart(), searchContainer.getEnd());
+
+searchContainer.setResults(results);
+
+PortletURL updateRoleAssignmentsURL = renderResponse.createRenderURL();
+
+updateRoleAssignmentsURL.setParameter("struts_action", "/sites_admin/edit_site_assignments");
+updateRoleAssignmentsURL.setParameter("tabs1", tabs1);
+updateRoleAssignmentsURL.setParameter("tabs2", tabs2);
+updateRoleAssignmentsURL.setParameter("redirect", redirect);
+updateRoleAssignmentsURL.setParameter("userGroupId", String.valueOf(userGroupId));
+updateRoleAssignmentsURL.setParameter("groupId", String.valueOf(group.getGroupId()));
+%>
+
+<div class="separator"><!-- --></div>
+
+<%
+String taglibOnClick = renderResponse.getNamespace() + "updateUserGroupGroupRole('" + updateRoleAssignmentsURL.toString() + StringPool.AMPERSAND + renderResponse.getNamespace() + "cur=" + cur + "');";
+%>
+
+<aui:button onClick="<%= taglibOnClick %>" value="update-associations" />
+
+<%
+List resultRows = searchContainer.getResultRows();
+
+for (int i = 0; i < results.size(); i++) {
+	Role role = results.get(i);
+
+	role = role.toEscapedModel();
+
+	ResultRow row = new ResultRow(role, role.getRoleId(), i);
+
+	// Name
+
+	row.addText(role.getTitle(locale));
+
+	// Type
+
+	row.addText(LanguageUtil.get(pageContext, role.getTypeLabel()));
+
+	// Description
+
+	row.addText(role.getDescription(locale));
+
+	// CSS
+
+	row.setClassName(RolesAdminUtil.getCssClassName(role));
+	row.setClassHoverName(RolesAdminUtil.getCssClassName(role));
+
+	// Add result row
+
+	resultRows.add(row);
+}
+%>
+
+<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_site_assignments_users.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_site_assignments_users.jsp
new file mode 100644
index 0000000..2569344
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_site_assignments_users.jsp
@@ -0,0 +1,269 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String tabs1 = (String)request.getAttribute("edit_site_assignments.jsp-tabs1");
+String tabs2 = (String)request.getAttribute("edit_site_assignments.jsp-tabs2");
+
+int cur = (Integer)request.getAttribute("edit_site_assignments.jsp-cur");
+
+Group group = (Group)request.getAttribute("edit_site_assignments.jsp-group");
+
+PortletURL portletURL = (PortletURL)request.getAttribute("edit_site_assignments.jsp-portletURL");
+
+PortletURL viewUsersURL = renderResponse.createRenderURL();
+
+viewUsersURL.setParameter("struts_action", "/sites_admin/edit_site_assignments");
+viewUsersURL.setParameter("tabs1", "users");
+viewUsersURL.setParameter("tabs2", tabs2);
+viewUsersURL.setParameter("redirect", currentURL);
+viewUsersURL.setParameter("groupId", String.valueOf(group.getGroupId()));
+
+UserGroupChecker userGroupChecker = null;
+
+if (!tabs1.equals("summary") && !tabs2.equals("current")) {
+	userGroupChecker = new UserGroupChecker(renderResponse, group);
+}
+
+String emptyResultsMessage = UserSearch.EMPTY_RESULTS_MESSAGE;
+
+if (tabs2.equals("current")) {
+	emptyResultsMessage ="no-user-was-found-that-is-a-direct-member-of-this-site";
+}
+
+SearchContainer searchContainer = new UserSearch(renderRequest, viewUsersURL);
+
+searchContainer.setEmptyResultsMessage(emptyResultsMessage);
+%>
+
+<aui:input name="tabs1" type="hidden" value="users" />
+<aui:input name="addUserIds" type="hidden" />
+<aui:input name="removeUserIds" type="hidden" />
+
+<liferay-ui:membership-policy-error />
+
+<liferay-ui:search-container
+	rowChecker="<%= userGroupChecker %>"
+	searchContainer="<%= searchContainer %>"
+	var="userSearchContainer"
+>
+	<c:if test='<%= !tabs1.equals("summary") %>'>
+		<liferay-ui:search-form
+			page="/html/portlet/users_admin/user_search.jsp"
+		/>
+
+		<div class="separator"><!-- --></div>
+	</c:if>
+
+	<%
+	UserSearchTerms searchTerms = (UserSearchTerms)userSearchContainer.getSearchTerms();
+
+	LinkedHashMap<String, Object> userParams = new LinkedHashMap<String, Object>();
+
+	if (tabs1.equals("summary") || tabs2.equals("current")) {
+		userParams.put("inherit", Boolean.TRUE);
+		userParams.put("usersGroups", new Long(group.getGroupId()));
+	}
+	%>
+
+	<liferay-ui:search-container-results>
+		<c:choose>
+			<c:when test='<%= tabs1.equals("summary") || tabs2.equals("current") || !group.isLimitedToParentSiteMembers() %>'>
+				<%@ include file="/html/portlet/users_admin/user_search_results.jspf" %>
+			</c:when>
+			<c:otherwise>
+
+				<%
+				total = UserLocalServiceUtil.getGroupUsersCount(group.getParentGroupId());
+
+				searchContainer.setTotal(total);
+
+				results = UserLocalServiceUtil.getGroupUsers(group.getParentGroupId(), userSearchContainer.getStart(), userSearchContainer.getEnd());
+
+				searchContainer.setResults(results);
+				%>
+
+			</c:otherwise>
+		</c:choose>
+	</liferay-ui:search-container-results>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.User"
+		escapedModel="<%= true %>"
+		keyProperty="userId"
+		modelVar="user2"
+		rowIdProperty="screenName"
+	>
+		<liferay-ui:search-container-row-parameter
+			name="group"
+			value="<%= group %>"
+		/>
+
+		<liferay-ui:search-container-column-text
+			buffer="buffer"
+			name="name"
+		>
+
+			<%
+			buffer.append(HtmlUtil.escape(user2.getFullName()));
+
+			List<String> names = new ArrayList<String>();
+
+			boolean organizationUser = SitesUtil.isOrganizationUser(company.getCompanyId(), group, user2, names);
+
+			row.setParameter("organizationUser", organizationUser);
+
+			boolean userGroupUser = SitesUtil.isUserGroupUser(company.getCompanyId(), group, user2, names);
+
+			row.setParameter("userGroupUser", userGroupUser);
+
+			String message = StringPool.BLANK;
+
+			if (organizationUser || userGroupUser) {
+				if (names.size() == 1) {
+					message = LanguageUtil.format(pageContext, "this-user-is-a-member-of-x-because-he-belongs-to-x", new Object[] {HtmlUtil.escape(group.getDescriptiveName(locale)), names.get(0)});
+				}
+				else {
+					message = LanguageUtil.format(pageContext, "this-user-is-a-member-of-x-because-he-belongs-to-x-and-x", new Object[] {HtmlUtil.escape(group.getDescriptiveName(locale)), StringUtil.merge(names.subList(0, names.size() - 1).toArray(new String[names.size() - 1]), ", "), names.get(names.size() - 1)});
+				}
+			%>
+
+				<liferay-util:buffer var="iconHelp">
+					<liferay-ui:icon-help message="<%= message %>" />
+				</liferay-util:buffer>
+
+			<%
+				buffer.append(iconHelp);
+			}
+			%>
+
+		</liferay-ui:search-container-column-text>
+
+		<liferay-ui:search-container-column-text
+			name="screen-name"
+			orderable="<%= true %>"
+			property="screenName"
+		/>
+
+		<c:if test='<%= tabs1.equals("summary") || tabs2.equals("current") %>'>
+			<liferay-ui:search-container-column-text
+				buffer="buffer"
+				name="site-roles-and-teams"
+			>
+
+				<%
+				List<UserGroupRole> userGroupRoles = UserGroupRoleLocalServiceUtil.getUserGroupRoles(user2.getUserId(), group.getGroupId());
+
+				for (int i = 0; i < userGroupRoles.size(); i++) {
+					UserGroupRole userGroupRole = userGroupRoles.get(i);
+
+					Role role = RoleLocalServiceUtil.getRole(userGroupRole.getRoleId());
+
+					buffer.append(HtmlUtil.escape(role.getTitle(locale)));
+
+					if ((i + 1) < userGroupRoles.size()) {
+						buffer.append(StringPool.COMMA_AND_SPACE);
+					}
+				}
+
+				List<Team> teams = TeamLocalServiceUtil.getUserTeams(user2.getUserId(), group.getGroupId());
+
+				if (!teams.isEmpty() && !userGroupRoles.isEmpty()) {
+					buffer.append(StringPool.COMMA_AND_SPACE);
+				}
+
+				for (int i = 0; i < teams.size(); i++) {
+					Team team = teams.get(i);
+
+					buffer.append(HtmlUtil.escape(team.getName()));
+
+					if ((i + 1) < teams.size()) {
+						buffer.append(StringPool.COMMA_AND_SPACE);
+					}
+				}
+				%>
+
+			</liferay-ui:search-container-column-text>
+
+			<liferay-ui:search-container-column-jsp
+				align="right"
+				path="/html/portlet/sites_admin/user_action.jsp"
+			/>
+		</c:if>
+	</liferay-ui:search-container-row>
+
+	<liferay-util:buffer var="formButton">
+		<c:choose>
+			<c:when test='<%= tabs2.equals("current") %>'>
+
+				<%
+				viewUsersURL.setParameter("tabs2", "available");
+				%>
+
+				<liferay-ui:icon
+					image="../aui/user"
+					label="<%= true %>"
+					message="assign-users"
+					url="<%= viewUsersURL.toString() %>"
+				/>
+
+				<%
+				viewUsersURL.setParameter("tabs2", "current");
+				%>
+
+			</c:when>
+			<c:otherwise>
+
+				<%
+				portletURL.setParameter("tabs2", "current");
+
+				String taglibOnClick = renderResponse.getNamespace() + "updateGroupUsers('" + portletURL.toString() + StringPool.AMPERSAND + renderResponse.getNamespace() + "cur=" + cur + "');";
+				%>
+
+				<aui:button-row>
+					<aui:button onClick="<%= taglibOnClick %>" primary="<%= true %>" value="save" />
+				</aui:button-row>
+			</c:otherwise>
+		</c:choose>
+	</liferay-util:buffer>
+
+	<c:choose>
+		<c:when test='<%= tabs1.equals("summary") && (total > 0) %>'>
+			<liferay-ui:panel collapsible="<%= true %>" extended="<%= false %>" persistState="<%= true %>" title='<%= LanguageUtil.format(pageContext, (total > 1) ? "x-users" : "x-user", total) %>'>
+				<span class="form-search">
+					<liferay-ui:input-search name='<%= DisplayTerms.KEYWORDS + "_users" %>' />
+				</span>
+
+				<liferay-ui:search-iterator paginate="<%= false %>" />
+
+				<c:if test="<%= total > searchContainer.getDelta() %>">
+					<a href="<%= viewUsersURL %>"><liferay-ui:message key="view-more" /> &raquo;</a>
+				</c:if>
+			</liferay-ui:panel>
+		</c:when>
+		<c:when test='<%= !tabs1.equals("summary") %>'>
+			<c:if test="<%= total > searchContainer.getDelta() %>">
+				<%= formButton %>
+			</c:if>
+
+			<liferay-ui:search-iterator />
+
+			<%= formButton %>
+		</c:when>
+	</c:choose>
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_site_assignments_users_roles.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_site_assignments_users_roles.jsp
new file mode 100644
index 0000000..dd39594
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_site_assignments_users_roles.jsp
@@ -0,0 +1,125 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String tabs1 = (String)request.getAttribute("edit_site_assignments.jsp-tabs1");
+String tabs2 = (String)request.getAttribute("edit_site_assignments.jsp-tabs2");
+
+String redirect = (String)request.getAttribute("edit_site_assignments.jsp-redirect");
+
+int cur = (Integer)request.getAttribute("edit_site_assignments.jsp-cur");
+
+Group group = (Group)request.getAttribute("edit_site_assignments.jsp-group");
+User selUser = (User)request.getAttribute("edit_site_assignments.jsp-selUser");
+
+PortletURL portletURL = (PortletURL)request.getAttribute("edit_site_assignments.jsp-portletURL");
+
+portletURL.setParameter("p_u_i_d", String.valueOf(selUser.getUserId()));
+%>
+
+<aui:input name="p_u_i_d" type="hidden" value="<%= selUser.getUserId() %>" />
+<aui:input name="addRoleIds" type="hidden" />
+<aui:input name="removeRoleIds" type="hidden" />
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	escapeXml="<%= false %>"
+	localizeTitle="<%= false %>"
+	title='<%= LanguageUtil.get(pageContext, "edit-site-roles-for-user") + ": " + HtmlUtil.escape(selUser.getFullName()) %>'
+/>
+
+<liferay-ui:membership-policy-error />
+
+<%
+RoleSearch searchContainer = new RoleSearch(renderRequest, portletURL);
+
+searchContainer.setRowChecker(new UserGroupRoleRoleChecker(renderResponse, selUser, group));
+%>
+
+<liferay-ui:search-form
+	page="/html/portlet/roles_admin/role_search.jsp"
+	searchContainer="<%= searchContainer %>"
+/>
+
+<%
+RoleSearchTerms searchTerms = (RoleSearchTerms)searchContainer.getSearchTerms();
+
+List<Role> roles = RoleLocalServiceUtil.search(company.getCompanyId(), searchTerms.getKeywords(), new Integer[] {RoleConstants.TYPE_SITE}, QueryUtil.ALL_POS, QueryUtil.ALL_POS, searchContainer.getOrderByComparator());
+
+roles = UsersAdminUtil.filterGroupRoles(permissionChecker, group.getGroupId(), roles);
+
+int total = roles.size();
+
+searchContainer.setTotal(total);
+
+List<Role> results = ListUtil.subList(roles, searchContainer.getStart(), searchContainer.getEnd());
+
+searchContainer.setResults(results);
+
+PortletURL updateRoleAssignmentsURL = renderResponse.createRenderURL();
+
+updateRoleAssignmentsURL.setParameter("struts_action", "/sites_admin/edit_site_assignments");
+updateRoleAssignmentsURL.setParameter("tabs1", tabs1);
+updateRoleAssignmentsURL.setParameter("tabs2", tabs2);
+updateRoleAssignmentsURL.setParameter("redirect", redirect);
+updateRoleAssignmentsURL.setParameter("p_u_i_d", String.valueOf(selUser.getUserId()));
+updateRoleAssignmentsURL.setParameter("groupId", String.valueOf(group.getGroupId()));
+%>
+
+<div class="separator"><!-- --></div>
+
+<%
+String taglibOnClick = renderResponse.getNamespace() + "updateUserGroupRole('" + updateRoleAssignmentsURL.toString() + StringPool.AMPERSAND + renderResponse.getNamespace() + "cur=" + cur + "');";
+%>
+
+<aui:button onClick="<%= taglibOnClick %>" value="update-associations" />
+
+<%
+List resultRows = searchContainer.getResultRows();
+
+for (int i = 0; i < results.size(); i++) {
+	Role role = results.get(i);
+
+	role = role.toEscapedModel();
+
+	ResultRow row = new ResultRow(role, role.getRoleId(), i);
+
+	// Name
+
+	row.addText(role.getTitle(locale));
+
+	// Type
+
+	row.addText(LanguageUtil.get(pageContext, role.getTypeLabel()));
+
+	// Description
+
+	row.addText(role.getDescription(locale));
+
+	// CSS
+
+	row.setClassName(RolesAdminUtil.getCssClassName(role));
+	row.setClassHoverName(RolesAdminUtil.getCssClassName(role));
+
+	// Add result row
+
+	resultRows.add(row);
+}
+%>
+
+<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_team.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_team.jsp
new file mode 100644
index 0000000..5039cdd
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_team.jsp
@@ -0,0 +1,103 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+Team team = (Team)request.getAttribute(WebKeys.TEAM);
+
+long teamId = BeanParamUtil.getLong(team, request, "teamId");
+
+long groupId = BeanParamUtil.getLong(team, request, "groupId");
+
+Group group = GroupServiceUtil.getGroup(groupId);
+
+Organization organization = null;
+
+if (group.isOrganization()) {
+	organization = OrganizationLocalServiceUtil.getOrganization(group.getOrganizationId());
+}
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	escapeXml="<%= false %>"
+	localizeTitle="<%= false %>"
+	title='<%= ((team == null) ? LanguageUtil.get(pageContext, "new-team") : HtmlUtil.escape(team.getName())) %>'
+/>
+
+<portlet:actionURL var="editTeamURL">
+	<portlet:param name="struts_action" value="/sites_admin/edit_team" />
+</portlet:actionURL>
+
+<aui:form action="<%= editTeamURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveTeam();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="teamId" type="hidden" value="<%= teamId %>" />
+	<aui:input name="groupId" type="hidden" value="<%= groupId %>" />
+
+	<liferay-ui:error exception="<%= DuplicateTeamException.class %>" message="please-enter-a-unique-name" />
+	<liferay-ui:error exception="<%= TeamNameException.class %>" message="please-enter-a-valid-name" />
+
+	<aui:model-context bean="<%= team %>" model="<%= Team.class %>" />
+
+	<aui:fieldset>
+		<c:if test="<%= team != null %>">
+			<aui:field-wrapper label="team-id">
+				<liferay-ui:input-resource url="<%= String.valueOf(team.getTeamId()) %>" />
+			</aui:field-wrapper>
+		</c:if>
+
+		<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" name="name" />
+
+		<aui:input name="description" />
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />saveTeam() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (team == null) ? Constants.ADD : Constants.UPDATE %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
+
+<%
+if (group.isOrganization()) {
+	UsersAdminUtil.addPortletBreadcrumbEntries(organization, request, renderResponse);
+}
+else {
+	PortalUtil.addPortletBreadcrumbEntry(request, group.getDescriptiveName(locale), null);
+}
+
+if (team != null) {
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "manage-teams"), redirect);
+	PortalUtil.addPortletBreadcrumbEntry(request, team.getName(), null);
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit"), currentURL);
+}
+else {
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "manage-teams"), redirect);
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "add-team"), currentURL);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_team_assignments.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_team_assignments.jsp
new file mode 100644
index 0000000..23bdde5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_team_assignments.jsp
@@ -0,0 +1,136 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String tabs1 = ParamUtil.getString(request, "tabs1", "users");
+String tabs2 = ParamUtil.getString(request, "tabs2", "current");
+
+int cur = ParamUtil.getInteger(request, SearchContainer.DEFAULT_CUR_PARAM);
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+Team team = (Team)request.getAttribute(WebKeys.TEAM);
+
+Group group = GroupServiceUtil.getGroup(team.getGroupId());
+
+Organization organization = null;
+
+if (group.isOrganization()) {
+	organization = OrganizationLocalServiceUtil.getOrganization(group.getOrganizationId());
+}
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/sites_admin/edit_team_assignments");
+portletURL.setParameter("tabs1", tabs1);
+portletURL.setParameter("tabs2", tabs2);
+portletURL.setParameter("redirect", redirect);
+portletURL.setParameter("teamId", String.valueOf(team.getTeamId()));
+
+request.setAttribute("edit_team_assignments.jsp-tabs1", tabs1);
+request.setAttribute("edit_team_assignments.jsp-tabs2", tabs2);
+
+request.setAttribute("edit_team_assignments.jsp-cur", cur);
+
+request.setAttribute("edit_team_assignments.jsp-redirect", redirect);
+
+request.setAttribute("edit_team_assignments.jsp-team", team);
+
+request.setAttribute("edit_team_assignments.jsp-group", group);
+
+request.setAttribute("edit_team_assignments.jsp-organization", organization);
+
+request.setAttribute("edit_team_assignments.jsp-portletURL", portletURL);
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	localizeTitle="<%= false %>"
+	title="<%= team.getName() %>"
+/>
+
+<liferay-ui:tabs
+	names="users,user-groups"
+	param="tabs1"
+	url="<%= portletURL.toString() %>"
+/>
+
+<portlet:actionURL var="editAssignmentsURL">
+	<portlet:param name="struts_action" value="/sites_admin/edit_team_assignments" />
+</portlet:actionURL>
+
+<aui:form action="<%= editAssignmentsURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="tabs1" type="hidden" value="<%= tabs1 %>" />
+	<aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="assignmentsRedirect" type="hidden" />
+	<aui:input name="teamId" type="hidden" value="<%= String.valueOf(team.getTeamId()) %>" />
+
+	<c:choose>
+		<c:when test='<%= tabs1.equals("users") %>'>
+			<liferay-util:include page="/html/portlet/sites_admin/edit_team_assignments_users.jsp" />
+		</c:when>
+		<c:when test='<%= tabs1.equals("user-groups") %>'>
+			<liferay-util:include page="/html/portlet/sites_admin/edit_team_assignments_user_groups.jsp" />
+		</c:when>
+	</c:choose>
+</aui:form>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />updateTeamUserGroups',
+		function(assignmentsRedirect) {
+			document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "team_user_groups";
+			document.<portlet:namespace />fm.<portlet:namespace />assignmentsRedirect.value = assignmentsRedirect;
+			document.<portlet:namespace />fm.<portlet:namespace />addUserGroupIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+			document.<portlet:namespace />fm.<portlet:namespace />removeUserGroupIds.value = Liferay.Util.listUncheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['liferay-util-list-fields']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />updateTeamUsers',
+		function(assignmentsRedirect) {
+			document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "team_users";
+			document.<portlet:namespace />fm.<portlet:namespace />assignmentsRedirect.value = assignmentsRedirect;
+			document.<portlet:namespace />fm.<portlet:namespace />addUserIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+			document.<portlet:namespace />fm.<portlet:namespace />removeUserIds.value = Liferay.Util.listUncheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
+
+<%
+if (group.isOrganization()) {
+	UsersAdminUtil.addPortletBreadcrumbEntries(organization, request, renderResponse);
+}
+else {
+	PortalUtil.addPortletBreadcrumbEntry(request, group.getDescriptiveName(locale), null);
+}
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "manage-teams"), redirect);
+PortalUtil.addPortletBreadcrumbEntry(request, team.getName(), null);
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "assign-members"), currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_team_assignments_user_groups.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_team_assignments_user_groups.jsp
new file mode 100644
index 0000000..f83e14c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_team_assignments_user_groups.jsp
@@ -0,0 +1,98 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String tabs2 = (String)request.getAttribute("edit_team_assignments.jsp-tabs2");
+
+int cur = (Integer)request.getAttribute("edit_team_assignments.jsp-cur");
+
+Team team = (Team)request.getAttribute("edit_team_assignments.jsp-team");
+
+Group group = (Group)request.getAttribute("edit_team_assignments.jsp-group");
+
+Organization organization = (Organization)request.getAttribute("edit_team_assignments.jsp-organization");
+
+PortletURL portletURL = (PortletURL)request.getAttribute("edit_team_assignments.jsp-portletURL");
+%>
+
+<aui:input name="addUserGroupIds" type="hidden" />
+<aui:input name="removeUserGroupIds" type="hidden" />
+
+<liferay-ui:tabs
+	names="current,available"
+	param="tabs2"
+	url="<%= portletURL.toString() %>"
+/>
+
+<liferay-ui:search-container
+	rowChecker="<%= new UserGroupTeamChecker(renderResponse, team) %>"
+	searchContainer="<%= new UserGroupSearch(renderRequest, portletURL) %>"
+>
+	<liferay-ui:search-form
+		page="/html/portlet/users_admin/user_group_search.jsp"
+	/>
+
+	<%
+	UserGroupDisplayTerms searchTerms = (UserGroupDisplayTerms)searchContainer.getSearchTerms();
+
+	LinkedHashMap<String, Object> userGroupParams = new LinkedHashMap<String, Object>();
+
+	userGroupParams.put("userGroupsGroups", new Long(group.getGroupId()));
+
+	if (tabs2.equals("current")) {
+		userGroupParams.put("userGroupsTeams", new Long(team.getTeamId()));
+	}
+
+	total = UserGroupLocalServiceUtil.searchCount(company.getCompanyId(), searchTerms.getKeywords(), userGroupParams);
+
+	searchContainer.setTotal(total);
+	%>
+
+	<liferay-ui:search-container-results
+		results="<%= UserGroupLocalServiceUtil.search(company.getCompanyId(), searchTerms.getKeywords(), userGroupParams, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator()) %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.UserGroup"
+		escapedModel="<%= true %>"
+		keyProperty="userGroupId"
+		modelVar="userGroup"
+	>
+		<liferay-ui:search-container-column-text
+			name="name"
+			orderable="<%= true %>"
+			property="name"
+		/>
+
+		<liferay-ui:search-container-column-text
+			name="description"
+			orderable="<%= true %>"
+			property="description"
+		/>
+	</liferay-ui:search-container-row>
+
+	<div class="separator"><!-- --></div>
+
+	<%
+	String taglibOnClick = renderResponse.getNamespace() + "updateTeamUserGroups('" + portletURL.toString() + StringPool.AMPERSAND + renderResponse.getNamespace() + "cur=" + cur + "');";
+	%>
+
+	<aui:button onClick="<%= taglibOnClick %>" value="update-associations" />
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_team_assignments_users.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_team_assignments_users.jsp
new file mode 100644
index 0000000..3a1add5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_team_assignments_users.jsp
@@ -0,0 +1,95 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String tabs2 = (String)request.getAttribute("edit_team_assignments.jsp-tabs2");
+
+int cur = (Integer)request.getAttribute("edit_team_assignments.jsp-cur");
+
+Team team = (Team)request.getAttribute("edit_team_assignments.jsp-team");
+
+Group group = (Group)request.getAttribute("edit_team_assignments.jsp-group");
+
+Organization organization = (Organization)request.getAttribute("edit_team_assignments.jsp-organization");
+
+PortletURL portletURL = (PortletURL)request.getAttribute("edit_team_assignments.jsp-portletURL");
+%>
+
+<aui:input name="addUserIds" type="hidden" />
+<aui:input name="removeUserIds" type="hidden" />
+
+<liferay-ui:tabs
+	names="current,available"
+	param="tabs2"
+	url="<%= portletURL.toString() %>"
+/>
+
+<liferay-ui:search-container
+	rowChecker="<%= new UserTeamChecker(renderResponse, team) %>"
+	searchContainer="<%= new UserSearch(renderRequest, portletURL) %>"
+	var="userSearchContainer"
+>
+	<liferay-ui:search-form
+		page="/html/portlet/users_admin/user_search.jsp"
+	/>
+
+	<%
+	UserSearchTerms searchTerms = (UserSearchTerms)userSearchContainer.getSearchTerms();
+
+	LinkedHashMap<String, Object> userParams = new LinkedHashMap<String, Object>();
+
+	userParams.put("inherit", Boolean.TRUE);
+	userParams.put("usersGroups", team.getGroupId());
+
+	if (tabs2.equals("current")) {
+		userParams.put("usersTeams", team.getTeamId());
+	}
+	%>
+
+	<liferay-ui:search-container-results>
+		<%@ include file="/html/portlet/users_admin/user_search_results.jspf" %>
+	</liferay-ui:search-container-results>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.User"
+		escapedModel="<%= true %>"
+		keyProperty="userId"
+		modelVar="user2"
+		rowIdProperty="screenName"
+	>
+		<liferay-ui:search-container-column-text
+			name="name"
+			property="fullName"
+		/>
+
+		<liferay-ui:search-container-column-text
+			name="screen-name"
+			property="screenName"
+		/>
+	</liferay-ui:search-container-row>
+
+	<div class="separator"><!-- --></div>
+
+	<%
+	String taglibOnClick = renderResponse.getNamespace() + "updateTeamUsers('" + portletURL.toString() + StringPool.AMPERSAND + renderResponse.getNamespace() + "cur=" + cur + "');";
+	%>
+
+	<aui:button onClick="<%= taglibOnClick %>" value="update-associations" />
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_user_group_roles.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_user_group_roles.jsp
new file mode 100644
index 0000000..56fc8ce
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_user_group_roles.jsp
@@ -0,0 +1,121 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String tabs1 = ParamUtil.getString(request, "tabs1", "current");
+
+int cur = ParamUtil.getInteger(request, SearchContainer.DEFAULT_CUR_PARAM);
+
+String redirect = ParamUtil.getString(request, "redirect");
+String backURL = ParamUtil.getString(request, "backURL", redirect);
+
+Group group = (Group)request.getAttribute(WebKeys.GROUP);
+
+String groupDescriptiveName = group.getDescriptiveName(locale);
+
+Role role = (Role)request.getAttribute(WebKeys.ROLE);
+
+long roleId = BeanParamUtil.getLong(role, request, "roleId");
+
+int roleType = ParamUtil.getInteger(request, "roleType", RoleConstants.TYPE_SITE);
+
+Organization organization = null;
+
+if (group.isOrganization()) {
+	organization = OrganizationLocalServiceUtil.getOrganization(group.getClassPK());
+}
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/sites_admin/edit_user_group_roles");
+portletURL.setParameter("tabs1", tabs1);
+portletURL.setParameter("redirect", redirect);
+portletURL.setParameter("groupId", String.valueOf(group.getGroupId()));
+
+// Breadcrumbs
+
+if (organization != null) {
+	UsersAdminUtil.addPortletBreadcrumbEntries(organization, request, renderResponse);
+}
+else if (group != null) {
+	PortalUtil.addPortletBreadcrumbEntry(request, group.getDescriptiveName(locale), null);
+}
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "assign-user-group-roles"), portletURL.toString());
+
+if (role != null) {
+	portletURL.setParameter("roleId", String.valueOf(roleId));
+
+	PortalUtil.addPortletBreadcrumbEntry(request, HtmlUtil.escape(role.getTitle(locale)), currentURL);
+}
+
+request.setAttribute("edit_user_group_roles.jsp-tabs1", tabs1);
+
+request.setAttribute("edit_user_group_roles.jsp-cur", cur);
+
+request.setAttribute("edit_user_group_roles.jsp-redirect", redirect);
+
+request.setAttribute("edit_user_group_roles.jsp-group", group);
+request.setAttribute("edit_user_group_roles.jsp-groupDescriptiveName", groupDescriptiveName);
+request.setAttribute("edit_user_group_roles.jsp-role", role);
+request.setAttribute("edit_user_group_roles.jsp-roleId", roleId);
+request.setAttribute("edit_user_group_roles.jsp-roleType", roleType);
+request.setAttribute("edit_user_group_roles.jsp-organization", organization);
+
+request.setAttribute("edit_user_group_roles.jsp-portletURL", portletURL);
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	escapeXml="<%= false %>"
+	localizeTitle="<%= false %>"
+	title='<%= LanguageUtil.get(pageContext, "add-site-roles-to") + ": " + LanguageUtil.get(pageContext, "user-groups") %>'
+/>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="tabs1" type="hidden" value="<%= tabs1 %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="groupId" type="hidden" value="<%= String.valueOf(group.getGroupId()) %>" />
+	<aui:input name="roleId" type="hidden" value="<%= roleId %>" />
+
+	<c:choose>
+		<c:when test="<%= role == null %>">
+			<liferay-util:include page="/html/portlet/sites_admin/edit_user_group_roles_role.jsp" />
+		</c:when>
+		<c:otherwise>
+			<liferay-util:include page="/html/portlet/sites_admin/edit_user_group_roles_users.jsp" />
+		</c:otherwise>
+	</c:choose>
+</aui:form>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />updateUserGroupGroupRoleUsers',
+		function(redirect) {
+			document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "user_group_group_role_users";
+			document.<portlet:namespace />fm.<portlet:namespace />redirect.value = redirect;
+			document.<portlet:namespace />fm.<portlet:namespace />addUserGroupIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+			document.<portlet:namespace />fm.<portlet:namespace />removeUserGroupIds.value = Liferay.Util.listUncheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+			submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/sites_admin/edit_user_group_roles" /></portlet:actionURL>");
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_user_group_roles_role.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_user_group_roles_role.jsp
new file mode 100644
index 0000000..889b368
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_user_group_roles_role.jsp
@@ -0,0 +1,100 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String redirect = (String)request.getAttribute("edit_user_group_roles.jsp-redirect");
+
+Group group = (Group)request.getAttribute("edit_user_group_roles.jsp-group");
+int roleType = (Integer)request.getAttribute("edit_user_group_roles.jsp-roleType");
+
+PortletURL portletURL = (PortletURL)request.getAttribute("edit_user_group_roles.jsp-portletURL");
+%>
+
+<div>
+	<%= LanguageUtil.format(pageContext, "step-x-of-x", new String[] {"1", "2"}) %>
+
+	<liferay-ui:message key="choose-a-role" />
+</div>
+
+<br />
+
+<h3><liferay-ui:message key="roles" /></h3>
+
+<%
+RoleSearch searchContainer = new RoleSearch(renderRequest, portletURL);
+%>
+
+<liferay-ui:search-form
+	page="/html/portlet/roles_admin/role_search.jsp"
+	searchContainer="<%= searchContainer %>"
+/>
+
+<%
+RoleSearchTerms searchTerms = (RoleSearchTerms)searchContainer.getSearchTerms();
+
+List<Role> roles = RoleLocalServiceUtil.search(company.getCompanyId(), searchTerms.getKeywords(), new Integer[] {roleType}, QueryUtil.ALL_POS, QueryUtil.ALL_POS, searchContainer.getOrderByComparator());
+
+roles = UsersAdminUtil.filterGroupRoles(permissionChecker, group.getGroupId(), roles);
+
+int total = roles.size();
+
+searchContainer.setTotal(total);
+
+List results = ListUtil.subList(roles, searchContainer.getStart(), searchContainer.getEnd());
+
+searchContainer.setResults(results);
+%>
+
+<div class="separator"><!-- --></div>
+
+<%
+List resultRows = searchContainer.getResultRows();
+
+for (int i = 0; i < results.size(); i++) {
+	Role curRole = (Role)results.get(i);
+
+	curRole = curRole.toEscapedModel();
+
+	ResultRow row = new ResultRow(curRole, curRole.getRoleId(), i);
+
+	PortletURL rowURL = renderResponse.createRenderURL();
+
+	rowURL.setParameter("struts_action", "/sites_admin/edit_user_group_roles");
+	rowURL.setParameter("redirect", redirect);
+	rowURL.setParameter("groupId", String.valueOf(group.getGroupId()));
+	rowURL.setParameter("roleId", String.valueOf(curRole.getRoleId()));
+
+	// Name
+
+	row.addText(curRole.getTitle(locale), rowURL);
+
+	// Type
+
+	row.addText(LanguageUtil.get(pageContext, curRole.getTypeLabel()), rowURL);
+
+	// Description
+
+	row.addText(curRole.getDescription(locale), rowURL);
+
+	// Add result row
+
+	resultRows.add(row);
+}
+%>
+
+<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_user_group_roles_users.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_user_group_roles_users.jsp
new file mode 100644
index 0000000..e755b69
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_user_group_roles_users.jsp
@@ -0,0 +1,110 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String tabs1 = (String)request.getAttribute("edit_user_group_roles.jsp-tabs1");
+
+int cur = (Integer)request.getAttribute("edit_user_group_roles.jsp-cur");
+
+Group group = (Group)request.getAttribute("edit_user_group_roles.jsp-group");
+String groupDescriptiveName = (String)request.getAttribute("edit_user_group_roles.jsp-groupDescriptiveName");
+Role role = (Role)request.getAttribute("edit_user_group_roles.jsp-role");
+long roleId = (Long)request.getAttribute("edit_user_group_roles.jsp-roleId");
+Organization organization = (Organization)request.getAttribute("edit_user_group_roles.jsp-organization");
+
+PortletURL portletURL = (PortletURL)request.getAttribute("edit_user_group_roles.jsp-portletURL");
+%>
+
+<aui:input name="addUserGroupIds" type="hidden" />
+<aui:input name="removeUserGroupIds" type="hidden" />
+
+<div>
+	<%= LanguageUtil.format(pageContext, "step-x-of-x", new String[] {"2", "2"}) %>
+
+	<%= LanguageUtil.format(pageContext, "current-signifies-current-user-groups-associated-with-the-x-role.-available-signifies-all-user-groups-associated-with-the-x-x", new String[] {HtmlUtil.escape(role.getTitle(locale)), HtmlUtil.escape(groupDescriptiveName), LanguageUtil.get(pageContext, (group.isOrganization() ? "organization" : "site"))}) %>
+</div>
+
+<br />
+
+<h3><liferay-ui:message key="user-groups" /></h3>
+
+<liferay-ui:tabs
+	names="current,available"
+	param="tabs1"
+	url="<%= portletURL.toString() %>"
+/>
+
+<liferay-ui:search-container
+	rowChecker="<%= new UserGroupGroupRoleUserGroupChecker(renderResponse, group, role) %>"
+	searchContainer="<%= new UserGroupSearch(renderRequest, portletURL) %>"
+>
+	<liferay-ui:search-form
+		page="/html/portlet/users_admin/user_group_search.jsp"
+	/>
+
+	<%
+	UserGroupDisplayTerms searchTerms = (UserGroupDisplayTerms)searchContainer.getSearchTerms();
+
+	LinkedHashMap<String, Object> userGroupParams = new LinkedHashMap<String, Object>();
+
+	if (group.isSite()) {
+		userGroupParams.put("userGroupsGroups", new Long(group.getGroupId()));
+	}
+
+	if (tabs1.equals("current")) {
+		userGroupParams.put("userGroupGroupRole", new Long[] {new Long(roleId), new Long(group.getGroupId())});
+	}
+
+	total = UserGroupLocalServiceUtil.searchCount(company.getCompanyId(), searchTerms.getKeywords(), userGroupParams);
+
+	searchContainer.setTotal(total);
+	%>
+
+	<liferay-ui:search-container-results
+		results="<%= UserGroupLocalServiceUtil.search(company.getCompanyId(), searchTerms.getKeywords(), userGroupParams, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator()) %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.UserGroup"
+		escapedModel="<%= true %>"
+		keyProperty="userGroupId"
+		modelVar="userGroup"
+	>
+		<liferay-ui:search-container-column-text
+			name="name"
+			orderable="<%= true %>"
+			property="name"
+		/>
+
+		<liferay-ui:search-container-column-text
+			name="description"
+			orderable="<%= true %>"
+			property="description"
+		/>
+	</liferay-ui:search-container-row>
+
+	<div class="separator"><!-- --></div>
+
+	<%
+	String taglibOnClick = renderResponse.getNamespace() + "updateUserGroupGroupRoleUsers('" + portletURL.toString() + StringPool.AMPERSAND + renderResponse.getNamespace() + "cur=" + cur + "');";
+	%>
+
+	<aui:button onClick="<%= taglibOnClick %>" primary="<%= true %>" value="update-associations" />
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_user_roles.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_user_roles.jsp
new file mode 100644
index 0000000..a4ec1f9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_user_roles.jsp
@@ -0,0 +1,125 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String tabs1 = ParamUtil.getString(request, "tabs1", "current");
+
+int cur = ParamUtil.getInteger(request, SearchContainer.DEFAULT_CUR_PARAM);
+
+String redirect = ParamUtil.getString(request, "redirect");
+String backURL = ParamUtil.getString(request, "backURL", redirect);
+
+Group group = (Group)request.getAttribute(WebKeys.GROUP);
+
+if (group != null) {
+	group = StagingUtil.getLiveGroup(group.getGroupId());
+}
+
+String groupDescriptiveName = group.getDescriptiveName(locale);
+
+Role role = (Role)request.getAttribute(WebKeys.ROLE);
+
+long roleId = BeanParamUtil.getLong(role, request, "roleId");
+
+int roleType = ParamUtil.getInteger(request, "roleType", RoleConstants.TYPE_SITE);
+
+Organization organization = null;
+
+if (group.isOrganization()) {
+	organization = OrganizationLocalServiceUtil.getOrganization(group.getClassPK());
+}
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/sites_admin/edit_user_roles");
+portletURL.setParameter("tabs1", tabs1);
+portletURL.setParameter("redirect", redirect);
+portletURL.setParameter("groupId", String.valueOf(group.getGroupId()));
+
+// Breadcrumbs
+
+if (organization != null) {
+	UsersAdminUtil.addPortletBreadcrumbEntries(organization, request, renderResponse);
+}
+else if (group != null) {
+	PortalUtil.addPortletBreadcrumbEntry(request, groupDescriptiveName, null);
+}
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "assign-user-roles"), portletURL.toString());
+
+if (role != null) {
+	portletURL.setParameter("roleId", String.valueOf(roleId));
+
+	PortalUtil.addPortletBreadcrumbEntry(request, role.getTitle(locale), currentURL);
+}
+
+request.setAttribute("edit_user_roles.jsp-tabs1", tabs1);
+
+request.setAttribute("edit_user_roles.jsp-cur", cur);
+
+request.setAttribute("edit_user_roles.jsp-redirect", redirect);
+
+request.setAttribute("edit_user_roles.jsp-group", group);
+request.setAttribute("edit_user_roles.jsp-groupDescriptiveName", groupDescriptiveName);
+request.setAttribute("edit_user_roles.jsp-role", role);
+request.setAttribute("edit_user_roles.jsp-roleId", roleId);
+request.setAttribute("edit_user_roles.jsp-roleType", roleType);
+request.setAttribute("edit_user_roles.jsp-organization", organization);
+
+request.setAttribute("edit_user_roles.jsp-portletURL", portletURL);
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	escapeXml="<%= false %>"
+	localizeTitle="<%= false %>"
+	title='<%= LanguageUtil.get(pageContext, "add-site-roles-to") + ": " + LanguageUtil.get(pageContext, "users") %>'
+/>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="tabs1" type="hidden" value="<%= tabs1 %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="groupId" type="hidden" value="<%= String.valueOf(group.getGroupId()) %>" />
+	<aui:input name="roleId" type="hidden" value="<%= roleId %>" />
+
+	<c:choose>
+		<c:when test="<%= role == null %>">
+			<liferay-util:include page="/html/portlet/sites_admin/edit_user_roles_role.jsp" />
+		</c:when>
+		<c:otherwise>
+			<liferay-util:include page="/html/portlet/sites_admin/edit_user_roles_users.jsp" />
+		</c:otherwise>
+	</c:choose>
+</aui:form>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />updateUserGroupRoleUsers',
+		function(redirect) {
+			document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "user_group_role_users";
+			document.<portlet:namespace />fm.<portlet:namespace />redirect.value = redirect;
+			document.<portlet:namespace />fm.<portlet:namespace />addUserIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+			document.<portlet:namespace />fm.<portlet:namespace />removeUserIds.value = Liferay.Util.listUncheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+			submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/sites_admin/edit_user_roles" /></portlet:actionURL>");
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_user_roles_role.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_user_roles_role.jsp
new file mode 100644
index 0000000..ea647b1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_user_roles_role.jsp
@@ -0,0 +1,100 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String redirect = (String)request.getAttribute("edit_user_roles.jsp-redirect");
+
+Group group = (Group)request.getAttribute("edit_user_roles.jsp-group");
+int roleType = (Integer)request.getAttribute("edit_user_roles.jsp-roleType");
+
+PortletURL portletURL = (PortletURL)request.getAttribute("edit_user_roles.jsp-portletURL");
+%>
+
+<div>
+	<%= LanguageUtil.format(pageContext, "step-x-of-x", new String[] {"1", "2"}) %>
+
+	<liferay-ui:message key="choose-a-role" />
+</div>
+
+<br />
+
+<h3><liferay-ui:message key="roles" /></h3>
+
+<%
+RoleSearch searchContainer = new RoleSearch(renderRequest, portletURL);
+%>
+
+<liferay-ui:search-form
+	page="/html/portlet/roles_admin/role_search.jsp"
+	searchContainer="<%= searchContainer %>"
+/>
+
+<%
+RoleSearchTerms searchTerms = (RoleSearchTerms)searchContainer.getSearchTerms();
+
+List<Role> roles = RoleLocalServiceUtil.search(company.getCompanyId(), searchTerms.getKeywords(), new Integer[] {roleType}, QueryUtil.ALL_POS, QueryUtil.ALL_POS, searchContainer.getOrderByComparator());
+
+roles = UsersAdminUtil.filterGroupRoles(permissionChecker, group.getGroupId(), roles);
+
+int total = roles.size();
+
+searchContainer.setTotal(total);
+
+List results = ListUtil.subList(roles, searchContainer.getStart(), searchContainer.getEnd());
+
+searchContainer.setResults(results);
+%>
+
+<div class="separator"><!-- --></div>
+
+<%
+List resultRows = searchContainer.getResultRows();
+
+for (int i = 0; i < results.size(); i++) {
+	Role curRole = (Role)results.get(i);
+
+	curRole = curRole.toEscapedModel();
+
+	ResultRow row = new ResultRow(curRole, curRole.getRoleId(), i);
+
+	PortletURL rowURL = renderResponse.createRenderURL();
+
+	rowURL.setParameter("struts_action", "/sites_admin/edit_user_roles");
+	rowURL.setParameter("redirect", redirect);
+	rowURL.setParameter("groupId", String.valueOf(group.getGroupId()));
+	rowURL.setParameter("roleId", String.valueOf(curRole.getRoleId()));
+
+	// Name
+
+	row.addText(curRole.getTitle(locale), rowURL);
+
+	// Type
+
+	row.addText(LanguageUtil.get(pageContext, curRole.getTypeLabel()), rowURL);
+
+	// Description
+
+	row.addText(curRole.getDescription(locale), rowURL);
+
+	// Add result row
+
+	resultRows.add(row);
+}
+%>
+
+<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_user_roles_users.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_user_roles_users.jsp
new file mode 100644
index 0000000..d54b1a8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/edit_user_roles_users.jsp
@@ -0,0 +1,107 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String tabs1 = (String)request.getAttribute("edit_user_roles.jsp-tabs1");
+
+int cur = (Integer)request.getAttribute("edit_user_roles.jsp-cur");
+
+Group group = (Group)request.getAttribute("edit_user_roles.jsp-group");
+String groupDescriptiveName = (String)request.getAttribute("edit_user_roles.jsp-groupDescriptiveName");
+Role role = (Role)request.getAttribute("edit_user_roles.jsp-role");
+long roleId = (Long)request.getAttribute("edit_user_roles.jsp-roleId");
+Organization organization = (Organization)request.getAttribute("edit_user_roles.jsp-organization");
+
+PortletURL portletURL = (PortletURL)request.getAttribute("edit_user_roles.jsp-portletURL");
+%>
+
+<aui:input name="addUserIds" type="hidden" />
+<aui:input name="removeUserIds" type="hidden" />
+
+<div>
+	<%= LanguageUtil.format(pageContext, "step-x-of-x", new String[] {"2", "2"}) %>
+
+	<%= LanguageUtil.format(pageContext, "current-signifies-current-users-associated-with-the-x-role.-available-signifies-all-users-associated-with-the-x-x", new String[] {HtmlUtil.escape(role.getTitle(locale)), HtmlUtil.escape(groupDescriptiveName), LanguageUtil.get(pageContext, (group.isOrganization() ? "organization" : "site"))}) %>
+</div>
+
+<br />
+
+<h3><liferay-ui:message key="users" /></h3>
+
+<liferay-ui:tabs
+	names="current,available"
+	param="tabs1"
+	url="<%= portletURL.toString() %>"
+/>
+
+<liferay-ui:membership-policy-error />
+
+<liferay-ui:search-container
+	rowChecker="<%= (role.getType() == RoleConstants.TYPE_SITE) ? new UserGroupRoleUserChecker(renderResponse, group, role) : new OrganizationRoleUserChecker(renderResponse, organization, role) %>"
+	searchContainer="<%= new UserSearch(renderRequest, portletURL) %>"
+	var="userSearchContainer"
+>
+	<liferay-ui:search-form
+		page="/html/portlet/users_admin/user_search.jsp"
+	/>
+
+	<%
+	UserSearchTerms searchTerms = (UserSearchTerms)userSearchContainer.getSearchTerms();
+
+	LinkedHashMap<String, Object> userParams = new LinkedHashMap<String, Object>();
+
+	userParams.put("inherit", Boolean.TRUE);
+	userParams.put("usersGroups", new Long(group.getGroupId()));
+
+	if (tabs1.equals("current")) {
+		userParams.put("userGroupRole", new Long[] {new Long(group.getGroupId()), new Long(roleId)});
+	}
+	%>
+
+	<liferay-ui:search-container-results>
+		<%@ include file="/html/portlet/users_admin/user_search_results.jspf" %>
+	</liferay-ui:search-container-results>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.User"
+		escapedModel="<%= true %>"
+		keyProperty="userId"
+		modelVar="user2"
+		rowIdProperty="screenName"
+	>
+		<liferay-ui:search-container-column-text
+			name="name"
+			property="fullName"
+		/>
+
+		<liferay-ui:search-container-column-text
+			name="screen-name"
+			property="screenName"
+		/>
+	</liferay-ui:search-container-row>
+
+	<div class="separator"><!-- --></div>
+
+	<%
+	String taglibOnClick = renderResponse.getNamespace() + "updateUserGroupRoleUsers('" + portletURL.toString() + StringPool.AMPERSAND + renderResponse.getNamespace() + "cur=" + cur + "');";
+	%>
+
+	<aui:button onClick="<%= taglibOnClick %>" primary="<%= true %>" value="update-associations" />
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/error.jsp
new file mode 100644
index 0000000..3062fdf
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/error.jsp
@@ -0,0 +1,27 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= NoSuchGroupException.class %>" message="the-site-could-not-be-found" />
+<liferay-ui:error exception="<%= NoSuchLayoutException.class %>" message="the-page-could-not-be-found" />
+<liferay-ui:error exception="<%= NoSuchRoleException.class %>" message="the-role-could-not-be-found" />
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/init.jsp
new file mode 100644
index 0000000..d71e22b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/init.jsp
@@ -0,0 +1,81 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.DuplicateGroupException" %><%@
+page import="com.liferay.portal.DuplicateTeamException" %><%@
+page import="com.liferay.portal.GroupFriendlyURLException" %><%@
+page import="com.liferay.portal.GroupNameException" %><%@
+page import="com.liferay.portal.GroupParentException" %><%@
+page import="com.liferay.portal.LayoutSetVirtualHostException" %><%@
+page import="com.liferay.portal.MembershipRequestCommentsException" %><%@
+page import="com.liferay.portal.NoSuchGroupException" %><%@
+page import="com.liferay.portal.NoSuchLayoutSetException" %><%@
+page import="com.liferay.portal.PendingBackgroundTaskException" %><%@
+page import="com.liferay.portal.RemoteExportException" %><%@
+page import="com.liferay.portal.RemoteOptionsException" %><%@
+page import="com.liferay.portal.RequiredGroupException" %><%@
+page import="com.liferay.portal.TeamNameException" %><%@
+page import="com.liferay.portal.kernel.backgroundtask.BackgroundTaskConstants" %><%@
+page import="com.liferay.portal.kernel.lar.PortletDataHandler" %><%@
+page import="com.liferay.portal.kernel.staging.StagingConstants" %><%@
+page import="com.liferay.portal.kernel.staging.StagingUtil" %><%@
+page import="com.liferay.portal.lar.LayoutExporter" %><%@
+page import="com.liferay.portal.lar.backgroundtask.LayoutStagingBackgroundTaskExecutor" %><%@
+page import="com.liferay.portal.liveusers.LiveUsers" %><%@
+page import="com.liferay.portal.security.auth.AuthException" %><%@
+page import="com.liferay.portal.security.auth.RemoteAuthException" %><%@
+page import="com.liferay.portal.security.membershippolicy.SiteMembershipPolicyUtil" %><%@
+page import="com.liferay.portal.service.permission.TeamPermissionUtil" %><%@
+page import="com.liferay.portal.util.CustomJspRegistryUtil" %><%@
+page import="com.liferay.portal.util.RobotsUtil" %><%@
+page import="com.liferay.portlet.backgroundtask.util.comparator.BackgroundTaskCreateDateComparator" %><%@
+page import="com.liferay.portlet.rolesadmin.search.GroupRoleChecker" %><%@
+page import="com.liferay.portlet.rolesadmin.search.RoleSearch" %><%@
+page import="com.liferay.portlet.rolesadmin.search.RoleSearchTerms" %><%@
+page import="com.liferay.portlet.sites.action.ActionUtil" %><%@
+page import="com.liferay.portlet.sites.search.OrganizationRoleUserChecker" %><%@
+page import="com.liferay.portlet.sites.search.UserGroupGroupRoleRoleChecker" %><%@
+page import="com.liferay.portlet.sites.search.UserGroupGroupRoleUserGroupChecker" %><%@
+page import="com.liferay.portlet.sites.search.UserGroupRoleRoleChecker" %><%@
+page import="com.liferay.portlet.sites.search.UserGroupRoleUserChecker" %><%@
+page import="com.liferay.portlet.sitesadmin.search.SiteChecker" %><%@
+page import="com.liferay.portlet.sitesadmin.search.TeamDisplayTerms" %><%@
+page import="com.liferay.portlet.sitesadmin.search.TeamSearch" %><%@
+page import="com.liferay.portlet.sitesadmin.search.UserGroupTeamChecker" %><%@
+page import="com.liferay.portlet.sitesadmin.search.UserTeamChecker" %><%@
+page import="com.liferay.portlet.usergroupsadmin.search.UserGroupChecker" %><%@
+page import="com.liferay.portlet.usergroupsadmin.search.UserGroupGroupChecker" %><%@
+page import="com.liferay.portlet.usersadmin.search.OrganizationGroupChecker" %>
+
+<%
+boolean filterManageableGroups = true;
+
+if (permissionChecker.isCompanyAdmin()) {
+	filterManageableGroups = false;
+}
+
+if (GroupPermissionUtil.contains(permissionChecker, ActionKeys.VIEW)) {
+	filterManageableGroups = false;
+}
+
+long[] classNameIds = new long[] {PortalUtil.getClassNameId(Company.class), PortalUtil.getClassNameId(Group.class), PortalUtil.getClassNameId(Organization.class)};
+
+Format dateFormatDate = FastDateFormatFactoryUtil.getDate(locale, timeZone);
+%>
+
+<%@ include file="/html/portlet/sites_admin/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/membership_request_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/membership_request_action.jsp
new file mode 100644
index 0000000..6c12fcd
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/membership_request_action.jsp
@@ -0,0 +1,45 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+Object[] objArray = (Object[])row.getObject();
+
+User user2 = (User)objArray[0];
+Group group = (Group)objArray[1];
+MembershipRequest membershipRequest = (MembershipRequest)objArray[2];
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= (membershipRequest.getStatusId() == MembershipRequestConstants.STATUS_PENDING) && GroupPermissionUtil.contains(permissionChecker, group.getGroupId(), ActionKeys.ASSIGN_MEMBERS) %>">
+		<portlet:renderURL var="replyRequestURL">
+			<portlet:param name="struts_action" value="/sites_admin/reply_membership_request" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="p_u_i_d" value="<%= String.valueOf(user2.getUserId()) %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+			<portlet:param name="membershipRequestId" value="<%= String.valueOf(membershipRequest.getMembershipRequestId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="reply"
+			message="reply"
+			url="<%= replyRequestURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/post_membership_request.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/post_membership_request.jsp
new file mode 100644
index 0000000..938068a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/post_membership_request.jsp
@@ -0,0 +1,68 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+ActionUtil.getGroup(request);
+
+Group group = (Group)request.getAttribute(WebKeys.GROUP);
+
+long groupId = BeanParamUtil.getLong(group, request, "groupId");
+
+MembershipRequest membershipRequest = (MembershipRequest)request.getAttribute(WebKeys.MEMBERSHIP_REQUEST);
+%>
+
+<portlet:actionURL var="postMembershipRequestURL">
+	<portlet:param name="struts_action" value="/sites_admin/post_membership_request" />
+</portlet:actionURL>
+
+<aui:form action="<%= postMembershipRequestURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="groupId" type="hidden" value="<%= groupId %>" />
+
+	<c:if test="<%= !layout.isTypeControlPanel() %>">
+		<liferay-ui:header
+			backURL="<%= redirect %>"
+			escapeXml="<%= false %>"
+			localizeTitle="<%= false %>"
+			title='<%= LanguageUtil.format(pageContext, "request-membership-for-x", HtmlUtil.escape(group.getDescriptiveName(locale))) %>'
+		/>
+	</c:if>
+
+	<liferay-ui:error exception="<%= MembershipRequestCommentsException.class %>" message="please-enter-valid-comments" />
+
+	<aui:model-context bean="<%= membershipRequest %>" model="<%= MembershipRequest.class %>" />
+
+	<c:if test="<%= Validator.isNotNull(group.getDescription()) %>">
+		<aui:field-wrapper label="description">
+			<p>
+				<%= HtmlUtil.escape(group.getDescription()) %>
+			</p>
+		</aui:field-wrapper>
+	</c:if>
+
+	<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" name="comments" />
+
+	<aui:button-row>
+		<aui:button type="submit" />
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/reply_membership_request.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/reply_membership_request.jsp
new file mode 100644
index 0000000..3599859
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/reply_membership_request.jsp
@@ -0,0 +1,107 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+ActionUtil.getGroup(request);
+
+Group group = (Group)request.getAttribute(WebKeys.GROUP);
+
+long groupId = BeanParamUtil.getLong(group, request, "groupId");
+
+String friendlyURL = BeanParamUtil.getString(group, request, "friendlyURL");
+
+ActionUtil.getMembershipRequest(request);
+
+MembershipRequest membershipRequest = (MembershipRequest)request.getAttribute(WebKeys.MEMBERSHIP_REQUEST);
+%>
+
+<portlet:actionURL var="replyMembershipRequestURL">
+	<portlet:param name="struts_action" value="/sites_admin/reply_membership_request" />
+</portlet:actionURL>
+
+<aui:form action="<%= replyMembershipRequestURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="groupId" type="hidden" value="<%= groupId %>" />
+	<aui:input name="membershipRequestId" type="hidden" value="<%= membershipRequest.getMembershipRequestId() %>" />
+
+	<c:if test="<%= !layout.isTypeControlPanel() %>">
+		<liferay-ui:header
+			backURL="<%= redirect %>"
+			escapeXml="<%= false %>"
+			localizeTitle="<%= false %>"
+			title='<%= LanguageUtil.format(pageContext, "reply-membership-request-for-x", HtmlUtil.escape(group.getDescriptiveName(locale))) %>'
+		/>
+	</c:if>
+
+	<liferay-ui:error exception="<%= DuplicateGroupException.class %>" message="please-enter-a-unique-name" />
+	<liferay-ui:error exception="<%= GroupNameException.class %>" message="please-enter-a-valid-name" />
+	<liferay-ui:error exception="<%= MembershipRequestCommentsException.class %>" message="please-enter-valid-comments" />
+
+	<liferay-ui:error exception="<%= RequiredGroupException.class %>">
+
+		<%
+		RequiredGroupException rge = (RequiredGroupException)errorException;
+		%>
+
+		<c:if test="<%= rge.getType() == RequiredGroupException.CURRENT_GROUP %>">
+			<liferay-ui:message key="you-cannot-delete-this-site-because-you-are-currently-accessing-this-site" />
+		</c:if>
+
+		<c:if test="<%= rge.getType() == RequiredGroupException.PARENT_GROUP %>">
+			<liferay-ui:message key="you-cannot-delete-sites-that-have-subsites" />
+		</c:if>
+
+		<c:if test="<%= rge.getType() == RequiredGroupException.SYSTEM_GROUP %>">
+			<liferay-ui:message key="the-site-cannot-be-deleted-or-deactivated-because-it-is-a-required-system-site" />
+		</c:if>
+	</liferay-ui:error>
+
+	<aui:model-context bean="<%= membershipRequest %>" model="<%= MembershipRequest.class %>" />
+
+	<c:if test="<%= Validator.isNotNull(group.getDescription()) %>">
+		<aui:field-wrapper label="description">
+			<p>
+				<%= HtmlUtil.escape(group.getDescription()) %>
+			</p>
+		</aui:field-wrapper>
+	</c:if>
+
+	<aui:fieldset>
+		<aui:field-wrapper label="user-name">
+			<liferay-ui:input-resource url="<%= PortalUtil.getUserName(membershipRequest.getUserId(), StringPool.BLANK) %>" />
+		</aui:field-wrapper>
+
+		<aui:input name="userComments" readonly="<%= true %>" type="textarea" value="<%= HtmlUtil.escape(membershipRequest.getComments()) %>" />
+
+		<aui:select autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" label="status" name="statusId">
+			<aui:option label="approve" value="<%= MembershipRequestConstants.STATUS_APPROVED %>" />
+			<aui:option label="deny" value="<%= MembershipRequestConstants.STATUS_DENIED %>" />
+		</aui:select>
+
+		<aui:input name="replyComments" />
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/select_site.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/select_site.jsp
new file mode 100644
index 0000000..26a74a7
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/select_site.jsp
@@ -0,0 +1,206 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String strutsAction = ParamUtil.getString(request, "struts_action");
+
+String p_u_i_d = ParamUtil.getString(request, "p_u_i_d");
+long groupId = ParamUtil.getLong(request, "groupId");
+boolean includeCompany = ParamUtil.getBoolean(request, "includeCompany");
+boolean includeUserPersonalSite = ParamUtil.getBoolean(request, "includeUserPersonalSite");
+String eventName = ParamUtil.getString(request, "eventName", liferayPortletResponse.getNamespace() + "selectGroup");
+String target = ParamUtil.getString(request, "target");
+
+User selUser = PortalUtil.getSelectedUser(request);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/sites_admin/select_site");
+
+if (selUser != null) {
+	portletURL.setParameter("p_u_i_d", String.valueOf(selUser.getUserId()));
+}
+
+portletURL.setParameter("groupId", String.valueOf(groupId));
+portletURL.setParameter("includeCompany", String.valueOf(includeCompany));
+portletURL.setParameter("includeUserPersonalSite", String.valueOf(includeUserPersonalSite));
+portletURL.setParameter("eventName", eventName);
+portletURL.setParameter("target", target);
+%>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="selectGroupFm">
+	<liferay-ui:header
+		title="sites"
+	/>
+
+	<liferay-ui:search-container
+		searchContainer="<%= new GroupSearch(renderRequest, portletURL) %>"
+	>
+		<liferay-ui:search-form
+			page="/html/portlet/users_admin/group_search.jsp"
+		/>
+
+		<%
+		GroupSearchTerms searchTerms = (GroupSearchTerms)searchContainer.getSearchTerms();
+
+		LinkedHashMap<String, Object> groupParams = new LinkedHashMap<String, Object>();
+		%>
+
+		<liferay-ui:search-container-results>
+
+			<%
+			results.clear();
+
+			List<Long> excludedGroupIds = new ArrayList<Long>();
+
+			Group companyGroup = company.getGroup();
+
+			excludedGroupIds.add(companyGroup.getGroupId());
+
+			if (groupId > 0) {
+				Group group = GroupLocalServiceUtil.getGroup(groupId);
+
+				if (group.isStagingGroup()) {
+					excludedGroupIds.add(group.getLiveGroupId());
+				}
+				else {
+					excludedGroupIds.add(groupId);
+				}
+			}
+
+			groupParams.put("excludedGroupIds", excludedGroupIds);
+
+			if (strutsAction.equals("/users_admin/select_site")) {
+				groupParams.put("manualMembership", Boolean.TRUE);
+			}
+
+			groupParams.put("site", Boolean.TRUE);
+
+			if (filterManageableGroups) {
+				groupParams.put("usersGroups", user.getUserId());
+			}
+
+			int additionalSites = 0;
+
+			if (includeCompany) {
+				if (searchContainer.getStart() == 0) {
+					results.add(companyGroup);
+				}
+
+				additionalSites++;
+			}
+
+			if (includeUserPersonalSite) {
+				if (searchContainer.getStart() == 0) {
+					Group userPersonalSite = GroupLocalServiceUtil.getGroup(company.getCompanyId(), GroupConstants.USER_PERSONAL_SITE);
+
+					results.add(userPersonalSite);
+				}
+
+				additionalSites++;
+			}
+
+			if (searchTerms.isAdvancedSearch()) {
+				total = GroupLocalServiceUtil.searchCount(company.getCompanyId(), null, searchTerms.getName(), searchTerms.getDescription(), groupParams, searchTerms.isAndOperator());
+			}
+			else {
+				total = GroupLocalServiceUtil.searchCount(company.getCompanyId(), null, searchTerms.getKeywords(), groupParams);
+			}
+
+			total += additionalSites;
+
+			searchContainer.setTotal(total);
+
+			int start = searchContainer.getStart();
+
+			if (searchContainer.getStart() > additionalSites) {
+				start = searchContainer.getStart() - additionalSites;
+			}
+
+			int end = searchContainer.getEnd() - additionalSites;
+
+			List<Group> sites = null;
+
+			if (searchTerms.isAdvancedSearch()) {
+				sites = GroupLocalServiceUtil.search(company.getCompanyId(), null, searchTerms.getName(), searchTerms.getDescription(), groupParams, searchTerms.isAndOperator(), start, end, searchContainer.getOrderByComparator());
+			}
+			else {
+				sites = GroupLocalServiceUtil.search(company.getCompanyId(), null, searchTerms.getKeywords(), groupParams, start, end, searchContainer.getOrderByComparator());
+			}
+
+			results.addAll(sites);
+
+			searchContainer.setResults(results);
+			%>
+
+		</liferay-ui:search-container-results>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.model.Group"
+			escapedModel="<%= true %>"
+			keyProperty="groupId"
+			modelVar="group"
+			rowIdProperty="friendlyURL"
+		>
+
+			<liferay-ui:search-container-column-text
+				name="name"
+				value="<%= HtmlUtil.escape(group.getDescriptiveName(locale)) %>"
+			/>
+
+			<liferay-ui:search-container-column-text
+				name="type"
+				value="<%= LanguageUtil.get(pageContext, group.getTypeLabel()) %>"
+			/>
+
+			<liferay-ui:search-container-column-text>
+				<c:if test="<%= (Validator.isNull(p_u_i_d) || SiteMembershipPolicyUtil.isMembershipAllowed((selUser != null) ? selUser.getUserId() : 0, group.getGroupId())) %>">
+
+					<%
+					Map<String, Object> data = new HashMap<String, Object>();
+
+					data.put("groupdescriptivename", HtmlUtil.escape(group.getDescriptiveName(locale)));
+					data.put("groupid", group.getGroupId());
+					data.put("grouptarget", target);
+					data.put("grouptype", LanguageUtil.get(pageContext, group.getTypeLabel()));
+					%>
+
+					<aui:button cssClass="selector-button" data="<%= data %>" value="choose" />
+				</c:if>
+			</liferay-ui:search-container-column-text>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script use="aui-base">
+	var Util = Liferay.Util;
+
+	A.one('#<portlet:namespace />selectGroupFm').delegate(
+		'click',
+		function(event) {
+			var result = Util.getAttributes(event.currentTarget, 'data-');
+
+			Util.getOpener().Liferay.fire('<%= HtmlUtil.escapeJS(eventName) %>', result);
+
+			Util.getWindow().hide();
+		},
+		'.selector-button'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/select_team.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/select_team.jsp
new file mode 100644
index 0000000..3236640
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/select_team.jsp
@@ -0,0 +1,111 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+long groupId = ParamUtil.getLong(request, "groupId");
+String eventName = ParamUtil.getString(request, "eventName", liferayPortletResponse.getNamespace() + "selectTeam");
+%>
+
+<liferay-ui:header
+	title="teams"
+/>
+
+<liferay-portlet:renderURL varImpl="portletURL">
+	<portlet:param name="struts_action" value="/sites_admin/select_team" />
+	<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+	<portlet:param name="eventName" value="<%= eventName %>" />
+</liferay-portlet:renderURL>
+
+<aui:form action="<%= portletURL.toString() %>" cssClass="form-search" method="get" name="selectTeamFm">
+	<liferay-portlet:renderURLParams varImpl="portletURL" />
+
+	<liferay-ui:search-container
+		searchContainer="<%= new TeamSearch(renderRequest, portletURL) %>"
+	>
+
+		<%
+		TeamDisplayTerms searchTerms = (TeamDisplayTerms)searchContainer.getSearchTerms();
+
+		portletURL.setParameter(searchContainer.getCurParam(), String.valueOf(searchContainer.getCur()));
+
+		total = TeamLocalServiceUtil.searchCount(groupId, searchTerms.getName(), searchTerms.getDescription(), new LinkedHashMap<String, Object>());
+
+		searchContainer.setTotal(total);
+		%>
+
+		<liferay-ui:input-search name="<%= searchTerms.NAME %>" />
+
+		<div class="separator"><!-- --></div>
+
+		<liferay-ui:search-container-results
+			results="<%= TeamLocalServiceUtil.search(groupId, searchTerms.getName(), searchTerms.getDescription(), new LinkedHashMap<String, Object>(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator()) %>"
+		/>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.model.TeamModel"
+			keyProperty="teamId"
+			modelVar="curTeam"
+			rowVar="row"
+		>
+			<liferay-ui:search-container-column-text
+				name="name"
+				value="<%= curTeam.getName() %>"
+			/>
+
+			<liferay-ui:search-container-column-text
+				name="description"
+				value="<%= curTeam.getDescription() %>"
+			/>
+
+			<liferay-ui:search-container-column-text>
+
+				<%
+				Map<String, Object> data = new HashMap<String, Object>();
+
+				data.put("teamdescription", HtmlUtil.escape(curTeam.getDescription()));
+				data.put("teamid", curTeam.getTeamId());
+				data.put("teamname", HtmlUtil.escape(curTeam.getName()));
+				data.put("teamsearchcontainername", "teams");
+				%>
+
+				<aui:button cssClass="selector-button" data="<%= data %>" value="choose" />
+			</liferay-ui:search-container-column-text>
+
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script use="aui-base">
+	var Util = Liferay.Util;
+
+	A.one('#<portlet:namespace />selectTeamFm').delegate(
+		'click',
+		function(event) {
+			var result = Util.getAttributes(event.currentTarget, 'data-');
+
+			Util.getOpener().Liferay.fire('<%= HtmlUtil.escapeJS(eventName) %>', result);
+
+			Util.getWindow().hide();
+		},
+		'.selector-button'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/analytics.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/analytics.jsp
new file mode 100644
index 0000000..54abdfb
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/analytics.jsp
@@ -0,0 +1,65 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+Group liveGroup = (Group)request.getAttribute("site.liveGroup");
+
+UnicodeProperties groupTypeSettings = null;
+
+if (liveGroup != null) {
+	groupTypeSettings = liveGroup.getTypeSettingsProperties();
+}
+else {
+	groupTypeSettings = new UnicodeProperties();
+}
+%>
+
+<liferay-ui:error-marker key="errorSection" value="analytics" />
+
+<h3><liferay-ui:message key="analytics" /></h3>
+
+<%
+String[] analyticsTypes = PrefsPropsUtil.getStringArray(company.getCompanyId(), PropsKeys.ADMIN_ANALYTICS_TYPES, StringPool.NEW_LINE);
+
+for (String analyticsType : analyticsTypes) {
+%>
+
+	<c:choose>
+		<c:when test='<%= StringUtil.equalsIgnoreCase(analyticsType, "google") %>'>
+
+			<%
+			String googleAnalyticsId = PropertiesParamUtil.getString(groupTypeSettings, request, "googleAnalyticsId");
+			%>
+
+			<aui:input helpMessage="set-the-google-analytics-id-that-will-be-used-for-this-set-of-pages" label="google-analytics-id" name="googleAnalyticsId" size="30" type="text" value="<%= googleAnalyticsId %>" />
+		</c:when>
+		<c:otherwise>
+
+			<%
+			String analyticsName = TextFormatter.format(analyticsType, TextFormatter.J);
+
+			String analyticsScript = PropertiesParamUtil.getString(groupTypeSettings, request, Sites.ANALYTICS_PREFIX + analyticsType);
+			%>
+
+			<aui:input cols="60" helpMessage='<%= LanguageUtil.format(pageContext, "set-the-script-for-x-that-will-be-used-for-this-set-of-pages", analyticsName) %>' label="<%= analyticsName %>" name="<%= Sites.ANALYTICS_PREFIX + analyticsType %>" rows="15" type="textarea" value="<%= analyticsScript %>" wrap="soft" />
+		</c:otherwise>
+	</c:choose>
+
+<%
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/categorization.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/categorization.jsp
new file mode 100644
index 0000000..91a2453
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/categorization.jsp
@@ -0,0 +1,43 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+Group liveGroup = (Group)request.getAttribute("site.liveGroup");
+%>
+
+<liferay-ui:error-marker key="errorSection" value="categorization" />
+
+<aui:model-context bean="<%= liveGroup %>" model="<%= Group.class %>" />
+
+<h3><liferay-ui:message key="categorization" /></h3>
+
+<liferay-ui:asset-categories-error />
+
+<liferay-ui:asset-tags-error />
+
+<aui:fieldset>
+	<aui:input name="categories" type="assetCategories" />
+
+	<aui:input name="tags" type="assetTags" />
+</aui:fieldset>
+
+<aui:script>
+	function <portlet:namespace />getSuggestionsContent() {
+		return document.<portlet:namespace />fm.<portlet:namespace />description.value;
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/content_sharing.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/content_sharing.jsp
new file mode 100644
index 0000000..ef10fc1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/content_sharing.jsp
@@ -0,0 +1,43 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+Group liveGroup = (Group)request.getAttribute("site.liveGroup");
+
+UnicodeProperties groupTypeSettings = null;
+
+if (liveGroup != null) {
+	groupTypeSettings = liveGroup.getTypeSettingsProperties();
+}
+else {
+	groupTypeSettings = new UnicodeProperties();
+}
+
+int companyContentSharingWithChildrenEnabled = PrefsPropsUtil.getInteger(company.getCompanyId(), PropsKeys.SITES_CONTENT_SHARING_WITH_CHILDREN_ENABLED);
+int groupContentSharingWithChildrenEnabled = PropertiesParamUtil.getInteger(groupTypeSettings, request, "contentSharingWithChildrenEnabled", Sites.CONTENT_SHARING_WITH_CHILDREN_DEFAULT_VALUE);
+%>
+
+<h3><liferay-ui:message key="content-sharing" /></h3>
+
+<aui:fieldset>
+	<aui:select label="allow-subsites-to-display-content-from-this-site" name="contentSharingWithChildrenEnabled">
+		<aui:option label='<%= (companyContentSharingWithChildrenEnabled == Sites.CONTENT_SHARING_WITH_CHILDREN_ENABLED_BY_DEFAULT) ? "default-value-enabled" : "default-value-disabled" %>' selected="<%= groupContentSharingWithChildrenEnabled == Sites.CONTENT_SHARING_WITH_CHILDREN_DEFAULT_VALUE %>" value="<%= Sites.CONTENT_SHARING_WITH_CHILDREN_DEFAULT_VALUE %>" />
+		<aui:option label="enabled" selected="<%= groupContentSharingWithChildrenEnabled == Sites.CONTENT_SHARING_WITH_CHILDREN_ENABLED %>" value="<%= Sites.CONTENT_SHARING_WITH_CHILDREN_ENABLED %>" />
+		<aui:option label="disabled" selected="<%= groupContentSharingWithChildrenEnabled == Sites.CONTENT_SHARING_WITH_CHILDREN_DISABLED %>" value="<%= Sites.CONTENT_SHARING_WITH_CHILDREN_DISABLED %>" />
+	</aui:select>
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/custom_fields.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/custom_fields.jsp
new file mode 100644
index 0000000..6918b24
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/custom_fields.jsp
@@ -0,0 +1,32 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+Group liveGroup = (Group)request.getAttribute("site.liveGroup");
+%>
+
+<h3><liferay-ui:message key="custom-fields" /></h3>
+
+<aui:fieldset>
+	<liferay-ui:custom-attribute-list
+		className="<%= Group.class.getName() %>"
+		classPK="<%= (liveGroup != null) ? liveGroup.getGroupId() : 0 %>"
+		editable="<%= true %>"
+		label="<%= true %>"
+	/>
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/default_user_associations.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/default_user_associations.jsp
new file mode 100644
index 0000000..8abd5b6
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/default_user_associations.jsp
@@ -0,0 +1,307 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+Group liveGroup = (Group)request.getAttribute("site.liveGroup");
+
+long groupId = scopeGroupId;
+
+UnicodeProperties groupTypeSettings = null;
+
+if (liveGroup != null) {
+	groupId = liveGroup.getGroupId();
+
+	groupTypeSettings = liveGroup.getTypeSettingsProperties();
+}
+else {
+	groupTypeSettings = new UnicodeProperties();
+}
+
+List<Role> defaultSiteRoles = new ArrayList();
+
+long[] defaultSiteRoleIds = StringUtil.split(groupTypeSettings.getProperty("defaultSiteRoleIds"), 0L);
+
+for (long defaultSiteRoleId : defaultSiteRoleIds) {
+	Role role = RoleLocalServiceUtil.getRole(defaultSiteRoleId);
+
+	defaultSiteRoles.add(role);
+}
+
+List<Team> defaultTeams = new ArrayList();
+
+long[] defaultTeamIds = StringUtil.split(groupTypeSettings.getProperty("defaultTeamIds"), 0L);
+
+for (long defaultTeamId : defaultTeamIds) {
+	Team team = TeamLocalServiceUtil.getTeam(defaultTeamId);
+
+	defaultTeams.add(team);
+}
+%>
+
+<liferay-util:buffer var="removeRoleIcon">
+	<liferay-ui:icon
+		image="unlink"
+		label="<%= true %>"
+		message="remove"
+	/>
+</liferay-util:buffer>
+
+<aui:input name="siteRolesRoleIds" type="hidden" value="<%= ListUtil.toString(defaultSiteRoles, Role.ROLE_ID_ACCESSOR) %>" />
+<aui:input name="teamsTeamIds" type="hidden" value="<%= ListUtil.toString(defaultTeams, TeamImpl.TEAM_ID_ACCESSOR) %>" />
+
+<h3><liferay-ui:message key="default-user-associations" /></h3>
+
+<h3><liferay-ui:message key="site-roles" /> <liferay-ui:icon-help message="default-site-roles-assignment-help" /></h3>
+
+<liferay-ui:search-container
+	headerNames="title,null"
+	id="siteRolesSearchContainer"
+>
+	<liferay-ui:search-container-results
+		results="<%= defaultSiteRoles %>"
+		total="<%= defaultSiteRoles.size() %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.Role"
+		keyProperty="roleId"
+		modelVar="role"
+	>
+
+		<liferay-ui:search-container-column-text
+			name="title"
+			value="<%= HtmlUtil.escape(role.getTitle(locale)) %>"
+		/>
+
+		<liferay-ui:search-container-column-text>
+			<a class="modify-link" data-rowId="<%= role.getRoleId() %>" href="javascript:;"><%= removeRoleIcon %></a>
+		</liferay-ui:search-container-column-text>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator paginate="<%= false %>" />
+</liferay-ui:search-container>
+
+<liferay-ui:icon
+	cssClass="modify-link"
+	iconCssClass="icon-search"
+	id="selectSiteRoleLink"
+	label="<%= true %>"
+	linkCssClass="btn"
+	message="select"
+	url="javascript:;"
+/>
+
+<br /><br />
+
+<h3><liferay-ui:message key="teams" /> <liferay-ui:icon-help message="default-teams-assignment-help" /></h3>
+
+<liferay-ui:search-container
+	headerNames="title,null"
+	id="teamsSearchContainer"
+>
+	<liferay-ui:search-container-results
+		results="<%= defaultTeams %>"
+		total="<%= defaultTeams.size() %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.Team"
+		keyProperty="teamId"
+		modelVar="team"
+	>
+		<liferay-ui:search-container-column-text
+			name="title"
+			value="<%= HtmlUtil.escape(team.getName()) %>"
+		/>
+
+		<liferay-ui:search-container-column-text>
+			<a class="modify-link" data-rowId="<%= team.getTeamId() %>" href="javascript:;"><%= removeRoleIcon %></a>
+		</liferay-ui:search-container-column-text>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator paginate="<%= false %>" />
+</liferay-ui:search-container>
+
+<liferay-ui:icon
+	cssClass="modify-link"
+	iconCssClass="icon-search"
+	id="selectTeamLink"
+	label="<%= true %>"
+	linkCssClass="btn"
+	message="select"
+	url="javascript:;"
+/>
+
+<aui:script use="liferay-search-container">
+	var searchContainer = Liferay.SearchContainer.get('<portlet:namespace />siteRolesSearchContainer');
+
+	searchContainer.get('contentBox').delegate(
+		'click',
+		function(event) {
+			var link = event.currentTarget;
+			var tr = link.ancestor('tr');
+
+			var rowId = link.getAttribute('data-rowId');
+
+			searchContainer.deleteRow(tr, rowId);
+
+			<portlet:namespace />deleteRole(rowId);
+		},
+		'.modify-link'
+	);
+</aui:script>
+
+<aui:script use="liferay-search-container">
+	var searchContainer = Liferay.SearchContainer.get('<portlet:namespace />teamsSearchContainer');
+
+	searchContainer.get('contentBox').delegate(
+		'click',
+		function(event) {
+			var link = event.currentTarget;
+			var tr = link.ancestor('tr');
+
+			var rowId = link.getAttribute('data-rowId');
+
+			searchContainer.deleteRow(tr, rowId);
+
+			<portlet:namespace />deleteTeam(rowId);
+		},
+		'.modify-link'
+	);
+</aui:script>
+
+<portlet:renderURL var="selectTeamURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+	<portlet:param name="struts_action" value="/sites_admin/select_team" />
+	<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+</portlet:renderURL>
+
+<aui:script use="liferay-search-container,escape">
+	A.one('#<portlet:namespace />selectSiteRoleLink').on(
+		'click',
+		function(event) {
+			Liferay.Util.selectEntity(
+				{
+					dialog: {
+						constrain: true,
+						modal: true,
+						width: 600
+					},
+					id: '<portlet:namespace />selectSiteRole',
+					title: '<liferay-ui:message arguments="site-role" key="select-x" />',
+					uri: '<portlet:renderURL windowState="<%= LiferayWindowState.POP_UP.toString() %>"><portlet:param name="struts_action" value="/sites_admin/select_site_role" /><portlet:param name="step" value="2" /><portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" /></portlet:renderURL>'
+				},
+				function(event) {
+					for (var i = 0; i < <portlet:namespace />siteRolesRoleIds.length; i++) {
+						if (<portlet:namespace />siteRolesRoleIds[i] == event.roleid) {
+							return;
+						}
+					}
+
+					searchContainer = Liferay.SearchContainer.get('<portlet:namespace />' + event.searchcontainername + 'SearchContainer');
+
+					var rowColumns = [];
+
+					rowColumns.push(A.Escape.html(event.roletitle));
+
+					if (event.groupid) {
+						rowColumns.push('<a class="modify-link" data-rowId="' + event.roleid + '" href="javascript:;"><%= UnicodeFormatter.toString(removeRoleIcon) %></a>');
+
+						<portlet:namespace />siteRolesRoleIds.push(event.roleid);
+
+						document.<portlet:namespace />fm.<portlet:namespace />siteRolesRoleIds.value = <portlet:namespace />siteRolesRoleIds.join(',');
+					}
+					else {
+						rowColumns.push('<a class="modify-link" data-rowId="' + event.roleid + '" href="javascript:;"><%= UnicodeFormatter.toString(removeRoleIcon) %></a>');
+					}
+
+					searchContainer.addRow(rowColumns, event.roleid);
+
+					searchContainer.updateDataStore();
+				}
+			);
+		}
+	);
+
+	A.one('#<portlet:namespace />selectTeamLink').on(
+		'click',
+		function(event) {
+			Liferay.Util.selectEntity(
+				{
+					dialog: {
+						constrain: true,
+						modal: true,
+						width: 680
+					},
+					id: '<portlet:namespace />selectTeam',
+					title: '<liferay-ui:message arguments="team" key="select-x" />',
+					uri: '<%= selectTeamURL.toString() %>'
+				},
+				function(event) {
+					searchContainer = Liferay.SearchContainer.get('<portlet:namespace />' + event.teamsearchcontainername + 'SearchContainer');
+
+					var rowColumns = [];
+
+					rowColumns.push(event.teamname);
+
+					if (event.teamid) {
+						rowColumns.push('<a class="modify-link" data-rowId="' + event.teamid + '" href="javascript:;"><%= UnicodeFormatter.toString(removeRoleIcon) %></a>');
+
+						<portlet:namespace />teamsTeamIds.push(event.teamid);
+
+						document.<portlet:namespace />fm.<portlet:namespace />teamsTeamIds.value = <portlet:namespace />teamsTeamIds.join(',');
+					}
+					else {
+						rowColumns.push('<a class="modify-link" data-rowId="' + event.teamid + '" href="javascript:;"><%= UnicodeFormatter.toString(removeRoleIcon) %></a>');
+					}
+
+					searchContainer.addRow(rowColumns, event.teamid);
+					searchContainer.updateDataStore();
+				}
+			);
+		}
+	);
+</aui:script>
+
+<aui:script>
+	var <portlet:namespace />siteRolesRoleIds = ['<%= ListUtil.toString(defaultSiteRoles, Role.ROLE_ID_ACCESSOR, "', '") %>'];
+	var <portlet:namespace />teamsTeamIds = ['<%= ListUtil.toString(defaultTeams, Team.TEAM_ID_ACCESSOR, "', '") %>'];
+
+	function <portlet:namespace />deleteRole(roleId) {
+		for (var i = 0; i < <portlet:namespace />siteRolesRoleIds.length; i++) {
+			if (<portlet:namespace />siteRolesRoleIds[i] == roleId) {
+				<portlet:namespace />siteRolesRoleIds.splice(i, 1);
+
+				break;
+			}
+		}
+
+		document.<portlet:namespace />fm.<portlet:namespace />siteRolesRoleIds.value = <portlet:namespace />siteRolesRoleIds.join(',');
+	}
+
+	function <portlet:namespace />deleteTeam(teamId) {
+		for (var i = 0; i < <portlet:namespace />teamsTeamIds.length; i++) {
+			if (<portlet:namespace />teamsTeamIds[i] == teamId) {
+				<portlet:namespace />teamsTeamIds.splice(i, 1);
+
+				break;
+			}
+		}
+
+		document.<portlet:namespace />fm.<portlet:namespace />teamsTeamIds.value = <portlet:namespace />teamsTeamIds.join(',');
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/details.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/details.jsp
new file mode 100644
index 0000000..fae7be3
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/details.jsp
@@ -0,0 +1,657 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+Group group = (Group)request.getAttribute("site.group");
+Group liveGroup = (Group)request.getAttribute("site.liveGroup");
+LayoutSetPrototype layoutSetPrototype = (LayoutSetPrototype)request.getAttribute("site.layoutSetPrototype");
+boolean showPrototypes = GetterUtil.getBoolean(request.getAttribute("site.showPrototypes"));
+
+List<LayoutSetPrototype> layoutSetPrototypes = LayoutSetPrototypeServiceUtil.search(company.getCompanyId(), Boolean.TRUE, null);
+
+LayoutSet privateLayoutSet = null;
+LayoutSetPrototype privateLayoutSetPrototype = null;
+boolean privateLayoutSetPrototypeLinkEnabled = true;
+
+LayoutSet publicLayoutSet = null;
+LayoutSetPrototype publicLayoutSetPrototype = null;
+boolean publicLayoutSetPrototypeLinkEnabled = true;
+
+if (showPrototypes && (group != null)) {
+	try {
+		LayoutLocalServiceUtil.getLayouts(liveGroup.getGroupId(), true, LayoutConstants.DEFAULT_PARENT_LAYOUT_ID);
+
+		privateLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(liveGroup.getGroupId(), true);
+
+		privateLayoutSetPrototypeLinkEnabled = privateLayoutSet.isLayoutSetPrototypeLinkEnabled();
+
+		String layoutSetPrototypeUuid = privateLayoutSet.getLayoutSetPrototypeUuid();
+
+		if (Validator.isNotNull(layoutSetPrototypeUuid)) {
+			privateLayoutSetPrototype = LayoutSetPrototypeLocalServiceUtil.getLayoutSetPrototypeByUuidAndCompanyId(layoutSetPrototypeUuid, company.getCompanyId());
+		}
+	}
+	catch (Exception e) {
+	}
+
+	try {
+		LayoutLocalServiceUtil.getLayouts(liveGroup.getGroupId(), false, LayoutConstants.DEFAULT_PARENT_LAYOUT_ID);
+
+		publicLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(liveGroup.getGroupId(), false);
+
+		publicLayoutSetPrototypeLinkEnabled = publicLayoutSet.isLayoutSetPrototypeLinkEnabled();
+
+		String layoutSetPrototypeUuid = publicLayoutSet.getLayoutSetPrototypeUuid();
+
+		if (Validator.isNotNull(layoutSetPrototypeUuid)) {
+			publicLayoutSetPrototype = LayoutSetPrototypeLocalServiceUtil.getLayoutSetPrototypeByUuidAndCompanyId(layoutSetPrototypeUuid, company.getCompanyId());
+		}
+	}
+	catch (Exception e) {
+	}
+}
+
+UnicodeProperties typeSettingsProperties = null;
+
+if (liveGroup != null) {
+	typeSettingsProperties = liveGroup.getTypeSettingsProperties();
+}
+else if (group != null) {
+	typeSettingsProperties = group.getTypeSettingsProperties();
+}
+%>
+
+<liferay-ui:error-marker key="errorSection" value="details" />
+
+<h3><liferay-ui:message key="details" /></h3>
+
+<aui:model-context bean="<%= liveGroup %>" model="<%= Group.class %>" />
+
+<liferay-ui:error exception="<%= DuplicateGroupException.class %>" message="please-enter-a-unique-name" />
+<liferay-ui:error exception="<%= GroupNameException.class %>" message="please-enter-a-valid-name" />
+
+<liferay-ui:error exception="<%= GroupParentException.class %>">
+
+	<%
+	GroupParentException gpe = (GroupParentException)errorException;
+	%>
+
+	<c:if test="<%= gpe.getType() == GroupParentException.CHILD_DESCENDANT %>">
+		<liferay-ui:message key="the-site-cannot-have-a-child-as-its-parent-site" />
+	</c:if>
+
+	<c:if test="<%= gpe.getType() == GroupParentException.SELF_DESCENDANT %>">
+		<liferay-ui:message key="the-site-cannot-be-its-own-parent-site" />
+	</c:if>
+</liferay-ui:error>
+
+<liferay-ui:error exception="<%= PendingBackgroundTaskException.class %>" message="the-site-cannot-be-deleted-because-it-has-background-tasks-in-progress" />
+
+<liferay-ui:error exception="<%= RequiredGroupException.class %>">
+
+	<%
+	RequiredGroupException rge = (RequiredGroupException)errorException;
+	%>
+
+	<c:if test="<%= rge.getType() == RequiredGroupException.CURRENT_GROUP %>">
+		<liferay-ui:message key="the-site-cannot-be-deleted-or-deactivated-because-you-are-accessing-the-site" />
+	</c:if>
+
+	<c:if test="<%= rge.getType() == RequiredGroupException.PARENT_GROUP %>">
+		<liferay-ui:message key="you-cannot-delete-sites-that-have-subsites" />
+	</c:if>
+
+	<c:if test="<%= rge.getType() == RequiredGroupException.SYSTEM_GROUP %>">
+		<liferay-ui:message key="the-site-cannot-be-deleted-or-deactivated-because-it-is-a-required-system-site" />
+	</c:if>
+</liferay-ui:error>
+
+<liferay-ui:error key="resetMergeFailCountAndMerge" message="unable-to-reset-the-failure-counter-and-propagate-the-changes" />
+
+<aui:fieldset>
+	<c:choose>
+		<c:when test="<%= ((liveGroup != null) && (liveGroup.isCompany() || PortalUtil.isSystemGroup(liveGroup.getName()))) %>">
+			<aui:input name="name" type="hidden" />
+		</c:when>
+		<c:when test="<%= (liveGroup != null) && liveGroup.isOrganization() %>">
+			<aui:field-wrapper helpMessage="the-name-of-this-site-cannot-be-edited-because-it-belongs-to-an-organization" label="name">
+				<liferay-ui:input-resource url="<%= liveGroup.getDescriptiveName(locale) %>" />
+			</aui:field-wrapper>
+		</c:when>
+		<c:otherwise>
+			<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" name="name" />
+		</c:otherwise>
+	</c:choose>
+
+	<aui:input name="description" />
+
+	<c:if test="<%= liveGroup != null %>">
+		<aui:field-wrapper label="site-id">
+			<liferay-ui:input-resource url="<%= String.valueOf(liveGroup.getGroupId()) %>" />
+		</aui:field-wrapper>
+	</c:if>
+
+	<c:if test="<%= (group == null) || !group.isCompany() %>">
+		<aui:input name="active" value="<%= true %>" />
+	</c:if>
+
+	<h3><liferay-ui:message key="membership-options" /></h3>
+
+	<c:if test="<%= (group == null) || !group.isCompany() %>">
+		<aui:select label="membership-type" name="type">
+			<aui:option label="open" value="<%= GroupConstants.TYPE_SITE_OPEN %>" />
+			<aui:option label="restricted" value="<%= GroupConstants.TYPE_SITE_RESTRICTED %>" />
+			<aui:option label="private" value="<%= GroupConstants.TYPE_SITE_PRIVATE %>" />
+		</aui:select>
+
+		<%
+		boolean manualMembership = true;
+
+		if (liveGroup != null) {
+			manualMembership = GetterUtil.getBoolean(liveGroup.isManualMembership(), true);
+		}
+		%>
+
+		<aui:input label="allow-manual-membership-management" name="manualMembership" value="<%= manualMembership %>" />
+	</c:if>
+</aui:fieldset>
+
+<%
+boolean disableLayoutSetPrototypeInput = false;
+
+if ((group != null) && !LanguageUtil.isInheritLocales(group.getGroupId())) {
+	disableLayoutSetPrototypeInput = true;
+}
+
+boolean hasUnlinkLayoutSetPrototypePermission = PortalPermissionUtil.contains(permissionChecker, ActionKeys.UNLINK_LAYOUT_SET_PROTOTYPE);
+%>
+
+<c:if test="<%= (group == null) || !group.isCompany() %>">
+	<aui:fieldset>
+		<c:choose>
+			<c:when test="<%= showPrototypes && ((group != null) || (!layoutSetPrototypes.isEmpty() && (layoutSetPrototype == null))) %>">
+				<h3><liferay-ui:message key="pages" /></h3>
+
+				<liferay-ui:panel-container extended="<%= false %>">
+					<liferay-ui:panel collapsible="<%= true %>" defaultState='<%= ((group != null) && (group.getPublicLayoutsPageCount() > 0)) ? "open" : "closed" %>' title="public-pages">
+						<c:choose>
+							<c:when test="<%= ((group == null) || ((publicLayoutSetPrototype == null) && (group.getPublicLayoutsPageCount() == 0))) && !layoutSetPrototypes.isEmpty() %>">
+								<c:if test="<%= disableLayoutSetPrototypeInput %>">
+									<div class="alert alert-info">
+										<liferay-ui:message key="you-cannot-apply-a-site-template-because-you-modified-the-display-settings-of-this-site" />
+									</div>
+								</c:if>
+
+								<aui:select disabled="<%= disableLayoutSetPrototypeInput %>" helpMessage="site-templates-with-an-incompatible-application-adapter-are-disabled" label="site-template" name="publicLayoutSetPrototypeId">
+									<aui:option label="none" selected="<%= true %>" value="" />
+
+									<%
+									for (LayoutSetPrototype curLayoutSetPrototype : layoutSetPrototypes) {
+										UnicodeProperties settingsProperties = curLayoutSetPrototype.getSettingsProperties();
+
+										String servletContextName = settingsProperties.getProperty("customJspServletContextName", StringPool.BLANK);
+									%>
+
+										<aui:option data-servletContextName="<%= servletContextName %>" value="<%= curLayoutSetPrototype.getLayoutSetPrototypeId() %>"><%= HtmlUtil.escape(curLayoutSetPrototype.getName(user.getLanguageId())) %></aui:option>
+
+									<%
+									}
+									%>
+
+								</aui:select>
+
+								<c:choose>
+									<c:when test="<%= hasUnlinkLayoutSetPrototypePermission %>">
+										<div class="hide" id="<portlet:namespace />publicLayoutSetPrototypeIdOptions">
+											<c:if test="<%= disableLayoutSetPrototypeInput %>">
+												<div class="alert alert-info">
+													<liferay-ui:message key="you-cannot-enable-the-propagation-of-changes-because-you-modified-the-display-settings-of-this-site" />
+												</div>
+											</c:if>
+
+											<aui:input disabled="<%= disableLayoutSetPrototypeInput %>" helpMessage="enable-propagation-of-changes-from-the-site-template-help" label="enable-propagation-of-changes-from-the-site-template" name="publicLayoutSetPrototypeLinkEnabled" type="checkbox" value="<%= publicLayoutSetPrototypeLinkEnabled %>" />
+										</div>
+									</c:when>
+									<c:otherwise>
+										<aui:input name="publicLayoutSetPrototypeLinkEnabled" type="hidden" value="<%= true %>" />
+									</c:otherwise>
+								</c:choose>
+							</c:when>
+							<c:otherwise>
+								<c:choose>
+									<c:when test="<%= group != null %>">
+										<liferay-portlet:actionURL portletName="<%= PortletKeys.SITE_REDIRECTOR %>" var="publicPagesURL">
+											<portlet:param name="struts_action" value="/my_sites/view" />
+											<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+											<portlet:param name="privateLayout" value="<%= Boolean.FALSE.toString() %>" />
+										</liferay-portlet:actionURL>
+
+										<c:choose>
+											<c:when test="<%= group.getPublicLayoutsPageCount() > 0 %>">
+												<liferay-ui:icon
+													image="view"
+													label="<%= true %>"
+													message="open-public-pages"
+													method="get"
+													target="_blank"
+													url="<%= publicPagesURL.toString() %>"
+												/>
+											</c:when>
+											<c:otherwise>
+												<liferay-ui:message key="this-site-does-not-have-any-public-pages" />
+											</c:otherwise>
+										</c:choose>
+
+										<c:choose>
+											<c:when test="<%= (publicLayoutSetPrototype != null) && !liveGroup.isStaged() && hasUnlinkLayoutSetPrototypePermission %>">
+												<c:if test="<%= disableLayoutSetPrototypeInput %>">
+													<div class="alert alert-info">
+														<liferay-ui:message key="you-cannot-enable-the-propagation-of-changes-because-you-modified-the-display-settings-of-this-site" />
+													</div>
+												</c:if>
+
+												<aui:input disabled="<%= disableLayoutSetPrototypeInput %>" label='<%= LanguageUtil.format(pageContext, "enable-propagation-of-changes-from-the-site-template-x", HtmlUtil.escape(publicLayoutSetPrototype.getName(user.getLanguageId()))) %>' name="publicLayoutSetPrototypeLinkEnabled" type="checkbox" value="<%= publicLayoutSetPrototypeLinkEnabled %>" />
+
+												<div class='<%= publicLayoutSetPrototypeLinkEnabled ? "" : "hide" %>' id="<portlet:namespace/>publicLayoutSetPrototypeMergeAlert">
+
+													<%
+													request.setAttribute("edit_layout_set_prototype.jsp-groupId", String.valueOf(group.getGroupId()));
+													request.setAttribute("edit_layout_set_prototype.jsp-layoutSet", publicLayoutSet);
+													request.setAttribute("edit_layout_set_prototype.jsp-layoutSetPrototype", publicLayoutSetPrototype);
+													request.setAttribute("edit_layout_set_prototype.jsp-redirect", currentURL);
+													%>
+
+													<liferay-util:include page="/html/portlet/layout_set_prototypes/merge_alert.jsp" />
+												</div>
+											</c:when>
+											<c:when test="<%= publicLayoutSetPrototype != null %>">
+												<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(publicLayoutSetPrototype.getName(locale))} %>" key="these-pages-are-linked-to-site-template-x" />
+
+												<aui:input name="publicLayoutSetPrototypeLinkEnabled" type="hidden" value="<%= publicLayoutSetPrototypeLinkEnabled %>" />
+											</c:when>
+										</c:choose>
+									</c:when>
+								</c:choose>
+							</c:otherwise>
+						</c:choose>
+					</liferay-ui:panel>
+					<liferay-ui:panel collapsible="<%= true %>" defaultState='<%= ((group != null) && (group.getPrivateLayoutsPageCount() > 0)) ? "open" : "closed" %>' title="private-pages">
+						<c:choose>
+							<c:when test="<%= ((group == null) || ((privateLayoutSetPrototype == null) && (group.getPrivateLayoutsPageCount() == 0))) && !layoutSetPrototypes.isEmpty() %>">
+								<c:if test="<%= disableLayoutSetPrototypeInput %>">
+									<div class="alert alert-info">
+										<liferay-ui:message key="you-cannot-apply-a-site-template-because-you-modified-the-display-settings-of-this-site" />
+									</div>
+								</c:if>
+
+								<aui:select disabled="<%= disableLayoutSetPrototypeInput %>" helpMessage="site-templates-with-an-incompatible-application-adapter-are-disabled" label="site-template" name="privateLayoutSetPrototypeId">
+									<aui:option label="none" selected="<%= true %>" value="" />
+
+									<%
+									for (LayoutSetPrototype curLayoutSetPrototype : layoutSetPrototypes) {
+										UnicodeProperties settingsProperties = curLayoutSetPrototype.getSettingsProperties();
+
+										String servletContextName = settingsProperties.getProperty("customJspServletContextName", StringPool.BLANK);
+									%>
+
+										<aui:option data-servletContextName="<%= servletContextName %>" value="<%= curLayoutSetPrototype.getLayoutSetPrototypeId() %>"><%= HtmlUtil.escape(curLayoutSetPrototype.getName(user.getLanguageId())) %></aui:option>
+
+									<%
+									}
+									%>
+
+								</aui:select>
+
+								<c:choose>
+									<c:when test="<%= hasUnlinkLayoutSetPrototypePermission %>">
+										<div class="hide" id="<portlet:namespace />privateLayoutSetPrototypeIdOptions">
+											<c:if test="<%= disableLayoutSetPrototypeInput %>">
+												<div class="alert alert-info">
+													<liferay-ui:message key="you-cannot-enable-the-propagation-of-changes-because-you-modified-the-display-settings-of-this-site" />
+												</div>
+											</c:if>
+
+											<aui:input disabled="<%= disableLayoutSetPrototypeInput %>" helpMessage="enable-propagation-of-changes-from-the-site-template-help" label="enable-propagation-of-changes-from-the-site-template" name="privateLayoutSetPrototypeLinkEnabled" type="checkbox" value="<%= privateLayoutSetPrototypeLinkEnabled %>" />
+										</div>
+									</c:when>
+									<c:otherwise>
+										<aui:input name="privateLayoutSetPrototypeLinkEnabled" type="hidden" value="<%= true %>" />
+									</c:otherwise>
+								</c:choose>
+							</c:when>
+							<c:otherwise>
+								<c:choose>
+									<c:when test="<%= group != null %>">
+										<liferay-portlet:actionURL portletName="<%= PortletKeys.SITE_REDIRECTOR %>" var="privatePagesURL">
+											<portlet:param name="struts_action" value="/my_sites/view" />
+											<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+											<portlet:param name="privateLayout" value="<%= Boolean.TRUE.toString() %>" />
+										</liferay-portlet:actionURL>
+
+										<c:choose>
+											<c:when test="<%= group.getPrivateLayoutsPageCount() > 0 %>">
+												<liferay-ui:icon
+													image="view"
+													label="<%= true %>"
+													message="open-private-pages"
+													method="get"
+													target="_blank"
+													url="<%= privatePagesURL.toString() %>"
+												/>
+											</c:when>
+											<c:otherwise>
+												<liferay-ui:message key="this-site-does-not-have-any-private-pages" />
+											</c:otherwise>
+										</c:choose>
+
+										<c:choose>
+											<c:when test="<%= (privateLayoutSetPrototype != null) && !liveGroup.isStaged() && hasUnlinkLayoutSetPrototypePermission %>">
+												<c:if test="<%= disableLayoutSetPrototypeInput %>">
+													<div class="alert alert-info">
+														<liferay-ui:message key="you-cannot-enable-the-propagation-of-changes-because-you-modified-the-display-settings-of-this-site" />
+													</div>
+												</c:if>
+
+												<aui:input disabled="<%= disableLayoutSetPrototypeInput %>" label='<%= LanguageUtil.format(pageContext, "enable-propagation-of-changes-from-the-site-template-x", HtmlUtil.escape(privateLayoutSetPrototype.getName(user.getLanguageId()))) %>' name="privateLayoutSetPrototypeLinkEnabled" type="checkbox" value="<%= privateLayoutSetPrototypeLinkEnabled %>" />
+
+												<div class='<%= privateLayoutSetPrototypeLinkEnabled ? "" : "hide" %>' id="<portlet:namespace/>privateLayoutSetPrototypeMergeAlert">
+
+													<%
+													request.setAttribute("edit_layout_set_prototype.jsp-groupId", String.valueOf(group.getGroupId()));
+													request.setAttribute("edit_layout_set_prototype.jsp-layoutSet", privateLayoutSet);
+													request.setAttribute("edit_layout_set_prototype.jsp-layoutSetPrototype", privateLayoutSetPrototype);
+													request.setAttribute("edit_layout_set_prototype.jsp-redirect", currentURL);
+													%>
+
+													<liferay-util:include page="/html/portlet/layout_set_prototypes/merge_alert.jsp" />
+												</div>
+											</c:when>
+											<c:when test="<%= privateLayoutSetPrototype != null %>">
+												<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(privateLayoutSetPrototype.getName(locale))} %>" key="these-pages-are-linked-to-site-template-x" />
+
+												<aui:input name="privateLayoutSetPrototypeLinkEnabled" type="hidden" value="<%= privateLayoutSetPrototypeLinkEnabled %>" />
+											</c:when>
+										</c:choose>
+									</c:when>
+								</c:choose>
+							</c:otherwise>
+						</c:choose>
+					</liferay-ui:panel>
+				</liferay-ui:panel-container>
+
+				<%
+				Set<String> servletContextNames = CustomJspRegistryUtil.getServletContextNames();
+				%>
+
+				<c:if test="<%= servletContextNames.size() > 0 %>">
+					<aui:fieldset label="configuration">
+
+						<%
+						String customJspServletContextName = StringPool.BLANK;
+
+						if (typeSettingsProperties != null) {
+							customJspServletContextName = GetterUtil.getString(typeSettingsProperties.get("customJspServletContextName"));
+						}
+						%>
+
+						<aui:select helpMessage='<%= LanguageUtil.format(pageContext, "application-adapter-help", "http://www.liferay.com/community/wiki/-/wiki/Main/Application+Adapters") %>' label="application-adapter" name="customJspServletContextName">
+							<aui:option label="none" value="" />
+
+							<%
+							for (String servletContextName : servletContextNames) {
+							%>
+
+								<aui:option selected="<%= customJspServletContextName.equals(servletContextName) %>" value="<%= servletContextName %>"><%= CustomJspRegistryUtil.getDisplayName(servletContextName) %></aui:option>
+
+							<%
+							}
+							%>
+
+						</aui:select>
+					</aui:fieldset>
+				</c:if>
+			</c:when>
+			<c:when test="<%= layoutSetPrototype != null %>">
+				<aui:fieldset label="pages">
+					<aui:input name="layoutSetPrototypeId" type="hidden" value="<%= layoutSetPrototype.getLayoutSetPrototypeId() %>" />
+
+					<aui:field-wrapper label="copy-as">
+						<aui:input checked="<%= true %>" helpMessage='<%= LanguageUtil.format(pageContext, "select-this-to-copy-the-pages-of-the-site-template-x-as-public-pages-for-this-site", HtmlUtil.escape(layoutSetPrototype.getName(user.getLanguageId()))) %>' label="public-pages" name="layoutSetVisibility" type="radio" value="0" />
+						<aui:input helpMessage='<%= LanguageUtil.format(pageContext, "select-this-to-copy-the-pages-of-the-site-template-x-as-private-pages-for-this-site", HtmlUtil.escape(layoutSetPrototype.getName(user.getLanguageId()))) %>' label="private-pages" name="layoutSetVisibility" type="radio" value="1" />
+					</aui:field-wrapper>
+
+					<c:choose>
+						<c:when test="<%= hasUnlinkLayoutSetPrototypePermission %>">
+							<aui:input helpMessage="enable-propagation-of-changes-from-the-site-template-help" label="enable-propagation-of-changes-from-the-site-template" name="layoutSetPrototypeLinkEnabled" type="checkbox" value="<%= true %>" />
+						</c:when>
+						<c:otherwise>
+							<aui:input name="layoutSetPrototypeLinkEnabled" type="hidden" value="<%= true %>" />
+						</c:otherwise>
+					</c:choose>
+				</aui:fieldset>
+			</c:when>
+		</c:choose>
+	</aui:fieldset>
+
+	<%
+	long parentGroupId = ParamUtil.getLong(request, "parentGroupSearchContainerPrimaryKeys", (group != null) ? group.getParentGroupId() : GroupConstants.DEFAULT_PARENT_GROUP_ID);
+
+	if (parentGroupId <= 0) {
+		parentGroupId = GroupConstants.DEFAULT_PARENT_GROUP_ID;
+
+		if (group != null) {
+			parentGroupId = liveGroup.getParentGroupId();
+		}
+	}
+
+	Group parentGroup = null;
+
+	if ((group == null) && (parentGroupId == GroupConstants.DEFAULT_PARENT_GROUP_ID) && !permissionChecker.isCompanyAdmin()) {
+		List<Group> manageableGroups = new ArrayList<Group>();
+
+		for (Group curGroup : user.getGroups()) {
+			if (GroupPermissionUtil.contains(permissionChecker, curGroup.getGroupId(), ActionKeys.MANAGE_SUBGROUPS)) {
+				manageableGroups.add(curGroup);
+			}
+		}
+
+		if (manageableGroups.size() == 1) {
+			Group manageableGroup = manageableGroups.get(0);
+
+			parentGroupId = manageableGroup.getGroupId();
+		}
+	}
+
+	if (parentGroupId != GroupConstants.DEFAULT_PARENT_GROUP_ID) {
+		try {
+			parentGroup = GroupLocalServiceUtil.getGroup(parentGroupId);
+		}
+		catch (NoSuchGroupException nsoe) {
+		}
+	}
+
+	List<Group> parentGroups = new ArrayList<Group>();
+
+	if (parentGroup != null) {
+		parentGroups.add(parentGroup);
+	}
+	%>
+
+	<liferay-util:buffer var="removeGroupIcon">
+		<liferay-ui:icon
+			image="unlink"
+			label="<%= true %>"
+			message="remove"
+		/>
+	</liferay-util:buffer>
+
+	<h3><liferay-ui:message key="parent-site" /></h3>
+
+	<liferay-ui:search-container
+		headerNames="name,type,null"
+		id="parentGroupSearchContainer"
+	>
+		<liferay-ui:search-container-results
+			results="<%= parentGroups %>"
+			total="<%= parentGroups.size() %>"
+		/>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.model.Group"
+			escapedModel="<%= true %>"
+			keyProperty="groupId"
+			modelVar="curGroup"
+		>
+			<portlet:renderURL var="rowURL">
+				<portlet:param name="struts_action" value="/sites_admin/edit_site" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="groupId" value="<%= String.valueOf(curGroup.getGroupId()) %>" />
+			</portlet:renderURL>
+
+			<liferay-ui:search-container-column-text
+				href="<%= rowURL %>"
+				name="name"
+				value="<%= HtmlUtil.escape(curGroup.getDescriptiveName(locale)) %>"
+			/>
+
+			<liferay-ui:search-container-column-text
+				name="type"
+				value="<%= LanguageUtil.get(pageContext, curGroup.getTypeLabel()) %>"
+			/>
+
+			<liferay-ui:search-container-column-text>
+				<a class="modify-link" data-rowId="<%= curGroup.getGroupId() %>" href="javascript:;"><%= removeGroupIcon %></a>
+			</liferay-ui:search-container-column-text>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator paginate="<%= false %>" />
+	</liferay-ui:search-container>
+
+	<liferay-ui:icon
+		cssClass="modify-link"
+		iconCssClass="icon-search"
+		id="selectParentSiteLink"
+		label="<%= true %>"
+		linkCssClass="btn"
+		message="select"
+		url="javascript:;"
+	/>
+
+	<br />
+
+	<div class="<%= parentGroups.isEmpty() ? "membership-restriction-container hide" : "membership-restriction-container" %>" id="<portlet:namespace />membershipRestrictionContainer">
+
+		<%
+		boolean membershipRestriction = false;
+
+		if ((liveGroup != null) && (liveGroup.getMembershipRestriction() == GroupConstants.MEMBERSHIP_RESTRICTION_TO_PARENT_SITE_MEMBERS)) {
+			membershipRestriction = true;
+		}
+		%>
+
+		<aui:input label="limit-membership-to-members-of-the-parent-site" name="membershipRestriction" type="checkbox" value="<%= membershipRestriction %>" />
+
+		<%
+		boolean breadcrumbShowParentGroups = PropsValues.BREADCRUMB_SHOW_PARENT_GROUPS;
+
+		if (typeSettingsProperties != null) {
+			breadcrumbShowParentGroups = PropertiesParamUtil.getBoolean(typeSettingsProperties, request, "breadcrumbShowParentGroups", breadcrumbShowParentGroups);
+		}
+		%>
+
+		<aui:input label="show-parent-sites-in-the-breadcrumb" name="TypeSettingsProperties--breadcrumbShowParentGroups--" type="checkbox" value="<%= breadcrumbShowParentGroups %>" />
+	</div>
+
+	<portlet:renderURL var="groupSelectorURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+		<portlet:param name="struts_action" value="/sites_admin/select_site" />
+		<portlet:param name="groupId" value='<%= (group != null) ? String.valueOf(group.getGroupId()) : "0" %>' />
+	</portlet:renderURL>
+
+	<aui:script>
+		function <portlet:namespace />isVisible(currentValue, value) {
+			return currentValue != '';
+		}
+
+		Liferay.Util.toggleSelectBox('<portlet:namespace />publicLayoutSetPrototypeId', <portlet:namespace />isVisible, '<portlet:namespace />publicLayoutSetPrototypeIdOptions');
+		Liferay.Util.toggleSelectBox('<portlet:namespace />privateLayoutSetPrototypeId', <portlet:namespace />isVisible, '<portlet:namespace />privateLayoutSetPrototypeIdOptions');
+
+		Liferay.Util.toggleBoxes('<portlet:namespace />publicLayoutSetPrototypeLinkEnabledCheckbox','<portlet:namespace />publicLayoutSetPrototypeMergeAlert');
+		Liferay.Util.toggleBoxes('<portlet:namespace />privateLayoutSetPrototypeLinkEnabledCheckbox','<portlet:namespace />privateLayoutSetPrototypeMergeAlert');
+	</aui:script>
+
+	<aui:script use="escape,liferay-search-container">
+		var createURL = function(href, value, onclick) {
+			return '<a href="' + href + '"' + (onclick ? ' onclick="' + onclick + '" ' : '') + '>' + value + '</a>';
+		};
+
+		A.one('#<portlet:namespace />selectParentSiteLink').on(
+			'click',
+			function(event) {
+				Liferay.Util.selectEntity(
+					{
+						dialog: {
+							constrain: true,
+							modal: true,
+							width: 600
+						},
+						id: '<portlet:namespace />selectGroup',
+						title: '<liferay-ui:message arguments="site" key="select-x" />',
+						uri: '<%= groupSelectorURL.toString() %>'
+					},
+					function(event) {
+						var searchContainer = Liferay.SearchContainer.get('<portlet:namespace />parentGroupSearchContainer');
+
+						var rowColumns = [];
+
+						var href = "<portlet:renderURL><portlet:param name="struts_action" value="/sites_admin/edit_site" /><portlet:param name="redirect" value="<%= currentURL %>" /></portlet:renderURL>&<portlet:namespace />groupId=" + event.groupid;
+
+						rowColumns.push(createURL(href, A.Escape.html(event.groupdescriptivename)));
+						rowColumns.push(event.grouptype);
+						rowColumns.push('<a class="modify-link" data-rowId="' + event.groupid + '" href="javascript:;"><%= UnicodeFormatter.toString(removeGroupIcon) %></a>');
+
+						searchContainer.deleteRow(1, searchContainer.getData());
+						searchContainer.addRow(rowColumns, event.groupid);
+						searchContainer.updateDataStore(event.groupid);
+
+						var membershipRestrictionContainer = A.one('#<portlet:namespace />membershipRestrictionContainer');
+
+						membershipRestrictionContainer.show();
+					}
+				);
+			}
+		);
+
+		var searchContainer = Liferay.SearchContainer.get('<portlet:namespace />parentGroupSearchContainer');
+
+		searchContainer.get('contentBox').delegate(
+			'click',
+			function(event) {
+				var link = event.currentTarget;
+
+				var tr = link.ancestor('tr');
+
+				searchContainer.deleteRow(tr, link.getAttribute('data-rowId'));
+
+				var membershipRestrictionContainer = A.one('#<portlet:namespace />membershipRestrictionContainer');
+
+				membershipRestrictionContainer.hide();
+			},
+			'.modify-link'
+		);
+	</aui:script>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/display_settings.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/display_settings.jsp
new file mode 100644
index 0000000..507627c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/display_settings.jsp
@@ -0,0 +1,173 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+Group liveGroup = (Group)request.getAttribute("site.liveGroup");
+%>
+
+<liferay-ui:error-marker key="errorSection" value="displaySettings" />
+
+<h3><liferay-ui:message key="display-settings" /></h3>
+
+<h3><liferay-ui:message key="language" /></h3>
+
+<%
+UnicodeProperties typeSettingsProperties = null;
+
+if (liveGroup != null) {
+	typeSettingsProperties = liveGroup.getTypeSettingsProperties();
+}
+else {
+	typeSettingsProperties = new UnicodeProperties();
+}
+
+boolean inheritLocales = GetterUtil.getBoolean(typeSettingsProperties.getProperty("inheritLocales"), true);
+
+LayoutSet publicLayoutSet = liveGroup.getPublicLayoutSet();
+LayoutSet privateLayoutSet = liveGroup.getPrivateLayoutSet();
+
+boolean disabledLocaleInput = false;
+
+if (publicLayoutSet.isLayoutSetPrototypeLinkEnabled() || privateLayoutSet.isLayoutSetPrototypeLinkEnabled()) {
+	disabledLocaleInput = true;
+}
+%>
+
+<aui:input checked="<%= inheritLocales %>" disabled="<%= disabledLocaleInput %>" id="inheritLocales" label="use-the-default-language-options" name="TypeSettingsProperties--inheritLocales--" type="radio" value="<%= true %>" />
+
+<aui:input checked="<%= !inheritLocales %>" disabled="<%= disabledLocaleInput %>" id="customLocales" label="define-a-custom-default-language-and-additional-available-languages-for-this-site" name="TypeSettingsProperties--inheritLocales--" type="radio" value="<%= false %>" />
+
+<aui:fieldset id="customLocalesFieldset">
+	<aui:fieldset cssClass="default-language" label="default-language">
+
+		<%
+		User user2 = company.getDefaultUser();
+
+		Locale defaultLocale = user2.getLocale();
+		%>
+
+		<%= defaultLocale.getDisplayName(locale) %>
+	</aui:fieldset>
+
+	<aui:fieldset cssClass="available-languages" label="available-languages">
+
+		<%
+		for (Locale availableLocale : LanguageUtil.getAvailableLocales()) {
+		%>
+
+			<%= availableLocale.getDisplayName(locale) %>,
+
+		<%
+		}
+		%>
+
+	</aui:fieldset>
+</aui:fieldset>
+
+<aui:fieldset id="inheritLocalesFieldset">
+	<liferay-ui:error exception="<%= LocaleException.class %>">
+
+		<%
+		LocaleException le = (LocaleException)errorException;
+		%>
+
+		<c:choose>
+			<c:when test="<%= le.getType() == LocaleException.TYPE_DEFAULT %>">
+				<liferay-ui:message arguments="<%= StringUtil.merge(LocaleUtil.toDisplayNames(le.getTargetAvailableLocales(), locale), StringPool.COMMA_AND_SPACE) %>" key="please-select-a-default-language-among-the-available-languages-of-the-site-x" />
+			</c:when>
+			<c:when test="<%= le.getType() == LocaleException.TYPE_DISPLAY_SETTINGS %>">
+				<liferay-ui:message arguments="<%= StringUtil.merge(LocaleUtil.toDisplayNames(le.getSourceAvailableLocales(), locale), StringPool.COMMA_AND_SPACE) %>" key="please-select-the-available-languages-of-the-site-among-the-available-languages-of-the-portal-x" />
+			</c:when>
+		</c:choose>
+	</liferay-ui:error>
+
+	<%
+	Locale[] siteAvailableLocales = LanguageUtil.getAvailableLocales(liveGroup.getGroupId());
+	%>
+
+	<aui:fieldset cssClass="default-language" label="default-language">
+		<aui:select disabled="<%= disabledLocaleInput %>"  label="" name="TypeSettingsProperties--languageId--">
+
+			<%
+			Locale siteDefaultLocale = PortalUtil.getSiteDefaultLocale(liveGroup.getGroupId());
+
+			for (Locale siteAvailableLocale : siteAvailableLocales) {
+			%>
+
+				<aui:option label="<%= siteAvailableLocale.getDisplayName(locale) %>" lang="<%= LocaleUtil.toW3cLanguageId(siteAvailableLocale) %>" selected="<%= (siteDefaultLocale.getLanguage().equals(siteAvailableLocale.getLanguage()) && siteDefaultLocale.getCountry().equals(siteAvailableLocale.getCountry())) %>" value="<%= LocaleUtil.toLanguageId(siteAvailableLocale) %>" />
+
+			<%
+			}
+			%>
+
+		</aui:select>
+	</aui:fieldset>
+
+	<aui:fieldset cssClass="available-languages" label="available-languages">
+		<aui:input name='<%= "TypeSettingsProperties--" + PropsKeys.LOCALES + "--" %>' type="hidden" value="<%= StringUtil.merge(LocaleUtil.toLanguageIds(siteAvailableLocales)) %>" />
+
+		<%
+
+		// Left list
+
+		List leftList = new ArrayList();
+
+		for (Locale siteAvailableLocale : siteAvailableLocales) {
+			leftList.add(new KeyValuePair(LocaleUtil.toLanguageId(siteAvailableLocale), siteAvailableLocale.getDisplayName(locale)));
+		}
+
+		// Right list
+
+		List rightList = new ArrayList();
+
+		for (Locale availableLocale : LanguageUtil.getAvailableLocales()) {
+			if (!ArrayUtil.contains(siteAvailableLocales, availableLocale)) {
+				rightList.add(new KeyValuePair(LocaleUtil.toLanguageId(availableLocale), availableLocale.getDisplayName(locale)));
+			}
+		}
+
+		rightList = ListUtil.sort(rightList, new KeyValuePairComparator(false, true));
+		%>
+
+		<liferay-ui:input-move-boxes
+			leftBoxName="currentLanguageIds"
+			leftList="<%= leftList %>"
+			leftReorder="true"
+			leftTitle="current"
+			rightBoxName="availableLanguageIds"
+			rightList="<%= rightList %>"
+			rightTitle="available"
+		/>
+	</aui:fieldset>
+</aui:fieldset>
+
+<aui:script use="liferay-util-list-fields">
+	Liferay.provide(
+		window,
+		'<portlet:namespace />saveLocales',
+		function() {
+			document.<portlet:namespace />fm.<portlet:namespace /><%= PropsKeys.LOCALES %>.value = Liferay.Util.listSelect(document.<portlet:namespace />fm.<portlet:namespace />currentLanguageIds);
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
+
+<aui:script>
+	Liferay.Util.toggleRadio('<portlet:namespace />customLocales', '<portlet:namespace />inheritLocalesFieldset', '<portlet:namespace />customLocalesFieldset');
+	Liferay.Util.toggleRadio('<portlet:namespace />inheritLocales', '<portlet:namespace />customLocalesFieldset', '<portlet:namespace />inheritLocalesFieldset');
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/recycle_bin.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/recycle_bin.jsp
new file mode 100644
index 0000000..02ece37
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/recycle_bin.jsp
@@ -0,0 +1,78 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/portal_settings/init.jsp" %>
+
+<%
+Group liveGroup = (Group)request.getAttribute("site.liveGroup");
+
+UnicodeProperties groupTypeSettings = null;
+
+if (liveGroup != null) {
+	groupTypeSettings = liveGroup.getTypeSettingsProperties();
+}
+else {
+	groupTypeSettings = new UnicodeProperties();
+}
+
+boolean groupTrashEnabled = PropertiesParamUtil.getBoolean(groupTypeSettings, request, "trashEnabled", true);
+
+double trashEntriesMaxAge = PropertiesParamUtil.getInteger(groupTypeSettings, request, "trashEntriesMaxAge", PrefsPropsUtil.getInteger(company.getCompanyId(), PropsKeys.TRASH_ENTRIES_MAX_AGE)) / 1440.0;
+%>
+
+<h3><liferay-ui:message key="recycle-bin" /></h3>
+
+<aui:fieldset>
+	<aui:input id="trashEnabled" label="enable-recycle-bin" name="trashEnabled" type="checkbox" value="<%= groupTrashEnabled %>" />
+
+	<div class="trash-entries-max-age">
+		<aui:input disabled="<%= !groupTrashEnabled %>" helpMessage="trash-entries-max-age-help" label="trash-entries-max-age" name="trashEntriesMaxAge" type="text" value="<%= (trashEntriesMaxAge % 1 == 0) ? GetterUtil.getInteger(trashEntriesMaxAge) : String.valueOf(trashEntriesMaxAge) %>">
+			<aui:validator name="min"><%= PropsValues.TRASH_ENTRY_CHECK_INTERVAL / 1440.0 %></aui:validator>
+		</aui:input>
+	</div>
+
+</aui:fieldset>
+
+<aui:script use="aui-base">
+	var trashEnabledCheckbox = A.one('#<portlet:namespace />trashEnabledCheckbox');
+
+	var trashEnabledDefault = trashEnabledCheckbox.attr('checked');
+
+	trashEnabledCheckbox.on(
+		'change',
+		function(event) {
+			var currentTarget = event.currentTarget;
+
+			var trashEnabled = currentTarget.attr('checked');
+
+			if (!trashEnabled && trashEnabledDefault) {
+				if (!confirm('<%= HtmlUtil.escapeJS(LanguageUtil.get(pageContext, "disabling-the-recycle-bin-will-prevent-the-restoring-of-content-that-has-been-moved-to-the-recycle-bin")) %>')) {
+					currentTarget.attr('checked', true);
+
+					trashEnabled = true;
+				}
+			}
+
+			var trashEntriesMaxAge = A.one('#<portlet:namespace />trashEntriesMaxAge');
+
+			if (trashEntriesMaxAge) {
+				trashEntriesMaxAge.attr('disabled', !trashEnabled);
+
+				trashEntriesMaxAge.ancestor('.field').toggleClass('field-disabled', !trashEnabled);
+			}
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/robots.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/robots.jsp
new file mode 100644
index 0000000..6cd11cd
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/robots.jsp
@@ -0,0 +1,73 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+Long liveGroupId = (Long)request.getAttribute("site.liveGroupId");
+
+LayoutSet publicLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(liveGroupId, false);
+
+String publicVirtualHostName = publicLayoutSet.getVirtualHostname();
+
+if (Validator.isNull(publicVirtualHostName) && Validator.isNotNull(PropsValues.VIRTUAL_HOSTS_DEFAULT_SITE_NAME) ) {
+	Group defaultGroup = GroupLocalServiceUtil.getGroup(company.getCompanyId(), PropsValues.VIRTUAL_HOSTS_DEFAULT_SITE_NAME);
+
+	if (publicLayoutSet.getGroupId() == defaultGroup.getGroupId()) {
+		publicVirtualHostName = company.getVirtualHostname();
+	}
+}
+
+String defaultPublicRobots = RobotsUtil.getRobots(publicLayoutSet);
+
+String publicRobots = ParamUtil.getString(request, "robots", defaultPublicRobots);
+
+LayoutSet privateLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(liveGroupId, true);
+
+String defaultPrivateRobots = RobotsUtil.getRobots(privateLayoutSet);
+
+String privateRobots = ParamUtil.getString(request, "robots", defaultPrivateRobots);
+%>
+
+<liferay-ui:error-marker key="errorSection" value="robots" />
+
+<h3><liferay-ui:message key="robots" /></h3>
+
+<aui:fieldset label="public-pages">
+	<c:choose>
+		<c:when test="<%= Validator.isNotNull(publicVirtualHostName) %>">
+			<aui:input cols="60" name="publicRobots" rows="15" type="textarea" value="<%= publicRobots %>" />
+		</c:when>
+		<c:otherwise>
+			<div class="alert alert-info">
+				<liferay-ui:message key="please-set-the-virtual-host-before-you-set-the-robots-txt" />
+			</div>
+		</c:otherwise>
+	</c:choose>
+</aui:fieldset>
+
+<aui:fieldset label="private-pages">
+	<c:choose>
+		<c:when test="<%= Validator.isNotNull(privateLayoutSet.getVirtualHostname()) %>">
+			<aui:input cols="60" name="privateRobots" rows="15" type="textarea" value="<%= privateRobots %>" />
+		</c:when>
+		<c:otherwise>
+			<div class="alert alert-info">
+				<liferay-ui:message key="please-set-the-virtual-host-before-you-set-the-robots-txt" />
+			</div>
+		</c:otherwise>
+	</c:choose>
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/site_template.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/site_template.jsp
new file mode 100644
index 0000000..08637d4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/site_template.jsp
@@ -0,0 +1,102 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+Group group = (Group)request.getAttribute("site.group");
+
+LayoutSet privateLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(group.getGroupId(), true);
+LayoutSet publicLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(group.getGroupId(), false);
+
+LayoutSetPrototype privateLayoutSetPrototype = null;
+
+boolean privateLayoutSetPrototypeLinkEnabled = false;
+
+LayoutSetPrototype publicLayoutSetPrototype = null;
+
+boolean publicLayoutSetPrototypeLinkEnabled = false;
+
+if (Validator.isNotNull(privateLayoutSet.getLayoutSetPrototypeUuid())) {
+	privateLayoutSetPrototype = LayoutSetPrototypeLocalServiceUtil.getLayoutSetPrototypeByUuidAndCompanyId(privateLayoutSet.getLayoutSetPrototypeUuid(), company.getCompanyId());
+
+	privateLayoutSetPrototypeLinkEnabled = privateLayoutSet.isLayoutSetPrototypeLinkEnabled();
+}
+
+if (Validator.isNotNull(publicLayoutSet.getLayoutSetPrototypeUuid())) {
+	publicLayoutSetPrototype = LayoutSetPrototypeLocalServiceUtil.getLayoutSetPrototypeByUuidAndCompanyId(publicLayoutSet.getLayoutSetPrototypeUuid(), company.getCompanyId());
+
+	publicLayoutSetPrototypeLinkEnabled = publicLayoutSet.isLayoutSetPrototypeLinkEnabled();
+}
+%>
+
+<liferay-ui:error-marker key="errorSection" value="siteTempate" />
+
+<h3><liferay-ui:message key="site-template" /></h3>
+
+<c:if test="<%= (publicLayoutSetPrototype == null) && (privateLayoutSetPrototype == null) %>">
+	<div class="alert alert-info">
+		<liferay-ui:message key="this-site-is-not-related-to-a-site-template" />
+	</div>
+</c:if>
+
+<aui:fieldset>
+	<c:if test="<%= publicLayoutSetPrototype != null %>">
+		<aui:fieldset label="public-site-template">
+			<c:choose>
+				<c:when test="<%= publicLayoutSetPrototypeLinkEnabled %>">
+
+					<%
+					boolean layoutsUpdateable = GetterUtil.getBoolean(publicLayoutSetPrototype.getSettingsProperty("layoutsUpdateable"), true);
+					%>
+
+					<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(publicLayoutSetPrototype.getName(locale))} %>" key="these-pages-are-linked-to-site-template-x" />
+
+					<aui:field-wrapper label="site-template-settings">
+						<aui:input disabled="<%= true %>" name="active" type="checkbox" value="<%= publicLayoutSetPrototype.isActive() %>" />
+						<aui:input disabled="<%= true %>" name="site-template-allows-modifications" type="checkbox" value="<%= layoutsUpdateable %>" />
+					</aui:field-wrapper>
+				</c:when>
+				<c:otherwise>
+					<liferay-ui:message arguments="<%= new Object[] {publicLayoutSetPrototype.getName(locale)} %>" key="this-site-was-cloned-from-site-template-x" />
+				</c:otherwise>
+			</c:choose>
+		</aui:fieldset>
+	</c:if>
+
+	<c:if test="<%= privateLayoutSetPrototype != null %>">
+		<aui:fieldset label="private-site-template">
+			<c:choose>
+				<c:when test="<%= privateLayoutSetPrototypeLinkEnabled %>">
+
+					<%
+					boolean layoutsUpdateable = GetterUtil.getBoolean(privateLayoutSetPrototype.getSettingsProperty("layoutsUpdateable"), true);
+					%>
+
+					<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(privateLayoutSetPrototype.getName(locale))} %>" key="these-pages-are-linked-to-site-template-x" />
+
+					<aui:field-wrapper label="site-template-settings">
+						<aui:input disabled="<%= true %>" name="active" type="checkbox" value="<%= privateLayoutSetPrototype.isActive() %>" />
+						<aui:input disabled="<%= true %>" name="site-template-allows-modifications" type="checkbox" value="<%= layoutsUpdateable %>" />
+					</aui:field-wrapper>
+				</c:when>
+				<c:otherwise>
+					<liferay-ui:message arguments="<%= new Object[] {privateLayoutSetPrototype.getName(locale)} %>" key="this-site-was-cloned-from-site-template-x" />
+				</c:otherwise>
+			</c:choose>
+		</aui:fieldset>
+	</c:if>
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/site_url.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/site_url.jsp
new file mode 100644
index 0000000..3ca057c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/site_url.jsp
@@ -0,0 +1,198 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+Group group = (Group)request.getAttribute("site.group");
+Group liveGroup = (Group)request.getAttribute("site.liveGroup");
+Long liveGroupId = (Long)request.getAttribute("site.liveGroupId");
+Group stagingGroup = (Group)request.getAttribute("site.stagingGroup");
+Long stagingGroupId = (Long)request.getAttribute("site.stagingGroupId");
+
+LayoutSet publicLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(liveGroupId, false);
+LayoutSet privateLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(liveGroupId, true);
+
+String publicVirtualHost = ParamUtil.getString(request, "publicVirtualHost", BeanParamUtil.getString(publicLayoutSet, request, "virtualHostname"));
+String privateVirtualHost = ParamUtil.getString(request, "privateVirtualHost", BeanParamUtil.getString(privateLayoutSet, request, "virtualHostname"));
+%>
+
+<liferay-ui:error-marker key="errorSection" value="siteUrl" />
+
+<h3><liferay-ui:message key="site-url" /></h3>
+
+<aui:model-context bean="<%= liveGroup %>" model="<%= Group.class %>" />
+
+<liferay-ui:error exception="<%= GroupFriendlyURLException.class %>">
+
+	<%
+	GroupFriendlyURLException gfurle = (GroupFriendlyURLException)errorException;
+	%>
+
+	<c:if test="<%= gfurle.getType() == GroupFriendlyURLException.ADJACENT_SLASHES %>">
+		<liferay-ui:message key="please-enter-a-friendly-url-that-does-not-have-adjacent-slashes" />
+	</c:if>
+
+	<c:if test="<%= gfurle.getType() == GroupFriendlyURLException.DOES_NOT_START_WITH_SLASH %>">
+		<liferay-ui:message key="please-enter-a-friendly-url-that-begins-with-a-slash" />
+	</c:if>
+
+	<c:if test="<%= gfurle.getType() == GroupFriendlyURLException.DUPLICATE %>">
+		<liferay-ui:message key="please-enter-a-unique-friendly-url" />
+	</c:if>
+
+	<c:if test="<%= gfurle.getType() == GroupFriendlyURLException.ENDS_WITH_SLASH %>">
+		<liferay-ui:message key="please-enter-a-friendly-url-that-does-not-end-with-a-slash" />
+	</c:if>
+
+	<c:if test="<%= gfurle.getType() == GroupFriendlyURLException.INVALID_CHARACTERS %>">
+		<liferay-ui:message key="please-enter-a-friendly-url-with-valid-characters" />
+	</c:if>
+
+	<c:if test="<%= gfurle.getType() == GroupFriendlyURLException.KEYWORD_CONFLICT %>">
+		<%= LanguageUtil.format(pageContext, "please-enter-a-friendly-url-that-does-not-conflict-with-the-keyword-x", gfurle.getKeywordConflict()) %>
+	</c:if>
+
+	<c:if test="<%= gfurle.getType() == GroupFriendlyURLException.POSSIBLE_DUPLICATE %>">
+		<liferay-ui:message key="the-friendly-url-may-conflict-with-another-page" />
+	</c:if>
+
+	<c:if test="<%= gfurle.getType() == GroupFriendlyURLException.TOO_DEEP %>">
+		<liferay-ui:message key="the-friendly-url-has-too-many-slashes" />
+	</c:if>
+
+	<c:if test="<%= gfurle.getType() == GroupFriendlyURLException.TOO_SHORT %>">
+		<liferay-ui:message key="please-enter-a-friendly-url-that-is-at-least-two-characters-long" />
+	</c:if>
+</liferay-ui:error>
+
+<liferay-ui:error exception="<%= LayoutSetVirtualHostException.class %>">
+	<liferay-ui:message key="please-enter-a-unique-virtual-host" />
+
+	<liferay-ui:message key="virtual-hosts-must-be-valid-domain-names" />
+</liferay-ui:error>
+
+<aui:fieldset label="friendly-url">
+	<liferay-ui:message key="enter-the-friendly-url-that-will-be-used-by-both-public-and-private-pages" />
+
+	<liferay-ui:message arguments="<%= new Object[] {themeDisplay.getPortalURL() + themeDisplay.getPathFriendlyURLPublic(), themeDisplay.getPortalURL() + themeDisplay.getPathFriendlyURLPrivateGroup()} %>" key="the-friendly-url-is-appended-to-x-for-public-pages-and-x-for-private-pages" />
+
+	<%
+	String taglibLabel = "site-friendly-url";
+
+	if (!liveGroup.hasStagingGroup()) {
+		taglibLabel = "<span class=\"hide-accessible\">" + LanguageUtil.get(pageContext, taglibLabel) + "</span>";
+	}
+	%>
+
+	<aui:input label="<%= taglibLabel %>" name="friendlyURL" />
+
+	<c:if test="<%= liveGroup.hasStagingGroup() %>">
+		<aui:input bean="<%= stagingGroup %>" field="friendlyURL" fieldParam="stagingFriendlyURL" label="staging-friendly-url" model="<%= Group.class %>" name="stagingFriendlyURL" />
+	</c:if>
+</aui:fieldset>
+
+<aui:fieldset label="virtual-hosts">
+	<liferay-ui:message key="enter-the-public-and-private-virtual-host-that-will-map-to-the-public-and-private-friendly-url" />
+
+	<liferay-ui:message arguments="<%= new Object[] {HttpUtil.getProtocol(request), themeDisplay.getPortalURL() + themeDisplay.getPathFriendlyURLPublic()} %>" key="for-example,-if-the-public-virtual-host-is-www.helloworld.com-and-the-friendly-url-is-/helloworld" />
+
+	<aui:input label="public-pages" name="publicVirtualHost" type="text" value="<%= publicVirtualHost %>" />
+
+	<aui:input label="private-pages" name="privateVirtualHost" type="text" value="<%= privateVirtualHost %>">
+		<aui:validator errorMessage="please-enter-a-unique-virtual-host" name="custom">
+			function(val, fieldNode, ruleValue) {
+				return (!val || val != A.one('#<portlet:namespace />publicVirtualHost').val());
+			}
+		</aui:validator>
+	</aui:input>
+
+	<c:if test="<%= liveGroup.hasStagingGroup() %>">
+
+		<%
+		LayoutSet stagingPublicLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(stagingGroupId, false);
+
+		String stagingPublicVirtualHost = ParamUtil.getString(request, "stagingPublicVirtualHost", stagingPublicLayoutSet.getVirtualHostname());
+		%>
+
+		<aui:input label="staging-public-pages" name="stagingPublicVirtualHost" type="text" value="<%= stagingPublicVirtualHost %>" />
+
+		<%
+		LayoutSet stagingPrivateLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(stagingGroupId, true);
+
+		String stagingPrivateVirtualHost = ParamUtil.getString(request, "stagingPrivateVirtualHost", stagingPrivateLayoutSet.getVirtualHostname());
+		%>
+
+		<aui:input label="staging-private-pages" name="stagingPrivateVirtualHost" type="text" value="<%= stagingPrivateVirtualHost %>">
+			<aui:validator errorMessage="please-enter-a-unique-virtual-host" name="custom">
+				function(val, fieldNode, ruleValue) {
+					return (!val || val != A.one('#<portlet:namespace />stagingPublicVirtualHost').val());
+				}
+			</aui:validator>
+		</aui:input>
+	</c:if>
+</aui:fieldset>
+
+<aui:fieldset label="documents-and-media">
+	<c:if test="<%= (group != null) && !group.isCompany() %>">
+
+		<%
+		UnicodeProperties typeSettingsProperties = null;
+
+		if (liveGroup != null) {
+			typeSettingsProperties = liveGroup.getTypeSettingsProperties();
+		}
+		else {
+			typeSettingsProperties = group.getTypeSettingsProperties();
+		}
+
+		boolean directoryIndexingEnabled = PropertiesParamUtil.getBoolean(typeSettingsProperties, request, "directoryIndexingEnabled");
+		%>
+
+		<aui:input helpMessage='<%= LanguageUtil.format(pageContext, "directory-indexing-help", new Object[] {HtmlUtil.escape(group.getDescriptiveName(themeDisplay.getLocale())), themeDisplay.getPortalURL() + "/documents" + group.getFriendlyURL()}) %>' label="directory-indexing-enabled" name="TypeSettingsProperties--directoryIndexingEnabled--" type="checkbox" value="<%= directoryIndexingEnabled %>" />
+	</c:if>
+</aui:fieldset>
+
+<aui:script use="aui-base">
+	var friendlyURL = A.one('#<portlet:namespace />friendlyURL');
+
+	friendlyURL.on(
+		['blur', 'change', 'focus'],
+		function(event) {
+			var value = A.Lang.trim(friendlyURL.val());
+
+			if (value == '/') {
+				value = '';
+			}
+			else {
+				value = value.replace(
+					/^[^\/]|\/$/g,
+					function(match, index) {
+						var str = '';
+
+						if (index == 0) {
+							str = '/' + match
+						}
+
+						return str;
+					}
+				);
+			}
+
+			friendlyURL.val(value);
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/sitemap.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/sitemap.jsp
new file mode 100644
index 0000000..3baea5e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/sitemap.jsp
@@ -0,0 +1,80 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+Group liveGroup = (Group)request.getAttribute("site.liveGroup");
+Long liveGroupId = (Long)request.getAttribute("site.liveGroupId");
+
+String host = PortalUtil.getHost(request);
+
+String sitemapUrl = PortalUtil.getPortalURL(host, request.getServerPort(), request.isSecure()) + themeDisplay.getPathContext() + "/sitemap.xml";
+
+String publicSitemapUrl = sitemapUrl;
+
+LayoutSet publicLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(liveGroupId, false);
+
+if (!host.equals(publicLayoutSet.getVirtualHostname())) {
+	publicSitemapUrl += "?groupId=" + liveGroup.getGroupId() + "&privateLayout=" + false;
+}
+
+String privateSitemapUrl = sitemapUrl;
+
+LayoutSet privateLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(liveGroupId, true);
+
+if (!host.equals(privateLayoutSet.getVirtualHostname())) {
+	privateSitemapUrl += "?groupId=" + liveGroup.getGroupId() + "&privateLayout=" + true;
+}
+%>
+
+<liferay-ui:error-marker key="errorSection" value="siteMap" />
+
+<h3><liferay-ui:message key="sitemap" /></h3>
+
+<liferay-util:buffer var="linkContent">
+	<aui:a href="http://www.sitemaps.org" target="_blank">http://www.sitemaps.org</aui:a>
+</liferay-util:buffer>
+
+<liferay-ui:message key="the-sitemap-protocol-notifies-search-engines-of-the-structure-of-the-website" /> <liferay-ui:message arguments="<%= linkContent %>" key="see-x-for-more-information" />
+
+<br /><br />
+
+<aui:fieldset label="public-pages">
+	<%= LanguageUtil.format(pageContext, "send-sitemap-information-to-preview", new Object[] {"<a target=\"_blank\" href=\"" + publicSitemapUrl + "\">", "</a>"}) %>
+
+	<ul>
+		<li>
+			<aui:a href='<%= "http://www.google.com/webmasters/sitemaps/ping?sitemap=" + HtmlUtil.escapeURL(publicSitemapUrl) %>' target="_blank">Google</aui:a>
+		</li>
+		<li>
+			<aui:a href='<%= "https://siteexplorer.search.yahoo.com/submit/ping?sitemap=" + HtmlUtil.escapeURL(publicSitemapUrl) %>' target="_blank">Yahoo!</aui:a> (<liferay-ui:message key="requires-login" />)
+		</li>
+	</ul>
+</aui:fieldset>
+
+<aui:fieldset label="private-pages">
+	<%= LanguageUtil.format(pageContext, "send-sitemap-information-to-preview", new Object[] {"<a target=\"_blank\" href=\"" + privateSitemapUrl + "\">", "</a>"}) %>
+
+	<ul>
+		<li>
+			<aui:a href='<%= "http://www.google.com/webmasters/sitemaps/ping?sitemap=" + HtmlUtil.escapeURL(privateSitemapUrl) %>' target="_blank">Google</aui:a>
+		</li>
+		<li>
+			<aui:a href='<%= "https://siteexplorer.search.yahoo.com/submit/ping?sitemap=" + HtmlUtil.escapeURL(privateSitemapUrl) %>' target="_blank">Yahoo!</aui:a> (<liferay-ui:message key="requires-login" />)
+		</li>
+	</ul>
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/staging.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/staging.jsp
new file mode 100644
index 0000000..6088e9a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site/staging.jsp
@@ -0,0 +1,256 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+Group liveGroup = (Group)request.getAttribute("site.liveGroup");
+long liveGroupId = ((Long)request.getAttribute("site.liveGroupId")).longValue();
+UnicodeProperties liveGroupTypeSettings = (UnicodeProperties)request.getAttribute("site.liveGroupTypeSettings");
+
+LayoutSet privateLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(liveGroup.getGroupId(), true);
+LayoutSet publicLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(liveGroup.getGroupId(), false);
+
+boolean stagedLocally = liveGroup.isStaged() && !liveGroup.isStagedRemotely();
+boolean stagedRemotely = liveGroup.isStaged() && !stagedLocally;
+
+Group stagingGroup = null;
+long stagingGroupId = 0;
+
+if (stagedLocally) {
+	stagingGroup = liveGroup.getStagingGroup();
+	stagingGroupId = stagingGroup.getGroupId();
+}
+
+BackgroundTask lastCompletedInitialPublicationBackgroundTask = BackgroundTaskLocalServiceUtil.fetchFirstBackgroundTask(liveGroupId, LayoutStagingBackgroundTaskExecutor.class.getName(), true, new BackgroundTaskCreateDateComparator(false));
+%>
+
+<h3><liferay-ui:message key="staging" /></h3>
+
+<c:if test="<%= (lastCompletedInitialPublicationBackgroundTask != null) && (lastCompletedInitialPublicationBackgroundTask.getStatus() == BackgroundTaskConstants.STATUS_FAILED) %>">
+	<div class="alert alert-error">
+		<liferay-ui:message key="an-unexpected-error-occurred--with-the-initial-staging-publication" />
+
+		<liferay-portlet:actionURL portletName="<%= PortletKeys.GROUP_PAGES %>" var="deleteBackgroundTaskURL">
+			<portlet:param name="struts_action" value="/group_pages/delete_background_task" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="backgroundTaskId" value="<%= String.valueOf(lastCompletedInitialPublicationBackgroundTask.getBackgroundTaskId()) %>" />
+		</liferay-portlet:actionURL>
+
+		<liferay-ui:icon-delete
+			confirmation="are-you-sure-you-want-to-remove-the-initial-staging-publication"
+			label="true"
+			message="clear"
+			url="<%= deleteBackgroundTaskURL %>"
+		/>
+	</div>
+
+	<liferay-util:include page="/html/portlet/layouts_admin/publish_process_message_task_details.jsp">
+		<liferay-util:param name="backgroundTaskId" value="<%= String.valueOf(lastCompletedInitialPublicationBackgroundTask.getBackgroundTaskId()) %>" />
+	</liferay-util:include>
+</c:if>
+
+<c:if test="<%= stagedLocally && (BackgroundTaskLocalServiceUtil.getBackgroundTasksCount(liveGroupId, LayoutStagingBackgroundTaskExecutor.class.getName(), false) > 0) %>">
+	<liferay-portlet:renderURL portletName="<%= PortletKeys.LAYOUTS_ADMIN %>" var="publishProcessesURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+		<portlet:param name="<%= Constants.CMD %>" value="view_processes" />
+		<portlet:param name="struts_action" value="/layouts_admin/publish_layouts" />
+		<portlet:param name="<%= SearchContainer.DEFAULT_CUR_PARAM %>" value="<%= ParamUtil.getString(request, SearchContainer.DEFAULT_CUR_PARAM) %>" />
+		<portlet:param name="<%= SearchContainer.DEFAULT_DELTA_PARAM %>" value="<%= ParamUtil.getString(request, SearchContainer.DEFAULT_DELTA_PARAM) %>" />
+		<portlet:param name="groupId" value="<%= String.valueOf(stagingGroupId) %>" />
+		<portlet:param name="liveGroupId" value="<%= String.valueOf(liveGroupId) %>" />
+		<portlet:param name="localPublishing" value="<%= String.valueOf(stagedLocally) %>" />
+	</liferay-portlet:renderURL>
+
+	<div class="alert alert-block">
+		<liferay-ui:message key="an-inital-staging-publication-is-in-progress" />
+
+		<a id="<portlet:namespace />publishProcessesLink"><liferay-ui:message key="the-status-of-the-publication-can-be-checked-on-the-publish-screen" /></a>
+	</div>
+
+	<aui:script use="aui-base">
+		var publishProcessesLink = A.one('#<portlet:namespace />publishProcessesLink');
+
+		publishProcessesLink.on(
+			'click',
+			function(event) {
+				Liferay.Util.openWindow(
+					{
+						id: 'publishProcesses',
+						title: Liferay.Language.get('initial-publication'),
+						uri: '<%= HtmlUtil.escapeJS(publishProcessesURL.toString()) %>'
+					}
+				);
+			}
+		);
+	</aui:script>
+</c:if>
+
+<liferay-ui:error-marker key="errorSection" value="staging" />
+
+<c:choose>
+	<c:when test="<%= privateLayoutSet.isLayoutSetPrototypeLinkActive() || publicLayoutSet.isLayoutSetPrototypeLinkActive() %>">
+		<div class="alert alert-info">
+			<liferay-ui:message key="staging-cannot-be-used-for-this-site-because-the-propagation-of-changes-from-the-site-template-is-enabled" />
+			<c:choose>
+				<c:when test="<%= PortalPermissionUtil.contains(permissionChecker, ActionKeys.UNLINK_LAYOUT_SET_PROTOTYPE) %>">
+					<liferay-ui:message key="change-the-configuration-in-the-details-section" />
+				</c:when>
+				<c:otherwise>
+					<liferay-ui:message key="contact-your-administrator-to-change-the-configuration" />
+				</c:otherwise>
+			</c:choose>
+		</div>
+	</c:when>
+	<c:when test="<%= GroupPermissionUtil.contains(permissionChecker, liveGroupId, ActionKeys.MANAGE_STAGING) %>">
+
+		<liferay-ui:error exception="<%= LocaleException.class %>">
+
+			<%
+			LocaleException le = (LocaleException)errorException;
+			%>
+
+			<c:if test="<%= le.getType() == LocaleException.TYPE_EXPORT_IMPORT %>">
+				<liferay-ui:message arguments="<%= new String[] {StringUtil.merge(le.getSourceAvailableLocales(), StringPool.COMMA_AND_SPACE), StringUtil.merge(le.getTargetAvailableLocales(), StringPool.COMMA_AND_SPACE)} %>" key="the-default-language-x-does-not-match-the-portal's-available-languages-x" />
+			</c:if>
+		</liferay-ui:error>
+
+		<liferay-ui:error exception="<%= SystemException.class %>">
+
+			<%
+			SystemException se = (SystemException)errorException;
+			%>
+
+			<liferay-ui:message key="<%= se.getMessage() %>" />
+		</liferay-ui:error>
+
+		<div class="staging-types" id="<portlet:namespace />stagingTypes">
+			<aui:field-wrapper label="staging-type">
+				<aui:input checked="<%= !liveGroup.isStaged() %>" id="none" label="none" name="stagingType" type="radio" value="<%= StagingConstants.TYPE_NOT_STAGED %>" />
+
+				<aui:input checked="<%= stagedLocally %>" helpMessage="staging-type-local" id="local" label="local-live" name="stagingType" type="radio" value="<%= StagingConstants.TYPE_LOCAL_STAGING %>" />
+
+				<aui:input checked="<%= stagedRemotely %>" helpMessage="staging-type-remote" id="remote" label="remote-live" name="stagingType" type="radio" value="<%= StagingConstants.TYPE_REMOTE_STAGING %>" />
+			</aui:field-wrapper>
+		</div>
+
+		<%
+		boolean showRemoteOptions = stagedRemotely;
+
+		int stagingType = ParamUtil.getInteger(request, "stagingType");
+
+		if (stagingType == StagingConstants.TYPE_REMOTE_STAGING) {
+			showRemoteOptions = true;
+		}
+		%>
+
+		<div class="<%= showRemoteOptions ? StringPool.BLANK : "hide" %> staging-section" id="<portlet:namespace />remoteStagingOptions">
+			<br />
+
+			<%@ include file="/html/portlet/layouts_admin/error_auth_exception.jspf" %>
+
+			<%@ include file="/html/portlet/layouts_admin/error_remote_export_exception.jspf" %>
+
+			<aui:fieldset label="remote-live-connection-settings">
+				<%@ include file="/html/portlet/layouts_admin/error_remote_options_exception.jspf" %>
+
+				<div class="alert alert-info">
+					<liferay-ui:message key="remote-publish-help" />
+				</div>
+
+				<aui:input label="remote-host-ip" name="remoteAddress" size="20" type="text" value='<%= liveGroupTypeSettings.getProperty("remoteAddress") %>' />
+
+				<aui:input label="remote-port" name="remotePort" size="10" type="text" value='<%= liveGroupTypeSettings.getProperty("remotePort") %>' />
+
+				<aui:input label="remote-path-context" name="remotePathContext" size="10" type="text" value='<%= liveGroupTypeSettings.getProperty("remotePathContext") %>' />
+
+				<aui:input label='<%= LanguageUtil.get(pageContext, "remote-site-id" ) %>' name="remoteGroupId" size="10" type="text" value='<%= liveGroupTypeSettings.getProperty("remoteGroupId") %>' />
+
+				<aui:input label="use-a-secure-network-connection" name="secureConnection" type="checkbox" value='<%= liveGroupTypeSettings.getProperty("secureConnection") %>' />
+			</aui:fieldset>
+		</div>
+
+		<div class="<%= ((liveGroup.isStaged() || (stagingType != StagingConstants.TYPE_NOT_STAGED)) ? StringPool.BLANK : "hide") %> staging-section" id="<portlet:namespace />stagedPortlets">
+			<br />
+
+			<c:if test="<%= !liveGroup.isCompany() %>">
+				<aui:fieldset helpMessage="page-versioning-help" label="page-versioning">
+					<aui:input label="enabled-on-public-pages" name="branchingPublic" type="checkbox" value='<%= GetterUtil.getBoolean(liveGroupTypeSettings.getProperty("branchingPublic")) %>' />
+
+					<aui:input label="enabled-on-private-pages" name="branchingPrivate" type="checkbox" value='<%= GetterUtil.getBoolean(liveGroupTypeSettings.getProperty("branchingPrivate")) %>' />
+				</aui:fieldset>
+			</c:if>
+
+			<aui:fieldset helpMessage="staged-portlets-help" label="staged-content">
+				<div class="alert alert-block">
+					<liferay-ui:message key="staged-portlets-alert" />
+				</div>
+
+				<%
+				Set<String> portletDataHandlerClasses = new HashSet<String>();
+
+				List<Portlet> dataSiteLevelPortlets = LayoutExporter.getDataSiteLevelPortlets(company.getCompanyId());
+
+				dataSiteLevelPortlets = ListUtil.sort(dataSiteLevelPortlets, new PortletTitleComparator(application, locale));
+
+				for (Portlet curPortlet : dataSiteLevelPortlets) {
+					String portletDataHandlerClass = curPortlet.getPortletDataHandlerClass();
+
+					if (!portletDataHandlerClasses.contains(portletDataHandlerClass)) {
+						portletDataHandlerClasses.add(portletDataHandlerClass);
+					}
+					else {
+						continue;
+					}
+
+					PortletDataHandler portletDataHandler = curPortlet.getPortletDataHandlerInstance();
+
+					boolean staged = GetterUtil.getBoolean(liveGroupTypeSettings.getProperty(StagingUtil.getStagedPortletId(curPortlet.getRootPortletId())), portletDataHandler.isPublishToLiveByDefault());
+				%>
+
+					<aui:input label="<%= PortalUtil.getPortletTitle(curPortlet, application, locale) %>" name="<%= StagingUtil.getStagedPortletId(curPortlet.getRootPortletId()) %>" type="checkbox" value="<%= staged %>" />
+
+				<%
+				}
+				%>
+
+			</aui:fieldset>
+		</div>
+
+		<aui:script use="aui-base">
+			var remoteStagingOptions = A.one('#<portlet:namespace />remoteStagingOptions');
+			var stagedPortlets = A.one('#<portlet:namespace />stagedPortlets');
+
+			var stagingTypes = A.one('#<portlet:namespace />stagingTypes');
+
+			stagingTypes.delegate(
+				'click',
+				function(event) {
+					var value = event.currentTarget.val();
+
+					stagedPortlets.toggle(value != '<%= StagingConstants.TYPE_NOT_STAGED %>');
+
+					remoteStagingOptions.toggle(value == '<%= StagingConstants.TYPE_REMOTE_STAGING %>');
+				},
+				'input'
+			);
+		</aui:script>
+	</c:when>
+	<c:otherwise>
+		<div class="alert alert-info">
+			<liferay-ui:message key="you-do-not-have-permission-to-manage-settings-related-to-staging" />
+		</div>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site_action.jsp
new file mode 100644
index 0000000..6267e80
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site_action.jsp
@@ -0,0 +1,225 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+Group group = null;
+
+boolean organizationUser = false;
+boolean userGroupUser = false;
+
+if (row != null) {
+	group = (Group)row.getObject();
+
+	organizationUser = GetterUtil.getBoolean(row.getParameter("organizationUser"));
+	userGroupUser = GetterUtil.getBoolean(row.getParameter("userGroupUser"));
+}
+else {
+	group = (Group)request.getAttribute("view_tree.jspf-site");
+
+	GroupSearchTerms searchTerms = (GroupSearchTerms)request.getAttribute("view_tree.jspf-searchTerms");
+
+	organizationUser = SitesUtil.isOrganizationUser(company.getCompanyId(), group, user, new ArrayList<String>());
+	userGroupUser = SitesUtil.isUserGroupUser(company.getCompanyId(), group, user, new ArrayList<String>());
+}
+
+boolean hasUpdatePermission = GroupPermissionUtil.contains(permissionChecker, group.getGroupId(), ActionKeys.UPDATE);
+
+boolean view = false;
+
+if (row == null) {
+	view = true;
+}
+%>
+
+<liferay-ui:icon-menu showExpanded="<%= view %>" showWhenSingleIcon="<%= true %>">
+
+	<%
+	ThemeDisplay siteThemeDisplay = (ThemeDisplay)themeDisplay.clone();
+
+	siteThemeDisplay.setScopeGroupId(group.getGroupId());
+
+	PortletURL siteAdministrationURL = PortalUtil.getSiteAdministrationURL(renderResponse, siteThemeDisplay);
+	%>
+
+	<c:if test="<%= siteAdministrationURL != null %>">
+		<liferay-ui:icon
+			image="configuration"
+			message="site-administration"
+			method="get"
+			url="<%= siteAdministrationURL.toString() %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= hasUpdatePermission %>">
+
+		<%
+		int childSitesCount = GroupLocalServiceUtil.getGroupsCount(company.getCompanyId(), group.getGroupId(), true);
+		%>
+
+		<c:if test="<%= (childSitesCount > 0) && (row != null) %>">
+			<liferay-portlet:renderURL var="viewSubsitesURL">
+				<portlet:param name="struts_action" value="/sites_admin/view" />
+				<portlet:param name="backURL" value="<%= StringPool.SLASH + currentURL %>" />
+				<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+				<portlet:param name="sitesListView" value="<%= SiteConstants.LIST_VIEW_TREE %>" />
+			</liferay-portlet:renderURL>
+
+			<liferay-ui:icon
+				image="view"
+				message="view-child-sites"
+				url="<%= viewSubsitesURL %>"
+			/>
+		</c:if>
+
+		<c:if test="<%= !group.isCompany() && (PortalPermissionUtil.contains(permissionChecker, ActionKeys.ADD_COMMUNITY) || GroupPermissionUtil.contains(permissionChecker, group.getGroupId(), ActionKeys.ADD_COMMUNITY)) %>">
+			<liferay-portlet:renderURL varImpl="addSiteURL">
+				<portlet:param name="struts_action" value="/sites_admin/edit_site" />
+				<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ADD %>" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="parentGroupSearchContainerPrimaryKeys" value="<%= String.valueOf(group.getGroupId()) %>" />
+				<portlet:param name="showPrototypes" value="<%= Boolean.TRUE.toString() %>" />
+			</liferay-portlet:renderURL>
+
+			<liferay-ui:icon
+				image="site_icon"
+				message="add-child-site"
+				method="get"
+				url="<%= addSiteURL.toString() %>"
+			/>
+		</c:if>
+	</c:if>
+
+	<c:if test="<%= group.isCompany() && hasUpdatePermission %>">
+		<liferay-portlet:renderURL portletName="<%= PortletKeys.LAYOUTS_ADMIN %>" var="exportURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+			<portlet:param name="struts_action" value="/layouts_admin/export_layouts" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.EXPORT %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+			<portlet:param name="rootNodeName" value="<%= group.getDescriptiveName(locale) %>" />
+		</liferay-portlet:renderURL>
+
+		<%
+		String taglibExportURL = "javascript:Liferay.Util.openWindow({id: '" + renderResponse.getNamespace() + "exportDialog', title: '" + UnicodeLanguageUtil.get(pageContext, "export") + "', uri: '" + HtmlUtil.escapeURL(exportURL.toString()) + "'});";
+		%>
+
+		<liferay-ui:icon
+			image="export"
+			message="export"
+			url="<%= taglibExportURL %>"
+		/>
+
+		<liferay-portlet:renderURL portletName="<%= PortletKeys.LAYOUTS_ADMIN %>" var="importURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+			<portlet:param name="struts_action" value="/layouts_admin/import_layouts" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.VALIDATE %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+			<portlet:param name="rootNodeName" value="<%= group.getDescriptiveName(locale) %>" />
+		</liferay-portlet:renderURL>
+
+		<%
+		String taglibImportURL = "javascript:Liferay.Util.openWindow({id: '" + renderResponse.getNamespace() + "importDialog', title: '" + UnicodeLanguageUtil.get(pageContext, "import") + "', uri: '" + HtmlUtil.escapeURL(importURL.toString()) + "'});";
+		%>
+
+		<liferay-ui:icon
+			image="download"
+			message="import"
+			url="<%= taglibImportURL %>"
+		/>
+
+		<liferay-ui:staging extended="<%= true %>" groupId="<%= group.getGroupId() %>" onlyActions="<%= true %>" showManageBranches="<%= false %>" />
+	</c:if>
+
+	<c:if test="<%= group.getPublicLayoutsPageCount() > 0 %>">
+		<portlet:actionURL var="viewPublicPagesURL">
+			<portlet:param name="struts_action" value="/sites_admin/page" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+			<portlet:param name="privateLayout" value="<%= Boolean.FALSE.toString() %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon
+			image="view"
+			message="go-to-public-pages"
+			target="_blank"
+			url="<%= viewPublicPagesURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= group.getPrivateLayoutsPageCount() > 0 %>">
+		<portlet:actionURL var="viewPrivatePagesURL">
+			<portlet:param name="struts_action" value="/sites_admin/page" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+			<portlet:param name="privateLayout" value="<%= Boolean.TRUE.toString() %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon
+			image="view"
+			message="go-to-private-pages"
+			target="_blank"
+			url="<%= viewPrivatePagesURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= !group.isCompany() && (!(organizationUser || userGroupUser) && ((group.getType() == GroupConstants.TYPE_SITE_OPEN) || (group.getType() == GroupConstants.TYPE_SITE_RESTRICTED)) && GroupLocalServiceUtil.hasUserGroup(user.getUserId(), group.getGroupId())) && !SiteMembershipPolicyUtil.isMembershipRequired(user.getUserId(), group.getGroupId()) %>">
+		<portlet:actionURL var="leaveURL">
+			<portlet:param name="struts_action" value="/sites_admin/edit_site_assignments" />
+			<portlet:param name="<%= Constants.CMD %>" value="group_users" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+			<portlet:param name="removeUserIds" value="<%= String.valueOf(user.getUserId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon
+			image="leave"
+			url="<%= leaveURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= !group.isCompany() && hasUpdatePermission %>">
+		<portlet:actionURL var="activateURL">
+			<portlet:param name="struts_action" value="/sites_admin/edit_site" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= group.isActive() ? Constants.DEACTIVATE : Constants.RESTORE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+		</portlet:actionURL>
+
+		<c:choose>
+			<c:when test="<%= group.isActive() %>">
+				<liferay-ui:icon-deactivate url="<%= activateURL %>" />
+			</c:when>
+			<c:otherwise>
+				<liferay-ui:icon
+					image="activate"
+					url="<%= activateURL %>"
+				/>
+			</c:otherwise>
+		</c:choose>
+	</c:if>
+
+	<c:if test="<%= !group.isCompany() && GroupPermissionUtil.contains(permissionChecker, group.getGroupId(), ActionKeys.DELETE) && !PortalUtil.isSystemGroup(group.getName()) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/sites_admin/edit_site" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete url="<%= deleteURL %>" />
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site_columns.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site_columns.jspf
new file mode 100644
index 0000000..363879b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/site_columns.jspf
@@ -0,0 +1,186 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:search-container-column-text
+	buffer="buffer"
+	href="<%= rowURL %>"
+	name="name"
+	orderable="<%= true %>"
+>
+
+	<%
+	if (curGroup.isOrganization()) {
+		Organization organization = OrganizationLocalServiceUtil.getOrganization(curGroup.getOrganizationId());
+
+		buffer.append("<img align=\"left\" alt=\"");
+		buffer.append(LanguageUtil.format(pageContext, "belongs-to-an-organization-of-type-x", LanguageUtil.get(pageContext, organization.getType())));
+		buffer.append("\" border=\"0\" style=\"margin: 0px 5px 0px 0px;\" src=\"");
+		buffer.append(curGroup.getIconURL(themeDisplay));
+		buffer.append("\" title=\"");
+		buffer.append(LanguageUtil.format(pageContext, "belongs-to-an-organization-of-type-x", LanguageUtil.get(pageContext, organization.getType())));
+		buffer.append("\">");
+	}
+	else {
+		buffer.append("<img align=\"left\" border=\"0\" style=\"margin: 0px 5px 0px 0px;\" src=\"");
+		buffer.append(curGroup.getIconURL(themeDisplay));
+		buffer.append("\">");
+	}
+
+	buffer.append(HtmlUtil.escape(curGroup.getDescriptiveName(locale)));
+
+	List<String> names = new ArrayList<String>();
+
+	boolean organizationUser = SitesUtil.isOrganizationUser(company.getCompanyId(), curGroup, user, names);
+
+	row.setParameter("organizationUser", organizationUser);
+
+	boolean userGroupUser = SitesUtil.isUserGroupUser(company.getCompanyId(), curGroup, user, names);
+
+	row.setParameter("userGroupUser", userGroupUser);
+
+	String message = StringPool.BLANK;
+
+	if (organizationUser || userGroupUser) {
+		if (names.size() == 1) {
+			message = LanguageUtil.format(pageContext, "you-are-a-member-of-x-because-you-belong-to-x", new Object[] {HtmlUtil.escape(curGroup.getDescriptiveName(locale)), names.get(0)});
+		}
+		else {
+			message = LanguageUtil.format(pageContext, "you-are-a-member-of-x-because-you-belong-to-x-and-x", new Object[] {HtmlUtil.escape(curGroup.getDescriptiveName(locale)), StringUtil.merge(names.subList(0, names.size() - 1).toArray(new String[names.size() - 1]), ", "), names.get(names.size() - 1)});
+		}
+	%>
+
+		<liferay-util:buffer var="iconHelp">
+			<liferay-ui:icon-help message="<%= message %>" />
+		</liferay-util:buffer>
+
+	<%
+		buffer.append(iconHelp);
+	}
+
+	if (GroupPermissionUtil.contains(permissionChecker, curGroup.getGroupId(), ActionKeys.VIEW)) {
+		List<Group> childSites = GroupServiceUtil.getGroups(company.getCompanyId(), curGroup.getGroupId(), true);
+
+		if (!childSites.isEmpty()) {
+	%>
+
+			<liferay-portlet:renderURL var="viewSubsitesURL">
+				<portlet:param name="struts_action" value="/sites_admin/view" />
+				<portlet:param name="backURL" value="<%= StringPool.SLASH + currentURL %>" />
+				<portlet:param name="groupId" value="<%= String.valueOf(curGroup.getGroupId()) %>" />
+				<portlet:param name="sitesListView" value="<%= SiteConstants.LIST_VIEW_TREE %>" />
+			</liferay-portlet:renderURL>
+
+	<%
+			buffer.append("<div class=\"subsites-count\"><a href=\"");
+			buffer.append(viewSubsitesURL.toString());
+			buffer.append("\">");
+			buffer.append(LanguageUtil.format(pageContext, childSites.size() == 1 ? "this-site-has-x-child-site" : "this-site-has-x-child-sites", String.valueOf(childSites.size())));
+			buffer.append("</a></div>");
+		}
+	}
+	%>
+
+</liferay-ui:search-container-column-text>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="type"
+	value="<%= LanguageUtil.get(pageContext, curGroup.getTypeLabel()) %>"
+/>
+
+<liferay-ui:search-container-column-text
+	buffer="buffer"
+	name="members"
+>
+
+	<%
+	LinkedHashMap<String, Object> userParams = new LinkedHashMap<String, Object>();
+
+	userParams.put("inherit", Boolean.TRUE);
+	userParams.put("usersGroups", new Long(curGroup.getGroupId()));
+
+	int usersCount = UserLocalServiceUtil.searchCount(company.getCompanyId(), null, WorkflowConstants.STATUS_APPROVED, userParams);
+
+	if (usersCount > 0) {
+		buffer.append("<div class=\"user-count\">");
+		buffer.append(LanguageUtil.format(pageContext, usersCount > 1 ? "x-users" : "x-user", usersCount));
+		buffer.append("</div>");
+	}
+
+	LinkedHashMap<String, Object> organizationParams = new LinkedHashMap<String, Object>();
+
+	organizationParams.put("groupOrganization", new Long(curGroup.getGroupId()));
+	organizationParams.put("organizationsGroups", new Long(curGroup.getGroupId()));
+
+	int organizationsCount = OrganizationLocalServiceUtil.searchCount(company.getCompanyId(), OrganizationConstants.ANY_PARENT_ORGANIZATION_ID, searchTerms.getKeywords(), null, null, null, organizationParams);
+
+	if (organizationsCount > 0) {
+		buffer.append("<div class=\"organization-count\">");
+		buffer.append(LanguageUtil.format(pageContext, organizationsCount > 1 ? "x-organizations" : "x-organization", organizationsCount));
+		buffer.append("</div>");
+	}
+
+	LinkedHashMap<String, Object> userGroupParams = new LinkedHashMap<String, Object>();
+
+	userGroupParams.put("userGroupsGroups", new Long(curGroup.getGroupId()));
+
+	int userGroupsCount = UserGroupLocalServiceUtil.searchCount(company.getCompanyId(), null, userGroupParams);
+
+	if (userGroupsCount > 0) {
+		buffer.append("<div class=\"user-group-count\">");
+		buffer.append(LanguageUtil.format(pageContext, userGroupsCount > 1 ? "x-user-groups" : "x-user-group", userGroupsCount));
+		buffer.append("</div>");
+	}
+
+	if (buffer.length() == 0) {
+		buffer.append("0");
+	}
+	%>
+
+</liferay-ui:search-container-column-text>
+
+<c:if test="<%= PropsValues.LIVE_USERS_ENABLED %>">
+	<liferay-ui:search-container-column-text
+		name="online-now"
+		value="<%= String.valueOf(LiveUsers.getGroupUsersCount(company.getCompanyId(), curGroup.getGroupId())) %>"
+	/>
+</c:if>
+
+<liferay-ui:search-container-column-text
+	name="active"
+	value='<%= LanguageUtil.get(pageContext, (curGroup.isActive() ? "yes" : "no")) %>'
+/>
+
+<c:if test="<%= permissionChecker.isGroupAdmin(themeDisplay.getScopeGroupId()) %>">
+	<liferay-ui:search-container-column-text
+		name="pending-requests"
+		value="<%= (curGroup.getType() == GroupConstants.TYPE_SITE_RESTRICTED) ? String.valueOf(MembershipRequestLocalServiceUtil.searchCount(curGroup.getGroupId(), MembershipRequestConstants.STATUS_PENDING)) : StringPool.BLANK %>"
+	/>
+</c:if>
+
+<liferay-ui:search-container-column-text
+	name="tags"
+>
+	<liferay-ui:asset-tags-summary
+		className="<%= Group.class.getName() %>"
+		classPK="<%= curGroup.getGroupId() %>"
+	/>
+</liferay-ui:search-container-column-text>
+
+<liferay-ui:search-container-column-jsp
+	align="right"
+	path="/html/portlet/sites_admin/site_action.jsp"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/team_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/team_action.jsp
new file mode 100644
index 0000000..6793d68
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/team_action.jsp
@@ -0,0 +1,96 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+Team team = (Team)row.getObject();
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= TeamPermissionUtil.contains(permissionChecker, team.getTeamId(), ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/sites_admin/edit_team" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="teamId" value="<%= String.valueOf(team.getTeamId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= TeamPermissionUtil.contains(permissionChecker, team.getTeamId(), ActionKeys.PERMISSIONS) %>">
+
+		<%
+		Role role = team.getRole();
+
+		int[] roleTypes = {RoleConstants.TYPE_REGULAR, RoleConstants.TYPE_SITE};
+
+		Group group = GroupServiceUtil.getGroup(team.getGroupId());
+
+		if (group.isOrganization()) {
+			roleTypes = ArrayUtil.append(roleTypes, RoleConstants.TYPE_ORGANIZATION);
+		}
+		%>
+
+		<liferay-security:permissionsURL
+			modelResource="<%= Role.class.getName() %>"
+			modelResourceDescription="<%= team.getName() %>"
+			resourcePrimKey="<%= String.valueOf(role.getRoleId()) %>"
+			roleTypes="<%= roleTypes %>"
+			var="permissionsURL"
+			windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			method="get"
+			url="<%= permissionsURL %>"
+			useDialog="<%= true %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= TeamPermissionUtil.contains(permissionChecker, team.getTeamId(), ActionKeys.ASSIGN_MEMBERS) %>">
+		<portlet:renderURL var="assignMembersURL">
+			<portlet:param name="struts_action" value="/sites_admin/edit_team_assignments" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="teamId" value="<%= String.valueOf(team.getTeamId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="assign"
+			message="assign-members"
+			url="<%= assignMembersURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= TeamPermissionUtil.contains(permissionChecker, team.getTeamId(), ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/sites_admin/edit_team" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="teamId" value="<%= String.valueOf(team.getTeamId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete
+			url="<%= deleteURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/toolbar.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/toolbar.jspf
new file mode 100644
index 0000000..d725782
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/toolbar.jspf
@@ -0,0 +1,23 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<aui:nav-bar>
+	<aui:nav>
+		<%@ include file="/html/portlet/sites_admin/toolbar_content.jspf" %>
+	</aui:nav>
+
+	<aui:nav-bar-search cssClass="pull-right" file="/html/portlet/users_admin/group_search.jsp" searchContainer="<%= searchContainer %>" />
+</aui:nav-bar>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/toolbar_content.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/toolbar_content.jspf
new file mode 100644
index 0000000..c597904
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/toolbar_content.jspf
@@ -0,0 +1,78 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<c:if test="<%= PortalPermissionUtil.contains(permissionChecker, ActionKeys.ADD_COMMUNITY) %>">
+
+	<%
+	List<LayoutSetPrototype> layoutSetPrototypes = LayoutSetPrototypeServiceUtil.search(company.getCompanyId(), Boolean.TRUE, null);
+	%>
+
+	<portlet:renderURL var="viewSitesURL">
+		<portlet:param name="struts_action" value="/sites_admin/view" />
+		<portlet:param name="sitesListView" value="<%= sitesListView %>" />
+	</portlet:renderURL>
+
+	<liferay-portlet:renderURL varImpl="addSiteURL">
+		<portlet:param name="struts_action" value="/sites_admin/edit_site" />
+		<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ADD %>" />
+		<portlet:param name="redirect" value="<%= viewSitesURL %>" />
+	</liferay-portlet:renderURL>
+
+	<%
+	boolean hasAddLayoutSetPrototypePermission = PortalPermissionUtil.contains(permissionChecker, ActionKeys.ADD_LAYOUT_SET_PROTOTYPE);
+	%>
+
+	<c:choose>
+		<c:when test="<%= layoutSetPrototypes.isEmpty() && !hasAddLayoutSetPrototypePermission %>">
+			<aui:nav-item href="<%= addSiteURL %>" iconCssClass="icon-plus" label="add" selected='<%= toolbarItem.equals("add") %>' />
+		</c:when>
+		<c:otherwise>
+			<aui:nav-item dropdown="<%= true %>" iconCssClass="icon-plus" label="add" selected='<%= toolbarItem.equals("add") %>'>
+
+				<%
+				addSiteURL.setParameter("showPrototypes", "0");
+				%>
+
+				<aui:nav-item href="<%= addSiteURL.toString() %>" label="blank-site" />
+
+				<%
+				addSiteURL.setParameter("showPrototypes", "1");
+
+				for (LayoutSetPrototype layoutSetPrototype : layoutSetPrototypes) {
+					addSiteURL.setParameter("layoutSetPrototypeId", String.valueOf(layoutSetPrototype.getLayoutSetPrototypeId()));
+				%>
+
+					<aui:nav-item href="<%= addSiteURL.toString() %>" label="<%= HtmlUtil.escape(layoutSetPrototype.getName(locale)) %>" />
+
+				<%
+				}
+				%>
+
+				<c:if test="<%= hasAddLayoutSetPrototypePermission %>">
+					<liferay-portlet:renderURL portletName="<%= PortletKeys.LAYOUT_SET_PROTOTYPE %>" varImpl="manageSiteTemplateURL">
+						<portlet:param name="struts_action" value="/layout_set_prototypes/view" />
+						<portlet:param name="redirect" value="<%= viewSitesURL %>" />
+						<portlet:param name="backURL" value="<%= viewSitesURL %>" />
+					</liferay-portlet:renderURL>
+
+					<aui:nav-item cssClass="divider" />
+
+					<aui:nav-item href="<%= manageSiteTemplateURL.toString() %>" label="manage-site-template" />
+				</c:if>
+			</aui:nav-item>
+		</c:otherwise>
+	</c:choose>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/user_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/user_action.jsp
new file mode 100644
index 0000000..5bac140
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/user_action.jsp
@@ -0,0 +1,62 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+User user2 = (User)row.getObject();
+
+Group group = (Group)row.getParameter("group");
+
+boolean organizationUser = GetterUtil.getBoolean(row.getParameter("organizationUser"));
+boolean userGroupUser = GetterUtil.getBoolean(row.getParameter("userGroupUser"));
+%>
+
+<liferay-ui:icon-menu showWhenSingleIcon="<%= true %>">
+	<c:if test="<%= permissionChecker.isGroupOwner(group.getGroupId()) %>">
+		<portlet:renderURL var="assignURL">
+			<portlet:param name="struts_action" value="/sites_admin/edit_site_assignments" />
+			<portlet:param name="tabs1" value="users" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="p_u_i_d" value="<%= String.valueOf(user2.getUserId()) %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="assign_user_roles"
+			message="assign-site-roles"
+			url="<%= assignURL %>"
+		/>
+
+		<c:if test="<%= !(organizationUser || userGroupUser) && !SiteMembershipPolicyUtil.isMembershipRequired(user2.getUserId(), group.getGroupId()) %>">
+			<portlet:actionURL var="removeURL">
+				<portlet:param name="struts_action" value="/sites_admin/edit_site_assignments" />
+				<portlet:param name="<%= Constants.CMD %>" value="group_users" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+				<portlet:param name="removeUserIds" value="<%= String.valueOf(user2.getUserId()) %>" />
+			</portlet:actionURL>
+
+			<liferay-ui:icon
+				image="unassign_user"
+				message="remove-membership"
+				url="<%= removeURL %>"
+			/>
+		</c:if>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/user_group_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/user_group_action.jsp
new file mode 100644
index 0000000..9c5a6ea
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/user_group_action.jsp
@@ -0,0 +1,57 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+UserGroup userGroup = (UserGroup)row.getObject();
+
+Group group = (Group)row.getParameter("group");
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= permissionChecker.isGroupOwner(group.getGroupId()) %>">
+		<portlet:renderURL var="assignURL">
+			<portlet:param name="struts_action" value="/sites_admin/edit_site_assignments" />
+			<portlet:param name="tabs1" value="user-groups" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="userGroupId" value="<%= String.valueOf(userGroup.getUserGroupId()) %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="assign_user_group_roles"
+			message="assign-site-roles"
+			url="<%= assignURL %>"
+		/>
+
+		<portlet:actionURL var="removeURL">
+			<portlet:param name="struts_action" value="/sites_admin/edit_site_assignments" />
+			<portlet:param name="<%= Constants.CMD %>" value="group_user_groups" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+			<portlet:param name="removeUserGroupIds" value="<%= String.valueOf(userGroup.getUserGroupId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon
+			image="unassign_user_group"
+			message="remove-membership"
+			url="<%= removeURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/view.jsp
new file mode 100644
index 0000000..5014f1e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/view.jsp
@@ -0,0 +1,112 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String toolbarItem = ParamUtil.getString(request, "toolbarItem", "browse");
+
+String sitesListView = ParamUtil.get(request, "sitesListView", SiteConstants.LIST_VIEW_TREE);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/sites_admin/view");
+portletURL.setParameter("sitesListView", sitesListView);
+
+String portletURLString = portletURL.toString();
+
+PortletURL searchURL = renderResponse.createRenderURL();
+
+searchURL.setParameter("struts_action", "/sites_admin/view");
+searchURL.setParameter("sitesListView", SiteConstants.LIST_VIEW_FLAT_SITES);
+searchURL.setParameter("toolbarItem", "view-all-sites");
+
+pageContext.setAttribute("searchURL", searchURL);
+
+String searchURLString = searchURL.toString();
+%>
+
+<liferay-ui:success key="membershipRequestSent" message="your-request-was-sent-you-will-receive-a-reply-by-email" />
+
+<aui:form action="<%= searchURLString %>" method="get" name="fm">
+	<liferay-portlet:renderURLParams varImpl="searchURL" />
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= portletURLString %>" />
+	<aui:input name="toolbarItem" type="hidden" value="<%= toolbarItem %>" />
+
+	<liferay-ui:error exception="<%= NoSuchLayoutSetException.class %>">
+
+		<%
+		NoSuchLayoutSetException nslse = (NoSuchLayoutSetException)errorException;
+
+		PKParser pkParser = new PKParser(nslse.getMessage());
+
+		long groupId = pkParser.getLong("groupId");
+
+		Group group = GroupLocalServiceUtil.getGroup(groupId);
+		%>
+
+		<liferay-ui:message arguments="<%= HtmlUtil.escape(group.getDescriptiveName(locale)) %>" key="site-x-does-not-have-any-private-pages" />
+	</liferay-ui:error>
+
+	<liferay-ui:error exception="<%= RequiredGroupException.class %>">
+
+		<%
+		RequiredGroupException rge = (RequiredGroupException)errorException;
+		%>
+
+		<c:if test="<%= rge.getType() == RequiredGroupException.CURRENT_GROUP %>">
+			<liferay-ui:message key="you-cannot-delete-this-site-because-you-are-currently-accessing-this-site" />
+		</c:if>
+
+		<c:if test="<%= rge.getType() == RequiredGroupException.PARENT_GROUP %>">
+			<liferay-ui:message key="you-cannot-delete-sites-that-have-subsites" />
+		</c:if>
+
+		<c:if test="<%= rge.getType() == RequiredGroupException.SYSTEM_GROUP %>">
+			<liferay-ui:message key="the-site-cannot-be-deleted-or-deactivated-because-it-is-a-required-system-site" />
+		</c:if>
+	</liferay-ui:error>
+
+	<c:choose>
+		<c:when test="<%= sitesListView.equals(SiteConstants.LIST_VIEW_FLAT_SITES) %>">
+			<%@ include file="/html/portlet/sites_admin/view_flat_sites.jspf" %>
+		</c:when>
+		<c:otherwise>
+			<%@ include file="/html/portlet/sites_admin/view_tree.jspf" %>
+		</c:otherwise>
+	</c:choose>
+</aui:form>
+
+<aui:script>
+	Liferay.Util.toggleSearchContainerButton('#<portlet:namespace />delete', '#<portlet:namespace /><%= searchContainerReference.getId() %>SearchContainer', document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />deleteSites',
+		function() {
+			if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-delete-this") %>')) {
+				document.<portlet:namespace />fm.method = "post";
+				document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.DELETE %>";
+				document.<portlet:namespace />fm.<portlet:namespace />redirect.value = document.<portlet:namespace />fm.<portlet:namespace />sitesRedirect.value;
+				document.<portlet:namespace />fm.<portlet:namespace />deleteGroupIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+				submitForm(document.<portlet:namespace />fm, '<portlet:actionURL><portlet:param name="struts_action" value="/sites_admin/edit_site" /></portlet:actionURL>');
+			}
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/view_flat_sites.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/view_flat_sites.jspf
new file mode 100644
index 0000000..57267f4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/view_flat_sites.jspf
@@ -0,0 +1,93 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:search-container
+	rowChecker="<%= new SiteChecker(renderResponse) %>"
+	searchContainer="<%= new GroupSearch(renderRequest, portletURL) %>"
+>
+	<aui:input disabled="<%= true %>" name="sitesRedirect" type="hidden" value="<%= portletURL.toString() %>" />
+	<aui:input name="deleteGroupIds" type="hidden" />
+
+	<%
+	GroupSearchTerms searchTerms = (GroupSearchTerms)searchContainer.getSearchTerms();
+
+	LinkedHashMap<String, Object> groupParams = new LinkedHashMap<String, Object>();
+
+	groupParams.put("site", Boolean.TRUE);
+
+	if (!permissionChecker.isCompanyAdmin() && !GroupPermissionUtil.contains(permissionChecker, ActionKeys.VIEW)) {
+		groupParams.put("usersGroups", new Long(user.getUserId()));
+		//groupParams.put("active", Boolean.TRUE);
+	}
+	%>
+
+	<liferay-ui:search-container-results>
+
+		<%
+		if (searchTerms.isAdvancedSearch()) {
+			total = GroupLocalServiceUtil.searchCount(company.getCompanyId(), classNameIds, searchTerms.getName(), searchTerms.getDescription(), groupParams, searchTerms.isAndOperator());
+
+			searchContainer.setTotal(total);
+
+			results = GroupLocalServiceUtil.search(company.getCompanyId(), classNameIds, searchTerms.getName(), searchTerms.getDescription(), groupParams, searchTerms.isAndOperator(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+		}
+		else {
+			total = GroupLocalServiceUtil.searchCount(company.getCompanyId(), classNameIds, searchTerms.getKeywords(), groupParams);
+
+			searchContainer.setTotal(total);
+
+			results = GroupLocalServiceUtil.search(company.getCompanyId(), classNameIds, searchTerms.getKeywords(), groupParams, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+		}
+
+		searchContainer.setResults(results);
+		%>
+
+	</liferay-ui:search-container-results>
+
+	<%@ include file="/html/portlet/sites_admin/toolbar.jspf" %>
+
+	<c:if test="<%= !results.isEmpty() %>">
+		<aui:button disabled="<%= true %>" name="delete" onClick='<%= renderResponse.getNamespace() + "deleteSites();" %>' value="delete" />
+	</c:if>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.Group"
+		escapedModel="<%= true %>"
+		keyProperty="groupId"
+		modelVar="curGroup"
+		rowIdProperty="friendlyURL"
+		rowVar="row"
+	>
+
+		<%
+		String rowURL = null;
+
+		ThemeDisplay siteThemeDisplay = (ThemeDisplay)themeDisplay.clone();
+
+		siteThemeDisplay.setScopeGroupId(curGroup.getGroupId());
+
+		PortletURL siteAdministrationURL = PortalUtil.getSiteAdministrationURL(renderResponse, siteThemeDisplay);
+
+		if (siteAdministrationURL != null) {
+			rowURL = siteAdministrationURL.toString();
+		}
+		%>
+
+		<%@ include file="/html/portlet/sites_admin/site_columns.jspf" %>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/view_membership_requests.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/view_membership_requests.jsp
new file mode 100644
index 0000000..62e1923
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/view_membership_requests.jsp
@@ -0,0 +1,157 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+String tabs1 = ParamUtil.getString(request, "tabs1", "pending");
+
+int statusId = -1;
+
+if (tabs1.equals("approved")) {
+	statusId = MembershipRequestConstants.STATUS_APPROVED;
+}
+else if (tabs1.equals("denied")) {
+	statusId = MembershipRequestConstants.STATUS_DENIED;
+}
+else {
+	statusId = MembershipRequestConstants.STATUS_PENDING;
+}
+
+Group group = (Group)request.getAttribute(WebKeys.GROUP);
+%>
+
+<liferay-ui:success key="membershipReplySent" message="your-reply-will-be-sent-to-the-user-by-email" />
+
+<c:if test="<%= !layout.isTypeControlPanel() %>">
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		escapeXml="<%= false %>"
+		localizeTitle="<%= false %>"
+		title='<%= HtmlUtil.escape(group.getDescriptiveName(locale)) + StringPool.COLON + StringPool.SPACE + LanguageUtil.get(pageContext, "manage-memberships") %>'
+	/>
+</c:if>
+
+<liferay-util:include page="/html/portlet/sites_admin/edit_site_assignments_toolbar.jsp">
+	<liferay-util:param name="toolbarItem" value="view-membership-requests" />
+</liferay-util:include>
+
+<liferay-ui:tabs
+	names="pending,approved,denied"
+	url="<%= currentURL %>"
+/>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/sites_admin/view_membership_requests");
+portletURL.setParameter("redirect", redirect);
+portletURL.setParameter("tabs1", tabs1);
+portletURL.setParameter("groupId", String.valueOf(group.getGroupId()));
+
+List<String> headerNames = new ArrayList<String>();
+
+headerNames.add("date");
+headerNames.add("user");
+headerNames.add("user-comments");
+
+if (!tabs1.equals("pending")) {
+	headerNames.add("reply-date");
+	headerNames.add("replier");
+	headerNames.add("reply-comments");
+}
+
+headerNames.add(StringPool.BLANK);
+
+SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, portletURL, headerNames, LanguageUtil.get(pageContext, "no-requests-were-found"));
+
+searchContainer.setHeaderNames(headerNames);
+
+int total = MembershipRequestLocalServiceUtil.searchCount(group.getGroupId(), statusId);
+
+searchContainer.setTotal(total);
+
+List results = MembershipRequestLocalServiceUtil.search(group.getGroupId(), statusId, searchContainer.getStart(), searchContainer.getEnd());
+
+searchContainer.setResults(results);
+
+List resultRows = searchContainer.getResultRows();
+
+for (int i = 0; i < results.size(); i++) {
+	MembershipRequest membershipRequest = (MembershipRequest)results.get(i);
+
+	long userId = 0L;
+
+	User user2 = UserLocalServiceUtil.getUserById(membershipRequest.getUserId());
+
+	ResultRow row = new ResultRow(new Object[] {user2, group, membershipRequest}, userId, i);
+
+	// Date
+
+	row.addDate(membershipRequest.getCreateDate());
+
+	// User
+
+	StringBundler sb = new StringBundler(4);
+
+	sb.append(HtmlUtil.escape(user2.getFullName()));
+	sb.append(" (");
+	sb.append(user2.getEmailAddress());
+	sb.append(StringPool.CLOSE_PARENTHESIS);
+
+	row.addText(sb.toString());
+
+	// Comments
+
+	row.addText(HtmlUtil.escape(membershipRequest.getComments()));
+
+	if (!tabs1.equals("pending")) {
+
+		// Reply Date
+
+		row.addText(dateFormatDate.format(membershipRequest.getReplyDate()));
+
+		// Replier
+
+		User user3 = UserLocalServiceUtil.getUserById(membershipRequest.getReplierUserId());
+
+		if (user3.isDefaultUser()) {
+			Company user3Company = CompanyLocalServiceUtil.getCompanyById(user3.getCompanyId());
+
+			row.addText(HtmlUtil.escape(user3Company.getName()));
+		}
+		else {
+			row.addText(HtmlUtil.escape(user3.getFullName()));
+		}
+
+		// Reply comments
+
+		row.addText(HtmlUtil.escape(membershipRequest.getReplyComments()));
+	}
+
+	// Actions
+
+	row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/sites_admin/membership_request_action.jsp");
+
+	// Add result row
+
+	resultRows.add(row);
+}
+%>
+
+<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/view_site_info.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/view_site_info.jspf
new file mode 100644
index 0000000..0b650a5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/view_site_info.jspf
@@ -0,0 +1,132 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-portlet:renderURL doAsGroupId="<%= groupId %>" portletName="<%= PortletKeys.SITE_MEMBERSHIPS_ADMIN %>" var="assignMembersURL">
+	<portlet:param name="redirect" value="<%= currentURL %>" />
+</liferay-portlet:renderURL>
+
+<%
+LinkedHashMap<String, Object> userParams = new LinkedHashMap<String, Object>();
+
+userParams.put("inherit", Boolean.TRUE);
+userParams.put("usersGroups", new Long(groupId));
+
+int usersCount = UserLocalServiceUtil.searchCount(company.getCompanyId(), null, WorkflowConstants.STATUS_APPROVED, userParams);
+
+LinkedHashMap<String, Object> organizationParams = new LinkedHashMap<String, Object>();
+
+organizationParams.put("groupOrganization", new Long(groupId));
+organizationParams.put("organizationsGroups", new Long(groupId));
+
+int organizationsCount = OrganizationLocalServiceUtil.searchCount(company.getCompanyId(), OrganizationConstants.ANY_PARENT_ORGANIZATION_ID, null, null, null, null, organizationParams);
+
+LinkedHashMap<String, Object> userGroupParams = new LinkedHashMap<String, Object>();
+
+userGroupParams.put("userGroupsGroups", new Long(groupId));
+
+int userGroupsCount = UserGroupLocalServiceUtil.searchCount(company.getCompanyId(), null, userGroupParams);
+
+int pendingRequests = 0;
+
+if (group.getType() == GroupConstants.TYPE_SITE_RESTRICTED) {
+	pendingRequests = MembershipRequestLocalServiceUtil.searchCount(group.getGroupId(), MembershipRequestConstants.STATUS_PENDING);
+}
+%>
+
+<c:if test="<%= group.isOrganization() %>">
+
+	<%
+	Organization groupOrganization = OrganizationLocalServiceUtil.getOrganization(group.getOrganizationId());
+	%>
+
+	<div class="organizations-msg-info portlet-msg">
+		<liferay-ui:message arguments="<%= new String[] {groupOrganization.getName(), LanguageUtil.get(pageContext, groupOrganization.getType())} %>" key="this-site-belongs-to-x-which-is-an-organization-of-type-x" />
+	</div>
+</c:if>
+
+<div class="membership-info">
+	<dl>
+		<dt class="first">
+			<liferay-ui:message key="members" />:
+		</dt>
+
+		<dd class="members-info">
+			<c:if test="<%= (usersCount == 0) && (organizationsCount == 0) && (userGroupsCount == 0) %>">
+				<liferay-ui:message key="none" />
+			</c:if>
+
+			<c:if test="<%= usersCount > 0 %>">
+				<liferay-ui:icon
+					image="user_icon"
+					label="<%= true %>"
+					message='<%= LanguageUtil.format(pageContext, (usersCount == 1) ? "x-user" : "x-users", usersCount) %>'
+					url='<%= HttpUtil.addParameter(assignMembersURL.toString(), "tabs1", "users") %>'
+				/>
+			</c:if>
+
+			<c:if test="<%= organizationsCount > 0 %>">
+				<liferay-ui:icon
+					image="organization_icon"
+					label="<%= true %>"
+					message='<%= LanguageUtil.format(pageContext, (organizationsCount == 1) ? "x-organization" : "x-organizations", organizationsCount) %>'
+					url='<%= HttpUtil.addParameter(assignMembersURL.toString(), "tabs1", "organizations") %>'
+				/>
+			</c:if>
+
+			<c:if test="<%= userGroupsCount > 0 %>">
+				<liferay-ui:icon
+					image="group"
+					label="<%= true %>"
+					message='<%= LanguageUtil.format(pageContext, (userGroupsCount == 1) ? "x-user-groups" : "x-user-groups", userGroupsCount) %>'
+					url='<%= HttpUtil.addParameter(assignMembersURL.toString(), "tabs1", "user-groups") %>'
+				/>
+			</c:if>
+		</dd>
+
+		<c:if test="<%= pendingRequests > 0 %>">
+			<portlet:renderURL var="viewMembershipRequestsURL">
+				<portlet:param name="struts_action" value="/sites_admin/view_membership_requests" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="groupId" value="<%= String.valueOf(group.getGroupId()) %>" />
+			</portlet:renderURL>
+
+			<dt class="hide-accessible">
+				<liferay-ui:message key="request-pending" />
+			</dt>
+
+			<dd class="membership-requests">
+				<liferay-ui:icon
+					image="manage_task"
+					label="<%= true %>"
+					message='<%= LanguageUtil.format(pageContext, (pendingRequests == 1) ? "x-request-pending" : "x-requests-pending", pendingRequests) %>'
+					url="<%= viewMembershipRequestsURL %>"
+				/>
+			</dd>
+		</c:if>
+
+		<dt>
+			<liferay-ui:icon
+				image="assign"
+				label="<%= true %>"
+				message='<%= LanguageUtil.get(pageContext, "membership-type") + StringPool.COLON + StringPool.SPACE %>'
+			/>
+		</dt>
+
+		<dd class="last">
+			<%= LanguageUtil.get(pageContext, GroupConstants.getTypeLabel(group.getType())) %>
+		</dd>
+	</dl>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/view_teams.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/view_teams.jsp
new file mode 100644
index 0000000..29c6f50
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/view_teams.jsp
@@ -0,0 +1,137 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_admin/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+String backURL = ParamUtil.getString(request, "backURL", redirect);
+
+Group group = ActionUtil.getGroup(renderRequest);
+
+long groupId = group.getGroupId();
+
+Organization organization = null;
+
+if (group.isOrganization()) {
+	organization = OrganizationLocalServiceUtil.getOrganization(group.getOrganizationId());
+}
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/sites_admin/view_teams");
+portletURL.setParameter("groupId", String.valueOf(groupId));
+
+pageContext.setAttribute("portletURL", portletURL);
+%>
+
+<c:if test="<%= !layout.isTypeControlPanel() %>">
+	<liferay-ui:header
+		backURL="<%= backURL %>"
+		escapeXml="<%= false %>"
+		localizeTitle="<%= false %>"
+		title='<%= HtmlUtil.escape(group.getDescriptiveName(locale)) + StringPool.COLON + StringPool.SPACE + LanguageUtil.get(pageContext, "manage-memberships") %>'
+	/>
+</c:if>
+
+<aui:form action="<%= portletURL.toString() %>" cssClass="form-search" method="get" name="fm">
+	<liferay-portlet:renderURLParams varImpl="portletURL" />
+
+	<%
+	TeamSearch searchContainer = new TeamSearch(renderRequest, portletURL);
+
+	List headerNames = searchContainer.getHeaderNames();
+
+	headerNames.add(StringPool.BLANK);
+
+	TeamDisplayTerms searchTerms = (TeamDisplayTerms)searchContainer.getSearchTerms();
+
+	int total = TeamLocalServiceUtil.searchCount(groupId, searchTerms.getName(), searchTerms.getDescription(), new LinkedHashMap<String, Object>());
+
+	searchContainer.setTotal(total);
+
+	List results = TeamLocalServiceUtil.search(groupId, searchTerms.getName(), searchTerms.getDescription(), new LinkedHashMap<String, Object>(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+
+	searchContainer.setResults(results);
+
+	portletURL.setParameter(searchContainer.getCurParam(), String.valueOf(searchContainer.getCur()));
+	%>
+
+	<liferay-ui:input-search name="<%= searchTerms.NAME %>" />
+
+	<div class="separator"><!-- --></div>
+
+	<%
+	List resultRows = searchContainer.getResultRows();
+
+	for (int i = 0; i < results.size(); i++) {
+		Team team = (Team)results.get(i);
+
+		team = team.toEscapedModel();
+
+		ResultRow row = new ResultRow(team, team.getTeamId(), i);
+
+		PortletURL rowURL = null;
+
+		if (TeamPermissionUtil.contains(permissionChecker, team.getTeamId(), ActionKeys.UPDATE)) {
+			rowURL = renderResponse.createRenderURL();
+
+			rowURL.setParameter("struts_action", "/sites_admin/edit_team");
+			rowURL.setParameter("redirect", currentURL);
+			rowURL.setParameter("teamId", String.valueOf(team.getTeamId()));
+		}
+
+		// Name
+
+		row.addText(team.getName(), rowURL);
+
+		// Description
+
+		row.addText(team.getDescription(), rowURL);
+
+		// Action
+
+		row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/sites_admin/team_action.jsp");
+
+		// Add result row
+
+		resultRows.add(row);
+	}
+	%>
+
+	<c:if test="<%= GroupPermissionUtil.contains(permissionChecker, groupId, ActionKeys.MANAGE_TEAMS) %>">
+		<portlet:renderURL var="addTeamURL">
+			<portlet:param name="struts_action" value="/sites_admin/edit_team" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+		</portlet:renderURL>
+
+		<aui:button href="<%= addTeamURL %>" value="add-team" />
+	</c:if>
+
+	<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+</aui:form>
+
+<%
+if (group.isOrganization()) {
+	UsersAdminUtil.addPortletBreadcrumbEntries(organization, request, renderResponse);
+}
+else {
+	PortalUtil.addPortletBreadcrumbEntry(request, group.getDescriptiveName(locale), null);
+}
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "manage-teams"), currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/view_tree.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/view_tree.jspf
new file mode 100644
index 0000000..2fe9231
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_admin/view_tree.jspf
@@ -0,0 +1,268 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+long groupId = ParamUtil.getLong(request, "groupId", GroupConstants.DEFAULT_PARENT_GROUP_ID);
+
+Group group = null;
+
+if (groupId > 0) {
+	group = GroupServiceUtil.getGroup(groupId);
+}
+
+List<Group> groups = new ArrayList<Group>();
+
+if (filterManageableGroups) {
+	groups = user.getSiteGroups(true);
+}
+
+if (groupId != GroupConstants.DEFAULT_PARENT_GROUP_ID) {
+	groups.clear();
+
+	groups.add(GroupLocalServiceUtil.getGroup(groupId));
+}
+
+if (group != null) {
+	SitesUtil.addPortletBreadcrumbEntries(group, request, renderResponse);
+}
+%>
+
+<c:if test="<%= (group != null) %>">
+	<c:if test="<%= layout.isTypeControlPanel() %>">
+		<div id="breadcrumb">
+			<liferay-ui:breadcrumb showCurrentGroup="<%= false %>" showCurrentPortlet="<%= false %>" showGuestGroup="<%= false %>" showLayout="<%= false %>" showPortletBreadcrumb="<%= true %>" />
+		</div>
+	</c:if>
+
+	<%
+	long parentGroupId = GroupConstants.DEFAULT_PARENT_GROUP_ID;
+	String parentGroupName = LanguageUtil.get(pageContext, "sites-home");
+
+	if (!group.isRoot()) {
+		Group parentGroup = group.getParentGroup();
+
+		if (GroupPermissionUtil.contains(permissionChecker, parentGroup, ActionKeys.VIEW)) {
+			parentGroupId = parentGroup.getGroupId();
+			parentGroupName = parentGroup.getDescriptiveName();
+		}
+	}
+	%>
+
+	<portlet:renderURL var="headerBackURL">
+		<portlet:param name="struts_action" value="/sites_admin/view" />
+		<portlet:param name="groupId" value="<%= String.valueOf(parentGroupId) %>" />
+	</portlet:renderURL>
+
+	<liferay-ui:header
+		backLabel="<%= parentGroupName %>"
+		backURL="<%= headerBackURL.toString() %>"
+		localizeTitle="<%= false %>"
+		title="<%= group.getDescriptiveName() %>"
+	/>
+</c:if>
+
+<aui:row>
+	<aui:col cssClass="lfr-asset-column lfr-asset-column-details" width="<%= (group != null) ? 75 : 100 %>">
+		<c:if test="<%= group != null %>">
+			<%@ include file="/html/portlet/sites_admin/view_site_info.jspf" %>
+
+			<c:if test="<%= Validator.isNotNull(group.getDescription()) %>">
+				<div class="description">
+					<%= HtmlUtil.escape(group.getDescription()) %>
+				</div>
+			</c:if>
+
+			<div class="site-categorization">
+				<liferay-ui:asset-categories-summary
+					className="<%= Group.class.getName() %>"
+					classPK="<%= groupId %>"
+				/>
+
+				<liferay-ui:asset-tags-summary
+					className="<%= Group.class.getName() %>"
+					classPK="<%= groupId %>"
+				/>
+			</div>
+		</c:if>
+
+		<liferay-ui:search-container
+			searchContainer="<%= new GroupSearch(renderRequest, portletURL) %>"
+		>
+
+			<%
+			if (groupId != 0) {
+				searchContainer.setEmptyResultsMessage(null);
+			}
+
+			searchContainer.setRowChecker(new SiteChecker(renderResponse));
+
+			GroupSearchTerms searchTerms = (GroupSearchTerms)searchContainer.getSearchTerms();
+
+			request.setAttribute("view_tree.jspf-searchTerms", searchTerms);
+			%>
+
+			<liferay-ui:search-container-results>
+
+				<%
+				long parentGroupId = _getParentGroupId(request, group, filterManageableGroups);
+
+				if (group != null) {
+					parentGroupId = group.getGroupId();
+				}
+				%>
+
+				<c:choose>
+					<c:when test="<%= !searchTerms.hasSearchTerms() && (parentGroupId <= 0) && (filterManageableGroups) %>">
+
+						<%
+						total = groups.size();
+
+						searchContainer.setTotal(total);
+
+						results = ListUtil.subList(groups, searchContainer.getStart(), searchContainer.getEnd());
+						%>
+
+					</c:when>
+					<c:otherwise>
+
+						<%
+						LinkedHashMap<String, Object> groupParams = new LinkedHashMap<String, Object>();
+
+						groupParams.put("site", Boolean.TRUE);
+						//groupParams.put("active", Boolean.TRUE);
+
+						if (searchTerms.hasSearchTerms()) {
+							if (filterManageableGroups) {
+								groupParams.put("groupsTree", groups);
+							}
+							else if (parentGroupId > 0) {
+								List<Group> groupsTree = new ArrayList<Group>();
+
+								Group parentGroup = GroupLocalServiceUtil.getGroup(parentGroupId);
+
+								groupsTree.add(parentGroup);
+
+								groupParams.put("groupsTree", groupsTree);
+							}
+
+							parentGroupId = GroupConstants.ANY_PARENT_GROUP_ID;
+						}
+
+						if (searchTerms.isAdvancedSearch()) {
+							total = GroupLocalServiceUtil.searchCount(company.getCompanyId(), classNameIds, searchTerms.getName(), searchTerms.getDescription(), groupParams, searchTerms.isAndOperator());
+
+							searchContainer.setTotal(total);
+
+							results = GroupLocalServiceUtil.search(company.getCompanyId(), classNameIds, searchTerms.getName(), searchTerms.getDescription(), groupParams, searchTerms.isAndOperator(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+						}
+						else {
+							total = GroupLocalServiceUtil.searchCount(company.getCompanyId(), classNameIds, groupId, searchTerms.getKeywords(), groupParams);
+
+							searchContainer.setTotal(total);
+
+							results = GroupLocalServiceUtil.search(company.getCompanyId(), classNameIds, groupId, searchTerms.getKeywords(), groupParams, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+						}
+						%>
+
+					</c:otherwise>
+				</c:choose>
+
+				<%
+				searchContainer.setResults(results);
+				%>
+
+			</liferay-ui:search-container-results>
+
+			<c:if test="<%= group == null %>">
+				<%@ include file="/html/portlet/sites_admin/toolbar.jspf" %>
+			</c:if>
+
+			<c:if test="<%= !results.isEmpty() %>">
+				<aui:button disabled="<%= true %>" name="delete" onClick='<%= renderResponse.getNamespace() + "deleteSites();" %>' value="delete" />
+			</c:if>
+
+			<liferay-ui:search-container-row
+				className="com.liferay.portal.model.Group"
+				escapedModel="<%= true %>"
+				keyProperty="groupId"
+				modelVar="curGroup"
+				rowIdProperty="friendlyURL"
+				rowVar="row"
+			>
+
+				<%
+				String rowURL = null;
+
+				ThemeDisplay siteThemeDisplay = (ThemeDisplay)themeDisplay.clone();
+
+				siteThemeDisplay.setScopeGroupId(curGroup.getGroupId());
+
+				PortletURL siteAdministrationURL = PortalUtil.getSiteAdministrationURL(renderResponse, siteThemeDisplay);
+
+				if (siteAdministrationURL != null) {
+					rowURL = siteAdministrationURL.toString();
+				}
+				%>
+
+				<%@ include file="/html/portlet/sites_admin/site_columns.jspf" %>
+			</liferay-ui:search-container-row>
+
+			<liferay-ui:search-iterator />
+		</liferay-ui:search-container>
+
+		<aui:input disabled="<%= true %>" name="sitesRedirect" type="hidden" value="<%= portletURL.toString() %>" />
+		<aui:input name="deleteGroupIds" type="hidden" />
+	</aui:col>
+
+	<c:if test="<%= group != null %>">
+
+		<%
+		LayoutSet layoutSet = group.getPublicLayoutSet();
+		%>
+
+		<aui:col cssClass="lfr-asset-column lfr-asset-column-actions" last="<%= true %>" width="<%= 25 %>">
+			<div class="lfr-asset-summary">
+				<img alt="<%= HtmlUtil.escape(group.getDescriptiveName()) %>" class="avatar" src='<%= themeDisplay.getPathImage() + "/layout_set_logo?img_id=" + layoutSet.getLogoId() + "&t=" + WebServerServletTokenUtil.getToken(layoutSet.getLogoId()) %>' />
+
+				<div class="lfr-asset-name">
+					<h4><%= HtmlUtil.escape(group.getDescriptiveName()) %></h4>
+				</div>
+			</div>
+
+			<%
+			request.removeAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+			request.setAttribute("view_tree.jspf-site", group);
+			%>
+
+			<liferay-util:include page="/html/portlet/sites_admin/site_action.jsp" />
+		</aui:col>
+	</c:if>
+</aui:row>
+
+<%!
+private long _getParentGroupId(HttpServletRequest request, Group group, boolean filterManageableGroups) {
+	if (group != null) {
+		return group.getGroupId();
+	}
+
+	if (filterManageableGroups) {
+		return GroupConstants.ANY_PARENT_GROUP_ID;
+	}
+
+	return GroupConstants.DEFAULT_PARENT_GROUP_ID;
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_directory/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_directory/configuration.jsp
new file mode 100644
index 0000000..f635e5d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_directory/configuration.jsp
@@ -0,0 +1,83 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_directory/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+%>
+
+<aui:row>
+	<aui:col width="<%= 50 %>">
+		<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+		<aui:form action="<%= configurationURL %>" method="post" name="fm">
+			<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+			<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+
+			<aui:fieldset column="<%= true %>">
+				<aui:select name="preferences--sites--">
+					<aui:option label="<%= SitesDirectoryTag.SITES_TOP_LEVEL %>" selected="<%= sites.equals(SitesDirectoryTag.SITES_TOP_LEVEL) %>" />
+					<aui:option label="<%= SitesDirectoryTag.SITES_PARENT_LEVEL %>" selected="<%= sites.equals(SitesDirectoryTag.SITES_PARENT_LEVEL) %>" />
+					<aui:option label="<%= SitesDirectoryTag.SITES_SIBLINGS %>" selected="<%= sites.equals(SitesDirectoryTag.SITES_SIBLINGS) %>" />
+					<aui:option label="<%= SitesDirectoryTag.SITES_CHILDREN %>" selected="<%= sites.equals(SitesDirectoryTag.SITES_CHILDREN) %>" />
+				</aui:select>
+
+				<aui:select name="preferences--displayStyle--">
+					<aui:option label="icon" selected='<%= displayStyle.equals("icon") %>' />
+					<aui:option label="descriptive" selected='<%= displayStyle.equals("descriptive") %>' />
+					<aui:option label="list" selected='<%= displayStyle.equals("list") %>' />
+					<aui:option label="list-hierarchy" selected='<%= displayStyle.equals("list-hierarchy") %>' />
+				</aui:select>
+			</aui:fieldset>
+			<aui:button-row>
+				<aui:button type="submit" />
+			</aui:button-row>
+		</aui:form>
+	</aui:col>
+	<aui:col width="<%= 50 %>">
+		<liferay-portlet:preview
+			portletName="<%= portletResource %>"
+			queryString="struts_action=/sites_directory/view"
+			showBorders="<%= true %>"
+		/>
+	</aui:col>
+</aui:row>
+
+<aui:script use="aui-base">
+	var selectDisplayStyle = A.one('#<portlet:namespace />displayStyle');
+	var selectSites = A.one('#<portlet:namespace />sites');
+
+	var selects = A.all('#<portlet:namespace />fm select');
+
+	var curPortletBoundaryId = '#p_p_id_<%= HtmlUtil.escapeJS(portletResource) %>_';
+
+	var toggleCustomFields = function() {
+		var data = {};
+
+		var displayStyle = selectDisplayStyle.val();
+		var sites = selectSites.val();
+
+		data['_<%= HtmlUtil.escapeJS(portletResource) %>_displayStyle'] = displayStyle;
+		data['_<%= HtmlUtil.escapeJS(portletResource) %>_sites'] = sites;
+
+		Liferay.Portlet.refresh(curPortletBoundaryId, data);
+	}
+
+	selects.on('change', toggleCustomFields);
+
+	toggleCustomFields();
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_directory/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_directory/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_directory/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_directory/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_directory/init.jsp
new file mode 100644
index 0000000..a4dc441
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_directory/init.jsp
@@ -0,0 +1,28 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.taglib.ui.SitesDirectoryTag" %>
+
+<%
+String portletResource = ParamUtil.getString(request, "portletResource");
+
+String displayStyle = PrefsParamUtil.getString(portletPreferences, renderRequest, "displayStyle", "descriptive");
+String sites = PrefsParamUtil.getString(portletPreferences, renderRequest, "sites", SitesDirectoryTag.SITES_TOP_LEVEL);
+%>
+
+<%@ include file="/html/portlet/sites_directory/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_directory/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_directory/view.jsp
new file mode 100644
index 0000000..3ec07f9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/sites_directory/view.jsp
@@ -0,0 +1,22 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/sites_directory/init.jsp" %>
+
+<liferay-ui:sites-directory
+	displayStyle="<%= displayStyle %>"
+	sites="<%= sites %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/social_activity/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/social_activity/css/.sass-cache/main.css
new file mode 100644
index 0000000..4e377c8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/social_activity/css/.sass-cache/main.css
@@ -0,0 +1,122 @@
+.portlet-social-activity h4 {
+  font-size: 1.2em;
+  margin-bottom: 10px; }
+
+.social-activity-items h4 {
+  font-size: 1.1em;
+  margin-bottom: 0px; }
+.social-activity-items .field-choice {
+  display: inline-block; }
+.social-activity-items .social-activity-item {
+  cursor: pointer;
+  padding: 6px 0px 6px 3px;
+  position: relative; }
+  .social-activity-items .social-activity-item .social-activity-item-content {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap; }
+  .social-activity-items .social-activity-item a {
+    color: #000;
+    text-decoration: none; }
+.social-activity-items .social-activity-item:hover {
+  background-color: #CDE5FD; }
+.social-activity-items .social-activity-item.selected {
+  background-color: #83BFFA; }
+.social-activity-items .social-activity-item.selected:after {
+  border: 14px solid #83BFFA;
+  border-color: transparent transparent transparent #83BFFA;
+  content: '';
+  display: block;
+  left: 100%;
+  margin-top: -14px;
+  position: absolute;
+  top: 50%;
+  z-index: 2; }
+
+.social-activity-details .settings-display .settings-display-content {
+  background-color: #FFF;
+  border: 1px solid #CCC;
+  margin: 0px 15px 5px 0px;
+  padding: 0px 15px; }
+  .social-activity-details .settings-display .settings-display-content .settings-field {
+    font-weight: bold;
+    list-style: none; }
+    .social-activity-details .settings-display .settings-display-content .settings-field .settings-field-content {
+      position: relative; }
+      .social-activity-details .settings-display .settings-display-content .settings-field .settings-field-content select {
+        margin: 0px 4px;
+        padding: 3px; }
+    .social-activity-details .settings-display .settings-display-content .settings-field .field-text {
+      font-weight: normal;
+      margin-bottom: 3px; }
+    .social-activity-details .settings-display .settings-display-content .settings-field .field-contribution-text {
+      color: #333;
+      display: block;
+      font-size: 0.95em;
+      margin-top: 3px; }
+    .social-activity-details .settings-display .settings-display-content .settings-field .settings-controls {
+      display: none; }
+  .social-activity-details .settings-display .settings-display-content .container-drop-box {
+    margin: 0;
+    min-height: 130px; }
+    .social-activity-details .settings-display .settings-display-content .container-drop-box .content-field {
+      border-bottom: 1px solid #ccc;
+      padding: 8px 0 8px 10px; }
+      .social-activity-details .settings-display .settings-display-content .container-drop-box .content-field .settings-controls {
+        display: block; }
+      .social-activity-details .settings-display .settings-display-content .container-drop-box .content-field .settings-label {
+        display: block;
+        margin-bottom: 0.5em; }
+  .social-activity-details .settings-display .settings-display-content .button-row {
+    padding: 5px 0; }
+  .social-activity-details .settings-display .settings-display-content .settings-header {
+    padding: 10px 0 5px 0; }
+    .social-activity-details .settings-display .settings-display-content .settings-header .actions-conjunction {
+      display: inline-block;
+      font-weight: bold;
+      list-style: none;
+      padding: 10px 5px; }
+    .social-activity-details .settings-display .settings-display-content .settings-header .settings-actions {
+      display: inline-block;
+      margin: 0px; }
+    .social-activity-details .settings-display .settings-display-content .settings-header .settings-header-label {
+      padding: 0 5px; }
+    .social-activity-details .settings-display .settings-display-content .settings-header .action-field {
+      background-image: url(@theme_image_path@/common/add.png);
+      background-position: 5px 50%;
+      background-repeat: no-repeat;
+      padding-left: 25px; }
+  .social-activity-details .settings-display .settings-display-content .settings-container-label {
+    border-bottom: 1px solid #ccc;
+    font-size: 1.2em;
+    margin-top: 10px;
+    padding: 0 5px; }
+  .social-activity-details .settings-display .settings-display-content .settings-field-buttons {
+    display: inline-block;
+    position: absolute;
+    right: 0;
+    top: 0; }
+    .social-activity-details .settings-display .settings-display-content .settings-field-buttons .settings-button {
+      float: left; }
+    .social-activity-details .settings-display .settings-display-content .settings-field-buttons .settings-icon {
+      background: none no-repeat 0 50%;
+      display: block;
+      height: 16px;
+      padding: 0;
+      right: 0;
+      width: 16px; }
+    .social-activity-details .settings-display .settings-display-content .settings-field-buttons .settings-icon-close {
+      background-image: url(@theme_image_path@/portlet/close.png); }
+    .social-activity-details .settings-display .settings-display-content .settings-field-buttons .settings-icon-toggle {
+      background-image: url(@theme_image_path@/arrows/05_right.png);
+      font-size: 0.9em;
+      font-weight: normal;
+      padding: 0 16px 0 12px;
+      width: auto; }
+    .social-activity-details .settings-display .settings-display-content .settings-field-buttons .settings-icon-expanded {
+      background-image: url(@theme_image_path@/arrows/05_down.png); }
+  .social-activity-details .settings-display .settings-display-content .settings-limit {
+    margin-left: 12px; }
+    .social-activity-details .settings-display .settings-display-content .settings-limit .settings-limit-row {
+      margin: 5px 0; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/social_activity/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/social_activity/css/main.css
new file mode 100644
index 0000000..644f314
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/social_activity/css/main.css
@@ -0,0 +1,191 @@
+.portlet-social-activity h4 {
+	font-size: 1.2em;
+	margin-bottom: 10px;
+}
+
+.social-activity-items {
+	h4 {
+		font-size: 1.1em;
+		margin-bottom: 0px;
+	}
+
+	.field-choice {
+		display: inline-block;
+	}
+
+	.social-activity-item {
+		cursor: pointer;
+		padding: 6px 0px 6px 3px;
+		position: relative;
+
+		.social-activity-item-content {
+			overflow: hidden;
+			text-overflow: ellipsis;
+			white-space: nowrap;
+		}
+
+		a {
+			color: #000;
+			text-decoration:none;
+		}
+	}
+
+	.social-activity-item:hover {
+		background-color: #CDE5FD;
+	}
+
+	.social-activity-item.selected {
+		background-color: #83BFFA;
+	}
+
+	.social-activity-item.selected:after {
+		border: 14px solid #83BFFA;
+		border-color: transparent transparent transparent #83BFFA;
+		content: '';
+		display: block;
+		left: 100%;
+		margin-top: -14px;
+		position: absolute;
+		top: 50%;
+		z-index: 2;
+	}
+}
+
+.social-activity-details {
+	.settings-display .settings-display-content {
+		background-color: #FFF;
+		border: 1px solid #CCC;
+		margin: 0px 15px 5px 0px;
+		padding: 0px 15px;
+
+		.settings-field {
+			font-weight: bold;
+			list-style: none;
+
+			.settings-field-content {
+				position: relative;
+
+				select {
+					margin: 0px 4px;
+					padding: 3px;
+				}
+			}
+
+			.field-text {
+				font-weight: normal;
+				margin-bottom: 3px;
+			}
+
+			.field-contribution-text {
+				color: #333;
+				display: block;
+				font-size: 0.95em;
+				margin-top: 3px;
+			}
+
+			.settings-controls {
+				display: none;
+			}
+		}
+		.container-drop-box {
+			margin: 0;
+			min-height: 130px;
+
+			.content-field {
+				border-bottom: 1px solid #ccc;
+				padding: 8px 0 8px 10px;
+
+				.settings-controls {
+					display: block;
+				}
+
+				.settings-label {
+					display: block;
+					margin-bottom: 0.5em;
+				}
+			}
+		}
+
+		.button-row {
+			padding: 5px 0;
+		}
+
+		.settings-header {
+			padding: 10px 0 5px 0;
+
+			.actions-conjunction {
+				display: inline-block;
+				font-weight: bold;
+				list-style: none;
+				padding: 10px 5px;
+			}
+
+			.settings-actions {
+				display: inline-block;
+				margin: 0px;
+			}
+
+			.settings-header-label {
+				padding: 0 5px;
+			}
+
+			.action-field {
+				background-image: url(@theme_image_path@/common/add.png);
+				background-position: 5px 50%;
+				background-repeat: no-repeat;
+				padding-left: 25px;
+			}
+		}
+
+		.settings-container-label {
+			border-bottom: 1px solid #ccc;
+			font-size: 1.2em;
+			margin-top: 10px;
+			padding: 0 5px;
+		}
+
+		.settings-field-buttons {
+			display: inline-block;
+			position: absolute;
+			right: 0;
+			top: 0;
+
+			.settings-button {
+				float: left;
+			}
+
+			.settings-icon {
+				background: none no-repeat 0 50%;
+				display: block;
+				height: 16px;
+				padding: 0;
+				right: 0;
+				width: 16px;
+			}
+
+			.settings-icon-close {
+				background-image: url(@theme_image_path@/portlet/close.png);
+			}
+
+			.settings-icon-toggle {
+				background-image: url(@theme_image_path@/arrows/05_right.png);
+				font-size: 0.9em;
+				font-weight: normal;
+				padding: 0 16px 0 12px;
+				width: auto;
+			}
+
+			.settings-icon-expanded {
+				background-image: url(@theme_image_path@/arrows/05_down.png);
+			}
+		}
+
+		.settings-limit {
+			margin-left: 12px;
+
+			.settings-limit-row {
+				margin: 5px 0;
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/social_activity/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/social_activity/error.jsp
new file mode 100644
index 0000000..c558cc3
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/social_activity/error.jsp
@@ -0,0 +1,24 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/social_activity/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/social_activity/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/social_activity/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/social_activity/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/social_activity/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/social_activity/init.jsp
new file mode 100644
index 0000000..37b6d82
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/social_activity/init.jsp
@@ -0,0 +1,23 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.social.model.SocialActivityDefinition" %><%@
+page import="com.liferay.portlet.social.service.permission.SocialActivityPermissionUtil" %><%@
+page import="com.liferay.portlet.social.util.SocialConfigurationUtil" %>
+
+<%@ include file="/html/portlet/social_activity/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/social_activity/js/main.js b/tomcat-7.0.42/webapps/ROOT/html/portlet/social_activity/js/main.js
new file mode 100644
index 0000000..1c636c7
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/social_activity/js/main.js
@@ -0,0 +1,855 @@
+AUI.add(
+	'liferay-social-activity-admin',
+	function(A) {
+		var Lang = A.Lang;
+
+		var Node = A.Node;
+
+		var Widget = A.Widget;
+
+		var CSS_SETTINGS_ICON_CLOSE = 'settings-icon-close';
+
+		var CSS_SETTINGS_ICON_EXPANDED = 'settings-icon-expanded';
+
+		var CSS_TOKEN = 'lfr-token';
+
+		var COL_LIMIT_TYPE = [Liferay.Language.get('social-activity-limit-type-times-a-day'), Liferay.Language.get('social-activity-limit-type-times'), Liferay.Language.get('social-activity-limit-type-times-per-period')];
+
+		var STR_ACTION_FIELD = 'action-field';
+
+		var STR_ACTIVE = 'active';
+
+		var STR_ACTIVITY_TYPE = 'activityType';
+
+		var STR_BLANK = '';
+
+		var STR_BOUNDING_BOX = 'boundingBox';
+
+		var STR_COLLAPSE = Liferay.Language.get('collapse');
+
+		var STR_CONJUNCTION = 'actions-conjunction';
+
+		var STR_CONTENT_BOX = 'contentBox';
+
+		var STR_CONTENT_FIELD = 'content-field';
+
+		var STR_CONTRIBUTION_INCREMENT = 'contributionIncrement';
+
+		var STR_CONTRIBUTION_LIMIT_ENABLED = 'contributionLimitEnabled';
+
+		var STR_CONTRIBUTION_LIMIT_PERIOD = 'contributionLimitPeriod';
+
+		var STR_CONTRIBUTION_LIMIT_VALUE = 'contributionLimitValue';
+
+		var STR_DATA_MODEL_NAME = 'data-modelName';
+
+		var STR_DOT = '.';
+
+		var STR_EVENT_SUBMIT = 'submit';
+
+		var STR_EXPAND = Liferay.Language.get('expand');
+
+		var STR_LANGUAGE_KEY = 'languageKey';
+
+		var STR_LOCALIZED_NAME = 'localizedName';
+
+		var STR_PARTICIPATION_INCREMENT = 'participationIncrement';
+
+		var STR_PARTICIPATION_LIMIT_ENABLED = 'participationLimitEnabled';
+
+		var STR_PARTICIPATION_LIMIT_PERIOD = 'participationLimitPeriod';
+
+		var STR_PARTICIPATION_LIMIT_VALUE = 'participationLimitValue';
+
+		var STR_SAVE = Liferay.Language.get('save');
+
+		var STR_SELECTED = 'selected';
+
+		var STR_SETTINGS = 'settings';
+
+		var STR_SETTINGS_BUTTON_HOLDER = 'settings-button-holder';
+
+		var STR_SETTINGS_DISPLAY = 'settings-display';
+
+		var STR_SETTINGS_FIELD = 'settings-field';
+
+		var STR_SETTINGS_JSON = 'settingsJSON';
+
+		var STR_SETTINGS_LIMIT = 'settings-limit';
+
+		var STR_SPACE = ' ';
+
+		var STR_UI = 'ui';
+
+		var SELECTOR_CONJUNCTION = STR_DOT + STR_CONJUNCTION;
+
+		var SELECTOR_INPUT = 'input';
+
+		var SELECTOR_SETTINGS_DISPLAY = STR_DOT + A.getClassName(STR_SETTINGS_DISPLAY);
+
+		var SELECTOR_SETTINGS_FIELD = STR_DOT + A.getClassName(STR_SETTINGS_FIELD);
+
+		var SELECTOR_SETTINGS_ICON_CLOSE = STR_DOT + CSS_SETTINGS_ICON_CLOSE;
+
+		var SELECTOR_SETTINGS_ICON_TOGGLE = '.settings-icon-toggle';
+
+		var SELECTOR_SETTINGS_LIMIT = STR_DOT + STR_SETTINGS_LIMIT;
+
+		var SELECTOR_SOCIAL_ACTIVITY_ITEM = '.social-activity-item';
+
+		var SELECTOR_SOCIAL_ACTIVITY_CONTENT = '.social-activity-details';
+
+		var SELECTOR_UPDATE_SOCIAL_ACTIVITY_FORM = 'form.update-socialactivity-form';
+
+		var SRC_UI = {
+			src: STR_UI
+		};
+
+		var TPL_BUTTON_HOLDER = '<button class="' + [STR_SETTINGS_BUTTON_HOLDER].join(STR_SPACE) + ' btn btn-submit">' + STR_SAVE + '</button>';
+
+		var TPL_BOUNDING_BOX_SETTINGS_FIELD = '<li class="' + [CSS_TOKEN, STR_SETTINGS_FIELD, STR_ACTION_FIELD].join(STR_SPACE) + '"></li>';
+
+		var TPL_CONTRIBUTION_INCREMENT = '<span class="contribution-increment"></span>';
+
+		var TPL_FIELD = new A.Template(
+			'<span class="settings-label">{labelText}</span>',
+			'<div class="settings-controls">',
+				'<div class="field-values">',
+					'<span class="field field-text">{firstText}</span>',
+
+					'<select id="{languageKey}_participationIncrement" class="settings-field-node">',
+						'<tpl for="participationIncrements">',
+							'<option {[ (values == parent.participationIncrement) ? "selected" : "" ]} title="{.}" value="{.}">{.}</option>',
+						'</tpl>',
+					'</select>',
+
+					'<span class="field field-text">{secondText}</span>',
+
+					'<select id="{languageKey}_contributionIncrement" class="settings-field-node">',
+						'<tpl for="contributionIncrements">',
+							'<option {[ (values == parent.contributionIncrement) ? "selected" : "" ]} title="{.}" value="{.}">{.}</option>',
+						'</tpl>',
+					'</select>',
+
+					'<span class="field field-text">{thirdText}</span> <span class="field field-text field-contribution-text">{fourthText}</span>',
+				'</div>',
+				'<tpl if="rows.length">',
+					'<div class="settings-field-buttons">',
+						'<tpl for="buttons">',
+							'<a class="settings-button settings-button-{type}" href="javascript:;" title="{title}">',
+								'<span class="settings-icon settings-icon-{type} {cssClass}">{text}</span>',
+							'</a>',
+						'</tpl>',
+					'</div>',
+				'</tpl>',
+
+				'<div class="hide settings-limit">',
+					'<tpl for="rows">',
+						'<div class="settings-limit-row">',
+							'<span class="field field-text">{limitFirstText}</span>',
+							'<select id="{parent.languageKey}_{type}LimitValue" class="settings-field-node">',
+								'<tpl for="limitValues">',
+									'<option {[ (values == parent.limitValue) ? "selected" : "" ]} title="{.}" value="{.}">{.}</option>',
+								'</tpl>',
+							'</select>',
+							'<select id="{parent.languageKey}_{type}LimitPeriod" class="settings-field-node">',
+								'<tpl for="limitPeriods">',
+									'<option {[ ($index == parent.limitPeriod) ? "selected" : "" ]} title="{.}" value="{$index}">{.}</option>',
+								'</tpl>',
+							'</select>',
+							'<tpl if="limitSecondText">',
+								'<span class="field field-text">{limitSecondText}.</span>',
+							'</tpl>',
+						'</div>',
+					'</tpl>',
+				'</div>',
+			'</div>'
+		);
+
+		var TPL_SETTINGS_DISPLAY = new A.Template(
+			'<div class="settings-header yui3-widget-hd">',
+				'<div class="settings-header-label">{headerText}</div>',
+				'<ul class="settings-actions">',
+					'<li class="actions-conjunction hide">{conjunctionText}</li>',
+				'</ul>',
+			'</div>',
+			'<div class="settings-container-label">{containerText}</div>',
+			'<ul class="container-drop-box yui3-widget-bd"></ul>',
+			'<div class="btn-row yui3-widget-ft">',
+				'<button class="btn btn-primary btn-submit">{saveText}</button>',
+			'</div>'
+		);
+
+		var SocialActivityAdmin = A.Component.create(
+			{
+				AUGMENTS: [Liferay.PortletBase],
+
+				EXTENDS: A.Base,
+
+				NAME: 'socialactivityadmin',
+
+				prototype: {
+					initializer: function(config) {
+						var instance = this;
+
+						instance._originalConfig = config;
+
+						instance._contentBox = A.one(SELECTOR_SOCIAL_ACTIVITY_CONTENT);
+
+						var socialActivityForm = A.one(SELECTOR_UPDATE_SOCIAL_ACTIVITY_FORM);
+
+						var settingsInput = instance._getItemByName(socialActivityForm, STR_SETTINGS_JSON);
+
+						var settings = instance.byId(STR_SETTINGS);
+
+						var socialActivityItems = A.all(SELECTOR_SOCIAL_ACTIVITY_ITEM);
+
+						socialActivityForm.detach(STR_EVENT_SUBMIT);
+
+						socialActivityForm.on(STR_EVENT_SUBMIT, instance._onSocialActivityFormSubmit, instance);
+
+						instance._socialActivityForm = socialActivityForm;
+
+						instance._settingsInput = settingsInput;
+
+						var getSocialActivitySettingMappingCallback = function(result, modelName) {
+							if (result.length > 0) {
+								config.dataSet = result;
+								config.modelName = modelName;
+
+								instance._addSettingsDisplay(config);
+							}
+						};
+
+						settings.delegate(
+							'click',
+							A.throttle(
+								function(event) {
+									var currentTarget = event.currentTarget;
+
+									if (currentTarget.test(SELECTOR_SOCIAL_ACTIVITY_ITEM) && !event.target.test('input')) {
+										instance._revealSection(currentTarget, getSocialActivitySettingMappingCallback);
+									}
+									else if (currentTarget.test(SELECTOR_INPUT)) {
+										instance._updateCheckboxStatus(event);
+									}
+								},
+								250
+							),
+							[SELECTOR_SOCIAL_ACTIVITY_ITEM, SELECTOR_INPUT].join()
+						);
+
+						var lastIndex = socialActivityItems.size() - 1;
+
+						A.some(
+							socialActivityItems,
+							function(item, index, collection) {
+								var checked = item.one(SELECTOR_INPUT).attr('checked');
+								var node = item;
+
+								if (!checked && index == lastIndex) {
+									checked = true;
+
+									node = collection.item(0);
+								}
+
+								var modelName = node.attr(STR_DATA_MODEL_NAME);
+
+								if (checked) {
+									instance._getSocialActivitySettingMapping(
+										themeDisplay.getScopeGroupIdOrLiveGroupId(),
+										modelName,
+										function(result) {
+											getSocialActivitySettingMappingCallback(result, modelName);
+										}
+									);
+
+									node.addClass(STR_SELECTED);
+								}
+
+								return checked;
+							}
+						);
+					},
+
+					_revealSection: function(menuItem, getSocialActivitySettingMappingCallback) {
+						var instance = this;
+
+						var modelName = menuItem.attr(STR_DATA_MODEL_NAME);
+
+						menuItem.radioClass(STR_SELECTED);
+
+						instance._getSocialActivitySettingMapping(
+							themeDisplay.getScopeGroupIdOrLiveGroupId(),
+							modelName,
+							function(result) {
+								getSocialActivitySettingMappingCallback(result, modelName);
+							}
+						);
+					},
+
+					_addSettingsDisplay: function(config) {
+						var instance = this;
+
+						instance.settingsDisplay = new SettingsDisplay(config).render(instance._contentBox.empty());
+					},
+
+					_getItemByName: function(currentForm, name, ignoreNamespace) {
+						var instance = this;
+
+						var inputName = name;
+
+						if (!ignoreNamespace) {
+							inputName = instance.NS + name;
+						}
+
+						return currentForm.one('[name=' + inputName + ']');
+					},
+
+					_getJsonSettings: function(settingsDisplay) {
+						var instance = this;
+
+						return {
+							actions: settingsDisplay.getSettingsJSON(),
+							modelName: instance._originalConfig.modelName
+						};
+					},
+
+					_getSocialActivitySettingMapping: function(groupId, modelName, callback) {
+						var instance = this;
+
+						Liferay.Service(
+							'/socialactivitysetting/get-json-activity-definitions',
+							{
+								groupId: groupId,
+								className: modelName
+							},
+							callback
+						);
+					},
+
+					_onSocialActivityFormSubmit: function(event) {
+						var instance = this;
+
+						var form = event.currentTarget;
+
+						event.halt();
+
+						instance._updateSocialActivitySettings(form);
+
+						submitForm(form);
+					},
+
+					_updateCheckboxStatus: function(event) {
+						var instance = this;
+
+						var currentTarget = event.currentTarget;
+
+						var modelName = currentTarget.ancestor(SELECTOR_SOCIAL_ACTIVITY_ITEM).attr(STR_DATA_MODEL_NAME);
+
+						Liferay.Service(
+							'/socialactivitysetting/update-activity-setting',
+							{
+								groupId: themeDisplay.getScopeGroupIdOrLiveGroupId(),
+								className: modelName,
+								enabled: currentTarget.attr('checked')
+							}
+						);
+					},
+
+					_updateSocialActivitySettings: function(form) {
+						var instance = this;
+
+						instance._settingsInput.val(A.JSON.stringify(instance._getJsonSettings(instance.settingsDisplay)));
+					}
+				}
+			}
+		);
+
+		var SettingsDisplay = A.Component.create(
+			{
+				ATTRS: {
+
+					buttonsNode: {
+						valueFn: function() {
+							return Node.create(TPL_BUTTON_HOLDER);
+						}
+					},
+
+					id: {
+						value: STR_BLANK
+					},
+
+					modelName: {
+						value: STR_BLANK
+					}
+				},
+
+				NAME: STR_SETTINGS_DISPLAY,
+
+				prototype: {
+					initializer: function(config) {
+						var instance = this;
+
+						instance._settingsFields = {};
+					},
+
+					renderUI: function() {
+						var instance = this;
+
+						var contentBox = instance.get(STR_CONTENT_BOX);
+
+						var originalConfig = instance._originalConfig;
+
+						var activityDefinitionLanguageKeys = originalConfig.activityDefinitionLanguageKeys;
+
+						var settingsNode = TPL_SETTINGS_DISPLAY.render(
+							{
+								conjunctionText: Liferay.Language.get('or').toLowerCase(),
+								containerText: Liferay.Language.get('social-activity-setting-container-label'),
+								headerText: Liferay.Language.get('social-activity-setting-header-label'),
+								saveText: STR_SAVE
+							}
+						);
+
+						var bodyNode = settingsNode.one('.container-drop-box');
+						var headerNode = settingsNode.one('.settings-header');
+
+						var actionsNode = headerNode.one('.settings-actions');
+
+						A.each(
+							originalConfig.dataSet,
+							function(item, index, collection) {
+								item.localizedName = activityDefinitionLanguageKeys[item.modelName + '.' + item.languageKey];
+
+								item.settingsDisplay = instance;
+								item.counterSettings = originalConfig.counterSettings;
+
+								var settingsField = new SettingsField(item);
+
+								settingsField.addTarget(instance);
+
+								var renderNode = actionsNode;
+
+								if (settingsField.get(STR_ACTIVE)) {
+									renderNode = bodyNode;
+								}
+
+								settingsField.render(renderNode);
+
+								instance._settingsFields[settingsField.get(STR_LANGUAGE_KEY)] = settingsField;
+							}
+						);
+
+						instance.actionsNode = actionsNode;
+						instance.bodyNode = bodyNode;
+						instance.headerNode = headerNode;
+
+						instance._handleConjunction();
+
+						contentBox.append(settingsNode);
+					},
+
+					bindUI: function() {
+						var instance = this;
+
+						instance.actionsNode.delegate('click', A.rbind('_toggleField', instance, false), SELECTOR_SETTINGS_FIELD, instance);
+
+						instance.bodyNode.delegate('click', instance._onBodyNodeClick, [SELECTOR_SETTINGS_ICON_CLOSE, SELECTOR_SETTINGS_ICON_TOGGLE].join(), instance);
+
+						instance.after('settings-field:collapsedChange', instance._afterSettingsFieldCollapsed);
+					},
+
+					getSettingsJSON: function() {
+						var instance = this;
+
+						var settingsJSON = [];
+
+						var settingsFields = instance._settingsFields;
+
+						for (var i in settingsFields) {
+							settingsJSON.push(settingsFields[i].getSettingsJSON());
+						}
+
+						return settingsJSON;
+					},
+
+					_afterSettingsFieldCollapsed: function(event) {
+						var instance = this;
+
+						var collapsed = event.newVal;
+
+						var item = event.target.get(STR_BOUNDING_BOX);
+
+						var node = instance.actionsNode;
+
+						if (!collapsed) {
+							node = instance.bodyNode;
+						}
+						else {
+							instance._toggleLimitFields(item, false);
+						}
+
+						node.append(item);
+					},
+
+					_handleConjunction: function() {
+						var instance = this;
+
+						var actionsNode = instance.actionsNode;
+
+						var actionsConjunction = instance._actionsConjunction;
+
+						if (!actionsConjunction) {
+							actionsConjunction = actionsNode.one(SELECTOR_CONJUNCTION);
+
+							instance._actionsConjunction = actionsConjunction;
+						}
+
+						var children = actionsNode.all(SELECTOR_SETTINGS_FIELD);
+
+						var childrenSize = children.size();
+
+						if (childrenSize > 1) {
+							actionsNode.insert(actionsConjunction, children.last());
+
+							actionsConjunction.show();
+						}
+						else {
+							actionsConjunction.hide();
+
+							instance.headerNode.toggle(childrenSize == 1);
+						}
+					},
+
+					_onBodyNodeClick: function(event) {
+						var instance = this;
+
+						var currentTarget = event.currentTarget;
+
+						if (currentTarget.test(SELECTOR_SETTINGS_ICON_CLOSE)) {
+							instance._toggleField(event, true);
+						}
+						else {
+							var collapsed = !(currentTarget.hasClass(CSS_SETTINGS_ICON_EXPANDED));
+
+							instance._toggleLimitFields(currentTarget.ancestor(SELECTOR_SETTINGS_FIELD), collapsed);
+						}
+					},
+
+					_toggleField: function(event, collapsed) {
+						var instance = this;
+
+						var field = Widget.getByNode(event.currentTarget);
+
+						field.set('collapsed', collapsed, SRC_UI);
+
+						field.set(STR_ACTIVE, !collapsed);
+
+						instance._handleConjunction();
+					},
+
+					_toggleLimitFields: function(item, collapsed) {
+						var instance = this;
+
+						item.one(SELECTOR_SETTINGS_LIMIT).toggle(collapsed);
+
+						var toggleIcon = item.one(SELECTOR_SETTINGS_ICON_TOGGLE);
+
+						var title = STR_EXPAND;
+
+						if (collapsed) {
+							title = STR_COLLAPSE;
+						}
+
+						toggleIcon.toggleClass(CSS_SETTINGS_ICON_EXPANDED, collapsed);
+
+						toggleIcon.attr('title', title);
+					}
+				}
+			}
+		);
+
+		var SettingsField = A.Component.create(
+			{
+				ATTRS: {
+					active: {
+						value: false
+					},
+
+					activityType: {
+						value: 0
+					},
+
+					collapsed: {
+						value: false
+					},
+
+					contributionIncrement: {
+						value: 0
+					},
+
+					contributionLimitEnabled: {
+						value: true
+					},
+
+					contributionLimitPeriod: {
+						value: 1
+					},
+
+					contributionLimitValue: {
+						value: 0
+					},
+
+					languageKey: {
+						value: STR_BLANK
+					},
+
+					localizedName: {
+						value: STR_BLANK
+					},
+
+					participationIncrement: {
+						value: 0
+					},
+
+					participationLimitEnabled: {
+						value: true
+					},
+
+					participationLimitPeriod: {
+						value: 1
+					},
+
+					participationLimitValue: {
+						value: 0
+					},
+
+					selected: {
+						setter: A.DataType.Boolean.parse,
+						value: false
+					}
+				},
+
+				NAME: STR_SETTINGS_FIELD,
+
+				UI_ATTRS: ['collapsed', 'contributionIncrement'],
+
+				prototype: {
+					BOUNDING_TEMPLATE: TPL_BOUNDING_BOX_SETTINGS_FIELD,
+
+					initializer: function(config) {
+						var instance = this;
+
+						var counters = config.counters;
+
+						instance._counterSettings = config.counterSettings;
+						instance._settingsDisplay = config.settingsDisplay;
+
+						var incrementKey = STR_BLANK;
+						var limitEnabledKey = STR_BLANK;
+						var limitPeriodKey = STR_BLANK;
+						var limitValueKey = STR_BLANK;
+
+						var attrs = {};
+
+						for (var i = 0; i < counters.length; i++) {
+							var counter = counters[i];
+
+							incrementKey = STR_CONTRIBUTION_INCREMENT;
+							limitEnabledKey = STR_CONTRIBUTION_LIMIT_ENABLED;
+							limitPeriodKey = STR_CONTRIBUTION_LIMIT_PERIOD;
+							limitValueKey = STR_CONTRIBUTION_LIMIT_VALUE;
+
+							if (counter.name == 'participation') {
+								incrementKey = STR_PARTICIPATION_INCREMENT;
+								limitEnabledKey = STR_PARTICIPATION_LIMIT_ENABLED;
+								limitPeriodKey = STR_PARTICIPATION_LIMIT_PERIOD;
+								limitValueKey = STR_PARTICIPATION_LIMIT_VALUE;
+							}
+							else if (counter.name != 'contribution') {
+								continue;
+							}
+
+							attrs[incrementKey] = counter.increment;
+							attrs[limitEnabledKey] = counter.limitEnabled;
+							attrs[limitPeriodKey] = counter.limitPeriod;
+							attrs[limitValueKey] = counter.limitValue;
+
+							if (counter.enabled) {
+								attrs[STR_ACTIVE] = true;
+							}
+						}
+
+						instance.setAttrs(attrs);
+					},
+
+					renderUI: function() {
+						var instance = this;
+
+						var contentBox = instance.get(STR_CONTENT_BOX);
+
+						instance.get(STR_BOUNDING_BOX).attr(STR_LANGUAGE_KEY, instance.get(STR_LANGUAGE_KEY));
+
+						var counterSettings = instance._counterSettings;
+
+						var rows = [];
+
+						if (instance.get(STR_CONTRIBUTION_LIMIT_ENABLED)) {
+							rows.push(
+								{
+									limitFirstText: Liferay.Language.get('social-activity-setting-contribution-limit-first-text'),
+									limitPeriod: instance.get(STR_CONTRIBUTION_LIMIT_PERIOD),
+									limitPeriods: COL_LIMIT_TYPE,
+									limitSecondText: Liferay.Language.get('social-activity-setting-limit-second-text'),
+									limitValue: instance.get(STR_CONTRIBUTION_LIMIT_VALUE),
+									limitValues: counterSettings.contributionLimitValues,
+									type: 'contribution'
+								}
+							);
+						}
+
+						if (instance.get(STR_PARTICIPATION_LIMIT_ENABLED)) {
+							rows.push(
+								{
+									limitFirstText: Liferay.Language.get('social-activity-setting-participation-limit-first-text'),
+									limitPeriod: instance.get(STR_PARTICIPATION_LIMIT_PERIOD),
+									limitPeriods: COL_LIMIT_TYPE,
+									limitSecondText: null,
+									limitValue: instance.get(STR_PARTICIPATION_LIMIT_VALUE),
+									limitValues: counterSettings.participationLimitValues,
+									type: 'participation'
+								}
+							);
+						}
+
+						var limitNode = TPL_FIELD.render(
+							{
+								buttons: [
+									{
+										text: Liferay.Language.get('limit'),
+										title: STR_EXPAND,
+										type: 'toggle'
+									},
+									{
+										title: Liferay.Language.get('close'),
+										type: 'close'
+									}
+								],
+								contributionIncrement: instance.get(STR_CONTRIBUTION_INCREMENT),
+								contributionIncrements: counterSettings.contributionIncrements,
+								firstText: Liferay.Language.get('social-activity-setting-first-text'),
+								fourthText: Lang.sub(Liferay.Language.get('social-activity-setting-fourth-text'), [TPL_CONTRIBUTION_INCREMENT]),
+								labelText: instance.get(STR_LOCALIZED_NAME),
+								languageKey: instance.get(STR_LANGUAGE_KEY),
+								participationIncrement: instance.get(STR_PARTICIPATION_INCREMENT),
+								participationIncrements: counterSettings.participationIncrements,
+								rows: rows,
+								secondText: Liferay.Language.get('social-activity-setting-second-text'),
+								thirdText: Liferay.Language.get('social-activity-setting-third-text')
+							}
+						);
+
+						limitNode.all('select').on('change', instance._selectOnChange, instance);
+
+						contentBox.append(limitNode);
+					},
+
+					syncUI: function() {
+						var instance = this;
+
+						instance.set('collapsed', !instance.get(STR_ACTIVE));
+					},
+
+					getSettingsJSON: function() {
+						var instance = this;
+
+						return instance.getAttrs(
+							[
+								STR_ACTIVE,
+								STR_ACTIVITY_TYPE,
+								STR_CONTRIBUTION_INCREMENT,
+								STR_CONTRIBUTION_LIMIT_ENABLED,
+								STR_CONTRIBUTION_LIMIT_PERIOD,
+								STR_CONTRIBUTION_LIMIT_VALUE,
+								STR_LANGUAGE_KEY,
+								STR_PARTICIPATION_INCREMENT,
+								STR_PARTICIPATION_LIMIT_ENABLED,
+								STR_PARTICIPATION_LIMIT_PERIOD,
+								STR_PARTICIPATION_LIMIT_VALUE
+							]
+						);
+					},
+
+					_selectOnChange: function(event) {
+						var instance = this;
+
+						var selectId = event.currentTarget.attr('id');
+
+						var languageKey = instance.get(STR_LANGUAGE_KEY);
+
+						selectId = selectId.replace(languageKey + '_', STR_BLANK);
+
+						instance.set(selectId, event.currentTarget.val(), SRC_UI);
+					},
+
+					_setToDefaultValue: function() {
+						var instance = this;
+
+						instance.reset(STR_CONTRIBUTION_INCREMENT);
+						instance.reset(STR_CONTRIBUTION_LIMIT_PERIOD);
+						instance.reset(STR_CONTRIBUTION_LIMIT_VALUE);
+						instance.reset(STR_PARTICIPATION_INCREMENT);
+						instance.reset(STR_PARTICIPATION_LIMIT_PERIOD);
+						instance.reset(STR_PARTICIPATION_LIMIT_VALUE);
+					},
+
+					_uiSetCollapsed: function(value) {
+						var instance = this;
+
+						var boundingBox = instance.get(STR_BOUNDING_BOX);
+
+						boundingBox.toggleClass(STR_CONTENT_FIELD, !value);
+						boundingBox.toggleClass(CSS_TOKEN, value);
+					},
+
+					_uiSetContributionIncrement: function(value, src) {
+						var instance = this;
+
+						var contributionIncrementNode = instance.get(STR_CONTENT_BOX).one('.contribution-increment');
+
+						if (contributionIncrementNode) {
+							contributionIncrementNode.html(value);
+
+							if (src == STR_UI) {
+								var parent = contributionIncrementNode.ancestor();
+
+								parent.setStyle('backgroundColor', SocialActivity.FADE_COLOR_START);
+
+								parent.transition(
+									{
+										backgroundColor: SocialActivity.FADE_COLOR_END,
+										duration: 1.5
+									}
+								);
+							}
+						}
+					}
+				}
+			}
+		);
+
+		var SocialActivity = Liferay.namespace('Portlet.SocialActivity');
+
+		SocialActivity.Admin = SocialActivityAdmin;
+		SocialActivity.SettingsDisplay = SettingsDisplay;
+		SocialActivity.SettingsField = SettingsField;
+
+		SocialActivity.FADE_COLOR_END = 'transparent';
+		SocialActivity.FADE_COLOR_START = '#F7F082';
+	},
+	'',
+	{
+		requires: ['aui-base', 'aui-datatype', 'aui-template-deprecated', 'liferay-portlet-base', 'transition']
+	}
+);
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/social_activity/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/social_activity/view.jsp
new file mode 100644
index 0000000..db1321d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/social_activity/view.jsp
@@ -0,0 +1,97 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/social_activity/init.jsp" %>
+
+<%
+Map<String, Boolean> activitySettingsMap = (Map<String, Boolean>)request.getAttribute(WebKeys.SOCIAL_ACTIVITY_SETTINGS_MAP);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/social_activity/view");
+%>
+
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
+
+<portlet:actionURL var="saveActivitySettingsURL">
+	<portlet:param name="struts_action" value="/social_activity/view" />
+</portlet:actionURL>
+
+<aui:form action="<%= saveActivitySettingsURL.toString() %>" cssClass="update-socialactivity-form" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+	<aui:input id="settingsJSON" name="settingsJSON" type="hidden" />
+
+	<h4>
+		<liferay-ui:message key="enable-social-activity-for" />:
+	</h4>
+
+	<aui:row cssClass="social-activity social-activity-settings" id="settings">
+		<aui:col cssClass="social-activity-items" width="<%= 20 %>">
+
+			<%
+			for (String className : activitySettingsMap.keySet()) {
+				String localizedClassName = ResourceActionsUtil.getModelResource(locale, className);
+
+				boolean enabled = activitySettingsMap.get(className);
+			%>
+
+				<h4 class="social-activity-item" data-modelName="<%= className %>" title="<%= localizedClassName %>">
+					<div class="social-activity-item-content">
+						<aui:input disabled="<%= !SocialActivityPermissionUtil.contains(permissionChecker, themeDisplay.getSiteGroupId(), ActionKeys.CONFIGURATION) %>" inlineField="<%= true %>" label="" name='<%= className + ".enabled" %>' title="" type="checkbox" value="<%= enabled %>" />
+
+						<a class="settings-label" href="javascript:;"><%= localizedClassName %></a>
+					</div>
+				</h4>
+
+			<%
+			}
+			%>
+
+		</aui:col>
+		<aui:col cssClass="social-activity-details" width="<%= 80 %>" />
+	</aui:row>
+
+	<%
+	List<String> activityDefinitionLanguageKeys = new ArrayList<String>();
+
+	for (String modelName : activitySettingsMap.keySet()) {
+		List<SocialActivityDefinition> activityDefinitions = SocialConfigurationUtil.getActivityDefinitions(modelName);
+
+		for (SocialActivityDefinition activityDefinition : activityDefinitions) {
+			activityDefinitionLanguageKeys.add("'" + modelName + "." + activityDefinition.getLanguageKey() + "': \"" + activityDefinition.getName(locale) + "\"");
+		}
+	}
+	%>
+
+	<aui:script use="liferay-social-activity-admin">
+		new Liferay.Portlet.SocialActivity.Admin(
+			{
+				activityDefinitionLanguageKeys: {
+					<%= StringUtil.merge(activityDefinitionLanguageKeys) %>
+				},
+				counterSettings: {
+					contributionIncrements: [<%= StringUtil.merge(PropsValues.SOCIAL_ACTIVITY_CONTRIBUTION_INCREMENTS) %>],
+					contributionLimitValues: [<%= StringUtil.merge(PropsValues.SOCIAL_ACTIVITY_CONTRIBUTION_LIMIT_VALUES) %>],
+					participationIncrements: [<%= StringUtil.merge(PropsValues.SOCIAL_ACTIVITY_PARTICIPATION_INCREMENTS) %>],
+					participationLimitValues: [<%= StringUtil.merge(PropsValues.SOCIAL_ACTIVITY_PARTICIPATION_LIMIT_VALUES) %>]
+				},
+				namespace: '<portlet:namespace />',
+				portletId: '<%= portletDisplay.getId() %>'
+			}
+		);
+	</aui:script>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/edit_framework_version.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/edit_framework_version.jsp
new file mode 100644
index 0000000..2219364
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/edit_framework_version.jsp
@@ -0,0 +1,120 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/software_catalog/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+SCFrameworkVersion frameworkVersion = (SCFrameworkVersion)request.getAttribute(WebKeys.SOFTWARE_CATALOG_FRAMEWORK_VERSION);
+
+long frameworkVersionId = BeanParamUtil.getLong(frameworkVersion, request, "frameworkVersionId");
+%>
+
+<form action="<portlet:actionURL><portlet:param name="struts_action" value="/software_catalog/edit_framework_version" /></portlet:actionURL>" method="post" name="<portlet:namespace />fm" onSubmit="<portlet:namespace />saveFrameworkVersion(); return false;">
+<input name="<portlet:namespace /><%= Constants.CMD %>" type="hidden" value="" />
+<input name="<portlet:namespace />redirect" type="hidden" value="<%= HtmlUtil.escapeAttribute(redirect) %>" />
+<input name="<portlet:namespace />frameworkVersionId" type="hidden" value="<%= frameworkVersionId %>" />
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	localizeTitle="<%= (frameworkVersion == null) %>"
+	title='<%= (frameworkVersion == null) ? "new-framework-version" : frameworkVersion.getName() %>'
+/>
+
+<liferay-ui:error exception="<%= FrameworkVersionNameException.class %>" message="please-enter-a-valid-name" />
+
+<table class="lfr-table">
+<tr>
+	<td>
+		<liferay-ui:message key="name" />
+	</td>
+	<td>
+		<liferay-ui:input-field autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" bean="<%= frameworkVersion %>" field="name" model="<%= SCFrameworkVersion.class %>" />
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="url" />
+	</td>
+	<td>
+		<liferay-ui:input-field bean="<%= frameworkVersion %>" field="url" model="<%= SCFrameworkVersion.class %>" />
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="active" />
+	</td>
+	<td>
+		<liferay-ui:input-field bean="<%= frameworkVersion %>" defaultValue="<%= Boolean.TRUE %>" field="active" model="<%= SCFrameworkVersion.class %>" />
+	</td>
+</tr>
+
+<c:if test="<%= frameworkVersion == null %>">
+	<tr>
+		<td colspan="2">
+			<br />
+		</td>
+	</tr>
+	<tr>
+		<td>
+			<liferay-ui:message key="permissions" />
+		</td>
+		<td>
+			<liferay-ui:input-permissions
+				modelName="<%= SCFrameworkVersion.class.getName() %>"
+			/>
+		</td>
+	</tr>
+</c:if>
+
+</table>
+
+<div class="btn-toolbar">
+	<aui:button cssClass="btn-primary" type="submit" value="save" />
+
+	<%
+	String taglibCancel = "location.href = '" + HtmlUtil.escape(PortalUtil.escapeRedirect(redirect)) + "';";
+	%>
+
+	<aui:button onClick="<%= taglibCancel %>" value="cancel" />
+</div>
+</form>
+
+<aui:script>
+	function <portlet:namespace />saveFrameworkVersion() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (frameworkVersion == null) ? Constants.ADD : Constants.UPDATE %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/software_catalog/view");
+portletURL.setParameter("tabs1", "framework_versions");
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "framework-versions"), portletURL.toString());
+
+if (frameworkVersion != null) {
+	PortalUtil.addPortletBreadcrumbEntry(request, frameworkVersion.getName(), null);
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit"), currentURL);
+}
+else {
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "add-framework-version"), currentURL);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/edit_license.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/edit_license.jsp
new file mode 100644
index 0000000..670b558
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/edit_license.jsp
@@ -0,0 +1,118 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/software_catalog/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+SCLicense license = (SCLicense)request.getAttribute(WebKeys.SOFTWARE_CATALOG_LICENSE);
+
+long licenseId = BeanParamUtil.getLong(license, request, "licenseId");
+%>
+
+<form action="<portlet:actionURL><portlet:param name="struts_action" value="/software_catalog/edit_license" /></portlet:actionURL>" method="post" name="<portlet:namespace />fm" onSubmit="<portlet:namespace />saveLicense(); return false;">
+<input name="<portlet:namespace /><%= Constants.CMD %>" type="hidden" value="" />
+<input name="<portlet:namespace />redirect" type="hidden" value="<%= HtmlUtil.escapeAttribute(redirect) %>" />
+<input name="<portlet:namespace />licenseId" type="hidden" value="<%= licenseId %>" />
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	localizeTitle="<%= (license == null) %>"
+	title='<%= (license == null) ? "new-license" : license.getName() %>'
+/>
+
+<liferay-ui:error exception="<%= LicenseNameException.class %>" message="please-enter-a-valid-name" />
+<liferay-ui:error exception="<%= RequiredLicenseException.class %>" message="the-selected-license-is-used-by-at-least-one-product" />
+
+<table class="lfr-table">
+<tr>
+	<td>
+		<liferay-ui:message key="name" />
+	</td>
+	<td>
+		<liferay-ui:input-field autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" bean="<%= license %>" field="name" model="<%= SCLicense.class %>" />
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="url" />
+	</td>
+	<td>
+		<liferay-ui:input-field bean="<%= license %>" field="url" model="<%= SCLicense.class %>" />
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="open-source" />
+	</td>
+	<td>
+		<liferay-ui:input-field bean="<%= license %>" defaultValue="<%= Boolean.TRUE %>" field="openSource" model="<%= SCLicense.class %>" />
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="active" />
+	</td>
+	<td>
+		<liferay-ui:input-field bean="<%= license %>" defaultValue="<%= Boolean.TRUE %>" field="active" model="<%= SCLicense.class %>" />
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="recommended" />
+	</td>
+	<td>
+		<liferay-ui:input-field bean="<%= license %>" defaultValue="<%= Boolean.TRUE %>" field="recommended" model="<%= SCLicense.class %>" />
+	</td>
+</tr>
+</table>
+
+<div class="btn-toolbar">
+	<aui:button cssClass="btn-primary" type="submit" value="save" />
+
+	<%
+	String taglibCancel = "location.href = '" + HtmlUtil.escape(PortalUtil.escapeRedirect(redirect)) + "';";
+	%>
+
+	<aui:button onClick="<%= taglibCancel %>" value="cancel" />
+</div>
+</form>
+
+<aui:script>
+	function <portlet:namespace />saveLicense() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (license == null) ? Constants.ADD : Constants.UPDATE %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/software_catalog/view");
+portletURL.setParameter("tabs1", "licenses");
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "licenses"), portletURL.toString());
+
+if (license != null) {
+	PortalUtil.addPortletBreadcrumbEntry(request, license.getName(), null);
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit"), currentURL);
+}
+else {
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "add-license"), currentURL);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/edit_product_entry.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/edit_product_entry.jsp
new file mode 100644
index 0000000..3cef043
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/edit_product_entry.jsp
@@ -0,0 +1,344 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/software_catalog/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+SCProductEntry productEntry = (SCProductEntry)request.getAttribute(WebKeys.SOFTWARE_CATALOG_PRODUCT_ENTRY);
+
+long productEntryId = BeanParamUtil.getLong(productEntry, request, "productEntryId");
+
+String type = BeanParamUtil.getString(productEntry, request, "type");
+
+Set<Long> licenseIds = new HashSet<Long>();
+
+if ((productEntry != null) && (request.getParameterValues("licenses") == null)) {
+	for (SCLicense license : productEntry.getLicenses()) {
+		licenseIds.add(license.getLicenseId());
+	}
+}
+else {
+	long[] licenses = ParamUtil.getLongValues(request, "licenses");
+
+	for (int i = 0; i < licenses.length; i++) {
+		licenseIds.add(licenses[i]);
+	}
+}
+
+List productScreenshots = SCProductScreenshotLocalServiceUtil.getProductScreenshots(productEntryId);
+
+int screenshotsCount = ParamUtil.getInteger(request, "screenshotsCount", productScreenshots.size());
+%>
+
+<form action="<portlet:actionURL><portlet:param name="struts_action" value="/software_catalog/edit_product_entry" /></portlet:actionURL>" enctype="multipart/form-data" method="post" name="<portlet:namespace />fm" onSubmit="<portlet:namespace />saveProductEntry(); return false;">
+<input name="<portlet:namespace /><%= Constants.CMD %>" type="hidden" value="" />
+<input name="<portlet:namespace />redirect" type="hidden" value="<%= HtmlUtil.escapeAttribute(redirect) %>" />
+<input name="<portlet:namespace />productEntryId" type="hidden" value="<%= productEntryId %>" />
+<input name="<portlet:namespace />screenshotsCount" type="hidden" value="<%= screenshotsCount %>" />
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	localizeTitle="<%= (productEntry == null) %>"
+	title='<%= (productEntry == null) ? "new-product" : productEntry.getName() %>'
+/>
+
+<liferay-ui:error exception="<%= DuplicateProductEntryModuleIdException.class %>" message="please-enter-a-unique-site-id-and-artifact-id-combination" />
+<liferay-ui:error exception="<%= ProductEntryAuthorException.class %>" message="please-enter-a-valid-author" />
+<liferay-ui:error exception="<%= ProductEntryLicenseException.class %>" message="please-select-at-least-one-license" />
+<liferay-ui:error exception="<%= ProductEntryNameException.class %>" message="please-enter-a-valid-name" />
+<liferay-ui:error exception="<%= ProductEntryPageURLException.class %>" message="please-enter-a-valid-page-url" />
+<liferay-ui:error exception="<%= ProductEntryScreenshotsException.class %>" message="screenshots-must-contain-a-valid-thumbnail-and-a-valid-full-image" />
+<liferay-ui:error exception="<%= ProductEntryShortDescriptionException.class %>" message="please-enter-a-valid-short-description" />
+<liferay-ui:error exception="<%= ProductEntryTypeException.class %>" message="please-select-a-valid-type" />
+
+<table class="lfr-table">
+<tr>
+	<td>
+		<liferay-ui:message key="name" />
+	</td>
+	<td>
+		<liferay-ui:input-field autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" bean="<%= productEntry %>" field="name" model="<%= SCProductEntry.class %>" />
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="type" />
+	</td>
+	<td>
+		<select name="<portlet:namespace />type">
+
+			<%
+			for (String supportedType : PluginPackageUtil.getSupportedTypes()) {
+			%>
+
+				<option <%= type.equals(supportedType) ? "selected" : "" %> value="<%= supportedType %>"><liferay-ui:message key='<%= supportedType + "-plugin" %>' /></option>
+
+			<%
+			}
+			%>
+
+		</select>
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="licenses" />
+	</td>
+	<td>
+		<select multiple="true" name="<portlet:namespace />licenses">
+			<optgroup label="<liferay-ui:message key="recommended-licenses" />">
+
+				<%
+				for (SCLicense license : SCLicenseLocalServiceUtil.getLicenses(true, true)) {
+				%>
+
+					<option <%= licenseIds.contains(license.getLicenseId()) ? "selected" : "" %> value="<%= license.getLicenseId() %>"><%= HtmlUtil.escape(license.getName()) %></option>
+
+				<%
+				}
+				%>
+
+			</optgroup>
+
+			<optgroup label="<liferay-ui:message key="other-licenses" />">
+
+				<%
+				for (SCLicense license : SCLicenseLocalServiceUtil.getLicenses(true, false)) {
+				%>
+
+					<option <%= licenseIds.contains(license.getLicenseId()) ? "selected" : "" %> value="<%= license.getLicenseId() %>"><%= HtmlUtil.escape(license.getName()) %></option>
+
+				<%
+				}
+				%>
+
+			</optgroup>
+		</select>
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="author" />
+	</td>
+	<td>
+		<liferay-ui:input-field bean="<%= productEntry %>" field="author" model="<%= SCProductEntry.class %>" />
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="page-url" />
+	</td>
+	<td>
+		<liferay-ui:input-field bean="<%= productEntry %>" field="pageURL" model="<%= SCProductEntry.class %>" />
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="tags" />
+	</td>
+	<td>
+		<liferay-ui:input-field bean="<%= productEntry %>" field="tags" model="<%= SCProductEntry.class %>" /> (<liferay-ui:message key="comma-delimited-list" />)
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="short-description" />
+	</td>
+	<td>
+		<liferay-ui:input-field bean="<%= productEntry %>" field="shortDescription" model="<%= SCProductEntry.class %>" />
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="long-description" />
+	</td>
+	<td>
+		<liferay-ui:input-field bean="<%= productEntry %>" field="longDescription" model="<%= SCProductEntry.class %>" />
+	</td>
+</tr>
+
+<c:if test="<%= productEntry == null %>">
+	<tr>
+		<td colspan="2">
+			<br />
+		</td>
+	</tr>
+	<tr>
+		<td>
+			<liferay-ui:message key="permissions" />
+		</td>
+		<td>
+			<liferay-ui:input-permissions
+				modelName="<%= SCProductEntry.class.getName() %>"
+			/>
+		</td>
+	</tr>
+</c:if>
+
+</table>
+
+<div class="lfr-asset-panels">
+	<liferay-ui:panel-container extended="<%= false %>" id="productEntryPanelContainer" persistState="<%= true %>">
+		<liferay-ui:panel extended="<%= false %>" id="pluginRepositoryPanel" persistState="<%= true %>" title="plugin-repository">
+			<table class="lfr-table">
+			<tr>
+				<td>
+					<liferay-ui:message key="site-id" />
+				</td>
+				<td>
+					<liferay-ui:input-field bean="<%= productEntry %>" field="repoGroupId" model="<%= SCProductEntry.class %>" />
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<liferay-ui:message key="artifact-id" />
+				</td>
+				<td>
+					<liferay-ui:input-field bean="<%= productEntry %>" field="repoArtifactId" model="<%= SCProductEntry.class %>" />
+				</td>
+			</tr>
+			</table>
+		</liferay-ui:panel>
+
+		<liferay-ui:panel extended="<%= false %>" id="screenshotsPanel" persistState="<%= true %>" title="screenshots">
+			<table class="lfr-table">
+
+			<%
+			for (int i = 0; i < screenshotsCount; i++) {
+				SCProductScreenshot productScreenshot = null;
+
+				if (i < productScreenshots.size()) {
+					productScreenshot = (SCProductScreenshot)productScreenshots.get(i);
+				}
+			%>
+
+				<tr>
+					<td>
+						<liferay-ui:message key="thumbnail" />
+					</td>
+					<td>
+						<input class="lfr-input-text" name="<portlet:namespace />thumbnail<%= i %>" type="file" />
+					</td>
+
+					<c:if test="<%= productScreenshot != null %>">
+						<td class="lfr-top" rowspan="3">
+							<table class="lfr-table">
+							<tr>
+								<td>
+									<aui:a href='<%= themeDisplay.getPathImage() + "/software_catalog?img_id=" + productScreenshot.getThumbnailId() + "&t=" + WebServerServletTokenUtil.getToken(productScreenshot.getThumbnailId()) %>' target="_blank"><liferay-ui:message key="see-thumbnail" /></aui:a>
+								</td>
+								<td>
+									<aui:a href='<%= themeDisplay.getPathImage() + "/software_catalog?img_id=" + productScreenshot.getFullImageId() + "&t=" + WebServerServletTokenUtil.getToken(productScreenshot.getFullImageId()) %>' target="_blank"><liferay-ui:message key="see-full-image" /></aui:a>
+								</td>
+							</tr>
+							<tr>
+								<td colspan="2">
+									<liferay-ui:message key="use-existing-images" /> <liferay-ui:input-checkbox param='<%= "preserveScreenshot" + i %>' defaultValue="<%= true %>" />
+								</td>
+							</tr>
+						</table>
+						</td>
+					</c:if>
+				</tr>
+				<tr>
+					<td>
+						<liferay-ui:message key="full-image" />
+					</td>
+					<td>
+						<input class="lfr-input-text" name="<portlet:namespace />fullImage<%= i %>" type="file" />
+					</td>
+				</tr>
+				<tr>
+					<td colspan="2">
+						<br />
+					</td>
+				</tr>
+
+			<%
+			}
+			%>
+
+			</table>
+
+			<div class="btn-toolbar">
+
+				<%
+				String taglibAddScreenshot = renderResponse.getNamespace() + "addScreenShot();";
+				%>
+
+				<aui:button onClick="<%= taglibAddScreenshot %>" value="add-screenshot" />
+
+				<c:if test="<%= screenshotsCount > 0 %>">
+
+					<%
+					String taglibRemoveScreenshot = renderResponse.getNamespace() + "removeScreenShot();";
+					%>
+
+					<aui:button onClick="<%= taglibRemoveScreenshot %>" value="remove-screenshot" />
+				</c:if>
+			</div>
+		</liferay-ui:panel>
+	</liferay-ui:panel-container>
+</div>
+
+<div class="btn-toolbar">
+	<aui:button cssClass="btn-primary" type="submit" value="save" />
+
+	<%
+	String taglibCancel = "location.href = '" + HtmlUtil.escape(PortalUtil.escapeRedirect(redirect)) + "';";
+	%>
+
+	<aui:button onClick="<%= taglibCancel %>" value="cancel" />
+</div>
+</form>
+
+<aui:script>
+	function <portlet:namespace />addScreenShot() {
+		document.<portlet:namespace />fm.<portlet:namespace />screenshotsCount.value = "<%= screenshotsCount + 1 %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />removeScreenShot() {
+		document.<portlet:namespace />fm.<portlet:namespace />screenshotsCount.value = "<%= screenshotsCount - 1 %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />saveProductEntry() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (productEntry == null) ? Constants.ADD : Constants.UPDATE %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
+
+<%
+if (productEntry != null) {
+	PortletURL portletURL = renderResponse.createRenderURL();
+
+	portletURL.setParameter("struts_action", "/software_catalog/view_product");
+	portletURL.setParameter("redirect", currentURL);
+	portletURL.setParameter("productEntryId", String.valueOf(productEntry.getProductEntryId()));
+
+	PortalUtil.addPortletBreadcrumbEntry(request, productEntry.getName(), portletURL.toString());
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit"), currentURL);
+}
+else {
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "add-page"), currentURL);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/edit_product_version.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/edit_product_version.jsp
new file mode 100644
index 0000000..7a2a0d3
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/edit_product_version.jsp
@@ -0,0 +1,216 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/software_catalog/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+SCProductEntry productEntry = (SCProductEntry)request.getAttribute(WebKeys.SOFTWARE_CATALOG_PRODUCT_ENTRY);
+
+productEntry = productEntry.toEscapedModel();
+
+SCProductVersion productVersion = (SCProductVersion)request.getAttribute(WebKeys.SOFTWARE_CATALOG_PRODUCT_VERSION);
+
+long productEntryId = productEntry.getProductEntryId();
+long productVersionId = BeanParamUtil.getLong(productVersion, request, "productVersionId");
+
+Set<Long> frameworkVersionIds = new HashSet<Long>();
+
+String[] frameworkVersions = request.getParameterValues("frameworkVersions");
+
+if ((productVersion != null) && (frameworkVersions == null)) {
+	for (SCFrameworkVersion frameworkVersion : productVersion.getFrameworkVersions()) {
+		frameworkVersionIds.add(frameworkVersion.getFrameworkVersionId());
+	}
+}
+else {
+	long[] frameworkVersionIdsArray = GetterUtil.getLongValues(frameworkVersions);
+
+	for (int i = 0; i < frameworkVersionIdsArray.length; i++) {
+		frameworkVersionIds.add(frameworkVersionIdsArray[i]);
+	}
+}
+
+boolean testDirectDownloadURL = ParamUtil.getBoolean(request, "testDirectDownloadURL", true);
+
+PortletURL editProductEntryURL = renderResponse.createRenderURL();
+
+editProductEntryURL.setParameter("struts_action", "/software_catalog/edit_product_entry");
+editProductEntryURL.setParameter("redirect", currentURL);
+editProductEntryURL.setParameter("productEntryId", String.valueOf(productEntryId));
+%>
+
+<form action="<portlet:actionURL><portlet:param name="struts_action" value="/software_catalog/edit_product_version" /><portlet:param name="productEntryId" value="<%= String.valueOf(productEntryId) %>" /></portlet:actionURL>" method="post" name="<portlet:namespace />fm" onSubmit="<portlet:namespace />saveEntry(); return false;">
+<input name="<portlet:namespace /><%= Constants.CMD %>" type="hidden" value="" />
+<input name="<portlet:namespace />redirect" type="hidden" value="<%= HtmlUtil.escapeAttribute(redirect) %>" />
+<input name="<portlet:namespace />productVersionId" type="hidden" value="<%= productVersionId %>" />
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	localizeTitle="<%= false %>"
+	title="<%= productEntry.getName() %>"
+/>
+
+<liferay-ui:error exception="<%= DuplicateProductVersionDirectDownloadURLException.class %>" message="please-enter-a-unique-direct-download-url" />
+<liferay-ui:error exception="<%= ProductVersionChangeLogException.class %>" message="please-enter-a-valid-change-log" />
+<liferay-ui:error exception="<%= ProductVersionDownloadURLException.class %>" message="please-enter-a-download-page-url-or-a-direct-download-url" />
+<liferay-ui:error exception="<%= ProductVersionFrameworkVersionException.class %>" message="please-select-at-least-one-framework-version" />
+<liferay-ui:error exception="<%= ProductVersionNameException.class %>" message="please-enter-a-valid-version-name" />
+<liferay-ui:error exception="<%= UnavailableProductVersionDirectDownloadURLException.class %>" message="please-enter-a-valid-direct-download-url" />
+
+<fieldset>
+	<legend><liferay-ui:message key="main-fields" /></legend>
+
+	<table class="lfr-table">
+	<tr>
+		<td>
+			<liferay-ui:message key="version-name" />
+		</td>
+		<td>
+			<liferay-ui:input-field autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" bean="<%= productVersion %>" field="version" model="<%= SCProductVersion.class %>" />
+		</td>
+	</tr>
+	<tr>
+		<td>
+			<liferay-ui:message key="change-log" />
+		</td>
+		<td>
+			<liferay-ui:input-field bean="<%= productVersion %>" field="changeLog" model="<%= SCProductVersion.class %>" />
+		</td>
+	</tr>
+	<tr>
+		<td>
+			<liferay-ui:message key="supported-framework-versions" />
+		</td>
+		<td>
+			<select multiple="true" name="<portlet:namespace />frameworkVersions">
+
+				<%
+				for (SCFrameworkVersion frameworkVersion : SCFrameworkVersionServiceUtil.getFrameworkVersions(scopeGroupId, true)) {
+				%>
+
+					<option <%= (frameworkVersionIds.contains(frameworkVersion.getFrameworkVersionId())) ? "selected" : "" %> value="<%= frameworkVersion.getFrameworkVersionId() %>"><%= HtmlUtil.escape(frameworkVersion.getName()) %></option>
+
+				<%
+				}
+				%>
+
+			</select>
+		</td>
+	</tr>
+	</table>
+</fieldset>
+
+<fieldset class="repository-fields">
+	<legend><%= LanguageUtil.get(pageContext, "repository-fields") %></legend>
+
+	<table class="lfr-table">
+	<tr>
+		<td>
+			<liferay-ui:message key="download-page-url" />
+		</td>
+		<td>
+			<liferay-ui:input-field bean="<%= productVersion %>" field="downloadPageURL" model="<%= SCProductVersion.class %>" />
+		</td>
+	</tr>
+	<tr>
+		<td>
+			<liferay-ui:message key="direct-download-url" /> (<liferay-ui:message key="recommended" />)
+		</td>
+		<td>
+			<liferay-ui:input-field bean="<%= productVersion %>" field="directDownloadURL" model="<%= SCProductVersion.class %>" />
+		</td>
+	</tr>
+	<tr>
+		<td>
+			<liferay-ui:message key="test-direct-download-url" />
+		</td>
+		<td>
+			<select name="<portlet:namespace />testDirectDownloadURL">
+				<option <%= testDirectDownloadURL ? "selected" : "" %> value="1"><liferay-ui:message key="yes" /></option>
+				<option <%= !testDirectDownloadURL ? "selected" : "" %> value="0"><liferay-ui:message key="no" /></option>
+			</select>
+		</td>
+	</tr>
+	<tr>
+		<td>
+			<liferay-ui:message key="include-artifact-in-repository" />
+		</td>
+
+		<c:choose>
+			<c:when test="<%= Validator.isNotNull(productEntry.getRepoArtifactId()) && Validator.isNotNull(productEntry.getRepoArtifactId()) %>">
+				<td>
+					<select name="<portlet:namespace />repoStoreArtifact">
+						<option <%= ((productVersion != null) && productVersion.getRepoStoreArtifact()) ? "selected" : "" %> value="1"><liferay-ui:message key="yes" /></option>
+						<option <%= ((productVersion != null) && !productVersion.getRepoStoreArtifact()) ? "selected" : "" %> value="0"><liferay-ui:message key="no" /></option>
+					</select>
+				</td>
+			</c:when>
+			<c:otherwise>
+				<td>
+					<a href="<%= editProductEntryURL %>"><liferay-ui:message key="you-must-specify-a-site-id-and-artifact-id-before-you-can-add-a-product-version" /></a>
+				</td>
+			</c:otherwise>
+		</c:choose>
+	</tr>
+	</table>
+</fieldset>
+
+<div class="btn-toolbar">
+	<aui:button cssClass="btn-primary" type="submit" value="save" />
+
+	<%
+	String taglibCancel = "location.href = '" + HtmlUtil.escape(PortalUtil.escapeRedirect(redirect)) + "';";
+	%>
+
+	<aui:button onClick="<%= taglibCancel %>" value="cancel" />
+</div>
+</form>
+
+<aui:script>
+	function <portlet:namespace />saveEntry() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (productVersion == null) ? Constants.ADD : Constants.UPDATE %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />toggleSelectBoxes() {
+		if (document.<portlet:namespace />fm.<portlet:namespace />repoStoreArtifact) {
+			if (document.<portlet:namespace />fm.<portlet:namespace />directDownloadURL.value == '') {
+				document.<portlet:namespace />fm.<portlet:namespace />repoStoreArtifact.disabled = true;
+				document.<portlet:namespace />fm.<portlet:namespace />repoStoreArtifact.options[0].selected = true;
+			}
+			else {
+				document.<portlet:namespace />fm.<portlet:namespace />repoStoreArtifact.disabled = false;
+			}
+		}
+
+		if (document.<portlet:namespace />fm.<portlet:namespace />testDirectDownloadURL) {
+			if (document.<portlet:namespace />fm.<portlet:namespace />directDownloadURL.value == '') {
+				document.<portlet:namespace />fm.<portlet:namespace />testDirectDownloadURL.disabled = true;
+				document.<portlet:namespace />fm.<portlet:namespace />testDirectDownloadURL.options[0].selected = true;
+			}
+			else {
+				document.<portlet:namespace />fm.<portlet:namespace />testDirectDownloadURL.disabled = false;
+			}
+		}
+	}
+
+	document.<portlet:namespace />fm.<portlet:namespace />directDownloadURL.onkeyup = <portlet:namespace />toggleSelectBoxes;
+
+	<portlet:namespace />toggleSelectBoxes();
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/error.jsp
new file mode 100644
index 0000000..6c77919
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/error.jsp
@@ -0,0 +1,28 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/software_catalog/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= NoSuchFrameworkVersionException.class %>" message="the-framework-version-could-not-be-found" />
+<liferay-ui:error exception="<%= NoSuchLicenseException.class %>" message="the-license-could-not-be-found" />
+<liferay-ui:error exception="<%= NoSuchProductEntryException.class %>" message="the-product-could-not-be-found" />
+<liferay-ui:error exception="<%= NoSuchProductVersionException.class %>" message="the-product-version-could-not-be-found" />
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/framework_version_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/framework_version_action.jsp
new file mode 100644
index 0000000..1e4f708
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/framework_version_action.jsp
@@ -0,0 +1,70 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/software_catalog/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+SCFrameworkVersion frameworkVersion = (SCFrameworkVersion)row.getObject();
+
+String frameworkVersionId = String.valueOf(frameworkVersion.getFrameworkVersionId());
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= SCFrameworkVersionPermission.contains(permissionChecker, frameworkVersion, ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/software_catalog/edit_framework_version" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="frameworkVersionId" value="<%= frameworkVersionId %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= SCFrameworkVersionPermission.contains(permissionChecker, frameworkVersion, ActionKeys.PERMISSIONS) %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= SCFrameworkVersion.class.getName() %>"
+			modelResourceDescription="<%= frameworkVersion.getName() %>"
+			resourcePrimKey="<%= frameworkVersionId %>"
+			var="permissionsURL"
+			windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			method="get"
+			url="<%= permissionsURL %>"
+			useDialog="<%= true %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= SCFrameworkVersionPermission.contains(permissionChecker, frameworkVersion, ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/software_catalog/edit_framework_version" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="frameworkVersionId" value="<%= frameworkVersionId %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete
+			url="<%= deleteURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/init.jsp
new file mode 100644
index 0000000..1311367
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/init.jsp
@@ -0,0 +1,66 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.kernel.search.Document" %><%@
+page import="com.liferay.portal.kernel.search.DocumentComparator" %><%@
+page import="com.liferay.portal.plugin.PluginPackageUtil" %><%@
+page import="com.liferay.portlet.softwarecatalog.DuplicateProductEntryModuleIdException" %><%@
+page import="com.liferay.portlet.softwarecatalog.DuplicateProductVersionDirectDownloadURLException" %><%@
+page import="com.liferay.portlet.softwarecatalog.FrameworkVersionNameException" %><%@
+page import="com.liferay.portlet.softwarecatalog.LicenseNameException" %><%@
+page import="com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException" %><%@
+page import="com.liferay.portlet.softwarecatalog.NoSuchLicenseException" %><%@
+page import="com.liferay.portlet.softwarecatalog.NoSuchProductEntryException" %><%@
+page import="com.liferay.portlet.softwarecatalog.NoSuchProductVersionException" %><%@
+page import="com.liferay.portlet.softwarecatalog.ProductEntryAuthorException" %><%@
+page import="com.liferay.portlet.softwarecatalog.ProductEntryLicenseException" %><%@
+page import="com.liferay.portlet.softwarecatalog.ProductEntryNameException" %><%@
+page import="com.liferay.portlet.softwarecatalog.ProductEntryPageURLException" %><%@
+page import="com.liferay.portlet.softwarecatalog.ProductEntryScreenshotsException" %><%@
+page import="com.liferay.portlet.softwarecatalog.ProductEntryShortDescriptionException" %><%@
+page import="com.liferay.portlet.softwarecatalog.ProductEntryTypeException" %><%@
+page import="com.liferay.portlet.softwarecatalog.ProductVersionChangeLogException" %><%@
+page import="com.liferay.portlet.softwarecatalog.ProductVersionDownloadURLException" %><%@
+page import="com.liferay.portlet.softwarecatalog.ProductVersionFrameworkVersionException" %><%@
+page import="com.liferay.portlet.softwarecatalog.ProductVersionNameException" %><%@
+page import="com.liferay.portlet.softwarecatalog.RequiredLicenseException" %><%@
+page import="com.liferay.portlet.softwarecatalog.UnavailableProductVersionDirectDownloadURLException" %><%@
+page import="com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion" %><%@
+page import="com.liferay.portlet.softwarecatalog.model.SCLicense" %><%@
+page import="com.liferay.portlet.softwarecatalog.model.SCProductEntry" %><%@
+page import="com.liferay.portlet.softwarecatalog.model.SCProductScreenshot" %><%@
+page import="com.liferay.portlet.softwarecatalog.model.SCProductVersion" %><%@
+page import="com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionLocalServiceUtil" %><%@
+page import="com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionServiceUtil" %><%@
+page import="com.liferay.portlet.softwarecatalog.service.SCLicenseLocalServiceUtil" %><%@
+page import="com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalServiceUtil" %><%@
+page import="com.liferay.portlet.softwarecatalog.service.SCProductScreenshotLocalServiceUtil" %><%@
+page import="com.liferay.portlet.softwarecatalog.service.SCProductVersionServiceUtil" %><%@
+page import="com.liferay.portlet.softwarecatalog.service.permission.SCFrameworkVersionPermission" %><%@
+page import="com.liferay.portlet.softwarecatalog.service.permission.SCLicensePermission" %><%@
+page import="com.liferay.portlet.softwarecatalog.service.permission.SCPermission" %><%@
+page import="com.liferay.portlet.softwarecatalog.service.permission.SCProductEntryPermission" %><%@
+page import="com.liferay.portlet.softwarecatalog.util.SCUtil" %>
+
+<%
+PortalPreferences portalPreferences = PortletPreferencesFactoryUtil.getPortalPreferences(request);
+
+Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(locale, timeZone);
+%>
+
+<%@ include file="/html/portlet/software_catalog/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/license_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/license_action.jsp
new file mode 100644
index 0000000..bf96a7d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/license_action.jsp
@@ -0,0 +1,53 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/software_catalog/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+SCLicense license = (SCLicense)row.getObject();
+
+String licenseId = String.valueOf(license.getLicenseId());
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= SCLicensePermission.contains(permissionChecker, license.getLicenseId(), ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/software_catalog/edit_license" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="licenseId" value="<%= licenseId %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= SCLicensePermission.contains(permissionChecker, license.getLicenseId(), ActionKeys.UPDATE) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/software_catalog/edit_license" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="licenseId" value="<%= licenseId %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete
+			url="<%= deleteURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/product_entry_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/product_entry_action.jsp
new file mode 100644
index 0000000..f409b70
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/product_entry_action.jsp
@@ -0,0 +1,70 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/software_catalog/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+SCProductEntry productEntry = (SCProductEntry)row.getObject();
+
+long productEntryId = productEntry.getProductEntryId();
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= SCProductEntryPermission.contains(permissionChecker, productEntry, ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/software_catalog/edit_product_entry" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="productEntryId" value="<%= String.valueOf(productEntryId) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= SCProductEntryPermission.contains(permissionChecker, productEntry, ActionKeys.PERMISSIONS) %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= SCProductEntry.class.getName() %>"
+			modelResourceDescription="<%= productEntry.getName() %>"
+			resourcePrimKey="<%= String.valueOf(productEntryId) %>"
+			var="permissionsURL"
+			windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			method="get"
+			url="<%= permissionsURL %>"
+			useDialog="<%= true %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= SCProductEntryPermission.contains(permissionChecker, productEntry, ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/software_catalog/edit_product_entry" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="productEntryId" value="<%= String.valueOf(productEntryId) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete
+			url="<%= deleteURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/product_version_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/product_version_action.jsp
new file mode 100644
index 0000000..9f9d3d5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/product_version_action.jsp
@@ -0,0 +1,69 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/software_catalog/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+SCProductVersion productVersion = (SCProductVersion)row.getObject();
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= Validator.isNotNull(productVersion.getDownloadPageURL()) %>">
+		<liferay-ui:icon image="download" message="download-page" url="<%= productVersion.getDownloadPageURL() %>" />
+	</c:if>
+
+	<c:if test="<%= Validator.isNotNull(productVersion.getDirectDownloadURL()) %>">
+
+		<%
+		String taglibDirectDownloadURL = "javascript:location.href = '" + productVersion.getDirectDownloadURL() + "';";
+		%>
+
+		<liferay-ui:icon image="download" message="direct-download" url="<%= taglibDirectDownloadURL %>" />
+	</c:if>
+
+	<c:if test="<%= SCProductEntryPermission.contains(permissionChecker, productVersion.getProductEntryId(), ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/software_catalog/edit_product_version" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="productEntryId" value="<%= String.valueOf(productVersion.getProductEntryId()) %>" />
+			<portlet:param name="productVersionId" value="<%= String.valueOf(productVersion.getProductVersionId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon image="edit" url="<%= editURL %>" />
+
+		<portlet:renderURL var="copyURL">
+			<portlet:param name="struts_action" value="/software_catalog/edit_product_version" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="productEntryId" value="<%= String.valueOf(productVersion.getProductEntryId()) %>" />
+			<portlet:param name="productVersionId" value="0" />
+			<portlet:param name="copyProductVersionId" value="<%= String.valueOf(productVersion.getProductVersionId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon image="copy" url="<%= copyURL %>" />
+
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/software_catalog/edit_product_version" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="productEntryId" value="<%= String.valueOf(productVersion.getProductEntryId()) %>" />
+			<portlet:param name="productVersionId" value="<%= String.valueOf(productVersion.getProductVersionId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete url="<%= deleteURL %>" />
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/view.jsp
new file mode 100644
index 0000000..1a28103
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/view.jsp
@@ -0,0 +1,704 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/software_catalog/init.jsp" %>
+
+<%
+String tabs1 = ParamUtil.getString(request, "tabs1", "products");
+
+String tabs1Values = "products";
+
+if (themeDisplay.isSignedIn()) {
+	tabs1Values += ",my_products";
+}
+
+boolean hasAddLicensePermission = PortalPermissionUtil.contains(permissionChecker, ActionKeys.ADD_LICENSE);
+
+if (hasAddLicensePermission) {
+	tabs1Values += ",licenses";
+}
+
+if (SCPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_FRAMEWORK_VERSION)) {
+	tabs1Values += ",framework_versions";
+}
+
+String tabs1Names = StringUtil.replace(tabs1Values, StringPool.UNDERLINE, StringPool.DASH);
+
+String keywords = ParamUtil.getString(request, "keywords");
+String type = ParamUtil.getString(request, "type");
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/software_catalog/view");
+portletURL.setParameter("tabs1", tabs1);
+%>
+
+<form action="<%= HtmlUtil.escape(portletURL.toString()) %>" method="get" name="<portlet:namespace />fm" onSubmit="submitForm(this); return false;">
+<liferay-portlet:renderURLParams varImpl="portletURL" />
+
+<liferay-ui:tabs
+	names="<%= tabs1Names %>"
+	portletURL="<%= portletURL %>"
+	tabsValues="<%= tabs1Values %>"
+/>
+
+<c:choose>
+	<c:when test='<%= tabs1.equals("products") %>'>
+
+		<%
+		portletURL.setParameter("type", type);
+
+		String orderByCol = ParamUtil.getString(request, "orderByCol");
+		String orderByType = ParamUtil.getString(request, "orderByType");
+
+		if (Validator.isNotNull(orderByCol) && Validator.isNotNull(orderByType)) {
+			portalPreferences.setValue(PortletKeys.SOFTWARE_CATALOG, "product-entries-order-by-col", orderByCol);
+			portalPreferences.setValue(PortletKeys.SOFTWARE_CATALOG, "product-entries-order-by-type", orderByType);
+		}
+		else {
+			orderByCol = portalPreferences.getValue(PortletKeys.SOFTWARE_CATALOG, "product-entries-order-by-col", "modified-date");
+			orderByType = portalPreferences.getValue(PortletKeys.SOFTWARE_CATALOG, "product-entries-order-by-type", "desc");
+		}
+
+		List<String> headerNames = new ArrayList<String>();
+
+		headerNames.add("name");
+		headerNames.add("version");
+		headerNames.add("type");
+		headerNames.add("tags");
+		headerNames.add("licenses");
+		headerNames.add("modified-date");
+		headerNames.add(StringPool.BLANK);
+
+		Map orderableHeaders = new HashMap();
+
+		orderableHeaders.put("name", "name");
+		orderableHeaders.put("version", "version");
+		orderableHeaders.put("type", "type");
+		orderableHeaders.put("modified-date", "modified-date");
+
+		SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, portletURL, headerNames, LanguageUtil.get(pageContext, "no-products-were-found"));
+
+		searchContainer.setOrderableHeaders(orderableHeaders);
+		searchContainer.setOrderByCol(orderByCol);
+		searchContainer.setOrderByType(orderByType);
+
+		Indexer indexer = IndexerRegistryUtil.getIndexer(SCProductEntry.class);
+
+		SearchContext searchContext = SearchContextFactory.getInstance(request);
+
+		searchContext.setKeywords(keywords);
+
+		List results = indexer.search(searchContext).toList();
+
+		DocumentComparator docComparator = new DocumentComparator();
+
+		boolean ascending = true;
+
+		if (orderByType.equals("desc")) {
+			ascending = false;
+		}
+
+		if (orderByCol.equals("version")) {
+			docComparator.addOrderBy("version", ascending);
+			docComparator.addOrderBy(Field.MODIFIED_DATE);
+			docComparator.addOrderBy(Field.TITLE);
+			docComparator.addOrderBy("type");
+		}
+		else if (orderByCol.equals("modified-date")) {
+			docComparator.addOrderBy(Field.MODIFIED_DATE, ascending);
+			docComparator.addOrderBy(Field.TITLE);
+			docComparator.addOrderBy("version");
+			docComparator.addOrderBy("type");
+		}
+		else if (orderByCol.equals("type")) {
+			docComparator.addOrderBy("type", ascending);
+			docComparator.addOrderBy(Field.MODIFIED_DATE);
+			docComparator.addOrderBy(Field.TITLE);
+			docComparator.addOrderBy("version");
+		}
+		else {
+			docComparator.addOrderBy(Field.TITLE, ascending);
+			docComparator.addOrderBy("version");
+			docComparator.addOrderBy(Field.MODIFIED_DATE);
+			docComparator.addOrderBy("type");
+		}
+
+		results = ListUtil.sort(results, docComparator);
+
+		int total = results.size();
+
+		searchContainer.setTotal(total);
+
+		results = ListUtil.subList(results, searchContainer.getStart(), searchContainer.getEnd());
+
+		List resultRows = searchContainer.getResultRows();
+
+		for (int i = 0; i < results.size(); i++) {
+			Document doc = (Document)results.get(i);
+
+			long productEntryId = GetterUtil.getLong(doc.get(Field.ENTRY_CLASS_PK));
+
+			SCProductEntry productEntry = SCProductEntryLocalServiceUtil.getProductEntry(productEntryId);
+
+			productEntry = productEntry.toEscapedModel();
+
+			SCProductVersion latestProductVersion = productEntry.getLatestVersion();
+
+			if (latestProductVersion != null) {
+				latestProductVersion = latestProductVersion.toEscapedModel();
+			}
+
+			ResultRow row = new ResultRow(productEntry, productEntryId, i);
+
+			PortletURL rowURL = renderResponse.createRenderURL();
+
+			rowURL.setParameter("struts_action", "/software_catalog/view_product_entry");
+			rowURL.setParameter("redirect", currentURL);
+			rowURL.setParameter("productEntryId", String.valueOf(productEntryId));
+
+			// Name and short description
+
+			StringBundler sb = new StringBundler(5);
+
+			sb.append("<strong>");
+			sb.append(productEntry.getName());
+			sb.append("</strong>");
+
+			if (Validator.isNotNull(productEntry.getShortDescription())) {
+				sb.append("<br />");
+				sb.append(productEntry.getShortDescription());
+			}
+
+			row.addText(sb.toString(), rowURL);
+
+			// Version
+
+			if (latestProductVersion != null) {
+				row.addText(latestProductVersion.getVersion(), rowURL);
+			}
+			else {
+				row.addText(LanguageUtil.get(pageContext, "not-available"), rowURL);
+			}
+
+			// Type
+
+			row.addText(LanguageUtil.get(pageContext, productEntry.getType()), rowURL);
+
+			// Tags
+
+			row.addText(LanguageUtil.get(pageContext, productEntry.getTags()), rowURL);
+
+			// Licenses
+
+			List<SCLicense> licenses = productEntry.getLicenses();
+
+			if (licenses.isEmpty()) {
+				row.addText(StringPool.BLANK, rowURL);
+			}
+			else {
+				sb = new StringBundler(licenses.size() * 2);
+
+				for (SCLicense license : licenses) {
+					license = license.toEscapedModel();
+
+					sb.append(license.getName());
+					sb.append(", ");
+				}
+
+				sb.setIndex(sb.index() - 1);
+
+				row.addText(sb.toString(), rowURL);
+			}
+
+			// Modified date
+
+			row.addDate(productEntry.getModifiedDate(), rowURL);
+
+			// Action
+
+			row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/software_catalog/product_entry_action.jsp");
+
+			// Add result row
+
+			resultRows.add(row);
+		}
+
+		boolean showAddProductEntryButton = SCPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_PRODUCT_ENTRY);
+		boolean showPermissionsButton = SCPermission.contains(permissionChecker, scopeGroupId, ActionKeys.PERMISSIONS);
+		%>
+
+		<div>
+			<label for="<portlet:namespace />keyword"><liferay-ui:message key="search" /></label>
+
+			<input id="<portlet:namespace />keyword" name="<portlet:namespace />keywords" size="30" type="text" value="<%= HtmlUtil.escape(keywords) %>" />
+
+			<select name="<portlet:namespace />type">
+				<option value=""></option>
+
+				<%
+				for (String supportedType : PluginPackageUtil.getSupportedTypes()) {
+				%>
+
+					<option <%= type.equals(supportedType) ? "selected" : "" %> value="<%= supportedType %>"><liferay-ui:message key='<%= supportedType + "-plugin" %>' /></option>
+
+				<%
+				}
+				%>
+
+			</select>
+
+			<aui:button type="submit" value="search" />
+		</div>
+
+		<c:if test="<%= showAddProductEntryButton && showPermissionsButton %>">
+			<div class="btn-toolbar">
+				<c:if test="<%= showAddProductEntryButton %>">
+
+					<%
+					String taglibAddProduct = renderResponse.getNamespace() + "addProduct();";
+					%>
+
+					<aui:button onClick="<%= taglibAddProduct %>" value="add-product" />
+				</c:if>
+
+				<c:if test="<%= showPermissionsButton %>">
+					<liferay-security:permissionsURL
+						modelResource="com.liferay.portlet.softwarecatalog"
+						modelResourceDescription="<%= HtmlUtil.escape(themeDisplay.getScopeGroupName()) %>"
+						resourcePrimKey="<%= String.valueOf(scopeGroupId) %>"
+						var="permissionsURL"
+					/>
+
+					<%
+					String taglibPermissions = "location.href = '" + permissionsURL + "';";
+					%>
+
+					<aui:button onClick="<%= taglibPermissions %>" value="permissions" />
+				</c:if>
+			</div>
+		</c:if>
+
+		<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+	</c:when>
+	<c:when test='<%= tabs1.equals("my_products") %>'>
+
+		<%
+		String orderByCol = ParamUtil.getString(request, "orderByCol");
+		String orderByType = ParamUtil.getString(request, "orderByType");
+
+		if (Validator.isNotNull(orderByCol) && Validator.isNotNull(orderByType)) {
+			portalPreferences.setValue(PortletKeys.SOFTWARE_CATALOG, "product-entries-order-by-col", orderByCol);
+			portalPreferences.setValue(PortletKeys.SOFTWARE_CATALOG, "product-entries-order-by-type", orderByType);
+		}
+		else {
+			orderByCol = portalPreferences.getValue(PortletKeys.SOFTWARE_CATALOG, "product-entries-order-by-col", "modified-date");
+			orderByType = portalPreferences.getValue(PortletKeys.SOFTWARE_CATALOG, "product-entries-order-by-type", "desc");
+		}
+
+		OrderByComparator orderByComparator = SCUtil.getProductEntryOrderByComparator(orderByCol, orderByType);
+
+		List<String> headerNames = new ArrayList<String>();
+
+		headerNames.add("name");
+		headerNames.add("version");
+		headerNames.add("type");
+		headerNames.add("tags");
+		headerNames.add("licenses");
+		headerNames.add("modified-date");
+		headerNames.add(StringPool.BLANK);
+
+		Map orderableHeaders = new HashMap();
+
+		orderableHeaders.put("name", "name");
+		orderableHeaders.put("type", "type");
+		orderableHeaders.put("modified-date", "modified-date");
+
+		SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, portletURL, headerNames, null);
+
+		searchContainer.setOrderableHeaders(orderableHeaders);
+		searchContainer.setOrderByCol(orderByCol);
+		searchContainer.setOrderByType(orderByType);
+
+		List results = null;
+		int total = 0;
+
+		if (tabs1.equals("products")) {
+			total = SCProductEntryLocalServiceUtil.getProductEntriesCount(scopeGroupId);
+
+			searchContainer.setTotal(total);
+
+			results = SCProductEntryLocalServiceUtil.getProductEntries(scopeGroupId, searchContainer.getStart(), searchContainer.getEnd(), orderByComparator);
+		}
+		else {
+			total = SCProductEntryLocalServiceUtil.getProductEntriesCount(scopeGroupId, user.getUserId());
+
+			searchContainer.setTotal(total);
+
+			results = SCProductEntryLocalServiceUtil.getProductEntries(scopeGroupId, user.getUserId(), searchContainer.getStart(), searchContainer.getEnd(), orderByComparator);
+		}
+
+		searchContainer.setResults(results);
+
+		List resultRows = searchContainer.getResultRows();
+
+		for (int i = 0; i < results.size(); i++) {
+			SCProductEntry productEntry = (SCProductEntry)results.get(i);
+
+			productEntry = productEntry.toEscapedModel();
+
+			long productEntryId = productEntry.getProductEntryId();
+
+			SCProductVersion latestProductVersion = productEntry.getLatestVersion();
+
+			if (latestProductVersion != null) {
+				latestProductVersion = latestProductVersion.toEscapedModel();
+			}
+
+			ResultRow row = new ResultRow(productEntry, productEntryId, i);
+
+			PortletURL rowURL = renderResponse.createRenderURL();
+
+			rowURL.setParameter("struts_action", "/software_catalog/view_product_entry");
+			rowURL.setParameter("redirect", currentURL);
+			rowURL.setParameter("productEntryId", String.valueOf(productEntryId));
+
+			// Name and short description
+
+			StringBundler sb = new StringBundler(5);
+
+			sb.append("<strong>");
+			sb.append(productEntry.getName());
+			sb.append("</strong>");
+
+			if (Validator.isNotNull(productEntry.getShortDescription())) {
+				sb.append("<br />");
+				sb.append(productEntry.getShortDescription());
+			}
+
+			row.addText(sb.toString(), rowURL);
+
+			// Version
+
+			if (latestProductVersion != null) {
+				row.addText(latestProductVersion.getVersion(), rowURL);
+			}
+			else {
+				row.addText(LanguageUtil.get(pageContext, "not-available"), rowURL);
+			}
+
+			// Type
+
+			row.addText(LanguageUtil.get(pageContext, productEntry.getType()), rowURL);
+
+			// Tags
+
+			row.addText(LanguageUtil.get(pageContext, productEntry.getTags()), rowURL);
+
+			// Licenses
+
+			List<SCLicense> licenses = productEntry.getLicenses();
+
+			if (licenses.isEmpty()) {
+				row.addText(StringPool.BLANK, rowURL);
+			}
+			else {
+				sb = new StringBundler(licenses.size() * 2);
+
+				for (SCLicense license : licenses) {
+					license = license.toEscapedModel();
+
+					sb.append(license.getName());
+					sb.append(", ");
+				}
+
+				sb.setIndex(sb.index() - 1);
+
+				row.addText(sb.toString(), rowURL);
+			}
+
+			// Modified date
+
+			row.addDate(productEntry.getModifiedDate(), rowURL);
+
+			// Action
+
+			row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/software_catalog/product_entry_action.jsp");
+
+			// Add result row
+
+			resultRows.add(row);
+		}
+
+		boolean showAddProductEntryButton = SCPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_PRODUCT_ENTRY);
+		%>
+
+		<c:if test="<%= showAddProductEntryButton %>">
+			<div class="btn-toolbar">
+				<portlet:renderURL var="addProductURL">
+					<portlet:param name="struts_action" value="/software_catalog/edit_product_entry" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+				</portlet:renderURL>
+
+				<%
+				String taglibAddProduct = "location.href = '" + addProductURL + "';";
+				%>
+
+				<aui:button onClick="<%= taglibAddProduct %>" value="add-product" />
+			</div>
+		</c:if>
+
+		<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+	</c:when>
+	<c:when test='<%= tabs1.equals("framework_versions") %>'>
+
+		<%
+		List<String> headerNames = new ArrayList<String>();
+
+		headerNames.add("name");
+		headerNames.add("url");
+		headerNames.add("active");
+		headerNames.add(StringPool.BLANK);
+
+		SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, portletURL, headerNames, null);
+
+		int total = SCFrameworkVersionLocalServiceUtil.getFrameworkVersionsCount(scopeGroupId);
+
+		searchContainer.setTotal(total);
+
+		List results = SCFrameworkVersionLocalServiceUtil.getFrameworkVersions(scopeGroupId, searchContainer.getStart(),searchContainer.getEnd());
+
+		searchContainer.setResults(results);
+
+		List resultRows = searchContainer.getResultRows();
+
+		for (int i = 0; i < results.size(); i++) {
+			SCFrameworkVersion frameworkVersion = (SCFrameworkVersion)results.get(i);
+
+			frameworkVersion = frameworkVersion.toEscapedModel();
+
+			ResultRow row = new ResultRow(frameworkVersion, frameworkVersion.getFrameworkVersionId(), i);
+
+			String rowHREF = frameworkVersion.getUrl();
+
+			TextSearchEntry rowTextEntry = new TextSearchEntry();
+
+			rowTextEntry.setHref(rowHREF);
+			rowTextEntry.setName(frameworkVersion.getName());
+			rowTextEntry.setTarget("_blank");
+			rowTextEntry.setTitle(frameworkVersion.getName());
+
+			// Name
+
+			row.addText(rowTextEntry);
+
+			// URL
+
+			rowTextEntry = (TextSearchEntry)rowTextEntry.clone();
+
+			rowTextEntry.setName(frameworkVersion.getUrl());
+
+			row.addText(rowTextEntry);
+
+			// Active
+
+			rowTextEntry = (TextSearchEntry)rowTextEntry.clone();
+
+			rowTextEntry.setName(LanguageUtil.get(pageContext,frameworkVersion.isActive() ? "yes" : "no"));
+
+			row.addText(rowTextEntry);
+
+			// Action
+
+			row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/software_catalog/framework_version_action.jsp");
+
+			// Add result row
+
+			resultRows.add(row);
+		}
+		%>
+
+		<%
+		boolean showAddFrameworkVersionButton = SCPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_FRAMEWORK_VERSION);
+		boolean showPermissionsButton = SCPermission.contains(permissionChecker, scopeGroupId, ActionKeys.PERMISSIONS);
+		%>
+
+		<c:if test="<%= showAddFrameworkVersionButton || showPermissionsButton %>">
+			<div class="btn-toolbar">
+				<c:if test="<%= showAddFrameworkVersionButton %>">
+					<portlet:renderURL var="addFrameworkURL">
+						<portlet:param name="struts_action" value="/software_catalog/edit_framework_version" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+					</portlet:renderURL>
+
+					<%
+					String taglibAddFramework = "location.href = '" + addFrameworkURL + "';";
+					%>
+
+					<aui:button onClick="<%= taglibAddFramework %>" value="add-framework-version" />
+				</c:if>
+
+				<c:if test="<%= showPermissionsButton %>">
+					<liferay-security:permissionsURL
+						modelResource="com.liferay.portlet.softwarecatalog"
+						modelResourceDescription="<%= HtmlUtil.escape(themeDisplay.getScopeGroupName()) %>"
+						resourcePrimKey="<%= String.valueOf(scopeGroupId) %>"
+						var="permissionsURL"
+					/>
+
+					<%
+					String taglibPermissions = "location.href = '" + permissionsURL + "';";
+					%>
+
+					<aui:button onClick="<%= taglibPermissions %>" value="permissions" />
+				</c:if>
+			</div>
+		</c:if>
+
+		<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+	</c:when>
+	<c:when test='<%= tabs1.equals("licenses") %>'>
+
+		<%
+		List<String> headerNames = new ArrayList<String>();
+
+		headerNames.add("name");
+		headerNames.add("url");
+		headerNames.add("open-source");
+		headerNames.add("active");
+		headerNames.add("recommended");
+		headerNames.add(StringPool.BLANK);
+
+		SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, portletURL, headerNames, null);
+
+		int total = SCLicenseLocalServiceUtil.getLicensesCount();
+
+		searchContainer.setTotal(total);
+
+		List results = SCLicenseLocalServiceUtil.getLicenses(searchContainer.getStart(), searchContainer.getEnd());
+
+		searchContainer.setResults(results);
+
+		List resultRows = searchContainer.getResultRows();
+
+		for (int i = 0; i < results.size(); i++) {
+			SCLicense license = (SCLicense)results.get(i);
+
+			license = license.toEscapedModel();
+
+			ResultRow row = new ResultRow(license, license.getLicenseId(), i);
+
+			String rowHREF = license.getUrl();
+
+			TextSearchEntry rowTextEntry = new TextSearchEntry();
+
+			rowTextEntry.setHref(rowHREF);
+			rowTextEntry.setName(license.getName());
+			rowTextEntry.setTarget("_blank");
+			rowTextEntry.setTitle(license.getName());
+
+			// Name
+
+			row.addText(rowTextEntry);
+
+			// URL
+
+			rowTextEntry = (TextSearchEntry)rowTextEntry.clone();
+
+			rowTextEntry.setName(license.getUrl());
+
+			row.addText(rowTextEntry);
+
+			// Open source
+
+			rowTextEntry = (TextSearchEntry)rowTextEntry.clone();
+
+			rowTextEntry.setName(LanguageUtil.get(pageContext, license.isOpenSource() ? "yes" : "no"));
+
+			row.addText(rowTextEntry);
+
+			// Active
+
+			rowTextEntry = (TextSearchEntry)rowTextEntry.clone();
+
+			rowTextEntry.setName(LanguageUtil.get(pageContext, license.isActive() ? "yes" : "no"));
+
+			row.addText(rowTextEntry);
+
+			// Recommended
+
+			rowTextEntry = (TextSearchEntry)rowTextEntry.clone();
+
+			rowTextEntry.setName(LanguageUtil.get(pageContext, license.isRecommended() ? "yes" : "no"));
+
+			row.addText(rowTextEntry);
+
+			// Action
+
+			row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/software_catalog/license_action.jsp");
+
+			// Add result row
+
+			resultRows.add(row);
+		}
+		%>
+
+		<c:if test="<%= hasAddLicensePermission %>">
+			<div class="btn-toolbar">
+				<portlet:renderURL var="addLicenseURL">
+					<portlet:param name="struts_action" value="/software_catalog/edit_license" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+				</portlet:renderURL>
+
+				<%
+				String taglibAddLicense = "location.href = '" + addLicenseURL + "';";
+				%>
+
+				<aui:button onClick="<%= taglibAddLicense %>" value="add-license" />
+			</div>
+		</c:if>
+
+		<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+	</c:when>
+</c:choose>
+
+</form>
+
+<aui:script>
+	function <portlet:namespace />addProduct() {
+		var url = '<portlet:renderURL><portlet:param name="struts_action" value="/software_catalog/edit_product_entry" /><portlet:param name="redirect" value="<%= currentURL %>" /></portlet:renderURL>';
+
+		if (document.<portlet:namespace />fm.<portlet:namespace />keywords) {
+			url += '&<portlet:namespace />name=' + document.<portlet:namespace />fm.<portlet:namespace />keywords.value;
+		}
+
+		document.<portlet:namespace />fm.method = 'post';
+
+		submitForm(document.<portlet:namespace />fm, url);
+	}
+
+	<c:if test="<%= windowState.equals(WindowState.MAXIMIZED) %>">
+		Liferay.Util.focusFormField(document.<portlet:namespace />fm.<portlet:namespace />keywords);
+	</c:if>
+</aui:script>
+
+<%
+if (!tabs1.equals("products")) {
+	PortalUtil.setPageSubtitle(LanguageUtil.get(pageContext, StringUtil.replace(tabs1, StringPool.UNDERLINE, StringPool.DASH)), request);
+
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, TextFormatter.format(tabs1, TextFormatter.O)), portletURL.toString());
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/view_product_entry.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/view_product_entry.jsp
new file mode 100644
index 0000000..ef23574
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/software_catalog/view_product_entry.jsp
@@ -0,0 +1,381 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/software_catalog/init.jsp" %>
+
+<%
+String tabs2 = ParamUtil.getString(request, "tabs2", "version-history");
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+SCProductEntry productEntry = (SCProductEntry)request.getAttribute(WebKeys.SOFTWARE_CATALOG_PRODUCT_ENTRY);
+
+productEntry = productEntry.toEscapedModel();
+
+long productEntryId = BeanParamUtil.getLong(productEntry, request, "productEntryId");
+
+SCProductVersion latestProductVersion = productEntry.getLatestVersion();
+
+PortletURL addProductVersionURL = renderResponse.createRenderURL();
+
+addProductVersionURL.setParameter("struts_action", "/software_catalog/edit_product_version");
+addProductVersionURL.setParameter(Constants.CMD, Constants.ADD);
+addProductVersionURL.setParameter("tabs2", tabs2);
+addProductVersionURL.setParameter("redirect", currentURL);
+addProductVersionURL.setParameter("productEntryId", String.valueOf(productEntryId));
+
+PortletURL editProductEntryURL = renderResponse.createRenderURL();
+
+editProductEntryURL.setParameter("struts_action", "/software_catalog/edit_product_entry");
+editProductEntryURL.setParameter("tabs2", tabs2);
+editProductEntryURL.setParameter("redirect", currentURL);
+editProductEntryURL.setParameter("productEntryId", String.valueOf(productEntryId));
+
+PortletURL viewProductEntryURL = renderResponse.createRenderURL();
+
+viewProductEntryURL.setParameter("struts_action", "/software_catalog/view_product_entry");
+viewProductEntryURL.setParameter("tabs2", tabs2);
+viewProductEntryURL.setParameter("redirect", redirect);
+viewProductEntryURL.setParameter("productEntryId", String.valueOf(productEntryId));
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	escapeXml="<%= false %>"
+	localizeTitle="<%= false %>"
+	title='<%= productEntry.getName() + " " + ((latestProductVersion == null) ? "" : HtmlUtil.escape(latestProductVersion.getVersion())) %>'
+/>
+
+<table class="lfr-table">
+<tr>
+	<td>
+		<liferay-ui:message key="type" />:
+	</td>
+	<td>
+		<liferay-ui:message key="<%= productEntry.getType() %>" />
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="licenses" />:
+	</td>
+	<td>
+
+		<%
+		List<SCLicense> productEntryLicenses = productEntry.getLicenses();
+
+		for (int i = 0; i < productEntryLicenses.size(); i++) {
+			SCLicense license = productEntryLicenses.get(i);
+		%>
+
+			<aui:a href="<%= license.getUrl() %>" target="_blank"><%= HtmlUtil.escape(license.getName()) %></aui:a><c:if test="<%= i < productEntryLicenses.size() - 1 %>">, </c:if>
+
+		<%
+		}
+		%>
+
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="author" />:
+	</td>
+	<td>
+		<%= productEntry.getAuthor() %>
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="page-url" />:
+	</td>
+	<td>
+		<a href="<%= productEntry.getPageURL() %>"><%= productEntry.getPageURL() %></a>
+	</td>
+</tr>
+
+<c:if test="<%= Validator.isNotNull(productEntry.getTags()) %>">
+	<tr>
+		<td>
+			<liferay-ui:message key="tags" />:
+		</td>
+		<td>
+			<%= productEntry.getTags() %>
+		</td>
+	</tr>
+</c:if>
+
+<tr>
+	<td>
+		<liferay-ui:message key="short-description" />:
+	</td>
+	<td>
+		<%= productEntry.getShortDescription() %>
+	</td>
+</tr>
+
+<c:if test="<%= Validator.isNotNull(productEntry.getLongDescription()) %>">
+	<tr>
+		<td>
+			<liferay-ui:message key="long-description" />:
+		</td>
+		<td>
+			<%= productEntry.getLongDescription() %>
+		</td>
+	</tr>
+</c:if>
+
+</table>
+
+<br />
+
+<c:choose>
+	<c:when test="<%= latestProductVersion != null %>">
+		<table class="lfr-table">
+		<tr>
+			<td>
+				<liferay-ui:message key="modified-date" />:
+			</td>
+			<td>
+				<%= dateFormatDateTime.format(latestProductVersion.getModifiedDate()) %>
+			</td>
+		</tr>
+		<tr>
+			<td>
+				<liferay-ui:message key="change-log" />:
+			</td>
+			<td>
+				<%= HtmlUtil.escape(latestProductVersion.getChangeLog()) %>
+			</td>
+		</tr>
+		<tr>
+			<td>
+				<liferay-ui:message key="framework-versions" />:
+			</td>
+			<td>
+				<%= _getFrameworkVersions(latestProductVersion.getFrameworkVersions()) %>
+			</td>
+		</tr>
+		<tr>
+			<td>
+				<liferay-ui:message key="download-links" />:
+			</td>
+			<td>
+				<c:if test="<%= Validator.isNotNull(latestProductVersion.getDownloadPageURL()) %>">
+					<liferay-ui:icon
+						image="download"
+						message="download-page"
+						url="<%= latestProductVersion.getDownloadPageURL() %>"
+					/>
+				</c:if>
+
+				<c:if test="<%= Validator.isNotNull(latestProductVersion.getDirectDownloadURL()) %>">
+					<liferay-ui:icon
+						image="download"
+						message="direct-download"
+						url="<%= latestProductVersion.getDirectDownloadURL() %>"
+					/>
+				</c:if>
+			</td>
+		</tr>
+		</table>
+
+		<br />
+	</c:when>
+	<c:otherwise>
+		<div class="alert alert-error">
+			<liferay-ui:message key="this-product-does-not-have-any-released-versions" />
+		</div>
+	</c:otherwise>
+</c:choose>
+
+<%
+List productScreenshots = SCProductScreenshotLocalServiceUtil.getProductScreenshots(productEntryId);
+%>
+
+<c:if test="<%= !productScreenshots.isEmpty() %>">
+	<div>
+
+		<%
+		for (int i = 0; i < productScreenshots.size(); i++) {
+			SCProductScreenshot productScreenshot = (SCProductScreenshot)productScreenshots.get(i);
+		%>
+
+			<aui:a href='<%= themeDisplay.getPathImage() + "/software_catalog?img_id=" + productScreenshot.getFullImageId() + "&t=" + WebServerServletTokenUtil.getToken(productScreenshot.getFullImageId()) %>' target="_blank"><img alt="<liferay-ui:message key="screenshot" />" src="<%= themeDisplay.getPathImage() %>/software_catalog?img_id=<%= productScreenshot.getThumbnailId() %>&t=<%= WebServerServletTokenUtil.getToken(productScreenshot.getThumbnailId()) %>" /></aui:a>
+
+		<%
+		}
+		%>
+
+	</div>
+</c:if>
+
+<liferay-ui:ratings
+	className="<%= SCProductEntry.class.getName() %>"
+	classPK="<%= productEntry.getProductEntryId() %>"
+/>
+
+<c:if test="<%= SCProductEntryPermission.contains(permissionChecker, productEntryId, ActionKeys.UPDATE) %>">
+
+	<div class="btn-toolbar">
+
+		<%
+		String taglibEditProductEntry = "location.href = '" + editProductEntryURL.toString() + "';";
+		%>
+
+		<aui:button onClick="<%= taglibEditProductEntry %>" value="edit-product" />
+
+		<%
+		String taglibAddProductVersion = "location.href = '" + addProductVersionURL.toString() + "';";
+		%>
+
+		<aui:button onClick="<%= taglibAddProductVersion %>" value="add-product-version" />
+	</div>
+</c:if>
+
+<liferay-ui:tabs
+	names="version-history,comments"
+	param="tabs2"
+	portletURL="<%= viewProductEntryURL %>"
+/>
+
+<c:choose>
+	<c:when test='<%= PropsValues.SC_PRODUCT_COMMENTS_ENABLED && tabs2.equals("comments") %>'>
+		<portlet:actionURL var="discussionURL">
+			<portlet:param name="struts_action" value="/software_catalog/edit_product_entry_discussion" />
+		</portlet:actionURL>
+
+		<liferay-ui:discussion
+			className="<%= SCProductEntry.class.getName() %>"
+			classPK="<%= productEntry.getProductEntryId() %>"
+			formAction="<%= discussionURL %>"
+			redirect="<%= currentURL %>"
+			userId="<%= productEntry.getUserId() %>"
+		/>
+	</c:when>
+	<c:when test='<%= tabs2.equals("version-history") %>'>
+
+		<%
+		PortletURL viewProductVersionURL = renderResponse.createRenderURL();
+
+		viewProductVersionURL.setParameter("struts_action", "/software_catalog/view_product_entry");
+		viewProductVersionURL.setParameter("productEntryId", String.valueOf(productEntryId));
+
+		List<String> headerNames = new ArrayList<String>();
+
+		headerNames.add("version");
+		headerNames.add("supported-framework-versions");
+		headerNames.add("modified-date");
+		headerNames.add(StringPool.BLANK);
+
+		SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, "cur1", SearchContainer.DEFAULT_DELTA, viewProductVersionURL, headerNames, null);
+
+		int total = SCProductVersionServiceUtil.getProductVersionsCount(productEntryId);
+
+		searchContainer.setTotal(total);
+
+		List results = SCProductVersionServiceUtil.getProductVersions(productEntryId, searchContainer.getStart(), searchContainer.getEnd());
+
+		searchContainer.setResults(results);
+
+		List resultRows = searchContainer.getResultRows();
+
+		for (int i = 0; i < results.size(); i++) {
+			SCProductVersion curProductVersion = (SCProductVersion)results.get(i);
+
+			curProductVersion = curProductVersion.toEscapedModel();
+
+			ResultRow row = new ResultRow(curProductVersion, String.valueOf(curProductVersion.getProductVersionId()), i);
+
+			// Name and description
+
+			StringBundler sb = new StringBundler(6);
+
+			sb.append("<strong>");
+			sb.append(curProductVersion.getVersion());
+			sb.append("</strong>");
+
+			if (Validator.isNotNull(curProductVersion.getChangeLog())) {
+				sb.append("<br />");
+				sb.append(curProductVersion.getChangeLog());
+			}
+
+			sb.append("</a>");
+
+			row.addText(sb.toString());
+
+			row.addText(_getFrameworkVersions(curProductVersion.getFrameworkVersions()));
+			row.addDate(curProductVersion.getModifiedDate());
+
+			// Action
+
+			row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/software_catalog/product_version_action.jsp");
+
+			// Add result row
+
+			resultRows.add(row);
+		}
+		%>
+
+		<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+	</c:when>
+</c:choose>
+
+<%
+PortalUtil.setPageSubtitle(productEntry.getName(), request);
+PortalUtil.setPageDescription(productEntry.getShortDescription(), request);
+PortalUtil.setPageKeywords(productEntry.getTags(), request);
+
+SCProductEntry unescapedProductEntry = productEntry.toUnescapedModel();
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/software_catalog/view_product");
+portletURL.setParameter("redirect", currentURL);
+portletURL.setParameter("productEntryId", String.valueOf(productEntry.getProductEntryId()));
+
+PortalUtil.addPortletBreadcrumbEntry(request, unescapedProductEntry.getName(), portletURL.toString());
+%>
+
+<%!
+public String _getFrameworkVersions(List<SCFrameworkVersion> frameworkVersions) {
+	if (frameworkVersions.isEmpty()) {
+		return StringPool.BLANK;
+	}
+
+	StringBundler sb = new StringBundler(frameworkVersions.size() * 6);
+
+	for (SCFrameworkVersion frameworkVersion : frameworkVersions) {
+		frameworkVersion = frameworkVersion.toEscapedModel();
+
+		if (Validator.isNotNull(frameworkVersion.getUrl())) {
+			sb.append("<a href='");
+			sb.append(frameworkVersion.getUrl());
+			sb.append("'>");
+			sb.append(frameworkVersion.getName());
+			sb.append("</a>");
+		}
+		else {
+			sb.append(frameworkVersion.getName());
+		}
+
+		sb.append(", ");
+	}
+
+	sb.setIndex(sb.index() - 1);
+
+	return sb.toString();
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/css/.sass-cache/main.css
new file mode 100644
index 0000000..7fb21ee
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/css/.sass-cache/main.css
@@ -0,0 +1,121 @@
+.portlet-staging-bar button.history {
+  float: right; }
+.portlet-staging-bar button.mark-as-ready {
+  float: left; }
+.portlet-staging-bar .button-holder {
+  margin: 20px 0 10px; }
+.portlet-staging-bar .layout-actions .taglib-workflow-status {
+  margin: 0; }
+  .portlet-staging-bar .layout-actions .taglib-workflow-status .workflow-id, .portlet-staging-bar .layout-actions .taglib-workflow-status .workflow-version, .portlet-staging-bar .layout-actions .taglib-workflow-status .workflow-status {
+    color: inherit;
+    display: block;
+    padding: 0; }
+.portlet-staging-bar .row-fluid .layout-revision-info {
+  float: right;
+  line-height: 16px;
+  padding-left: 5px; }
+  .portlet-staging-bar .row-fluid .layout-revision-info.incomplete {
+    float: none;
+    padding: 0 5px; }
+    .portlet-staging-bar .row-fluid .layout-revision-info.incomplete .label.label-submit {
+      float: right;
+      margin-top: 10px; }
+    .portlet-staging-bar .row-fluid .layout-revision-info.incomplete.loading .label.label-submit {
+      background-color: transparent; }
+  .portlet-staging-bar .row-fluid .layout-revision-info .layout-revision-version {
+    display: block;
+    font-size: 0.8em; }
+    .portlet-staging-bar .row-fluid .layout-revision-info .layout-revision-version label {
+      display: inline;
+      font-size: 0.9em; }
+  .portlet-staging-bar .row-fluid .layout-revision-info .submit-link {
+    margin-left: 1em; }
+  .portlet-staging-bar .row-fluid .layout-revision-info .workflow-status, .portlet-staging-bar .row-fluid .layout-revision-info .taglib-workflow-status {
+    margin: 0;
+    padding: 0; }
+  .portlet-staging-bar .row-fluid .layout-revision-info a.taglib-icon:hover .taglib-text {
+    text-decoration: none; }
+.portlet-staging-bar .layout-branch-selector, .portlet-staging-bar .layout-set-branch-selector {
+  font-size: inherit; }
+  .portlet-staging-bar .layout-branch-selector .icon-caret-down, .portlet-staging-bar .layout-set-branch-selector .icon-caret-down {
+    position: absolute;
+    right: 5px;
+    top: 5px; }
+.portlet-staging-bar .layout-revision-actions {
+  font-size: 17px; }
+  .portlet-staging-bar .layout-revision-actions [class^="icon-"] {
+    margin-left: 10px; }
+.portlet-staging-bar .layout-revision-details.alert-error {
+  float: right;
+  margin: 10px 5px 0;
+  padding: 0 5px; }
+.portlet-staging-bar .page-variation-label, .portlet-staging-bar .site-pages-variation-label {
+  font-weight: 300; }
+.portlet-staging-bar .page-variations-options, .portlet-staging-bar .site-pages-variation-options, .portlet-staging-bar .staging-details {
+  padding: 0 5px; }
+.portlet-staging-bar .staging-details {
+  line-height: 20px; }
+.portlet-staging-bar .staging-toggle .variations-options {
+  position: relative; }
+  .portlet-staging-bar .staging-toggle .variations-options .staging-variation-selector {
+    display: block;
+    margin: 0 15px 0 0; }
+    .portlet-staging-bar .staging-toggle .variations-options .staging-variation-selector .icon-globe, .portlet-staging-bar .staging-toggle .variations-options .staging-variation-selector .icon-file {
+      padding: 7px; }
+    .portlet-staging-bar .staging-toggle .variations-options .staging-variation-selector .dropdown-toggle {
+      display: block; }
+  .portlet-staging-bar .staging-toggle .variations-options .page-variations {
+    font-size: 17px;
+    position: absolute;
+    right: -5px;
+    top: 0; }
+  .portlet-staging-bar .staging-toggle .variations-options .lfr-icon-menu-text {
+    display: inline-block;
+    white-space: nowrap;
+    overflow: hidden;
+    -ms-text-overflow: ellipsis;
+    -o-text-overflow: ellipsis;
+    text-overflow: ellipsis;
+    max-width: 75%;
+    padding-left: 5px;
+    vertical-align: bottom; }
+.portlet-staging-bar .dropdown-menu .publish-link-container {
+  margin-left: 5px; }
+  .portlet-staging-bar .dropdown-menu .publish-link-container.branching-enabled {
+    bottom: 5px;
+    position: absolute; }
+  .portlet-staging-bar .dropdown-menu .publish-link-container .publish-link {
+    white-space: nowrap;
+    overflow: hidden;
+    -ms-text-overflow: ellipsis;
+    -o-text-overflow: ellipsis;
+    text-overflow: ellipsis;
+    padding: 5px;
+    max-width: 95%; }
+    .portlet-staging-bar .dropdown-menu .publish-link-container .publish-link em {
+      display: inline-block;
+      white-space: nowrap;
+      overflow: hidden;
+      -ms-text-overflow: ellipsis;
+      -o-text-overflow: ellipsis;
+      text-overflow: ellipsis;
+      max-width: 100px;
+      vertical-align: bottom; }
+    .portlet-staging-bar .dropdown-menu .publish-link-container .publish-link.btn.btn-success:hover {
+      background-color: #0ABA1D;
+      text-decoration: none; }
+.portlet-staging-bar .site-pages-variation-options {
+  position: relative; }
+  .portlet-staging-bar .site-pages-variation-options .icon-angle-right {
+    font-size: 30px;
+    position: absolute;
+    right: -14px;
+    top: 38px; }
+.portlet-staging-bar .status-message {
+  float: left;
+  line-height: 20px; }
+.portlet-staging-bar .toolbar-spacer {
+  display: none; }
+.portlet-staging-bar .variations-content {
+  clear: both; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/css/main.css
new file mode 100644
index 0000000..7b20690
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/css/main.css
@@ -0,0 +1,195 @@
+@import "compass";
+@import "compass/css3/user-interface";
+
+.portlet-staging-bar {
+	button.history {
+		float: right;
+	}
+
+	button.mark-as-ready {
+		float: left;
+	}
+
+	.button-holder {
+		margin: 20px 0 10px;
+	}
+
+	.layout-actions .taglib-workflow-status {
+		margin: 0;
+
+		.workflow-id, .workflow-version, .workflow-status {
+			color: inherit;
+			display: block;
+			padding: 0;
+		}
+	}
+
+	.row-fluid .layout-revision-info {
+		float: right;
+		line-height: 16px;
+		padding-left: 5px;
+
+		&.incomplete {
+			float: none;
+			padding: 0 5px;
+
+			.label.label-submit {
+				float: right;
+				margin-top: 10px;
+			}
+
+			&.loading {
+				.label.label-submit {
+					background-color: transparent;
+				}
+			}
+		}
+
+		.layout-revision-version {
+			display: block;
+			font-size: 0.8em;
+
+			label {
+				display: inline;
+				font-size: 0.9em;
+			}
+		}
+
+		.submit-link {
+			margin-left: 1em;
+		}
+
+		.workflow-status, .taglib-workflow-status {
+			margin: 0;
+			padding: 0;
+		}
+
+		a.taglib-icon:hover .taglib-text {
+			text-decoration: none;
+		}
+	}
+
+	.layout-branch-selector, .layout-set-branch-selector {
+		font-size: inherit;
+
+		.icon-caret-down {
+			position: absolute;
+			right: 5px;
+			top: 5px;
+		}
+	}
+
+	.layout-revision-actions {
+		font-size: 17px;
+
+		[class^="icon-"] {
+			margin-left: 10px;
+		}
+	}
+
+	.layout-revision-details.alert-error {
+		float: right;
+		margin: 10px 5px 0;
+		padding: 0 5px;
+	}
+
+	.page-variation-label, .site-pages-variation-label {
+		font-weight: 300;
+	}
+
+	.page-variations-options, .site-pages-variation-options, .staging-details {
+		padding: 0 5px;
+	}
+
+	.staging-details {
+		line-height: 20px;
+	}
+
+	.staging-toggle .variations-options {
+		position: relative;
+
+		.staging-variation-selector {
+			display: block;
+			margin: 0 15px 0 0;
+
+			.icon-globe, .icon-file {
+				padding: 7px;
+			}
+
+			.dropdown-toggle {
+				display: block;
+			}
+		}
+
+		.page-variations {
+			font-size: 17px;
+			position: absolute;
+			right: -5px;
+			top: 0;
+		}
+
+		.lfr-icon-menu-text {
+			display: inline-block;
+
+			@include ellipsis;
+
+			max-width: 75%;
+			padding-left: 5px;
+			vertical-align: bottom;
+		}
+	}
+
+	.dropdown-menu .publish-link-container {
+		margin-left: 5px;
+
+		&.branching-enabled {
+			bottom: 5px;
+			position: absolute;
+		}
+
+		.publish-link {
+			@include ellipsis;
+
+			padding: 5px;
+			max-width: 95%;
+
+			em {
+				display: inline-block;
+
+				@include ellipsis;
+
+				max-width: 100px;
+				vertical-align: bottom;
+			}
+
+			&.btn.btn-success:hover {
+				background-color: #0ABA1D;
+				text-decoration: none;
+			}
+		}
+	}
+
+	.site-pages-variation-options {
+		position: relative;
+
+		.icon-angle-right {
+			font-size: 30px;
+			position: absolute;
+			right: -14px;
+			top: 38px;
+		}
+	}
+
+	.status-message {
+		float: left;
+		line-height: 20px;
+	}
+
+	.toolbar-spacer {
+		display: none;
+	}
+
+	.variations-content {
+		clear: both;
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/edit_layout_branch.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/edit_layout_branch.jsp
new file mode 100644
index 0000000..4302b58
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/edit_layout_branch.jsp
@@ -0,0 +1,56 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/staging_bar/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+LayoutBranch layoutBranch = null;
+
+long layoutBranchId = ParamUtil.getLong(request, "layoutBranchId");
+
+if (layoutBranchId > 0) {
+	layoutBranch = LayoutBranchLocalServiceUtil.getLayoutBranch(layoutBranchId);
+}
+
+long layoutRevisionId = ParamUtil.getLong(request, "layoutRevisionId");
+%>
+
+<div class='<%= (layoutBranch != null) ? StringPool.BLANK : "hide" %>' data-namespace="<portlet:namespace />" id="<portlet:namespace /><%= layoutBranch != null ? "updateBranch" : "addBranch" %>">
+	<aui:model-context bean="<%= layoutBranch %>" model="<%= LayoutBranch.class %>" />
+
+	<portlet:actionURL var="editLayoutBranchURL">
+		<portlet:param name="struts_action" value="/staging_bar/edit_layout_branch" />
+	</portlet:actionURL>
+
+	<aui:form action="<%= editLayoutBranchURL %>" method="post" name="fm3">
+		<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= layoutBranch != null ? Constants.UPDATE : Constants.ADD %>" />
+		<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+		<aui:input name="groupId" type="hidden"  value="<%= String.valueOf(scopeGroupId) %>" />
+		<aui:input name="layoutBranchId" type="hidden" value="<%= layoutBranchId %>" />
+		<aui:input name="copyLayoutRevisionId" type="hidden" value="<%= String.valueOf(layoutRevisionId) %>" />
+		<aui:input name="workflowAction" type="hidden" value="<%= String.valueOf(WorkflowConstants.ACTION_SAVE_DRAFT) %>" />
+
+		<aui:input name="name" />
+
+		<aui:input name="description" />
+
+		<aui:button-row>
+			<aui:button type="submit" value='<%= (layoutBranch != null) ? "update" : "add" %>' />
+		</aui:button-row>
+	</aui:form>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/edit_layout_set_branch.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/edit_layout_set_branch.jsp
new file mode 100644
index 0000000..d4a8093
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/edit_layout_set_branch.jsp
@@ -0,0 +1,79 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/staging_bar/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+LayoutSetBranch layoutSetBranch = null;
+
+long layoutSetBranchId = ParamUtil.getLong(request, "layoutSetBranchId");
+
+if (layoutSetBranchId > 0) {
+	layoutSetBranch = LayoutSetBranchLocalServiceUtil.getLayoutSetBranch(layoutSetBranchId);
+}
+%>
+
+<div class='<%= (layoutSetBranch != null) ? StringPool.BLANK : "hide" %>' data-namespace="<portlet:namespace />" id="<portlet:namespace /><%= layoutSetBranch != null ? "updateBranch" : "addBranch" %>">
+	<aui:model-context bean="<%= layoutSetBranch %>" model="<%= LayoutSetBranch.class %>" />
+
+	<portlet:actionURL var="editLayoutSetBranchURL">
+		<portlet:param name="struts_action" value="/staging_bar/edit_layout_set_branch" />
+	</portlet:actionURL>
+
+	<aui:form action="<%= editLayoutSetBranchURL %>" enctype="multipart/form-data" method="post" name="fm3">
+		<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= layoutSetBranch != null ? Constants.UPDATE : Constants.ADD %>" />
+		<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+		<aui:input name="groupId" type="hidden" value="<%= stagingGroup.getGroupId() %>" />
+		<aui:input name="privateLayout" type="hidden" value="<%= privateLayout %>" />
+		<aui:input name="layoutSetBranchId" type="hidden" value="<%= layoutSetBranchId %>" />
+		<aui:input name="workflowAction" type="hidden" value="<%= WorkflowConstants.ACTION_SAVE_DRAFT %>" />
+
+		<aui:fieldset>
+			<aui:input name="name" />
+
+			<aui:input name="description" />
+
+			<c:if test="<%= layoutSetBranch == null %>">
+
+				<%
+				List<LayoutSetBranch> layoutSetBranches = LayoutSetBranchLocalServiceUtil.getLayoutSetBranches(stagingGroup.getGroupId(), privateLayout);
+				%>
+
+				<aui:select helpMessage="copy-pages-from-site-pages-variation-help" label="copy-pages-from-site-pages-variation" name="copyLayoutSetBranchId">
+					<aui:option label="all-site-pages-variations" selected="<%= true %>" value="<%= LayoutSetBranchConstants.ALL_BRANCHES %>" />
+					<aui:option label="none-empty-site-pages-variation" value="<%= LayoutSetBranchConstants.NO_BRANCHES %>" />
+
+					<%
+					for (LayoutSetBranch curLayoutSetBranch : layoutSetBranches) {
+					%>
+
+						<aui:option label="<%= HtmlUtil.escape(curLayoutSetBranch.getName()) %>" value="<%= curLayoutSetBranch.getLayoutSetBranchId() %>" />
+
+					<%
+					}
+					%>
+
+				</aui:select>
+			</c:if>
+		</aui:fieldset>
+
+		<aui:button-row>
+			<aui:button type="submit" value='<%= (layoutSetBranch != null) ? "update" : "add" %>' />
+		</aui:button-row>
+	</aui:form>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/error.jsp
new file mode 100644
index 0000000..7df407a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/error.jsp
@@ -0,0 +1,24 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/staging_bar/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/init.jsp
new file mode 100644
index 0000000..8eec7d0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/init.jsp
@@ -0,0 +1,75 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.LayoutBranchNameException" %><%@
+page import="com.liferay.portal.LayoutSetBranchNameException" %><%@
+page import="com.liferay.portal.kernel.staging.StagingUtil" %><%@
+page import="com.liferay.portal.kernel.workflow.WorkflowTask" %><%@
+page import="com.liferay.portal.lar.backgroundtask.LayoutStagingBackgroundTaskExecutor" %><%@
+page import="com.liferay.portal.service.LayoutSetBranchLocalServiceUtil" %><%@
+page import="com.liferay.portal.service.permission.LayoutBranchPermissionUtil" %><%@
+page import="com.liferay.portal.service.permission.LayoutSetBranchPermissionUtil" %><%@
+page import="com.liferay.portal.util.comparator.LayoutRevisionCreateDateComparator" %><%@
+page import="com.liferay.portal.util.comparator.LayoutRevisionIdComparator" %>
+
+<%
+Layout selLayout = layout;
+
+long selPlid = ParamUtil.getLong(request, "selPlid");
+
+if (selPlid > 0) {
+	selLayout = LayoutLocalServiceUtil.getLayout(selPlid);
+}
+
+Group group = null;
+Group liveGroup = null;
+Group stagingGroup = null;
+
+long groupId = ParamUtil.getLong(request, "groupId");
+boolean privateLayout = ParamUtil.getBoolean(request, "privateLayout");
+
+if (groupId > 0) {
+	group = GroupLocalServiceUtil.getGroup(groupId);
+}
+else if (selLayout != null) {
+	group = selLayout.getGroup();
+
+	privateLayout = selLayout.isPrivateLayout();
+}
+
+if (group != null) {
+	if (group.isStagingGroup()) {
+		liveGroup = group.getLiveGroup();
+		stagingGroup = group;
+	}
+	else if (group.isStaged()) {
+		if (group.isStagedRemotely()) {
+			liveGroup = group;
+			stagingGroup = group;
+		}
+		else {
+			liveGroup = group;
+			stagingGroup = group.getStagingGroup();
+		}
+	}
+}
+
+Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(locale, timeZone);
+%>
+
+<%@ include file="/html/portlet/staging_bar/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/last_publication_date_message.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/last_publication_date_message.jsp
new file mode 100644
index 0000000..fe2ceb1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/last_publication_date_message.jsp
@@ -0,0 +1,125 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/staging_bar/init.jsp" %>
+
+<%
+UnicodeProperties typeSettingsProperties = (UnicodeProperties)request.getAttribute("view.jsp-typeSettingsProperties");
+
+long lastImportDate = GetterUtil.getLong(typeSettingsProperties.getProperty("last-import-date"));
+
+String lastImportLayoutSetBranchName = null;
+
+long lastImportLayoutSetBranchId = GetterUtil.getLong(typeSettingsProperties.getProperty("last-import-layout-set-branch-id"));
+
+if (lastImportLayoutSetBranchId > 0) {
+
+	try {
+		LayoutSetBranch lastImportLayoutSetBranch = LayoutSetBranchLocalServiceUtil.getLayoutSetBranch(lastImportLayoutSetBranchId);
+
+		lastImportLayoutSetBranchName = lastImportLayoutSetBranch.getName();
+	}
+	catch (Exception e) {
+	}
+}
+
+if (Validator.isNull(lastImportLayoutSetBranchName)) {
+	lastImportLayoutSetBranchName = typeSettingsProperties.getProperty("last-import-layout-set-branch-name");
+}
+
+if (Validator.isNull(lastImportLayoutSetBranchName)) {
+	lastImportLayoutSetBranchName = LanguageUtil.get(pageContext, "staging");
+}
+
+String lastImportLayoutBranchName = null;
+
+List<LayoutRevision> layoutRevisions = new ArrayList<LayoutRevision>();
+
+long lastImportLayoutRevisionId = GetterUtil.getLong(typeSettingsProperties.getProperty("last-import-layout-revision-id"));
+
+if (lastImportLayoutRevisionId > 0) {
+	try {
+		LayoutRevision lastImportLayoutRevision = LayoutRevisionLocalServiceUtil.getLayoutRevision(lastImportLayoutRevisionId);
+
+		lastImportLayoutBranchName = lastImportLayoutRevision.getLayoutBranch().getName();
+
+		layoutRevisions = LayoutRevisionLocalServiceUtil.getChildLayoutRevisions(lastImportLayoutRevision.getLayoutSetBranchId(), LayoutRevisionConstants.DEFAULT_PARENT_LAYOUT_REVISION_ID, lastImportLayoutRevision.getPlid());
+	}
+	catch (Exception e) {
+	}
+}
+
+if (Validator.isNull(lastImportLayoutBranchName)) {
+	lastImportLayoutBranchName = typeSettingsProperties.getProperty("last-import-layout-branch-name");
+}
+
+String publisherName = null;
+
+String lastImportUserUuid = GetterUtil.getString(typeSettingsProperties.getProperty("last-import-user-uuid"));
+
+if (Validator.isNotNull(lastImportUserUuid)) {
+	try {
+		User publisher = UserLocalServiceUtil.getUserByUuidAndCompanyId(lastImportUserUuid, company.getCompanyId());
+
+		publisherName = publisher.getFullName();
+	}
+	catch (Exception e) {
+	}
+}
+
+if (Validator.isNull(publisherName)) {
+	publisherName = typeSettingsProperties.getProperty("last-import-user-name");
+}
+%>
+
+<c:choose>
+	<c:when test="<%= lastImportDate > 0 %>">
+		<c:if test="<%= Validator.isNotNull(lastImportLayoutSetBranchName) && Validator.isNotNull(publisherName) %>">
+			<span class="last-publication-branch">
+				<liferay-ui:message arguments='<%= new String[] {"<strong>" + HtmlUtil.escape(layout.getName(locale)) + "</strong>", "<em>" + LanguageUtil.get(pageContext, HtmlUtil.escape(lastImportLayoutSetBranchName)) + "</em>"} %>' key='<%= (group.isStagingGroup() || group.isStagedRemotely()) ? "page-x-was-last-published-to-live" : "page-x-was-last-published-from-x" %>' />
+
+				<c:if test="<%= (Validator.isNotNull(lastImportLayoutBranchName) && (layoutRevisions.size() > 1)) || Validator.isNotNull(lastImportLayoutRevisionId) %>">
+					<span class="last-publication-variation-details">(
+						<c:if test="<%= Validator.isNotNull(lastImportLayoutBranchName) && (layoutRevisions.size() > 1) %>">
+							<span class="variation-name">
+								<liferay-ui:message key="variation" />: <strong><liferay-ui:message key="<%= HtmlUtil.escape(lastImportLayoutBranchName) %>" /></strong>
+							</span>
+						</c:if>
+
+						<c:if test="<%= Validator.isNotNull(lastImportLayoutRevisionId) %>">
+							<span class="layout-version">
+								<liferay-ui:message key="version" />: <strong><%= lastImportLayoutRevisionId %></strong>
+							</span>
+						</c:if>
+					)</span>
+				</c:if>
+			</span>
+
+			<span class="last-publication-user">
+				<liferay-ui:message arguments="<%= new String[] {LanguageUtil.getTimeDescription(pageContext, (System.currentTimeMillis() - lastImportDate), true), publisherName} %>" key="x-ago-by-x" />
+			</span>
+		</c:if>
+	</c:when>
+	<c:otherwise>
+		<span class="staging-live-group-name">
+			<liferay-ui:message arguments="<%= HtmlUtil.escape(liveGroup.getDescriptiveName(locale)) %>" key="x-is-staged" />
+		</span>
+
+		<span class="staging-live-help">
+			<liferay-ui:message arguments="<%= HtmlUtil.escape(liveGroup.getDescriptiveName(locale)) %>" key='<%= (group.isStagingGroup() || group.isStagedRemotely()) ? "staging-staging-help-x" : "staging-live-help-x" %>' />
+		</span>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/layout_branch_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/layout_branch_action.jsp
new file mode 100644
index 0000000..4695834
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/layout_branch_action.jsp
@@ -0,0 +1,63 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/staging_bar/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+LayoutRevision rootLayoutRevision = (LayoutRevision)row.getObject();
+
+LayoutBranch layoutBranch = rootLayoutRevision.getLayoutBranch();
+
+long currentLayoutBranchId = GetterUtil.getLong((String)request.getAttribute("view_layout_branches.jsp-currentLayoutBranchId"));
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= LayoutBranchPermissionUtil.contains(permissionChecker, layoutBranch, ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editURL" windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>">
+			<portlet:param name="struts_action" value="/staging_bar/edit_layout_branch" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UPDATE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(layoutBranch.getGroupId()) %>" />
+			<portlet:param name="layoutBranchId" value="<%= String.valueOf(layoutBranch.getLayoutBranchId()) %>" />
+		</portlet:renderURL>
+
+		<%
+		String taglibURL = "javascript:Liferay.StagingBar.updateBranch({uri: '" + HtmlUtil.escapeJS(editURL) + "', dialogTitle: '" + UnicodeLanguageUtil.get(pageContext, "update-page-variation") + "'});";
+		%>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= taglibURL %>"
+		/>
+
+		<c:if test="<%= !rootLayoutRevision.isPending() && !layoutBranch.isMaster() && !rootLayoutRevision.isHead() && LayoutBranchPermissionUtil.contains(permissionChecker, layoutBranch, ActionKeys.DELETE) %>">
+			<portlet:actionURL var="deleteURL">
+				<portlet:param name="struts_action" value="/staging_bar/edit_layout_branch" />
+				<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="groupId" value="<%= String.valueOf(layoutBranch.getGroupId()) %>" />
+				<portlet:param name="layoutBranchId" value="<%= String.valueOf(layoutBranch.getLayoutBranchId()) %>" />
+				<portlet:param name="currentLayoutBranchId" value="<%= String.valueOf(currentLayoutBranchId) %>" />
+			</portlet:actionURL>
+
+			<liferay-ui:icon-delete
+				url="<%= deleteURL %>"
+			/>
+		</c:if>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/layout_revision_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/layout_revision_action.jsp
new file mode 100644
index 0000000..f44640f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/layout_revision_action.jsp
@@ -0,0 +1,94 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/staging_bar/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+LayoutRevision layoutRevision = (LayoutRevision)row.getObject();
+
+long layoutRevisionId = StagingUtil.getRecentLayoutRevisionId(request, layoutRevision.getLayoutSetBranchId(), layoutRevision.getPlid());
+
+List<LayoutRevision> pendingLayoutRevisions = LayoutRevisionLocalServiceUtil.getLayoutRevisions(layoutRevision.getLayoutSetBranchId(), layoutRevision.getPlid(), WorkflowConstants.STATUS_PENDING);
+
+boolean updateRecentLayoutRevisionId = false;
+
+if (layoutRevision.getLayoutRevisionId() == layoutRevisionId) {
+	updateRecentLayoutRevisionId = true;
+}
+%>
+
+<liferay-ui:icon-menu showWhenSingleIcon="<%= true %>">
+	<c:if test="<%= !layoutRevision.isPending() && LayoutPermissionUtil.contains(permissionChecker, layoutRevision.getPlid(), ActionKeys.UPDATE) %>">
+		<c:if test="<%= pendingLayoutRevisions.isEmpty() && !layoutRevision.isHead() %>">
+			<portlet:actionURL var="publishURL">
+				<portlet:param name="struts_action" value="/staging_bar/edit_layouts" />
+				<portlet:param name="<%= Constants.CMD %>" value="update_layout_revision" />
+				<portlet:param name="redirect" value="<%= PortalUtil.getLayoutFullURL(themeDisplay) %>" />
+				<portlet:param name="groupId" value="<%= String.valueOf(layoutRevision.getGroupId()) %>" />
+				<portlet:param name="layoutRevisionId" value="<%= String.valueOf(layoutRevision.getLayoutRevisionId()) %>" />
+				<portlet:param name="major" value="true" />
+				<portlet:param name="workflowAction" value="<%= String.valueOf(WorkflowConstants.ACTION_PUBLISH) %>" />
+			</portlet:actionURL>
+
+			<%
+			String taglibURL = "javascript:submitForm(document.hrefFm, '" + HttpUtil.encodeURL(publishURL) + "');";
+			%>
+
+			<liferay-ui:icon
+				image='<%= WorkflowDefinitionLinkLocalServiceUtil.hasWorkflowDefinitionLink(themeDisplay.getCompanyId(), scopeGroupId, LayoutRevision.class.getName()) ? "../aui/shuffle" : "../aui/circle-check" %>'
+				message='<%= WorkflowDefinitionLinkLocalServiceUtil.hasWorkflowDefinitionLink(themeDisplay.getCompanyId(), scopeGroupId, LayoutRevision.class.getName()) ? "submit-for-publication" : "mark-as-ready-for-publication" %>'
+				url="<%= taglibURL %>"
+			/>
+		</c:if>
+
+		<%--<c:if test="<%= !layoutRevision.isMajor() && !layoutRevision.isHead() %>">
+			<portlet:actionURL var="saveURL">
+				<portlet:param name="struts_action" value="/staging_bar/edit_layouts" />
+				<portlet:param name="<%= Constants.CMD %>" value="update_layout_revision" />
+				<portlet:param name="redirect" value="<%= PortalUtil.getLayoutFullURL(themeDisplay) %>" />
+				<portlet:param name="groupId" value="<%= String.valueOf(layoutRevision.getGroupId()) %>" />
+				<portlet:param name="layoutRevisionId" value="<%= String.valueOf(layoutRevision.getLayoutRevisionId()) %>" />
+				<portlet:param name="major" value="true" />
+				<portlet:param name="workflowAction" value="<%= String.valueOf(WorkflowConstants.ACTION_SAVE_DRAFT) %>" />
+			</portlet:actionURL>
+
+			<%
+			String taglibURL = "javascript:submitForm(document.hrefFm, '" + HttpUtil.encodeURL(saveURL) + "');";
+			%>
+
+			<liferay-ui:icon
+				image="export"
+				message="save"
+				url="<%= taglibURL %>"
+			/>
+		</c:if>--%>
+
+		<c:if test="<%= !layoutRevision.isHead() && !layoutRevision.isPending() %>">
+			<portlet:actionURL var="deleteURL">
+				<portlet:param name="struts_action" value="/staging_bar/edit_layouts" />
+				<portlet:param name="<%= Constants.CMD %>" value="delete_layout_revision" />
+				<portlet:param name="redirect" value="<%= PortalUtil.getLayoutFullURL(themeDisplay) %>" />
+				<portlet:param name="groupId" value="<%= String.valueOf(layoutRevision.getGroupId()) %>" />
+				<portlet:param name="layoutRevisionId" value="<%= String.valueOf(layoutRevision.getLayoutRevisionId()) %>" />
+				<portlet:param name="updateRecentLayoutRevisionId" value="<%= String.valueOf(updateRecentLayoutRevisionId) %>" />
+			</portlet:actionURL>
+
+			<liferay-ui:icon-delete url="<%= deleteURL %>" />
+		</c:if>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/layout_set_branch_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/layout_set_branch_action.jsp
new file mode 100644
index 0000000..050af00
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/layout_set_branch_action.jsp
@@ -0,0 +1,98 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/staging_bar/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+LayoutSetBranch layoutSetBranch = (LayoutSetBranch)row.getObject();
+
+long currentLayoutSetBranchId = GetterUtil.getLong((String)request.getAttribute("view_layout_set_branches.jsp-currentLayoutSetBranchId"));
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= LayoutSetBranchPermissionUtil.contains(permissionChecker, layoutSetBranch, ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editURL" windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>">
+			<portlet:param name="struts_action" value="/staging_bar/edit_layout_set_branch" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UPDATE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(layoutSetBranch.getGroupId()) %>" />
+			<portlet:param name="layoutSetBranchId" value="<%= String.valueOf(layoutSetBranch.getLayoutSetBranchId()) %>" />
+		</portlet:renderURL>
+
+		<%
+		String taglibURL = "javascript:Liferay.StagingBar.updateBranch({uri: '" + HtmlUtil.escapeJS(editURL) + "', dialogTitle: '" + UnicodeLanguageUtil.get(pageContext, "update-site-pages-variation") + "'});";
+		%>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= taglibURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= LayoutSetBranchPermissionUtil.contains(permissionChecker, layoutSetBranch, ActionKeys.PERMISSIONS) %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= LayoutSetBranch.class.getName() %>"
+			modelResourceDescription="<%= layoutSetBranch.getName() %>"
+			resourcePrimKey="<%= String.valueOf(layoutSetBranch.getLayoutSetBranchId()) %>"
+			var="permissionsURL"
+			windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			method="get"
+			url="<%= permissionsURL %>"
+			useDialog="<%= true %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= !layoutSetBranch.isMaster() && LayoutSetBranchPermissionUtil.contains(permissionChecker, layoutSetBranch, ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/staging_bar/edit_layout_set_branch" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(layoutSetBranch.getGroupId()) %>" />
+			<portlet:param name="layoutSetBranchId" value="<%= String.valueOf(layoutSetBranch.getLayoutSetBranchId()) %>" />
+			<portlet:param name="currentLayoutSetBranchId" value="<%= String.valueOf(currentLayoutSetBranchId) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete
+			url="<%= deleteURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= LayoutSetBranchPermissionUtil.contains(permissionChecker, layoutSetBranch, ActionKeys.MERGE) %>">
+		<portlet:renderURL var="mergeURL" windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>">
+			<portlet:param name="struts_action" value="/staging_bar/merge_layout_set_branch" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(layoutSetBranch.getGroupId()) %>" />
+			<portlet:param name="privateLayout" value="<%= String.valueOf(layoutSetBranch.isPrivateLayout()) %>" />
+			<portlet:param name="layoutSetBranchId" value="<%= String.valueOf(layoutSetBranch.getLayoutSetBranchId()) %>" />
+		</portlet:renderURL>
+
+		<%
+		String taglibURL = "javascript:Liferay.StagingBar.mergeBranch({uri: '" + HtmlUtil.escapeJS(mergeURL) + "', dialogTitle: '" + UnicodeLanguageUtil.get(pageContext, "merge-site-pages-variation") + "'});";
+		%>
+
+		<liferay-ui:icon
+			image="copy"
+			message="merge"
+			url="<%= taglibURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/merge_layout_set_branch.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/merge_layout_set_branch.jsp
new file mode 100644
index 0000000..f1716ec
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/merge_layout_set_branch.jsp
@@ -0,0 +1,87 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/staging_bar/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+List<LayoutSetBranch> layoutSetBranches = LayoutSetBranchLocalServiceUtil.getLayoutSetBranches(groupId, privateLayout);
+
+long layoutSetBranchId = ParamUtil.getLong(request, "layoutSetBranchId");
+
+LayoutSetBranch layoutSetBranch = LayoutSetBranchLocalServiceUtil.getLayoutSetBranch(layoutSetBranchId);
+
+if (layoutSetBranches.contains(layoutSetBranch)) {
+	layoutSetBranches = ListUtil.copy(layoutSetBranches);
+
+	layoutSetBranches.remove(layoutSetBranch);
+}
+%>
+
+<div id="<portlet:namespace />mergeLayoutSetBranch">
+	<portlet:actionURL var="mergeLayoutSetBranchURL">
+		<portlet:param name="struts_action" value="/staging_bar/edit_layout_set_branch" />
+	</portlet:actionURL>
+
+	<aui:form action="<%= mergeLayoutSetBranchURL %>" enctype="multipart/form-data" method="post" name="fm4">
+		<aui:input name="<%= Constants.CMD %>" type="hidden" value="merge_layout_set_branch" />
+		<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+		<aui:input name="groupId" type="hidden" value="<%= groupId %>" />
+		<aui:input name="layoutSetBranchId" type="hidden" value="<%= layoutSetBranchId %>" />
+		<aui:input name="mergeLayoutSetBranchId" type="hidden" />
+
+		<liferay-ui:search-container id="layoutSetBranchesSearchContainer">
+			<liferay-ui:search-container-results
+				results="<%= layoutSetBranches %>"
+				total="<%= layoutSetBranches.size() %>"
+			/>
+
+			<liferay-ui:search-container-row
+				className="com.liferay.portal.model.LayoutSetBranch"
+				escapedModel="<%= true %>"
+				keyProperty="layoutSetBranchId"
+				modelVar="curLayoutSetBranch"
+			>
+
+				<liferay-ui:search-container-column-text
+					name="branch"
+					value="<%= LanguageUtil.get(pageContext, curLayoutSetBranch.getName()) %>"
+				/>
+
+				<liferay-ui:search-container-column-text
+					buffer="buffer"
+				>
+
+					<%
+					buffer.append("<a class='layout-set-branch' data-layoutSetBranchId='");
+					buffer.append(curLayoutSetBranch.getLayoutSetBranchId());
+					buffer.append("' data-layoutSetBranchName='");
+					buffer.append(HtmlUtil.escapeAttribute(curLayoutSetBranch.getName()));
+					buffer.append("' data-layoutSetBranchMessage='");
+					buffer.append(HtmlUtil.escapeAttribute(LanguageUtil.format(pageContext, "are-you-sure-you-want-to-merge-changes-from-x", curLayoutSetBranch.getName())));
+					buffer.append("' href='#'>");
+					buffer.append(LanguageUtil.get(pageContext, "select"));
+					buffer.append("</a>");
+					%>
+
+				</liferay-ui:search-container-column-text>
+			</liferay-ui:search-container-row>
+
+			<liferay-ui:search-iterator paginate="<%= false %>" searchContainer="<%= searchContainer %>" />
+		</liferay-ui:search-container>
+	</aui:form>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/view.jsp
new file mode 100644
index 0000000..39affb8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/view.jsp
@@ -0,0 +1,241 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/staging_bar/init.jsp" %>
+
+<%
+boolean branchingEnabled = false;
+
+LayoutRevision layoutRevision = null;
+
+LayoutSetBranch layoutSetBranch = null;
+
+LayoutBranch layoutBranch = null;
+
+Layout liveLayout = null;
+
+if (layout != null) {
+	layoutRevision = LayoutStagingUtil.getLayoutRevision(layout);
+
+	if (layoutRevision != null) {
+		branchingEnabled = true;
+
+		layoutSetBranch = LayoutSetBranchLocalServiceUtil.getLayoutSetBranch(layoutRevision.getLayoutSetBranchId());
+
+		layoutBranch = layoutRevision.getLayoutBranch();
+	}
+}
+%>
+
+<c:if test="<%= themeDisplay.isShowStagingIcon() %>">
+
+	<%
+	String liveFriendlyURL = null;
+
+	if (liveGroup != null) {
+		liveLayout = LayoutLocalServiceUtil.fetchLayoutByUuidAndGroupId(layout.getUuid(), liveGroup.getGroupId(), layout.isPrivateLayout());
+
+		if (liveLayout != null) {
+			liveFriendlyURL = PortalUtil.getLayoutFriendlyURL(liveLayout, themeDisplay);
+		}
+		else if ((layout.isPrivateLayout() && (liveGroup.getPrivateLayoutsPageCount() > 0)) || (layout.isPublicLayout() && (liveGroup.getPublicLayoutsPageCount() > 0))) {
+			liveFriendlyURL = PortalUtil.getGroupFriendlyURL(liveGroup, layout.isPrivateLayout(), themeDisplay);
+		}
+
+		if (Validator.isNotNull(liveFriendlyURL)) {
+			liveFriendlyURL = PortalUtil.addPreservedParameters(themeDisplay, liveFriendlyURL);
+		}
+	}
+
+	String stagingFriendlyURL = null;
+
+	if (stagingGroup != null) {
+		Layout stagingLayout = LayoutLocalServiceUtil.fetchLayoutByUuidAndGroupId(layout.getUuid(), stagingGroup.getGroupId(), layout.isPrivateLayout());
+
+		if (stagingLayout != null) {
+			stagingFriendlyURL = PortalUtil.getLayoutFriendlyURL(stagingLayout, themeDisplay);
+		}
+		else {
+			stagingFriendlyURL = PortalUtil.getGroupFriendlyURL(stagingGroup, layout.isPrivateLayout(), themeDisplay);
+		}
+
+		if (Validator.isNotNull(stagingFriendlyURL)) {
+			stagingFriendlyURL = PortalUtil.addPreservedParameters(themeDisplay, stagingFriendlyURL);
+		}
+	}
+
+	List<LayoutSetBranch> layoutSetBranches = null;
+
+	if (group.isStagingGroup() || group.isStagedRemotely()) {
+		layoutSetBranches = LayoutSetBranchLocalServiceUtil.getLayoutSetBranches(stagingGroup.getGroupId(), layout.isPrivateLayout());
+	}
+	%>
+
+	<aui:nav collapsible="<%= false %>" cssClass="staging-bar" id="stagingBar">
+		<c:if test="<%= (liveGroup != null) %>">
+			<c:choose>
+				<c:when test="<%= group.isStagingGroup() || group.isStagedRemotely() %>">
+					<c:if test="<%= stagingGroup != null %>">
+						<aui:nav-item anchorCssClass="staging-link" cssClass="active staging-toggle site-variations" dropdown="<%= true %>" id="stagingLink" label="staging" toggle="<%= true %>">
+							<aui:nav-item cssClass="row-fluid">
+								<c:choose>
+									<c:when test="<%= (group.isStagingGroup() || group.isStagedRemotely()) && branchingEnabled %>">
+
+										<%
+										request.setAttribute("view.jsp-layoutBranch", layoutBranch);
+										request.setAttribute("view.jsp-layoutRevision", layoutRevision);
+										request.setAttribute("view.jsp-layoutSetBranch", layoutSetBranch);
+										request.setAttribute("view.jsp-layoutSetBranches", layoutSetBranches);
+										request.setAttribute("view.jsp-stagingFriendlyURL", stagingFriendlyURL);
+										%>
+
+										<c:if test="<%= !layoutRevision.isIncomplete() %>">
+											<liferay-util:include page="/html/portlet/staging_bar/view_layout_set_branch_details.jsp" />
+
+											<liferay-util:include page="/html/portlet/staging_bar/view_layout_branch_details.jsp" />
+										</c:if>
+
+										<portlet:actionURL var="editLayoutRevisionURL">
+											<portlet:param name="struts_action" value="/staging_bar/edit_layouts" />
+										</portlet:actionURL>
+
+										<div class="layout-revision-details" id="<portlet:namespace />layoutRevisionDetails">
+											<aui:model-context bean="<%= layoutRevision %>" model="<%= LayoutRevision.class %>" />
+
+											<liferay-util:include page="/html/portlet/staging_bar/view_layout_revision_details.jsp" />
+										</div>
+
+										<liferay-ui:staging cssClass="branching-enabled span5" extended="<%= false %>" layoutSetBranchId="<%= layoutRevision.getLayoutSetBranchId() %>" onlyActions="<%= true %>" />
+									</c:when>
+
+									<c:otherwise>
+										<div class="staging-details">
+											<c:choose>
+												<c:when test="<%= liveLayout == null %>">
+													<span class="last-publication-branch">
+														<liferay-ui:message arguments='<%= "<strong>" + HtmlUtil.escape(layout.getName(locale)) + "</strong>" %>' key="page-x-has-not-been-published-to-live-yet" />
+													</span>
+												</c:when>
+												<c:otherwise>
+
+													<%
+													request.setAttribute("view.jsp-typeSettingsProperties", liveLayout.getTypeSettingsProperties());
+													%>
+
+													<liferay-util:include page="/html/portlet/staging_bar/last_publication_date_message.jsp" />
+												</c:otherwise>
+											</c:choose>
+										</div>
+
+										<c:if test="<%= group.isStagingGroup() || group.isStagedRemotely() %>">
+											<liferay-ui:staging cssClass="publish-link" extended="<%= false %>" onlyActions="<%= true %>" />
+										</c:if>
+									</c:otherwise>
+								</c:choose>
+							</aui:nav-item>
+						</aui:nav-item>
+					</c:if>
+				</c:when>
+				<c:otherwise>
+					<aui:nav-item cssClass='<%= ((layoutSetBranches != null) ? " active" : StringPool.BLANK) + " staging-toggle" %>' href="<%= (layoutSetBranches != null) ? null : stagingFriendlyURL %>" id="stagingLink" label="staging" />
+				</c:otherwise>
+			</c:choose>
+
+			<c:choose>
+				<c:when test="<%= group.isStagedRemotely() %>">
+
+					<%
+					UnicodeProperties typeSettingsProperties = group.getTypeSettingsProperties();
+
+					String remoteAddress = typeSettingsProperties.getProperty("remoteAddress");
+					int remotePort = GetterUtil.getInteger(typeSettingsProperties.getProperty("remotePort"));
+					String remotePathContext = typeSettingsProperties.getProperty("remotePathContext");
+					boolean secureConnection = GetterUtil.getBoolean(typeSettingsProperties.getProperty("secureConnection"));
+					long remoteGroupId = GetterUtil.getLong(typeSettingsProperties.getProperty("remoteGroupId"));
+
+					String remoteURL = StagingUtil.buildRemoteURL(remoteAddress, remotePort, remotePathContext, secureConnection, remoteGroupId, layout.isPrivateLayout());
+					%>
+
+					<aui:nav-item cssClass="remote-live-link" href="<%= remoteURL %>" iconCssClass="icon-external-link-sign" label="go-to-remote-live" />
+				</c:when>
+				<c:when test="<%= group.isStagingGroup() %>">
+					<c:if test="<%= Validator.isNotNull(liveFriendlyURL) %>">
+						<aui:nav-item cssClass=" live-link staging-toggle" href="<%= liveFriendlyURL %>" label="live" />
+					</c:if>
+				</c:when>
+				<c:otherwise>
+					<aui:nav-item anchorCssClass="staging-link" cssClass="active live-link staging-toggle" dropdown="<%= true %>" id="liveLink" label="live" toggle="<%= true %>">
+						<aui:nav-item cssClass="row-fluid">
+							<div class="staging-details">
+								<div class="alert alert-warning hide warning-content" id="<portlet:namespace />warningMessage">
+									<liferay-ui:message key="an-inital-staging-publication-is-in-progress" />
+								</div>
+
+								<%
+								request.setAttribute("view.jsp-typeSettingsProperties", liveLayout.getTypeSettingsProperties());
+								%>
+
+								<liferay-util:include page="/html/portlet/staging_bar/last_publication_date_message.jsp" />
+							</div>
+						</aui:nav-item>
+					</aui:nav-item>
+				</c:otherwise>
+			</c:choose>
+		</c:if>
+	</aui:nav>
+
+	<c:if test="<%= !branchingEnabled %>">
+		<aui:script use="liferay-staging">
+			Liferay.StagingBar.init(
+				{
+					namespace: '<portlet:namespace />',
+					portletId: '<%= portletDisplay.getId() %>'
+				}
+			);
+		</aui:script>
+	</c:if>
+
+	<aui:script use="aui-base">
+		var stagingLink = A.one('#<portlet:namespace />stagingLink');
+		var warningMessage = A.one('#<portlet:namespace />warningMessage');
+
+		var checkBackgroundTasks = function() {
+			Liferay.Service(
+				'/backgroundtask/get-background-tasks-count',
+				{
+					groupId: '<%= liveGroup.getGroupId() %>',
+					taskExecutorClassName: '<%= LayoutStagingBackgroundTaskExecutor.class.getName() %>',
+					completed: false
+				},
+				function(obj) {
+					var incomplete = obj > 0;
+
+					stagingLink.toggle(!incomplete);
+
+					if (warningMessage) {
+						warningMessage.toggle(incomplete);
+					}
+
+					if (incomplete) {
+						setTimeout(checkBackgroundTasks, 5000);
+					}
+				}
+			);
+		};
+
+		checkBackgroundTasks();
+	</aui:script>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/view_layout_branch_details.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/view_layout_branch_details.jsp
new file mode 100644
index 0000000..29989f9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/view_layout_branch_details.jsp
@@ -0,0 +1,124 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/staging_bar/init.jsp" %>
+
+<%
+LayoutBranch layoutBranch = (LayoutBranch)request.getAttribute("view.jsp-layoutBranch");
+LayoutRevision layoutRevision = (LayoutRevision)request.getAttribute("view.jsp-layoutRevision");
+LayoutSetBranch layoutSetBranch = (LayoutSetBranch)request.getAttribute("view.jsp-layoutSetBranch");
+String stagingFriendlyURL = (String)request.getAttribute("view.jsp-stagingFriendlyURL");
+%>
+
+<div class="page-variations-options span5">
+
+	<%
+	List<LayoutRevision> layoutRevisions = LayoutRevisionLocalServiceUtil.getChildLayoutRevisions(layoutRevision.getLayoutSetBranchId(), LayoutRevisionConstants.DEFAULT_PARENT_LAYOUT_REVISION_ID, plid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, new LayoutRevisionCreateDateComparator(true));
+	%>
+
+	<div class="layout-info">
+		<div class="variations-options">
+			<liferay-util:buffer var="taglibMessage">
+				<liferay-ui:message key="<%= HtmlUtil.escape(layoutBranch.getName()) %>" />
+			</liferay-util:buffer>
+
+			<c:choose>
+				<c:when test="<%= layoutRevisions.size() == 1 %>">
+					<span class="layout-branch-selector staging-variation-selector"><i class="icon-file"></i> <%= taglibMessage %></span>
+				</c:when>
+				<c:otherwise>
+					<liferay-ui:icon-menu cssClass="layout-branch-selector staging-variation-selector" direction="down" extended="<%= false %>" icon="../aui/file" message="<%= taglibMessage %>" showWhenSingleIcon="<%= true %>" useIconCaret="<%= true %>">
+
+						<%
+						for (LayoutRevision rootLayoutRevision : layoutRevisions) {
+							LayoutBranch curLayoutBranch = rootLayoutRevision.getLayoutBranch();
+
+							boolean selected = (curLayoutBranch.getLayoutBranchId() == layoutRevision.getLayoutBranchId());
+						%>
+
+							<portlet:actionURL var="layoutBranchURL">
+								<portlet:param name="struts_action" value="/dockbar/edit_layouts" />
+								<portlet:param name="<%= Constants.CMD %>" value="select_layout_branch" />
+								<portlet:param name="redirect" value="<%= stagingFriendlyURL %>" />
+								<portlet:param name="groupId" value="<%= String.valueOf(curLayoutBranch.getGroupId()) %>" />
+								<portlet:param name="layoutBranchId" value="<%= String.valueOf(curLayoutBranch.getLayoutBranchId()) %>" />
+								<portlet:param name="layoutSetBranchId" value="<%= String.valueOf(curLayoutBranch.getLayoutSetBranchId()) %>" />
+							</portlet:actionURL>
+
+							<liferay-ui:icon
+								cssClass='<%= selected ? "disabled" : StringPool.BLANK %>'
+								message="<%= HtmlUtil.escape(curLayoutBranch.getName()) %>"
+								url='<%= selected ? "javascript:;" : layoutBranchURL %>'
+							/>
+
+						<%
+						}
+						%>
+
+					</liferay-ui:icon-menu>
+				</c:otherwise>
+			</c:choose>
+
+			<portlet:renderURL var="layoutBranchesURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+				<portlet:param name="struts_action" value="/staging_bar/view_layout_branches" />
+				<portlet:param name="layoutSetBranchId" value="<%= String.valueOf(layoutSetBranch.getLayoutSetBranchId()) %>" />
+			</portlet:renderURL>
+
+			<div class="manage-page-variations page-variations">
+				<liferay-ui:icon
+					id="manageLayoutRevisions"
+					image="../aui/cog"
+					message="manage-page-variations"
+					url="<%= layoutBranchesURL %>"
+				/>
+			</div>
+		</div>
+	</div>
+</div>
+
+<aui:script use="aui-base,event-mouseenter">
+	var layoutBranchSelector = A.one('.layout-branch-selector');
+
+	if (layoutBranchSelector) {
+		layoutBranchSelector.on(
+			'mouseenter',
+			function(event) {
+				Liferay.Portal.ToolTip.show(layoutBranchSelector, '<liferay-ui:message key="page-variation" />')
+			}
+		);
+	}
+
+	var layoutRevisionsLink = A.one('#<portlet:namespace />manageLayoutRevisions');
+
+	if (layoutRevisionsLink) {
+		layoutRevisionsLink.detach('click');
+
+		layoutRevisionsLink.on(
+			'click',
+			function(event) {
+				event.preventDefault();
+
+				Liferay.Util.openWindow(
+					{
+						id: '<portlet:namespace />layoutRevisions',
+						title: '<%= UnicodeLanguageUtil.get(pageContext, "manage-page-variations") %>',
+						uri: event.currentTarget.attr('href')
+					}
+				);
+			}
+		);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/view_layout_branches.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/view_layout_branches.jsp
new file mode 100644
index 0000000..b2700a4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/view_layout_branches.jsp
@@ -0,0 +1,150 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/staging_bar/init.jsp" %>
+
+<%
+long layoutSetBranchId = ParamUtil.getLong(request, "layoutSetBranchId");
+
+List<LayoutRevision> layoutRevisions = LayoutRevisionLocalServiceUtil.getChildLayoutRevisions(layoutSetBranchId, LayoutRevisionConstants.DEFAULT_PARENT_LAYOUT_REVISION_ID, plid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, new LayoutRevisionCreateDateComparator(true));
+
+long layoutRevisionId = StagingUtil.getRecentLayoutRevisionId(request, layoutSetBranchId, plid);
+
+LayoutRevision currentLayoutRevision = null;
+
+if (layoutRevisionId <= 0) {
+	LayoutBranch layoutBranch = LayoutBranchLocalServiceUtil.getMasterLayoutBranch(layoutSetBranchId, plid);
+
+	currentLayoutRevision = LayoutRevisionLocalServiceUtil.getLayoutRevision(layoutSetBranchId, layoutBranch.getLayoutBranchId(), plid);
+
+	layoutRevisionId = currentLayoutRevision.getLayoutRevisionId();
+}
+else {
+	currentLayoutRevision = LayoutRevisionLocalServiceUtil.getLayoutRevision(layoutRevisionId);
+}
+
+request.setAttribute("view_layout_branches.jsp-currenttLayoutBranchId", String.valueOf(currentLayoutRevision.getLayoutBranchId()));
+%>
+
+<liferay-ui:success key="pageVariationAdded" message="page-variation-was-added" />
+<liferay-ui:success key="pageVariationDeleted" message="page-variation-was-deleted" />
+<liferay-ui:success key="pageVariationUpdated" message="page-variation-was-updated" />
+
+<liferay-ui:error exception="<%= LayoutBranchNameException.class %>">
+
+	<%
+	LayoutBranchNameException lbne = (LayoutBranchNameException)errorException;
+	%>
+
+	<c:if test="<%= lbne.getType() == LayoutBranchNameException.DUPLICATE %>">
+		<liferay-ui:message key="a-page-variation-with-that-name-already-exists" />
+	</c:if>
+
+	<c:if test="<%= lbne.getType() == LayoutBranchNameException.TOO_LONG %>">
+		<liferay-ui:message arguments="<%= new Object[] {4, 100} %>" key="please-enter-a-value-between-x-and-x-characters-long" />
+	</c:if>
+
+	<c:if test="<%= lbne.getType() == LayoutBranchNameException.TOO_SHORT %>">
+		<liferay-ui:message arguments="<%= new Object[] {4, 100} %>" key="please-enter-a-value-between-x-and-x-characters-long" />
+	</c:if>
+</liferay-ui:error>
+
+<div class="alert alert-info">
+	<liferay-ui:message key="page-variations-help" />
+</div>
+
+<c:if test="<%= GroupPermissionUtil.contains(permissionChecker, stagingGroup.getGroupId(), ActionKeys.ADD_LAYOUT_BRANCH) %>">
+	<liferay-util:html-top>
+		<liferay-util:include page="/html/portlet/staging_bar/edit_layout_branch.jsp">
+			<liferay-util:param name="layoutRevisionId" value="<%= String.valueOf(layoutRevisionId) %>" />
+			<liferay-util:param name="redirect" value="<%= currentURL %>" />
+		</liferay-util:include>
+	</liferay-util:html-top>
+
+	<%
+	String taglibOnClick = "javascript:Liferay.StagingBar.addBranch('" + LanguageUtil.get(pageContext, "add-page-variation") + "');";
+	%>
+
+	<aui:button-row>
+		<aui:button name="addRootLayoutBranch" onClick="<%= taglibOnClick %>" value="add-page-variation" />
+	</aui:button-row>
+</c:if>
+
+<div class="branch-results">
+	<liferay-ui:search-container>
+		<liferay-ui:search-container-results
+			results="<%= layoutRevisions %>"
+			total="<%= layoutRevisions.size() %>"
+		/>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.model.LayoutRevision"
+			escapedModel="<%= true %>"
+			keyProperty="layoutRevisionId"
+			modelVar="layoutRevision"
+		>
+
+			<%
+			LayoutBranch layoutBranch = layoutRevision.getLayoutBranch();
+			%>
+
+			<liferay-ui:search-container-column-text
+				buffer="buffer"
+				name="name"
+			>
+
+				<%
+				String layoutBranchName = layoutBranch.getName();
+
+				if (layoutRevision.getLayoutBranchId() == currentLayoutRevision.getLayoutBranchId()) {
+					buffer.append("<strong>");
+				}
+
+				buffer.append(LanguageUtil.get(pageContext, HtmlUtil.escape(layoutBranchName)));
+
+				if (layoutBranch.isMaster()) {
+					buffer.append(" (*)");
+				}
+
+				if (layoutRevision.getLayoutBranchId() == currentLayoutRevision.getLayoutBranchId()) {
+					buffer.append("</strong>");
+				}
+				%>
+
+			</liferay-ui:search-container-column-text>
+
+			<liferay-ui:search-container-column-text
+				name="description"
+				value="<%= HtmlUtil.escape(layoutBranch.getDescription()) %>"
+			/>
+
+			<liferay-ui:search-container-column-jsp
+				path="/html/portlet/staging_bar/layout_branch_action.jsp"
+			/>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator paginate="<%= false %>" searchContainer="<%= searchContainer %>" />
+	</liferay-ui:search-container>
+</div>
+
+<aui:script position="inline" use="liferay-staging-branch">
+	Liferay.StagingBar.init(
+		{
+			namespace: '<portlet:namespace />',
+			portletId: '<%= portletDisplay.getId() %>'
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/view_layout_revision_details.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/view_layout_revision_details.jsp
new file mode 100644
index 0000000..8fef214
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/view_layout_revision_details.jsp
@@ -0,0 +1,261 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/staging_bar/init.jsp" %>
+
+<%
+LayoutRevision layoutRevision = (LayoutRevision)request.getAttribute("view.jsp-layoutRevision");
+
+if ((layoutRevision == null) && (layout != null)) {
+	layoutRevision = LayoutStagingUtil.getLayoutRevision(layout);
+}
+
+LayoutSetBranch layoutSetBranch = (LayoutSetBranch)request.getAttribute("view.jsp-layoutSetBranch");
+
+if (layoutSetBranch == null) {
+	layoutSetBranch = LayoutSetBranchLocalServiceUtil.getLayoutSetBranch(layoutRevision.getLayoutSetBranchId());
+}
+
+boolean workflowEnabled = WorkflowDefinitionLinkLocalServiceUtil.hasWorkflowDefinitionLink(themeDisplay.getCompanyId(), scopeGroupId, LayoutRevision.class.getName());
+
+boolean hasWorkflowTask = false;
+
+if (workflowEnabled) {
+	hasWorkflowTask = StagingUtil.hasWorkflowTask(user.getUserId(), layoutRevision);
+}
+
+String taglibHelpMessage = null;
+
+if (layoutRevision.isHead()) {
+	taglibHelpMessage = LanguageUtil.format(pageContext, "this-version-will-be-published-when-x-is-published-to-live", HtmlUtil.escape(layoutSetBranch.getName()));
+}
+else if (hasWorkflowTask) {
+	taglibHelpMessage = "you-are-currently-reviewing-this-page.-you-can-make-changes-and-send-them-to-the-next-step-in-the-workflow-when-ready";
+}
+else {
+	taglibHelpMessage = "a-new-version-will-be-created-automatically-if-this-page-is-modified";
+}
+%>
+
+<div class="layout-revision-actions">
+	<c:if test="<%= !layoutRevision.isIncomplete() %>">
+
+		<%
+		String taglibURL = "javascript:Liferay.fire('" + liferayPortletResponse.getNamespace() + "viewHistory', {layoutRevisionId: '" + layoutRevision.getLayoutRevisionId() + "', layoutSetBranchId: '" + layoutRevision.getLayoutSetBranchId() + "'}); void(0);";
+		%>
+
+		<liferay-ui:icon
+			id="viewHistoryLink"
+			image="../aui/time"
+			message="history"
+			method="get"
+			url="<%= taglibURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= !hasWorkflowTask %>">
+		<c:if test="<%= !layoutRevision.isMajor() && (layoutRevision.getParentLayoutRevisionId() != LayoutRevisionConstants.DEFAULT_PARENT_LAYOUT_REVISION_ID) %>">
+
+			<%
+			String taglibURL = "javascript:Liferay.fire('" + liferayPortletResponse.getNamespace() + "undo', {layoutRevisionId: '" + layoutRevision.getLayoutRevisionId() + "', layoutSetBranchId: '" + layoutRevision.getLayoutSetBranchId() + "'}); void(0);";
+			%>
+
+			<liferay-ui:icon
+				id="undoLink"
+				image="../aui/undo"
+				message="undo"
+				url="<%= taglibURL %>"
+			/>
+		</c:if>
+
+		<c:if test="<%= layoutRevision.hasChildren() %>">
+
+			<%
+			List<LayoutRevision> childLayoutRevisions = layoutRevision.getChildren();
+
+			LayoutRevision firstChildLayoutRevision = childLayoutRevisions.get(0);
+
+			if (firstChildLayoutRevision.isInactive()) {
+			%>
+
+				<%
+				String taglibURL = "javascript:Liferay.fire('" + liferayPortletResponse.getNamespace() + "redo', {layoutRevisionId: '" + firstChildLayoutRevision.getLayoutRevisionId() + "', layoutSetBranchId: '" + firstChildLayoutRevision.getLayoutSetBranchId() + "'}); void(0);";
+				%>
+
+				<liferay-ui:icon
+					id="redoLink"
+					image="../aui/repeat"
+					message="redo"
+					url="<%= taglibURL %>"
+				/>
+
+			<%
+			}
+			%>
+
+		</c:if>
+	</c:if>
+</div>
+
+<div class="layout-revision-info <%= layoutRevision.isIncomplete() ? "incomplete" : "span7" %>">
+	<c:if test="<%= !layoutRevision.isIncomplete() %>">
+		<span class="layout-revision-version"><label><liferay-ui:message key="version" />:</label> <span class=""><%= layoutRevision.getLayoutRevisionId() %></span></span>
+
+		<aui:model-context bean="<%= layoutRevision %>" model="<%= LayoutRevision.class %>" />
+
+		<aui:workflow-status showIcon="<%= false %>" showLabel="<%= false %>" status="<%= layoutRevision.getStatus() %>" statusMessage='<%= layoutRevision.isHead() ? "ready-for-publication" : null %>' />
+
+		<aui:script use="aui-base">
+			var taglibWorflowStatus = A.one('.layout-revision-info').one('.taglib-workflow-status');
+
+			if (taglibWorflowStatus) {
+				taglibWorflowStatus.on(
+					'mouseenter',
+					function(event) {
+						Liferay.Portal.ToolTip.show(taglibWorflowStatus, '<liferay-ui:message key="<%= taglibHelpMessage %>" />');
+					}
+				);
+			}
+		</aui:script>
+
+		<c:if test="<%= hasWorkflowTask %>">
+
+			<%
+			long controlPanelPlid = PortalUtil.getControlPanelPlid(company.getCompanyId());
+
+			PortletURL portletURL = liferayPortletResponse.createLiferayPortletURL(controlPanelPlid, PortletKeys.MY_WORKFLOW_TASKS, PortletRequest.RENDER_PHASE);
+
+			portletURL.setParameter("struts_action", "/my_workflow_tasks/edit_workflow_task");
+
+			WorkflowTask workflowTask = StagingUtil.getWorkflowTask(user.getUserId(), layoutRevision);
+
+			portletURL.setParameter("workflowTaskId", String.valueOf(workflowTask.getWorkflowTaskId()));
+
+			portletURL.setPortletMode(PortletMode.VIEW);
+			portletURL.setWindowState(LiferayWindowState.POP_UP);
+
+			String layoutURL = PortalUtil.getLayoutFriendlyURL(layout, themeDisplay);
+
+			layoutURL = HttpUtil.addParameter(layoutURL, "layoutSetBranchId", layoutRevision.getLayoutSetBranchId());
+			layoutURL = HttpUtil.addParameter(layoutURL, "layoutRevisionId", layoutRevision.getLayoutRevisionId());
+
+			portletURL.setParameter("closeRedirect", layoutURL);
+			%>
+
+			<liferay-ui:icon
+				cssClass="submit-link"
+				id="reviewTaskIcon"
+				image="../aui/random"
+				message="workflow"
+				method="get"
+				url="<%= portletURL.toString() %>"
+				useDialog="<%= true %>"
+			/>
+		</c:if>
+	</c:if>
+
+	<c:if test="<%= !hasWorkflowTask %>">
+		<c:if test="<%= !layoutRevision.isHead() && LayoutPermissionUtil.contains(permissionChecker, layoutRevision.getPlid(), ActionKeys.UPDATE) %>">
+			<c:if test="<%= layoutRevision.isIncomplete() %>">
+				<p>
+					<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(layoutRevision.getName(locale)), HtmlUtil.escape(layoutSetBranch.getName())} %>" key="the-page-x-is-not-enabled-in-x,-but-is-available-in-other-pages-variations" />
+				</p>
+			</c:if>
+
+			<%
+			String label = null;
+
+			if (layoutRevision.isIncomplete()) {
+				label = LanguageUtil.format(pageContext, "enable-in-x", layoutSetBranch.getName());
+			}
+			else {
+				if (workflowEnabled) {
+					label = "submit-for-publication";
+				}
+				else {
+					label = "mark-as-ready-for-publication";
+				}
+			}
+			%>
+
+			<portlet:actionURL var="publishURL">
+				<portlet:param name="struts_action" value="/staging_bar/edit_layouts" />
+				<portlet:param name="<%= Constants.CMD %>" value="update_layout_revision" />
+				<portlet:param name="redirect" value="<%= PortalUtil.getLayoutFullURL(themeDisplay) %>" />
+				<portlet:param name="groupId" value="<%= String.valueOf(layoutRevision.getGroupId()) %>" />
+				<portlet:param name="layoutRevisionId" value="<%= String.valueOf(layoutRevision.getLayoutRevisionId()) %>" />
+				<portlet:param name="major" value="true" />
+				<portlet:param name="workflowAction" value="<%= String.valueOf(layoutRevision.isIncomplete() ? WorkflowConstants.ACTION_SAVE_DRAFT : WorkflowConstants.ACTION_PUBLISH) %>" />
+			</portlet:actionURL>
+
+			<%
+			List<LayoutRevision> pendingLayoutRevisions = LayoutRevisionLocalServiceUtil.getLayoutRevisions(layoutRevision.getLayoutSetBranchId(), layoutRevision.getPlid(), WorkflowConstants.STATUS_PENDING);
+
+			String taglibURL = null;
+
+			if (!workflowEnabled || pendingLayoutRevisions.isEmpty()) {
+				taglibURL = "javascript:Liferay.fire('" + liferayPortletResponse.getNamespace() + "submit', {incomplete: " + layoutRevision.isIncomplete() + ", publishURL: '" + publishURL + "', currentURL: '" + currentURL + "'}); void(0);";
+			}
+			%>
+
+			<liferay-ui:icon
+				cssClass="label label-submit"
+				id="submitLink"
+				image="../aui/ok"
+				label="<%= true %>"
+				message="<%= label %>"
+				url="<%= taglibURL %>"
+			/>
+
+			<c:if test="<%= workflowEnabled && !pendingLayoutRevisions.isEmpty() %>">
+
+				<%
+				String submitMessage = "you-cannot-submit-your-changes-because-someone-else-has-submitted-changes-for-approval";
+
+				LayoutRevision pendingLayoutRevision = pendingLayoutRevisions.get(0);
+
+				if ((pendingLayoutRevision != null) && (pendingLayoutRevision.getUserId() == user.getUserId())) {
+					submitMessage = "you-cannot-submit-your-changes-because-your-previous-submission-is-still-waiting-for-approval";
+				}
+				%>
+
+				<aui:script use="aui-base">
+					var submitLink = A.one('.submit-link');
+
+					if (submitLink) {
+						submitLink.on(
+							'mouseenter',
+							function(event) {
+								Liferay.Portal.ToolTip.show(submitLink, '<liferay-ui:message key="<%= submitMessage %>" />');
+							}
+						);
+					}
+				</aui:script>
+			</c:if>
+		</c:if>
+	</c:if>
+</div>
+
+<aui:script position="inline" use="liferay-staging-version">
+	var stagingBar = Liferay.StagingBar;
+
+	stagingBar.init(
+		{
+			namespace: '<portlet:namespace />',
+			portletId: '<%= portletDisplay.getId() %>'
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/view_layout_revisions.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/view_layout_revisions.jsp
new file mode 100644
index 0000000..ae8d222
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/view_layout_revisions.jsp
@@ -0,0 +1,220 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/staging_bar/init.jsp" %>
+
+<%
+long layoutSetBranchId = ParamUtil.getLong(request, "layoutSetBranchId");
+
+LayoutRevision recentLayoutRevision = null;
+
+long currentLayoutRevisionId = StagingUtil.getRecentLayoutRevisionId(request, layoutSetBranchId, plid);
+
+if (currentLayoutRevisionId > 0) {
+	recentLayoutRevision = LayoutRevisionLocalServiceUtil.getLayoutRevision(currentLayoutRevisionId);
+}
+else {
+	recentLayoutRevision = LayoutStagingUtil.getLayoutRevision(layout);
+
+	currentLayoutRevisionId = recentLayoutRevision.getLayoutRevisionId();
+}
+
+List<LayoutRevision> rootLayoutRevisions = LayoutRevisionLocalServiceUtil.getChildLayoutRevisions(layoutSetBranchId, LayoutRevisionConstants.DEFAULT_PARENT_LAYOUT_REVISION_ID, plid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, new LayoutRevisionIdComparator(true));
+%>
+
+<c:if test="<%= !rootLayoutRevisions.isEmpty() %>">
+	<c:if test="<%= rootLayoutRevisions.size() > 1 %>">
+		<aui:select cssClass="variation-selector" inlineLabel="left" label="page-variation" name="variationsSelector">
+
+			<%
+			for (LayoutRevision rootLayoutRevision : rootLayoutRevisions) {
+				LayoutBranch layoutBranch = rootLayoutRevision.getLayoutBranch();
+			%>
+
+				<aui:option label="<%= HtmlUtil.escape(layoutBranch.getName()) %>" selected="<%= recentLayoutRevision.getLayoutBranchId() == rootLayoutRevision.getLayoutBranchId() %>" value="<%= rootLayoutRevision.getLayoutRevisionId() %>" />
+
+			<%
+			}
+			%>
+
+			<aui:option label="all-page-variations" value="all" />
+		</aui:select>
+	</c:if>
+
+	<div class="layout-revision-container" id="<portlet:namespace/>layoutRevisionsContainer">
+
+		<%
+		for (LayoutRevision rootLayoutRevision : rootLayoutRevisions) {
+		%>
+
+			<div class="layout-variation-container <%= (recentLayoutRevision.getLayoutBranchId() == rootLayoutRevision.getLayoutBranchId()) ? StringPool.BLANK : "hide" %>" id="<portlet:namespace/><%= rootLayoutRevision.getLayoutRevisionId() %>">
+				<c:if test="<%= rootLayoutRevisions.size() > 1 %>">
+
+					<%
+					LayoutBranch layoutBranch = rootLayoutRevision.getLayoutBranch();
+					%>
+
+					<h3 class="layout-variation-name"><liferay-ui:message key="<%= HtmlUtil.escape(layoutBranch.getName()) %>" /></h3>
+				</c:if>
+
+				<liferay-ui:search-container>
+					<liferay-ui:search-container-results
+						results="<%= LayoutRevisionLocalServiceUtil.getLayoutRevisions(rootLayoutRevision.getLayoutSetBranchId(), rootLayoutRevision.getLayoutBranchId(), rootLayoutRevision.getPlid(), QueryUtil.ALL_POS, QueryUtil.ALL_POS, new LayoutRevisionIdComparator(false)) %>"
+						total="<%= LayoutRevisionLocalServiceUtil.getLayoutRevisionsCount(rootLayoutRevision.getLayoutSetBranchId(), rootLayoutRevision.getLayoutBranchId(), rootLayoutRevision.getPlid()) %>"
+					/>
+
+					<liferay-ui:search-container-row
+						className="com.liferay.portal.model.LayoutRevision"
+						escapedModel="<%= true %>"
+						keyProperty="layoutRevisionId"
+						modelVar="curLayoutRevision"
+					>
+						<liferay-ui:search-container-column-text
+							buffer="buffer"
+							cssClass='<%= (curLayoutRevision.getLayoutRevisionId() == currentLayoutRevisionId) ? "layout-revision-current" : StringPool.BLANK %>'
+							name="date"
+						>
+
+						<%
+						Date now = new Date();
+
+						long timeAgo = now.getTime() - curLayoutRevision.getCreateDate().getTime();
+
+						if (curLayoutRevision.getLayoutRevisionId() == currentLayoutRevisionId) {
+							buffer.append("<div class=\"current-version-pointer\"><img alt=\"");
+							buffer.append(LanguageUtil.get(pageContext, "current-version"));
+							buffer.append("\" src=\"");
+							buffer.append(themeDisplay.getPathThemeImages());
+							buffer.append("/arrows/01_right.png\" title=\"");
+							buffer.append(LanguageUtil.get(pageContext, "current-version"));
+							buffer.append("\" /></div>");
+						}
+
+						buffer.append("<span class=\"approximate-date\">");
+						buffer.append(LanguageUtil.format(pageContext, "x-ago", LanguageUtil.getTimeDescription(pageContext, timeAgo, true)));
+						buffer.append("</span><span class=\"real-date\">");
+						buffer.append(dateFormatDateTime.format(curLayoutRevision.getCreateDate()));
+						buffer.append("</span>");
+						%>
+
+						</liferay-ui:search-container-column-text>
+
+						<liferay-ui:search-container-column-text
+							name="status"
+						>
+
+							<aui:model-context bean="<%= curLayoutRevision %>" model="<%= LayoutRevision.class %>" />
+
+							<%
+							int status = curLayoutRevision.getStatus();
+							%>
+
+							<c:choose>
+								<c:when test="<%= curLayoutRevision.isHead() %>">
+									<aui:workflow-status showLabel="<%= false %>" status="<%= status %>" statusMessage="ready-for-publication" />
+								</c:when>
+								<c:otherwise>
+									<aui:workflow-status showLabel="<%= false %>" status="<%= status %>" />
+								</c:otherwise>
+							</c:choose>
+
+						</liferay-ui:search-container-column-text>
+
+						<liferay-ui:search-container-column-text
+							buffer="buffer"
+							name="version"
+						>
+
+							<%
+							if (curLayoutRevision.getLayoutRevisionId() == currentLayoutRevisionId) {
+								buffer.append("<span class=\"layout-revision-current\">");
+								buffer.append(curLayoutRevision.getLayoutRevisionId());
+								buffer.append("</span><span class=\"current-version\">");
+								buffer.append(LanguageUtil.get(pageContext, "current-version"));
+								buffer.append("</span>");
+							}
+							else {
+								buffer.append("<a class=\"layout-revision selection-handle\" data-layoutRevisionId=\"");
+								buffer.append(curLayoutRevision.getLayoutRevisionId());
+								buffer.append("\" data-layoutSetBranchId=\"");
+								buffer.append(curLayoutRevision.getLayoutSetBranchId());
+								buffer.append("\" href=\"#\" title=\"");
+								buffer.append(LanguageUtil.get(pageContext, "go-to-this-version"));
+								buffer.append("\">");
+								buffer.append(curLayoutRevision.getLayoutRevisionId());
+								buffer.append("</a>");
+							}
+							%>
+
+						</liferay-ui:search-container-column-text>
+
+						<liferay-ui:search-container-column-text
+							buffer="buffer"
+							name="user"
+						>
+
+							<%
+							User curUser = UserLocalServiceUtil.getUserById(curLayoutRevision.getUserId());
+
+							buffer.append("<a class=\"user-handle\" href=\"");
+							buffer.append(curUser.getDisplayURL(themeDisplay));
+							buffer.append("\">");
+							buffer.append(curUser.getFullName());
+							buffer.append("</a>");
+							%>
+
+						</liferay-ui:search-container-column-text>
+
+						<liferay-ui:search-container-column-jsp
+							path="/html/portlet/staging_bar/layout_revision_action.jsp"
+						/>
+					</liferay-ui:search-container-row>
+
+					<liferay-ui:search-iterator paginate="<%= false %>" searchContainer="<%= searchContainer %>" />
+				</liferay-ui:search-container>
+			</div>
+
+		<%
+		}
+		%>
+
+	</div>
+</c:if>
+
+<aui:script use="aui-base">
+	var variationsSelector = A.one('#<portlet:namespace/>variationsSelector');
+	var layoutRevisionsContainer = A.one('#<portlet:namespace/>layoutRevisionsContainer');
+
+	var layoutBranchesContainer = A.all('.layout-variation-container');
+
+	if (variationsSelector) {
+		variationsSelector.on(
+			'change',
+			function() {
+				if (variationsSelector.val() == 'all') {
+					layoutBranchesContainer.show();
+				}
+				else {
+					layoutBranchesContainer.hide();
+
+					var layoutBranch = A.one('#<portlet:namespace/>' + variationsSelector.val());
+
+					layoutBranch.show();
+				}
+			}
+		);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/view_layout_set_branch_details.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/view_layout_set_branch_details.jsp
new file mode 100644
index 0000000..04228df
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/view_layout_set_branch_details.jsp
@@ -0,0 +1,118 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/staging_bar/init.jsp" %>
+
+<%
+LayoutRevision layoutRevision = (LayoutRevision)request.getAttribute("view.jsp-layoutRevision");
+LayoutSetBranch layoutSetBranch = (LayoutSetBranch)request.getAttribute("view.jsp-layoutSetBranch");
+List<LayoutSetBranch> layoutSetBranches = (List<LayoutSetBranch>)request.getAttribute("view.jsp-layoutSetBranches");
+String stagingFriendlyURL = (String)request.getAttribute("view.jsp-stagingFriendlyURL");
+%>
+
+<c:if test="<%= (layoutSetBranches != null) && (layoutSetBranches.size() >= 1) %>">
+	<div class="site-pages-variation-options span5">
+		<div class="variations-options">
+			<liferay-util:buffer var="taglibMessage">
+				<liferay-ui:message key="<%= HtmlUtil.escape(layoutSetBranch.getName()) %>" />
+
+				<small>(<liferay-ui:message arguments="<%= layouts.size() %>" key='<%= (layouts.size() == 1) ? "1-page" : "x-pages" %>' />)</small>
+			</liferay-util:buffer>
+
+			<c:choose>
+				<c:when test="<%= layoutSetBranches.size() == 1 %>">
+					<span class="layout-set-branch-selector staging-variation-selector"><i class="icon-globe"></i> <%= taglibMessage %></span>
+				</c:when>
+				<c:otherwise>
+					<liferay-ui:icon-menu cssClass="layout-set-branch-selector staging-variation-selector" direction="down" extended="<%= false %>" icon="../aui/globe" message="<%= taglibMessage %>" showWhenSingleIcon="<%= true %>" useIconCaret="<%= true %>">
+
+						<%
+						for (LayoutSetBranch curLayoutSetBranch : layoutSetBranches) {
+							boolean selected = (group.isStagingGroup() || group.isStagedRemotely()) && (curLayoutSetBranch.getLayoutSetBranchId() == layoutRevision.getLayoutSetBranchId());
+						%>
+
+							<portlet:actionURL var="layoutSetBranchURL">
+								<portlet:param name="struts_action" value="/dockbar/edit_layouts" />
+								<portlet:param name="<%= Constants.CMD %>" value="select_layout_set_branch" />
+								<portlet:param name="redirect" value="<%= stagingFriendlyURL %>" />
+								<portlet:param name="groupId" value="<%= String.valueOf(curLayoutSetBranch.getGroupId()) %>" />
+								<portlet:param name="privateLayout" value="<%= String.valueOf(layout.isPrivateLayout()) %>" />
+								<portlet:param name="layoutSetBranchId" value="<%= String.valueOf(curLayoutSetBranch.getLayoutSetBranchId()) %>" />
+							</portlet:actionURL>
+
+							<liferay-ui:icon
+								cssClass='<%= selected ? "disabled" : StringPool.BLANK %>'
+								message="<%= HtmlUtil.escape(curLayoutSetBranch.getName()) %>"
+								url='<%= selected ? "javascript:;" : layoutSetBranchURL %>'
+							/>
+
+						<%
+						}
+						%>
+
+					</liferay-ui:icon-menu>
+				</c:otherwise>
+			</c:choose>
+
+			<portlet:renderURL var="layoutSetBranchesURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+				<portlet:param name="struts_action" value="/staging_bar/view_layout_set_branches" />
+			</portlet:renderURL>
+
+			<div class="manage-layout-set-branches page-variations">
+				<liferay-ui:icon
+					id="manageLayoutSetBranches"
+					image="../aui/cog"
+					message="manage-site-pages-variations"
+					url="<%= layoutSetBranchesURL %>"
+				/>
+			</div>
+		</div>
+	</div>
+
+	<aui:script use="aui-base">
+		var layoutSetBranchSelector = A.one('.layout-set-branch-selector');
+
+		if (layoutSetBranchSelector) {
+			layoutSetBranchSelector.on(
+				'mouseenter',
+				function(event) {
+					Liferay.Portal.ToolTip.show(layoutSetBranchSelector, '<liferay-ui:message key="site-pages-variation" />')
+				}
+			);
+		}
+
+		var layoutSetBranchesLink = A.one('#<portlet:namespace />manageLayoutSetBranches');
+
+		if (layoutSetBranchesLink) {
+			layoutSetBranchesLink.detach('click');
+
+			layoutSetBranchesLink.on(
+				'click',
+				function(event) {
+					event.preventDefault();
+
+					Liferay.Util.openWindow(
+						{
+							id: '<portlet:namespace />layoutSetBranches',
+							title: '<%= UnicodeLanguageUtil.get(pageContext, "manage-site-pages-variations") %>',
+							uri: event.currentTarget.attr('href')
+						}
+					);
+				}
+			);
+		}
+	</aui:script>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/view_layout_set_branches.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/view_layout_set_branches.jsp
new file mode 100644
index 0000000..fa01a30
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/staging_bar/view_layout_set_branches.jsp
@@ -0,0 +1,132 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/staging_bar/init.jsp" %>
+
+<%
+List<LayoutSetBranch> layoutSetBranches = LayoutSetBranchLocalServiceUtil.getLayoutSetBranches(stagingGroup.getGroupId(), privateLayout);
+
+LayoutSetBranch currentLayoutSetBranch = LayoutSetBranchLocalServiceUtil.getUserLayoutSetBranch(themeDisplay.getUserId(), stagingGroup.getGroupId(), privateLayout, 0, 0);
+
+request.setAttribute("view_layout_set_branches.jsp-currentLayoutSetBranchId", String.valueOf(currentLayoutSetBranch.getLayoutSetBranchId()));
+%>
+
+<liferay-ui:success key="sitePageVariationAdded" message="site-page-variation-was-added" />
+<liferay-ui:success key="sitePageVariationDeleted" message="site-page-variation-was-deleted" />
+<liferay-ui:success key="sitePageVariationMerged" message="site-page-variation-was-merged" />
+<liferay-ui:success key="sitePageVariationUpdated" message="site-page-variation-was-updated" />
+
+<liferay-ui:error exception="<%= LayoutSetBranchNameException.class %>">
+
+	<%
+	LayoutSetBranchNameException lsbne = (LayoutSetBranchNameException)errorException;
+	%>
+
+	<c:if test="<%= lsbne.getType() == LayoutSetBranchNameException.DUPLICATE %>">
+		<liferay-ui:message key="a-site-pages-variation-with-that-name-already-exists" />
+	</c:if>
+
+	<c:if test="<%= lsbne.getType() == LayoutSetBranchNameException.MASTER %>">
+		<liferay-ui:message key="only-one-site-pages-variation-can-be-the-main-one" />
+	</c:if>
+
+	<c:if test="<%= lsbne.getType() == LayoutSetBranchNameException.TOO_LONG %>">
+		<liferay-ui:message arguments="<%= new Object[] {4, 100} %>" key="please-enter-a-value-between-x-and-x-characters-long" />
+	</c:if>
+
+	<c:if test="<%= lsbne.getType() == LayoutSetBranchNameException.TOO_SHORT %>">
+		<liferay-ui:message arguments="<%= new Object[] {4, 100} %>" key="please-enter-a-value-between-x-and-x-characters-long" />
+	</c:if>
+</liferay-ui:error>
+
+<div class="alert alert-info">
+	<liferay-ui:message key="pages-variations-help" />
+</div>
+
+<c:if test="<%= GroupPermissionUtil.contains(permissionChecker, stagingGroup.getGroupId(), ActionKeys.ADD_LAYOUT_SET_BRANCH) %>">
+	<liferay-util:html-top>
+		<liferay-util:include page="/html/portlet/staging_bar/edit_layout_set_branch.jsp">
+			<liferay-util:param name="redirect" value="<%= currentURL %>" />
+		</liferay-util:include>
+	</liferay-util:html-top>
+
+	<%
+	String taglibOnClick = "javascript:Liferay.StagingBar.addBranch('" + LanguageUtil.get(pageContext, "add-site-pages-variation") + "');";
+	%>
+
+	<aui:button-row>
+		<aui:button name="addBranchButton" onClick="<%= taglibOnClick %>" value="add-site-pages-variation" />
+	</aui:button-row>
+</c:if>
+
+<div class="branch-results">
+	<liferay-ui:search-container>
+		<liferay-ui:search-container-results
+			results="<%= layoutSetBranches %>"
+			total="<%= layoutSetBranches.size() %>"
+		/>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.model.LayoutSetBranch"
+			escapedModel="<%= true %>"
+			keyProperty="layoutSetBranchId"
+			modelVar="curLayoutSetBranch"
+		>
+
+			<liferay-ui:search-container-column-text
+				buffer="buffer"
+				name="name"
+			>
+
+				<%
+				if (currentLayoutSetBranch.equals(curLayoutSetBranch)) {
+					buffer.append("<strong>");
+				}
+
+				buffer.append(LanguageUtil.get(pageContext, curLayoutSetBranch.getName()));
+
+				if (curLayoutSetBranch.isMaster()) {
+					buffer.append(" (*)");
+				}
+
+				if (currentLayoutSetBranch.equals(curLayoutSetBranch)) {
+					buffer.append("</strong>");
+				}
+				%>
+
+			</liferay-ui:search-container-column-text>
+
+			<liferay-ui:search-container-column-text
+				property="description"
+			/>
+
+			<liferay-ui:search-container-column-jsp
+				path="/html/portlet/staging_bar/layout_set_branch_action.jsp"
+			/>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator paginate="<%= false %>" searchContainer="<%= searchContainer %>" />
+	</liferay-ui:search-container>
+</div>
+
+<aui:script position="inline" use="liferay-staging-branch">
+	Liferay.StagingBar.init(
+		{
+			namespace: '<portlet:namespace />',
+			portletId: '<%= portletDisplay.getId() %>'
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/translator/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/translator/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/translator/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/translator/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/translator/init.jsp
new file mode 100644
index 0000000..beeacbc
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/translator/init.jsp
@@ -0,0 +1,23 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.kernel.microsofttranslator.MicrosoftTranslatorException" %><%@
+page import="com.liferay.portlet.translator.model.Translation" %><%@
+page import="com.liferay.portlet.translator.util.TranslatorUtil" %>
+
+<%@ include file="/html/portlet/translator/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/translator/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/translator/view.jsp
new file mode 100644
index 0000000..a15548f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/translator/view.jsp
@@ -0,0 +1,111 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/translator/init.jsp" %>
+
+<%
+Translation translation = (Translation)request.getAttribute(WebKeys.TRANSLATOR_TRANSLATION);
+
+Map<String, String> languageIdsMap = TranslatorUtil.getLanguageIdsMap(locale);
+
+if (translation == null) {
+	String translationId = PropsUtil.get(PropsKeys.TRANSLATOR_DEFAULT_LANGUAGES);
+
+	String[] fromAndTolanguageIds = TranslatorUtil.getFromAndToLanguageIds(translationId, languageIdsMap);
+
+	if (fromAndTolanguageIds != null) {
+		String fromLanguageId = fromAndTolanguageIds[0];
+		String toLanguageId = fromAndTolanguageIds[1];
+
+		translation = new Translation(fromLanguageId, toLanguageId, StringPool.BLANK, StringPool.BLANK);
+	}
+}
+%>
+
+<c:choose>
+	<c:when test="<%= translation == null %>">
+		<div class="alert alert-error">
+			<liferay-ui:message key="please-configure-valid-default-languages" />
+		</div>
+	</c:when>
+	<c:otherwise>
+		<portlet:actionURL var="portletURL" />
+
+		<aui:form accept-charset="UTF-8" action="<%= portletURL %>" method="post" name="fm">
+			<liferay-ui:error exception="<%= MicrosoftTranslatorException.class %>">
+
+				<%
+				MicrosoftTranslatorException mte = (MicrosoftTranslatorException)errorException;
+
+				String message = mte.getMessage();
+
+				if (message.startsWith("ACS50012") || message.startsWith("ACS70002") || message.startsWith("ACS90011")) {
+				%>
+
+					<liferay-ui:message key="please-configure-a-valid-microsoft-translator-license" />
+
+				<%
+				}
+				%>
+
+			</liferay-ui:error>
+
+			<c:if test="<%= Validator.isNotNull(translation.getToText()) %>">
+				<%= HtmlUtil.escape(translation.getToText()) %>
+			</c:if>
+
+			<aui:fieldset>
+				<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" cssClass="lfr-textarea-container" label="" name="text" type="textarea" value="<%= translation.getFromText() %>" wrap="soft" />
+
+				<aui:select label="language-from" name="fromLanguageId">
+
+					<%
+					for (Map.Entry<String, String> entry : languageIdsMap.entrySet()) {
+						String languageId = entry.getKey();
+						String languageName = entry.getValue();
+					%>
+
+						<aui:option label="<%= languageName %>" selected="<%= languageId.equals(translation.getFromLanguageId()) %>" value="<%= languageId %>" />
+
+					<%
+					}
+					%>
+
+				</aui:select>
+
+				<aui:select label="language-to" name="toLanguageId">
+
+					<%
+					for (Map.Entry<String, String> entry : languageIdsMap.entrySet()) {
+						String languageId = entry.getKey();
+						String languageName = entry.getValue();
+					%>
+
+						<aui:option label="<%= languageName %>" selected="<%= languageId.equals(translation.getToLanguageId()) %>" value="<%= languageId %>" />
+
+					<%
+					}
+					%>
+
+				</aui:select>
+			</aui:fieldset>
+
+			<aui:button-row>
+				<aui:button type="submit" value="translate" />
+			</aui:button-row>
+		</aui:form>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/action/delete.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/action/delete.jspf
new file mode 100644
index 0000000..c6ca3d5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/action/delete.jspf
@@ -0,0 +1,26 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<portlet:actionURL var="deleteEntryURL">
+	<portlet:param name="struts_action" value="/trash/edit_entry" />
+	<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+	<portlet:param name="redirect" value="<%= redirect %>" />
+	<portlet:param name="trashEntryId" value="<%= String.valueOf(entry.getEntryId()) %>" />
+</portlet:actionURL>
+
+<liferay-ui:icon-delete
+	url="<%= deleteEntryURL %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/action/restore.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/action/restore.jspf
new file mode 100644
index 0000000..d87fff1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/action/restore.jspf
@@ -0,0 +1,63 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+TrashHandler trashHandler = TrashHandlerRegistryUtil.getTrashHandler(entry.getClassName());
+%>
+
+<c:choose>
+	<c:when test="<%= trashHandler.isRestorable(entry.getClassPK()) && !trashHandler.isInTrashContainer(entry.getClassPK()) %>">
+		<portlet:actionURL var="restoreEntryURL">
+			<portlet:param name="struts_action" value="/trash/edit_entry" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.RESTORE %>" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="trashEntryId" value="<%= String.valueOf(entry.getEntryId()) %>" />
+		</portlet:actionURL>
+
+		<%
+		String taglibOnClick = "Liferay.fire('" + renderResponse.getNamespace() + "checkEntry', {trashEntryId: " + entry.getEntryId() + ", uri: '" + restoreEntryURL.toString() + "'});";
+		%>
+
+		<liferay-ui:icon
+			image="undo"
+			message="restore"
+			onClick="<%= taglibOnClick %>"
+			url="javascript:;"
+		/>
+	</c:when>
+	<c:when test="<%= !trashHandler.isRestorable(entry.getClassPK()) && trashHandler.isMovable() %>">
+		<portlet:renderURL var="moveURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+			<portlet:param name="struts_action" value="/trash/view_container_model" />
+			<portlet:param name="className" value="<%= entry.getClassName() %>" />
+			<portlet:param name="classPK" value="<%= String.valueOf(entry.getClassPK()) %>" />
+			<portlet:param name="containerModelClassName" value="<%= trashHandler.getContainerModelClassName() %>" />
+		</portlet:renderURL>
+
+		<%
+		Map<String, Object> data = new HashMap<String, Object>();
+
+		data.put("uri", moveURL);
+		%>
+
+		<liferay-ui:icon
+			cssClass="trash-restore-link"
+			data="<%= data %>"
+			image="undo"
+			message="restore"
+			url="javascript:;"
+		/>
+	</c:when>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/css/.sass-cache/main.css
new file mode 100644
index 0000000..b61e8c0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/css/.sass-cache/main.css
@@ -0,0 +1,22 @@
+.portlet-trash .asset-ratings {
+  clear: both;
+  margin: 1em 0; }
+.portlet-trash .asset-discussion .taglib-discussion {
+  width: 100%; }
+.portlet-trash .edit-toolbar {
+  margin: 0 0 1em 0; }
+.portlet-trash .form-search {
+  display: block;
+  float: right; }
+.portlet-trash .lfr-header-row .icon-delete {
+  background-image: url(@theme_image_path@/common/delete.png); }
+.portlet-trash .lfr-header-row .icon-undo {
+  background-image: url(@theme_image_path@/common/undo.png); }
+.portlet-trash .trash-root-entry {
+  color: #999;
+  float: right; }
+
+.trash-restore-popup .form fieldset {
+  margin-bottom: 0;
+  padding: 0 15px; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/css/main.css
new file mode 100644
index 0000000..a4945ca
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/css/main.css
@@ -0,0 +1,43 @@
+.portlet-trash {
+	.asset-ratings {
+		clear: both;
+		margin: 1em 0;
+	}
+
+	.asset-discussion .taglib-discussion {
+		width: 100%;
+	}
+
+	.edit-toolbar {
+		margin: 0 0 1em 0;
+	}
+
+	.form-search {
+		display: block;
+		float: right;
+	}
+
+	.lfr-header-row {
+		.icon-delete {
+			background-image: url(@theme_image_path@/common/delete.png);
+		}
+
+		.icon-undo {
+			background-image: url(@theme_image_path@/common/undo.png);
+		}
+	}
+
+	.trash-root-entry {
+		color: #999;
+		float: right;
+	}
+}
+
+.trash-restore-popup {
+	.form {
+		fieldset {
+			margin-bottom: 0;
+			padding: 0 15px;
+		}
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/entry_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/entry_action.jsp
new file mode 100644
index 0000000..47d86d7
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/entry_action.jsp
@@ -0,0 +1,43 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/trash/init.jsp" %>
+
+<%
+SearchContainer searchContainer = (SearchContainer)request.getAttribute("liferay-ui:search:searchContainer");
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+if (searchContainer != null) {
+	redirect = searchContainer.getIteratorURL().toString();
+}
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+TrashEntry entry = null;
+
+if (row != null) {
+	entry = (TrashEntry)row.getObject();
+}
+else {
+	entry = (TrashEntry)request.getAttribute(WebKeys.TRASH_ENTRY);
+}
+%>
+
+<liferay-ui:icon-menu showWhenSingleIcon="<%= true %>">
+	<%@ include file="/html/portlet/trash/action/restore.jspf" %>
+	<%@ include file="/html/portlet/trash/action/delete.jspf" %>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/entry_search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/entry_search.jsp
new file mode 100644
index 0000000..0cb9564
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/entry_search.jsp
@@ -0,0 +1,25 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/trash/init.jsp" %>
+
+<aui:nav-bar>
+	<aui:nav-bar-search cssClass="pull-right">
+		<div class="form-search">
+			<liferay-ui:input-search autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" placeholder='<%= LanguageUtil.get(locale, "keywords") %>' />
+		</div>
+	</aui:nav-bar-search>
+</aui:nav-bar>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/error.jsp
new file mode 100644
index 0000000..a6d8f9c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/error.jsp
@@ -0,0 +1,24 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/trash/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/init.jsp
new file mode 100644
index 0000000..decd870
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/init.jsp
@@ -0,0 +1,31 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.TrashPermissionException" %><%@
+page import="com.liferay.portal.kernel.trash.TrashHandler" %><%@
+page import="com.liferay.portal.kernel.trash.TrashHandlerRegistryUtil" %><%@
+page import="com.liferay.portal.kernel.trash.TrashRenderer" %><%@
+page import="com.liferay.portlet.trash.DuplicateEntryException" %><%@
+page import="com.liferay.portlet.trash.model.TrashEntryList" %><%@
+page import="com.liferay.portlet.trash.model.impl.TrashEntryImpl" %><%@
+page import="com.liferay.portlet.trash.search.EntrySearch" %><%@
+page import="com.liferay.portlet.trash.search.EntrySearchTerms" %><%@
+page import="com.liferay.portlet.trash.service.TrashEntryLocalServiceUtil" %><%@
+page import="com.liferay.portlet.trash.service.TrashEntryServiceUtil" %>
+
+<%@ include file="/html/portlet/trash/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/restore_entry.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/restore_entry.jsp
new file mode 100644
index 0000000..a43b4a4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/restore_entry.jsp
@@ -0,0 +1,77 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/trash/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+String restoreEntryAction = ParamUtil.getString(request, "restoreEntryAction", "/trash/edit_entry");
+
+long trashEntryId = ParamUtil.getLong(request, "trashEntryId");
+
+String className = ParamUtil.getString(request, "className");
+long classPK = ParamUtil.getLong(request, "classPK");
+
+TrashEntry entry = null;
+
+if (trashEntryId > 0) {
+	entry = TrashEntryLocalServiceUtil.getEntry(trashEntryId);
+}
+else if (Validator.isNotNull(className) && (classPK > 0)) {
+	entry = TrashEntryLocalServiceUtil.fetchEntry(className, classPK);
+}
+
+if (entry != null) {
+	className = entry.getClassName();
+	classPK = entry.getClassPK();
+}
+
+String duplicateEntryId = ParamUtil.getString(request, "duplicateEntryId");
+String oldName = ParamUtil.getString(request, "oldName");
+
+String overrideMessage = ParamUtil.getString(request, "overrideMessage");
+String renameMessage = ParamUtil.getString(request, "renameMessage");
+%>
+
+<div class="alert alert-block" id="<portlet:namespace />messageContainer">
+	<liferay-ui:message arguments="<%= new String[] {oldName} %>" key="an-entry-with-name-x-already-exists" />
+</div>
+
+<portlet:actionURL var="restoreActionURL">
+	<portlet:param name="struts_action" value="<%= restoreEntryAction %>" />
+</portlet:actionURL>
+
+<aui:form action="<%= restoreActionURL %>" enctype="multipart/form-data" method="post" name="restoreTrashEntryFm" onSubmit="event.preventDefault();">
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="trashEntryId" type="hidden" value="<%= trashEntryId %>" />
+	<aui:input name="duplicateEntryId" type="hidden" value="<%= duplicateEntryId %>" />
+	<aui:input name="oldName" type="hidden" value="<%= oldName %>" />
+
+	<aui:fieldset>
+		<aui:input checked="<%= true %>" id="override" label="<%= overrideMessage %>" name="<%= Constants.CMD %>" type="radio" value="<%= Constants.OVERRIDE %>" />
+
+		<aui:input id="rename" label="<%= renameMessage %>" name="<%= Constants.CMD %>" type="radio" value="<%= Constants.RENAME %>" />
+
+		<aui:input cssClass="new-file-name" label="" name="newName" title="<%= renameMessage %>" value="<%= TrashUtil.getNewName(themeDisplay, className, classPK, oldName) %>" />
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button cssClass="btn-cancel" type="cancel" />
+
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/restore_path.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/restore_path.jsp
new file mode 100644
index 0000000..74f8dee
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/restore_path.jsp
@@ -0,0 +1,121 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/trash/init.jsp" %>
+
+<c:if test="<%= SessionMessages.contains(renderRequest, portletDisplay.getId() + SessionMessages.KEY_SUFFIX_DELETE_SUCCESS_DATA) %>">
+	<div class="alert alert-success">
+
+		<%
+		Map<String, List<String>> data = (HashMap<String, List<String>>)SessionMessages.get(renderRequest, portletDisplay.getId() + SessionMessages.KEY_SUFFIX_DELETE_SUCCESS_DATA);
+
+		List<String> restoreClassNames = data.get("restoreClassNames");
+		List<String> restoreEntryMessages = data.get("restoreEntryMessages");
+		List<String> restoreEntryLinks = data.get("restoreEntryLinks");
+		List<String> restoreLinks = data.get("restoreLinks");
+		List<String> restoreMessages = data.get("restoreMessages");
+		%>
+
+		<c:choose>
+			<c:when test="<%= (data != null) && (restoreLinks != null) && (restoreMessages != null) && (restoreLinks.size() > 0) && (restoreMessages.size() > 0) %>">
+
+				<%
+				for (int i = 0; i < restoreLinks.size(); i++) {
+					String type = "selected-item";
+
+					String restoreClassName = restoreClassNames.get(i);
+
+					if (Validator.isNotNull(restoreClassName)) {
+						type = ResourceActionsUtil.getModelResource(pageContext, restoreClassName);
+					}
+				%>
+
+					<liferay-util:buffer var="entityLink">
+						<em class="restore-entry-title"><aui:a href="<%= restoreEntryLinks.get(i) %>" label="<%= restoreEntryMessages.get(i) %>" /></em>
+					</liferay-util:buffer>
+
+					<liferay-util:buffer var="link">
+						<em class="restore-entry-title"><aui:a href="<%= restoreLinks.get(i) %>" label="<%= restoreMessages.get(i) %>" /></em>
+					</liferay-util:buffer>
+
+					<liferay-ui:message arguments="<%= new Object[] {type, entityLink.trim(), link.trim()} %>" key="the-x-x-was-restored-to-x" />
+
+				<%
+				}
+				%>
+
+			</c:when>
+			<c:otherwise>
+				<liferay-ui:message key="the-item-was-restored" />
+			</c:otherwise>
+		</c:choose>
+	</div>
+</c:if>
+
+<liferay-ui:restore-entry />
+
+<portlet:actionURL var="selectContainerURL">
+	<portlet:param name="struts_action" value="/trash/edit_entry" />
+</portlet:actionURL>
+
+<aui:form action="<%= selectContainerURL.toString() %>" method="post" name="selectContainerForm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.MOVE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+	<aui:input name="className" type="hidden" value="" />
+	<aui:input name="classPK" type="hidden" value="" />
+	<aui:input name="containerModelId" type="hidden" value="" />
+</aui:form>
+
+<aui:script use="aui-dialog-iframe-deprecated,liferay-util-window">
+	A.getBody().delegate(
+		'click',
+		function(event) {
+			var link = event.currentTarget.one('a');
+
+			<portlet:namespace />restoreDialog(link.attr('data-uri'));
+		},
+		'.trash-restore-link'
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />restoreDialog',
+		function(uri) {
+			Liferay.Util.selectEntity(
+				{
+					dialog: {
+						constrain: true,
+						destroyOnHide: true,
+						modal: true,
+						width: 1024
+					},
+					eventName: '<portlet:namespace />selectFolder',
+					id: '<portlet:namespace />selectFolder',
+					title: '<liferay-ui:message key="warning" />',
+					uri: uri
+				},
+				function(event) {
+					document.<portlet:namespace />selectContainerForm.<portlet:namespace />className.value = event.classname;
+					document.<portlet:namespace />selectContainerForm.<portlet:namespace />classPK.value = event.classpk;
+					document.<portlet:namespace />selectContainerForm.<portlet:namespace />containerModelId.value = event.containermodelid;
+
+					submitForm(document.<portlet:namespace />selectContainerForm);
+				}
+			);
+		},
+		['aui-base']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/view.jsp
new file mode 100644
index 0000000..bf514dd
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/view.jsp
@@ -0,0 +1,301 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/trash/init.jsp" %>
+
+<%
+String tabs1 = ParamUtil.getString(request, "tabs1", "staging");
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+String keywords = ParamUtil.getString(request, "keywords");
+
+long groupId = themeDisplay.getScopeGroupId();
+
+Group group = GroupLocalServiceUtil.getGroup(groupId);
+
+if (group.isStagingGroup() && tabs1.equals("live")) {
+	groupId = group.getLiveGroupId();
+}
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/trash/view");
+portletURL.setParameter("tabs1", tabs1);
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "recycle-bin"), portletURL.toString());
+
+if (Validator.isNotNull(keywords)) {
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "search") + ": " + keywords, currentURL);
+}
+%>
+
+<liferay-util:include page="/html/portlet/trash/restore_path.jsp" />
+
+<liferay-ui:error exception="<%= DuplicateEntryException.class %>">
+	<liferay-ui:message key="unable-to-move-this-item-to-the-selected-destination" />
+</liferay-ui:error>
+
+<liferay-ui:error exception="<%= TrashPermissionException.class %>">
+
+	<%
+	TrashPermissionException tpe = (TrashPermissionException)errorException;
+	%>
+
+	<c:if test="<%= tpe.getType() == TrashPermissionException.DELETE %>">
+		<liferay-ui:message key="you-do-not-have-permission-to-delete-this-item" />
+	</c:if>
+
+	<c:if test="<%= tpe.getType() == TrashPermissionException.EMPTY_TRASH %>">
+		<liferay-ui:message key="unable-to-completely-empty-trash-you-do-not-have-permission-to-delete-one-or-more-items" />
+	</c:if>
+
+	<c:if test="<%= tpe.getType() == TrashPermissionException.MOVE %>">
+		<liferay-ui:message key="you-do-not-have-permission-to-move-this-item-to-the-selected-destination" />
+	</c:if>
+
+	<c:if test="<%= tpe.getType() == TrashPermissionException.RESTORE %>">
+		<liferay-ui:message key="you-do-not-have-permission-to-restore-this-item" />
+	</c:if>
+
+	<c:if test="<%= tpe.getType() == TrashPermissionException.RESTORE_OVERWRITE %>">
+		<liferay-ui:message key="you-do-not-have-permission-to-replace-an-existing-item-with-the-selected-one" />
+	</c:if>
+
+	<c:if test="<%= tpe.getType() == TrashPermissionException.RESTORE_RENAME %>">
+		<liferay-ui:message key="you-do-not-have-permission-to-rename-this-item" />
+	</c:if>
+
+</liferay-ui:error>
+
+<c:if test="<%= group.isStagingGroup() %>">
+	<liferay-ui:tabs
+		names="staging,live"
+		url="<%= portletURL.toString() %>"
+	/>
+</c:if>
+
+<liferay-portlet:renderURL varImpl="searchURL">
+	<portlet:param name="struts_action" value="/trash/view" />
+</liferay-portlet:renderURL>
+
+<liferay-ui:search-container
+	searchContainer="<%= new EntrySearch(renderRequest, portletURL) %>"
+>
+
+	<%
+	boolean approximate = false;
+	%>
+
+	<liferay-ui:search-container-results>
+
+		<%
+		EntrySearchTerms searchTerms = (EntrySearchTerms)searchContainer.getSearchTerms();
+
+		if (Validator.isNotNull(searchTerms.getKeywords())) {
+			Sort sort = SortFactoryUtil.getSort(TrashEntry.class, searchContainer.getOrderByCol(), searchContainer.getOrderByType());
+
+			Hits hits = TrashEntryLocalServiceUtil.search(company.getCompanyId(), groupId, user.getUserId(), searchTerms.getKeywords(), searchContainer.getStart(), searchContainer.getEnd(), sort);
+
+			searchContainer.setTotal(hits.getLength());
+
+			results = TrashUtil.getEntries(hits);
+		}
+		else {
+			TrashEntryList trashEntryList = TrashEntryServiceUtil.getEntries(groupId, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+
+			searchContainer.setTotal(trashEntryList.getCount());
+
+			results = TrashEntryImpl.toModels(trashEntryList.getArray());
+
+			approximate = trashEntryList.isApproximate();
+		}
+
+		searchContainer.setResults(results);
+
+		if ((searchContainer.getTotal() == 0) && Validator.isNotNull(searchTerms.getKeywords())) {
+			searchContainer.setEmptyResultsMessage(LanguageUtil.format(pageContext, "no-entries-were-found-that-matched-the-keywords-x", "<strong>" + HtmlUtil.escape(searchTerms.getKeywords()) + "</strong>"));
+		}
+		%>
+
+	</liferay-ui:search-container-results>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portlet.trash.model.TrashEntry"
+		keyProperty="entryId"
+		modelVar="entry"
+	>
+
+		<%
+		TrashHandler trashHandler = TrashHandlerRegistryUtil.getTrashHandler(entry.getClassName());
+
+		TrashRenderer trashRenderer = trashHandler.getTrashRenderer(entry.getClassPK());
+
+		String viewContentURLString = null;
+
+		if (trashRenderer != null) {
+			PortletURL viewContentURL = renderResponse.createRenderURL();
+
+			viewContentURL.setParameter("struts_action", "/trash/view_content");
+			viewContentURL.setParameter("redirect", currentURL);
+
+			if (entry.getRootEntry() != null) {
+				viewContentURL.setParameter("className", entry.getClassName());
+				viewContentURL.setParameter("classPK", String.valueOf(entry.getClassPK()));
+			}
+			else {
+				viewContentURL.setParameter("trashEntryId", String.valueOf(entry.getEntryId()));
+			}
+
+			viewContentURL.setParameter("type", trashRenderer.getType());
+			viewContentURL.setParameter("showActions", Boolean.FALSE.toString());
+			viewContentURL.setParameter("showAssetMetadata", Boolean.TRUE.toString());
+			viewContentURL.setParameter("showEditURL", Boolean.FALSE.toString());
+
+			viewContentURLString = viewContentURL.toString();
+		}
+		%>
+
+		<liferay-ui:search-container-column-text
+			name="name"
+		>
+			<liferay-ui:icon
+				label="<%= true %>"
+				message="<%= HtmlUtil.escape(trashRenderer.getTitle(locale)) %>"
+				method="get" src="<%= trashRenderer.getIconPath(renderRequest) %>"
+				url="<%= viewContentURLString %>"
+			/>
+
+			<c:if test="<%= entry.getRootEntry() != null %>">
+
+				<%
+				TrashEntry rootEntry = entry.getRootEntry();
+
+				TrashHandler rootTrashHandler = TrashHandlerRegistryUtil.getTrashHandler(rootEntry.getClassName());
+
+				TrashRenderer rootTrashRenderer = rootTrashHandler.getTrashRenderer(rootEntry.getClassPK());
+
+				String viewRootContentURLString = null;
+
+				if (rootTrashRenderer != null) {
+					PortletURL viewContentURL = renderResponse.createRenderURL();
+
+					viewContentURL.setParameter("struts_action", "/trash/view_content");
+					viewContentURL.setParameter("redirect", currentURL);
+					viewContentURL.setParameter("trashEntryId", String.valueOf(rootEntry.getEntryId()));
+					viewContentURL.setParameter("type", rootTrashRenderer.getType());
+					viewContentURL.setParameter("showActions", Boolean.FALSE.toString());
+					viewContentURL.setParameter("showAssetMetadata", Boolean.TRUE.toString());
+					viewContentURL.setParameter("showEditURL", Boolean.FALSE.toString());
+
+					viewRootContentURLString = viewContentURL.toString();
+				}
+				%>
+
+				<liferay-util:buffer var="rootEntryIcon">
+					<liferay-ui:icon
+						label="<%= true %>"
+						message="<%= rootTrashRenderer.getTitle(locale) %>"
+						method="get"
+						src="<%= rootTrashRenderer.getIconPath(renderRequest) %>"
+						url="<%= viewRootContentURLString %>"
+					/>
+				</liferay-util:buffer>
+
+				<span class="trash-root-entry">(<liferay-ui:message arguments="<%= rootEntryIcon %>" key="<%= rootTrashHandler.getDeleteMessage() %>" />)</span>
+			</c:if>
+		</liferay-ui:search-container-column-text>
+
+		<liferay-ui:search-container-column-text
+			name="type"
+			orderable="<%= true %>"
+			value="<%= ResourceActionsUtil.getModelResource(locale, entry.getClassName()) %>"
+		/>
+
+		<liferay-ui:search-container-column-date
+			name="removed-date"
+			orderable="<%= true %>"
+			value="<%= entry.getCreateDate() %>"
+		/>
+
+		<liferay-ui:search-container-column-text
+			name="removed-by"
+			orderable="<%= true %>"
+			value="<%= HtmlUtil.escape(entry.getUserName()) %>"
+		/>
+
+		<c:choose>
+			<c:when test="<%= Validator.isNotNull(trashRenderer.renderActions(renderRequest, renderResponse)) %>">
+				<liferay-ui:search-container-column-jsp
+					align="right"
+					path="<%= trashRenderer.renderActions(renderRequest, renderResponse) %>"
+				/>
+			</c:when>
+			<c:when test="<%= entry.getRootEntry() == null %>">
+				<liferay-ui:search-container-column-jsp
+					align="right"
+					path="/html/portlet/trash/entry_action.jsp"
+				/>
+			</c:when>
+			<c:otherwise>
+				<liferay-ui:search-container-column-text align="right">
+
+					<%
+					request.removeAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+					request.setAttribute(WebKeys.TRASH_RENDERER, trashRenderer);
+					%>
+
+					<liferay-util:include page="/html/portlet/trash/view_content_action.jsp" />
+				</liferay-ui:search-container-column-text>
+			</c:otherwise>
+		</c:choose>
+	</liferay-ui:search-container-row>
+
+	<portlet:actionURL var="emptyTrashURL">
+		<portlet:param name="struts_action" value="/trash/edit_entry" />
+		<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+	</portlet:actionURL>
+
+	<liferay-ui:trash-empty
+		portletURL="<%= emptyTrashURL %>"
+		totalEntries="<%= searchContainer.getTotal() %>"
+	/>
+
+	<aui:form action="<%= searchURL.toString() %>" method="get" name="fm">
+		<liferay-portlet:renderURLParams varImpl="searchURL" />
+		<aui:input name="<%= Constants.CMD %>" type="hidden" value="" />
+		<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+		<aui:input name="deleteTrashEntryIds" type="hidden" />
+		<aui:input name="restoreTrashEntryIds" type="hidden" />
+
+		<liferay-ui:search-form
+			page="/html/portlet/trash/entry_search.jsp"
+		/>
+	</aui:form>
+
+	<liferay-ui:breadcrumb
+		showCurrentGroup="<%= false %>"
+		showCurrentPortlet="<%= true %>"
+		showGuestGroup="<%= false %>"
+		showLayout="<%= false %>"
+		showParentGroups="<%= false %>"
+	/>
+
+	<div class="separator"><!-- --></div>
+
+	<liferay-ui:search-iterator type='<%= approximate ? "more" : "regular" %>' />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/view_container_model.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/view_container_model.jsp
new file mode 100644
index 0000000..fe57c60
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/view_container_model.jsp
@@ -0,0 +1,158 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/trash/init.jsp" %>
+
+<%
+String className = ParamUtil.getString(request, "className");
+long classPK = ParamUtil.getLong(request, "classPK");
+String eventName = ParamUtil.getString(request, "eventName", liferayPortletResponse.getNamespace() + "selectFolder");
+
+TrashHandler trashHandler = TrashHandlerRegistryUtil.getTrashHandler(className);
+
+TrashRenderer trashRenderer = trashHandler.getTrashRenderer(classPK);
+
+ContainerModel containerModel = (ContainerModel)request.getAttribute(WebKeys.TRASH_CONTAINER_MODEL);
+
+long containerModelId = 0;
+
+if (containerModel != null) {
+	containerModelId = containerModel.getContainerModelId();
+}
+
+PortletURL containerURL = renderResponse.createRenderURL();
+
+containerURL.setParameter("struts_action", "/trash/view_container_model");
+containerURL.setParameter("redirect", currentURL);
+containerURL.setParameter("className", className);
+containerURL.setParameter("classPK", String.valueOf(classPK));
+containerURL.setParameter("containerModelClassName", trashHandler.getContainerModelClassName());
+
+TrashUtil.addContainerModelBreadcrumbEntries(request, trashHandler.getContainerModelClassName(), containerModelId, containerURL);
+%>
+
+<div class="alert alert-block">
+	<liferay-ui:message arguments="<%= new Object[] {trashHandler.getContainerModelName(), trashRenderer.getTitle(locale)} %>" key="the-original-x-does-not-exist-anymore" />
+</div>
+
+<aui:form method="post" name="selectFolderFm">
+	<liferay-ui:header
+		showBackURL="<%= containerModel != null %>"
+		title='<%= LanguageUtil.format(pageContext, "select-x", trashHandler.getContainerModelName(), true) %>'
+	/>
+
+	<liferay-ui:breadcrumb showGuestGroup="<%= false %>" showLayout="<%= false %>" showParentGroups="<%= false %>" />
+
+	<aui:button-row>
+
+		<%
+		Map<String, Object> data = new HashMap<String, Object>();
+
+		data.put("classname", className);
+		data.put("classpk", classPK);
+		data.put("containermodelid", containerModelId);
+		%>
+
+		<aui:button cssClass="selector-button" data="<%= data %>" value='<%= LanguageUtil.format(pageContext, "choose-this-x", trashHandler.getContainerModelName(), true) %>' />
+	</aui:button-row>
+
+	<br />
+
+	<%
+	containerURL.setParameter("containerModelId", String.valueOf(containerModelId));
+	%>
+
+	<liferay-ui:search-container
+		searchContainer="<%= new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, containerURL, null, null) %>"
+		total="<%= trashHandler.getContainerModelsCount(classPK, containerModelId) %>"
+	>
+		<liferay-ui:search-container-results
+			results="<%= trashHandler.getContainerModels(classPK, containerModelId, searchContainer.getStart(), searchContainer.getEnd()) %>"
+		/>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.model.ContainerModel"
+			keyProperty="containerModelId"
+			modelVar="curContainerModel"
+		>
+
+			<%
+			containerURL.setParameter("containerModelId", String.valueOf(curContainerModel.getContainerModelId()));
+			%>
+
+			<liferay-ui:search-container-column-text
+				name="<%= LanguageUtil.get(pageContext, trashHandler.getContainerModelName()) %>"
+			>
+				<c:choose>
+					<c:when test="<%= curContainerModel.getContainerModelId() > 0 %>">
+
+						<%
+						TrashHandler containerTrashHandler = TrashHandlerRegistryUtil.getTrashHandler(((BaseModel)curContainerModel).getModelClassName());
+
+						TrashRenderer containerTrashRenderer = containerTrashHandler.getTrashRenderer(curContainerModel.getContainerModelId());
+						%>
+
+						<liferay-ui:icon
+							label="<%= true %>"
+							message="<%= curContainerModel.getContainerModelName() %>"
+							method="get" src="<%= containerTrashRenderer.getIconPath(renderRequest) %>"
+							url="<%= containerURL.toString() %>"
+						/>
+					</c:when>
+					<c:otherwise>
+						<%= curContainerModel.getContainerModelName() %>
+					</c:otherwise>
+				</c:choose>
+			</liferay-ui:search-container-column-text>
+
+			<liferay-ui:search-container-column-text
+				name='<%= LanguageUtil.format(pageContext, "num-of-x", trashHandler.getContainerModelName(), true) %>'
+				value="<%= String.valueOf(trashHandler.getContainerModelsCount(classPK, curContainerModel.getContainerModelId())) %>"
+			/>
+
+			<liferay-ui:search-container-column-text>
+
+				<%
+				Map<String, Object> data = new HashMap<String, Object>();
+
+				data.put("classname", className);
+				data.put("classpk", classPK);
+				data.put("containermodelid", curContainerModel.getContainerModelId());
+				%>
+
+				<aui:button cssClass="selector-button" data="<%= data %>" value="choose" />
+			</liferay-ui:search-container-column-text>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script use="aui-base">
+	var Util = Liferay.Util;
+
+	A.one('#<portlet:namespace />selectFolderFm').delegate(
+		'click',
+		function(event) {
+			var result = Util.getAttributes(event.currentTarget, 'data-');
+
+			Util.getOpener().Liferay.fire('<%= HtmlUtil.escapeJS(eventName) %>', result);
+
+			Util.getWindow().hide();
+		},
+		'.selector-button'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/view_content.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/view_content.jsp
new file mode 100644
index 0000000..8b3eb2f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/view_content.jsp
@@ -0,0 +1,382 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/trash/init.jsp" %>
+
+<liferay-util:include page="/html/portlet/trash/restore_path.jsp" />
+
+<div class="asset-content">
+
+	<%
+	String redirect = ParamUtil.getString(request, "redirect");
+
+	long trashEntryId = ParamUtil.getLong(request, "trashEntryId");
+
+	String className = ParamUtil.getString(request, "className");
+	long classPK = ParamUtil.getLong(request, "classPK");
+
+	TrashEntry entry = null;
+
+	if (trashEntryId > 0) {
+		entry = TrashEntryLocalServiceUtil.getEntry(trashEntryId);
+	}
+	else if (Validator.isNotNull(className) && (classPK > 0)) {
+		entry = TrashEntryLocalServiceUtil.fetchEntry(className, classPK);
+	}
+
+	if (entry != null) {
+		className = entry.getClassName();
+		classPK = entry.getClassPK();
+	}
+
+	TrashHandler trashHandler = TrashHandlerRegistryUtil.getTrashHandler(className);
+
+	TrashRenderer trashRenderer = trashHandler.getTrashRenderer(classPK);
+
+	String path = trashRenderer.render(renderRequest, renderResponse, AssetRenderer.TEMPLATE_FULL_CONTENT);
+
+	PortletURL containerModelURL = renderResponse.createRenderURL();
+
+	containerModelURL.setParameter("redirect", redirect);
+	containerModelURL.setParameter("className", trashHandler.getContainerModelClassName());
+
+	TrashUtil.addBaseModelBreadcrumbEntries(request, className, classPK, containerModelURL);
+	%>
+
+	<liferay-ui:breadcrumb
+		showCurrentGroup="<%= false %>"
+		showCurrentPortlet="<%= true %>"
+		showGuestGroup="<%= false %>"
+		showLayout="<%= false %>"
+		showParentGroups="<%= false %>"
+	/>
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		localizeTitle="<%= false %>"
+		title="<%= trashRenderer.getTitle(locale) %>"
+	/>
+
+	<c:choose>
+		<c:when test="<%= Validator.isNotNull(trashRenderer.renderActions(renderRequest, renderResponse)) %>">
+			<liferay-util:include page="<%= trashRenderer.renderActions(renderRequest, renderResponse) %>" />
+		</c:when>
+		<c:otherwise>
+			<liferay-ui:app-view-toolbar>
+				<aui:button-row cssClass="edit-toolbar" id='<%= renderResponse.getNamespace() + "entryToolbar" %>' />
+			</liferay-ui:app-view-toolbar>
+		</c:otherwise>
+	</c:choose>
+
+	<c:choose>
+		<c:when test="<%= trashHandler.isContainerModel() %>">
+
+			<%
+			PortletURL iteratorURL = renderResponse.createRenderURL();
+
+			iteratorURL.setParameter("struts_action", "/trash/view_content");
+			iteratorURL.setParameter("redirect", redirect);
+			iteratorURL.setParameter("className", className);
+			iteratorURL.setParameter("classPK", String.valueOf(classPK));
+
+			int containerModelsCount = trashHandler.getTrashContainerModelsCount(classPK);
+			int baseModelsCount = trashHandler.getTrashContainedModelsCount(classPK);
+			%>
+
+			<liferay-ui:panel-container extended="<%= false %>" id="containerDisplayInfoPanelContainer" persistState="<%= true %>">
+				<c:if test="<%= containerModelsCount > 0 %>">
+					<liferay-ui:panel collapsible="<%= true %>" cssClass="view-folders" extended="<%= false %>" id="containerModelsListingPanel" persistState="<%= true %>" title="<%= trashHandler.getTrashContainerModelName() %>">
+						<liferay-ui:search-container
+							curParam="cur1"
+							deltaConfigurable="<%= false %>"
+							iteratorURL="<%= iteratorURL %>"
+							total="<%= containerModelsCount %>"
+						>
+							<liferay-ui:search-container-results
+								results="<%= trashHandler.getTrashContainerModelTrashRenderers(classPK, searchContainer.getStart(), searchContainer.getEnd()) %>"
+							/>
+
+							<liferay-ui:search-container-row
+								className="com.liferay.portal.kernel.trash.TrashRenderer"
+								modelVar="curTrashRenderer"
+							>
+
+								<%
+								TrashHandler curTrashHandler = TrashHandlerRegistryUtil.getTrashHandler(curTrashRenderer.getClassName());
+
+								int curContainerModelsCount = curTrashHandler.getTrashContainerModelsCount(curTrashRenderer.getClassPK());
+								int curBaseModelsCount = curTrashHandler.getTrashContainedModelsCount(curTrashRenderer.getClassPK());
+
+								PortletURL rowURL = renderResponse.createRenderURL();
+
+								rowURL.setParameter("struts_action", "/trash/view_content");
+								rowURL.setParameter("redirect", currentURL);
+								rowURL.setParameter("className", (curTrashRenderer.getClassName()));
+								rowURL.setParameter("classPK", String.valueOf(curTrashRenderer.getClassPK()));
+								%>
+
+								<liferay-ui:search-container-column-text
+									name="name"
+								>
+									<liferay-ui:icon
+										label="<%= true %>"
+										message="<%= HtmlUtil.escape(curTrashRenderer.getTitle(locale)) %>"
+										method="get"
+										src="<%= curTrashRenderer.getIconPath(renderRequest) %>"
+										url="<%= rowURL.toString() %>"
+									/>
+								</liferay-ui:search-container-column-text>
+
+								<liferay-ui:search-container-column-text
+									name='<%= LanguageUtil.format(pageContext, "num-of-x", curTrashHandler.getTrashContainedModelName(), true) %>'
+									value="<%= String.valueOf(curBaseModelsCount) %>"
+								/>
+
+								<liferay-ui:search-container-column-text
+									name='<%= LanguageUtil.format(pageContext, "num-of-x", curTrashHandler.getTrashContainerModelName(), true) %>'
+									value="<%= String.valueOf(curContainerModelsCount) %>"
+								/>
+
+								<liferay-ui:search-container-column-jsp
+									align="right"
+									path="/html/portlet/trash/view_content_action.jsp"
+								/>
+							</liferay-ui:search-container-row>
+
+							<liferay-ui:search-iterator />
+						</liferay-ui:search-container>
+					</liferay-ui:panel>
+				</c:if>
+
+				<c:if test="<%= baseModelsCount > 0 %>">
+					<liferay-ui:panel collapsible="<%= true %>" extended="<%= false %>" id="baseModelsListingPanel" persistState="<%= true %>" title="<%= trashHandler.getTrashContainedModelName() %>">
+						<liferay-ui:search-container
+							curParam="cur2"
+							deltaConfigurable="<%= false %>"
+							iteratorURL="<%= iteratorURL %>"
+							total="<%= baseModelsCount %>"
+						>
+							<liferay-ui:search-container-results
+								results="<%= trashHandler.getTrashContainedModelTrashRenderers(classPK, searchContainer.getStart(), searchContainer.getEnd()) %>"
+							/>
+
+							<liferay-ui:search-container-row
+								className="com.liferay.portal.kernel.trash.TrashRenderer"
+								modelVar="curTrashRenderer"
+							>
+
+								<%
+								PortletURL rowURL = renderResponse.createRenderURL();
+
+								rowURL.setParameter("struts_action", "/trash/view_content");
+								rowURL.setParameter("redirect", currentURL);
+								rowURL.setParameter("className", curTrashRenderer.getClassName());
+								rowURL.setParameter("classPK", String.valueOf(curTrashRenderer.getClassPK()));
+								%>
+
+								<liferay-ui:search-container-column-text
+									name="name"
+								>
+									<liferay-ui:icon
+										label="<%= true %>"
+										message="<%= HtmlUtil.escape(curTrashRenderer.getTitle(locale)) %>"
+										method="get"
+										src="<%= curTrashRenderer.getIconPath(renderRequest) %>"
+										url="<%= rowURL.toString() %>"
+									/>
+								</liferay-ui:search-container-column-text>
+
+								<liferay-ui:search-container-column-jsp
+									align="right"
+									path="/html/portlet/trash/view_content_action.jsp"
+								/>
+							</liferay-ui:search-container-row>
+
+							<liferay-ui:search-iterator />
+						</liferay-ui:search-container>
+					</liferay-ui:panel>
+				</c:if>
+
+				<c:if test="<%= (containerModelsCount + baseModelsCount) == 0 %>">
+					<div class="alert alert-info">
+						<liferay-ui:message arguments="<%= new String[] {ResourceActionsUtil.getModelResource(locale, className)} %>" key="this-x-does-not-contain-an-entry" />
+					</div>
+				</c:if>
+			</liferay-ui:panel-container>
+		</c:when>
+		<c:when test="<%= Validator.isNotNull(path) %>">
+			<liferay-util:include page="<%= path %>" portletId="<%= trashRenderer.getPortletId() %>">
+				<liferay-util:param name="showHeader" value="<%= Boolean.FALSE.toString() %>" />
+			</liferay-util:include>
+		</c:when>
+		<c:otherwise>
+			<%= trashRenderer.getSummary(locale) %>
+		</c:otherwise>
+	</c:choose>
+
+	<c:if test="<%= trashRenderer instanceof AssetRenderer %>">
+
+		<%
+		AssetRenderer assetRenderer = (AssetRenderer)trashRenderer;
+		%>
+
+		<c:if test="<%= !assetRenderer.getClassName().equals(DLFileEntry.class.getName()) %>">
+			<div class="asset-ratings">
+				<liferay-ui:ratings
+					className="<%= className %>"
+					classPK="<%= classPK %>"
+				/>
+			</div>
+
+			<%
+			AssetEntry assetEntry = AssetEntryLocalServiceUtil.getEntry(className, classPK);
+			%>
+
+			<div class="asset-related-assets">
+				<liferay-ui:asset-links
+					assetEntryId="<%= assetEntry.getEntryId() %>"
+				/>
+			</div>
+
+			<c:if test="<%= Validator.isNotNull(assetRenderer.getDiscussionPath()) %>">
+				<portlet:actionURL var="discussionURL">
+					<portlet:param name="struts_action" value="/trash/edit_discussion" />
+				</portlet:actionURL>
+
+				<div class="asset-discussion">
+					<liferay-ui:discussion
+						className="<%= className %>"
+						classPK="<%= classPK %>"
+						formAction="<%= discussionURL %>"
+						formName='<%= "fm" + classPK %>'
+						redirect="<%= currentURL %>"
+						userId="<%= assetEntry.getUserId() %>"
+					/>
+				</div>
+			</c:if>
+		</c:if>
+	</c:if>
+</div>
+
+<c:if test="<%= Validator.isNull(trashRenderer.renderActions(renderRequest, renderResponse)) %>">
+	<aui:script use="aui-base,aui-toolbar">
+		var buttonRow = A.one('#<portlet:namespace />entryToolbar');
+
+		var entryToolbarGroup = [];
+
+		<c:choose>
+			<c:when test="<%= entry != null %>">
+				<portlet:actionURL var="restoreEntryURL">
+					<portlet:param name="struts_action" value="/trash/edit_entry" />
+					<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.RESTORE %>" />
+					<portlet:param name="redirect" value="<%= redirect %>" />
+					<portlet:param name="trashEntryId" value="<%= String.valueOf(entry.getEntryId()) %>" />
+				</portlet:actionURL>
+
+				entryToolbarGroup.push(
+					{
+						icon: 'icon-backward',
+						label: '<%= UnicodeLanguageUtil.get(pageContext, "restore") %>',
+						on: {
+							click: function(event) {
+								Liferay.fire('<portlet:namespace />checkEntry', {trashEntryId: <%= entry.getEntryId() %>, uri: '<%= restoreEntryURL.toString() %>'});
+							}
+						}
+					}
+				);
+
+				<c:if test="<%= trashHandler.isDeletable() %>">
+					<portlet:actionURL var="deleteEntryURL">
+						<portlet:param name="struts_action" value="/trash/edit_entry" />
+						<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+						<portlet:param name="redirect" value="<%= redirect %>" />
+						<portlet:param name="trashEntryId" value="<%= String.valueOf(entry.getEntryId()) %>" />
+					</portlet:actionURL>
+
+					entryToolbarGroup.push(
+						{
+							icon: 'icon-remove',
+							label: '<%= UnicodeLanguageUtil.get(pageContext, "delete") %>',
+							on: {
+								click: function(event) {
+									if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-delete-this") %>')) {
+										submitForm(document.hrefFm, '<%= deleteEntryURL.toString() %>');
+									}
+								}
+							}
+						}
+					);
+				</c:if>
+			</c:when>
+			<c:otherwise>
+				<c:if test="<%= trashHandler.isMovable() %>">
+					<portlet:renderURL var="moveURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+						<portlet:param name="struts_action" value="/trash/view_container_model" />
+						<portlet:param name="redirect" value="<%= redirect %>" />
+						<portlet:param name="className" value="<%= trashRenderer.getClassName() %>" />
+						<portlet:param name="classPK" value="<%= String.valueOf(trashRenderer.getClassPK()) %>" />
+						<portlet:param name="containerModelClassName" value="<%= trashHandler.getContainerModelClassName() %>" />
+					</portlet:renderURL>
+
+					entryToolbarGroup.push(
+						{
+							icon: 'icon-backward',
+							label: '<%= UnicodeLanguageUtil.get(pageContext, "restore") %>',
+							on: {
+								click: function(event) {
+									<portlet:namespace />restoreDialog('<%= moveURL %>');
+								}
+							}
+						}
+					);
+				</c:if>
+
+				<c:if test="<%= trashHandler.isDeletable() %>">
+					<portlet:actionURL var="deleteEntryURL">
+						<portlet:param name="struts_action" value="/trash/edit_entry" />
+						<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+						<portlet:param name="redirect" value="<%= redirect %>" />
+						<portlet:param name="className" value="<%= trashRenderer.getClassName() %>" />
+						<portlet:param name="classPK" value="<%= String.valueOf(trashRenderer.getClassPK()) %>" />
+					</portlet:actionURL>
+
+					entryToolbarGroup.push(
+						{
+							icon: 'icon-remove',
+							label: '<%= UnicodeLanguageUtil.get(pageContext, "delete") %>',
+							on: {
+								click: function(event) {
+									if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-delete-this") %>')) {
+										submitForm(document.hrefFm, '<%= deleteEntryURL.toString() %>');
+									}
+								}
+							}
+						}
+					);
+				</c:if>
+			</c:otherwise>
+		</c:choose>
+
+		var entryToolbar = new A.Toolbar(
+			{
+				boundingBox: buttonRow,
+				children: [entryToolbarGroup]
+			}
+		).render();
+
+		buttonRow.setData('entryToolbar', entryToolbar);
+	</aui:script>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/view_content_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/view_content_action.jsp
new file mode 100644
index 0000000..267dc62
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/trash/view_content_action.jsp
@@ -0,0 +1,81 @@
+
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/trash/init.jsp" %>
+
+<%
+SearchContainer searchContainer = (SearchContainer)request.getAttribute("liferay-ui:search:searchContainer");
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+if (searchContainer != null) {
+	redirect = searchContainer.getIteratorURL().toString();
+}
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+TrashRenderer trashRenderer = null;
+
+if (row != null) {
+	trashRenderer = (TrashRenderer)row.getObject();
+}
+else {
+	trashRenderer = (TrashRenderer)request.getAttribute(WebKeys.TRASH_RENDERER);
+}
+
+TrashHandler trashHandler = TrashHandlerRegistryUtil.getTrashHandler(trashRenderer.getClassName());
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= trashHandler.isMovable() %>">
+		<portlet:renderURL var="moveURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+			<portlet:param name="struts_action" value="/trash/view_container_model" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="className" value="<%= trashRenderer.getClassName() %>" />
+			<portlet:param name="classPK" value="<%= String.valueOf(trashRenderer.getClassPK()) %>" />
+			<portlet:param name="containerModelClassName" value="<%= trashHandler.getContainerModelClassName() %>" />
+		</portlet:renderURL>
+
+		<%
+		Map<String, Object> data = new HashMap<String, Object>();
+
+		data.put("uri", moveURL);
+		%>
+
+		<liferay-ui:icon
+			cssClass="trash-restore-link"
+			data="<%= data %>"
+			image="undo"
+			message="restore"
+			url="javascript:;"
+		/>
+	</c:if>
+
+	<c:if test="<%= trashHandler.isDeletable() %>">
+		<portlet:actionURL var="deleteEntryURL">
+			<portlet:param name="struts_action" value="/trash/edit_entry" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="className" value="<%= trashRenderer.getClassName() %>" />
+			<portlet:param name="classPK" value="<%= String.valueOf(trashRenderer.getClassPK()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete
+			url="<%= deleteEntryURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/unit_converter/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/unit_converter/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/unit_converter/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/unit_converter/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/unit_converter/init.jsp
new file mode 100644
index 0000000..8084137
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/unit_converter/init.jsp
@@ -0,0 +1,22 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.unitconverter.model.Conversion" %><%@
+page import="com.liferay.portlet.unitconverter.util.ConverterUtil" %>
+
+<%@ include file="/html/portlet/unit_converter/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/unit_converter/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/unit_converter/view.jsp
new file mode 100644
index 0000000..61bc322
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/unit_converter/view.jsp
@@ -0,0 +1,312 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/unit_converter/init.jsp" %>
+
+<%
+int type = ParamUtil.getInteger(request, "type");
+int fromId = ParamUtil.getInteger(request, "fromId");
+int toId = ParamUtil.getInteger(request, "toId");
+double fromValue = ParamUtil.getDouble(request, "fromValue");
+
+Conversion conversion = ConverterUtil.getConversion(type, fromId, toId, fromValue);
+%>
+
+<form action="<liferay-portlet:renderURL windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>"><portlet:param name="struts_action" value="/unit_converter/view" /></liferay-portlet:renderURL>" id="<portlet:namespace />fm" method="post" name="<portlet:namespace />fm">
+
+<table class="lfr-table">
+<tr>
+	<td>
+		<liferay-ui:message key="from" />
+	</td>
+	<td>
+		<input name="<portlet:namespace />fromValue" size="30" type="text" value="<%= conversion.getFromValue() %>" />
+
+		<select name="<portlet:namespace />fromId">
+			<c:if test="<%= type == 0 %>">
+				<option <%= (fromId == 0) ? "selected" : "" %> value="0"><liferay-ui:message key="meter" /></option>
+				<option <%= (fromId == 1) ? "selected" : "" %> value="1"><liferay-ui:message key="millimeter" /></option>
+				<option <%= (fromId == 2) ? "selected" : "" %> value="2"><liferay-ui:message key="centimeter" /></option>
+				<option <%= (fromId == 3) ? "selected" : "" %> value="3"><liferay-ui:message key="kilometer" /></option>
+				<option <%= (fromId == 4) ? "selected" : "" %> value="4"><liferay-ui:message key="foot" /></option>
+				<option <%= (fromId == 5) ? "selected" : "" %> value="5"><liferay-ui:message key="inch" /></option>
+				<option <%= (fromId == 6) ? "selected" : "" %> value="6"><liferay-ui:message key="yard" /></option>
+				<option <%= (fromId == 7) ? "selected" : "" %> value="7"><liferay-ui:message key="mile" /></option>
+				<option <%= (fromId == 8) ? "selected" : "" %> value="8"><liferay-ui:message key="cubit" /></option>
+				<option <%= (fromId == 9) ? "selected" : "" %> value="9"><liferay-ui:message key="talent" /></option>
+				<option <%= (fromId == 10) ? "selected" : "" %> value="10"><liferay-ui:message key="handbreath" /></option>
+			</c:if>
+			<c:if test="<%= type == 1 %>">
+				<option <%= (fromId == 0) ? "selected" : "" %> value="0"><liferay-ui:message key="square-kilometer" /></option>
+				<option <%= (fromId == 1) ? "selected" : "" %> value="1"><liferay-ui:message key="square-meter" /></option>
+				<option <%= (fromId == 2) ? "selected" : "" %> value="2"><liferay-ui:message key="square-centimeter" /></option>
+				<option <%= (fromId == 3) ? "selected" : "" %> value="3"><liferay-ui:message key="square-millimeter" /></option>
+				<option <%= (fromId == 4) ? "selected" : "" %> value="4"><liferay-ui:message key="square-foot" /></option>
+				<option <%= (fromId == 5) ? "selected" : "" %> value="5"><liferay-ui:message key="square-inch" /></option>
+				<option <%= (fromId == 6) ? "selected" : "" %> value="6"><liferay-ui:message key="square-yard" /></option>
+				<option <%= (fromId == 7) ? "selected" : "" %> value="7"><liferay-ui:message key="square-mile" /></option>
+				<option <%= (fromId == 8) ? "selected" : "" %> value="8"><liferay-ui:message key="hectare" /></option>
+				<option <%= (fromId == 9) ? "selected" : "" %> value="9"><liferay-ui:message key="acre" /></option>
+			</c:if>
+			<c:if test="<%= type == 2 %>">
+				<option <%= (fromId == 0) ? "selected" : "" %> value="0">Liter</option>
+				<option <%= (fromId == 1) ? "selected" : "" %> value="1">Cubic Centimeter</option>
+				<option <%= (fromId == 2) ? "selected" : "" %> value="2">Cubic Inch (Liquid Measure)</option>
+				<option <%= (fromId == 3) ? "selected" : "" %> value="3">Pint (Dry Measure)</option>
+				<option <%= (fromId == 4) ? "selected" : "" %> value="4">Cor (Homer)</option>
+				<option <%= (fromId == 5) ? "selected" : "" %> value="5">Lethek</option>
+				<option <%= (fromId == 6) ? "selected" : "" %> value="6">Ephah</option>
+				<option <%= (fromId == 7) ? "selected" : "" %> value="7">Seah</option>
+				<option <%= (fromId == 8) ? "selected" : "" %> value="8">Omer</option>
+				<option <%= (fromId == 9) ? "selected" : "" %> value="9">Cab</option>
+				<option <%= (fromId == 10) ? "selected" : "" %> value="10">Bath</option>
+				<option <%= (fromId == 11) ? "selected" : "" %> value="11">Hin</option>
+				<option <%= (fromId == 12) ? "selected" : "" %> value="12">Log</option>
+			</c:if>
+			<c:if test="<%= type == 3 %>">
+				<option <%= (fromId == 0) ? "selected" : "" %> value="0"><liferay-ui:message key="kilogram" /></option>
+				<option <%= (fromId == 1) ? "selected" : "" %> value="1"><liferay-ui:message key="pound" /></option>
+				<option <%= (fromId == 2) ? "selected" : "" %> value="2"><liferay-ui:message key="ton" /></option>
+				<option <%= (fromId == 3) ? "selected" : "" %> value="3"><liferay-ui:message key="talent" /></option>
+				<option <%= (fromId == 4) ? "selected" : "" %> value="4"><liferay-ui:message key="mina" /></option>
+				<option <%= (fromId == 5) ? "selected" : "" %> value="5"><liferay-ui:message key="shekel" /></option>
+				<option <%= (fromId == 6) ? "selected" : "" %> value="6"><liferay-ui:message key="pim" /></option>
+				<option <%= (fromId == 7) ? "selected" : "" %> value="7"><liferay-ui:message key="beka" /></option>
+				<option <%= (fromId == 8) ? "selected" : "" %> value="8"><liferay-ui:message key="gerah" /></option>
+			</c:if>
+			<c:if test="<%= type == 4 %>">
+				<option <%= (fromId == 0) ? "selected" : "" %> value="0">Kelvin</option>
+				<option <%= (fromId == 1) ? "selected" : "" %> value="1">Celcius</option>
+				<option <%= (fromId == 2) ? "selected" : "" %> value="2">Fahrenheit</option>
+				<option <%= (fromId == 3) ? "selected" : "" %> value="3">Rankine</option>
+				<option <%= (fromId == 4) ? "selected" : "" %> value="4">Réaumure</option>
+			</c:if>
+		</select>
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="to" />
+	</td>
+	<td>
+		<input name="<portlet:namespace />to_value" size="30" type="text" value="<%= conversion.getToValue() %>" />
+
+		<select name="<portlet:namespace />toId">
+			<c:if test="<%= type == 0 %>">
+				<option <%= (toId == 0) ? "selected" : "" %> value="0"><liferay-ui:message key="meter" /></option>
+				<option <%= (toId == 1) ? "selected" : "" %> value="1"><liferay-ui:message key="millimeter" /></option>
+				<option <%= (toId == 2) ? "selected" : "" %> value="2"><liferay-ui:message key="centimeter" /></option>
+				<option <%= (toId == 3) ? "selected" : "" %> value="3"><liferay-ui:message key="kilometer" /></option>
+				<option <%= (toId == 4) ? "selected" : "" %> value="4"><liferay-ui:message key="foot" /></option>
+				<option <%= (toId == 5) ? "selected" : "" %> value="5"><liferay-ui:message key="inch" /></option>
+				<option <%= (toId == 6) ? "selected" : "" %> value="6"><liferay-ui:message key="yard" /></option>
+				<option <%= (toId == 7) ? "selected" : "" %> value="7"><liferay-ui:message key="mile" /></option>
+				<option <%= (toId == 8) ? "selected" : "" %> value="8"><liferay-ui:message key="cubit" /></option>
+				<option <%= (toId == 9) ? "selected" : "" %> value="9"><liferay-ui:message key="talent" /></option>
+				<option <%= (toId == 10) ? "selected" : "" %> value="10"><liferay-ui:message key="handbreath" /></option>
+			</c:if>
+			<c:if test="<%= type == 1 %>">
+				<option <%= (toId == 0) ? "selected" : "" %> value="0"><liferay-ui:message key="square-kilometer" /></option>
+				<option <%= (toId == 1) ? "selected" : "" %> value="1"><liferay-ui:message key="square-meter" /></option>
+				<option <%= (toId == 2) ? "selected" : "" %> value="2"><liferay-ui:message key="square-centimeter" /></option>
+				<option <%= (toId == 3) ? "selected" : "" %> value="3"><liferay-ui:message key="square-millimeter" /></option>
+				<option <%= (toId == 4) ? "selected" : "" %> value="4"><liferay-ui:message key="square-foot" /></option>
+				<option <%= (toId == 5) ? "selected" : "" %> value="5"><liferay-ui:message key="square-inch" /></option>
+				<option <%= (toId == 6) ? "selected" : "" %> value="6"><liferay-ui:message key="square-yard" /></option>
+				<option <%= (toId == 7) ? "selected" : "" %> value="7"><liferay-ui:message key="square-mile" /></option>
+				<option <%= (toId == 8) ? "selected" : "" %> value="8"><liferay-ui:message key="hectare" /></option>
+				<option <%= (toId == 9) ? "selected" : "" %> value="9"><liferay-ui:message key="acre" /></option>
+			</c:if>
+			<c:if test="<%= type == 2 %>">
+				<option <%= (toId == 0) ? "selected" : "" %> value="0">Liter</option>
+				<option <%= (toId == 1) ? "selected" : "" %> value="1">Cubic Centimeter</option>
+				<option <%= (toId == 2) ? "selected" : "" %> value="2">Cubic Inch (Liquid Measure)</option>
+				<option <%= (toId == 3) ? "selected" : "" %> value="3">Pint (Dry Measure)</option>
+				<option <%= (toId == 4) ? "selected" : "" %> value="4">Cor (Homer)</option>
+				<option <%= (toId == 5) ? "selected" : "" %> value="5">Lethek</option>
+				<option <%= (toId == 6) ? "selected" : "" %> value="6">Ephah</option>
+				<option <%= (toId == 7) ? "selected" : "" %> value="7">Seah</option>
+				<option <%= (toId == 8) ? "selected" : "" %> value="8">Omer</option>
+				<option <%= (toId == 9) ? "selected" : "" %> value="9">Cab</option>
+				<option <%= (toId == 10) ? "selected" : "" %> value="10">Bath</option>
+				<option <%= (toId == 11) ? "selected" : "" %> value="11">Hin</option>
+				<option <%= (toId == 12) ? "selected" : "" %> value="12">Log</option>
+			</c:if>
+			<c:if test="<%= type == 3 %>">
+				<option <%= (toId == 0) ? "selected" : "" %> value="0"><liferay-ui:message key="kilogram" /></option>
+				<option <%= (toId == 1) ? "selected" : "" %> value="1"><liferay-ui:message key="pound" /></option>
+				<option <%= (toId == 2) ? "selected" : "" %> value="2"><liferay-ui:message key="ton" /></option>
+				<option <%= (toId == 3) ? "selected" : "" %> value="3"><liferay-ui:message key="talent" /></option>
+				<option <%= (toId == 4) ? "selected" : "" %> value="4"><liferay-ui:message key="mina" /></option>
+				<option <%= (toId == 5) ? "selected" : "" %> value="5"><liferay-ui:message key="shekel" /></option>
+				<option <%= (toId == 6) ? "selected" : "" %> value="6"><liferay-ui:message key="pim" /></option>
+				<option <%= (toId == 7) ? "selected" : "" %> value="7"><liferay-ui:message key="beka" /></option>
+				<option <%= (toId == 8) ? "selected" : "" %> value="8"><liferay-ui:message key="gerah" /></option>
+			</c:if>
+			<c:if test="<%= type == 4 %>">
+				<option <%= (toId == 0) ? "selected" : "" %> value="0">Kelvin</option>
+				<option <%= (toId == 1) ? "selected" : "" %> value="1">Celcius</option>
+				<option <%= (toId == 2) ? "selected" : "" %> value="2">Fahrenheit</option>
+				<option <%= (toId == 3) ? "selected" : "" %> value="3">Rankine</option>
+				<option <%= (toId == 4) ? "selected" : "" %> value="4">Réaumure</option>
+			</c:if>
+		</select>
+	</td>
+</tr>
+<tr>
+	<td>
+		<liferay-ui:message key="type" />
+	</td>
+	<td>
+		<select name="<portlet:namespace />type"
+			onChange="
+				if (this[this.selectedIndex].value == 0) {
+					Liferay.Util.setBox(document.<portlet:namespace />fm.<portlet:namespace />fromId, lengthArray);
+					Liferay.Util.setBox(document.<portlet:namespace />fm.<portlet:namespace />toId, lengthArray);
+				}
+				else if (this[this.selectedIndex].value == 1) {
+					Liferay.Util.setBox(document.<portlet:namespace />fm.<portlet:namespace />fromId, areaArray);
+					Liferay.Util.setBox(document.<portlet:namespace />fm.<portlet:namespace />toId, areaArray);
+				}
+				else if (this[this.selectedIndex].value == 2) {
+					Liferay.Util.setBox(document.<portlet:namespace />fm.<portlet:namespace />fromId, volumeArray);
+					Liferay.Util.setBox(document.<portlet:namespace />fm.<portlet:namespace />toId, volumeArray);
+				}
+				else if (this[this.selectedIndex].value == 3) {
+					Liferay.Util.setBox(document.<portlet:namespace />fm.<portlet:namespace />fromId, massArray);
+					Liferay.Util.setBox(document.<portlet:namespace />fm.<portlet:namespace />toId, massArray);
+				}
+				else if (this[this.selectedIndex].value == 4) {
+					Liferay.Util.setBox(document.<portlet:namespace />fm.<portlet:namespace />fromId, temperatureArray);
+					Liferay.Util.setBox(document.<portlet:namespace />fm.<portlet:namespace />toId, temperatureArray);
+				}"
+		>
+			<option <%= (type == 0) ? "selected" : "" %> value="0"><liferay-ui:message key="length" /></option>
+			<option <%= (type == 1) ? "selected" : "" %> value="1"><liferay-ui:message key="area" /></option>
+			<option <%= (type == 2) ? "selected" : "" %> value="2"><liferay-ui:message key="volume" /></option>
+			<option <%= (type == 3) ? "selected" : "" %> value="3"><liferay-ui:message key="mass" /></option>
+			<option <%= (type == 4) ? "selected" : "" %> value="4"><liferay-ui:message key="temperature" /></option>
+		</select>
+	</td>
+</tr>
+</table>
+
+<br />
+
+<input type="submit" value="<liferay-ui:message key="convert" />" />
+
+</form>
+
+<aui:script>
+	var lengthArray = [
+		new Option(0, '<%= UnicodeLanguageUtil.get(pageContext, "meter") %>'),
+		new Option(1, '<%= UnicodeLanguageUtil.get(pageContext, "millimeter") %>'),
+		new Option(2, '<%= UnicodeLanguageUtil.get(pageContext, "centimeter") %>'),
+		new Option(3, '<%= UnicodeLanguageUtil.get(pageContext, "kilometer") %>'),
+		new Option(4, '<%= UnicodeLanguageUtil.get(pageContext, "foot") %>'),
+		new Option(5, '<%= UnicodeLanguageUtil.get(pageContext, "inch") %>'),
+		new Option(6, '<%= UnicodeLanguageUtil.get(pageContext, "yard") %>'),
+		new Option(7, '<%= UnicodeLanguageUtil.get(pageContext, "mile") %>'),
+		new Option(8, '<%= UnicodeLanguageUtil.get(pageContext, "cubit") %>'),
+		new Option(9, '<%= UnicodeLanguageUtil.get(pageContext, "talent") %>'),
+		new Option(10, '<%= UnicodeLanguageUtil.get(pageContext, "handbreath") %>')
+	];
+
+	var areaArray = [
+		new Option(0, '<%= UnicodeLanguageUtil.get(pageContext, "square-kilometer") %>'),
+		new Option(1, '<%= UnicodeLanguageUtil.get(pageContext, "square-meter") %>'),
+		new Option(2, '<%= UnicodeLanguageUtil.get(pageContext, "square-centimeter") %>'),
+		new Option(3, '<%= UnicodeLanguageUtil.get(pageContext, "square-millimeter") %>'),
+		new Option(4, '<%= UnicodeLanguageUtil.get(pageContext, "square-foot") %>'),
+		new Option(5, '<%= UnicodeLanguageUtil.get(pageContext, "square-inch") %>'),
+		new Option(6, '<%= UnicodeLanguageUtil.get(pageContext, "square-yard") %>'),
+		new Option(7, '<%= UnicodeLanguageUtil.get(pageContext, "square-mile") %>'),
+		new Option(8, '<%= UnicodeLanguageUtil.get(pageContext, "hectare") %>'),
+		new Option(9, '<%= UnicodeLanguageUtil.get(pageContext, "acre") %>')
+	];
+
+	var volumeArray = [
+		new Option(0, 'Liter'),
+		new Option(1, 'Cubic Centimeter'),
+		new Option(2, 'Cubic Inch (Liquid Measure)'),
+		new Option(3, 'Pint (Dry Measure)'),
+		new Option(4, 'Cor (Homer)'),
+		new Option(5, 'Lethek'),
+		new Option(6, 'Ephah'),
+		new Option(7, 'Seah'),
+		new Option(8, 'Omer'),
+		new Option(9, 'Cab'),
+		new Option(10, 'Bath'),
+		new Option(11, 'Hin'),
+		new Option(12, 'Log')
+	];
+
+	var massArray = [
+		new Option(0, '<%= UnicodeLanguageUtil.get(pageContext, "kilogram") %>'),
+		new Option(1, '<%= UnicodeLanguageUtil.get(pageContext, "pound") %>'),
+		new Option(2, '<%= UnicodeLanguageUtil.get(pageContext, "ton") %>'),
+		new Option(3, '<%= UnicodeLanguageUtil.get(pageContext, "talent") %>'),
+		new Option(4, '<%= UnicodeLanguageUtil.get(pageContext, "mina") %>'),
+		new Option(5, '<%= UnicodeLanguageUtil.get(pageContext, "shekel") %>'),
+		new Option(6, '<%= UnicodeLanguageUtil.get(pageContext, "pim") %>'),
+		new Option(7, '<%= UnicodeLanguageUtil.get(pageContext, "beka") %>'),
+		new Option(8, '<%= UnicodeLanguageUtil.get(pageContext, "gerah") %>')
+	];
+
+	var temperatureArray = [
+		new Option(0, 'Kelvin'),
+		new Option(1, 'Celcius'),
+		new Option(2, 'Fahrenheit'),
+		new Option(3, 'Rankine'),
+		new Option(4, 'Réaumure')
+	];
+
+	<c:if test="<%= windowState.equals(WindowState.MAXIMIZED) %>">
+		Liferay.Util.focusFormField(document.<portlet:namespace />fm.<portlet:namespace />fromValue);
+	</c:if>
+</aui:script>
+
+<aui:script use="aui-io-request,aui-parse-content">
+	var form = A.one('#<portlet:namespace />fm');
+
+	form.on(
+		'submit',
+		function(event) {
+			var uri = form.getAttribute('action');
+			var parentNode = form.get('parentNode');
+
+			parentNode.plug(A.Plugin.ParseContent);
+
+			A.io.request(
+				uri,
+				{
+					form: {
+						id: form
+					},
+					on: {
+						success: function(event, id, obj) {
+							var responseData = this.get('responseData');
+
+							parentNode.setContent(responseData);
+						}
+					}
+				}
+			);
+
+			event.halt();
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/edit_user_group.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/edit_user_group.jsp
new file mode 100644
index 0000000..96cdf01
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/edit_user_group.jsp
@@ -0,0 +1,293 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/user_groups_admin/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+String backURL = ParamUtil.getString(request, "backURL", redirect);
+
+UserGroup userGroup = (UserGroup)request.getAttribute(WebKeys.USER_GROUP);
+
+long userGroupId = BeanParamUtil.getLong(userGroup, request, "userGroupId");
+%>
+
+<aui:form method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveUserGroup();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="userGroupId" type="hidden" value="<%= userGroupId %>" />
+
+	<liferay-ui:header
+		backURL="<%= backURL %>"
+		localizeTitle="<%= (userGroup == null) %>"
+		title='<%= (userGroup == null) ? "new-user-group" : userGroup.getName() %>'
+	/>
+
+	<liferay-ui:error exception="<%= DuplicateUserGroupException.class %>" message="please-enter-a-unique-name" />
+	<liferay-ui:error exception="<%= RequiredUserGroupException.class %>" message="this-is-a-required-user-group" />
+	<liferay-ui:error exception="<%= UserGroupNameException.class %>" message="please-enter-a-valid-name" />
+
+	<aui:model-context bean="<%= userGroup %>" model="<%= UserGroup.class %>" />
+
+	<aui:fieldset>
+		<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" label='<%= (userGroup != null) ? "new-name" : "name" %>' name="name" />
+
+		<aui:input name="description" />
+
+		<liferay-ui:custom-attributes-available className="<%= UserGroup.class.getName() %>">
+			<liferay-ui:custom-attribute-list
+				className="<%= UserGroup.class.getName() %>"
+				classPK="<%= userGroupId %>"
+				editable="<%= true %>"
+				label="<%= true %>"
+			/>
+		</liferay-ui:custom-attributes-available>
+
+	</aui:fieldset>
+
+	<%
+	Group userGroupGroup = null;
+
+	if (userGroup != null) {
+		userGroupGroup = userGroup.getGroup();
+	}
+
+	LayoutSet privateLayoutSet = null;
+	LayoutSetPrototype privateLayoutSetPrototype = null;
+	boolean privateLayoutSetPrototypeLinkEnabled = true;
+
+	LayoutSet publicLayoutSet = null;
+	LayoutSetPrototype publicLayoutSetPrototype = null;
+	boolean publicLayoutSetPrototypeLinkEnabled = true;
+
+	if (userGroupGroup != null) {
+		try {
+			LayoutLocalServiceUtil.getLayouts(userGroupGroup.getGroupId(), false, LayoutConstants.DEFAULT_PARENT_LAYOUT_ID);
+
+			privateLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(userGroupGroup.getGroupId(), true);
+
+			privateLayoutSetPrototypeLinkEnabled = privateLayoutSet.isLayoutSetPrototypeLinkEnabled();
+
+			String layoutSetPrototypeUuid = privateLayoutSet.getLayoutSetPrototypeUuid();
+
+			if (Validator.isNotNull(layoutSetPrototypeUuid)) {
+				privateLayoutSetPrototype = LayoutSetPrototypeLocalServiceUtil.getLayoutSetPrototypeByUuidAndCompanyId(layoutSetPrototypeUuid, company.getCompanyId());
+			}
+		}
+		catch (Exception e) {
+		}
+
+		try {
+			LayoutLocalServiceUtil.getLayouts(userGroupGroup.getGroupId(), true, LayoutConstants.DEFAULT_PARENT_LAYOUT_ID);
+
+			publicLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(userGroupGroup.getGroupId(), false);
+
+			publicLayoutSetPrototypeLinkEnabled = publicLayoutSet.isLayoutSetPrototypeLinkEnabled();
+
+			String layoutSetPrototypeUuid = publicLayoutSet.getLayoutSetPrototypeUuid();
+
+			if (Validator.isNotNull(layoutSetPrototypeUuid)) {
+				publicLayoutSetPrototype = LayoutSetPrototypeLocalServiceUtil.getLayoutSetPrototypeByUuidAndCompanyId(layoutSetPrototypeUuid, company.getCompanyId());
+			}
+		}
+		catch (Exception e) {
+		}
+	}
+
+	List<LayoutSetPrototype> layoutSetPrototypes = LayoutSetPrototypeServiceUtil.search(company.getCompanyId(), Boolean.TRUE, null);
+	%>
+
+	<c:if test="<%= (userGroupGroup != null) || !layoutSetPrototypes.isEmpty() %>">
+		<aui:fieldset helpMessage="user-group-site-help" label="user-group-site">
+
+			<%
+			boolean hasUnlinkLayoutSetPrototypePermission = PortalPermissionUtil.contains(permissionChecker, ActionKeys.UNLINK_LAYOUT_SET_PROTOTYPE);
+			%>
+
+			<c:choose>
+				<c:when test="<%= ((userGroupGroup == null) || ((publicLayoutSetPrototype == null) && (userGroupGroup.getPublicLayoutsPageCount() == 0))) && !layoutSetPrototypes.isEmpty() %>">
+					<aui:select label="public-pages" name="publicLayoutSetPrototypeId">
+						<aui:option label="none" selected="<%= true %>" value="" />
+
+						<%
+						for (LayoutSetPrototype layoutSetPrototype : layoutSetPrototypes) {
+						%>
+
+							<aui:option value="<%= layoutSetPrototype.getLayoutSetPrototypeId() %>"><%= HtmlUtil.escape(layoutSetPrototype.getName(user.getLanguageId())) %></aui:option>
+
+						<%
+						}
+						%>
+
+					</aui:select>
+
+					<c:choose>
+						<c:when test="<%= hasUnlinkLayoutSetPrototypePermission %>">
+							<div class="hide" id="<portlet:namespace />publicLayoutSetPrototypeIdOptions">
+								<aui:input helpMessage="enable-propagation-of-changes-from-the-site-template-help" label="enable-propagation-of-changes-from-the-site-template" name="publicLayoutSetPrototypeLinkEnabled" type="checkbox" value="<%= publicLayoutSetPrototypeLinkEnabled %>" />
+							</div>
+						</c:when>
+						<c:otherwise>
+							<aui:input name="publicLayoutSetPrototypeLinkEnabled" type="hidden" value="<%= true %>" />
+						</c:otherwise>
+					</c:choose>
+				</c:when>
+				<c:otherwise>
+					<aui:field-wrapper label="public-pages">
+						<c:choose>
+							<c:when test="<%= userGroupGroup != null %>">
+
+								<liferay-portlet:actionURL portletName="<%= PortletKeys.SITE_REDIRECTOR %>" var="publicPagesURL">
+									<portlet:param name="struts_action" value="/MY_SITES/view" />
+									<portlet:param name="groupId" value="<%= String.valueOf(userGroupGroup.getGroupId()) %>" />
+									<portlet:param name="publicLayout" value="<%= Boolean.TRUE.toString() %>" />
+								</liferay-portlet:actionURL>
+
+								<c:choose>
+									<c:when test="<%= userGroupGroup.getPublicLayoutsPageCount() > 0 %>">
+										<liferay-ui:icon
+											image="view"
+											label="<%= true %>"
+											message="open-pages"
+											method="get"
+											target="_blank"
+											url="<%= publicPagesURL.toString() %>"
+										/>
+									</c:when>
+									<c:otherwise>
+										<liferay-ui:message key="this-user-group-does-not-have-any-public-pages" />
+									</c:otherwise>
+								</c:choose>
+
+								<c:choose>
+									<c:when test="<%= (publicLayoutSetPrototype != null) && hasUnlinkLayoutSetPrototypePermission %>">
+										<aui:input label='<%= LanguageUtil.format(pageContext, "enable-propagation-of-changes-from-the-site-template-x", HtmlUtil.escape(publicLayoutSetPrototype.getName(user.getLanguageId()))) %>' name="publicLayoutSetPrototypeLinkEnabled" type="checkbox" value="<%= publicLayoutSetPrototypeLinkEnabled %>" />
+									</c:when>
+									<c:when test="<%= publicLayoutSetPrototype != null %>">
+										<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(publicLayoutSetPrototype.getName(locale))} %>" key="these-pages-are-linked-to-site-template-x" />
+
+										<aui:input name="layoutSetPrototypeLinkEnabled" type="hidden" value="<%= true %>" />
+									</c:when>
+								</c:choose>
+							</c:when>
+						</c:choose>
+					</aui:field-wrapper>
+				</c:otherwise>
+			</c:choose>
+
+			<c:choose>
+				<c:when test="<%= ((userGroup == null) || ((privateLayoutSetPrototype == null) && (userGroupGroup.getPrivateLayoutsPageCount() == 0))) && !layoutSetPrototypes.isEmpty() %>">
+					<aui:select label="private-pages" name="privateLayoutSetPrototypeId">
+						<aui:option label="none" selected="<%= true %>" value="" />
+
+						<%
+						for (LayoutSetPrototype layoutSetPrototype : layoutSetPrototypes) {
+						%>
+
+							<aui:option value="<%= layoutSetPrototype.getLayoutSetPrototypeId() %>"><%= HtmlUtil.escape(layoutSetPrototype.getName(user.getLanguageId())) %></aui:option>
+
+						<%
+						}
+						%>
+
+					</aui:select>
+
+					<c:choose>
+						<c:when test="<%= hasUnlinkLayoutSetPrototypePermission %>">
+							<div class="hide" id="<portlet:namespace />privateLayoutSetPrototypeIdOptions">
+								<aui:input helpMessage="enable-propagation-of-changes-from-the-site-template-help" label="enable-propagation-of-changes-from-the-site-template" name="privateLayoutSetPrototypeLinkEnabled" type="checkbox" value="<%= privateLayoutSetPrototypeLinkEnabled %>" />
+							</div>
+						</c:when>
+						<c:otherwise>
+							<aui:input name="privateLayoutSetPrototypeLinkEnabled" type="hidden" value="<%= true %>" />
+						</c:otherwise>
+					</c:choose>
+				</c:when>
+				<c:otherwise>
+					<aui:field-wrapper label="private-pages">
+						<c:choose>
+							<c:when test="<%= userGroupGroup != null %>">
+								<liferay-portlet:actionURL portletName="<%= PortletKeys.SITE_REDIRECTOR %>" var="privatePagesURL">
+									<portlet:param name="struts_action" value="/MY_SITES/view" />
+									<portlet:param name="groupId" value="<%= String.valueOf(userGroupGroup.getGroupId()) %>" />
+									<portlet:param name="privateLayout" value="<%= Boolean.TRUE.toString() %>" />
+								</liferay-portlet:actionURL>
+
+								<c:choose>
+									<c:when test="<%= userGroupGroup.getPrivateLayoutsPageCount() > 0 %>">
+										<liferay-ui:icon
+											image="view"
+											label="<%= true %>"
+											message="open-pages"
+											method="get"
+											target="_blank"
+											url="<%= privatePagesURL.toString() %>"
+										/>
+									</c:when>
+									<c:otherwise>
+										<liferay-ui:message key="this-user-group-does-not-have-any-private-pages" />
+									</c:otherwise>
+								</c:choose>
+
+								<c:choose>
+									<c:when test="<%= (privateLayoutSetPrototype != null) && hasUnlinkLayoutSetPrototypePermission %>">
+										<aui:input label='<%= LanguageUtil.format(pageContext, "enable-propagation-of-changes-from-the-site-template-x", HtmlUtil.escape(privateLayoutSetPrototype.getName(user.getLanguageId()))) %>' name="privateLayoutSetPrototypeLinkEnabled" type="checkbox" value="<%= privateLayoutSetPrototypeLinkEnabled %>" />
+									</c:when>
+									<c:when test="<%= privateLayoutSetPrototype != null %>">
+										<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(privateLayoutSetPrototype.getName(locale))} %>" key="these-pages-are-linked-to-site-template-x" />
+
+										<aui:input name="layoutSetPrototypeLinkEnabled" type="hidden" value="<%= true %>" />
+									</c:when>
+								</c:choose>
+							</c:when>
+						</c:choose>
+					</aui:field-wrapper>
+				</c:otherwise>
+			</c:choose>
+		</aui:fieldset>
+	</c:if>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />isVisible(currentValue, value) {
+		return currentValue != '';
+	}
+
+	function <portlet:namespace />saveUserGroup() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (userGroup == null) ? Constants.ADD : Constants.UPDATE %>";
+
+		submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/users_admin/edit_user_group" /></portlet:actionURL>");
+	}
+
+	Liferay.Util.toggleSelectBox('<portlet:namespace />publicLayoutSetPrototypeId', <portlet:namespace />isVisible, '<portlet:namespace />publicLayoutSetPrototypeIdOptions');
+	Liferay.Util.toggleSelectBox('<portlet:namespace />privateLayoutSetPrototypeId', <portlet:namespace />isVisible, '<portlet:namespace />privateLayoutSetPrototypeIdOptions');
+</aui:script>
+
+<%
+if (userGroup != null) {
+	PortalUtil.addPortletBreadcrumbEntry(request, userGroup.getName(), null);
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit"), currentURL);
+}
+else {
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "add-user-group"), currentURL);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/edit_user_group_assignments.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/edit_user_group_assignments.jsp
new file mode 100644
index 0000000..0b078d2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/edit_user_group_assignments.jsp
@@ -0,0 +1,140 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/user_groups_admin/init.jsp" %>
+
+<%
+String tabs1 = ParamUtil.getString(request, "tabs1");
+String tabs2 = ParamUtil.getString(request, "tabs2", "current");
+
+int cur = ParamUtil.getInteger(request, SearchContainer.DEFAULT_CUR_PARAM);
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+UserGroup userGroup = (UserGroup)request.getAttribute(WebKeys.USER_GROUP);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/user_groups_admin/edit_user_group_assignments");
+portletURL.setParameter("tabs1", tabs1);
+portletURL.setParameter("tabs2", tabs2);
+portletURL.setParameter("redirect", redirect);
+portletURL.setParameter("userGroupId", String.valueOf(userGroup.getUserGroupId()));
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	localizeTitle="<%= false %>"
+	title="<%= userGroup.getName() %>"
+/>
+
+<liferay-ui:tabs
+	names="current,available"
+	param="tabs2"
+	url="<%= portletURL.toString() %>"
+/>
+
+<portlet:actionURL var="editAssignmentsURL">
+	<portlet:param name="struts_action" value="/user_groups_admin/edit_user_group_assignments" />
+</portlet:actionURL>
+
+<aui:form action="<%= editAssignmentsURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="tabs1" type="hidden" value="<%= tabs1 %>" />
+	<aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="assignmentsRedirect" type="hidden" />
+	<aui:input name="userGroupId" type="hidden" value="<%= userGroup.getUserGroupId() %>" />
+	<aui:input name="addUserIds" type="hidden" />
+	<aui:input name="removeUserIds" type="hidden" />
+
+	<liferay-ui:search-container
+		rowChecker="<%= new UserUserGroupChecker(renderResponse, userGroup) %>"
+		searchContainer="<%= new UserSearch(renderRequest, portletURL) %>"
+		var="userSearchContainer"
+	>
+		<liferay-ui:search-form
+			page="/html/portlet/users_admin/user_search.jsp"
+		/>
+
+		<%
+		UserSearchTerms searchTerms = (UserSearchTerms)userSearchContainer.getSearchTerms();
+
+		LinkedHashMap<String, Object> userParams = new LinkedHashMap<String, Object>();
+
+		if (filterManageableOrganizations) {
+			userParams.put("usersOrgsTree", user.getOrganizations());
+		}
+
+		if (tabs2.equals("current")) {
+			userParams.put("usersUserGroups", new Long(userGroup.getUserGroupId()));
+		}
+		%>
+
+		<liferay-ui:search-container-results>
+			<%@ include file="/html/portlet/users_admin/user_search_results.jspf" %>
+		</liferay-ui:search-container-results>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.model.User"
+			escapedModel="<%= true %>"
+			keyProperty="userId"
+			modelVar="user2"
+			rowIdProperty="screenName"
+		>
+			<liferay-ui:search-container-column-text
+				name="name"
+				property="fullName"
+			/>
+
+			<liferay-ui:search-container-column-text
+				name="screen-name"
+				property="screenName"
+			/>
+		</liferay-ui:search-container-row>
+
+		<div class="separator"><!-- --></div>
+
+		<%
+		String taglibOnClick = renderResponse.getNamespace() + "updateUserGroupUsers('" + portletURL.toString() + StringPool.AMPERSAND + renderResponse.getNamespace() + "cur=" + cur + "');";
+		%>
+
+		<aui:button onClick="<%= taglibOnClick %>" value="update-associations" />
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />updateUserGroupUsers',
+		function(assignmentsRedirect) {
+			document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "user_group_users";
+			document.<portlet:namespace />fm.<portlet:namespace />assignmentsRedirect.value = assignmentsRedirect;
+			document.<portlet:namespace />fm.<portlet:namespace />addUserIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+			document.<portlet:namespace />fm.<portlet:namespace />removeUserIds.value = Liferay.Util.listUncheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
+
+<%
+PortalUtil.addPortletBreadcrumbEntry(request, userGroup.getName(), null);
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "assign-members"), currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/init.jsp
new file mode 100644
index 0000000..4ad20c1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/init.jsp
@@ -0,0 +1,44 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.DuplicateUserGroupException" %><%@
+page import="com.liferay.portal.RequiredUserGroupException" %><%@
+page import="com.liferay.portal.UserGroupNameException" %><%@
+page import="com.liferay.portal.security.membershippolicy.UserGroupMembershipPolicyUtil" %><%@
+page import="com.liferay.portal.service.permission.UserGroupPermissionUtil" %><%@
+page import="com.liferay.portlet.usergroupsadmin.search.UserUserGroupChecker" %>
+
+<%
+boolean filterManageableOrganizations = true;
+
+if (permissionChecker.hasPermission(scopeGroupId, User.class.getName(), company.getCompanyId(), ActionKeys.VIEW)) {
+	filterManageableOrganizations = false;
+}
+
+if (portletName.equals(PortletKeys.MY_ACCOUNT) || permissionChecker.hasPermission(scopeGroupId, Organization.class.getName(), company.getCompanyId(), ActionKeys.VIEW)) {
+	filterManageableOrganizations = false;
+}
+
+boolean filterManageableUserGroups = true;
+
+if (portletName.equals(PortletKeys.MY_ACCOUNT) || permissionChecker.hasPermission(scopeGroupId, UserGroup.class.getName(), company.getCompanyId(), ActionKeys.VIEW)) {
+	filterManageableUserGroups = false;
+}
+%>
+
+<%@ include file="/html/portlet/user_groups_admin/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/select_user_group.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/select_user_group.jsp
new file mode 100644
index 0000000..157cd6f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/select_user_group.jsp
@@ -0,0 +1,125 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/user_groups_admin/init.jsp" %>
+
+<%
+String eventName = ParamUtil.getString(request, "eventName", liferayPortletResponse.getNamespace() + "selectUserGroup");
+
+User selUser = PortalUtil.getSelectedUser(request);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/user_groups_admin/select_user_group");
+
+if (selUser != null) {
+	portletURL.setParameter("p_u_i_d", String.valueOf(selUser.getUserId()));
+}
+
+portletURL.setParameter("eventName", eventName);
+%>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="selectUserGroupFm">
+	<liferay-ui:header
+		title="user-groups"
+	/>
+
+	<liferay-ui:search-container
+		searchContainer="<%= new UserGroupSearch(renderRequest, portletURL) %>"
+	>
+		<liferay-ui:search-form
+			page="/html/portlet/user_groups_admin/user_group_search.jsp"
+		/>
+
+		<%
+		UserGroupDisplayTerms searchTerms = (UserGroupDisplayTerms)searchContainer.getSearchTerms();
+		%>
+
+		<liferay-ui:search-container-results>
+
+			<%
+			if (filterManageableUserGroups) {
+				List<UserGroup> userGroups = UserGroupLocalServiceUtil.search(company.getCompanyId(), searchTerms.getKeywords(), null, QueryUtil.ALL_POS, QueryUtil.ALL_POS, searchContainer.getOrderByComparator());
+
+				userGroups = UsersAdminUtil.filterUserGroups(permissionChecker, userGroups);
+
+				searchContainer.setTotal(userGroups.size());
+
+				results = ListUtil.subList(userGroups, searchContainer.getStart(), searchContainer.getEnd());
+			}
+			else {
+				total = UserGroupLocalServiceUtil.searchCount(company.getCompanyId(), searchTerms.getKeywords(), null);
+
+				searchContainer.setTotal(total);
+
+				results = UserGroupLocalServiceUtil.search(company.getCompanyId(), searchTerms.getKeywords(), null, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+			}
+
+			searchContainer.setResults(results);
+			%>
+
+		</liferay-ui:search-container-results>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.model.UserGroup"
+			escapedModel="<%= false %>"
+			keyProperty="userGroupId"
+			modelVar="userGroup"
+		>
+			<liferay-ui:search-container-column-text
+				name="name"
+				value="<%= HtmlUtil.escape(userGroup.getName()) %>"
+			/>
+
+			<liferay-ui:search-container-column-text
+				name="description"
+				value="<%= HtmlUtil.escape(userGroup.getDescription()) %>"
+			/>
+
+			<liferay-ui:search-container-column-text>
+				<c:if test="<%= (UserGroupMembershipPolicyUtil.isMembershipAllowed((selUser != null) ? selUser.getUserId() : 0, userGroup.getUserGroupId())) %>">
+
+					<%
+					Map<String, Object> data = new HashMap<String, Object>();
+
+					data.put("usergroupid", userGroup.getUserGroupId());
+					data.put("usergroupname", HtmlUtil.escape(userGroup.getName()));
+					%>
+
+					<aui:button cssClass="selector-button" data="<%= data %>" value="choose" />
+				</c:if>
+			</liferay-ui:search-container-column-text>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script use="aui-base">
+	var Util = Liferay.Util;
+
+	A.one('#<portlet:namespace />selectUserGroupFm').delegate(
+		'click',
+		function(event) {
+			var result = Util.getAttributes(event.currentTarget, 'data-');
+
+			Util.getOpener().Liferay.fire('<%= HtmlUtil.escapeJS(eventName) %>', result);
+
+			Util.getWindow().hide();
+		},
+		'.selector-button'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/user_group_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/user_group_action.jsp
new file mode 100644
index 0000000..0f22642
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/user_group_action.jsp
@@ -0,0 +1,158 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/user_groups_admin/init.jsp" %>
+
+<%
+UserGroupSearch searchContainer = (UserGroupSearch)request.getAttribute("liferay-ui:search:searchContainer");
+
+String redirect = searchContainer.getIteratorURL().toString();
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+UserGroup userGroup = (UserGroup)row.getObject();
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= UserGroupPermissionUtil.contains(permissionChecker, userGroup.getUserGroupId(), ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/users_admin/edit_user_group" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="userGroupId" value="<%= String.valueOf(userGroup.getUserGroupId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editURL %>"
+		/>
+	</c:if>
+
+	<%
+	boolean hasPermissionsPermission = UserGroupPermissionUtil.contains(permissionChecker, userGroup.getUserGroupId(), ActionKeys.PERMISSIONS);
+	%>
+
+	<c:if test="<%= hasPermissionsPermission %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= UserGroup.class.getName() %>"
+			modelResourceDescription="<%= userGroup.getName() %>"
+			resourcePrimKey="<%= String.valueOf(userGroup.getUserGroupId()) %>"
+			var="permissionsURL"
+			windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			method="get"
+			url="<%= permissionsURL %>"
+			useDialog="<%= true %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= hasPermissionsPermission %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= Group.class.getName() %>"
+			modelResourceDescription='<%= LanguageUtil.format(pageContext, "site-for-user-group-x", userGroup.getName()) %>'
+			resourcePrimKey="<%= String.valueOf(userGroup.getGroup().getGroupId()) %>"
+			var="permissionsURL"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			message="site-permissions"
+			url="<%= permissionsURL %>"
+		/>
+	</c:if>
+
+	<%
+	Group userGroupGroup = userGroup.getGroup();
+	%>
+
+	<c:if test="<%= GroupPermissionUtil.contains(permissionChecker, userGroupGroup.getGroupId(), ActionKeys.MANAGE_LAYOUTS) %>">
+		<portlet:renderURL var="managePagesURL">
+			<portlet:param name="struts_action" value="/users_admin/edit_layouts" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(userGroupGroup.getGroupId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="pages"
+			message="manage-site-pages"
+			url="<%= managePagesURL %>"
+		/>
+	</c:if>
+
+	<%
+	boolean hasViewPermission = GroupPermissionUtil.contains(permissionChecker, userGroupGroup.getGroupId(), ActionKeys.VIEW);
+	%>
+
+	<c:if test="<%= hasViewPermission && (userGroupGroup.getPublicLayoutsPageCount() > 0) %>">
+		<portlet:actionURL var="viewPublicPagesURL">
+			<portlet:param name="struts_action" value="/sites_admin/page" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(userGroupGroup.getGroupId()) %>" />
+			<portlet:param name="privateLayout" value="<%= Boolean.FALSE.toString() %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon
+			image="view"
+			message="go-to-the-site's-public-pages"
+			target="_blank"
+			url="<%= viewPublicPagesURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= hasViewPermission && (userGroupGroup.getPrivateLayoutsPageCount() > 0) %>">
+		<portlet:actionURL var="viewPrivatePagesURL">
+			<portlet:param name="struts_action" value="/sites_admin/page" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(userGroupGroup.getGroupId()) %>" />
+			<portlet:param name="privateLayout" value="<%= Boolean.TRUE.toString() %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon
+			image="view"
+			message="go-to-the-site's-private-pages"
+			target="_blank"
+			url="<%= viewPrivatePagesURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= UserGroupPermissionUtil.contains(permissionChecker, userGroup.getUserGroupId(), ActionKeys.ASSIGN_MEMBERS) %>">
+		<portlet:renderURL var="assignURL">
+			<portlet:param name="struts_action" value="/users_admin/edit_user_group_assignments" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="userGroupId" value="<%= String.valueOf(userGroup.getUserGroupId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="assign"
+			message="assign-members"
+			url="<%= assignURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= UserGroupPermissionUtil.contains(permissionChecker, userGroup.getUserGroupId(), ActionKeys.DELETE) %>">
+
+		<%
+		String taglibDeleteURL = "javascript:" + renderResponse.getNamespace() + "deleteUserGroup('" + userGroup.getUserGroupId() + "');";
+		%>
+
+		<liferay-ui:icon
+			image="delete"
+			url="<%= taglibDeleteURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/user_group_search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/user_group_search.jsp
new file mode 100644
index 0000000..c0bd691
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/user_group_search.jsp
@@ -0,0 +1,36 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/user_groups_admin/init.jsp" %>
+
+<%
+UserGroupSearch searchContainer = (UserGroupSearch)request.getAttribute("liferay-ui:search:searchContainer");
+
+UserGroupDisplayTerms displayTerms = (UserGroupDisplayTerms)searchContainer.getDisplayTerms();
+%>
+
+<liferay-ui:search-toggle
+	autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>"
+	buttonLabel="search"
+	displayTerms="<%= displayTerms %>"
+	id="toggle_id_users_groups_admin_group_search"
+>
+	<aui:fieldset>
+		<aui:input name="<%= displayTerms.NAME %>" size="20" value="<%= displayTerms.getName() %>" />
+
+		<aui:input name="<%= displayTerms.DESCRIPTION %>" size="20" value="<%= displayTerms.getDescription() %>" />
+	</aui:fieldset>
+</liferay-ui:search-toggle>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/user_group_search_results.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/user_group_search_results.jspf
new file mode 100644
index 0000000..eefd35d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/user_group_search_results.jspf
@@ -0,0 +1,17 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/user_groups_admin/user_groups_search_results_database.jspf" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/user_group_search_results_database.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/user_group_search_results_database.jspf
new file mode 100644
index 0000000..bca38cc
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/user_group_search_results_database.jspf
@@ -0,0 +1,25 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+total = UserGroupLocalServiceUtil.searchCount(company.getCompanyId(), searchTerms.getKeywords(), userGroupParams);
+
+searchContainer.setTotal(total);
+
+results = UserGroupLocalServiceUtil.search(company.getCompanyId(), searchTerms.getKeywords(), userGroupParams, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+
+searchContainer.setResults(results);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/user_group_search_results_index.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/user_group_search_results_index.jspf
new file mode 100644
index 0000000..f13fe1d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/user_group_search_results_index.jspf
@@ -0,0 +1,45 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+userGroupParams.put("expandoAttributes", searchTerms.getKeywords());
+
+Sort sort = SortFactoryUtil.getSort(UserGroup.class, searchContainer.getOrderByCol(), searchContainer.getOrderByType());
+
+boolean corruptIndex = false;
+
+Hits hits = null;
+Tuple tuple = null;
+
+do {
+	if (searchTerms.isAdvancedSearch()) {
+		hits = UserGroupLocalServiceUtil.search(company.getCompanyId(), searchTerms.getName(), searchTerms.getDescription(), userGroupParams, searchTerms.isAndOperator(), searchContainer.getStart(), searchContainer.getEnd(), sort);
+	}
+	else {
+		hits = UserGroupLocalServiceUtil.search(company.getCompanyId(), searchTerms.getKeywords(), userGroupParams, searchContainer.getStart(), searchContainer.getEnd(), sort);
+	}
+
+	tuple = UsersAdminUtil.getUserGroups(hits);
+
+	corruptIndex = (Boolean)tuple.getObject(1);
+}
+while (corruptIndex);
+
+results = (List<UserGroup>)tuple.getObject(0);
+
+searchContainer.setResults(results);
+searchContainer.setTotal(hits.getLength());
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/view.jsp
new file mode 100644
index 0000000..0f7a9af
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/view.jsp
@@ -0,0 +1,148 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/user_groups_admin/init.jsp" %>
+
+<%
+String viewUserGroupsRedirect = ParamUtil.getString(request, "viewUserGroupsRedirect");
+String backURL = ParamUtil.getString(request, "backURL", viewUserGroupsRedirect);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/user_groups_admin/view");
+
+if (Validator.isNotNull(viewUserGroupsRedirect)) {
+	portletURL.setParameter("viewUserGroupsRedirect", viewUserGroupsRedirect);
+}
+
+pageContext.setAttribute("portletURL", portletURL);
+
+String portletURLString = portletURL.toString();
+%>
+
+<liferay-ui:error exception="<%= RequiredUserGroupException.class %>" message="you-cannot-delete-user-groups-that-have-users" />
+
+<aui:form action="<%= portletURLString %>" method="get" name="fm">
+	<liferay-portlet:renderURLParams varImpl="portletURL" />
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= portletURLString %>" />
+
+	<%@ include file="/html/portlet/user_groups_admin/view_flat_user_groups.jspf" %>
+
+</aui:form>
+
+<aui:script>
+	Liferay.Util.toggleSearchContainerButton('#<portlet:namespace />delete', '#<portlet:namespace /><%= searchContainerReference.getId() %>SearchContainer', document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+	function <portlet:namespace />deleteUserGroup(userGroupId) {
+		<portlet:namespace />doDeleteUserGroup('<%= UserGroup.class.getName() %>', userGroupId);
+	}
+
+	function <portlet:namespace />doDeleteUserGroup(className, id) {
+		var ids = id;
+
+		var status = <%= WorkflowConstants.STATUS_INACTIVE %>
+
+		<portlet:namespace />getUsersCount(
+			className, ids, status,
+			function(event, id, obj) {
+				var responseData = this.get('responseData');
+				var count = parseInt(responseData);
+
+				if (count > 0) {
+					status = <%= WorkflowConstants.STATUS_APPROVED %>
+
+					<portlet:namespace />getUsersCount(
+						className, ids, status,
+						function(event, id, obj) {
+							responseData = this.get('responseData')
+							count = parseInt(responseData);
+
+							if (count > 0) {
+								if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-delete-this") %>')) {
+									<portlet:namespace />doDeleteUserGroups(ids);
+								}
+							}
+							else {
+								var message = null;
+
+								if (id && (id.toString().split(",").length > 1)) {
+									message = '<%= UnicodeLanguageUtil.get(pageContext, "one-or-more-user-groups-are-associated-with-deactivated-users.-do-you-want-to-proceed-with-deleting-the-selected-user-groups-by-automatically-unassociating-the-deactivated-users") %>';
+								}
+								else {
+									message = '<%= UnicodeLanguageUtil.get(pageContext, "the-selected-user-group-is-associated-with-deactivated-users.-do-you-want-to-proceed-with-deleting-the-selected-user-group-by-automatically-unassociating-the-deactivated-users") %>';
+								}
+
+								if (confirm(message)) {
+									<portlet:namespace />doDeleteUserGroups(ids);
+								}
+							}
+						}
+					);
+				}
+				else {
+					if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-delete-this") %>')) {
+						<portlet:namespace />doDeleteUserGroups(ids);
+					}
+				}
+			}
+		);
+	}
+
+	function <portlet:namespace />doDeleteUserGroups(userGroupIds) {
+		document.<portlet:namespace />fm.method = "post";
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.DELETE %>";
+		document.<portlet:namespace />fm.<portlet:namespace />redirect.value = document.<portlet:namespace />fm.<portlet:namespace />userGroupsRedirect.value;
+		document.<portlet:namespace />fm.<portlet:namespace />deleteUserGroupIds.value = userGroupIds;
+
+		submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/user_groups_admin/edit_user_group" /></portlet:actionURL>");
+	}
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />deleteUserGroups',
+		function() {
+			<portlet:namespace />doDeleteUserGroup(
+				'<%= UserGroup.class.getName() %>',
+				Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds')
+			);
+	},
+		['liferay-util-list-fields']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />getUsersCount',
+		function(className, ids, status, callback) {
+			var A = AUI();
+
+			A.io.request(
+				'<%= themeDisplay.getPathMain() %>/user_groups_admin/get_users_count',
+				{
+					data: {
+						className: className,
+						ids: ids,
+						status: status
+					},
+					on: {
+						success: callback
+					}
+				}
+			);
+		},
+		['aui-io']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/view_flat_user_groups.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/view_flat_user_groups.jspf
new file mode 100644
index 0000000..b7204fb
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_groups_admin/view_flat_user_groups.jspf
@@ -0,0 +1,113 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+UserGroupSearch userGroupSearch = new UserGroupSearch(renderRequest, portletURL);
+%>
+
+<liferay-ui:search-container
+	rowChecker="<%= new RowChecker(renderResponse) %>"
+	searchContainer="<%= userGroupSearch %>"
+>
+	<aui:input disabled="<%= true %>" name="userGroupsRedirect" type="hidden" value="<%= portletURL.toString() %>" />
+	<aui:input name="deleteUserGroupIds" type="hidden" />
+
+	<aui:nav-bar>
+		<aui:nav>
+			<portlet:renderURL var="viewUserGroupsURL">
+				<portlet:param name="struts_action" value="/user_groups_admin/view" />
+			</portlet:renderURL>
+
+			<c:if test="<%= PortalPermissionUtil.contains(permissionChecker, ActionKeys.ADD_USER_GROUP) %>">
+				<portlet:renderURL var="addUsergroupURL">
+					<portlet:param name="struts_action" value="/user_groups_admin/edit_user_group" />
+					<portlet:param name="redirect" value="<%= viewUserGroupsURL %>" />
+				</portlet:renderURL>
+
+				<aui:nav-item href="<%= addUsergroupURL %>" iconCssClass="icon-plus" label="add" />
+			</c:if>
+		</aui:nav>
+
+		<aui:nav-bar-search cssClass="pull-right" file="/html/portlet/user_groups_admin/user_group_search.jsp" searchContainer="<%= userGroupSearch %>" />
+	</aui:nav-bar>
+
+	<%
+	UserGroupDisplayTerms searchTerms = (UserGroupDisplayTerms)searchContainer.getSearchTerms();
+
+	LinkedHashMap<String, Object> userGroupParams = new LinkedHashMap<String, Object>();
+
+	if (filterManageableUserGroups) {
+		userGroupParams.put("userGroupsUsers", new Long(user.getUserId()));
+	}
+	%>
+
+	<liferay-ui:search-container-results>
+		<c:choose>
+			<c:when test="<%= PropsValues.USER_GROUPS_INDEXER_ENABLED && PropsValues.USER_GROUPS_SEARCH_WITH_INDEX %>">
+				<%@ include file="/html/portlet/user_groups_admin/user_group_search_results_index.jspf" %>
+			</c:when>
+			<c:otherwise>
+				<%@ include file="/html/portlet/user_groups_admin/user_group_search_results_database.jspf" %>
+			</c:otherwise>
+		</c:choose>
+	</liferay-ui:search-container-results>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.UserGroup"
+		escapedModel="<%= true %>"
+		keyProperty="userGroupId"
+		modelVar="userGroup"
+	>
+		<portlet:renderURL var="rowURL">
+			<portlet:param name="struts_action" value="/user_groups_admin/edit_user_group" />
+			<portlet:param name="redirect" value="<%= searchContainer.getIteratorURL().toString() %>" />
+			<portlet:param name="userGroupId" value="<%= String.valueOf(userGroup.getUserGroupId()) %>" />
+		</portlet:renderURL>
+
+		<%
+		if (!UserGroupPermissionUtil.contains(permissionChecker, userGroup.getUserGroupId(), ActionKeys.UPDATE)) {
+			rowURL = null;
+		}
+		%>
+
+		<liferay-ui:search-container-column-text
+			href="<%= rowURL %>"
+			name="name"
+			orderable="<%= true %>"
+			property="name"
+		/>
+
+		<liferay-ui:search-container-column-text
+			href="<%= rowURL %>"
+			name="description"
+			orderable="<%= true %>"
+			property="description"
+		/>
+
+		<liferay-ui:search-container-column-jsp
+			align="right"
+			path="/html/portlet/user_groups_admin/user_group_action.jsp"
+		/>
+	</liferay-ui:search-container-row>
+
+	<div class="separator"><!-- --></div>
+
+	<c:if test="<%= PortalPermissionUtil.contains(permissionChecker, ActionKeys.ADD_USER_GROUP) %>">
+		<aui:button disabled="<%= true %>" name="delete" onClick='<%= renderResponse.getNamespace() + "deleteUserGroups();" %>' value="delete" />
+	</c:if>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/user_statistics/add_activity_counter.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_statistics/add_activity_counter.jsp
new file mode 100644
index 0000000..42afa87
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_statistics/add_activity_counter.jsp
@@ -0,0 +1,50 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/user_statistics/init.jsp" %>
+
+<%
+int index = ParamUtil.getInteger(request, "index", GetterUtil.getInteger((String)request.getAttribute("configuration.jsp-index")));
+
+String displayActivityCounterName = PrefsParamUtil.getString(portletPreferences, request, "displayActivityCounterName" + index);
+
+List<String> activityCounterNames = SocialConfigurationUtil.getActivityCounterNames(SocialActivityCounterConstants.TYPE_ACTOR);
+
+activityCounterNames.addAll(SocialConfigurationUtil.getActivityCounterNames(SocialActivityCounterConstants.TYPE_CREATOR));
+
+activityCounterNames.add(SocialActivityCounterConstants.NAME_USER_ACHIEVEMENTS);
+
+Collections.sort(activityCounterNames, new SocialActivityCounterNameComparator(locale));
+%>
+
+<div class="field-row query-row">
+	<aui:select inlineField="<%= true %>" label="" name='<%= "preferences--displayActivityCounterName" + index + "--" %>'>
+
+		<%
+		for (String activityCounterName : activityCounterNames) {
+			if (activityCounterName.equals(SocialActivityCounterConstants.NAME_CONTRIBUTION) || activityCounterName.equals(SocialActivityCounterConstants.NAME_PARTICIPATION)) {
+				continue;
+			}
+		%>
+
+			<aui:option label='<%= "user.statistics." + activityCounterName %>' selected="<%= activityCounterName.equals(displayActivityCounterName) %>" value="<%= activityCounterName %>" />
+
+		<%
+		}
+		%>
+
+	</aui:select>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/user_statistics/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_statistics/configuration.jsp
new file mode 100644
index 0000000..57ab19c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_statistics/configuration.jsp
@@ -0,0 +1,84 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/user_statistics/init.jsp" %>
+
+<%
+String tabs2 = ParamUtil.getString(request, "tabs2");
+
+String redirect = ParamUtil.getString(request, "redirect");
+%>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationActionURL" />
+<liferay-portlet:renderURL portletConfiguration="true" varImpl="configurationRenderURL" />
+
+<aui:form action="<%= configurationActionURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
+	<aui:input name="redirect" type="hidden" value="<%= configurationRenderURL.toString() %>" />
+
+	<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="userStatisticsRankingsPanel" persistState="<%= true %>" title="ranking">
+		<aui:input label="rank-by-contribution" name="preferences--rankByContribution--" type="checkbox" value="<%= rankByContribution %>" />
+
+		<aui:input label="rank-by-participation" name="preferences--rankByParticipation--" type="checkbox" value="<%= rankByParticipation %>" />
+	</liferay-ui:panel>
+
+	<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="userStatisticsSettingsPanel" persistState="<%= true %>" title="settings">
+		<aui:input label="show-header-text" name="preferences--showHeaderText--" type="checkbox" value="<%= showHeaderText %>" />
+
+		<aui:input label="show-totals" name="preferences--showTotals--" type="checkbox" value="<%= showTotals %>" />
+	</liferay-ui:panel>
+
+	<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="userStatisticsDisplayActivityCounterNamesPanel" persistState="<%= true %>" title="counters">
+		<div id="<portlet:namespace />displayActivityCounterNames">
+			<aui:input label="display-additional-activity-counters" name="preferences--displayAdditionalActivityCounters--" type="checkbox" value="<%= displayAdditionalActivityCounters %>" />
+
+			<aui:fieldset label="">
+
+				<%
+				for (int displayActivityCounterNameIndex : displayActivityCounterNameIndexes) {
+					request.setAttribute("configuration.jsp-index", String.valueOf(displayActivityCounterNameIndex));
+				%>
+
+					<div class="lfr-form-row">
+						<div class="row-fields">
+							<liferay-util:include page="/html/portlet/user_statistics/add_activity_counter.jsp" />
+						</div>
+					</div>
+
+				<%
+				}
+				%>
+
+			</aui:fieldset>
+		</div>
+
+		<aui:script use="liferay-auto-fields">
+			var autoFields = new Liferay.AutoFields(
+				{
+					contentBox: '#<portlet:namespace />displayActivityCounterNames > fieldset',
+					fieldIndexes: '<portlet:namespace />preferences--displayActivityCounterNameIndexes--',
+					namespace: '<portlet:namespace />',
+					url: '<portlet:renderURL windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>"><portlet:param name="struts_action" value="/portlet_configuration/add_user_statistics_activity_counter" /></portlet:renderURL>'
+				}
+			).render();
+		</aui:script>
+	</liferay-ui:panel>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/user_statistics/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_statistics/css/.sass-cache/main.css
new file mode 100644
index 0000000..bf25230
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_statistics/css/.sass-cache/main.css
@@ -0,0 +1,12 @@
+.portlet-users-stats .taglib-search-iterator-page-iterator-bottom .taglib-page-iterator {
+  padding-top: 5px; }
+.portlet-users-stats .taglib-search-iterator-page-iterator-bottom .search-results {
+  display: none; }
+.portlet-users-stats .taglib-search-iterator-page-iterator-bottom .search-pages {
+  float: none; }
+  .portlet-users-stats .taglib-search-iterator-page-iterator-bottom .search-pages .page-links {
+    float: none;
+    text-align: left; }
+    .portlet-users-stats .taglib-search-iterator-page-iterator-bottom .search-pages .page-links .previous {
+      border-width: 0; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/user_statistics/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_statistics/css/main.css
new file mode 100644
index 0000000..d9d02a4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_statistics/css/main.css
@@ -0,0 +1,24 @@
+.portlet-users-stats {
+	.taglib-search-iterator-page-iterator-bottom {
+		.taglib-page-iterator {
+			padding-top: 5px;
+		}
+
+		.search-results {
+			display: none;
+		}
+
+		.search-pages {
+			float: none;
+
+			.page-links {
+				float: none;
+				text-align: left;
+
+				.previous {
+					border-width: 0;
+				}
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/user_statistics/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_statistics/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_statistics/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/user_statistics/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_statistics/init.jsp
new file mode 100644
index 0000000..94f22f3
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_statistics/init.jsp
@@ -0,0 +1,46 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.social.model.SocialActivityCounter" %><%@
+page import="com.liferay.portlet.social.model.SocialActivityCounterConstants" %><%@
+page import="com.liferay.portlet.social.model.impl.SocialActivityCounterImpl" %><%@
+page import="com.liferay.portlet.social.service.SocialActivityCounterLocalServiceUtil" %><%@
+page import="com.liferay.portlet.social.util.SocialConfigurationUtil" %><%@
+page import="com.liferay.portlet.social.util.comparator.SocialActivityCounterNameComparator" %>
+
+<%
+boolean displayAdditionalActivityCounters = GetterUtil.getBoolean(PrefsParamUtil.getString(portletPreferences, request, "displayAdditionalActivityCounters"), true);
+
+int[] displayActivityCounterNameIndexes = null;
+
+String displayActivityCounterNameIndexesParam = PrefsParamUtil.getString(portletPreferences, request, "displayActivityCounterNameIndexes");
+
+if (Validator.isNotNull(displayActivityCounterNameIndexesParam)) {
+	displayActivityCounterNameIndexes = StringUtil.split(displayActivityCounterNameIndexesParam, 0);
+}
+else {
+	displayActivityCounterNameIndexes = new int[] {0};
+}
+
+boolean rankByContribution = GetterUtil.getBoolean(PrefsParamUtil.getString(portletPreferences, request, "rankByContribution"), true);
+boolean rankByParticipation = GetterUtil.getBoolean(PrefsParamUtil.getString(portletPreferences, request, "rankByParticipation"), true);
+boolean showHeaderText = GetterUtil.getBoolean(PrefsParamUtil.getString(portletPreferences, request, "showHeaderText"), true);
+boolean showTotals = GetterUtil.getBoolean(PrefsParamUtil.getString(portletPreferences, request, "showTotals"), true);
+%>
+
+<%@ include file="/html/portlet/user_statistics/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/user_statistics/user_display.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_statistics/user_display.jsp
new file mode 100644
index 0000000..3d8d9e0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_statistics/user_display.jsp
@@ -0,0 +1,105 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/user_statistics/init.jsp" %>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, 5, portletURL, null, null);
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+Map<String, SocialActivityCounter> activityCounters = (Map<String, SocialActivityCounter>)row.getObject();
+
+SocialActivityCounter contributionActivityCounter = activityCounters.get(SocialActivityCounterConstants.NAME_CONTRIBUTION);
+
+if (contributionActivityCounter == null) {
+	contributionActivityCounter = new SocialActivityCounterImpl();
+
+	contributionActivityCounter.setName(SocialActivityCounterConstants.NAME_CONTRIBUTION);
+}
+
+if (!contributionActivityCounter.isActivePeriod(SocialActivityCounterConstants.PERIOD_LENGTH_SYSTEM)) {
+	contributionActivityCounter.setCurrentValue(0);
+}
+
+SocialActivityCounter participationActivityCounter = activityCounters.get(SocialActivityCounterConstants.NAME_PARTICIPATION);
+
+if (participationActivityCounter == null) {
+	participationActivityCounter = new SocialActivityCounterImpl();
+
+	participationActivityCounter.setName(SocialActivityCounterConstants.NAME_PARTICIPATION);
+}
+
+if (!participationActivityCounter.isActivePeriod(SocialActivityCounterConstants.PERIOD_LENGTH_SYSTEM)) {
+	participationActivityCounter.setCurrentValue(0);
+}
+
+activityCounters.remove(SocialActivityCounterConstants.NAME_CONTRIBUTION);
+activityCounters.remove(SocialActivityCounterConstants.NAME_PARTICIPATION);
+%>
+
+<liferay-ui:user-display
+	userId="<%= GetterUtil.getLong(row.getPrimaryKey()) %>"
+	userName=""
+>
+	<c:if test="<%= userDisplay != null %>">
+		<div class="user-rank">
+			<span class="statistics-label"><liferay-ui:message key="rank" />:</span> <%= searchContainer.getStart() + row.getPos() + 1 %>
+		</div>
+
+		<div class="contribution-score">
+			<span class="statistics-label"><liferay-ui:message key='contribution-score' />:</span> <%= contributionActivityCounter.getCurrentValue() %>
+
+			<c:if test="<%= showTotals %>">
+				<span>(<liferay-ui:message key="total" />: <%= contributionActivityCounter.getTotalValue() %>)</span>
+			</c:if>
+		</div>
+
+		<div class="participation-score">
+			<span class="statistics-label"><liferay-ui:message key='participation-score' />:</span> <%= participationActivityCounter.getCurrentValue() %>
+
+			<c:if test="<%= showTotals %>">
+				<span>(<liferay-ui:message key="total" />: <%= participationActivityCounter.getTotalValue() %>)</span>
+			</c:if>
+		</div>
+	</c:if>
+</liferay-ui:user-display>
+
+<c:if test="<%= displayAdditionalActivityCounters %>">
+	<div class="separator"><!-- --></div>
+
+	<%
+	for (SocialActivityCounter activityCounter : activityCounters.values()) {
+		if (!activityCounter.isActivePeriod(SocialActivityCounterConstants.PERIOD_LENGTH_SYSTEM)) {
+			activityCounter.setCurrentValue(0);
+		}
+	%>
+
+		<div class="social-counter-<%= activityCounter.getName() %>">
+			<span class="statistics-label"><liferay-ui:message key='<%= "user.statistics." + activityCounter.getName() %>' />:</span> <%= activityCounter.getCurrentValue() %>
+
+			<c:if test="<%= showTotals %>">
+				<span>(<liferay-ui:message key="total" />: <%= activityCounter.getTotalValue() %>)</span>
+			</c:if>
+		</div>
+
+	<%
+	}
+	%>
+
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/user_statistics/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_statistics/view.jsp
new file mode 100644
index 0000000..96e76f2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/user_statistics/view.jsp
@@ -0,0 +1,141 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/user_statistics/init.jsp" %>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+List<String> rankingNamesList = new ArrayList<String>();
+
+if (rankByParticipation) {
+	rankingNamesList.add(SocialActivityCounterConstants.NAME_PARTICIPATION);
+}
+
+if (rankByContribution) {
+	rankingNamesList.add(SocialActivityCounterConstants.NAME_CONTRIBUTION);
+}
+
+String[] rankingNames = rankingNamesList.toArray(new String[rankingNamesList.size()]);
+
+if (!rankingNamesList.isEmpty()) {
+	SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, 5, portletURL, null, null);
+
+	int total = SocialActivityCounterLocalServiceUtil.getUserActivityCountersCount(scopeGroupId, rankingNames);
+
+	searchContainer.setTotal(total);
+
+	List<String> selectedNamesList = new ArrayList<String>();
+
+	selectedNamesList.add(SocialActivityCounterConstants.NAME_CONTRIBUTION);
+	selectedNamesList.add(SocialActivityCounterConstants.NAME_PARTICIPATION);
+
+	if (displayAdditionalActivityCounters) {
+		for (int displayActivityCounterNameIndex : displayActivityCounterNameIndexes) {
+			selectedNamesList.add(PrefsParamUtil.getString(portletPreferences, request, "displayActivityCounterName" + displayActivityCounterNameIndex));
+		}
+	}
+
+	String[] selectedNames = selectedNamesList.toArray(new String[selectedNamesList.size()]);
+
+	List<Tuple> results = SocialActivityCounterLocalServiceUtil.getUserActivityCounters(scopeGroupId, rankingNames, selectedNames, searchContainer.getStart(), searchContainer.getEnd());
+
+	searchContainer.setResults(results);
+
+	List resultRows = searchContainer.getResultRows();
+
+	for (int i = 0; i < results.size(); i++) {
+		Tuple tuple = results.get(i);
+
+		ResultRow row = new ResultRow((Map<String, SocialActivityCounter>)tuple.getObject(1), (Long)tuple.getObject(0), i);
+
+		// User display
+
+		row.addJSP("/html/portlet/user_statistics/user_display.jsp", application, request, response);
+
+		// Add result row
+
+		resultRows.add(row);
+	}
+
+	String rankingNamesMessage = LanguageUtil.format(pageContext, rankingNames[0], StringPool.BLANK);
+
+	for (int i = 1; i < rankingNames.length; i++) {
+		rankingNamesMessage = LanguageUtil.format(pageContext, "x-and-y", new Object[] {rankingNamesMessage, rankingNames[i]});
+	}
+	%>
+
+	<c:if test="<%= showHeaderText %>">
+		<div class="top-users">
+			<c:if test="<%= total > 0 %>">
+				<liferay-ui:message arguments="<%= total %>" key="top-users-out-of-x" /> <%= LanguageUtil.format(pageContext, "ranking-is-based-on-x", rankingNamesMessage) %><br />
+			</c:if>
+		</div>
+	</c:if>
+
+	<c:if test="<%= total == 0 %>">
+		<liferay-ui:message key="there-are-no-active-users-for-this-period" />
+	</c:if>
+
+	<liferay-ui:search-iterator paginate="<%= false %>" searchContainer="<%= searchContainer %>" />
+
+	<c:if test="<%= results.size() > 0 %>">
+		<div class="taglib-search-iterator-page-iterator-bottom" id="<portlet:namespace />searchTopUsers">
+			<liferay-ui:search-paginator searchContainer="<%= searchContainer %>" type="article" />
+		</div>
+	</c:if>
+
+	<aui:script use="aui-io-plugin-deprecated">
+		var searchTopUsers = A.one('#<portlet:namespace />searchTopUsers');
+
+		if (searchTopUsers) {
+			var parent = searchTopUsers.ancestor();
+
+			parent.plug(
+				A.Plugin.IO,
+				{
+					autoLoad: false
+				}
+			);
+
+			searchTopUsers.all('a').on(
+				'click',
+				function(event) {
+					event.preventDefault();
+
+					var uri = event.currentTarget.get('href').replace(/p_p_state=normal/i, 'p_p_state=exclusive');
+
+					parent.io.set('uri', uri);
+					parent.io.start();
+				}
+			);
+		}
+	</aui:script>
+
+<%
+}
+else {
+%>
+
+	<div class="alert alert-info portlet-configuration">
+		<a href="<%= portletDisplay.getURLConfiguration() %>" onClick="<%= portletDisplay.getURLConfigurationJS() %>">
+			<liferay-ui:message key="please-configure-this-portlet-and-select-at-least-one-ranking-criteria" />
+		</a>
+	</div>
+
+<%
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/common/additional_email_addresses.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/common/additional_email_addresses.jsp
new file mode 100644
index 0000000..9923c71
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/common/additional_email_addresses.jsp
@@ -0,0 +1,117 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+String className = (String)request.getAttribute("emailAddresses.className");
+long classPK = (Long)request.getAttribute("emailAddresses.classPK");
+
+List<EmailAddress> emailAddresses = Collections.emptyList();
+
+int[] emailAddressesIndexes = null;
+
+String emailAddressesIndexesParam = ParamUtil.getString(request, "emailAddressesIndexes");
+
+if (Validator.isNotNull(emailAddressesIndexesParam)) {
+	emailAddresses = new ArrayList<EmailAddress>();
+
+	emailAddressesIndexes = StringUtil.split(emailAddressesIndexesParam, 0);
+
+	for (int emailAddressesIndex : emailAddressesIndexes) {
+		emailAddresses.add(new EmailAddressImpl());
+	}
+}
+else {
+	if (classPK > 0) {
+		emailAddresses = EmailAddressServiceUtil.getEmailAddresses(className, classPK);
+
+		emailAddressesIndexes = new int[emailAddresses.size()];
+
+		for (int i = 0; i < emailAddresses.size() ; i++) {
+			emailAddressesIndexes[i] = i;
+		}
+	}
+
+	if (emailAddresses.isEmpty()) {
+		emailAddresses = new ArrayList<EmailAddress>();
+
+		emailAddresses.add(new EmailAddressImpl());
+
+		emailAddressesIndexes = new int[] {0};
+	}
+
+	if (emailAddressesIndexes == null) {
+		emailAddressesIndexes = new int[0];
+	}
+}
+%>
+
+<liferay-ui:error-marker key="errorSection" value="additionalEmailAddresses" />
+
+<h3><liferay-ui:message key="additional-email-addresses" /></h3>
+
+<div class="alert alert-info">
+	<liferay-ui:message key="email-address-and-type-are-required-fields" />
+</div>
+
+<liferay-ui:error exception="<%= EmailAddressException.class %>" message="please-enter-a-valid-email-address" />
+<liferay-ui:error key="<%= NoSuchListTypeException.class.getName() + className + ListTypeConstants.EMAIL_ADDRESS %>" message="please-select-a-type" />
+
+<aui:fieldset>
+
+	<%
+	for (int i = 0; i < emailAddressesIndexes.length; i++) {
+		int emailAddressesIndex = emailAddressesIndexes[i];
+
+		EmailAddress emailAddress = emailAddresses.get(i);
+	%>
+
+		<aui:model-context bean="<%= emailAddress %>" model="<%= EmailAddress.class %>" />
+
+		<div class="lfr-form-row lfr-form-row-inline">
+			<div class="row-fields">
+				<aui:input name='<%= "emailAddressId" + emailAddressesIndex %>' type="hidden" value="<%= emailAddress.getEmailAddressId() %>" />
+
+				<aui:input cssClass="email-field" fieldParam='<%= "emailAddressAddress" + emailAddressesIndex %>' id='<%= "emailAddressAddress" + emailAddressesIndex %>' inlineField="<%= true %>" label="email-address" name="address" width="150px" />
+
+				<aui:select inlineField="<%= true %>" label="type" listType="<%= className + ListTypeConstants.EMAIL_ADDRESS %>" name='<%= "emailAddressTypeId" + emailAddressesIndex %>' />
+
+				<aui:input checked="<%= emailAddress.isPrimary() %>" cssClass="primary-ctrl" id='<%= "emailAddressPrimary" + emailAddressesIndex %>' inlineField="<%= true %>" label="primary" name="emailAddressPrimary" type="radio" value="<%= emailAddressesIndex %>" />
+			</div>
+		</div>
+
+	<%
+	}
+	%>
+
+	<aui:input name="emailAddressesIndexes" type="hidden" value="<%= StringUtil.merge(emailAddressesIndexes) %>" />
+</aui:fieldset>
+
+<aui:script use="liferay-auto-fields">
+	Liferay.once(
+		'formNavigator:reveal<portlet:namespace />additionalEmailAddresses',
+		function() {
+			new Liferay.AutoFields(
+				{
+					contentBox: '#<portlet:namespace />additionalEmailAddresses > fieldset',
+					fieldIndexes: '<portlet:namespace />emailAddressesIndexes',
+					namespace: '<portlet:namespace />'
+				}
+			).render();
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/common/addresses.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/common/addresses.jsp
new file mode 100644
index 0000000..4a7d185
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/common/addresses.jsp
@@ -0,0 +1,172 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+String className = (String)request.getAttribute("addresses.className");
+long classPK = (Long)request.getAttribute("addresses.classPK");
+
+List<Address> addresses = Collections.emptyList();
+
+int[] addressesIndexes = null;
+
+String addressesIndexesParam = ParamUtil.getString(request, "addressesIndexes");
+
+if (Validator.isNotNull(addressesIndexesParam)) {
+	addresses = new ArrayList<Address>();
+
+	addressesIndexes = StringUtil.split(addressesIndexesParam, 0);
+
+	for (int addressesIndex : addressesIndexes) {
+		addresses.add(new AddressImpl());
+	}
+}
+else {
+	if (classPK > 0) {
+		addresses = AddressServiceUtil.getAddresses(className, classPK);
+
+		addressesIndexes = new int[addresses.size()];
+
+		for (int i = 0; i < addresses.size() ; i++) {
+			addressesIndexes[i] = i;
+		}
+	}
+
+	if (addresses.isEmpty()) {
+		addresses = new ArrayList<Address>();
+
+		addresses.add(new AddressImpl());
+
+		addressesIndexes = new int[] {0};
+	}
+
+	if (addressesIndexes == null) {
+		addressesIndexes = new int[0];
+	}
+}
+%>
+
+<liferay-ui:error-marker key="errorSection" value="addresses" />
+
+<h3><liferay-ui:message key="addresses" /></h3>
+
+<div class="alert alert-info">
+	<liferay-ui:message key="street-1-and-city-are-required-fields.-postal-code-could-be-required-in-some-countries" />
+</div>
+
+<liferay-ui:error exception="<%= AddressCityException.class %>" message="please-enter-a-valid-city" />
+<liferay-ui:error exception="<%= AddressStreetException.class %>" message="please-enter-a-valid-street" />
+<liferay-ui:error exception="<%= AddressZipException.class %>" message="please-enter-a-valid-postal-code" />
+<liferay-ui:error exception="<%= NoSuchCountryException.class %>" message="please-select-a-country" />
+<liferay-ui:error key="<%= NoSuchListTypeException.class.getName() + className + ListTypeConstants.ADDRESS %>" message="please-select-a-type" />
+<liferay-ui:error exception="<%= NoSuchRegionException.class %>" message="please-select-a-region" />
+
+<aui:fieldset cssClass="addresses">
+
+	<%
+	for (int i = 0; i < addressesIndexes.length; i++) {
+		int addressesIndex = addressesIndexes[i];
+
+		Address address = addresses.get(i);
+
+		long countryId = ParamUtil.getLong(request, "addressCountryId" + addressesIndex, address.getCountryId());
+		long regionId = ParamUtil.getLong(request, "addressRegionId" + addressesIndex, address.getRegionId());
+	%>
+
+		<aui:model-context bean="<%= address %>" model="<%= Address.class %>" />
+
+		<div class="lfr-form-row">
+			<div class="row-fields">
+				<%@ include file="/html/portlet/users_admin/common/addresses_address.jspf" %>
+			</div>
+		</div>
+
+		<aui:script use="liferay-dynamic-select">
+			new Liferay.DynamicSelect(
+				[
+					{
+						select: '<portlet:namespace />addressCountryId<%= addressesIndex %>',
+						selectData: Liferay.Address.getCountries,
+						selectDesc: 'nameCurrentValue',
+						selectSort: '<%= true %>',
+						selectId: 'countryId',
+						selectVal: '<%= countryId %>'
+					},
+					{
+						select: '<portlet:namespace />addressRegionId<%= addressesIndex %>',
+						selectData: Liferay.Address.getRegions,
+						selectDesc: 'name',
+						selectId: 'regionId',
+						selectVal: '<%= regionId %>'
+					}
+				]
+			);
+		</aui:script>
+
+	<%
+	}
+	%>
+
+	<aui:input name="addressesIndexes" type="hidden" value="<%= StringUtil.merge(addressesIndexes) %>" />
+</aui:fieldset>
+
+<aui:script use="liferay-auto-fields,liferay-dynamic-select">
+	Liferay.once(
+		'formNavigator:reveal<portlet:namespace />addresses',
+		function() {
+			var addresses = new Liferay.AutoFields(
+				{
+					contentBox: '#<portlet:namespace />addresses > fieldset',
+					fieldIndexes: '<portlet:namespace />addressesIndexes',
+					namespace: '<portlet:namespace />',
+					on: {
+						'clone': function(event) {
+							var row = event.row;
+							var guid = event.guid;
+
+							var dynamicSelects = row.one('select[data-componentType=dynamic_select]');
+
+							if (dynamicSelects) {
+								dynamicSelects.detach('change');
+							}
+
+							new Liferay.DynamicSelect(
+								[
+									{
+										select: '<portlet:namespace />addressCountryId' + guid,
+										selectData: Liferay.Address.getCountries,
+										selectDesc: 'nameCurrentValue',
+										selectSort: '<%= true %>',
+										selectId: 'countryId',
+										selectVal: '0'
+									},
+									{
+										select: '<portlet:namespace />addressRegionId' + guid,
+										selectData: Liferay.Address.getRegions,
+										selectDesc: 'name',
+										selectId: 'regionId',
+										selectVal: '0'
+									}
+								]
+							);
+						}
+					}
+				}
+			).render();
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/common/addresses_address.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/common/addresses_address.jspf
new file mode 100644
index 0000000..0b5dae9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/common/addresses_address.jspf
@@ -0,0 +1,41 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<aui:col width="<%= 50 %>">
+	<aui:input name='<%= "addressId" + addressesIndex %>' type="hidden" value="<%= address.getAddressId() %>" />
+
+	<aui:input fieldParam='<%= "addressStreet1_" + addressesIndex %>' id='<%= "addressStreet1_" + addressesIndex %>' name="street1" />
+
+	<aui:input fieldParam='<%= "addressStreet2_" + addressesIndex %>' id='<%= "addressStreet2_" + addressesIndex %>' name="street2" />
+
+	<aui:input fieldParam='<%= "addressStreet3_" + addressesIndex %>' id='<%= "addressStreet3_" + addressesIndex %>' name="street3" />
+
+	<aui:select label="country" name='<%= "addressCountryId" + addressesIndex %>' />
+
+	<aui:select label="region" name='<%= "addressRegionId" + addressesIndex %>' />
+</aui:col>
+
+<aui:col width="<%= 50 %>">
+	<aui:input fieldParam='<%= "addressZip" + addressesIndex %>' id='<%= "addressZip" + addressesIndex %>' label="postal-code" name="zip" />
+
+	<aui:input fieldParam='<%= "addressCity" + addressesIndex %>' id='<%= "addressCity" + addressesIndex %>' name="city" />
+
+	<aui:select label="type" listType="<%= className + ListTypeConstants.ADDRESS %>" name='<%= "addressTypeId" + addressesIndex %>' />
+
+	<aui:input checked="<%= address.isPrimary() %>" cssClass="primary-ctrl" id='<%= "addressPrimary" + addressesIndex %>' label="primary" name="addressPrimary" type="radio" value="<%= addressesIndex %>" />
+
+	<aui:input cssClass="mailing-ctrl" fieldParam='<%= "addressMailing" + addressesIndex %>' id='<%= "addressMailing" + addressesIndex %>' name="mailing" />
+</aui:col>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/common/phone_numbers.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/common/phone_numbers.jsp
new file mode 100644
index 0000000..1974b32
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/common/phone_numbers.jsp
@@ -0,0 +1,120 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+String className = (String)request.getAttribute("phones.className");
+long classPK = (Long)request.getAttribute("phones.classPK");
+
+List<Phone> phones = Collections.emptyList();
+
+int[] phonesIndexes = null;
+
+String phonesIndexesParam = ParamUtil.getString(request, "phonesIndexes");
+
+if (Validator.isNotNull(phonesIndexesParam)) {
+	phones = new ArrayList<Phone>();
+
+	phonesIndexes = StringUtil.split(phonesIndexesParam, 0);
+
+	for (int phonesIndex : phonesIndexes) {
+		phones.add(new PhoneImpl());
+	}
+}
+else {
+
+	if (classPK > 0) {
+		phones = PhoneServiceUtil.getPhones(className, classPK);
+
+		phonesIndexes = new int[phones.size()];
+
+		for (int i = 0; i < phones.size() ; i++) {
+			phonesIndexes[i] = i;
+		}
+	}
+
+	if (phones.isEmpty()) {
+		phones = new ArrayList<Phone>();
+
+		phones.add(new PhoneImpl());
+
+		phonesIndexes = new int[] {0};
+	}
+
+	if (phonesIndexes == null) {
+		phonesIndexes = new int[0];
+	}
+}
+%>
+
+<liferay-ui:error-marker key="errorSection" value="phoneNumbers" />
+
+<h3><liferay-ui:message key="phone-numbers" /></h3>
+
+<div class="alert alert-info">
+	<liferay-ui:message key="phone-number-and-type-are-required-fields.-extension-must-be-numeric" />
+</div>
+
+<liferay-ui:error key="<%= NoSuchListTypeException.class.getName() + className + ListTypeConstants.PHONE %>" message="please-select-a-type" />
+<liferay-ui:error exception="<%= PhoneNumberException.class %>" message="please-enter-a-valid-phone-number" />
+
+<aui:fieldset>
+
+	<%
+	for (int i = 0; i < phonesIndexes.length; i++) {
+		int phonesIndex = phonesIndexes[i];
+
+		Phone phone = phones.get(i);
+	%>
+
+		<aui:model-context bean="<%= phone %>" model="<%= Phone.class %>" />
+
+		<div class="lfr-form-row lfr-form-row-inline">
+			<div class="row-fields">
+				<aui:input name='<%= "phoneId" + phonesIndex %>' type="hidden" value="<%= phone.getPhoneId() %>" />
+
+				<aui:input fieldParam='<%= "phoneNumber" + phonesIndex %>' id='<%= "phoneNumber" + phonesIndex %>' inlineField="<%= true %>" name="number" />
+
+				<aui:input fieldParam='<%= "phoneExtension" + phonesIndex %>' id='<%= "phoneExtension" + phonesIndex %>' inlineField="<%= true %>" name="extension" />
+
+				<aui:select inlineField="<%= true %>" label="type" listType="<%= className + ListTypeConstants.PHONE %>" name='<%= "phoneTypeId" + phonesIndex %>' />
+
+				<aui:input checked="<%= phone.isPrimary() %>" id='<%= "phonePrimary" + phonesIndex %>' inlineField="<%= true %>" label="primary" name="phonePrimary" type="radio" value="<%= phonesIndex %>" />
+			</div>
+		</div>
+
+	<%
+	}
+	%>
+
+	<aui:input name="phonesIndexes" type="hidden" value="<%= StringUtil.merge(phonesIndexes) %>" />
+</aui:fieldset>
+
+<aui:script use="liferay-auto-fields">
+	Liferay.once(
+		'formNavigator:reveal<portlet:namespace />phoneNumbers',
+		function() {
+			new Liferay.AutoFields(
+				{
+					contentBox: '#<portlet:namespace />phoneNumbers > fieldset',
+					fieldIndexes: '<portlet:namespace />phonesIndexes',
+					namespace: '<portlet:namespace />'
+				}
+			).render();
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/common/websites.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/common/websites.jsp
new file mode 100644
index 0000000..8c17d6d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/common/websites.jsp
@@ -0,0 +1,117 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+String className = (String)request.getAttribute("websites.className");
+long classPK = (Long)request.getAttribute("websites.classPK");
+
+List<Website> websites = Collections.emptyList();
+
+int[] websitesIndexes = null;
+
+String websitesIndexesParam = ParamUtil.getString(request, "websitesIndexes");
+
+if (Validator.isNotNull(websitesIndexesParam)) {
+	websites = new ArrayList<Website>();
+
+	websitesIndexes = StringUtil.split(websitesIndexesParam, 0);
+
+	for (int websitesIndex : websitesIndexes) {
+		websites.add(new WebsiteImpl());
+	}
+}
+else {
+	if (classPK > 0) {
+		websites = WebsiteServiceUtil.getWebsites(className, classPK);
+
+		websitesIndexes = new int[websites.size()];
+
+		for (int i = 0; i < websites.size(); i++) {
+			websitesIndexes[i] = i;
+		}
+	}
+
+	if (websites.isEmpty()) {
+		websites = new ArrayList<Website>();
+
+		websites.add(new WebsiteImpl());
+
+		websitesIndexes = new int[] {0};
+	}
+
+	if (websitesIndexes == null) {
+		websitesIndexes = new int[0];
+	}
+}
+%>
+
+<liferay-ui:error-marker key="errorSection" value="websites" />
+
+<h3><liferay-ui:message key="websites" /></h3>
+
+<div class="alert alert-info">
+	<liferay-ui:message key="url-and-type-are-required-fields.-websites-must-start-with-http-or-https" />
+</div>
+
+<liferay-ui:error key="<%= NoSuchListTypeException.class.getName() + className + ListTypeConstants.WEBSITE %>" message="please-select-a-type" />
+<liferay-ui:error exception="<%= WebsiteURLException.class %>" message="please-enter-a-valid-url" />
+
+<aui:fieldset>
+
+	<%
+	for (int i = 0; i < websitesIndexes.length; i++) {
+		int websitesIndex = websitesIndexes[i];
+
+		Website website = websites.get(i);
+	%>
+
+		<aui:model-context bean="<%= website %>" model="<%= Website.class %>" />
+
+		<div class="lfr-form-row lfr-form-row-inline">
+			<div class="row-fields">
+				<aui:input name='<%= "websiteId" + websitesIndex %>' type="hidden" value="<%= website.getWebsiteId() %>" />
+
+				<aui:input cssClass="url-field" fieldParam='<%= "websiteUrl" + websitesIndex %>' id='<%= "websiteUrl" + websitesIndex %>' inlineField="<%= true %>" name="url" />
+
+				<aui:select inlineField="<%= true %>" label="type" listType="<%= className + ListTypeConstants.WEBSITE %>" name='<%= "websiteTypeId" + websitesIndex %>' />
+
+				<aui:input checked="<%= website.isPrimary() %>" cssClass="primary-ctrl" id='<%= "websitePrimary" + websitesIndex %>' inlineField="<%= true %>" label="primary" name="websitePrimary" type="radio" value="<%= websitesIndex %>" />
+			</div>
+		</div>
+
+	<%
+	}
+	%>
+
+	<aui:input name="websitesIndexes" type="hidden" value="<%= StringUtil.merge(websitesIndexes) %>" />
+</aui:fieldset>
+
+<aui:script use="liferay-auto-fields">
+	Liferay.once(
+		'formNavigator:reveal<portlet:namespace />websites',
+		function() {
+			new Liferay.AutoFields(
+				{
+					contentBox: '#<portlet:namespace />websites > fieldset',
+					fieldIndexes: '<portlet:namespace />websitesIndexes',
+					namespace: '<portlet:namespace />'
+				}
+			).render();
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/css/.sass-cache/main.css
new file mode 100644
index 0000000..31350c3
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/css/.sass-cache/main.css
@@ -0,0 +1,170 @@
+.portlet-users-admin .form fieldset {
+  border-width: 0;
+  padding: 0; }
+.portlet-users-admin .form .fieldset select {
+  width: auto; }
+.portlet-users-admin .form .fieldset textarea {
+  width: 90%; }
+.portlet-users-admin .form .fieldset .field.mailing-ctrl {
+  clear: both; }
+  .portlet-users-admin .form .fieldset .field.mailing-ctrl span {
+    margin-right: 0.5em; }
+.portlet-users-admin .form .fieldset .field.localized-language-selector {
+  margin-bottom: 0; }
+.portlet-users-admin .form .fieldset .email-field, .portlet-users-admin .form .fieldset .url-field {
+  width: 200px; }
+.portlet-users-admin #header-bottom {
+  background-color: #F6F8FB;
+  height: 34px;
+  margin: 0 0 10px; }
+.portlet-users-admin #header-menu {
+  background-color: #F3F5F5;
+  font-size: 11px;
+  line-height: 34px;
+  margin: 0 0 10px;
+  padding: 0 10px;
+  text-align: right; }
+.portlet-users-admin #header-title {
+  background-color: #C1CABC;
+  font-size: 20px;
+  font-weight: 500;
+  margin: 0 0 10px;
+  padding: 7px 10px; }
+.portlet-users-admin .company-logo {
+  border-width: 0;
+  width: 100px; }
+.portlet-users-admin .email-user-add .password-changed-notification {
+  display: none; }
+.portlet-users-admin .label-holder {
+  font-weight: 700;
+  padding: 15px 0 5px; }
+.portlet-users-admin .org-labor-entry {
+  float: left;
+  margin-right: 2%;
+  width: 12%; }
+  @media (max-width: 767px) {
+    .portlet-users-admin .org-labor-entry {
+      float: none;
+      width: auto; } }
+  .portlet-users-admin .org-labor-entry select {
+    width: 100%; }
+  .portlet-users-admin .org-labor-entry > .control-group {
+    margin-bottom: 0; }
+.portlet-users-admin .organization-details {
+  margin-left: 21px; }
+.portlet-users-admin .organization-information {
+  overflow: hidden; }
+.portlet-users-admin .organization-search {
+  float: right;
+  margin: 0 0 0.5em 0.5em; }
+.portlet-users-admin .password-policy-options {
+  margin-left: 2em; }
+.portlet-users-admin .section {
+  float: left;
+  margin-left: 10px;
+  width: 47%; }
+  .portlet-users-admin .section h3 {
+    background: url() no-repeat scroll 2px 50%;
+    border-bottom: 1px solid #CCC;
+    line-height: 1.5;
+    margin-bottom: 0.5em;
+    padding-left: 25px; }
+  .portlet-users-admin .section li {
+    list-style: none;
+    margin: 0;
+    padding-left: 25px; }
+  .portlet-users-admin .section ul {
+    margin: 0; }
+.portlet-users-admin .entity-addresses .primary {
+  background-position: 3px 5px; }
+.portlet-users-admin .entity-addresses .mailing-name {
+  display: block;
+  font-style: italic; }
+.portlet-users-admin .entity-addresses h3 {
+  background-image: url(@theme_image_path@/common/home.png); }
+.portlet-users-admin .entity-details {
+  clear: both; }
+.portlet-users-admin .entity-comments h3 {
+  background-image: url(@theme_image_path@/common/welcome_message.png); }
+.portlet-users-admin .entity-email-addresses h3 {
+  background-image: url(@theme_image_path@/mail/unread.png); }
+.portlet-users-admin .entity-phones h3 {
+  background-image: url(@theme_image_path@/common/telephone.png); }
+.portlet-users-admin .entity-websites h3 {
+  background-image: url(@theme_image_path@/common/history.png); }
+.portlet-users-admin .radio-holder {
+  line-height: 12px; }
+.portlet-users-admin .form-navigator .user-info .user-logo, .portlet-users-admin .form-navigator .user-info .organization-logo, .portlet-users-admin .form-navigator .organization-info .user-logo, .portlet-users-admin .form-navigator .organization-info .organization-logo {
+  margin-right: 5px;
+  width: 35px; }
+.portlet-users-admin .membership-restriction-container {
+  margin-top: 1em; }
+.portlet-users-admin .instant-messenger, .portlet-users-admin .social-network {
+  clear: both;
+  margin-bottom: 2em;
+  overflow: hidden; }
+  .portlet-users-admin .instant-messenger img, .portlet-users-admin .social-network img {
+    margin-left: 1em; }
+  .portlet-users-admin .instant-messenger .control-group, .portlet-users-admin .social-network .control-group {
+    margin: 0; }
+  .portlet-users-admin .instant-messenger .field, .portlet-users-admin .social-network .field {
+    float: left; }
+.portlet-users-admin .addresses .field {
+  float: none;
+  width: auto; }
+.portlet-users-admin .permission-scopes {
+  margin-right: 10px; }
+  .portlet-users-admin .permission-scopes.empty {
+    display: none; }
+.portlet-users-admin .permission-group {
+  margin: 10px 0 0 10px; }
+.portlet-users-admin .lfr-permission-navigation-container .search {
+  margin: 20px 0px; }
+.portlet-users-admin .lfr-permission-navigation-container .lfr-permission-navigation {
+  overflow: auto;
+  width: 100%; }
+  .portlet-users-admin .lfr-permission-navigation-container .lfr-permission-navigation .permission-navigation-item-header {
+    font-weight: bold; }
+    .portlet-users-admin .lfr-permission-navigation-container .lfr-permission-navigation .permission-navigation-item-header .permission-navigation-item-header-icon {
+      background: url() no-repeat 50%;
+      display: inline-block;
+      height: 10px;
+      width: 9px; }
+  .portlet-users-admin .lfr-permission-navigation-container .lfr-permission-navigation .selected {
+    font-weight: bold; }
+  .portlet-users-admin .lfr-permission-navigation-container .lfr-permission-navigation .toggler-header-collapsed .permission-navigation-item-header-icon {
+    background-image: url(@theme_image_path@/arrows/05_right.png); }
+  .portlet-users-admin .lfr-permission-navigation-container .lfr-permission-navigation .toggler-header-expanded .permission-navigation-item-header-icon {
+    background-image: url(@theme_image_path@/arrows/05_down.png);
+    vertical-align: middle; }
+  .portlet-users-admin .lfr-permission-navigation-container .lfr-permission-navigation .permission-navigation-item-header {
+    cursor: pointer;
+    margin: 0.5em; }
+  .portlet-users-admin .lfr-permission-navigation-container .lfr-permission-navigation .permission-navigation-item-content .permission-navigation-item-container {
+    cursor: pointer;
+    line-height: 1.8em;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap; }
+  .portlet-users-admin .lfr-permission-navigation-container .lfr-permission-navigation .permission-navigation-item-summary {
+    margin: 0.5em 0em 1.5em .5em; }
+  .portlet-users-admin .lfr-permission-navigation-container .lfr-permission-navigation .permission-navigation-section .permission-navigation-section {
+    margin-left: 1em; }
+.portlet-users-admin .view-all-link {
+  color: #666;
+  font-weight: normal;
+  margin-bottom: 15px; }
+.portlet-users-admin .lfr-asset-column-details {
+  margin-top: 1em; }
+.portlet-users-admin .lfr-asset-summary img.avatar {
+  max-width: 210px; }
+
+.lfr-floating-container .field input, .lfr-floating-container .field img {
+  vertical-align: top; }
+
+.ie .portlet-users-admin .permission-scopes {
+  height: 1%; }
+
+.ie6 .portlet-users-admin .organization-information {
+  height: 1%; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/css/main.css
new file mode 100644
index 0000000..9a74cc0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/css/main.css
@@ -0,0 +1,316 @@
+@import "mixins";
+
+.portlet-users-admin {
+	.form {
+		fieldset {
+			border-width: 0;
+			padding: 0;
+		}
+
+		.fieldset {
+			select {
+				width: auto;
+			}
+
+			textarea {
+				width: 90%;
+			}
+
+			.field {
+				&.mailing-ctrl {
+					clear: both;
+
+					span {
+						margin-right: 0.5em;
+					}
+				}
+
+				&.localized-language-selector {
+					margin-bottom: 0;
+				}
+			}
+
+			.email-field, .url-field {
+				width: 200px;
+			}
+		}
+	}
+
+	#header-bottom {
+		background-color: #F6F8FB;
+		height: 34px;
+		margin: 0 0 10px;
+	}
+
+	#header-menu {
+		background-color: #F3F5F5;
+		font-size: 11px;
+		line-height: 34px;
+		margin: 0 0 10px;
+		padding: 0 10px;
+		text-align: right;
+	}
+
+	#header-title {
+		background-color: #C1CABC;
+		font-size: 20px;
+		font-weight: 500;
+		margin: 0 0 10px;
+		padding: 7px 10px;
+	}
+
+	.company-logo {
+		border-width: 0;
+		width: 100px;
+	}
+
+	.email-user-add .password-changed-notification {
+		display: none;
+	}
+
+	.label-holder {
+		font-weight: 700;
+		padding: 15px 0 5px;
+	}
+
+	.org-labor-entry {
+		float: left;
+		margin-right: 2%;
+		width: 12%;
+
+		@include respond-to(phone) {
+			float: none;
+			width: auto;
+		}
+
+		select {
+			width: 100%;
+		}
+
+		> .control-group {
+			margin-bottom: 0;
+		}
+	}
+
+	.organization-details {
+		margin-left: 21px;
+	}
+
+	.organization-information {
+		overflow: hidden;
+	}
+
+	.organization-search {
+		float: right;
+		margin: 0 0 0.5em 0.5em;
+	}
+
+	.password-policy-options {
+		margin-left: 2em;
+	}
+
+	.section {
+		float: left;
+		margin-left: 10px;
+		width: 47%;
+
+		h3 {
+			background: url() no-repeat scroll 2px 50%;
+			border-bottom: 1px solid #CCC;
+			line-height: 1.5;
+			margin-bottom: 0.5em;
+			padding-left: 25px;
+		}
+
+		li {
+			list-style: none;
+			margin: 0;
+			padding-left: 25px;
+		}
+
+		ul {
+			margin: 0;
+		}
+	}
+
+	.entity-addresses {
+		.primary {
+			background-position: 3px 5px;
+		}
+
+		.mailing-name {
+			display: block;
+			font-style: italic;
+		}
+
+		h3 {
+			background-image: url(@theme_image_path@/common/home.png);
+		}
+	}
+
+	.entity-details {
+		clear: both;
+	}
+
+	.entity-comments h3 {
+		background-image: url(@theme_image_path@/common/welcome_message.png);
+	}
+
+	.entity-email-addresses h3 {
+		background-image: url(@theme_image_path@/mail/unread.png);
+	}
+
+	.entity-phones h3 {
+		background-image: url(@theme_image_path@/common/telephone.png);
+	}
+
+	.entity-websites h3 {
+		background-image: url(@theme_image_path@/common/history.png);
+	}
+
+	.radio-holder {
+		line-height: 12px;
+	}
+
+	.form-navigator {
+		.user-info, .organization-info {
+			.user-logo, .organization-logo {
+				margin-right: 5px;
+				width: 35px;
+			}
+		}
+	}
+
+	.membership-restriction-container {
+		margin-top: 1em;
+	}
+
+	.instant-messenger, .social-network {
+		clear: both;
+		margin-bottom: 2em;
+		overflow: hidden;
+
+		img {
+			margin-left: 1em;
+		}
+
+		.control-group {
+			margin: 0;
+		}
+
+		.field {
+			float: left;
+		}
+	}
+
+	.addresses .field {
+		float: none;
+		width: auto;
+	}
+
+	.permission-scopes {
+		margin-right: 10px;
+
+		&.empty {
+			display: none;
+		}
+	}
+
+	.permission-group {
+		margin: 10px 0 0 10px;
+	}
+
+	.lfr-permission-navigation-container {
+		.search {
+			margin: 20px 0px;
+		}
+
+		.lfr-permission-navigation {
+			overflow: auto;
+			width: 100%;
+
+			.permission-navigation-item-header {
+				font-weight: bold;
+
+				.permission-navigation-item-header-icon {
+					background: url() no-repeat 50%;
+					display: inline-block;
+					height: 10px;
+					width: 9px;
+				}
+			}
+
+			.selected {
+				font-weight: bold;
+			}
+
+			.toggler-header-collapsed .permission-navigation-item-header-icon {
+				background-image: url(@theme_image_path@/arrows/05_right.png);
+			}
+
+			.toggler-header-expanded .permission-navigation-item-header-icon {
+				background-image: url(@theme_image_path@/arrows/05_down.png);
+				vertical-align: middle;
+			}
+
+			.permission-navigation-item-header {
+				cursor: pointer;
+				margin: 0.5em;
+			}
+
+			.permission-navigation-item-content .permission-navigation-item-container {
+				cursor: pointer;
+				line-height: 1.8em;
+				overflow: hidden;
+				text-overflow: ellipsis;
+				white-space: nowrap;
+			}
+
+			.permission-navigation-item-summary {
+				margin: 0.5em 0em 1.5em .5em;
+			}
+
+			.permission-navigation-section .permission-navigation-section {
+				margin-left: 1em;
+			}
+		}
+	}
+
+	.view-all-link {
+		color: #666;
+		font-weight: normal;
+		margin-bottom: 15px;
+	}
+
+	.lfr-asset-column-details {
+		margin-top: 1em;
+	}
+
+	.lfr-asset-summary img.avatar {
+		max-width: 210px;
+	}
+}
+
+.lfr-floating-container {
+	.field {
+		input, img {
+			vertical-align: top;
+		}
+	}
+}
+
+.ie {
+	.portlet-users-admin {
+		.permission-scopes {
+			height: 1%;
+		}
+	}
+}
+
+.ie6 {
+	.portlet-users-admin {
+		.organization-information {
+			height: 1%;
+		}
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_organization.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_organization.jsp
new file mode 100644
index 0000000..124623c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_organization.jsp
@@ -0,0 +1,142 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+String backURL = ParamUtil.getString(request, "backURL", redirect);
+
+Organization organization = (Organization)request.getAttribute(WebKeys.ORGANIZATION);
+
+long organizationId = BeanParamUtil.getLong(organization, request, "organizationId");
+
+long parentOrganizationId = ParamUtil.getLong(request, "parentOrganizationSearchContainerPrimaryKeys", (organization != null) ? organization.getParentOrganizationId() : OrganizationConstants.DEFAULT_PARENT_ORGANIZATION_ID);
+String type = BeanParamUtil.getString(organization, request, "type");
+
+String[] mainSections = PropsValues.ORGANIZATIONS_FORM_ADD_MAIN;
+String[] identificationSections = PropsValues.ORGANIZATIONS_FORM_ADD_IDENTIFICATION;
+String[] miscellaneousSections = PropsValues.ORGANIZATIONS_FORM_ADD_MISCELLANEOUS;
+
+if (organization != null) {
+	mainSections = PropsUtil.getArray(PropsKeys.ORGANIZATIONS_FORM_UPDATE_MAIN, new Filter(organization.getType()));
+	identificationSections = PropsUtil.getArray(PropsKeys.ORGANIZATIONS_FORM_UPDATE_IDENTIFICATION, new Filter(organization.getType()));
+	miscellaneousSections = PropsUtil.getArray(PropsKeys.ORGANIZATIONS_FORM_UPDATE_MISCELLANEOUS, new Filter(organization.getType()));
+}
+
+String[][] categorySections = {mainSections, identificationSections, miscellaneousSections};
+
+if (organization != null) {
+	UsersAdminUtil.addPortletBreadcrumbEntries(organization, request, renderResponse);
+}
+else if (parentOrganizationId > 0) {
+	Organization parentOrganization = OrganizationServiceUtil.getOrganization(parentOrganizationId);
+
+	UsersAdminUtil.addPortletBreadcrumbEntries(parentOrganization, request, renderResponse);
+}
+%>
+
+<aui:nav-bar>
+	<liferay-util:include page="/html/portlet/users_admin/toolbar.jsp">
+		<liferay-util:param name="toolbarItem" value='<%= (organization == null) ? "add" : "view" %>' />
+	</liferay-util:include>
+</aui:nav-bar>
+
+<div id="breadcrumb">
+	<liferay-ui:breadcrumb showCurrentGroup="<%= false %>" showCurrentPortlet="<%= false %>" showGuestGroup="<%= false %>" showLayout="<%= false %>" showPortletBreadcrumb="<%= true %>" />
+</div>
+
+<%
+String headerTitle = null;
+
+if (organization != null) {
+	headerTitle = LanguageUtil.format(pageContext, "edit-x", organization.getName());
+}
+else if (Validator.isNotNull(type)) {
+	headerTitle = LanguageUtil.format(pageContext, "add-x", type);
+}
+else {
+	headerTitle = LanguageUtil.get(pageContext, "add-organization");
+}
+%>
+
+<liferay-ui:header
+	backURL="<%= backURL %>"
+	localizeTitle="<%= (organization == null) %>"
+	title="<%= headerTitle %>"
+/>
+
+<portlet:actionURL var="editOrganizationActionURL">
+	<portlet:param name="struts_action" value="/users_admin/edit_organization" />
+</portlet:actionURL>
+
+<portlet:renderURL var="editOrganizationRenderURL">
+	<portlet:param name="struts_action" value="/users_admin/edit_organization" />
+	<portlet:param name="backURL" value="<%= backURL %>" />
+</portlet:renderURL>
+
+<aui:form action="<%= editOrganizationActionURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= (organization == null) ? Constants.ADD : Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= editOrganizationRenderURL %>" />
+	<aui:input name="backURL" type="hidden" value="<%= backURL %>" />
+	<aui:input name="organizationId" type="hidden" value="<%= organizationId %>" />
+
+	<%
+	request.setAttribute("addresses.className", Organization.class.getName());
+	request.setAttribute("addresses.classPK", organizationId);
+	request.setAttribute("emailAddresses.className", Organization.class.getName());
+	request.setAttribute("emailAddresses.classPK", organizationId);
+	request.setAttribute("phones.className", Organization.class.getName());
+	request.setAttribute("phones.classPK", organizationId);
+	request.setAttribute("websites.className", Organization.class.getName());
+	request.setAttribute("websites.classPK", organizationId);
+	%>
+
+	<liferay-util:buffer var="htmlTop">
+		<c:if test="<%= organization != null %>">
+
+			<%
+			long logoId = organization.getLogoId();
+			%>
+
+			<div class="organization-info">
+				<div class="float-container">
+					<img alt="<%= HtmlUtil.escape(organization.getName()) %>" class="organization-logo" src="<%= themeDisplay.getPathImage() %>/organization_logo?img_id=<%= logoId %>&t=<%= WebServerServletTokenUtil.getToken(logoId) %>" />
+
+					<span class="organization-name"><%= HtmlUtil.escape(organization.getName()) %></span>
+				</div>
+			</div>
+		</c:if>
+	</liferay-util:buffer>
+
+	<liferay-ui:form-navigator
+		backURL="<%= backURL %>"
+		categoryNames="<%= _CATEGORY_NAMES %>"
+		categorySections="<%= categorySections %>"
+		htmlTop="<%= htmlTop %>"
+		jspPath="/html/portlet/users_admin/organization/"
+	/>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />createURL(href, value, onclick) {
+		return '<a href="' + href + '"' + (onclick ? ' onclick="' + onclick + '" ' : '') + '>' + value + '</a>';
+	};
+</aui:script>
+
+<%!
+private static final String[] _CATEGORY_NAMES = {"organization-information", "identification", "miscellaneous"};
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_organization_assignments.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_organization_assignments.jsp
new file mode 100644
index 0000000..3d859a1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_organization_assignments.jsp
@@ -0,0 +1,141 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+String tabs1 = ParamUtil.getString(request, "tabs1");
+String tabs2 = ParamUtil.getString(request, "tabs2", "current");
+
+int cur = ParamUtil.getInteger(request, SearchContainer.DEFAULT_CUR_PARAM);
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+Organization organization = (Organization)request.getAttribute(WebKeys.ORGANIZATION);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/users_admin/edit_organization_assignments");
+portletURL.setParameter("tabs1", tabs1);
+portletURL.setParameter("tabs2", tabs2);
+portletURL.setParameter("redirect", redirect);
+portletURL.setParameter("organizationId", String.valueOf(organization.getOrganizationId()));
+
+UsersAdminUtil.addPortletBreadcrumbEntries(organization, request, renderResponse);
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "assign-members"), currentURL);
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	localizeTitle="<%= false %>"
+	title="<%= organization.getName() %>"
+/>
+
+<liferay-ui:membership-policy-error />
+
+<portlet:actionURL var="editAssignmentsURL">
+	<portlet:param name="struts_action" value="/users_admin/edit_organization_assignments" />
+</portlet:actionURL>
+
+<aui:form action="<%= editAssignmentsURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="tabs1" type="hidden" value="<%= tabs1 %>" />
+	<aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="assignmentsRedirect" type="hidden" />
+	<aui:input name="organizationId" type="hidden" value="<%= organization.getOrganizationId() %>" />
+
+	<liferay-ui:tabs
+		names="current,available"
+		param="tabs2"
+		url="<%= portletURL.toString() %>"
+	/>
+
+	<aui:input name="addUserIds" type="hidden" />
+	<aui:input name="removeUserIds" type="hidden" />
+
+	<liferay-ui:search-container
+		rowChecker="<%= new UserOrganizationChecker(renderResponse, organization) %>"
+		searchContainer="<%= new UserSearch(renderRequest, portletURL) %>"
+		var="userSearchContainer"
+	>
+		<liferay-ui:search-form
+			page="/html/portlet/users_admin/user_search.jsp"
+		/>
+
+		<%
+		UserSearchTerms searchTerms = (UserSearchTerms)userSearchContainer.getSearchTerms();
+
+		LinkedHashMap<String, Object> userParams = new LinkedHashMap<String, Object>();
+
+		if (tabs2.equals("current")) {
+			userParams.put("usersOrgs", new Long(organization.getOrganizationId()));
+		}
+		else if (PropsValues.ORGANIZATIONS_ASSIGNMENT_STRICT && !permissionChecker.isCompanyAdmin() && !permissionChecker.hasPermission(scopeGroupId, User.class.getName(), company.getCompanyId(), ActionKeys.VIEW)) {
+			userParams.put("usersOrgsTree", user.getOrganizations(true));
+		}
+		%>
+
+		<liferay-ui:search-container-results>
+			<%@ include file="/html/portlet/users_admin/user_search_results.jspf" %>
+		</liferay-ui:search-container-results>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.model.User"
+			escapedModel="<%= true %>"
+			keyProperty="userId"
+			modelVar="user2"
+			rowIdProperty="screenName"
+		>
+			<liferay-ui:search-container-column-text
+				name="name"
+				property="fullName"
+			/>
+
+			<liferay-ui:search-container-column-text
+				name="screen-name"
+				property="screenName"
+			/>
+		</liferay-ui:search-container-row>
+
+		<div class="separator"><!-- --></div>
+
+		<%
+		String taglibOnClick = renderResponse.getNamespace() + "updateOrganizationUsers('" + portletURL.toString() + StringPool.AMPERSAND + renderResponse.getNamespace() + "cur=" + cur + "');";
+		%>
+
+		<aui:button onClick="<%= taglibOnClick %>" value="update-associations" />
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />updateOrganizationUsers',
+		function(assignmentsRedirect) {
+			document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "organization_users";
+			document.<portlet:namespace />fm.<portlet:namespace />assignmentsRedirect.value = assignmentsRedirect;
+			document.<portlet:namespace />fm.<portlet:namespace />addUserIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+			document.<portlet:namespace />fm.<portlet:namespace />removeUserIds.value = Liferay.Util.listUncheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_organization_assignments_user_groups.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_organization_assignments_user_groups.jsp
new file mode 100644
index 0000000..b4f85fd
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_organization_assignments_user_groups.jsp
@@ -0,0 +1,94 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+String tabs3 = (String)request.getAttribute("edit_organization_assignments.jsp-tabs3");
+
+int cur = (Integer)request.getAttribute("edit_organization_assignments.jsp-cur");
+
+Organization organization = (Organization)request.getAttribute("edit_organization_assignments.jsp-organization");
+
+Group group = organization.getGroup();
+
+PortletURL portletURL = (PortletURL)request.getAttribute("edit_organization_assignments.jsp-portletURL");
+%>
+
+<aui:input name="addUserGroupIds" type="hidden" />
+<aui:input name="removeUserGroupIds" type="hidden" />
+
+<liferay-ui:tabs
+	names="current,available"
+	param="tabs3"
+	url="<%= portletURL.toString() %>"
+/>
+
+<liferay-ui:search-container
+	rowChecker="<%= new UserGroupGroupChecker(renderResponse, group) %>"
+	searchContainer="<%= new UserGroupSearch(renderRequest, portletURL) %>"
+>
+	<liferay-ui:search-form
+		page="/html/portlet/user_groups_admin/user_group_search.jsp"
+	/>
+
+	<%
+	UserGroupDisplayTerms searchTerms = (UserGroupDisplayTerms)searchContainer.getSearchTerms();
+
+	LinkedHashMap<String, Object> userGroupParams = new LinkedHashMap<String, Object>();
+
+	if (tabs3.equals("current")) {
+		userGroupParams.put("userGroupsGroups", new Long(group.getGroupId()));
+	}
+
+	total = UserGroupLocalServiceUtil.searchCount(company.getCompanyId(), searchTerms.getKeywords(), userGroupParams);
+
+	searchContainer.setTotal(total);
+	%>
+
+	<liferay-ui:search-container-results
+		results="<%= UserGroupLocalServiceUtil.search(company.getCompanyId(), searchTerms.getKeywords(), userGroupParams, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator()) %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.UserGroup"
+		escapedModel="<%= true %>"
+		keyProperty="userGroupId"
+		modelVar="userGroup"
+	>
+		<liferay-ui:search-container-column-text
+			name="name"
+			orderable="<%= true %>"
+			property="name"
+		/>
+
+		<liferay-ui:search-container-column-text
+			name="description"
+			orderable="<%= true %>"
+			property="description"
+		/>
+	</liferay-ui:search-container-row>
+
+	<div class="separator"><!-- --></div>
+
+	<%
+	String taglibOnClick = renderResponse.getNamespace() + "updateOrganizationUserGroups('" + portletURL.toString() + StringPool.AMPERSAND + renderResponse.getNamespace() + "cur=" + cur + "');";
+	%>
+
+	<aui:button onClick="<%= taglibOnClick %>" value="update-associations" />
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_organization_logo.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_organization_logo.jsp
new file mode 100644
index 0000000..f15eb03
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_organization_logo.jsp
@@ -0,0 +1,79 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+long groupId = ParamUtil.getLong(request, "groupId");
+long publicLayoutSetId = ParamUtil.getLong(request, "publicLayoutSetId");
+
+String logoURL = StringPool.BLANK;
+
+if (publicLayoutSetId != 0) {
+	LayoutSet publicLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(publicLayoutSetId);
+
+	logoURL = themeDisplay.getPathImage() + "/organization_logo?img_id=" + publicLayoutSet.getLogoId() + "&t=" + WebServerServletTokenUtil.getToken(publicLayoutSet.getLogoId());
+}
+%>
+
+<c:choose>
+	<c:when test='<%= SessionMessages.contains(renderRequest, "requestProcessed") %>'>
+		<aui:script>
+			Liferay.Util.getOpener().<portlet:namespace />changeLogo('<%= logoURL %>');
+
+			Liferay.Util.getWindow().hide();
+		</aui:script>
+	</c:when>
+	<c:otherwise>
+		<portlet:actionURL var="editOrganizationLogoURL">
+			<portlet:param name="struts_action" value="/users_admin/edit_organization_logo" />
+		</portlet:actionURL>
+
+		<aui:form action="<%= editOrganizationLogoURL %>" enctype="multipart/form-data" method="post" name="fm">
+			<aui:input name="groupId" type="hidden" value="<%= groupId %>" />
+			<aui:input name="publicLayoutSetId" type="hidden" value="<%= publicLayoutSetId %>" />
+			<aui:input name="cropRegion" type="hidden" />
+
+			<liferay-ui:error exception="<%= NoSuchFileException.class %>" message="an-unexpected-error-occurred-while-uploading-your-file" />
+			<liferay-ui:error exception="<%= UploadException.class %>" message="an-unexpected-error-occurred-while-uploading-your-file" />
+
+			<aui:fieldset cssClass="lfr-portrait-editor">
+				<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" label="upload-a-logo-for-the-organization-pages-that-will-be-used-instead-of-the-default-enterprise-logo-in-both-public-and-private-pages" name="fileName" size="50" type="file" />
+
+				<div class="lfr-change-logo lfr-portrait-preview" id="<portlet:namespace />portraitPreview">
+					<img class="lfr-portrait-preview-img" id="<portlet:namespace />portraitPreviewImg" src="<%= HtmlUtil.escape(logoURL) %>" />
+				</div>
+
+				<aui:button-row>
+					<aui:button name="submitButton" type="submit" />
+
+					<aui:button onClick="window.close();" type="cancel" value="close" />
+				</aui:button-row>
+			</aui:fieldset>
+		</aui:form>
+
+		<aui:script use="liferay-logo-editor">
+			new Liferay.LogoEditor(
+				{
+					maxFileSize: '<%= PrefsPropsUtil.getLong(PropsKeys.UPLOAD_SERVLET_REQUEST_IMPL_MAX_SIZE) / 1024 %>',
+					namespace: '<portlet:namespace />',
+					previewURL: '<portlet:resourceURL><portlet:param name="struts_action" value="/users_admin/edit_organization_logo" /><portlet:param name="<%= Constants.CMD %>" value="<%= Constants.GET_TEMP %>" /><portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" /></portlet:resourceURL>',
+					uploadURL: '<portlet:actionURL><portlet:param name="struts_action" value="/users_admin/edit_organization_logo" /><portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ADD_TEMP %>" /><portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" /></portlet:actionURL>'
+				}
+			);
+		</aui:script>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_role_assignments_organizations.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_role_assignments_organizations.jsp
new file mode 100644
index 0000000..843b683
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_role_assignments_organizations.jsp
@@ -0,0 +1,127 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+String tabs3 = (String)request.getAttribute("edit_role_assignments.jsp-tabs3");
+
+int cur = (Integer)request.getAttribute("edit_role_assignments.jsp-cur");
+
+Role role = (Role)request.getAttribute("edit_role_assignments.jsp-role");
+
+PortletURL portletURL = (PortletURL)request.getAttribute("edit_role_assignments.jsp-portletURL");
+%>
+
+<aui:input name="addGroupIds" type="hidden" />
+<aui:input name="removeGroupIds" type="hidden" />
+
+<liferay-ui:tabs
+	names="current,available"
+	param="tabs3"
+	url="<%= portletURL.toString() %>"
+/>
+
+<liferay-ui:search-container
+	rowChecker="<%= new OrganizationRoleChecker(renderResponse, role) %>"
+	searchContainer="<%= new OrganizationSearch(renderRequest, portletURL) %>"
+	var="organizationSearchContainer"
+>
+	<liferay-ui:search-form
+		page="/html/portlet/users_admin/organization_search.jsp"
+	/>
+
+	<%
+	OrganizationSearchTerms searchTerms = (OrganizationSearchTerms)organizationSearchContainer.getSearchTerms();
+
+	long parentOrganizationId = OrganizationConstants.ANY_PARENT_ORGANIZATION_ID;
+
+	LinkedHashMap<String, Object> organizationParams = new LinkedHashMap<String, Object>();
+
+	if (tabs3.equals("current")) {
+		organizationParams.put("organizationsRoles", new Long(role.getRoleId()));
+	}
+	%>
+
+	<liferay-ui:search-container-results>
+		<%@ include file="/html/portlet/users_admin/organization_search_results.jspf" %>
+	</liferay-ui:search-container-results>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.Organization"
+		escapedModel="<%= true %>"
+		keyProperty="group.groupId"
+		modelVar="organization"
+	>
+		<liferay-ui:search-container-column-text
+			name="name"
+			orderable="<%= true %>"
+			property="name"
+		/>
+
+		<liferay-ui:search-container-column-text
+			buffer="buffer"
+			name="parent-organization"
+		>
+
+			<%
+			if (organization.getParentOrganizationId() > 0) {
+				try {
+					Organization parentOrganization = OrganizationLocalServiceUtil.getOrganization(organization.getParentOrganizationId());
+
+					buffer.append(HtmlUtil.escape(parentOrganization.getName()));
+				}
+				catch (Exception e) {
+				}
+			}
+			%>
+
+		</liferay-ui:search-container-column-text>
+
+		<liferay-ui:search-container-column-text
+			name="type"
+			orderable="<%= true %>"
+			value="<%= LanguageUtil.get(pageContext, organization.getType()) %>"
+		/>
+
+		<liferay-ui:search-container-column-text
+			name="city"
+			value="<%= HtmlUtil.escape(organization.getAddress().getCity()) %>"
+		/>
+
+		<liferay-ui:search-container-column-text
+			name="region"
+		>
+			<liferay-ui:write bean="<%= organization %>" property="region" />
+		</liferay-ui:search-container-column-text>
+
+		<liferay-ui:search-container-column-text
+			name="country"
+		>
+			<liferay-ui:write bean="<%= organization %>" property="country" />
+		</liferay-ui:search-container-column-text>
+	</liferay-ui:search-container-row>
+
+	<div class="separator"><!-- --></div>
+
+	<%
+	String taglibOnClick = renderResponse.getNamespace() + "updateRoleGroups('" + portletURL.toString() + StringPool.AMPERSAND + renderResponse.getNamespace() + "cur=" + cur + "');";
+	%>
+
+	<aui:button onClick="<%= taglibOnClick %>" value="update-associations" />
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_role_assignments_user_groups.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_role_assignments_user_groups.jsp
new file mode 100644
index 0000000..73011ea
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_role_assignments_user_groups.jsp
@@ -0,0 +1,92 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+String tabs3 = (String)request.getAttribute("edit_role_assignments.jsp-tabs3");
+
+int cur = (Integer)request.getAttribute("edit_role_assignments.jsp-cur");
+
+Role role = (Role)request.getAttribute("edit_role_assignments.jsp-role");
+
+PortletURL portletURL = (PortletURL)request.getAttribute("edit_role_assignments.jsp-portletURL");
+%>
+
+<aui:input name="addGroupIds" type="hidden" />
+<aui:input name="removeGroupIds" type="hidden" />
+
+<liferay-ui:tabs
+	names="current,available"
+	param="tabs3"
+	url="<%= portletURL.toString() %>"
+/>
+
+<liferay-ui:search-container
+	rowChecker="<%= new UserGroupRoleChecker(renderResponse, role) %>"
+	searchContainer="<%= new UserGroupSearch(renderRequest, portletURL) %>"
+>
+	<liferay-ui:search-form
+		page="/html/portlet/user_groups_admin/user_group_search.jsp"
+	/>
+
+	<%
+	UserGroupDisplayTerms searchTerms = (UserGroupDisplayTerms)searchContainer.getSearchTerms();
+
+	LinkedHashMap<String, Object> userGroupParams = new LinkedHashMap<String, Object>();
+
+	if (tabs3.equals("current")) {
+		userGroupParams.put("userGroupsRoles", new Long(role.getRoleId()));
+	}
+
+	total = UserGroupLocalServiceUtil.searchCount(company.getCompanyId(), searchTerms.getKeywords(), userGroupParams);
+
+	searchContainer.setTotal(total);
+	%>
+
+	<liferay-ui:search-container-results
+		results="<%= UserGroupLocalServiceUtil.search(company.getCompanyId(), searchTerms.getKeywords(), userGroupParams, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator()) %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.UserGroup"
+		escapedModel="<%= true %>"
+		keyProperty="group.groupId"
+		modelVar="userGroup"
+	>
+		<liferay-ui:search-container-column-text
+			name="name"
+			orderable="<%= true %>"
+			property="name"
+		/>
+
+		<liferay-ui:search-container-column-text
+			name="description"
+			orderable="<%= true %>"
+			property="description"
+		/>
+	</liferay-ui:search-container-row>
+
+	<div class="separator"><!-- --></div>
+
+	<%
+	String taglibOnClick = renderResponse.getNamespace() + "updateRoleGroups('" + portletURL.toString() + StringPool.AMPERSAND + renderResponse.getNamespace() + "cur=" + cur + "');";
+	%>
+
+	<aui:button onClick="<%= taglibOnClick %>" value="update-associations" />
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_role_assignments_users.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_role_assignments_users.jsp
new file mode 100644
index 0000000..3199b5e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_role_assignments_users.jsp
@@ -0,0 +1,90 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+String tabs3 = (String)request.getAttribute("edit_role_assignments.jsp-tabs3");
+
+int cur = (Integer)request.getAttribute("edit_role_assignments.jsp-cur");
+
+Role role = (Role)request.getAttribute("edit_role_assignments.jsp-role");
+
+PortletURL portletURL = (PortletURL)request.getAttribute("edit_role_assignments.jsp-portletURL");
+%>
+
+<aui:input name="addUserIds" type="hidden" />
+<aui:input name="removeUserIds" type="hidden" />
+
+<liferay-ui:tabs
+	names="current,available"
+	param="tabs3"
+	url="<%= portletURL.toString() %>"
+/>
+
+<liferay-ui:membership-policy-error />
+
+<liferay-ui:search-container
+	rowChecker="<%= new UserRoleChecker(renderResponse, role) %>"
+	searchContainer="<%= new UserSearch(renderRequest, portletURL) %>"
+	var="userSearchContainer"
+>
+	<liferay-ui:search-form
+		page="/html/portlet/users_admin/user_search.jsp"
+	/>
+
+	<%
+	UserSearchTerms searchTerms = (UserSearchTerms)userSearchContainer.getSearchTerms();
+
+	LinkedHashMap<String, Object> userParams = new LinkedHashMap<String, Object>();
+
+	if (tabs3.equals("current")) {
+		userParams.put("usersRoles", new Long(role.getRoleId()));
+	}
+	%>
+
+	<liferay-ui:search-container-results>
+		<%@ include file="/html/portlet/users_admin/user_search_results.jspf" %>
+	</liferay-ui:search-container-results>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.User"
+		escapedModel="<%= true %>"
+		keyProperty="userId"
+		modelVar="user2"
+		rowIdProperty="screenName"
+	>
+		<liferay-ui:search-container-column-text
+			name="name"
+			property="fullName"
+		/>
+
+		<liferay-ui:search-container-column-text
+			name="screen-name"
+			property="screenName"
+		/>
+	</liferay-ui:search-container-row>
+
+	<div class="separator"><!-- --></div>
+
+	<%
+	String taglibOnClick = renderResponse.getNamespace() + "updateRoleUsers('" + portletURL.toString() + StringPool.AMPERSAND + renderResponse.getNamespace() + "cur=" + cur + "');";
+	%>
+
+	<aui:button onClick="<%= taglibOnClick %>" value="update-associations" />
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_user.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_user.jsp
new file mode 100644
index 0000000..beb0968
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_user.jsp
@@ -0,0 +1,295 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+String backURL = ParamUtil.getString(request, "backURL", redirect);
+
+User selUser = PortalUtil.getSelectedUser(request);
+
+Contact selContact = null;
+
+if (selUser != null) {
+	selContact = selUser.getContact();
+}
+
+PasswordPolicy passwordPolicy = null;
+
+if (selUser == null) {
+	passwordPolicy = PasswordPolicyLocalServiceUtil.getDefaultPasswordPolicy(company.getCompanyId());
+}
+else {
+	passwordPolicy = selUser.getPasswordPolicy();
+}
+
+String groupIds = ParamUtil.getString(request, "groupsSearchContainerPrimaryKeys");
+
+List<Group> groups = Collections.emptyList();
+
+if (Validator.isNotNull(groupIds)) {
+	long[] groupIdsArray = StringUtil.split(groupIds, 0L);
+
+	groups = GroupLocalServiceUtil.getGroups(groupIdsArray);
+}
+else if (selUser != null) {
+	groups = selUser.getGroups();
+
+	if (filterManageableGroups) {
+		groups = UsersAdminUtil.filterGroups(permissionChecker, groups);
+	}
+}
+
+String organizationIds = ParamUtil.getString(request, "organizationsSearchContainerPrimaryKeys");
+
+List<Organization> organizations = Collections.emptyList();
+
+if (Validator.isNotNull(organizationIds)) {
+	long[] organizationIdsArray = StringUtil.split(organizationIds, 0L);
+
+	organizations = OrganizationLocalServiceUtil.getOrganizations(organizationIdsArray);
+}
+else {
+	if (selUser != null) {
+		organizations = selUser.getOrganizations();
+	}
+
+	if (filterManageableOrganizations) {
+		organizations = UsersAdminUtil.filterOrganizations(permissionChecker, organizations);
+	}
+}
+
+String roleIds = ParamUtil.getString(request, "rolesSearchContainerPrimaryKeys");
+
+List<Role> roles = Collections.emptyList();
+
+if (Validator.isNotNull(roleIds)) {
+	long[] roleIdsArray = StringUtil.split(roleIds, 0L);
+
+	roles = RoleLocalServiceUtil.getRoles(roleIdsArray);
+}
+else if (selUser != null) {
+	roles = selUser.getRoles();
+
+	if (filterManageableRoles) {
+		roles = UsersAdminUtil.filterRoles(permissionChecker, roles);
+	}
+}
+
+List<UserGroupRole> organizationRoles = new ArrayList<UserGroupRole>();
+List<UserGroupRole> siteRoles = new ArrayList<UserGroupRole>();
+
+List<UserGroupRole> userGroupRoles = UsersAdminUtil.getUserGroupRoles(renderRequest);
+
+if (userGroupRoles.isEmpty() && (selUser != null)) {
+	userGroupRoles = UserGroupRoleLocalServiceUtil.getUserGroupRoles(selUser.getUserId());
+
+	if (filterManageableUserGroupRoles) {
+		userGroupRoles = UsersAdminUtil.filterUserGroupRoles(permissionChecker, userGroupRoles);
+	}
+}
+
+for (UserGroupRole userGroupRole : userGroupRoles) {
+	int roleType = userGroupRole.getRole().getType();
+
+	if (roleType == RoleConstants.TYPE_ORGANIZATION) {
+		organizationRoles.add(userGroupRole);
+	}
+	else if (roleType == RoleConstants.TYPE_SITE) {
+		siteRoles.add(userGroupRole);
+	}
+}
+
+String userGroupIds = ParamUtil.getString(request, "userGroupsSearchContainerPrimaryKeys");
+
+List<UserGroup> userGroups = Collections.emptyList();
+
+if (Validator.isNotNull(userGroupIds)) {
+	long[] userGroupIdsArray = StringUtil.split(userGroupIds, 0L);
+
+	userGroups = UserGroupLocalServiceUtil.getUserGroups(userGroupIdsArray);
+}
+else if (selUser != null) {
+	userGroups = selUser.getUserGroups();
+
+	if (filterManageableUserGroups) {
+		userGroups = UsersAdminUtil.filterUserGroups(permissionChecker, userGroups);
+	}
+}
+
+List<Group> allGroups = new ArrayList<Group>();
+
+allGroups.addAll(groups);
+allGroups.addAll(GroupLocalServiceUtil.getOrganizationsGroups(organizations));
+allGroups.addAll(GroupLocalServiceUtil.getOrganizationsRelatedGroups(organizations));
+allGroups.addAll(GroupLocalServiceUtil.getUserGroupsGroups(userGroups));
+allGroups.addAll(GroupLocalServiceUtil.getUserGroupsRelatedGroups(userGroups));
+
+String[] mainSections = PropsValues.USERS_FORM_ADD_MAIN;
+String[] identificationSections = PropsValues.USERS_FORM_ADD_IDENTIFICATION;
+String[] miscellaneousSections = PropsValues.USERS_FORM_ADD_MISCELLANEOUS;
+
+if (selUser != null) {
+	if (portletName.equals(PortletKeys.MY_ACCOUNT)) {
+		mainSections = PropsValues.USERS_FORM_MY_ACCOUNT_MAIN;
+		identificationSections = PropsValues.USERS_FORM_MY_ACCOUNT_IDENTIFICATION;
+		miscellaneousSections = PropsValues.USERS_FORM_MY_ACCOUNT_MISCELLANEOUS;
+	}
+	else {
+		mainSections = PropsValues.USERS_FORM_UPDATE_MAIN;
+		identificationSections = PropsValues.USERS_FORM_UPDATE_IDENTIFICATION;
+		miscellaneousSections = PropsValues.USERS_FORM_UPDATE_MISCELLANEOUS;
+	}
+}
+
+String[][] categorySections = {mainSections, identificationSections, miscellaneousSections};
+
+if (organizations.size() == 1) {
+	UsersAdminUtil.addPortletBreadcrumbEntries(organizations.get(0), request, renderResponse);
+}
+
+if (selUser != null) {
+	if (!portletName.equals(PortletKeys.MY_ACCOUNT)) {
+		PortalUtil.addPortletBreadcrumbEntry(request, selUser.getFullName(), null);
+	}
+}
+%>
+
+<liferay-ui:error exception="<%= CompanyMaxUsersException.class %>" message="unable-to-create-user-account-because-the-maximum-number-of-users-has-been-reached" />
+
+<c:if test="<%= !portletName.equals(PortletKeys.MY_ACCOUNT) %>">
+	<aui:nav-bar>
+		<liferay-util:include page="/html/portlet/users_admin/toolbar.jsp">
+			<liferay-util:param name="toolbarItem" value='<%= (selUser == null) ? "add" : "view" %>' />
+		</liferay-util:include>
+	</aui:nav-bar>
+
+	<div id="breadcrumb">
+		<liferay-ui:breadcrumb showCurrentGroup="<%= false %>" showCurrentPortlet="<%= false %>" showGuestGroup="<%= false %>" showLayout="<%= false %>" showPortletBreadcrumb="<%= true %>" />
+	</div>
+
+	<liferay-ui:header
+		backURL="<%= backURL %>"
+		escapeXml="<%= false %>"
+		localizeTitle="<%= (selUser == null) %>"
+		title='<%= (selUser == null) ? "add-user" : LanguageUtil.format(pageContext, "edit-user-x", HtmlUtil.escape(selUser.getFullName())) %>'
+	/>
+</c:if>
+
+<portlet:actionURL var="editUserActionURL">
+	<portlet:param name="struts_action" value="/users_admin/edit_user" />
+</portlet:actionURL>
+
+<portlet:renderURL var="editUserRenderURL">
+	<portlet:param name="struts_action" value="/users_admin/edit_user" />
+	<portlet:param name="backURL" value="<%= backURL %>" />
+</portlet:renderURL>
+
+<aui:form action="<%= editUserActionURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= (selUser == null) ? Constants.ADD : Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= editUserRenderURL %>" />
+	<aui:input name="backURL" type="hidden" value="<%= backURL %>" />
+	<aui:input name="p_u_i_d" type="hidden" value="<%= (selUser != null) ? selUser.getUserId() : 0 %>" />
+
+	<%
+	request.setAttribute("user.selUser", selUser);
+	request.setAttribute("user.selContact", selContact);
+	request.setAttribute("user.passwordPolicy", passwordPolicy);
+	request.setAttribute("user.groups", groups);
+	request.setAttribute("user.organizations", organizations);
+	request.setAttribute("user.roles", roles);
+	request.setAttribute("user.organizationRoles", organizationRoles);
+	request.setAttribute("user.siteRoles", siteRoles);
+	request.setAttribute("user.userGroups", userGroups);
+	request.setAttribute("user.allGroups", allGroups);
+
+	request.setAttribute("addresses.className", Contact.class.getName());
+	request.setAttribute("emailAddresses.className", Contact.class.getName());
+	request.setAttribute("phones.className", Contact.class.getName());
+	request.setAttribute("websites.className", Contact.class.getName());
+
+	if (selContact != null) {
+		request.setAttribute("addresses.classPK", selContact.getContactId());
+		request.setAttribute("emailAddresses.classPK", selContact.getContactId());
+		request.setAttribute("phones.classPK", selContact.getContactId());
+		request.setAttribute("websites.classPK", selContact.getContactId());
+	}
+	else {
+		request.setAttribute("addresses.classPK", 0L);
+		request.setAttribute("emailAddresses.classPK", 0L);
+		request.setAttribute("phones.classPK", 0L);
+		request.setAttribute("websites.classPK", 0L);
+	}
+	%>
+
+	<liferay-util:buffer var="htmlTop">
+		<c:if test="<%= selUser != null %>">
+			<div class="user-info">
+				<div class="float-container">
+					<img alt="<%= HtmlUtil.escape(selUser.getFullName()) %>" class="user-logo" src="<%= selUser.getPortraitURL(themeDisplay) %>" />
+
+					<span class="user-name"><%= HtmlUtil.escape(selUser.getFullName()) %></span>
+				</div>
+			</div>
+		</c:if>
+	</liferay-util:buffer>
+
+	<liferay-util:buffer var="htmlBottom">
+		<c:if test="<%= (selUser != null) && (passwordPolicy != null) && selUser.getLockout() %>">
+			<aui:button-row>
+				<div class="alert alert-block"><liferay-ui:message key="this-user-account-has-been-locked-due-to-excessive-failed-login-attempts" /></div>
+
+				<%
+				String taglibOnClick = renderResponse.getNamespace() + "saveUser('unlock');";
+				%>
+
+				<aui:button onClick="<%= taglibOnClick %>" value="unlock" />
+			</aui:button-row>
+		</c:if>
+	</liferay-util:buffer>
+
+	<liferay-ui:form-navigator
+		backURL="<%= backURL %>"
+		categoryNames="<%= _CATEGORY_NAMES %>"
+		categorySections="<%= categorySections %>"
+		htmlBottom="<%= htmlBottom %>"
+		htmlTop="<%= htmlTop %>"
+		jspPath="/html/portlet/users_admin/user/"
+	/>
+</aui:form>
+
+<%
+if (selUser != null) {
+	PortalUtil.setPageSubtitle(selUser.getFullName(), request);
+}
+%>
+
+<aui:script>
+	function <portlet:namespace />createURL(href, value, onclick) {
+		return '<a href="' + href + '"' + (onclick ? ' onclick="' + onclick + '" ' : '') + '>' + value + '</a>';
+	};
+
+	function <portlet:namespace />saveUser(cmd) {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = cmd;
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
+
+<%!
+private static final String[] _CATEGORY_NAMES = {"user-information", "identification", "miscellaneous"};
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_user_portrait.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_user_portrait.jsp
new file mode 100644
index 0000000..0d324c3
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/edit_user_portrait.jsp
@@ -0,0 +1,89 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+User selUser = PortalUtil.getSelectedUser(request);
+
+long maxFileSize = PrefsPropsUtil.getLong(PropsKeys.UPLOAD_SERVLET_REQUEST_IMPL_MAX_SIZE) / 1024;
+%>
+
+<c:choose>
+	<c:when test='<%= SessionMessages.contains(renderRequest, "requestProcessed") %>'>
+		<aui:script>
+			Liferay.Util.getOpener().<portlet:namespace />changeLogo('<%= selUser.getPortraitURL(themeDisplay) %>');
+
+			Liferay.Util.getWindow().hide();
+		</aui:script>
+	</c:when>
+	<c:when test='<%= !UsersAdminUtil.hasUpdateFieldPermission(selUser, "portrait") %>'>
+		<img src="<%= selUser.getPortraitURL(themeDisplay) %>" />
+	</c:when>
+	<c:otherwise>
+		<portlet:actionURL var="editUserPortraitURL">
+			<portlet:param name="struts_action" value="/users_admin/edit_user_portrait" />
+		</portlet:actionURL>
+
+		<aui:form action="<%= editUserPortraitURL %>" enctype="multipart/form-data" method="post" name="fm">
+			<aui:input name="p_u_i_d" type="hidden" value="<%= selUser.getUserId() %>" />
+			<aui:input name="cropRegion" type="hidden" />
+
+			<liferay-ui:error exception="<%= NoSuchFileException.class %>" message="an-unexpected-error-occurred-while-uploading-your-file" />
+			<liferay-ui:error exception="<%= UploadException.class %>" message="an-unexpected-error-occurred-while-uploading-your-file" />
+
+			<liferay-ui:error exception="<%= UserPortraitSizeException.class %>">
+
+				<liferay-ui:message arguments="<%= PrefsPropsUtil.getLong(PropsKeys.USERS_IMAGE_MAX_SIZE) / 1024 %>" key="please-enter-a-file-with-a-valid-file-size-no-larger-than-x" />
+			</liferay-ui:error>
+
+			<aui:fieldset cssClass="lfr-portrait-editor">
+				<aui:input autoFocus="<= windowState.equals(WindowState.MAXIMIZED) %>" label='<%= LanguageUtil.format(pageContext, "upload-images-no-larger-than-x-k", maxFileSize, false) %>' name="fileName" size="50" type="file" />
+
+				<div class="lfr-change-logo lfr-portrait-preview" id="<portlet:namespace />portraitPreview">
+					<img class="lfr-portrait-preview-img" id="<portlet:namespace />portraitPreviewImg" src="<%= HtmlUtil.escape(selUser.getPortraitURL(themeDisplay)) %>" />
+				</div>
+
+				<aui:button-row>
+					<aui:button name="submitButton" type="submit" />
+
+					<aui:button onClick="window.close();" type="cancel" value="close" />
+				</aui:button-row>
+			</aui:fieldset>
+		</aui:form>
+
+		<aui:script use="liferay-logo-editor">
+			var logoEditor = new Liferay.LogoEditor(
+				{
+					maxFileSize: '<%= maxFileSize %>',
+					namespace: '<portlet:namespace />',
+					previewURL: '<portlet:resourceURL><portlet:param name="struts_action" value="/users_admin/edit_user_portrait" /><portlet:param name="<%= Constants.CMD %>" value="<%= Constants.GET_TEMP %>" /><portlet:param name="p_u_i_d" value="<%= String.valueOf(selUser.getUserId()) %>" /></portlet:resourceURL>',
+					uploadURL: '<portlet:actionURL><portlet:param name="struts_action" value="/users_admin/edit_user_portrait" /><portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ADD_TEMP %>" /><portlet:param name="p_u_i_d" value="<%= String.valueOf(selUser.getUserId()) %>" /></portlet:actionURL>'
+				}
+			);
+
+			if (Liferay.Util.getTop() !== A.config.win) {
+				var dialog = Liferay.Util.getWindow();
+
+				if (dialog) {
+					dialog.on('resize:end', logoEditor.resize, logoEditor);
+					dialog.on('resize:resize', logoEditor.resize, logoEditor);
+					dialog.on('resize:start', logoEditor.resize, logoEditor);
+				}
+			}
+		</aui:script>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/error.jsp
new file mode 100644
index 0000000..69d2dde
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/error.jsp
@@ -0,0 +1,27 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= NoSuchOrganizationException.class %>" message="the-organization-could-not-be-found" />
+<liferay-ui:error exception="<%= NoSuchRoleException.class %>" message="the-role-could-not-be-found" />
+<liferay-ui:error exception="<%= NoSuchUserException.class %>" message="the-user-could-not-be-found" />
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/group_search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/group_search.jsp
new file mode 100644
index 0000000..f6bd948
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/group_search.jsp
@@ -0,0 +1,36 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+GroupSearch searchContainer = (GroupSearch)request.getAttribute("liferay-ui:search:searchContainer");
+
+GroupDisplayTerms displayTerms = (GroupDisplayTerms)searchContainer.getDisplayTerms();
+%>
+
+<liferay-ui:search-toggle
+	autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>"
+	buttonLabel="search"
+	displayTerms="<%= displayTerms %>"
+	id="toggle_id_users_admin_group_search"
+>
+	<aui:fieldset>
+		<aui:input name="<%= displayTerms.NAME %>" size="30" value="<%= displayTerms.getName() %>" />
+
+		<aui:input name="<%= displayTerms.DESCRIPTION %>" size="30" value="<%= displayTerms.getDescription() %>" />
+	</aui:fieldset>
+</liferay-ui:search-toggle>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/group_search_results.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/group_search_results.jspf
new file mode 100644
index 0000000..3120cb8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/group_search_results.jspf
@@ -0,0 +1,34 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+if (searchTerms.isAdvancedSearch()) {
+	total = GroupLocalServiceUtil.searchCount(company.getCompanyId(), searchTerms.getName(), searchTerms.getDescription(), groupParams, searchTerms.isAndOperator());
+
+	searchContainer.setTotal(total);
+
+	results = GroupLocalServiceUtil.search(company.getCompanyId(), searchTerms.getName(), searchTerms.getDescription(), groupParams, searchTerms.isAndOperator(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+}
+else {
+	total = GroupLocalServiceUtil.searchCount(company.getCompanyId(), searchTerms.getKeywords(), groupParams);
+
+	searchContainer.setTotal(total);
+
+	results = GroupLocalServiceUtil.search(company.getCompanyId(), searchTerms.getKeywords(), groupParams, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+}
+
+searchContainer.setResults(results);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/init.jsp
new file mode 100644
index 0000000..a1066bc
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/init.jsp
@@ -0,0 +1,109 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.AddressCityException" %><%@
+page import="com.liferay.portal.AddressStreetException" %><%@
+page import="com.liferay.portal.AddressZipException" %><%@
+page import="com.liferay.portal.CompanyMaxUsersException" %><%@
+page import="com.liferay.portal.ContactBirthdayException" %><%@
+page import="com.liferay.portal.ContactFirstNameException" %><%@
+page import="com.liferay.portal.ContactFullNameException" %><%@
+page import="com.liferay.portal.ContactLastNameException" %><%@
+page import="com.liferay.portal.DuplicateOpenIdException" %><%@
+page import="com.liferay.portal.DuplicateOrganizationException" %><%@
+page import="com.liferay.portal.DuplicateUserEmailAddressException" %><%@
+page import="com.liferay.portal.DuplicateUserIdException" %><%@
+page import="com.liferay.portal.DuplicateUserScreenNameException" %><%@
+page import="com.liferay.portal.EmailAddressException" %><%@
+page import="com.liferay.portal.GroupFriendlyURLException" %><%@
+page import="com.liferay.portal.NoSuchCountryException" %><%@
+page import="com.liferay.portal.NoSuchListTypeException" %><%@
+page import="com.liferay.portal.NoSuchOrganizationException" %><%@
+page import="com.liferay.portal.NoSuchRegionException" %><%@
+page import="com.liferay.portal.NoSuchUserGroupException" %><%@
+page import="com.liferay.portal.OrganizationNameException" %><%@
+page import="com.liferay.portal.OrganizationParentException" %><%@
+page import="com.liferay.portal.PhoneNumberException" %><%@
+page import="com.liferay.portal.RequiredOrganizationException" %><%@
+page import="com.liferay.portal.RequiredUserException" %><%@
+page import="com.liferay.portal.ReservedUserEmailAddressException" %><%@
+page import="com.liferay.portal.ReservedUserIdException" %><%@
+page import="com.liferay.portal.ReservedUserScreenNameException" %><%@
+page import="com.liferay.portal.UserEmailAddressException" %><%@
+page import="com.liferay.portal.UserFieldException" %><%@
+page import="com.liferay.portal.UserIdException" %><%@
+page import="com.liferay.portal.UserPasswordException" %><%@
+page import="com.liferay.portal.UserPortraitSizeException" %><%@
+page import="com.liferay.portal.UserScreenNameException" %><%@
+page import="com.liferay.portal.UserSmsException" %><%@
+page import="com.liferay.portal.WebsiteURLException" %><%@
+page import="com.liferay.portal.security.membershippolicy.OrganizationMembershipPolicyUtil" %><%@
+page import="com.liferay.portal.security.membershippolicy.RoleMembershipPolicyUtil" %><%@
+page import="com.liferay.portal.security.membershippolicy.SiteMembershipPolicyUtil" %><%@
+page import="com.liferay.portal.security.membershippolicy.UserGroupMembershipPolicyUtil" %><%@
+page import="com.liferay.portal.service.permission.OrganizationPermissionUtil" %><%@
+page import="com.liferay.portal.service.permission.UserPermissionUtil" %><%@
+page import="com.liferay.portlet.announcements.model.AnnouncementsDelivery" %><%@
+page import="com.liferay.portlet.announcements.model.AnnouncementsEntryConstants" %><%@
+page import="com.liferay.portlet.announcements.model.impl.AnnouncementsDeliveryImpl" %><%@
+page import="com.liferay.portlet.announcements.service.AnnouncementsDeliveryLocalServiceUtil" %><%@
+page import="com.liferay.portlet.documentlibrary.NoSuchFileException" %><%@
+page import="com.liferay.portlet.rolesadmin.search.OrganizationRoleChecker" %><%@
+page import="com.liferay.portlet.rolesadmin.search.UserGroupRoleChecker" %><%@
+page import="com.liferay.portlet.rolesadmin.search.UserRoleChecker" %><%@
+page import="com.liferay.portlet.usergroupsadmin.search.UserGroupGroupChecker" %><%@
+page import="com.liferay.portlet.usersadmin.search.GroupDisplayTerms" %><%@
+page import="com.liferay.portlet.usersadmin.search.OrganizationDisplayTerms" %><%@
+page import="com.liferay.portlet.usersadmin.search.UserDisplayTerms" %><%@
+page import="com.liferay.portlet.usersadmin.search.UserOrganizationChecker" %><%@
+page import="com.liferay.portlet.usersadmin.util.UsersAdmin" %>
+
+<%
+boolean showActiveUserSelect = true;
+
+if (!(portletName.equals(PortletKeys.PASSWORD_POLICIES_ADMIN) || portletName.equals(PortletKeys.PORTAL_SETTINGS) || portletName.equals(PortletKeys.ROLES_ADMIN) || portletName.equals(PortletKeys.SITES_ADMIN) || portletName.equals(PortletKeys.USERS_ADMIN))) {
+	showActiveUserSelect = false;
+}
+
+boolean filterManageableGroups = true;
+
+boolean filterManageableOrganizations = true;
+
+if (permissionChecker.hasPermission(0, Organization.class.getName(), company.getCompanyId(), ActionKeys.VIEW)) {
+	filterManageableOrganizations = false;
+}
+
+boolean filterManageableRoles = true;
+boolean filterManageableUserGroupRoles = true;
+boolean filterManageableUserGroups = true;
+
+if (portletName.equals(PortletKeys.MY_ACCOUNT)) {
+	filterManageableGroups = false;
+	filterManageableOrganizations = false;
+	filterManageableRoles = false;
+	filterManageableUserGroupRoles = false;
+	filterManageableUserGroups = false;
+}
+else if (permissionChecker.isCompanyAdmin()) {
+	filterManageableGroups = false;
+	filterManageableOrganizations = false;
+	filterManageableUserGroups = false;
+}
+%>
+
+<%@ include file="/html/portlet/users_admin/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/js/main.js b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/js/main.js
new file mode 100644
index 0000000..d81851f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/js/main.js
@@ -0,0 +1,31 @@
+AUI.add(
+	'liferay-users-admin',
+	function(A) {
+		var Addresses = {
+			getCountries: function(callback) {
+				Liferay.Service(
+					'/country/get-countries',
+					{
+						active: true
+					},
+					callback
+				);
+			},
+
+			getRegions: function(callback, selectKey) {
+				Liferay.Service(
+					'/region/get-regions',
+					{
+						countryId: Number(selectKey),
+						active: true
+					},
+					callback
+				);
+			}
+		};
+
+		Liferay.UsersAdmin = {
+			Addresses: Addresses
+		};
+	}
+);
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/additional_email_addresses.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/additional_email_addresses.jsp
new file mode 100644
index 0000000..38948c2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/additional_email_addresses.jsp
@@ -0,0 +1,17 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/common/additional_email_addresses.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/addresses.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/addresses.jsp
new file mode 100644
index 0000000..c8b08c8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/addresses.jsp
@@ -0,0 +1,17 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/common/addresses.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/categorization.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/categorization.jsp
new file mode 100644
index 0000000..241c748
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/categorization.jsp
@@ -0,0 +1,41 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+Organization organization = (Organization)request.getAttribute(WebKeys.ORGANIZATION);
+%>
+
+<aui:model-context bean="<%= organization %>" model="<%= Organization.class %>" />
+
+<h3><liferay-ui:message key="categories" /></h3>
+
+<aui:fieldset>
+	<aui:input name="categories" type="assetCategories" />
+</aui:fieldset>
+
+<h3><liferay-ui:message key="tags" /></h3>
+
+<aui:fieldset>
+	<aui:input name="tags" type="assetTags" />
+</aui:fieldset>
+
+<aui:script>
+	function <portlet:namespace />getSuggestionsContent() {
+		return document.<portlet:namespace />fm.<portlet:namespace />comments.value;
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/comments.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/comments.jsp
new file mode 100644
index 0000000..10383b0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/comments.jsp
@@ -0,0 +1,29 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+Organization organization = (Organization)request.getAttribute(WebKeys.ORGANIZATION);
+%>
+
+<aui:model-context bean="<%= organization %>" model="<%= Organization.class %>" />
+
+<h3><liferay-ui:message key="comments" /></h3>
+
+<aui:fieldset>
+	<aui:input label="" name="comments" />
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/custom_fields.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/custom_fields.jsp
new file mode 100644
index 0000000..ab12fa8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/custom_fields.jsp
@@ -0,0 +1,32 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+Organization organization = (Organization)request.getAttribute(WebKeys.ORGANIZATION);
+%>
+
+<h3><liferay-ui:message key="custom-fields" /></h3>
+
+<aui:fieldset>
+	<liferay-ui:custom-attribute-list
+		className="<%= Organization.class.getName() %>"
+		classPK="<%= (organization != null) ? organization.getOrganizationId() : 0 %>"
+		editable="<%= true %>"
+		label="<%= true %>"
+	/>
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/details.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/details.jsp
new file mode 100644
index 0000000..fdbdc3e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/details.jsp
@@ -0,0 +1,337 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+Organization organization = (Organization)request.getAttribute(WebKeys.ORGANIZATION);
+
+long parentOrganizationId = ParamUtil.getLong(request, "parentOrganizationSearchContainerPrimaryKeys", (organization != null) ? organization.getParentOrganizationId() : OrganizationConstants.DEFAULT_PARENT_ORGANIZATION_ID);
+
+String parentOrganizationName = ParamUtil.getString(request, "parentOrganizationName");
+
+if (parentOrganizationId <= 0) {
+	parentOrganizationId = OrganizationConstants.DEFAULT_PARENT_ORGANIZATION_ID;
+
+	if (organization != null) {
+		parentOrganizationId = organization.getParentOrganizationId();
+	}
+}
+
+String type = BeanParamUtil.getString(organization, request, "type", PropsValues.ORGANIZATIONS_TYPES[0]);
+long regionId = BeanParamUtil.getLong(organization, request, "regionId");
+long countryId = BeanParamUtil.getLong(organization, request, "countryId");
+
+long groupId = 0;
+
+if (organization != null) {
+	groupId = organization.getGroupId();
+}
+
+User selUser = (User)request.getAttribute("user.selUser");
+%>
+
+<liferay-util:buffer var="removeOrganizationIcon">
+	<liferay-ui:icon
+		image="unlink"
+		label="<%= true %>"
+		message="remove"
+	/>
+</liferay-util:buffer>
+
+<liferay-ui:error-marker key="errorSection" value="details" />
+
+<aui:model-context bean="<%= organization %>" model="<%= Organization.class %>" />
+
+<h3><liferay-ui:message key="details" /></h3>
+
+<div class="row-fluid">
+	<aui:fieldset cssClass="span6">
+		<liferay-ui:error exception="<%= DuplicateOrganizationException.class %>" message="the-organization-name-is-already-taken" />
+		<liferay-ui:error exception="<%= OrganizationNameException.class %>" message="please-enter-a-valid-name" />
+
+		<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" name="name" />
+
+		<c:choose>
+			<c:when test="<%= PropsValues.FIELD_ENABLE_COM_LIFERAY_PORTAL_MODEL_ORGANIZATION_STATUS %>">
+				<liferay-ui:error key="<%= NoSuchListTypeException.class.getName() + Organization.class.getName() + ListTypeConstants.ORGANIZATION_STATUS %>" message="please-select-a-type" />
+
+				<aui:select label="status" listType="<%= ListTypeConstants.ORGANIZATION_STATUS %>" listTypeFieldName="statusId" name="statusId" showEmptyOption="<%= true %>" />
+			</c:when>
+			<c:otherwise>
+				<aui:input name="statusId" type="hidden" value="<%= (organization != null) ? organization.getStatusId() : ListTypeConstants.ORGANIZATION_STATUS_DEFAULT %>" />
+			</c:otherwise>
+		</c:choose>
+
+		<c:choose>
+			<c:when test="<%= organization == null %>">
+				<aui:select name="type">
+
+					<%
+					for (String curType : PropsValues.ORGANIZATIONS_TYPES) {
+					%>
+
+						<aui:option label="<%= curType %>" selected="<%= type.equals(curType) %>" />
+
+					<%
+					}
+					%>
+
+				</aui:select>
+			</c:when>
+			<c:otherwise>
+				<aui:field-wrapper label="type">
+					<liferay-ui:input-resource url="<%= LanguageUtil.get(pageContext, organization.getType()) %>" />
+				</aui:field-wrapper>
+
+				<aui:input name="type" type="hidden" value="<%= organization.getType() %>" />
+			</c:otherwise>
+		</c:choose>
+
+		<liferay-ui:error exception="<%= NoSuchCountryException.class %>" message="please-select-a-country" />
+
+		<div class='<%= GetterUtil.getBoolean(PropsUtil.get(PropsKeys.ORGANIZATIONS_COUNTRY_ENABLED, new Filter(String.valueOf(type)))) ? StringPool.BLANK : "hide" %>' id="<portlet:namespace />countryDiv">
+			<aui:select label="country" name="countryId" />
+
+			<aui:select label="region" name="regionId" />
+		</div>
+
+		<c:if test="<%= organization != null %>">
+			<aui:field-wrapper label="site-id">
+				<liferay-ui:input-resource url="<%= String.valueOf(groupId) %>" />
+			</aui:field-wrapper>
+		</c:if>
+	</aui:fieldset>
+
+	<aui:fieldset cssClass="span6">
+		<div>
+			<c:if test="<%= organization != null %>">
+
+				<%
+				long logoId = 0;
+
+				LayoutSet publicLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(groupId, false);
+				LayoutSet privateLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(groupId, true);
+
+				if (publicLayoutSet.getLogoId() > 0) {
+					logoId = publicLayoutSet.getLogoId();
+				}
+				else if (privateLayoutSet.getLogoId() > 0) {
+					logoId = privateLayoutSet.getLogoId();
+				}
+				%>
+
+				<portlet:renderURL var="editOrganizationLogoURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+					<portlet:param name="struts_action" value="/users_admin/edit_organization_logo" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="groupId" value="<%= String.valueOf(groupId) %>" />
+					<portlet:param name="publicLayoutSetId" value="<%= String.valueOf(publicLayoutSet.getLayoutSetId()) %>" />
+				</portlet:renderURL>
+
+				<liferay-ui:logo-selector
+					defaultLogoURL='<%= themeDisplay.getPathImage() + "/organization_logo?img_id=0" %>'
+					editLogoURL="<%= editOrganizationLogoURL %>"
+					imageId="<%= logoId %>"
+					logoDisplaySelector=".organization-logo"
+				/>
+			</c:if>
+		</div>
+	</aui:fieldset>
+</div>
+
+<%
+Organization parentOrganization = null;
+
+if ((organization == null) && (parentOrganizationId == OrganizationConstants.DEFAULT_PARENT_ORGANIZATION_ID) && !permissionChecker.isCompanyAdmin()) {
+	List<Organization> manageableOrganizations = new ArrayList<Organization>();
+
+	for (Organization curOrganization : user.getOrganizations()) {
+		if (OrganizationPermissionUtil.contains(permissionChecker, curOrganization.getOrganizationId(), ActionKeys.MANAGE_SUBORGANIZATIONS)) {
+			manageableOrganizations.add(curOrganization);
+		}
+	}
+
+	if (manageableOrganizations.size() == 1) {
+		parentOrganizationId = manageableOrganizations.get(0).getOrganizationId();
+	}
+}
+
+if (parentOrganizationId != OrganizationConstants.DEFAULT_PARENT_ORGANIZATION_ID) {
+	try {
+		parentOrganization = OrganizationLocalServiceUtil.getOrganization(parentOrganizationId);
+
+		parentOrganizationName = parentOrganization.getName();
+	}
+	catch (NoSuchOrganizationException nsoe) {
+	}
+}
+
+List<Organization> parentOrganizations = new ArrayList<Organization>();
+
+if (parentOrganization != null) {
+	parentOrganizations.add(parentOrganization);
+}
+%>
+
+<h3><liferay-ui:message key="parent-organization" /></h3>
+
+<liferay-ui:error exception="<%= OrganizationParentException.class %>" message="please-enter-a-valid-parent-organization" />
+
+<liferay-ui:search-container
+	headerNames="name,type,null"
+	id="parentOrganizationSearchContainer"
+>
+	<liferay-ui:search-container-results
+		results="<%= parentOrganizations %>"
+		total="<%= parentOrganizations.size() %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.Organization"
+		escapedModel="<%= true %>"
+		keyProperty="organizationId"
+		modelVar="curOrganization"
+	>
+		<portlet:renderURL var="rowURL">
+			<portlet:param name="struts_action" value="/users_admin/edit_organization" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="organizationId" value="<%= String.valueOf(curOrganization.getOrganizationId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:search-container-column-text
+			href="<%= rowURL %>"
+			name="name"
+			property="name"
+		/>
+
+		<liferay-ui:search-container-column-text
+			href="<%= rowURL %>"
+			name="type"
+			value="<%= LanguageUtil.get(pageContext, curOrganization.getType()) %>"
+		/>
+
+		<liferay-ui:search-container-column-text>
+			<a class="modify-link" data-rowId="<%= curOrganization.getOrganizationId() %>" href="javascript:;"><%= removeOrganizationIcon %></a>
+		</liferay-ui:search-container-column-text>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator paginate="<%= false %>" />
+</liferay-ui:search-container>
+
+<br />
+
+<liferay-ui:icon
+	cssClass="modify-link"
+	iconCssClass="icon-search"
+	id="selectOrganizationLink"
+	label="<%= true %>"
+	linkCssClass="btn"
+	message="select"
+	method="get"
+	url="javascript:;"
+/>
+
+<aui:script use="liferay-dynamic-select,liferay-search-container">
+	new Liferay.DynamicSelect(
+		[
+			{
+				select: '<portlet:namespace />countryId',
+				selectData: Liferay.Address.getCountries,
+				selectDesc: 'nameCurrentValue',
+				selectSort: '<%= true %>',
+				selectId: 'countryId',
+				selectVal: '<%= countryId %>'
+			},
+			{
+				select: '<portlet:namespace />regionId',
+				selectData: Liferay.Address.getRegions,
+				selectDesc: 'name',
+				selectId: 'regionId',
+				selectVal: '<%= regionId %>'
+			}
+		]
+	);
+
+	var searchContainer = Liferay.SearchContainer.get('<portlet:namespace />parentOrganizationSearchContainer');
+
+	searchContainer.get('contentBox').delegate(
+		'click',
+		function(event) {
+			var link = event.currentTarget;
+			var tr = link.ancestor('tr');
+
+			searchContainer.deleteRow(tr, link.getAttribute('data-rowId'));
+		},
+		'.modify-link'
+	);
+
+	var selectOrganizationLink = A.one('#<portlet:namespace />selectOrganizationLink');
+
+	if (selectOrganizationLink) {
+		selectOrganizationLink.on(
+			'click',
+			function(event) {
+				Liferay.Util.selectEntity(
+					{
+						dialog: {
+							constrain: true,
+							modal: true
+						},
+						id: '<portlet:namespace />selectOrganization',
+						title: '<liferay-ui:message arguments="organization" key="select-x" />',
+						uri: '<portlet:renderURL windowState="<%= LiferayWindowState.POP_UP.toString() %>"><portlet:param name="struts_action" value="/users_admin/select_organization" /><portlet:param name="p_u_i_d" value='<%= (selUser == null) ? "0" : String.valueOf(selUser.getUserId()) %>' /></portlet:renderURL>'
+					},
+					function(event) {
+						var rowColumns = [];
+
+						var href = "<portlet:renderURL><portlet:param name="struts_action" value="/users_admin/edit_organization" /><portlet:param name="redirect" value="<%= currentURL %>" /></portlet:renderURL>&<portlet:namespace />organizationId=" + event.organizationid;
+
+						rowColumns.push(<portlet:namespace />createURL(href, event.name));
+						rowColumns.push(<portlet:namespace />createURL(href, event.type));
+						rowColumns.push('<a class="modify-link" data-rowId="' + event.organizationid + '" href="javascript:;"><%= UnicodeFormatter.toString(removeOrganizationIcon) %></a>');
+
+						searchContainer.deleteRow(1, searchContainer.getData());
+						searchContainer.addRow(rowColumns, event.organizationid);
+						searchContainer.updateDataStore(event.organizationid);
+					}
+				);
+			}
+		);
+	}
+</aui:script>
+
+<c:if test="<%= organization == null %>">
+	<aui:script use="aui-base">
+		A.one('#<portlet:namespace />type').on(
+			'change',
+			function(event) {
+
+				<%
+				for (String curType : PropsValues.ORGANIZATIONS_TYPES) {
+				%>
+
+					if (event.target.val() == '<%= curType %>') {
+						A.one('#<portlet:namespace />countryDiv').<%= GetterUtil.getBoolean(PropsUtil.get(PropsKeys.ORGANIZATIONS_COUNTRY_ENABLED, new Filter(String.valueOf(curType)))) ? "show" : "hide" %>();
+					}
+
+				<%
+				}
+				%>
+
+			}
+		);
+	</aui:script>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/organization_columns.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/organization_columns.jspf
new file mode 100644
index 0000000..701a67d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/organization_columns.jspf
@@ -0,0 +1,79 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:search-container-column-text
+	buffer="buffer"
+	href="<%= rowURL %>"
+	name="name"
+>
+
+	<%
+	if (rowURL != null) {
+		buffer.append("<a href=\"");
+		buffer.append(rowURL);
+		buffer.append("\">");
+	}
+
+	buffer.append("<img align=\"left\" alt=\"\" border=\"0\" style=\"margin: 0px 5px 0px 0px;\" src=\"");
+	buffer.append(themeDisplay.getPathThemeImages());
+	buffer.append("/common/organization_icon.png\">");
+	buffer.append("<strong>");
+	buffer.append(curOrganization.getName());
+	buffer.append("</strong>");
+
+	if (rowURL != null) {
+		buffer.append("</a>");
+	}
+
+	int suborganizationsCount = OrganizationLocalServiceUtil.searchCount(company.getCompanyId(), curOrganization.getOrganizationId(), null, null, null, null, organizationParams);
+
+	LinkedHashMap<String, Object> userParams = new LinkedHashMap<String, Object>();
+
+	userParams.put("usersOrgs", curOrganization.getOrganizationId());
+
+	int organizationUserCount = UserLocalServiceUtil.searchCount(company.getCompanyId(), null, 0, userParams);
+
+	if ((suborganizationsCount > 0) || (organizationUserCount > 0)) {
+		buffer.append("<br /><em class=\"organization-details\">");
+
+		if (suborganizationsCount > 0) {
+			buffer.append((suborganizationsCount == 1) ? LanguageUtil.format(pageContext, "x-suborganization", String.valueOf(suborganizationsCount)) : LanguageUtil.format(pageContext, "x-suborganizations", String.valueOf(suborganizationsCount)));
+		}
+
+		if ((suborganizationsCount > 0) && (organizationUserCount > 0)) {
+			buffer.append(StringPool.SPACE + StringUtil.toLowerCase(LanguageUtil.get(pageContext, "and")) + StringPool.SPACE);
+		}
+
+		if (organizationUserCount > 0) {
+			buffer.append((organizationUserCount == 1) ? LanguageUtil.format(pageContext, "x-user", String.valueOf(organizationUserCount)) : LanguageUtil.format(pageContext, "x-users", String.valueOf(organizationUserCount)));
+		}
+
+		buffer.append("</em>");
+	}
+	%>
+
+</liferay-ui:search-container-column-text>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="type"
+	value="<%= LanguageUtil.get(pageContext, curOrganization.getType()) %>"
+/>
+
+<liferay-ui:search-container-column-jsp
+	align="right"
+	path="/html/portlet/users_admin/organization_action.jsp"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/organization_site.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/organization_site.jsp
new file mode 100644
index 0000000..beaad7d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/organization_site.jsp
@@ -0,0 +1,272 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+Organization organization = (Organization)request.getAttribute(WebKeys.ORGANIZATION);
+
+List<LayoutSetPrototype> layoutSetPrototypes = LayoutSetPrototypeServiceUtil.search(company.getCompanyId(), Boolean.TRUE, null);
+
+LayoutSet privateLayoutSet = null;
+LayoutSetPrototype privateLayoutSetPrototype = null;
+boolean privateLayoutSetPrototypeLinkEnabled = true;
+
+LayoutSet publicLayoutSet = null;
+LayoutSetPrototype publicLayoutSetPrototype = null;
+boolean publicLayoutSetPrototypeLinkEnabled = true;
+
+boolean site = false;
+
+Group organizationGroup = null;
+
+if (organization != null) {
+	organizationGroup = organization.getGroup();
+
+	site = organizationGroup.isSite();
+
+	if (site) {
+		try {
+			LayoutLocalServiceUtil.getLayouts(organizationGroup.getGroupId(), false, LayoutConstants.DEFAULT_PARENT_LAYOUT_ID);
+
+			privateLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(organizationGroup.getGroupId(), true);
+
+			privateLayoutSetPrototypeLinkEnabled = privateLayoutSet.isLayoutSetPrototypeLinkEnabled();
+
+			String layoutSetPrototypeUuid = privateLayoutSet.getLayoutSetPrototypeUuid();
+
+			if (Validator.isNotNull(layoutSetPrototypeUuid)) {
+				privateLayoutSetPrototype = LayoutSetPrototypeLocalServiceUtil.getLayoutSetPrototypeByUuidAndCompanyId(layoutSetPrototypeUuid, company.getCompanyId());
+			}
+		}
+		catch (Exception e) {
+		}
+
+		try {
+			LayoutLocalServiceUtil.getLayouts(organizationGroup.getGroupId(), true, LayoutConstants.DEFAULT_PARENT_LAYOUT_ID);
+
+			publicLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(organizationGroup.getGroupId(), false);
+
+			publicLayoutSetPrototypeLinkEnabled = publicLayoutSet.isLayoutSetPrototypeLinkEnabled();
+
+			String layoutSetPrototypeUuid = publicLayoutSet.getLayoutSetPrototypeUuid();
+
+			if (Validator.isNotNull(layoutSetPrototypeUuid)) {
+				publicLayoutSetPrototype = LayoutSetPrototypeLocalServiceUtil.getLayoutSetPrototypeByUuidAndCompanyId(layoutSetPrototypeUuid, company.getCompanyId());
+			}
+		}
+		catch (Exception e) {
+		}
+	}
+}
+%>
+
+<h3><liferay-ui:message key="organization-site" /></h3>
+
+<c:choose>
+	<c:when test="<%= (organizationGroup == null) || GroupPermissionUtil.contains(permissionChecker, organizationGroup.getGroupId(), ActionKeys.UPDATE) %>">
+		<aui:fieldset>
+			<c:choose>
+				<c:when test="<%= (organization == null) || ((publicLayoutSetPrototype == null) && (privateLayoutSetPrototype == null)) %>">
+					<aui:input label="create-site" name="site" type="checkbox" value="<%= site %>" />
+				</c:when>
+				<c:otherwise>
+					<aui:input label="create-site" name="site" type="hidden" value="<%= site %>" />
+				</c:otherwise>
+			</c:choose>
+
+			<%
+			boolean hasUnlinkLayoutSetPrototypePermission = PortalPermissionUtil.contains(permissionChecker, ActionKeys.UNLINK_LAYOUT_SET_PROTOTYPE);
+			%>
+
+			<div id="<portlet:namespace />siteTemplates">
+				<c:choose>
+					<c:when test="<%= ((organization == null) || ((publicLayoutSetPrototype == null) && (organization.getPublicLayoutsPageCount() == 0))) && !layoutSetPrototypes.isEmpty() %>">
+						<aui:select label="public-pages" name="publicLayoutSetPrototypeId">
+							<aui:option label="none" selected="<%= true %>" value="" />
+
+							<%
+							for (LayoutSetPrototype layoutSetPrototype : layoutSetPrototypes) {
+							%>
+
+								<aui:option label="<%= HtmlUtil.escape(layoutSetPrototype.getName(user.getLanguageId())) %>" value="<%= layoutSetPrototype.getLayoutSetPrototypeId() %>" />
+
+							<%
+							}
+							%>
+
+						</aui:select>
+
+						<c:choose>
+							<c:when test="<%= hasUnlinkLayoutSetPrototypePermission %>">
+								<div class="hide" id="<portlet:namespace />publicLayoutSetPrototypeIdOptions">
+									<aui:input
+										helpMessage="enable-propagation-of-changes-from-the-site-template-help"
+										label="enable-propagation-of-changes-from-the-site-template"
+										name="publicLayoutSetPrototypeLinkEnabled"
+										type="checkbox"
+										value="<%= true %>"
+									/>
+								</div>
+							</c:when>
+							<c:otherwise>
+								<aui:input name="publicLayoutSetPrototypeLinkEnabled" type="hidden" value="<%= true %>" />
+							</c:otherwise>
+						</c:choose>
+					</c:when>
+					<c:otherwise>
+						<aui:field-wrapper label="public-pages">
+							<c:choose>
+								<c:when test="<%= organization != null %>">
+									<liferay-portlet:actionURL portletName="<%= PortletKeys.SITE_REDIRECTOR %>" var="publicPagesURL">
+										<portlet:param name="struts_action" value="/my_sites/view" />
+										<portlet:param name="groupId" value="<%= String.valueOf(organization.getGroup().getGroupId()) %>" />
+										<portlet:param name="privateLayout" value="<%= Boolean.FALSE.toString() %>" />
+									</liferay-portlet:actionURL>
+
+									<c:choose>
+										<c:when test="<%= organization.getPublicLayoutsPageCount() > 0 %>">
+											<liferay-ui:icon
+												image="view"
+												label="<%= true %>"
+												message="open-public-pages"
+												method="get"
+												target="_blank"
+												url="<%= publicPagesURL.toString() %>"
+											/>
+										</c:when>
+										<c:otherwise>
+											<liferay-ui:message key="this-organization-does-not-have-any-public-pages" />
+										</c:otherwise>
+									</c:choose>
+
+									<c:choose>
+										<c:when test="<%= (publicLayoutSetPrototype != null) && !organizationGroup.isStaged() && hasUnlinkLayoutSetPrototypePermission %>">
+											<aui:input label='<%= LanguageUtil.format(pageContext, "enable-propagation-of-changes-from-the-site-template-x", HtmlUtil.escape(publicLayoutSetPrototype.getName(user.getLanguageId()))) %>' name="publicLayoutSetPrototypeLinkEnabled" type="checkbox" value="<%= publicLayoutSetPrototypeLinkEnabled %>" />
+										</c:when>
+										<c:when test="<%= publicLayoutSetPrototype != null %>">
+											<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(publicLayoutSetPrototype.getName(locale))} %>" key="these-pages-are-linked-to-site-template-x" />
+
+											<aui:input name="publicLayoutSetPrototypeLinkEnabled" type="hidden" value="<%= publicLayoutSetPrototypeLinkEnabled %>" />
+										</c:when>
+									</c:choose>
+								</c:when>
+							</c:choose>
+						</aui:field-wrapper>
+					</c:otherwise>
+				</c:choose>
+
+				<c:choose>
+					<c:when test="<%= ((organization == null) || ((privateLayoutSetPrototype == null) && (organization.getPrivateLayoutsPageCount() == 0))) && !layoutSetPrototypes.isEmpty() %>">
+						<aui:select label="private-pages" name="privateLayoutSetPrototypeId">
+							<aui:option label="none" selected="<%= true %>" value="" />
+
+							<%
+							for (LayoutSetPrototype layoutSetPrototype : layoutSetPrototypes) {
+							%>
+
+								<aui:option label="<%= HtmlUtil.escape(layoutSetPrototype.getName(user.getLanguageId())) %>" value="<%= layoutSetPrototype.getLayoutSetPrototypeId() %>" />
+
+							<%
+							}
+							%>
+
+						</aui:select>
+
+						<c:choose>
+							<c:when test="<%= hasUnlinkLayoutSetPrototypePermission %>">
+								<div class="hide" id="<portlet:namespace />privateLayoutSetPrototypeIdOptions">
+									<aui:input
+										helpMessage="enable-propagation-of-changes-from-the-site-template-help"
+										label="enable-propagation-of-changes-from-the-site-template"
+										name="privateLayoutSetPrototypeLinkEnabled"
+										type="checkbox"
+										value="<%= true %>"
+									/>
+								</div>
+							</c:when>
+							<c:otherwise>
+								<aui:input name="privateLayoutSetPrototypeLinkEnabled" type="hidden" value="<%= true %>" />
+							</c:otherwise>
+						</c:choose>
+					</c:when>
+					<c:otherwise>
+						<aui:field-wrapper label="private-pages">
+							<c:choose>
+								<c:when test="<%= organization != null %>">
+									<liferay-portlet:actionURL portletName="<%= PortletKeys.SITE_REDIRECTOR %>" var="privatePagesURL">
+										<portlet:param name="struts_action" value="/my_sites/view" />
+										<portlet:param name="groupId" value="<%= String.valueOf(organization.getGroup().getGroupId()) %>" />
+										<portlet:param name="privateLayout" value="<%= Boolean.TRUE.toString() %>" />
+									</liferay-portlet:actionURL>
+
+									<c:choose>
+										<c:when test="<%= organization.getPrivateLayoutsPageCount() > 0 %>">
+											<liferay-ui:icon
+												image="view"
+												label="<%= true %>"
+												message="open-private-pages"
+												method="get"
+												target="_blank"
+												url="<%= privatePagesURL.toString() %>"
+											/>
+										</c:when>
+										<c:otherwise>
+											<liferay-ui:message key="this-organization-does-not-have-any-private-pages" />
+										</c:otherwise>
+									</c:choose>
+
+									<c:choose>
+										<c:when test="<%= (privateLayoutSetPrototype != null) && !organizationGroup.isStaged() && hasUnlinkLayoutSetPrototypePermission %>">
+											<aui:input label='<%= LanguageUtil.format(pageContext, "enable-propagation-of-changes-from-the-site-template-x", HtmlUtil.escape(privateLayoutSetPrototype.getName(user.getLanguageId()))) %>' name="privateLayoutSetPrototypeLinkEnabled" type="checkbox" value="<%= privateLayoutSetPrototypeLinkEnabled %>" />
+										</c:when>
+										<c:when test="<%= privateLayoutSetPrototype != null %>">
+											<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(privateLayoutSetPrototype.getName(locale))} %>" key="these-pages-are-linked-to-site-template-x" />
+
+											<aui:input name="privateLayoutSetPrototypeLinkEnabled" type="hidden" value="<%= privateLayoutSetPrototypeLinkEnabled %>" />
+										</c:when>
+									</c:choose>
+								</c:when>
+							</c:choose>
+						</aui:field-wrapper>
+					</c:otherwise>
+				</c:choose>
+			</div>
+		</aui:fieldset>
+
+		<%
+		if ((organization == null) && layoutSetPrototypes.isEmpty()) {
+			request.setAttribute(WebKeys.FORM_NAVIGATOR_SECTION_SHOW + "pages", Boolean.FALSE);
+		}
+		%>
+
+		<aui:script>
+			function <portlet:namespace />isVisible(currentValue, value) {
+				return currentValue != '';
+			}
+
+			Liferay.Util.toggleBoxes('<portlet:namespace />siteCheckbox','<portlet:namespace />siteTemplates');
+
+			Liferay.Util.toggleSelectBox('<portlet:namespace />publicLayoutSetPrototypeId', <portlet:namespace />isVisible, '<portlet:namespace />publicLayoutSetPrototypeIdOptions');
+			Liferay.Util.toggleSelectBox('<portlet:namespace />privateLayoutSetPrototypeId', <portlet:namespace />isVisible, '<portlet:namespace />privateLayoutSetPrototypeIdOptions');
+		</aui:script>
+	</c:when>
+	<c:otherwise>
+		<aui:input name="site" type="hidden" value="<%= site %>" />
+
+		<liferay-ui:message key="you-do-not-have-the-required-permissions" />
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/phone_numbers.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/phone_numbers.jsp
new file mode 100644
index 0000000..43c6c75
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/phone_numbers.jsp
@@ -0,0 +1,17 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/common/phone_numbers.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/reminder_queries.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/reminder_queries.jsp
new file mode 100644
index 0000000..51a9d7c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/reminder_queries.jsp
@@ -0,0 +1,192 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+Organization organization = (Organization)request.getAttribute(WebKeys.ORGANIZATION);
+
+String reminderQueries = ParamUtil.getString(request, "reminderQueries");
+
+String currentLanguageId = LanguageUtil.getLanguageId(request);
+Locale defaultLocale = LocaleUtil.getDefault();
+String defaultLanguageId = LocaleUtil.toLanguageId(defaultLocale);
+
+Locale[] locales = LanguageUtil.getAvailableLocales();
+
+if ((organization != null) && Validator.isNull(reminderQueries)) {
+	reminderQueries = StringUtil.merge(organization.getReminderQueryQuestions(defaultLocale), StringPool.NEW_LINE);
+}
+
+Map<Locale, String> reminderQueriesMap = LocalizationUtil.getLocalizedParameter(renderRequest, "reminderQueries");
+%>
+
+<h3><liferay-ui:message key="reminder-queries" /></h3>
+
+<div class="alert alert-info">
+	<liferay-ui:message key="specify-custom-reminder-queries-for-the-users-of-this-organization" />
+</div>
+
+<aui:fieldset cssClass="reminder">
+	<aui:input label='<%= LanguageUtil.get(pageContext, "default-language") + StringPool.COLON + StringPool.SPACE + defaultLocale.getDisplayName(defaultLocale) %>' name="reminderQueries" type="textarea" value="<%= reminderQueries %>" />
+
+	<aui:select cssClass="localized-language-selector" label='<%= LanguageUtil.get(pageContext, "localized-language") + StringPool.COLON %>' name="reminderQueryLanguageId" onChange='<%= renderResponse.getNamespace() + "updateReminderQueriesLanguage();" %>'>
+		<aui:option value="" />
+
+		<%
+		for (int i = 0; i < locales.length; i++) {
+			if (locales[i].equals(defaultLocale)) {
+				continue;
+			}
+
+			String curReminderQueries = reminderQueriesMap.get(locales[i]);
+
+			if ((organization != null) && Validator.isNull(curReminderQueries)) {
+				curReminderQueries = StringUtil.merge(organization.getReminderQueryQuestions(locales[i]), StringPool.NEW_LINE);
+			}
+
+			String style = StringPool.BLANK;
+
+			if (Validator.isNotNull(curReminderQueries)) {
+				style = "font-weight: bold;";
+			}
+		%>
+
+			<aui:option label="<%= locales[i].getDisplayName(locale) %>" selected="<%= (currentLanguageId.equals(LocaleUtil.toLanguageId(locales[i]))) %>" style="<%= style %>" value="<%= LocaleUtil.toLanguageId(locales[i]) %>" />
+
+		<%
+		}
+		%>
+
+	</aui:select>
+
+	<%
+	for (int i = 0; i < locales.length; i++) {
+		if (locales[i].equals(defaultLocale)) {
+			continue;
+		}
+
+		String curReminderQueries = reminderQueriesMap.get(locales[i]);
+
+		if ((organization != null) && Validator.isNull(curReminderQueries)) {
+			curReminderQueries = StringUtil.merge(organization.getReminderQueryQuestions(locales[i]), StringPool.NEW_LINE);
+		}
+	%>
+
+		<aui:input name='<%= "reminderQueries_" + LocaleUtil.toLanguageId(locales[i]) %>' type="hidden" value="<%= curReminderQueries %>" />
+
+	<%
+	}
+	%>
+
+	<aui:input label="" name="reminderQueries_temp" onChange='<%= renderResponse.getNamespace() + "onReminderQueriesChanged();" %>' type="textarea" />
+</aui:fieldset>
+
+<aui:script>
+	var reminderQueriesChanged = false;
+	var lastLanguageId = "<%= currentLanguageId %>";
+
+	function <portlet:namespace />onReminderQueriesChanged() {
+		reminderQueriesChanged = true;
+	}
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />updateReminderQueriesLanguage',
+		function() {
+			var A = AUI();
+
+			if (lastLanguageId != "<%= defaultLanguageId %>") {
+				if (reminderQueriesChanged) {
+					var reminderQueriesValue = A.one("#<portlet:namespace />reminderQueries_temp").attr("value");
+
+					if (reminderQueriesValue == null) {
+						reminderQueriesValue = "";
+					}
+
+					A.one("#<portlet:namespace />reminderQueries_" + lastLanguageId).attr("value", reminderQueriesValue);
+
+					reminderQueriesChanged = false;
+				}
+			}
+
+			var selLanguageId = "";
+
+			for (var i = 0; i < document.<portlet:namespace />fm.<portlet:namespace />reminderQueryLanguageId.length; i++) {
+				if (document.<portlet:namespace />fm.<portlet:namespace />reminderQueryLanguageId.options[i].selected) {
+					selLanguageId = document.<portlet:namespace />fm.<portlet:namespace />reminderQueryLanguageId.options[i].value;
+
+					break;
+				}
+			}
+
+			if (selLanguageId != "") {
+				<portlet:namespace />updateReminderQueriesLanguageTemps(selLanguageId);
+
+				A.one("#<portlet:namespace />reminderQueries_temp").show();
+			}
+			else {
+				A.one("#<portlet:namespace />reminderQueries_temp").hide();
+			}
+
+			lastLanguageId = selLanguageId;
+		},
+		['aui-base']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />updateReminderQueriesLanguageTemps',
+		function(lang) {
+			var A = AUI();
+
+			if (lang != "<%= defaultLanguageId %>") {
+				var reminderQueriesLang = A.one("#<portlet:namespace />reminderQueries_" + lang);
+
+				if (reminderQueriesLang) {
+					var reminderQueriesValue = reminderQueriesLang.attr("value");
+				}
+
+				var defaultReminderQueriesLang = A.one("#<portlet:namespace />reminderQueries_<%= defaultLanguageId %>");
+
+				if (defaultReminderQueriesLang) {
+					var defaultReminderQueriesValue = defaultReminderQueriesLan.attr("value");
+				}
+
+				if (defaultReminderQueriesValue == null) {
+					defaultReminderQueriesValue = "";
+				}
+
+				if ((reminderQueriesValue == null) || (reminderQueriesValue == "")) {
+					A.one("#<portlet:namespace />reminderQueries_temp").attr("value", defaultReminderQueriesValue);
+				}
+				else {
+					A.one("#<portlet:namespace />reminderQueries_temp").attr("value", reminderQueriesValue);
+				}
+			}
+		},
+		['aui-base']
+	);
+
+	<portlet:namespace />updateReminderQueriesLanguageTemps(lastLanguageId);
+
+	Liferay.on(
+		'submitForm',
+		function(event, data) {
+			<portlet:namespace />updateReminderQueriesLanguage();
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/search_columns.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/search_columns.jspf
new file mode 100644
index 0000000..c7292cc
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/search_columns.jspf
@@ -0,0 +1,69 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="name"
+	orderable="<%= true %>"
+	property="name"
+/>
+
+<liferay-ui:search-container-column-text
+	buffer="buffer"
+	href="<%= rowURL %>"
+	name="parent-organization"
+>
+
+	<%
+	if (organization.getParentOrganizationId() > 0) {
+		try {
+			Organization parentOrganization = OrganizationLocalServiceUtil.getOrganization(organization.getParentOrganizationId());
+
+			buffer.append(HtmlUtil.escape(parentOrganization.getName()));
+		}
+		catch (Exception e) {
+		}
+	}
+	%>
+
+</liferay-ui:search-container-column-text>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="type"
+	orderable="<%= true %>"
+	value="<%= LanguageUtil.get(pageContext, organization.getType()) %>"
+/>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="city"
+	value="<%= organization.getAddress().getCity() %>"
+/>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="region"
+>
+	<liferay-ui:write bean="<%= organization %>" property="region" />
+</liferay-ui:search-container-column-text>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="country"
+>
+	<liferay-ui:write bean="<%= organization %>" property="country" />
+</liferay-ui:search-container-column-text>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/services.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/services.jsp
new file mode 100644
index 0000000..ec45ac4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/services.jsp
@@ -0,0 +1,230 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+Organization organization = (Organization)request.getAttribute(WebKeys.ORGANIZATION);
+
+long organizationId = (organization != null) ? organization.getOrganizationId() : 0;
+
+List<OrgLabor> orgLabors = Collections.emptyList();
+
+int[] orgLaborsIndexes = null;
+
+String orgLaborsIndexesParam = ParamUtil.getString(request, "orgLaborsIndexes");
+
+if (Validator.isNotNull(orgLaborsIndexesParam)) {
+	orgLabors = new ArrayList<OrgLabor>();
+
+	orgLaborsIndexes = StringUtil.split(orgLaborsIndexesParam, 0);
+
+	for (int orgLaborsIndex : orgLaborsIndexes) {
+		OrgLabor orgLabor = new OrgLaborImpl();
+
+		orgLabor.setSunOpen(-1);
+		orgLabor.setSunClose(-1);
+		orgLabor.setMonOpen(-1);
+		orgLabor.setMonClose(-1);
+		orgLabor.setTueOpen(-1);
+		orgLabor.setTueClose(-1);
+		orgLabor.setWedOpen(-1);
+		orgLabor.setWedClose(-1);
+		orgLabor.setThuOpen(-1);
+		orgLabor.setThuClose(-1);
+		orgLabor.setFriOpen(-1);
+		orgLabor.setFriClose(-1);
+		orgLabor.setSatOpen(-1);
+		orgLabor.setSatClose(-1);
+
+		orgLabors.add(orgLabor);
+	}
+}
+else {
+	if (organizationId > 0) {
+		orgLabors = OrgLaborServiceUtil.getOrgLabors(organizationId);
+
+		orgLaborsIndexes = new int[orgLabors.size()];
+
+		for (int i = 0; i < orgLabors.size() ; i++) {
+			orgLaborsIndexes[i] = i;
+		}
+	}
+
+	if (orgLabors.isEmpty()) {
+		orgLabors = new ArrayList<OrgLabor>();
+
+		OrgLabor orgLabor = new OrgLaborImpl();
+
+		orgLabor.setSunOpen(-1);
+		orgLabor.setSunClose(-1);
+		orgLabor.setMonOpen(-1);
+		orgLabor.setMonClose(-1);
+		orgLabor.setTueOpen(-1);
+		orgLabor.setTueClose(-1);
+		orgLabor.setWedOpen(-1);
+		orgLabor.setWedClose(-1);
+		orgLabor.setThuOpen(-1);
+		orgLabor.setThuClose(-1);
+		orgLabor.setFriOpen(-1);
+		orgLabor.setFriClose(-1);
+		orgLabor.setSatOpen(-1);
+		orgLabor.setSatClose(-1);
+
+		orgLabors.add(orgLabor);
+
+		orgLaborsIndexes = new int[] {0};
+	}
+
+	if (orgLaborsIndexes == null) {
+		orgLaborsIndexes = new int[0];
+	}
+}
+
+Format timeFormat = FastDateFormatFactoryUtil.getSimpleDateFormat("HH:mm", locale);
+%>
+
+<liferay-ui:error-marker key="errorSection" value="services" />
+
+<h3><liferay-ui:message key="services" /></h3>
+
+<liferay-ui:error key="<%= NoSuchListTypeException.class.getName() + Organization.class.getName() + ListTypeConstants.ORGANIZATION_SERVICE %>" message="please-select-a-type" />
+
+<aui:fieldset>
+
+	<%
+	Calendar cal = CalendarFactoryUtil.getCalendar();
+	String[] days = CalendarUtil.getDays(locale);
+	String[] paramPrefixes = {"sun", "mon", "tue", "wed", "thu", "fri", "sat"};
+
+	for (int i = 0; i < orgLaborsIndexes.length; i++) {
+		int orgLaborsIndex = orgLaborsIndexes[i];
+
+		OrgLabor orgLabor = orgLabors.get(i);
+
+		int[] openArray = new int[paramPrefixes.length];
+
+		for (int j = 0; j < paramPrefixes.length; j++) {
+			openArray[j] = ParamUtil.getInteger(request, paramPrefixes[j] + "Open" + orgLaborsIndex, BeanPropertiesUtil.getInteger(orgLabor, paramPrefixes[j] + "Open", -1));
+		}
+
+		int[] closeArray = new int[paramPrefixes.length];
+
+		for (int j = 0; j < paramPrefixes.length; j++) {
+			closeArray[j] = ParamUtil.getInteger(request, paramPrefixes[j] + "Close" + orgLaborsIndex, BeanPropertiesUtil.getInteger(orgLabor, paramPrefixes[j] + "Close", -1));
+		}
+	%>
+
+		<aui:model-context bean="<%= orgLabor %>" model="<%= OrgLabor.class %>" />
+
+		<div class="lfr-form-row">
+			<div class="row-fields">
+				<aui:input name='<%= "orgLaborId" + orgLaborsIndex %>' type="hidden" />
+
+				<aui:select label="type" listType="<%= ListTypeConstants.ORGANIZATION_SERVICE %>" name='<%= "orgLaborTypeId" + orgLaborsIndex %>' />
+
+				<%
+				for (int j = 0; j < days.length; j++) {
+					int close = closeArray[j];
+					String day = days[j];
+					int open = openArray[j];
+					String paramPrefix = paramPrefixes[j];
+				%>
+
+					<div class="org-labor-entry">
+						<h5 class="org-labor-entry-title"><%= day %></h5>
+
+						<aui:select label="Open" name='<%= paramPrefix + "Open" + orgLaborsIndex %>'>
+							<aui:option value="-1" />
+
+							<%
+							cal.set(Calendar.HOUR_OF_DAY, 0);
+							cal.set(Calendar.MINUTE, 0);
+							cal.set(Calendar.SECOND, 0);
+							cal.set(Calendar.MILLISECOND, 0);
+
+							int today = cal.get(Calendar.DATE);
+
+							while (cal.get(Calendar.DATE) == today) {
+								String timeOfDayDisplay = timeFormat.format(cal.getTime());
+								int timeOfDayValue = GetterUtil.getInteger(StringUtil.replace(timeOfDayDisplay, StringPool.COLON, StringPool.BLANK));
+
+								cal.add(Calendar.MINUTE, 30);
+							%>
+
+								<aui:option label="<%= timeOfDayDisplay %>" selected="<%= (open == timeOfDayValue) %>" value="<%= timeOfDayValue %>" />
+
+							<%
+							}
+							%>
+
+						</aui:select>
+
+						<aui:select label="close" name='<%= paramPrefix + "Close" + orgLaborsIndex %>'>
+							<aui:option value="-1" />
+
+							<%
+							cal.set(Calendar.HOUR_OF_DAY, 0);
+							cal.set(Calendar.MINUTE, 0);
+							cal.set(Calendar.SECOND, 0);
+							cal.set(Calendar.MILLISECOND, 0);
+
+							int today = cal.get(Calendar.DATE);
+
+							while (cal.get(Calendar.DATE) == today) {
+								String timeOfDayDisplay = timeFormat.format(cal.getTime());
+								int timeOfDayValue = GetterUtil.getInteger(StringUtil.replace(timeOfDayDisplay, StringPool.COLON, StringPool.BLANK));
+
+								cal.add(Calendar.MINUTE, 30);
+							%>
+
+								<aui:option label="<%= timeOfDayDisplay %>" selected="<%= (close == timeOfDayValue) %>" value="<%= timeOfDayValue %>" />
+
+							<%
+							}
+							%>
+
+						</aui:select>
+					</div>
+
+				<%
+				}
+				%>
+
+			</div>
+		</div>
+
+	<%
+	}
+	%>
+
+	<aui:input name="orgLaborsIndexes" type="hidden" value="<%= StringUtil.merge(orgLaborsIndexes) %>" />
+</aui:fieldset>
+
+<aui:script use="liferay-auto-fields">
+	Liferay.once(
+		'formNavigator:reveal<portlet:namespace />services',
+		function() {
+			new Liferay.AutoFields(
+				{
+					contentBox: '#<portlet:namespace />services > fieldset',
+					fieldIndexes: '<portlet:namespace />orgLaborsIndexes',
+					namespace: '<portlet:namespace />'
+				}
+			).render();
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/websites.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/websites.jsp
new file mode 100644
index 0000000..f2960ed
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization/websites.jsp
@@ -0,0 +1,17 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/common/websites.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization_action.jsp
new file mode 100644
index 0000000..4f5c296
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization_action.jsp
@@ -0,0 +1,188 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+SearchContainer searchContainer = (SearchContainer)request.getAttribute("liferay-ui:search:searchContainer");
+
+String redirect = currentURL;
+
+if ((searchContainer != null) && (searchContainer instanceof OrganizationSearch)) {
+	redirect = searchContainer.getIteratorURL().toString();
+}
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+Organization organization = null;
+
+if (row != null) {
+	organization = (Organization)row.getObject();
+}
+else {
+	organization = (Organization)request.getAttribute("view_organizations_tree.jsp-organization");
+}
+
+long organizationId = organization.getOrganizationId();
+
+Group organizationGroup = organization.getGroup();
+
+long organizationGroupId = organization.getGroupId();
+
+String cssClass = StringPool.BLANK;
+
+boolean view = false;
+
+if (row == null) {
+	cssClass = "nav nav-list unstyled well";
+
+	view = true;
+}
+%>
+
+<liferay-ui:icon-menu cssClass="<%= cssClass %>" showExpanded="<%= view %>" showWhenSingleIcon="<%= view %>">
+
+	<%
+	boolean hasUpdatePermission = OrganizationPermissionUtil.contains(permissionChecker, organizationId, ActionKeys.UPDATE);
+	%>
+
+	<c:if test="<%= hasUpdatePermission %>">
+		<portlet:renderURL var="editOrganizationURL">
+			<portlet:param name="struts_action" value="/users_admin/edit_organization" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="organizationId" value="<%= String.valueOf(organizationId) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editOrganizationURL %>"
+		/>
+	</c:if>
+
+	<%--<c:if test="<%= OrganizationPermissionUtil.contains(permissionChecker, organizationId, ActionKeys.PERMISSIONS) %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= Organization.class.getName() %>"
+			modelResourceDescription="<%= HtmlUtil.escape(organization.getName()) %>"
+			resourcePrimKey="<%= String.valueOf(organization.getOrganizationId()) %>"
+			var="editOrganizationPermissionsURL"
+			windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			method="get"
+			url="<%= editOrganizationPermissionsURL %>"
+			useDialog="<%= true %>"
+		/>
+	</c:if>--%>
+
+	<c:if test="<%= organizationGroup.isSite() && (GroupPermissionUtil.contains(permissionChecker, organizationGroup, ActionKeys.MANAGE_STAGING) || hasUpdatePermission) %>">
+		<liferay-portlet:renderURL doAsGroupId="<%= organizationGroupId %>" portletName="<%= PortletKeys.SITE_SETTINGS %>" var="editSettingsURL">
+			<portlet:param name="struts_action" value="/sites_admin/edit_site" />
+			<portlet:param name="viewOrganizationsRedirect" value="<%= currentURL %>" />
+		</liferay-portlet:renderURL>
+
+		<liferay-ui:icon
+			image="configuration"
+			message="manage-site"
+			url="<%= editSettingsURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= permissionChecker.isGroupOwner(organizationGroupId) || OrganizationPermissionUtil.contains(permissionChecker, organizationId, ActionKeys.ASSIGN_USER_ROLES) %>">
+		<portlet:renderURL var="assignUserRolesURL">
+			<portlet:param name="struts_action" value="/users_admin/edit_user_roles" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(organizationGroupId) %>" />
+			<portlet:param name="roleType" value="<%= String.valueOf(RoleConstants.TYPE_ORGANIZATION) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="assign_user_roles"
+			message="assign-organization-roles"
+			url="<%= assignUserRolesURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= OrganizationPermissionUtil.contains(permissionChecker, organizationId, ActionKeys.ASSIGN_MEMBERS) %>">
+		<portlet:renderURL var="assignMembersURL">
+			<portlet:param name="struts_action" value="/users_admin/edit_organization_assignments" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="organizationId" value="<%= String.valueOf(organizationId) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="assign"
+			message="assign-users"
+			url="<%= assignMembersURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= OrganizationPermissionUtil.contains(permissionChecker, organizationId, ActionKeys.MANAGE_USERS) %>">
+		<portlet:renderURL var="addUserURL">
+			<portlet:param name="struts_action" value="/users_admin/edit_user" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="organizationsSearchContainerPrimaryKeys" value="<%= String.valueOf(organizationId) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="add_user"
+			message="add-user"
+			url="<%= addUserURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= organization.isParentable() %>">
+
+		<%
+		String[] childrenTypes = organization.getChildrenTypes();
+
+		for (String childrenType : childrenTypes) {
+		%>
+
+			<c:if test="<%= OrganizationPermissionUtil.contains(permissionChecker, organizationId, ActionKeys.ADD_ORGANIZATION) %>">
+				<portlet:renderURL var="addSuborganizationURL">
+					<portlet:param name="struts_action" value="/users_admin/edit_organization" />
+					<portlet:param name="redirect" value="<%= redirect %>" />
+					<portlet:param name="parentOrganizationSearchContainerPrimaryKeys" value="<%= String.valueOf(organizationId) %>" />
+					<portlet:param name="type" value="<%= childrenType %>" />
+				</portlet:renderURL>
+
+				<liferay-ui:icon
+					image="add_location"
+					message='<%= LanguageUtil.format(pageContext, "add-x", new String [] {LanguageUtil.get(pageContext, childrenType)}) %>'
+					url="<%= addSuborganizationURL %>"
+				/>
+			</c:if>
+
+		<%
+		}
+		%>
+
+	</c:if>
+
+	<c:if test="<%= OrganizationPermissionUtil.contains(permissionChecker, organizationId, ActionKeys.DELETE) %>">
+
+		<%
+		String taglibDeleteURL = "javascript:" + renderResponse.getNamespace() + "deleteOrganization('" + organizationId + "');";
+		%>
+
+		<liferay-ui:icon
+			image="delete"
+			url="<%= taglibDeleteURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization_search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization_search.jsp
new file mode 100644
index 0000000..bac3f7a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization_search.jsp
@@ -0,0 +1,93 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+OrganizationSearch searchContainer = (OrganizationSearch)request.getAttribute("liferay-ui:search:searchContainer");
+
+OrganizationDisplayTerms displayTerms = (OrganizationDisplayTerms)searchContainer.getDisplayTerms();
+
+String type = displayTerms.getType();
+
+Organization organization = null;
+
+if (displayTerms.getParentOrganizationId() > 0) {
+	try {
+		organization = OrganizationLocalServiceUtil.getOrganization(displayTerms.getParentOrganizationId());
+	}
+	catch (NoSuchOrganizationException nsoe) {
+	}
+}
+%>
+
+<liferay-ui:search-toggle
+	autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>"
+	buttonLabel="search"
+	displayTerms="<%= displayTerms %>"
+	id="toggle_id_users_admin_organization_search"
+>
+	<aui:fieldset>
+		<aui:input name="<%= displayTerms.NAME %>" size="20" value="<%= displayTerms.getName() %>" />
+
+		<aui:input name="<%= displayTerms.STREET %>" size="20" value="<%= displayTerms.getStreet() %>" />
+
+		<aui:input name="<%= displayTerms.CITY %>" size="20" value="<%= displayTerms.getCity() %>" />
+
+		<aui:select name="<%= displayTerms.TYPE %>">
+			<aui:option value=""></aui:option>
+
+			<%
+			for (String curType : PropsValues.ORGANIZATIONS_TYPES) {
+			%>
+
+				<aui:option label="<%= curType %>" selected="<%= type.equals(curType) %>" />
+
+			<%
+			}
+			%>
+
+		</aui:select>
+
+		<aui:select label="country" name="<%= displayTerms.COUNTRY_ID %>"></aui:select>
+
+		<aui:select label="region" name="<%= displayTerms.REGION_ID %>"></aui:select>
+
+		<aui:input label="postal-code" name="<%= displayTerms.ZIP %>" size="20" value="<%= displayTerms.getZip() %>" />
+	</aui:fieldset>
+</liferay-ui:search-toggle>
+
+<aui:script use="liferay-dynamic-select">
+	new Liferay.DynamicSelect(
+		[
+			{
+				select: '<portlet:namespace /><%= displayTerms.COUNTRY_ID %>',
+				selectData: Liferay.Address.getCountries,
+				selectDesc: 'nameCurrentValue',
+				selectSort: '<%= true %>',
+				selectId: 'countryId',
+				selectVal: '<%= displayTerms.getCountryId() %>'
+			},
+			{
+				select: '<portlet:namespace /><%= displayTerms.REGION_ID %>',
+				selectData: Liferay.Address.getRegions,
+				selectDesc: 'name',
+				selectId: 'regionId',
+				selectVal: '<%= displayTerms.getRegionId() %>'
+			}
+		]
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization_search_results.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization_search_results.jspf
new file mode 100644
index 0000000..0226a62
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization_search_results.jspf
@@ -0,0 +1,17 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/organization_search_results_database.jspf" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization_search_results_database.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization_search_results_database.jspf
new file mode 100644
index 0000000..fd3cc60
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization_search_results_database.jspf
@@ -0,0 +1,34 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+if (searchTerms.isAdvancedSearch()) {
+	total = OrganizationLocalServiceUtil.searchCount(company.getCompanyId(), parentOrganizationId, searchTerms.getName(), searchTerms.getType(), searchTerms.getStreet(), searchTerms.getCity(), searchTerms.getZip(), searchTerms.getRegionIdObj(), searchTerms.getCountryIdObj(), organizationParams, searchTerms.isAndOperator());
+
+	organizationSearchContainer.setTotal(total);
+
+	results = OrganizationLocalServiceUtil.search(company.getCompanyId(), parentOrganizationId, searchTerms.getName(), searchTerms.getType(), searchTerms.getStreet(), searchTerms.getCity(), searchTerms.getZip(), searchTerms.getRegionIdObj(), searchTerms.getCountryIdObj(), organizationParams, searchTerms.isAndOperator(), organizationSearchContainer.getStart(), organizationSearchContainer.getEnd(), organizationSearchContainer.getOrderByComparator());
+}
+else {
+	total = OrganizationLocalServiceUtil.searchCount(company.getCompanyId(), parentOrganizationId, searchTerms.getKeywords(), searchTerms.getType(), searchTerms.getRegionIdObj(), searchTerms.getCountryIdObj(), organizationParams);
+
+	organizationSearchContainer.setTotal(total);
+
+	results = OrganizationLocalServiceUtil.search(company.getCompanyId(), parentOrganizationId, searchTerms.getKeywords(), searchTerms.getType(), searchTerms.getRegionIdObj(), searchTerms.getCountryIdObj(), organizationParams, organizationSearchContainer.getStart(), organizationSearchContainer.getEnd(), organizationSearchContainer.getOrderByComparator());
+}
+
+organizationSearchContainer.setResults(results);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization_search_results_index.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization_search_results_index.jspf
new file mode 100644
index 0000000..51a9cb1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/organization_search_results_index.jspf
@@ -0,0 +1,45 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+organizationParams.put("expandoAttributes", searchTerms.getKeywords());
+
+Sort sort = SortFactoryUtil.getSort(Organization.class, organizationSearchContainer.getOrderByCol(), organizationSearchContainer.getOrderByType());
+
+boolean corruptIndex = false;
+
+Hits hits = null;
+Tuple tuple = null;
+
+do {
+	if (searchTerms.isAdvancedSearch()) {
+		hits = OrganizationLocalServiceUtil.search(company.getCompanyId(), parentOrganizationId, searchTerms.getName(), searchTerms.getType(), searchTerms.getStreet(), searchTerms.getCity(), searchTerms.getZip(), searchTerms.getRegionName(), searchTerms.getCountryName(), organizationParams, searchTerms.isAndOperator(), organizationSearchContainer.getStart(), organizationSearchContainer.getEnd(), sort);
+	}
+	else {
+		hits = OrganizationLocalServiceUtil.search(company.getCompanyId(), parentOrganizationId, searchTerms.getKeywords(), organizationParams, organizationSearchContainer.getStart(), organizationSearchContainer.getEnd(), sort);
+	}
+
+	tuple = UsersAdminUtil.getOrganizations(hits);
+
+	corruptIndex = (Boolean)tuple.getObject(1);
+}
+while (corruptIndex);
+
+results = (List<Organization>)tuple.getObject(0);
+
+organizationSearchContainer.setResults(results);
+organizationSearchContainer.setTotal(hits.getLength());
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/select_organization.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/select_organization.jsp
new file mode 100644
index 0000000..46c2d9c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/select_organization.jsp
@@ -0,0 +1,168 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+String p_u_i_d = ParamUtil.getString(request, "p_u_i_d");
+String eventName = ParamUtil.getString(request, "eventName", liferayPortletResponse.getNamespace() + "selectOrganization");
+String target = ParamUtil.getString(request, "target");
+
+User selUser = PortalUtil.getSelectedUser(request);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/users_admin/select_organization");
+
+if (selUser != null) {
+	portletURL.setParameter("p_u_i_d", String.valueOf(selUser.getUserId()));
+}
+
+portletURL.setParameter("eventName", eventName);
+
+if (Validator.isNotNull(target)) {
+	portletURL.setParameter("target", target);
+}
+%>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="selectOrganizationFm">
+	<liferay-ui:header
+		title="organizations"
+	/>
+
+	<liferay-ui:search-container
+		searchContainer="<%= new OrganizationSearch(renderRequest, portletURL) %>"
+		var="organizationSearchContainer"
+	>
+		<liferay-ui:search-form
+			page="/html/portlet/users_admin/organization_search.jsp"
+		/>
+
+		<%
+		OrganizationSearchTerms searchTerms = (OrganizationSearchTerms)organizationSearchContainer.getSearchTerms();
+
+		long parentOrganizationId = OrganizationConstants.ANY_PARENT_ORGANIZATION_ID;
+
+		LinkedHashMap<String, Object> organizationParams = new LinkedHashMap<String, Object>();
+
+		if (filterManageableOrganizations) {
+			organizationParams.put("organizationsTree", user.getOrganizations());
+		}
+		%>
+
+		<liferay-ui:search-container-results>
+			<c:choose>
+				<c:when test="<%= PropsValues.ORGANIZATIONS_INDEXER_ENABLED && PropsValues.ORGANIZATIONS_SEARCH_WITH_INDEX %>">
+					<%@ include file="/html/portlet/users_admin/organization_search_results_index.jspf" %>
+				</c:when>
+				<c:otherwise>
+					<%@ include file="/html/portlet/users_admin/organization_search_results_database.jspf" %>
+				</c:otherwise>
+			</c:choose>
+		</liferay-ui:search-container-results>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.model.Organization"
+			escapedModel="<%= true %>"
+			keyProperty="organizationId"
+			modelVar="organization"
+		>
+			<liferay-ui:search-container-column-text
+				name="name"
+				orderable="<%= true %>"
+				property="name"
+			/>
+
+			<liferay-ui:search-container-column-text
+				buffer="buffer"
+				name="parent-organization"
+			>
+
+				<%
+				String parentOrganizationName = StringPool.BLANK;
+
+				if (organization.getParentOrganizationId() > 0) {
+					try {
+						Organization parentOrganization = OrganizationLocalServiceUtil.getOrganization(organization.getParentOrganizationId());
+
+						parentOrganizationName = parentOrganization.getName();
+					}
+					catch (Exception e) {
+					}
+				}
+
+				buffer.append(HtmlUtil.escape(parentOrganizationName));
+				%>
+
+			</liferay-ui:search-container-column-text>
+
+			<liferay-ui:search-container-column-text
+				name="type"
+				orderable="<%= true %>"
+				value="<%= LanguageUtil.get(pageContext, organization.getType()) %>"
+			/>
+
+			<liferay-ui:search-container-column-text
+				name="city"
+				property="address.city"
+			/>
+
+			<liferay-ui:search-container-column-text
+				name="region"
+				property="address.region.name"
+			/>
+
+			<liferay-ui:search-container-column-text
+				name="country"
+				property="address.country.name"
+			/>
+
+			<liferay-ui:search-container-column-text>
+				<c:if test="<%= (Validator.isNull(p_u_i_d) || OrganizationMembershipPolicyUtil.isMembershipAllowed((selUser != null) ? selUser.getUserId() : 0, organization.getOrganizationId())) %>">
+
+					<%
+					Map<String, Object> data = new HashMap<String, Object>();
+
+					data.put("groupid", organization.getGroupId());
+					data.put("name", HtmlUtil.escape(organization.getName()));
+					data.put("organizationid", organization.getOrganizationId());
+					data.put("type", LanguageUtil.get(pageContext, organization.getType()));
+					%>
+
+					<aui:button cssClass="selector-button" data="<%= data %>" value="choose" />
+				</c:if>
+			</liferay-ui:search-container-column-text>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script use="aui-base">
+	var Util = Liferay.Util;
+
+	A.one('#<portlet:namespace />selectOrganizationFm').delegate(
+		'click',
+		function(event) {
+			var result = Util.getAttributes(event.currentTarget, 'data-');
+
+			Util.getOpener().Liferay.fire('<%= HtmlUtil.escapeJS(eventName) %>', result);
+
+			Util.getWindow().hide();
+		},
+		'.selector-button'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/toolbar.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/toolbar.jsp
new file mode 100644
index 0000000..b3bc9d3
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/toolbar.jsp
@@ -0,0 +1,88 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+String toolbarItem = ParamUtil.getString(request, "toolbarItem", "browse");
+
+String usersListView = ParamUtil.get(request, "usersListView", UserConstants.LIST_VIEW_TREE);
+%>
+
+<aui:nav>
+
+	<%
+	boolean hasAddOrganizationPermission = PortalPermissionUtil.contains(permissionChecker, ActionKeys.ADD_ORGANIZATION);
+	boolean hasAddUserPermission = PortalPermissionUtil.contains(permissionChecker, ActionKeys.ADD_USER);
+	%>
+
+	<c:if test="<%= hasAddOrganizationPermission || hasAddUserPermission %>">
+		<aui:nav-item dropdown="<%= true %>" iconCssClass="icon-plus" label="add" selected='<%= toolbarItem.equals("add") %>'>
+			<portlet:renderURL var="viewUsersURL">
+				<portlet:param name="struts_action" value="/users_admin/view" />
+				<portlet:param name="sitesListView" value="<%= usersListView %>" />
+			</portlet:renderURL>
+
+			<c:if test="<%= hasAddUserPermission %>">
+				<portlet:renderURL var="addUserURL">
+					<portlet:param name="struts_action" value="/users_admin/edit_user" />
+					<portlet:param name="redirect" value="<%= viewUsersURL %>" />
+				</portlet:renderURL>
+
+				<aui:nav-item href="<%= addUserURL %>" iconCssClass="icon-user" label="user" />
+			</c:if>
+
+			<aui:nav-item cssClass="divider" />
+
+			<c:if test="<%= hasAddOrganizationPermission %>">
+
+				<%
+				for (String organizationType : PropsValues.ORGANIZATIONS_TYPES) {
+				%>
+
+					<portlet:renderURL var="addOrganizationURL">
+						<portlet:param name="struts_action" value="/users_admin/edit_organization" />
+						<portlet:param name="redirect" value="<%= viewUsersURL %>" />
+						<portlet:param name="type" value="<%= organizationType %>" />
+					</portlet:renderURL>
+
+					<aui:nav-item href="<%= addOrganizationURL %>" iconCssClass="icon-globe" label="<%= LanguageUtil.get(pageContext, organizationType) %>" />
+
+				<%
+				}
+				%>
+
+			</c:if>
+		</aui:nav-item>
+	</c:if>
+
+	<c:choose>
+		<c:when test="<%= PortalPermissionUtil.contains(permissionChecker, ActionKeys.EXPORT_USER) %>">
+			<aui:nav-item href='<%= "javascript:" + renderResponse.getNamespace() + "exportUsers();" %>' label="export-users" selected='<%= toolbarItem.equals("export-users") %>' />
+		</c:when>
+		<c:when test="<%= PortletPermissionUtil.contains(permissionChecker, PortletKeys.USERS_ADMIN, ActionKeys.EXPORT_USER) %>">
+			<aui:nav-item href='<%= "javascript:" + renderResponse.getNamespace() + "exportUsers();" %>' label="export-organization-users" selected='<%= toolbarItem.equals("export-organization-users") %>' />
+		</c:when>
+	</c:choose>
+</aui:nav>
+
+<aui:script>
+	function <portlet:namespace />exportUsers() {
+		document.<portlet:namespace />fm.method = "post";
+
+		submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/users_admin/export_users" /></portlet:actionURL>&compress=0&etag=0&strip=0", false);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/additional_email_addresses.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/additional_email_addresses.jsp
new file mode 100644
index 0000000..38948c2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/additional_email_addresses.jsp
@@ -0,0 +1,17 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/common/additional_email_addresses.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/addresses.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/addresses.jsp
new file mode 100644
index 0000000..c8b08c8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/addresses.jsp
@@ -0,0 +1,17 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/common/addresses.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/announcements.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/announcements.jsp
new file mode 100644
index 0000000..455c083
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/announcements.jsp
@@ -0,0 +1,75 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+User selUser = (User)request.getAttribute("user.selUser");
+
+List<AnnouncementsDelivery> deliveries = null;
+
+if (selUser != null) {
+	deliveries = AnnouncementsDeliveryLocalServiceUtil.getUserDeliveries(selUser.getUserId());
+}
+else {
+	deliveries = new ArrayList<AnnouncementsDelivery>(AnnouncementsEntryConstants.TYPES.length);
+
+	for (String type : AnnouncementsEntryConstants.TYPES) {
+		AnnouncementsDelivery delivery = new AnnouncementsDeliveryImpl();
+
+		delivery.setType(type);
+		delivery.setWebsite(true);
+
+		deliveries.add(delivery);
+	}
+}
+%>
+
+<h3><liferay-ui:message key="alerts-and-announcements" /></h3>
+
+<liferay-ui:message key="select-the-delivery-options-for-alerts-and-announcements" />
+
+<liferay-ui:search-container>
+	<liferay-ui:search-container-results
+		results="<%= deliveries %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portlet.announcements.model.AnnouncementsDelivery"
+		escapedModel="<%= true %>"
+		keyProperty="deliveryId"
+		modelVar="delivery"
+	>
+		<liferay-ui:search-container-column-text
+			name="type"
+			value="<%= LanguageUtil.get(pageContext, delivery.getType()) %>"
+		/>
+		<liferay-ui:search-container-column-jsp
+			name="email"
+			path="/html/portlet/users_admin/user/announcements_checkbox.jsp"
+		/>
+		<liferay-ui:search-container-column-jsp
+			name="sms"
+			path="/html/portlet/users_admin/user/announcements_checkbox.jsp"
+		/>
+		<liferay-ui:search-container-column-jsp
+			name="website"
+			path="/html/portlet/users_admin/user/announcements_checkbox.jsp"
+		/>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/announcements_checkbox.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/announcements_checkbox.jsp
new file mode 100644
index 0000000..77fb83e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/announcements_checkbox.jsp
@@ -0,0 +1,57 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+SearchEntry entry = (SearchEntry)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW_ENTRY);
+
+AnnouncementsDelivery delivery = (AnnouncementsDelivery)row.getObject();
+
+boolean defaultValue = false;
+boolean disabled = false;
+String messageKey = StringPool.BLANK;
+String param = "announcementsType" + delivery.getType();
+
+int index = entry.getIndex();
+
+if (index == 1) {
+	defaultValue = delivery.isEmail();
+	messageKey = "receive-x-announcements-via-email";
+	param += "Email";
+}
+else if (index == 2) {
+	defaultValue = delivery.isSms();
+	messageKey = "receive-x-announcements-via-sms";
+	param += "Sms";
+}
+else if (index == 3) {
+	defaultValue = delivery.isWebsite();
+	disabled = true;
+	messageKey = "receive-x-announcements-via-website";
+	param += "Website";
+}
+%>
+
+<aui:input
+	disabled="<%= disabled %>"
+	label=""
+	name="<%= param %>"
+	title="<%= LanguageUtil.format(pageContext, messageKey, delivery.getType(), true) %>"
+	type="checkbox"
+	value="<%= defaultValue %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/categorization.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/categorization.jsp
new file mode 100644
index 0000000..c2686ed
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/categorization.jsp
@@ -0,0 +1,41 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+User selUser = (User)request.getAttribute("user.selUser");
+%>
+
+<aui:model-context bean="<%= selUser %>" model="<%= User.class %>" />
+
+<h3><liferay-ui:message key="categories" /></h3>
+
+<aui:fieldset>
+	<aui:input name="categories" type="assetCategories" />
+</aui:fieldset>
+
+<h3><liferay-ui:message key="tags" /></h3>
+
+<aui:fieldset>
+	<aui:input name="tags" type="assetTags" />
+</aui:fieldset>
+
+<aui:script>
+	function <portlet:namespace />getSuggestionsContent() {
+		return document.<portlet:namespace />fm.<portlet:namespace />comments.value + ' ' + document.<portlet:namespace />fm.<portlet:namespace />jobTitle.value;
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/comments.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/comments.jsp
new file mode 100644
index 0000000..90a07a7
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/comments.jsp
@@ -0,0 +1,38 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+User selUser = (User)request.getAttribute("user.selUser");
+%>
+
+<aui:model-context bean="<%= selUser %>" model="<%= User.class %>" />
+
+<h3><liferay-ui:message key="comments" /></h3>
+
+<c:choose>
+	<c:when test="<%= selUser != null %>">
+		<aui:fieldset>
+			<aui:input label="" name="comments" />
+		</aui:fieldset>
+	</c:when>
+	<c:otherwise>
+		<div class="alert alert-info">
+			<liferay-ui:message key="this-section-will-be-editable-after-creating-the-user" />
+		</div>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/custom_fields.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/custom_fields.jsp
new file mode 100644
index 0000000..5a5648d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/custom_fields.jsp
@@ -0,0 +1,32 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+User selUser = (User)request.getAttribute("user.selUser");
+%>
+
+<h3><liferay-ui:message key="custom-fields" /></h3>
+
+<aui:fieldset>
+	<liferay-ui:custom-attribute-list
+		className="com.liferay.portal.model.User"
+		classPK="<%= (selUser != null) ? selUser.getUserId() : 0 %>"
+		editable="<%= true %>"
+		label="<%= true %>"
+	/>
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/details.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/details.jsp
new file mode 100644
index 0000000..e568827
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/details.jsp
@@ -0,0 +1,186 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+User selUser = (User)request.getAttribute("user.selUser");
+Contact selContact = (Contact)request.getAttribute("user.selContact");
+
+Calendar birthday = CalendarFactoryUtil.getCalendar();
+
+birthday.set(Calendar.MONTH, Calendar.JANUARY);
+birthday.set(Calendar.DATE, 1);
+birthday.set(Calendar.YEAR, 1970);
+
+if (selContact != null) {
+	birthday.setTime(selContact.getBirthday());
+}
+%>
+
+<liferay-ui:error-marker key="errorSection" value="details" />
+
+<aui:model-context bean="<%= selUser %>" model="<%= User.class %>" />
+
+<h3><liferay-ui:message key="details" /></h3>
+
+<div class="row-fluid">
+	<aui:fieldset cssClass="span6">
+		<liferay-ui:success key="verificationEmailSent" message="your-email-verification-code-has-been-sent-and-the-new-email-address-will-be-applied-to-your-account-once-it-has-been-verified" />
+
+		<liferay-ui:error exception="<%= DuplicateUserScreenNameException.class %>" focusField="screenName" message="the-screen-name-you-requested-is-already-taken" />
+
+		<liferay-ui:error exception="<%= GroupFriendlyURLException.class %>" focusField="screenName">
+
+			<%
+			GroupFriendlyURLException gfurle = (GroupFriendlyURLException)errorException;
+			%>
+
+			<c:if test="<%= gfurle.getType() == GroupFriendlyURLException.DUPLICATE %>">
+				<liferay-ui:message key="the-screen-name-you-requested-is-associated-with-an-existing-friendly-url" />
+			</c:if>
+		</liferay-ui:error>
+
+		<liferay-ui:error exception="<%= ReservedUserScreenNameException.class %>" focusField="screenName" message="the-screen-name-you-requested-is-reserved" />
+
+		<liferay-ui:error exception="<%= UserFieldException.class %>">
+
+			<%
+			UserFieldException ufe = (UserFieldException)errorException;
+
+			StringBundler sb = new StringBundler();
+
+			List<String> fields = ufe.getFields();
+
+			for (int i = 0; i < fields.size(); i++) {
+				String field = fields.get(i);
+
+				sb.append(LanguageUtil.get(pageContext, TextFormatter.format(field, TextFormatter.K)));
+
+				if ((i + 1) < fields.size()) {
+					sb.append(StringPool.COMMA_AND_SPACE);
+				}
+			}
+			%>
+
+			<liferay-ui:message arguments="<%= sb.toString() %>" key="your-portal-administrator-has-disabled-the-ability-to-modify-the-following-fields" />
+		</liferay-ui:error>
+
+		<liferay-ui:error exception="<%= UserScreenNameException.class %>" focusField="screenName" message="please-enter-a-valid-screen-name" />
+
+		<c:if test="<%= !PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.USERS_SCREEN_NAME_ALWAYS_AUTOGENERATE) || (selUser != null) %>">
+			<c:choose>
+				<c:when test='<%= PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.USERS_SCREEN_NAME_ALWAYS_AUTOGENERATE) || !UsersAdminUtil.hasUpdateFieldPermission(selUser, "screenName") %>'>
+					<aui:input disabled="<%= true %>" name="screenName" />
+				</c:when>
+				<c:otherwise>
+					<aui:input name="screenName" />
+				</c:otherwise>
+			</c:choose>
+		</c:if>
+
+		<liferay-ui:error exception="<%= DuplicateUserEmailAddressException.class %>" focusField="emailAddress" message="the-email-address-you-requested-is-already-taken" />
+		<liferay-ui:error exception="<%= ReservedUserEmailAddressException.class %>" focusField="emailAddress" message="the-email-address-you-requested-is-reserved" />
+		<liferay-ui:error exception="<%= UserEmailAddressException.class %>" focusField="emailAddress" message="please-enter-a-valid-email-address" />
+
+		<c:choose>
+			<c:when test='<%= !UsersAdminUtil.hasUpdateFieldPermission(selUser, "emailAddress") %>'>
+				<aui:input disabled="<%= true %>" name="emailAddress" />
+			</c:when>
+			<c:otherwise>
+
+				<%
+				User displayEmailAddressUser = null;
+
+				if (selUser != null) {
+					displayEmailAddressUser = (User)selUser.clone();
+
+					displayEmailAddressUser.setEmailAddress(displayEmailAddressUser.getDisplayEmailAddress());
+				}
+				%>
+
+				<aui:input bean="<%= displayEmailAddressUser %>" model="<%= User.class %>" name="emailAddress">
+					<c:if test="<%= PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.USERS_EMAIL_ADDRESS_REQUIRED) %>">
+						<aui:validator name="required" />
+					</c:if>
+				</aui:input>
+			</c:otherwise>
+		</c:choose>
+
+		<%@ include file="/html/portlet/users_admin/user/details_user_name.jspf" %>
+	</aui:fieldset>
+
+	<aui:fieldset cssClass="span5">
+		<div>
+			<c:if test="<%= selUser != null %>">
+				<c:choose>
+					<c:when test='<%= UsersAdminUtil.hasUpdateFieldPermission(selUser, "portrait") %>'>
+						<portlet:renderURL var="editUserPortraitURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+							<portlet:param name="struts_action" value="/users_admin/edit_user_portrait" />
+							<portlet:param name="redirect" value="<%= currentURL %>" />
+							<portlet:param name="p_u_i_d" value="<%= String.valueOf(selUser.getUserId()) %>" />
+							<portlet:param name="portrait_id" value="<%= String.valueOf(selUser.getPortraitId()) %>" />
+						</portlet:renderURL>
+
+						<liferay-ui:logo-selector
+							defaultLogoURL="<%= UserConstants.getPortraitURL(themeDisplay.getPathImage(), selUser.isMale(), 0) %>"
+							editLogoURL="<%= editUserPortraitURL %>"
+							imageId="<%= selUser.getPortraitId() %>"
+							logoDisplaySelector=".user-logo"
+						/>
+					</c:when>
+					<c:otherwise>
+						<img src="<%= selUser.getPortraitURL(themeDisplay) %>" />
+					</c:otherwise>
+				</c:choose>
+			</c:if>
+		</div>
+
+		<c:if test="<%= selUser != null %>">
+			<liferay-ui:error exception="<%= DuplicateUserIdException.class %>" message="the-user-id-you-requested-is-already-taken" />
+			<liferay-ui:error exception="<%= ReservedUserIdException.class %>" message="the-user-id-you-requested-is-reserved" />
+			<liferay-ui:error exception="<%= UserIdException.class %>" message="please-enter-a-valid-user-id" />
+
+			<aui:field-wrapper name="userId">
+				<liferay-ui:input-resource url="<%= String.valueOf(selUser.getUserId()) %>" />
+
+				<aui:input name="userId" type="hidden" value="<%= selUser.getUserId() %>" />
+			</aui:field-wrapper>
+		</c:if>
+
+		<c:choose>
+			<c:when test="<%= PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.FIELD_ENABLE_COM_LIFERAY_PORTAL_MODEL_CONTACT_BIRTHDAY) %>">
+				<liferay-ui:error exception="<%= ContactBirthdayException.class %>" message="please-enter-a-valid-date" />
+
+				<aui:input bean="<%= selContact %>" cssClass="modify-link" disabled='<%= !UsersAdminUtil.hasUpdateFieldPermission(selUser, "birthday") %>' model="<%= Contact.class %>" name="birthday" value="<%= birthday %>" />
+			</c:when>
+			<c:otherwise>
+				<aui:input name="birthdayMonth" type="hidden" value="<%= Calendar.JANUARY %>" />
+				<aui:input name="birthdayDay" type="hidden" value="1" />
+				<aui:input name="birthdayYear" type="hidden" value="1970" />
+			</c:otherwise>
+		</c:choose>
+
+		<c:if test="<%= PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.FIELD_ENABLE_COM_LIFERAY_PORTAL_MODEL_CONTACT_MALE) %>">
+			<aui:select bean="<%= selContact %>" disabled='<%= !UsersAdminUtil.hasUpdateFieldPermission(selUser, "gender") %>' label="gender" model="<%= Contact.class %>" name="male">
+				<aui:option label="male" value="true" />
+				<aui:option label="female" value="false" />
+			</aui:select>
+		</c:if>
+
+		<aui:input disabled='<%= !UsersAdminUtil.hasUpdateFieldPermission(selUser, "jobTitle") %>' name="jobTitle" />
+	</aui:fieldset>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/details_user_name.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/details_user_name.jspf
new file mode 100644
index 0000000..9a4b83b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/details_user_name.jspf
@@ -0,0 +1,34 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<aui:select bean="<%= selContact %>" disabled='<%= !UsersAdminUtil.hasUpdateFieldPermission(selUser, "prefix") %>' label="title[person]" listType="<%= ListTypeConstants.CONTACT_PREFIX %>" listTypeFieldName="prefixId" model="<%= Contact.class %>" name="prefixId" showEmptyOption="<%= true %>" />
+
+<liferay-ui:error exception="<%= ContactFirstNameException.class %>" message="please-enter-a-valid-first-name" />
+<liferay-ui:error exception="<%= ContactFullNameException.class %>" message="please-enter-a-valid-first-middle-and-last-name" />
+
+<aui:input disabled='<%= !UsersAdminUtil.hasUpdateFieldPermission(selUser, "firstName") %>' name="firstName" />
+
+<aui:input disabled='<%= !UsersAdminUtil.hasUpdateFieldPermission(selUser, "middleName") %>' name="middleName" />
+
+<liferay-ui:error exception="<%= ContactLastNameException.class %>" message="please-enter-a-valid-last-name" />
+
+<aui:input disabled='<%= !UsersAdminUtil.hasUpdateFieldPermission(selUser, "lastName") %>' name="lastName">
+	<c:if test="<%= PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.USERS_LAST_NAME_REQUIRED, PropsValues.USERS_LAST_NAME_REQUIRED) %>">
+		<aui:validator name="required" />
+	</c:if>
+</aui:input>
+
+<aui:select bean="<%= selContact %>" disabled='<%= !UsersAdminUtil.hasUpdateFieldPermission(selUser, "suffix") %>' label="suffix" listType="<%= ListTypeConstants.CONTACT_SUFFIX %>" listTypeFieldName="suffixId" model="<%= Contact.class %>" name="suffixId" showEmptyOption="<%= true %>" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/display_settings.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/display_settings.jsp
new file mode 100644
index 0000000..d142cbf
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/display_settings.jsp
@@ -0,0 +1,57 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+User selUser = (User)request.getAttribute("user.selUser");
+
+String languageId = BeanParamUtil.getString(selUser, request, "languageId", user.getLanguageId());
+String timeZoneId = BeanParamUtil.getString(selUser, request, "timeZoneId", user.getTimeZoneId());
+%>
+
+<aui:model-context bean="<%= selUser %>" model="<%= User.class %>" />
+
+<h3><liferay-ui:message key="display-settings" /></h3>
+
+<aui:fieldset>
+	<aui:select label="language" name="languageId">
+
+		<%
+		Locale selLocale = LocaleUtil.fromLanguageId(languageId);
+
+		Locale[] locales = LanguageUtil.getAvailableLocales();
+
+		Locale languageLocale = locale;
+
+		for (Locale curLocale : locales) {
+			if (portletName.equals(PortletKeys.MY_ACCOUNT)) {
+				languageLocale = curLocale;
+			}
+		%>
+
+			<aui:option label="<%= curLocale.getDisplayName(languageLocale) %>" lang="<%= LocaleUtil.toW3cLanguageId(languageLocale) %>" selected="<%= (selLocale.getLanguage().equals(curLocale.getLanguage()) && selLocale.getCountry().equals(curLocale.getCountry())) %>" value="<%= LocaleUtil.toLanguageId(curLocale) %>" />
+
+		<%
+		}
+		%>
+
+	</aui:select>
+
+	<aui:input label="time-zone" name="timeZoneId" type="timeZone" value="<%= timeZoneId %>" />
+
+	<aui:input name="greeting" />
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/instant_messenger.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/instant_messenger.jsp
new file mode 100644
index 0000000..84e80f9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/instant_messenger.jsp
@@ -0,0 +1,70 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+Contact selContact = (Contact)request.getAttribute("user.selContact");
+%>
+
+<h3><liferay-ui:message key="instant-messenger" /></h3>
+
+<c:choose>
+	<c:when test="<%= selContact != null %>">
+		<aui:model-context bean="<%= selContact %>" model="<%= Contact.class %>" />
+
+		<aui:fieldset>
+			<div class="instant-messenger">
+				<aui:input label="aim" name="aimSn" />
+			</div>
+
+			<div class="instant-messenger">
+				<aui:input label="icq" name="icqSn" />
+
+				<c:if test="<%= Validator.isNotNull(selContact.getIcqSn()) %>">
+					<img alt="" src="http://web.icq.com/whitepages/online?icq=<%= HtmlUtil.escapeAttribute(selContact.getIcqSn()) %>&img=5" />
+				</c:if>
+			</div>
+
+			<div class="instant-messenger">
+				<aui:input label="jabber" name="jabberSn" />
+			</div>
+
+			<div class="instant-messenger">
+				<aui:input label="skype" name="skypeSn" />
+
+				<c:if test="<%= Validator.isNotNull(selContact.getSkypeSn()) %>">
+					<a href="callto://<%= HtmlUtil.escapeAttribute(selContact.getSkypeSn()) %>"><img alt="<liferay-ui:message key="call-this-user" />" src="http://mystatus.skype.com/smallicon/<%= HtmlUtil.escapeAttribute(selContact.getSkypeSn()) %>" /></a>
+				</c:if>
+			</div>
+
+			<div class="instant-messenger">
+				<aui:input label="windows-live-messenger" name="msnSn" />
+			</div>
+
+			<div class="instant-messenger">
+				<aui:input label="yim" name="ymSn" />
+
+				<c:if test="<%= Validator.isNotNull(selContact.getYmSn()) %>">
+					<img alt="" src="http://opi.yahoo.com/online?u=<%= HtmlUtil.escapeAttribute(selContact.getYmSn()) %>&m=g&t=0" />
+				</c:if>
+			</div>
+		</aui:fieldset>
+	</c:when>
+	<c:otherwise>
+		<div class="alert alert-info"><liferay-ui:message key="this-section-will-be-editable-after-creating-the-user" /></div>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/open_id.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/open_id.jsp
new file mode 100644
index 0000000..f7ddd8d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/open_id.jsp
@@ -0,0 +1,33 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+User selUser = (User)request.getAttribute("user.selUser");
+%>
+
+<liferay-ui:error-marker key="errorSection" value="openId" />
+
+<aui:model-context bean="<%= selUser %>" model="<%= User.class %>" />
+
+<h3><liferay-ui:message key="open-id" /></h3>
+
+<liferay-ui:error exception="<%= DuplicateOpenIdException.class %>" message="a-user-with-that-open-id-already-exists" />
+
+<aui:fieldset>
+	<aui:input label="" name="openId" />
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/organizations.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/organizations.jsp
new file mode 100644
index 0000000..e1ce01f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/organizations.jsp
@@ -0,0 +1,158 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+User selUser = (User)request.getAttribute("user.selUser");
+
+List<Organization> organizations = (List<Organization>)request.getAttribute("user.organizations");
+%>
+
+<liferay-ui:error-marker key="errorSection" value="organizations" />
+
+<liferay-ui:membership-policy-error />
+
+<liferay-util:buffer var="removeOrganizationIcon">
+	<liferay-ui:icon
+		image="unlink"
+		label="<%= true %>"
+		message="remove"
+	/>
+</liferay-util:buffer>
+
+<h3><liferay-ui:message key="organizations" /></h3>
+
+<liferay-ui:search-container
+	headerNames="name,type,roles,null"
+>
+	<liferay-ui:search-container-results
+		results="<%= organizations %>"
+		total="<%= organizations.size() %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.Organization"
+		escapedModel="<%= true %>"
+		keyProperty="organizationId"
+		modelVar="organization"
+	>
+		<liferay-ui:search-container-column-text
+			name="name"
+			property="name"
+		/>
+
+		<liferay-ui:search-container-column-text
+			name="type"
+			value="<%= LanguageUtil.get(pageContext, organization.getType()) %>"
+		/>
+
+		<liferay-ui:search-container-column-text
+			buffer="buffer"
+			name="roles"
+		>
+
+			<%
+			if (selUser != null) {
+				List<UserGroupRole> userGroupRoles = UserGroupRoleLocalServiceUtil.getUserGroupRoles(selUser.getUserId(), organization.getGroup().getGroupId());
+
+				for (UserGroupRole userGroupRole : userGroupRoles) {
+					Role role = RoleLocalServiceUtil.getRole(userGroupRole.getRoleId());
+
+					buffer.append(HtmlUtil.escape(role.getTitle(locale)));
+					buffer.append(StringPool.COMMA_AND_SPACE);
+				}
+
+				if (!userGroupRoles.isEmpty()) {
+					buffer.setIndex(buffer.index() - 1);
+				}
+			}
+			%>
+
+		</liferay-ui:search-container-column-text>
+
+		<c:if test="<%= !portletName.equals(PortletKeys.MY_ACCOUNT) && ((selUser == null) || !OrganizationMembershipPolicyUtil.isMembershipProtected(permissionChecker, selUser.getUserId(), organization.getOrganizationId())) %>">
+			<liferay-ui:search-container-column-text>
+				<a class="modify-link" data-rowId="<%= organization.getOrganizationId() %>" href="javascript:;"><%= removeOrganizationIcon %></a>
+			</liferay-ui:search-container-column-text>
+		</c:if>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator paginate="<%= false %>" />
+</liferay-ui:search-container>
+
+<c:if test="<%= !portletName.equals(PortletKeys.MY_ACCOUNT) %>">
+	<br />
+
+	<liferay-ui:icon
+		cssClass="modify-link"
+		iconCssClass="icon-search"
+		id="selectOrganizationLink"
+		label="<%= true %>"
+		linkCssClass="btn"
+		message="select"
+		method="get"
+		url="javascript:;"
+	/>
+</c:if>
+
+<aui:script use="liferay-search-container">
+	var searchContainer = Liferay.SearchContainer.get('<portlet:namespace />organizationsSearchContainer');
+
+	searchContainer.get('contentBox').delegate(
+		'click',
+		function(event) {
+			var link = event.currentTarget;
+			var tr = link.ancestor('tr');
+
+			searchContainer.deleteRow(tr, link.getAttribute('data-rowId'));
+		},
+		'.modify-link'
+	);
+
+	var selectOrganizationLink = A.one('#<portlet:namespace />selectOrganizationLink');
+
+	if (selectOrganizationLink) {
+		selectOrganizationLink.on(
+			'click',
+			function(event) {
+				Liferay.Util.selectEntity(
+					{
+						dialog: {
+							constrain: true,
+							modal: true
+						},
+						id: '<portlet:namespace />selectOrganization',
+						title: '<liferay-ui:message arguments="organization" key="select-x" />',
+						uri: '<portlet:renderURL windowState="<%= LiferayWindowState.POP_UP.toString() %>"><portlet:param name="struts_action" value="/users_admin/select_organization" /><portlet:param name="p_u_i_d" value='<%= selUser == null ? "0" : String.valueOf(selUser.getUserId()) %>' /></portlet:renderURL>'
+					},
+					function(event) {
+						var rowColumns = [];
+
+						rowColumns.push(event.name);
+						rowColumns.push(event.type);
+						rowColumns.push('');
+						rowColumns.push('<a class="modify-link" data-rowId="' + event.organizationid + '" href="javascript:;"><%= UnicodeFormatter.toString(removeOrganizationIcon) %></a>');
+
+						searchContainer.addRow(rowColumns, event.organizationid);
+
+						searchContainer.updateDataStore();
+					}
+				);
+			}
+		);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/password.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/password.jsp
new file mode 100644
index 0000000..8b41a2d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/password.jsp
@@ -0,0 +1,195 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+User selUser = (User)request.getAttribute("user.selUser");
+
+PasswordPolicy passwordPolicy = (PasswordPolicy)request.getAttribute("user.passwordPolicy");
+
+boolean passwordResetDisabled = false;
+
+if (((selUser == null) || (selUser.getLastLoginDate() == null)) && ((passwordPolicy == null) || (passwordPolicy.isChangeable() && passwordPolicy.isChangeRequired()))) {
+	passwordResetDisabled = true;
+}
+
+boolean passwordReset = false;
+
+if (passwordResetDisabled) {
+	passwordReset = true;
+}
+else {
+	passwordReset = BeanParamUtil.getBoolean(selUser, request, "passwordReset");
+}
+%>
+
+<liferay-ui:error-marker key="errorSection" value="password" />
+
+<aui:model-context bean="<%= selUser %>" model="<%= User.class %>" />
+
+<h3><liferay-ui:message key="password" /></h3>
+
+<liferay-ui:error exception="<%= UserPasswordException.class %>">
+
+	<%
+	UserPasswordException upe = (UserPasswordException)errorException;
+	%>
+
+	<c:if test="<%= upe.getType() == UserPasswordException.PASSWORD_ALREADY_USED %>">
+		<liferay-ui:message key="that-password-has-already-been-used-please-enter-in-a-different-password" />
+	</c:if>
+
+	<c:if test="<%= upe.getType() == UserPasswordException.PASSWORD_CONTAINS_TRIVIAL_WORDS %>">
+		<liferay-ui:message key="that-password-uses-common-words-please-enter-in-a-password-that-is-harder-to-guess-i-e-contains-a-mix-of-numbers-and-letters" />
+	</c:if>
+
+	<c:if test="<%= upe.getType() == UserPasswordException.PASSWORD_INVALID %>">
+		<liferay-ui:message key="that-password-is-invalid-please-enter-in-a-different-password" />
+	</c:if>
+
+	<c:if test="<%= upe.getType() == UserPasswordException.PASSWORD_LENGTH %>">
+
+		<%
+		int passwordPolicyMinLength = PropsValues.PASSWORDS_DEFAULT_POLICY_MIN_LENGTH;
+
+		if (passwordPolicy != null) {
+			passwordPolicyMinLength = passwordPolicy.getMinLength();
+		}
+		%>
+
+		<%= LanguageUtil.format(pageContext, "that-password-is-too-short-or-too-long-please-make-sure-your-password-is-between-x-and-512-characters", String.valueOf(passwordPolicyMinLength), false) %>
+	</c:if>
+
+	<c:if test="<%= upe.getType() == UserPasswordException.PASSWORD_NOT_CHANGEABLE %>">
+		<liferay-ui:message key="your-password-cannot-be-changed" />
+	</c:if>
+
+	<c:if test="<%= upe.getType() == UserPasswordException.PASSWORD_SAME_AS_CURRENT %>">
+		<liferay-ui:message key="your-new-password-cannot-be-the-same-as-your-old-password-please-enter-in-a-different-password" />
+	</c:if>
+
+	<c:if test="<%= upe.getType() == UserPasswordException.PASSWORD_TOO_TRIVIAL %>">
+		<liferay-ui:message key="that-password-is-too-trivial" />
+	</c:if>
+
+	<c:if test="<%= upe.getType() == UserPasswordException.PASSWORD_TOO_YOUNG %>">
+
+		<%
+		long passwordPolicyMinAge = PropsValues.PASSWORDS_DEFAULT_POLICY_MIN_AGE;
+
+		if (passwordPolicy != null) {
+			passwordPolicyMinAge = passwordPolicy.getMinAge();
+		}
+		%>
+
+		<%= LanguageUtil.format(pageContext, "you-cannot-change-your-password-yet-please-wait-at-least-x-before-changing-your-password-again", LanguageUtil.getTimeDescription(pageContext, passwordPolicyMinAge * 1000), false) %>
+	</c:if>
+
+	<c:if test="<%= upe.getType() == UserPasswordException.PASSWORDS_DO_NOT_MATCH %>">
+		<liferay-ui:message key="the-passwords-you-entered-do-not-match-each-other-please-re-enter-your-password" />
+	</c:if>
+</liferay-ui:error>
+
+<aui:fieldset>
+
+	<!-- LPS-38289 -->
+
+	<input class="hide" />
+
+	<!-- /LPS-38289 -->
+
+	<c:if test="<%= portletName.equals(PortletKeys.MY_ACCOUNT) %>">
+		<aui:input autocomplete="off" label="current-password" name="password0" size="30" type="password" />
+	</c:if>
+
+	<aui:input autocomplete="off" label="new-password" name="password1" size="30" type="password" />
+
+	<aui:input autocomplete="off" label="enter-again" name="password2" size="30" type="password">
+		<aui:validator name="equalTo">
+			'#<portlet:namespace />password1'
+		</aui:validator>
+	</aui:input>
+
+	<c:if test="<%= (selUser == null) || (user.getUserId() != selUser.getUserId()) %>">
+		<aui:input disabled="<%= passwordResetDisabled %>" label="password-reset-required" name="passwordReset" type="checkbox" value="<%= passwordReset %>" />
+	</c:if>
+</aui:fieldset>
+
+<c:if test="<%= PropsValues.USERS_REMINDER_QUERIES_ENABLED && portletName.equals(PortletKeys.MY_ACCOUNT) %>">
+	<h3><liferay-ui:message key="reminder" /></h3>
+
+	<%
+	boolean hasCustomQuestion = true;
+	%>
+
+	<aui:fieldset>
+		<%@ include file="/html/portlet/users_admin/user/password_reminder_query_questions.jspf" %>
+
+		<c:if test="<%= PropsValues.USERS_REMINDER_QUERIES_CUSTOM_QUESTION_ENABLED %>">
+			<div id="<portlet:namespace />customQuestionDiv">
+				<aui:input fieldParam="reminderQueryCustomQuestion" label="custom-question" name="reminderQueryQuestion" />
+			</div>
+		</c:if>
+
+		<aui:input label="answer" maxlength="75" name="reminderQueryAnswer" size="50" value="<%= selUser.getReminderQueryAnswer() %>" />
+	</aui:fieldset>
+
+	<aui:script use="aui-base">
+		var reminderQueryQuestion = A.one('#<portlet:namespace />reminderQueryQuestion');
+		var customQuestionDiv = A.one('#<portlet:namespace />customQuestionDiv');
+
+		if (<%= !hasCustomQuestion %> && customQuestionDiv) {
+			customQuestionDiv.hide();
+		}
+
+		if (reminderQueryQuestion) {
+			reminderQueryQuestion.on(
+				'change',
+				function(event) {
+					if (event.target.val() == '<%= UsersAdmin.CUSTOM_QUESTION %>') {
+						var reminderQueryCustomQuestion = A.one('#<portlet:namespace />reminderQueryCustomQuestion');
+
+						if (customQuestionDiv) {
+							customQuestionDiv.show();
+						}
+
+						<%
+						for (String question : PropsValues.USERS_REMINDER_QUERIES_QUESTIONS) {
+						%>
+
+							if (reminderQueryCustomQuestion && (reminderQueryCustomQuestion.val() == '<%= UnicodeFormatter.toString(question) %>')) {
+								reminderQueryCustomQuestion.val('');
+							}
+
+						<%
+						}
+						%>
+
+						Liferay.Util.focusFormField(reminderQueryCustomQuestion);
+					}
+					else {
+						if (customQuestionDiv) {
+							customQuestionDiv.hide();
+						}
+
+						Liferay.Util.focusFormField(A.one('#<portlet:namespace />reminderQueryAnswer'));
+					}
+				}
+			);
+		}
+	</aui:script>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/password_reminder_query_question.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/password_reminder_query_question.jspf
new file mode 100644
index 0000000..711c4c5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/password_reminder_query_question.jspf
@@ -0,0 +1,29 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<c:choose>
+	<c:when test="<%= reminderQueryQuestion.equals(question) %>">
+
+		<%
+		hasCustomQuestion = false;
+		%>
+
+		<aui:option label="<%= question %>" selected="<%= true %>" value="<%= question %>" />
+	</c:when>
+	<c:otherwise>
+		<aui:option label="<%= question %>" />
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/password_reminder_query_questions.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/password_reminder_query_questions.jspf
new file mode 100644
index 0000000..bcc07d2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/password_reminder_query_questions.jspf
@@ -0,0 +1,40 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<aui:select label="question" name="reminderQueryQuestion">
+
+	<%
+	String reminderQueryQuestion = selUser.getReminderQueryQuestion();
+
+	Set<String> questions = selUser.getReminderQueryQuestions();
+
+	for (String question : questions) {
+	%>
+
+		<%@ include file="/html/portlet/users_admin/user/password_reminder_query_question.jspf" %>
+
+	<%
+	}
+
+	if (hasCustomQuestion && Validator.isNull(reminderQueryQuestion)) {
+		hasCustomQuestion = false;
+	}
+	%>
+
+	<c:if test="<%= PropsValues.USERS_REMINDER_QUERIES_CUSTOM_QUESTION_ENABLED %>">
+		<aui:option label="write-my-own-question" selected="<%= hasCustomQuestion %>" useModelValue="<%= false %>" value="<%= UsersAdmin.CUSTOM_QUESTION %>" />
+	</c:if>
+</aui:select>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/personal_site.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/personal_site.jsp
new file mode 100644
index 0000000..f3e8507
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/personal_site.jsp
@@ -0,0 +1,237 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+User selUser = (User)request.getAttribute("user.selUser");
+
+List<LayoutSetPrototype> layoutSetPrototypes = LayoutSetPrototypeServiceUtil.search(company.getCompanyId(), Boolean.TRUE, null);
+
+LayoutSet privateLayoutSet = null;
+LayoutSetPrototype privateLayoutSetPrototype = null;
+boolean privateLayoutSetPrototypeLinkEnabled = true;
+
+LayoutSet publicLayoutSet = null;
+LayoutSetPrototype publicLayoutSetPrototype = null;
+boolean publicLayoutSetPrototypeLinkEnabled = true;
+
+if (selUser != null) {
+	Group userGroup = selUser.getGroup();
+
+	if (userGroup != null) {
+		try {
+			LayoutLocalServiceUtil.getLayouts(userGroup.getGroupId(), false, LayoutConstants.DEFAULT_PARENT_LAYOUT_ID);
+
+			privateLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(userGroup.getGroupId(), true);
+
+			privateLayoutSetPrototypeLinkEnabled = privateLayoutSet.isLayoutSetPrototypeLinkEnabled();
+
+			String layoutSetPrototypeUuid = privateLayoutSet.getLayoutSetPrototypeUuid();
+
+			if (Validator.isNotNull(layoutSetPrototypeUuid)) {
+				privateLayoutSetPrototype = LayoutSetPrototypeLocalServiceUtil.getLayoutSetPrototypeByUuidAndCompanyId(layoutSetPrototypeUuid, company.getCompanyId());
+			}
+		}
+		catch (Exception e) {
+		}
+
+		try {
+			LayoutLocalServiceUtil.getLayouts(userGroup.getGroupId(), true, LayoutConstants.DEFAULT_PARENT_LAYOUT_ID);
+
+			publicLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(userGroup.getGroupId(), false);
+
+			publicLayoutSetPrototypeLinkEnabled = publicLayoutSet.isLayoutSetPrototypeLinkEnabled();
+
+			String layoutSetPrototypeUuid = publicLayoutSet.getLayoutSetPrototypeUuid();
+
+			if (Validator.isNotNull(layoutSetPrototypeUuid)) {
+				publicLayoutSetPrototype = LayoutSetPrototypeLocalServiceUtil.getLayoutSetPrototypeByUuidAndCompanyId(layoutSetPrototypeUuid, company.getCompanyId());
+			}
+		}
+		catch (Exception e) {
+		}
+	}
+}
+%>
+
+<h3><liferay-ui:message key="personal-site" /></h3>
+
+<aui:fieldset>
+
+	<%
+	boolean hasUnlinkLayoutSetPrototypePermission = PortalPermissionUtil.contains(permissionChecker, ActionKeys.UNLINK_LAYOUT_SET_PROTOTYPE);
+	%>
+
+	<c:choose>
+		<c:when test="<%= PropsValues.LAYOUT_USER_PUBLIC_LAYOUTS_ENABLED && ((selUser == null) || ((publicLayoutSetPrototype == null) && (selUser.getPublicLayoutsPageCount() == 0))) && !layoutSetPrototypes.isEmpty() %>">
+			<aui:select label="public-pages" name="publicLayoutSetPrototypeId">
+				<aui:option label="none" selected="<%= true %>" value="" />
+
+				<%
+				for (LayoutSetPrototype layoutSetPrototype : layoutSetPrototypes) {
+				%>
+
+					<aui:option label="<%= HtmlUtil.escape(layoutSetPrototype.getName(user.getLanguageId())) %>" value="<%= layoutSetPrototype.getLayoutSetPrototypeId() %>" />
+
+				<%
+				}
+				%>
+
+			</aui:select>
+
+			<c:choose>
+				<c:when test="<%= hasUnlinkLayoutSetPrototypePermission %>">
+					<div class="hide" id="<portlet:namespace />publicLayoutSetPrototypeIdOptions">
+						<aui:input helpMessage="enable-propagation-of-changes-from-the-site-template-help" label="enable-propagation-of-changes-from-the-site-template" name="publicLayoutSetPrototypeLinkEnabled" type="checkbox" value="<%= publicLayoutSetPrototypeLinkEnabled %>" />
+					</div>
+				</c:when>
+				<c:otherwise>
+					<aui:input name="publicLayoutSetPrototypeLinkEnabled" type="hidden" value="<%= true %>" />
+				</c:otherwise>
+			</c:choose>
+		</c:when>
+		<c:otherwise>
+			<aui:field-wrapper label="public-pages">
+				<c:choose>
+					<c:when test="<%= selUser != null %>">
+						<liferay-portlet:actionURL portletName="<%= PortletKeys.SITE_REDIRECTOR %>" var="publicPagesURL">
+							<portlet:param name="struts_action" value="/my_sites/view" />
+							<portlet:param name="groupId" value="<%= String.valueOf(selUser.getGroup().getGroupId()) %>" />
+							<portlet:param name="privateLayout" value="<%= Boolean.FALSE.toString() %>" />
+						</liferay-portlet:actionURL>
+
+						<c:choose>
+							<c:when test="<%= selUser.getPublicLayoutsPageCount() > 0 %>">
+								<liferay-ui:icon
+									image="view"
+									label="<%= true %>"
+									message="open-public-pages"
+									method="get"
+									target="_blank"
+									url="<%= publicPagesURL.toString() %>"
+								/>
+							</c:when>
+							<c:otherwise>
+								<liferay-ui:message key="this-user-does-not-have-any-public-pages" />
+							</c:otherwise>
+						</c:choose>
+
+						<c:if test="<%= PropsValues.LAYOUT_USER_PUBLIC_LAYOUTS_ENABLED %>">
+							<c:choose>
+								<c:when test="<%= (publicLayoutSetPrototype != null) && hasUnlinkLayoutSetPrototypePermission %>">
+									<aui:input label='<%= LanguageUtil.format(pageContext, "enable-propagation-of-changes-from-the-site-template-x", HtmlUtil.escape(publicLayoutSetPrototype.getName(user.getLanguageId()))) %>' name="publicLayoutSetPrototypeLinkEnabled" type="checkbox" value="<%= publicLayoutSetPrototypeLinkEnabled %>" />
+								</c:when>
+								<c:when test="<%= publicLayoutSetPrototype != null %>">
+									<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(privateLayoutSetPrototype.getName(locale))} %>" key="these-pages-are-linked-to-site-template-x" />
+
+									<aui:input name="layoutSetPrototypeLinkEnabled" type="hidden" value="<%= true %>" />
+								</c:when>
+							</c:choose>
+						</c:if>
+					</c:when>
+				</c:choose>
+			</aui:field-wrapper>
+		</c:otherwise>
+	</c:choose>
+
+	<c:choose>
+		<c:when test="<%= PropsValues.LAYOUT_USER_PRIVATE_LAYOUTS_ENABLED && ((selUser == null) || ((privateLayoutSetPrototype == null) && (selUser.getPrivateLayoutsPageCount() == 0))) && !layoutSetPrototypes.isEmpty() %>">
+			<aui:select label="private-pages" name="privateLayoutSetPrototypeId">
+				<aui:option label="none" selected="<%= true %>" value="" />
+
+				<%
+				for (LayoutSetPrototype layoutSetPrototype : layoutSetPrototypes) {
+				%>
+
+					<aui:option label="<%= HtmlUtil.escape(layoutSetPrototype.getName(user.getLanguageId())) %>" value="<%= layoutSetPrototype.getLayoutSetPrototypeId() %>" />
+
+				<%
+				}
+				%>
+
+			</aui:select>
+
+			<c:choose>
+				<c:when test="<%= hasUnlinkLayoutSetPrototypePermission %>">
+					<div class="hide" id="<portlet:namespace />privateLayoutSetPrototypeIdOptions">
+						<aui:input helpMessage="enable-propagation-of-changes-from-the-site-template-help" label="enable-propagation-of-changes-from-the-site-template" name="privateLayoutSetPrototypeLinkEnabled" type="checkbox" value="<%= privateLayoutSetPrototypeLinkEnabled %>" />
+					</div>
+				</c:when>
+				<c:otherwise>
+					<aui:input name="privateLayoutSetPrototypeLinkEnabled" type="hidden" value="<%= true %>" />
+				</c:otherwise>
+			</c:choose>
+		</c:when>
+		<c:otherwise>
+			<aui:field-wrapper label="private-pages">
+				<c:choose>
+					<c:when test="<%= selUser != null %>">
+						<liferay-portlet:actionURL portletName="<%= PortletKeys.SITE_REDIRECTOR %>" var="privatePagesURL">
+							<portlet:param name="struts_action" value="/my_sites/view" />
+							<portlet:param name="groupId" value="<%= String.valueOf(selUser.getGroup().getGroupId()) %>" />
+							<portlet:param name="privateLayout" value="<%= Boolean.TRUE.toString() %>" />
+						</liferay-portlet:actionURL>
+
+						<c:choose>
+							<c:when test="<%= selUser.getPrivateLayoutsPageCount() > 0 %>">
+								<liferay-ui:icon
+									image="view"
+									label="<%= true %>"
+									message="open-private-pages"
+									method="get"
+									target="_blank"
+									url="<%= privatePagesURL.toString() %>"
+								/>
+							</c:when>
+							<c:otherwise>
+								<liferay-ui:message key="this-user-does-not-have-any-private-pages" />
+								</c:otherwise>
+						</c:choose>
+
+						<c:if test="<%= PropsValues.LAYOUT_USER_PRIVATE_LAYOUTS_ENABLED %>">
+							<c:choose>
+								<c:when test="<%= (privateLayoutSetPrototype != null) && hasUnlinkLayoutSetPrototypePermission %>">
+									<aui:input label='<%= LanguageUtil.format(pageContext, "enable-propagation-of-changes-from-the-site-template-x", HtmlUtil.escape(privateLayoutSetPrototype.getName(user.getLanguageId()))) %>' name="privateLayoutSetPrototypeLinkEnabled" type="checkbox" value="<%= privateLayoutSetPrototypeLinkEnabled %>" />
+								</c:when>
+								<c:when test="<%= privateLayoutSetPrototype != null %>">
+									<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(privateLayoutSetPrototype.getName(locale))} %>" key="these-pages-are-linked-to-site-template-x" />
+
+									<aui:input name="layoutSetPrototypeLinkEnabled" type="hidden" value="<%= true %>" />
+								</c:when>
+							</c:choose>
+						</c:if>
+					</c:when>
+				</c:choose>
+			</aui:field-wrapper>
+		</c:otherwise>
+	</c:choose>
+</aui:fieldset>
+
+<%
+if ((selUser == null) && layoutSetPrototypes.isEmpty()) {
+	request.setAttribute(WebKeys.FORM_NAVIGATOR_SECTION_SHOW + "pages", Boolean.FALSE);
+}
+%>
+
+<aui:script>
+	function <portlet:namespace />isVisible(currentValue, value) {
+		return currentValue != '';
+	}
+
+	Liferay.Util.toggleSelectBox('<portlet:namespace />publicLayoutSetPrototypeId', <portlet:namespace />isVisible, '<portlet:namespace />publicLayoutSetPrototypeIdOptions');
+	Liferay.Util.toggleSelectBox('<portlet:namespace />privateLayoutSetPrototypeId', <portlet:namespace />isVisible, '<portlet:namespace />privateLayoutSetPrototypeIdOptions');
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/phone_numbers.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/phone_numbers.jsp
new file mode 100644
index 0000000..43c6c75
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/phone_numbers.jsp
@@ -0,0 +1,17 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/common/phone_numbers.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/roles.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/roles.jsp
new file mode 100644
index 0000000..4a4be42
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/roles.jsp
@@ -0,0 +1,468 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+User selUser = (User)request.getAttribute("user.selUser");
+List<Group> groups = (List<Group>)request.getAttribute("user.groups");
+List<Organization> organizations = (List<Organization>)request.getAttribute("user.organizations");
+Long[] organizationIds = UsersAdminUtil.getOrganizationIds(organizations);
+List<Role> roles = (List<Role>)request.getAttribute("user.roles");
+List<UserGroupRole> organizationRoles = (List<UserGroupRole>)request.getAttribute("user.organizationRoles");
+List<UserGroupRole> siteRoles = (List<UserGroupRole>)request.getAttribute("user.siteRoles");
+List<Group> allGroups = (List<Group>)request.getAttribute("user.allGroups");
+
+List<UserGroupRole> userGroupRoles = new ArrayList<UserGroupRole>();
+
+userGroupRoles.addAll(organizationRoles);
+userGroupRoles.addAll(siteRoles);
+%>
+
+<liferay-ui:error-marker key="errorSection" value="roles" />
+
+<liferay-ui:membership-policy-error />
+
+<liferay-util:buffer var="removeRoleIcon">
+	<liferay-ui:icon
+		image="unlink"
+		label="<%= true %>"
+		message="remove"
+	/>
+</liferay-util:buffer>
+
+<aui:input name="groupRolesRoleIds" type="hidden" value="<%= ListUtil.toString(userGroupRoles, UserGroupRole.ROLE_ID_ACCESSOR) %>" />
+<aui:input name="groupRolesGroupIds" type="hidden" value="<%= ListUtil.toString(userGroupRoles, UserGroupRole.GROUP_ID_ACCESSOR) %>" />
+
+<h3><liferay-ui:message key="regular-roles" /></h3>
+
+<liferay-ui:search-container
+	headerNames="title,null"
+	id="rolesSearchContainer"
+>
+	<liferay-ui:search-container-results
+		results="<%= roles %>"
+		total="<%= roles.size() %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.Role"
+		keyProperty="roleId"
+		modelVar="role"
+	>
+		<liferay-util:param name="className" value="<%= RolesAdminUtil.getCssClassName(role) %>" />
+		<liferay-util:param name="classHoverName" value="<%= RolesAdminUtil.getCssClassName(role) %>" />
+
+		<liferay-ui:search-container-column-text
+			name="title"
+			value="<%= HtmlUtil.escape(role.getTitle(locale)) %>"
+		/>
+
+		<c:if test="<%= !portletName.equals(PortletKeys.MY_ACCOUNT) && !RoleMembershipPolicyUtil.isRoleRequired(selUser.getUserId(), role.getRoleId()) %>">
+			<liferay-ui:search-container-column-text>
+				<a class="modify-link" data-rowId="<%= role.getRoleId() %>" href="javascript:;"><%= removeRoleIcon %></a>
+			</liferay-ui:search-container-column-text>
+		</c:if>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator paginate="<%= false %>" />
+</liferay-ui:search-container>
+
+<c:if test="<%= !portletName.equals(PortletKeys.MY_ACCOUNT) %>">
+	<liferay-ui:icon
+		cssClass="modify-link"
+		iconCssClass="icon-search"
+		id="selectRegularRoleLink"
+		label="<%= true %>"
+		linkCssClass="btn"
+		message="select"
+		method="get"
+		url="javascript:;"
+	/>
+
+	<aui:script use="aui-base">
+		A.one('#<portlet:namespace />selectRegularRoleLink').on(
+			'click',
+			function(event) {
+				Liferay.Util.selectEntity(
+					{
+						dialog: {
+							constrain: true,
+							modal: true,
+							width: 600
+						},
+						id: '<portlet:namespace />selectRegularRole',
+						title: '<liferay-ui:message arguments="regular-role" key="select-x" />',
+						uri: '<portlet:renderURL windowState="<%= LiferayWindowState.POP_UP.toString() %>"><portlet:param name="struts_action" value="/users_admin/select_regular_role" /><portlet:param name="p_u_i_d" value='<%= (selUser == null) ? "0" : String.valueOf(selUser.getUserId()) %>' /></portlet:renderURL>'
+					},
+					function(event) {
+						<portlet:namespace />selectRole(event.roleid, event.roletitle, event.searchcontainername, event.groupdescriptivename, event.groupid);
+					}
+				);
+			}
+		);
+	</aui:script>
+</c:if>
+
+<h3><liferay-ui:message key="inherited-roles" /></h3>
+
+<liferay-ui:search-container
+	headerNames="title,group"
+	id="inheritedRolesSearchContainer"
+>
+
+	<%
+	List<Group> roleGroups = new ArrayList<Group>();
+
+	for (Group group : allGroups) {
+		if (RoleLocalServiceUtil.hasGroupRoles(group.getGroupId())) {
+			roleGroups.add(group);
+		}
+	}
+	%>
+
+	<liferay-ui:search-container-results
+		results="<%= roleGroups %>"
+		total="<%= roleGroups.size() %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.Group"
+		keyProperty="groupId"
+		modelVar="group"
+		rowIdProperty="friendlyURL"
+	>
+
+		<%
+		List<Role> groupRoles = RoleLocalServiceUtil.getGroupRoles(group.getGroupId());
+		%>
+
+		<liferay-util:param name="className" value="<%= RolesAdminUtil.getCssClassName(groupRoles.get(0)) %>" />
+		<liferay-util:param name="classHoverName" value="<%= RolesAdminUtil.getCssClassName(groupRoles.get(0)) %>" />
+
+		<liferay-ui:search-container-column-text
+			name="title"
+			value="<%= HtmlUtil.escape(ListUtil.toString(groupRoles, Role.NAME_ACCESSOR)) %>"
+		/>
+
+		<liferay-ui:search-container-column-text
+			name="group"
+			value="<%= HtmlUtil.escape(group.getDescriptiveName(locale)) %>"
+		/>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator paginate="<%= false %>" />
+</liferay-ui:search-container>
+
+<h3><liferay-ui:message key="organization-roles" /></h3>
+
+<c:if test="<%= organizations.isEmpty() && organizationRoles.isEmpty() %>">
+	<liferay-ui:message key="this-user-does-not-belong-to-an-organization-to-which-an-organization-role-can-be-assigned" />
+</c:if>
+
+<c:if test="<%= !organizations.isEmpty() %>">
+	<liferay-ui:search-container
+		headerNames="title,organization,null"
+		id="organizationRolesSearchContainer"
+	>
+		<liferay-ui:search-container-results
+			results="<%= organizationRoles %>"
+			total="<%= organizationRoles.size() %>"
+		/>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.model.UserGroupRole"
+			keyProperty="roleId"
+			modelVar="userGroupRole"
+		>
+			<liferay-util:param name="className" value="<%= RolesAdminUtil.getCssClassName(userGroupRole.getRole()) %>" />
+			<liferay-util:param name="classHoverName" value="<%= RolesAdminUtil.getCssClassName(userGroupRole.getRole()) %>" />
+
+			<liferay-ui:search-container-column-text
+				name="title"
+				value="<%= HtmlUtil.escape(userGroupRole.getRole().getTitle(locale)) %>"
+			/>
+
+			<liferay-ui:search-container-column-text
+				name="organization"
+				value="<%= HtmlUtil.escape(userGroupRole.getGroup().getDescriptiveName(locale)) %>"
+			/>
+
+			<%
+			boolean membershipProtected = false;
+
+			Group group = userGroupRole.getGroup();
+
+			Role role = userGroupRole.getRole();
+
+			if (role.getType() == RoleConstants.TYPE_ORGANIZATION) {
+				membershipProtected = OrganizationMembershipPolicyUtil.isMembershipProtected(permissionChecker, userGroupRole.getUserId(), group.getOrganizationId());
+			}
+			else {
+				membershipProtected = SiteMembershipPolicyUtil.isMembershipProtected(permissionChecker, userGroupRole.getUserId(), group.getGroupId());
+			}
+			%>
+
+			<c:if test="<%= !portletName.equals(PortletKeys.MY_ACCOUNT) && !membershipProtected %>">
+				<liferay-ui:search-container-column-text>
+					<a class="modify-link" data-groupId="<%= userGroupRole.getGroupId() %>" data-rowId="<%= userGroupRole.getRoleId() %>" href="javascript:;"><%= removeRoleIcon %></a>
+				</liferay-ui:search-container-column-text>
+			</c:if>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator paginate="<%= false %>" />
+	</liferay-ui:search-container>
+
+	<aui:script use="liferay-search-container">
+		var searchContainer = Liferay.SearchContainer.get('<portlet:namespace />organizationRolesSearchContainer');
+
+		searchContainer.get('contentBox').delegate(
+			'click',
+			function(event) {
+				var link = event.currentTarget;
+				var tr = link.ancestor('tr');
+
+				var rowId = link.getAttribute('data-rowId');
+				var groupId =link.getAttribute('data-groupId');
+
+				searchContainer.deleteRow(tr, rowId);
+
+				<portlet:namespace />deleteGroupRole(rowId, groupId);
+			},
+			'.modify-link'
+		);
+	</aui:script>
+</c:if>
+
+<c:if test="<%= !organizations.isEmpty() && !portletName.equals(PortletKeys.MY_ACCOUNT) %>">
+	<liferay-ui:icon
+		cssClass="modify-link"
+		iconCssClass="icon-search"
+		id="selectOrganizationRoleLink"
+		label="<%= true %>"
+		linkCssClass="btn"
+		message="select"
+		method="get"
+		url="javascript:;"
+	/>
+
+	<aui:script use="aui-base">
+		A.one('#<portlet:namespace />selectOrganizationRoleLink').on(
+			'click',
+			function(event) {
+				Liferay.Util.selectEntity(
+					{
+						dialog: {
+							modal: true
+						},
+						id: '<portlet:namespace />selectOrganizationRole',
+						title: '<liferay-ui:message arguments="organization-role" key="select-x" />',
+						uri: '<portlet:renderURL windowState="<%= LiferayWindowState.POP_UP.toString() %>"><portlet:param name="struts_action" value="/users_admin/select_organization_role" /><portlet:param name="step" value="1" /><portlet:param name="organizationIds" value="<%= StringUtil.merge(organizationIds) %>" /><portlet:param name="p_u_i_d" value='<%= (selUser == null) ? "0" : String.valueOf(selUser.getUserId()) %>' /></portlet:renderURL>'
+					},
+					function(event) {
+						<portlet:namespace />selectRole(event.roleid, event.roletitle, event.searchcontainername, event.groupdescriptivename, event.groupid);
+					}
+				);
+			}
+		);
+	</aui:script>
+</c:if>
+
+<h3><liferay-ui:message key="site-roles" /></h3>
+
+<c:choose>
+	<c:when test="<%= groups.isEmpty() %>">
+		<liferay-ui:message key="this-user-does-not-belong-to-a-site-to-which-a-site-role-can-be-assigned" />
+	</c:when>
+	<c:otherwise>
+		<liferay-ui:search-container
+			headerNames="title,site,null"
+			id="siteRolesSearchContainer"
+		>
+			<liferay-ui:search-container-results
+				results="<%= siteRoles %>"
+				total="<%= siteRoles.size() %>"
+			/>
+
+			<liferay-ui:search-container-row
+				className="com.liferay.portal.model.UserGroupRole"
+				keyProperty="roleId"
+				modelVar="userGroupRole"
+			>
+				<liferay-util:param name="className" value="<%= RolesAdminUtil.getCssClassName(userGroupRole.getRole()) %>" />
+				<liferay-util:param name="classHoverName" value="<%= RolesAdminUtil.getCssClassName(userGroupRole.getRole()) %>" />
+
+				<liferay-ui:search-container-column-text
+					name="title"
+					value="<%= HtmlUtil.escape(userGroupRole.getRole().getTitle(locale)) %>"
+				/>
+
+				<liferay-ui:search-container-column-text
+					name="site"
+					value="<%= HtmlUtil.escape(userGroupRole.getGroup().getDescriptiveName(locale)) %>"
+				/>
+
+				<%
+				boolean membershipProtected = false;
+
+				Group group = userGroupRole.getGroup();
+
+				Role role = userGroupRole.getRole();
+
+				if (role.getType() == RoleConstants.TYPE_ORGANIZATION) {
+					membershipProtected = OrganizationMembershipPolicyUtil.isMembershipProtected(permissionChecker, userGroupRole.getUserId(), group.getOrganizationId());
+				}
+				else {
+					membershipProtected = SiteMembershipPolicyUtil.isMembershipProtected(permissionChecker, userGroupRole.getUserId(), group.getGroupId());
+				}
+				%>
+
+				<c:if test="<%= !portletName.equals(PortletKeys.MY_ACCOUNT) && !membershipProtected %>">
+					<liferay-ui:search-container-column-text>
+						<a class="modify-link" data-groupId="<%= userGroupRole.getGroupId() %>" data-rowId="<%= userGroupRole.getRoleId() %>" href="javascript:;"><%= removeRoleIcon %></a>
+					</liferay-ui:search-container-column-text>
+				</c:if>
+			</liferay-ui:search-container-row>
+
+			<liferay-ui:search-iterator paginate="<%= false %>" />
+		</liferay-ui:search-container>
+
+		<c:if test="<%= !portletName.equals(PortletKeys.MY_ACCOUNT) %>">
+			<liferay-ui:icon
+				cssClass="modify-link"
+				iconCssClass="icon-search"
+				id="selectSiteRoleLink"
+				label="<%= true %>"
+				linkCssClass="btn"
+				message="select"
+				method="get"
+				url="javascript:;"
+			/>
+
+			<aui:script use="liferay-search-container">
+				var searchContainer = Liferay.SearchContainer.get('<portlet:namespace />siteRolesSearchContainer');
+
+				searchContainer.get('contentBox').delegate(
+					'click',
+					function(event) {
+						var link = event.currentTarget;
+						var tr = link.ancestor('tr');
+
+						var rowId = link.getAttribute('data-rowId');
+						var groupId =link.getAttribute('data-groupId');
+
+						searchContainer.deleteRow(tr, rowId);
+
+						<portlet:namespace />deleteGroupRole(rowId, groupId);
+					},
+					'.modify-link'
+				);
+
+				A.one('#<portlet:namespace />selectSiteRoleLink').on(
+					'click',
+					function(event) {
+						Liferay.Util.selectEntity(
+							{
+								dialog: {
+									constrain: true,
+									modal: true,
+									width: 600
+								},
+								id: '<portlet:namespace />selectSiteRole',
+								title: '<liferay-ui:message arguments="site-role" key="select-x" />',
+								uri: '<portlet:renderURL windowState="<%= LiferayWindowState.POP_UP.toString() %>"><portlet:param name="struts_action" value="/users_admin/select_site_role" /><portlet:param name="step" value="1" /><portlet:param name="p_u_i_d" value='<%= (selUser == null) ? "0" : String.valueOf(selUser.getUserId()) %>' /></portlet:renderURL>'
+							},
+							function(event) {
+								<portlet:namespace />selectRole(event.roleid, event.roletitle, event.searchcontainername, event.groupdescriptivename, event.groupid);
+							}
+						);
+					}
+				);
+			</aui:script>
+		</c:if>
+	</c:otherwise>
+</c:choose>
+
+<aui:script>
+	var <portlet:namespace />groupRolesGroupIds = ['<%= ListUtil.toString(userGroupRoles, UserGroupRole.GROUP_ID_ACCESSOR, "', '") %>'];
+	var <portlet:namespace />groupRolesRoleIds = ['<%= ListUtil.toString(userGroupRoles, UserGroupRole.ROLE_ID_ACCESSOR, "', '") %>'];
+
+	function <portlet:namespace />deleteGroupRole(roleId, groupId) {
+		for (var i = 0; i < <portlet:namespace />groupRolesRoleIds.length; i++) {
+			if ((<portlet:namespace />groupRolesRoleIds[i] == roleId) && (<portlet:namespace />groupRolesGroupIds[i] == groupId)) {
+				<portlet:namespace />groupRolesGroupIds.splice(i, 1);
+				<portlet:namespace />groupRolesRoleIds.splice(i, 1);
+
+				break;
+			}
+		}
+
+		document.<portlet:namespace />fm.<portlet:namespace />groupRolesGroupIds.value = <portlet:namespace />groupRolesGroupIds.join(',');
+		document.<portlet:namespace />fm.<portlet:namespace />groupRolesRoleIds.value = <portlet:namespace />groupRolesRoleIds.join(',');
+	}
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />selectRole',
+		function(roleId, name, searchContainer, groupName, groupId) {
+			var A = AUI();
+
+			var searchContainerName = '<portlet:namespace />' + searchContainer + 'SearchContainer';
+
+			searchContainer = Liferay.SearchContainer.get(searchContainerName);
+
+			var rowColumns = [];
+
+			rowColumns.push(A.Escape.html(name));
+
+			if (groupName) {
+				rowColumns.push(A.Escape.html(groupName));
+			}
+
+			if (groupId) {
+				rowColumns.push('<a class="modify-link" data-groupId="' + groupId + '" data-rowId="' + roleId + '" href="javascript:;"><%= UnicodeFormatter.toString(removeRoleIcon) %></a>');
+
+				<portlet:namespace />groupRolesRoleIds.push(roleId);
+				<portlet:namespace />groupRolesGroupIds.push(groupId);
+
+				document.<portlet:namespace />fm.<portlet:namespace />groupRolesRoleIds.value = <portlet:namespace />groupRolesRoleIds.join(',');
+				document.<portlet:namespace />fm.<portlet:namespace />groupRolesGroupIds.value = <portlet:namespace />groupRolesGroupIds.join(',');
+			}
+			else {
+				rowColumns.push('<a class="modify-link" data-rowId="' + roleId + '" href="javascript:;"><%= UnicodeFormatter.toString(removeRoleIcon) %></a>');
+			}
+
+			searchContainer.addRow(rowColumns, roleId);
+			searchContainer.updateDataStore();
+		},
+		['liferay-search-container', 'escape']
+	);
+</aui:script>
+
+<aui:script use="liferay-search-container">
+	var searchContainer = Liferay.SearchContainer.get('<portlet:namespace />rolesSearchContainer');
+
+	searchContainer.get('contentBox').delegate(
+		'click',
+		function(event) {
+			var link = event.currentTarget;
+			var tr = link.ancestor('tr');
+
+			searchContainer.deleteRow(tr, link.getAttribute('data-rowId'));
+		},
+		'.modify-link'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/search_columns.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/search_columns.jspf
new file mode 100644
index 0000000..ba81659
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/search_columns.jspf
@@ -0,0 +1,73 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/directory/user/search_columns_user_name.jspf" %>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="screen-name"
+	orderable="<%= true %>"
+	property="screenName"
+/>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="job-title"
+	orderable="<%= true %>"
+	value="<%= user2.getJobTitle() %>"
+/>
+
+<c:choose>
+	<c:when test="<%= organizationContextView && (organizationGroupId > 0) %>">
+		<liferay-ui:search-container-column-text
+			buffer="buffer"
+			href="<%= rowURL %>"
+			name="organization-roles"
+		>
+
+			<%
+			List<UserGroupRole> userGroupRoles = UserGroupRoleLocalServiceUtil.getUserGroupRoles(user2.getUserId(), organizationGroupId);
+
+			for (UserGroupRole userGroupRole : userGroupRoles) {
+				Role curRole = RoleLocalServiceUtil.getRole(userGroupRole.getRoleId());
+
+				buffer.append(HtmlUtil.escape(curRole.getTitle(locale)));
+				buffer.append(StringPool.COMMA_AND_SPACE);
+			}
+
+			if (!userGroupRoles.isEmpty()) {
+				buffer.setIndex(buffer.index() - 1);
+			}
+			%>
+
+		</liferay-ui:search-container-column-text>
+	</c:when>
+	<c:otherwise>
+		<liferay-ui:search-container-column-text
+			href="<%= rowURL %>"
+			name="organizations"
+		>
+			<liferay-ui:write bean="<%= user2 %>" property="organizations" />
+		</liferay-ui:search-container-column-text>
+	</c:otherwise>
+</c:choose>
+
+<liferay-ui:search-container-column-text
+	href="<%= rowURL %>"
+	name="user-groups"
+>
+	<liferay-ui:write bean="<%= user2 %>" property="user-groups" />
+</liferay-ui:search-container-column-text>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/sites.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/sites.jsp
new file mode 100644
index 0000000..bd62378
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/sites.jsp
@@ -0,0 +1,154 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+User selUser = (User)request.getAttribute("user.selUser");
+List<Group> groups = (List<Group>)request.getAttribute("user.groups");
+%>
+
+<liferay-ui:error-marker key="errorSection" value="sites" />
+
+<liferay-ui:membership-policy-error />
+
+<liferay-util:buffer var="removeGroupIcon">
+	<liferay-ui:icon
+		image="unlink"
+		label="<%= true %>"
+		message="remove"
+	/>
+</liferay-util:buffer>
+
+<h3><liferay-ui:message key="sites" /></h3>
+
+<liferay-ui:search-container
+	headerNames="name,roles,null"
+>
+	<liferay-ui:search-container-results
+		results="<%= groups %>"
+		total="<%= groups.size() %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.Group"
+		escapedModel="<%= true %>"
+		keyProperty="groupId"
+		modelVar="group"
+		rowIdProperty="friendlyURL"
+	>
+		<liferay-ui:search-container-column-text
+			name="name"
+			value="<%= HtmlUtil.escape(group.getDescriptiveName(locale)) %>"
+		/>
+
+		<liferay-ui:search-container-column-text
+			buffer="buffer"
+			name="roles"
+		>
+
+			<%
+			List<UserGroupRole> userGroupRoles = UserGroupRoleLocalServiceUtil.getUserGroupRoles(selUser.getUserId(), group.getGroupId());
+
+			for (UserGroupRole userGroupRole : userGroupRoles) {
+				Role role = RoleLocalServiceUtil.getRole(userGroupRole.getRoleId());
+
+				buffer.append(HtmlUtil.escape(role.getTitle(locale)));
+				buffer.append(StringPool.COMMA_AND_SPACE);
+			}
+
+			if (!userGroupRoles.isEmpty()) {
+				buffer.setIndex(buffer.index() - 1);
+			}
+			%>
+
+		</liferay-ui:search-container-column-text>
+
+		<c:if test="<%= !portletName.equals(PortletKeys.MY_ACCOUNT) && !SiteMembershipPolicyUtil.isMembershipRequired(selUser.getUserId(), group.getGroupId()) && !SiteMembershipPolicyUtil.isMembershipProtected(permissionChecker, selUser.getUserId(), group.getGroupId()) %>">
+			<liferay-ui:search-container-column-text>
+				<c:if test="<%= group.isManualMembership() %>">
+					<a class="modify-link" data-rowId="<%= group.getGroupId() %>" href="javascript:;"><%= removeGroupIcon %></a>
+				</c:if>
+			</liferay-ui:search-container-column-text>
+		</c:if>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator paginate="<%= false %>" />
+</liferay-ui:search-container>
+
+<c:if test="<%= !portletName.equals(PortletKeys.MY_ACCOUNT) %>">
+	<br />
+
+	<liferay-ui:icon
+		cssClass="modify-link"
+		iconCssClass="icon-search"
+		id="selectSiteLink"
+		label="<%= true %>"
+		linkCssClass="btn"
+		message="select"
+		url="javascript:;"
+	/>
+
+	<portlet:renderURL var="groupSelectorURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+		<portlet:param name="struts_action" value="/users_admin/select_site" />
+		<portlet:param name="p_u_i_d" value="<%= String.valueOf(selUser.getUserId()) %>" />
+	</portlet:renderURL>
+
+	<aui:script use="escape,liferay-search-container">
+		A.one('#<portlet:namespace />selectSiteLink').on(
+			'click',
+			function(event) {
+				Liferay.Util.selectEntity(
+					{
+						dialog: {
+							constrain: true,
+							modal: true,
+							width: 600
+						},
+						id: '<portlet:namespace />selectGroup',
+						title: '<liferay-ui:message arguments="site" key="select-x" />',
+						uri: '<%= groupSelectorURL.toString() %>'
+					},
+					function(event) {
+						var searchContainer = Liferay.SearchContainer.get('<portlet:namespace />groupsSearchContainer');
+
+						var rowColumns = [];
+
+						rowColumns.push(A.Escape.html(event.groupdescriptivename));
+						rowColumns.push('');
+						rowColumns.push('<a class="modify-link" data-rowId="' + event.groupid + '" href="javascript:;"><%= UnicodeFormatter.toString(removeGroupIcon) %></a>');
+
+						searchContainer.addRow(rowColumns, event.groupid);
+						searchContainer.updateDataStore();
+					}
+				);
+			}
+		);
+
+		var searchContainer = Liferay.SearchContainer.get('<portlet:namespace />groupsSearchContainer');
+
+		searchContainer.get('contentBox').delegate(
+			'click',
+			function(event) {
+				var link = event.currentTarget;
+				var tr = link.ancestor('tr');
+
+				searchContainer.deleteRow(tr, link.getAttribute('data-rowId'));
+			},
+			'.modify-link'
+		);
+	</aui:script>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/sms.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/sms.jsp
new file mode 100644
index 0000000..c3f66de
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/sms.jsp
@@ -0,0 +1,42 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+Contact selContact = (Contact)request.getAttribute("user.selContact");
+%>
+
+<liferay-ui:error-marker key="errorSection" value="sms" />
+
+<aui:model-context bean="<%= selContact %>" model="<%= Contact.class %>" />
+
+<h3><liferay-ui:message key="sms" /></h3>
+
+<c:choose>
+	<c:when test="<%= selContact != null %>">
+		<liferay-ui:error exception="<%= UserSmsException.class %>" message="please-enter-a-sms-id-that-is-a-valid-email-address" />
+
+		<aui:fieldset>
+			<aui:input label="" name="smsSn" />
+		</aui:fieldset>
+	</c:when>
+	<c:otherwise>
+		<div class="alert alert-info">
+			<liferay-ui:message key="this-section-will-be-editable-after-creating-the-user" />
+		</div>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/social_network.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/social_network.jsp
new file mode 100644
index 0000000..c3a3dfc
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/social_network.jsp
@@ -0,0 +1,48 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+Contact selContact = (Contact)request.getAttribute("user.selContact");
+%>
+
+<h3><liferay-ui:message key="social-network" /></h3>
+
+<c:choose>
+	<c:when test="<%= selContact != null %>">
+		<aui:model-context bean="<%= selContact %>" model="<%= Contact.class %>" />
+
+		<aui:fieldset>
+			<div class="social-network">
+				<aui:input label="facebook" name="facebookSn" />
+
+				<img alt="<liferay-ui:message key="facebook" />" src="<%= themeDisplay.getPathThemeImages() %>/users_admin/facebook.png" />
+			</div>
+
+			<div class="social-network">
+				<aui:input label="twitter" name="twitterSn" />
+
+				<img alt="<liferay-ui:message key="twitter" />" class="social-network-logo" src="<%= themeDisplay.getPathThemeImages() %>/users_admin/twitter.png" />
+			</div>
+		</aui:fieldset>
+	</c:when>
+	<c:otherwise>
+		<div class="alert alert-info">
+			<liferay-ui:message key="this-section-will-be-editable-after-creating-the-user" />
+		</div>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/user_groups.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/user_groups.jsp
new file mode 100644
index 0000000..3d1f727
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/user_groups.jsp
@@ -0,0 +1,132 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+User selUser = (User)request.getAttribute("user.selUser");
+List<UserGroup> userGroups = (List<UserGroup>)request.getAttribute("user.userGroups");
+%>
+
+<liferay-ui:error-marker key="errorSection" value="user-groups" />
+
+<liferay-ui:membership-policy-error />
+
+<liferay-util:buffer var="removeUserGroupIcon">
+	<liferay-ui:icon
+		image="unlink"
+		label="<%= true %>"
+		message="remove"
+	/>
+</liferay-util:buffer>
+
+<h3><liferay-ui:message key="user-groups" /></h3>
+
+<liferay-ui:search-container
+	headerNames="name,null"
+>
+	<liferay-ui:search-container-results
+		results="<%= userGroups %>"
+		total="<%= userGroups.size() %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.UserGroup"
+		escapedModel="<%= true %>"
+		keyProperty="userGroupId"
+		modelVar="userGroup"
+	>
+		<liferay-ui:search-container-column-text
+			name="name"
+			property="name"
+		/>
+
+		<c:if test="<%= !portletName.equals(PortletKeys.MY_ACCOUNT) && !UserGroupMembershipPolicyUtil.isMembershipRequired(selUser.getUserId(), userGroup.getUserGroupId()) %>">
+			<liferay-ui:search-container-column-text>
+				<a class="modify-link" data-rowId="<%= userGroup.getUserGroupId() %>" href="javascript:;"><%= removeUserGroupIcon %></a>
+			</liferay-ui:search-container-column-text>
+		</c:if>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator paginate="<%= false %>" />
+</liferay-ui:search-container>
+
+<c:if test="<%= !portletName.equals(PortletKeys.MY_ACCOUNT) %>">
+	<br />
+
+	<liferay-ui:icon
+		cssClass="modify-link"
+		iconCssClass="icon-search"
+		id="openUserGroupsLink"
+		label="<%= true %>"
+		linkCssClass="btn"
+		message="select"
+		url="javascript:;"
+	/>
+
+	<portlet:renderURL var="selectUserGroupURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+		<portlet:param name="struts_action" value="/user_groups_admin/select_user_group" />
+		<portlet:param name="p_u_i_d" value="<%= String.valueOf(selUser.getUserId()) %>" />
+	</portlet:renderURL>
+
+	<aui:script use="aui-base,escape">
+		A.one('#<portlet:namespace />openUserGroupsLink').on(
+			'click',
+			function(event) {
+				Liferay.Util.selectEntity(
+					{
+						dialog: {
+							constrain: true,
+							modal: true,
+							width: 680
+						},
+						id: '<portlet:namespace />selectUserGroup',
+						title: '<liferay-ui:message arguments="user-group" key="select-x" />',
+						uri: '<%= selectUserGroupURL.toString() %>'
+					},
+					function(event) {
+						var A = AUI();
+
+						var searchContainer = Liferay.SearchContainer.get('<portlet:namespace />userGroupsSearchContainer');
+
+						var rowColumns = [];
+
+						rowColumns.push(A.Escape.html(event.usergroupname));
+						rowColumns.push('<a class="modify-link" data-rowId="' + event.usergroupid + '" href="javascript:;"><%= UnicodeFormatter.toString(removeUserGroupIcon) %></a>');
+
+						searchContainer.addRow(rowColumns, event.usergroupid);
+						searchContainer.updateDataStore();
+					}
+				);
+			}
+		);
+	</aui:script>
+</c:if>
+
+<aui:script use="liferay-search-container">
+	var searchContainer = Liferay.SearchContainer.get('<portlet:namespace />userGroupsSearchContainer');
+
+	searchContainer.get('contentBox').delegate(
+		'click',
+		function(event) {
+			var link = event.currentTarget;
+			var tr = link.ancestor('tr');
+
+			searchContainer.deleteRow(tr, link.getAttribute('data-rowId'));
+		},
+		'.modify-link'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/websites.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/websites.jsp
new file mode 100644
index 0000000..f2960ed
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user/websites.jsp
@@ -0,0 +1,17 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/common/websites.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user_action.jsp
new file mode 100644
index 0000000..e44968e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user_action.jsp
@@ -0,0 +1,129 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+UserSearch searchContainer = (UserSearch)request.getAttribute("liferay-ui:search:searchContainer");
+
+String redirect = searchContainer.getIteratorURL().toString();
+
+UserSearchTerms searchTerms = (UserSearchTerms)searchContainer.getSearchTerms();
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+User user2 = (User)row.getObject();
+
+long userId = user2.getUserId();
+%>
+
+<liferay-ui:icon-menu>
+
+	<%
+	boolean hasUpdatePermission = UserPermissionUtil.contains(permissionChecker, userId, ActionKeys.UPDATE);
+	%>
+
+	<c:if test="<%= hasUpdatePermission %>">
+		<portlet:renderURL var="editUserURL">
+			<portlet:param name="struts_action" value="/users_admin/edit_user" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="p_u_i_d" value="<%= String.valueOf(userId) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editUserURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= UserPermissionUtil.contains(permissionChecker, userId, ActionKeys.PERMISSIONS) %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= User.class.getName() %>"
+			modelResourceDescription="<%= user2.getFullName() %>"
+			resourcePrimKey="<%= String.valueOf(userId) %>"
+			var="permissionsUserURL"
+			windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			method="get"
+			url="<%= permissionsUserURL %>"
+			useDialog="<%= true %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= (PropsValues.LAYOUT_USER_PRIVATE_LAYOUTS_ENABLED || PropsValues.LAYOUT_USER_PUBLIC_LAYOUTS_ENABLED) && hasUpdatePermission %>">
+		<portlet:renderURL var="managePagesURL">
+			<portlet:param name="struts_action" value="/users_admin/edit_layouts" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="groupId" value="<%= String.valueOf(user2.getGroup().getGroupId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="pages"
+			message="manage-pages"
+			url="<%= managePagesURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= !PropsValues.PORTAL_JAAS_ENABLE && PropsValues.PORTAL_IMPERSONATION_ENABLE && (userId != user.getUserId()) && !themeDisplay.isImpersonated() && UserPermissionUtil.contains(permissionChecker, userId, ActionKeys.IMPERSONATE) %>">
+		<liferay-security:doAsURL
+			doAsUserId="<%= userId %>"
+			var="impersonateUserURL"
+		/>
+
+		<liferay-ui:icon
+			image="impersonate_user"
+			target="_blank"
+			url="<%= impersonateUserURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= UserPermissionUtil.contains(permissionChecker, userId, ActionKeys.DELETE) %>">
+		<c:if test="<%= !user2.isActive() %>">
+			<portlet:actionURL var="restoreUserURL">
+				<portlet:param name="struts_action" value="/users_admin/edit_user" />
+				<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.RESTORE %>" />
+				<portlet:param name="redirect" value="<%= redirect %>" />
+				<portlet:param name="deleteUserIds" value="<%= String.valueOf(userId) %>" />
+			</portlet:actionURL>
+
+			<liferay-ui:icon
+				image="activate"
+				url="<%= restoreUserURL %>"
+			/>
+		</c:if>
+
+		<portlet:actionURL var="deleteUserURL">
+			<portlet:param name="struts_action" value="/users_admin/edit_user" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= user2.isActive() ? Constants.DEACTIVATE : Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="deleteUserIds" value="<%= String.valueOf(userId) %>" />
+		</portlet:actionURL>
+
+		<c:if test="<%= userId != user.getUserId() %>">
+			<c:choose>
+				<c:when test="<%= user2.isActive() %>">
+					<liferay-ui:icon-deactivate url="<%= deleteUserURL %>" />
+				</c:when>
+				<c:when test="<%= !user2.isActive() && PropsValues.USERS_DELETE %>">
+					<liferay-ui:icon-delete url="<%= deleteUserURL %>" />
+				</c:when>
+			</c:choose>
+		</c:if>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user_search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user_search.jsp
new file mode 100644
index 0000000..0c74f4a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user_search.jsp
@@ -0,0 +1,46 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+UserSearch searchContainer = (UserSearch)request.getAttribute("liferay-ui:search:searchContainer");
+
+UserDisplayTerms displayTerms = (UserDisplayTerms)searchContainer.getDisplayTerms();
+%>
+
+<liferay-ui:search-toggle
+	autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>"
+	buttonLabel="search"
+	displayTerms="<%= displayTerms %>"
+	id="toggle_id_users_admin_user_search"
+>
+	<aui:fieldset>
+		<%@ include file="/html/portlet/directory/user_search_user_name.jspf" %>
+
+		<aui:input name="<%= displayTerms.SCREEN_NAME %>" size="20" value="<%= displayTerms.getScreenName() %>" />
+
+		<aui:input name="<%= displayTerms.EMAIL_ADDRESS %>" size="20" value="<%= displayTerms.getEmailAddress() %>" />
+
+		<c:if test="<%= showActiveUserSelect %>">
+			<aui:select name="<%= displayTerms.STATUS %>">
+				<aui:option label="any-status" selected="<%= (displayTerms.getStatus() == WorkflowConstants.STATUS_ANY) %>" value="<%= WorkflowConstants.STATUS_ANY %>" />
+				<aui:option label="active" selected="<%= (displayTerms.getStatus() == WorkflowConstants.STATUS_APPROVED) %>" value="<%= WorkflowConstants.STATUS_APPROVED %>" />
+				<aui:option label="inactive" selected="<%= (displayTerms.getStatus() == WorkflowConstants.STATUS_INACTIVE) %>" value="<%= WorkflowConstants.STATUS_INACTIVE %>" />
+			</aui:select>
+		</c:if>
+	</aui:fieldset>
+</liferay-ui:search-toggle>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user_search_results.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user_search_results.jspf
new file mode 100644
index 0000000..da4eeec
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user_search_results.jspf
@@ -0,0 +1,17 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/user_search_results_database.jspf" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user_search_results_database.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user_search_results_database.jspf
new file mode 100644
index 0000000..64ef1ce
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user_search_results_database.jspf
@@ -0,0 +1,34 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+if (searchTerms.isAdvancedSearch()) {
+	total = UserLocalServiceUtil.searchCount(company.getCompanyId(), searchTerms.getFirstName(), searchTerms.getMiddleName(), searchTerms.getLastName(), searchTerms.getScreenName(), searchTerms.getEmailAddress(), searchTerms.getStatus(), userParams, searchTerms.isAndOperator());
+
+	userSearchContainer.setTotal(total);
+
+	results = UserLocalServiceUtil.search(company.getCompanyId(), searchTerms.getFirstName(), searchTerms.getMiddleName(), searchTerms.getLastName(), searchTerms.getScreenName(), searchTerms.getEmailAddress(), searchTerms.getStatus(), userParams, searchTerms.isAndOperator(), userSearchContainer.getStart(), userSearchContainer.getEnd(), userSearchContainer.getOrderByComparator());
+}
+else {
+	total = UserLocalServiceUtil.searchCount(company.getCompanyId(), searchTerms.getKeywords(), searchTerms.getStatus(), userParams);
+
+	userSearchContainer.setTotal(total);
+
+	results = UserLocalServiceUtil.search(company.getCompanyId(), searchTerms.getKeywords(), searchTerms.getStatus(), userParams, userSearchContainer.getStart(), userSearchContainer.getEnd(), userSearchContainer.getOrderByComparator());
+}
+
+userSearchContainer.setResults(results);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user_search_results_index.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user_search_results_index.jspf
new file mode 100644
index 0000000..979ea6b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/user_search_results_index.jspf
@@ -0,0 +1,45 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+userParams.put("expandoAttributes", searchTerms.getKeywords());
+
+Sort sort = SortFactoryUtil.getSort(User.class, userSearchContainer.getOrderByCol(), userSearchContainer.getOrderByType());
+
+boolean corruptIndex = false;
+
+Hits hits = null;
+Tuple tuple = null;
+
+do {
+	if (searchTerms.isAdvancedSearch()) {
+		hits = UserLocalServiceUtil.search(company.getCompanyId(), searchTerms.getFirstName(), searchTerms.getMiddleName(), searchTerms.getLastName(), searchTerms.getScreenName(), searchTerms.getEmailAddress(), searchTerms.getStatus(), userParams, searchTerms.isAndOperator(), userSearchContainer.getStart(), userSearchContainer.getEnd(), sort);
+	}
+	else {
+		hits = UserLocalServiceUtil.search(company.getCompanyId(), searchTerms.getKeywords(), searchTerms.getStatus(), userParams, userSearchContainer.getStart(), userSearchContainer.getEnd(), sort);
+	}
+
+	tuple = UsersAdminUtil.getUsers(hits);
+
+	corruptIndex = (Boolean)tuple.getObject(1);
+}
+while (corruptIndex);
+
+results = (List<User>)tuple.getObject(0);
+
+userSearchContainer.setResults(results);
+userSearchContainer.setTotal(hits.getLength());
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/view.jsp
new file mode 100644
index 0000000..8a50797
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/view.jsp
@@ -0,0 +1,263 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+String toolbarItem = ParamUtil.getString(request, "toolbarItem", "browse");
+
+String viewUsersRedirect = ParamUtil.getString(request, "viewUsersRedirect");
+String backURL = ParamUtil.getString(request, "backURL", viewUsersRedirect);
+
+int status = ParamUtil.getInteger(request, "status", WorkflowConstants.STATUS_APPROVED);
+
+String usersListView = ParamUtil.get(request, "usersListView", UserConstants.LIST_VIEW_TREE);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/users_admin/view_users");
+portletURL.setParameter("usersListView", usersListView);
+
+if (Validator.isNotNull(viewUsersRedirect)) {
+	portletURL.setParameter("viewUsersRedirect", viewUsersRedirect);
+}
+
+String portletURLString = portletURL.toString();
+
+request.setAttribute("view.jsp-usersListView", usersListView);
+
+request.setAttribute("view.jsp-portletURL", portletURL);
+%>
+
+<liferay-ui:error exception="<%= CompanyMaxUsersException.class %>" message="unable-to-activate-user-because-that-would-exceed-the-maximum-number-of-users-allowed" />
+<liferay-ui:error exception="<%= RequiredOrganizationException.class %>" message="you-cannot-delete-organizations-that-have-suborganizations-or-users" />
+<liferay-ui:error exception="<%= RequiredUserException.class %>" message="you-cannot-delete-or-deactivate-yourself" />
+
+<aui:form action="<%= portletURLString %>" method="post" name="fm">
+	<liferay-portlet:renderURLParams varImpl="portletURL" />
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="toolbarItem" type="hidden" value="<%= toolbarItem %>" />
+	<aui:input name="redirect" type="hidden" value="<%= portletURLString %>" />
+
+	<%
+	long organizationGroupId = 0;
+
+	int inactiveUsersCount = 0;
+	int usersCount = 0;
+
+	long organizationId = ParamUtil.getLong(request, "organizationId", OrganizationConstants.DEFAULT_PARENT_ORGANIZATION_ID);
+
+	Organization organization = null;
+
+	if (organizationId != 0) {
+		organization = OrganizationServiceUtil.getOrganization(organizationId);
+	}
+
+	if (organization != null) {
+		inactiveUsersCount = UserLocalServiceUtil.getOrganizationUsersCount(organizationId, WorkflowConstants.STATUS_INACTIVE);
+		usersCount = UserLocalServiceUtil.getOrganizationUsersCount(organizationId, WorkflowConstants.STATUS_APPROVED);
+	}
+	else {
+		LinkedHashMap<String, Object> userParams = new LinkedHashMap<String, Object>();
+
+		if (!usersListView.equals(UserConstants.LIST_VIEW_FLAT_USERS)) {
+			userParams.put("noOrganizations", Boolean.TRUE);
+			userParams.put("usersOrgsCount", 0);
+		}
+
+		inactiveUsersCount = UserLocalServiceUtil.searchCount(company.getCompanyId(), null, WorkflowConstants.STATUS_INACTIVE, userParams);
+		usersCount = UserLocalServiceUtil.searchCount(company.getCompanyId(), null, WorkflowConstants.STATUS_APPROVED, userParams);
+	}
+	%>
+
+	<c:choose>
+		<c:when test="<%= usersListView.equals(UserConstants.LIST_VIEW_FLAT_ORGANIZATIONS) %>">
+			<liferay-util:include page="/html/portlet/users_admin/view_flat_organizations.jsp" />
+		</c:when>
+		<c:when test="<%= usersListView.equals(UserConstants.LIST_VIEW_FLAT_USERS) %>">
+
+			<%
+			boolean organizationContextView = false;
+			%>
+
+			<%@ include file="/html/portlet/users_admin/view_flat_users.jspf" %>
+		</c:when>
+		<c:otherwise>
+
+			<%
+			request.setAttribute("view.jsp-backURL", backURL);
+			request.setAttribute("view.jsp-inactiveUsersCount", inactiveUsersCount);
+			request.setAttribute("view.jsp-organization", organization);
+			request.setAttribute("view.jsp-organizationGroupId", organizationGroupId);
+			request.setAttribute("view.jsp-organizationId", organizationId);
+			request.setAttribute("view.jsp-portletURL", portletURL);
+			request.setAttribute("view.jsp-status", status);
+			request.setAttribute("view.jsp-toolbarItem", toolbarItem);
+			request.setAttribute("view.jsp-usersCount", usersCount);
+			request.setAttribute("view.jsp-usersListView", usersListView);
+			request.setAttribute("view.jsp-viewUsersRedirect", viewUsersRedirect);
+			%>
+
+			<liferay-util:include page="/html/portlet/users_admin/view_tree.jsp" />
+		</c:otherwise>
+	</c:choose>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />deleteOrganization(organizationId) {
+		<portlet:namespace />doDeleteOrganization('<%= Organization.class.getName() %>', organizationId);
+	}
+
+	function <portlet:namespace />doDeleteOrganization(className, id) {
+		var ids = id;
+
+		var status = <%= WorkflowConstants.STATUS_INACTIVE %>;
+
+		<portlet:namespace />getUsersCount(
+			className, ids, status,
+			function(event, id, obj) {
+				var responseData = this.get('responseData');
+				var count = parseInt(responseData);
+
+				if (count > 0) {
+					status = <%= WorkflowConstants.STATUS_APPROVED %>
+
+					<portlet:namespace />getUsersCount(
+						className, ids, status,
+						function(event, id, obj) {
+							responseData = this.get('responseData')
+							count = parseInt(responseData);
+
+							if (count > 0) {
+								if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-delete-this") %>')) {
+									<portlet:namespace />doDeleteOrganizations(ids);
+								}
+							}
+							else {
+								var message = null;
+
+								if (id && (id.toString().split(",").length > 1)) {
+									message = '<%= UnicodeLanguageUtil.get(pageContext, "one-or-more-organizations-are-associated-with-deactivated-users.-do-you-want-to-proceed-with-deleting-the-selected-organizations-by-automatically-unassociating-the-deactivated-users") %>';
+								}
+								else {
+									message = '<%= UnicodeLanguageUtil.get(pageContext, "the-selected-organization-is-associated-with-deactivated-users.-do-you-want-to-proceed-with-deleting-the-selected-organization-by-automatically-unassociating-the-deactivated-users") %>';
+								}
+
+								if (confirm(message)) {
+									<portlet:namespace />doDeleteOrganizations(ids);
+								}
+							}
+						}
+					);
+				}
+				else {
+					if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-delete-this") %>')) {
+						<portlet:namespace />doDeleteOrganizations(ids);
+					}
+				}
+			}
+		);
+	}
+
+	function <portlet:namespace />doDeleteOrganizations(organizationIds) {
+		document.<portlet:namespace />fm.method = "post";
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.DELETE %>";
+		document.<portlet:namespace />fm.<portlet:namespace />redirect.value = document.<portlet:namespace />fm.<portlet:namespace />organizationsRedirect.value;
+		document.<portlet:namespace />fm.<portlet:namespace />deleteOrganizationIds.value = organizationIds;
+
+		submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/users_admin/edit_organization" /></portlet:actionURL>");
+	}
+
+	function <portlet:namespace />search() {
+		document.<portlet:namespace />fm.method = "post";
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "";
+
+		submitForm(document.<portlet:namespace />fm, '<%= portletURLString %>');
+	}
+
+	function <portlet:namespace />showUsers(status) {
+
+		<%
+		PortletURL showUsersURL = renderResponse.createRenderURL();
+
+		showUsersURL.setParameter("struts_action", "/users_admin/view_users");
+		showUsersURL.setParameter("usersListView", usersListView);
+
+		long organizationId = ParamUtil.getLong(request, "organizationId", OrganizationConstants.DEFAULT_PARENT_ORGANIZATION_ID);
+
+		if (organizationId != OrganizationConstants.DEFAULT_PARENT_ORGANIZATION_ID) {
+			showUsersURL.setParameter("organizationId", String.valueOf(organizationId));
+		}
+
+		if (Validator.isNotNull(viewUsersRedirect)) {
+			showUsersURL.setParameter("viewUsersRedirect", viewUsersRedirect);
+		}
+		%>
+
+		location.href = Liferay.Util.addParams('<portlet:namespace />status=' + status.value, '<%= showUsersURL.toString() %>');
+	}
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />deleteOrganizations',
+		function() {
+			<portlet:namespace />doDeleteOrganization(
+				'<%= Organization.class.getName() %>',
+				Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds')
+			);
+		},
+		['liferay-util-list-fields']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />deleteUsers',
+		function(cmd) {
+			if (((cmd == "<%= Constants.DEACTIVATE %>") && confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-deactivate-the-selected-users") %>')) || ((cmd == "<%= Constants.DELETE %>") && confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-permanently-delete-the-selected-users") %>')) || (cmd == "<%= Constants.RESTORE %>")) {
+				document.<portlet:namespace />fm.method = "post";
+				document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = cmd;
+				document.<portlet:namespace />fm.<portlet:namespace />redirect.value = document.<portlet:namespace />fm.<portlet:namespace />usersRedirect.value;
+				document.<portlet:namespace />fm.<portlet:namespace />deleteUserIds.value = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+
+				submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/users_admin/edit_user" /></portlet:actionURL>");
+			}
+		},
+		['liferay-util-list-fields']
+	);
+
+	Liferay.provide(
+		window,
+		'<portlet:namespace />getUsersCount',
+		function(className, ids, status, callback) {
+			var A = AUI();
+
+			A.io.request(
+				'<%= themeDisplay.getPathMain() %>/users_admin/get_users_count',
+				{
+					data: {
+						className: className,
+						ids: ids,
+						status: status
+					},
+					on: {
+						success: callback
+					}
+				}
+			);
+		},
+		['aui-io']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/view_flat_organizations.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/view_flat_organizations.jsp
new file mode 100644
index 0000000..2cb7fc6
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/view_flat_organizations.jsp
@@ -0,0 +1,163 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+String toolbarItem = ParamUtil.getString(request, "toolbarItem", "browse");
+
+String usersListView = (String)request.getAttribute("view.jsp-usersListView");
+
+PortletURL portletURL = (PortletURL)request.getAttribute("view.jsp-portletURL");
+
+LinkedHashMap<String, Object> organizationParams = new LinkedHashMap<String, Object>();
+
+boolean showList = true;
+
+if (filterManageableOrganizations) {
+	List<Organization> userOrganizations = user.getOrganizations(true);
+
+	if (userOrganizations.isEmpty()) {
+		showList = false;
+	}
+	else {
+		organizationParams.put("organizationsTree", userOrganizations);
+	}
+}
+%>
+
+<c:choose>
+	<c:when test="<%= showList %>">
+		<liferay-ui:search-container
+			rowChecker="<%= new RowChecker(renderResponse) %>"
+			searchContainer="<%= new OrganizationSearch(renderRequest, portletURL) %>"
+			var="organizationSearchContainer"
+		>
+			<aui:input disabled="<%= true %>" name="organizationsRedirect" type="hidden" value="<%= portletURL.toString() %>" />
+			<aui:input name="deleteOrganizationIds" type="hidden" />
+
+			<c:if test="<%= usersListView.equals(UserConstants.LIST_VIEW_FLAT_ORGANIZATIONS) %>">
+				<aui:nav cssClass="nav-tabs">
+					<portlet:renderURL var="viewUsersTreeURL">
+						<portlet:param name="struts_action" value="/users_admin/view" />
+						<portlet:param name="toolbarItem" value="browse" />
+						<portlet:param name="usersListView" value="<%= UserConstants.LIST_VIEW_TREE %>" />
+						<portlet:param name="saveUsersListView" value="<%= Boolean.TRUE.toString() %>" />
+					</portlet:renderURL>
+
+					<aui:nav-item href="<%= viewUsersTreeURL %>" label="browse" selected='<%= toolbarItem.equals("browse") %>' />
+
+					<portlet:renderURL var="viewOrganizationsFlatURL">
+						<portlet:param name="struts_action" value="/users_admin/view" />
+						<portlet:param name="toolbarItem" value="view-all-organizations" />
+						<portlet:param name="usersListView" value="<%= UserConstants.LIST_VIEW_FLAT_ORGANIZATIONS %>" />
+						<portlet:param name="saveUsersListView" value="<%= Boolean.TRUE.toString() %>" />
+					</portlet:renderURL>
+
+					<aui:nav-item href="<%= viewOrganizationsFlatURL %>" label="all-organizations" selected='<%= toolbarItem.equals("view-all-organizations") %>' />
+
+					<portlet:renderURL var="viewUsersFlatURL">
+						<portlet:param name="struts_action" value="/users_admin/view" />
+						<portlet:param name="toolbarItem" value="view-all-users" />
+						<portlet:param name="usersListView" value="<%= UserConstants.LIST_VIEW_FLAT_USERS %>" />
+						<portlet:param name="saveUsersListView" value="<%= Boolean.TRUE.toString() %>" />
+					</portlet:renderURL>
+
+					<aui:nav-item href="<%= viewUsersFlatURL %>" label="all-users" selected='<%= toolbarItem.equals("view-all-users") %>' />
+				</aui:nav>
+
+				<aui:nav-bar>
+					<liferay-util:include page="/html/portlet/users_admin/toolbar.jsp" />
+
+					<aui:nav-bar-search cssClass="pull-right">
+						<liferay-ui:search-form
+							page="/html/portlet/users_admin/organization_search.jsp"
+						/>
+					</aui:nav-bar-search>
+				</aui:nav-bar>
+
+				<div id="breadcrumb">
+					<liferay-ui:breadcrumb showCurrentGroup="<%= false %>" showCurrentPortlet="<%= false %>" showGuestGroup="<%= false %>" showLayout="<%= false %>" showPortletBreadcrumb="<%= true %>" />
+				</div>
+			</c:if>
+
+			<%
+			OrganizationSearchTerms searchTerms = (OrganizationSearchTerms)organizationSearchContainer.getSearchTerms();
+
+			long parentOrganizationId = ParamUtil.getLong(request, "parentOrganizationId", OrganizationConstants.DEFAULT_PARENT_ORGANIZATION_ID);
+
+			if (parentOrganizationId <= 0) {
+				parentOrganizationId = OrganizationConstants.ANY_PARENT_ORGANIZATION_ID;
+			}
+			%>
+
+			<liferay-ui:search-container-results>
+				<c:choose>
+					<c:when test="<%= PropsValues.ORGANIZATIONS_INDEXER_ENABLED && PropsValues.ORGANIZATIONS_SEARCH_WITH_INDEX %>">
+						<%@ include file="/html/portlet/users_admin/organization_search_results_index.jspf" %>
+					</c:when>
+					<c:otherwise>
+						<%@ include file="/html/portlet/users_admin/organization_search_results_database.jspf" %>
+					</c:otherwise>
+				</c:choose>
+			</liferay-ui:search-container-results>
+
+			<liferay-ui:search-container-row
+				className="com.liferay.portal.model.Organization"
+				escapedModel="<%= true %>"
+				keyProperty="organizationId"
+				modelVar="organization"
+			>
+				<liferay-portlet:renderURL varImpl="rowURL">
+					<portlet:param name="struts_action" value="/users_admin/view" />
+					<portlet:param name="redirect" value="<%= organizationSearchContainer.getIteratorURL().toString() %>" />
+					<portlet:param name="organizationId" value="<%= String.valueOf(organization.getOrganizationId()) %>" />
+					<portlet:param name="usersListView" value="<%= UserConstants.LIST_VIEW_TREE %>" />
+				</liferay-portlet:renderURL>
+
+				<%
+				if (!OrganizationPermissionUtil.contains(permissionChecker, organization.getOrganizationId(), ActionKeys.VIEW)) {
+					rowURL = null;
+				}
+				%>
+
+				<%@ include file="/html/portlet/users_admin/organization/search_columns.jspf" %>
+
+				<liferay-ui:search-container-column-jsp
+					align="right"
+					path="/html/portlet/users_admin/organization_action.jsp"
+				/>
+			</liferay-ui:search-container-row>
+
+			<c:if test="<%= !results.isEmpty() %>">
+				<div class="separator"><!-- --></div>
+
+				<aui:button cssClass="delete-organizations" disabled="<%= true %>" name="delete" onClick='<%= renderResponse.getNamespace() + "deleteOrganizations();" %>' value="delete" />
+			</c:if>
+
+			<liferay-ui:search-iterator />
+		</liferay-ui:search-container>
+	</c:when>
+	<c:otherwise>
+		<div class="alert alert-info">
+			<liferay-ui:message key="you-do-not-belong-to-an-organization-and-are-not-allowed-to-view-other-organizations" />
+		</div>
+	</c:otherwise>
+</c:choose>
+
+<aui:script>
+	Liferay.Util.toggleSearchContainerButton('#<portlet:namespace />delete', '#<portlet:namespace /><%= searchContainerReference.getId("organizationSearchContainer") %>SearchContainer', document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/view_flat_users.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/view_flat_users.jspf
new file mode 100644
index 0000000..dd3676e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/view_flat_users.jspf
@@ -0,0 +1,314 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<c:if test="<%= Validator.isNotNull(viewUsersRedirect) %>">
+	<aui:input name="viewUsersRedirect" type="hidden" value="<%= viewUsersRedirect %>" />
+</c:if>
+
+<%
+SearchContainer searchContainer = new UserSearch(renderRequest, "cur2", currentURLObj);
+
+searchContainer.setRowChecker(new RowChecker(renderResponse));
+
+if (!ParamUtil.getBoolean(renderRequest, "advancedSearch")) {
+	currentURLObj.setParameter("status", String.valueOf(status));
+}
+%>
+
+<liferay-ui:search-container
+	searchContainer="<%= searchContainer %>"
+	var="userSearchContainer"
+>
+	<aui:input disabled="<%= true %>" name="usersRedirect" type="hidden" value="<%= currentURLObj.toString() %>" />
+	<aui:input name="deleteUserIds" type="hidden" />
+
+	<%
+	UserSearchTerms searchTerms = (UserSearchTerms)userSearchContainer.getSearchTerms();
+
+	if ((searchTerms.getOrganizationId() > 0) && !OrganizationPermissionUtil.contains(permissionChecker, searchTerms.getOrganizationId(), ActionKeys.MANAGE_USERS)) {
+		inactiveUsersCount = 0;
+
+		status = WorkflowConstants.STATUS_APPROVED;
+	}
+
+	UserDisplayTerms displayTerms = (UserDisplayTerms)userSearchContainer.getDisplayTerms();
+
+	if (!searchTerms.isAdvancedSearch()) {
+		if (status == WorkflowConstants.STATUS_APPROVED) {
+			displayTerms.setStatus(WorkflowConstants.STATUS_APPROVED);
+			searchTerms.setStatus(WorkflowConstants.STATUS_APPROVED);
+		}
+		else {
+			displayTerms.setStatus(WorkflowConstants.STATUS_INACTIVE);
+			searchTerms.setStatus(WorkflowConstants.STATUS_INACTIVE);
+		}
+	}
+
+	long userOrganizationId = searchTerms.getOrganizationId();
+	long roleId = searchTerms.getRoleId();
+	long userGroupId = searchTerms.getUserGroupId();
+
+	Organization userOrganization = null;
+
+	if (userOrganizationId > 0) {
+		try {
+			userOrganization = OrganizationLocalServiceUtil.getOrganization(userOrganizationId);
+
+			userSearchContainer.setEmptyResultsMessage("this-organization-does-not-have-any-users");
+		}
+		catch (NoSuchOrganizationException nsoe) {
+		}
+	}
+
+	Role role = null;
+
+	if (roleId > 0) {
+		try {
+			role = RoleLocalServiceUtil.getRole(roleId);
+		}
+		catch (NoSuchRoleException nsre) {
+		}
+	}
+
+	UserGroup userGroup = null;
+
+	if (userGroupId > 0) {
+		try {
+			userGroup = UserGroupLocalServiceUtil.getUserGroup(userGroupId);
+		}
+		catch (NoSuchUserGroupException nsuge) {
+		}
+	}
+
+	if (role != null) {
+		PortalUtil.addPortletBreadcrumbEntry(request, role.getName(), null);
+		PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "all-users"), currentURL);
+	}
+
+	if (userGroup != null) {
+		PortalUtil.addPortletBreadcrumbEntry(request, userGroup.getName(), null);
+		PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "all-users"), currentURL);
+	}
+	%>
+
+	<c:if test="<%= usersListView.equals(UserConstants.LIST_VIEW_FLAT_USERS) && (role == null) && (userGroup == null) %>">
+
+		<%
+		if (userOrganization != null) {
+			UsersAdminUtil.addPortletBreadcrumbEntries(userOrganization, request, renderResponse);
+
+			PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "all-users"), currentURL);
+		}
+		%>
+
+		<c:if test="<%= layout.isTypeControlPanel() %>">
+			<div id="breadcrumb">
+				<liferay-ui:breadcrumb showCurrentGroup="<%= false %>" showCurrentPortlet="<%= false %>" showGuestGroup="<%= false %>" showLayout="<%= false %>" showPortletBreadcrumb="<%= true %>" />
+			</div>
+		</c:if>
+
+		<aui:nav cssClass="nav-tabs">
+			<portlet:renderURL var="viewUsersTreeURL">
+				<portlet:param name="struts_action" value="/users_admin/view" />
+				<portlet:param name="toolbarItem" value="browse" />
+				<portlet:param name="usersListView" value="<%= UserConstants.LIST_VIEW_TREE %>" />
+				<portlet:param name="saveUsersListView" value="<%= Boolean.TRUE.toString() %>" />
+			</portlet:renderURL>
+
+			<aui:nav-item href="<%= viewUsersTreeURL %>" label="browse" selected='<%= toolbarItem.equals("browse") %>' />
+
+			<portlet:renderURL var="viewOrganizationsFlatURL">
+				<portlet:param name="struts_action" value="/users_admin/view" />
+				<portlet:param name="toolbarItem" value="view-all-organizations" />
+				<portlet:param name="usersListView" value="<%= UserConstants.LIST_VIEW_FLAT_ORGANIZATIONS %>" />
+				<portlet:param name="saveUsersListView" value="<%= Boolean.TRUE.toString() %>" />
+			</portlet:renderURL>
+
+			<aui:nav-item href="<%= viewOrganizationsFlatURL %>" label="all-organizations" selected='<%= toolbarItem.equals("view-all-organizations") %>' />
+
+			<portlet:renderURL var="viewUsersFlatURL">
+				<portlet:param name="struts_action" value="/users_admin/view" />
+				<portlet:param name="toolbarItem" value="view-all-users" />
+				<portlet:param name="usersListView" value="<%= UserConstants.LIST_VIEW_FLAT_USERS %>" />
+				<portlet:param name="saveUsersListView" value="<%= Boolean.TRUE.toString() %>" />
+			</portlet:renderURL>
+
+			<aui:nav-item href="<%= viewUsersFlatURL %>" label="all-users" selected='<%= toolbarItem.equals("view-all-users") %>' />
+		</aui:nav>
+
+		<aui:nav-bar>
+			<liferay-util:include page="/html/portlet/users_admin/toolbar.jsp" />
+
+			<c:if test="<%= userOrganization == null %>">
+				<aui:nav-bar-search cssClass="pull-right">
+					<liferay-ui:search-form
+						page="/html/portlet/users_admin/user_search.jsp"
+					/>
+				</aui:nav-bar-search>
+			</c:if>
+		</aui:nav-bar>
+	</c:if>
+
+	<c:if test="<%= userOrganization != null %>">
+		<aui:input name="<%= UserDisplayTerms.ORGANIZATION_ID %>" type="hidden" value="<%= userOrganization.getOrganizationId() %>" />
+
+		<c:if test="<%= usersListView.equals(UserConstants.LIST_VIEW_FLAT_USERS) %>">
+			<liferay-ui:header
+				backURL="<%= backURL %>"
+				localizeTitle="<%= false %>"
+				title="<%= userOrganization.getName() %>"
+			/>
+		</c:if>
+	</c:if>
+
+	<c:if test="<%= role != null %>">
+		<aui:input name="<%= UserDisplayTerms.ROLE_ID %>" type="hidden" value="<%= role.getRoleId() %>" />
+
+		<liferay-ui:header
+			backURL="<%= backURL %>"
+			localizeTitle="<%= false %>"
+			title="<%= role.getTitle(locale) %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= userGroup != null %>">
+		<aui:input name="<%= UserDisplayTerms.USER_GROUP_ID %>" type="hidden" value="<%= userGroup.getUserGroupId() %>" />
+
+		<liferay-ui:header
+			backURL="<%= backURL %>"
+			localizeTitle="<%= false %>"
+			title="<%= userGroup.getName() %>"
+		/>
+	</c:if>
+
+	<%
+	LinkedHashMap<String, Object> userParams = new LinkedHashMap<String, Object>();
+
+	if (userOrganizationId > 0) {
+		userParams.put("usersOrgs", new Long(userOrganizationId));
+	}
+	else if (usersListView.equals(UserConstants.LIST_VIEW_TREE) && Validator.isNull(searchTerms.getKeywords())) {
+		userParams.put("noOrganizations", Boolean.TRUE);
+		userParams.put("usersOrgsCount", 0);
+	}
+	else {
+		if (filterManageableOrganizations && !UserPermissionUtil.contains(permissionChecker, ResourceConstants.PRIMKEY_DNE, ActionKeys.VIEW)) {
+			Long[] organizationIds = UsersAdminUtil.getOrganizationIds(user.getOrganizations());
+
+			userParams.put("usersOrgs", organizationIds);
+		}
+	}
+
+	if (roleId > 0) {
+		userParams.put("usersRoles", new Long(roleId));
+	}
+
+	if (userGroupId > 0) {
+		userParams.put("usersUserGroups", new Long(userGroupId));
+	}
+	%>
+
+	<liferay-ui:search-container-results>
+		<c:choose>
+			<c:when test="<%= PropsValues.USERS_INDEXER_ENABLED && PropsValues.USERS_SEARCH_WITH_INDEX %>">
+				<%@ include file="/html/portlet/users_admin/user_search_results_index.jspf" %>
+			</c:when>
+			<c:otherwise>
+				<%@ include file="/html/portlet/users_admin/user_search_results_database.jspf" %>
+			</c:otherwise>
+		</c:choose>
+	</liferay-ui:search-container-results>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.model.User"
+		escapedModel="<%= true %>"
+		keyProperty="userId"
+		modelVar="user2"
+		rowIdProperty="screenName"
+	>
+		<liferay-portlet:renderURL varImpl="rowURL">
+			<portlet:param name="struts_action" value="/users_admin/edit_user" />
+			<portlet:param name="redirect" value="<%= userSearchContainer.getIteratorURL().toString() %>" />
+			<portlet:param name="p_u_i_d" value="<%= String.valueOf(user2.getUserId()) %>" />
+		</liferay-portlet:renderURL>
+
+		<%
+		if (!UserPermissionUtil.contains(permissionChecker, user2.getUserId(), ActionKeys.UPDATE)) {
+			rowURL = null;
+		}
+		%>
+
+		<%@ include file="/html/portlet/users_admin/user/search_columns.jspf" %>
+
+		<liferay-ui:search-container-column-jsp
+			align="right"
+			path="/html/portlet/users_admin/user_action.jsp"
+		/>
+	</liferay-ui:search-container-row>
+
+	<%
+	boolean showDeleteButton = !results.isEmpty() && (searchTerms.getStatus() != WorkflowConstants.STATUS_ANY) && (searchTerms.isActive() || (!searchTerms.isActive() && PropsValues.USERS_DELETE));
+	boolean showRestoreButton = !results.isEmpty() && (searchTerms.getStatus() != WorkflowConstants.STATUS_ANY) && !searchTerms.isActive();
+	%>
+
+	<c:if test="<%= showDeleteButton || showRestoreButton %>">
+		<c:if test="<%= (usersListView.equals(UserConstants.LIST_VIEW_FLAT_USERS)) && (userOrganization == null) %>">
+			<div class="separator"><!-- --></div>
+		</c:if>
+
+		<div class="control-group user-table">
+			<c:if test="<%= showDeleteButton %>">
+
+				<%
+				String taglibOnClick = renderResponse.getNamespace() + "deleteUsers('" + (searchTerms.isActive() ? Constants.DEACTIVATE : Constants.DELETE) + "');";
+				%>
+
+				<aui:button disabled="<%= true %>" name="deactivate" onClick="<%= taglibOnClick %>" value="<%= searchTerms.isActive() ? Constants.DEACTIVATE : Constants.DELETE %>" />
+			</c:if>
+
+			<c:if test="<%= showRestoreButton %>">
+
+				<%
+				String taglibOnClick = renderResponse.getNamespace() + "deleteUsers('" + Constants.RESTORE + "');";
+				%>
+
+				<aui:button disabled="<%= true %>" name="restore" onClick="<%= taglibOnClick %>" value="restore" />
+			</c:if>
+
+			<c:if test="<%= (inactiveUsersCount > 0) && (usersCount > 0) %>">
+				<div class="pull-right user-status-selector">
+					<aui:select changesContext="<%= true %>" inlineLabel="left" label="show" name="userStatusSelect" onChange='<%= renderResponse.getNamespace() + "showUsers(this);" %>'>
+						<aui:option label="active" selected="<%= status == WorkflowConstants.STATUS_APPROVED %>" value="<%= WorkflowConstants.STATUS_APPROVED %>" />
+						<aui:option label="inactive" selected="<%= status == WorkflowConstants.STATUS_INACTIVE %>" value="<%= WorkflowConstants.STATUS_INACTIVE %>" />
+					</aui:select>
+				</div>
+			</c:if>
+		</div>
+	</c:if>
+
+	<%
+	if (!showDeleteButton && !showRestoreButton) {
+		userSearchContainer.setRowChecker(null);
+	}
+	%>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
+
+<aui:script>
+	Liferay.Util.toggleSearchContainerButton('#<portlet:namespace />deactivate', '#<portlet:namespace /><%= searchContainerReference.getId("userSearchContainer") %>SearchContainer', document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+	Liferay.Util.toggleSearchContainerButton('#<portlet:namespace />restore', '#<portlet:namespace /><%= searchContainerReference.getId("userSearchContainer") %>SearchContainer', document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/view_tree.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/view_tree.jsp
new file mode 100644
index 0000000..5846f88
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/users_admin/view_tree.jsp
@@ -0,0 +1,486 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/users_admin/init.jsp" %>
+
+<%
+String backURL = GetterUtil.getString(request.getAttribute("view.jsp-backURL"));
+int inactiveUsersCount = GetterUtil.getInteger(request.getAttribute("view.jsp-inactiveUsersCount"));
+Organization organization = (Organization)request.getAttribute("view.jsp-organization");
+long organizationId = GetterUtil.getLong(request.getAttribute("view.jsp-organizationId"));
+long organizationGroupId = GetterUtil.getLong(request.getAttribute("view.jsp-organizationGroupId"));
+PortletURL portletURL = (PortletURL)request.getAttribute("view.jsp-portletURL");
+int status = GetterUtil.getInteger(request.getAttribute("view.jsp-status"));
+String toolbarItem = GetterUtil.getString(request.getAttribute("view.jsp-toolbarItem"));
+int usersCount = GetterUtil.getInteger(request.getAttribute("view.jsp-usersCount"));
+String usersListView = GetterUtil.getString(request.getAttribute("view.jsp-usersListView"));
+String viewUsersRedirect = GetterUtil.getString(request.getAttribute("view.jsp-viewUsersRedirect"));
+
+String keywords = ParamUtil.getString(request, "keywords");
+
+if (organization != null) {
+	organizationGroupId = organization.getGroupId();
+}
+
+LinkedHashMap<String, Object> organizationParams = new LinkedHashMap<String, Object>();
+
+List<Organization> organizations = new ArrayList<Organization>();
+
+if (filterManageableOrganizations) {
+	organizations = user.getOrganizations(true);
+}
+
+if (organizationId != OrganizationConstants.DEFAULT_PARENT_ORGANIZATION_ID) {
+	organizations.clear();
+
+	organizations.add(OrganizationLocalServiceUtil.getOrganization(organizationId));
+}
+
+boolean showList = true;
+
+if (filterManageableOrganizations && organizations.isEmpty()) {
+	showList = false;
+}
+
+if (organization != null) {
+	UsersAdminUtil.addPortletBreadcrumbEntries(organization, request, renderResponse);
+}
+%>
+
+<c:if test="<%= portletName.equals(PortletKeys.USERS_ADMIN) && usersListView.equals(UserConstants.LIST_VIEW_TREE) %>">
+	<aui:nav cssClass="nav-tabs">
+		<portlet:renderURL var="viewUsersTreeURL">
+			<portlet:param name="struts_action" value="/users_admin/view" />
+			<portlet:param name="toolbarItem" value="browse" />
+			<portlet:param name="usersListView" value="<%= UserConstants.LIST_VIEW_TREE %>" />
+			<portlet:param name="saveUsersListView" value="<%= Boolean.TRUE.toString() %>" />
+		</portlet:renderURL>
+
+		<aui:nav-item href="<%= viewUsersTreeURL %>" label="browse" selected='<%= toolbarItem.equals("browse") %>' />
+
+		<portlet:renderURL var="viewOrganizationsFlatURL">
+			<portlet:param name="struts_action" value="/users_admin/view" />
+			<portlet:param name="toolbarItem" value="view-all-organizations" />
+			<portlet:param name="usersListView" value="<%= UserConstants.LIST_VIEW_FLAT_ORGANIZATIONS %>" />
+			<portlet:param name="saveUsersListView" value="<%= Boolean.TRUE.toString() %>" />
+		</portlet:renderURL>
+
+		<aui:nav-item href="<%= viewOrganizationsFlatURL %>" label="all-organizations" selected='<%= toolbarItem.equals("view-all-organizations") %>' />
+
+		<portlet:renderURL var="viewUsersFlatURL">
+			<portlet:param name="struts_action" value="/users_admin/view" />
+			<portlet:param name="toolbarItem" value="view-all-users" />
+			<portlet:param name="usersListView" value="<%= UserConstants.LIST_VIEW_FLAT_USERS %>" />
+			<portlet:param name="saveUsersListView" value="<%= Boolean.TRUE.toString() %>" />
+		</portlet:renderURL>
+
+		<aui:nav-item href="<%= viewUsersFlatURL %>" label="all-users" selected='<%= toolbarItem.equals("view-all-users") %>' />
+	</aui:nav>
+
+	<aui:nav-bar>
+		<liferay-util:include page="/html/portlet/users_admin/toolbar.jsp" />
+
+		<aui:nav-bar-search cssClass="pull-right">
+			<div class="form-search">
+				<liferay-ui:input-search autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" />
+			</div>
+		</aui:nav-bar-search>
+	</aui:nav-bar>
+
+	<div id="breadcrumb">
+		<liferay-ui:breadcrumb showCurrentGroup="<%= false %>" showCurrentPortlet="<%= false %>" showGuestGroup="<%= false %>" showLayout="<%= false %>" showPortletBreadcrumb="<%= true %>" />
+	</div>
+</c:if>
+
+<c:choose>
+	<c:when test="<%= showList %>">
+
+		<%
+		int organizationsCount = OrganizationLocalServiceUtil.searchCount(company.getCompanyId(), _getParentOrganizationId(request, organization, filterManageableOrganizations), null, null, null, null, organizationParams);
+		%>
+
+		<c:if test="<%= (organization != null) %>">
+
+			<%
+			long parentOrganizationId = OrganizationConstants.DEFAULT_PARENT_ORGANIZATION_ID;
+			String parentOrganizationName = LanguageUtil.get(pageContext, "users-and-organizations-home");
+
+			if (!organization.isRoot()) {
+				Organization parentOrganization = organization.getParentOrganization();
+
+				if (OrganizationPermissionUtil.contains(permissionChecker, parentOrganization, ActionKeys.VIEW)) {
+					parentOrganizationId = parentOrganization.getOrganizationId();
+					parentOrganizationName = parentOrganization.getName();
+				}
+			}
+			%>
+
+			<portlet:renderURL var="headerBackURL">
+				<portlet:param name="struts_action" value="/organization/view" />
+				<portlet:param name="organizationId" value="<%= String.valueOf(parentOrganizationId) %>" />
+			</portlet:renderURL>
+
+			<liferay-ui:header
+				backLabel="<%= parentOrganizationName %>"
+				backURL="<%= headerBackURL.toString() %>"
+				localizeTitle="<%= false %>"
+				title="<%= organization.getName() %>"
+			/>
+		</c:if>
+
+		<aui:row>
+			<aui:col cssClass="lfr-asset-column lfr-asset-column-details" width="<%= (organization != null) ? 75 : 100 %>">
+				<liferay-ui:panel-container extended="<%= false %>" id="usersAdminOrganizationPanelContainer" persistState="<%= true %>">
+					<c:if test="<%= organization != null %>">
+
+						<%
+						int teamsCount = TeamLocalServiceUtil.searchCount(organizationGroupId, null, null, null);
+						%>
+
+						<aui:input name="organizationId" type="hidden" value="<%= organizationId %>" />
+
+						<c:if test="<%= teamsCount > 0 %>">
+							<div class="lfr-asset-metadata">
+								<div class="lfr-asset-icon lfr-asset-teams">
+									<portlet:renderURL var="manageTeamsURL">
+										<portlet:param name="struts_action" value="/users_admin/view_teams" />
+										<portlet:param name="redirect" value="<%= currentURL %>" />
+										<portlet:param name="groupId" value="<%= String.valueOf(organizationGroupId) %>" />
+									</portlet:renderURL>
+
+									<aui:a href="<%= manageTeamsURL %>"> <%= teamsCount %> <liferay-ui:message key='<%= (teamsCount == 1) ? "team" : "teams" %>' /></aui:a>
+								</div>
+							</div>
+						</c:if>
+
+						<span class="entry-categories">
+							<liferay-ui:asset-categories-summary
+								className="<%= Organization.class.getName() %>"
+								classPK="<%= organization.getOrganizationId() %>"
+								portletURL="<%= renderResponse.createRenderURL() %>"
+							/>
+						</span>
+
+						<span class="entry-tags">
+							<liferay-ui:asset-tags-summary
+								className="<%= Organization.class.getName() %>"
+								classPK="<%= organization.getOrganizationId() %>"
+								portletURL="<%= renderResponse.createRenderURL() %>"
+							/>
+						</span>
+
+						<%
+						request.setAttribute(WebKeys.ORGANIZATION, organization);
+
+						request.setAttribute("addresses.className", Organization.class.getName());
+						request.setAttribute("addresses.classPK", organizationId);
+						request.setAttribute("emailAddresses.className", Organization.class.getName());
+						request.setAttribute("emailAddresses.classPK", organizationId);
+						request.setAttribute("phones.className", Organization.class.getName());
+						request.setAttribute("phones.classPK", organizationId);
+						request.setAttribute("websites.className", Organization.class.getName());
+						request.setAttribute("websites.classPK", organizationId);
+						%>
+
+						<div class="organization-information">
+							<div class="section entity-email-addresses">
+								<liferay-util:include page="/html/portlet/directory/common/additional_email_addresses.jsp" />
+							</div>
+
+							<div class="section entity-websites">
+								<liferay-util:include page="/html/portlet/directory/common/websites.jsp" />
+							</div>
+
+							<div class="section entity-addresses">
+								<liferay-util:include page="/html/portlet/directory/organization/addresses.jsp" />
+							</div>
+
+							<div class="section entity-phones">
+								<liferay-util:include page="/html/portlet/directory/organization/phone_numbers.jsp" />
+							</div>
+
+							<div class="section entity-comments">
+								<liferay-util:include page="/html/portlet/directory/organization/comments.jsp" />
+							</div>
+						</div>
+
+						<br />
+
+						<liferay-ui:custom-attributes-available className="<%= Organization.class.getName() %>">
+							<liferay-ui:custom-attribute-list
+								className="<%= Organization.class.getName() %>"
+								classPK="<%= organization.getOrganizationId() %>"
+								editable="<%= false %>"
+								label="<%= true %>"
+							/>
+						</liferay-ui:custom-attributes-available>
+					</c:if>
+
+					<%
+					boolean showOrganizations = false;
+					boolean showUsers = true;
+
+					if ((organization == null) && !PortalPermissionUtil.contains(permissionChecker, ActionKeys.ADD_USER) && !PortalPermissionUtil.contains(permissionChecker, ActionKeys.IMPERSONATE)) {
+						showOrganizations = true;
+						showUsers = false;
+					}
+
+					if (organizationsCount > 0) {
+						showOrganizations = true;
+					}
+
+					if ((status == WorkflowConstants.STATUS_APPROVED) && (usersCount == 0) && (inactiveUsersCount > 0)) {
+						status = WorkflowConstants.STATUS_INACTIVE;
+					}
+					else if ((status == WorkflowConstants.STATUS_INACTIVE) && (usersCount > 0) && (inactiveUsersCount == 0)) {
+						status = WorkflowConstants.STATUS_APPROVED;
+					}
+
+					if ((organization != null) && !OrganizationPermissionUtil.contains(permissionChecker, organization, ActionKeys.MANAGE_USERS)) {
+						inactiveUsersCount = 0;
+
+						status = WorkflowConstants.STATUS_APPROVED;
+					}
+					%>
+
+					<aui:input disabled="<%= true %>" name="organizationsRedirect" type="hidden" value="<%= portletURL.toString() %>" />
+					<aui:input name="deleteOrganizationIds" type="hidden" />
+
+					<c:if test="<%= showOrganizations %>">
+						<liferay-util:buffer var="organizationsPanelTitle">
+
+							<%
+							String organizationsTitle = null;
+
+							if (Validator.isNotNull(keywords)) {
+								organizationsTitle = LanguageUtil.get(pageContext, "organizations");
+							}
+							else if (organization == null) {
+								organizationsTitle = LanguageUtil.get(pageContext, filterManageableOrganizations ? "my-organizations" : "top-level-organizations");
+							}
+							else if (organizationsCount == 1) {
+								organizationsTitle = LanguageUtil.format(pageContext, "x-suborganization", String.valueOf(organizationsCount));
+							}
+							else {
+								organizationsTitle = LanguageUtil.format(pageContext, "x-suborganizations", String.valueOf(organizationsCount));
+							}
+							%>
+
+							<%= organizationsTitle %>
+
+						</liferay-util:buffer>
+
+						<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="usersAdminOrganizationsPanel" persistState="<%= true %>" title="<%= organizationsPanelTitle %>">
+
+							<%
+							SearchContainer searchContainer = new OrganizationSearch(renderRequest, "cur1", currentURLObj);
+
+							searchContainer.setRowChecker(new RowChecker(renderResponse));
+							%>
+
+							<liferay-ui:search-container
+								searchContainer="<%= searchContainer %>"
+								var="organizationSearchContainer"
+							>
+
+								<%
+								OrganizationSearchTerms searchTerms = (OrganizationSearchTerms)organizationSearchContainer.getSearchTerms();
+
+								long parentOrganizationId = _getParentOrganizationId(request, organization, filterManageableOrganizations);
+
+								if (organization != null) {
+									parentOrganizationId = organization.getOrganizationId();
+								}
+
+								List<Long> excludedOrganizationIds = new ArrayList<Long>();
+
+								excludedOrganizationIds.add(parentOrganizationId);
+
+								organizationParams.put("excludedOrganizationIds", excludedOrganizationIds);
+								%>
+
+								<liferay-ui:search-container-results>
+									<c:choose>
+										<c:when test="<%= !searchTerms.hasSearchTerms() && (parentOrganizationId <= 0) && (filterManageableOrganizations) %>">
+
+											<%
+											total = organizations.size();
+
+											searchContainer.setTotal(total);
+
+											results = ListUtil.subList(organizations, searchContainer.getStart(), searchContainer.getEnd());
+
+											searchContainer.setResults(results);
+											%>
+
+										</c:when>
+										<c:otherwise>
+
+											<%
+											if (searchTerms.hasSearchTerms()) {
+												if (filterManageableOrganizations) {
+													organizationParams.put("organizationsTree", organizations);
+												}
+												else if (parentOrganizationId > 0) {
+													List<Organization> organizationsTree = new ArrayList<Organization>();
+
+													Organization parentOrganization = OrganizationLocalServiceUtil.getOrganization(parentOrganizationId);
+
+													organizationsTree.add(parentOrganization);
+
+													organizationParams.put("organizationsTree", organizationsTree);
+												}
+
+												parentOrganizationId = OrganizationConstants.ANY_PARENT_ORGANIZATION_ID;
+											}
+											%>
+
+											<c:choose>
+												<c:when test="<%= PropsValues.ORGANIZATIONS_INDEXER_ENABLED && PropsValues.ORGANIZATIONS_SEARCH_WITH_INDEX %>">
+													<%@ include file="/html/portlet/users_admin/organization_search_results_index.jspf" %>
+												</c:when>
+												<c:otherwise>
+													<%@ include file="/html/portlet/users_admin/organization_search_results_database.jspf" %>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+
+									<c:if test="<%= !results.isEmpty() %>">
+										<aui:button cssClass="delete-organizations" disabled="<%= true %>" name="delete" onClick='<%= renderResponse.getNamespace() + "deleteOrganizations();" %>' value="delete" />
+									</c:if>
+								</liferay-ui:search-container-results>
+
+								<liferay-ui:search-container-row
+									className="com.liferay.portal.model.Organization"
+									escapedModel="<%= true %>"
+									keyProperty="organizationId"
+									modelVar="curOrganization"
+								>
+									<liferay-portlet:renderURL varImpl="rowURL">
+										<portlet:param name="struts_action" value="/users_admin/view" />
+										<portlet:param name="organizationId" value="<%= String.valueOf(curOrganization.getOrganizationId()) %>" />
+										<portlet:param name="usersListView" value="<%= UserConstants.LIST_VIEW_TREE %>" />
+									</liferay-portlet:renderURL>
+
+									<%
+									if (!OrganizationPermissionUtil.contains(permissionChecker, curOrganization.getOrganizationId(), ActionKeys.VIEW)) {
+										rowURL = null;
+									}
+									%>
+
+									<%@ include file="/html/portlet/users_admin/organization/organization_columns.jspf" %>
+								</liferay-ui:search-container-row>
+
+								<liferay-ui:search-iterator />
+							</liferay-ui:search-container>
+						</liferay-ui:panel>
+					</c:if>
+
+					<c:if test="<%= showUsers %>">
+						<liferay-util:buffer var="usersPanelTitle">
+
+							<%
+							boolean active = false;
+
+							if (status == WorkflowConstants.STATUS_APPROVED) {
+								active = true;
+							}
+
+							String usersTitle = null;
+
+							if (Validator.isNotNull(keywords) || ((organization == null) && (organizationsCount == 0))) {
+								usersTitle = LanguageUtil.get(pageContext, (active ? "users" : "inactive-users"));
+							}
+							else if (organization == null) {
+								usersTitle = LanguageUtil.get(pageContext, (active ? "users-without-an-organization" : "inactive-users-without-an-organization"));
+							}
+							else if ((usersCount == 0) && (inactiveUsersCount == 0)) {
+								usersTitle = StringPool.BLANK;
+							}
+							else {
+								if ((active && (usersCount == 1)) || (!active && (inactiveUsersCount == 1))) {
+									usersTitle = LanguageUtil.format(pageContext, (active ? "x-user" : "x-inactive-user"), String.valueOf((active ? usersCount : inactiveUsersCount)));
+								}
+								else {
+									usersTitle = LanguageUtil.format(pageContext, (active ? "x-users" : "x-inactive-users"), String.valueOf((active ? usersCount : inactiveUsersCount)));
+								}
+							}
+							%>
+
+							<%= usersTitle %>
+						</liferay-util:buffer>
+
+						<c:if test="<%= (organization != null) || (usersCount != 0) || (inactiveUsersCount == 0) %>">
+
+							<%
+							boolean organizationContextView = true;
+							%>
+
+							<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="usersAdminUsersPanel" persistState="<%= true %>" title="<%= usersPanelTitle %>">
+								<%@ include file="/html/portlet/users_admin/view_flat_users.jspf" %>
+							</liferay-ui:panel>
+						</c:if>
+					</c:if>
+				</liferay-ui:panel-container>
+			</aui:col>
+
+			<c:if test="<%= organization != null %>">
+				<aui:col cssClass="lfr-asset-column lfr-asset-column-actions" last="<%= true %>" width="<%= 25 %>">
+					<div class="lfr-asset-summary">
+						<img alt="<%= HtmlUtil.escape(organization.getName()) %>" class="avatar" src='<%= (organization != null) ? themeDisplay.getPathImage() + "/organization_logo?img_id=" + organization.getLogoId() + "&t=" + WebServerServletTokenUtil.getToken(organization.getLogoId()) : "" %>' />
+
+						<div class="lfr-asset-name">
+							<h4><%= HtmlUtil.escape(organization.getName()) %></h4>
+						</div>
+					</div>
+
+					<%
+					request.removeAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+					request.setAttribute("view_organizations_tree.jsp-organization", organization);
+					%>
+
+					<liferay-util:include page="/html/portlet/users_admin/organization_action.jsp" />
+				</aui:col>
+
+			</c:if>
+		</aui:row>
+	</c:when>
+	<c:otherwise>
+		<div class="alert alert-info">
+			<liferay-ui:message key="you-do-not-belong-to-an-organization-and-are-not-allowed-to-view-other-organizations" />
+		</div>
+	</c:otherwise>
+</c:choose>
+
+<aui:script>
+	Liferay.Util.toggleSearchContainerButton('#<portlet:namespace />delete', '#<portlet:namespace /><%= searchContainerReference.getId("organizationSearchContainer") %>SearchContainer', document.<portlet:namespace />fm, '<portlet:namespace />allRowIds');
+</aui:script>
+
+<%!
+private long _getParentOrganizationId(HttpServletRequest request, Organization organization, boolean filterManageableOrganizations) {
+	if (organization != null) {
+		return organization.getOrganizationId();
+	}
+
+	if (filterManageableOrganizations) {
+		return OrganizationConstants.ANY_PARENT_ORGANIZATION_ID;
+	}
+
+	return ParamUtil.getLong(request, "parentOrganizationId", OrganizationConstants.DEFAULT_PARENT_ORGANIZATION_ID);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/web_proxy/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/web_proxy/configuration.jsp
new file mode 100644
index 0000000..fdbbb5a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/web_proxy/configuration.jsp
@@ -0,0 +1,58 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/web_proxy/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+%>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+
+	<aui:fieldset>
+		<aui:input autoFocus="<%= (windowState.equals(WindowState.MAXIMIZED) || windowState.equals(LiferayWindowState.POP_UP)) %>" cssClass="lfr-input-text-container" label="url" name="preferences--initUrl--" value="<%= initUrl %>" />
+
+		<aui:input cssClass="lfr-input-text-container" label='<%= LanguageUtil.get(pageContext, "scope") + " (" + LanguageUtil.get(pageContext, "regex") + ")" %>' name="preferences--scope--" value="<%= scope %>" />
+
+		<aui:input cssClass="lfr-input-text-container" name="preferences--proxyHost--" value="<%= proxyHost %>" />
+
+		<aui:input cssClass="lfr-input-text-container" name="preferences--proxyPort--" value="<%= proxyPort %>" />
+
+		<aui:select name="preferences--proxyAuthentication--">
+			<aui:option label="none" selected='<%= proxyAuthentication.equals("none") %>' />
+			<aui:option label="basic" selected='<%= proxyAuthentication.equals("basic") %>' />
+			<aui:option label="ntlm" selected='<%= proxyAuthentication.equals("ntlm") %>' />
+		</aui:select>
+
+		<aui:input cssClass="lfr-input-text-container" name="preferences--proxyAuthenticationUsername--" value="<%= proxyAuthenticationUsername %>" />
+
+		<aui:input cssClass="lfr-input-text-container" name="preferences--proxyAuthenticationPassword--" value="<%= proxyAuthenticationPassword %>" />
+
+		<aui:input cssClass="lfr-input-text-container" name="preferences--proxyAuthenticationHost--" value="<%= proxyAuthenticationHost %>" />
+
+		<aui:input cssClass="lfr-input-text-container" name="preferences--proxyAuthenticationDomain--" value="<%= proxyAuthenticationDomain %>" />
+
+		<aui:input cssClass="lfr-textarea-container" name="preferences--stylesheet--" onKeyDown="Liferay.Util.checkTab(this); Liferay.Util.disableEsc();" type="textarea" value="<%= stylesheet %>" wrap="soft" />
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/web_proxy/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/web_proxy/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/web_proxy/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/web_proxy/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/web_proxy/init.jsp
new file mode 100644
index 0000000..60aaab4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/web_proxy/init.jsp
@@ -0,0 +1,32 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%
+String initUrl = portletPreferences.getValue("initUrl", StringPool.BLANK);
+String scope = portletPreferences.getValue("scope", StringPool.BLANK);
+String proxyHost = portletPreferences.getValue("proxyHost", StringPool.BLANK);
+String proxyPort = portletPreferences.getValue("proxyPort", StringPool.BLANK);
+String proxyAuthentication = portletPreferences.getValue("proxyAuthentication", StringPool.BLANK);
+String proxyAuthenticationUsername = portletPreferences.getValue("proxyAuthenticationUsername", StringPool.BLANK);
+String proxyAuthenticationPassword = portletPreferences.getValue("proxyAuthenticationPassword", StringPool.BLANK);
+String proxyAuthenticationHost = portletPreferences.getValue("proxyAuthenticationHost", StringPool.BLANK);
+String proxyAuthenticationDomain = portletPreferences.getValue("proxyAuthenticationDomain", StringPool.BLANK);
+String stylesheet = portletPreferences.getValue("stylesheet", StringPool.BLANK);
+%>
+
+<%@ include file="/html/portlet/web_proxy/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/asset/abstract.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/asset/abstract.jsp
new file mode 100644
index 0000000..f17673d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/asset/abstract.jsp
@@ -0,0 +1,53 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+int abstractLength = (Integer)request.getAttribute(WebKeys.ASSET_PUBLISHER_ABSTRACT_LENGTH);
+
+WikiPage wikiPage = (WikiPage)request.getAttribute(WebKeys.WIKI_PAGE);
+
+PortletURL viewPageURL = new PortletURLImpl(request, PortletKeys.WIKI, plid, PortletRequest.ACTION_PHASE);
+
+viewPageURL.setParameter("struts_action", "/wiki/view");
+viewPageURL.setParameter("nodeId", String.valueOf(wikiPage.getNodeId()));
+viewPageURL.setPortletMode(PortletMode.VIEW);
+viewPageURL.setWindowState(WindowState.MAXIMIZED);
+
+PortletURL editPageURL = new PortletURLImpl(request, PortletKeys.WIKI, plid, PortletRequest.ACTION_PHASE);
+
+editPageURL.setParameter("struts_action", "/wiki/edit_page");
+editPageURL.setParameter("redirect", currentURL);
+editPageURL.setParameter("nodeId", String.valueOf(wikiPage.getNodeId()));
+editPageURL.setPortletMode(PortletMode.VIEW);
+editPageURL.setWindowState(WindowState.MAXIMIZED);
+
+String attachmentURLPrefix = themeDisplay.getPathMain() + "/wiki/get_page_attachment?p_l_id=" + themeDisplay.getPlid() + "&nodeId=" + wikiPage.getNodeId() + "&title=" + HttpUtil.encodeURL(wikiPage.getTitle()) + "&fileName=";
+
+boolean workflowAssetPreview = GetterUtil.getBoolean((Boolean)request.getAttribute(WebKeys.WORKFLOW_ASSET_PREVIEW));
+
+WikiPageDisplay pageDisplay = null;
+
+if (!workflowAssetPreview && wikiPage.isApproved()) {
+	pageDisplay = WikiCacheUtil.getDisplay(wikiPage.getNodeId(), wikiPage.getTitle(), viewPageURL, editPageURL, attachmentURLPrefix);
+}
+else {
+	pageDisplay = WikiPageLocalServiceUtil.getPageDisplay(wikiPage, viewPageURL, editPageURL, attachmentURLPrefix);
+}
+%>
+
+<%= StringUtil.shorten(HtmlUtil.stripHtml(pageDisplay.getFormattedContent()), abstractLength) %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/asset/full_content.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/asset/full_content.jsp
new file mode 100644
index 0000000..6732b39
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/asset/full_content.jsp
@@ -0,0 +1,60 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+WikiPage wikiPage = (WikiPage)request.getAttribute(WebKeys.WIKI_PAGE);
+
+PortletURL viewPageURL = new PortletURLImpl(request, PortletKeys.WIKI, plid, PortletRequest.ACTION_PHASE);
+
+viewPageURL.setParameter("struts_action", "/wiki/view");
+viewPageURL.setParameter("nodeId", String.valueOf(wikiPage.getNodeId()));
+viewPageURL.setPortletMode(PortletMode.VIEW);
+viewPageURL.setWindowState(WindowState.MAXIMIZED);
+
+PortletURL editPageURL = new PortletURLImpl(request, PortletKeys.WIKI, plid, PortletRequest.ACTION_PHASE);
+
+editPageURL.setParameter("struts_action", "/wiki/edit_page");
+editPageURL.setParameter("redirect", currentURL);
+editPageURL.setParameter("nodeId", String.valueOf(wikiPage.getNodeId()));
+editPageURL.setPortletMode(PortletMode.VIEW);
+editPageURL.setWindowState(WindowState.MAXIMIZED);
+
+String attachmentURLPrefix = themeDisplay.getPathMain() + "/wiki/get_page_attachment?p_l_id=" + themeDisplay.getPlid() + "&nodeId=" + wikiPage.getNodeId() + "&title=" + HttpUtil.encodeURL(wikiPage.getTitle()) + "&fileName=";
+
+boolean workflowAssetPreview = ParamUtil.getBoolean(request, "workflowAssetPreview");
+
+WikiPageDisplay pageDisplay = null;
+
+if (!workflowAssetPreview && wikiPage.isApproved()) {
+	pageDisplay = WikiCacheUtil.getDisplay(wikiPage.getNodeId(), wikiPage.getTitle(), viewPageURL, editPageURL, attachmentURLPrefix);
+}
+else {
+	pageDisplay = WikiPageLocalServiceUtil.getPageDisplay(wikiPage, viewPageURL, editPageURL, attachmentURLPrefix);
+}
+%>
+
+<%= pageDisplay.getFormattedContent() %>
+
+<liferay-ui:custom-attributes-available className="<%= WikiPage.class.getName() %>">
+	<liferay-ui:custom-attribute-list
+		className="<%= WikiPage.class.getName() %>"
+		classPK="<%= (wikiPage != null) ? wikiPage.getPrimaryKey() : 0 %>"
+		editable="<%= false %>"
+		label="<%= true %>"
+	/>
+</liferay-ui:custom-attributes-available>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/compare_versions.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/compare_versions.jsp
new file mode 100644
index 0000000..cdb2ab6
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/compare_versions.jsp
@@ -0,0 +1,66 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+String backURL = ParamUtil.getString(request, "backURL");
+
+String type = ParamUtil.getString(request, "type");
+%>
+
+<liferay-util:include page="/html/portlet/wiki/top_links.jsp" />
+
+<liferay-util:include page="/html/portlet/wiki/page_tabs.jsp">
+	<liferay-util:param name="tabs1" value="history" />
+</liferay-util:include>
+
+<liferay-util:include page="/html/portlet/wiki/page_tabs_history.jsp" />
+
+<liferay-ui:header
+	backURL="<%= backURL %>"
+	title="compare-versions"
+/>
+
+<liferay-util:include page="/html/portlet/wiki/history_navigation.jsp">
+	<liferay-util:param name="mode" value="<%= type %>" />
+</liferay-util:include>
+
+<c:choose>
+	<c:when test='<%= type.equals("html") %>'>
+
+		<%
+		String diffHtmlResults = (String)request.getAttribute(WebKeys.DIFF_HTML_RESULTS);
+		%>
+
+		<liferay-ui:diff-html diffHtmlResults="<%= diffHtmlResults %>" />
+	</c:when>
+	<c:otherwise>
+
+		<%
+		String title = (String)request.getAttribute(WebKeys.TITLE);
+		double sourceVersion = (Double)request.getAttribute(WebKeys.SOURCE_VERSION);
+		double targetVersion = (Double)request.getAttribute(WebKeys.TARGET_VERSION);
+		List[] diffResults = (List[])request.getAttribute(WebKeys.DIFF_RESULTS);
+		%>
+
+		<liferay-ui:diff
+			diffResults="<%= diffResults %>"
+			sourceName="<%= title + StringPool.SPACE + sourceVersion %>"
+			targetName="<%= title + StringPool.SPACE + targetVersion %>"
+		/>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/configuration.jsp
new file mode 100644
index 0000000..ffd1851
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/configuration.jsp
@@ -0,0 +1,333 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+String tabs2 = ParamUtil.getString(request, "tabs2", "display-settings");
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+String emailFromName = ParamUtil.getString(request, "preferences--emailFromName--", WikiUtil.getEmailFromName(portletPreferences, company.getCompanyId()));
+String emailFromAddress = ParamUtil.getString(request, "preferences--emailFromAddress--", WikiUtil.getEmailFromAddress(portletPreferences, company.getCompanyId()));
+
+boolean emailPageAddedEnabled = ParamUtil.getBoolean(request, "preferences--emailPageAddedEnabled--", WikiUtil.getEmailPageAddedEnabled(portletPreferences));
+boolean emailPageUpdatedEnabled = ParamUtil.getBoolean(request, "preferences--emailPageUpdatedEnabled--", WikiUtil.getEmailPageUpdatedEnabled(portletPreferences));
+
+String emailParam = StringPool.BLANK;
+String defaultEmailSubject = StringPool.BLANK;
+String defaultEmailBody = StringPool.BLANK;
+String defaultEmailSignature = StringPool.BLANK;
+
+if (tabs2.equals("page-added-email")) {
+	emailParam = "emailPageAdded";
+	defaultEmailSubject = ContentUtil.get(PropsValues.WIKI_EMAIL_PAGE_ADDED_SUBJECT);
+	defaultEmailBody = ContentUtil.get(PropsValues.WIKI_EMAIL_PAGE_ADDED_BODY);
+	defaultEmailSignature = ContentUtil.get(PropsValues.WIKI_EMAIL_PAGE_ADDED_SIGNATURE);
+}
+else if (tabs2.equals("page-updated-email")) {
+	emailParam = "emailPageUpdated";
+	defaultEmailSubject = ContentUtil.get(PropsValues.WIKI_EMAIL_PAGE_UPDATED_SUBJECT);
+	defaultEmailBody = ContentUtil.get(PropsValues.WIKI_EMAIL_PAGE_UPDATED_BODY);
+	defaultEmailSignature = ContentUtil.get(PropsValues.WIKI_EMAIL_PAGE_UPDATED_SIGNATURE);
+}
+
+String emailSubjectParam = emailParam + "Subject";
+String emailBodyParam = emailParam + "Body";
+String emailSignatureParam = emailParam + "Signature";
+
+String emailSubject = PrefsParamUtil.getString(portletPreferences, request, emailSubjectParam, defaultEmailSubject);
+String emailBody = PrefsParamUtil.getString(portletPreferences, request, emailBodyParam, defaultEmailBody);
+String emailSignature = PrefsParamUtil.getString(portletPreferences, request, emailSignatureParam, defaultEmailSignature);
+%>
+
+<liferay-portlet:renderURL portletConfiguration="true" var="portletURL">
+	<portlet:param name="tabs2" value="<%= tabs2 %>" />
+	<portlet:param name="redirect" value="<%= redirect %>" />
+</liferay-portlet:renderURL>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveConfiguration();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+
+	<%
+	String tabs2Names = "display-settings,email-from,page-added-email,page-updated-email";
+
+	if (PortalUtil.isRSSFeedsEnabled()) {
+		tabs2Names += ",rss";
+	}
+	%>
+
+	<liferay-ui:tabs
+		names="<%= tabs2Names %>"
+		param="tabs2"
+		url="<%= portletURL %>"
+	/>
+
+	<liferay-ui:error key="emailFromAddress" message="please-enter-a-valid-email-address" />
+	<liferay-ui:error key="emailFromName" message="please-enter-a-valid-name" />
+	<liferay-ui:error key="emailPageAddedBody" message="please-enter-a-valid-body" />
+	<liferay-ui:error key="emailPageAddedSignature" message="please-enter-a-valid-signature" />
+	<liferay-ui:error key="emailPageAddedSubject" message="please-enter-a-valid-subject" />
+	<liferay-ui:error key="emailPageUpdatedBody" message="please-enter-a-valid-body" />
+	<liferay-ui:error key="emailPageUpdatedSignature" message="please-enter-a-valid-signature" />
+	<liferay-ui:error key="emailPageUpdatedSubject" message="please-enter-a-valid-subject" />
+	<liferay-ui:error key="visibleNodesCount" message="please-specify-at-least-one-visible-node" />
+
+	<c:choose>
+		<c:when test='<%= tabs2.equals("display-settings") %>'>
+			<%@ include file="/html/portlet/wiki/display_settings.jspf" %>
+		</c:when>
+		<c:when test='<%= tabs2.equals("email-from") %>'>
+			<aui:fieldset>
+				<aui:input cssClass="lfr-input-text-container" label="name" name="preferences--emailFromName--" value="<%= emailFromName %>" />
+
+				<aui:input cssClass="lfr-input-text-container" label="address" name="preferences--emailFromAddress--" value="<%= emailFromAddress %>" />
+			</aui:fieldset>
+
+			<div class="definition-of-terms">
+				<h4><liferay-ui:message key="definition-of-terms" /></h4>
+
+				<dl>
+					<dt>
+						[$COMPANY_ID$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-company-id-associated-with-the-wiki" />
+					</dd>
+					<dt>
+						[$COMPANY_MX$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-company-mx-associated-with-the-wiki" />
+					</dd>
+					<dt>
+						[$COMPANY_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-company-name-associated-with-the-wiki" />
+					</dd>
+					<dt>
+						[$PAGE_USER_ADDRESS$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-email-address-of-the-user-who-added-the-page" />
+					</dd>
+					<dt>
+						[$PAGE_USER_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-user-who-added-the-page" />
+					</dd>
+					<dt>
+						[$PORTLET_NAME$]
+					</dt>
+					<dd>
+						<%= PortalUtil.getPortletTitle(renderResponse) %>
+					</dd>
+					<dt>
+						[$SITE_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-site-name-associated-with-the-wiki" />
+					</dd>
+				</dl>
+			</div>
+		</c:when>
+		<c:when test='<%= tabs2.startsWith("page-") %>'>
+			<aui:fieldset>
+				<c:choose>
+					<c:when test='<%= tabs2.equals("page-added-email") %>'>
+						<aui:input label="enabled" name="preferences--emailPageAddedEnabled--" type="checkbox" value="<%= emailPageAddedEnabled %>" />
+					</c:when>
+					<c:when test='<%= tabs2.equals("page-updated-email") %>'>
+						<aui:input label="enabled" name="preferences--emailPageUpdatedEnabled--" type="checkbox" value="<%= emailPageUpdatedEnabled %>" />
+					</c:when>
+				</c:choose>
+
+				<aui:input cssClass="lfr-input-text-container" label="subject" name='<%= "preferences--" + emailSubjectParam + "--" %>' value="<%= emailSubject %>" />
+
+				<aui:input cssClass="lfr-textarea-container" label="body" name='<%= "preferences--" + emailBodyParam + "--" %>' type="textarea" value="<%= emailBody %>" />
+
+				<aui:input cssClass="lfr-textarea-container" label="signature" name='<%= "preferences--" + emailSignatureParam + "--" %>' type="textarea" value="<%= emailSignature %>" wrap="soft" />
+			</aui:fieldset>
+
+			<div class="definition-of-terms">
+				<h4><liferay-ui:message key="definition-of-terms" /></h4>
+
+				<dl>
+					<dt>
+						[$COMPANY_ID$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-company-id-associated-with-the-wiki" />
+					</dd>
+					<dt>
+						[$COMPANY_MX$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-company-mx-associated-with-the-wiki" />
+					</dd>
+					<dt>
+						[$COMPANY_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-company-name-associated-with-the-wiki" />
+					</dd>
+					<dt>
+						[$DIFFS_URL$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-url-of-the-page-comparing-this-page-content-with-the-previous-version" />
+					</dd>
+					<dt>
+						[$FROM_ADDRESS$]
+					</dt>
+					<dd>
+						<%= HtmlUtil.escape(emailFromAddress) %>
+					</dd>
+					<dt>
+						[$FROM_NAME$]
+					</dt>
+					<dd>
+						<%= HtmlUtil.escape(emailFromName) %>
+					</dd>
+					<dt>
+						[$NODE_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-node-in-which-the-page-was-added" />
+					</dd>
+					<dt>
+						[$PAGE_CONTENT$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-page-content" />
+					</dd>
+					<dt>
+						[$PAGE_DATE_UPDATE$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-date-of-the-modifications" />
+					</dd>
+					<dt>
+						[$PAGE_DIFFS$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-page-content-compared-with-the-previous-version-page-content" />
+					</dd>
+					<dt>
+						[$PAGE_ID$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-page-id" />
+					</dd>
+					<dt>
+						[$PAGE_SUMMARY$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-summary-of-the-page-or-the-modifications" />
+					</dd>
+					<dt>
+						[$PAGE_TITLE$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-page-title" />
+					</dd>
+					<dt>
+						[$PAGE_URL$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-page-url" />
+					</dd>
+					<dt>
+						[$PAGE_USER_ADDRESS$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-email-address-of-the-user-who-added-the-page" />
+					</dd>
+					<dt>
+						[$PAGE_USER_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-user-who-added-the-page" />
+					</dd>
+					<dt>
+						[$PORTAL_URL$]
+					</dt>
+					<dd>
+						<%= company.getVirtualHostname() %>
+					</dd>
+					<dt>
+						[$PORTLET_NAME$]
+					</dt>
+					<dd>
+						<%= PortalUtil.getPortletTitle(renderResponse) %>
+					</dd>
+					<dt>
+						[$SITE_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-site-name-associated-with-the-wiki" />
+					</dd>
+					<dt>
+						[$TO_ADDRESS$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-address-of-the-email-recipient" />
+					</dd>
+					<dt>
+						[$TO_NAME$]
+					</dt>
+					<dd>
+						<liferay-ui:message key="the-name-of-the-email-recipient" />
+					</dd>
+				</dl>
+			</div>
+		</c:when>
+		<c:when test='<%= tabs2.equals("rss") %>'>
+			<liferay-ui:rss-settings
+				delta="<%= rssDelta %>"
+				displayStyle="<%= rssDisplayStyle %>"
+				enabled="<%= enableRSS %>"
+				feedType="<%= rssFeedType %>"
+			/>
+		</c:when>
+	</c:choose>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />saveConfiguration',
+		function() {
+			<c:if test='<%= tabs2.equals("display-settings") %>'>
+				document.<portlet:namespace />fm.<portlet:namespace />visibleNodes.value = Liferay.Util.listSelect(document.<portlet:namespace />fm.<portlet:namespace />currentVisibleNodes);
+				document.<portlet:namespace />fm.<portlet:namespace />hiddenNodes.value = Liferay.Util.listSelect(document.<portlet:namespace />fm.<portlet:namespace />availableVisibleNodes);
+			</c:if>
+
+			submitForm(document.<portlet:namespace />fm);
+		},
+		['liferay-util-list-fields']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/css/.sass-cache/main.css
new file mode 100644
index 0000000..496cbf8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/css/.sass-cache/main.css
@@ -0,0 +1,238 @@
+.portlet-wiki .wiki-body ol ol {
+  list-style: decimal outside; }
+.portlet-wiki .wiki-body pre {
+  background: #fff;
+  border: 1px dashed #2f6fab;
+  margin: 5px 0;
+  padding: 0.5em; }
+.portlet-wiki a.createpage {
+  color: #f00; }
+.portlet-wiki .toc {
+  border: 1px solid #aaa;
+  background-color: #f9f9f9;
+  padding: 0 1em; }
+  .portlet-wiki .toc h4 {
+    margin-bottom: 0.7em; }
+  .portlet-wiki .toc ul {
+    margin-top: 0; }
+  .portlet-wiki .toc li.toclevel-1 {
+    list-style-type: none;
+    margin-left: 0; }
+  .portlet-wiki .toc li.toclevel-2 {
+    list-style-type: none;
+    margin-left: 15px; }
+  .portlet-wiki .toc li.toclevel-3 {
+    list-style-type: none;
+    margin-left: 30px; }
+.portlet-wiki .page-categorization {
+  margin: -8px 0 10px; }
+.portlet-wiki .page-categories {
+  color: #7d7d7d; }
+.portlet-wiki .taglib-discussion {
+  margin: 1em; }
+.portlet-wiki .page-tags {
+  color: #7d7d7d; }
+.portlet-wiki .portlet-body h2 a.hashlink,
+.portlet-wiki .portlet-body h3 a.hashlink,
+.portlet-wiki .portlet-body h4 a.hashlink {
+  color: #DDE0E1;
+  font-size: 12px;
+  text-decoration: none; }
+.portlet-wiki .portlet-body h2:hover a.hashlink,
+.portlet-wiki .portlet-body h3:hover a.hashlink,
+.portlet-wiki .portlet-body h4:hover a.hashlink {
+  color: #777; }
+.portlet-wiki .portlet-body h1.page-title .return-to-page {
+  background: url(@theme_image_path@/wiki/return_to_page.png) no-repeat 0 50%;
+  padding-left: 20px;
+  text-decoration: none; }
+.portlet-wiki .preview {
+  background: #ffc;
+  border: 1px dotted gray;
+  padding: 3px; }
+.portlet-wiki .taglib-custom-attributes-list {
+  margin-bottom: 1em; }
+.portlet-wiki .taglib-custom-attributes-list label {
+  display: block; }
+.portlet-wiki .child-pages {
+  margin: 2em 0; }
+.portlet-wiki .child-pages h2 {
+  background-color: #DDD;
+  border-width: 0;
+  font-weight: normal;
+  margin: 0 0 0.5em;
+  padding: 0.2em; }
+.portlet-wiki .child-pages h3 {
+  font-size: 1.2em;
+  margin-bottom: 0.3em; }
+.portlet-wiki .child-pages ul {
+  margin-top: 0; }
+.portlet-wiki .child-pages li {
+  font-weight: bold;
+  font-size: 1.1em; }
+.portlet-wiki .content-body .wiki-code {
+  background: #fff;
+  border: 1px solid #777;
+  font-family: monospace;
+  white-space: pre; }
+.portlet-wiki .content-body .code-lines {
+  border-right: 1px solid #ccc;
+  color: #000;
+  margin-right: 5px;
+  padding: 0 5px; }
+.portlet-wiki .content-body a.external-link {
+  background: transparent url(@theme_image_path@/wiki/external.png) right top no-repeat;
+  text-decoration: none;
+  padding-right: 10px; }
+.portlet-wiki .content-body a.external-link:hover {
+  background: transparent url(@theme_image_path@/wiki/external.png) right top no-repeat;
+  text-decoration: underline;
+  padding-right: 11px; }
+.portlet-wiki .history-navigation .central-info a.change-mode {
+  font-weight: bold; }
+.portlet-wiki .history-navigation .central-info span.change-mode {
+  color: #999;
+  font-weight: bold; }
+.portlet-wiki .history-navigation .central-info {
+  float: left;
+  padding-left: 10px;
+  padding-right: 10px;
+  text-align: center;
+  width: 66%; }
+.portlet-wiki .history-navigation .central-title {
+  font-weight: bold;
+  padding-right: 20px; }
+.portlet-wiki .history-navigation .central-username {
+  font-weight: bold; }
+.portlet-wiki .history-navigation .next {
+  background-image: url(@theme_image_path@/arrows/paging_next.png);
+  background-position: 100% 0;
+  float: right;
+  padding-right: 15px; }
+.portlet-wiki .history-navigation .previous {
+  background-image: url(@theme_image_path@/arrows/paging_previous.png);
+  float: left;
+  padding-left: 15px; }
+.portlet-wiki .history-navigation a, .portlet-wiki .history-navigation span {
+  background: url() no-repeat; }
+.portlet-wiki .history-navigation span.next {
+  background-position: 100% 100%; }
+.portlet-wiki .history-navigation span.previous {
+  background-position: 0 100%; }
+.portlet-wiki .history-navigation {
+  background: #eee;
+  border-top: 1px solid #ccc;
+  margin: 15px 0 20px;
+  overflow: hidden;
+  padding: 5px; }
+.portlet-wiki .node-current {
+  text-decoration: none;
+  font-weight: bold; }
+.portlet-wiki .page-actions {
+  margin-top: 1.5em; }
+  .portlet-wiki .page-actions:after {
+    clear: both;
+    content: ".";
+    display: block;
+    height: 0;
+    visibility: hidden; }
+.portlet-wiki .page-actions .article-actions {
+  border-right: 1px solid #999;
+  float: left;
+  margin-right: 10px;
+  padding-right: 10px; }
+.portlet-wiki .page-actions .stats {
+  color: #999; }
+.portlet-wiki .page-actions.top-actions {
+  margin-bottom: 15px;
+  margin-top: 0;
+  text-align: right; }
+.portlet-wiki .page-actions.top-actions img {
+  margin-left: 5px; }
+.portlet-wiki .page-activities .activity-status {
+  color: #666;
+  font-weight: bold;
+  text-transform: uppercase; }
+.portlet-wiki .page-activities .activity-summary {
+  color: #999;
+  display: block;
+  margin-left: 3em; }
+.portlet-wiki .entry-links h2 {
+  border-width: 0;
+  font-size: 1em;
+  font-weight: bold; }
+.portlet-wiki .page-info {
+  width: 100%; }
+.portlet-wiki .page-info tr th, .portlet-wiki .page-info tr td {
+  border: 1px solid #ccc;
+  border-left: none;
+  border-right: none;
+  padding: 0.3em 1em; }
+.portlet-wiki .page-old-version a {
+  color: #f93; }
+.portlet-wiki .page-old-version {
+  color: #f93;
+  line-height: 1.2em;
+  margin: -1em 0 1.4em 0;
+  width: auto; }
+.portlet-wiki .page-ratings {
+  margin: 2em 0; }
+.portlet-wiki .page-redirect {
+  color: #7d7d7d;
+  cursor: pointer;
+  line-height: 1.2em;
+  margin: -1em 0 1.4em 0;
+  width: auto; }
+.portlet-wiki .page-redirect:hover {
+  text-decoration: underline; }
+.portlet-wiki .popup-print {
+  float: right; }
+.portlet-wiki .syntax-help-content {
+  border: 1px dotted gray;
+  padding-left: 10px; }
+.portlet-wiki .syntax-help h4 {
+  margin-bottom: 0.5em; }
+.portlet-wiki .syntax-help pre {
+  margin-left: 1em;
+  margin-bottom: 1em; }
+.portlet-wiki .top-links {
+  padding-bottom: 10px; }
+.portlet-wiki .top-links-nodes {
+  border: 1px solid #ddd;
+  float: left;
+  list-style-type: none;
+  margin: 0 0.5em 0.5em;
+  padding: 0.2em 0.5em; }
+  .portlet-wiki .top-links-nodes .top-link-node {
+    border-right: 1px solid #aaa;
+    display: inline-block;
+    list-style-type: none;
+    margin: 0.3em;
+    padding-right: 0.2em; }
+    .portlet-wiki .top-links-nodes .top-link-node.last {
+      border-width: 0; }
+.portlet-wiki .top-links .page-search {
+  float: right;
+  margin: 0 0 0.5em 0.5em; }
+.portlet-wiki .search-root-entry {
+  color: #999;
+  float: right; }
+.portlet-wiki .top-links-configuration {
+  float: left; }
+.portlet-wiki .subscription-info tr td {
+  border: none;
+  padding: 0.1em 10px 0.1em 0; }
+.portlet-wiki .trash-attachments {
+  float: right; }
+.portlet-wiki #wikiCommentsPanelContainer {
+  border-width: 0; }
+
+.trash-restore-popup .form fieldset {
+  margin-bottom: 0;
+  padding: 0 15px; }
+
+.ie .portlet-wiki .child-pages h3 {
+  margin-bottom: 0.2em; }
+.ie .portlet-wiki .syntax-help h4 {
+  margin-bottom: 0.3em; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/css/main.css
new file mode 100644
index 0000000..f3de09c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/css/main.css
@@ -0,0 +1,394 @@
+.portlet-wiki {
+	.wiki-body {
+		ol ol {
+			list-style: decimal outside;
+		}
+
+		pre {
+			background : #fff;
+			border: 1px dashed #2f6fab;
+			margin: 5px 0;
+			padding: 0.5em;
+		}
+	}
+
+	a.createpage {
+		color: #f00;
+	}
+
+	.toc {
+		border: 1px solid #aaa;
+		background-color: #f9f9f9;
+		padding: 0 1em;
+
+		h4 {
+			margin-bottom: 0.7em;
+		}
+
+		ul {
+			margin-top: 0;
+		}
+
+		li.toclevel-1 {
+			list-style-type: none;
+			margin-left: 0;
+		}
+
+		li.toclevel-2 {
+			list-style-type: none;
+			margin-left: 15px;
+		}
+
+		li.toclevel-3 {
+			list-style-type: none;
+			margin-left: 30px;
+		}
+	}
+
+	.page-categorization {
+		margin: -8px 0 10px;
+	}
+
+	.page-categories {
+		color: #7d7d7d;
+	}
+
+	.taglib-discussion {
+		margin: 1em;
+	}
+
+	.page-tags {
+		color: #7d7d7d;
+	}
+
+	.portlet-body h2 a.hashlink,
+	.portlet-body h3 a.hashlink,
+	.portlet-body h4 a.hashlink {
+		color: #DDE0E1;
+		font-size: 12px;
+		text-decoration: none;
+	}
+
+	.portlet-body h2:hover a.hashlink,
+	.portlet-body h3:hover a.hashlink,
+	.portlet-body h4:hover a.hashlink {
+		color: #777;
+	}
+
+	.portlet-body h1.page-title .return-to-page {
+		background: url(@theme_image_path@/wiki/return_to_page.png) no-repeat 0 50%;
+		padding-left: 20px;
+		text-decoration: none;
+	}
+
+	.preview {
+		background: #ffc;
+		border: 1px dotted gray;
+		padding: 3px;
+	}
+
+	.taglib-custom-attributes-list {
+		margin-bottom: 1em;
+	}
+
+	.taglib-custom-attributes-list label {
+		display: block;
+	}
+
+	.child-pages {
+		margin: 2em 0;
+	}
+
+	.child-pages h2 {
+		background-color: #DDD;
+		border-width: 0;
+		font-weight: normal;
+		margin: 0 0 0.5em;
+		padding: 0.2em;
+	}
+
+	.child-pages h3 {
+		font-size: 1.2em;
+		margin-bottom: 0.3em;
+	}
+
+	.child-pages ul {
+		margin-top: 0;
+	}
+
+	.child-pages li {
+		font-weight: bold;
+		font-size: 1.1em;
+	}
+
+	.content-body .wiki-code {
+		background: #fff;
+		border: 1px solid #777;
+		font-family: monospace;
+		white-space: pre;
+	}
+
+	.content-body .code-lines {
+		border-right: 1px solid #ccc;
+		color: #000;
+		margin-right: 5px;
+		padding: 0 5px;
+	}
+
+	.content-body a.external-link {
+		background: transparent url(@theme_image_path@/wiki/external.png) right top no-repeat;
+		text-decoration: none;
+		padding-right: 10px;
+	}
+
+	.content-body a.external-link:hover {
+		background: transparent url(@theme_image_path@/wiki/external.png) right top no-repeat;
+		text-decoration: underline;
+		padding-right: 11px;
+	}
+
+	.history-navigation .central-info a.change-mode {
+		font-weight: bold;
+	}
+
+	.history-navigation .central-info span.change-mode {
+		color: #999;
+		font-weight: bold;
+	}
+
+	.history-navigation .central-info {
+		float: left;
+		padding-left: 10px;
+		padding-right: 10px;
+		text-align: center;
+		width: 66%;
+	}
+
+	.history-navigation .central-title {
+		font-weight: bold;
+		padding-right: 20px;
+	}
+
+	.history-navigation .central-username {
+		font-weight: bold;
+	}
+
+	.history-navigation .next {
+		background-image: url(@theme_image_path@/arrows/paging_next.png);
+		background-position: 100% 0;
+		float: right;
+		padding-right: 15px;
+	}
+
+	.history-navigation .previous {
+		background-image: url(@theme_image_path@/arrows/paging_previous.png);
+		float: left;
+		padding-left: 15px;
+	}
+
+	.history-navigation a, .history-navigation span {
+		background: url() no-repeat;
+	}
+
+	.history-navigation span.next {
+		background-position: 100% 100%;
+	}
+
+	.history-navigation span.previous {
+		background-position: 0 100%;
+	}
+
+	.history-navigation {
+		background: #eee;
+		border-top: 1px solid #ccc;
+		margin: 15px 0 20px;
+		overflow: hidden;
+		padding: 5px;
+	}
+
+	.node-current {
+		text-decoration: none;
+		font-weight: bold;
+	}
+
+	.page-actions {
+		margin-top: 1.5em;
+
+		&:after {
+			clear: both;
+			content: ".";
+			display: block;
+			height: 0;
+			visibility: hidden;
+		}
+	}
+
+	.page-actions .article-actions {
+		border-right: 1px solid #999;
+		float: left;
+		margin-right: 10px;
+		padding-right: 10px;
+	}
+
+	.page-actions .stats {
+		color: #999;
+	}
+
+	.page-actions.top-actions {
+		margin-bottom: 15px;
+		margin-top: 0;
+		text-align: right;
+	}
+
+	.page-actions.top-actions img {
+		margin-left: 5px;
+	}
+
+	.page-activities {
+		.activity-status {
+			color: #666;
+			font-weight: bold;
+			text-transform: uppercase;
+		}
+
+		.activity-summary {
+			color: #999;
+			display: block;
+			margin-left: 3em;
+		}
+	}
+
+	.entry-links h2 {
+		border-width: 0;
+		font-size: 1em;
+		font-weight: bold;
+	}
+
+	.page-info {
+		width: 100%;
+	}
+
+	.page-info tr th, .page-info tr td {
+		border: 1px solid #ccc;
+		border-left: none;
+		border-right: none;
+		padding: 0.3em 1em;
+	}
+
+	.page-old-version a {
+		color: #f93;
+	}
+
+	.page-old-version {
+		color: #f93;
+		line-height: 1.2em;
+		margin: -1em 0 1.4em 0;
+		width: auto;
+	}
+
+	.page-ratings {
+		margin: 2em 0;
+	}
+
+	.page-redirect {
+		color: #7d7d7d;
+		cursor: pointer;
+		line-height: 1.2em;
+		margin: -1em 0 1.4em 0;
+		width: auto;
+	}
+
+	.page-redirect:hover {
+		text-decoration: underline;
+	}
+
+	.popup-print {
+		float: right;
+	}
+
+	.syntax-help-content {
+		border: 1px dotted gray;
+		padding-left: 10px;
+	}
+
+	.syntax-help h4 {
+		margin-bottom: 0.5em;
+	}
+
+	.syntax-help pre {
+		margin-left: 1em;
+		margin-bottom: 1em;
+	}
+
+	.top-links {
+		padding-bottom: 10px;
+	}
+
+	.top-links-nodes {
+		border: 1px solid #ddd;
+		float: left;
+		list-style-type: none;
+		margin: 0 0.5em 0.5em;
+		padding: 0.2em 0.5em;
+
+		.top-link-node {
+			border-right: 1px solid #aaa;
+			display: inline-block;
+			list-style-type: none;
+			margin: 0.3em;
+			padding-right: 0.2em;
+
+			&.last {
+				border-width: 0;
+			}
+		}
+	}
+
+	.top-links .page-search {
+		float: right;
+		margin: 0 0 0.5em 0.5em;
+	}
+
+	.search-root-entry {
+		color: #999;
+		float: right;
+	}
+
+	.top-links-configuration {
+		float: left;
+	}
+
+	.subscription-info tr td {
+		border: none;
+		padding: 0.1em 10px 0.1em 0;
+	}
+
+	.trash-attachments {
+		float: right;
+	}
+
+	#wikiCommentsPanelContainer {
+		border-width: 0;
+	}
+}
+
+.trash-restore-popup {
+	.form {
+		fieldset {
+			margin-bottom: 0;
+			padding: 0 15px;
+		}
+	}
+}
+
+.ie {
+	.portlet-wiki {
+		.child-pages h3 {
+			margin-bottom: 0.2em;
+		}
+
+		.syntax-help h4 {
+			margin-bottom: 0.3em;
+		}
+	}
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/display_settings.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/display_settings.jspf
new file mode 100644
index 0000000..200a4c4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/display_settings.jspf
@@ -0,0 +1,100 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<aui:fieldset>
+	<aui:input name="preferences--enableRelatedAssets--" type="checkbox" value="<%= enableRelatedAssets %>" />
+
+	<c:if test="<%= PropsValues.WIKI_PAGE_RATINGS_ENABLED || PropsValues.WIKI_PAGE_COMMENTS_ENABLED %>">
+		<c:if test="<%= PropsValues.WIKI_PAGE_RATINGS_ENABLED %>">
+			<aui:input name="preferences--enablePageRatings--" type="checkbox" value="<%= enablePageRatings %>" />
+		</c:if>
+
+		<c:if test="<%= PropsValues.WIKI_PAGE_COMMENTS_ENABLED %>">
+			<aui:input name="preferences--enableComments--" type="checkbox" value="<%= enableComments %>" />
+
+			<aui:input name="preferences--enableCommentRatings--" type="checkbox" value="<%= enableCommentRatings %>" />
+		</c:if>
+	</c:if>
+</aui:fieldset>
+
+<aui:fieldset>
+	<div class="display-template">
+
+		<%
+		TemplateHandler templateHandler = TemplateHandlerRegistryUtil.getTemplateHandler(WikiPage.class.getName());
+		%>
+
+		<liferay-ui:ddm-template-selector
+			classNameId="<%= PortalUtil.getClassNameId(templateHandler.getClassName()) %>"
+			displayStyle="<%= displayStyle %>"
+			displayStyleGroupId="<%= displayStyleGroupId %>"
+			refreshURL="<%= portletURL.toString() %>"
+			showEmptyOption="<%= true %>"
+		/>
+	</div>
+</aui:fieldset>
+
+<aui:fieldset label="visible-wikis">
+	<aui:input name="preferences--visibleNodes--" type="hidden" />
+	<aui:input name="preferences--hiddenNodes--" type="hidden" />
+
+	<%
+	Set<String> currentVisibleNodes = new HashSet<String>(allNodeNames);
+
+	// Left list
+
+	List<KeyValuePair> leftList = new ArrayList<KeyValuePair>();
+
+	for (String folderColumn : visibleNodes) {
+		if (currentVisibleNodes.contains(folderColumn)) {
+			leftList.add(new KeyValuePair(folderColumn, HtmlUtil.escape(LanguageUtil.get(pageContext, folderColumn))));
+		}
+	}
+
+	Arrays.sort(visibleNodes);
+	Arrays.sort(hiddenNodes);
+
+	for (String folderColumn : currentVisibleNodes) {
+		if ((Arrays.binarySearch(hiddenNodes, folderColumn) < 0) && (Arrays.binarySearch(visibleNodes, folderColumn) < 0)) {
+			leftList.add(new KeyValuePair(folderColumn, HtmlUtil.escape(LanguageUtil.get(pageContext, folderColumn))));
+		}
+	}
+
+	// Right list
+
+	List<KeyValuePair> rightList = new ArrayList<KeyValuePair>();
+
+	for (String folderColumn : hiddenNodes) {
+		if (currentVisibleNodes.contains(folderColumn)) {
+			if (Arrays.binarySearch(visibleNodes, folderColumn) < 0) {
+				rightList.add(new KeyValuePair(folderColumn, HtmlUtil.escape(LanguageUtil.get(pageContext, folderColumn))));
+			}
+		}
+	}
+
+	rightList = ListUtil.sort(rightList, new KeyValuePairComparator(false, true));
+	%>
+
+	<liferay-ui:input-move-boxes
+		leftBoxName="currentVisibleNodes"
+		leftList="<%= leftList %>"
+		leftReorder="true"
+		leftTitle="visible"
+		rightBoxName="availableVisibleNodes"
+		rightList="<%= rightList %>"
+		rightTitle="hidden"
+	/>
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/edit/editor_config.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/edit/editor_config.jspf
new file mode 100644
index 0000000..33912c3
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/edit/editor_config.jspf
@@ -0,0 +1,45 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+long resourcePrimKey = 0;
+
+String attachmentURLPrefix = StringPool.BLANK;
+
+if (wikiPage != null) {
+	resourcePrimKey = wikiPage.getResourcePrimKey();
+
+	attachmentURLPrefix = themeDisplay.getPortalURL() + themeDisplay.getPathMain() + "/wiki/get_page_attachment?p_l_id=" + themeDisplay.getPlid() + "&nodeId=" + wikiPage.getNodeId() + "&title=" + HttpUtil.encodeURL(wikiPage.getTitle()) + "&fileName=";
+}
+
+Map<String,String> configParams = new HashMap();
+
+configParams.put("attachmentURLPrefix", attachmentURLPrefix);
+configParams.put("wikiPageResourcePrimKey", String.valueOf(resourcePrimKey));
+
+Map<String,String> fileBrowserParams = new HashMap();
+
+fileBrowserParams.put("attachmentURLPrefix", attachmentURLPrefix);
+
+if (format.equals("html")) {
+	fileBrowserParams.put("Types", "Document,Page,Attachment");
+}
+else {
+	fileBrowserParams.put("Type", "Attachment");
+}
+
+fileBrowserParams.put("wikiPageResourcePrimKey", String.valueOf(resourcePrimKey));
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/edit/html.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/edit/html.jsp
new file mode 100644
index 0000000..3409476
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/edit/html.jsp
@@ -0,0 +1,47 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+WikiPage wikiPage = (WikiPage)request.getAttribute("edit_page.jsp-wikiPage");
+
+String content = BeanParamUtil.getString(wikiPage, request, "content");
+
+String format = "html";
+%>
+
+<%@ include file="/html/portlet/wiki/edit/editor_config.jspf" %>
+
+<liferay-ui:input-editor
+	configParams="<%= configParams %>"
+	editorImpl="<%= EDITOR_WYSIWYG_IMPL_KEY %>"
+	fileBrowserParams="<%= fileBrowserParams %>"
+	name="content"
+	resizable="<%= false %>"
+	width="100%"
+/>
+
+<aui:input name="content" type="hidden" />
+
+<aui:script>
+	function <portlet:namespace />initEditor() {
+		return "<%= UnicodeFormatter.toString(content) %>";
+	}
+</aui:script>
+
+<%!
+public static final String EDITOR_WYSIWYG_IMPL_KEY = "editor.wysiwyg.portal-web.docroot.html.portlet.wiki.edit.html.jsp";
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/edit/plain_text.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/edit/plain_text.jsp
new file mode 100644
index 0000000..ec83f3f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/edit/plain_text.jsp
@@ -0,0 +1,22 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+WikiPage wikiPage = (WikiPage)request.getAttribute("edit_page.jsp-wikiPage");
+%>
+
+<liferay-ui:input-field bean="<%= wikiPage %>" field="content" model="<%= WikiPage.class %>" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/edit/wiki.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/edit/wiki.jsp
new file mode 100644
index 0000000..bacc0df
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/edit/wiki.jsp
@@ -0,0 +1,141 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+WikiPage wikiPage = (WikiPage)request.getAttribute("edit_page.jsp-wikiPage");
+
+String format = BeanParamUtil.getString(wikiPage, request, "format", WikiPageConstants.DEFAULT_FORMAT);
+
+String content = BeanParamUtil.getString(wikiPage, request, "content");
+
+String toggleId = renderResponse.getNamespace() + "toggle_id_wiki_editor_help";
+
+String toggleValue = SessionClicks.get(request, toggleId, null);
+
+boolean showSyntaxHelp = ((toggleValue != null) && toggleValue.equals("block"));
+%>
+
+<div align="right">
+	<liferay-ui:toggle
+		defaultShowContent="<%= false %>"
+		hideMessage='<%= LanguageUtil.get(pageContext, "hide-syntax-help") + " &raquo;" %>'
+		id="<%= toggleId %>"
+		showMessage='<%= "&laquo; " + LanguageUtil.get(pageContext, "show-syntax-help") %>'
+	/>
+</div>
+
+<div>
+	<aui:row>
+		<aui:col id="wikiEditorContainer" width="<%= showSyntaxHelp ? 70 : 100 %>">
+
+		<%@ include file="/html/portlet/wiki/edit/editor_config.jspf" %>
+
+		<c:choose>
+			<c:when test='<%= format.equals("creole") %>'>
+				<liferay-ui:input-editor
+					configParams="<%= configParams %>"
+					editorImpl="<%= EDITOR_WYSIWYG_IMPL_KEY %>"
+					fileBrowserParams="<%= fileBrowserParams %>"
+					toolbarSet="creole"
+					width="100%"
+				/>
+			</c:when>
+			<c:otherwise>
+				<liferay-ui:input-editor
+					configParams="<%= configParams %>"
+					editorImpl="<%= EDITOR_SIMPLE_IMPL_KEY %>"
+					fileBrowserParams="<%= fileBrowserParams %>"
+					name="content"
+					resizable="<%= false %>"
+					width="100%"
+				/>
+			</c:otherwise>
+		</c:choose>
+
+			<aui:input name="content" type="hidden" />
+		</aui:col>
+
+		<aui:col cssClass="syntax-help" id="toggle_id_wiki_editor_help" style='<%= showSyntaxHelp ? StringPool.BLANK : "display: none" %>' width="<%= 30 %>">
+			<h3>
+				<liferay-ui:message key="syntax-help" />
+			</h3>
+
+			<liferay-util:include page="<%= WikiUtil.getHelpPage(format) %>" />
+
+			<aui:a href="<%= WikiUtil.getHelpURL(format) %>" target="_blank"><liferay-ui:message key="learn-more" /> &raquo;</aui:a>
+		</aui:col>
+	</aui:row>
+</div>
+
+<aui:script>
+	function <portlet:namespace />initEditor() {
+		return "<%= UnicodeFormatter.toString(content) %>";
+	}
+</aui:script>
+
+<aui:script use="aui-base">
+	var CSS_EDITOR_WIDTH = 'span8';
+
+	var CSS_EDITOR_WIDTH_EXPANDED = 'span12';
+
+	Liferay.on(
+		'toggle:stateChange',
+		function(event) {
+			var id = event.id;
+
+			if (id === '<%= toggleId %>') {
+				var state = event.state;
+
+				var classSrc = CSS_EDITOR_WIDTH;
+				var classDest = CSS_EDITOR_WIDTH_EXPANDED;
+
+				var visible = (state === 1);
+
+				if (visible) {
+					classSrc = CSS_EDITOR_WIDTH_EXPANDED;
+					classDest = CSS_EDITOR_WIDTH;
+				}
+
+				var editorContainer = A.one('#<portlet:namespace />wikiEditorContainer');
+
+				editorContainer.replaceClass(classSrc, classDest);
+
+				if (visible && A.UA.webkit) {
+					var editorFrame = editorContainer.one('iframe');
+
+					if (editorFrame) {
+						editorFrame.hide();
+
+						A.later(0, editorFrame, 'show');
+					}
+				}
+
+				var editorInstance = window['<portlet:namespace />editor'];
+
+				if (editorInstance) {
+					editorInstance.focus();
+				}
+			}
+		}
+	);
+</aui:script>
+
+<%!
+public static final String EDITOR_SIMPLE_IMPL_KEY = "editor.wysiwyg.portal-web.docroot.html.portlet.wiki.edit.mediawiki.jsp";
+
+public static final String EDITOR_WYSIWYG_IMPL_KEY = "editor.wysiwyg.portal-web.docroot.html.portlet.wiki.edit.creole.jsp";
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/edit_node.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/edit_node.jsp
new file mode 100644
index 0000000..557fca0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/edit_node.jsp
@@ -0,0 +1,78 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+WikiNode node = (WikiNode)request.getAttribute(WebKeys.WIKI_NODE);
+
+long nodeId = BeanParamUtil.getLong(node, request, "nodeId");
+%>
+
+<portlet:actionURL var="editNodeURL">
+	<portlet:param name="struts_action" value="/wiki/edit_node" />
+</portlet:actionURL>
+
+<aui:form action="<%= editNodeURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "saveNode();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="nodeId" type="hidden" value="<%= nodeId %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		localizeTitle="<%= (node == null) %>"
+		title='<%= (node == null) ? "new-wiki-node" : node.getName() %>'
+	/>
+
+	<liferay-ui:error exception="<%= DuplicateNodeNameException.class %>" message="please-enter-a-unique-node-name" />
+	<liferay-ui:error exception="<%= NodeNameException.class %>" message="please-enter-a-valid-name" />
+
+	<aui:model-context bean="<%= node %>" model="<%= WikiNode.class %>" />
+
+	<aui:fieldset>
+		<aui:input autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" name="name" />
+
+		<aui:input name="description" />
+
+		<c:if test="<%= node == null %>">
+			<aui:field-wrapper label="permissions">
+				<liferay-ui:input-permissions
+					modelName="<%= WikiNode.class.getName() %>"
+				/>
+			</aui:field-wrapper>
+		</c:if>
+
+		<aui:button-row>
+			<aui:button type="submit" />
+
+			<aui:button href="<%= redirect %>" type="cancel" />
+		</aui:button-row>
+	</aui:fieldset>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />saveNode() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= (node == null) ? Constants.ADD : Constants.UPDATE %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
+
+<%
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, ((node == null) ? "add-wiki" : "edit")), currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/edit_page.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/edit_page.jsp
new file mode 100644
index 0000000..eb2f3f0
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/edit_page.jsp
@@ -0,0 +1,558 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+String originalRedirect = ParamUtil.getString(request, "originalRedirect", StringPool.BLANK);
+
+if (originalRedirect.equals(StringPool.BLANK)) {
+	originalRedirect = redirect;
+}
+else {
+	redirect = originalRedirect;
+}
+
+boolean followRedirect = false;
+
+WikiNode node = (WikiNode)request.getAttribute(WebKeys.WIKI_NODE);
+WikiPage wikiPage = (WikiPage)request.getAttribute(WebKeys.WIKI_PAGE);
+
+WikiPage redirectPage = null;
+
+long nodeId = BeanParamUtil.getLong(wikiPage, request, "nodeId");
+String title = BeanParamUtil.getString(wikiPage, request, "title");
+
+boolean editTitle = ParamUtil.getBoolean(request, "editTitle");
+
+String content = BeanParamUtil.getString(wikiPage, request, "content");
+String format = BeanParamUtil.getString(wikiPage, request, "format", WikiPageConstants.DEFAULT_FORMAT);
+String parentTitle = BeanParamUtil.getString(wikiPage, request, "parentTitle");
+
+boolean preview = ParamUtil.getBoolean(request, "preview");
+
+boolean newPage = ParamUtil.getBoolean(request, "newPage");
+
+if (wikiPage == null) {
+	newPage = true;
+}
+
+boolean editable = false;
+
+boolean copyPageAttachments = ParamUtil.getBoolean(request, "copyPageAttachments", true);
+
+List<FileEntry> attachmentsFileEntries = null;
+
+if (wikiPage != null) {
+	attachmentsFileEntries = wikiPage.getAttachmentsFileEntries();
+
+	if (WikiPagePermission.contains(permissionChecker, wikiPage, ActionKeys.UPDATE)) {
+		editable = true;
+	}
+}
+else if ((wikiPage == null) && editTitle) {
+	editable = true;
+
+	wikiPage = new WikiPageImpl();
+
+	wikiPage.setNew(true);
+	wikiPage.setNodeId(node.getNodeId());
+	wikiPage.setFormat(format);
+	wikiPage.setParentTitle(parentTitle);
+}
+
+if (Validator.isNotNull(title)) {
+	try {
+		WikiPageLocalServiceUtil.validateTitle(title);
+
+		editable = true;
+	}
+	catch (PageTitleException pte) {
+		editTitle = true;
+	}
+}
+
+long templateNodeId = ParamUtil.getLong(request, "templateNodeId");
+String templateTitle = ParamUtil.getString(request, "templateTitle");
+
+WikiPage templatePage = null;
+
+if ((templateNodeId > 0) && Validator.isNotNull(templateTitle)) {
+	try {
+		templatePage = WikiPageServiceUtil.getPage(templateNodeId, templateTitle);
+
+		if (Validator.isNull(parentTitle)) {
+			parentTitle = templatePage.getParentTitle();
+
+			if (wikiPage.isNew()) {
+				format = templatePage.getFormat();
+
+				wikiPage.setContent(templatePage.getContent());
+				wikiPage.setFormat(format);
+				wikiPage.setParentTitle(parentTitle);
+			}
+		}
+	}
+	catch (Exception e) {
+	}
+}
+
+PortletURL viewPageURL = renderResponse.createRenderURL();
+
+viewPageURL.setParameter("struts_action", "/wiki/view");
+viewPageURL.setParameter("nodeName", node.getName());
+viewPageURL.setParameter("title", title);
+
+PortletURL editPageURL = renderResponse.createRenderURL();
+
+editPageURL.setParameter("struts_action", "/wiki/edit_page");
+editPageURL.setParameter("redirect", currentURL);
+editPageURL.setParameter("nodeId", String.valueOf(node.getNodeId()));
+editPageURL.setParameter("title", title);
+
+if (Validator.isNull(redirect)) {
+	redirect = viewPageURL.toString();
+}
+%>
+
+<liferay-util:include page="/html/portlet/wiki/top_links.jsp" />
+
+<c:choose>
+	<c:when test="<%= !newPage %>">
+		<liferay-util:include page="/html/portlet/wiki/page_tabs.jsp">
+			<liferay-util:param name="tabs1" value="content" />
+		</liferay-util:include>
+	</c:when>
+	<c:otherwise>
+		<%@ include file="/html/portlet/wiki/page_name.jspf" %>
+	</c:otherwise>
+</c:choose>
+
+<c:if test="<%= preview %>">
+
+	<%
+	if (wikiPage == null) {
+		wikiPage = new WikiPageImpl();
+	}
+
+	try {
+		content = SanitizerUtil.sanitize(themeDisplay.getCompanyId(), scopeGroupId, themeDisplay.getUserId(), WikiPage.class.getName(), 0, "text/" + format, content);
+	}
+	catch (SanitizerException se) {
+		content = StringPool.BLANK;
+	}
+
+	wikiPage.setContent(content);
+	wikiPage.setFormat(format);
+	%>
+
+	<liferay-ui:message key="preview" />:
+
+	<div class="preview">
+		<%@ include file="/html/portlet/wiki/view_page_content.jspf" %>
+	</div>
+
+	<br />
+</c:if>
+
+<portlet:actionURL var="editPageActionURL">
+	<portlet:param name="struts_action" value="/wiki/edit_page" />
+</portlet:actionURL>
+
+<aui:form action="<%= editPageActionURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "savePage();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="originalRedirect" type="hidden" value="<%= originalRedirect %>" />
+	<aui:input name="nodeId" type="hidden" value="<%= nodeId %>" />
+	<aui:input name="newPage" type="hidden" value="<%= newPage %>" />
+
+	<aui:model-context bean="<%= !newPage ? wikiPage : templatePage %>" model="<%= WikiPage.class %>" />
+
+	<c:if test="<%= (wikiPage != null) && (!wikiPage.isNew()) %>">
+		<aui:workflow-status status="<%= wikiPage.getStatus() %>" version="<%= String.valueOf(wikiPage.getVersion()) %>" />
+	</c:if>
+
+	<c:if test="<%= !editTitle %>">
+		<aui:input name="title" type="hidden" value="<%= title %>" />
+	</c:if>
+
+	<aui:input name="parentTitle" type="hidden" value="<%= parentTitle %>" />
+	<aui:input name="editTitle" type="hidden" value="<%= editTitle %>" />
+
+	<c:if test="<%= wikiPage != null %>">
+		<aui:input name="version" type="hidden" value="<%= wikiPage.getVersion() %>" />
+	</c:if>
+
+	<c:if test="<%= templatePage != null %>">
+		<aui:input name="templateNodeId" type="hidden" value="<%= String.valueOf(templateNodeId) %>" />
+		<aui:input name="templateTitle" type="hidden" value="<%= templateTitle %>" />
+	</c:if>
+
+	<aui:input name="workflowAction" type="hidden" value="<%= WorkflowConstants.ACTION_SAVE_DRAFT %>" />
+	<aui:input name="preview" type="hidden" value="<%= preview %>" />
+
+	<liferay-ui:error exception="<%= DuplicatePageException.class %>" message="there-is-already-a-page-with-the-specified-title" />
+	<liferay-ui:error exception="<%= PageContentException.class %>" message="the-content-is-not-valid" />
+	<liferay-ui:error exception="<%= PageTitleException.class %>" message="please-enter-a-valid-title" />
+	<liferay-ui:error exception="<%= PageVersionException.class %>" message="another-user-has-made-changes-since-you-started-editing-please-copy-your-changes-and-try-again" />
+
+	<liferay-ui:asset-categories-error />
+
+	<liferay-ui:asset-tags-error />
+
+	<c:if test="<%= newPage %>">
+		<c:choose>
+			<c:when test="<%= editable %>">
+				<c:if test="<%= Validator.isNull(title) %>">
+					<liferay-ui:header
+						backURL="<%= redirect %>"
+						title="new-wiki-page"
+					/>
+				</c:if>
+
+				<div class="alert alert-info">
+					<liferay-ui:message key="this-page-does-not-exist-yet-use-the-form-below-to-create-it" />
+				</div>
+			</c:when>
+			<c:otherwise>
+				<div class="alert alert-error">
+					<liferay-ui:message key="this-page-does-not-exist-yet-and-the-title-is-not-valid" />
+				</div>
+
+				<input onClick="document.location = '<%= HtmlUtil.escape(PortalUtil.escapeRedirect(redirect)) %>'" type="button" value="<liferay-ui:message key="cancel" />" />
+			</c:otherwise>
+		</c:choose>
+	</c:if>
+
+	<c:choose>
+		<c:when test="<%= editable %>">
+			<aui:fieldset>
+				<c:if test="<%= editTitle %>">
+					<aui:input autoFocus="<%= !preview %>" name="title" size="30" value="<%= title %>" />
+				</c:if>
+
+				<c:if test="<%= Validator.isNotNull(parentTitle) %>">
+					<aui:field-wrapper label="parent">
+						<liferay-ui:input-resource url="<%= parentTitle %>" />
+					</aui:field-wrapper>
+				</c:if>
+
+				<c:choose>
+					<c:when test="<%= (WikiPageConstants.FORMATS.length > 1) %>">
+						<aui:select changesContext="<%= true %>" name="format" onChange='<%= renderResponse.getNamespace() + "changeFormat(this);" %>'>
+
+							<%
+							for (int i = 0; i < WikiPageConstants.FORMATS.length; i++) {
+							%>
+
+								<aui:option label='<%= LanguageUtil.get(pageContext, "wiki.formats." + WikiPageConstants.FORMATS[i]) %>' selected="<%= format.equals(WikiPageConstants.FORMATS[i]) %>" value="<%= WikiPageConstants.FORMATS[i] %>" />
+
+							<%
+							}
+							%>
+
+						</aui:select>
+
+					</c:when>
+					<c:otherwise>
+						<aui:input name="format" type="hidden" value="<%= format %>" />
+					</c:otherwise>
+				</c:choose>
+			</aui:fieldset>
+
+			<div>
+
+				<%
+				request.setAttribute("edit_page.jsp-wikiPage", wikiPage);
+				%>
+
+				<liferay-util:include page="<%= WikiUtil.getEditPage(format) %>" />
+			</div>
+
+			<c:if test="<%= wikiPage != null %>">
+				<liferay-ui:custom-attributes-available className="<%= WikiPage.class.getName() %>">
+					<aui:fieldset>
+
+						<%
+						long classPK = 0;
+
+						if (templatePage != null) {
+							classPK = templatePage.getPrimaryKey();
+						}
+						else if (page != null) {
+							classPK = wikiPage.getPrimaryKey();
+						}
+						%>
+
+						<liferay-ui:custom-attribute-list
+							className="<%= WikiPage.class.getName() %>"
+							classPK="<%= classPK %>"
+							editable="<%= true %>"
+							label="<%= true %>"
+						/>
+					</aui:fieldset>
+				</liferay-ui:custom-attributes-available>
+			</c:if>
+
+			<aui:fieldset>
+				<c:if test="<%= (attachmentsFileEntries != null) && !attachmentsFileEntries.isEmpty() || ((templatePage != null) && (templatePage.getAttachmentsFileEntriesCount() > 0)) %>">
+					<aui:field-wrapper label="attachments">
+						<c:if test="<%= (templatePage != null) && (templatePage.getAttachmentsFileEntriesCount() > 0) %>">
+
+							<%
+							attachmentsFileEntries = templatePage.getAttachmentsFileEntries();
+							%>
+
+							<aui:input name="copyPageAttachments" type="checkbox" value="<%= copyPageAttachments %>" />
+						</c:if>
+
+						<c:if test="<%= attachmentsFileEntries != null %>">
+
+							<%
+							for (int i = 0; i < attachmentsFileEntries.size(); i++) {
+								FileEntry attachmentsFileEntry = attachmentsFileEntries.get(i);
+							%>
+
+								<aui:a href="<%= (templatePage != null) && (templatePage.getAttachmentsFileEntriesCount() > 0) ? PortletFileRepositoryUtil.getPortletFileEntryURL(themeDisplay, attachmentsFileEntry, StringPool.BLANK) : null %>"><%= attachmentsFileEntry.getTitle() %></aui:a> (<%= TextFormatter.formatStorageSize(attachmentsFileEntry.getSize(), locale) %>)<%= (i < (attachmentsFileEntries.size() - 1)) ? ", " : "" %>
+
+							<%
+							}
+							%>
+
+						</c:if>
+					</aui:field-wrapper>
+				</c:if>
+
+				<%
+				long resourcePrimKey = 0;
+
+				if (!newPage) {
+					resourcePrimKey = wikiPage.getResourcePrimKey();
+				}
+				else if (templatePage != null) {
+					resourcePrimKey = templatePage.getResourcePrimKey();
+				}
+
+				long assetEntryId = 0;
+				long classPK = resourcePrimKey;
+
+				if (!newPage && !wikiPage.isApproved() && (wikiPage.getVersion() != WikiPageConstants.VERSION_DEFAULT)) {
+					AssetEntry assetEntry = AssetEntryLocalServiceUtil.fetchEntry(WikiPage.class.getName(), wikiPage.getPrimaryKey());
+
+					if (assetEntry != null) {
+						assetEntryId = assetEntry.getEntryId();
+						classPK = wikiPage.getPrimaryKey();
+					}
+				}
+				%>
+
+				<c:if test="<%= newPage || wikiPage.isApproved() %>">
+					<aui:model-context bean="<%= new WikiPageImpl() %>" model="<%= WikiPage.class %>" />
+				</c:if>
+
+				<aui:input label="description-of-the-changes" name="summary" />
+
+				<c:if test="<%= !newPage %>">
+					<aui:input label="this-is-a-minor-edit" name="minorEdit" />
+				</c:if>
+
+				<c:if test="<%= newPage %>">
+					<aui:field-wrapper label="permissions">
+						<liferay-ui:input-permissions
+							modelName="<%= WikiPage.class.getName() %>"
+						/>
+					</aui:field-wrapper>
+				</c:if>
+
+				<liferay-ui:panel defaultState="closed" extended="<%= false %>" id="wikiPageCategorizationPanel" persistState="<%= true %>" title="categorization">
+					<aui:fieldset>
+						<aui:input classPK="<%= classPK %>" name="categories" type="assetCategories" />
+
+						<aui:input classPK="<%= classPK %>" name="tags" type="assetTags" />
+					</aui:fieldset>
+				</liferay-ui:panel>
+
+				<liferay-ui:panel defaultState="closed" extended="<%= false %>" id="wikiPageAssetLinksPanel" persistState="<%= true %>" title="related-assets">
+					<aui:fieldset>
+						<liferay-ui:input-asset-links
+							assetEntryId="<%= assetEntryId %>"
+							className="<%= WikiPage.class.getName() %>"
+							classPK="<%= classPK %>"
+						/>
+					</aui:fieldset>
+				</liferay-ui:panel>
+
+				<%
+				boolean approved = false;
+				boolean pending = false;
+
+				if (wikiPage != null) {
+					approved = wikiPage.isApproved();
+					pending = wikiPage.isPending();
+				}
+				%>
+
+				<c:if test="<%= !newPage && approved %>">
+					<div class="alert alert-info">
+						<liferay-ui:message key="a-new-version-will-be-created-automatically-if-this-content-is-modified" />
+					</div>
+				</c:if>
+
+				<c:if test="<%= pending %>">
+					<div class="alert alert-info">
+						<liferay-ui:message key="there-is-a-publication-workflow-in-process" />
+					</div>
+				</c:if>
+
+				<aui:button-row>
+
+					<%
+					String saveButtonLabel = "save";
+
+					if ((wikiPage == null) || wikiPage.isDraft() || wikiPage.isApproved()) {
+						saveButtonLabel = "save-as-draft";
+					}
+
+					String publishButtonLabel = "publish";
+
+					if (WorkflowDefinitionLinkLocalServiceUtil.hasWorkflowDefinitionLink(themeDisplay.getCompanyId(), scopeGroupId, WikiPage.class.getName())) {
+						publishButtonLabel = "submit-for-publication";
+					}
+					%>
+
+					<aui:button name="saveButton" primary="<%= false %>" type="submit" value="<%= saveButtonLabel %>" />
+
+					<aui:button name="previewButton" onClick='<%= renderResponse.getNamespace() + "previewPage();" %>' value="preview" />
+
+					<aui:button disabled="<%= pending %>" name="publishButton" onClick='<%= renderResponse.getNamespace() + "publishPage();" %>' primary="<%= true %>" value="<%= publishButtonLabel %>" />
+
+					<c:if test="<%= !newPage && WikiPagePermission.contains(permissionChecker, wikiPage, ActionKeys.DELETE) %>">
+						<c:choose>
+							<c:when test="<%= !wikiPage.isDraft() && TrashUtil.isTrashEnabled(scopeGroupId) %>">
+								<aui:button name="moveToTrashButton" onClick='<%= renderResponse.getNamespace() + "moveToTrashPage();" %>' value="move-to-the-recycle-bin" />
+							</c:when>
+							<c:when test="<%= wikiPage.isDraft() %>">
+								<aui:button name="discardDraftButton" onClick='<%= renderResponse.getNamespace() + "discardDraftPage();" %>' value="discard-draft" />
+							</c:when>
+						</c:choose>
+					</c:if>
+
+					<aui:button href="<%= redirect %>" type="cancel" />
+				</aui:button-row>
+			</aui:fieldset>
+		</c:when>
+		<c:otherwise>
+			<c:if test="<%= (wikiPage != null) && !wikiPage.isApproved() %>">
+				<div class="alert alert-info">
+
+					<%
+					Format dateFormatDate = FastDateFormatFactoryUtil.getDateTime(locale, timeZone);
+					%>
+
+					<%= LanguageUtil.format(pageContext, "this-page-cannot-be-edited-because-user-x-is-modifying-it-and-the-results-have-not-been-published-yet", new Object[] {wikiPage.getUserName(), dateFormatDate.format(wikiPage.getModifiedDate())}) %>
+				</div>
+			</c:if>
+		</c:otherwise>
+	</c:choose>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />changeFormat(formatSelect) {
+		var currentFormat = formatSelect.options[window.<portlet:namespace />currentFormatIndex].text;
+
+		var newFormat = formatSelect.options[formatSelect.selectedIndex].text;
+
+		var confirmMessage = '<%= UnicodeLanguageUtil.get(pageContext, "you-may-lose-formatting-when-switching-from-x-to-x") %>';
+
+		confirmMessage = AUI().Lang.sub(confirmMessage, [currentFormat, newFormat]);
+
+		if (!confirm(confirmMessage)) {
+			formatSelect.selectedIndex = window.<portlet:namespace />currentFormatIndex;
+
+			return;
+		}
+
+		if (window.<portlet:namespace />editor) {
+			document.<portlet:namespace />fm.<portlet:namespace />content.value = window.<portlet:namespace />editor.getHTML();
+		}
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />discardDraftPage() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.DELETE %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />getSuggestionsContent() {
+		return document.<portlet:namespace />fm.<portlet:namespace />title.value + ' ' + window.<portlet:namespace />editor.getHTML();
+	}
+
+	function <portlet:namespace />moveToTrashPage() {
+		<portlet:renderURL var="nodeURL">
+			<portlet:param name="struts_action" value="/wiki/view" />
+			<portlet:param name="title" value="<%= WikiPageConstants.FRONT_PAGE %>" />
+			<portlet:param name="tag" value="<%= StringPool.BLANK %>" />
+		</portlet:renderURL>
+
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= Constants.MOVE_TO_TRASH %>";
+		document.<portlet:namespace />fm.<portlet:namespace />redirect.value = "<%= nodeURL.toString() %>";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />previewPage() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "";
+		document.<portlet:namespace />fm.<portlet:namespace />preview.value = "true";
+
+		if (window.<portlet:namespace />editor) {
+			document.<portlet:namespace />fm.<portlet:namespace />content.value = window.<portlet:namespace />editor.getHTML();
+		}
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />publishPage() {
+		document.<portlet:namespace />fm.<portlet:namespace />workflowAction.value = "<%= WorkflowConstants.ACTION_PUBLISH %>";
+
+		<portlet:namespace />savePage();
+	}
+
+	function <portlet:namespace />savePage() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "<%= newPage ? Constants.ADD : Constants.UPDATE %>";
+
+		if (window.<portlet:namespace />editor) {
+			document.<portlet:namespace />fm.<portlet:namespace />content.value = window.<portlet:namespace />editor.getHTML();
+		}
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	window.<portlet:namespace />currentFormatIndex = document.<portlet:namespace />fm.<portlet:namespace />format.selectedIndex;
+</aui:script>
+
+<%
+if (!newPage) {
+	PortalUtil.addPortletBreadcrumbEntry(request, wikiPage.getTitle(), viewPageURL.toString());
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit"), currentURL);
+}
+else {
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "add-page"), currentURL);
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/edit_page_attachment.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/edit_page_attachment.jsp
new file mode 100644
index 0000000..55e6801
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/edit_page_attachment.jsp
@@ -0,0 +1,245 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+WikiNode node = (WikiNode)request.getAttribute(WebKeys.WIKI_NODE);
+WikiPage wikiPage = (WikiPage)request.getAttribute(WebKeys.WIKI_PAGE);
+%>
+
+<liferay-util:include page="/html/portlet/wiki/top_links.jsp" />
+
+<liferay-util:include page="/html/portlet/wiki/page_tabs.jsp">
+	<liferay-util:param name="tabs1" value="attachments" />
+</liferay-util:include>
+
+<portlet:actionURL var="editPageAttachmentURL">
+	<portlet:param name="struts_action" value="/wiki/edit_page_attachment" />
+</portlet:actionURL>
+
+<aui:form action="<%= editPageAttachmentURL %>" enctype="multipart/form-data" method="post" name="fm1">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.ADD %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="nodeId" type="hidden" value="<%= String.valueOf(node.getNodeId()) %>" />
+	<aui:input name="title" type="hidden" value="<%= wikiPage.getTitle() %>" />
+	<aui:input name="numOfFiles" type="hidden" value="3" />
+
+	<liferay-ui:error exception="<%= DuplicateFileException.class %>" message="a-file-with-that-name-already-exists" />
+
+	<liferay-ui:error exception="<%= FileExtensionException.class %>">
+		<liferay-ui:message key="document-names-must-end-with-one-of-the-following-extensions" /> <%= StringUtil.merge(PrefsPropsUtil.getStringArray(PropsKeys.DL_FILE_EXTENSIONS, StringPool.COMMA), StringPool.COMMA_AND_SPACE) %>.
+	</liferay-ui:error>
+
+	<liferay-ui:error exception="<%= FileNameException.class %>" message="please-enter-a-file-with-a-valid-file-name" />
+
+	<liferay-ui:error exception="<%= FileSizeException.class %>">
+
+		<%
+		long fileMaxSize = PrefsPropsUtil.getLong(PropsKeys.DL_FILE_MAX_SIZE);
+
+		if (fileMaxSize == 0) {
+			fileMaxSize = PrefsPropsUtil.getLong(PropsKeys.UPLOAD_SERVLET_REQUEST_IMPL_MAX_SIZE);
+		}
+
+		fileMaxSize /= 1024;
+		%>
+
+		<liferay-ui:message arguments="<%= fileMaxSize %>" key="please-enter-a-file-with-a-valid-file-size-no-larger-than-x" />
+	</liferay-ui:error>
+
+	<div class="lfr-dynamic-uploader">
+		<div class="lfr-upload-container" id="<portlet:namespace />fileUpload"></div>
+	</div>
+
+	<div class="lfr-fallback hide" id="<portlet:namespace />fallback">
+		<aui:fieldset label="upload-files">
+			<aui:input label='<%= LanguageUtil.get(pageContext, "file") + " 1" %>' name="file1" type="file" />
+
+			<aui:input label='<%= LanguageUtil.get(pageContext, "file") + " 2" %>' name="file2" type="file" />
+
+			<aui:input label='<%= LanguageUtil.get(pageContext, "file") + " 3" %>' name="file3" type="file" />
+		</aui:fieldset>
+
+		<aui:button-row>
+			<aui:button type="submit" />
+
+			<%
+			String taglibOnClick = "parent.location = '" + HtmlUtil.escape(redirect) + "';";
+			%>
+
+			<aui:button onClick="<%= taglibOnClick %>" type="cancel" />
+		</aui:button-row>
+	</div>
+</aui:form>
+
+<aui:script use="aui-base">
+	var validateFile = function(fileField) {
+		var value = fileField.val();
+
+		if (value) {
+			var extension = value.substring(value.lastIndexOf('.')).toLowerCase();
+			var validExtensions = ['<%= StringUtil.merge(PrefsPropsUtil.getStringArray(PropsKeys.DL_FILE_EXTENSIONS, StringPool.COMMA), "', '") %>'];
+
+			if ((A.Array.indexOf(validExtensions, '*') == -1) &&
+				(A.Array.indexOf(validExtensions, extension) == -1)) {
+
+				alert('<%= UnicodeLanguageUtil.get(pageContext, "document-names-must-end-with-one-of-the-following-extensions") %> <%= StringUtil.merge(PrefsPropsUtil.getStringArray(PropsKeys.DL_FILE_EXTENSIONS, StringPool.COMMA), StringPool.COMMA_AND_SPACE) %>');
+
+				fileField.val('');
+			}
+		}
+	};
+
+	var onFileChange = function(event) {
+		validateFile(event.currentTarget);
+	};
+
+	for (var i = 1; i < 4; i++) {
+		var fileField = A.one('#<portlet:namespace />file' + i);
+
+		if (fileField) {
+			fileField.on('change', onFileChange);
+
+			validateFile(fileField);
+		}
+	}
+</aui:script>
+
+<%
+Date expirationDate = new Date(System.currentTimeMillis() + PropsValues.SESSION_TIMEOUT * Time.MINUTE);
+
+Ticket ticket = TicketLocalServiceUtil.addTicket(user.getCompanyId(), User.class.getName(), user.getUserId(), TicketConstants.TYPE_IMPERSONATE, null, expirationDate, new ServiceContext());
+%>
+
+<aui:script use="liferay-upload">
+	new Liferay.Upload(
+		{
+			boundingBox: '#<portlet:namespace />fileUpload',
+			deleteFile: '<liferay-portlet:actionURL windowState="<%= LiferayWindowState.POP_UP.toString() %>" doAsUserId="<%= user.getUserId() %>"><portlet:param name="struts_action" value="/wiki/edit_page_attachment" /><portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE_TEMP %>" /><portlet:param name="nodeId" value="<%= String.valueOf(node.getNodeId()) %>" /><portlet:param name="title" value="<%= wikiPage.getTitle() %>" /></liferay-portlet:actionURL>&ticketKey=<%= ticket.getKey() %><liferay-ui:input-permissions-params modelName="<%= WikiPage.class.getName() %>" />',
+			fallback: '#<portlet:namespace />fallback',
+			fileDescription: '<%= StringUtil.merge(PrefsPropsUtil.getStringArray(PropsKeys.DL_FILE_EXTENSIONS, StringPool.COMMA)) %>',
+			maxFileSize: '<%= PrefsPropsUtil.getLong(PropsKeys.DL_FILE_MAX_SIZE) %> B',
+			metadataContainer: '#<portlet:namespace />selectedFileNameMetadataContainer',
+			metadataExplanationContainer: '#<portlet:namespace />metadataExplanationContainer',
+			namespace: '<portlet:namespace />',
+			tempFileURL: {
+				method: Liferay.Service.bind('/wikipage/get-temp-page-attachment-names'),
+				params: {
+					nodeId: <%= node.getNodeId() %>,
+					tempFolderName: 'com.liferay.portlet.wiki.action.EditPageAttachmentsAction'
+				}
+			},
+			uploadFile: '<liferay-portlet:actionURL windowState="<%= LiferayWindowState.POP_UP.toString() %>" doAsUserId="<%= user.getUserId() %>"><portlet:param name="struts_action" value="/wiki/edit_page_attachment" /><portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ADD_TEMP %>" /><portlet:param name="nodeId" value="<%= String.valueOf(node.getNodeId()) %>" /><portlet:param name="title" value="<%= wikiPage.getTitle() %>" /></liferay-portlet:actionURL>&ticketKey=<%= ticket.getKey() %><liferay-ui:input-permissions-params modelName="<%= WikiPage.class.getName() %>" />'
+		}
+	);
+</aui:script>
+
+<portlet:actionURL var="editMultiplePageAttachmentsURL">
+	<portlet:param name="struts_action" value="/wiki/edit_page_attachment" />
+</portlet:actionURL>
+
+<aui:form action="<%= editMultiplePageAttachmentsURL %>" method="post" name="fm2" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "updateMultiplePageAttachments();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.ADD_MULTIPLE %>" />
+	<aui:input name="nodeId" type="hidden" value="<%= String.valueOf(node.getNodeId()) %>" />
+	<aui:input name="title" type="hidden" value="<%= wikiPage.getTitle() %>" />
+
+	<span id="<portlet:namespace />selectedFileNameContainer"></span>
+
+	<div class="hide" id="<portlet:namespace />metadataExplanationContainer"></div>
+
+	<div class="hide selected" id="<portlet:namespace />selectedFileNameMetadataContainer">
+		<aui:button type="submit" />
+	</div>
+</aui:form>
+
+<aui:script>
+	Liferay.provide(
+		window,
+		'<portlet:namespace />updateMultiplePageAttachments',
+		function() {
+			var A = AUI();
+			var Lang = A.Lang;
+
+			var selectedFileNameContainer = A.one('#<portlet:namespace />selectedFileNameContainer');
+
+			var inputTpl = '<input id="<portlet:namespace />selectedFileName{0}" name="<portlet:namespace />selectedFileName" type="hidden" value="{1}" />';
+
+			var values = A.all('input[name=<portlet:namespace />selectUploadedFileCheckbox]:checked').val();
+
+			var buffer = [];
+			var dataBuffer = [];
+			var length = values.length;
+
+			for (var i = 0; i < length; i++) {
+				dataBuffer[0] = i;
+				dataBuffer[1] = values[i];
+
+				buffer[i] = Lang.sub(inputTpl, dataBuffer);
+			}
+
+			selectedFileNameContainer.html(buffer.join(''));
+
+			A.io.request(
+				document.<portlet:namespace />fm2.action,
+				{
+					dataType: 'json',
+					form: {
+						id: document.<portlet:namespace />fm2
+					},
+					after: {
+						success: function(event, id, obj) {
+							var jsonArray = this.get('responseData');
+
+							for (var i = 0; i < jsonArray.length; i++) {
+								var item = jsonArray[i];
+
+								var checkBox = A.one('input[data-fileName="' + item.fileName + '"]');
+
+								checkBox.attr('checked', false);
+								checkBox.hide();
+
+								var li = checkBox.ancestor();
+
+								li.removeClass('selectable').removeClass('selected');
+
+								var cssClass = null;
+								var childHTML = null;
+
+								if (item.added) {
+									cssClass = 'file-saved';
+
+									childHTML = '<span class="success-message"><%= UnicodeLanguageUtil.get(pageContext, "successfully-saved") %></span>';
+								}
+								else {
+									cssClass = 'upload-error';
+
+									childHTML = '<span class="error-message">' + item.errorMessage + '</span>';
+								}
+
+								li.addClass(cssClass);
+								li.append(childHTML);
+							}
+						}
+					}
+				}
+			);
+		},
+		['aui-base']
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/error.jsp
new file mode 100644
index 0000000..62a8c4a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/error.jsp
@@ -0,0 +1,121 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= NoSuchNodeException.class %>" message="please-enter-a-valid-page-title" />
+
+<c:if test="<%= SessionErrors.contains(renderRequest, NoSuchPageException.class.getName()) %>">
+
+	<%
+	long nodeId = ParamUtil.getLong(request, "nodeId");
+
+	if (nodeId == 0) {
+		WikiNode node = (WikiNode)request.getAttribute(WebKeys.WIKI_NODE);
+
+		if (node != null) {
+			nodeId = node.getNodeId();
+		}
+	}
+
+	String title = ParamUtil.getString(request, "title");
+
+	boolean hasDraftPage = false;
+
+	if (nodeId > 0) {
+		hasDraftPage = WikiPageLocalServiceUtil.hasDraftPage(nodeId, title);
+	}
+
+	PortletURL searchURL = renderResponse.createRenderURL();
+
+	searchURL.setParameter("struts_action", "/wiki/search");
+	searchURL.setParameter("redirect", currentURL);
+	searchURL.setParameter("nodeId", String.valueOf(nodeId));
+	searchURL.setParameter("keywords", title);
+
+	PortletURL editPageURL = renderResponse.createRenderURL();
+
+	editPageURL.setParameter("struts_action", "/wiki/edit_page");
+	editPageURL.setParameter("redirect", currentURL);
+	editPageURL.setParameter("nodeId", String.valueOf(nodeId));
+	editPageURL.setParameter("title", title);
+	%>
+
+	<c:choose>
+		<c:when test="<%= hasDraftPage %>">
+
+			<%
+			WikiPage draftPage = WikiPageLocalServiceUtil.getDraftPage(nodeId, title);
+
+			boolean editableDraft = false;
+
+			if (permissionChecker.isCompanyAdmin() || permissionChecker.isGroupAdmin(scopeGroupId) || (draftPage.getUserId() == user.getUserId())) {
+				editableDraft = true;
+			}
+			%>
+
+			<c:choose>
+				<c:when test="<%= editableDraft %>">
+					<div class="alert alert-info">
+						<liferay-ui:message key="this-page-has-an-associated-draft-that-is-not-yet-published" />
+					</div>
+
+					<div class="btn-toolbar">
+
+						<%
+						String taglibEditPage = "location.href = '" + editPageURL.toString() + "';";
+						%>
+
+						<aui:button onClick="<%= taglibEditPage %>" value="edit-draft" />
+					</div>
+				</c:when>
+				<c:otherwise>
+					<div class="alert alert-info">
+						<liferay-ui:message key="this-page-has-already-been-started-by-another-author" />
+					</div>
+				</c:otherwise>
+			</c:choose>
+		</c:when>
+		<c:otherwise>
+			<div class="alert alert-info">
+				<liferay-ui:message key="this-page-is-empty.-use-the-buttons-below-to-create-it-or-to-search-for-the-words-in-the-title" />
+			</div>
+
+			<div class="btn-toolbar">
+
+				<%
+				String taglibSearch = "location.href = '" + searchURL.toString() + "';";
+				%>
+
+				<aui:button onClick="<%= taglibSearch %>" value='<%= LanguageUtil.format(pageContext, "search-for-x", HtmlUtil.escapeAttribute(title)) %>' />
+
+				<%
+				String taglibEditPage = "location.href = '" + editPageURL.toString() + "';";
+				%>
+
+				<aui:button onClick="<%= taglibEditPage %>" value='<%= LanguageUtil.format(pageContext, "create-page-x", HtmlUtil.escapeAttribute(title)) %>' />
+			</div>
+		</c:otherwise>
+	</c:choose>
+</c:if>
+
+<liferay-ui:error exception="<%= PageTitleException.class %>" message="please-enter-a-valid-page-title" />
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/help/classic_wiki.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/help/classic_wiki.jsp
new file mode 100644
index 0000000..d286853
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/help/classic_wiki.jsp
@@ -0,0 +1,59 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<h4>
+	<liferay-ui:message key="text-styles" />
+</h4>
+
+<pre>
+'quoted'
+''italics''
+'''bold'''
+monospaced
+</pre>
+
+<h4>
+	<liferay-ui:message key="headers" />
+</h4>
+
+<pre>
+= Header 1 =
+== Header 2 ==
+=== Header 3 ===
+</pre>
+
+<h4>
+	<liferay-ui:message key="links" />
+</h4>
+
+<pre>
+CamelCaseWordsAreLinksToPages
+[http://www.liferay.com Liferay's Website]
+</pre>
+
+<h4>
+	<liferay-ui:message key="lists" />
+</h4>
+
+<pre>
+<img alt="<liferay-ui:message key="tab" />"src="<%= themeDisplay.getPathThemeImages() %>/wiki/tab.png" />* Item
+<img alt="<liferay-ui:message key="tab" />" src="<%= themeDisplay.getPathThemeImages() %>/wiki/tab.png" />&nbsp;<img alt="<liferay-ui:message key="tab" />" src="<%= themeDisplay.getPathThemeImages() %>/wiki/tab.png" />* Subitem
+
+<img alt="<liferay-ui:message key="tab" />" src="<%= themeDisplay.getPathThemeImages() %>/wiki/tab.png" />1 Ordered Item
+<img alt="<liferay-ui:message key="tab" />" src="<%= themeDisplay.getPathThemeImages() %>/wiki/tab.png" />&nbsp;<img alt="<liferay-ui:message key="tab" />" src="<%= themeDisplay.getPathThemeImages() %>/wiki/tab.png" />1 Ordered Subitem
+</pre>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/help/creole.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/help/creole.jsp
new file mode 100644
index 0000000..358e291
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/help/creole.jsp
@@ -0,0 +1,74 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<h4>
+	<liferay-ui:message key="text-styles" />
+</h4>
+
+<pre>
+//italics//
+**bold**
+</pre>
+
+<h4>
+	<liferay-ui:message key="headers" />
+</h4>
+
+<pre>
+== Large heading ==
+=== Medium heading ===
+==== Small heading ====
+</pre>
+
+<h4>
+	<liferay-ui:message key="links" />
+</h4>
+
+<pre>
+[[Link to a page]]
+[[http://www.liferay.com|Link to website]]
+</pre>
+
+<h4>
+	<liferay-ui:message key="lists" />
+</h4>
+
+<pre>
+* Item
+** Subitem
+# Ordered Item
+## Ordered Subitem
+</pre>
+
+<h4>
+	<liferay-ui:message key="images" />
+</h4>
+
+<pre>
+{{attached-image.png}}
+{{Page Name/other-image.jpg|label}}
+</pre>
+
+<h4>
+	<liferay-ui:message key="other" />
+</h4>
+
+<pre>
+&lt;&lt;TableOfContents&gt;&gt;
+{{{ Preformatted }}}
+</pre>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/help/mediawiki.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/help/mediawiki.jsp
new file mode 100644
index 0000000..dffe69a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/help/mediawiki.jsp
@@ -0,0 +1,78 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<h4>
+	<liferay-ui:message key="text-styles" />
+</h4>
+
+<pre>
+''italics''
+'''bold'''
+</pre>
+
+<h4>
+	<liferay-ui:message key="headers" />
+</h4>
+
+<pre>
+== Large heading ==
+=== Medium heading ===
+==== Small heading ====
+</pre>
+
+<h4>
+	<liferay-ui:message key="links" />
+</h4>
+
+<pre>
+[[Internal Link | Optional Label]]
+[http://example.com External Link]
+</pre>
+
+<h4>
+	<liferay-ui:message key="lists" />
+</h4>
+
+<pre>
+* Item
+** Subitem
+# Ordered Item
+## Ordered Subitem
+</pre>
+
+<h4>
+	<liferay-ui:message key="images" />
+</h4>
+
+<pre>
+[[Image:attached-image.png]]
+[[Image:Page Name/image.jpg]]
+</pre>
+
+<h4>
+	<liferay-ui:message key="other" />
+</h4>
+
+<pre>
+Table of contents:
+	Added automatically
+Code block:
+	Start each line with a space
+Inline code:
+	&lt;code&gt;Test.java&lt;/code&gt;
+</pre>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/history_navigation.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/history_navigation.jsp
new file mode 100644
index 0000000..d73a3ca
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/history_navigation.jsp
@@ -0,0 +1,192 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+long nodeId = (Long)request.getAttribute(WebKeys.WIKI_NODE_ID);
+String title = (String)request.getAttribute(WebKeys.TITLE);
+double sourceVersion = (Double)request.getAttribute(WebKeys.SOURCE_VERSION);
+double targetVersion = (Double)request.getAttribute(WebKeys.TARGET_VERSION);
+
+double previousVersion = 0;
+double nextVersion = 0;
+
+List<WikiPage> allPages = WikiPageLocalServiceUtil.getPages(nodeId, title, QueryUtil.ALL_POS, QueryUtil.ALL_POS, new PageVersionComparator());
+List<WikiPage> intermediatePages = new ArrayList<WikiPage>();
+
+for (WikiPage wikiPage : allPages) {
+	if ((wikiPage.getVersion() < sourceVersion) &&
+		(wikiPage.getVersion() > previousVersion)) {
+
+		previousVersion = wikiPage.getVersion();
+	}
+
+	if ((wikiPage.getVersion() > targetVersion) &&
+		((wikiPage.getVersion() < nextVersion) ||
+		 (nextVersion == 0))) {
+
+		nextVersion = wikiPage.getVersion();
+	}
+
+	if ((wikiPage.getVersion() > sourceVersion) &&
+		(wikiPage.getVersion() <= targetVersion)) {
+
+		intermediatePages.add(wikiPage);
+	}
+}
+
+String sourceVersionString = (previousVersion != 0) ? String.valueOf(sourceVersion) : String.valueOf(sourceVersion) + " (" + LanguageUtil.get(pageContext, "first-version") + ")";
+String targetVersionString = (nextVersion != 0) ? String.valueOf(targetVersion) : String.valueOf(targetVersion) + " (" + LanguageUtil.get(pageContext, "last-version") + ")";
+
+String type = ParamUtil.getString(request, "type", "text");
+
+boolean htmlMode = false;
+
+if (type.equals("html")) {
+	htmlMode = true;
+}
+%>
+
+<portlet:renderURL var="changeMode">
+	<portlet:param name="struts_action" value="/wiki/compare_versions" />
+	<portlet:param name="nodeId" value="<%= String.valueOf(nodeId) %>" />
+	<portlet:param name="title" value="<%= title %>" />
+	<portlet:param name="sourceVersion" value="<%= String.valueOf(sourceVersion) %>" />
+	<portlet:param name="targetVersion" value="<%= String.valueOf(targetVersion) %>" />
+	<portlet:param name="type" value='<%= htmlMode ? "text" : "html" %>' />
+</portlet:renderURL>
+
+<portlet:renderURL var="previousChange">
+	<portlet:param name="struts_action" value="/wiki/compare_versions" />
+	<portlet:param name="nodeId" value="<%= String.valueOf(nodeId) %>" />
+	<portlet:param name="title" value="<%= title %>" />
+	<portlet:param name="sourceVersion" value="<%= String.valueOf(previousVersion) %>" />
+	<portlet:param name="targetVersion" value="<%= String.valueOf(sourceVersion) %>" />
+	<portlet:param name="type" value="<%= type %>" />
+</portlet:renderURL>
+
+<portlet:renderURL var="nextChange">
+	<portlet:param name="struts_action" value="/wiki/compare_versions" />
+	<portlet:param name="nodeId" value="<%= String.valueOf(nodeId) %>" />
+	<portlet:param name="title" value="<%= title %>" />
+	<portlet:param name="sourceVersion" value="<%= String.valueOf(targetVersion) %>" />
+	<portlet:param name="targetVersion" value="<%= String.valueOf(nextVersion) %>" />
+	<portlet:param name="type" value="<%= type %>" />
+</portlet:renderURL>
+
+<div class="history-navigation">
+	<c:choose>
+		<c:when test="<%= previousVersion != 0 %>">
+			<aui:a cssClass="previous" href="<%= previousChange %>" label="previous-change" />
+		</c:when>
+		<c:otherwise>
+			<span class="previous"><liferay-ui:message key="previous-change" /></span>
+		</c:otherwise>
+	</c:choose>
+
+	<div class="central-info">
+		<liferay-ui:icon
+			cssClass="central-title"
+			image="pages"
+			label="<%= true %>"
+			message='<%= LanguageUtil.format(pageContext, "comparing-versions-x-and-x", new Object[] {sourceVersionString, targetVersionString}) %>'
+		/>
+
+		<c:choose>
+			<c:when test="<%= !htmlMode %>">
+				<aui:a cssClass="change-mode" href="<%= changeMode %>" label="html-mode" />
+			</c:when>
+			<c:otherwise>
+				<span class="change-mode"><liferay-ui:message key="html-mode" /></span>
+			</c:otherwise>
+		</c:choose>
+
+		<%= StringPool.PIPE %>
+
+		<c:choose>
+			<c:when test="<%= htmlMode %>">
+				<aui:a cssClass="change-mode" href="<%= changeMode %>" label="text-mode" />
+			</c:when>
+			<c:otherwise>
+				<span class="change-mode"><liferay-ui:message key="text-mode" /></span>
+			</c:otherwise>
+		</c:choose>
+
+		<div class="central-author">
+			<c:choose>
+				<c:when test="<%= intermediatePages.size() > 1 %>">
+
+					<%
+					StringBundler sb = new StringBundler(intermediatePages.size() * 7);
+
+					for (WikiPage wikiPage: intermediatePages) {
+						sb.append(HtmlUtil.escape(wikiPage.getUserName()));
+						sb.append(StringPool.SPACE);
+						sb.append(StringPool.OPEN_PARENTHESIS);
+						sb.append(wikiPage.getVersion());
+						sb.append(StringPool.CLOSE_PARENTHESIS);
+						sb.append(StringPool.COMMA);
+						sb.append(StringPool.SPACE);
+					}
+
+					sb.setIndex(sb.index() - 2);
+
+					sb.append(StringPool.SPACE);
+					%>
+
+					<liferay-ui:icon
+						image="user_icon"
+						label="<%= true %>"
+						message="<%= sb.toString() %>"
+						toolTip="authors"
+					/>
+				</c:when>
+				<c:otherwise>
+
+					<%
+					WikiPage wikiPage = intermediatePages.get(0);
+					%>
+
+					<liferay-ui:icon
+						cssClass="central-username"
+						image="user_icon"
+						label="<%= true %>"
+						message="<%= HtmlUtil.escape(wikiPage.getUserName()) %>"
+						toolTip="author"
+					/>
+
+					<c:if test="<%= Validator.isNotNull(wikiPage.getSummary()) %>">
+						<%= StringPool.COLON + StringPool.SPACE + wikiPage.getSummary() %>
+					</c:if>
+
+					<c:if test="<%= wikiPage.isMinorEdit() %>">
+						<%= StringPool.OPEN_PARENTHESIS + LanguageUtil.get(pageContext, "minor-edit") + StringPool.CLOSE_PARENTHESIS %>
+					</c:if>
+				</c:otherwise>
+			</c:choose>
+		</div>
+	</div>
+
+	<c:choose>
+		<c:when test="<%= nextVersion != 0 %>">
+			<aui:a cssClass="next" href="<%= nextChange %>" label="next-change" />
+		</c:when>
+		<c:otherwise>
+			<span class="next"><liferay-ui:message key="next-change" /></span>
+		</c:otherwise>
+	</c:choose>
+</div>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/import/mediawiki.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/import/mediawiki.jsp
new file mode 100644
index 0000000..94777cc
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/import/mediawiki.jsp
@@ -0,0 +1,35 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<aui:input name="filesCount" type="hidden" value="3" />
+
+<liferay-ui:error exception="<%= PortalException.class %>" message="please-provide-all-mandatory-files-and-make-sure-the-file-types-are-valid" />
+
+<aui:fieldset>
+	<aui:input helpMessage="import-wiki-pages-help" label="pages-file" name="file0" type="file" />
+
+	<aui:input helpMessage="import-wiki-users-help" label='<%= LanguageUtil.get(pageContext, "users-file") + "(" + LanguageUtil.get(pageContext, "optional") + ")" %>' name="file1" type="file" />
+
+	<aui:input helpMessage="import-wiki-images-help" label='<%= LanguageUtil.get(pageContext, "images-file") + "(" + LanguageUtil.get(pageContext, "optional") + ")" %>' name="file2" type="file" />
+
+	<aui:input label='<%= WikiPageConstants.FRONT_PAGE + "(" + LanguageUtil.get(pageContext, "optional") + ")" %>' name="<%= WikiImporterKeys.OPTIONS_FRONT_PAGE %>" size="40" type="text" value="Main Page" />
+
+	<aui:input checked="<%= true %>" label="import-only-the-latest-version-and-not-the-full-history" name="<%= WikiImporterKeys.OPTIONS_IMPORT_LATEST_VERSION %>" type="checkbox" />
+
+	<aui:input checked="<%= true %>" helpMessage="import-wiki-strict-mode-help" label="strict-mode" name="<%= WikiImporterKeys.OPTIONS_STRICT_IMPORT_MODE %>" type="checkbox" />
+</aui:fieldset>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/import_pages.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/import_pages.jsp
new file mode 100644
index 0000000..dd3085a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/import_pages.jsp
@@ -0,0 +1,97 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+String tabs2 = ParamUtil.getString(request, "tabs2");
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+String uploadProgressId = PortalUtil.generateRandomKey(request, "portlet_wiki_import_pages_uploadProgressId");
+String importProgressId = PortalUtil.generateRandomKey(request, "portlet_wiki_import_pages_importProgressId");
+
+WikiNode node = (WikiNode)request.getAttribute(WebKeys.WIKI_NODE);
+
+long nodeId = BeanParamUtil.getLong(node, request, "nodeId");
+
+String[] importers = PropsValues.WIKI_IMPORTERS;
+
+if (Validator.isNull(tabs2)) {
+	tabs2 = importers[0];
+}
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/wiki/import_pages");
+portletURL.setParameter("redirect", redirect);
+portletURL.setParameter("nodeId", String.valueOf(nodeId));
+%>
+
+<portlet:actionURL var="importPagesURL">
+	<portlet:param name="struts_action" value="/wiki/import_pages" />
+</portlet:actionURL>
+
+<aui:form action="<%= importPagesURL %>" enctype="multipart/form-data" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "importPages();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="importProgressId" type="hidden" value="<%= importProgressId %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="nodeId" type="hidden" value="<%= nodeId %>" />
+	<aui:input name="importer" type="hidden" value="<%= tabs2 %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title="import-pages"
+	/>
+
+	<liferay-ui:tabs
+		names="<%= StringUtil.merge(importers) %>"
+		param="tabs2"
+		url="<%= portletURL.toString() %>"
+	/>
+
+	<liferay-ui:error exception="<%= ImportFilesException.class %>" message="please-provide-all-mandatory-files-and-make-sure-the-file-types-are-valid" />
+	<liferay-ui:error exception="<%= NoSuchNodeException.class %>" message="the-node-could-not-be-found" />
+
+	<liferay-util:include page="<%= PropsUtil.get(PropsKeys.WIKI_IMPORTERS_PAGE, new Filter(tabs2)) %>" />
+
+	<aui:button-row>
+		<aui:button type="submit" value="import" />
+
+		<aui:button href="<%= redirect %>" type="cancel" />
+	</aui:button-row>
+</aui:form>
+
+<liferay-ui:upload-progress
+	id="<%= uploadProgressId %>"
+	message="uploading"
+	redirect="<%= HtmlUtil.escape(PortalUtil.escapeRedirect(redirect)) %>"
+/>
+
+<liferay-ui:upload-progress
+	id="<%= importProgressId %>"
+	message="importing"
+	redirect="<%= HtmlUtil.escape(PortalUtil.escapeRedirect(redirect)) %>"
+/>
+
+<aui:script>
+	function <portlet:namespace />importPages() {
+		<%= uploadProgressId %>.startProgress();
+		<%= importProgressId %>.startProgress();
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/init.jsp
new file mode 100644
index 0000000..d173a01
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/init.jsp
@@ -0,0 +1,95 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.NoSuchModelException" %><%@
+page import="com.liferay.portal.kernel.sanitizer.SanitizerException" %><%@
+page import="com.liferay.portal.kernel.sanitizer.SanitizerUtil" %><%@
+page import="com.liferay.portlet.documentlibrary.DuplicateFileException" %><%@
+page import="com.liferay.portlet.documentlibrary.FileExtensionException" %><%@
+page import="com.liferay.portlet.documentlibrary.FileNameException" %><%@
+page import="com.liferay.portlet.social.model.SocialActivity" %><%@
+page import="com.liferay.portlet.social.model.SocialActivityConstants" %><%@
+page import="com.liferay.portlet.social.service.SocialActivityLocalServiceUtil" %><%@
+page import="com.liferay.portlet.trash.service.TrashEntryLocalServiceUtil" %><%@
+page import="com.liferay.portlet.wiki.DuplicateNodeNameException" %><%@
+page import="com.liferay.portlet.wiki.DuplicatePageException" %><%@
+page import="com.liferay.portlet.wiki.ImportFilesException" %><%@
+page import="com.liferay.portlet.wiki.NoSuchNodeException" %><%@
+page import="com.liferay.portlet.wiki.NoSuchPageException" %><%@
+page import="com.liferay.portlet.wiki.NodeNameException" %><%@
+page import="com.liferay.portlet.wiki.PageContentException" %><%@
+page import="com.liferay.portlet.wiki.PageTitleException" %><%@
+page import="com.liferay.portlet.wiki.PageVersionException" %><%@
+page import="com.liferay.portlet.wiki.RequiredNodeException" %><%@
+page import="com.liferay.portlet.wiki.WikiFormatException" %><%@
+page import="com.liferay.portlet.wiki.importers.WikiImporterKeys" %><%@
+page import="com.liferay.portlet.wiki.model.WikiNode" %><%@
+page import="com.liferay.portlet.wiki.model.WikiPage" %><%@
+page import="com.liferay.portlet.wiki.model.WikiPageConstants" %><%@
+page import="com.liferay.portlet.wiki.model.WikiPageDisplay" %><%@
+page import="com.liferay.portlet.wiki.model.WikiPageResource" %><%@
+page import="com.liferay.portlet.wiki.model.impl.WikiPageImpl" %><%@
+page import="com.liferay.portlet.wiki.service.WikiNodeServiceUtil" %><%@
+page import="com.liferay.portlet.wiki.service.WikiPageLocalServiceUtil" %><%@
+page import="com.liferay.portlet.wiki.service.WikiPageResourceLocalServiceUtil" %><%@
+page import="com.liferay.portlet.wiki.service.WikiPageServiceUtil" %><%@
+page import="com.liferay.portlet.wiki.service.permission.WikiNodePermission" %><%@
+page import="com.liferay.portlet.wiki.service.permission.WikiPagePermission" %><%@
+page import="com.liferay.portlet.wiki.service.permission.WikiPermission" %><%@
+page import="com.liferay.portlet.wiki.social.WikiActivityKeys" %><%@
+page import="com.liferay.portlet.wiki.util.WikiCacheUtil" %><%@
+page import="com.liferay.portlet.wiki.util.WikiPageAttachmentsUtil" %><%@
+page import="com.liferay.portlet.wiki.util.WikiUtil" %><%@
+page import="com.liferay.portlet.wiki.util.comparator.PageVersionComparator" %><%@
+page import="com.liferay.util.RSSUtil" %>
+
+<%
+String displayStyle = portletPreferences.getValue("displayStyle", StringPool.BLANK);
+long displayStyleGroupId = GetterUtil.getLong(portletPreferences.getValue("displayStyleGroupId", null), themeDisplay.getScopeGroupId());
+boolean enableRelatedAssets = GetterUtil.getBoolean(portletPreferences.getValue("enableRelatedAssets", null), true);
+boolean enablePageRatings = PropsValues.WIKI_PAGE_RATINGS_ENABLED && GetterUtil.getBoolean(portletPreferences.getValue("enablePageRatings", null), true);
+boolean enableComments = PropsValues.WIKI_PAGE_COMMENTS_ENABLED && GetterUtil.getBoolean(portletPreferences.getValue("enableComments", null), true);
+boolean enableCommentRatings = GetterUtil.getBoolean(portletPreferences.getValue("enableCommentRatings", null), true);
+
+List<WikiNode> allNodes = WikiNodeServiceUtil.getNodes(scopeGroupId);
+List<String> allNodeNames = WikiUtil.getNodeNames(allNodes);
+
+String[] visibleNodes = null;
+
+String visibleNodesPreference = portletPreferences.getValue("visibleNodes", null);
+
+if (visibleNodesPreference != null) {
+	visibleNodes = StringUtil.split(visibleNodesPreference);
+
+	allNodes = WikiUtil.orderNodes(allNodes, visibleNodes);
+}
+else {
+	visibleNodes = allNodeNames.toArray(new String[allNodeNames.size()]);
+}
+
+String[] hiddenNodes = StringUtil.split(portletPreferences.getValue("hiddenNodes", null));
+
+boolean enableRSS = !PortalUtil.isRSSFeedsEnabled() ? false : GetterUtil.getBoolean(portletPreferences.getValue("enableRss", null), true);
+int rssDelta = GetterUtil.getInteger(portletPreferences.getValue("rssDelta", StringPool.BLANK), SearchContainer.DEFAULT_DELTA);
+String rssDisplayStyle = portletPreferences.getValue("rssDisplayStyle", RSSUtil.DISPLAY_STYLE_DEFAULT);
+String rssFeedType = portletPreferences.getValue("rssFeedType", RSSUtil.FEED_TYPE_DEFAULT);
+
+Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(locale, timeZone);
+%>
+
+<%@ include file="/html/portlet/wiki/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/move_page.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/move_page.jsp
new file mode 100644
index 0000000..d227b2b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/move_page.jsp
@@ -0,0 +1,205 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+WikiNode node = (WikiNode)request.getAttribute(WebKeys.WIKI_NODE);
+WikiPage wikiPage = (WikiPage)request.getAttribute(WebKeys.WIKI_PAGE);
+
+String title = wikiPage.getTitle();
+String newTitle = ParamUtil.get(request, "newTitle", StringPool.BLANK);
+%>
+
+<liferay-util:include page="/html/portlet/wiki/top_links.jsp" />
+
+<liferay-ui:error exception="<%= DuplicatePageException.class %>" message="there-is-already-a-page-with-the-specified-title" />
+<liferay-ui:error exception="<%= PageTitleException.class %>" message="please-enter-a-valid-title" />
+
+<%@ include file="/html/portlet/wiki/page_name.jspf" %>
+
+<portlet:actionURL var="movePageURL">
+	<portlet:param name="struts_action" value="/wiki/move_page" />
+</portlet:actionURL>
+
+<aui:form action="<%= movePageURL %>" method="post" name="fm" onSubmit='<%= renderResponse.getNamespace() + "changeParent();" %>'>
+	<aui:input name="<%= Constants.CMD %>" type="hidden" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="nodeId" type="hidden" value="<%= node.getNodeId() %>" />
+	<aui:input name="title" type="hidden" value="<%= title %>" />
+	<aui:input name="workflowAction" type="hidden" value="<%= WorkflowConstants.ACTION_PUBLISH %>" />
+
+	<liferay-ui:tabs
+		names="rename,change-parent"
+		refresh="<%= false %>"
+	>
+
+		<%
+		boolean pending = false;
+
+		if (WorkflowDefinitionLinkLocalServiceUtil.hasWorkflowDefinitionLink(themeDisplay.getCompanyId(), scopeGroupId, WikiPage.class.getName())) {
+			WikiPage latestWikiPage = WikiPageServiceUtil.getPage(wikiPage.getNodeId(), wikiPage.getTitle(), null);
+
+			pending = latestWikiPage.isPending();
+		}
+		%>
+
+		<liferay-ui:section>
+			<div class="alert alert-info">
+				<liferay-ui:message key="use-the-form-below-to-rename-a-page,-moving-all-of-its-history-to-the-new-name" />
+			</div>
+
+			<aui:fieldset>
+				<aui:field-wrapper label="current-title">
+					<liferay-ui:input-resource url="<%= wikiPage.getTitle() %>" />
+				</aui:field-wrapper>
+
+				<aui:input name="newTitle" value="<%= newTitle %>" />
+
+				<c:if test="<%= pending %>">
+					<div class="alert alert-info">
+						<liferay-ui:message key="there-is-a-publication-workflow-in-process" />
+					</div>
+				</c:if>
+
+				<aui:button-row>
+					<aui:button disabled="<%= pending %>" onClick='<%= renderResponse.getNamespace() + "renamePage();" %>' value="rename" />
+
+					<aui:button href="<%= redirect %>" type="cancel" />
+				</aui:button-row>
+			</aui:fieldset>
+		</liferay-ui:section>
+		<liferay-ui:section>
+			<div class="alert alert-info">
+				<liferay-ui:message key="use-the-form-below-to-move-a-page-and-all-of-its-history-to-be-the-child-of-a-new-parent-page" />
+			</div>
+
+			<%
+			String parentText = StringPool.BLANK;
+
+			WikiPage parentPage = wikiPage.getViewableParentPage();
+
+			if (parentPage == null) {
+				parentText = StringPool.OPEN_PARENTHESIS + LanguageUtil.get(pageContext, "none") + StringPool.CLOSE_PARENTHESIS;
+			}
+			else {
+				parentText = parentPage.getTitle();
+
+				parentPage = parentPage.getViewableParentPage();
+
+				while (parentPage != null) {
+					parentText = parentPage.getTitle() + " &raquo; " + parentText;
+
+					parentPage = parentPage.getViewableParentPage();
+				}
+			}
+
+			List<WikiPage> childPages = WikiPageLocalServiceUtil.getChildren(node.getNodeId(), true, StringPool.BLANK);
+
+			childPages = ListUtil.sort(childPages);
+
+			childPages.remove(wikiPage);
+			%>
+
+			<aui:fieldset>
+				<aui:field-wrapper label="current-parent">
+					<liferay-ui:input-resource url="<%= parentText %>" />
+				</aui:field-wrapper>
+
+				<%
+				boolean newParentAvailable = true;
+
+				if (childPages.isEmpty()) {
+					newParentAvailable = false;
+				%>
+
+					<aui:select disabled="<%= true %>" label="new-parent" name="newParentTitle">
+						<aui:option label="not-available" value="" />
+					</aui:select>
+
+				<%
+				}
+				else {
+				%>
+
+					<aui:select label="new-parent" name="newParentTitle">
+						<aui:option label="none" selected="<%= Validator.isNull(wikiPage.getParentTitle()) %>" value="" />
+
+						<%
+						for (WikiPage childPage : childPages) {
+							if (Validator.isNull(childPage.getRedirectTitle())) {
+								request.setAttribute(WebKeys.WIKI_TREE_WALKER_PARENT, childPage);
+								request.setAttribute(WebKeys.WIKI_TREE_WALKER_PAGE, wikiPage);
+								request.setAttribute(WebKeys.WIKI_TREE_WALKER_DEPTH, 1);
+						%>
+
+								<liferay-util:include page="/html/portlet/wiki/page_tree.jsp" />
+
+						<%
+							}
+						}
+						%>
+
+					</aui:select>
+
+				<%
+				}
+				%>
+
+				<c:if test="<%= pending %>">
+					<div class="alert alert-info">
+						<liferay-ui:message key="there-is-a-publication-workflow-in-process" />
+					</div>
+				</c:if>
+
+				<aui:button-row>
+					<c:choose>
+						<c:when test="<%= WorkflowDefinitionLinkLocalServiceUtil.hasWorkflowDefinitionLink(themeDisplay.getCompanyId(), scopeGroupId, WikiPage.class.getName()) %>">
+							<aui:button disabled="<%= pending %>" name="publishButton" onClick='<%= renderResponse.getNamespace() + "publishPage();" %>' value="submit-for-publication" />
+						</c:when>
+						<c:otherwise>
+							<aui:button disabled="<%= !newParentAvailable %>" type="submit" value="change-parent" />
+						</c:otherwise>
+					</c:choose>
+
+					<aui:button href="<%= redirect %>" type="cancel" />
+				</aui:button-row>
+			</aui:fieldset>
+		</liferay-ui:section>
+	</liferay-ui:tabs>
+</aui:form>
+
+<aui:script>
+	function <portlet:namespace />changeParent() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "changeParent";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+
+	function <portlet:namespace />publishPage() {
+		document.<portlet:namespace />fm.<portlet:namespace />workflowAction.value = "<%= WorkflowConstants.ACTION_PUBLISH %>";
+
+		<portlet:namespace />changeParent();
+	}
+
+	function <portlet:namespace />renamePage() {
+		document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "rename";
+
+		submitForm(document.<portlet:namespace />fm);
+	}
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/node_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/node_action.jsp
new file mode 100644
index 0000000..972ddd5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/node_action.jsp
@@ -0,0 +1,138 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+WikiNode node = (WikiNode)row.getObject();
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= WikiNodePermission.contains(permissionChecker, node, ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/wiki/edit_node" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="nodeId" value="<%= String.valueOf(node.getNodeId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= WikiNodePermission.contains(permissionChecker, node, ActionKeys.PERMISSIONS) %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= WikiNode.class.getName() %>"
+			modelResourceDescription="<%= node.getName() %>"
+			resourcePrimKey="<%= String.valueOf(node.getNodeId()) %>"
+			var="permissionsURL"
+			windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			method="get"
+			url="<%= permissionsURL %>"
+			useDialog="<%= true %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= WikiNodePermission.contains(permissionChecker, node, ActionKeys.IMPORT) %>">
+		<portlet:renderURL var="importURL">
+			<portlet:param name="struts_action" value="/wiki/import_pages" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="nodeId" value="<%= String.valueOf(node.getNodeId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="post"
+			message="import-pages"
+			url="<%= importURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= enableRSS %>">
+		<liferay-ui:rss
+			delta="<%= rssDelta %>"
+			displayStyle="<%= rssDisplayStyle %>"
+			feedType="<%= rssFeedType %>"
+			url='<%= themeDisplay.getPathMain() + "/wiki/rss?p_l_id=" + plid + "&nodeId=" + node.getNodeId() %>'
+		/>
+	</c:if>
+
+	<c:if test="<%= WikiNodePermission.contains(permissionChecker, node, ActionKeys.SUBSCRIBE) && (WikiUtil.getEmailPageAddedEnabled(portletPreferences) || WikiUtil.getEmailPageUpdatedEnabled(portletPreferences)) %>">
+		<c:choose>
+			<c:when test="<%= SubscriptionLocalServiceUtil.isSubscribed(user.getCompanyId(), user.getUserId(), WikiNode.class.getName(), node.getNodeId()) %>">
+				<portlet:actionURL var="unsubscribeURL">
+					<portlet:param name="struts_action" value="/wiki/edit_node" />
+					<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UNSUBSCRIBE %>" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="nodeId" value="<%= String.valueOf(node.getNodeId()) %>" />
+				</portlet:actionURL>
+
+				<liferay-ui:icon
+					image="unsubscribe"
+					url="<%= unsubscribeURL %>"
+				/>
+			</c:when>
+			<c:otherwise>
+				<portlet:actionURL var="subscribeURL">
+					<portlet:param name="struts_action" value="/wiki/edit_node" />
+					<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.SUBSCRIBE %>" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="nodeId" value="<%= String.valueOf(node.getNodeId()) %>" />
+				</portlet:actionURL>
+
+				<liferay-ui:icon
+					image="subscribe"
+					url="<%= subscribeURL %>"
+				/>
+			</c:otherwise>
+		</c:choose>
+	</c:if>
+
+	<c:if test="<%= WikiNodePermission.contains(permissionChecker, node, ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/wiki/edit_node" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= (TrashUtil.isTrashEnabled(scopeGroupId)) ? Constants.MOVE_TO_TRASH : Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="nodeId" value="<%= String.valueOf(node.getNodeId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete
+			trash="<%= TrashUtil.isTrashEnabled(scopeGroupId) %>"
+			url="<%= deleteURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= WikiNodePermission.contains(permissionChecker, node, ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="viewDeletedAttachmentsURL">
+			<portlet:param name="struts_action" value="/wiki/view_node_deleted_attachments" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="nodeId" value="<%= String.valueOf(node.getNodeId()) %>" />
+			<portlet:param name="viewTrashAttachments" value="<%= Boolean.TRUE.toString() %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="delete_attachment"
+			message="view-removed-attachments"
+			url="<%= viewDeletedAttachmentsURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_action.jsp
new file mode 100644
index 0000000..1e092a1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_action.jsp
@@ -0,0 +1,146 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+WikiPage wikiPage = (WikiPage)row.getObject();
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= WikiPagePermission.contains(permissionChecker, wikiPage, ActionKeys.UPDATE) %>">
+		<portlet:renderURL var="editURL">
+			<portlet:param name="struts_action" value="/wiki/edit_page" />
+			<portlet:param name="nodeId" value="<%= String.valueOf(wikiPage.getNodeId()) %>" />
+			<portlet:param name="title" value="<%= HtmlUtil.unescape(wikiPage.getTitle()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= editURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= WikiPagePermission.contains(permissionChecker, wikiPage, ActionKeys.PERMISSIONS) %>">
+		<liferay-security:permissionsURL
+			modelResource="<%= WikiPage.class.getName() %>"
+			modelResourceDescription="<%= wikiPage.getTitle() %>"
+			resourcePrimKey="<%= String.valueOf(wikiPage.getResourcePrimKey()) %>"
+			var="permissionsURL"
+			windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+		/>
+
+		<liferay-ui:icon
+			image="permissions"
+			method="get"
+			url="<%= permissionsURL %>"
+			useDialog="<%= true %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= WikiPagePermission.contains(permissionChecker, wikiPage, ActionKeys.UPDATE) && WikiNodePermission.contains(permissionChecker, wikiPage.getNodeId(), ActionKeys.ADD_PAGE) %>">
+		<liferay-portlet:renderURL allowEmptyParam="<%= true %>" var="copyPageURL">
+			<liferay-portlet:param name="struts_action" value="/wiki/edit_page" />
+			<liferay-portlet:param name="redirect" value="<%= currentURL %>" />
+			<liferay-portlet:param name="nodeId" value="<%= String.valueOf(wikiPage.getNodeId()) %>" />
+			<liferay-portlet:param name="title" value="" />
+			<liferay-portlet:param name="editTitle" value="1" />
+			<liferay-portlet:param name="templateNodeId" value="<%= String.valueOf(wikiPage.getNodeId()) %>" />
+			<liferay-portlet:param name="templateTitle" value="<%= HtmlUtil.unescape(wikiPage.getTitle()) %>" />
+		</liferay-portlet:renderURL>
+
+		<liferay-ui:icon
+			image="copy"
+			url="<%= copyPageURL.toString() %>"
+		/>
+
+		<portlet:renderURL var="movePageURL">
+			<portlet:param name="struts_action" value="/wiki/move_page" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="nodeId" value="<%= String.valueOf(wikiPage.getNodeId()) %>" />
+			<portlet:param name="title" value="<%= HtmlUtil.unescape(wikiPage.getTitle()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:icon
+			image="forward"
+			message="move"
+			url="<%= movePageURL.toString() %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= WikiPagePermission.contains(permissionChecker, wikiPage, ActionKeys.SUBSCRIBE) && (WikiUtil.getEmailPageAddedEnabled(portletPreferences) || WikiUtil.getEmailPageUpdatedEnabled(portletPreferences)) %>">
+		<c:choose>
+			<c:when test="<%= SubscriptionLocalServiceUtil.isSubscribed(user.getCompanyId(), user.getUserId(), WikiPage.class.getName(), wikiPage.getResourcePrimKey()) %>">
+				<portlet:actionURL var="unsubscribeURL">
+					<portlet:param name="struts_action" value="/wiki/edit_page" />
+					<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UNSUBSCRIBE %>" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="nodeId" value="<%= String.valueOf(wikiPage.getNodeId()) %>" />
+					<portlet:param name="title" value="<%= HtmlUtil.unescape(wikiPage.getTitle()) %>" />
+				</portlet:actionURL>
+
+				<liferay-ui:icon
+					image="unsubscribe"
+					url="<%= unsubscribeURL %>"
+				/>
+			</c:when>
+			<c:otherwise>
+				<portlet:actionURL var="subscribeURL">
+					<portlet:param name="struts_action" value="/wiki/edit_page" />
+					<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.SUBSCRIBE %>" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="nodeId" value="<%= String.valueOf(wikiPage.getNodeId()) %>" />
+					<portlet:param name="title" value="<%= HtmlUtil.unescape(wikiPage.getTitle()) %>" />
+				</portlet:actionURL>
+
+				<liferay-ui:icon
+					image="subscribe"
+					url="<%= subscribeURL %>"
+				/>
+			</c:otherwise>
+		</c:choose>
+	</c:if>
+
+	<c:if test="<%= !wikiPage.isDraft() && WikiPagePermission.contains(permissionChecker, wikiPage.getNodeId(), HtmlUtil.unescape(wikiPage.getTitle()), ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/wiki/edit_page" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= (TrashUtil.isTrashEnabled(scopeGroupId)) ? Constants.MOVE_TO_TRASH : Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="nodeId" value="<%= String.valueOf(wikiPage.getNodeId()) %>" />
+			<portlet:param name="title" value="<%= HtmlUtil.unescape(wikiPage.getTitle()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete
+			trash="<%= TrashUtil.isTrashEnabled(scopeGroupId) %>"
+			url="<%= deleteURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= wikiPage.isDraft() && WikiPagePermission.contains(permissionChecker, wikiPage, ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/wiki/edit_page" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="nodeId" value="<%= String.valueOf(wikiPage.getNodeId()) %>" />
+			<portlet:param name="title" value="<%= HtmlUtil.unescape(wikiPage.getTitle()) %>" />
+			<portlet:param name="version" value="<%= String.valueOf(wikiPage.getVersion()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon image="delete" message="discard-draft" url="<%= deleteURL %>" />
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_activity_attachment_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_activity_attachment_action.jsp
new file mode 100644
index 0000000..16105dc
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_activity_attachment_action.jsp
@@ -0,0 +1,73 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+SocialActivity socialActivity = (SocialActivity)row.getObject();
+
+JSONObject extraDataJSONObject = JSONFactoryUtil.createJSONObject(HtmlUtil.unescape(socialActivity.getExtraData()));
+
+FileEntry fileEntry = PortletFileRepositoryUtil.getPortletFileEntry(extraDataJSONObject.getLong("fileEntryId"));
+
+WikiPage wikiPage = (WikiPage)request.getAttribute(WebKeys.WIKI_PAGE);
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= fileEntry.isInTrash() && (socialActivity.getType() == SocialActivityConstants.TYPE_MOVE_ATTACHMENT_TO_TRASH) && WikiNodePermission.contains(permissionChecker, wikiPage.getNodeId(), ActionKeys.ADD_ATTACHMENT) %>">
+
+		<%
+		TrashEntry trashEntry = TrashEntryLocalServiceUtil.getEntry(DLFileEntry.class.getName(), fileEntry.getFileEntryId());
+		%>
+
+		<portlet:actionURL var="restoreEntryURL">
+			<portlet:param name="struts_action" value="/wiki/restore_page_attachment" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.RESTORE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="trashEntryId" value="<%= String.valueOf(trashEntry.getEntryId()) %>" />
+		</portlet:actionURL>
+
+		<%
+		String taglibOnClick = "Liferay.fire('" + renderResponse.getNamespace() + "checkEntry', {trashEntryId: " + trashEntry.getEntryId() + ", uri: '" + restoreEntryURL.toString() + "'});";
+		%>
+
+		<liferay-ui:icon
+			image="undo"
+			message="restore-attachment"
+			onClick="<%= taglibOnClick %>"
+			url="javascript:;"
+		/>
+	</c:if>
+
+	<c:if test="<%= !fileEntry.isInTrash() && (socialActivity.getType() == SocialActivityConstants.TYPE_ADD_ATTACHMENT || socialActivity.getType() == SocialActivityConstants.TYPE_RESTORE_ATTACHMENT_FROM_TRASH) && WikiPagePermission.contains(permissionChecker, wikiPage.getNodeId(), wikiPage.getTitle(), ActionKeys.DELETE) %>">
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/wiki/edit_page_attachment" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= TrashUtil.isTrashEnabled(scopeGroupId) ? Constants.MOVE_TO_TRASH : Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="nodeId" value="<%= String.valueOf(wikiPage.getNodeId()) %>" />
+			<portlet:param name="title" value="<%= wikiPage.getTitle() %>" />
+			<portlet:param name="fileName" value="<%= fileEntry.getTitle() %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon-delete
+			message='<%= TrashUtil.isTrashEnabled(scopeGroupId) ? "remove-attachment" : "delete-attachment" %>'
+			trash="<%= TrashUtil.isTrashEnabled(scopeGroupId) %>"
+			url="<%= deleteURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_activity_page_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_activity_page_action.jsp
new file mode 100644
index 0000000..9b11e36
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_activity_page_action.jsp
@@ -0,0 +1,73 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+SocialActivity socialActivity = (SocialActivity)row.getObject();
+
+JSONObject extraDataJSONObject = JSONFactoryUtil.createJSONObject(HtmlUtil.unescape(socialActivity.getExtraData()));
+
+double version = extraDataJSONObject.getDouble("version");
+
+WikiPage wikiPage = (WikiPage)request.getAttribute(WebKeys.WIKI_PAGE);
+
+WikiPage socialActivityPage = WikiPageLocalServiceUtil.getPage(wikiPage.getNodeId(), wikiPage.getTitle(), version);
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= (version != wikiPage.getVersion()) && (socialActivityPage.isApproved()) && (WikiPagePermission.contains(permissionChecker, wikiPage, ActionKeys.UPDATE)) %>">
+		<portlet:actionURL var="revertURL">
+			<portlet:param name="struts_action" value="/wiki/edit_page" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.REVERT %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="nodeId" value="<%= String.valueOf(wikiPage.getNodeId()) %>" />
+			<portlet:param name="title" value="<%= HtmlUtil.unescape(wikiPage.getTitle()) %>" />
+			<portlet:param name="version" value="<%= String.valueOf(version) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon
+			image="undo"
+			message='<%= LanguageUtil.get(pageContext, "restore-version") + " " + String.valueOf(version) %>'
+			url="<%= revertURL %>"
+		/>
+	</c:if>
+
+	<portlet:renderURL var="compareVersionsURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
+		<portlet:param name="struts_action" value="/wiki/select_version" />
+		<portlet:param name="redirect" value="<%= currentURL %>" />
+		<portlet:param name="nodeId" value="<%= String.valueOf(wikiPage.getNodeId()) %>" />
+		<portlet:param name="title" value="<%= HtmlUtil.unescape(wikiPage.getTitle()) %>" />
+		<portlet:param name="sourceVersion" value="<%= String.valueOf(version) %>" />
+	</portlet:renderURL>
+
+	<%
+	Map<String, Object> data = new HashMap<String, Object>();
+
+	data.put("uri", compareVersionsURL);
+	%>
+
+	<liferay-ui:icon
+		cssClass="compare-to-link"
+		data="<%= data %>"
+		image="copy"
+		label="<%= true %>"
+		message="compare-to"
+		url="javascript:;"
+	/>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_attachment_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_attachment_action.jsp
new file mode 100644
index 0000000..e838a4d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_attachment_action.jsp
@@ -0,0 +1,91 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+boolean viewTrashAttachments = ParamUtil.getBoolean(request, "viewTrashAttachments");
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+FileEntry attachmentsFileEntry = (FileEntry)row.getObject();
+
+WikiPage wikiPage = WikiPageAttachmentsUtil.getPage(attachmentsFileEntry.getFileEntryId());
+%>
+
+<liferay-ui:icon-menu>
+	<c:choose>
+		<c:when test="<%= viewTrashAttachments %>">
+			<c:if test="<%= WikiNodePermission.contains(permissionChecker, wikiPage.getNodeId(), ActionKeys.ADD_ATTACHMENT) %>">
+
+				<%
+				TrashEntry trashEntry = TrashEntryLocalServiceUtil.getEntry(DLFileEntry.class.getName(), attachmentsFileEntry.getFileEntryId());
+				%>
+
+				<portlet:actionURL var="restoreEntryURL">
+					<portlet:param name="struts_action" value="/wiki/restore_page_attachment" />
+					<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.RESTORE %>" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="trashEntryId" value="<%= String.valueOf(trashEntry.getEntryId()) %>" />
+				</portlet:actionURL>
+
+				<%
+				String taglibOnClick = "Liferay.fire('" + renderResponse.getNamespace() + "checkEntry', {trashEntryId: " + trashEntry.getEntryId() + ", uri: '" + restoreEntryURL.toString() + "'});";
+				%>
+
+				<liferay-ui:icon
+					image="undo"
+					message="restore"
+					onClick="<%= taglibOnClick %>"
+					url="javascript:;"
+				/>
+			</c:if>
+
+			<c:if test="<%= WikiPagePermission.contains(permissionChecker, wikiPage.getNodeId(), wikiPage.getTitle(), ActionKeys.DELETE) %>">
+				<portlet:actionURL var="deleteURL">
+					<portlet:param name="struts_action" value="/wiki/edit_page_attachment" />
+					<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="nodeId" value="<%= String.valueOf(wikiPage.getNodeId()) %>" />
+					<portlet:param name="title" value="<%= wikiPage.getTitle() %>" />
+					<portlet:param name="fileName" value="<%= attachmentsFileEntry.getTitle() %>" />
+				</portlet:actionURL>
+
+				<liferay-ui:icon-delete
+					url="<%= deleteURL %>"
+				/>
+			</c:if>
+		</c:when>
+		<c:otherwise>
+			<c:if test="<%= WikiPagePermission.contains(permissionChecker, wikiPage.getNodeId(), wikiPage.getTitle(), ActionKeys.DELETE) %>">
+				<portlet:actionURL var="deleteURL">
+					<portlet:param name="struts_action" value="/wiki/edit_page_attachment" />
+					<portlet:param name="<%= Constants.CMD %>" value="<%= TrashUtil.isTrashEnabled(scopeGroupId) ? Constants.MOVE_TO_TRASH : Constants.DELETE %>" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="nodeId" value="<%= String.valueOf(wikiPage.getNodeId()) %>" />
+					<portlet:param name="title" value="<%= wikiPage.getTitle() %>" />
+					<portlet:param name="fileName" value="<%= attachmentsFileEntry.getTitle() %>" />
+				</portlet:actionURL>
+
+				<liferay-ui:icon-delete
+					message='<%= TrashUtil.isTrashEnabled(scopeGroupId) ? "remove" : "delete" %>'
+					trash="<%= TrashUtil.isTrashEnabled(scopeGroupId) %>"
+					url="<%= deleteURL %>"
+				/>
+			</c:if>
+		</c:otherwise>
+	</c:choose>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_history_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_history_action.jsp
new file mode 100644
index 0000000..dadaef1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_history_action.jsp
@@ -0,0 +1,42 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+WikiPage wikiPage = (WikiPage)row.getObject();
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= (wikiPage.getStatus() == WorkflowConstants.STATUS_APPROVED) && WikiPagePermission.contains(permissionChecker, wikiPage, ActionKeys.UPDATE) %>">
+		<portlet:actionURL var="revertURL">
+			<portlet:param name="struts_action" value="/wiki/edit_page" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.REVERT %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="nodeId" value="<%= String.valueOf(wikiPage.getNodeId()) %>" />
+			<portlet:param name="title" value="<%= HtmlUtil.unescape(wikiPage.getTitle()) %>" />
+			<portlet:param name="version" value="<%= String.valueOf(wikiPage.getVersion()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon
+			image="undo"
+			message="revert"
+			url="<%= revertURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_iterator.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_iterator.jsp
new file mode 100644
index 0000000..813a2d9
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_iterator.jsp
@@ -0,0 +1,507 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+WikiNode node = (WikiNode)request.getAttribute(WebKeys.WIKI_NODE);
+WikiPage wikiPage = (WikiPage)request.getAttribute(WebKeys.WIKI_PAGE);
+
+String type = ParamUtil.getString(request, "type");
+long categoryId = ParamUtil.getLong(request, "categoryId");
+String tagName = ParamUtil.getString(request, "tag");
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("nodeName", node.getName());
+
+if (wikiPage != null) {
+	portletURL.setParameter("title", wikiPage.getTitle());
+}
+
+if (type.equals("all_pages")) {
+	portletURL.setParameter("struts_action", "/wiki/view_all_pages");
+
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "all-pages"), portletURL.toString());
+}
+else if (type.equals("categorized_pages")) {
+	portletURL.setParameter("struts_action", "/wiki/view_categorized_pages");
+	portletURL.setParameter("categoryId", String.valueOf(categoryId));
+}
+else if (type.equals("draft_pages") && type.equals("pending_pages")) {
+	portletURL.setParameter("struts_action", "/wiki/view_draft_pages");
+
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "draft-pages"), portletURL.toString());
+}
+else if (type.equals("history")) {
+	PortletURL viewPageHistoryURL = PortletURLUtil.clone(portletURL, renderResponse);
+
+	if (wikiPage != null) {
+		portletURL.setParameter("struts_action", "/wiki/view");
+
+		PortalUtil.addPortletBreadcrumbEntry(request, wikiPage.getTitle(), portletURL.toString());
+	}
+
+	viewPageHistoryURL.setParameter("struts_action", "/wiki/view_page_activities");
+
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "history"), viewPageHistoryURL.toString());
+}
+else if (type.equals("incoming_links")) {
+	if (wikiPage != null) {
+		portletURL.setParameter("struts_action", "/wiki/view");
+
+		PortalUtil.addPortletBreadcrumbEntry(request, wikiPage.getTitle(), portletURL.toString());
+	}
+
+	portletURL.setParameter("struts_action", "/wiki/view_page_incoming_links");
+
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "incoming-links"), portletURL.toString());
+}
+else if (type.equals("orphan_pages")) {
+	portletURL.setParameter("struts_action", "/wiki/view_orphan_pages");
+
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "orphan-pages"), portletURL.toString());
+}
+else if (type.equals("outgoing_links")) {
+	if (wikiPage != null) {
+		portletURL.setParameter("struts_action", "/wiki/view");
+
+		PortalUtil.addPortletBreadcrumbEntry(request, wikiPage.getTitle(), portletURL.toString());
+	}
+
+	portletURL.setParameter("struts_action", "/wiki/view_page_outgoing_links");
+
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "outgoing-links"), portletURL.toString());
+}
+else if (type.equals("recent_changes")) {
+	portletURL.setParameter("struts_action", "/wiki/view_recent_changes");
+
+	PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "recent-changes"), portletURL.toString());
+}
+else if (type.equals("tagged_pages")) {
+	portletURL.setParameter("struts_action", "/wiki/view_tagged_pages");
+	portletURL.setParameter("tag", tagName);
+}
+
+List<String> headerNames = new ArrayList<String>();
+
+headerNames.add("page");
+headerNames.add("status");
+headerNames.add("revision");
+headerNames.add("user");
+headerNames.add("date");
+
+if (type.equals("history") || type.equals("recent_changes")) {
+	headerNames.add("summary");
+}
+
+if (type.equals("all_pages") || type.equals("categorized_pages") || type.equals("draft_pages") || type.equals("history") || type.equals("orphan_pages") || type.equals("recent_changes") || type.equals("tagged_pages")) {
+	headerNames.add(StringPool.BLANK);
+}
+
+String emptyResultsMessage = null;
+
+if (type.equals("all_pages")) {
+	emptyResultsMessage = "there-are-no-pages";
+}
+else if (type.equals("categorized_pages")) {
+	emptyResultsMessage = "there-are-no-pages-with-this-category";
+}
+else if (type.equals("draft_pages")) {
+	emptyResultsMessage = "there-are-no-drafts";
+}
+else if (type.equals("incoming_links")) {
+	emptyResultsMessage = "there-are-no-pages-that-link-to-this-page";
+}
+else if (type.equals("orphan_pages")) {
+	emptyResultsMessage = "there-are-no-orphan-pages";
+}
+else if (type.equals("outgoing_links")) {
+	emptyResultsMessage = "this-page-has-no-links";
+}
+else if (type.equals("pending_pages")) {
+	emptyResultsMessage = "there-are-no-pages-submitted-by-you-pending-approval";
+}
+else if (type.equals("recent_changes")) {
+	emptyResultsMessage = "there-are-no-recent-changes";
+}
+else if (type.equals("tagged_pages")) {
+	emptyResultsMessage = "there-are-no-pages-with-this-tag";
+}
+
+String orderByCol = ParamUtil.getString(request, "orderByCol");
+String orderByType = ParamUtil.getString(request, "orderByType");
+
+OrderByComparator orderByComparator = WikiUtil.getPageOrderByComparator(orderByCol, orderByType);
+
+Map orderableHeaders = new HashMap();
+
+SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, currentURLObj, headerNames, emptyResultsMessage);
+
+searchContainer.setOrderableHeaders(orderableHeaders);
+searchContainer.setOrderByCol(orderByCol);
+searchContainer.setOrderByType(orderByType);
+
+if (type.equals("history")) {
+	RowChecker rowChecker = new RowChecker(renderResponse);
+
+	rowChecker.setAllRowIds(null);
+
+	searchContainer.setRowChecker(rowChecker);
+}
+
+int total = 0;
+List<WikiPage> results = null;
+
+if (type.equals("all_pages")) {
+	orderableHeaders.put("page", "title");
+	orderableHeaders.put("date", "modifiedDate");
+
+	total = WikiPageServiceUtil.getPagesCount(themeDisplay.getScopeGroupId(), node.getNodeId(), true);
+
+	searchContainer.setTotal(total);
+
+	results = WikiPageServiceUtil.getPages(themeDisplay.getScopeGroupId(), node.getNodeId(), true, WorkflowConstants.STATUS_APPROVED, searchContainer.getStart(), searchContainer.getEnd(), orderByComparator);
+}
+else if (type.equals("categorized_pages") || type.equals("tagged_pages")) {
+	orderableHeaders.put("page", "title");
+	orderableHeaders.put("date", "modifiedDate");
+
+	AssetEntryQuery assetEntryQuery = new AssetEntryQuery(WikiPage.class.getName(), searchContainer);
+
+	assetEntryQuery.setEnablePermissions(true);
+
+	total = AssetEntryServiceUtil.getEntriesCount(assetEntryQuery);
+
+	searchContainer.setTotal(total);
+
+	assetEntryQuery.setEnd(searchContainer.getEnd());
+	assetEntryQuery.setStart(searchContainer.getStart());
+
+	List<AssetEntry> assetEntries = AssetEntryServiceUtil.getEntries(assetEntryQuery);
+
+	results = new ArrayList<WikiPage>();
+
+	for (AssetEntry assetEntry : assetEntries) {
+		WikiPageResource pageResource = WikiPageResourceLocalServiceUtil.getPageResource(assetEntry.getClassPK());
+
+		WikiPage assetPage = WikiPageLocalServiceUtil.getPage(pageResource.getNodeId(), pageResource.getTitle());
+
+		results.add(assetPage);
+	}
+}
+else if (type.equals("draft_pages") || type.equals("pending_pages")) {
+	long draftUserId = user.getUserId();
+
+	if (permissionChecker.isCompanyAdmin() || permissionChecker.isGroupAdmin(scopeGroupId)) {
+		draftUserId = 0;
+	}
+
+	int status = WorkflowConstants.STATUS_DRAFT;
+
+	if (type.equals("pending_pages")) {
+		status = WorkflowConstants.STATUS_PENDING;
+	}
+
+	total = WikiPageServiceUtil.getPagesCount(themeDisplay.getScopeGroupId(), draftUserId, node.getNodeId(), status);
+
+	searchContainer.setTotal(total);
+
+	results = WikiPageServiceUtil.getPages(themeDisplay.getScopeGroupId(), draftUserId, node.getNodeId(), status, searchContainer.getStart(), searchContainer.getEnd());
+}
+else if (type.equals("orphan_pages")) {
+	List<WikiPage> orphans = WikiPageServiceUtil.getOrphans(themeDisplay.getScopeGroupId(), node.getNodeId());
+
+	total = orphans.size();
+
+	searchContainer.setTotal(total);
+
+	results = ListUtil.subList(orphans, searchContainer.getStart(), searchContainer.getEnd());
+}
+else if (type.equals("history")) {
+	total = WikiPageLocalServiceUtil.getPagesCount(wikiPage.getNodeId(), wikiPage.getTitle());
+
+	searchContainer.setTotal(total);
+
+	results = WikiPageLocalServiceUtil.getPages(wikiPage.getNodeId(), wikiPage.getTitle(), QueryUtil.ALL_POS, QueryUtil.ALL_POS, new PageVersionComparator());
+}
+else if (type.equals("incoming_links")) {
+	List<WikiPage> links = WikiPageLocalServiceUtil.getIncomingLinks(wikiPage.getNodeId(), wikiPage.getTitle());
+
+	total = links.size();
+
+	searchContainer.setTotal(total);
+
+	results = ListUtil.subList(links, searchContainer.getStart(), searchContainer.getEnd());
+}
+else if (type.equals("outgoing_links")) {
+	List<WikiPage> links = WikiPageLocalServiceUtil.getOutgoingLinks(wikiPage.getNodeId(), wikiPage.getTitle());
+
+	total = links.size();
+
+	searchContainer.setTotal(total);
+
+	results = ListUtil.subList(links, searchContainer.getStart(), searchContainer.getEnd());
+}
+else if (type.equals("recent_changes")) {
+	total = WikiPageServiceUtil.getRecentChangesCount(themeDisplay.getScopeGroupId(), node.getNodeId());
+
+	searchContainer.setTotal(total);
+
+	results = WikiPageServiceUtil.getRecentChanges(themeDisplay.getScopeGroupId(), node.getNodeId(), searchContainer.getStart(), searchContainer.getEnd());
+}
+
+searchContainer.setResults(results);
+
+List resultRows = searchContainer.getResultRows();
+
+for (int i = 0; i < results.size(); i++) {
+	WikiPage curWikiPage = results.get(i);
+
+	curWikiPage = curWikiPage.toEscapedModel();
+
+	ResultRow row = new ResultRow(curWikiPage, String.valueOf(curWikiPage.getVersion()), i);
+
+	PortletURL rowURL = renderResponse.createRenderURL();
+
+	if (!curWikiPage.isNew() && !type.equals("draft_pages") && !type.equals("pending_pages")) {
+		if (portletName.equals(PortletKeys.WIKI_DISPLAY)) {
+			rowURL.setParameter("struts_action", "/wiki/view_page");
+		}
+		else {
+			rowURL.setParameter("struts_action", "/wiki/view");
+		}
+
+		rowURL.setParameter("redirect", currentURL);
+		rowURL.setParameter("nodeName", curWikiPage.getNode().getName());
+	}
+	else {
+		rowURL.setParameter("struts_action", "/wiki/edit_page");
+		rowURL.setParameter("redirect", currentURL);
+		rowURL.setParameter("nodeId", String.valueOf(curWikiPage.getNodeId()));
+	}
+
+	rowURL.setParameter("title", HtmlUtil.unescape(curWikiPage.getTitle()));
+
+	if (type.equals("history")) {
+		rowURL.setParameter("version", String.valueOf(curWikiPage.getVersion()));
+	}
+
+	// Title
+
+	row.addText(curWikiPage.getTitle(), rowURL);
+
+	// Status
+
+	row.addStatus(curWikiPage.getStatus(), curWikiPage.getStatusByUserId(), curWikiPage.getStatusDate(), rowURL);
+
+	// Revision
+
+	if (!curWikiPage.isNew()) {
+		String revision = String.valueOf(curWikiPage.getVersion());
+
+		if (curWikiPage.isMinorEdit()) {
+			revision += " (" + LanguageUtil.get(pageContext, "minor-edit") + ")";
+		}
+
+		row.addText(revision, rowURL);
+	}
+	else {
+		row.addText(StringPool.BLANK);
+	}
+
+	// User
+
+	if (!curWikiPage.isNew()) {
+		row.addText(PortalUtil.getUserName(curWikiPage), rowURL);
+	}
+	else {
+		row.addText(StringPool.BLANK);
+	}
+
+	// Date
+
+	if (!curWikiPage.isNew()) {
+		row.addDate(curWikiPage.getCreateDate(), rowURL);
+	}
+	else {
+		row.addText(StringPool.BLANK);
+	}
+
+	// Summary
+
+	if (type.equals("history") || type.equals("recent_changes")) {
+		if (Validator.isNotNull(curWikiPage.getSummary())) {
+			row.addText(curWikiPage.getSummary());
+		}
+		else {
+			row.addText(StringPool.BLANK);
+		}
+	}
+
+	// Action
+
+	if (type.equals("history")) {
+		if (curWikiPage.isHead()) {
+			row.addText(StringPool.BLANK);
+		}
+		else {
+			row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/wiki/page_history_action.jsp");
+		}
+	}
+
+	if (type.equals("all_pages") || type.equals("categorized_pages") || type.equals("draft_pages") || type.equals("orphan_pages") || type.equals("recent_changes") || type.equals("tagged_pages")) {
+		row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/wiki/page_action.jsp");
+	}
+
+	// Add result row
+
+	resultRows.add(row);
+}
+%>
+
+<c:if test='<%= type.equals("history") && (results.size() > 1) %>'>
+
+	<%
+	WikiPage latestWikiPage = (WikiPage)results.get(1);
+
+	PortletURL compareVersionsURL = renderResponse.createRenderURL();
+
+	compareVersionsURL.setParameter("struts_action", "/wiki/compare_versions");
+	%>
+
+	<aui:form action="<%= compareVersionsURL %>" method="post" name="fm" onSubmit='<%= "event.preventDefault(); " + renderResponse.getNamespace() + "compare();" %>'>
+		<aui:input name="tabs3" type="hidden" value="versions" />
+		<aui:input name="backURL" type="hidden" value="<%= currentURL %>" />
+		<aui:input name="nodeId" type="hidden" value="<%= node.getNodeId() %>" />
+		<aui:input name="title" type="hidden" value="<%= wikiPage.getTitle() %>" />
+		<aui:input name="sourceVersion" type="hidden" value="<%= latestWikiPage.getVersion() %>" />
+		<aui:input name="targetVersion" type="hidden" value="<%= wikiPage.getVersion() %>" />
+		<aui:input name="type" type="hidden" value="html" />
+
+		<aui:button-row>
+			<aui:button name="submitButton" type="submit" value="compare-versions" />
+		</aui:button-row>
+	</aui:form>
+</c:if>
+
+<c:if test='<%= type.equals("all_pages") && WikiNodePermission.contains(permissionChecker, node.getNodeId(), ActionKeys.ADD_PAGE) %>'>
+	<aui:button-row>
+		<liferay-portlet:actionURL allowEmptyParam="<%= true %>" var="addPageURL">
+			<liferay-portlet:param name="struts_action" value="/wiki/edit_page" />
+			<liferay-portlet:param name="redirect" value="<%= currentURL %>" />
+			<liferay-portlet:param name="nodeId" value="<%= String.valueOf(node.getNodeId()) %>" />
+			<liferay-portlet:param name="title" value="<%= StringPool.BLANK %>" />
+			<liferay-portlet:param name="editTitle" value="1" />
+		</liferay-portlet:actionURL>
+
+		<aui:button href="<%= addPageURL %>" name="addPageButton" value="add-page" />
+	</aui:button-row>
+</c:if>
+
+<liferay-ui:categorization-filter
+	assetType="pages"
+	portletURL="<%= portletURL %>"
+/>
+
+<liferay-ui:search-iterator paginate='<%= type.equals("history") ? false : true %>' searchContainer="<%= searchContainer %>" />
+
+<c:if test='<%= type.equals("history") %>'>
+	<aui:script>
+		Liferay.provide(
+			window,
+			'<portlet:namespace />compare',
+			function() {
+				var A = AUI();
+
+				var rowIds = A.all('input[name=<portlet:namespace />rowIds]:checked');
+				var sourceVersion = A.one('input[name="<portlet:namespace />sourceVersion"]');
+				var targetVersion = A.one('input[name="<portlet:namespace />targetVersion"]');
+
+				var rowIdsSize = rowIds.size();
+
+				if (rowIdsSize == 1) {
+					if (sourceVersion) {
+						sourceVersion.val(rowIds.item(0).val());
+					}
+				}
+				else if (rowIdsSize == 2) {
+					if (sourceVersion) {
+						sourceVersion.val(rowIds.item(1).val());
+					}
+
+					if (targetVersion) {
+						targetVersion.val(rowIds.item(0).val());
+					}
+				}
+
+				submitForm(document.<portlet:namespace />fm);
+			},
+			['aui-base', 'selector-css3']
+		);
+
+		Liferay.provide(
+			window,
+			'<portlet:namespace />initRowsChecked',
+			function() {
+				var A = AUI();
+
+				var rowIds = A.all('input[name=<portlet:namespace />rowIds]');
+
+				rowIds.each(
+					function(item, index, collection) {
+						if (index >= 2) {
+							item.set('checked', false);
+						}
+					}
+				);
+			},
+			['aui-base']
+		);
+
+		Liferay.provide(
+			window,
+			'<portlet:namespace />updateRowsChecked',
+			function(element) {
+				var A = AUI();
+
+				var rowsChecked = A.all('input[name=<portlet:namespace />rowIds]:checked');
+
+				if (rowsChecked.size() > 2) {
+					var index = 2;
+
+					if (rowsChecked.item(2).compareTo(element)) {
+						index = 1;
+					}
+
+					rowsChecked.item(index).set('checked', false);
+				}
+			},
+			['aui-base', 'selector-css3']
+		);
+	</aui:script>
+
+	<aui:script use="aui-base">
+		<portlet:namespace />initRowsChecked();
+
+		A.all('input[name=<portlet:namespace />rowIds]').on(
+			'click',
+			function(event) {
+				<portlet:namespace />updateRowsChecked(event.currentTarget);
+			}
+		);
+	</aui:script>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_name.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_name.jspf
new file mode 100644
index 0000000..331953e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_name.jspf
@@ -0,0 +1,23 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<c:if test="<%= Validator.isNotNull(title) %>">
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		localizeTitle="<%= false %>"
+		title="<%= title %>"
+	/>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_tabs.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_tabs.jsp
new file mode 100644
index 0000000..634d6ca
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_tabs.jsp
@@ -0,0 +1,92 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+WikiNode node = (WikiNode)request.getAttribute(WebKeys.WIKI_NODE);
+WikiPage wikiPage = (WikiPage)request.getAttribute(WebKeys.WIKI_PAGE);
+
+String title = wikiPage.getTitle();
+
+PortletURL viewPageURL = renderResponse.createRenderURL();
+
+viewPageURL.setParameter("struts_action", "/wiki/view");
+viewPageURL.setParameter("nodeName", node.getName());
+viewPageURL.setParameter("title", wikiPage.getTitle());
+
+PortletURL editPageURL = renderResponse.createRenderURL();
+
+editPageURL.setParameter("struts_action", "/wiki/edit_page");
+editPageURL.setParameter("redirect", viewPageURL.toString());
+editPageURL.setParameter("nodeId", String.valueOf(node.getNodeId()));
+editPageURL.setParameter("title", title);
+
+PortletURL viewPageDetailsURL = renderResponse.createRenderURL();
+
+viewPageDetailsURL.setParameter("struts_action", "/wiki/view_page_details");
+viewPageDetailsURL.setParameter("redirect", viewPageURL.toString());
+viewPageDetailsURL.setParameter("nodeId", String.valueOf(node.getNodeId()));
+viewPageDetailsURL.setParameter("title", wikiPage.getTitle());
+
+PortletURL viewPageHistoryURL = PortletURLUtil.clone(viewPageDetailsURL, renderResponse);
+
+viewPageHistoryURL.setParameter("struts_action", "/wiki/view_page_activities");
+
+PortletURL viewPageIncomingLinksURL = PortletURLUtil.clone(viewPageDetailsURL, renderResponse);
+
+viewPageIncomingLinksURL.setParameter("struts_action", "/wiki/view_page_incoming_links");
+
+PortletURL viewPageOutgoingLinksURL = PortletURLUtil.clone(viewPageDetailsURL, renderResponse);
+
+viewPageOutgoingLinksURL.setParameter("struts_action", "/wiki/view_page_outgoing_links");
+
+PortletURL viewPageAttachmentsURL = PortletURLUtil.clone(viewPageDetailsURL, renderResponse);
+
+viewPageAttachmentsURL.setParameter("struts_action", "/wiki/view_page_attachments");
+
+PortletURL viewPageActivitiesURL = PortletURLUtil.clone(viewPageDetailsURL, renderResponse);
+
+viewPageActivitiesURL.setParameter("struts_action", "/wiki/view_page_activities");
+%>
+
+<%@ include file="/html/portlet/wiki/page_name.jspf" %>
+
+<c:choose>
+	<c:when test="<%= WikiPagePermission.contains(permissionChecker, wikiPage, ActionKeys.UPDATE) %>">
+		<liferay-ui:tabs
+			names="content,details,history,incoming-links,outgoing-links,attachments"
+			url0="<%= editPageURL.toString() %>"
+			url1="<%= viewPageDetailsURL.toString() %>"
+			url2="<%= viewPageHistoryURL.toString() %>"
+			url3="<%= viewPageIncomingLinksURL.toString() %>"
+			url4="<%= viewPageOutgoingLinksURL.toString() %>"
+			url5="<%= viewPageAttachmentsURL.toString() %>"
+		/>
+	</c:when>
+	<c:otherwise>
+		<liferay-ui:tabs
+			names="details,history,incoming-links,outgoing-links,attachments"
+			url0="<%= viewPageDetailsURL.toString() %>"
+			url1="<%= viewPageHistoryURL.toString() %>"
+			url2="<%= viewPageIncomingLinksURL.toString() %>"
+			url3="<%= viewPageOutgoingLinksURL.toString() %>"
+			url4="<%= viewPageAttachmentsURL.toString() %>"
+		/>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_tabs_history.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_tabs_history.jsp
new file mode 100644
index 0000000..500d300
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_tabs_history.jsp
@@ -0,0 +1,46 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+WikiNode node = (WikiNode)request.getAttribute(WebKeys.WIKI_NODE);
+WikiPage wikiPage = (WikiPage)request.getAttribute(WebKeys.WIKI_PAGE);
+
+PortletURL viewPageURL = renderResponse.createRenderURL();
+
+viewPageURL.setParameter("struts_action", "/wiki/view");
+viewPageURL.setParameter("nodeName", node.getName());
+viewPageURL.setParameter("title", wikiPage.getTitle());
+
+PortletURL viewPageHistoryURL = renderResponse.createRenderURL();
+
+viewPageHistoryURL.setParameter("struts_action", "/wiki/view_page_history");
+viewPageHistoryURL.setParameter("redirect", viewPageURL.toString());
+viewPageHistoryURL.setParameter("nodeId", String.valueOf(node.getNodeId()));
+viewPageHistoryURL.setParameter("title", wikiPage.getTitle());
+
+PortletURL viewPageActivitiesURL = PortletURLUtil.clone(viewPageHistoryURL, renderResponse);
+
+viewPageActivitiesURL.setParameter("struts_action", "/wiki/view_page_activities");
+%>
+
+<liferay-ui:tabs
+	names="activities,versions"
+	param="tabs3"
+	url0="<%= viewPageActivitiesURL.toString() %>"
+	url1="<%= viewPageHistoryURL.toString() %>"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_tree.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_tree.jsp
new file mode 100644
index 0000000..03e63cb
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/page_tree.jsp
@@ -0,0 +1,52 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+WikiPage parentPage = (WikiPage)request.getAttribute(WebKeys.WIKI_TREE_WALKER_PARENT);
+WikiPage wikiPage = (WikiPage)request.getAttribute(WebKeys.WIKI_TREE_WALKER_PAGE);
+int depth = (Integer)request.getAttribute(WebKeys.WIKI_TREE_WALKER_DEPTH);
+
+String preface = StringPool.BLANK;
+
+for (int i = 0; i < depth; i++) {
+	preface += "- ";
+}
+
+List<WikiPage> childPages = ListUtil.copy(parentPage.getViewableChildPages());
+
+childPages.remove(wikiPage);
+
+childPages = ListUtil.sort(childPages);
+%>
+
+<aui:option label="<%= preface + parentPage.getTitle() %>" selected="<%= parentPage.getTitle().equals(wikiPage.getParentTitle()) %>" value="<%= parentPage.getTitle() %>" />
+
+<%
+for (WikiPage childPage : childPages) {
+	if (Validator.isNull(childPage.getRedirectTitle())) {
+		request.setAttribute(WebKeys.WIKI_TREE_WALKER_PARENT, childPage);
+		request.setAttribute(WebKeys.WIKI_TREE_WALKER_PAGE, wikiPage);
+		request.setAttribute(WebKeys.WIKI_TREE_WALKER_DEPTH, depth + 1);
+%>
+
+		<liferay-util:include page="/html/portlet/wiki/page_tree.jsp" />
+
+<%
+	}
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/search.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/search.jsp
new file mode 100644
index 0000000..d4da783
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/search.jsp
@@ -0,0 +1,154 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+WikiNode node = (WikiNode)request.getAttribute(WebKeys.WIKI_NODE);
+
+long nodeId = BeanParamUtil.getLong(node, request, "nodeId");
+
+long[] nodeIds = null;
+
+if (node != null) {
+	nodeIds = new long[] {nodeId};
+}
+
+String keywords = ParamUtil.getString(request, "keywords");
+
+boolean createNewPage = true;
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/wiki/search");
+portletURL.setParameter("redirect", redirect);
+portletURL.setParameter("nodeId", String.valueOf(nodeId));
+portletURL.setParameter("keywords", keywords);
+%>
+
+<liferay-portlet:renderURL varImpl="searchURL">
+	<portlet:param name="struts_action" value="/wiki/search" />
+</liferay-portlet:renderURL>
+
+<aui:form action="<%= searchURL %>" method="get" name="fm">
+	<liferay-portlet:renderURLParams varImpl="searchURL" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="nodeId" type="hidden" value="<%= nodeId %>" />
+
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title="search"
+	/>
+
+	<div class="form-search">
+		<liferay-ui:input-search autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>" placeholder='<%= LanguageUtil.get(locale, "keywords") %>' title='<%= LanguageUtil.get(locale, "search-pages") %>' />
+	</div>
+
+	<liferay-ui:search-container
+		emptyResultsMessage='<%= LanguageUtil.format(pageContext, "no-pages-were-found-that-matched-the-keywords-x", "<strong>" + HtmlUtil.escape(keywords) + "</strong>") %>'
+		iteratorURL="<%= portletURL %>"
+	>
+
+		<%
+		Indexer indexer = IndexerRegistryUtil.getIndexer(WikiPage.class);
+
+		SearchContext searchContext = SearchContextFactory.getInstance(request);
+
+		searchContext.setAttribute("paginationType", "more");
+		searchContext.setEnd(searchContainer.getEnd());
+		searchContext.setIncludeAttachments(true);
+		searchContext.setIncludeDiscussions(true);
+		searchContext.setKeywords(keywords);
+		searchContext.setNodeIds(nodeIds);
+
+		QueryConfig queryConfig = new QueryConfig();
+
+		queryConfig.setHighlightEnabled(true);
+
+		searchContext.setQueryConfig(queryConfig);
+
+		searchContext.setStart(searchContainer.getStart());
+
+		Hits hits = indexer.search(searchContext);
+
+		searchContainer.setTotal(hits.getLength());
+
+		PortletURL hitURL = renderResponse.createRenderURL();
+
+		hitURL.setParameter("struts_action", "/wiki/view");
+		hitURL.setParameter("redirect", currentURL);
+		%>
+
+		<liferay-ui:search-container-results
+			results="<%= SearchResultUtil.getSearchResults(hits, locale, hitURL) %>"
+		/>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.kernel.search.SearchResult"
+			modelVar="searchResult"
+		>
+
+			<%
+			WikiPage wikiPage = WikiPageLocalServiceUtil.getPage(searchResult.getClassPK());
+
+			String title = wikiPage.getTitle();
+
+			if (StringUtil.equalsIgnoreCase(title, keywords)) {
+				createNewPage = false;
+			}
+
+			WikiNode curNode = wikiPage.getNode();
+
+			Summary summary = searchResult.getSummary();
+			%>
+
+			<portlet:renderURL var="rowURL">
+				<portlet:param name="struts_action" value="/wiki/view" />
+				<portlet:param name="nodeName" value="<%= curNode.getName() %>" />
+				<portlet:param name="title" value="<%= title %>" />
+			</portlet:renderURL>
+
+			<liferay-ui:app-view-search-entry
+				containerIcon="all_pages"
+				containerName="<%= curNode.getName() %>"
+				containerType='<%= LanguageUtil.get(locale, "wiki-node") %>'
+				cssClass='<%= MathUtil.isEven(index) ? "search" : "search alt" %>'
+				description="<%= (summary != null) ? HtmlUtil.escape(summary.getContent()) : wikiPage.getSummary() %>"
+				fileEntryTuples="<%= searchResult.getFileEntryTuples() %>"
+				mbMessages="<%= searchResult.getMBMessages() %>"
+				queryTerms="<%= hits.getQueryTerms() %>"
+				title="<%= (summary != null) ? HtmlUtil.escape(summary.getTitle()) : wikiPage.getTitle() %>"
+				url="<%= rowURL %>"
+			/>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-paginator searchContainer="<%= searchContainer %>" type="more" />
+	</liferay-ui:search-container>
+
+	<c:if test="<%= createNewPage %>">
+		<portlet:actionURL var="addPageURL">
+			<portlet:param name="struts_action" value="/wiki/edit_page" />
+			<portlet:param name="redirect" value="<%= redirect %>" />
+			<portlet:param name="nodeId" value="<%= String.valueOf(nodeId) %>" />
+			<portlet:param name="title" value="<%= keywords %>" />
+			<portlet:param name="editTitle" value="1" />
+		</portlet:actionURL>
+
+		<strong><aui:a cssClass="new-page" href="<%= addPageURL.toString() %>" label="create-a-new-page-on-this-topic" /></strong>
+	</c:if>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/select_version.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/select_version.jsp
new file mode 100644
index 0000000..284a818
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/select_version.jsp
@@ -0,0 +1,103 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+WikiPage wikiPage = (WikiPage)request.getAttribute(WebKeys.WIKI_PAGE);
+
+double sourceVersion = ParamUtil.getDouble(request, "sourceVersion");
+String eventName = ParamUtil.getString(request, "eventName", liferayPortletResponse.getNamespace() + "selectVersion");
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/wiki/select_version");
+portletURL.setParameter("redirect", currentURL);
+portletURL.setParameter("nodeId", String.valueOf(wikiPage.getNodeId()));
+portletURL.setParameter("title", HtmlUtil.unescape(wikiPage.getTitle()));
+portletURL.setParameter("sourceVersion", String.valueOf(sourceVersion));
+%>
+
+<aui:form action="<%= portletURL.toString() %>" method="post" name="selectVersionFm">
+	<liferay-ui:search-container
+		id="wikiPageVersionSearchContainer"
+		iteratorURL="<%= portletURL %>"
+		total="<%= WikiPageLocalServiceUtil.getPagesCount(wikiPage.getNodeId(), wikiPage.getTitle()) %>"
+	>
+		<liferay-ui:search-container-results
+			results="<%= WikiPageLocalServiceUtil.getPages(wikiPage.getNodeId(), wikiPage.getTitle(), searchContainer.getStart(), searchContainer.getEnd(), new PageVersionComparator()) %>"
+		/>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portlet.wiki.model.WikiPage"
+			modelVar="curWikiPage"
+		>
+			<liferay-ui:search-container-column-text
+				name="version"
+				value="<%= String.valueOf(curWikiPage.getVersion()) %>"
+			/>
+
+			<liferay-ui:search-container-column-date
+				name="date"
+				value="<%= curWikiPage.getModifiedDate() %>"
+			/>
+
+			<liferay-ui:search-container-column-text
+				name=""
+			>
+				<c:if test="<%= sourceVersion != curWikiPage.getVersion() %>">
+
+					<%
+					double curSourceVersion = sourceVersion;
+					double curTargetVersion = curWikiPage.getVersion();
+
+					if (curTargetVersion < curSourceVersion) {
+						double tempVersion = curTargetVersion;
+
+						curTargetVersion = curSourceVersion;
+						curSourceVersion = tempVersion;
+					}
+
+					Map<String, Object> data = new HashMap<String, Object>();
+
+					data.put("sourceversion", curSourceVersion);
+					data.put("targetversion", curTargetVersion);
+					%>
+
+					<aui:button cssClass="selector-button" data="<%= data %>" value="choose" />
+				</c:if>
+			</liferay-ui:search-container-column-text>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
+
+<aui:script use="aui-base">
+	var Util = Liferay.Util;
+
+	A.one('#<portlet:namespace />selectVersionFm').delegate(
+		'click',
+		function(event) {
+			var result = Util.getAttributes(event.currentTarget, 'data-');
+
+			Util.getOpener().Liferay.fire('<%= HtmlUtil.escapeJS(eventName) %>', result);
+
+			Util.getWindow().hide();
+		},
+		'.selector-button'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/top_links.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/top_links.jsp
new file mode 100644
index 0000000..47c5ba8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/top_links.jsp
@@ -0,0 +1,176 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+String strutsAction = ParamUtil.getString(request, "struts_action");
+
+String strutsPath = StringPool.BLANK;
+
+if (Validator.isNotNull(strutsAction)) {
+	int pos = strutsAction.indexOf(StringPool.SLASH, 1);
+
+	if (pos != -1) {
+		strutsPath = strutsAction.substring(0, pos);
+	}
+}
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+WikiNode node = (WikiNode)request.getAttribute(WebKeys.WIKI_NODE);
+WikiPage wikiPage = (WikiPage)request.getAttribute(WebKeys.WIKI_PAGE);
+
+String keywords = ParamUtil.getString(request, "keywords");
+
+List<WikiNode> nodes = WikiUtil.getNodes(allNodes, hiddenNodes, permissionChecker);
+
+boolean print = ParamUtil.getString(request, "viewMode").equals(Constants.PRINT);
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("nodeName", node.getName());
+
+long categoryId = ParamUtil.getLong(request, "categoryId");
+
+if (categoryId > 0) {
+	portletURL.setParameter("categoryId", "0");
+}
+%>
+
+<c:if test='<%= !strutsAction.endsWith("view_page_attachments") %>'>
+	<portlet:actionURL var="undoTrashURL">
+		<portlet:param name="struts_action" value="/wiki/edit_page" />
+		<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.RESTORE %>" />
+	</portlet:actionURL>
+
+	<liferay-ui:trash-undo portletURL="<%= undoTrashURL %>" />
+</c:if>
+
+<c:if test="<%= portletName.equals(PortletKeys.WIKI_ADMIN) %>">
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		localizeTitle="<%= false %>"
+		title="<%= node.getName() %>"
+	/>
+</c:if>
+
+<c:if test="<%= !print %>">
+	<c:if test="<%= (nodes.size() > 1) && portletName.equals(PortletKeys.WIKI) %>">
+		<aui:nav cssClass="nav-tabs">
+
+			<%
+			for (int i = 0; i < nodes.size(); i++) {
+				WikiNode curNode = nodes.get(i);
+
+				String cssClass = StringPool.BLANK;
+
+				if (curNode.getNodeId() == node.getNodeId()) {
+					cssClass = "active";
+				}
+			%>
+
+				<portlet:renderURL var="viewPageURL">
+					<portlet:param name="struts_action" value="/wiki/view" />
+					<portlet:param name="nodeName" value="<%= curNode.getName() %>" />
+					<portlet:param name="title" value="<%= WikiPageConstants.FRONT_PAGE %>" />
+				</portlet:renderURL>
+
+				<aui:nav-item cssClass="<%= cssClass %>" href="<%= viewPageURL %>" label="<%= HtmlUtil.escape(curNode.getName()) %>" />
+
+			<%
+			}
+			%>
+
+		</aui:nav>
+	</c:if>
+
+	<aui:nav-bar>
+		<aui:nav>
+
+			<%
+			PortletURL frontPageURL = PortletURLUtil.clone(portletURL, renderResponse);
+
+			String label = WikiPageConstants.FRONT_PAGE;
+			boolean selected = (Validator.isNull(strutsAction) || (wikiPage != null) && wikiPage.getTitle().equals(label));
+
+			frontPageURL.setParameter("struts_action", "/wiki/view");
+			frontPageURL.setParameter("title", WikiPageConstants.FRONT_PAGE);
+			frontPageURL.setParameter("tag", StringPool.BLANK);
+			%>
+
+			<aui:nav-item cssClass='<%= selected ? "active" : StringPool.BLANK %>' href="<%= frontPageURL.toString() %>" label="<%= label %>" selected="<%= selected %>" />
+
+			<%
+			label = "recent-changes";
+			selected = strutsAction.equals(strutsPath + "/view_recent_changes");
+
+			portletURL.setParameter("struts_action", "/wiki/view_recent_changes");
+			%>
+
+			<aui:nav-item cssClass='<%= selected ? "active" : StringPool.BLANK %>' href="<%= portletURL.toString() %>" label="<%= label %>" selected="<%= selected %>" />
+
+			<%
+			label = "all-pages";
+			selected = strutsAction.equals(strutsPath + "/view_all_pages");
+
+			portletURL.setParameter("struts_action", "/wiki/view_all_pages");
+			%>
+
+			<aui:nav-item cssClass='<%= selected ? "active" : StringPool.BLANK %>' href="<%= portletURL.toString() %>" label="<%= label %>" selected="<%= selected %>" />
+
+			<%
+			label = "orphan-pages";
+			selected = strutsAction.equals(strutsPath + "/view_orphan_pages");
+
+			portletURL.setParameter("struts_action", "/wiki/view_orphan_pages");
+			%>
+
+			<aui:nav-item cssClass='<%= selected ? "active" : StringPool.BLANK %>' href="<%= portletURL.toString() %>" label="<%= label %>" selected="<%= selected %>" />
+
+			<%
+			label = "draft-pages";
+			selected = strutsAction.equals(strutsPath + "/view_draft_pages");
+
+			portletURL.setParameter("struts_action", "/wiki/view_draft_pages");
+			%>
+
+			<aui:nav-item cssClass='<%= selected ? "active" : StringPool.BLANK %>' href="<%= portletURL.toString() %>" label="<%= label %>" selected="<%= selected %>" />
+		</aui:nav>
+
+		<liferay-portlet:renderURL varImpl="searchURL">
+			<portlet:param name="struts_action" value="/wiki/search" />
+		</liferay-portlet:renderURL>
+
+		<aui:nav-bar-search cssClass="pull-right">
+			<div class="form-search">
+				<aui:form action="<%= searchURL %>" method="get" name="searchFm">
+					<liferay-portlet:renderURLParams varImpl="searchURL" />
+					<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+					<aui:input name="nodeId" type="hidden" value="<%= node.getNodeId() %>" />
+
+					<liferay-ui:input-search id="keywords1" />
+				</aui:form>
+			</div>
+		</aui:nav-bar-search>
+	</aui:nav-bar>
+
+	<c:if test="<%= windowState.equals(WindowState.MAXIMIZED) %>">
+		<aui:script>
+			Liferay.Util.focusFormField(document.getElementById('<portlet:namespace />keywords1'));
+		</aui:script>
+	</c:if>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view.jsp
new file mode 100644
index 0000000..f590406
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view.jsp
@@ -0,0 +1,431 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+boolean followRedirect = ParamUtil.getBoolean(request, "followRedirect", true);
+
+WikiNode node = (WikiNode)request.getAttribute(WebKeys.WIKI_NODE);
+WikiPage wikiPage = (WikiPage)request.getAttribute(WebKeys.WIKI_PAGE);
+
+WikiPage originalPage = null;
+WikiPage redirectPage = wikiPage.getRedirectPage();
+
+if (followRedirect && (redirectPage != null)) {
+	originalPage = wikiPage;
+	wikiPage = redirectPage;
+}
+
+String title = wikiPage.getTitle();
+
+String parentTitle = StringPool.BLANK;
+
+if (wikiPage != null) {
+	parentTitle = wikiPage.getParentTitle();
+}
+
+List childPages = wikiPage.getViewableChildPages();
+
+int attachmentsFileEntriesCount = 0;
+
+if (wikiPage != null) {
+	attachmentsFileEntriesCount = wikiPage.getAttachmentsFileEntriesCount();
+}
+
+boolean preview = false;
+boolean print = ParamUtil.getString(request, "viewMode").equals(Constants.PRINT);
+
+PortletURL viewPageURL = renderResponse.createRenderURL();
+
+if (portletName.equals(PortletKeys.WIKI_DISPLAY)) {
+	viewPageURL.setParameter("struts_action", "/wiki/view_page");
+}
+else {
+	viewPageURL.setParameter("struts_action", "/wiki/view");
+}
+
+viewPageURL.setParameter("nodeName", node.getName());
+viewPageURL.setParameter("title", title);
+
+PortletURL viewParentPageURL = null;
+
+if (Validator.isNotNull(parentTitle)) {
+	viewParentPageURL = PortletURLUtil.clone(viewPageURL, renderResponse);
+
+	viewParentPageURL.setParameter("title", parentTitle);
+
+	parentTitle = StringUtil.shorten(parentTitle, 20);
+}
+
+PortletURL addPageURL = renderResponse.createRenderURL();
+
+addPageURL.setParameter("struts_action", "/wiki/edit_page");
+addPageURL.setParameter("redirect", currentURL);
+addPageURL.setParameter("nodeId", String.valueOf(node.getNodeId()));
+addPageURL.setParameter("title", StringPool.BLANK);
+addPageURL.setParameter("editTitle", "1");
+
+if (wikiPage != null) {
+	addPageURL.setParameter("parentTitle", wikiPage.getTitle());
+}
+
+PortletURL editPageURL = renderResponse.createRenderURL();
+
+editPageURL.setParameter("struts_action", "/wiki/edit_page");
+editPageURL.setParameter("redirect", currentURL);
+editPageURL.setParameter("nodeId", String.valueOf(node.getNodeId()));
+editPageURL.setParameter("title", title);
+
+PortletURL printPageURL = PortletURLUtil.clone(viewPageURL, renderResponse);
+
+printPageURL.setParameter("viewMode", Constants.PRINT);
+printPageURL.setWindowState(LiferayWindowState.POP_UP);
+
+PortletURL categorizedPagesURL = renderResponse.createRenderURL();
+
+categorizedPagesURL.setParameter("struts_action", "/wiki/view_categorized_pages");
+categorizedPagesURL.setParameter("nodeId", String.valueOf(node.getNodeId()));
+
+PortletURL taggedPagesURL = renderResponse.createRenderURL();
+
+taggedPagesURL.setParameter("struts_action", "/wiki/view_tagged_pages");
+taggedPagesURL.setParameter("nodeId", String.valueOf(node.getNodeId()));
+
+PortletURL viewAttachmentsURL = PortletURLUtil.clone(viewPageURL, renderResponse);
+
+viewAttachmentsURL.setParameter("struts_action", "/wiki/view_page_attachments");
+viewAttachmentsURL.setParameter("redirect", currentURL);
+
+AssetEntryServiceUtil.incrementViewCounter(WikiPage.class.getName(), wikiPage.getResourcePrimKey());
+
+if (Validator.isNotNull(ParamUtil.getString(request, "title"))) {
+	AssetUtil.addLayoutTags(request, AssetTagLocalServiceUtil.getTags(WikiPage.class.getName(), wikiPage.getResourcePrimKey()));
+}
+
+AssetEntry layoutAssetEntry = null;
+
+if (wikiPage != null) {
+	layoutAssetEntry = AssetEntryLocalServiceUtil.getEntry(WikiPage.class.getName(), wikiPage.getResourcePrimKey());
+
+	request.setAttribute(WebKeys.LAYOUT_ASSET_ENTRY, layoutAssetEntry);
+}
+%>
+
+<c:choose>
+	<c:when test="<%= print %>">
+		<div class="popup-print">
+			<liferay-ui:icon
+				image="print"
+				label="<%= true %>"
+				url="javascript:print();"
+			/>
+		</div>
+
+		<aui:script>
+			print();
+		</aui:script>
+	</c:when>
+	<c:otherwise>
+		<aui:script>
+			function <portlet:namespace />printPage() {
+				window.open('<%= printPageURL %>', '', "directories=0,height=480,left=80,location=1,menubar=1,resizable=1,scrollbars=yes,status=0,toolbar=0,top=180,width=640");
+			}
+		</aui:script>
+	</c:otherwise>
+</c:choose>
+
+<liferay-util:include page="/html/portlet/wiki/top_links.jsp" />
+
+<%
+long portletDisplayDDMTemplateId = PortletDisplayTemplateUtil.getPortletDisplayTemplateDDMTemplateId(displayStyleGroupId, displayStyle);
+%>
+
+<c:choose>
+	<c:when test="<%= portletDisplayDDMTemplateId > 0 %>">
+
+		<%
+		List entries = new ArrayList();
+
+		entries.add(wikiPage);
+
+		String formattedContent = null;
+
+		try {
+			formattedContent = WikiUtil.getFormattedContent(renderRequest, renderResponse, wikiPage, viewPageURL, editPageURL, title, preview);
+		}
+		catch (Exception e) {
+			formattedContent = wikiPage.getContent();
+		}
+
+		Map<String, Object> contextObjects = new HashMap<String, Object>();
+
+		contextObjects.put("assetEntry", layoutAssetEntry);
+		contextObjects.put("formattedContent", formattedContent);
+		%>
+
+		<%= PortletDisplayTemplateUtil.renderDDMTemplate(pageContext, portletDisplayDDMTemplateId, entries, contextObjects) %>
+	</c:when>
+	<c:otherwise>
+
+		<liferay-ui:header
+			backLabel="<%= parentTitle %>"
+			backURL="<%= (viewParentPageURL != null) ? viewParentPageURL.toString() : null %>"
+			localizeTitle="<%= false %>"
+			title="<%= title %>"
+		/>
+
+		<c:if test="<%= !print %>">
+			<div class="page-actions top-actions">
+				<c:if test="<%= WikiPagePermission.contains(permissionChecker, wikiPage, ActionKeys.UPDATE) %>">
+					<c:if test="<%= followRedirect || (redirectPage == null) %>">
+						<liferay-ui:icon
+							image="edit"
+							label="<%= true %>"
+							url="<%= editPageURL.toString() %>"
+						/>
+					</c:if>
+				</c:if>
+
+				<%
+				PortletURL viewPageDetailsURL = PortletURLUtil.clone(viewPageURL, renderResponse);
+
+				viewPageDetailsURL.setParameter("struts_action", "/wiki/view_page_details");
+				viewPageDetailsURL.setParameter("redirect", currentURL);
+				%>
+
+				<liferay-ui:icon
+					image="history"
+					label="<%= true %>"
+					message="details"
+					method="get"
+					url="<%= viewPageDetailsURL.toString() %>"
+				/>
+
+				<liferay-ui:icon
+					image="print"
+					label="<%= true %>"
+					url='<%= "javascript:" + renderResponse.getNamespace() + "printPage();" %>'
+				/>
+			</div>
+		</c:if>
+
+		<c:if test="<%= originalPage != null %>">
+
+			<%
+			PortletURL originalViewPageURL = renderResponse.createRenderURL();
+
+			originalViewPageURL.setParameter("struts_action", "/wiki/view");
+			originalViewPageURL.setParameter("nodeName", node.getName());
+			originalViewPageURL.setParameter("title", originalPage.getTitle());
+			originalViewPageURL.setParameter("followRedirect", "false");
+			%>
+
+			<div class="page-redirect" onClick="location.href = '<%= originalViewPageURL.toString() %>';">
+				(<%= LanguageUtil.format(pageContext, "redirected-from-x", originalPage.getTitle()) %>)
+			</div>
+		</c:if>
+
+		<c:if test="<%= !wikiPage.isHead() %>">
+			<div class="page-old-version">
+				(<liferay-ui:message key="you-are-viewing-an-archived-version-of-this-page" /> (<%= wikiPage.getVersion() %>), <aui:a href="<%= viewPageURL.toString() %>" label="go-to-the-latest-version" />)
+			</div>
+		</c:if>
+
+		<div class="page-categorization">
+			<div class="page-categories">
+				<liferay-ui:asset-categories-summary
+					className="<%= WikiPage.class.getName() %>"
+					classPK="<%= wikiPage.getResourcePrimKey() %>"
+					portletURL="<%= PortletURLUtil.clone(categorizedPagesURL, renderResponse) %>"
+				/>
+			</div>
+
+			<div class="page-tags">
+				<liferay-ui:asset-tags-summary
+					className="<%= WikiPage.class.getName() %>"
+					classPK="<%= wikiPage.getResourcePrimKey() %>"
+					message="tags"
+					portletURL="<%= PortletURLUtil.clone(taggedPagesURL, renderResponse) %>"
+				/>
+			</div>
+		</div>
+
+		<div>
+			<%@ include file="/html/portlet/wiki/view_page_content.jspf" %>
+		</div>
+
+		<liferay-ui:custom-attributes-available className="<%= WikiPage.class.getName() %>">
+			<liferay-ui:custom-attribute-list
+				className="<%= WikiPage.class.getName() %>"
+				classPK="<%= (wikiPage != null) ? wikiPage.getPrimaryKey() : 0 %>"
+				editable="<%= false %>"
+				label="<%= true %>"
+			/>
+		</liferay-ui:custom-attributes-available>
+
+		<c:if test="<%= (wikiPage != null) && Validator.isNotNull(formattedContent) && (followRedirect || (redirectPage == null)) %>">
+			<c:if test="<%= !childPages.isEmpty() %>">
+				<div class="child-pages">
+					<h2><liferay-ui:message key="children-pages" /></h2>
+
+					<ul>
+
+						<%
+						PortletURL curPageURL = PortletURLUtil.clone(viewPageURL, renderResponse);
+
+						for (int i = 0; i < childPages.size(); i++) {
+							WikiPage curPage = (WikiPage)childPages.get(i);
+
+							curPageURL.setParameter("title", curPage.getTitle());
+						%>
+
+							<c:if test="<%= Validator.isNull(curPage.getRedirectTitle()) %>">
+								<li>
+									<aui:a href="<%= curPageURL.toString() %>"><%= curPage.getTitle() %></aui:a>
+								</li>
+							</c:if>
+
+						<%
+						}
+						%>
+
+					</ul>
+				</div>
+			</c:if>
+
+			<div class="page-actions">
+				<div class="article-actions">
+					<c:if test="<%= WikiNodePermission.contains(permissionChecker, node, ActionKeys.ADD_PAGE) %>">
+						<liferay-ui:icon
+							image="add_article"
+							label="<%= true %>"
+							message="add-child-page"
+							method="get"
+							url="<%= addPageURL.toString() %>"
+						/>,
+					</c:if>
+
+					<liferay-ui:icon
+						image="clip"
+						label="<%= true %>"
+						message='<%= attachmentsFileEntriesCount + " " + LanguageUtil.get(pageContext, (attachmentsFileEntriesCount == 1) ? "attachment" : "attachments") %>' method="get" url="<%= viewAttachmentsURL.toString() %>"
+					/>
+				</div>
+
+				<div class="stats">
+
+					<%
+					AssetEntry assetEntry = AssetEntryLocalServiceUtil.getEntry(WikiPage.class.getName(), wikiPage.getResourcePrimKey());
+					%>
+
+					<c:choose>
+						<c:when test="<%= assetEntry.getViewCount() == 1 %>">
+							<%= assetEntry.getViewCount() %> <liferay-ui:message key="view" />
+						</c:when>
+						<c:when test="<%= assetEntry.getViewCount() > 1 %>">
+							<%= assetEntry.getViewCount() %> <liferay-ui:message key="views" />
+						</c:when>
+					</c:choose>
+				</div>
+			</div>
+
+			<c:if test="<%= enableRelatedAssets %>">
+				<div class="entry-links">
+					<liferay-ui:asset-links
+						assetEntryId="<%= assetEntry.getEntryId() %>"
+					/>
+				</div>
+			</c:if>
+
+			<c:if test="<%= enablePageRatings %>">
+				<div class="page-ratings">
+					<liferay-ui:ratings
+						className="<%= WikiPage.class.getName() %>"
+						classPK="<%= wikiPage.getResourcePrimKey() %>"
+					/>
+				</div>
+			</c:if>
+
+			<c:if test="<%= enableComments %>">
+				<liferay-ui:panel-container extended="<%= false %>" id="wikiCommentsPanelContainer" persistState="<%= true %>">
+					<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" id="wikiCommentsPanel" persistState="<%= true %>" title="comments">
+						<portlet:actionURL var="discussionURL">
+							<portlet:param name="struts_action" value="/wiki/edit_page_discussion" />
+						</portlet:actionURL>
+
+						<liferay-ui:discussion
+							className="<%= WikiPage.class.getName() %>"
+							classPK="<%= wikiPage.getResourcePrimKey() %>"
+							formAction="<%= discussionURL %>"
+							formName="fm2"
+							ratingsEnabled="<%= enableCommentRatings %>"
+							redirect="<%= currentURL %>"
+							userId="<%= wikiPage.getUserId() %>"
+						/>
+					</liferay-ui:panel>
+				</liferay-ui:panel-container>
+			</c:if>
+		</c:if>
+	</c:otherwise>
+</c:choose>
+
+<aui:script use="aui-base">
+	var toc = A.one('#p_p_id<portlet:namespace /> .toc');
+
+	if (toc) {
+		var index = toc.one('.toc-index');
+		var trigger = toc.one('a.toc-trigger');
+
+		trigger.on(
+			'click',
+			function(event) {
+				index.toggle();
+			}
+		);
+	}
+</aui:script>
+
+<%
+if ((wikiPage != null) && !wikiPage.getTitle().equals(WikiPageConstants.FRONT_PAGE)) {
+	if (!portletName.equals(PortletKeys.WIKI_DISPLAY)) {
+		PortalUtil.setPageSubtitle(wikiPage.getTitle(), request);
+
+		String description = wikiPage.getContent();
+
+		if (wikiPage.getFormat().equals("html")) {
+			description = HtmlUtil.stripHtml(description);
+		}
+
+		description = StringUtil.shorten(description, 200);
+
+		PortalUtil.setPageDescription(description, request);
+		PortalUtil.setPageKeywords(AssetUtil.getAssetKeywords(WikiPage.class.getName(), wikiPage.getResourcePrimKey()), request);
+	}
+
+	List<WikiPage> parentPages = wikiPage.getViewableParentPages();
+
+	for (WikiPage curParentPage : parentPages) {
+		viewPageURL.setParameter("title", curParentPage.getTitle());
+
+		PortalUtil.addPortletBreadcrumbEntry(request, curParentPage.getTitle(), viewPageURL.toString());
+	}
+
+	viewPageURL.setParameter("title", wikiPage.getTitle());
+
+	PortalUtil.addPortletBreadcrumbEntry(request, wikiPage.getTitle(), viewPageURL.toString());
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_all_pages.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_all_pages.jsp
new file mode 100644
index 0000000..857810c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_all_pages.jsp
@@ -0,0 +1,27 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<liferay-util:include page="/html/portlet/wiki/top_links.jsp" />
+
+<liferay-ui:header
+	title="all-pages"
+/>
+
+<liferay-util:include page="/html/portlet/wiki/page_iterator.jsp">
+	<liferay-util:param name="type" value="all_pages" />
+</liferay-util:include>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_categorized_pages.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_categorized_pages.jsp
new file mode 100644
index 0000000..cbae086
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_categorized_pages.jsp
@@ -0,0 +1,23 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<liferay-util:include page="/html/portlet/wiki/top_links.jsp" />
+
+<liferay-util:include page="/html/portlet/wiki/page_iterator.jsp">
+	<liferay-util:param name="type" value="categorized_pages" />
+</liferay-util:include>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_draft_pages.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_draft_pages.jsp
new file mode 100644
index 0000000..939cc2c
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_draft_pages.jsp
@@ -0,0 +1,35 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<liferay-util:include page="/html/portlet/wiki/top_links.jsp" />
+
+<liferay-ui:header
+	title="draft-pages"
+/>
+
+<liferay-util:include page="/html/portlet/wiki/page_iterator.jsp">
+	<liferay-util:param name="type" value="draft_pages" />
+</liferay-util:include>
+
+<c:if test="<%= WorkflowDefinitionLinkLocalServiceUtil.hasWorkflowDefinitionLink(company.getCompanyId(), scopeGroupId, WikiPage.class.getName()) %>">
+	<h2><liferay-ui:message key="pending-approval" /></h2>
+
+	<liferay-util:include page="/html/portlet/wiki/page_iterator.jsp">
+		<liferay-util:param name="type" value="pending_pages" />
+	</liferay-util:include>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_node_deleted_attachments.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_node_deleted_attachments.jsp
new file mode 100644
index 0000000..08a79ce
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_node_deleted_attachments.jsp
@@ -0,0 +1,111 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+WikiNode node = (WikiNode)request.getAttribute(WebKeys.WIKI_NODE);
+
+List<FileEntry> attachmentsFileEntries = node.getDeletedAttachmentsFiles();
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/wiki/view_all_pages");
+portletURL.setParameter("redirect", currentURL);
+portletURL.setParameter("nodeId", String.valueOf(node.getNodeId()));
+
+PortalUtil.addPortletBreadcrumbEntry(request, node.getName(), portletURL.toString());
+
+portletURL.setParameter("struts_action", "/wiki/view_node_deleted_attachments");
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "attachments-recycle-bin"), portletURL.toString());
+
+PortletURL iteratorURL = renderResponse.createRenderURL();
+
+iteratorURL.setParameter("struts_action", "/wiki/view_node_deleted_attachments");
+iteratorURL.setParameter("redirect", currentURL);
+iteratorURL.setParameter("nodeId", String.valueOf(node.getNodeId()));
+iteratorURL.setParameter("viewTrashAttachments", Boolean.TRUE.toString());
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	title="removed-attachments"
+/>
+
+<portlet:actionURL var="emptyTrashURL">
+	<portlet:param name="struts_action" value="/wiki/edit_node_attachment" />
+	<portlet:param name="nodeId" value="<%= String.valueOf(node.getPrimaryKey()) %>" />
+</portlet:actionURL>
+
+<liferay-ui:trash-empty
+	confirmMessage="are-you-sure-you-want-to-remove-the-attachments-for-this-wiki-node"
+	emptyMessage="remove-the-attachments-for-this-wiki-node"
+	infoMessage="attachments-that-have-been-removed-for-more-than-x-will-be-automatically-deleted"
+	portletURL="<%= emptyTrashURL.toString() %>"
+	totalEntries="<%= attachmentsFileEntries.size() %>"
+/>
+
+<liferay-ui:search-container
+	emptyResultsMessage="this-wiki-node-does-not-have-file-attachments-in-the-recycle-bin"
+	iteratorURL="<%= iteratorURL %>"
+	total="<%= attachmentsFileEntries.size() %>"
+>
+	<liferay-ui:search-container-results
+		results="<%= ListUtil.subList(attachmentsFileEntries, searchContainer.getStart(), searchContainer.getEnd()) %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.kernel.repository.model.FileEntry"
+		modelVar="fileEntry"
+	>
+
+		<%
+		WikiPage wikiPage = WikiPageAttachmentsUtil.getPage(fileEntry.getFileEntryId());
+
+		String rowHREF = PortletFileRepositoryUtil.getPortletFileEntryURL(themeDisplay, fileEntry, "status=" + WorkflowConstants.STATUS_IN_TRASH);
+		%>
+
+		<liferay-ui:search-container-column-text
+			href="<%= rowHREF %>"
+			name="file-name"
+		>
+			<img align="left" alt="" border="0" src="<%= themeDisplay.getPathThemeImages() %>/file_system/small/<%= DLUtil.getFileIcon(fileEntry.getExtension()) %>.png"> <%= TrashUtil.getOriginalTitle(fileEntry.getTitle()) %>
+		</liferay-ui:search-container-column-text>
+
+		<liferay-ui:search-container-column-text
+			href="<%= rowHREF %>"
+			name="size"
+			value="<%= TextFormatter.formatStorageSize(fileEntry.getSize(), locale) %>"
+		/>
+
+		<liferay-ui:search-container-column-jsp
+			align="right"
+			path="/html/portlet/wiki/page_attachment_action.jsp"
+		/>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
+
+<liferay-ui:restore-entry
+	duplicateEntryAction="/wiki/restore_entry"
+	overrideMessage="overwrite-the-existing-attachment-with-the-removed-one"
+	renameMessage="keep-both-attachments-and-rename-the-removed-attachment-as"
+	restoreEntryAction="/wiki/restore_page_attachment"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_nodes.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_nodes.jsp
new file mode 100644
index 0000000..3c1c29d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_nodes.jsp
@@ -0,0 +1,135 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/wiki/view_nodes");
+
+List<String> headerNames = new ArrayList<String>();
+
+headerNames.add("wiki");
+headerNames.add("num-of-pages");
+headerNames.add("last-post-date");
+headerNames.add(StringPool.BLANK);
+
+SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, SearchContainer.DEFAULT_DELTA, portletURL, headerNames, null);
+
+int total = WikiNodeServiceUtil.getNodesCount(scopeGroupId);
+
+searchContainer.setTotal(total);
+
+List results = WikiNodeServiceUtil.getNodes(scopeGroupId, searchContainer.getStart(), searchContainer.getEnd());
+
+searchContainer.setResults(results);
+%>
+
+<portlet:actionURL var="undoTrashURL">
+	<portlet:param name="struts_action" value="/wiki/edit_node" />
+	<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.RESTORE %>" />
+</portlet:actionURL>
+
+<liferay-ui:trash-undo portletURL="<%= undoTrashURL %>" />
+
+<liferay-ui:error exception="<%= RequiredNodeException.class %>" message="the-last-main-node-is-required-and-cannot-be-deleted" />
+
+<liferay-portlet:renderURL var="searchURL">
+	<portlet:param name="struts_action" value="/wiki/search" />
+</liferay-portlet:renderURL>
+
+<aui:form action="<%= searchURL %>" method="get" name="fm">
+	<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+
+	<%
+	List resultRows = searchContainer.getResultRows();
+
+	for (int i = 0; i < results.size(); i++) {
+		WikiNode node = (WikiNode)results.get(i);
+
+		node = node.toEscapedModel();
+
+		ResultRow row = new ResultRow(node, node.getNodeId(), i);
+
+		PortletURL rowURL = renderResponse.createRenderURL();
+
+		rowURL.setParameter("struts_action", "/wiki/view_all_pages");
+		rowURL.setParameter("redirect", currentURL);
+		rowURL.setParameter("nodeId", String.valueOf(node.getNodeId()));
+
+		// Name
+
+		row.addText(node.getName(), rowURL);
+
+		// Number of pages
+
+		int pagesCount = WikiPageServiceUtil.getPagesCount(scopeGroupId, node.getNodeId(), true);
+
+		row.addText(String.valueOf(pagesCount), rowURL);
+
+		// Last post date
+
+		if (node.getLastPostDate() == null) {
+			row.addText(LanguageUtil.get(pageContext, "never"), rowURL);
+		}
+		else {
+			row.addText(dateFormatDateTime.format(node.getLastPostDate()), rowURL);
+		}
+
+		// Action
+
+		row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/wiki/node_action.jsp");
+
+		// Add result row
+
+		resultRows.add(row);
+	}
+
+	boolean showAddNodeButton = WikiPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_NODE);
+	boolean showPermissionsButton = WikiPermission.contains(permissionChecker, scopeGroupId, ActionKeys.PERMISSIONS);
+	%>
+
+	<aui:fieldset>
+		<c:if test="<%= showAddNodeButton || showPermissionsButton %>">
+			<aui:button-row>
+				<c:if test="<%= showAddNodeButton %>">
+					<portlet:renderURL var="addNodeURL">
+						<portlet:param name="struts_action" value="/wiki/edit_node" />
+						<portlet:param name="redirect" value="<%= currentURL %>" />
+						<portlet:param name="nodeId" value="0" />
+					</portlet:renderURL>
+
+					<aui:button href="<%= addNodeURL %>" name="addNodeButton" value="add-wiki" />
+				</c:if>
+
+				<c:if test="<%= showPermissionsButton %>">
+					<liferay-security:permissionsURL
+						modelResource="com.liferay.portlet.wiki"
+						modelResourceDescription="<%= HtmlUtil.escape(themeDisplay.getScopeGroupName()) %>"
+						resourcePrimKey="<%= String.valueOf(scopeGroupId) %>"
+						var="permissionsURL"
+						windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+					/>
+
+					<aui:button href="<%= permissionsURL %>" name="permissionsButton" useDialog="<%= true %>" value="permissions" />
+				</c:if>
+			</aui:button-row>
+		</c:if>
+
+		<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" />
+	</aui:fieldset>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_orphan_pages.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_orphan_pages.jsp
new file mode 100644
index 0000000..c8dd9c4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_orphan_pages.jsp
@@ -0,0 +1,27 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<liferay-util:include page="/html/portlet/wiki/top_links.jsp" />
+
+<liferay-ui:header
+	title="orphan-pages"
+/>
+
+<liferay-util:include page="/html/portlet/wiki/page_iterator.jsp">
+	<liferay-util:param name="type" value="orphan_pages" />
+</liferay-util:include>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_page_activities.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_page_activities.jsp
new file mode 100644
index 0000000..c52fbe4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_page_activities.jsp
@@ -0,0 +1,304 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<liferay-util:include page="/html/portlet/wiki/top_links.jsp" />
+
+<liferay-util:include page="/html/portlet/wiki/page_tabs.jsp">
+	<liferay-util:param name="tabs1" value="history" />
+</liferay-util:include>
+
+<liferay-util:include page="/html/portlet/wiki/page_tabs_history.jsp">
+	<liferay-util:param name="tabs3" value="activities" />
+</liferay-util:include>
+
+<%
+WikiNode node = (WikiNode)request.getAttribute(WebKeys.WIKI_NODE);
+WikiPage wikiPage = (WikiPage)request.getAttribute(WebKeys.WIKI_PAGE);
+
+PortletURL portletURL = renderResponse.createActionURL();
+
+portletURL.setParameter("nodeId", String.valueOf(node.getNodeId()));
+portletURL.setParameter("title", wikiPage.getTitle());
+
+PortalUtil.addPortletBreadcrumbEntry(request, wikiPage.getTitle(), portletURL.toString());
+
+portletURL.setParameter("struts_action", "/wiki/view_page_history");
+portletURL.setParameter("redirect", currentURL);
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "history"), portletURL.toString());
+
+PortletURL iteratorURL = renderResponse.createRenderURL();
+
+iteratorURL.setParameter("struts_action", "/wiki/view_page_activities");
+iteratorURL.setParameter("redirect", currentURL);
+iteratorURL.setParameter("nodeId", String.valueOf(node.getNodeId()));
+iteratorURL.setParameter("title", wikiPage.getTitle());
+%>
+
+<div class="page-activities">
+	<liferay-ui:search-container
+		iteratorURL="<%= iteratorURL %>"
+		total="<%= SocialActivityLocalServiceUtil.getActivitiesCount(0, WikiPage.class.getName(), wikiPage.getResourcePrimKey()) %>"
+	>
+		<liferay-ui:search-container-results
+			results="<%= SocialActivityLocalServiceUtil.getActivities(0, WikiPage.class.getName(), wikiPage.getResourcePrimKey(), searchContainer.getStart(), searchContainer.getEnd()) %>"
+		/>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portlet.social.model.SocialActivity"
+			escapedModel="<%= true %>"
+			keyProperty="activityId"
+			modelVar="socialActivity"
+		>
+
+			<%
+			User socialActivityUser = UserLocalServiceUtil.getUserById(socialActivity.getUserId());
+
+			JSONObject extraDataJSONObject = JSONFactoryUtil.createJSONObject(socialActivity.getExtraData());
+
+			FileEntry fileEntry = null;
+			FileVersion fileVersion = null;
+			%>
+
+			<liferay-ui:search-container-column-text
+				name="activity"
+			>
+				<c:choose>
+					<c:when test="<%= (socialActivity.getType() == SocialActivityConstants.TYPE_ADD_ATTACHMENT) || (socialActivity.getType() == SocialActivityConstants.TYPE_MOVE_ATTACHMENT_TO_TRASH) || (socialActivity.getType() == SocialActivityConstants.TYPE_RESTORE_ATTACHMENT_FROM_TRASH) %>">
+
+						<%
+						try {
+							fileEntry = PortletFileRepositoryUtil.getPortletFileEntry(extraDataJSONObject.getLong("fileEntryId"));
+						}
+						catch (NoSuchModelException nsme) {
+						}
+
+						String title = extraDataJSONObject.getString("fileEntryTitle");
+
+						if (fileEntry != null) {
+							fileVersion = fileEntry.getFileVersion();
+						}
+						%>
+
+						<liferay-util:buffer var="attachmentTitle">
+							<c:choose>
+								<c:when test="<%= fileVersion != null %>">
+									<aui:a href="<%= PortletFileRepositoryUtil.getPortletFileEntryURL(themeDisplay, fileEntry, StringPool.BLANK) %>"><%= title %></aui:a>
+								</c:when>
+								<c:otherwise>
+									<%= title %>
+								</c:otherwise>
+							</c:choose>
+						</liferay-util:buffer>
+
+						<c:choose>
+							<c:when test="<%= socialActivity.getType() == SocialActivityConstants.TYPE_ADD_ATTACHMENT %>">
+								<liferay-ui:icon
+									image="clip"
+									label="<%= true %>"
+									message='<%= LanguageUtil.format(pageContext, "x-added-the-attachment-x", new Object[] {socialActivityUser.getFullName(), attachmentTitle}) %>'
+								/>
+							</c:when>
+							<c:when test="<%= socialActivity.getType() == SocialActivityConstants.TYPE_MOVE_ATTACHMENT_TO_TRASH %>">
+								<liferay-ui:icon
+									image="delete_attachment"
+									label="<%= true %>"
+									message='<%= LanguageUtil.format(pageContext, "x-removed-the-attachment-x", new Object[] {socialActivityUser.getFullName(), attachmentTitle}) %>'
+								/>
+							</c:when>
+							<c:when test="<%= socialActivity.getType() == SocialActivityConstants.TYPE_RESTORE_ATTACHMENT_FROM_TRASH %>">
+								<liferay-ui:icon
+									image="undo"
+									label="<%= true %>"
+									message='<%= LanguageUtil.format(pageContext, "x-restored-the-attachment-x", new Object[] {socialActivityUser.getFullName(), attachmentTitle}) %>'
+								/>
+							</c:when>
+						</c:choose>
+					</c:when>
+
+					<c:when test="<%= socialActivity.getType() == SocialActivityConstants.TYPE_ADD_COMMENT %>">
+
+						<%
+						WikiPage socialActivityWikiPage = WikiPageLocalServiceUtil.getPage(node.getNodeId(), wikiPage.getTitle());
+						%>
+
+						<portlet:renderURL var="viewPageURL">
+							<portlet:param name="struts_action" value="/wiki/view" />
+							<portlet:param name="nodeName" value="<%= node.getName() %>" />
+							<portlet:param name="title" value="<%= socialActivityWikiPage.getTitle() %>" />
+						</portlet:renderURL>
+
+						<liferay-ui:icon
+							label="<%= true %>"
+							message='<%= LanguageUtil.format(pageContext, "x-added-a-comment", new Object[] {socialActivityUser.getFullName(), viewPageURL + "#wikiCommentsPanel"}) %>'
+						/>
+					</c:when>
+
+					<c:when test="<%= (socialActivity.getType() == SocialActivityConstants.TYPE_MOVE_TO_TRASH) || (socialActivity.getType() == SocialActivityConstants.TYPE_RESTORE_FROM_TRASH) || (socialActivity.getType() == WikiActivityKeys.ADD_PAGE) || (socialActivity.getType() == WikiActivityKeys.UPDATE_PAGE) %>">
+
+						<%
+						double version = extraDataJSONObject.getDouble("version");
+
+						WikiPage socialActivityWikiPage = WikiPageLocalServiceUtil.getPage(node.getNodeId(), wikiPage.getTitle(), version);
+						%>
+
+						<portlet:renderURL var="viewPageURL">
+							<portlet:param name="struts_action" value="/wiki/view" />
+							<portlet:param name="nodeName" value="<%= node.getName() %>" />
+							<portlet:param name="title" value="<%= socialActivityWikiPage.getTitle() %>" />
+							<portlet:param name="version" value="<%= String.valueOf(version) %>" />
+						</portlet:renderURL>
+
+						<c:choose>
+							<c:when test="<%= socialActivity.getType() == SocialActivityConstants.TYPE_MOVE_TO_TRASH %>">
+								<liferay-ui:icon
+									image="trash"
+									label="<%= true %>"
+									message='<%= LanguageUtil.format(pageContext, "activity-wiki-page-move-to-trash", new Object[] {StringPool.BLANK, socialActivityUser.getFullName(), socialActivityWikiPage.getTitle()}) %>'
+								/>
+							</c:when>
+							<c:when test="<%= socialActivity.getType() == SocialActivityConstants.TYPE_RESTORE_FROM_TRASH %>">
+								<liferay-util:buffer var="pageTitleLink">
+									<aui:a href="<%= viewPageURL.toString() %>"><%= socialActivityWikiPage.getTitle() %></aui:a>
+								</liferay-util:buffer>
+
+								<liferay-ui:icon
+									image="undo"
+									label="<%= true %>"
+									message='<%= LanguageUtil.format(pageContext, "activity-wiki-page-restore-from-trash", new Object[] {StringPool.BLANK, socialActivityUser.getFullName(), pageTitleLink}) %>'
+								/>
+							</c:when>
+							<c:when test="<%= socialActivity.getType() == WikiActivityKeys.ADD_PAGE %>">
+								<liferay-util:buffer var="pageTitleLink">
+									<aui:a href="<%= viewPageURL.toString() %>"><%= socialActivityWikiPage.getTitle() %></aui:a>
+								</liferay-util:buffer>
+
+								<liferay-ui:icon
+									image="add_article"
+									label="<%= true %>"
+									message='<%= LanguageUtil.format(pageContext, "x-added-the-page-x", new Object[] {socialActivityUser.getFullName(), pageTitleLink}) %>'
+								/>
+							</c:when>
+							<c:when test="<%= socialActivity.getType() == WikiActivityKeys.UPDATE_PAGE %>">
+								<liferay-util:buffer var="pageTitleLink">
+									<aui:a href="<%= viewPageURL.toString() %>">
+										<%= version %>
+
+										<c:if test="<%= socialActivityWikiPage.isMinorEdit() %>">
+											(<liferay-ui:message key="minor-edit" />)
+										</c:if>
+									</aui:a>
+								</liferay-util:buffer>
+
+								<liferay-ui:icon
+									image="edit"
+									label="<%= true %>"
+									message='<%= LanguageUtil.format(pageContext, "x-updated-the-page-to-version-x", new Object[] {socialActivityUser.getFullName(), pageTitleLink}) %>'
+								/>
+
+								<c:if test="<%= socialActivityWikiPage.getStatus() != WorkflowConstants.STATUS_APPROVED %>">
+									<span class="activity-status"><liferay-ui:message key="<%= WorkflowConstants.getStatusLabel(socialActivityWikiPage.getStatus()) %>" /></span>
+								</c:if>
+
+								<c:if test="<%= Validator.isNotNull(socialActivityWikiPage.getSummary()) %>">
+									<em class="activity-summary"><%= StringPool.QUOTE + socialActivityWikiPage.getSummary() + StringPool.QUOTE %></em>
+								</c:if>
+							</c:when>
+						</c:choose>
+					</c:when>
+				</c:choose>
+			</liferay-ui:search-container-column-text>
+
+			<liferay-ui:search-container-column-date
+				name="date"
+				value="<%= new Date(socialActivity.getCreateDate()) %>"
+			/>
+
+			<c:choose>
+				<c:when test="<%= ((socialActivity.getType() == SocialActivityConstants.TYPE_ADD_ATTACHMENT) || (socialActivity.getType() == SocialActivityConstants.TYPE_MOVE_ATTACHMENT_TO_TRASH) || (socialActivity.getType() == SocialActivityConstants.TYPE_RESTORE_ATTACHMENT_FROM_TRASH)) && (fileEntry != null) %>">
+					<liferay-ui:search-container-column-jsp
+						align="right"
+						path="/html/portlet/wiki/page_activity_attachment_action.jsp"
+					/>
+				</c:when>
+				<c:when test="<%= (socialActivity.getType() == SocialActivityConstants.TYPE_RESTORE_FROM_TRASH) || (socialActivity.getType() == WikiActivityKeys.ADD_PAGE) || (socialActivity.getType() == WikiActivityKeys.UPDATE_PAGE) %>">
+					<liferay-ui:search-container-column-jsp
+						align="right"
+						path="/html/portlet/wiki/page_activity_page_action.jsp"
+					/>
+				</c:when>
+				<c:otherwise>
+					<liferay-ui:search-container-column-text name="" value="" />
+				</c:otherwise>
+			</c:choose>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+
+	<liferay-ui:restore-entry
+		duplicateEntryAction="/wiki/restore_entry"
+		overrideMessage="overwrite-the-existing-attachment-with-the-removed-one"
+		renameMessage="keep-both-attachments-and-rename-the-removed-attachment-as"
+		restoreEntryAction="/wiki/restore_page_attachment"
+	/>
+</div>
+
+<%
+PortletURL compareVersionsURL = renderResponse.createRenderURL();
+
+compareVersionsURL.setParameter("struts_action", "/wiki/compare_versions");
+%>
+
+<aui:form action="<%= compareVersionsURL %>" method="post" name="compareVersionsForm" onSubmit="event.preventDefault();">
+	<aui:input name="tabs3" type="hidden" value="activities" />
+	<aui:input name="backURL" type="hidden" value="<%= currentURL %>" />
+	<aui:input name="nodeId" type="hidden" value="<%= node.getNodeId() %>" />
+	<aui:input name="title" type="hidden" value="<%= wikiPage.getTitle() %>" />
+	<aui:input name="sourceVersion" type="hidden" value="" />
+	<aui:input name="targetVersion" type="hidden" value="" />
+	<aui:input name="type" type="hidden" value="html" />
+</aui:form>
+
+<aui:script use="aui-base,escape">
+	A.getBody().delegate(
+		'click',
+		function(event) {
+			Liferay.Util.selectEntity(
+				{
+					dialog: {
+						constrain: true,
+						modal: true,
+						width: 680
+					},
+					eventName: '<portlet:namespace />selectVersion',
+					id: '<portlet:namespace />selectVersion' + event.currentTarget.attr('id'),
+					title: '<liferay-ui:message key="select-version" />',
+					uri: event.currentTarget.attr('data-uri')
+				},
+				function(event) {
+					document.<portlet:namespace />compareVersionsForm.<portlet:namespace />sourceVersion.value = event.sourceversion;
+					document.<portlet:namespace />compareVersionsForm.<portlet:namespace />targetVersion.value = event.targetversion;
+
+					submitForm(document.<portlet:namespace />compareVersionsForm);
+				}
+			);
+		},
+		'.compare-to-link a'
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_page_attachments.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_page_attachments.jsp
new file mode 100644
index 0000000..5a08f5f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_page_attachments.jsp
@@ -0,0 +1,209 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+boolean viewTrashAttachments = ParamUtil.getBoolean(request, "viewTrashAttachments");
+
+if (!TrashUtil.isTrashEnabled(scopeGroupId)) {
+	viewTrashAttachments = false;
+}
+
+WikiNode node = (WikiNode)request.getAttribute(WebKeys.WIKI_NODE);
+WikiPage wikiPage = (WikiPage)request.getAttribute(WebKeys.WIKI_PAGE);
+
+PortletURL portletURL = renderResponse.createActionURL();
+
+portletURL.setParameter("nodeId", String.valueOf(node.getNodeId()));
+portletURL.setParameter("title", wikiPage.getTitle());
+
+portletURL.setParameter("struts_action", "/wiki/view");
+
+PortalUtil.addPortletBreadcrumbEntry(request, wikiPage.getTitle(), portletURL.toString());
+
+portletURL.setParameter("struts_action", "/wiki/view_page_attachments");
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "attachments"), portletURL.toString());
+%>
+
+<c:if test="<%= !viewTrashAttachments %>">
+	<portlet:actionURL var="undoTrashURL">
+		<portlet:param name="struts_action" value="/wiki/edit_page_attachment" />
+		<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.RESTORE %>" />
+	</portlet:actionURL>
+
+	<liferay-ui:trash-undo portletURL="<%= undoTrashURL %>" />
+</c:if>
+
+<liferay-util:include page="/html/portlet/wiki/top_links.jsp" />
+
+<liferay-util:include page="/html/portlet/wiki/page_tabs.jsp">
+	<liferay-util:param name="tabs1" value="attachments" />
+</liferay-util:include>
+
+<c:if test="<%= viewTrashAttachments %>">
+	<liferay-ui:header
+		backURL="<%= redirect %>"
+		title="removed-attachments"
+	/>
+</c:if>
+
+<c:if test="<%= WikiNodePermission.contains(permissionChecker, node.getNodeId(), ActionKeys.ADD_ATTACHMENT) %>">
+	<c:choose>
+		<c:when test="<%= viewTrashAttachments %>">
+			<portlet:actionURL var="emptyTrashURL">
+				<portlet:param name="struts_action" value="/wiki/edit_page_attachment" />
+				<portlet:param name="nodeId" value="<%= String.valueOf(node.getPrimaryKey()) %>" />
+				<portlet:param name="title" value="<%= wikiPage.getTitle() %>" />
+			</portlet:actionURL>
+
+			<liferay-ui:trash-empty
+				confirmMessage="are-you-sure-you-want-to-remove-the-attachments-for-this-page"
+				emptyMessage="remove-the-attachments-for-this-page"
+				infoMessage="attachments-that-have-been-removed-for-more-than-x-will-be-automatically-deleted"
+				portletURL="<%= emptyTrashURL.toString() %>"
+				totalEntries="<%= wikiPage.getDeletedAttachmentsFileEntriesCount() %>"
+			/>
+		</c:when>
+		<c:otherwise>
+
+			<%
+			int deletedAttachmentsCount = wikiPage.getDeletedAttachmentsFileEntriesCount();
+			%>
+
+			<c:if test="<%= TrashUtil.isTrashEnabled(scopeGroupId) && (deletedAttachmentsCount > 0) %>">
+				<portlet:renderURL var="viewTrashAttachmentsURL">
+					<portlet:param name="struts_action" value="/wiki/view_page_attachments" />
+					<portlet:param name="tabs1" value="attachments" />
+					<portlet:param name="redirect" value="<%= currentURL %>" />
+					<portlet:param name="nodeId" value="<%= String.valueOf(node.getNodeId()) %>" />
+					<portlet:param name="title" value="<%= wikiPage.getTitle() %>" />
+					<portlet:param name="viewTrashAttachments" value="<%= Boolean.TRUE.toString() %>" />
+				</portlet:renderURL>
+
+				<liferay-ui:icon
+					cssClass="trash-attachments"
+					image="delete_attachment"
+					label="<%= true %>"
+					message='<%= LanguageUtil.format(pageContext, (deletedAttachmentsCount == 1) ? "x-recently-removed-attachment" : "x-recently-removed-attachments", deletedAttachmentsCount) %>'
+					url="<%= viewTrashAttachmentsURL %>"
+				/>
+			</c:if>
+
+			<portlet:renderURL var="addAttachmentsURL">
+				<portlet:param name="struts_action" value="/wiki/edit_page_attachment" />
+				<portlet:param name="nodeId" value="<%= String.valueOf(node.getNodeId()) %>" />
+				<portlet:param name="title" value="<%= wikiPage.getTitle() %>" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+			</portlet:renderURL>
+
+			<div class="btn-toolbar">
+
+				<%
+				String taglibAddAttachments = "location.href = '" + addAttachmentsURL + "';";
+				%>
+
+				<aui:button onClick="<%= taglibAddAttachments %>" value="add-attachments" />
+			</div>
+		</c:otherwise>
+	</c:choose>
+</c:if>
+
+<%
+String emptyResultsMessage = null;
+
+if (viewTrashAttachments) {
+	emptyResultsMessage = "this-page-does-not-have-file-attachments-in-the-recycle-bin";
+}
+else {
+	emptyResultsMessage = "this-page-does-not-have-file-attachments";
+}
+
+PortletURL iteratorURL = renderResponse.createRenderURL();
+
+iteratorURL.setParameter("struts_action", "/wiki/view_page_attachments");
+iteratorURL.setParameter("redirect", currentURL);
+iteratorURL.setParameter("nodeId", String.valueOf(node.getNodeId()));
+iteratorURL.setParameter("viewTrashAttachments", String.valueOf(viewTrashAttachments));
+%>
+
+<liferay-ui:search-container
+	emptyResultsMessage="<%= emptyResultsMessage %>"
+	iteratorURL="<%= iteratorURL %>"
+	total="<%= viewTrashAttachments ? wikiPage.getDeletedAttachmentsFileEntriesCount() : wikiPage.getAttachmentsFileEntriesCount() %>"
+>
+	<c:choose>
+		<c:when test="<%= viewTrashAttachments %>">
+			<liferay-ui:search-container-results
+				results="<%= wikiPage.getDeletedAttachmentsFileEntries(searchContainer.getStart(), searchContainer.getEnd()) %>"
+			/>
+		</c:when>
+		<c:otherwise>
+			<liferay-ui:search-container-results
+				results="<%= wikiPage.getAttachmentsFileEntries(searchContainer.getStart(), searchContainer.getEnd()) %>"
+			/>
+		</c:otherwise>
+	</c:choose>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.kernel.repository.model.FileEntry"
+		escapedModel="<%= true %>"
+		keyProperty="fileEntryId"
+		modelVar="fileEntry"
+		rowVar="row"
+	>
+
+		<%
+		int status = WorkflowConstants.STATUS_APPROVED;
+
+		if (viewTrashAttachments) {
+			status = WorkflowConstants.STATUS_IN_TRASH;
+		}
+
+		String rowHREF = PortletFileRepositoryUtil.getPortletFileEntryURL(themeDisplay, fileEntry, "status=" + status);
+		%>
+
+		<liferay-ui:search-container-column-text
+			href="<%= rowHREF %>"
+			name="file-name"
+		>
+			<img align="left" alt="" border="0" src="<%= themeDisplay.getPathThemeImages() %>/file_system/small/<%= DLUtil.getFileIcon(fileEntry.getExtension()) %>.png"> <%= TrashUtil.getOriginalTitle(fileEntry.getTitle()) %>
+		</liferay-ui:search-container-column-text>
+
+		<liferay-ui:search-container-column-text
+			href="<%= rowHREF %>"
+			name="size"
+			value="<%= TextFormatter.formatStorageSize(fileEntry.getSize(), locale) %>"
+		/>
+
+		<liferay-ui:search-container-column-jsp
+			align="right"
+			path="/html/portlet/wiki/page_attachment_action.jsp"
+		/>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
+
+<liferay-ui:restore-entry
+	duplicateEntryAction="/wiki/restore_entry"
+	overrideMessage="overwrite-the-existing-attachment-with-the-removed-one"
+	renameMessage="keep-both-attachments-and-rename-the-removed-attachment-as"
+	restoreEntryAction="/wiki/restore_page_attachment"
+/>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_page_content.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_page_content.jspf
new file mode 100644
index 0000000..a27585d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_page_content.jspf
@@ -0,0 +1,91 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+String formattedContent = null;
+
+try {
+	formattedContent = WikiUtil.getFormattedContent(renderRequest, renderResponse, wikiPage, viewPageURL, editPageURL, title, preview);
+%>
+
+	<div class="wiki-body">
+		<c:choose>
+			<c:when test="<%= !followRedirect && (redirectPage != null) %>">
+				<div class="alert alert-info">
+					<%= LanguageUtil.format(pageContext, "this-page-is-currently-redirected-to-x", redirectPage.getTitle()) %>
+				</div>
+
+				<c:if test="<%= WikiPagePermission.contains(permissionChecker, wikiPage, ActionKeys.UPDATE) %>">
+					<portlet:renderURL var="removeRedirectURL">
+						<portlet:param name="struts_action" value="/wiki/edit_page" />
+						<portlet:param name="nodeId" value="<%= String.valueOf(node.getNodeId()) %>" />
+						<portlet:param name="title" value="<%= title %>" />
+						<portlet:param name="removeRedirect" value="true" />
+					</portlet:renderURL>
+
+					<div class="btn-toolbar">
+
+						<%
+						String taglibRemoveRedirect = "location.href = '" + removeRedirectURL + "';";
+						%>
+
+						<aui:button onClick="<%= taglibRemoveRedirect %>" value="remove-redirect" />
+					</div>
+				</c:if>
+			</c:when>
+			<c:when test="<%= Validator.isNull(formattedContent) && WikiPagePermission.contains(permissionChecker, wikiPage, ActionKeys.UPDATE) %>">
+				<div class="alert alert-info">
+					<aui:a href="<%= editPageURL.toString() %>" label="this-page-is-empty-edit-it-to-add-some-text" />
+				</div>
+			</c:when>
+			<c:otherwise>
+				<%= formattedContent %>
+			</c:otherwise>
+		</c:choose>
+	</div>
+
+<%
+}
+catch (WikiFormatException wfe) {
+%>
+
+	<div class="alert alert-error">
+		<liferay-ui:message key="the-format-of-this-page-is-not-supported-the-page-content-will-be-shown-unformatted" />
+	</div>
+
+	<div class="wiki-body">
+		<pre>
+<%= wikiPage.getContent() %>
+		</pre>
+	</div>
+
+<%
+}
+catch (Exception e) {
+	_log.error("Error formatting the wiki page " + wikiPage.getPageId() + " with the format " + wikiPage.getFormat(), e);
+%>
+
+	<div class="alert alert-error">
+		<liferay-ui:message key="an-error-occurred-while-formatting-the-wiki-page" />
+	</div>
+
+<%
+}
+%>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.wiki.view_page_content_jspf");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_page_details.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_page_details.jsp
new file mode 100644
index 0000000..fcd9b76
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_page_details.jsp
@@ -0,0 +1,362 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+WikiNode node = (WikiNode)request.getAttribute(WebKeys.WIKI_NODE);
+WikiPage wikiPage = (WikiPage)request.getAttribute(WebKeys.WIKI_PAGE);
+
+List<FileEntry> attachmentsFileEntries = null;
+
+if (wikiPage != null) {
+	attachmentsFileEntries = wikiPage.getAttachmentsFileEntries();
+}
+
+int numOfVersions = WikiPageLocalServiceUtil.getPagesCount(wikiPage.getNodeId(), wikiPage.getTitle());
+WikiPage initialPage = (WikiPage)WikiPageLocalServiceUtil.getPages(wikiPage.getNodeId(), wikiPage.getTitle(), numOfVersions - 1, numOfVersions).get(0);
+
+PortletURL viewPageURL = renderResponse.createRenderURL();
+
+viewPageURL.setParameter("struts_action", "/wiki/view");
+viewPageURL.setParameter("nodeName", node.getName());
+viewPageURL.setParameter("title", wikiPage.getTitle());
+
+PortletURL editPageURL = renderResponse.createRenderURL();
+
+editPageURL.setParameter("struts_action", "/wiki/edit_page");
+editPageURL.setParameter("redirect", currentURL);
+editPageURL.setParameter("nodeId", String.valueOf(node.getNodeId()));
+editPageURL.setParameter("title", wikiPage.getTitle());
+
+PortalUtil.addPortletBreadcrumbEntry(request, wikiPage.getTitle(), viewPageURL.toString());
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "details"), currentURL);
+%>
+
+<liferay-util:include page="/html/portlet/wiki/top_links.jsp" />
+
+<liferay-util:include page="/html/portlet/wiki/page_tabs.jsp">
+	<liferay-util:param name="tabs1" value="details" />
+</liferay-util:include>
+
+<table class="table table-bordered table-hover table-striped page-info">
+<tr>
+	<th class="table-header">
+		<liferay-ui:message key="title" />
+	</th>
+	<td class="table-cell">
+		<%= wikiPage.getTitle() %>
+	</td>
+</tr>
+<tr>
+	<th class="table-header">
+		<liferay-ui:message key="format" />
+	</th>
+	<td class="table-cell">
+		<liferay-ui:message key='<%= "wiki.formats." + wikiPage.getFormat() %>'/>
+	</td>
+</tr>
+<tr>
+	<th class="table-header">
+		<liferay-ui:message key="latest-version" />
+	</th>
+	<td class="table-cell">
+		<%= wikiPage.getVersion() %>
+
+		<c:if test="<%= wikiPage.isMinorEdit() %>">
+			(<liferay-ui:message key="minor-edit" />)
+		</c:if>
+	</td>
+</tr>
+<tr>
+	<th class="table-header">
+		<liferay-ui:message key="created-by" />
+	</th>
+	<td class="table-cell">
+		<%= HtmlUtil.escape(initialPage.getUserName()) %> (<%= dateFormatDateTime.format(initialPage.getCreateDate()) %>)
+	</td>
+</tr>
+<tr>
+	<th class="table-header">
+		<liferay-ui:message key="last-changed-by" />
+	</th>
+	<td class="table-cell">
+		<%= HtmlUtil.escape(wikiPage.getUserName()) %> (<%= dateFormatDateTime.format(wikiPage.getCreateDate()) %>)
+	</td>
+</tr>
+<tr>
+	<th class="table-header">
+		<liferay-ui:message key="attachments" />
+	</th>
+	<td class="table-cell">
+		<%= (attachmentsFileEntries != null) ? attachmentsFileEntries.size() : 0 %>
+	</td>
+</tr>
+
+<c:if test="<%= PrefsPropsUtil.getBoolean(PropsKeys.OPENOFFICE_SERVER_ENABLED, PropsValues.OPENOFFICE_SERVER_ENABLED) && WikiPagePermission.contains(permissionChecker, wikiPage, ActionKeys.VIEW) %>">
+
+	<%
+	String[] conversions = DocumentConversionUtil.getConversions("html");
+
+	PortletURL exportPageURL = renderResponse.createActionURL();
+
+	exportPageURL.setParameter("struts_action", "/wiki/export_page");
+	exportPageURL.setParameter("nodeId", String.valueOf(node.getNodeId()));
+	exportPageURL.setParameter("nodeName", node.getName());
+	exportPageURL.setParameter("title", wikiPage.getTitle());
+	exportPageURL.setParameter("version", String.valueOf(wikiPage.getVersion()));
+	exportPageURL.setWindowState(LiferayWindowState.EXCLUSIVE);
+	%>
+
+	<tr>
+		<th class="table-header">
+			<liferay-ui:message key="convert-to" />
+		</th>
+		<td class="table-cell">
+			<liferay-ui:icon-list>
+
+			<%
+			for (String conversion : conversions) {
+				exportPageURL.setParameter("targetExtension", conversion);
+			%>
+
+				<liferay-ui:icon
+					image='<%= "../file_system/small/" + conversion %>'
+					label="<%= true %>"
+					message="<%= StringUtil.toUpperCase(conversion) %>"
+					method="get"
+					url="<%= exportPageURL.toString() %>"
+				/>
+
+			<%
+			}
+			%>
+
+			</liferay-ui:icon-list>
+		</td>
+	</tr>
+</c:if>
+
+<c:if test="<%= enableRSS %>">
+	<tr>
+		<th class="table-header">
+			<liferay-ui:message key="rss-subscription" />
+		</th>
+		<td class="table-cell">
+			<liferay-ui:rss
+				delta="<%= rssDelta %>"
+				displayStyle="<%= rssDisplayStyle %>"
+				feedType="<%= rssFeedType %>"
+				url='<%= themeDisplay.getPathMain() + "/wiki/rss?p_l_id=" + plid + "&companyId=" + company.getCompanyId() + "&nodeId=" + wikiPage.getNodeId() + "&title=" + wikiPage.getTitle() %>'
+			/>
+		</td>
+	</tr>
+</c:if>
+
+<c:if test="<%= (WikiPagePermission.contains(permissionChecker, wikiPage, ActionKeys.SUBSCRIBE) || WikiNodePermission.contains(permissionChecker, node, ActionKeys.SUBSCRIBE)) && (WikiUtil.getEmailPageAddedEnabled(portletPreferences) || WikiUtil.getEmailPageUpdatedEnabled(portletPreferences)) %>">
+	<tr>
+		<th class="table-header">
+			<liferay-ui:message key="email-subscription" />
+		</th>
+		<td>
+			<table class="lfr-table subscription-info">
+
+			<c:if test="<%= WikiPagePermission.contains(permissionChecker, wikiPage, ActionKeys.SUBSCRIBE) %>">
+				<tr>
+					<c:choose>
+						<c:when test="<%= SubscriptionLocalServiceUtil.isSubscribed(user.getCompanyId(), user.getUserId(), WikiPage.class.getName(), wikiPage.getResourcePrimKey()) %>">
+							<td>
+								<liferay-ui:message key="you-are-subscribed-to-this-page" />
+							</td>
+							<td>
+								<portlet:actionURL var="unsubscribeURL">
+									<portlet:param name="struts_action" value="/wiki/edit_page" />
+									<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UNSUBSCRIBE %>" />
+									<portlet:param name="redirect" value="<%= currentURL %>" />
+									<portlet:param name="nodeId" value="<%= String.valueOf(wikiPage.getNodeId()) %>" />
+									<portlet:param name="title" value="<%= String.valueOf(wikiPage.getTitle()) %>" />
+								</portlet:actionURL>
+
+								<liferay-ui:icon
+									image="unsubscribe"
+									label="<%= true %>"
+									url="<%= unsubscribeURL %>"
+								/>
+							</td>
+						</c:when>
+						<c:otherwise>
+							<td>
+								<liferay-ui:message key="you-are-not-subscribed-to-this-page" />
+							</td>
+							<td>
+								<portlet:actionURL var="subscribeURL">
+									<portlet:param name="struts_action" value="/wiki/edit_page" />
+									<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.SUBSCRIBE %>" />
+									<portlet:param name="redirect" value="<%= currentURL %>" />
+									<portlet:param name="nodeId" value="<%= String.valueOf(wikiPage.getNodeId()) %>" />
+									<portlet:param name="title" value="<%= String.valueOf(wikiPage.getTitle()) %>" />
+								</portlet:actionURL>
+
+								<liferay-ui:icon
+									image="subscribe"
+									label="<%= true %>"
+									url="<%= subscribeURL %>"
+								/>
+							</td>
+						</c:otherwise>
+					</c:choose>
+				</tr>
+			</c:if>
+
+			<c:if test="<%= WikiNodePermission.contains(permissionChecker, node, ActionKeys.SUBSCRIBE) %>">
+				<tr>
+					<c:choose>
+						<c:when test="<%= SubscriptionLocalServiceUtil.isSubscribed(user.getCompanyId(), user.getUserId(), WikiNode.class.getName(), node.getNodeId()) %>">
+							<td>
+								<liferay-ui:message key="you-are-subscribed-to-this-wiki" />
+							</td>
+							<td>
+								<portlet:actionURL var="unsubscribeURL">
+									<portlet:param name="struts_action" value="/wiki/edit_node" />
+									<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UNSUBSCRIBE %>" />
+									<portlet:param name="redirect" value="<%= currentURL %>" />
+									<portlet:param name="nodeId" value="<%= String.valueOf(node.getNodeId()) %>" />
+								</portlet:actionURL>
+
+								<liferay-ui:icon
+									image="unsubscribe"
+									label="<%= true %>"
+									url="<%= unsubscribeURL %>"
+								/>
+							</td>
+						</c:when>
+						<c:otherwise>
+							<td>
+								<liferay-ui:message key="you-are-not-subscribed-to-this-wiki" />
+							</td>
+							<td>
+								<portlet:actionURL var="subscribeURL">
+									<portlet:param name="struts_action" value="/wiki/edit_node" />
+									<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.SUBSCRIBE %>" />
+									<portlet:param name="redirect" value="<%= currentURL %>" />
+									<portlet:param name="nodeId" value="<%= String.valueOf(node.getNodeId()) %>" />
+								</portlet:actionURL>
+
+								<liferay-ui:icon
+									image="subscribe"
+									label="<%= true %>"
+									url="<%= subscribeURL %>"
+								/>
+							</td>
+						</c:otherwise>
+					</c:choose>
+				</tr>
+			</c:if>
+
+			</table>
+		</td>
+	</tr>
+</c:if>
+
+<c:if test="<%= WikiPagePermission.contains(permissionChecker, wikiPage, ActionKeys.PERMISSIONS) || (WikiPagePermission.contains(permissionChecker, wikiPage, ActionKeys.UPDATE) && WikiNodePermission.contains(permissionChecker, wikiPage.getNodeId(), ActionKeys.ADD_PAGE)) || WikiPagePermission.contains(permissionChecker, wikiPage, ActionKeys.DELETE) %>">
+	<tr>
+		<th class="table-header">
+			<liferay-ui:message key="advanced-actions" />
+		</th>
+		<td class="table-cell">
+			<liferay-ui:icon-list>
+				<c:if test="<%= WikiPagePermission.contains(permissionChecker, wikiPage, ActionKeys.PERMISSIONS) %>">
+					<liferay-security:permissionsURL
+						modelResource="<%= WikiPage.class.getName() %>"
+						modelResourceDescription="<%= wikiPage.getTitle() %>"
+						resourcePrimKey="<%= String.valueOf(wikiPage.getResourcePrimKey()) %>"
+						var="permissionsURL"
+						windowState="<%= LiferayWindowState.POP_UP.toString() %>"
+					/>
+
+					<liferay-ui:icon
+						image="permissions"
+						label="<%= true %>"
+						method="get"
+						url="<%= permissionsURL %>"
+						useDialog="<%= true %>"
+					/>
+				</c:if>
+
+				<c:if test="<%= WikiPagePermission.contains(permissionChecker, wikiPage, ActionKeys.UPDATE) && WikiNodePermission.contains(permissionChecker, wikiPage.getNodeId(), ActionKeys.ADD_PAGE) %>">
+
+					<%
+					PortletURL copyPageURL = PortletURLUtil.clone(viewPageURL, renderResponse);
+
+					copyPageURL.setParameter("struts_action", "/wiki/edit_page");
+					copyPageURL.setParameter("redirect", viewPageURL.toString());
+					copyPageURL.setParameter("nodeId", String.valueOf(wikiPage.getNodeId()));
+					copyPageURL.setParameter("title", StringPool.BLANK);
+					copyPageURL.setParameter("editTitle", "1");
+					copyPageURL.setParameter("templateNodeId", String.valueOf(wikiPage.getNodeId()));
+					copyPageURL.setParameter("templateTitle", wikiPage.getTitle());
+					%>
+
+					<liferay-ui:icon
+						image="copy"
+						label="<%= true %>"
+						url="<%= copyPageURL.toString() %>"
+					/>
+				</c:if>
+
+				<c:if test="<%= WikiPagePermission.contains(permissionChecker, wikiPage.getNodeId(), wikiPage.getTitle(), ActionKeys.DELETE) && WikiNodePermission.contains(permissionChecker, wikiPage.getNodeId(), ActionKeys.ADD_PAGE) %>">
+
+					<%
+					PortletURL movePageURL = PortletURLUtil.clone(viewPageURL, renderResponse);
+
+					movePageURL.setParameter("struts_action", "/wiki/move_page");
+					movePageURL.setParameter("redirect", viewPageURL.toString());
+					%>
+
+					<liferay-ui:icon
+						image="forward"
+						label="<%= true %>"
+						message="move"
+						url="<%= movePageURL.toString() %>"
+					/>
+				</c:if>
+
+				<c:if test="<%= WikiPagePermission.contains(permissionChecker, wikiPage.getNodeId(), wikiPage.getTitle(), ActionKeys.DELETE) %>">
+
+					<%
+					PortletURL frontPageURL = PortletURLUtil.clone(viewPageURL, renderResponse);
+
+					frontPageURL.setParameter("title", WikiPageConstants.FRONT_PAGE);
+
+					PortletURL deletePageURL = PortletURLUtil.clone(editPageURL, PortletRequest.ACTION_PHASE, renderResponse);
+
+					if (TrashUtil.isTrashEnabled(scopeGroupId)) {
+						deletePageURL.setParameter(Constants.CMD, Constants.MOVE_TO_TRASH);
+					}
+					else {
+						deletePageURL.setParameter(Constants.CMD, Constants.DELETE);
+					}
+
+					deletePageURL.setParameter("redirect", frontPageURL.toString());
+					%>
+
+					<liferay-ui:icon-delete label="<%= true %>" trash="<%= TrashUtil.isTrashEnabled(scopeGroupId) %>" url="<%= deletePageURL.toString() %>" />
+				</c:if>
+			</liferay-ui:icon-list>
+		</td>
+	</tr>
+</c:if>
+</table>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_page_history.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_page_history.jsp
new file mode 100644
index 0000000..8c7c5cc
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_page_history.jsp
@@ -0,0 +1,35 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<liferay-util:include page="/html/portlet/wiki/top_links.jsp" />
+
+<liferay-util:include page="/html/portlet/wiki/page_tabs.jsp">
+	<liferay-util:param name="tabs1" value="history" />
+</liferay-util:include>
+
+<liferay-util:include page="/html/portlet/wiki/page_tabs_history.jsp">
+	<liferay-util:param name="tabs3" value="versions" />
+</liferay-util:include>
+
+<liferay-util:include page="/html/portlet/wiki/page_iterator.jsp">
+	<liferay-util:param name="type" value="history" />
+</liferay-util:include>
+
+<%
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "versions"), null);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_page_incoming_links.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_page_incoming_links.jsp
new file mode 100644
index 0000000..ab5d56a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_page_incoming_links.jsp
@@ -0,0 +1,27 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<liferay-util:include page="/html/portlet/wiki/top_links.jsp" />
+
+<liferay-util:include page="/html/portlet/wiki/page_tabs.jsp">
+	<liferay-util:param name="tabs1" value="incoming-links" />
+</liferay-util:include>
+
+<liferay-util:include page="/html/portlet/wiki/page_iterator.jsp">
+	<liferay-util:param name="type" value="incoming_links" />
+</liferay-util:include>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_page_outgoing_links.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_page_outgoing_links.jsp
new file mode 100644
index 0000000..9d7b151
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_page_outgoing_links.jsp
@@ -0,0 +1,27 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<liferay-util:include page="/html/portlet/wiki/top_links.jsp" />
+
+<liferay-util:include page="/html/portlet/wiki/page_tabs.jsp">
+	<liferay-util:param name="tabs1" value="outgoing-links" />
+</liferay-util:include>
+
+<liferay-util:include page="/html/portlet/wiki/page_iterator.jsp">
+	<liferay-util:param name="type" value="outgoing_links" />
+</liferay-util:include>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_recent_changes.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_recent_changes.jsp
new file mode 100644
index 0000000..36195e1
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_recent_changes.jsp
@@ -0,0 +1,42 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<%
+WikiNode node = (WikiNode)request.getAttribute(WebKeys.WIKI_NODE);
+%>
+
+<liferay-util:include page="/html/portlet/wiki/top_links.jsp" />
+
+<liferay-ui:header
+	title="recent-changes"
+/>
+
+<liferay-util:include page="/html/portlet/wiki/page_iterator.jsp">
+	<liferay-util:param name="type" value="recent_changes" />
+</liferay-util:include>
+
+<br />
+
+<c:if test="<%= enableRSS %>">
+	<liferay-ui:rss
+		delta="<%= rssDelta %>"
+		displayStyle="<%= rssDisplayStyle %>"
+		feedType="<%= rssFeedType %>"
+		url='<%= themeDisplay.getPathMain() + "/wiki/rss?p_l_id=" + plid + "&nodeId=" + node.getNodeId() %>'
+	/>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_tagged_pages.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_tagged_pages.jsp
new file mode 100644
index 0000000..273266a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki/view_tagged_pages.jsp
@@ -0,0 +1,23 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki/init.jsp" %>
+
+<liferay-util:include page="/html/portlet/wiki/top_links.jsp" />
+
+<liferay-util:include page="/html/portlet/wiki/page_iterator.jsp">
+	<liferay-util:param name="type" value="tagged_pages" />
+</liferay-util:include>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki_display/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki_display/configuration.jsp
new file mode 100644
index 0000000..b91b92d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki_display/configuration.jsp
@@ -0,0 +1,97 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki_display/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+nodeId = ParamUtil.getLong(request, "nodeId", nodeId);
+
+List<WikiNode> nodes = WikiNodeServiceUtil.getNodes(scopeGroupId);
+
+boolean nodeInGroup = false;
+%>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+
+	<liferay-ui:error exception="<%= NoSuchNodeException.class %>" message="the-node-could-not-be-found" />
+
+	<aui:fieldset>
+		<c:choose>
+			<c:when test="<%= !nodes.isEmpty() %>">
+				<aui:select label="node" name="preferences--nodeId--">
+					<aui:option value="" />
+
+					<%
+					for (WikiNode node : nodes) {
+						node = node.toEscapedModel();
+
+						if (nodeId == node.getNodeId()) {
+							nodeInGroup = true;
+						}
+					%>
+
+						<aui:option label="<%= node.getName() %>" selected="<%= nodeId == node.getNodeId() %>" value="<%= node.getNodeId() %>" />
+
+					<%
+					}
+					%>
+
+				</aui:select>
+			</c:when>
+			<c:otherwise>
+				<div class="alert alert-info">
+					<liferay-ui:message key="there-are-no-available-nodes-for-selection" />
+				</div>
+			</c:otherwise>
+		</c:choose>
+
+		<c:choose>
+			<c:when test="<%= nodeInGroup %>">
+				<aui:select label="page" name="preferences--title--">
+
+					<%
+					int total = WikiPageLocalServiceUtil.getPagesCount(nodeId, true);
+
+					List pages = WikiPageLocalServiceUtil.getPages(nodeId, true, 0, total);
+
+					for (int i = 0; i < pages.size(); i++) {
+						WikiPage wikiPage = (WikiPage)pages.get(i);
+					%>
+
+						<aui:option label="<%= wikiPage.getTitle() %>" selected="<%= wikiPage.getTitle().equals(title) || (Validator.isNull(title) && wikiPage.getTitle().equals(WikiPageConstants.FRONT_PAGE)) %>" />
+
+					<%
+					}
+					%>
+
+				</aui:select>
+			</c:when>
+			<c:otherwise>
+				<aui:input name="preferences--title--" type="hidden" value="<%= WikiPageConstants.FRONT_PAGE %>" />
+			</c:otherwise>
+		</c:choose>
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button disabled="<%= nodes.isEmpty() %>" type="submit" />
+	</aui:button-row>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki_display/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki_display/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki_display/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki_display/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki_display/init.jsp
new file mode 100644
index 0000000..6decabb
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki_display/init.jsp
@@ -0,0 +1,31 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.wiki.NoSuchNodeException" %><%@
+page import="com.liferay.portlet.wiki.model.WikiNode" %><%@
+page import="com.liferay.portlet.wiki.model.WikiPage" %><%@
+page import="com.liferay.portlet.wiki.model.WikiPageConstants" %><%@
+page import="com.liferay.portlet.wiki.service.WikiNodeServiceUtil" %><%@
+page import="com.liferay.portlet.wiki.service.WikiPageLocalServiceUtil" %>
+
+<%
+long nodeId = GetterUtil.getLong(portletPreferences.getValue("nodeId", StringPool.BLANK));
+String title = GetterUtil.getString(portletPreferences.getValue("title", WikiPageConstants.FRONT_PAGE));
+%>
+
+<%@ include file="/html/portlet/wiki_display/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki_display/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki_display/view.jsp
new file mode 100644
index 0000000..c414b66
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/wiki_display/view.jsp
@@ -0,0 +1,19 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/wiki_display/init.jsp" %>
+
+<liferay-util:include page="/html/portlet/wiki/view.jsp" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definition_links/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definition_links/error.jsp
new file mode 100644
index 0000000..b7881ab
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definition_links/error.jsp
@@ -0,0 +1,24 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/workflow_definition_links/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definition_links/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definition_links/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definition_links/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definition_links/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definition_links/init.jsp
new file mode 100644
index 0000000..2a103fb
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definition_links/init.jsp
@@ -0,0 +1,23 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.NoSuchWorkflowDefinitionLinkException" %><%@
+page import="com.liferay.portal.kernel.workflow.WorkflowHandler" %><%@
+page import="com.liferay.portal.kernel.workflow.comparator.WorkflowComparatorFactoryUtil" %>
+
+<%@ include file="/html/portlet/workflow_definition_links/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definition_links/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definition_links/view.jsp
new file mode 100644
index 0000000..aa1d75e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definition_links/view.jsp
@@ -0,0 +1,28 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/workflow_definition_links/init.jsp" %>
+
+<c:choose>
+	<c:when test="<%= WorkflowEngineManagerUtil.isDeployed() %>">
+		<%@ include file="/html/portlet/workflow_definition_links/view_resources.jspf" %>
+	</c:when>
+	<c:otherwise>
+		<div class="alert alert-info">
+			<liferay-ui:message key="no-workflow-engine-is-deployed" />
+		</div>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definition_links/view_resources.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definition_links/view_resources.jspf
new file mode 100644
index 0000000..edf3eb3
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definition_links/view_resources.jspf
@@ -0,0 +1,197 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+long groupId = themeDisplay.getSiteGroupIdOrLiveGroupId();
+
+List<WorkflowHandler> workflowHandlers = null;
+
+if (portletName.equals(PortletKeys.WORKFLOW_DEFINITIONS)) {
+	groupId = WorkflowConstants.DEFAULT_GROUP_ID;
+
+	workflowHandlers = WorkflowHandlerRegistryUtil.getWorkflowHandlers();
+}
+else {
+	workflowHandlers = WorkflowHandlerRegistryUtil.getScopeableWorkflowHandlers();
+}
+
+List<WorkflowHandler> hiddenWorkflowHandlers = new ArrayList<WorkflowHandler>();
+
+Iterator<WorkflowHandler> itr = workflowHandlers.iterator();
+
+while (itr.hasNext()) {
+	WorkflowHandler workflowHandler = itr.next();
+
+	if (!workflowHandler.isVisible()) {
+		hiddenWorkflowHandlers.add(workflowHandler);
+
+		itr.remove();
+	}
+}
+
+List<WorkflowDefinition> workflowDefinitions = WorkflowDefinitionManagerUtil.getActiveWorkflowDefinitions(company.getCompanyId(), 0, 100, WorkflowComparatorFactoryUtil.getDefinitionNameComparator(true));
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/workflow_definition_links/view");
+portletURL.setParameter("tabs1", "default-configuration");
+%>
+
+<portlet:actionURL var="editWorkflowDefinitionLinkURL">
+	<portlet:param name="struts_action" value="/workflow_definition_links/edit_workflow_definition_link" />
+</portlet:actionURL>
+
+<aui:form action="<%= editWorkflowDefinitionLinkURL %>" method="post">
+	<aui:input name="redirect" type="hidden" value="<%= currentURL %>" />
+	<aui:input name="groupId" type="hidden" value="<%= groupId %>" />
+
+	<liferay-ui:search-container
+		iteratorURL="<%= portletURL %>"
+		total="<%= workflowHandlers.size() %>"
+	>
+		<liferay-ui:search-container-results
+			results="<%= ListUtil.subList(workflowHandlers, searchContainer.getStart(), searchContainer.getEnd()) %>"
+		/>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.kernel.workflow.WorkflowHandler"
+			modelVar="workflowHandler"
+		>
+
+			<liferay-ui:search-container-row-parameter
+				name="workflowHandler"
+				value="<%= workflowHandler %>"
+			/>
+
+			<liferay-ui:search-container-column-text
+				buffer="buffer"
+				name="resource"
+			>
+
+				<%
+				buffer.append("<img align=\"left\" border=\"0\" src=\"");
+				buffer.append(workflowHandler.getIconPath(liferayPortletRequest));
+				buffer.append("\" style=\"margin-right: 5px;\">");
+				buffer.append(ResourceActionsUtil.getModelResource(locale, workflowHandler.getClassName()));
+				%>
+
+			</liferay-ui:search-container-column-text>
+
+			<liferay-ui:search-container-column-text
+				name="workflow"
+			>
+				<aui:select label="" name='<%= "workflowDefinitionName@" + workflowHandler.getClassName() %>'>
+
+					<%
+					WorkflowDefinitionLink workflowDefinitionLink = null;
+
+					try {
+						if (portletName.equals(PortletKeys.WORKFLOW_DEFINITIONS)) {
+							workflowDefinitionLink = WorkflowDefinitionLinkLocalServiceUtil.getDefaultWorkflowDefinitionLink(company.getCompanyId(), workflowHandler.getClassName(), 0, 0);
+						}
+						else {
+							workflowDefinitionLink = WorkflowDefinitionLinkLocalServiceUtil.getWorkflowDefinitionLink(company.getCompanyId(), groupId, workflowHandler.getClassName(), 0, 0, true);
+						}
+					}
+					catch (NoSuchWorkflowDefinitionLinkException nswdle) {
+					}
+
+					String defaultOptionMessage = null;
+
+					if (!portletName.equals(PortletKeys.WORKFLOW_DEFINITIONS)) {
+						try {
+							WorkflowDefinitionLink defaultWorkflowDefinitionLink = WorkflowDefinitionLinkLocalServiceUtil.getDefaultWorkflowDefinitionLink(company.getCompanyId(), workflowHandler.getClassName(), 0, 0);
+
+							defaultOptionMessage = LanguageUtil.get(pageContext, "default") + StringPool.COLON + StringPool.SPACE + defaultWorkflowDefinitionLink.getWorkflowDefinitionName();
+						}
+						catch (NoSuchWorkflowDefinitionLinkException nswdle) {
+							defaultOptionMessage = LanguageUtil.get(pageContext, "default") + StringPool.COLON + StringPool.SPACE + LanguageUtil.get(pageContext, "no-workflow");
+						}
+					}
+					else {
+						defaultOptionMessage = LanguageUtil.get(pageContext, "no-workflow");
+					}
+					%>
+
+					<aui:option><%= defaultOptionMessage %></aui:option>
+
+					<%
+					for (WorkflowDefinition workflowDefinition : workflowDefinitions) {
+						boolean selected = false;
+
+						if ((workflowDefinitionLink != null) && workflowDefinitionLink.getWorkflowDefinitionName().equals(workflowDefinition.getName()) && (workflowDefinitionLink.getWorkflowDefinitionVersion() == workflowDefinition.getVersion())) {
+							selected = true;
+						}
+					%>
+
+						<aui:option label='<%= workflowDefinition.getName() + " (" + LanguageUtil.format(locale, "version-x", workflowDefinition.getVersion()) + ")" %>' selected="<%= selected %>" value="<%= workflowDefinition.getName() + StringPool.AT + workflowDefinition.getVersion() %>" />
+
+					<%
+					}
+					%>
+
+				</aui:select>
+			</liferay-ui:search-container-column-text>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+
+	<br />
+
+	<div class="alert alert-info">
+		<liferay-ui:message key="the-workflows-for-the-following-resources-can-be-configured-within-their-respective-portlets" />
+	</div>
+
+	<liferay-ui:search-container
+		iteratorURL="<%= portletURL %>"
+		total="<%= hiddenWorkflowHandlers.size() %>"
+	>
+		<liferay-ui:search-container-results
+			results="<%= ListUtil.subList(hiddenWorkflowHandlers, searchContainer.getStart(), searchContainer.getEnd()) %>"
+		/>
+
+		<liferay-ui:search-container-row
+			className="com.liferay.portal.kernel.workflow.WorkflowHandler"
+			modelVar="workflowHandler"
+		>
+			<liferay-ui:search-container-row-parameter
+				name="workflowHandler"
+				value="<%= workflowHandler %>"
+			/>
+
+			<liferay-ui:search-container-column-text
+				buffer="buffer"
+				name="resource"
+			>
+
+				<%
+				buffer.append("<img align=\"left\" border=\"0\" src=\"");
+				buffer.append(workflowHandler.getIconPath(liferayPortletRequest));
+				buffer.append("\" style=\"margin-right: 5px;\">");
+				buffer.append(ResourceActionsUtil.getModelResource(locale, workflowHandler.getClassName()));
+				%>
+
+			</liferay-ui:search-container-column-text>
+		</liferay-ui:search-container-row>
+
+		<liferay-ui:search-iterator />
+	</liferay-ui:search-container>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/css/.sass-cache/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/css/.sass-cache/main.css
new file mode 100644
index 0000000..e0aabaa
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/css/.sass-cache/main.css
@@ -0,0 +1,82 @@
+.lfr-asset-column-details .lfr-asset-title .lfr-asset-actions img {
+  margin-left: 5px; }
+.lfr-asset-column-details .lfr-asset-actions {
+  float: right;
+  font-size: 11px;
+  font-weight: normal;
+  margin-bottom: 3px;
+  margin-top: 0; }
+.lfr-asset-column-details .task-activity {
+  padding: 5px 5px 5px 25px; }
+.lfr-asset-column-details .task-activity-date {
+  font-weight: bold; }
+.lfr-asset-column-details .lfr-asset-assigned, .lfr-asset-column-details .lfr-asset-due-date, .lfr-asset-column-details .task-type-1, .lfr-asset-column-details .task-type-2, .lfr-asset-column-details .task-type-3, .lfr-asset-column-details .lfr-asset-date, .lfr-asset-column-details .lfr-asset-status {
+  background: url() no-repeat 0 50%; }
+.lfr-asset-column-details .lfr-asset-assigned {
+  background-image: url(@theme_image_path@/common/assign.png);
+  margin-right: 10px;
+  padding-left: 25px;
+  padding-right: 10px; }
+.lfr-asset-column-details h3.task-content-title {
+  margin-top: 0;
+  border-bottom: 1px solid #ddd; }
+.lfr-asset-column-details .task-panel-container .lfr-panel-content {
+  padding: 0.7em; }
+.lfr-asset-column-details .task-content-actions {
+  float: right; }
+.lfr-asset-column-details .lfr-asset-date {
+  background: url(@theme_image_path@/common/date.png) no-repeat 0 50%; }
+.lfr-asset-column-details .lfr-asset-due-date {
+  background-image: url(@theme_image_path@/common/time.png);
+  padding-left: 25px; }
+.lfr-asset-column-details .task-type-1 {
+  background-image: url(@theme_image_path@/common/assign.png); }
+.lfr-asset-column-details .task-type-2 {
+  background-image: url(@theme_image_path@/common/time.png); }
+.lfr-asset-column-details .task-type-3 {
+  background-image: url(@theme_image_path@/common/recent_changes.png); }
+.lfr-asset-column-details .lfr-asset-date {
+  margin-right: 10px;
+  overflow: auto;
+  padding-left: 25px;
+  padding-right: 10px; }
+.lfr-asset-column-details .lfr-asset-status {
+  background-image: url(@theme_image_path@/common/recent_changes.png);
+  padding-left: 25px;
+  padding-right: 10px; }
+.lfr-asset-column-details .asset-metadata {
+  border-top: 1px solid #DDD;
+  background-color: #EFEFEF;
+  padding: 0.5em;
+  margin: 2em 0 0; }
+  .lfr-asset-column-details .asset-metadata span {
+    display: inline; }
+.lfr-asset-column-details .metadata-author {
+  background: url(@theme_image_path@/portlet/edit_guest.png) no-repeat 0 0;
+  font-weight: bold;
+  margin-right: 10px;
+  padding-left: 25px;
+  padding-bottom: 5px; }
+.lfr-asset-column-details .metadata-entry {
+  clear: both;
+  color: #999;
+  display: block; }
+.lfr-asset-column-details .metadata-modified-date, .lfr-asset-column-details .metadata-create-date, .lfr-asset-column-details .metadata-publish-date, .lfr-asset-column-details .metadata-expiration-date {
+  background: url(@theme_image_path@/common/date.png) no-repeat 0 0;
+  color: #999;
+  margin-bottom: 1em;
+  padding-left: 25px; }
+.lfr-asset-column-details .metadata-priority {
+  background: url(@theme_image_path@/common/top.png) no-repeat 0 20%;
+  margin-right: 10px;
+  padding-left: 25px; }
+.lfr-asset-column-details .metadata-view-count {
+  margin-right: 10px; }
+.lfr-asset-column-details .vertical-separator {
+  border-right: 1px solid #CCC;
+  margin: 0 10px;
+  padding-top: 0.1em; }
+
+#workflowTasksPanelContainer {
+  border-width: 0; }
+
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/css/main.css b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/css/main.css
new file mode 100644
index 0000000..9226a39
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/css/main.css
@@ -0,0 +1,131 @@
+.lfr-asset-column-details {
+	.lfr-asset-title .lfr-asset-actions img {
+		margin-left: 5px;
+	}
+
+	.lfr-asset-actions {
+		float: right;
+		font-size: 11px;
+		font-weight: normal;
+		margin-bottom: 3px;
+		margin-top: 0;
+	}
+
+	.task-activity {
+		padding: 5px 5px 5px 25px;
+	}
+
+	.task-activity-date {
+		font-weight: bold;
+	}
+
+	.lfr-asset-assigned, .lfr-asset-due-date, .task-type-1, .task-type-2, .task-type-3, .lfr-asset-date, .lfr-asset-status {
+		background: url() no-repeat 0 50%;
+	}
+
+	.lfr-asset-assigned {
+		background-image: url(@theme_image_path@/common/assign.png);
+		margin-right: 10px;
+		padding-left: 25px;
+		padding-right: 10px;
+	}
+
+	h3.task-content-title {
+		margin-top: 0;
+		border-bottom: 1px solid #ddd;
+	}
+
+	.task-panel-container .lfr-panel-content {
+		padding: 0.7em;
+	}
+
+	.task-content-actions {
+		float: right;
+	}
+
+	.lfr-asset-date {
+		background: url(@theme_image_path@/common/date.png) no-repeat 0 50%;
+	}
+
+	.lfr-asset-due-date {
+		background-image: url(@theme_image_path@/common/time.png);
+		padding-left: 25px;
+	}
+
+	.task-type-1 {
+		background-image: url(@theme_image_path@/common/assign.png);
+	}
+
+	.task-type-2 {
+		background-image: url(@theme_image_path@/common/time.png);
+	}
+
+	.task-type-3 {
+		background-image: url(@theme_image_path@/common/recent_changes.png);
+	}
+
+	.lfr-asset-date {
+		margin-right: 10px;
+		overflow: auto;
+		padding-left: 25px;
+		padding-right: 10px;
+	}
+
+	.lfr-asset-status {
+		background-image: url(@theme_image_path@/common/recent_changes.png);
+		padding-left: 25px;
+		padding-right: 10px;
+	}
+
+	.asset-metadata {
+		border-top: 1px solid #DDD;
+		background-color: #EFEFEF;
+		padding: 0.5em;
+		margin: 2em 0 0;
+
+		span {
+			display: inline;
+		}
+	}
+
+	.metadata-author {
+		background: url(@theme_image_path@/portlet/edit_guest.png) no-repeat 0 0;
+		font-weight: bold;
+		margin-right: 10px;
+		padding-left: 25px;
+		padding-bottom: 5px;
+	}
+
+	.metadata-entry {
+		clear: both;
+		color: #999;
+		display: block;
+	}
+
+	.metadata-modified-date, .metadata-create-date, .metadata-publish-date, .metadata-expiration-date {
+		background: url(@theme_image_path@/common/date.png) no-repeat 0 0;
+		color: #999;
+		margin-bottom: 1em;
+		padding-left: 25px;
+	}
+
+	.metadata-priority {
+		background: url(@theme_image_path@/common/top.png) no-repeat 0 20%;
+		margin-right: 10px;
+		padding-left: 25px;
+	}
+
+	.metadata-view-count {
+		margin-right: 10px;
+	}
+
+	.vertical-separator {
+		border-right: 1px solid #CCC;
+		margin: 0 10px;
+		padding-top: 0.1em;
+	}
+}
+
+#workflowTasksPanelContainer {
+	border-width: 0;
+}
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/edit_workflow_definition.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/edit_workflow_definition.jsp
new file mode 100644
index 0000000..ecb2eff
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/edit_workflow_definition.jsp
@@ -0,0 +1,72 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/workflow_definitions/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+WorkflowDefinition workflowDefinition = (WorkflowDefinition)request.getAttribute(WebKeys.WORKFLOW_DEFINITION);
+
+String name = StringPool.BLANK;
+String version = StringPool.BLANK;
+
+if (workflowDefinition != null) {
+	name = workflowDefinition.getName();
+	version = String.valueOf(workflowDefinition.getVersion());
+}
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("struts_action", "/workflow_definitions/view");
+%>
+
+<liferay-ui:header
+	backURL="<%= redirect %>"
+	localizeTitle="<%= (workflowDefinition == null) %>"
+	title='<%= (workflowDefinition == null) ? "upload-definition" : workflowDefinition.getName() %>'
+/>
+
+<portlet:actionURL var="editWorkflowDefinitionURL">
+	<portlet:param name="struts_action" value="/workflow_definitions/edit_workflow_definition" />
+</portlet:actionURL>
+
+<aui:form action="<%= editWorkflowDefinitionURL %>" enctype="multipart/form-data" method="post">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= (workflowDefinition == null) ? Constants.ADD : Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+	<aui:input name="name" type="hidden" value="<%= name %>" />
+	<aui:input name="version" type="hidden" value="<%= version %>" />
+
+	<liferay-ui:error exception="<%= WorkflowDefinitionFileException.class %>" message="please-enter-a-valid-file" />
+
+	<aui:fieldset>
+		<aui:field-wrapper label="title">
+			<liferay-ui:input-localized name="title" xml='<%= BeanPropertiesUtil.getString(workflowDefinition, "title") %>' />
+		</aui:field-wrapper>
+
+		<aui:input name="file" type="file" />
+
+		<aui:button-row>
+			<aui:button type="submit" />
+
+			<aui:button href="<%= redirect %>" type="cancel" />
+		</aui:button-row>
+	</aui:fieldset>
+</aui:form>
+
+<%
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, (workflowDefinition == null) ? "upload-definition" : workflowDefinition.getName()), currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/error.jsp
new file mode 100644
index 0000000..5dfdc7d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/error.jsp
@@ -0,0 +1,26 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/workflow_definitions/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
+<liferay-ui:error exception="<%= RequiredWorkflowDefinitionException.class %>" message="you-cannot-deactivate-or-delete-this-definition" />
+<liferay-ui:error exception="<%= WorkflowException.class %>" message="an-error-occurred-in-the-workflow-engine" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/init.jsp
new file mode 100644
index 0000000..c98542b
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/init.jsp
@@ -0,0 +1,24 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.kernel.deploy.DeployManagerUtil" %><%@
+page import="com.liferay.portal.kernel.workflow.RequiredWorkflowDefinitionException" %><%@
+page import="com.liferay.portal.kernel.workflow.WorkflowDefinitionFileException" %><%@
+page import="com.liferay.portal.kernel.workflow.WorkflowException" %>
+
+<%@ include file="/html/portlet/workflow_definitions/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/toolbar.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/toolbar.jsp
new file mode 100644
index 0000000..58de3ee
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/toolbar.jsp
@@ -0,0 +1,70 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/workflow_definitions/init.jsp" %>
+
+<%
+String toolbarItem = ParamUtil.getString(request, "toolbarItem");
+%>
+
+<aui:nav-bar>
+	<aui:nav>
+		<portlet:renderURL var="viewDefinitionsURL">
+			<portlet:param name="struts_action" value="/workflow_definitions/view" />
+			<portlet:param name="tabs1" value="workflow-definitions" />
+		</portlet:renderURL>
+
+		<portlet:renderURL var="addWorkflowDefinitionURL">
+			<portlet:param name="struts_action" value="/workflow_definitions/edit_workflow_definition" />
+			<portlet:param name="tabs1" value="workflow-definitions" />
+			<portlet:param name="redirect" value="<%= viewDefinitionsURL %>" />
+			<portlet:param name="backURL" value="<%= viewDefinitionsURL %>" />
+		</portlet:renderURL>
+
+		<c:if test='<%= DeployManagerUtil.isDeployed("kaleo-designer-portlet") %>'>
+
+			<%
+			String taglibHREF = "javascript:Liferay.Util.getOpener()." + renderResponse.getNamespace() + "openKaleoDesigner('', '0', '', Liferay.Util.getWindowName());";
+			%>
+
+			<aui:nav-item href="<%= taglibHREF %>" iconCssClass="icon-plus" label='<%= LanguageUtil.format(pageContext, "add-new-x", "definition") %>' />
+		</c:if>
+		<aui:nav-item href="<%= addWorkflowDefinitionURL %>" iconCssClass="icon-upload" label="upload-definition" selected='<%= toolbarItem.equals("add") %>' />
+	</aui:nav>
+</aui:nav-bar>
+
+<c:if test='<%= DeployManagerUtil.isDeployed("kaleo-designer-portlet") %>'>
+	<aui:script>
+		Liferay.provide(
+			window,
+			'<portlet:namespace />openKaleoDesigner',
+			function(workflowDefinitionName, workflowDefinitionVersion, saveCallback, openerWindowName) {
+				Liferay.Util.openKaleoDesignerPortlet(
+					{
+						availablePropertyModels: 'Liferay.KaleoDesigner.AVAILABLE_PROPERTY_MODELS.KALEO_FORMS_EDIT',
+						name: workflowDefinitionName,
+						openerWindowName: openerWindowName,
+						portletResourceNamespace: '<%= renderResponse.getNamespace() %>',
+						saveCallback: saveCallback,
+						version: workflowDefinitionVersion,
+						versionLabel: '<liferay-ui:message key="version" />'
+					}
+				);
+			},
+			['aui-base']
+		);
+	</aui:script>
+</c:if>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/view.jsp
new file mode 100644
index 0000000..b427748
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/view.jsp
@@ -0,0 +1,57 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/workflow_definitions/init.jsp" %>
+
+<c:choose>
+	<c:when test="<%= WorkflowEngineManagerUtil.isDeployed() %>">
+
+		<%
+		String tabs1 = ParamUtil.getString(request, "tabs1", "definitions");
+
+		PortletURL portletURL = renderResponse.createRenderURL();
+
+		portletURL.setParameter("tabs1", tabs1);
+		%>
+
+		<liferay-ui:tabs
+			names="definitions,default-configuration,submissions"
+			portletURL="<%= portletURL %>"
+		/>
+
+		<c:choose>
+			<c:when test='<%= tabs1.equals("default-configuration") %>'>
+				<liferay-util:include page="/html/portlet/workflow_definition_links/view.jsp" />
+			</c:when>
+			<c:when test='<%= tabs1.equals("submissions") %>'>
+				<liferay-util:include page="/html/portlet/workflow_instances/view.jsp" />
+			</c:when>
+			<c:otherwise>
+				<%@ include file="/html/portlet/workflow_definitions/view_definitions.jspf" %>
+			</c:otherwise>
+		</c:choose>
+
+		<%
+		PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, tabs1), currentURL);
+		%>
+
+	</c:when>
+	<c:otherwise>
+		<div class="alert alert-info">
+			<liferay-ui:message key="no-workflow-engine-is-deployed" />
+		</div>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/view_definitions.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/view_definitions.jspf
new file mode 100644
index 0000000..e8276c8
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/view_definitions.jspf
@@ -0,0 +1,66 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+List<WorkflowDefinition> workflowDefinitions = WorkflowDefinitionManagerUtil.getWorkflowDefinitions(company.getCompanyId(), 0, 100, null);
+
+portletURL.setParameter("struts_action", "/workflow_definitions/view");
+%>
+
+<liferay-util:include page="/html/portlet/workflow_definitions/toolbar.jsp" />
+
+<liferay-ui:search-container
+	emptyResultsMessage="no-workflow-definitions-are-defined"
+	iteratorURL="<%= portletURL %>"
+	total="<%= workflowDefinitions.size() %>"
+>
+	<liferay-ui:search-container-results
+		results="<%= ListUtil.subList(workflowDefinitions, searchContainer.getStart(), searchContainer.getEnd()) %>"
+	/>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.kernel.workflow.WorkflowDefinition"
+		modelVar="workflowDefinition"
+	>
+
+		<liferay-ui:search-container-column-text
+			name="name"
+			value="<%= workflowDefinition.getName() %>"
+		/>
+
+		<liferay-ui:search-container-column-text
+			name="title"
+			value="<%= workflowDefinition.getTitle(themeDisplay.getLanguageId()) %>"
+		/>
+
+		<liferay-ui:search-container-column-text
+			name="version"
+			value="<%= String.valueOf(workflowDefinition.getVersion()) %>"
+		/>
+
+		<liferay-ui:search-container-column-text
+			name="active"
+			value='<%= workflowDefinition.isActive() ? LanguageUtil.get(locale, "yes") : LanguageUtil.get(locale, "no") %>'
+		/>
+
+		<liferay-ui:search-container-column-jsp
+			align="right"
+			path="/html/portlet/workflow_definitions/workflow_definition_action.jsp"
+		/>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/workflow_definition_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/workflow_definition_action.jsp
new file mode 100644
index 0000000..0db0b1a
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_definitions/workflow_definition_action.jsp
@@ -0,0 +1,85 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/workflow_definitions/init.jsp" %>
+
+<%
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+WorkflowDefinition workflowDefinition = (WorkflowDefinition)row.getObject();
+%>
+
+<liferay-ui:icon-menu>
+	<portlet:renderURL var="editURL">
+		<portlet:param name="struts_action" value="/workflow_definitions/edit_workflow_definition" />
+		<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UPDATE %>" />
+		<portlet:param name="redirect" value="<%= currentURL %>" />
+		<portlet:param name="name" value="<%= workflowDefinition.getName() %>" />
+		<portlet:param name="version" value="<%= String.valueOf(workflowDefinition.getVersion()) %>" />
+	</portlet:renderURL>
+
+	<liferay-ui:icon
+		image="post"
+		message='<%= LanguageUtil.format(pageContext, "add-new-x", "file") %>'
+		url="<%= editURL %>"
+	/>
+
+	<c:if test='<%= DeployManagerUtil.isDeployed("kaleo-designer-portlet") %>'>
+
+		<%
+		String taglibOnClick = "javascript:Liferay.Util.getOpener()." + renderResponse.getNamespace() + "openKaleoDesigner('" + workflowDefinition.getName() + "', '" + workflowDefinition.getVersion() + "', '', Liferay.Util.getWindowName());";
+		%>
+
+		<liferay-ui:icon
+			image="edit"
+			url="<%= taglibOnClick %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= !workflowDefinition.isActive() %>">
+		<portlet:actionURL var="restoreWorkflowDefinitionURL">
+			<portlet:param name="struts_action" value="/workflow_definitions/edit_workflow_definition" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.RESTORE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="name" value="<%= workflowDefinition.getName() %>" />
+			<portlet:param name="version" value="<%= String.valueOf(workflowDefinition.getVersion()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon
+			image="activate"
+			url="<%= restoreWorkflowDefinitionURL %>"
+		/>
+	</c:if>
+
+	<portlet:actionURL var="deleteURL">
+		<portlet:param name="struts_action" value="/workflow_definitions/edit_workflow_definition" />
+		<portlet:param name="<%= Constants.CMD %>" value="<%= workflowDefinition.isActive() ? Constants.DEACTIVATE : Constants.DELETE %>" />
+		<portlet:param name="redirect" value="<%= currentURL %>" />
+		<portlet:param name="name" value="<%= workflowDefinition.getName() %>" />
+		<portlet:param name="version" value="<%= String.valueOf(workflowDefinition.getVersion()) %>" />
+	</portlet:actionURL>
+
+	<c:choose>
+		<c:when test="<%= workflowDefinition.isActive() %>">
+			<liferay-ui:icon-deactivate url="<%= deleteURL %>" />
+		</c:when>
+		<c:otherwise>
+			<liferay-ui:icon-delete
+				url="<%= deleteURL %>"
+			/>
+		</c:otherwise>
+	</c:choose>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/edit_workflow_instance.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/edit_workflow_instance.jsp
new file mode 100644
index 0000000..ece55fc
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/edit_workflow_instance.jsp
@@ -0,0 +1,274 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/workflow_instances/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+
+WorkflowInstance workflowInstance = (WorkflowInstance)request.getAttribute(WebKeys.WORKFLOW_INSTANCE);
+
+Map<String, Serializable> workflowContext = workflowInstance.getWorkflowContext();
+
+String className = (String)workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_NAME);
+long classPK = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK));
+
+WorkflowHandler workflowHandler = WorkflowHandlerRegistryUtil.getWorkflowHandler(className);
+
+AssetRenderer assetRenderer = workflowHandler.getAssetRenderer(classPK);
+AssetRendererFactory assetRendererFactory = workflowHandler.getAssetRendererFactory();
+
+AssetEntry assetEntry = null;
+
+if (assetRenderer != null) {
+	assetEntry = assetRendererFactory.getAssetEntry(assetRendererFactory.getClassName(), assetRenderer.getClassPK());
+}
+
+String headerTitle = LanguageUtil.get(pageContext, workflowInstance.getWorkflowDefinitionName());
+
+if (assetEntry != null) {
+	headerTitle = headerTitle.concat(StringPool.COLON + StringPool.SPACE + assetRenderer.getTitle(locale));
+}
+
+PortletURL viewFullContentURL = renderResponse.createRenderURL();
+
+viewFullContentURL.setParameter("struts_action", "/workflow_tasks/view_content");
+viewFullContentURL.setParameter("redirect", currentURL);
+
+if (assetEntry != null) {
+	viewFullContentURL.setParameter("assetEntryId", String.valueOf(assetEntry.getEntryId()));
+	viewFullContentURL.setParameter("assetEntryVersionId", String.valueOf(classPK));
+}
+
+viewFullContentURL.setParameter("type", assetRendererFactory.getType());
+viewFullContentURL.setParameter("showEditURL", Boolean.FALSE.toString());
+viewFullContentURL.setParameter("workflowAssetPreview", Boolean.TRUE.toString());
+
+request.setAttribute(WebKeys.WORKFLOW_ASSET_PREVIEW, Boolean.TRUE);
+%>
+
+<portlet:renderURL var="backURL">
+	<portlet:param name="struts_action" value="/workflow_instances/view" />
+</portlet:renderURL>
+
+<liferay-ui:header
+	backURL="<%= backURL.toString() %>"
+	localizeTitle="<%= false %>"
+	title="<%= headerTitle %>"
+/>
+
+<aui:row>
+	<aui:col cssClass="lfr-asset-column lfr-asset-column-details" width="<%= 75 %>">
+		<aui:row>
+			<aui:col width="<%= 60 %>">
+				<div class="lfr-asset-status">
+					<aui:field-wrapper label="state">
+						<liferay-ui:input-resource url="<%= LanguageUtil.get(pageContext, workflowInstance.getState()) %>" />
+					</aui:field-wrapper>
+				</div>
+			</aui:col>
+
+			<aui:col width="<%= 33 %>">
+				<div class="lfr-asset-date">
+					<aui:field-wrapper label="end-date">
+						<liferay-ui:input-resource url='<%= (workflowInstance.getEndDate() == null) ? LanguageUtil.get(pageContext, "never") : dateFormatDateTime.format(workflowInstance.getEndDate()) %>' />
+					</aui:field-wrapper>
+				</div>
+			</aui:col>
+		</aui:row>
+
+		<liferay-ui:panel-container cssClass="task-panel-container" extended="<%= true %>" id="preview">
+
+			<c:if test="<%= assetRenderer != null %>">
+				<liferay-ui:panel defaultState="open" title='<%= LanguageUtil.format(pageContext, "preview-of-x", ResourceActionsUtil.getModelResource(locale, className)) %>'>
+					<div class="task-content-actions">
+						<liferay-ui:icon-list>
+							<c:if test="<%= assetRenderer.hasViewPermission(permissionChecker) %>">
+								<liferay-ui:icon image="view" method="get" url="<%= viewFullContentURL.toString() %>" />
+							</c:if>
+						</liferay-ui:icon-list>
+					</div>
+
+					<h3 class="task-content-title">
+						<img alt="" src="<%= workflowHandler.getIconPath(liferayPortletRequest) %>" /> <%= HtmlUtil.escape(workflowHandler.getTitle(classPK, locale)) %>
+					</h3>
+
+					<%
+					String path = workflowHandler.render(classPK, renderRequest, renderResponse, AssetRenderer.TEMPLATE_ABSTRACT);
+
+					request.setAttribute(WebKeys.ASSET_RENDERER, assetRenderer);
+					request.setAttribute(WebKeys.ASSET_PUBLISHER_ABSTRACT_LENGTH, 200);
+					%>
+
+					<c:choose>
+						<c:when test="<%= path == null %>">
+							<%= workflowHandler.getSummary(classPK, locale) %>
+						</c:when>
+						<c:otherwise>
+							<liferay-util:include page="<%= path %>" portletId="<%= assetRendererFactory.getPortletId() %>" />
+						</c:otherwise>
+					</c:choose>
+
+					<%
+					String[] metadataFields = new String[] {"author", "categories", "tags"};
+					%>
+
+					<div class="asset-metadata">
+						<%@ include file="/html/portlet/asset_publisher/asset_metadata.jspf" %>
+					</div>
+				</liferay-ui:panel>
+			</c:if>
+
+			<%
+			List<WorkflowTask> workflowTasks = null;
+
+			if (portletName.equals(PortletKeys.WORKFLOW_DEFINITIONS)) {
+				workflowTasks = WorkflowTaskManagerUtil.getWorkflowTasksByWorkflowInstance(company.getCompanyId(), null, workflowInstance.getWorkflowInstanceId(), null, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
+			}
+			else {
+				workflowTasks = WorkflowTaskManagerUtil.getWorkflowTasksByWorkflowInstance(company.getCompanyId(), user.getUserId(), workflowInstance.getWorkflowInstanceId(), false, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
+			}
+			%>
+
+			<c:if test="<%= !workflowTasks.isEmpty() %>">
+				<liferay-ui:panel defaultState="open" title="tasks">
+
+					<%
+					PortletURL portletURL = renderResponse.createRenderURL();
+					%>
+
+					<liferay-ui:search-container
+						emptyResultsMessage="there-are-no-tasks"
+						iteratorURL="<%= portletURL %>"
+					>
+						<liferay-ui:search-container-results
+							results="<%= workflowTasks %>"
+						/>
+
+						<liferay-ui:search-container-row
+							className="com.liferay.portal.kernel.workflow.WorkflowTask"
+							modelVar="workflowTask"
+							stringKey="<%= true %>"
+						>
+							<liferay-ui:search-container-row-parameter
+								name="workflowTask"
+								value="<%= workflowTask %>"
+							/>
+
+							<liferay-ui:search-container-column-text
+								buffer="buffer"
+								name="task"
+							>
+
+								<%
+								buffer.append("<span class=\"task-name\" id=\"");
+								buffer.append(workflowTask.getWorkflowTaskId());
+								buffer.append("\">");
+								buffer.append(LanguageUtil.get(pageContext, workflowTask.getName()));
+								buffer.append("</span>");
+								%>
+
+							</liferay-ui:search-container-column-text>
+
+							<liferay-ui:search-container-column-text
+								buffer="buffer"
+								name="due-date"
+							>
+
+								<%
+								if (workflowTask.getDueDate() == null) {
+									buffer.append(LanguageUtil.get(pageContext, "never"));
+								}
+								else {
+									buffer.append(dateFormatDateTime.format(workflowTask.getDueDate()));
+								}
+								%>
+
+							</liferay-ui:search-container-column-text>
+
+							<liferay-ui:search-container-column-text
+								name="completed"
+								value='<%= workflowTask.isCompleted() ? LanguageUtil.get(pageContext, "yes") : LanguageUtil.get(pageContext, "no") %>'
+							/>
+
+							<liferay-ui:search-container-column-jsp
+								align="right"
+								path="/html/portlet/workflow_instances/workflow_task_action.jsp"
+							/>
+						</liferay-ui:search-container-row>
+						<liferay-ui:search-iterator />
+					</liferay-ui:search-container>
+				</liferay-ui:panel>
+			</c:if>
+
+			<liferay-ui:panel defaultState="closed" title="activities">
+
+				<%
+				List<Integer> logTypes = new ArrayList<Integer>();
+
+				logTypes.add(WorkflowLog.TASK_ASSIGN);
+				logTypes.add(WorkflowLog.TASK_COMPLETION);
+				logTypes.add(WorkflowLog.TASK_UPDATE);
+				logTypes.add(WorkflowLog.TRANSITION);
+
+				List<WorkflowLog> workflowLogs = WorkflowLogManagerUtil.getWorkflowLogsByWorkflowInstance(company.getCompanyId(), workflowInstance.getWorkflowInstanceId(), logTypes, QueryUtil.ALL_POS, QueryUtil.ALL_POS, WorkflowComparatorFactoryUtil.getLogCreateDateComparator(true));
+				%>
+
+				<%@ include file="/html/portlet/workflow_instances/workflow_logs.jspf" %>
+			</liferay-ui:panel>
+
+			<liferay-ui:panel title="comments">
+				<portlet:actionURL var="discussionURL">
+					<portlet:param name="struts_action" value="/workflow_instances/edit_workflow_instance_discussion" />
+				</portlet:actionURL>
+
+				<liferay-ui:discussion
+					className="<%= WorkflowInstance.class.getName() %>"
+					classPK="<%= workflowInstance.getWorkflowInstanceId() %>"
+					formAction="<%= discussionURL %>"
+					formName="fm1"
+					ratingsEnabled="<%= false %>"
+					redirect="<%= currentURL %>"
+					userId="<%= user.getUserId() %>"
+				/>
+			</liferay-ui:panel>
+		</liferay-ui:panel-container>
+	</aui:col>
+
+	<aui:col cssClass="lfr-asset-column lfr-asset-column-actions" last="<%= true %>" width="<%= 25 %>">
+		<div class="lfr-asset-summary">
+			<liferay-ui:icon
+				cssClass="lfr-asset-avatar"
+				image="../file_system/large/task"
+				message="download"
+			/>
+
+			<div class="lfr-asset-name">
+				<%= workflowInstance.getWorkflowDefinitionName() %>
+			</div>
+		</div>
+
+		<%
+		request.removeAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+		%>
+
+		<liferay-util:include page="/html/portlet/workflow_instances/workflow_instance_action.jsp" />
+	</aui:col>
+</aui:row>
+
+<%
+PortalUtil.addPortletBreadcrumbEntry(request, headerTitle, currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/error.jsp
new file mode 100644
index 0000000..a3a5880
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/error.jsp
@@ -0,0 +1,25 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/workflow_instances/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
+<liferay-ui:error exception="<%= WorkflowException.class %>" message="an-unexpected-error-occurred" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/init.jsp
new file mode 100644
index 0000000..26d637d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/init.jsp
@@ -0,0 +1,45 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.kernel.workflow.WorkflowException" %><%@
+page import="com.liferay.portal.kernel.workflow.WorkflowHandler" %><%@
+page import="com.liferay.portal.kernel.workflow.WorkflowHandlerUtil" %><%@
+page import="com.liferay.portal.kernel.workflow.WorkflowInstance" %><%@
+page import="com.liferay.portal.kernel.workflow.WorkflowInstanceManagerUtil" %><%@
+page import="com.liferay.portal.kernel.workflow.WorkflowLog" %><%@
+page import="com.liferay.portal.kernel.workflow.WorkflowLogManagerUtil" %><%@
+page import="com.liferay.portal.kernel.workflow.WorkflowTask" %><%@
+page import="com.liferay.portal.kernel.workflow.WorkflowTaskManagerUtil" %><%@
+page import="com.liferay.portal.kernel.workflow.comparator.WorkflowComparatorFactoryUtil" %>
+
+<%
+Format dateFormatDate = FastDateFormatFactoryUtil.getDate(locale, timeZone);
+Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(locale, timeZone);
+%>
+
+<%@ include file="/html/portlet/workflow_instances/init-ext.jsp" %>
+
+<%!
+private boolean _isAssignedToUser(WorkflowTask workflowTask, User user) {
+	if (workflowTask.getAssigneeUserId() == user.getUserId()) {
+		return true;
+	}
+
+	return false;
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/view.jsp
new file mode 100644
index 0000000..7dbce3e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/view.jsp
@@ -0,0 +1,28 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/workflow_instances/init.jsp" %>
+
+<c:choose>
+	<c:when test="<%= WorkflowEngineManagerUtil.isDeployed() %>">
+		<%@ include file="/html/portlet/workflow_instances/view_workflow_instances.jspf" %>
+	</c:when>
+	<c:otherwise>
+		<div class="alert alert-info">
+			<liferay-ui:message key="no-workflow-engine-is-deployed" />
+		</div>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/view_workflow_instances.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/view_workflow_instances.jspf
new file mode 100644
index 0000000..1b1608e
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/view_workflow_instances.jspf
@@ -0,0 +1,63 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+String tabs2 = ParamUtil.getString(request, "tabs2", "pending");
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("tabs1", "submissions");
+portletURL.setParameter("tabs2", tabs2);
+%>
+
+<liferay-ui:tabs
+	names="pending,completed"
+	param="tabs2"
+	portletURL="<%= portletURL %>"
+/>
+
+<%
+try {
+	boolean completedInstances = true;
+
+	if (tabs2.equals("pending")) {
+		completedInstances = false;
+	}
+%>
+
+	<%@ include file="/html/portlet/workflow_instances/workflow_instances.jspf" %>
+
+<%
+}
+catch (Exception e) {
+	if (_log.isWarnEnabled()) {
+		_log.warn("Error retrieving workflow instances", e);
+	}
+%>
+
+	<div class="alert alert-error">
+		<liferay-ui:message key="an-error-occurred-while-retrieving-the-list-of-instances" />
+	</div>
+
+<%
+}
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, tabs2), currentURL);
+%>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.workflow_instances.view_workflow_instances_jspf");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/workflow_instance_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/workflow_instance_action.jsp
new file mode 100644
index 0000000..9ee3b3d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/workflow_instance_action.jsp
@@ -0,0 +1,53 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/workflow_tasks/init.jsp" %>
+
+<%
+String randomId = StringUtil.randomId();
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+WorkflowInstance workflowInstance = null;
+
+if (row != null) {
+	workflowInstance = (WorkflowInstance)row.getParameter("workflowInstance");
+}
+else {
+	workflowInstance = (WorkflowInstance)request.getAttribute(WebKeys.WORKFLOW_INSTANCE);
+}
+%>
+
+<liferay-ui:icon-menu showExpanded="<%= (row == null) %>" showWhenSingleIcon="<%= (row == null) %>">
+	<c:if test="<%= !workflowInstance.isComplete() %>">
+		<portlet:renderURL var="redirectURL">
+			<portlet:param name="struts_action" value="/workflow_instances/view" />
+		</portlet:renderURL>
+
+		<portlet:actionURL var="deleteURL">
+			<portlet:param name="struts_action" value="/workflow_instances/edit_workflow_instance" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
+			<portlet:param name="redirect" value="<%= redirectURL %>" />
+			<portlet:param name="workflowInstanceId" value="<%= StringUtil.valueOf(workflowInstance.getWorkflowInstanceId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon
+			image="undo"
+			message="withdraw-submission"
+			url="<%= deleteURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/workflow_instances.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/workflow_instances.jspf
new file mode 100644
index 0000000..a81c745
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/workflow_instances.jspf
@@ -0,0 +1,149 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<liferay-ui:search-container
+	iteratorURL="<%= portletURL %>"
+>
+
+	<%
+	boolean allInstances = false;
+	%>
+
+	<liferay-ui:search-container-results>
+		<%@ include file="/html/portlet/workflow_instances/workflow_search_results.jspf" %>
+	</liferay-ui:search-container-results>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.kernel.workflow.WorkflowInstance"
+		modelVar="workflowInstance"
+		stringKey="<%= true %>"
+	>
+		<liferay-ui:search-container-row-parameter
+			name="workflowInstance"
+			value="<%= workflowInstance %>"
+		/>
+
+		<%
+		Map<String, Serializable> workflowContext = workflowInstance.getWorkflowContext();
+
+		String className = (String)workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_NAME);
+		long classPK = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK));
+
+		WorkflowHandler workflowHandler = WorkflowHandlerRegistryUtil.getWorkflowHandler(className);
+		%>
+
+		<portlet:renderURL var="rowURL">
+			<portlet:param name="struts_action" value="/workflow_instance/edit_workflow_instance" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="workflowInstanceId" value="<%= String.valueOf(workflowInstance.getWorkflowInstanceId()) %>" />
+		</portlet:renderURL>
+
+		<liferay-ui:search-container-column-text
+			buffer="buffer"
+			href="<%= rowURL %>"
+			name="definition"
+		>
+
+			<%
+			buffer.append(LanguageUtil.get(pageContext, workflowInstance.getWorkflowDefinitionName()));
+			%>
+
+		</liferay-ui:search-container-column-text>
+
+		<liferay-ui:search-container-column-text
+			buffer="buffer"
+			href="<%= rowURL %>"
+			name="asset-title"
+		>
+
+			<%
+			buffer.append(HtmlUtil.escape(workflowHandler.getTitle(classPK, locale)));
+			%>
+
+		</liferay-ui:search-container-column-text>
+
+		<liferay-ui:search-container-column-text
+			buffer="buffer"
+			href="<%= rowURL %>"
+			name="asset-type"
+		>
+
+			<%
+			buffer.append(workflowHandler.getType(locale));
+			%>
+
+		</liferay-ui:search-container-column-text>
+
+		<liferay-ui:search-container-column-text
+			buffer="buffer"
+			href="<%= rowURL %>"
+			name="status"
+		>
+
+			<%
+			buffer.append(LanguageUtil.get(pageContext, workflowInstance.getState()));
+			%>
+
+		</liferay-ui:search-container-column-text>
+
+		<liferay-ui:search-container-column-text
+			buffer="buffer"
+			href="<%= rowURL %>"
+			name="last-activity-date"
+		>
+
+			<%
+			List<WorkflowLog> workflowLogs = WorkflowLogManagerUtil.getWorkflowLogsByWorkflowInstance(company.getCompanyId(), workflowInstance.getWorkflowInstanceId(), null, 0, 1, WorkflowComparatorFactoryUtil.getLogCreateDateComparator());
+
+			if (workflowLogs.isEmpty()) {
+				buffer.append(LanguageUtil.get(pageContext, "never"));
+			}
+			else {
+				WorkflowLog workflowLog = workflowLogs.get(0);
+
+				buffer.append(dateFormatDateTime.format(workflowLog.getCreateDate()));
+			}
+			%>
+
+		</liferay-ui:search-container-column-text>
+
+		<liferay-ui:search-container-column-text
+			buffer="buffer"
+			href="<%= rowURL %>"
+			name="end-date"
+		>
+
+			<%
+			if (workflowInstance.getEndDate() == null) {
+				buffer.append(LanguageUtil.get(pageContext, "never"));
+			}
+			else {
+				buffer.append(dateFormatDateTime.format(workflowInstance.getEndDate()));
+			}
+			%>
+
+		</liferay-ui:search-container-column-text>
+
+		<c:if test='<%= !allInstances && !tabs2.equals("completed") %>'>
+			<liferay-ui:search-container-column-jsp
+				align="right"
+				path="/html/portlet/workflow_instances/workflow_instance_action.jsp"
+			/>
+		</c:if>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/workflow_logs.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/workflow_logs.jspf
new file mode 100644
index 0000000..fc97f91
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/workflow_logs.jspf
@@ -0,0 +1,101 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+for (WorkflowLog workflowLog : workflowLogs) {
+	Role curRole = null;
+	User curUser = null;
+	String actorName = null;
+
+	if (workflowLog.getRoleId() != 0) {
+		curRole = RoleLocalServiceUtil.getRole(workflowLog.getRoleId());
+		actorName = curRole.getDescriptiveName();
+	}
+	else if (workflowLog.getUserId() != 0) {
+		curUser = UserLocalServiceUtil.getUser(workflowLog.getUserId());
+		actorName = curUser.getFullName();
+	}
+%>
+
+	<div class="task-activity task-type-<%= workflowLog.getType() %>">
+		<div class="task-activity-date">
+			<%= dateFormatDateTime.format(workflowLog.getCreateDate()) %>
+		</div>
+
+		<c:choose>
+			<c:when test="<%= workflowLog.getType() == WorkflowLog.TASK_COMPLETION %>">
+				<div>
+					<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), workflowLog.getState()} %>" key="x-completed-the-task-x" />
+				</div>
+			</c:when>
+			<c:when test="<%= workflowLog.getType() == WorkflowLog.TASK_UPDATE %>">
+				<div>
+					<liferay-ui:message arguments="<%= HtmlUtil.escape(actorName) %>" key="x-updated-the-due-date" />
+				</div>
+			</c:when>
+			<c:when test="<%= workflowLog.getType() == WorkflowLog.TRANSITION %>">
+				<div>
+					<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), workflowLog.getPreviousState(), workflowLog.getState()} %>" key="x-changed-the-state-from-x-to-x" />
+				</div>
+			</c:when>
+			<c:otherwise>
+				<c:choose>
+					<c:when test="<%= (curUser != null) && (workflowLog.getAuditUserId() == curUser.getUserId()) %>">
+						<div>
+							<liferay-ui:message arguments="<%= HtmlUtil.escape(curUser.getFullName()) %>" key='<%= curUser.isMale() ? "x-assigned-the-task-to-himself" : "x-assigned-the-task-to-herself" %>' />
+						</div>
+					</c:when>
+					<c:otherwise>
+
+						<%
+						if (curRole == null) {
+							String assignerName = PortalUtil.getUserName(workflowLog.getAuditUserId(), StringPool.BLANK);
+						%>
+
+							<div>
+								<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(assignerName), HtmlUtil.escape(actorName)} %>" key="x-assigned-the-task-to-x" />
+
+								<c:if test="<%= workflowLog.getPreviousUserId() != 0 %>">
+									<liferay-ui:message arguments="<%= PortalUtil.getUserName(workflowLog.getPreviousUserId(), StringPool.BLANK) %>" key="previous-assignee-was-x" />
+								</c:if>
+							</div>
+
+						<%
+						}
+						else {
+						%>
+
+							<div>
+								<liferay-ui:message arguments="<%= HtmlUtil.escape(actorName) %>" key="task-initially-assigned-to-the-x-role" />
+							</div>
+
+						<%
+						}
+						%>
+
+					</c:otherwise>
+				</c:choose>
+			</c:otherwise>
+		</c:choose>
+
+		<div>
+			<%= HtmlUtil.escape(workflowLog.getComment()) %>
+		</div>
+	</div>
+
+<%
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/workflow_search_results.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/workflow_search_results.jspf
new file mode 100644
index 0000000..ef83cdd
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/workflow_search_results.jspf
@@ -0,0 +1,52 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+String[] assetTypes = WorkflowHandlerUtil.getSearchableAssetTypes();
+
+if (portletName.equals(PortletKeys.WORKFLOW_DEFINITIONS) || portletName.equals(PortletKeys.WORKFLOW_INSTANCES)) {
+	if (completedInstances) {
+		searchContainer.setEmptyResultsMessage("there-are-no-completed-instances");
+	}
+	else {
+		searchContainer.setEmptyResultsMessage("there-are-no-pending-instances");
+	}
+
+	allInstances = true;
+
+	total = WorkflowInstanceManagerUtil.getWorkflowInstanceCount(company.getCompanyId(), null, assetTypes, completedInstances);
+
+	searchContainer.setTotal(total);
+
+	results = WorkflowInstanceManagerUtil.getWorkflowInstances(company.getCompanyId(), null, assetTypes, completedInstances, searchContainer.getStart(), searchContainer.getEnd(), WorkflowComparatorFactoryUtil.getInstanceStartDateComparator());
+}
+else {
+	if (completedInstances) {
+		searchContainer.setEmptyResultsMessage("there-are-no-completed-instances-started-by-me");
+	}
+	else {
+		searchContainer.setEmptyResultsMessage("there-are-no-pending-instances-started-by-me");
+	}
+
+	total = WorkflowInstanceManagerUtil.getWorkflowInstanceCount(company.getCompanyId(), user.getUserId(), assetTypes, completedInstances);
+
+	searchContainer.setTotal(total);
+
+	results = WorkflowInstanceManagerUtil.getWorkflowInstances(company.getCompanyId(), user.getUserId(), assetTypes, completedInstances, searchContainer.getStart(), searchContainer.getEnd(), WorkflowComparatorFactoryUtil.getInstanceStartDateComparator());
+}
+
+searchContainer.setResults(results);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/workflow_task_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/workflow_task_action.jsp
new file mode 100644
index 0000000..a262294
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_instances/workflow_task_action.jsp
@@ -0,0 +1,148 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/workflow_instances/init.jsp" %>
+
+<%
+String randomId = StringUtil.randomId();
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+WorkflowTask workflowTask = (WorkflowTask)row.getObject();
+%>
+
+<liferay-ui:icon-menu>
+	<c:if test="<%= portletName.equals(PortletKeys.WORKFLOW_DEFINITIONS) && !workflowTask.isCompleted() && !_isAssignedToUser(workflowTask, user) %>">
+		<portlet:actionURL var="assignToMeURL">
+			<portlet:param name="struts_action" value="/workflow_instances/edit_workflow_instance_task" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ASSIGN %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="workflowTaskId" value="<%= String.valueOf(workflowTask.getWorkflowTaskId()) %>" />
+			<portlet:param name="assigneeUserId" value="<%= String.valueOf(user.getUserId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon
+			cssClass='<%= "workflow-task-" + randomId + " task-assign-to-me-link" %>'
+			image="assign"
+			message="assign-to-me"
+			method="get"
+			url="<%= assignToMeURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= !workflowTask.isCompleted() && _isAssignedToUser(workflowTask, user) %>">
+
+		<%
+		List<String> transitionNames = WorkflowTaskManagerUtil.getNextTransitionNames(company.getCompanyId(), user.getUserId(), workflowTask.getWorkflowTaskId());
+
+		for (String transitionName : transitionNames) {
+			String message = "proceed";
+
+			if (Validator.isNotNull(transitionName)) {
+				message = transitionName;
+			}
+		%>
+
+			<portlet:actionURL var="editURL">
+				<portlet:param name="struts_action" value="/workflow_instances/edit_workflow_instance_task" />
+				<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.SAVE %>" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowTask.getWorkflowTaskId()) %>" />
+				<portlet:param name="assigneeUserId" value="<%= StringUtil.valueOf(workflowTask.getAssigneeUserId()) %>" />
+
+				<c:if test="<%= transitionName != null %>">
+					<portlet:param name="transitionName" value="<%= transitionName %>" />
+				</c:if>
+			</portlet:actionURL>
+
+			<liferay-ui:icon
+				cssClass='<%= "workflow-task-" + randomId + " task-change-status-link" %>'
+				image="../aui/random"
+				message="<%= message %>"
+				method="get"
+				url="<%= editURL %>"
+			/>
+
+		<%
+		}
+		%>
+
+	</c:if>
+</liferay-ui:icon-menu>
+
+<div class="hide" id="<%= randomId %>updateComments">
+	<aui:input cols="55" name="comment" rows="10" type="textarea" />
+</div>
+
+<aui:script use="aui-io-plugin-deprecated,liferay-util-window">
+	var showPopup = function(url, title) {
+		var form = A.Node.create('<form />');
+
+		form.setAttribute('action', url);
+		form.setAttribute('method', 'POST');
+
+		var comments = A.one('#<%= randomId %>updateComments');
+
+		if (comments) {
+			form.append(comments);
+
+			comments.show();
+		}
+
+		var dialog = Liferay.Util.Window.getWindow(
+			{
+				dialog: {
+					bodyContent: form,
+					height: 420,
+					toolbars: {
+						footer: [
+							{
+								label: '<%= UnicodeLanguageUtil.get(pageContext, "ok") %>',
+								on: {
+									click: function() {
+										submitForm(form);
+									}
+								}
+							},
+							{
+								label: '<%= UnicodeLanguageUtil.get(pageContext, "cancel") %>',
+								on: {
+									click: function() {
+										dialog.hide();
+									}
+								}
+							}
+						]
+					},
+					width: 350
+				},
+				title: title
+			}
+		);
+	};
+
+	A.all('.workflow-task-<%= randomId %> a').on(
+		'click',
+		function(event) {
+			event.preventDefault();
+
+			var icon = event.currentTarget;
+			var title = icon.text();
+
+			showPopup(icon.attr('href'), title);
+		}
+	);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/edit_workflow_task.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/edit_workflow_task.jsp
new file mode 100644
index 0000000..e5d9fae
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/edit_workflow_task.jsp
@@ -0,0 +1,324 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/workflow_tasks/init.jsp" %>
+
+<%
+String randomId = StringUtil.randomId();
+
+String redirect = ParamUtil.getString(request, "redirect");
+
+WorkflowTask workflowTask = (WorkflowTask)request.getAttribute(WebKeys.WORKFLOW_TASK);
+
+WorkflowInstance workflowInstance = WorkflowInstanceManagerUtil.getWorkflowInstance(company.getCompanyId(), workflowTask.getWorkflowInstanceId());
+
+Map<String, Serializable> workflowContext = workflowInstance.getWorkflowContext();
+
+long companyId = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_COMPANY_ID));
+long groupId = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_GROUP_ID));
+String className = (String)workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_NAME);
+long classPK = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK));
+
+WorkflowHandler workflowHandler = WorkflowHandlerRegistryUtil.getWorkflowHandler(className);
+
+AssetRenderer assetRenderer = workflowHandler.getAssetRenderer(classPK);
+AssetRendererFactory assetRendererFactory = workflowHandler.getAssetRendererFactory();
+
+AssetEntry assetEntry = null;
+
+if (assetRenderer != null) {
+	assetEntry = assetRendererFactory.getAssetEntry(assetRendererFactory.getClassName(), assetRenderer.getClassPK());
+}
+
+String headerTitle = LanguageUtil.get(pageContext, workflowTask.getName());
+
+headerTitle = headerTitle.concat(StringPool.COLON + StringPool.SPACE + workflowHandler.getTitle(classPK, locale));
+
+boolean showEditURL = false;
+
+if ((workflowTask.getAssigneeUserId() == user.getUserId()) && !workflowTask.isCompleted()) {
+	showEditURL = true;
+}
+
+PortletURL editPortletURL = workflowHandler.getURLEdit(classPK, liferayPortletRequest, liferayPortletResponse);
+
+String viewFullContentURLString = null;
+
+if (assetRenderer.isPreviewInContext()) {
+	viewFullContentURLString = assetRenderer.getURLViewInContext((LiferayPortletRequest)renderRequest, (LiferayPortletResponse)renderResponse, null);
+}
+else {
+	PortletURL viewFullContentURL = renderResponse.createRenderURL();
+
+	viewFullContentURL.setParameter("struts_action", "/workflow_tasks/view_content");
+	viewFullContentURL.setParameter("redirect", currentURL);
+
+	if (assetEntry != null) {
+		viewFullContentURL.setParameter("assetEntryId", String.valueOf(assetEntry.getEntryId()));
+		viewFullContentURL.setParameter("assetEntryVersionId", String.valueOf(classPK));
+	}
+
+	if (assetRendererFactory != null) {
+		viewFullContentURL.setParameter("type", assetRendererFactory.getType());
+	}
+
+	viewFullContentURL.setParameter("showEditURL", String.valueOf(showEditURL));
+	viewFullContentURL.setParameter("workflowAssetPreview", Boolean.TRUE.toString());
+
+	viewFullContentURLString = viewFullContentURL.toString();
+}
+
+request.setAttribute(WebKeys.WORKFLOW_ASSET_PREVIEW, Boolean.TRUE);
+%>
+
+<portlet:renderURL var="backURL">
+	<portlet:param name="struts_action" value="/workflow_tasks/view" />
+</portlet:renderURL>
+
+<liferay-ui:header
+	backURL="<%= backURL.toString() %>"
+	localizeTitle="<%= false %>"
+	title="<%= headerTitle %>"
+/>
+
+<aui:row>
+	<aui:col cssClass="lfr-asset-column lfr-asset-column-details" width="<%= 75 %>">
+		<liferay-ui:error exception="<%= WorkflowTaskDueDateException.class %>" message="please-enter-a-valid-due-date" />
+
+		<aui:row>
+			<aui:col width="<%= 60 %>">
+				<div class="lfr-asset-assigned">
+					<aui:field-wrapper label="assigned-to">
+						<c:choose>
+							<c:when test="<%= workflowTask.isAssignedToSingleUser() %>">
+								<liferay-ui:input-resource url="<%= PortalUtil.getUserName(workflowTask.getAssigneeUserId(), StringPool.BLANK) %>" />
+							</c:when>
+							<c:otherwise>
+								<liferay-ui:input-resource url='<%= LanguageUtil.get(pageContext, "nobody") %>' />
+							</c:otherwise>
+						</c:choose>
+
+						<c:if test="<%= !workflowTask.isAssignedToSingleUser() %>">
+							<%= StringPool.DASH %>
+
+							<portlet:actionURL var="assignToMeURL">
+								<portlet:param name="struts_action" value="/workflow_tasks/edit_workflow_task" />
+								<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ASSIGN %>" />
+								<portlet:param name="redirect" value="<%= currentURL %>" />
+								<portlet:param name="workflowTaskId" value="<%= String.valueOf(workflowTask.getWorkflowTaskId()) %>" />
+								<portlet:param name="assigneeUserId" value="<%= String.valueOf(user.getUserId()) %>" />
+							</portlet:actionURL>
+
+							<span class="workflow-task task-assign-to-me-link"><aui:a href="<%= assignToMeURL %>" id='<%= randomId + "taskAssignToMeLink" %>' label="assign-to-me" /></span>
+						</c:if>
+
+						&nbsp;
+
+						<%
+						long[] pooledActorsIds = WorkflowTaskManagerUtil.getPooledActorsIds(company.getCompanyId(), workflowTask.getWorkflowTaskId());
+						%>
+
+						<c:if test="<%= _hasOtherAssignees(pooledActorsIds, workflowTask, user) %>">
+							<%= StringPool.DASH %>
+
+							<portlet:actionURL var="assignURL">
+								<portlet:param name="struts_action" value="/workflow_tasks/edit_workflow_task" />
+								<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ASSIGN %>" />
+								<portlet:param name="redirect" value="<%= currentURL %>" />
+								<portlet:param name="workflowTaskId" value="<%= String.valueOf(workflowTask.getWorkflowTaskId()) %>" />
+							</portlet:actionURL>
+
+							<span class="workflow-task task-assign-link"><aui:a href="<%= assignURL %>" id='<%= randomId + "taskAssignLink" %>' label="assign-to-..." /></span>
+						</c:if>
+					</aui:field-wrapper>
+				</div>
+
+				<div class="lfr-asset-status">
+					<aui:field-wrapper label="state">
+						<liferay-ui:input-resource url="<%= LanguageUtil.get(pageContext, WorkflowInstanceLinkLocalServiceUtil.getState(companyId, groupId, className, classPK)) %>" />
+					</aui:field-wrapper>
+				</div>
+			</aui:col>
+
+			<aui:col>
+				<div class="lfr-asset-date">
+					<aui:field-wrapper label="create-date">
+						<liferay-ui:input-resource url="<%= dateFormatDateTime.format(workflowTask.getCreateDate()) %>" />
+					</aui:field-wrapper>
+				</div>
+
+				<div class="lfr-asset-due-date">
+					<aui:field-wrapper label="due-date">
+						<liferay-ui:input-resource url='<%= (workflowTask.getDueDate() == null) ? LanguageUtil.get(pageContext, "never") : dateFormatDateTime.format(workflowTask.getDueDate()) %>' />
+
+						<c:if test="<%= !workflowTask.isCompleted() %>">
+							<portlet:actionURL var="updateDueDateURL">
+								<portlet:param name="struts_action" value="/workflow_tasks/edit_workflow_task" />
+								<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UPDATE %>" />
+								<portlet:param name="redirect" value="<%= currentURL %>" />
+								<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowTask.getWorkflowTaskId()) %>" />
+							</portlet:actionURL>
+
+							<%= StringPool.DASH %> (<span class="workflow-task task-due-date-link"><aui:a href="<%= updateDueDateURL %>" id='<%= randomId + "taskDueDateLink" %>' label="change" />)
+						</c:if>
+					</aui:field-wrapper>
+				</div>
+			</aui:col>
+		</aui:row>
+
+		<c:if test="<%= Validator.isNotNull(workflowTask.getDescription()) %>">
+			<div class="lfr-asset-field">
+				<aui:field-wrapper label="description">
+					<%= workflowTask.getDescription() %>
+				</aui:field-wrapper>
+			</div>
+		</c:if>
+
+		<liferay-ui:panel-container cssClass="task-panel-container" extended="<%= true %>">
+			<c:if test="<%= assetRenderer != null %>">
+				<liferay-ui:panel defaultState="open" title='<%= LanguageUtil.format(pageContext, "preview-of-x", ResourceActionsUtil.getModelResource(locale, className)) %>'>
+					<div class="task-content-actions">
+						<liferay-ui:icon-list>
+							<c:if test="<%= assetRenderer.hasViewPermission(permissionChecker) %>">
+								<liferay-ui:icon image="view" method="get" target='<%= assetRenderer.isPreviewInContext() ? "_blank" : StringPool.BLANK %>' url="<%= viewFullContentURLString %>" />
+							</c:if>
+
+							<c:if test="<%= editPortletURL != null %>">
+
+								<%
+								editPortletURL.setWindowState(LiferayWindowState.POP_UP);
+								editPortletURL.setPortletMode(PortletMode.VIEW);
+
+								String editPortletURLString = editPortletURL.toString();
+
+								editPortletURLString = HttpUtil.addParameter(editPortletURLString, "doAsGroupId", assetRenderer.getGroupId());
+								editPortletURLString = HttpUtil.addParameter(editPortletURLString, "refererPlid", plid);
+								%>
+
+								<c:choose>
+									<c:when test="<%= assetRenderer.hasEditPermission(permissionChecker) && showEditURL %>">
+
+										<%
+										String taglibEditURL = "javascript:Liferay.Util.openWindow({id: '" + renderResponse.getNamespace() + "editAsset', title: '" + LanguageUtil.format(pageContext, "edit-x", HtmlUtil.escape(assetRenderer.getTitle(locale))) + "', uri:'" + HtmlUtil.escapeURL(editPortletURLString) + "'});";
+										%>
+
+										<liferay-ui:icon image="edit" url="<%= taglibEditURL %>" />
+									</c:when>
+									<c:when test="<%= assetRenderer.hasEditPermission(permissionChecker) && !showEditURL && !workflowTask.isCompleted() %>">
+										<liferay-ui:icon-help message="please-assign-the-task-to-yourself-to-be-able-to-edit-the-content" />
+									</c:when>
+								</c:choose>
+							</c:if>
+						</liferay-ui:icon-list>
+					</div>
+
+					<h3 class="task-content-title">
+						<img alt="" src="<%= workflowHandler.getIconPath(liferayPortletRequest) %>" /> <%= HtmlUtil.escape(workflowHandler.getTitle(classPK, locale)) %>
+					</h3>
+
+					<%
+					String path = workflowHandler.render(classPK, renderRequest, renderResponse, AssetRenderer.TEMPLATE_ABSTRACT);
+
+					request.setAttribute(WebKeys.ASSET_RENDERER, assetRenderer);
+					request.setAttribute(WebKeys.ASSET_PUBLISHER_ABSTRACT_LENGTH, 200);
+					%>
+
+					<c:choose>
+						<c:when test="<%= path == null %>">
+							<%= workflowHandler.getSummary(classPK, locale) %>
+						</c:when>
+						<c:otherwise>
+							<liferay-util:include page="<%= path %>" portletId="<%= assetRendererFactory.getPortletId() %>" />
+						</c:otherwise>
+					</c:choose>
+
+					<%
+					String[] metadataFields = new String[] {"author", "categories", "tags"};
+					%>
+
+					<div class="asset-metadata">
+						<%@ include file="/html/portlet/asset_publisher/asset_metadata.jspf" %>
+					</div>
+				</liferay-ui:panel>
+			</c:if>
+
+			<liferay-ui:panel defaultState="closed" title="activities">
+
+				<%
+				List<Integer> logTypes = new ArrayList<Integer>();
+
+				logTypes.add(WorkflowLog.TASK_ASSIGN);
+				logTypes.add(WorkflowLog.TASK_COMPLETION);
+				logTypes.add(WorkflowLog.TASK_UPDATE);
+				logTypes.add(WorkflowLog.TRANSITION);
+
+				List<WorkflowLog> workflowLogs = WorkflowLogManagerUtil.getWorkflowLogsByWorkflowInstance(company.getCompanyId(), workflowTask.getWorkflowInstanceId(), logTypes, QueryUtil.ALL_POS, QueryUtil.ALL_POS, WorkflowComparatorFactoryUtil.getLogCreateDateComparator(true));
+				%>
+
+				<%@ include file="/html/portlet/workflow_instances/workflow_logs.jspf" %>
+			</liferay-ui:panel>
+
+			<liferay-ui:panel title="comments">
+				<portlet:actionURL var="discussionURL">
+					<portlet:param name="struts_action" value="/workflow_tasks/edit_workflow_task_discussion" />
+				</portlet:actionURL>
+
+				<liferay-ui:discussion
+					assetEntryVisible="<%= false %>"
+					className="<%= WorkflowInstance.class.getName() %>"
+					classPK="<%= workflowTask.getWorkflowInstanceId() %>"
+					formAction="<%= discussionURL %>"
+					formName="fm1"
+					ratingsEnabled="<%= false %>"
+					redirect="<%= currentURL %>"
+					userId="<%= user.getUserId() %>"
+				/>
+			</liferay-ui:panel>
+		</liferay-ui:panel-container>
+	</aui:col>
+
+	<aui:col cssClass="lfr-asset-column lfr-asset-column-actions" last="<%= true %>" width="<%= 25 %>">
+		<div class="lfr-asset-summary">
+			<liferay-ui:icon
+				cssClass="lfr-asset-avatar"
+				image="../file_system/large/task"
+				message="download"
+			/>
+
+			<div class="task-name">
+				<%= LanguageUtil.get(pageContext, workflowTask.getName()) %>
+			</div>
+		</div>
+
+		<%
+		request.removeAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+		%>
+
+		<liferay-util:include page="/html/portlet/workflow_tasks/workflow_task_action.jsp" />
+	</aui:col>
+</aui:row>
+
+<aui:script use="liferay-workflow-tasks">
+	var onTaskClickFn = A.rbind('onTaskClick', Liferay.WorkflowTasks, '');
+
+	Liferay.delegateClick('<portlet:namespace /><%= randomId %>taskAssignToMeLink', onTaskClickFn);
+	Liferay.delegateClick('<portlet:namespace /><%= randomId %>taskAssignLink', onTaskClickFn);
+	Liferay.delegateClick('<portlet:namespace /><%= randomId %>taskDueDateLink', onTaskClickFn);
+</aui:script>
+
+<%
+PortalUtil.addPortletBreadcrumbEntry(request, headerTitle, currentURL);
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/error.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/error.jsp
new file mode 100644
index 0000000..b94d8fd
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/error.jsp
@@ -0,0 +1,25 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/workflow_tasks/init.jsp" %>
+
+<liferay-ui:header
+	backURL="javascript:history.go(-1);"
+	title="error"
+/>
+
+<liferay-ui:error exception="<%= PrincipalException.class %>" message="you-do-not-have-the-required-permissions" />
+<liferay-ui:error exception="<%= WorkflowException.class %>" message="an-unexpected-error-occurred" />
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/init.jsp
new file mode 100644
index 0000000..0710c6d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/init.jsp
@@ -0,0 +1,64 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portal.kernel.workflow.WorkflowException" %><%@
+page import="com.liferay.portal.kernel.workflow.WorkflowHandler" %><%@
+page import="com.liferay.portal.kernel.workflow.WorkflowHandlerUtil" %><%@
+page import="com.liferay.portal.kernel.workflow.WorkflowInstance" %><%@
+page import="com.liferay.portal.kernel.workflow.WorkflowInstanceManagerUtil" %><%@
+page import="com.liferay.portal.kernel.workflow.WorkflowLog" %><%@
+page import="com.liferay.portal.kernel.workflow.WorkflowLogManagerUtil" %><%@
+page import="com.liferay.portal.kernel.workflow.WorkflowTask" %><%@
+page import="com.liferay.portal.kernel.workflow.WorkflowTaskDueDateException" %><%@
+page import="com.liferay.portal.kernel.workflow.WorkflowTaskManagerUtil" %><%@
+page import="com.liferay.portal.kernel.workflow.comparator.WorkflowComparatorFactoryUtil" %><%@
+page import="com.liferay.portlet.workflowtasks.search.WorkflowTaskDisplayTerms" %><%@
+page import="com.liferay.portlet.workflowtasks.search.WorkflowTaskSearch" %>
+
+<%
+Format dateFormatDate = FastDateFormatFactoryUtil.getDate(locale, timeZone);
+Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(locale, timeZone);
+%>
+
+<%@ include file="/html/portlet/workflow_tasks/init-ext.jsp" %>
+
+<%!
+private boolean _hasOtherAssignees(long[] pooledActorsIds, WorkflowTask workflowTask, User user) {
+	if (pooledActorsIds.length == 0) {
+		return false;
+	}
+
+	if (workflowTask.isCompleted()) {
+		return false;
+	}
+
+	if ((pooledActorsIds.length == 1) && (pooledActorsIds[0] == user.getUserId())) {
+		return false;
+	}
+
+	return true;
+}
+
+private boolean _isAssignedToUser(WorkflowTask workflowTask, User user) {
+	if (workflowTask.getAssigneeUserId() == user.getUserId()) {
+		return true;
+	}
+
+	return false;
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/js/main.js b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/js/main.js
new file mode 100644
index 0000000..d0d59b2
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/js/main.js
@@ -0,0 +1,87 @@
+AUI.add(
+	'liferay-workflow-tasks',
+	function(A) {
+		var WorkflowTasks = {
+			onTaskClick: function(event, randomId) {
+				var instance = this;
+
+				var icon = event.currentTarget;
+				var li = icon.get('parentNode');
+
+				event.preventDefault();
+
+				var content = null;
+
+				if (li.hasClass('task-due-date-link')) {
+					content = '#' + randomId + 'updateDueDate';
+				}
+				else if (li.hasClass('task-assign-to-me-link')) {
+					content = '#' + randomId + 'updateAsigneeToMe';
+				}
+				else if (li.hasClass('task-assign-link')) {
+					content = '#' + randomId + 'updateAsignee';
+				}
+
+				title = icon.text();
+
+				WorkflowTasks.showPopup(icon.attr('href'), A.one(content), title, randomId);
+			},
+
+			showPopup: function(url, content, title, randomId) {
+				var form = A.Node.create('<form />');
+
+				form.setAttribute('action', url);
+				form.setAttribute('method', 'POST');
+
+				var comments = A.one('#' + randomId + 'updateComments');
+
+				if (content) {
+					form.append(content);
+					content.show();
+				}
+
+				if (comments) {
+					form.append(comments);
+					comments.show();
+				}
+
+				var dialog = Liferay.Util.Window.getWindow(
+					{
+						dialog: {
+							bodyContent: form,
+							height: 420,
+							toolbars: {
+								footer: [
+									{
+										label: Liferay.Language.get('ok'),
+										on: {
+											click: function() {
+												submitForm(form);
+											}
+										}
+									},
+									{
+										label: Liferay.Language.get('cancel'),
+										on: {
+											click: function() {
+												dialog.hide();
+											}
+										}
+									}
+								]
+							},
+							width: 350
+						},
+						title: title
+					}
+				);
+			}
+		};
+
+		Liferay.WorkflowTasks = WorkflowTasks;
+	},
+	'',
+	{
+		requires: ['liferay-util-window']
+	}
+);
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/toolbar.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/toolbar.jsp
new file mode 100644
index 0000000..748b3cc
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/toolbar.jsp
@@ -0,0 +1,37 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/workflow_tasks/init.jsp" %>
+
+<%
+String toolbarItem = ParamUtil.getString(request, "toolbarItem", "assigned-to-me");
+%>
+
+<aui:nav-bar>
+	<aui:nav>
+		<portlet:renderURL var="assignedToMeURL">
+			<portlet:param name="struts_action" value="/workflow_tasks/view" />
+			<portlet:param name="toolbarItem" value="assigned-to-me" />
+		</portlet:renderURL>
+
+		<portlet:renderURL var="completedURL">
+			<portlet:param name="struts_action" value="/workflow_tasks/view" />
+			<portlet:param name="toolbarItem" value="my-completed-tasks" />
+		</portlet:renderURL>
+
+		<aui:nav-item href="<%= completedURL %>" iconCssClass="icon-plus" label="my-completed-tasks" selected='<%= toolbarItem.equals("my-completed-tasks") %>' />
+	</aui:nav>
+</aui:nav-bar>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/view.jsp
new file mode 100644
index 0000000..447e64f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/view.jsp
@@ -0,0 +1,28 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/workflow_tasks/init.jsp" %>
+
+<c:choose>
+	<c:when test="<%= WorkflowEngineManagerUtil.isDeployed() %>">
+		<%@ include file="/html/portlet/workflow_tasks/view_workflow_tasks.jspf" %>
+	</c:when>
+	<c:otherwise>
+		<div class="alert alert-info">
+			<liferay-ui:message key="no-workflow-engine-is-deployed" />
+		</div>
+	</c:otherwise>
+</c:choose>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/view_workflow_tasks.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/view_workflow_tasks.jspf
new file mode 100644
index 0000000..e1bfab5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/view_workflow_tasks.jspf
@@ -0,0 +1,90 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+String tabs1 = ParamUtil.getString(request, "tabs1", "pending");
+
+PortletURL portletURL = renderResponse.createRenderURL();
+
+portletURL.setParameter("tabs1", tabs1);
+%>
+
+<liferay-ui:tabs
+	names="pending,completed"
+	portletURL="<%= portletURL %>"
+/>
+
+<%
+try {
+	String type = "completed";
+%>
+
+	<aui:form action="<%= portletURL.toString() %>" method="post" name="fm">
+		<aui:nav-bar>
+			<aui:nav-bar-search cssClass="pull-right" file="/html/portlet/workflow_tasks/workflow_search_tasks.jsp" />
+		</aui:nav-bar>
+
+		<c:choose>
+			<c:when test='<%= portletName.equals(PortletKeys.MY_WORKFLOW_TASKS) && tabs1.equals("pending") %>'>
+				<liferay-ui:panel-container extended="<%= false %>" id="workflowTasksPanelContainer" persistState="<%= true %>">
+					<liferay-ui:panel collapsible="<%= true %>" extended="<%= false %>" id="workflowMyTasksPanel" persistState="<%= true %>" title="assigned-to-me">
+
+						<%
+						type = "assigned-to-me";
+						%>
+
+						<%@ include file="/html/portlet/workflow_tasks/workflow_tasks.jspf" %>
+					</liferay-ui:panel>
+
+					<liferay-ui:panel collapsible="<%= true %>" extended="<%= false %>" id="workflowMyRolesTasksPanel" persistState="<%= true %>" title="assigned-to-my-roles">
+
+						<%
+						type = "assigned-to-my-roles";
+						%>
+
+						<%@ include file="/html/portlet/workflow_tasks/workflow_tasks.jspf" %>
+					</liferay-ui:panel>
+				</liferay-ui:panel-container>
+			</c:when>
+			<c:otherwise>
+				<div class="separator"></div>
+
+				<%@ include file="/html/portlet/workflow_tasks/workflow_tasks.jspf" %>
+			</c:otherwise>
+		</c:choose>
+	</aui:form>
+
+<%
+}
+catch (Exception e) {
+	if (_log.isWarnEnabled()) {
+		_log.warn("Error retrieving tasks for user " + user.getUserId(), e);
+	}
+%>
+
+	<div class="alert alert-error">
+		<liferay-ui:message key="an-error-occurred-while-retrieving-the-list-of-tasks" />
+	</div>
+
+<%
+}
+
+PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, tabs1), currentURL);
+%>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.workflow_tasks.view_workflow_tasks_jspf");
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/workflow_search_results.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/workflow_search_results.jspf
new file mode 100644
index 0000000..427ef72
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/workflow_search_results.jspf
@@ -0,0 +1,93 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+WorkflowTaskDisplayTerms searchTerms = (WorkflowTaskDisplayTerms)searchContainer.getSearchTerms();
+
+String[] assetTypes = WorkflowHandlerUtil.getSearchableAssetTypes();
+
+if (portletName.equals(PortletKeys.WORKFLOW_TASKS)) {
+	searchContainer.setEmptyResultsMessage("there-are-no-tasks");
+
+	allTasks = true;
+
+	if (searchTerms.isAdvancedSearch()) {
+		total = WorkflowTaskManagerUtil.searchCount(company.getCompanyId(), 0, searchTerms.getName(), searchTerms.getType(), null, null, null, null, null, searchTerms.isAndOperator());
+
+		searchContainer.setTotal(total);
+
+		results = WorkflowTaskManagerUtil.search(company.getCompanyId(), 0, searchTerms.getName(), searchTerms.getType(), null, null, null, null, null, searchTerms.isAndOperator(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+	}
+	else {
+		total = WorkflowTaskManagerUtil.searchCount(company.getCompanyId(), 0, searchTerms.getKeywords(), assetTypes, null, null);
+
+		searchContainer.setTotal(total);
+
+		results = WorkflowTaskManagerUtil.search(company.getCompanyId(), 0, searchTerms.getKeywords(), assetTypes, null, null, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+	}
+}
+else if (type.equals("assigned-to-my-roles")) {
+	searchContainer.setEmptyResultsMessage("there-are-no-pending-tasks-assigned-to-your-roles");
+
+	if (searchTerms.isAdvancedSearch()) {
+		total = WorkflowTaskManagerUtil.searchCount(company.getCompanyId(), user.getUserId(), searchTerms.getName(), searchTerms.getType(), null, null, null, false, true, searchTerms.isAndOperator());
+
+		searchContainer.setTotal(total);
+
+		results = WorkflowTaskManagerUtil.search(company.getCompanyId(), user.getUserId(), searchTerms.getName(), searchTerms.getType(), null, null, null, false, true, searchTerms.isAndOperator(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+	}
+	else {
+		total = WorkflowTaskManagerUtil.searchCount(company.getCompanyId(), user.getUserId(), searchTerms.getKeywords(), assetTypes, false, true);
+
+		searchContainer.setTotal(total);
+
+		results = WorkflowTaskManagerUtil.search(company.getCompanyId(), user.getUserId(), searchTerms.getKeywords(), assetTypes, false, true, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+	}
+}
+else {
+	boolean completedTasks = false;
+
+	if (type.equals("completed")) {
+		completedTasks = true;
+
+		searchContainer.setEmptyResultsMessage("there-are-no-completed-tasks");
+	}
+	else {
+		searchContainer.setEmptyResultsMessage("there-are-no-pending-tasks-assigned-to-you");
+	}
+
+	if (searchTerms.isAdvancedSearch()) {
+		total = WorkflowTaskManagerUtil.searchCount(company.getCompanyId(), user.getUserId(), searchTerms.getName(), searchTerms.getType(), null, null, null, completedTasks, false, searchTerms.isAndOperator());
+
+		searchContainer.setTotal(total);
+
+		results = WorkflowTaskManagerUtil.search(company.getCompanyId(), user.getUserId(), searchTerms.getName(), searchTerms.getType(), null, null, null, completedTasks, false, searchTerms.isAndOperator(), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+	}
+	else {
+		total = WorkflowTaskManagerUtil.searchCount(company.getCompanyId(), user.getUserId(), searchTerms.getKeywords(), assetTypes, completedTasks, false);
+
+		searchContainer.setTotal(total);
+
+		results = WorkflowTaskManagerUtil.search(company.getCompanyId(), user.getUserId(), searchTerms.getKeywords(), assetTypes, completedTasks, false, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
+	}
+}
+
+searchContainer.setResults(results);
+
+if (Validator.isNotNull(searchTerms.getKeywords()) || Validator.isNotNull(searchTerms.getName()) || Validator.isNotNull(searchTerms.getType())) {
+	searchContainer.setEmptyResultsMessage(searchContainer.getEmptyResultsMessage() + "-with-the-specified-search-criteria");
+}
+%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/workflow_search_tasks.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/workflow_search_tasks.jsp
new file mode 100644
index 0000000..e3c54fd
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/workflow_search_tasks.jsp
@@ -0,0 +1,56 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/workflow_tasks/init.jsp" %>
+
+<%
+WorkflowTaskDisplayTerms displayTerms = new WorkflowTaskDisplayTerms(renderRequest);
+%>
+
+<liferay-ui:search-toggle
+	autoFocus="<%= windowState.equals(WindowState.MAXIMIZED) %>"
+	buttonLabel="search"
+	displayTerms="<%= displayTerms %>"
+	id="toggle_id_workflow_task_search"
+>
+
+	<aui:fieldset>
+		<aui:input label="task" name="<%= displayTerms.NAME %>" size="20" value="<%= displayTerms.getName() %>" />
+
+		<aui:select name="<%= displayTerms.TYPE %>">
+
+			<%
+			String displayTermsType = displayTerms.getType();
+
+			List<WorkflowHandler> workflowHandlers = WorkflowHandlerRegistryUtil.getWorkflowHandlers();
+
+			for (WorkflowHandler workflowHandler : workflowHandlers) {
+				if (!workflowHandler.isAssetTypeSearchable()) {
+					continue;
+				}
+
+				String defaultWorkflowHandlerType = workflowHandler.getClassName();
+			%>
+
+				<aui:option label="<%= workflowHandler.getType(locale) %>" selected="<%= displayTermsType.equals(defaultWorkflowHandlerType) %>" value="<%= defaultWorkflowHandlerType %>" />
+
+			<%
+			}
+			%>
+
+		</aui:select>
+	</aui:fieldset>
+</liferay-ui:search-toggle>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/workflow_task_action.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/workflow_task_action.jsp
new file mode 100644
index 0000000..35a8e06
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/workflow_task_action.jsp
@@ -0,0 +1,200 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/workflow_tasks/init.jsp" %>
+
+<%
+String randomId = StringPool.BLANK;
+
+String closeRedirect = ParamUtil.getString(request, "closeRedirect");
+
+ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
+
+WorkflowTask workflowTask = null;
+
+if (row != null) {
+	randomId = StringUtil.randomId();
+
+	workflowTask = (WorkflowTask)row.getParameter("workflowTask");
+}
+else {
+	workflowTask = (WorkflowTask)request.getAttribute(WebKeys.WORKFLOW_TASK);
+}
+
+long[] pooledActorsIds = WorkflowTaskManagerUtil.getPooledActorsIds(company.getCompanyId(), workflowTask.getWorkflowTaskId());
+%>
+
+<liferay-ui:icon-menu showExpanded="<%= (row == null) %>" showWhenSingleIcon="<%= (row == null) %>">
+	<c:if test="<%= !workflowTask.isCompleted() && _isAssignedToUser(workflowTask, user) %>">
+
+		<%
+		List<String> transitionNames = WorkflowTaskManagerUtil.getNextTransitionNames(company.getCompanyId(), user.getUserId(), workflowTask.getWorkflowTaskId());
+
+		for (String transitionName : transitionNames) {
+			String message = "proceed";
+
+			if (Validator.isNotNull(transitionName)) {
+				message = transitionName;
+			}
+		%>
+
+			<portlet:actionURL var="editURL">
+				<portlet:param name="struts_action" value="/workflow_tasks/edit_workflow_task" />
+				<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.SAVE %>" />
+				<portlet:param name="redirect" value="<%= currentURL %>" />
+				<portlet:param name="closeRedirect" value="<%= closeRedirect %>" />
+				<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowTask.getWorkflowTaskId()) %>" />
+				<portlet:param name="assigneeUserId" value="<%= StringUtil.valueOf(workflowTask.getAssigneeUserId()) %>" />
+
+				<c:if test="<%= transitionName != null %>">
+					<portlet:param name="transitionName" value="<%= transitionName %>" />
+				</c:if>
+			</portlet:actionURL>
+
+			<liferay-ui:icon
+				cssClass='<%= "workflow-task-" + randomId + " task-change-status-link" %>'
+				id='<%= randomId + transitionName + "taskChangeStatusLink" %>'
+				image="../aui/random"
+				message="<%= message %>"
+				method="get"
+				url="<%= editURL %>"
+			/>
+
+		<%
+		}
+		%>
+
+	</c:if>
+
+	<c:if test="<%= !workflowTask.isCompleted() && !_isAssignedToUser(workflowTask, user) %>">
+		<portlet:actionURL var="assignToMeURL">
+			<portlet:param name="struts_action" value="/workflow_tasks/edit_workflow_task" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ASSIGN %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="closeRedirect" value="<%= closeRedirect %>" />
+			<portlet:param name="workflowTaskId" value="<%= String.valueOf(workflowTask.getWorkflowTaskId()) %>" />
+			<portlet:param name="assigneeUserId" value="<%= String.valueOf(user.getUserId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon
+			cssClass='<%= "workflow-task-" + randomId + " task-assign-to-me-link" %>'
+			id='<%= randomId + "taskAssignToMeLink" %>'
+			image="assign"
+			message="assign-to-me"
+			method="get"
+			url="<%= assignToMeURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= _hasOtherAssignees(pooledActorsIds, workflowTask, user) %>">
+		<portlet:actionURL var="assignURL">
+			<portlet:param name="struts_action" value="/workflow_tasks/edit_workflow_task" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ASSIGN %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="closeRedirect" value="<%= closeRedirect %>" />
+			<portlet:param name="workflowTaskId" value="<%= String.valueOf(workflowTask.getWorkflowTaskId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon
+			cssClass='<%= "workflow-task-" + randomId + " task-assign-link" %>'
+			id='<%= randomId + "taskAssignLink" %>'
+			image="assign"
+			message="assign-to-..."
+			method="get"
+			url="<%= assignURL %>"
+		/>
+	</c:if>
+
+	<c:if test="<%= !workflowTask.isCompleted() %>">
+		<portlet:actionURL var="updateDueDateURL">
+			<portlet:param name="struts_action" value="/workflow_tasks/edit_workflow_task" />
+			<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UPDATE %>" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowTask.getWorkflowTaskId()) %>" />
+		</portlet:actionURL>
+
+		<liferay-ui:icon
+			cssClass='<%= "workflow-task-" + randomId + " task-due-date-link" %>'
+			id='<%= randomId + "taskDueDateLink" %>'
+			image="time"
+			message="update-due-date"
+			method="get"
+			url="<%= updateDueDateURL %>"
+		/>
+	</c:if>
+</liferay-ui:icon-menu>
+
+<div class="hide" id="<%= randomId %>updateAsignee">
+	<c:if test="<%= _hasOtherAssignees(pooledActorsIds, workflowTask, user) %>">
+		<aui:select label="assign-to" name="assigneeUserId">
+
+			<%
+			for (long pooledActorId : pooledActorsIds) {
+				if (pooledActorId == user.getUserId()) {
+					continue;
+				}
+			%>
+
+				<aui:option label="<%= HtmlUtil.escape(PortalUtil.getUserName(pooledActorId, StringPool.BLANK)) %>" selected="<%= workflowTask.getAssigneeUserId() == pooledActorId %>" value="<%= String.valueOf(pooledActorId) %>" />
+
+			<%
+			}
+			%>
+
+		</aui:select>
+	</c:if>
+</div>
+
+<div class="hide" id="<%= randomId %>updateAsigneeToMe">
+	<aui:input name="asigneeUserId" type="hidden" value="<%= user.getUserId() %>" />
+</div>
+
+<div class="hide" id="<%= randomId %>updateDueDate">
+	<aui:input bean="<%= workflowTask %>" model="<%= WorkflowTask.class %>" name="dueDate" />
+</div>
+
+<div class="hide" id="<%= randomId %>updateComments">
+	<aui:input cols="55" name="comment" rows="10" type="textarea" />
+</div>
+
+<aui:script use="liferay-workflow-tasks">
+	var onTaskClickFn = A.rbind('onTaskClick', Liferay.WorkflowTasks, '<%= randomId %>');
+
+	<c:if test="<%= !workflowTask.isCompleted() && _isAssignedToUser(workflowTask, user) %>">
+
+		<%
+		List<String> transitionNames = WorkflowTaskManagerUtil.getNextTransitionNames(company.getCompanyId(), user.getUserId(), workflowTask.getWorkflowTaskId());
+
+		for (String transitionName : transitionNames) {
+			String message = "proceed";
+
+			if (Validator.isNotNull(transitionName)) {
+				message = transitionName;
+			}
+		%>
+
+			Liferay.delegateClick('<portlet:namespace /><%= randomId + transitionName %>taskChangeStatusLink', onTaskClickFn);
+
+		<%
+		}
+		%>
+
+	</c:if>
+
+	Liferay.delegateClick('<portlet:namespace /><%= randomId %>taskAssignToMeLink', onTaskClickFn);
+	Liferay.delegateClick('<portlet:namespace /><%= randomId %>taskAssignLink', onTaskClickFn);
+	Liferay.delegateClick('<portlet:namespace /><%= randomId %>taskDueDateLink', onTaskClickFn);
+</aui:script>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/workflow_tasks.jspf b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/workflow_tasks.jspf
new file mode 100644
index 0000000..4568f6d
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/workflow_tasks/workflow_tasks.jspf
@@ -0,0 +1,177 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%
+String curParam = SearchContainer.DEFAULT_CUR_PARAM;
+
+if (type.equals("assigned-to-me")) {
+	curParam = "cur1";
+}
+else if (type.equals("assigned-to-my-roles")) {
+	curParam = "cur2";
+}
+%>
+
+<liferay-ui:search-container
+	searchContainer="<%= new WorkflowTaskSearch(renderRequest, curParam, currentURLObj) %>"
+>
+
+	<%
+	boolean allTasks = false;
+	%>
+
+	<liferay-ui:search-container-results>
+		<%@ include file="/html/portlet/workflow_tasks/workflow_search_results.jspf" %>
+	</liferay-ui:search-container-results>
+
+	<liferay-ui:search-container-row
+		className="com.liferay.portal.kernel.workflow.WorkflowTask"
+		modelVar="workflowTask"
+		stringKey="<%= true %>"
+	>
+		<liferay-ui:search-container-row-parameter
+			name="workflowTask"
+			value="<%= workflowTask %>"
+		/>
+
+		<%
+		WorkflowInstance workflowInstance = WorkflowInstanceManagerUtil.getWorkflowInstance(company.getCompanyId(), workflowTask.getWorkflowInstanceId());
+
+		Map<String, Serializable> workflowContext = workflowInstance.getWorkflowContext();
+
+		String className = (String)workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_NAME);
+		long classPK = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK));
+
+		WorkflowHandler workflowHandler = WorkflowHandlerRegistryUtil.getWorkflowHandler(className);
+		%>
+
+		<portlet:renderURL var="rowURL">
+			<portlet:param name="struts_action" value="/workflow_tasks/edit_workflow_task" />
+			<portlet:param name="redirect" value="<%= currentURL %>" />
+			<portlet:param name="workflowTaskId" value="<%= String.valueOf(workflowTask.getWorkflowTaskId()) %>" />
+		</portlet:renderURL>
+
+		<c:if test="<%= allTasks %>">
+			<liferay-ui:search-container-column-text
+				buffer="buffer"
+			>
+
+				<%
+				if (workflowTask.isAssignedToSingleUser() && (workflowTask.getAssigneeUserId() > 0)) {
+					User assigneeUser = UserLocalServiceUtil.getUser(workflowTask.getAssigneeUserId());
+
+					buffer.append("<img alt=\"");
+					buffer.append(HtmlUtil.escape(assigneeUser.getFullName()));
+					buffer.append("\" class=\"user-avatar\" src=\"");
+					buffer.append(assigneeUser.getPortraitURL(themeDisplay));
+					buffer.append("\" title=\"");
+					buffer.append(HtmlUtil.escape(assigneeUser.getFullName()));
+					buffer.append("\" />");
+				}
+				%>
+
+			</liferay-ui:search-container-column-text>
+		</c:if>
+
+		<liferay-ui:search-container-column-text
+			buffer="buffer"
+			href="<%= rowURL %>"
+			name="task"
+		>
+
+			<%
+			buffer.append("<span class=\"task-name\" id=\"");
+			buffer.append(workflowTask.getWorkflowTaskId());
+			buffer.append("\">");
+			buffer.append(LanguageUtil.get(pageContext, workflowTask.getName()));
+			buffer.append("</span>");
+			%>
+
+		</liferay-ui:search-container-column-text>
+
+		<liferay-ui:search-container-column-text
+			buffer="buffer"
+			href="<%= rowURL %>"
+			name="asset-title"
+		>
+
+			<%
+			buffer.append(HtmlUtil.escape(workflowHandler.getTitle(classPK, locale)));
+			%>
+
+		</liferay-ui:search-container-column-text>
+
+		<liferay-ui:search-container-column-text
+			buffer="buffer"
+			href="<%= rowURL %>"
+			name="asset-type"
+		>
+
+			<%
+			buffer.append(workflowHandler.getType(locale));
+			%>
+
+		</liferay-ui:search-container-column-text>
+
+		<liferay-ui:search-container-column-text
+			buffer="buffer"
+			href="<%= rowURL %>"
+			name="last-activity-date"
+		>
+
+			<%
+			List<WorkflowLog> workflowLogs = WorkflowLogManagerUtil.getWorkflowLogsByWorkflowInstance(company.getCompanyId(), workflowTask.getWorkflowInstanceId(), null, 0, 1, WorkflowComparatorFactoryUtil.getLogCreateDateComparator());
+
+			if (workflowLogs.isEmpty()) {
+				buffer.append(LanguageUtil.get(pageContext, "never"));
+			}
+			else {
+				WorkflowLog workflowLog = workflowLogs.get(0);
+
+				buffer.append(dateFormatDateTime.format(workflowLog.getCreateDate()));
+			}
+			%>
+
+		</liferay-ui:search-container-column-text>
+
+		<liferay-ui:search-container-column-text
+			buffer="buffer"
+			href="<%= rowURL %>"
+			name="due-date"
+			orderable="<%= true %>"
+		>
+
+			<%
+			if (workflowTask.getDueDate() == null) {
+				buffer.append(LanguageUtil.get(pageContext, "never"));
+			}
+			else {
+				buffer.append(dateFormatDateTime.format(workflowTask.getDueDate()));
+			}
+			%>
+
+		</liferay-ui:search-container-column-text>
+
+		<c:if test='<%= !allTasks && !tabs1.equals("completed") %>'>
+			<liferay-ui:search-container-column-jsp
+				align="right"
+				path="/html/portlet/workflow_tasks/workflow_task_action.jsp"
+			/>
+		</c:if>
+	</liferay-ui:search-container-row>
+
+	<liferay-ui:search-iterator />
+</liferay-ui:search-container>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/xsl_content/configuration.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/xsl_content/configuration.jsp
new file mode 100644
index 0000000..7274f24
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/xsl_content/configuration.jsp
@@ -0,0 +1,42 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/xsl_content/init.jsp" %>
+
+<%
+String redirect = ParamUtil.getString(request, "redirect");
+%>
+
+<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" />
+
+<aui:form action="<%= configurationURL %>" method="post" name="fm">
+	<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
+	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
+
+	<liferay-ui:error key="xmlUrl" message="please-enter-a-valid-xml-url" />
+	<liferay-ui:error key="xslUrl" message="please-enter-a-valid-xsl-url" />
+	<liferay-ui:error key="transformation" message="an-error-occurred-while-processing-your-xml-and-xsl" />
+
+	<aui:fieldset>
+		<aui:input cssClass="lfr-input-text-container" name="preferences--xmlUrl--" type="text" value="<%= xmlUrl %>" />
+
+		<aui:input cssClass="lfr-input-text-container" name="preferences--xslUrl--" type="text" value="<%= xslUrl %>" />
+	</aui:fieldset>
+
+	<aui:button-row>
+		<aui:button type="submit" />
+	</aui:button-row>
+</aui:form>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/xsl_content/example.xml b/tomcat-7.0.42/webapps/ROOT/html/portlet/xsl_content/example.xml
new file mode 100644
index 0000000..bab41c4
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/xsl_content/example.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+
+<breakfast_menu>
+	<food>
+		<name>Belgian Waffles</name>
+		<price>$5.95</price>
+		<description>Two of our famous Belgian Waffles with plenty of real maple syrup.</description>
+		<calories>650</calories>
+	</food>
+	<food>
+		<name>Strawberry Belgian Waffles</name>
+		<price>$7.95</price>
+		<description>Light Belgian waffles covered with strawberries and whipped cream.</description>
+		<calories>900</calories>
+	</food>
+
+	<food>
+		<name>Berry-Berry Belgian Waffles</name>
+		<price>$8.95</price>
+		<description>Light Belgian waffles covered with an assortment of fresh berries and whipped cream.</description>
+		<calories>900</calories>
+	</food>
+	<food>
+		<name>French Toast</name>
+		<price>$4.50</price>
+		<description>Thick slices made from our homemade sourdough bread.</description>
+		<calories>600</calories>
+	</food>
+	<food>
+		<name>Homestyle Breakfast</name>
+		<price>$6.95</price>
+		<description>Two eggs, bacon or sausage, toast, and our ever-popular hash browns.</description>
+		<calories>950</calories>
+	</food>
+</breakfast_menu>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/xsl_content/example.xsl b/tomcat-7.0.42/webapps/ROOT/html/portlet/xsl_content/example.xsl
new file mode 100644
index 0000000..e82389f
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/xsl_content/example.xsl
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<html xsl:version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
+	<div style="background-color: #EEEEEE; font-family: Arial; font-size: 12pt;">
+		<xsl:for-each select="breakfast_menu/food">
+			<div style="background-color: teal; color: white; padding: 4px;">
+				<span style="font-weight: bold;">
+					<xsl:value-of select="name" />
+				</span>
+
+				- <xsl:value-of select="price" />
+			</div>
+
+			<div style="font-size: 10pt; margin-bottom: 1em; margin-left: 20px;">
+				<xsl:value-of select="description" />
+
+				<br />
+
+				<span style="font-style: italic;">
+					<xsl:value-of select="calories" /> calories per serving.
+				</span>
+			</div>
+		</xsl:for-each>
+	</div>
+</html>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/xsl_content/init-ext.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/xsl_content/init-ext.jsp
new file mode 100644
index 0000000..8aa75ad
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/xsl_content/init-ext.jsp
@@ -0,0 +1,15 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/xsl_content/init.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/xsl_content/init.jsp
new file mode 100644
index 0000000..c7d8bc6
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/xsl_content/init.jsp
@@ -0,0 +1,32 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/init.jsp" %>
+
+<%@ page import="com.liferay.portlet.asset.NoSuchTagException" %><%@
+page import="com.liferay.portlet.asset.NoSuchTagPropertyException" %><%@
+page import="com.liferay.portlet.asset.model.AssetTagProperty" %><%@
+page import="com.liferay.portlet.asset.service.AssetTagPropertyLocalServiceUtil" %><%@
+page import="com.liferay.portlet.xslcontent.util.XSLContentUtil" %>
+
+<%@ page import="java.net.URL" %>
+
+<%
+String xmlUrl = portletPreferences.getValue("xmlUrl", XSLContentUtil.DEFAULT_XML_URL);
+String xslUrl = portletPreferences.getValue("xslUrl", XSLContentUtil.DEFAULT_XSL_URL);
+%>
+
+<%@ include file="/html/portlet/xsl_content/init-ext.jsp" %>
\ No newline at end of file
diff --git a/tomcat-7.0.42/webapps/ROOT/html/portlet/xsl_content/view.jsp b/tomcat-7.0.42/webapps/ROOT/html/portlet/xsl_content/view.jsp
new file mode 100644
index 0000000..712afd5
--- /dev/null
+++ b/tomcat-7.0.42/webapps/ROOT/html/portlet/xsl_content/view.jsp
@@ -0,0 +1,106 @@
+<%--
+/**
+ * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library 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 Lesser General Public License for more
+ * details.
+ */
+--%>
+
+<%@ include file="/html/portlet/xsl_content/init.jsp" %>
+
+<%
+try {
+	String variablePropertyKey = StringPool.BLANK;
+	String variablePropertyValue = StringPool.BLANK;
+
+	xmlUrl = StringUtil.replace(xmlUrl,"@portal_url@", themeDisplay.getPortalURL());
+	xslUrl = StringUtil.replace(xslUrl,"@portal_url@", themeDisplay.getPortalURL());
+
+	int bracketBegin = xmlUrl.indexOf("[");
+	int bracketEnd = -1;
+
+	if (bracketBegin > -1) {
+		bracketEnd = xmlUrl.indexOf("]", bracketBegin);
+
+		if ((bracketEnd > -1) && ((bracketEnd - bracketBegin) > 0)) {
+			String[] compilerTagNames = ParamUtil.getParameterValues(request, "tags");
+
+			if (compilerTagNames.length > 0) {
+				String category = null;
+				String propertyName = null;
+
+				variablePropertyKey = xmlUrl.substring(bracketBegin + 1, bracketEnd);
+
+				category = variablePropertyKey;
+
+				int pos = variablePropertyKey.indexOf(StringPool.PERIOD);
+
+				if (pos != -1) {
+					category = variablePropertyKey.substring(0, pos);
+					propertyName = variablePropertyKey.substring(pos + 1);
+				}
+
+				for (String tagName : compilerTagNames) {
+					try {
+						AssetTag assetTag = AssetTagLocalServiceUtil.getTag(scopeGroupId, tagName);
+
+						AssetTagProperty assetTagProperty = AssetTagPropertyLocalServiceUtil.getTagProperty(assetTag.getTagId(), "category");
+
+						variablePropertyValue = assetTagProperty.getValue();
+
+						if (category.equals(variablePropertyValue)) {
+							if (pos == -1) {
+								variablePropertyValue = assetTag.getName();
+							}
+							else {
+								assetTagProperty = AssetTagPropertyLocalServiceUtil.getTagProperty(assetTag.getTagId(), propertyName);
+
+								variablePropertyValue = assetTagProperty.getValue();
+							}
+
+							xmlUrl = StringUtil.replace(xmlUrl, "[" + variablePropertyKey + "]", StringUtil.toUpperCase(variablePropertyValue));
+
+							break;
+						}
+					}
+					catch (NoSuchTagException nste) {
+						_log.warn(nste);
+					}
+					catch (NoSuchTagPropertyException nstpe) {
+						_log.warn(nstpe);
+					}
+				}
+			}
+		}
+	}
+
+	String content = XSLContentUtil.transform(new URL(xmlUrl), new URL(xslUrl));
+%>
+
+	<%= content %>
+
+<%
+}
+catch (Exception e) {
+	_log.error(e.getMessage());
+%>
+
+	<div class="alert alert-error">
+		<liferay-ui:message key="an-error-occurred-while-processing-your-xml-and-xsl" />
+	</div>
+
+<%
+}
+%>
+
+<%!
+private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.xsl_content.view_jsp");
+%>
\ No newline at end of file