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();
%>


	

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

		boolean latestVersion = false;
		Object result = row.getObject();

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

			article = journalDisplayContext.getLatestArticle(curArticle);

			if (curArticle.equals(article)) {
				latestVersion = true;
			}
		}
		%>

		
			

				<%
				Map rowData = new HashMap();

				if (journalDisplayContext.isShowEditActions()) {
					rowData.put("draggable", !BrowserSnifferUtil.isMobile(request) && (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()));

				PortletURL rowURL = null;

				if (journalDisplayContext.isShowEditActions() && JournalArticlePermission.contains(permissionChecker, curArticle, ActionKeys.UPDATE)) {
					rowURL = liferayPortletResponse.createRenderURL();

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

				
					
						
							
						

						

							<%
							Date createDate = curArticle.getModifiedDate();

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

							
<%= HtmlUtil.escape(curArticle.getTitle(locale)) %>
<%= JournalUtil.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", !BrowserSnifferUtil.isMobile(request) && (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()); %>
var journalNavigation = new Liferay.Portlet.JournalNavigation( { editEntryUrl: '', form: { method: 'POST', node: A.one(document.fm) }, moveEntryUrl: '', namespace: '', searchContainerId: 'articles' } ); var clearJournalNavigationHandles = function(event) { if (event.portletId === '<%= portletDisplay.getRootPortletId() %>') { journalNavigation.destroy(); Liferay.detach('destroyPortlet', clearJournalNavigationHandles); } }; Liferay.on('destroyPortlet', clearJournalNavigationHandles);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy