META-INF.resources.view_ddm_templates.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="/init.jsp" %>
<%
JournalDDMTemplateDisplayContext journalDDMTemplateDisplayContext = new JournalDDMTemplateDisplayContext(renderRequest, renderResponse);
JournalDDMTemplateManagementToolbarDisplayContext journalDDMTemplateManagementToolbarDisplayContext = new JournalDDMTemplateManagementToolbarDisplayContext(request, liferayPortletRequest, liferayPortletResponse, journalDDMTemplateDisplayContext);
DDMStructure ddmStructure = journalDDMTemplateDisplayContext.getDDMStructure();
if (ddmStructure != null) {
renderResponse.setTitle(LanguageUtil.format(request, "templates-for-structure-x", ddmStructure.getName(locale)));
}
%>
<%
String rowHREF = StringPool.BLANK;
if (DDMTemplatePermission.contains(permissionChecker, ddmTemplate, ActionKeys.UPDATE)) {
rowHREF = PortletURLBuilder.createRenderURL(
renderResponse
).setMVCPath(
"/edit_ddm_template.jsp"
).setRedirect(
currentURL
).setParameter(
"ddmTemplateId", ddmTemplate.getTemplateId()
).buildString();
}
row.setData(
HashMapBuilder.put(
"actions", journalDDMTemplateManagementToolbarDisplayContext.getAvailableActions(ddmTemplate)
).build());
%>
<%
String ddmStructureName = StringPool.BLANK;
if (ddmTemplate.getClassPK() > 0) {
DDMStructure curDDMStructure = DDMStructureLocalServiceUtil.fetchDDMStructure(ddmTemplate.getClassPK());
if (curDDMStructure != null) {
ddmStructureName = curDDMStructure.getName(locale);
}
}
%>
<%
Group group = GroupLocalServiceUtil.getGroup(ddmTemplate.getGroupId());
%>