
META-INF.resources.view_template.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" %>
<%
long classNameId = ParamUtil.getLong(request, "classNameId");
long classPK = ParamUtil.getLong(request, "classPK");
DDMStructure structure = null;
long structureClassNameId = PortalUtil.getClassNameId(DDMStructure.class);
if ((classPK > 0) && (structureClassNameId == classNameId)) {
structure = DDMStructureServiceUtil.getStructure(classPK);
}
boolean showHeader = ParamUtil.getBoolean(request, "showHeader");
boolean controlPanel = false;
if (layout != null) {
Group group = layout.getGroup();
controlPanel = group.isControlPanel();
}
%>
<%
portletDisplay.setShowBackIcon(true);
portletDisplay.setURLBack(PortalUtil.escapeRedirect(ddmDisplay.getViewTemplatesBackURL(liferayPortletRequest, liferayPortletResponse, classPK)));
renderResponse.setTitle(ddmDisplay.getViewTemplatesTitle(structure, controlPanel, ddmDisplayContext.isSearch(), locale));
%>
<%
String rowHREF = StringPool.BLANK;
if (DDMTemplatePermission.contains(permissionChecker, template, ActionKeys.UPDATE)) {
PortletURL rowURL = renderResponse.createRenderURL();
rowURL.setParameter("mvcPath", "/edit_template.jsp");
rowURL.setParameter("groupId", String.valueOf(template.getGroupId()));
rowURL.setParameter("templateId", String.valueOf(template.getTemplateId()));
rowURL.setParameter("classNameId", String.valueOf(classNameId));
if (structure != null) {
rowURL.setParameter("classPK", String.valueOf(template.getClassPK()));
}
else {
rowURL.setParameter("classPK", "0");
}
rowURL.setParameter("type", template.getType());
rowURL.setParameter("structureAvailableFields", renderResponse.getNamespace() + "getAvailableFields");
rowHREF = rowURL.toString();
}
%>
<%
Set excludedColumnNames = ddmDisplay.getViewTemplatesExcludedColumnNames();
%>
<%
String structureName = StringPool.BLANK;
if (template.getClassPK() > 0) {
DDMStructure templateStructure = DDMStructureLocalServiceUtil.getStructure(template.getClassPK());
structureName = templateStructure.getName(locale);
}
%>
<%
Group group = GroupLocalServiceUtil.getGroup(template.getGroupId());
%>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy