META-INF.resources.view_entries.jsp Maven / Gradle / Ivy
<%--
/**
* SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/
--%>
<%@ include file="/init.jsp" %>
<%
String referringPortletResource = ParamUtil.getString(request, "referringPortletResource");
Map componentContext = journalDisplayContext.getComponentContext();
%>
<%
JournalArticle curArticle = null;
JournalFolder curFolder = null;
Object result = row.getObject();
if (result instanceof JournalFolder) {
curFolder = (JournalFolder)result;
}
else {
curArticle = journalDisplayContext.getLatestArticle((JournalArticle)result);
}
%>
<%
String title = curArticle.getTitle(locale);
if (Validator.isNull(title)) {
title = curArticle.getTitle(LocaleUtil.fromLanguageId(curArticle.getDefaultLanguageId()));
}
row.setData(
HashMapBuilder.put(
"actions", journalDisplayContext.getAvailableActions(curArticle)
).put(
"draggable", !BrowserSnifferUtil.isMobile(request) && (JournalArticlePermission.contains(permissionChecker, curArticle, ActionKeys.DELETE) || JournalArticlePermission.contains(permissionChecker, curArticle, ActionKeys.UPDATE))
).put(
"title", HtmlUtil.escape(title)
).build());
row.setPrimaryKey(HtmlUtil.escape(curArticle.getArticleId()));
String editURL = StringPool.BLANK;
if (JournalArticlePermission.contains(permissionChecker, curArticle, ActionKeys.UPDATE)) {
editURL = PortletURLBuilder.createRenderURL(
liferayPortletResponse
).setMVCRenderCommandName(
"/journal/edit_article"
).setRedirect(
currentURL
).setParameter(
"articleId", curArticle.getArticleId()
).setParameter(
"backURLTitle", portletDisplay.getPortletDisplayName()
).setParameter(
"folderId", curArticle.getFolderId()
).setParameter(
"groupId", curArticle.getGroupId()
).setParameter(
"referringPortletResource", referringPortletResource
).setParameter(
"version", curArticle.getVersion()
).buildString();
}
%>
<%= HtmlUtil.escape(title) %>
<%= journalDisplayContext.getArticleSubtitle(curArticle) %>
<%
String scheduledArticleMessage = journalDisplayContext.getScheduledArticleMessage(curArticle);
%>
<%
DDMStructure ddmStructure = curArticle.getDDMStructure();
%>
<%
row.setData(
HashMapBuilder.put(
"actions", journalDisplayContext.getAvailableActions(curFolder)
).put(
"draggable", !BrowserSnifferUtil.isMobile(request) && (JournalFolderPermission.contains(permissionChecker, curFolder, ActionKeys.DELETE) || JournalFolderPermission.contains(permissionChecker, curFolder, ActionKeys.UPDATE))
).put(
"folder", true
).put(
"folder-id", curFolder.getFolderId()
).put(
"title", HtmlUtil.escape(curFolder.getName())
).build());
row.setPrimaryKey(String.valueOf(curFolder.getPrimaryKey()));
PortletURL rowURL = PortletURLBuilder.createRenderURL(
liferayPortletResponse
).setParameter(
"displayStyle", journalDisplayContext.getDisplayStyle()
).setParameter(
"folderId", curFolder.getFolderId()
).setParameter(
"groupId", curFolder.getGroupId()
).buildPortletURL();
%>
<%= HtmlUtil.escape(curFolder.getName()) %>
<%= journalDisplayContext.getFolderSubtitle(curFolder) %>
<%
row.setCssClass("card-page-item card-page-item-directory " + row.getCssClass());
%>
© 2015 - 2024 Weber Informatics LLC | Privacy Policy