META-INF.resources.item.selector.select_articles.jsp Maven / Gradle / Ivy
<%--
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
--%>
<%@ include file="/item/selector/init.jsp" %>
<%
JournalArticleItemSelectorViewDisplayContext journalArticleItemSelectorViewDisplayContext = (JournalArticleItemSelectorViewDisplayContext)request.getAttribute(JournalWebConstants.JOURNAL_ARTICLE_ITEM_SELECTOR_VIEW_DISPLAY_CONTEXT);
%>
<%
JournalArticle curArticle = null;
JournalFolder curFolder = null;
Object result = row.getObject();
if (result instanceof JournalFolder) {
curFolder = (JournalFolder)result;
}
else {
curArticle = journalArticleItemSelectorViewDisplayContext.getLatestArticle((JournalArticle)result);
}
%>
<%
row.setCssClass("articles selector-button" + row.getCssClass());
row.setData(journalArticleItemSelectorViewDisplayContext.getJournalArticleContext(curArticle));
%>
<%
row.setCssClass("item-preview " + row.getCssClass());
%>
<%
Date createDate = curArticle.getModifiedDate();
String modifiedDateDescription = LanguageUtil.getTimeDescription(request, System.currentTimeMillis() - createDate.getTime(), true);
%>
<%= HtmlUtil.escape(curArticle.getTitle(locale, true)) %>
:
<%= journalArticleItemSelectorViewDisplayContext.getGroupLabel(curArticle.getGroupId(), locale) %>
<%
row.setCssClass("card-page-item card-page-item-directory entry " + row.getCssClass());
%>
<%
row.setCssClass("item-preview " + row.getCssClass());
%>
<%= journalArticleItemSelectorViewDisplayContext.getGroupLabel(curArticle.getGroupId(), locale) %>
<%
DDMStructure ddmStructure = curArticle.getDDMStructure();
%>
<%
PortletURL rowURL = PortletURLBuilder.create(
journalArticleItemSelectorViewDisplayContext.getPortletURL()
).setParameter(
"folderId", curFolder.getFolderId()
).setParameter(
"groupId", curFolder.getGroupId()
).buildPortletURL();
%>
<%
Date createDate = curFolder.getCreateDate();
String createDateDescription = LanguageUtil.getTimeDescription(request, System.currentTimeMillis() - createDate.getTime(), true);
%>
<%= HtmlUtil.escape(curFolder.getName()) %>
:
<%= journalArticleItemSelectorViewDisplayContext.getGroupLabel(curFolder.getGroupId(), locale) %>
<%
row.setCssClass("card-page-item card-page-item-directory " + row.getCssClass());
%>
<%= journalArticleItemSelectorViewDisplayContext.getGroupLabel(curFolder.getGroupId(), locale) %>