All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.view_entries.jsp Maven / Gradle / Ivy

There is a newer version: 5.0.177
Show newest version
<%--
/**
 * 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="/init.jsp" %>

<%
String referringPortletResource = ParamUtil.getString(request, "referringPortletResource");

SearchContainer articleSearchContainer = journalDisplayContext.getSearchContainer(false);

String displayStyle = journalDisplayContext.getDisplayStyle();

String searchContainerId = ParamUtil.getString(request, "searchContainerId");
%>


	

		<%
		JournalArticle curArticle = null;
		JournalFolder curFolder = null;

		Object result = row.getObject();

		if (result instanceof JournalFolder) {
			curFolder = (JournalFolder)result;
		}
		else {
			curArticle = (JournalArticle)result;
		}
		%>

		
			

				<%
				Map rowData = new HashMap();

				if (journalDisplayContext.isShowEditActions()) {
					rowData.put("draggable", JournalArticlePermission.contains(permissionChecker, curArticle, ActionKeys.DELETE) || JournalArticlePermission.contains(permissionChecker, curArticle, ActionKeys.UPDATE));
				}

				rowData.put("title", HtmlUtil.escape(curArticle.getTitle(locale)));

				row.setData(rowData);

				row.setPrimaryKey(HtmlUtil.escape(curArticle.getArticleId()));

				String editURL = StringPool.BLANK;

				if (JournalArticlePermission.contains(permissionChecker, curArticle, ActionKeys.UPDATE)) {
					PortletURL editArticleURL = liferayPortletResponse.createRenderURL();

					editArticleURL.setParameter("mvcPath", "/edit_article.jsp");
					editArticleURL.setParameter("redirect", currentURL);
					editArticleURL.setParameter("referringPortletResource", referringPortletResource);
					editArticleURL.setParameter("groupId", String.valueOf(curArticle.getGroupId()));
					editArticleURL.setParameter("folderId", String.valueOf(curArticle.getFolderId()));
					editArticleURL.setParameter("articleId", curArticle.getArticleId());
					editArticleURL.setParameter("version", String.valueOf(curArticle.getVersion()));

					editURL = editArticleURL.toString();
				}
				%>

				
					
						
							
						

						

							<%
							Date createDate = curArticle.getModifiedDate();

							String modifiedDateDescription = LanguageUtil.getTimeDescription(request, System.currentTimeMillis() - createDate.getTime(), true);
							%>

							
<%= HtmlUtil.escape(curArticle.getTitle(locale)) %>
<%= JournalHelperUtil.getAbsolutePath(liferayPortletRequest, curArticle.getFolderId()) %>
<% row.setCssClass("entry-card lfr-asset-item " + row.getCssClass()); %> <% String articleImageURL = curArticle.getArticleImageURL(themeDisplay); %> <%@ include file="/article_vertical_card.jspf" %> <%@ include file="/article_vertical_card.jspf" %> <% DDMStructure ddmStructure = DDMStructureLocalServiceUtil.getStructure(scopeGroupId, PortalUtil.getClassNameId(JournalArticle.class), curArticle.getDDMStructureKey(), true); %>
<% Map rowData = new HashMap(); rowData.put("draggable", JournalFolderPermission.contains(permissionChecker, curFolder, ActionKeys.DELETE) || JournalFolderPermission.contains(permissionChecker, curFolder, ActionKeys.UPDATE)); rowData.put("folder", true); rowData.put("folder-id", curFolder.getFolderId()); rowData.put("title", HtmlUtil.escape(curFolder.getName())); row.setData(rowData); row.setPrimaryKey(String.valueOf(curFolder.getPrimaryKey())); PortletURL rowURL = liferayPortletResponse.createRenderURL(); rowURL.setParameter("redirect", currentURL); rowURL.setParameter("groupId", String.valueOf(curFolder.getGroupId())); rowURL.setParameter("folderId", String.valueOf(curFolder.getFolderId())); rowURL.setParameter("displayStyle", displayStyle); rowURL.setParameter("showEditActions", String.valueOf(journalDisplayContext.isShowEditActions())); %> <% Date createDate = curFolder.getCreateDate(); String createDateDescription = LanguageUtil.getTimeDescription(request, System.currentTimeMillis() - createDate.getTime(), true); %>
<%= HtmlUtil.escape(curFolder.getName()) %>
<% row.setCssClass("entry-card lfr-asset-folder " + row.getCssClass()); %>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy