
META-INF.resources.view_record.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" %>
<%
String redirect = ParamUtil.getString(request, "redirect");
DDLRecord record = (DDLRecord)request.getAttribute(DDLWebKeys.DYNAMIC_DATA_LISTS_RECORD);
long recordId = BeanParamUtil.getLong(record, request, "recordId");
long recordSetId = BeanParamUtil.getLong(record, request, "recordSetId");
DDLRecordSet recordSet = DDLRecordSetServiceUtil.getRecordSet(recordSetId);
boolean editable = ParamUtil.getBoolean(request, "editable", true);
long formDDMTemplateId = ParamUtil.getLong(request, "formDDMTemplateId");
DDMStructure ddmStructure = recordSet.getDDMStructure(formDDMTemplateId);
String version = ParamUtil.getString(request, "version", DDLRecordConstants.VERSION_DEFAULT);
DDLRecordVersion recordVersion = record.getRecordVersion(version);
DDLRecordVersion latestRecordVersion = record.getLatestRecordVersion();
if (ddlDisplayContext.isAdminPortlet()) {
portletDisplay.setShowBackIcon(true);
portletDisplay.setURLBack(redirect);
renderResponse.setTitle(LanguageUtil.format(request, "view-x", ddmStructure.getName(locale), false));
}
else {
portletDisplay.setShowBackIcon(false);
}
%>
<%
DDMFormValues ddmFormValues = null;
if (recordVersion != null) {
ddmFormValues = ddlDisplayContext.getDDMFormValues(recordVersion.getDDMStorageId());
}
long classNameId = PortalUtil.getClassNameId(DDMStructure.class);
long classPK = ddmStructure.getPrimaryKey();
if (formDDMTemplateId > 0) {
classNameId = PortalUtil.getClassNameId(DDMTemplate.class);
classPK = formDDMTemplateId;
}
%>
<%
boolean pending = false;
if (recordVersion != null) {
pending = recordVersion.isPending();
}
%>
<%
PortletURL portletURL = renderResponse.createRenderURL();
portletURL.setParameter("mvcPath", "/view_record_set.jsp");
portletURL.setParameter("recordSetId", String.valueOf(recordSetId));
PortalUtil.addPortletBreadcrumbEntry(request, recordSet.getName(locale), portletURL.toString());
PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.format(request, "view-x", ddmStructure.getName(locale), false), currentURL);
%>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy