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

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

There is a newer version: 5.0.117
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="/message_boards/init.jsp" %>

<%
MBCategory category = (MBCategory)request.getAttribute(WebKeys.MESSAGE_BOARDS_CATEGORY);

long categoryId = GetterUtil.getLong(request.getAttribute("view.jsp-categoryId"));

SearchContainer entriesSearchContainer = (SearchContainer)request.getAttribute("view.jsp-entriesSearchContainer");

long groupThreadsUserId = ParamUtil.getLong(request, "groupThreadsUserId");

boolean showBreadcrumb = ParamUtil.getBoolean(request, "showBreadcrumb", true);

PortletURL portletURL = (PortletURL)request.getAttribute("view.jsp-portletURL");

if (groupThreadsUserId > 0) {
	portletURL.setParameter("groupThreadsUserId", String.valueOf(groupThreadsUserId));
}
%>

<% long parentCategoryId = category.getParentCategoryId(); String parentCategoryName = LanguageUtil.get(request, "message-boards-home"); if (!category.isRoot()) { MBCategory parentCategory = MBCategoryLocalServiceUtil.getCategory(parentCategoryId); parentCategoryId = parentCategory.getCategoryId(); parentCategoryName = parentCategory.getName(); } %> <% portletDisplay.setShowBackIcon(true); portletDisplay.setURLBack(backURL.toString()); renderResponse.setTitle(category.getName()); %> <% MBBreadcrumbUtil.addPortletBreadcrumbEntries(categoryId, request, renderResponse); %> <%@ include file="/message_boards/cast_result.jspf" %> <% row.setPrimaryKey(String.valueOf(curCategory.getCategoryId())); %>

<%= curCategory.getName() %>

<%= curCategory.getDescription() %>
<% int subcategoriesCount = MBCategoryServiceUtil.getCategoriesCount(scopeGroupId, curCategory.getCategoryId()); int threadsCount = MBThreadServiceUtil.getThreadsCount(scopeGroupId, curCategory.getCategoryId(), WorkflowConstants.STATUS_APPROVED); %>
<% MBMessage message = MBMessageLocalServiceUtil.fetchMBMessage(thread.getRootMessageId()); if (message == null) { _log.error("Thread requires missing root message id " + thread.getRootMessageId()); message = new MBMessageImpl(); row.setSkip(true); } message = message.toEscapedModel(); row.setBold(!MBThreadFlagLocalServiceUtil.hasThreadFlag(themeDisplay.getUserId(), thread)); row.setPrimaryKey(String.valueOf(thread.getThreadId())); row.setRestricted(!MBMessagePermission.contains(permissionChecker, message, ActionKeys.VIEW)); %> <% String messageUserName = "anonymous"; if (!message.isAnonymous()) { messageUserName = message.getUserName(); } Date modifiedDate = message.getModifiedDate(); String modifiedDateDescription = LanguageUtil.getTimeDescription(request, System.currentTimeMillis() - modifiedDate.getTime(), true); %>
<% String messageUserName = "anonymous"; if (thread.getLastPostByUserId() != 0) { messageUserName = PortalUtil.getUserName(thread.getLastPostByUserId(), StringPool.BLANK); } Date lastPostDate = thread.getLastPostDate(); String lastPostDateDescription = LanguageUtil.getTimeDescription(request, System.currentTimeMillis() - lastPostDate.getTime(), true); %>

<%= message.getSubject() %> <% String[] threadPriority = MBUtil.getThreadPriority(mbGroupServiceSettings, themeDisplay.getLanguageId(), thread.getPriority()); %>

<% boolean portletTitleBasedNavigation = GetterUtil.getBoolean(portletConfig.getInitParameter("portlet-title-based-navigation")); %> <% int messageCount = thread.getMessageCount(); int viewCount = thread.getViewCount(); %> <% int threadAnswersCount = MBMessageServiceUtil.getThreadAnswersCount(thread.getGroupId(), thread.getCategoryId(), thread.getThreadId()); %> <%= threadAnswersCount %>
<% row.setObject(new Object[] {message}); %>
<%! private static Log _log = LogFactoryUtil.getLog("com_liferay_message_boards_web.message_boards_admin.view_entries_jsp"); %>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy