/
select_ddm_structure.jsp
97 lines (85 loc) · 3.29 KB
/
select_ddm_structure.jsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<%--
/**
* 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" %>
<%
JournalSelectDDMStructureDisplayContext journalSelectDDMStructureDisplayContext = new JournalSelectDDMStructureDisplayContext(renderRequest, renderResponse);
SearchContainer<DDMStructure> ddmStructureSearch = journalSelectDDMStructureDisplayContext.getDDMStructureSearch();
%>
<clay:management-toolbar
displayContext="<%= new JournalSelectDDMStructureManagementToolbarDisplayContext(request, liferayPortletRequest, liferayPortletResponse, journalSelectDDMStructureDisplayContext) %>"
/>
<aui:form cssClass="container-fluid-1280" method="post" name="selectDDMStructureFm">
<liferay-ui:search-container
searchContainer="<%= ddmStructureSearch %>"
>
<liferay-ui:search-container-row
className="com.liferay.dynamic.data.mapping.model.DDMStructure"
keyProperty="structureId"
modelVar="ddmStructure"
>
<liferay-ui:search-container-column-text
name="id"
value="<%= String.valueOf(ddmStructure.getStructureId()) %>"
/>
<liferay-ui:search-container-column-text
cssClass="table-cell-content"
name="name"
>
<c:choose>
<c:when test="<%= ddmStructure.getStructureId() != journalSelectDDMStructureDisplayContext.getClassPK() %>">
<%
Map<String, Object> data = HashMapBuilder.<String, Object>put(
"ddmstructureid", ddmStructure.getStructureId()
).put(
"ddmstructurekey", ddmStructure.getStructureKey()
).put(
"name", HtmlUtil.escape(ddmStructure.getName(locale))
).build();
%>
<aui:a cssClass="selector-button" data="<%= data %>" href="javascript:;">
<%= HtmlUtil.escape(ddmStructure.getUnambiguousName(ddmStructureSearch.getResults(), themeDisplay.getScopeGroupId(), locale)) %>
</aui:a>
</c:when>
<c:otherwise>
<%= HtmlUtil.escape(ddmStructure.getUnambiguousName(ddmStructureSearch.getResults(), themeDisplay.getScopeGroupId(), locale)) %>
</c:otherwise>
</c:choose>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text
cssClass="table-cell-content"
name="description"
truncate="<%= true %>"
value="<%= HtmlUtil.escape(ddmStructure.getDescription(locale)) %>"
/>
<liferay-ui:search-container-column-date
name="modified-date"
value="<%= ddmStructure.getModifiedDate() %>"
/>
</liferay-ui:search-container-row>
<liferay-ui:search-iterator
displayStyle="list"
markupView="lexicon"
/>
</liferay-ui:search-container>
</aui:form>
<aui:script>
document.addEventListener('DOMContentLoaded', function () {
Liferay.Util.selectEntityHandler(
'#<portlet:namespace />selectDDMStructureFm',
'<%= HtmlUtil.escapeJS(journalSelectDDMStructureDisplayContext.getEventName()) %>'
);
});
</aui:script>