<%--
/**
 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
 *
 * The contents of this file are subject to the terms of the Liferay Enterprise
 * Subscription License ("License"). You may not use this file except in
 * compliance with the License. You can obtain a copy of the License by
 * contacting Liferay, Inc. See the License for the specific language governing
 * permissions and limitations under the License, including but not limited to
 * distribution rights of the Software.
 *
 *
 *
 */
--%>

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

<%@ page import="com.liferay.portal.kernel.language.LanguageUtil" %><%@
page import="com.liferay.social.kernel.model.SocialActivity" %><%@
page import="com.liferay.social.kernel.model.SocialActivityFeedEntry" %><%@
page import="com.liferay.social.kernel.service.SocialActivityLocalServiceUtil" %><%@
page import="com.liferay.social.kernel.util.SocialActivityDescriptor" %>

<%
List<SocialActivityDescriptor> activityDescriptors = (List<SocialActivityDescriptor>)request.getAttribute("liferay-social-activities:social-activities:activityDescriptors");
String className = (String)request.getAttribute("liferay-social-activities:social-activities:className");
long classPK = GetterUtil.getLong((String)request.getAttribute("liferay-social-activities:social-activities:classPK"));
int feedDelta = GetterUtil.getInteger((String)request.getAttribute("liferay-social-activities:social-activities:feedDelta"));
String feedDisplayStyle = (String)request.getAttribute("liferay-social-activities:social-activities:feedDisplayStyle");
boolean feedEnabled = !PortalUtil.isRSSFeedsEnabled() ? false : GetterUtil.getBoolean((String)request.getAttribute("liferay-social-activities:social-activities:feedEnabled"));
ResourceURL feedResourceURL = (ResourceURL)request.getAttribute("liferay-social-activities:social-activities:feedResourceURL");
String feedTitle = (String)request.getAttribute("liferay-social-activities:social-activities:feedTitle");
String feedType = (String)request.getAttribute("liferay-social-activities:social-activities:feedType");
String feedURL = (String)request.getAttribute("liferay-social-activities:social-activities:feedURL");
String feedURLMessage = (String)request.getAttribute("liferay-social-activities:social-activities:feedURLMessage");

if (activityDescriptors == null) {
	List<SocialActivity> activities = SocialActivityLocalServiceUtil.getActivities(0, className, classPK, QueryUtil.ALL_POS, QueryUtil.ALL_POS);

	activityDescriptors = new ArrayList<SocialActivityDescriptor>(activities.size());

	for (SocialActivity activity : activities) {
		activityDescriptors.add(new SocialActivityDescriptor(activity));
	}
}

String selector = StringPool.BLANK;

Format dateFormat = FastDateFormatFactoryUtil.getSimpleDateFormat(LanguageUtil.get(request, "mmm-d"), locale, timeZone);
Format yearDateFormat = FastDateFormatFactoryUtil.getSimpleDateFormat(LanguageUtil.get(request, "mmmm-d-yyyy"), locale, timeZone);

Format timeFormat = FastDateFormatFactoryUtil.getTime(locale, timeZone);
%>

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